@creator-notes/cnotes 0.103.5 → 0.104.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.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/commands/canvas.d.ts.map +1 -1
- package/dist/commands/canvas.js +52 -3
- package/dist/commands/canvas.js.map +1 -1
- package/dist/commands/notes.d.ts.map +1 -1
- package/dist/commands/notes.js +3 -2
- package/dist/commands/notes.js.map +1 -1
- package/dist/commands/operations.js +2 -2
- package/dist/commands/operations.js.map +1 -1
- package/dist/commands/versions.d.ts.map +1 -1
- package/dist/commands/versions.js +3 -2
- package/dist/commands/versions.js.map +1 -1
- package/dist/lib/build-schema.d.ts +2 -2
- package/dist/lib/build-schema.js +2 -2
- package/dist/lib/build-schema.js.map +1 -1
- package/dist/lib/claude-session.d.ts +37 -6
- package/dist/lib/claude-session.d.ts.map +1 -1
- package/dist/lib/claude-session.js +105 -8
- package/dist/lib/claude-session.js.map +1 -1
- package/dist/mcp-server.js +1 -1
- package/dist/mcp-server.js.map +1 -1
- package/package.json +1 -1
- package/skills/cnotes/references/canvas.md +7 -0
- package/skills/cnotes/references/notes.md +7 -0
- package/skills/cnotes/references/operations.md +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../src/commands/canvas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAyB,MAAM,sBAAsB,CAAC;AAsCxE;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,SAAS,EACd,GAAG,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAC/C,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWxB;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,EAAE,CAAC,CAuBnB;AAsJD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../src/commands/canvas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAyB,MAAM,sBAAsB,CAAC;AAsCxE;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,SAAS,EACd,GAAG,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAC/C,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWxB;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,EAAE,CAAC,CAuBnB;AAsJD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAw3G7D"}
|
package/dist/commands/canvas.js
CHANGED
|
@@ -10,7 +10,7 @@ import { loadConfig, setActiveAgentRunId, registerAgentRun, unregisterAgentRun,
|
|
|
10
10
|
import { outputJson, outputTable, outputQuiet, truncate, timeAgo } from "../lib/output.js";
|
|
11
11
|
import { readHeadlineWarnings, reportHeadlineWarnings } from "../lib/headline-warnings.js";
|
|
12
12
|
import { parseSharedCanvasLink, sameServerOrigin } from "../lib/share-link.js";
|
|
13
|
-
import {
|
|
13
|
+
import { resolveHostAgentSession } from "../lib/claude-session.js";
|
|
14
14
|
import { WARN, dim } from "../lib/style.js";
|
|
15
15
|
import { findOverlaps, findFrameSpills, layoutItemsFrom, parseSize, resolveAnchor, suggestFreeSpot, } from "../lib/canvas-layout.js";
|
|
16
16
|
import { canvasUrl, canvasLinkForRef } from "../lib/urls.js";
|
|
@@ -608,6 +608,55 @@ Examples:
|
|
|
608
608
|
handleError(error, cfg.json);
|
|
609
609
|
}
|
|
610
610
|
});
|
|
611
|
+
canvas
|
|
612
|
+
.command("check")
|
|
613
|
+
.description("Check a board for cards that contradict each other and claims nothing on the board backs. " +
|
|
614
|
+
"Writes nothing: turn each finding into a Tension note (a contradiction, linking both cards) or a " +
|
|
615
|
+
"Question note (what would back this claim?) inside a draft, so a person accepts them. " +
|
|
616
|
+
"One model call per card; editors only; the deployment must turn the check on.")
|
|
617
|
+
.argument("<canvasId>", "Canvas ID or display ID (CANVAS-12)")
|
|
618
|
+
.action(async (canvasId) => {
|
|
619
|
+
const cfg = resolveConfig(program.opts());
|
|
620
|
+
const api = new ApiClient(cfg.serverUrl, cfg.token, cfg.workspaceId);
|
|
621
|
+
const path = `/api/canvas/${encodeURIComponent(canvasId)}/check?workspaceId=${encodeURIComponent(cfg.workspaceId)}`;
|
|
622
|
+
try {
|
|
623
|
+
const data = await api.post(path, {});
|
|
624
|
+
if (cfg.json) {
|
|
625
|
+
outputJson(data);
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
console.log(`Canvas: ${data.canvasName}`);
|
|
629
|
+
console.log(`Checked ${data.checkedCards} cards with ${data.model}${data.skippedCards ? ` (${data.skippedCards} not checked)` : ""}.`);
|
|
630
|
+
if (data.contradictions.length === 0 && data.unsupported.length === 0) {
|
|
631
|
+
console.log("\nNo contradictions and no unbacked claims found.");
|
|
632
|
+
}
|
|
633
|
+
if (data.contradictions.length > 0) {
|
|
634
|
+
console.log("\nContradictions (both cannot be true):");
|
|
635
|
+
for (const c of data.contradictions)
|
|
636
|
+
console.log(` ${c.cards[0]} <> ${c.cards[1]} (${c.probability})`);
|
|
637
|
+
}
|
|
638
|
+
if (data.unsupported.length > 0) {
|
|
639
|
+
console.log("\nClaims nothing on the board backs:");
|
|
640
|
+
for (const u of data.unsupported)
|
|
641
|
+
console.log(` ${u.card} (${u.probability})`);
|
|
642
|
+
}
|
|
643
|
+
if (data.unsure.length > 0) {
|
|
644
|
+
console.log("\nUnsure (read these yourself before writing anything):");
|
|
645
|
+
for (const u of data.unsure) {
|
|
646
|
+
console.log(` ${u.card} ${u.question === "contradicts" ? `may contradict ${u.with}` : "may be unbacked"} (${u.probability})`);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
if (data.contradictions.length > 0 || data.unsupported.length > 0) {
|
|
650
|
+
console.log("\nNext: read each pair or claim first (the check gives no reasons), then " +
|
|
651
|
+
`\`cnotes draft open --from-canvas ${canvasId}\` and write one Tension note per real contradiction ` +
|
|
652
|
+
"that mentions both cards, and one Question note per unbacked claim asking what would back it. " +
|
|
653
|
+
"The person accepts the draft.");
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
catch (error) {
|
|
657
|
+
handleError(error, cfg.json);
|
|
658
|
+
}
|
|
659
|
+
});
|
|
611
660
|
canvas
|
|
612
661
|
.command("activity")
|
|
613
662
|
.description("Show recent activity (edits, agent runs, gestures, restores) on a canvas, newest first. " +
|
|
@@ -2601,7 +2650,7 @@ alongside it (eval the printed exports so your writes carry it).
|
|
|
2601
2650
|
};
|
|
2602
2651
|
if (opts.rationale)
|
|
2603
2652
|
body.rationale = opts.rationale;
|
|
2604
|
-
const agentSession =
|
|
2653
|
+
const agentSession = await resolveHostAgentSession();
|
|
2605
2654
|
if (agentSession)
|
|
2606
2655
|
body.agentSession = agentSession;
|
|
2607
2656
|
const data = await api.post(canvasActionPath(opts.canvas, cfg.workspaceId), body);
|
|
@@ -2693,7 +2742,7 @@ Examples:
|
|
|
2693
2742
|
throw new ValidationError('No command to run. Usage:\n cnotes canvas agent-run wrap --canvas <id> --prompt "..." -- <command>');
|
|
2694
2743
|
}
|
|
2695
2744
|
// Step 1: open the run
|
|
2696
|
-
const agentSession =
|
|
2745
|
+
const agentSession = await resolveHostAgentSession();
|
|
2697
2746
|
const begin = await api.post(canvasActionPath(opts.canvas, cfg.workspaceId), {
|
|
2698
2747
|
action: "agentRunBegin",
|
|
2699
2748
|
prompt: opts.prompt,
|