@bastani/atomic 0.9.79-alpha.1 → 0.9.79

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/CHANGELOG.md CHANGED
@@ -2,6 +2,58 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.79] - 2026-11-12
6
+
7
+ Resuming long sessions is faster and keeps your tools and subagents, long workflow runs stay responsive, and interrupts and status messages are calmer.
8
+
9
+ - **Faster, more faithful resume.** Resume shows its slow steps before the TUI appears, keeps the tools a session last ran with, brings back `subagent`, `workflow`, `todo` and MCP tools that were missing for a turn, stays in your own checkout instead of a snapshot worktree, and reaches a usable prompt sooner on long histories. Background subagents survive a reboot, and one that cannot be restored is reported with a ready call to relaunch it ([#4660](https://github.com/bastani-inc/atomic/issues/4660), [#4664](https://github.com/bastani-inc/atomic/pull/4664)).
10
+ - **Long workflow runs stay light.** The graph overlay and progress widget no longer slow down as stages finish, finished stages you reopened leave memory again once their chat closes, and released stages share one Intercom connection per session ([#4642](https://github.com/bastani-inc/atomic/issues/4642), [#4659](https://github.com/bastani-inc/atomic/pull/4659)).
11
+ - **Calmer interrupts and quieter status.** Ctrl+C clears typed text before stopping work and exits only on a second press from an empty, idle editor; an interrupted response ends with a muted `Interrupted by user` line instead of a red error; the compaction card names only the model, a policy-refusal summary is labeled `summary (fallback)`, and a successful interactive engine restart no longer prints a message ([#4670](https://github.com/bastani-inc/atomic/pull/4670), [#4673](https://github.com/bastani-inc/atomic/pull/4673)).
12
+ - **Simpler `/tasks` details.** The "Foreground wait" action, which never changed how a task ran, is gone ([#4662](https://github.com/bastani-inc/atomic/issues/4662), [#4665](https://github.com/bastani-inc/atomic/pull/4665)).
13
+ - **Upstream fixes.** MCP tools loaded by `tool_search` survive resume and `/reload`, `/export` links are clickable, the standalone binary resolves extension dependencies declared in `main` or `exports`, llama.cpp defaults to port 9931, and Anthropic message threads follow the `api.anthropic.com` endpoint ([#4663](https://github.com/bastani-inc/atomic/pull/4663)).
14
+
15
+ ### Added
16
+
17
+ - Resuming lists its slow steps on the terminal before the TUI appears (`Loading the session history (0.6 s)…`, `Checking 6 checkouts against the session's snapshots…`, `Restoring … from snapshot …`), a history of 100,000 entries or more before it is read, and any other step that blocks the terminal as soon as it ends; quick resumes stay silent ([#4660](https://github.com/bastani-inc/atomic/issues/4660))
18
+ - Interactive startup notes `Tools this session was using aren't available right now: <names>` when a tool the session was using, or one its tool selection names, is not registered once startup finishes, and `/tools` lists such tools under **Missing**; tools left out with `--tools`, `--no-tools` or `--no-extensions` are never listed ([#4660](https://github.com/bastani-inc/atomic/issues/4660))
19
+
20
+ ### Changed
21
+
22
+ - Workflow activity frames from `ctx.observeWorkflowActivity` and `session.workflows.observe`, and `workflow_activity_changed` events, share their root graph's nodes as deep-frozen objects instead of cloning every node for every observer, so a change to a long run no longer costs a copy of its whole graph. Each frame still has its own root, graph and `nodes` array; copy a node before changing it ([#4642](https://github.com/bastani-inc/atomic/issues/4642))
23
+ - Ctrl+C clears the editor first when it has text, even while a response is streaming; with an empty editor it stops running work at once, as Escape does. On an empty, idle editor the first press shows "Press Ctrl+C again to exit" and a second press within 0.8 s exits. Clearing text or stopping work never counts toward exiting, so a quick second press after clearing no longer quits Atomic ([#4670](https://github.com/bastani-inc/atomic/pull/4670))
24
+ - A response you interrupt with Escape or Ctrl+C ends with a muted `Interrupted by user` line instead of a red provider message such as "This operation was aborted" or "Aborted after 2 retry attempts" ([#4670](https://github.com/bastani-inc/atomic/pull/4670))
25
+ - The compaction card names only the model that compacted the context, such as `github-copilot/claude-opus-5.5`, instead of `planner · github-copilot/claude-opus-5.5`. A policy-refusal summary is headed `Context compacted · summary (fallback)` instead of `summary (pi fallback)` ([#4673](https://github.com/bastani-inc/atomic/pull/4673)).
26
+ - An interactive engine that stops or stops responding and is restarted successfully no longer shows "Interactive engine stopped unexpectedly; restarting." or "Interactive engine is not responding; restarting."; the cause goes to the debug log. A restart that fails is still reported ([#4673](https://github.com/bastani-inc/atomic/pull/4673)).
27
+
28
+ ### Fixed
29
+
30
+ - Fixed MCP tools loaded by `tool_search` being dropped on resume and `/reload` when an extension deactivates only its own tool at `session_start` (upstream [#12054](https://github.com/earendil-works/pi/pull/12054))
31
+ - Fixed `/export` HTML showing raw terminal hyperlink escape codes around links in custom tool output; links are now clickable, other terminal escape sequences are dropped, and clicking a link no longer expands or collapses the output (upstream [#12052](https://github.com/earendil-works/pi/pull/12052))
32
+ - Fixed the standalone binary failing to resolve extension npm dependencies whose entry point is declared in `package.json` `main` or `exports`, including imports made from inside other dependencies (upstream [#12046](https://github.com/earendil-works/pi/pull/12046))
33
+ - Fixed the llama.cpp provider defaulting to port 8080 while `llama serve` listens on 9931; the default server URL is now `http://127.0.0.1:9931`, and the llama.cpp guide starts the router, including the NVIDIA RTX recipe router, with `llama serve` on that port (upstream [#12001](https://github.com/earendil-works/pi/pull/12001), [#12004](https://github.com/earendil-works/pi/pull/12004))
34
+ - Fixed Anthropic message threads staying off for custom providers whose `baseUrl` is on `api.anthropic.com`; the default now follows the endpoint, not the provider ID (upstream [#11987](https://github.com/earendil-works/pi/issues/11987))
35
+ - Fixed a later plain resume bringing back tools an earlier run left out with `--tools`, `--no-tools`, `--exclude-tools` or a `-name` modifier, so resumed sessions keep the tools they last ran with, as in upstream pi ([#4660](https://github.com/bastani-inc/atomic/issues/4660))
36
+ - Fixed a resumed session losing `subagent`, `workflow`, `todo` and MCP tools for good after one turn ran while they were not registered, for example while their extensions were still loading or had failed to load: such tools now come back on resume like in a new session, while a tool an extension or SDK caller turned off with `setActiveTools` stays off ([#4660](https://github.com/bastani-inc/atomic/issues/4660))
37
+ - Fixed resume moving a session into a snapshot worktree under `~/.atomic/agent/worktree-snapshots/worktrees/` when its own project checkout had only changed since the snapshot, for example after work was merged: the session continues in its checkout without a notice, and a session an earlier resume moved into such a worktree returns to its checkout when it did no work there since ([#4660](https://github.com/bastani-inc/atomic/issues/4660))
38
+ - Fixed resuming a long session walking its whole history again and again: the session's branch, worktree restores, latest snapshots and name are kept current as entries are added, and recorded checkouts are compared with their snapshots once each, several at a time. On a 200,000-entry session with six checkouts, time to a usable prompt dropped from about 10.4 s to about 6.3 s; about 2 s of that is the session no longer being moved into a restored worktree, and about 4 s remains in full-history parses that this change does not remove ([#4660](https://github.com/bastani-inc/atomic/issues/4660))
39
+ - Fixed a startup step that fails, such as a tool status that cannot be read or extension loading that did not finish, holding back session recovery: the session keeps its tools and working directory and interrupted work is still recovered ([#4660](https://github.com/bastani-inc/atomic/issues/4660))
40
+
41
+ ### Removed
42
+
43
+ - Removed the "Foreground wait" action and the `app.tasks.foreground` keybinding from the `/tasks` detail page. It only showed a passing `yielded` or `settled` line and briefly dropped the task from the running-tasks count; it never changed how the task ran or what the agent was told ([#4662](https://github.com/bastani-inc/atomic/issues/4662))
44
+ - Removed the "Loading remote component…" line that briefly appeared while an interactive component drew its first frame ([#4670](https://github.com/bastani-inc/atomic/pull/4670))
45
+
46
+ ## [0.9.79-alpha.2] - 2026-11-11
47
+
48
+ Quieter session status messages.
49
+
50
+ - **Less noise in the transcript.** The compaction card names only the model that compacted the context, a policy-refusal summary is labeled `summary (fallback)`, and a successful interactive engine restart no longer prints a message; failed restarts are still reported ([#4673](https://github.com/bastani-inc/atomic/pull/4673)).
51
+
52
+ ### Changed
53
+
54
+ - The compaction card names only the model that compacted the context, such as `github-copilot/claude-opus-5.5`, instead of `planner · github-copilot/claude-opus-5.5`. A policy-refusal summary is headed `Context compacted · summary (fallback)` instead of `summary (pi fallback)` ([#4673](https://github.com/bastani-inc/atomic/pull/4673)).
55
+ - An interactive engine that stops or stops responding and is restarted successfully no longer shows "Interactive engine stopped unexpectedly; restarting." or "Interactive engine is not responding; restarting."; the cause goes to the debug log. A restart that fails is still reported ([#4673](https://github.com/bastani-inc/atomic/pull/4673)).
56
+
5
57
  ## [0.9.79-alpha.1] - 2026-11-11
6
58
 
7
59
  Resuming long sessions is faster and keeps your tools and subagents, long workflow runs stay responsive, and interrupting a response is calmer.
@@ -4,6 +4,23 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.79] - 2026-11-12
8
+
9
+ Released workflow stages share one broker connection, and hosted-session failures say why.
10
+
11
+ - **One connection for released stages.** Finished workflow stages released from memory share one broker connection per session through the new hosted sessions API, keeping their names, post-mortem asks and plain-send relay. The next session of this version replaces an older running broker ([#4642](https://github.com/bastani-inc/atomic/issues/4642), [#4659](https://github.com/bastani-inc/atomic/pull/4659)).
12
+ - **Clear hosted-session errors.** A send to a released stage whose peer is gone, or a hosting request the broker never answers, fails with a typed error that names the reason and, where it helps, the `workflow:` target to use ([#4642](https://github.com/bastani-inc/atomic/issues/4642), [#4659](https://github.com/bastani-inc/atomic/pull/4659)).
13
+
14
+ ### Added
15
+
16
+ - Added hosted sessions: `IntercomClient.hostSessions` lists and routes many lightweight sessions over one broker connection, with typed `HostedSessionRequestError` and `NotHostedSessionError` refusals. The broker now speaks Intercom protocol 1 to 3, so the next session of this version replaces an older running broker ([#4642](https://github.com/bastani-inc/atomic/issues/4642))
17
+ - Added the typed `StageRecipientReleasedError` (`recipient_stage_released`) for a send to a released workflow stage whose hosted peer is gone: it names why and points to the stage's `workflow:` target instead of answering `Session not found` ([#4642](https://github.com/bastani-inc/atomic/issues/4642))
18
+ - Added the typed, retryable `IntercomHostedSessionTimeoutError` (`hosted_session_timeout`) for a hosting request the broker never answers ([#4642](https://github.com/bastani-inc/atomic/issues/4642))
19
+
20
+ ### Fixed
21
+
22
+ - Fixed each finished workflow stage that was released from memory keeping its own broker connection open for the rest of the session: released stages now share one connection per session, keeping their names, `closed · reply: post-mortem only` listing, post-mortem asks and plain-send relay ([#4642](https://github.com/bastani-inc/atomic/issues/4642))
23
+
7
24
  ## [0.9.79-alpha.1] - 2026-11-11
8
25
 
9
26
  ### Added
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/intercom",
3
- "version": "0.9.79-alpha.1",
3
+ "version": "0.9.79",
4
4
  "private": true,
5
5
  "description": "Atomic extension providing a private coordination channel between parent and child agent sessions. Fork of: https://github.com/nicobailon/pi-intercom",
6
6
  "contributors": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/mcp",
3
- "version": "0.9.79-alpha.1",
3
+ "version": "0.9.79",
4
4
  "private": true,
5
5
  "description": "Atomic's pi-compatible MCP integration for server connections, OAuth, tools, resources, and terminal management.",
6
6
  "contributors": [
@@ -2,6 +2,19 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.79] - 2026-11-12
6
+
7
+ Background subagents survive a reboot, and one that cannot be restored comes with a ready relaunch call.
8
+
9
+ - **Reboot-safe background subagents.** Child sessions now live under the agent directory instead of the system temporary directory, and one failed restore no longer hides the notices for the others ([#4660](https://github.com/bastani-inc/atomic/issues/4660), [#4664](https://github.com/bastani-inc/atomic/pull/4664)).
10
+ - **Actionable restore notices.** A subagent that could not be restored is reported with its agent, task, ids, working directory, worktree, session and a ready `subagent` call to relaunch it ([#4660](https://github.com/bastani-inc/atomic/issues/4660), [#4664](https://github.com/bastani-inc/atomic/pull/4664)).
11
+
12
+ ### Fixed
13
+
14
+ - Fixed background subagents being lost when a machine rebooted before their parent session was resumed: a parent on the default SQLite session store kept its children's sessions in the system temporary directory, which a reboot clears. They now live under the agent directory (`subagent-sessions/<parent session id>`), and a recorded session file that is gone is reported by its path instead of as a session-store loss ([#4660](https://github.com/bastani-inc/atomic/issues/4660))
15
+ - Fixed one background subagent whose restoration failed unexpectedly after a restart hiding the notices for every other subagent: each child is now reported on its own, and a child that failed this way is retried on the next resume instead of being recorded as gone ([#4660](https://github.com/bastani-inc/atomic/issues/4660))
16
+ - Fixed the notice for a subagent that could not be restored after a restart saying only to launch a fresh one: it now gives the agent, its task, run and child ids, working directory, worktree and branch, session, a ready `subagent` call to relaunch it in its worktree when its task was recorded (otherwise where to find the launching call), and how to inspect what it left behind ([#4660](https://github.com/bastani-inc/atomic/issues/4660))
17
+
5
18
  ## [0.9.79-alpha.1] - 2026-11-11
6
19
 
7
20
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/subagents",
3
- "version": "0.9.79-alpha.1",
3
+ "version": "0.9.79",
4
4
  "private": true,
5
5
  "description": "Atomic extension for delegating tasks to subagents with parallel execution. Fork of: https://github.com/nicobailon/pi-subagents",
6
6
  "contributors": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/web-access",
3
- "version": "0.9.79-alpha.1",
3
+ "version": "0.9.79",
4
4
  "private": true,
5
5
  "description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
6
6
  "contributors": [
@@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.9.79] - 2026-11-12
10
+
11
+ Long workflow runs stay responsive and release finished stages from memory.
12
+
13
+ - **Faster graph and progress widget.** The graph overlay, progress widget and stage starts no longer slow down as a run finishes more stages, and store changes redo only the stages that changed ([#4642](https://github.com/bastani-inc/atomic/issues/4642), [#4659](https://github.com/bastani-inc/atomic/pull/4659)).
14
+ - **Reopened stages leave memory again.** A finished stage you attached to, messaged or asked returns to its saved transcript once its chat closes, and reopens under the same Intercom name when needed ([#4642](https://github.com/bastani-inc/atomic/issues/4642), [#4659](https://github.com/bastani-inc/atomic/pull/4659)).
15
+
16
+ ### Fixed
17
+
18
+ - Fixed finished workflow stages that you attached to, messaged or asked over Intercom staying in memory until the session ended: a reopened stage, including one of a completed run you opened for inspection, goes back to its saved transcript once its chat is closed and its turn has ended, and the next attach, message or ask reopens it under the same Intercom name ([#4642](https://github.com/bastani-inc/atomic/issues/4642))
19
+ - Fixed the workflow graph overlay and the progress widget slowing down as runs finish more stages: the graph no longer redraws its scrollbar through every row, node lookups no longer rescan the run, and widget frames reuse the run's expanded graph until the run changes ([#4642](https://github.com/bastani-inc/atomic/issues/4642))
20
+ - Fixed starting each stage of a long run walking every earlier stage when nothing in the run is paused or blocked ([#4642](https://github.com/bastani-inc/atomic/issues/4642))
21
+ - Fixed workflow store changes re-reading every stage a long run had finished: the graph snapshot, the progress widget's counts and the root activity published to extensions now redo only the stages that changed, and a run made only of `ctx.stage` stages is expanded from its previous expansion. A run with `ctx.tool` calls or nested workflows still expands in full on each change, so its cost still grows with its finished stages. The executor now tells the store when it edits a finished stage's wait results or worktree snapshot ([#4642](https://github.com/bastani-inc/atomic/issues/4642))
22
+
9
23
  ## [0.9.79-alpha.1] - 2026-11-11
10
24
 
11
25
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/workflows",
3
- "version": "0.9.79-alpha.1",
3
+ "version": "0.9.79",
4
4
  "private": true,
5
5
  "description": "Atomic extension for multi-stage workflow authoring and execution.",
6
6
  "contributors": [
@@ -1,7 +1,7 @@
1
1
  import { DebugLogUnwritableError } from "./debug-errors.ts";
2
2
  /** A diagnostic area. Each is on in debug mode, or while its own environment variable is set. */
3
- export type DebugArea = "workflow" | "model-routing" | "pooled-watch" | "pool" | "storage";
4
- /** Each area's own environment variable; `pool` and `storage` have none. */
3
+ export type DebugArea = "workflow" | "model-routing" | "pooled-watch" | "pool" | "storage" | "engine";
4
+ /** Each area's own environment variable; `pool`, `storage` and `engine` have none. */
5
5
  export declare const DEBUG_AREA_VARIABLES: Readonly<Record<DebugArea, string | undefined>>;
6
6
  export type DebugValue = string | number | boolean | null | undefined | readonly (string | number)[];
7
7
  export type DebugFields = Readonly<Record<string, DebugValue>>;
@@ -1 +1 @@
1
- {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/core/debug.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAG5D,iGAAiG;AACjG,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,eAAe,GAAG,cAAc,GAAG,MAAM,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AACtF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,CAOhF,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AACrG,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAsB/D;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAE9F;AA6BD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAEzE;AAOD;;;;GAIG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,WAAW,EACnB,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,EACtC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAClC,IAAI,CAIN;AAED,8GAA8G;AAC9G,wBAAgB,kBAAkB,IAAI,uBAAuB,GAAG,SAAS,CAExE;AAED,yHAAyH;AACzH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAW9D"}
@@ -4,13 +4,14 @@ import { ENV_DEBUG, getDebugLogPath, getEnvNames } from "../config.js";
4
4
  import { redactCredentialShapes } from "../utils/credential-redaction.js";
5
5
  import { DebugLogUnwritableError } from "./debug-errors.js";
6
6
  import { isDebugSettingOn } from "./debug-setting.js";
7
- /** Each area's own environment variable; `pool` and `storage` have none. */
7
+ /** Each area's own environment variable; `pool`, `storage` and `engine` have none. */
8
8
  export const DEBUG_AREA_VARIABLES = {
9
9
  workflow: "ATOMIC_WORKFLOW_DEBUG",
10
10
  "model-routing": "ATOMIC_MODEL_ROUTING_DEBUG",
11
11
  "pooled-watch": "ATOMIC_DEBUG_POOLED_WATCH",
12
12
  pool: undefined,
13
13
  storage: undefined,
14
+ engine: undefined,
14
15
  };
15
16
  const MAX_DEBUG_TEXT_LENGTH = 2_000;
16
17
  let debugLogFailure;
@@ -1 +1 @@
1
- {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/core/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAAoD;IACpF,QAAQ,EAAE,uBAAuB;IACjC,eAAe,EAAE,4BAA4B;IAC7C,cAAc,EAAE,2BAA2B;IAC3C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;CAClB,CAAC;AAKF,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAEpC,IAAI,eAAoD,CAAC;AAEzD,gGAAgG;AAChG,SAAS,iBAAiB,CAAC,IAAe,EAAE,GAAsB;IACjE,MAAM,IAAI,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACzC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;IACxB,IAAI,IAAI,KAAK,cAAc;QAAE,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,GAAG,CAAC,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AAC,CAAC,MAAM,CAAC,KAAK,CAAC;KAC7G,CAAC;AACH,CAAC","sourcesContent":["import { appendFileSync, mkdirSync } from \"node:fs\";\nimport { dirname } from \"node:path\";\nimport { ENV_DEBUG, getDebugLogPath, getEnvNames } from \"../config.js\";\nimport { redactCredentialShapes } from \"../utils/credential-redaction.js\";\nimport { DebugLogUnwritableError } from \"./debug-errors.ts\";\nimport { isDebugSettingOn } from \"./debug-setting.ts\";\n\n/** A diagnostic area. Each is on in debug mode, or while its own environment variable is set. */\nexport type DebugArea = \"workflow\" | \"model-routing\" | \"pooled-watch\" | \"pool\" | \"storage\";\n\n/** Each area's own environment variable; `pool` and `storage` have none. */\nexport const DEBUG_AREA_VARIABLES: Readonly<Record<DebugArea, string | undefined>> = {\n\tworkflow: \"ATOMIC_WORKFLOW_DEBUG\",\n\t\"model-routing\": \"ATOMIC_MODEL_ROUTING_DEBUG\",\n\t\"pooled-watch\": \"ATOMIC_DEBUG_POOLED_WATCH\",\n\tpool: undefined,\n\tstorage: undefined,\n};\n\nexport type DebugValue = string | number | boolean | null | undefined | readonly (string | number)[];\nexport type DebugFields = Readonly<Record<string, DebugValue>>;\n\nconst MAX_DEBUG_TEXT_LENGTH = 2_000;\n\nlet debugLogFailure: DebugLogUnwritableError | undefined;\n\n/** The value of `area`'s own variable while it turns the area on, such as a trace file path. */\nfunction areaVariableValue(area: DebugArea, env: NodeJS.ProcessEnv): string | undefined {\n\tconst name = DEBUG_AREA_VARIABLES[area];\n\tif (name === undefined) return undefined;\n\tconst value = env[name];\n\tif (area === \"pooled-watch\") return value === \"\" || value === \"0\" ? undefined : value;\n\treturn value === \"1\" ? value : undefined;\n}\n\nfunction isDebugModeOn(env: NodeJS.ProcessEnv): boolean {\n\tconst debug = getEnvNames(ENV_DEBUG)\n\t\t.map((name) => env[name])\n\t\t.find((value) => value !== undefined);\n\treturn isDebugSettingOn() || debug === \"1\";\n}\n\n/**\n * Whether debug output is on: everywhere when the `debug` setting, `--debug` or `ATOMIC_DEBUG=1` is on, and for\n * `area` also while its own environment variable is set. Without `area`, only the first three count.\n */\nexport function isDebugEnabled(area?: DebugArea, env: NodeJS.ProcessEnv = process.env): boolean {\n\treturn isDebugModeOn(env) || (area !== undefined && areaVariableValue(area, env) !== undefined);\n}\n\nfunction safeText(text: string): string {\n\tconst redacted = redactCredentialShapes(text);\n\treturn redacted.length > MAX_DEBUG_TEXT_LENGTH ? `${redacted.slice(0, MAX_DEBUG_TEXT_LENGTH)}…` : redacted;\n}\n\nfunction safeValue(value: DebugValue): DebugValue {\n\tif (typeof value === \"string\") return safeText(value);\n\tif (typeof value === \"object\" && value !== null)\n\t\treturn value.map((item) => (typeof item === \"string\" ? safeText(item) : item));\n\treturn value;\n}\n\nfunction safeFields(fields: DebugFields): Record<string, DebugValue> {\n\treturn Object.fromEntries(Object.entries(fields).map(([key, value]) => [key, safeValue(value)]));\n}\n\nfunction appendLine(path: string, line: string): void {\n\ttry {\n\t\tmkdirSync(dirname(path), { recursive: true });\n\t\tappendFileSync(path, `${line}\\n`);\n\t} catch (error) {\n\t\tif (debugLogFailure !== undefined) return;\n\t\tdebugLogFailure = new DebugLogUnwritableError(path, { cause: error });\n\t\tconsole.warn(debugLogFailure.message);\n\t}\n}\n\n/**\n * Appends `record` to the debug output file `path` as one JSON line, with credentials redacted. A failure is recorded\n * once (see {@link getDebugLogFailure}), never thrown.\n */\nexport function appendDebugRecord(path: string, record: DebugFields): void {\n\tappendLine(path, JSON.stringify(safeFields(record)));\n}\n\nfunction appendDebugLog(area: DebugArea, event: string, fields: DebugFields): void {\n\tconst record = { at: new Date().toISOString(), pid: process.pid, area, event, data: safeFields(fields) };\n\tappendLine(getDebugLogPath(), JSON.stringify(record));\n}\n\n/**\n * Records one diagnostic event of `area`. In debug mode it is appended to the debug log that `/debug` shows, with\n * credentials redacted. While the area's own variable is set, `ownOutput` also writes it where that variable always\n * has, and receives the variable's value.\n */\nexport function reportDebug(\n\tarea: DebugArea,\n\tevent: string,\n\tfields: DebugFields,\n\townOutput?: (variable: string) => void,\n\tenv: NodeJS.ProcessEnv = process.env,\n): void {\n\tif (isDebugModeOn(env)) appendDebugLog(area, event, fields);\n\tconst own = areaVariableValue(area, env);\n\tif (ownOutput !== undefined && own !== undefined) ownOutput(own);\n}\n\n/** The first failure to write a debug log file in this process, if any. Later records are still attempted. */\nexport function getDebugLogFailure(): DebugLogUnwritableError | undefined {\n\treturn debugLogFailure;\n}\n\n/** The debug fields that name a failure a fallback absorbed: its class, stable code, message and first cause (#4660). */\nexport function failureDebugFields(error: unknown): DebugFields {\n\tif (!(error instanceof Error)) return { message: String(error) };\n\tconst { code } = error as Error & { code?: unknown };\n\tconst { cause } = error;\n\treturn {\n\t\tname: error.name,\n\t\tcode: typeof code === \"string\" || typeof code === \"number\" ? code : undefined,\n\t\tmessage: error.message,\n\t\tcause:\n\t\t\tcause instanceof Error ? `${cause.name}: ${cause.message}` : cause === undefined ? undefined : String(cause),\n\t};\n}\n"]}
1
+ {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/core/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,sFAAsF;AACtF,MAAM,CAAC,MAAM,oBAAoB,GAAoD;IACpF,QAAQ,EAAE,uBAAuB;IACjC,eAAe,EAAE,4BAA4B;IAC7C,cAAc,EAAE,2BAA2B;IAC3C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,SAAS;CACjB,CAAC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IACxB,OAAO;QACN,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,IAAI,EAAE,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QAC7E,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,KAAK,EACJ,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KAC7G,CAAC;AACH,CAAC","sourcesContent":["import { appendFileSync, mkdirSync } from \"node:fs\";\nimport { dirname } from \"node:path\";\nimport { ENV_DEBUG, getDebugLogPath, getEnvNames } from \"../config.js\";\nimport { redactCredentialShapes } from \"../utils/credential-redaction.js\";\nimport { DebugLogUnwritableError } from \"./debug-errors.ts\";\nimport { isDebugSettingOn } from \"./debug-setting.ts\";\n\n/** A diagnostic area. Each is on in debug mode, or while its own environment variable is set. */\nexport type DebugArea = \"workflow\" | \"model-routing\" | \"pooled-watch\" | \"pool\" | \"storage\" | \"engine\";\n\n/** Each area's own environment variable; `pool`, `storage` and `engine` have none. */\nexport const DEBUG_AREA_VARIABLES: Readonly<Record<DebugArea, string | undefined>> = {\n\tworkflow: \"ATOMIC_WORKFLOW_DEBUG\",\n\t\"model-routing\": \"ATOMIC_MODEL_ROUTING_DEBUG\",\n\t\"pooled-watch\": \"ATOMIC_DEBUG_POOLED_WATCH\",\n\tpool: undefined,\n\tstorage: undefined,\n\tengine: undefined,\n};\n\nexport type DebugValue = string | number | boolean | null | undefined | readonly (string | number)[];\nexport type DebugFields = Readonly<Record<string, DebugValue>>;\n\nconst MAX_DEBUG_TEXT_LENGTH = 2_000;\n\nlet debugLogFailure: DebugLogUnwritableError | undefined;\n\n/** The value of `area`'s own variable while it turns the area on, such as a trace file path. */\nfunction areaVariableValue(area: DebugArea, env: NodeJS.ProcessEnv): string | undefined {\n\tconst name = DEBUG_AREA_VARIABLES[area];\n\tif (name === undefined) return undefined;\n\tconst value = env[name];\n\tif (area === \"pooled-watch\") return value === \"\" || value === \"0\" ? undefined : value;\n\treturn value === \"1\" ? value : undefined;\n}\n\nfunction isDebugModeOn(env: NodeJS.ProcessEnv): boolean {\n\tconst debug = getEnvNames(ENV_DEBUG)\n\t\t.map((name) => env[name])\n\t\t.find((value) => value !== undefined);\n\treturn isDebugSettingOn() || debug === \"1\";\n}\n\n/**\n * Whether debug output is on: everywhere when the `debug` setting, `--debug` or `ATOMIC_DEBUG=1` is on, and for\n * `area` also while its own environment variable is set. Without `area`, only the first three count.\n */\nexport function isDebugEnabled(area?: DebugArea, env: NodeJS.ProcessEnv = process.env): boolean {\n\treturn isDebugModeOn(env) || (area !== undefined && areaVariableValue(area, env) !== undefined);\n}\n\nfunction safeText(text: string): string {\n\tconst redacted = redactCredentialShapes(text);\n\treturn redacted.length > MAX_DEBUG_TEXT_LENGTH ? `${redacted.slice(0, MAX_DEBUG_TEXT_LENGTH)}…` : redacted;\n}\n\nfunction safeValue(value: DebugValue): DebugValue {\n\tif (typeof value === \"string\") return safeText(value);\n\tif (typeof value === \"object\" && value !== null)\n\t\treturn value.map((item) => (typeof item === \"string\" ? safeText(item) : item));\n\treturn value;\n}\n\nfunction safeFields(fields: DebugFields): Record<string, DebugValue> {\n\treturn Object.fromEntries(Object.entries(fields).map(([key, value]) => [key, safeValue(value)]));\n}\n\nfunction appendLine(path: string, line: string): void {\n\ttry {\n\t\tmkdirSync(dirname(path), { recursive: true });\n\t\tappendFileSync(path, `${line}\\n`);\n\t} catch (error) {\n\t\tif (debugLogFailure !== undefined) return;\n\t\tdebugLogFailure = new DebugLogUnwritableError(path, { cause: error });\n\t\tconsole.warn(debugLogFailure.message);\n\t}\n}\n\n/**\n * Appends `record` to the debug output file `path` as one JSON line, with credentials redacted. A failure is recorded\n * once (see {@link getDebugLogFailure}), never thrown.\n */\nexport function appendDebugRecord(path: string, record: DebugFields): void {\n\tappendLine(path, JSON.stringify(safeFields(record)));\n}\n\nfunction appendDebugLog(area: DebugArea, event: string, fields: DebugFields): void {\n\tconst record = { at: new Date().toISOString(), pid: process.pid, area, event, data: safeFields(fields) };\n\tappendLine(getDebugLogPath(), JSON.stringify(record));\n}\n\n/**\n * Records one diagnostic event of `area`. In debug mode it is appended to the debug log that `/debug` shows, with\n * credentials redacted. While the area's own variable is set, `ownOutput` also writes it where that variable always\n * has, and receives the variable's value.\n */\nexport function reportDebug(\n\tarea: DebugArea,\n\tevent: string,\n\tfields: DebugFields,\n\townOutput?: (variable: string) => void,\n\tenv: NodeJS.ProcessEnv = process.env,\n): void {\n\tif (isDebugModeOn(env)) appendDebugLog(area, event, fields);\n\tconst own = areaVariableValue(area, env);\n\tif (ownOutput !== undefined && own !== undefined) ownOutput(own);\n}\n\n/** The first failure to write a debug log file in this process, if any. Later records are still attempted. */\nexport function getDebugLogFailure(): DebugLogUnwritableError | undefined {\n\treturn debugLogFailure;\n}\n\n/** The debug fields that name a failure a fallback absorbed: its class, stable code, message and first cause (#4660). */\nexport function failureDebugFields(error: unknown): DebugFields {\n\tif (!(error instanceof Error)) return { message: String(error) };\n\tconst { code } = error as Error & { code?: unknown };\n\tconst { cause } = error;\n\treturn {\n\t\tname: error.name,\n\t\tcode: typeof code === \"string\" || typeof code === \"number\" ? code : undefined,\n\t\tmessage: error.message,\n\t\tcause:\n\t\t\tcause instanceof Error ? `${cause.name}: ${cause.message}` : cause === undefined ? undefined : String(cause),\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"compaction-boundary-message.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/compaction-boundary-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAwC,MAAM,wBAAwB,CAAC;AACnF,OAAO,KAAK,EACX,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACN,KAAK,aAAa,EAGlB,MAAM,2BAA2B,CAAC;AAInC,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,uBAAuB,CAAC;IAC/B,IAAI,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,yBAAyB,CAAC,SAAS,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,gFAAgF;AAChF,qBAAa,kCAAmC,SAAQ,GAAG;IAC1D,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAe;IAEpC,YAAY,MAAM,EAAE,wBAAwB,GAAG,YAAY,EAAE,SAAS,SAAI,EAezE;IAED,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAGnC;IACD,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEpC;IAEQ,UAAU,IAAI,IAAI,CAG1B;IAED,OAAO,CAAC,aAAa;CA2DrB;AAED,wBAAgB,6BAA6B,CAC5C,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,OAAO,EACjB,SAAS,SAAI,GACX,kCAAkC,CA2BpC"}
1
+ {"version":3,"file":"compaction-boundary-message.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/compaction-boundary-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAwC,MAAM,wBAAwB,CAAC;AACnF,OAAO,KAAK,EACX,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACN,KAAK,aAAa,EAGlB,MAAM,2BAA2B,CAAC;AAInC,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,uBAAuB,CAAC;IAC/B,IAAI,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,yBAAyB,CAAC,SAAS,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,gFAAgF;AAChF,qBAAa,kCAAmC,SAAQ,GAAG;IAC1D,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAe;IAEpC,YAAY,MAAM,EAAE,wBAAwB,GAAG,YAAY,EAAE,SAAS,SAAI,EAezE;IAED,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAGnC;IACD,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEpC;IAEQ,UAAU,IAAI,IAAI,CAG1B;IAED,OAAO,CAAC,aAAa;CAgDrB;AAED,wBAAgB,6BAA6B,CAC5C,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,OAAO,EACjB,SAAS,SAAI,GACX,kCAAkC,CA2BpC"}
@@ -42,12 +42,11 @@ export class CompactionBoundaryMessageComponent extends Box {
42
42
  const label = theme.fg("customMessageLabel", theme.bold(this.view.rung === "fresh"
43
43
  ? "✻ Context cleared (compaction degraded)"
44
44
  : this.view.backend === "summary"
45
- ? "✻ Context compacted · summary (pi fallback)"
45
+ ? "✻ Context compacted · summary (fallback)"
46
46
  : "✻ Context compacted"));
47
47
  content.addChild(new Text(label, 0, 0));
48
- if (this.view.backend && this.view.model) {
49
- content.addChild(new Text(theme.fg("dim", `${this.view.backend === "summary" ? "summary (pi fallback)" : this.view.backend} · ${this.view.model}`), 0, 0));
50
- }
48
+ if (this.view.model)
49
+ content.addChild(new Text(theme.fg("dim", this.view.model), 0, 0));
51
50
  content.addChild(new Spacer(1));
52
51
  if (this.expanded) {
53
52
  content.addChild(new Text(theme.bold(theme.fg("customMessageText", `Compacted from ${tokenStr} tokens`)), 0, 0));
@@ -1 +1 @@
1
- {"version":3,"file":"compaction-boundary-message.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/compaction-boundary-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAMnF,OAAO,EAEN,yBAAyB,EACzB,6BAA6B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAY7D,gFAAgF;AAChF,MAAM,OAAO,kCAAmC,SAAQ,GAAG;IAClD,QAAQ,GAAG,KAAK,CAAC;IACR,IAAI,CAAe;IAEpC,YAAY,MAA+C,EAAE,SAAS,GAAG,CAAC;QACzE,KAAK,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC;QACjE,IAAI,eAAe,IAAI,MAAM,EAAE,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG;gBACX,IAAI,EAAE,MAAM,CAAC,aAAa;gBAC1B,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,YAAY,EAAE,MAAM,CAAC,YAAY;gBACjC,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,KAAK,EAAE,MAAM,CAAC,KAAK;aACnB,CAAC;QACH,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;QACpB,CAAC;QACD,IAAI,CAAC,aAAa,EAAE,CAAC;IACtB,CAAC;IAED,WAAW,CAAC,QAAiB;QAC5B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,aAAa,EAAE,CAAC;IACtB,CAAC;IACD,YAAY,CAAC,SAAi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ACpB,EACD,SAAS,CACT,CAAC;IACF,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAChC,OAAO,SAAS,CAAC;AAClB,CAAC","sourcesContent":["import { Box, Container, MouseRegion, Spacer, Text } from \"@earendil-works/pi-tui\";\nimport type {\n\tVerbatimCompactionDetails,\n\tVerbatimCompactionResult,\n\tVerbatimCompactionStats,\n} from \"../../../core/compaction/index.ts\";\nimport {\n\ttype CustomMessage,\n\tSUMMARY_COMPACTION_PREFIX,\n\tstripVerbatimCompactionPrefix,\n} from \"../../../core/messages.ts\";\nimport { theme } from \"../theme/theme.js\";\nimport { parenthesizedKeyHint } from \"./keybinding-hints.js\";\n\ninterface BoundaryView {\n\ttext: string;\n\tstats: VerbatimCompactionStats;\n\trung: VerbatimCompactionDetails[\"rung\"];\n\tbackend?: VerbatimCompactionDetails[\"backend\"];\n\tmodel?: string;\n\t/** Authoritative whole-context count, preferred for \"Compacted from N tokens\". */\n\ttokensBefore?: number;\n}\n\n/** Renders the durable verbatim compaction boundary without markdown reflow. */\nexport class CompactionBoundaryMessageComponent extends Box {\n\tprivate expanded = false;\n\tprivate readonly view: BoundaryView;\n\n\tconstructor(result: VerbatimCompactionResult | BoundaryView, outputPad = 1) {\n\t\tsuper(outputPad, 1, (text) => theme.bg(\"customMessageBg\", text));\n\t\tif (\"compactedText\" in result) {\n\t\t\tthis.view = {\n\t\t\t\ttext: result.compactedText,\n\t\t\t\tstats: result.stats,\n\t\t\t\trung: result.rung,\n\t\t\t\ttokensBefore: result.tokensBefore,\n\t\t\t\tbackend: result.backend,\n\t\t\t\tmodel: result.model,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.view = result;\n\t\t}\n\t\tthis.updateDisplay();\n\t}\n\n\tsetExpanded(expanded: boolean): void {\n\t\tthis.expanded = expanded;\n\t\tthis.updateDisplay();\n\t}\n\tsetOutputPad(outputPad: number): void {\n\t\tthis.setPaddingX(outputPad);\n\t}\n\n\toverride invalidate(): void {\n\t\tsuper.invalidate();\n\t\tthis.updateDisplay();\n\t}\n\n\tprivate updateDisplay(): void {\n\t\tthis.clear();\n\t\tconst content = new Container();\n\t\tconst tokenStr = (this.view.tokensBefore ?? this.view.stats.tokensBefore).toLocaleString();\n\t\t// The fresh rung destroyed the compactable conversation; say so plainly.\n\t\tconst label = theme.fg(\n\t\t\t\"customMessageLabel\",\n\t\t\ttheme.bold(\n\t\t\t\tthis.view.rung === \"fresh\"\n\t\t\t\t\t? \"✻ Context cleared (compaction degraded)\"\n\t\t\t\t\t: this.view.backend === \"summary\"\n\t\t\t\t\t\t? \"✻ Context compacted · summary (pi fallback)\"\n\t\t\t\t\t\t: \"✻ Context compacted\",\n\t\t\t),\n\t\t);\n\t\tcontent.addChild(new Text(label, 0, 0));\n\t\tif (this.view.backend && this.view.model) {\n\t\t\tcontent.addChild(\n\t\t\t\tnew Text(\n\t\t\t\t\ttheme.fg(\n\t\t\t\t\t\t\"dim\",\n\t\t\t\t\t\t`${this.view.backend === \"summary\" ? \"summary (pi fallback)\" : this.view.backend} · ${this.view.model}`,\n\t\t\t\t\t),\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tcontent.addChild(new Spacer(1));\n\t\tif (this.expanded) {\n\t\t\tcontent.addChild(\n\t\t\t\tnew Text(theme.bold(theme.fg(\"customMessageText\", `Compacted from ${tokenStr} tokens`)), 0, 0),\n\t\t\t);\n\t\t\tcontent.addChild(new Spacer(1));\n\t\t\tconst rendered = this.view.text\n\t\t\t\t.split(\"\\n\")\n\t\t\t\t.map((line) =>\n\t\t\t\t\t/^\\(filtered \\d+ lines\\)$/.test(line) ? theme.fg(\"dim\", line) : theme.fg(\"customMessageText\", line),\n\t\t\t\t)\n\t\t\t\t.join(\"\\n\");\n\t\t\tcontent.addChild(new Text(rendered, 0, 0));\n\t\t} else {\n\t\t\tconst hint = parenthesizedKeyHint(\"app.tools.expand\", \"to expand\");\n\t\t\tcontent.addChild(\n\t\t\t\tnew Text(\n\t\t\t\t\ttheme.fg(\"customMessageText\", `Compacted from ${tokenStr} tokens`) + (hint ? ` ${hint}` : \"\"),\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tthis.addChild(\n\t\t\tnew MouseRegion(content, (event) => {\n\t\t\t\tif (event.type !== \"click\" || event.button !== \"left\") return undefined;\n\t\t\t\tthis.setExpanded(!this.expanded);\n\t\t\t\treturn { handled: true };\n\t\t\t}),\n\t\t);\n\t}\n}\n\nexport function compactionBoundaryFromMessage(\n\tmessage: CustomMessage,\n\texpanded: boolean,\n\toutputPad = 1,\n): CompactionBoundaryMessageComponent {\n\tconst details = message.details as VerbatimCompactionDetails;\n\tconst content = Array.isArray(message.content)\n\t\t? message.content\n\t\t\t\t.filter((block) => block.type === \"text\")\n\t\t\t\t.map((block) => block.text)\n\t\t\t\t.join(\"\\n\")\n\t\t: message.content;\n\tconst text =\n\t\tdetails.backend === \"summary\"\n\t\t\t? content.startsWith(SUMMARY_COMPACTION_PREFIX)\n\t\t\t\t? content.slice(SUMMARY_COMPACTION_PREFIX.length)\n\t\t\t\t: content\n\t\t\t: stripVerbatimCompactionPrefix(content);\n\tconst component = new CompactionBoundaryMessageComponent(\n\t\t{\n\t\t\ttext,\n\t\t\tstats: details.stats,\n\t\t\trung: details.rung,\n\t\t\ttokensBefore: details.tokensBefore ?? details.stats.tokensBefore,\n\t\t\tbackend: details.backend,\n\t\t\tmodel: details.model,\n\t\t},\n\t\toutputPad,\n\t);\n\tcomponent.setExpanded(expanded);\n\treturn component;\n}\n"]}
1
+ {"version":3,"file":"compaction-boundary-message.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/compaction-boundary-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAMnF,OAAO,EAEN,yBAAyB,EACzB,6BAA6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OAAO,CAAC;QAC7C,CAAC,CAAC,OAAO,CAAC,OAAO;aACd,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC;aACxC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;aAC1B,IAAI,CAAC,IAAI,CAAC;QACb,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACnB,MAAM,IAAI,GACT,OAAO,CAAC,OAAO,KAAK,SAAS;QAC5B,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,yBAAyB,CAAC;YAC9C,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,MAAM,CAAC;YACjD,CAAC,CAAC,OAAO;QACV,CAAC,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,IAAI,kCAAkC,CACvD;QACC,IAAI;QACJ,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,YAAY;QAChE,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,KAAK,EAAE,OAAO,CAAC,KAAK;KACpB,EACD,SAAS,CACT,CAAC;IACF,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAChC,OAAO,SAAS,CAAC;AAClB,CAAC","sourcesContent":["import { Box, Container, MouseRegion, Spacer, Text } from \"@earendil-works/pi-tui\";\nimport type {\n\tVerbatimCompactionDetails,\n\tVerbatimCompactionResult,\n\tVerbatimCompactionStats,\n} from \"../../../core/compaction/index.ts\";\nimport {\n\ttype CustomMessage,\n\tSUMMARY_COMPACTION_PREFIX,\n\tstripVerbatimCompactionPrefix,\n} from \"../../../core/messages.ts\";\nimport { theme } from \"../theme/theme.js\";\nimport { parenthesizedKeyHint } from \"./keybinding-hints.js\";\n\ninterface BoundaryView {\n\ttext: string;\n\tstats: VerbatimCompactionStats;\n\trung: VerbatimCompactionDetails[\"rung\"];\n\tbackend?: VerbatimCompactionDetails[\"backend\"];\n\tmodel?: string;\n\t/** Authoritative whole-context count, preferred for \"Compacted from N tokens\". */\n\ttokensBefore?: number;\n}\n\n/** Renders the durable verbatim compaction boundary without markdown reflow. */\nexport class CompactionBoundaryMessageComponent extends Box {\n\tprivate expanded = false;\n\tprivate readonly view: BoundaryView;\n\n\tconstructor(result: VerbatimCompactionResult | BoundaryView, outputPad = 1) {\n\t\tsuper(outputPad, 1, (text) => theme.bg(\"customMessageBg\", text));\n\t\tif (\"compactedText\" in result) {\n\t\t\tthis.view = {\n\t\t\t\ttext: result.compactedText,\n\t\t\t\tstats: result.stats,\n\t\t\t\trung: result.rung,\n\t\t\t\ttokensBefore: result.tokensBefore,\n\t\t\t\tbackend: result.backend,\n\t\t\t\tmodel: result.model,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.view = result;\n\t\t}\n\t\tthis.updateDisplay();\n\t}\n\n\tsetExpanded(expanded: boolean): void {\n\t\tthis.expanded = expanded;\n\t\tthis.updateDisplay();\n\t}\n\tsetOutputPad(outputPad: number): void {\n\t\tthis.setPaddingX(outputPad);\n\t}\n\n\toverride invalidate(): void {\n\t\tsuper.invalidate();\n\t\tthis.updateDisplay();\n\t}\n\n\tprivate updateDisplay(): void {\n\t\tthis.clear();\n\t\tconst content = new Container();\n\t\tconst tokenStr = (this.view.tokensBefore ?? this.view.stats.tokensBefore).toLocaleString();\n\t\t// The fresh rung destroyed the compactable conversation; say so plainly.\n\t\tconst label = theme.fg(\n\t\t\t\"customMessageLabel\",\n\t\t\ttheme.bold(\n\t\t\t\tthis.view.rung === \"fresh\"\n\t\t\t\t\t? \"✻ Context cleared (compaction degraded)\"\n\t\t\t\t\t: this.view.backend === \"summary\"\n\t\t\t\t\t\t? \"✻ Context compacted · summary (fallback)\"\n\t\t\t\t\t\t: \"✻ Context compacted\",\n\t\t\t),\n\t\t);\n\t\tcontent.addChild(new Text(label, 0, 0));\n\t\tif (this.view.model) content.addChild(new Text(theme.fg(\"dim\", this.view.model), 0, 0));\n\t\tcontent.addChild(new Spacer(1));\n\t\tif (this.expanded) {\n\t\t\tcontent.addChild(\n\t\t\t\tnew Text(theme.bold(theme.fg(\"customMessageText\", `Compacted from ${tokenStr} tokens`)), 0, 0),\n\t\t\t);\n\t\t\tcontent.addChild(new Spacer(1));\n\t\t\tconst rendered = this.view.text\n\t\t\t\t.split(\"\\n\")\n\t\t\t\t.map((line) =>\n\t\t\t\t\t/^\\(filtered \\d+ lines\\)$/.test(line) ? theme.fg(\"dim\", line) : theme.fg(\"customMessageText\", line),\n\t\t\t\t)\n\t\t\t\t.join(\"\\n\");\n\t\t\tcontent.addChild(new Text(rendered, 0, 0));\n\t\t} else {\n\t\t\tconst hint = parenthesizedKeyHint(\"app.tools.expand\", \"to expand\");\n\t\t\tcontent.addChild(\n\t\t\t\tnew Text(\n\t\t\t\t\ttheme.fg(\"customMessageText\", `Compacted from ${tokenStr} tokens`) + (hint ? ` ${hint}` : \"\"),\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tthis.addChild(\n\t\t\tnew MouseRegion(content, (event) => {\n\t\t\t\tif (event.type !== \"click\" || event.button !== \"left\") return undefined;\n\t\t\t\tthis.setExpanded(!this.expanded);\n\t\t\t\treturn { handled: true };\n\t\t\t}),\n\t\t);\n\t}\n}\n\nexport function compactionBoundaryFromMessage(\n\tmessage: CustomMessage,\n\texpanded: boolean,\n\toutputPad = 1,\n): CompactionBoundaryMessageComponent {\n\tconst details = message.details as VerbatimCompactionDetails;\n\tconst content = Array.isArray(message.content)\n\t\t? message.content\n\t\t\t\t.filter((block) => block.type === \"text\")\n\t\t\t\t.map((block) => block.text)\n\t\t\t\t.join(\"\\n\")\n\t\t: message.content;\n\tconst text =\n\t\tdetails.backend === \"summary\"\n\t\t\t? content.startsWith(SUMMARY_COMPACTION_PREFIX)\n\t\t\t\t? content.slice(SUMMARY_COMPACTION_PREFIX.length)\n\t\t\t\t: content\n\t\t\t: stripVerbatimCompactionPrefix(content);\n\tconst component = new CompactionBoundaryMessageComponent(\n\t\t{\n\t\t\ttext,\n\t\t\tstats: details.stats,\n\t\t\trung: details.rung,\n\t\t\ttokensBefore: details.tokensBefore ?? details.stats.tokensBefore,\n\t\t\tbackend: details.backend,\n\t\t\tmodel: details.model,\n\t\t},\n\t\toutputPad,\n\t);\n\tcomponent.setExpanded(expanded);\n\treturn component;\n}\n"]}
@@ -10,8 +10,9 @@ export declare function renderDiagnosticStatus(message: string, view: Pick<Engin
10
10
  * Host presentation policy for interactive-engine diagnostics.
11
11
  *
12
12
  * Engine recovery is operational status, not a failure: the engine-death
13
- * teardown has already remounted the editor and restored focus, so the notice is
14
- * a calm status line rather than a red chat error. Heartbeat-watchdog gaps stay
13
+ * teardown has already remounted the editor and restored focus, so a replacement
14
+ * that succeeds is silent and its reason goes to the debug log. A replacement
15
+ * that fails is a concrete failure and still surfaces. Heartbeat-watchdog gaps stay
15
16
  * internal. Concrete engine failures still surface as chat errors.
16
17
  */
17
18
  export declare function renderEngineDiagnostic(diagnostic: ActivityWatchdogDiagnostic, view: EngineDiagnosticView): void;
@@ -1 +1 @@
1
- {"version":3,"file":"engine-diagnostic-view.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-diagnostic-view.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,0BAA0B,EAA2C,MAAM,wBAAwB,CAAC;AAElH,MAAM,WAAW,oBAAoB;IACpC,iBAAiB,IAAI,IAAI,CAAC;IAC1B,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACrD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,GAAG,IAAI,CAI5G;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,0BAA0B,EAAE,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAW/G"}
1
+ {"version":3,"file":"engine-diagnostic-view.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-diagnostic-view.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,0BAA0B,EAA2C,MAAM,wBAAwB,CAAC;AAElH,MAAM,WAAW,oBAAoB;IACpC,iBAAiB,IAAI,IAAI,CAAC;IAC1B,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACrD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,GAAG,IAAI,CAI5G;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,0BAA0B,EAAE,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAW/G"}
@@ -1,3 +1,4 @@
1
+ import { reportDebug } from "../../core/debug.js";
1
2
  import { stripAnsi } from "../../utils/ansi.js";
2
3
  import { shouldRenderEngineDiagnosticAsChatError } from "./activity-watchdog.js";
3
4
  /** Sanitize only the display copy, like task-detail's multiline presentation. */
@@ -10,8 +11,9 @@ export function renderDiagnosticStatus(message, view) {
10
11
  * Host presentation policy for interactive-engine diagnostics.
11
12
  *
12
13
  * Engine recovery is operational status, not a failure: the engine-death
13
- * teardown has already remounted the editor and restored focus, so the notice is
14
- * a calm status line rather than a red chat error. Heartbeat-watchdog gaps stay
14
+ * teardown has already remounted the editor and restored focus, so a replacement
15
+ * that succeeds is silent and its reason goes to the debug log. A replacement
16
+ * that fails is a concrete failure and still surfaces. Heartbeat-watchdog gaps stay
15
17
  * internal. Concrete engine failures still surface as chat errors.
16
18
  */
17
19
  export function renderEngineDiagnostic(diagnostic, view) {
@@ -21,7 +23,7 @@ export function renderEngineDiagnostic(diagnostic, view) {
21
23
  }
22
24
  if (diagnostic.source === "recovery") {
23
25
  view.stopWorkingLoader();
24
- view.showStatus(diagnostic.message);
26
+ reportDebug("engine", "interactive-engine-recovery", { message: diagnostic.message });
25
27
  return;
26
28
  }
27
29
  if (shouldRenderEngineDiagnosticAsChatError(diagnostic))
@@ -1 +1 @@
1
- {"version":3,"file":"engine-diagnostic-view.js","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-diagnostic-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAmC,uCAAuC,EAAE,MAAM,wBAAwB,CAAC;AAQlH,iFAAiF;AACjF,MAAM,UAAU,sBAAsB,CAAC,OAAe,EAAE,IAA8C;IACrG,mFAAmF;IACnF,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAC;IAC/E,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAsC,EAAE,IAA0B;IACxG,IAAI,UAAU,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QACpC,sBAAsB,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO;IACR,CAAC;IACD,IAAI,UAAU,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QACtC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACpC,OAAO;IACR,CAAC;IACD,IAAI,uCAAuC,CAAC,UAAU,CAAC;QAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC7F,CAAC","sourcesContent":["import { stripAnsi } from \"../../utils/ansi.js\";\nimport { type ActivityWatchdogDiagnostic, shouldRenderEngineDiagnosticAsChatError } from \"./activity-watchdog.ts\";\n\nexport interface EngineDiagnosticView {\n\tstopWorkingLoader(): void;\n\tshowStatus(message: string, persist?: boolean): void;\n\tshowError(message: string): void;\n}\n\n/** Sanitize only the display copy, like task-detail's multiline presentation. */\nexport function renderDiagnosticStatus(message: string, view: Pick<EngineDiagnosticView, \"showStatus\">): void {\n\t// ANSI stripping alone misses bare C0/C1 controls and incomplete escape sequences.\n\tconst text = stripAnsi(message).replace(/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f]/g, \" \");\n\tview.showStatus(text, true);\n}\n\n/**\n * Host presentation policy for interactive-engine diagnostics.\n *\n * Engine recovery is operational status, not a failure: the engine-death\n * teardown has already remounted the editor and restored focus, so the notice is\n * a calm status line rather than a red chat error. Heartbeat-watchdog gaps stay\n * internal. Concrete engine failures still surface as chat errors.\n */\nexport function renderEngineDiagnostic(diagnostic: ActivityWatchdogDiagnostic, view: EngineDiagnosticView): void {\n\tif (diagnostic.source === \"stderr\") {\n\t\trenderDiagnosticStatus(diagnostic.message, view);\n\t\treturn;\n\t}\n\tif (diagnostic.source === \"recovery\") {\n\t\tview.stopWorkingLoader();\n\t\tview.showStatus(diagnostic.message);\n\t\treturn;\n\t}\n\tif (shouldRenderEngineDiagnosticAsChatError(diagnostic)) view.showError(diagnostic.message);\n}\n"]}
1
+ {"version":3,"file":"engine-diagnostic-view.js","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-diagnostic-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAmC,uCAAuC,EAAE,MAAM,wBAAwB,CAAC;AAQlH,iFAAiF;AACjF,MAAM,UAAU,sBAAsB,CAAC,OAAe,EAAE,IAA8C;IACrG,mFAAmF;IACnF,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAC;IAC/E,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAsC,EAAE,IAA0B;IACxG,IAAI,UAAU,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QACpC,sBAAsB,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO;IACR,CAAC;IACD,IAAI,UAAU,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QACtC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,WAAW,CAAC,QAAQ,EAAE,6BAA6B,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;QACtF,OAAO;IACR,CAAC;IACD,IAAI,uCAAuC,CAAC,UAAU,CAAC;QAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC7F,CAAC","sourcesContent":["import { reportDebug } from \"../../core/debug.ts\";\nimport { stripAnsi } from \"../../utils/ansi.js\";\nimport { type ActivityWatchdogDiagnostic, shouldRenderEngineDiagnosticAsChatError } from \"./activity-watchdog.ts\";\n\nexport interface EngineDiagnosticView {\n\tstopWorkingLoader(): void;\n\tshowStatus(message: string, persist?: boolean): void;\n\tshowError(message: string): void;\n}\n\n/** Sanitize only the display copy, like task-detail's multiline presentation. */\nexport function renderDiagnosticStatus(message: string, view: Pick<EngineDiagnosticView, \"showStatus\">): void {\n\t// ANSI stripping alone misses bare C0/C1 controls and incomplete escape sequences.\n\tconst text = stripAnsi(message).replace(/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f]/g, \" \");\n\tview.showStatus(text, true);\n}\n\n/**\n * Host presentation policy for interactive-engine diagnostics.\n *\n * Engine recovery is operational status, not a failure: the engine-death\n * teardown has already remounted the editor and restored focus, so a replacement\n * that succeeds is silent and its reason goes to the debug log. A replacement\n * that fails is a concrete failure and still surfaces. Heartbeat-watchdog gaps stay\n * internal. Concrete engine failures still surface as chat errors.\n */\nexport function renderEngineDiagnostic(diagnostic: ActivityWatchdogDiagnostic, view: EngineDiagnosticView): void {\n\tif (diagnostic.source === \"stderr\") {\n\t\trenderDiagnosticStatus(diagnostic.message, view);\n\t\treturn;\n\t}\n\tif (diagnostic.source === \"recovery\") {\n\t\tview.stopWorkingLoader();\n\t\treportDebug(\"engine\", \"interactive-engine-recovery\", { message: diagnostic.message });\n\t\treturn;\n\t}\n\tif (shouldRenderEngineDiagnosticAsChatError(diagnostic)) view.showError(diagnostic.message);\n}\n"]}
@@ -89,7 +89,7 @@ A successful run appends the existing pi-style `type:"compaction"` entry shape:
89
89
 
90
90
  The entry's `tokensBefore` is the provider-aware whole-context count used for budgeting and the Compacted from display. `details.stats.tokensBefore`, `tokensAfter`, and `percentReduction` are heuristic estimates of the compactable region plus the kept tail. Those stats can differ from the entry count, and `percentReduction` is negative when the reconstructed estimate is larger. The display count is not stored again under `details.tokensBefore`.
91
91
 
92
- `details.rung` is `"planned"` for successful model compaction, `"extension"` for a `session_before_compact` override, or `"fresh"` when older context was discarded. `details.backend` and `details.model` identify the successful compactor. A policy-refusal fallback records `backend: "summary"`, the same model that refused, and file lists in `details.summary`. Its card says `summary (pi fallback)`. `details.plannerModel` identifies a borrowed chat planner:
92
+ `details.rung` is `"planned"` for successful model compaction, `"extension"` for a `session_before_compact` override, or `"fresh"` when older context was discarded. `details.backend` and `details.model` identify the successful compactor. A policy-refusal fallback records `backend: "summary"`, the same model that refused, and file lists in `details.summary`. Its card is headed `Context compacted · summary (fallback)`. `details.plannerModel` identifies a borrowed chat planner:
93
93
 
94
94
  ```json
95
95
  "details": {
@@ -9,7 +9,7 @@ LLMs have finite context windows. Atomic reduces older transcript context with *
9
9
 
10
10
  Compaction normally uses the model selected by `compactionModel`. If it fails, Atomic borrows the next model from your configured `fallbackModels` for that request. A chat model's policy refusal that arrives before it generated anything first triggers pi's summary compaction on the same model, whether selected by `auto`, an explicit chat-model ID, or a `fallbackModels` entry. A refusal that arrives partway through the model's output is retried once and then planned in parts, keeping the result verbatim, before any summary. If that also fails, Atomic continues through the fallback models. Classifier and Morph failures go straight to the fallback models.
11
11
 
12
- **The selected compaction model and configured fallback models may receive the compaction transcript**, using their own credentials. Borrowing never changes the session's model or thinking level. Line planners select deletions, and Atomic reconstructs surviving lines without rewriting them. The policy-refusal summary fallback is lossy and appears as `summary (pi fallback)`.
12
+ **The selected compaction model and configured fallback models may receive the compaction transcript**, using their own credentials. Borrowing never changes the session's model or thinking level. Line planners select deletions, and Atomic reconstructs surviving lines without rewriting them. The policy-refusal summary fallback is lossy and appears as `summary (fallback)`.
13
13
 
14
14
  ## On this page and its reference
15
15
 
@@ -23,7 +23,7 @@ This page covers the concepts and normal use of compaction and branch summarizat
23
23
  | Background compaction | Context passes `compaction.backgroundThresholdPercent` (75% by default) | The same verbatim compaction, run while the agent keeps working | The same boundary, committed at the next turn boundary |
24
24
  | Planner fallback borrowing | A failed selected compaction model | Same deletion records, from a configured `fallbackModels` entry | Retained text with the borrowed model recorded |
25
25
  | Split planning | A chat provider refuses a compaction request partway through its output, twice | The same deletion records, planned for each part of the transcript split at message boundaries | Retained text reconstructed from the originals |
26
- | Policy-refusal summary fallback | A chat provider refuses compaction under its policy before generating anything, or split planning failed | Pi's summary compaction on the same model | A summary boundary labeled `summary (pi fallback)` |
26
+ | Policy-refusal summary fallback | A chat provider refuses compaction under its policy before generating anything, or split planning failed | Pi's summary compaction on the same model | A summary boundary labeled `summary (fallback)` |
27
27
  | Fresh context window | Load-bearing compaction after every configured model failed | *(none — no model call)* | A `CompactionEntry` with `details.rung: "fresh"` |
28
28
  | Branch summarization | Optional `/tree` navigation | Generated summary prose | A `BranchSummaryEntry` |
29
29
 
@@ -131,7 +131,7 @@ For classifier compaction, log in with `/login typesafe`, then set `"compactionM
131
131
 
132
132
  For Morph compaction, use `/login morph` or set `MORPH_API_KEY`, then choose `morph/morph-compactor` in the selector or a settings file. Without a credential, the selector marks Morph as `requires /login morph`. Morph receives the compactable transcript without thinking, but not the recent tail. Atomic reconstructs surviving lines from the originals and preserves `<keepContext>` spans. Morph is not a chat-model choice.
133
133
 
134
- The compaction card shows the backend and model that produced the result, such as `classifier · typesafe/jev-latest` or `morph · morph/morph-compactor`. A policy-refusal summary appears as `summary (pi fallback)`.
134
+ The compaction card shows the model that produced the result, such as `github-copilot/claude-opus-5.5` or `morph/morph-compactor`. A policy-refusal summary is headed `Context compacted · summary (fallback)`.
135
135
 
136
136
  ### Troubleshooting policy refusals
137
137
 
@@ -122,7 +122,7 @@ Both safety keys are matched by physical identity rather than by the configured
122
122
 
123
123
  If the engine is unresponsive, an abort or replacement has waited over one second, or replacement failed, Ctrl+C terminates and replaces it. This takes precedence over custom UI bindings. A failed replacement remains recoverable with another Ctrl+C; Atomic does not keep retrying automatically.
124
124
 
125
- After an unexpected engine stop, Atomic closes its custom UI and makes one automatic restart attempt. A failed restart leaves the editor usable and reports `Interactive engine restart failed: …`. A submission that never started returns as an exact draft, including pasted content and queued submissions in order. Accepted work is not offered for automatic retry.
125
+ After an unexpected engine stop, Atomic closes its custom UI and makes one automatic restart attempt. A restart that succeeds shows no message; with debug logging on, its cause is written to the debug log. A failed restart leaves the editor usable and reports `Interactive engine restart failed: …`. A submission that never started returns as an exact draft, including pasted content and queued submissions in order. Accepted work is not offered for automatic retry.
126
126
 
127
127
  If a saved tool call has no recorded result, reopening the session shows that its result is unavailable. **Inspect files or external systems before retrying: the tool may already have had side effects.**
128
128
 
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.9.79-alpha.1",
3
+ "version": "0.9.79",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bastani/atomic",
9
- "version": "0.9.79-alpha.1",
9
+ "version": "0.9.79",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@bastani/atomic-natives": "0.9.79-alpha.1",
13
- "@bastani/pi-ai": "0.9.79-alpha.1",
12
+ "@bastani/atomic-natives": "0.9.79",
13
+ "@bastani/pi-ai": "0.9.79",
14
14
  "@earendil-works/pi-agent-core": "1.5.2",
15
15
  "@earendil-works/pi-codemode": "1.5.2",
16
16
  "@earendil-works/pi-tui": "1.5.2",
@@ -427,18 +427,18 @@
427
427
  }
428
428
  },
429
429
  "node_modules/@bastani/atomic-natives": {
430
- "version": "0.9.79-alpha.1",
431
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.79-alpha.1.tgz",
430
+ "version": "0.9.79",
431
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.79.tgz",
432
432
  "license": "MIT",
433
433
  "optionalDependencies": {
434
- "@bastani/atomic-natives-darwin-arm64": "0.9.79-alpha.1",
435
- "@bastani/atomic-natives-darwin-x64": "0.9.79-alpha.1",
436
- "@bastani/atomic-natives-linux-arm64-gnu": "0.9.79-alpha.1",
437
- "@bastani/atomic-natives-linux-arm64-musl": "0.9.79-alpha.1",
438
- "@bastani/atomic-natives-linux-x64-gnu": "0.9.79-alpha.1",
439
- "@bastani/atomic-natives-linux-x64-musl": "0.9.79-alpha.1",
440
- "@bastani/atomic-natives-win32-arm64-msvc": "0.9.79-alpha.1",
441
- "@bastani/atomic-natives-win32-x64-msvc": "0.9.79-alpha.1"
434
+ "@bastani/atomic-natives-darwin-arm64": "0.9.79",
435
+ "@bastani/atomic-natives-darwin-x64": "0.9.79",
436
+ "@bastani/atomic-natives-linux-arm64-gnu": "0.9.79",
437
+ "@bastani/atomic-natives-linux-arm64-musl": "0.9.79",
438
+ "@bastani/atomic-natives-linux-x64-gnu": "0.9.79",
439
+ "@bastani/atomic-natives-linux-x64-musl": "0.9.79",
440
+ "@bastani/atomic-natives-win32-arm64-msvc": "0.9.79",
441
+ "@bastani/atomic-natives-win32-x64-msvc": "0.9.79"
442
442
  },
443
443
  "engines": {
444
444
  "bun": ">=1.4.2",
@@ -446,8 +446,8 @@
446
446
  }
447
447
  },
448
448
  "node_modules/@bastani/atomic-natives-darwin-arm64": {
449
- "version": "0.9.79-alpha.1",
450
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.79-alpha.1.tgz",
449
+ "version": "0.9.79",
450
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.79.tgz",
451
451
  "license": "MIT",
452
452
  "os": [
453
453
  "darwin"
@@ -458,8 +458,8 @@
458
458
  "optional": true
459
459
  },
460
460
  "node_modules/@bastani/atomic-natives-darwin-x64": {
461
- "version": "0.9.79-alpha.1",
462
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.79-alpha.1.tgz",
461
+ "version": "0.9.79",
462
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.79.tgz",
463
463
  "license": "MIT",
464
464
  "os": [
465
465
  "darwin"
@@ -470,8 +470,8 @@
470
470
  "optional": true
471
471
  },
472
472
  "node_modules/@bastani/atomic-natives-linux-arm64-gnu": {
473
- "version": "0.9.79-alpha.1",
474
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.79-alpha.1.tgz",
473
+ "version": "0.9.79",
474
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.79.tgz",
475
475
  "license": "MIT",
476
476
  "os": [
477
477
  "linux"
@@ -485,8 +485,8 @@
485
485
  "optional": true
486
486
  },
487
487
  "node_modules/@bastani/atomic-natives-linux-arm64-musl": {
488
- "version": "0.9.79-alpha.1",
489
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.79-alpha.1.tgz",
488
+ "version": "0.9.79",
489
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.79.tgz",
490
490
  "license": "MIT",
491
491
  "os": [
492
492
  "linux"
@@ -500,8 +500,8 @@
500
500
  "optional": true
501
501
  },
502
502
  "node_modules/@bastani/atomic-natives-linux-x64-gnu": {
503
- "version": "0.9.79-alpha.1",
504
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.79-alpha.1.tgz",
503
+ "version": "0.9.79",
504
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.79.tgz",
505
505
  "license": "MIT",
506
506
  "os": [
507
507
  "linux"
@@ -515,8 +515,8 @@
515
515
  "optional": true
516
516
  },
517
517
  "node_modules/@bastani/atomic-natives-linux-x64-musl": {
518
- "version": "0.9.79-alpha.1",
519
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.79-alpha.1.tgz",
518
+ "version": "0.9.79",
519
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.79.tgz",
520
520
  "license": "MIT",
521
521
  "os": [
522
522
  "linux"
@@ -530,8 +530,8 @@
530
530
  "optional": true
531
531
  },
532
532
  "node_modules/@bastani/atomic-natives-win32-arm64-msvc": {
533
- "version": "0.9.79-alpha.1",
534
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.79-alpha.1.tgz",
533
+ "version": "0.9.79",
534
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.79.tgz",
535
535
  "license": "MIT",
536
536
  "os": [
537
537
  "win32"
@@ -542,8 +542,8 @@
542
542
  "optional": true
543
543
  },
544
544
  "node_modules/@bastani/atomic-natives-win32-x64-msvc": {
545
- "version": "0.9.79-alpha.1",
546
- "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.79-alpha.1.tgz",
545
+ "version": "0.9.79",
546
+ "resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.79.tgz",
547
547
  "license": "MIT",
548
548
  "os": [
549
549
  "win32"
@@ -554,8 +554,8 @@
554
554
  "optional": true
555
555
  },
556
556
  "node_modules/@bastani/pi-ai": {
557
- "version": "0.9.79-alpha.1",
558
- "resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.79-alpha.1.tgz",
557
+ "version": "0.9.79",
558
+ "resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.79.tgz",
559
559
  "license": "MIT",
560
560
  "dependencies": {
561
561
  "@anthropic-ai/sdk": "0.129.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.9.79-alpha.1",
3
+ "version": "0.9.79",
4
4
  "description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "atomicConfig": {
@@ -89,8 +89,8 @@
89
89
  "prepublishOnly": "bun run clean && bun run build && bun run shrinkwrap"
90
90
  },
91
91
  "dependencies": {
92
- "@bastani/atomic-natives": "0.9.79-alpha.1",
93
- "@bastani/pi-ai": "0.9.79-alpha.1",
92
+ "@bastani/atomic-natives": "0.9.79",
93
+ "@bastani/pi-ai": "0.9.79",
94
94
  "@earendil-works/pi-agent-core": "1.5.2",
95
95
  "@earendil-works/pi-codemode": "1.5.2",
96
96
  "@earendil-works/pi-tui": "1.5.2",