@gajae-code/coding-agent 0.18.7 → 0.18.8

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 (279) hide show
  1. package/CHANGELOG.md +279 -1
  2. package/dist/types/async/job-manager.d.ts +1 -1
  3. package/dist/types/capability/mcp.d.ts +2 -0
  4. package/dist/types/capability/skill.d.ts +2 -0
  5. package/dist/types/capability/types.d.ts +2 -0
  6. package/dist/types/cli/public-command-errors.d.ts +3 -1
  7. package/dist/types/cli/setup-cli.d.ts +1 -1
  8. package/dist/types/commands/deep-interview.d.ts +3 -0
  9. package/dist/types/config/autorouting-tier-map.d.ts +348 -9
  10. package/dist/types/config/file-lock.d.ts +1 -0
  11. package/dist/types/config/model-bindings-applier.d.ts +2 -0
  12. package/dist/types/config/model-profile-activation.d.ts +11 -3
  13. package/dist/types/config/model-registry.d.ts +4 -9
  14. package/dist/types/config/skill-settings-defaults.d.ts +2 -0
  15. package/dist/types/cursor-delete-path.d.ts +1 -0
  16. package/dist/types/cursor-mcp-name.d.ts +8 -0
  17. package/dist/types/customization/inventory.d.ts +2 -0
  18. package/dist/types/debug/report-bundle-parent.d.ts +2 -0
  19. package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/stream.d.ts +1 -0
  20. package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/version-manager.d.ts +31 -0
  21. package/dist/types/defaults/gjc-skills.generated.d.ts +5 -6
  22. package/dist/types/discovery/helpers.d.ts +6 -1
  23. package/dist/types/export/html/css-color.d.ts +2 -0
  24. package/dist/types/export/html/template.generated.d.ts +1 -1
  25. package/dist/types/extensibility/extensions/types.d.ts +7 -0
  26. package/dist/types/extensibility/gjc-plugins/runtime-adapters.d.ts +14 -1
  27. package/dist/types/extensibility/plugins/marketplace/cache.d.ts +2 -0
  28. package/dist/types/extensibility/plugins/plugin-link-path.d.ts +2 -0
  29. package/dist/types/extensibility/runtime-skill-discovery.d.ts +3 -1
  30. package/dist/types/extensibility/skill-management.d.ts +3 -1
  31. package/dist/types/extensibility/skills.d.ts +2 -0
  32. package/dist/types/gjc-runtime/deep-interview-crystallize.d.ts +74 -0
  33. package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +11 -0
  34. package/dist/types/gjc-runtime/gc-runtime.d.ts +5 -0
  35. package/dist/types/gjc-runtime/ralplan-runtime.d.ts +0 -5
  36. package/dist/types/gjc-runtime/state-argv.d.ts +1 -1
  37. package/dist/types/gjc-runtime/state-migrations.d.ts +8 -0
  38. package/dist/types/gjc-runtime/state-runtime.d.ts +95 -0
  39. package/dist/types/gjc-runtime/state-writer.d.ts +11 -1
  40. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +8 -0
  41. package/dist/types/internal-urls/skill-path.d.ts +1 -0
  42. package/dist/types/lsp/workspace-path.d.ts +1 -0
  43. package/dist/types/modes/acp/acp-agent.d.ts +7 -0
  44. package/dist/types/modes/components/custom-editor.d.ts +6 -0
  45. package/dist/types/modes/components/customization/customization-dashboard.d.ts +1 -0
  46. package/dist/types/modes/components/extensions/state-manager.d.ts +4 -3
  47. package/dist/types/modes/controllers/input-controller.d.ts +9 -0
  48. package/dist/types/modes/interactive-mode.d.ts +1 -0
  49. package/dist/types/modes/utils/interrupt-ownership.d.ts +3 -0
  50. package/dist/types/modes/utils/keybinding-matchers.d.ts +1 -0
  51. package/dist/types/modes/utils/macos-option-forwarding.d.ts +17 -0
  52. package/dist/types/progress/collect-project-progress.d.ts +38 -0
  53. package/dist/types/progress/progress-contract.d.ts +154 -0
  54. package/dist/types/progress/progress-snapshot.d.ts +11 -0
  55. package/dist/types/progress/project-progress.d.ts +141 -0
  56. package/dist/types/progress/render-progress.d.ts +28 -0
  57. package/dist/types/runtime-mcp/oauth-public-url.d.ts +1 -0
  58. package/dist/types/runtime-mcp/plugin-network-boundary.d.ts +1 -0
  59. package/dist/types/runtime-mcp/smithery-registry.d.ts +24 -0
  60. package/dist/types/runtime-mcp/types.d.ts +6 -0
  61. package/dist/types/sdk/acp/adapter.d.ts +1 -1
  62. package/dist/types/sdk/broker/broker-exit.d.ts +6 -2
  63. package/dist/types/sdk/broker/broker.d.ts +18 -1
  64. package/dist/types/sdk/broker/session-index.d.ts +12 -6
  65. package/dist/types/sdk/bus/index.d.ts +12 -1
  66. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +6 -1
  67. package/dist/types/sdk/client/client.d.ts +2 -0
  68. package/dist/types/sdk/host/query/handlers.d.ts +3 -0
  69. package/dist/types/sdk/index.d.ts +1 -0
  70. package/dist/types/sdk/router/session-router.d.ts +2 -0
  71. package/dist/types/sdk/session-list.d.ts +1 -1
  72. package/dist/types/sdk/session.d.ts +8 -0
  73. package/dist/types/session/agent-session.d.ts +38 -9
  74. package/dist/types/session/artifacts.d.ts +2 -2
  75. package/dist/types/session/internal/managed-gc-retirement-codec.d.ts +32 -0
  76. package/dist/types/session/internal/managed-session-scope.d.ts +79 -2
  77. package/dist/types/session/internal/managed-session-storage.d.ts +26 -1
  78. package/dist/types/session/internal/managed-task-owner-cleanup.d.ts +62 -0
  79. package/dist/types/session/internal/task-artifact-owner-access.d.ts +2 -0
  80. package/dist/types/session/internal/task-artifact-owner-transcript.d.ts +9 -1
  81. package/dist/types/session/session-manager.d.ts +31 -5
  82. package/dist/types/session/session-retirement.d.ts +31 -7
  83. package/dist/types/session/session-storage.d.ts +62 -2
  84. package/dist/types/session/task-artifact-owner-codec.d.ts +2 -0
  85. package/dist/types/setup/credential-auto-import.d.ts +1 -1
  86. package/dist/types/setup/credential-import.d.ts +6 -4
  87. package/dist/types/skill-state/active-state.d.ts +38 -0
  88. package/dist/types/slash-commands/helpers/progress-report.d.ts +8 -0
  89. package/dist/types/task/executor.d.ts +3 -0
  90. package/dist/types/tools/bash-skill-urls.d.ts +1 -1
  91. package/dist/types/tools/index.d.ts +3 -0
  92. package/dist/types/tools/python.d.ts +9 -1
  93. package/dist/types/tools/recipe/recipe-guard.d.ts +7 -0
  94. package/dist/types/tools/restricted-cwd.d.ts +1 -0
  95. package/dist/types/tools/todo-write.d.ts +6 -0
  96. package/dist/types/utils/tools-checksum.d.ts +7 -0
  97. package/package.json +7 -7
  98. package/scripts/generate-sdk-operation-inventory.ts +21 -0
  99. package/scripts/verify-managed-empty-stop.ts +28 -0
  100. package/src/async/job-manager.ts +228 -122
  101. package/src/capability/index.ts +17 -0
  102. package/src/capability/mcp.ts +2 -0
  103. package/src/capability/skill.ts +2 -0
  104. package/src/capability/types.ts +2 -0
  105. package/src/cli/auth-broker-cli.ts +1 -1
  106. package/src/cli/customize-doctor.ts +15 -2
  107. package/src/cli/public-command-errors.ts +21 -1
  108. package/src/cli/setup-cli.ts +4 -4
  109. package/src/cli/skills-cli.ts +5 -0
  110. package/src/commands/deep-interview.ts +47 -8
  111. package/src/commands/sdk.ts +28 -8
  112. package/src/config/autorouting-tier-map.ts +117 -7
  113. package/src/config/file-lock.ts +307 -68
  114. package/src/config/mcp-schema.json +4 -0
  115. package/src/config/model-bindings-applier.ts +20 -0
  116. package/src/config/model-profile-activation.ts +240 -46
  117. package/src/config/model-registry.ts +47 -153
  118. package/src/config/skill-settings-defaults.ts +7 -0
  119. package/src/coordinator-mcp/policy.ts +3 -2
  120. package/src/cursor-delete-path.ts +10 -0
  121. package/src/cursor-mcp-name.ts +15 -0
  122. package/src/cursor.ts +13 -2
  123. package/src/customization/inventory.ts +3 -0
  124. package/src/debug/report-bundle-parent.ts +22 -0
  125. package/src/debug/report-bundle.ts +3 -0
  126. package/src/debug/system-info.ts +13 -1
  127. package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/stream.ts +67 -4
  128. package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/version-manager.ts +80 -0
  129. package/src/defaults/gjc/skills/deep-interview/SKILL.md +105 -10
  130. package/src/defaults/gjc/skills/ralplan/SKILL.md +6 -4
  131. package/src/defaults/gjc-defaults.test.ts +18 -1
  132. package/src/defaults/gjc-defaults.ts +3 -0
  133. package/src/defaults/gjc-skills.generated.ts +58 -36
  134. package/src/discovery/agents.ts +6 -1
  135. package/src/discovery/builtin.ts +10 -0
  136. package/src/discovery/helpers.ts +159 -20
  137. package/src/discovery/mcp-json.ts +6 -0
  138. package/src/discovery/ssh.ts +1 -1
  139. package/src/discovery/substitute-plugin-root.ts +3 -1
  140. package/src/edit/file-read-cache.ts +1 -1
  141. package/src/eval/py/executor.ts +380 -120
  142. package/src/export/html/css-color.ts +9 -0
  143. package/src/export/html/index.ts +5 -4
  144. package/src/export/html/template.generated.ts +1 -1
  145. package/src/extensibility/extensions/runner.ts +4 -0
  146. package/src/extensibility/extensions/types.ts +7 -0
  147. package/src/extensibility/gjc-plugins/runtime-adapters.ts +73 -8
  148. package/src/extensibility/plugins/manager.ts +3 -2
  149. package/src/extensibility/plugins/marketplace/cache.ts +15 -0
  150. package/src/extensibility/plugins/marketplace/manager.ts +11 -3
  151. package/src/extensibility/plugins/plugin-link-path.ts +12 -0
  152. package/src/extensibility/runtime-skill-discovery.ts +20 -2
  153. package/src/extensibility/skill-management.ts +6 -2
  154. package/src/extensibility/skills.ts +6 -1
  155. package/src/gjc-runtime/deep-interview-crystallize.ts +1814 -0
  156. package/src/gjc-runtime/deep-interview-recorder.ts +20 -2
  157. package/src/gjc-runtime/deep-interview-runtime.ts +1415 -13
  158. package/src/gjc-runtime/deep-interview-stage.ts +98 -21
  159. package/src/gjc-runtime/gc-runtime.ts +206 -9
  160. package/src/gjc-runtime/launch-worktree.ts +14 -4
  161. package/src/gjc-runtime/ralplan-runtime.ts +447 -52
  162. package/src/gjc-runtime/state-argv.ts +2 -0
  163. package/src/gjc-runtime/state-migrations.ts +91 -29
  164. package/src/gjc-runtime/state-runtime.ts +3716 -135
  165. package/src/gjc-runtime/state-writer.ts +83 -8
  166. package/src/gjc-runtime/ultragoal-runtime.ts +16 -4
  167. package/src/gjc-runtime/workflow-manifest.generated.json +70 -42
  168. package/src/gjc-runtime/workflow-manifest.ts +54 -21
  169. package/src/harness-control-plane/operate.ts +12 -4
  170. package/src/harness-control-plane/owner.ts +5 -1
  171. package/src/hashline/parser.ts +48 -9
  172. package/src/hashline/recovery.ts +13 -4
  173. package/src/internal-urls/docs-index.generated.ts +18 -17
  174. package/src/internal-urls/skill-path.ts +19 -0
  175. package/src/internal-urls/skill-protocol.ts +2 -0
  176. package/src/lsp/edits.ts +6 -0
  177. package/src/lsp/workspace-path.ts +51 -0
  178. package/src/main.ts +195 -31
  179. package/src/modes/acp/acp-agent.ts +88 -4
  180. package/src/modes/components/custom-editor.ts +14 -0
  181. package/src/modes/components/customization/customization-dashboard.ts +12 -0
  182. package/src/modes/components/extensions/extension-dashboard.ts +2 -2
  183. package/src/modes/components/extensions/state-manager.ts +15 -5
  184. package/src/modes/components/model-selector.ts +1 -4
  185. package/src/modes/components/provider-onboarding-selector.ts +1 -1
  186. package/src/modes/components/status-line/segments.ts +4 -0
  187. package/src/modes/controllers/event-controller.ts +11 -4
  188. package/src/modes/controllers/input-controller.ts +74 -29
  189. package/src/modes/controllers/runtime-mcp-command-controller.ts +8 -3
  190. package/src/modes/controllers/selector-controller.ts +28 -15
  191. package/src/modes/interactive-mode.ts +4 -0
  192. package/src/modes/runtime-init.ts +4 -0
  193. package/src/modes/utils/abort-message.ts +3 -1
  194. package/src/modes/utils/interrupt-ownership.ts +12 -0
  195. package/src/modes/utils/keybinding-matchers.ts +4 -0
  196. package/src/modes/utils/macos-option-forwarding.ts +80 -0
  197. package/src/progress/collect-project-progress.ts +153 -0
  198. package/src/progress/progress-contract.ts +172 -0
  199. package/src/progress/progress-snapshot.ts +140 -0
  200. package/src/progress/project-progress.ts +446 -0
  201. package/src/progress/render-progress.ts +209 -0
  202. package/src/prompts/system/master-mode.md +1 -0
  203. package/src/prompts/tools/skill-discovery.md +1 -1
  204. package/src/runtime-mcp/config-writer.ts +10 -6
  205. package/src/runtime-mcp/config.ts +1 -0
  206. package/src/runtime-mcp/oauth-flow.ts +5 -0
  207. package/src/runtime-mcp/oauth-public-url.ts +8 -0
  208. package/src/runtime-mcp/plugin-network-boundary.ts +4 -0
  209. package/src/runtime-mcp/smithery-registry.ts +22 -3
  210. package/src/runtime-mcp/transports/http.ts +2 -2
  211. package/src/runtime-mcp/types.ts +6 -0
  212. package/src/sdk/acp/adapter.ts +93 -8
  213. package/src/sdk/broker/broker-exit.ts +52 -23
  214. package/src/sdk/broker/broker.ts +75 -6
  215. package/src/sdk/broker/ensure.ts +2 -0
  216. package/src/sdk/broker/lifecycle.ts +711 -66
  217. package/src/sdk/broker/session-index.ts +191 -81
  218. package/src/sdk/bus/chat-daemon-cli.ts +38 -1
  219. package/src/sdk/bus/chat-daemon-control.ts +2 -2
  220. package/src/sdk/bus/index.ts +238 -43
  221. package/src/sdk/bus/telegram-daemon-contract.ts +6 -1
  222. package/src/sdk/cli/session-cli.ts +17 -3
  223. package/src/sdk/client/client.ts +28 -8
  224. package/src/sdk/host/query/handlers.ts +9 -1
  225. package/src/sdk/host/session-runtime.test.ts +2647 -294
  226. package/src/sdk/host/session-runtime.ts +426 -109
  227. package/src/sdk/host/surface-policy.ts +1 -0
  228. package/src/sdk/index.ts +8 -0
  229. package/src/sdk/lifecycle-session.ts +3 -1
  230. package/src/sdk/prompt-deadline-manager.ts +15 -0
  231. package/src/sdk/protocol/operation-inventory.generated.json +146 -0
  232. package/src/sdk/protocol/operation-registry.ts +9 -2
  233. package/src/sdk/router/session-router.ts +75 -12
  234. package/src/sdk/session-list.ts +1 -0
  235. package/src/sdk/session.ts +67 -38
  236. package/src/session/agent-session.ts +623 -224
  237. package/src/session/artifacts.ts +174 -70
  238. package/src/session/internal/managed-gc-retirement-codec.ts +319 -0
  239. package/src/session/internal/managed-session-scope.ts +3457 -462
  240. package/src/session/internal/managed-session-storage.ts +376 -61
  241. package/src/session/internal/managed-task-owner-cleanup.ts +473 -0
  242. package/src/session/internal/task-artifact-owner-access.ts +19 -3
  243. package/src/session/internal/task-artifact-owner-transcript.ts +547 -1
  244. package/src/session/session-manager.ts +939 -133
  245. package/src/session/session-retirement.ts +573 -14
  246. package/src/session/session-storage.ts +417 -14
  247. package/src/session/task-artifact-owner-codec.ts +71 -8
  248. package/src/session/task-artifact-owner-retirement.ts +21 -19
  249. package/src/setup/credential-auto-import.ts +12 -3
  250. package/src/setup/credential-import.ts +176 -5
  251. package/src/setup/paseo/announce.ts +6 -1
  252. package/src/skill-state/active-state.ts +132 -2
  253. package/src/slash-commands/builtin-registry.ts +39 -9
  254. package/src/slash-commands/helpers/progress-report.ts +23 -0
  255. package/src/stt/setup.ts +3 -5
  256. package/src/task/commands.ts +3 -1
  257. package/src/task/executor.ts +4 -0
  258. package/src/task/index.ts +6 -0
  259. package/src/tools/ask.ts +205 -6
  260. package/src/tools/ast-edit.ts +4 -0
  261. package/src/tools/bash-allowed-prefixes.ts +15 -0
  262. package/src/tools/bash-skill-urls.ts +56 -3
  263. package/src/tools/bash.ts +48 -79
  264. package/src/tools/descriptors.ts +5 -1
  265. package/src/tools/eval.ts +56 -36
  266. package/src/tools/image-gen.ts +1 -1
  267. package/src/tools/index.ts +3 -0
  268. package/src/tools/python.ts +187 -66
  269. package/src/tools/recipe/index.ts +9 -0
  270. package/src/tools/recipe/recipe-guard.ts +19 -0
  271. package/src/tools/restricted-cwd.ts +10 -0
  272. package/src/tools/skill-discovery.ts +5 -0
  273. package/src/tools/skill.ts +28 -1
  274. package/src/tools/todo-write.ts +10 -1
  275. package/src/tools/tool-catalog.generated.ts +1 -1
  276. package/src/tools/write.ts +1 -0
  277. package/src/utils/tools-checksum.ts +34 -0
  278. package/src/utils/tools-manager.ts +24 -6
  279. package/src/web/search/providers/codex.ts +3 -2
