pi-goal-list-loop-audit 0.38.35 → 0.38.36
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
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.38.36 — human-voice terminal summaries (2026-09-08)
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Summaries read as machine receipts (field 20260908_223522/223523):** `clipSummaryValue` now cuts at clause boundaries and strips stranded punctuation (`…append/replace Apply…`, never `…playlist auto-add,…`); the counts line is verdict-only (`— audit: auditor approved (1 verdict).`, raw run stats stay in the archive); the AUDIT PENDING notice states facts instead of agent imperatives. Agent-written summaries get Codex-shape guidance in the continuation prompt (outcome-first, verifiable bullets, clause cuts). Researched from real Codex transcripts + agy binary strings; user chose Codex-style chat shape.
|
|
8
|
+
- **Stale pins updated deliberately:** `— run:` telemetry assertions, `/detached auditor queued/` wordings, continuation-payload byte fixtures (+344/payload, growth exactly linear).
|
|
9
|
+
|
|
10
|
+
### Verification
|
|
11
|
+
|
|
12
|
+
- Full `release:check`: 2038 pass / 2 skip / 0 fail across 204 files; `tsc --noEmit` clean.
|
|
13
|
+
- Evidence: `audit/HUMAN-VOICE-SUMMARY-2026-09-08.md`.
|
|
14
|
+
|
|
3
15
|
## 0.38.35 — closed card + smart summary (2026-09-08)
|
|
4
16
|
|
|
5
17
|
### Fixed
|
package/docs/INDEX.md
CHANGED
|
@@ -18,7 +18,7 @@ For shipped docs, the relevant entry points are:
|
|
|
18
18
|
failback; v0.35.9 hardened cross-version npm tarball checks; v0.35.10
|
|
19
19
|
handles multi-entry npm dry-run reports; v0.35.11 accepts both npm report
|
|
20
20
|
shapes; v0.35.12 supports npm 12's keyed pack reports; v0.35.13 fixes stale-API recovery loops.
|
|
21
|
-
v0.35.14–v0.38.
|
|
21
|
+
v0.35.14–v0.38.36 continue through the supervisor freeze (`/glla pause`),
|
|
22
22
|
load hold, auditor picker parity, Windows launch fix, zombie-watchdog
|
|
23
23
|
subagent carve-out, due-wait backstop, the `/glla agents` visibility panel,
|
|
24
24
|
durable state-root selection, blank-until-resume auditor context, frozen
|
|
@@ -78,18 +78,33 @@ export function isUsefulCompletionSummary(text: string | undefined): boolean {
|
|
|
78
78
|
* Missing labels are retained as `not recorded` so a compact notification
|
|
79
79
|
* cannot accidentally imply evidence that the durable recap did not contain.
|
|
80
80
|
*/
|
|
81
|
-
/** Cut a summary value at a
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
81
|
+
/** Cut a summary value at a clause boundary, never mid-word (field
|
|
82
|
+
* complaints 2026-09-03 `0 o…` and 2026-09-08 `playlist auto-add,…`:
|
|
83
|
+
* a word-boundary cut that strands dangling punctuation still reads as
|
|
84
|
+
* clipping, not summarizing). Prefer the last clause boundary
|
|
85
|
+
* (`, ; : · — – ( [`) past a floor so the cut reads intentional; fall
|
|
86
|
+
* back to the word break, then to a hard cut only when the head holds
|
|
87
|
+
* no space past the halfway mark — a long token such as a commit hash
|
|
88
|
+
* must not eviscerate the whole value. Trailing punctuation is stripped
|
|
89
|
+
* before the ellipsis. Short values pass through untouched (no `…`). */
|
|
86
90
|
export function clipSummaryValue(value: string, limit: number): string {
|
|
87
91
|
const clean = value.replace(/\s+/g, " ").trim();
|
|
88
92
|
const capped = Number.isFinite(limit) ? Math.max(8, Math.floor(limit)) : 72;
|
|
89
93
|
if (clean.length <= capped) return clean;
|
|
90
94
|
const head = clean.slice(0, capped - 1);
|
|
95
|
+
const floor = Math.max(16, Math.floor((capped - 1) * 0.4));
|
|
96
|
+
let boundary = -1;
|
|
97
|
+
for (let i = 0; i < head.length; i++) {
|
|
98
|
+
if (/[,;:·—–(\[]/.test(head[i]!)) boundary = i;
|
|
99
|
+
}
|
|
100
|
+
if (boundary >= floor) {
|
|
101
|
+
const cut = head.slice(0, boundary).replace(/[,;:·—–(\[\s]+$/u, "");
|
|
102
|
+
if (cut.length >= Math.min(floor, 16)) return `${cut}…`;
|
|
103
|
+
}
|
|
91
104
|
const space = head.lastIndexOf(" ");
|
|
92
|
-
const kept = (space > capped / 2 ? head.slice(0, space) : head)
|
|
105
|
+
const kept = (space > capped / 2 ? head.slice(0, space) : head)
|
|
106
|
+
.trimEnd()
|
|
107
|
+
.replace(/[,;:·—–(\[]$/u, "");
|
|
93
108
|
return `${kept}…`;
|
|
94
109
|
}
|
|
95
110
|
|
|
@@ -192,15 +207,12 @@ export function buildApprovalChatLines(notice: {
|
|
|
192
207
|
];
|
|
193
208
|
}
|
|
194
209
|
|
|
195
|
-
/** v0.38.25: the audit-goal counts line
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
210
|
+
/** v0.38.25: the audit-goal counts line — verdict proof ONLY, built from
|
|
211
|
+
* durable goal state. Raw run stats (turns/file-writes/bash calls) read as
|
|
212
|
+
* a machine receipt in user chat (field 2026-09-08 223522/223523); the
|
|
213
|
+
* full execution evidence stays in the six-label archive record. Absent
|
|
214
|
+
* facts are named as absent, never invented (recorded-facts honesty). */
|
|
199
215
|
export function buildAuditCountsLine(goal: Goal, auditNote?: string): string {
|
|
200
|
-
const telemetry = goal.telemetry;
|
|
201
|
-
const run = telemetry
|
|
202
|
-
? `${telemetry.turns} turns · ${telemetry.fileWrites} file writes · ${telemetry.bashCalls} bash calls`
|
|
203
|
-
: "no execution telemetry was recorded";
|
|
204
216
|
const history = goal.auditHistory ?? [];
|
|
205
217
|
const latest = history.length > 0 ? history[history.length - 1] : undefined;
|
|
206
218
|
const audit = auditNote ?? (latest === undefined
|
|
@@ -209,7 +221,7 @@ export function buildAuditCountsLine(goal: Goal, auditNote?: string): string {
|
|
|
209
221
|
const verdict = latest.approved ? "approved" : latest.impossible ? "impossible" : latest.disapproved ? "disapproved" : "no verdict";
|
|
210
222
|
return `auditor ${verdict} (${history.length} verdict${history.length === 1 ? "" : "s"})`;
|
|
211
223
|
})());
|
|
212
|
-
return `—
|
|
224
|
+
return `— audit: ${audit}.`;
|
|
213
225
|
}
|
|
214
226
|
|
|
215
227
|
export interface TerminalApprovalRenderInput {
|
|
@@ -1876,7 +1876,7 @@ function registerAgentTools(pi: any): void {
|
|
|
1876
1876
|
if (notifyFailure) current.ui.notify(`Completion auditor worker failed to settle (infrastructure, not a verdict). The stored claim is safe; ${activeGoalSurfaceCommand("resume")} retries it.`, "warning");
|
|
1877
1877
|
});
|
|
1878
1878
|
return {
|
|
1879
|
-
content: [{ type: "text", text: `AUDIT PENDING — nonterminal.
|
|
1879
|
+
content: [{ type: "text", text: `AUDIT PENDING — nonterminal. The completion claim is stored and a detached auditor is settling it (model: ${via ?? "setting"}). The goal is not approved or complete yet. The final summary posts here after verified approval and durable archive; rejection resumes work automatically. Ending this turn now is correct — no waiting or polling needed.` }],
|
|
1880
1880
|
details: { status: "audit-pending", terminal: false },
|
|
1881
1881
|
// End this tool batch, not the goal; the detached worker owns settlement.
|
|
1882
1882
|
terminate: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-goal-list-loop-audit",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.36",
|
|
4
4
|
"description": "Mission control for autonomous pi: interview-drafted goals, an audited task queue, and forever-loops (metric, spec, project-audit) that run for hours. A detached extension-less auditor process re-verifies every completion with raw evidence without holding the main pi turn; confirmed drafts, decision pauses and consent gates keep you in charge.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"author": "dracon",
|
|
@@ -196,3 +196,5 @@ The orchestrator's backstop is the stall watchdog: three consecutive turns with
|
|
|
196
196
|
### Completion communication
|
|
197
197
|
|
|
198
198
|
`complete_goal` submits a nonterminal claim, not a completion verdict. While the detached audit is pending, do not say the goal is done/complete/approved or present a final success summary. Do not wait or poll. If a response is needed, give one brief pending-status sentence. GLLA posts the concrete outcome-first summary into chat after verified approval and durable archive, without needing another user prompt. Do not duplicate that summary. A rejected claim remains unfinished and repair work continues.
|
|
199
|
+
|
|
200
|
+
The agent-written completionSummary is user-facing evidence, not a step log: open with the outcome in plain words, then one verifiable result per label with its proof inline (test counts, file paths, commit refs) — never raw run stats. Cut values at clause boundaries, never mid-word; state what was deliberately left out when it matters.
|