@gajae-code/coding-agent 0.16.3 → 0.16.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 (277) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/dist/types/capability/types.d.ts +4 -0
  3. package/dist/types/cli/args.d.ts +2 -2
  4. package/dist/types/cli/customize-doctor.d.ts +22 -0
  5. package/dist/types/cli/root-flags.d.ts +4 -2
  6. package/dist/types/cli.d.ts +1 -1
  7. package/dist/types/commands/launch.d.ts +1 -1
  8. package/dist/types/config/autorouting-tier-map.d.ts +3 -0
  9. package/dist/types/config/file-lock.d.ts +31 -3
  10. package/dist/types/config/model-registry.d.ts +4 -0
  11. package/dist/types/config/model-resolver.d.ts +9 -0
  12. package/dist/types/config/settings-schema.d.ts +29 -1
  13. package/dist/types/coordinator-mcp/question-state.d.ts +7 -0
  14. package/dist/types/coordinator-mcp/server.d.ts +7 -0
  15. package/dist/types/discovery/claude-plugins.d.ts +3 -1
  16. package/dist/types/discovery/helpers.d.ts +35 -0
  17. package/dist/types/exec/bash-executor.d.ts +17 -1
  18. package/dist/types/exec/bash-shell-guardian.d.ts +15 -0
  19. package/dist/types/exec/bash-shell-runtime-entry.d.ts +2 -0
  20. package/dist/types/exec/bash-shell-signals.d.ts +2 -0
  21. package/dist/types/exec/bash-shell-supervisor-entry.d.ts +1 -0
  22. package/dist/types/exec/bash-shell-supervisor.d.ts +10 -0
  23. package/dist/types/exec/bash-shell-worker-entry.d.ts +2 -0
  24. package/dist/types/exec/bash-shell-worker-protocol.d.ts +63 -0
  25. package/dist/types/exec/bash-shell-worker.d.ts +1 -0
  26. package/dist/types/exec/isolated-shell.d.ts +19 -0
  27. package/dist/types/extensibility/extensions/function-hooks-internal.d.ts +9 -0
  28. package/dist/types/extensibility/extensions/function-hooks.d.ts +169 -0
  29. package/dist/types/extensibility/extensions/index.d.ts +1 -0
  30. package/dist/types/extensibility/extensions/runner.d.ts +46 -6
  31. package/dist/types/extensibility/extensions/types.d.ts +16 -0
  32. package/dist/types/extensibility/extensions/wrapper.d.ts +3 -1
  33. package/dist/types/extensibility/gjc-plugins/constrained-hooks.d.ts +35 -2
  34. package/dist/types/extensibility/gjc-plugins/mcp-policy.d.ts +16 -0
  35. package/dist/types/extensibility/gjc-plugins/paths.d.ts +2 -0
  36. package/dist/types/extensibility/gjc-plugins/types.d.ts +25 -0
  37. package/dist/types/extensibility/hooks/types.d.ts +4 -0
  38. package/dist/types/extensibility/runtime-skill-discovery.d.ts +5 -2
  39. package/dist/types/extensibility/shared-events.d.ts +1 -1
  40. package/dist/types/extensibility/skill-management.d.ts +9 -4
  41. package/dist/types/extensibility/skills.d.ts +2 -0
  42. package/dist/types/gjc-runtime/empty-delete-gc.d.ts +4 -1
  43. package/dist/types/gjc-runtime/linux-proc.d.ts +2 -0
  44. package/dist/types/gjc-runtime/session-state-lock.d.ts +14 -0
  45. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +41 -3
  46. package/dist/types/gjc-runtime/ultragoal-succession.d.ts +251 -0
  47. package/dist/types/modes/components/assistant-message.d.ts +1 -2
  48. package/dist/types/modes/components/bash-execution.d.ts +1 -0
  49. package/dist/types/modes/components/execution-shared.d.ts +1 -0
  50. package/dist/types/modes/components/settings-selector.d.ts +6 -1
  51. package/dist/types/modes/components/status-line/command.d.ts +35 -0
  52. package/dist/types/modes/components/status-line/index.d.ts +1 -0
  53. package/dist/types/modes/components/status-line/types.d.ts +5 -0
  54. package/dist/types/modes/components/tool-status-header.d.ts +14 -0
  55. package/dist/types/modes/controllers/event-controller.d.ts +6 -0
  56. package/dist/types/modes/interactive-mode.d.ts +3 -0
  57. package/dist/types/modes/types.d.ts +7 -0
  58. package/dist/types/runtime-mcp/client.d.ts +9 -1
  59. package/dist/types/runtime-mcp/manager.d.ts +7 -1
  60. package/dist/types/runtime-mcp/pool.d.ts +22 -3
  61. package/dist/types/runtime-mcp/transports/stdio.d.ts +0 -4
  62. package/dist/types/runtime-mcp/types.d.ts +22 -0
  63. package/dist/types/sdk/broker/ensure.d.ts +32 -0
  64. package/dist/types/sdk/broker/lifecycle-ledger.d.ts +0 -1
  65. package/dist/types/sdk/broker/lifecycle.d.ts +6 -0
  66. package/dist/types/sdk/broker/startup-failure.d.ts +4 -1
  67. package/dist/types/sdk/bus/chat-daemon-control.d.ts +2 -0
  68. package/dist/types/sdk/bus/chat-daemon-runtime.d.ts +12 -0
  69. package/dist/types/sdk/bus/chat-effect-journal.d.ts +17 -2
  70. package/dist/types/sdk/bus/conversation-store.d.ts +11 -0
  71. package/dist/types/sdk/bus/lifecycle-commands.d.ts +8 -8
  72. package/dist/types/sdk/bus/slack-daemon.d.ts +1 -1
  73. package/dist/types/sdk/bus/slack-live-provider.d.ts +6 -0
  74. package/dist/types/sdk/bus/slack-provider.d.ts +12 -0
  75. package/dist/types/sdk/bus/topic-registry.d.ts +8 -0
  76. package/dist/types/sdk/client/client.d.ts +6 -0
  77. package/dist/types/sdk/host/host.d.ts +3 -1
  78. package/dist/types/sdk/host/session-runtime.d.ts +26 -1
  79. package/dist/types/sdk/lifecycle/service.d.ts +1 -0
  80. package/dist/types/sdk/router/session-router.d.ts +10 -2
  81. package/dist/types/sdk/session-api-key.d.ts +26 -0
  82. package/dist/types/sdk/session.d.ts +5 -1
  83. package/dist/types/sdk/transport/serve-cli.d.ts +1 -1
  84. package/dist/types/session/agent-session.d.ts +11 -0
  85. package/dist/types/session/fallback-chain-controller.d.ts +15 -0
  86. package/dist/types/session/internal/managed-session-storage.d.ts +7 -0
  87. package/dist/types/session/messages.d.ts +1 -0
  88. package/dist/types/session/session-manager.d.ts +3 -1
  89. package/dist/types/setup/paseo/announce.d.ts +112 -0
  90. package/dist/types/setup/paseo/setup-deps.d.ts +2 -1
  91. package/dist/types/skill-state/canonical-skills.d.ts +4 -0
  92. package/dist/types/system-prompt.d.ts +10 -0
  93. package/dist/types/task/executor.d.ts +5 -1
  94. package/dist/types/tools/bash.d.ts +1 -0
  95. package/dist/types/tools/fetch.d.ts +7 -0
  96. package/dist/types/tools/github-cache.d.ts +2 -1
  97. package/dist/types/tools/index.d.ts +10 -0
  98. package/dist/types/tools/path-utils.d.ts +2 -0
  99. package/dist/types/tools/search.d.ts +6 -0
  100. package/package.json +9 -7
  101. package/scripts/capture-status-line-custom-editor-showcase.ts +151 -0
  102. package/scripts/generate-sdk-operation-inventory.ts +11 -0
  103. package/scripts/verify-status-line-custom-editor-showcase.ts +309 -0
  104. package/src/capability/index.ts +14 -2
  105. package/src/capability/types.ts +4 -0
  106. package/src/cli/args.ts +20 -9
  107. package/src/cli/customize-doctor.ts +155 -12
  108. package/src/cli/root-flags.ts +5 -3
  109. package/src/cli.ts +22 -0
  110. package/src/commands/sdk.ts +74 -31
  111. package/src/config/autorouting-tier-map.ts +1 -0
  112. package/src/config/file-lock-gc.ts +40 -2
  113. package/src/config/file-lock.ts +379 -31
  114. package/src/config/model-preset-registry.ts +120 -19
  115. package/src/config/model-profiles.ts +40 -0
  116. package/src/config/model-registry.ts +73 -23
  117. package/src/config/model-resolver.ts +48 -0
  118. package/src/config/settings-schema.ts +33 -1
  119. package/src/config/settings.ts +1 -0
  120. package/src/coordinator-mcp/question-state.ts +33 -2
  121. package/src/coordinator-mcp/server.ts +477 -101
  122. package/src/crash/sanitize.ts +1 -1
  123. package/src/defaults/gjc/extensions/grok-cli-vendor/src/models/catalog.ts +11 -11
  124. package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/register.ts +13 -2
  125. package/src/defaults/gjc/skills/ultragoal/SKILL.md +22 -0
  126. package/src/discovery/builtin.ts +52 -55
  127. package/src/discovery/claude-plugins.ts +12 -4
  128. package/src/discovery/helpers.ts +307 -34
  129. package/src/exec/bash-executor.ts +330 -50
  130. package/src/exec/bash-shell-guardian.ts +388 -0
  131. package/src/exec/bash-shell-runtime-entry.ts +5 -0
  132. package/src/exec/bash-shell-signals.ts +29 -0
  133. package/src/exec/bash-shell-supervisor-entry.ts +3 -0
  134. package/src/exec/bash-shell-supervisor.ts +359 -0
  135. package/src/exec/bash-shell-worker-entry.ts +5 -0
  136. package/src/exec/bash-shell-worker-protocol.ts +36 -0
  137. package/src/exec/bash-shell-worker.ts +116 -0
  138. package/src/exec/isolated-shell.ts +393 -0
  139. package/src/extensibility/extensions/function-hooks-internal.ts +73 -0
  140. package/src/extensibility/extensions/function-hooks.ts +959 -0
  141. package/src/extensibility/extensions/index.ts +22 -0
  142. package/src/extensibility/extensions/loader.ts +53 -2
  143. package/src/extensibility/extensions/runner.ts +895 -264
  144. package/src/extensibility/extensions/types.ts +42 -0
  145. package/src/extensibility/extensions/wrapper.ts +56 -15
  146. package/src/extensibility/gjc-plugins/compiler.ts +228 -60
  147. package/src/extensibility/gjc-plugins/constrained-hooks.ts +321 -23
  148. package/src/extensibility/gjc-plugins/installer.ts +13 -12
  149. package/src/extensibility/gjc-plugins/mcp-policy.ts +81 -52
  150. package/src/extensibility/gjc-plugins/paths.ts +13 -0
  151. package/src/extensibility/gjc-plugins/registry.ts +113 -1
  152. package/src/extensibility/gjc-plugins/runtime-adapters.ts +758 -16
  153. package/src/extensibility/gjc-plugins/runtime-quarantine.ts +20 -2
  154. package/src/extensibility/gjc-plugins/schema.ts +121 -4
  155. package/src/extensibility/gjc-plugins/types.ts +25 -0
  156. package/src/extensibility/hooks/loader.ts +133 -16
  157. package/src/extensibility/hooks/types.ts +28 -0
  158. package/src/extensibility/runtime-skill-discovery.ts +149 -190
  159. package/src/extensibility/shared-events.ts +1 -1
  160. package/src/extensibility/skill-management.ts +200 -52
  161. package/src/extensibility/skills.ts +73 -25
  162. package/src/gjc-runtime/empty-delete-gc.ts +94 -4
  163. package/src/gjc-runtime/gc-runtime.ts +29 -0
  164. package/src/gjc-runtime/linux-proc.ts +14 -0
  165. package/src/gjc-runtime/repository-binding.ts +1 -1
  166. package/src/gjc-runtime/session-state-lock.ts +143 -10
  167. package/src/gjc-runtime/session-state-sidecar.ts +27 -11
  168. package/src/gjc-runtime/state-writer.ts +30 -29
  169. package/src/gjc-runtime/ultragoal-runtime.ts +189 -47
  170. package/src/gjc-runtime/ultragoal-succession.ts +1667 -0
  171. package/src/gjc-runtime/workflow-manifest.generated.json +52 -1
  172. package/src/gjc-runtime/workflow-manifest.ts +16 -0
  173. package/src/harness-control-plane/session-lease.ts +2 -2
  174. package/src/internal-urls/docs-index.generated.ts +12 -12
  175. package/src/lsp/config.ts +10 -3
  176. package/src/lsp/index.ts +1 -1
  177. package/src/lsp/path-trust.ts +69 -14
  178. package/src/main.ts +78 -35
  179. package/src/modes/DESIGN.md +54 -0
  180. package/src/modes/acp/acp-agent.ts +16 -3
  181. package/src/modes/components/assistant-message.ts +22 -9
  182. package/src/modes/components/bash-execution.ts +4 -1
  183. package/src/modes/components/execution-shared.ts +4 -1
  184. package/src/modes/components/model-selector.ts +166 -33
  185. package/src/modes/components/session-observer-overlay.ts +1 -1
  186. package/src/modes/components/settings-selector.ts +1075 -235
  187. package/src/modes/components/status-line/command.ts +190 -0
  188. package/src/modes/components/status-line/index.ts +1 -0
  189. package/src/modes/components/status-line/segments.ts +32 -5
  190. package/src/modes/components/status-line/types.ts +5 -0
  191. package/src/modes/components/tool-status-header.ts +396 -22
  192. package/src/modes/controllers/command-controller.ts +3 -0
  193. package/src/modes/controllers/event-controller.ts +151 -7
  194. package/src/modes/controllers/extension-ui-controller.ts +1 -0
  195. package/src/modes/controllers/input-controller.ts +6 -3
  196. package/src/modes/controllers/selector-controller.ts +21 -0
  197. package/src/modes/interactive-mode.ts +53 -6
  198. package/src/modes/print-mode.ts +5 -1
  199. package/src/modes/prompt-action-autocomplete.ts +54 -27
  200. package/src/modes/runtime-init.ts +2 -0
  201. package/src/modes/types.ts +17 -3
  202. package/src/modes/utils/ui-helpers.ts +2 -0
  203. package/src/prompts/system/system-prompt.md +8 -0
  204. package/src/prompts/tools/search.md +2 -0
  205. package/src/prompts/tools/subagent.md +1 -0
  206. package/src/runtime-mcp/client.ts +60 -17
  207. package/src/runtime-mcp/manager.ts +189 -14
  208. package/src/runtime-mcp/pool.test.ts +218 -0
  209. package/src/runtime-mcp/pool.ts +224 -23
  210. package/src/runtime-mcp/transports/stdio.ts +158 -24
  211. package/src/runtime-mcp/types.ts +24 -0
  212. package/src/sdk/broker/broker.ts +124 -32
  213. package/src/sdk/broker/ensure.ts +248 -41
  214. package/src/sdk/broker/lifecycle-ledger.ts +7 -17
  215. package/src/sdk/broker/lifecycle.ts +56 -6
  216. package/src/sdk/broker/startup-failure.ts +15 -6
  217. package/src/sdk/bus/chat-daemon-control.ts +3 -1
  218. package/src/sdk/bus/chat-daemon-runtime.ts +72 -6
  219. package/src/sdk/bus/chat-effect-journal.ts +132 -7
  220. package/src/sdk/bus/conversation-store.ts +29 -0
  221. package/src/sdk/bus/lifecycle-commands.ts +17 -11
  222. package/src/sdk/bus/slack-conversation.ts +1 -0
  223. package/src/sdk/bus/slack-daemon.ts +478 -49
  224. package/src/sdk/bus/slack-live-provider.ts +12 -0
  225. package/src/sdk/bus/slack-provider.ts +5 -0
  226. package/src/sdk/bus/telegram-daemon.ts +16 -2
  227. package/src/sdk/bus/topic-registry.ts +19 -0
  228. package/src/sdk/cli/master-cli.ts +1 -1
  229. package/src/sdk/cli/session-cli.ts +11 -8
  230. package/src/sdk/client/client.ts +66 -17
  231. package/src/sdk/host/host.ts +29 -9
  232. package/src/sdk/host/query/revision-store.ts +19 -13
  233. package/src/sdk/host/reverse-leases.ts +7 -4
  234. package/src/sdk/host/session-runtime.test.ts +52 -10
  235. package/src/sdk/host/session-runtime.ts +383 -44
  236. package/src/sdk/lifecycle/service.ts +4 -0
  237. package/src/sdk/protocol/operation-inventory.generated.json +77 -0
  238. package/src/sdk/router/session-router.ts +89 -38
  239. package/src/sdk/session-api-key.ts +94 -0
  240. package/src/sdk/session.ts +228 -55
  241. package/src/sdk/transport/relay.ts +35 -13
  242. package/src/sdk/transport/serve-cli.ts +3 -3
  243. package/src/session/agent-session.ts +240 -90
  244. package/src/session/contribution-prep.ts +214 -21
  245. package/src/session/fallback-chain-controller.ts +38 -0
  246. package/src/session/internal/managed-session-storage.ts +19 -5
  247. package/src/session/messages.ts +5 -0
  248. package/src/session/session-manager.ts +29 -5
  249. package/src/session-import/redact.ts +5 -1
  250. package/src/setup/paseo/announce.ts +456 -0
  251. package/src/setup/paseo/setup-deps.ts +15 -3
  252. package/src/skill-state/canonical-skills.ts +12 -0
  253. package/src/skills/skills.test.ts +41 -21
  254. package/src/slash-commands/builtin-registry.ts +1 -0
  255. package/src/system-prompt.ts +29 -3
  256. package/src/task/executor.ts +7 -1
  257. package/src/task/index.ts +21 -4
  258. package/src/tools/bash.ts +63 -19
  259. package/src/tools/cron.ts +1 -1
  260. package/src/tools/fetch.ts +29 -1
  261. package/src/tools/gh.ts +26 -3
  262. package/src/tools/github-cache.ts +68 -16
  263. package/src/tools/index.ts +10 -0
  264. package/src/tools/job.ts +21 -4
  265. package/src/tools/monitor.ts +8 -2
  266. package/src/tools/path-utils.ts +7 -0
  267. package/src/tools/read.ts +14 -2
  268. package/src/tools/render-utils.ts +1 -3
  269. package/src/tools/resource-gc.ts +28 -8
  270. package/src/tools/search.ts +116 -58
  271. package/src/tools/skill-discovery.ts +5 -0
  272. package/src/tools/skill.ts +37 -2
  273. package/src/tools/subagent.ts +6 -3
  274. package/src/tools/tool-catalog.generated.ts +10 -3
  275. package/src/tools/ultragoal-ask-guard.ts +2 -2
  276. package/src/web/insane/bridge.ts +113 -23
  277. package/src/web/search/providers/perplexity.ts +102 -41