@@ -27,6 +27,7 @@ import type { ExecOptions, ExecResult } from "../../exec/exec";
27
27
  import type { CustomEditor } from "../../modes/components/custom-editor";
28
28
  import type { WorkflowGateEmitter } from "../../modes/shared/agent-wire/workflow-gate-broker";
29
29
  import type { Theme } from "../../modes/theme/theme";
30
+ import type { ProjectProgressSnapshot } from "../../progress/progress-contract";
30
31
  import type { AgentSessionEventListener } from "../../session/agent-session";
31
32
  import type { ClientBridge, ClientBridgePermissionOption, ClientBridgePermissionOutcome, ClientBridgePermissionToolCall } from "../../session/client-bridge";
32
33
  import type { CustomMessage } from "../../session/messages";
@@ -339,6 +340,8 @@ export interface ExtensionContext {
339
340
  totalBytes: number;
340
341
  } | undefined>;
341
342
  getJobs(): unknown;
343
+ /** Read-only project progress snapshot (`session.progress`), derived from durable session state. */
344
+ getProjectProgress?(): Promise<ProjectProgressSnapshot>;
342
345
  /** Subscribe to foreground-wait folds (`bash_folded`). Returns an unsubscribe function. */
343
346
  onJobFold?(listener: (event: JobFoldEvent) => void): () => void;
