@creator-notes/cnotes 0.134.0 → 0.135.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/README.md +1 -0
- package/dist/commands/catchup.js +91 -0
- package/dist/lib/mcp-spec.js +39 -0
- package/dist/mcp-server.js +6 -1
- package/dist/program.js +2 -0
- package/package.json +1 -1
- package/skills/cnotes/SKILL.md +1 -1
- package/skills/cnotes/references/operations.md +20 -0
package/README.md
CHANGED
|
@@ -52,6 +52,7 @@ cnotes search semantic "onboarding flow"
|
|
|
52
52
|
| `cnotes search semantic` | `cnotes s` | Semantic search across notes |
|
|
53
53
|
| `cnotes query` | `cnotes q` | Filter, group or run a SELECT over every note's metadata from a local SQLite copy of the workspace, synced on each call |
|
|
54
54
|
| `cnotes timeline` | `cnotes tl` | Recent activity feed |
|
|
55
|
+
| `cnotes catchup --since <when>` | `cnotes catch-up` | What changed over a window you name, as evidence for your agent to narrate: threads of work with the notes each touched and the links each note gained. Scope it with `--person`, `--type`, `--canvas`, `--topic`, `--humans-only` |
|
|
55
56
|
| `cnotes relationships list` | `cnotes rel` | Note relationships |
|
|
56
57
|
| `cnotes brief` | | What the workspace already knows about a task: the most relevant notes, canvases and recent changes, with what earlier runs made of each note; ends on one line that says to name the kind of request before writing |
|
|
57
58
|
| `cnotes lessons record\|list` | | Say whether the notes you read were useful, a dead end or corrected (also `operations end --useful`); the next run's brief starts from them |
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ApiClient } from "../lib/api-client.js";
|
|
2
|
+
import { resolveConfig } from "../lib/config.js";
|
|
3
|
+
import { handleError, ValidationError } from "../lib/errors.js";
|
|
4
|
+
import { outputJson } from "../lib/output.js";
|
|
5
|
+
export const CATCHUP_SINCE_REQUIRED = "A catch-up needs a window and has no default one. Pass --since: a span back from now (36h, 7d, 2w), " +
|
|
6
|
+
"a date (2026-11-14) or a date and time (2026-11-14T09:00:00Z).";
|
|
7
|
+
/** The query GET /api/catchup takes. The server parses the window, so "7d" means the same on every surface. */
|
|
8
|
+
export function catchupParams(workspaceId, opts) {
|
|
9
|
+
if (!opts.since?.trim())
|
|
10
|
+
throw new ValidationError(CATCHUP_SINCE_REQUIRED);
|
|
11
|
+
return {
|
|
12
|
+
workspaceId,
|
|
13
|
+
since: opts.since.trim(),
|
|
14
|
+
until: opts.until?.trim() || undefined,
|
|
15
|
+
person: opts.person?.trim() || undefined,
|
|
16
|
+
humansOnly: opts.humansOnly ? "true" : undefined,
|
|
17
|
+
types: opts.type?.trim() || undefined,
|
|
18
|
+
canvas: opts.canvas?.trim() || undefined,
|
|
19
|
+
topic: opts.topic?.trim() || undefined,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Every note the pack shows, once, in the order the pack shows them. */
|
|
23
|
+
export function catchupNoteIds(pack) {
|
|
24
|
+
const seen = new Set();
|
|
25
|
+
for (const thread of pack.threads)
|
|
26
|
+
for (const note of thread.notes ?? [])
|
|
27
|
+
seen.add(note.id);
|
|
28
|
+
return Array.from(seen);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* `cnotes catchup --since 7d`: what changed in the workspace over a window,
|
|
32
|
+
* as evidence for the agent's own model to narrate. CreatorNotes writes no
|
|
33
|
+
* summary here: every line is the words of whoever made the change.
|
|
34
|
+
*/
|
|
35
|
+
export function registerCatchupCommand(program) {
|
|
36
|
+
program
|
|
37
|
+
.command("catchup")
|
|
38
|
+
.alias("catch-up")
|
|
39
|
+
.description("What changed in the workspace over a window, as evidence for you to narrate: threads of work " +
|
|
40
|
+
"(runs, edits, milestones, approved proposals) with the notes each touched, the links each note " +
|
|
41
|
+
"gained, and where the pack stops. Use it when someone asks to be caught up.")
|
|
42
|
+
.option("--since <when>", "Start of the window, required: 36h, 7d, 2w, 2026-11-14 or 2026-11-14T09:00:00Z")
|
|
43
|
+
.option("--until <when>", "End of the window (default: now)")
|
|
44
|
+
.option("--person <name>", "Only changes by one member: a name, part of one, or \"me\". Their agents count as them")
|
|
45
|
+
.option("--humans-only", "Leave out agent runs and CLI, MCP and import writes")
|
|
46
|
+
.option("--type <types>", "Only these note types (comma-separated), plus notes that gained a link to one")
|
|
47
|
+
.option("--canvas <id>", "Only one canvas: its id or display id (CANVAS-12)")
|
|
48
|
+
.option("--topic <words>", "Only changes about a topic, matched by meaning over the change log")
|
|
49
|
+
.option("--text", "Print the pack as text even when piped: the same evidence, smaller than the JSON")
|
|
50
|
+
.addHelpText("after", `
|
|
51
|
+
Read-only and free of credits. The window is always yours to name: there is no
|
|
52
|
+
"since I last looked". Scopes combine, so "what has Ana done on pricing since
|
|
53
|
+
Tuesday" is --person, --topic and --since on one call.
|
|
54
|
+
|
|
55
|
+
The pack is evidence, not a summary. Tell the person what moved as a few
|
|
56
|
+
threads of work, say which closed and which are still open, and name each note
|
|
57
|
+
by its id. Every line was written by whoever made the change, so add no cause
|
|
58
|
+
the lines do not state. "Did any questions get answered?" is
|
|
59
|
+
--type Question: a note that gained a link to a Question is in the pack.
|
|
60
|
+
|
|
61
|
+
coverage.complete is false when the window held more than one pack: run the
|
|
62
|
+
command again with --until set to coverage.coveredBackTo for what came before.
|
|
63
|
+
-q prints the display id of every note in the pack.
|
|
64
|
+
|
|
65
|
+
Examples:
|
|
66
|
+
$ cnotes catchup --since 7d
|
|
67
|
+
$ cnotes catchup --since 2026-11-14 --person Ana --text
|
|
68
|
+
$ cnotes catchup --since 2w --type Decision,Question
|
|
69
|
+
$ cnotes catchup --since 7d --topic "pricing" --canvas CANVAS-12
|
|
70
|
+
`)
|
|
71
|
+
.action(async (opts) => {
|
|
72
|
+
const cfg = resolveConfig(program.opts());
|
|
73
|
+
const api = new ApiClient(cfg.serverUrl, cfg.token, cfg.workspaceId);
|
|
74
|
+
try {
|
|
75
|
+
const data = await api.get("/api/catchup", catchupParams(cfg.workspaceId, opts));
|
|
76
|
+
if (cfg.quiet) {
|
|
77
|
+
for (const id of catchupNoteIds(data.pack))
|
|
78
|
+
console.log(id);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (cfg.json && !opts.text) {
|
|
82
|
+
outputJson(data.pack);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
console.log(data.markdown);
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
handleError(error, cfg.json);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
package/dist/lib/mcp-spec.js
CHANGED
|
@@ -10,6 +10,7 @@ export const SHARED_TOOL_NAMES = [
|
|
|
10
10
|
"cnotes_canvas_search",
|
|
11
11
|
"cnotes_canvas_update",
|
|
12
12
|
"cnotes_canvas_update_section",
|
|
13
|
+
"cnotes_catch_up",
|
|
13
14
|
"cnotes_focus_cancel",
|
|
14
15
|
"cnotes_focus_list",
|
|
15
16
|
"cnotes_focus_plan",
|
|
@@ -473,6 +474,27 @@ export function buildMcpSpec(z, opts) {
|
|
|
473
474
|
unarchive: z.boolean().optional().describe("Older spelling of archived: false"),
|
|
474
475
|
},
|
|
475
476
|
},
|
|
477
|
+
cnotes_catch_up: {
|
|
478
|
+
description: "Catch the user up: what changed in the workspace over a window they name, as evidence for YOU to narrate. Returns threads of work, newest first (agent runs, edits, milestones, approved proposals), each with the notes it touched, what changed in its author's own words, and the links each note gained: a line `+ answers QUESTION-12` is a question getting its answer. Use it for \"catch me up\", \"what did Ana do this week\", \"any decisions since Tuesday\", and \"did my questions get answered\" (types: [\"Question\"]). The window is required and has no default: when the user gives none, ask how far back, or offer the last 7 days. Tell them what moved as a few threads of work, say which closed and which are still open, and name each note by its id; every line was written by whoever made the change, so add no cause the lines do not state. When the Coverage line says the pack stops partway, call again with `until` set to the instant it names.",
|
|
479
|
+
shape: {
|
|
480
|
+
since: z
|
|
481
|
+
.string()
|
|
482
|
+
.describe("Start of the window, required: a span back from now (36h, 7d, 2w), a date (2026-11-14) or a date and time (2026-11-14T09:00:00Z)"),
|
|
483
|
+
until: z.string().optional().describe("End of the window, in the same forms (default: now)"),
|
|
484
|
+
person: z
|
|
485
|
+
.string()
|
|
486
|
+
.optional()
|
|
487
|
+
.describe("Only changes by one member: a name, part of one, or \"me\". Agents acting for them count as them. A name that fits two members is refused with the names to pick from"),
|
|
488
|
+
humansOnly: z.boolean().optional().describe("true = leave out agent runs and CLI, MCP and import writes"),
|
|
489
|
+
types: z
|
|
490
|
+
.array(z.string())
|
|
491
|
+
.max(20)
|
|
492
|
+
.optional()
|
|
493
|
+
.describe("Only these note types (e.g. [\"Decision\", \"Question\"]), plus notes that gained a link to one"),
|
|
494
|
+
canvasId: z.string().optional().describe("Only one canvas: its ID or display ID (e.g. CANVAS-12)"),
|
|
495
|
+
topic: z.string().optional().describe("Only changes about a topic, matched by meaning over the change log (e.g. \"pricing\")"),
|
|
496
|
+
},
|
|
497
|
+
},
|
|
476
498
|
cnotes_types_list: {
|
|
477
499
|
description: "List the note types (supertags) available in this workspace, with each type's validationPrompt — the rubric a note of that type is expected to meet. Read this BEFORE creating notes: cnotes_notes_create rejects a type that does not exist, and writing to the rubric is what makes a note land well-formed.",
|
|
478
500
|
shape: {},
|
|
@@ -480,6 +502,23 @@ export function buildMcpSpec(z, opts) {
|
|
|
480
502
|
};
|
|
481
503
|
return { tools, intent, layoutNode, layoutEdge };
|
|
482
504
|
}
|
|
505
|
+
/**
|
|
506
|
+
* The query GET /api/catchup takes for a cnotes_catch_up call. The server
|
|
507
|
+
* parses the window, so both MCP servers and the CLI read "7d" the same way.
|
|
508
|
+
*/
|
|
509
|
+
export function catchUpQuery(workspaceId, args) {
|
|
510
|
+
const types = (args.types ?? []).map((t) => t.trim()).filter(Boolean);
|
|
511
|
+
return {
|
|
512
|
+
workspaceId,
|
|
513
|
+
since: args.since.trim(),
|
|
514
|
+
until: args.until?.trim() || undefined,
|
|
515
|
+
person: args.person?.trim() || undefined,
|
|
516
|
+
humansOnly: args.humansOnly ? "true" : undefined,
|
|
517
|
+
types: types.length ? types.join(",") : undefined,
|
|
518
|
+
canvas: args.canvasId?.trim() || undefined,
|
|
519
|
+
topic: args.topic?.trim() || undefined,
|
|
520
|
+
};
|
|
521
|
+
}
|
|
483
522
|
/** An `arrow` argument as the canvas route's arrowStart/arrowEnd. Omitted sends neither. */
|
|
484
523
|
export function arrowToMarkers(arrow) {
|
|
485
524
|
switch (arrow) {
|
package/dist/mcp-server.js
CHANGED
|
@@ -25,7 +25,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
25
25
|
import { z } from "zod";
|
|
26
26
|
import { ApiClient } from "./lib/api-client.js";
|
|
27
27
|
import { ApiError, CliError, NotFoundError } from "./lib/errors.js";
|
|
28
|
-
import { arrowToMarkers, buildMcpSpec, notesExpandQuery, notesUpdateBody, orderByDisplayId, planSectionTool, refusalText, } from "./lib/mcp-spec.js";
|
|
28
|
+
import { arrowToMarkers, buildMcpSpec, catchUpQuery, notesExpandQuery, notesUpdateBody, orderByDisplayId, planSectionTool, refusalText, } from "./lib/mcp-spec.js";
|
|
29
29
|
import { CANVAS_GOAL_DESCRIPTION } from "./lib/canvas-goal.js";
|
|
30
30
|
import { parseStart as parseFocusStart } from "./lib/focus-time.js";
|
|
31
31
|
import { resolveNoteId } from "./lib/resolve-note.js";
|
|
@@ -412,6 +412,11 @@ sharedTool("cnotes_canvas_read", async ({ canvasId, full }) => withErrorHandling
|
|
|
412
412
|
});
|
|
413
413
|
return read.markdown;
|
|
414
414
|
}, { text: true }));
|
|
415
|
+
sharedTool("cnotes_catch_up", async (args) => withErrorHandling(async () => {
|
|
416
|
+
// The pack as text: the same evidence `cnotes catchup --text` prints.
|
|
417
|
+
const read = await api.get("/api/catchup", catchUpQuery(workspaceId, args));
|
|
418
|
+
return read.markdown;
|
|
419
|
+
}, { text: true }));
|
|
415
420
|
sharedTool("cnotes_canvas_read_section", async ({ section, full }) => withErrorHandling(async () => {
|
|
416
421
|
const read = await api.get("/api/canvas/read", {
|
|
417
422
|
section,
|
package/dist/program.js
CHANGED
|
@@ -31,6 +31,7 @@ import { registerOperationsCommands } from "./commands/operations.js";
|
|
|
31
31
|
import { registerFeedbackCommands } from "./commands/feedback.js";
|
|
32
32
|
import { registerQualityCommands } from "./commands/quality.js";
|
|
33
33
|
import { registerBriefCommand } from "./commands/brief.js";
|
|
34
|
+
import { registerCatchupCommand } from "./commands/catchup.js";
|
|
34
35
|
import { registerLessonsCommands } from "./commands/lessons.js";
|
|
35
36
|
import { registerSkillsCommands } from "./commands/skills.js";
|
|
36
37
|
import { registerClaudeHookCommand } from "./commands/claude-hook.js";
|
|
@@ -145,6 +146,7 @@ Env vars:
|
|
|
145
146
|
registerOperationsCommands(program);
|
|
146
147
|
registerQualityCommands(program);
|
|
147
148
|
registerBriefCommand(program);
|
|
149
|
+
registerCatchupCommand(program);
|
|
148
150
|
registerLessonsCommands(program);
|
|
149
151
|
registerFeedbackCommands(program);
|
|
150
152
|
registerSkillsCommands(program);
|
package/package.json
CHANGED
package/skills/cnotes/SKILL.md
CHANGED
|
@@ -127,7 +127,7 @@ After you create a canvas or finish changing one, end your reply with its link,
|
|
|
127
127
|
| Deciding what goes on a canvas as a note, face, text card, list, frame, edge or portal; the banner; completion tests | [references/canvas-elements.md](references/canvas-elements.md) |
|
|
128
128
|
| Placing or rearranging several items (`canvas place`, `arrange`) | [references/canvas-layout.md](references/canvas-layout.md) |
|
|
129
129
|
| Using any other canvas command: read, add, edit, move, remove, edges, templates, milestones, digest | [references/canvas.md](references/canvas.md) |
|
|
130
|
-
| Running two agents at once, bracketing canvas edits, verifying attribution, reading the timeline | [references/operations.md](references/operations.md) |
|
|
130
|
+
| Running two agents at once, bracketing canvas edits, verifying attribution, reading the timeline, catching someone up (`cnotes catchup --since 7d`) | [references/operations.md](references/operations.md) |
|
|
131
131
|
| Reworking notes or a board other people read, or asked to draft | [references/drafts.md](references/drafts.md) |
|
|
132
132
|
| Another agent works in the same workspace: handing over, reviewing its proposal, overlaps, when to stop | [references/agents-together.md](references/agents-together.md) |
|
|
133
133
|
| Reviewing (propose the fix, or comment), addressing comments, requesting or answering a review, checking what teammates shared | [references/reviews-and-comments.md](references/reviews-and-comments.md) |
|
|
@@ -12,6 +12,7 @@ Read this for the detail behind `operations begin`/`end`: when to wrap, two agen
|
|
|
12
12
|
- [Handing off mid-work](#handing-off-mid-work)
|
|
13
13
|
- [Canvas agent-runs](#canvas-agent-runs)
|
|
14
14
|
- [Timeline (`cnotes timeline` / `cnotes tl`)](#timeline-cnotes-timeline--cnotes-tl)
|
|
15
|
+
- [Catching someone up (`cnotes catchup`)](#catching-someone-up-cnotes-catchup)
|
|
15
16
|
|
|
16
17
|
When an AI agent is doing a **batch of work**, creating notes, modifying 2+ entities, or building a canvas with content, wrap it in a workspace-level **operation**. The batch then shows up in the timeline as a single legible row with intent + evidence + count, and the user can later revert the whole run as one unit. Unwrapped, each write is an isolated timeline row with no shared intent or batch revert, and on canvas and other multi-write paths nothing forces the wrap, so you must open the run yourself.
|
|
17
18
|
|
|
@@ -202,3 +203,22 @@ cnotes timeline --query "auth decision" --since 30d # search within a window
|
|
|
202
203
|
# --json returns { mode: "search", query, results: [{ displayId, versionNumber,
|
|
203
204
|
# changeDescription, snippet, createdAt, score, ... }] }
|
|
204
205
|
```
|
|
206
|
+
|
|
207
|
+
## Catching someone up (`cnotes catchup`)
|
|
208
|
+
|
|
209
|
+
When a person asks to be caught up ("catch me up", "what did Ana do this week", "any decisions since Tuesday"), read one pack instead of composing `timeline`, `canvas digest` and `rel list` yourself:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
cnotes catchup --since 7d --text # the last week, as text
|
|
213
|
+
cnotes catchup --since 2026-11-14 --person Ana # one member; their agents count as them
|
|
214
|
+
cnotes catchup --since 2w --type Decision,Question
|
|
215
|
+
cnotes catchup --since 7d --topic "pricing" --canvas CANVAS-12
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
- **The window is required.** There is no "since I last looked": when the person names none, ask how far back, or offer the last 7 days. `--since` and `--until` take a span back from now (36h, 7d, 2w), a date or a date and time.
|
|
219
|
+
- **Scopes combine.** `--person` (a name, part of one, or "me"; a name that fits two members is refused with the names to pick from), `--humans-only`, `--type`, `--canvas`, `--topic`.
|
|
220
|
+
- **The pack is evidence, not a summary.** It holds threads of work, newest first: agent runs, edits, milestones and approved proposals, each with the notes it touched, the change in its author's own words, and the links each note gained (`+ answers QUESTION-12` is a question getting its answer). CreatorNotes wrote none of it, so you narrate: say what moved as a few threads, which closed and which are still open, and name each note by its id. Add no cause or motive the lines do not state.
|
|
221
|
+
- **"Did my questions get answered?"** is `--type Question`: a note of another type that gained a link to a Question is in the pack, marked with why.
|
|
222
|
+
- **A pack says where it stops.** `coverage.complete: false` (the `Coverage:` line in text) means the window held more than one pack. Run it again with `--until` set to `coverage.coveredBackTo` for what came before, and say so if you stop early.
|
|
223
|
+
- `--text` prints the same pack as text, smaller than the JSON, which is what to read when you only narrate. `-q` prints the display id of every note in the pack; open one with `cnotes notes get <id> --expand`.
|
|
224
|
+
|