bareloop 0.10.0 → 0.12.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/src/ledger.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // The upstream ledger (module 4) — reactive lib/primitive incident monitoring.
2
- // Design record: docs/plans/2026-07-11-upstream-ledger-design.md (adaptlearn
2
+ // Design record: docs/02-features/2026-07-11-upstream-ledger-design.md (adaptlearn
3
3
  // POC'd spec) + its 2026-07-13 addendum: the bareloop event mapping. One
4
4
  // append-only JSONL both the consumer (the panel, N6) and the maintainer read;
5
5
  // the A1/A2/A3 upstream-ask flow, mechanized — evidence in, human judgment out.
@@ -22,6 +22,7 @@
22
22
  import { readFileSync, appendFileSync, existsSync } from 'node:fs';
23
23
  import { basename } from 'node:path';
24
24
  import { createHash } from 'node:crypto';
25
+ import { HITL_PAUSE, HITL_DECISION_RED } from './declaredclose.js';
25
26
 
26
27
  /** severity order, worst-first (the fold's display order; frequency ranks within) */
27
28
  export const LEDGER_CLASSES = Object.freeze([
@@ -82,6 +83,28 @@ const EXCLUDED_ESCALATIONS = new Set([
82
83
  'gate-red',
83
84
  'smoke-red', // already counted via primitive-smoke
84
85
  'hitl-close', // by design: a human is the close
86
+ // N4 slice 1 — the hitl class's own terminals, and each is here for its own
87
+ // reason rather than by family resemblance. `hitl-pause` is a CHECKPOINT (the
88
+ // cap-halt story with a person instead of a budget: the run stopped because it
89
+ // reached the one stage a machine cannot render). `hitl-decision-red` is an
90
+ // honest refusal of the OPERATOR's own input, exactly like `close-unsupported`
91
+ // below, and the one direction that would be wrong is filing either of them as
92
+ // a capability gap against a library that did nothing.
93
+ //
94
+ // MINTED, never borrowed: the legacy `hitl-close` above is the deleted path's
95
+ // close TYPE and keeps its own meaning. Reusing that name would have made two
96
+ // different facts one number (the `step-stalled` lesson).
97
+ HITL_PAUSE,
98
+ HITL_DECISION_RED,
99
+ // LEGACY, read-only, and a bare STRING on purpose (the `gate-red` precedent
100
+ // above): `hitl-cancel` was the third door's terminal until 2026-08-17, when
101
+ // cancel was deleted in favour of a pause that can resume. Nothing in this tree
102
+ // mints it any more — there is no constant left to import — but this set is the
103
+ // EXECUTABLE excluded-set, and dropping a name does not delete the category: it
104
+ // re-files any spine that still CARRIES one as a counted capability gap against
105
+ // a library that did nothing. A reader must keep recognising what a writer can
106
+ // no longer write.
107
+ 'hitl-cancel',
85
108
  'close-unsupported', // honest refusal, by design
86
109
  // Close authoring (M4, D13) — the interview refusing a job we cannot close: a
87
110
  // genre we do not run, a job with no seed to measure against, a locked kind.