344
347
  /** Observe session events synchronously in producer order. Returns an unsubscribe function. */
@@ -498,6 +501,8 @@ export interface AgentStartEvent extends SharedAgentStartEvent {
498
501
  sdkRunToken?: string;
499
502
  /** Complete set of SDK queue owners consumed together by this run. */
500
503
  sdkRunTokens?: string[];
504
+ /** Internal public lifecycle boundary; accepted retries with a suppressed predecessor end retain it. */
505
+ lifecycleScope?: AttemptScope;
501
506
  }
502
507
  /** Fired when an agent run fails before emitting agent_end. The error is the
503
508
  * sanitized `{ code, message }` diagnostic from the agent runtime — never the raw
@@ -1180,6 +1185,8 @@ export interface ExtensionContextActions {
1180
1185
  totalBytes: number;
1181
1186
  } | undefined>;
1182
1187
  getJobs?: () => unknown;
1188
+ /** Read-only project progress snapshot backing the `session.progress` SDK query. */
1189
+ getProjectProgress?: () => Promise<ProjectProgressSnapshot>;
1183
1190
  /** Subscribe to foreground-wait folds so the SDK host can publish `bash_folded`. Returns an unsubscribe. */
1184
1191
  onJobFold?: (listener: (event: JobFoldEvent) => void) => () => void;
