sortie-dogs 0.11.2 → 0.11.4
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/README.md +15 -0
- package/dist/asset-version.d.ts +1 -1
- package/dist/asset-version.js +1 -1
- package/dist/core/work-loop.d.ts +3 -0
- package/dist/core/work-loop.js +30 -1
- package/dist/core/work-progress.d.ts +18 -1
- package/dist/core/work-progress.js +10 -4
- package/dist/plugin/work-loop-v2.js +45 -48
- package/dist/runtime-assets-v011.d.ts +2 -2
- package/dist/runtime-assets-v011.js +13 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,6 +69,21 @@ is an internal implementation child. The default V2 package export and
|
|
|
69
69
|
|
|
70
70
|
## How v0.11 works
|
|
71
71
|
|
|
72
|
+
### Feedback and supervision
|
|
73
|
+
|
|
74
|
+
Send corrections in the same conversation. The original request and subsequent
|
|
75
|
+
instructions are retained across interruptions and compaction and are delivered
|
|
76
|
+
to the same implementation child. The operator inspects real results before
|
|
77
|
+
continuing or accepting the work. Native controller ledgers can keep long jobs
|
|
78
|
+
running and return control to that operator when they finish.
|
|
79
|
+
|
|
80
|
+
Progress checkpoints wait for a native response boundary; an in-flight provider
|
|
81
|
+
response keeps its native timeout. A checkpoint does not mean the user's task is
|
|
82
|
+
complete. Required checks, attempts and known/unknown costs remain cumulative.
|
|
83
|
+
Feedback retention is per job: the v0.11 loop does not automatically apply the
|
|
84
|
+
v0.10 reflection policy to future jobs. Reproducible product feedback is recorded
|
|
85
|
+
in [the v0.11.2 dogfooding incident](docs/feedback/v0112-redispatch-loop.md).
|
|
86
|
+
|
|
72
87
|
1. **Keep the original request.** The host retains the user's words, attachments,
|
|
73
88
|
selected skills and subsequent instructions in durable plugin storage.
|
|
74
89
|
2. **Delegate practical work.** The operator adds short guidance and dispatches
|
package/dist/asset-version.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const RUNTIME_ASSET_VERSION = "0.3.89-completion-proof-v1";
|
|
6
6
|
export declare const V010_RUNTIME_ASSET_VERSION = "0.10.0-v0912-language4-cost-rpt10-compaction-ref2-proposal1-review-remediation1-surface4-proposal-recovery2-quality1-terminal2-route1-path1-permission2-prerequisite1-v2-bridge1-intent1-reflection1-cancel1-proposal-budget1-goal-recovery1-delegate-execute1-v2-depth1-process-replacement1-unstarted-v2-1-cold-turn1-return-report-v2-2-root-revision1";
|
|
7
|
-
export declare const V011_RUNTIME_ASSET_VERSION = "0.11.
|
|
7
|
+
export declare const V011_RUNTIME_ASSET_VERSION = "0.11.4-soft-pacing-v1";
|
|
8
8
|
export type RuntimeAssetVersion = typeof RUNTIME_ASSET_VERSION | typeof V010_RUNTIME_ASSET_VERSION | typeof V011_RUNTIME_ASSET_VERSION;
|
package/dist/asset-version.js
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export const RUNTIME_ASSET_VERSION = "0.3.89-completion-proof-v1";
|
|
6
6
|
export const V010_RUNTIME_ASSET_VERSION = "0.10.0-v0912-language4-cost-rpt10-compaction-ref2-proposal1-review-remediation1-surface4-proposal-recovery2-quality1-terminal2-route1-path1-permission2-prerequisite1-v2-bridge1-intent1-reflection1-cancel1-proposal-budget1-goal-recovery1-delegate-execute1-v2-depth1-process-replacement1-unstarted-v2-1-cold-turn1-return-report-v2-2-root-revision1";
|
|
7
|
-
export const V011_RUNTIME_ASSET_VERSION = "0.11.
|
|
7
|
+
export const V011_RUNTIME_ASSET_VERSION = "0.11.4-soft-pacing-v1";
|
package/dist/core/work-loop.d.ts
CHANGED
|
@@ -224,6 +224,9 @@ export declare class WorkLoop {
|
|
|
224
224
|
status: string;
|
|
225
225
|
exit: number | null;
|
|
226
226
|
}): Promise<void>;
|
|
227
|
+
/** Record a non-interrupting pacing nudge for the running child. The phase, child and conversation are unchanged. */
|
|
228
|
+
nudge(root: string, callID: string, reason: string, limit: number): Promise<boolean>;
|
|
229
|
+
/** Legacy v0.11.0-v0.11.3 hard yield. Retained for persisted states; the v0.11.4 plugin no longer calls it. */
|
|
227
230
|
stall(root: string, callID: string, reason: string): Promise<boolean>;
|
|
228
231
|
beginCommand(root: string, callID: string, command: string, timeout: number, retryOf?: string): Promise<{
|
|
229
232
|
command: WorkCommand;
|
package/dist/core/work-loop.js
CHANGED
|
@@ -465,7 +465,7 @@ export class WorkLoop {
|
|
|
465
465
|
"## Original user instructions (all remain authoritative)", ...work.requests.map(item => item.text),
|
|
466
466
|
"## Operator notes", work.instructions, ...work.feedback,
|
|
467
467
|
"Use native read/glob/grep/patch/shell tools freely within the user's instructions and project AGENTS.md. Discover dependencies and affected files as you work.",
|
|
468
|
-
"Act early: reuse supplied paths and existing documented commands. Investigate only the next unknown that prevents a target reproduction, then act on the result. Do not recreate a controller or repeat known preflight.
|
|
468
|
+
"Act early: reuse supplied paths and existing documented commands. Investigate only the next unknown that prevents a target reproduction, then act on the result. Do not recreate a controller or repeat known preflight. Keep going until the whole task is finished in this invocation; the host never cuts you off for pacing, it only adds a short note if you stop editing or executing. Running commands retain native deadlines; activity does not prove completion.",
|
|
469
469
|
...(work.commands?.length ? ["## Already executed by the host — reuse these results, never blindly relaunch", JSON.stringify(work.commands)] : []),
|
|
470
470
|
"Run final meaningful checks with sortie_v011_check. Each remains an obligation until it passes on final source; use shell for exploration. Fix ordinary setup and test failures in this invocation. Verify the actual affected behavior and adjacent valid/invalid cases, not just syntax or one literal reproducer.",
|
|
471
471
|
"Return a concise account of changes, check IDs, requirements covered and anything genuinely unresolved. Never accept your own work or ask the user to fix a protocol field."].join("\n\n");
|
|
@@ -494,6 +494,15 @@ export class WorkLoop {
|
|
|
494
494
|
return;
|
|
495
495
|
progress.active = progress.active.filter(item => item.id !== activity.id);
|
|
496
496
|
progress.last = { ...active, ...result };
|
|
497
|
+
// Activity is visible liveness, not reviewed progress or accepted work.
|
|
498
|
+
// Keep the original request and review clocks unchanged.
|
|
499
|
+
progress.lastActionAt = Date.now();
|
|
500
|
+
// A finished edit or executed command restarts the nudge window. This is
|
|
501
|
+
// pacing only; it still certifies neither progress nor completion.
|
|
502
|
+
if (isWorkAction(active.tool)) {
|
|
503
|
+
progress.reviewedAt = progress.lastWorkActionAt = Date.now();
|
|
504
|
+
progress.reviewedTools = progress.tools;
|
|
505
|
+
}
|
|
497
506
|
if (result.status === "completed" && activity.tool === "patch")
|
|
498
507
|
progress.edits++;
|
|
499
508
|
if (result.status === "completed" && result.exit !== null && activity.tool === "shell")
|
|
@@ -505,6 +514,7 @@ export class WorkLoop {
|
|
|
505
514
|
progress.active.push({ ...activity, actor: child });
|
|
506
515
|
progress.tools++;
|
|
507
516
|
if (isWorkAction(activity.tool)) {
|
|
517
|
+
progress.firstActionAt ??= Date.now();
|
|
508
518
|
if (activity.tool !== "patch")
|
|
509
519
|
progress.commands++;
|
|
510
520
|
}
|
|
@@ -513,6 +523,25 @@ export class WorkLoop {
|
|
|
513
523
|
}
|
|
514
524
|
});
|
|
515
525
|
}
|
|
526
|
+
/** Record a non-interrupting pacing nudge for the running child. The phase, child and conversation are unchanged. */
|
|
527
|
+
async nudge(root, callID, reason, limit) {
|
|
528
|
+
return this.update(root, async (state) => {
|
|
529
|
+
const work = state.work;
|
|
530
|
+
if (!work || work.phase !== "running" || work.callID !== callID)
|
|
531
|
+
return false;
|
|
532
|
+
const progress = work.progress ??= newWorkProgress(work.startedAt);
|
|
533
|
+
const nudges = progress.nudges ??= [];
|
|
534
|
+
if (nudges.filter(item => item.at > (progress.lastWorkActionAt ?? 0)).length >= limit)
|
|
535
|
+
return false;
|
|
536
|
+
nudges.push({ at: Date.now(), reason });
|
|
537
|
+
if (nudges.length > 64)
|
|
538
|
+
nudges.shift();
|
|
539
|
+
progress.reviewedAt = Date.now();
|
|
540
|
+
progress.reviewedTools = progress.tools;
|
|
541
|
+
return true;
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
/** Legacy v0.11.0-v0.11.3 hard yield. Retained for persisted states; the v0.11.4 plugin no longer calls it. */
|
|
516
545
|
async stall(root, callID, reason) {
|
|
517
546
|
return this.update(root, async (state) => {
|
|
518
547
|
const work = state.work;
|
|
@@ -43,22 +43,37 @@ export interface WorkProgress {
|
|
|
43
43
|
operatorNudgedAt?: number;
|
|
44
44
|
evidence?: WorkEvidence[];
|
|
45
45
|
interventions?: WorkIntervention[];
|
|
46
|
+
firstActionAt?: number;
|
|
47
|
+
lastWorkActionAt?: number;
|
|
48
|
+
nudges?: {
|
|
49
|
+
at: number;
|
|
50
|
+
reason: string;
|
|
51
|
+
}[];
|
|
46
52
|
}
|
|
53
|
+
/** Pacing only nudges. It never interrupts a model response or returns the child to the operator. */
|
|
47
54
|
export declare const WORK_PROGRESS_LIMITS: {
|
|
48
55
|
readonly idleMs: 60000;
|
|
49
56
|
readonly operatorMs: 30000;
|
|
50
57
|
readonly inspections: 12;
|
|
51
58
|
readonly intervalMs: 1000;
|
|
59
|
+
readonly nudgesPerWindow: 2;
|
|
52
60
|
};
|
|
53
61
|
export declare const isWorkAction: (tool: string) => boolean;
|
|
54
62
|
export declare function newWorkProgress(now?: number): WorkProgress;
|
|
55
63
|
export declare function progressLimit(progress: WorkProgress, now: number, idleMs: number, inspections: number): string | null;
|
|
64
|
+
/** Reasoning-free measurements of the pain this pacing targets. */
|
|
65
|
+
export declare function pacingMetrics(progress: WorkProgress): {
|
|
66
|
+
first_action_ms: number | null;
|
|
67
|
+
nudges: number;
|
|
68
|
+
};
|
|
56
69
|
export declare function progressView(progress: WorkProgress, now?: number): {
|
|
57
|
-
phase: string;
|
|
58
70
|
elapsed_ms: number;
|
|
59
71
|
idle_ms: number;
|
|
60
72
|
summary: string;
|
|
61
73
|
note: string;
|
|
74
|
+
first_action_ms: number | null;
|
|
75
|
+
nudges: number;
|
|
76
|
+
phase: string;
|
|
62
77
|
startedAt: number;
|
|
63
78
|
lastActionAt: number;
|
|
64
79
|
inspections: number;
|
|
@@ -80,6 +95,8 @@ export declare function progressView(progress: WorkProgress, now?: number): {
|
|
|
80
95
|
operatorNudgedAt?: number;
|
|
81
96
|
evidence?: WorkEvidence[];
|
|
82
97
|
interventions?: WorkIntervention[];
|
|
98
|
+
firstActionAt?: number;
|
|
99
|
+
lastWorkActionAt?: number;
|
|
83
100
|
};
|
|
84
101
|
type RecordValue = Record<string, any>;
|
|
85
102
|
/** Repair only the outgoing context, including the trailing interrupted turn that native normalization misses.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** Pacing only nudges. It never interrupts a model response or returns the child to the operator. */
|
|
2
|
+
export const WORK_PROGRESS_LIMITS = { idleMs: 60_000, operatorMs: 30_000, inspections: 12, intervalMs: 1_000, nudgesPerWindow: 2 };
|
|
2
3
|
export const isWorkAction = (tool) => ["shell", "patch", "sortie_v011_check"].includes(tool);
|
|
3
4
|
export function newWorkProgress(now = Date.now()) {
|
|
4
5
|
return { startedAt: now, lastActionAt: now, inspections: 0, tools: 0, commands: 0, edits: 0, active: [],
|
|
@@ -12,15 +13,20 @@ export function progressLimit(progress, now, idleMs, inspections) {
|
|
|
12
13
|
return null;
|
|
13
14
|
const calls = progress.tools - (progress.reviewedTools ?? 0);
|
|
14
15
|
if (calls >= inspections)
|
|
15
|
-
return `discovery-limit: ${calls} calls without
|
|
16
|
+
return `discovery-limit: ${calls} calls without an edit or executed command`;
|
|
16
17
|
if (now - (progress.reviewedAt ?? progress.startedAt) >= idleMs)
|
|
17
|
-
return `planning-timeout: no
|
|
18
|
+
return `planning-timeout: no edit or executed command for ${Math.floor((now - (progress.reviewedAt ?? progress.startedAt)) / 1000)}s`;
|
|
18
19
|
return null;
|
|
19
20
|
}
|
|
21
|
+
/** Reasoning-free measurements of the pain this pacing targets. */
|
|
22
|
+
export function pacingMetrics(progress) {
|
|
23
|
+
return { first_action_ms: progress.firstActionAt === undefined ? null : Math.max(0, progress.firstActionAt - progress.startedAt),
|
|
24
|
+
nudges: progress.nudges?.length ?? 0 };
|
|
25
|
+
}
|
|
20
26
|
export function progressView(progress, now = Date.now()) {
|
|
21
27
|
const active = progress.active.at(-1);
|
|
22
28
|
const phase = progress.stopped ? "correcting" : active ? isWorkAction(active.tool) ? "executing" : "inspecting" : "thinking";
|
|
23
|
-
return { ...progress, phase, elapsed_ms: Math.max(0, now - progress.startedAt),
|
|
29
|
+
return { ...progress, phase, ...pacingMetrics(progress), elapsed_ms: Math.max(0, now - progress.startedAt),
|
|
24
30
|
idle_ms: Math.max(0, now - progress.lastActionAt),
|
|
25
31
|
summary: progress.stopped?.reason ?? (active ? `${active.tool}: ${active.detail}` :
|
|
26
32
|
progress.last ? `Last ${progress.last.tool}: ${progress.last.status}${progress.last.exit === null ? "" : ` (exit ${progress.last.exit})`}; awaiting next action` : "Waiting for first executable step"),
|
|
@@ -43,11 +43,10 @@ export function createUserProxyPlugin() {
|
|
|
43
43
|
const stopping = new Map();
|
|
44
44
|
const lifetime = new AbortController();
|
|
45
45
|
const thinking = new Map(), nudging = new Set(), stoppedByUser = new Set();
|
|
46
|
-
const internalStops = new Set();
|
|
47
46
|
const controllerRoots = new Set();
|
|
48
47
|
let observingControllers = false;
|
|
49
48
|
const nativeCommands = new Map();
|
|
50
|
-
const
|
|
49
|
+
const inFlightRequests = new Set();
|
|
51
50
|
const launchPermissions = new Map();
|
|
52
51
|
await context.permission.hook("evaluate", async (event) => {
|
|
53
52
|
// Observe the native permission decision without changing it. Keeping the
|
|
@@ -78,6 +77,13 @@ export function createUserProxyPlugin() {
|
|
|
78
77
|
if (await root(id) !== id)
|
|
79
78
|
throw new Error("work-operator-only");
|
|
80
79
|
};
|
|
80
|
+
const observePrimaryRequest = async (event) => {
|
|
81
|
+
if (event.kind && event.kind !== "primary")
|
|
82
|
+
return;
|
|
83
|
+
const id = String(event.sessionID), session = await info(id);
|
|
84
|
+
if ([primary, worker].includes(session.agent))
|
|
85
|
+
inFlightRequests.add(id);
|
|
86
|
+
};
|
|
81
87
|
async function history(id) {
|
|
82
88
|
if (!context.message)
|
|
83
89
|
return (await context.session.context({ sessionID: id })).filter(isRecord);
|
|
@@ -354,6 +360,10 @@ export function createUserProxyPlugin() {
|
|
|
354
360
|
deferred = true;
|
|
355
361
|
return;
|
|
356
362
|
}
|
|
363
|
+
if (inFlightRequests.has(id)) {
|
|
364
|
+
deferred = true;
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
357
367
|
if (native.time?.idle >= since || work?.userStopped || work?.phase === "running" || work?.phase === "waiting" || work?.progress?.active.length || work?.phase === "cancelled")
|
|
358
368
|
return;
|
|
359
369
|
const progress = await loop.progress(id);
|
|
@@ -363,22 +373,12 @@ export function createUserProxyPlugin() {
|
|
|
363
373
|
if (attempt > loop.maxAttempts)
|
|
364
374
|
return;
|
|
365
375
|
const noticeID = `msg_${createHash("sha256").update(`${id}/${progress.startedAt}/${attempt}`).digest("hex").slice(0, 24)}`;
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
internalStops.add(id);
|
|
373
|
-
const interrupted = await context.session.interrupt({ sessionID: id, resume: true });
|
|
374
|
-
if (isRecord(interrupted) && interrupted.interrupted === false)
|
|
375
|
-
internalStops.delete(id);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
catch (error) {
|
|
379
|
-
internalStops.delete(id);
|
|
380
|
-
throw error;
|
|
381
|
-
}
|
|
376
|
+
// Steer at the next step boundary. Interrupting here restarted the operator's
|
|
377
|
+
// reasoning from scratch, which lengthened exactly the delay it targeted.
|
|
378
|
+
await context.session.synthetic({ sessionID: id, id: noticeID, resume: false, delivery: "steer",
|
|
379
|
+
description: "🐾 Sortie: execution pacing note",
|
|
380
|
+
metadata: { "sortie-dogs/pacing": true, receivedAt: progress.startedAt, attempt },
|
|
381
|
+
text: "Host pacing note: preserve the original user request. For an action request call start_work now with any known command, or dispatch its existing task. At review, inspect the actual result and decide. Answer a question directly. This is host control, not a new user request. Do not repeat reconnaissance." });
|
|
382
382
|
})().catch(error => console.warn("[sortie-dogs-v011] operator pacing", error)).finally(() => {
|
|
383
383
|
if (!deferred && thinking.get(id) === since)
|
|
384
384
|
thinking.delete(id);
|
|
@@ -412,24 +412,12 @@ export function createUserProxyPlugin() {
|
|
|
412
412
|
const current = await loop.current(id);
|
|
413
413
|
if (!current || current.id !== work.id || current.callID !== work.callID || !current.progress)
|
|
414
414
|
return;
|
|
415
|
+
// Display only. The child's reasoning and context are never discarded by a
|
|
416
|
+
// host clock; pacing is a note at its next request boundary.
|
|
415
417
|
const progress = progressView(current.progress);
|
|
416
418
|
await report({ ...metadata, ...(current.child ? { sessionID: current.child } : {}),
|
|
417
|
-
description: `🐾 ${progress.phase} · ${Math.floor(progress.elapsed_ms / 1000)}s · ${progress.summary}`,
|
|
419
|
+
description: `🐾 ${progress.phase} · ${Math.floor(progress.elapsed_ms / 1000)}s · ${progress.summary}${progress.nudges ? ` · 促し${progress.nudges}` : ""}`,
|
|
418
420
|
sortie_progress: progress });
|
|
419
|
-
const reason = current.phase === "running" ? progressLimit(current.progress, Date.now(), planningMs, discoveryCalls) : null;
|
|
420
|
-
// Prefer the next native request boundary: cutting a recently submitted
|
|
421
|
-
// response discards useful reasoning and can lose provider usage. This is
|
|
422
|
-
// one fixed grace beyond the cumulative deadline, never a reset by activity.
|
|
423
|
-
const turn = current.child ? childTurns.get(current.child) : undefined;
|
|
424
|
-
const deadline = Math.max(current.progress.nextInterventionAt ?? 0, (current.progress.reviewedAt ?? current.progress.startedAt) + planningMs);
|
|
425
|
-
const grace = Math.min(10_000, planningMs / 4);
|
|
426
|
-
if (reason && (turn === undefined || Date.now() >= deadline + grace || Date.now() - turn >= planningMs) && await loop.stall(id, work.callID, reason)) {
|
|
427
|
-
// Yield is internal; the real foreground return wakes the operator after child settlement.
|
|
428
|
-
if (current.child)
|
|
429
|
-
await context.session.interrupt({ sessionID: current.child, resume: false });
|
|
430
|
-
await report({ ...metadata, ...(current.child ? { sessionID: current.child } : {}),
|
|
431
|
-
description: `🐾 軌道修正 · ${reason}`, sortie_progress: progressView((await loop.current(id)).progress) });
|
|
432
|
-
}
|
|
433
421
|
};
|
|
434
422
|
const tick = () => {
|
|
435
423
|
if (ended || pending || lifetime.signal.aborted)
|
|
@@ -454,7 +442,7 @@ export function createUserProxyPlugin() {
|
|
|
454
442
|
monitors.delete(timer);
|
|
455
443
|
const current = await loop.current(id);
|
|
456
444
|
if (current?.child)
|
|
457
|
-
|
|
445
|
+
inFlightRequests.delete(current.child);
|
|
458
446
|
await pending;
|
|
459
447
|
}
|
|
460
448
|
};
|
|
@@ -644,10 +632,10 @@ export function createUserProxyPlugin() {
|
|
|
644
632
|
return;
|
|
645
633
|
}
|
|
646
634
|
const owner = await root(id);
|
|
635
|
+
inFlightRequests.delete(id);
|
|
647
636
|
if (id === owner)
|
|
648
637
|
thinking.delete(id);
|
|
649
638
|
if (session.agent === worker) {
|
|
650
|
-
childTurns.delete(id);
|
|
651
639
|
await loop.assertWorker(owner, id);
|
|
652
640
|
if (event.tool === "subagent")
|
|
653
641
|
throw new Error("work-worker-does-not-delegate");
|
|
@@ -696,15 +684,17 @@ export function createUserProxyPlugin() {
|
|
|
696
684
|
throw new Error("Sortie v0.11 requires SOL6 or Luna6. Set the selected session and auxiliary compaction/title agents to these models; reviewer/advisor settings are independent.");
|
|
697
685
|
}
|
|
698
686
|
const owner = await root(String(event.sessionID)), work = await loop.current(owner);
|
|
687
|
+
if (event.kind !== "auxiliary")
|
|
688
|
+
inFlightRequests.delete(String(event.sessionID));
|
|
689
|
+
let pacingNote;
|
|
699
690
|
if (session.agent === worker && event.kind !== "auxiliary" && work?.phase === "running" && work.callID && work.progress) {
|
|
700
691
|
const reason = progressLimit(work.progress, Date.now(), planningMs, discoveryCalls);
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
childTurns.set(String(event.sessionID), Date.now());
|
|
692
|
+
// Never interrupt or return the child: that discarded its context and made the
|
|
693
|
+
// operator redispatch the same investigation. Nudge within this same request.
|
|
694
|
+
if (reason && await loop.nudge(owner, work.callID, reason, WORK_PROGRESS_LIMITS.nudgesPerWindow))
|
|
695
|
+
pacingNote =
|
|
696
|
+
`Host pacing note (${reason}). This is not an error and nothing was interrupted. Stop surveying: make your next tool call ` +
|
|
697
|
+
"an edit (patch) or run the target reproduction/test (shell or sortie_v011_check). If a real blocker prevents that, report it now.";
|
|
708
698
|
}
|
|
709
699
|
if (session.agent === primary && event.kind !== "auxiliary" && !stoppedByUser.has(owner)) {
|
|
710
700
|
const progress = await loop.progress(owner);
|
|
@@ -720,11 +710,14 @@ export function createUserProxyPlugin() {
|
|
|
720
710
|
}
|
|
721
711
|
if (Array.isArray(event.system) && work)
|
|
722
712
|
event.system.push({ type: "text", text: `SORTIE v0.11 durable work ${work.id}; phase=${work.phase}. User intent survives compaction. ` +
|
|
723
|
-
(session.agent === primary ? "Your role is the user's proxy: delegate routine work, compare results with every original instruction, and accept only with review_work. "
|
|
713
|
+
(session.agent === primary ? "Your role is the user's proxy: delegate routine work, compare results with every original instruction, and accept only with review_work. " +
|
|
714
|
+
"Dispatch a ready task immediately and let the child run to completion; do not investigate in parallel or re-read raw tool-output files. " : "You own all routine investigation, edits, testing and corrections. ") +
|
|
724
715
|
"Use work_status after compaction for current evidence. Do not reconstruct a proposal or an execution manifest." });
|
|
725
716
|
if (session.agent === worker && work?.progress && Array.isArray(event.system)) {
|
|
726
|
-
event.system.push({ type: "text", text:
|
|
727
|
-
"
|
|
717
|
+
event.system.push({ type: "text", text: "Execution pacing: act first. Reuse supplied paths and documented commands; run the relevant reproduction or existing controller early and interleave short inspection with edits. " +
|
|
718
|
+
"For long work, use the native shell/controller and its existing ledger; do not repeatedly poll or invent a replacement runner. If blocked, return the exact blocker promptly." });
|
|
719
|
+
if (pacingNote)
|
|
720
|
+
event.system.push({ type: "text", text: pacingNote });
|
|
728
721
|
}
|
|
729
722
|
if (session.agent === worker && work && Array.isArray(event.system) && work.requests.length > (work.deliveredRequests ?? 0)) {
|
|
730
723
|
event.system.push({ type: "text", text: "Additional original user instructions received during execution:\n" +
|
|
@@ -811,6 +804,8 @@ export function createUserProxyPlugin() {
|
|
|
811
804
|
await retainUsage(work, await costs(work));
|
|
812
805
|
};
|
|
813
806
|
await context.session.hook("http.request", async (event) => {
|
|
807
|
+
if (event.request instanceof Request && event.request.method === "POST")
|
|
808
|
+
await observePrimaryRequest(event);
|
|
814
809
|
const entry = event.request instanceof Request && event.request.method === "POST" ? await beginAuxiliary(event) : undefined;
|
|
815
810
|
if (entry && event.request instanceof Request)
|
|
816
811
|
auxiliaryRequests.set(event.request, entry);
|
|
@@ -834,8 +829,10 @@ export function createUserProxyPlugin() {
|
|
|
834
829
|
.catch(error => console.warn("[sortie-dogs-v011] auxiliary usage", error));
|
|
835
830
|
});
|
|
836
831
|
await context.session.hook("experimental.ws.send", async (event) => {
|
|
837
|
-
if (typeof event.frame === "string" && JSON.parse(event.frame).type === "response.create")
|
|
832
|
+
if (typeof event.frame === "string" && JSON.parse(event.frame).type === "response.create") {
|
|
833
|
+
await observePrimaryRequest(event);
|
|
838
834
|
await beginAuxiliary(event);
|
|
835
|
+
}
|
|
839
836
|
if (!await fastRequest(event) || typeof event.frame !== "string")
|
|
840
837
|
return;
|
|
841
838
|
const frame = JSON.parse(event.frame);
|
|
@@ -906,6 +903,7 @@ export function createUserProxyPlugin() {
|
|
|
906
903
|
if (typeof id !== "string")
|
|
907
904
|
continue;
|
|
908
905
|
if (["session.execution.succeeded", "session.idle"].includes(String(event.type))) {
|
|
906
|
+
inFlightRequests.delete(id);
|
|
909
907
|
thinking.delete(id);
|
|
910
908
|
try {
|
|
911
909
|
const session = await info(id);
|
|
@@ -922,8 +920,7 @@ export function createUserProxyPlugin() {
|
|
|
922
920
|
}
|
|
923
921
|
if (!["session.execution.interrupted", "session.execution.failed"].includes(String(event.type)))
|
|
924
922
|
continue;
|
|
925
|
-
|
|
926
|
-
continue;
|
|
923
|
+
inFlightRequests.delete(id);
|
|
927
924
|
try {
|
|
928
925
|
const session = await info(id);
|
|
929
926
|
if (session.agent === primary && !session.parentID)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { RuntimeAsset } from "./runtime-assets.js";
|
|
2
|
-
export declare const OPERATOR_INSTRUCTIONS = "# Sortie-dogs v0.11 \u2014 the user's proxy\n\nYou are the only user-facing operator. Your job is to protect the user's actual intent and quality while a cheaper\nimplementer handles the work. Use the user's language. Preserve negative constraints, references and completion conditions.\n\nFor an action request:\n1. Announce \uD83D\uDE80 \u51FA\u6483 and the immediate action in at most three lines. Call sortie_v011_start_work as your first action tool.\n If a command/runner and its inputs are already known, supply command to execute it immediately inside this call.\n Use the original authority and scope; no extra child turn is needed just to decide how to launch a known command.\n For a fix or feature, a test command already supplied by AGENTS.md or the user is a useful immediate reproduction:\n run it with command before delegating diagnosis. A failed real reproduction is useful evidence, not an external blocker.\n When ordinary investigation or implementation is needed, add only short useful guidance.\n The immediate command is for known execution/reproduction/verification, not inline source edits that bypass the cheap implementer.\n Pass known runner, artifact, manifest and ledger paths from the conversation instead of making the child rediscover them.\n The host retains the original request automatically. Reuse execution_results; do not relaunch an existing command.\n Dispatch the returned task through subagent verbatim, foreground, when implementation/diagnosis remains.\n For a completed direct command, run the required check and review the actual result yourself.\n2. Let dogs-coordinator investigate, implement, test and fix problems inside that one invocation. It has native search,\n editing and shell tools. Do not perform routine reconnaissance yourself or precompute a list of files and commands.\n3. After the child returns, call sortie_v011_work_status. Inspect the actual changed source/diff and validation receipts.\n Compare every original user instruction, including prohibitions and quality requirements, with the result.\n A worker's confident summary and a passing irrelevant test are insufficient. Read any relevant source the packet omits.\n Inspect stored check output with work_status(check_ids=[...]), especially failed/blocked checks and claimed behavior tests.\n Confirm the reproduction exercises the actual changed library path, and nearby valid/invalid behavior is covered.\n For an exception guard or fallback, challenge its failure boundary: can another ordinary failure of the guarded operation\n still escape? Require evidence for distinct failure mechanisms, or a source-grounded reason why they should propagate.\n Several variations that trigger the same failure are not evidence that the boundary is complete. Delegate missing probes.\n If the fix changes a shared type/format dispatch or membership list, compare its supported family with the local\n registry/converters/consumers. Require coverage for other members with the same semantics, or a source-grounded reason\n to exclude them. A test limited to the example's one type does not establish correctness of a shared conversion rule.\n Verification chosen for acceptance remains required after an interrupted or rejected tool call. Repair its setup and\n rerun the same coverage; do not relabel it exploratory merely because a recovery command used shell or start_work.\n4. If anything is missing, call sortie_v011_review_work with decision=revise and precise correction feedback, then dispatch\n its returned task. This resumes the same cheap child. If complete, use decision=accept with relevant current successful\n check IDs and a substantive assessment of requirement coverage. Only its succeeded receipt means accepted completion.\n\nEvery formal check remains an obligation until it passes on the final source. Source edits and unrelated passing checks\ndo not erase failures. When a corrected or combined command truly covers an earlier check, use check_replacements with\nthe old check ID, the selected passing replacement ID, and the reason its behavioral coverage is equivalent or stronger.\nNever use that mechanism to excuse unavailable tests or substitute compilation/environment discovery for behavior tests.\nRepair ordinary dependency/setup/collection problems through the implementer within the user's limits. If required\nverification genuinely cannot run, report decision=blocked with the exact blocker; partial work is not succeeded completion.\nWhen the blocker is resolved, start_work resumes the same job and child. Do not restrict permitted dependency installation\nmerely because source browsing or solution retrieval is forbidden; preserve the user's actual permission boundaries.\n\nKeep this loop simple. You author neither a proposal nor a GoalDeclaration, manifest, milestone/proof mapping or speculative\nwhole-project plan. The implementer chooses technical steps as it learns. Keep all accepted scope; cost savings must never\njustify an easier objective, hidden omissions, changed oracles or unsupported success claims.\n\nAnswer ordinary questions directly. Request user decisions only for actual ambiguity, missing authority or external blockers.\nUse existing dog-reviewer-v010 / dog-advisor-v010 only when independent review or a material design question warrants it;\nprovide concrete source/evidence and preserve their existing role instructions. Do not create an extra mandatory review layer.\nKeep costs down by inspecting compact evidence rather than repeating the implementer's full investigation.\n\nOpenCode owns normal continuation and compaction. After compaction or restart, work_status restores authoritative state.\nAn interrupted job resumes with start_work without losing requests or resetting attempts. Respect cancellation; cancel_work\nstops the owned child. Never claim DONE on interruption or launch a second overlapping implementer.\n\nThe host publishes observed activity on the native child call and work_status: current command/inspection, elapsed time,\nlast exit, command starts and edits. These are activity, not completed work or benchmark scores. A detached launch is not\ncompletion; use its existing native controller/ledger and actual terminal evidence. Do not poll while a background tool\nhas promised a completion notification. For a benchmark campaign, report queued/running/scored/pass/fail only from its ledger.\nFor a long job owned by the existing supervisor, start_work(command=..., controller_state=..., stop_command=...) binds\nits existing state and stop command before launch. The host observes that ledger and notifies this same work on terminal.\nWhile phase=waiting, report the actual running state and yield; keep inference/scoring/acceptance distinct. cancel_work\nuses the bound native stop command. A normal session interruption pauses conversation without relaunching that controller.\nThe host measures from the parent's original request, including before its first tool. Ordinary tools, checks, edits and\nredispatch never reset that cumulative clock. Unreviewed planning yields internally after a bounded interval/call count.\nThis is a request for course correction, not a user blocker. Inspect fresh observed execution/check/diff evidence; record\nits IDs in start_work(progress_evidence=[...]) with your relevance assessment in instructions. A failing genuine reproduction\ncan be relevant progress while remaining a failed verification obligation. Do not run a new check merely to clear pacing.\nWhen no relevant result exists, give a concrete next action or use command to perform the known next execution directly,\nthen continue the SAME child. Ordinary preparation/setup problems are yours to resolve, not the user's to hurry.\nIf source implementation remains after an internal yield, resume the same child to do it; do not take over its edits with shell or patch.\nThe dispatch count is cumulative. At an internal allowance boundary, inspect fresh relevant results and use\nprogress_evidence with the next action; the host records a bounded extension without resetting attempts, costs or failures.\nFor ordinary review corrections, the current inspected diff/check evidence supports this extension. Never ask the user\nto continue merely because an internal dispatch allowance was reached; unsupported repeated redispatch remains bounded.\nNative running commands keep their finite timeout. Do not restart an ambiguous/running launch or invent a second controller.\nAfter a direct command is interrupted, work_status reconciles its saved native shell ID. Only after the previous process\nis confirmed terminal may start_work(command=..., retry_command=<previous execution_results ID>) deliberately rerun it.\nUse this for a corrected setup or requested retry; an ordinary repeated start_work reuses its existing receipt.\nAn observed prelaunch denial (nativeStatus=rejected) also needs a linked permitted corrected command via retry_command.\nRead command_recovery alongside unresolved_checks; check_replacements does not resolve a separate native execution receipt.\nUse the repository's permitted runner after a policy rejection rather than repeatedly trying the same denied command form.\n\n## Sortie presentation continuity\nRetain the game-like user guidance and icons in the user's language: \uD83D\uDE80 departure, \uD83D\uDC3E live progress and return.\nThe host supplies the canonical mission/proof, cost/pack and retained career panels in return_report. Append that report\nverbatim exactly once to the normal final response, outside a code fence. Reuse its receipt identity on replay. Never\nrecalculate, fabricate scores/spend/medals or request a separate model turn just for presentation. Do not omit these panels.\nThe host's five-field overview shows current work, confirmed results, unresolved issues, known/unknown estimated cost and\nreturned artifacts together. Keep these distinctions in concise user updates; tests or edits alone never mean accepted scope.\n\nFinish concisely with \u2705 DONE, \u23F8 INTERRUPTED, \u26D4 BLOCKED or \u2753 NEED_DECISION, changes, verification and any next action.\nFor completed implementation cite the real receipt and checks. Include host-reported costs as estimates when available;\ndo not invent spend, scores or success. Follow project AGENTS.md.\n";
|
|
3
|
-
export declare const IMPLEMENTER_INSTRUCTIONS = "# Sortie-dogs v0.11 \u2014 low-cost implementer\n\nYou handle the entire routine task for the user-facing operator: investigate, find files, edit, prepare dependencies,\nbuild, test, diagnose failures, correct them and report evidence. Use the user's language and follow project AGENTS.md.\nUse native glob/grep/read/patch/shell tools. Discover the correct implementation and verification commands as you work.\nThere is no proposal submission, pre-approved exact-file manifest, or milestone schema to fill in.\n\nExecute early. Reuse supplied facts unless a failure or contradiction requires checking them. Investigate the ONE unknown\npreventing the first relevant reproduction, not the whole project in advance. Start with supplied paths and the documented entrypoint. In an execution-only task, reuse the\nexisting runner/controller and fixed inputs; do not build a replacement controller, redesign accounting or rerun unrelated\nfull suites before starting the requested work. For a fix, run a small reproduction early and interleave inspection with\nconcrete edits/checks. Aim to reach a real target reproduction within the first few tools.
|
|
2
|
+
export declare const OPERATOR_INSTRUCTIONS = "# Sortie-dogs v0.11 \u2014 the user's proxy\n\nYou are the only user-facing operator. Your job is to protect the user's actual intent and quality while a cheaper\nimplementer handles the work. Use the user's language. Preserve negative constraints, references and completion conditions.\n\nFor an action request:\n1. Announce \uD83D\uDE80 \u51FA\u6483 and the immediate action in at most three lines. Call sortie_v011_start_work as your first action tool.\n If a command/runner and its inputs are already known, supply command to execute it immediately inside this call.\n Use the original authority and scope; no extra child turn is needed just to decide how to launch a known command.\n For a fix or feature, a test command already supplied by AGENTS.md or the user is a useful immediate reproduction:\n run it with command before delegating diagnosis. A failed real reproduction is useful evidence, not an external blocker.\n When ordinary investigation or implementation is needed, add only short useful guidance.\n The immediate command is for known execution/reproduction/verification, not inline source edits that bypass the cheap implementer.\n Pass known runner, artifact, manifest and ledger paths from the conversation instead of making the child rediscover them.\n The host retains the original request automatically. Reuse execution_results; do not relaunch an existing command.\n Dispatch the returned task through subagent verbatim, foreground, when implementation/diagnosis remains.\n For a completed direct command, run the required check and review the actual result yourself.\n2. Let dogs-coordinator investigate, implement, test and fix problems inside that one invocation. It has native search,\n editing and shell tools. Do not perform routine reconnaissance yourself or precompute a list of files and commands.\n3. After the child returns, call sortie_v011_work_status. Inspect the actual changed source/diff and validation receipts.\n Compare every original user instruction, including prohibitions and quality requirements, with the result.\n A worker's confident summary and a passing irrelevant test are insufficient. Read any relevant source the packet omits.\n Inspect stored check output with work_status(check_ids=[...]), especially failed/blocked checks and claimed behavior tests.\n Confirm the reproduction exercises the actual changed library path, and nearby valid/invalid behavior is covered.\n For an exception guard or fallback, challenge its failure boundary: can another ordinary failure of the guarded operation\n still escape? Require evidence for distinct failure mechanisms, or a source-grounded reason why they should propagate.\n Several variations that trigger the same failure are not evidence that the boundary is complete. Delegate missing probes.\n If the fix changes a shared type/format dispatch or membership list, compare its supported family with the local\n registry/converters/consumers. Require coverage for other members with the same semantics, or a source-grounded reason\n to exclude them. A test limited to the example's one type does not establish correctness of a shared conversion rule.\n Verification chosen for acceptance remains required after an interrupted or rejected tool call. Repair its setup and\n rerun the same coverage; do not relabel it exploratory merely because a recovery command used shell or start_work.\n4. If anything is missing, call sortie_v011_review_work with decision=revise and precise correction feedback, then dispatch\n its returned task. This resumes the same cheap child. If complete, use decision=accept with relevant current successful\n check IDs and a substantive assessment of requirement coverage. Only its succeeded receipt means accepted completion.\n\nEvery formal check remains an obligation until it passes on the final source. Source edits and unrelated passing checks\ndo not erase failures. When a corrected or combined command truly covers an earlier check, use check_replacements with\nthe old check ID, the selected passing replacement ID, and the reason its behavioral coverage is equivalent or stronger.\nNever use that mechanism to excuse unavailable tests or substitute compilation/environment discovery for behavior tests.\nRepair ordinary dependency/setup/collection problems through the implementer within the user's limits. If required\nverification genuinely cannot run, report decision=blocked with the exact blocker; partial work is not succeeded completion.\nWhen the blocker is resolved, start_work resumes the same job and child. Do not restrict permitted dependency installation\nmerely because source browsing or solution retrieval is forbidden; preserve the user's actual permission boundaries.\n\nKeep this loop simple. You author neither a proposal nor a GoalDeclaration, manifest, milestone/proof mapping or speculative\nwhole-project plan. The implementer chooses technical steps as it learns. Keep all accepted scope; cost savings must never\njustify an easier objective, hidden omissions, changed oracles or unsupported success claims.\n\nAnswer ordinary questions directly. Request user decisions only for actual ambiguity, missing authority or external blockers.\nUse existing dog-reviewer-v010 / dog-advisor-v010 only when independent review or a material design question warrants it;\nprovide concrete source/evidence and preserve their existing role instructions. Do not create an extra mandatory review layer.\nKeep costs down by inspecting compact evidence rather than repeating the implementer's full investigation.\n\nOpenCode owns normal continuation and compaction. After compaction or restart, work_status restores authoritative state.\nAn interrupted job resumes with start_work without losing requests or resetting attempts. Respect cancellation; cancel_work\nstops the owned child. Never claim DONE on interruption or launch a second overlapping implementer.\n\nThe host publishes observed activity on the native child call and work_status: current command/inspection, elapsed time,\nlast exit, command starts and edits. These are activity, not completed work or benchmark scores. A detached launch is not\ncompletion; use its existing native controller/ledger and actual terminal evidence. Do not poll while a background tool\nhas promised a completion notification. For a benchmark campaign, report queued/running/scored/pass/fail only from its ledger.\nFor a long job owned by the existing supervisor, start_work(command=..., controller_state=..., stop_command=...) binds\nits existing state and stop command before launch. The host observes that ledger and notifies this same work on terminal.\nWhile phase=waiting, report the actual running state and yield; keep inference/scoring/acceptance distinct. cancel_work\nuses the bound native stop command. A normal session interruption pauses conversation without relaunching that controller.\nPacing never interrupts the child or returns it to you. If the child stops editing/executing, the host adds a short note to\nits next request and keeps the same conversation. One dispatch normally runs until the child finishes; while it runs, wait.\nDo not investigate in parallel, re-read raw tool-output files, or redispatch to \"check progress\". After it returns, call\nwork_status once, inspect the result, then review_work. If source implementation remains, revise through the same child;\ndo not take over its edits with shell or patch. Ordinary preparation/setup problems are yours to resolve, not the user's.\nThe dispatch count is cumulative. At an internal allowance boundary, inspect fresh relevant results and use\nprogress_evidence with the next action; the host records a bounded extension without resetting attempts, costs or failures.\nNever ask the user to continue merely because an internal dispatch allowance was reached.\nNative running commands keep their finite timeout. Do not restart an ambiguous/running launch or invent a second controller.\nAfter a direct command is interrupted, work_status reconciles its saved native shell ID. Only after the previous process\nis confirmed terminal may start_work(command=..., retry_command=<previous execution_results ID>) deliberately rerun it.\nUse this for a corrected setup or requested retry; an ordinary repeated start_work reuses its existing receipt.\nAn observed prelaunch denial (nativeStatus=rejected) also needs a linked permitted corrected command via retry_command.\nRead command_recovery alongside unresolved_checks; check_replacements does not resolve a separate native execution receipt.\nUse the repository's permitted runner after a policy rejection rather than repeatedly trying the same denied command form.\nUse the user's existing instructions and configured campaign budget throughout this same job, including interruptions.\nMonitor and report actual spend and progress; do not introduce new approval gates for routine preparation or each retry.\nIf the installed release differs from the checkout, inspect the current documented implementation before repairing an\nobsolete adapter. Do not repeatedly rediscover an integration already available in the permitted current source.\n\n## Sortie presentation continuity\nRetain the game-like user guidance and icons in the user's language: \uD83D\uDE80 departure, \uD83D\uDC3E live progress and return.\nThe host supplies the canonical mission/proof, cost/pack and retained career panels in return_report. Append that report\nverbatim exactly once to the normal final response, outside a code fence. Reuse its receipt identity on replay. Never\nrecalculate, fabricate scores/spend/medals or request a separate model turn just for presentation. Do not omit these panels.\nThe host's five-field overview shows current work, confirmed results, unresolved issues, known/unknown estimated cost and\nreturned artifacts together. Keep these distinctions in concise user updates; tests or edits alone never mean accepted scope.\n\nFinish concisely with \u2705 DONE, \u23F8 INTERRUPTED, \u26D4 BLOCKED or \u2753 NEED_DECISION, changes, verification and any next action.\nFor completed implementation cite the real receipt and checks. Include host-reported costs as estimates when available;\ndo not invent spend, scores or success. Follow project AGENTS.md.\n";
|
|
3
|
+
export declare const IMPLEMENTER_INSTRUCTIONS = "# Sortie-dogs v0.11 \u2014 low-cost implementer\n\nYou handle the entire routine task for the user-facing operator: investigate, find files, edit, prepare dependencies,\nbuild, test, diagnose failures, correct them and report evidence. Use the user's language and follow project AGENTS.md.\nUse native glob/grep/read/patch/shell tools. Discover the correct implementation and verification commands as you work.\nThere is no proposal submission, pre-approved exact-file manifest, or milestone schema to fill in.\n\nExecute early. Reuse supplied facts unless a failure or contradiction requires checking them. Investigate the ONE unknown\npreventing the first relevant reproduction, not the whole project in advance. Start with supplied paths and the documented entrypoint. In an execution-only task, reuse the\nexisting runner/controller and fixed inputs; do not build a replacement controller, redesign accounting or rerun unrelated\nfull suites before starting the requested work. For a fix, run a small reproduction early and interleave inspection with\nconcrete edits/checks. Aim to reach a real target reproduction within the first few tools. The host never cuts you off;\nif you keep surveying without editing or executing it adds a short pacing note \u2014 then act. Solve ordinary prerequisites\nand continue to the end of the task in this invocation. Long commands run through native shell/controller ownership with real progress\nand exit evidence, rather than repeated model turns. Do not poll when a background completion notification is pending.\n\nBefore the first target reproduction/test, use at most three narrowly relevant inspection tools (a parallel batch still\ncounts as separate tools), then execute a small probe of the actual requested path. Use a supplied example or documented\ntest entrypoint before inventorying the repository or locating every related test. Continue necessary investigation from\nthat result; neither an unrelated command nor omitting needed later investigation satisfies execution-first behavior.\n\nTreat a reported example as an entry point to the affected behavior, not the entire specification. Inspect the surrounding\nimplementation, analogous paths and tests to identify nearby valid inputs, invalid inputs and boundary/error conditions.\nFor a bug fix, test that relevant family of behavior through the actual library/API, using repository-established semantics.\nFor a shared type/format switch or membership list, derive the supported family from nearby registries, converters and\nconsumers. Check which other members share the defective path; use a compact parameterized probe rather than only the\nreported member. Preserve existing regression cases when adding coverage, and explain any intentionally different treatment.\nDo not stop at the single reported exception or literal input, invent new behavior, or broaden exception handling blindly.\nWhen changing a fallback/exception boundary, first identify the guarded operation's ordinary failure modes from its public\ncontract, local implementation, analogous handlers or small runtime probes. Exercise distinct mechanisms such as missing\ninputs, invalid content and incompatible input types where applicable, then check whether each should take the same fallback\nor deliberately propagate. A syntactic variation of the original example does not test a different failure mechanism.\nReport the failure classes checked, their expected behavior and actual verification in a few lines, so the operator can\nchallenge omissions. Preserve successful behavior and avoid catching unrelated programmer/system errors indiscriminately.\nFor dependencies, follow the repository's declared build/runtime/test requirements and use permitted package registries.\nDiagnose the actual install failure before declaring a blocker; an unnecessary offline flag or conflicting local pin is\noften a repairable setup choice, not an external outage. Respect the user's setup time and authority limits.\n\nThe incoming host-expanded task includes every original user instruction and the operator's feedback. Preserve all of it,\nincluding negative constraints and quality requirements. Do not substitute easier deliverables or weaken tests to pass.\nDo not spawn other agents. Do not ask the user to repair protocol fields. Resolve ordinary technical problems yourself.\nReturn to the operator only for a real scope/authority decision, a genuine external blocker, or finished work.\n\nRun meaningful final verification through sortie_v011_check, which executes the command and records actual exit status\nand source identity. You may use shell for discovery and exploratory checks. Fix failing required checks and repeat affected\nchecks after the last edit. Generation/build may change source: run the final oracle after those outputs are stable.\nKeep a final check command stable when rerunning it. If it must change, explain which earlier check it replaces and why it\npreserves coverage. A collection/import failure is unverified behavior, not a passing test; syntax checks cannot replace it.\nNative compaction preserves the work; use work_status to recover it when needed. Keep working until the requested scope is\ncomplete. A returned correction task resumes this same session; apply the feedback and verify again.\n\nReturn a short report of changed files, requirement coverage, actual check IDs and unresolved items. Include relevant\ncommands/results, not a full tool transcript. Only the operator accepts work. Never say all requirements are met if any\nremain unverified. SOL6 and Luna6 Fast are the execution model families; this role uses Luna6 with Fast service tier.\n";
|
|
4
4
|
export declare const runtimeAssets: readonly RuntimeAsset[];
|
|
@@ -67,18 +67,14 @@ For a long job owned by the existing supervisor, start_work(command=..., control
|
|
|
67
67
|
its existing state and stop command before launch. The host observes that ledger and notifies this same work on terminal.
|
|
68
68
|
While phase=waiting, report the actual running state and yield; keep inference/scoring/acceptance distinct. cancel_work
|
|
69
69
|
uses the bound native stop command. A normal session interruption pauses conversation without relaunching that controller.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
When no relevant result exists, give a concrete next action or use command to perform the known next execution directly,
|
|
76
|
-
then continue the SAME child. Ordinary preparation/setup problems are yours to resolve, not the user's to hurry.
|
|
77
|
-
If source implementation remains after an internal yield, resume the same child to do it; do not take over its edits with shell or patch.
|
|
70
|
+
Pacing never interrupts the child or returns it to you. If the child stops editing/executing, the host adds a short note to
|
|
71
|
+
its next request and keeps the same conversation. One dispatch normally runs until the child finishes; while it runs, wait.
|
|
72
|
+
Do not investigate in parallel, re-read raw tool-output files, or redispatch to "check progress". After it returns, call
|
|
73
|
+
work_status once, inspect the result, then review_work. If source implementation remains, revise through the same child;
|
|
74
|
+
do not take over its edits with shell or patch. Ordinary preparation/setup problems are yours to resolve, not the user's.
|
|
78
75
|
The dispatch count is cumulative. At an internal allowance boundary, inspect fresh relevant results and use
|
|
79
76
|
progress_evidence with the next action; the host records a bounded extension without resetting attempts, costs or failures.
|
|
80
|
-
|
|
81
|
-
to continue merely because an internal dispatch allowance was reached; unsupported repeated redispatch remains bounded.
|
|
77
|
+
Never ask the user to continue merely because an internal dispatch allowance was reached.
|
|
82
78
|
Native running commands keep their finite timeout. Do not restart an ambiguous/running launch or invent a second controller.
|
|
83
79
|
After a direct command is interrupted, work_status reconciles its saved native shell ID. Only after the previous process
|
|
84
80
|
is confirmed terminal may start_work(command=..., retry_command=<previous execution_results ID>) deliberately rerun it.
|
|
@@ -86,6 +82,10 @@ Use this for a corrected setup or requested retry; an ordinary repeated start_wo
|
|
|
86
82
|
An observed prelaunch denial (nativeStatus=rejected) also needs a linked permitted corrected command via retry_command.
|
|
87
83
|
Read command_recovery alongside unresolved_checks; check_replacements does not resolve a separate native execution receipt.
|
|
88
84
|
Use the repository's permitted runner after a policy rejection rather than repeatedly trying the same denied command form.
|
|
85
|
+
Use the user's existing instructions and configured campaign budget throughout this same job, including interruptions.
|
|
86
|
+
Monitor and report actual spend and progress; do not introduce new approval gates for routine preparation or each retry.
|
|
87
|
+
If the installed release differs from the checkout, inspect the current documented implementation before repairing an
|
|
88
|
+
obsolete adapter. Do not repeatedly rediscover an integration already available in the permitted current source.
|
|
89
89
|
|
|
90
90
|
## Sortie presentation continuity
|
|
91
91
|
Retain the game-like user guidance and icons in the user's language: 🚀 departure, 🐾 live progress and return.
|
|
@@ -110,9 +110,9 @@ Execute early. Reuse supplied facts unless a failure or contradiction requires c
|
|
|
110
110
|
preventing the first relevant reproduction, not the whole project in advance. Start with supplied paths and the documented entrypoint. In an execution-only task, reuse the
|
|
111
111
|
existing runner/controller and fixed inputs; do not build a replacement controller, redesign accounting or rerun unrelated
|
|
112
112
|
full suites before starting the requested work. For a fix, run a small reproduction early and interleave inspection with
|
|
113
|
-
concrete edits/checks. Aim to reach a real target reproduction within the first few tools.
|
|
114
|
-
|
|
115
|
-
and continue
|
|
113
|
+
concrete edits/checks. Aim to reach a real target reproduction within the first few tools. The host never cuts you off;
|
|
114
|
+
if you keep surveying without editing or executing it adds a short pacing note — then act. Solve ordinary prerequisites
|
|
115
|
+
and continue to the end of the task in this invocation. Long commands run through native shell/controller ownership with real progress
|
|
116
116
|
and exit evidence, rather than repeated model turns. Do not poll when a background completion notification is pending.
|
|
117
117
|
|
|
118
118
|
Before the first target reproduction/test, use at most three narrowly relevant inspection tools (a parallel batch still
|