@levelcode/sdk 0.0.4 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/dist/common/src/actions.d.ts +176 -0
  2. package/dist/common/src/analytics-core.d.ts +52 -0
  3. package/dist/common/src/analytics.d.ts +9 -0
  4. package/dist/common/src/browser-actions.d.ts +1200 -0
  5. package/dist/common/src/constants/agents.d.ts +47 -0
  6. package/dist/common/src/constants/analytics-events.d.ts +107 -0
  7. package/dist/common/src/constants/byok.d.ts +2 -0
  8. package/dist/common/src/constants/claude-oauth.d.ts +36 -0
  9. package/dist/common/src/constants/index.d.ts +4 -0
  10. package/dist/common/src/constants/knowledge.d.ts +21 -0
  11. package/dist/common/src/constants/limits.d.ts +14 -0
  12. package/dist/common/src/constants/model-config.d.ts +117 -0
  13. package/dist/common/src/constants/paths.d.ts +23 -0
  14. package/dist/common/src/constants/skills.d.ts +42 -0
  15. package/dist/common/src/constants/ui.d.ts +14 -0
  16. package/dist/common/src/env-ci.d.ts +22 -0
  17. package/dist/common/src/env-process.d.ts +28 -0
  18. package/dist/common/src/env-schema.d.ts +24 -0
  19. package/dist/common/src/env.d.ts +16 -0
  20. package/dist/common/src/mcp/client.d.ts +6 -0
  21. package/dist/common/src/old-constants.d.ts +10 -0
  22. package/dist/common/src/project-file-tree.d.ts +27 -0
  23. package/dist/common/src/templates/agent-validation.d.ts +48 -0
  24. package/dist/common/src/templates/initial-agents-dir/types/agent-definition.d.ts +296 -0
  25. package/dist/common/src/templates/initial-agents-dir/types/tools.d.ts +308 -0
  26. package/dist/common/src/templates/initial-agents-dir/types/util-types.d.ts +128 -0
  27. package/dist/common/src/testing/errors.d.ts +14 -0
  28. package/dist/common/src/testing/mock-modules.d.ts +11 -0
  29. package/dist/common/src/testing/mock-types.d.ts +97 -0
  30. package/dist/common/src/testing/mocks/analytics.d.ts +182 -0
  31. package/dist/common/src/testing/mocks/child-process.d.ts +29 -0
  32. package/dist/common/src/testing/mocks/crypto.d.ts +159 -0
  33. package/dist/common/src/testing/mocks/database.d.ts +197 -0
  34. package/dist/common/src/testing/mocks/fetch.d.ts +35 -0
  35. package/dist/common/src/testing/mocks/filesystem.d.ts +31 -0
  36. package/dist/common/src/testing/mocks/index.d.ts +25 -0
  37. package/dist/common/src/testing/mocks/logger.d.ts +35 -0
  38. package/dist/common/src/testing/mocks/stream.d.ts +203 -0
  39. package/dist/common/src/testing/mocks/timers.d.ts +27 -0
  40. package/dist/common/src/testing/mocks/tree-sitter.d.ts +58 -0
  41. package/dist/common/src/testing-env-process.d.ts +7 -0
  42. package/dist/common/src/tools/constants.d.ts +17 -0
  43. package/dist/common/src/tools/list.d.ts +1140 -0
  44. package/dist/common/src/tools/params/tool/add-message.d.ts +19 -0
  45. package/dist/common/src/tools/params/tool/add-subgoal.d.ts +26 -0
  46. package/dist/common/src/tools/params/tool/ask-user.d.ts +59 -0
  47. package/dist/common/src/tools/params/tool/browser-logs.d.ts +127 -0
  48. package/dist/common/src/tools/params/tool/code-search.d.ts +30 -0
  49. package/dist/common/src/tools/params/tool/create-plan.d.ts +30 -0
  50. package/dist/common/src/tools/params/tool/end-turn.d.ts +13 -0
  51. package/dist/common/src/tools/params/tool/find-files.d.ts +31 -0
  52. package/dist/common/src/tools/params/tool/glob.d.ts +26 -0
  53. package/dist/common/src/tools/params/tool/list-directory.d.ts +25 -0
  54. package/dist/common/src/tools/params/tool/lookup-agent-info.d.ts +13 -0
  55. package/dist/common/src/tools/params/tool/propose-str-replace.d.ts +40 -0
  56. package/dist/common/src/tools/params/tool/propose-write-file.d.ts +29 -0
  57. package/dist/common/src/tools/params/tool/read-docs.d.ts +19 -0
  58. package/dist/common/src/tools/params/tool/read-files.d.ts +35 -0
  59. package/dist/common/src/tools/params/tool/read-subtree.d.ts +40 -0
  60. package/dist/common/src/tools/params/tool/run-file-change-hooks.d.ts +63 -0
  61. package/dist/common/src/tools/params/tool/run-terminal-command.d.ts +88 -0
  62. package/dist/common/src/tools/params/tool/send-message.d.ts +26 -0
  63. package/dist/common/src/tools/params/tool/set-messages.d.ts +15 -0
  64. package/dist/common/src/tools/params/tool/set-output.d.ts +15 -0
  65. package/dist/common/src/tools/params/tool/skill.d.ts +28 -0
  66. package/dist/common/src/tools/params/tool/spawn-agent-inline.d.ts +17 -0
  67. package/dist/common/src/tools/params/tool/spawn-agents.d.ts +26 -0
  68. package/dist/common/src/tools/params/tool/str-replace.d.ts +43 -0
  69. package/dist/common/src/tools/params/tool/suggest-followups.d.ts +26 -0
  70. package/dist/common/src/tools/params/tool/task-completed.d.ts +13 -0
  71. package/dist/common/src/tools/params/tool/task-create.d.ts +18 -0
  72. package/dist/common/src/tools/params/tool/task-get.d.ts +15 -0
  73. package/dist/common/src/tools/params/tool/task-list.d.ts +13 -0
  74. package/dist/common/src/tools/params/tool/task-update.d.ts +23 -0
  75. package/dist/common/src/tools/params/tool/team-create.d.ts +17 -0
  76. package/dist/common/src/tools/params/tool/team-delete.d.ts +13 -0
  77. package/dist/common/src/tools/params/tool/think-deeply.d.ts +15 -0
  78. package/dist/common/src/tools/params/tool/update-subgoal.d.ts +25 -0
  79. package/dist/common/src/tools/params/tool/web-search.d.ts +25 -0
  80. package/dist/common/src/tools/params/tool/write-file.d.ts +31 -0
  81. package/dist/common/src/tools/params/tool/write-todos.d.ts +18 -0
  82. package/dist/common/src/tools/params/utils.d.ts +35 -0
  83. package/dist/common/src/tools/utils.d.ts +4 -0
  84. package/dist/common/src/types/agent-template.d.ts +156 -0
  85. package/dist/common/src/types/contracts/agent-runtime.d.ts +36 -0
  86. package/dist/common/src/types/contracts/analytics.d.ts +8 -0
  87. package/dist/common/src/types/contracts/billing.d.ts +40 -0
  88. package/dist/common/src/types/contracts/client.d.ts +45 -0
  89. package/dist/common/src/types/contracts/database.d.ts +80 -0
  90. package/dist/common/src/types/contracts/env.d.ts +150 -0
  91. package/dist/common/src/types/contracts/llm.d.ts +102 -0
  92. package/dist/common/src/types/contracts/logger.d.ts +8 -0
  93. package/dist/common/src/types/dynamic-agent-template.d.ts +227 -0
  94. package/dist/common/src/types/filesystem.d.ts +6 -0
  95. package/dist/common/src/types/function-params.d.ts +15 -0
  96. package/dist/common/src/types/grant.d.ts +2 -0
  97. package/dist/common/src/types/json.d.ts +9 -0
  98. package/dist/common/src/types/mcp.d.ts +31 -0
  99. package/dist/common/src/types/messages/content-part.d.ts +46 -0
  100. package/dist/common/src/types/messages/data-content.d.ts +3 -0
  101. package/dist/common/src/types/messages/levelcode-message.d.ts +37 -0
  102. package/dist/common/src/types/messages/provider-metadata.d.ts +3 -0
  103. package/dist/common/src/types/print-mode.d.ts +155 -0
  104. package/dist/common/src/types/session-state.d.ts +94 -0
  105. package/dist/common/src/types/skill.d.ts +31 -0
  106. package/dist/common/src/types/source.d.ts +8 -0
  107. package/dist/common/src/types/spawn.d.ts +8 -0
  108. package/dist/common/src/types/team-config.d.ts +39 -0
  109. package/dist/common/src/types/team-protocol.d.ts +64 -0
  110. package/dist/common/src/util/agent-id-parsing.d.ts +22 -0
  111. package/dist/common/src/util/agent-name-normalization.d.ts +12 -0
  112. package/dist/common/src/util/array.d.ts +6 -0
  113. package/dist/common/src/util/credentials.d.ts +11 -0
  114. package/dist/common/src/util/error.d.ts +128 -0
  115. package/dist/common/src/util/file.d.ts +133 -0
  116. package/dist/common/src/util/format-code-search.d.ts +16 -0
  117. package/dist/common/src/util/lru-cache.d.ts +30 -0
  118. package/dist/common/src/util/messages.d.ts +46 -0
  119. package/dist/common/src/util/model-utils.d.ts +8 -0
  120. package/dist/common/src/util/object.d.ts +22 -0
  121. package/dist/common/src/util/promise.d.ts +16 -0
  122. package/dist/common/src/util/random.d.ts +1 -0
  123. package/dist/common/src/util/skills.d.ts +5 -0
  124. package/dist/common/src/util/stop-sequence.d.ts +14 -0
  125. package/dist/common/src/util/string.d.ts +82 -0
  126. package/dist/common/src/util/xml.d.ts +12 -0
  127. package/dist/common/src/util/zod-schema.d.ts +5 -0
  128. package/dist/common/src/utils/team-fs.d.ts +17 -0
  129. package/dist/index.cjs +1958 -917
  130. package/dist/index.cjs.map +25 -10
  131. package/dist/index.mjs +2392 -1351
  132. package/dist/index.mjs.map +25 -10
  133. package/dist/packages/agent-runtime/src/constants.d.ts +1 -0
  134. package/dist/packages/agent-runtime/src/fast-rewrite.d.ts +45 -0
  135. package/dist/packages/agent-runtime/src/find-files/request-files-prompt.d.ts +71 -0
  136. package/dist/packages/agent-runtime/src/generate-diffs-prompt.d.ts +53 -0
  137. package/dist/packages/agent-runtime/src/get-file-reading-updates.d.ts +8 -0
  138. package/dist/packages/agent-runtime/src/llm-api/claude.d.ts +5 -0
  139. package/dist/packages/agent-runtime/src/llm-api/context7-api.d.ts +55 -0
  140. package/dist/packages/agent-runtime/src/llm-api/gemini-with-fallbacks.d.ts +40 -0
  141. package/dist/packages/agent-runtime/src/llm-api/levelcode-web-api.d.ts +49 -0
  142. package/dist/packages/agent-runtime/src/llm-api/relace-api.d.ts +16 -0
  143. package/dist/packages/agent-runtime/src/main-prompt.d.ts +29 -0
  144. package/dist/packages/agent-runtime/src/mcp-constants.d.ts +12 -0
  145. package/dist/packages/agent-runtime/src/mcp.d.ts +10 -0
  146. package/dist/packages/agent-runtime/src/process-file-block.d.ts +56 -0
  147. package/dist/packages/agent-runtime/src/process-str-replace.d.ts +21 -0
  148. package/dist/packages/agent-runtime/src/prompt-agent-stream.d.ts +28 -0
  149. package/dist/packages/agent-runtime/src/run-agent-step.d.ts +73 -0
  150. package/dist/packages/agent-runtime/src/run-programmatic-step.d.ts +40 -0
  151. package/dist/packages/agent-runtime/src/system-prompt/prompts.d.ts +19 -0
  152. package/dist/packages/agent-runtime/src/system-prompt/search-system-prompt.d.ts +14 -0
  153. package/dist/packages/agent-runtime/src/system-prompt/truncate-file-tree.d.ts +13 -0
  154. package/dist/packages/agent-runtime/src/templates/agent-registry.d.ts +35 -0
  155. package/dist/packages/agent-runtime/src/templates/prompts.d.ts +35 -0
  156. package/dist/packages/agent-runtime/src/templates/strings.d.ts +32 -0
  157. package/dist/packages/agent-runtime/src/templates/types.d.ts +13 -0
  158. package/dist/packages/agent-runtime/src/tool-stream-parser.d.ts +31 -0
  159. package/dist/packages/agent-runtime/src/tools/handlers/handler-function-type.d.ts +51 -0
  160. package/dist/packages/agent-runtime/src/tools/handlers/list.d.ts +347 -0
  161. package/dist/packages/agent-runtime/src/tools/handlers/tool/add-message.d.ts +9 -0
  162. package/dist/packages/agent-runtime/src/tools/handlers/tool/add-subgoal.d.ts +9 -0
  163. package/dist/packages/agent-runtime/src/tools/handlers/tool/ask-user.d.ts +10 -0
  164. package/dist/packages/agent-runtime/src/tools/handlers/tool/browser-logs.d.ts +8 -0
  165. package/dist/packages/agent-runtime/src/tools/handlers/tool/code-search.d.ts +8 -0
  166. package/dist/packages/agent-runtime/src/tools/handlers/tool/create-plan.d.ts +13 -0
  167. package/dist/packages/agent-runtime/src/tools/handlers/tool/end-turn.d.ts +7 -0
  168. package/dist/packages/agent-runtime/src/tools/handlers/tool/find-files.d.ts +27 -0
  169. package/dist/packages/agent-runtime/src/tools/handlers/tool/glob.d.ts +10 -0
  170. package/dist/packages/agent-runtime/src/tools/handlers/tool/list-directory.d.ts +10 -0
  171. package/dist/packages/agent-runtime/src/tools/handlers/tool/lookup-agent-info.d.ts +14 -0
  172. package/dist/packages/agent-runtime/src/tools/handlers/tool/propose-str-replace.d.ts +15 -0
  173. package/dist/packages/agent-runtime/src/tools/handlers/tool/propose-write-file.d.ts +7 -0
  174. package/dist/packages/agent-runtime/src/tools/handlers/tool/proposed-content-store.d.ts +27 -0
  175. package/dist/packages/agent-runtime/src/tools/handlers/tool/read-docs.d.ts +21 -0
  176. package/dist/packages/agent-runtime/src/tools/handlers/tool/read-files.d.ts +13 -0
  177. package/dist/packages/agent-runtime/src/tools/handlers/tool/read-subtree.d.ts +13 -0
  178. package/dist/packages/agent-runtime/src/tools/handlers/tool/run-file-change-hooks.d.ts +10 -0
  179. package/dist/packages/agent-runtime/src/tools/handlers/tool/run-terminal-command.d.ts +10 -0
  180. package/dist/packages/agent-runtime/src/tools/handlers/tool/send-message.d.ts +10 -0
  181. package/dist/packages/agent-runtime/src/tools/handlers/tool/set-messages.d.ts +9 -0
  182. package/dist/packages/agent-runtime/src/tools/handlers/tool/set-output.d.ts +18 -0
  183. package/dist/packages/agent-runtime/src/tools/handlers/tool/skill.d.ts +11 -0
  184. package/dist/packages/agent-runtime/src/tools/handlers/tool/spawn-agent-inline.d.ts +29 -0
  185. package/dist/packages/agent-runtime/src/tools/handlers/tool/spawn-agent-utils.d.ts +100 -0
  186. package/dist/packages/agent-runtime/src/tools/handlers/tool/spawn-agents.d.ts +35 -0
  187. package/dist/packages/agent-runtime/src/tools/handlers/tool/str-replace.d.ts +16 -0
  188. package/dist/packages/agent-runtime/src/tools/handlers/tool/suggest-followups.d.ts +9 -0
  189. package/dist/packages/agent-runtime/src/tools/handlers/tool/task-completed.d.ts +7 -0
  190. package/dist/packages/agent-runtime/src/tools/handlers/tool/task-create.d.ts +9 -0
  191. package/dist/packages/agent-runtime/src/tools/handlers/tool/task-get.d.ts +9 -0
  192. package/dist/packages/agent-runtime/src/tools/handlers/tool/task-list.d.ts +9 -0
  193. package/dist/packages/agent-runtime/src/tools/handlers/tool/task-update.d.ts +9 -0
  194. package/dist/packages/agent-runtime/src/tools/handlers/tool/team-create.d.ts +10 -0
  195. package/dist/packages/agent-runtime/src/tools/handlers/tool/team-delete.d.ts +10 -0
  196. package/dist/packages/agent-runtime/src/tools/handlers/tool/think-deeply.d.ts +9 -0
  197. package/dist/packages/agent-runtime/src/tools/handlers/tool/update-subgoal.d.ts +11 -0
  198. package/dist/packages/agent-runtime/src/tools/handlers/tool/web-search.d.ts +22 -0
  199. package/dist/packages/agent-runtime/src/tools/handlers/tool/write-file.d.ts +49 -0
  200. package/dist/packages/agent-runtime/src/tools/handlers/tool/write-todos.d.ts +9 -0
  201. package/dist/packages/agent-runtime/src/tools/prompts.d.ts +31 -0
  202. package/dist/packages/agent-runtime/src/tools/stream-parser.d.ts +33 -0
  203. package/dist/packages/agent-runtime/src/tools/tool-executor.d.ts +87 -0
  204. package/dist/packages/agent-runtime/src/util/agent-output.d.ts +3 -0
  205. package/dist/packages/agent-runtime/src/util/messages.d.ts +68 -0
  206. package/dist/packages/agent-runtime/src/util/parse-tool-calls-from-text.d.ts +38 -0
  207. package/dist/packages/agent-runtime/src/util/render-read-files-result.d.ts +15 -0
  208. package/dist/packages/agent-runtime/src/util/simplify-tool-results.d.ts +7 -0
  209. package/dist/packages/agent-runtime/src/util/stream-xml-parser.d.ts +34 -0
  210. package/dist/packages/agent-runtime/src/util/token-counter.d.ts +3 -0
  211. package/dist/packages/code-map/src/index.d.ts +3 -0
  212. package/dist/packages/code-map/src/init-node.d.ts +4 -0
  213. package/dist/packages/code-map/src/languages.d.ts +36 -0
  214. package/dist/packages/code-map/src/parse.d.ts +21 -0
  215. package/dist/packages/code-map/src/types.d.ts +8 -0
  216. package/dist/packages/code-map/src/utils.d.ts +1 -0
  217. package/dist/sdk/src/__tests__/client.test.d.ts +1 -0
  218. package/dist/sdk/src/__tests__/code-search.test.d.ts +1 -0
  219. package/dist/sdk/src/__tests__/credentials.test.d.ts +1 -0
  220. package/dist/sdk/src/__tests__/database.test.d.ts +1 -0
  221. package/dist/sdk/src/__tests__/env.test.d.ts +1 -0
  222. package/dist/sdk/src/__tests__/error-utils.test.d.ts +1 -0
  223. package/dist/sdk/src/__tests__/initial-session-state.test.d.ts +1 -0
  224. package/dist/sdk/src/__tests__/knowledge-file-selection.test.d.ts +1 -0
  225. package/dist/sdk/src/__tests__/load-agents.test.d.ts +1 -0
  226. package/dist/sdk/src/__tests__/load-mcp-config.test.d.ts +1 -0
  227. package/dist/sdk/src/__tests__/model-provider.test.d.ts +1 -0
  228. package/dist/sdk/src/__tests__/read-files.test.d.ts +1 -0
  229. package/dist/sdk/src/__tests__/run-cancellation.test.d.ts +1 -0
  230. package/dist/sdk/src/__tests__/run-file-filter.test.d.ts +1 -0
  231. package/dist/sdk/src/__tests__/run-handle-event.test.d.ts +1 -0
  232. package/dist/sdk/src/__tests__/run.integration.test.d.ts +1 -0
  233. package/dist/sdk/src/__tests__/user-knowledge-files.test.d.ts +1 -0
  234. package/dist/sdk/src/__tests__/validate-agents.test.d.ts +1 -0
  235. package/dist/sdk/src/agents/load-agents.d.ts +106 -0
  236. package/dist/sdk/src/agents/load-mcp-config.d.ts +69 -0
  237. package/dist/sdk/src/client.d.ts +33 -0
  238. package/dist/sdk/src/constants.d.ts +4 -0
  239. package/dist/sdk/src/credentials.d.ts +58 -0
  240. package/dist/sdk/src/custom-tool.d.ts +32 -0
  241. package/dist/sdk/src/env.d.ts +31 -0
  242. package/dist/sdk/src/error-utils.d.ts +55 -0
  243. package/dist/sdk/src/impl/__tests__/prompt-result.test.d.ts +1 -0
  244. package/dist/sdk/src/impl/agent-runtime.d.ts +8 -0
  245. package/dist/sdk/src/impl/database.d.ts +7 -0
  246. package/dist/sdk/src/impl/llm.d.ts +8 -0
  247. package/dist/sdk/src/impl/model-provider.d.ts +61 -0
  248. package/dist/sdk/src/index.d.ts +41 -0
  249. package/dist/sdk/src/native/ripgrep.d.ts +7 -0
  250. package/dist/sdk/src/retry-config.d.ts +46 -0
  251. package/dist/sdk/src/run-state.d.ts +81 -0
  252. package/dist/sdk/src/run.d.ts +79 -0
  253. package/dist/sdk/src/skills/load-skills.d.ts +42 -0
  254. package/dist/sdk/src/testing/env.d.ts +5 -0
  255. package/dist/sdk/src/tools/change-file.d.ts +7 -0
  256. package/dist/sdk/src/tools/code-search.d.ts +13 -0
  257. package/dist/sdk/src/tools/glob.d.ts +8 -0
  258. package/dist/sdk/src/tools/index.d.ts +16 -0
  259. package/dist/sdk/src/tools/list-directory.d.ts +7 -0
  260. package/dist/sdk/src/tools/read-files.d.ts +16 -0
  261. package/dist/sdk/src/tools/run-file-change-hooks.d.ts +4 -0
  262. package/dist/sdk/src/tools/run-terminal-command.d.ts +8 -0
  263. package/dist/sdk/src/types/env.d.ts +30 -0
  264. package/dist/sdk/src/validate-agents.d.ts +45 -0
  265. package/package.json +1 -1
  266. package/dist/index.d.ts +0 -3443
