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/CHANGELOG.md +510 -0
- package/README.md +18 -7
- package/bareloop.context.md +456 -19
- package/package.json +3 -3
- package/src/authorflow.js +290 -49
- package/src/authoring.js +258 -46
- package/src/authorjob.js +390 -32
- package/src/authorscout.js +13 -1
- package/src/bridges.js +238 -11
- package/src/calibrate.js +597 -0
- package/src/cardauthor.js +479 -0
- package/src/clock.js +21 -3
- package/src/declaredclose.js +188 -13
- package/src/index.js +90 -7
- package/src/job.js +28 -9
- package/src/judged.js +765 -0
- package/src/kinds.js +578 -13
- package/src/ledger.js +24 -1
- package/src/planrun.js +517 -14
- package/src/ralph.js +9 -0
- package/src/reuse.js +514 -96
- package/src/reviewdoor.js +246 -0
- package/src/root.js +1 -1
- package/src/run.js +81 -8
- package/src/selection.js +23 -7
- package/types/authorflow.d.ts +233 -21
- package/types/authoring.d.ts +99 -39
- package/types/authorjob.d.ts +44 -6
- package/types/authorscout.d.ts +7 -1
- package/types/bridges.d.ts +95 -1
- package/types/calibrate.d.ts +191 -0
- package/types/cardauthor.d.ts +352 -0
- package/types/clock.d.ts +5 -2
- package/types/declaredclose.d.ts +93 -6
- package/types/index.d.ts +11 -7
- package/types/job.d.ts +22 -4
- package/types/judged.d.ts +280 -0
- package/types/kinds.d.ts +227 -8
- package/types/planrun.d.ts +73 -3
- package/types/reuse.d.ts +218 -3
- package/types/reviewdoor.d.ts +81 -0
- package/types/run.d.ts +60 -2
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/
|
|
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.
|