@gajae-code/coding-agent 0.11.7 → 0.11.9

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 (213) hide show
  1. package/CHANGELOG.md +73 -1
  2. package/dist/types/cli/args.d.ts +0 -2
  3. package/dist/types/cli.d.ts +1 -0
  4. package/dist/types/config/keybindings.d.ts +33 -3
  5. package/dist/types/config/model-profile-activation.d.ts +4 -3
  6. package/dist/types/config/model-profile-contract.d.ts +38 -0
  7. package/dist/types/config/model-profiles.d.ts +2 -3
  8. package/dist/types/config/settings-schema.d.ts +15 -2
  9. package/dist/types/edit/modes/patch.d.ts +13 -0
  10. package/dist/types/edit/path-mutation-lock.d.ts +15 -0
  11. package/dist/types/eval/py/executor.d.ts +1 -1
  12. package/dist/types/eval/py/tool-bridge.d.ts +1 -2
  13. package/dist/types/gjc-runtime/deep-interview-ambiguity.d.ts +12 -5
  14. package/dist/types/gjc-runtime/deep-interview-draft.d.ts +8 -0
  15. package/dist/types/gjc-runtime/deep-interview-payload.d.ts +41 -0
  16. package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +32 -17
  17. package/dist/types/gjc-runtime/deep-interview-repair.d.ts +17 -0
  18. package/dist/types/gjc-runtime/deep-interview-state.d.ts +135 -4
  19. package/dist/types/gjc-runtime/repository-binding.d.ts +63 -0
  20. package/dist/types/gjc-runtime/state-writer.d.ts +44 -0
  21. package/dist/types/gjc-runtime/ultragoal-guard.d.ts +1 -0
  22. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +24 -0
  23. package/dist/types/gjc-runtime/workflow-manifest.d.ts +5 -3
  24. package/dist/types/main.d.ts +8 -0
  25. package/dist/types/modes/components/runtime-mcp-add-wizard.d.ts +2 -1
  26. package/dist/types/modes/components/tool-status-header.d.ts +3 -2
  27. package/dist/types/modes/components/welcome.d.ts +4 -0
  28. package/dist/types/modes/controllers/command-controller.d.ts +2 -0
  29. package/dist/types/modes/controllers/selector-controller.d.ts +2 -1
  30. package/dist/types/modes/interactive-mode.d.ts +5 -2
  31. package/dist/types/modes/prompt-action-autocomplete.d.ts +6 -1
  32. package/dist/types/modes/prompt-suggestion-controller.d.ts +35 -0
  33. package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +2 -2
  34. package/dist/types/modes/types.d.ts +3 -0
  35. package/dist/types/modes/utils/hotkeys-markdown.d.ts +2 -1
  36. package/dist/types/runtime-mcp/manager.d.ts +1 -1
  37. package/dist/types/runtime-mcp/oauth-flow.d.ts +0 -5
  38. package/dist/types/runtime-mcp/plugin-network-boundary.d.ts +14 -0
  39. package/dist/types/runtime-mcp/redaction.d.ts +2 -0
  40. package/dist/types/sdk/broker/broker.d.ts +2 -0
  41. package/dist/types/sdk/broker/lifecycle.d.ts +6 -0
  42. package/dist/types/sdk/bus/chat-daemon-control.d.ts +7 -1
  43. package/dist/types/sdk/bus/config-commands.d.ts +2 -2
  44. package/dist/types/sdk/bus/config.d.ts +2 -0
  45. package/dist/types/sdk/bus/conversation-store.d.ts +1 -0
  46. package/dist/types/sdk/bus/index.d.ts +25 -0
  47. package/dist/types/sdk/bus/notification-orchestration.d.ts +1 -0
  48. package/dist/types/sdk/bus/prompt-reconciliation.d.ts +105 -0
  49. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +15 -3
  50. package/dist/types/sdk/bus/telegram-daemon-control.d.ts +5 -1
  51. package/dist/types/sdk/bus/telegram-daemon.d.ts +128 -1
  52. package/dist/types/sdk/bus/telegram-reference.d.ts +2 -0
  53. package/dist/types/sdk/host/control/operations.d.ts +1 -1
  54. package/dist/types/sdk/host/host.d.ts +1 -1
  55. package/dist/types/sdk/host/query/handlers.d.ts +9 -0
  56. package/dist/types/sdk/index.d.ts +2 -0
  57. package/dist/types/sdk/prompt-status.d.ts +88 -0
  58. package/dist/types/sdk/session-directory.d.ts +1 -1
  59. package/dist/types/sdk/startup-capability.d.ts +3 -0
  60. package/dist/types/session/agent-session.d.ts +2 -0
  61. package/dist/types/session/internal/managed-session-scope.d.ts +22 -3
  62. package/dist/types/session/internal/managed-session-storage.d.ts +24 -4
  63. package/dist/types/session/internal/native-publish-outcome.d.ts +48 -0
  64. package/dist/types/session/session-manager.d.ts +5 -1
  65. package/dist/types/session/session-storage.d.ts +31 -0
  66. package/dist/types/skill-state/active-state.d.ts +4 -0
  67. package/dist/types/task/index.d.ts +3 -1
  68. package/dist/types/task/receipt.d.ts +2 -0
  69. package/dist/types/task/types.d.ts +94 -0
  70. package/dist/types/tools/ask.d.ts +454 -174
  71. package/dist/types/tools/image-gen.d.ts +47 -1
  72. package/dist/types/tools/index.d.ts +4 -0
  73. package/dist/types/utils/prompt-suggestion.d.ts +33 -0
  74. package/package.json +8 -8
  75. package/scripts/capture-platform-shortcut-labels-showcase.ts +342 -0
  76. package/scripts/dogfood-repository-binding.ts +209 -0
  77. package/scripts/generate-sdk-operation-inventory.ts +2 -0
  78. package/scripts/run-test-manifest.ts +4 -4
  79. package/src/cli/args.ts +2 -92
  80. package/src/cli/mcp-cli.ts +4 -21
  81. package/src/cli/notify-cli.ts +5 -38
  82. package/src/cli.ts +50 -0
  83. package/src/commands/deep-interview.ts +9 -4
  84. package/src/commands/sdk.ts +2 -2
  85. package/src/commit/agentic/index.ts +3 -3
  86. package/src/commit/map-reduce/index.ts +2 -2
  87. package/src/config/keybindings.ts +157 -24
  88. package/src/config/model-profile-activation.ts +7 -18
  89. package/src/config/model-profile-contract.ts +161 -0
  90. package/src/config/model-profiles.ts +2 -3
  91. package/src/config/model-registry.ts +11 -1
  92. package/src/config/settings-schema.ts +17 -2
  93. package/src/coordinator-mcp/model-preset.ts +21 -74
  94. package/src/defaults/gjc/skills/deep-interview/SKILL.md +80 -165
  95. package/src/defaults/gjc/skills/ralplan/SKILL.md +3 -1
  96. package/src/edit/index.ts +3 -6
  97. package/src/edit/modes/patch.ts +38 -1
  98. package/src/edit/modes/replace.ts +42 -0
  99. package/src/edit/path-mutation-lock.ts +112 -0
  100. package/src/eval/py/executor.ts +30 -11
  101. package/src/eval/py/prelude.py +2 -2
  102. package/src/eval/py/tool-bridge.ts +34 -18
  103. package/src/extensibility/gjc-plugins/runtime-adapters.ts +2 -1
  104. package/src/gjc-runtime/deep-interview-ambiguity.ts +68 -47
  105. package/src/gjc-runtime/deep-interview-draft.ts +842 -0
  106. package/src/gjc-runtime/deep-interview-payload.ts +262 -0
  107. package/src/gjc-runtime/deep-interview-recorder.ts +294 -226
  108. package/src/gjc-runtime/deep-interview-repair.ts +1674 -0
  109. package/src/gjc-runtime/deep-interview-runtime.ts +264 -103
  110. package/src/gjc-runtime/deep-interview-state.ts +916 -4
  111. package/src/gjc-runtime/launch-tmux.ts +1 -1
  112. package/src/gjc-runtime/managed-owner-supervisor.ts +83 -4
  113. package/src/gjc-runtime/ralplan-runtime.ts +78 -4
  114. package/src/gjc-runtime/repository-binding.ts +267 -0
  115. package/src/gjc-runtime/session-state-sidecar.ts +25 -9
  116. package/src/gjc-runtime/state-writer.ts +166 -2
  117. package/src/gjc-runtime/tmux-owner-isolation.ts +2 -1
  118. package/src/gjc-runtime/tmux-sessions.ts +45 -6
  119. package/src/gjc-runtime/ultragoal-guard.ts +5 -5
  120. package/src/gjc-runtime/ultragoal-runtime.ts +181 -19
  121. package/src/gjc-runtime/workflow-manifest.generated.json +386 -1
  122. package/src/gjc-runtime/workflow-manifest.ts +191 -5
  123. package/src/internal-urls/docs-index.generated.ts +8 -6
  124. package/src/internal-urls/local-protocol.ts +33 -16
  125. package/src/internal-urls/mcp-protocol.ts +73 -11
  126. package/src/main.ts +25 -10
  127. package/src/modes/DESIGN.md +5 -0
  128. package/src/modes/acp/acp-agent.ts +50 -16
  129. package/src/modes/components/model-selector.ts +42 -8
  130. package/src/modes/components/plan-preview-overlay.ts +1 -1
  131. package/src/modes/components/runtime-mcp-add-wizard.ts +5 -0
  132. package/src/modes/components/tool-status-header.ts +20 -4
  133. package/src/modes/components/welcome.ts +32 -20
  134. package/src/modes/controllers/command-controller.ts +97 -54
  135. package/src/modes/controllers/event-controller.ts +10 -0
  136. package/src/modes/controllers/input-controller.ts +7 -2
  137. package/src/modes/controllers/runtime-mcp-command-controller.ts +29 -6
  138. package/src/modes/controllers/selector-controller.ts +46 -54
  139. package/src/modes/interactive-mode.ts +70 -36
  140. package/src/modes/prompt-action-autocomplete.ts +32 -13
  141. package/src/modes/prompt-suggestion-controller.ts +96 -0
  142. package/src/modes/shared/agent-wire/workflow-gate-broker.ts +2 -2
  143. package/src/modes/types.ts +3 -0
  144. package/src/modes/utils/hotkeys-markdown.ts +64 -36
  145. package/src/modes/utils/ui-helpers.ts +5 -3
  146. package/src/prompts/agents/architect.md +0 -1
  147. package/src/prompts/agents/critic.md +0 -1
  148. package/src/prompts/system/prompt-suggestion-system.md +32 -0
  149. package/src/prompts/system/system-prompt.md +7 -4
  150. package/src/prompts/tools/cron.md +3 -1
  151. package/src/runtime-mcp/json-rpc.ts +7 -4
  152. package/src/runtime-mcp/manager.ts +51 -53
  153. package/src/runtime-mcp/oauth-flow.ts +0 -72
  154. package/src/runtime-mcp/plugin-network-boundary.ts +101 -0
  155. package/src/runtime-mcp/redaction.ts +30 -0
  156. package/src/runtime-mcp/transports/http.ts +13 -6
  157. package/src/sdk/broker/broker.ts +34 -20
  158. package/src/sdk/broker/lifecycle.ts +185 -36
  159. package/src/sdk/broker/session-index.ts +11 -1
  160. package/src/sdk/bus/chat-daemon-control.ts +20 -5
  161. package/src/sdk/bus/config-commands.ts +2 -2
  162. package/src/sdk/bus/config.ts +9 -1
  163. package/src/sdk/bus/conversation-store.ts +40 -6
  164. package/src/sdk/bus/index.ts +240 -65
  165. package/src/sdk/bus/lifecycle-commands.ts +47 -3
  166. package/src/sdk/bus/lifecycle-control-runtime.ts +11 -2
  167. package/src/sdk/bus/lifecycle-orchestrator.ts +32 -1
  168. package/src/sdk/bus/notification-orchestration.ts +12 -0
  169. package/src/sdk/bus/notification-service.ts +27 -2
  170. package/src/sdk/bus/prompt-reconciliation.ts +239 -0
  171. package/src/sdk/bus/recent-activity.ts +90 -26
  172. package/src/sdk/bus/telegram-daemon-contract.ts +15 -3
  173. package/src/sdk/bus/telegram-daemon-control.ts +145 -33
  174. package/src/sdk/bus/telegram-daemon.ts +853 -112
  175. package/src/sdk/bus/telegram-reference.ts +20 -2
  176. package/src/sdk/cli/session-cli.ts +15 -2
  177. package/src/sdk/host/control/dispatch.ts +1 -1
  178. package/src/sdk/host/control/operations.ts +1 -1
  179. package/src/sdk/host/host.ts +2 -6
  180. package/src/sdk/host/query/handlers.ts +70 -5
  181. package/src/sdk/index.ts +12 -0
  182. package/src/sdk/prompt-status.ts +97 -0
  183. package/src/sdk/protocol/operation-inventory.generated.json +47 -0
  184. package/src/sdk/protocol/operation-registry.ts +18 -4
  185. package/src/sdk/session-directory.ts +5 -1
  186. package/src/sdk/session.ts +2 -0
  187. package/src/sdk/startup-capability.ts +9 -1
  188. package/src/session/agent-session.ts +138 -5
  189. package/src/session/blob-store.ts +7 -2
  190. package/src/session/internal/managed-session-scope.ts +998 -133
  191. package/src/session/internal/managed-session-storage.ts +268 -203
  192. package/src/session/internal/native-publish-outcome.ts +266 -0
  193. package/src/session/session-manager.ts +406 -360
  194. package/src/session/session-storage.ts +151 -11
  195. package/src/skill-state/active-state.ts +10 -0
  196. package/src/task/executor.ts +13 -5
  197. package/src/task/gjc-command.ts +2 -2
  198. package/src/task/index.ts +121 -15
  199. package/src/task/receipt.ts +3 -0
  200. package/src/task/types.ts +34 -3
  201. package/src/tools/ask.ts +199 -88
  202. package/src/tools/ast-edit.ts +2 -2
  203. package/src/tools/bash-pty-selection.ts +2 -2
  204. package/src/tools/browser/screenshot-format.ts +6 -1
  205. package/src/tools/cron.ts +1 -1
  206. package/src/tools/image-gen.ts +178 -6
  207. package/src/tools/index.ts +4 -0
  208. package/src/tools/render-utils.ts +7 -1
  209. package/src/utils/edit-mode.ts +2 -2
  210. package/src/utils/prompt-suggestion.ts +265 -0
  211. package/src/utils/sixel.ts +3 -3
  212. package/src/web/insane/url-guard.ts +3 -1
  213. package/src/web/scrapers/docs-rs.ts +30 -5
