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 @@
1
+ {"version":3,"file":"agent-session-runtime.js","sourceRoot":"","sources":["../../src/core/agent-session-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AA2BtD,SAAS,sBAAsB,CAAC,OAAwD,EAAU;I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7B,IAAI,CAAC,KAAK,CACT,MAAM,IAAI,CAAC,aAAa,CAAC;YACxB,GAAG,EAAE,cAAc,CAAC,MAAM,EAAE;YAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ;YAChC,cAAc;YACd,iBAAiB,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE;SACnF,CAAC,CACF,CAAC;QACF,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAAA,CAC5B;IAED,KAAK,CAAC,OAAO,GAAkB;QAC9B,MAAM,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAC7D,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAAA,CACvB;CACD;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC9C,aAA+C,EAC/C,OAKC,EAC8B;IAC/B,sBAAsB,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;IAC5C,IAAI,OAAO,CAAC,GAAG,EAAE,KAAK,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QAC3C,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,IAAI,mBAAmB,CAC7B,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,QAAQ,EACf,aAAa,EACb,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,oBAAoB,CAC3B,CAAC;AAAA,CACF;AAED,OAAO,EAKN,8BAA8B,EAC9B,0BAA0B,GAC1B,MAAM,6BAA6B,CAAC","sourcesContent":["import { copyFileSync, existsSync, mkdirSync } from \"node:fs\";\nimport { basename, join, resolve } from \"node:path\";\nimport type { AgentSession } from \"./agent-session.js\";\nimport type { AgentSessionRuntimeDiagnostic, AgentSessionServices } from \"./agent-session-services.js\";\nimport type { SessionStartEvent } from \"./extensions/index.js\";\nimport { emitSessionShutdownEvent } from \"./extensions/runner.js\";\nimport type { CreateAgentSessionResult } from \"./sdk.js\";\nimport { assertSessionCwdExists } from \"./session-cwd.js\";\nimport { SessionManager } from \"./session-manager.js\";\n\n/**\n * Result returned by runtime creation.\n *\n * The caller gets the created session, its cwd-bound services, and all\n * diagnostics collected during setup.\n */\nexport interface CreateAgentSessionRuntimeResult extends CreateAgentSessionResult {\n\tservices: AgentSessionServices;\n\tdiagnostics: AgentSessionRuntimeDiagnostic[];\n}\n\n/**\n * Creates a full runtime for a target cwd and session manager.\n *\n * The factory closes over process-global fixed inputs, recreates cwd-bound\n * services for the effective cwd, resolves session options against those\n * services, and finally creates the AgentSession.\n */\nexport type CreateAgentSessionRuntimeFactory = (options: {\n\tcwd: string;\n\tagentDir: string;\n\tsessionManager: SessionManager;\n\tsessionStartEvent?: SessionStartEvent;\n}) => Promise<CreateAgentSessionRuntimeResult>;\n\nfunction extractUserMessageText(content: string | Array<{ type: string; text?: string }>): string {\n\tif (typeof content === \"string\") {\n\t\treturn content;\n\t}\n\n\treturn content\n\t\t.filter((part): part is { type: \"text\"; text: string } => part.type === \"text\" && typeof part.text === \"string\")\n\t\t.map((part) => part.text)\n\t\t.join(\"\");\n}\n\n/**\n * Owns the current AgentSession plus its cwd-bound services.\n *\n * Session replacement methods tear down the current runtime first, then create\n * and apply the next runtime. If creation fails, the error is propagated to the\n * caller. The caller is responsible for user-facing error handling.\n */\nexport class AgentSessionRuntime {\n\tconstructor(\n\t\tprivate _session: AgentSession,\n\t\tprivate _services: AgentSessionServices,\n\t\tprivate readonly createRuntime: CreateAgentSessionRuntimeFactory,\n\t\tprivate _diagnostics: AgentSessionRuntimeDiagnostic[] = [],\n\t\tprivate _modelFallbackMessage?: string,\n\t) {}\n\n\tget services(): AgentSessionServices {\n\t\treturn this._services;\n\t}\n\n\tget session(): AgentSession {\n\t\treturn this._session;\n\t}\n\n\tget cwd(): string {\n\t\treturn this._services.cwd;\n\t}\n\n\tget diagnostics(): readonly AgentSessionRuntimeDiagnostic[] {\n\t\treturn this._diagnostics;\n\t}\n\n\tget modelFallbackMessage(): string | undefined {\n\t\treturn this._modelFallbackMessage;\n\t}\n\n\tprivate async emitBeforeSwitch(\n\t\treason: \"new\" | \"resume\",\n\t\ttargetSessionFile?: string,\n\t): Promise<{ cancelled: boolean }> {\n\t\tconst runner = this.session.extensionRunner;\n\t\tif (!runner?.hasHandlers(\"session_before_switch\")) {\n\t\t\treturn { cancelled: false };\n\t\t}\n\n\t\tconst result = await runner.emit({\n\t\t\ttype: \"session_before_switch\",\n\t\t\treason,\n\t\t\ttargetSessionFile,\n\t\t});\n\t\treturn { cancelled: result?.cancel === true };\n\t}\n\n\tprivate async emitBeforeFork(entryId: string): Promise<{ cancelled: boolean }> {\n\t\tconst runner = this.session.extensionRunner;\n\t\tif (!runner?.hasHandlers(\"session_before_fork\")) {\n\t\t\treturn { cancelled: false };\n\t\t}\n\n\t\tconst result = await runner.emit({\n\t\t\ttype: \"session_before_fork\",\n\t\t\tentryId,\n\t\t});\n\t\treturn { cancelled: result?.cancel === true };\n\t}\n\n\tprivate async teardownCurrent(): Promise<void> {\n\t\tawait emitSessionShutdownEvent(this.session.extensionRunner);\n\t\tthis.session.dispose();\n\t}\n\n\tprivate apply(result: CreateAgentSessionRuntimeResult): void {\n\t\tif (process.cwd() !== result.services.cwd) {\n\t\t\tprocess.chdir(result.services.cwd);\n\t\t}\n\t\tthis._session = result.session;\n\t\tthis._services = result.services;\n\t\tthis._diagnostics = result.diagnostics;\n\t\tthis._modelFallbackMessage = result.modelFallbackMessage;\n\t}\n\n\tasync switchSession(sessionPath: string, cwdOverride?: string): Promise<{ cancelled: boolean }> {\n\t\tconst beforeResult = await this.emitBeforeSwitch(\"resume\", sessionPath);\n\t\tif (beforeResult.cancelled) {\n\t\t\treturn beforeResult;\n\t\t}\n\n\t\tconst previousSessionFile = this.session.sessionFile;\n\t\tconst sessionManager = SessionManager.open(sessionPath, undefined, cwdOverride);\n\t\tassertSessionCwdExists(sessionManager, this.cwd);\n\t\tawait this.teardownCurrent();\n\t\tthis.apply(\n\t\t\tawait this.createRuntime({\n\t\t\t\tcwd: sessionManager.getCwd(),\n\t\t\t\tagentDir: this.services.agentDir,\n\t\t\t\tsessionManager,\n\t\t\t\tsessionStartEvent: { type: \"session_start\", reason: \"resume\", previousSessionFile },\n\t\t\t}),\n\t\t);\n\t\treturn { cancelled: false };\n\t}\n\n\tasync newSession(options?: {\n\t\tparentSession?: string;\n\t\tsetup?: (sessionManager: SessionManager) => Promise<void>;\n\t}): Promise<{ cancelled: boolean }> {\n\t\tconst beforeResult = await this.emitBeforeSwitch(\"new\");\n\t\tif (beforeResult.cancelled) {\n\t\t\treturn beforeResult;\n\t\t}\n\n\t\tconst previousSessionFile = this.session.sessionFile;\n\t\tconst sessionDir = this.session.sessionManager.getSessionDir();\n\t\tconst sessionManager = SessionManager.create(this.cwd, sessionDir);\n\t\tif (options?.parentSession) {\n\t\t\tsessionManager.newSession({ parentSession: options.parentSession });\n\t\t}\n\n\t\tawait this.teardownCurrent();\n\t\tthis.apply(\n\t\t\tawait this.createRuntime({\n\t\t\t\tcwd: this.cwd,\n\t\t\t\tagentDir: this.services.agentDir,\n\t\t\t\tsessionManager,\n\t\t\t\tsessionStartEvent: { type: \"session_start\", reason: \"new\", previousSessionFile },\n\t\t\t}),\n\t\t);\n\t\tif (options?.setup) {\n\t\t\tawait options.setup(this.session.sessionManager);\n\t\t\tthis.session.agent.state.messages = this.session.sessionManager.buildSessionContext().messages;\n\t\t}\n\t\treturn { cancelled: false };\n\t}\n\n\tasync fork(entryId: string): Promise<{ cancelled: boolean; selectedText?: string }> {\n\t\tconst beforeResult = await this.emitBeforeFork(entryId);\n\t\tif (beforeResult.cancelled) {\n\t\t\treturn { cancelled: true };\n\t\t}\n\n\t\tconst selectedEntry = this.session.sessionManager.getEntry(entryId);\n\t\tif (!selectedEntry || selectedEntry.type !== \"message\" || selectedEntry.message.role !== \"user\") {\n\t\t\tthrow new Error(\"Invalid entry ID for forking\");\n\t\t}\n\n\t\tconst previousSessionFile = this.session.sessionFile;\n\t\tconst selectedText = extractUserMessageText(selectedEntry.message.content);\n\t\tif (this.session.sessionManager.isPersisted()) {\n\t\t\tconst currentSessionFile = this.session.sessionFile;\n\t\t\tif (!currentSessionFile) {\n\t\t\t\tthrow new Error(\"Persisted session is missing a session file\");\n\t\t\t}\n\t\t\tconst sessionDir = this.session.sessionManager.getSessionDir();\n\t\t\tif (!selectedEntry.parentId) {\n\t\t\t\tconst sessionManager = SessionManager.create(this.cwd, sessionDir);\n\t\t\t\tsessionManager.newSession({ parentSession: currentSessionFile });\n\t\t\t\tawait this.teardownCurrent();\n\t\t\t\tthis.apply(\n\t\t\t\t\tawait this.createRuntime({\n\t\t\t\t\t\tcwd: this.cwd,\n\t\t\t\t\t\tagentDir: this.services.agentDir,\n\t\t\t\t\t\tsessionManager,\n\t\t\t\t\t\tsessionStartEvent: { type: \"session_start\", reason: \"fork\", previousSessionFile },\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t\treturn { cancelled: false, selectedText };\n\t\t\t}\n\n\t\t\tconst sourceManager = SessionManager.open(currentSessionFile, sessionDir);\n\t\t\tconst forkedSessionPath = sourceManager.createBranchedSession(selectedEntry.parentId);\n\t\t\tif (!forkedSessionPath) {\n\t\t\t\tthrow new Error(\"Failed to create forked session\");\n\t\t\t}\n\t\t\tconst sessionManager = SessionManager.open(forkedSessionPath, sessionDir);\n\t\t\tawait this.teardownCurrent();\n\t\t\tthis.apply(\n\t\t\t\tawait this.createRuntime({\n\t\t\t\t\tcwd: sessionManager.getCwd(),\n\t\t\t\t\tagentDir: this.services.agentDir,\n\t\t\t\t\tsessionManager,\n\t\t\t\t\tsessionStartEvent: { type: \"session_start\", reason: \"fork\", previousSessionFile },\n\t\t\t\t}),\n\t\t\t);\n\t\t\treturn { cancelled: false, selectedText };\n\t\t}\n\n\t\tconst sessionManager = this.session.sessionManager;\n\t\tif (!selectedEntry.parentId) {\n\t\t\tsessionManager.newSession({ parentSession: this.session.sessionFile });\n\t\t} else {\n\t\t\tsessionManager.createBranchedSession(selectedEntry.parentId);\n\t\t}\n\t\tawait this.teardownCurrent();\n\t\tthis.apply(\n\t\t\tawait this.createRuntime({\n\t\t\t\tcwd: this.cwd,\n\t\t\t\tagentDir: this.services.agentDir,\n\t\t\t\tsessionManager,\n\t\t\t\tsessionStartEvent: { type: \"session_start\", reason: \"fork\", previousSessionFile },\n\t\t\t}),\n\t\t);\n\t\treturn { cancelled: false, selectedText };\n\t}\n\n\tasync importFromJsonl(inputPath: string, cwdOverride?: string): Promise<{ cancelled: boolean }> {\n\t\tconst resolvedPath = resolve(inputPath);\n\t\tif (!existsSync(resolvedPath)) {\n\t\t\tthrow new Error(`File not found: ${resolvedPath}`);\n\t\t}\n\n\t\tconst sessionDir = this.session.sessionManager.getSessionDir();\n\t\tif (!existsSync(sessionDir)) {\n\t\t\tmkdirSync(sessionDir, { recursive: true });\n\t\t}\n\n\t\tconst destinationPath = join(sessionDir, basename(resolvedPath));\n\t\tconst beforeResult = await this.emitBeforeSwitch(\"resume\", destinationPath);\n\t\tif (beforeResult.cancelled) {\n\t\t\treturn beforeResult;\n\t\t}\n\n\t\tconst previousSessionFile = this.session.sessionFile;\n\t\tif (resolve(destinationPath) !== resolvedPath) {\n\t\t\tcopyFileSync(resolvedPath, destinationPath);\n\t\t}\n\n\t\tconst sessionManager = SessionManager.open(destinationPath, sessionDir, cwdOverride);\n\t\tassertSessionCwdExists(sessionManager, this.cwd);\n\t\tawait this.teardownCurrent();\n\t\tthis.apply(\n\t\t\tawait this.createRuntime({\n\t\t\t\tcwd: sessionManager.getCwd(),\n\t\t\t\tagentDir: this.services.agentDir,\n\t\t\t\tsessionManager,\n\t\t\t\tsessionStartEvent: { type: \"session_start\", reason: \"resume\", previousSessionFile },\n\t\t\t}),\n\t\t);\n\t\treturn { cancelled: false };\n\t}\n\n\tasync dispose(): Promise<void> {\n\t\tawait emitSessionShutdownEvent(this.session.extensionRunner);\n\t\tthis.session.dispose();\n\t}\n}\n\n/**\n * Create the initial runtime from a runtime factory and initial session target.\n *\n * The same factory is stored on the returned AgentSessionRuntime and reused for\n * later /new, /resume, /fork, and import flows.\n */\nexport async function createAgentSessionRuntime(\n\tcreateRuntime: CreateAgentSessionRuntimeFactory,\n\toptions: {\n\t\tcwd: string;\n\t\tagentDir: string;\n\t\tsessionManager: SessionManager;\n\t\tsessionStartEvent?: SessionStartEvent;\n\t},\n): Promise<AgentSessionRuntime> {\n\tassertSessionCwdExists(options.sessionManager, options.cwd);\n\tconst result = await createRuntime(options);\n\tif (process.cwd() !== result.services.cwd) {\n\t\tprocess.chdir(result.services.cwd);\n\t}\n\treturn new AgentSessionRuntime(\n\t\tresult.session,\n\t\tresult.services,\n\t\tcreateRuntime,\n\t\tresult.diagnostics,\n\t\tresult.modelFallbackMessage,\n\t);\n}\n\nexport {\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionServicesOptions,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionServices,\n} from \"./agent-session-services.js\";\n"]}
@@ -0,0 +1,86 @@
1
+ import type { ThinkingLevel } from "@orient-cli/agent-core";
2
+ import type { Model } from "@orient-cli/ai";
3
+ import { AuthStorage } from "./auth-storage.js";
4
+ import type { SessionStartEvent, ToolDefinition } from "./extensions/index.js";
5
+ import { ModelRegistry } from "./model-registry.js";
6
+ import { type DefaultResourceLoaderOptions, type ResourceLoader } from "./resource-loader.js";
7
+ import { type CreateAgentSessionResult } from "./sdk.js";
8
+ import type { SessionManager } from "./session-manager.js";
9
+ import { SettingsManager } from "./settings-manager.js";
10
+ import type { Tool } from "./tools/index.js";
11
+ /**
12
+ * Non-fatal issues collected while creating services or sessions.
13
+ *
14
+ * Runtime creation returns diagnostics to the caller instead of printing or
15
+ * exiting. The app layer decides whether warnings should be shown and whether
16
+ * errors should abort startup.
17
+ */
18
+ export interface AgentSessionRuntimeDiagnostic {
19
+ type: "info" | "warning" | "error";
20
+ message: string;
21
+ }
22
+ /**
23
+ * Inputs for creating cwd-bound runtime services.
24
+ *
25
+ * These services are recreated whenever the effective session cwd changes.
26
+ * CLI-provided resource paths should be resolved to absolute paths before they
27
+ * reach this function, so later cwd switches do not reinterpret them.
28
+ */
29
+ export interface CreateAgentSessionServicesOptions {
30
+ cwd: string;
31
+ agentDir?: string;
32
+ authStorage?: AuthStorage;
33
+ settingsManager?: SettingsManager;
34
+ modelRegistry?: ModelRegistry;
35
+ extensionFlagValues?: Map<string, boolean | string>;
36
+ resourceLoaderOptions?: Omit<DefaultResourceLoaderOptions, "cwd" | "agentDir" | "settingsManager">;
37
+ }
38
+ /**
39
+ * Inputs for creating an AgentSession from already-created services.
40
+ *
41
+ * Use this after services exist and any cwd-bound model/tool/session options
42
+ * have been resolved against those services.
43
+ */
44
+ export interface CreateAgentSessionFromServicesOptions {
45
+ services: AgentSessionServices;
46
+ sessionManager: SessionManager;
47
+ sessionStartEvent?: SessionStartEvent;
48
+ model?: Model<any>;
49
+ thinkingLevel?: ThinkingLevel;
50
+ scopedModels?: Array<{
51
+ model: Model<any>;
52
+ thinkingLevel?: ThinkingLevel;
53
+ }>;
54
+ tools?: Tool[];
55
+ customTools?: ToolDefinition[];
56
+ }
57
+ /**
58
+ * Coherent cwd-bound runtime services for one effective session cwd.
59
+ *
60
+ * This is infrastructure only. The AgentSession itself is created separately so
61
+ * session options can be resolved against these services first.
62
+ */
63
+ export interface AgentSessionServices {
64
+ cwd: string;
65
+ agentDir: string;
66
+ authStorage: AuthStorage;
67
+ settingsManager: SettingsManager;
68
+ modelRegistry: ModelRegistry;
69
+ resourceLoader: ResourceLoader;
70
+ diagnostics: AgentSessionRuntimeDiagnostic[];
71
+ }
72
+ /**
73
+ * Create cwd-bound runtime services.
74
+ *
75
+ * Returns services plus diagnostics. It does not create an AgentSession.
76
+ */
77
+ export declare function createAgentSessionServices(options: CreateAgentSessionServicesOptions): Promise<AgentSessionServices>;
78
+ /**
79
+ * Create an AgentSession from previously created services.
80
+ *
81
+ * This keeps session creation separate from service creation so callers can
82
+ * resolve model, thinking, tools, and other session inputs against the target
83
+ * cwd before constructing the session.
84
+ */
85
+ export declare function createAgentSessionFromServices(options: CreateAgentSessionFromServicesOptions): Promise<CreateAgentSessionResult>;
86
+ //# sourceMappingURL=agent-session-services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-session-services.d.ts","sourceRoot":"","sources":["../../src/core/agent-session-services.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAyB,KAAK,4BAA4B,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACrH,OAAO,EAAE,KAAK,wBAAwB,EAAsB,MAAM,UAAU,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,WAAW,6BAA6B;IAC7C,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iCAAiC;IACjD,GAAG,EAAE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ACnD,OAAO,EAAE,qCAAqC,GAC5C,OAAO,CAAC,wBAAwB,CAAC,CAgBnC","sourcesContent":["import { join } from \"node:path\";\nimport type { ThinkingLevel } from \"@orient-cli/agent-core\";\nimport type { Model } from \"@orient-cli/ai\";\nimport { getAgentDir } from \"../config.js\";\nimport { AuthStorage } from \"./auth-storage.js\";\nimport type { SessionStartEvent, ToolDefinition } from \"./extensions/index.js\";\nimport { ModelRegistry } from \"./model-registry.js\";\nimport { DefaultResourceLoader, type DefaultResourceLoaderOptions, type ResourceLoader } from \"./resource-loader.js\";\nimport { type CreateAgentSessionResult, createAgentSession } from \"./sdk.js\";\nimport type { SessionManager } from \"./session-manager.js\";\nimport { SettingsManager } from \"./settings-manager.js\";\nimport type { Tool } from \"./tools/index.js\";\n\n/**\n * Non-fatal issues collected while creating services or sessions.\n *\n * Runtime creation returns diagnostics to the caller instead of printing or\n * exiting. The app layer decides whether warnings should be shown and whether\n * errors should abort startup.\n */\nexport interface AgentSessionRuntimeDiagnostic {\n\ttype: \"info\" | \"warning\" | \"error\";\n\tmessage: string;\n}\n\n/**\n * Inputs for creating cwd-bound runtime services.\n *\n * These services are recreated whenever the effective session cwd changes.\n * CLI-provided resource paths should be resolved to absolute paths before they\n * reach this function, so later cwd switches do not reinterpret them.\n */\nexport interface CreateAgentSessionServicesOptions {\n\tcwd: string;\n\tagentDir?: string;\n\tauthStorage?: AuthStorage;\n\tsettingsManager?: SettingsManager;\n\tmodelRegistry?: ModelRegistry;\n\textensionFlagValues?: Map<string, boolean | string>;\n\tresourceLoaderOptions?: Omit<DefaultResourceLoaderOptions, \"cwd\" | \"agentDir\" | \"settingsManager\">;\n}\n\n/**\n * Inputs for creating an AgentSession from already-created services.\n *\n * Use this after services exist and any cwd-bound model/tool/session options\n * have been resolved against those services.\n */\nexport interface CreateAgentSessionFromServicesOptions {\n\tservices: AgentSessionServices;\n\tsessionManager: SessionManager;\n\tsessionStartEvent?: SessionStartEvent;\n\tmodel?: Model<any>;\n\tthinkingLevel?: ThinkingLevel;\n\tscopedModels?: Array<{ model: Model<any>; thinkingLevel?: ThinkingLevel }>;\n\ttools?: Tool[];\n\tcustomTools?: ToolDefinition[];\n}\n\n/**\n * Coherent cwd-bound runtime services for one effective session cwd.\n *\n * This is infrastructure only. The AgentSession itself is created separately so\n * session options can be resolved against these services first.\n */\nexport interface AgentSessionServices {\n\tcwd: string;\n\tagentDir: string;\n\tauthStorage: AuthStorage;\n\tsettingsManager: SettingsManager;\n\tmodelRegistry: ModelRegistry;\n\tresourceLoader: ResourceLoader;\n\tdiagnostics: AgentSessionRuntimeDiagnostic[];\n}\n\nfunction applyExtensionFlagValues(\n\tresourceLoader: ResourceLoader,\n\textensionFlagValues: Map<string, boolean | string> | undefined,\n): AgentSessionRuntimeDiagnostic[] {\n\tif (!extensionFlagValues) {\n\t\treturn [];\n\t}\n\n\tconst diagnostics: AgentSessionRuntimeDiagnostic[] = [];\n\tconst extensionsResult = resourceLoader.getExtensions();\n\tconst registeredFlags = new Map<string, { type: \"boolean\" | \"string\" }>();\n\tfor (const extension of extensionsResult.extensions) {\n\t\tfor (const [name, flag] of extension.flags) {\n\t\t\tregisteredFlags.set(name, { type: flag.type });\n\t\t}\n\t}\n\n\tconst unknownFlags: string[] = [];\n\tfor (const [name, value] of extensionFlagValues) {\n\t\tconst flag = registeredFlags.get(name);\n\t\tif (!flag) {\n\t\t\tunknownFlags.push(name);\n\t\t\tcontinue;\n\t\t}\n\t\tif (flag.type === \"boolean\") {\n\t\t\textensionsResult.runtime.flagValues.set(name, true);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"string\") {\n\t\t\textensionsResult.runtime.flagValues.set(name, value);\n\t\t\tcontinue;\n\t\t}\n\t\tdiagnostics.push({\n\t\t\ttype: \"error\",\n\t\t\tmessage: `Extension flag \"--${name}\" requires a value`,\n\t\t});\n\t}\n\n\tif (unknownFlags.length > 0) {\n\t\tdiagnostics.push({\n\t\t\ttype: \"error\",\n\t\t\tmessage: `Unknown option${unknownFlags.length === 1 ? \"\" : \"s\"}: ${unknownFlags.map((name) => `--${name}`).join(\", \")}`,\n\t\t});\n\t}\n\n\treturn diagnostics;\n}\n\n/**\n * Create cwd-bound runtime services.\n *\n * Returns services plus diagnostics. It does not create an AgentSession.\n */\nexport async function createAgentSessionServices(\n\toptions: CreateAgentSessionServicesOptions,\n): Promise<AgentSessionServices> {\n\tconst cwd = options.cwd;\n\tconst agentDir = options.agentDir ?? getAgentDir();\n\tconst authStorage = options.authStorage ?? AuthStorage.create(join(agentDir, \"auth.json\"));\n\tconst settingsManager = options.settingsManager ?? SettingsManager.create(cwd, agentDir);\n\tconst modelRegistry = options.modelRegistry ?? ModelRegistry.create(authStorage, join(agentDir, \"models.json\"));\n\tconst resourceLoader = new DefaultResourceLoader({\n\t\t...(options.resourceLoaderOptions ?? {}),\n\t\tcwd,\n\t\tagentDir,\n\t\tsettingsManager,\n\t});\n\tawait resourceLoader.reload();\n\n\tconst diagnostics: AgentSessionRuntimeDiagnostic[] = [];\n\tconst extensionsResult = resourceLoader.getExtensions();\n\tfor (const { name, config, extensionPath } of extensionsResult.runtime.pendingProviderRegistrations) {\n\t\ttry {\n\t\t\tmodelRegistry.registerProvider(name, config);\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\tdiagnostics.push({\n\t\t\t\ttype: \"error\",\n\t\t\t\tmessage: `Extension \"${extensionPath}\" error: ${message}`,\n\t\t\t});\n\t\t}\n\t}\n\textensionsResult.runtime.pendingProviderRegistrations = [];\n\tdiagnostics.push(...applyExtensionFlagValues(resourceLoader, options.extensionFlagValues));\n\n\treturn {\n\t\tcwd,\n\t\tagentDir,\n\t\tauthStorage,\n\t\tsettingsManager,\n\t\tmodelRegistry,\n\t\tresourceLoader,\n\t\tdiagnostics,\n\t};\n}\n\n/**\n * Create an AgentSession from previously created services.\n *\n * This keeps session creation separate from service creation so callers can\n * resolve model, thinking, tools, and other session inputs against the target\n * cwd before constructing the session.\n */\nexport async function createAgentSessionFromServices(\n\toptions: CreateAgentSessionFromServicesOptions,\n): Promise<CreateAgentSessionResult> {\n\treturn createAgentSession({\n\t\tcwd: options.services.cwd,\n\t\tagentDir: options.services.agentDir,\n\t\tauthStorage: options.services.authStorage,\n\t\tsettingsManager: options.services.settingsManager,\n\t\tmodelRegistry: options.services.modelRegistry,\n\t\tresourceLoader: options.services.resourceLoader,\n\t\tsessionManager: options.sessionManager,\n\t\tmodel: options.model,\n\t\tthinkingLevel: options.thinkingLevel,\n\t\tscopedModels: options.scopedModels,\n\t\ttools: options.tools,\n\t\tcustomTools: options.customTools,\n\t\tsessionStartEvent: options.sessionStartEvent,\n\t});\n}\n"]}
@@ -0,0 +1,116 @@
1
+ import { join } from "node:path";
2
+ import { getAgentDir } from "../config.js";
3
+ import { AuthStorage } from "./auth-storage.js";
4
+ import { ModelRegistry } from "./model-registry.js";
5
+ import { DefaultResourceLoader } from "./resource-loader.js";
6
+ import { createAgentSession } from "./sdk.js";
7
+ import { SettingsManager } from "./settings-manager.js";
8
+ function applyExtensionFlagValues(resourceLoader, extensionFlagValues) {
9
+ if (!extensionFlagValues) {
10
+ return [];
11
+ }
12
+ const diagnostics = [];
13
+ const extensionsResult = resourceLoader.getExtensions();
14
+ const registeredFlags = new Map();
15
+ for (const extension of extensionsResult.extensions) {
16
+ for (const [name, flag] of extension.flags) {
17
+ registeredFlags.set(name, { type: flag.type });
18
+ }
19
+ }
20
+ const unknownFlags = [];
21
+ for (const [name, value] of extensionFlagValues) {
22
+ const flag = registeredFlags.get(name);
23
+ if (!flag) {
24
+ unknownFlags.push(name);
25
+ continue;
26
+ }
27
+ if (flag.type === "boolean") {
28
+ extensionsResult.runtime.flagValues.set(name, true);
29
+ continue;
30
+ }
31
+ if (typeof value === "string") {
32
+ extensionsResult.runtime.flagValues.set(name, value);
33
+ continue;
34
+ }
35
+ diagnostics.push({
36
+ type: "error",
37
+ message: `Extension flag "--${name}" requires a value`,
38
+ });
39
+ }
40
+ if (unknownFlags.length > 0) {
41
+ diagnostics.push({
42
+ type: "error",
43
+ message: `Unknown option${unknownFlags.length === 1 ? "" : "s"}: ${unknownFlags.map((name) => `--${name}`).join(", ")}`,
44
+ });
45
+ }
46
+ return diagnostics;
47
+ }
48
+ /**
49
+ * Create cwd-bound runtime services.
50
+ *
51
+ * Returns services plus diagnostics. It does not create an AgentSession.
52
+ */
53
+ export async function createAgentSessionServices(options) {
54
+ const cwd = options.cwd;
55
+ const agentDir = options.agentDir ?? getAgentDir();
56
+ const authStorage = options.authStorage ?? AuthStorage.create(join(agentDir, "auth.json"));
57
+ const settingsManager = options.settingsManager ?? SettingsManager.create(cwd, agentDir);
58
+ const modelRegistry = options.modelRegistry ?? ModelRegistry.create(authStorage, join(agentDir, "models.json"));
59
+ const resourceLoader = new DefaultResourceLoader({
60
+ ...(options.resourceLoaderOptions ?? {}),
61
+ cwd,
62
+ agentDir,
63
+ settingsManager,
64
+ });
65
+ await resourceLoader.reload();
66
+ const diagnostics = [];
67
+ const extensionsResult = resourceLoader.getExtensions();
68
+ for (const { name, config, extensionPath } of extensionsResult.runtime.pendingProviderRegistrations) {
69
+ try {
70
+ modelRegistry.registerProvider(name, config);
71
+ }
72
+ catch (error) {
73
+ const message = error instanceof Error ? error.message : String(error);
74
+ diagnostics.push({
75
+ type: "error",
76
+ message: `Extension "${extensionPath}" error: ${message}`,
77
+ });
78
+ }
79
+ }
80
+ extensionsResult.runtime.pendingProviderRegistrations = [];
81
+ diagnostics.push(...applyExtensionFlagValues(resourceLoader, options.extensionFlagValues));
82
+ return {
83
+ cwd,
84
+ agentDir,
85
+ authStorage,
86
+ settingsManager,
87
+ modelRegistry,
88
+ resourceLoader,
89
+ diagnostics,
90
+ };
91
+ }
92
+ /**
93
+ * Create an AgentSession from previously created services.
94
+ *
95
+ * This keeps session creation separate from service creation so callers can
96
+ * resolve model, thinking, tools, and other session inputs against the target
97
+ * cwd before constructing the session.
98
+ */
99
+ export async function createAgentSessionFromServices(options) {
100
+ return createAgentSession({
101
+ cwd: options.services.cwd,
102
+ agentDir: options.services.agentDir,
103
+ authStorage: options.services.authStorage,
104
+ settingsManager: options.services.settingsManager,
105
+ modelRegistry: options.services.modelRegistry,
106
+ resourceLoader: options.services.resourceLoader,
107
+ sessionManager: options.sessionManager,
108
+ model: options.model,
109
+ thinkingLevel: options.thinkingLevel,
110
+ scopedModels: options.scopedModels,
111
+ tools: options.tools,
112
+ customTools: options.customTools,
113
+ sessionStartEvent: options.sessionStartEvent,
114
+ });
115
+ }
116
+ //# sourceMappingURL=agent-session-services.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-session-services.js","sourceRoot":"","sources":["../../src/core/agent-session-services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAA0D,MAAM,sBAAsB,CAAC;AACrH,OAAO,EAAiC,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAiExD,SAAS,wBAAwB,CAChC,cAA8B,EAC9B,mBAA8D,EAC5B;IAClC,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACX,CAAC;IAED,MAAM,WAAW,GAAoC,EAAE,CAAC;IACxD,MAAM,gBAAgB,GAAG,cAAc,CAAC,aAAa,EAAE,CAAC;IACxD,MAAM,eAAe,GAAG,IAAI,GAAG,EAA0C,CAAC;IAC1E,KAAK,MAAM,SAAS,IAAI,gBAAgB,CAAC,UAAU,EAAE,CAAC;QACrD,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YA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,CAAC;gBAChB,IAAI,EAAE,OAAO;gBACb,OAAO,EAAE,cAAc,aAAa,YAAY,OAAO,EAAE;aACzD,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IACD,gBAAgB,CAAC,OAAO,CAAC,4BAA4B,GAAG,EAAE,CAAC;IAC3D,WAAW,CAAC,IAAI,CAAC,GAAG,wBAAwB,CAAC,cAAc,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAE3F,OAAO;QACN,GAAG;QACH,QAAQ;QACR,WAAW;QACX,eAAe;QACf,aAAa;QACb,cAAc;QACd,WAAW;KACX,CAAC;AAAA,CACF;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CACnD,OAA8C,EACV;IACpC,OAAO,kBAAkB,CAAC;QACzB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG;QACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ;QACnC,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,WAAW;QACzC,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,eAAe;QACjD,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,aAAa;QAC7C,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,cAAc;QAC/C,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;KAC5C,CAAC,CAAC;AAAA,CACH","sourcesContent":["import { join } from \"node:path\";\nimport type { ThinkingLevel } from \"@orient-cli/agent-core\";\nimport type { Model } from \"@orient-cli/ai\";\nimport { getAgentDir } from \"../config.js\";\nimport { AuthStorage } from \"./auth-storage.js\";\nimport type { SessionStartEvent, ToolDefinition } from \"./extensions/index.js\";\nimport { ModelRegistry } from \"./model-registry.js\";\nimport { DefaultResourceLoader, type DefaultResourceLoaderOptions, type ResourceLoader } from \"./resource-loader.js\";\nimport { type CreateAgentSessionResult, createAgentSession } from \"./sdk.js\";\nimport type { SessionManager } from \"./session-manager.js\";\nimport { SettingsManager } from \"./settings-manager.js\";\nimport type { Tool } from \"./tools/index.js\";\n\n/**\n * Non-fatal issues collected while creating services or sessions.\n *\n * Runtime creation returns diagnostics to the caller instead of printing or\n * exiting. The app layer decides whether warnings should be shown and whether\n * errors should abort startup.\n */\nexport interface AgentSessionRuntimeDiagnostic {\n\ttype: \"info\" | \"warning\" | \"error\";\n\tmessage: string;\n}\n\n/**\n * Inputs for creating cwd-bound runtime services.\n *\n * These services are recreated whenever the effective session cwd changes.\n * CLI-provided resource paths should be resolved to absolute paths before they\n * reach this function, so later cwd switches do not reinterpret them.\n */\nexport interface CreateAgentSessionServicesOptions {\n\tcwd: string;\n\tagentDir?: string;\n\tauthStorage?: AuthStorage;\n\tsettingsManager?: SettingsManager;\n\tmodelRegistry?: ModelRegistry;\n\textensionFlagValues?: Map<string, boolean | string>;\n\tresourceLoaderOptions?: Omit<DefaultResourceLoaderOptions, \"cwd\" | \"agentDir\" | \"settingsManager\">;\n}\n\n/**\n * Inputs for creating an AgentSession from already-created services.\n *\n * Use this after services exist and any cwd-bound model/tool/session options\n * have been resolved against those services.\n */\nexport interface CreateAgentSessionFromServicesOptions {\n\tservices: AgentSessionServices;\n\tsessionManager: SessionManager;\n\tsessionStartEvent?: SessionStartEvent;\n\tmodel?: Model<any>;\n\tthinkingLevel?: ThinkingLevel;\n\tscopedModels?: Array<{ model: Model<any>; thinkingLevel?: ThinkingLevel }>;\n\ttools?: Tool[];\n\tcustomTools?: ToolDefinition[];\n}\n\n/**\n * Coherent cwd-bound runtime services for one effective session cwd.\n *\n * This is infrastructure only. The AgentSession itself is created separately so\n * session options can be resolved against these services first.\n */\nexport interface AgentSessionServices {\n\tcwd: string;\n\tagentDir: string;\n\tauthStorage: AuthStorage;\n\tsettingsManager: SettingsManager;\n\tmodelRegistry: ModelRegistry;\n\tresourceLoader: ResourceLoader;\n\tdiagnostics: AgentSessionRuntimeDiagnostic[];\n}\n\nfunction applyExtensionFlagValues(\n\tresourceLoader: ResourceLoader,\n\textensionFlagValues: Map<string, boolean | string> | undefined,\n): AgentSessionRuntimeDiagnostic[] {\n\tif (!extensionFlagValues) {\n\t\treturn [];\n\t}\n\n\tconst diagnostics: AgentSessionRuntimeDiagnostic[] = [];\n\tconst extensionsResult = resourceLoader.getExtensions();\n\tconst registeredFlags = new Map<string, { type: \"boolean\" | \"string\" }>();\n\tfor (const extension of extensionsResult.extensions) {\n\t\tfor (const [name, flag] of extension.flags) {\n\t\t\tregisteredFlags.set(name, { type: flag.type });\n\t\t}\n\t}\n\n\tconst unknownFlags: string[] = [];\n\tfor (const [name, value] of extensionFlagValues) {\n\t\tconst flag = registeredFlags.get(name);\n\t\tif (!flag) {\n\t\t\tunknownFlags.push(name);\n\t\t\tcontinue;\n\t\t}\n\t\tif (flag.type === \"boolean\") {\n\t\t\textensionsResult.runtime.flagValues.set(name, true);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"string\") {\n\t\t\textensionsResult.runtime.flagValues.set(name, value);\n\t\t\tcontinue;\n\t\t}\n\t\tdiagnostics.push({\n\t\t\ttype: \"error\",\n\t\t\tmessage: `Extension flag \"--${name}\" requires a value`,\n\t\t});\n\t}\n\n\tif (unknownFlags.length > 0) {\n\t\tdiagnostics.push({\n\t\t\ttype: \"error\",\n\t\t\tmessage: `Unknown option${unknownFlags.length === 1 ? \"\" : \"s\"}: ${unknownFlags.map((name) => `--${name}`).join(\", \")}`,\n\t\t});\n\t}\n\n\treturn diagnostics;\n}\n\n/**\n * Create cwd-bound runtime services.\n *\n * Returns services plus diagnostics. It does not create an AgentSession.\n */\nexport async function createAgentSessionServices(\n\toptions: CreateAgentSessionServicesOptions,\n): Promise<AgentSessionServices> {\n\tconst cwd = options.cwd;\n\tconst agentDir = options.agentDir ?? getAgentDir();\n\tconst authStorage = options.authStorage ?? AuthStorage.create(join(agentDir, \"auth.json\"));\n\tconst settingsManager = options.settingsManager ?? SettingsManager.create(cwd, agentDir);\n\tconst modelRegistry = options.modelRegistry ?? ModelRegistry.create(authStorage, join(agentDir, \"models.json\"));\n\tconst resourceLoader = new DefaultResourceLoader({\n\t\t...(options.resourceLoaderOptions ?? {}),\n\t\tcwd,\n\t\tagentDir,\n\t\tsettingsManager,\n\t});\n\tawait resourceLoader.reload();\n\n\tconst diagnostics: AgentSessionRuntimeDiagnostic[] = [];\n\tconst extensionsResult = resourceLoader.getExtensions();\n\tfor (const { name, config, extensionPath } of extensionsResult.runtime.pendingProviderRegistrations) {\n\t\ttry {\n\t\t\tmodelRegistry.registerProvider(name, config);\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\tdiagnostics.push({\n\t\t\t\ttype: \"error\",\n\t\t\t\tmessage: `Extension \"${extensionPath}\" error: ${message}`,\n\t\t\t});\n\t\t}\n\t}\n\textensionsResult.runtime.pendingProviderRegistrations = [];\n\tdiagnostics.push(...applyExtensionFlagValues(resourceLoader, options.extensionFlagValues));\n\n\treturn {\n\t\tcwd,\n\t\tagentDir,\n\t\tauthStorage,\n\t\tsettingsManager,\n\t\tmodelRegistry,\n\t\tresourceLoader,\n\t\tdiagnostics,\n\t};\n}\n\n/**\n * Create an AgentSession from previously created services.\n *\n * This keeps session creation separate from service creation so callers can\n * resolve model, thinking, tools, and other session inputs against the target\n * cwd before constructing the session.\n */\nexport async function createAgentSessionFromServices(\n\toptions: CreateAgentSessionFromServicesOptions,\n): Promise<CreateAgentSessionResult> {\n\treturn createAgentSession({\n\t\tcwd: options.services.cwd,\n\t\tagentDir: options.services.agentDir,\n\t\tauthStorage: options.services.authStorage,\n\t\tsettingsManager: options.services.settingsManager,\n\t\tmodelRegistry: options.services.modelRegistry,\n\t\tresourceLoader: options.services.resourceLoader,\n\t\tsessionManager: options.sessionManager,\n\t\tmodel: options.model,\n\t\tthinkingLevel: options.thinkingLevel,\n\t\tscopedModels: options.scopedModels,\n\t\ttools: options.tools,\n\t\tcustomTools: options.customTools,\n\t\tsessionStartEvent: options.sessionStartEvent,\n\t});\n}\n"]}