@tisyn/claude-code
v0.14.1
Published
`@tisyn/claude-code` adapts Claude Code to the portable `@tisyn/code-agent` contract.
Readme
@tisyn/claude-code
@tisyn/claude-code adapts Claude Code to the portable @tisyn/code-agent contract.
It lets Tisyn workflows talk to Claude Code through the same session-oriented operations used by other coding-agent backends, while hiding the details of ACP JSON-RPC or the Claude Agent SDK.
Where It Fits
@tisyn/claude-code sits above the portable contract and below transport/session wiring.
@tisyn/code-agentdefines the backend-neutral coding-agent contract.@tisyn/claude-codetranslates that contract into Claude Code-specific protocols.@tisyn/transportinstalls the binding into a Tisyn execution scope.@tisyn/protocolprovides the Tisyn-side execute/progress message shapes the binding emits.
Use this package when you want a Claude-backed implementation of the CodeAgent contract.
What It Provides
The public surface exported from src/index.ts includes:
createBinding— create aLocalAgentBindingbacked by a Claude Code ACP processcreateSdkBinding— create aLocalAgentBindingbacked by the Claude Agent SDKcreateMockClaudeCodeTransport— mock transport for testsAcpAdapterConfig— configuration for the ACP stdio adapterSdkAdapterConfig— configuration for the SDK-backed adapterSessionHandle,PromptResult,ForkData— portable contract types re-exported from@tisyn/code-agentPlanResult— Claude-specific prompt result extension that can include tool results
Adapter Shapes
ACP binding
createBinding() connects Tisyn protocol messages to a Claude Code ACP stdio process.
It is responsible for:
- spawning or attaching to an ACP process
- translating Tisyn execute requests into ACP JSON-RPC requests
- translating ACP success/error/progress messages back into Tisyn protocol messages
- synthesizing the Tisyn initialize response ACP does not speak natively
SDK binding
createSdkBinding() uses @anthropic-ai/claude-agent-sdk directly instead of going through ACP stdio.
It is responsible for:
- creating persistent SDK sessions
- streaming progress events back into the Tisyn protocol shape
- mapping Tisyn operations such as
newSession,plan,fork, andopenForkonto SDK calls
Relationship to Other Packages
@tisyn/code-agentsupplies the contract this package implements.@tisyn/transportconsumes the returnedLocalAgentBinding.@tisyn/protocolprovides the execute/progress message helpers used on the Tisyn side.@tisyn/agentremains the declaration layer; this package is an implementation adapter, not a contract definition package.
Boundaries
@tisyn/claude-code does not:
- define the portable coding-agent contract
- define general Tisyn transport/session semantics
- compile workflows
- own the higher-level review/spec workflows that happen to use Claude Code
It exists specifically to make Claude Code conform to the shared CodeAgent surface.
