@gajae-code/coding-agent 0.19.4-nightly.20261103080408.42367091106.gd4ecb353a215 → 0.20.0

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 (219) hide show
  1. package/CHANGELOG.md +157 -0
  2. package/dist/types/cli/plugin-cli.d.ts +13 -0
  3. package/dist/types/cli/public-command-errors.d.ts +7 -0
  4. package/dist/types/config/autorouting-tier-map.d.ts +0 -24
  5. package/dist/types/config/model-preset-registry.d.ts +1 -0
  6. package/dist/types/config/model-profile-activation.d.ts +20 -41
  7. package/dist/types/config/model-profile-contract.d.ts +7 -0
  8. package/dist/types/config/model-profiles.d.ts +5 -0
  9. package/dist/types/config/model-registry.d.ts +2 -2
  10. package/dist/types/config/model-resolver.d.ts +2 -8
  11. package/dist/types/config/models-config-schema.d.ts +2 -0
  12. package/dist/types/coordinator-mcp/question-state.d.ts +9 -0
  13. package/dist/types/coordinator-mcp/server.d.ts +2 -0
  14. package/dist/types/eval/py/runtime.d.ts +12 -0
  15. package/dist/types/extensibility/extensions/compact-handler.d.ts +11 -7
  16. package/dist/types/extensibility/extensions/types.d.ts +5 -1
  17. package/dist/types/extensibility/gjc-plugins/lifecycle.d.ts +7 -1
  18. package/dist/types/extensibility/gjc-plugins/types.d.ts +5 -0
  19. package/dist/types/extensibility/plugins/installed-names.d.ts +15 -0
  20. package/dist/types/extensibility/plugins/types.d.ts +7 -0
  21. package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +8 -2
  22. package/dist/types/gjc-runtime/state-writer.d.ts +30 -0
  23. package/dist/types/gjc-runtime/workflow-cli-common.d.ts +10 -0
  24. package/dist/types/harness-control-plane/harness-endpoint-url.d.ts +7 -0
  25. package/dist/types/harness-control-plane/sdk-transport.d.ts +3 -0
  26. package/dist/types/main.d.ts +1 -0
  27. package/dist/types/master-mode/first-request.d.ts +22 -0
  28. package/dist/types/master-mode/snapshot.d.ts +6 -0
  29. package/dist/types/modes/acp/prompt-image-staging.d.ts +17 -0
  30. package/dist/types/modes/components/hook-selector.d.ts +1 -0
  31. package/dist/types/modes/components/status-line/command.d.ts +9 -0
  32. package/dist/types/modes/controllers/btw-controller.d.ts +10 -0
  33. package/dist/types/modes/interactive-mode.d.ts +1 -0
  34. package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +12 -2
  35. package/dist/types/modes/theme/theme.d.ts +6 -0
  36. package/dist/types/modes/types.d.ts +1 -0
  37. package/dist/types/sdk/acp/adapter.d.ts +15 -0
  38. package/dist/types/sdk/broker/identity.d.ts +3 -0
  39. package/dist/types/sdk/broker/lifecycle-ledger.d.ts +2 -0
  40. package/dist/types/sdk/broker/lifecycle.d.ts +5 -0
  41. package/dist/types/sdk/broker/session-index.d.ts +4 -0
  42. package/dist/types/sdk/broker/session-scope.d.ts +3 -0
  43. package/dist/types/sdk/broker/spawn-authority.d.ts +14 -0
  44. package/dist/types/sdk/btw.d.ts +5 -0
  45. package/dist/types/sdk/bus/index.d.ts +16 -4
  46. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +1 -1
  47. package/dist/types/sdk/cli/spawn-anchor-attestation-cli.d.ts +18 -0
  48. package/dist/types/sdk/host/control/btw-ask.d.ts +13 -6
  49. package/dist/types/sdk/host/control/dispatch.d.ts +1 -1
  50. package/dist/types/sdk/host/control/index.d.ts +1 -1
  51. package/dist/types/sdk/host/control/operations.d.ts +19 -3
  52. package/dist/types/sdk/host/events.d.ts +2 -0
  53. package/dist/types/sdk/host/host.d.ts +4 -0
  54. package/dist/types/sdk/host/prompt-image-upload.d.ts +13 -3
  55. package/dist/types/sdk/host/query/handlers.d.ts +1 -0
  56. package/dist/types/sdk/host/session-runtime.d.ts +15 -2
  57. package/dist/types/sdk/host/surface-policy.d.ts +5 -0
  58. package/dist/types/sdk/host/types.d.ts +7 -0
  59. package/dist/types/sdk/image-input.d.ts +32 -0
  60. package/dist/types/sdk/index.d.ts +4 -1
  61. package/dist/types/sdk/job-observation.d.ts +21 -2
  62. package/dist/types/sdk/session.d.ts +4 -2
  63. package/dist/types/session/agent-session.d.ts +84 -17
  64. package/dist/types/session/btw-contract.d.ts +26 -0
  65. package/dist/types/session/btw-prefix-ledger.d.ts +44 -0
  66. package/dist/types/session/btw-projection.d.ts +33 -0
  67. package/dist/types/session/internal/managed-session-scope.d.ts +25 -0
  68. package/dist/types/session/internal/managed-session-storage.d.ts +7 -2
  69. package/dist/types/session/internal/managed-session-transaction.d.ts +87 -0
  70. package/dist/types/session/session-manager.d.ts +235 -11
  71. package/dist/types/task/render.d.ts +1 -7
  72. package/dist/types/tools/ast-edit-write-path.d.ts +12 -6
  73. package/dist/types/tools/image-gen.d.ts +27 -0
  74. package/dist/types/tools/index.d.ts +7 -0
  75. package/dist/types/tools/pending-asks.d.ts +24 -0
  76. package/dist/types/tools/report-metric.d.ts +46 -0
  77. package/dist/types/tools/subagent.d.ts +3 -0
  78. package/dist/types/tui/status-line.d.ts +9 -0
  79. package/dist/types/utils/image-limits.d.ts +2 -0
  80. package/dist/types/utils/pasted-image-path.d.ts +6 -0
  81. package/dist/types/web/search/index.d.ts +7 -0
  82. package/package.json +7 -7
  83. package/scripts/generate-sdk-operation-inventory.ts +8 -0
  84. package/scripts/verify-gjc-sdk-canonicalization.ts +7 -0
  85. package/src/cli/customize-doctor.ts +45 -6
  86. package/src/cli/plugin-cli.ts +93 -10
  87. package/src/cli/public-command-entry.ts +4 -2
  88. package/src/cli/public-command-errors.ts +23 -1
  89. package/src/cli/public-command-registry.ts +23 -2
  90. package/src/cli/setup-cli.ts +1 -0
  91. package/src/commands/sdk.ts +38 -1
  92. package/src/config/autorouting-tier-map.ts +0 -6
  93. package/src/config/model-preset-registry.ts +1 -0
  94. package/src/config/model-profile-activation.ts +211 -440
  95. package/src/config/model-profile-contract.ts +27 -9
  96. package/src/config/model-profiles.ts +9 -0
  97. package/src/config/model-resolver.ts +20 -81
  98. package/src/config/models-config-schema.ts +2 -0
  99. package/src/config/settings-schema.ts +7 -1
  100. package/src/config/settings.ts +2 -0
  101. package/src/coordinator-mcp/question-state.ts +27 -0
  102. package/src/coordinator-mcp/server.ts +209 -6
  103. package/src/eval/py/runtime.ts +36 -0
  104. package/src/exec/bash-executor.ts +27 -1
  105. package/src/extensibility/extensions/compact-handler.ts +34 -17
  106. package/src/extensibility/extensions/types.ts +5 -0
  107. package/src/extensibility/gjc-plugins/lifecycle.ts +65 -1
  108. package/src/extensibility/gjc-plugins/types.ts +6 -0
  109. package/src/extensibility/plugins/installed-names.ts +20 -0
  110. package/src/extensibility/plugins/loader.ts +5 -5
  111. package/src/extensibility/plugins/manager.ts +44 -11
  112. package/src/extensibility/plugins/types.ts +7 -0
  113. package/src/gjc-runtime/deep-interview-runtime.ts +144 -52
  114. package/src/gjc-runtime/ralplan-runtime.ts +6 -2
  115. package/src/gjc-runtime/state-renderer.ts +41 -25
  116. package/src/gjc-runtime/state-runtime.ts +264 -139
  117. package/src/gjc-runtime/state-writer.ts +67 -0
  118. package/src/gjc-runtime/workflow-cli-common.ts +20 -0
  119. package/src/harness-control-plane/finalize.ts +3 -0
  120. package/src/harness-control-plane/harness-endpoint-url.ts +39 -0
  121. package/src/harness-control-plane/sdk-transport.ts +48 -3
  122. package/src/hindsight/backend.ts +67 -1
  123. package/src/internal-urls/docs-index.generated.ts +13 -12
  124. package/src/main.ts +143 -13
  125. package/src/master-mode/first-request.ts +38 -0
  126. package/src/master-mode/snapshot.ts +39 -2
  127. package/src/memories/index.ts +36 -1
  128. package/src/modes/acp/acp-agent.ts +288 -26
  129. package/src/modes/acp/acp-event-mapper.ts +4 -0
  130. package/src/modes/acp/prompt-image-staging.ts +98 -0
  131. package/src/modes/components/btw-panel.ts +1 -1
  132. package/src/modes/components/hook-selector.ts +5 -0
  133. package/src/modes/components/model-selector.ts +15 -3
  134. package/src/modes/components/status-line/command.ts +40 -1
  135. package/src/modes/controllers/btw-controller.ts +196 -11
  136. package/src/modes/controllers/extension-ui-controller.ts +17 -12
  137. package/src/modes/controllers/goal-mode-controller.ts +15 -2
  138. package/src/modes/controllers/input-controller.ts +3 -7
  139. package/src/modes/controllers/selector-controller.ts +74 -58
  140. package/src/modes/interactive-mode.ts +18 -1
  141. package/src/modes/runtime-init.ts +18 -12
  142. package/src/modes/shared/agent-wire/workflow-gate-broker.ts +76 -18
  143. package/src/modes/theme/theme.ts +36 -0
  144. package/src/modes/types.ts +1 -0
  145. package/src/modes/utils/ui-helpers.ts +40 -3
  146. package/src/prompts/system/btw-handoff.md +7 -0
  147. package/src/prompts/system/btw-user.md +3 -2
  148. package/src/prompts/system/master-mode.md +1 -0
  149. package/src/prompts/system/subagent-system-prompt.md +1 -0
  150. package/src/prompts/system/system-prompt.md +1 -0
  151. package/src/prompts/tools/image-gen.md +8 -1
  152. package/src/sdk/acp/adapter.ts +121 -2
  153. package/src/sdk/broker/broker.ts +11 -3
  154. package/src/sdk/broker/identity.ts +22 -4
  155. package/src/sdk/broker/lifecycle-ledger.ts +2 -2
  156. package/src/sdk/broker/lifecycle.ts +99 -11
  157. package/src/sdk/broker/session-index.ts +29 -2
  158. package/src/sdk/broker/session-scope.ts +15 -1
  159. package/src/sdk/broker/spawn-authority.ts +141 -108
  160. package/src/sdk/btw.ts +6 -0
  161. package/src/sdk/bus/discord-live-provider.ts +5 -2
  162. package/src/sdk/bus/index.ts +200 -33
  163. package/src/sdk/bus/telegram-daemon-contract.ts +1 -1
  164. package/src/sdk/cli/spawn-anchor-attestation-cli.ts +368 -0
  165. package/src/sdk/extension-interaction.ts +1 -0
  166. package/src/sdk/host/control/btw-ask.ts +67 -14
  167. package/src/sdk/host/control/dispatch.ts +20 -3
  168. package/src/sdk/host/control/index.ts +7 -1
  169. package/src/sdk/host/control/operations.ts +26 -3
  170. package/src/sdk/host/events.ts +4 -0
  171. package/src/sdk/host/host.ts +79 -3
  172. package/src/sdk/host/prompt-image-upload.ts +184 -23
  173. package/src/sdk/host/query/handlers.ts +15 -0
  174. package/src/sdk/host/session-runtime.test.ts +599 -2
  175. package/src/sdk/host/session-runtime.ts +140 -31
  176. package/src/sdk/host/surface-policy.ts +6 -0
  177. package/src/sdk/host/types.ts +7 -0
  178. package/src/sdk/host/websocket-transport.lifecycle.test.ts +40 -0
  179. package/src/sdk/host/websocket-transport.ts +2 -0
  180. package/src/sdk/image-input.ts +370 -0
  181. package/src/sdk/index.ts +6 -0
  182. package/src/sdk/job-observation.ts +77 -10
  183. package/src/sdk/lifecycle/service.ts +1 -0
  184. package/src/sdk/protocol/operation-inventory.generated.json +62 -0
  185. package/src/sdk/protocol/operation-registry.ts +16 -3
  186. package/src/sdk/session.ts +350 -203
  187. package/src/session/agent-session.ts +1575 -470
  188. package/src/session/btw-contract.ts +54 -0
  189. package/src/session/btw-prefix-ledger.ts +807 -0
  190. package/src/session/btw-projection.ts +261 -0
  191. package/src/session/internal/managed-session-scope.ts +41 -2
  192. package/src/session/internal/managed-session-storage.ts +147 -8
  193. package/src/session/internal/managed-session-transaction.ts +180 -0
  194. package/src/session/session-manager.ts +758 -16
  195. package/src/setup/provider-presets.json +2 -1
  196. package/src/slash-commands/builtin-registry.ts +37 -15
  197. package/src/system-prompt.ts +26 -2
  198. package/src/task/executor.ts +13 -10
  199. package/src/task/render.ts +43 -26
  200. package/src/tools/ask.ts +178 -44
  201. package/src/tools/ast-edit-write-path.ts +24 -7
  202. package/src/tools/ast-edit.ts +18 -5
  203. package/src/tools/ast-grep.ts +9 -3
  204. package/src/tools/bash.ts +13 -6
  205. package/src/tools/calculator.ts +4 -2
  206. package/src/tools/cron.ts +6 -3
  207. package/src/tools/descriptors.test.ts +8 -2
  208. package/src/tools/descriptors.ts +4 -1
  209. package/src/tools/image-gen.ts +387 -37
  210. package/src/tools/index.ts +14 -3
  211. package/src/tools/pending-asks.ts +240 -0
  212. package/src/tools/report-metric.ts +198 -0
  213. package/src/tools/subagent-render.ts +23 -6
  214. package/src/tools/subagent.ts +11 -0
  215. package/src/tools/tool-catalog.generated.ts +52 -1
  216. package/src/tui/status-line.ts +145 -4
  217. package/src/utils/image-limits.ts +2 -0
  218. package/src/utils/pasted-image-path.ts +9 -0
  219. package/src/web/search/index.ts +28 -6
