bareloop 0.37.0 → 0.39.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 +53 -0
- package/bareloop.context.md +48 -26
- package/package.json +3 -3
- package/src/authorflow.js +3 -2
- package/src/authoring.js +62 -3
- package/src/authorjob.js +37 -24
- package/src/authorreadout.js +449 -2
- package/src/authorrun.js +21 -4
- package/src/calibrate.js +84 -10
- package/src/cardauthor.js +4 -1
- package/src/declaredclose.js +10 -4
- package/src/job.js +1 -1
- package/src/judged.js +322 -28
- package/src/kinds.js +13 -1
- package/src/legs.js +15 -0
- package/src/panel/authorroutes.js +9 -6
- package/src/panel/authorsession.js +66 -49
- package/src/panel/index.html +321 -355
- package/src/panel/server.js +33 -13
- package/src/panel/status.js +5 -4
- package/src/planrun.js +4 -3
- package/src/providers.js +27 -0
- package/src/ralph.js +8 -2
- package/src/replay.js +23 -3
- package/src/trend.js +1 -0
- package/types/authoring.d.ts +24 -1
- package/types/authorjob.d.ts +17 -10
- package/types/authorreadout.d.ts +106 -0
- package/types/calibrate.d.ts +4 -1
- package/types/declaredclose.d.ts +2 -1
- package/types/judged.d.ts +21 -2
- package/types/legs.d.ts +12 -0
- package/types/panel/authorsession.d.ts +15 -1
- package/types/panel/server.d.ts +5 -4
- package/types/panel/status.d.ts +1 -1
- package/types/providers.d.ts +7 -0
- package/types/ralph.d.ts +6 -1
- package/types/trend.d.ts +1 -0
package/types/legs.d.ts
CHANGED
|
@@ -56,6 +56,18 @@ export function watchdogNotePath(spineFile: string, leg: number): string;
|
|
|
56
56
|
* @returns {string}
|
|
57
57
|
*/
|
|
58
58
|
export function stopFilePath(spineFile: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* Did a run (or one leg) END on a cap? The ONE spelling of the rule every surface follows (hamr 2026-10-08): the
|
|
61
|
+
* outcome is `cap-halt` / `wall-halt`, or it is `escalated` and the last escalation's category names the cap —
|
|
62
|
+
* `wall-halt`, or `cap-halt` backed by a `money-halt` record (a strike-ladder `cap-halt` is not the money cap).
|
|
63
|
+
* @param {{outcome: string|null|undefined, category?: string|null, moneyHalt?: boolean}} o
|
|
64
|
+
* @returns {'money'|'time'|null}
|
|
65
|
+
*/
|
|
66
|
+
export function capKindOf(o: {
|
|
67
|
+
outcome: string | null | undefined;
|
|
68
|
+
category?: string | null;
|
|
69
|
+
moneyHalt?: boolean;
|
|
70
|
+
}): "money" | "time" | null;
|
|
59
71
|
/** The marker record's `type`. */
|
|
60
72
|
export const LEG_RESUME: "leg-resume";
|
|
61
73
|
export type Leg = {
|
|
@@ -9,6 +9,20 @@ export function latestStep(steps: StepLine[], id: string): StepLine | undefined;
|
|
|
9
9
|
* @param {StepLine[]} steps @param {string} id @param {string} [detail] (absent = keep what the line has)
|
|
10
10
|
*/
|
|
11
11
|
export function advanceSteps(steps: StepLine[], id: string, detail?: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* The confirm turn's plan as the chat shows it: ONE owner of the text (hamr, 2026-10-09: the one-blob "Plan: ...
|
|
14
|
+
* Checks: ... Not checked: ..." was unreadable). Each section is a heading on its own line, its content on the next,
|
|
15
|
+
* and a blank line between sections. `#NOT CHECKED:` and `#QUESTIONS:` appear only when there is something to say.
|
|
16
|
+
* The CLI composes its own plan screen (src/authorrun.js) and shares no text with this one.
|
|
17
|
+
* @param {{goal?: string, checks?: string[], notChecked?: string[], questions?: string[]}} p
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
export function planText(p: {
|
|
21
|
+
goal?: string;
|
|
22
|
+
checks?: string[];
|
|
23
|
+
notChecked?: string[];
|
|
24
|
+
questions?: string[];
|
|
25
|
+
}): string;
|
|
12
26
|
/**
|
|
13
27
|
* `true` when `jobs/<name>.json` already exists in the repo's own jobs/ dir
|
|
14
28
|
* (resolved from THIS module's own on-disk location, never `process.cwd()`,
|
|
@@ -96,7 +110,7 @@ export function validateJobCard(card: any, opts?: {
|
|
|
96
110
|
/**
|
|
97
111
|
* ONE session's engine — created already RUNNING (the caller awaits nothing;
|
|
98
112
|
* the pipeline drives itself, reporting through `state`). `state.pendingAsk`
|
|
99
|
-
* is the ONE thing a person answers next; `answer()`/`send()
|
|
113
|
+
* is the ONE thing a person answers next; `answer()`/`send()`/
|
|
100
114
|
* `signPrepare()` are the only ways in.
|
|
101
115
|
* @param {any} card the validated job card (see {@link validateJobCard})
|
|
102
116
|
* @param {{env?: Record<string,string|undefined>, sessionsRoot?: string, home?: string, timeoutMs?: number,
|
package/types/panel/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `[✓]`/`[✗]`/`[▶]` — the ONLY vocabulary a result is ever rendered in
|
|
2
|
+
* `[✓]`/`[✗]`/`[■]`/`[▶]` — the ONLY vocabulary a result is ever rendered in
|
|
3
3
|
* (auto-memory `ui-verdict-words.md`: never the words green/red/soft-green
|
|
4
4
|
* anywhere in the page). `null` (no `job-end` reached — a killed-mid-run or
|
|
5
5
|
* still-running spine) reads `▶` — the same "in progress / unresolved" glyph
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* running attempt and an archived spine that never reached its own end are
|
|
8
8
|
* the same fact from this read-only side: no verdict has been recorded yet.
|
|
9
9
|
* @param {string|null} outcome
|
|
10
|
-
* @returns {'✓'|'✗'|'▶'}
|
|
10
|
+
* @returns {'✓'|'✗'|'■'|'▶'}
|
|
11
11
|
*/
|
|
12
|
-
export function glyphForOutcome(outcome: string | null): "\u2713" | "\u2717" | "\u25B6";
|
|
12
|
+
export function glyphForOutcome(outcome: string | null): "\u2713" | "\u2717" | "\u25A0" | "\u25B6";
|
|
13
13
|
/**
|
|
14
14
|
* `deterministic` (green) / `rubric` (soft-green) / `unknown` (a class this
|
|
15
15
|
* reader doesn't recognize) — the settled UI wording (PANEL-BUILD.md §6),
|
|
@@ -381,7 +381,7 @@ export function reuseLine(record: {
|
|
|
381
381
|
* to copy: change the job: Clear the card). `null` when the runid is not listed.
|
|
382
382
|
* @param {string} runid
|
|
383
383
|
* @param {{ home?: string, model?: string }} [opts] `model` = the Model box's current Name (the estimate counts only runs on that worker); absent = the card's own Model
|
|
384
|
-
* @returns {{ok: true, origin: {runid: string, job: string}, card: Record<string, any>, from: 'signed job',
|
|
384
|
+
* @returns {{ok: true, origin: {runid: string, job: string}, outcome: string|null, card: Record<string, any>, from: 'signed job',
|
|
385
385
|
* locked: readonly string[], open: readonly string[], note: string|null,
|
|
386
386
|
* specHash: string, workflowKey: string, spec: any, specPath: string,
|
|
387
387
|
* trackRecord: ReturnType<typeof trackRecordFor>, line: string}|{ok: false, error: string}|null}
|
|
@@ -395,6 +395,7 @@ export function getStartFrom(runid: string, opts?: {
|
|
|
395
395
|
runid: string;
|
|
396
396
|
job: string;
|
|
397
397
|
};
|
|
398
|
+
outcome: string | null;
|
|
398
399
|
card: Record<string, any>;
|
|
399
400
|
from: "signed job";
|
|
400
401
|
locked: readonly string[];
|
package/types/panel/status.d.ts
CHANGED
package/types/providers.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The per-call options the rubric JUDGE's model calls carry for this provider
|
|
3
|
+
* instance, from the allow-list above. Empty for any provider/model not listed.
|
|
4
|
+
* @param {any} provider a constructed bare-agent provider
|
|
5
|
+
* @returns {Record<string, any>}
|
|
6
|
+
*/
|
|
7
|
+
export function judgeCallOptions(provider: any): Record<string, any>;
|
|
1
8
|
/**
|
|
2
9
|
* Look up a provider's table entry. Throws a NAMED error on an unrecognized
|
|
3
10
|
* provider — never a silent default (the `resolveRates`-style-substring-
|
package/types/ralph.d.ts
CHANGED
|
@@ -242,9 +242,13 @@ export function boundGap(s: string, keepPattern?: string): string;
|
|
|
242
242
|
* (PRD item 27/M3 Part B), forwarded to the raw `close` path's `runClose`
|
|
243
243
|
* call unchanged; a caller supplying `judge` instead already closed over
|
|
244
244
|
* its own `closeDir` and this param does nothing for it.
|
|
245
|
+
* @param {string} [opts.phase] the phase this loop runs in, when it is not the step loop
|
|
246
|
+
* (the fix loop passes `'fix'`): the person's-stop text then names it ("during the fix
|
|
247
|
+
* phase") instead of saying a resume re-enters "this step", which only the step loop has.
|
|
248
|
+
* Text only — it changes no category, outcome or option.
|
|
245
249
|
* @returns {Promise<'green'|'escalated'>}
|
|
246
250
|
*/
|
|
247
|
-
export function ralph({ middle, close, judge, capRuns, ladder, emit, redact, closeTimeoutMs, cwd, expect, judged, gapKeep, workerWrites, closeDir }: {
|
|
251
|
+
export function ralph({ middle, close, judge, capRuns, ladder, emit, redact, closeTimeoutMs, cwd, expect, judged, gapKeep, workerWrites, closeDir, phase }: {
|
|
248
252
|
middle: (iteration: number, gap?: string) => void | Promise<void>;
|
|
249
253
|
close?: string[] | undefined;
|
|
250
254
|
judge?: (() => Promise<{
|
|
@@ -270,6 +274,7 @@ export function ralph({ middle, close, judge, capRuns, ladder, emit, redact, clo
|
|
|
270
274
|
gapKeep?: string | undefined;
|
|
271
275
|
workerWrites?: (() => string[]) | undefined;
|
|
272
276
|
closeDir?: string | null | undefined;
|
|
277
|
+
phase?: string | undefined;
|
|
273
278
|
}): Promise<"green" | "escalated">;
|
|
274
279
|
/**
|
|
275
280
|
* What the close child must NOT be able to read (operator ruling, 2026-07-31:
|
package/types/trend.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export function createTrend({ stageOrder, limit, blindCap, seed, directions }?:
|
|
|
54
54
|
* @param {{gap?: string, stage?: string|null, value?: number|null}} o either a
|
|
55
55
|
* raw gap (parsed here) or an already-read `{stage, value}` — never both
|
|
56
56
|
* spellings of the same reading in one call.
|
|
57
|
+
* (A judged stage's value is its distinct red COUNT, supplied by the caller.)
|
|
57
58
|
* @returns {{iteration: number, stage: string, value: number|null, improved: boolean,
|
|
58
59
|
* comparable: boolean, noProgress: number, limit: number, stageIndex: number}}
|
|
59
60
|
*/
|