@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
@@ -160,7 +160,7 @@ export function insertAtElement(source, css, text, position) {
160
160
  /** The note to act on. `--note` per the documented CLI shape. */
161
161
  function requireNote(opts) {
162
162
  if (!opts.note) {
163
- fail("say which note: --note <id-or-slug>");
163
+ fail("say which memo: --note <id-or-slug>");
164
164
  return null;
165
165
  }
166
166
  return opts.note;
@@ -250,7 +250,7 @@ async function mutate(opts, apply) {
250
250
  if (!ref)
251
251
  return 1;
252
252
  if (opts.ifMatch?.replace(/^W\//, '').replace(/^"|"$/g, '').startsWith('rtc:')) {
253
- fail('This legacy edit requires the quoted ETag from notes read --legacy --json, not an rtc: revision. Preserve the draft and read the legacy baseline, or use notes patch --base-revision for a modern merge edit.');
253
+ fail('This legacy edit requires the quoted ETag from memos read --legacy --json, not an rtc: revision. Preserve the draft and read the legacy baseline, or use memos patch --base-revision for a modern merge edit.');
254
254
  return 1;
255
255
  }
256
256
  const c = await ctx(opts);
@@ -502,7 +502,7 @@ export async function runNotesInsert(noteOrOpts, maybeOpts) {
502
502
  let opts = typeof noteOrOpts === "object" && noteOrOpts !== null ? noteOrOpts : (maybeOpts ?? {});
503
503
  if (typeof noteOrOpts === "string") {
504
504
  if (opts.note !== undefined && opts.note !== noteOrOpts) {
505
- fail(`two notes given: '${noteOrOpts}' and --note '${opts.note}' — give one`);
505
+ fail(`two memos given: '${noteOrOpts}' and --note '${opts.note}' — give one`);
506
506
  return 1;
507
507
  }
508
508
  opts = { ...opts, note: noteOrOpts };
@@ -734,15 +734,15 @@ export async function runNotesGrep(query, opts) {
734
734
  // because a bounded answer that looks complete is how "replace them all"
735
735
  // quietly replaces some of them.
736
736
  if (!hits.length)
737
- process.stderr.write(`no matches in ${notesSearched} notes\n`);
737
+ process.stderr.write(`no matches in ${notesSearched} memos\n`);
738
738
  if (truncated) {
739
- process.stderr.write("note: a note held more matches than were returned — narrow the query\n");
739
+ process.stderr.write("note: a memo held more matches than were returned — narrow the query\n");
740
740
  }
741
741
  if (partial.size) {
742
- process.stderr.write(`note: ${partial.size} note(s) too large to index in full; their tails were not searched\n`);
742
+ process.stderr.write(`note: ${partial.size} memo(s) too large to index in full; their tails were not searched\n`);
743
743
  }
744
744
  if (stale) {
745
- process.stderr.write(`note: ${stale} open note(s) could not be flushed first; their newest edits are missing\n`);
745
+ process.stderr.write(`note: ${stale} open memo(s) could not be flushed first; their newest edits are missing\n`);
746
746
  }
747
747
  return 0;
748
748
  }
@@ -29,7 +29,7 @@ function filesBase(c, id) {
29
29
  /** Resolve the note every file command needs. */
30
30
  async function target(opts) {
31
31
  if (!opts.note) {
32
- fail("say which note: --note <id-or-slug>");
32
+ fail("say which memo: --note <id-or-slug>");
33
33
  return null;
34
34
  }
35
35
  const c = await ctx(opts);
@@ -56,7 +56,7 @@ function reportFile(err, recovery) {
56
56
  }
57
57
  catch { }
58
58
  if (operationId)
59
- process.stderr.write(`operation ${operationId} — inspect with notes files status ${operationId} --note ${recovery.note}${recovery.namespace ? ` --namespace ${JSON.stringify(recovery.namespace)}` : ""}\n`);
59
+ process.stderr.write(`operation ${operationId} — inspect with memos files status ${operationId} --note ${recovery.note}${recovery.namespace ? ` --namespace ${JSON.stringify(recovery.namespace)}` : ""}\n`);
60
60
  process.stderr.write("Do not resend attachment bytes after an uncertain result; inspect the original operation first.\n");
61
61
  }
62
62
  const status = err?.status;
@@ -301,7 +301,7 @@ export async function runFilesCat(ref, opts) {
301
301
  // Refused here rather than at the server, so the reason names the local
302
302
  // alternative instead of an HTTP status.
303
303
  fail(`${row.path} is ${row.contentType}; printing it as text would corrupt it — ` +
304
- "use 'notes files download' instead");
304
+ "use 'memos files download' instead");
305
305
  return EXIT_NO_FILE;
306
306
  }
307
307
  const res = await requestJson(t.c.remote, `${filesBase(t.c, t.id)}/${seg(row.id)}/text`, { token: t.c.token });
@@ -454,7 +454,7 @@ export async function runFilesRm(ref, opts) {
454
454
  return emitJson(res), 0;
455
455
  process.stdout.write(res.purged
456
456
  ? `✓ purged ${row.path} — the bytes are gone\n`
457
- : `✓ trashed ${row.path} — restore with 'notes files restore ${row.id}'\n`);
457
+ : `✓ trashed ${row.path} — restore with 'memos files restore ${row.id}'\n`);
458
458
  return 0;
459
459
  }
460
460
  catch (e) {
@@ -495,7 +495,7 @@ export async function resolveFile(c, noteId, ref, opts = {}) {
495
495
  catch (error) {
496
496
  if (error.status !== 404)
497
497
  throw error;
498
- fail(/^[a-f0-9]{24}$/i.test(ref) ? `no file with id ${ref}` : `no file at '${ref}' — 'notes files list --note …' shows what is there`);
498
+ fail(/^[a-f0-9]{24}$/i.test(ref) ? `no file with id ${ref}` : `no file at '${ref}' — 'memos files list --note …' shows what is there`);
499
499
  return null;
500
500
  }
501
501
  }
@@ -534,7 +534,7 @@ export async function runFilesPreview(ref, opts) {
534
534
  // said rather than left to be discovered by sending the wrong one.
535
535
  process.stderr.write(res.kind === "shared"
536
536
  ? "shared link — opens without signing in, until you revoke it\n"
537
- : "session link — whoever opens it must be signed in and able to read the note\n");
537
+ : "session link — whoever opens it must be signed in and able to read the memo\n");
538
538
  if (opts.open) {
539
539
  const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
540
540
  const { spawn } = await import("node:child_process");
@@ -17,7 +17,7 @@ function attributeValue(value) {
17
17
  export function validateHtmlSnapshot(html, note, scope = {}) {
18
18
  const root = /^<!doctype html>\s*<html\b([^>]*)>/i.exec(html);
19
19
  if (!root || !/<\/html>\s*$/i.test(html))
20
- throw new Error("server did not return a complete Notes HTML snapshot");
20
+ throw new Error("server did not return a complete Memos HTML snapshot");
21
21
  const attributes = new Map();
22
22
  const pattern = /\s+([a-zA-Z][a-zA-Z0-9-]*)="([^"]*)"/g;
23
23
  let end = 0;
@@ -37,7 +37,7 @@ export function validateHtmlSnapshot(html, note, scope = {}) {
37
37
  || !/^sha256:[a-f0-9]{64}$/.test(hash ?? "") || source === undefined
38
38
  || attributes.get("data-offset-unit") !== "unicode-code-point"
39
39
  || !["markdown", "html"].includes(attributes.get("data-source-type") ?? "")) {
40
- throw new Error("server did not return the Notes HTML metadata contract; upgrade the server");
40
+ throw new Error("server did not return the Memos HTML metadata contract; upgrade the server");
41
41
  }
42
42
  const returnedScope = attributes.get("data-scope");
43
43
  let sourceHash = hash;
@@ -78,7 +78,7 @@ export function annotatedMarkdown(html) {
78
78
  const attrs = (raw) => new Map(Array.from(raw.matchAll(/\s+([a-zA-Z][a-zA-Z0-9-]*)="([^"]*)"/g), m => [m[1], attributeValue(m[2])]));
79
79
  const root = attrs(/^<!doctype html>\s*<html\b([^>]*)>/i.exec(html)[1]);
80
80
  if (root.get('data-source-type') !== 'markdown')
81
- throw new Error('annotated Markdown requires a Markdown note; use --view html for HTML source');
81
+ throw new Error('annotated Markdown requires a Markdown memo; use --view html for HTML source');
82
82
  const source = root.get('data-source');
83
83
  const origin = Number(root.get('data-source-start') ?? 0);
84
84
  const points = Array.from(source);