bareloop 0.56.0 → 0.58.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 +80 -0
- package/README.md +3 -3
- package/bareloop.context.md +75 -214
- package/package.json +2 -2
- package/src/authorflow.js +71 -136
- package/src/authoring.js +5 -124
- package/src/authorjob.js +125 -417
- package/src/authorreadout.js +105 -355
- package/src/authorrun.js +70 -234
- package/src/authorscout.js +9 -1
- package/src/blockasks.js +12 -17
- package/src/bundlerun.js +4 -1
- package/src/checkblock.js +297 -75
- package/src/checklist.js +1 -1
- package/src/checkpick.js +9 -5
- package/src/cli.js +3 -3
- package/src/declaredclose.js +45 -112
- package/src/destpoint.js +1 -1
- package/src/draftspend.js +20 -4
- package/src/fencepointcall.js +76 -0
- package/src/guarddescriptions.js +14 -0
- package/src/index.js +3 -43
- package/src/interviewrun.js +13 -8
- package/src/job.js +20 -1
- package/src/jobblock.js +11 -46
- package/src/judged.js +13 -1229
- package/src/kinds.js +10 -348
- package/src/noteask.js +124 -0
- package/src/pagedry.js +27 -5
- package/src/pagemap.js +7 -29
- package/src/pagerules.js +18 -3
- package/src/panel/authorroutes.js +15 -4
- package/src/panel/authorsession.js +201 -167
- package/src/panel/importrun.js +0 -1
- package/src/panel/index.html +43 -18
- package/src/panel/jobplan.js +54 -19
- package/src/panel/server.js +90 -69
- package/src/panel/status.js +3 -0
- package/src/pickrecord.js +15 -54
- package/src/planrun.js +4 -48
- package/src/promptregisters.js +7 -17
- package/src/providerrows.js +0 -36
- package/src/providers.js +4 -25
- package/src/questionbox.js +34 -30
- package/src/reviewdoor.js +1 -1
- package/src/rowresults.js +69 -0
- package/src/rubricstep.js +136 -28
- package/src/run.js +2 -15
- package/src/stagewords.js +24 -0
- package/src/userrun.js +14 -111
- package/types/authorflow.d.ts +51 -137
- package/types/authoring.d.ts +1 -14
- package/types/authorjob.d.ts +14 -55
- package/types/authorreadout.d.ts +52 -80
- package/types/authorrun.d.ts +20 -0
- package/types/blockasks.d.ts +5 -11
- package/types/checkblock.d.ts +147 -28
- package/types/checklist.d.ts +2 -2
- package/types/checkpick.d.ts +5 -3
- package/types/cli.d.ts +1 -3
- package/types/declaredclose.d.ts +5 -33
- package/types/draftspend.d.ts +16 -2
- package/types/fencepointcall.d.ts +68 -0
- package/types/guarddescriptions.d.ts +7 -0
- package/types/index.d.ts +2 -4
- package/types/job.d.ts +8 -0
- package/types/jobblock.d.ts +8 -38
- package/types/judged.d.ts +7 -357
- package/types/kinds.d.ts +4 -104
- package/types/noteask.d.ts +76 -0
- package/types/pagedry.d.ts +13 -0
- package/types/pagemap.d.ts +2 -5
- package/types/pagerules.d.ts +7 -0
- package/types/panel/authorsession.d.ts +37 -5
- package/types/panel/jobplan.d.ts +15 -3
- package/types/panel/server.d.ts +46 -13
- package/types/panel/status.d.ts +5 -0
- package/types/pickrecord.d.ts +8 -13
- package/types/planrun.d.ts +1 -22
- package/types/providerrows.d.ts +0 -31
- package/types/providers.d.ts +3 -19
- package/types/questionbox.d.ts +20 -6
- package/types/rowresults.d.ts +23 -0
- package/types/rubricstep.d.ts +43 -7
- package/types/run.d.ts +1 -20
- package/types/stagewords.d.ts +11 -0
- package/types/userrun.d.ts +0 -1
- package/src/calibrate.js +0 -702
- package/src/cardauthor.js +0 -502
- package/src/fitcheck.js +0 -168
- package/types/calibrate.d.ts +0 -201
- package/types/cardauthor.d.ts +0 -358
- package/types/fitcheck.d.ts +0 -119
package/types/checkblock.d.ts
CHANGED
|
@@ -7,6 +7,23 @@ export function renderCard(rows: Row[]): {
|
|
|
7
7
|
reason: any;
|
|
8
8
|
text: string;
|
|
9
9
|
}[];
|
|
10
|
+
/**
|
|
11
|
+
* The Drop/Add choices of rows, tied to the line's words (not its number) and the row's own name, so a Revise keeps them. ONE owner for the block's own record and for a Drop made on a signed card.
|
|
12
|
+
* @param {{n: number, text: string}[]} lines @param {{line: number, key: string, choice: string}[]} picks @returns {{lineWords: string, occurrence: number, tail: string, choice: string}[]}
|
|
13
|
+
*/
|
|
14
|
+
export function choiceEntries(lines: {
|
|
15
|
+
n: number;
|
|
16
|
+
text: string;
|
|
17
|
+
}[], picks: {
|
|
18
|
+
line: number;
|
|
19
|
+
key: string;
|
|
20
|
+
choice: string;
|
|
21
|
+
}[]): {
|
|
22
|
+
lineWords: string;
|
|
23
|
+
occurrence: number;
|
|
24
|
+
tail: string;
|
|
25
|
+
choice: string;
|
|
26
|
+
}[];
|
|
10
27
|
/**
|
|
11
28
|
* A row. `kind`: rule, fact, phrase, count, cited, numbers, floor. `by`: you (`~`), agent (`!`), default (`$`). A `~` row may carry `links` (the look's facts tied to it),
|
|
12
29
|
* `pick`, `aiReading`, `left`. `state` is built or not-checked; a not-checked row always has a plain `reason`.
|
|
@@ -14,7 +31,6 @@ export function renderCard(rows: Row[]): {
|
|
|
14
31
|
*/
|
|
15
32
|
/** the card's fixed words, one spelling (the renderer reads them; a test reads them too) */
|
|
16
33
|
export const CARD_T: Readonly<{
|
|
17
|
-
agreed: "you agreed:";
|
|
18
34
|
count: "result count";
|
|
19
35
|
cited: "every claim is backed by a quote copied from";
|
|
20
36
|
theInput: "the input";
|
|
@@ -27,7 +43,6 @@ export const EDIT_OPS: readonly string[];
|
|
|
27
43
|
export const REASON: Readonly<{
|
|
28
44
|
left: "You chose to leave it Not checked, so you judge it at Accept.";
|
|
29
45
|
nothingOnPage: "Your own words are on the line; the machine has no check for them, so you judge it at Accept.";
|
|
30
|
-
cantCheck: "I can't check this on the page; waiting for your answer";
|
|
31
46
|
noRule: "No rule can check this, so you judge it at Accept.";
|
|
32
47
|
waitingPick: "waiting for your answer on the proposed check";
|
|
33
48
|
waitingReading: "waiting for your answer on the reading";
|
|
@@ -35,6 +50,7 @@ export const REASON: Readonly<{
|
|
|
35
50
|
manyInputs: "the job has more than one input and code cannot pick which one the claims quote";
|
|
36
51
|
oneSidedTime: "a time limit the AI proposes must be a range, so you judge it at Accept.";
|
|
37
52
|
countNeedsFact: "a result count needs a fact to count; this line has none";
|
|
53
|
+
countNeedsSuggested: "a result count needs a fact to count; add the suggested fact on this line to count its results";
|
|
38
54
|
lookNoWords: "the page does not hold the words of the look's fact for this rule";
|
|
39
55
|
afterLast: "no more tries: Start over (rows are never changed by the AI after the last try)";
|
|
40
56
|
noPick: "No check was picked for it, so you judge it at Accept.";
|
|
@@ -43,15 +59,28 @@ export const REASON: Readonly<{
|
|
|
43
59
|
suggested: "Suggested: not in your job, so it is not checked unless you add it.";
|
|
44
60
|
}>;
|
|
45
61
|
export class CheckBlock {
|
|
46
|
-
/** @param {{texts: Record<string, string>, labels: string[], maxTries?: number, countScope?: (ruleText: string) => boolean, asks?: boolean, split?: boolean}} o the frozen input texts, their labels, how many AI replies (tries) may still change a row, whether code scopes a counting `~` rule in (a pick is asked), and whether a person can be asked at all (`asks`: false = a rule code cannot settle is Not checked, a reading code proposes is built as the AI's proposal) */
|
|
47
|
-
constructor({ texts, labels, maxTries, countScope, asks, split }: {
|
|
62
|
+
/** @param {{texts: Record<string, string>, labels: string[], maxTries?: number, countScope?: (ruleText: string) => boolean, asks?: boolean, split?: boolean, repo?: {files: string[]|null, writeScope: string[]|null}|null}} o the frozen input texts, their labels, how many AI replies (tries) may still change a row, whether code scopes a counting `~` rule in (a pick is asked), and whether a person can be asked at all (`asks`: false = a rule code cannot settle is Not checked, a reading code proposes is built as the AI's proposal) */
|
|
63
|
+
constructor({ texts, labels, maxTries, countScope, asks, split, repo }: {
|
|
48
64
|
texts: Record<string, string>;
|
|
49
65
|
labels: string[];
|
|
50
66
|
maxTries?: number;
|
|
51
67
|
countScope?: (ruleText: string) => boolean;
|
|
52
68
|
asks?: boolean;
|
|
53
69
|
split?: boolean;
|
|
70
|
+
repo?: {
|
|
71
|
+
files: string[] | null;
|
|
72
|
+
writeScope: string[] | null;
|
|
73
|
+
} | null;
|
|
54
74
|
});
|
|
75
|
+
/** a repo job's check TYPE (the only thing that varies): `files` = the repo listing at the seed (null until it is read), `writeScope` = the signed write fence. Null = a rubric job @type {{files: string[]|null, writeScope: string[]|null}|null} */
|
|
76
|
+
repo: {
|
|
77
|
+
files: string[] | null;
|
|
78
|
+
writeScope: string[] | null;
|
|
79
|
+
} | null;
|
|
80
|
+
/** @type {any[]} a repo job's drafted stages as the drafter wrote them (guards included); the rows of the work stages are in `rows`, the close's stages are these minus the dropped ones */
|
|
81
|
+
declared: any[];
|
|
82
|
+
/** the job lines a mandatory guard already covers (`guardLines`): a repo stage is never dropped when it is the last thing covering a line @type {Set<number>} */
|
|
83
|
+
guardCover: Set<number>;
|
|
55
84
|
/** the product path sets it: `!` rows split into job-derived and suggested, a suggestion code cannot build is hidden (hamr 2026-11-13). Off, every `!` row is built as before (the older callers and their tests) */
|
|
56
85
|
split: boolean;
|
|
57
86
|
countScope: (ruleText: string) => boolean;
|
|
@@ -84,10 +113,20 @@ export class CheckBlock {
|
|
|
84
113
|
deltaLog: any[];
|
|
85
114
|
/** @type {any} */
|
|
86
115
|
closeCache: any;
|
|
116
|
+
/** @type {Map<number, 'yes'|'no'|'failed'>} the note question's answer per facts-only line (src/noteask.js; code decides what it means) */
|
|
117
|
+
notes: Map<number, "yes" | "no" | "failed">;
|
|
118
|
+
/** @type {string[]} the NAMES of the mandatory guards the close carries (Addendum 2026-11-14 (c) piece 2): each is a job-level `$` row of the signed list, never a row of `rows` (no line, so no check of a line) */
|
|
119
|
+
guards: string[];
|
|
120
|
+
/** @type {string[]|null} the write fence of the job: a job-level `$` row of the signed list (hamr 2026-11-15), never a row of `rows` */
|
|
121
|
+
fence: string[] | null;
|
|
122
|
+
/** the mandatory guards of this job's class, by name: signedRows() adds one `$` guard row for each, once for the whole job @param {string[]} names @param {string[]|null} [fence] the signed write fence, when the job has one */
|
|
123
|
+
setGuards(names: string[], fence?: string[] | null): void;
|
|
87
124
|
textOf(source: string | undefined): string;
|
|
88
125
|
/** @param {number} line @param {string} [kind] */
|
|
89
126
|
rowsOn(line: number, kind?: string): Row[];
|
|
90
127
|
ruleRows(line: number): Row[];
|
|
128
|
+
/** does a `~` rule's own row say it is Not checked? Then its row is the ONE place the rule is said (its reason: the look's sentence, or the person's Drop) @param {number} line @param {number} rule */
|
|
129
|
+
saysRule(line: number, rule: number): boolean;
|
|
91
130
|
/** every word the person wrote on a line: the line and its `~` rules */
|
|
92
131
|
said(line: number): string;
|
|
93
132
|
/** @param {Row} r @returns {Row} the row as stored (a repeated key gets `#2`) */
|
|
@@ -113,8 +152,6 @@ export class CheckBlock {
|
|
|
113
152
|
takeJobWord(r: Row): void;
|
|
114
153
|
/** are the row's words (or its count number, or the name it asks for a fact by) in the job line or its `~` rules? Normalised, case-insensitive */
|
|
115
154
|
inJob(r: Row): any;
|
|
116
|
-
/** a `~` line an agreed answer wrote (or a carried pair partner) is checked by the rule it was agreed from: one check, both numbers */
|
|
117
|
-
matchFollow(r: Row): void;
|
|
118
155
|
/** a `!` count row is built unless a `~` rule on its line already names the number */
|
|
119
156
|
matchCount(r: Row): void;
|
|
120
157
|
matchRule(r: Row): void;
|
|
@@ -130,8 +167,6 @@ export class CheckBlock {
|
|
|
130
167
|
n: number;
|
|
131
168
|
text: string;
|
|
132
169
|
}, lineParts: any[], lineRows: string[][], factLines: Set<number>): void;
|
|
133
|
-
/** the follow rows of a row (its agreed or carried `~` lines) */
|
|
134
|
-
followsOf(r: Row): Row[];
|
|
135
170
|
/**
|
|
136
171
|
* The fact(s) a fact-like row builds, checked alone through the bareguard shapes and against the facts already on the line.
|
|
137
172
|
* @param {Row} r @param {any[]} onLine the facts already built on this line @returns {{fresh: any[], src: string, names: string[]} | {why: string}}
|
|
@@ -147,41 +182,108 @@ export class CheckBlock {
|
|
|
147
182
|
buildDefaults(l: {
|
|
148
183
|
n: number;
|
|
149
184
|
}, lineParts: any[], lineRows: string[][], factLines: Set<number>): void;
|
|
185
|
+
/**
|
|
186
|
+
* The `$` note row of a facts-only line (build 2026-11-14 (b)): the one note question said yes -> a countable nonEmpty text part sits beside the facts (the existing keep-both shape), so the brief
|
|
187
|
+
* is FACTS AND TEXT and text-present is floored; no -> nothing; the call failed -> a Not checked row in plain words. One owner of the row and its part.
|
|
188
|
+
*/
|
|
189
|
+
buildNote(l: {
|
|
190
|
+
n: number;
|
|
191
|
+
}, lineParts: any[], lineRows: string[][]): void;
|
|
192
|
+
/** the job lines that ended up facts-only (a fact part and no text beside it): the lines the note question is about. Reconciles first. @returns {number[]} */
|
|
193
|
+
factOnlyLines(): number[];
|
|
194
|
+
/** the note question's answers, `{line, answer: 'yes'|'no'|'failed'}`; the whole list is reconciled again @param {{line: number, answer: 'yes'|'no'|'failed'}[]} answers */
|
|
195
|
+
setNotes(answers: {
|
|
196
|
+
line: number;
|
|
197
|
+
answer: "yes" | "no" | "failed";
|
|
198
|
+
}[]): void;
|
|
199
|
+
/**
|
|
200
|
+
* The person's job lines as they stand now (a try-3 answer replaced or added a `~` rule): a rule whose words changed is the person's own typed words (its old answer is void), a new rule is a new row, a rule that is gone leaves.
|
|
201
|
+
* @param {{n: number, text: string, rules?: string[]}[]} jobLines
|
|
202
|
+
*/
|
|
203
|
+
syncJob(jobLines: {
|
|
204
|
+
n: number;
|
|
205
|
+
text: string;
|
|
206
|
+
rules?: string[];
|
|
207
|
+
}[]): void;
|
|
208
|
+
/** the repo listing at the seed, once it is read (the rule rows are judged against it) @param {string[]|null} files */
|
|
209
|
+
setListing(files: string[] | null): void;
|
|
210
|
+
/**
|
|
211
|
+
* The drafter's work stages as `!` rows (a mandatory guard is not one), and a Not checked `!` row for each line the drafter refused: the refusal is only the SIGNAL, the reason is code's (`REASON.noRule`, the one table). Idempotent: the stage rows are made again from `stages`.
|
|
212
|
+
* @param {any[]} stages the declaration's stages, guards included @param {{guardNames?: string[], refused?: any[], guardLines?: any[]}} [o]
|
|
213
|
+
*/
|
|
214
|
+
addStages(stages: any[], { guardNames, refused, guardLines }?: {
|
|
215
|
+
guardNames?: string[];
|
|
216
|
+
refused?: any[];
|
|
217
|
+
guardLines?: any[];
|
|
218
|
+
}): void;
|
|
219
|
+
/** the repo paths outside the write scope (the pointing call is shown these); empty when there is no listing or no fence @returns {string[]} */
|
|
220
|
+
outsideScope(): string[];
|
|
221
|
+
/** the folders every file of which lies outside the write scope (a rule may ask such a folder to stay as it is, written `folder/`); the pointing call is shown them beside the files @returns {string[]} */
|
|
222
|
+
outsideFolders(): string[];
|
|
223
|
+
/** is this repo file a place the run may change? @param {string} f */
|
|
224
|
+
inScope(f: string): boolean;
|
|
225
|
+
/** the listing paths (a file, or a folder written `folder/`) a text names as whole tokens @param {string} text @returns {string[]} */
|
|
226
|
+
namedPaths(text: string): string[];
|
|
227
|
+
/**
|
|
228
|
+
* Code's proof of a fence pointer: `path` is on the listing, the rule's own words name it (whole token; a folder as `folder/`), and neither it nor any other path those words name holds a place the run may change.
|
|
229
|
+
* @param {string} text the rule's own words @param {string} path @returns {boolean}
|
|
230
|
+
*/
|
|
231
|
+
provesFence(text: string, path: string): boolean;
|
|
232
|
+
/** the AI's pointer at a repo `~` rule ({op:'fence', line, rule, path}): judged ALONE; code's proof decides, the AI only points @param {any} e */
|
|
233
|
+
editFence(e: any): {
|
|
234
|
+
refusedBecause: string;
|
|
235
|
+
accepted?: undefined;
|
|
236
|
+
landedKey?: undefined;
|
|
237
|
+
} | {
|
|
238
|
+
accepted: boolean;
|
|
239
|
+
landedKey: any;
|
|
240
|
+
refusedBecause?: undefined;
|
|
241
|
+
};
|
|
242
|
+
/** a repo `~` rule: kept by the write fence when the AI pointed at a path and code proves it from the person's words; else the same ask the rubric flow uses (the person's Agree / Drop it / own words), Not checked when nobody can be asked @param {Row} r */
|
|
243
|
+
matchRepoRule(r: Row): void;
|
|
244
|
+
/** a repo job's rows: a rule is built with the path the fence keeps for it or Not checked with its reason; a work stage is built, or dropped when the person dropped it and it is not the last thing on its line */
|
|
245
|
+
buildRepo(): any;
|
|
246
|
+
/** may this repo work-stage row be dropped? Never the last check on a line it serves (another live stage, a guard's `guardLines` or a line refusal still covers it), and never the last work stage of the job @param {Row} r */
|
|
247
|
+
dropOk(r: Row): any;
|
|
248
|
+
/** a row the person can Drop (and Add back): a `!` fact, phrase or count; in a repo job also a work stage the drafter wrote @param {Row} r */
|
|
249
|
+
droppable(r: Row): boolean;
|
|
150
250
|
ask(): any[];
|
|
151
251
|
hasOpenQuestions(): boolean;
|
|
152
252
|
hasPendingDelta(): boolean;
|
|
153
|
-
/** @param {string} qKey @param {string} choice @param {string} [text] @returns {{ok: true} | {ok: false, why: string}} */
|
|
253
|
+
/** @param {string} qKey @param {string} choice @param {string} [text] the person's correction (a reading question only) @returns {{ok: true} | {ok: false, why: string}} */
|
|
154
254
|
applyAnswer(qKey: string, choice: string, text?: string): {
|
|
155
255
|
ok: true;
|
|
156
256
|
} | {
|
|
157
257
|
ok: false;
|
|
158
258
|
why: string;
|
|
159
259
|
};
|
|
160
|
-
/** the `~` row `partner` is checked by `source` (one check, both rule numbers) */
|
|
161
|
-
follow(source: Row, partner: Row): void;
|
|
162
260
|
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
|
|
166
|
-
|
|
261
|
+
* The job lines as the list now holds them: every line's `~` rules are the rule rows' own words, in rule order (a replaced rule keeps its place and number). ONE owner of the job text after an answer.
|
|
262
|
+
* @template {{n: number, text: string}} L @param {L[]} jobLines @returns {(L & {rule: string, rules: string[]})[]}
|
|
263
|
+
*/
|
|
264
|
+
jobLinesView<L extends {
|
|
265
|
+
n: number;
|
|
266
|
+
text: string;
|
|
267
|
+
}>(jobLines: L[]): (L & {
|
|
268
|
+
rule: string;
|
|
269
|
+
rules: string[];
|
|
270
|
+
})[];
|
|
271
|
+
/**
|
|
272
|
+
* Revise keeps the picks of the last draft (am17/am18, `src/pickrecord.js` `matchRecord`): a kept pick settles its rule (its words are the final rule's words) and a kept left rule is left.
|
|
273
|
+
* @param {{picks?: {line: number, rule: number, check: any, own?: boolean}[], left?: {line: number, rule: number}[]}} kept
|
|
167
274
|
*/
|
|
168
275
|
carry({ picks, left }: {
|
|
169
276
|
picks?: {
|
|
170
277
|
line: number;
|
|
171
278
|
rule: number;
|
|
172
279
|
check: any;
|
|
173
|
-
added?: string;
|
|
174
280
|
own?: boolean;
|
|
175
281
|
}[];
|
|
176
282
|
left?: {
|
|
177
283
|
line: number;
|
|
178
284
|
rule: number;
|
|
179
285
|
}[];
|
|
180
|
-
}
|
|
181
|
-
line: number;
|
|
182
|
-
rule: number;
|
|
183
|
-
pairRule?: number;
|
|
184
|
-
}[]): void;
|
|
286
|
+
}): void;
|
|
185
287
|
/** @param {{label?: string, pre?: boolean, edits?: any[]}} delta `pre` = a reply that is not a drafter try (the suggest call): it does not count against the tries */
|
|
186
288
|
applyDelta(delta: {
|
|
187
289
|
label?: string;
|
|
@@ -195,11 +297,13 @@ export class CheckBlock {
|
|
|
195
297
|
applyEdit(e: any, kept: {
|
|
196
298
|
adds: number;
|
|
197
299
|
}): {
|
|
300
|
+
refusedBecause: string;
|
|
301
|
+
accepted?: undefined;
|
|
302
|
+
landedKey?: undefined;
|
|
303
|
+
} | {
|
|
198
304
|
accepted: boolean;
|
|
199
305
|
landedKey: any;
|
|
200
306
|
refusedBecause?: undefined;
|
|
201
|
-
} | {
|
|
202
|
-
refusedBecause: string;
|
|
203
307
|
};
|
|
204
308
|
editAdd(e: any): {
|
|
205
309
|
refusedBecause: string;
|
|
@@ -260,7 +364,7 @@ export class CheckBlock {
|
|
|
260
364
|
refusedBecause?: undefined;
|
|
261
365
|
};
|
|
262
366
|
reconcile(): any;
|
|
263
|
-
/** the loop: while a question is open or a reply waits, apply it and reconcile the WHOLE list again. `answer(q)` gives {choice, text} or null (a person who did not answer) */
|
|
367
|
+
/** the loop: while a question is open or a reply waits, apply it and reconcile the WHOLE list again. `answer(q)` gives {choice, text?} or null (a person who did not answer) */
|
|
264
368
|
drive({ answer }: {
|
|
265
369
|
answer: any;
|
|
266
370
|
}): this;
|
|
@@ -277,14 +381,22 @@ export class CheckBlock {
|
|
|
277
381
|
* and the signed card read the rows through the SAME readers, so a row shown at confirm is the row signed. Reconciles first (the whole list, every time).
|
|
278
382
|
*/
|
|
279
383
|
closeView(): {
|
|
384
|
+
fence?: string[] | undefined;
|
|
280
385
|
stages: any;
|
|
281
386
|
picks: {
|
|
282
387
|
line: number;
|
|
283
388
|
part: any;
|
|
284
389
|
}[];
|
|
285
|
-
list: {
|
|
390
|
+
list: ({
|
|
286
391
|
[k: string]: any;
|
|
287
|
-
}
|
|
392
|
+
} | {
|
|
393
|
+
line: number;
|
|
394
|
+
key: string;
|
|
395
|
+
from: string;
|
|
396
|
+
by: string;
|
|
397
|
+
kind: string;
|
|
398
|
+
state: string;
|
|
399
|
+
})[];
|
|
288
400
|
};
|
|
289
401
|
/** the picks code records: a countable part carrying the `~` rule numbers it settles @param {{parts: any[], map: {part: number, line: number}[]}} c the build @returns {{line: number, part: any}[]} */
|
|
290
402
|
picksOf(c: {
|
|
@@ -303,9 +415,16 @@ export class CheckBlock {
|
|
|
303
415
|
* The signed list (`closeDecl.list`): the signed fields of every row, never its words. A suggestion not added is signed `dropped` ("suggested, not added"), a suggestion code could not build
|
|
304
416
|
* `dropped` with code's reason (it is on the Audit, never on the card), and a built row carries the names of the facts it made (`facts`), so every reader can tag each fact by its row's kind.
|
|
305
417
|
*/
|
|
306
|
-
signedRows(): {
|
|
418
|
+
signedRows(): ({
|
|
307
419
|
[k: string]: any;
|
|
308
|
-
}
|
|
420
|
+
} | {
|
|
421
|
+
line: number;
|
|
422
|
+
key: string;
|
|
423
|
+
from: string;
|
|
424
|
+
by: string;
|
|
425
|
+
kind: string;
|
|
426
|
+
state: string;
|
|
427
|
+
})[];
|
|
309
428
|
/** the suggestions code has proved it can build, as the card offers them (Add): `{key, line, text}` */
|
|
310
429
|
suggestedView(): {
|
|
311
430
|
dropped?: boolean | undefined;
|
package/types/checklist.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export function isEmptyList(rows: Row[]): boolean;
|
|
|
48
48
|
export function ledgerRecord(rows: Row[]): ({
|
|
49
49
|
key: string;
|
|
50
50
|
line: number;
|
|
51
|
-
rowKind: "fact" | "phrase" | "rule" | "count" | "numbers" | "cited" | "floor";
|
|
51
|
+
rowKind: "fact" | "phrase" | "rule" | "count" | "numbers" | "cited" | "note" | "floor";
|
|
52
52
|
from: "rule" | "agent" | "default" | "pick" | "look";
|
|
53
53
|
by: "you" | "agent" | "default";
|
|
54
54
|
words: string[];
|
|
@@ -111,7 +111,7 @@ export const LEDGER_SCHEMA: Readonly<{
|
|
|
111
111
|
export type Row = {
|
|
112
112
|
key: string;
|
|
113
113
|
line: number;
|
|
114
|
-
kind: "rule" | "fact" | "cited" | "count" | "phrase" | "numbers" | "floor";
|
|
114
|
+
kind: "rule" | "fact" | "cited" | "count" | "phrase" | "numbers" | "note" | "floor";
|
|
115
115
|
from: "rule" | "pick" | "look" | "agent" | "default";
|
|
116
116
|
by: "you" | "agent" | "default";
|
|
117
117
|
words: string[];
|
package/types/checkpick.d.ts
CHANGED
|
@@ -54,6 +54,11 @@ export function suggestUserText(lines: {
|
|
|
54
54
|
* @param {string} text @returns {Record<string, any>|null}
|
|
55
55
|
*/
|
|
56
56
|
export function countCheck(text: string): Record<string, any> | null;
|
|
57
|
+
/**
|
|
58
|
+
* The check a counting rule's own words already ARE ("exactly 3 list items" -> listItems 3), or null. No obvious asks (hamr 2026-11-14): such a rule is settled as written, never proposed back to the person.
|
|
59
|
+
* @param {string} text @returns {Record<string, any>|null}
|
|
60
|
+
*/
|
|
61
|
+
export function obviousCheck(text: string): Record<string, any> | null;
|
|
57
62
|
/**
|
|
58
63
|
* What the call's answer comes to, one row per scoped rule: the check kept (or null) and why it was dropped. A rule the answer never mentions is dropped as `no entry`; an
|
|
59
64
|
* entry for a rule that was not sent is ignored.
|
|
@@ -147,9 +152,6 @@ export function suggestChannel(): {
|
|
|
147
152
|
execute: (args: any) => Promise<string>;
|
|
148
153
|
};
|
|
149
154
|
};
|
|
150
|
-
/** the can't-check ask, as the signed words say it */
|
|
151
|
-
export const CANT_CHECK_WORDS: "I can't check this. Your own words, or Not checked?";
|
|
152
|
-
export function HOW_TO_ANSWER(line: number, agree: boolean): string;
|
|
153
155
|
export type Rule = {
|
|
154
156
|
line: number;
|
|
155
157
|
rule: number;
|
package/types/cli.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* code, so `bin/bareloop.mjs` can set `process.exitCode` and let node flush
|
|
4
4
|
* queued stdout on its own (F-something: `process.exit()` can discard it).
|
|
5
5
|
* @param {string[]} argv
|
|
6
|
-
* @param {{ env?: Record<string,string|undefined>, stdout?: any, stderr?: any, cwd?: string, provider?: any, providerFor?: any,
|
|
6
|
+
* @param {{ env?: Record<string,string|undefined>, stdout?: any, stderr?: any, cwd?: string, provider?: any, providerFor?: any, now?: () => number, stdin?: any, interactive?: boolean, runlistHome?: string, keysHome?: string, processEnv?: Record<string,string|undefined> }} deps
|
|
7
7
|
* @returns {Promise<number>}
|
|
8
8
|
*/
|
|
9
9
|
export function main(argv: string[], deps?: {
|
|
@@ -13,8 +13,6 @@ export function main(argv: string[], deps?: {
|
|
|
13
13
|
cwd?: string;
|
|
14
14
|
provider?: any;
|
|
15
15
|
providerFor?: any;
|
|
16
|
-
judgeProvider?: any;
|
|
17
|
-
judgeModel?: string | null;
|
|
18
16
|
now?: () => number;
|
|
19
17
|
stdin?: any;
|
|
20
18
|
interactive?: boolean;
|
package/types/declaredclose.d.ts
CHANGED
|
@@ -7,15 +7,6 @@ export function isDeclaredClose(job: any): boolean;
|
|
|
7
7
|
* `offer` and `needs` pass through untouched when a declaration carries them
|
|
8
8
|
* (v1's schema does not let one), so `checkMenu`'s derivation is unchanged.
|
|
9
9
|
*
|
|
10
|
-
* THE JUDGE TIER RIDES ALONG, and it rides as a STAMP for the same reason `offer`
|
|
11
|
-
* does. The tier that graded this close's calibration set is a CLOSE-level fact
|
|
12
|
-
* (`calibration.judgeModel`), and the stage that would buy a judge call is a STAGE;
|
|
13
|
-
* `runStage` is handed stages and never the declaration they came out of. Rather than
|
|
14
|
-
* plumb a second close-level channel down through every executor seam, the one place
|
|
15
|
-
* that already turns a declaration into stages carries it across — and it carries it
|
|
16
|
-
* from the SIGNED bytes, so a stage can never name a tier the signature does not.
|
|
17
|
-
* `runJudgedFloor` refuses a mismatch; the absence of a stamp is the SPEC gate's
|
|
18
|
-
* business (`validateCloseDecl` reds a set with no model), never a runtime fall-back.
|
|
19
10
|
* @param {any} closeDecl
|
|
20
11
|
* @returns {any[]|null} null when this is not a declaration
|
|
21
12
|
*/
|
|
@@ -53,7 +44,7 @@ export function declaredStages(closeDecl: any): any[] | null;
|
|
|
53
44
|
*
|
|
54
45
|
* @param {any} closeDecl
|
|
55
46
|
* @param {{at?: string, listing?: string[]|null, deferListing?: boolean,
|
|
56
|
-
* catalogue?: Record<string, any>, verdictType?: string|null,
|
|
47
|
+
* catalogue?: Record<string, any>, verdictType?: string|null, jobLines?: {n: number}[]|null,
|
|
57
48
|
* inputLabels?: string[]|null}} [opts]
|
|
58
49
|
* @returns {{ok: boolean, reds: Red[], closeDecl: any, grounded: boolean,
|
|
59
50
|
* scoped: {scoped: boolean, via: string|null},
|
|
@@ -65,7 +56,6 @@ export function validateCloseDecl(closeDecl: any, opts?: {
|
|
|
65
56
|
deferListing?: boolean;
|
|
66
57
|
catalogue?: Record<string, any>;
|
|
67
58
|
verdictType?: string | null;
|
|
68
|
-
writeScope?: string[] | null;
|
|
69
59
|
jobLines?: {
|
|
70
60
|
n: number;
|
|
71
61
|
}[] | null;
|
|
@@ -115,11 +105,8 @@ export function guardNames(closeDecl: any, verdictType: string): string[];
|
|
|
115
105
|
* @param {{timeoutMs?: number, cwd?: string, seedRef?: string,
|
|
116
106
|
* seedTrees?: any, gapCap?: number, maxBuffer?: number, baselineMode?: 'auto'|'worktree',
|
|
117
107
|
* humanRuling?: {decision: string, text?: string|null}|null,
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* onJudgeCost?: ((c: any) => void)|null,
|
|
121
|
-
* onRubricEvidence?: ((e: any) => void)|null,
|
|
122
|
-
* callBounds?: (() => {timeoutMs?: number, deadlineMs?: number})|null}} [opts]
|
|
108
|
+
* onRubricEvidence?: ((e: any) => void)|null, list?: any[]|null}} [opts]
|
|
109
|
+
* `list` = the signed one check list (`closeDecl.list`): given, each stage entry records a RESULT PER ROW (`rows`, plus `unclaimed` words for a gap no row owns), report-only (Addendum 2026-11-14 (c) piece 4)
|
|
123
110
|
* @returns {Promise<any>}
|
|
124
111
|
*/
|
|
125
112
|
export function runDeclaredStages(stages: any[], redact?: (s: string) => string, opts?: {
|
|
@@ -134,16 +121,8 @@ export function runDeclaredStages(stages: any[], redact?: (s: string) => string,
|
|
|
134
121
|
decision: string;
|
|
135
122
|
text?: string | null;
|
|
136
123
|
} | null;
|
|
137
|
-
judgeLoop?: ((o: {
|
|
138
|
-
system: string;
|
|
139
|
-
}) => any) | null;
|
|
140
|
-
judgeModel?: string | null;
|
|
141
|
-
onJudgeCost?: ((c: any) => void) | null;
|
|
142
124
|
onRubricEvidence?: ((e: any) => void) | null;
|
|
143
|
-
|
|
144
|
-
timeoutMs?: number;
|
|
145
|
-
deadlineMs?: number;
|
|
146
|
-
}) | null;
|
|
125
|
+
list?: any[] | null;
|
|
147
126
|
}): Promise<any>;
|
|
148
127
|
/**
|
|
149
128
|
* The trend reader's input for ONE close verdict, whichever executor produced
|
|
@@ -190,12 +169,6 @@ export const CLOSE_DECL_FIELDS: readonly string[];
|
|
|
190
169
|
export const SIGNED_ROW_FIELDS: readonly string[];
|
|
191
170
|
/** the states a signed row may end in */
|
|
192
171
|
export const SIGNED_STATES: readonly string[];
|
|
193
|
-
/** what a stored calibration set carries, ENUMERATED: the frozen cases and the judge
|
|
194
|
-
* tier that graded them. Both are inside the spec, so `jobSpecHash` covers both — which
|
|
195
|
-
* is the whole mechanism behind "a judge-model bump forces a full recalibration"
|
|
196
|
-
* (src/judged.js, `resolveJudge`): the field moves, the hash moves, the signature dies,
|
|
197
|
-
* and the re-sign re-runs the gate. Anything else in there is a field nobody reads. */
|
|
198
|
-
export const CALIBRATION_FIELDS: readonly string[];
|
|
199
172
|
/**
|
|
200
173
|
* The prefix M1 puts on EVERY gap line of a declared stage (its `ctx.gapKeep`).
|
|
201
174
|
* A literal, so the anchored pattern below is exact.
|
|
@@ -257,8 +230,7 @@ export const HUMAN_CHECKPOINTS: readonly string[];
|
|
|
257
230
|
*
|
|
258
231
|
* `hard` is by CONSTRUCTION: every mechanical kind is a command whose measurement
|
|
259
232
|
* is the truth. `hitl` joined it at N4 slice 1, and `soft` at softgreen module 3
|
|
260
|
-
* — each only because its kind is genuinely LIVE (`human-confirms
|
|
261
|
-
* `judged-floor`): the widening and the kind go in one commit, or this table
|
|
233
|
+
* — each only because its kind is genuinely LIVE (`human-confirms`): the widening and the kind go in one commit, or this table
|
|
262
234
|
* admits a class the executor cannot render.
|
|
263
235
|
*
|
|
264
236
|
* `hitl` STAYS despite the class's retirement (PRD v1.71: the human stage moved
|
package/types/draftspend.d.ts
CHANGED
|
@@ -43,10 +43,20 @@ export function sessionDirForRow(row: {
|
|
|
43
43
|
home?: string;
|
|
44
44
|
sessionsRoot?: string;
|
|
45
45
|
}): string | null;
|
|
46
|
+
/**
|
|
47
|
+
* What an answered look question DECIDED, in one spelling for every view (the draft readout and the Audit drafting table): agreed / you wrote / dropped.
|
|
48
|
+
* `null` for any other answer, and for an old log row with no `words` (those keep the question-and-answer form).
|
|
49
|
+
* @param {{choice?: string, words?: string}} h
|
|
50
|
+
* @returns {string|null}
|
|
51
|
+
*/
|
|
52
|
+
export function decidedWords(h: {
|
|
53
|
+
choice?: string;
|
|
54
|
+
words?: string;
|
|
55
|
+
}): string | null;
|
|
46
56
|
/**
|
|
47
57
|
* PRD v1.106 Part 5 Q1: one answered question as the two lines the Audit's drafting table shows under its step. ONE place owns the words.
|
|
48
|
-
* @param {{question: string, answer: string, source?: string, line?: number, at?: string}} h
|
|
49
|
-
* @returns {{question: string, answer: string, source: string, line?: number, at?: string, askedText: string, saidText: string}}
|
|
58
|
+
* @param {{question: string, answer: string, source?: string, line?: number, at?: string, choice?: string, words?: string}} h
|
|
59
|
+
* @returns {{question: string, answer: string, source: string, line?: number, at?: string, choice?: string, words?: string, askedText: string, saidText: string}}
|
|
50
60
|
*/
|
|
51
61
|
export function humanRowWords(h: {
|
|
52
62
|
question: string;
|
|
@@ -54,12 +64,16 @@ export function humanRowWords(h: {
|
|
|
54
64
|
source?: string;
|
|
55
65
|
line?: number;
|
|
56
66
|
at?: string;
|
|
67
|
+
choice?: string;
|
|
68
|
+
words?: string;
|
|
57
69
|
}): {
|
|
58
70
|
question: string;
|
|
59
71
|
answer: string;
|
|
60
72
|
source: string;
|
|
61
73
|
line?: number;
|
|
62
74
|
at?: string;
|
|
75
|
+
choice?: string;
|
|
76
|
+
words?: string;
|
|
63
77
|
askedText: string;
|
|
64
78
|
saidText: string;
|
|
65
79
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/** @param {{n: number, rules?: string[], rule?: string}[]} jobLines @param {string[]} outside the repo paths outside the write scope @param {string[]|null} writeScope @returns {string} */
|
|
2
|
+
export function fencePointUserText(jobLines: {
|
|
3
|
+
n: number;
|
|
4
|
+
rules?: string[];
|
|
5
|
+
rule?: string;
|
|
6
|
+
}[], outside: string[], writeScope: string[] | null): string;
|
|
7
|
+
/**
|
|
8
|
+
* The one paid call; its spend is booked like the look's. An unusable answer is NOT a guessed list: it yields no edits and says why (the rules then go to the questions).
|
|
9
|
+
* @param {{jobLines: any[], outside: string[], writeScope?: string[]|null, generate: Function, ceilingUsd?: number|null, onCall?: (c: any) => void, priorCalls?: any[], priorRaws?: any[]}} o
|
|
10
|
+
* @returns {Promise<{edits: any[], reason: string|null, calls: any[], raws: any[]}>}
|
|
11
|
+
*/
|
|
12
|
+
export function runFencePoint({ jobLines, outside, writeScope, generate, ceilingUsd, onCall, priorCalls, priorRaws }: {
|
|
13
|
+
jobLines: any[];
|
|
14
|
+
outside: string[];
|
|
15
|
+
writeScope?: string[] | null;
|
|
16
|
+
generate: Function;
|
|
17
|
+
ceilingUsd?: number | null;
|
|
18
|
+
onCall?: (c: any) => void;
|
|
19
|
+
priorCalls?: any[];
|
|
20
|
+
priorRaws?: any[];
|
|
21
|
+
}): Promise<{
|
|
22
|
+
edits: any[];
|
|
23
|
+
reason: string | null;
|
|
24
|
+
calls: any[];
|
|
25
|
+
raws: any[];
|
|
26
|
+
}>;
|
|
27
|
+
/** the label of the call, as the drafting book and the draft log see it */
|
|
28
|
+
export const FENCE_POINT_LABEL: "fence-point";
|
|
29
|
+
export const FENCE_POINT_TOOL: "submit_edits";
|
|
30
|
+
/** at most this many outside paths are shown to the call */
|
|
31
|
+
export const FENCE_POINT_MAX_PATHS: 300;
|
|
32
|
+
/** the call's own system text (model-facing; a prompt register: src/promptregisters.js) */
|
|
33
|
+
export const FENCE_POINT_SYSTEM: "You read the \"~\" rules of a job and point at the files a rule asks to leave as they are, by sending EDITS to a list of checks that code keeps. Code checks every edit you send against the rule's own words and the file list; an edit it cannot prove is dropped.\nCall submit_edits once with an \"edits\" list, or with an empty list.\nThe one edit: {\"op\":\"fence\",\"line\":N,\"rule\":n,\"path\":\"<a path copied from the list of paths>\"} - the rule asks that this file or folder stay as it is. The path is one of the listed paths, or a folder that holds some of them, and the rule's own words name it.\nSend an edit only for a rule whose own words say a listed file or folder stays as it is. A rule that says anything else gets no edit. An empty list is a good answer.";
|
|
34
|
+
export const FENCE_POINT_SCHEMA: Readonly<{
|
|
35
|
+
type: "object";
|
|
36
|
+
properties: {
|
|
37
|
+
edits: {
|
|
38
|
+
type: string;
|
|
39
|
+
items: {
|
|
40
|
+
type: string;
|
|
41
|
+
properties: {
|
|
42
|
+
op: {
|
|
43
|
+
enum: string[];
|
|
44
|
+
};
|
|
45
|
+
line: {
|
|
46
|
+
type: string;
|
|
47
|
+
minimum: number;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
rule: {
|
|
51
|
+
type: string;
|
|
52
|
+
minimum: number;
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
path: {
|
|
56
|
+
type: string;
|
|
57
|
+
minLength: number;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
required: string[];
|
|
62
|
+
additionalProperties: boolean;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
required: string[];
|
|
67
|
+
additionalProperties: false;
|
|
68
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PLAIN-ENGLISH lines for the guards `classGuards` can compose, keyed by guard NAME — frozen beside CONFIRM_MENU (`src/authorflow.js`) because both are constants the confirm turn shows a person
|
|
3
|
+
* verbatim. One entry per guard that exists in `MECHANICAL_GUARDS` (`src/authoring.js`); `confirmProtections` throws if a guard `classGuards` hands back has no line here, so a battery that grows a
|
|
4
|
+
* guard fails loudly instead of showing a blank description.
|
|
5
|
+
* @type {Record<string, string>}
|
|
6
|
+
*/
|
|
7
|
+
export const GUARD_DESCRIPTIONS: Record<string, string>;
|
package/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { makeSpine } from "./spine.js";
|
|
|
2
2
|
export { runPlan } from "./planrun.js";
|
|
3
3
|
export { workBranchName } from "./workbranch.js";
|
|
4
4
|
export { answerReviewDoor } from "./reviewdoor.js";
|
|
5
|
+
export { resolveJudge } from "./judged.js";
|
|
5
6
|
export { main as cliMain } from "./cli.js";
|
|
6
7
|
export { ralph, runClose, runStages, CLOSE_FAULTS } from "./ralph.js";
|
|
7
8
|
export { globToPrefix, scanSecrets } from "./validate.js";
|
|
@@ -14,10 +15,7 @@ export { renderListing, selectionPrompt } from "./selection.js";
|
|
|
14
15
|
export { validateEnvelope, resolveTrySpec, resolveReuse, reuseSpecHash, selectBridge, runReuse, REUSE_GRADED_RED, readResume, resumeTreeGate, CHECKPOINT_OUTCOMES, PAUSE_TTL_MS, checkpointAgeGate, applyDoorDecision, writeRunGreenRow } from "./reuse.js";
|
|
15
16
|
export { classifyIncidents, foldLedger, ledgerDeltas, updateLedger, LEDGER_CLASSES, VOUCHED_RATE_SOURCES, rateProvenance, spendProvenance } from "./ledger.js";
|
|
16
17
|
export { readShimArm, READ_SHIM_CAP, READ_SHIM_STRATEGY, READ_SHIM_DIFF_STRATEGY } from "./readshim.js";
|
|
17
|
-
export { runDeclaredClose, runStage, seedRead, seedAtHead, LIVE_KINDS, STOP_FAULTS, JUDGED_MARKER, HUMAN_DECISIONS, SEED_EXEMPT_KINDS, normalizeHumanRuling, resolveHumanRuling,
|
|
18
|
-
export { resolveJudge, JUDGE_RULES, JUDGE_RULE_IDS, runLocate, decide, CALIBRATION_SIZE, validateCalibrationSet, expectedOf } from "./judged.js";
|
|
19
|
-
export { proposeJudgedArtifacts, signJudgedArtifacts, foldJudgedArtifacts } from "./cardauthor.js";
|
|
20
|
-
export { runCalibration, INJECTION_LOCATE_BATTERY, CASUALTY_AXES } from "./calibrate.js";
|
|
18
|
+
export { runDeclaredClose, runStage, seedRead, seedAtHead, LIVE_KINDS, STOP_FAULTS, JUDGED_MARKER, HUMAN_DECISIONS, SEED_EXEMPT_KINDS, normalizeHumanRuling, resolveHumanRuling, DOOR_OPEN_OUTCOMES, REVIEW_DOOR_CLASSES, doorOpens, mechanicalStages } from "./kinds.js";
|
|
21
19
|
export { validateDeclaration, KIND_CATALOGUE, LOCKED_KINDS, genreEnv, genreInstruments, LOCKED_CLASSES, CLASS_BATTERIES, classGuards, closeCeiling, NEVER_OFFERED_KINDS } from "./authoring.js";
|
|
22
20
|
export { runAuthorScout, buildSeedListing, AUTHOR_SCOUT_VERBS, SCOUT_ATTEMPTS, SCOUT_RETRY_CAUSES } from "./authorscout.js";
|
|
23
21
|
export { scrubRaw, RAW_PERSIST_MAX } from "./text.js";
|
package/types/job.d.ts
CHANGED
|
@@ -30,6 +30,12 @@ export function validateBaseUrl(value: unknown): string | null;
|
|
|
30
30
|
* @param {Record<string, any>} spec @returns {'plain'|'mcp'|'tickets'}
|
|
31
31
|
*/
|
|
32
32
|
export function flowTypeOf(spec: Record<string, any>): "plain" | "mcp" | "tickets";
|
|
33
|
+
/**
|
|
34
|
+
* Is this signed spec an OLD job: one that carries a `judged-floor` stage (the old judge) or a job line with a `PASS:` / `FAIL:` rule (the old examples)?
|
|
35
|
+
* ONE reader for every door that takes a signed spec back in (Reuse, a scheduled fire, an exported bundle).
|
|
36
|
+
* @param {Record<string, any>} spec @returns {string|null} the plain refusal, or null when the spec is not an old job
|
|
37
|
+
*/
|
|
38
|
+
export function oldJobWords(spec: Record<string, any>): string | null;
|
|
33
39
|
/**
|
|
34
40
|
* Validate an operator-owned job spec (`schema: "job-v1"`). Never throws on
|
|
35
41
|
* JSON text or plain parsed data — the ingest contract; a live object with a
|
|
@@ -284,6 +290,8 @@ export const FLOW_TYPE_LABELS: Readonly<{
|
|
|
284
290
|
mcp: "MCP";
|
|
285
291
|
tickets: "Tickets MCP";
|
|
286
292
|
}>;
|
|
293
|
+
/** hamr 2026-11-14 (rubric vs deterministic split, piece 6): the words for a job made with PASS/FAIL examples or the old judge, which are gone. Old runs are not repaired. */
|
|
294
|
+
export const OLD_JOB_WORDS: "This job was made with PASS/FAIL examples or the old judge, which are gone. Draft it fresh.";
|
|
287
295
|
/**
|
|
288
296
|
* The fields a "Reuse workflow" run may change: where the work lands (the write fence, `writeScope`, and a
|
|
289
297
|
* `destination`/`source` where a spec ever carries them), the `inputs` the person pointed at (P7: Inputs is open on a reuse) and the two ceilings. Everything else in a signed spec is
|