Feat/oak acp stream adapter#34
Open
Mrjing wants to merge 7 commits into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.