pmx-canvas 0.9.3 → 0.10.0

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.
Files changed (56) hide show
  1. package/.github/extensions/pmx-canvas/runtime.json +1 -1
  2. package/.github/extensions/pmx-canvas/tools.json +9278 -2014
  3. package/CHANGELOG.md +22 -1
  4. package/dist/canvas/index.js +1 -1
  5. package/dist/canvas/mcp-app.html +1 -1
  6. package/dist/types/mcp/canvas-access.d.ts +1 -12
  7. package/dist/types/mcp/resource-subscriptions.d.ts +7 -0
  8. package/dist/types/mcp/server.d.ts +2 -0
  9. package/dist/types/server/ax-wait.d.ts +1 -0
  10. package/dist/types/server/canvas-operations.d.ts +1 -0
  11. package/dist/types/server/index.d.ts +3 -3
  12. package/dist/types/server/operations/http.d.ts +10 -0
  13. package/dist/types/server/operations/index.d.ts +2 -2
  14. package/dist/types/server/operations/invoker.d.ts +4 -3
  15. package/dist/types/server/operations/mcp-contracts.d.ts +20 -0
  16. package/dist/types/server/operations/mcp.d.ts +2 -0
  17. package/dist/types/server/operations/ops/batch.d.ts +1 -0
  18. package/dist/types/server/operations/registry.d.ts +2 -2
  19. package/dist/types/server/operations/types.d.ts +12 -2
  20. package/dist/types/server/server.d.ts +2 -0
  21. package/dist/types/server/webpage-node.d.ts +1 -0
  22. package/docs/api-reference.md +2 -2
  23. package/docs/cli.md +1 -1
  24. package/docs/http-api.md +31 -0
  25. package/docs/mcp.md +93 -21
  26. package/docs/plans/plan-019-post-0.9-roadmap.md +123 -6
  27. package/docs/sdk.md +5 -2
  28. package/package.json +1 -1
  29. package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
  30. package/plugins/pmx-canvas/plugin.json +1 -1
  31. package/plugins/pmx-canvas/runtime.json +1 -1
  32. package/plugins/pmx-canvas/tools.json +9278 -2014
  33. package/skills/pmx-canvas/SKILL.md +9 -4
  34. package/skills/pmx-canvas/references/full-reference.md +35 -2
  35. package/skills/pmx-canvas/references/installing-pmx-canvas.md +7 -7
  36. package/src/client/canvas/ToolRail.tsx +2 -0
  37. package/src/mcp/canvas-access.ts +6 -47
  38. package/src/mcp/resource-subscriptions.ts +181 -0
  39. package/src/mcp/server.ts +185 -219
  40. package/src/server/ax-wait.ts +21 -6
  41. package/src/server/canvas-operations.ts +6 -2
  42. package/src/server/index.ts +12 -4
  43. package/src/server/operations/http.ts +69 -21
  44. package/src/server/operations/index.ts +8 -1
  45. package/src/server/operations/invoker.ts +53 -5
  46. package/src/server/operations/mcp-contracts.ts +339 -0
  47. package/src/server/operations/mcp.ts +153 -18
  48. package/src/server/operations/ops/ax-await.ts +18 -10
  49. package/src/server/operations/ops/ax-read.ts +2 -0
  50. package/src/server/operations/ops/ax-timeline.ts +2 -2
  51. package/src/server/operations/ops/batch.ts +27 -8
  52. package/src/server/operations/ops/nodes.ts +18 -3
  53. package/src/server/operations/registry.ts +24 -4
  54. package/src/server/operations/types.ts +16 -2
  55. package/src/server/server.ts +10 -0
  56. package/src/server/webpage-node.ts +9 -4
@@ -1,9 +1,9 @@
1
1
  # Plan 019: After 0.9.0
2
2
 
3
- **Status (2026-10-24):** 0.9.0–0.9.2 are released. The maintainer authorized review,
4
- testing and release of the patch-only 0.9.3 cleanup after the prerequisite fixes reached
5
- `origin/main` at `bed57fe9a4b79bd54f8b5ee51cefd65fec3dbe1a`. The SDK tour return shape
6
- stays unchanged. MCP hardening and SDK tour result parity move to 0.10 on SDK v1.
3
+ **Status (2026-10-24):** 0.9.3 is released to npm and GitHub, with fresh registry smoke
4
+ passing. Step 2, MCP hardening and SDK tour result parity on SDK v1, is implemented
5
+ and pushed with the Settings tooltip fix, operation help and schema-size reduction.
6
+ The maintainer authorized review, testing and release of 0.10.0; release gates are in progress.
7
7
  Later version numbers are proposals, not publication approval; every release must pass
