@yagni-app/code-staging 1.2.14-staging.2286.1 → 1.2.14-staging.2312.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.
|
@@ -62,13 +62,7 @@ export interface SubagentDef {
|
|
|
62
62
|
/** The agent's system prompt (the markdown body). */
|
|
63
63
|
body: string;
|
|
64
64
|
source: SubagentSource;
|
|
65
|
-
/** This agent's own wall clock, when shorter than {@link SUBAGENT_WALL_TIMEOUT_MS}. */
|
|
66
|
-
wallTimeoutMs?: number;
|
|
67
65
|
}
|
|
68
|
-
/** How long one verification subagent may run: a review of a finished diff,
|
|
69
|
-
* not a second build (on staging 2026-10-28, advanced-tier verifiers ran 34
|
|
70
|
-
* minutes after an 11-minute build). */
|
|
71
|
-
export declare const VERIFICATION_WALL_TIMEOUT_MS: number;
|
|
72
66
|
/**
|
|
73
67
|
* The tier the built-in verification agent asks for: `peak` in a session-lane
|
|
74
68
|
* turn (`pipeline/sessionLane.ts`), the one place the proxy serves a verifier
|
|
@@ -169,7 +163,7 @@ export declare const SUBAGENT_WALL_TIMEOUT_MS: number;
|
|
|
169
163
|
* Exported so a test can pin the composed policy the production path actually
|
|
170
164
|
* runs (every unit test injects runStageImpl instead).
|
|
171
165
|
*/
|
|
172
|
-
export declare function subagentRunPolicy(
|
|
166
|
+
export declare function subagentRunPolicy(): ResiliencePolicy;
|
|
173
167
|
/**
|
|
174
168
|
* The per-attempt telemetry adapter: one content-free error-sink row per
|
|
175
169
|
* resilience attempt (agent, taskIndex, outcome, timeoutKind, exit code,
|
|
@@ -213,10 +213,6 @@ What you could not check, and why.
|
|
|
213
213
|
|
|
214
214
|
A HOLDS after real digging is valuable; a rubber stamp is not. If you found
|
|
215
215
|
nothing, say exactly what you tried to break and how.`;
|
|
216
|
-
/** How long one verification subagent may run: a review of a finished diff,
|
|
217
|
-
* not a second build (on staging 2026-10-28, advanced-tier verifiers ran 34
|
|
218
|
-
* minutes after an 11-minute build). */
|
|
219
|
-
export const VERIFICATION_WALL_TIMEOUT_MS = 15 * 60_000;
|
|
220
216
|
/**
|
|
221
217
|
* The tier the built-in verification agent asks for: `peak` in a session-lane
|
|
222
218
|
* turn (`pipeline/sessionLane.ts`), the one place the proxy serves a verifier
|
|
@@ -230,7 +226,8 @@ export function verificationTier(env = process.env) {
|
|
|
230
226
|
}
|
|
231
227
|
/** The diamond's reduce layer: refute-first review of completed work, on
|
|
232
228
|
* {@link verificationTier} (judgment is the whole job, so the premium is worth
|
|
233
|
-
* paying where the lane serves it). One by default, on
|
|
229
|
+
* paying where the lane serves it). One by default, on the subagent lane's
|
|
230
|
+
* clock ({@link SUBAGENT_WALL_TIMEOUT_MS}), like every other subagent.
|
|
234
231
|
* It has no edit/write tools; bash is included for `git diff`-style inspection
|
|
235
232
|
* and is restricted to read-only USE by the persona, the same prompt-level
|
|
236
233
|
* stance as /go's reviewer, not a technical guarantee. */
|
|
@@ -246,7 +243,6 @@ function verificationAgent(env) {
|
|
|
246
243
|
tools: ["read", "grep", "find", "ls", "bash", "ask_yagni"],
|
|
247
244
|
body: VERIFICATION_BODY,
|
|
248
245
|
source: "builtin",
|
|
249
|
-
wallTimeoutMs: VERIFICATION_WALL_TIMEOUT_MS,
|
|
250
246
|
};
|
|
251
247
|
}
|
|
252
248
|
// Concrete tiers a subagent can actually run on. `balanced` is deliberately NOT
|
|
@@ -507,8 +503,12 @@ export const SUBAGENT_WALL_TIMEOUT_MS = 2 * 60 * 60_000;
|
|
|
507
503
|
* Exported so a test can pin the composed policy the production path actually
|
|
508
504
|
* runs (every unit test injects runStageImpl instead).
|
|
509
505
|
*/
|
|
510
|
-
export function subagentRunPolicy(
|
|
511
|
-
return {
|
|
506
|
+
export function subagentRunPolicy() {
|
|
507
|
+
return {
|
|
508
|
+
...DEFAULT_RESILIENCE_POLICY,
|
|
509
|
+
wallTimeoutMs: SUBAGENT_WALL_TIMEOUT_MS,
|
|
510
|
+
retryWallTimeout: false,
|
|
511
|
+
};
|
|
512
512
|
}
|
|
513
513
|
/**
|
|
514
514
|
* The per-attempt telemetry adapter: one content-free error-sink row per
|
|
@@ -551,21 +551,16 @@ export function makeSubagentTool(deps = {}) {
|
|
|
551
551
|
// text). The write-gate keys on the resolved agent's tools,
|
|
552
552
|
// passed per task below — the synthetic stage id is "implement" and would
|
|
553
553
|
// otherwise block retry of a read-only verifier forever.
|
|
554
|
-
//
|
|
555
|
-
//
|
|
556
|
-
|
|
557
|
-
const
|
|
554
|
+
// Every agent, the verifier included, runs on the lane's one wall clock,
|
|
555
|
+
// built once, when the first subagent runs.
|
|
556
|
+
let wrapped = null;
|
|
557
|
+
const run = () => {
|
|
558
558
|
if (deps.runStageImpl)
|
|
559
559
|
return deps.runStageImpl;
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
telemetry: subagentTelemetry(deps.env ?? process.env),
|
|
565
|
-
});
|
|
566
|
-
runners.set(wall, runner);
|
|
567
|
-
}
|
|
568
|
-
return runner;
|
|
560
|
+
wrapped ??= withResilience(runStage, subagentRunPolicy(), {
|
|
561
|
+
telemetry: subagentTelemetry(deps.env ?? process.env),
|
|
562
|
+
});
|
|
563
|
+
return wrapped;
|
|
569
564
|
};
|
|
570
565
|
const discover = deps.discover ?? discoverSubagents;
|
|
571
566
|
const grounded = deps.grounded !== false;
|
|
@@ -690,7 +685,7 @@ export function makeSubagentTool(deps = {}) {
|
|
|
690
685
|
outcomes = await Promise.all(resolved.map(async ({ def, task }, index) => {
|
|
691
686
|
const progress = progresses[index];
|
|
692
687
|
const { stage, ctx: stageCtx } = buildSubagentStage(def, task, { grounded });
|
|
693
|
-
const result = await
|
|
688
|
+
const result = await run()(stage, stageCtx, {
|
|
694
689
|
cwd,
|
|
695
690
|
signal,
|
|
696
691
|
// Write-gate input: whether the agent's DECLARED tool list has
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yagni-app/code-staging",
|
|
3
|
-
"version": "1.2.14-staging.
|
|
3
|
+
"version": "1.2.14-staging.2312.1",
|
|
4
4
|
"description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"turndown": "^7.2.4",
|
|
59
59
|
"typebox": "^1.3.15"
|
|
60
60
|
},
|
|
61
|
-
"yagniSourceSha": "
|
|
61
|
+
"yagniSourceSha": "22d5af00866101ff6dafd1281bf318bfada404f1"
|
|
62
62
|
}
|