1185
1192
  /** Ordered, synchronous AgentSession subscription, independent of async extension hooks. */
@@ -22,6 +22,19 @@ export declare function safePluginMcpDiagnostic(value: unknown): string;
22
22
  export declare function getGjcPluginToolDeclarations(cwd: string): Promise<GjcPluginToolDeclaration[]>;
23
23
  /** Serve the canonical schemas keyed by their stable tool surface id. */
24
24
  export declare function serveGjcPluginSchemas(cwd: string): Promise<Record<string, JsonSchema202012>>;
25
+ /** Startup identity of a file: the object `hashStableFile` must still be reading. */
26
+ export interface StableFileIdentity {
27
+ dev: number;
28
+ ino: number;
29
+ size: number;
30
+ mtimeMs: number;
31
+ ctimeMs: number;
32
+ }
33
+ /**
34
+ * Digest of a `node` that was on PATH at startup, or `undefined` when the path
35
+ * was not a startup candidate or no longer is the startup file object.
36
+ */
37
+ export declare function getInitialNodeHash(realPath: string): Promise<string | undefined>;
25
38
  /**
26
39
  * SHA-256 of a regular file with the same stability contract as `readStableFile`
27
40
  * (follows symlinks, bounded size, rejects a file that changes while it is read),
@@ -29,7 +42,7 @@ export declare function serveGjcPluginSchemas(cwd: string): Promise<Record<strin
29
42
  * on PATH; buffering each interpreter (~120 MiB) held its full bytes in the
30
43
  * session process until exit.
31
44
  */
32
- export declare function hashStableFile(filePath: string, label: string, maxBytes: number): Promise<string>;
45
+ export declare function hashStableFile(filePath: string, label: string, maxBytes: number, expected?: StableFileIdentity): Promise<string>;
33
46
  /**
34
47
  * Load the always-on plugin tool surfaces for the effective registry at `cwd`.
35
48
  *
@@ -23,6 +23,8 @@ export declare function getCachedPluginPath(cacheDir: string, marketplace: strin
23
23
  * so a partial previous cache is never silently reused.
24
24
  */
25
25
  export declare function cachePlugin(sourcePath: string, cacheDir: string, marketplace: string, pluginName: string, version: string): Promise<string>;
26
+ /** Write a regular file. A symlink at the destination is removed, not followed. */
27
+ export declare function writeCachedRegularFile(targetPath: string, content: string): Promise<void>;
26
28
  export declare function stageCachedPlugin(sourcePath: string, stagingPath: string): Promise<string>;
27
29
  export declare function digestCachedPlugin(targetPath: string): Promise<string | undefined>;
28
30
  export declare function inspectCachedPlugin(targetPath: string): Promise<{
@@ -0,0 +1,2 @@
1
+ /** Resolve a package.json name under the plugins node_modules root, or throw. */
2
+ export declare function resolvePluginLinkPath(root: string, name: string): string;
@@ -47,6 +47,8 @@ export interface DiscoverRuntimeSkillsOptions {
47
47
  offset?: number;
48
48
  source?: RuntimeSkillDiscoveryScope | "all";
49
49
  policy?: SkillsSettings;
50
+ /** User-owned permission to read external user skill symlinks; defaults to the direct policy value. */
51
+ allowExternalUserSkillSymlinks?: boolean;
50
52
  }
51
53
  /**
52
54
  * Upper bound every caller's `limit` clamps to. Exported so `gjc skills discover`
@@ -71,5 +73,5 @@ export declare function describeDisabledSkillScopes(source: RuntimeSkillDiscover
71
73
  */
72
74
  export declare function describeNoSkillMatch(query: string | undefined, scanned: number): string | undefined;
73
75
  export declare function discoverRuntimeSkills(options: DiscoverRuntimeSkillsOptions): Promise<RuntimeSkillDiscoveryResult>;
74
- export declare function findRuntimeSkillByName(cwd: string, name: string, policy?: SkillsSettings, home?: string, agentDir?: string, profileAuthority?: "default" | "custom"): Promise<Skill | undefined>;
76
+ export declare function findRuntimeSkillByName(cwd: string, name: string, policy?: SkillsSettings, home?: string, agentDir?: string, profileAuthority?: "default" | "custom", allowExternalUserSkillSymlinks?: boolean): Promise<Skill | undefined>;
75
77
  export {};
@@ -80,8 +80,10 @@ export declare function listNativeSkillsForManagement(options: {
80
80
  cwd: string;
81
81
  home?: string;
82
82
  agentDir?: string;
83
- /** Resolver-owned profile classification; unlike path comparison, this survives HOME refreshes. */
83
+ /** Resolver-owned profile classification; unlike path comparison, this survives HOME/config refreshes. */
84
84
  profileAuthority?: "default" | "custom";
85
+ /** User-owned permission to follow symlinks outside user skill scan roots. */
86
+ allowExternalUserSkillSymlinks?: boolean;
85
87
  policy?: SkillManagementPolicy;
86
88
  }): Promise<ManagedSkillRecord[]>;
87
89
  /**
@@ -59,6 +59,8 @@ export interface LoadSkillsOptions extends SkillsSettings {
59
59
  agentDir?: string;
60
60
  /** Resolver-owned classification for the selected agent directory. */
61
61
  profileAuthority?: "default" | "custom";
62
+ /** User-owned permission to follow symlinks outside user skill scan roots. */
63
+ allowExternalUserSkillSymlinks?: boolean;
62
64
  }
63
65
  /**
64
66
  * Load skills from all configured locations.
@@ -0,0 +1,74 @@
1
+ export type CrystalClassification = "confirmed" | "inferred" | "disputed";
2
+ export type CrystalItemKind = "goal" | "constraint" | "decision" | "acceptance_criterion" | "non_goal";
3
+ export interface CrystalMessage {
4
+ index: number;
5
+ role: "user" | "assistant" | "system" | "tool" | "toolResult" | "developer";
6
+ content: string;
7
+ }
8
+ export interface CrystalSnapshot {
9
+ revision: number;
10
+ start: number;
11
+ end: number;
12
+ digest: string;
13
+ messages: CrystalMessage[];
14
+ }
15
+ export interface CrystalItem {
16
+ id: string;
17
+ kind: CrystalItemKind;
18
+ classification: CrystalClassification;
19
+ statement: string;
20
+ anchor?: {
21
+ message_index: number;
22
+ quote: string;
23
+ };
24
+ }
25
+ export interface CrystalInput {
26
+ snapshot: CrystalSnapshot;
27
+ current_revision: number;
28
+ items: CrystalItem[];
29
+ removed_ids?: string[];
30
+ removed_item_anchors?: CrystalResolutionAnchor[];
31
+ open_gaps?: string[];
32
+ conflicts?: string[];
33
+ resolved_open_gaps?: string[];
34
+ resolved_conflicts?: string[];
35
+ resolved_open_gap_anchors?: CrystalResolutionAnchor[];
36
+ resolved_conflict_anchors?: CrystalResolutionAnchor[];
37
+ prior?: DeepInterviewCrystal;
38
+ }
39
+ export interface CrystalResolutionAnchor {
40
+ item: string;
41
+ message_index: number;
42
+ quote: string;
43
+ resolution: string;
44
+ }
45
+ export interface CrystalDelta {
46
+ kind: "none" | "additive" | "intent-changed" | "goal-replaced" | "stale";
47
+ changed_ids: string[];
48
+ added_ids: string[];
49
+ preserved_ids: string[];
50
+ approval_invalidated: boolean;
51
+ }
52
+ export interface DeepInterviewCrystal {
53
+ schema_version: 1;
54
+ spec_version: number;
55
+ lifecycle: "ready" | "needs-questions" | "stale" | "superseded";
56
+ source: {
57
+ revision: number;
58
+ start: number;
59
+ end: number;
60
+ digest: string;
61
+ messages: CrystalMessage[];
62
+ };
63
+ items: CrystalItem[];
64
+ removed_ids?: string[];
65
+ removed_item_anchors?: CrystalResolutionAnchor[];
66
+ pending_removals?: string[];
67
+ open_gaps: string[];
68
+ conflicts: string[];
69
+ delta: CrystalDelta;
70
+ execution_approval: "not-approved";
71
+ }
72
+ export declare function crystalSnapshotDigest(snapshot: Pick<CrystalSnapshot, "revision" | "start" | "end" | "messages">): string;
73
+ export declare function crystallizeDeepInterview(value: unknown): DeepInterviewCrystal;
74
+ export declare function crystalMarkdown(crystal: DeepInterviewCrystal): string;
@@ -1,3 +1,4 @@
1
+ import { type CrystalSnapshot } from "./deep-interview-crystallize";
1
2
  export * from "./deep-interview-recorder";
2
3
  /**
3
4
  * Native implementation of `gjc deep-interview`.
@@ -13,6 +14,16 @@ export interface DeepInterviewCommandResult {
13
14
  stdout?: string;
14
15
  stderr?: string;
15
16
  }
17
+ export declare function authoritativeConversationSnapshot(cwd: string, sessionId: string): Promise<{
18
+ revision: number;
19
+ messages: CrystalSnapshot["messages"];
20
+ transcriptPath: string;
21
+ transcriptSha256: string;
22
+ }>;
23
+ export declare function assertDeepInterviewCrystalCoversLiveTranscript(cwd: string, sessionId: string, requireCrystalTail?: boolean): Promise<{
24
+ transcriptPath: string;
25
+ transcriptSha256: string;
26
+ }>;
16
27
  export declare function deepInterviewStatePath(cwd: string, sessionId?: string): string;
17
28
  export interface ResolvedDeepInterviewSpecWriteArgs {
18
29
  stage: "final";
@@ -181,6 +181,11 @@ export interface GcDiskRecord {
181
181
  action: GcDiskAction;
182
182
  reason: string;
183
183
  error?: string;
184
+ /** Exact incomplete retirement phase surfaced by the owning session adapter. */
185
+ phase?: "artifacts" | "transcript";
186
+ task_artifact_owner_retired?: true;
187
+ task_artifact_owner_payload_retired?: true;
188
+ task_artifact_owner_namespace_retained?: true;
184
189
  /** Set when `bytes` is a floor because a walk was capped or partially unreadable. */
185
190
  partial?: true;
186
191
  /** Set when this entry was a reclaim candidate that its surface withheld on incomplete evidence. */
@@ -117,11 +117,6 @@ export declare function countRalplanOnDiskLaneArtifacts(cwd: string, sessionId:
117
117
  architect: number;
118
118
  critic: number;
119
119
  }>;
