fwdloop 0.8.0 → 0.8.1
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/package.json +1 -1
- package/src/ask.js +1 -1
- package/src/drafter.js +2 -2
- package/src/panel/index.html +1 -10
- package/src/provider.js +1 -1
- package/src/runner.js +2 -1
- package/src/types.js +2 -2
- package/types/types.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fwdloop",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Describe a job as steps and guardrails; an agent builds the workflow, pauses for humans where you said, checks every step happened, and reruns it under budgets it cannot touch.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
package/src/ask.js
CHANGED
|
@@ -95,7 +95,7 @@ export function makeFileAskStep({
|
|
|
95
95
|
while (existsSync(staleName)) { staleCount += 1; staleName = join(runDir, `answer.stale.${staleCount}.json`); }
|
|
96
96
|
renameSync(answerPath, staleName);
|
|
97
97
|
appendAudit(runDir, {
|
|
98
|
-
step: 'ask', attempt, class: null, verdict: 'stale-answer-ignored', gap: `answeredAt ${answeredAt} predates this ask's askedAt ${askedAt}`, usd: 0, spendComplete: true, wallMs: 0, model: null, modelMatch: null, strike: false, at: clock(), tokens: null, tools: null,
|
|
98
|
+
step: 'ask', attempt, class: null, verdict: 'stale-answer-ignored', gap: `answeredAt ${answeredAt} predates this ask's askedAt ${askedAt}`, usd: 0, spendComplete: true, wallMs: 0, model: null, modelMatch: null, strike: false, at: clock(), tokens: null, tools: null, refused: [],
|
|
99
99
|
});
|
|
100
100
|
// Keep polling — a stale file quarantined does not mean THIS
|
|
101
101
|
// ask has been answered.
|
package/src/drafter.js
CHANGED
|
@@ -316,8 +316,8 @@ export async function draft({
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
const m = sumMeterings(meterings);
|
|
319
|
-
// Runner convention: `costUsd` is the priced
|
|
320
|
-
// call that failed unmetered or a round left unpriced
|
|
319
|
+
// Runner convention: `costUsd` is the priced sum (null when ANY round is unpriced, so the CLI prints UNKNOWN,
|
|
320
|
+
// never a bare number), and `spendComplete:false` marks a call that failed unmetered or a round left unpriced.
|
|
321
321
|
return {
|
|
322
322
|
ok: false, declaration: lastDecl, reds: lastReds, rounds: m.rounds, calls, spendComplete: unmetered === 0 && m.costUsd !== null, costUsd: m.costUsd, modelReturned: m.model, modelId, tokens: m.tokens, structureRetries, revisions, stop, log,
|
|
323
323
|
};
|
package/src/panel/index.html
CHANGED
|
@@ -644,14 +644,6 @@
|
|
|
644
644
|
bits.push(duration(r.wallMs));
|
|
645
645
|
return bits.join(" · ");
|
|
646
646
|
}
|
|
647
|
-
// hamr's 2026-09-27 review item (d): the new Time column — this row's own
|
|
648
|
-
// `at`, read locally (`readableDateTime`, same formatter every other
|
|
649
|
-
// timestamp on this page already uses); a pre-M4a-2 row (server-derived
|
|
650
|
-
// `r.atWhy`) shows its own why instead of guessing a date.
|
|
651
|
-
function auditTimeCellText(r){
|
|
652
|
-
if(typeof r.atWhy === "string" && r.atWhy.length > 0) return r.atWhy;
|
|
653
|
-
return readableDateTime(r.at) || "unknown";
|
|
654
|
-
}
|
|
655
647
|
// fix (2026-09-28, borrowed-from: bareloop src/panel/index.html@2711b1b):
|
|
656
648
|
// hamr's UI review found the Time cell's full date+time string overflowed
|
|
657
649
|
// the Audit tab's mobile stacked-card cell sideways at 390px. bareloop's
|
|
@@ -663,8 +655,7 @@
|
|
|
663
655
|
// in `title` is the same local `readableDateTime` string used everywhere
|
|
664
656
|
// else, not the raw ISO. A pre-M4a-2 row's `atWhy` (or a genuinely
|
|
665
657
|
// unparseable/missing `at`) is unaffected: that text renders plain, never
|
|
666
|
-
// wrapped in a <span title
|
|
667
|
-
// stays exactly what it was.
|
|
658
|
+
// wrapped in a <span title>.
|
|
668
659
|
function auditTimeCellHtml(r){
|
|
669
660
|
if(typeof r.atWhy === "string" && r.atWhy.length > 0) return escapeXml(r.atWhy);
|
|
670
661
|
var full = readableDateTime(r.at);
|
package/src/provider.js
CHANGED
|
@@ -38,7 +38,7 @@ import { OpenAI } from 'bare-agent/providers';
|
|
|
38
38
|
* marker on the instance (`this.lastMalformedToolCall`, reset at the top of
|
|
39
39
|
* every `generate()` call) — the one channel `runModelStepOnPrimitives`
|
|
40
40
|
* (same provider reference) can read after `loop.run()` returns. We require
|
|
41
|
-
* bare-agent >=0.
|
|
41
|
+
* bare-agent >=0.48 (package.json `^0.49.0`) and never patch around its
|
|
42
42
|
* private response internals.
|
|
43
43
|
*/
|
|
44
44
|
class MalformedToolCallTolerantOpenAI extends OpenAI {
|
package/src/runner.js
CHANGED
|
@@ -474,6 +474,7 @@ function recordLateAnswerIfAny(runDir, now = () => new Date().toISOString()) {
|
|
|
474
474
|
at: now(),
|
|
475
475
|
tokens: null,
|
|
476
476
|
tools: null,
|
|
477
|
+
refused: [],
|
|
477
478
|
kind: 'answer-after-run',
|
|
478
479
|
file,
|
|
479
480
|
});
|
|
@@ -1719,7 +1720,7 @@ export async function resumeRun({
|
|
|
1719
1720
|
// review fix 2: "a pause spends nothing" means the pause adds
|
|
1720
1721
|
// nothing, not that the run's total resets).
|
|
1721
1722
|
appendAudit(runDir, {
|
|
1722
|
-
step: null, attempt: null, class: null, verdict: 'ask-expired', gap: null, usd: 0, spendComplete: true, wallMs: 0, model: null, modelMatch: null, strike: false, at: now(), tokens: null, tools: null,
|
|
1723
|
+
step: null, attempt: null, class: null, verdict: 'ask-expired', gap: null, usd: 0, spendComplete: true, wallMs: 0, model: null, modelMatch: null, strike: false, at: now(), tokens: null, tools: null, refused: [],
|
|
1723
1724
|
});
|
|
1724
1725
|
appendHistory(flowDir, {
|
|
1725
1726
|
runId, at: now(), outcome: 'ask-expired', spentUsd: spent.value, spendComplete: spendComplete.value, capUsd: arbiter.capUsd ?? null, wallMs: getNowMs() - runStartedAt, signatureHash: state.signatureHash,
|
package/src/types.js
CHANGED
|
@@ -292,8 +292,8 @@
|
|
|
292
292
|
* @property {string[]} [ungranted] - tool names the model called that this
|
|
293
293
|
* step never granted; absent when empty, never an invented empty array.
|
|
294
294
|
* @property {Array<{verb:string, path:string, rule:string}>} [refused] - bareguard
|
|
295
|
-
* fs-gate refusals during this attempt; `[]` (never omitted) on every row
|
|
296
|
-
*
|
|
295
|
+
* fs-gate refusals during this attempt; `[]` (never omitted) on every row,
|
|
296
|
+
* including rows with no model call (paused, cap-halt, ask, send).
|
|
297
297
|
*/
|
|
298
298
|
|
|
299
299
|
/**
|
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;
|