@@ -0,0 +1,1140 @@
1
+ import z from 'zod/v4';
2
+ import type { PublishedToolName, ToolName } from './constants';
3
+ import type { ToolMessage } from '../types/messages/levelcode-message';
4
+ import type { ToolCallPart } from '../types/messages/content-part';
5
+ export declare const toolParams: {
6
+ add_message: {
7
+ toolName: "add_message";
8
+ endsAgentStep: true;
9
+ description: string;
10
+ inputSchema: z.ZodObject<{
11
+ role: z.ZodEnum<{
12
+ user: "user";
13
+ assistant: "assistant";
14
+ }>;
15
+ content: z.ZodString;
16
+ }, z.core.$strip>;
17
+ outputSchema: z.ZodTuple<[z.ZodObject<{
18
+ type: z.ZodLiteral<"json">;
19
+ value: z.ZodObject<{
20
+ message: z.ZodString;
21
+ }, z.core.$strip>;
22
+ }, z.core.$strip>], null>;
23
+ };
24
+ add_subgoal: {
25
+ toolName: "add_subgoal";
26
+ endsAgentStep: false;
27
+ description: string;
28
+ inputSchema: z.ZodObject<{
29
+ id: z.ZodString;
30
+ objective: z.ZodString;
31
+ status: z.ZodEnum<{
32
+ NOT_STARTED: "NOT_STARTED";
33
+ IN_PROGRESS: "IN_PROGRESS";
34
+ COMPLETE: "COMPLETE";
35
+ ABORTED: "ABORTED";
36
+ }>;
37
+ plan: z.ZodOptional<z.ZodString>;
38
+ log: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>;
40
+ outputSchema: z.ZodTuple<[z.ZodObject<{
41
+ type: z.ZodLiteral<"json">;
42
+ value: z.ZodType<{
43
+ message: string;
44
+ }, unknown, z.core.$ZodTypeInternals<{
45
+ message: string;
46
+ }, unknown>>;
47
+ }, z.core.$strip>], null>;
48
+ };
49
+ ask_user: {
50
+ toolName: "ask_user";
51
+ endsAgentStep: true;
52
+ description: string;
53
+ inputSchema: z.ZodObject<{
54
+ questions: z.ZodArray<z.ZodObject<{
55
+ question: z.ZodString;
56
+ header: z.ZodOptional<z.ZodString>;
57
+ options: z.ZodArray<z.ZodObject<{
58
+ label: z.ZodString;
59
+ description: z.ZodOptional<z.ZodString>;
60
+ }, z.core.$strip>>;
61
+ multiSelect: z.ZodDefault<z.ZodBoolean>;
62
+ validation: z.ZodOptional<z.ZodObject<{
63
+ maxLength: z.ZodOptional<z.ZodNumber>;
64
+ minLength: z.ZodOptional<z.ZodNumber>;
65
+ pattern: z.ZodOptional<z.ZodString>;
66
+ patternError: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strip>>;
68
+ }, z.core.$strip>>;
69
+ }, z.core.$strip>;
70
+ outputSchema: z.ZodTuple<[z.ZodObject<{
71
+ type: z.ZodLiteral<"json">;
72
+ value: z.ZodType<{
73
+ answers?: {
74
+ questionIndex: number;
75
+ selectedOption?: string | undefined;
76
+ selectedOptions?: string[] | undefined;
77
+ otherText?: string | undefined;
78
+ }[] | undefined;
79
+ skipped?: boolean | undefined;
80
+ }, unknown, z.core.$ZodTypeInternals<{
81
+ answers?: {
82
+ questionIndex: number;
83
+ selectedOption?: string | undefined;
84
+ selectedOptions?: string[] | undefined;
85
+ otherText?: string | undefined;
86
+ }[] | undefined;
87
+ skipped?: boolean | undefined;
88
+ }, unknown>>;
89
+ }, z.core.$strip>], null>;
90
+ };
91
+ browser_logs: {
92
+ toolName: "browser_logs";
93
+ endsAgentStep: true;
94
+ description: string;
95
+ inputSchema: z.ZodObject<{
96
+ type: z.ZodString;
97
+ url: z.ZodString;
98
+ waitUntil: z.ZodOptional<z.ZodEnum<{
99
+ networkidle0: "networkidle0";
100
+ load: "load";
101
+ domcontentloaded: "domcontentloaded";
102
+ }>>;
103
+ }, z.core.$strip>;
104
+ outputSchema: z.ZodTuple<[z.ZodObject<{
105
+ type: z.ZodLiteral<"json">;
106
+ value: z.ZodType<{
107
+ success: boolean;
108
+ logs: {
109
+ type: "error" | "debug" | "info" | "warning" | "verbose";
110
+ message: string;
111
+ timestamp: number;
112
+ source: "tool" | "browser";
113
+ location?: string | undefined;
114
+ stack?: string | undefined;
115
+ category?: string | undefined;
116
+ level?: number | undefined;
117
+ }[];
118
+ error?: string | undefined;
119
+ logFilter?: {
120
+ types?: ("error" | "debug" | "info" | "warning" | "verbose")[] | undefined;
121
+ minLevel?: number | undefined;
122
+ categories?: string[] | undefined;
123
+ } | undefined;
124
+ networkEvents?: {
125
+ url: string;
126
+ method: string;
127
+ timestamp: number;
128
+ status?: number | undefined;
129
+ errorText?: string | undefined;
130
+ }[] | undefined;
131
+ metrics?: {
132
+ loadTime: number;
133
+ memoryUsage: number;
134
+ jsErrors: number;
135
+ networkErrors: number;
136
+ ttfb?: number | undefined;
137
+ lcp?: number | undefined;
138
+ fcp?: number | undefined;
139
+ domContentLoaded?: number | undefined;
140
+ sessionDuration?: number | undefined;
141
+ } | undefined;
142
+ screenshots?: {
143
+ post: {
144
+ type: "image";
145
+ source: {
146
+ type: "base64";
147
+ media_type: "image/jpeg";
148
+ data: string;
149
+ };
150
+ };
151
+ pre?: {
152
+ type: "image";
153
+ source: {
154
+ type: "base64";
155
+ media_type: "image/jpeg";
156
+ data: string;
157
+ };
158
+ } | undefined;
159
+ } | undefined;
160
+ }, unknown, z.core.$ZodTypeInternals<{
161
+ success: boolean;
162
+ logs: {
163
+ type: "error" | "debug" | "info" | "warning" | "verbose";
164
+ message: string;
165
+ timestamp: number;
166
+ source: "tool" | "browser";
167
+ location?: string | undefined;
168
+ stack?: string | undefined;
169
+ category?: string | undefined;
170
+ level?: number | undefined;
171
+ }[];
172
+ error?: string | undefined;
173
+ logFilter?: {
174
+ types?: ("error" | "debug" | "info" | "warning" | "verbose")[] | undefined;
175
+ minLevel?: number | undefined;
176
+ categories?: string[] | undefined;
177
+ } | undefined;
178
+ networkEvents?: {
179
+ url: string;
180
+ method: string;
181
+ timestamp: number;
182
+ status?: number | undefined;
183
+ errorText?: string | undefined;
184
+ }[] | undefined;
185
+ metrics?: {
186
+ loadTime: number;
187
+ memoryUsage: number;
188
+ jsErrors: number;
189
+ networkErrors: number;
190
+ ttfb?: number | undefined;
191
+ lcp?: number | undefined;
192
+ fcp?: number | undefined;
193
+ domContentLoaded?: number | undefined;
194
+ sessionDuration?: number | undefined;
195
+ } | undefined;
196
+ screenshots?: {
197
+ post: {
198
+ type: "image";
199
+ source: {
200
+ type: "base64";
201
+ media_type: "image/jpeg";
202
+ data: string;
203
+ };
204
+ };
205
+ pre?: {
206
+ type: "image";
207
+ source: {
208
+ type: "base64";
209
+ media_type: "image/jpeg";
210
+ data: string;
211
+ };
212
+ } | undefined;
213
+ } | undefined;
214
+ }, unknown>>;
215
+ }, z.core.$strip>], null>;
216
+ };
217
+ code_search: {
218
+ toolName: "code_search";
219
+ endsAgentStep: true;
220
+ description: string;
221
+ inputSchema: z.ZodObject<{
222
+ pattern: z.ZodString;
223
+ flags: z.ZodOptional<z.ZodString>;
224
+ cwd: z.ZodOptional<z.ZodString>;
225
+ maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
226
+ }, z.core.$strip>;
227
+ outputSchema: z.ZodTuple<[z.ZodObject<{
228
+ type: z.ZodLiteral<"json">;
229
+ value: z.ZodType<{
230
+ stdout: string;
231
+ message: string;
232
+ stderr?: string | undefined;
233
+ exitCode?: number | undefined;
234
+ } | {
235
+ errorMessage: string;
236
+ }, unknown, z.core.$ZodTypeInternals<{
237
+ stdout: string;
238
+ message: string;
239
+ stderr?: string | undefined;
240
+ exitCode?: number | undefined;
241
+ } | {
242
+ errorMessage: string;
243
+ }, unknown>>;
244
+ }, z.core.$strip>], null>;
245
+ };
246
+ create_plan: {
247
+ toolName: "create_plan";
248
+ endsAgentStep: false;
249
+ description: string;
250
+ inputSchema: z.ZodObject<{
251
+ path: z.ZodString;
252
+ plan: z.ZodString;
253
+ }, z.core.$strip>;
254
+ outputSchema: z.ZodTuple<[z.ZodObject<{
255
+ type: z.ZodLiteral<"json">;
256
+ value: z.ZodType<{
257
+ file: string;
258
+ message: string;
259
+ unifiedDiff: string;
260
+ } | {
261
+ file: string;
262
+ errorMessage: string;
263
+ patch?: string | undefined;
264
+ }, unknown, z.core.$ZodTypeInternals<{
265
+ file: string;
266
+ message: string;
267
+ unifiedDiff: string;
268
+ } | {
269
+ file: string;
270
+ errorMessage: string;
271
+ patch?: string | undefined;
272
+ }, unknown>>;
273
+ }, z.core.$strip>], null>;
274
+ };
275
+ end_turn: {
276
+ toolName: "end_turn";
277
+ endsAgentStep: true;
278
+ description: string;
279
+ inputSchema: z.ZodObject<{}, z.core.$strip>;
280
+ outputSchema: z.ZodTuple<[z.ZodObject<{
281
+ type: z.ZodLiteral<"json">;
282
+ value: z.ZodObject<{
283
+ message: z.ZodString;
284
+ }, z.core.$strip>;
285
+ }, z.core.$strip>], null>;
286
+ };
287
+ find_files: {
288
+ toolName: "find_files";
289
+ endsAgentStep: true;
290
+ description: string;
291
+ inputSchema: z.ZodObject<{
292
+ prompt: z.ZodString;
293
+ }, z.core.$strip>;
294
+ outputSchema: z.ZodTuple<[z.ZodObject<{
295
+ type: z.ZodLiteral<"json">;
296
+ value: z.ZodType<({
297
+ path: string;
298
+ content: string;
299
+ referencedBy?: Record<string, string[]> | undefined;
300
+ } | {
301
+ path: string;
302
+ contentOmittedForLength: true;
303
+ })[] | {
304
+ message: string;
305
+ }, unknown, z.core.$ZodTypeInternals<({
306
+ path: string;
307
+ content: string;
308
+ referencedBy?: Record<string, string[]> | undefined;
309
+ } | {
310
+ path: string;
311
+ contentOmittedForLength: true;
312
+ })[] | {
313
+ message: string;
314
+ }, unknown>>;
315
+ }, z.core.$strip>], null>;
316
+ };
317
+ glob: {
318
+ toolName: "glob";
319
+ description: string;
320
+ endsAgentStep: false;
321
+ inputSchema: z.ZodObject<{
322
+ pattern: z.ZodString;
323
+ cwd: z.ZodOptional<z.ZodString>;
324
+ }, z.core.$strip>;
325
+ outputSchema: z.ZodTuple<[z.ZodObject<{
326
+ type: z.ZodLiteral<"json">;
327
+ value: z.ZodType<{
328
+ files: string[];
329
+ count: number;
330
+ message: string;
331
+ } | {
332
+ errorMessage: string;
333
+ }, unknown, z.core.$ZodTypeInternals<{
334
+ files: string[];
335
+ count: number;
336
+ message: string;
337
+ } | {
338
+ errorMessage: string;
339
+ }, unknown>>;
340
+ }, z.core.$strip>], null>;
341
+ };
342
+ list_directory: {
343
+ toolName: "list_directory";
344
+ endsAgentStep: true;
345
+ description: string;
346
+ inputSchema: z.ZodObject<{
347
+ path: z.ZodString;
348
+ }, z.core.$strip>;
349
+ outputSchema: z.ZodTuple<[z.ZodObject<{
350
+ type: z.ZodLiteral<"json">;
351
+ value: z.ZodType<{
352
+ files: string[];
353
+ directories: string[];
354
+ path: string;
355
+ } | {
356
+ errorMessage: string;
357
+ }, unknown, z.core.$ZodTypeInternals<{
358
+ files: string[];
359
+ directories: string[];
360
+ path: string;
361
+ } | {
362
+ errorMessage: string;
363
+ }, unknown>>;
364
+ }, z.core.$strip>], null>;
365
+ };
366
+ lookup_agent_info: {
367
+ toolName: "lookup_agent_info";
368
+ endsAgentStep: false;
369
+ description: string;
370
+ inputSchema: z.ZodObject<{
371
+ agentId: z.ZodString;
372
+ }, z.core.$strip>;
373
+ outputSchema: z.ZodTuple<[z.ZodObject<{
374
+ type: z.ZodLiteral<"json">;
375
+ value: z.ZodType<import("src").JSONValue, unknown, z.core.$ZodTypeInternals<import("src").JSONValue, unknown>>;
376
+ }, z.core.$strip>], null>;
377
+ };
378
+ propose_str_replace: {
379
+ toolName: "propose_str_replace";
380
+ endsAgentStep: false;
381
+ description: string;
382
+ inputSchema: z.ZodObject<{
383
+ path: z.ZodString;
384
+ replacements: z.ZodArray<z.ZodObject<{
385
+ old: z.ZodString;
386
+ new: z.ZodString;
387
+ allowMultiple: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
388
+ }, z.core.$strip>>;
389
+ }, z.core.$strip>;
390
+ outputSchema: z.ZodTuple<[z.ZodObject<{
391
+ type: z.ZodLiteral<"json">;
392
+ value: z.ZodType<{
393
+ file: string;
394
+ message: string;
395
+ unifiedDiff: string;
396
+ } | {
397
+ file: string;
398
+ errorMessage: string;
399
+ }, unknown, z.core.$ZodTypeInternals<{
400
+ file: string;
401
+ message: string;
402
+ unifiedDiff: string;
403
+ } | {
404
+ file: string;
405
+ errorMessage: string;
406
+ }, unknown>>;
407
+ }, z.core.$strip>], null>;
408
+ };
409
+ propose_write_file: {
410
+ toolName: "propose_write_file";
411
+ endsAgentStep: false;
412
+ description: string;
413
+ inputSchema: z.ZodObject<{
414
+ path: z.ZodString;
415
+ instructions: z.ZodString;
416
+ content: z.ZodString;
417
+ }, z.core.$strip>;
418
+ outputSchema: z.ZodTuple<[z.ZodObject<{
419
+ type: z.ZodLiteral<"json">;
420
+ value: z.ZodType<{
421
+ file: string;
422
+ message: string;
423
+ unifiedDiff: string;
424
+ } | {
425
+ file: string;
426
+ errorMessage: string;
427
+ }, unknown, z.core.$ZodTypeInternals<{
428
+ file: string;
429
+ message: string;
430
+ unifiedDiff: string;
431
+ } | {
432
+ file: string;
433
+ errorMessage: string;
434
+ }, unknown>>;
435
+ }, z.core.$strip>], null>;
436
+ };
437
+ read_docs: {
438
+ toolName: "read_docs";
439
+ endsAgentStep: true;
440
+ description: string;
441
+ inputSchema: z.ZodObject<{
442
+ libraryTitle: z.ZodString;
443
+ topic: z.ZodString;
444
+ max_tokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
445
+ }, z.core.$strip>;
446
+ outputSchema: z.ZodTuple<[z.ZodObject<{
447
+ type: z.ZodLiteral<"json">;
448
+ value: z.ZodType<{
449
+ documentation: string;
450
+ }, unknown, z.core.$ZodTypeInternals<{
451
+ documentation: string;
452
+ }, unknown>>;
453
+ }, z.core.$strip>], null>;
454
+ };
455
+ read_files: {
456
+ toolName: "read_files";
457
+ endsAgentStep: true;
458
+ description: string;
459
+ inputSchema: z.ZodObject<{
460
+ paths: z.ZodArray<z.ZodString>;
461
+ }, z.core.$strip>;
462
+ outputSchema: z.ZodTuple<[z.ZodObject<{
463
+ type: z.ZodLiteral<"json">;
464
+ value: z.ZodType<({
465
+ path: string;
466
+ content: string;
467
+ referencedBy?: Record<string, string[]> | undefined;
468
+ } | {
469
+ path: string;
470
+ contentOmittedForLength: true;
471
+ })[], unknown, z.core.$ZodTypeInternals<({
472
+ path: string;
473
+ content: string;
474
+ referencedBy?: Record<string, string[]> | undefined;
475
+ } | {
476
+ path: string;
477
+ contentOmittedForLength: true;
478
+ })[], unknown>>;
479
+ }, z.core.$strip>], null>;
480
+ };
481
+ read_subtree: {
482
+ toolName: "read_subtree";
483
+ endsAgentStep: true;
484
+ description: string;
485
+ inputSchema: z.ZodObject<{
486
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
487
+ maxTokens: z.ZodDefault<z.ZodNumber>;
488
+ }, z.core.$strip>;
489
+ outputSchema: z.ZodTuple<[z.ZodObject<{
490
+ type: z.ZodLiteral<"json">;
491
+ value: z.ZodType<({
492
+ path: string;
493
+ type: "directory";
494
+ printedTree: string;
495
+ tokenCount: number;
496
+ truncationLevel: "none" | "tokens" | "unimportant-files" | "depth-based";
497
+ } | {
498
+ path: string;
499
+ type: "file";
500
+ variables: string[];
501
+ } | {
502
+ path: string;
503
+ errorMessage: string;
504
+ })[], unknown, z.core.$ZodTypeInternals<({
505
+ path: string;
506
+ type: "directory";
507
+ printedTree: string;
508
+ tokenCount: number;
509
+ truncationLevel: "none" | "tokens" | "unimportant-files" | "depth-based";
510
+ } | {
511
+ path: string;
512
+ type: "file";
513
+ variables: string[];
514
+ } | {
515
+ path: string;
516
+ errorMessage: string;
517
+ })[], unknown>>;
518
+ }, z.core.$strip>], null>;
519
+ };
520
+ run_file_change_hooks: {
521
+ toolName: "run_file_change_hooks";
522
+ endsAgentStep: true;
523
+ description: string;
524
+ inputSchema: z.ZodObject<{
525
+ files: z.ZodArray<z.ZodString>;
526
+ }, z.core.$strip>;
527
+ outputSchema: z.ZodTuple<[z.ZodObject<{
528
+ type: z.ZodLiteral<"json">;
529
+ value: z.ZodType<((({
530
+ command: string;
531
+ startingCwd?: string | undefined;
532
+ message?: string | undefined;
533
+ stderr?: string | undefined;
534
+ stdout?: string | undefined;
535
+ exitCode?: number | undefined;
536
+ } | {
537
+ command: string;
538
+ stdoutOmittedForLength: true;
539
+ startingCwd?: string | undefined;
540
+ message?: string | undefined;
541
+ stderr?: string | undefined;
542
+ exitCode?: number | undefined;
543
+ } | {
544
+ command: string;
545
+ processId: number;
546
+ backgroundProcessStatus: "error" | "running" | "completed";
547
+ } | {
548
+ command: string;
549
+ errorMessage: string;
550
+ }) & {
551
+ hookName: string;
552
+ }) | {
553
+ errorMessage: string;
554
+ })[], unknown, z.core.$ZodTypeInternals<((({
555
+ command: string;
556
+ startingCwd?: string | undefined;
557
+ message?: string | undefined;
558
+ stderr?: string | undefined;
559
+ stdout?: string | undefined;
560
+ exitCode?: number | undefined;
561
+ } | {
562
+ command: string;
563
+ stdoutOmittedForLength: true;
564
+ startingCwd?: string | undefined;
565
+ message?: string | undefined;
566
+ stderr?: string | undefined;
567
+ exitCode?: number | undefined;
568
+ } | {
569
+ command: string;
570
+ processId: number;
571
+ backgroundProcessStatus: "error" | "running" | "completed";
572
+ } | {
573
+ command: string;
574
+ errorMessage: string;
575
+ }) & {
576
+ hookName: string;
577
+ }) | {
578
+ errorMessage: string;
579
+ })[], unknown>>;
580
+ }, z.core.$strip>], null>;
581
+ };
582
+ run_terminal_command: {
583
+ toolName: "run_terminal_command";
584
+ endsAgentStep: true;
585
+ description: string;
586
+ inputSchema: z.ZodObject<{
587
+ command: z.ZodString;
588
+ process_type: z.ZodDefault<z.ZodEnum<{
589
+ SYNC: "SYNC";
590
+ BACKGROUND: "BACKGROUND";
591
+ }>>;
592
+ cwd: z.ZodOptional<z.ZodString>;
593
+ timeout_seconds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
594
+ }, z.core.$strip>;
595
+ outputSchema: z.ZodTuple<[z.ZodObject<{
596
+ type: z.ZodLiteral<"json">;
597
+ value: z.ZodType<{
598
+ command: string;
599
+ startingCwd?: string | undefined;
600
+ message?: string | undefined;
601
+ stderr?: string | undefined;
602
+ stdout?: string | undefined;
603
+ exitCode?: number | undefined;
604
+ } | {
605
+ command: string;
606
+ stdoutOmittedForLength: true;
607
+ startingCwd?: string | undefined;
608
+ message?: string | undefined;
609
+ stderr?: string | undefined;
610
+ exitCode?: number | undefined;
611
+ } | {
612
+ command: string;
613
+ processId: number;
614
+ backgroundProcessStatus: "error" | "running" | "completed";
615
+ } | {
616
+ command: string;
617
+ errorMessage: string;
618
+ }, unknown, z.core.$ZodTypeInternals<{
619
+ command: string;
620
+ startingCwd?: string | undefined;
621
+ message?: string | undefined;
622
+ stderr?: string | undefined;
623
+ stdout?: string | undefined;
624
+ exitCode?: number | undefined;
625
+ } | {
626
+ command: string;
627
+ stdoutOmittedForLength: true;
628
+ startingCwd?: string | undefined;
629
+ message?: string | undefined;
630
+ stderr?: string | undefined;
631
+ exitCode?: number | undefined;
632
+ } | {
633
+ command: string;
634
+ processId: number;
635
+ backgroundProcessStatus: "error" | "running" | "completed";
636
+ } | {
637
+ command: string;
638
+ errorMessage: string;
639
+ }, unknown>>;
640
+ }, z.core.$strip>], null>;
641
+ };
642
+ send_message: {
643
+ toolName: "send_message";
644
+ endsAgentStep: false;
645
+ description: string;
646
+ inputSchema: z.ZodObject<{
647
+ type: z.ZodEnum<{
648
+ message: "message";
649
+ broadcast: "broadcast";
650
+ shutdown_request: "shutdown_request";
651
+ shutdown_response: "shutdown_response";
652
+ plan_approval_response: "plan_approval_response";
653
+ }>;
654
+ recipient: z.ZodOptional<z.ZodString>;
655
+ content: z.ZodOptional<z.ZodString>;
656
+ summary: z.ZodOptional<z.ZodString>;
657
+ request_id: z.ZodOptional<z.ZodString>;
658
+ approve: z.ZodOptional<z.ZodBoolean>;
659
+ }, z.core.$strip>;
660
+ outputSchema: z.ZodTuple<[z.ZodObject<{
661
+ type: z.ZodLiteral<"json">;
662
+ value: z.ZodObject<{
663
+ message: z.ZodString;
664
+ }, z.core.$strip>;
665
+ }, z.core.$strip>], null>;
666
+ };
667
+ set_messages: {
668
+ toolName: "set_messages";
669
+ endsAgentStep: true;
670
+ description: string;
671
+ inputSchema: z.ZodObject<{
672
+ messages: z.ZodAny;
673
+ }, z.core.$strip>;
674
+ outputSchema: z.ZodTuple<[z.ZodObject<{
675
+ type: z.ZodLiteral<"json">;
676
+ value: z.ZodObject<{
677
+ message: z.ZodString;
678
+ }, z.core.$strip>;
679
+ }, z.core.$strip>], null>;
680
+ };
681
+ set_output: {
682
+ toolName: "set_output";
683
+ endsAgentStep: false;
684
+ description: string;
685
+ inputSchema: z.ZodObject<{
686
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
687
+ }, z.core.$loose>;
688
+ outputSchema: z.ZodTuple<[z.ZodObject<{
689
+ type: z.ZodLiteral<"json">;
690
+ value: z.ZodObject<{
691
+ message: z.ZodString;
692
+ }, z.core.$strip>;
693
+ }, z.core.$strip>], null>;
694
+ };
695
+ skill: {
696
+ toolName: "skill";
697
+ endsAgentStep: true;
698
+ description: string;
699
+ inputSchema: z.ZodObject<{
700
+ name: z.ZodString;
701
+ }, z.core.$strip>;
702
+ outputSchema: z.ZodTuple<[z.ZodObject<{
703
+ type: z.ZodLiteral<"json">;
704
+ value: z.ZodType<{
705
+ name: string;
706
+ description: string;
707
+ content: string;
708
+ license?: string | undefined;
709
+ }, unknown, z.core.$ZodTypeInternals<{
710
+ name: string;
711
+ description: string;
712
+ content: string;
713
+ license?: string | undefined;
714
+ }, unknown>>;
715
+ }, z.core.$strip>], null>;
716
+ };
717
+ spawn_agents: {
718
+ toolName: "spawn_agents";
719
+ endsAgentStep: true;
720
+ description: string;
721
+ inputSchema: z.ZodObject<{
722
+ agents: z.ZodArray<z.ZodObject<{
723
+ agent_type: z.ZodString;
724
+ prompt: z.ZodOptional<z.ZodString>;
725
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
726
+ team_name: z.ZodOptional<z.ZodString>;
727
+ team_role: z.ZodOptional<z.ZodString>;
728
+ }, z.core.$strip>>;
729
+ }, z.core.$strip>;
730
+ outputSchema: z.ZodTuple<[z.ZodObject<{
731
+ type: z.ZodLiteral<"json">;
732
+ value: z.ZodType<({
733
+ agentType: string;
734
+ } & import("src").JSONObject)[], unknown, z.core.$ZodTypeInternals<({
735
+ agentType: string;
736
+ } & import("src").JSONObject)[], unknown>>;
737
+ }, z.core.$strip>], null>;
738
+ };
739
+ spawn_agent_inline: {
740
+ toolName: "spawn_agent_inline";
741
+ endsAgentStep: true;
742
+ description: string;
743
+ inputSchema: z.ZodObject<{
744
+ agent_type: z.ZodString;
745
+ prompt: z.ZodOptional<z.ZodString>;
746
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
747
+ }, z.core.$strip>;
748
+ outputSchema: z.ZodTuple<[z.ZodObject<{
749
+ type: z.ZodLiteral<"json">;
750
+ value: z.ZodObject<{
751
+ message: z.ZodString;
752
+ }, z.core.$strip>;
753
+ }, z.core.$strip>], null>;
754
+ };
755
+ str_replace: {
756
+ toolName: "str_replace";
757
+ endsAgentStep: false;
758
+ description: string;
759
+ inputSchema: z.ZodObject<{
760
+ path: z.ZodString;
761
+ replacements: z.ZodArray<z.ZodObject<{
762
+ old: z.ZodString;
763
+ new: z.ZodString;
764
+ allowMultiple: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
765
+ }, z.core.$strip>>;
766
+ }, z.core.$strip>;
767
+ outputSchema: z.ZodTuple<[z.ZodObject<{
768
+ type: z.ZodLiteral<"json">;
769
+ value: z.ZodType<{
770
+ file: string;
771
+ message: string;
772
+ unifiedDiff: string;
773
+ } | {
774
+ file: string;
775
+ errorMessage: string;
776
+ patch?: string | undefined;
777
+ }, unknown, z.core.$ZodTypeInternals<{
778
+ file: string;
779
+ message: string;
780
+ unifiedDiff: string;
781
+ } | {
782
+ file: string;
783
+ errorMessage: string;
784
+ patch?: string | undefined;
785
+ }, unknown>>;
786
+ }, z.core.$strip>], null>;
787
+ };
788
+ suggest_followups: {
789
+ toolName: "suggest_followups";
790
+ endsAgentStep: false;
791
+ description: string;
792
+ inputSchema: z.ZodObject<{
793
+ followups: z.ZodArray<z.ZodObject<{
794
+ prompt: z.ZodString;
795
+ label: z.ZodOptional<z.ZodString>;
796
+ }, z.core.$strip>>;
797
+ }, z.core.$strip>;
798
+ outputSchema: z.ZodTuple<[z.ZodObject<{
799
+ type: z.ZodLiteral<"json">;
800
+ value: z.ZodType<{
801
+ message: string;
802
+ }, unknown, z.core.$ZodTypeInternals<{
803
+ message: string;
804
+ }, unknown>>;
805
+ }, z.core.$strip>], null>;
806
+ };
807
+ task_completed: {
808
+ toolName: "task_completed";
809
+ endsAgentStep: true;
810
+ description: string;
811
+ inputSchema: z.ZodObject<{}, z.core.$strip>;
812
+ outputSchema: z.ZodTuple<[z.ZodObject<{
813
+ type: z.ZodLiteral<"json">;
814
+ value: z.ZodObject<{
815
+ message: z.ZodString;
816
+ }, z.core.$strip>;
817
+ }, z.core.$strip>], null>;
818
+ };
819
+ task_create: {
820
+ toolName: "task_create";
821
+ endsAgentStep: false;
822
+ description: string;
823
+ inputSchema: z.ZodObject<{
824
+ subject: z.ZodString;
825
+ description: z.ZodString;
826
+ activeForm: z.ZodOptional<z.ZodString>;
827
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
828
+ }, z.core.$strip>;
829
+ outputSchema: z.ZodTuple<[z.ZodObject<{
830
+ type: z.ZodLiteral<"json">;
831
+ value: z.ZodObject<{
832
+ message: z.ZodString;
833
+ }, z.core.$strip>;
834
+ }, z.core.$strip>], null>;
835
+ };
836
+ task_get: {
837
+ toolName: "task_get";
838
+ endsAgentStep: false;
839
+ description: string;
840
+ inputSchema: z.ZodObject<{
841
+ taskId: z.ZodString;
842
+ }, z.core.$strip>;
843
+ outputSchema: z.ZodTuple<[z.ZodObject<{
844
+ type: z.ZodLiteral<"json">;
845
+ value: z.ZodObject<{
846
+ message: z.ZodString;
847
+ }, z.core.$strip>;
848
+ }, z.core.$strip>], null>;
849
+ };
850
+ task_list: {
851
+ toolName: "task_list";
852
+ endsAgentStep: false;
853
+ description: string;
854
+ inputSchema: z.ZodObject<{}, z.core.$strip>;
855
+ outputSchema: z.ZodTuple<[z.ZodObject<{
856
+ type: z.ZodLiteral<"json">;
857
+ value: z.ZodObject<{
858
+ message: z.ZodString;
859
+ }, z.core.$strip>;
860
+ }, z.core.$strip>], null>;
861
+ };
862
+ task_update: {
863
+ toolName: "task_update";
864
+ endsAgentStep: false;
865
+ description: string;
866
+ inputSchema: z.ZodObject<{
867
+ taskId: z.ZodString;
868
+ status: z.ZodOptional<z.ZodString>;
869
+ subject: z.ZodOptional<z.ZodString>;
870
+ description: z.ZodOptional<z.ZodString>;
871
+ activeForm: z.ZodOptional<z.ZodString>;
872
+ owner: z.ZodOptional<z.ZodString>;
873
+ addBlocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
874
+ addBlockedBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
875
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
876
+ }, z.core.$strip>;
877
+ outputSchema: z.ZodTuple<[z.ZodObject<{
878
+ type: z.ZodLiteral<"json">;
879
+ value: z.ZodObject<{
880
+ message: z.ZodString;
881
+ }, z.core.$strip>;
882
+ }, z.core.$strip>], null>;
883
+ };
884
+ team_create: {
885
+ toolName: "team_create";
886
+ endsAgentStep: false;
887
+ description: string;
888
+ inputSchema: z.ZodObject<{
889
+ team_name: z.ZodString;
890
+ description: z.ZodOptional<z.ZodString>;
891
+ agent_type: z.ZodOptional<z.ZodString>;
892
+ }, z.core.$strip>;
893
+ outputSchema: z.ZodTuple<[z.ZodObject<{
894
+ type: z.ZodLiteral<"json">;
895
+ value: z.ZodObject<{
896
+ message: z.ZodString;
897
+ }, z.core.$strip>;
898
+ }, z.core.$strip>], null>;
899
+ };
900
+ team_delete: {
901
+ toolName: "team_delete";
902
+ endsAgentStep: false;
903
+ description: string;
904
+ inputSchema: z.ZodObject<{}, z.core.$strip>;
905
+ outputSchema: z.ZodTuple<[z.ZodObject<{
906
+ type: z.ZodLiteral<"json">;
907
+ value: z.ZodObject<{
908
+ message: z.ZodString;
909
+ }, z.core.$strip>;
910
+ }, z.core.$strip>], null>;
911
+ };
912
+ think_deeply: {
913
+ toolName: "think_deeply";
914
+ endsAgentStep: false;
915
+ description: string;
916
+ inputSchema: z.ZodObject<{
917
+ thought: z.ZodString;
918
+ }, z.core.$strip>;
919
+ outputSchema: z.ZodTuple<[z.ZodObject<{
920
+ type: z.ZodLiteral<"json">;
921
+ value: z.ZodObject<{
922
+ message: z.ZodString;
923
+ }, z.core.$strip>;
924
+ }, z.core.$strip>], null>;
925
+ };
926
+ update_subgoal: {
927
+ toolName: "update_subgoal";
928
+ endsAgentStep: false;
929
+ description: string;
930
+ inputSchema: z.ZodObject<{
931
+ id: z.ZodString;
932
+ status: z.ZodOptional<z.ZodEnum<{
933
+ NOT_STARTED: "NOT_STARTED";
934
+ IN_PROGRESS: "IN_PROGRESS";
935
+ COMPLETE: "COMPLETE";
936
+ ABORTED: "ABORTED";
937
+ }>>;
938
+ plan: z.ZodOptional<z.ZodString>;
939
+ log: z.ZodOptional<z.ZodString>;
940
+ }, z.core.$strip>;
941
+ outputSchema: z.ZodTuple<[z.ZodObject<{
942
+ type: z.ZodLiteral<"json">;
943
+ value: z.ZodType<{
944
+ message: string;
945
+ }, unknown, z.core.$ZodTypeInternals<{
946
+ message: string;
947
+ }, unknown>>;
948
+ }, z.core.$strip>], null>;
949
+ };
950
+ web_search: {
951
+ toolName: "web_search";
952
+ endsAgentStep: true;
953
+ description: string;
954
+ inputSchema: z.ZodObject<{
955
+ query: z.ZodString;
956
+ depth: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
957
+ standard: "standard";
958
+ deep: "deep";
959
+ }>>>;
960
+ }, z.core.$strip>;
961
+ outputSchema: z.ZodTuple<[z.ZodObject<{
962
+ type: z.ZodLiteral<"json">;
963
+ value: z.ZodType<{
964
+ result: string;
965
+ } | {
966
+ errorMessage: string;
967
+ }, unknown, z.core.$ZodTypeInternals<{
968
+ result: string;
969
+ } | {
970
+ errorMessage: string;
971
+ }, unknown>>;
972
+ }, z.core.$strip>], null>;
973
+ };
974
+ write_file: {
975
+ toolName: "write_file";
976
+ endsAgentStep: false;
977
+ description: string;
978
+ inputSchema: z.ZodObject<{
979
+ path: z.ZodString;
980
+ instructions: z.ZodString;
981
+ content: z.ZodString;
982
+ }, z.core.$strip>;
983
+ outputSchema: z.ZodTuple<[z.ZodObject<{
984
+ type: z.ZodLiteral<"json">;
985
+ value: z.ZodType<{
986
+ file: string;
987
+ message: string;
988
+ unifiedDiff: string;
989
+ } | {
990
+ file: string;
991
+ errorMessage: string;
992
+ patch?: string | undefined;
993
+ }, unknown, z.core.$ZodTypeInternals<{
994
+ file: string;
995
+ message: string;
996
+ unifiedDiff: string;
997
+ } | {
998
+ file: string;
999
+ errorMessage: string;
1000
+ patch?: string | undefined;
1001
+ }, unknown>>;
1002
+ }, z.core.$strip>], null>;
1003
+ };
1004
+ write_todos: {
1005
+ toolName: "write_todos";
1006
+ endsAgentStep: false;
1007
+ description: string;
1008
+ inputSchema: z.ZodObject<{
1009
+ todos: z.ZodArray<z.ZodObject<{
1010
+ task: z.ZodString;
1011
+ completed: z.ZodBoolean;
1012
+ }, z.core.$strip>>;
1013
+ }, z.core.$strip>;
1014
+ outputSchema: z.ZodTuple<[z.ZodObject<{
1015
+ type: z.ZodLiteral<"json">;
1016
+ value: z.ZodObject<{
1017
+ message: z.ZodString;
1018
+ }, z.core.$strip>;
1019
+ }, z.core.$strip>], null>;
1020
+ };
1021
+ };
1022
+ export type LevelCodeToolCall<T extends ToolName = ToolName> = {
1023
+ [K in ToolName]: {
1024
+ toolName: K;
1025
+ input: z.infer<(typeof toolParams)[K]['inputSchema']>;
1026
+ } & Omit<ToolCallPart, 'type'>;
1027
+ }[T];
1028
+ export type LevelCodeToolOutput<T extends ToolName = ToolName> = {
1029
+ [K in ToolName]: K extends ToolName ? z.infer<(typeof toolParams)[K]['outputSchema']> : never;
1030
+ }[T];
1031
+ export type LevelCodeToolMessage<T extends ToolName = ToolName> = ToolMessage & {
1032
+ content: LevelCodeToolOutput<T>;
1033
+ };
1034
+ export declare const clientToolCallSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1035
+ toolName: z.ZodLiteral<"ask_user">;
1036
+ input: z.ZodObject<{
1037
+ questions: z.ZodArray<z.ZodObject<{
1038
+ question: z.ZodString;
1039
+ header: z.ZodOptional<z.ZodString>;
1040
+ options: z.ZodArray<z.ZodObject<{
1041
+ label: z.ZodString;
1042
+ description: z.ZodOptional<z.ZodString>;
1043
+ }, z.core.$strip>>;
1044
+ multiSelect: z.ZodDefault<z.ZodBoolean>;
1045
+ validation: z.ZodOptional<z.ZodObject<{
1046
+ maxLength: z.ZodOptional<z.ZodNumber>;
1047
+ minLength: z.ZodOptional<z.ZodNumber>;
1048
+ pattern: z.ZodOptional<z.ZodString>;
1049
+ patternError: z.ZodOptional<z.ZodString>;
1050
+ }, z.core.$strip>>;
1051
+ }, z.core.$strip>>;
1052
+ }, z.core.$strip>;
1053
+ }, z.core.$strip>, z.ZodObject<{
1054
+ toolName: z.ZodLiteral<"browser_logs">;
1055
+ input: z.ZodObject<{
1056
+ type: z.ZodString;
1057
+ url: z.ZodString;
1058
+ waitUntil: z.ZodOptional<z.ZodEnum<{
1059
+ networkidle0: "networkidle0";
1060
+ load: "load";
1061
+ domcontentloaded: "domcontentloaded";
1062
+ }>>;
1063
+ }, z.core.$strip>;
1064
+ }, z.core.$strip>, z.ZodObject<{
1065
+ toolName: z.ZodLiteral<"code_search">;
1066
+ input: z.ZodObject<{
1067
+ pattern: z.ZodString;
1068
+ flags: z.ZodOptional<z.ZodString>;
1069
+ cwd: z.ZodOptional<z.ZodString>;
1070
+ maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1071
+ }, z.core.$strip>;
1072
+ }, z.core.$strip>, z.ZodObject<{
1073
+ toolName: z.ZodLiteral<"create_plan">;
1074
+ input: z.ZodObject<{
1075
+ type: z.ZodEnum<{
1076
+ file: "file";
1077
+ patch: "patch";
1078
+ }>;
1079
+ path: z.ZodString;
1080
+ content: z.ZodString;
1081
+ }, z.core.$strip>;
1082
+ }, z.core.$strip>, z.ZodObject<{
1083
+ toolName: z.ZodLiteral<"glob">;
1084
+ input: z.ZodObject<{
1085
+ pattern: z.ZodString;
1086
+ cwd: z.ZodOptional<z.ZodString>;
1087
+ }, z.core.$strip>;
1088
+ }, z.core.$strip>, z.ZodObject<{
1089
+ toolName: z.ZodLiteral<"list_directory">;
1090
+ input: z.ZodObject<{
1091
+ path: z.ZodString;
1092
+ }, z.core.$strip>;
1093
+ }, z.core.$strip>, z.ZodObject<{
1094
+ toolName: z.ZodLiteral<"run_file_change_hooks">;
1095
+ input: z.ZodObject<{
1096
+ files: z.ZodArray<z.ZodString>;
1097
+ }, z.core.$strip>;
1098
+ }, z.core.$strip>, z.ZodObject<{
1099
+ toolName: z.ZodLiteral<"run_terminal_command">;
1100
+ input: z.ZodIntersection<z.ZodObject<{
1101
+ command: z.ZodString;
1102
+ process_type: z.ZodDefault<z.ZodEnum<{
1103
+ SYNC: "SYNC";
1104
+ BACKGROUND: "BACKGROUND";
1105
+ }>>;
1106
+ cwd: z.ZodOptional<z.ZodString>;
1107
+ timeout_seconds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1108
+ }, z.core.$strip>, z.ZodObject<{
1109
+ mode: z.ZodEnum<{
1110
+ user: "user";
1111
+ assistant: "assistant";
1112
+ }>;
1113
+ }, z.core.$strip>>;
1114
+ }, z.core.$strip>, z.ZodObject<{
1115
+ toolName: z.ZodLiteral<"str_replace">;
1116
+ input: z.ZodObject<{
1117
+ type: z.ZodEnum<{
1118
+ file: "file";
1119
+ patch: "patch";
1120
+ }>;
1121
+ path: z.ZodString;
1122
+ content: z.ZodString;
1123
+ }, z.core.$strip>;
1124
+ }, z.core.$strip>, z.ZodObject<{
1125
+ toolName: z.ZodLiteral<"write_file">;
1126
+ input: z.ZodObject<{
1127
+ type: z.ZodEnum<{
1128
+ file: "file";
1129
+ patch: "patch";
1130
+ }>;
1131
+ path: z.ZodString;
1132
+ content: z.ZodString;
1133
+ }, z.core.$strip>;
1134
+ }, z.core.$strip>], "toolName">;
1135
+ export declare const clientToolNames: ("glob" | "create_plan" | "ask_user" | "browser_logs" | "code_search" | "list_directory" | "run_file_change_hooks" | "run_terminal_command" | "str_replace" | "write_file")[];
1136
+ export type ClientToolName = (typeof clientToolNames)[number];
1137
+ export type ClientToolCall<T extends ClientToolName = ClientToolName> = Extract<z.infer<typeof clientToolCallSchema>, {
1138
+ toolName: T;
1139
+ }> & Pick<ToolCallPart, 'toolCallId' | 'toolName' | 'input' | 'providerOptions'>;
1140
+ export type PublishedClientToolName = ClientToolName & PublishedToolName;