@dreamlake/dreamlake-cli 0.104.5 → 0.104.6

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.
Files changed (40) hide show
  1. package/dist/api/note-events.js +7 -7
  2. package/dist/api/note-facade.js +8 -8
  3. package/dist/api/note-linger.js +4 -4
  4. package/dist/api/note-presence.js +1 -1
  5. package/dist/api/note-reading.js +3 -3
  6. package/dist/api/note-write.js +6 -6
  7. package/dist/api/notes.js +3 -3
  8. package/dist/cli/agents/index.js +4 -4
  9. package/dist/cli/failure-report.js +3 -3
  10. package/dist/cli/help-examples.generated.js +37 -37
  11. package/dist/cli/index.js +2 -2
  12. package/dist/cli/notes/api-transport.js +3 -3
  13. package/dist/cli/notes/archive-command.js +8 -8
  14. package/dist/cli/notes/document.js +12 -12
  15. package/dist/cli/notes/edit-commands.js +7 -7
  16. package/dist/cli/notes/files-commands.js +6 -6
  17. package/dist/cli/notes/html-read.js +3 -3
  18. package/dist/cli/notes/index.js +126 -126
  19. package/dist/cli/notes/linger.js +2 -2
  20. package/dist/cli/notes/move-command.js +21 -21
  21. package/dist/cli/notes/rm-command.js +10 -10
  22. package/dist/cli/notes/select-command.js +3 -3
  23. package/dist/cli/notes/suggest-diff.js +2 -2
  24. package/dist/cli/notes/transfer-command.js +1 -1
  25. package/dist/cli/notes/version-commands.js +8 -8
  26. package/dist/cli/ownership/metadata-transfer.js +2 -2
  27. package/dist/cli/project/index.js +4 -4
  28. package/dist/cli/project/move.js +2 -2
  29. package/dist/cli/project/stream.js +1 -1
  30. package/dist/cli/session-affiliation.js +1 -1
  31. package/dist/cli/sessions/affiliation.js +4 -4
  32. package/dist/cli/sessions/api.js +1 -1
  33. package/dist/cli/sessions/control.js +1 -1
  34. package/dist/cli/sessions/index.js +2 -2
  35. package/dist/cli/share.js +3 -3
  36. package/dist/cli/tasks/index.js +4 -4
  37. package/dist/cli/update/index.js +3 -3
  38. package/dist/cli/version.d.ts +1 -1
  39. package/dist/cli/version.js +1 -1
  40. package/package.json +9 -9
