@gaunt-sloth/agent 2.0.0-beta.4 → 2.0.0-beta.6

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.
Files changed (31) hide show
  1. package/README.md +6 -1
  2. package/cli.js +93 -6
  3. package/dist/middleware/binaryContentInjectionMiddleware.js +6 -1
  4. package/dist/middleware/binaryContentInjectionMiddleware.js.map +1 -1
  5. package/dist/middleware/frontendImageInjectionMiddleware.d.ts +52 -25
  6. package/dist/middleware/frontendImageInjectionMiddleware.js +91 -13
  7. package/dist/middleware/frontendImageInjectionMiddleware.js.map +1 -1
  8. package/dist/middleware/registry.js +14 -12
  9. package/dist/middleware/registry.js.map +1 -1
  10. package/dist/modules/acp/acpAgentApp.js +5 -0
  11. package/dist/modules/acp/acpAgentApp.js.map +1 -1
  12. package/dist/modules/acp/acpAgentAppV1.js +5 -0
  13. package/dist/modules/acp/acpAgentAppV1.js.map +1 -1
  14. package/dist/modules/acp/acpCommon.d.ts +6 -14
  15. package/dist/modules/acp/acpCommon.js +6 -16
  16. package/dist/modules/acp/acpCommon.js.map +1 -1
  17. package/dist/modules/apiAgUiModule.js +7 -0
  18. package/dist/modules/apiAgUiModule.js.map +1 -1
  19. package/dist/modules/interactiveSessionModule.d.ts +10 -1
  20. package/dist/modules/interactiveSessionModule.js +224 -41
  21. package/dist/modules/interactiveSessionModule.js.map +1 -1
  22. package/dist/modules/sessionResume.d.ts +123 -0
  23. package/dist/modules/sessionResume.js +268 -0
  24. package/dist/modules/sessionResume.js.map +1 -0
  25. package/dist/modules/slashCommands.d.ts +142 -0
  26. package/dist/modules/slashCommands.js +352 -15
  27. package/dist/modules/slashCommands.js.map +1 -1
  28. package/dist/modules/workspace.d.ts +24 -0
  29. package/dist/modules/workspace.js +27 -0
  30. package/dist/modules/workspace.js.map +1 -0
  31. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
1
  import { initConfig } from '@gaunt-sloth/core/config.js';
2
- import { defaultStatusCallback, display, displayDialogLine, displayInfo, displayLaunchBanner, displayWarning, flushSessionLog, formatInputPrompt, initSessionLogging, stopSessionLogging, } from '@gaunt-sloth/core/utils/consoleUtils.js';
2
+ import { defaultStatusCallback, display, displayDialogLine, displayInfo, displayLaunchBanner, displayNotice, displayWarning, flushSessionLog, formatInputPrompt, initSessionLogging, stopSessionLogging, } from '@gaunt-sloth/core/utils/consoleUtils.js';
3
3
  import { GthAgentRunner } from '@gaunt-sloth/core/core/GthAgentRunner.js';
4
4
  import { GthAbstractAgent } from '@gaunt-sloth/core/core/GthAbstractAgent.js';
5
5
  import { launchBannerFields, launchBannerText } from '@gaunt-sloth/core/core/launchBanner.js';
@@ -13,12 +13,14 @@ import { displayTermination } from '@gaunt-sloth/core/core/terminationNotice.js'
13
13
  import { readTermination, writeDebugDump } from '@gaunt-sloth/core/utils/debugDump.js';
14
14
  import { appendToFile, getCommandOutputFilePath } from '@gaunt-sloth/core/utils/fileUtils.js';
15
15
  import { openConversationSafe, recordSessionSafe, } from '@gaunt-sloth/core/history/recordSession.js';
16
+ import { openSessionCheckpointerSafe } from '@gaunt-sloth/core/history/sessionCheckpointer.js';
17
+ import { saveConversationGrantsSafe } from '@gaunt-sloth/core/core/approvals/conversationGrants.js';
18
+ import { applyResumeTarget, listResumeCandidates, resolveResumeTarget, resumedConversationNotice, resumeFailedNotice, resumePickerNotice, resumeRefusalNotice, resumeSameConversationNotice, } from '#src/modules/sessionResume.js';
16
19
  import { createInterface, error, exit, getProjectDir, getUseColour, refStdin, setRawMode, stdin as input, stdout as output, } from '@gaunt-sloth/core/utils/systemUtils.js';
