@creator-notes/cnotes 0.65.0 → 0.67.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/cn.js +2 -97
- package/dist/cn.js.map +1 -1
- package/dist/commands/operations.d.ts.map +1 -1
- package/dist/commands/operations.js +60 -1
- package/dist/commands/operations.js.map +1 -1
- package/dist/commands/relationships.d.ts.map +1 -1
- package/dist/commands/relationships.js +13 -4
- package/dist/commands/relationships.js.map +1 -1
- package/dist/commands/timeline.d.ts +1 -0
- package/dist/commands/timeline.d.ts.map +1 -1
- package/dist/commands/timeline.js +5 -3
- package/dist/commands/timeline.js.map +1 -1
- package/dist/program.d.ts +13 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +146 -0
- package/dist/program.js.map +1 -0
- package/package.json +1 -1
- package/skills/cnotes/SKILL.md +5 -1
package/dist/cn.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
|
-
import { Command } from "commander";
|
|
4
3
|
import updateNotifier from "update-notifier";
|
|
5
4
|
import { embeddedVersion, isCompiledBinary } from "./lib/runtime.js";
|
|
6
5
|
// Compiled binary: version is baked in (no package.json on disk). npm install:
|
|
@@ -8,103 +7,9 @@ import { embeddedVersion, isCompiledBinary } from "./lib/runtime.js";
|
|
|
8
7
|
const CLI_VERSION = embeddedVersion() ??
|
|
9
8
|
createRequire(import.meta.url)("../package.json").version;
|
|
10
9
|
import { refreshInstalledSkills } from "./lib/install-skill.js";
|
|
11
|
-
import {
|
|
12
|
-
import { registerConfigCommands } from "./commands/config.js";
|
|
13
|
-
import { registerWorkspaceCommands } from "./commands/workspace.js";
|
|
14
|
-
import { registerUpgradeCommand } from "./commands/upgrade.js";
|
|
15
|
-
import { registerNotesCommands } from "./commands/notes.js";
|
|
16
|
-
import { registerVersionsCommands } from "./commands/versions.js";
|
|
17
|
-
import { registerCanvasCommands } from "./commands/canvas.js";
|
|
18
|
-
import { registerRelationshipsCommands } from "./commands/relationships.js";
|
|
19
|
-
import { registerDepsCommands } from "./commands/deps.js";
|
|
20
|
-
import { registerSearchCommands } from "./commands/search.js";
|
|
21
|
-
import { registerTimelineCommands } from "./commands/timeline.js";
|
|
22
|
-
import { registerReviewCommands } from "./commands/review.js";
|
|
23
|
-
import { registerSharedCommands } from "./commands/shared.js";
|
|
24
|
-
import { registerDraftCommands } from "./commands/draft.js";
|
|
25
|
-
import { registerFocusCommands } from "./commands/focus.js";
|
|
26
|
-
import { registerTypesCommands } from "./commands/types.js";
|
|
27
|
-
import { registerFilesCommands } from "./commands/files.js";
|
|
28
|
-
import { registerMcpCommands } from "./commands/mcp.js";
|
|
29
|
-
import { registerInitCommand } from "./commands/init.js";
|
|
30
|
-
import { registerSchemaCommand } from "./commands/schema.js";
|
|
31
|
-
import { registerThemeCommands } from "./commands/theme.js";
|
|
32
|
-
import { registerOperationsCommands } from "./commands/operations.js";
|
|
33
|
-
import { registerFeedbackCommands } from "./commands/feedback.js";
|
|
34
|
-
import { registerSkillsCommands } from "./commands/skills.js";
|
|
35
|
-
import { registerClaudeHookCommand } from "./commands/claude-hook.js";
|
|
36
|
-
import { loadConfig, getServerConfig } from "./lib/auth-store.js";
|
|
37
|
-
import { parseFields } from "./lib/config.js";
|
|
38
|
-
import { setOutputMode } from "./lib/output.js";
|
|
10
|
+
import { buildProgram } from "./program.js";
|
|
39
11
|
import { handleError } from "./lib/errors.js";
|
|
40
|
-
const program =
|
|
41
|
-
program
|
|
42
|
-
.name("cnotes")
|
|
43
|
-
.description("CreatorNotes CLI — manage notes, canvases, and knowledge from the terminal")
|
|
44
|
-
.version(CLI_VERSION)
|
|
45
|
-
.option("--json", "Output raw JSON")
|
|
46
|
-
.option("-q, --quiet", "Minimal output: one handle per line (displayId, name, or id); with --fields, those fields tab-separated")
|
|
47
|
-
.option("--fields <list>", "Keep only these comma-separated fields in JSON output, on any command (e.g. displayId,title)")
|
|
48
|
-
.option("-w, --workspace <id>", "Override active workspace ID")
|
|
49
|
-
.option("--server <url>", "Override server URL");
|
|
50
|
-
// -q and --fields are root flags, so apply them once here for every command.
|
|
51
|
-
program.hook("preAction", () => {
|
|
52
|
-
const opts = program.opts();
|
|
53
|
-
setOutputMode({ quiet: Boolean(opts.quiet), fields: parseFields(opts.fields) });
|
|
54
|
-
});
|
|
55
|
-
program.addHelpText("after", `
|
|
56
|
-
Examples:
|
|
57
|
-
$ cnotes notes list --type Insight --json
|
|
58
|
-
$ cnotes notes get MEETING-12 PRD-3 IDEA-7
|
|
59
|
-
$ cnotes search semantic "user retention" --limit 5
|
|
60
|
-
$ cnotes canvas place <canvasId> --spec ./layout.json
|
|
61
|
-
$ cnotes skills install fat-marker # add the storyboard skill to your agent
|
|
62
|
-
$ cnotes notes list --fields displayId,title,type # trim output to chosen keys
|
|
63
|
-
$ cnotes notes list -q --fields displayId,title # tab-separated, no JSON parser needed
|
|
64
|
-
$ cnotes schema --json # describe types, relationships, exit codes
|
|
65
|
-
|
|
66
|
-
Exit codes:
|
|
67
|
-
0 ok 1 generic 2 auth 3 validation
|
|
68
|
-
4 not-found 5 conflict 6 rate-limit 7 permission
|
|
69
|
-
|
|
70
|
-
Env vars:
|
|
71
|
-
CNOTES_SERVER, CNOTES_TOKEN, CNOTES_WORKSPACE, CNOTES_JSON=1
|
|
72
|
-
`);
|
|
73
|
-
// Register all command groups
|
|
74
|
-
registerInitCommand(program);
|
|
75
|
-
registerAuthCommands(program);
|
|
76
|
-
registerConfigCommands(program);
|
|
77
|
-
registerWorkspaceCommands(program);
|
|
78
|
-
registerUpgradeCommand(program);
|
|
79
|
-
registerNotesCommands(program);
|
|
80
|
-
registerVersionsCommands(program);
|
|
81
|
-
registerCanvasCommands(program);
|
|
82
|
-
registerRelationshipsCommands(program);
|
|
83
|
-
registerDepsCommands(program);
|
|
84
|
-
registerSearchCommands(program);
|
|
85
|
-
registerTimelineCommands(program);
|
|
86
|
-
registerReviewCommands(program);
|
|
87
|
-
registerSharedCommands(program);
|
|
88
|
-
registerDraftCommands(program);
|
|
89
|
-
registerFocusCommands(program);
|
|
90
|
-
registerTypesCommands(program);
|
|
91
|
-
registerFilesCommands(program);
|
|
92
|
-
registerMcpCommands(program);
|
|
93
|
-
registerSchemaCommand(program);
|
|
94
|
-
registerThemeCommands(program);
|
|
95
|
-
registerOperationsCommands(program);
|
|
96
|
-
registerFeedbackCommands(program);
|
|
97
|
-
registerSkillsCommands(program);
|
|
98
|
-
registerClaudeHookCommand(program);
|
|
99
|
-
// Default action: show help + first-run hint when invoked with no arguments
|
|
100
|
-
program.action(() => {
|
|
101
|
-
const config = loadConfig();
|
|
102
|
-
const sc = getServerConfig(config, config.currentServer);
|
|
103
|
-
if (!sc?.token) {
|
|
104
|
-
console.log('Tip: Run "cnotes init" to get started.\n');
|
|
105
|
-
}
|
|
106
|
-
program.help();
|
|
107
|
-
});
|
|
12
|
+
const program = buildProgram(CLI_VERSION);
|
|
108
13
|
// ── Background maintenance (best-effort; never blocks or breaks a command) ──
|
|
109
14
|
// Skipped for the MCP server subcommand, which speaks JSON-RPC and must stay
|
|
110
15
|
// silent. Writes only to stderr so stdout stays clean for --json / piping.
|
package/dist/cn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cn.js","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"cn.js","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAErE,+EAA+E;AAC/E,sCAAsC;AACtC,MAAM,WAAW,GACf,eAAe,EAAE;IAC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 -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/commands/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/commands/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6UjE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ApiClient, resolveActiveAgentRun } from "../lib/api-client.js";
|
|
2
2
|
import { resolveConfig } from "../lib/config.js";
|
|
3
3
|
import { CliError, EXIT_CODES, handleError, ValidationError } from "../lib/errors.js";
|
|
4
|
-
import { outputJson, formatAgo } from "../lib/output.js";
|
|
4
|
+
import { outputJson, formatAgo, truncate } from "../lib/output.js";
|
|
5
|
+
import { parseDateInput } from "./timeline.js";
|
|
5
6
|
import { loadConfig, setActiveAgentRunId, clearActiveAgentRunId, getActiveAgentRunId, } from "../lib/auth-store.js";
|
|
6
7
|
import { resolveAgentSession } from "../lib/claude-session.js";
|
|
7
8
|
import { allWorkspaceRubrics, loadRubricMap } from "../lib/rubrics.js";
|
|
@@ -239,5 +240,63 @@ successful response so the next cnotes write detaches.
|
|
|
239
240
|
handleError(error, cfg.json);
|
|
240
241
|
}
|
|
241
242
|
});
|
|
243
|
+
ops
|
|
244
|
+
.command("read-first")
|
|
245
|
+
.description("Of the agent runs that wrote notes, how many read something first. A run that writes without " +
|
|
246
|
+
"reading is a cold write, built from whatever was pasted into the prompt.")
|
|
247
|
+
.option("--since <when>", "Start of the period (e.g. 7d, 2w, 2026-09-19)", "7d")
|
|
248
|
+
.option("--until <when>", "End of the period (default: now)")
|
|
249
|
+
.addHelpText("after", `
|
|
250
|
+
A run counts as read-first when a read carries its run id, or when the same
|
|
251
|
+
person's agent read something in this workspace from 30 minutes before the run
|
|
252
|
+
started until it ended. Reads are recorded from cli 0.60.0 (2026-09-19), so a
|
|
253
|
+
period that starts earlier undercounts read-first.
|
|
254
|
+
|
|
255
|
+
Examples:
|
|
256
|
+
$ cnotes operations read-first
|
|
257
|
+
$ cnotes operations read-first --since 30d --json
|
|
258
|
+
`)
|
|
259
|
+
.action(async (opts) => {
|
|
260
|
+
const cfg = resolveConfig(program.opts());
|
|
261
|
+
const api = new ApiClient(cfg.serverUrl, cfg.token);
|
|
262
|
+
try {
|
|
263
|
+
const since = parseDateInput(opts.since);
|
|
264
|
+
const until = opts.until ? parseDateInput(opts.until) : undefined;
|
|
265
|
+
const result = await api.get("/api/operations/read-first", {
|
|
266
|
+
workspaceId: cfg.workspaceId,
|
|
267
|
+
since: String(since),
|
|
268
|
+
until: until === undefined ? undefined : String(until),
|
|
269
|
+
});
|
|
270
|
+
if (cfg.json) {
|
|
271
|
+
outputJson(result);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const period = `${new Date(result.since).toISOString().slice(0, 10)} to ${new Date(result.until).toISOString().slice(0, 10)}`;
|
|
275
|
+
if (result.runsWithWrites === 0) {
|
|
276
|
+
console.log(`No agent run wrote notes between ${period}.`);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const pct = Math.round((result.readFirst / result.runsWithWrites) * 100);
|
|
280
|
+
console.log(`${result.readFirst} of ${result.runsWithWrites} agent runs that wrote notes read first (${pct}%), ${period}.`);
|
|
281
|
+
if (result.capped) {
|
|
282
|
+
console.log("The period hit a scan limit, so these counts are a floor. Narrow it with --since/--until.");
|
|
283
|
+
}
|
|
284
|
+
if (result.readsRecordedSince === null || result.readsRecordedSince > result.since) {
|
|
285
|
+
const from = result.readsRecordedSince === null
|
|
286
|
+
? "No agent reads are recorded in this workspace yet"
|
|
287
|
+
: `Agent reads are recorded from ${new Date(result.readsRecordedSince).toISOString().slice(0, 10)}`;
|
|
288
|
+
console.log(`${from}, so runs before that count as cold.`);
|
|
289
|
+
}
|
|
290
|
+
if (result.coldRuns.length > 0) {
|
|
291
|
+
console.log(`\nCold runs (newest first${result.cold > result.coldRuns.length ? `, ${result.coldRuns.length} of ${result.cold}` : ""}):`);
|
|
292
|
+
for (const run of result.coldRuns) {
|
|
293
|
+
console.log(` ${formatAgo(run.startedAt).padEnd(10)} ${String(run.notesWritten).padStart(3)} notes ${truncate(run.prompt ?? "(no prompt)", 70)}`);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
handleError(error, cfg.json);
|
|
299
|
+
}
|
|
300
|
+
});
|
|
242
301
|
}
|
|
243
302
|
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/commands/operations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/commands/operations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CA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,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8CpC,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/commands/relationships.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8CpC,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgPpE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiClient } from "../lib/api-client.js";
|
|
2
2
|
import { resolveConfig } from "../lib/config.js";
|
|
3
|
-
import { handleError } from "../lib/errors.js";
|
|
3
|
+
import { handleError, ValidationError } from "../lib/errors.js";
|
|
4
4
|
import { outputJson, outputTable, truncate } from "../lib/output.js";
|
|
5
5
|
const noteRef = (n) => {
|
|
6
6
|
const note = n;
|
|
@@ -37,6 +37,7 @@ export function registerRelationshipsCommands(program) {
|
|
|
37
37
|
.description("Manage note relationships");
|
|
38
38
|
rel
|
|
39
39
|
.command("list")
|
|
40
|
+
.argument("[displayId]", "Same as --note: list the links of this one note")
|
|
40
41
|
.description("List relationships. Defaults to links that hold RIGHT NOW: body chips asserted by each note's current version, plus declared links (structural or explicitly created). Superseded chips are history and need --history.")
|
|
41
42
|
.option("--note <displayId>", "Filter by note display ID")
|
|
42
43
|
.option("--type <name>", "Filter by relationship type (e.g. implements)")
|
|
@@ -59,19 +60,27 @@ Columns:
|
|
|
59
60
|
superseded the chip is gone from the current version (--history only).
|
|
60
61
|
|
|
61
62
|
Examples:
|
|
63
|
+
$ cnotes rel list INSIGHT-217
|
|
62
64
|
$ cnotes rel list --note INSIGHT-217
|
|
63
65
|
$ cnotes rel list --note INSIGHT-217 --history
|
|
64
66
|
$ cnotes rel list --type implements --json
|
|
65
67
|
`)
|
|
66
|
-
.action(async (opts) => {
|
|
68
|
+
.action(async (displayId, opts) => {
|
|
67
69
|
const cfg = resolveConfig(program.opts());
|
|
68
70
|
const api = new ApiClient(cfg.serverUrl, cfg.token);
|
|
69
71
|
try {
|
|
72
|
+
// `rel list DECISION-117` used to drop the id and list the whole
|
|
73
|
+
// workspace. A bare id now means --note; two different ids are an error
|
|
74
|
+
// rather than a silent pick.
|
|
75
|
+
if (displayId && opts.note && displayId !== opts.note) {
|
|
76
|
+
throw new ValidationError(`Got two notes: ${displayId} and --note ${opts.note}.`, "Pass one note, either as the argument or with --note.");
|
|
77
|
+
}
|
|
78
|
+
const note = opts.note ?? displayId;
|
|
70
79
|
const params = {
|
|
71
80
|
workspaceId: cfg.workspaceId,
|
|
72
81
|
};
|
|
73
|
-
if (
|
|
74
|
-
params.displayId =
|
|
82
|
+
if (note)
|
|
83
|
+
params.displayId = note;
|
|
75
84
|
if (opts.type)
|
|
76
85
|
params.relationshipType = opts.type;
|
|
77
86
|
if (opts.limit)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationships.js","sourceRoot":"","sources":["../../src/commands/relationships.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"relationships.js","sourceRoot":"","sources":["../../src/commands/relationships.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAUrE,MAAM,OAAO,GAAG,CAAC,CAAU,EAAU,EAAE;IACrC,MAAM,IAAI,GAAG,CAAY,CAAC;IAC1B,OAAO,IAAI,EA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B,CAAC,CAAC;gBAC5C,OAAO;YACT,CAAC;YAED,qEAAqE;YACrE,MAAM,IAAI,GAAG,KAAK;iBACf,KAAK,EAAE;iBACP,IAAI,CACH,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACP,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;gBACvC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CACjC;iBACA,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBACV,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;gBAClC,QAAQ,CAAC,CAAC,CAAC,WAAW,IAAI,EAAE,EAAE,EAAE,CAAC;aAClC,CAAC,CAAC;YACL,WAAW,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,EAAE,IAAI,CAAC,CAAC;QACvD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../src/commands/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../src/commands/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA8BpD;AA4CD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoG/D"}
|
|
@@ -8,7 +8,7 @@ const DURATION_UNITS = {
|
|
|
8
8
|
d: 86_400_000,
|
|
9
9
|
w: 604_800_000,
|
|
10
10
|
};
|
|
11
|
-
function parseDateInput(input) {
|
|
11
|
+
export function parseDateInput(input) {
|
|
12
12
|
// Relative shorthand: 7d, 3h, 30m, 2w
|
|
13
13
|
const rel = input.match(/^(\d+)([mhdw])$/);
|
|
14
14
|
if (rel) {
|
|
@@ -37,7 +37,9 @@ export function registerTimelineCommands(program) {
|
|
|
37
37
|
.command("timeline")
|
|
38
38
|
.alias("tl")
|
|
39
39
|
.description("Show recent changes across notes, or search the change log by meaning")
|
|
40
|
-
|
|
40
|
+
// No -q short flag: the global -q (--quiet) is parsed first and wins, so
|
|
41
|
+
// `timeline -q "x"` silently ran a quiet, unfiltered timeline.
|
|
42
|
+
.option("--query <text>", "Search the change log by meaning instead of listing (all-time unless --since)")
|
|
41
43
|
.option("--since <when>", "Start of range (e.g. 7d, 2w, 2026-03-21). Default: 7d listing, all-time search")
|
|
42
44
|
.option("--until <when>", "End of range (default: now)")
|
|
43
45
|
.option("--type <noteType>", "Filter by note type (comma-separated, e.g. Meeting,Decision)")
|
|
@@ -48,7 +50,7 @@ Examples:
|
|
|
48
50
|
$ cnotes timeline --since 7d
|
|
49
51
|
$ cnotes timeline --since 2026-03-01 --type Decision,Meeting --json
|
|
50
52
|
$ cnotes timeline --query "pricing framing" # why/when did this change?
|
|
51
|
-
$ cnotes timeline
|
|
53
|
+
$ cnotes timeline --query "auth decision" --since 30d # search within a window
|
|
52
54
|
`)
|
|
53
55
|
.action(async (opts) => {
|
|
54
56
|
const cfg = resolveConfig(program.opts());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../src/commands/timeline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,eAAe,EAA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IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,OAAO;IACT,CAAC;IAED,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QAC9D,OAAO;IACT,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACnC,CAAC,CAAC,SAAS;QACX,IAAI,CAAC,CAAC,aAAa,EAAE;QACrB,oEAAoE;QACpE,QAAQ,CAAC,CAAC,CAAC,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QACrE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;KACrB,CAAC,CAAC;IACH,WAAW,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;IAEnD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC;IAClE,OAAO,CAAC,GAAG,CACT,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM,0BAA0B,IAAI,CAAC,KAAK,MAAM,GAAG,GAAG,CACzE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the `cnotes` command tree without parsing argv or running any of the
|
|
3
|
+
* entry point's background maintenance, so a test can parse the commands the
|
|
4
|
+
* skill documents and check the parser accepts every one of them.
|
|
5
|
+
*/
|
|
6
|
+
import { Command } from "commander";
|
|
7
|
+
/**
|
|
8
|
+
* Appended to Commander's own error text. Agents read stderr, and both errors
|
|
9
|
+
* below used to cost them a wrong conclusion rather than a retry.
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseErrorHint(message: string, version: string): string | null;
|
|
12
|
+
export declare function buildProgram(version: string): Command;
|
|
13
|
+
//# sourceMappingURL=program.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8BpC;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAY9E;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAsGrD"}
|
package/dist/program.js
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the `cnotes` command tree without parsing argv or running any of the
|
|
3
|
+
* entry point's background maintenance, so a test can parse the commands the
|
|
4
|
+
* skill documents and check the parser accepts every one of them.
|
|
5
|
+
*/
|
|
6
|
+
import { Command } from "commander";
|
|
7
|
+
import { registerAuthCommands } from "./commands/auth.js";
|
|
8
|
+
import { registerConfigCommands } from "./commands/config.js";
|
|
9
|
+
import { registerWorkspaceCommands } from "./commands/workspace.js";
|
|
10
|
+
import { registerUpgradeCommand } from "./commands/upgrade.js";
|
|
11
|
+
import { registerNotesCommands } from "./commands/notes.js";
|
|
12
|
+
import { registerVersionsCommands } from "./commands/versions.js";
|
|
13
|
+
import { registerCanvasCommands } from "./commands/canvas.js";
|
|
14
|
+
import { registerRelationshipsCommands } from "./commands/relationships.js";
|
|
15
|
+
import { registerDepsCommands } from "./commands/deps.js";
|
|
16
|
+
import { registerSearchCommands } from "./commands/search.js";
|
|
17
|
+
import { registerTimelineCommands } from "./commands/timeline.js";
|
|
18
|
+
import { registerReviewCommands } from "./commands/review.js";
|
|
19
|
+
import { registerSharedCommands } from "./commands/shared.js";
|
|
20
|
+
import { registerDraftCommands } from "./commands/draft.js";
|
|
21
|
+
import { registerFocusCommands } from "./commands/focus.js";
|
|
22
|
+
import { registerTypesCommands } from "./commands/types.js";
|
|
23
|
+
import { registerFilesCommands } from "./commands/files.js";
|
|
24
|
+
import { registerMcpCommands } from "./commands/mcp.js";
|
|
25
|
+
import { registerInitCommand } from "./commands/init.js";
|
|
26
|
+
import { registerSchemaCommand } from "./commands/schema.js";
|
|
27
|
+
import { registerThemeCommands } from "./commands/theme.js";
|
|
28
|
+
import { registerOperationsCommands } from "./commands/operations.js";
|
|
29
|
+
import { registerFeedbackCommands } from "./commands/feedback.js";
|
|
30
|
+
import { registerSkillsCommands } from "./commands/skills.js";
|
|
31
|
+
import { registerClaudeHookCommand } from "./commands/claude-hook.js";
|
|
32
|
+
import { loadConfig, getServerConfig } from "./lib/auth-store.js";
|
|
33
|
+
import { parseFields } from "./lib/config.js";
|
|
34
|
+
import { setOutputMode } from "./lib/output.js";
|
|
35
|
+
/**
|
|
36
|
+
* Appended to Commander's own error text. Agents read stderr, and both errors
|
|
37
|
+
* below used to cost them a wrong conclusion rather than a retry.
|
|
38
|
+
*/
|
|
39
|
+
export function parseErrorHint(message, version) {
|
|
40
|
+
if (/unknown command/.test(message)) {
|
|
41
|
+
return (`cnotes ${version} has no such command. If a guide or skill mentions it, this install ` +
|
|
42
|
+
`may be older than the guide: update with "npm i -g @creator-notes/cnotes@latest" ` +
|
|
43
|
+
`(or re-run the installer), then check "cnotes --version".\n`);
|
|
44
|
+
}
|
|
45
|
+
if (/too many arguments/.test(message)) {
|
|
46
|
+
return `Values go through the command's flags. Add --help to the same command to see them.\n`;
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
export function buildProgram(version) {
|
|
51
|
+
const program = new Command();
|
|
52
|
+
// Both settings are copied to every subcommand created after them, so they
|
|
53
|
+
// must come before the register* calls below.
|
|
54
|
+
//
|
|
55
|
+
// A stray positional argument used to be dropped silently: `rel list
|
|
56
|
+
// DECISION-117` returned 50 workspace-wide rows and exit 0, and an agent
|
|
57
|
+
// reasoned from the wrong graph. Now it is an error.
|
|
58
|
+
program.allowExcessArguments(false);
|
|
59
|
+
program.configureOutput({
|
|
60
|
+
outputError: (message, write) => {
|
|
61
|
+
write(message);
|
|
62
|
+
const hint = parseErrorHint(message, version);
|
|
63
|
+
if (hint)
|
|
64
|
+
write(hint);
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
program
|
|
68
|
+
.name("cnotes")
|
|
69
|
+
.description("CreatorNotes CLI — manage notes, canvases, and knowledge from the terminal")
|
|
70
|
+
.version(version)
|
|
71
|
+
.option("--json", "Output raw JSON")
|
|
72
|
+
.option("-q, --quiet", "Minimal output: one handle per line (displayId, name, or id); with --fields, those fields tab-separated")
|
|
73
|
+
.option("--fields <list>", "Keep only these comma-separated fields in JSON output, on any command (e.g. displayId,title)")
|
|
74
|
+
.option("-w, --workspace <id>", "Override active workspace ID")
|
|
75
|
+
.option("--server <url>", "Override server URL");
|
|
76
|
+
// -q and --fields are root flags, so apply them once here for every command.
|
|
77
|
+
program.hook("preAction", () => {
|
|
78
|
+
const opts = program.opts();
|
|
79
|
+
setOutputMode({ quiet: Boolean(opts.quiet), fields: parseFields(opts.fields) });
|
|
80
|
+
});
|
|
81
|
+
program.addHelpText("after", `
|
|
82
|
+
Examples:
|
|
83
|
+
$ cnotes notes list --type Insight --json
|
|
84
|
+
$ cnotes notes get MEETING-12 PRD-3 IDEA-7
|
|
85
|
+
$ cnotes search semantic "user retention" --limit 5
|
|
86
|
+
$ cnotes canvas place <canvasId> --spec ./layout.json
|
|
87
|
+
$ cnotes skills install fat-marker # add the storyboard skill to your agent
|
|
88
|
+
$ cnotes notes list --fields displayId,title,type # trim output to chosen keys
|
|
89
|
+
$ cnotes notes list -q --fields displayId,title # tab-separated, no JSON parser needed
|
|
90
|
+
$ cnotes schema --json # describe types, relationships, exit codes
|
|
91
|
+
|
|
92
|
+
Exit codes:
|
|
93
|
+
0 ok 1 generic 2 auth 3 validation
|
|
94
|
+
4 not-found 5 conflict 6 rate-limit 7 permission
|
|
95
|
+
|
|
96
|
+
Env vars:
|
|
97
|
+
CNOTES_SERVER, CNOTES_TOKEN, CNOTES_WORKSPACE, CNOTES_JSON=1
|
|
98
|
+
`);
|
|
99
|
+
// Register all command groups
|
|
100
|
+
registerInitCommand(program);
|
|
101
|
+
registerAuthCommands(program);
|
|
102
|
+
registerConfigCommands(program);
|
|
103
|
+
registerWorkspaceCommands(program);
|
|
104
|
+
registerUpgradeCommand(program);
|
|
105
|
+
registerNotesCommands(program);
|
|
106
|
+
registerVersionsCommands(program);
|
|
107
|
+
registerCanvasCommands(program);
|
|
108
|
+
registerRelationshipsCommands(program);
|
|
109
|
+
registerDepsCommands(program);
|
|
110
|
+
registerSearchCommands(program);
|
|
111
|
+
registerTimelineCommands(program);
|
|
112
|
+
registerReviewCommands(program);
|
|
113
|
+
registerSharedCommands(program);
|
|
114
|
+
registerDraftCommands(program);
|
|
115
|
+
registerFocusCommands(program);
|
|
116
|
+
registerTypesCommands(program);
|
|
117
|
+
registerFilesCommands(program);
|
|
118
|
+
registerMcpCommands(program);
|
|
119
|
+
registerSchemaCommand(program);
|
|
120
|
+
registerThemeCommands(program);
|
|
121
|
+
registerOperationsCommands(program);
|
|
122
|
+
registerFeedbackCommands(program);
|
|
123
|
+
registerSkillsCommands(program);
|
|
124
|
+
registerClaudeHookCommand(program);
|
|
125
|
+
// The root alone keeps excess arguments: an unknown top-level word arrives
|
|
126
|
+
// here as an operand, and the action below reports it as an unknown command
|
|
127
|
+
// (with the version hint) instead of Commander's "too many arguments".
|
|
128
|
+
program.allowExcessArguments(true);
|
|
129
|
+
// Default action: show help + first-run hint when invoked with no arguments
|
|
130
|
+
program.action(() => {
|
|
131
|
+
if (program.args.length > 0) {
|
|
132
|
+
program.error(`error: unknown command '${program.args[0]}'`, {
|
|
133
|
+
code: "commander.unknownCommand",
|
|
134
|
+
exitCode: 1,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
const config = loadConfig();
|
|
138
|
+
const sc = getServerConfig(config, config.currentServer);
|
|
139
|
+
if (!sc?.token) {
|
|
140
|
+
console.log('Tip: Run "cnotes init" to get started.\n');
|
|
141
|
+
}
|
|
142
|
+
program.help();
|
|
143
|
+
});
|
|
144
|
+
return program;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=program.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,qBA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AM,GAAG,UAAU,EAAE,CAAC;QAC5B,MAAM,EAAE,GAAG,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QACzD,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,CAAC,IAAI,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
package/skills/cnotes/SKILL.md
CHANGED
|
@@ -535,7 +535,7 @@ cnotes timeline --since 7d --note standup # filter by note name
|
|
|
535
535
|
# change X, and why" — a hybrid keyword + semantic search over the change
|
|
536
536
|
# descriptions. All-time by default; add --since to bound the window.
|
|
537
537
|
cnotes timeline --query "pricing framing" # find the change, get NOTE + version
|
|
538
|
-
cnotes timeline
|
|
538
|
+
cnotes timeline --query "auth decision" --since 30d # search within a window
|
|
539
539
|
# --json returns { mode: "search", query, results: [{ displayId, versionNumber,
|
|
540
540
|
# changeDescription, snippet, createdAt, score, ... }] }
|
|
541
541
|
```
|
|
@@ -1123,6 +1123,10 @@ After your run, the user (or you) can:
|
|
|
1123
1123
|
|
|
1124
1124
|
If the timeline shows individual note rows instead of one grouped run, the writes didn't attach — usually because `begin` was never called, or `end` was called too early (before the writes).
|
|
1125
1125
|
|
|
1126
|
+
#### Read before you write
|
|
1127
|
+
|
|
1128
|
+
`cnotes operations read-first [--since 7d]` reports how many agent runs that wrote notes read something first, and lists the "cold" runs that wrote without reading. A run counts as read-first when a read carries its run id, or when the same person's agent read in the workspace from 30 minutes before the run until it ended. Reading the canvas or notes you are about to change, before `operations begin`, is what keeps your run off the cold list.
|
|
1129
|
+
|
|
1126
1130
|
### Canvas Layout
|
|
1127
1131
|
|
|
1128
1132
|
**Don't compute coordinates by hand. Use `cnotes canvas place` with a layout spec.**
|