bareloop 0.43.0 → 0.45.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 +60 -0
- package/bareloop.context.md +53 -13
- package/package.json +2 -2
- package/src/authorflow.js +27 -12
- package/src/authoring.js +1 -1
- package/src/authorjob.js +52 -16
- package/src/authorreadout.js +12 -6
- package/src/authorrun.js +8 -2
- package/src/declaredclose.js +4 -1
- package/src/draftspend.js +20 -2
- package/src/facts.js +54 -9
- package/src/factwords.js +58 -6
- package/src/fitcheck.js +166 -0
- package/src/inputlook.js +38 -3
- package/src/job.js +1 -1
- package/src/kinds.js +5 -0
- package/src/pagedropwords.js +110 -0
- package/src/pagedry.js +125 -0
- package/src/pagemap.js +269 -0
- package/src/pagerules.js +318 -0
- package/src/panel/authorroutes.js +34 -30
- package/src/panel/authorsession.js +66 -11
- package/src/panel/index.html +469 -65
- package/src/panel/jobplan.js +14 -7
- package/src/panel/runroutes.js +46 -22
- package/src/panel/server.js +792 -28
- package/src/panel/status.js +33 -0
- package/src/panelmoney.js +29 -0
- package/src/planrun.js +53 -4
- package/src/promptregisters.js +8 -0
- package/src/replay.js +118 -7
- package/src/rubricstep.js +157 -15
- package/src/runlist.js +2 -1
- package/src/schedulewords.js +6 -3
- package/src/source.js +18 -0
- package/src/thinking.js +63 -2
- package/src/userrun.js +28 -14
- package/types/authorflow.d.ts +42 -6
- package/types/authorjob.d.ts +20 -4
- package/types/declaredclose.d.ts +2 -0
- package/types/draftspend.d.ts +27 -1
- package/types/facts.d.ts +15 -0
- package/types/factwords.d.ts +26 -3
- package/types/fitcheck.d.ts +113 -0
- package/types/inputlook.d.ts +15 -0
- package/types/kinds.d.ts +5 -0
- package/types/pagedropwords.d.ts +39 -0
- package/types/pagedry.d.ts +37 -0
- package/types/pagemap.d.ts +154 -0
- package/types/pagerules.d.ts +86 -0
- package/types/panel/authorroutes.d.ts +17 -14
- package/types/panel/authorsession.d.ts +4 -2
- package/types/panel/jobplan.d.ts +5 -2
- package/types/panel/runroutes.d.ts +2 -2
- package/types/panel/server.d.ts +156 -2
- package/types/panel/status.d.ts +51 -0
- package/types/panelmoney.d.ts +5 -0
- package/types/replay.d.ts +21 -1
- package/types/rubricstep.d.ts +62 -1
- package/types/runlist.d.ts +4 -1
- package/types/schedulewords.d.ts +4 -2
- package/types/source.d.ts +11 -0
- package/types/thinking.d.ts +39 -0
- package/types/userrun.d.ts +4 -0
package/types/runlist.d.ts
CHANGED
|
@@ -48,7 +48,8 @@ export function appendRun(row: RunRow, opts?: {
|
|
|
48
48
|
reason?: "duplicate-runid";
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
|
-
* @typedef {{ runid: string, type: 'settled'|'released', by: string, at: string, reason?: string, spentUsd?: number, spendComplete?: boolean, leg?: number }} RunEvent
|
|
51
|
+
* @typedef {{ runid: string, type: 'settled'|'released', by: string, at: string, reason?: string, words?: string, spentUsd?: number, spendComplete?: boolean, leg?: number }} RunEvent
|
|
52
|
+
* `words` (2026-10-19): on a `settled` with `reason: 'refused before start'`, the plain refusal the panel shows for that run (it has no spine).
|
|
52
53
|
* `leg` (P5-R): which leg of the run the write-back is about; absent = leg 1 (every entry written before P5-R).
|
|
53
54
|
* A resumed run is ONE row, so `settled`/`released` are per leg: a later leg's `released` gives back THAT leg's
|
|
54
55
|
* claim and never removes the run.
|
|
@@ -226,6 +227,7 @@ export type RunRow = {
|
|
|
226
227
|
leg?: number;
|
|
227
228
|
};
|
|
228
229
|
/**
|
|
230
|
+
* `words` (2026-10-19): on a `settled` with `reason: 'refused before start'`, the plain refusal the panel shows for that run (it has no spine).
|
|
229
231
|
* `leg` (P5-R): which leg of the run the write-back is about; absent = leg 1 (every entry written before P5-R).
|
|
230
232
|
* A resumed run is ONE row, so `settled`/`released` are per leg: a later leg's `released` gives back THAT leg's
|
|
231
233
|
* claim and never removes the run.
|
|
@@ -241,6 +243,7 @@ export type RunEvent = {
|
|
|
241
243
|
by: string;
|
|
242
244
|
at: string;
|
|
243
245
|
reason?: string;
|
|
246
|
+
words?: string;
|
|
244
247
|
spentUsd?: number;
|
|
245
248
|
spendComplete?: boolean;
|
|
246
249
|
leg?: number;
|
package/types/schedulewords.d.ts
CHANGED
|
@@ -84,14 +84,16 @@ export function jobScheduleWords(f: {
|
|
|
84
84
|
export function retryNextWords(ms: number): string;
|
|
85
85
|
/**
|
|
86
86
|
* RULED 2026-10-15: the sign on the head of the Audit's `schedule` section. ONE small rule (hamr may still adjust it): [▶] only while a
|
|
87
|
-
* run of the job is running (as everywhere in the panel), [✗] when the SCHEDULE row is red, else [·] (on, waiting).
|
|
88
|
-
*
|
|
87
|
+
* run of the job is running (as everywhere in the panel), [✗] when the SCHEDULE row is red, else [·] (on, waiting). RULED 2026-10-18 (v1.106
|
|
88
|
+
* Part 4): the header reads `[sign] word schedule · ...`, the sign AND the word both from the one status table (src/panel/status.js), never typed here.
|
|
89
|
+
* @param {{running: boolean, red: boolean}} f @returns {{sign: string, word: string}}
|
|
89
90
|
*/
|
|
90
91
|
export function scheduleSignFor(f: {
|
|
91
92
|
running: boolean;
|
|
92
93
|
red: boolean;
|
|
93
94
|
}): {
|
|
94
95
|
sign: string;
|
|
96
|
+
word: string;
|
|
95
97
|
};
|
|
96
98
|
/** Audit schedule section, the `this run` words of a run the schedule started (the head already says which schedule and from where). @param {any} rec `trigger.json` */
|
|
97
99
|
export function sectionThisRunWords(rec: any): string;
|
package/types/source.d.ts
CHANGED
|
@@ -421,6 +421,17 @@ export function refreezeUrlInputs({ into, fetchUrl }: {
|
|
|
421
421
|
ok: false;
|
|
422
422
|
error: string;
|
|
423
423
|
}>;
|
|
424
|
+
/**
|
|
425
|
+
* PRD v1.106 Part 5 Q2: what `source.json` says about web inputs, read synchronously and never throwing: whether the copy has any web input
|
|
426
|
+
* (`inputs[].url`) and when the run-start refetch last finished (`refrozenAt`, written last by {@link refreezeUrlInputs}). The panel decides
|
|
427
|
+
* "fetching the page..." from this: it applies while a web input exists and no refetch has finished at or after `sinceIso`.
|
|
428
|
+
* @param {string} sourceJsonPath @param {string|null|undefined} sinceIso
|
|
429
|
+
* @returns {{ hasWeb: boolean, fetching: boolean }}
|
|
430
|
+
*/
|
|
431
|
+
export function webFetchState(sourceJsonPath: string, sinceIso: string | null | undefined): {
|
|
432
|
+
hasWeb: boolean;
|
|
433
|
+
fetching: boolean;
|
|
434
|
+
};
|
|
424
435
|
/** the per-file ceiling for a rubric input: bareguard's `cited` check searches a quote in a source only up to this size
|
|
425
436
|
* (its `quoteSourceMaxBytes`); a bigger file could never be cited from, so the door refuses it at $0 */
|
|
426
437
|
export const RUBRIC_INPUT_MAX_BYTES: number;
|
package/types/thinking.d.ts
CHANGED
|
@@ -84,6 +84,45 @@ export function thinkingRowText({ mode, support, status }: {
|
|
|
84
84
|
support?: true | false | "unverified";
|
|
85
85
|
status?: string;
|
|
86
86
|
}): string;
|
|
87
|
+
/**
|
|
88
|
+
* THE one decision for a worker model call (PRD v1.106 Part 1): from the phase label and attempt iteration `mkWorker` already holds,
|
|
89
|
+
* and the job's tick (`job.thinking === true`). Decided in code, never by the model.
|
|
90
|
+
* tick on -> 'on' for every call
|
|
91
|
+
* plan (draft, redraft, replan) -> 'on' (the planner is the hard part of a run)
|
|
92
|
+
* scout -> 'off'
|
|
93
|
+
* step:<id> attempt 1 -> 'off'
|
|
94
|
+
* step:<id> attempt >= 2 -> 'on'
|
|
95
|
+
* fix (close-fix) -> 'on'
|
|
96
|
+
* A step or fix iteration that is not a whole number >= 1 throws (operator error), as does an unknown phase — never a guess.
|
|
97
|
+
* @param {{ phase: unknown, iteration?: unknown, tick?: unknown }} o
|
|
98
|
+
* @returns {'on'|'off'}
|
|
99
|
+
*/
|
|
100
|
+
export function workerThinkingMode({ phase, iteration, tick }: {
|
|
101
|
+
phase: unknown;
|
|
102
|
+
iteration?: unknown;
|
|
103
|
+
tick?: unknown;
|
|
104
|
+
}): "on" | "off";
|
|
105
|
+
/**
|
|
106
|
+
* PRD v1.106 Part 3 — the words one worker call carries in the Audit, READ from the run's own spine, never guessed. Finds the LAST
|
|
107
|
+
* `thinking-decision` of `phase` (and `iteration`, when given) whose seq lies strictly between `lo` and `hi`, pairs it with the first
|
|
108
|
+
* `thinking-status` of the same phase and iteration after it (before the next decision), and words both through {@link thinkingRowText}
|
|
109
|
+
* (drafting's own words). `null` when the window holds no decision: a run from before the records existed shows no thinking word.
|
|
110
|
+
* @param {any[]} spine the run's spine records (each with a numeric `seq`)
|
|
111
|
+
* @param {{ phase: string, lo?: number, hi?: number, iteration?: number|null }} q
|
|
112
|
+
* @returns {string|null}
|
|
113
|
+
*/
|
|
114
|
+
export function thinkingWordsFrom(spine: any[], { phase, lo, hi, iteration }: {
|
|
115
|
+
phase: string;
|
|
116
|
+
lo?: number;
|
|
117
|
+
hi?: number;
|
|
118
|
+
iteration?: number | null;
|
|
119
|
+
}): string | null;
|
|
120
|
+
/**
|
|
121
|
+
* The Job tab's row words (PRD v1.106 Part 3): the default rule, or the job's "Thinking on" tick, but only for a run whose spine
|
|
122
|
+
* recorded a `thinking-decision`; a run from before the thinking rule reads `—`, never a guess from the job's tick (fwdloop M4d am28).
|
|
123
|
+
* @param {boolean} tick @param {boolean} recorded the run's spine holds at least one `thinking-decision` @returns {string}
|
|
124
|
+
*/
|
|
125
|
+
export function thinkingJobText(tick: boolean, recorded: boolean): string;
|
|
87
126
|
/** The words under a greyed "Thinking on" box (the server's `thinking.canChange` decides; the page decides nothing). */
|
|
88
127
|
export const THINKING_FIXED_SAY: "can't change this for this model";
|
|
89
128
|
/** The enumerated operator knob a drafting call is built with: 'on' | 'off' (the tick, spelled as a word). */
|
package/types/userrun.d.ts
CHANGED
|
@@ -219,6 +219,10 @@ export type RunCtx = {
|
|
|
219
219
|
* see `RunOpts.into`
|
|
220
220
|
*/
|
|
221
221
|
into?: string | undefined;
|
|
222
|
+
/**
|
|
223
|
+
* a FRESH `--spec` run: fetch the web inputs again AFTER the run is listed (never on resume/door/decide)
|
|
224
|
+
*/
|
|
225
|
+
refreeze?: boolean | undefined;
|
|
222
226
|
model: string | null;
|
|
223
227
|
providerKey: string | null;
|
|
224
228
|
readShim: string | null;
|