用程式碼修復 CI
一段簡短的腳本請 OpenCode 修復失敗的測試,然後重新執行。
從你自己的腳本、CI 工作和工具驅動 OpenCode。SDK 在你的處理程序內執行 OpenCode,使用你的設定和模型,其具型別的用戶端可以建立工作階段、傳送提示詞並串流每個事件。
一段簡短的腳本請 OpenCode 修復失敗的測試,然後重新執行。
串流事件,即時查看代理呼叫的每個工具。
只要幾行程式碼,就能把 OpenCode 接入機器人、儀表板和工作流程。
在你的處理程序內執行 OpenCode,使用你的設定和模型。
session.generate returns tokens and cost along with textOn a Location that is still loading plugins, agent.list returns the agents loaded so far, and integration.list, usage.limits, vcs.init, rpc.call and artifact.* no longer wait up to 5 seconds. Entries and actions that a plugin provides appear when it finishes loading, so refresh on the matching *.updated event. Model, provider, generate.*, voice.* and websearch.query endpoints still wait.
client.experimental.job.list() and its Effect equivalent for listing background shell, subagent, and image jobs, with session, descendant, kind, and status filters.#60698fetch implementation for OpenCode HTTP, model, web, and remote MCP traffic.#61582Enable "experimental": { "artifacts": true } in opencode.json to let agents publish, update, and serve HTML or static artifacts through the built-in local provider or plugin-provided storage.#60351
client.experimental.persistentPty.update to rename terminals or clear a user title, and exposed userTitle plus persistent-pty.updated events.#60329