axon-code 2.4.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 (1975) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +261 -0
  3. package/README.zh-CN.md +261 -0
  4. package/dist/agents/context.d.ts +289 -0
  5. package/dist/agents/context.d.ts.map +1 -0
  6. package/dist/agents/context.js +944 -0
  7. package/dist/agents/context.js.map +1 -0
  8. package/dist/agents/explore.d.ts +190 -0
  9. package/dist/agents/explore.d.ts.map +1 -0
  10. package/dist/agents/explore.js +582 -0
  11. package/dist/agents/explore.js.map +1 -0
  12. package/dist/agents/guide.d.ts +117 -0
  13. package/dist/agents/guide.d.ts.map +1 -0
  14. package/dist/agents/guide.js +690 -0
  15. package/dist/agents/guide.js.map +1 -0
  16. package/dist/agents/index.d.ts +11 -0
  17. package/dist/agents/index.d.ts.map +1 -0
  18. package/dist/agents/index.js +17 -0
  19. package/dist/agents/index.js.map +1 -0
  20. package/dist/agents/monitor.d.ts +343 -0
  21. package/dist/agents/monitor.d.ts.map +1 -0
  22. package/dist/agents/monitor.js +963 -0
  23. package/dist/agents/monitor.js.map +1 -0
  24. package/dist/agents/parallel.d.ts +305 -0
  25. package/dist/agents/parallel.d.ts.map +1 -0
  26. package/dist/agents/parallel.js +717 -0
  27. package/dist/agents/parallel.js.map +1 -0
  28. package/dist/agents/plan.d.ts +236 -0
  29. package/dist/agents/plan.d.ts.map +1 -0
  30. package/dist/agents/plan.js +292 -0
  31. package/dist/agents/plan.js.map +1 -0
  32. package/dist/agents/resume.d.ts +209 -0
  33. package/dist/agents/resume.d.ts.map +1 -0
  34. package/dist/agents/resume.js +520 -0
  35. package/dist/agents/resume.js.map +1 -0
  36. package/dist/agents/statusline.d.ts +167 -0
  37. package/dist/agents/statusline.d.ts.map +1 -0
  38. package/dist/agents/statusline.js +546 -0
  39. package/dist/agents/statusline.js.map +1 -0
  40. package/dist/agents/teammate-context.d.ts +163 -0
  41. package/dist/agents/teammate-context.d.ts.map +1 -0
  42. package/dist/agents/teammate-context.js +272 -0
  43. package/dist/agents/teammate-context.js.map +1 -0
  44. package/dist/agents/tools.d.ts +30 -0
  45. package/dist/agents/tools.d.ts.map +1 -0
  46. package/dist/agents/tools.js +116 -0
  47. package/dist/agents/tools.js.map +1 -0
  48. package/dist/auth/index.d.ts +204 -0
  49. package/dist/auth/index.d.ts.map +1 -0
  50. package/dist/auth/index.js +1266 -0
  51. package/dist/auth/index.js.map +1 -0
  52. package/dist/auth/keychain.d.ts +74 -0
  53. package/dist/auth/keychain.d.ts.map +1 -0
  54. package/dist/auth/keychain.js +181 -0
  55. package/dist/auth/keychain.js.map +1 -0
  56. package/dist/auth/settings.d.ts +58 -0
  57. package/dist/auth/settings.d.ts.map +1 -0
  58. package/dist/auth/settings.js +260 -0
  59. package/dist/auth/settings.js.map +1 -0
  60. package/dist/background/index.d.ts +83 -0
  61. package/dist/background/index.d.ts.map +1 -0
  62. package/dist/background/index.js +106 -0
  63. package/dist/background/index.js.map +1 -0
  64. package/dist/background/persistence.d.ts +146 -0
  65. package/dist/background/persistence.d.ts.map +1 -0
  66. package/dist/background/persistence.js +347 -0
  67. package/dist/background/persistence.js.map +1 -0
  68. package/dist/background/shell-manager.d.ts +130 -0
  69. package/dist/background/shell-manager.d.ts.map +1 -0
  70. package/dist/background/shell-manager.js +401 -0
  71. package/dist/background/shell-manager.js.map +1 -0
  72. package/dist/background/task-queue.d.ts +96 -0
  73. package/dist/background/task-queue.d.ts.map +1 -0
  74. package/dist/background/task-queue.js +199 -0
  75. package/dist/background/task-queue.js.map +1 -0
  76. package/dist/background/timeout.d.ts +122 -0
  77. package/dist/background/timeout.d.ts.map +1 -0
  78. package/dist/background/timeout.js +247 -0
  79. package/dist/background/timeout.js.map +1 -0
  80. package/dist/blueprint/agent-decision-maker.d.ts +126 -0
  81. package/dist/blueprint/agent-decision-maker.d.ts.map +1 -0
  82. package/dist/blueprint/agent-decision-maker.js +433 -0
  83. package/dist/blueprint/agent-decision-maker.js.map +1 -0
  84. package/dist/blueprint/autonomous-worker.d.ts +182 -0
  85. package/dist/blueprint/autonomous-worker.d.ts.map +1 -0
  86. package/dist/blueprint/autonomous-worker.js +808 -0
  87. package/dist/blueprint/autonomous-worker.js.map +1 -0
  88. package/dist/blueprint/browser-test-tools.d.ts +277 -0
  89. package/dist/blueprint/browser-test-tools.d.ts.map +1 -0
  90. package/dist/blueprint/browser-test-tools.js +645 -0
  91. package/dist/blueprint/browser-test-tools.js.map +1 -0
  92. package/dist/blueprint/e2e-agent-registry.d.ts +27 -0
  93. package/dist/blueprint/e2e-agent-registry.d.ts.map +1 -0
  94. package/dist/blueprint/e2e-agent-registry.js +39 -0
  95. package/dist/blueprint/e2e-agent-registry.js.map +1 -0
  96. package/dist/blueprint/e2e-test-agent.d.ts +151 -0
  97. package/dist/blueprint/e2e-test-agent.d.ts.map +1 -0
  98. package/dist/blueprint/e2e-test-agent.js +612 -0
  99. package/dist/blueprint/e2e-test-agent.js.map +1 -0
  100. package/dist/blueprint/environment-checker.d.ts +113 -0
  101. package/dist/blueprint/environment-checker.d.ts.map +1 -0
  102. package/dist/blueprint/environment-checker.js +409 -0
  103. package/dist/blueprint/environment-checker.js.map +1 -0
  104. package/dist/blueprint/index.d.ts +26 -0
  105. package/dist/blueprint/index.d.ts.map +1 -0
  106. package/dist/blueprint/index.js +50 -0
  107. package/dist/blueprint/index.js.map +1 -0
  108. package/dist/blueprint/lead-agent.d.ts +97 -0
  109. package/dist/blueprint/lead-agent.d.ts.map +1 -0
  110. package/dist/blueprint/lead-agent.js +905 -0
  111. package/dist/blueprint/lead-agent.js.map +1 -0
  112. package/dist/blueprint/model-selector.d.ts +34 -0
  113. package/dist/blueprint/model-selector.d.ts.map +1 -0
  114. package/dist/blueprint/model-selector.js +83 -0
  115. package/dist/blueprint/model-selector.js.map +1 -0
  116. package/dist/blueprint/planner-session.d.ts +130 -0
  117. package/dist/blueprint/planner-session.d.ts.map +1 -0
  118. package/dist/blueprint/planner-session.js +479 -0
  119. package/dist/blueprint/planner-session.js.map +1 -0
  120. package/dist/blueprint/realtime-coordinator.d.ts +373 -0
  121. package/dist/blueprint/realtime-coordinator.d.ts.map +1 -0
  122. package/dist/blueprint/realtime-coordinator.js +1454 -0
  123. package/dist/blueprint/realtime-coordinator.js.map +1 -0
  124. package/dist/blueprint/smart-planner.d.ts +346 -0
  125. package/dist/blueprint/smart-planner.d.ts.map +1 -0
  126. package/dist/blueprint/smart-planner.js +2426 -0
  127. package/dist/blueprint/smart-planner.js.map +1 -0
  128. package/dist/blueprint/task-queue.d.ts +62 -0
  129. package/dist/blueprint/task-queue.d.ts.map +1 -0
  130. package/dist/blueprint/task-queue.js +185 -0
  131. package/dist/blueprint/task-queue.js.map +1 -0
  132. package/dist/blueprint/task-reviewer.d.ts +168 -0
  133. package/dist/blueprint/task-reviewer.d.ts.map +1 -0
  134. package/dist/blueprint/task-reviewer.js +570 -0
  135. package/dist/blueprint/task-reviewer.js.map +1 -0
  136. package/dist/blueprint/types.d.ts +1054 -0
  137. package/dist/blueprint/types.d.ts.map +1 -0
  138. package/dist/blueprint/types.js +49 -0
  139. package/dist/blueprint/types.js.map +1 -0
  140. package/dist/blueprint/verification-service.d.ts +134 -0
  141. package/dist/blueprint/verification-service.d.ts.map +1 -0
  142. package/dist/blueprint/verification-service.js +315 -0
  143. package/dist/blueprint/verification-service.js.map +1 -0
  144. package/dist/blueprint/visual-comparator.d.ts +112 -0
  145. package/dist/blueprint/visual-comparator.d.ts.map +1 -0
  146. package/dist/blueprint/visual-comparator.js +309 -0
  147. package/dist/blueprint/visual-comparator.js.map +1 -0
  148. package/dist/browser/controller.d.ts +188 -0
  149. package/dist/browser/controller.d.ts.map +1 -0
  150. package/dist/browser/controller.js +1256 -0
  151. package/dist/browser/controller.js.map +1 -0
  152. package/dist/browser/detect.d.ts +14 -0
  153. package/dist/browser/detect.d.ts.map +1 -0
  154. package/dist/browser/detect.js +93 -0
  155. package/dist/browser/detect.js.map +1 -0
  156. package/dist/browser/errors.d.ts +14 -0
  157. package/dist/browser/errors.d.ts.map +1 -0
  158. package/dist/browser/errors.js +45 -0
  159. package/dist/browser/errors.js.map +1 -0
  160. package/dist/browser/extension/background-utils.js +53 -0
  161. package/dist/browser/extension/background.js +895 -0
  162. package/dist/browser/extension/manifest.json +28 -0
  163. package/dist/browser/extension/options.html +214 -0
  164. package/dist/browser/extension/options.js +201 -0
  165. package/dist/browser/extension-relay-auth.d.ts +18 -0
  166. package/dist/browser/extension-relay-auth.d.ts.map +1 -0
  167. package/dist/browser/extension-relay-auth.js +53 -0
  168. package/dist/browser/extension-relay-auth.js.map +1 -0
  169. package/dist/browser/extension-relay.d.ts +39 -0
  170. package/dist/browser/extension-relay.d.ts.map +1 -0
  171. package/dist/browser/extension-relay.js +855 -0
  172. package/dist/browser/extension-relay.js.map +1 -0
  173. package/dist/browser/index.d.ts +11 -0
  174. package/dist/browser/index.d.ts.map +1 -0
  175. package/dist/browser/index.js +11 -0
  176. package/dist/browser/index.js.map +1 -0
  177. package/dist/browser/manager.d.ts +77 -0
  178. package/dist/browser/manager.d.ts.map +1 -0
  179. package/dist/browser/manager.js +911 -0
  180. package/dist/browser/manager.js.map +1 -0
  181. package/dist/browser/navigation-guard.d.ts +15 -0
  182. package/dist/browser/navigation-guard.d.ts.map +1 -0
  183. package/dist/browser/navigation-guard.js +163 -0
  184. package/dist/browser/navigation-guard.js.map +1 -0
  185. package/dist/browser/profiles.d.ts +49 -0
  186. package/dist/browser/profiles.d.ts.map +1 -0
  187. package/dist/browser/profiles.js +211 -0
  188. package/dist/browser/profiles.js.map +1 -0
  189. package/dist/browser/types.d.ts +96 -0
  190. package/dist/browser/types.d.ts.map +1 -0
  191. package/dist/browser/types.js +5 -0
  192. package/dist/browser/types.js.map +1 -0
  193. package/dist/checkpoint/index.d.ts +289 -0
  194. package/dist/checkpoint/index.d.ts.map +1 -0
  195. package/dist/checkpoint/index.js +1424 -0
  196. package/dist/checkpoint/index.js.map +1 -0
  197. package/dist/chrome/index.d.ts +31 -0
  198. package/dist/chrome/index.d.ts.map +1 -0
  199. package/dist/chrome/index.js +41 -0
  200. package/dist/chrome/index.js.map +1 -0
  201. package/dist/chrome-mcp/index.d.ts +84 -0
  202. package/dist/chrome-mcp/index.d.ts.map +1 -0
  203. package/dist/chrome-mcp/index.js +192 -0
  204. package/dist/chrome-mcp/index.js.map +1 -0
  205. package/dist/chrome-mcp/mcp-server.d.ts +115 -0
  206. package/dist/chrome-mcp/mcp-server.d.ts.map +1 -0
  207. package/dist/chrome-mcp/mcp-server.js +312 -0
  208. package/dist/chrome-mcp/mcp-server.js.map +1 -0
  209. package/dist/chrome-mcp/native-host.d.ts +65 -0
  210. package/dist/chrome-mcp/native-host.d.ts.map +1 -0
  211. package/dist/chrome-mcp/native-host.js +357 -0
  212. package/dist/chrome-mcp/native-host.js.map +1 -0
  213. package/dist/chrome-mcp/socket-client.d.ts +105 -0
  214. package/dist/chrome-mcp/socket-client.d.ts.map +1 -0
  215. package/dist/chrome-mcp/socket-client.js +325 -0
  216. package/dist/chrome-mcp/socket-client.js.map +1 -0
  217. package/dist/chrome-mcp/socket-server.d.ts +65 -0
  218. package/dist/chrome-mcp/socket-server.d.ts.map +1 -0
  219. package/dist/chrome-mcp/socket-server.js +354 -0
  220. package/dist/chrome-mcp/socket-server.js.map +1 -0
  221. package/dist/chrome-mcp/tools.d.ts +22 -0
  222. package/dist/chrome-mcp/tools.d.ts.map +1 -0
  223. package/dist/chrome-mcp/tools.js +372 -0
  224. package/dist/chrome-mcp/tools.js.map +1 -0
  225. package/dist/cli.d.ts +7 -0
  226. package/dist/cli.d.ts.map +1 -0
  227. package/dist/cli.js +3302 -0
  228. package/dist/cli.js.map +1 -0
  229. package/dist/codesign/index.d.ts +84 -0
  230. package/dist/codesign/index.d.ts.map +1 -0
  231. package/dist/codesign/index.js +289 -0
  232. package/dist/codesign/index.js.map +1 -0
  233. package/dist/commands/api.d.ts +8 -0
  234. package/dist/commands/api.d.ts.map +1 -0
  235. package/dist/commands/api.js +510 -0
  236. package/dist/commands/api.js.map +1 -0
  237. package/dist/commands/auth.d.ts +13 -0
  238. package/dist/commands/auth.d.ts.map +1 -0
  239. package/dist/commands/auth.js +713 -0
  240. package/dist/commands/auth.js.map +1 -0
  241. package/dist/commands/config-cmd.d.ts +12 -0
  242. package/dist/commands/config-cmd.d.ts.map +1 -0
  243. package/dist/commands/config-cmd.js +578 -0
  244. package/dist/commands/config-cmd.js.map +1 -0
  245. package/dist/commands/config.d.ts +22 -0
  246. package/dist/commands/config.d.ts.map +1 -0
  247. package/dist/commands/config.js +2457 -0
  248. package/dist/commands/config.js.map +1 -0
  249. package/dist/commands/development.d.ts +14 -0
  250. package/dist/commands/development.d.ts.map +1 -0
  251. package/dist/commands/development.js +905 -0
  252. package/dist/commands/development.js.map +1 -0
  253. package/dist/commands/general.d.ts +15 -0
  254. package/dist/commands/general.d.ts.map +1 -0
  255. package/dist/commands/general.js +620 -0
  256. package/dist/commands/general.js.map +1 -0
  257. package/dist/commands/index.d.ts +28 -0
  258. package/dist/commands/index.d.ts.map +1 -0
  259. package/dist/commands/index.js +70 -0
  260. package/dist/commands/index.js.map +1 -0
  261. package/dist/commands/registry.d.ts +16 -0
  262. package/dist/commands/registry.d.ts.map +1 -0
  263. package/dist/commands/registry.js +55 -0
  264. package/dist/commands/registry.js.map +1 -0
  265. package/dist/commands/session.d.ts +14 -0
  266. package/dist/commands/session.d.ts.map +1 -0
  267. package/dist/commands/session.js +1256 -0
  268. package/dist/commands/session.js.map +1 -0
  269. package/dist/commands/settings.d.ts +15 -0
  270. package/dist/commands/settings.d.ts.map +1 -0
  271. package/dist/commands/settings.js +439 -0
  272. package/dist/commands/settings.js.map +1 -0
  273. package/dist/commands/tools.d.ts +14 -0
  274. package/dist/commands/tools.d.ts.map +1 -0
  275. package/dist/commands/tools.js +1579 -0
  276. package/dist/commands/tools.js.map +1 -0
  277. package/dist/commands/types.d.ts +82 -0
  278. package/dist/commands/types.d.ts.map +1 -0
  279. package/dist/commands/types.js +5 -0
  280. package/dist/commands/types.js.map +1 -0
  281. package/dist/commands/utility.d.ts +19 -0
  282. package/dist/commands/utility.d.ts.map +1 -0
  283. package/dist/commands/utility.js +738 -0
  284. package/dist/commands/utility.js.map +1 -0
  285. package/dist/config/axon-md-parser.d.ts +167 -0
  286. package/dist/config/axon-md-parser.d.ts.map +1 -0
  287. package/dist/config/axon-md-parser.js +472 -0
  288. package/dist/config/axon-md-parser.js.map +1 -0
  289. package/dist/config/builtin-api.d.ts +2 -0
  290. package/dist/config/builtin-api.d.ts.map +1 -0
  291. package/dist/config/builtin-api.js +2 -0
  292. package/dist/config/builtin-api.js.map +1 -0
  293. package/dist/config/config-command.d.ts +81 -0
  294. package/dist/config/config-command.d.ts.map +1 -0
  295. package/dist/config/config-command.js +292 -0
  296. package/dist/config/config-command.js.map +1 -0
  297. package/dist/config/index.d.ts +1700 -0
  298. package/dist/config/index.d.ts.map +1 -0
  299. package/dist/config/index.js +1677 -0
  300. package/dist/config/index.js.map +1 -0
  301. package/dist/config/keybindings.d.ts +141 -0
  302. package/dist/config/keybindings.d.ts.map +1 -0
  303. package/dist/config/keybindings.js +708 -0
  304. package/dist/config/keybindings.js.map +1 -0
  305. package/dist/context/__tests__/enhanced.test.d.ts +5 -0
  306. package/dist/context/__tests__/enhanced.test.d.ts.map +1 -0
  307. package/dist/context/__tests__/enhanced.test.js +298 -0
  308. package/dist/context/__tests__/enhanced.test.js.map +1 -0
  309. package/dist/context/enhanced.d.ts +244 -0
  310. package/dist/context/enhanced.d.ts.map +1 -0
  311. package/dist/context/enhanced.js +527 -0
  312. package/dist/context/enhanced.js.map +1 -0
  313. package/dist/context/index.d.ts +249 -0
  314. package/dist/context/index.d.ts.map +1 -0
  315. package/dist/context/index.js +1043 -0
  316. package/dist/context/index.js.map +1 -0
  317. package/dist/context/intent-enricher.d.ts +38 -0
  318. package/dist/context/intent-enricher.d.ts.map +1 -0
  319. package/dist/context/intent-enricher.js +212 -0
  320. package/dist/context/intent-enricher.js.map +1 -0
  321. package/dist/context/link-detector.d.ts +20 -0
  322. package/dist/context/link-detector.d.ts.map +1 -0
  323. package/dist/context/link-detector.js +99 -0
  324. package/dist/context/link-detector.js.map +1 -0
  325. package/dist/context/session-memory.d.ts +206 -0
  326. package/dist/context/session-memory.d.ts.map +1 -0
  327. package/dist/context/session-memory.js +542 -0
  328. package/dist/context/session-memory.js.map +1 -0
  329. package/dist/context/summarizer.d.ts +27 -0
  330. package/dist/context/summarizer.d.ts.map +1 -0
  331. package/dist/context/summarizer.js +157 -0
  332. package/dist/context/summarizer.js.map +1 -0
  333. package/dist/context/window.d.ts +104 -0
  334. package/dist/context/window.d.ts.map +1 -0
  335. package/dist/context/window.js +140 -0
  336. package/dist/context/window.js.map +1 -0
  337. package/dist/core/backgroundTasks.d.ts +87 -0
  338. package/dist/core/backgroundTasks.d.ts.map +1 -0
  339. package/dist/core/backgroundTasks.js +229 -0
  340. package/dist/core/backgroundTasks.js.map +1 -0
  341. package/dist/core/cache-keepalive.d.ts +37 -0
  342. package/dist/core/cache-keepalive.d.ts.map +1 -0
  343. package/dist/core/cache-keepalive.js +130 -0
  344. package/dist/core/cache-keepalive.js.map +1 -0
  345. package/dist/core/client.cache.test.d.ts +13 -0
  346. package/dist/core/client.cache.test.d.ts.map +1 -0
  347. package/dist/core/client.cache.test.js +315 -0
  348. package/dist/core/client.cache.test.js.map +1 -0
  349. package/dist/core/client.d.ts +306 -0
  350. package/dist/core/client.d.ts.map +1 -0
  351. package/dist/core/client.js +1930 -0
  352. package/dist/core/client.js.map +1 -0
  353. package/dist/core/cwd-context.d.ts +53 -0
  354. package/dist/core/cwd-context.d.ts.map +1 -0
  355. package/dist/core/cwd-context.js +102 -0
  356. package/dist/core/cwd-context.js.map +1 -0
  357. package/dist/core/index.d.ts +9 -0
  358. package/dist/core/index.d.ts.map +1 -0
  359. package/dist/core/index.js +9 -0
  360. package/dist/core/index.js.map +1 -0
  361. package/dist/core/loop.d.ts +401 -0
  362. package/dist/core/loop.d.ts.map +1 -0
  363. package/dist/core/loop.js +3375 -0
  364. package/dist/core/loop.js.map +1 -0
  365. package/dist/core/retryLogic.d.ts +84 -0
  366. package/dist/core/retryLogic.d.ts.map +1 -0
  367. package/dist/core/retryLogic.js +157 -0
  368. package/dist/core/retryLogic.js.map +1 -0
  369. package/dist/core/session-context.d.ts +24 -0
  370. package/dist/core/session-context.d.ts.map +1 -0
  371. package/dist/core/session-context.js +35 -0
  372. package/dist/core/session-context.js.map +1 -0
  373. package/dist/core/session.d.ts +229 -0
  374. package/dist/core/session.d.ts.map +1 -0
  375. package/dist/core/session.js +729 -0
  376. package/dist/core/session.js.map +1 -0
  377. package/dist/core/validateToolResults.test.d.ts +6 -0
  378. package/dist/core/validateToolResults.test.d.ts.map +1 -0
  379. package/dist/core/validateToolResults.test.js +303 -0
  380. package/dist/core/validateToolResults.test.js.map +1 -0
  381. package/dist/daemon/alarm.d.ts +62 -0
  382. package/dist/daemon/alarm.d.ts.map +1 -0
  383. package/dist/daemon/alarm.js +145 -0
  384. package/dist/daemon/alarm.js.map +1 -0
  385. package/dist/daemon/config.d.ts +225 -0
  386. package/dist/daemon/config.d.ts.map +1 -0
  387. package/dist/daemon/config.js +104 -0
  388. package/dist/daemon/config.js.map +1 -0
  389. package/dist/daemon/executor.d.ts +52 -0
  390. package/dist/daemon/executor.d.ts.map +1 -0
  391. package/dist/daemon/executor.js +288 -0
  392. package/dist/daemon/executor.js.map +1 -0
  393. package/dist/daemon/index.d.ts +72 -0
  394. package/dist/daemon/index.d.ts.map +1 -0
  395. package/dist/daemon/index.js +394 -0
  396. package/dist/daemon/index.js.map +1 -0
  397. package/dist/daemon/locked.d.ts +15 -0
  398. package/dist/daemon/locked.d.ts.map +1 -0
  399. package/dist/daemon/locked.js +16 -0
  400. package/dist/daemon/locked.js.map +1 -0
  401. package/dist/daemon/notifier.d.ts +25 -0
  402. package/dist/daemon/notifier.d.ts.map +1 -0
  403. package/dist/daemon/notifier.js +87 -0
  404. package/dist/daemon/notifier.js.map +1 -0
  405. package/dist/daemon/run-log.d.ts +43 -0
  406. package/dist/daemon/run-log.d.ts.map +1 -0
  407. package/dist/daemon/run-log.js +126 -0
  408. package/dist/daemon/run-log.js.map +1 -0
  409. package/dist/daemon/scheduler.d.ts +85 -0
  410. package/dist/daemon/scheduler.d.ts.map +1 -0
  411. package/dist/daemon/scheduler.js +379 -0
  412. package/dist/daemon/scheduler.js.map +1 -0
  413. package/dist/daemon/store.d.ts +94 -0
  414. package/dist/daemon/store.d.ts.map +1 -0
  415. package/dist/daemon/store.js +121 -0
  416. package/dist/daemon/store.js.map +1 -0
  417. package/dist/daemon/time-parser.d.ts +15 -0
  418. package/dist/daemon/time-parser.d.ts.map +1 -0
  419. package/dist/daemon/time-parser.js +68 -0
  420. package/dist/daemon/time-parser.js.map +1 -0
  421. package/dist/daemon/watcher.d.ts +34 -0
  422. package/dist/daemon/watcher.d.ts.map +1 -0
  423. package/dist/daemon/watcher.js +105 -0
  424. package/dist/daemon/watcher.js.map +1 -0
  425. package/dist/database/drivers/mongo.d.ts +14 -0
  426. package/dist/database/drivers/mongo.d.ts.map +1 -0
  427. package/dist/database/drivers/mongo.js +112 -0
  428. package/dist/database/drivers/mongo.js.map +1 -0
  429. package/dist/database/drivers/mysql.d.ts +13 -0
  430. package/dist/database/drivers/mysql.d.ts.map +1 -0
  431. package/dist/database/drivers/mysql.js +76 -0
  432. package/dist/database/drivers/mysql.js.map +1 -0
  433. package/dist/database/drivers/postgres.d.ts +13 -0
  434. package/dist/database/drivers/postgres.d.ts.map +1 -0
  435. package/dist/database/drivers/postgres.js +79 -0
  436. package/dist/database/drivers/postgres.js.map +1 -0
  437. package/dist/database/drivers/redis.d.ts +13 -0
  438. package/dist/database/drivers/redis.d.ts.map +1 -0
  439. package/dist/database/drivers/redis.js +100 -0
  440. package/dist/database/drivers/redis.js.map +1 -0
  441. package/dist/database/drivers/sqlite.d.ts +13 -0
  442. package/dist/database/drivers/sqlite.d.ts.map +1 -0
  443. package/dist/database/drivers/sqlite.js +89 -0
  444. package/dist/database/drivers/sqlite.js.map +1 -0
  445. package/dist/database/index.d.ts +21 -0
  446. package/dist/database/index.d.ts.map +1 -0
  447. package/dist/database/index.js +97 -0
  448. package/dist/database/index.js.map +1 -0
  449. package/dist/database/types.d.ts +54 -0
  450. package/dist/database/types.d.ts.map +1 -0
  451. package/dist/database/types.js +2 -0
  452. package/dist/database/types.js.map +1 -0
  453. package/dist/debugger/dap-client.d.ts +32 -0
  454. package/dist/debugger/dap-client.d.ts.map +1 -0
  455. package/dist/debugger/dap-client.js +108 -0
  456. package/dist/debugger/dap-client.js.map +1 -0
  457. package/dist/debugger/index.d.ts +30 -0
  458. package/dist/debugger/index.d.ts.map +1 -0
  459. package/dist/debugger/index.js +574 -0
  460. package/dist/debugger/index.js.map +1 -0
  461. package/dist/debugger/types.d.ts +59 -0
  462. package/dist/debugger/types.d.ts.map +1 -0
  463. package/dist/debugger/types.js +2 -0
  464. package/dist/debugger/types.js.map +1 -0
  465. package/dist/diagnostics/index.d.ts +72 -0
  466. package/dist/diagnostics/index.d.ts.map +1 -0
  467. package/dist/diagnostics/index.js +1013 -0
  468. package/dist/diagnostics/index.js.map +1 -0
  469. package/dist/ear/index.d.ts +73 -0
  470. package/dist/ear/index.d.ts.map +1 -0
  471. package/dist/ear/index.js +114 -0
  472. package/dist/ear/index.js.map +1 -0
  473. package/dist/email-mcp/index.d.ts +12 -0
  474. package/dist/email-mcp/index.d.ts.map +1 -0
  475. package/dist/email-mcp/index.js +11 -0
  476. package/dist/email-mcp/index.js.map +1 -0
  477. package/dist/email-mcp/mcp-server.d.ts +18 -0
  478. package/dist/email-mcp/mcp-server.d.ts.map +1 -0
  479. package/dist/email-mcp/mcp-server.js +381 -0
  480. package/dist/email-mcp/mcp-server.js.map +1 -0
  481. package/dist/email-mcp/tools.d.ts +22 -0
  482. package/dist/email-mcp/tools.d.ts.map +1 -0
  483. package/dist/email-mcp/tools.js +251 -0
  484. package/dist/email-mcp/tools.js.map +1 -0
  485. package/dist/env/index.d.ts +27 -0
  486. package/dist/env/index.d.ts.map +1 -0
  487. package/dist/env/index.js +31 -0
  488. package/dist/env/index.js.map +1 -0
  489. package/dist/env/manager.d.ts +150 -0
  490. package/dist/env/manager.d.ts.map +1 -0
  491. package/dist/env/manager.js +290 -0
  492. package/dist/env/manager.js.map +1 -0
  493. package/dist/env/sensitive.d.ts +134 -0
  494. package/dist/env/sensitive.d.ts.map +1 -0
  495. package/dist/env/sensitive.js +255 -0
  496. package/dist/env/sensitive.js.map +1 -0
  497. package/dist/env/validator.d.ts +93 -0
  498. package/dist/env/validator.d.ts.map +1 -0
  499. package/dist/env/validator.js +122 -0
  500. package/dist/env/validator.js.map +1 -0
  501. package/dist/env/validators/builtin.d.ts +68 -0
  502. package/dist/env/validators/builtin.d.ts.map +1 -0
  503. package/dist/env/validators/builtin.js +294 -0
  504. package/dist/env/validators/builtin.js.map +1 -0
  505. package/dist/eye/camera.py +396 -0
  506. package/dist/eye/index.d.ts +70 -0
  507. package/dist/eye/index.d.ts.map +1 -0
  508. package/dist/eye/index.js +356 -0
  509. package/dist/eye/index.js.map +1 -0
  510. package/dist/fast-mode/index.d.ts +136 -0
  511. package/dist/fast-mode/index.d.ts.map +1 -0
  512. package/dist/fast-mode/index.js +390 -0
  513. package/dist/fast-mode/index.js.map +1 -0
  514. package/dist/fast-mode/provider.d.ts +10 -0
  515. package/dist/fast-mode/provider.d.ts.map +1 -0
  516. package/dist/fast-mode/provider.js +23 -0
  517. package/dist/fast-mode/provider.js.map +1 -0
  518. package/dist/feishu/bot.d.ts +71 -0
  519. package/dist/feishu/bot.d.ts.map +1 -0
  520. package/dist/feishu/bot.js +287 -0
  521. package/dist/feishu/bot.js.map +1 -0
  522. package/dist/feishu/config.d.ts +54 -0
  523. package/dist/feishu/config.d.ts.map +1 -0
  524. package/dist/feishu/config.js +100 -0
  525. package/dist/feishu/config.js.map +1 -0
  526. package/dist/feishu/index.d.ts +7 -0
  527. package/dist/feishu/index.d.ts.map +1 -0
  528. package/dist/feishu/index.js +5 -0
  529. package/dist/feishu/index.js.map +1 -0
  530. package/dist/feishu/message-handler.d.ts +42 -0
  531. package/dist/feishu/message-handler.d.ts.map +1 -0
  532. package/dist/feishu/message-handler.js +112 -0
  533. package/dist/feishu/message-handler.js.map +1 -0
  534. package/dist/feishu/session-manager.d.ts +57 -0
  535. package/dist/feishu/session-manager.d.ts.map +1 -0
  536. package/dist/feishu/session-manager.js +179 -0
  537. package/dist/feishu/session-manager.js.map +1 -0
  538. package/dist/feishu-cli.d.ts +34 -0
  539. package/dist/feishu-cli.d.ts.map +1 -0
  540. package/dist/feishu-cli.js +132 -0
  541. package/dist/feishu-cli.js.map +1 -0
  542. package/dist/git/analysis.d.ts +135 -0
  543. package/dist/git/analysis.d.ts.map +1 -0
  544. package/dist/git/analysis.js +259 -0
  545. package/dist/git/analysis.js.map +1 -0
  546. package/dist/git/core.d.ts +175 -0
  547. package/dist/git/core.d.ts.map +1 -0
  548. package/dist/git/core.js +349 -0
  549. package/dist/git/core.js.map +1 -0
  550. package/dist/git/ignore.d.ts +74 -0
  551. package/dist/git/ignore.d.ts.map +1 -0
  552. package/dist/git/ignore.js +257 -0
  553. package/dist/git/ignore.js.map +1 -0
  554. package/dist/git/index.d.ts +37 -0
  555. package/dist/git/index.d.ts.map +1 -0
  556. package/dist/git/index.js +48 -0
  557. package/dist/git/index.js.map +1 -0
  558. package/dist/git/operations.d.ts +96 -0
  559. package/dist/git/operations.d.ts.map +1 -0
  560. package/dist/git/operations.js +288 -0
  561. package/dist/git/operations.js.map +1 -0
  562. package/dist/git/safety.d.ts +107 -0
  563. package/dist/git/safety.d.ts.map +1 -0
  564. package/dist/git/safety.js +293 -0
  565. package/dist/git/safety.js.map +1 -0
  566. package/dist/github/index.d.ts +58 -0
  567. package/dist/github/index.d.ts.map +1 -0
  568. package/dist/github/index.js +246 -0
  569. package/dist/github/index.js.map +1 -0
  570. package/dist/goals/goal-daemon.d.ts +54 -0
  571. package/dist/goals/goal-daemon.d.ts.map +1 -0
  572. package/dist/goals/goal-daemon.js +171 -0
  573. package/dist/goals/goal-daemon.js.map +1 -0
  574. package/dist/goals/goal-evaluator.d.ts +28 -0
  575. package/dist/goals/goal-evaluator.d.ts.map +1 -0
  576. package/dist/goals/goal-evaluator.js +117 -0
  577. package/dist/goals/goal-evaluator.js.map +1 -0
  578. package/dist/goals/goal-planner.d.ts +21 -0
  579. package/dist/goals/goal-planner.d.ts.map +1 -0
  580. package/dist/goals/goal-planner.js +80 -0
  581. package/dist/goals/goal-planner.js.map +1 -0
  582. package/dist/goals/goal-store.d.ts +31 -0
  583. package/dist/goals/goal-store.d.ts.map +1 -0
  584. package/dist/goals/goal-store.js +238 -0
  585. package/dist/goals/goal-store.js.map +1 -0
  586. package/dist/goals/index.d.ts +15 -0
  587. package/dist/goals/index.d.ts.map +1 -0
  588. package/dist/goals/index.js +22 -0
  589. package/dist/goals/index.js.map +1 -0
  590. package/dist/goals/storage.d.ts +83 -0
  591. package/dist/goals/storage.d.ts.map +1 -0
  592. package/dist/goals/storage.js +235 -0
  593. package/dist/goals/storage.js.map +1 -0
  594. package/dist/goals/types.d.ts +138 -0
  595. package/dist/goals/types.d.ts.map +1 -0
  596. package/dist/goals/types.js +5 -0
  597. package/dist/goals/types.js.map +1 -0
  598. package/dist/hooks/blueprint-hooks.d.ts +52 -0
  599. package/dist/hooks/blueprint-hooks.d.ts.map +1 -0
  600. package/dist/hooks/blueprint-hooks.js +75 -0
  601. package/dist/hooks/blueprint-hooks.js.map +1 -0
  602. package/dist/hooks/index.d.ts +421 -0
  603. package/dist/hooks/index.d.ts.map +1 -0
  604. package/dist/hooks/index.js +1225 -0
  605. package/dist/hooks/index.js.map +1 -0
  606. package/dist/hooks/index.test.d.ts +33 -0
  607. package/dist/hooks/index.test.d.ts.map +1 -0
  608. package/dist/hooks/index.test.js +199 -0
  609. package/dist/hooks/index.test.js.map +1 -0
  610. package/dist/i18n/index.d.ts +25 -0
  611. package/dist/i18n/index.d.ts.map +1 -0
  612. package/dist/i18n/index.js +96 -0
  613. package/dist/i18n/index.js.map +1 -0
  614. package/dist/i18n/locales/en.d.ts +786 -0
  615. package/dist/i18n/locales/en.d.ts.map +1 -0
  616. package/dist/i18n/locales/en.js +865 -0
  617. package/dist/i18n/locales/en.js.map +1 -0
  618. package/dist/i18n/locales/zh.d.ts +7 -0
  619. package/dist/i18n/locales/zh.d.ts.map +1 -0
  620. package/dist/i18n/locales/zh.js +862 -0
  621. package/dist/i18n/locales/zh.js.map +1 -0
  622. package/dist/ide/index.d.ts +81 -0
  623. package/dist/ide/index.d.ts.map +1 -0
  624. package/dist/ide/index.js +371 -0
  625. package/dist/ide/index.js.map +1 -0
  626. package/dist/index.d.ts +39 -0
  627. package/dist/index.d.ts.map +1 -0
  628. package/dist/index.js +63 -0
  629. package/dist/index.js.map +1 -0
  630. package/dist/lifecycle/index.d.ts +120 -0
  631. package/dist/lifecycle/index.d.ts.map +1 -0
  632. package/dist/lifecycle/index.js +178 -0
  633. package/dist/lifecycle/index.js.map +1 -0
  634. package/dist/lsp/index.d.ts +12 -0
  635. package/dist/lsp/index.d.ts.map +1 -0
  636. package/dist/lsp/index.js +20 -0
  637. package/dist/lsp/index.js.map +1 -0
  638. package/dist/lsp/manager.d.ts +307 -0
  639. package/dist/lsp/manager.d.ts.map +1 -0
  640. package/dist/lsp/manager.js +1012 -0
  641. package/dist/lsp/manager.js.map +1 -0
  642. package/dist/map/index.d.ts +2 -0
  643. package/dist/map/index.d.ts.map +1 -0
  644. package/dist/map/index.js +2 -0
  645. package/dist/map/index.js.map +1 -0
  646. package/dist/map/types.d.ts +264 -0
  647. package/dist/map/types.d.ts.map +1 -0
  648. package/dist/map/types.js +6 -0
  649. package/dist/map/types.js.map +1 -0
  650. package/dist/mcp/adapter.d.ts +217 -0
  651. package/dist/mcp/adapter.d.ts.map +1 -0
  652. package/dist/mcp/adapter.js +527 -0
  653. package/dist/mcp/adapter.js.map +1 -0
  654. package/dist/mcp/auto-discovery.d.ts +303 -0
  655. package/dist/mcp/auto-discovery.d.ts.map +1 -0
  656. package/dist/mcp/auto-discovery.js +1009 -0
  657. package/dist/mcp/auto-discovery.js.map +1 -0
  658. package/dist/mcp/cancellation.d.ts +258 -0
  659. package/dist/mcp/cancellation.d.ts.map +1 -0
  660. package/dist/mcp/cancellation.js +478 -0
  661. package/dist/mcp/cancellation.js.map +1 -0
  662. package/dist/mcp/config.d.ts +521 -0
  663. package/dist/mcp/config.d.ts.map +1 -0
  664. package/dist/mcp/config.js +694 -0
  665. package/dist/mcp/config.js.map +1 -0
  666. package/dist/mcp/connection.d.ts +228 -0
  667. package/dist/mcp/connection.d.ts.map +1 -0
  668. package/dist/mcp/connection.js +707 -0
  669. package/dist/mcp/connection.js.map +1 -0
  670. package/dist/mcp/discovery.d.ts +128 -0
  671. package/dist/mcp/discovery.d.ts.map +1 -0
  672. package/dist/mcp/discovery.js +577 -0
  673. package/dist/mcp/discovery.js.map +1 -0
  674. package/dist/mcp/errors.d.ts +273 -0
  675. package/dist/mcp/errors.d.ts.map +1 -0
  676. package/dist/mcp/errors.js +566 -0
  677. package/dist/mcp/errors.js.map +1 -0
  678. package/dist/mcp/index.d.ts +10 -0
  679. package/dist/mcp/index.d.ts.map +1 -0
  680. package/dist/mcp/index.js +29 -0
  681. package/dist/mcp/index.js.map +1 -0
  682. package/dist/mcp/integration.d.ts +71 -0
  683. package/dist/mcp/integration.d.ts.map +1 -0
  684. package/dist/mcp/integration.js +198 -0
  685. package/dist/mcp/integration.js.map +1 -0
  686. package/dist/mcp/lifecycle.d.ts +261 -0
  687. package/dist/mcp/lifecycle.d.ts.map +1 -0
  688. package/dist/mcp/lifecycle.js +714 -0
  689. package/dist/mcp/lifecycle.js.map +1 -0
  690. package/dist/mcp/logging.d.ts +166 -0
  691. package/dist/mcp/logging.d.ts.map +1 -0
  692. package/dist/mcp/logging.js +346 -0
  693. package/dist/mcp/logging.js.map +1 -0
  694. package/dist/mcp/notifications.d.ts +221 -0
  695. package/dist/mcp/notifications.d.ts.map +1 -0
  696. package/dist/mcp/notifications.js +356 -0
  697. package/dist/mcp/notifications.js.map +1 -0
  698. package/dist/mcp/protocol.d.ts +516 -0
  699. package/dist/mcp/protocol.d.ts.map +1 -0
  700. package/dist/mcp/protocol.js +490 -0
  701. package/dist/mcp/protocol.js.map +1 -0
  702. package/dist/mcp/resources.d.ts +197 -0
  703. package/dist/mcp/resources.d.ts.map +1 -0
  704. package/dist/mcp/resources.js +432 -0
  705. package/dist/mcp/resources.js.map +1 -0
  706. package/dist/mcp/roots.d.ts +149 -0
  707. package/dist/mcp/roots.d.ts.map +1 -0
  708. package/dist/mcp/roots.js +368 -0
  709. package/dist/mcp/roots.js.map +1 -0
  710. package/dist/mcp/sampling.d.ts +170 -0
  711. package/dist/mcp/sampling.d.ts.map +1 -0
  712. package/dist/mcp/sampling.js +373 -0
  713. package/dist/mcp/sampling.js.map +1 -0
  714. package/dist/mcp/tools.d.ts +347 -0
  715. package/dist/mcp/tools.d.ts.map +1 -0
  716. package/dist/mcp/tools.js +773 -0
  717. package/dist/mcp/tools.js.map +1 -0
  718. package/dist/mcp/websocket-connection.d.ts +164 -0
  719. package/dist/mcp/websocket-connection.d.ts.map +1 -0
  720. package/dist/mcp/websocket-connection.js +503 -0
  721. package/dist/mcp/websocket-connection.js.map +1 -0
  722. package/dist/mcp-cli.d.ts +26 -0
  723. package/dist/mcp-cli.d.ts.map +1 -0
  724. package/dist/mcp-cli.js +366 -0
  725. package/dist/mcp-cli.js.map +1 -0
  726. package/dist/media/image.d.ts +91 -0
  727. package/dist/media/image.d.ts.map +1 -0
  728. package/dist/media/image.js +400 -0
  729. package/dist/media/image.js.map +1 -0
  730. package/dist/media/index.d.ts +66 -0
  731. package/dist/media/index.d.ts.map +1 -0
  732. package/dist/media/index.js +122 -0
  733. package/dist/media/index.js.map +1 -0
  734. package/dist/media/mime.d.ts +23 -0
  735. package/dist/media/mime.d.ts.map +1 -0
  736. package/dist/media/mime.js +110 -0
  737. package/dist/media/mime.js.map +1 -0
  738. package/dist/media/office.d.ts +93 -0
  739. package/dist/media/office.d.ts.map +1 -0
  740. package/dist/media/office.js +735 -0
  741. package/dist/media/office.js.map +1 -0
  742. package/dist/media/pdf.d.ts +132 -0
  743. package/dist/media/pdf.d.ts.map +1 -0
  744. package/dist/media/pdf.js +281 -0
  745. package/dist/media/pdf.js.map +1 -0
  746. package/dist/media/svg.d.ts +55 -0
  747. package/dist/media/svg.d.ts.map +1 -0
  748. package/dist/media/svg.js +217 -0
  749. package/dist/media/svg.js.map +1 -0
  750. package/dist/memory/embedding-cache.d.ts +40 -0
  751. package/dist/memory/embedding-cache.d.ts.map +1 -0
  752. package/dist/memory/embedding-cache.js +105 -0
  753. package/dist/memory/embedding-cache.js.map +1 -0
  754. package/dist/memory/embedding-provider.d.ts +36 -0
  755. package/dist/memory/embedding-provider.d.ts.map +1 -0
  756. package/dist/memory/embedding-provider.js +105 -0
  757. package/dist/memory/embedding-provider.js.map +1 -0
  758. package/dist/memory/hybrid-search.d.ts +58 -0
  759. package/dist/memory/hybrid-search.d.ts.map +1 -0
  760. package/dist/memory/hybrid-search.js +68 -0
  761. package/dist/memory/hybrid-search.js.map +1 -0
  762. package/dist/memory/index.d.ts +15 -0
  763. package/dist/memory/index.d.ts.map +1 -0
  764. package/dist/memory/index.js +12 -0
  765. package/dist/memory/index.js.map +1 -0
  766. package/dist/memory/long-term-store.d.ts +131 -0
  767. package/dist/memory/long-term-store.d.ts.map +1 -0
  768. package/dist/memory/long-term-store.js +701 -0
  769. package/dist/memory/long-term-store.js.map +1 -0
  770. package/dist/memory/memory-search.d.ts +134 -0
  771. package/dist/memory/memory-search.d.ts.map +1 -0
  772. package/dist/memory/memory-search.js +338 -0
  773. package/dist/memory/memory-search.js.map +1 -0
  774. package/dist/memory/memory-sync.d.ts +66 -0
  775. package/dist/memory/memory-sync.d.ts.map +1 -0
  776. package/dist/memory/memory-sync.js +429 -0
  777. package/dist/memory/memory-sync.js.map +1 -0
  778. package/dist/memory/mmr.d.ts +34 -0
  779. package/dist/memory/mmr.d.ts.map +1 -0
  780. package/dist/memory/mmr.js +101 -0
  781. package/dist/memory/mmr.js.map +1 -0
  782. package/dist/memory/notebook.d.ts +80 -0
  783. package/dist/memory/notebook.d.ts.map +1 -0
  784. package/dist/memory/notebook.js +320 -0
  785. package/dist/memory/notebook.js.map +1 -0
  786. package/dist/memory/query-expansion.d.ts +22 -0
  787. package/dist/memory/query-expansion.d.ts.map +1 -0
  788. package/dist/memory/query-expansion.js +60 -0
  789. package/dist/memory/query-expansion.js.map +1 -0
  790. package/dist/memory/types.d.ts +16 -0
  791. package/dist/memory/types.d.ts.map +1 -0
  792. package/dist/memory/types.js +5 -0
  793. package/dist/memory/types.js.map +1 -0
  794. package/dist/models/config.d.ts +85 -0
  795. package/dist/models/config.d.ts.map +1 -0
  796. package/dist/models/config.js +427 -0
  797. package/dist/models/config.js.map +1 -0
  798. package/dist/models/fallback.d.ts +80 -0
  799. package/dist/models/fallback.d.ts.map +1 -0
  800. package/dist/models/fallback.js +215 -0
  801. package/dist/models/fallback.js.map +1 -0
  802. package/dist/models/index.d.ts +12 -0
  803. package/dist/models/index.d.ts.map +1 -0
  804. package/dist/models/index.js +11 -0
  805. package/dist/models/index.js.map +1 -0
  806. package/dist/models/quota.d.ts +121 -0
  807. package/dist/models/quota.d.ts.map +1 -0
  808. package/dist/models/quota.js +397 -0
  809. package/dist/models/quota.js.map +1 -0
  810. package/dist/models/stats.d.ts +96 -0
  811. package/dist/models/stats.d.ts.map +1 -0
  812. package/dist/models/stats.js +224 -0
  813. package/dist/models/stats.js.map +1 -0
  814. package/dist/models/subagent-config.d.ts +119 -0
  815. package/dist/models/subagent-config.d.ts.map +1 -0
  816. package/dist/models/subagent-config.js +267 -0
  817. package/dist/models/subagent-config.js.map +1 -0
  818. package/dist/models/thinking.d.ts +102 -0
  819. package/dist/models/thinking.d.ts.map +1 -0
  820. package/dist/models/thinking.js +213 -0
  821. package/dist/models/thinking.js.map +1 -0
  822. package/dist/models/types.d.ts +250 -0
  823. package/dist/models/types.d.ts.map +1 -0
  824. package/dist/models/types.js +33 -0
  825. package/dist/models/types.js.map +1 -0
  826. package/dist/network/audit-log.d.ts +93 -0
  827. package/dist/network/audit-log.d.ts.map +1 -0
  828. package/dist/network/audit-log.js +319 -0
  829. package/dist/network/audit-log.js.map +1 -0
  830. package/dist/network/discovery.d.ts +91 -0
  831. package/dist/network/discovery.d.ts.map +1 -0
  832. package/dist/network/discovery.js +398 -0
  833. package/dist/network/discovery.js.map +1 -0
  834. package/dist/network/global-proxy.d.ts +19 -0
  835. package/dist/network/global-proxy.d.ts.map +1 -0
  836. package/dist/network/global-proxy.js +81 -0
  837. package/dist/network/global-proxy.js.map +1 -0
  838. package/dist/network/identity.d.ts +58 -0
  839. package/dist/network/identity.d.ts.map +1 -0
  840. package/dist/network/identity.js +267 -0
  841. package/dist/network/identity.js.map +1 -0
  842. package/dist/network/index.d.ts +153 -0
  843. package/dist/network/index.d.ts.map +1 -0
  844. package/dist/network/index.js +916 -0
  845. package/dist/network/index.js.map +1 -0
  846. package/dist/network/permission.d.ts +60 -0
  847. package/dist/network/permission.d.ts.map +1 -0
  848. package/dist/network/permission.js +124 -0
  849. package/dist/network/permission.js.map +1 -0
  850. package/dist/network/project-probe.d.ts +12 -0
  851. package/dist/network/project-probe.d.ts.map +1 -0
  852. package/dist/network/project-probe.js +74 -0
  853. package/dist/network/project-probe.js.map +1 -0
  854. package/dist/network/protocol.d.ts +59 -0
  855. package/dist/network/protocol.d.ts.map +1 -0
  856. package/dist/network/protocol.js +158 -0
  857. package/dist/network/protocol.js.map +1 -0
  858. package/dist/network/proxy.d.ts +93 -0
  859. package/dist/network/proxy.d.ts.map +1 -0
  860. package/dist/network/proxy.js +228 -0
  861. package/dist/network/proxy.js.map +1 -0
  862. package/dist/network/retry.d.ts +44 -0
  863. package/dist/network/retry.d.ts.map +1 -0
  864. package/dist/network/retry.js +110 -0
  865. package/dist/network/retry.js.map +1 -0
  866. package/dist/network/router.d.ts +36 -0
  867. package/dist/network/router.d.ts.map +1 -0
  868. package/dist/network/router.js +73 -0
  869. package/dist/network/router.js.map +1 -0
  870. package/dist/network/timeout.d.ts +59 -0
  871. package/dist/network/timeout.d.ts.map +1 -0
  872. package/dist/network/timeout.js +120 -0
  873. package/dist/network/timeout.js.map +1 -0
  874. package/dist/network/transport.d.ts +97 -0
  875. package/dist/network/transport.d.ts.map +1 -0
  876. package/dist/network/transport.js +397 -0
  877. package/dist/network/transport.js.map +1 -0
  878. package/dist/network/types.d.ts +282 -0
  879. package/dist/network/types.d.ts.map +1 -0
  880. package/dist/network/types.js +31 -0
  881. package/dist/network/types.js.map +1 -0
  882. package/dist/notifications/index.d.ts +161 -0
  883. package/dist/notifications/index.d.ts.map +1 -0
  884. package/dist/notifications/index.js +341 -0
  885. package/dist/notifications/index.js.map +1 -0
  886. package/dist/organization/index.d.ts +125 -0
  887. package/dist/organization/index.d.ts.map +1 -0
  888. package/dist/organization/index.js +237 -0
  889. package/dist/organization/index.js.map +1 -0
  890. package/dist/permissions/elevated-commands.d.ts +38 -0
  891. package/dist/permissions/elevated-commands.d.ts.map +1 -0
  892. package/dist/permissions/elevated-commands.js +256 -0
  893. package/dist/permissions/elevated-commands.js.map +1 -0
  894. package/dist/permissions/index.d.ts +120 -0
  895. package/dist/permissions/index.d.ts.map +1 -0
  896. package/dist/permissions/index.js +689 -0
  897. package/dist/permissions/index.js.map +1 -0
  898. package/dist/permissions/rule-parser.d.ts +396 -0
  899. package/dist/permissions/rule-parser.d.ts.map +1 -0
  900. package/dist/permissions/rule-parser.js +990 -0
  901. package/dist/permissions/rule-parser.js.map +1 -0
  902. package/dist/permissions/rule-parser.test.d.ts +15 -0
  903. package/dist/permissions/rule-parser.test.d.ts.map +1 -0
  904. package/dist/permissions/rule-parser.test.js +489 -0
  905. package/dist/permissions/rule-parser.test.js.map +1 -0
  906. package/dist/permissions/shell-security.d.ts +128 -0
  907. package/dist/permissions/shell-security.d.ts.map +1 -0
  908. package/dist/permissions/shell-security.js +669 -0
  909. package/dist/permissions/shell-security.js.map +1 -0
  910. package/dist/permissions/shell-security.test.d.ts +7 -0
  911. package/dist/permissions/shell-security.test.d.ts.map +1 -0
  912. package/dist/permissions/shell-security.test.js +286 -0
  913. package/dist/permissions/shell-security.test.js.map +1 -0
  914. package/dist/permissions/tools.d.ts +255 -0
  915. package/dist/permissions/tools.d.ts.map +1 -0
  916. package/dist/permissions/tools.js +733 -0
  917. package/dist/permissions/tools.js.map +1 -0
  918. package/dist/permissions/tools.test.d.ts +11 -0
  919. package/dist/permissions/tools.test.d.ts.map +1 -0
  920. package/dist/permissions/tools.test.js +530 -0
  921. package/dist/permissions/tools.test.js.map +1 -0
  922. package/dist/permissions/ui-integration.d.ts +69 -0
  923. package/dist/permissions/ui-integration.d.ts.map +1 -0
  924. package/dist/permissions/ui-integration.js +129 -0
  925. package/dist/permissions/ui-integration.js.map +1 -0
  926. package/dist/permissions/ui.d.ts +188 -0
  927. package/dist/permissions/ui.d.ts.map +1 -0
  928. package/dist/permissions/ui.js +590 -0
  929. package/dist/permissions/ui.js.map +1 -0
  930. package/dist/plan/comparison.d.ts +67 -0
  931. package/dist/plan/comparison.d.ts.map +1 -0
  932. package/dist/plan/comparison.js +451 -0
  933. package/dist/plan/comparison.js.map +1 -0
  934. package/dist/plan/index.d.ts +91 -0
  935. package/dist/plan/index.d.ts.map +1 -0
  936. package/dist/plan/index.js +151 -0
  937. package/dist/plan/index.js.map +1 -0
  938. package/dist/plan/persistence.d.ts +131 -0
  939. package/dist/plan/persistence.d.ts.map +1 -0
  940. package/dist/plan/persistence.js +781 -0
  941. package/dist/plan/persistence.js.map +1 -0
  942. package/dist/plan/types.d.ts +353 -0
  943. package/dist/plan/types.d.ts.map +1 -0
  944. package/dist/plan/types.js +6 -0
  945. package/dist/plan/types.js.map +1 -0
  946. package/dist/plugins/cli.d.ts +14 -0
  947. package/dist/plugins/cli.d.ts.map +1 -0
  948. package/dist/plugins/cli.js +1050 -0
  949. package/dist/plugins/cli.js.map +1 -0
  950. package/dist/plugins/index.d.ts +621 -0
  951. package/dist/plugins/index.d.ts.map +1 -0
  952. package/dist/plugins/index.js +1978 -0
  953. package/dist/plugins/index.js.map +1 -0
  954. package/dist/plugins/marketplace.d.ts +120 -0
  955. package/dist/plugins/marketplace.d.ts.map +1 -0
  956. package/dist/plugins/marketplace.js +630 -0
  957. package/dist/plugins/marketplace.js.map +1 -0
  958. package/dist/prompt/attachments.d.ts +94 -0
  959. package/dist/prompt/attachments.d.ts.map +1 -0
  960. package/dist/prompt/attachments.js +486 -0
  961. package/dist/prompt/attachments.js.map +1 -0
  962. package/dist/prompt/builder.d.ts +45 -0
  963. package/dist/prompt/builder.d.ts.map +1 -0
  964. package/dist/prompt/builder.js +298 -0
  965. package/dist/prompt/builder.js.map +1 -0
  966. package/dist/prompt/cache.d.ts +71 -0
  967. package/dist/prompt/cache.d.ts.map +1 -0
  968. package/dist/prompt/cache.js +150 -0
  969. package/dist/prompt/cache.js.map +1 -0
  970. package/dist/prompt/index.d.ts +10 -0
  971. package/dist/prompt/index.d.ts.map +1 -0
  972. package/dist/prompt/index.js +9 -0
  973. package/dist/prompt/index.js.map +1 -0
  974. package/dist/prompt/templates.d.ts +216 -0
  975. package/dist/prompt/templates.d.ts.map +1 -0
  976. package/dist/prompt/templates.js +670 -0
  977. package/dist/prompt/templates.js.map +1 -0
  978. package/dist/prompt/types.d.ts +234 -0
  979. package/dist/prompt/types.d.ts.map +1 -0
  980. package/dist/prompt/types.js +19 -0
  981. package/dist/prompt/types.js.map +1 -0
  982. package/dist/providers/cli.d.ts +14 -0
  983. package/dist/providers/cli.d.ts.map +1 -0
  984. package/dist/providers/cli.js +466 -0
  985. package/dist/providers/cli.js.map +1 -0
  986. package/dist/providers/index.d.ts +128 -0
  987. package/dist/providers/index.d.ts.map +1 -0
  988. package/dist/providers/index.js +662 -0
  989. package/dist/providers/index.js.map +1 -0
  990. package/dist/providers/vertex.d.ts +174 -0
  991. package/dist/providers/vertex.d.ts.map +1 -0
  992. package/dist/providers/vertex.js +499 -0
  993. package/dist/providers/vertex.js.map +1 -0
  994. package/dist/proxy/ollama-adapter.d.ts +41 -0
  995. package/dist/proxy/ollama-adapter.d.ts.map +1 -0
  996. package/dist/proxy/ollama-adapter.js +669 -0
  997. package/dist/proxy/ollama-adapter.js.map +1 -0
  998. package/dist/proxy/server.d.ts +63 -0
  999. package/dist/proxy/server.d.ts.map +1 -0
  1000. package/dist/proxy/server.js +1160 -0
  1001. package/dist/proxy/server.js.map +1 -0
  1002. package/dist/proxy-cli.d.ts +19 -0
  1003. package/dist/proxy-cli.d.ts.map +1 -0
  1004. package/dist/proxy-cli.js +308 -0
  1005. package/dist/proxy-cli.js.map +1 -0
  1006. package/dist/ratelimit/index.d.ts +252 -0
  1007. package/dist/ratelimit/index.d.ts.map +1 -0
  1008. package/dist/ratelimit/index.js +580 -0
  1009. package/dist/ratelimit/index.js.map +1 -0
  1010. package/dist/renderer/index.d.ts +75 -0
  1011. package/dist/renderer/index.d.ts.map +1 -0
  1012. package/dist/renderer/index.js +383 -0
  1013. package/dist/renderer/index.js.map +1 -0
  1014. package/dist/renderer/tree-render.d.ts +172 -0
  1015. package/dist/renderer/tree-render.d.ts.map +1 -0
  1016. package/dist/renderer/tree-render.js +397 -0
  1017. package/dist/renderer/tree-render.js.map +1 -0
  1018. package/dist/rewind/fileHistory.d.ts +140 -0
  1019. package/dist/rewind/fileHistory.d.ts.map +1 -0
  1020. package/dist/rewind/fileHistory.js +326 -0
  1021. package/dist/rewind/fileHistory.js.map +1 -0
  1022. package/dist/rewind/index.d.ts +8 -0
  1023. package/dist/rewind/index.d.ts.map +1 -0
  1024. package/dist/rewind/index.js +8 -0
  1025. package/dist/rewind/index.js.map +1 -0
  1026. package/dist/rewind/rewindManager.d.ts +98 -0
  1027. package/dist/rewind/rewindManager.d.ts.map +1 -0
  1028. package/dist/rewind/rewindManager.js +199 -0
  1029. package/dist/rewind/rewindManager.js.map +1 -0
  1030. package/dist/rules/index.d.ts +69 -0
  1031. package/dist/rules/index.d.ts.map +1 -0
  1032. package/dist/rules/index.js +410 -0
  1033. package/dist/rules/index.js.map +1 -0
  1034. package/dist/sandbox/bubblewrap.d.ts +157 -0
  1035. package/dist/sandbox/bubblewrap.d.ts.map +1 -0
  1036. package/dist/sandbox/bubblewrap.js +637 -0
  1037. package/dist/sandbox/bubblewrap.js.map +1 -0
  1038. package/dist/sandbox/config.d.ts +497 -0
  1039. package/dist/sandbox/config.d.ts.map +1 -0
  1040. package/dist/sandbox/config.js +696 -0
  1041. package/dist/sandbox/config.js.map +1 -0
  1042. package/dist/sandbox/docker.d.ts +104 -0
  1043. package/dist/sandbox/docker.d.ts.map +1 -0
  1044. package/dist/sandbox/docker.js +347 -0
  1045. package/dist/sandbox/docker.js.map +1 -0
  1046. package/dist/sandbox/executor.d.ts +68 -0
  1047. package/dist/sandbox/executor.d.ts.map +1 -0
  1048. package/dist/sandbox/executor.js +341 -0
  1049. package/dist/sandbox/executor.js.map +1 -0
  1050. package/dist/sandbox/filesystem.d.ts +146 -0
  1051. package/dist/sandbox/filesystem.d.ts.map +1 -0
  1052. package/dist/sandbox/filesystem.js +501 -0
  1053. package/dist/sandbox/filesystem.js.map +1 -0
  1054. package/dist/sandbox/index.d.ts +21 -0
  1055. package/dist/sandbox/index.d.ts.map +1 -0
  1056. package/dist/sandbox/index.js +21 -0
  1057. package/dist/sandbox/index.js.map +1 -0
  1058. package/dist/sandbox/network.d.ts +174 -0
  1059. package/dist/sandbox/network.d.ts.map +1 -0
  1060. package/dist/sandbox/network.js +487 -0
  1061. package/dist/sandbox/network.js.map +1 -0
  1062. package/dist/sandbox/resource-limits.d.ts +83 -0
  1063. package/dist/sandbox/resource-limits.d.ts.map +1 -0
  1064. package/dist/sandbox/resource-limits.js +305 -0
  1065. package/dist/sandbox/resource-limits.js.map +1 -0
  1066. package/dist/sandbox/seatbelt.d.ts +70 -0
  1067. package/dist/sandbox/seatbelt.d.ts.map +1 -0
  1068. package/dist/sandbox/seatbelt.js +256 -0
  1069. package/dist/sandbox/seatbelt.js.map +1 -0
  1070. package/dist/search/ripgrep.d.ts +82 -0
  1071. package/dist/search/ripgrep.d.ts.map +1 -0
  1072. package/dist/search/ripgrep.js +399 -0
  1073. package/dist/search/ripgrep.js.map +1 -0
  1074. package/dist/security/skill-scanner.d.ts +18 -0
  1075. package/dist/security/skill-scanner.d.ts.map +1 -0
  1076. package/dist/security/skill-scanner.js +115 -0
  1077. package/dist/security/skill-scanner.js.map +1 -0
  1078. package/dist/session/cleanup.d.ts +62 -0
  1079. package/dist/session/cleanup.d.ts.map +1 -0
  1080. package/dist/session/cleanup.js +218 -0
  1081. package/dist/session/cleanup.js.map +1 -0
  1082. package/dist/session/index.d.ts +584 -0
  1083. package/dist/session/index.d.ts.map +1 -0
  1084. package/dist/session/index.js +1910 -0
  1085. package/dist/session/index.js.map +1 -0
  1086. package/dist/session/list.d.ts +150 -0
  1087. package/dist/session/list.d.ts.map +1 -0
  1088. package/dist/session/list.js +807 -0
  1089. package/dist/session/list.js.map +1 -0
  1090. package/dist/session/resume.d.ts +103 -0
  1091. package/dist/session/resume.d.ts.map +1 -0
  1092. package/dist/session/resume.js +173 -0
  1093. package/dist/session/resume.js.map +1 -0
  1094. package/dist/skills/builtin/skill-hub/SKILL.md +51 -0
  1095. package/dist/skills/builtin/tool-discovery/SKILL.md +194 -0
  1096. package/dist/skills/hub.d.ts +54 -0
  1097. package/dist/skills/hub.d.ts.map +1 -0
  1098. package/dist/skills/hub.js +251 -0
  1099. package/dist/skills/hub.js.map +1 -0
  1100. package/dist/streaming/index.d.ts +115 -0
  1101. package/dist/streaming/index.d.ts.map +1 -0
  1102. package/dist/streaming/index.js +249 -0
  1103. package/dist/streaming/index.js.map +1 -0
  1104. package/dist/streaming/message-stream.d.ts +237 -0
  1105. package/dist/streaming/message-stream.d.ts.map +1 -0
  1106. package/dist/streaming/message-stream.js +480 -0
  1107. package/dist/streaming/message-stream.js.map +1 -0
  1108. package/dist/streaming/sse.d.ts +94 -0
  1109. package/dist/streaming/sse.d.ts.map +1 -0
  1110. package/dist/streaming/sse.js +314 -0
  1111. package/dist/streaming/sse.js.map +1 -0
  1112. package/dist/teams/index.d.ts +7 -0
  1113. package/dist/teams/index.d.ts.map +1 -0
  1114. package/dist/teams/index.js +7 -0
  1115. package/dist/teams/index.js.map +1 -0
  1116. package/dist/teams/storage.d.ts +94 -0
  1117. package/dist/teams/storage.d.ts.map +1 -0
  1118. package/dist/teams/storage.js +350 -0
  1119. package/dist/teams/storage.js.map +1 -0
  1120. package/dist/teams/tmux.d.ts +122 -0
  1121. package/dist/teams/tmux.d.ts.map +1 -0
  1122. package/dist/teams/tmux.js +419 -0
  1123. package/dist/teams/tmux.js.map +1 -0
  1124. package/dist/teams/types.d.ts +139 -0
  1125. package/dist/teams/types.d.ts.map +1 -0
  1126. package/dist/teams/types.js +8 -0
  1127. package/dist/teams/types.js.map +1 -0
  1128. package/dist/telemetry/index.d.ts +215 -0
  1129. package/dist/telemetry/index.d.ts.map +1 -0
  1130. package/dist/telemetry/index.js +776 -0
  1131. package/dist/telemetry/index.js.map +1 -0
  1132. package/dist/teleport/index.d.ts +43 -0
  1133. package/dist/teleport/index.d.ts.map +1 -0
  1134. package/dist/teleport/index.js +71 -0
  1135. package/dist/teleport/index.js.map +1 -0
  1136. package/dist/teleport/session.d.ts +78 -0
  1137. package/dist/teleport/session.d.ts.map +1 -0
  1138. package/dist/teleport/session.js +273 -0
  1139. package/dist/teleport/session.js.map +1 -0
  1140. package/dist/teleport/types.d.ts +93 -0
  1141. package/dist/teleport/types.d.ts.map +1 -0
  1142. package/dist/teleport/types.js +6 -0
  1143. package/dist/teleport/types.js.map +1 -0
  1144. package/dist/teleport/validation.d.ts +30 -0
  1145. package/dist/teleport/validation.d.ts.map +1 -0
  1146. package/dist/teleport/validation.js +124 -0
  1147. package/dist/teleport/validation.js.map +1 -0
  1148. package/dist/tools/agent-teams.d.ts +26 -0
  1149. package/dist/tools/agent-teams.d.ts.map +1 -0
  1150. package/dist/tools/agent-teams.js +171 -0
  1151. package/dist/tools/agent-teams.js.map +1 -0
  1152. package/dist/tools/agent.d.ts +223 -0
  1153. package/dist/tools/agent.d.ts.map +1 -0
  1154. package/dist/tools/agent.js +1540 -0
  1155. package/dist/tools/agent.js.map +1 -0
  1156. package/dist/tools/ask.d.ts +87 -0
  1157. package/dist/tools/ask.d.ts.map +1 -0
  1158. package/dist/tools/ask.js +572 -0
  1159. package/dist/tools/ask.js.map +1 -0
  1160. package/dist/tools/base.d.ts +89 -0
  1161. package/dist/tools/base.d.ts.map +1 -0
  1162. package/dist/tools/base.js +199 -0
  1163. package/dist/tools/base.js.map +1 -0
  1164. package/dist/tools/bash-history.d.ts +83 -0
  1165. package/dist/tools/bash-history.d.ts.map +1 -0
  1166. package/dist/tools/bash-history.js +245 -0
  1167. package/dist/tools/bash-history.js.map +1 -0
  1168. package/dist/tools/bash.d.ts +214 -0
  1169. package/dist/tools/bash.d.ts.map +1 -0
  1170. package/dist/tools/bash.js +1823 -0
  1171. package/dist/tools/bash.js.map +1 -0
  1172. package/dist/tools/blueprint.d.ts +91 -0
  1173. package/dist/tools/blueprint.d.ts.map +1 -0
  1174. package/dist/tools/blueprint.js +618 -0
  1175. package/dist/tools/blueprint.js.map +1 -0
  1176. package/dist/tools/browser.d.ts +28 -0
  1177. package/dist/tools/browser.d.ts.map +1 -0
  1178. package/dist/tools/browser.js +776 -0
  1179. package/dist/tools/browser.js.map +1 -0
  1180. package/dist/tools/create-tool.d.ts +63 -0
  1181. package/dist/tools/create-tool.d.ts.map +1 -0
  1182. package/dist/tools/create-tool.js +230 -0
  1183. package/dist/tools/create-tool.js.map +1 -0
  1184. package/dist/tools/database.d.ts +12 -0
  1185. package/dist/tools/database.d.ts.map +1 -0
  1186. package/dist/tools/database.js +223 -0
  1187. package/dist/tools/database.js.map +1 -0
  1188. package/dist/tools/dispatch-worker.d.ts +46 -0
  1189. package/dist/tools/dispatch-worker.d.ts.map +1 -0
  1190. package/dist/tools/dispatch-worker.js +276 -0
  1191. package/dist/tools/dispatch-worker.js.map +1 -0
  1192. package/dist/tools/ear.d.ts +25 -0
  1193. package/dist/tools/ear.d.ts.map +1 -0
  1194. package/dist/tools/ear.js +43 -0
  1195. package/dist/tools/ear.js.map +1 -0
  1196. package/dist/tools/eye.d.ts +29 -0
  1197. package/dist/tools/eye.d.ts.map +1 -0
  1198. package/dist/tools/eye.js +104 -0
  1199. package/dist/tools/eye.js.map +1 -0
  1200. package/dist/tools/file.d.ts +164 -0
  1201. package/dist/tools/file.d.ts.map +1 -0
  1202. package/dist/tools/file.js +1638 -0
  1203. package/dist/tools/file.js.map +1 -0
  1204. package/dist/tools/generate-blueprint.d.ts +62 -0
  1205. package/dist/tools/generate-blueprint.d.ts.map +1 -0
  1206. package/dist/tools/generate-blueprint.js +141 -0
  1207. package/dist/tools/generate-blueprint.js.map +1 -0
  1208. package/dist/tools/generate-design.d.ts +27 -0
  1209. package/dist/tools/generate-design.d.ts.map +1 -0
  1210. package/dist/tools/generate-design.js +66 -0
  1211. package/dist/tools/generate-design.js.map +1 -0
  1212. package/dist/tools/goal.d.ts +56 -0
  1213. package/dist/tools/goal.d.ts.map +1 -0
  1214. package/dist/tools/goal.js +298 -0
  1215. package/dist/tools/goal.js.map +1 -0
  1216. package/dist/tools/index.d.ts +53 -0
  1217. package/dist/tools/index.d.ts.map +1 -0
  1218. package/dist/tools/index.js +183 -0
  1219. package/dist/tools/index.js.map +1 -0
  1220. package/dist/tools/mcp-manage.d.ts +32 -0
  1221. package/dist/tools/mcp-manage.d.ts.map +1 -0
  1222. package/dist/tools/mcp-manage.js +61 -0
  1223. package/dist/tools/mcp-manage.js.map +1 -0
  1224. package/dist/tools/mcp.d.ts +311 -0
  1225. package/dist/tools/mcp.d.ts.map +1 -0
  1226. package/dist/tools/mcp.js +1696 -0
  1227. package/dist/tools/mcp.js.map +1 -0
  1228. package/dist/tools/memory-search.d.ts +26 -0
  1229. package/dist/tools/memory-search.d.ts.map +1 -0
  1230. package/dist/tools/memory-search.js +89 -0
  1231. package/dist/tools/memory-search.js.map +1 -0
  1232. package/dist/tools/network-agent.d.ts +55 -0
  1233. package/dist/tools/network-agent.d.ts.map +1 -0
  1234. package/dist/tools/network-agent.js +349 -0
  1235. package/dist/tools/network-agent.js.map +1 -0
  1236. package/dist/tools/notebook-write.d.ts +23 -0
  1237. package/dist/tools/notebook-write.d.ts.map +1 -0
  1238. package/dist/tools/notebook-write.js +86 -0
  1239. package/dist/tools/notebook-write.js.map +1 -0
  1240. package/dist/tools/notebook.d.ts +46 -0
  1241. package/dist/tools/notebook.d.ts.map +1 -0
  1242. package/dist/tools/notebook.js +335 -0
  1243. package/dist/tools/notebook.js.map +1 -0
  1244. package/dist/tools/output-persistence.d.ts +73 -0
  1245. package/dist/tools/output-persistence.d.ts.map +1 -0
  1246. package/dist/tools/output-persistence.js +258 -0
  1247. package/dist/tools/output-persistence.js.map +1 -0
  1248. package/dist/tools/planmode.d.ts +73 -0
  1249. package/dist/tools/planmode.d.ts.map +1 -0
  1250. package/dist/tools/planmode.js +464 -0
  1251. package/dist/tools/planmode.js.map +1 -0
  1252. package/dist/tools/sandbox.d.ts +192 -0
  1253. package/dist/tools/sandbox.d.ts.map +1 -0
  1254. package/dist/tools/sandbox.js +932 -0
  1255. package/dist/tools/sandbox.js.map +1 -0
  1256. package/dist/tools/schedule.d.ts +65 -0
  1257. package/dist/tools/schedule.d.ts.map +1 -0
  1258. package/dist/tools/schedule.js +537 -0
  1259. package/dist/tools/schedule.js.map +1 -0
  1260. package/dist/tools/search.d.ts +48 -0
  1261. package/dist/tools/search.d.ts.map +1 -0
  1262. package/dist/tools/search.js +568 -0
  1263. package/dist/tools/search.js.map +1 -0
  1264. package/dist/tools/self-evolve.d.ts +53 -0
  1265. package/dist/tools/self-evolve.d.ts.map +1 -0
  1266. package/dist/tools/self-evolve.js +241 -0
  1267. package/dist/tools/self-evolve.js.map +1 -0
  1268. package/dist/tools/skill.d.ts +182 -0
  1269. package/dist/tools/skill.d.ts.map +1 -0
  1270. package/dist/tools/skill.js +1274 -0
  1271. package/dist/tools/skill.js.map +1 -0
  1272. package/dist/tools/start-lead-agent.d.ts +103 -0
  1273. package/dist/tools/start-lead-agent.d.ts.map +1 -0
  1274. package/dist/tools/start-lead-agent.js +243 -0
  1275. package/dist/tools/start-lead-agent.js.map +1 -0
  1276. package/dist/tools/structured-output.d.ts +80 -0
  1277. package/dist/tools/structured-output.d.ts.map +1 -0
  1278. package/dist/tools/structured-output.js +113 -0
  1279. package/dist/tools/structured-output.js.map +1 -0
  1280. package/dist/tools/submit-e2e-result.d.ts +57 -0
  1281. package/dist/tools/submit-e2e-result.d.ts.map +1 -0
  1282. package/dist/tools/submit-e2e-result.js +161 -0
  1283. package/dist/tools/submit-e2e-result.js.map +1 -0
  1284. package/dist/tools/submit-review.d.ts +42 -0
  1285. package/dist/tools/submit-review.d.ts.map +1 -0
  1286. package/dist/tools/submit-review.js +122 -0
  1287. package/dist/tools/submit-review.js.map +1 -0
  1288. package/dist/tools/task-status.d.ts +33 -0
  1289. package/dist/tools/task-status.d.ts.map +1 -0
  1290. package/dist/tools/task-status.js +86 -0
  1291. package/dist/tools/task-status.js.map +1 -0
  1292. package/dist/tools/task-storage.d.ts +165 -0
  1293. package/dist/tools/task-storage.d.ts.map +1 -0
  1294. package/dist/tools/task-storage.js +354 -0
  1295. package/dist/tools/task-storage.js.map +1 -0
  1296. package/dist/tools/task-v2.d.ts +38 -0
  1297. package/dist/tools/task-v2.d.ts.map +1 -0
  1298. package/dist/tools/task-v2.js +472 -0
  1299. package/dist/tools/task-v2.js.map +1 -0
  1300. package/dist/tools/team.d.ts +51 -0
  1301. package/dist/tools/team.d.ts.map +1 -0
  1302. package/dist/tools/team.js +441 -0
  1303. package/dist/tools/team.js.map +1 -0
  1304. package/dist/tools/todo.d.ts +30 -0
  1305. package/dist/tools/todo.d.ts.map +1 -0
  1306. package/dist/tools/todo.js +204 -0
  1307. package/dist/tools/todo.js.map +1 -0
  1308. package/dist/tools/trigger-e2e-test.d.ts +62 -0
  1309. package/dist/tools/trigger-e2e-test.d.ts.map +1 -0
  1310. package/dist/tools/trigger-e2e-test.js +228 -0
  1311. package/dist/tools/trigger-e2e-test.js.map +1 -0
  1312. package/dist/tools/update-task-plan.d.ts +43 -0
  1313. package/dist/tools/update-task-plan.d.ts.map +1 -0
  1314. package/dist/tools/update-task-plan.js +214 -0
  1315. package/dist/tools/update-task-plan.js.map +1 -0
  1316. package/dist/tools/web.d.ts +78 -0
  1317. package/dist/tools/web.d.ts.map +1 -0
  1318. package/dist/tools/web.js +535 -0
  1319. package/dist/tools/web.js.map +1 -0
  1320. package/dist/trust/index.d.ts +165 -0
  1321. package/dist/trust/index.d.ts.map +1 -0
  1322. package/dist/trust/index.js +408 -0
  1323. package/dist/trust/index.js.map +1 -0
  1324. package/dist/types/config.d.ts +1259 -0
  1325. package/dist/types/config.d.ts.map +1 -0
  1326. package/dist/types/config.js +245 -0
  1327. package/dist/types/config.js.map +1 -0
  1328. package/dist/types/errors.d.ts +389 -0
  1329. package/dist/types/errors.d.ts.map +1 -0
  1330. package/dist/types/errors.js +670 -0
  1331. package/dist/types/errors.js.map +1 -0
  1332. package/dist/types/index.d.ts +30 -0
  1333. package/dist/types/index.d.ts.map +1 -0
  1334. package/dist/types/index.js +26 -0
  1335. package/dist/types/index.js.map +1 -0
  1336. package/dist/types/messages.d.ts +761 -0
  1337. package/dist/types/messages.d.ts.map +1 -0
  1338. package/dist/types/messages.js +10 -0
  1339. package/dist/types/messages.js.map +1 -0
  1340. package/dist/types/results.d.ts +583 -0
  1341. package/dist/types/results.d.ts.map +1 -0
  1342. package/dist/types/results.js +111 -0
  1343. package/dist/types/results.js.map +1 -0
  1344. package/dist/types/tools.d.ts +734 -0
  1345. package/dist/types/tools.d.ts.map +1 -0
  1346. package/dist/types/tools.js +9 -0
  1347. package/dist/types/tools.js.map +1 -0
  1348. package/dist/ui/App.d.ts +17 -0
  1349. package/dist/ui/App.d.ts.map +1 -0
  1350. package/dist/ui/App.js +977 -0
  1351. package/dist/ui/App.js.map +1 -0
  1352. package/dist/ui/ChromeSettings.d.ts +18 -0
  1353. package/dist/ui/ChromeSettings.d.ts.map +1 -0
  1354. package/dist/ui/ChromeSettings.js +224 -0
  1355. package/dist/ui/ChromeSettings.js.map +1 -0
  1356. package/dist/ui/LoginSelector.d.ts +29 -0
  1357. package/dist/ui/LoginSelector.d.ts.map +1 -0
  1358. package/dist/ui/LoginSelector.js +168 -0
  1359. package/dist/ui/LoginSelector.js.map +1 -0
  1360. package/dist/ui/McpSettings.d.ts +29 -0
  1361. package/dist/ui/McpSettings.d.ts.map +1 -0
  1362. package/dist/ui/McpSettings.js +689 -0
  1363. package/dist/ui/McpSettings.js.map +1 -0
  1364. package/dist/ui/PluginsDialog.d.ts +21 -0
  1365. package/dist/ui/PluginsDialog.d.ts.map +1 -0
  1366. package/dist/ui/PluginsDialog.js +923 -0
  1367. package/dist/ui/PluginsDialog.js.map +1 -0
  1368. package/dist/ui/autocomplete/bash-history.d.ts +58 -0
  1369. package/dist/ui/autocomplete/bash-history.d.ts.map +1 -0
  1370. package/dist/ui/autocomplete/bash-history.js +196 -0
  1371. package/dist/ui/autocomplete/bash-history.js.map +1 -0
  1372. package/dist/ui/autocomplete/commands.d.ts +25 -0
  1373. package/dist/ui/autocomplete/commands.d.ts.map +1 -0
  1374. package/dist/ui/autocomplete/commands.js +535 -0
  1375. package/dist/ui/autocomplete/commands.js.map +1 -0
  1376. package/dist/ui/autocomplete/example.d.ts +10 -0
  1377. package/dist/ui/autocomplete/example.d.ts.map +1 -0
  1378. package/dist/ui/autocomplete/example.js +118 -0
  1379. package/dist/ui/autocomplete/example.js.map +1 -0
  1380. package/dist/ui/autocomplete/files.d.ts +27 -0
  1381. package/dist/ui/autocomplete/files.d.ts.map +1 -0
  1382. package/dist/ui/autocomplete/files.js +127 -0
  1383. package/dist/ui/autocomplete/files.js.map +1 -0
  1384. package/dist/ui/autocomplete/index.d.ts +25 -0
  1385. package/dist/ui/autocomplete/index.d.ts.map +1 -0
  1386. package/dist/ui/autocomplete/index.js +85 -0
  1387. package/dist/ui/autocomplete/index.js.map +1 -0
  1388. package/dist/ui/autocomplete/mentions.d.ts +29 -0
  1389. package/dist/ui/autocomplete/mentions.d.ts.map +1 -0
  1390. package/dist/ui/autocomplete/mentions.js +170 -0
  1391. package/dist/ui/autocomplete/mentions.js.map +1 -0
  1392. package/dist/ui/autocomplete/types.d.ts +58 -0
  1393. package/dist/ui/autocomplete/types.d.ts.map +1 -0
  1394. package/dist/ui/autocomplete/types.js +110 -0
  1395. package/dist/ui/autocomplete/types.js.map +1 -0
  1396. package/dist/ui/components/AxonMdImportDialog.d.ts +79 -0
  1397. package/dist/ui/components/AxonMdImportDialog.d.ts.map +1 -0
  1398. package/dist/ui/components/AxonMdImportDialog.js +420 -0
  1399. package/dist/ui/components/AxonMdImportDialog.js.map +1 -0
  1400. package/dist/ui/components/BackgroundTasksPanel.d.ts +16 -0
  1401. package/dist/ui/components/BackgroundTasksPanel.d.ts.map +1 -0
  1402. package/dist/ui/components/BackgroundTasksPanel.js +90 -0
  1403. package/dist/ui/components/BackgroundTasksPanel.js.map +1 -0
  1404. package/dist/ui/components/BreathingLight.d.ts +68 -0
  1405. package/dist/ui/components/BreathingLight.d.ts.map +1 -0
  1406. package/dist/ui/components/BreathingLight.js +110 -0
  1407. package/dist/ui/components/BreathingLight.js.map +1 -0
  1408. package/dist/ui/components/DiffView.d.ts +21 -0
  1409. package/dist/ui/components/DiffView.d.ts.map +1 -0
  1410. package/dist/ui/components/DiffView.js +387 -0
  1411. package/dist/ui/components/DiffView.js.map +1 -0
  1412. package/dist/ui/components/Header.d.ts +38 -0
  1413. package/dist/ui/components/Header.d.ts.map +1 -0
  1414. package/dist/ui/components/Header.js +163 -0
  1415. package/dist/ui/components/Header.js.map +1 -0
  1416. package/dist/ui/components/HistorySearch.d.ts +18 -0
  1417. package/dist/ui/components/HistorySearch.d.ts.map +1 -0
  1418. package/dist/ui/components/HistorySearch.js +59 -0
  1419. package/dist/ui/components/HistorySearch.js.map +1 -0
  1420. package/dist/ui/components/HiveConsole.d.ts +45 -0
  1421. package/dist/ui/components/HiveConsole.d.ts.map +1 -0
  1422. package/dist/ui/components/HiveConsole.js +166 -0
  1423. package/dist/ui/components/HiveConsole.js.map +1 -0
  1424. package/dist/ui/components/HiveConsole.test.d.ts +8 -0
  1425. package/dist/ui/components/HiveConsole.test.d.ts.map +1 -0
  1426. package/dist/ui/components/HiveConsole.test.js +330 -0
  1427. package/dist/ui/components/HiveConsole.test.js.map +1 -0
  1428. package/dist/ui/components/Input.d.ts +25 -0
  1429. package/dist/ui/components/Input.d.ts.map +1 -0
  1430. package/dist/ui/components/Input.js +1097 -0
  1431. package/dist/ui/components/Input.js.map +1 -0
  1432. package/dist/ui/components/Message.d.ts +18 -0
  1433. package/dist/ui/components/Message.d.ts.map +1 -0
  1434. package/dist/ui/components/Message.js +212 -0
  1435. package/dist/ui/components/Message.js.map +1 -0
  1436. package/dist/ui/components/MessageSelector.d.ts +66 -0
  1437. package/dist/ui/components/MessageSelector.d.ts.map +1 -0
  1438. package/dist/ui/components/MessageSelector.js +272 -0
  1439. package/dist/ui/components/MessageSelector.js.map +1 -0
  1440. package/dist/ui/components/ModelSelector.d.ts +27 -0
  1441. package/dist/ui/components/ModelSelector.d.ts.map +1 -0
  1442. package/dist/ui/components/ModelSelector.js +135 -0
  1443. package/dist/ui/components/ModelSelector.js.map +1 -0
  1444. package/dist/ui/components/PermissionPrompt.d.ts +44 -0
  1445. package/dist/ui/components/PermissionPrompt.d.ts.map +1 -0
  1446. package/dist/ui/components/PermissionPrompt.js +416 -0
  1447. package/dist/ui/components/PermissionPrompt.js.map +1 -0
  1448. package/dist/ui/components/ProgressBar.d.ts +61 -0
  1449. package/dist/ui/components/ProgressBar.d.ts.map +1 -0
  1450. package/dist/ui/components/ProgressBar.js +174 -0
  1451. package/dist/ui/components/ProgressBar.js.map +1 -0
  1452. package/dist/ui/components/ResumeSession.d.ts +27 -0
  1453. package/dist/ui/components/ResumeSession.d.ts.map +1 -0
  1454. package/dist/ui/components/ResumeSession.js +330 -0
  1455. package/dist/ui/components/ResumeSession.js.map +1 -0
  1456. package/dist/ui/components/SelectInput.d.ts +22 -0
  1457. package/dist/ui/components/SelectInput.d.ts.map +1 -0
  1458. package/dist/ui/components/SelectInput.js +84 -0
  1459. package/dist/ui/components/SelectInput.js.map +1 -0
  1460. package/dist/ui/components/ShortcutHelp.d.ts +12 -0
  1461. package/dist/ui/components/ShortcutHelp.d.ts.map +1 -0
  1462. package/dist/ui/components/ShortcutHelp.js +55 -0
  1463. package/dist/ui/components/ShortcutHelp.js.map +1 -0
  1464. package/dist/ui/components/SkillsDialog.d.ts +12 -0
  1465. package/dist/ui/components/SkillsDialog.d.ts.map +1 -0
  1466. package/dist/ui/components/SkillsDialog.js +239 -0
  1467. package/dist/ui/components/SkillsDialog.js.map +1 -0
  1468. package/dist/ui/components/Spinner.d.ts +81 -0
  1469. package/dist/ui/components/Spinner.d.ts.map +1 -0
  1470. package/dist/ui/components/Spinner.js +165 -0
  1471. package/dist/ui/components/Spinner.js.map +1 -0
  1472. package/dist/ui/components/StatsPanel.d.ts +20 -0
  1473. package/dist/ui/components/StatsPanel.d.ts.map +1 -0
  1474. package/dist/ui/components/StatsPanel.js +584 -0
  1475. package/dist/ui/components/StatsPanel.js.map +1 -0
  1476. package/dist/ui/components/StatusBar.d.ts +43 -0
  1477. package/dist/ui/components/StatusBar.d.ts.map +1 -0
  1478. package/dist/ui/components/StatusBar.js +160 -0
  1479. package/dist/ui/components/StatusBar.js.map +1 -0
  1480. package/dist/ui/components/StatusBar.test.d.ts +10 -0
  1481. package/dist/ui/components/StatusBar.test.d.ts.map +1 -0
  1482. package/dist/ui/components/StatusBar.test.js +70 -0
  1483. package/dist/ui/components/StatusBar.test.js.map +1 -0
  1484. package/dist/ui/components/TodoList.d.ts +25 -0
  1485. package/dist/ui/components/TodoList.d.ts.map +1 -0
  1486. package/dist/ui/components/TodoList.js +146 -0
  1487. package/dist/ui/components/TodoList.js.map +1 -0
  1488. package/dist/ui/components/ToolCall.d.ts +19 -0
  1489. package/dist/ui/components/ToolCall.d.ts.map +1 -0
  1490. package/dist/ui/components/ToolCall.js +196 -0
  1491. package/dist/ui/components/ToolCall.js.map +1 -0
  1492. package/dist/ui/components/TrustDialog.d.ts +35 -0
  1493. package/dist/ui/components/TrustDialog.d.ts.map +1 -0
  1494. package/dist/ui/components/TrustDialog.js +163 -0
  1495. package/dist/ui/components/TrustDialog.js.map +1 -0
  1496. package/dist/ui/components/UpdateNotification.d.ts +11 -0
  1497. package/dist/ui/components/UpdateNotification.d.ts.map +1 -0
  1498. package/dist/ui/components/UpdateNotification.js +66 -0
  1499. package/dist/ui/components/UpdateNotification.js.map +1 -0
  1500. package/dist/ui/components/WelcomeScreen.d.ts +22 -0
  1501. package/dist/ui/components/WelcomeScreen.d.ts.map +1 -0
  1502. package/dist/ui/components/WelcomeScreen.js +156 -0
  1503. package/dist/ui/components/WelcomeScreen.js.map +1 -0
  1504. package/dist/ui/components/index.d.ts +35 -0
  1505. package/dist/ui/components/index.d.ts.map +1 -0
  1506. package/dist/ui/components/index.js +25 -0
  1507. package/dist/ui/components/index.js.map +1 -0
  1508. package/dist/ui/hooks/index.d.ts +12 -0
  1509. package/dist/ui/hooks/index.d.ts.map +1 -0
  1510. package/dist/ui/hooks/index.js +9 -0
  1511. package/dist/ui/hooks/index.js.map +1 -0
  1512. package/dist/ui/hooks/useAutoScroll.d.ts +22 -0
  1513. package/dist/ui/hooks/useAutoScroll.d.ts.map +1 -0
  1514. package/dist/ui/hooks/useAutoScroll.js +46 -0
  1515. package/dist/ui/hooks/useAutoScroll.js.map +1 -0
  1516. package/dist/ui/hooks/useAxonMdImport.d.ts +57 -0
  1517. package/dist/ui/hooks/useAxonMdImport.d.ts.map +1 -0
  1518. package/dist/ui/hooks/useAxonMdImport.js +248 -0
  1519. package/dist/ui/hooks/useAxonMdImport.js.map +1 -0
  1520. package/dist/ui/hooks/useGlobalKeybindings.d.ts +60 -0
  1521. package/dist/ui/hooks/useGlobalKeybindings.d.ts.map +1 -0
  1522. package/dist/ui/hooks/useGlobalKeybindings.js +460 -0
  1523. package/dist/ui/hooks/useGlobalKeybindings.js.map +1 -0
  1524. package/dist/ui/hooks/useRewind.d.ts +44 -0
  1525. package/dist/ui/hooks/useRewind.d.ts.map +1 -0
  1526. package/dist/ui/hooks/useRewind.js +67 -0
  1527. package/dist/ui/hooks/useRewind.js.map +1 -0
  1528. package/dist/ui/hooks/useTerminalSize.d.ts +32 -0
  1529. package/dist/ui/hooks/useTerminalSize.d.ts.map +1 -0
  1530. package/dist/ui/hooks/useTerminalSize.js +70 -0
  1531. package/dist/ui/hooks/useTerminalSize.js.map +1 -0
  1532. package/dist/ui/index.d.ts +29 -0
  1533. package/dist/ui/index.d.ts.map +1 -0
  1534. package/dist/ui/index.js +42 -0
  1535. package/dist/ui/index.js.map +1 -0
  1536. package/dist/ui/ink-v2/dom-renderer.d.ts +58 -0
  1537. package/dist/ui/ink-v2/dom-renderer.d.ts.map +1 -0
  1538. package/dist/ui/ink-v2/dom-renderer.js +295 -0
  1539. package/dist/ui/ink-v2/dom-renderer.js.map +1 -0
  1540. package/dist/ui/ink-v2/frame.d.ts +25 -0
  1541. package/dist/ui/ink-v2/frame.d.ts.map +1 -0
  1542. package/dist/ui/ink-v2/frame.js +120 -0
  1543. package/dist/ui/ink-v2/frame.js.map +1 -0
  1544. package/dist/ui/ink-v2/index.d.ts +92 -0
  1545. package/dist/ui/ink-v2/index.d.ts.map +1 -0
  1546. package/dist/ui/ink-v2/index.js +185 -0
  1547. package/dist/ui/ink-v2/index.js.map +1 -0
  1548. package/dist/ui/ink-v2/output.d.ts +43 -0
  1549. package/dist/ui/ink-v2/output.d.ts.map +1 -0
  1550. package/dist/ui/ink-v2/output.js +154 -0
  1551. package/dist/ui/ink-v2/output.js.map +1 -0
  1552. package/dist/ui/ink-v2/renderer.d.ts +49 -0
  1553. package/dist/ui/ink-v2/renderer.d.ts.map +1 -0
  1554. package/dist/ui/ink-v2/renderer.js +411 -0
  1555. package/dist/ui/ink-v2/renderer.js.map +1 -0
  1556. package/dist/ui/ink-v2/screen.d.ts +65 -0
  1557. package/dist/ui/ink-v2/screen.d.ts.map +1 -0
  1558. package/dist/ui/ink-v2/screen.js +260 -0
  1559. package/dist/ui/ink-v2/screen.js.map +1 -0
  1560. package/dist/ui/ink-v2/style-pool.d.ts +28 -0
  1561. package/dist/ui/ink-v2/style-pool.d.ts.map +1 -0
  1562. package/dist/ui/ink-v2/style-pool.js +50 -0
  1563. package/dist/ui/ink-v2/style-pool.js.map +1 -0
  1564. package/dist/ui/ink-v2/types.d.ts +138 -0
  1565. package/dist/ui/ink-v2/types.d.ts.map +1 -0
  1566. package/dist/ui/ink-v2/types.js +11 -0
  1567. package/dist/ui/ink-v2/types.js.map +1 -0
  1568. package/dist/ui/markdown-renderer.d.ts +35 -0
  1569. package/dist/ui/markdown-renderer.d.ts.map +1 -0
  1570. package/dist/ui/markdown-renderer.js +369 -0
  1571. package/dist/ui/markdown-renderer.js.map +1 -0
  1572. package/dist/ui/spinner-verbs.d.ts +15 -0
  1573. package/dist/ui/spinner-verbs.d.ts.map +1 -0
  1574. package/dist/ui/spinner-verbs.js +75 -0
  1575. package/dist/ui/spinner-verbs.js.map +1 -0
  1576. package/dist/ui/utils/history-manager.d.ts +41 -0
  1577. package/dist/ui/utils/history-manager.d.ts.map +1 -0
  1578. package/dist/ui/utils/history-manager.js +109 -0
  1579. package/dist/ui/utils/history-manager.js.map +1 -0
  1580. package/dist/ui/utils/index.d.ts +9 -0
  1581. package/dist/ui/utils/index.d.ts.map +1 -0
  1582. package/dist/ui/utils/index.js +10 -0
  1583. package/dist/ui/utils/index.js.map +1 -0
  1584. package/dist/ui/utils/kitty-keyboard.d.ts +239 -0
  1585. package/dist/ui/utils/kitty-keyboard.d.ts.map +1 -0
  1586. package/dist/ui/utils/kitty-keyboard.js +341 -0
  1587. package/dist/ui/utils/kitty-keyboard.js.map +1 -0
  1588. package/dist/ui/utils/string-width.d.ts +36 -0
  1589. package/dist/ui/utils/string-width.d.ts.map +1 -0
  1590. package/dist/ui/utils/string-width.js +339 -0
  1591. package/dist/ui/utils/string-width.js.map +1 -0
  1592. package/dist/ui/utils/syntaxHighlight.d.ts +94 -0
  1593. package/dist/ui/utils/syntaxHighlight.d.ts.map +1 -0
  1594. package/dist/ui/utils/syntaxHighlight.js +415 -0
  1595. package/dist/ui/utils/syntaxHighlight.js.map +1 -0
  1596. package/dist/ui/utils/terminal.d.ts +145 -0
  1597. package/dist/ui/utils/terminal.d.ts.map +1 -0
  1598. package/dist/ui/utils/terminal.js +229 -0
  1599. package/dist/ui/utils/terminal.js.map +1 -0
  1600. package/dist/updater/index.d.ts +115 -0
  1601. package/dist/updater/index.d.ts.map +1 -0
  1602. package/dist/updater/index.js +546 -0
  1603. package/dist/updater/index.js.map +1 -0
  1604. package/dist/utils/AppError.d.ts +24 -0
  1605. package/dist/utils/AppError.d.ts.map +1 -0
  1606. package/dist/utils/AppError.js +33 -0
  1607. package/dist/utils/AppError.js.map +1 -0
  1608. package/dist/utils/AppError.test.d.ts +2 -0
  1609. package/dist/utils/AppError.test.d.ts.map +1 -0
  1610. package/dist/utils/AppError.test.js +257 -0
  1611. package/dist/utils/AppError.test.js.map +1 -0
  1612. package/dist/utils/attribution.d.ts +111 -0
  1613. package/dist/utils/attribution.d.ts.map +1 -0
  1614. package/dist/utils/attribution.js +219 -0
  1615. package/dist/utils/attribution.js.map +1 -0
  1616. package/dist/utils/editor.d.ts +19 -0
  1617. package/dist/utils/editor.d.ts.map +1 -0
  1618. package/dist/utils/editor.js +115 -0
  1619. package/dist/utils/editor.js.map +1 -0
  1620. package/dist/utils/env-check.d.ts +78 -0
  1621. package/dist/utils/env-check.d.ts.map +1 -0
  1622. package/dist/utils/env-check.js +114 -0
  1623. package/dist/utils/env-check.js.map +1 -0
  1624. package/dist/utils/error-watcher.d.ts +78 -0
  1625. package/dist/utils/error-watcher.d.ts.map +1 -0
  1626. package/dist/utils/error-watcher.js +355 -0
  1627. package/dist/utils/error-watcher.js.map +1 -0
  1628. package/dist/utils/git-helper.d.ts +55 -0
  1629. package/dist/utils/git-helper.d.ts.map +1 -0
  1630. package/dist/utils/git-helper.js +238 -0
  1631. package/dist/utils/git-helper.js.map +1 -0
  1632. package/dist/utils/index.d.ts +188 -0
  1633. package/dist/utils/index.d.ts.map +1 -0
  1634. package/dist/utils/index.js +472 -0
  1635. package/dist/utils/index.js.map +1 -0
  1636. package/dist/utils/logger.d.ts +117 -0
  1637. package/dist/utils/logger.d.ts.map +1 -0
  1638. package/dist/utils/logger.js +458 -0
  1639. package/dist/utils/logger.js.map +1 -0
  1640. package/dist/utils/package-manager.d.ts +134 -0
  1641. package/dist/utils/package-manager.d.ts.map +1 -0
  1642. package/dist/utils/package-manager.js +325 -0
  1643. package/dist/utils/package-manager.js.map +1 -0
  1644. package/dist/utils/platform.d.ts +283 -0
  1645. package/dist/utils/platform.d.ts.map +1 -0
  1646. package/dist/utils/platform.js +748 -0
  1647. package/dist/utils/platform.js.map +1 -0
  1648. package/dist/utils/pr-status.d.ts +50 -0
  1649. package/dist/utils/pr-status.d.ts.map +1 -0
  1650. package/dist/utils/pr-status.js +182 -0
  1651. package/dist/utils/pr-status.js.map +1 -0
  1652. package/dist/utils/retry.d.ts +86 -0
  1653. package/dist/utils/retry.d.ts.map +1 -0
  1654. package/dist/utils/retry.js +202 -0
  1655. package/dist/utils/retry.js.map +1 -0
  1656. package/dist/utils/temp-dir.d.ts +31 -0
  1657. package/dist/utils/temp-dir.d.ts.map +1 -0
  1658. package/dist/utils/temp-dir.js +141 -0
  1659. package/dist/utils/temp-dir.js.map +1 -0
  1660. package/dist/utils/terminal-setup.d.ts +31 -0
  1661. package/dist/utils/terminal-setup.d.ts.map +1 -0
  1662. package/dist/utils/terminal-setup.js +224 -0
  1663. package/dist/utils/terminal-setup.js.map +1 -0
  1664. package/dist/utils/terminal-tab.d.ts +15 -0
  1665. package/dist/utils/terminal-tab.d.ts.map +1 -0
  1666. package/dist/utils/terminal-tab.js +173 -0
  1667. package/dist/utils/terminal-tab.js.map +1 -0
  1668. package/dist/utils/token-estimate.d.ts +26 -0
  1669. package/dist/utils/token-estimate.d.ts.map +1 -0
  1670. package/dist/utils/token-estimate.js +62 -0
  1671. package/dist/utils/token-estimate.js.map +1 -0
  1672. package/dist/utils/truncated-buffer.d.ts +70 -0
  1673. package/dist/utils/truncated-buffer.d.ts.map +1 -0
  1674. package/dist/utils/truncated-buffer.js +124 -0
  1675. package/dist/utils/truncated-buffer.js.map +1 -0
  1676. package/dist/version.d.ts +30 -0
  1677. package/dist/version.d.ts.map +1 -0
  1678. package/dist/version.js +32 -0
  1679. package/dist/version.js.map +1 -0
  1680. package/dist/web/index.d.ts +7 -0
  1681. package/dist/web/index.d.ts.map +1 -0
  1682. package/dist/web/index.js +7 -0
  1683. package/dist/web/index.js.map +1 -0
  1684. package/dist/web/server/api-manager.d.ts +53 -0
  1685. package/dist/web/server/api-manager.d.ts.map +1 -0
  1686. package/dist/web/server/api-manager.js +271 -0
  1687. package/dist/web/server/api-manager.js.map +1 -0
  1688. package/dist/web/server/channels/adapters/discord.d.ts +41 -0
  1689. package/dist/web/server/channels/adapters/discord.d.ts.map +1 -0
  1690. package/dist/web/server/channels/adapters/discord.js +326 -0
  1691. package/dist/web/server/channels/adapters/discord.js.map +1 -0
  1692. package/dist/web/server/channels/adapters/feishu.d.ts +38 -0
  1693. package/dist/web/server/channels/adapters/feishu.d.ts.map +1 -0
  1694. package/dist/web/server/channels/adapters/feishu.js +442 -0
  1695. package/dist/web/server/channels/adapters/feishu.js.map +1 -0
  1696. package/dist/web/server/channels/adapters/slack-bot.d.ts +30 -0
  1697. package/dist/web/server/channels/adapters/slack-bot.d.ts.map +1 -0
  1698. package/dist/web/server/channels/adapters/slack-bot.js +226 -0
  1699. package/dist/web/server/channels/adapters/slack-bot.js.map +1 -0
  1700. package/dist/web/server/channels/adapters/telegram.d.ts +32 -0
  1701. package/dist/web/server/channels/adapters/telegram.d.ts.map +1 -0
  1702. package/dist/web/server/channels/adapters/telegram.js +261 -0
  1703. package/dist/web/server/channels/adapters/telegram.js.map +1 -0
  1704. package/dist/web/server/channels/adapters/whatsapp.d.ts +48 -0
  1705. package/dist/web/server/channels/adapters/whatsapp.d.ts.map +1 -0
  1706. package/dist/web/server/channels/adapters/whatsapp.js +316 -0
  1707. package/dist/web/server/channels/adapters/whatsapp.js.map +1 -0
  1708. package/dist/web/server/channels/bridge.d.ts +103 -0
  1709. package/dist/web/server/channels/bridge.d.ts.map +1 -0
  1710. package/dist/web/server/channels/bridge.js +728 -0
  1711. package/dist/web/server/channels/bridge.js.map +1 -0
  1712. package/dist/web/server/channels/index.d.ts +71 -0
  1713. package/dist/web/server/channels/index.d.ts.map +1 -0
  1714. package/dist/web/server/channels/index.js +307 -0
  1715. package/dist/web/server/channels/index.js.map +1 -0
  1716. package/dist/web/server/channels/types.d.ts +249 -0
  1717. package/dist/web/server/channels/types.d.ts.map +1 -0
  1718. package/dist/web/server/channels/types.js +8 -0
  1719. package/dist/web/server/channels/types.js.map +1 -0
  1720. package/dist/web/server/checkpoint-manager.d.ts +152 -0
  1721. package/dist/web/server/checkpoint-manager.d.ts.map +1 -0
  1722. package/dist/web/server/checkpoint-manager.js +359 -0
  1723. package/dist/web/server/checkpoint-manager.js.map +1 -0
  1724. package/dist/web/server/connectors/index.d.ts +115 -0
  1725. package/dist/web/server/connectors/index.d.ts.map +1 -0
  1726. package/dist/web/server/connectors/index.js +759 -0
  1727. package/dist/web/server/connectors/index.js.map +1 -0
  1728. package/dist/web/server/connectors/providers.d.ts +6 -0
  1729. package/dist/web/server/connectors/providers.d.ts.map +1 -0
  1730. package/dist/web/server/connectors/providers.js +238 -0
  1731. package/dist/web/server/connectors/providers.js.map +1 -0
  1732. package/dist/web/server/connectors/types.d.ts +79 -0
  1733. package/dist/web/server/connectors/types.d.ts.map +1 -0
  1734. package/dist/web/server/connectors/types.js +5 -0
  1735. package/dist/web/server/connectors/types.js.map +1 -0
  1736. package/dist/web/server/conversation.d.ts +593 -0
  1737. package/dist/web/server/conversation.d.ts.map +1 -0
  1738. package/dist/web/server/conversation.js +5170 -0
  1739. package/dist/web/server/conversation.js.map +1 -0
  1740. package/dist/web/server/database/swarm-logs.d.ts +150 -0
  1741. package/dist/web/server/database/swarm-logs.d.ts.map +1 -0
  1742. package/dist/web/server/database/swarm-logs.js +456 -0
  1743. package/dist/web/server/database/swarm-logs.js.map +1 -0
  1744. package/dist/web/server/doctor.d.ts +59 -0
  1745. package/dist/web/server/doctor.d.ts.map +1 -0
  1746. package/dist/web/server/doctor.js +666 -0
  1747. package/dist/web/server/doctor.js.map +1 -0
  1748. package/dist/web/server/evolve-state.d.ts +30 -0
  1749. package/dist/web/server/evolve-state.d.ts.map +1 -0
  1750. package/dist/web/server/evolve-state.js +54 -0
  1751. package/dist/web/server/evolve-state.js.map +1 -0
  1752. package/dist/web/server/git-manager.d.ts +373 -0
  1753. package/dist/web/server/git-manager.d.ts.map +1 -0
  1754. package/dist/web/server/git-manager.js +1556 -0
  1755. package/dist/web/server/git-manager.js.map +1 -0
  1756. package/dist/web/server/handlers/types.d.ts +95 -0
  1757. package/dist/web/server/handlers/types.d.ts.map +1 -0
  1758. package/dist/web/server/handlers/types.js +22 -0
  1759. package/dist/web/server/handlers/types.js.map +1 -0
  1760. package/dist/web/server/index.d.ts +41 -0
  1761. package/dist/web/server/index.d.ts.map +1 -0
  1762. package/dist/web/server/index.js +935 -0
  1763. package/dist/web/server/index.js.map +1 -0
  1764. package/dist/web/server/oauth-manager.d.ts +89 -0
  1765. package/dist/web/server/oauth-manager.d.ts.map +1 -0
  1766. package/dist/web/server/oauth-manager.js +361 -0
  1767. package/dist/web/server/oauth-manager.js.map +1 -0
  1768. package/dist/web/server/permission-handler.d.ts +170 -0
  1769. package/dist/web/server/permission-handler.d.ts.map +1 -0
  1770. package/dist/web/server/permission-handler.js +591 -0
  1771. package/dist/web/server/permission-handler.js.map +1 -0
  1772. package/dist/web/server/project-suggestions.d.ts +39 -0
  1773. package/dist/web/server/project-suggestions.d.ts.map +1 -0
  1774. package/dist/web/server/project-suggestions.js +365 -0
  1775. package/dist/web/server/project-suggestions.js.map +1 -0
  1776. package/dist/web/server/prompt-snippets.d.ts +92 -0
  1777. package/dist/web/server/prompt-snippets.d.ts.map +1 -0
  1778. package/dist/web/server/prompt-snippets.js +206 -0
  1779. package/dist/web/server/prompt-snippets.js.map +1 -0
  1780. package/dist/web/server/routes/__tests__/artifacts-api.test.d.ts +2 -0
  1781. package/dist/web/server/routes/__tests__/artifacts-api.test.d.ts.map +1 -0
  1782. package/dist/web/server/routes/__tests__/artifacts-api.test.js +572 -0
  1783. package/dist/web/server/routes/__tests__/artifacts-api.test.js.map +1 -0
  1784. package/dist/web/server/routes/agent-api.d.ts +7 -0
  1785. package/dist/web/server/routes/agent-api.d.ts.map +1 -0
  1786. package/dist/web/server/routes/agent-api.js +225 -0
  1787. package/dist/web/server/routes/agent-api.js.map +1 -0
  1788. package/dist/web/server/routes/ai-editor.d.ts +13 -0
  1789. package/dist/web/server/routes/ai-editor.d.ts.map +1 -0
  1790. package/dist/web/server/routes/ai-editor.js +2079 -0
  1791. package/dist/web/server/routes/ai-editor.js.map +1 -0
  1792. package/dist/web/server/routes/ai-hover.d.ts +10 -0
  1793. package/dist/web/server/routes/ai-hover.d.ts.map +1 -0
  1794. package/dist/web/server/routes/ai-hover.js +359 -0
  1795. package/dist/web/server/routes/ai-hover.js.map +1 -0
  1796. package/dist/web/server/routes/api.d.ts +7 -0
  1797. package/dist/web/server/routes/api.d.ts.map +1 -0
  1798. package/dist/web/server/routes/api.js +1200 -0
  1799. package/dist/web/server/routes/api.js.map +1 -0
  1800. package/dist/web/server/routes/artifacts-api.d.ts +15 -0
  1801. package/dist/web/server/routes/artifacts-api.d.ts.map +1 -0
  1802. package/dist/web/server/routes/artifacts-api.js +231 -0
  1803. package/dist/web/server/routes/artifacts-api.js.map +1 -0
  1804. package/dist/web/server/routes/auth.d.ts +7 -0
  1805. package/dist/web/server/routes/auth.d.ts.map +1 -0
  1806. package/dist/web/server/routes/auth.js +292 -0
  1807. package/dist/web/server/routes/auth.js.map +1 -0
  1808. package/dist/web/server/routes/autocomplete-api.d.ts +10 -0
  1809. package/dist/web/server/routes/autocomplete-api.d.ts.map +1 -0
  1810. package/dist/web/server/routes/autocomplete-api.js +302 -0
  1811. package/dist/web/server/routes/autocomplete-api.js.map +1 -0
  1812. package/dist/web/server/routes/axon-cloud.d.ts +7 -0
  1813. package/dist/web/server/routes/axon-cloud.d.ts.map +1 -0
  1814. package/dist/web/server/routes/axon-cloud.js +160 -0
  1815. package/dist/web/server/routes/axon-cloud.js.map +1 -0
  1816. package/dist/web/server/routes/blueprint-api.d.ts +459 -0
  1817. package/dist/web/server/routes/blueprint-api.d.ts.map +1 -0
  1818. package/dist/web/server/routes/blueprint-api.js +6057 -0
  1819. package/dist/web/server/routes/blueprint-api.js.map +1 -0
  1820. package/dist/web/server/routes/blueprint-requirement-api.d.ts +11 -0
  1821. package/dist/web/server/routes/blueprint-requirement-api.d.ts.map +1 -0
  1822. package/dist/web/server/routes/blueprint-requirement-api.js +91 -0
  1823. package/dist/web/server/routes/blueprint-requirement-api.js.map +1 -0
  1824. package/dist/web/server/routes/code-parser.d.ts +14 -0
  1825. package/dist/web/server/routes/code-parser.d.ts.map +1 -0
  1826. package/dist/web/server/routes/code-parser.js +191 -0
  1827. package/dist/web/server/routes/code-parser.js.map +1 -0
  1828. package/dist/web/server/routes/config-api.d.ts +14 -0
  1829. package/dist/web/server/routes/config-api.d.ts.map +1 -0
  1830. package/dist/web/server/routes/config-api.js +670 -0
  1831. package/dist/web/server/routes/config-api.js.map +1 -0
  1832. package/dist/web/server/routes/connectors-api.d.ts +7 -0
  1833. package/dist/web/server/routes/connectors-api.d.ts.map +1 -0
  1834. package/dist/web/server/routes/connectors-api.js +267 -0
  1835. package/dist/web/server/routes/connectors-api.js.map +1 -0
  1836. package/dist/web/server/routes/data-flow-analyzer.d.ts +60 -0
  1837. package/dist/web/server/routes/data-flow-analyzer.d.ts.map +1 -0
  1838. package/dist/web/server/routes/data-flow-analyzer.js +220 -0
  1839. package/dist/web/server/routes/data-flow-analyzer.js.map +1 -0
  1840. package/dist/web/server/routes/download-proxy.d.ts +16 -0
  1841. package/dist/web/server/routes/download-proxy.d.ts.map +1 -0
  1842. package/dist/web/server/routes/download-proxy.js +114 -0
  1843. package/dist/web/server/routes/download-proxy.js.map +1 -0
  1844. package/dist/web/server/routes/file-api.d.ts +18 -0
  1845. package/dist/web/server/routes/file-api.d.ts.map +1 -0
  1846. package/dist/web/server/routes/file-api.js +1514 -0
  1847. package/dist/web/server/routes/file-api.js.map +1 -0
  1848. package/dist/web/server/routes/lsp-analyzer.d.ts +76 -0
  1849. package/dist/web/server/routes/lsp-analyzer.d.ts.map +1 -0
  1850. package/dist/web/server/routes/lsp-analyzer.js +457 -0
  1851. package/dist/web/server/routes/lsp-analyzer.js.map +1 -0
  1852. package/dist/web/server/routes/lsp-api.d.ts +8 -0
  1853. package/dist/web/server/routes/lsp-api.d.ts.map +1 -0
  1854. package/dist/web/server/routes/lsp-api.js +283 -0
  1855. package/dist/web/server/routes/lsp-api.js.map +1 -0
  1856. package/dist/web/server/routes/mcp-cli-api.d.ts +19 -0
  1857. package/dist/web/server/routes/mcp-cli-api.d.ts.map +1 -0
  1858. package/dist/web/server/routes/mcp-cli-api.js +223 -0
  1859. package/dist/web/server/routes/mcp-cli-api.js.map +1 -0
  1860. package/dist/web/server/routes/network-api.d.ts +8 -0
  1861. package/dist/web/server/routes/network-api.d.ts.map +1 -0
  1862. package/dist/web/server/routes/network-api.js +367 -0
  1863. package/dist/web/server/routes/network-api.js.map +1 -0
  1864. package/dist/web/server/routes/notebook-api.d.ts +12 -0
  1865. package/dist/web/server/routes/notebook-api.d.ts.map +1 -0
  1866. package/dist/web/server/routes/notebook-api.js +164 -0
  1867. package/dist/web/server/routes/notebook-api.js.map +1 -0
  1868. package/dist/web/server/routes/port-forward.d.ts +20 -0
  1869. package/dist/web/server/routes/port-forward.d.ts.map +1 -0
  1870. package/dist/web/server/routes/port-forward.js +155 -0
  1871. package/dist/web/server/routes/port-forward.js.map +1 -0
  1872. package/dist/web/server/routes/project-map-generator.d.ts +126 -0
  1873. package/dist/web/server/routes/project-map-generator.d.ts.map +1 -0
  1874. package/dist/web/server/routes/project-map-generator.js +800 -0
  1875. package/dist/web/server/routes/project-map-generator.js.map +1 -0
  1876. package/dist/web/server/routes/schedule-api.d.ts +7 -0
  1877. package/dist/web/server/routes/schedule-api.d.ts.map +1 -0
  1878. package/dist/web/server/routes/schedule-api.js +324 -0
  1879. package/dist/web/server/routes/schedule-api.js.map +1 -0
  1880. package/dist/web/server/routes/symbol-classifier.d.ts +71 -0
  1881. package/dist/web/server/routes/symbol-classifier.d.ts.map +1 -0
  1882. package/dist/web/server/routes/symbol-classifier.js +190 -0
  1883. package/dist/web/server/routes/symbol-classifier.js.map +1 -0
  1884. package/dist/web/server/services/axon-cloud-service.d.ts +95 -0
  1885. package/dist/web/server/services/axon-cloud-service.d.ts.map +1 -0
  1886. package/dist/web/server/services/axon-cloud-service.js +210 -0
  1887. package/dist/web/server/services/axon-cloud-service.js.map +1 -0
  1888. package/dist/web/server/services/config-service.d.ts +436 -0
  1889. package/dist/web/server/services/config-service.d.ts.map +1 -0
  1890. package/dist/web/server/services/config-service.js +872 -0
  1891. package/dist/web/server/services/config-service.js.map +1 -0
  1892. package/dist/web/server/services/gemini-image-service.d.ts +80 -0
  1893. package/dist/web/server/services/gemini-image-service.d.ts.map +1 -0
  1894. package/dist/web/server/services/gemini-image-service.js +373 -0
  1895. package/dist/web/server/services/gemini-image-service.js.map +1 -0
  1896. package/dist/web/server/services/mode-presets.d.ts +40 -0
  1897. package/dist/web/server/services/mode-presets.d.ts.map +1 -0
  1898. package/dist/web/server/services/mode-presets.js +167 -0
  1899. package/dist/web/server/services/mode-presets.js.map +1 -0
  1900. package/dist/web/server/services/proxy-service.d.ts +59 -0
  1901. package/dist/web/server/services/proxy-service.d.ts.map +1 -0
  1902. package/dist/web/server/services/proxy-service.js +132 -0
  1903. package/dist/web/server/services/proxy-service.js.map +1 -0
  1904. package/dist/web/server/session-manager.d.ts +152 -0
  1905. package/dist/web/server/session-manager.d.ts.map +1 -0
  1906. package/dist/web/server/session-manager.js +421 -0
  1907. package/dist/web/server/session-manager.js.map +1 -0
  1908. package/dist/web/server/slash-commands.d.ts +46 -0
  1909. package/dist/web/server/slash-commands.d.ts.map +1 -0
  1910. package/dist/web/server/slash-commands.js +774 -0
  1911. package/dist/web/server/slash-commands.js.map +1 -0
  1912. package/dist/web/server/task-manager.d.ts +190 -0
  1913. package/dist/web/server/task-manager.d.ts.map +1 -0
  1914. package/dist/web/server/task-manager.js +596 -0
  1915. package/dist/web/server/task-manager.js.map +1 -0
  1916. package/dist/web/server/terminal-manager.d.ts +50 -0
  1917. package/dist/web/server/terminal-manager.d.ts.map +1 -0
  1918. package/dist/web/server/terminal-manager.js +274 -0
  1919. package/dist/web/server/terminal-manager.js.map +1 -0
  1920. package/dist/web/server/trpc/appRouter.d.ts +429 -0
  1921. package/dist/web/server/trpc/appRouter.d.ts.map +1 -0
  1922. package/dist/web/server/trpc/appRouter.js +18 -0
  1923. package/dist/web/server/trpc/appRouter.js.map +1 -0
  1924. package/dist/web/server/trpc/index.d.ts +29 -0
  1925. package/dist/web/server/trpc/index.d.ts.map +1 -0
  1926. package/dist/web/server/trpc/index.js +25 -0
  1927. package/dist/web/server/trpc/index.js.map +1 -0
  1928. package/dist/web/server/trpc/routers/blueprint.d.ts +162 -0
  1929. package/dist/web/server/trpc/routers/blueprint.d.ts.map +1 -0
  1930. package/dist/web/server/trpc/routers/blueprint.js +225 -0
  1931. package/dist/web/server/trpc/routers/blueprint.js.map +1 -0
  1932. package/dist/web/server/trpc/routers/coordinator.d.ts +247 -0
  1933. package/dist/web/server/trpc/routers/coordinator.d.ts.map +1 -0
  1934. package/dist/web/server/trpc/routers/coordinator.js +363 -0
  1935. package/dist/web/server/trpc/routers/coordinator.js.map +1 -0
  1936. package/dist/web/server/trpc/routers/execution.d.ts +106 -0
  1937. package/dist/web/server/trpc/routers/execution.d.ts.map +1 -0
  1938. package/dist/web/server/trpc/routers/execution.js +176 -0
  1939. package/dist/web/server/trpc/routers/execution.js.map +1 -0
  1940. package/dist/web/server/user-interaction.d.ts +61 -0
  1941. package/dist/web/server/user-interaction.d.ts.map +1 -0
  1942. package/dist/web/server/user-interaction.js +133 -0
  1943. package/dist/web/server/user-interaction.js.map +1 -0
  1944. package/dist/web/server/web-auth.d.ts +125 -0
  1945. package/dist/web/server/web-auth.d.ts.map +1 -0
  1946. package/dist/web/server/web-auth.js +364 -0
  1947. package/dist/web/server/web-auth.js.map +1 -0
  1948. package/dist/web/server/web-scheduler.d.ts +96 -0
  1949. package/dist/web/server/web-scheduler.d.ts.map +1 -0
  1950. package/dist/web/server/web-scheduler.js +762 -0
  1951. package/dist/web/server/web-scheduler.js.map +1 -0
  1952. package/dist/web/server/websocket-git-handlers.d.ts +107 -0
  1953. package/dist/web/server/websocket-git-handlers.d.ts.map +1 -0
  1954. package/dist/web/server/websocket-git-handlers.js +855 -0
  1955. package/dist/web/server/websocket-git-handlers.js.map +1 -0
  1956. package/dist/web/server/websocket.d.ts +18 -0
  1957. package/dist/web/server/websocket.d.ts.map +1 -0
  1958. package/dist/web/server/websocket.js +6158 -0
  1959. package/dist/web/server/websocket.js.map +1 -0
  1960. package/dist/web/shared/types.d.ts +4100 -0
  1961. package/dist/web/shared/types.d.ts.map +1 -0
  1962. package/dist/web/shared/types.js +123 -0
  1963. package/dist/web/shared/types.js.map +1 -0
  1964. package/dist/web-cli.d.ts +11 -0
  1965. package/dist/web-cli.d.ts.map +1 -0
  1966. package/dist/web-cli.js +196 -0
  1967. package/dist/web-cli.js.map +1 -0
  1968. package/dist/wizard/onboarding.d.ts +13 -0
  1969. package/dist/wizard/onboarding.d.ts.map +1 -0
  1970. package/dist/wizard/onboarding.js +196 -0
  1971. package/dist/wizard/onboarding.js.map +1 -0
  1972. package/electron/README.md +41 -0
  1973. package/electron/main.cjs +341 -0
  1974. package/package.json +236 -0
  1975. package/scripts/postinstall.js +110 -0
