@jwilger/pi-development-system 0.38.0 → 0.38.2
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/context/turn-verifier.ts +12 -2
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
|
2
2
|
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
import { redactSecrets } from "../core/redact.ts";
|
|
3
4
|
import { exitCodeOf, summarizeOutput } from "../core/test-runner.ts";
|
|
4
5
|
import type { DevsysState, Phase } from "../core/types.ts";
|
|
5
6
|
import type { Jev } from "../jev/client.ts";
|
|
@@ -57,6 +58,8 @@ const claimMessage = (): string =>
|
|
|
57
58
|
const driftMessage = (slice: string): string =>
|
|
58
59
|
`Development system: your last message describes work beyond the active slice "${slice}". Either return to the slice, or call devsys_record_departure (gate scope.expansion) to record why the scope is growing.`;
|
|
59
60
|
|
|
61
|
+
const TARGET_MAX = 120;
|
|
62
|
+
|
|
60
63
|
const note = (content: string) => ({
|
|
61
64
|
type: "custom_message" as const,
|
|
62
65
|
customType: VERIFIER_ENTRY_TYPE,
|
|
@@ -95,10 +98,17 @@ export function registerTurnVerifier(deps: TurnVerifierDeps): void {
|
|
|
95
98
|
structured: event.structuredContent,
|
|
96
99
|
...(command === undefined ? {} : { command }),
|
|
97
100
|
});
|
|
101
|
+
// Name what ran or which file: a check that passes silently (`tsc --noEmit`) prints nothing.
|
|
102
|
+
const target = redactSecrets(
|
|
103
|
+
command ?? (typeof event.input.path === "string" ? event.input.path : ""),
|
|
104
|
+
)
|
|
105
|
+
.replace(/\s+/g, " ")
|
|
106
|
+
.slice(0, TARGET_MAX);
|
|
107
|
+
const described = target === "" ? summary : `${target} → ${summary}`;
|
|
98
108
|
const item: ToolEvidence =
|
|
99
109
|
event.toolName === "bash"
|
|
100
|
-
? { tool: "bash", summary, exitCode }
|
|
101
|
-
: { tool: event.toolName, summary };
|
|
110
|
+
? { tool: "bash", summary: described, exitCode }
|
|
111
|
+
: { tool: event.toolName, summary: described };
|
|
102
112
|
evidence = [...evidence, item].slice(-MAX_EVIDENCE);
|
|
103
113
|
});
|
|
104
114
|
|