用代码修复 CI
一段简短的脚本让 OpenCode 修复失败的测试,然后重新运行。
在您自己的脚本、CI 任务和工具中驱动 OpenCode。SDK 在您的进程内运行 OpenCode,使用您的配置和模型,其带类型的客户端可以创建会话、发送提示词并流式传输每个事件。
一段简短的脚本让 OpenCode 修复失败的测试,然后重新运行。
流式传输事件,实时查看代理调用的每个工具。
只需几行代码,就能把 OpenCode 接入机器人、仪表盘和工作流。
在您的进程内运行 OpenCode,使用您的配置和模型。
experimental.mcp.event events from MCP event subscriptionsparentID field.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.#61582