@gajae-code/coding-agent 0.6.4 → 0.7.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 (231) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/types/async/job-manager.d.ts +3 -1
  3. package/dist/types/cli/daemon-cli.d.ts +25 -0
  4. package/dist/types/cli/migrate-cli.d.ts +20 -0
  5. package/dist/types/cli/notify-cli.d.ts +23 -0
  6. package/dist/types/cli/setup-cli.d.ts +20 -1
  7. package/dist/types/commands/daemon.d.ts +41 -0
  8. package/dist/types/commands/migrate.d.ts +33 -0
  9. package/dist/types/commands/notify.d.ts +41 -0
  10. package/dist/types/config/keybindings.d.ts +4 -0
  11. package/dist/types/config/model-profile-activation.d.ts +12 -0
  12. package/dist/types/config/model-profiles.d.ts +2 -1
  13. package/dist/types/config/model-registry.d.ts +3 -3
  14. package/dist/types/config/models-config-schema.d.ts +5 -0
  15. package/dist/types/config/settings-schema.d.ts +38 -0
  16. package/dist/types/coordinator/contract.d.ts +1 -1
  17. package/dist/types/daemon/builtin.d.ts +20 -0
  18. package/dist/types/daemon/control-types.d.ts +57 -0
  19. package/dist/types/daemon/runtime.d.ts +25 -0
  20. package/dist/types/extensibility/extensions/types.d.ts +8 -0
  21. package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +2 -0
  22. package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +2 -2
  23. package/dist/types/gjc-runtime/goal-mode-request.d.ts +1 -1
  24. package/dist/types/gjc-runtime/session-layout.d.ts +59 -0
  25. package/dist/types/gjc-runtime/session-resolution.d.ts +47 -0
  26. package/dist/types/gjc-runtime/state-graph.d.ts +1 -1
  27. package/dist/types/gjc-runtime/state-runtime.d.ts +5 -4
  28. package/dist/types/gjc-runtime/state-schema.d.ts +2 -0
  29. package/dist/types/gjc-runtime/state-writer.d.ts +38 -7
  30. package/dist/types/gjc-runtime/ultragoal-guard.d.ts +15 -0
  31. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +21 -4
  32. package/dist/types/gjc-runtime/workflow-command-ref.d.ts +1 -1
  33. package/dist/types/gjc-runtime/workflow-manifest.d.ts +1 -1
  34. package/dist/types/harness-control-plane/storage.d.ts +2 -1
  35. package/dist/types/hooks/skill-state.d.ts +12 -4
  36. package/dist/types/migrate/action-planner.d.ts +11 -0
  37. package/dist/types/migrate/adapters/claude-code.d.ts +2 -0
  38. package/dist/types/migrate/adapters/codex.d.ts +5 -0
  39. package/dist/types/migrate/adapters/index.d.ts +45 -0
  40. package/dist/types/migrate/adapters/opencode.d.ts +2 -0
  41. package/dist/types/migrate/executor.d.ts +2 -0
  42. package/dist/types/migrate/mcp-mapper.d.ts +20 -0
  43. package/dist/types/migrate/report.d.ts +18 -0
  44. package/dist/types/migrate/skill-normalizer.d.ts +27 -0
  45. package/dist/types/migrate/types.d.ts +126 -0
  46. package/dist/types/modes/components/custom-editor.d.ts +1 -1
  47. package/dist/types/modes/components/oauth-selector.d.ts +2 -0
  48. package/dist/types/modes/controllers/selector-controller.d.ts +2 -2
  49. package/dist/types/modes/interactive-mode.d.ts +1 -1
  50. package/dist/types/modes/shared/agent-wire/unattended-audit.d.ts +1 -1
  51. package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +10 -0
  52. package/dist/types/modes/types.d.ts +7 -1
  53. package/dist/types/notifications/config-commands.d.ts +26 -0
  54. package/dist/types/notifications/config.d.ts +61 -0
  55. package/dist/types/notifications/helpers.d.ts +55 -0
  56. package/dist/types/notifications/html-format.d.ts +62 -0
  57. package/dist/types/notifications/index.d.ts +28 -0
  58. package/dist/types/notifications/rate-limit-pool.d.ts +93 -0
  59. package/dist/types/notifications/telegram-cli.d.ts +19 -0
  60. package/dist/types/notifications/telegram-daemon-cli.d.ts +11 -0
  61. package/dist/types/notifications/telegram-daemon-control.d.ts +56 -0
  62. package/dist/types/notifications/telegram-daemon.d.ts +276 -0
  63. package/dist/types/notifications/telegram-reference.d.ts +111 -0
  64. package/dist/types/notifications/threaded-inbound.d.ts +58 -0
  65. package/dist/types/notifications/threaded-render.d.ts +66 -0
  66. package/dist/types/notifications/topic-registry.d.ts +67 -0
  67. package/dist/types/research-plan/index.d.ts +1 -0
  68. package/dist/types/research-plan/ledger.d.ts +33 -0
  69. package/dist/types/rlm/artifacts.d.ts +1 -1
  70. package/dist/types/rlm/index.d.ts +12 -0
  71. package/dist/types/runtime-mcp/config-writer.d.ts +26 -0
  72. package/dist/types/session/agent-session.d.ts +39 -2
  73. package/dist/types/session/auth-storage.d.ts +1 -1
  74. package/dist/types/setup/credential-auto-import.d.ts +63 -0
  75. package/dist/types/setup/credential-import.d.ts +3 -0
  76. package/dist/types/setup/host-plugin-setup.d.ts +39 -0
  77. package/dist/types/skill-state/active-state.d.ts +6 -11
  78. package/dist/types/skill-state/canonical-skills.d.ts +3 -0
  79. package/dist/types/skill-state/workflow-hud.d.ts +2 -0
  80. package/dist/types/task/spawn-gate.d.ts +1 -10
  81. package/dist/types/tools/ask-answer-registry.d.ts +13 -0
  82. package/dist/types/tools/index.d.ts +18 -0
  83. package/dist/types/tools/subagent.d.ts +3 -0
  84. package/package.json +7 -7
  85. package/scripts/build-binary.ts +3 -0
  86. package/src/async/job-manager.ts +5 -1
  87. package/src/cli/daemon-cli.ts +122 -0
  88. package/src/cli/migrate-cli.ts +106 -0
  89. package/src/cli/notify-cli.ts +274 -0
  90. package/src/cli/setup-cli.ts +173 -84
  91. package/src/cli.ts +3 -0
  92. package/src/commands/daemon.ts +47 -0
  93. package/src/commands/deep-interview.ts +2 -2
  94. package/src/commands/migrate.ts +46 -0
  95. package/src/commands/notify.ts +61 -0
  96. package/src/commands/setup.ts +11 -1
  97. package/src/commands/state.ts +2 -1
  98. package/src/commands/team.ts +7 -3
  99. package/src/config/model-profile-activation.ts +74 -5
  100. package/src/config/model-profiles.ts +7 -4
  101. package/src/config/model-registry.ts +6 -3
  102. package/src/config/models-config-schema.ts +1 -1
  103. package/src/config/settings-schema.ts +29 -0
  104. package/src/coordinator/contract.ts +3 -0
  105. package/src/coordinator-mcp/policy.ts +10 -2
  106. package/src/coordinator-mcp/server.ts +270 -1
  107. package/src/daemon/builtin.ts +46 -0
  108. package/src/daemon/control-types.ts +65 -0
  109. package/src/daemon/runtime.ts +51 -0
  110. package/src/defaults/gjc/extensions/grok-cli-vendor/biome.json +0 -1
  111. package/src/defaults/gjc/skills/deep-interview/SKILL.md +28 -24
  112. package/src/defaults/gjc/skills/ralplan/SKILL.md +8 -4
  113. package/src/defaults/gjc/skills/team/SKILL.md +51 -47
  114. package/src/defaults/gjc/skills/ultragoal/SKILL.md +33 -13
  115. package/src/extensibility/custom-commands/loader.ts +0 -7
  116. package/src/extensibility/extensions/runner.ts +4 -0
  117. package/src/extensibility/extensions/types.ts +8 -0
  118. package/src/extensibility/gjc-plugins/injection.ts +23 -4
  119. package/src/extensibility/gjc-plugins/state.ts +16 -1
  120. package/src/gjc-runtime/deep-interview-recorder.ts +51 -18
  121. package/src/gjc-runtime/deep-interview-runtime.ts +49 -23
  122. package/src/gjc-runtime/goal-mode-request.ts +26 -11
  123. package/src/gjc-runtime/launch-tmux.ts +6 -1
  124. package/src/gjc-runtime/ralplan-runtime.ts +79 -50
  125. package/src/gjc-runtime/session-layout.ts +180 -0
  126. package/src/gjc-runtime/session-resolution.ts +217 -0
  127. package/src/gjc-runtime/state-graph.ts +1 -2
  128. package/src/gjc-runtime/state-migrations.ts +1 -0
  129. package/src/gjc-runtime/state-runtime.ts +247 -124
  130. package/src/gjc-runtime/state-schema.ts +2 -0
  131. package/src/gjc-runtime/state-writer.ts +289 -41
  132. package/src/gjc-runtime/team-runtime.ts +43 -19
  133. package/src/gjc-runtime/tmux-sessions.ts +7 -1
  134. package/src/gjc-runtime/ultragoal-guard.ts +102 -4
  135. package/src/gjc-runtime/ultragoal-runtime.ts +226 -60
  136. package/src/gjc-runtime/workflow-command-ref.ts +1 -2
  137. package/src/gjc-runtime/workflow-manifest.generated.json +27 -2
  138. package/src/gjc-runtime/workflow-manifest.ts +12 -3
  139. package/src/goals/tools/goal-tool.ts +11 -2
  140. package/src/harness-control-plane/storage.ts +14 -4
  141. package/src/hooks/native-skill-hook.ts +38 -12
  142. package/src/hooks/skill-state.ts +178 -83
  143. package/src/internal-urls/docs-index.generated.ts +9 -6
  144. package/src/main.ts +30 -0
  145. package/src/migrate/action-planner.ts +318 -0
  146. package/src/migrate/adapters/claude-code.ts +39 -0
  147. package/src/migrate/adapters/codex.ts +70 -0
  148. package/src/migrate/adapters/index.ts +277 -0
  149. package/src/migrate/adapters/opencode.ts +52 -0
  150. package/src/migrate/executor.ts +81 -0
  151. package/src/migrate/mcp-mapper.ts +152 -0
  152. package/src/migrate/report.ts +104 -0
  153. package/src/migrate/skill-normalizer.ts +80 -0
  154. package/src/migrate/types.ts +163 -0
  155. package/src/modes/acp/acp-event-mapper.ts +1 -0
  156. package/src/modes/bridge/bridge-mode.ts +2 -2
  157. package/src/modes/components/custom-editor.ts +30 -20
  158. package/src/modes/components/hook-editor.ts +7 -2
  159. package/src/modes/components/oauth-selector.ts +19 -0
  160. package/src/modes/controllers/event-controller.ts +20 -0
  161. package/src/modes/controllers/selector-controller.ts +80 -17
  162. package/src/modes/interactive-mode.ts +6 -2
  163. package/src/modes/rpc/rpc-mode.ts +2 -2
  164. package/src/modes/runtime-init.ts +1 -0
  165. package/src/modes/shared/agent-wire/event-contract.ts +1 -0
  166. package/src/modes/shared/agent-wire/event-envelope.ts +1 -0
  167. package/src/modes/shared/agent-wire/event-observation.ts +16 -0
  168. package/src/modes/shared/agent-wire/unattended-audit.ts +3 -2
  169. package/src/modes/shared/agent-wire/unattended-session.ts +22 -0
  170. package/src/modes/types.ts +7 -1
  171. package/src/modes/utils/ui-helpers.ts +23 -0
  172. package/src/notifications/config-commands.ts +50 -0
  173. package/src/notifications/config.ts +107 -0
  174. package/src/notifications/helpers.ts +135 -0
  175. package/src/notifications/html-format.ts +389 -0
  176. package/src/notifications/index.ts +663 -0
  177. package/src/notifications/rate-limit-pool.ts +179 -0
  178. package/src/notifications/telegram-cli.ts +194 -0
  179. package/src/notifications/telegram-daemon-cli.ts +74 -0
  180. package/src/notifications/telegram-daemon-control.ts +370 -0
  181. package/src/notifications/telegram-daemon.ts +1370 -0
  182. package/src/notifications/telegram-reference.ts +335 -0
  183. package/src/notifications/threaded-inbound.ts +80 -0
  184. package/src/notifications/threaded-render.ts +155 -0
  185. package/src/notifications/topic-registry.ts +133 -0
  186. package/src/prompts/agents/init.md +1 -1
  187. package/src/prompts/system/plan-mode-active.md +1 -1
  188. package/src/prompts/tools/ast-grep.md +1 -1
  189. package/src/prompts/tools/search.md +1 -1
  190. package/src/prompts/tools/task.md +1 -2
  191. package/src/research-plan/index.ts +1 -0
  192. package/src/research-plan/ledger.ts +177 -0
  193. package/src/rlm/artifacts.ts +12 -3
  194. package/src/rlm/index.ts +26 -0
  195. package/src/runtime-mcp/config-writer.ts +46 -0
  196. package/src/sdk.ts +16 -0
  197. package/src/session/agent-session.ts +128 -24
  198. package/src/session/auth-storage.ts +3 -0
  199. package/src/session/session-dump-format.ts +43 -2
  200. package/src/session/session-manager.ts +39 -5
  201. package/src/setup/credential-auto-import.ts +258 -0
  202. package/src/setup/credential-import.ts +17 -0
  203. package/src/setup/hermes/templates/operator-instructions.v1.md +10 -0
  204. package/src/setup/hermes-setup.ts +1 -1
  205. package/src/setup/host-plugin-setup.ts +142 -0
  206. package/src/skill-state/active-state.ts +72 -108
  207. package/src/skill-state/canonical-skills.ts +4 -0
  208. package/src/skill-state/deep-interview-mutation-guard.ts +28 -109
  209. package/src/skill-state/workflow-hud.ts +4 -2
  210. package/src/skill-state/workflow-state-contract.ts +3 -3
  211. package/src/slash-commands/builtin-registry.ts +4 -1
  212. package/src/task/agents.ts +1 -22
  213. package/src/task/executor.ts +5 -1
  214. package/src/task/index.ts +1 -41
  215. package/src/task/spawn-gate.ts +1 -38
  216. package/src/task/types.ts +1 -1
  217. package/src/tools/ask-answer-registry.ts +25 -0
  218. package/src/tools/ask.ts +108 -16
  219. package/src/tools/computer.ts +58 -4
  220. package/src/tools/image-gen.ts +5 -8
  221. package/src/tools/index.ts +19 -0
  222. package/src/tools/inspect-image.ts +16 -11
  223. package/src/tools/subagent-render.ts +7 -0
  224. package/src/tools/subagent.ts +38 -7
  225. package/dist/types/extensibility/custom-commands/bundled/review/index.d.ts +0 -10
  226. package/src/extensibility/custom-commands/bundled/review/index.ts +0 -456
  227. package/src/prompts/agents/explore.md +0 -58
  228. package/src/prompts/agents/plan.md +0 -49
  229. package/src/prompts/agents/reviewer.md +0 -141
  230. package/src/prompts/agents/task.md +0 -16
  231. package/src/prompts/review-request.md +0 -70
