fwdloop 0.32.0 → 0.33.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/bin/fwdloop +8 -2
- package/package.json +2 -2
- package/src/auditchecks.js +53 -0
- package/src/authoring.js +52 -12
- package/src/blockasks.js +44 -0
- package/src/blockassemble.js +140 -0
- package/src/blockdraft.js +91 -0
- package/src/blocklines.js +30 -0
- package/src/blockpick.js +165 -0
- package/src/cardlist.js +19 -0
- package/src/checkblock.js +804 -0
- package/src/checked.js +48 -9
- package/src/checklist.js +99 -0
- package/src/checklistsign.js +93 -0
- package/src/checkwords.js +20 -1
- package/src/cited-record.js +21 -1
- package/src/citedcheck.js +162 -7
- package/src/closers.js +41 -3
- package/src/declaration.js +25 -2
- package/src/declaredclose.js +4 -0
- package/src/draft-steps.js +3 -1
- package/src/drafter.js +205 -122
- package/src/factwords.js +112 -0
- package/src/inputlook.js +53 -0
- package/src/labelscan.js +162 -0
- package/src/pageask.js +4 -1
- package/src/pagedropwords.js +11 -1
- package/src/panel/author.js +73 -4
- package/src/panel/authorcard.js +9 -6
- package/src/panel/data.js +41 -9
- package/src/panel/index.html +202 -13
- package/src/panel/result.js +4 -3
- package/src/panel/server.js +3 -1
- package/src/pickrecord.js +28 -0
- package/src/placerule.js +398 -0
- package/src/planrebuild.js +206 -0
- package/src/rowedit.js +118 -0
- package/src/rubricstep.js +264 -0
- package/src/runfile.js +4 -2
- package/src/runner.js +67 -10
- package/src/setup.js +10 -4
- package/src/sheetblock.js +6 -2
- package/src/sheetchecks.js +49 -64
- package/src/sheetclaims.js +12 -32
- package/src/sheetoffer.js +24 -52
- package/src/sheetrows.js +107 -0
- package/src/sheetrun.js +13 -10
- package/src/summary-words.js +3 -3
- package/src/try-checks.js +31 -12
- package/src/types.js +1 -0
- package/types/auditchecks.d.ts +24 -0
- package/types/authoring.d.ts +18 -1
- package/types/blockasks.d.ts +37 -0
- package/types/blockassemble.d.ts +33 -0
- package/types/blockdraft.d.ts +83 -0
- package/types/blocklines.d.ts +31 -0
- package/types/blockpick.d.ts +41 -0
- package/types/cardlist.d.ts +21 -0
- package/types/checkblock.d.ts +363 -0
- package/types/checked.d.ts +16 -2
- package/types/checklist.d.ts +115 -0
- package/types/checklistsign.d.ts +27 -0
- package/types/checkwords.d.ts +5 -0
- package/types/cited-record.d.ts +9 -0
- package/types/citedcheck.d.ts +33 -2
- package/types/closers.d.ts +24 -2
- package/types/declaredclose.d.ts +2 -0
- package/types/drafter.d.ts +15 -361
- package/types/factwords.d.ts +38 -0
- package/types/inputlook.d.ts +49 -0
- package/types/labelscan.d.ts +35 -0
- package/types/pageask.d.ts +2 -0
- package/types/panel/author.d.ts +41 -0
- package/types/panel/authorcard.d.ts +1 -1
- package/types/panel/data.d.ts +4 -2
- package/types/panel/jobgrid.d.ts +1 -1
- package/types/pickrecord.d.ts +22 -0
- package/types/placerule.d.ts +208 -0
- package/types/planrebuild.d.ts +52 -0
- package/types/provider.d.ts +1 -1
- package/types/rowedit.d.ts +33 -0
- package/types/rubricstep.d.ts +60 -0
- package/types/runfile.d.ts +5 -2
- package/types/runner.d.ts +45 -1
- package/types/sheetblock.d.ts +1 -0
- package/types/sheetchecks.d.ts +10 -17
- package/types/sheetclaims.d.ts +2 -1
- package/types/sheetoffer.d.ts +5 -5
- package/types/sheetrows.d.ts +73 -0
- package/types/sheetrun.d.ts +4 -4
- package/types/summary-words.d.ts +2 -1
- package/types/try-checks.d.ts +4 -2
- package/types/types.d.ts +8 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sheet rows of a declaration, read from its steps' `close.sheet`: the signed rows (for `declaration.checkList`) and the card rows (words, tag, whether a Drop is offered).
|
|
3
|
+
* @param {{declaration: any, lines: any[], csvRoles: string[]}} o
|
|
4
|
+
* @returns {{signed: Record<string, any>[], card: {key: string, line: number, by: 'you'|'agent', state: 'built', text: string, reason: null, drop: boolean}[]}}
|
|
5
|
+
*/
|
|
6
|
+
export function sheetRowsOf({ declaration, lines, csvRoles }: {
|
|
7
|
+
declaration: any;
|
|
8
|
+
lines: any[];
|
|
9
|
+
csvRoles: string[];
|
|
10
|
+
}): {
|
|
11
|
+
signed: Record<string, any>[];
|
|
12
|
+
card: {
|
|
13
|
+
key: string;
|
|
14
|
+
line: number;
|
|
15
|
+
by: "you" | "agent";
|
|
16
|
+
state: "built";
|
|
17
|
+
text: string;
|
|
18
|
+
reason: null;
|
|
19
|
+
drop: boolean;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The plan's card with the sheet rows on it: the sheet rows after the block's rows, a dropped sheet check among the suggestions (Add), as the block's dropped suggestions are.
|
|
24
|
+
* @param {{rows: any[], suggested: any[]}} card the block's card (src/cardlist.js) @param {{card: any[]}} sheet `sheetRowsOf` @param {{key: string, line: number, text: string}[]} [dropped]
|
|
25
|
+
*/
|
|
26
|
+
export function withSheetCard(card: {
|
|
27
|
+
rows: any[];
|
|
28
|
+
suggested: any[];
|
|
29
|
+
}, sheet: {
|
|
30
|
+
card: any[];
|
|
31
|
+
}, dropped?: {
|
|
32
|
+
key: string;
|
|
33
|
+
line: number;
|
|
34
|
+
text: string;
|
|
35
|
+
}[]): {
|
|
36
|
+
rows: any[];
|
|
37
|
+
suggested: any[];
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* The person's Drop or Add on a sheet row, applied to the declaration (a copy). Same words as the block's own refusals (src/checkblock.js `rowChoice`).
|
|
41
|
+
* @param {{declaration: any, lines: any[], csvRoles: string[], op: 'drop'|'add', key: string, dropped: any[]}} o
|
|
42
|
+
* @returns {{ok: true, declaration: any, dropped: any[]}|{ok: false, why: string}}
|
|
43
|
+
*/
|
|
44
|
+
export function sheetChoice({ declaration, lines, csvRoles, op, key, dropped }: {
|
|
45
|
+
declaration: any;
|
|
46
|
+
lines: any[];
|
|
47
|
+
csvRoles: string[];
|
|
48
|
+
op: "drop" | "add";
|
|
49
|
+
key: string;
|
|
50
|
+
dropped: any[];
|
|
51
|
+
}): {
|
|
52
|
+
ok: true;
|
|
53
|
+
declaration: any;
|
|
54
|
+
dropped: any[];
|
|
55
|
+
} | {
|
|
56
|
+
ok: false;
|
|
57
|
+
why: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* The list of a declaration with its sheet rows: the block's rows first, then the sheet rows. A declaration with no sheet check keeps the list exactly as it was.
|
|
61
|
+
* @param {{declaration: any, lines: any[], csvRoles: string[]}} o @returns {{declaration: any, sheet: ReturnType<typeof sheetRowsOf>}}
|
|
62
|
+
*/
|
|
63
|
+
export function withSheetRows({ declaration, lines, csvRoles }: {
|
|
64
|
+
declaration: any;
|
|
65
|
+
lines: any[];
|
|
66
|
+
csvRoles: string[];
|
|
67
|
+
}): {
|
|
68
|
+
declaration: any;
|
|
69
|
+
sheet: ReturnType<typeof sheetRowsOf>;
|
|
70
|
+
};
|
|
71
|
+
export function sheetRowKey(line: number, id: string): string;
|
|
72
|
+
export function isSheetKey(key: unknown): boolean;
|
|
73
|
+
export function droppedSheetOf(record: any): any[];
|
package/types/sheetrun.d.ts
CHANGED
|
@@ -34,10 +34,10 @@ export function readRunSheets(runDir: string, checks: any[]): {
|
|
|
34
34
|
*/
|
|
35
35
|
export function closeSheet(checks: any[], artifact: unknown, sheet: ReturnType<typeof readRunSheets> | null | undefined): Promise<import("./types.js").CloseVerdict>;
|
|
36
36
|
/**
|
|
37
|
-
* M10b am5: the `table` checks of a draft that already fail on the sheet the draft was made with. A table check judges the sheet itself, so bareguard's `
|
|
38
|
-
* run's
|
|
39
|
-
* Each check is read by its id
|
|
40
|
-
*
|
|
37
|
+
* M10b am5: the `table` checks of a draft that already fail on the sheet the draft was made with. A table check judges the sheet itself, so bareguard's `runTableChecks`
|
|
38
|
+
* (the same evaluation path as the run's `checkStep`) can run it before anything is spent: $0, no model call, no answer needed. Only `table` checks run; a cells check judges
|
|
39
|
+
* the step's answer and never runs here. Each check is its own rubric, read by its id. Only a `red` verdict is a red here: a `stopped` check (bareguard could not read the
|
|
40
|
+
* sheet) or a rubric bareguard refuses is not reported (the draft's own sheet look and sheetCheckReds have said so).
|
|
41
41
|
* @param {any} declaration the draft @param {Record<string, {header: string[], rows: any[]}>} tables the draft-time table of each CSV input, by role
|
|
42
42
|
* @returns {Promise<string[]>} one red per failing check, in plan order
|
|
43
43
|
*/
|
package/types/summary-words.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export function catchUpWords(rec: any): "This run was a catch-up: it started mor
|
|
|
45
45
|
/**
|
|
46
46
|
* ENDED / NEXT of a finished run. Every outcome the history row can hold has a fixed sentence; an unknown one gets an honest fixed fallback
|
|
47
47
|
* that names the code and guesses nothing. `null` when there is no ending (still running, waiting, or no history row and not died).
|
|
48
|
-
* @param {{outcome: string|null, died?: boolean, line: number|null, destination: string|null, canResume: boolean, home?: string, skipReason?: string}} f
|
|
48
|
+
* @param {{outcome: string|null, died?: boolean, line: number|null, destination: string|null, canResume: boolean, home?: string, skipReason?: string, anywayOffered?: boolean}} f
|
|
49
49
|
* @returns {{reason: string, next: string, rows?: Array<[string, string]>}|null}
|
|
50
50
|
*/
|
|
51
51
|
export function endedWords(f: {
|
|
@@ -56,6 +56,7 @@ export function endedWords(f: {
|
|
|
56
56
|
canResume: boolean;
|
|
57
57
|
home?: string;
|
|
58
58
|
skipReason?: string;
|
|
59
|
+
anywayOffered?: boolean;
|
|
59
60
|
}): {
|
|
60
61
|
reason: string;
|
|
61
62
|
next: string;
|
package/types/try-checks.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export function outputRecord(step: {
|
|
|
32
32
|
/**
|
|
33
33
|
* #3 and up: the close's own checks. A softgreen close carries each of its checks; a green close is one check over all its cited fields; a close that
|
|
34
34
|
* judged nothing (`unparseable`, `crash`) is one check that could not run, with that third outcome as its result.
|
|
35
|
-
* @param {any} step @param {any} artifact @param {{verdict: string, red?: string|null, checks?: Array<{text:string, ok:boolean, result:string|null}>}} closed
|
|
35
|
+
* @param {any} step @param {any} artifact @param {{verdict: string, red?: string|null, checks?: Array<{text:string, ok:boolean, result:string|null}>}} closed @param {any[]} [checkList] the signed list (M16): a line on it tags its checks
|
|
36
36
|
*/
|
|
37
37
|
export function closeRecords(step: any, artifact: any, closed: {
|
|
38
38
|
verdict: string;
|
|
@@ -42,8 +42,10 @@ export function closeRecords(step: any, artifact: any, closed: {
|
|
|
42
42
|
ok: boolean;
|
|
43
43
|
result: string | null;
|
|
44
44
|
}>;
|
|
45
|
-
}): any[];
|
|
45
|
+
}, checkList?: any[]): any[];
|
|
46
46
|
export const EVERY_STEP: "every step";
|
|
47
|
+
/** the words of the two checks every step has (#1 and #2 below): the Audit's "Always checked" rows, the plan card's and the Job tab's "Always checked" fold */
|
|
48
|
+
export const EVERY_STEP_TEXTS: readonly string[];
|
|
47
49
|
export function lineSource(step: {
|
|
48
50
|
fromLine?: unknown;
|
|
49
51
|
}): string;
|
package/types/types.d.ts
CHANGED
|
@@ -275,6 +275,14 @@ export type CloseVerdict = {
|
|
|
275
275
|
ok: boolean;
|
|
276
276
|
result: string | null;
|
|
277
277
|
}[] | undefined;
|
|
278
|
+
/**
|
|
279
|
+
* the numbers tie of a text line (M16 R7): beside the class's own verdict
|
|
280
|
+
*/
|
|
281
|
+
numbersCheck?: {
|
|
282
|
+
text: string;
|
|
283
|
+
ok: boolean;
|
|
284
|
+
result: string | null;
|
|
285
|
+
} | undefined;
|
|
278
286
|
/**
|
|
279
287
|
* a cited green close (M10 piece 4): the fact part and the check's own answer, for the run's cited-check record
|
|
280
288
|
*/
|