17
20
  import { HumanMessage } from '@langchain/core/messages';
18
- import { MemorySaver } from '@langchain/langgraph';
19
21
  import { createResolvers } from '#src/resolvers.js';
20
22
  import { resolveAgentFactory } from '#src/core/resolveAgentFactory.js';
21
- import { approvalsRefusalsNotice, approvalsRungNotice, approvalsStatusNotice, approvalsTrustNotice, approvalsUndenyNotice, createCommandRegistry, dispatchSlashCommand, formatConfigSummary, parseSlashCommand, } from '#src/modules/slashCommands.js';
23
+ import { approvalsRefusalsNotice, approvalsRungNotice, approvalsStatusNotice, approvalsTrustNotice, approvalsUndenyNotice, COMPACTING_LINE, compactionFailedNotice, compactionNotice, createCommandRegistry, autocompactNotice, autocompactUnavailableNotice, dispatchSlashCommand, formatConfigSummary, parseSlashCommand, } from '#src/modules/slashCommands.js';
22
24
  /**
23
25
  * [[TUI-C26]] §6 / [[EXT-105]] — **every line of an escalation dialog goes through
24
26
  * {@link displayDialogLine}, and no line of one goes anywhere else.**
@@ -35,8 +37,13 @@ import { approvalsRefusalsNotice, approvalsRungNotice, approvalsStatusNotice, ap
35
37
  * So the rule for this file is mechanical: **inside the approval dialog and the attack banner, use
36
38
  * `displayDialogLine` and pass the tone.** A `display`/`displayInfo`/`displayWarning`/`displayError`
37
39
  * call added among them is the defect coming back, and the stream test covering these two callbacks
38
- * is what catches it. Everything OUTSIDE them — notices, banners, the session's own chatter — keeps
39
- * the ordinary helpers.
40
+ * is what catches it.
41
+ *
42
+ * **A command notice has the same rule and its own writer**: [[EXT-165]] — every line of one goes
43
+ * through `displayNotice`, which takes the title and the body TOGETHER so no caller can put them on
44
+ * two streams, and which takes the tone as a separate argument for the same reason as above. The
45
+ * session's own single-line chatter — the launch banner, the degrade pointers, an incidental
46
+ * `result.message` — keeps the ordinary helpers: one line cannot be torn in half.
40
47
  *
41
48
  * The tone is the observable an assertion can bite on, too: a change that made `catastrophic` look
42
49
  * like `destructive` would have to pass both the same tone, which a test can see.
@@ -69,30 +76,100 @@ const dialogLines = (lines, tone = 'plain') => {
69
76
  */
70
77
  const rememberedAnswerLine = (decision, landed) => {
71
78
  const savedToProject = landed === 'always';
79
+ // GS2-20 — a grant that did not reach the project file lives with the CONVERSATION: it is kept in
80
+ // the history store and comes back when this conversation is resumed, and no other conversation
81
+ // has it. So the sentence names the conversation, not the process.
72
82
  if (decision === 'approve') {
73
83
  return savedToProject
74
84
  ? 'Approved and remembered — this exact command is saved to the project allow-list.'
75
- : 'Approved for this session only — it was not written to the project allow-list.';
85
+ : 'Approved for this conversation only — it was not written to the project allow-list, so ' +
86
+ 'resuming this conversation keeps it and any other conversation will ask again.';
76
87
  }
77
88
  return savedToProject
78
89
  ? 'Refused — this exact call will not run and will not ask again. It is saved to this ' +
79
90
  'project, so it stays refused in new sessions; lift it with /approvals undeny.'
80
- : 'Refused — this exact call will not run and will not ask again this session. It was not ' +
81
- 'written to the project, so a new session will ask about it again; lift it with ' +
82
- '/approvals undeny.';
91
+ : 'Refused — this exact call will not run and will not ask again in this conversation, even ' +
92
+ 'if you resume it later. It was not written to the project, so another conversation will ' +
93
+ 'ask about it again; lift it with /approvals undeny.';
83
94
  };