@@ -1,3 +1,4 @@
1
+ import { computeAmbiguityFloor, type DeepInterviewAmbiguityMilestone } from "./deep-interview-ambiguity";
1
2
  /**
2
3
  * Pure, dependency-free foundation for deep-interview state shape.
3
4
  *
@@ -35,10 +36,6 @@ export interface DeepInterviewTriggerMetadata {
35
36
  status: DeepInterviewTriggerStatus;
36
37
  component: string;
37
38
  dimension: string;
38
- priorDimensionScore?: number;
39
- newDimensionScore?: number;
40
- priorAmbiguity?: number;
41
- newAmbiguity?: number;
42
39
  evidence?: string;
43
40
  contradictedFactId?: string;
44
41
  /** Required when status is `disputed` or `unresolved` to exempt the invariant. */
@@ -68,9 +65,11 @@ export interface DeepInterviewRoundRecord {
68
65
  /** Deterministic floor in effect when this round was scored, when it clamped. */
69
66
  ambiguity_floor?: number;
70
67
  triggers?: DeepInterviewTriggerMetadata[];
68
+ round_result_digest?: string;
71
69
  }
72
70
  export interface DeepInterviewStateEnvelope {
73
71
  threshold?: number;
72
+ threshold_units?: number;
74
73
  threshold_source?: string;
75
74
  state?: Record<string, unknown>;
76
75
  [key: string]: unknown;
@@ -197,3 +196,135 @@ export declare function assertDeepInterviewIntentReview(value: unknown, locked:
197
196
  round: unknown;
198
197
  answer_hash: unknown;
199
198
  }[]): asserts value is DeepInterviewIntentReview;