@@ -14,7 +14,7 @@ function selectionText(p) {
14
14
  export async function runNotesLinger(ref, opts, clock) {
15
15
  const target = ref ?? opts.note;
16
16
  if (!target || (ref && opts.note && ref !== opts.note)) {
17
- fail('give one note id, slug or name');
17
+ fail('give one memo id, slug or name');
18
18
  return 1;
19
19
  }
20
20
  if (!process.env.DREAMLAKE_AGENT_ID) {
@@ -65,7 +65,7 @@ export async function runNotesLinger(ref, opts, clock) {
65
65
  for (const p of event.left)
66
66
  output += `- ${participant(p)} left\n`;
67
67
  for (const a of event.activities)
68
- output += `* ${label(a.agent.name)} (agent) ${a.kind === 'read' ? 'read' : 'edited'} the note\n`;
68
+ output += `* ${label(a.agent.name)} (agent) ${a.kind === 'read' ? 'read' : 'edited'} the memo\n`;
69
69
  const departed = new Set(event.left.map(p => p.client));
70
70
  for (const p of event.selections) {
71
71
  const selected = selectionText(p);
@@ -20,7 +20,7 @@ export async function runNotesMove(ref, opts) {
20
20
  if (!destination)
21
21
  throw new Error("--to-namespace requires a destination workspace slug");
22
22
  if (!ref.trim())
23
- throw new Error("a note ID, slug, or title is required");
23
+ throw new Error("a memo ID, slug, or title is required");
24
24
  const projects = [...new Set((opts.project ?? []).map(project => {
25
25
  if (!project.trim())
26
26
  throw new Error("--project requires a non-empty project slug");
@@ -42,14 +42,14 @@ export async function runNotesMove(ref, opts) {
42
42
  }
43
43
  const note = await requestJson(c.remote, `/notes/${seg(id)}`, { token });
44
44
  if (note.id !== id || !note.namespaceSlug)
45
- throw new Error("server did not return the note's owning workspace");
45
+ throw new Error("server did not return the memo's owning workspace");
46
46
  if (opts.namespace && opts.namespace.trim().replace(/^@/, "") !== note.namespaceSlug)
47
- throw new Error(`note is in '${note.namespaceSlug}', not --namespace '${opts.namespace}'; inspect its current location before moving`);
47
+ throw new Error(`memo is in '${note.namespaceSlug}', not --namespace '${opts.namespace}'; inspect its current location before moving`);
48
48
  // Older servers have no move permission. Never fall back to delete/copy or a generic PATCH.
49
49
  if (note.permissions?.move !== true)
50
50
  throw new Error(note.permissions?.move === false
51
- ? "only the source workspace owner can move this note"
52
- : "this server does not advertise note moving; use a server version that supports notes move");
51
+ ? "only the source workspace owner can move this memo"
52
+ : "this server does not advertise memo moving; use a server version that supports memos move");
53
53
  attempted = !opts.dryRun;
54
54
  const receipt = await requestJson(c.remote, `/namespaces/${seg(note.namespaceSlug)}/notes/${seg(id)}/move`, {
55
55
  method: "POST", token,
@@ -66,14 +66,14 @@ export async function runNotesMove(ref, opts) {
66
66
  if (opts.json)
67
67
  emitJson(receipt);
68
68
  else {
69
- process.stdout.write(`${receipt.dryRun ? "Move preview" : receipt.moved ? "Note moved" : "Project filing updated"}: ${receipt.note.name}\n`);
69
+ process.stdout.write(`${receipt.dryRun ? "Move preview" : receipt.moved ? "Memo moved" : "Project filing updated"}: ${receipt.note.name}\n`);
70
70
  process.stdout.write(`Note: ${receipt.note.id}\nFrom: @${receipt.source.namespaceSlug}\nTo: @${receipt.destination.namespaceSlug}\n`);
71
71
  process.stdout.write(`Projects: ${receipt.destination.projects.map(p => p.slug).join(", ") || "none"}\n`);
72
72
  if (receipt.source.namespaceSlug !== receipt.destination.namespaceSlug && receipt.source.projects.length)
73
73
  process.stdout.write(`Previous project associations removed${receipt.dryRun ? " on confirmation" : ""}: ${receipt.source.projects.map(p => p.slug).join(", ")}\n`);
74
74
  process.stdout.write(`Visibility: ${receipt.access.visibility}. Existing sharing: ${receipt.access.sharing}.\n`);
75
75
  if (receipt.access.organizationMembers === "read-write")
76
- process.stdout.write("All destination organization members can read and edit this note.\n");
76
+ process.stdout.write("All destination organization members can read and edit this memo.\n");
77
77
  for (const warning of receipt.warnings)
78
78
  process.stdout.write(`${warning}\n`);
79
79
  for (const blocker of receipt.blockers)
@@ -106,7 +106,7 @@ export async function runNotesMove(ref, opts) {
106
106
  }
107
107
  recordOperationFailure(code, attempted && (status === undefined || status >= 500) ? 'uncertain' : 'failed');
108
108
  if (attempted && (status === undefined || status >= 500))
109
- message += "; the outcome may be uncertain: resolve the note by ID and inspect its workspace and projects before resubmitting; no retry was performed";
109
+ message += "; the outcome may be uncertain: resolve the memo by ID and inspect its workspace and projects before resubmitting; no retry was performed";
110
110
  if (opts.json)
111
111
  emitJson({ error: code, message, ...(status === undefined ? {} : { status }) });
112
112
  else
@@ -123,14 +123,14 @@ function folderOf(path) {
123
123
  export async function noteProjectNode(remote, token, ns, noteId, project) {
124
124
  const res = await requestJson(remote, `/namespaces/${seg(ns)}/resources/note/${seg(noteId)}/projects?view=nodes`, { token });
125
125
  if (!Array.isArray(res?.nodes))
126
- throw new Error("server did not return the note's project nodes");
126
+ throw new Error("server did not return the memo's project nodes");
127
127
  const hits = res.nodes.filter(n => n.resourceType === "note" && n.resourceId === noteId &&
128
128
  n.path.split(",")[1] === project && (n.namespaceSlug == null || n.namespaceSlug === ns));
129
129
  if (!hits.length)
130
- throw new Error(`note ${noteId} is not filed in project '${project}' in @${ns}; ` +
131
- `see \`dreamlake notes projects ${noteId} --namespace ${ns}\``);
130
+ throw new Error(`memo ${noteId} is not filed in project '${project}' in @${ns}; ` +
131
+ `see \`dreamlake memos projects ${noteId} --namespace ${ns}\``);
132
132
  if (hits.length > 1)
133
- throw new Error(`note ${noteId} has more than one node in project '${project}'; resolve it in the UI`);
133
+ throw new Error(`memo ${noteId} has more than one node in project '${project}'; resolve it in the UI`);
134
134
  return hits[0];
135
135
  }
136
136
  /** One exact child by name; the server's `search` is a substring filter, so match here. */
@@ -153,16 +153,16 @@ export async function runNotesFolderMove(ref, opts) {
153
153
  let attempted = false;
154
154
  try {
155
155
  if (!ref.trim())
156
- throw new Error("a note ID, slug, or title is required");
156
+ throw new Error("a memo ID, slug, or title is required");
157
157
  const ns = opts.namespace?.trim().replace(/^@/, "");
158
158
  if (!ns)
159
- throw new Error("--folder requires --namespace, the note's workspace");
159
+ throw new Error("--folder requires --namespace, the memo's workspace");
160
160
  const toNs = opts.toNamespace?.trim().replace(/^@/, "");
161
161
  if (toNs && toNs !== ns)
162
162
  throw new Error("--folder moves within one workspace; move across workspaces first, then into a folder");
163
163
  const projects = [...new Set((opts.project ?? []).map(p => p.trim()))];
164
164
  if (projects.length !== 1 || !projects[0])
165
- throw new Error("--folder requires exactly one --project, the project whose tree holds the note");
165
+ throw new Error("--folder requires exactly one --project, the project whose tree holds the memo");
166
166
  const project = projects[0];
167
167
  const segments = (opts.folder ?? "").split("/").map(s => s.trim()).filter(Boolean);
168
168
  if (segments.some(s => s === "." || s === ".."))
@@ -207,7 +207,7 @@ export async function runNotesFolderMove(ref, opts) {
207
207
  // An empty --folder means the project root, whose node is the note's projectNodeId.
208
208
  const parentId = target?.id ?? node.projectNodeId;
209
209
  if (!parentId)
210
- throw new Error("server did not return the note's project node");
210
+ throw new Error("server did not return the memo's project node");
211
211
  const updated = await requestJson(c.remote, `/nodes/${seg(node.id)}`, { method: "PATCH", token, json: { parentId } });
212
212
  if (updated?.id !== node.id || folderOf(updated.path) !== destinationFolder)
213
213
  throw new Error("server returned an unexpected node after the move");
@@ -216,11 +216,11 @@ export async function runNotesFolderMove(ref, opts) {
216
216
  if (opts.json)
217
217
  emitJson(receipt);
218
218
  else {
219
- process.stdout.write(`${receipt.dryRun ? "Move preview" : receipt.moved ? "Note moved" : "Already there"}: ${receipt.note.name}\n`);
219
+ process.stdout.write(`${receipt.dryRun ? "Move preview" : receipt.moved ? "Memo moved" : "Already there"}: ${receipt.note.name}\n`);
220
220
  process.stdout.write(`Note: ${id} (node ${node.id}) in ${project}@${ns}\n`);
221
221
  process.stdout.write(`From: ${receipt.source.path}\nTo: ${receipt.destination.path}\n`);
222
222
  if (unchanged)
223
- process.stdout.write("The note is already in that folder. Nothing changed.\n");
223
+ process.stdout.write("The memo is already in that folder. Nothing changed.\n");
224
224
  else if (receipt.dryRun)
225
225
  process.stdout.write("Nothing changed. Repeat without --dry-run to apply; bindrs, links and access are kept.\n");
226
226
  }
@@ -261,12 +261,12 @@ export async function runNotesFolderMove(ref, opts) {
261
261
  }
262
262
  export function registerMoveCommand(notes) {
263
263
  withConnFlags(notes.command("move").allowExcessArguments(false))
264
- .description("move a note into a workspace and file it in projects, or into a folder of one project")
265
- .argument("<note>", "note ID, slug or title")
264
+ .description("move a memo into a workspace and file it in projects, or into a folder of one project")
265
+ .argument("<memo>", "memo ID, slug or title")
266
266
  .option("--to-namespace <slug>", "destination workspace (workspace/project filing)")
267
267
  .option("--namespace <slug>", "assert the source workspace; used for slug/title lookup")
268
268
  .option("--project <slug>", "destination project; repeat for multiple projects", (value, previous) => [...previous, value], [])
269
- .option("--folder <path>", "relocate the note within --project to this existing folder (e.g. a/b)")
269
+ .option("--folder <path>", "relocate the memo within --project to this existing folder (e.g. a/b)")
270
270
  .option("--to-project <slug>", "destination project (contract spelling of --project; repeatable)", (value, previous) => [...previous, value], [])
271
271
  .option("--to-folder <path>", "destination folder (contract spelling of --folder)")
272
272
  .option("--dry-run", "validate on the server and preview access changes without writing")
@@ -41,20 +41,20 @@ export async function runNotesRm(ref, opts) {
41
41
  const note = await requestJson(c.remote, `/notes/${seg(id)}`, { token });
42
42
  const ns = note.namespaceSlug;
43
43
  if (note.id !== id || !ns) {
44
- fail("server did not return the note's owning namespace");
44
+ fail("server did not return the memo's owning namespace");
45
45
  return 1;
46
46
  }
47
47
  if (asserted && asserted !== ns) {
48
- fail(`note ${id} is in '${ns}', not --namespace '${asserted}'`);
48
+ fail(`memo ${id} is in '${ns}', not --namespace '${asserted}'`);
49
49
  return 1;
50
50
  }
51
51
  if (note.permissions?.delete === false) {
52
- fail("only the namespace owner or the note's creator can delete this note");
52
+ fail("only the namespace owner or the memo's creator can delete this memo");
53
53
  return 1;
54
54
  }
55
55
  const label = `'${note.name ?? ref}' (${id}) in ${ns}`;
56
56
  if (!opts.yes) {
57
- const proceed = await confirm(`Delete note ${label}? Its share links, accepted shares and project filings are removed, and there is no restore command.`, false);
57
+ const proceed = await confirm(`Delete memo ${label}? Its share links, accepted shares and project filings are removed, and there is no restore command.`, false);
58
58
  if (!proceed) {
59
59
  process.stdout.write(process.stdin.isTTY
60
60
  ? "Cancelled.\n"
@@ -70,7 +70,7 @@ export async function runNotesRm(ref, opts) {
70
70
  emitJson({ id, namespace: ns, name: note.name ?? null, deleted: true });
71
71
  }
72
72
  else {
73
- process.stdout.write(`✓ deleted note ${label}\n`);
73
+ process.stdout.write(`✓ deleted memo ${label}\n`);
74
74
  }
75
75
  return 0;
76
76
  }
@@ -88,9 +88,9 @@ export async function runNotesRm(ref, opts) {
88
88
  if (status === 401)
89
89
  message = "not authenticated — run 'dreamlake login' first";
90
90
  else if (status === 403)
91
- message = "only the namespace owner or the note's creator can delete this note";
91
+ message = "only the namespace owner or the memo's creator can delete this memo";
92
92
  else if (status === 404)
93
- message = `note '${ref}' not found (or not visible to you)`;
93
+ message = `memo '${ref}' not found (or not visible to you)`;
94
94
  }
95
95
  if (opts.json)
96
96
  emitJson({ error: message, ...(status === undefined ? {} : { status }) });
@@ -101,10 +101,10 @@ export async function runNotesRm(ref, opts) {
101
101
  }
102
102
  export function registerRmCommand(notes) {
103
103
  withConnFlags(notes.command("rm").allowExcessArguments(false))
104
- .description("delete a whole note (asks first; --yes skips). To remove text, use 'notes delete'")
105
- .argument("<note>", "note id, slug or exact title")
104
+ .description("delete a whole memo (asks first; --yes skips). To remove text, use 'memos delete'")
105
+ .argument("<memo>", "memo id, slug or exact title")
106
106
  .option("-y, --yes", "skip the confirmation prompt")
107
- .option("--namespace <slug>", "whose notes, for slug/title lookup; with an id, asserts the owner")
107
+ .option("--namespace <slug>", "whose memos, for slug/title lookup; with an id, asserts the owner")
108
108
  .option("--json", "emit JSON")
109
109
  .action(async (note, opts) => { process.exitCode = await runNotesRm(note, opts); });
110
110
  }
@@ -8,7 +8,7 @@ import { noteTransport } from './api-transport.js';
8
8
  import { EXIT_NO_MATCH } from './edit-commands.js';
9
9
  export async function runNotesTextSelect(css, opts) {
10
10
  if (css !== undefined || !opts.text || !opts.note || opts.section === '') {
11
- fail('use notes select --text "exact passage" --note NOTE [--section ANCHOR]; CSS lookup and text selection are separate modes');
11
+ fail('use memos select --text "exact passage" --note NOTE [--section ANCHOR]; CSS lookup and text selection are separate modes');
12
12
  return 1;
13
13
  }
14
14
  if (!process.env.DREAMLAKE_AGENT_ID) {
@@ -37,7 +37,7 @@ export async function runNotesTextSelect(css, opts) {
37
37
  if (opts.json)
38
38
  emitJson(receipt);
39
39
  else
40
- process.stdout.write(`Agent selection published: [${range.start},${range.end}) (code points)\nSelected: ${JSON.stringify(receipt.text)}\nScope: ${scope.kind === 'section' ? `section ${JSON.stringify(scope.anchor)}` : 'note'}; match ${nth} of ${matches.length}\nSelection expires: ${new Date(receipt.selectionExpiresAt).toISOString()}\nPresence expires: ${new Date(receipt.presenceExpiresAt).toISOString()}\n`);
40
+ process.stdout.write(`Agent selection published: [${range.start},${range.end}) (code points)\nSelected: ${JSON.stringify(receipt.text)}\nScope: ${scope.kind === 'section' ? `section ${JSON.stringify(scope.anchor)}` : 'memo'}; match ${nth} of ${matches.length}\nSelection expires: ${new Date(receipt.selectionExpiresAt).toISOString()}\nPresence expires: ${new Date(receipt.presenceExpiresAt).toISOString()}\n`);
41
41
  return 0;
42
42
  }
43
43
  catch (error) {
@@ -55,7 +55,7 @@ export async function runNotesTextSelect(css, opts) {
55
55
  return 1;
56
56
  }
57
57
  if (error instanceof HttpError && error.status === 409 && error.body.includes('stale_range')) {
58
- fail('stale_range: note changed before publication; read the section again and retry. No selection published.');
58
+ fail('stale_range: memo changed before publication; read the section again and retry. No selection published.');
59
59
  return 1;
60
60
  }
61
61
  return report(error);
@@ -298,14 +298,14 @@ export function runNotesSuggestDiff(before, after, opts) {
298
298
  }
299
299
  export function registerSuggestDiffCommand(notes) {
300
300
  notes.command("suggest-diff").allowExcessArguments(false)
301
- .description("render two Markdown versions as a note body of suggested edits (local; pipe to `notes create --file -`)")
301
+ .description("render two Markdown versions as a memo body of suggested edits (local; pipe to `memos create --file -`)")
302
302
  .argument("<before>", "earlier version ('-' for stdin)")
303
303
  .argument("<after>", "later version ('-' for stdin)")
304
304
  .option("--user <name>", "attribution shown on every suggestion")
305
305
  .option("--full-code", "keep unchanged code blocks instead of collapsing them")
306
306
  .option("--mdx", "show MDX component tags as inline code (default for .mdx inputs)")
307
307
  .option("--no-mdx", "leave component tags as written")
308
- .option("--in-place", "output to replace <before> in the same note: verbatim unchanged blocks; exit 2 if code changed")
308
+ .option("--in-place", "output to replace <before> in the same memo: verbatim unchanged blocks; exit 2 if code changed")
309
309
  .option("--json", "emit { markdown, stats } as JSON")
310
310
  .action((before, after, opts) => { process.exitCode = runNotesSuggestDiff(before, after, opts); });
311
311
  }
@@ -4,6 +4,6 @@ export function runNotesTransfer(noteId, opts) {
4
4
  return runMetadataTransfer('note', noteId, opts);
5
5
  }
6
6
  export function registerTransferCommand(notes) {
7
- metadataTransferFlags(notes.command('transfer <note-id>').description('Request a recipient-accepted, metadata-only Note ownership transfer'))
7
+ metadataTransferFlags(notes.command('transfer <note-id>').description('Request a recipient-accepted, metadata-only Memo ownership transfer'))
8
8
  .action(async (noteId, opts) => { process.exitCode = await runNotesTransfer(noteId, opts); });
9
9
  }
@@ -27,7 +27,7 @@ function errorResult(error, opts, attempted = false) {
27
27
  }
28
28
  const stale = status === 412 || (status === 409 && code === "note_changed");
29
29
  if (stale)
30
- message += "; review the current note and its hash before explicitly saving again; no retry was performed";
30
+ message += "; review the current memo and its hash before explicitly saving again; no retry was performed";
31
31
  else if (attempted)
32
32
  message += "; inspect saved versions before resubmitting; no retry was performed";
33
33
  if (opts.json)
@@ -70,7 +70,7 @@ export async function runVersionCreate(ref, opts) {
70
70
  throw new Error("source does not match the returned hash; no version was created");
71
71
  const hash = snapshot.hash.slice(7);
72
72
  if (expected !== undefined && expected !== hash)
73
- throw new HttpError(409, JSON.stringify({ error: "note_changed", message: "The current note differs from --hash" }));
73
+ throw new HttpError(409, JSON.stringify({ error: "note_changed", message: "The current memo differs from --hash" }));
74
74
  const payload = { hash, ...(opts.tag === undefined ? {} : { tag: opts.tag }),
75
75
  ...(opts.summary === undefined ? {} : { summary: opts.summary }),
76
76
  ...(opts.parent === undefined ? {} : { parentId: opts.parent }) };
@@ -144,7 +144,7 @@ export async function runSavedVersionRead(ref, opts) {
144
144
  try {
145
145
  const note = ref ?? opts.note;
146
146
  if (!note || (ref && opts.note && ref !== opts.note))
147
- throw new Error("give one note id, slug or name");
147
+ throw new Error("give one memo id, slug or name");
148
148
  const incompatible = ["at", "toc", "tag", "since", "format", "legacy", "section", "startLine", "endLine", "numbered", "ifMatch", "linger", "debounce", "throttle", "intent"];
149
149
  const present = incompatible.filter(key => opts[key] !== undefined && opts[key] !== false);
150
150
  if (present.length || (opts.view !== undefined && opts.view !== "source")) {
@@ -158,12 +158,12 @@ export async function runSavedVersionRead(ref, opts) {
158
158
  }
159
159
  export function registerVersionCommands(notes) {
160
160
  const common = (cmd) => withConnFlags(cmd.allowExcessArguments(false))
161
- .argument("<note>", "note id, slug or title")
162
- .option("--namespace <slug>", "note owner namespace")
161
+ .argument("<memo>", "memo id, slug or title")
162
+ .option("--namespace <slug>", "memo owner namespace")
163
163
  .option("--json", "emit JSON");
164
164
  const creation = (cmd) => cmd
165
165
  .option("--summary <text>", "version summary (up to 2000 characters)")
166
- .option("--parent <version-id>", "parent saved version in the same note")
166
+ .option("--parent <version-id>", "parent saved version in the same memo")
167
167
  .option("--hash <hash>", "require the content hash retained from a reviewed read")
168
168
  .option("--dry-run", "read and validate without saving a version");
169
169
  const listing = (cmd) => cmd
@@ -171,8 +171,8 @@ export function registerVersionCommands(notes) {
171
171
  .action(async (note, opts) => { process.exitCode = await runVersionList(note, opts); });
172
172
  creation(common(notes.command("tag")))
173
173
  .argument("<label>", "saved version label (up to 80 characters)")
174
- .description("tag the current note as an immutable saved version")
174
+ .description("tag the current memo as an immutable saved version")
175
175
  .action(async (note, label, opts) => { process.exitCode = await runVersionCreate(note, { ...opts, tag: label }); });
176
176
  listing(common(notes.command("hist")))
177
- .description("list saved versions of a note, newest first (up to 50 per page)");
177
+ .description("list saved versions of a memo, newest first (up to 50 per page)");
178
178
  }
@@ -8,7 +8,7 @@ import { withConnFlags } from '../compat/flags.js';
8
8
  import { fail } from '../helpers.js';
9
9
  import { emitProjectResult } from '../project/output.js';
10
10
  import { reportCommandFailure } from '../failure-report.js';
11
- const adapters = { note: { capability: 'noteTransfer', label: 'Note' }, artifact: { capability: 'artifactTransfer', label: 'Artifact' }, env: { capability: 'envTransfer', label: 'Env/Scene' }, annotation: { capability: 'annotationTransfer', label: 'Annotation' }, pipeline: { capability: 'pipelineTransfer', label: 'Pipeline' }, source: { capability: 'sourceTransfer', label: 'Source' } };
11
+ const adapters = { note: { capability: 'noteTransfer', label: 'Memo' }, artifact: { capability: 'artifactTransfer', label: 'Artifact' }, env: { capability: 'envTransfer', label: 'Env/Scene' }, annotation: { capability: 'annotationTransfer', label: 'Annotation' }, pipeline: { capability: 'pipelineTransfer', label: 'Pipeline' }, source: { capability: 'sourceTransfer', label: 'Source' } };
12
12
  const id = (v) => typeof v === 'string' && /^[a-f0-9]{24}$/i.test(v);
13
13
  const text = (v) => typeof v === 'string' && !!v.trim();
14
14
  const equal = (a, b) => JSON.stringify(a) === JSON.stringify(b);
@@ -49,7 +49,7 @@ function validateOperation(o, r, operationId) {
49
49
  export async function runMetadataTransfer(requestedType, resourceId, opts) {
50
50
  const normalizedType = requestedType === 'scene' ? 'env' : requestedType;
51
51
  if (!Object.hasOwn(adapters, normalizedType)) {
52
- fail('Unsupported metadata resource type; use note, artifact, env (scene), annotation, pipeline, or source with an advertised server adapter');
52
+ fail('Unsupported metadata resource type; use memo, artifact, env (scene), annotation, pipeline, or source with an advertised server adapter');
53
53
  return 1;
54
54
  }
55
55
  const type = normalizedType;
@@ -33,7 +33,7 @@ export async function runProjectRead(action, project, opts) {
33
33
  export function registerProjectCommand(program) {
34
34
  const group = program.command('project').description('Inspect or share a Project, or request whole ownership transfer');
35
35
  withConnFlags(group.command('move <project>'))
36
- .description('move a whole Project and its owned Notes, Artifacts and Envs; review and owner acceptance required')
36
+ .description('move a whole Project and its owned Memos, Artifacts and Envs; review and owner acceptance required')
37
37
  .requiredOption('--namespace <slug>', 'current owning namespace')
38
38
  .requiredOption('--to <slug>', 'destination namespace')
39
39
  .option('--stream', 'compatibility alias; new Project moves always use server-gated streaming')
@@ -44,7 +44,7 @@ export function registerProjectCommand(program) {
44
44
  .option('--preview-hash <hash>', 'exact hash from the reviewed preview')
45
45
  .option('--idempotency-key <key>', 'stable request key for safe retries')
46
46
  .option('--name <name>', 'explicit destination Project name; otherwise unchanged')
47
- .option('--rename-note <id=name>', 'explicit Note name collision resolution; repeatable', (value, previous) => [...previous, value], [])
47
+ .option('--rename-note <id=name>', 'explicit Memo name collision resolution; repeatable', (value, previous) => [...previous, value], [])
48
48
  .option('--preserve-access', 'retain the eligible access inventory (default for new streaming moves)')
49
49
  .option('--preserve-external-filings', 'retain eligible external filings (default for new streaming moves; server validates support)')
50
50
  .option('--accept-if-authorized', 'explicitly accept only when current destination namespace authority is verified')
@@ -64,7 +64,7 @@ export function registerProjectCommand(program) {
64
64
  withConnFlags(group.command(`${action} <project>`))
65
65
  .description(action === 'attach' ? 'attach a resource; Project grantees inherit its content access' : 'detach a resource; independent access remains')
66
66
  .requiredOption('--namespace <slug>', 'owning namespace')
67
- .requiredOption('--type <type>', 'note, artifact, annotation, workflow, env or source')
67
+ .requiredOption('--type <type>', 'memo, artifact, annotation, workflow, env or source')
68
68
  .requiredOption('--resource <id>', 'resource database ID')
69
69
  .option('--json', 'emit complete response as JSON')
70
70
  .action(async (project, options) => { process.exitCode = await runProjectAttachment(action, project, options); });
@@ -73,7 +73,7 @@ export function registerProjectCommand(program) {
73
73
  .description('compatibility alias for whole-Project streaming review; never submits')
74
74
  .requiredOption('--namespace <slug>', 'current owning workspace')
75
75
  .requiredOption('--to-namespace <slug>', 'receiving workspace')
76
- .option('--include-note <id>', 'retired: partial Note selection is rejected; streaming reviews the whole Project', (value, previous) => [...previous, value], [])
76
+ .option('--include-note <id>', 'retired: partial Memo selection is rejected; streaming reviews the whole Project', (value, previous) => [...previous, value], [])
77
77
  .option('--json', 'print complete preview and request (automatic when piped)')
78
78
  .action(async (project, options) => { process.exitCode = await runProjectTransferPreview(project, options); });
79
79
  withConnFlags(group.command('grant <project>'))
@@ -189,9 +189,9 @@ export async function runLegacyProjectMove(project, opts) {
189
189
  if (!opts.confirm || opts.dryRun || !ready) {
190
190
  emitProjectResult(review, () => [
191
191
  `${source}/${project} → ${destination}/${request.destinationName}: ${ready ? 'ready for review' : 'transfer unavailable'}`,
192
- `Whole Project + ${counts.note} Notes + ${counts.artifact} Artifacts + ${counts.env} Envs; all become private.`,
192
+ `Whole Project + ${counts.note} Memos + ${counts.artifact} Artifacts + ${counts.env} Envs; all become private.`,
193
193
  `External filings: ${preview.summary.retainedFilings} retained, ${preview.summary.detachedFilings} detached.`,
194
- `Only external Note filings can be retained; Artifact/Env attachments in other Projects always detach${preview.summary.detachedOtherFilings === undefined ? '.' : ` (${preview.summary.detachedOtherFilings} detached).`}`,
194
+ `Only external Memo filings can be retained; Artifact/Env attachments in other Projects always detach${preview.summary.detachedOtherFilings === undefined ? '.' : ` (${preview.summary.detachedOtherFilings} detached).`}`,
195
195
  `Preserve existing access: ${request.policy.preserveAccess ? 'requested; inspect exact server inventory in --json' : 'no'}.`,
196
196
  `Preview hash: ${preview.previewHash}; idempotency key: ${request.idempotencyKey}.`,
197
197
  ...preview.blockers.map(b => `${b.code}: ${b.action}`),
@@ -84,7 +84,7 @@ export async function runProjectStreamMove(project, opts) {
84
84
  if (opts.name)
85
85
  throw new Error('Streaming requires the unchanged root Project name');
86
86
  if ((opts.renameNote?.length ?? 0) > 1000)
87
- throw new Error('At most 1000 explicit Note ID/name mappings are supported');
87
+ throw new Error('At most 1000 explicit Memo ID/name mappings are supported');
88
88
  if (opts.wait && !opts.acceptIfOwner)
89
89
  throw new Error('--wait requires explicit --accept-if-authorized');
90
90
  const timeout = opts.waitTimeout ?? 30;
@@ -52,7 +52,7 @@ export function affiliationPath(resource, sessionId) {
52
52
  resource.id.length > 256 || /[\x00-\x1f\x7f]/.test(resource.id) || (resource.type === 'note' && !objectId.test(resource.id)) ||
53
53
  (resource.type === 'artifact' && (!/^[A-Za-z0-9._-]{1,128}$/.test(resource.id) || ['.', '..'].includes(resource.id))) ||
54
54
  (sessionId !== undefined && !objectId.test(sessionId)))
55
- throw new Error('Use an exact note/artifact and saved session ID');
55
+ throw new Error('Use an exact memo/artifact and saved session ID');
56
56
  return `/namespaces/${encodeURIComponent(resource.namespace)}/resources/${resource.type}/${encodeURIComponent(resource.id)}/sessions${sessionId ? '/' + sessionId : ''}`;
57
57
  }
58
58
  export function createAutoAffiliator(deps = {}) {
@@ -63,10 +63,10 @@ export function registerSessionAffiliations(group) {
63
63
  }
64
64
  };
65
65
  for (const operation of ['link', 'unlink']) {
66
- group.command(`${operation} <id>`).description(`${operation} a saved session and a note or artifact without opening a terminal`)
66
+ group.command(`${operation} <id>`).description(`${operation} a saved session and a memo or artifact without opening a terminal`)
67
67
  .option('--namespace <namespace>', 'session personal namespace')
68
- .requiredOption('--resource-namespace <namespace>', 'namespace containing the note or artifact')
69
- .option('--note <id>', 'exact note ID')
68
+ .requiredOption('--resource-namespace <namespace>', 'namespace containing the memo or artifact')
69
+ .option('--note <id>', 'exact memo ID')
70
70
  .option('--artifact <id>', 'exact artifact logical ID')
71
71
  .option('--json')
72
72
  .action((id, opts) => run(async () => {
@@ -78,7 +78,7 @@ export function registerSessionAffiliations(group) {
78
78
  return result;
79
79
  }, opts.json));
80
80
  }
81
- group.command('resources <id>').description('list readable notes and artifacts affiliated with a saved session')
81
+ group.command('resources <id>').description('list readable memos and artifacts affiliated with a saved session')
82
82
  .option('--namespace <namespace>', 'session personal namespace')
83
83
  .option('--cursor <cursor>', 'continue using the previous nextCursor')
84
84
  .option('--page-size <count>', 'bounded page size, 1–50')
@@ -63,7 +63,7 @@ export async function requestJson(connection, path, method = 'GET', body, gatewa
63
63
  const managedErrors = ['tmux_missing', 'codex_missing', 'claude_missing', 'config_unavailable', 'cwd_unavailable', 'ownership_unverified', 'pane_identity_changed',
64
64
  'runtime_changed', 'runtime_unavailable', 'runtime_output_invalid', 'direct_session_in_use', 'native_session_active'];
65
65
  const code = typeof data.error === 'string' && (/^(?:terminal|session|host)_[a-z_]{1,70}$/.test(data.error) || managedErrors.includes(data.error)) ? `: ${data.error}` : '';
66
- const guidance = data.error === 'terminal_access_denied' ? '; target discovery requires terminal authorization. To register metadata without a host, use sessions register; do not repeat a saved Note write or change enrollment credentials' : data.error === 'direct_session_in_use' ? '; close the existing direct connection before opening another' : data.error === 'native_session_active' ? '; continue in the existing Codex chat; use sessions reconnect only for an already-running managed terminal; do not retry automatically' : '';
66
+ const guidance = data.error === 'terminal_access_denied' ? '; target discovery requires terminal authorization. To register metadata without a host, use sessions register; do not repeat a saved Memo write or change enrollment credentials' : data.error === 'direct_session_in_use' ? '; close the existing direct connection before opening another' : data.error === 'native_session_active' ? '; continue in the existing Codex chat; use sessions reconnect only for an already-running managed terminal; do not retry automatically' : '';
67
67
  throw new Error(`Terminal request failed (HTTP ${response.status})${code}${guidance}`);
68
68
  }
69
69
  try {
@@ -157,7 +157,7 @@ export function registerSessionControl(group) {
157
157
  common(group.command('archive <id>').description('hide a session from default listings; conversation and links are kept')).action((id, opts) => guard(opts, async () => { const ns = await resolveHostNamespace(opts.namespace); emit({ session: await client().sessions(ns).archive(needId(id), true) }, !!opts.json); }));
158
158
  common(group.command('unarchive <id>').description('return an archived session to default listings')).action((id, opts) => guard(opts, async () => { const ns = await resolveHostNamespace(opts.namespace); emit({ session: await client().sessions(ns).archive(needId(id), false) }, !!opts.json); }));
159
159
  group.command('chat <message>').description('one turn with the built-in agent (the same harness the app uses); prints the streamed answer and tool receipts')
160
- .option('--conversation <id>', 'continue a conversation').option('--control', 'allow session control tools this turn').option('--notes-write', 'allow note appends this turn').option('--page <pathname>', 'page context pathname', '/').option('--json', 'emit one JSON event per line')
160
+ .option('--conversation <id>', 'continue a conversation').option('--control', 'allow session control tools this turn').option('--notes-write', 'allow memo appends this turn').option('--page <pathname>', 'page context pathname', '/').option('--json', 'emit one JSON event per line')
161
161
  .action((message, opts) => guard(opts, async () => {
162
162
  const dl = client();
163
163
  let conversation;
@@ -48,7 +48,7 @@ export function registerSessionsCommand(program) {
48
48
  .requiredOption('--provider <provider>', 'codex or claude').requiredOption('--session <uuid>', 'native conversation UUID')
49
49
  .requiredOption('--cwd <path>', 'original absolute working directory').option('--name <name>')
50
50
  .option('--visibility <visibility>', 'public (default for new sessions) or private')
51
- .option('--write-env <path>', 'write DREAMLAKE_TERMINAL_SESSION_ID and DREAMLAKE_SESSION_NAMESPACE (mode 600) so a shell that sources it links its note and artifact writes to this session')
51
+ .option('--write-env <path>', 'write DREAMLAKE_TERMINAL_SESSION_ID and DREAMLAKE_SESSION_NAMESPACE (mode 600) so a shell that sources it links its memo and artifact writes to this session')
52
52
  .option('--json')
53
53
  .action(opts => run(opts, async () => {
54
54
  if (!['codex', 'claude'].includes(opts.provider) || !/^[a-f0-9-]{36}$/i.test(opts.session) || !opts.cwd.startsWith('/') ||
@@ -81,7 +81,7 @@ export function registerSessionsCommand(program) {
81
81
  ` dreamlake sessions control restart ${cell(saved.id)} --permission workspace-write --raise${namespaceFlag}`,
82
82
  ` dreamlake sessions control send ${cell(saved.id)} "Summarize your state"${namespaceFlag}`,
83
83
  ` dreamlake sessions control status ${cell(saved.id)}${namespaceFlag}`,
84
- envFile ? `Env file written: ${cell(envFile)} — \`source\` it in another shell so its note and artifact writes link to this session.` : 'Note and artifact writes from this Claude Code session link to it automatically (CLAUDE_CODE_SESSION_ID).',
84
+ envFile ? `Env file written: ${cell(envFile)} — \`source\` it in another shell so its memo and artifact writes link to this session.` : 'Memo and artifact writes from this Claude Code session link to it automatically (CLAUDE_CODE_SESSION_ID).',
85
85
  ].join('\n'));
86
86
  }));
87
87
  common(group.command('visibility <id>')).requiredOption('--visibility <visibility>', 'public or private').option('--json')
package/dist/cli/share.js CHANGED
@@ -35,7 +35,7 @@ export async function runShare(kind, operation, ref, opts) {
35
35
  row = await requestJson(c.remote, `/notes/${encodeURIComponent(id)}`, { token });
36
36
  ns = row.namespaceSlug;
37
37
  if (!ns || (opts.namespace && opts.namespace !== ns)) {
38
- fail("note namespace missing or does not match --namespace");
38
+ fail("memo namespace missing or does not match --namespace");
39
39
  return 1;
40
40
  }
41
41
  }
@@ -118,8 +118,8 @@ export async function runShare(kind, operation, ref, opts) {
118
118
  export function registerShareCommands(parent, kind) {
119
119
  const share = parent.command("share").description("get and manage share links without changing content");
120
120
  for (const operation of ["get", "create", "revoke", ...(kind === "notes" ? ["access", "remove"] : [])]) {
121
- let cmd = share.command(operation).argument("<resource>", "resource id (Notes also accept a name or slug)")
122
- .description({ get: "inspect existing links without enabling sharing", create: "enable a share link (reuse an existing token)", revoke: "disable the share link", access: "list Note acceptance records (stored roles may lag)", remove: "remove one accepted Note grant", visibility: "set visibility" }[operation]);
121
+ let cmd = share.command(operation).argument("<resource>", "resource id (Memos also accept a name or slug)")
122
+ .description({ get: "inspect existing links without enabling sharing", create: "enable a share link (reuse an existing token)", revoke: "disable the share link", access: "list Memo acceptance records (stored roles may lag)", remove: "remove one accepted Memo grant", visibility: "set visibility" }[operation]);
123
123
  if (operation === "create" && kind === "notes")
124
124
  cmd.option("--role <role>", "read or write; applies to all link-derived access on subsequent requests", "read");
125
125
  if (operation === "revoke" && kind === "notes")
@@ -284,7 +284,7 @@ function action(operation) {
284
284
  export function registerTasksCommand(program) {
285
285
  const tasks = program
286
286
  .command("tasks")
287
- .description("Task folders, progress, events and linked Notes");
287
+ .description("Task folders, progress, events and linked Memos");
288
288
  common(tasks.command("add <path>").description("Create a task; parent must exist"))
289
289
  .requiredOption("--title <title>", "task title")
290
290
  .option("--blurb <text>", "short description")
@@ -354,12 +354,12 @@ export function registerTasksCommand(program) {
354
354
  .action(action("events-list"));
355
355
  const notes = tasks
356
356
  .command("notes")
357
- .description("Existing Note items attached to a task");
357
+ .description("Existing Memo items attached to a task");
358
358
  for (const op of ["add", "remove"])
359
359
  common(notes.command(`${op} <task>`))
360
360
  .requiredOption("--role <role>", "agent_prompt, comment, details, acceptance or another role")
361
- .requiredOption("--note-id <id>", "existing Note ID")
362
- .option("--section <anchor>", "existing Note section anchor")
361
+ .requiredOption("--note-id <id>", "existing Memo ID")
362
+ .option("--section <anchor>", "existing Memo section anchor")
363
363
  .action(action(`notes-${op}`));
364
364
  common(collectionList(notes, "list <task>")).action(action("notes-list"));
365
365
  }
@@ -69,7 +69,7 @@ export async function runUpdateBindr(name, opts) {
69
69
  token,
70
70
  json: { nodeId: node.id },
71
71
  });
72
- ok(`Tagged note '${node.name}' with bindr ${name} → ${res.memberCount ?? "?"} total members`);
72
+ ok(`Tagged memo '${node.name}' with bindr ${name} → ${res.memberCount ?? "?"} total members`);
73
73
  }
74
74
  catch (err) {
75
75
  fail(err.message);
@@ -258,12 +258,12 @@ export function registerUpdateCommand(program) {
258
258
  });
259
259
  update
260
260
  .command("bindr")
261
- .description("add/remove episodes (by glob), tag a note, or update metadata")
261
+ .description("add/remove episodes (by glob), tag a memo, or update metadata")
262
262
  .argument("<name>", "bindr name")
263
263
  .requiredOption("--project <target>", "project scope: space[@namespace]")
264
264
  .option("--add <glob>", "glob to add matching episodes")
265
265
  .option("--remove <glob>", "glob to remove matching episodes")
266
- .option("--add-note <note>", "tag a note filed in this project (ID, slug or title)")
266
+ .option("--add-note <note>", "tag a memo filed in this project (ID, slug or title)")
267
267
  .option("--description <text>", "update description")
268
268
  .option("--tags <list>", "replace tags (comma-separated)")
269
269
  .action(async (name, opts) => {
@@ -1 +1 @@
1
- export declare const VERSION = "0.104.5";
1
+ export declare const VERSION = "0.104.6";
@@ -6,4 +6,4 @@
6
6
  // value means a binary that re-installs the same version forever.
7
7
  //
8
8
  // Editing this by hand does nothing for a release; bump package.json.
9
- export const VERSION = "0.104.5";
9
+ export const VERSION = "0.104.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamlake/dreamlake-cli",
3
- "version": "0.104.5",
3
+ "version": "0.104.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dreamlake-ai/dreamlake-cli.git"
@@ -36,13 +36,13 @@
36
36
  "node": ">=18"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@dreamlake/dreamlake-cli-darwin-arm64": "0.104.5",
40
- "@dreamlake/dreamlake-cli-darwin-x64": "0.104.5",
41
- "@dreamlake/dreamlake-cli-linux-x64": "0.104.5",
42
- "@dreamlake/dreamlake-cli-linux-arm64": "0.104.5",
43
- "@dreamlake/dreamlake-cli-linux-x64-musl": "0.104.5",
44
- "@dreamlake/dreamlake-cli-linux-arm64-musl": "0.104.5",
45
- "@dreamlake/dreamlake-cli-win32-x64": "0.104.5",
46
- "@dreamlake/dreamlake-cli-win32-arm64": "0.104.5"
39
+ "@dreamlake/dreamlake-cli-darwin-arm64": "0.104.6",
40
+ "@dreamlake/dreamlake-cli-darwin-x64": "0.104.6",
41
+ "@dreamlake/dreamlake-cli-linux-x64": "0.104.6",
42
+ "@dreamlake/dreamlake-cli-linux-arm64": "0.104.6",
43
+ "@dreamlake/dreamlake-cli-linux-x64-musl": "0.104.6",
44
+ "@dreamlake/dreamlake-cli-linux-arm64-musl": "0.104.6",
45
+ "@dreamlake/dreamlake-cli-win32-x64": "0.104.6",
46
+ "@dreamlake/dreamlake-cli-win32-arm64": "0.104.6"
47
47
  }
48
48
  }