shadok-ai 0.14.9 → 0.14.10

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.
@@ -68,6 +68,14 @@ sentence is what siblings are shown in the `⟦ledger⟧` block pushed ahead of
68
68
  messages — the entity name alone cannot tell them what changed about it. Put the
69
69
  consequence first, details after.
70
70
 
71
+ **The label NAMES the topic; the note says what happened to it.** Keep the
72
+ entity under ~80 characters — `partner-page hospital logo`, not `13 August
73
+ Resources articles: C3 and A1 published, 11 drafts waiting on the daily go`.
74
+ The second is a note wearing a label's clothes, and the block that carries your
75
+ update to your siblings has room for about three rows: every character the label
76
+ spends is a row they are not told about. Nothing refuses a long label — the row
77
+ is saved either way — but only its first 80 characters reach that block.
78
+
71
79
  ## Is it a task, a fact, or a decision?
72
80
 
73
81
  A **task** has a lifecycle, so a status is the right thing to carry and closing
@@ -15,6 +15,7 @@ export interface LedgerCoreRow {
15
15
  }
16
16
  export type LedgerKind = "task" | "fact" | "decision";
17
17
  export const KINDS: LedgerKind[];
18
+ export const LABEL_MAX: number;
18
19
  export function normEntity(s: unknown): string;
19
20
  export function normKind(k: unknown): LedgerKind | null;
20
21
  export function rowKind(entry: unknown): LedgerKind;
