fwdloop 0.21.0 → 0.23.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 +85 -34
- package/package.json +4 -3
- package/src/ask.js +20 -4
- package/src/audit-fold.js +5 -1
- package/src/authoring.js +36 -6
- package/src/canrun.js +5 -0
- package/src/checked.js +32 -4
- package/src/cited-record.js +138 -0
- package/src/cited-source.js +49 -0
- package/src/citedcheck.js +321 -0
- package/src/citedwords.js +197 -0
- package/src/closers.js +37 -198
- package/src/csv.js +69 -12
- package/src/ctx-tools.js +2 -14
- package/src/declaration.js +143 -5
- package/src/diary.js +2 -2
- package/src/docx.js +16 -2
- package/src/draft-steps.js +1 -1
- package/src/drafter.js +322 -33
- package/src/flow.js +33 -7
- package/src/flowmodel.js +21 -0
- package/src/input-facts.js +20 -3
- package/src/model-step.js +38 -21
- package/src/pageask.js +136 -0
- package/src/pagebits.js +107 -0
- package/src/pagedropwords.js +171 -0
- package/src/pagedry.js +120 -0
- package/src/pagefetch.js +164 -0
- package/src/pagelook.js +155 -0
- package/src/pagemap.js +55 -0
- package/src/pageplace.js +103 -0
- package/src/pagerules.js +318 -0
- package/src/panel/author.js +43 -21
- package/src/panel/authorcard.js +20 -3
- package/src/panel/authorflows.js +21 -15
- package/src/panel/authorstart.js +2 -4
- package/src/panel/authortrigger.js +14 -4
- package/src/panel/data.js +102 -6
- package/src/panel/index.html +321 -12
- package/src/panel/result.js +301 -0
- package/src/panel/server.js +27 -3
- package/src/primitives.js +2 -3
- package/src/provider.js +5 -2
- package/src/redact.js +17 -0
- package/src/runner.js +102 -14
- package/src/schedule.js +3 -3
- package/src/setup.js +16 -1
- package/src/sheet-record.js +57 -0
- package/src/sheetblock.js +170 -0
- package/src/sheetchecks.js +206 -0
- package/src/sheetclaims.js +78 -0
- package/src/sheetfind.js +50 -0
- package/src/sheetlook.js +157 -0
- package/src/sheetoffer.js +125 -0
- package/src/sheetrun.js +105 -0
- package/src/signed-text.js +11 -1
- package/src/thinking.js +1 -1
- package/src/try-checks.js +12 -0
- package/src/types.js +4 -11
- package/types/ask.d.ts +2 -1
- package/types/authoring.d.ts +19 -2
- package/types/checked.d.ts +19 -3
- package/types/cited-record.d.ts +21 -0
- package/types/cited-source.d.ts +18 -0
- package/types/citedcheck.d.ts +95 -0
- package/types/citedwords.d.ts +97 -0
- package/types/closers.d.ts +37 -10
- package/types/csv.d.ts +25 -4
- package/types/ctx-tools.d.ts +0 -1
- package/types/declaration.d.ts +20 -1
- package/types/docx.d.ts +14 -0
- package/types/drafter.d.ts +264 -8
- package/types/flow.d.ts +21 -0
- package/types/flowmodel.d.ts +15 -0
- package/types/input-facts.d.ts +12 -2
- package/types/model-step.d.ts +40 -19
- package/types/pageask.d.ts +75 -0
- package/types/pagebits.d.ts +32 -0
- package/types/pagedropwords.d.ts +40 -0
- package/types/pagedry.d.ts +38 -0
- package/types/pagefetch.d.ts +86 -0
- package/types/pagelook.d.ts +75 -0
- package/types/pagemap.d.ts +31 -0
- package/types/pageplace.d.ts +22 -0
- package/types/pagerules.d.ts +86 -0
- package/types/panel/authorcard.d.ts +4 -1
- package/types/panel/authorflows.d.ts +2 -0
- package/types/panel/data.d.ts +26 -0
- package/types/panel/result.d.ts +156 -0
- package/types/provider.d.ts +3 -1
- package/types/redact.d.ts +1 -0
- package/types/runner.d.ts +162 -9
- package/types/schedule.d.ts +0 -11
- package/types/setup.d.ts +13 -0
- package/types/sheet-record.d.ts +24 -0
- package/types/sheetblock.d.ts +116 -0
- package/types/sheetchecks.d.ts +70 -0
- package/types/sheetclaims.d.ts +26 -0
- package/types/sheetfind.d.ts +46 -0
- package/types/sheetlook.d.ts +120 -0
- package/types/sheetoffer.d.ts +25 -0
- package/types/sheetrun.d.ts +35 -0
- package/types/thinking.d.ts +1 -1
- package/types/types.d.ts +27 -14
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M10 job = the run reads a web page, a CSV or a .docx (ladder, M10 am4 item 1). Read off the signed arbiter, never the run's files.
|
|
3
|
+
* @param {any} arbiter @returns {boolean}
|
|
4
|
+
*/
|
|
5
|
+
export function isResultRun(arbiter: any): boolean;
|
|
6
|
+
/** The run's check type: its distinct close classes, in step order (`hitl + softgreen`). `—` for a declaration with none.
|
|
7
|
+
* @param {any} declaration @returns {string} */
|
|
8
|
+
export function checkTypeOf(declaration: any): string;
|
|
9
|
+
/**
|
|
10
|
+
* The ONE reader of the M10 cited-check record (`<run>/cited-checks.json`). Expected shape (typed, nothing parsed out of prose):
|
|
11
|
+
* { lines: [ { n: int, source: string (the role of a signed source), passed: boolean,
|
|
12
|
+
* facts: [ { name: string, kind: 'phrase'|'value', sentence: string, confirmed?: true } ],
|
|
13
|
+
* rows: [ { n: int, quote: string, cells: string[] (one per fact), proof?: { text: string, marks: [[start, end], ...] } } ] | null,
|
|
14
|
+
* notChecked?: string[] } ] }
|
|
15
|
+
* `{present:false}` = no file. `{present:true, ok:false, red}` = a record that does not match (named, never half-read). Else `{present:true, ok:true, lines}`.
|
|
16
|
+
* @param {string} runDir
|
|
17
|
+
* @returns {{present: false}|{present: true, ok: false, red: string}|{present: true, ok: true, lines: any[]}}
|
|
18
|
+
*/
|
|
19
|
+
export function readCitedChecks(runDir: string): {
|
|
20
|
+
present: false;
|
|
21
|
+
} | {
|
|
22
|
+
present: true;
|
|
23
|
+
ok: false;
|
|
24
|
+
red: string;
|
|
25
|
+
} | {
|
|
26
|
+
present: true;
|
|
27
|
+
ok: true;
|
|
28
|
+
lines: any[];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The names of the facts of one job line whose limit came from an `agree` answer, read from the setup record's human rows (bareloop's confirmedFactNames,
|
|
32
|
+
* server.js@2959217): a look question on THIS line, answered agree / yes, whose reading (read back from the question's one spelling) is a signed `~` rule of
|
|
33
|
+
* the line word for word. A fact is confirmed when that reading starts with its name. No record, an own-words answer, another line or a reading that is not
|
|
34
|
+
* in the signed rule confirms nothing; nothing is guessed.
|
|
35
|
+
* @param {any[]} setupRows @param {number} lineN @param {string} signedRule the line's signed guardrail @param {string[]} factNames
|
|
36
|
+
* @returns {Set<string>}
|
|
37
|
+
*/
|
|
38
|
+
export function confirmedFactNames(setupRows: any[], lineN: number, signedRule: string, factNames: string[]): Set<string>;
|
|
39
|
+
/**
|
|
40
|
+
* One saved file, read for the tab or a download, through the one safe gateway (`readFileInside`: not a symlink, real path inside the signed folder's
|
|
41
|
+
* real path, checked at USE time). It must also still hash to the recorded sha256. A missing, refused or changed file is a state, never content:
|
|
42
|
+
* stale bytes are never returned. (Text read, so a file that is not UTF-8 reads as "changed", never as ok.)
|
|
43
|
+
* @param {{name: string, dir: string|null, sha256: string|null}} rec
|
|
44
|
+
* @returns {{state: 'ok', buf: Buffer}|{state: 'gone'|'changed', buf: null}}
|
|
45
|
+
*/
|
|
46
|
+
export function readDelivered(rec: {
|
|
47
|
+
name: string;
|
|
48
|
+
dir: string | null;
|
|
49
|
+
sha256: string | null;
|
|
50
|
+
}): {
|
|
51
|
+
state: "ok";
|
|
52
|
+
buf: Buffer;
|
|
53
|
+
} | {
|
|
54
|
+
state: "gone" | "changed";
|
|
55
|
+
buf: null;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The files this run's signed sends wrote: for each signed send whose send step ended green in the audit, the file `<flow>-<runId>-<emits>.json`
|
|
59
|
+
* in the signed folder, with the sha256 the human's accept recorded for the ask that send reads (`readAcceptedHashesByEmits`, the same record the
|
|
60
|
+
* send itself checked). No accepted hash = recorded as null, which reads as "changed", never as ok.
|
|
61
|
+
* @returns {{path: string, dir: string|null, name: string, sha256: string|null}[]}
|
|
62
|
+
*/
|
|
63
|
+
export function deliveredOf({ arbiter, declaration, runDir, root, flow, runId, auditRows, }: {
|
|
64
|
+
arbiter: any;
|
|
65
|
+
declaration: any;
|
|
66
|
+
runDir: any;
|
|
67
|
+
root: any;
|
|
68
|
+
flow: any;
|
|
69
|
+
runId: any;
|
|
70
|
+
auditRows: any;
|
|
71
|
+
}): {
|
|
72
|
+
path: string;
|
|
73
|
+
dir: string | null;
|
|
74
|
+
name: string;
|
|
75
|
+
sha256: string | null;
|
|
76
|
+
}[];
|
|
77
|
+
/**
|
|
78
|
+
* The Result tab's JSON for one run (`GET /api/runs/:flow/:runId/result`).
|
|
79
|
+
* @param {{flow: string, runId: string, runDir: string, root: string, flowRead: any, arbiter: any, historyRow: any, auditRows: any[], logJson: any, notChecked: string[], readNotes?: string[], setupRows?: any[], door?: {askId: string, draftNo: number}|null}} a
|
|
80
|
+
*/
|
|
81
|
+
export function buildResult({ flow, runId, runDir, root, flowRead, arbiter, historyRow, auditRows, logJson, notChecked, readNotes, setupRows, door, }: {
|
|
82
|
+
flow: string;
|
|
83
|
+
runId: string;
|
|
84
|
+
runDir: string;
|
|
85
|
+
root: string;
|
|
86
|
+
flowRead: any;
|
|
87
|
+
arbiter: any;
|
|
88
|
+
historyRow: any;
|
|
89
|
+
auditRows: any[];
|
|
90
|
+
logJson: any;
|
|
91
|
+
notChecked: string[];
|
|
92
|
+
readNotes?: string[];
|
|
93
|
+
setupRows?: any[];
|
|
94
|
+
door?: {
|
|
95
|
+
askId: string;
|
|
96
|
+
draftNo: number;
|
|
97
|
+
} | null;
|
|
98
|
+
}): {
|
|
99
|
+
flow: string;
|
|
100
|
+
runId: string;
|
|
101
|
+
lines: any;
|
|
102
|
+
pages: string[];
|
|
103
|
+
pageNote: string | null;
|
|
104
|
+
notCheckedLabel: string;
|
|
105
|
+
notChecked: string[];
|
|
106
|
+
readNotes: string[];
|
|
107
|
+
delivered: {
|
|
108
|
+
i: number;
|
|
109
|
+
path: string;
|
|
110
|
+
name: string;
|
|
111
|
+
bytes: number | null;
|
|
112
|
+
state: "ok" | "gone" | "changed";
|
|
113
|
+
words: string | null;
|
|
114
|
+
}[];
|
|
115
|
+
gap: {
|
|
116
|
+
line: string;
|
|
117
|
+
more: number;
|
|
118
|
+
moreText: string | null;
|
|
119
|
+
} | null;
|
|
120
|
+
door: {
|
|
121
|
+
head: string;
|
|
122
|
+
ask: string;
|
|
123
|
+
askId: string;
|
|
124
|
+
draftNo: number;
|
|
125
|
+
} | null;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* `GET /api/runs/:flow/:runId/download?i=<n>` — saved file `n` (an index into the run's own list), or why not. The path is the books', never the request's.
|
|
129
|
+
* @param {{index: unknown, ctx: any}} a
|
|
130
|
+
* @returns {{ok: true, name: string, type: string, buf: Buffer}|{ok: false, code: number, error: string}}
|
|
131
|
+
*/
|
|
132
|
+
export function downloadOf({ index, ctx }: {
|
|
133
|
+
index: unknown;
|
|
134
|
+
ctx: any;
|
|
135
|
+
}): {
|
|
136
|
+
ok: true;
|
|
137
|
+
name: string;
|
|
138
|
+
type: string;
|
|
139
|
+
buf: Buffer;
|
|
140
|
+
} | {
|
|
141
|
+
ok: false;
|
|
142
|
+
code: number;
|
|
143
|
+
error: string;
|
|
144
|
+
};
|
|
145
|
+
/** the two sentences for a saved file that is no longer what the run wrote (code-owned, one spelling) */
|
|
146
|
+
export const RESULT_FILE_GONE: "the saved file is gone";
|
|
147
|
+
export const RESULT_FILE_CHANGED: "the saved file changed after the run";
|
|
148
|
+
/** the words beside a Result-tab page link: the page is read again from the web, so it can differ from what the run read */
|
|
149
|
+
export const RESULT_PAGE_MAY_CHANGE: "The page may have changed since this run.";
|
|
150
|
+
/** the words after a fact whose limit the person agreed to */
|
|
151
|
+
export const RESULT_YOU_CONFIRMED: "(you confirmed)";
|
|
152
|
+
/** the Your-call card's words (bareloop server.js@2959217 DOOR_WORDS.waiting.head and RESULT_DOOR_ASK); the page types none of them */
|
|
153
|
+
export const RESULT_DOOR_HEAD: "waiting for you";
|
|
154
|
+
export const RESULT_DOOR_ASK: "the checks passed; is this what you wanted?";
|
|
155
|
+
export { CITED_CHECKS_FILE };
|
|
156
|
+
import { CITED_CHECKS_FILE } from '../cited-record.js';
|
package/types/provider.d.ts
CHANGED
|
@@ -124,11 +124,13 @@ export function readPriceConfig(home?: string): Record<string, any>;
|
|
|
124
124
|
* The money hold (USD) of one round: the picked model's OWN Settings prices (`rates`, per 1K tokens, from
|
|
125
125
|
* `resolveUsableModel`) times the two token bounds above. Not a table, not a fallback.
|
|
126
126
|
* @param {{ in: number, out: number }} rates
|
|
127
|
+
* @param {number} [promptChars] the length of a prompt known before the call (M10: a page-map prompt carries a whole saved page): the input bound is then
|
|
128
|
+
* the larger of the constant and a deliberately high estimate of that prompt (3 characters per token), never less than the constant.
|
|
127
129
|
*/
|
|
128
130
|
export function ceilingCostUsd(rates: {
|
|
129
131
|
in: number;
|
|
130
132
|
out: number;
|
|
131
|
-
}): number;
|
|
133
|
+
}, promptChars?: number): number;
|
|
132
134
|
/**
|
|
133
135
|
* Compare the model asked for against the model actually served.
|
|
134
136
|
* `match` identical; `prefix` identical once a routing prefix is stripped;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function redactSecrets(raw: unknown): string;
|
package/types/runner.d.ts
CHANGED
|
@@ -64,24 +64,72 @@ export function checkFreshRunDir(runDir: any): {
|
|
|
64
64
|
ok: boolean;
|
|
65
65
|
red?: undefined;
|
|
66
66
|
};
|
|
67
|
+
/** M10 item 1: fetch a web page and freeze its text as `<dir>/<id>.txt`; the sha256 is of the FROZEN bytes, like a file input. The ONE writer of a
|
|
68
|
+
* page's frozen copy: drafting calls it with its draft folder, a run start (via `freezeInputs`) with the run's `inputs/`, so the two are
|
|
69
|
+
* separate files and a run is only ever checked against its own. The fetch is tried once; a refusal names the input and says why in plain words.
|
|
70
|
+
* @param {string} dir @param {string} id @param {string} url
|
|
71
|
+
* @param {{fetchPage?: (url: string) => Promise<{ok: true, text: string, url: string}|{ok: false, error: string}>}} [o]
|
|
72
|
+
* @returns {Promise<{ok: true, text: string, entry: {id: string, source: string, frozen: string, sha256: string, bytes: number}}|{ok: false, red: string}>} `text` = the frozen text itself, for the caller that reads it (drafting) */
|
|
73
|
+
export function freezePage(dir: string, id: string, url: string, { fetchPage }?: {
|
|
74
|
+
fetchPage?: (url: string) => Promise<{
|
|
75
|
+
ok: true;
|
|
76
|
+
text: string;
|
|
77
|
+
url: string;
|
|
78
|
+
} | {
|
|
79
|
+
ok: false;
|
|
80
|
+
error: string;
|
|
81
|
+
}>;
|
|
82
|
+
}): Promise<{
|
|
83
|
+
ok: true;
|
|
84
|
+
text: string;
|
|
85
|
+
entry: {
|
|
86
|
+
id: string;
|
|
87
|
+
source: string;
|
|
88
|
+
frozen: string;
|
|
89
|
+
sha256: string;
|
|
90
|
+
bytes: number;
|
|
91
|
+
};
|
|
92
|
+
} | {
|
|
93
|
+
ok: false;
|
|
94
|
+
red: string;
|
|
95
|
+
}>;
|
|
67
96
|
/** Copy each named source into `<runDir>/inputs/`, hash the FROZEN copy
|
|
68
97
|
* (never the original again after this), write `inputs.json`. An
|
|
69
|
-
* unreadable source refuses by name.
|
|
70
|
-
|
|
98
|
+
* unreadable source refuses by name. A source that is a web address
|
|
99
|
+
* (M10 item 1) is fetched and frozen by `freezePage`, in the same manifest.
|
|
100
|
+
* @param {string} runDir @param {Array<{id: string, path: string}>} sources
|
|
101
|
+
* M10b amendment 1: a CSV input named in `tableRoles` (the sheets a step's `close.sheet` reads) also gets its `tableSha` (bareguard's fingerprint of the table made
|
|
102
|
+
* from the FROZEN copy) in its manifest entry - the ONE place it is written, once, with the run's inputs; every sheet check of the run uses this recorded value.
|
|
103
|
+
* A sheet bareguard cannot read as a table refuses the run here, naming the input.
|
|
104
|
+
* @param {{fetchPage?: (url: string) => Promise<{ok: true, text: string, url: string}|{ok: false, error: string}>, tableRoles?: string[]}} [o] */
|
|
105
|
+
export function freezeInputs(runDir: string, sources: Array<{
|
|
106
|
+
id: string;
|
|
107
|
+
path: string;
|
|
108
|
+
}>, { fetchPage, tableRoles }?: {
|
|
109
|
+
fetchPage?: (url: string) => Promise<{
|
|
110
|
+
ok: true;
|
|
111
|
+
text: string;
|
|
112
|
+
url: string;
|
|
113
|
+
} | {
|
|
114
|
+
ok: false;
|
|
115
|
+
error: string;
|
|
116
|
+
}>;
|
|
117
|
+
tableRoles?: string[];
|
|
118
|
+
}): Promise<{
|
|
71
119
|
ok: boolean;
|
|
72
120
|
red: string;
|
|
73
121
|
manifest?: undefined;
|
|
74
122
|
} | {
|
|
75
123
|
ok: boolean;
|
|
76
|
-
manifest: {
|
|
77
|
-
id:
|
|
78
|
-
source:
|
|
124
|
+
manifest: (Record<string, any> | {
|
|
125
|
+
id: string;
|
|
126
|
+
source: string;
|
|
79
127
|
frozen: string;
|
|
80
128
|
sha256: string;
|
|
81
129
|
bytes: number;
|
|
82
|
-
}[];
|
|
130
|
+
})[];
|
|
83
131
|
red?: undefined;
|
|
84
|
-
}
|
|
132
|
+
}>;
|
|
85
133
|
/** The send target's folder (M4e amendment 1, "Destination is any folder").
|
|
86
134
|
* An absolute `file:/abs/path` is that folder, anywhere on the machine. A
|
|
87
135
|
* relative path keeps its M0/M2 meaning: joined onto the install folder and
|
|
@@ -148,6 +196,92 @@ export function readArtifactResult(runDir: any, id: any): {
|
|
|
148
196
|
* `readArtifactResult`.
|
|
149
197
|
*/
|
|
150
198
|
export function readArtifact(runDir: any, id: any): any;
|
|
199
|
+
/** `readArtifactResult` for a whole `reads` array. A genuinely-missing read
|
|
200
|
+
* (never written) still renders as `undefined` in the map, unchanged from
|
|
201
|
+
* before — but a REFUSED read (red) is never silently folded in as
|
|
202
|
+
* `undefined` alongside it; the caller gets `{ok:false, red}` instead and
|
|
203
|
+
* must halt rather than feed tampered/unreadable content (or a `undefined`
|
|
204
|
+
* indistinguishable from "not written yet") into a step.
|
|
205
|
+
* @returns {{ok:true, map:Record<string,any>} | {ok:false, red:string}}
|
|
206
|
+
*/
|
|
207
|
+
export function readArtifactsMapChecked(runDir: any, ids: any, { docxRoles }?: {
|
|
208
|
+
docxRoles?: string[] | undefined;
|
|
209
|
+
}): {
|
|
210
|
+
ok: true;
|
|
211
|
+
map: Record<string, any>;
|
|
212
|
+
} | {
|
|
213
|
+
ok: false;
|
|
214
|
+
red: string;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Run one step to green (or hitl pass-through), looping under strikes and
|
|
218
|
+
* the attempt fallback. Returns `{ ok:true, artifact, attempts }` on success
|
|
219
|
+
* or `{ ok:false, outcome, red }` on any halt. Appends one audit row per
|
|
220
|
+
* attempt via `deps.recordAudit`. Never throws for a model/close failure —
|
|
221
|
+
* only a programmer error (a malformed step, an unreachable branch) escapes.
|
|
222
|
+
*
|
|
223
|
+
* @param {object} opts
|
|
224
|
+
* @param {any} opts.step
|
|
225
|
+
* @param {Record<string, any>} [opts.primitivesMap]
|
|
226
|
+
* @param {Record<string, any>} opts.readsMap
|
|
227
|
+
* @param {string} opts.businessDate
|
|
228
|
+
* @param {(executorContext:object, grantedTools:Record<string,any>, stepMeta?:{class:string|null}, seam?:{stopRequested?:() => boolean}) => Promise<any>} opts.modelStep
|
|
229
|
+
* @param {{ value: number }} opts.spent
|
|
230
|
+
* @param {number} opts.capUsd
|
|
231
|
+
* @param {number} opts.ceilingUsd
|
|
232
|
+
* @param {(row: any, modelOutput?: any) => void} opts.recordAudit
|
|
233
|
+
* @param {string|null} [opts.initialGap]
|
|
234
|
+
* @param {number} [opts.attemptOffset]
|
|
235
|
+
* @param {boolean} [opts.thinkingBox] - M4d am25: the job's "Thinking on" box as this run's copy keeps it (default off)
|
|
236
|
+
* @param {() => string} [opts.now] - M4a-2: stamps each audit row's `at`;
|
|
237
|
+
* defaults to the real wall clock.
|
|
238
|
+
* @param {(() => boolean)|null} [opts.readStop] - amendment 7 item 8: the run's stop reader, asked before every try and (via modelStep's seam) every model call
|
|
239
|
+
* @param {number} [opts.stepNo] - this step's 1-based number, for the words of a stop row
|
|
240
|
+
* @param {string|null} [opts.prevStepId] - the id of step stepNo-1 (null for step 1): the step a "stopped after step N-1" row is filed under
|
|
241
|
+
* @param {number} [opts.triesDone] - tries a Stop already closed on this step (they count against its limit)
|
|
242
|
+
* @param {string|null} [opts.runDir] - M4d am29 item 2: the run's folder, where each try saves its checks
|
|
243
|
+
* @returns {Promise<{ok:true, artifact:any, attempts:number, hitl?:boolean} | {ok:false, outcome:string, red:string, stop?:{where:string, book:Record<string, any>, step?:string|null}}>}
|
|
244
|
+
*/
|
|
245
|
+
export function runStepRalph({ step, primitivesMap, readsMap, businessDate, modelStep, spent, capUsd, ceilingUsd, recordAudit, initialGap, attemptOffset, thinkingBox, now, readStop, stepNo, triesDone, runDir, prevStepId, }: {
|
|
246
|
+
step: any;
|
|
247
|
+
primitivesMap?: Record<string, any> | undefined;
|
|
248
|
+
readsMap: Record<string, any>;
|
|
249
|
+
businessDate: string;
|
|
250
|
+
modelStep: (executorContext: object, grantedTools: Record<string, any>, stepMeta?: {
|
|
251
|
+
class: string | null;
|
|
252
|
+
}, seam?: {
|
|
253
|
+
stopRequested?: () => boolean;
|
|
254
|
+
}) => Promise<any>;
|
|
255
|
+
spent: {
|
|
256
|
+
value: number;
|
|
257
|
+
};
|
|
258
|
+
capUsd: number;
|
|
259
|
+
ceilingUsd: number;
|
|
260
|
+
recordAudit: (row: any, modelOutput?: any) => void;
|
|
261
|
+
initialGap?: string | null | undefined;
|
|
262
|
+
attemptOffset?: number | undefined;
|
|
263
|
+
thinkingBox?: boolean | undefined;
|
|
264
|
+
now?: (() => string) | undefined;
|
|
265
|
+
readStop?: (() => boolean) | null | undefined;
|
|
266
|
+
stepNo?: number | undefined;
|
|
267
|
+
prevStepId?: string | null | undefined;
|
|
268
|
+
triesDone?: number | undefined;
|
|
269
|
+
runDir?: string | null | undefined;
|
|
270
|
+
}): Promise<{
|
|
271
|
+
ok: true;
|
|
272
|
+
artifact: any;
|
|
273
|
+
attempts: number;
|
|
274
|
+
hitl?: boolean;
|
|
275
|
+
} | {
|
|
276
|
+
ok: false;
|
|
277
|
+
outcome: string;
|
|
278
|
+
red: string;
|
|
279
|
+
stop?: {
|
|
280
|
+
where: string;
|
|
281
|
+
book: Record<string, any>;
|
|
282
|
+
step?: string | null;
|
|
283
|
+
};
|
|
284
|
+
}>;
|
|
151
285
|
/**
|
|
152
286
|
* @param {object} opts
|
|
153
287
|
* @param {string} opts.root - the flows root directory (M1's `readFlow` root).
|
|
@@ -163,15 +297,17 @@ export function readArtifact(runDir: any, id: any): any;
|
|
|
163
297
|
* @param {() => string} [opts.clock] - returns the current ISO timestamp; defaults to the wall clock.
|
|
164
298
|
* @param {string} opts.businessDate - the run's explicit "as of today", never the wall clock.
|
|
165
299
|
* @param {number} [opts.ceilingUsd] - per-attempt ceiling override; the model's hold from Settings prices (`ceilingCostUsd`); absent = no hold.
|
|
300
|
+
* @param {{slot: string, model: string}} [opts.runModel] - M4d am33: the model this run started on; recorded once in the run folder (run-model.json) and kept by every resume/continue.
|
|
166
301
|
* @param {string|null} [opts.initialGap] - M3 scope item 7 (rerun as a fresh
|
|
167
302
|
* run): a human's rerun reason, carried as the FIRST ordinary step's
|
|
168
303
|
* starting gap. Never used by a plain `runFlow` call outside `resumeRun`'s
|
|
169
304
|
* own rerun path.
|
|
305
|
+
* @param {(url: string) => Promise<{ok: true, text: string, url: string}|{ok: false, error: string}>} [opts.fetchPage] - M10: the web-page fetch (default barebrowse via src/pagefetch.js); a test injects one.
|
|
170
306
|
* @param {() => number} [opts.nowMs] - F45 finding 3: returns the current
|
|
171
307
|
* epoch ms; defaults to the wall clock. Mirrors `clock` (ISO) so a test
|
|
172
308
|
* can advance wall time across a park/resume boundary without a real wait.
|
|
173
309
|
*/
|
|
174
|
-
export function runFlow({ root, name, runId, sources, catalogue, modelStep, askStep, sendStep, primitives, primitiveReds, clock, businessDate, ceilingUsd, initialGap, nowMs, }: {
|
|
310
|
+
export function runFlow({ root, name, runId, sources, catalogue, modelStep, askStep, sendStep, primitives, primitiveReds, clock, businessDate, ceilingUsd, initialGap, fetchPage, runModel, nowMs, }: {
|
|
175
311
|
root: string;
|
|
176
312
|
name: string;
|
|
177
313
|
runId: string;
|
|
@@ -210,7 +346,19 @@ export function runFlow({ root, name, runId, sources, catalogue, modelStep, askS
|
|
|
210
346
|
clock?: (() => string) | undefined;
|
|
211
347
|
businessDate: string;
|
|
212
348
|
ceilingUsd?: number | undefined;
|
|
349
|
+
runModel?: {
|
|
350
|
+
slot: string;
|
|
351
|
+
model: string;
|
|
352
|
+
} | undefined;
|
|
213
353
|
initialGap?: string | null | undefined;
|
|
354
|
+
fetchPage?: ((url: string) => Promise<{
|
|
355
|
+
ok: true;
|
|
356
|
+
text: string;
|
|
357
|
+
url: string;
|
|
358
|
+
} | {
|
|
359
|
+
ok: false;
|
|
360
|
+
error: string;
|
|
361
|
+
}>) | undefined;
|
|
214
362
|
nowMs?: (() => number) | undefined;
|
|
215
363
|
}): Promise<any>;
|
|
216
364
|
/** An ask step that never waits — it immediately tells the fold to park.
|
|
@@ -243,10 +391,11 @@ export function makeParkingAskStep(): (opts?: any) => Promise<{
|
|
|
243
391
|
* @param {() => string} [opts.clock]
|
|
244
392
|
* @param {string} opts.businessDate
|
|
245
393
|
* @param {number} [opts.ceilingUsd]
|
|
394
|
+
* @param {{slot: string, model: string}} [opts.runModel] - M4d am33: the model this run started on; recorded once in the run folder (run-model.json) and kept by every resume/continue.
|
|
246
395
|
* @param {() => number} [opts.nowMs] - F45 finding 3; see `runFlow`'s own.
|
|
247
396
|
* @param {(newRunDir:string) => void} [opts.onRerunStart] - amendment 16 C2: called with the new run's folder just before a `rerun` starts it.
|
|
248
397
|
*/
|
|
249
|
-
export function resumeRun({ root, name, runId, catalogue, modelStep, sendStep, primitives, primitiveReds, clock, businessDate, ceilingUsd, nowMs, onRerunStart, }: {
|
|
398
|
+
export function resumeRun({ root, name, runId, catalogue, modelStep, sendStep, primitives, primitiveReds, clock, businessDate, ceilingUsd, runModel, nowMs, onRerunStart, }: {
|
|
250
399
|
root: string;
|
|
251
400
|
name: string;
|
|
252
401
|
runId: string;
|
|
@@ -264,6 +413,10 @@ export function resumeRun({ root, name, runId, catalogue, modelStep, sendStep, p
|
|
|
264
413
|
clock?: (() => string) | undefined;
|
|
265
414
|
businessDate: string;
|
|
266
415
|
ceilingUsd?: number | undefined;
|
|
416
|
+
runModel?: {
|
|
417
|
+
slot: string;
|
|
418
|
+
model: string;
|
|
419
|
+
} | undefined;
|
|
267
420
|
nowMs?: (() => number) | undefined;
|
|
268
421
|
onRerunStart?: ((newRunDir: string) => void) | undefined;
|
|
269
422
|
}): Promise<any>;
|
package/types/schedule.d.ts
CHANGED
|
@@ -26,17 +26,6 @@ export function carryQueue(flowDir: string, from: string, to: string): void;
|
|
|
26
26
|
export function finishCarry(flowDir: string, from: string, nowMs: number): void;
|
|
27
27
|
/** Cancel's own row in the ledger. @param {string} flowDir @param {string} sig @param {number} nowMs */
|
|
28
28
|
export function recordCancelled(flowDir: string, sig: string, nowMs: number): void;
|
|
29
|
-
/** @typedef {import('./trigger-line.js').Trigger} Trigger */
|
|
30
|
-
/**
|
|
31
|
-
* @typedef {{
|
|
32
|
-
* v: 1, flow: string, trigger: Trigger, flowSignatureHash: string, bound: string, sig: string, signedBy: string, signedAt: string,
|
|
33
|
-
* model: {slot: string, model: string}|null, destination: string|null, inputs: {role: string, path: string}[]|null,
|
|
34
|
-
* plan: {run: string, flowHash: string, declSha: string}|null, from: string|null,
|
|
35
|
-
* }} Schedule
|
|
36
|
-
*/
|
|
37
|
-
export const SCHEDULE_FILE: "schedule.json";
|
|
38
|
-
export const LEDGER_FILE: "schedule-ledger.jsonl";
|
|
39
|
-
export function droppedSay(name: string): string;
|
|
40
29
|
export function scheduleFileOf(flowDir: string): string;
|
|
41
30
|
export function ledgerOf(flowDir: string): string;
|
|
42
31
|
export function sigOf(bound: string, signedAt: string): string;
|
package/types/setup.d.ts
CHANGED
|
@@ -31,6 +31,19 @@ export function buildSetupRows({ sessionDir, planDir, hash, signedBy, signedAt,
|
|
|
31
31
|
verdict: string;
|
|
32
32
|
hash: string | null;
|
|
33
33
|
gap: string | null;
|
|
34
|
+
} | {
|
|
35
|
+
kind: string;
|
|
36
|
+
n: number;
|
|
37
|
+
at: string | null;
|
|
38
|
+
source: string;
|
|
39
|
+
ask: string | undefined;
|
|
40
|
+
question: string;
|
|
41
|
+
answer: string | null;
|
|
42
|
+
line: number;
|
|
43
|
+
ruleNo: number | undefined;
|
|
44
|
+
ruleText: string | undefined;
|
|
45
|
+
proposal: string | null;
|
|
46
|
+
rule: string | null;
|
|
34
47
|
} | {
|
|
35
48
|
kind: string;
|
|
36
49
|
n: number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} runDir @param {{n: number, try: number, checks: any[], closed: {verdict: string, red?: string|null, sheetRecord?: any}}} o
|
|
3
|
+
* @returns {void}
|
|
4
|
+
*/
|
|
5
|
+
export function writeSheetLine(runDir: string, { n, try: attempt, checks, closed }: {
|
|
6
|
+
n: number;
|
|
7
|
+
try: number;
|
|
8
|
+
checks: any[];
|
|
9
|
+
closed: {
|
|
10
|
+
verdict: string;
|
|
11
|
+
red?: string | null;
|
|
12
|
+
sheetRecord?: any;
|
|
13
|
+
};
|
|
14
|
+
}): void;
|
|
15
|
+
/**
|
|
16
|
+
* The reader of the record, for the Result tab and the separate checker: `{lines: [...]}`, or null when the file is missing or is not that shape (the page then
|
|
17
|
+
* shows no verdicts, never a half-read record). Read through the safe gateway.
|
|
18
|
+
* @param {string} runDir @returns {{lines: any[]}|null}
|
|
19
|
+
*/
|
|
20
|
+
export function readSheetChecks(runDir: string): {
|
|
21
|
+
lines: any[];
|
|
22
|
+
} | null;
|
|
23
|
+
/** the record's name in the run's own folder */
|
|
24
|
+
export const SHEET_CHECKS_FILE: "sheet-checks.json";
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/** the ops of bareguard that a name is needed for @returns {string[]} */
|
|
2
|
+
export function vocabularyOps(): string[];
|
|
3
|
+
/** @param {any} check a bareguard cells / table check @returns {string} the short name: `rows`, `count`, `sum`, `no duplicate Invoice #` ... */
|
|
4
|
+
export function sheetCheckName(check: any): string;
|
|
5
|
+
/**
|
|
6
|
+
* What the step claimed for one check, in plain words (a green check's "found"). Null when the claim has nothing to say (a `table` check, a missing box, a string).
|
|
7
|
+
* @param {any} check @param {unknown} claims the step's answer @returns {string|null}
|
|
8
|
+
*/
|
|
9
|
+
export function sheetFoundWords(check: any, claims: unknown): string | null;
|
|
10
|
+
/**
|
|
11
|
+
* The block of every job line whose step reads a sheet. A line qualifies when its green step carries `close.sheet`, or (with `csvRoles`) reads a CSV input and carries no
|
|
12
|
+
* older `close.columns` / `close.cited` check (then every guardrail is Not checked).
|
|
13
|
+
* @param {{declaration: any, lines: Array<{n: number, rules?: string[], guardrail?: string, rule?: string}>, csvRoles?: string[], record?: any}} o
|
|
14
|
+
* `record` = the parsed `sheet-checks.json` (`{lines: [...]}`), only after a run
|
|
15
|
+
* @returns {Array<{line: number, guardrails: string[], checked: Array<{id: string, name: string, words: string, covers: string[], coversWords: string, text: string, ok?: boolean, found?: string}>, notChecked: string[]|'none'}>}
|
|
16
|
+
*/
|
|
17
|
+
export function sheetLineBlocks({ declaration, lines, csvRoles, record }: {
|
|
18
|
+
declaration: any;
|
|
19
|
+
lines: Array<{
|
|
20
|
+
n: number;
|
|
21
|
+
rules?: string[];
|
|
22
|
+
guardrail?: string;
|
|
23
|
+
rule?: string;
|
|
24
|
+
}>;
|
|
25
|
+
csvRoles?: string[];
|
|
26
|
+
record?: any;
|
|
27
|
+
}): Array<{
|
|
28
|
+
line: number;
|
|
29
|
+
guardrails: string[];
|
|
30
|
+
checked: Array<{
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
words: string;
|
|
34
|
+
covers: string[];
|
|
35
|
+
coversWords: string;
|
|
36
|
+
text: string;
|
|
37
|
+
ok?: boolean;
|
|
38
|
+
found?: string;
|
|
39
|
+
}>;
|
|
40
|
+
notChecked: string[] | "none";
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* The guardrail rules of a sheet step that no check covers, as the drafter's Not-checked lines (`line N: "rule" - no sheet check covers it`): the block's own
|
|
44
|
+
* `notChecked`, one list for the plan card and the drafter's saved record.
|
|
45
|
+
* @param {any} declaration @param {Array<{n: number, rules?: string[], guardrail?: string, rule?: string}>} lines @param {string[]} csvRoles @returns {string[]}
|
|
46
|
+
*/
|
|
47
|
+
export function uncoveredRules(declaration: any, lines: Array<{
|
|
48
|
+
n: number;
|
|
49
|
+
rules?: string[];
|
|
50
|
+
guardrail?: string;
|
|
51
|
+
rule?: string;
|
|
52
|
+
}>, csvRoles: string[]): string[];
|
|
53
|
+
/** @param {any} arbiter @returns {string[]} the roles of the signed sources that are a CSV file (the sheets a check reads) */
|
|
54
|
+
export function csvRolesOf(arbiter: any): string[];
|
|
55
|
+
/**
|
|
56
|
+
* M10b am4: the step's answer (its claim boxes) value by value, one line each: `invoiceCount: 8`, `daysPastDue: row 2 -> 124`. A list is one line per entry (a list of row
|
|
57
|
+
* numbers reads `row N`); a map is one line per key (`row <key> -> <value>`). An empty list or map reads `<name>: none`, never no line.
|
|
58
|
+
* Throws away: nothing but the box's own key (`value`, `rows`, `days`...), which the line's words already say.
|
|
59
|
+
* @param {unknown} claims the step's answer @returns {string[]}
|
|
60
|
+
*/
|
|
61
|
+
export function claimLines(claims: unknown): string[];
|
|
62
|
+
/**
|
|
63
|
+
* M10b am4: what an ask card shows for the claim boxes it was given. The step is the sheet step whose saved try (`sheet-checks.json`) holds exactly these claims; its block is
|
|
64
|
+
* the Result tab's own (`sheetLineBlocks`, that try's verdicts), and `answer` is the claims value by value. Null when no saved try matches: the caller then keeps the old line.
|
|
65
|
+
* @param {{claims: unknown, declaration: any, lines: Array<{n: number, rules?: string[], guardrail?: string, rule?: string}>, csvRoles?: string[], record?: any}} o
|
|
66
|
+
* @returns {{block: ReturnType<typeof sheetLineBlocks>[number], answer: string[]}|null}
|
|
67
|
+
*/
|
|
68
|
+
export function askSheetCard({ claims, declaration, lines, csvRoles, record }: {
|
|
69
|
+
claims: unknown;
|
|
70
|
+
declaration: any;
|
|
71
|
+
lines: Array<{
|
|
72
|
+
n: number;
|
|
73
|
+
rules?: string[];
|
|
74
|
+
guardrail?: string;
|
|
75
|
+
rule?: string;
|
|
76
|
+
}>;
|
|
77
|
+
csvRoles?: string[];
|
|
78
|
+
record?: any;
|
|
79
|
+
}): {
|
|
80
|
+
block: ReturnType<typeof sheetLineBlocks>[number];
|
|
81
|
+
answer: string[];
|
|
82
|
+
} | null;
|
|
83
|
+
/** the short plain name of each bareguard op (the ONE table; a test fails when bareguard gains an op this table does not name). `noDuplicates` and `noEmpty` add the column. */
|
|
84
|
+
export const SHEET_OP_NAMES: Readonly<{
|
|
85
|
+
count: "count";
|
|
86
|
+
countEmpty: "empty count";
|
|
87
|
+
countIf: "count";
|
|
88
|
+
uniqueCount: "unique count";
|
|
89
|
+
sum: "sum";
|
|
90
|
+
sumIf: "sum";
|
|
91
|
+
average: "average";
|
|
92
|
+
averageIf: "average";
|
|
93
|
+
median: "median";
|
|
94
|
+
min: "min";
|
|
95
|
+
max: "max";
|
|
96
|
+
found: "found";
|
|
97
|
+
lookup: "lookup";
|
|
98
|
+
rows: "rows";
|
|
99
|
+
topN: "top";
|
|
100
|
+
duplicates: "duplicates";
|
|
101
|
+
groupTotals: "group totals";
|
|
102
|
+
percentOfTotal: "percent of total";
|
|
103
|
+
band: "bucket";
|
|
104
|
+
daysBetween: "days between";
|
|
105
|
+
daysSince: "date";
|
|
106
|
+
earliest: "earliest date";
|
|
107
|
+
latest: "latest date";
|
|
108
|
+
allNumbers: "all numbers";
|
|
109
|
+
allDates: "all dates";
|
|
110
|
+
noEmpty: "no empty";
|
|
111
|
+
noDuplicates: "no duplicate";
|
|
112
|
+
rowCount: "row count";
|
|
113
|
+
rowMath: "row math";
|
|
114
|
+
}>;
|
|
115
|
+
export function rulesOfLine(l: any): string[];
|
|
116
|
+
export function coversWords(rules: string[]): string;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every column name one check holds: its own `column`, `keyColumn`, `groupColumn`, `result`, a row-math operand `a` / `b` (a name; `{const}` is no column), the
|
|
3
|
+
* date cells `from` / `to` / `cell`, and the column of each `where` condition and `dateFormats` entry.
|
|
4
|
+
* @param {any} check @returns {string[]}
|
|
5
|
+
*/
|
|
6
|
+
export function sheetCheckColumns(check: any): string[];
|
|
7
|
+
/**
|
|
8
|
+
* The plain words of ONE sheet check, written from its typed fields (never from model text). The ONE function; the plan card, the readout and the Checked
|
|
9
|
+
* list all call it. An op with no sentence of its own reads `<rule> <op> on <column>` plus its conditions, so a check can never be shown as nothing.
|
|
10
|
+
* @param {any} check a bareguard cells / table check object @returns {string}
|
|
11
|
+
*/
|
|
12
|
+
export function sheetCheckSentence(check: any): string;
|
|
13
|
+
/**
|
|
14
|
+
* M10b piece 4: a signed check may carry fwdloop's own `covers` (the numbers of the job line's `~` rules the drafter tagged it to; signed, so the person sees it).
|
|
15
|
+
* bareguard does not know it, so the checks are cleaned HERE, the ONE place, on the way into bareguard (`createRubric` at sign time and at run time).
|
|
16
|
+
* @param {any[]} checks @returns {any[]} a copy without `covers`
|
|
17
|
+
*/
|
|
18
|
+
export function bareguardChecks(checks: any[]): any[];
|
|
19
|
+
/**
|
|
20
|
+
* M10b piece 4: `covers`, when a check has it, is a list of rule numbers of its job line (counted from 1 over the line's `~` rules). A check without it is fine (an old draft).
|
|
21
|
+
* @param {any[]} checks @param {{n: number, rule?: string, rules?: string[]}} jobLine @returns {string[]} reds, each naming the line and the check
|
|
22
|
+
*/
|
|
23
|
+
export function sheetCoversReds(checks: any[], jobLine: {
|
|
24
|
+
n: number;
|
|
25
|
+
rule?: string;
|
|
26
|
+
rules?: string[];
|
|
27
|
+
}): string[];
|
|
28
|
+
/** The rows for a step's `close.sheet`, one per check, in order. @param {unknown} sheet @returns {string[]} */
|
|
29
|
+
export function sheetCheckRows(sheet: unknown): string[];
|
|
30
|
+
/**
|
|
31
|
+
* The $0 sign-time test of one step's sheet checks (M10b item 4): bareguard's `createRubric` is given the checks and the signed fingerprint of each sheet
|
|
32
|
+
* they read (`tableSha` of the drafting copy's table). A refusal is a red that names the job line (and the check). A column that is no header of its sheet is
|
|
33
|
+
* a red naming the line and the column. Never throws.
|
|
34
|
+
* @param {any[]} checks the step's `close.sheet` (already known to be a list of objects) @param {number} line the job line the step comes from
|
|
35
|
+
* @param {Record<string, {header: string[], rows: any[]}>} tables the drafting copy's table of each sheet role @returns {string[]} reds, each naming the line
|
|
36
|
+
*/
|
|
37
|
+
export function sheetCheckReds(checks: any[], line: number, tables: Record<string, {
|
|
38
|
+
header: string[];
|
|
39
|
+
rows: any[];
|
|
40
|
+
}>): string[];
|
|
41
|
+
/**
|
|
42
|
+
* M10b piece 3: a number or a date in a check comes from the job, never from the model. Every number in a `where` condition (gt gte lt lte eq between) must be a
|
|
43
|
+
* number the person said on the job line or its `~` rules (the SAME reader as the page number rules, src/citedwords.js `numbersSaid`: a bare number or an amount,
|
|
44
|
+
* not a piece of a time, a date or another amount), and every date (`asOf`, and the values of before / after / dateOn / dateBetween) must be a date they wrote
|
|
45
|
+
* exactly. Throws away: a text value (`equals`, `needle`), band bounds, `n`, `tolerance`, `range` are not read here (the job's words do not have to carry them).
|
|
46
|
+
* @param {any[]} checks the step's `close.sheet` @param {{n: number, text?: string, rule?: string, rules?: string[]}} jobLine @returns {string[]} reds, each naming the line
|
|
47
|
+
*/
|
|
48
|
+
export function sheetCheckWordReds(checks: any[], jobLine: {
|
|
49
|
+
n: number;
|
|
50
|
+
text?: string;
|
|
51
|
+
rule?: string;
|
|
52
|
+
rules?: string[];
|
|
53
|
+
}): string[];
|
|
54
|
+
/**
|
|
55
|
+
* M10b piece 3: a step whose sheet checks are ALL `table` checks has nothing to answer (a table check judges the sheet itself and carries no claim), so the
|
|
56
|
+
* step would be asked for nothing. Refused at $0, naming the line. @param {any[]} checks @param {number} line @returns {string[]}
|
|
57
|
+
*/
|
|
58
|
+
export function sheetNoClaimReds(checks: any[], line: number): string[];
|
|
59
|
+
/** the bareguard rules a sheet check may use (`diff` is out of scope for M10b) */
|
|
60
|
+
export const SHEET_RULES: readonly string[];
|
|
61
|
+
/** most checks one step may carry */
|
|
62
|
+
export const MAX_SHEET_CHECKS: 20;
|
|
63
|
+
/** the fields of a check that hold a column name as a plain string (the ONE list: {@link sheetCheckColumns} reads it, the drafter's tool schema offers a header enum on each) */
|
|
64
|
+
export const COLUMN_STRING_FIELDS: readonly string[];
|
|
65
|
+
/** the row-math operands: a column name, or (for `b`) `{const}` */
|
|
66
|
+
export const COLUMN_OPERAND_FIELDS: readonly string[];
|
|
67
|
+
/** the date-cell fields: `{column, row}` */
|
|
68
|
+
export const COLUMN_CELL_FIELDS: readonly string[];
|
|
69
|
+
/** the list fields whose entries hold a `column` */
|
|
70
|
+
export const COLUMN_LIST_FIELDS: readonly string[];
|