@creator-notes/cnotes 0.149.0 → 0.149.1

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creator-notes-cli",
3
- "version": "0.149.0",
3
+ "version": "0.149.1",
4
4
  "description": "CreatorNotes CLI: create notes, build canvases, search knowledge from the terminal",
5
5
  "author": {
6
6
  "name": "CreatorNotes",
@@ -295,9 +295,10 @@ function arrangeShortfall(data) {
295
295
  const nothing = items.length > 0 && failed.length === items.length;
296
296
  return {
297
297
  nothing,
298
- partial: !nothing && (failed.length > 0 || rippleError !== undefined),
298
+ partial: !nothing && (failed.length > 0 || rippleError !== undefined || keepError !== undefined),
299
299
  failed,
300
300
  total: items.length,
301
+ section: typeof data.targetSectionDisplayId === "string" ? data.targetSectionDisplayId : "the section",
301
302
  ...(rippleError !== undefined ? { rippleError } : {}),
302
303
  ...(keepError !== undefined ? { keepError } : {}),
303
304
  };
@@ -312,6 +313,9 @@ function arrangePartialSummary(shortfall) {
312
313
  parts.push(`${shortfall.failed.length} of ${shortfall.total} items were refused`);
313
314
  if (shortfall.rippleError !== undefined)
314
315
  parts.push(`the band below was not pushed down (${shortfall.rippleError})`);
316
+ if (shortfall.keepError !== undefined) {
317
+ parts.push(`${shortfall.section} could not keep itself arranged (${shortfall.keepError}), so it will not re-lay itself as cards change`);
318
+ }
315
319
  return parts.join(", and ");
316
320
  }
317
321
  /** Set arrange's exit code and print its shortfall on stderr, in the output mode in use. */
@@ -319,11 +323,6 @@ function reportArrangeShortfall(data, json) {
319
323
  const shortfall = arrangeShortfall(data);
320
324
  if (!shortfall)
321
325
  return;
322
- if (shortfall.keepError !== undefined) {
323
- const section = String(data.targetSectionDisplayId ?? "The section");
324
- console.error(`⚠ ${section} could not keep itself arranged: ${shortfall.keepError}. ` +
325
- "The layout landed, but the frame will not re-lay itself as cards change.");
326
- }
327
326
  if (shortfall.nothing) {
328
327
  process.exitCode = EXIT_CODES.GENERIC;
329
328
  if (json) {
@@ -348,6 +347,7 @@ function reportArrangeShortfall(data, json) {
348
347
  exitCode: EXIT_CODES.VALIDATION,
349
348
  ...(shortfall.failed.length > 0 ? { failed: shortfall.failed } : {}),
350
349
  ...(shortfall.rippleError !== undefined ? { rippleError: shortfall.rippleError } : {}),
350
+ ...(shortfall.keepError !== undefined ? { keepError: shortfall.keepError } : {}),
351
351
  hint: ARRANGE_PARTIAL_HINT,
352
352
  }));
353
353
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creator-notes/cnotes",
3
- "version": "0.149.0",
3
+ "version": "0.149.1",
4
4
  "description": "CLI for CreatorNotes — create notes, build canvases, search knowledge from the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -7,7 +7,7 @@ The one contract every command follows is in the core skill (the flag table and
7
7
  - `notes list`, `notes get` and `notes search` emit a bare array, so one note is `.[0]`. `notes get --expand` is the exception: an object `{ notes, linked, truncated, cap, omitted, notice }` (notes.md).
8
8
  - `notes create` returns `{ results, relationshipsCreated, rubrics?, hints? }`; read new notes from `results`. Each row carries `type`, `url`, and `quality` where the workspace grades on save; each used type's rubric is in `rubrics`, once.
9
9
  - `canvas create` returns `{ canvas: { id, displayId, url } }` with `id`, `displayId` and `url` mirrored at the top level; after `create --spec` the placement is under `layout`, and `displayId` can still be null until `canvas get` reads it.
10
- - `canvas place` returns `{ items, edges, bbox, successCount, notes?, arrangedSections? }`. It is best-effort, not transactional (HTTP 207): exit `3` means some items or edges were refused and the rest landed; stderr's `PlacePartial` error lists each under `failed` / `failedEdges`. `canvas create --spec` and `canvas bulk-add` (`BulkAddPartial`) exit the same way. `canvas arrange` exits `1` (`ArrangeFailed`) when no card moved and `3` (`ArrangePartial`) when the cards moved but the frame did not resize or the band below did not shift (`rippleError`); an arrange is safe to re-run. A section that could not keep itself arranged afterwards is a `⚠` line on stderr, exit `0`. A `quote` item adds `quoteNoteDisplayId`, `noteDisplayId`, `versionNumber` and `placed`.
10
+ - `canvas place` returns `{ items, edges, bbox, successCount, notes?, arrangedSections? }`. It is best-effort, not transactional (HTTP 207): exit `3` means some items or edges were refused and the rest landed; stderr's `PlacePartial` error lists each under `failed` / `failedEdges`. `canvas create --spec` and `canvas bulk-add` (`BulkAddPartial`) exit the same way. `canvas arrange` exits `1` (`ArrangeFailed`) when no card moved and `3` (`ArrangePartial`) when the cards moved but the frame did not resize, the band below did not shift (`rippleError`) or the section could not keep itself arranged (`keepError`); an arrange is safe to re-run. A `quote` item adds `quoteNoteDisplayId`, `noteDisplayId`, `versionNumber` and `placed`.
11
11
  - A note body comes back under `markdown` from `canvas read` and under `content` from `notes get --json`; read the key for the command you ran. A `canvas read` whose JSON starts with `level: "cards"` or `"frames"` is a map of a long board: each frame lists its cards under `lines`, with no bodies; `next` names the commands that open a frame, chosen notes or (`--full`) every body. `notes get --content-only` prints the raw markdown with no envelope, the right read for a transcript.
12
12
 
13
13
  ## Errors and notices go to stderr