gaunt-sloth 2.0.0-beta.2 → 2.0.0-beta.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.
- package/dist/commands/askCommand.js +1 -1
- package/dist/commands/askCommand.js.map +1 -1
- package/dist/commands/batchCommand.js +2 -2
- package/dist/commands/batchCommand.js.map +1 -1
- package/dist/commands/commandIntrospection.d.ts +1 -1
- package/dist/commands/commandIntrospection.js +1 -1
- package/dist/commands/execCommand.js +1 -1
- package/dist/commands/execCommand.js.map +1 -1
- package/dist/modules/startSession.js +2 -1
- package/dist/modules/startSession.js.map +1 -1
- package/dist/tui/components/App.js +139 -44
- package/dist/tui/components/App.js.map +1 -1
- package/dist/tui/components/ApprovalPrompt.d.ts +8 -2
- package/dist/tui/components/ApprovalPrompt.js +8 -2
- package/dist/tui/components/ApprovalPrompt.js.map +1 -1
- package/dist/tui/components/ApprovalRequestPanel.d.ts +14 -2
- package/dist/tui/components/ApprovalRequestPanel.js +5 -2
- package/dist/tui/components/ApprovalRequestPanel.js.map +1 -1
- package/dist/tui/components/DebugPanel.js +4 -1
- package/dist/tui/components/DebugPanel.js.map +1 -1
- package/dist/tui/components/LiveTurn.d.ts +14 -1
- package/dist/tui/components/LiveTurn.js +41 -16
- package/dist/tui/components/LiveTurn.js.map +1 -1
- package/dist/tui/components/TranscriptViewport.js +3 -2
- package/dist/tui/components/TranscriptViewport.js.map +1 -1
- package/dist/tui/debugRender.d.ts +1 -1
- package/dist/tui/debugRender.js +1 -1
- package/dist/tui/transcriptWindow.js +28 -9
- package/dist/tui/transcriptWindow.js.map +1 -1
- package/dist/tui/tuiSessionModule.d.ts +1 -1
- package/dist/tui/tuiSessionModule.js +9 -9
- package/dist/tui/tuiSessionModule.js.map +1 -1
- package/dist/tui/types.d.ts +1 -1
- package/dist/tui/viewModel.d.ts +99 -2
- package/dist/tui/viewModel.js +68 -5
- package/dist/tui/viewModel.js.map +1 -1
- package/package.json +6 -6
|
@@ -77,7 +77,7 @@ export function askCommand(program, commandLineConfigOverrides) {
|
|
|
77
77
|
let ok = false;
|
|
78
78
|
try {
|
|
79
79
|
({ ok } = await runSingleShot('ASK', getAskSystemPrompt(config), content.join('\n'), config, createResolvers(), 'ask',
|
|
80
|
-
// ask
|
|
80
|
+
// ask asks for the lean backend, the only one shipped; config.agent.backend names no other.
|
|
81
81
|
resolveAgentFactory(config, 'lean')));
|
|
82
82
|
}
|
|
83
83
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askCommand.js","sourceRoot":"","sources":["../../src/commands/askCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAYvF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,OAA0B;IAC7E,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACnB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,cAAc,CACZ,iGAAiG,CAClG,CAAC;IACF,MAAM,eAAe,GACnB,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,YAAY,IAAI,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,YAAY,CAAC;IAC7E,OAAO;QACL,GAAG,MAAM;QACT,YAAY,EAAE,IAAI;QAClB,QAAQ,EAAE;YACR,GAAG,MAAM,CAAC,QAAQ;YAClB,GAAG,EAAE;gBACH,GAAG,MAAM,CAAC,QAAQ,EAAE,GAAG;gBACvB,UAAU,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,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;QAChE,CAAC;QAED,sDAAsD;QACtD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;QACxF,CAAC;QAED,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,yCAAyC,CAAC,CAAC;QAClF,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC;QAC5E,MAAM,EAAE,mBAAmB,EAAE,GAC3B,MAAM,MAAM,CAAC,gDAAgD,CAAC,CAAC;QACjE,IAAI,EAAE,GAAG,KAAK,CAAC;QACf,IAAI,CAAC;YACH,CAAC,EAAE,EAAE,EAAE,GAAG,MAAM,aAAa,CAC3B,KAAK,EACL,kBAAkB,CAAC,MAAM,CAAC,EAC1B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAClB,MAAM,EACN,eAAe,EAAE,EACjB,KAAK;YACL,4FAA4F;YAC5F,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CACpC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,YAAY,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACrE,EAAE,GAAG,KAAK,CAAC;QACb,CAAC;QAED,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,WAAW,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -79,8 +79,8 @@ export async function buildProductionRunCell(baseConfig, preamble, commandLineCo
|
|
|
79
79
|
const resolvers = createResolvers();
|
|
80
80
|
try {
|
|
81
81
|
const { ok, answer, tokensInput, tokensOutput, tools, toolResults } = await runSingleShot(`${options.sourcePrefix}-${cell.id}`, preamble, content, cellConfig, resolvers, options.command,
|
|
82
|
-
// batch/eval
|
|
83
|
-
// config.agent.backend
|
|
82
|
+
// batch/eval ask for the lean backend, same as exec/ask — the only one shipped;
|
|
83
|
+
// config.agent.backend names no other.
|
|
84
84
|
resolveAgentFactory(cellConfig, 'lean'), { displayCommand: options.displayCommand });
|
|
85
85
|
return { ok, answer, tokensInput, tokensOutput, tools, toolResults };
|
|
86
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batchCommand.js","sourceRoot":"","sources":["../../src/commands/batchCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,GACf,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,+BAA+B,GAChC,MAAM,sCAAsC,CAAC;AAgB9C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAS,wBAAwB,CAC/B,UAAqB,EACrB,0BAAsD;IAEtD,MAAM,cAAc,GAAG,IAAI,GAAG,EAA8B,CAAC;IAE7D,OAAO,CAAC,KAAyB,EAAsB,EAAE;QACvD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,GAAG,UAAU,CAAC,EAAE,GAAG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QAC5D,MAAM,OAAO,GAAG,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAErD,cAAc,CACZ,mBAAmB,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,KAAK,mBAAmB;YACnE,sBAAsB,SAAS,EAAE,CACpC,CAAC;QACF,6FAA6F;QAC7F,6FAA6F;QAC7F,2FAA2F;QAC3F,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;QACjE,IAAI,IAAI,EAAE,CAAC;YACT,WAAW,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,kFAAkF;YAClF,wEAAwE;YACxE,cAAc,CACZ,GAAG,OAAO,CAAC,MAAM,yBAAyB,SAAS,4BAA4B,CAChF,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -8,7 +8,7 @@ export declare function getExecSystemPrompt(config: GthConfig): string;
|
|
|
8
8
|
/**
|
|
9
9
|
* The system prompt a `review` / `pr` run sends.
|
|
10
10
|
*
|
|
11
|
-
* Composed from the same segments, in the same order, that the agent
|
|
11
|
+
* Composed from the same segments, in the same order, that the agent composes for these
|
|
12
12
|
* commands — backstory + guidelines + the review instructions (the `review`/`pr` mode prompt) +
|
|
13
13
|
* system prompt. `commandIntrospectionReviewPrompt.spec.ts` pins the two against each other, so a
|
|
14
14
|
* change to what a review run is given cannot leave `gth get system-prompt review` reporting the
|
|
@@ -15,7 +15,7 @@ export function getExecSystemPrompt(config) {
|
|
|
15
15
|
/**
|
|
16
16
|
* The system prompt a `review` / `pr` run sends.
|
|
17
17
|
*
|
|
18
|
-
* Composed from the same segments, in the same order, that the agent
|
|
18
|
+
* Composed from the same segments, in the same order, that the agent composes for these
|
|
19
19
|
* commands — backstory + guidelines + the review instructions (the `review`/`pr` mode prompt) +
|
|
20
20
|
* system prompt. `commandIntrospectionReviewPrompt.spec.ts` pins the two against each other, so a
|
|
21
21
|
* change to what a review run is given cannot leave `gth get system-prompt review` reporting the
|
|
@@ -114,7 +114,7 @@ export function execCommand(program, commandLineConfigOverrides) {
|
|
|
114
114
|
let ok = false;
|
|
115
115
|
try {
|
|
116
116
|
({ ok } = await runSingleShot('EXEC', getExecSystemPrompt(execConfig), content.join('\n'), execConfig, createResolvers(), 'exec',
|
|
117
|
-
// exec
|
|
117
|
+
// exec asks for the lean backend, the only one shipped; config.agent.backend names no other.
|
|
118
118
|
resolveAgentFactory(execConfig, 'lean')));
|
|
119
119
|
}
|
|
120
120
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execCommand.js","sourceRoot":"","sources":["../../src/commands/execCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAErF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAmBvF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAiB,EACjB,OAA2B,EAC3B,0BAAsD;IAEtD,MAAM,UAAU,GAAc;QAC5B,GAAG,MAAM;QACT,uEAAuE;QACvE,4BAA4B,EAAE,KAAK;QACnC,+EAA+E;QAC/E,iBAAiB,EAAE,0BAA0B,CAAC,iBAAiB,IAAI,KAAK;QACxE,6EAA6E;QAC7E,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,SA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O,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpD,cAAc,CACZ,8CAA8C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS;gBAChF,oFAAoF,CACvF,CAAC;QACJ,CAAC;QAED,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,0BAA0B,CAAC,CAAC;QAEhF,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,yCAAyC,CAAC,CAAC;QAClF,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC;QAC5E,MAAM,EAAE,mBAAmB,EAAE,GAC3B,MAAM,MAAM,CAAC,gDAAgD,CAAC,CAAC;QAEjE,IAAI,EAAE,GAAG,KAAK,CAAC;QACf,IAAI,CAAC;YACH,CAAC,EAAE,EAAE,EAAE,GAAG,MAAM,aAAa,CAC3B,MAAM,EACN,mBAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAClB,UAAU,EACV,eAAe,EAAE,EACjB,MAAM;YACN,6FAA6F;YAC7F,mBAAmB,CAAC,UAAU,EAAE,MAAM,CAAC,CACxC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,YAAY,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACrE,EAAE,GAAG,KAAK,CAAC;QACb,CAAC;QAED,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,WAAW,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -82,7 +82,8 @@ export async function startSession(sessionConfig, commandLineConfigOverrides, me
|
|
|
82
82
|
// The general rule the list was approximating: **falling back can only help a failure the
|
|
83
83
|
// readline path would not also have.** Everything `createTuiSession` does before it starts
|
|
84
84
|
// taking over the terminal — load config, open the conversation, start session logging, build
|
|
85
|
-
// the runner, `runner.init` (which
|
|
85
|
+
// the runner, `runner.init` (which validates config and warns about what it cannot honour, such
|
|
86
|
+
// as a declared `subagents` list) — the readline
|
|
86
87
|
// path does identically, so restarting under readline re-runs the same work and fails the same
|
|
87
88
|
// way, having first printed a false diagnosis. Only two things here are the TUI's alone:
|
|
88
89
|
//
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startSession.js","sourceRoot":"","sources":["../../src/modules/startSession.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,GAElB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,wBAAwB,GAEzB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,GACf,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,aAA4B,EAC5B,0BAAsD,EACtD,OAAgB;IAEhB,oFAAoF;IACpF,6EAA6E;IAC7E,oFAAoF;IACpF,kFAAkF;IAClF,EAAE;IACF,uFAAuF;IACvF,wFAAwF;IACxF,2CAA2C;IAC3C,IAAI,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,YAAY,CAAC,0BAA0B,CAAC,CAAC,EAAE,CAAC;QACrF,WAAW,CAAC,oDAAoD,CAAC,CAAC;QAClE,sFAAsF;QACtF,sCAAsC;QACtC,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,C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AAE,CAAC;QACtD,uFAAuF;QACvF,wFAAwF;QACxF,EAAE;QACF,gGAAgG;QAChG,yFAAyF;QACzF,gGAAgG;QAChG,gEAAgE;QAChE,EAAE;QACF,0FAA0F;QAC1F,2FAA2F;QAC3F,8FAA8F;QAC9F,
|
|
1
|
+
{"version":3,"file":"startSession.js","sourceRoot":"","sources":["../../src/modules/startSession.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,GAElB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,wBAAwB,GAEzB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,GACf,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,aAA4B,EAC5B,0BAAsD,EACtD,OAAgB;IAEhB,oFAAoF;IACpF,6EAA6E;IAC7E,oFAAoF;IACpF,kFAAkF;IAClF,EAAE;IACF,uFAAuF;IACvF,wFAAwF;IACxF,2CAA2C;IAC3C,IAAI,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,YAAY,CAAC,0BAA0B,CAAC,CAAC,EAAE,CAAC;QACrF,WAAW,CAAC,oDAAoD,CAAC,CAAC;QAClE,sFAAsF;QACtF,sCAAsC;QACtC,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC;QAC9E,2FAA2F;QAC3F,2FAA2F;QAC3F,8DAA8D;QAC9D,2FAA2F;QAC3F,0FAA0F;QAC1F,iBAAiB;QACjB,MAAM,iBAAiB,CACrB,EAAE,EACF,KA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AAC,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK;QACvE,uCAAuC,CAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { Box, Text, useApp, useInput } from 'ink';
|
|
4
|
-
import { foldEvents, foldSubagentEvents, initialSubagentTree, initialTurnViewModel, turnReasoning, turnText, } from '#src/tui/viewModel.js';
|
|
4
|
+
import { foldEvents, foldSubagentEvents, initialSubagentTree, initialTurnViewModel, recordApprovalDecision, turnReasoning, turnText, } from '#src/tui/viewModel.js';
|
|
5
5
|
import { buildRejectionMessage } from '@gaunt-sloth/core/core/shell/rejection.js';
|
|
6
6
|
import { ApprovalStopError } from '@gaunt-sloth/core/core/shell/approvalStop.js';
|
|
7
7
|
import { attackBannerCopy, grantsRunAnyway, } from '@gaunt-sloth/core/core/shell/escalationSeverity.js';
|
|
8
8
|
import { TranscriptViewport } from '#src/tui/components/TranscriptViewport.js';
|
|
9
9
|
import { ApprovalPrompt } from '#src/tui/components/ApprovalPrompt.js';
|
|
10
|
+
import { ApprovalRequestPanel } from '#src/tui/components/ApprovalRequestPanel.js';
|
|
10
11
|
import { AttackBanner } from '#src/tui/components/AttackBanner.js';
|
|
11
12
|
import { LiveTurn, ChecklistPanel } from '#src/tui/components/LiveTurn.js';
|
|
12
13
|
import { NegotiationPanel } from '#src/tui/components/NegotiationPanel.js';
|
|
@@ -77,7 +78,8 @@ export function App(props) {
|
|
|
77
78
|
const [live, setLive] = useState(null);
|
|
78
79
|
const [running, setRunning] = useState(false);
|
|
79
80
|
const [turnCount, setTurnCount] = useState(0);
|
|
80
|
-
// Subagent tree
|
|
81
|
+
// Subagent tree, folded from `task` tool calls on the live event stream. No backend dispatches
|
|
82
|
+
// subagents in this release, so nothing fills it today; kept for GS2-25's lean primitive.
|
|
81
83
|
const [subagents, setSubagents] = useState(initialSubagentTree);
|
|
82
84
|
// Docked debug panel state (toggled by /debug).
|
|
83
85
|
const [debugVisible, setDebugVisible] = useState(false);
|
|
@@ -127,9 +129,20 @@ export function App(props) {
|
|
|
127
129
|
// The head is the approval on screen AND the one that owns the keyboard. Deriving both from this
|
|
128
130
|
// single expression is what keeps those two facts from drifting apart.
|
|
129
131
|
const pendingApproval = approvalQueue[0] ?? null;
|
|
130
|
-
// [[
|
|
131
|
-
//
|
|
132
|
-
|
|
132
|
+
// [[TUI-C99]] — the live turn's view model, held BESIDE the state that renders it.
|
|
133
|
+
//
|
|
134
|
+
// The fold loop keeps the turn in a local while it iterates, so anything written to `live` from
|
|
135
|
+
// outside the loop is overwritten by the next event. An approval is answered from a keystroke,
|
|
136
|
+
// which is exactly outside it — so the loop folds from this ref instead, and the keystroke writes
|
|
137
|
+
// here as well. One value, two writers, no window in which one of them is stale.
|
|
138
|
+
const liveVmRef = useRef(null);
|
|
139
|
+
// [[TUI-C99]] — decision notices raised while a turn is in flight, waiting for it to commit.
|
|
140
|
+
//
|
|
141
|
+
// `runTurn` pushes the finished turn in its `finally`, so a notice pushed the moment a key is
|
|
142
|
+
// pressed lands in the transcript BEFORE the turn it was part of and reads as though the decision
|
|
143
|
+
// preceded the work. Held here until the turn's own item is in, they read in the order they
|
|
144
|
+
// happened. Nothing is lost if a turn ends badly: the flush is in the same `finally`.
|
|
145
|
+
const deferredNotices = useRef([]);
|
|
133
146
|
// [[TUI-C68]] §6.1 — attack halts, queued exactly as approvals are, and for the same reason: the
|
|
134
147
|
// head is what is on screen AND what owns the keyboard, from one expression.
|
|
135
148
|
const [attackQueue, setAttackQueue] = useState([]);
|
|
@@ -266,6 +279,38 @@ export function App(props) {
|
|
|
266
279
|
// Distributive omit so each union member keeps its own fields (a plain
|
|
267
280
|
// Omit<TranscriptItem,'id'> collapses to the shared `kind` key only).
|
|
268
281
|
const push = (item) => setTranscript((t) => [...t, { ...item, id: nextId() }]);
|
|
282
|
+
/**
|
|
283
|
+
* [[TUI-C99]] — commit a decision notice where it belongs relative to the turn it was part of.
|
|
284
|
+
*
|
|
285
|
+
* While a turn is in flight that is *after* the turn's own item, which does not exist yet, so the
|
|
286
|
+
* notice waits in {@link deferredNotices}; `runTurn`'s `finally` flushes the queue immediately
|
|
287
|
+
* after pushing the turn. Outside a turn — a sticky answer whose write landed after the turn
|
|
288
|
+
* ended — there is nothing to wait for and it goes straight in, which is already after it.
|
|
289
|
+
*
|
|
290
|
+
* The two branches cannot interleave: both the enqueue and the flush are synchronous, and the
|
|
291
|
+
* flush runs in the same block that clears `runningRef`.
|
|
292
|
+
*/
|
|
293
|
+
const pushDecisionNotice = (item) => {
|
|
294
|
+
if (runningRef.current)
|
|
295
|
+
deferredNotices.current.push(item);
|
|
296
|
+
else
|
|
297
|
+
push(item);
|
|
298
|
+
};
|
|
299
|
+
/** Commit every deferred decision notice, oldest first, and empty the queue. */
|
|
300
|
+
const flushDecisionNotices = () => {
|
|
301
|
+
const queued = deferredNotices.current;
|
|
302
|
+
deferredNotices.current = [];
|
|
303
|
+
for (const item of queued)
|
|
304
|
+
push(item);
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* [[TUI-C99]] — set the live turn through the ref that {@link liveVmRef} documents, so the fold
|
|
308
|
+
* loop and the approval keystroke are writing to one value rather than two.
|
|
309
|
+
*/
|
|
310
|
+
const setLiveTurn = (next) => {
|
|
311
|
+
liveVmRef.current = next;
|
|
312
|
+
setLive(next);
|
|
313
|
+
};
|
|
269
314
|
const runTurn = useCallback(async (userInput) => {
|
|
270
315
|
// A new exchange supersedes the post-/clear banner; drop it so it doesn't sit above
|
|
271
316
|
// the fresh conversation.
|
|
@@ -279,14 +324,15 @@ export function App(props) {
|
|
|
279
324
|
abortRef.current = ac;
|
|
280
325
|
runningRef.current = true;
|
|
281
326
|
setRunning(true);
|
|
282
|
-
|
|
283
|
-
setLive(vm);
|
|
327
|
+
setLiveTurn(initialTurnViewModel());
|
|
284
328
|
// Fresh args-buffer map per turn so partial `task` JSON from a prior turn never bleeds in.
|
|
285
329
|
subagentBuffersRef.current = new Map();
|
|
286
330
|
try {
|
|
287
331
|
for await (const event of agent.runTurn(userInput, ac.signal)) {
|
|
288
|
-
|
|
289
|
-
|
|
332
|
+
// [[TUI-C99]] — folded from the REF, not from a local: an approval answered mid-turn
|
|
333
|
+
// writes the outcome onto its tool call from a keystroke, and a local carried across the
|
|
334
|
+
// loop would overwrite it on the very next event the resumed run produces.
|
|
335
|
+
setLiveTurn(foldEvents(liveVmRef.current ?? initialTurnViewModel(), event));
|
|
290
336
|
// Fold subagent (`task`) tool calls into the tree for the debug panel.
|
|
291
337
|
setSubagents((tree) => foldSubagentEvents(tree, event, subagentBuffersRef.current));
|
|
292
338
|
}
|
|
@@ -310,15 +356,22 @@ export function App(props) {
|
|
|
310
356
|
}
|
|
311
357
|
}
|
|
312
358
|
finally {
|
|
359
|
+
const vm = liveVmRef.current ?? initialTurnViewModel();
|
|
313
360
|
push({ kind: 'assistant', turn: vm });
|
|
314
|
-
|
|
361
|
+
// [[TUI-C99]] — the decisions taken during the turn, committed straight after it so the
|
|
362
|
+
// record reads in the order it happened. Before `runningRef` is cleared is fine and after
|
|
363
|
+
// would be too: both are in this synchronous block, and nothing between them enqueues.
|
|
364
|
+
flushDecisionNotices();
|
|
365
|
+
setLiveTurn(null);
|
|
315
366
|
setRunning(false);
|
|
316
367
|
runningRef.current = false;
|
|
317
368
|
abortRef.current = null;
|
|
318
369
|
turnCountRef.current += 1;
|
|
319
370
|
setTurnCount(turnCountRef.current);
|
|
320
371
|
// The turn's prose, re-joined exactly as the deltas built it: segments changed where the
|
|
321
|
-
// text is drawn, never what the assistant said, so history keeps the same string.
|
|
372
|
+
// text is drawn, never what the assistant said, so history keeps the same string. An
|
|
373
|
+
// approval outcome hangs off a TOOL call, and `turnText` reads `text` segments alone, so
|
|
374
|
+
// nothing this node added can reach the model's history.
|
|
322
375
|
props.onTurnComplete?.(userInput, turnText(vm));
|
|
323
376
|
}
|
|
324
377
|
},
|
|
@@ -529,12 +582,52 @@ export function App(props) {
|
|
|
529
582
|
const head = pendingApproval;
|
|
530
583
|
if (!head)
|
|
531
584
|
return;
|
|
585
|
+
/**
|
|
586
|
+
* [[TUI-C99]] — put the one-line outcome on the row of the call it is about, and say whether
|
|
587
|
+
* that worked.
|
|
588
|
+
*
|
|
589
|
+
* It can fail, and the failure is not hypothetical: `PendingToolInterrupt.id` is recovered
|
|
590
|
+
* defensively from the suspended graph's own messages and is documented as absent-able, so a
|
|
591
|
+
* decision may have no call to attach to. The answer is that the caller keeps the notice in
|
|
592
|
+
* that case, and what that buys is precise: **the RECORD survives, and the on-screen
|
|
593
|
+
* attribution waits for the turn.** The kept notice goes through `pushDecisionNotice` like
|
|
594
|
+
* every other one, so mid-turn it is held until `runTurn`'s `finally` commits the turn it
|
|
595
|
+
* belonged to. Between the keystroke and that moment the call's own row says what became of the
|
|
596
|
+
* call — a refusal renders as `✗ … [error]` carrying the message the model was given — and
|
|
597
|
+
* nothing on screen says a person is who decided it.
|
|
598
|
+
*
|
|
599
|
+
* That gap is the cost of committing behind the turn rather than ahead of it, and it is the
|
|
600
|
+
* trade this node made deliberately: a notice pushed on the keystroke lands above the whole
|
|
601
|
+
* turn it was part of, which is the inversion the node exists to remove. Read it as a known
|
|
602
|
+
* consequence, not as an oversight to quietly fix by pushing early.
|
|
603
|
+
*/
|
|
604
|
+
const showOutcomeOnRow = (decision) => {
|
|
605
|
+
const vm = liveVmRef.current;
|
|
606
|
+
if (!vm)
|
|
607
|
+
return false;
|
|
608
|
+
const next = recordApprovalDecision(vm, head.pending.id, {
|
|
609
|
+
decision,
|
|
610
|
+
request: head.pending,
|
|
611
|
+
});
|
|
612
|
+
if (next === vm)
|
|
613
|
+
return false;
|
|
614
|
+
setLiveTurn(next);
|
|
615
|
+
return true;
|
|
616
|
+
};
|
|
532
617
|
// [[EXT-150]] — **dequeue on the keystroke, ahead of any wait.** The dialog leaving the screen
|
|
533
618
|
// is what makes the answer feel taken, and the next queued approval must surface at once. A
|
|
534
619
|
// dequeue moved below the wait would hold the interface for as long as a write takes, and hold
|
|
535
620
|
// it forever if the outcome never came — trading a false sentence for a wedged prompt.
|
|
536
621
|
setApprovalQueue((q) => q.slice(1));
|
|
537
|
-
|
|
622
|
+
const rejecting = decision === 'reject' || decision === 'reject-always';
|
|
623
|
+
const onRow = showOutcomeOnRow(rejecting ? 'rejected' : 'approved');
|
|
624
|
+
// [[TUI-C99]] — the fallback [[EXT-137]]'s audit record falls back TO. An interrupt with no
|
|
625
|
+
// usable `id` has no row to carry an outcome line, and therefore nothing that Ctrl+T could
|
|
626
|
+
// open; without this the request a human answered would leave no trace of what it said. It is
|
|
627
|
+
// committed behind the turn rather than ahead of it, so it does not reintroduce the inversion.
|
|
628
|
+
if (!onRow)
|
|
629
|
+
pushDecisionNotice({ kind: 'approval', pending: head.pending });
|
|
630
|
+
if (rejecting) {
|
|
538
631
|
// [[TUI-C26]] §6 — *always reject* is a rejection that is also REMEMBERED: the runner records
|
|
539
632
|
// a deny entry for this call, and the matcher consults it before anything else, so the next
|
|
540
633
|
// identical call never reaches a person. `once` is the ordinary refusal and the fallthrough
|
|
@@ -560,12 +653,22 @@ export function App(props) {
|
|
|
560
653
|
if (!sticky) {
|
|
561
654
|
// The ordinary refusal records nothing at all, so there is no outcome to wait for and
|
|
562
655
|
// nothing here that core could fail to keep.
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
656
|
+
//
|
|
657
|
+
// [[TUI-C99]] — **and it is the one notice the outcome line replaces.** It said only that
|
|
658
|
+
// the command did not run and that the agent was told, and the call's own row already says
|
|
659
|
+
// both: [[TUI-C100]] renders a refused call as `✗ … [error]` with the refusal text beneath
|
|
660
|
+
// it, and the outcome line beside it now names who decided. A second block saying that a
|
|
661
|
+
// screen away from the command it is about is what this node removes. It survives only
|
|
662
|
+
// where the outcome could not be attributed to a row, because then nothing else records
|
|
663
|
+
// that the human answered at all.
|
|
664
|
+
if (!onRow) {
|
|
665
|
+
pushDecisionNotice({
|
|
666
|
+
kind: 'notice',
|
|
667
|
+
title: 'Command rejected',
|
|
668
|
+
lines: ['The shell command was not run; the agent was told you declined.'],
|
|
669
|
+
tone: 'warn',
|
|
670
|
+
});
|
|
671
|
+
}
|
|
569
672
|
return;
|
|
570
673
|
}
|
|
571
674
|
// [[EXT-150]] — the refusal IS in force either way (core holds it in memory whatever the file
|
|
@@ -574,7 +677,13 @@ export function App(props) {
|
|
|
574
677
|
// for a claim.
|
|
575
678
|
void outcome.then((landed) => {
|
|
576
679
|
const savedToProject = landed?.lifetime === 'always';
|
|
577
|
-
|
|
680
|
+
// [[TUI-C99]] — this one SURVIVES, and it is the notice the per-notice test exists for: it
|
|
681
|
+
// reports a persistent policy change — whether the refusal reached the project file or
|
|
682
|
+
// holds for the session — and names `/approvals undeny` as the control that lifts it.
|
|
683
|
+
// Nothing about that is derivable from the tool row, so a one-line outcome cannot stand in
|
|
684
|
+
// for it. Committed with the turn rather than the moment it lands, so it reads after the
|
|
685
|
+
// work it followed.
|
|
686
|
+
pushDecisionNotice({
|
|
578
687
|
kind: 'notice',
|
|
579
688
|
// Exactly what it does, and no more — which [[EXT-107]] makes a project file, so it also
|
|
580
689
|
// says how to undo it. A saved refusal the user cannot find is the one failure mode
|
|
@@ -626,8 +735,15 @@ export function App(props) {
|
|
|
626
735
|
return 'Approved — this exact command will not ask again this session.';
|
|
627
736
|
return 'Approved this single invocation only.';
|
|
628
737
|
};
|
|
738
|
+
// [[TUI-C99]] — **every approve notice survives, including `once`, and CFG-28 is why.** The
|
|
739
|
+
// title names the scope that TOOK EFFECT rather than the key that was pressed: §4.2 forbids a
|
|
740
|
+
// sticky grant on a `catastrophic` verdict, so `(once)` is also what [s] and [a] render there.
|
|
741
|
+
// A user who asked to be stopped being asked and was quietly given a single-shot grant learns
|
|
742
|
+
// it here and nowhere else — the tool row cannot say it, and the outcome line deliberately
|
|
743
|
+
// carries no scope at all ([[EXT-150]]: a scope is not known at the keystroke). Only their
|
|
744
|
+
// POSITION changes: they wait for the turn they were part of.
|
|
629
745
|
if (scope !== 'always') {
|
|
630
|
-
|
|
746
|
+
pushDecisionNotice({
|
|
631
747
|
kind: 'notice',
|
|
632
748
|
title: `Command approved (${scope})`,
|
|
633
749
|
lines: [describe(scope)],
|
|
@@ -637,7 +753,7 @@ export function App(props) {
|
|
|
637
753
|
}
|
|
638
754
|
void outcome.then((landed) => {
|
|
639
755
|
const savedToProject = landed?.lifetime === 'always';
|
|
640
|
-
|
|
756
|
+
pushDecisionNotice({
|
|
641
757
|
kind: 'notice',
|
|
642
758
|
// The title carries a lifetime too, so it is written from the landed one for the same
|
|
643
759
|
// reason the body is — a heading saying `always` over a body saying *this session only*
|
|
@@ -1216,7 +1332,7 @@ export function App(props) {
|
|
|
1216
1332
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1217
1333
|
}, []);
|
|
1218
1334
|
// Capture debug payloads (full history sent to the model + the raw resolved response) from
|
|
1219
|
-
// the
|
|
1335
|
+
// the agent's wrapModelCall middleware, for the `/debug` panel. Routed into local state
|
|
1220
1336
|
// — never to stdout — and split into lines for the panel's bounded viewport.
|
|
1221
1337
|
useEffect(() => {
|
|
1222
1338
|
if (!props.subscribeDebug)
|
|
@@ -1243,27 +1359,6 @@ export function App(props) {
|
|
|
1243
1359
|
});
|
|
1244
1360
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1245
1361
|
}, []);
|
|
1246
|
-
// [[EXT-137]] — commit the request's scrollable half into the transcript, once, at the moment it
|
|
1247
|
-
// becomes the one being ASKED.
|
|
1248
|
-
//
|
|
1249
|
-
// On the head rather than on arrival, and the difference shows only when a second call queues
|
|
1250
|
-
// behind the first: printing both blocks up front would leave the dock's "the call is shown
|
|
1251
|
-
// above" pointing at whichever of them the reader happened to look at, which is the one thing
|
|
1252
|
-
// this split must not get wrong. It stays in the transcript afterwards, followed by the decision
|
|
1253
|
-
// notice `resolveApproval` commits, so the pair reads as a record of what was asked and answered.
|
|
1254
|
-
//
|
|
1255
|
-
// The set is what makes it once-only. A re-render with the same head — a keystroke, a status
|
|
1256
|
-
// update, a terminal resize — must not append the block again, and identity of the queue RECORD
|
|
1257
|
-
// is the right key: two identical calls in a row are two records and are two questions.
|
|
1258
|
-
useEffect(() => {
|
|
1259
|
-
if (!pendingApproval)
|
|
1260
|
-
return;
|
|
1261
|
-
if (announcedApprovals.current.has(pendingApproval))
|
|
1262
|
-
return;
|
|
1263
|
-
announcedApprovals.current.add(pendingApproval);
|
|
1264
|
-
push({ kind: 'approval', pending: pendingApproval.pending });
|
|
1265
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1266
|
-
}, [pendingApproval]);
|
|
1267
1362
|
// [[TUI-C68]] §6.1 — attack halts bridged from the runner. Each one mounts the <AttackBanner>,
|
|
1268
1363
|
// which owns the keyboard until it is answered. Absent on the fixture path, where the runner
|
|
1269
1364
|
// halts on its own — an unsubscribed surface keeps the halt, which is what makes forgetting to
|
|
@@ -1295,7 +1390,7 @@ export function App(props) {
|
|
|
1295
1390
|
const showIntro = !initialMessage && transcript.length === 0 && !live;
|
|
1296
1391
|
// Extract active checklist items from live turn or transcript so it stays pinned at the bottom.
|
|
1297
1392
|
const activeChecklist = useMemo(() => extractActiveChecklist(live, transcript), [live, transcript]);
|
|
1298
|
-
return (_jsx(TerminalSizeProvider, { size: terminalSize, children: _jsx(MouseProvider, { subscribe: props.subscribeMouse, enabled: mouseEnabled, children: _jsxs(Box, { flexDirection: "column", height: terminalRows, children: [_jsxs(TranscriptViewport, { items: transcript, budgetRows: terminalRows, columns: terminalColumns, toolsExpanded: toolsExpanded, scroll: transcriptScroll, regionRows: transcriptRegionRows, geometry: transcriptGeometry, children: [clearedBanner ? _jsx(ClearBanner, {}) : null, showIntro && props.showLaunchBanner ? (_jsx(LaunchBanner, { model: modelDisplayName, provider: props.modelProviderType })) : null, showIntro ? _jsx(Text, { dimColor: true, children: readyMessage.trim() }) : null, live && transcript.length > 0 ? _jsx(BlankRow, {}) : null, live ? _jsx(LiveTurn, { turn: live, toolsExpanded: toolsExpanded, streaming: true }) : null] }), _jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [debugVisible ? (_jsx(DebugPanel, { subagents: subagents, historyLines: debugHistory, systemLines: debugSystem, toolsLines: debugTools, mcpLines: debugMcp, responseLines: debugResponse, activeTab: debugTab, scrollOffset: debugScroll, focused: debugFocused, viewportHeight: debugViewport, maximized: debugMaximized, searchQuery: debugSearchQuery, searchActive: debugSearchInput, matchCount: debugMatches.length, currentMatchIndex: debugSearchCurrent, currentMatchLine: currentMatchLine })) : null, activeChecklist ? _jsx(ChecklistPanel, { items: activeChecklist }) : null, _jsx(NegotiationPanel, { rounds: negotiationRounds }), pendingAttack ? _jsx(AttackBanner, { halt: pendingAttack.halt, typed: attackTyped }) : null, pendingApproval && !pendingAttack ? (_jsx(ApprovalPrompt, { pending: pendingApproval.pending })) : null, approvalsPicker && !pendingApproval && !pendingAttack ? (_jsx(ApprovalsPicker, { choices: approvalsPicker, onSelect: (rung) => {
|
|
1393
|
+
return (_jsx(TerminalSizeProvider, { size: terminalSize, children: _jsx(MouseProvider, { subscribe: props.subscribeMouse, enabled: mouseEnabled, children: _jsxs(Box, { flexDirection: "column", height: terminalRows, children: [_jsxs(TranscriptViewport, { items: transcript, budgetRows: terminalRows, columns: terminalColumns, toolsExpanded: toolsExpanded, scroll: transcriptScroll, regionRows: transcriptRegionRows, geometry: transcriptGeometry, children: [clearedBanner ? _jsx(ClearBanner, {}) : null, showIntro && props.showLaunchBanner ? (_jsx(LaunchBanner, { model: modelDisplayName, provider: props.modelProviderType })) : null, showIntro ? _jsx(Text, { dimColor: true, children: readyMessage.trim() }) : null, live && transcript.length > 0 ? _jsx(BlankRow, {}) : null, live ? (_jsx(LiveTurn, { turn: live, toolsExpanded: toolsExpanded, streaming: true, columns: terminalColumns })) : null, pendingApproval ? (_jsxs(_Fragment, { children: [live || transcript.length > 0 ? _jsx(BlankRow, {}) : null, _jsx(ApprovalRequestPanel, { pending: pendingApproval.pending, columns: terminalColumns })] })) : null] }), _jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [debugVisible ? (_jsx(DebugPanel, { subagents: subagents, historyLines: debugHistory, systemLines: debugSystem, toolsLines: debugTools, mcpLines: debugMcp, responseLines: debugResponse, activeTab: debugTab, scrollOffset: debugScroll, focused: debugFocused, viewportHeight: debugViewport, maximized: debugMaximized, searchQuery: debugSearchQuery, searchActive: debugSearchInput, matchCount: debugMatches.length, currentMatchIndex: debugSearchCurrent, currentMatchLine: currentMatchLine })) : null, activeChecklist ? _jsx(ChecklistPanel, { items: activeChecklist }) : null, _jsx(NegotiationPanel, { rounds: negotiationRounds }), pendingAttack ? _jsx(AttackBanner, { halt: pendingAttack.halt, typed: attackTyped }) : null, pendingApproval && !pendingAttack ? (_jsx(ApprovalPrompt, { pending: pendingApproval.pending })) : null, approvalsPicker && !pendingApproval && !pendingAttack ? (_jsx(ApprovalsPicker, { choices: approvalsPicker, onSelect: (rung) => {
|
|
1299
1394
|
setApprovalsPicker(null);
|
|
1300
1395
|
applyApprovalRung(rung);
|
|
1301
1396
|
}, onCancel: () => setApprovalsPicker(null) })) : null, _jsx(BlankRow, {}), _jsx(Rule, {}), _jsx(NoticeBar, { advisories: props.advisories }), _jsx(McpFailureBar, { failures: props.mcpFailures }), _jsx(StatusBar, { running: running, mode: mode, modelDisplayName: modelDisplayName, turnCount: turnCount, debugHint: debugVisible && !debugFocused, approvals: approvals
|