@@ -1,5 +1,5 @@
1
1
  import type { SkillsSettings } from "../config/settings-schema";
2
- import type { Skill } from "./skills";
2
+ import { type Skill } from "./skills";
3
3
  export type RuntimeSkillDiscoverySource = "project" | "user";
4
4
  export interface RuntimeSkillDiscoveryCandidate {
5
5
  name: string;
@@ -24,6 +24,9 @@ export interface RuntimeSkillDiscoveryResult {
24
24
  export interface DiscoverRuntimeSkillsOptions {
25
25
  cwd: string;
26
26
  home?: string;
27
+ agentDir?: string;
28
+ /** Resolver-owned profile classification; unlike path comparison, this survives HOME refreshes. */
29
+ profileAuthority?: "default" | "custom";
27
30
  query?: string;
28
31
  limit?: number;
29
32
  source?: RuntimeSkillDiscoverySource | "all";
@@ -38,4 +41,4 @@ export interface DiscoverRuntimeSkillsOptions {
38
41
  */
39
42
  export declare function describeDisabledSkillScopes(source: RuntimeSkillDiscoverySource | "all", policy: SkillsSettings | undefined): string | undefined;
40
43
  export declare function discoverRuntimeSkills(options: DiscoverRuntimeSkillsOptions): Promise<RuntimeSkillDiscoveryResult>;
41
- export declare function findRuntimeSkillByName(cwd: string, name: string, policy?: SkillsSettings, home?: string): Promise<Skill | undefined>;
44
+ export declare function findRuntimeSkillByName(cwd: string, name: string, policy?: SkillsSettings, home?: string, agentDir?: string, profileAuthority?: "default" | "custom"): Promise<Skill | undefined>;
@@ -152,7 +152,7 @@ export interface AgentEndEvent {
152
152
  sdkRunToken?: string;
153
153
  /** Indicates whether the loop ended normally, suspended, cancelled, or entered maintenance. */
154
154
  stopReason?: "completed" | "paused" | "cancelled" | "maintenance";
155
- /** Present for maintenance checkpoints; non-aborted checkpoints are not terminal. */
155
+ /** Present for maintenance checkpoints; only committed maintenance outcomes are non-terminal. */
156
156
  maintenanceOutcome?: MidRunMaintenanceOutcome;
157
157
  }
158
158
  /** Fired at the start of each turn */
@@ -32,6 +32,7 @@ export interface ConventionSkillImportSource {
32
32
  export interface WriteNativeSkillInput {
33
33
  cwd: string;
34
34
  home?: string;
35
+ agentDir?: string;
35
36
  scope: SkillScope;
36
37
  name: string;
37
38
  content: string;
@@ -61,13 +62,14 @@ export declare function getProjectSkillDirs(cwd: string, home: string): Promise<
61
62
  repoRoot: string | null;
62
63
  }>;
63
64
  /** Canonical user skill directories in precedence order (same resolution as runtime discovery). */
64
- export declare function getUserSkillDirs(home: string): string[];
65
+ export declare function getUserSkillDirs(home: string, agentDir?: string, profileAuthority?: "default" | "custom"): string[];
65
66
  /**
66
67
  * The canonical directory a write targets for a scope: the repo root (or `cwd`)
67
- * `.gjc/skills` for project scope, the canonical `<config>/agent/skills` user
68
- * root for user scope (honoring `GJC_CONFIG_DIR` / `PI_CONFIG_DIR`).
68
+ * `.gjc/skills` for project scope, the agent directory's `skills` root for user
69
+ * scope — the same directory every reader scans first (`gjc config path` prints
70
+ * it; `--agent-dir` / `GJC_CODING_AGENT_DIR` / `setAgentDir()` move it).
69
71
  */
70
- export declare function resolveNativeSkillScopeDir(cwd: string, scope: SkillScope, home?: string): Promise<string>;
72
+ export declare function resolveNativeSkillScopeDir(cwd: string, scope: SkillScope, _home?: string, agentDir?: string): Promise<string>;
71
73
  /**
72
74
  * Authoritative discovery of native skills with provenance and enablement
73
75
  * state. Unlike runtime session discovery, this lists every scanned skill —
@@ -77,6 +79,9 @@ export declare function resolveNativeSkillScopeDir(cwd: string, scope: SkillScop
77
79
  export declare function listNativeSkillsForManagement(options: {
78
80
  cwd: string;
79
81
  home?: string;
82
+ agentDir?: string;
83
+ /** Resolver-owned profile classification; unlike path comparison, this survives HOME refreshes. */
84
+ profileAuthority?: "default" | "custom";
80
85
  policy?: SkillManagementPolicy;
81
86
  }): Promise<ManagedSkillRecord[]>;
82
87
  /**
@@ -57,6 +57,8 @@ export interface LoadSkillsOptions extends SkillsSettings {
57
57
  home?: string;
58
58
  /** Explicit user agent directory for native user-scope skill discovery. */
59
59
  agentDir?: string;
60
+ /** Resolver-owned classification for the selected agent directory. */
61
+ profileAuthority?: "default" | "custom";
60
62
  }
61
63
  /**
62
64
  * Load skills from all configured locations.
@@ -13,7 +13,7 @@ export interface EmptyDeleteIdentity {
13
13
  mtimeNs: bigint;
14
14
  parentDev: bigint;
15
15
  parentIno: bigint;
16
- sha256: string;
16
+ sha256?: string;
17
17
  }
18
18
  export interface EmptyDeleteGcRecord {
19
19
  root: string;
@@ -44,11 +44,14 @@ export interface EmptyDeleteGcReport {
44
44
  export interface EmptyDeleteGcOptions {
45
45
  roots: string[];
46
46
  prune: boolean;
47
+ /** Disk artifact GC must not remove unrelated file receipts. */
48
+ artifactRootsOnly?: boolean;
47
49
  }
48
50
  export interface EmptyDeleteGcDependencies {
49
51
  /** Internal seam for deterministic collect-to-prune race tests. */
50
52
  collect?: (root: string) => Promise<EmptyDeleteGcRecord[]>;
51
53
  exactUnlinkDirect?: typeof exactUnlinkDirect;
54
+ rmdir?: (directory: string) => Promise<void>;
52
55
  }
53
56
  export declare function collectEmptyDeleteReceipts(root: string, deps?: {
54
57
  lstat?: (file: string, options: {
@@ -26,6 +26,8 @@ export declare function parseLinuxProcStartTime(stat: string | null | undefined)
26
26
  export declare function parseLinuxProcTtyDevice(stat: string | null | undefined): string | null;
27
27
  /** Parse field 3 (single-letter process state) from a `/proc/<pid>/stat` record. */
28
28
  export declare function parseLinuxProcState(stat: string | null | undefined): string | null;
29
+ /** Parse field 4 (`ppid`) from a `/proc/<pid>/stat` record. */
30
+ export declare function parseLinuxProcParentPid(stat: string | null | undefined): number | null;
29
31
  export declare function probeLinuxProcPidSync(pid: number): LinuxProcPidProbeResult;
30
32
  export declare function probeLinuxProcPid(pid: number): Promise<LinuxProcPidProbeResult>;
31
33
  /**
@@ -83,6 +83,8 @@ export declare const SessionStateLockTestHooks: {
83
83
  forcedQuarantineName?: string;
84
84
  /** @internal Observes bounded acquisition retries without changing their timing. */
85
85
  afterAcquireContention?: (lockFile: string, attempt: number, elapsedMs: number) => void;
86
+ /** @internal Observes process-local admission without altering on-disk ownership. */
87
+ afterLocalTransitionQueued?: (transitionDir: string) => void;
86
88
  /** @internal Runs after transition mkdir contention and before stale-claim inspection. */
87
89
  afterTransitionClaimContention?: (transitionDir: string) => void | Promise<void>;
88
90
  };
@@ -168,4 +170,16 @@ export declare function reclaimStaleSessionStateLock(lockFile: string, quarantin
168
170
  * lock file itself and may run for as long as it needs.
169
171
  */
170
172
  export declare function withSessionStateFileLock<T>(stateFile: string, operation: () => Promise<T>): Promise<T>;
173
+ /**
174
+ * Try one admission without joining a live owner's queue or backing off on contention.
175
+ * A stale reclaim may return `acquired: false` after making the next attempt possible.
176
+ * Once admitted, the operation and identity-safe release use the normal lock protocol;
177
+ * their failures propagate rather than being reported as contention.
178
+ */
179
+ export declare function tryWithSessionStateFileLock<T>(stateFile: string, operation: () => Promise<T>): Promise<{
180
+ acquired: true;
181
+ value: T;
182
+ } | {
183
+ acquired: false;
184
+ }>;
171
185
  export {};
@@ -208,7 +208,36 @@ export declare function recordUltragoalNudgeIfBudgetRemaining(input: {
208
208
  reason: string;
209
209
  currentGoalObjective?: string;
210
210
  }): Promise<UltragoalNudgeOutcome>;
211
- export declare function writePlan(cwd: string, plan: UltragoalPlan, sessionId?: string | null): Promise<void>;
211
+ export declare function writePlan(cwd: string, plan: UltragoalPlan, sessionId?: string | null,
212
+ /** Set by callers already inside {@link withUltragoalPlanOwnership} for this plan. */
213
+ options?: {
214
+ lockHeld?: boolean;
215
+ }): Promise<void>;
216
+ /**
217
+ * The single exclusion that decides who owns an Ultragoal run (#5353).
218
+ *
219
+ * Establishing ownership is a read-decide-write sequence, not a write: a start
220
+ * reads the plan, checks the outgoing succession fence, then commits `active`.
221
+ * Checking quiescence at a point in time and writing afterwards is not enough —
222
+ * an offer can observe `pending` in the window between an in-flight start's
223
+ * check and its commit, and both runs then believe they own the goal.
224
+ *
225
+ * Every caller that decides ownership — source admission (`start`/`checkpoint`),
226
+ * succession offer/fence issuance, and successor publication — runs its whole
227
+ * decision inside this lock, keyed on the plan it is deciding about, and
228
+ * re-reads the plan under it. Writers inside pass `lockHeld` because
229
+ * `withFileLock` intentionally serializes same-process callers as well.
230
+ *
231
+ * Lock ordering: this lock is always taken BEFORE any ledger lock. The existing
232
+ * ledger-scoped critical sections (nudge budget, critic verdict, critic gate
233
+ * override) never write the plan, so no cycle exists.
234
+ */
235
+ export declare function withUltragoalPlanOwnership<T>(cwd: string, sessionId: string, fn: () => Promise<T>): Promise<T>;
236
+ /**
237
+ * Resolve the session whose plan ownership is being decided, without changing
238
+ * the resolution behaviour callers already depend on.
239
+ */
240
+ export declare function resolveUltragoalOwnershipSession(cwd: string, sessionId?: string | null): Promise<string>;
212
241
  export declare function nonEmptyString(value: unknown): string | null;
213
242
  export declare function stringArray(value: unknown): string[] | null;
214
243
  export declare function readUltragoalPlan(cwd: string, sessionId?: string | null): Promise<UltragoalPlan | null>;
@@ -324,13 +353,22 @@ export declare function validateUltragoalQualityGateReadOnly(input: {
324
353
  valid: boolean;
325
354
  errors: readonly UltragoalQualityGateDiagnostic[];
326
355
  }>;
327
- export declare function checkpointUltragoalGoal(input: {
356
+ export interface UltragoalCheckpointInput {
328
357
  cwd: string;
329
358
  goalId: string;
330
359
  status: UltragoalGoalStatus;
331
360
  evidence: string;
332
361
  qualityGateJson?: string;
333
- }): Promise<UltragoalPlan>;
362
+ }
363
+ /**
364
+ * Checkpointing shares its plan with a succession offer, but only its *commit*
365
+ * is fenced against one (#5353). Completion validation must observe the same
366
+ * repository basis `quality-gate source-hash` did, and the ownership lock's own
367
+ * on-disk artifact lives under `.gjc/` — a path repositories are not required to
368
+ * ignore — so capturing the basis while holding it would make the runtime digest
369
+ * disagree with the gate the caller was told to produce.
370
+ */
371
+ export declare function checkpointUltragoalGoal(input: UltragoalCheckpointInput): Promise<UltragoalPlan>;
334
372
  export interface UltragoalCheckpointContinuation {
335
373
  plan: UltragoalPlan;
336
374
  checkpointedGoal: UltragoalGoal;
@@ -0,0 +1,251 @@
1
+ import { type RepositoryBinding } from "./repository-binding";
2
+ import { type UltragoalCommandResult, type UltragoalGjcGoalMode, type UltragoalGoalStatus, type UltragoalPlan } from "./ultragoal-runtime";
3
+ export declare const ULTRAGOAL_SUCCESSION_OPERATION_SCHEMA: "gjc.ultragoal_succession_operation.v1";
4
+ export declare const ULTRAGOAL_SUCCESSION_OFFER_SCHEMA: "gjc.ultragoal_succession_offer.v1";
5
+ export declare const ULTRAGOAL_SUCCESSION_FENCE_SCHEMA: "gjc.ultragoal_succession_fence.v1";
6
+ export declare const ULTRAGOAL_SUCCESSION_ADOPTION_SCHEMA: "gjc.ultragoal_succession_adoption.v1";
7
+ export declare const ULTRAGOAL_SUCCESSION_CLAIM_SCHEMA: "gjc.ultragoal_succession_claim.v1";
8
+ export declare const SUCCESSION_ADOPTED_EVENT: "succession_adopted";
9
+ export type UltragoalSuccessionErrorCode = "source_plan_missing" | "source_not_quiescent" | "invalid_selection" | "unsafe_target" | "authorization_required" | "divergent_operation" | "goal_handed_off" | "adoption_unpublished" | "publication_conflict" | "published_plan_missing" | "fence_missing" | "fence_mismatch" | "source_changed" | "offer_untrusted" | "offer_path_escape" | "target_mismatch" | "target_occupied" | "duplicate_adoption";
10
+ export declare class UltragoalSuccessionError extends Error {
11
+ readonly code: UltragoalSuccessionErrorCode;
12
+ constructor(code: UltragoalSuccessionErrorCode, message: string);
13
+ }
14
+ export interface UltragoalSuccessionArtifactDigests {
15
+ briefSha256: string;
16
+ goalsSha256: string;
17
+ ledgerSha256: string;
18
+ }
19
+ export interface UltragoalSuccessionCarriedGoal {
20
+ sourceGoalId: string;
21
+ title: string;
22
+ /** The source objective, verbatim. Never a summary. */
23
+ objective: string;
24
+ /** Historical provenance only; never a receipt. */
25
+ sourceStatusAtOffer: UltragoalGoalStatus;
26
+ unresolvedObligations: string[];
27
+ /**
28
+ * Source dependency groups this goal belonged to, carried as an obligation
29
+ * with explicit id mapping. The group's *metadata* (batch hashes, receipts)
30
+ * is deliberately not carried — that would be inherited validation authority.
31
+ * What is carried is the requirement that these goals be validated together.
32
+ */
33
+ dependencyGroups: UltragoalSuccessionDependencyGroup[];
34
+ }
35
+ export type UltragoalSuccessionDependencyGroupKind = "validation-batch" | "review-blocker";
36
+ export interface UltragoalSuccessionDependencyGroup {
37
+ kind: UltragoalSuccessionDependencyGroupKind;
38
+ groupId: string;
39
+ memberSourceGoalIds: string[];
40
+ /** For validation batches: the source goal that closed the batch. */
41
+ finalSourceGoalId?: string;
42
+ }
43
+ /**
44
+ * Per-selected-goal snapshot of exactly what was offered.
45
+ *
46
+ * Admission compares *this*, not whole-file equality. The fence deliberately
47
+ * leaves unselected goals schedulable, so ordinary source progress moves
48
+ * `goals.json`/`ledger.jsonl` bytes; requiring whole-file equality would
49
+ * permanently strand the selected work through drift that never touched it
50
+ * (issue #5353 review item 3). Whole-file digests remain recorded as provenance
51
+ * and any observed drift is written into the adoption record.
52
+ */
53
+ export interface UltragoalSuccessionSelectionSnapshot {
54
+ /** The brief carries global constraints, so it must not change. */
55
+ briefSha256: string;
56
+ goals: Array<{
57
+ sourceGoalId: string;
58
+ recordSha256: string;
59
+ obligationsSha256: string;
60
+ }>;
61
+ snapshotSha256: string;
62
+ }
63
+ export interface UltragoalSuccessionOffer {
64
+ schema: typeof ULTRAGOAL_SUCCESSION_OFFER_SCHEMA;
65
+ operationId: string;
66
+ createdAt: string;
67
+ source: {
68
+ sessionId: string;
69
+ repository: RepositoryBinding;
70
+ /** Whole-file digests at offer time. Provenance; not the admission test. */
71
+ artifacts: UltragoalSuccessionArtifactDigests;
72
+ /** The authoritative admission test for "did the offered work change". */
73
+ selectionSnapshot: UltragoalSuccessionSelectionSnapshot;
74
+ gjcGoalMode: UltragoalGjcGoalMode;
75
+ };
76
+ target: {
77
+ repository: RepositoryBinding;
78
+ };
79
+ selection: {
80
+ goalIds: string[];
81
+ };
82
+ carryover: {
83
+ /** The source brief, verbatim. */
84
+ brief: string;
85
+ goals: UltragoalSuccessionCarriedGoal[];
86
+ };
87
+ authorization: {
88
+ statement: string;
89
+ authorizedBy: string;
90
+ };
91
+ provenanceNotice: string;
92
+ }
93
+ export interface UltragoalSuccessionFence {
94
+ schema: typeof ULTRAGOAL_SUCCESSION_FENCE_SCHEMA;
95
+ operationId: string;
96
+ createdAt: string;
97
+ sourceSessionId: string;
98
+ sourceRepository: RepositoryBinding;
99
+ targetRepository: RepositoryBinding;
100
+ selectedGoalIds: string[];
101
+ sourceArtifacts: UltragoalSuccessionArtifactDigests;
102
+ offerPath: string;
103
+ offerSha256: string;
104
+ }
105
+ export interface UltragoalSuccessionGoalMapping {
106
+ sourceGoalId: string;
107
+ targetGoalId: string;
108
+ }
109
+ export interface UltragoalSuccessionAdoption {
110
+ schema: typeof ULTRAGOAL_SUCCESSION_ADOPTION_SCHEMA;
111
+ operationId: string;
112
+ status: "pending" | "published";
113
+ claimedAt: string;
114
+ publishedAt?: string;
115
+ targetSessionId: string;
116
+ targetRepository: RepositoryBinding;
117
+ source: {
118
+ sessionId: string;
119
+ repository: RepositoryBinding;
120
+ artifacts: UltragoalSuccessionArtifactDigests;
121
+ /** Whole-file digests observed at adoption; may differ from the offer. */
122
+ artifactsAtAdoption: UltragoalSuccessionArtifactDigests;
123
+ /** Whole-file drift on goals the offer did not select, recorded honestly. */
124
+ unselectedDrift: string[];
125
+ verifiedAt: string;
126
+ };
127
+ goalMap: UltragoalSuccessionGoalMapping[];
128
+ /**
129
+ * Content digest of the plan this operation is entitled to publish, recorded
130
+ * before publication. A pending replay may only proceed when the target plan
131
+ * is absent or matches this exactly; anything else is someone else's work.
132
+ */
133
+ expectedPlanDigest: string;
134
+ /** Pinned so the published plan is a deterministic function of the claim. */
135
+ plannedAt: string;
136
+ offerPath: string;
137
+ offerSha256: string;
138
+ fencePath: string;
139
+ claimPath: string;
140
+ authorization: {
141
+ statement: string;
142
+ authorizedBy: string;
143
+ };
144
+ provenanceNotice: string;
145
+ }
146
+ /**
147
+ * Repository-wide adoption claim.
148
+ *
149
+ * The session-scoped adoption record cannot be the exclusion primitive: two
150
+ * simultaneous sessions in one repository each create their own file and both
151
+ * win. This claim is a single O_EXCL file per operation for the whole
152
+ * repository, so exclusion is atomic rather than scan-then-write.
153
+ */
154
+ export interface UltragoalSuccessionRepositoryClaim {
155
+ schema: typeof ULTRAGOAL_SUCCESSION_CLAIM_SCHEMA;
156
+ operationId: string;
157
+ targetSessionId: string;
158
+ targetWorktreeRoot: string;
159
+ targetCommonDir: string | null;
160
+ claimedAt: string;
161
+ }
162
+ export declare function ultragoalSuccessionDir(cwd: string, sessionId: string): string;
163
+ export declare function ultragoalSuccessionFencePath(cwd: string, sessionId: string): string;
164
+ export declare function ultragoalSuccessionAdoptionPath(cwd: string, sessionId: string): string;
165
+ export declare function ultragoalSuccessionOfferPath(cwd: string, sessionId: string, operationId: string): string;
166
+ /**
167
+ * Repository-wide (deliberately NOT session-scoped) adoption claim.
168
+ *
169
+ * Session directories cannot express "this repository has already adopted this
170
+ * operation", so the exclusion primitive lives beside them under the shared
171
+ * ultragoal root that `getUltragoalPaths` already uses for session-less state.
172
+ */
173
+ export declare function ultragoalSuccessionClaimPath(cwd: string, operationId: string): string;
174
+ /** Read the durable outgoing ownership fence for a source session, if any. */
175
+ export declare function readUltragoalSuccessionFence(cwd: string, sessionId: string): Promise<UltragoalSuccessionFence | null>;
176
+ /** Read the durable adoption claim for a target session, if any. */
177
+ export declare function readUltragoalSuccessionAdoption(cwd: string, sessionId: string): Promise<UltragoalSuccessionAdoption | null>;
178
+ /**
179
+ * Source admission guard: a goal that has been handed off to a successor run is
180
+ * no longer this run's to schedule or checkpoint.
181
+ *
182
+ * Goals outside the fenced selection stay fully schedulable — the fence defines
183
+ * one owner per goal, not a freeze of the whole source run.
184
+ */
185
+ export declare function assertUltragoalGoalNotFenced(cwd: string, sessionId: string | null | undefined, goalId: string): Promise<void>;
186
+ /**
187
+ * Target admission guard: an adoption that has not finished publishing does not
188
+ * yet own anything.
189
+ *
190
+ * Publication writes `goals.json` before it marks the claim published, so a
191
+ * crash leaves a *visible plan with an unpublished claim*. A visible plan is not
192
+ * admission evidence — the claim is. Without this, the target executes goals
193
+ * whose adoption was never completed, and the run's own completion receipts
194
+ * would rest on a transaction that never committed.
195
+ *
196
+ * Callers must invoke this before any mutation so a refusal leaves `goals.json`
197
+ * and `ledger.jsonl` untouched.
198
+ */
199
+ export declare function assertUltragoalAdoptionPublished(cwd: string, sessionId: string | null | undefined): Promise<void>;
200
+ export interface UltragoalSuccessionOfferInput {
201
+ cwd: string;
202
+ sessionId?: string | null;
203
+ targetRepositoryPath: string;
204
+ goalIds: readonly string[];
205
+ authorization: string;
206
+ authorizedBy: string;
207
+ }
208
+ export interface UltragoalSuccessionOfferResult {
209
+ operationId: string;
210
+ offerPath: string;
211
+ fencePath: string;
212
+ offer: UltragoalSuccessionOffer;
213
+ /** True when an identical prior operation was reconciled instead of re-recorded. */
214
+ reconciled: boolean;
215
+ }
216
+ /**
217
+ * Record an explicit successor offer and fence the selected goals off from the
218
+ * source run. Writes nothing to the source brief, goals or ledger.
219
+ */
220
+ export declare function offerUltragoalSuccession(input: UltragoalSuccessionOfferInput): Promise<UltragoalSuccessionOfferResult>;
221
+ export interface UltragoalSuccessionAdoptInput {
222
+ cwd: string;
223
+ sessionId?: string | null;
224
+ offerPath: string;
225
+ gjcGoalMode?: UltragoalGjcGoalMode;
226
+ }
227
+ export interface UltragoalSuccessionAdoptResult {
228
+ operationId: string;
229
+ adoptionPath: string;
230
+ plan: UltragoalPlan;
231
+ goalMap: UltragoalSuccessionGoalMapping[];
232
+ reconciled: boolean;
233
+ }
234
+ /**
235
+ * Adopt an explicit successor offer into this repository/session.
236
+ *
237
+ * Fails closed on a forged or stale offer, a changed source, a missing source
238
+ * fence, an unnamed target, an occupied target, and any duplicate or divergent
239
+ * adoption anywhere in this repository. A retry reconciles the exact recorded
240
+ * operation or fails closed; it never resumes a different one.
241
+ */
242
+ export declare function adoptUltragoalSuccession(input: UltragoalSuccessionAdoptInput): Promise<UltragoalSuccessionAdoptResult>;
243
+ /**
244
+ * `gjc ultragoal succession <offer|adopt|status>`.
245
+ *
246
+ * Kept out of `RECONCILE_COMMANDS` on purpose: the reconcile pass appends a
247
+ * `reconcile_failed` ledger row on failure, which would move the very source
248
+ * digests this feature records. The target's workflow state and HUD reconcile on
249
+ * the next ordinary `gjc ultragoal status`.
250
+ */
251
+ export declare function runUltragoalSuccessionCommand(args: readonly string[], cwd: string): Promise<UltragoalCommandResult>;
@@ -10,10 +10,9 @@ interface AssistantMessageUpdateOptions {
10
10
  export declare class AssistantMessageComponent extends Container {
11
11
  #private;
12
12
  private hideThinkingBlock;
13
- private readonly onImageUpdate?;
14
13
  private readonly onVisibleMutation?;
15
14
  private readonly hintSession?;
16
- constructor(message?: AssistantMessage, hideThinkingBlock?: boolean, onImageUpdate?: (() => void) | undefined, viewportAnchorId?: string, onVisibleMutation?: (() => void) | undefined, hintSession?: ProviderSafetyStopHintSession | undefined);
15
+ constructor(message?: AssistantMessage, hideThinkingBlock?: boolean, onImageUpdate?: () => void, viewportAnchorId?: string, onVisibleMutation?: (() => void) | undefined, hintSession?: ProviderSafetyStopHintSession | undefined);
17
16
  invalidate(): void;
18
17
  setHideThinkingBlock(hide: boolean): void;
19
18
  setToolResultImages(toolCallId: string, images: ImageContent[]): void;
@@ -15,6 +15,7 @@ export declare class BashExecutionComponent extends Container {
15
15
  appendOutput(chunk: string): void;
16
16
  setComplete(exitCode: number | undefined, cancelled: boolean, options?: {
17
17
  output?: string;
18
+ signal?: string;
18
19
  truncation?: TruncationMeta;
19
20
  }): void;
20
21
  render(width: number): string[];
@@ -34,6 +34,7 @@ export declare function createCollapsedPreview(previewText: string, previewLines
34
34
  export declare function buildStatusFooter(opts: {
35
35
  status: ExecutionStatus;
36
36
  exitCode: number | undefined;
37
+ signal?: string;
37
38
  truncation: TruncationMeta | undefined;
38
39
  hiddenLineCount: number;
39
40
  /** Suppress the "… N more lines" hint (used when sixel passthrough renders the full output). */
@@ -5,7 +5,7 @@ import { type SettingPath } from "../../config/settings";
5
5
  import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../config/settings-schema";
6
6
  import type { GjcRuntimeSnapshotProvider } from "../../extensibility/gjc-plugins/runtime-quarantine";
7
7
  import { type NotificationsEditorOperations } from "./notifications-settings-editor";
8
- import type { StatusLineSegmentOptions } from "./tool-status-header";
8
+ import type { StatusLinePreviewParts, StatusLineSegmentOptions } from "./tool-status-header";
9
9
  /**
10
10
  * Dynamic context for settings that need runtime data.
11
11
  * Some settings (like thinking level) are managed by the session, not Settings.
@@ -42,6 +42,7 @@ export interface StatusLinePreviewSettings {
42
42
  separator?: StatusLineSeparatorStyle;
43
43
  segmentOptions?: StatusLineSegmentOptions;
44
44
  previewHighlightSegment?: StatusLineSegmentId;
45
+ previewHighlightStyle?: "focus" | "selected";
45
46
  sessionAccent?: boolean;
46
47
  maxRows?: number;
47
48
  }
@@ -70,6 +71,10 @@ export interface SettingsCallbacks {
70
71
  onStatusLinePreview?: (settings: StatusLinePreviewSettings) => void;
71
72
  /** Get current rendered status line for inline preview */
72
73
  getStatusLinePreview?: (width?: number) => string;
74
+ /** Render a status-line preview for supplied draft settings without mutating the live status line. */
75
+ getStatusLinePreviewForSettings?: (settings: StatusLinePreviewSettings, width?: number) => string;
76
+ /** Render status-line segment groups for supplied draft settings without mutating the live status line. */
77
+ getStatusLinePreviewPartsForSettings?: (settings: StatusLinePreviewSettings, width?: number) => StatusLinePreviewParts;
73
78
  /** Called when plugins change */
74
79
  onPluginsChanged?: () => void;
75
80
  /** Called when asynchronously rebuilt settings content needs a repaint. */
@@ -0,0 +1,35 @@
1
+ export declare const STATUS_LINE_COMMAND_DEFAULT_MAX_LENGTH = 80;
2
+ export declare const STATUS_LINE_COMMAND_MAX_LENGTH = 256;
3
+ export interface StatusLineCommandOptions {
4
+ command?: string;
5
+ timeoutMs?: number;
6
+ refreshMs?: number;
7
+ maxLength?: number;
8
+ }
9
+ export interface ResolvedStatusLineCommandOptions {
10
+ command: string;
11
+ timeoutMs: number;
12
+ refreshMs: number;
13
+ maxLength: number;
14
+ }
15
+ export interface StatusLineCommandResult {
16
+ stdout: string;
17
+ stderr: string;
18
+ exitCode: number;
19
+ timedOut: boolean;
20
+ outputTruncated: boolean;
21
+ }
22
+ export declare function normalizeStatusLineCommandOptions(value: unknown): ResolvedStatusLineCommandOptions;
23
+ /**
24
+ * Run a configured status-line command without making the synchronous render
25
+ * path wait on it. The streams are drained with a hard byte cap and the whole
26
+ * process group is killed when the timeout expires.
27
+ */
28
+ export declare function runStatusLineCommand(command: string, options: {
29
+ cwd: string;
30
+ shell: string;
31
+ shellArgs: readonly string[];
32
+ env: Record<string, string>;
33
+ timeoutMs: number;
34
+ signal?: AbortSignal;
35
+ }): Promise<StatusLineCommandResult>;
@@ -1,3 +1,4 @@
1
+ export * from "./command";
1
2
  export * from "./presets";
2
3
  export * from "./segments";
3
4
  export * from "./separators";
@@ -57,6 +57,11 @@ export interface SegmentContext {
57
57
  resetUnit?: "m" | "h";
58
58
  }>;
59
59
  } | null;
60
+ command?: {
61
+ output: string | null;
62
+ failed: boolean;
63
+ pending: boolean;
64
+ };
60
65
  }
61
66
  export interface RenderedSegment {
62
67
  content: string;
@@ -5,6 +5,8 @@ import type { AgentSession } from "../../session/agent-session";
5
5
  import { type SkillActiveEntry } from "../../skill-state/active-state";
6
6
  import type { ActionRegistry, FocusDomain } from "../action-registry";
7
7
  import { type JobsSnapshot } from "../jobs-observer";
8
+ import { type StatusLineCommandOptions } from "./status-line/command";
9
+ import type { SeparatorDef } from "./status-line/types";
8
10
  export interface StatusLineSegmentOptions {
9
11
  model?: {
10
12
  showThinkingLevel?: boolean;
@@ -28,6 +30,7 @@ export interface StatusLineSegmentOptions {
28
30
  usage?: {
29
31
  mode?: "used" | "remaining";
30
32
  };
33
+ command?: StatusLineCommandOptions;
31
34
  }
32
35
  export interface StatusLineSettings {
33
36
  preset?: StatusLinePreset;
@@ -36,6 +39,7 @@ export interface StatusLineSettings {
36
39
  separator?: StatusLineSeparatorStyle;
37
40
  segmentOptions?: StatusLineSegmentOptions;
38
41
  previewHighlightSegment?: StatusLineSegmentId;
42
+ previewHighlightStyle?: "focus" | "selected";
39
43
  showHookStatus?: boolean;
40
44
  showSkillHud?: boolean;
41
45
  showActionHints?: boolean;
@@ -48,11 +52,19 @@ export interface StatusLineComponentOptions {
48
52
  getKeybindings?: () => KeybindingsManager;
49
53
  focusDomain?: FocusDomain;
50
54
  keyDisplayContext?: KeyDisplayContext;
55
+ onUpdate?: () => void;
51
56
  }
52
57
  export interface StatusLineActionHint {
53
58
  id: AppKeybinding;
54
59
  content: string;
55
60
  }
61
+ export interface StatusLinePreviewParts {
62
+ left: string[];
63
+ leftIds: StatusLineSegmentId[];
64
+ right: string[];
65
+ rightIds: (StatusLineSegmentId | null)[];
66
+ separator: SeparatorDef;
67
+ }
56
68
  /**
57
69
  * Produces whole, bound action hints for the current focus domain. The registry
58
70
  * remains the authority for availability; KEYBINDINGS remains the authority for
@@ -100,6 +112,8 @@ export declare class StatusLineComponent implements Component {
100
112
  * everything fits on one row.
101
113
  */
102
114
  getPreviewContent(width: number): string;
115
+ getPreviewContentForSettings(width: number, previewSettings: StatusLineSettings): string;
116
+ getPreviewPartsForSettings(width: number, previewSettings: StatusLineSettings): StatusLinePreviewParts;
103
117
  getCacheStatsForTest(): {
104
118
  rowHits: number;
105
119
  rowMisses: number;
@@ -14,6 +14,12 @@ export declare class EventController {
14
14
  private ctx;
15
15
  constructor(ctx: InteractiveModeContext);
16
16
  dispose(): void;
17
+ /** Temporary TUI stop discards scheduling, not historical assistant callback lifetimes. */
18
+ suspendAssistantTextPresentation(): void;
19
+ /** Rearm before the first restarted frame, even without a new provider event. */
20
+ resumeAssistantTextPresentation(): void;
21
+ /** Session/transcript replacement invalidates callbacks before removing old children. */
22
+ resetAssistantTextPresentation(): void;
17
23
  subscribeToAgent(): void;
18
24
  handleEvent(event: AgentSessionEvent): Promise<void>;
19
25
  clearIrcExpiryTimers(): void;
@@ -198,6 +198,8 @@ export declare class InteractiveMode implements InteractiveModeContext {
198
198
  beginOAuthUrlForCopy(url: string): () => void;
199
199
  hasOAuthUrlForCopy(): boolean;
200
200
  copyOAuthUrl(): Promise<void>;
201
+ /** Clear the status display without settling the foreground run during maintenance/retry. */
202
+ clearLoadingAnimation(): void;
201
203
  syncActivityIndicator(): void;
202
204
  ensureLoadingAnimation(): void;
203
205
  stopLoadingAnimation(options?: ActivityIndicatorStopOptions): void;
@@ -213,6 +215,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
213
215
  }): Promise<void>;
214
216
  flushPendingBashComponents(): void;
215
217
  isKnownSlashCommand(text: string): boolean;
218
+ resetAssistantTextPresentation(): void;
216
219
  /** Advances the sticky-viewport source only for semantic transcript output. */
217
220
  recordVisibleTranscriptMutation(): void;
218
221
  addMessageToChat(message: AgentMessage, options?: {