199
+ export type DeepInterviewDimension = "goal" | "constraints" | "criteria" | "context";
200
+ export type DeepInterviewResolution = "auto_research_accepted" | "auto_answer" | "direct" | "refined" | "cited_confirmation";
201
+ export interface DeepInterviewFactOperation {
202
+ op: "add" | "dispute" | "supersede";
203
+ id: string;
204
+ statement?: string;
205
+ component?: string;
206
+ dimension?: DeepInterviewDimension;
207
+ evidence?: string;
208
+ target_id?: string;
209
+ }
210
+ export interface DeepInterviewOntologyEntity {
211
+ id: string;
212
+ name: string;
213
+ type: string;
214
+ fields: string[];
215
+ }
216
+ export interface DeepInterviewOntologyRelationship {
217
+ id: string;
218
+ from_entity_id: string;
219
+ to_entity_id: string;
220
+ type: string;
221
+ }
222
+ export interface DeepInterviewOntologyReasoning {
223
+ statement: string;
224
+ evidence?: string;
225
+ }
226
+ export interface DeepInterviewOntologyInput {
227
+ entities: DeepInterviewOntologyEntity[];
228
+ relationships: DeepInterviewOntologyRelationship[];
229
+ reasoning: DeepInterviewOntologyReasoning[];
230
+ }
231
+ export interface DeepInterviewComponentUpdate {
232
+ component_id: string;
233
+ scores: Record<DeepInterviewDimension, number>;
234
+ }
235
+ /**
236
+ * Optional legacy assertions accepted only when they agree with the native
237
+ * target. The persisted target is always derived from component scores.
238
+ */
239
+ export interface DeepInterviewTargetingInput {
240
+ target_component_id?: string;
241
+ target_dimension?: DeepInterviewDimension;
242
+ weakest_component_id?: string;
243
+ weakest_dimension?: DeepInterviewDimension;
244
+ last_targeted_component_id?: string | null;
245
+ }
246
+ export interface DeepInterviewRoundBookkeeping {
247
+ resolution: DeepInterviewResolution;
248
+ round_ids?: string[];
249
+ counter_deltas?: Record<string, number>;
250
+ }
251
+ /**
252
+ * Closed evidence submitted for one scoring transaction. All convergence values
253
+ * (ambiguity, floor, milestone, ontology counts, rotation, and streak) are
254
+ * native-derived and intentionally cannot be supplied here.
255
+ */
256
+ export interface DeepInterviewRoundResultV1 {
257
+ global_scores: Record<DeepInterviewDimension, number>;
258
+ component_updates?: DeepInterviewComponentUpdate[];
259
+ targeting?: DeepInterviewTargetingInput;
260
+ triggers?: DeepInterviewTriggerMetadata[];
261
+ fact_ops?: DeepInterviewFactOperation[];
262
+ ontology?: DeepInterviewOntologyInput | DeepInterviewOntologyEntity[];
263
+ bookkeeping?: DeepInterviewRoundBookkeeping;
264
+ /** Compatibility adapter for recorder callers; never persisted as the v1 wire shape. */
265
+ component_scores?: Record<string, Record<DeepInterviewDimension, number>>;
266
+ auto_answered?: boolean;
267
+ }
268
+ /**
269
+ * Version 1 native projection returned by `apply-round-result` as
270
+ * `native_projection`. This is the complete renderable convergence surface;
271
+ * callers must not derive or supplement it from candidate scorer input.
272
+ */
273
+ export interface DeepInterviewRoundResultProjection {
274
+ score_units: Partial<Record<DeepInterviewDimension, number>>;
275
+ weighted_ambiguity: number;
276
+ weighted_ambiguity_units: number;
277
+ floor: number;
278
+ floor_units: number;
279
+ floor_cause: ReturnType<typeof computeAmbiguityFloor>;
280
+ effective_ambiguity: number;
281
+ effective_ambiguity_units: number;
282
+ prior_effective_ambiguity: number | null;
283
+ direction: "increased" | "decreased" | "unchanged" | "initial";
284
+ ambiguity_milestone: DeepInterviewAmbiguityMilestone;
285
+ topology: unknown;
286
+ topology_counts: {
287
+ active: number;
288
+ deferred: number;
289
+ total: number;
290
+ };
291
+ ontology: unknown;
292
+ ontology_counts: {
293
+ stable: number;
294
+ changed: number;
295
+ new: number;
296
+ basis: string;
297
+ };
298
+ targeting: {
299
+ target_component_id: string | null;
300
+ target_dimension: DeepInterviewDimension | null;
301
+ last_targeted_component_id: string | null;
302
+ };
303
+ transition: {
304
+ round_key: string;
305
+ lifecycle: "scored";
306
+ auto_answer_streak: number;
307
+ };
308
+ }
309
+ export type DeepInterviewApplyRoundResult = {
310
+ kind: "noop";
311
+ envelope: DeepInterviewStateEnvelope;
312
+ projection?: DeepInterviewRoundResultProjection;
313
+ } | {
314
+ kind: "write";
315
+ envelope: DeepInterviewStateEnvelope;
316
+ projection: DeepInterviewRoundResultProjection;
317
+ };
318
+ /** Strict UTF-8 JSON serialization used by v1 replay digests. */
319
+ export declare function canonicalDeepInterviewJson(value: unknown): string;
320
+ export declare function deepInterviewRoundResultDigest(input: {
321
+ round: number;
322
+ question_id: string;
323
+ round_id?: string | null;
324
+ result: unknown;
325
+ }): string;
326
+ /** Complete persisted answer identity; omitted optional values normalize to null. */
327
+ export declare function deepInterviewAnswerIdentityEqual(a: Pick<DeepInterviewRoundRecord, "round" | "round_key" | "round_id" | "question_id" | "component" | "dimension" | "question_text" | "question_hash" | "selected_options" | "custom_input">, b: Pick<DeepInterviewRoundRecord, "round" | "round_key" | "round_id" | "question_id" | "component" | "dimension" | "question_text" | "question_hash" | "selected_options" | "custom_input">): boolean;
328
+ /** Apply one closed v1 scoring round. The input contains evidence only; all convergence state is derived here. */
329
+ export declare function applyDeepInterviewRoundResultV1(envelopeValue: unknown, roundKey: string, result: DeepInterviewRoundResultV1, now: string): DeepInterviewApplyRoundResult;
330
+ export declare function validateDeepInterviewV1Envelope(value: Record<string, unknown>): void;
@@ -0,0 +1,63 @@
1
+ import { type GitRepository } from "../utils/git";
2
+ export declare const REPOSITORY_BINDING_SCHEMA: "gjc.repository_binding.v1";
3
+ export interface RepositoryBinding {
4
+ schema: typeof REPOSITORY_BINDING_SCHEMA;
5
+ /** Canonical realpath of the git worktree root (or resolved cwd root). */
6
+ worktreeRoot: string;
7
+ /** Git common dir realpath when available; null outside a git checkout. */
8
+ commonDir: string | null;
9
+ /** Optional repo-relative subdirectory the lane should operate under. */
10
+ relativeSubdir?: string;
11
+ /** Optional display path (may be non-canonical); never used for authority. */
12
+ displayPath?: string;
13
+ /** Optional baseline HEAD at capture time. */
14
+ head?: string;
15
+ /** Optional branch name at capture time (when not detached). */
16
+ branch?: string;
17
+ }
18
+ export type RepositoryBindingErrorCode = "not_a_repository" | "identity_mismatch" | "path_outside_root" | "invalid_binding";
19
+ export declare class RepositoryBindingError extends Error {
20
+ readonly code: RepositoryBindingErrorCode;
21
+ constructor(code: RepositoryBindingErrorCode, message: string);
22
+ }
23
+ /** Capture a durable binding from the active cwd/worktree. */
24
+ export declare function captureRepositoryBinding(cwd: string, options?: {
25
+ relativeSubdir?: string;
26
+ displayPath?: string;
27
+ }): Promise<RepositoryBinding>;
28
+ /** Parse a binding from JSON/plan payload; fail closed on malformed shapes. */
29
+ export declare function parseRepositoryBinding(value: unknown): RepositoryBinding;
30
+ /** True when two bindings refer to the same repository identity (linked worktrees ok). */
31
+ export declare function repositoryBindingsMatch(left: RepositoryBinding, right: RepositoryBinding): boolean;
32
+ /**
33
+ * Ensure `cwd` is inside the bound repository (or the same linked worktree family).
34
+ * Fails closed on sibling-repo drift.
35
+ */
36
+ export declare function assertCwdMatchesRepositoryBinding(cwd: string, binding: RepositoryBinding): Promise<RepositoryBinding>;
37
+ /** Ensure a declared target path resolves under the bound worktree root. */
38
+ export declare function assertPathUnderRepositoryBinding(binding: RepositoryBinding, targetPath: string): string;
39
+ /**
40
+ * Public identity snapshot for receipts/handoffs (no display-only fields required).
41
+ * Always includes the schema + durable roots so downstream lanes can re-verify.
42
+ */
43
+ export declare function publicRepositoryBinding(binding: RepositoryBinding): RepositoryBinding;
44
+ /**
45
+ * Resolve the authoritative binding for a delegated task before discovery/spawn.
46
+ *
47
+ * - Missing declaration → stamp from session cwd (never leave authority implicit).
48
+ * - Declared binding → parse + fail closed unless it matches the active session worktree.
49
+ * - relativeSubdir (when present) must resolve under the bound root.
50
+ */
51
+ export declare function resolveTaskRepositoryBinding(sessionCwd: string, declared: unknown | undefined): Promise<RepositoryBinding>;
52
+ /**
53
+ * Ensure an execution/isolation root (cwd or worktree) still matches the bound identity.
54
+ * Used after isolation workspace creation so linked worktrees keep the source repository.
55
+ */
56
+ export declare function assertExecutionRootMatchesRepositoryBinding(executionRoot: string, binding: RepositoryBinding): Promise<RepositoryBinding>;
57
+ /** Optional helper for tests and diagnostics. */
58
+ export declare function bindingFromGitRepository(repository: GitRepository, options?: {
59
+ relativeSubdir?: string;
60
+ displayPath?: string;
61
+ head?: string;
62
+ branch?: string;
63
+ }): RepositoryBinding;
@@ -46,6 +46,47 @@ export interface WorkflowEnvelopeIntegrityMismatch {
46
46
  expected: string;
47
47
  actual: string;
48
48
  }
