@gaunt-sloth/core 2.0.0-alpha.2 → 2.0.0-alpha.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"GthAbstractAgent.js","sourceRoot":"","sources":["../../src/core/GthAbstractAgent.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,WAAW,GAEZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,cAAc,EAAe,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAG/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAuB,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AAEzC;;;;;;;;;;;;GAYG;AACH,MAAM,OAAgB,gBAAgB;IAC1B,YAAY,CAAuB;IACnC,SAAS,CAA6B;IACtC,KAAK,GAA4B,IAAI,CAAC;IACtC,MAAM,GAAqB,IAAI,CAAC;IAChC,OAAO,GAA2B,SAAS,CAAC;IAEtD,YAAY,YAAkC,EAAE,SAA0B;QACxE,IAAI,CAAC,YAAY,GAAG,CAAC,KAAkB,EAAE,OAAe,EAAE,EAAE;YAC1D,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC/B,CAAC,CAAC;QACF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAYD;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,QAAmB,EAAE,SAAy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AAC;YAClC,CAAC;QACH,CAAC;QACD,OAAO,cAAc,CAAC;IACxB,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import { GthConfig } from '#src/config.js';
2
2
  import { BaseCheckpointSaver } from '@langchain/langgraph';
3
- import { AgentResolvers, AgentStreamEvent, GthAgentFactory, GthAgentInterface, GthCommand, Message, StatusUpdateCallback } from '#src/core/types.js';
3
+ import { AgentResolvers, AgentStreamEvent, GthAgentFactory, GthAgentInterface, GthCommand, Message, StatusUpdateCallback, ToolApprovalCallback } from '#src/core/types.js';
4
4
  /**
5
5
  * Agent simplifies interaction with LLM and reduces it to calling a few methods
6
6
  * {@link GthAgentRunner#init} and {@link GthAgentRunner#processMessages}.
@@ -12,6 +12,38 @@ export declare class GthAgentRunner {
12
12
  private config;
13
13
  private runConfig;
14
14
  private agentFactory;
15
+ /**
16
+ * Consumer hook invoked when a run suspends on a tool-approval interrupt (e.g. the opt-in
17
+ * `run_shell_command` confirmation). Set via {@link setToolApprovalCallback}; when unset the
18
+ * runner REJECTS pending tool calls rather than hanging or auto-approving — the safe default
19
+ * for non-interactive entrypoints (a scripted `exec` run with no TTY to prompt on).
20
+ */
21
+ private toolApprovalCallback;
22
+ /** The command the runner was initialized for; selects which `devTools` config applies. */
23
+ private command;
24
+ /**
25
+ * EXT-12 — runtime, session-scoped yolo flag toggled by the `/yolo` slash command. Distinct
26
+ * from the static `devTools.shellYolo` config flag (which omits the tool from `interruptOn` at
27
+ * agent-build time and cannot be changed mid-session). Because the tool stays gated (in
28
+ * `interruptOn`), this flag is consulted at the TOP of {@link decideToolApproval}: when ON, a
29
+ * gated `run_shell_command` is auto-approved WITHOUT prompting (yolo behaviour) for the rest of
30
+ * this runner's life. Never persisted; defaults OFF. It does NOT disable the hardline floor —
31
+ * catastrophic commands are still refused at exec time in `GthDevToolkit.executeCommand`.
32
+ */
33
+ private sessionYolo;
34
+ /**
35
+ * EXT-9 Tier-2 session allow-list — approved command prefixes that auto-approve for the
36
+ * life of THIS runner instance. Instance-scoped (not module-global) so concurrent
37
+ * sessions (ACP / AG-UI multi-session) cannot stomp each other's approvals.
38
+ */
39
+ private readonly sessionAllowlist;
40
+ /**
41
+ * EXT-9 Tier-2 persisted (`always`) allow-list, loaded lazily on first use from
42
+ * `.gsloth/.gsloth-settings/shell-allowlist.json`. Null until the shell tool is gated
43
+ * and the allow-list is enabled; null also when persistence is disabled by config.
44
+ */
45
+ private persistedAllowlist;
46
+ private persistedAllowlistLoaded;
15
47
  /**
16
48
  * @param agentFactory Produces the {@link GthAgentInterface} the runner drives.
17
49
  * Defaults to the lean {@link GthLangChainAgent} (core). `@gaunt-sloth/agent`
@@ -19,6 +51,21 @@ export declare class GthAgentRunner {
19
51
  * `createDeepAgent` graph without core depending on deepagents.
20
52
  */
21
53
  constructor(statusUpdate: StatusUpdateCallback, resolvers?: AgentResolvers, agentFactory?: GthAgentFactory);
54
+ /**
55
+ * Register the tool-approval handler the runner calls when a run suspends on a tool-approval
56
+ * interrupt (the interactive readline session wires a y/n prompt here). Pass `null` to clear.
57
+ * Without a handler the runner rejects pending tool calls (see {@link toolApprovalCallback}).
58
+ */
59
+ setToolApprovalCallback(callback: ToolApprovalCallback | null): void;
60
+ /**
61
+ * EXT-12 — flip the runtime, session-scoped yolo flag (the `/yolo` slash command). When ON,
62
+ * gated `run_shell_command` calls auto-approve without prompting for the rest of this session;
63
+ * the hardline floor still applies at exec time. Returns the NEW state so the caller can render
64
+ * a notice. Session-scoped only — nothing is written to config.
65
+ */
66
+ toggleSessionYolo(): boolean;
67
+ /** EXT-12 — current state of the runtime session-scoped yolo flag (see {@link toggleSessionYolo}). */
68
+ isSessionYolo(): boolean;
22
69
  /**
23
70
  * Init is split into a separate method. This may create a number of connections,
24
71
  * and we'd better have an instance by that moment, for the case things will go wrong,
@@ -29,6 +76,59 @@ export declare class GthAgentRunner {
29
76
  * processMessages deals with both streaming and non-streaming approaches.
30
77
  */
31
78
  processMessages(messages: Message[]): Promise<string>;
79
+ /**
80
+ * Accumulate a text stream into a single string. Extracted so {@link processMessages} and
81
+ * the interrupt-resume loop ({@link resolveToolInterrupts}) drain streams identically.
82
+ */
83
+ private drainTextStream;
84
+ /**
85
+ * After a streamed run ends, resolve any tool-approval interrupts it suspended on. For each
86
+ * pending tool call the {@link toolApprovalCallback} is consulted (defaulting to REJECT when
87
+ * no handler is wired, so a non-interactive run never hangs or auto-approves); the collected
88
+ * decisions are then sent back via the agent's `streamResume` as a LangChain HITL resume
89
+ * (`{ decisions }`). Because a resumed run can suspend again on the next gated tool call, this
90
+ * loops until the graph completes with no pending interrupts. Returns the concatenated text
91
+ * streamed across all resume turns (empty when nothing was resumed).
92
+ *
93
+ * No-ops (returns '') when the agent does not support interrupts (`getPendingToolInterrupts`/
94
+ * `streamResume` absent), so the lean agent and non-HITL configs are unaffected.
95
+ */
96
+ private resolveToolInterrupts;
97
+ /**
98
+ * Decide a single pending tool call (EXT-9 Tier-2). For the opt-in `run_shell_command`,
99
+ * consult the scoped allow-list FIRST: if the command's classified prefix is already
100
+ * approved (session or persisted `always`) and survives the safe-bin anti-widening
101
+ * re-validation, auto-approve SILENTLY (no human prompt). Otherwise fall through to the
102
+ * human callback; when the human grants `session`/`always` scope, record the command's
103
+ * classified prefix into the matching store so future flag-variants stop re-prompting.
104
+ *
105
+ * When no human callback is wired (non-TTY exec run) and nothing is allow-listed, reject —
106
+ * never auto-approve. Non-shell tools (or any tool when the allow-list is disabled) skip the
107
+ * allow-list and go straight to the human callback / default-reject, preserving prior behaviour.
108
+ *
109
+ * Hardline catastrophic commands remain refused at exec time regardless of any approval here
110
+ * (defense in depth in `GthDevToolkit.executeCommand`), so an allow-listed `rm -rf /` still
111
+ * cannot run.
112
+ */
113
+ private decideToolApproval;
114
+ /** Whether the EXT-10 LLM-as-judge safety gate is enabled for the active command's config. */
115
+ private isShellJudgeOn;
116
+ /** Whether the EXT-9 Tier-2 allow-list is enabled for the active command's devTools config. */
117
+ private isShellAllowlistOn;
118
+ /**
119
+ * Lazily load (once per instance) the persisted `always` allow-list, unless persistence is
120
+ * disabled by config. Returns null when persistence is off so `always` grants behave as
121
+ * `session` (in-memory only).
122
+ */
123
+ private getPersistedAllowlist;
124
+ /** Check the command against the session + persisted stores (with anti-widening re-validation). */
125
+ private isApprovedByAllowlist;
126
+ /**
127
+ * Record a human-granted approval at the given scope. `once` persists nothing. `session`
128
+ * adds the classified prefix to the in-memory store. `always` additionally persists it (or
129
+ * falls back to session-only when persistence is disabled).
130
+ */
131
+ private recordApproval;
32
132
  /**
33
133
  * Event-stream counterpart to {@link processMessages}: drives the agent's typed
34
134
  * {@link AgentStreamEvent} path using the runner's own thread-bound `runConfig`, so a
@@ -39,8 +139,34 @@ export declare class GthAgentRunner {
39
139
  * underlying `streamWithEvents` ends cleanly on abort or `interrupt()`. The string
40
140
  * path's empty-stream retry/`invoke` fallback is intentionally NOT duplicated here — the
41
141
  * TUI renders the live event stream directly; revisit if empty-stream retries are needed.
142
+ *
143
+ * Tool-approval round-trip (EXT-11): after the stream ends, a gated `run_shell_command`
144
+ * leaves the graph suspended on a `humanInTheLoopMiddleware` interrupt rather than
145
+ * completing. This is the event-stream counterpart to the readline path's
146
+ * {@link resolveToolInterrupts}: it drains any pending interrupts through
147
+ * {@link decideToolApproval} (allow-list → judge → bridged human prompt), resumes via
148
+ * `streamWithEventsResume({ decisions })`, and loops until the graph completes with no
149
+ * pending interrupts — so the executed command's output renders into the TUI. Without
150
+ * this the TUI silently finalized an empty turn (approval gate was dead code on the
151
+ * event-stream path).
42
152
  */
43
153
  processMessagesWithEvents(messages: Message[], signal?: AbortSignal): AsyncGenerator<AgentStreamEvent>;
154
+ /**
155
+ * Event-stream counterpart to {@link resolveToolInterrupts}: after a streamed run ends,
156
+ * resolve any tool-approval interrupts it suspended on, yielding the resumed run's typed
157
+ * {@link AgentStreamEvent}s so the renderer (the Ink TUI) shows the executed command's
158
+ * output. Each pending tool call is consulted via {@link decideToolApproval} — the SAME
159
+ * three-layer gate the readline path uses (allow-list auto-approve → EXT-10 judge →
160
+ * bridged human callback, defaulting to REJECT when no handler is wired) — and the
161
+ * collected decisions are sent back via `streamWithEventsResume` as a LangChain HITL
162
+ * resume (`{ decisions }`). Because a resumed run can suspend again on the next gated
163
+ * tool call, this loops until the graph completes with no pending interrupts.
164
+ *
165
+ * No-ops (yields nothing) when the agent does not support interrupts
166
+ * (`getPendingToolInterrupts`/`streamWithEventsResume` absent), so the lean agent and
167
+ * non-HITL configs are unaffected. Aborts (`signal`) propagate through the resumed stream.
168
+ */
169
+ private resolveToolInterruptsWithEvents;
44
170
  getAgent(): GthAgentInterface | null;
45
171
  /**
46
172
  * Rotate the thread the runner drives by minting a fresh `runConfig` (new `thread_id`),
@@ -1,4 +1,12 @@
1
+ import { getEffectiveDevToolsConfig, getShellJudgeSettings, isShellAllowlistEnabled, isShellAllowlistPersisted, isShellJudgeEnabled, } from '#src/config.js';
1
2
  import { GthLangChainAgent } from '#src/core/GthLangChainAgent.js';
3
+ import { AllowlistStore, PersistedAllowlist, matchesApproval, } from '#src/core/shell/allowlist.js';
4
+ import { classifyCommand } from '#src/core/shell/arity.js';
5
+ import { normalizeCommand } from '#src/core/shell/normalize.js';
6
+ import { judgeShellCommand, mapVerdictToAction, } from '#src/core/shell/judge.js';
7
+ import { env } from '#src/utils/systemUtils.js';
8
+ import { getGslothConfigWritePath } from '#src/utils/fileUtils.js';
9
+ import { SHELL_ALLOWLIST_FILE } from '#src/constants.js';
2
10
  import { enhanceVertexUnauthorizedMessage } from '#src/utils/vertexaiUtils.js';
3
11
  import { getNewRunnableConfig } from '#src/utils/llmUtils.js';
4
12
  import { initDebugLogging, debugLog, debugLogError, debugLogObject, } from '#src/utils/debugUtils.js';
@@ -13,6 +21,38 @@ export class GthAgentRunner {
13
21
  config = null;
14
22
  runConfig = null;
15
23
  agentFactory;
24
+ /**
25
+ * Consumer hook invoked when a run suspends on a tool-approval interrupt (e.g. the opt-in
26
+ * `run_shell_command` confirmation). Set via {@link setToolApprovalCallback}; when unset the
27
+ * runner REJECTS pending tool calls rather than hanging or auto-approving — the safe default
28
+ * for non-interactive entrypoints (a scripted `exec` run with no TTY to prompt on).
29
+ */
30
+ toolApprovalCallback = null;
31
+ /** The command the runner was initialized for; selects which `devTools` config applies. */
32
+ command = undefined;
33
+ /**
34
+ * EXT-12 — runtime, session-scoped yolo flag toggled by the `/yolo` slash command. Distinct
35
+ * from the static `devTools.shellYolo` config flag (which omits the tool from `interruptOn` at
36
+ * agent-build time and cannot be changed mid-session). Because the tool stays gated (in
37
+ * `interruptOn`), this flag is consulted at the TOP of {@link decideToolApproval}: when ON, a
38
+ * gated `run_shell_command` is auto-approved WITHOUT prompting (yolo behaviour) for the rest of
39
+ * this runner's life. Never persisted; defaults OFF. It does NOT disable the hardline floor —
40
+ * catastrophic commands are still refused at exec time in `GthDevToolkit.executeCommand`.
41
+ */
42
+ sessionYolo = false;
43
+ /**
44
+ * EXT-9 Tier-2 session allow-list — approved command prefixes that auto-approve for the
45
+ * life of THIS runner instance. Instance-scoped (not module-global) so concurrent
46
+ * sessions (ACP / AG-UI multi-session) cannot stomp each other's approvals.
47
+ */
48
+ sessionAllowlist = new AllowlistStore();
49
+ /**
50
+ * EXT-9 Tier-2 persisted (`always`) allow-list, loaded lazily on first use from
51
+ * `.gsloth/.gsloth-settings/shell-allowlist.json`. Null until the shell tool is gated
52
+ * and the allow-list is enabled; null also when persistence is disabled by config.
53
+ */
54
+ persistedAllowlist = null;
55
+ persistedAllowlistLoaded = false;
16
56
  /**
17
57
  * @param agentFactory Produces the {@link GthAgentInterface} the runner drives.
18
58
  * Defaults to the lean {@link GthLangChainAgent} (core). `@gaunt-sloth/agent`
@@ -25,6 +65,28 @@ export class GthAgentRunner {
25
65
  this.agentFactory =
26
66
  agentFactory ?? ((status, agentResolvers) => new GthLangChainAgent(status, agentResolvers));
27
67
  }
68
+ /**
69
+ * Register the tool-approval handler the runner calls when a run suspends on a tool-approval
70
+ * interrupt (the interactive readline session wires a y/n prompt here). Pass `null` to clear.
71
+ * Without a handler the runner rejects pending tool calls (see {@link toolApprovalCallback}).
72
+ */
73
+ setToolApprovalCallback(callback) {
74
+ this.toolApprovalCallback = callback;
75
+ }
76
+ /**
77
+ * EXT-12 — flip the runtime, session-scoped yolo flag (the `/yolo` slash command). When ON,
78
+ * gated `run_shell_command` calls auto-approve without prompting for the rest of this session;
79
+ * the hardline floor still applies at exec time. Returns the NEW state so the caller can render
80
+ * a notice. Session-scoped only — nothing is written to config.
81
+ */
82
+ toggleSessionYolo() {
83
+ this.sessionYolo = !this.sessionYolo;
84
+ return this.sessionYolo;
85
+ }
86
+ /** EXT-12 — current state of the runtime session-scoped yolo flag (see {@link toggleSessionYolo}). */
87
+ isSessionYolo() {
88
+ return this.sessionYolo;
89
+ }
28
90
  /**
29
91
  * Init is split into a separate method. This may create a number of connections,
30
92
  * and we'd better have an instance by that moment, for the case things will go wrong,
@@ -32,6 +94,7 @@ export class GthAgentRunner {
32
94
  */
33
95
  async init(command, configIn, checkpointSaver) {
34
96
  this.config = configIn;
97
+ this.command = command;
35
98
  // Initialize debug logging
36
99
  initDebugLogging(configIn.debugLog ?? false);
37
100
  debugLog(`Initializing GthAgentRunner with command: ${command || 'default'}`);
@@ -60,10 +123,11 @@ export class GthAgentRunner {
60
123
  const stream = await this.agent.stream(messages, this.runConfig);
61
124
  let result = '';
62
125
  try {
63
- for await (const chunk of stream) {
64
- debugLogObject('Stream chunk', chunk);
65
- result += chunk;
66
- }
126
+ result = await this.drainTextStream(stream);
127
+ // A run may suspend on one or more tool-approval interrupts (run_shell_command).
128
+ // Resolve them in a loop: each resume can itself suspend again on the next gated
129
+ // tool call, so keep going until the graph completes with no pending interrupts.
130
+ result += await this.resolveToolInterrupts();
67
131
  }
68
132
  catch (streamError) {
69
133
  // Handle streaming-specific errors
@@ -101,6 +165,189 @@ export class GthAgentRunner {
101
165
  throw new Error(`Agent processing failed: ${enhancedMessage}`, error instanceof Error ? { cause: error } : undefined);
102
166
  }
103
167
  }
168
+ /**
169
+ * Accumulate a text stream into a single string. Extracted so {@link processMessages} and
170
+ * the interrupt-resume loop ({@link resolveToolInterrupts}) drain streams identically.
171
+ */
172
+ async drainTextStream(stream) {
173
+ let result = '';
174
+ for await (const chunk of stream) {
175
+ debugLogObject('Stream chunk', chunk);
176
+ result += chunk;
177
+ }
178
+ return result;
179
+ }
180
+ /**
181
+ * After a streamed run ends, resolve any tool-approval interrupts it suspended on. For each
182
+ * pending tool call the {@link toolApprovalCallback} is consulted (defaulting to REJECT when
183
+ * no handler is wired, so a non-interactive run never hangs or auto-approves); the collected
184
+ * decisions are then sent back via the agent's `streamResume` as a LangChain HITL resume
185
+ * (`{ decisions }`). Because a resumed run can suspend again on the next gated tool call, this
186
+ * loops until the graph completes with no pending interrupts. Returns the concatenated text
187
+ * streamed across all resume turns (empty when nothing was resumed).
188
+ *
189
+ * No-ops (returns '') when the agent does not support interrupts (`getPendingToolInterrupts`/
190
+ * `streamResume` absent), so the lean agent and non-HITL configs are unaffected.
191
+ */
192
+ async resolveToolInterrupts() {
193
+ const agent = this.agent;
194
+ const runConfig = this.runConfig;
195
+ if (!agent || !runConfig)
196
+ return '';
197
+ if (!agent.getPendingToolInterrupts || !agent.streamResume)
198
+ return '';
199
+ let resumedText = '';
200
+ // Bound the loop defensively so a misbehaving graph that re-suspends forever cannot spin.
201
+ for (let guard = 0; guard < 100; guard++) {
202
+ const pending = await agent.getPendingToolInterrupts(runConfig);
203
+ if (pending.length === 0)
204
+ break;
205
+ const decisions = [];
206
+ for (const tool of pending) {
207
+ decisions.push(await this.decideToolApproval(tool));
208
+ }
209
+ const stream = await agent.streamResume({ decisions }, runConfig);
210
+ resumedText += await this.drainTextStream(stream);
211
+ }
212
+ return resumedText;
213
+ }
214
+ /**
215
+ * Decide a single pending tool call (EXT-9 Tier-2). For the opt-in `run_shell_command`,
216
+ * consult the scoped allow-list FIRST: if the command's classified prefix is already
217
+ * approved (session or persisted `always`) and survives the safe-bin anti-widening
218
+ * re-validation, auto-approve SILENTLY (no human prompt). Otherwise fall through to the
219
+ * human callback; when the human grants `session`/`always` scope, record the command's
220
+ * classified prefix into the matching store so future flag-variants stop re-prompting.
221
+ *
222
+ * When no human callback is wired (non-TTY exec run) and nothing is allow-listed, reject —
223
+ * never auto-approve. Non-shell tools (or any tool when the allow-list is disabled) skip the
224
+ * allow-list and go straight to the human callback / default-reject, preserving prior behaviour.
225
+ *
226
+ * Hardline catastrophic commands remain refused at exec time regardless of any approval here
227
+ * (defense in depth in `GthDevToolkit.executeCommand`), so an allow-listed `rm -rf /` still
228
+ * cannot run.
229
+ */
230
+ async decideToolApproval(tool) {
231
+ const command = typeof tool.args?.command === 'string' ? tool.args.command : null;
232
+ const isShellCommand = tool.name === 'run_shell_command' && command !== null;
233
+ const allowlistApplies = isShellCommand && this.isShellAllowlistOn();
234
+ // EXT-12 — runtime session yolo (`/yolo`): when ON, auto-approve a gated shell command WITHOUT
235
+ // prompting, judging, or persisting. Scope `once` so nothing is written to the allow-list (the
236
+ // bypass is intentionally ephemeral and reversible). The hardline floor is NOT bypassed here —
237
+ // it is enforced at exec time in GthDevToolkit.executeCommand regardless of this decision, so a
238
+ // catastrophic command is still refused even under yolo.
239
+ if (isShellCommand && this.sessionYolo) {
240
+ return { type: 'approve', scope: 'once' };
241
+ }
242
+ // Auto-approve from the allow-list without prompting. The allow-list ALWAYS wins over the
243
+ // judge: a human-trusted prefix shouldn't pay for an LLM call on every variant.
244
+ if (allowlistApplies && this.isApprovedByAllowlist(command)) {
245
+ return { type: 'approve', scope: 'session' };
246
+ }
247
+ // EXT-10 — LLM-as-judge safety gate (default OFF). Runs BEFORE the human callback for a
248
+ // `run_shell_command` not already allow-listed: auto-approve clearly-safe (fatigue reducer),
249
+ // reject clearly-catastrophic (only when blockHigh), otherwise fall through to the human with
250
+ // the verdict attached. When disabled this is a no-op and behaviour is exactly EXT-9.
251
+ let safetyVerdict;
252
+ if (isShellCommand && command !== null && this.isShellJudgeOn()) {
253
+ const settings = getShellJudgeSettings(getEffectiveDevToolsConfig(this.config ?? undefined, this.command));
254
+ const verdict = await judgeShellCommand(command, this.config, {
255
+ home: env?.HOME,
256
+ });
257
+ const action = mapVerdictToAction(command, verdict, {
258
+ autoApproveLow: settings.autoApproveLow,
259
+ blockHigh: settings.blockHigh,
260
+ });
261
+ if (action === 'auto-approve') {
262
+ // Scope `once`: judge approvals are NEVER persisted to the allow-list.
263
+ return { type: 'approve', scope: 'once' };
264
+ }
265
+ if (action === 'reject') {
266
+ return {
267
+ type: 'reject',
268
+ message: `Safety judge blocked the command: ${verdict.reason}`,
269
+ };
270
+ }
271
+ // Escalate: carry the verdict to the human approval surface.
272
+ safetyVerdict = verdict;
273
+ }
274
+ if (!this.toolApprovalCallback) {
275
+ // No interactive handler (e.g. non-TTY exec run): reject rather than auto-approve.
276
+ return {
277
+ type: 'reject',
278
+ message: 'Tool call rejected: no interactive approval handler available.',
279
+ };
280
+ }
281
+ // Surface the judge's verdict to the human prompt (if the judge escalated) without mutating
282
+ // the original interrupt object the caller holds.
283
+ const pending = safetyVerdict ? { ...tool, safetyVerdict } : tool;
284
+ const decision = await this.toolApprovalCallback(pending);
285
+ // Persist the human's scoped grant so future variants of the same operation skip the prompt.
286
+ if (decision.type === 'approve' && allowlistApplies && command) {
287
+ this.recordApproval(command, decision.scope ?? 'once');
288
+ }
289
+ return decision;
290
+ }
291
+ /** Whether the EXT-10 LLM-as-judge safety gate is enabled for the active command's config. */
292
+ isShellJudgeOn() {
293
+ if (!this.config)
294
+ return false;
295
+ const devTools = getEffectiveDevToolsConfig(this.config, this.command);
296
+ return isShellJudgeEnabled(devTools);
297
+ }
298
+ /** Whether the EXT-9 Tier-2 allow-list is enabled for the active command's devTools config. */
299
+ isShellAllowlistOn() {
300
+ const devTools = getEffectiveDevToolsConfig(this.config ?? undefined, this.command);
301
+ return isShellAllowlistEnabled(devTools);
302
+ }
303
+ /**
304
+ * Lazily load (once per instance) the persisted `always` allow-list, unless persistence is
305
+ * disabled by config. Returns null when persistence is off so `always` grants behave as
306
+ * `session` (in-memory only).
307
+ */
308
+ getPersistedAllowlist() {
309
+ if (this.persistedAllowlistLoaded)
310
+ return this.persistedAllowlist;
311
+ this.persistedAllowlistLoaded = true;
312
+ const devTools = getEffectiveDevToolsConfig(this.config ?? undefined, this.command);
313
+ if (!isShellAllowlistPersisted(devTools)) {
314
+ this.persistedAllowlist = null;
315
+ return null;
316
+ }
317
+ try {
318
+ const filePath = getGslothConfigWritePath(SHELL_ALLOWLIST_FILE);
319
+ this.persistedAllowlist = new PersistedAllowlist(filePath);
320
+ }
321
+ catch (e) {
322
+ // Path/IO failure → behave as no persisted store (still safe: just prompts more).
323
+ debugLogError('Loading persisted shell allow-list', e);
324
+ this.persistedAllowlist = null;
325
+ }
326
+ return this.persistedAllowlist;
327
+ }
328
+ /** Check the command against the session + persisted stores (with anti-widening re-validation). */
329
+ isApprovedByAllowlist(command) {
330
+ return matchesApproval(command, {
331
+ session: this.sessionAllowlist,
332
+ always: this.getPersistedAllowlist() ?? undefined,
333
+ });
334
+ }
335
+ /**
336
+ * Record a human-granted approval at the given scope. `once` persists nothing. `session`
337
+ * adds the classified prefix to the in-memory store. `always` additionally persists it (or
338
+ * falls back to session-only when persistence is disabled).
339
+ */
340
+ recordApproval(command, scope) {
341
+ if (scope === 'once')
342
+ return;
343
+ const classification = classifyCommand(command, normalizeCommand);
344
+ if (!classification)
345
+ return; // unclassifiable (composition/redirection) → never remember.
346
+ this.sessionAllowlist.add(classification.prefix);
347
+ if (scope === 'always') {
348
+ this.getPersistedAllowlist()?.add(classification.prefix);
349
+ }
350
+ }
104
351
  /**
105
352
  * Event-stream counterpart to {@link processMessages}: drives the agent's typed
106
353
  * {@link AgentStreamEvent} path using the runner's own thread-bound `runConfig`, so a
@@ -111,6 +358,16 @@ export class GthAgentRunner {
111
358
  * underlying `streamWithEvents` ends cleanly on abort or `interrupt()`. The string
112
359
  * path's empty-stream retry/`invoke` fallback is intentionally NOT duplicated here — the
113
360
  * TUI renders the live event stream directly; revisit if empty-stream retries are needed.
361
+ *
362
+ * Tool-approval round-trip (EXT-11): after the stream ends, a gated `run_shell_command`
363
+ * leaves the graph suspended on a `humanInTheLoopMiddleware` interrupt rather than
364
+ * completing. This is the event-stream counterpart to the readline path's
365
+ * {@link resolveToolInterrupts}: it drains any pending interrupts through
366
+ * {@link decideToolApproval} (allow-list → judge → bridged human prompt), resumes via
367
+ * `streamWithEventsResume({ decisions })`, and loops until the graph completes with no
368
+ * pending interrupts — so the executed command's output renders into the TUI. Without
369
+ * this the TUI silently finalized an empty turn (approval gate was dead code on the
370
+ * event-stream path).
114
371
  */
115
372
  async *processMessagesWithEvents(messages, signal) {
116
373
  if (!this.agent || !this.config || !this.runConfig) {
@@ -119,6 +376,43 @@ export class GthAgentRunner {
119
376
  debugLog('Processing messages (event stream)...');
120
377
  debugLogObject('Input Messages', messages);
121
378
  yield* this.agent.streamWithEvents(messages, this.runConfig, signal);
379
+ yield* this.resolveToolInterruptsWithEvents(signal);
380
+ }
381
+ /**
382
+ * Event-stream counterpart to {@link resolveToolInterrupts}: after a streamed run ends,
383
+ * resolve any tool-approval interrupts it suspended on, yielding the resumed run's typed
384
+ * {@link AgentStreamEvent}s so the renderer (the Ink TUI) shows the executed command's
385
+ * output. Each pending tool call is consulted via {@link decideToolApproval} — the SAME
386
+ * three-layer gate the readline path uses (allow-list auto-approve → EXT-10 judge →
387
+ * bridged human callback, defaulting to REJECT when no handler is wired) — and the
388
+ * collected decisions are sent back via `streamWithEventsResume` as a LangChain HITL
389
+ * resume (`{ decisions }`). Because a resumed run can suspend again on the next gated
390
+ * tool call, this loops until the graph completes with no pending interrupts.
391
+ *
392
+ * No-ops (yields nothing) when the agent does not support interrupts
393
+ * (`getPendingToolInterrupts`/`streamWithEventsResume` absent), so the lean agent and
394
+ * non-HITL configs are unaffected. Aborts (`signal`) propagate through the resumed stream.
395
+ */
396
+ async *resolveToolInterruptsWithEvents(signal) {
397
+ const agent = this.agent;
398
+ const runConfig = this.runConfig;
399
+ if (!agent || !runConfig)
400
+ return;
401
+ if (!agent.getPendingToolInterrupts || !agent.streamWithEventsResume)
402
+ return;
403
+ // Bound the loop defensively so a misbehaving graph that re-suspends forever cannot spin.
404
+ for (let guard = 0; guard < 100; guard++) {
405
+ if (signal?.aborted)
406
+ return;
407
+ const pending = await agent.getPendingToolInterrupts(runConfig);
408
+ if (pending.length === 0)
409
+ break;
410
+ const decisions = [];
411
+ for (const tool of pending) {
412
+ decisions.push(await this.decideToolApproval(tool));
413
+ }
414
+ yield* agent.streamWithEventsResume({ decisions }, runConfig, [], signal);
415
+ }
122
416
  }
123
417
  // noinspection JSUnusedGlobalSymbols
124
418
  getAgent() {
@@ -1 +1 @@
1
- {"version":3,"file":"GthAgentRunner.js","sourceRoot":"","sources":["../../src/core/GthAgentRunner.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,cAAc,GACf,MAAM,0BAA0B,CAAC;AAElC;;;GAGG;AACH,MAAM,OAAO,cAAc;IACjB,YAAY,CAAuB;IACnC,SAAS,CAA6B;IACtC,KAAK,GAA6B,IAAI,CAAC;IACvC,MAAM,GAAqB,IAAI,CAAC;IAChC,SAAS,GAA0B,IAAI,CAAC;IACxC,YAAY,CAAkB;IAEtC;;;;;OAKG;IACH,YACE,YAAkC,EAClC,SAA0B,EAC1B,YAA8B;QAE9B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,YAAY;YACf,YAAY,IAAI,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,CAAC,IAAI,iBAAiB,CAAC,MAAM,EAAE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