120
- /**
121
- * Load index rows for cap enforcement. Unlike HUD reads, returns structural
122
- * signals so callers can fail closed when the ledger is empty/malformed while
123
- * opener artifacts already exist on disk.
124
- */
125
120
  export declare function loadRalplanIndexForCap(cwd: string, sessionId: string, runId: string): Promise<{
126
121
  rows: RalplanIndexRow[];
127
122
  indexPresent: boolean;
@@ -1,4 +1,4 @@
1
- export type StateAction = "read" | "write" | "clear" | "contract" | "handoff" | "graph" | "prune" | "gc" | "migrate" | "status" | "doctor";
1
+ export type StateAction = "read" | "write" | "clear" | "contract" | "approve-execution" | "handoff" | "graph" | "prune" | "gc" | "migrate" | "status" | "doctor";
2
2
  export declare const STATE_ACTION_NAMES: ReadonlySet<StateAction>;
3
3
  export declare const STATE_FLAGS_WITH_VALUES: ReadonlySet<string>;
4
4
  export declare const STATE_BOOLEAN_FLAGS: ReadonlySet<string>;
@@ -20,6 +20,14 @@ export interface MigrateWorkflowStateResult {
20
20
  changed: boolean;
21
21
  }
22
22
  export type WorkflowStateMigration = (state: Record<string, unknown>, skill: CanonicalGjcWorkflowSkill) => Record<string, unknown>;
23
+ /**
24
+ * A newer workflow envelope is not a legacy shape. Treating it as one would
25
+ * silently downgrade state written by a newer runtime when any sanctioned
26
+ * read/modify/write path persists the result. Callers that can surface a
27
+ * command error should use this guard before doing any merge; the migration
28
+ * primitive also enforces it so internal writers cannot bypass that boundary.
29
+ */
30
+ export declare function assertNotFutureWorkflowState(state: Record<string, unknown>, skill: string, surface?: string): void;
23
31
  export declare function migrateWorkflowState(raw: Record<string, unknown>, skill: string): MigrateWorkflowStateResult;
24
32
  /**
25
33
  * Pure legacy state normalizer for background/internal readers.
@@ -36,5 +36,100 @@ export declare function reconcileWorkflowSkillState(options: {
36
36
  stateFile: string;
37
37
  }>;
38
38
  export declare function readWorkflowStateJson(cwd: string, skill: CanonicalGjcWorkflowSkill, sessionId?: string, onWarning?: StateWarningSink): Promise<Record<string, unknown>>;
39
+ /**
40
+ * A user-origin execution choice is deliberately kept outside the workflow
41
+ * envelope. The envelope is agent/runtime state and therefore cannot itself
42
+ * be evidence that a human selected the execution path. This record is the
43
+ * short-lived bridge from the structured ask surface to the explicit
44
+ * `approve-execution` command.
45
+ */
46
+ export declare const DEEP_INTERVIEW_EXECUTION_APPROVAL_RECORD_FILE = "deep-interview-execution-approval.json";
47
+ export declare const DEEP_INTERVIEW_EXECUTION_APPROVAL_MAX_AGE_MS: number;
48
+ export interface ExecutionApprovalTranscriptBoundary {
49
+ byte_length: number;
50
+ device: string;
51
+ inode: string;
52
+ leaf_id: string | null;
53
+ approval_tool_call_id: string;
54
+ }
55
+ export declare function captureExecutionApprovalTranscriptBoundary(cwd: string, sessionId: string, transcriptPath: string, transcriptSha256: string, approvalToolCallId: string): Promise<ExecutionApprovalTranscriptBoundary>;
56
+ export declare function assertExecutionApprovalTranscriptBoundary(cwd: string, sessionId: string, transcriptPath: string, transcriptSha256: string, boundary: unknown): Promise<void>;
57
+ export type ExecutionApprovalStage = "deep-interview" | "ralplan";
58
+ /** Select lineage before validation; malformed Crystal evidence must never fall back. */
59
+ export declare function executionApprovalLineage(cwd: string, sessionId: string, stage: ExecutionApprovalStage): Promise<"crystal" | "ordinary">;
60
+ export interface ExecutionApprovalPresentation {
61
+ state_path: string;
62
+ state_revision: number;
63
+ artifact_path: string;
64
+ artifact_sha256: string;
65
+ run_id: string | null;
66
+ }
67
+ export declare function nonCrystalExecutionApprovalRecordPath(cwd: string, sessionId: string, stage: ExecutionApprovalStage): string;
68
+ /** Capture the exact publication shown by an execution approval gate. */
69
+ export declare function captureExecutionApprovalPresentation(cwd: string, sessionId: string, stage: ExecutionApprovalStage): Promise<ExecutionApprovalPresentation>;
70
+ export declare function recordNonCrystalExecutionApproval(options: {
71
+ cwd: string;
72
+ sessionId: string;
73
+ approvalStage: ExecutionApprovalStage;
74
+ questionId: string;
75
+ gateId: string;
76
+ target: "ultragoal";
77
+ selectedOptions: string[];
78
+ transcriptPath: string;
79
+ transcriptSha256: string;
80
+ toolCallId: string;
81
+ presentation: ExecutionApprovalPresentation;
82
+ }): Promise<void>;
83
+ export declare function revokeNonCrystalExecutionApproval(cwd: string, sessionId: string, stage: ExecutionApprovalStage): Promise<void>;
84
+ export interface DeepInterviewExecutionApprovalRecord {
85
+ schema_version: 1;
86
+ status: "pending" | "consumed";
87
+ session_id: string;
88
+ target: "ultragoal";
89
+ state_path: string;
90
+ state_revision: number;
91
+ spec_path: string;
92
+ spec_sha256: string;
93
+ crystal_spec_version: number;
94
+ crystal_source_digest: string;
95
+ crystal_digest: string;
96
+ question_id: string;
97
+ gate_id: string;
98
+ answer_hash: string;
99
+ transcript_path: string;
100
+ transcript_sha256: string;
101
+ transcript_boundary: ExecutionApprovalTranscriptBoundary;
102
+ approval_stage?: "deep-interview" | "ralplan";
103
+ ralplan_state_path?: string;
104
+ ralplan_state_revision?: number;
105
+ ralplan_run_id?: string;
106
+ ralplan_final_path?: string;
107
+ ralplan_final_sha256?: string;
108
+ created_at: string;
109
+ expires_at: string;
110
+ consumed_at?: string;
111
+ consumed_mutation_id?: string;
112
+ }
113
+ export declare function deepInterviewExecutionApprovalRecordPath(cwd: string, sessionId: string): string;
114
+ export declare function recordDeepInterviewExecutionApproval(options: {
115
+ cwd: string;
116
+ sessionId: string;
117
+ questionId: string;
118
+ gateId?: string;
119
+ target: string;
120
+ selectedOptions: readonly string[];
121
+ customInput?: string;
122
+ transcriptPath: string;
123
+ transcriptSha256: string;
124
+ toolCallId: string;
125
+ approvalStage?: "deep-interview" | "ralplan";
126
+ presentation: ExecutionApprovalPresentation;
127
+ }): Promise<{
128
+ path: string;
129
+ record: DeepInterviewExecutionApprovalRecord;
130
+ }>;
131
+ export declare function revokeDeepInterviewExecutionApproval(cwd: string, sessionId: string): Promise<void>;
132
+ /** Whether a verified automatic Ultragoal admission already authorizes handoff. */
133
+ export declare function hasSanctionedRalplanFinalAdmissionForHandoff(cwd: string, sessionId: string): Promise<boolean>;
39
134
  export declare function runNativeStateCommand(args: string[], cwd?: string): Promise<StateCommandResult>;
40
135
  export {};
@@ -56,6 +56,7 @@ export interface WorkflowTransactionJournal {
56
56
  callee?: CanonicalGjcWorkflowSkill;
57
57
  paths: string[];
58
58
  steps: string[];
59
+ approval_audit_offset?: number;
59
60
  }
60
61
  export type StateWritePolicy = "source" | "cache";
61
62
  export interface GuardedStateWriterOptions extends StateWriterOptions {
@@ -247,6 +248,12 @@ export declare function removeFileAudited(targetPath: string, options?: StateWri
247
248
  export declare function writeActiveEntry(cwd: string, sessionScope: string | ActiveSessionScope | undefined, skill: string, entry: SkillActiveEntry, options?: StateWriterOptions): Promise<GuardedWriteResult>;
248
249
  export declare function removeActiveEntry(cwd: string, sessionScope: string | ActiveSessionScope | undefined, skill: string, options?: StateWriterOptions): Promise<DeleteResult>;
249
250
  export declare function readActiveEntries(cwd: string, sessionScope?: string | ActiveSessionScope): Promise<SkillActiveEntry[]>;
251
+ /**
252
+ * Failure-observable counterpart of `readActiveEntries`: an entry file that exists
253
+ * but holds no usable skill entry throws instead of being skipped, so its absence
254
+ * from the result always means the entry does not exist.
255
+ */
256
+ export declare function readActiveEntriesStrict(cwd: string, sessionScope?: string | ActiveSessionScope): Promise<SkillActiveEntry[]>;
250
257
  export declare function rebuildActiveSnapshot(cwd: string, sessionScope?: string | ActiveSessionScope, options?: StateWriterOptions): Promise<string>;
251
258
  export declare function mergeActiveState(cwd: string, sessionScope: string | ActiveSessionScope | undefined, skill: string, entry: SkillActiveEntry, options?: StateWriterOptions): Promise<ActiveEntryWriteResult>;
252
259
  export declare function writeArtifact(targetPath: string, content: string, options?: StateWriterOptions): Promise<string>;
@@ -256,7 +263,10 @@ export declare function softDelete(targetPath: string, meta: Record<string, unkn
256
263
  export declare function hardPruneJson(targetPaths: readonly string[], selector: HardPruneSelector, options?: StateWriterOptions): Promise<string[]>;
257
264
  export declare function hardPrune(targets: readonly GenericHardPruneTarget[], selector: GenericHardPruneSelector, options?: StateWriterOptions): Promise<string[]>;
258
265
  export declare function forceOverwrite(targetPath: string, rawValue: unknown, options?: ForceOverwriteOptions): Promise<string>;
259
- export declare function appendAuditEntry(cwd: string, sessionIdOrEntry: string | AuditEntry, maybeEntry?: AuditEntry): Promise<string>;
266
+ export declare function appendAuditEntry(cwd: string, sessionIdOrEntry: string | AuditEntry, maybeEntry?: AuditEntry, options?: {
267
+ lockHeld?: boolean;
268
+ beforeAppend?: (offset: number) => Promise<unknown>;
269
+ }): Promise<string>;
260
270
  export declare function readWorkflowTransactionJournal(cwd: string, sessionId: string, mutationId: string): Promise<WorkflowTransactionJournal | undefined>;
261
271
  export declare function beginWorkflowTransactionJournal(input: {
262
272
  cwd: string;
@@ -251,6 +251,14 @@ export declare function createUltragoalPlan(input: {
251
251
  validationBatches?: UltragoalValidationBatchInput[];
252
252
  validationBatchJson?: string;
253
253
  }): Promise<UltragoalPlan>;
254
+ /**
255
+ * Scheduler order shared with read-only projections: active, then pending, then failed
256
+ * only when the caller explicitly opts into retrying failed goals. Blocked,
257
+ * review_blocked, complete, and superseded goals are never schedulable.
258
+ */
259
+ export declare function selectNextSchedulableGoal<T extends {
260
+ status: UltragoalGoalStatus;
261
+ }>(goals: readonly T[], retryFailed: boolean): T | undefined;
254
262
  export interface UltragoalRunCompletionState {
255
263
  requiredGoals: UltragoalGoal[];
256
264
  incompleteGoals: UltragoalGoal[];
@@ -0,0 +1 @@
1
+ export declare function realSkillPath(baseDir: string, targetPath: string): Promise<string>;
@@ -0,0 +1 @@
1
+ export declare function assertInsideWorkspace(cwd: string, filePath: string): Promise<void>;
@@ -390,6 +390,13 @@ export declare function acpSkillInvocation(blocks: PromptRequest["prompt"]): {
390
390
  name: string;
391
391
  args: string;
392
392
  } | undefined;
393
+ /**
394
+ * Recognize the builtin `/progress` command only when it is the complete, single text
395
+ * prompt. Like the TUI (`allowArgs: false`), `/progress <args>` is not the command.
396
+ */
397
+ export declare function isAcpProgressCommand(blocks: PromptRequest["prompt"]): boolean;
398
+ /** Render the `session.progress` query result as the plain-text `/progress` view. */
399
+ export declare function acpProgressReportText(query: unknown): string;
393
400
  /** Convert every ACP prompt block the agent advertises without silently discarding context. */
394
401
  export declare function acpPromptPayload(blocks: PromptRequest["prompt"]): {
395
402
  text: string;
@@ -49,6 +49,12 @@ export declare class CustomEditor extends Editor {
49
49
  onQueue?: () => void;
50
50
  /** Called when Caps Lock is pressed. */
51
51
  onCapsLock?: () => void;
52
+ /**
53
+ * Called when typed text is what macOS composes for a bound Option chord
54
+ * (for example `œ` for a bound `alt+q`), meaning the terminal sent Option as
55
+ * text. The text is still inserted; the callback only explains the miss.
56
+ */
57
+ onUnforwardedOptionChord?: (key: KeyId, text: string) => void;
52
58
  /** Called when PageUp/PageDown should scroll the transcript viewport instead of prompt history. */
53
59
  onViewportPageScroll?: (direction: -1 | 1) => void;
54
60
  /** Called before regular composer input should return the transcript viewport to the live bottom. */
@@ -24,6 +24,7 @@ import { type CustomizationSurface, type GjcScope } from "../../../customization
24
24
  /** Minimal settings slice the dashboard reads and writes. */
25
25
  export interface CustomizationSettingsSlice {
26
26
  get(key: string): unknown;
27
+ getGlobal?(key: string): unknown;
27
28
  set?(key: string, value: unknown): void;
28
29
  }
29
30
  export declare class CustomizationDashboard extends Container {
@@ -1,3 +1,4 @@
1
+ import type { Settings } from "../../../config/settings";
1
2
  import type { DashboardState, Extension, FlatTreeItem, ProviderTab, TreeNode } from "./types";
2
3
  /**
3
4
  * Settings manager interface for granular toggle persistence.
@@ -9,7 +10,7 @@ export interface ExtensionSettingsManager {
9
10
  /**
10
11
  * Load all extensions from all capabilities.
11
12
  */
12
- export declare function loadAllExtensions(cwd?: string, disabledIds?: string[]): Promise<Extension[]>;
13
+ export declare function loadAllExtensions(cwd?: string, disabledIds?: string[], settings?: Settings): Promise<Extension[]>;
13
14
  /**
14
15
  * Build sidebar tree from extensions.
15
16
  * Groups by provider → kind.
@@ -39,7 +40,7 @@ export declare function applyDisabledExtensionsToState(state: DashboardState, di
39
40
  /**
40
41
  * Create initial dashboard state.
41
42
  */
42
- export declare function createInitialState(cwd?: string, disabledIds?: string[]): Promise<DashboardState>;
43
+ export declare function createInitialState(cwd?: string, disabledIds?: string[], settings?: Settings): Promise<DashboardState>;
43
44
  /**
44
45
  * Toggle provider enabled state.
45
46
  */
@@ -47,4 +48,4 @@ export declare function toggleProvider(providerId: string): boolean;
47
48
  /**
48
49
  * Refresh state after toggle.
49
50
  */
50
- export declare function refreshState(state: DashboardState, cwd?: string, disabledIds?: string[]): Promise<DashboardState>;
51
+ export declare function refreshState(state: DashboardState, cwd?: string, disabledIds?: string[], settings?: Settings): Promise<DashboardState>;
@@ -37,6 +37,15 @@ export declare class InputController {
37
37
  toggleQueuePane(): void;
38
38
  sendNow(): Promise<void>;
39
39
  handleDequeue(): void;
40
+ /**
41
+ * Generate the automatic session title from the first user message. Called
42
+ * from the editor submit and queue-shortcut paths (idle and streaming) and
43
+ * from interactive startup messages; it is a no-op once the session has a
44
+ * user message, a name, or a title request already in flight. The result is
45
+ * bound to the session that requested it: a completion that lands after the
46
+ * session was replaced (New Session, switch, resume) is discarded.
47
+ */
48
+ maybeGenerateSessionTitle(text: string): void;
40
49
  /** Send editor text as a follow-up message (queued behind current stream). */
41
50
  handleFollowUp(): Promise<void>;
42
51
  /** Send editor text explicitly as a queued next-turn message. */
@@ -307,6 +307,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
307
307
  handleCtrlZ(): void;
308
308
  handleDequeue(): void;
309
309
  handleBackgroundCommand(): void;
310
+ maybeGenerateSessionTitle(text: string): void;
310
311
  handleImagePaste(): Promise<boolean>;
311
312
  handleBtwCommand(question: string): Promise<void>;
312
313
  hasActiveBtw(): boolean;
@@ -0,0 +1,3 @@
1
+ import type { InteractiveModeContext } from "../types";
2
+ /** Ordinary focused UI owns interrupt/back before background work does. */
3
+ export declare function focusedUiOwnsInterrupt(ctx: Pick<InteractiveModeContext, "ui" | "editor" | "hookSelector" | "hookInput" | "hookEditor">): boolean;
@@ -6,5 +6,6 @@
6
6
  * keybindings registered. In that case, fall back to raw Escape matching.
7
7
  */
8
8
  export declare function matchesAppInterrupt(data: string): boolean;
9
+ export declare function matchesAppClear(data: string): boolean;
9
10
  export declare function matchesSelectCancel(data: string): boolean;
10
11
  export declare function matchesAppExternalEditor(data: string): boolean;
@@ -0,0 +1,17 @@
1
+ import type { KeyId } from "@gajae-code/tui";
2
+ /** The Option chord that composes `text` on the macOS US/ABC layout, if any. */
3
+ export declare function macosOptionChordForComposedText(text: string): KeyId | undefined;
4
+ /** Terminal-specific instruction for sending Option as Alt/Meta, when the terminal is known. */
5
+ export declare function macosOptionForwardingInstruction(terminalProgram: string | undefined): string | undefined;
6
+ export interface UnforwardedOptionChordWarnerOptions {
7
+ platform: NodeJS.Platform;
8
+ terminalProgram: string | undefined;
9
+ formatKeyHint: (key: KeyId) => string;
10
+ showWarning: (message: string) => void;
11
+ }
12
+ /**
13
+ * Builds the composer callback that explains, once, why a bound Option shortcut
14
+ * produced a character instead of firing. Returns undefined off macOS, where the
15
+ * composition table does not apply.
16
+ */
17
+ export declare function createUnforwardedOptionChordWarner(options: UnforwardedOptionChordWarnerOptions): ((key: KeyId, text: string) => void) | undefined;
@@ -0,0 +1,38 @@
1
+ import type { SubagentLifecycle } from "../async/job-manager";
2
+ import type { Goal, GoalModeState } from "../goals/state";
3
+ import type { SessionManager } from "../session/session-manager";
4
+ import { type TodoPhase } from "../tools/todo-write";
5
+ import { type ProjectProgressInput, type ProjectProgressReport } from "./project-progress";
6
+ /** Session-owned state the overview reads; everything else comes from durable `.gjc` files. */
7
+ export interface ProjectProgressSessionView {
8
+ cwd: string;
9
+ /** GJC session id that scopes `.gjc/_session-{id}` state; without it no workflow state is read. */
10
+ sessionId: string | undefined;
11
+ goal: Goal | undefined;
12
+ todoPhases: readonly TodoPhase[];
13
+ subagents: readonly SubagentLifecycle[];
14
+ }
15
+ /**
16
+ * Gather progress input strictly by reading state. A source that fails to read
17
+ * is reported as unreadable and excluded; it never aborts the overview and is
18
+ * never replaced by a guess. A source rebuilt from authoritative per-entry
19
+ * records after its snapshot failed to read is reported as recovered; one whose
20
+ * readable derived snapshot listed stale rows is reported as discarded; one whose
21
+ * rows could not be attributed to an authority is reported as unresolved.
22
+ */
23
+ export declare function collectProjectProgressInput(view: ProjectProgressSessionView): Promise<ProjectProgressInput>;
24
+ /** The live session state `/progress` and `session.progress` read; satisfied by `AgentSession`. */
25
+ export interface ProjectProgressSessionSource {
26
+ getGoalModeState(): GoalModeState | undefined;
27
+ getTodoPhases(): TodoPhase[];
28
+ getSubagentLifecycleStatuses(): SubagentLifecycle[];
29
+ }
30
+ /**
31
+ * Single entry point shared by the human view and the machine snapshot.
32
+ *
33
+ * Todos come from the persisted branch history, as `/todo` reads them: the live
34
+ * list drops completed and abandoned items when a session is resumed, so it is
35
+ * only the fallback when no todo state was ever persisted. A persisted empty
36
+ * list is authoritative and is not replaced by live state.
37
+ */
38
+ export declare function buildSessionProjectProgress(session: ProjectProgressSessionSource, sessionManager: Pick<SessionManager, "getCwd" | "getSessionId" | "getBranch">): Promise<ProjectProgressReport>;