Skip to content

Feat/oak acp stream adapter#34

Open
Mrjing wants to merge 7 commits into
mainfrom
feat/oak-acp-stream-adapter
Open

Feat/oak acp stream adapter#34
Mrjing wants to merge 7 commits into
mainfrom
feat/oak-acp-stream-adapter

Conversation

@Mrjing

@Mrjing Mrjing commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Mrjing and others added 7 commits June 24, 2026 17:02
Document the interim local provider strategy so OAK can run file/bash
workloads on the host runtime without AGS, while preserving the existing
ags-stateful path for future TCB productization.

Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce self-contained ACP update types and an exported AcpStreamAdapter so SDK-shaped streams can be converted without an external adapter package.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend the built-in ACP adapter with tool input streaming and OAK interrupt sentinel handling so UI clients receive ACP-native tool and HITL updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route Claude SDK messages through the built-in ACP adapter by default and remove the old SessionEvent translator from the public path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Update OAK docs and examples around the built-in ACP stream contract so users consume AcpSessionUpdate without declaring an adapter.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add @agentclientprotocol/sdk@^1.0.0 dependency (stable release, zero runtime deps)
- Rewrite src/acp/types.ts: import standard SessionUpdate from SDK, define OAK
  extensions (request_permission, ask_user, log, artifact, history_page,
  agent_phase) on top with _meta.oak for non-standard fields
- Rewrite src/adapters/acp-stream-adapter.ts:
  - tool_call: input→rawInput, kind:'function'→standard ToolKind enum
    (toolKindFromName ported from official claude-agent-acp)
  - tool_call_update: result→rawOutput, error→content:ToolCallContent[]
  - tool_confirm→request_permission: standard RequestPermissionRequest
    payload (sessionId + toolCall:ToolCallUpdate + options:PermissionOption[])
  - thinking→agent_thought_chunk (standard ContentChunk)
  - Add usage_update emission on result message
  - parentToolCallId/assistantMessageId moved to _meta.oak
- Update all examples to consume new field names
- Update design doc (architecture-acp-stream-adapter.md)

Breaking: callers consuming AcpSessionUpdate must update field access:
  tool_confirm→request_permission, input→rawInput, result→rawOutput,
  error→content[], kind:'function'→ToolKind enum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants