@aexol/spectral 0.8.0 → 0.8.5

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 (561) hide show
  1. package/CHANGELOG.md +82 -55
  2. package/README.md +80 -82
  3. package/dist/agent/agents.d.ts +37 -0
  4. package/dist/agent/agents.d.ts.map +1 -0
  5. package/dist/agent/index.d.ts +29 -0
  6. package/dist/agent/index.d.ts.map +1 -0
  7. package/dist/cli.d.ts +17 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/commands/bind.d.ts +12 -0
  10. package/dist/commands/bind.d.ts.map +1 -0
  11. package/dist/commands/login-oauth.d.ts +15 -0
  12. package/dist/commands/login-oauth.d.ts.map +1 -0
  13. package/dist/commands/login.d.ts +37 -0
  14. package/dist/commands/login.d.ts.map +1 -0
  15. package/dist/commands/logout.d.ts +8 -0
  16. package/dist/commands/logout.d.ts.map +1 -0
  17. package/dist/commands/serve.d.ts +112 -0
  18. package/dist/commands/serve.d.ts.map +1 -0
  19. package/dist/commands/unbind.d.ts +8 -0
  20. package/dist/commands/unbind.d.ts.map +1 -0
  21. package/dist/config.d.ts +49 -0
  22. package/dist/config.d.ts.map +1 -0
  23. package/dist/designer/guidelines.d.ts +23 -0
  24. package/dist/designer/guidelines.d.ts.map +1 -0
  25. package/dist/designer/index.d.ts +26 -0
  26. package/dist/designer/index.d.ts.map +1 -0
  27. package/dist/designer/philosophies.d.ts +33 -0
  28. package/dist/designer/philosophies.d.ts.map +1 -0
  29. package/dist/designer/skills.d.ts +27 -0
  30. package/dist/designer/skills.d.ts.map +1 -0
  31. package/dist/designer/systems.d.ts +36 -0
  32. package/dist/designer/systems.d.ts.map +1 -0
  33. package/dist/extensions/aexol-mcp.d.ts +25 -0
  34. package/dist/extensions/aexol-mcp.d.ts.map +1 -0
  35. package/dist/extensions/kanban-bridge.d.ts +24 -0
  36. package/dist/extensions/kanban-bridge.d.ts.map +1 -0
  37. package/dist/extensions/kanban-bridge.js +668 -0
  38. package/dist/extensions/openrouter-attribution.d.ts +12 -0
  39. package/dist/extensions/openrouter-attribution.d.ts.map +1 -0
  40. package/dist/extensions/spectral-vision-fallback.d.ts +23 -0
  41. package/dist/extensions/spectral-vision-fallback.d.ts.map +1 -0
  42. package/dist/extensions/spectral-vision-fallback.js +32 -22
  43. package/dist/index.d.ts +46 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +44 -0
  46. package/dist/mcp/agent-dir.d.ts +3 -0
  47. package/dist/mcp/agent-dir.d.ts.map +1 -0
  48. package/dist/mcp/commands.d.ts +9 -0
  49. package/dist/mcp/commands.d.ts.map +1 -0
  50. package/dist/mcp/config.d.ts +78 -0
  51. package/dist/mcp/config.d.ts.map +1 -0
  52. package/dist/mcp/consent-manager.d.ts +14 -0
  53. package/dist/mcp/consent-manager.d.ts.map +1 -0
  54. package/dist/mcp/direct-tools.d.ts +11 -0
  55. package/dist/mcp/direct-tools.d.ts.map +1 -0
  56. package/dist/mcp/errors.d.ts +100 -0
  57. package/dist/mcp/errors.d.ts.map +1 -0
  58. package/dist/mcp/glimpse-ui.d.ts +10 -0
  59. package/dist/mcp/glimpse-ui.d.ts.map +1 -0
  60. package/dist/mcp/host-html-template.d.ts +17 -0
  61. package/dist/mcp/host-html-template.d.ts.map +1 -0
  62. package/dist/mcp/index.d.ts +3 -0
  63. package/dist/mcp/index.d.ts.map +1 -0
  64. package/dist/mcp/init.d.ts +10 -0
  65. package/dist/mcp/init.d.ts.map +1 -0
  66. package/dist/mcp/init.js +1 -9
  67. package/dist/mcp/lifecycle.d.ts +30 -0
  68. package/dist/mcp/lifecycle.d.ts.map +1 -0
  69. package/dist/mcp/logger.d.ts +52 -0
  70. package/dist/mcp/logger.d.ts.map +1 -0
  71. package/dist/mcp/mcp-auth-flow.d.ts +69 -0
  72. package/dist/mcp/mcp-auth-flow.d.ts.map +1 -0
  73. package/dist/mcp/mcp-auth.d.ts +100 -0
  74. package/dist/mcp/mcp-auth.d.ts.map +1 -0
  75. package/dist/mcp/mcp-callback-server.d.ts +40 -0
  76. package/dist/mcp/mcp-callback-server.d.ts.map +1 -0
  77. package/dist/mcp/mcp-oauth-provider.d.ts +101 -0
  78. package/dist/mcp/mcp-oauth-provider.d.ts.map +1 -0
  79. package/dist/mcp/metadata-cache.d.ts +32 -0
  80. package/dist/mcp/metadata-cache.d.ts.map +1 -0
  81. package/dist/mcp/npx-resolver.d.ts +7 -0
  82. package/dist/mcp/npx-resolver.d.ts.map +1 -0
  83. package/dist/mcp/oauth-handler.d.ts +19 -0
  84. package/dist/mcp/oauth-handler.d.ts.map +1 -0
  85. package/dist/mcp/onboarding-state.d.ts +13 -0
  86. package/dist/mcp/onboarding-state.d.ts.map +1 -0
  87. package/dist/mcp/proxy-modes.d.ts +12 -0
  88. package/dist/mcp/proxy-modes.d.ts.map +1 -0
  89. package/dist/mcp/resource-tools.d.ts +2 -0
  90. package/dist/mcp/resource-tools.d.ts.map +1 -0
  91. package/dist/mcp/sampling-handler.d.ts +16 -0
  92. package/dist/mcp/sampling-handler.d.ts.map +1 -0
  93. package/dist/mcp/server-manager.d.ts +42 -0
  94. package/dist/mcp/server-manager.d.ts.map +1 -0
  95. package/dist/mcp/state.d.ts +41 -0
  96. package/dist/mcp/state.d.ts.map +1 -0
  97. package/dist/mcp/tool-metadata.d.ts +11 -0
  98. package/dist/mcp/tool-metadata.d.ts.map +1 -0
  99. package/dist/mcp/tool-registrar.d.ts +9 -0
  100. package/dist/mcp/tool-registrar.d.ts.map +1 -0
  101. package/dist/mcp/types.d.ts +263 -0
  102. package/dist/mcp/types.d.ts.map +1 -0
  103. package/dist/mcp/ui-resource-handler.d.ts +10 -0
  104. package/dist/mcp/ui-resource-handler.d.ts.map +1 -0
  105. package/dist/mcp/ui-server.d.ts +37 -0
  106. package/dist/mcp/ui-server.d.ts.map +1 -0
  107. package/dist/mcp/ui-session.d.ts +27 -0
  108. package/dist/mcp/ui-session.d.ts.map +1 -0
  109. package/dist/mcp/ui-stream-types.d.ts +197 -0
  110. package/dist/mcp/ui-stream-types.d.ts.map +1 -0
  111. package/dist/mcp/utils.d.ts +17 -0
  112. package/dist/mcp/utils.d.ts.map +1 -0
  113. package/dist/mcp/vitest.config.d.ts +3 -0
  114. package/dist/mcp/vitest.config.d.ts.map +1 -0
  115. package/dist/mcp-client.d.ts +58 -0
  116. package/dist/mcp-client.d.ts.map +1 -0
  117. package/dist/mcp-client.js +2 -1
  118. package/dist/memory/branch.d.ts +124 -0
  119. package/dist/memory/branch.d.ts.map +1 -0
  120. package/dist/memory/commands/status.d.ts +4 -0
  121. package/dist/memory/commands/status.d.ts.map +1 -0
  122. package/dist/memory/commands/view.d.ts +4 -0
  123. package/dist/memory/commands/view.d.ts.map +1 -0
  124. package/dist/memory/compaction.d.ts +113 -0
  125. package/dist/memory/compaction.d.ts.map +1 -0
  126. package/dist/memory/config.d.ts +27 -0
  127. package/dist/memory/config.d.ts.map +1 -0
  128. package/dist/memory/debug-log.d.ts +12 -0
  129. package/dist/memory/debug-log.d.ts.map +1 -0
  130. package/dist/memory/hooks/compaction-hook.d.ts +4 -0
  131. package/dist/memory/hooks/compaction-hook.d.ts.map +1 -0
  132. package/dist/memory/hooks/compaction-trigger.d.ts +4 -0
  133. package/dist/memory/hooks/compaction-trigger.d.ts.map +1 -0
  134. package/dist/memory/hooks/observer-trigger.d.ts +4 -0
  135. package/dist/memory/hooks/observer-trigger.d.ts.map +1 -0
  136. package/dist/memory/ids.d.ts +2 -0
  137. package/dist/memory/ids.d.ts.map +1 -0
  138. package/dist/memory/index.d.ts +3 -0
  139. package/dist/memory/index.d.ts.map +1 -0
  140. package/dist/memory/index.js +2 -0
  141. package/dist/memory/model-budget.d.ts +4 -0
  142. package/dist/memory/model-budget.d.ts.map +1 -0
  143. package/dist/memory/observer.d.ts +21 -0
  144. package/dist/memory/observer.d.ts.map +1 -0
  145. package/dist/memory/project-observations-store.d.ts +24 -0
  146. package/dist/memory/project-observations-store.d.ts.map +1 -0
  147. package/dist/memory/prompts.d.ts +11 -0
  148. package/dist/memory/prompts.d.ts.map +1 -0
  149. package/dist/memory/relevance.d.ts +4 -0
  150. package/dist/memory/relevance.d.ts.map +1 -0
  151. package/dist/memory/runtime.d.ts +40 -0
  152. package/dist/memory/runtime.d.ts.map +1 -0
  153. package/dist/memory/serialize.d.ts +26 -0
  154. package/dist/memory/serialize.d.ts.map +1 -0
  155. package/dist/memory/tokens.d.ts +8 -0
  156. package/dist/memory/tokens.d.ts.map +1 -0
  157. package/dist/memory/tools/read-project-observations.d.ts +8 -0
  158. package/dist/memory/tools/read-project-observations.d.ts.map +1 -0
  159. package/dist/memory/tools/recall-observation.d.ts +63 -0
  160. package/dist/memory/tools/recall-observation.d.ts.map +1 -0
  161. package/dist/memory/tools/write-project-observation.d.ts +9 -0
  162. package/dist/memory/tools/write-project-observation.d.ts.map +1 -0
  163. package/dist/memory/tools/write-project-observation.js +60 -0
  164. package/dist/memory/types.d.ts +65 -0
  165. package/dist/memory/types.d.ts.map +1 -0
  166. package/dist/preflight.d.ts +27 -0
  167. package/dist/preflight.d.ts.map +1 -0
  168. package/dist/preflight.js +3 -1
  169. package/dist/relay/auto-research.d.ts +64 -0
  170. package/dist/relay/auto-research.d.ts.map +1 -0
  171. package/dist/relay/auto-research.js +208 -69
  172. package/dist/relay/client.d.ts +126 -0
  173. package/dist/relay/client.d.ts.map +1 -0
  174. package/dist/relay/dispatcher.d.ts +207 -0
  175. package/dist/relay/dispatcher.d.ts.map +1 -0
  176. package/dist/relay/machine-store.d.ts +68 -0
  177. package/dist/relay/machine-store.d.ts.map +1 -0
  178. package/dist/relay/models-fetch.d.ts +75 -0
  179. package/dist/relay/models-fetch.d.ts.map +1 -0
  180. package/dist/relay/registration.d.ts +81 -0
  181. package/dist/relay/registration.d.ts.map +1 -0
  182. package/dist/sdk/agent-core/agent-loop.d.ts +24 -0
  183. package/dist/sdk/agent-core/agent-loop.d.ts.map +1 -0
  184. package/dist/sdk/agent-core/agent.d.ts +125 -0
  185. package/dist/sdk/agent-core/agent.d.ts.map +1 -0
  186. package/dist/sdk/agent-core/harness/agent-harness.d.ts +92 -0
  187. package/dist/sdk/agent-core/harness/agent-harness.d.ts.map +1 -0
  188. package/dist/sdk/agent-core/harness/compaction/branch-summarization.d.ts +53 -0
  189. package/dist/sdk/agent-core/harness/compaction/branch-summarization.d.ts.map +1 -0
  190. package/dist/sdk/agent-core/harness/compaction/compaction.d.ts +95 -0
  191. package/dist/sdk/agent-core/harness/compaction/compaction.d.ts.map +1 -0
  192. package/dist/sdk/agent-core/harness/compaction/utils.d.ts +25 -0
  193. package/dist/sdk/agent-core/harness/compaction/utils.d.ts.map +1 -0
  194. package/dist/sdk/agent-core/harness/env/nodejs.d.ts +51 -0
  195. package/dist/sdk/agent-core/harness/env/nodejs.d.ts.map +1 -0
  196. package/dist/sdk/agent-core/harness/messages.d.ts +51 -0
  197. package/dist/sdk/agent-core/harness/messages.d.ts.map +1 -0
  198. package/dist/sdk/agent-core/harness/prompt-templates.d.ts +48 -0
  199. package/dist/sdk/agent-core/harness/prompt-templates.d.ts.map +1 -0
  200. package/dist/sdk/agent-core/harness/session/jsonl-repo.d.ts +26 -0
  201. package/dist/sdk/agent-core/harness/session/jsonl-repo.d.ts.map +1 -0
  202. package/dist/sdk/agent-core/harness/session/jsonl-storage.d.ts +33 -0
  203. package/dist/sdk/agent-core/harness/session/jsonl-storage.d.ts.map +1 -0
  204. package/dist/sdk/agent-core/harness/session/memory-repo.d.ts +18 -0
  205. package/dist/sdk/agent-core/harness/session/memory-repo.d.ts.map +1 -0
  206. package/dist/sdk/agent-core/harness/session/memory-storage.d.ts +25 -0
  207. package/dist/sdk/agent-core/harness/session/memory-storage.d.ts.map +1 -0
  208. package/dist/sdk/agent-core/harness/session/repo-utils.d.ts +11 -0
  209. package/dist/sdk/agent-core/harness/session/repo-utils.d.ts.map +1 -0
  210. package/dist/sdk/agent-core/harness/session/session.d.ts +32 -0
  211. package/dist/sdk/agent-core/harness/session/session.d.ts.map +1 -0
  212. package/dist/sdk/agent-core/harness/session/uuid.d.ts +2 -0
  213. package/dist/sdk/agent-core/harness/session/uuid.d.ts.map +1 -0
  214. package/dist/sdk/agent-core/harness/skills.d.ts +44 -0
  215. package/dist/sdk/agent-core/harness/skills.d.ts.map +1 -0
  216. package/dist/sdk/agent-core/harness/system-prompt.d.ts +3 -0
  217. package/dist/sdk/agent-core/harness/system-prompt.d.ts.map +1 -0
  218. package/dist/sdk/agent-core/harness/types.d.ts +601 -0
  219. package/dist/sdk/agent-core/harness/types.d.ts.map +1 -0
  220. package/dist/sdk/agent-core/harness/utils/shell-output.d.ts +14 -0
  221. package/dist/sdk/agent-core/harness/utils/shell-output.d.ts.map +1 -0
  222. package/dist/sdk/agent-core/harness/utils/truncate.d.ts +70 -0
  223. package/dist/sdk/agent-core/harness/utils/truncate.d.ts.map +1 -0
  224. package/dist/sdk/agent-core/index.d.ts +20 -0
  225. package/dist/sdk/agent-core/index.d.ts.map +1 -0
  226. package/dist/sdk/agent-core/node.d.ts +3 -0
  227. package/dist/sdk/agent-core/node.d.ts.map +1 -0
  228. package/dist/sdk/agent-core/proxy.d.ts +69 -0
  229. package/dist/sdk/agent-core/proxy.d.ts.map +1 -0
  230. package/dist/sdk/agent-core/types.d.ts +393 -0
  231. package/dist/sdk/agent-core/types.d.ts.map +1 -0
  232. package/dist/sdk/ai/api-registry.d.ts +20 -0
  233. package/dist/sdk/ai/api-registry.d.ts.map +1 -0
  234. package/dist/sdk/ai/cli.d.ts +3 -0
  235. package/dist/sdk/ai/cli.d.ts.map +1 -0
  236. package/dist/sdk/ai/env-api-keys.d.ts +18 -0
  237. package/dist/sdk/ai/env-api-keys.d.ts.map +1 -0
  238. package/dist/sdk/ai/env-api-keys.js +9 -49
  239. package/dist/sdk/ai/image-models.d.ts +10 -0
  240. package/dist/sdk/ai/image-models.d.ts.map +1 -0
  241. package/dist/sdk/ai/image-models.generated.d.ts +440 -0
  242. package/dist/sdk/ai/image-models.generated.d.ts.map +1 -0
  243. package/dist/sdk/ai/images-api-registry.d.ts +14 -0
  244. package/dist/sdk/ai/images-api-registry.d.ts.map +1 -0
  245. package/dist/sdk/ai/images.d.ts +4 -0
  246. package/dist/sdk/ai/images.d.ts.map +1 -0
  247. package/dist/sdk/ai/index.d.ts +21 -0
  248. package/dist/sdk/ai/index.d.ts.map +1 -0
  249. package/dist/sdk/ai/models.d.ts +18 -0
  250. package/dist/sdk/ai/models.d.ts.map +1 -0
  251. package/dist/sdk/ai/models.generated.d.ts +17349 -0
  252. package/dist/sdk/ai/models.generated.d.ts.map +1 -0
  253. package/dist/sdk/ai/oauth.d.ts +2 -0
  254. package/dist/sdk/ai/oauth.d.ts.map +1 -0
  255. package/dist/sdk/ai/providers/anthropic.d.ts +54 -0
  256. package/dist/sdk/ai/providers/anthropic.d.ts.map +1 -0
  257. package/dist/sdk/ai/providers/faux.d.ts +56 -0
  258. package/dist/sdk/ai/providers/faux.d.ts.map +1 -0
  259. package/dist/sdk/ai/providers/github-copilot-headers.d.ts +8 -0
  260. package/dist/sdk/ai/providers/github-copilot-headers.d.ts.map +1 -0
  261. package/dist/sdk/ai/providers/openai-completions.d.ts +19 -0
  262. package/dist/sdk/ai/providers/openai-completions.d.ts.map +1 -0
  263. package/dist/sdk/ai/providers/openai-prompt-cache.d.ts +3 -0
  264. package/dist/sdk/ai/providers/openai-prompt-cache.d.ts.map +1 -0
  265. package/dist/sdk/ai/providers/register-builtins.d.ts +15 -0
  266. package/dist/sdk/ai/providers/register-builtins.d.ts.map +1 -0
  267. package/dist/sdk/ai/providers/simple-options.d.ts +8 -0
  268. package/dist/sdk/ai/providers/simple-options.d.ts.map +1 -0
  269. package/dist/sdk/ai/providers/transform-messages.d.ts +8 -0
  270. package/dist/sdk/ai/providers/transform-messages.d.ts.map +1 -0
  271. package/dist/sdk/ai/session-resources.d.ts +4 -0
  272. package/dist/sdk/ai/session-resources.d.ts.map +1 -0
  273. package/dist/sdk/ai/stream.d.ts +8 -0
  274. package/dist/sdk/ai/stream.d.ts.map +1 -0
  275. package/dist/sdk/ai/types.d.ts +488 -0
  276. package/dist/sdk/ai/types.d.ts.map +1 -0
  277. package/dist/sdk/ai/utils/diagnostics.d.ts +19 -0
  278. package/dist/sdk/ai/utils/diagnostics.d.ts.map +1 -0
  279. package/dist/sdk/ai/utils/event-stream.d.ts +21 -0
  280. package/dist/sdk/ai/utils/event-stream.d.ts.map +1 -0
  281. package/dist/sdk/ai/utils/hash.d.ts +3 -0
  282. package/dist/sdk/ai/utils/hash.d.ts.map +1 -0
  283. package/dist/sdk/ai/utils/headers.d.ts +2 -0
  284. package/dist/sdk/ai/utils/headers.d.ts.map +1 -0
  285. package/dist/sdk/ai/utils/json-parse.d.ts +16 -0
  286. package/dist/sdk/ai/utils/json-parse.d.ts.map +1 -0
  287. package/dist/sdk/ai/utils/node-http-proxy.d.ts +10 -0
  288. package/dist/sdk/ai/utils/node-http-proxy.d.ts.map +1 -0
  289. package/dist/sdk/ai/utils/oauth/anthropic.d.ts +25 -0
  290. package/dist/sdk/ai/utils/oauth/anthropic.d.ts.map +1 -0
  291. package/dist/sdk/ai/utils/oauth/anthropic.js +1 -1
  292. package/dist/sdk/ai/utils/oauth/device-code.d.ts +19 -0
  293. package/dist/sdk/ai/utils/oauth/device-code.d.ts.map +1 -0
  294. package/dist/sdk/ai/utils/oauth/github-copilot.d.ts +30 -0
  295. package/dist/sdk/ai/utils/oauth/github-copilot.d.ts.map +1 -0
  296. package/dist/sdk/ai/utils/oauth/index.d.ts +58 -0
  297. package/dist/sdk/ai/utils/oauth/index.d.ts.map +1 -0
  298. package/dist/sdk/ai/utils/oauth/oauth-page.d.ts +3 -0
  299. package/dist/sdk/ai/utils/oauth/oauth-page.d.ts.map +1 -0
  300. package/dist/sdk/ai/utils/oauth/openai-codex.d.ts +34 -0
  301. package/dist/sdk/ai/utils/oauth/openai-codex.d.ts.map +1 -0
  302. package/dist/sdk/ai/utils/oauth/openai-codex.js +1 -1
  303. package/dist/sdk/ai/utils/oauth/pkce.d.ts +13 -0
  304. package/dist/sdk/ai/utils/oauth/pkce.d.ts.map +1 -0
  305. package/dist/sdk/ai/utils/oauth/types.d.ts +64 -0
  306. package/dist/sdk/ai/utils/oauth/types.d.ts.map +1 -0
  307. package/dist/sdk/ai/utils/overflow.d.ts +56 -0
  308. package/dist/sdk/ai/utils/overflow.d.ts.map +1 -0
  309. package/dist/sdk/ai/utils/sanitize-unicode.d.ts +22 -0
  310. package/dist/sdk/ai/utils/sanitize-unicode.d.ts.map +1 -0
  311. package/dist/sdk/ai/utils/typebox-helpers.d.ts +17 -0
  312. package/dist/sdk/ai/utils/typebox-helpers.d.ts.map +1 -0
  313. package/dist/sdk/ai/utils/validation.d.ts +18 -0
  314. package/dist/sdk/ai/utils/validation.d.ts.map +1 -0
  315. package/dist/sdk/coding-agent/cli.d.ts +3 -0
  316. package/dist/sdk/coding-agent/cli.d.ts.map +1 -0
  317. package/dist/sdk/coding-agent/config.d.ts +71 -0
  318. package/dist/sdk/coding-agent/config.d.ts.map +1 -0
  319. package/dist/sdk/coding-agent/config.js +2 -69
  320. package/dist/sdk/coding-agent/core/agent-session-runtime.d.ts +117 -0
  321. package/dist/sdk/coding-agent/core/agent-session-runtime.d.ts.map +1 -0
  322. package/dist/sdk/coding-agent/core/agent-session-services.d.ts +86 -0
  323. package/dist/sdk/coding-agent/core/agent-session-services.d.ts.map +1 -0
  324. package/dist/sdk/coding-agent/core/agent-session.d.ts +626 -0
  325. package/dist/sdk/coding-agent/core/agent-session.d.ts.map +1 -0
  326. package/dist/sdk/coding-agent/core/auth-guidance.d.ts +5 -0
  327. package/dist/sdk/coding-agent/core/auth-guidance.d.ts.map +1 -0
  328. package/dist/sdk/coding-agent/core/auth-storage.d.ts +145 -0
  329. package/dist/sdk/coding-agent/core/auth-storage.d.ts.map +1 -0
  330. package/dist/sdk/coding-agent/core/bash-executor.d.ts +32 -0
  331. package/dist/sdk/coding-agent/core/bash-executor.d.ts.map +1 -0
  332. package/dist/sdk/coding-agent/core/compaction/branch-summarization.d.ts +88 -0
  333. package/dist/sdk/coding-agent/core/compaction/branch-summarization.d.ts.map +1 -0
  334. package/dist/sdk/coding-agent/core/compaction/compaction.d.ts +142 -0
  335. package/dist/sdk/coding-agent/core/compaction/compaction.d.ts.map +1 -0
  336. package/dist/sdk/coding-agent/core/compaction/index.d.ts +7 -0
  337. package/dist/sdk/coding-agent/core/compaction/index.d.ts.map +1 -0
  338. package/dist/sdk/coding-agent/core/compaction/utils.d.ts +38 -0
  339. package/dist/sdk/coding-agent/core/compaction/utils.d.ts.map +1 -0
  340. package/dist/sdk/coding-agent/core/defaults.d.ts +3 -0
  341. package/dist/sdk/coding-agent/core/defaults.d.ts.map +1 -0
  342. package/dist/sdk/coding-agent/core/diagnostics.d.ts +15 -0
  343. package/dist/sdk/coding-agent/core/diagnostics.d.ts.map +1 -0
  344. package/dist/sdk/coding-agent/core/event-bus.d.ts +9 -0
  345. package/dist/sdk/coding-agent/core/event-bus.d.ts.map +1 -0
  346. package/dist/sdk/coding-agent/core/exec.d.ts +29 -0
  347. package/dist/sdk/coding-agent/core/exec.d.ts.map +1 -0
  348. package/dist/sdk/coding-agent/core/extensions/index.d.ts +12 -0
  349. package/dist/sdk/coding-agent/core/extensions/index.d.ts.map +1 -0
  350. package/dist/sdk/coding-agent/core/extensions/loader.d.ts +24 -0
  351. package/dist/sdk/coding-agent/core/extensions/loader.d.ts.map +1 -0
  352. package/dist/sdk/coding-agent/core/extensions/loader.js +3 -35
  353. package/dist/sdk/coding-agent/core/extensions/runner.d.ts +161 -0
  354. package/dist/sdk/coding-agent/core/extensions/runner.d.ts.map +1 -0
  355. package/dist/sdk/coding-agent/core/extensions/runner.js +1 -2
  356. package/dist/sdk/coding-agent/core/extensions/types.d.ts +1181 -0
  357. package/dist/sdk/coding-agent/core/extensions/types.d.ts.map +1 -0
  358. package/dist/sdk/coding-agent/core/extensions/wrapper.d.ts +20 -0
  359. package/dist/sdk/coding-agent/core/extensions/wrapper.d.ts.map +1 -0
  360. package/dist/sdk/coding-agent/core/http-dispatcher.d.ts +21 -0
  361. package/dist/sdk/coding-agent/core/http-dispatcher.d.ts.map +1 -0
  362. package/dist/sdk/coding-agent/core/index.d.ts +12 -0
  363. package/dist/sdk/coding-agent/core/index.d.ts.map +1 -0
  364. package/dist/sdk/coding-agent/core/keybindings.d.ts +371 -0
  365. package/dist/sdk/coding-agent/core/keybindings.d.ts.map +1 -0
  366. package/dist/sdk/coding-agent/core/messages.d.ts +77 -0
  367. package/dist/sdk/coding-agent/core/messages.d.ts.map +1 -0
  368. package/dist/sdk/coding-agent/core/model-registry.d.ts +150 -0
  369. package/dist/sdk/coding-agent/core/model-registry.d.ts.map +1 -0
  370. package/dist/sdk/coding-agent/core/model-resolver-utils.d.ts +7 -0
  371. package/dist/sdk/coding-agent/core/model-resolver-utils.d.ts.map +1 -0
  372. package/dist/sdk/coding-agent/core/model-resolver-utils.js +8 -0
  373. package/dist/sdk/coding-agent/core/model-resolver.d.ts +110 -0
  374. package/dist/sdk/coding-agent/core/model-resolver.d.ts.map +1 -0
  375. package/dist/sdk/coding-agent/core/model-resolver.js +1 -1
  376. package/dist/sdk/coding-agent/core/output-guard.d.ts +6 -0
  377. package/dist/sdk/coding-agent/core/output-guard.d.ts.map +1 -0
  378. package/dist/sdk/coding-agent/core/package-manager.d.ts +204 -0
  379. package/dist/sdk/coding-agent/core/package-manager.d.ts.map +1 -0
  380. package/dist/sdk/coding-agent/core/prompt-templates.d.ts +52 -0
  381. package/dist/sdk/coding-agent/core/prompt-templates.d.ts.map +1 -0
  382. package/dist/sdk/coding-agent/core/provider-display-names.d.ts +2 -0
  383. package/dist/sdk/coding-agent/core/provider-display-names.d.ts.map +1 -0
  384. package/dist/sdk/coding-agent/core/resolve-config-value.d.ts +23 -0
  385. package/dist/sdk/coding-agent/core/resolve-config-value.d.ts.map +1 -0
  386. package/dist/sdk/coding-agent/core/resource-loader.d.ts +194 -0
  387. package/dist/sdk/coding-agent/core/resource-loader.d.ts.map +1 -0
  388. package/dist/sdk/coding-agent/core/resource-loader.js +1 -1
  389. package/dist/sdk/coding-agent/core/sdk.d.ts +107 -0
  390. package/dist/sdk/coding-agent/core/sdk.d.ts.map +1 -0
  391. package/dist/sdk/coding-agent/core/session-cwd.d.ts +19 -0
  392. package/dist/sdk/coding-agent/core/session-cwd.d.ts.map +1 -0
  393. package/dist/sdk/coding-agent/core/session-manager.d.ts +333 -0
  394. package/dist/sdk/coding-agent/core/session-manager.d.ts.map +1 -0
  395. package/dist/sdk/coding-agent/core/settings-manager.d.ts +209 -0
  396. package/dist/sdk/coding-agent/core/settings-manager.d.ts.map +1 -0
  397. package/dist/sdk/coding-agent/core/settings-manager.js +1 -170
  398. package/dist/sdk/coding-agent/core/skills.d.ts +60 -0
  399. package/dist/sdk/coding-agent/core/skills.d.ts.map +1 -0
  400. package/dist/sdk/coding-agent/core/slash-commands.d.ts +14 -0
  401. package/dist/sdk/coding-agent/core/slash-commands.d.ts.map +1 -0
  402. package/dist/sdk/coding-agent/core/source-info.d.ts +18 -0
  403. package/dist/sdk/coding-agent/core/source-info.d.ts.map +1 -0
  404. package/dist/sdk/coding-agent/core/system-prompt.d.ts +28 -0
  405. package/dist/sdk/coding-agent/core/system-prompt.d.ts.map +1 -0
  406. package/dist/sdk/coding-agent/core/system-prompt.js +3 -1
  407. package/dist/sdk/coding-agent/core/telemetry.d.ts +3 -0
  408. package/dist/sdk/coding-agent/core/telemetry.d.ts.map +1 -0
  409. package/dist/sdk/coding-agent/core/theme.d.ts +28 -0
  410. package/dist/sdk/coding-agent/core/theme.d.ts.map +1 -0
  411. package/dist/sdk/coding-agent/core/theme.js +202 -0
  412. package/dist/sdk/coding-agent/core/timings.d.ts +8 -0
  413. package/dist/sdk/coding-agent/core/timings.d.ts.map +1 -0
  414. package/dist/sdk/coding-agent/core/tools/bash.d.ts +63 -0
  415. package/dist/sdk/coding-agent/core/tools/bash.d.ts.map +1 -0
  416. package/dist/sdk/coding-agent/core/tools/bash.js +17 -18
  417. package/dist/sdk/coding-agent/core/tools/edit-diff.d.ts +87 -0
  418. package/dist/sdk/coding-agent/core/tools/edit-diff.d.ts.map +1 -0
  419. package/dist/sdk/coding-agent/core/tools/edit.d.ts +39 -0
  420. package/dist/sdk/coding-agent/core/tools/edit.d.ts.map +1 -0
  421. package/dist/sdk/coding-agent/core/tools/edit.js +7 -8
  422. package/dist/sdk/coding-agent/core/tools/file-mutation-queue.d.ts +6 -0
  423. package/dist/sdk/coding-agent/core/tools/file-mutation-queue.d.ts.map +1 -0
  424. package/dist/sdk/coding-agent/core/tools/find.d.ts +35 -0
  425. package/dist/sdk/coding-agent/core/tools/find.d.ts.map +1 -0
  426. package/dist/sdk/coding-agent/core/tools/find.js +9 -13
  427. package/dist/sdk/coding-agent/core/tools/grep.d.ts +37 -0
  428. package/dist/sdk/coding-agent/core/tools/grep.d.ts.map +1 -0
  429. package/dist/sdk/coding-agent/core/tools/grep.js +10 -14
  430. package/dist/sdk/coding-agent/core/tools/index.d.ts +40 -0
  431. package/dist/sdk/coding-agent/core/tools/index.d.ts.map +1 -0
  432. package/dist/sdk/coding-agent/core/tools/ls.d.ts +37 -0
  433. package/dist/sdk/coding-agent/core/tools/ls.d.ts.map +1 -0
  434. package/dist/sdk/coding-agent/core/tools/ls.js +9 -10
  435. package/dist/sdk/coding-agent/core/tools/output-accumulator.d.ts +52 -0
  436. package/dist/sdk/coding-agent/core/tools/output-accumulator.d.ts.map +1 -0
  437. package/dist/sdk/coding-agent/core/tools/path-utils.d.ts +8 -0
  438. package/dist/sdk/coding-agent/core/tools/path-utils.d.ts.map +1 -0
  439. package/dist/sdk/coding-agent/core/tools/read.d.ts +35 -0
  440. package/dist/sdk/coding-agent/core/tools/read.d.ts.map +1 -0
  441. package/dist/sdk/coding-agent/core/tools/read.js +33 -35
  442. package/dist/sdk/coding-agent/core/tools/render-diff.d.ts +17 -0
  443. package/dist/sdk/coding-agent/core/tools/render-diff.d.ts.map +1 -0
  444. package/dist/sdk/coding-agent/{modes/interactive/components/diff.js → core/tools/render-diff.js} +18 -31
  445. package/dist/sdk/coding-agent/core/tools/render-utils.d.ts +21 -0
  446. package/dist/sdk/coding-agent/core/tools/render-utils.d.ts.map +1 -0
  447. package/dist/sdk/coding-agent/core/tools/tool-definition-wrapper.d.ts +14 -0
  448. package/dist/sdk/coding-agent/core/tools/tool-definition-wrapper.d.ts.map +1 -0
  449. package/dist/sdk/coding-agent/core/tools/truncate.d.ts +70 -0
  450. package/dist/sdk/coding-agent/core/tools/truncate.d.ts.map +1 -0
  451. package/dist/sdk/coding-agent/core/tools/write.d.ts +26 -0
  452. package/dist/sdk/coding-agent/core/tools/write.d.ts.map +1 -0
  453. package/dist/sdk/coding-agent/core/tools/write.js +10 -11
  454. package/dist/sdk/coding-agent/index.d.ts +29 -0
  455. package/dist/sdk/coding-agent/index.d.ts.map +1 -0
  456. package/dist/sdk/coding-agent/index.js +7 -5
  457. package/dist/sdk/coding-agent/main.d.ts +2 -0
  458. package/dist/sdk/coding-agent/main.d.ts.map +1 -0
  459. package/dist/sdk/coding-agent/migrations.d.ts +33 -0
  460. package/dist/sdk/coding-agent/migrations.d.ts.map +1 -0
  461. package/dist/sdk/coding-agent/modes/index.d.ts +8 -0
  462. package/dist/sdk/coding-agent/modes/index.d.ts.map +1 -0
  463. package/dist/sdk/coding-agent/modes/index.js +0 -1
  464. package/dist/sdk/coding-agent/modes/print-mode.d.ts +28 -0
  465. package/dist/sdk/coding-agent/modes/print-mode.d.ts.map +1 -0
  466. package/dist/sdk/coding-agent/modes/rpc/jsonl.d.ts +17 -0
  467. package/dist/sdk/coding-agent/modes/rpc/jsonl.d.ts.map +1 -0
  468. package/dist/sdk/coding-agent/modes/rpc/rpc-client.d.ts +224 -0
  469. package/dist/sdk/coding-agent/modes/rpc/rpc-client.d.ts.map +1 -0
  470. package/dist/sdk/coding-agent/modes/rpc/rpc-mode.d.ts +20 -0
  471. package/dist/sdk/coding-agent/modes/rpc/rpc-mode.d.ts.map +1 -0
  472. package/dist/sdk/coding-agent/modes/rpc/rpc-mode.js +2 -2
  473. package/dist/sdk/coding-agent/modes/rpc/rpc-types.d.ts +419 -0
  474. package/dist/sdk/coding-agent/modes/rpc/rpc-types.d.ts.map +1 -0
  475. package/dist/sdk/coding-agent/utils/ansi.d.ts +2 -0
  476. package/dist/sdk/coding-agent/utils/ansi.d.ts.map +1 -0
  477. package/dist/sdk/coding-agent/utils/changelog.d.ts +21 -0
  478. package/dist/sdk/coding-agent/utils/changelog.d.ts.map +1 -0
  479. package/dist/sdk/coding-agent/utils/child-process.d.ts +15 -0
  480. package/dist/sdk/coding-agent/utils/child-process.d.ts.map +1 -0
  481. package/dist/sdk/coding-agent/utils/clipboard-image.d.ts +11 -0
  482. package/dist/sdk/coding-agent/utils/clipboard-image.d.ts.map +1 -0
  483. package/dist/sdk/coding-agent/utils/clipboard-native.d.ts +8 -0
  484. package/dist/sdk/coding-agent/utils/clipboard-native.d.ts.map +1 -0
  485. package/dist/sdk/coding-agent/utils/clipboard.d.ts +2 -0
  486. package/dist/sdk/coding-agent/utils/clipboard.d.ts.map +1 -0
  487. package/dist/sdk/coding-agent/utils/exif-orientation.d.ts +5 -0
  488. package/dist/sdk/coding-agent/utils/exif-orientation.d.ts.map +1 -0
  489. package/dist/sdk/coding-agent/utils/frontmatter.d.ts +8 -0
  490. package/dist/sdk/coding-agent/utils/frontmatter.d.ts.map +1 -0
  491. package/dist/sdk/coding-agent/utils/fs-watch.d.ts +5 -0
  492. package/dist/sdk/coding-agent/utils/fs-watch.d.ts.map +1 -0
  493. package/dist/sdk/coding-agent/utils/git.d.ts +26 -0
  494. package/dist/sdk/coding-agent/utils/git.d.ts.map +1 -0
  495. package/dist/sdk/coding-agent/utils/html.d.ts +7 -0
  496. package/dist/sdk/coding-agent/utils/html.d.ts.map +1 -0
  497. package/dist/sdk/coding-agent/utils/image-convert.d.ts +9 -0
  498. package/dist/sdk/coding-agent/utils/image-convert.d.ts.map +1 -0
  499. package/dist/sdk/coding-agent/utils/image-resize.d.ts +36 -0
  500. package/dist/sdk/coding-agent/utils/image-resize.d.ts.map +1 -0
  501. package/dist/sdk/coding-agent/utils/mime.d.ts +3 -0
  502. package/dist/sdk/coding-agent/utils/mime.d.ts.map +1 -0
  503. package/dist/sdk/coding-agent/utils/paths.d.ts +31 -0
  504. package/dist/sdk/coding-agent/utils/paths.d.ts.map +1 -0
  505. package/dist/sdk/coding-agent/utils/photon.d.ts +13 -0
  506. package/dist/sdk/coding-agent/utils/photon.d.ts.map +1 -0
  507. package/dist/sdk/coding-agent/utils/photon.js +2 -10
  508. package/dist/sdk/coding-agent/utils/pi-user-agent.d.ts +2 -0
  509. package/dist/sdk/coding-agent/utils/pi-user-agent.d.ts.map +1 -0
  510. package/dist/sdk/coding-agent/utils/pi-user-agent.js +1 -2
  511. package/dist/sdk/coding-agent/utils/shell.d.ts +30 -0
  512. package/dist/sdk/coding-agent/utils/shell.d.ts.map +1 -0
  513. package/dist/sdk/coding-agent/utils/sleep.d.ts +5 -0
  514. package/dist/sdk/coding-agent/utils/sleep.d.ts.map +1 -0
  515. package/dist/sdk/coding-agent/utils/syntax-highlight.d.ts +12 -0
  516. package/dist/sdk/coding-agent/utils/syntax-highlight.d.ts.map +1 -0
  517. package/dist/sdk/coding-agent/utils/tools-manager.d.ts +3 -0
  518. package/dist/sdk/coding-agent/utils/tools-manager.d.ts.map +1 -0
  519. package/dist/sdk/coding-agent/utils/version-check.d.ts +15 -0
  520. package/dist/sdk/coding-agent/utils/version-check.d.ts.map +1 -0
  521. package/dist/sdk/coding-agent/utils/windows-self-update.d.ts +3 -0
  522. package/dist/sdk/coding-agent/utils/windows-self-update.d.ts.map +1 -0
  523. package/dist/server/agent-bridge.d.ts +308 -0
  524. package/dist/server/agent-bridge.d.ts.map +1 -0
  525. package/dist/server/agent-bridge.js +2 -1
  526. package/dist/server/handlers/errors.d.ts +26 -0
  527. package/dist/server/handlers/errors.d.ts.map +1 -0
  528. package/dist/server/handlers/paths-autocomplete.d.ts +45 -0
  529. package/dist/server/handlers/paths-autocomplete.d.ts.map +1 -0
  530. package/dist/server/handlers/projects.d.ts +58 -0
  531. package/dist/server/handlers/projects.d.ts.map +1 -0
  532. package/dist/server/handlers/queue.d.ts +27 -0
  533. package/dist/server/handlers/queue.d.ts.map +1 -0
  534. package/dist/server/handlers/sessions.d.ts +50 -0
  535. package/dist/server/handlers/sessions.d.ts.map +1 -0
  536. package/dist/server/paths.d.ts +51 -0
  537. package/dist/server/paths.d.ts.map +1 -0
  538. package/dist/server/session-stream.d.ts +379 -0
  539. package/dist/server/session-stream.d.ts.map +1 -0
  540. package/dist/server/shutdown.d.ts +102 -0
  541. package/dist/server/shutdown.d.ts.map +1 -0
  542. package/dist/server/storage.d.ts +287 -0
  543. package/dist/server/storage.d.ts.map +1 -0
  544. package/dist/server/title-generator.d.ts +25 -0
  545. package/dist/server/title-generator.d.ts.map +1 -0
  546. package/dist/server/wire.d.ts +448 -0
  547. package/dist/server/wire.d.ts.map +1 -0
  548. package/dist/studio-binding.d.ts +44 -0
  549. package/dist/studio-binding.d.ts.map +1 -0
  550. package/dist/studio-binding.js +1 -1
  551. package/package.json +11 -1
  552. package/dist/sdk/coding-agent/bun/cli.js +0 -7
  553. package/dist/sdk/coding-agent/bun/restore-sandbox-env.js +0 -31
  554. package/dist/sdk/coding-agent/cli/args.js +0 -340
  555. package/dist/sdk/coding-agent/cli/file-processor.js +0 -82
  556. package/dist/sdk/coding-agent/cli/initial-message.js +0 -21
  557. package/dist/sdk/coding-agent/core/footer-data-provider.js +0 -309
  558. package/dist/sdk/coding-agent/modes/interactive/components/keybinding-hints.js +0 -35
  559. package/dist/sdk/coding-agent/modes/interactive/components/visual-truncate.js +0 -26
  560. package/dist/sdk/coding-agent/modes/interactive/interactive-mode.js +0 -3
  561. package/dist/sdk/coding-agent/modes/interactive/theme/theme.js +0 -1022
@@ -0,0 +1,63 @@
1
+ import type { AgentTool } from "../../../agent-core/index.js";
2
+ import { type Static, Type } from "typebox";
3
+ import type { ToolDefinition } from "../extensions/types.js";
4
+ import { type TruncationResult } from "./truncate.js";
5
+ declare const bashSchema: Type.TObject<{
6
+ command: Type.TString;
7
+ timeout: Type.TOptional<Type.TNumber>;
8
+ }>;
9
+ export type BashToolInput = Static<typeof bashSchema>;
10
+ export interface BashToolDetails {
11
+ truncation?: TruncationResult;
12
+ fullOutputPath?: string;
13
+ }
14
+ /**
15
+ * Pluggable operations for the bash tool.
16
+ * Override these to delegate command execution to remote systems (for example SSH).
17
+ */
18
+ export interface BashOperations {
19
+ /**
20
+ * Execute a command and stream output.
21
+ * @param command The command to execute
22
+ * @param cwd Working directory
23
+ * @param options Execution options
24
+ * @returns Promise resolving to exit code (null if killed)
25
+ */
26
+ exec: (command: string, cwd: string, options: {
27
+ onData: (data: Buffer) => void;
28
+ signal?: AbortSignal;
29
+ timeout?: number;
30
+ env?: NodeJS.ProcessEnv;
31
+ }) => Promise<{
32
+ exitCode: number | null;
33
+ }>;
34
+ }
35
+ /**
36
+ * Create bash operations using pi's built-in local shell execution backend.
37
+ *
38
+ * This is useful for extensions that intercept user_bash and still want pi's
39
+ * standard local shell behavior while wrapping or rewriting commands.
40
+ */
41
+ export declare function createLocalBashOperations(options?: {
42
+ shellPath?: string;
43
+ }): BashOperations;
44
+ export interface BashSpawnContext {
45
+ command: string;
46
+ cwd: string;
47
+ env: NodeJS.ProcessEnv;
48
+ }
49
+ export type BashSpawnHook = (context: BashSpawnContext) => BashSpawnContext;
50
+ export interface BashToolOptions {
51
+ /** Custom operations for command execution. Default: local shell */
52
+ operations?: BashOperations;
53
+ /** Command prefix prepended to every command (for example shell setup commands) */
54
+ commandPrefix?: string;
55
+ /** Optional explicit shell path from settings */
56
+ shellPath?: string;
57
+ /** Hook to adjust command, cwd, or env before execution */
58
+ spawnHook?: BashSpawnHook;
59
+ }
60
+ export declare function createBashToolDefinition(cwd: string, options?: BashToolOptions): ToolDefinition<typeof bashSchema, BashToolDetails | undefined>;
61
+ export declare function createBashTool(cwd: string, options?: BashToolOptions): AgentTool<typeof bashSchema>;
62
+ export {};
63
+ //# sourceMappingURL=bash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/coding-agent/core/tools/bash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAU5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI7D,OAAO,EAAoD,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAExG,QAAA,MAAM,UAAU;;;EAGd,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC/B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B;;;;;;OAMG;IACH,IAAI,EAAE,CACL,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;QACR,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;QAC/B,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;KACxB,KACG,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CAC1C;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CA+D1F;AAED,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;CACvB;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,gBAAgB,KAAK,gBAAgB,CAAC;AAO5E,MAAM,WAAW,eAAe;IAC/B,oEAAoE;IACpE,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,aAAa,CAAC;CAC1B;AAwFD,wBAAgB,wBAAwB,CACvC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACvB,cAAc,CAAC,OAAO,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC,CAsIhE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC,OAAO,UAAU,CAAC,CAEnG"}
@@ -1,12 +1,10 @@
1
1
  import { existsSync } from "node:fs";
2
2
  import { spawn } from "child_process";
3
3
  import { Type } from "typebox";
4
- import { keyHint } from "../../modes/interactive/components/keybinding-hints.js";
5
- import { theme } from "../../modes/interactive/theme/theme.js";
6
4
  import { waitForChildProcess } from "../../utils/child-process.js";
7
5
  import { getShellConfig, getShellEnv, killProcessTree, trackDetachedChildPid, untrackDetachedChildPid, } from "../../utils/shell.js";
8
6
  import { OutputAccumulator } from "./output-accumulator.js";
9
- import { getTextOutput, invalidArgText, str } from "./render-utils.js";
7
+ import { getTextOutput, str } from "./render-utils.js";
10
8
  import { wrapToolDefinition } from "./tool-definition-wrapper.js";
11
9
  import { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize } from "./truncate.js";
12
10
  const bashSchema = Type.Object({
@@ -103,12 +101,17 @@ const BASH_UPDATE_THROTTLE_MS = 100;
103
101
  function formatDuration(ms) {
104
102
  return `${(ms / 1000).toFixed(1)}s`;
105
103
  }
104
+ function plainText(s) { return s; }
105
+ const noopTheme = {
106
+ fg: (_name, text) => text,
107
+ bold: plainText,
108
+ };
106
109
  function formatBashCall(args) {
107
110
  const command = str(args?.command);
108
111
  const timeout = args?.timeout;
109
- const timeoutSuffix = timeout ? theme.fg("muted", ` (timeout ${timeout}s)`) : "";
110
- const commandDisplay = command === null ? invalidArgText(theme) : command ? command : theme.fg("toolOutput", "...");
111
- return theme.fg("toolTitle", theme.bold(`$ ${commandDisplay}`)) + timeoutSuffix;
112
+ const timeoutSuffix = timeout ? ` (timeout ${timeout}s)` : "";
113
+ const commandDisplay = command === null ? "[invalid]" : command || "...";
114
+ return `$ ${commandDisplay}${timeoutSuffix}`;
112
115
  }
113
116
  function formatBashResult(result, options, showImages, startedAt, endedAt) {
114
117
  let output = getTextOutput(result, showImages).trim();
@@ -122,24 +125,20 @@ function formatBashResult(result, options, showImages, startedAt, endedAt) {
122
125
  }
123
126
  const parts = [];
124
127
  if (output) {
125
- const styledOutput = output
126
- .split("\n")
127
- .map((line) => theme.fg("toolOutput", line))
128
- .join("\n");
129
128
  if (options.expanded) {
130
- parts.push(`\n${styledOutput}`);
129
+ parts.push(`\n${output}`);
131
130
  }
132
131
  else {
133
- const styledLines = styledOutput.split("\n");
134
- if (styledLines.length > BASH_PREVIEW_LINES) {
135
- const hint = theme.fg("muted", `... (${styledLines.length - BASH_PREVIEW_LINES} earlier lines, ${keyHint("app.tools.expand", "to expand")})`);
132
+ const lines = output.split("\n");
133
+ if (lines.length > BASH_PREVIEW_LINES) {
134
+ const hint = `... (${lines.length - BASH_PREVIEW_LINES} earlier lines)`;
136
135
  parts.push("");
137
136
  parts.push(hint);
138
- parts.push(...styledLines.slice(-BASH_PREVIEW_LINES));
137
+ parts.push(...lines.slice(-BASH_PREVIEW_LINES));
139
138
  }
140
139
  else {
141
140
  parts.push("");
142
- parts.push(...styledLines);
141
+ parts.push(...lines);
143
142
  }
144
143
  }
145
144
  }
@@ -156,12 +155,12 @@ function formatBashResult(result, options, showImages, startedAt, endedAt) {
156
155
  warnings.push(`Truncated: ${truncation.outputLines} lines shown (${formatSize(truncation.maxBytes ?? DEFAULT_MAX_BYTES)} limit)`);
157
156
  }
158
157
  }
159
- parts.push(`\n${theme.fg("warning", `[${warnings.join(". ")}]`)}`);
158
+ parts.push(`\n[${warnings.join(". ")}]`);
160
159
  }
161
160
  if (startedAt !== undefined) {
162
161
  const label = options.isPartial ? "Elapsed" : "Took";
163
162
  const endTime = endedAt ?? Date.now();
164
- parts.push(`\n${theme.fg("muted", `${label} ${formatDuration(endTime - startedAt)}`)}`);
163
+ parts.push(`\n${label} ${formatDuration(endTime - startedAt)}`);
165
164
  }
166
165
  return parts.join("");
167
166
  }
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Shared diff computation utilities for the edit tool.
3
+ * Used by both edit.ts (for execution) and tool-execution.ts (for preview rendering).
4
+ */
5
+ export declare function detectLineEnding(content: string): "\r\n" | "\n";
6
+ export declare function normalizeToLF(text: string): string;
7
+ export declare function restoreLineEndings(text: string, ending: "\r\n" | "\n"): string;
8
+ /**
9
+ * Normalize text for fuzzy matching. Applies progressive transformations:
10
+ * - Strip trailing whitespace from each line
11
+ * - Normalize smart quotes to ASCII equivalents
12
+ * - Normalize Unicode dashes/hyphens to ASCII hyphen
13
+ * - Normalize special Unicode spaces to regular space
14
+ */
15
+ export declare function normalizeForFuzzyMatch(text: string): string;
16
+ export interface FuzzyMatchResult {
17
+ /** Whether a match was found */
18
+ found: boolean;
19
+ /** The index where the match starts (in the content that should be used for replacement) */
20
+ index: number;
21
+ /** Length of the matched text */
22
+ matchLength: number;
23
+ /** Whether fuzzy matching was used (false = exact match) */
24
+ usedFuzzyMatch: boolean;
25
+ /**
26
+ * The content to use for replacement operations.
27
+ * When exact match: original content. When fuzzy match: normalized content.
28
+ */
29
+ contentForReplacement: string;
30
+ }
31
+ export interface Edit {
32
+ oldText: string;
33
+ newText: string;
34
+ }
35
+ export interface AppliedEditsResult {
36
+ baseContent: string;
37
+ newContent: string;
38
+ }
39
+ /**
40
+ * Find oldText in content, trying exact match first, then fuzzy match.
41
+ * When fuzzy matching is used, the returned contentForReplacement is the
42
+ * fuzzy-normalized version of the content (trailing whitespace stripped,
43
+ * Unicode quotes/dashes normalized to ASCII).
44
+ */
45
+ export declare function fuzzyFindText(content: string, oldText: string): FuzzyMatchResult;
46
+ /** Strip UTF-8 BOM if present, return both the BOM (if any) and the text without it */
47
+ export declare function stripBom(content: string): {
48
+ bom: string;
49
+ text: string;
50
+ };
51
+ /**
52
+ * Apply one or more exact-text replacements to LF-normalized content.
53
+ *
54
+ * All edits are matched against the same original content. Replacements are
55
+ * then applied in reverse order so offsets remain stable. If any edit needs
56
+ * fuzzy matching, the operation runs in fuzzy-normalized content space to
57
+ * preserve current single-edit behavior.
58
+ */
59
+ export declare function applyEditsToNormalizedContent(normalizedContent: string, edits: Edit[], path: string): AppliedEditsResult;
60
+ /** Generate a standard unified patch. */
61
+ export declare function generateUnifiedPatch(path: string, oldContent: string, newContent: string, contextLines?: number): string;
62
+ /**
63
+ * Generate a display-oriented diff string with line numbers and context.
64
+ * Returns both the diff string and the first changed line number (in the new file).
65
+ */
66
+ export declare function generateDiffString(oldContent: string, newContent: string, contextLines?: number): {
67
+ diff: string;
68
+ firstChangedLine: number | undefined;
69
+ };
70
+ export interface EditDiffResult {
71
+ diff: string;
72
+ firstChangedLine: number | undefined;
73
+ }
74
+ export interface EditDiffError {
75
+ error: string;
76
+ }
77
+ /**
78
+ * Compute the diff for one or more edit operations without applying them.
79
+ * Used for preview rendering in the TUI before the tool executes.
80
+ */
81
+ export declare function computeEditsDiff(path: string, edits: Edit[], cwd: string): Promise<EditDiffResult | EditDiffError>;
82
+ /**
83
+ * Compute the diff for a single edit operation without applying it.
84
+ * Kept as a convenience wrapper for single-edit callers.
85
+ */
86
+ export declare function computeEditDiff(path: string, oldText: string, newText: string, cwd: string): Promise<EditDiffResult | EditDiffError>;
87
+ //# sourceMappingURL=edit-diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-diff.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/coding-agent/core/tools/edit-diff.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM/D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAE9E;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqB3D;AAED,MAAM,WAAW,gBAAgB;IAChC,gCAAgC;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,4FAA4F;IAC5F,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,cAAc,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,IAAI;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CAChB;AASD,MAAM,WAAW,kBAAkB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAsChF;AAED,uFAAuF;AACvF,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAEvE;AA8CD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC5C,iBAAiB,EAAE,MAAM,EACzB,KAAK,EAAE,IAAI,EAAE,EACb,IAAI,EAAE,MAAM,GACV,kBAAkB,CA+DpB;AAED,yCAAyC;AACzC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,SAAI,GAAG,MAAM,CAKnH;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,SAAI,GACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAuHxD;AAED,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACrC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,IAAI,EAAE,EACb,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,cAAc,GAAG,aAAa,CAAC,CAyBzC;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,cAAc,GAAG,aAAa,CAAC,CAEzC"}
@@ -0,0 +1,39 @@
1
+ import type { AgentTool } from "../../../agent-core/index.js";
2
+ import { type Static, Type } from "typebox";
3
+ import type { ToolDefinition } from "../extensions/types.js";
4
+ declare const editSchema: Type.TObject<{
5
+ path: Type.TString;
6
+ edits: Type.TArray<Type.TObject<{
7
+ oldText: Type.TString;
8
+ newText: Type.TString;
9
+ }>>;
10
+ }>;
11
+ export type EditToolInput = Static<typeof editSchema>;
12
+ export interface EditToolDetails {
13
+ /** Display-oriented diff of the changes made */
14
+ diff: string;
15
+ /** Standard unified patch of the changes made */
16
+ patch: string;
17
+ /** Line number of the first change in the new file (for editor navigation) */
18
+ firstChangedLine?: number;
19
+ }
20
+ /**
21
+ * Pluggable operations for the edit tool.
22
+ * Override these to delegate file editing to remote systems (for example SSH).
23
+ */
24
+ export interface EditOperations {
25
+ /** Read file contents as a Buffer */
26
+ readFile: (absolutePath: string) => Promise<Buffer>;
27
+ /** Write content to a file */
28
+ writeFile: (absolutePath: string, content: string) => Promise<void>;
29
+ /** Check if file is readable and writable (throw if not) */
30
+ access: (absolutePath: string) => Promise<void>;
31
+ }
32
+ export interface EditToolOptions {
33
+ /** Custom operations for file editing. Default: local filesystem */
34
+ operations?: EditOperations;
35
+ }
36
+ export declare function createEditToolDefinition(cwd: string, options?: EditToolOptions): ToolDefinition<typeof editSchema, EditToolDetails | undefined>;
37
+ export declare function createEditTool(cwd: string, options?: EditToolOptions): AgentTool<typeof editSchema>;
38
+ export {};
39
+ //# sourceMappingURL=edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/coding-agent/core/tools/edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAG9D,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AA6B7D,QAAA,MAAM,UAAU;;;;;;EASf,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAMtD,MAAM,WAAW,eAAe;IAC/B,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B,qCAAqC;IACrC,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACpD,8BAA8B;IAC9B,SAAS,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,4DAA4D;IAC5D,MAAM,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAQD,MAAM,WAAW,eAAe;IAC/B,oEAAoE;IACpE,UAAU,CAAC,EAAE,cAAc,CAAC;CAC5B;AAoFD,wBAAgB,wBAAwB,CACvC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACvB,cAAc,CAAC,OAAO,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC,CAkIhE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC,OAAO,UAAU,CAAC,CAEnG"}
@@ -1,11 +1,11 @@
1
1
  import { constants } from "fs";
2
2
  import { access as fsAccess, readFile as fsReadFile, writeFile as fsWriteFile } from "fs/promises";
3
3
  import { Type } from "typebox";
4
- import { renderDiff } from "../../modes/interactive/components/diff.js";
4
+ import { renderDiff } from "./render-diff.js";
5
5
  import { applyEditsToNormalizedContent, detectLineEnding, generateDiffString, generateUnifiedPatch, normalizeToLF, restoreLineEndings, stripBom, } from "./edit-diff.js";
6
6
  import { withFileMutationQueue } from "./file-mutation-queue.js";
7
7
  import { resolveToCwd } from "./path-utils.js";
8
- import { invalidArgText, shortenPath, str } from "./render-utils.js";
8
+ import { shortenPath, str } from "./render-utils.js";
9
9
  import { wrapToolDefinition } from "./tool-definition-wrapper.js";
10
10
  const replaceEditSchema = Type.Object({
11
11
  oldText: Type.String({
@@ -53,14 +53,13 @@ function validateEditInput(input) {
53
53
  }
54
54
  return { path: input.path, edits: input.edits };
55
55
  }
56
- function formatEditCall(args, theme) {
57
- const invalidArg = invalidArgText(theme);
56
+ function formatEditCall(args, _theme) {
58
57
  const rawPath = str(args?.file_path ?? args?.path);
59
58
  const path = rawPath !== null ? shortenPath(rawPath) : null;
60
- const pathDisplay = path === null ? invalidArg : path ? theme.fg("accent", path) : theme.fg("toolOutput", "...");
61
- return `${theme.fg("toolTitle", theme.bold("edit"))} ${pathDisplay}`;
59
+ const pathDisplay = path === null ? "[invalid]" : path || "...";
60
+ return `edit ${pathDisplay}`;
62
61
  }
63
- function formatEditResult(args, result, theme, isError) {
62
+ function formatEditResult(args, result, _theme, isError) {
64
63
  const rawPath = str(args?.file_path ?? args?.path);
65
64
  if (isError) {
66
65
  const errorText = result.content
@@ -70,7 +69,7 @@ function formatEditResult(args, result, theme, isError) {
70
69
  if (!errorText) {
71
70
  return undefined;
72
71
  }
73
- return theme.fg("error", errorText);
72
+ return errorText;
74
73
  }
75
74
  const resultDiff = result.details?.diff;
76
75
  if (resultDiff) {
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Serialize file mutation operations targeting the same file.
3
+ * Operations for different files still run in parallel.
4
+ */
5
+ export declare function withFileMutationQueue<T>(filePath: string, fn: () => Promise<T>): Promise<T>;
6
+ //# sourceMappingURL=file-mutation-queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-mutation-queue.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/coding-agent/core/tools/file-mutation-queue.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAoBjG"}
@@ -0,0 +1,35 @@
1
+ import type { AgentTool } from "../../../agent-core/index.js";
2
+ import { type Static, Type } from "typebox";
3
+ import type { ToolDefinition } from "../extensions/types.js";
4
+ import { type TruncationResult } from "./truncate.js";
5
+ declare const findSchema: Type.TObject<{
6
+ pattern: Type.TString;
7
+ path: Type.TOptional<Type.TString>;
8
+ limit: Type.TOptional<Type.TNumber>;
9
+ }>;
10
+ export type FindToolInput = Static<typeof findSchema>;
11
+ export interface FindToolDetails {
12
+ truncation?: TruncationResult;
13
+ resultLimitReached?: number;
14
+ }
15
+ /**
16
+ * Pluggable operations for the find tool.
17
+ * Override these to delegate file search to remote systems (for example SSH).
18
+ */
19
+ export interface FindOperations {
20
+ /** Check if path exists */
21
+ exists: (absolutePath: string) => Promise<boolean> | boolean;
22
+ /** Find files matching glob pattern. Returns relative or absolute paths. */
23
+ glob: (pattern: string, cwd: string, options: {
24
+ ignore: string[];
25
+ limit: number;
26
+ }) => Promise<string[]> | string[];
27
+ }
28
+ export interface FindToolOptions {
29
+ /** Custom operations for find. Default: local filesystem plus fd */
30
+ operations?: FindOperations;
31
+ }
32
+ export declare function createFindToolDefinition(cwd: string, options?: FindToolOptions): ToolDefinition<typeof findSchema, FindToolDetails | undefined>;
33
+ export declare function createFindTool(cwd: string, options?: FindToolOptions): AgentTool<typeof findSchema>;
34
+ export {};
35
+ //# sourceMappingURL=find.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/coding-agent/core/tools/find.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAI9D,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI7D,OAAO,EAAiC,KAAK,gBAAgB,EAAgB,MAAM,eAAe,CAAC;AAMnG,QAAA,MAAM,UAAU;;;;EAMd,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAItD,MAAM,WAAW,eAAe;IAC/B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B,2BAA2B;IAC3B,MAAM,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAC7D,4EAA4E;IAC5E,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC;CACnH;AAQD,MAAM,WAAW,eAAe;IAC/B,oEAAoE;IACpE,UAAU,CAAC,EAAE,cAAc,CAAC;CAC5B;AAmDD,wBAAgB,wBAAwB,CACvC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACvB,cAAc,CAAC,OAAO,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC,CAiPhE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC,OAAO,UAAU,CAAC,CAEnG"}
@@ -3,10 +3,9 @@ import { spawn } from "child_process";
3
3
  import { existsSync } from "fs";
4
4
  import path from "path";
5
5
  import { Type } from "typebox";
6
- import { keyHint } from "../../modes/interactive/components/keybinding-hints.js";
7
6
  import { ensureTool } from "../../utils/tools-manager.js";
8
7
  import { resolveToCwd } from "./path-utils.js";
9
- import { getTextOutput, invalidArgText, shortenPath, str } from "./render-utils.js";
8
+ import { getTextOutput, shortenPath, str } from "./render-utils.js";
10
9
  import { wrapToolDefinition } from "./tool-definition-wrapper.js";
11
10
  import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
12
11
  function toPosixPath(value) {
@@ -25,22 +24,19 @@ const defaultFindOperations = {
25
24
  // This is a placeholder. Actual fd execution happens in execute() when no custom glob is provided.
26
25
  glob: () => [],
27
26
  };
28
- function formatFindCall(args, theme) {
27
+ function formatFindCall(args, _theme) {
29
28
  const pattern = str(args?.pattern);
30
29
  const rawPath = str(args?.path);
31
30
  const path = rawPath !== null ? shortenPath(rawPath || ".") : null;
32
31
  const limit = args?.limit;
33
- const invalidArg = invalidArgText(theme);
34
- let text = theme.fg("toolTitle", theme.bold("find")) +
35
- " " +
36
- (pattern === null ? invalidArg : theme.fg("accent", pattern || "")) +
37
- theme.fg("toolOutput", ` in ${path === null ? invalidArg : path}`);
32
+ const invalidArg = "[invalid]";
33
+ let text = `find ${pattern === null ? invalidArg : pattern || ""} in ${path === null ? invalidArg : path}`;
38
34
  if (limit !== undefined) {
39
- text += theme.fg("toolOutput", ` (limit ${limit})`);
35
+ text += ` (limit ${limit})`;
40
36
  }
41
37
  return text;
42
38
  }
43
- function formatFindResult(result, options, theme, showImages) {
39
+ function formatFindResult(result, options, _theme, showImages) {
44
40
  const output = getTextOutput(result, showImages).trim();
45
41
  let text = "";
46
42
  if (output) {
@@ -48,9 +44,9 @@ function formatFindResult(result, options, theme, showImages) {
48
44
  const maxLines = options.expanded ? lines.length : 20;
49
45
  const displayLines = lines.slice(0, maxLines);
50
46
  const remaining = lines.length - maxLines;
51
- text += `\n${displayLines.map((line) => theme.fg("toolOutput", line)).join("\n")}`;
47
+ text += `\n${displayLines.join("\n")}`;
52
48
  if (remaining > 0) {
53
- text += `${theme.fg("muted", `\n... (${remaining} more lines,`)} ${keyHint("app.tools.expand", "to expand")})`;
49
+ text += `\n... (${remaining} more lines)`;
54
50
  }
55
51
  }
56
52
  const resultLimit = result.details?.resultLimitReached;
@@ -61,7 +57,7 @@ function formatFindResult(result, options, theme, showImages) {
61
57
  warnings.push(`${resultLimit} results limit`);
62
58
  if (truncation?.truncated)
63
59
  warnings.push(`${formatSize(truncation.maxBytes ?? DEFAULT_MAX_BYTES)} limit`);
64
- text += `\n${theme.fg("warning", `[Truncated: ${warnings.join(", ")}]`)}`;
60
+ text += `\n[Truncated: ${warnings.join(", ")}]`;
65
61
  }
66
62
  return text;
67
63
  }
@@ -0,0 +1,37 @@
1
+ import type { AgentTool } from "../../../agent-core/index.js";
2
+ import { type Static, Type } from "typebox";
3
+ import type { ToolDefinition } from "../extensions/types.js";
4
+ import { type TruncationResult } from "./truncate.js";
5
+ declare const grepSchema: Type.TObject<{
6
+ pattern: Type.TString;
7
+ path: Type.TOptional<Type.TString>;
8
+ glob: Type.TOptional<Type.TString>;
9
+ ignoreCase: Type.TOptional<Type.TBoolean>;
10
+ literal: Type.TOptional<Type.TBoolean>;
11
+ context: Type.TOptional<Type.TNumber>;
12
+ limit: Type.TOptional<Type.TNumber>;
13
+ }>;
14
+ export type GrepToolInput = Static<typeof grepSchema>;
15
+ export interface GrepToolDetails {
16
+ truncation?: TruncationResult;
17
+ matchLimitReached?: number;
18
+ linesTruncated?: boolean;
19
+ }
20
+ /**
21
+ * Pluggable operations for the grep tool.
22
+ * Override these to delegate search to remote systems (for example SSH).
23
+ */
24
+ export interface GrepOperations {
25
+ /** Check if path is a directory. Throws if path does not exist. */
26
+ isDirectory: (absolutePath: string) => Promise<boolean> | boolean;
27
+ /** Read file contents for context lines */
28
+ readFile: (absolutePath: string) => Promise<string> | string;
29
+ }
30
+ export interface GrepToolOptions {
31
+ /** Custom operations for grep. Default: local filesystem plus ripgrep */
32
+ operations?: GrepOperations;
33
+ }
34
+ export declare function createGrepToolDefinition(cwd: string, options?: GrepToolOptions): ToolDefinition<typeof grepSchema, GrepToolDetails | undefined>;
35
+ export declare function createGrepTool(cwd: string, options?: GrepToolOptions): AgentTool<typeof grepSchema>;
36
+ export {};
37
+ //# sourceMappingURL=grep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grep.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/coding-agent/core/tools/grep.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAI9D,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI7D,OAAO,EAIN,KAAK,gBAAgB,EAGrB,MAAM,eAAe,CAAC;AAEvB,QAAA,MAAM,UAAU;;;;;;;;EAYd,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAGtD,MAAM,WAAW,eAAe;IAC/B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B,mEAAmE;IACnE,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAClE,2CAA2C;IAC3C,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC7D;AAOD,MAAM,WAAW,eAAe;IAC/B,yEAAyE;IACzE,UAAU,CAAC,EAAE,cAAc,CAAC;CAC5B;AAqDD,wBAAgB,wBAAwB,CACvC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACvB,cAAc,CAAC,OAAO,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC,CAqPhE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC,OAAO,UAAU,CAAC,CAEnG"}
@@ -3,10 +3,9 @@ import { spawn } from "child_process";
3
3
  import { readFileSync, statSync } from "fs";
4
4
  import path from "path";
5
5
  import { Type } from "typebox";
6
- import { keyHint } from "../../modes/interactive/components/keybinding-hints.js";
7
6
  import { ensureTool } from "../../utils/tools-manager.js";
8
7
  import { resolveToCwd } from "./path-utils.js";
9
- import { getTextOutput, invalidArgText, shortenPath, str } from "./render-utils.js";
8
+ import { getTextOutput, shortenPath, str } from "./render-utils.js";
10
9
  import { wrapToolDefinition } from "./tool-definition-wrapper.js";
11
10
  import { DEFAULT_MAX_BYTES, formatSize, GREP_MAX_LINE_LENGTH, truncateHead, truncateLine, } from "./truncate.js";
12
11
  const grepSchema = Type.Object({
@@ -23,24 +22,21 @@ const defaultGrepOperations = {
23
22
  isDirectory: (p) => statSync(p).isDirectory(),
24
23
  readFile: (p) => readFileSync(p, "utf-8"),
25
24
  };
26
- function formatGrepCall(args, theme) {
25
+ function formatGrepCall(args, _theme) {
27
26
  const pattern = str(args?.pattern);
28
27
  const rawPath = str(args?.path);
29
28
  const path = rawPath !== null ? shortenPath(rawPath || ".") : null;
30
29
  const glob = str(args?.glob);
31
30
  const limit = args?.limit;
32
- const invalidArg = invalidArgText(theme);
33
- let text = theme.fg("toolTitle", theme.bold("grep")) +
34
- " " +
35
- (pattern === null ? invalidArg : theme.fg("accent", `/${pattern || ""}/`)) +
36
- theme.fg("toolOutput", ` in ${path === null ? invalidArg : path}`);
31
+ const invalidArg = "[invalid]";
32
+ let text = `grep ${pattern === null ? invalidArg : `/${pattern || ""}/`} in ${path === null ? invalidArg : path}`;
37
33
  if (glob)
38
- text += theme.fg("toolOutput", ` (${glob})`);
34
+ text += ` (${glob})`;
39
35
  if (limit !== undefined)
40
- text += theme.fg("toolOutput", ` limit ${limit}`);
36
+ text += ` limit ${limit}`;
41
37
  return text;
42
38
  }
43
- function formatGrepResult(result, options, theme, showImages) {
39
+ function formatGrepResult(result, options, _theme, showImages) {
44
40
  const output = getTextOutput(result, showImages).trim();
45
41
  let text = "";
46
42
  if (output) {
@@ -48,9 +44,9 @@ function formatGrepResult(result, options, theme, showImages) {
48
44
  const maxLines = options.expanded ? lines.length : 15;
49
45
  const displayLines = lines.slice(0, maxLines);
50
46
  const remaining = lines.length - maxLines;
51
- text += `\n${displayLines.map((line) => theme.fg("toolOutput", line)).join("\n")}`;
47
+ text += `\n${displayLines.join("\n")}`;
52
48
  if (remaining > 0) {
53
- text += `${theme.fg("muted", `\n... (${remaining} more lines,`)} ${keyHint("app.tools.expand", "to expand")})`;
49
+ text += `\n... (${remaining} more lines)`;
54
50
  }
55
51
  }
56
52
  const matchLimit = result.details?.matchLimitReached;
@@ -64,7 +60,7 @@ function formatGrepResult(result, options, theme, showImages) {
64
60
  warnings.push(`${formatSize(truncation.maxBytes ?? DEFAULT_MAX_BYTES)} limit`);
65
61
  if (linesTruncated)
66
62
  warnings.push("some lines truncated");
67
- text += `\n${theme.fg("warning", `[Truncated: ${warnings.join(", ")}]`)}`;
63
+ text += `\n[Truncated: ${warnings.join(", ")}]`;
68
64
  }
69
65
  return text;
70
66
  }
@@ -0,0 +1,40 @@
1
+ export { type BashOperations, type BashSpawnContext, type BashSpawnHook, type BashToolDetails, type BashToolInput, type BashToolOptions, createBashTool, createBashToolDefinition, createLocalBashOperations, } from "./bash.js";
2
+ export { createEditTool, createEditToolDefinition, type EditOperations, type EditToolDetails, type EditToolInput, type EditToolOptions, } from "./edit.js";
3
+ export { withFileMutationQueue } from "./file-mutation-queue.js";
4
+ export { createFindTool, createFindToolDefinition, type FindOperations, type FindToolDetails, type FindToolInput, type FindToolOptions, } from "./find.js";
5
+ export { createGrepTool, createGrepToolDefinition, type GrepOperations, type GrepToolDetails, type GrepToolInput, type GrepToolOptions, } from "./grep.js";
6
+ export { createLsTool, createLsToolDefinition, type LsOperations, type LsToolDetails, type LsToolInput, type LsToolOptions, } from "./ls.js";
7
+ export { createReadTool, createReadToolDefinition, type ReadOperations, type ReadToolDetails, type ReadToolInput, type ReadToolOptions, } from "./read.js";
8
+ export { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, } from "./truncate.js";
9
+ export { createWriteTool, createWriteToolDefinition, type WriteOperations, type WriteToolInput, type WriteToolOptions, } from "./write.js";
10
+ import type { AgentTool } from "../../../agent-core/index.js";
11
+ import type { ToolDefinition } from "../extensions/types.js";
12
+ import { type BashToolOptions } from "./bash.js";
13
+ import { type EditToolOptions } from "./edit.js";
14
+ import { type FindToolOptions } from "./find.js";
15
+ import { type GrepToolOptions } from "./grep.js";
16
+ import { type LsToolOptions } from "./ls.js";
17
+ import { type ReadToolOptions } from "./read.js";
18
+ import { type WriteToolOptions } from "./write.js";
19
+ export type Tool = AgentTool<any>;
20
+ export type ToolDef = ToolDefinition<any, any>;
21
+ export type ToolName = "read" | "bash" | "edit" | "write" | "grep" | "find" | "ls";
22
+ export declare const allToolNames: Set<ToolName>;
23
+ export interface ToolsOptions {
24
+ read?: ReadToolOptions;
25
+ bash?: BashToolOptions;
26
+ write?: WriteToolOptions;
27
+ edit?: EditToolOptions;
28
+ grep?: GrepToolOptions;
29
+ find?: FindToolOptions;
30
+ ls?: LsToolOptions;
31
+ }
32
+ export declare function createToolDefinition(toolName: ToolName, cwd: string, options?: ToolsOptions): ToolDef;
33
+ export declare function createTool(toolName: ToolName, cwd: string, options?: ToolsOptions): Tool;
34
+ export declare function createCodingToolDefinitions(cwd: string, options?: ToolsOptions): ToolDef[];
35
+ export declare function createReadOnlyToolDefinitions(cwd: string, options?: ToolsOptions): ToolDef[];
36
+ export declare function createAllToolDefinitions(cwd: string, options?: ToolsOptions): Record<ToolName, ToolDef>;
37
+ export declare function createCodingTools(cwd: string, options?: ToolsOptions): Tool[];
38
+ export declare function createReadOnlyTools(cwd: string, options?: ToolsOptions): Tool[];
39
+ export declare function createAllTools(cwd: string, options?: ToolsOptions): Record<ToolName, Tool>;
40
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/coding-agent/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,cAAc,EACd,wBAAwB,EACxB,yBAAyB,GACzB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EACd,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EACN,cAAc,EACd,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EACd,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,YAAY,EACZ,sBAAsB,EACtB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,cAAc,EACd,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,YAAY,EACZ,YAAY,EACZ,YAAY,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,eAAe,EACf,yBAAyB,EACzB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,KAAK,eAAe,EAA4C,MAAM,WAAW,CAAC;AAC3F,OAAO,EAA4C,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAC3F,OAAO,EAA4C,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAC3F,OAAO,EAA4C,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAC3F,OAAO,EAAwC,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EAA4C,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAC3F,OAAO,EAA8C,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE/F,MAAM,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;AAClC,MAAM,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC/C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AACnF,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,QAAQ,CAAoE,CAAC;AAE5G,MAAM,WAAW,YAAY;IAC5B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,EAAE,CAAC,EAAE,aAAa,CAAC;CACnB;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAmBrG;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAmBxF;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,EAAE,CAO1F;AAED,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,EAAE,CAO5F;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAUvG;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,EAAE,CAO7E;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,EAAE,CAO/E;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAU1F"}
@@ -0,0 +1,37 @@
1
+ import type { AgentTool } from "../../../agent-core/index.js";
2
+ import { type Static, Type } from "typebox";
3
+ import type { ToolDefinition } from "../extensions/types.js";
4
+ import { type TruncationResult } from "./truncate.js";
5
+ declare const lsSchema: Type.TObject<{
6
+ path: Type.TOptional<Type.TString>;
7
+ limit: Type.TOptional<Type.TNumber>;
8
+ }>;
9
+ export type LsToolInput = Static<typeof lsSchema>;
10
+ export interface LsToolDetails {
11
+ truncation?: TruncationResult;
12
+ entryLimitReached?: number;
13
+ }
14
+ /**
15
+ * Pluggable operations for the ls tool.
16
+ * Override these to delegate directory listing to remote systems (for example SSH).
17
+ */
18
+ export interface LsOperations {
19
+ /** Check if path exists */
20
+ exists: (absolutePath: string) => Promise<boolean> | boolean;
21
+ /** Get file or directory stats. Throws if not found. */
22
+ stat: (absolutePath: string) => Promise<{
23
+ isDirectory: () => boolean;
24
+ }> | {
25
+ isDirectory: () => boolean;
26
+ };
27
+ /** Read directory entries */
28
+ readdir: (absolutePath: string) => Promise<string[]> | string[];
29
+ }
30
+ export interface LsToolOptions {
31
+ /** Custom operations for directory listing. Default: local filesystem */
32
+ operations?: LsOperations;
33
+ }
34
+ export declare function createLsToolDefinition(cwd: string, options?: LsToolOptions): ToolDefinition<typeof lsSchema, LsToolDetails | undefined>;
35
+ export declare function createLsTool(cwd: string, options?: LsToolOptions): AgentTool<typeof lsSchema>;
36
+ export {};
37
+ //# sourceMappingURL=ls.d.ts.map