@gajae-code/coding-agent 0.11.6 → 0.11.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 (259) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/dist/types/capability/index.d.ts +10 -20
  3. package/dist/types/capability/types.d.ts +3 -0
  4. package/dist/types/cli/args.d.ts +0 -2
  5. package/dist/types/commands/daemon.d.ts +2 -2
  6. package/dist/types/commands/sdk.d.ts +20 -2
  7. package/dist/types/config/keybindings.d.ts +34 -4
  8. package/dist/types/config/model-profile-activation.d.ts +4 -3
  9. package/dist/types/config/model-profile-contract.d.ts +38 -0
  10. package/dist/types/config/settings-schema.d.ts +70 -7
  11. package/dist/types/edit/modes/patch.d.ts +13 -0
  12. package/dist/types/edit/path-mutation-lock.d.ts +15 -0
  13. package/dist/types/eval/py/executor.d.ts +1 -1
  14. package/dist/types/eval/py/runner-artifact.d.ts +8 -0
  15. package/dist/types/eval/py/tool-bridge.d.ts +1 -2
  16. package/dist/types/gjc-runtime/repository-binding.d.ts +63 -0
  17. package/dist/types/gjc-runtime/ultragoal-guard.d.ts +6 -5
  18. package/dist/types/gjc-runtime/ultragoal-receipt-freshness.d.ts +20 -0
  19. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +43 -5
  20. package/dist/types/main.d.ts +32 -1
  21. package/dist/types/modes/components/btw-panel.d.ts +1 -0
  22. package/dist/types/modes/components/model-selector.d.ts +2 -0
  23. package/dist/types/modes/components/runtime-mcp-add-wizard.d.ts +2 -1
  24. package/dist/types/modes/components/tool-status-header.d.ts +4 -2
  25. package/dist/types/modes/components/welcome.d.ts +2 -0
  26. package/dist/types/modes/controllers/btw-controller.d.ts +5 -0
  27. package/dist/types/modes/controllers/command-controller.d.ts +2 -0
  28. package/dist/types/modes/controllers/selector-controller.d.ts +2 -1
  29. package/dist/types/modes/interactive-mode.d.ts +7 -2
  30. package/dist/types/modes/prompt-action-autocomplete.d.ts +6 -1
  31. package/dist/types/modes/prompt-suggestion-controller.d.ts +35 -0
  32. package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +2 -2
  33. package/dist/types/modes/types.d.ts +4 -0
  34. package/dist/types/modes/utils/hotkeys-markdown.d.ts +2 -1
  35. package/dist/types/runtime-mcp/content-limits.d.ts +7 -0
  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/sdk/broker/broker.d.ts +2 -0
  40. package/dist/types/sdk/broker/lifecycle.d.ts +6 -0
  41. package/dist/types/sdk/bus/chat-daemon-control.d.ts +6 -1
  42. package/dist/types/sdk/bus/config-commands.d.ts +2 -2
  43. package/dist/types/sdk/bus/config.d.ts +2 -0
  44. package/dist/types/sdk/bus/conversation-store.d.ts +1 -0
  45. package/dist/types/sdk/bus/index.d.ts +26 -1
  46. package/dist/types/sdk/bus/lifecycle-commands.d.ts +5 -4
  47. package/dist/types/sdk/bus/notification-orchestration.d.ts +1 -0
  48. package/dist/types/sdk/bus/notification-service.d.ts +34 -0
  49. package/dist/types/sdk/bus/prompt-reconciliation.d.ts +105 -0
  50. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +18 -3
  51. package/dist/types/sdk/bus/telegram-daemon-control.d.ts +5 -1
  52. package/dist/types/sdk/bus/telegram-daemon.d.ts +189 -4
  53. package/dist/types/sdk/bus/telegram-reference.d.ts +2 -0
  54. package/dist/types/sdk/bus/topic-registry.d.ts +88 -2
  55. package/dist/types/sdk/client/discovery.d.ts +2 -0
  56. package/dist/types/sdk/client/liveness.d.ts +7 -0
  57. package/dist/types/sdk/host/control/operations.d.ts +1 -1
  58. package/dist/types/sdk/host/host.d.ts +1 -1
  59. package/dist/types/sdk/host/query/handlers.d.ts +9 -0
  60. package/dist/types/sdk/index.d.ts +2 -0
  61. package/dist/types/sdk/prompt-status.d.ts +88 -0
  62. package/dist/types/sdk/session-directory.d.ts +1 -1
  63. package/dist/types/sdk/startup-capability.d.ts +3 -0
  64. package/dist/types/sdk/transport/auth-preface.d.ts +9 -0
  65. package/dist/types/sdk/transport/index.d.ts +12 -0
  66. package/dist/types/sdk/transport/relay.d.ts +43 -0
  67. package/dist/types/sdk/transport/serve-cli.d.ts +4 -0
  68. package/dist/types/sdk/transport/socket.d.ts +7 -0
  69. package/dist/types/sdk/transport/stdio.d.ts +3 -0
  70. package/dist/types/session/agent-session.d.ts +30 -5
  71. package/dist/types/session/btw-contract.d.ts +16 -0
  72. package/dist/types/session/internal/managed-session-scope.d.ts +32 -9
  73. package/dist/types/session/internal/managed-session-storage.d.ts +27 -10
  74. package/dist/types/session/internal/native-publish-outcome.d.ts +48 -0
  75. package/dist/types/session/session-manager.d.ts +25 -4
  76. package/dist/types/session/session-storage.d.ts +18 -0
  77. package/dist/types/setup/credential-import.d.ts +5 -1
  78. package/dist/types/setup/provider-onboarding.d.ts +2 -0
  79. package/dist/types/ssh/utils.d.ts +1 -0
  80. package/dist/types/task/discovery.d.ts +3 -1
  81. package/dist/types/task/index.d.ts +3 -1
  82. package/dist/types/task/receipt.d.ts +2 -0
  83. package/dist/types/task/types.d.ts +94 -0
  84. package/dist/types/tools/ask.d.ts +454 -174
  85. package/dist/types/tools/fetch.d.ts +5 -8
  86. package/dist/types/tools/image-gen.d.ts +63 -1
  87. package/dist/types/tools/index.d.ts +4 -0
  88. package/dist/types/tools/skill-discovery.d.ts +7 -0
  89. package/dist/types/tools/sqlite-reader.d.ts +7 -0
  90. package/dist/types/utils/prompt-suggestion.d.ts +33 -0
  91. package/dist/types/utils/shell-snapshot.d.ts +12 -0
  92. package/dist/types/web/insane/bridge.d.ts +1 -0
  93. package/dist/types/web/insane/url-guard.d.ts +17 -0
  94. package/package.json +8 -8
  95. package/scripts/capture-platform-shortcut-labels-showcase.ts +342 -0
  96. package/scripts/dogfood-repository-binding.ts +209 -0
  97. package/scripts/generate-sdk-operation-inventory.ts +4 -0
  98. package/scripts/run-test-manifest.ts +4 -4
  99. package/src/capability/index.ts +50 -42
  100. package/src/capability/types.ts +3 -0
  101. package/src/cli/args.ts +2 -92
  102. package/src/cli/notify-cli.ts +5 -38
  103. package/src/cli/setup-cli.ts +10 -4
  104. package/src/cli.ts +52 -9
  105. package/src/commands/daemon.ts +22 -5
  106. package/src/commands/sdk.ts +44 -11
  107. package/src/config/keybindings.ts +158 -25
  108. package/src/config/model-profile-activation.ts +7 -18
  109. package/src/config/model-profile-contract.ts +161 -0
  110. package/src/config/model-profiles.ts +18 -0
  111. package/src/config/model-registry.ts +11 -1
  112. package/src/config/settings-schema.ts +73 -7
  113. package/src/coordinator-mcp/model-preset.ts +21 -74
  114. package/src/defaults/gjc/skills/deep-interview/SKILL.md +2 -2
  115. package/src/defaults/gjc/skills/ralplan/SKILL.md +3 -1
  116. package/src/defaults/gjc/skills/ultragoal/SKILL.md +42 -1
  117. package/src/discovery/ssh.ts +12 -1
  118. package/src/edit/index.ts +3 -6
  119. package/src/edit/modes/patch.ts +38 -1
  120. package/src/edit/modes/replace.ts +42 -0
  121. package/src/edit/path-mutation-lock.ts +112 -0
  122. package/src/eval/py/executor.ts +30 -11
  123. package/src/eval/py/kernel.ts +1 -21
  124. package/src/eval/py/prelude.py +2 -2
  125. package/src/eval/py/runner-artifact.ts +84 -0
  126. package/src/eval/py/tool-bridge.ts +34 -18
  127. package/src/extensibility/gjc-plugins/runtime-adapters.ts +2 -1
  128. package/src/extensibility/plugins/marketplace/fetcher.ts +191 -7
  129. package/src/gjc-runtime/launch-tmux.ts +1 -1
  130. package/src/gjc-runtime/managed-owner-supervisor.ts +83 -4
  131. package/src/gjc-runtime/ralplan-runtime.ts +75 -3
  132. package/src/gjc-runtime/repository-binding.ts +267 -0
  133. package/src/gjc-runtime/session-state-sidecar.ts +25 -9
  134. package/src/gjc-runtime/tmux-owner-isolation.ts +2 -1
  135. package/src/gjc-runtime/tmux-sessions.ts +45 -6
  136. package/src/gjc-runtime/ultragoal-guard.ts +93 -15
  137. package/src/gjc-runtime/ultragoal-receipt-freshness.ts +103 -0
  138. package/src/gjc-runtime/ultragoal-runtime.ts +456 -31
  139. package/src/gjc-runtime/workflow-manifest.generated.json +58 -0
  140. package/src/gjc-runtime/workflow-manifest.ts +23 -0
  141. package/src/internal-urls/docs-index.generated.ts +12 -10
  142. package/src/internal-urls/local-protocol.ts +64 -21
  143. package/src/internal-urls/mcp-protocol.ts +73 -11
  144. package/src/main.ts +111 -37
  145. package/src/modes/DESIGN.md +5 -0
  146. package/src/modes/acp/acp-agent.ts +50 -16
  147. package/src/modes/action-registry.ts +1 -1
  148. package/src/modes/components/btw-panel.ts +82 -16
  149. package/src/modes/components/model-selector.ts +73 -11
  150. package/src/modes/components/plan-preview-overlay.ts +1 -1
  151. package/src/modes/components/runtime-mcp-add-wizard.ts +5 -0
  152. package/src/modes/components/tool-status-header.ts +25 -4
  153. package/src/modes/components/welcome.ts +22 -18
  154. package/src/modes/controllers/btw-controller.ts +119 -36
  155. package/src/modes/controllers/command-controller.ts +97 -54
  156. package/src/modes/controllers/event-controller.ts +10 -0
  157. package/src/modes/controllers/input-controller.ts +38 -2
  158. package/src/modes/controllers/runtime-mcp-command-controller.ts +29 -6
  159. package/src/modes/controllers/selector-controller.ts +149 -63
  160. package/src/modes/interactive-mode.ts +57 -34
  161. package/src/modes/prompt-action-autocomplete.ts +32 -13
  162. package/src/modes/prompt-suggestion-controller.ts +96 -0
  163. package/src/modes/shared/agent-wire/workflow-gate-broker.ts +2 -2
  164. package/src/modes/types.ts +4 -0
  165. package/src/modes/utils/hotkeys-markdown.ts +64 -36
  166. package/src/modes/utils/ui-helpers.ts +5 -3
  167. package/src/prompts/agents/architect.md +0 -1
  168. package/src/prompts/agents/critic.md +0 -1
  169. package/src/prompts/system/btw-user.md +3 -8
  170. package/src/prompts/system/prompt-suggestion-system.md +32 -0
  171. package/src/prompts/system/system-prompt.md +6 -4
  172. package/src/prompts/tools/cron.md +3 -1
  173. package/src/prompts/tools/skill-discovery.md +1 -0
  174. package/src/runtime-mcp/client.ts +41 -55
  175. package/src/runtime-mcp/content-limits.ts +71 -0
  176. package/src/runtime-mcp/json-rpc.ts +23 -9
  177. package/src/runtime-mcp/manager.ts +51 -53
  178. package/src/runtime-mcp/oauth-flow.ts +0 -72
  179. package/src/runtime-mcp/plugin-network-boundary.ts +101 -0
  180. package/src/runtime-mcp/transports/http.ts +63 -22
  181. package/src/sdk/broker/broker.ts +34 -20
  182. package/src/sdk/broker/lifecycle.ts +185 -36
  183. package/src/sdk/bus/chat-daemon-control.ts +19 -5
  184. package/src/sdk/bus/config-commands.ts +2 -2
  185. package/src/sdk/bus/config.ts +9 -1
  186. package/src/sdk/bus/conversation-store.ts +40 -6
  187. package/src/sdk/bus/index.ts +244 -70
  188. package/src/sdk/bus/lifecycle-commands.ts +63 -10
  189. package/src/sdk/bus/lifecycle-control-runtime.ts +11 -2
  190. package/src/sdk/bus/lifecycle-orchestrator.ts +32 -1
  191. package/src/sdk/bus/notification-orchestration.ts +12 -0
  192. package/src/sdk/bus/notification-service.ts +68 -20
  193. package/src/sdk/bus/prompt-reconciliation.ts +239 -0
  194. package/src/sdk/bus/recent-activity.ts +90 -26
  195. package/src/sdk/bus/telegram-daemon-contract.ts +18 -3
  196. package/src/sdk/bus/telegram-daemon-control.ts +147 -35
  197. package/src/sdk/bus/telegram-daemon.ts +2463 -450
  198. package/src/sdk/bus/telegram-reference.ts +20 -2
  199. package/src/sdk/bus/topic-registry.ts +451 -12
  200. package/src/sdk/cli/session-cli.ts +15 -2
  201. package/src/sdk/client/discovery.ts +19 -3
  202. package/src/sdk/client/liveness.ts +49 -0
  203. package/src/sdk/host/control/dispatch.ts +1 -1
  204. package/src/sdk/host/control/operations.ts +1 -1
  205. package/src/sdk/host/host.ts +2 -6
  206. package/src/sdk/host/query/handlers.ts +70 -5
  207. package/src/sdk/index.ts +12 -0
  208. package/src/sdk/prompt-status.ts +97 -0
  209. package/src/sdk/protocol/operation-inventory.generated.json +58 -0
  210. package/src/sdk/protocol/operation-registry.ts +18 -4
  211. package/src/sdk/session-directory.ts +5 -1
  212. package/src/sdk/session.ts +31 -5
  213. package/src/sdk/startup-capability.ts +9 -1
  214. package/src/sdk/transport/auth-preface.ts +82 -0
  215. package/src/sdk/transport/index.ts +18 -0
  216. package/src/sdk/transport/relay.ts +252 -0
  217. package/src/sdk/transport/serve-cli.ts +105 -0
  218. package/src/sdk/transport/socket.ts +197 -0
  219. package/src/sdk/transport/stdio.ts +17 -0
  220. package/src/session/agent-session.ts +292 -154
  221. package/src/session/blob-store.ts +25 -7
  222. package/src/session/btw-contract.ts +59 -0
  223. package/src/session/internal/managed-session-scope.ts +1163 -137
  224. package/src/session/internal/managed-session-storage.ts +397 -234
  225. package/src/session/internal/native-publish-outcome.ts +266 -0
  226. package/src/session/session-manager.ts +620 -403
  227. package/src/session/session-storage.ts +128 -11
  228. package/src/setup/credential-import.ts +28 -3
  229. package/src/setup/provider-onboarding.ts +30 -1
  230. package/src/setup/provider-presets.json +2 -1
  231. package/src/slash-commands/builtin-registry.ts +1 -1
  232. package/src/ssh/utils.ts +14 -0
  233. package/src/task/discovery.ts +8 -2
  234. package/src/task/gjc-command.ts +2 -2
  235. package/src/task/index.ts +121 -15
  236. package/src/task/receipt.ts +3 -0
  237. package/src/task/types.ts +34 -3
  238. package/src/tools/ask.ts +199 -89
  239. package/src/tools/ast-edit.ts +2 -2
  240. package/src/tools/bash-pty-selection.ts +2 -2
  241. package/src/tools/browser/screenshot-format.ts +6 -1
  242. package/src/tools/cron.ts +1 -1
  243. package/src/tools/fetch.ts +13 -131
  244. package/src/tools/image-gen.ts +476 -23
  245. package/src/tools/index.ts +4 -0
  246. package/src/tools/read.ts +2 -0
  247. package/src/tools/render-utils.ts +7 -1
  248. package/src/tools/skill-discovery.ts +39 -3
  249. package/src/tools/sqlite-reader.ts +63 -5
  250. package/src/utils/edit-mode.ts +2 -2
  251. package/src/utils/pasted-image-path.ts +15 -6
  252. package/src/utils/prompt-suggestion.ts +265 -0
  253. package/src/utils/shell-snapshot.ts +173 -63
  254. package/src/utils/sixel.ts +3 -3
  255. package/src/web/insane/bridge.ts +5 -1
  256. package/src/web/insane/url-guard.ts +140 -27
  257. package/src/web/scrapers/docs-rs.ts +30 -5
  258. package/src/web/scrapers/types.ts +19 -49
  259. package/src/web/scrapers/utils.ts +12 -26
