orient-cli 0.1.0-alpha.0 → 0.2.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 (936) hide show
  1. package/LICENSE +0 -0
  2. package/NOTICE.md +0 -0
  3. package/README.md +0 -0
  4. package/dist/cli.d.ts +0 -0
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/extensions/orient-core.d.ts +0 -0
  8. package/dist/extensions/orient-core.js +0 -0
  9. package/dist/extensions/orient-core.js.map +0 -0
  10. package/dist/extensions/orient-notebooklm.d.ts +0 -0
  11. package/dist/extensions/orient-notebooklm.js +0 -0
  12. package/dist/extensions/orient-notebooklm.js.map +0 -0
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/integrations/notebooklm/bridge.d.ts +0 -0
  17. package/dist/integrations/notebooklm/bridge.js +0 -0
  18. package/dist/integrations/notebooklm/bridge.js.map +0 -0
  19. package/dist/integrations/notebooklm/notebooklm-extension.d.ts +1 -1
  20. package/dist/integrations/notebooklm/notebooklm-extension.js +1 -1
  21. package/dist/integrations/notebooklm/notebooklm-extension.js.map +1 -1
  22. package/dist/orient/artifact-graph.d.ts +0 -0
  23. package/dist/orient/artifact-graph.js +0 -0
  24. package/dist/orient/artifact-graph.js.map +0 -0
  25. package/dist/orient/change-packet.d.ts +2 -1
  26. package/dist/orient/change-packet.js +25 -8
  27. package/dist/orient/change-packet.js.map +1 -1
  28. package/dist/orient/clarify.d.ts +114 -0
  29. package/dist/orient/clarify.js +186 -0
  30. package/dist/orient/clarify.js.map +1 -0
  31. package/dist/orient/clear-command.d.ts +79 -0
  32. package/dist/orient/clear-command.js +117 -0
  33. package/dist/orient/clear-command.js.map +1 -0
  34. package/dist/orient/mode.d.ts +70 -0
  35. package/dist/orient/mode.js +124 -0
  36. package/dist/orient/mode.js.map +1 -0
  37. package/dist/orient/orient-extension.d.ts +1 -1
  38. package/dist/orient/orient-extension.js +306 -17
  39. package/dist/orient/orient-extension.js.map +1 -1
  40. package/dist/orient/phases.d.ts +0 -0
  41. package/dist/orient/phases.js +0 -0
  42. package/dist/orient/phases.js.map +0 -0
  43. package/dist/orient/plan-execute.d.ts +137 -0
  44. package/dist/orient/plan-execute.js +333 -0
  45. package/dist/orient/plan-execute.js.map +1 -0
  46. package/dist/orient/state-machine.d.ts +0 -0
  47. package/dist/orient/state-machine.js +0 -0
  48. package/dist/orient/state-machine.js.map +0 -0
  49. package/dist/orient/tiers.d.ts +109 -0
  50. package/dist/orient/tiers.js +162 -0
  51. package/dist/orient/tiers.js.map +1 -0
  52. package/dist/orient/types.d.ts +0 -0
  53. package/dist/orient/types.js +0 -0
  54. package/dist/orient/types.js.map +0 -0
  55. package/dist/orient/wizard.d.ts +108 -0
  56. package/dist/orient/wizard.js +183 -0
  57. package/dist/orient/wizard.js.map +1 -0
  58. package/dist/package-paths.d.ts +0 -0
  59. package/dist/package-paths.js +0 -0
  60. package/dist/package-paths.js.map +0 -0
  61. package/docs/architecture.md +0 -0
  62. package/docs/artifacts.md +0 -0
  63. package/docs/commands.md +0 -0
  64. package/docs/configuration.md +0 -0
  65. package/docs/getting-started.md +0 -0
  66. package/docs/open-source-resources.md +1 -1
  67. package/docs/phases.md +0 -0
  68. package/docs/research-integration.md +0 -0
  69. package/docs/workflows.md +0 -0
  70. package/node_modules/@orient-cli/agent-core/README.md +456 -0
  71. package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts +24 -0
  72. package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts.map +1 -0
  73. package/node_modules/@orient-cli/agent-core/dist/agent-loop.js +404 -0
  74. package/node_modules/@orient-cli/agent-core/dist/agent-loop.js.map +1 -0
  75. package/node_modules/@orient-cli/agent-core/dist/agent.d.ts +115 -0
  76. package/node_modules/@orient-cli/agent-core/dist/agent.d.ts.map +1 -0
  77. package/node_modules/@orient-cli/agent-core/dist/agent.js +395 -0
  78. package/node_modules/@orient-cli/agent-core/dist/agent.js.map +1 -0
  79. package/node_modules/@orient-cli/agent-core/dist/index.d.ts +5 -0
  80. package/node_modules/@orient-cli/agent-core/dist/index.d.ts.map +1 -0
  81. package/node_modules/@orient-cli/agent-core/dist/index.js +9 -0
  82. package/node_modules/@orient-cli/agent-core/dist/index.js.map +1 -0
  83. package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts +85 -0
  84. package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts.map +1 -0
  85. package/node_modules/@orient-cli/agent-core/dist/proxy.js +268 -0
  86. package/node_modules/@orient-cli/agent-core/dist/proxy.js.map +1 -0
  87. package/node_modules/@orient-cli/agent-core/dist/types.d.ts +323 -0
  88. package/node_modules/@orient-cli/agent-core/dist/types.d.ts.map +1 -0
  89. package/node_modules/@orient-cli/agent-core/dist/types.js +2 -0
  90. package/node_modules/@orient-cli/agent-core/dist/types.js.map +1 -0
  91. package/node_modules/@orient-cli/agent-core/package.json +44 -0
  92. package/node_modules/@orient-cli/ai/README.md +1315 -0
  93. package/node_modules/@orient-cli/ai/dist/api-registry.d.ts +20 -0
  94. package/node_modules/@orient-cli/ai/dist/api-registry.d.ts.map +1 -0
  95. package/node_modules/@orient-cli/ai/dist/api-registry.js +44 -0
  96. package/node_modules/@orient-cli/ai/dist/api-registry.js.map +1 -0
  97. package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts +5 -0
  98. package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts.map +1 -0
  99. package/node_modules/@orient-cli/ai/dist/bedrock-provider.js +6 -0
  100. package/node_modules/@orient-cli/ai/dist/bedrock-provider.js.map +1 -0
  101. package/node_modules/@orient-cli/ai/dist/cli.d.ts +3 -0
  102. package/node_modules/@orient-cli/ai/dist/cli.d.ts.map +1 -0
  103. package/node_modules/@orient-cli/ai/dist/cli.js +116 -0
  104. package/node_modules/@orient-cli/ai/dist/cli.js.map +1 -0
  105. package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts +9 -0
  106. package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts.map +1 -0
  107. package/node_modules/@orient-cli/ai/dist/env-api-keys.js +107 -0
  108. package/node_modules/@orient-cli/ai/dist/env-api-keys.js.map +1 -0
  109. package/node_modules/@orient-cli/ai/dist/index.d.ts +26 -0
  110. package/node_modules/@orient-cli/ai/dist/index.d.ts.map +1 -0
  111. package/node_modules/@orient-cli/ai/dist/index.js +14 -0
  112. package/node_modules/@orient-cli/ai/dist/index.js.map +1 -0
  113. package/node_modules/@orient-cli/ai/dist/models.d.ts +24 -0
  114. package/node_modules/@orient-cli/ai/dist/models.d.ts.map +1 -0
  115. package/node_modules/@orient-cli/ai/dist/models.generated.d.ts +14473 -0
  116. package/node_modules/@orient-cli/ai/dist/models.generated.d.ts.map +1 -0
  117. package/node_modules/@orient-cli/ai/dist/models.generated.js +14241 -0
  118. package/node_modules/@orient-cli/ai/dist/models.generated.js.map +1 -0
  119. package/node_modules/@orient-cli/ai/dist/models.js +55 -0
  120. package/node_modules/@orient-cli/ai/dist/models.js.map +1 -0
  121. package/node_modules/@orient-cli/ai/dist/oauth.d.ts +2 -0
  122. package/node_modules/@orient-cli/ai/dist/oauth.d.ts.map +1 -0
  123. package/node_modules/@orient-cli/ai/dist/oauth.js +2 -0
  124. package/node_modules/@orient-cli/ai/dist/oauth.js.map +1 -0
  125. package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts +20 -0
  126. package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts.map +1 -0
  127. package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js +651 -0
  128. package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js.map +1 -0
  129. package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts +40 -0
  130. package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts.map +1 -0
  131. package/node_modules/@orient-cli/ai/dist/providers/anthropic.js +749 -0
  132. package/node_modules/@orient-cli/ai/dist/providers/anthropic.js.map +1 -0
  133. package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts +15 -0
  134. package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts.map +1 -0
  135. package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js +176 -0
  136. package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js.map +1 -0
  137. package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts +56 -0
  138. package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts.map +1 -0
  139. package/node_modules/@orient-cli/ai/dist/providers/faux.js +367 -0
  140. package/node_modules/@orient-cli/ai/dist/providers/faux.js.map +1 -0
  141. package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts +8 -0
  142. package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts.map +1 -0
  143. package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js +29 -0
  144. package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js.map +1 -0
  145. package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts +74 -0
  146. package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts.map +1 -0
  147. package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js +776 -0
  148. package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js.map +1 -0
  149. package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts +65 -0
  150. package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts.map +1 -0
  151. package/node_modules/@orient-cli/ai/dist/providers/google-shared.js +312 -0
  152. package/node_modules/@orient-cli/ai/dist/providers/google-shared.js.map +1 -0
  153. package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts +15 -0
  154. package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts.map +1 -0
  155. package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js +419 -0
  156. package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js.map +1 -0
  157. package/node_modules/@orient-cli/ai/dist/providers/google.d.ts +13 -0
  158. package/node_modules/@orient-cli/ai/dist/providers/google.d.ts.map +1 -0
  159. package/node_modules/@orient-cli/ai/dist/providers/google.js +399 -0
  160. package/node_modules/@orient-cli/ai/dist/providers/google.js.map +1 -0
  161. package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts +22 -0
  162. package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts.map +1 -0
  163. package/node_modules/@orient-cli/ai/dist/providers/mistral.js +501 -0
  164. package/node_modules/@orient-cli/ai/dist/providers/mistral.js.map +1 -0
  165. package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts +9 -0
  166. package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts.map +1 -0
  167. package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js +741 -0
  168. package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js.map +1 -0
  169. package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts +15 -0
  170. package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts.map +1 -0
  171. package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js +753 -0
  172. package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js.map +1 -0
  173. package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts +17 -0
  174. package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts.map +1 -0
  175. package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js +470 -0
  176. package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js.map +1 -0
  177. package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts +13 -0
  178. package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts.map +1 -0
  179. package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js +190 -0
  180. package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js.map +1 -0
  181. package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts +38 -0
  182. package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts.map +1 -0
  183. package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js +261 -0
  184. package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js.map +1 -0
  185. package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts +8 -0
  186. package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts.map +1 -0
  187. package/node_modules/@orient-cli/ai/dist/providers/simple-options.js +35 -0
  188. package/node_modules/@orient-cli/ai/dist/providers/simple-options.js.map +1 -0
  189. package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts +8 -0
  190. package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts.map +1 -0
  191. package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js +155 -0
  192. package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js.map +1 -0
  193. package/node_modules/@orient-cli/ai/dist/stream.d.ts +8 -0
  194. package/node_modules/@orient-cli/ai/dist/stream.d.ts.map +1 -0
  195. package/node_modules/@orient-cli/ai/dist/stream.js +27 -0
  196. package/node_modules/@orient-cli/ai/dist/stream.js.map +1 -0
  197. package/node_modules/@orient-cli/ai/dist/types.d.ts +353 -0
  198. package/node_modules/@orient-cli/ai/dist/types.d.ts.map +1 -0
  199. package/node_modules/@orient-cli/ai/dist/types.js +2 -0
  200. package/node_modules/@orient-cli/ai/dist/types.js.map +1 -0
  201. package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts +21 -0
  202. package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts.map +1 -0
  203. package/node_modules/@orient-cli/ai/dist/utils/event-stream.js +81 -0
  204. package/node_modules/@orient-cli/ai/dist/utils/event-stream.js.map +1 -0
  205. package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts +3 -0
  206. package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts.map +1 -0
  207. package/node_modules/@orient-cli/ai/dist/utils/hash.js +14 -0
  208. package/node_modules/@orient-cli/ai/dist/utils/hash.js.map +1 -0
  209. package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts +9 -0
  210. package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts.map +1 -0
  211. package/node_modules/@orient-cli/ai/dist/utils/json-parse.js +29 -0
  212. package/node_modules/@orient-cli/ai/dist/utils/json-parse.js.map +1 -0
  213. package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts +25 -0
  214. package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts.map +1 -0
  215. package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js +335 -0
  216. package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js.map +1 -0
  217. package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts +30 -0
  218. package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts.map +1 -0
  219. package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js +292 -0
  220. package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js.map +1 -0
  221. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts +26 -0
  222. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -0
  223. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js +376 -0
  224. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js.map +1 -0
  225. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts +26 -0
  226. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -0
  227. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js +481 -0
  228. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js.map +1 -0
  229. package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts +61 -0
  230. package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts.map +1 -0
  231. package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js +131 -0
  232. package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js.map +1 -0
  233. package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts +3 -0
  234. package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts.map +1 -0
  235. package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js +105 -0
  236. package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js.map +1 -0
  237. package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts +34 -0
  238. package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts.map +1 -0
  239. package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js +373 -0
  240. package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js.map +1 -0
  241. package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts +13 -0
  242. package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts.map +1 -0
  243. package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js +31 -0
  244. package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js.map +1 -0
  245. package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts +47 -0
  246. package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts.map +1 -0
  247. package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js +2 -0
  248. package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js.map +1 -0
  249. package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts +53 -0
  250. package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts.map +1 -0
  251. package/node_modules/@orient-cli/ai/dist/utils/overflow.js +132 -0
  252. package/node_modules/@orient-cli/ai/dist/utils/overflow.js.map +1 -0
  253. package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts +22 -0
  254. package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts.map +1 -0
  255. package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js +26 -0
  256. package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js.map +1 -0
  257. package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts +17 -0
  258. package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts.map +1 -0
  259. package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js +21 -0
  260. package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js.map +1 -0
  261. package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts +18 -0
  262. package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts.map +1 -0
  263. package/node_modules/@orient-cli/ai/dist/utils/validation.js +80 -0
  264. package/node_modules/@orient-cli/ai/dist/utils/validation.js.map +1 -0
  265. package/node_modules/@orient-cli/ai/package.json +114 -0
  266. package/node_modules/@orient-cli/coding-agent/README.md +618 -0
  267. package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts +3 -0
  268. package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts.map +1 -0
  269. package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js +7 -0
  270. package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js.map +1 -0
  271. package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts +2 -0
  272. package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts.map +1 -0
  273. package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js +4 -0
  274. package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js.map +1 -0
  275. package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts +52 -0
  276. package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts.map +1 -0
  277. package/node_modules/@orient-cli/coding-agent/dist/cli/args.js +326 -0
  278. package/node_modules/@orient-cli/coding-agent/dist/cli/args.js.map +1 -0
  279. package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts +14 -0
  280. package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts.map +1 -0
  281. package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js +31 -0
  282. package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js.map +1 -0
  283. package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts +15 -0
  284. package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts.map +1 -0
  285. package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js +83 -0
  286. package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js.map +1 -0
  287. package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts +18 -0
  288. package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts.map +1 -0
  289. package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js +22 -0
  290. package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js.map +1 -0
  291. package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts +9 -0
  292. package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts.map +1 -0
  293. package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js +92 -0
  294. package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js.map +1 -0
  295. package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts +9 -0
  296. package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts.map +1 -0
  297. package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js +35 -0
  298. package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js.map +1 -0
  299. package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts +3 -0
  300. package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts.map +1 -0
  301. package/node_modules/@orient-cli/coding-agent/dist/cli.js +15 -0
  302. package/node_modules/@orient-cli/coding-agent/dist/cli.js.map +1 -0
  303. package/node_modules/@orient-cli/coding-agent/dist/config.d.ts +77 -0
  304. package/node_modules/@orient-cli/coding-agent/dist/config.d.ts.map +1 -0
  305. package/node_modules/@orient-cli/coding-agent/dist/config.js +229 -0
  306. package/node_modules/@orient-cli/coding-agent/dist/config.js.map +1 -0
  307. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts +83 -0
  308. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -0
  309. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js +236 -0
  310. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js.map +1 -0
  311. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts +86 -0
  312. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts.map +1 -0
  313. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js +116 -0
  314. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js.map +1 -0
  315. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts +585 -0
  316. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts.map +1 -0
  317. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js +2497 -0
  318. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js.map +1 -0
  319. package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts +132 -0
  320. package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts.map +1 -0
  321. package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js +422 -0
  322. package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js.map +1 -0
  323. package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts +46 -0
  324. package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts.map +1 -0
  325. package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js +125 -0
  326. package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js.map +1 -0
  327. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts +88 -0
  328. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -0
  329. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js +243 -0
  330. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js.map +1 -0
  331. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts +121 -0
  332. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts.map +1 -0
  333. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js +613 -0
  334. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js.map +1 -0
  335. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts +7 -0
  336. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts.map +1 -0
  337. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js +7 -0
  338. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js.map +1 -0
  339. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts +38 -0
  340. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts.map +1 -0
  341. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js +153 -0
  342. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js.map +1 -0
  343. package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts +3 -0
  344. package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts.map +1 -0
  345. package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js +2 -0
  346. package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js.map +1 -0
  347. package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts +15 -0
  348. package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts.map +1 -0
  349. package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js +2 -0
  350. package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js.map +1 -0
  351. package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts +9 -0
  352. package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts.map +1 -0
  353. package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js +25 -0
  354. package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js.map +1 -0
  355. package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts +29 -0
  356. package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts.map +1 -0
  357. package/node_modules/@orient-cli/coding-agent/dist/core/exec.js +75 -0
  358. package/node_modules/@orient-cli/coding-agent/dist/core/exec.js.map +1 -0
  359. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts +22 -0
  360. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
  361. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js +249 -0
  362. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js.map +1 -0
  363. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts +37 -0
  364. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts.map +1 -0
  365. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js +224 -0
  366. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js.map +1 -0
  367. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.css +1001 -0
  368. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.html +55 -0
  369. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.js +1690 -0
  370. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts +40 -0
  371. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts.map +1 -0
  372. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js +95 -0
  373. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js.map +1 -0
  374. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/highlight.min.js +1213 -0
  375. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/marked.min.js +6 -0
  376. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts +12 -0
  377. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts.map +1 -0
  378. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js +9 -0
  379. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js.map +1 -0
  380. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts +25 -0
  381. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts.map +1 -0
  382. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js +438 -0
  383. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js.map +1 -0
  384. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts +148 -0
  385. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts.map +1 -0
  386. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js +700 -0
  387. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js.map +1 -0
  388. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts +1073 -0
  389. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts.map +1 -0
  390. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js +45 -0
  391. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js.map +1 -0
  392. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts +20 -0
  393. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts.map +1 -0
  394. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js +22 -0
  395. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js.map +1 -0
  396. package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts +48 -0
  397. package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts.map +1 -0
  398. package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js +314 -0
  399. package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js.map +1 -0
  400. package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts +12 -0
  401. package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts.map +1 -0
  402. package/node_modules/@orient-cli/coding-agent/dist/core/index.js +12 -0
  403. package/node_modules/@orient-cli/coding-agent/dist/core/index.js.map +1 -0
  404. package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts +288 -0
  405. package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts.map +1 -0
  406. package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js +240 -0
  407. package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js.map +1 -0
  408. package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts +77 -0
  409. package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts.map +1 -0
  410. package/node_modules/@orient-cli/coding-agent/dist/core/messages.js +123 -0
  411. package/node_modules/@orient-cli/coding-agent/dist/core/messages.js.map +1 -0
  412. package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts +132 -0
  413. package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts.map +1 -0
  414. package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js +612 -0
  415. package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js.map +1 -0
  416. package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts +110 -0
  417. package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts.map +1 -0
  418. package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js +486 -0
  419. package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js.map +1 -0
  420. package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts +6 -0
  421. package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts.map +1 -0
  422. package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js +59 -0
  423. package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js.map +1 -0
  424. package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts +192 -0
  425. package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts.map +1 -0
  426. package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js +1829 -0
  427. package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js.map +1 -0
  428. package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts +51 -0
  429. package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts.map +1 -0
  430. package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js +249 -0
  431. package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js.map +1 -0
  432. package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts +23 -0
  433. package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts.map +1 -0
  434. package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js +126 -0
  435. package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js.map +1 -0
  436. package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts +185 -0
  437. package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts.map +1 -0
  438. package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js +720 -0
  439. package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js.map +1 -0
  440. package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts +93 -0
  441. package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts.map +1 -0
  442. package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js +236 -0
  443. package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js.map +1 -0
  444. package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts +19 -0
  445. package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts.map +1 -0
  446. package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js +38 -0
  447. package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js.map +1 -0
  448. package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts +333 -0
  449. package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts.map +1 -0
  450. package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js +1105 -0
  451. package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js.map +1 -0
  452. package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts +237 -0
  453. package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts.map +1 -0
  454. package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js +708 -0
  455. package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js.map +1 -0
  456. package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts +60 -0
  457. package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts.map +1 -0
  458. package/node_modules/@orient-cli/coding-agent/dist/core/skills.js +409 -0
  459. package/node_modules/@orient-cli/coding-agent/dist/core/skills.js.map +1 -0
  460. package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts +14 -0
  461. package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts.map +1 -0
  462. package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.js +23 -0
  463. package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.js.map +1 -0
  464. package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts +18 -0
  465. package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts.map +1 -0
  466. package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js +19 -0
  467. package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js.map +1 -0
  468. package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts +28 -0
  469. package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts.map +1 -0
  470. package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js +116 -0
  471. package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js.map +1 -0
  472. package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts +8 -0
  473. package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts.map +1 -0
  474. package/node_modules/@orient-cli/coding-agent/dist/core/timings.js +31 -0
  475. package/node_modules/@orient-cli/coding-agent/dist/core/timings.js.map +1 -0
  476. package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts +73 -0
  477. package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts.map +1 -0
  478. package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js +352 -0
  479. package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js.map +1 -0
  480. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts +85 -0
  481. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts.map +1 -0
  482. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js +337 -0
  483. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js.map +1 -0
  484. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts +53 -0
  485. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts.map +1 -0
  486. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js +196 -0
  487. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js.map +1 -0
  488. package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts +6 -0
  489. package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
  490. package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js +37 -0
  491. package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js.map +1 -0
  492. package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts +46 -0
  493. package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts.map +1 -0
  494. package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js +258 -0
  495. package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js.map +1 -0
  496. package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts +56 -0
  497. package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts.map +1 -0
  498. package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js +293 -0
  499. package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js.map +1 -0
  500. package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts +115 -0
  501. package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts.map +1 -0
  502. package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js +86 -0
  503. package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js.map +1 -0
  504. package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts +46 -0
  505. package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts.map +1 -0
  506. package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js +172 -0
  507. package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js.map +1 -0
  508. package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts +8 -0
  509. package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts.map +1 -0
  510. package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js +81 -0
  511. package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js.map +1 -0
  512. package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts +46 -0
  513. package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts.map +1 -0
  514. package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js +225 -0
  515. package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js.map +1 -0
  516. package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts +21 -0
  517. package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts.map +1 -0
  518. package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js +49 -0
  519. package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js.map +1 -0
  520. package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
  521. package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
  522. package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js +32 -0
  523. package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js.map +1 -0
  524. package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts +70 -0
  525. package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts.map +1 -0
  526. package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js +205 -0
  527. package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js.map +1 -0
  528. package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts +35 -0
  529. package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts.map +1 -0
  530. package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js +216 -0
  531. package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js.map +1 -0
  532. package/node_modules/@orient-cli/coding-agent/dist/index.d.ts +28 -0
  533. package/node_modules/@orient-cli/coding-agent/dist/index.d.ts.map +1 -0
  534. package/node_modules/@orient-cli/coding-agent/dist/index.js +43 -0
  535. package/node_modules/@orient-cli/coding-agent/dist/index.js.map +1 -0
  536. package/node_modules/@orient-cli/coding-agent/dist/main.d.ts +8 -0
  537. package/node_modules/@orient-cli/coding-agent/dist/main.d.ts.map +1 -0
  538. package/node_modules/@orient-cli/coding-agent/dist/main.js +593 -0
  539. package/node_modules/@orient-cli/coding-agent/dist/main.js.map +1 -0
  540. package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts +33 -0
  541. package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts.map +1 -0
  542. package/node_modules/@orient-cli/coding-agent/dist/migrations.js +281 -0
  543. package/node_modules/@orient-cli/coding-agent/dist/migrations.js.map +1 -0
  544. package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts +9 -0
  545. package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts.map +1 -0
  546. package/node_modules/@orient-cli/coding-agent/dist/modes/index.js +8 -0
  547. package/node_modules/@orient-cli/coding-agent/dist/modes/index.js.map +1 -0
  548. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts +18 -0
  549. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
  550. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js +107 -0
  551. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -0
  552. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts +34 -0
  553. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
  554. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js +175 -0
  555. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -0
  556. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
  557. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
  558. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js +51 -0
  559. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js.map +1 -0
  560. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
  561. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
  562. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js +44 -0
  563. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
  564. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
  565. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
  566. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js +45 -0
  567. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
  568. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts +71 -0
  569. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
  570. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js +479 -0
  571. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js.map +1 -0
  572. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
  573. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
  574. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js +33 -0
  575. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js.map +1 -0
  576. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts +21 -0
  577. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
  578. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js +70 -0
  579. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js.map +1 -0
  580. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts +20 -0
  581. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
  582. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js +79 -0
  583. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js.map +1 -0
  584. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts +12 -0
  585. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts.map +1 -0
  586. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js +133 -0
  587. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js.map +1 -0
  588. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
  589. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
  590. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js +21 -0
  591. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js.map +1 -0
  592. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts +20 -0
  593. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
  594. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js +111 -0
  595. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js.map +1 -0
  596. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts +23 -0
  597. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
  598. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js +61 -0
  599. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js.map +1 -0
  600. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts +24 -0
  601. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
  602. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js +78 -0
  603. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js.map +1 -0
  604. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts +27 -0
  605. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -0
  606. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js +201 -0
  607. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js.map +1 -0
  608. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts +31 -0
  609. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -0
  610. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js +34 -0
  611. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js.map +1 -0
  612. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts +8 -0
  613. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
  614. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js +22 -0
  615. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
  616. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts +42 -0
  617. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
  618. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js +145 -0
  619. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -0
  620. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts +47 -0
  621. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
  622. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js +275 -0
  623. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -0
  624. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts +19 -0
  625. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
  626. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js +97 -0
  627. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js.map +1 -0
  628. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts +53 -0
  629. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts.map +1 -0
  630. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js +204 -0
  631. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js.map +1 -0
  632. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts +49 -0
  633. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
  634. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js +275 -0
  635. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
  636. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
  637. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
  638. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js +155 -0
  639. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js.map +1 -0
  640. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts +95 -0
  641. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
  642. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js +848 -0
  643. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js.map +1 -0
  644. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts +58 -0
  645. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
  646. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js +301 -0
  647. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -0
  648. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
  649. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
  650. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js +39 -0
  651. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js.map +1 -0
  652. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
  653. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
  654. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js +47 -0
  655. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
  656. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts +11 -0
  657. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
  658. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js +50 -0
  659. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js.map +1 -0
  660. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
  661. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
  662. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js +51 -0
  663. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js.map +1 -0
  664. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts +58 -0
  665. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
  666. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js +274 -0
  667. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -0
  668. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts +89 -0
  669. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
  670. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js +1084 -0
  671. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js.map +1 -0
  672. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
  673. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
  674. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js +113 -0
  675. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js.map +1 -0
  676. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts +9 -0
  677. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -0
  678. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js +28 -0
  679. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js.map +1 -0
  680. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
  681. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
  682. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js +33 -0
  683. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js.map +1 -0
  684. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts +321 -0
  685. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
  686. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js +4000 -0
  687. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -0
  688. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/dark.json +85 -0
  689. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/light.json +84 -0
  690. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme-schema.json +335 -0
  691. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts +81 -0
  692. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -0
  693. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js +979 -0
  694. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js.map +1 -0
  695. package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts +28 -0
  696. package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts.map +1 -0
  697. package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js +112 -0
  698. package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js.map +1 -0
  699. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts +17 -0
  700. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts.map +1 -0
  701. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js +49 -0
  702. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js.map +1 -0
  703. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts +217 -0
  704. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -0
  705. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js +402 -0
  706. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js.map +1 -0
  707. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts +20 -0
  708. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
  709. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js +550 -0
  710. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -0
  711. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts +408 -0
  712. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -0
  713. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js +8 -0
  714. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js.map +1 -0
  715. package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts +4 -0
  716. package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts.map +1 -0
  717. package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js +234 -0
  718. package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js.map +1 -0
  719. package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts +21 -0
  720. package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts.map +1 -0
  721. package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js +87 -0
  722. package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js.map +1 -0
  723. package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts +11 -0
  724. package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts.map +1 -0
  725. package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js +78 -0
  726. package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js.map +1 -0
  727. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts +11 -0
  728. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts.map +1 -0
  729. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js +245 -0
  730. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js.map +1 -0
  731. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts +8 -0
  732. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts.map +1 -0
  733. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js +14 -0
  734. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js.map +1 -0
  735. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts +2 -0
  736. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts.map +1 -0
  737. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js +78 -0
  738. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js.map +1 -0
  739. package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts +5 -0
  740. package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts.map +1 -0
  741. package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js +158 -0
  742. package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js.map +1 -0
  743. package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts +8 -0
  744. package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts.map +1 -0
  745. package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js +26 -0
  746. package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js.map +1 -0
  747. package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts +26 -0
  748. package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts.map +1 -0
  749. package/node_modules/@orient-cli/coding-agent/dist/utils/git.js +163 -0
  750. package/node_modules/@orient-cli/coding-agent/dist/utils/git.js.map +1 -0
  751. package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts +9 -0
  752. package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts.map +1 -0
  753. package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js +39 -0
  754. package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js.map +1 -0
  755. package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts +36 -0
  756. package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts.map +1 -0
  757. package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js +137 -0
  758. package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js.map +1 -0
  759. package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts +2 -0
  760. package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts.map +1 -0
  761. package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js +26 -0
  762. package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js.map +1 -0
  763. package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts +7 -0
  764. package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts.map +1 -0
  765. package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js +19 -0
  766. package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js.map +1 -0
  767. package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts +21 -0
  768. package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts.map +1 -0
  769. package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js +121 -0
  770. package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js.map +1 -0
  771. package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts +26 -0
  772. package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts.map +1 -0
  773. package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js +186 -0
  774. package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js.map +1 -0
  775. package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts +5 -0
  776. package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts.map +1 -0
  777. package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js +17 -0
  778. package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js.map +1 -0
  779. package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts +3 -0
  780. package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts.map +1 -0
  781. package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js +252 -0
  782. package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js.map +1 -0
  783. package/node_modules/@orient-cli/coding-agent/package.json +104 -0
  784. package/node_modules/@orient-cli/tui/README.md +767 -0
  785. package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts +52 -0
  786. package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts.map +1 -0
  787. package/node_modules/@orient-cli/tui/dist/autocomplete.js +623 -0
  788. package/node_modules/@orient-cli/tui/dist/autocomplete.js.map +1 -0
  789. package/node_modules/@orient-cli/tui/dist/components/box.d.ts +22 -0
  790. package/node_modules/@orient-cli/tui/dist/components/box.d.ts.map +1 -0
  791. package/node_modules/@orient-cli/tui/dist/components/box.js +104 -0
  792. package/node_modules/@orient-cli/tui/dist/components/box.js.map +1 -0
  793. package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts +22 -0
  794. package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts.map +1 -0
  795. package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js +35 -0
  796. package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js.map +1 -0
  797. package/node_modules/@orient-cli/tui/dist/components/editor.d.ts +244 -0
  798. package/node_modules/@orient-cli/tui/dist/components/editor.d.ts.map +1 -0
  799. package/node_modules/@orient-cli/tui/dist/components/editor.js +1861 -0
  800. package/node_modules/@orient-cli/tui/dist/components/editor.js.map +1 -0
  801. package/node_modules/@orient-cli/tui/dist/components/image.d.ts +28 -0
  802. package/node_modules/@orient-cli/tui/dist/components/image.d.ts.map +1 -0
  803. package/node_modules/@orient-cli/tui/dist/components/image.js +69 -0
  804. package/node_modules/@orient-cli/tui/dist/components/image.js.map +1 -0
  805. package/node_modules/@orient-cli/tui/dist/components/input.d.ts +37 -0
  806. package/node_modules/@orient-cli/tui/dist/components/input.d.ts.map +1 -0
  807. package/node_modules/@orient-cli/tui/dist/components/input.js +426 -0
  808. package/node_modules/@orient-cli/tui/dist/components/input.js.map +1 -0
  809. package/node_modules/@orient-cli/tui/dist/components/loader.d.ts +21 -0
  810. package/node_modules/@orient-cli/tui/dist/components/loader.d.ts.map +1 -0
  811. package/node_modules/@orient-cli/tui/dist/components/loader.js +49 -0
  812. package/node_modules/@orient-cli/tui/dist/components/loader.js.map +1 -0
  813. package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts +95 -0
  814. package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts.map +1 -0
  815. package/node_modules/@orient-cli/tui/dist/components/markdown.js +663 -0
  816. package/node_modules/@orient-cli/tui/dist/components/markdown.js.map +1 -0
  817. package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts +50 -0
  818. package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts.map +1 -0
  819. package/node_modules/@orient-cli/tui/dist/components/select-list.js +159 -0
  820. package/node_modules/@orient-cli/tui/dist/components/select-list.js.map +1 -0
  821. package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts +50 -0
  822. package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts.map +1 -0
  823. package/node_modules/@orient-cli/tui/dist/components/settings-list.js +185 -0
  824. package/node_modules/@orient-cli/tui/dist/components/settings-list.js.map +1 -0
  825. package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts +12 -0
  826. package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts.map +1 -0
  827. package/node_modules/@orient-cli/tui/dist/components/spacer.js +23 -0
  828. package/node_modules/@orient-cli/tui/dist/components/spacer.js.map +1 -0
  829. package/node_modules/@orient-cli/tui/dist/components/text.d.ts +19 -0
  830. package/node_modules/@orient-cli/tui/dist/components/text.d.ts.map +1 -0
  831. package/node_modules/@orient-cli/tui/dist/components/text.js +89 -0
  832. package/node_modules/@orient-cli/tui/dist/components/text.js.map +1 -0
  833. package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts +13 -0
  834. package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts.map +1 -0
  835. package/node_modules/@orient-cli/tui/dist/components/truncated-text.js +51 -0
  836. package/node_modules/@orient-cli/tui/dist/components/truncated-text.js.map +1 -0
  837. package/node_modules/@orient-cli/tui/dist/editor-component.d.ts +39 -0
  838. package/node_modules/@orient-cli/tui/dist/editor-component.d.ts.map +1 -0
  839. package/node_modules/@orient-cli/tui/dist/editor-component.js +2 -0
  840. package/node_modules/@orient-cli/tui/dist/editor-component.js.map +1 -0
  841. package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts +16 -0
  842. package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts.map +1 -0
  843. package/node_modules/@orient-cli/tui/dist/fuzzy.js +107 -0
  844. package/node_modules/@orient-cli/tui/dist/fuzzy.js.map +1 -0
  845. package/node_modules/@orient-cli/tui/dist/index.d.ts +23 -0
  846. package/node_modules/@orient-cli/tui/dist/index.d.ts.map +1 -0
  847. package/node_modules/@orient-cli/tui/dist/index.js +32 -0
  848. package/node_modules/@orient-cli/tui/dist/index.js.map +1 -0
  849. package/node_modules/@orient-cli/tui/dist/keybindings.d.ts +193 -0
  850. package/node_modules/@orient-cli/tui/dist/keybindings.d.ts.map +1 -0
  851. package/node_modules/@orient-cli/tui/dist/keybindings.js +174 -0
  852. package/node_modules/@orient-cli/tui/dist/keybindings.js.map +1 -0
  853. package/node_modules/@orient-cli/tui/dist/keys.d.ts +170 -0
  854. package/node_modules/@orient-cli/tui/dist/keys.d.ts.map +1 -0
  855. package/node_modules/@orient-cli/tui/dist/keys.js +1124 -0
  856. package/node_modules/@orient-cli/tui/dist/keys.js.map +1 -0
  857. package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts +28 -0
  858. package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts.map +1 -0
  859. package/node_modules/@orient-cli/tui/dist/kill-ring.js +44 -0
  860. package/node_modules/@orient-cli/tui/dist/kill-ring.js.map +1 -0
  861. package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts +48 -0
  862. package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts.map +1 -0
  863. package/node_modules/@orient-cli/tui/dist/stdin-buffer.js +317 -0
  864. package/node_modules/@orient-cli/tui/dist/stdin-buffer.js.map +1 -0
  865. package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts +68 -0
  866. package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts.map +1 -0
  867. package/node_modules/@orient-cli/tui/dist/terminal-image.js +288 -0
  868. package/node_modules/@orient-cli/tui/dist/terminal-image.js.map +1 -0
  869. package/node_modules/@orient-cli/tui/dist/terminal.d.ts +84 -0
  870. package/node_modules/@orient-cli/tui/dist/terminal.d.ts.map +1 -0
  871. package/node_modules/@orient-cli/tui/dist/terminal.js +285 -0
  872. package/node_modules/@orient-cli/tui/dist/terminal.js.map +1 -0
  873. package/node_modules/@orient-cli/tui/dist/tui.d.ts +222 -0
  874. package/node_modules/@orient-cli/tui/dist/tui.d.ts.map +1 -0
  875. package/node_modules/@orient-cli/tui/dist/tui.js +1008 -0
  876. package/node_modules/@orient-cli/tui/dist/tui.js.map +1 -0
  877. package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts +17 -0
  878. package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts.map +1 -0
  879. package/node_modules/@orient-cli/tui/dist/undo-stack.js +25 -0
  880. package/node_modules/@orient-cli/tui/dist/undo-stack.js.map +1 -0
  881. package/node_modules/@orient-cli/tui/dist/utils.d.ts +78 -0
  882. package/node_modules/@orient-cli/tui/dist/utils.d.ts.map +1 -0
  883. package/node_modules/@orient-cli/tui/dist/utils.js +960 -0
  884. package/node_modules/@orient-cli/tui/dist/utils.js.map +1 -0
  885. package/node_modules/@orient-cli/tui/package.json +52 -0
  886. package/package.json +47 -8
  887. package/prompts/orient-blockers.md +0 -0
  888. package/prompts/orient-handoff.md +0 -0
  889. package/prompts/orient-recap.md +0 -0
  890. package/schemas/orient-full/schema.yaml +0 -0
  891. package/schemas/orient-minimal/schema.yaml +0 -0
  892. package/schemas/orient-standard/schema.yaml +0 -0
  893. package/schemas/orient-standard/templates/archive-summary.md +0 -0
  894. package/schemas/orient-standard/templates/brief.md +0 -0
  895. package/schemas/orient-standard/templates/constitution.md +0 -0
  896. package/schemas/orient-standard/templates/current-system-audit.md +0 -0
  897. package/schemas/orient-standard/templates/current-truth-sync.md +0 -0
  898. package/schemas/orient-standard/templates/decisions.md +0 -0
  899. package/schemas/orient-standard/templates/normalize-checklist.md +0 -0
  900. package/schemas/orient-standard/templates/plan.md +0 -0
  901. package/schemas/orient-standard/templates/qa-checklist.md +0 -0
  902. package/schemas/orient-standard/templates/research.md +0 -0
  903. package/schemas/orient-standard/templates/sources.md +0 -0
  904. package/schemas/orient-standard/templates/spec.md +0 -0
  905. package/schemas/orient-standard/templates/state.md +0 -0
  906. package/schemas/orient-standard/templates/tasks.md +0 -0
  907. package/schemas/orient-standard/templates/traceability-matrix.md +0 -0
  908. package/schemas/orient-standard/templates/verify.md +0 -0
  909. package/schemas/orient-standard/templates/work-log.md +0 -0
  910. package/schemas/orient-standard/templates-tier-1/brief.md +22 -0
  911. package/schemas/orient-standard/templates-tier-1/plan.md +17 -0
  912. package/schemas/orient-standard/templates-tier-1/spec.md +23 -0
  913. package/schemas/orient-standard/templates-tier-1/tasks.md +14 -0
  914. package/schemas/orient-standard/templates-tier-2/brief.md +32 -0
  915. package/schemas/orient-standard/templates-tier-2/plan.md +44 -0
  916. package/schemas/orient-standard/templates-tier-2/spec.md +46 -0
  917. package/schemas/orient-standard/templates-tier-2/tasks.md +34 -0
  918. package/schemas/orient-standard/templates-tier-3/brief.md +54 -0
  919. package/schemas/orient-standard/templates-tier-3/plan.md +67 -0
  920. package/schemas/orient-standard/templates-tier-3/spec.md +65 -0
  921. package/schemas/orient-standard/templates-tier-3/tasks.md +79 -0
  922. package/skills/orient-analyze/SKILL.md +0 -0
  923. package/skills/orient-archive/SKILL.md +0 -0
  924. package/skills/orient-clarify/SKILL.md +0 -0
  925. package/skills/orient-constitution/SKILL.md +0 -0
  926. package/skills/orient-decide/SKILL.md +0 -0
  927. package/skills/orient-execute/SKILL.md +0 -0
  928. package/skills/orient-integrate/SKILL.md +0 -0
  929. package/skills/orient-normalize/SKILL.md +0 -0
  930. package/skills/orient-orient/SKILL.md +0 -0
  931. package/skills/orient-plan/SKILL.md +0 -0
  932. package/skills/orient-research/SKILL.md +0 -0
  933. package/skills/orient-state/SKILL.md +0 -0
  934. package/skills/orient-tasks/SKILL.md +0 -0
  935. package/skills/orient-test/SKILL.md +0 -0
  936. package/skills/orient-verify/SKILL.md +0 -0