84
- export async function createInteractiveSession(sessionConfig, commandLineConfigOverrides, message) {
95
+ /**
96
+ * EXT-161 — the preventive compaction threshold for `/status`, read fail-soft.
97
+ *
98
+ * **The method is optional in the parameter type on purpose.** Every runner this surface is given
99
+ * in production implements it, but a partially-stubbed one must not be able to break slash-command
100
+ * dispatch altogether: the worst an unavailable threshold may cost is the compaction line missing
101
+ * from `/status`, which is exactly what an unresolved model already produces. A status line that
102
+ * could take the session down would be worse than no status line.
103
+ */
104
+ async function readAutocompactStatus(runner) {
105
+ try {
106
+ return await runner.getAutocompactStatus?.();
107
+ }
108
+ catch {
109
+ return undefined;
110
+ }
111
+ }
112
+ export async function createInteractiveSession(sessionConfig, commandLineConfigOverrides, message, options = {}) {
85
113
  const config = { ...(await initConfig(commandLineConfigOverrides)) };
86
- const checkpointSaver = new MemorySaver();
114
+ // GS2-20: the session's checkpointer. Durable (SQLite, in the same file as the history store) when
115
+ // history is on and the DB opens, so the LangGraph state this session builds outlives the process
116
+ // and the conversation can be resumed with its tools and pending work intact; a MemorySaver — with
117
+ // a notice — when it cannot be. Never no saver: with a tool-approval interrupt installed, the
118
+ // absence of one throws MISSING_CHECKPOINTER mid-turn.
119
+ const checkpointer = openSessionCheckpointerSafe(config);
120
+ // GS2-8 — render a structured command notice on the plain-text surface: tone-matched title,
121
+ // then the body lines indented under it.
122
+ //
123
+ // [[EXT-165]] — through `displayNotice`, which writes the WHOLE notice to one stream. Rendered
124
+ // line by line through the ordinary helpers, the title took its stream from its colour while
125
+ // the body took another, so a redirected session kept one half and discarded the other; and
126
+ // because the two halves were filtered at different levels, a quieted console showed a title
127
+ // with no body under it (or, at `display` level, a body with no title over it). The tone is
128
+ // passed through rather than turned into a helper choice here — that mapping is what coupled
129
+ // colour to stream.
130
+ const printNotice = (notice) => {
131
+ displayNotice(notice.title, notice.lines, { tone: notice.tone ?? 'info' });
132
+ };
133
+ // GS2-20 — `--resume <id>`: decide BEFORE anything else is opened or written whether the stored
134
+ // conversation can be re-entered, through the same seam `/resume` uses mid-session. A refusal
135
+ // is a notice and exit status 1 with nothing changed — no conversation row opened, no session
136
+ // log started — so a mistyped id costs the person nothing but the message.
137
+ let bootResume;
138
+ if (options.resumeConversationId !== undefined) {
139
+ const resolution = await resolveResumeTarget({ config, checkpointer, workspace: getProjectDir() }, options.resumeConversationId);
140
+ if (!resolution.ok) {
141
+ printNotice(resumeRefusalNotice(resolution.refusal));
142
+ checkpointer.close();
143
+ exit(1);
144
+ return;
145
+ }
146
+ bootResume = resolution.target;
147
+ }
87
148
  // GS2-19: open ONE conversation for this interactive session up-front; every turn below is stamped
88
- // with its id so a multi-turn chat groups under one conversation (not N unrelated rows). Opt-in /
89
- // fail-soft: a no-op returning undefined unless `history.enabled`, in which case turns fall back to
90
- // per-turn 1-turn conversations. Never affects a default run.
91
- const conversationId = openConversationSafe(config, {
92
- command: sessionConfig.mode,
93
- project: getProjectDir(),
94
- model: config.modelDisplayName,
95
- }) ?? undefined;
149
+ // with its id so a multi-turn chat groups under one conversation (not N unrelated rows). Fail-soft:
150
+ // a no-op returning undefined when `history.enabled: false`, in which case turns fall back to
151
+ // per-turn 1-turn conversations.
152
+ //
153
+ // GS2-20: it also carries the thread id, which is the link a resume travels — from the id
154
+ // `gth history list` prints, to the checkpoint holding this session's state. Written HERE, before
155
+ // the runner exists, because `runner.init` can throw partway and a conversation whose thread was
156
+ // never recorded is an entry that can never be resumed.
157
+ //
158
+ // GS2-20: a resumed session opens NO new row — its turns go on recording under the conversation
159
+ // it re-entered, which is what makes the resumed conversation one conversation in `history list`
160
+ // rather than a chain of them. `let`, because `/resume` moves it mid-session and every turn
161
+ // recorded after that must follow.
162
+ let conversationId = bootResume
163
+ ? bootResume.conversationId
164
+ : (openConversationSafe(config, {
165
+ command: sessionConfig.mode,
166
+ project: getProjectDir(),
167
+ model: config.modelDisplayName,
168
+ threadId: checkpointer.threadId,
169
+ }) ?? undefined);
170
+ // GS2-20: tell the checkpointer which row to mark unresumable if a checkpoint write fails later.
171
+ // Optional call — a spec that stubs the checkpointer with a plain object has nothing to bind.
172
+ checkpointer.bindConversation?.(conversationId);
96
173
  // Initialize Runner
97
174
  const logFileName = getCommandOutputFilePath(config, sessionConfig.mode);
98
175
  if (logFileName) {
@@ -103,14 +180,47 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
103
180
  // full toolset (filesystem + hardened dev/shell).
104
181
  const runner = new GthAgentRunner(defaultStatusCallback, createResolvers(), resolveAgentFactory(config, 'lean'));
105
182
  try {
106
- await runner.init(sessionConfig.mode, config, checkpointSaver);
183
+ await runner.init(sessionConfig.mode, config, checkpointer.saver, {
184
+ threadId: checkpointer.threadId,
185
+ });
186
+ // GS2-20 — Ruling 3: a grant made at the approval menu is written against the conversation the
187
+ // moment it lands, so it outlives the process and a resume can install it again. The listener
188
+ // reads the LIVE `conversationId`, because `/resume` moves it; a grant made after that belongs
189
+ // to the conversation the session is then in. Nothing to write against ⇒ the bridge no-ops.
190
+ // Optional call, like `checkpointer.bindConversation`: a spec that stubs the runner with a
191
+ // plain object has nothing to listen with.
192
+ runner.setSessionGrantsListener?.(() => {
193
+ saveConversationGrantsSafe(config, conversationId, runner.getSessionScopedGrants());
194
+ });
107
195
  const rl = createInterface({ input, output });
108
196
  let shouldExit = false;
109
197
  // GS2-8 — the readline surface shares the SAME command registry as the Ink TUI (one source
110
198
  // of truth): every registered command parses, appears in /help, and dispatches here too.
111
199
  const registry = createCommandRegistry();
112
200
  // Committed-turn counter for the /status command (mirrors the TUI's status-bar counter).
113
- let turnCount = 0;
201
+ // GS2-20 a resumed conversation starts the count where it left off.
202
+ let turnCount = bootResume?.turns.length ?? 0;
203
+ // GS2-20 — what a resume shows: the banner, then every recorded turn replayed as the person
204
+ // and the model said it, so the screen holds the conversation the model is continuing. Plain
205
+ // `display`, not the dialog writers: these are restored transcript lines, not chrome. The
206
+ // prompt marker is the same one the live loop uses, so a restored turn reads like a live one.
207
+ const showRestoredConversation = (target) => {
208
+ printNotice(resumedConversationNotice(target));
209
+ for (const turn of target.turns) {
210
+ display(`${formatInputPrompt(' > ')}${turn.prompt ?? ''}`);
211
+ if (turn.response)
212
+ display(turn.response);
213
+ display('');
214
+ }
215
+ };
216
+ // GS2-20 — the boot half of `--resume`: the SAME apply call `/resume` makes below, after
217
+ // `runner.init` has built the graph on a thread of its own. Rotating onto the stored thread
218
+ // here rather than initialising on it is deliberate: both spellings then go through one seam,
219
+ // and breaking it breaks both.
220
+ if (bootResume) {
221
+ await applyResumeTarget({ runner, checkpointer }, bootResume);
222
+ showRestoredConversation(bootResume);
223
+ }
114
224
  // GS2-56 — wire `/debug-dump` on the readline (`--no-tui`) surface too. Previously this surface
115
225
  // injected no writer, so `/debug-dump` reported itself "unavailable" here; it now forwards to the
116
226
  // same core writer the TUI uses AND threads the agent's always-on last-model-request snapshot
@@ -154,9 +264,11 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
154
264
  // EXT-9 Tier-2: instead of a bare y/N, offer a scoped choice so the
155
265
  // human can stop re-prompting for an operation they trust:
156
266
  // [o]nce — approve this single invocation only (persists nothing),
157
- // [s]ession — auto-approve this exact command for the rest of the session,
267
+ // [s]ession — auto-approve this exact command for the rest of the CONVERSATION (GS2-20:
268
+ // it is kept with the conversation and comes back on a resume; the key and
269
+ // its label stay `session`, which is the name the store gives the scope),
158
270
  // [a]lways — additionally persist it to the project allow-list,
159
- // [d]eny always — refuse it AND record a deny entry for the rest of the session,
271
+ // [d]eny always — refuse it AND record a deny entry, for the conversation or the project,
160
272
  // anything else → reject this one call (fail-closed, and it stays the fallthrough).
161
273
  // The runner consults the allow-list BEFORE calling this, so trusted commands never reach
162
274
  // this prompt at all. (The Ink TUI surfaces the same scoped prompt via an approval bridge —
@@ -260,7 +372,10 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
260
372
  // core's, the single chokepoint for every surface, and this must not start deciding
261
373
  // persistence for itself.
262
374
  if (sticky && (answer === 's' || answer === 'session')) {
263
- displayDialogLine('Approvedthis exact command will not ask again this session.', 'notice');
375
+ // GS2-20 the conversation, not the process: the grant is recorded against the
376
+ // conversation and is in force again when it is resumed.
377
+ displayDialogLine('Approved — this exact command will not ask again in this conversation, even if you ' +
378
+ 'resume it later.', 'notice');
264
379
  return { type: 'approve', scope: 'session' };
265
380
  }
266
381
  if (sticky && (answer === 'a' || answer === 'always')) {
@@ -434,10 +549,10 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
434
549
  // agent and handed to its graph, so it is not injected here as a per-turn SystemMessage
435
550
  // (which yielded a second, non-first system message that Anthropic rejects).
436
551
  const messages = [new HumanMessage(userInput)];
437
- // GS2-18: wire the readline (`--no-tui`) interactive path into the opt-in history recorder
438
- // at its turn boundary, matching the single-shot and Ink-TUI paths. Fail-soft and
439
- // default-OFF (recordSessionSafe is a no-op unless `history.enabled`), so a default run is
440
- // unchanged. GS2-16 threads live token/tool/duration analytics; costUsd stays unset.
552
+ // GS2-18: wire the readline (`--no-tui`) interactive path into the local history recorder
553
+ // at its turn boundary, matching the single-shot and Ink-TUI paths. Fail-soft, and a no-op
554
+ // when `history.enabled` is false. GS2-16 threads live token/tool/duration analytics; costUsd
555
+ // stays unset.
441
556
  const startedAt = Date.now();
442
557
  const responseText = await runner.processMessages(messages);
443
558
  // [[EXT-159]] — say why the turn ended, before the prompt comes back.
@@ -476,24 +591,12 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
476
591
  });
477
592
  turnCount += 1; // GS2-8 — feeds the /status turn counter
478
593
  };
479
- // GS2-8 — render a structured command notice on the plain-text surface: tone-matched title
480
- // (warn ⇒ yellow), then the body lines indented under it.
481
- const printNotice = (notice) => {
482
- if (notice.tone === 'warn') {
483
- displayWarning(notice.title);
484
- }
485
- else {
486
- displayInfo(notice.title);
487
- }
488
- for (const line of notice.lines) {
489
- display(` ${line}`);
490
- }
491
- };
492
594
  const endSession = async () => {
493
595
  display('Exiting...');
494
596
  shouldExit = true;
495
597
  await runner.cleanup();
496
598
  stopSessionLogging();
599
+ checkpointer.close();
497
600
  rl.close();
498
601
  };
499
602
  const askQuestion = async () => {
@@ -513,10 +616,22 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
513
616
  // path (`/usr/home/bob/test.md`) is NOT a command and falls through to the model below.
514
617
  const parsed = parseSlashCommand(userInput);
515
618
  if (parsed) {
619
+ // EXT-161 — the threshold `/status` reports, read fresh on every dispatch rather than
620
+ // cached in this closure, so it follows an `/autocompact` typed a moment ago. The
621
+ // resolution behind it is memoised per session, so this is a promise wrapper after the
622
+ // first call and never touches the network twice.
623
+ const autocompactStatus = await readAutocompactStatus(runner);
516
624
  const result = dispatchSlashCommand(parsed, registry, {
517
625
  mode: sessionConfig.mode,
518
626
  modelDisplayName: config.modelDisplayName ?? '',
627
+ // CFG-38 — the TUI's twin of this call passes the same field; the registry is one
628
+ // source, so a provider threaded on only one surface is a divergence, not a subset.
629
+ modelProviderType: config.modelProviderType,
519
630
  turnCount,
631
+ autocompact: autocompactStatus,
632
+ // GS2-20 — the id `/status` names and `gth history resume` takes; live, so it follows
633
+ // a mid-session `/resume`.
634
+ conversationId,
520
635
  // No tool-detail panels or debug pane exist on this surface; their commands degrade
521
636
  // below rather than vanishing from the catalog.
522
637
  toolsExpanded: false,
@@ -568,6 +683,66 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
568
683
  printNotice(approvalsRungNotice(runner.getSessionApprovals()));
569
684
  }
570
685
  }
686
+ else if (result.autocompact) {
687
+ // EXT-161 — `/autocompact [budget]`: report or move the preventive compaction
688
+ // threshold for this session. The notice is built from the status the runner RETURNS,
689
+ // so it can only describe the threshold actually in force — including the case where
690
+ // there is no resolved model and nothing was changed.
691
+ const request = result.autocompact;
692
+ const status = 'show' in request
693
+ ? await readAutocompactStatus(runner)
694
+ : await runner.setAutocompactThreshold?.(request.budget);
695
+ printNotice(status
696
+ ? autocompactNotice(status, !('show' in request))
697
+ : autocompactUnavailableNotice());
698
+ }
699
+ else if (result.compact) {
700
+ // GS2-23 — `/compact [focus]`: the runner folds the older conversation in the live
701
+ // graph and reports what LANDED; the notice is built from that, never from what was
702
+ // asked for. Sequential here — the prompt does not come back until the await settles —
703
+ // so nothing on this surface can race the state rewrite. The transcript in scrollback
704
+ // is the person's record and is left exactly as it is.
705
+ displayInfo(COMPACTING_LINE);
706
+ try {
707
+ const outcome = await runner.compactConversation(result.compact);
708
+ printNotice(compactionNotice(outcome, result.compact.focus));
709
+ }
710
+ catch (err) {
711
+ printNotice(compactionFailedNotice(err instanceof Error ? err.message : String(err)));
712
+ }
713
+ }
714
+ else if (result.resume) {
715
+ // GS2-20 — `/resume [<id>]`: the mid-session spelling of `--resume`, through the SAME
716
+ // two seam calls the boot path makes above. Bare, it lists what could be resumed —
717
+ // every resumable conversation except this one. With an id it resolves (the five
718
+ // checks, each with its own sentence), applies, moves the recorder onto the resumed
719
+ // conversation, and shows the banner and the restored turns. The conversation being
720
+ // left keeps everything recorded under it; nothing is deleted by moving away.
721
+ const { id } = result.resume;
722
+ if (id === undefined) {
723
+ printNotice(resumePickerNotice(listResumeCandidates(config, conversationId)));
724
+ }
725
+ else if (id === conversationId) {
726
+ printNotice(resumeSameConversationNotice(id));
727
+ }
728
+ else {
729
+ const resolution = await resolveResumeTarget({ config, checkpointer, workspace: getProjectDir() }, id);
730
+ if (!resolution.ok) {
731
+ printNotice(resumeRefusalNotice(resolution.refusal, { inSession: true }));
732
+ }
733
+ else {
734
+ try {
735
+ await applyResumeTarget({ runner, checkpointer }, resolution.target);
736
+ conversationId = resolution.target.conversationId;
737
+ turnCount = resolution.target.turns.length;
738
+ showRestoredConversation(resolution.target);
739
+ }
740
+ catch (err) {
741
+ printNotice(resumeFailedNotice(err instanceof Error ? err.message : String(err)));
742
+ }
743
+ }
744
+ }
745
+ }
571
746
  else if (result.clearTranscript ||
572
747
  result.toggleDebug ||
573
748
  result.toggleTools ||
@@ -664,6 +839,7 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
664
839
  catch (err) {
665
840
  await runner.cleanup();
666
841
  stopSessionLogging();
842
+ checkpointer.close();
667
843
  // [[TUI-C71]] — **the `-m` path lands here, not on the loop's handler.** `processMessage` is
668
844
  // called once directly for `gth chat -m …` / `gth code -m …`, outside the interactive loop's
669
845
  // try/catch, so a run-ending approvals stop on that invocation reaches this outermost catch
@@ -679,5 +855,12 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
679
855
  }
680
856
  exit(1);
681
857
  }
858
+ finally {
859
+ // GS2-20: the backstop, not the usual door. `endSession` closes the connection as soon as the
860
+ // session ends, which is what releases the file promptly; this is here so that a future exit
861
+ // path added to the loop cannot silently stop closing it. Closing twice is safe — the saver's
862
+ // close swallows, and `sessionCheckpointer.spec.ts` pins that.
863
+ checkpointer.close();
864
+ }
682
865
  }
683
866
  //# sourceMappingURL=interactiveSessionModule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interactiveSessionModule.js","sourceRoot":"","sources":["../../src/modules/interactiveSessionModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,G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,GAAG,IAAI,gBAAgB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;gBAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QACzF,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,YAAY,aAAa,CAAC,IAAI,aAAa,GAAG,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"interactiveSessionModule.js","sourceRoot":"","sources":["../../src/modules/interactiveSessionModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GACnB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,oBAAoB,GACrB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAA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,KAAK,CAAC,YAAY,aAAa,CAAC,IAAI,aAAa,GAAG,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,CAAC;IACV,CAAC;YAAS,CAAC;QACT,8FAA8F;QAC9F,6FAA6F;QAC7F,8FAA8F;QAC9F,+DAA+D;QAC/D,YAAY,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -0,0 +1,123 @@
1
+ import type { BaseCheckpointSaver } from '@langchain/langgraph';
2
+ import { type HistoryConfigView } from '@gaunt-sloth/core/history/historyEnabled.js';
3
+ import type { ConversationSummary, SessionRecord } from '@gaunt-sloth/core/history/historyStore.js';
4
+ import { type ConversationGrants } from '@gaunt-sloth/core/core/approvals/conversationGrants.js';
5
+ import type { SlashCommandNotice } from '#src/modules/slashCommands.js';
6
+ /** Everything a resume needs, gathered by {@link resolveResumeTarget} once the checks have passed. */
7
+ export interface ResumeTarget {
8
+ conversationId: number;
9
+ /** The LangGraph thread whose checkpoint holds the conversation's state. */
10
+ threadId: string;
11
+ summary: ConversationSummary;
12
+ /** The recorded turns, oldest first — what the surfaces replay as restored turns. */
13
+ turns: SessionRecord[];
14
+ /** The approvals granted in the conversation, to install again (Ruling 3). */
15
+ grants: ConversationGrants;
16
+ }
17
+ /** Why a resume was refused — one variant per check, each with what its sentence needs. */
18
+ export type ResumeRefusal = {
19
+ kind: 'history-off';
20
+ } | {
21
+ kind: 'store-unavailable';
22
+ } | {
23
+ kind: 'unknown';
24
+ id: number;
25
+ } | {
26
+ kind: 'not-resumable';
27
+ id: number;
28
+ /**
29
+ * The reason class, where it is known:
30
+ * - `single-shot` — recorded by a command that keeps no conversation state (`ask`, `exec`, …);
31
+ * - `no-thread` — an interactive conversation whose thread link is null: a checkpoint write
32
+ * failed while it ran and it was marked unresumable, or it predates conversation state;
33
+ * - `no-checkpoint` — the thread is on record but nothing was ever checkpointed under it;
34
+ * - `unreadable` — the checkpoint could not be read from the store.
35
+ */
36
+ reason: 'single-shot' | 'no-thread' | 'no-checkpoint' | 'unreadable';
37
+ command?: string;
38
+ } | {
39
+ kind: 'workspace-mismatch';
40
+ id: number;
41
+ stored: string;
42
+ current: string;
43
+ };
44
+ export type ResumeResolution = {
45
+ ok: true;
46
+ target: ResumeTarget;
47
+ } | {
48
+ ok: false;
49
+ refusal: ResumeRefusal;
50
+ };
51
+ /** What {@link resolveResumeTarget} needs from the session asking. */
52
+ export interface ResumeSessionContext {
53
+ config: HistoryConfigView;
54
+ /** The session's checkpointer — the saver the thread is looked up in, and whether it is durable. */
55
+ checkpointer: {
56
+ saver: BaseCheckpointSaver;
57
+ durable: boolean;
58
+ };
59
+ /** The directory this session works in, compared with the conversation's stored `project`. */
60
+ workspace: string;
61
+ }
62
+ /**
63
+ * Decide whether conversation `id` can be resumed by this session, and gather what the resume
64
+ * needs. Never throws: a failure to read is a refusal with a reason, never a crash.
65
+ */
66
+ export declare function resolveResumeTarget(session: ResumeSessionContext, id: number): Promise<ResumeResolution>;
67
+ /** The half of the runner a resume drives — `GthAgentRunner` satisfies it; specs pass a fake. */
68
+ export interface ResumableRunner {
69
+ resumeConversation(target: {
70
+ threadId: string;
71
+ grants: ConversationGrants;
72
+ }): void | Promise<void>;
73
+ }
74
+ /**
75
+ * Make the session BE in the resolved conversation: the runner rotates onto the stored thread and
76
+ * installs the conversation's grants, and the checkpointer is told which row to mark if a write
77
+ * fails from here on. The caller switches its own recorder id to `target.conversationId`, because
78
+ * that id is the caller's variable; nothing else is needed.
79
+ *
80
+ * Rejects when the runner refuses — a turn still running, or a tool approval still pending on the
81
+ * thread being left — and then nothing has moved: the checkpointer is bound only after the runner
82
+ * has actually rotated, so a refused resume leaves the session exactly where it was.
83
+ */
84
+ export declare function applyResumeTarget(session: {
85
+ runner: ResumableRunner;
86
+ checkpointer: {
87
+ bindConversation?(conversationId: number | undefined): void;
88
+ };
89
+ }, target: ResumeTarget): Promise<void>;
90
+ /**
91
+ * The conversations a bare `/resume` offers: every resumable one except the conversation the
92
+ * session is already in. Fail-soft and empty when history is off or the store is absent.
93
+ */
94
+ export declare function listResumeCandidates(config: HistoryConfigView, currentConversationId: number | undefined, limit?: number): ConversationSummary[];
95
+ /**
96
+ * Parse the id a person typed after `--resume`, `/resume` or `history resume`. A positive integer
97
+ * in decimal, or `null` — the ids `gth history list` prints are exactly that, and anything else is
98
+ * a typo worth naming rather than a lookup worth making.
99
+ */
100
+ export declare function parseResumeId(raw: string | undefined): number | null;
101
+ /**
102
+ * The banner a resumed session shows first: which conversation, when it started, how much of it is
103
+ * on record, and under which command and model — the facts a person needs to confirm they picked
104
+ * the right id. It also states the one thing a resume changes that nothing on screen shows: the
105
+ * approvals granted in that conversation are in force again.
106
+ */
107
+ export declare function resumedConversationNotice(target: ResumeTarget): SlashCommandNotice;
108
+ /**
109
+ * The sentence for each refusal. One title states what did not happen and why; the body says what
110
+ * to do instead. `inSession` picks the pointer: the slash commands a running session has, or the
111
+ * CLI commands a shell has.
112
+ */
113
+ export declare function resumeRefusalNotice(refusal: ResumeRefusal, options?: {
114
+ inSession?: boolean;
115
+ }): SlashCommandNotice;
116
+ /** A bare `/resume`: the conversations this session could move to, and how. */
117
+ export declare function resumePickerNotice(candidates: ConversationSummary[]): SlashCommandNotice;
118
+ /** `/resume <id>` naming the conversation the session is already in: nothing to do, and said so. */
119
+ export declare function resumeSameConversationNotice(id: number): SlashCommandNotice;
120
+ /** `/resume` on a surface with no conversation store behind it (the fixture agent). */
121
+ export declare function resumeUnavailableNotice(): SlashCommandNotice;
122
+ /** A resume whose apply step threw. The session is left in the conversation it was in. */
123
+ export declare function resumeFailedNotice(reason: string): SlashCommandNotice;