pmx-canvas 0.9.1 → 0.9.3
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/.github/extensions/pmx-canvas/extension.mjs +9 -3
- package/.github/extensions/pmx-canvas/runtime.json +1 -1
- package/.github/extensions/pmx-canvas/start-mcp.mjs +29 -29
- package/CHANGELOG.md +19 -0
- package/Readme.md +1 -1
- package/dist/canvas/global.css +12 -17
- package/dist/canvas/index.js +58 -58
- package/dist/canvas/mcp-app.html +75 -80
- package/dist/json-render/index.js +50 -50
- package/dist/types/client/canvas/submit-without-navigation.d.ts +3 -0
- package/dist/types/client/state/intent-bridge.d.ts +0 -3
- package/dist/types/client/state/presence-store.d.ts +3 -3
- package/dist/types/client/types.d.ts +1 -1
- package/dist/types/server/canvas-state.d.ts +2 -0
- package/dist/types/server/index.d.ts +2 -2
- package/dist/types/server/knowledge-lifecycle.d.ts +11 -2
- package/dist/types/server/lifecycle-status.d.ts +3 -1
- package/dist/types/server/tour-control.d.ts +6 -3
- package/docs/bun-webview-integration.md +2 -2
- package/docs/cli.md +10 -1
- package/docs/design/Chrome.dc.html +1 -0
- package/docs/design.md +3 -1
- package/docs/mcp.md +5 -1
- package/docs/node-types.md +3 -0
- package/docs/plans/plan-019-post-0.9-roadmap.md +68 -9
- package/docs/sdk.md +7 -0
- package/package.json +2 -2
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/extension.mjs +9 -3
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/plugin.json +1 -1
- package/plugins/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/start-mcp.mjs +29 -29
- package/skills/pmx-canvas/SKILL.md +4 -4
- package/skills/pmx-canvas/references/github-copilot-app-adapter.md +2 -2
- package/skills/pmx-canvas/references/installing-pmx-canvas.md +11 -6
- package/src/client/canvas/BoardCopyDialog.tsx +2 -1
- package/src/client/canvas/KnowledgeDialog.tsx +3 -0
- package/src/client/canvas/LifecyclePanel.tsx +4 -0
- package/src/client/canvas/RelationPresetsDialog.tsx +2 -0
- package/src/client/canvas/submit-without-navigation.ts +14 -0
- package/src/client/state/canvas-store.ts +12 -24
- package/src/client/state/intent-bridge.ts +0 -6
- package/src/client/state/presence-store.ts +3 -3
- package/src/client/state/sse-bridge.ts +11 -6
- package/src/client/theme/global.css +12 -17
- package/src/server/canvas-state.ts +10 -0
- package/src/server/index.ts +10 -30
- package/src/server/knowledge-lifecycle.ts +66 -0
- package/src/server/lifecycle-status.ts +79 -7
- package/src/server/operations/ops/lifecycle.ts +3 -7
- package/src/server/operations/ops/nodes.ts +2 -5
- package/src/server/operations/ops/viewport.ts +3 -7
- package/src/server/server.ts +13 -10
- package/src/server/tour-control.ts +17 -8
|
@@ -312,7 +312,11 @@ async function startPanelServer(instanceId, ctx, pmx) {
|
|
|
312
312
|
jsonResponse(res, 400, { ok: false, error: "prompt is required" });
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
|
-
|
|
315
|
+
if (!copilotSession) {
|
|
316
|
+
jsonResponse(res, 503, { ok: false, error: "Copilot session is unavailable." });
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
await copilotSession.send({ prompt: body.prompt, mode: "immediate" });
|
|
316
320
|
// Explicit user instruction from the panel → mirror onto the AX
|
|
317
321
|
// timeline as a steering message (fire-and-forget).
|
|
318
322
|
const target = await verifiedEntryTarget(entry);
|
|
@@ -635,7 +639,8 @@ const pmxCanvas = createCanvas({
|
|
|
635
639
|
handler: async (ctx) => {
|
|
636
640
|
const prompt = typeof ctx.input?.prompt === "string" ? ctx.input.prompt.trim() : "";
|
|
637
641
|
if (!prompt) throw new CanvasError("prompt_required", "prompt is required");
|
|
638
|
-
|
|
642
|
+
if (!copilotSession) throw new CanvasError("copilot_unavailable", "Copilot session is unavailable.");
|
|
643
|
+
await copilotSession.send({ prompt, mode: "immediate" });
|
|
639
644
|
// Mirror the explicit user instruction onto the AX timeline as a
|
|
640
645
|
// steering message (fire-and-forget). This is an explicit action
|
|
641
646
|
// flow, never a sync from the prompt hook.
|
|
@@ -867,7 +872,8 @@ sessionWorkspaceRoot = resolve((await copilotSession.rpc.metadata.snapshot()).wo
|
|
|
867
872
|
steeringDeliveryPump = createSteeringDeliveryPump({
|
|
868
873
|
consumer: "copilot",
|
|
869
874
|
claim: claimCopilotSteering,
|
|
870
|
-
|
|
875
|
+
// The SDK defaults to enqueue; canvas steering must target the active turn.
|
|
876
|
+
send: async (message) => await copilotSession.send({ prompt: message, mode: "immediate" }),
|
|
871
877
|
mark: markCopilotSteering,
|
|
872
878
|
getPresence: getCopilotPresence,
|
|
873
879
|
setPresence: async (patch) => await postPresence(sessionWorkspaceRoot, patch),
|