fwdloop 0.8.0 → 0.9.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 +10 -8
- package/package.json +1 -1
- package/src/ask.js +112 -14
- package/src/drafter.js +2 -2
- package/src/panel/data.js +145 -39
- package/src/panel/index.html +269 -58
- package/src/panel/resume.js +197 -0
- package/src/panel/server.js +166 -14
- package/src/provider.js +1 -1
- package/src/runner.js +46 -24
- package/src/send.js +19 -2
- package/src/types.js +2 -2
- package/types/ask.d.ts +63 -5
- package/types/panel/data.d.ts +63 -12
- package/types/panel/resume.d.ts +51 -0
- package/types/panel/server.d.ts +15 -3
- package/types/runner.d.ts +5 -4
- package/types/send.d.ts +4 -1
- package/types/types.d.ts +2 -2
package/types/runner.d.ts
CHANGED
|
@@ -117,8 +117,8 @@ export function readArtifact(runDir: any, id: any): any;
|
|
|
117
117
|
* @param {Array<{id:string, path:string}>} opts.sources - the real files to freeze for this run.
|
|
118
118
|
* @param {unknown} opts.catalogue - passed straight through to `readFlow`.
|
|
119
119
|
* @param {(executorContext:object, grantedTools:Record<string,any>, stepMeta?:{class:string|null}) => Promise<{ok:boolean, artifact?:unknown, costUsd:number|null, red?:string, transport?:boolean, model?:string, modelMatch?:boolean}>} opts.modelStep
|
|
120
|
-
* @param {(opts:{question:string, evidence:unknown, runDir:string}) => Promise<{decision:'accept'|'
|
|
121
|
-
* @param {(target:string, filename:string, content:unknown) => Promise<{ok:boolean, red?:string, bytes?:number}>} opts.sendStep
|
|
120
|
+
* @param {(opts:{question:string, evidence:unknown, runDir:string}) => Promise<{decision:'accept'|'redo'|'rerun'|'timeout'|'park', reason?:string, artifactSha256?:string}>} opts.askStep
|
|
121
|
+
* @param {(target:string, filename:string, content:unknown, acceptedSha256?:string|null) => Promise<{ok:boolean, red?:string, bytes?:number}>} opts.sendStep
|
|
122
122
|
* @param {Record<string, any>} [opts.primitives] - injected primitive implementations, keyed by catalogue verb.
|
|
123
123
|
* @param {string[]} [opts.primitiveReds] - `resolvePrimitives`'s own `reds` (e.g. bareguard refusing a symlinked file scope); any entry refuses the run at $0 like an unwired verb, before the run dir exists.
|
|
124
124
|
* @param {() => string} [opts.clock] - returns the current ISO timestamp; defaults to the wall clock.
|
|
@@ -157,10 +157,11 @@ export function runFlow({ root, name, runId, sources, catalogue, modelStep, askS
|
|
|
157
157
|
evidence: unknown;
|
|
158
158
|
runDir: string;
|
|
159
159
|
}) => Promise<{
|
|
160
|
-
decision: "accept" | "
|
|
160
|
+
decision: "accept" | "redo" | "rerun" | "timeout" | "park";
|
|
161
161
|
reason?: string;
|
|
162
|
+
artifactSha256?: string;
|
|
162
163
|
}>;
|
|
163
|
-
sendStep: (target: string, filename: string, content: unknown) => Promise<{
|
|
164
|
+
sendStep: (target: string, filename: string, content: unknown, acceptedSha256?: string | null) => Promise<{
|
|
164
165
|
ok: boolean;
|
|
165
166
|
red?: string;
|
|
166
167
|
bytes?: number;
|
package/types/send.d.ts
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
* @param {string} target - a signed arbiter target, e.g. `file:poc/m0/out`.
|
|
3
3
|
* @param {string} filename
|
|
4
4
|
* @param {unknown} content - JSON-serialised before writing.
|
|
5
|
+
* @param {string|null} [acceptedSha256] - the sha256 the human's accept recorded
|
|
6
|
+
* (`answerAsk`, M4b piece 3). Required: none recorded (an answer written by an
|
|
7
|
+
* older version, or no accept in this process) refuses by name.
|
|
5
8
|
* @returns {Promise<{ok:true, path:string, bytes:number} | {ok:false, red:string}>}
|
|
6
9
|
*/
|
|
7
|
-
export function sendViaPrimitive(target: string, filename: string, content: unknown): Promise<{
|
|
10
|
+
export function sendViaPrimitive(target: string, filename: string, content: unknown, acceptedSha256?: string | null): Promise<{
|
|
8
11
|
ok: true;
|
|
9
12
|
path: string;
|
|
10
13
|
bytes: number;
|
package/types/types.d.ts
CHANGED
|
@@ -322,8 +322,8 @@ export type AuditRow = {
|
|
|
322
322
|
ungranted?: string[] | undefined;
|
|
323
323
|
/**
|
|
324
324
|
* - bareguard
|
|
325
|
-
* fs-gate refusals during this attempt; `[]` (never omitted) on every row
|
|
326
|
-
*
|
|
325
|
+
* fs-gate refusals during this attempt; `[]` (never omitted) on every row,
|
|
326
|
+
* including rows with no model call (paused, cap-halt, ask, send).
|
|
327
327
|
*/
|
|
328
328
|
refused?: {
|
|
329
329
|
verb: string;
|