@@ -0,0 +1,2457 @@
1
+ /**
2
+ * 配置命令 - config, permissions, memory, hooks, model, init
3
+ */
4
+ import { commandRegistry } from './registry.js';
5
+ import * as fs from 'fs';
6
+ import * as path from 'path';
7
+ import * as os from 'os';
8
+ // 获取配置目录
9
+ const getConfigDir = () => path.join(os.homedir(), '.axon');
10
+ const getConfigFile = () => path.join(getConfigDir(), 'settings.json');
11
+ // 确保配置目录存在
12
+ const ensureConfigDir = () => {
13
+ const dir = getConfigDir();
14
+ if (!fs.existsSync(dir)) {
15
+ fs.mkdirSync(dir, { recursive: true });
16
+ }
17
+ };
18
+ // 读取配置
19
+ const readConfig = () => {
20
+ const configFile = getConfigFile();
21
+ if (fs.existsSync(configFile)) {
22
+ try {
23
+ return JSON.parse(fs.readFileSync(configFile, 'utf-8'));
24
+ }
25
+ catch {
26
+ return {};
27
+ }
28
+ }
29
+ return {};
30
+ };
31
+ // 写入配置
32
+ const writeConfig = (config) => {
33
+ try {
34
+ ensureConfigDir();
35
+ fs.writeFileSync(getConfigFile(), JSON.stringify(config, null, 2));
36
+ return true;
37
+ }
38
+ catch {
39
+ return false;
40
+ }
41
+ };
42
+ const CONFIG_ITEMS = [
43
+ {
44
+ key: 'model',
45
+ defaultValue: 'sonnet',
46
+ description: 'Default AI model to use',
47
+ type: 'string',
48
+ example: 'sonnet, opus, haiku'
49
+ },
50
+ {
51
+ key: 'theme',
52
+ defaultValue: 'dark',
53
+ description: 'Color theme for the interface',
54
+ type: 'string',
55
+ example: 'dark, light'
56
+ },
57
+ {
58
+ key: 'verbose',
59
+ defaultValue: false,
60
+ description: 'Enable verbose logging',
61
+ type: 'boolean',
62
+ example: 'true, false'
63
+ },
64
+ {
65
+ key: 'maxTokens',
66
+ defaultValue: 32000,
67
+ description: 'Maximum output tokens per request',
68
+ type: 'number',
69
+ example: '4096, 8192, 16384, 32000'
70
+ },
71
+ {
72
+ key: 'autoCompact',
73
+ defaultValue: true,
74
+ description: 'Automatically compact context when needed',
75
+ type: 'boolean',
76
+ example: 'true, false'
77
+ },
78
+ {
79
+ key: 'defaultPermissionMode',
80
+ defaultValue: 'default',
81
+ description: 'Default permission mode for tool execution',
82
+ type: 'string',
83
+ example: 'default, acceptEdits, bypassPermissions'
84
+ },
85
+ {
86
+ key: 'outputStyle',
87
+ defaultValue: 'default',
88
+ description: 'AI output style preference',
89
+ type: 'string',
90
+ example: 'default, concise, detailed, code-first'
91
+ },
92
+ {
93
+ key: 'mcpServers',
94
+ defaultValue: {},
95
+ description: 'MCP server configurations',
96
+ type: 'object',
97
+ example: '{"server1": {...}}'
98
+ },
99
+ {
100
+ key: 'hooks',
101
+ defaultValue: {},
102
+ description: 'Hook configurations for automation',
103
+ type: 'object',
104
+ example: '{"PreToolUse": [...]}'
105
+ },
106
+ {
107
+ key: 'allowedTools',
108
+ defaultValue: [],
109
+ description: 'List of explicitly allowed tools',
110
+ type: 'array',
111
+ example: '["Bash", "Read", "Write"]'
112
+ },
113
+ {
114
+ key: 'disallowedTools',
115
+ defaultValue: [],
116
+ description: 'List of explicitly disallowed tools',
117
+ type: 'array',
118
+ example: '["WebSearch", "WebFetch"]'
119
+ }
120
+ ];
121
+ // /config - 配置管理 (官方风格 - 打开配置面板)
122
+ export const configCommand = {
123
+ name: 'config',
124
+ aliases: ['settings'],
125
+ description: 'Manage Axon configuration settings',
126
+ usage: '/config [get <key>|set <key> <value>|reset [key]|list]',
127
+ category: 'config',
128
+ execute: (ctx) => {
129
+ const { args } = ctx;
130
+ const configFile = getConfigFile();
131
+ let config = readConfig();
132
+ // 无参数时显示交互式配置面板信息
133
+ if (args.length === 0) {
134
+ const configInfo = `╭─ Configuration ─────────────────────────────────────╮
135
+ │ │
136
+ │ Settings Location: │
137
+ │ ~/.axon/settings.json │
138
+ │ │
139
+ │ Current Settings: │
140
+ │ model ${(config.model || 'sonnet').toString().padEnd(28)} │
141
+ │ theme ${(config.theme || 'dark').toString().padEnd(28)} │
142
+ │ verbose ${(config.verbose ?? false).toString().padEnd(28)} │
143
+ │ maxTokens ${(config.maxTokens || 32000).toString().padEnd(28)} │
144
+ │ autoCompact ${(config.autoCompact ?? true).toString().padEnd(28)} │
145
+ │ defaultPermission ${(config.defaultPermissionMode || 'default').toString().padEnd(28)} │
146
+ │ outputStyle ${(config.outputStyle || 'default').toString().padEnd(28)} │
147
+ │ │
148
+ │ Commands: │
149
+ │ /config Show this panel │
150
+ │ /config list List all settings │
151
+ │ /config search <term> Search settings │
152
+ │ /config get <key> View a setting │
153
+ │ /config set <key> <value> Set a value │
154
+ │ /config reset Reset all settings │
155
+ │ /config reset <key> Reset one setting │
156
+ │ │
157
+ │ Quick Settings: │
158
+ │ /theme Change color theme │
159
+ │ /model Switch AI model │
160
+ │ /vim Toggle Vim mode │
161
+ │ │
162
+ │ Examples: │
163
+ │ /config get model │
164
+ │ /config set maxTokens 16384 │
165
+ │ /config set theme light │
166
+ │ /config reset model │
167
+ │ │
168
+ ╰─────────────────────────────────────────────────────╯`;
169
+ ctx.ui.addMessage('assistant', configInfo);
170
+ return { success: true };
171
+ }
172
+ const action = args[0].toLowerCase();
173
+ // /config list - 列出所有可配置项
174
+ if (action === 'list') {
175
+ let listInfo = `╭─ Available Configuration Settings ─────────────────╮\n`;
176
+ listInfo += `│ │\n`;
177
+ for (const item of CONFIG_ITEMS) {
178
+ const currentValue = config[item.key] ?? item.defaultValue;
179
+ const valueStr = typeof currentValue === 'object'
180
+ ? JSON.stringify(currentValue).substring(0, 20) + '...'
181
+ : currentValue.toString();
182
+ listInfo += `│ ${item.key.padEnd(20)} │\n`;
183
+ listInfo += `│ Type: ${item.type.padEnd(36)} │\n`;
184
+ listInfo += `│ Current: ${valueStr.padEnd(36)} │\n`;
185
+ listInfo += `│ Default: ${item.defaultValue.toString().padEnd(36)} │\n`;
186
+ listInfo += `│ ${item.description.padEnd(44)} │\n`;
187
+ if (item.example) {
188
+ listInfo += `│ Examples: ${item.example.substring(0, 34).padEnd(34)} │\n`;
189
+ }
190
+ if (item !== CONFIG_ITEMS[CONFIG_ITEMS.length - 1]) {
191
+ listInfo += `│ │\n`;
192
+ }
193
+ }
194
+ listInfo += `│ │\n`;
195
+ listInfo += `│ Usage: │\n`;
196
+ listInfo += `│ /config get <key> View a setting │\n`;
197
+ listInfo += `│ /config set <key> <value> Set a value │\n`;
198
+ listInfo += `│ /config reset <key> Reset to default │\n`;
199
+ listInfo += `│ │\n`;
200
+ listInfo += `╰────────────────────────────────────────────────────╯`;
201
+ ctx.ui.addMessage('assistant', listInfo);
202
+ return { success: true };
203
+ }
204
+ // /config search <term> - 搜索配置项 (v2.1.6+)
205
+ if (action === 'search') {
206
+ const searchTerm = args.slice(1).join(' ').toLowerCase().trim();
207
+ if (!searchTerm) {
208
+ ctx.ui.addMessage('assistant', `Usage: /config search <term>
209
+
210
+ Search through all configuration settings by key, description, or value.
211
+
212
+ Examples:
213
+ /config search model
214
+ /config search token
215
+ /config search theme`);
216
+ return { success: false };
217
+ }
218
+ // 搜索匹配的配置项
219
+ const matchedItems = CONFIG_ITEMS.filter(item => {
220
+ const currentValue = config[item.key] ?? item.defaultValue;
221
+ const valueStr = typeof currentValue === 'object'
222
+ ? JSON.stringify(currentValue)
223
+ : String(currentValue);
224
+ return (item.key.toLowerCase().includes(searchTerm) ||
225
+ item.description.toLowerCase().includes(searchTerm) ||
226
+ valueStr.toLowerCase().includes(searchTerm) ||
227
+ (item.example && item.example.toLowerCase().includes(searchTerm)));
228
+ });
229
+ if (matchedItems.length === 0) {
230
+ ctx.ui.addMessage('assistant', `No settings match "${searchTerm}"
231
+
232
+ Try a different search term, or use /config list to see all available settings.`);
233
+ return { success: true };
234
+ }
235
+ let searchResult = `╭─ Search Results for "${searchTerm}" ─────────────────╮\n`;
236
+ searchResult += `│ Found ${matchedItems.length} matching setting${matchedItems.length > 1 ? 's' : ''} │\n`;
237
+ searchResult += `│ │\n`;
238
+ for (const item of matchedItems) {
239
+ const currentValue = config[item.key] ?? item.defaultValue;
240
+ const valueStr = typeof currentValue === 'object'
241
+ ? JSON.stringify(currentValue).substring(0, 20) + '...'
242
+ : currentValue.toString();
243
+ // 高亮匹配的部分
244
+ searchResult += `│ ${item.key.padEnd(20)} │\n`;
245
+ searchResult += `│ Current: ${valueStr.padEnd(36)} │\n`;
246
+ searchResult += `│ ${item.description.substring(0, 44).padEnd(44)} │\n`;
247
+ if (item !== matchedItems[matchedItems.length - 1]) {
248
+ searchResult += `│ │\n`;
249
+ }
250
+ }
251
+ searchResult += `│ │\n`;
252
+ searchResult += `│ Use /config get <key> to view full details │\n`;
253
+ searchResult += `╰────────────────────────────────────────────────────╯`;
254
+ ctx.ui.addMessage('assistant', searchResult);
255
+ return { success: true };
256
+ }
257
+ // /config get <key> - 获取特定配置
258
+ if (action === 'get') {
259
+ if (args.length < 2) {
260
+ ctx.ui.addMessage('assistant', `Usage: /config get <key>
261
+
262
+ Available keys:
263
+ ${CONFIG_ITEMS.map(item => ` • ${item.key.padEnd(20)} - ${item.description}`).join('\n')}
264
+
265
+ Example: /config get model`);
266
+ return { success: false };
267
+ }
268
+ const key = args[1];
269
+ const configItem = CONFIG_ITEMS.find(item => item.key === key);
270
+ const value = config[key];
271
+ if (value !== undefined) {
272
+ const formattedValue = typeof value === 'object'
273
+ ? JSON.stringify(value, null, 2)
274
+ : value;
275
+ let info = `Configuration: ${key}\n\n`;
276
+ info += `Current Value:\n${formattedValue}\n\n`;
277
+ if (configItem) {
278
+ info += `Type: ${configItem.type}\n`;
279
+ info += `Default: ${configItem.defaultValue}\n`;
280
+ info += `Description: ${configItem.description}\n`;
281
+ if (configItem.example) {
282
+ info += `\nExamples: ${configItem.example}`;
283
+ }
284
+ }
285
+ ctx.ui.addMessage('assistant', info);
286
+ }
287
+ else {
288
+ const defaultValue = configItem?.defaultValue;
289
+ let info = `Setting '${key}' is not set.\n\n`;
290
+ if (configItem) {
291
+ info += `Default Value: ${defaultValue}\n`;
292
+ info += `Type: ${configItem.type}\n`;
293
+ info += `Description: ${configItem.description}\n`;
294
+ if (configItem.example) {
295
+ info += `\nExamples: ${configItem.example}\n`;
296
+ }
297
+ info += `\nTo set this value:\n /config set ${key} <value>`;
298
+ }
299
+ else {
300
+ info += `Available settings:\n${CONFIG_ITEMS.map(item => ` • ${item.key}`).join('\n')}`;
301
+ }
302
+ ctx.ui.addMessage('assistant', info);
303
+ }
304
+ return { success: true };
305
+ }
306
+ // /config set <key> <value> - 设置配置
307
+ if (action === 'set') {
308
+ if (args.length < 3) {
309
+ ctx.ui.addMessage('assistant', `Usage: /config set <key> <value>
310
+
311
+ Available keys:
312
+ ${CONFIG_ITEMS.map(item => ` • ${item.key.padEnd(20)} - ${item.description}`).join('\n')}
313
+
314
+ Examples:
315
+ /config set model opus
316
+ /config set maxTokens 16384
317
+ /config set verbose true
318
+ /config set theme light`);
319
+ return { success: false };
320
+ }
321
+ const key = args[1];
322
+ let value = args.slice(2).join(' ');
323
+ // 查找配置项定义
324
+ const configItem = CONFIG_ITEMS.find(item => item.key === key);
325
+ // 尝试解析 JSON 值
326
+ try {
327
+ if (value === 'true')
328
+ value = true;
329
+ else if (value === 'false')
330
+ value = false;
331
+ else if (!isNaN(Number(value)) && configItem?.type === 'number')
332
+ value = Number(value);
333
+ else if (value.startsWith('{') || value.startsWith('[')) {
334
+ value = JSON.parse(value);
335
+ }
336
+ }
337
+ catch {
338
+ // 保持为字符串
339
+ }
340
+ // 类型验证
341
+ if (configItem) {
342
+ const actualType = Array.isArray(value) ? 'array' : typeof value;
343
+ if (configItem.type === 'object' && actualType !== 'object') {
344
+ ctx.ui.addMessage('assistant', `Error: '${key}' expects ${configItem.type}, got ${actualType}
345
+
346
+ Expected format: JSON object
347
+ Example: /config set ${key} '{"key": "value"}'`);
348
+ return { success: false };
349
+ }
350
+ }
351
+ config[key] = value;
352
+ if (writeConfig(config)) {
353
+ const formattedValue = typeof value === 'object'
354
+ ? JSON.stringify(value, null, 2)
355
+ : value;
356
+ let successMsg = `✓ Configuration updated\n\n`;
357
+ successMsg += `Setting: ${key}\n`;
358
+ successMsg += `Value: ${formattedValue}\n\n`;
359
+ if (configItem) {
360
+ successMsg += `Type: ${configItem.type}\n`;
361
+ successMsg += `Description: ${configItem.description}\n\n`;
362
+ }
363
+ successMsg += `Saved to: ${configFile}\n\n`;
364
+ successMsg += `Note: Some settings may require restart to take effect.`;
365
+ ctx.ui.addMessage('assistant', successMsg);
366
+ ctx.ui.addActivity(`Updated config: ${key}`);
367
+ return { success: true };
368
+ }
369
+ else {
370
+ ctx.ui.addMessage('assistant', `Failed to save configuration.`);
371
+ return { success: false };
372
+ }
373
+ }
374
+ // /config reset [key] - 重置配置
375
+ if (action === 'reset') {
376
+ // 重置单个配置项
377
+ if (args.length === 2) {
378
+ const key = args[1];
379
+ const configItem = CONFIG_ITEMS.find(item => item.key === key);
380
+ if (!configItem) {
381
+ ctx.ui.addMessage('assistant', `Unknown setting: ${key}
382
+
383
+ Available settings:
384
+ ${CONFIG_ITEMS.map(item => ` • ${item.key}`).join('\n')}
385
+
386
+ Use '/config list' to see all settings.`);
387
+ return { success: false };
388
+ }
389
+ // 删除配置项(恢复为默认值)
390
+ if (config[key] !== undefined) {
391
+ delete config[key];
392
+ if (writeConfig(config)) {
393
+ ctx.ui.addMessage('assistant', `✓ Reset '${key}' to default value
394
+
395
+ Setting: ${key}
396
+ Default Value: ${configItem.defaultValue}
397
+ Description: ${configItem.description}
398
+
399
+ Configuration saved to: ${configFile}
400
+ Restart Axon to apply changes.`);
401
+ ctx.ui.addActivity(`Reset config: ${key}`);
402
+ return { success: true };
403
+ }
404
+ else {
405
+ ctx.ui.addMessage('assistant', `Failed to reset configuration.`);
406
+ return { success: false };
407
+ }
408
+ }
409
+ else {
410
+ ctx.ui.addMessage('assistant', `Setting '${key}' is already at default value.
411
+
412
+ Current Value: ${configItem.defaultValue}`);
413
+ return { success: true };
414
+ }
415
+ }
416
+ // 重置所有配置
417
+ if (writeConfig({})) {
418
+ ctx.ui.addMessage('assistant', `✓ All configuration reset to defaults
419
+
420
+ All settings have been cleared and will use default values:
421
+ ${CONFIG_ITEMS.map(item => ` • ${item.key.padEnd(20)} = ${item.defaultValue}`).join('\n')}
422
+
423
+ Settings file: ${configFile}
424
+
425
+ Restart Axon to apply all changes.`);
426
+ ctx.ui.addActivity('Configuration reset');
427
+ return { success: true };
428
+ }
429
+ else {
430
+ ctx.ui.addMessage('assistant', 'Failed to reset configuration.');
431
+ return { success: false };
432
+ }
433
+ }
434
+ // 兼容旧的无 action 格式
435
+ // /config <key> - 查看配置
436
+ if (args.length === 1) {
437
+ const key = args[0];
438
+ const configItem = CONFIG_ITEMS.find(item => item.key === key);
439
+ const value = config[key];
440
+ if (value !== undefined) {
441
+ const formattedValue = typeof value === 'object'
442
+ ? JSON.stringify(value, null, 2)
443
+ : value;
444
+ let info = `Configuration: ${key}\n\n`;
445
+ info += `Current Value:\n${formattedValue}\n\n`;
446
+ if (configItem) {
447
+ info += `Type: ${configItem.type}\n`;
448
+ info += `Default: ${configItem.defaultValue}\n`;
449
+ info += `Description: ${configItem.description}`;
450
+ }
451
+ ctx.ui.addMessage('assistant', info);
452
+ }
453
+ else {
454
+ ctx.ui.addMessage('assistant', `Setting '${key}' is not set.
455
+
456
+ Available settings:
457
+ ${CONFIG_ITEMS.map(item => ` • ${item.key.padEnd(20)} - ${item.description}`).join('\n')}
458
+
459
+ Use '/config get ${key}' to see details or '/config list' for all settings.`);
460
+ }
461
+ return { success: true };
462
+ }
463
+ // /config <key> <value> - 设置配置(兼容旧格式)
464
+ if (args.length >= 2 && !['get', 'set', 'reset', 'list'].includes(action)) {
465
+ const key = args[0];
466
+ let value = args.slice(1).join(' ');
467
+ // 查找配置项定义
468
+ const configItem = CONFIG_ITEMS.find(item => item.key === key);
469
+ // 尝试解析 JSON 值
470
+ try {
471
+ if (value === 'true')
472
+ value = true;
473
+ else if (value === 'false')
474
+ value = false;
475
+ else if (!isNaN(Number(value)) && configItem?.type === 'number')
476
+ value = Number(value);
477
+ else if (value.startsWith('{') || value.startsWith('[')) {
478
+ value = JSON.parse(value);
479
+ }
480
+ }
481
+ catch {
482
+ // 保持为字符串
483
+ }
484
+ config[key] = value;
485
+ if (writeConfig(config)) {
486
+ ctx.ui.addMessage('assistant', `✓ Set ${key} = ${JSON.stringify(value)}
487
+
488
+ Configuration saved to: ${configFile}
489
+ Some settings may require restart to take effect.`);
490
+ ctx.ui.addActivity(`Updated config: ${key}`);
491
+ return { success: true };
492
+ }
493
+ else {
494
+ ctx.ui.addMessage('assistant', `Failed to save configuration.`);
495
+ return { success: false };
496
+ }
497
+ }
498
+ // 未知操作
499
+ ctx.ui.addMessage('assistant', `Unknown command format.
500
+
501
+ Usage:
502
+ /config Show configuration panel
503
+ /config list List all available settings
504
+ /config get <key> View a specific setting
505
+ /config set <key> <value> Set a configuration value
506
+ /config reset Reset all settings to defaults
507
+ /config reset <key> Reset a specific setting to default
508
+
509
+ Examples:
510
+ /config get model
511
+ /config set maxTokens 16384
512
+ /config reset theme
513
+
514
+ Use '/config list' to see all available settings.`);
515
+ return { success: false };
516
+ },
517
+ };
518
+ // /permissions - 权限管理(基于官方源码完善)
519
+ export const permissionsCommand = {
520
+ name: 'permissions',
521
+ aliases: ['perms'],
522
+ description: 'View or modify tool permissions',
523
+ usage: '/permissions [mode <mode-name>|allow <tool>|deny <tool>|reset]',
524
+ category: 'config',
525
+ execute: (ctx) => {
526
+ const { args } = ctx;
527
+ const config = readConfig();
528
+ // 获取当前设置
529
+ const currentMode = config.permissionMode || 'default';
530
+ const allowedTools = config.allowedTools || [];
531
+ const disallowedTools = config.disallowedTools || [];
532
+ // 无参数时显示当前权限设置
533
+ if (args.length === 0) {
534
+ // 格式化工具列表
535
+ const formatToolList = (tools) => {
536
+ if (!tools)
537
+ return '(none)';
538
+ if (typeof tools === 'string') {
539
+ return tools.split(',').map(t => t.trim()).filter(Boolean).join(', ') || '(none)';
540
+ }
541
+ if (Array.isArray(tools)) {
542
+ return tools.length > 0 ? tools.join(', ') : '(none)';
543
+ }
544
+ return '(none)';
545
+ };
546
+ const permissionsInfo = `╭─ Permission Settings ──────────────────────────────╮
547
+ │ │
548
+ │ Current Mode: ${currentMode.padEnd(38)} │
549
+ │ │
550
+ │ Permission Modes: │
551
+ │ default - Interactive (ask each time) │
552
+ │ acceptEdits - Auto-accept file edits │
553
+ │ bypassPermissions - Skip all permission checks │
554
+ │ plan - Plan-only (no execution) │
555
+ │ dontAsk - Auto-accept all actions │
556
+ │ │
557
+ │ Allowed Tools: │
558
+ │ ${formatToolList(allowedTools).padEnd(48)} │
559
+ │ │
560
+ │ Disallowed Tools: │
561
+ │ ${formatToolList(disallowedTools).padEnd(48)} │
562
+ │ │
563
+ │ Commands: │
564
+ │ /permissions mode <name> - Set permission mode │
565
+ │ /permissions allow <tool> - Allow a tool │
566
+ │ /permissions deny <tool> - Deny a tool │
567
+ │ /permissions reset - Reset to defaults │
568
+ │ │
569
+ │ Command Line Flags: │
570
+ │ --permission-mode <mode> │
571
+ │ --allowedTools "Tool1,Tool2" │
572
+ │ --disallowedTools "Tool1,Tool2" │
573
+ │ --dangerously-skip-permissions │
574
+ │ │
575
+ ╰─────────────────────────────────────────────────────╯`;
576
+ ctx.ui.addMessage('assistant', permissionsInfo);
577
+ return { success: true };
578
+ }
579
+ const action = args[0].toLowerCase();
580
+ // 设置权限模式
581
+ if (action === 'mode') {
582
+ if (args.length < 2) {
583
+ ctx.ui.addMessage('assistant', `Usage: /permissions mode <mode-name>
584
+
585
+ Available modes:
586
+ default - Interactive mode (ask before each action)
587
+ acceptEdits - Auto-accept file edits (Write, Edit, MultiEdit)
588
+ bypassPermissions - Bypass all permission checks (use with caution!)
589
+ plan - Plan-only mode (no tool execution)
590
+ dontAsk - Auto-accept all actions (same as bypassPermissions)
591
+
592
+ Current mode: ${currentMode}
593
+
594
+ Example: /permissions mode acceptEdits`);
595
+ return { success: false };
596
+ }
597
+ const mode = args[1].toLowerCase();
598
+ const validModes = ['default', 'acceptedits', 'bypasspermissions', 'plan', 'dontask'];
599
+ if (!validModes.includes(mode)) {
600
+ ctx.ui.addMessage('assistant', `Invalid permission mode: ${mode}
601
+
602
+ Valid modes: default, acceptEdits, bypassPermissions, plan, dontAsk`);
603
+ return { success: false };
604
+ }
605
+ // 保存配置
606
+ config.permissionMode = mode;
607
+ if (writeConfig(config)) {
608
+ ctx.ui.addMessage('assistant', `✓ Permission mode changed to: ${mode}
609
+
610
+ ${mode === 'bypasspermissions' || mode === 'dontask' ? '⚠️ WARNING: This mode will execute all actions without asking!\nOnly use in trusted environments or sandboxes.\n\n' : ''}Settings saved to: ${getConfigFile()}
611
+ Restart Axon to apply the new permission mode.`);
612
+ ctx.ui.addActivity(`Changed permission mode to: ${mode}`);
613
+ return { success: true };
614
+ }
615
+ else {
616
+ ctx.ui.addMessage('assistant', 'Failed to save permission mode configuration.');
617
+ return { success: false };
618
+ }
619
+ }
620
+ // 允许工具
621
+ if (action === 'allow') {
622
+ if (args.length < 2) {
623
+ ctx.ui.addMessage('assistant', `Usage: /permissions allow <tool-name>
624
+
625
+ Available tools:
626
+ Bash, Read, Write, Edit, MultiEdit, Glob, Grep,
627
+ WebFetch, WebSearch, TodoWrite, Task, NotebookEdit,
628
+ MCP tools, etc.
629
+
630
+ You can also use patterns:
631
+ Bash(git:*) - Allow only git commands in Bash
632
+ Bash(npm:*) - Allow only npm commands in Bash
633
+
634
+ Example: /permissions allow Bash`);
635
+ return { success: false };
636
+ }
637
+ const toolName = args.slice(1).join(' ');
638
+ const currentAllowed = Array.isArray(config.allowedTools)
639
+ ? config.allowedTools
640
+ : (config.allowedTools ? String(config.allowedTools).split(',').map(t => t.trim()) : []);
641
+ if (!currentAllowed.includes(toolName)) {
642
+ currentAllowed.push(toolName);
643
+ config.allowedTools = currentAllowed;
644
+ if (writeConfig(config)) {
645
+ ctx.ui.addMessage('assistant', `✓ Tool allowed: ${toolName}
646
+
647
+ Current allowed tools: ${currentAllowed.join(', ')}
648
+
649
+ Settings saved to: ${getConfigFile()}
650
+ Restart Axon to apply changes.`);
651
+ ctx.ui.addActivity(`Allowed tool: ${toolName}`);
652
+ return { success: true };
653
+ }
654
+ else {
655
+ ctx.ui.addMessage('assistant', 'Failed to save configuration.');
656
+ return { success: false };
657
+ }
658
+ }
659
+ else {
660
+ ctx.ui.addMessage('assistant', `Tool '${toolName}' is already in the allowed list.`);
661
+ return { success: true };
662
+ }
663
+ }
664
+ // 禁止工具
665
+ if (action === 'deny') {
666
+ if (args.length < 2) {
667
+ ctx.ui.addMessage('assistant', `Usage: /permissions deny <tool-name>
668
+
669
+ This will add the tool to the disallowed list.
670
+
671
+ Available tools:
672
+ Bash, Read, Write, Edit, MultiEdit, Glob, Grep,
673
+ WebFetch, WebSearch, TodoWrite, Task, NotebookEdit,
674
+ MCP tools, etc.
675
+
676
+ Example: /permissions deny WebSearch`);
677
+ return { success: false };
678
+ }
679
+ const toolName = args.slice(1).join(' ');
680
+ const currentDisallowed = Array.isArray(config.disallowedTools)
681
+ ? config.disallowedTools
682
+ : (config.disallowedTools ? String(config.disallowedTools).split(',').map(t => t.trim()) : []);
683
+ if (!currentDisallowed.includes(toolName)) {
684
+ currentDisallowed.push(toolName);
685
+ config.disallowedTools = currentDisallowed;
686
+ if (writeConfig(config)) {
687
+ ctx.ui.addMessage('assistant', `✓ Tool denied: ${toolName}
688
+
689
+ Current disallowed tools: ${currentDisallowed.join(', ')}
690
+
691
+ Settings saved to: ${getConfigFile()}
692
+ Restart Axon to apply changes.`);
693
+ ctx.ui.addActivity(`Denied tool: ${toolName}`);
694
+ return { success: true };
695
+ }
696
+ else {
697
+ ctx.ui.addMessage('assistant', 'Failed to save configuration.');
698
+ return { success: false };
699
+ }
700
+ }
701
+ else {
702
+ ctx.ui.addMessage('assistant', `Tool '${toolName}' is already in the disallowed list.`);
703
+ return { success: true };
704
+ }
705
+ }
706
+ // 重置权限设置
707
+ if (action === 'reset') {
708
+ delete config.permissionMode;
709
+ delete config.allowedTools;
710
+ delete config.disallowedTools;
711
+ if (writeConfig(config)) {
712
+ ctx.ui.addMessage('assistant', `✓ Permission settings reset to defaults
713
+
714
+ Permission mode: default (interactive)
715
+ Allowed tools: (all)
716
+ Disallowed tools: (none)
717
+
718
+ Settings saved to: ${getConfigFile()}
719
+ Restart Axon to apply changes.`);
720
+ ctx.ui.addActivity('Reset permission settings');
721
+ return { success: true };
722
+ }
723
+ else {
724
+ ctx.ui.addMessage('assistant', 'Failed to reset permission settings.');
725
+ return { success: false };
726
+ }
727
+ }
728
+ // 未知操作
729
+ ctx.ui.addMessage('assistant', `Unknown action: ${action}
730
+
731
+ Available actions:
732
+ /permissions - Show current settings
733
+ /permissions mode - Set permission mode
734
+ /permissions allow - Allow a tool
735
+ /permissions deny - Deny a tool
736
+ /permissions reset - Reset to defaults
737
+
738
+ Use /permissions <action> for detailed help on each action.`);
739
+ return { success: false };
740
+ },
741
+ };
742
+ // /memory - Claude 长期记忆管理 (基于官方源码实现)
743
+ export const memoryCommand = {
744
+ name: 'memory',
745
+ aliases: ['mem'],
746
+ description: 'Manage Claude\'s long-term memory files',
747
+ usage: '/memory [list|show <file>|edit|clear]',
748
+ category: 'config',
749
+ execute: (ctx) => {
750
+ const { args, config } = ctx;
751
+ // Memory 文件位置
752
+ const sessionMemoryDir = path.join(os.homedir(), '.axon', 'session-memory');
753
+ const claudeMdPath = path.join(config.cwd, 'AXON.md');
754
+ const globalClaudeMd = path.join(os.homedir(), '.axon', 'AXON.md');
755
+ const action = args[0] || 'list';
756
+ switch (action) {
757
+ case 'list': {
758
+ // 列出所有 memory 文件
759
+ const memoryFiles = [];
760
+ // 检查 AXON.md 文件
761
+ if (fs.existsSync(claudeMdPath)) {
762
+ memoryFiles.push(`📄 Project AXON.md\n ${claudeMdPath}`);
763
+ }
764
+ if (fs.existsSync(globalClaudeMd)) {
765
+ memoryFiles.push(`📄 Global AXON.md\n ${globalClaudeMd}`);
766
+ }
767
+ // 检查 session-memory 目录
768
+ if (fs.existsSync(sessionMemoryDir)) {
769
+ try {
770
+ const files = fs.readdirSync(sessionMemoryDir)
771
+ .filter(f => f.endsWith('.md'))
772
+ .map(f => `📝 ${f}\n ${path.join(sessionMemoryDir, f)}`);
773
+ memoryFiles.push(...files);
774
+ }
775
+ catch {
776
+ // 忽略读取错误
777
+ }
778
+ }
779
+ if (memoryFiles.length === 0) {
780
+ ctx.ui.addMessage('assistant', `No memory files found.
781
+
782
+ Memory files allow Claude to remember context across conversations.
783
+
784
+ Locations:
785
+ • Project: ${claudeMdPath}
786
+ • Global: ${globalClaudeMd}
787
+ • Session: ${sessionMemoryDir}/
788
+
789
+ Create a AXON.md file with /init to get started.
790
+
791
+ Learn more: https://code.claude.com/docs/en/memory`);
792
+ }
793
+ else {
794
+ const listInfo = `Claude Memory Files:
795
+
796
+ ${memoryFiles.join('\n\n')}
797
+
798
+ Commands:
799
+ /memory list - List all memory files
800
+ /memory show <file> - Show memory file contents
801
+ /memory edit - Open memory file in editor
802
+ /memory clear - Clear session memory
803
+ /init - Create new AXON.md
804
+
805
+ Learn more: https://code.claude.com/docs/en/memory`;
806
+ ctx.ui.addMessage('assistant', listInfo);
807
+ }
808
+ break;
809
+ }
810
+ case 'show': {
811
+ const fileName = args[1];
812
+ if (!fileName) {
813
+ ctx.ui.addMessage('assistant', `Usage: /memory show <file>
814
+
815
+ Available files:
816
+ • AXON.md (project)
817
+ • AXON.md (global)
818
+ • <session-id>.md (session memory)
819
+
820
+ Example: /memory show AXON.md`);
821
+ return { success: false };
822
+ }
823
+ // 查找并显示文件内容
824
+ let filePath = null;
825
+ let content = '';
826
+ if (fileName === 'AXON.md' || fileName === 'project') {
827
+ if (fs.existsSync(claudeMdPath)) {
828
+ filePath = claudeMdPath;
829
+ }
830
+ }
831
+ else if (fileName === 'global') {
832
+ if (fs.existsSync(globalClaudeMd)) {
833
+ filePath = globalClaudeMd;
834
+ }
835
+ }
836
+ else {
837
+ // 尝试作为 session memory 文件
838
+ const sessionFile = path.join(sessionMemoryDir, fileName.endsWith('.md') ? fileName : `${fileName}.md`);
839
+ if (fs.existsSync(sessionFile)) {
840
+ filePath = sessionFile;
841
+ }
842
+ }
843
+ if (filePath) {
844
+ try {
845
+ content = fs.readFileSync(filePath, 'utf-8');
846
+ const preview = content.length > 2000 ? content.slice(0, 2000) + '\n\n...(truncated)' : content;
847
+ ctx.ui.addMessage('assistant', `Memory File: ${filePath}
848
+
849
+ ${preview}
850
+
851
+ Full path: ${filePath}
852
+ Size: ${content.length} characters`);
853
+ }
854
+ catch (error) {
855
+ ctx.ui.addMessage('assistant', `Error reading file: ${error}`);
856
+ return { success: false };
857
+ }
858
+ }
859
+ else {
860
+ ctx.ui.addMessage('assistant', `Memory file not found: ${fileName}
861
+
862
+ Use /memory list to see available files.`);
863
+ return { success: false };
864
+ }
865
+ break;
866
+ }
867
+ case 'edit': {
868
+ // 提供编辑指引
869
+ const editInfo = `Edit Memory Files:
870
+
871
+ To edit memory files, use your preferred text editor:
872
+
873
+ Project AXON.md:
874
+ ${claudeMdPath}
875
+
876
+ Global AXON.md:
877
+ ${globalClaudeMd}
878
+
879
+ Using $EDITOR environment variable:
880
+ ${process.env.EDITOR || process.env.VISUAL || '(not set)'}
881
+
882
+ Commands:
883
+ # Using default editor
884
+ $EDITOR ${claudeMdPath}
885
+
886
+ # Or use your preferred editor
887
+ code ${claudeMdPath} # VS Code
888
+ vim ${claudeMdPath} # Vim
889
+ nano ${claudeMdPath} # Nano
890
+
891
+ Tip: Set $EDITOR environment variable to use your preferred editor:
892
+ export EDITOR=code # For VS Code
893
+ export EDITOR=vim # For Vim
894
+
895
+ Learn more: https://code.claude.com/docs/en/memory`;
896
+ ctx.ui.addMessage('assistant', editInfo);
897
+ break;
898
+ }
899
+ case 'clear': {
900
+ // 清除 session memory
901
+ let cleared = 0;
902
+ if (fs.existsSync(sessionMemoryDir)) {
903
+ try {
904
+ const files = fs.readdirSync(sessionMemoryDir);
905
+ for (const file of files) {
906
+ if (file.endsWith('.md')) {
907
+ fs.unlinkSync(path.join(sessionMemoryDir, file));
908
+ cleared++;
909
+ }
910
+ }
911
+ ctx.ui.addMessage('assistant', `✓ Cleared ${cleared} session memory file(s)
912
+
913
+ Session memory has been reset.
914
+ Project and global AXON.md files are preserved.`);
915
+ ctx.ui.addActivity(`Cleared ${cleared} session memory files`);
916
+ }
917
+ catch (error) {
918
+ ctx.ui.addMessage('assistant', `Error clearing session memory: ${error}`);
919
+ return { success: false };
920
+ }
921
+ }
922
+ else {
923
+ ctx.ui.addMessage('assistant', 'No session memory to clear.');
924
+ }
925
+ break;
926
+ }
927
+ default: {
928
+ ctx.ui.addMessage('assistant', `Unknown action: ${action}
929
+
930
+ Available actions:
931
+ /memory list - List all memory files
932
+ /memory show <file> - Show memory file contents
933
+ /memory edit - Open memory file in editor
934
+ /memory clear - Clear session memory
935
+
936
+ Use /memory <action> for detailed help on each action.`);
937
+ return { success: false };
938
+ }
939
+ }
940
+ return { success: true };
941
+ },
942
+ };
943
+ // /hooks - Hook 管理(基于官方源码完善)
944
+ export const hooksCommand = {
945
+ name: 'hooks',
946
+ description: 'View or manage hooks',
947
+ usage: '/hooks [list|types|examples|disable|enable]',
948
+ category: 'config',
949
+ execute: (ctx) => {
950
+ const { args } = ctx;
951
+ const config = readConfig();
952
+ // 定义所有可用的钩子类型(从官方源码)
953
+ const hookTypes = [
954
+ {
955
+ name: 'PreToolUse',
956
+ description: 'Run before any tool execution',
957
+ example: 'Validate inputs, check permissions, log actions'
958
+ },
959
+ {
960
+ name: 'PostToolUse',
961
+ description: 'Run after successful tool execution',
962
+ example: 'Format output, run linters, update logs'
963
+ },
964
+ {
965
+ name: 'PostToolUseFailure',
966
+ description: 'Run when tool execution fails',
967
+ example: 'Error recovery, notifications, cleanup'
968
+ },
969
+ {
970
+ name: 'Notification',
971
+ description: 'Handle system notifications',
972
+ example: 'Send alerts, update dashboards'
973
+ },
974
+ {
975
+ name: 'UserPromptSubmit',
976
+ description: 'Run when user submits a prompt',
977
+ example: 'Validate input, add context, log queries'
978
+ },
979
+ {
980
+ name: 'SessionStart',
981
+ description: 'Run when a new session starts',
982
+ example: 'Initialize workspace, check dependencies'
983
+ },
984
+ {
985
+ name: 'SessionEnd',
986
+ description: 'Run when session ends',
987
+ example: 'Cleanup, save state, generate reports'
988
+ },
989
+ {
990
+ name: 'Stop',
991
+ description: 'Run when operation is stopped',
992
+ example: 'Graceful shutdown, save progress'
993
+ },
994
+ {
995
+ name: 'SubagentStart',
996
+ description: 'Run when subagent starts',
997
+ example: 'Configure subagent environment'
998
+ },
999
+ {
1000
+ name: 'SubagentStop',
1001
+ description: 'Run when subagent stops',
1002
+ example: 'Collect subagent results'
1003
+ },
1004
+ {
1005
+ name: 'PreCompact',
1006
+ description: 'Run before context compaction',
1007
+ example: 'Save important context, prepare summary'
1008
+ },
1009
+ {
1010
+ name: 'PermissionRequest',
1011
+ description: 'Run when permission is requested',
1012
+ example: 'Custom authorization logic'
1013
+ }
1014
+ ];
1015
+ // 定义钩子实现类型
1016
+ const hookImplTypes = [
1017
+ {
1018
+ type: 'command',
1019
+ description: 'Execute a shell command',
1020
+ fields: 'command (required), timeout, statusMessage'
1021
+ },
1022
+ {
1023
+ type: 'prompt',
1024
+ description: 'Evaluate with LLM',
1025
+ fields: 'prompt (required), model, timeout, statusMessage'
1026
+ },
1027
+ {
1028
+ type: 'agent',
1029
+ description: 'Agentic verifier',
1030
+ fields: 'prompt (required), model, timeout, statusMessage'
1031
+ }
1032
+ ];
1033
+ const action = args[0]?.toLowerCase() || 'show';
1034
+ // 显示当前配置
1035
+ if (action === 'show' || action === 'list') {
1036
+ const currentHooks = config.hooks || {};
1037
+ const hasHooks = Object.keys(currentHooks).length > 0;
1038
+ const isDisabled = config.disableAllHooks === true;
1039
+ let hooksInfo = `╭─ Hooks Configuration ──────────────────────────────╮
1040
+ │ │
1041
+ │ Status: ${(isDisabled ? 'Disabled' : hasHooks ? 'Configured' : 'Not configured').padEnd(42)} │
1042
+ │ Location: ~/.axon/settings.json │
1043
+ │ │`;
1044
+ if (hasHooks) {
1045
+ hooksInfo += `\n│ Configured Hooks: │\n│ │\n`;
1046
+ for (const [hookType, matchers] of Object.entries(currentHooks)) {
1047
+ hooksInfo += `│ ${hookType.padEnd(50)} │\n`;
1048
+ if (Array.isArray(matchers)) {
1049
+ for (const matcher of matchers) {
1050
+ const matcherStr = matcher.matcher || '(all)';
1051
+ const hooksCount = (matcher.hooks || []).length;
1052
+ hooksInfo += `│ → ${matcherStr.padEnd(20)} (${hooksCount} hook${hooksCount !== 1 ? 's' : ''})${' '.repeat(Math.max(0, 20 - matcherStr.length))} │\n`;
1053
+ }
1054
+ }
1055
+ }
1056
+ }
1057
+ else {
1058
+ hooksInfo += `\n│ No hooks configured yet. │\n`;
1059
+ }
1060
+ hooksInfo += `│ │
1061
+ │ Commands: │
1062
+ │ /hooks types - Show all available types │
1063
+ │ /hooks list - Show configured hooks │
1064
+ │ /hooks examples - Show configuration examples │
1065
+ │ /hooks ${isDisabled ? 'enable' : 'disable'} - ${isDisabled ? 'Enable' : 'Disable'} all hooks${' '.repeat(isDisabled ? 5 : 8)} │
1066
+ │ │
1067
+ │ Configuration: │
1068
+ │ Edit ~/.axon/settings.json manually │
1069
+ │ See /hooks examples for sample configs │
1070
+ │ │
1071
+ ╰─────────────────────────────────────────────────────╯`;
1072
+ ctx.ui.addMessage('assistant', hooksInfo);
1073
+ return { success: true };
1074
+ }
1075
+ // 显示所有可用的钩子类型
1076
+ if (action === 'types') {
1077
+ let typesInfo = `╭─ Available Hook Types ─────────────────────────────╮
1078
+ │ │`;
1079
+ for (const hookType of hookTypes) {
1080
+ typesInfo += `\n│ ${hookType.name.padEnd(48)} │\n`;
1081
+ typesInfo += `│ ${hookType.description.padEnd(46)} │\n`;
1082
+ typesInfo += `│ Example: ${hookType.example.substring(0, 35).padEnd(35)} │`;
1083
+ if (hookType !== hookTypes[hookTypes.length - 1]) {
1084
+ typesInfo += `\n│ │`;
1085
+ }
1086
+ }
1087
+ typesInfo += `\n│ │
1088
+ │ Hook Implementation Types: │\n│ │`;
1089
+ for (const implType of hookImplTypes) {
1090
+ typesInfo += `\n│ ${implType.type.padEnd(48)} │\n`;
1091
+ typesInfo += `│ ${implType.description.padEnd(46)} │\n`;
1092
+ typesInfo += `│ Fields: ${implType.fields.substring(0, 39).padEnd(39)} │`;
1093
+ if (implType !== hookImplTypes[hookImplTypes.length - 1]) {
1094
+ typesInfo += `\n│ │`;
1095
+ }
1096
+ }
1097
+ typesInfo += `\n│ │
1098
+ ╰─────────────────────────────────────────────────────╯`;
1099
+ ctx.ui.addMessage('assistant', typesInfo);
1100
+ return { success: true };
1101
+ }
1102
+ // 显示配置示例
1103
+ if (action === 'examples') {
1104
+ const examplesInfo = `Hook Configuration Examples
1105
+
1106
+ 1. Command Hook (Shell Command):
1107
+ {
1108
+ "hooks": {
1109
+ "PreToolUse": [
1110
+ {
1111
+ "matcher": "Write",
1112
+ "hooks": [
1113
+ {
1114
+ "type": "command",
1115
+ "command": "echo 'About to write file' | tee -a ~/claude.log",
1116
+ "timeout": 5,
1117
+ "statusMessage": "Logging write operation..."
1118
+ }
1119
+ ]
1120
+ }
1121
+ ]
1122
+ }
1123
+ }
1124
+
1125
+ 2. Prompt Hook (LLM Evaluation):
1126
+ {
1127
+ "hooks": {
1128
+ "PostToolUse": [
1129
+ {
1130
+ "matcher": "Bash",
1131
+ "hooks": [
1132
+ {
1133
+ "type": "prompt",
1134
+ "prompt": "Check if the command output contains errors. Use $ARGUMENTS placeholder for hook input JSON.",
1135
+ "model": "claude-haiku-4-20250514",
1136
+ "timeout": 30,
1137
+ "statusMessage": "Analyzing command output..."
1138
+ }
1139
+ ]
1140
+ }
1141
+ ]
1142
+ }
1143
+ }
1144
+
1145
+ 3. Agent Hook (Agentic Verifier):
1146
+ {
1147
+ "hooks": {
1148
+ "PostToolUse": [
1149
+ {
1150
+ "matcher": "Bash",
1151
+ "hooks": [
1152
+ {
1153
+ "type": "agent",
1154
+ "prompt": "Verify that unit tests ran and passed. Context: $ARGUMENTS",
1155
+ "model": "claude-haiku-4-20250514",
1156
+ "timeout": 60,
1157
+ "statusMessage": "Verifying test results..."
1158
+ }
1159
+ ]
1160
+ }
1161
+ ]
1162
+ }
1163
+ }
1164
+
1165
+ 4. SessionStart Hook (Initialize Workspace):
1166
+ {
1167
+ "hooks": {
1168
+ "SessionStart": [
1169
+ {
1170
+ "hooks": [
1171
+ {
1172
+ "type": "command",
1173
+ "command": "git status && npm install",
1174
+ "timeout": 120,
1175
+ "statusMessage": "Initializing workspace..."
1176
+ }
1177
+ ]
1178
+ }
1179
+ ]
1180
+ }
1181
+ }
1182
+
1183
+ 5. Multiple Matchers and Hooks:
1184
+ {
1185
+ "hooks": {
1186
+ "PreToolUse": [
1187
+ {
1188
+ "matcher": "Write",
1189
+ "hooks": [
1190
+ {
1191
+ "type": "command",
1192
+ "command": "echo 'Write operation'"
1193
+ }
1194
+ ]
1195
+ },
1196
+ {
1197
+ "matcher": "Edit",
1198
+ "hooks": [
1199
+ {
1200
+ "type": "command",
1201
+ "command": "./run-linter.sh"
1202
+ },
1203
+ {
1204
+ "type": "prompt",
1205
+ "prompt": "Check code style"
1206
+ }
1207
+ ]
1208
+ }
1209
+ ],
1210
+ "SessionStart": [
1211
+ {
1212
+ "hooks": [
1213
+ {
1214
+ "type": "command",
1215
+ "command": "echo 'Session started at' $(date)"
1216
+ }
1217
+ ]
1218
+ }
1219
+ ]
1220
+ }
1221
+ }
1222
+
1223
+ Important Notes:
1224
+ • matcher is optional - omit for hooks that apply to all tools
1225
+ • $ARGUMENTS in prompts is replaced with hook input JSON
1226
+ • timeout is in seconds
1227
+ • Hooks receive JSON via stdin with context about the event
1228
+ • Multiple hooks run sequentially in array order
1229
+
1230
+ Configuration Location:
1231
+ ~/.axon/settings.json
1232
+
1233
+ To disable all hooks:
1234
+ /hooks disable
1235
+
1236
+ To disable hooks temporarily:
1237
+ Set "disableAllHooks": true in settings.json`;
1238
+ ctx.ui.addMessage('assistant', examplesInfo);
1239
+ return { success: true };
1240
+ }
1241
+ // 禁用所有钩子
1242
+ if (action === 'disable') {
1243
+ config.disableAllHooks = true;
1244
+ if (writeConfig(config)) {
1245
+ ctx.ui.addMessage('assistant', `✓ All hooks disabled
1246
+
1247
+ Configuration updated: ${getConfigFile()}
1248
+
1249
+ To re-enable hooks:
1250
+ 1. Edit ~/.axon/settings.json
1251
+ 2. Remove or set "disableAllHooks": false
1252
+ 3. Restart Axon
1253
+
1254
+ Note: Hook configurations are preserved, just not executed.`);
1255
+ ctx.ui.addActivity('Disabled all hooks');
1256
+ return { success: true };
1257
+ }
1258
+ else {
1259
+ ctx.ui.addMessage('assistant', 'Failed to update configuration.');
1260
+ return { success: false };
1261
+ }
1262
+ }
1263
+ // 启用钩子
1264
+ if (action === 'enable') {
1265
+ if (config.disableAllHooks) {
1266
+ delete config.disableAllHooks;
1267
+ if (writeConfig(config)) {
1268
+ ctx.ui.addMessage('assistant', `✓ Hooks enabled
1269
+
1270
+ Configuration updated: ${getConfigFile()}
1271
+ Restart Axon to apply changes.`);
1272
+ ctx.ui.addActivity('Enabled hooks');
1273
+ return { success: true };
1274
+ }
1275
+ else {
1276
+ ctx.ui.addMessage('assistant', 'Failed to update configuration.');
1277
+ return { success: false };
1278
+ }
1279
+ }
1280
+ else {
1281
+ ctx.ui.addMessage('assistant', 'Hooks are already enabled.');
1282
+ return { success: true };
1283
+ }
1284
+ }
1285
+ // 未知操作
1286
+ ctx.ui.addMessage('assistant', `Unknown action: ${action}
1287
+
1288
+ Available commands:
1289
+ /hooks - Show configured hooks
1290
+ /hooks list - Same as /hooks
1291
+ /hooks types - Show all available hook types
1292
+ /hooks examples - Show configuration examples
1293
+ /hooks disable - Disable all hooks
1294
+ /hooks enable - Re-enable hooks
1295
+
1296
+ Note: Hooks must be configured manually in ~/.axon/settings.json
1297
+ Use /hooks examples to see sample configurations.`);
1298
+ return { success: false };
1299
+ },
1300
+ };
1301
+ // /model - 模型管理 (基于官方实现)
1302
+ export const modelCommand = {
1303
+ name: 'model',
1304
+ aliases: ['m'],
1305
+ description: 'View or change the AI model',
1306
+ usage: '/model [model-name]',
1307
+ category: 'config',
1308
+ execute: (ctx) => {
1309
+ const { args, config } = ctx;
1310
+ // 定义可用模型(基于官方源码)
1311
+ const models = [
1312
+ {
1313
+ name: 'sonnet',
1314
+ display: 'Claude Sonnet 4.5',
1315
+ desc: 'Best for everyday tasks',
1316
+ cost: '$3 / $15 per MTok (in/out)',
1317
+ details: 'Balanced performance for most coding tasks'
1318
+ },
1319
+ {
1320
+ name: 'opus',
1321
+ display: 'Claude Opus 4.5',
1322
+ desc: 'Most capable for complex work',
1323
+ cost: '$15 / $75 per MTok (in/out)',
1324
+ details: 'Highest intelligence for complex reasoning'
1325
+ },
1326
+ {
1327
+ name: 'haiku',
1328
+ display: 'Claude Haiku 4.5',
1329
+ desc: 'Fastest for quick answers',
1330
+ cost: '$0.80 / $4 per MTok (in/out)',
1331
+ details: 'Lower cost and faster for simple tasks'
1332
+ },
1333
+ ];
1334
+ // 无参数时显示当前模型和可用选项
1335
+ if (args.length === 0) {
1336
+ const currentModel = config.model || 'sonnet';
1337
+ const currentModelObj = models.find(m => currentModel.toLowerCase().includes(m.name));
1338
+ let modelInfo = `╭─ Model Selection ──────────────────────────────────╮\n`;
1339
+ modelInfo += `│ │\n`;
1340
+ modelInfo += `│ Current: ${(currentModelObj?.display || currentModel).padEnd(42)}│\n`;
1341
+ modelInfo += `│ │\n`;
1342
+ modelInfo += `│ Available Models: │\n`;
1343
+ modelInfo += `│ │\n`;
1344
+ for (const model of models) {
1345
+ const isCurrent = currentModel.toLowerCase().includes(model.name);
1346
+ const marker = isCurrent ? '→' : ' ';
1347
+ const nameDisplay = `${marker} ${model.name}`;
1348
+ modelInfo += `│ ${nameDisplay.padEnd(10)} - ${model.display.padEnd(38)}│\n`;
1349
+ modelInfo += `│ ${model.desc.padEnd(36)}│\n`;
1350
+ modelInfo += `│ ${model.cost.padEnd(36)}│\n`;
1351
+ if (model !== models[models.length - 1]) {
1352
+ modelInfo += `│ │\n`;
1353
+ }
1354
+ }
1355
+ modelInfo += `│ │\n`;
1356
+ modelInfo += `│ Usage: │\n`;
1357
+ modelInfo += `│ /model <name> - Switch to a model │\n`;
1358
+ modelInfo += `│ claude -m <name> - Start with specific model │\n`;
1359
+ modelInfo += `│ │\n`;
1360
+ modelInfo += `│ Examples: │\n`;
1361
+ modelInfo += `│ /model opus - Switch to Opus │\n`;
1362
+ modelInfo += `│ /model haiku - Switch to Haiku │\n`;
1363
+ modelInfo += `│ │\n`;
1364
+ modelInfo += `╰────────────────────────────────────────────────────╯`;
1365
+ ctx.ui.addMessage('assistant', modelInfo);
1366
+ return { success: true };
1367
+ }
1368
+ // 带参数时显示特定模型的详细信息或切换提示
1369
+ const requestedModel = args[0].toLowerCase();
1370
+ const validModel = models.find(m => m.name === requestedModel);
1371
+ if (!validModel) {
1372
+ ctx.ui.addMessage('assistant', `Unknown model: ${requestedModel}\n\nAvailable models: ${models.map(m => m.name).join(', ')}\n\nUse '/model' to see all options.`);
1373
+ return { success: false };
1374
+ }
1375
+ // 如果请求的模型就是当前模型,显示详细信息
1376
+ const currentModel = config.model || 'sonnet';
1377
+ const isCurrentModel = currentModel.toLowerCase().includes(validModel.name);
1378
+ if (isCurrentModel) {
1379
+ let details = `${validModel.display} (current)\n\n`;
1380
+ details += `${validModel.desc}\n\n`;
1381
+ details += `Pricing: ${validModel.cost}\n`;
1382
+ details += `${validModel.details}\n\n`;
1383
+ details += `You are currently using this model.`;
1384
+ ctx.ui.addMessage('assistant', details);
1385
+ return { success: true };
1386
+ }
1387
+ // v2.1.30: 立即切换模型(不再需要重启)
1388
+ ctx.ui.addMessage('assistant', `Switched to ${validModel.display}\n\nThe next message will use this model.`);
1389
+ ctx.ui.addActivity(`Switched to ${validModel.display}`);
1390
+ return { success: true, action: 'switchModel', data: { model: validModel.name } };
1391
+ },
1392
+ };
1393
+ // /init - 初始化项目的 Claude 配置(基于官方源码)
1394
+ export const initCommand = {
1395
+ name: 'init',
1396
+ description: 'Initialize Axon configuration for this project',
1397
+ usage: '/init',
1398
+ category: 'config',
1399
+ execute: (ctx) => {
1400
+ const { config } = ctx;
1401
+ const claudeMdPath = path.join(config.cwd, 'AXON.md');
1402
+ const claudeDir = path.join(config.cwd, '.axon');
1403
+ const commandsDir = path.join(claudeDir, 'commands');
1404
+ const gitignorePath = path.join(config.cwd, '.gitignore');
1405
+ // 检查是否已初始化
1406
+ const alreadyInitialized = fs.existsSync(claudeMdPath) || fs.existsSync(claudeDir);
1407
+ if (alreadyInitialized) {
1408
+ // 如果已存在,发送改进提示
1409
+ const existingFiles = [];
1410
+ if (fs.existsSync(claudeMdPath))
1411
+ existingFiles.push('AXON.md');
1412
+ if (fs.existsSync(claudeDir))
1413
+ existingFiles.push('.axon/');
1414
+ const improvementPrompt = `Please analyze this codebase and suggest improvements to the existing Axon configuration.
1415
+
1416
+ Current configuration found:
1417
+ ${existingFiles.map(f => `- ${f}`).join('\n')}
1418
+
1419
+ Please review and suggest improvements for:
1420
+ 1. AXON.md - Is it comprehensive? Does it include key commands and architecture?
1421
+ 2. .axon/ directory - Are there useful custom commands or settings that should be added?
1422
+ 3. Any missing configuration that would help future Claude instances work more effectively in this codebase.
1423
+
1424
+ Focus on practical improvements based on the actual codebase structure and development workflow.`;
1425
+ ctx.ui.addMessage('assistant', `Axon is already initialized in this project.
1426
+
1427
+ Found existing configuration:
1428
+ ${existingFiles.map(f => ` • ${f}`).join('\n')}
1429
+
1430
+ I'll analyze your codebase and suggest improvements to your configuration.`);
1431
+ // 发送改进分析的提示
1432
+ ctx.ui.addMessage('user', improvementPrompt);
1433
+ return { success: true };
1434
+ }
1435
+ // 如果未初始化,发送完整的初始化提示(基于官方源码)
1436
+ const initPrompt = `Please analyze this codebase and create a AXON.md file, which will be given to future instances of Axon to operate in this repository.
1437
+
1438
+ IMPORTANT: The AXON.md file MUST use the built-in template as its foundation. Call the createClaudeMdTemplate function or use the following structure:
1439
+ 1. Start with the standard header "# AXON.md" and the intro line
1440
+ 2. Fill in the "## Project Overview" section with a concise description of the project
1441
+ 3. Keep the "## Iron Rules" section and "## Behavioral Red Lines" section EXACTLY as they are in the template — do NOT modify, remove, or reword any rules
1442
+ 4. Fill in the "## Development Commands" section with actual build/test/lint commands discovered from the project
1443
+ 5. Fill in the "## Architecture Overview" section with the high-level code structure
1444
+
1445
+ What to add in the project-specific sections:
1446
+ 1. Commands that will be commonly used, such as how to build, lint, and run tests. Include the necessary commands to develop in this codebase, such as how to run a single test.
1447
+ 2. High-level code architecture and structure so that future instances can be productive more quickly. Focus on the "big picture" architecture that requires reading multiple files to understand.
1448
+
1449
+ Usage notes:
1450
+ - Do not repeat yourself and do not include obvious instructions like "Provide helpful error messages to users", "Write unit tests for all new utilities", "Never include sensitive information (API keys, tokens) in code or commits".
1451
+ - Avoid listing every component or file structure that can be easily discovered.
1452
+ - Don't include generic development practices — the Iron Rules already cover behavioral constraints.
1453
+ - If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include the important parts.
1454
+ - If there is a README.md, make sure to include the important parts.
1455
+ - Do not make up information such as "Common Development Tasks", "Tips for Development", "Support and Documentation" unless this is expressly included in other files that you read.
1456
+
1457
+ Additionally, please help set up the .axon/ directory structure:
1458
+ 1. Create .axon/commands/ for custom slash commands
1459
+ 2. Suggest adding .axon/ to .gitignore (but keep AXON.md tracked)
1460
+ 3. If there are common project-specific workflows, suggest creating custom commands for them
1461
+
1462
+ Please analyze the codebase now and create these files.`;
1463
+ ctx.ui.addMessage('assistant', `Initializing Axon configuration for this project...
1464
+
1465
+ I'll analyze your codebase and create:
1466
+ • AXON.md - Project documentation and guidance
1467
+ • .axon/ - Configuration directory
1468
+ • .axon/commands/ - Custom commands directory
1469
+
1470
+ This will help future Axon instances understand your project better.`);
1471
+ // 发送初始化提示
1472
+ ctx.ui.addMessage('user', initPrompt);
1473
+ ctx.ui.addActivity('Initialized Axon project configuration');
1474
+ return { success: true };
1475
+ },
1476
+ };
1477
+ // /privacy-settings - 隐私设置(基于官方源码完善)
1478
+ export const privacySettingsCommand = {
1479
+ name: 'privacy-settings',
1480
+ aliases: ['privacy'],
1481
+ description: 'View and manage privacy and data collection settings',
1482
+ usage: '/privacy-settings [show|telemetry <on|off>|clear-sessions]',
1483
+ category: 'config',
1484
+ execute: (ctx) => {
1485
+ const { args } = ctx;
1486
+ const action = args[0]?.toLowerCase() || 'show';
1487
+ const config = readConfig();
1488
+ // 从 settings.json 读取遥测配置
1489
+ const telemetryEnabled = config.enableTelemetry === true;
1490
+ const otelTimeout = config.telemetry?.otelShutdownTimeoutMs?.toString() || '3000';
1491
+ // 显示隐私设置
1492
+ if (action === 'show') {
1493
+ // 确定当前遥测状态
1494
+ let telemetryStatus = 'Disabled (default for local installations)';
1495
+ if (telemetryEnabled) {
1496
+ telemetryStatus = 'Enabled (settings.json)';
1497
+ }
1498
+ const privacyInfo = `╭─ Privacy & Data Settings ──────────────────────────╮
1499
+ │ │
1500
+ │ Data Collection: │
1501
+ │ OpenTelemetry: ${telemetryStatus.substring(0, 28).padEnd(28)} │
1502
+ │ Usage Analytics: Disabled │
1503
+ │ Crash Reports: Configurable (opt-in) │
1504
+ │ Error Logging: Local only │
1505
+ │ │
1506
+ │ Data Storage Locations: │
1507
+ │ Sessions: ~/.axon/sessions/ │
1508
+ │ Configuration: ~/.axon/settings.json │
1509
+ │ Logs: ~/.axon/logs/ (if enabled) │
1510
+ │ Memory Files: ~/.axon/session-memory/ │
1511
+ │ Plugins: ~/.axon/plugins/ │
1512
+ │ │
1513
+ │ Data Retention: │
1514
+ │ Sessions: 30 days (auto-cleanup) │
1515
+ │ Configuration: Persisted indefinitely │
1516
+ │ Logs: Rotated based on size │
1517
+ │ No data sent to external servers (local mode) │
1518
+ │ │
1519
+ │ Privacy Controls: │
1520
+ │ Telemetry: Environment variable control │
1521
+ │ Sessions: Manual deletion supported │
1522
+ │ API Key: Stored locally only │
1523
+ │ Conversation: All local, end-to-end │
1524
+ │ │
1525
+ │ Environment Variables: │
1526
+ │ AXON_ENABLE_TELEMETRY=1 │
1527
+ │ Enable OpenTelemetry (disabled by default) │
1528
+ │ │
1529
+ │ AXON_DISABLE_TELEMETRY=1 │
1530
+ │ Explicitly disable all telemetry │
1531
+ │ │
1532
+ │ AXON_OTEL_SHUTDOWN_TIMEOUT_MS=${otelTimeout.padEnd(13)} │
1533
+ │ OpenTelemetry shutdown timeout (milliseconds) │
1534
+ │ │
1535
+ │ Commands: │
1536
+ │ /privacy-settings show - Show settings │
1537
+ │ /privacy-settings clear-sessions - Clear all │
1538
+ │ │
1539
+ │ Data Processing: │
1540
+ │ • All conversations are processed locally │
1541
+ │ • API calls go directly to Anthropic │
1542
+ │ • No intermediary data collection │
1543
+ │ • Sessions stored locally for resume │
1544
+ │ │
1545
+ │ For more information: │
1546
+ │ Consumer Terms: https://www.anthropic.com/legal │
1547
+ │ Privacy Policy: https://platform.claude.com/ │
1548
+ │ settings/privacy │
1549
+ │ Documentation: https://code.claude.com/privacy │
1550
+ │ │
1551
+ ╰─────────────────────────────────────────────────────╯`;
1552
+ ctx.ui.addMessage('assistant', privacyInfo);
1553
+ return { success: true };
1554
+ }
1555
+ // 清除所有会话数据
1556
+ if (action === 'clear-sessions') {
1557
+ const sessionsDir = path.join(os.homedir(), '.axon', 'sessions');
1558
+ if (!fs.existsSync(sessionsDir)) {
1559
+ ctx.ui.addMessage('assistant', 'No sessions directory found. Nothing to clear.');
1560
+ return { success: true };
1561
+ }
1562
+ try {
1563
+ const files = fs.readdirSync(sessionsDir);
1564
+ let deletedCount = 0;
1565
+ for (const file of files) {
1566
+ if (file.endsWith('.json')) {
1567
+ fs.unlinkSync(path.join(sessionsDir, file));
1568
+ deletedCount++;
1569
+ }
1570
+ }
1571
+ ctx.ui.addMessage('assistant', `✓ Privacy: Cleared ${deletedCount} session file(s)
1572
+
1573
+ All conversation history has been deleted from:
1574
+ ${sessionsDir}
1575
+
1576
+ This action:
1577
+ • Removed all saved sessions
1578
+ • Cleared conversation history
1579
+ • Freed up disk space
1580
+
1581
+ Note: This does not affect:
1582
+ • Your configuration (~/.axon/settings.json)
1583
+ • Custom commands (.axon/commands/)
1584
+ • MCP server configurations
1585
+
1586
+ You can no longer resume any previous sessions.`);
1587
+ ctx.ui.addActivity(`Cleared ${deletedCount} session files`);
1588
+ return { success: true };
1589
+ }
1590
+ catch (error) {
1591
+ ctx.ui.addMessage('assistant', `Error clearing sessions: ${error}
1592
+
1593
+ Please check permissions for:
1594
+ ${sessionsDir}`);
1595
+ return { success: false };
1596
+ }
1597
+ }
1598
+ // 未知操作
1599
+ ctx.ui.addMessage('assistant', `Unknown action: ${action}
1600
+
1601
+ Available commands:
1602
+ /privacy-settings - Show privacy settings
1603
+ /privacy-settings show - Same as above
1604
+ /privacy-settings clear-sessions - Delete all saved sessions
1605
+
1606
+ To control telemetry, set environment variables:
1607
+ export AXON_DISABLE_TELEMETRY=1 # Disable
1608
+ export AXON_ENABLE_TELEMETRY=1 # Enable
1609
+
1610
+ Note: Changes to environment variables require restart.`);
1611
+ return { success: false };
1612
+ },
1613
+ };
1614
+ // /vim - Vim 模式切换 (官方风格)
1615
+ export const vimCommand = {
1616
+ name: 'vim',
1617
+ description: 'Toggle between Vim and Normal editing modes',
1618
+ category: 'config',
1619
+ execute: (ctx) => {
1620
+ // 模拟 vim 模式切换
1621
+ const vimInfo = `Vim Mode Toggle
1622
+
1623
+ Current Mode: Normal (readline)
1624
+
1625
+ To toggle Vim mode:
1626
+ • This feature enables Vim-style keybindings
1627
+ • Use hjkl for navigation
1628
+ • Use i/a for insert mode
1629
+ • Use Esc to exit insert mode
1630
+
1631
+ Vim Mode Features:
1632
+ • Modal editing (normal/insert)
1633
+ • Vim motions (w, b, e, etc.)
1634
+ • Vim commands (:w, :q, etc.)
1635
+
1636
+ Note: Vim mode is applied to the input field.
1637
+ Restart may be required for full effect.`;
1638
+ ctx.ui.addMessage('assistant', vimInfo);
1639
+ return { success: true };
1640
+ },
1641
+ };
1642
+ // /theme - 主题设置 (官方风格)
1643
+ export const themeCommand = {
1644
+ name: 'theme',
1645
+ description: 'Change the color theme',
1646
+ usage: '/theme [theme-name]',
1647
+ category: 'config',
1648
+ execute: (ctx) => {
1649
+ const { args } = ctx;
1650
+ const themes = [
1651
+ { name: 'dark', desc: 'Dark theme (default)' },
1652
+ { name: 'light', desc: 'Light theme' },
1653
+ { name: 'system', desc: 'Follow system preference' },
1654
+ { name: 'high-contrast', desc: 'High contrast for accessibility' },
1655
+ ];
1656
+ if (args.length === 0) {
1657
+ let themeInfo = `Color Theme\n\nCurrent: dark\n\nAvailable Themes:\n`;
1658
+ for (const theme of themes) {
1659
+ themeInfo += ` ${theme.name.padEnd(15)} - ${theme.desc}\n`;
1660
+ }
1661
+ themeInfo += `\nUsage: /theme <name>\nExample: /theme light`;
1662
+ ctx.ui.addMessage('assistant', themeInfo);
1663
+ return { success: true };
1664
+ }
1665
+ const requestedTheme = args[0].toLowerCase();
1666
+ const validTheme = themes.find(t => t.name === requestedTheme);
1667
+ if (!validTheme) {
1668
+ ctx.ui.addMessage('assistant', `Unknown theme: ${requestedTheme}\n\nAvailable: ${themes.map(t => t.name).join(', ')}`);
1669
+ return { success: false };
1670
+ }
1671
+ ctx.ui.addMessage('assistant', `Theme changed to: ${validTheme.name}\n\nNote: Some terminal emulators may require restart to fully apply.`);
1672
+ return { success: true };
1673
+ },
1674
+ };
1675
+ // /discover - 探索功能 (官方风格)
1676
+ export const discoverCommand = {
1677
+ name: 'discover',
1678
+ description: 'Explore Axon features and track your progress',
1679
+ category: 'config',
1680
+ execute: (ctx) => {
1681
+ const discoverInfo = `Discover Axon
1682
+
1683
+ Quick Wins:
1684
+ ✓ /resume - Resume past conversations
1685
+ ○ /compact - Summarize and free context
1686
+ ○ Image paste (Ctrl+V)
1687
+ ○ Voice input
1688
+
1689
+ Power Features:
1690
+ ○ MCP servers
1691
+ ○ Custom hooks
1692
+ ○ GitHub integration
1693
+ ○ Vim mode
1694
+
1695
+ Tips:
1696
+ • Type / to see all commands
1697
+ • Press ? for keyboard shortcuts
1698
+ • Use /help <command> for details
1699
+
1700
+ Progress: 1/8 features explored
1701
+
1702
+ Try: /resume to continue a past conversation`;
1703
+ ctx.ui.addMessage('assistant', discoverInfo);
1704
+ return { success: true };
1705
+ },
1706
+ };
1707
+ // /output-style - 输出风格设置 (官方实现)
1708
+ export const outputStyleCommand = {
1709
+ name: 'output-style',
1710
+ aliases: ['style'],
1711
+ description: 'Configure AI output style (concise, detailed, code-first, etc.)',
1712
+ usage: '/output-style [style-name]',
1713
+ category: 'config',
1714
+ execute: (ctx) => {
1715
+ const { args } = ctx;
1716
+ // 定义可用的输出风格
1717
+ const outputStyles = [
1718
+ {
1719
+ name: 'default',
1720
+ display: 'Default',
1721
+ description: 'Balanced responses with explanations and code',
1722
+ prompt: 'Provide balanced responses that include both explanations and code when relevant. Be clear and helpful while remaining concise.'
1723
+ },
1724
+ {
1725
+ name: 'concise',
1726
+ display: 'Concise',
1727
+ description: 'Brief, to-the-point responses',
1728
+ prompt: 'Be extremely concise. Provide brief, direct answers with minimal explanation. Focus on essential information only. Use code blocks when they\'re more efficient than words.'
1729
+ },
1730
+ {
1731
+ name: 'detailed',
1732
+ display: 'Detailed',
1733
+ description: 'Comprehensive explanations with examples',
1734
+ prompt: 'Provide detailed, comprehensive responses. Include thorough explanations, examples, and context. Walk through your reasoning step by step. Educational content is encouraged.'
1735
+ },
1736
+ {
1737
+ name: 'code-first',
1738
+ display: 'Code First',
1739
+ description: 'Prioritize code solutions over explanations',
1740
+ prompt: 'Prioritize showing code solutions. Provide working code first, with minimal explanation. Comments in code are preferred over separate explanations. Be direct and action-oriented.'
1741
+ },
1742
+ {
1743
+ name: 'educational',
1744
+ display: 'Educational',
1745
+ description: 'Teaching-focused with insights and best practices',
1746
+ prompt: 'Focus on teaching and learning. Explain concepts thoroughly, include best practices, and provide insights. Help the user understand not just the "how" but the "why" behind solutions.'
1747
+ },
1748
+ {
1749
+ name: 'professional',
1750
+ display: 'Professional',
1751
+ description: 'Formal, enterprise-grade documentation style',
1752
+ prompt: 'Maintain a professional, formal tone. Provide well-structured responses suitable for enterprise environments. Include documentation, error handling, and production-ready considerations.'
1753
+ }
1754
+ ];
1755
+ // 无参数时显示当前风格和可用选项
1756
+ if (args.length === 0) {
1757
+ const config = readConfig();
1758
+ const currentStyle = config.outputStyle || 'default';
1759
+ const current = outputStyles.find(s => s.name === currentStyle);
1760
+ let styleInfo = `Output Style Configuration
1761
+
1762
+ Current Style: ${current?.display || 'Default'} (${currentStyle})
1763
+ ${current?.description || 'Standard balanced responses'}
1764
+
1765
+ Available Styles:
1766
+ `;
1767
+ for (const style of outputStyles) {
1768
+ const isCurrent = style.name === currentStyle ? ' (current)' : '';
1769
+ styleInfo += ` ${style.name.padEnd(13)} - ${style.display}${isCurrent}\n`;
1770
+ styleInfo += ` ${style.description}\n`;
1771
+ }
1772
+ styleInfo += `\nUsage:
1773
+ /output-style <name> - Set output style
1774
+ /output-style default - Reset to default style
1775
+
1776
+ Examples:
1777
+ /output-style concise - Get brief, direct responses
1778
+ /output-style detailed - Get comprehensive explanations`;
1779
+ ctx.ui.addMessage('assistant', styleInfo);
1780
+ return { success: true };
1781
+ }
1782
+ // 设置输出风格
1783
+ const styleName = args[0].toLowerCase();
1784
+ const selectedStyle = outputStyles.find(s => s.name === styleName);
1785
+ if (!selectedStyle) {
1786
+ ctx.ui.addMessage('assistant', `Unknown output style: ${styleName}\n\nAvailable styles: ${outputStyles.map(s => s.name).join(', ')}`);
1787
+ return { success: false };
1788
+ }
1789
+ // 保存到配置
1790
+ const config = readConfig();
1791
+ config.outputStyle = selectedStyle.name;
1792
+ config.outputStylePrompt = selectedStyle.prompt;
1793
+ if (writeConfig(config)) {
1794
+ ctx.ui.addMessage('assistant', `✓ Output style changed to: ${selectedStyle.display}
1795
+
1796
+ ${selectedStyle.description}
1797
+
1798
+ This setting will affect how I respond to your queries going forward.
1799
+ Note: Some changes may require restarting the conversation.`);
1800
+ ctx.ui.addActivity(`Changed output style to: ${selectedStyle.name}`);
1801
+ return { success: true };
1802
+ }
1803
+ else {
1804
+ ctx.ui.addMessage('assistant', 'Failed to save output style configuration.');
1805
+ return { success: false };
1806
+ }
1807
+ },
1808
+ };
1809
+ // /statusline - 配置状态栏 (官方实现)
1810
+ export const statuslineCommand = {
1811
+ name: 'statusline',
1812
+ aliases: ['status-line'],
1813
+ description: 'Set up Axon\'s status line UI',
1814
+ usage: '/statusline [custom-prompt]',
1815
+ category: 'config',
1816
+ execute: (ctx) => {
1817
+ const { args } = ctx;
1818
+ const configFile = getConfigFile();
1819
+ let config = readConfig();
1820
+ // 获取当前 statusLine 配置
1821
+ const currentStatusLine = config.statusLine;
1822
+ // 如果无参数,显示当前配置和帮助信息
1823
+ if (args.length === 0) {
1824
+ let statusLineInfo = `Status Line Configuration\n\n`;
1825
+ if (currentStatusLine) {
1826
+ statusLineInfo += `Current Configuration:\n`;
1827
+ statusLineInfo += ` Type: ${currentStatusLine.type || 'command'}\n`;
1828
+ statusLineInfo += ` Command: ${currentStatusLine.command || '(not set)'}\n\n`;
1829
+ }
1830
+ else {
1831
+ statusLineInfo += `Status line is not configured.\n\n`;
1832
+ }
1833
+ statusLineInfo += `The status line displays contextual information beneath the input box.\n\n`;
1834
+ statusLineInfo += `Configuration:\n`;
1835
+ statusLineInfo += ` 1. The statusLine receives JSON via stdin with:\n`;
1836
+ statusLineInfo += ` - session_id: Unique session ID\n`;
1837
+ statusLineInfo += ` - model: { id, display_name }\n`;
1838
+ statusLineInfo += ` - workspace: { current_dir }\n`;
1839
+ statusLineInfo += ` - cost: { input_tokens, output_tokens, ... }\n\n`;
1840
+ statusLineInfo += ` 2. Example configuration in ${configFile}:\n`;
1841
+ statusLineInfo += ` {\n`;
1842
+ statusLineInfo += ` "statusLine": {\n`;
1843
+ statusLineInfo += ` "type": "command",\n`;
1844
+ statusLineInfo += ` "command": "jq -r '.model.display_name'"\n`;
1845
+ statusLineInfo += ` }\n`;
1846
+ statusLineInfo += ` }\n\n`;
1847
+ statusLineInfo += ` 3. Example with shell script:\n`;
1848
+ statusLineInfo += ` Create ~/.axon/statusline-command.sh:\n`;
1849
+ statusLineInfo += ` #!/bin/bash\n`;
1850
+ statusLineInfo += ` input=$(cat)\n`;
1851
+ statusLineInfo += ` model=$(echo "$input" | jq -r '.model.display_name')\n`;
1852
+ statusLineInfo += ` cwd=$(echo "$input" | jq -r '.workspace.current_dir')\n`;
1853
+ statusLineInfo += ` echo "$model in $cwd"\n\n`;
1854
+ statusLineInfo += ` Then set command to: "~/.axon/statusline-command.sh"\n\n`;
1855
+ statusLineInfo += `Usage:\n`;
1856
+ statusLineInfo += ` /statusline - Show this help\n`;
1857
+ statusLineInfo += ` /statusline setup - Interactive setup (import from PS1)\n`;
1858
+ statusLineInfo += ` /statusline disable - Disable status line\n`;
1859
+ statusLineInfo += ` /statusline test - Test current configuration\n`;
1860
+ ctx.ui.addMessage('assistant', statusLineInfo);
1861
+ return { success: true };
1862
+ }
1863
+ const action = args[0].toLowerCase();
1864
+ // 禁用状态栏
1865
+ if (action === 'disable') {
1866
+ if (currentStatusLine) {
1867
+ delete config.statusLine;
1868
+ if (writeConfig(config)) {
1869
+ ctx.ui.addMessage('assistant', `Status line disabled.\n\nConfiguration updated: ${configFile}\nRestart Axon to apply changes.`);
1870
+ return { success: true };
1871
+ }
1872
+ else {
1873
+ ctx.ui.addMessage('assistant', 'Failed to update configuration.');
1874
+ return { success: false };
1875
+ }
1876
+ }
1877
+ else {
1878
+ ctx.ui.addMessage('assistant', 'Status line is already disabled.');
1879
+ return { success: true };
1880
+ }
1881
+ }
1882
+ // 交互式设置 (从 PS1 导入)
1883
+ if (action === 'setup') {
1884
+ const setupInfo = `Interactive Status Line Setup
1885
+
1886
+ This feature helps you configure a custom status line by importing your shell's PS1 configuration.
1887
+
1888
+ Steps:
1889
+ 1. The setup will read your shell configuration (~/.zshrc, ~/.bashrc, etc.)
1890
+ 2. Extract your PS1 (prompt) variable
1891
+ 3. Convert it to a statusLine command
1892
+ 4. Save to ${configFile}
1893
+
1894
+ Shell PS1 sequences that will be converted:
1895
+ \\u → $(whoami) - Username
1896
+ \\h → $(hostname -s) - Hostname (short)
1897
+ \\w → $(pwd) - Working directory
1898
+ \\W → $(basename "$(pwd)") - Current directory name
1899
+ \\$ → $(if [ $(id -u) -eq 0 ]; then echo '#'; else echo '$'; fi)
1900
+ \\d → $(date +%a\\ %b\\ %d) - Date
1901
+ \\t → $(date +%H:%M:%S) - Time (24-hour)
1902
+ \\@ → $(date +%I:%M%p) - Time (12-hour)
1903
+
1904
+ Color codes will be preserved using printf.
1905
+
1906
+ To proceed with automatic setup:
1907
+ 1. Ask Claude: "Configure my statusLine from my shell PS1"
1908
+ 2. Or manually edit ${configFile}
1909
+
1910
+ Note: You can also create a custom script in ~/.axon/ for more control.`;
1911
+ ctx.ui.addMessage('assistant', setupInfo);
1912
+ ctx.ui.addActivity('Showed statusline setup info');
1913
+ return { success: true };
1914
+ }
1915
+ // 测试当前配置
1916
+ if (action === 'test') {
1917
+ if (!currentStatusLine || !currentStatusLine.command) {
1918
+ ctx.ui.addMessage('assistant', 'No statusLine command configured. Use /statusline setup to configure.');
1919
+ return { success: false };
1920
+ }
1921
+ const testInfo = `Testing Status Line Configuration
1922
+
1923
+ Current command: ${currentStatusLine.command}
1924
+
1925
+ Sample JSON input:
1926
+ {
1927
+ "session_id": "test-session-123",
1928
+ "model": {
1929
+ "id": "claude-sonnet-4-20250514",
1930
+ "display_name": "Claude Sonnet 4"
1931
+ },
1932
+ "workspace": {
1933
+ "current_dir": "${ctx.config.cwd}"
1934
+ },
1935
+ "cost": {
1936
+ "input_tokens": 1234,
1937
+ "output_tokens": 567,
1938
+ "total_cost": 0.0234
1939
+ }
1940
+ }
1941
+
1942
+ To test manually, run:
1943
+ echo '{"session_id":"test","model":{"display_name":"Sonnet"},"workspace":{"current_dir":"${ctx.config.cwd}"}}' | ${currentStatusLine.command}
1944
+
1945
+ Note: Testing requires the command and dependencies (like jq) to be installed.`;
1946
+ ctx.ui.addMessage('assistant', testInfo);
1947
+ return { success: true };
1948
+ }
1949
+ // 未知操作
1950
+ ctx.ui.addMessage('assistant', `Unknown action: ${action}\n\nAvailable actions:\n /statusline - Show help\n /statusline setup - Interactive setup\n /statusline disable - Disable\n /statusline test - Test configuration`);
1951
+ return { success: false };
1952
+ },
1953
+ };
1954
+ // /remote-env - 远程环境配置 (基于官方源码实现)
1955
+ export const remoteEnvCommand = {
1956
+ name: 'remote-env',
1957
+ aliases: ['remote', 'env'],
1958
+ description: 'Configure the default remote environment for remote development sessions',
1959
+ usage: '/remote-env [list|set <env-id>|clear]',
1960
+ category: 'config',
1961
+ execute: (ctx) => {
1962
+ const { args } = ctx;
1963
+ const action = args[0]?.toLowerCase() || 'show';
1964
+ const config = readConfig();
1965
+ // 获取当前远程环境配置
1966
+ const currentRemoteConfig = config.remote || {};
1967
+ const defaultEnvironmentId = currentRemoteConfig.defaultEnvironmentId;
1968
+ // 模拟的环境列表(在真实实现中,这些会从 API 获取)
1969
+ const mockEnvironments = [
1970
+ {
1971
+ environment_id: 'env-1',
1972
+ name: 'Development Container',
1973
+ type: 'docker',
1974
+ status: 'active'
1975
+ },
1976
+ {
1977
+ environment_id: 'env-2',
1978
+ name: 'SSH Server',
1979
+ type: 'ssh',
1980
+ status: 'active'
1981
+ },
1982
+ {
1983
+ environment_id: 'env-3',
1984
+ name: 'Remote Workspace',
1985
+ type: 'remote',
1986
+ status: 'inactive'
1987
+ }
1988
+ ];
1989
+ // 显示当前配置
1990
+ if (action === 'show' || action === 'status') {
1991
+ let remoteEnvInfo = `╭─ Remote Environment Configuration ────────────────╮\n`;
1992
+ remoteEnvInfo += `│ │\n`;
1993
+ if (defaultEnvironmentId) {
1994
+ const currentEnv = mockEnvironments.find(e => e.environment_id === defaultEnvironmentId);
1995
+ if (currentEnv) {
1996
+ remoteEnvInfo += `│ Current Environment: │\n`;
1997
+ remoteEnvInfo += `│ Name: ${currentEnv.name.padEnd(40)} │\n`;
1998
+ remoteEnvInfo += `│ ID: ${currentEnv.environment_id.padEnd(40)} │\n`;
1999
+ remoteEnvInfo += `│ Type: ${currentEnv.type.padEnd(40)} │\n`;
2000
+ remoteEnvInfo += `│ Status: ${currentEnv.status.padEnd(40)} │\n`;
2001
+ }
2002
+ else {
2003
+ remoteEnvInfo += `│ Current: ${defaultEnvironmentId.padEnd(42)} │\n`;
2004
+ remoteEnvInfo += `│ (Environment not found in available list) │\n`;
2005
+ }
2006
+ }
2007
+ else {
2008
+ remoteEnvInfo += `│ No default remote environment configured │\n`;
2009
+ }
2010
+ remoteEnvInfo += `│ │\n`;
2011
+ remoteEnvInfo += `│ Commands: │\n`;
2012
+ remoteEnvInfo += `│ /remote-env list - List all environments │\n`;
2013
+ remoteEnvInfo += `│ /remote-env set <id> - Set default environment│\n`;
2014
+ remoteEnvInfo += `│ /remote-env clear - Clear configuration │\n`;
2015
+ remoteEnvInfo += `│ │\n`;
2016
+ remoteEnvInfo += `│ Remote Development Features: │\n`;
2017
+ remoteEnvInfo += `│ • SSH connection support │\n`;
2018
+ remoteEnvInfo += `│ • Docker container environments │\n`;
2019
+ remoteEnvInfo += `│ • Remote workspace synchronization │\n`;
2020
+ remoteEnvInfo += `│ │\n`;
2021
+ remoteEnvInfo += `│ Configuration: │\n`;
2022
+ remoteEnvInfo += `│ Location: ~/.axon/settings.json │\n`;
2023
+ remoteEnvInfo += `│ Key: remote.defaultEnvironmentId │\n`;
2024
+ remoteEnvInfo += `│ │\n`;
2025
+ remoteEnvInfo += `│ Web Console: │\n`;
2026
+ remoteEnvInfo += `│ https://claude.ai/code │\n`;
2027
+ remoteEnvInfo += `│ │\n`;
2028
+ remoteEnvInfo += `╰────────────────────────────────────────────────────╯`;
2029
+ ctx.ui.addMessage('assistant', remoteEnvInfo);
2030
+ return { success: true };
2031
+ }
2032
+ // 列出所有可用环境
2033
+ if (action === 'list') {
2034
+ let envList = `Available Remote Environments:\n\n`;
2035
+ if (mockEnvironments.length === 0) {
2036
+ envList += `No remote environments available.\n\n`;
2037
+ envList += `To configure remote environments:\n`;
2038
+ envList += `1. Visit https://claude.ai/code\n`;
2039
+ envList += `2. Set up your remote development environments\n`;
2040
+ envList += `3. Use /remote-env set <id> to configure\n`;
2041
+ }
2042
+ else {
2043
+ for (const env of mockEnvironments) {
2044
+ const isCurrent = env.environment_id === defaultEnvironmentId ? ' (current)' : '';
2045
+ envList += `${isCurrent ? '→' : ' '} ${env.name}${isCurrent}\n`;
2046
+ envList += ` ID: ${env.environment_id}\n`;
2047
+ envList += ` Type: ${env.type}\n`;
2048
+ envList += ` Status: ${env.status}\n\n`;
2049
+ }
2050
+ envList += `\nTo set default environment:\n`;
2051
+ envList += ` /remote-env set <environment-id>\n\n`;
2052
+ envList += `Example:\n`;
2053
+ envList += ` /remote-env set env-1\n`;
2054
+ }
2055
+ ctx.ui.addMessage('assistant', envList);
2056
+ return { success: true };
2057
+ }
2058
+ // 设置默认环境
2059
+ if (action === 'set') {
2060
+ if (args.length < 2) {
2061
+ ctx.ui.addMessage('assistant', `Usage: /remote-env set <environment-id>
2062
+
2063
+ Available environment IDs:
2064
+ ${mockEnvironments.map(e => ` - ${e.environment_id} (${e.name})`).join('\n')}
2065
+
2066
+ Example: /remote-env set env-1`);
2067
+ return { success: false };
2068
+ }
2069
+ const envId = args[1];
2070
+ const selectedEnv = mockEnvironments.find(e => e.environment_id === envId);
2071
+ if (!selectedEnv) {
2072
+ ctx.ui.addMessage('assistant', `Environment ID '${envId}' not found.
2073
+
2074
+ Available environments:
2075
+ ${mockEnvironments.map(e => ` - ${e.environment_id} (${e.name})`).join('\n')}
2076
+
2077
+ Use /remote-env list to see all environments.`);
2078
+ return { success: false };
2079
+ }
2080
+ // 保存配置
2081
+ config.remote = {
2082
+ ...currentRemoteConfig,
2083
+ defaultEnvironmentId: envId
2084
+ };
2085
+ if (writeConfig(config)) {
2086
+ ctx.ui.addMessage('assistant', `✓ Set default remote environment to: ${selectedEnv.name}
2087
+
2088
+ Environment ID: ${envId}
2089
+ Type: ${selectedEnv.type}
2090
+ Status: ${selectedEnv.status}
2091
+
2092
+ Configuration saved to: ${getConfigFile()}
2093
+
2094
+ This environment will be used for:
2095
+ • Remote development sessions
2096
+ • SSH connections
2097
+ • Container-based workflows
2098
+
2099
+ Restart Axon to apply changes.`);
2100
+ ctx.ui.addActivity(`Set remote environment: ${selectedEnv.name}`);
2101
+ return { success: true };
2102
+ }
2103
+ else {
2104
+ ctx.ui.addMessage('assistant', 'Failed to save remote environment configuration.');
2105
+ return { success: false };
2106
+ }
2107
+ }
2108
+ // 清除配置
2109
+ if (action === 'clear') {
2110
+ if (config.remote) {
2111
+ delete config.remote.defaultEnvironmentId;
2112
+ // 如果 remote 对象为空,删除整个 remote 配置
2113
+ if (Object.keys(config.remote).length === 0) {
2114
+ delete config.remote;
2115
+ }
2116
+ if (writeConfig(config)) {
2117
+ ctx.ui.addMessage('assistant', `✓ Cleared default remote environment configuration
2118
+
2119
+ Configuration updated: ${getConfigFile()}
2120
+
2121
+ No default environment is configured. You can set one with:
2122
+ /remote-env set <environment-id>
2123
+
2124
+ Use /remote-env list to see available environments.`);
2125
+ ctx.ui.addActivity('Cleared remote environment configuration');
2126
+ return { success: true };
2127
+ }
2128
+ else {
2129
+ ctx.ui.addMessage('assistant', 'Failed to clear remote environment configuration.');
2130
+ return { success: false };
2131
+ }
2132
+ }
2133
+ else {
2134
+ ctx.ui.addMessage('assistant', 'No remote environment configuration to clear.');
2135
+ return { success: true };
2136
+ }
2137
+ }
2138
+ // 未知操作
2139
+ ctx.ui.addMessage('assistant', `Unknown action: ${action}
2140
+
2141
+ Available commands:
2142
+ /remote-env - Show current configuration
2143
+ /remote-env list - List all available environments
2144
+ /remote-env set <id> - Set default environment
2145
+ /remote-env clear - Clear configuration
2146
+
2147
+ For more information: https://claude.ai/code`);
2148
+ return { success: false };
2149
+ },
2150
+ };
2151
+ // /terminal-setup - 终端快捷键配置 (从官方源码复制实现)
2152
+ export const terminalSetupCommand = {
2153
+ name: 'terminal-setup',
2154
+ description: 'Configure Shift+Enter key binding for multi-line prompts',
2155
+ category: 'config',
2156
+ execute: (ctx) => {
2157
+ // 检测终端类型
2158
+ const termProgram = process.env.TERM_PROGRAM;
2159
+ const term = process.env.TERM;
2160
+ const tmux = process.env.TMUX;
2161
+ const ghost = process.env.GHOSTTY_RESOURCES_DIR;
2162
+ let terminalType = 'unknown';
2163
+ let inTmux = false;
2164
+ // 检测是否在 tmux/screen 中
2165
+ if (tmux || term?.includes('screen')) {
2166
+ inTmux = true;
2167
+ }
2168
+ // 检测终端类型
2169
+ if (termProgram === 'vscode') {
2170
+ terminalType = 'VSCode';
2171
+ }
2172
+ else if (termProgram === 'Cursor') {
2173
+ terminalType = 'Cursor';
2174
+ }
2175
+ else if (termProgram === 'Windsurf') {
2176
+ terminalType = 'Windsurf';
2177
+ }
2178
+ else if (termProgram === 'WezTerm') {
2179
+ terminalType = 'WezTerm';
2180
+ }
2181
+ else if (ghost) {
2182
+ terminalType = 'Ghostty';
2183
+ }
2184
+ else if (termProgram === 'Apple_Terminal') {
2185
+ terminalType = 'Apple Terminal';
2186
+ }
2187
+ else if (termProgram === 'iTerm.app') {
2188
+ terminalType = 'iTerm2';
2189
+ }
2190
+ // 如果在不支持的终端中运行
2191
+ if (inTmux || terminalType === 'unknown') {
2192
+ const currentTerm = inTmux ? 'tmux/screen' : terminalType;
2193
+ const platform = process.platform;
2194
+ let supportedTerminals = '';
2195
+ if (platform === 'darwin') {
2196
+ supportedTerminals = ` • macOS: iTerm2, Apple Terminal\n`;
2197
+ }
2198
+ else if (platform === 'win32') {
2199
+ supportedTerminals = ` • Windows: Windows Terminal\n`;
2200
+ }
2201
+ const message = `Terminal setup cannot be run from ${currentTerm}.
2202
+
2203
+ This command configures a convenient Shift+Enter shortcut for multi-line prompts.
2204
+ ${inTmux ? '' : 'Note: You can already use backslash (\\\\) + return to add newlines.\\n'}
2205
+
2206
+ To set up the shortcut (optional):
2207
+ ${inTmux ? '1. Exit tmux/screen temporarily\\n2. Run /terminal-setup directly in one of these terminals:' : 'Please run this in one of these supported terminals:'}
2208
+ ${supportedTerminals} • IDE: VSCode, Cursor, Windsurf
2209
+ • Other: Ghostty, WezTerm
2210
+ ${inTmux ? '3. Return to tmux/screen - settings will persist' : ''}
2211
+
2212
+ For more help, visit: https://code.claude.com/terminal-setup`;
2213
+ ctx.ui.addMessage('assistant', message);
2214
+ return { success: false };
2215
+ }
2216
+ // 在支持的终端中运行 - 显示配置说明
2217
+ let configInstructions = '';
2218
+ switch (terminalType) {
2219
+ case 'VSCode':
2220
+ case 'Cursor':
2221
+ case 'Windsurf':
2222
+ configInstructions = `Terminal Setup for ${terminalType}
2223
+
2224
+ Shift+Enter is already configured in ${terminalType}'s integrated terminal!
2225
+
2226
+ Usage:
2227
+ • Shift+Enter: Add a newline without submitting
2228
+ • Enter: Submit your prompt
2229
+
2230
+ Tips:
2231
+ • You can also use backslash (\\\\) + Enter for newlines
2232
+ • Multi-line editing works in all supported terminals
2233
+ • No additional configuration needed for ${terminalType}
2234
+
2235
+ The Shift+Enter binding should work automatically in the integrated terminal.`;
2236
+ break;
2237
+ case 'WezTerm':
2238
+ configInstructions = `Terminal Setup for WezTerm
2239
+
2240
+ To configure Shift+Enter for multi-line prompts in WezTerm:
2241
+
2242
+ 1. Open (or create) your WezTerm config file:
2243
+ ~/.config/wezterm/wezterm.lua
2244
+
2245
+ 2. Add this key binding:
2246
+
2247
+ local config = wezterm.config_builder()
2248
+
2249
+ config.keys = {
2250
+ {key="Enter", mods="SHIFT", action=wezterm.action{SendString="\\\\x1b\\\\r"}},
2251
+ }
2252
+
2253
+ return config
2254
+
2255
+ 3. Save and restart WezTerm
2256
+
2257
+ After this, Shift+Enter will add newlines without submitting your prompt.
2258
+
2259
+ Documentation: https://wezfurlong.org/wezterm/config/keys.html`;
2260
+ break;
2261
+ case 'Ghostty':
2262
+ configInstructions = `Terminal Setup for Ghostty
2263
+
2264
+ To configure Shift+Enter for multi-line prompts in Ghostty:
2265
+
2266
+ 1. Open (or create) your Ghostty config file:
2267
+ ~/.config/ghostty/config
2268
+
2269
+ 2. Add this key binding:
2270
+
2271
+ keybind = shift+enter=text:\\\\x1b\\\\r
2272
+
2273
+ 3. Save and restart Ghostty
2274
+
2275
+ After this, Shift+Enter will add newlines without submitting your prompt.
2276
+
2277
+ Documentation: https://ghostty.org/docs`;
2278
+ break;
2279
+ case 'Apple Terminal':
2280
+ configInstructions = `Terminal Setup for Apple Terminal
2281
+
2282
+ Terminal.app doesn't support custom Shift+Enter binding.
2283
+
2284
+ Alternative options:
2285
+ • Use Option+Enter for newlines (if "Use Option as Meta" is enabled)
2286
+ • Use backslash (\\\\) + Enter for newlines
2287
+ • Consider using iTerm2 for better customization
2288
+
2289
+ To enable Option as Meta in Terminal.app:
2290
+ 1. Terminal > Preferences
2291
+ 2. Select your profile
2292
+ 3. Check "Use Option as Meta key"
2293
+
2294
+ After this, Option+Enter will work as a newline.`;
2295
+ break;
2296
+ case 'iTerm2':
2297
+ configInstructions = `Terminal Setup for iTerm2
2298
+
2299
+ To configure Shift+Enter for multi-line prompts in iTerm2:
2300
+
2301
+ 1. Open iTerm2 > Preferences > Profiles
2302
+ 2. Select your profile
2303
+ 3. Go to Keys tab
2304
+ 4. Click "+" to add a key mapping
2305
+ 5. Configure:
2306
+ - Keyboard Shortcut: Shift+Enter
2307
+ - Action: Send Escape Sequence
2308
+ - Value: \\r
2309
+
2310
+ After this, Shift+Enter will add newlines without submitting your prompt.
2311
+
2312
+ Documentation: https://iterm2.com/documentation-preferences.html`;
2313
+ break;
2314
+ default:
2315
+ configInstructions = `Terminal Setup
2316
+
2317
+ Your terminal (${terminalType}) is supported!
2318
+
2319
+ General Instructions:
2320
+ • Configure Shift+Enter to send escape sequence: \\\\x1b\\\\r
2321
+ • This allows multi-line input without submitting
2322
+ • You can also use backslash (\\\\) + Enter for newlines
2323
+
2324
+ Check your terminal's documentation for custom key binding configuration.`;
2325
+ }
2326
+ ctx.ui.addMessage('assistant', configInstructions);
2327
+ ctx.ui.addActivity(`Showed terminal setup for ${terminalType}`);
2328
+ return { success: true };
2329
+ },
2330
+ };
2331
+ // /sandbox - 沙箱设置
2332
+ export const sandboxCommand = {
2333
+ name: 'sandbox',
2334
+ description: 'Configure sandbox settings for tool execution',
2335
+ usage: '/sandbox [status|enable|disable]',
2336
+ category: 'config',
2337
+ execute: (ctx) => {
2338
+ const { args } = ctx;
2339
+ const action = args[0]?.toLowerCase();
2340
+ // 检查当前沙箱状态
2341
+ const sandboxEnabled = process.env.AXON_ENABLE_SANDBOX === 'true';
2342
+ const platform = process.platform;
2343
+ const supportsSandbox = platform === 'linux'; // Bubblewrap 仅支持 Linux
2344
+ if (!action || action === 'status') {
2345
+ let sandboxInfo = `Sandbox Settings\n\n`;
2346
+ sandboxInfo += `Status: ${sandboxEnabled ? '✓ Enabled' : '✗ Disabled'}\n`;
2347
+ sandboxInfo += `Platform: ${platform}\n`;
2348
+ sandboxInfo += `Sandbox Support: ${supportsSandbox ? '✓ Available (Linux with Bubblewrap)' : '✗ Not available (requires Linux)'}\n\n`;
2349
+ if (!supportsSandbox) {
2350
+ sandboxInfo += `Note: Sandbox isolation requires Linux with Bubblewrap installed.\n`;
2351
+ sandboxInfo += `On Windows, consider using WSL for sandbox support.\n`;
2352
+ sandboxInfo += `On macOS, sandbox features are limited.\n\n`;
2353
+ }
2354
+ sandboxInfo += `Commands:\n`;
2355
+ sandboxInfo += ` /sandbox status - Show current status\n`;
2356
+ sandboxInfo += ` /sandbox enable - Enable sandbox (Linux only)\n`;
2357
+ sandboxInfo += ` /sandbox disable - Disable sandbox\n\n`;
2358
+ sandboxInfo += `Environment Variable:\n`;
2359
+ sandboxInfo += ` AXON_ENABLE_SANDBOX=true|false\n`;
2360
+ ctx.ui.addMessage('assistant', sandboxInfo);
2361
+ return { success: true };
2362
+ }
2363
+ if (action === 'enable') {
2364
+ if (!supportsSandbox) {
2365
+ ctx.ui.addMessage('assistant', `Cannot enable sandbox on ${platform}.\n\nSandbox requires Linux with Bubblewrap installed.`);
2366
+ return { success: false };
2367
+ }
2368
+ process.env.AXON_ENABLE_SANDBOX = 'true';
2369
+ ctx.ui.addMessage('assistant', 'Sandbox enabled for this session.\n\nTo make permanent, set AXON_ENABLE_SANDBOX=true in your environment.');
2370
+ return { success: true };
2371
+ }
2372
+ if (action === 'disable') {
2373
+ process.env.AXON_ENABLE_SANDBOX = 'false';
2374
+ ctx.ui.addMessage('assistant', 'Sandbox disabled for this session.');
2375
+ return { success: true };
2376
+ }
2377
+ ctx.ui.addMessage('assistant', `Unknown action: ${action}\n\nUsage: /sandbox [status|enable|disable]`);
2378
+ return { success: false };
2379
+ },
2380
+ };
2381
+ // /keybindings - 键盘快捷键配置 (v2.1.18)
2382
+ export const keybindingsCommand = {
2383
+ name: 'keybindings',
2384
+ aliases: ['keys', 'shortcuts'],
2385
+ description: 'Open or create your keybindings configuration file',
2386
+ usage: '/keybindings',
2387
+ category: 'config',
2388
+ execute: async (ctx) => {
2389
+ // 动态导入以避免循环依赖
2390
+ const { getKeybindingsPath, generateTemplateContent, isUserCustomizationEnabled } = await import('../config/keybindings.js');
2391
+ const { openInEditor } = await import('../utils/editor.js');
2392
+ const fsPromises = await import('fs/promises');
2393
+ if (!isUserCustomizationEnabled()) {
2394
+ ctx.ui.addMessage('assistant', 'Keybinding customization is not enabled. This feature is currently in preview.');
2395
+ return { success: false };
2396
+ }
2397
+ const filePath = getKeybindingsPath();
2398
+ let fileExists = false;
2399
+ try {
2400
+ await fsPromises.stat(filePath);
2401
+ fileExists = true;
2402
+ }
2403
+ catch {
2404
+ // 文件不存在
2405
+ }
2406
+ if (!fileExists) {
2407
+ // 创建默认模板
2408
+ const template = generateTemplateContent();
2409
+ const dirPath = path.dirname(filePath);
2410
+ try {
2411
+ await fsPromises.mkdir(dirPath, { recursive: true });
2412
+ await fsPromises.writeFile(filePath, template, 'utf-8');
2413
+ }
2414
+ catch (err) {
2415
+ const message = err instanceof Error ? err.message : String(err);
2416
+ ctx.ui.addMessage('assistant', `Failed to create keybindings.json: ${message}`);
2417
+ return { success: false };
2418
+ }
2419
+ }
2420
+ // 尝试在编辑器中打开
2421
+ try {
2422
+ await openInEditor(filePath);
2423
+ const message = fileExists
2424
+ ? `Opened ${filePath} in your editor.`
2425
+ : `Created ${filePath} with template. Opened in your editor.`;
2426
+ ctx.ui.addMessage('assistant', message);
2427
+ ctx.ui.addActivity('Opened keybindings configuration');
2428
+ return { success: true };
2429
+ }
2430
+ catch (err) {
2431
+ const message = err instanceof Error ? err.message : String(err);
2432
+ const prefix = fileExists ? 'Opened' : 'Created';
2433
+ ctx.ui.addMessage('assistant', `${prefix} ${filePath}. Could not open in editor: ${message}\n\nYou can edit the file manually at:\n${filePath}`);
2434
+ return { success: true };
2435
+ }
2436
+ },
2437
+ };
2438
+ // 注册所有配置命令
2439
+ export function registerConfigCommands() {
2440
+ commandRegistry.register(configCommand);
2441
+ commandRegistry.register(permissionsCommand);
2442
+ commandRegistry.register(memoryCommand);
2443
+ commandRegistry.register(hooksCommand);
2444
+ commandRegistry.register(modelCommand);
2445
+ commandRegistry.register(initCommand);
2446
+ commandRegistry.register(privacySettingsCommand);
2447
+ commandRegistry.register(vimCommand);
2448
+ commandRegistry.register(themeCommand);
2449
+ commandRegistry.register(discoverCommand);
2450
+ commandRegistry.register(outputStyleCommand);
2451
+ commandRegistry.register(statuslineCommand);
2452
+ commandRegistry.register(remoteEnvCommand);
2453
+ commandRegistry.register(terminalSetupCommand);
2454
+ commandRegistry.register(sandboxCommand);
2455
+ commandRegistry.register(keybindingsCommand);
2456
+ }
2457
+ //# sourceMappingURL=config.js.map