diff options
| author | Giuseppe Rota <[email protected]> | 2025-10-21 16:35:09 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-21 09:35:09 -0500 |
| commit | 731122bf99c69e3a01ba4781180badae129d4896 (patch) | |
| tree | 9090ab273e285ca3453ff0eb97421fd77ee040d9 /packages | |
| parent | f9036734eb624d5070d882892a81383300880cc0 (diff) | |
| download | opencode-731122bf99c69e3a01ba4781180badae129d4896.tar.gz opencode-731122bf99c69e3a01ba4781180badae129d4896.zip | |
fix(acp): use newer acp package (#3317)
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/package.json | 2 | ||||
| -rw-r--r-- | packages/opencode/src/acp/README.md | 8 | ||||
| -rw-r--r-- | packages/opencode/src/acp/agent.ts | 2 | ||||
| -rw-r--r-- | packages/opencode/src/acp/client.ts | 2 | ||||
| -rw-r--r-- | packages/opencode/src/acp/server.ts | 2 | ||||
| -rw-r--r-- | packages/opencode/src/acp/session.ts | 2 | ||||
| -rw-r--r-- | packages/opencode/src/acp/types.ts | 2 | ||||
| -rw-r--r-- | packages/sdk/js/src/gen/types.gen.ts | 3 |
8 files changed, 13 insertions, 10 deletions
diff --git a/packages/opencode/package.json b/packages/opencode/package.json index d2b1d55e0..de52826fe 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -35,6 +35,7 @@ "dependencies": { "@actions/core": "1.11.1", "@actions/github": "6.0.1", + "@agentclientprotocol/sdk": "0.4.9", "@clack/prompts": "1.0.0-alpha.1", "@hono/standard-validator": "0.1.5", "@hono/zod-validator": "catalog:", @@ -47,7 +48,6 @@ "@opencode-ai/sdk": "workspace:*", "@parcel/watcher": "2.5.1", "@standard-schema/spec": "1.0.0", - "@zed-industries/agent-client-protocol": "0.4.5", "@zip.js/zip.js": "2.7.62", "ai": "catalog:", "chokidar": "4.0.3", diff --git a/packages/opencode/src/acp/README.md b/packages/opencode/src/acp/README.md index 5e51af13c..d998cb22d 100644 --- a/packages/opencode/src/acp/README.md +++ b/packages/opencode/src/acp/README.md @@ -8,7 +8,7 @@ The implementation follows a clean separation of concerns: ### Core Components -- **`agent.ts`** - Implements the `Agent` interface from `@zed-industries/agent-client-protocol` +- **`agent.ts`** - Implements the `Agent` interface from `@agentclientprotocol/sdk` - Handles initialization and capability negotiation - Manages session lifecycle (`session/new`, `session/load`) - Processes prompts and returns responses @@ -130,7 +130,7 @@ echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion": ### Why the Official Library? -We use `@zed-industries/agent-client-protocol` instead of implementing JSON-RPC ourselves because: +We use `@agentclientprotocol/sdk` instead of implementing JSON-RPC ourselves because: - Ensures protocol compliance - Handles edge cases and future protocol versions @@ -160,5 +160,5 @@ ACP sessions map cleanly to opencode's internal session model: ## References - [ACP Specification](https://agentclientprotocol.com/) -- [TypeScript Library](https://github.com/zed-industries/agent-client-protocol/tree/main/typescript) -- [Protocol Examples](https://github.com/zed-industries/agent-client-protocol/tree/main/typescript/examples) +- [TypeScript Library](https://github.com/agentclientprotocol/typescript-sdk) +- [Protocol Examples](https://github.com/agentclientprotocol/typescript-sdk/tree/main/src/examples) diff --git a/packages/opencode/src/acp/agent.ts b/packages/opencode/src/acp/agent.ts index d0981b056..130cbdce6 100644 --- a/packages/opencode/src/acp/agent.ts +++ b/packages/opencode/src/acp/agent.ts @@ -12,7 +12,7 @@ import type { NewSessionResponse, PromptRequest, PromptResponse, -} from "@zed-industries/agent-client-protocol" +} from "@agentclientprotocol/sdk" import { Log } from "../util/log" import { ACPSessionManager } from "./session" import type { ACPConfig } from "./types" diff --git a/packages/opencode/src/acp/client.ts b/packages/opencode/src/acp/client.ts index 50d599916..24119eabe 100644 --- a/packages/opencode/src/acp/client.ts +++ b/packages/opencode/src/acp/client.ts @@ -17,7 +17,7 @@ import type { WaitForTerminalExitResponse, WriteTextFileRequest, WriteTextFileResponse, -} from "@zed-industries/agent-client-protocol" +} from "@agentclientprotocol/sdk" import { Log } from "../util/log" export class ACPClient implements Client { diff --git a/packages/opencode/src/acp/server.ts b/packages/opencode/src/acp/server.ts index 667a09873..0e5306dcd 100644 --- a/packages/opencode/src/acp/server.ts +++ b/packages/opencode/src/acp/server.ts @@ -1,4 +1,4 @@ -import { AgentSideConnection, ndJsonStream } from "@zed-industries/agent-client-protocol" +import { AgentSideConnection, ndJsonStream } from "@agentclientprotocol/sdk" import { Log } from "../util/log" import { Instance } from "../project/instance" import { OpenCodeAgent } from "./agent" diff --git a/packages/opencode/src/acp/session.ts b/packages/opencode/src/acp/session.ts index 01d079bcf..c0a6db04b 100644 --- a/packages/opencode/src/acp/session.ts +++ b/packages/opencode/src/acp/session.ts @@ -1,4 +1,4 @@ -import type { McpServer } from "@zed-industries/agent-client-protocol" +import type { McpServer } from "@agentclientprotocol/sdk" import { Identifier } from "../id/id" import { Session } from "../session" import type { ACPSessionState } from "./types" diff --git a/packages/opencode/src/acp/types.ts b/packages/opencode/src/acp/types.ts index f10066a8b..3f0768b8c 100644 --- a/packages/opencode/src/acp/types.ts +++ b/packages/opencode/src/acp/types.ts @@ -1,4 +1,4 @@ -import type { McpServer } from "@zed-industries/agent-client-protocol" +import type { McpServer } from "@agentclientprotocol/sdk" export interface ACPSessionState { id: string diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts index afca94864..1e92472dc 100644 --- a/packages/sdk/js/src/gen/types.gen.ts +++ b/packages/sdk/js/src/gen/types.gen.ts @@ -970,6 +970,7 @@ export type FileNode = { } export type FileContent = { + type: "text" content: string diff?: string patch?: { @@ -986,6 +987,8 @@ export type FileContent = { }> index?: string } + encoding?: "base64" + mimeType?: string } export type File = { |