package/CHANGELOG.md CHANGED
@@ -2,6 +2,163 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.20.0] - 2026-11-08
6
+
7
+ ### Added
8
+
9
+ - ACP clients can now create temporary sessions by sending `session/new` with `_meta.gjc.ephemeral: true`, after checking that initialization advertised `_meta.gjc.ephemeralSessions: true`. A temporary session keeps its transcript in memory only. It never appears in `session.list` and cannot be loaded or resumed. Only the ACP agent that created it can reattach it after a transient transport drop; if that is impossible, prompts fail with `ephemeral_session_unrecoverable` (#7431).
10
+
11
+ - The SDK `btw.ask` control accepts optional `exchanges: [{ question, reply }]`, the earlier side exchanges of a stateless client, oldest first, so a follow-up side question sees them the same way the TUI `/btw` panel does. They are bounded like the panel's own history: the newest 12 exchanges that fit 64 KiB of UTF-8 in total are kept in order, each question is cut to 16 KiB and each reply to 32 KiB at a character boundary, and older exchanges are dropped. `runtime.capabilities.btwAskExchangesVersion` is `1` on hosts that support it.
12
+
13
+ - `/btw-handoff` sends the open `/btw` side chat to the main session as a single `btw-handoff` message. The message contains the completed exchanges the side chat still holds, unchanged; the side chat keeps at most the last 12 exchanges and 64 KiB. While the main session is busy, the message waits as a sequential follow-up so the running turn and its tools are not interrupted. If the queued handoff is cleared, dequeued, or refused before it runs, the side chat is kept until the session changes: `/btw` with no question reopens it, and `/btw-handoff` with no open chat sends it again. The handoff is refused while a side-chat answer is still streaming. The transcript shows the handoff as a one-line marker.
14
+
15
+ - `/btw` side questions now own their turn: a queued `/btw` waits for idle admission instead of interleaving with a running turn, and its settlement is joined before a session transition (switch, `/new`, dispose) proceeds.
16
+
17
+ - `gjc setup provider --preset cheaper-inference` (alias: `cheaperinference`): OpenAI-compatible custom provider for Cheaper Inference (`CHEAPER_INFERENCE_API_KEY`, live `/v1/models` discovery, plain model ids such as `gpt-5.4-mini`).
18
+
19
+ - Bundled Codex `gpt-image-*` image edits post to `/codex/images/edits`. The body has the source images, the prompt, the model, and optional background, count, quality, size, and GIF timing. It has no markup field and no mask.
20
+ - Bundled `openai/gpt-image-2.6-sunburst` and `openai/gpt-image-2.6-flare` image edits post to `/v1/images/edits` with the source images and no markup or mask.
21
+
22
+ - `generate_image` can ask the OpenAI and Codex image routes for `png`, `jpeg`, `webp`, `gif`, or `svg`, and can set quality, background, complexity, count, compression, and GIF frame timing. The default remains one `webp` image at quality `auto`. SVG asks for one image and does not stream. A PNG is not saved as an SVG, including a PNG whose metadata contains an svg tag. GIF bytes must start with a GIF header.
23
+
24
+ - Add `gjc sdk broker attest-spawn-anchors` to prove pre-marker spawn mirrors from first-hand caller-key evidence, preview counts without changing broker state, and atomically write spawn-anchor attestations for the next broker start.
25
+
26
+ - Sessions own their MCP control admission: a session can connect, disconnect and reconnect its own MCP servers while `/new` or a same-path reload restores them, and an in-flight restore is retired with its owner instead of leaking into the successor.
27
+
28
+ - Subagents can call the display-only `report_metric` tool to show a small bar chart of comparable numbers, such as sizes per format or timings per variant, in the live task card and the `subagent` await panel. Bars fit the terminal width, fall back to one text line when it is too narrow, and use `#` under the ASCII symbol preset. Charts never reach the parent model ([#7440](https://github.com/Yeachan-Heo/gajae-code/issues/7440)).
29
+
30
+ ### Changed
31
+
32
+ - **Breaking (SDK):** `btw.ask` now refuses unknown input fields and malformed `exchanges` as `invalid_input` instead of ignoring them, so a request that previously succeeded with an extra field (for example `replyText`) now fails. Older hosts ignore `exchanges`, so clients should check `btwAskExchangesVersion` before sending it.
33
+
34
+ - The bounded `/btw` input now carries ID-verified tool status lines (`[tool] name target: ok|error|aborted|running`) instead of dropping tool activity. Status lines never include raw results or full arguments; registered secrets are masked before the lines are bounded by a UTF-8 byte budget.
35
+ - On the official Anthropic API with an API key and automatic prompt cache, `/btw` reuses the completed main request as a read-only prefix: the main system prompt, tools, messages and body settings are kept and the side question is appended as a user turn. The final dispatch is validated against the main prefix before any network I/O, returned tool calls are never executed, and the side chat falls back once to the bounded projection only when the prefix request shows no text. Other providers, authentication modes, transports and unverifiable boundaries keep using the bounded projection.
36
+
37
+ - Internal groundwork, not yet wired: a new managed session transaction primitive serializes one persistence step per logical session across processes, keyed to the session identity rather than the transcript path. No user-visible behavior changes until the slices that give it a caller land. `acquireManagedLock` also accepts an explicit wait budget instead of always inheriting the shared managed-lock timeout.
38
+
39
+ - Interactive mode now opens the model selector automatically on startup when no model is selected and a fallback message is present, allowing users to immediately choose a model without needing to run `/model`. Non-interactive, print, and RPC modes remain unchanged.
40
+
41
+ - Interactive mode re-queries the terminal background (OSC 11) only while the answer can change the theme: auto-detection is active and `theme.dark` and `theme.light` differ. An idle session with one theme in both slots, or with an explicitly picked theme, no longer writes a probe to a terminal without Mode 2031 every 2 seconds.
42
+
43
+ - `SessionSdkTransport` and `HostEndpointAdapters` accept `directedFrameCeilingBytes`, the largest directed frame the transport delivers. Omitted means the native server's 1 MiB ceiling; `null` means none, which the SDK-only JS WebSocket transport declares so it keeps sending the whole retained replay.
44
+
45
+ - Clarified terminal-abort confirmation and upgrade guidance for pending workflow questions. Added end-to-end regression coverage for broker replies, gate cancellation, ownership, repeated requests, and concurrent aborts on both SDK session hosts (related: Heyaaz/gajae-bot#224; runtime cancellation already repaired by #7523).
46
+
47
+ ### Fixed
48
+
49
+ - A stopped SDK host instance no longer terminalizes a still-pending prompt when its deadline expires after `session_shutdown`, including an expiry that was already waiting at a tool-call boundary when shutdown began. That late write rewrote the session's reconciliation store from the stopped instance's stale record set, so a successor instance in the same process could lose its own persisted prompt results (a `turn.result` query then answered `unknown`). The pending record now stays for restart recovery, as it would after a process exit, and a deadline claim already in flight is joined by the teardown reconciliation drain (#7342).
50
+
51
+ - Expose ordinary attended TUI questions through the new `ask.requests.list` SDK query and implement `ask.answer` against the same local/remote AskTool race. Pending requests carry stable logical `questionId` values, session-bound single-use interaction IDs, authoritative selector/editor state and answer schemas; stale or invalid replies cannot resolve a different question. Real terminal inline-editor transitions rotate interaction IDs. Observation preserves terminal and notification answer sources, and completed, cancelled, timed-out and disposed interactions are removed. Local renderer failures and same-tick answer/rejection races settle losing SDK submissions without committing.
52
+
53
+ - `turn.abort_and_prompt` now follows the same ownership rule as `turn.abort`. A connection that does not own the active run, such as another client's prompt or a turn started in the interactive terminal, no longer stops that run. Its replacement text is queued as a steer for the run instead, and the result reports `aborted: false` with `queuedAs: "steer"`. A retry with the same idempotency key returns that steer instead of queueing the text again. The replacement no longer cancels another connection's pending prompt preflight either. An owner's replacement behaves as before, including while its accepted prompt has not started yet. A degraded steer that was delivered but whose acceptance could not be recorded durably reports `status: "uncertain"` instead of a rejection, and a retry never delivers it again.
54
+ - `gjc_coordinator_send_prompt` with `force: true` no longer records a replacement turn when the runtime degrades the replacement to a steer. The previous active turn stays active, no new turn is created, and the response reports `delivery: "steer"` and `aborted: false`. `gjc_delegate_plan` and `gjc_delegate_execute` with `force: true` behave the same way and do not await a turn for the steer. An uncertain steer outcome is reported as `ambiguous` so the same idempotency key can recover it.
55
+ - Fallback steers retain their original run identity across asynchronous reservation and queue admission. A completed target cannot redirect the text into a successor run or a follow-up, and a rejected keyed request remains rejected on retry. Internal steer-reference prefixes are reserved, and reconciliation conflicts retain their typed SDK errors.
56
+ - Coordinator force-send and force-delegate record a steer disposition and retire its synthetic turn and prompt reservation in one transaction, so a crash can no longer leave a phantom replacement turn blocking later work. An exact-key replay re-runs the same transition without dispatching again.
57
+ - A same-key `turn.abort_and_prompt` replay whose recorded steer was evicted by retention before its reservation is rejected at queue admission instead of reaching the current run.
58
+
59
+ - ACP agent now detects when the SDK broker endpoint changes and immediately re-discovers the new endpoint instead of waiting up to 42 seconds for reconnect attempts to exhaust on the old broker address.
60
+
61
+ - ACP clients now receive summarized reasoning as `agent_thought_chunk` updates. Anthropic summarized thinking and OpenAI Responses/Codex reasoning summaries stream as `reasoning_summary_delta`, which the ACP mapper dropped, so those models showed no thinking in ACP clients.
62
+
63
+ - ACP prompts whose inline images exceed the 256 KiB SDK frame cap are no longer rejected: the ACP agent stages each image losslessly through the private `turn.image.*` uploads in sub-cap chunks and references the staged IDs in `turn.prompt`. Staged images are discarded when the prompt is cancelled or fails before the host consumes them; oversized prompt text is still rejected up front.
64
+
65
+ - ACP `session/list` no longer advertises a session for every `gjc --mode=acp` process. The ACP process registered the unused startup session it never runs as a direct session, so each restart left an entry with no transcript that `session/load` rejected with `not_found`.
66
+
67
+ - The Ralplan and Deep Interview execution-approval gates no longer fail before showing the approval UI with "execution handoff cannot authenticate Deep Interview approval lineage" when the session cwd is a filesystem alias, such as macOS `/tmp` for `/private/tmp`, of the root the handoff audit was written under. Workflow state writers and verifiers now derive their root from the same physical path, and the session transcript's recorded cwd is matched by physical identity. A handoff audit recorded under a different root is still refused, and the refusal now names the mismatched caller path instead of only the generic lineage error (#7562).
68
+ - Workflow state written before this fix through a cwd alias still authenticates. Every comparison of a recorded path against a rebuilt one uses one path-identity rule: the realpath of the deepest existing ancestor joined with the not-yet-existing remainder. This covers handoff audits and receipts, checksum covered paths, ordinary and Crystal execution-approval records (including Ralplan-stage records), handoff and Crystal transaction journals whose destinations were recorded before the files existed, and spec-path containment. A pending Crystal publication started through an alias resumes under the mutation id its writer derived. A recorded path under a different root, under an alias that no longer resolves, in a sibling directory sharing a name prefix, or a missing or tampered receipt is still refused (#7562).
69
+ - A Crystal published before this fix through a cwd alias can still be approved for execution, replayed, and superseded by a new Crystal version: its recorded spec path, Crystal index rows, and pending Crystal transaction journals are matched against the session specs directory by physical containment instead of failing with "deep-interview crystallized handoff requires a session-scoped spec" or "Crystal publication path escapes the session specs directory". A spec outside the session specs directory or under a foreign root is still refused (#7562).
70
+ - Relative user-supplied inputs (`deep-interview --write --spec ../spec.md`, `--crystallize --input @../file`, deep-interview stage `--input @../file`, and `gjc state --input @../file`) and a relative `GJC_SESSION_FILE` read during crystallization resolve against the cwd as invoked, not its physical target, so a symlinked cwd whose target has a different parent reads the same file as before (#7562).
71
+
72
+ - A headless `ask` answered through a workflow gate now honors the tool abort signal and `GJC_ASK_ANSWER_DEADLINE_MS`, like the remote answer-source path. Before, the gate wait ignored both, so an aborted or expired ask left its gate pending. A failed gate ask now quarantines its gate, so a late answer cannot advance it.
73
+
74
+ - Refuse an ast_edit directory root that resolves outside the session, and keep the native search path identical to that checked path so a trailing-space directory is not rewritten through a sibling symlink.
75
+
76
+ - The runtime-extension broker seam guard accepts the imported `ensureBroker` call site again, so `sdk-runtime-extension-broker-seam.test.ts` passes on `dev`.
77
+
78
+ - A `/btw` turn no longer claims the first-turn auto title, so a session that starts with a side question still receives its own generated title.
79
+
80
+ - The calc tool's exponentiation now accepts a unary sign on the exponent, so expressions like `2 ** -3` evaluate to 0.125 instead of failing with "Unexpected token in expression". Exponentiation stays right-associative, and unary-minus precedence on the left (`-2 ** 2` = -4) is unchanged.
81
+
82
+ - Cron schedules whose day-of-month or day-of-week field starts with `*` (including stepped forms like `*/2`) now follow vixie-cron semantics: that field counts as unrestricted, so when the other day field is restricted both must match. Expressions such as `0 0 */2 * 1` no longer fire on every stepped day; they fire only when the weekday also matches.
83
+ - The `cron` tool's `cron_expression` schema description now states this rule explicitly: a day field counts as restricted only when it does not start with `*`.
84
+
85
+ - Discord gateway reconnects now wait the requested minimum delay instead of that delay minus whatever the clock advanced while scheduling the timer.
86
+
87
+ - Steers are now injected into the current turn immediately even when a config hot reload is pending. Previously, steers were blocked waiting on hot reload selection fences, preventing them from interrupting the active turn. Steers now bypass only hot reload selection fences when submitted during a busy turn, while still respecting explicit model-selection fences to preserve selection ordering contracts. ([#7613](https://github.com/Yeachan-Heo/gajae-code/issues/7613), [#4540](https://github.com/Yeachan-Heo/gajae-code/issues/4540))
88
+
89
+ - `/goal show` and the goal menu strip terminal controls from a restored objective before drawing it.
90
+
91
+ - Bundled `openai/gpt-image-2.6-sunburst` and `openai/gpt-image-2.6-flare` image generation posts to `/v1/images/generations`. Those model pages do not support `v1/responses`, so the previous Responses request produced no image. The Codex route is unchanged.
92
+
93
+ - The harness owner ignores a parsed SDK discovery record unless it is a loopback origin for this session, requires a recorded pid to be live when one is present, starts the real session when that check fails, and propagates an error from the first discovery read.
94
+
95
+ - Image-only models stay available for the image role and are rejected by ordinary chat selection, including the CLI model flag, role cycling, and a provider-tab search.
96
+
97
+ - Accept the built-in `kiro-codewhisperer-stream` API in models config provider/model entries and in model preset registry manifests so Kiro-backed configurations pass schema validation.
98
+
99
+ - Bash no longer passes an inherited lifecycle request id to its child, so a nested gjc does not adopt the parent session id.
100
+
101
+ - After a master session switches, its first-request peer snapshot again lists the session it switched away from when another process has resumed that session. The master records the endpoint generation the Broker issued when it registered that session, and treats an owner row with a different generation as a separate host; its own possibly stale row (same generation) and rows without generation evidence stay omitted, as does the current session. Closes #7459.
102
+
103
+ - Frame stored local memory summaries and Hindsight mental-model snippets after their size cut, using the snippet owner's render budget, before they enter the system prompt. The mental-model wrapper stays literal, and project markers of any case or inner spacing cannot close the project block. A long unmatched bracket is scanned in linear time.
104
+
105
+ - Session recovery no longer silently switches providers when a saved model cannot be restored. Instead of falling back to any credentialed provider in automatic order (which could surprise-bill users on subscription providers), the fallback now limits candidates to that model's provider, with the curated default tried first. If the provider is unknown or has no callable models, the model stays unset and the user is prompted to run `/model` to select one.
106
+
107
+ - Incomplete-todo reminders no longer restart a turn while its goal is paused. Unfinished tasks remain intact, resuming the goal restores normal continuation behavior, and explicit user or scheduled messages can still start a turn.
108
+
109
+ - A project settings file or a runtime override can no longer change `plan.enabled`; the operator global value stays in force.
110
+
111
+ - Plan mode prompts fence the plan file path as untrusted text, so a saved path cannot close the plan-mode critical block.
112
+
113
+ - `gjc plugin install --dry-run` now correctly previews the install without copying the bundle or writing a registry entry. Previously, `--dry-run` performed the install anyway, and running it a second time would fail with "already installed". The preview can now be run multiple times and returns the same result without mutating the filesystem.
114
+
115
+ - `gjc plugin install <bundle>` reports why the bundle was refused instead of only the loader code. A manifest with an unsupported hook field used to print `unsupported_surface` and nothing else, which does not say which field to fix; the parser's explanation is now shown with the caller's bundle path replaced by `<bundle>`, the platform temp root that tarball and git installs extract under by `<tmp>`, the home prefix by `~`, and any other absolute path the loader embeds (POSIX, including directory names with spaces, Windows drive and UNC) by `<path>/<file>`, so the detail is useful without disclosing a location. Untrusted manifest text is sanitized before it reaches the terminal, the detail is clamped to 400 characters, and the failure goes to stderr through `safeStderrWrite` rather than `console.error`.
116
+
117
+ - `gjc plugin link` now produces a plugin that GJC can see. It used to print `✔ Linked …` and exit 0 while `plugin list` reported "No plugins installed" and `plugin doctor` reported no manifest, because every consumer enumerated only the plugins `package.json` dependencies and a symlink cannot live there (bun copies a `file:` spec and fails to resolve a `link:` one). A linked package is now recorded in the runtime lock file and read through one shared `installedPluginNames`, so `plugin list`, `plugin doctor`, the customize doctor, and the plugin extension loader agree. `plugin uninstall` of a linked plugin removes the symlink and its record (it previously exited 0 and left the plugin loading) and never touches the linked checkout.
118
+
119
+ - Keep ordinary prompt run-acceptance observers attached to real replacement handles of the same logical run during maintenance continuations, with contained observer errors and prompt-lifetime cleanup.
120
+
121
+ - Omit a repository dotenv tool-bridge URL, capability, and session from the Python kernel, including a development layer Bun loaded before `.env` assigned `NODE_ENV`.
122
+
123
+ - Concurrent cleanup of identity-bound replacement receipts no longer permanently blocks unrelated session appends. Transcript and unsafe-path identity checks remain enforced. Fatal receipt-capture diagnostics now distinguish descriptor admission from later pathname observations without logging file contents.
124
+
125
+ - Settle SDK prompts after capacity retries by preserving prompt ownership across retry runs within the same lifecycle, without settling independent successor prompts from stale terminal events.
126
+
127
+ - ACP `session/load` no longer fails with `cursor_expired` on a session whose recent turns ended with long final answers. The host answered `event_replay` with every retained event in one frame, and once those events passed the 1 MiB directed-frame ceiling the native writer rejected the reply as `oversized_frame`; the session router then failed its replay barrier and rebuilt the attachment, so the ACP transcript cursor expired. The host now keeps the reply under the native ceiling by conceding the oldest events as a `sequence_gap`, the same way it reports events that fell out of retention, and the router continues past the gap. The Telegram daemon still refuses any replay with a gap, so such a session stays unavailable to it, as it already was when the oversized reply was rejected.
128
+
129
+ - Reading factory-owned job observation during temporary maintenance no longer permanently disables observation for an unchanged owner. Settled reads can return a fresh facade after ownership revalidation, while retired handles, explicit host disposal, and actual ownership mismatches remain fenced.
130
+
131
+ - Concrete model and mixed-role selections now commit profile ownership, its default projection, and role assignments atomically before publishing the selection. Stale selections and rollback cannot overwrite a newer owner; publication failures retain the committed owner and close the requesting session.
132
+ - Role cycling preserves configured DEFAULT selectors and fallback chains. Permanent model selections commit suspended provider-session scopes only after successful publication, preventing stale temporary scopes from restoring an older choice.
133
+ - Session disposal drains its already-authorized default selection, including its ownership commit, while rejecting new ingress and still protecting concurrent ownership winners.
134
+ - SDK `config.patch` rejects independent changes to `modelProfile.default`, preventing it from diverging from the internal ownership record. Use explicit profile-selection controls instead.
135
+
136
+ - SDK `model.set` without a `thinkingLevel` no longer fails with `busy` (same-session reentrancy) on a concrete model. The selection admits itself, and the config-override reconciliation runs inside that admission.
137
+
138
+ - Prompt images on SDK hosts are admitted by the factory-owned session, so an upload that arrives before the runtime finishes adopting its session is rejected or attributed correctly instead of landing on the previous session. Local slash commands now refuse image attachments instead of silently dropping them.
139
+
140
+ - User Bash executions now own cancellation before asynchronous `user_bash` hooks. Aborted or retired sessions cannot start fallback shell work or publish a later successful hook replacement; hook failures still propagate and running ownership remains until actual settlement.
141
+
142
+ - Disposing during a `/new` MCP restore no longer wedges teardown: the restore is fenced to the predecessor identity, its connector is disconnected, and the successor's first turn joins the restored tools instead of the switch blocking on a physical reconnect.
143
+
144
+ - Serialize existing same-directory managed session opens with participating shared appends during transcript hydration, preventing a peer append from causing a spurious identity-mismatch rejection. Strict checks still reject changes made by writers outside the transaction protocol.
145
+
146
+ - The top-level system prompt now states that the `<soul>` action bias never overrides `<routing>`, so informational ("why is X failing?") and judgment ("what do you think of X?") questions stay read-only instead of being answered by editing files.
147
+
148
+ - State and ultragoal status text strips terminal control characters before the terminal write, while JSON status output still returns the stored strings.
149
+
150
+ - Status-line commands and finalize validation no longer run a repository `.env` shell startup file (`BASH_ENV`, `ENV`, `ZDOTDIR`) when that static value matches the recorded declaration, or when the declaration is dynamic. A different static caller value is still passed to the child.
151
+
152
+ - Status lines strip terminal control sequences via a linear-time scanner, flatten embedded newlines and tabs to spaces, and preserve caller-provided SGR styles and well-formed OSC 8 file hyperlinks while stripping arbitrary or unterminated OSC 8 sequences, preventing repository text from injecting terminal escape controls, misaligning cursor layout, or stalling the event loop.
153
+
154
+ - SDK and extension transcript entries now expose the canonical assistant `stopReason` when present, allowing consumers to distinguish successful completion from truncation, tool use, cancellation, and errors. Missing assistant reasons remain unknown, and non-assistant entries omit the field; transcript IDs, full bodies, and content projection are unchanged.
155
+
156
+ - The TUI transcript now marks images attached to a user message that its text does not reference, as `[image: image/jpeg]`. Prompts from another client (ACP, the SDK, a phone app) carry image blocks without the editor's `[image N]` references, so the transcript showed only their text, and an image-only prompt was not shown at all while the model still answered it. Images attached by a CLI `@file` argument or an extension input handler get the marker too. Prompts typed in the TUI, whose text already names their images, are unchanged.
157
+
158
+ - Frame web search provider error and fallback status after its tail cut so response bodies stay inside the untrusted-content fence.
159
+
160
+ - Frame workstation environment values after clipping so a terminal identity cannot close the project prompt.
161
+
5
162
  ## [0.19.3] - 2026-11-03
6
163
 
7
164
  ### Added
@@ -32,4 +32,17 @@ export { classifyInstallTarget } from "./classify-install-target";
32
32
  * Run a plugin command.
33
33
  */
34
34
  export declare function runPluginCommand(cmd: PluginCommandArgs): Promise<void>;
35
+ /** Longest loader detail kept for the bundle-path branch; the code stays intact. */
36
+ export declare const MAX_INSTALL_FAILURE_CHARS = 400;
37
+ /**
38
+ * Loader detail for a bundle install, reduced until it names no identity.
39
+ *
40
+ * The manifest parser explains exactly which field is unsupported, and dropping
41
+ * that explanation leaves a caller with an opaque code and no way to find the
42
+ * offending line. That explanation is untrusted — a bundle can put a control
43
+ * sequence in the key it names — so it is sanitized for display before styling,
44
+ * its paths are reduced, and the result is whitespace-collapsed and clamped so a
45
+ * huge manifest cannot flood the terminal.
46
+ */
47
+ export declare function describeBundleInstallFailure(error: unknown, bundlePath: string): string;
35
48
  export declare function printPluginHelp(): void;
@@ -74,6 +74,13 @@ export type PublicEvidenceStatus = {
74
74
  warning: typeof EVIDENCE_UNAVAILABLE_WARNING;
75
75
  };
76
76
  export declare const PUBLIC_COMMAND_DIAGNOSTICS: {
77
+ readonly spawn_anchor_identity_unavailable: "The original sdk/broker.identity is missing, invalid, or unreadable. Restore the original identity key before attesting spawn mirrors.";
78
+ readonly spawn_anchor_attestation_invalid: "The existing spawn-anchor attestation is malformed or unreadable. Preserve it and investigate before writing.";
79
+ readonly spawn_anchor_ledger_invalid: "The lifecycle ledger is malformed, unsupported, or unreadable. No attestation was written.";
80
+ readonly spawn_anchor_journal_invalid: "The spawn-authority journal failed authenticated replay validation or could not be read. No attestation was written.";
81
+ readonly spawn_anchor_write_failed: "Spawn-anchor attestation publication failed before rename. The previous attestation was not replaced.";
82
+ readonly spawn_anchor_publication_uncertain: "The attestation was renamed, but its durability could not be confirmed. Inspect the existing attestation before any retry; it may take effect at the next broker start.";
83
+ readonly spawn_anchor_output_failed: "Attestation processing finished, but its result could not be emitted. Inspect the existing attestation before any retry.";
77
84
  readonly macos_nofile_limit_low: "The macOS open-file limit is below the recommended minimum; increase it before starting additional concurrent work.";
78
85
  readonly sdk_resource_gone: "The requested resource is not available from this session endpoint; this reports absent resource state, not an empty result.";
79
86
  readonly sdk_unknown_operation: "The --op value is not a known SDK operation id for this command. Per-session control ids include turn.prompt, turn.steer, turn.follow_up, turn.abort and turn.abort_and_prompt.";
@@ -13287,18 +13287,6 @@ export declare const TIER_MAP_SKIP_LIST: {
13287
13287
  readonly baseline: true;
13288
13288
  readonly rationale: "pre-feature baseline; not yet curated";
13289
13289
  };
13290
- readonly "openai-codex/gpt-image-2": {
13291
- readonly baseline: true;
13292
- readonly rationale: "multimodal catalog addition; not yet curated";
13293
- };
13294
- readonly "openai-codex/gpt-image-2.5-flare": {
13295
- readonly baseline: true;
13296
- readonly rationale: "multimodal catalog addition; not yet curated";
13297
- };
13298
- readonly "openai-codex/gpt-image-2.5-sunburst": {
13299
- readonly baseline: true;
13300
- readonly rationale: "multimodal catalog addition; not yet curated";
13301
- };
13302
13290
  readonly "openai/codex-mini-latest": {
13303
13291
  readonly baseline: true;
13304
13292
  readonly rationale: "pre-feature baseline; not yet curated";
@@ -13455,18 +13443,6 @@ export declare const TIER_MAP_SKIP_LIST: {
13455
13443
  readonly baseline: true;
13456
13444
  readonly rationale: "pre-feature baseline; not yet curated";
13457
13445
  };
13458
- readonly "openai/gpt-image-2": {
13459
- readonly baseline: true;
13460
- readonly rationale: "multimodal catalog addition; not yet curated";
13461
- };
13462
- readonly "openai/gpt-image-2.5-flare": {
13463
- readonly baseline: true;
13464
- readonly rationale: "multimodal catalog addition; not yet curated";
13465
- };
13466
- readonly "openai/gpt-image-2.5-sunburst": {
13467
- readonly baseline: true;
13468
- readonly rationale: "multimodal catalog addition; not yet curated";
13469
- };
13470
13446
  readonly "openai/gpt-realtime-2.1": {
13471
13447
  readonly baseline: true;
13472
13448
  readonly rationale: "pre-feature baseline; not yet curated";
@@ -129,6 +129,7 @@ export declare const ModelPresetRegistryPresetsSchema: z.ZodObject<{
129
129
  "google-gemini-cli": "google-gemini-cli";
130
130
  "google-generative-ai": "google-generative-ai";
131
131
  "google-vertex": "google-vertex";
132
+ "kiro-codewhisperer-stream": "kiro-codewhisperer-stream";
132
133
  "ollama-chat": "ollama-chat";
133
134
  "openai-codex-responses": "openai-codex-responses";
134
135
  "openai-completions": "openai-completions";
@@ -6,7 +6,7 @@ export { resolveModelProfileName } from "./model-profile-contract";
6
6
  import { type DurableModelProfileOwnership } from "./model-profile-ownership";
7
7
  import { type GjcModelAssignmentTargetId, type ModelRegistry } from "./model-registry";
8
8
  import { type ModelSelectorValue } from "./model-selector-value";
9
- import type { Settings } from "./settings";
9
+ import type { Settings, SettingsAtomicPatch } from "./settings";
10
10
  type UserCanonicalVariantSelection = {
11
11
  revision: number;
12
12
  canonicalVariant: string | undefined;
@@ -201,14 +201,18 @@ export interface PreparedModelProfileActivation {
201
201
  modelRegistry: PrepareModelProfileActivationOptions["modelRegistry"];
202
202
  }
203
203
  export interface MaterializeModelProfileAssignmentOptions {
204
- session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "sessionId" | "credentialSessionId" | "getConfiguredModelChain" | "getConfiguredModelChainState" | "setConfiguredModelChain" | "setActiveModelProfile" | "getActiveModelProfile" | "getActivatedModelProfile" | "getProfileInstalledOverrideState" | "getDefaultFallbackRuntimeState" | "restoreDefaultFallbackRuntimeState" | "modelRegistry" | "clearProfileInstalledOverrides">;
205
- settings: Pick<Settings, "clearOverride" | "get" | "getGlobal" | "getOverride" | "override" | "set" | "unset">;
204
+ session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "sessionId" | "credentialSessionId" | "getConfiguredModelChain" | "getConfiguredModelChainState" | "setConfiguredModelChain" | "setActiveModelProfile" | "getActiveModelProfile" | "getActivatedModelProfile" | "getProfileInstalledOverrideState" | "getDefaultFallbackRuntimeState" | "restoreDefaultFallbackRuntimeState" | "modelRegistry" | "clearProfileInstalledOverrides" | "dispose" | "sessionLifecycle" | "getUserModelSelectionRevision">;
205
+ settings: Pick<Settings, "clearOverride" | "get" | "getGlobal" | "getOverride" | "override" | "commitAtomicBatchWithCurrent">;
206
+ observedOwnership?: DurableModelProfileOwnership;
207
+ validateCurrent?: () => void;
206
208
  role: GjcModelAssignmentTargetId;
207
209
  selector: string;
208
210
  }
209
211
  export interface MaterializeModelProfileAssignmentsOptions {
210
- session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "sessionId" | "credentialSessionId" | "getConfiguredModelChain" | "getConfiguredModelChainState" | "setConfiguredModelChain" | "setActiveModelProfile" | "getActiveModelProfile" | "getActivatedModelProfile" | "getProfileInstalledOverrideState" | "getDefaultFallbackRuntimeState" | "restoreDefaultFallbackRuntimeState" | "modelRegistry" | "clearProfileInstalledOverrides">;
211
- settings: Pick<Settings, "clearOverride" | "get" | "getGlobal" | "getOverride" | "override" | "set" | "unset">;
212
+ session: Pick<ModelProfileActivationSession, "model" | "thinkingLevel" | "sessionId" | "credentialSessionId" | "getConfiguredModelChain" | "getConfiguredModelChainState" | "setConfiguredModelChain" | "setActiveModelProfile" | "getActiveModelProfile" | "getActivatedModelProfile" | "getProfileInstalledOverrideState" | "getDefaultFallbackRuntimeState" | "restoreDefaultFallbackRuntimeState" | "modelRegistry" | "clearProfileInstalledOverrides" | "dispose" | "sessionLifecycle" | "getUserModelSelectionRevision">;
213
+ settings: Pick<Settings, "clearOverride" | "get" | "getGlobal" | "getOverride" | "override" | "commitAtomicBatchWithCurrent">;
214
+ observedOwnership?: DurableModelProfileOwnership;
215
+ validateCurrent?: () => void;
212
216
  assignments: ReadonlyMap<GjcModelAssignmentTargetId, string> | Partial<Record<GjcModelAssignmentTargetId, string>>;
213
217
  }
214
218
  /**
@@ -221,8 +225,17 @@ export interface MaterializeModelProfileAssignmentsOptions {
221
225
  export declare function resolveMaterializationProfileIdentity(activatedProfile: string | undefined, durableProfile: string | undefined, includesDefault: boolean): string | undefined;
222
226
  /** Resolve startup-override materialization in activated-chain, profile, then global-default order. */
223
227
  export declare function resolveMaterializedDefaultSelector(activatedDefaultChain: readonly string[] | undefined, profileDefault: ModelSelectorValue | undefined, globalDefault: ModelSelectorValue | undefined): ModelSelectorValue | undefined;
224
- export declare function materializeActiveModelProfileAssignment(options: MaterializeModelProfileAssignmentOptions): boolean;
225
- export declare function materializeActiveModelProfileAssignments(options: MaterializeModelProfileAssignmentsOptions): boolean;
228
+ export declare function getModelAssignmentPatches(current: Readonly<Record<string, unknown>>, assignments: ReadonlyMap<GjcModelAssignmentTargetId, string>): SettingsAtomicPatch[];
229
+ /** Persist role-only intent under the same ownership lock without changing the owner. */
230
+ export declare function commitModelAssignments(settings: Pick<Settings, "getGlobal" | "getOverride" | "override" | "commitAtomicBatchWithCurrent">, assignments: ReadonlyMap<GjcModelAssignmentTargetId, string>, observedOwnership?: DurableModelProfileOwnership, validateCurrent?: () => void): Promise<void>;
231
+ /** Prepare concrete role patches without publishing session state or changing durable ownership. */
232
+ export declare function getModelProfileAssignmentMaterializationPatches(options: Omit<MaterializeModelProfileAssignmentOptions, "selector"> & {
233
+ /** Omit to materialize the configured roles without replacing any selection. */
234
+ selector?: string;
235
+ assignments?: ReadonlyMap<GjcModelAssignmentTargetId, string>;
236
+ }): SettingsAtomicPatch[];
237
+ export declare function materializeActiveModelProfileAssignment(options: MaterializeModelProfileAssignmentOptions): Promise<boolean>;
238
+ export declare function materializeActiveModelProfileAssignments(options: MaterializeModelProfileAssignmentsOptions): Promise<boolean>;
226
239
  export declare class ModelProfileCredentialError extends Error {
227
240
  readonly code: string;
228
241
  readonly profileLabel: string;
@@ -360,40 +373,6 @@ export declare function finishPreparedModelProfileActivation(prepared: PreparedM
360
373
  export declare function applyPreparedModelProfileActivation(prepared: PreparedModelProfileActivation, options?: ApplyModelProfileActivationOptions): Promise<void>;
361
374
  /** Restore an applied activation when its enclosing settings/registry commit fails. */
362
375
  export declare function rollbackPreparedModelProfileActivation(prepared: PreparedModelProfileActivation, options?: ApplyModelProfileActivationOptions): Promise<void>;
363
- export interface MaterializeModelProfileForDeletionResult {
364
- modelRoles: Record<string, ModelSelectorValue>;
365
- agentModelOverrides: Record<string, ModelSelectorValue>;
366
- previousModelRoles: Record<string, ModelSelectorValue>;
367
- previousAgentModelOverrides: Record<string, ModelSelectorValue>;
368
- previousPersistedModelRoles: Record<string, ModelSelectorValue> | undefined;
369
- previousPersistedAgentModelOverrides: Record<string, ModelSelectorValue> | undefined;
370
- previousModelRolesOverride: Record<string, ModelSelectorValue> | undefined;
371
- previousAgentModelOverridesOverride: Record<string, ModelSelectorValue> | undefined;
372
- previousDefaultProfileOverride: string | undefined;
373
- previousDefaultProfile: string | undefined;
374
- previousPersistedDefaultProfile: string | undefined;
375
- previousActiveModelProfile: string | undefined;
376
- previousActivatedModelProfile: string | undefined;
377
- previousDefaultChainState: ConfiguredModelChainState | undefined;
378
- previousDefaultFallbackRuntimeState: DefaultFallbackRuntimeState | undefined;
379
- previousProfileInstalledOverrideState: AgentSessionProfileInstalledOverrideState | undefined;
380
- /**
381
- * Restores the session sticky canonical variant that was snapshotted before
382
- * materialization cleared it. Internal closure capturing the registry,
383
- * session, and exact pre-clear selector — avoids threading a registry
384
- * through the restore options. Optional so callers that never materialized
385
- * (or use a registry without sticky support) can still restore settings.
386
- */
387
- restoreSessionCanonicalVariant?: () => void;
388
- }
389
- export declare function materializeModelProfileForDeletion(options: PrepareModelProfileActivationOptions & {
390
- settings: Pick<Settings, "clearOverride" | "flushOrThrow" | "get" | "getGlobal" | "override" | "set" | "unset">;
391
- }): Promise<MaterializeModelProfileForDeletionResult>;
392
- export declare function restoreMaterializedModelProfileForDeletion(options: {
393
- settings: Pick<Settings, "clearOverride" | "flushOrThrow" | "override" | "set" | "unset">;
394
- session: Pick<ModelProfileActivationSession, "setActiveModelProfile" | "setConfiguredModelChain" | "restoreDefaultFallbackRuntimeState" | "restoreProfileInstalledOverrideState">;
395
- snapshot: MaterializeModelProfileForDeletionResult;
396
- }): Promise<void>;
397
376
  export declare function activateModelProfile(options: PrepareModelProfileActivationOptions, applyOptions?: ApplyModelProfileActivationOptions): Promise<void>;
398
377
  /** Install only a profile's runtime role layer, preserving session model and configured-chain intent. */
399
378
  export declare function applyModelProfileRuntimeBindings(options: PrepareModelProfileActivationOptions, isCurrent?: () => boolean): Promise<void>;
@@ -5,6 +5,13 @@ export interface ModelProfileCatalogItem {
5
5
  id: string;
6
6
  displayName: string;
7
7
  source: "builtin" | "configured";
8
+ /**
9
+ * The provider family shown in the terminal's preset list, including the `CUSTOM` fallback for
10
+ * profiles that declare none, so the app and the terminal name the same group.
11
+ */
12
+ providerGroup?: string;
13
+ /** Index of that family in the terminal's group order; absent when the family is not listed. */
14
+ providerGroupRank?: number;
8
15
  available?: boolean;
9
16
  }
10
17
  export interface UnknownModelProfileDetails {
@@ -46,6 +46,11 @@ export interface ModelProfilePresentation {
46
46
  displayName: string;
47
47
  providerGroup: string;
48
48
  }
49
+ /**
50
+ * Position of a provider family in the preset group order. Families the terminal does not list
51
+ * report undefined, which sorts after every listed family.
52
+ */
53
+ export declare function modelProfileGroupRank(group: string): number | undefined;
49
54
  export declare function getModelProfilePresentation(profile: string | Pick<ModelProfileDefinition, "name" | "displayName" | "providerGroup">): ModelProfilePresentation;
50
55
  export declare function formatModelProfileDisplayLabel(profile: Pick<ModelProfileDefinition, "name" | "displayName">): string;
51
56
  export declare function groupModelProfilesForPresetLanding(profiles: ReadonlyMap<string, ModelProfileDefinition>): Map<string, ModelProfileDefinition[]>;
@@ -70,7 +70,7 @@ export declare const ModelsConfigFile: ConfigFile<{
70
70
  baseUrl?: string | undefined;
71
71
  apiKey?: string | undefined;
72
72
  apiKeyEnv?: string | undefined;
73
- api?: "anthropic-messages" | "azure-openai-responses" | "bedrock-converse-stream" | "cursor-agent" | "devin-acp" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "ollama-chat" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
73
+ api?: "anthropic-messages" | "azure-openai-responses" | "bedrock-converse-stream" | "cursor-agent" | "devin-acp" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "kiro-codewhisperer-stream" | "ollama-chat" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
74
74
  headers?: Record<string, string> | undefined;
75
75
  compat?: {
76
76
  supportsStore?: boolean | undefined;
@@ -138,7 +138,7 @@ export declare const ModelsConfigFile: ConfigFile<{
138
138
  models?: {
139
139
  id: string;
140
140
  name?: string | undefined;
141
- api?: "anthropic-messages" | "azure-openai-responses" | "bedrock-converse-stream" | "cursor-agent" | "devin-acp" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "ollama-chat" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
141
+ api?: "anthropic-messages" | "azure-openai-responses" | "bedrock-converse-stream" | "cursor-agent" | "devin-acp" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "kiro-codewhisperer-stream" | "ollama-chat" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
142
142
  baseUrl?: string | undefined;
143
143
  reasoning?: boolean | undefined;
144
144
  thinking?: {
@@ -58,7 +58,6 @@ export type CanonicalModelRegistry = Partial<Pick<ModelRegistry, "resolveCanonic
58
58
  export type ModelLookupRegistry = Pick<ModelRegistry, "getAvailable"> & Partial<CanonicalModelRegistry>;
59
59
  type CliModelRegistry = Pick<ModelRegistry, "getAll"> & Partial<CanonicalModelRegistry>;
60
60
  type InitialModelRegistry = Pick<ModelRegistry, "getAvailable">;
61
- type RestorableModelRegistry = Pick<ModelRegistry, "getAvailable" | "getApiKey">;
62
61
  /**
63
62
  * Find an exact explicit provider/model match.
64
63
  * Bare model ids are handled separately so canonical ids can coalesce variants.
@@ -167,6 +166,8 @@ export interface ModelChainResolutionOptions {
167
166
  /** Read-only auth eligibility for staged profile preflight when no access token can be exposed. */
168
167
  isProviderAuthAvailable?: (provider: string) => boolean;
169
168
  signal?: AbortSignal;
169
+ /** Filter out image-only models when resolving for chat roles (pass "chat" to filter, "image" or undefined to allow). */
170
+ chatRoleFilter?: "chat" | "image";
170
171
  }
171
172
  /**
172
173
  * Chain resolution must see fallback circuit state: adapters that wrap the
@@ -299,10 +300,3 @@ export declare function findInitialModel(options: {
299
300
  modelRegistry: InitialModelRegistry;
300
301
  credentialSessionId?: string;
301
302
  }): Promise<InitialModelResult>;
302
- /**
303
- * Restore model from session, with fallback to available models
304
- */
305
- export declare function restoreModelFromSession(savedProvider: string, savedModelId: string, currentModel: Model<Api> | undefined, shouldPrintMessages: boolean, modelRegistry: RestorableModelRegistry, credentialSessionId?: string): Promise<{
306
- model: Model<Api> | undefined;
307
- fallbackMessage: string | undefined;
308
- }>;
@@ -391,6 +391,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
391
391
  "google-gemini-cli": "google-gemini-cli";
392
392
  "google-generative-ai": "google-generative-ai";
393
393
  "google-vertex": "google-vertex";
394
+ "kiro-codewhisperer-stream": "kiro-codewhisperer-stream";
394
395
  "ollama-chat": "ollama-chat";
395
396
  "openai-codex-responses": "openai-codex-responses";
396
397
  "openai-completions": "openai-completions";
@@ -519,6 +520,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
519
520
  "google-gemini-cli": "google-gemini-cli";
520
521
  "google-generative-ai": "google-generative-ai";
521
522
  "google-vertex": "google-vertex";
523
+ "kiro-codewhisperer-stream": "kiro-codewhisperer-stream";
522
524
  "ollama-chat": "ollama-chat";
523
525
  "openai-codex-responses": "openai-codex-responses";
524
526
  "openai-completions": "openai-completions";
@@ -189,6 +189,15 @@ export interface PromptRequestV1 {
189
189
  coordinator_turn_id?: string;
190
190
  /** Retain prompt and source turn until the delegate's outer response is durable. */
191
191
  delegate_response_pending?: boolean;
192
+ /** Preserve steer disposition durably for recovery when a prompt is converted to a steer. */
193
+ steer_disposition?: {
194
+ accepted: boolean;
195
+ command_id: string;
196
+ turn_id: string;
197
+ queued_as?: string;
198
+ /** Synthetic coordinator turn removed when the steer settled; its projection is removed too. */
199
+ removed_turn_id?: string;
200
+ };
192
201
  safe_response?: Record<string, unknown>;
193
202
  error_code?: PublicReason | "idempotency_conflict";
194
203
  created_at: string;
@@ -67,6 +67,8 @@ interface CoordinatorServices {
67
67
  onCoordinatorEventWake?: () => void;
68
68
  /** Test barrier invoked after an accepted prompt receipt is durable and before turn finalization. */
69
69
  afterPromptReceiptPersisted?: (sessionId: string) => void | Promise<void>;
70
+ /** Test barrier invoked after a steer disposition settles and before projection repair. */
71
+ afterSteerDispositionSettled?: (sessionId: string) => void | Promise<void>;
70
72
  /** Test barrier invoked after an answer dispatch is claimed and before its final admission check. */
71
73
  afterAnswerRemoteStarted?: (sessionId: string) => void | Promise<void>;
72
74
  /** Test barrier invoked after accepted canonical finalization and before projection. */
@@ -26,9 +26,21 @@ export interface PythonRuntime {
26
26
  /** Path to virtual environment, if detected */
27
27
  venvPath?: string;
28
28
  }
29
+ /**
30
+ * Drop a project tool-bridge value. An incomplete or ambiguous declaration
31
+ * rejects every live value. A clear literal rejects only the same text.
32
+ * The registered bridge is applied after this filter, not through it.
33
+ */
34
+ export declare function pythonToolBridgeEnvRejected(name: string, value: string | undefined, provenance: {
35
+ literals: readonly string[];
36
+ ambiguous: boolean;
37
+ incomplete: boolean;
38
+ }): boolean;
29
39
  /**
30
40
  * Filter environment variables to a safe allowlist for Python subprocesses.
31
41
  * Removes sensitive API keys and limits to known-safe variables.
42
+ * Project tool-bridge names are omitted so the kernel cannot post tool calls
43
+ * to a repository server. Other `PI_` names stay.
32
44
  */
33
45
  export declare function filterEnv(env: Record<string, string | undefined>): Record<string, string | undefined>;
34
46
  /**
@@ -6,6 +6,7 @@
6
6
  * union so the same adapter can be reused by print, SDK, ACP, and executor callers.
7
7
  */
8
8
  import type { Model } from "@gajae-code/ai/core";
9
+ import { type DurableModelProfileOwnership, type ModelProfileOwnershipSettings } from "../../config/model-profile-ownership";
9
10
  import type { CompactOptions } from "./types";
10
11
  interface CompactableSession {
11
12
  compact(instructions?: string, options?: CompactOptions): Promise<unknown>;
@@ -16,20 +17,23 @@ interface SetModelCapableSession {
16
17
  modelRegistry: {
17
18
  getApiKey(model: Model, sessionId?: string): Promise<string | undefined>;
18
19
  };
20
+ settings: ModelProfileOwnershipSettings;
19
21
  setModel(model: Model, role?: string, options?: {
20
22
  cause?: string;
23
+ observedOwnership?: DurableModelProfileOwnership;
24
+ onMutationStarted?: () => void;
25
+ onMutationCompleted?: () => void;
21
26
  }): Promise<unknown>;
22
- /** Persist effective profile roles and clear its marker for a concrete default selection. */
23
- materializeActiveDefaultModelProfileAssignment?(model: Model): boolean;
24
- /** Drop a session-only profile marker and its runtime role overrides. */
25
- clearSessionOnlyModelProfileState?(): void;
26
- /** Fallback marker clear for legacy session adapters. */
27
- setActiveModelProfile?(name: string | undefined): void;
27
+ }
28
+ /** Internal host hooks run inside the selection admission around the durable mutation. */
29
+ export interface SetModelMutationHooks {
30
+ onBeforeMutation?: () => void;
31
+ onAfterMutation?: () => void;
28
32
  }
29
33
  /**
30
34
  * Helper for wiring the `setModel` action of an {@link ExtensionContext}.
31
35
  *
32
36
  * Returns false when no API key is available for the requested model.
33
37
  */
34
- export declare function runExtensionSetModel(session: SetModelCapableSession, model: Model): Promise<boolean>;
38
+ export declare function runExtensionSetModel(session: SetModelCapableSession, model: Model, hooks?: SetModelMutationHooks): Promise<boolean>;
35
39
  export {};
@@ -10,7 +10,7 @@
10
10
  import type { AgentFailureDiagnostic, AgentMessage, AgentToolResult, AgentToolUpdateCallback, RunSettlementProof, ThinkingLevel } from "@gajae-code/agent-core";
11
11
  import type { AttemptScope } from "@gajae-code/agent-core/attempt-scope";
12
12
  import type { CompactionResult } from "@gajae-code/agent-core/compaction";
13
- import type { Api, AssistantMessageEvent, AssistantMessageEventStream, Context, ImageContent, Model, ProviderResponseMetadata, SimpleStreamOptions, Static, TextContent, Tool, TSchema, UsageReport } from "@gajae-code/ai/core";
13
+ import type { Api, AssistantMessageEvent, AssistantMessageEventStream, Context, ImageContent, Model, ProviderResponseMetadata, SimpleStreamOptions, Static, StopReason, TextContent, Tool, TSchema, UsageReport } from "@gajae-code/ai/core";
14
14
  import type { OAuthCredentials, OAuthLoginCallbacks } from "@gajae-code/ai/utils/oauth/types";
15
15
  import type * as piCodingAgent from "@gajae-code/coding-agent";
16
16
  import type { AutocompleteItem, Component, EditorTheme, KeyId, TUI } from "@gajae-code/tui";
@@ -88,6 +88,8 @@ export interface ExtensionUIDialogOptions {
88
88
  /** Empty/whitespace-only submissions may be rejected by the selector. */
89
89
  allowEmpty?: boolean;
90
90
  };
91
+ /** Local selector/editor transitions; never serialized to remote UI clients. */
92
+ onInputModeChange?: (mode: "selector" | "custom_editor" | "clarification_editor") => void;
91
93
  /**
92
94
  * Inline free-text input for a non-answer clarification action. It is
93
95
  * separate from `customInput` so callers can distinguish "ask about these
@@ -194,6 +196,8 @@ export interface ExtensionUIContext {
194
196
  export interface ExtensionTranscriptEntry {
195
197
  id: string;
196
198
  role: string;
199
+ /** Authoritative assistant stop reason; absent for other roles or unknown legacy metadata. */
200
+ stopReason?: StopReason;
197
201
  textSummary: string;
198
202
  ts: string;
199
203
  body?: string;
@@ -1,4 +1,4 @@
1
- import type { GjcBundleIdentity, GjcBundleSummary, GjcInstallResult, GjcLifecycleResult, GjcPluginRegistryEntry, GjcPluginRegistrySource, GjcPluginScope, GjcReviewedUpdateToken, GjcToggleResult, GjcUninstallPreview, GjcUpdateApplyResult, GjcUpdatePreview, LocalRestorePlanV1, ReviewedRestoreTokenV1 } from "./types";
1
+ import type { GjcBundleIdentity, GjcBundleSummary, GjcInstallPreview, GjcInstallResult, GjcLifecycleResult, GjcPluginRegistryEntry, GjcPluginRegistrySource, GjcPluginScope, GjcReviewedUpdateToken, GjcToggleResult, GjcUninstallPreview, GjcUpdateApplyResult, GjcUpdatePreview, LocalRestorePlanV1, ReviewedRestoreTokenV1 } from "./types";
2
2
  /**
3
3
  * GJC bundle lifecycle service.
4
4
  *
@@ -54,6 +54,12 @@ export declare function uninstallGjcBundle(ctx: GjcLifecycleContext, identity: G
54
54
  * relative path and shadowed by a local directory of the same shape.
55
55
  */
56
56
  declare function isLocalDirectorySource(source: string): boolean;
57
+ /**
58
+ * Preview an install without performing it: validate the source, check for
59
+ * collisions, and return what would be installed without copying the bundle
60
+ * or writing the registry.
61
+ */
62
+ export declare function previewGjcBundleInstall(ctx: GjcLifecycleContext, scope: GjcPluginScope, source: string): Promise<GjcLifecycleResult<GjcInstallPreview>>;
57
63
  /**
58
64
  * Fresh install only. An existing target in the same scope is create-only and
59
65
  * is refused identically with or without force; upgrading is a separate,
@@ -421,6 +421,11 @@ export interface GjcInstallResult {
421
421
  status: "installed";
422
422
  summary: GjcBundleSummary;
423
423
  }
424
+ /** A resolved install that was deliberately not performed. */
425
+ export interface GjcInstallPreview {
426
+ status: "would-install";
427
+ summary: GjcBundleSummary;
428
+ }
424
429
  /** A resolved uninstall that was deliberately not performed. */
425
430
  export interface GjcUninstallPreview {
426
431
  status: "would-uninstall";