49
+ export type WorkflowReceiptVerification = "legacy" | "native-valid" | "receipt-malformed" | "receipt-missing" | "checksum-mismatch";
50
+ export interface GuardedWorkflowEnvelopeTransformOptions extends StateWriterOptions {
51
+ expectedRevision: number;
52
+ /** Additional native schema validation applied to both current and candidate envelopes. */
53
+ validate?: (value: Record<string, unknown>, legacy: boolean) => void;
54
+ transform: (current: Record<string, unknown>, context: {
55
+ revision: number;
56
+ legacy: boolean;
57
+ }) => {
58
+ kind: "noop";
59
+ } | {
60
+ kind: "write";
61
+ value: Record<string, unknown>;
62
+ } | Promise<{
63
+ kind: "noop";
64
+ } | {
65
+ kind: "write";
66
+ value: Record<string, unknown>;
67
+ }>;
68
+ }
69
+ export interface GuardedWorkflowEnvelopeWarning {
70
+ code: "DI_POST_COMMIT_AUDIT_FAILED";
71
+ message: string;
72
+ }
73
+ export type GuardedWorkflowEnvelopeTransformResult = {
74
+ path: string;
75
+ written: false;
76
+ reason: "noop";
77
+ revision: number;
78
+ warnings: [];
79
+ } | {
80
+ path: string;
81
+ written: true;
82
+ revision: number;
83
+ stamped: Record<string, unknown>;
84
+ warnings: GuardedWorkflowEnvelopeWarning[];
85
+ };
86
+ export declare class GuardedWorkflowEnvelopeError extends Error {
87
+ readonly code: string;
88
+ constructor(code: string);
89
+ }
49
90
  export interface WorkflowTransactionJournal {
50
91
  version: 1;
51
92
  mutation_id: string;
@@ -80,6 +121,7 @@ export interface StateWriterOptions {
80
121
  receipt?: StateWriterReceiptContext;
81
122
  audit?: StateWriterAuditContext;
82
123
  sourceRevision?: number;
124
+ orderingRevision?: number;
83
125
  /**
84
126
  * Cross-process lock tuning for read-modify-write paths that route through
85
127
  * `withWorkflowStateLock` / `updateJsonAtomic`. Omit for the hardened
@@ -141,6 +183,7 @@ export type StrictMutationReadResult = {
141
183
  };
142
184
  export declare function readExistingStateForMutation(filePath: string): Promise<StrictMutationReadResult>;
143
185
  export declare function workflowEnvelopeContentSha256(value: unknown): string;
186
+ export declare function verifyWorkflowEnvelopeReceiptValue(value: unknown, filePath: string): WorkflowReceiptVerification;
144
187
  export declare function stampWorkflowEnvelopeChecksum<T>(value: T, filePath: string, computedAt?: string): T;
145
188
  export declare function detectWorkflowEnvelopeIntegrityMismatch(filePath: string): Promise<WorkflowEnvelopeIntegrityMismatch | undefined>;
146
189
  type ActiveStateCacheInvalidator = (cwd?: string, sessionId?: string) => void;
@@ -148,6 +191,7 @@ export declare function setActiveStateCacheInvalidator(invalidator: ActiveStateC
148
191
  export declare function persistedStateRevision(value: unknown): number;
149
192
  export declare function writeGuardedJsonAtomic(targetPath: string, value: unknown, options: GuardedStateWriterOptions): Promise<GuardedWriteResult>;
150
193
  export declare function writeGuardedWorkflowEnvelopeAtomic(targetPath: string, value: unknown, options: GuardedStateWriterOptions): Promise<GuardedWriteResult>;
194
+ export declare function transformGuardedWorkflowEnvelopeAtomic(targetPath: string, options: GuardedWorkflowEnvelopeTransformOptions): Promise<GuardedWorkflowEnvelopeTransformResult>;
151
195
  export declare function writeJsonAtomic(targetPath: string, value: unknown, options?: StateWriterOptions): Promise<string>;
152
196
  export declare function writeWorkflowEnvelopeAtomic(targetPath: string, value: unknown, options?: StateWriterOptions): Promise<string>;
153
197
  export declare function writeTextAtomic(targetPath: string, text: string, options?: StateWriterOptions): Promise<string>;
@@ -25,6 +25,7 @@ export interface CurrentGoalLike {
25
25
  source: "user";
26
26
  };
27
27
  }
28
+ export declare function isKnownUltragoalObjective(currentObjective: string): boolean;
28
29
  export declare function validateCompletionReceipt(input: {
29
30
  plan: UltragoalPlan;
30
31
  ledger: readonly UltragoalLedgerEvent[];
@@ -1,4 +1,5 @@
1
1
  import type { WorkflowHudSummary } from "../skill-state/active-state";
2
+ import { type RepositoryBinding } from "./repository-binding";
2
3
  import { type CriticVerdict } from "./ultragoal-receipt-freshness";
3
4
  export { CRITIC_GATE_HARD_STOP_EVENT, CRITIC_GATE_OVERRIDE_EVENT, CRITIC_VERDICT_EVENT, type CriticVerdict, computeUltragoalPlanGeneration, countTerminalCriticVerdicts, receiptRelevantGoals, TERMINAL_CRITIC_CEILING, terminalCriticCeilingReached, terminalCriticGateOverridden, } from "./ultragoal-receipt-freshness";
4
5
  export { captureUltragoalRecoverySnapshot, parseStrictTerminalTranscript, persistUltragoalRecoveryDecision, planUltragoalOwnerLossRecovery, type UltragoalOwnerLossReceipt, type UltragoalRecoveryBinding, type UltragoalRecoveryDecision, type UltragoalRecoverySnapshot, validateOwnerLossBinding, validateRawUltragoalEvidence, validateRecoveryAdmission, validateRecoveryPath, } from "./ultragoal-owner-loss-recovery";
@@ -96,6 +97,8 @@ export interface UltragoalPlan {
96
97
  gjcObjective: string;
97
98
  gjcObjectiveAliases?: string[];
98
99
  goals: UltragoalGoal[];
100
+ /** Authoritative repository identity for multi-repo fail-closed spawn (#2901). */
101
+ repositoryBinding?: RepositoryBinding;
99
102
  createdAt: string;
100
103
  updatedAt: string;
101
104
  [key: string]: unknown;
@@ -308,6 +311,26 @@ export { joinUltragoalPipelineOverlap, rebaselineUltragoalPipelineOverlap, start
308
311
  export declare function getUltragoalRunCompletionState(plan: UltragoalPlan, options?: {
309
312
  retryFailed?: boolean;
310
313
  }): UltragoalRunCompletionState;
314
+ /**
315
+ * Discriminated next-action for `complete-goals` handoff (#2903).
316
+ * `none` is reserved for genuine completion; `execute-goal` always carries a goal.
317
+ */
318
+ export type UltragoalCompleteNextActionKind = "none" | "execute-goal" | "retry-failed" | "resolve-blockers" | "final-aggregate-receipt";
319
+ export type UltragoalCompleteNextAction = {
320
+ kind: UltragoalCompleteNextActionKind;
321
+ goal?: UltragoalGoal;
322
+ blockedGoals?: UltragoalGoal[];
323
+ failedGoals?: UltragoalGoal[];
324
+ };
325
+ /**
326
+ * Resolve the actionable next step after scheduling / complete-goals.
327
+ * Blocked and review_blocked goals remain unschedulable; they surface as
328
+ * `resolve-blockers` instead of a contradictory `execute-goal` without goal_id.
329
+ */
330
+ export declare function resolveUltragoalCompleteNextAction(plan: UltragoalPlan, options?: {
331
+ retryFailed?: boolean;
332
+ selectedGoal?: UltragoalGoal;
333
+ }): UltragoalCompleteNextAction;
311
334
  export declare function startNextUltragoalGoal(input: {
312
335
  cwd: string;
313
336
  retryFailed?: boolean;
@@ -316,6 +339,7 @@ export declare function startNextUltragoalGoal(input: {
316
339
  plan: UltragoalPlan;
317
340
  goal?: UltragoalGoal;
318
341
  allComplete: boolean;
342
+ nextAction: UltragoalCompleteNextAction;
319
343
  }>;
320
344
  export declare function qualityGateObject(value: unknown): JsonObject | null;
321
345
  export declare function nonEmptyStringArray(value: unknown): string[] | null;
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * TypeScript is the authoritative source of truth for GJC workflow manifests.
3
- * Any JSON manifest projection is derived from this module and must never be
4
- * hand-edited.
3
+ * Keep the checked-in JSON projection synchronized manually with this module.
5
4
  */
6
5
  import { type CanonicalGjcWorkflowSkill } from "../skill-state/canonical-skills";
7
6
  export interface WorkflowState {
@@ -18,7 +17,9 @@ export interface WorkflowVerb {
18
17
  name: string;
19
18
  planned?: boolean;
20
19
  /** Invocation surface that exposes this verb in the real CLI parser. */
21
- surface?: "state-action" | "command-positional" | "command-flag";
20
+ surface?: "state-action" | "command-positional" | "command-flag" | "draft-action";
21
+ /** Legacy surface retained for callers that have not migrated to normal typed commands. */
22
+ compatibilityOnly?: boolean;
22
23
  }
23
24
  export interface TypedArgSpec {
24
25
  name: string;
@@ -26,6 +27,7 @@ export interface TypedArgSpec {
26
27
  enumValues?: string[];
27
28
  required?: boolean;
28
29
  appliesToVerbs?: string[];
30
+ compatibilityOnly?: boolean;
29
31
  planned?: boolean;
30
32
  }
31
33
  export interface RetentionPolicy {
@@ -153,6 +153,14 @@ export interface ModelRoleOverrides {
153
153
  * invocation never inherits an earlier one's values.
154
154
  */
155
155
  export declare function resolveModelRoleOverrides(parsed: Pick<Args, "smol" | "slow" | "plan">): ModelRoleOverrides;
156
+ /**
157
+ * Apply the `--no-pty` / `--no-title` terminal-control flags to the environment.
158
+ *
159
+ * Sets the canonical `GJC_*` name (so an explicit flag wins over a user-set
160
+ * `GJC_*` value under the GJC-first resolver — CLI authority) and the legacy
161
+ * `PI_*` name for backward compatibility. `--acp` mode implies `--no-title`.
162
+ */
163
+ export declare function applyTerminalControlFlagsToEnv(parsed: Pick<Args, "noPty" | "noTitle" | "mode">, env?: NodeJS.ProcessEnv): void;
156
164
  export declare function runRootCommand(parsed: Args, rawArgs: string[], deps?: RunRootCommandDependencies): Promise<void>;
157
165
  export declare function main(args: string[]): Promise<void>;
158
166
  export {};
@@ -14,12 +14,13 @@ type Scope = "user" | "project";
14
14
  */
15
15
  export interface MCPAddWizardOAuthResult {
16
16
  credentialId: string;
17
+ tokenEndpoint: string;
17
18
  clientId?: string;
18
19
  clientSecret?: string;
19
20
  }
20
21
  export declare class MCPAddWizard extends Container {
21
22
  #private;
22
- constructor(onComplete: (name: string, config: MCPServerConfig, scope: Scope) => void, onCancel: () => void, onOAuth?: (authUrl: string, tokenUrl: string, clientId: string, clientSecret: string, scopes: string) => Promise<MCPAddWizardOAuthResult>, onTestConnection?: (config: MCPServerConfig) => Promise<void>, onRender?: () => void, initialName?: string);
23
+ constructor(onComplete: (name: string, config: MCPServerConfig, scope: Scope) => void, onCancel: () => void, onOAuth?: (endpointUrl: string, authUrl: string, tokenUrl: string, clientId: string, clientSecret: string, scopes: string) => Promise<MCPAddWizardOAuthResult>, onTestConnection?: (config: MCPServerConfig) => Promise<void>, onRender?: () => void, initialName?: string);
23
24
  dispose(): void;
24
25
  handleInput(keyData: string): void;
25
26
  }
@@ -1,5 +1,5 @@
1
1
  import { type Component } from "@gajae-code/tui";
2
- import type { AppKeybinding, KeybindingsManager } from "../../config/keybindings";
2
+ import { type AppKeybinding, type KeybindingsManager, type KeyDisplayContext } from "../../config/keybindings";
3
3
  import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../config/settings-schema";
4
4
  import type { AgentSession } from "../../session/agent-session";
5
5
  import { type SkillActiveEntry } from "../../skill-state/active-state";
@@ -47,6 +47,7 @@ export interface StatusLineComponentOptions {
47
47
  actionRegistry?: ActionRegistry<void>;
48
48
  getKeybindings?: () => KeybindingsManager;
49
49
  focusDomain?: FocusDomain;
50
+ keyDisplayContext?: KeyDisplayContext;
50
51
  }
51
52
  export interface StatusLineActionHint {
52
53
  id: AppKeybinding;
@@ -57,7 +58,7 @@ export interface StatusLineActionHint {
57
58
  * remains the authority for availability; KEYBINDINGS remains the authority for
58
59
  * whether an action has a binding and the active manager supplies overrides.
59
60
  */
60
- export declare function getAvailableActionHints(actionRegistry: ActionRegistry<void> | undefined, getKeybindings: (() => KeybindingsManager) | undefined, width: number, domain?: FocusDomain): StatusLineActionHint[];
61
+ export declare function getAvailableActionHints(actionRegistry: ActionRegistry<void> | undefined, getKeybindings: (() => KeybindingsManager) | undefined, width: number, domain?: FocusDomain, keyDisplayContext?: KeyDisplayContext): StatusLineActionHint[];
61
62
  export declare class StatusLineComponent implements Component {
62
63
  #private;
63
64
  private readonly session;
@@ -1,4 +1,5 @@
1
1
  import { type Component } from "@gajae-code/tui";
2
+ import { type KeyDisplayContext } from "../../config/keybindings";
2
3
  export interface RecentSession {
3
4
  name: string;
4
5
  timeAgo: string;
@@ -15,6 +16,7 @@ export interface WelcomeComponentOptions {
15
16
  changelogMarkdown?: string;
16
17
  collapseChangelog?: boolean;
17
18
  buildLabel?: string;
19
+ keyDisplayContext?: KeyDisplayContext;
18
20
  }
19
21
  /**
20
22
  * GJC-native launch surface with compact command affordances, project
@@ -43,3 +45,5 @@ export declare class WelcomeComponent implements Component {
43
45
  setLspServers(servers: LspServerInfo[]): void;
44
46
  render(termWidth: number): string[];
45
47
  }
48
+ /** Resolve the intro cadence without making tests mutate global process state. */
49
+ export declare function resolveWelcomeIntroTickMs(platform?: NodeJS.Platform, tmux?: string | undefined): number;
@@ -1,8 +1,10 @@
1
1
  import { type CompactionOutcome } from "@gajae-code/agent-core/compaction";
2
2
  import { type ProviderDetails, type UsageReport } from "@gajae-code/ai";
3
+ import type { KeybindingsManager } from "../../config/keybindings";
3
4
  import type { CompactOptions } from "../../extensibility/extensions/types";
4
5
  import { theme } from "../../modes/theme/theme";
5
6
  import type { InteractiveModeContext } from "../../modes/types";
7
+ export declare function buildHelpMarkdown(keybindings: Pick<KeybindingsManager, "getAccessibleDisplayString">): string;
6
8
  export declare class CommandController {
7
9
  #private;
8
10
  private readonly ctx;
@@ -5,7 +5,7 @@ import type { InteractiveModeContext, OAuthSelectorOptions } from "../../modes/t
5
5
  import { getNotificationConfig, maskToken } from "../../sdk/bus/config";
6
6
  import { proposedTelegramIdentity, reconcileCommittedTelegramConfiguration, removeTelegramConfiguration, saveTelegramInactive } from "../../sdk/bus/notification-orchestration";
7
7
  import { buildNotificationStatusReport, checkNotificationHealth, recoverNotifications, sanitizeDiagnostic, sendNotificationTest } from "../../sdk/bus/notification-service";
8
- import { ensureTelegramDaemonRunningDetailed, unregisterNotificationRoot } from "../../sdk/bus/telegram-daemon";
8
+ import { ensureTelegramDaemonRunningDetailed, resolveTelegramSetupPreflight, unregisterNotificationRoot } from "../../sdk/bus/telegram-daemon";
9
9
  import { runTelegramSetup } from "../../sdk/bus/telegram-setup";
10
10
  import { type CredentialAutoImportStateStore } from "../../setup/credential-auto-import";
11
11
  import { type CommandPaletteAction } from "../components/command-palette";
@@ -38,6 +38,7 @@ export interface NotificationsEditorOperationDependencies {
38
38
  sanitizeDiagnostic: typeof sanitizeDiagnostic;
39
39
  ensureTelegramDaemonRunningDetailed: typeof ensureTelegramDaemonRunningDetailed;
40
40
  runTelegramSetup: typeof runTelegramSetup;
41
+ resolveTelegramSetupPreflight: typeof resolveTelegramSetupPreflight;
41
42
  proposedTelegramIdentity: typeof proposedTelegramIdentity;
42
43
  reconcileCommittedTelegramConfiguration: typeof reconcileCommittedTelegramConfiguration;
43
44
  saveTelegramInactive: typeof saveTelegramInactive;
@@ -3,7 +3,7 @@ import type { CompactionOutcome } from "@gajae-code/agent-core/compaction";
3
3
  import type { AssistantMessage, ImageContent, Message, UsageReport } from "@gajae-code/ai";
4
4
  import type { Component, EditorTheme, SlashCommand } from "@gajae-code/tui";
5
5
  import { Container, Loader, Spacer, Text, TUI } from "@gajae-code/tui";
6
- import { KeybindingsManager } from "../config/keybindings";
6
+ import { KeybindingsManager, type KeyDisplayContext } from "../config/keybindings";
7
7
  import { type Settings } from "../config/settings";
8
8
  import type { ExtensionUIContext, ExtensionUIDialogOptions, ExtensionWidgetContent, ExtensionWidgetOptions } from "../extensibility/extensions";
9
9
  import type { CompactOptions } from "../extensibility/extensions/types";
@@ -30,9 +30,11 @@ import { GoalModeController } from "./controllers/goal-mode-controller";
30
30
  import { PlanModeController } from "./controllers/plan-mode-controller";
31
31
  import { IrcObservationLedger } from "./irc-observation-ledger";
32
32
  import { OAuthManualInputManager } from "./oauth-manual-input";
33
+ import { PromptSuggestionController } from "./prompt-suggestion-controller";
33
34
  import type { Theme } from "./theme/theme";
34
35
  import { type CompactionQueuedMessage, type ComposerSubmissionOptions, type InteractiveModeContext, type IrcArrivalSnapshot, type SubmittedUserInput, type TodoItem, type TodoPhase, type TranscriptRebuildPolicy } from "./types";
35
36
  import type { ParsedIrcMessage } from "./utils/irc-message";
37
+ export declare function getDefaultComposerPlaceholder(context?: KeyDisplayContext): string;
36
38
  export declare const DEFAULT_COMPOSER_PLACEHOLDER: string;
37
39
  export declare function getWelcomeTranscriptReservedRows(chatContainer: Container, width: number): number;
38
40
  export type WelcomeBannerSettingMode = "auto" | "unicode" | "square" | "ascii";
@@ -115,12 +117,13 @@ export declare class InteractiveMode implements InteractiveModeContext {
115
117
  fileSlashCommands: Set<string>;
116
118
  skillCommands: Map<string, Skill>;
117
119
  oauthManualInput: OAuthManualInputManager;
120
+ promptSuggestion: PromptSuggestionController;
118
121
  readonly lspServers: LspStartupServerInfo[] | undefined;
119
122
  mcpManager?: import("../runtime-mcp").MCPManager;
120
123
  /** Direct controller capabilities for consumers that coordinate mode transitions. */
121
124
  get planModeController(): PlanModeController;
122
125
  get goalModeController(): GoalModeController;
123
- constructor(session: AgentSession, version: string, changelogMarkdown?: string | undefined, setToolUIContext?: (uiContext: ExtensionUIContext, hasUI: boolean) => void, lspServers?: LspStartupServerInfo[] | undefined, mcpManager?: import("../runtime-mcp").MCPManager, eventBus?: EventBus);
126
+ constructor(session: AgentSession, version: string, changelogMarkdown?: string | undefined, setToolUIContext?: (uiContext: ExtensionUIContext, hasUI: boolean) => void, lspServers?: LspStartupServerInfo[] | undefined, mcpManager?: import("../runtime-mcp").MCPManager, eventBus?: EventBus, keyDisplayContext?: KeyDisplayContext);
124
127
  getCurrentSessionNotificationStatus(): NotificationSessionStatus | undefined;
125
128
  setCurrentSessionNotificationsEnabled(enabled: boolean): Promise<NotificationSessionReconcileResult | undefined>;
126
129
  init(): Promise<void>;
@@ -22,10 +22,15 @@ interface PromptActionAutocompleteOptions {
22
22
  moveCursorToMessageStart: () => void;
23
23
  moveCursorToLineStart: () => void;
24
24
  moveCursorToLineEnd: () => void;
25
+ /**
26
+ * Ghost-text next-prompt prediction shown in the empty composer as a dim
27
+ * inline hint (Tab accepts it via the editor's onTab handler).
28
+ */
29
+ getPromptSuggestion?: () => string | null;
25
30
  }
26
31
  export declare class PromptActionAutocompleteProvider implements AutocompleteProvider {
27
32
  #private;
28
- constructor(commands: SlashCommand[], basePath: string, actions: PromptActionDefinition[]);
33
+ constructor(commands: SlashCommand[], basePath: string, actions: PromptActionDefinition[], getPromptSuggestion?: () => string | null);
29
34
  getSuggestions(lines: string[], cursorLine: number, cursorCol: number): Promise<{
30
35
  items: AutocompleteItem[];
31
36
  prefix: string;
@@ -0,0 +1,35 @@
1
+ import type { InteractiveModeContext } from "./types";
2
+ /**
3
+ * Owns the ghost-text next-prompt prediction lifecycle for interactive mode.
4
+ *
5
+ * After each agent turn ends (and only when `promptSuggestions` is enabled
6
+ * and the composer is empty), a smol-model prediction of the user's next
7
+ * prompt is generated in the background. The result renders as dim ghost
8
+ * text in the empty composer via the autocomplete provider's inline hint;
9
+ * Tab accepts it, typing dismisses it, and a new turn clears it.
10
+ */
11
+ export declare class PromptSuggestionController {
12
+ #private;
13
+ constructor(ctx: InteractiveModeContext);
14
+ /** Current suggestion to render as ghost text, or null. */
15
+ get current(): string | null;
16
+ /** Drop the current suggestion and invalidate any in-flight generation. */
17
+ clear(): void;
18
+ /** A new agent turn started; any pending suggestion is stale. */
19
+ onAgentStart(): void;
20
+ /**
21
+ * Editor content changed. A non-empty composer means the user is writing
22
+ * their own prompt: dismiss the suggestion and cancel pending generation.
23
+ */
24
+ notifyEditorChanged(text: string): void;
25
+ /**
26
+ * Agent turn ended; kick off background generation when the feature is
27
+ * enabled and the composer is idle and empty.
28
+ */
29
+ onAgentEnd(): void;
30
+ /**
31
+ * Tab handler for the composer: accept the suggestion when the composer
32
+ * is empty. Returns true when Tab was consumed.
33
+ */
34
+ tryAcceptOnTab(text: string): boolean;
35
+ }
@@ -59,7 +59,7 @@ export interface AskSelectedAckRecoveryParticipant {
59
59
  }
60
60
  /** SDK-native surface for emitting a workflow gate and awaiting its answer. */
61
61
  export interface WorkflowGateEmitter {
62
- isUnattended(): boolean;
62
+ supportsRemoteGateAnswers(): boolean;
63
63
  emitGate(input: OpenGateInput): Promise<unknown>;
64
64
  onGateEmitted?(listener: (gate: WorkflowGate) => void): () => void;
65
65
  resolveGate?(response: WorkflowGateResponse): Promise<WorkflowGateResolution>;
@@ -96,7 +96,7 @@ export interface WorkflowGateEmitter {
96
96
  export declare class BrokerWorkflowGateEmitter implements WorkflowGateEmitter {
97
97
  #private;
98
98
  constructor(runId: string, store: GateStore, emitterHooks?: Pick<BrokerHooks, "advance">);
99
- isUnattended(): boolean;
99
+ supportsRemoteGateAnswers(): boolean;
100
100
  setRuntimeTurnProvider(provider: (() => string | undefined) | null): void;
101
101
  emitGate(input: OpenGateInput): Promise<unknown>;
102
102
  onGateEmitted(listener: (gate: WorkflowGate) => void): () => void;
@@ -27,6 +27,7 @@ import type { ToolExecutionHandle } from "./components/tool-execution";
27
27
  import type { StatusLineComponent } from "./components/tool-status-header";
28
28
  import type { IrcObservationLedger } from "./irc-observation-ledger";
29
29
  import type { OAuthManualInputManager } from "./oauth-manual-input";
30
+ import type { PromptSuggestionController } from "./prompt-suggestion-controller";
30
31
  import type { Theme } from "./theme/theme";
31
32
  import type { ParsedIrcMessage } from "./utils/irc-message";
32
33
  export type TranscriptRebuildPolicy = "replace-identity" | "reconcile-same-transcript";
@@ -133,6 +134,8 @@ export interface InteractiveModeContext {
133
134
  skillCommands: Map<string, Skill>;
134
135
  oauthManualInput: OAuthManualInputManager;
135
136
  todoPhases: TodoPhase[];
137
+ /** Ghost-text next-prompt prediction; absent in ACP/lightweight test contexts. */
138
+ promptSuggestion?: PromptSuggestionController;
136
139
  init(): Promise<void>;
137
140
  shutdown(): Promise<void>;
138
141
  checkShutdownRequested(): Promise<void>;
@@ -1,5 +1,6 @@
1
1
  import type { KeybindingsManager } from "../../config/keybindings";
2
2
  export interface HotkeysMarkdownBindings {
3
- keybindings: Pick<KeybindingsManager, "getDisplayString">;
3
+ keybindings: Pick<KeybindingsManager, "formatAccessibleKeyHint" | "getAccessibleDisplayString">;
4
4
  }
5
+ export declare function formatHotkeyMarkdownCode(label: string, escapeTablePipes?: boolean): string;
5
6
  export declare function buildHotkeysMarkdown(bindings: HotkeysMarkdownBindings): string;
@@ -1,4 +1,4 @@
1
- import type { TSchema } from "@gajae-code/ai";
1
+ import { type TSchema } from "@gajae-code/ai";
2
2
  import type { SourceMeta } from "../capability/types";
3
3
  import type { CustomTool } from "../extensibility/custom-tools/types";
4
4
  import type { AuthStorage } from "../session/auth-storage";
@@ -52,8 +52,3 @@ export declare class MCPOAuthFlow extends OAuthCallbackFlow {
52
52
  }>;
53
53
  exchangeToken(code: string, _state: string, redirectUri: string): Promise<OAuthCredentials>;
54
54
  }
55
- /**
56
- * Refresh an MCP OAuth token using the standard refresh_token grant.
57
- * Returns updated credentials; preserves the old refresh token if the server doesn't rotate it.
58
- */
59
- export declare function refreshMCPOAuthToken(tokenUrl: string, refreshToken: string, clientId?: string, clientSecret?: string): Promise<OAuthCredentials>;