@@ -30,80 +30,456 @@ export declare const askSchema: z.ZodObject<{
30
30
  }, z.core.$strip>>;
31
31
  multi: z.ZodOptional<z.ZodBoolean>;
32
32
  recommended: z.ZodOptional<z.ZodNumber>;
33
- deepInterview: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
34
- round_id: z.ZodOptional<z.ZodString>;
35
- round: z.ZodNumber;
36
- component: z.ZodString;
37
- dimension: z.ZodString;
38
- ambiguity: z.ZodNumber;
39
- confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
- references: z.ZodOptional<z.ZodArray<z.ZodObject<{
41
- reference_id: z.ZodString;
42
- label: z.ZodString;
43
- origin: z.ZodString;
44
- url: z.ZodOptional<z.ZodString>;
45
- excerpt: z.ZodOptional<z.ZodString>;
46
- }, z.core.$strict>>>;
47
- }, z.core.$strict>, z.ZodObject<{
48
- round_id: z.ZodOptional<z.ZodString>;
49
- ambiguity: z.ZodNumber;
50
- confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
- references: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
- reference_id: z.ZodString;
53
- label: z.ZodString;
54
- origin: z.ZodString;
55
- url: z.ZodOptional<z.ZodString>;
56
- excerpt: z.ZodOptional<z.ZodString>;
57
- }, z.core.$strict>>>;
58
- round: z.ZodLiteral<0>;
59
- component: z.ZodLiteral<"review-topology">;
60
- dimension: z.ZodLiteral<"topology">;
61
- intent_contract: z.ZodObject<{
62
- items: z.ZodArray<z.ZodObject<{
63
- id: z.ZodString;
64
- category: z.ZodEnum<{
65
- artifact: "artifact";
66
- constraint: "constraint";
67
- integration: "integration";
68
- surface: "surface";
69
- }>;
70
- statement: z.ZodString;
71
- }, z.core.$strict>>;
72
- confirmation_options: z.ZodArray<z.ZodString>;
73
- }, z.core.$strict>;
74
- }, z.core.$strict>, z.ZodObject<{
75
- round_id: z.ZodOptional<z.ZodString>;
76
- component: z.ZodString;
77
- dimension: z.ZodString;
78
- ambiguity: z.ZodNumber;
79
- confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
80
- references: z.ZodOptional<z.ZodArray<z.ZodObject<{
81
- reference_id: z.ZodString;
82
- label: z.ZodString;
83
- origin: z.ZodString;
84
- url: z.ZodOptional<z.ZodString>;
85
- excerpt: z.ZodOptional<z.ZodString>;
86
- }, z.core.$strict>>>;
87
- round: z.ZodNumber;
88
- intent_review: z.ZodObject<{
89
- observed_items: z.ZodArray<z.ZodObject<{
90
- id: z.ZodString;
91
- category: z.ZodEnum<{
92
- artifact: "artifact";
93
- constraint: "constraint";
94
- integration: "integration";
95
- surface: "surface";
96
- }>;
97
- statement: z.ZodString;
98
- }, z.core.$strict>>;
99
- supporting_substitutions: z.ZodArray<z.ZodObject<{
100
- removed_id: z.ZodString;
101
- replacement_ids: z.ZodArray<z.ZodString>;
102
- rationale: z.ZodString;
103
- }, z.core.$strict>>;
104
- approval_options: z.ZodArray<z.ZodString>;
105
- }, z.core.$strict>;
106
- }, z.core.$strict>]>>;
33
+ deepInterview: z.ZodOptional<z.ZodType<{
34
+ round_id?: string | undefined;
35
+ ambiguity: number;
36
+ confused_terms?: string[] | undefined;
37
+ references?: {
38
+ reference_id: string;
39
+ label: string;
40
+ origin: string;
41
+ url?: string | undefined;
42
+ excerpt?: string | undefined;
43
+ }[] | undefined;
44
+ round: 0;
45
+ component: "review-topology";
46
+ dimension: "topology";
47
+ intent_contract: {
48
+ items: {
49
+ id: string;
50
+ category: "artifact" | "constraint" | "integration" | "surface";
51
+ statement: string;
52
+ }[];
53
+ confirmation_options: string[];
54
+ };
55
+ } | {
56
+ round_id?: string | undefined;
57
+ component: string;
58
+ dimension: string;
59
+ ambiguity: number;
60
+ confused_terms?: string[] | undefined;
61
+ references?: {
62
+ reference_id: string;
63
+ label: string;
64
+ origin: string;
65
+ url?: string | undefined;
66
+ excerpt?: string | undefined;
67
+ }[] | undefined;
68
+ round: number;
69
+ } | {
70
+ round_id?: string | undefined;
71
+ component: string;
72
+ dimension: string;
73
+ ambiguity: number;
74
+ confused_terms?: string[] | undefined;
75
+ references?: {
76
+ reference_id: string;
77
+ label: string;
78
+ origin: string;
79
+ url?: string | undefined;
80
+ excerpt?: string | undefined;
81
+ }[] | undefined;
82
+ round: number;
83
+ intent_review: {
84
+ observed_items: {
85
+ id: string;
86
+ category: "artifact" | "constraint" | "integration" | "surface";
87
+ statement: string;
88
+ }[];
89
+ supporting_substitutions: {
90
+ removed_id: string;
91
+ replacement_ids: string[];
92
+ rationale: string;
93
+ }[];
94
+ approval_options: string[];
95
+ };
96
+ }, unknown, z.core.$ZodTypeInternals<{
97
+ round_id?: string | undefined;
98
+ ambiguity: number;
99
+ confused_terms?: string[] | undefined;
100
+ references?: {
101
+ reference_id: string;
102
+ label: string;
103
+ origin: string;
104
+ url?: string | undefined;
105
+ excerpt?: string | undefined;
106
+ }[] | undefined;
107
+ round: 0;
108
+ component: "review-topology";
109
+ dimension: "topology";
110
+ intent_contract: {
111
+ items: {
112
+ id: string;
113
+ category: "artifact" | "constraint" | "integration" | "surface";
114
+ statement: string;
115
+ }[];
116
+ confirmation_options: string[];
117
+ };
118
+ } | {
119
+ round_id?: string | undefined;
120
+ component: string;
121
+ dimension: string;
122
+ ambiguity: number;
123
+ confused_terms?: string[] | undefined;
124
+ references?: {
125
+ reference_id: string;
126
+ label: string;
127
+ origin: string;
128
+ url?: string | undefined;
129
+ excerpt?: string | undefined;
130
+ }[] | undefined;
131
+ round: number;
132
+ } | {
133
+ round_id?: string | undefined;
134
+ component: string;
135
+ dimension: string;
136
+ ambiguity: number;
137
+ confused_terms?: string[] | undefined;
138
+ references?: {
139
+ reference_id: string;
140
+ label: string;
141
+ origin: string;
142
+ url?: string | undefined;
143
+ excerpt?: string | undefined;
144
+ }[] | undefined;
145
+ round: number;
146
+ intent_review: {
147
+ observed_items: {
148
+ id: string;
149
+ category: "artifact" | "constraint" | "integration" | "surface";
150
+ statement: string;
151
+ }[];
152
+ supporting_substitutions: {
153
+ removed_id: string;
154
+ replacement_ids: string[];
155
+ rationale: string;
156
+ }[];
157
+ approval_options: string[];
158
+ };
159
+ }, unknown>>>;
160
+ workflowGate: z.ZodOptional<z.ZodObject<{
161
+ stage: z.ZodEnum<{
162
+ "deep-interview": "deep-interview";
163
+ ralplan: "ralplan";
164
+ ultragoal: "ultragoal";
165
+ }>;
166
+ kind: z.ZodEnum<{
167
+ approval: "approval";
168
+ execution: "execution";
169
+ question: "question";
170
+ }>;
171
+ }, z.core.$strip>>;
172
+ }, z.core.$strip>>;
173
+ }, z.core.$strip>;
174
+ declare const topologyAskSchema: z.ZodObject<{
175
+ questions: z.ZodArray<z.ZodObject<{
176
+ id: z.ZodString;
177
+ question: z.ZodString;
178
+ options: z.ZodArray<z.ZodObject<{
179
+ label: z.ZodString;
180
+ }, z.core.$strip>>;
181
+ multi: z.ZodOptional<z.ZodBoolean>;
182
+ recommended: z.ZodOptional<z.ZodNumber>;
183
+ deepInterview: z.ZodOptional<z.ZodType<{
184
+ round_id?: string | undefined;
185
+ ambiguity: number;
186
+ confused_terms?: string[] | undefined;
187
+ references?: {
188
+ reference_id: string;
189
+ label: string;
190
+ origin: string;
191
+ url?: string | undefined;
192
+ excerpt?: string | undefined;
193
+ }[] | undefined;
194
+ round: 0;
195
+ component: "review-topology";
196
+ dimension: "topology";
197
+ intent_contract: {
198
+ items: {
199
+ id: string;
200
+ category: "artifact" | "constraint" | "integration" | "surface";
201
+ statement: string;
202
+ }[];
203
+ confirmation_options: string[];
204
+ };
205
+ } | {
206
+ round_id?: string | undefined;
207
+ component: string;
208
+ dimension: string;
209
+ ambiguity: number;
210
+ confused_terms?: string[] | undefined;
211
+ references?: {
212
+ reference_id: string;
213
+ label: string;
214
+ origin: string;
215
+ url?: string | undefined;
216
+ excerpt?: string | undefined;
217
+ }[] | undefined;
218
+ round: number;
219
+ } | {
220
+ round_id?: string | undefined;
221
+ component: string;
222
+ dimension: string;
223
+ ambiguity: number;
224
+ confused_terms?: string[] | undefined;
225
+ references?: {
226
+ reference_id: string;
227
+ label: string;
228
+ origin: string;
229
+ url?: string | undefined;
230
+ excerpt?: string | undefined;
231
+ }[] | undefined;
232
+ round: number;
233
+ intent_review: {
234
+ observed_items: {
235
+ id: string;
236
+ category: "artifact" | "constraint" | "integration" | "surface";
237
+ statement: string;
238
+ }[];
239
+ supporting_substitutions: {
240
+ removed_id: string;
241
+ replacement_ids: string[];
242
+ rationale: string;
243
+ }[];
244
+ approval_options: string[];
245
+ };
246
+ }, unknown, z.core.$ZodTypeInternals<{
247
+ round_id?: string | undefined;
248
+ ambiguity: number;
249
+ confused_terms?: string[] | undefined;
250
+ references?: {
251
+ reference_id: string;
252
+ label: string;
253
+ origin: string;
254
+ url?: string | undefined;
255
+ excerpt?: string | undefined;
256
+ }[] | undefined;
257
+ round: 0;
258
+ component: "review-topology";
259
+ dimension: "topology";
260
+ intent_contract: {
261
+ items: {
262
+ id: string;
263
+ category: "artifact" | "constraint" | "integration" | "surface";
264
+ statement: string;
265
+ }[];
266
+ confirmation_options: string[];
267
+ };
268
+ } | {
269
+ round_id?: string | undefined;
270
+ component: string;
271
+ dimension: string;
272
+ ambiguity: number;
273
+ confused_terms?: string[] | undefined;
274
+ references?: {
275
+ reference_id: string;
276
+ label: string;
277
+ origin: string;
278
+ url?: string | undefined;
279
+ excerpt?: string | undefined;
280
+ }[] | undefined;
281
+ round: number;
282
+ } | {
283
+ round_id?: string | undefined;
284
+ component: string;
285
+ dimension: string;
286
+ ambiguity: number;
287
+ confused_terms?: string[] | undefined;
288
+ references?: {
289
+ reference_id: string;
290
+ label: string;
291
+ origin: string;
292
+ url?: string | undefined;
293
+ excerpt?: string | undefined;
294
+ }[] | undefined;
295
+ round: number;
296
+ intent_review: {
297
+ observed_items: {
298
+ id: string;
299
+ category: "artifact" | "constraint" | "integration" | "surface";
300
+ statement: string;
301
+ }[];
302
+ supporting_substitutions: {
303
+ removed_id: string;
304
+ replacement_ids: string[];
305
+ rationale: string;
306
+ }[];
307
+ approval_options: string[];
308
+ };
309
+ }, unknown>>>;
310
+ workflowGate: z.ZodOptional<z.ZodObject<{
311
+ stage: z.ZodEnum<{
312
+ "deep-interview": "deep-interview";
313
+ ralplan: "ralplan";
314
+ ultragoal: "ultragoal";
315
+ }>;
316
+ kind: z.ZodEnum<{
317
+ approval: "approval";
318
+ execution: "execution";
319
+ question: "question";
320
+ }>;
321
+ }, z.core.$strip>>;
322
+ }, z.core.$strip>>;
323
+ }, z.core.$strip>;
324
+ declare const postTopologyAskSchema: z.ZodObject<{
325
+ questions: z.ZodArray<z.ZodObject<{
326
+ id: z.ZodString;
327
+ question: z.ZodString;
328
+ options: z.ZodArray<z.ZodObject<{
329
+ label: z.ZodString;
330
+ }, z.core.$strip>>;
331
+ multi: z.ZodOptional<z.ZodBoolean>;
332
+ recommended: z.ZodOptional<z.ZodNumber>;
333
+ deepInterview: z.ZodOptional<z.ZodType<{
334
+ round_id?: string | undefined;
335
+ ambiguity: number;
336
+ confused_terms?: string[] | undefined;
337
+ references?: {
338
+ reference_id: string;
339
+ label: string;
340
+ origin: string;
341
+ url?: string | undefined;
342
+ excerpt?: string | undefined;
343
+ }[] | undefined;
344
+ round: 0;
345
+ component: "review-topology";
346
+ dimension: "topology";
347
+ intent_contract: {
348
+ items: {
349
+ id: string;
350
+ category: "artifact" | "constraint" | "integration" | "surface";
351
+ statement: string;
352
+ }[];
353
+ confirmation_options: string[];
354
+ };
355
+ } | {
356
+ round_id?: string | undefined;
357
+ component: string;
358
+ dimension: string;
359
+ ambiguity: number;
360
+ confused_terms?: string[] | undefined;
361
+ references?: {
362
+ reference_id: string;
363
+ label: string;
364
+ origin: string;
365
+ url?: string | undefined;
366
+ excerpt?: string | undefined;
367
+ }[] | undefined;
368
+ round: number;
369
+ } | {
370
+ round_id?: string | undefined;
371
+ component: string;
372
+ dimension: string;
373
+ ambiguity: number;
374
+ confused_terms?: string[] | undefined;
375
+ references?: {
376
+ reference_id: string;
377
+ label: string;
378
+ origin: string;
379
+ url?: string | undefined;
380
+ excerpt?: string | undefined;
381
+ }[] | undefined;
382
+ round: number;
383
+ intent_review: {
384
+ observed_items: {
385
+ id: string;
386
+ category: "artifact" | "constraint" | "integration" | "surface";
387
+ statement: string;
388
+ }[];
389
+ supporting_substitutions: {
390
+ removed_id: string;
391
+ replacement_ids: string[];
392
+ rationale: string;
393
+ }[];
394
+ approval_options: string[];
395
+ };
396
+ }, unknown, z.core.$ZodTypeInternals<{
397
+ round_id?: string | undefined;
398
+ ambiguity: number;
399
+ confused_terms?: string[] | undefined;
400
+ references?: {
401
+ reference_id: string;
402
+ label: string;
403
+ origin: string;
404
+ url?: string | undefined;
405
+ excerpt?: string | undefined;
406
+ }[] | undefined;
407
+ round: 0;
408
+ component: "review-topology";
409
+ dimension: "topology";
410
+ intent_contract: {
411
+ items: {
412
+ id: string;
413
+ category: "artifact" | "constraint" | "integration" | "surface";
414
+ statement: string;
415
+ }[];
416
+ confirmation_options: string[];
417
+ };
418
+ } | {
419
+ round_id?: string | undefined;
420
+ component: string;
421
+ dimension: string;
422
+ ambiguity: number;
423
+ confused_terms?: string[] | undefined;
424
+ references?: {
425
+ reference_id: string;
426
+ label: string;
427
+ origin: string;
428
+ url?: string | undefined;
429
+ excerpt?: string | undefined;
430
+ }[] | undefined;
431
+ round: number;
432
+ } | {
433
+ round_id?: string | undefined;
434
+ component: string;
435
+ dimension: string;
436
+ ambiguity: number;
437
+ confused_terms?: string[] | undefined;
438
+ references?: {
439
+ reference_id: string;
440
+ label: string;
441
+ origin: string;
442
+ url?: string | undefined;
443
+ excerpt?: string | undefined;
444
+ }[] | undefined;
445
+ round: number;
446
+ intent_review: {
447
+ observed_items: {
448
+ id: string;
449
+ category: "artifact" | "constraint" | "integration" | "surface";
450
+ statement: string;
451
+ }[];
452
+ supporting_substitutions: {
453
+ removed_id: string;
454
+ replacement_ids: string[];
455
+ rationale: string;
456
+ }[];
457
+ approval_options: string[];
458
+ };
459
+ }, unknown>>>;
460
+ workflowGate: z.ZodOptional<z.ZodObject<{
461
+ stage: z.ZodEnum<{
462
+ "deep-interview": "deep-interview";
463
+ ralplan: "ralplan";
464
+ ultragoal: "ultragoal";
465
+ }>;
466
+ kind: z.ZodEnum<{
467
+ approval: "approval";
468
+ execution: "execution";
469
+ question: "question";
470
+ }>;
471
+ }, z.core.$strip>>;
472
+ }, z.core.$strip>>;
473
+ }, z.core.$strip>;
474
+ declare const ordinaryAskSchema: z.ZodObject<{
475
+ questions: z.ZodArray<z.ZodObject<{
476
+ id: z.ZodString;
477
+ question: z.ZodString;
478
+ options: z.ZodArray<z.ZodObject<{
479
+ label: z.ZodString;
480
+ }, z.core.$strip>>;
481
+ multi: z.ZodOptional<z.ZodBoolean>;
482
+ recommended: z.ZodOptional<z.ZodNumber>;
107
483
  workflowGate: z.ZodOptional<z.ZodObject<{
108
484
  stage: z.ZodEnum<{
109
485
  "deep-interview": "deep-interview";
@@ -119,7 +495,6 @@ export declare const askSchema: z.ZodObject<{
119
495
  }, z.core.$strip>>;
120
496
  }, z.core.$strip>;
121
497
  export type AskToolInput = z.infer<typeof askSchema>;
122
- declare function recoverRoundZeroIntentContract(arguments_: Record<string, unknown>): RawArgumentValidationResult;
123
498
  /** Result for a single question */
124
499
  export interface QuestionResult {
125
500
  id: string;
@@ -165,117 +540,22 @@ export declare function legacyAskReceipt(value: string): {
165
540
  settle(settlement: AskSettlement): Promise<AskSettlementResult>;
166
541
  };
167
542
  type AskParams = AskToolInput;
543
+ type AskParametersSchema = typeof ordinaryAskSchema | typeof askSchema | typeof topologyAskSchema | typeof postTopologyAskSchema;
168
544
  /**
169
545
  * Ask tool for interactive user prompting during execution.
170
546
  *
171
547
  * Allows gathering user preferences, clarifying instructions, and getting decisions
172
548
  * on implementation choices as the agent works.
173
549
  */
174
- export declare class AskTool implements AgentTool<typeof askSchema, AskToolDetails> {
550
+ export declare class AskTool implements AgentTool<AskParametersSchema, AskToolDetails> {
175
551
  #private;
176
552
  private readonly session;
177
553
  readonly name = "ask";
178
554
  readonly label = "Ask";
179
555
  readonly summary = "Ask the user a clarifying question";
180
556
  readonly description: string;
181
- readonly parameters: z.ZodObject<{
182
- questions: z.ZodArray<z.ZodObject<{
183
- id: z.ZodString;
184
- question: z.ZodString;
185
- options: z.ZodArray<z.ZodObject<{
186
- label: z.ZodString;
187
- }, z.core.$strip>>;
188
- multi: z.ZodOptional<z.ZodBoolean>;
189
- recommended: z.ZodOptional<z.ZodNumber>;
190
- deepInterview: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
191
- round_id: z.ZodOptional<z.ZodString>;
192
- round: z.ZodNumber;
193
- component: z.ZodString;
194
- dimension: z.ZodString;
195
- ambiguity: z.ZodNumber;
196
- confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
197
- references: z.ZodOptional<z.ZodArray<z.ZodObject<{
198
- reference_id: z.ZodString;
199
- label: z.ZodString;
200
- origin: z.ZodString;
201
- url: z.ZodOptional<z.ZodString>;
202
- excerpt: z.ZodOptional<z.ZodString>;
203
- }, z.core.$strict>>>;
204
- }, z.core.$strict>, z.ZodObject<{
205
- round_id: z.ZodOptional<z.ZodString>;
206
- ambiguity: z.ZodNumber;
207
- confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
208
- references: z.ZodOptional<z.ZodArray<z.ZodObject<{
209
- reference_id: z.ZodString;
210
- label: z.ZodString;
211
- origin: z.ZodString;
212
- url: z.ZodOptional<z.ZodString>;
213
- excerpt: z.ZodOptional<z.ZodString>;
214
- }, z.core.$strict>>>;
215
- round: z.ZodLiteral<0>;
216
- component: z.ZodLiteral<"review-topology">;
217
- dimension: z.ZodLiteral<"topology">;
218
- intent_contract: z.ZodObject<{
219
- items: z.ZodArray<z.ZodObject<{
220
- id: z.ZodString;
221
- category: z.ZodEnum<{
222
- artifact: "artifact";
223
- constraint: "constraint";
224
- integration: "integration";
225
- surface: "surface";
226
- }>;
227
- statement: z.ZodString;
228
- }, z.core.$strict>>;
229
- confirmation_options: z.ZodArray<z.ZodString>;
230
- }, z.core.$strict>;
231
- }, z.core.$strict>, z.ZodObject<{
232
- round_id: z.ZodOptional<z.ZodString>;
233
- component: z.ZodString;
234
- dimension: z.ZodString;
235
- ambiguity: z.ZodNumber;
236
- confused_terms: z.ZodOptional<z.ZodArray<z.ZodString>>;
237
- references: z.ZodOptional<z.ZodArray<z.ZodObject<{
238
- reference_id: z.ZodString;
239
- label: z.ZodString;
240
- origin: z.ZodString;
241
- url: z.ZodOptional<z.ZodString>;
242
- excerpt: z.ZodOptional<z.ZodString>;
243
- }, z.core.$strict>>>;
244
- round: z.ZodNumber;
245
- intent_review: z.ZodObject<{
246
- observed_items: z.ZodArray<z.ZodObject<{
247
- id: z.ZodString;
248
- category: z.ZodEnum<{
249
- artifact: "artifact";
250
- constraint: "constraint";
251
- integration: "integration";
252
- surface: "surface";
253
- }>;
254
- statement: z.ZodString;
255
- }, z.core.$strict>>;
256
- supporting_substitutions: z.ZodArray<z.ZodObject<{
257
- removed_id: z.ZodString;
258
- replacement_ids: z.ZodArray<z.ZodString>;
259
- rationale: z.ZodString;
260
- }, z.core.$strict>>;
261
- approval_options: z.ZodArray<z.ZodString>;
262
- }, z.core.$strict>;
263
- }, z.core.$strict>]>>;
264
- workflowGate: z.ZodOptional<z.ZodObject<{
265
- stage: z.ZodEnum<{
266
- "deep-interview": "deep-interview";
267
- ralplan: "ralplan";
268
- ultragoal: "ultragoal";
269
- }>;
270
- kind: z.ZodEnum<{
271
- approval: "approval";
272
- execution: "execution";
273
- question: "question";
274
- }>;
275
- }, z.core.$strip>>;
276
- }, z.core.$strip>>;
277
- }, z.core.$strip>;
278
- readonly rawArgumentValidation: typeof recoverRoundZeroIntentContract;
557
+ get parameters(): AskParametersSchema;
558
+ readonly rawArgumentValidation: (arguments_: Record<string, unknown>) => RawArgumentValidationResult;
279
559
  readonly strict = true;
280
560
  readonly loadMode = "discoverable";
281
561
  constructor(session: ToolSession);
@@ -14,6 +14,11 @@ export interface ParsedReadUrlTarget {
14
14
  limit?: number;
15
15
  }
16
16
  export declare function parseReadUrlTarget(readPath: string): ParsedReadUrlTarget | null;
17
+ export declare function renderHtmlToText(html: string, signal?: AbortSignal): Promise<{
18
+ content: string;
19
+ ok: boolean;
20
+ method: string;
21
+ }>;
17
22
  interface FetchImagePayload {
18
23
  data: string;
19
24
  mimeType: string;
@@ -21,14 +26,6 @@ interface FetchImagePayload {
21
26
  type FetchRenderResult = RenderResult & {
22
27
  image?: FetchImagePayload;
23
28
  };
24
- /**
25
- * Opt-in insane-search fallback for blocked / degraded public URL reads.
26
- *
27
- * Returns a finalized `method: "insane"` result on success, or null (so the
28
- * caller continues with its normal degraded behavior). Fail-closed: no note,
29
- * guard DNS, dependency probe, or subprocess when raw mode or the opt-in
30
- * setting is off. The public-URL guard runs BEFORE any probe/spawn.
31
- */
32
29
  export declare function tryInsaneFallback(args: {
33
30
  url: string;
34
31
  finalUrl: string;