package/CHANGELOG.md CHANGED
@@ -2,6 +2,51 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.7.0] - 2026-06-22
6
+
7
+ ### Added
8
+
9
+ - Notifications SDK with configure-once Telegram UX: each session exposes a loopback WebSocket endpoint with a discovery file and a generic `action_needed`/`reply` JSON protocol, so any client (Telegram, Discord, Slack, mobile) can see action-needed signals and answer pending asks without RPC or terminal scraping (#874).
10
+ - Managed Telegram reference daemon with a threaded per-session surface: one-time identity header, streamed `context_update` (last message, task, goal, token/model usage, diff), live/finalized turn output, and agent image streaming (`image_attachment` + multipart `sendPhoto`).
11
+ - Typing indicator and native double-check acknowledgements for Telegram inbound messages (#989).
12
+ - Scalable `gjc daemon` control plane with safe reload, enforcing one `getUpdates` poller per bot token so new sessions attach to the existing daemon instead of causing Telegram 409 conflicts (#993).
13
+
14
+ ### Changed
15
+
16
+ - Asks are exempt from redaction so remote prompts stay readable and answerable; idle summaries are stripped and streamed content frames (`turn_stream`, `context_update`, `image_attachment`) are suppressed when redaction is enabled (#998, #1001).
17
+ - Telegram replies are routed by their thread/topic; removed the legacy `/answer <session-tag>` command in favour of thread-native replies.
18
+ - Pretty HTML formatting and markdown-table rendering for Telegram daemon output (#986, #997).
19
+
20
+ ### Fixed
21
+
22
+ - Strip embedded option indexes from Telegram button labels and stop double-numbering inline buttons (#994, #996).
23
+ - Free-text answers resolve pending asks and ask choices remain unredacted (#998, #1001).
24
+ - Recover in-flight sessions after a connection drop and connect new sessions during the `getUpdates` long-poll (#988, #990).
25
+ - Daemon hardening: deliver ask buttons at invocation, fix the topic-reuse race, write daemon logs to file with resilient frame handling, and de-duplicate idle output (#985, #991, and related).
26
+
27
+ ## [0.6.5] - 2026-06-21
28
+
29
+ ### Changed
30
+
31
+ - Scoped all GJC workflow state by session ID: skill state, plans, specs, and ledgers now live under per-session `.gjc/_session-{id}/` directories, so concurrent or resumed sessions no longer collide on shared workflow state.
32
+ - Hardened skill-state hooks with a writer revision policy, a force-ask on Stop, HUD reconciliation, and an fd-duplication guard; forced/authoritative state writes now survive corrupt prior state (#950).
33
+ - Migrated the global debug shortcut into the keybinding registry and added `pasteImage` as a single source of truth with default-collision diagnostics (#925, #939).
34
+ - Added safe import of custom skills and MCP servers via `migrate` (#944).
35
+ - Trimmed the bundled agent roster to the four canonical role agents: planner, architect, critic, and executor (#922).
36
+ - Added a research-plan ledger spike (#933).
37
+
38
+ ### Fixed
39
+
40
+ - Stopped including `bash` in the planning-phase mutation guard. The phase-boundary block (and the always-on `.gjc/**` runtime-owned block) now apply only to the fully-pathed `write`/`edit`/`ast_edit` tools; `bash` is never blocked by any workflow skill (`deep-interview`, `ralplan`, `ultragoal` goal-planning), so read-only shell commands run freely during planning. This reverts the `bash` parity added in 0.6.2; product-code and `.gjc/**` mutation are still gated through the dedicated edit tools (#951).
41
+ - Rejected counterexample-only claims in research-plan regardless of `dropCondition` wording (#942).
42
+ - Bounded computer-use screenshot inline images to avoid oversized payloads.
43
+ - Tolerated missing session env in guard reads (#930).
44
+ - Fixed a session-scoped active-state staleness bug where a freshly written mode-state revision was not reflected in the in-memory envelope, so the active-state/HUD writer skipped the newer update as stale — dropping the deep-interview ambiguity HUD chip after scoring and leaving the active-skills phase mirror behind a `handoff` transition.
45
+
46
+ ### Documentation
47
+
48
+ - Documented standalone MCP boundaries (#923).
49
+
5
50
  ## [0.6.4] - 2026-06-20
6
51
 
7
52
  ### Changed
@@ -30,6 +75,11 @@
30
75
  - Documented lifecycle notification hooks (#903).
31
76
  - Added a routed GJC session guide for Clawhip/Hermes/OpenClaw visible routed sessions and linked it from the Hermes docs and operator instructions.
32
77
 
78
+ ### Fixed
79
+
80
+ - Fixed combo/cross-provider model presets flipping the main provider on resume. A profile's main model was applied through `setModelTemporary`, which records the session `model_change` with `role: "temporary"`; on resume the session restored `models.default` (the stale pre-profile base model), so an "Apply for this session" combo like `opus-codex` came back on the base default (e.g. `openai-codex/gpt-5.5`) instead of the profile's main model (`anthropic/claude-opus-4-8`). Profile activation now records its main model as the session default (without writing global settings), while transient retry/fallback/context-promotion/plan-mode switches keep `role: "temporary"` so the issue #849 protection is preserved.
81
+ - Hardened the model-profile activation rollback so a failed activation no longer poisons the resume default. The rollback previously restored the pre-activation *live* model as the session default (`role: "default"`); if the user was on a transient retry/fallback/context-promotion/plan switch when activation failed, that transient model was promoted to the resume default and weakened the issue #849 protection. Activation now snapshots the pre-activation resume default separately from the live model and re-asserts it on rollback, while the runtime live model still rolls back as a transient switch (`role: "temporary"`).
82
+
33
83
  ## [0.6.3] - 2026-06-19
34
84
 
35
85
  ### Fixed
@@ -106,6 +156,7 @@
106
156
 
107
157
  ### Fixed
108
158
 
159
+ - Rendered `/dump` tool-call parameters with readable structured bodies, XML-safe text, and decoded Unicode escape sequences so `ask`/`proxy_ask` deep-interview payloads no longer show dense `questions` JSON or literal Korean `\u...` escapes.
109
160
  - Prevented `gjc --tmux` partial-launch diagnostics from throwing when stderr is already closed during shutdown.
110
161
  - Fixed v0.5.1-style macOS/Linux standalone binaries crashing before the first model request with `Cannot find module '@gajae-code/natives' from '/$bunfs/root/gjc-*'` when pre-prompt context maintenance invokes the native tokenizer.
111
162
  - Mapped the retired `codex-standard` model profile name to `codex-medium` during profile activation, **as a fallback only** so a user-defined profile literally named `codex-standard` is never shadowed, letting stale `modelProfile.default: codex-standard` configs reach activation instead of blocking startup after the rebuilt profile catalog.
@@ -68,7 +68,9 @@ export interface SubagentLiveHandle {
68
68
  /** Request a cooperative safe-boundary pause (never aborts the in-flight tool). */
69
69
  requestPause(): void;
70
70
  /** Inject a steering message into the live session. */
71
- injectMessage(content: string, deliverAs: "steer" | "followUp" | "nextTurn"): Promise<void>;
71
+ injectMessage(content: string, deliverAs: "steer" | "followUp" | "nextTurn", opts?: {
72
+ fromAgentId?: string;
73
+ }): Promise<void>;
72
74
  }
73
75
  /**
74
76
  * Canonical, stable-id-keyed record for a subagent. Survives `AsyncJob`
@@ -0,0 +1,25 @@
1
+ /**
2
+ * `gjc daemon` command handler.
3
+ *
4
+ * Generic over the static built-in daemon controller map: lists/inspects
5
+ * daemons and drives cooperative stop/reload. Telegram is the only kind today.
6
+ */
7
+ import { Settings } from "../config/settings";
8
+ import type { BuiltInDaemonController, DaemonKind } from "../daemon/control-types";
9
+ export type DaemonCliAction = "list" | "status" | "stop" | "reload";
10
+ export interface DaemonCommandArgs {
11
+ action: DaemonCliAction;
12
+ kinds: DaemonKind[];
13
+ all: boolean;
14
+ json: boolean;
15
+ force: boolean;
16
+ gracefulTimeoutMs?: number;
17
+ killTimeoutMs?: number;
18
+ spawnIfStopped?: boolean;
19
+ }
20
+ export interface DaemonCommandDeps {
21
+ settings?: Settings;
22
+ controllers?: BuiltInDaemonController[];
23
+ }
24
+ export declare function parseDaemonArgs(argv: string[]): DaemonCommandArgs | undefined;
25
+ export declare function runDaemonCommand(cmd: DaemonCommandArgs, deps?: DaemonCommandDeps): Promise<void>;
@@ -0,0 +1,20 @@
1
+ import { type MigrateReport, type MigrateSource } from "../migrate/types";
2
+ export interface MigrateCommandArgs {
3
+ from: string[];
4
+ project: boolean;
5
+ force: boolean;
6
+ dryRun: boolean;
7
+ json: boolean;
8
+ /** Test seam: override home dir for source discovery. */
9
+ homeDir?: string;
10
+ /** Test seam: override cwd for project-scope destinations. */
11
+ cwd?: string;
12
+ }
13
+ export declare class MigrateArgsError extends Error {
14
+ }
15
+ /** Expand `all`/repeated `--from`, validate, and return sources in canonical order. */
16
+ export declare function resolveSources(from: string[]): MigrateSource[];
17
+ /** Run the migration and return the report (does not set process.exitCode). */
18
+ export declare function runMigrate(args: MigrateCommandArgs): Promise<MigrateReport>;
19
+ /** CLI entry: run, render, and set the process exit code. */
20
+ export declare function runMigrateCommand(args: MigrateCommandArgs): Promise<void>;
@@ -0,0 +1,23 @@
1
+ import { Settings } from "../config/settings";
2
+ export type NotifyAction = "setup" | "status" | "daemon-internal";
3
+ export interface NotifyCommandArgs {
4
+ action: NotifyAction;
5
+ smoke?: boolean;
6
+ rawArgs: string[];
7
+ token?: string;
8
+ chatId?: string;
9
+ redact?: boolean;
10
+ }
11
+ export interface NotifyCommandDeps {
12
+ fetchImpl?: typeof fetch;
13
+ apiBase?: string;
14
+ settings?: Settings;
15
+ setupToken?: string;
16
+ pollTimeoutMs?: number;
17
+ pollIntervalMs?: number;
18
+ setupChatId?: string;
19
+ setupRedact?: boolean;
20
+ }
21
+ export declare function parseNotifyArgs(args: string[]): NotifyCommandArgs | undefined;
22
+ export declare function runNotifyCommand(cmd: NotifyCommandArgs, deps?: NotifyCommandDeps): Promise<void>;
23
+ export declare function printNotifyHelp(): void;
@@ -3,7 +3,9 @@
3
3
  *
4
4
  * Handles `gjc setup [component]` to install the normal defaults or optional feature dependencies.
5
5
  */
6
- export type SetupComponent = "credentials" | "defaults" | "hermes" | "hooks" | "provider" | "python" | "stt";
6
+ import { AuthStorage, SqliteAuthCredentialStore } from "@gajae-code/ai";
7
+ import { runExternalCredentialAutoImport } from "../setup/credential-auto-import";
8
+ export type SetupComponent = "claude" | "codex" | "credentials" | "defaults" | "hermes" | "hooks" | "provider" | "python" | "stt";
7
9
  export interface SetupCommandArgs {
8
10
  component: SetupComponent;
9
11
  flags: {
@@ -34,6 +36,7 @@ export interface SetupCommandArgs {
34
36
  profileDir?: string;
35
37
  yes?: boolean;
36
38
  dryRun?: boolean;
39
+ keychain?: boolean;
37
40
  };
38
41
  }
39
42
  /**
@@ -48,6 +51,22 @@ export declare function parseSetupArgs(args: string[]): SetupCommandArgs | undef
48
51
  * Run the setup command.
49
52
  */
50
53
  export declare function runSetupCommand(cmd: SetupCommandArgs): Promise<void>;
54
+ /**
55
+ * Discover existing Claude Code / Codex CLI credentials and import them into the
56
+ * gjc credential store after a redacted preview + confirmation. Falls back to
57
+ * manual-setup guidance when nothing importable is found.
58
+ */
59
+ export interface CredentialsSetupDependencies {
60
+ openStore?: typeof SqliteAuthCredentialStore.open;
61
+ createAuthStorage?: (store: Awaited<ReturnType<typeof SqliteAuthCredentialStore.open>>) => AuthStorage;
62
+ discover?: Parameters<typeof runExternalCredentialAutoImport>[0]["discover"];
63
+ }
64
+ export declare function handleCredentialsSetup(flags: {
65
+ json?: boolean;
66
+ yes?: boolean;
67
+ dryRun?: boolean;
68
+ keychain?: boolean;
69
+ }, deps?: CredentialsSetupDependencies): Promise<void>;
51
70
  /**
52
71
  * Print setup command help.
53
72
  */
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Manage GJC background daemons (status/list/stop/reload).
3
+ */
4
+ import { Command } from "@gajae-code/utils/cli";
5
+ import { type DaemonCliAction } from "../cli/daemon-cli";
6
+ export default class Daemon extends Command {
7
+ static description: string;
8
+ static args: {
9
+ action: import("@gajae-code/utils/cli").ArgDescriptor & {
10
+ description: string;
11
+ required: false;
12
+ options: DaemonCliAction[];
13
+ };
14
+ kind: import("@gajae-code/utils/cli").ArgDescriptor & {
15
+ description: string;
16
+ required: false;
17
+ multiple: true;
18
+ };
19
+ };
20
+ static flags: {
21
+ all: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
22
+ description: string;
23
+ };
24
+ json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
25
+ description: string;
26
+ };
27
+ force: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
28
+ description: string;
29
+ };
30
+ "graceful-timeout-ms": import("@gajae-code/utils/cli").FlagDescriptor<"integer"> & {
31
+ description: string;
32
+ };
33
+ "kill-timeout-ms": import("@gajae-code/utils/cli").FlagDescriptor<"integer"> & {
34
+ description: string;
35
+ };
36
+ "spawn-if-stopped": import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
37
+ description: string;
38
+ };
39
+ };
40
+ run(): Promise<void>;
41
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Import MCP servers and skills from other coding agents into GJC.
3
+ */
4
+ import { Command } from "@gajae-code/utils/cli";
5
+ export default class Migrate extends Command {
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {
9
+ from: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
10
+ description: string;
11
+ multiple: true;
12
+ required: true;
13
+ };
14
+ project: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
15
+ description: string;
16
+ default: boolean;
17
+ };
18
+ force: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
19
+ description: string;
20
+ default: boolean;
21
+ };
22
+ "dry-run": import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
23
+ description: string;
24
+ default: boolean;
25
+ };
26
+ json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
27
+ char: string;
28
+ description: string;
29
+ default: boolean;
30
+ };
31
+ };
32
+ run(): Promise<void>;
33
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Configure Telegram notifications.
3
+ */
4
+ import { Command } from "@gajae-code/utils/cli";
5
+ import { type NotifyAction } from "../cli/notify-cli";
6
+ export default class Notify extends Command {
7
+ static description: string;
8
+ static args: {
9
+ action: import("@gajae-code/utils/cli").ArgDescriptor & {
10
+ description: string;
11
+ required: false;
12
+ options: NotifyAction[];
13
+ };
14
+ extra: import("@gajae-code/utils/cli").ArgDescriptor & {
15
+ description: string;
16
+ required: false;
17
+ multiple: true;
18
+ };
19
+ };
20
+ static flags: {
21
+ smoke: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
22
+ description: string;
23
+ };
24
+ token: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
25
+ description: string;
26
+ };
27
+ "chat-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
28
+ description: string;
29
+ };
30
+ redact: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
31
+ description: string;
32
+ };
33
+ "owner-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
34
+ description: string;
35
+ };
36
+ "agent-dir": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
37
+ description: string;
38
+ };
39
+ };
40
+ run(): Promise<void>;
41
+ }
@@ -173,6 +173,10 @@ export declare const KEYBINDINGS: {
173
173
  readonly defaultKeys: ["escape", "ctrl+c"];
174
174
  readonly description: "Cancel selection";
175
175
  };
176
+ readonly "tui.global.debug": {
177
+ readonly defaultKeys: "shift+ctrl+d";
178
+ readonly description: "Toggle debug overlay";
179
+ };
176
180
  readonly "app.interrupt": {
177
181
  readonly defaultKeys: "escape";
178
182
  readonly description: "Interrupt current operation";
@@ -7,6 +7,8 @@ type ModelProfileActivationSession = Pick<AgentSession, "model" | "thinkingLevel
7
7
  setModelTemporary?: AgentSession["setModelTemporary"];
8
8
  setActiveModelProfile?: (name: string | undefined) => void;
9
9
  getActiveModelProfile?: () => string | undefined;
10
+ getSessionDefaultModelSelector?: () => string | undefined;
11
+ recordResumeDefaultModel?: (selector: string) => void;
10
12
  };
11
13
  export interface PrepareModelProfileActivationOptions {
12
14
  session: ModelProfileActivationSession;
@@ -23,10 +25,20 @@ export interface PreparedModelProfileActivation {
23
25
  previousModel: Model<Api> | undefined;
24
26
  previousThinkingLevel: ThinkingLevel | undefined;
25
27
  previousAgentModelOverrides: Record<string, string>;
28
+ previousModelRoles: Record<string, string>;
26
29
  defaultModel: Model<Api> | undefined;
27
30
  defaultThinkingLevel: ThinkingLevel | undefined;
31
+ modelRoles: Record<string, string>;
28
32
  agentModelOverrides: Record<string, string>;
29
33
  previousActiveModelProfile: string | undefined;
34
+ /**
35
+ * The session resume default ("provider/id") captured BEFORE activation —
36
+ * the model resume would restore prior to this profile. Snapshotted
37
+ * separately from `previousModel` (the live runtime model, which may be a
38
+ * transient switch) so a failed-activation rollback restores the correct
39
+ * resume default without promoting a transient model to it.
40
+ */
41
+ previousSessionDefaultModel: string | undefined;
30
42
  }
31
43
  export declare function formatModelProfileCredentialError(profileName: string, providers: readonly string[]): string;
32
44
  export declare function prepareModelProfileActivation(options: PrepareModelProfileActivationOptions): Promise<PreparedModelProfileActivation>;
@@ -20,7 +20,8 @@ export interface ModelProfileDefinition {
20
20
  }
21
21
  export interface ResolvedProfileBinding {
22
22
  defaultSelector?: string;
23
- agentModelOverrides: Partial<Record<Exclude<ModelProfileRole, "default">, string>>;
23
+ modelRoles: Partial<Record<"vision", string>>;
24
+ agentModelOverrides: Partial<Record<Exclude<ModelProfileRole, "default" | "vision">, string>>;
24
25
  }
25
26
  export declare function deriveModelProfileMappedProviders(definition: Pick<ModelProfileDefinition, "modelMapping">): string[];
26
27
  export declare function aggregateModelProfileRequiredProviders(requiredProviders: readonly string[], definition: Pick<ModelProfileDefinition, "modelMapping">): string[];
@@ -11,7 +11,7 @@ import { type Settings } from "./settings";
11
11
  export type { CanonicalModelIndex, CanonicalModelRecord, CanonicalModelVariant, ModelEquivalenceConfig };
12
12
  export declare const kNoAuth = "N/A";
13
13
  export declare function isAuthenticated(apiKey: string | undefined | null): apiKey is string;
14
- export type ModelRole = "default";
14
+ export type ModelRole = "default" | "vision";
15
15
  export interface ModelRoleInfo {
16
16
  tag?: string;
17
17
  name: string;
@@ -19,7 +19,7 @@ export interface ModelRoleInfo {
19
19
  }
20
20
  export declare const MODEL_ROLES: Record<ModelRole, ModelRoleInfo>;
21
21
  export declare const MODEL_ROLE_IDS: ModelRole[];
22
- export type GjcModelAssignmentTargetId = "default" | "executor" | "architect" | "planner" | "critic";
22
+ export type GjcModelAssignmentTargetId = "default" | "vision" | "executor" | "architect" | "planner" | "critic";
23
23
  export interface GjcModelAssignmentTargetInfo extends ModelRoleInfo {
24
24
  id: GjcModelAssignmentTargetId;
25
25
  settingsPath: "modelRoles" | "task.agentModelOverrides";
@@ -268,7 +268,7 @@ export declare const ModelsConfigFile: ConfigFile<{
268
268
  profiles?: Record<string, {
269
269
  required_providers: string[];
270
270
  display_name?: string | undefined;
271
- model_mapping: Partial<Record<"architect" | "critic" | "default" | "executor" | "planner", string>>;
271
+ model_mapping: Partial<Record<"architect" | "critic" | "default" | "executor" | "planner" | "vision", string>>;
272
272
  }> | undefined;
273
273
  }>;
274
274
  /** Provider override config (baseUrl, headers, apiKey, compat, transport) without custom models */
@@ -68,6 +68,7 @@ export declare const ProfileRoleSchema: z.ZodEnum<{
68
68
  default: "default";
69
69
  executor: "executor";
70
70
  planner: "planner";
71
+ vision: "vision";
71
72
  }>;
72
73
  export declare const ProfileModelSelectorSchema: z.ZodString;
73
74
  export declare const ProfileModelMappingSchema: z.ZodRecord<z.ZodEnum<{
@@ -76,6 +77,7 @@ export declare const ProfileModelMappingSchema: z.ZodRecord<z.ZodEnum<{
76
77
  default: "default";
77
78
  executor: "executor";
78
79
  planner: "planner";
80
+ vision: "vision";
79
81
  }> & z.core.$partial, z.ZodString>;
80
82
  export declare const ProfileDefinitionSchema: z.ZodObject<{
81
83
  required_providers: z.ZodArray<z.ZodString>;
@@ -86,6 +88,7 @@ export declare const ProfileDefinitionSchema: z.ZodObject<{
86
88
  default: "default";
87
89
  executor: "executor";
88
90
  planner: "planner";
91
+ vision: "vision";
89
92
  }> & z.core.$partial, z.ZodString>;
90
93
  }, z.core.$strict>;
91
94
  export declare const ProfilesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -97,6 +100,7 @@ export declare const ProfilesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
97
100
  default: "default";
98
101
  executor: "executor";
99
102
  planner: "planner";
103
+ vision: "vision";
100
104
  }> & z.core.$partial, z.ZodString>;
101
105
  }, z.core.$strict>>;
102
106
  export declare const ModelOverrideSchema: z.ZodObject<{
@@ -687,6 +691,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
687
691
  default: "default";
688
692
  executor: "executor";
689
693
  planner: "planner";
694
+ vision: "vision";
690
695
  }> & z.core.$partial, z.ZodString>;
691
696
  }, z.core.$strict>>>;
692
697
  }, z.core.$strict>;
@@ -118,6 +118,32 @@ export declare const SETTINGS_SCHEMA: {
118
118
  readonly type: "string";
119
119
  readonly default: undefined;
120
120
  };
121
+ readonly "notifications.enabled": {
122
+ readonly type: "boolean";
123
+ readonly default: false;
124
+ };
125
+ readonly "notifications.telegram.botToken": {
126
+ readonly type: "string";
127
+ readonly default: undefined;
128
+ };
129
+ readonly "notifications.telegram.chatId": {
130
+ readonly type: "string";
131
+ readonly default: undefined;
132
+ };
133
+ readonly "notifications.redact": {
134
+ readonly type: "boolean";
135
+ readonly default: false;
136
+ };
137
+ readonly "notifications.verbosity": {
138
+ readonly type: "string";
139
+ readonly default: "lean";
140
+ readonly validate: (value: string) => value is "lean" | "verbose";
141
+ };
142
+ readonly "notifications.daemon.idleTimeoutMs": {
143
+ readonly type: "number";
144
+ readonly default: 60000;
145
+ readonly validate: (value: number) => boolean;
146
+ };
121
147
  readonly autoResume: {
122
148
  readonly type: "boolean";
123
149
  readonly default: false;
@@ -3542,6 +3568,17 @@ export interface ShellMinimizerSettings {
3542
3568
  except: string[];
3543
3569
  maxCaptureBytes: number;
3544
3570
  }
3571
+ export interface NotificationsSettings {
3572
+ enabled: boolean;
3573
+ telegram: {
3574
+ botToken: string | undefined;
3575
+ chatId: string | undefined;
3576
+ };
3577
+ redact: boolean;
3578
+ daemon: {
3579
+ idleTimeoutMs: number;
3580
+ };
3581
+ }
3545
3582
  /** Map group prefix -> typed settings interface */
3546
3583
  export interface GroupTypeMap {
3547
3584
  compaction: CompactionSettings;
@@ -3560,6 +3597,7 @@ export interface GroupTypeMap {
3560
3597
  modelTags: ModelTagsSettings;
3561
3598
  cycleOrder: string[];
3562
3599
  shellMinimizer: ShellMinimizerSettings;
3600
+ notifications: NotificationsSettings;
3563
3601
  }
3564
3602
  export type GroupPrefix = keyof GroupTypeMap;
3565
3603
  export {};
@@ -1,4 +1,4 @@
1
1
  export declare const COORDINATOR_MCP_PROTOCOL_VERSION = "2024-11-05";
2
2
  export declare const COORDINATOR_MCP_SERVER_NAME = "gjc-coordinator-mcp";
3
- export declare const COORDINATOR_MCP_TOOL_NAMES: readonly ["gjc_coordinator_list_sessions", "gjc_coordinator_read_status", "gjc_coordinator_read_tail", "gjc_coordinator_list_questions", "gjc_coordinator_list_artifacts", "gjc_coordinator_read_artifact", "gjc_coordinator_read_coordination_status", "gjc_coordinator_watch_events", "gjc_coordinator_register_session", "gjc_coordinator_start_session", "gjc_coordinator_send_prompt", "gjc_coordinator_submit_question_answer", "gjc_coordinator_read_turn", "gjc_coordinator_await_turn", "gjc_coordinator_report_status"];
3
+ export declare const COORDINATOR_MCP_TOOL_NAMES: readonly ["gjc_coordinator_list_sessions", "gjc_coordinator_read_status", "gjc_coordinator_read_tail", "gjc_coordinator_list_questions", "gjc_coordinator_list_artifacts", "gjc_coordinator_read_artifact", "gjc_coordinator_read_coordination_status", "gjc_coordinator_watch_events", "gjc_coordinator_register_session", "gjc_coordinator_start_session", "gjc_coordinator_send_prompt", "gjc_coordinator_submit_question_answer", "gjc_coordinator_read_turn", "gjc_coordinator_await_turn", "gjc_coordinator_report_status", "gjc_delegate_plan", "gjc_delegate_execute", "gjc_delegate_team"];
4
4
  export type CoordinatorToolName = (typeof COORDINATOR_MCP_TOOL_NAMES)[number];
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Static built-in daemon controller map.
3
+ *
4
+ * Intentionally a static map keyed by daemon kind rather than a mutable plugin
5
+ * registry: there is exactly one kind today (`telegram`). Promote to a richer
6
+ * registry only when a second daemon kind exists.
7
+ */
8
+ import type { Settings } from "../config/settings";
9
+ import { type TelegramDaemonControlDeps } from "../notifications/telegram-daemon-control";
10
+ import type { BuiltInDaemonController, DaemonKind } from "./control-types";
11
+ export declare const BUILT_IN_DAEMON_KINDS: readonly ["telegram"];
12
+ export interface BuiltInDaemonControllerDeps {
13
+ telegram?: TelegramDaemonControlDeps;
14
+ }
15
+ export declare function createBuiltInDaemonControllers(settings: Settings, deps?: BuiltInDaemonControllerDeps): Record<DaemonKind, BuiltInDaemonController>;
16
+ /**
17
+ * Resolve the controllers a command should act on. `--all` selects every
18
+ * built-in kind; otherwise the explicit `kinds` (defaulting to `telegram`).
19
+ */
20
+ export declare function selectDaemonControllers(settings: Settings, kinds: DaemonKind[] | undefined, all: boolean, deps?: BuiltInDaemonControllerDeps): BuiltInDaemonController[];
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Public types for the `gjc daemon` control plane.
3
+ *
4
+ * Deliberately compact: a small result/status surface plus a built-in
5
+ * controller contract. There is exactly one daemon kind today (`telegram`);
6
+ * a richer registry is intentionally deferred until a second kind exists.
7
+ */
8
+ export type DaemonKind = "telegram";
9
+ export type DaemonAction = "list" | "status" | "stop" | "reload";
10
+ export type DaemonHealth = "not_configured" | "stopped" | "running" | "stale" | "stopping" | "error";
11
+ export interface DaemonRuntimeInfo {
12
+ /** `source` when respawn goes through bun/node + the entry script; `compiled` for a single-file binary. */
13
+ mode: "source" | "compiled";
14
+ execPath: string;
15
+ /** True only in source/dev mode, where a respawn loads amended TypeScript directly. */
16
+ reloadPicksUpSourceEdits: boolean;
17
+ /** Present when the runtime mode constrains what reload can achieve (e.g. compiled binary). */
18
+ warning?: string;
19
+ }
20
+ export interface DaemonStatus {
21
+ kind: DaemonKind;
22
+ configured: boolean;
23
+ health: DaemonHealth;
24
+ pid?: number;
25
+ ownerId?: string;
26
+ startedAt?: number;
27
+ heartbeatAt?: number;
28
+ roots?: string[];
29
+ rootCount?: number;
30
+ runtime: DaemonRuntimeInfo;
31
+ detail?: string;
32
+ }
33
+ export interface DaemonOperationOptions {
34
+ /** How long to wait for cooperative release before escalating. */
35
+ gracefulTimeoutMs?: number;
36
+ /** How long to wait for the old pid to die after SIGKILL. */
37
+ killTimeoutMs?: number;
38
+ /** Allow hard-kill escalation / acting on a still-live owner. */
39
+ force?: boolean;
40
+ /** For reload: spawn a fresh owner even when none is currently running. */
41
+ spawnIfStopped?: boolean;
42
+ }
43
+ export interface DaemonOperationResult {
44
+ kind: DaemonKind;
45
+ action: Exclude<DaemonAction, "list">;
46
+ ok: boolean;
47
+ before?: DaemonStatus;
48
+ after?: DaemonStatus;
49
+ warnings: string[];
50
+ message: string;
51
+ }
52
+ export interface BuiltInDaemonController {
53
+ readonly kind: DaemonKind;
54
+ status(): Promise<DaemonStatus>;
55
+ stop(opts?: DaemonOperationOptions): Promise<DaemonOperationResult>;
56
+ reload(opts?: DaemonOperationOptions): Promise<DaemonOperationResult>;
57
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Shared source-vs-compiled runtime detection for daemon spawning.
3
+ *
4
+ * Centralizes the logic previously embedded in `ensureTelegramDaemonRunning`
5
+ * so session autostart, reload, and status reporting agree on how a daemon
6
+ * process is launched and whether a reload can pick up amended source.
7
+ */
8
+ export interface GjcRuntimeSpawnInfo {
9
+ execPath: string;
10
+ mode: "source" | "compiled";
11
+ /** Prefix prepended before the gjc subcommand args; `[Bun.main]` in source mode, otherwise `[]`. */
12
+ argsPrefix: string[];
13
+ /** True only when respawn loads edited TypeScript directly (source/dev mode). */
14
+ reloadPicksUpSourceEdits: boolean;
15
+ /** Set in compiled mode to explain that a rebuild is required before reload picks up source edits. */
16
+ warning?: string;
17
+ }
18
+ /**
19
+ * Resolve how to spawn a detached gjc subcommand for the current runtime.
20
+ *
21
+ * Source/dev mode (bun/node) prepends the entry script (`Bun.main`) so the
22
+ * respawn loads edited source. A compiled single-file binary self-spawns its
23
+ * own subcommand directly and cannot pick up workspace source edits.
24
+ */
25
+ export declare function resolveGjcRuntimeSpawnInfo(execPath?: string): GjcRuntimeSpawnInfo;
@@ -20,6 +20,7 @@ import type { PythonResult } from "../../eval/py/executor";
20
20
  import type { BashResult } from "../../exec/bash-executor";
21
21
  import type { ExecOptions, ExecResult } from "../../exec/exec";
22
22
  import type { CustomEditor } from "../../modes/components/custom-editor";
23
+ import type { WorkflowGateEmitter } from "../../modes/shared/agent-wire/unattended-session";
23
24
  import type { Theme } from "../../modes/theme/theme";
24
25
  import type { CustomMessage } from "../../session/messages";
25
26
  import type { ReadonlySessionManager, SessionManager } from "../../session/session-manager";
@@ -206,6 +207,11 @@ export interface ExtensionContext {
206
207
  getSystemPrompt(): string[];
207
208
  /** @deprecated Use hasPendingMessages() instead */
208
209
  hasQueuedMessages(): boolean;
210
+ /**
211
+ * Unattended workflow-gate bridge. Present only when the session runs in
212
+ * unattended/RPC mode; `undefined` in interactive/TUI mode (notify-only).
213
+ */
214
+ workflowGate?: WorkflowGateEmitter;
209
215
  }
210
216
  /**
211
217
  * Extended context for command handlers.
@@ -834,6 +840,8 @@ export interface ExtensionContextActions {
834
840
  getContextUsage: () => ContextUsage | undefined;
835
841
  compact: (instructionsOrOptions?: string | CompactOptions) => Promise<void>;
836
842
  getSystemPrompt: () => string[];
843
+ /** Unattended workflow-gate bridge (present only in unattended/RPC mode). */
844
+ getWorkflowGate?: () => WorkflowGateEmitter | undefined;
837
845
  }
838
846
  /** Actions for ExtensionCommandContext (ctx.* in command handlers). */
839
847
  export interface ExtensionCommandContextActions {
@@ -84,6 +84,8 @@ export declare function ensureDeepInterviewStateShape(value: unknown): DeepInter
84
84
  export declare function projectCompactState(value: unknown, options?: {
85
85
  lastN?: number;
86
86
  }): DeepInterviewCompactState;
87
+ /** Refresh the best-effort HUD cache from persisted deep-interview state. */
88
+ export declare function syncDeepInterviewRecorderHud(cwd: string, statePath: string, sessionId: string | undefined): Promise<void>;
87
89
  /** Record an `answered` shell for one round (append-or-merge by durable key). */
88
90
  export declare function appendOrMergeDeepInterviewRound(cwd: string, statePath: string, input: DeepInterviewAnswerInput, options?: {
89
91
  sessionId?: string;