@@ -0,0 +1,1084 @@
1
+ import { Container, getKeybindings, Input, matchesKey, Spacer, Text, TruncatedText, truncateToWidth, } from "@orient-cli/tui";
2
+ import { theme } from "../theme/theme.js";
3
+ import { DynamicBorder } from "./dynamic-border.js";
4
+ import { keyHint, keyText } from "./keybinding-hints.js";
5
+ class TreeList {
6
+ flatNodes = [];
7
+ filteredNodes = [];
8
+ selectedIndex = 0;
9
+ currentLeafId;
10
+ maxVisibleLines;
11
+ filterMode = "default";
12
+ searchQuery = "";
13
+ toolCallMap = new Map();
14
+ multipleRoots = false;
15
+ showLabelTimestamps = false;
16
+ activePathIds = new Set();
17
+ visibleParentMap = new Map();
18
+ visibleChildrenMap = new Map();
19
+ lastSelectedId = null;
20
+ foldedNodes = new Set();
21
+ onSelect;
22
+ onCancel;
23
+ onLabelEdit;
24
+ constructor(tree, currentLeafId, maxVisibleLines, initialSelectedId, initialFilterMode) {
25
+ this.currentLeafId = currentLeafId;
26
+ this.maxVisibleLines = maxVisibleLines;
27
+ this.filterMode = initialFilterMode ?? "default";
28
+ this.multipleRoots = tree.length > 1;
29
+ this.flatNodes = this.flattenTree(tree);
30
+ this.buildActivePath();
31
+ this.applyFilter();
32
+ // Start with initialSelectedId if provided, otherwise current leaf
33
+ const targetId = initialSelectedId ?? currentLeafId;
34
+ this.selectedIndex = this.findNearestVisibleIndex(targetId);
35
+ this.lastSelectedId = this.filteredNodes[this.selectedIndex]?.node.entry.id ?? null;
36
+ }
37
+ /**
38
+ * Find the index of the nearest visible entry, walking up the parent chain if needed.
39
+ * Returns the index in filteredNodes, or the last index as fallback.
40
+ */
41
+ findNearestVisibleIndex(entryId) {
42
+ if (this.filteredNodes.length === 0)
43
+ return 0;
44
+ // Build a map for parent lookup
45
+ const entryMap = new Map();
46
+ for (const flatNode of this.flatNodes) {
47
+ entryMap.set(flatNode.node.entry.id, flatNode);
48
+ }
49
+ // Build a map of visible entry IDs to their indices in filteredNodes
50
+ const visibleIdToIndex = new Map(this.filteredNodes.map((node, i) => [node.node.entry.id, i]));
51
+ // Walk from entryId up to root, looking for a visible entry
52
+ let currentId = entryId;
53
+ while (currentId !== null) {
54
+ const index = visibleIdToIndex.get(currentId);
55
+ if (index !== undefined)
56
+ return index;
57
+ const node = entryMap.get(currentId);
58
+ if (!node)
59
+ break;
60
+ currentId = node.node.entry.parentId ?? null;
61
+ }
62
+ // Fallback: last visible entry
63
+ return this.filteredNodes.length - 1;
64
+ }
65
+ /** Build the set of entry IDs on the path from root to current leaf */
66
+ buildActivePath() {
67
+ this.activePathIds.clear();
68
+ if (!this.currentLeafId)
69
+ return;
70
+ // Build a map of id -> entry for parent lookup
71
+ const entryMap = new Map();
72
+ for (const flatNode of this.flatNodes) {
73
+ entryMap.set(flatNode.node.entry.id, flatNode);
74
+ }
75
+ // Walk from leaf to root
76
+ let currentId = this.currentLeafId;
77
+ while (currentId) {
78
+ this.activePathIds.add(currentId);
79
+ const node = entryMap.get(currentId);
80
+ if (!node)
81
+ break;
82
+ currentId = node.node.entry.parentId ?? null;
83
+ }
84
+ }
85
+ flattenTree(roots) {
86
+ const result = [];
87
+ this.toolCallMap.clear();
88
+ const stack = [];
89
+ // Determine which subtrees contain the active leaf (to sort current branch first)
90
+ // Use iterative post-order traversal to avoid stack overflow
91
+ const containsActive = new Map();
92
+ const leafId = this.currentLeafId;
93
+ {
94
+ // Build list in pre-order, then process in reverse for post-order effect
95
+ const allNodes = [];
96
+ const preOrderStack = [...roots];
97
+ while (preOrderStack.length > 0) {
98
+ const node = preOrderStack.pop();
99
+ allNodes.push(node);
100
+ // Push children in reverse so they're processed left-to-right
101
+ for (let i = node.children.length - 1; i >= 0; i--) {
102
+ preOrderStack.push(node.children[i]);
103
+ }
104
+ }
105
+ // Process in reverse (post-order): children before parents
106
+ for (let i = allNodes.length - 1; i >= 0; i--) {
107
+ const node = allNodes[i];
108
+ let has = leafId !== null && node.entry.id === leafId;
109
+ for (const child of node.children) {
110
+ if (containsActive.get(child)) {
111
+ has = true;
112
+ }
113
+ }
114
+ containsActive.set(node, has);
115
+ }
116
+ }
117
+ // Add roots in reverse order, prioritizing the one containing the active leaf
118
+ // If multiple roots, treat them as children of a virtual root that branches
119
+ const multipleRoots = roots.length > 1;
120
+ const orderedRoots = [...roots].sort((a, b) => Number(containsActive.get(b)) - Number(containsActive.get(a)));
121
+ for (let i = orderedRoots.length - 1; i >= 0; i--) {
122
+ const isLast = i === orderedRoots.length - 1;
123
+ stack.push([orderedRoots[i], multipleRoots ? 1 : 0, multipleRoots, multipleRoots, isLast, [], multipleRoots]);
124
+ }
125
+ while (stack.length > 0) {
126
+ const [node, indent, justBranched, showConnector, isLast, gutters, isVirtualRootChild] = stack.pop();
127
+ // Extract tool calls from assistant messages for later lookup
128
+ const entry = node.entry;
129
+ if (entry.type === "message" && entry.message.role === "assistant") {
130
+ const content = entry.message.content;
131
+ if (Array.isArray(content)) {
132
+ for (const block of content) {
133
+ if (typeof block === "object" && block !== null && "type" in block && block.type === "toolCall") {
134
+ const tc = block;
135
+ this.toolCallMap.set(tc.id, { name: tc.name, arguments: tc.arguments });
136
+ }
137
+ }
138
+ }
139
+ }
140
+ result.push({ node, indent, showConnector, isLast, gutters, isVirtualRootChild });
141
+ const children = node.children;
142
+ const multipleChildren = children.length > 1;
143
+ // Order children so the branch containing the active leaf comes first
144
+ const orderedChildren = (() => {
145
+ const prioritized = [];
146
+ const rest = [];
147
+ for (const child of children) {
148
+ if (containsActive.get(child)) {
149
+ prioritized.push(child);
150
+ }
151
+ else {
152
+ rest.push(child);
153
+ }
154
+ }
155
+ return [...prioritized, ...rest];
156
+ })();
157
+ // Calculate child indent
158
+ let childIndent;
159
+ if (multipleChildren) {
160
+ // Parent branches: children get +1
161
+ childIndent = indent + 1;
162
+ }
163
+ else if (justBranched && indent > 0) {
164
+ // First generation after a branch: +1 for visual grouping
165
+ childIndent = indent + 1;
166
+ }
167
+ else {
168
+ // Single-child chain: stay flat
169
+ childIndent = indent;
170
+ }
171
+ // Build gutters for children
172
+ // If this node showed a connector, add a gutter entry for descendants
173
+ // Only add gutter if connector is actually displayed (not suppressed for virtual root children)
174
+ const connectorDisplayed = showConnector && !isVirtualRootChild;
175
+ // When connector is displayed, add a gutter entry at the connector's position
176
+ // Connector is at position (displayIndent - 1), so gutter should be there too
177
+ const currentDisplayIndent = this.multipleRoots ? Math.max(0, indent - 1) : indent;
178
+ const connectorPosition = Math.max(0, currentDisplayIndent - 1);
179
+ const childGutters = connectorDisplayed
180
+ ? [...gutters, { position: connectorPosition, show: !isLast }]
181
+ : gutters;
182
+ // Add children in reverse order
183
+ for (let i = orderedChildren.length - 1; i >= 0; i--) {
184
+ const childIsLast = i === orderedChildren.length - 1;
185
+ stack.push([
186
+ orderedChildren[i],
187
+ childIndent,
188
+ multipleChildren,
189
+ multipleChildren,
190
+ childIsLast,
191
+ childGutters,
192
+ false,
193
+ ]);
194
+ }
195
+ }
196
+ return result;
197
+ }
198
+ applyFilter() {
199
+ // Update lastSelectedId only when we have a valid selection (non-empty list)
200
+ // This preserves the selection when switching through empty filter results
201
+ if (this.filteredNodes.length > 0) {
202
+ this.lastSelectedId = this.filteredNodes[this.selectedIndex]?.node.entry.id ?? this.lastSelectedId;
203
+ }
204
+ const searchTokens = this.searchQuery.toLowerCase().split(/\s+/).filter(Boolean);
205
+ this.filteredNodes = this.flatNodes.filter((flatNode) => {
206
+ const entry = flatNode.node.entry;
207
+ const isCurrentLeaf = entry.id === this.currentLeafId;
208
+ // Skip assistant messages with only tool calls (no text) unless error/aborted
209
+ // Always show current leaf so active position is visible
210
+ if (entry.type === "message" && entry.message.role === "assistant" && !isCurrentLeaf) {
211
+ const msg = entry.message;
212
+ const hasText = this.hasTextContent(msg.content);
213
+ const isErrorOrAborted = msg.stopReason && msg.stopReason !== "stop" && msg.stopReason !== "toolUse";
214
+ // Only hide if no text AND not an error/aborted message
215
+ if (!hasText && !isErrorOrAborted) {
216
+ return false;
217
+ }
218
+ }
219
+ // Apply filter mode
220
+ let passesFilter = true;
221
+ // Entry types hidden in default view (settings/bookkeeping)
222
+ const isSettingsEntry = entry.type === "label" ||
223
+ entry.type === "custom" ||
224
+ entry.type === "model_change" ||
225
+ entry.type === "thinking_level_change" ||
226
+ entry.type === "session_info";
227
+ switch (this.filterMode) {
228
+ case "user-only":
229
+ // Just user messages
230
+ passesFilter = entry.type === "message" && entry.message.role === "user";
231
+ break;
232
+ case "no-tools":
233
+ // Default minus tool results
234
+ passesFilter = !isSettingsEntry && !(entry.type === "message" && entry.message.role === "toolResult");
235
+ break;
236
+ case "labeled-only":
237
+ // Just labeled entries
238
+ passesFilter = flatNode.node.label !== undefined;
239
+ break;
240
+ case "all":
241
+ // Show everything
242
+ passesFilter = true;
243
+ break;
244
+ default:
245
+ // Default mode: hide settings/bookkeeping entries
246
+ passesFilter = !isSettingsEntry;
247
+ break;
248
+ }
249
+ if (!passesFilter)
250
+ return false;
251
+ // Apply search filter
252
+ if (searchTokens.length > 0) {
253
+ const nodeText = this.getSearchableText(flatNode.node).toLowerCase();
254
+ return searchTokens.every((token) => nodeText.includes(token));
255
+ }
256
+ return true;
257
+ });
258
+ // Filter out descendants of folded nodes.
259
+ if (this.foldedNodes.size > 0) {
260
+ const skipSet = new Set();
261
+ for (const flatNode of this.flatNodes) {
262
+ const { id, parentId } = flatNode.node.entry;
263
+ if (parentId != null && (this.foldedNodes.has(parentId) || skipSet.has(parentId))) {
264
+ skipSet.add(id);
265
+ }
266
+ }
267
+ this.filteredNodes = this.filteredNodes.filter((flatNode) => !skipSet.has(flatNode.node.entry.id));
268
+ }
269
+ // Recalculate visual structure (indent, connectors, gutters) based on visible tree
270
+ this.recalculateVisualStructure();
271
+ // Try to preserve cursor on the same node, or find nearest visible ancestor
272
+ if (this.lastSelectedId) {
273
+ this.selectedIndex = this.findNearestVisibleIndex(this.lastSelectedId);
274
+ }
275
+ else if (this.selectedIndex >= this.filteredNodes.length) {
276
+ // Clamp index if out of bounds
277
+ this.selectedIndex = Math.max(0, this.filteredNodes.length - 1);
278
+ }
279
+ // Update lastSelectedId to the actual selection (may have changed due to parent walk)
280
+ if (this.filteredNodes.length > 0) {
281
+ this.lastSelectedId = this.filteredNodes[this.selectedIndex]?.node.entry.id ?? this.lastSelectedId;
282
+ }
283
+ }
284
+ /**
285
+ * Recompute indentation/connectors for the filtered view
286
+ *
287
+ * Filtering can hide intermediate entries; descendants attach to the nearest visible ancestor.
288
+ * Keep indentation semantics aligned with flattenTree() so single-child chains don't drift right.
289
+ */
290
+ recalculateVisualStructure() {
291
+ if (this.filteredNodes.length === 0)
292
+ return;
293
+ const visibleIds = new Set(this.filteredNodes.map((n) => n.node.entry.id));
294
+ // Build entry map for efficient parent lookup (using full tree)
295
+ const entryMap = new Map();
296
+ for (const flatNode of this.flatNodes) {
297
+ entryMap.set(flatNode.node.entry.id, flatNode);
298
+ }
299
+ // Find nearest visible ancestor for a node
300
+ const findVisibleAncestor = (nodeId) => {
301
+ let currentId = entryMap.get(nodeId)?.node.entry.parentId ?? null;
302
+ while (currentId !== null) {
303
+ if (visibleIds.has(currentId)) {
304
+ return currentId;
305
+ }
306
+ currentId = entryMap.get(currentId)?.node.entry.parentId ?? null;
307
+ }
308
+ return null;
309
+ };
310
+ // Build visible tree structure:
311
+ // - visibleParent: nodeId → nearest visible ancestor (or null for roots)
312
+ // - visibleChildren: parentId → list of visible children (in filteredNodes order)
313
+ const visibleParent = new Map();
314
+ const visibleChildren = new Map();
315
+ visibleChildren.set(null, []); // root-level nodes
316
+ for (const flatNode of this.filteredNodes) {
317
+ const nodeId = flatNode.node.entry.id;
318
+ const ancestorId = findVisibleAncestor(nodeId);
319
+ visibleParent.set(nodeId, ancestorId);
320
+ if (!visibleChildren.has(ancestorId)) {
321
+ visibleChildren.set(ancestorId, []);
322
+ }
323
+ visibleChildren.get(ancestorId).push(nodeId);
324
+ }
325
+ // Update multipleRoots based on visible roots
326
+ const visibleRootIds = visibleChildren.get(null);
327
+ this.multipleRoots = visibleRootIds.length > 1;
328
+ // Build a map for quick lookup: nodeId → FlatNode
329
+ const filteredNodeMap = new Map();
330
+ for (const flatNode of this.filteredNodes) {
331
+ filteredNodeMap.set(flatNode.node.entry.id, flatNode);
332
+ }
333
+ const stack = [];
334
+ // Add visible roots in reverse order (to process in forward order via stack)
335
+ for (let i = visibleRootIds.length - 1; i >= 0; i--) {
336
+ const isLast = i === visibleRootIds.length - 1;
337
+ stack.push([
338
+ visibleRootIds[i],
339
+ this.multipleRoots ? 1 : 0,
340
+ this.multipleRoots,
341
+ this.multipleRoots,
342
+ isLast,
343
+ [],
344
+ this.multipleRoots,
345
+ ]);
346
+ }
347
+ while (stack.length > 0) {
348
+ const [nodeId, indent, justBranched, showConnector, isLast, gutters, isVirtualRootChild] = stack.pop();
349
+ const flatNode = filteredNodeMap.get(nodeId);
350
+ if (!flatNode)
351
+ continue;
352
+ // Update this node's visual properties
353
+ flatNode.indent = indent;
354
+ flatNode.showConnector = showConnector;
355
+ flatNode.isLast = isLast;
356
+ flatNode.gutters = gutters;
357
+ flatNode.isVirtualRootChild = isVirtualRootChild;
358
+ // Get visible children of this node
359
+ const children = visibleChildren.get(nodeId) || [];
360
+ const multipleChildren = children.length > 1;
361
+ // Child indent follows flattenTree(): branch points (and first generation after a branch) shift +1
362
+ let childIndent;
363
+ if (multipleChildren) {
364
+ childIndent = indent + 1;
365
+ }
366
+ else if (justBranched && indent > 0) {
367
+ childIndent = indent + 1;
368
+ }
369
+ else {
370
+ childIndent = indent;
371
+ }
372
+ // Child gutters follow flattenTree() connector/gutter rules
373
+ const connectorDisplayed = showConnector && !isVirtualRootChild;
374
+ const currentDisplayIndent = this.multipleRoots ? Math.max(0, indent - 1) : indent;
375
+ const connectorPosition = Math.max(0, currentDisplayIndent - 1);
376
+ const childGutters = connectorDisplayed
377
+ ? [...gutters, { position: connectorPosition, show: !isLast }]
378
+ : gutters;
379
+ // Add children in reverse order (to process in forward order via stack)
380
+ for (let i = children.length - 1; i >= 0; i--) {
381
+ const childIsLast = i === children.length - 1;
382
+ stack.push([
383
+ children[i],
384
+ childIndent,
385
+ multipleChildren,
386
+ multipleChildren,
387
+ childIsLast,
388
+ childGutters,
389
+ false,
390
+ ]);
391
+ }
392
+ }
393
+ // Store visible tree maps for ancestor/descendant lookups in navigation
394
+ this.visibleParentMap = visibleParent;
395
+ this.visibleChildrenMap = visibleChildren;
396
+ }
397
+ /** Get searchable text content from a node */
398
+ getSearchableText(node) {
399
+ const entry = node.entry;
400
+ const parts = [];
401
+ if (node.label) {
402
+ parts.push(node.label);
403
+ }
404
+ switch (entry.type) {
405
+ case "message": {
406
+ const msg = entry.message;
407
+ parts.push(msg.role);
408
+ if ("content" in msg && msg.content) {
409
+ parts.push(this.extractContent(msg.content));
410
+ }
411
+ if (msg.role === "bashExecution") {
412
+ const bashMsg = msg;
413
+ if (bashMsg.command)
414
+ parts.push(bashMsg.command);
415
+ }
416
+ break;
417
+ }
418
+ case "custom_message": {
419
+ parts.push(entry.customType);
420
+ if (typeof entry.content === "string") {
421
+ parts.push(entry.content);
422
+ }
423
+ else {
424
+ parts.push(this.extractContent(entry.content));
425
+ }
426
+ break;
427
+ }
428
+ case "compaction":
429
+ parts.push("compaction");
430
+ break;
431
+ case "branch_summary":
432
+ parts.push("branch summary", entry.summary);
433
+ break;
434
+ case "session_info":
435
+ parts.push("title");
436
+ if (entry.name)
437
+ parts.push(entry.name);
438
+ break;
439
+ case "model_change":
440
+ parts.push("model", entry.modelId);
441
+ break;
442
+ case "thinking_level_change":
443
+ parts.push("thinking", entry.thinkingLevel);
444
+ break;
445
+ case "custom":
446
+ parts.push("custom", entry.customType);
447
+ break;
448
+ case "label":
449
+ parts.push("label", entry.label ?? "");
450
+ break;
451
+ }
452
+ return parts.join(" ");
453
+ }
454
+ invalidate() { }
455
+ getSearchQuery() {
456
+ return this.searchQuery;
457
+ }
458
+ getSelectedNode() {
459
+ return this.filteredNodes[this.selectedIndex]?.node;
460
+ }
461
+ updateNodeLabel(entryId, label, labelTimestamp) {
462
+ for (const flatNode of this.flatNodes) {
463
+ if (flatNode.node.entry.id === entryId) {
464
+ flatNode.node.label = label;
465
+ flatNode.node.labelTimestamp = label ? (labelTimestamp ?? new Date().toISOString()) : undefined;
466
+ break;
467
+ }
468
+ }
469
+ }
470
+ getStatusLabels() {
471
+ let labels = "";
472
+ switch (this.filterMode) {
473
+ case "no-tools":
474
+ labels += " [no-tools]";
475
+ break;
476
+ case "user-only":
477
+ labels += " [user]";
478
+ break;
479
+ case "labeled-only":
480
+ labels += " [labeled]";
481
+ break;
482
+ case "all":
483
+ labels += " [all]";
484
+ break;
485
+ }
486
+ if (this.showLabelTimestamps) {
487
+ labels += " [+label time]";
488
+ }
489
+ return labels;
490
+ }
491
+ render(width) {
492
+ const lines = [];
493
+ if (this.filteredNodes.length === 0) {
494
+ lines.push(truncateToWidth(theme.fg("muted", " No entries found"), width));
495
+ lines.push(truncateToWidth(theme.fg("muted", ` (0/0)${this.getStatusLabels()}`), width));
496
+ return lines;
497
+ }
498
+ const startIndex = Math.max(0, Math.min(this.selectedIndex - Math.floor(this.maxVisibleLines / 2), this.filteredNodes.length - this.maxVisibleLines));
499
+ const endIndex = Math.min(startIndex + this.maxVisibleLines, this.filteredNodes.length);
500
+ for (let i = startIndex; i < endIndex; i++) {
501
+ const flatNode = this.filteredNodes[i];
502
+ const entry = flatNode.node.entry;
503
+ const isSelected = i === this.selectedIndex;
504
+ // Build line: cursor + prefix + path marker + label + content
505
+ const cursor = isSelected ? theme.fg("accent", "› ") : " ";
506
+ // If multiple roots, shift display (roots at 0, not 1)
507
+ const displayIndent = this.multipleRoots ? Math.max(0, flatNode.indent - 1) : flatNode.indent;
508
+ // Build prefix with gutters at their correct positions
509
+ // Each gutter has a position (displayIndent where its connector was shown)
510
+ const connector = flatNode.showConnector && !flatNode.isVirtualRootChild ? (flatNode.isLast ? "└─ " : "├─ ") : "";
511
+ const connectorPosition = connector ? displayIndent - 1 : -1;
512
+ // Build prefix char by char, placing gutters and connector at their positions
513
+ const totalChars = displayIndent * 3;
514
+ const prefixChars = [];
515
+ const isFolded = this.foldedNodes.has(entry.id);
516
+ for (let i = 0; i < totalChars; i++) {
517
+ const level = Math.floor(i / 3);
518
+ const posInLevel = i % 3;
519
+ // Check if there's a gutter at this level
520
+ const gutter = flatNode.gutters.find((g) => g.position === level);
521
+ if (gutter) {
522
+ if (posInLevel === 0) {
523
+ prefixChars.push(gutter.show ? "│" : " ");
524
+ }
525
+ else {
526
+ prefixChars.push(" ");
527
+ }
528
+ }
529
+ else if (connector && level === connectorPosition) {
530
+ // Connector at this level, with fold indicator
531
+ if (posInLevel === 0) {
532
+ prefixChars.push(flatNode.isLast ? "└" : "├");
533
+ }
534
+ else if (posInLevel === 1) {
535
+ const foldable = this.isFoldable(entry.id);
536
+ prefixChars.push(isFolded ? "⊞" : foldable ? "⊟" : "─");
537
+ }
538
+ else {
539
+ prefixChars.push(" ");
540
+ }
541
+ }
542
+ else {
543
+ prefixChars.push(" ");
544
+ }
545
+ }
546
+ const prefix = prefixChars.join("");
547
+ // Fold marker for nodes without connectors (roots)
548
+ const showsFoldInConnector = flatNode.showConnector && !flatNode.isVirtualRootChild;
549
+ const foldMarker = isFolded && !showsFoldInConnector ? theme.fg("accent", "⊞ ") : "";
550
+ // Active path marker - shown right before the entry text
551
+ const isOnActivePath = this.activePathIds.has(entry.id);
552
+ const pathMarker = isOnActivePath ? theme.fg("accent", "• ") : "";
553
+ const label = flatNode.node.label ? theme.fg("warning", `[${flatNode.node.label}] `) : "";
554
+ const labelTimestamp = this.showLabelTimestamps && flatNode.node.label && flatNode.node.labelTimestamp
555
+ ? theme.fg("muted", `${this.formatLabelTimestamp(flatNode.node.labelTimestamp)} `)
556
+ : "";
557
+ const content = this.getEntryDisplayText(flatNode.node, isSelected);
558
+ let line = cursor + theme.fg("dim", prefix) + foldMarker + pathMarker + label + labelTimestamp + content;
559
+ if (isSelected) {
560
+ line = theme.bg("selectedBg", line);
561
+ }
562
+ lines.push(truncateToWidth(line, width));
563
+ }
564
+ lines.push(truncateToWidth(theme.fg("muted", ` (${this.selectedIndex + 1}/${this.filteredNodes.length})${this.getStatusLabels()}`), width));
565
+ return lines;
566
+ }
567
+ getEntryDisplayText(node, isSelected) {
568
+ const entry = node.entry;
569
+ let result;
570
+ const normalize = (s) => s.replace(/[\n\t]/g, " ").trim();
571
+ switch (entry.type) {
572
+ case "message": {
573
+ const msg = entry.message;
574
+ const role = msg.role;
575
+ if (role === "user") {
576
+ const msgWithContent = msg;
577
+ const content = normalize(this.extractContent(msgWithContent.content));
578
+ result = theme.fg("accent", "user: ") + content;
579
+ }
580
+ else if (role === "assistant") {
581
+ const msgWithContent = msg;
582
+ const textContent = normalize(this.extractContent(msgWithContent.content));
583
+ if (textContent) {
584
+ result = theme.fg("success", "assistant: ") + textContent;
585
+ }
586
+ else if (msgWithContent.stopReason === "aborted") {
587
+ result = theme.fg("success", "assistant: ") + theme.fg("muted", "(aborted)");
588
+ }
589
+ else if (msgWithContent.errorMessage) {
590
+ const errMsg = normalize(msgWithContent.errorMessage).slice(0, 80);
591
+ result = theme.fg("success", "assistant: ") + theme.fg("error", errMsg);
592
+ }
593
+ else {
594
+ result = theme.fg("success", "assistant: ") + theme.fg("muted", "(no content)");
595
+ }
596
+ }
597
+ else if (role === "toolResult") {
598
+ const toolMsg = msg;
599
+ const toolCall = toolMsg.toolCallId ? this.toolCallMap.get(toolMsg.toolCallId) : undefined;
600
+ if (toolCall) {
601
+ result = theme.fg("muted", this.formatToolCall(toolCall.name, toolCall.arguments));
602
+ }
603
+ else {
604
+ result = theme.fg("muted", `[${toolMsg.toolName ?? "tool"}]`);
605
+ }
606
+ }
607
+ else if (role === "bashExecution") {
608
+ const bashMsg = msg;
609
+ result = theme.fg("dim", `[bash]: ${normalize(bashMsg.command ?? "")}`);
610
+ }
611
+ else {
612
+ result = theme.fg("dim", `[${role}]`);
613
+ }
614
+ break;
615
+ }
616
+ case "custom_message": {
617
+ const content = typeof entry.content === "string"
618
+ ? entry.content
619
+ : entry.content
620
+ .filter((c) => c.type === "text")
621
+ .map((c) => c.text)
622
+ .join("");
623
+ result = theme.fg("customMessageLabel", `[${entry.customType}]: `) + normalize(content);
624
+ break;
625
+ }
626
+ case "compaction": {
627
+ const tokens = Math.round(entry.tokensBefore / 1000);
628
+ result = theme.fg("borderAccent", `[compaction: ${tokens}k tokens]`);
629
+ break;
630
+ }
631
+ case "branch_summary":
632
+ result = theme.fg("warning", `[branch summary]: `) + normalize(entry.summary);
633
+ break;
634
+ case "model_change":
635
+ result = theme.fg("dim", `[model: ${entry.modelId}]`);
636
+ break;
637
+ case "thinking_level_change":
638
+ result = theme.fg("dim", `[thinking: ${entry.thinkingLevel}]`);
639
+ break;
640
+ case "custom":
641
+ result = theme.fg("dim", `[custom: ${entry.customType}]`);
642
+ break;
643
+ case "label":
644
+ result = theme.fg("dim", `[label: ${entry.label ?? "(cleared)"}]`);
645
+ break;
646
+ case "session_info":
647
+ result = entry.name
648
+ ? [theme.fg("dim", "[title: "), theme.fg("dim", entry.name), theme.fg("dim", "]")].join("")
649
+ : [theme.fg("dim", "[title: "), theme.italic(theme.fg("dim", "empty")), theme.fg("dim", "]")].join("");
650
+ break;
651
+ default:
652
+ result = "";
653
+ }
654
+ return isSelected ? theme.bold(result) : result;
655
+ }
656
+ formatLabelTimestamp(timestamp) {
657
+ const date = new Date(timestamp);
658
+ const now = new Date();
659
+ const hours = date.getHours().toString().padStart(2, "0");
660
+ const minutes = date.getMinutes().toString().padStart(2, "0");
661
+ const time = `${hours}:${minutes}`;
662
+ if (date.getFullYear() === now.getFullYear() &&
663
+ date.getMonth() === now.getMonth() &&
664
+ date.getDate() === now.getDate()) {
665
+ return time;
666
+ }
667
+ const month = date.getMonth() + 1;
668
+ const day = date.getDate();
669
+ if (date.getFullYear() === now.getFullYear()) {
670
+ return `${month}/${day} ${time}`;
671
+ }
672
+ const year = date.getFullYear().toString().slice(-2);
673
+ return `${year}/${month}/${day} ${time}`;
674
+ }
675
+ extractContent(content) {
676
+ const maxLen = 200;
677
+ if (typeof content === "string")
678
+ return content.slice(0, maxLen);
679
+ if (Array.isArray(content)) {
680
+ let result = "";
681
+ for (const c of content) {
682
+ if (typeof c === "object" && c !== null && "type" in c && c.type === "text") {
683
+ result += c.text;
684
+ if (result.length >= maxLen)
685
+ return result.slice(0, maxLen);
686
+ }
687
+ }
688
+ return result;
689
+ }
690
+ return "";
691
+ }
692
+ hasTextContent(content) {
693
+ if (typeof content === "string")
694
+ return content.trim().length > 0;
695
+ if (Array.isArray(content)) {
696
+ for (const c of content) {
697
+ if (typeof c === "object" && c !== null && "type" in c && c.type === "text") {
698
+ const text = c.text;
699
+ if (text && text.trim().length > 0)
700
+ return true;
701
+ }
702
+ }
703
+ }
704
+ return false;
705
+ }
706
+ formatToolCall(name, args) {
707
+ const shortenPath = (p) => {
708
+ const home = process.env.HOME || process.env.USERPROFILE || "";
709
+ if (home && p.startsWith(home))
710
+ return `~${p.slice(home.length)}`;
711
+ return p;
712
+ };
713
+ switch (name) {
714
+ case "read": {
715
+ const path = shortenPath(String(args.path || args.file_path || ""));
716
+ const offset = args.offset;
717
+ const limit = args.limit;
718
+ let display = path;
719
+ if (offset !== undefined || limit !== undefined) {
720
+ const start = offset ?? 1;
721
+ const end = limit !== undefined ? start + limit - 1 : "";
722
+ display += `:${start}${end ? `-${end}` : ""}`;
723
+ }
724
+ return `[read: ${display}]`;
725
+ }
726
+ case "write": {
727
+ const path = shortenPath(String(args.path || args.file_path || ""));
728
+ return `[write: ${path}]`;
729
+ }
730
+ case "edit": {
731
+ const path = shortenPath(String(args.path || args.file_path || ""));
732
+ return `[edit: ${path}]`;
733
+ }
734
+ case "bash": {
735
+ const rawCmd = String(args.command || "");
736
+ const cmd = rawCmd
737
+ .replace(/[\n\t]/g, " ")
738
+ .trim()
739
+ .slice(0, 50);
740
+ return `[bash: ${cmd}${rawCmd.length > 50 ? "..." : ""}]`;
741
+ }
742
+ case "grep": {
743
+ const pattern = String(args.pattern || "");
744
+ const path = shortenPath(String(args.path || "."));
745
+ return `[grep: /${pattern}/ in ${path}]`;
746
+ }
747
+ case "find": {
748
+ const pattern = String(args.pattern || "");
749
+ const path = shortenPath(String(args.path || "."));
750
+ return `[find: ${pattern} in ${path}]`;
751
+ }
752
+ case "ls": {
753
+ const path = shortenPath(String(args.path || "."));
754
+ return `[ls: ${path}]`;
755
+ }
756
+ default: {
757
+ // Custom tool - show name and truncated JSON args
758
+ const argsStr = JSON.stringify(args).slice(0, 40);
759
+ return `[${name}: ${argsStr}${JSON.stringify(args).length > 40 ? "..." : ""}]`;
760
+ }
761
+ }
762
+ }
763
+ handleInput(keyData) {
764
+ const kb = getKeybindings();
765
+ if (kb.matches(keyData, "tui.select.up")) {
766
+ this.selectedIndex = this.selectedIndex === 0 ? this.filteredNodes.length - 1 : this.selectedIndex - 1;
767
+ }
768
+ else if (kb.matches(keyData, "tui.select.down")) {
769
+ this.selectedIndex = this.selectedIndex === this.filteredNodes.length - 1 ? 0 : this.selectedIndex + 1;
770
+ }
771
+ else if (kb.matches(keyData, "app.tree.foldOrUp")) {
772
+ const currentId = this.filteredNodes[this.selectedIndex]?.node.entry.id;
773
+ if (currentId && this.isFoldable(currentId) && !this.foldedNodes.has(currentId)) {
774
+ this.foldedNodes.add(currentId);
775
+ this.applyFilter();
776
+ }
777
+ else {
778
+ this.selectedIndex = this.findBranchSegmentStart("up");
779
+ }
780
+ }
781
+ else if (kb.matches(keyData, "app.tree.unfoldOrDown")) {
782
+ const currentId = this.filteredNodes[this.selectedIndex]?.node.entry.id;
783
+ if (currentId && this.foldedNodes.has(currentId)) {
784
+ this.foldedNodes.delete(currentId);
785
+ this.applyFilter();
786
+ }
787
+ else {
788
+ this.selectedIndex = this.findBranchSegmentStart("down");
789
+ }
790
+ }
791
+ else if (kb.matches(keyData, "tui.editor.cursorLeft") || kb.matches(keyData, "tui.select.pageUp")) {
792
+ // Page up
793
+ this.selectedIndex = Math.max(0, this.selectedIndex - this.maxVisibleLines);
794
+ }
795
+ else if (kb.matches(keyData, "tui.editor.cursorRight") || kb.matches(keyData, "tui.select.pageDown")) {
796
+ // Page down
797
+ this.selectedIndex = Math.min(this.filteredNodes.length - 1, this.selectedIndex + this.maxVisibleLines);
798
+ }
799
+ else if (kb.matches(keyData, "tui.select.confirm")) {
800
+ const selected = this.filteredNodes[this.selectedIndex];
801
+ if (selected && this.onSelect) {
802
+ this.onSelect(selected.node.entry.id);
803
+ }
804
+ }
805
+ else if (kb.matches(keyData, "tui.select.cancel")) {
806
+ if (this.searchQuery) {
807
+ this.searchQuery = "";
808
+ this.foldedNodes.clear();
809
+ this.applyFilter();
810
+ }
811
+ else {
812
+ this.onCancel?.();
813
+ }
814
+ }
815
+ else if (matchesKey(keyData, "ctrl+d")) {
816
+ // Direct filter: default
817
+ this.filterMode = "default";
818
+ this.foldedNodes.clear();
819
+ this.applyFilter();
820
+ }
821
+ else if (matchesKey(keyData, "ctrl+t")) {
822
+ // Toggle filter: no-tools ↔ default
823
+ this.filterMode = this.filterMode === "no-tools" ? "default" : "no-tools";
824
+ this.foldedNodes.clear();
825
+ this.applyFilter();
826
+ }
827
+ else if (matchesKey(keyData, "ctrl+u")) {
828
+ // Toggle filter: user-only ↔ default
829
+ this.filterMode = this.filterMode === "user-only" ? "default" : "user-only";
830
+ this.foldedNodes.clear();
831
+ this.applyFilter();
832
+ }
833
+ else if (matchesKey(keyData, "ctrl+l")) {
834
+ // Toggle filter: labeled-only ↔ default
835
+ this.filterMode = this.filterMode === "labeled-only" ? "default" : "labeled-only";
836
+ this.foldedNodes.clear();
837
+ this.applyFilter();
838
+ }
839
+ else if (matchesKey(keyData, "ctrl+a")) {
840
+ // Toggle filter: all ↔ default
841
+ this.filterMode = this.filterMode === "all" ? "default" : "all";
842
+ this.foldedNodes.clear();
843
+ this.applyFilter();
844
+ }
845
+ else if (matchesKey(keyData, "shift+ctrl+o")) {
846
+ // Cycle filter backwards
847
+ const modes = ["default", "no-tools", "user-only", "labeled-only", "all"];
848
+ const currentIndex = modes.indexOf(this.filterMode);
849
+ this.filterMode = modes[(currentIndex - 1 + modes.length) % modes.length];
850
+ this.foldedNodes.clear();
851
+ this.applyFilter();
852
+ }
853
+ else if (matchesKey(keyData, "ctrl+o")) {
854
+ // Cycle filter forwards: default → no-tools → user-only → labeled-only → all → default
855
+ const modes = ["default", "no-tools", "user-only", "labeled-only", "all"];
856
+ const currentIndex = modes.indexOf(this.filterMode);
857
+ this.filterMode = modes[(currentIndex + 1) % modes.length];
858
+ this.foldedNodes.clear();
859
+ this.applyFilter();
860
+ }
861
+ else if (kb.matches(keyData, "tui.editor.deleteCharBackward")) {
862
+ if (this.searchQuery.length > 0) {
863
+ this.searchQuery = this.searchQuery.slice(0, -1);
864
+ this.foldedNodes.clear();
865
+ this.applyFilter();
866
+ }
867
+ }
868
+ else if (kb.matches(keyData, "app.tree.editLabel")) {
869
+ const selected = this.filteredNodes[this.selectedIndex];
870
+ if (selected && this.onLabelEdit) {
871
+ this.onLabelEdit(selected.node.entry.id, selected.node.label);
872
+ }
873
+ }
874
+ else if (kb.matches(keyData, "app.tree.toggleLabelTimestamp")) {
875
+ this.showLabelTimestamps = !this.showLabelTimestamps;
876
+ }
877
+ else {
878
+ const hasControlChars = [...keyData].some((ch) => {
879
+ const code = ch.charCodeAt(0);
880
+ return code < 32 || code === 0x7f || (code >= 0x80 && code <= 0x9f);
881
+ });
882
+ if (!hasControlChars && keyData.length > 0) {
883
+ this.searchQuery += keyData;
884
+ this.foldedNodes.clear();
885
+ this.applyFilter();
886
+ }
887
+ }
888
+ }
889
+ /**
890
+ * Whether a node can be folded. A node is foldable if it has visible children
891
+ * and is either a root (no visible parent) or a segment start (visible parent
892
+ * has multiple visible children).
893
+ */
894
+ isFoldable(entryId) {
895
+ const children = this.visibleChildrenMap.get(entryId);
896
+ if (!children || children.length === 0)
897
+ return false;
898
+ const parentId = this.visibleParentMap.get(entryId);
899
+ if (parentId === null || parentId === undefined)
900
+ return true;
901
+ const siblings = this.visibleChildrenMap.get(parentId);
902
+ return siblings !== undefined && siblings.length > 1;
903
+ }
904
+ /**
905
+ * Find the index of the next branch segment start in the given direction.
906
+ * A segment start is the first child of a branch point.
907
+ *
908
+ * "up" walks the visible parent chain; "down" walks visible children
909
+ * (always following the first child).
910
+ */
911
+ findBranchSegmentStart(direction) {
912
+ const selectedId = this.filteredNodes[this.selectedIndex]?.node.entry.id;
913
+ if (!selectedId)
914
+ return this.selectedIndex;
915
+ const indexByEntryId = new Map(this.filteredNodes.map((node, i) => [node.node.entry.id, i]));
916
+ let currentId = selectedId;
917
+ if (direction === "down") {
918
+ while (true) {
919
+ const children = this.visibleChildrenMap.get(currentId) ?? [];
920
+ if (children.length === 0)
921
+ return indexByEntryId.get(currentId);
922
+ if (children.length > 1)
923
+ return indexByEntryId.get(children[0]);
924
+ currentId = children[0];
925
+ }
926
+ }
927
+ // direction === "up"
928
+ while (true) {
929
+ const parentId = this.visibleParentMap.get(currentId) ?? null;
930
+ if (parentId === null)
931
+ return indexByEntryId.get(currentId);
932
+ const children = this.visibleChildrenMap.get(parentId) ?? [];
933
+ if (children.length > 1) {
934
+ const segmentStart = indexByEntryId.get(currentId);
935
+ if (segmentStart < this.selectedIndex) {
936
+ return segmentStart;
937
+ }
938
+ }
939
+ currentId = parentId;
940
+ }
941
+ }
942
+ }
943
+ /** Component that displays the current search query */
944
+ class SearchLine {
945
+ treeList;
946
+ constructor(treeList) {
947
+ this.treeList = treeList;
948
+ }
949
+ invalidate() { }
950
+ render(width) {
951
+ const query = this.treeList.getSearchQuery();
952
+ if (query) {
953
+ return [truncateToWidth(` ${theme.fg("muted", "Type to search:")} ${theme.fg("accent", query)}`, width)];
954
+ }
955
+ return [truncateToWidth(` ${theme.fg("muted", "Type to search:")}`, width)];
956
+ }
957
+ handleInput(_keyData) { }
958
+ }
959
+ /** Label input component shown when editing a label */
960
+ class LabelInput {
961
+ input;
962
+ entryId;
963
+ onSubmit;
964
+ onCancel;
965
+ // Focusable implementation - propagate to input for IME cursor positioning
966
+ _focused = false;
967
+ get focused() {
968
+ return this._focused;
969
+ }
970
+ set focused(value) {
971
+ this._focused = value;
972
+ this.input.focused = value;
973
+ }
974
+ constructor(entryId, currentLabel) {
975
+ this.entryId = entryId;
976
+ this.input = new Input();
977
+ if (currentLabel) {
978
+ this.input.setValue(currentLabel);
979
+ }
980
+ }
981
+ invalidate() { }
982
+ render(width) {
983
+ const lines = [];
984
+ const indent = " ";
985
+ const availableWidth = width - indent.length;
986
+ lines.push(truncateToWidth(`${indent}${theme.fg("muted", "Label (empty to remove):")}`, width));
987
+ lines.push(...this.input.render(availableWidth).map((line) => truncateToWidth(`${indent}${line}`, width)));
988
+ lines.push(truncateToWidth(`${indent}${keyHint("tui.select.confirm", "save")} ${keyHint("tui.select.cancel", "cancel")}`, width));
989
+ return lines;
990
+ }
991
+ handleInput(keyData) {
992
+ const kb = getKeybindings();
993
+ if (kb.matches(keyData, "tui.select.confirm")) {
994
+ const value = this.input.getValue().trim();
995
+ this.onSubmit?.(this.entryId, value || undefined);
996
+ }
997
+ else if (kb.matches(keyData, "tui.select.cancel")) {
998
+ this.onCancel?.();
999
+ }
1000
+ else {
1001
+ this.input.handleInput(keyData);
1002
+ }
1003
+ }
1004
+ }
1005
+ /**
1006
+ * Component that renders a session tree selector for navigation
1007
+ */
1008
+ export class TreeSelectorComponent extends Container {
1009
+ treeList;
1010
+ labelInput = null;
1011
+ labelInputContainer;
1012
+ treeContainer;
1013
+ onLabelChangeCallback;
1014
+ // Focusable implementation - propagate to labelInput when active for IME cursor positioning
1015
+ _focused = false;
1016
+ get focused() {
1017
+ return this._focused;
1018
+ }
1019
+ set focused(value) {
1020
+ this._focused = value;
1021
+ // Propagate to labelInput when it's active
1022
+ if (this.labelInput) {
1023
+ this.labelInput.focused = value;
1024
+ }
1025
+ }
1026
+ constructor(tree, currentLeafId, terminalHeight, onSelect, onCancel, onLabelChange, initialSelectedId, initialFilterMode) {
1027
+ super();
1028
+ this.onLabelChangeCallback = onLabelChange;
1029
+ const maxVisibleLines = Math.max(5, Math.floor(terminalHeight / 2));
1030
+ this.treeList = new TreeList(tree, currentLeafId, maxVisibleLines, initialSelectedId, initialFilterMode);
1031
+ this.treeList.onSelect = onSelect;
1032
+ this.treeList.onCancel = onCancel;
1033
+ this.treeList.onLabelEdit = (entryId, currentLabel) => this.showLabelInput(entryId, currentLabel);
1034
+ this.treeContainer = new Container();
1035
+ this.treeContainer.addChild(this.treeList);
1036
+ this.labelInputContainer = new Container();
1037
+ this.addChild(new Spacer(1));
1038
+ this.addChild(new DynamicBorder());
1039
+ this.addChild(new Text(theme.bold(" Session Tree"), 1, 0));
1040
+ this.addChild(new TruncatedText(theme.fg("muted", ` ↑/↓: move. ←/→: page. ^←/^→ or Alt+←/Alt+→: fold/branch. ${keyText("app.tree.editLabel")}: label. ^D/^T/^U/^L/^A: filters (^O/⇧^O cycle). ${keyText("app.tree.toggleLabelTimestamp")}: label time`), 0, 0));
1041
+ this.addChild(new SearchLine(this.treeList));
1042
+ this.addChild(new DynamicBorder());
1043
+ this.addChild(new Spacer(1));
1044
+ this.addChild(this.treeContainer);
1045
+ this.addChild(this.labelInputContainer);
1046
+ this.addChild(new Spacer(1));
1047
+ this.addChild(new DynamicBorder());
1048
+ if (tree.length === 0) {
1049
+ setTimeout(() => onCancel(), 100);
1050
+ }
1051
+ }
1052
+ showLabelInput(entryId, currentLabel) {
1053
+ this.labelInput = new LabelInput(entryId, currentLabel);
1054
+ this.labelInput.onSubmit = (id, label) => {
1055
+ this.treeList.updateNodeLabel(id, label);
1056
+ this.onLabelChangeCallback?.(id, label);
1057
+ this.hideLabelInput();
1058
+ };
1059
+ this.labelInput.onCancel = () => this.hideLabelInput();
1060
+ // Propagate current focused state to the new labelInput
1061
+ this.labelInput.focused = this._focused;
1062
+ this.treeContainer.clear();
1063
+ this.labelInputContainer.clear();
1064
+ this.labelInputContainer.addChild(this.labelInput);
1065
+ }
1066
+ hideLabelInput() {
1067
+ this.labelInput = null;
1068
+ this.labelInputContainer.clear();
1069
+ this.treeContainer.clear();
1070
+ this.treeContainer.addChild(this.treeList);
1071
+ }
1072
+ handleInput(keyData) {
1073
+ if (this.labelInput) {
1074
+ this.labelInput.handleInput(keyData);
1075
+ }
1076
+ else {
1077
+ this.treeList.handleInput(keyData);
1078
+ }
1079
+ }
1080
+ getTreeList() {
1081
+ return this.treeList;
1082
+ }
1083
+ }
1084
+ //# sourceMappingURL=tree-selector.js.map