8
8
  the [release gates](../RELEASE.md).
9
9
  **Sources:** [product vision](../product-vision-2026-09.md) (moves and the 2026-10-19 sequence),
@@ -23,7 +23,7 @@ measured; the maintainer carries that risk rather than reinstating an earlier ga
23
23
  | Step | Proposed version | Scope | Vision | Size |
24
24
  |---|---|---|---|---|
25
25
  | 1 | 0.9.3 | Cleanup: tour debt, large-board costs, bounded due evaluator, MCP reconnect, lint | 12, 1 | S–M |
26
- | 2 | 0.10 | MCP hardening: contracts, annotations, cancellation, resource subscriptions | 6a, 1 | M |
26
+ | 2 | 0.10 | MCP hardening, operation help and bounded discovery-schema reduction | 6a, 1 | M |
27
27
  | 3 | 0.11 | One frame host, portal-layer mount, Wave-0 design pass | 5, 9 | M–L |
28
28
  | 4 | 0.12 | Wave 5: agent output as nodes, make/inline board, group drill-in, relations sketch parity | 3, 0 | L |
29
29
  | 5 | later | Trust (M half), journal, concurrent boards, binary | 7, 4, 8 | L–XL |
@@ -125,6 +125,121 @@ lists the exact locations. These remain outside the narrow behavioral fixes:
125
125
  [Vision move 6a](../product-vision-2026-09.md#6a-make-the-tool-surface-cheap-s--staged-follow-up)
126
126
  and move 1's context delivery, on the current SDK v1.
127
127
 
128
+ **Local implementation checkpoint (2026-10-24):**
129
+ - All 24 tools advertise output schemas and explicit effect hints. Registry results use
130
+ `{ result: { operation, outcome, data } }`; handwritten interaction, activity and screenshot
131
+ tools retain their direct objects. Existing model-facing text/projections stay unchanged.
132
+ Schemas distinguish batch success, empty failure and retained partial outcomes.
133
+ - Cancellation reaches AX waits and webpage I/O through local and HTTP invokers. Batches
134
+ retain completed receipts and stop before subsequent operations. Progress is opt-in through
135
+ MCP tokens and HTTP NDJSON. External runtime/build calls and local WebView captures remain
136
+ noninterruptible mid-call. Disconnects may lose the response, never undo completed writes.
137
+ - Subscriptions belong to each connection, include exact parameterized URIs, and dispose
138
+ on unsubscribe/close. Local state and workbench events cover library-only changes as well
139
+ as active nodes; remote SSE reconnects invalidate subscribed resources. Notifications never
140
+ record reads or advance cursors. A library-only-change regression failed before integration
141
+ and passes with the shared event source.
142
+ - SDK `getTour()` now returns `{ tour, derived, position }`; `.tour.stops` is documented as
143
+ the minor-version breaking change. No SDK/dependency upgrade or frame-host work.
144
+
145
+ **Approved follow-up, 2026-10-24:** `canvas_help { op }` derives one operation's
146
+ public arguments, required fields, routing selectors and guidance from the registry.
147
+ Omitting `op` lists MCP registry names; internal/human-only and non-registry tools are
148
+ excluded. Metadata reads neither boot a canvas nor record content delivery. The catalog
149
+ now has 25 tools. Conditional handler validation still applies; no lazy host discovery
150
+ or smaller input schemas are claimed.
151
+
152
+ Equivalent success schemas shared by identity are grouped within each tool. Distinct
153
+ payload contracts, error branches and batch partial receipts remain unchanged. Two
154
+ real stdio measurements with `bun run scripts/measure-mcp-catalog.ts` were byte-identical:
155
+ the previous 24-tool candidate's 144,680 UTF-8 JSON bytes become 137,381 for the same
156
+ tools (7,299 fewer, 5.05%). Existing output schemas drop from 77,105 to 69,806 bytes.
157
+ Adding help costs 1,156 catalog bytes including its separator: 138,537 bytes total,
158
+ 6,143 fewer than the previous candidate (4.25%). Input-schema byte counts are unchanged.
159
+ This remains larger than published 0.9.3's 65,219 bytes. Bytes are not tokens, latency
160
+ or measured agent effectiveness. `session.start` and composite-input redesign remain deferred.
161
+
162
+ **Follow-up verification:** build, typecheck and `bun run test` pass (1,546 tests).
163
+ Real SDK stdio checks enumerate help for every exposed registry operation, validate
164
+ required fields, aliases and gate selectors, and create/remove a card using returned
165
+ arguments. Schema controls reject mismatched operations, malformed receipts and extra
166
+ envelope fields while accepting extensible payloads. Lint passes with 55 warnings and
167
+ 12 infos. The first combined run caught a second frozen tool list still expecting 24;
168
+ that assertion now includes help. Test-fixture/typecheck failures were corrected, with
169
+ first-failure logs retained.
170
+
171
+ **Full candidate rerun requested by the maintainer:** `bun run test:coverage` passes
172
+ 1,546 tests (67.27% lines, 73.62% functions, above the 60%/64% floors);
173
+ `bun run test:client` passes 332; `xvfb-run -a bash scripts/run-playwright.sh --headed`
174
+ passes all 333 desktop and 600/1024/1920 reference cases. Headed `test:e2e-cli`,
175
+ `release:smoke`, `pack:dry-run`, build, typecheck, lint and generated-catalog mirror
176
+ checks pass. A fresh packed MCP consumer discovers 25 tools, reads help without
177
+ creating state, and validates add/get results. Its allowed dependency versions
178
+ (SDK 1.32.2, Zod 4.6.7 versus checkout 1.28.0/4.3.6) encode nullable primitive schemas
179
+ as type arrays instead of `anyOf`. The initial byte-identity assertion failed;
180
+ comparison passes when only that equivalent encoding is normalized. No dependency changed.
181
+
182
+ The live portal serves the exact rebuilt bundle. Real stdio help-guided calls and
183
+ headed browser checks pass human pin → notification → explicit read → rendered edit,
184
+ unsubscribe, numeric progress tokens, cancelled approval waits, partial batch receipts
185
+ and refresh persistence. Both minimap toggles leave no tooltip and preserve Settings
186
+ focus. The first recording encoder fell behind; a later recording with the large suite
187
+ finished and a smaller viewport succeeded and was inspected frame by frame.
188
+ Native Amp/Copilot acceptance, Windows/macOS and remote/native reconnect remain unverified.
189
+
190
+ **Initial hardening verification:** build and typecheck pass; `bun run test` passes 1,544 tests and
191
+ `bun run test:client` passes 332. `xvfb-run -a bash scripts/run-playwright.sh --headed`
192
+ passes 333 cases; three pin/viewport/polling controls also pass after the final local
193
+ subscription event hook. `bun run release:smoke` passes on a disposable packed install,
194
+ not a registry publication. Lint passes with the same 55 warnings and 12 infos; generated
195
+ tool catalogs match. Real stdio tests cover local and daemon-attached progress/cancellation
196
+ and resource isolation. Initial test typing/SDK error-envelope failures and the red
197
+ library-notification regression were corrected; this is not a first-run-green claim.
198
+ Native 0.10 host acceptance, Windows/macOS and remote/native reconnect remain unverified.
199
+ Bounded simplify/harden review found no further blockers and made no additional changes.
200
+
201
+ **Independent baseline evidence:** the
202
+ [0.9.3 test thread](https://ampcode.com/threads/T-01a048cf-adb3-71bd-a7c6-472053b691d1)
203
+ reports no new confirmed functional defect after reruns, including installed SDK direct-tour
204
+ compatibility and native Amp pin/read/edit/ack acceptance. It does not establish 0.10 MCP
205
+ structured-output, cancellation or subscription conformance. Its low-severity KaTeX advisory,
206
+ unresolved first-run coverage timeout and remote/native reconnect gap remain separate from
207
+ this candidate; no dependency or reconnect fix is claimed here.
208
+
209
+ **Discovery cost:** `bun run scripts/measure-mcp-catalog.ts` measures UTF-8 bytes of the
210
+ real SDK client's `tools/list` JSON in a disposable stdio workspace, without canvas reads.
211
+ The 0.9.3 baseline is 65,219 bytes; the initial hardening candidate was 144,680 bytes, both 24 tools.
212
+ Output schemas contributed 77,105 bytes before the follow-up above. This is an increase in discovery overhead, not a
213
+ claim of cheaper prompts or a token estimate. Existing result text is unchanged; structured
214
+ results duplicate that projection for machine consumers. Host-specific prompt costs are unmeasured.
215
+
216
+ | Tool | 0.9.3 bytes | Initial hardening bytes |
217
+ |---|---:|---:|
218
+ | `canvas_pin_nodes` | 782 | 2227 |
219
+ | `canvas_invoke_command` | 804 | 2312 |
220
+ | `canvas_batch` | 1367 | 5184 |
221
+ | `canvas_import` | 1152 | 4251 |
222
+ | `canvas_snapshot` | 2238 | 6365 |
223
+ | `canvas_board` | 5859 | 14803 |
224
+ | `canvas_node` | 8184 | 13485 |
225
+ | `canvas_render` | 6321 | 11165 |
226
+ | `canvas_edge` | 2186 | 4423 |
227
+ | `canvas_group` | 1953 | 4532 |
228
+ | `canvas_history` | 494 | 2430 |
229
+ | `canvas_view` | 4341 | 12821 |
230
+ | `canvas_query` | 2476 | 7000 |
231
+ | `canvas_app` | 4729 | 7496 |
232
+ | `canvas_webview` | 1810 | 4834 |
233
+ | `canvas_ax_state` | 4462 | 7652 |
234
+ | `canvas_ax_work` | 2074 | 4527 |
235
+ | `canvas_ax_gate` | 2417 | 8285 |
236
+ | `canvas_ax_timeline` | 2637 | 6135 |
237
+ | `canvas_ax_delivery` | 1366 | 3284 |
238
+ | `canvas_intent` | 3127 | 5453 |
239
+ | `canvas_ax_interaction` | 1460 | 1969 |
240
+ | `canvas_ingest_activity` | 2341 | 2872 |
241
+ | `canvas_screenshot` | 604 | 1140 |
242
+
128
243
  1. Remeasure `tools/list` size per tool before any schema change.
129
244
  2. `outputSchema` + `structuredContent` for stable results (IDs, revisions, mutation
130
245
  outcomes); compact model-facing content; UI-only payloads in `_meta` where supported.
@@ -137,7 +252,9 @@ and move 1's context delivery, on the current SDK v1.
137
252
  6. Align SDK tour reads with HTTP/MCP `{ tour, derived, position }`; document the breaking
138
253
  change from `.stops` to `.tour.stops` at this minor-version boundary.
139
254
 
140
- Candidates, not automatic scope: `canvas_help { op }`, `session.start`, per-action schemas.
255
+ 7. Approved follow-up: `canvas_help { op }` and bounded output-schema deduplication, as above.
256
+
257
+ Candidates, not automatic scope: `session.start`, composite-input redesign.
141
258
 
142
259
  **Done when**
143
260
  - Representative read and mutation results validate against their advertised schemas.
package/docs/sdk.md CHANGED
@@ -38,8 +38,11 @@ records retain their reviewed revision, and legacy unversioned evidence remains
38
38
 
39
39
  ## Board tours
40
40
 
41
- `canvas.getTour()` returns the tour directly. Read stops from `canvas.getTour().stops`.
42
- When no tour is saved, stops come from group reading order.
41
+ `canvas.getTour()` returns `{ tour, derived, position }`, matching HTTP and MCP.
42
+ Read stops from `canvas.getTour().tour.stops`. `derived` is true when stops come
43
+ from group reading order rather than a saved tour. `position` is the current
44
+ stop index, or null outside a tour.
45
+ This is a breaking change in 0.10: replace `.getTour().stops` with `.getTour().tour.stops`.
43
46
  `canvas.setTour(tourOrNull)` saves the tour or resets it to derived group order.
44
47
  See the [tour contract](http-api.md#board-tours) for navigation and camera moves.
45
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmx-canvas",
3
- "version": "0.9.3",
3
+ "version": "0.10.0",
4
4
  "description": "Spatial canvas workbench for coding agents — infinite 2D canvas with agent-native CLI, MCP integration, nodes, edges, file watching, and snapshots",
5
5
  "type": "module",
6
6
  "main": "./src/server/index.ts",
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.9.3"
2
+ "version": "0.10.0"
3
3
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "pmx-canvas",
4
4
  "description": "PMX Canvas spatial workbench and MCP tools, with a native canvas panel in the GitHub Copilot app.",
5
- "version": "0.9.3",
5
+ "version": "0.10.0",
6
6
  "author": {
7
7
  "name": "pskoett",
8
8
  "url": "https://github.com/pskoett"
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.9.3"
2
+ "version": "0.10.0"
3
3
  }