@@ -42,6 +42,20 @@ export function resolveId(entries, idOrPrefix) {
42
42
 
43
43
  export const KINDS = ["task", "fact", "decision"];
44
44
 
45
+ /**
46
+ * How much of an entity LABEL is worth carrying, in characters. A label NAMES
47
+ * the topic; the note says what happened to it. The two drifted together once
48
+ * the pushed delta started carrying a headline: labels grew into sentences
49
+ * ("[modif] 13 articles Ressources d'août : C3 et A1 publiés, 11 brouillons…"),
50
+ * which is a note wearing a label's clothes — and on one instance that took the
51
+ * rendered row to a 156-character median, so a 9-row delta could name exactly
52
+ * one of them. Enforced on BOTH sides, because neither alone holds: the CLI
53
+ * warns at write time (it teaches, and the table keeps the full text), the block
54
+ * truncates at render time (it guarantees, whatever any agent writes). Never a
55
+ * refusal — a refused write is a lost fact.
56
+ */
57
+ export const LABEL_MAX = 80;
58
+
45
59
  /** The status a kind with NO lifecycle gets when none is given, so an agent is
46
60
  * never pushed into inventing a word for a thing that has no phases. Keeping
47
61
  * `status` always present is what leaves every existing reader — the pushed
@@ -10,7 +10,7 @@ import fs from "node:fs";
10
10
  import os from "node:os";
11
11
  import path from "node:path";
12
12
  import crypto from "node:crypto";
13
- import { upsertEntry, searchEntries, ageDays, resolveId, normEntity, rowKind, KINDS } from "./ledger-core.mjs";
13
+ import { upsertEntry, searchEntries, ageDays, resolveId, normEntity, rowKind, KINDS, LABEL_MAX } from "./ledger-core.mjs";
14
14
 
15
15
  const FILE =
16
16
  (process.env.SHADOK_LEDGER_FILE || "").trim() ||
@@ -144,6 +144,16 @@ if (cmd === "check") {
144
144
  const row = byId ? resolveId(rows, f.id) : rows.find((r) => normEntity(r.entity) === normEntity(f.entity));
145
145
  const k = rowKind(row);
146
146
  console.log(`recorded: ${row.entity} — ${row.status}${k === "task" ? "" : ` · ${k}`} [${row.id}]`);
147
+ // Say it, don't enforce it: the row is already saved (a refused write is a
148
+ // lost fact) and the full label stays in the table. But the delta pushed to
149
+ // siblings only carries the first LABEL_MAX characters of it, and a label
150
+ // that grew into a sentence is what makes a 9-row delta name one row.
151
+ if (row.entity.length > LABEL_MAX) {
152
+ console.log(
153
+ `note: that label is ${row.entity.length} characters — a label NAMES the topic, the note says what happened. ` +
154
+ `Only the first ${LABEL_MAX} reach the ⟦ledger⟧ block your siblings are pushed.`,
155
+ );
156
+ }
147
157
  } else if (cmd === "list") {
148
158
  const rows = searchEntries(load(), "").strong;
149
159
  console.log(rows.length ? rows.map((e) => fmt(e, now)).join("\n") : "(ledger empty)");
package/dist/ledger.d.ts CHANGED
@@ -67,10 +67,17 @@ export declare function deltaSince(rows: LedgerRow[], watermark: number, cap: nu
67
67
  export declare function headline(note: string | undefined, max?: number): string;
68
68
  /**
69
69
  * The delta block the agent sees ahead of a prompt. English (it is written into
70
- * the transcript — repo side). ONE line, within `BLOCK_MAX` (see above): per row
71
- * `• [id] entity — status (source)`, the kind when it is not the default `task`,
72
- * and `↳ <headline>` for what actually happened. Rows that do not fit the budget
73
- * become the overflow pointer rather than a second line.
70
+ * the transcript — repo side). ONE line: per row `• [id] entity — status
71
+ * (source)`, the kind when it is not the default `task`, and `↳ <headline>` for
72
+ * what actually happened.
73
+ *
74
+ * Labels are served BEFORE any headline, and that order is the whole of it. The
75
+ * first version appended row i's headline before testing whether row i+1 fitted,
76
+ * so the first row's detail outbid the second row's existence — measured on this
77
+ * table, a delta of 2, 5, 7 or 9 rows named exactly ONE of them every time, at
78
+ * any size, while 52 characters of the budget went unspent. `ledger list` gives
79
+ * the reader the notes in one call; nothing gives them back a row they were
80
+ * never told existed.
74
81
  */
75
82
  export declare function formatLedgerBlock(rows: LedgerRow[], total: number): string;
76
83
  /** Prepend the block as its own leading line. Idempotent.
package/dist/ledger.js CHANGED
@@ -2,7 +2,7 @@ import fs from "node:fs";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
4
  import crypto from "node:crypto";
5
- import { rowKind } from "../context/ledger-skill/ledger-core.mjs";
5
+ import { rowKind, LABEL_MAX } from "../context/ledger-skill/ledger-core.mjs";
6
6
  /** The per-instance ledger file, keyed by the launch dir (same encoding as
7
7
  * channels/crons). Distinct launch dirs → distinct ledgers. */
8
8
  export function ledgerFileFor(cwd) {
@@ -106,28 +106,68 @@ const LEDGER_HEAD = "⟦ledger · ";
106
106
  * lines 1–3 → 0 of 324 wrapped chars 430 on one line → not wrapped
107
107
  * lines 4+ → ~30% of 162 wrapped chars 910 on one line → wrapped
108
108
  *
109
- * A prompt is `⟦web⟧ header` + the message, so a one-line human message leaves
110
- * the block exactly one line of room. The old multi-line block spent 2+ and put
111
- * EVERY non-empty delta over the cliff: 85 real prompts, 24% of those carrying a
112
- * block, had the human's message neutralised this way. Hence: one line, and a
113
- * character budget inside it.
109
+ * The old multi-line block spent 2+ lines and put EVERY non-empty delta over
110
+ * the cliff: 85 real prompts, 24% of those carrying a block, had the human's
111
+ * message neutralised this way.
112
+ *
113
+ * Since #261 the block travels as its OWN paste, so it is judged ALONE — and
114
+ * the rule it is judged by is the binary's own, read out of it rather than
115
+ * bisected: `body.length <= 800 && newlines <= 2` (`var xK=800`). Two things
116
+ * follow, and they move the budget.
117
+ *
118
+ * - The cliff for the block is 800, not the 430 measured when it still had
119
+ * to share a prompt with the user's message. That measurement was of the
120
+ * WHOLE prompt and does not bound this paste.
121
+ * - Two newlines means the prelude may carry a SECOND line. The delta keeps
122
+ * one and leaves the other free; nothing here should spend it by accident.
123
+ *
124
+ * So the block stays one line out of thrift and headroom, no longer out of
125
+ * correctness — and its budget is now set by what the reader needs (see
126
+ * `ROWS_TARGET`) rather than by how little it dares to spend.
114
127
  * ------------------------------------------------------------------ */
115
128
  /** Marks what follows the row, inline: "and here is what happened". */
116
129
  const CONT_MARK = "↳";
117
130
  /** Historical multi-line blocks, still replayed out of old transcripts. */
118
131
  const CONT_LINE = /^\s*↳ /;
119
- /** How much of a note reaches the block. */
120
- const HEADLINE_MAX = 120;
132
+ /**
133
+ * How much of a note reaches the block. 120 cut the first sentence of a real
134
+ * `decision` row at 126 characters — "aucune action directe déclenchée par…",
135
+ * whose missing complement ("par un mail") carried the whole decision, so what
136
+ * was left could be read as its opposite. 19% of this table's notes were cut at
137
+ * 120, 13% at 160. It stops at 160 rather than going further because a headline
138
+ * is only ever served WHOLE (see `formatLedgerBlock`): a larger cap does not buy
139
+ * better headlines, it buys fewer of them — the long ones stop fitting the room
140
+ * left after the labels and are dropped entirely.
141
+ */
142
+ const HEADLINE_MAX = 160;
121
143
  /** Below this, a sentence boundary is not believed — see `headline`. */
122
144
  const HEADLINE_MIN = 24;
123
145
  /**
124
- * The whole block's character ceiling. Chosen from the measurement above with
125
- * room left for the ⟦web⟧ header and an ordinary message: a long enough single
126
- * line collapses into a paste just as a fourth line does, so the budget is what
127
- * keeps the one-line rule from being defeated by content. Rows that do not fit
128
- * collapse into the overflow pointer, which is what it has always been for.
146
+ * How many rows the block tries to NAME. This, not a character count, is what
147
+ * the reader needs ("there are nine, here is who they are"), and it is the one
148
+ * quantity that does not change from one instance's table to another's: the
149
+ * character cost of three rows does, which is why the budget is expressed in
150
+ * rows and only BOUNDED in characters. A table whose labels are short pays less
151
+ * for the same information; one whose labels are long pays more, up to the
152
+ * ceiling — the cost adapts, the payload stays constant.
153
+ */
154
+ const ROWS_TARGET = 3;
155
+ /**
156
+ * The block's character bound. Claude Code keeps a paste inline only below 800
157
+ * characters AND 2 newlines (`xK` in the binary; the prelude is the block plus
158
+ * one newline), and since the block travels as its OWN paste it is judged alone
159
+ * — so the old 320, calibrated when it had to share a prompt with the user's
160
+ * message, is no longer where the cliff is. 560 leaves the second line of the
161
+ * paste free and a wide margin under 800.
162
+ */
163
+ const BLOCK_MAX = 560;
164
+ /**
165
+ * Hard stop for the rendered line, defensive only: one pathological row must not
166
+ * be able to push the block past the paste rule, which would collapse it into
167
+ * `<pasted_content>` — survivable since #261 (the block is wrapped alone and the
168
+ * message stays an instruction) but it would still cost the delta its voice.
129
169
  */
130
- const BLOCK_MAX = 320;
170
+ const LINE_CEILING = 700;
131
171
  /**
132
172
  * The one line of the note that says WHAT happened, DERIVED rather than asked
133
173
  * for. The block used to carry `[id] entity — status` and nothing else, so the
@@ -163,40 +203,87 @@ export function headline(note, max = HEADLINE_MAX) {
163
203
  // Break on a word unless that would throw away most of the line.
164
204
  return (sp > max * 0.6 ? cut.slice(0, sp) : cut).trimEnd() + "…";
165
205
  }
206
+ /** `• [id] entity — status (source)` — the part of a row the reader cannot
207
+ * reconstruct from anywhere else. The label is capped at render time, never in
208
+ * the table: `check` and `list` still print it whole, and the `[id]` stays the
209
+ * handle to quote (see `LABEL_MAX`). */
210
+ function bareRow(r) {
211
+ const handle = r.id ? `[${r.id}] ` : "";
212
+ const src = r.source ? ` (${r.source})` : "";
213
+ // A `fact` has no lifecycle and a `decision` is not a phase of one, so the
214
+ // reader must not take their status for a position in open → resolved.
215
+ // `task` is the default and nearly the whole table: tagging it would be noise.
216
+ const kind = rowKind(r);
217
+ const tag = kind === "task" ? "" : ` · ${kind}`;
218
+ const label = r.entity.length > LABEL_MAX ? r.entity.slice(0, LABEL_MAX - 1).trimEnd() + "…" : r.entity;
219
+ return ` • ${handle}${label} — ${r.status}${tag}${src}`;
220
+ }
221
+ /**
222
+ * What stands for the rows the budget could not name. It carries their IDS: an
223
+ * id is the handle `record --id` takes and `check` resolves, so a reader that
224
+ * recognises one can act on it, while `+8 more` leaves it with all of them or
225
+ * none. The count and the list are kept HONEST apart, because the delta is
226
+ * capped (`LEDGER_PUSH_CAP`) and `total` can exceed the rows we were handed —
227
+ * announcing `+8 : <7 ids>` would quietly lose one.
228
+ */
229
+ function overflowMark(rows, shown, total) {
230
+ const missing = total - shown;
231
+ if (missing <= 0)
232
+ return "";
233
+ const ids = rows.slice(shown).map((r) => r.id).filter(Boolean);
234
+ const tail = " — run: ledger list)";
235
+ if (!ids.length)
236
+ return ` • (+${missing} more${tail}`;
237
+ if (ids.length === missing)
238
+ return ` • (+${missing} : ${ids.join(" ")}${tail}`;
239
+ return ` • (+${missing} more, ${ids.length} newest: ${ids.join(" ")}${tail}`;
240
+ }
166
241
  /**
167
242
  * The delta block the agent sees ahead of a prompt. English (it is written into
168
- * the transcript — repo side). ONE line, within `BLOCK_MAX` (see above): per row
169
- * `• [id] entity — status (source)`, the kind when it is not the default `task`,
170
- * and `↳ <headline>` for what actually happened. Rows that do not fit the budget
171
- * become the overflow pointer rather than a second line.
243
+ * the transcript — repo side). ONE line: per row `• [id] entity — status
244
+ * (source)`, the kind when it is not the default `task`, and `↳ <headline>` for
245
+ * what actually happened.
246
+ *
247
+ * Labels are served BEFORE any headline, and that order is the whole of it. The
248
+ * first version appended row i's headline before testing whether row i+1 fitted,
249
+ * so the first row's detail outbid the second row's existence — measured on this
250
+ * table, a delta of 2, 5, 7 or 9 rows named exactly ONE of them every time, at
251
+ * any size, while 52 characters of the budget went unspent. `ledger list` gives
252
+ * the reader the notes in one call; nothing gives them back a row they were
253
+ * never told existed.
172
254
  */
173
255
  export function formatLedgerBlock(rows, total) {
174
- let line = `${LEDGER_HEAD}${total} update${total === 1 ? "" : "s"}⟧`;
256
+ const head = `${LEDGER_HEAD}${total} update${total === 1 ? "" : "s"}⟧`;
257
+ const bare = rows.map(bareRow);
258
+ // 1. How many rows can be named — the overflow mark is part of the bill, so a
259
+ // row is only taken when what stands for the rest still fits beside it.
175
260
  let shown = 0;
176
- for (const r of rows) {
177
- const handle = r.id ? `[${r.id}] ` : "";
178
- const src = r.source ? ` (${r.source})` : "";
179
- // A `fact` has no lifecycle and a `decision` is not a phase of one, so the
180
- // reader must not take their status for a position in open → resolved.
181
- // `task` is the default and nearly the whole table: tagging it would be noise.
182
- const kind = rowKind(r);
183
- const tag = kind === "task" ? "" : ` · ${kind}`;
184
- const bare = ` • ${handle}${r.entity} — ${r.status}${tag}${src}`;
185
- // Always carry at least one row: an empty block would say a delta arrived
186
- // and name nothing, which is worse than a long line.
187
- if (shown > 0 && line.length + bare.length > BLOCK_MAX)
261
+ let len = head.length;
262
+ for (let i = 0; i < bare.length && shown < ROWS_TARGET; i++) {
263
+ const mark = overflowMark(rows, i + 1, total).length;
264
+ // Always carry at least one row: a block that announces a delta and names
265
+ // nothing is worse than a long line.
266
+ if (shown > 0 && len + bare[i].length + mark > BLOCK_MAX)
188
267
  break;
189
- line += bare;
268
+ len += bare[i].length;
190
269
  shown++;
191
- const h = headline(r.note);
192
- if (h && line.length + h.length + 3 <= BLOCK_MAX)
270
+ }
271
+ const mark = overflowMark(rows, shown, total);
272
+ // 2. Headlines go in the room that is left, first row first — and only WHOLE:
273
+ // a sentence cut by whatever happened to remain is the defect HEADLINE_MAX
274
+ // already exists to bound, and it can invert the meaning it loses.
275
+ let line = head;
276
+ let used = len + mark.length;
277
+ for (let i = 0; i < shown; i++) {
278
+ line += bare[i];
279
+ const h = headline(rows[i].note);
280
+ if (h && used + h.length + 3 <= BLOCK_MAX) {
193
281
  line += ` ${CONT_MARK} ${h}`;
282
+ used += h.length + 3;
283
+ }
194
284
  }
195
- if (shown < total)
196
- line += ` • (+${total - shown} more — run: ledger list)`;
197
- // Defensive: one oversized entity must not be able to defeat the one-line rule
198
- // by length, which costs exactly as much as a second line would.
199
- return line.length > BLOCK_MAX * 2 ? line.slice(0, BLOCK_MAX * 2 - 1) + "…" : line;
285
+ line += mark;
286
+ return line.length > LINE_CEILING ? line.slice(0, LINE_CEILING - 1) + "…" : line;
200
287
  }
201
288
  /** Prepend the block as its own leading line. Idempotent.
202
289
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ledger.js","sourceRoot":"","sources":["../src/ledger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAmClE;gEACgE;AAChE,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC;AACxE,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,C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,EAAE,CAAC,CAAC,EAAE;YACxF,IAAI,EAAE,KAAK;SACZ,CAAC,CAAC;QACH,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,6CAA6C;IAC/C,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.14.9",
3
+ "version": "0.14.10",
4
4
  "main": "dist/session.js",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test test/*.ts context/*/test/*.test.mjs",