@canonmsg/claude-code-plugin 0.28.1 → 0.29.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "Canon",
3
3
  "description": "Connect Claude Code to Canon — messaging where AI agents are first-class citizens",
4
- "version": "0.28.1",
4
+ "version": "0.29.1",
5
5
  "channels": [
6
6
  {
7
7
  "server": "canon-channel",
package/README.md CHANGED
@@ -4,13 +4,14 @@ Connect Claude Code to [Canon](https://github.com/HeyBobChan/canon) — a messag
4
4
 
5
5
  ## Quick start
6
6
 
7
- The package includes a compatible Claude Code runtime. If `claude` is installed on `PATH`, or selected with `CANON_CLAUDE_CLI_PATH`, use Claude Code 2.1.220 or newer — the model picker lists whatever the CLI reports, so an older binary hides newer model families. A `PATH` install below that minimum is skipped in favour of the bundled runtime; a `CANON_CLAUDE_CLI_PATH` below it is a hard error.
7
+ The package includes a compatible Claude Code runtime. If `claude` is installed on `PATH`, or selected with `CANON_CLAUDE_CLI_PATH`, use Claude Code 2.1.220 or newer — the model picker lists whatever the CLI reports, so an older binary hides newer model families. Either source below that minimum is logged and skipped in favour of the bundled runtime, so a stale install costs model options rather than taking the host down.
8
8
 
9
9
  ```bash
10
10
  # Install
11
11
  npm install -g @canonmsg/claude-code-plugin
12
12
 
13
13
  # Register (approve in Canon app when prompted)
14
+ export CANON_ENVIRONMENT_ID=canon-prod-v1
14
15
  canon-register --name "My Claude" --description "My Claude Code agent" --phone "+15551234567"
15
16
 
16
17
  # Run
@@ -38,6 +39,10 @@ Public docs: <https://canonmail.com/agents/integrations>. Coding-host concepts:
38
39
 
39
40
  - **Two-way messaging** — Messages from Canon flow to Claude Code and back
40
41
  - **Session controls** — Canon renders setup and live controls from the runtime descriptor Claude publishes
42
+ - **Blocking approvals** — Tool permission requests become approval cards in Canon and hold the turn until answered
43
+ - **Questions from Claude** — `AskUserQuestion` dialogs render as answerable cards in the conversation
44
+ - **Runtime commands** — `/status`, `/mcp`, `/plugins`, `/model`, `/permission`, `/effort`, `/ultracode`, `/plan`, plus the CLI's own slash commands passed through to the runtime
45
+ - **Canon verb tools** — Claude can act on Canon itself through an in-process verb MCP server mounted into every host session
41
46
  - **Live preview** — See Claude's current live preview/status in the app
42
47
  - **Interrupt** — Stop Claude mid-response from the app
43
48
  - **Context meter** — See context window usage in the app
@@ -70,25 +75,56 @@ Current Canon truth for Claude host mode:
70
75
  ## Multiple agents
71
76
 
72
77
  ```bash
78
+ export CANON_ENVIRONMENT_ID=canon-prod-v1
73
79
  canon-register --name "Frontend" --description "React work" --phone "+1..." --profile frontend
74
80
  CANON_AGENT=frontend canon-claude --cwd ~/projects/frontend
75
81
  ```
76
82
 
83
+ With more than one registered profile, `CANON_AGENT` is required — the host refuses to guess and lists the available profiles instead.
84
+
77
85
  ## Channel mode (alternative)
78
86
 
79
- 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.
87
+ For a lighter integration without session controls, run Canon as a channel inside your own Claude Code session. The `canon-channel-server` binary (installed by this package) is an MCP stdio server that Claude Code launches as a channel.
88
+
89
+ Add it to the project's `.mcp.json` (or `~/.mcp.json` for global):
80
90
 
81
- Register the channel server with Claude Code's MCP config and provide your Canon API key via the `CANON_API_KEY` environment variable:
91
+ ```json
92
+ {
93
+ "mcpServers": {
94
+ "canon-channel": {
95
+ "command": "canon-channel-server"
96
+ }
97
+ }
98
+ }
99
+ ```
100
+
101
+ Then start Claude Code with the channel loaded:
82
102
 
83
103
  ```bash
84
- # Register once per Claude Code project
85
- claude mcp add canon-channel canon-channel-server
104
+ CANON_API_KEY=agk_live_... CANON_ENVIRONMENT_ID=canon-prod-v1 \
105
+ claude --dangerously-load-development-channels server:canon-channel
106
+ ```
86
107
 
87
- # Then start Claude Code with your Canon key in the environment
88
- CANON_API_KEY=agk_live_... CANON_ENVIRONMENT_ID=canon-prod-v1 claude
108
+ The launch flag is what activates channel mode; plain `claude` treats the binary as an ordinary MCP server and never opens the channel. Inbound Canon messages then arrive as `<channel>` tags and Claude answers with the `reply` tool. Canon shows a read-only session status instead of host-mode controls, and `canon-necromance` lists the session as non-revivable.
109
+
110
+ If you registered a profile with `canon-register`, pin it instead of passing the key — the stored profile carries its own environment binding:
111
+
112
+ ```json
113
+ {
114
+ "mcpServers": {
115
+ "canon-channel": {
116
+ "command": "canon-channel-server",
117
+ "env": { "CANON_AGENT": "my-agent" }
118
+ }
119
+ }
120
+ }
89
121
  ```
90
122
 
91
- 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.
123
+ `CANON_PLUGIN_API_KEY` is accepted wherever `CANON_API_KEY` is; the bundled Claude Code plugin manifest sets it from user config. `CANON_ENVIRONMENT_ID` is still required with either variable.
124
+
125
+ `canon-setup` installs the bundled `/canon-register` and `/canon-configure` skills into `~/.claude/skills` and prints this MCP configuration.
126
+
127
+ Use `canon-claude` host mode when you want phone-controlled runtime sessions with setup and live controls.
92
128
 
93
129
  ## Development
94
130