pmx-canvas 0.3.2 → 0.3.4
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/CHANGELOG.md +69 -0
- package/Readme.md +2 -1
- package/dist/canvas/index.js +85 -83
- package/dist/json-render/index.js +47 -47
- package/dist/types/cli/agent.d.ts +13 -8
- package/dist/types/cli/commands/apps.d.ts +1 -0
- package/dist/types/cli/commands/ax.d.ts +1 -0
- package/dist/types/cli/commands/copilot.d.ts +1 -0
- package/dist/types/cli/commands/edges.d.ts +1 -0
- package/dist/types/cli/commands/groups.d.ts +1 -0
- package/dist/types/cli/commands/history.d.ts +1 -0
- package/dist/types/cli/commands/nodes.d.ts +1 -0
- package/dist/types/cli/commands/pins.d.ts +1 -0
- package/dist/types/cli/commands/query.d.ts +1 -0
- package/dist/types/cli/commands/view.d.ts +1 -0
- package/dist/types/cli/commands/webview.d.ts +1 -0
- package/dist/types/cli/daemon.d.ts +17 -0
- package/dist/types/cli/shared.d.ts +73 -0
- package/dist/types/client/canvas/ExpandedNodeOverlay.d.ts +1 -1
- package/dist/types/client/nodes/ExtAppFrame.d.ts +13 -0
- package/dist/types/client/nodes/HtmlNode.d.ts +1 -1
- package/dist/types/client/nodes/McpAppNode.d.ts +1 -1
- package/dist/types/client/nodes/use-ax-surface-bridge.d.ts +20 -0
- package/dist/types/server/canvas-operations.d.ts +2 -0
- package/dist/types/server/diagram-presets.d.ts +8 -0
- package/dist/types/server/operations/composites.d.ts +0 -9
- package/dist/types/shared/ax-surface-protocol.d.ts +18 -0
- package/docs/RELEASE.md +11 -0
- package/docs/bun-webview-integration.md +5 -0
- package/docs/environment.md +48 -0
- package/docs/node-types.md +5 -0
- package/docs/plans/plan-009-tech-debt-backlog.md +27 -9
- package/docs/screenshot.png +0 -0
- package/package.json +8 -5
- package/skills/pmx-canvas/SKILL.md +11 -8
- package/skills/pmx-canvas/evals/evals.json +5 -5
- package/skills/pmx-canvas/references/full-reference.md +8 -1
- package/src/cli/agent.ts +22 -3512
- package/src/cli/commands/apps.ts +165 -0
- package/src/cli/commands/ax.ts +604 -0
- package/src/cli/commands/copilot.ts +43 -0
- package/src/cli/commands/edges.ts +73 -0
- package/src/cli/commands/groups.ts +81 -0
- package/src/cli/commands/history.ts +220 -0
- package/src/cli/commands/nodes.ts +954 -0
- package/src/cli/commands/pins.ts +42 -0
- package/src/cli/commands/query.ts +223 -0
- package/src/cli/commands/view.ts +186 -0
- package/src/cli/commands/webview.ts +227 -0
- package/src/cli/daemon.ts +39 -7
- package/src/cli/shared.ts +860 -0
- package/src/client/canvas/ExpandedNodeOverlay.tsx +3 -2
- package/src/client/nodes/ExtAppFrame.tsx +166 -52
- package/src/client/nodes/HtmlNode.tsx +8 -51
- package/src/client/nodes/McpAppNode.tsx +12 -47
- package/src/client/nodes/use-ax-surface-bridge.ts +71 -0
- package/src/json-render/renderer/index.tsx +3 -2
- package/src/mcp/server.ts +0 -47
- package/src/server/bundled-skills.ts +5 -1
- package/src/server/canvas-operations.ts +8 -0
- package/src/server/diagram-presets.ts +15 -1
- package/src/server/html-surface.ts +11 -6
- package/src/server/operations/composites.ts +1 -13
- package/src/server/operations/invoker.ts +10 -3
- package/src/server/operations/mcp.ts +51 -1
- package/src/server/operations/ops/app.ts +5 -0
- package/src/server/server.ts +61 -3
- package/src/shared/ax-surface-protocol.ts +22 -0
- package/dist/types/client/canvas/ContextPinHud.d.ts +0 -1
- package/src/client/canvas/ContextPinHud.tsx +0 -17
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"id": 1,
|
|
6
6
|
"name": "investigation-board",
|
|
7
|
-
"prompt": "I'm debugging a memory leak in our Node.js API. The /api/users endpoint is leaking memory on every request. I found a suspicious closure in src/handlers/users.ts that captures the entire request object, and the heap snapshot shows growing EventEmitter listeners. Can you set up an investigation board on the canvas so I can see the full picture?",
|
|
7
|
+
"prompt": "I'm debugging a memory leak in our Node.js API. The /api/users endpoint is leaking memory on every request. I found a suspicious closure in evals/fixtures/investigation-board/src/handlers/users.ts that captures the entire request object, and the heap snapshot shows growing EventEmitter listeners. Can you set up an investigation board on the canvas so I can see the full picture?",
|
|
8
8
|
"expected_output": "Creates multiple nodes (bug description, code file, heap findings, hypothesis) connected with edges, arranged in a tree layout. Uses appropriate node types (markdown for findings, file for source, status for investigation progress).",
|
|
9
9
|
"files": [
|
|
10
10
|
"evals/fixtures/investigation-board/src/handlers/users.ts"
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"assertions": [
|
|
97
97
|
{
|
|
98
98
|
"name": "reads-pinned-context",
|
|
99
|
-
"description": "Reads the curated pin set via canvas://pinned-context
|
|
99
|
+
"description": "Reads the curated pin set via canvas://pinned-context \u2014 or the host-equivalent (canvas_ax_state / the HTTP pinned-context endpoint) where a direct resource tool is unavailable \u2014 not just canvas_query action:layout",
|
|
100
100
|
"type": "output_check"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
{
|
|
115
115
|
"id": 5,
|
|
116
116
|
"name": "code-exploration-files",
|
|
117
|
-
"prompt": "I'm trying to understand how the authentication flow works in this project. Can you put the relevant auth files on the canvas so I can see how they connect? The main files are src/auth/login.ts, src/auth/middleware.ts, src/auth/jwt.ts, and src/routes/auth.ts.",
|
|
117
|
+
"prompt": "I'm trying to understand how the authentication flow works in this project. Can you put the relevant auth files on the canvas so I can see how they connect? The main files are evals/fixtures/code-exploration/src/auth/login.ts, evals/fixtures/code-exploration/src/auth/middleware.ts, evals/fixtures/code-exploration/src/auth/jwt.ts, and evals/fixtures/code-exploration/src/routes/auth.ts.",
|
|
118
118
|
"expected_output": "Creates file nodes for each mentioned file (content auto-loads), relies on code graph to auto-detect import dependencies, groups auth files together, and reads canvas://code-graph for dependency analysis.",
|
|
119
119
|
"files": [
|
|
120
120
|
"evals/fixtures/code-exploration/src/auth/jwt.ts",
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
"assertions": [
|
|
279
279
|
{
|
|
280
280
|
"name": "pins-via-verified-path",
|
|
281
|
-
"description": "Pins via canvas_pin_nodes / CLI pin / 'Pin as context'
|
|
281
|
+
"description": "Pins via canvas_pin_nodes / CLI pin / 'Pin as context' \u2014 not an unverified action",
|
|
282
282
|
"type": "output_check"
|
|
283
283
|
},
|
|
284
284
|
{
|
|
@@ -417,7 +417,7 @@
|
|
|
417
417
|
"id": 17,
|
|
418
418
|
"name": "standalone-surface-open-as-site",
|
|
419
419
|
"prompt": "Open the bar-chart graph node as a standalone full-page site for a screenshot, and also try to open the Excalidraw diagram node the same way. Tell me the correct surface URL for each.",
|
|
420
|
-
"expected_output": "For the graph/json-render node, uses the stable surface URL /api/canvas/surface/<id> which redirects to the full-viewport display=site viewer (reads surfaceUrl from the node, does not fabricate a path). Recognizes the hosted Excalidraw/ext-app node is NOT an open-as-site target (its surface route returns a clean 404
|
|
420
|
+
"expected_output": "For the graph/json-render node, uses the stable surface URL /api/canvas/surface/<id> which redirects to the full-viewport display=site viewer (reads surfaceUrl from the node, does not fabricate a path). Recognizes the hosted Excalidraw/ext-app node is NOT an open-as-site target (its surface route returns a clean 404 \u2014 it renders only with the in-canvas host bridge) and does not claim a standalone tab will work. Notes that some host browsers (e.g. the Codex in-app single-tab browser) don't deliver live-resize events, so a system browser is recommended for separate full-page viewing.",
|
|
421
421
|
"assertions": [
|
|
422
422
|
{
|
|
423
423
|
"name": "graph-site-surface-url",
|
|
@@ -315,7 +315,7 @@ pmx-canvas spatial
|
|
|
315
315
|
- `group create|add|remove` — manage groups
|
|
316
316
|
- `clear --yes` — destructive clear with explicit confirmation
|
|
317
317
|
- `validate spec` — validate json-render specs and graph payloads without creating nodes
|
|
318
|
-
- `web-artifact build` — build bundled React/Tailwind HTML artifacts; use `--deps` for extra packages and `--include-logs` only when raw logs are useful
|
|
318
|
+
- `web-artifact build` — build bundled React/Tailwind HTML artifacts; use `--deps` for extra packages and `--include-logs` only when raw logs are useful. The build pipeline runs bash scripts (POSIX-only) — it is not supported on native Windows; already-built artifacts render everywhere
|
|
319
319
|
- `external-app add --kind excalidraw` — create the hosted Excalidraw preset; response includes `id` and `nodeId` aliases for the same canvas node
|
|
320
320
|
- `serve status|stop` — inspect and stop daemonized servers started with `serve --daemon`
|
|
321
321
|
- `code-graph`, `spatial` — analysis commands
|
|
@@ -797,6 +797,13 @@ below operates on the live canvas state through the `canvas_webview` composite.
|
|
|
797
797
|
- Optional: `backend` (`webkit` macOS-only, or `chrome`), `width`, `height`
|
|
798
798
|
- The session opens `/workbench` at the canvas URL, waits for the SPA to
|
|
799
799
|
hydrate, and reports back via `canvas_webview { action: "status" }`
|
|
800
|
+
- **Backend preflight**: prefer `webkit` on macOS — it is the reliable
|
|
801
|
+
automation backend across tested hosts. The `chrome` backend can trigger a
|
|
802
|
+
native "Allow remote debugging?" dialog on first start in some hosts; if the
|
|
803
|
+
prompt is not approved promptly the start times out with `ok:false`. When
|
|
804
|
+
using `chrome`, approve the dialog immediately and/or raise
|
|
805
|
+
`PMX_CANVAS_WEBVIEW_TIMEOUT_MS` (e.g. `30000`). A single chrome timeout is
|
|
806
|
+
worth one immediate retry before classifying it as a failure.
|
|
800
807
|
|
|
801
808
|
**`canvas_webview { action: "stop" }`** — Tear down the automation session
|
|
802
809
|
|