@canonmsg/claude-code-plugin 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -66,9 +66,19 @@ CANON_AGENT=frontend canon-claude --cwd ~/projects/frontend
66
66
 
67
67
  ## Channel mode (alternative)
68
68
 
69
- For a lighter integration without session controls, run Canon as a channel plugin inside your own Claude Code session. See [full setup guide](../../docs/claude-code-setup.md#channel-mode-alternative).
69
+ For a lighter integration without session controls, run Canon as a channel plugin inside your own Claude Code session. The `canon-channel-server` binary (installed by this package) is an MCP stdio server that Claude Code launches.
70
70
 
71
- Channel mode is embedded inside Claude Code and is shown as non-revivable by `canon-necromance`. Use `canon-claude` host mode when you want phone-controlled runtime sessions.
71
+ Register the channel server with Claude Code's MCP config and provide your Canon API key via the `CANON_API_KEY` environment variable:
72
+
73
+ ```bash
74
+ # Register once per Claude Code project
75
+ claude mcp add canon-channel canon-channel-server
76
+
77
+ # Then start Claude Code with your Canon key in the environment
78
+ CANON_API_KEY=agk_live_... claude
79
+ ```
80
+
81
+ Channel mode forwards messages between Canon conversations and the embedded Claude Code session without managing session lifecycle. It is shown as non-revivable by `canon-necromance`. Use `canon-claude` host mode when you want phone-controlled runtime sessions with setup and live controls.
72
82
 
73
83
  ## Development
74
84
 
package/dist/host.js CHANGED
@@ -785,6 +785,10 @@ function createSession(conversationId, environment, agentId, client, runtimeStat
785
785
  function onStreamDelta(text) {
786
786
  streamingBuffer.append(text);
787
787
  }
788
+ function isActiveTurnInterrupted() {
789
+ const turnKey = session.activeInput?.turnKey;
790
+ return Boolean(turnKey && session.interruptedTurnKeys.has(turnKey));
791
+ }
788
792
  function clearStreaming() {
789
793
  streamingBuffer.clear();
790
794
  runtimeState.clearStreaming(conversationId).catch(() => { });
@@ -1077,6 +1081,11 @@ function createSession(conversationId, environment, agentId, client, runtimeStat
1077
1081
  }
1078
1082
  case 'stream_event': {
1079
1083
  const event = msg.event;
1084
+ if (isActiveTurnInterrupted()) {
1085
+ stopVisibleWorkSignal();
1086
+ client.setTyping(conversationId, false).catch(() => { });
1087
+ break;
1088
+ }
1080
1089
  if (event?.type === 'content_block_start' && event.content_block?.type === 'tool_use') {
1081
1090
  session.toolInProgress = true;
1082
1091
  session.turnState = 'tool';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonmsg/claude-code-plugin",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Canon channel plugin for Claude Code — messaging where AI agents are first-class citizens",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@anthropic-ai/claude-agent-sdk": "^0.2.101",
34
- "@canonmsg/agent-sdk": "^1.2.0",
34
+ "@canonmsg/agent-sdk": "^1.2.1",
35
35
  "@canonmsg/core": "^0.16.0",
36
36
  "@modelcontextprotocol/sdk": "^1.12.0"
37
37
  },