@duetso/agent 0.1.173 → 0.1.175
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 +2 -1
- package/dist/package.json +1 -1
- package/dist/src/tui/app.d.ts.map +1 -1
- package/dist/src/tui/app.js +31 -3
- package/dist/src/tui/app.js.map +1 -1
- package/dist/src/tui/key-handlers.d.ts +22 -0
- package/dist/src/tui/key-handlers.d.ts.map +1 -1
- package/dist/src/tui/key-handlers.js +45 -1
- package/dist/src/tui/key-handlers.js.map +1 -1
- package/dist/src/tui/renderer-lifecycle.d.ts +9 -3
- package/dist/src/tui/renderer-lifecycle.d.ts.map +1 -1
- package/dist/src/tui/renderer-lifecycle.js +10 -4
- package/dist/src/tui/renderer-lifecycle.js.map +1 -1
- package/dist/src/tui/status-controller.d.ts +16 -0
- package/dist/src/tui/status-controller.d.ts.map +1 -1
- package/dist/src/tui/status-controller.js +38 -2
- package/dist/src/tui/status-controller.js.map +1 -1
- package/dist/src/tui/step-renderer.d.ts +1 -2
- package/dist/src/tui/step-renderer.d.ts.map +1 -1
- package/dist/src/tui/step-renderer.js +2 -2
- package/dist/src/tui/step-renderer.js.map +1 -1
- package/dist/src/tui/theme.d.ts +2 -1
- package/dist/src/tui/theme.d.ts.map +1 -1
- package/dist/src/tui/theme.js +9 -3
- package/dist/src/tui/theme.js.map +1 -1
- package/dist/src/tui/transcript-writer.d.ts +38 -0
- package/dist/src/tui/transcript-writer.d.ts.map +1 -1
- package/dist/src/tui/transcript-writer.js +58 -2
- package/dist/src/tui/transcript-writer.js.map +1 -1
- package/dist/src/turn-runner/prompts.d.ts +5 -1
- package/dist/src/turn-runner/prompts.d.ts.map +1 -1
- package/dist/src/turn-runner/prompts.js +40 -2
- package/dist/src/turn-runner/prompts.js.map +1 -1
- package/dist/src/turn-runner/turn-runner.d.ts.map +1 -1
- package/dist/src/turn-runner/turn-runner.js +9 -1
- package/dist/src/turn-runner/turn-runner.js.map +1 -1
- package/package.json +1 -1
package/dist/src/tui/theme.js
CHANGED
|
@@ -14,9 +14,15 @@ export const COLORS = {
|
|
|
14
14
|
border: "#374151",
|
|
15
15
|
};
|
|
16
16
|
// Esc is intentionally absent from the idle hint: when no turn is running
|
|
17
|
-
// it is a no-op (it only closes open pickers, which is self-evident).
|
|
18
|
-
//
|
|
19
|
-
|
|
17
|
+
// it is a no-op (it only closes open pickers, which is self-evident).
|
|
18
|
+
// The label is "exit" not "quit" because Ctrl+C on an empty idle composer
|
|
19
|
+
// asks for confirmation first (see HINT_EXIT_CONFIRM) rather than quitting
|
|
20
|
+
// on the first press.
|
|
21
|
+
export const HINT_IDLE = "Enter: send · Shift+Enter: newline · PgUp/PgDn: scroll · Ctrl+C: exit";
|
|
22
|
+
// Persistent prompt shown in the status line after a bare Ctrl+C on an
|
|
23
|
+
// empty, idle composer. It does not auto-dismiss: the user either confirms
|
|
24
|
+
// (Ctrl+C again or Enter) or cancels by pressing any other key.
|
|
25
|
+
export const HINT_EXIT_CONFIRM = "Press Ctrl+C again or Enter to exit";
|
|
20
26
|
// Ctrl+Enter surfaces in the running hint only; advertising it on the
|
|
21
27
|
// idle hint would be noise (idle has nothing to steer against). The
|
|
22
28
|
// keystroke is a no-op when the composer is empty, so a single line
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/tui/theme.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,wEAAwE;AACxE,2DAA2D;AAC3D,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;CACT,CAAC;AAEX,0EAA0E;AAC1E,0EAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/tui/theme.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,wEAAwE;AACxE,2DAA2D;AAC3D,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;CACT,CAAC;AAEX,0EAA0E;AAC1E,sEAAsE;AACtE,0EAA0E;AAC1E,2EAA2E;AAC3E,sBAAsB;AACtB,MAAM,CAAC,MAAM,SAAS,GAAG,uEAAuE,CAAC;AAEjG,uEAAuE;AACvE,2EAA2E;AAC3E,gEAAgE;AAChE,MAAM,CAAC,MAAM,iBAAiB,GAAG,qCAAqC,CAAC;AACvE,sEAAsE;AACtE,oEAAoE;AACpE,oEAAoE;AACpE,6CAA6C;AAC7C,MAAM,CAAC,MAAM,YAAY,GACvB,iFAAiF,CAAC;AAEpF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,wBAAwB,EAAE,CAAC;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,oBAAoB,QAAQ,CAAC;AAEnE,SAAS,wBAAwB;IAC/B,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ;QAAE,OAAO,cAAc,CAAC;IACzD,kEAAkE;IAClE,4DAA4D;IAC5D,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,cAAc;QAAE,OAAO,cAAc,CAAC;IACvE,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { type CliRenderer, type KeyEvent, type ScrollBoxRenderable, TextRenderable } from "@opentui/core";
|
|
2
2
|
import type { TranscriptEntry } from "./transcript-log.js";
|
|
3
|
+
/**
|
|
4
|
+
* Hard cap on the number of renderables kept in the transcript ScrollBox.
|
|
5
|
+
*
|
|
6
|
+
* OpenTUI runs a full Yoga layout pass over every transcript child on each
|
|
7
|
+
* frame, so an unbounded content tree makes per-frame layout O(n). Long
|
|
8
|
+
* sessions append thousands of lines; once the tree grows tall enough, a
|
|
9
|
+
* single frame (or a single streaming append, which re-lays out the whole
|
|
10
|
+
* tree) costs hundreds of milliseconds to over a second, which starves the
|
|
11
|
+
* event loop and makes mouse-wheel scrolling stop responding entirely — the
|
|
12
|
+
* v0.1.171 long-transcript freeze. Capping the live node count keeps layout
|
|
13
|
+
* cost constant regardless of session length.
|
|
14
|
+
*
|
|
15
|
+
* 1500 rows is a generous scrollback bound — dozens of screens — so eviction
|
|
16
|
+
* is invisible in normal use while keeping a steady-state frame well under
|
|
17
|
+
* the responsiveness budget.
|
|
18
|
+
*/
|
|
19
|
+
export declare const MAX_TRANSCRIPT_RENDERABLES = 1500;
|
|
3
20
|
export interface TranscriptWriterOptions {
|
|
4
21
|
/** Reads the last drag-selected text; surfaced in `/diag` key dumps so we
|
|
5
22
|
* can correlate "key fired" with "selection state at that moment". */
|
|
@@ -43,6 +60,27 @@ export declare class TranscriptWriter {
|
|
|
43
60
|
* block (which destroys its own refs on dismiss) and substitutes a single
|
|
44
61
|
* space for empty content so the renderable still occupies a row. */
|
|
45
62
|
addLine(content: string, fg: string): TextRenderable;
|
|
63
|
+
/** Mount a renderable into the transcript ScrollBox and enforce the
|
|
64
|
+
* renderable cap. Every transcript write — this writer's own lines plus
|
|
65
|
+
* the step renderer's streaming / tool-call lines — funnels through here
|
|
66
|
+
* so the eviction policy lives in exactly one place. */
|
|
67
|
+
mount(line: TextRenderable): void;
|
|
68
|
+
/** Drop the oldest renderables once the tree grows past
|
|
69
|
+
* {@link MAX_TRANSCRIPT_RENDERABLES} so per-frame Yoga layout stays O(1)
|
|
70
|
+
* in session length (see the constant's doc for the freeze it prevents).
|
|
71
|
+
*
|
|
72
|
+
* Eviction only runs while the view is pinned to the bottom. When the
|
|
73
|
+
* user has scrolled up to read history, removing lines from the top
|
|
74
|
+
* shifts the content under the viewport and yanks what they are reading;
|
|
75
|
+
* deferring until they return to the bottom keeps scrolled-up reading
|
|
76
|
+
* stable. The freeze this guards against happens during bottom-pinned
|
|
77
|
+
* streaming, so trimming there is both sufficient and invisible. */
|
|
78
|
+
private evictOverflow;
|
|
79
|
+
/** Whether the transcript is scrolled to (or pinned at) the bottom, using
|
|
80
|
+
* the same `scrollTop >= maxScrollTop` test OpenTUI applies internally for
|
|
81
|
+
* `stickyStart: "bottom"`. Reads last-rendered scroll geometry, which is
|
|
82
|
+
* exactly the "was the user at the bottom" signal eviction needs. */
|
|
83
|
+
private isPinnedToBottom;
|
|
46
84
|
/** Records a user/agent message body in the parallel log read by `/copy`
|
|
47
85
|
* and the copy keystroke. Trims and drops empty payloads so noisy
|
|
48
86
|
* presentation-only writes (spacers, etc.) do not pollute the log. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript-writer.d.ts","sourceRoot":"","sources":["../../../src/tui/transcript-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,cAAc,EACf,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,uBAAuB;IACtC;2EACuE;IACvE,oBAAoB,EAAE,MAAM,MAAM,CAAC;IACnC;;;uCAGmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAED;;;;;GAKG;AACH,qBAAa,gBAAgB;IAazB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAd1B,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AI;IAgB1C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAShC,OAAO,CAAC,qBAAqB;CAI9B;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAElE"}
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { TextRenderable, } from "@opentui/core";
|
|
2
2
|
import { COLORS } from "./theme.js";
|
|
3
|
+
/**
|
|
4
|
+
* Hard cap on the number of renderables kept in the transcript ScrollBox.
|
|
5
|
+
*
|
|
6
|
+
* OpenTUI runs a full Yoga layout pass over every transcript child on each
|
|
7
|
+
* frame, so an unbounded content tree makes per-frame layout O(n). Long
|
|
8
|
+
* sessions append thousands of lines; once the tree grows tall enough, a
|
|
9
|
+
* single frame (or a single streaming append, which re-lays out the whole
|
|
10
|
+
* tree) costs hundreds of milliseconds to over a second, which starves the
|
|
11
|
+
* event loop and makes mouse-wheel scrolling stop responding entirely — the
|
|
12
|
+
* v0.1.171 long-transcript freeze. Capping the live node count keeps layout
|
|
13
|
+
* cost constant regardless of session length.
|
|
14
|
+
*
|
|
15
|
+
* 1500 rows is a generous scrollback bound — dozens of screens — so eviction
|
|
16
|
+
* is invisible in normal use while keeping a steady-state frame well under
|
|
17
|
+
* the responsiveness budget.
|
|
18
|
+
*/
|
|
19
|
+
export const MAX_TRANSCRIPT_RENDERABLES = 1500;
|
|
3
20
|
/**
|
|
4
21
|
* Owns every write to the transcript ScrollBox plus the `/diag` key+selection
|
|
5
22
|
* event log. Centralizing here keeps the post-teardown try/catch that swallows
|
|
@@ -39,7 +56,7 @@ export class TranscriptWriter {
|
|
|
39
56
|
return undefined;
|
|
40
57
|
try {
|
|
41
58
|
const line = new TextRenderable(this.renderer, { content, fg });
|
|
42
|
-
this.
|
|
59
|
+
this.mount(line);
|
|
43
60
|
return line;
|
|
44
61
|
}
|
|
45
62
|
catch (error) {
|
|
@@ -75,9 +92,48 @@ export class TranscriptWriter {
|
|
|
75
92
|
* space for empty content so the renderable still occupies a row. */
|
|
76
93
|
addLine(content, fg) {
|
|
77
94
|
const line = new TextRenderable(this.renderer, { content: content || " ", fg });
|
|
78
|
-
this.
|
|
95
|
+
this.mount(line);
|
|
79
96
|
return line;
|
|
80
97
|
}
|
|
98
|
+
/** Mount a renderable into the transcript ScrollBox and enforce the
|
|
99
|
+
* renderable cap. Every transcript write — this writer's own lines plus
|
|
100
|
+
* the step renderer's streaming / tool-call lines — funnels through here
|
|
101
|
+
* so the eviction policy lives in exactly one place. */
|
|
102
|
+
mount(line) {
|
|
103
|
+
this.transcript.add(line);
|
|
104
|
+
this.evictOverflow();
|
|
105
|
+
}
|
|
106
|
+
/** Drop the oldest renderables once the tree grows past
|
|
107
|
+
* {@link MAX_TRANSCRIPT_RENDERABLES} so per-frame Yoga layout stays O(1)
|
|
108
|
+
* in session length (see the constant's doc for the freeze it prevents).
|
|
109
|
+
*
|
|
110
|
+
* Eviction only runs while the view is pinned to the bottom. When the
|
|
111
|
+
* user has scrolled up to read history, removing lines from the top
|
|
112
|
+
* shifts the content under the viewport and yanks what they are reading;
|
|
113
|
+
* deferring until they return to the bottom keeps scrolled-up reading
|
|
114
|
+
* stable. The freeze this guards against happens during bottom-pinned
|
|
115
|
+
* streaming, so trimming there is both sufficient and invisible. */
|
|
116
|
+
evictOverflow() {
|
|
117
|
+
if (!this.isPinnedToBottom())
|
|
118
|
+
return;
|
|
119
|
+
const children = this.transcript.getChildren();
|
|
120
|
+
const overflow = children.length - MAX_TRANSCRIPT_RENDERABLES;
|
|
121
|
+
if (overflow <= 0)
|
|
122
|
+
return;
|
|
123
|
+
// Snapshot the victims before mutating the live children array.
|
|
124
|
+
for (const victim of children.slice(0, overflow)) {
|
|
125
|
+
this.transcript.remove(victim.id);
|
|
126
|
+
victim.destroyRecursively();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** Whether the transcript is scrolled to (or pinned at) the bottom, using
|
|
130
|
+
* the same `scrollTop >= maxScrollTop` test OpenTUI applies internally for
|
|
131
|
+
* `stickyStart: "bottom"`. Reads last-rendered scroll geometry, which is
|
|
132
|
+
* exactly the "was the user at the bottom" signal eviction needs. */
|
|
133
|
+
isPinnedToBottom() {
|
|
134
|
+
const maxScrollTop = Math.max(0, this.transcript.scrollHeight - this.transcript.viewport.height);
|
|
135
|
+
return this.transcript.scrollTop >= maxScrollTop;
|
|
136
|
+
}
|
|
81
137
|
// ---- transcript log ------------------------------------------------------
|
|
82
138
|
/** Records a user/agent message body in the parallel log read by `/copy`
|
|
83
139
|
* and the copy keystroke. Trims and drops empty payloads so noisy
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript-writer.js","sourceRoot":"","sources":["../../../src/tui/transcript-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"transcript-writer.js","sourceRoot":"","sources":["../../../src/tui/transcript-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGpC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAa/C;;;;;GAKG;AACH,MAAM,OAAO,gBAAgB;IAaR;IACA;IACA;IAdX,SAAS,GAAG,KAAK,CAAC;IAClB,mBAAmB,GAAG,KAAK,CAAC;IAC5B,cAAc,GAAG,KAAK,CAAC;IACd,GAAG,GAAsB,EAAE,CAAC;IAC7C,oEAAoE;IACpE,wEAAwE;IACxE,oEAAoE;IACpE,qEAAqE;IACrE,4DAA4D;IACpD,eAAe,GAA8B,EAAE,CAAC;IAExD,YACmB,QAAqB,EACrB,UAA+B,EAC/B,OAAgC;QAFhC,aAAQ,GAAR,QAAQ,CAAa;QACrB,eAAU,GAAV,UAAU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urnRunnerConfig } from "../types/config.js";
|
|
3
3
|
import type { TurnMode, TurnState } from "../types/protocol.js";
|
|
4
|
+
import type { StateMachineDefinition } from "../types/state-machine.js";
|
|
4
5
|
export declare function createSystemPromptWithAppendedLayers(input: {
|
|
5
6
|
config: TurnRunnerConfig;
|
|
6
7
|
skills: readonly Skill[];
|
|
@@ -31,7 +32,10 @@ export declare function createSystemPromptWithAppendedLayers(input: {
|
|
|
31
32
|
* worker identity is the sub-agent's primary role and the inherited chat
|
|
32
33
|
* persona reads as secondary context, not the top-level instruction.
|
|
33
34
|
*/
|
|
34
|
-
export declare function createStateAgentSystemPromptLayer(
|
|
35
|
+
export declare function createStateAgentSystemPromptLayer(context?: {
|
|
36
|
+
definition: StateMachineDefinition;
|
|
37
|
+
currentState: string;
|
|
38
|
+
}): string;
|
|
35
39
|
export declare function createStateMachineSystemPromptLayer(input: {
|
|
36
40
|
mode: TurnMode;
|
|
37
41
|
session?: TurnState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/turn-runner/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAG7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/turn-runner/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAG7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAkCxE,wBAAgB,oCAAoC,CAAC,KAAK,EAAE;IAC1D,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IACzB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAG5B,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEpC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACnC,GAAG,MAAM,CAaT;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iCAAiC,CAAC,OAAO,CAAC,EAAE;IAC1D,UAAU,EAAE,sBAAsB,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,MAAM,CAaT;AA2CD,wBAAgB,mCAAmC,CAAC,KAAK,EAAE;IACzD,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,GAAG,MAAM,CAyCT;AAED;;;;;;;;;GASG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAW5D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oCAAoC,IAAI,MAAM,CAS7D"}
|
|
@@ -66,8 +66,8 @@ export function createSystemPromptWithAppendedLayers(input) {
|
|
|
66
66
|
* worker identity is the sub-agent's primary role and the inherited chat
|
|
67
67
|
* persona reads as secondary context, not the top-level instruction.
|
|
68
68
|
*/
|
|
69
|
-
export function createStateAgentSystemPromptLayer() {
|
|
70
|
-
|
|
69
|
+
export function createStateAgentSystemPromptLayer(context) {
|
|
70
|
+
const identity = dedent `
|
|
71
71
|
<state_agent_identity>
|
|
72
72
|
You are a sub-agent executing a single state of a state machine, not a chat assistant in a live conversation. Your complete and only task is the instruction you were handed in this turn's prompt. There is no separate "latest user message" to look for, no thread to pull, and no one to wait on — the prompt IS the task.
|
|
73
73
|
|
|
@@ -76,6 +76,44 @@ export function createStateAgentSystemPromptLayer() {
|
|
|
76
76
|
Do the task and report what you did and what you found as your final message. If you are genuinely blocked, say exactly what blocked you and what you tried — that is itself completing the task. Standing down because your context resembles an empty chat is the one failure mode that is never correct here.
|
|
77
77
|
</state_agent_identity>
|
|
78
78
|
`;
|
|
79
|
+
const machineContext = context ? createStateAgentMachineContext(context) : undefined;
|
|
80
|
+
return [identity, machineContext].filter(Boolean).join("\n\n");
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Situates the sub-agent inside the larger state machine so it scopes its work
|
|
84
|
+
* to the current state instead of trying to deliver the whole process.
|
|
85
|
+
*
|
|
86
|
+
* Without this, a sub-agent only sees its own prompt and the worker identity,
|
|
87
|
+
* so it has no idea other states exist to carry the work forward. A planning
|
|
88
|
+
* state ("draft a plan", "scope the change") then over-reaches and starts
|
|
89
|
+
* implementing — a failure observed most on smaller models — because nothing
|
|
90
|
+
* told it that implementation is a separate downstream state owned by a fresh
|
|
91
|
+
* sub-agent. Listing the machine's overall goal, every state by name and kind,
|
|
92
|
+
* and marking which one is current makes the boundary explicit: do this state's
|
|
93
|
+
* job, report back, and let the orchestrator route to the next state.
|
|
94
|
+
*/
|
|
95
|
+
function createStateAgentMachineContext(context) {
|
|
96
|
+
const stateList = context.definition.states
|
|
97
|
+
.map((state) => {
|
|
98
|
+
const marker = state.name === context.currentState ? " ← YOU ARE HERE" : "";
|
|
99
|
+
const when = state.when ? ` — ${state.when}` : "";
|
|
100
|
+
return `- ${state.name} (${state.kind})${when}${marker}`;
|
|
101
|
+
})
|
|
102
|
+
.join("\n");
|
|
103
|
+
return dedent `
|
|
104
|
+
<state_machine_context>
|
|
105
|
+
You are one state in a larger state machine called "${context.definition.name}". Its overall goal is:
|
|
106
|
+
|
|
107
|
+
${context.definition.prompt}
|
|
108
|
+
|
|
109
|
+
The full set of states, in definition order, is:
|
|
110
|
+
${stateList}
|
|
111
|
+
|
|
112
|
+
You are executing ONLY the "${context.currentState}" state. Do that state's job and nothing more — the other states exist precisely so that later work is handled by their own fresh sub-agents, and an orchestrator routes between them after reading each report. Do not try to complete downstream states' work yourself: if this state is to plan, scope, or research, stop at planning and report your findings; do not start implementing what a later state is meant to build. Staying inside your state's boundary is what keeps the machine's plan visible and its steps verifiable.
|
|
113
|
+
|
|
114
|
+
Treat any instruction in your prompt to "pass through to", "hand off to", "proceed to", "then implement", or otherwise move on to a later step as a cue to FINISH this state and report that it is ready — never as license to perform that later step yourself. The handoff is the orchestrator's job, not yours: you cannot select or run another state, so doing the next state's work here only collapses two states into one and breaks the machine. When your prompt blurs this state into the next, resolve the ambiguity by doing only the part that matches "${context.currentState}" and reporting readiness for what comes after.
|
|
115
|
+
</state_machine_context>
|
|
116
|
+
`;
|
|
79
117
|
}
|
|
80
118
|
export function createStateMachineSystemPromptLayer(input) {
|
|
81
119
|
const constraint = input.mode === "auto"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/turn-runner/prompts.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/turn-runner/prompts.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAItC,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE1D,SAAS,eAAe,CAAC,GAAW;IAClC,OAAO,MAAM,CAAA;;iCAEkB,GAAG;;;GAGjC,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB;IAC9B,+EAA+E;IAC/E,2EAA2E;IAC3E,gDAAgD;IAChD,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACpD,OAAO,MAAM,CAAA;;0BAEW,KAAK;;GAE5B,CAAC;AAC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Aif;QACjf,uUAAuU;QACvU,UAAU;QACV,gBAAgB;KACjB;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mCAAmC;IACjD,OAAO;QACL,ubAAub;QACvb,iEAAiE;QACjE,gXAAgX;QAChX,yoBAAyoB;QACzoB,gVAAgV;QAChV,sWAAsW;QACtW,6SAA6S;QAC7S,sVAAsV;KACvV,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACjB,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oCAAoC;IAClD,OAAO;QACL,qYAAqY;QACrY,2eAA2e;QAC3e,qYAAqY;QACrY,oZAAoZ;QACpZ,6RAA6R;QAC7R,uTAAuT;KACxT,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACjB,CAAC;AAED,SAAS,wBAAwB,CAAC,MAAwB;IACxD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,MAAM,CAAA;;MAET,KAAK,CAAC;QACN,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC7B,KAAK,EAAE;gBACL,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE;gBAClD,WAAW,EAAE,KAAK,CAAC,WAAW;aAC/B;SACF,CAAC,CAAC;KACJ,CAAC;GACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-runner.d.ts","sourceRoot":"","sources":["../../../src/turn-runner/turn-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,+BAA+B,CAA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SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAoBvD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,oBAAoB;IAsD5B;;;;;;;;;OASG;IACH,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI;IAYvD;;;;;;;;;;;;;;;;;OAiBG;IACH,SAAS,CAAC,0BAA0B;;;;;;IAgBpC;;;;;;;OAOG;IACH,SAAS,CAAC,sBAAsB,IAAI,MAAM;IAK1C;;;;;;OAMG;IACH,SAAS,CAAC,uBAAuB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM;CAIhE"}
|
|
@@ -939,13 +939,21 @@ export class TurnRunner {
|
|
|
939
939
|
// prompts say "use the /foo skill to do xyz" and have the skill body
|
|
940
940
|
// injected, instead of shipping the literal `/foo` text to the model.
|
|
941
941
|
const expandedPrompt = this.skillContext.resolveSlashSkillPrompt(input.prompt, stateSkills);
|
|
942
|
+
// Hand the sub-agent the machine's overall goal, the full state list, and
|
|
943
|
+
// which state it is running so it scopes its work to this state instead of
|
|
944
|
+
// running the whole process (a common over-reach on smaller models). The
|
|
945
|
+
// session always exists while an agent state is executing.
|
|
946
|
+
const session = this.stateMachineController.getSession();
|
|
947
|
+
const machineContext = session
|
|
948
|
+
? { definition: session.definition, currentState: input.state.name }
|
|
949
|
+
: undefined;
|
|
942
950
|
const agent = this.createAgent({
|
|
943
951
|
state,
|
|
944
952
|
// Lead with the worker identity so it is the sub-agent's primary role,
|
|
945
953
|
// ahead of the inherited chat-assistant persona that would otherwise
|
|
946
954
|
// pull it into "there's no user message here" mode. The per-state
|
|
947
955
|
// systemPrompt refines that identity, so it stays an append.
|
|
948
|
-
prependSystemPrompt: createStateAgentSystemPromptLayer(),
|
|
956
|
+
prependSystemPrompt: createStateAgentSystemPromptLayer(machineContext),
|
|
949
957
|
appendSystemPrompt: input.state.systemPrompt,
|
|
950
958
|
skills: stateSkills,
|
|
951
959
|
// Per-state cwd lets one agent state operate on a different
|