orient-cli 0.1.0 → 0.2.1

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 (862) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/integrations/notebooklm/notebooklm-extension.d.ts +1 -1
  7. package/dist/integrations/notebooklm/notebooklm-extension.js +1 -1
  8. package/dist/integrations/notebooklm/notebooklm-extension.js.map +1 -1
  9. package/dist/orient/change-packet.d.ts +2 -1
  10. package/dist/orient/change-packet.js +25 -8
  11. package/dist/orient/change-packet.js.map +1 -1
  12. package/dist/orient/clarify.d.ts +114 -0
  13. package/dist/orient/clarify.js +186 -0
  14. package/dist/orient/clarify.js.map +1 -0
  15. package/dist/orient/clear-command.d.ts +79 -0
  16. package/dist/orient/clear-command.js +117 -0
  17. package/dist/orient/clear-command.js.map +1 -0
  18. package/dist/orient/mode.d.ts +70 -0
  19. package/dist/orient/mode.js +124 -0
  20. package/dist/orient/mode.js.map +1 -0
  21. package/dist/orient/orient-extension.d.ts +1 -1
  22. package/dist/orient/orient-extension.js +306 -17
  23. package/dist/orient/orient-extension.js.map +1 -1
  24. package/dist/orient/plan-execute.d.ts +137 -0
  25. package/dist/orient/plan-execute.js +333 -0
  26. package/dist/orient/plan-execute.js.map +1 -0
  27. package/dist/orient/tiers.d.ts +109 -0
  28. package/dist/orient/tiers.js +162 -0
  29. package/dist/orient/tiers.js.map +1 -0
  30. package/dist/orient/wizard.d.ts +108 -0
  31. package/dist/orient/wizard.js +183 -0
  32. package/dist/orient/wizard.js.map +1 -0
  33. package/docs/open-source-resources.md +1 -1
  34. package/node_modules/@orient-cli/agent-core/README.md +456 -0
  35. package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts +24 -0
  36. package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts.map +1 -0
  37. package/node_modules/@orient-cli/agent-core/dist/agent-loop.js +404 -0
  38. package/node_modules/@orient-cli/agent-core/dist/agent-loop.js.map +1 -0
  39. package/node_modules/@orient-cli/agent-core/dist/agent.d.ts +115 -0
  40. package/node_modules/@orient-cli/agent-core/dist/agent.d.ts.map +1 -0
  41. package/node_modules/@orient-cli/agent-core/dist/agent.js +395 -0
  42. package/node_modules/@orient-cli/agent-core/dist/agent.js.map +1 -0
  43. package/node_modules/@orient-cli/agent-core/dist/index.d.ts +5 -0
  44. package/node_modules/@orient-cli/agent-core/dist/index.d.ts.map +1 -0
  45. package/node_modules/@orient-cli/agent-core/dist/index.js +9 -0
  46. package/node_modules/@orient-cli/agent-core/dist/index.js.map +1 -0
  47. package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts +85 -0
  48. package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts.map +1 -0
  49. package/node_modules/@orient-cli/agent-core/dist/proxy.js +268 -0
  50. package/node_modules/@orient-cli/agent-core/dist/proxy.js.map +1 -0
  51. package/node_modules/@orient-cli/agent-core/dist/types.d.ts +323 -0
  52. package/node_modules/@orient-cli/agent-core/dist/types.d.ts.map +1 -0
  53. package/node_modules/@orient-cli/agent-core/dist/types.js +2 -0
  54. package/node_modules/@orient-cli/agent-core/dist/types.js.map +1 -0
  55. package/node_modules/@orient-cli/agent-core/package.json +44 -0
  56. package/node_modules/@orient-cli/ai/README.md +1315 -0
  57. package/node_modules/@orient-cli/ai/dist/api-registry.d.ts +20 -0
  58. package/node_modules/@orient-cli/ai/dist/api-registry.d.ts.map +1 -0
  59. package/node_modules/@orient-cli/ai/dist/api-registry.js +44 -0
  60. package/node_modules/@orient-cli/ai/dist/api-registry.js.map +1 -0
  61. package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts +5 -0
  62. package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts.map +1 -0
  63. package/node_modules/@orient-cli/ai/dist/bedrock-provider.js +6 -0
  64. package/node_modules/@orient-cli/ai/dist/bedrock-provider.js.map +1 -0
  65. package/node_modules/@orient-cli/ai/dist/cli.d.ts +3 -0
  66. package/node_modules/@orient-cli/ai/dist/cli.d.ts.map +1 -0
  67. package/node_modules/@orient-cli/ai/dist/cli.js +116 -0
  68. package/node_modules/@orient-cli/ai/dist/cli.js.map +1 -0
  69. package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts +9 -0
  70. package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts.map +1 -0
  71. package/node_modules/@orient-cli/ai/dist/env-api-keys.js +107 -0
  72. package/node_modules/@orient-cli/ai/dist/env-api-keys.js.map +1 -0
  73. package/node_modules/@orient-cli/ai/dist/index.d.ts +26 -0
  74. package/node_modules/@orient-cli/ai/dist/index.d.ts.map +1 -0
  75. package/node_modules/@orient-cli/ai/dist/index.js +14 -0
  76. package/node_modules/@orient-cli/ai/dist/index.js.map +1 -0
  77. package/node_modules/@orient-cli/ai/dist/models.d.ts +24 -0
  78. package/node_modules/@orient-cli/ai/dist/models.d.ts.map +1 -0
  79. package/node_modules/@orient-cli/ai/dist/models.generated.d.ts +14473 -0
  80. package/node_modules/@orient-cli/ai/dist/models.generated.d.ts.map +1 -0
  81. package/node_modules/@orient-cli/ai/dist/models.generated.js +14241 -0
  82. package/node_modules/@orient-cli/ai/dist/models.generated.js.map +1 -0
  83. package/node_modules/@orient-cli/ai/dist/models.js +55 -0
  84. package/node_modules/@orient-cli/ai/dist/models.js.map +1 -0
  85. package/node_modules/@orient-cli/ai/dist/oauth.d.ts +2 -0
  86. package/node_modules/@orient-cli/ai/dist/oauth.d.ts.map +1 -0
  87. package/node_modules/@orient-cli/ai/dist/oauth.js +2 -0
  88. package/node_modules/@orient-cli/ai/dist/oauth.js.map +1 -0
  89. package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts +20 -0
  90. package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts.map +1 -0
  91. package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js +651 -0
  92. package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js.map +1 -0
  93. package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts +40 -0
  94. package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts.map +1 -0
  95. package/node_modules/@orient-cli/ai/dist/providers/anthropic.js +749 -0
  96. package/node_modules/@orient-cli/ai/dist/providers/anthropic.js.map +1 -0
  97. package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts +15 -0
  98. package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts.map +1 -0
  99. package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js +176 -0
  100. package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js.map +1 -0
  101. package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts +56 -0
  102. package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts.map +1 -0
  103. package/node_modules/@orient-cli/ai/dist/providers/faux.js +367 -0
  104. package/node_modules/@orient-cli/ai/dist/providers/faux.js.map +1 -0
  105. package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts +8 -0
  106. package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts.map +1 -0
  107. package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js +29 -0
  108. package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js.map +1 -0
  109. package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts +74 -0
  110. package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts.map +1 -0
  111. package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js +776 -0
  112. package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js.map +1 -0
  113. package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts +65 -0
  114. package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts.map +1 -0
  115. package/node_modules/@orient-cli/ai/dist/providers/google-shared.js +312 -0
  116. package/node_modules/@orient-cli/ai/dist/providers/google-shared.js.map +1 -0
  117. package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts +15 -0
  118. package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts.map +1 -0
  119. package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js +419 -0
  120. package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js.map +1 -0
  121. package/node_modules/@orient-cli/ai/dist/providers/google.d.ts +13 -0
  122. package/node_modules/@orient-cli/ai/dist/providers/google.d.ts.map +1 -0
  123. package/node_modules/@orient-cli/ai/dist/providers/google.js +399 -0
  124. package/node_modules/@orient-cli/ai/dist/providers/google.js.map +1 -0
  125. package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts +22 -0
  126. package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts.map +1 -0
  127. package/node_modules/@orient-cli/ai/dist/providers/mistral.js +501 -0
  128. package/node_modules/@orient-cli/ai/dist/providers/mistral.js.map +1 -0
  129. package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts +9 -0
  130. package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts.map +1 -0
  131. package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js +741 -0
  132. package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js.map +1 -0
  133. package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts +15 -0
  134. package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts.map +1 -0
  135. package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js +753 -0
  136. package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js.map +1 -0
  137. package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts +17 -0
  138. package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts.map +1 -0
  139. package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js +470 -0
  140. package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js.map +1 -0
  141. package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts +13 -0
  142. package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts.map +1 -0
  143. package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js +190 -0
  144. package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js.map +1 -0
  145. package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts +38 -0
  146. package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts.map +1 -0
  147. package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js +261 -0
  148. package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js.map +1 -0
  149. package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts +8 -0
  150. package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts.map +1 -0
  151. package/node_modules/@orient-cli/ai/dist/providers/simple-options.js +35 -0
  152. package/node_modules/@orient-cli/ai/dist/providers/simple-options.js.map +1 -0
  153. package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts +8 -0
  154. package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts.map +1 -0
  155. package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js +155 -0
  156. package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js.map +1 -0
  157. package/node_modules/@orient-cli/ai/dist/stream.d.ts +8 -0
  158. package/node_modules/@orient-cli/ai/dist/stream.d.ts.map +1 -0
  159. package/node_modules/@orient-cli/ai/dist/stream.js +27 -0
  160. package/node_modules/@orient-cli/ai/dist/stream.js.map +1 -0
  161. package/node_modules/@orient-cli/ai/dist/types.d.ts +353 -0
  162. package/node_modules/@orient-cli/ai/dist/types.d.ts.map +1 -0
  163. package/node_modules/@orient-cli/ai/dist/types.js +2 -0
  164. package/node_modules/@orient-cli/ai/dist/types.js.map +1 -0
  165. package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts +21 -0
  166. package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts.map +1 -0
  167. package/node_modules/@orient-cli/ai/dist/utils/event-stream.js +81 -0
  168. package/node_modules/@orient-cli/ai/dist/utils/event-stream.js.map +1 -0
  169. package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts +3 -0
  170. package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts.map +1 -0
  171. package/node_modules/@orient-cli/ai/dist/utils/hash.js +14 -0
  172. package/node_modules/@orient-cli/ai/dist/utils/hash.js.map +1 -0
  173. package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts +9 -0
  174. package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts.map +1 -0
  175. package/node_modules/@orient-cli/ai/dist/utils/json-parse.js +29 -0
  176. package/node_modules/@orient-cli/ai/dist/utils/json-parse.js.map +1 -0
  177. package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts +25 -0
  178. package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts.map +1 -0
  179. package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js +335 -0
  180. package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js.map +1 -0
  181. package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts +30 -0
  182. package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts.map +1 -0
  183. package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js +292 -0
  184. package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js.map +1 -0
  185. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts +26 -0
  186. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -0
  187. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js +376 -0
  188. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js.map +1 -0
  189. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts +26 -0
  190. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -0
  191. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js +481 -0
  192. package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js.map +1 -0
  193. package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts +61 -0
  194. package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts.map +1 -0
  195. package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js +131 -0
  196. package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js.map +1 -0
  197. package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts +3 -0
  198. package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts.map +1 -0
  199. package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js +105 -0
  200. package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js.map +1 -0
  201. package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts +34 -0
  202. package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts.map +1 -0
  203. package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js +373 -0
  204. package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js.map +1 -0
  205. package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts +13 -0
  206. package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts.map +1 -0
  207. package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js +31 -0
  208. package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js.map +1 -0
  209. package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts +47 -0
  210. package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts.map +1 -0
  211. package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js +2 -0
  212. package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js.map +1 -0
  213. package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts +53 -0
  214. package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts.map +1 -0
  215. package/node_modules/@orient-cli/ai/dist/utils/overflow.js +132 -0
  216. package/node_modules/@orient-cli/ai/dist/utils/overflow.js.map +1 -0
  217. package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts +22 -0
  218. package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts.map +1 -0
  219. package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js +26 -0
  220. package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js.map +1 -0
  221. package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts +17 -0
  222. package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts.map +1 -0
  223. package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js +21 -0
  224. package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js.map +1 -0
  225. package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts +18 -0
  226. package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts.map +1 -0
  227. package/node_modules/@orient-cli/ai/dist/utils/validation.js +80 -0
  228. package/node_modules/@orient-cli/ai/dist/utils/validation.js.map +1 -0
  229. package/node_modules/@orient-cli/ai/package.json +114 -0
  230. package/node_modules/@orient-cli/coding-agent/README.md +618 -0
  231. package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts +3 -0
  232. package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts.map +1 -0
  233. package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js +7 -0
  234. package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js.map +1 -0
  235. package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts +2 -0
  236. package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts.map +1 -0
  237. package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js +4 -0
  238. package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js.map +1 -0
  239. package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts +52 -0
  240. package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts.map +1 -0
  241. package/node_modules/@orient-cli/coding-agent/dist/cli/args.js +326 -0
  242. package/node_modules/@orient-cli/coding-agent/dist/cli/args.js.map +1 -0
  243. package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts +14 -0
  244. package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts.map +1 -0
  245. package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js +31 -0
  246. package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js.map +1 -0
  247. package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts +15 -0
  248. package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts.map +1 -0
  249. package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js +83 -0
  250. package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js.map +1 -0
  251. package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts +18 -0
  252. package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts.map +1 -0
  253. package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js +22 -0
  254. package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js.map +1 -0
  255. package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts +9 -0
  256. package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts.map +1 -0
  257. package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js +92 -0
  258. package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js.map +1 -0
  259. package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts +9 -0
  260. package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts.map +1 -0
  261. package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js +35 -0
  262. package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js.map +1 -0
  263. package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts +3 -0
  264. package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts.map +1 -0
  265. package/node_modules/@orient-cli/coding-agent/dist/cli.js +15 -0
  266. package/node_modules/@orient-cli/coding-agent/dist/cli.js.map +1 -0
  267. package/node_modules/@orient-cli/coding-agent/dist/config.d.ts +77 -0
  268. package/node_modules/@orient-cli/coding-agent/dist/config.d.ts.map +1 -0
  269. package/node_modules/@orient-cli/coding-agent/dist/config.js +229 -0
  270. package/node_modules/@orient-cli/coding-agent/dist/config.js.map +1 -0
  271. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts +83 -0
  272. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -0
  273. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js +236 -0
  274. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js.map +1 -0
  275. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts +86 -0
  276. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts.map +1 -0
  277. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js +116 -0
  278. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js.map +1 -0
  279. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts +585 -0
  280. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts.map +1 -0
  281. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js +2497 -0
  282. package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js.map +1 -0
  283. package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts +132 -0
  284. package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts.map +1 -0
  285. package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js +422 -0
  286. package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js.map +1 -0
  287. package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts +46 -0
  288. package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts.map +1 -0
  289. package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js +125 -0
  290. package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js.map +1 -0
  291. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts +88 -0
  292. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -0
  293. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js +243 -0
  294. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js.map +1 -0
  295. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts +121 -0
  296. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts.map +1 -0
  297. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js +613 -0
  298. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js.map +1 -0
  299. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts +7 -0
  300. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts.map +1 -0
  301. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js +7 -0
  302. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js.map +1 -0
  303. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts +38 -0
  304. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts.map +1 -0
  305. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js +153 -0
  306. package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js.map +1 -0
  307. package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts +3 -0
  308. package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts.map +1 -0
  309. package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js +2 -0
  310. package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js.map +1 -0
  311. package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts +15 -0
  312. package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts.map +1 -0
  313. package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js +2 -0
  314. package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js.map +1 -0
  315. package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts +9 -0
  316. package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts.map +1 -0
  317. package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js +25 -0
  318. package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js.map +1 -0
  319. package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts +29 -0
  320. package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts.map +1 -0
  321. package/node_modules/@orient-cli/coding-agent/dist/core/exec.js +75 -0
  322. package/node_modules/@orient-cli/coding-agent/dist/core/exec.js.map +1 -0
  323. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts +22 -0
  324. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
  325. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js +249 -0
  326. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js.map +1 -0
  327. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts +37 -0
  328. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts.map +1 -0
  329. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js +224 -0
  330. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js.map +1 -0
  331. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.css +1001 -0
  332. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.html +55 -0
  333. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.js +1690 -0
  334. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts +40 -0
  335. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts.map +1 -0
  336. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js +95 -0
  337. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js.map +1 -0
  338. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/highlight.min.js +1213 -0
  339. package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/marked.min.js +6 -0
  340. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts +12 -0
  341. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts.map +1 -0
  342. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js +9 -0
  343. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js.map +1 -0
  344. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts +25 -0
  345. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts.map +1 -0
  346. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js +438 -0
  347. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js.map +1 -0
  348. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts +148 -0
  349. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts.map +1 -0
  350. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js +701 -0
  351. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js.map +1 -0
  352. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts +1073 -0
  353. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts.map +1 -0
  354. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js +45 -0
  355. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js.map +1 -0
  356. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts +20 -0
  357. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts.map +1 -0
  358. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js +22 -0
  359. package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js.map +1 -0
  360. package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts +48 -0
  361. package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts.map +1 -0
  362. package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js +314 -0
  363. package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js.map +1 -0
  364. package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts +12 -0
  365. package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts.map +1 -0
  366. package/node_modules/@orient-cli/coding-agent/dist/core/index.js +12 -0
  367. package/node_modules/@orient-cli/coding-agent/dist/core/index.js.map +1 -0
  368. package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts +293 -0
  369. package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts.map +1 -0
  370. package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js +248 -0
  371. package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js.map +1 -0
  372. package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts +77 -0
  373. package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts.map +1 -0
  374. package/node_modules/@orient-cli/coding-agent/dist/core/messages.js +123 -0
  375. package/node_modules/@orient-cli/coding-agent/dist/core/messages.js.map +1 -0
  376. package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts +132 -0
  377. package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts.map +1 -0
  378. package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js +612 -0
  379. package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js.map +1 -0
  380. package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts +110 -0
  381. package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts.map +1 -0
  382. package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js +486 -0
  383. package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js.map +1 -0
  384. package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts +6 -0
  385. package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts.map +1 -0
  386. package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js +59 -0
  387. package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js.map +1 -0
  388. package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts +192 -0
  389. package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts.map +1 -0
  390. package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js +1829 -0
  391. package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js.map +1 -0
  392. package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts +51 -0
  393. package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts.map +1 -0
  394. package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js +249 -0
  395. package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js.map +1 -0
  396. package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts +23 -0
  397. package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts.map +1 -0
  398. package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js +126 -0
  399. package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js.map +1 -0
  400. package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts +185 -0
  401. package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts.map +1 -0
  402. package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js +720 -0
  403. package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js.map +1 -0
  404. package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts +93 -0
  405. package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts.map +1 -0
  406. package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js +236 -0
  407. package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js.map +1 -0
  408. package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts +19 -0
  409. package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts.map +1 -0
  410. package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js +38 -0
  411. package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js.map +1 -0
  412. package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts +333 -0
  413. package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts.map +1 -0
  414. package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js +1105 -0
  415. package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js.map +1 -0
  416. package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts +237 -0
  417. package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts.map +1 -0
  418. package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js +708 -0
  419. package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js.map +1 -0
  420. package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts +60 -0
  421. package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts.map +1 -0
  422. package/node_modules/@orient-cli/coding-agent/dist/core/skills.js +409 -0
  423. package/node_modules/@orient-cli/coding-agent/dist/core/skills.js.map +1 -0
  424. package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts +14 -0
  425. package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts.map +1 -0
  426. package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.js +23 -0
  427. package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.js.map +1 -0
  428. package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts +18 -0
  429. package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts.map +1 -0
  430. package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js +19 -0
  431. package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js.map +1 -0
  432. package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts +28 -0
  433. package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts.map +1 -0
  434. package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js +116 -0
  435. package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js.map +1 -0
  436. package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts +8 -0
  437. package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts.map +1 -0
  438. package/node_modules/@orient-cli/coding-agent/dist/core/timings.js +31 -0
  439. package/node_modules/@orient-cli/coding-agent/dist/core/timings.js.map +1 -0
  440. package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts +73 -0
  441. package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts.map +1 -0
  442. package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js +352 -0
  443. package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js.map +1 -0
  444. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts +85 -0
  445. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts.map +1 -0
  446. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js +337 -0
  447. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js.map +1 -0
  448. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts +53 -0
  449. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts.map +1 -0
  450. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js +196 -0
  451. package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js.map +1 -0
  452. package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts +6 -0
  453. package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
  454. package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js +37 -0
  455. package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js.map +1 -0
  456. package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts +46 -0
  457. package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts.map +1 -0
  458. package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js +258 -0
  459. package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js.map +1 -0
  460. package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts +56 -0
  461. package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts.map +1 -0
  462. package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js +293 -0
  463. package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js.map +1 -0
  464. package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts +115 -0
  465. package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts.map +1 -0
  466. package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js +86 -0
  467. package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js.map +1 -0
  468. package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts +46 -0
  469. package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts.map +1 -0
  470. package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js +172 -0
  471. package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js.map +1 -0
  472. package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts +8 -0
  473. package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts.map +1 -0
  474. package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js +81 -0
  475. package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js.map +1 -0
  476. package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts +46 -0
  477. package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts.map +1 -0
  478. package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js +225 -0
  479. package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js.map +1 -0
  480. package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts +21 -0
  481. package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts.map +1 -0
  482. package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js +49 -0
  483. package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js.map +1 -0
  484. package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
  485. package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
  486. package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js +32 -0
  487. package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js.map +1 -0
  488. package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts +70 -0
  489. package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts.map +1 -0
  490. package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js +205 -0
  491. package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js.map +1 -0
  492. package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts +35 -0
  493. package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts.map +1 -0
  494. package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js +216 -0
  495. package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js.map +1 -0
  496. package/node_modules/@orient-cli/coding-agent/dist/index.d.ts +28 -0
  497. package/node_modules/@orient-cli/coding-agent/dist/index.d.ts.map +1 -0
  498. package/node_modules/@orient-cli/coding-agent/dist/index.js +43 -0
  499. package/node_modules/@orient-cli/coding-agent/dist/index.js.map +1 -0
  500. package/node_modules/@orient-cli/coding-agent/dist/main.d.ts +8 -0
  501. package/node_modules/@orient-cli/coding-agent/dist/main.d.ts.map +1 -0
  502. package/node_modules/@orient-cli/coding-agent/dist/main.js +593 -0
  503. package/node_modules/@orient-cli/coding-agent/dist/main.js.map +1 -0
  504. package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts +33 -0
  505. package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts.map +1 -0
  506. package/node_modules/@orient-cli/coding-agent/dist/migrations.js +281 -0
  507. package/node_modules/@orient-cli/coding-agent/dist/migrations.js.map +1 -0
  508. package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts +9 -0
  509. package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts.map +1 -0
  510. package/node_modules/@orient-cli/coding-agent/dist/modes/index.js +8 -0
  511. package/node_modules/@orient-cli/coding-agent/dist/modes/index.js.map +1 -0
  512. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts +18 -0
  513. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
  514. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js +107 -0
  515. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -0
  516. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts +34 -0
  517. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
  518. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js +175 -0
  519. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -0
  520. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
  521. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
  522. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js +51 -0
  523. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js.map +1 -0
  524. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
  525. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
  526. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js +44 -0
  527. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
  528. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
  529. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
  530. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js +45 -0
  531. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
  532. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts +71 -0
  533. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
  534. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js +479 -0
  535. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js.map +1 -0
  536. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
  537. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
  538. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js +33 -0
  539. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js.map +1 -0
  540. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts +21 -0
  541. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
  542. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js +70 -0
  543. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js.map +1 -0
  544. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts +20 -0
  545. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
  546. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js +79 -0
  547. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js.map +1 -0
  548. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts +12 -0
  549. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts.map +1 -0
  550. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js +133 -0
  551. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js.map +1 -0
  552. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
  553. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
  554. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js +21 -0
  555. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js.map +1 -0
  556. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts +20 -0
  557. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
  558. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js +111 -0
  559. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js.map +1 -0
  560. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts +23 -0
  561. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
  562. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js +61 -0
  563. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js.map +1 -0
  564. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts +24 -0
  565. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
  566. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js +78 -0
  567. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js.map +1 -0
  568. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts +27 -0
  569. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -0
  570. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js +201 -0
  571. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js.map +1 -0
  572. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts +31 -0
  573. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -0
  574. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js +34 -0
  575. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js.map +1 -0
  576. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts +8 -0
  577. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
  578. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js +22 -0
  579. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
  580. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts +42 -0
  581. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
  582. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js +145 -0
  583. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -0
  584. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts +47 -0
  585. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
  586. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js +275 -0
  587. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -0
  588. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts +19 -0
  589. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
  590. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js +97 -0
  591. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js.map +1 -0
  592. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts +53 -0
  593. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts.map +1 -0
  594. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js +204 -0
  595. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js.map +1 -0
  596. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts +49 -0
  597. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
  598. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js +275 -0
  599. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
  600. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
  601. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
  602. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js +155 -0
  603. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js.map +1 -0
  604. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts +95 -0
  605. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
  606. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js +848 -0
  607. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js.map +1 -0
  608. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts +58 -0
  609. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
  610. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js +301 -0
  611. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -0
  612. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
  613. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
  614. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js +39 -0
  615. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js.map +1 -0
  616. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
  617. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
  618. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js +47 -0
  619. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
  620. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts +11 -0
  621. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
  622. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js +50 -0
  623. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js.map +1 -0
  624. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
  625. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
  626. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js +51 -0
  627. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js.map +1 -0
  628. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts +58 -0
  629. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
  630. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js +274 -0
  631. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -0
  632. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts +89 -0
  633. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
  634. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js +1084 -0
  635. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js.map +1 -0
  636. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
  637. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
  638. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js +113 -0
  639. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js.map +1 -0
  640. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts +9 -0
  641. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -0
  642. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js +28 -0
  643. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js.map +1 -0
  644. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
  645. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
  646. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js +33 -0
  647. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js.map +1 -0
  648. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts +345 -0
  649. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
  650. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js +4106 -0
  651. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -0
  652. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/dark.json +85 -0
  653. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/light.json +84 -0
  654. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme-schema.json +335 -0
  655. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts +81 -0
  656. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -0
  657. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js +979 -0
  658. package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js.map +1 -0
  659. package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts +28 -0
  660. package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts.map +1 -0
  661. package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js +112 -0
  662. package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js.map +1 -0
  663. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts +17 -0
  664. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts.map +1 -0
  665. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js +49 -0
  666. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js.map +1 -0
  667. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts +217 -0
  668. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -0
  669. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js +402 -0
  670. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js.map +1 -0
  671. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts +20 -0
  672. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
  673. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js +550 -0
  674. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -0
  675. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts +408 -0
  676. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -0
  677. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js +8 -0
  678. package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js.map +1 -0
  679. package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts +4 -0
  680. package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts.map +1 -0
  681. package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js +234 -0
  682. package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js.map +1 -0
  683. package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts +21 -0
  684. package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts.map +1 -0
  685. package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js +87 -0
  686. package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js.map +1 -0
  687. package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts +11 -0
  688. package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts.map +1 -0
  689. package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js +78 -0
  690. package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js.map +1 -0
  691. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts +11 -0
  692. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts.map +1 -0
  693. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js +245 -0
  694. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js.map +1 -0
  695. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts +8 -0
  696. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts.map +1 -0
  697. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js +14 -0
  698. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js.map +1 -0
  699. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts +2 -0
  700. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts.map +1 -0
  701. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js +78 -0
  702. package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js.map +1 -0
  703. package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts +5 -0
  704. package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts.map +1 -0
  705. package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js +158 -0
  706. package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js.map +1 -0
  707. package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts +8 -0
  708. package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts.map +1 -0
  709. package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js +26 -0
  710. package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js.map +1 -0
  711. package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts +26 -0
  712. package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts.map +1 -0
  713. package/node_modules/@orient-cli/coding-agent/dist/utils/git.js +163 -0
  714. package/node_modules/@orient-cli/coding-agent/dist/utils/git.js.map +1 -0
  715. package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts +9 -0
  716. package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts.map +1 -0
  717. package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js +39 -0
  718. package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js.map +1 -0
  719. package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts +36 -0
  720. package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts.map +1 -0
  721. package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js +137 -0
  722. package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js.map +1 -0
  723. package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts +2 -0
  724. package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts.map +1 -0
  725. package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js +26 -0
  726. package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js.map +1 -0
  727. package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts +7 -0
  728. package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts.map +1 -0
  729. package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js +19 -0
  730. package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js.map +1 -0
  731. package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts +21 -0
  732. package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts.map +1 -0
  733. package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js +121 -0
  734. package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js.map +1 -0
  735. package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts +26 -0
  736. package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts.map +1 -0
  737. package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js +186 -0
  738. package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js.map +1 -0
  739. package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts +5 -0
  740. package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts.map +1 -0
  741. package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js +17 -0
  742. package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js.map +1 -0
  743. package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts +3 -0
  744. package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts.map +1 -0
  745. package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js +252 -0
  746. package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js.map +1 -0
  747. package/node_modules/@orient-cli/coding-agent/package.json +104 -0
  748. package/node_modules/@orient-cli/tui/README.md +767 -0
  749. package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts +52 -0
  750. package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts.map +1 -0
  751. package/node_modules/@orient-cli/tui/dist/autocomplete.js +623 -0
  752. package/node_modules/@orient-cli/tui/dist/autocomplete.js.map +1 -0
  753. package/node_modules/@orient-cli/tui/dist/components/box.d.ts +22 -0
  754. package/node_modules/@orient-cli/tui/dist/components/box.d.ts.map +1 -0
  755. package/node_modules/@orient-cli/tui/dist/components/box.js +104 -0
  756. package/node_modules/@orient-cli/tui/dist/components/box.js.map +1 -0
  757. package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts +22 -0
  758. package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts.map +1 -0
  759. package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js +35 -0
  760. package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js.map +1 -0
  761. package/node_modules/@orient-cli/tui/dist/components/editor.d.ts +244 -0
  762. package/node_modules/@orient-cli/tui/dist/components/editor.d.ts.map +1 -0
  763. package/node_modules/@orient-cli/tui/dist/components/editor.js +1861 -0
  764. package/node_modules/@orient-cli/tui/dist/components/editor.js.map +1 -0
  765. package/node_modules/@orient-cli/tui/dist/components/image.d.ts +28 -0
  766. package/node_modules/@orient-cli/tui/dist/components/image.d.ts.map +1 -0
  767. package/node_modules/@orient-cli/tui/dist/components/image.js +69 -0
  768. package/node_modules/@orient-cli/tui/dist/components/image.js.map +1 -0
  769. package/node_modules/@orient-cli/tui/dist/components/input.d.ts +37 -0
  770. package/node_modules/@orient-cli/tui/dist/components/input.d.ts.map +1 -0
  771. package/node_modules/@orient-cli/tui/dist/components/input.js +426 -0
  772. package/node_modules/@orient-cli/tui/dist/components/input.js.map +1 -0
  773. package/node_modules/@orient-cli/tui/dist/components/loader.d.ts +21 -0
  774. package/node_modules/@orient-cli/tui/dist/components/loader.d.ts.map +1 -0
  775. package/node_modules/@orient-cli/tui/dist/components/loader.js +49 -0
  776. package/node_modules/@orient-cli/tui/dist/components/loader.js.map +1 -0
  777. package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts +95 -0
  778. package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts.map +1 -0
  779. package/node_modules/@orient-cli/tui/dist/components/markdown.js +663 -0
  780. package/node_modules/@orient-cli/tui/dist/components/markdown.js.map +1 -0
  781. package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts +50 -0
  782. package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts.map +1 -0
  783. package/node_modules/@orient-cli/tui/dist/components/select-list.js +159 -0
  784. package/node_modules/@orient-cli/tui/dist/components/select-list.js.map +1 -0
  785. package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts +50 -0
  786. package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts.map +1 -0
  787. package/node_modules/@orient-cli/tui/dist/components/settings-list.js +185 -0
  788. package/node_modules/@orient-cli/tui/dist/components/settings-list.js.map +1 -0
  789. package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts +12 -0
  790. package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts.map +1 -0
  791. package/node_modules/@orient-cli/tui/dist/components/spacer.js +23 -0
  792. package/node_modules/@orient-cli/tui/dist/components/spacer.js.map +1 -0
  793. package/node_modules/@orient-cli/tui/dist/components/text.d.ts +19 -0
  794. package/node_modules/@orient-cli/tui/dist/components/text.d.ts.map +1 -0
  795. package/node_modules/@orient-cli/tui/dist/components/text.js +89 -0
  796. package/node_modules/@orient-cli/tui/dist/components/text.js.map +1 -0
  797. package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts +13 -0
  798. package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts.map +1 -0
  799. package/node_modules/@orient-cli/tui/dist/components/truncated-text.js +51 -0
  800. package/node_modules/@orient-cli/tui/dist/components/truncated-text.js.map +1 -0
  801. package/node_modules/@orient-cli/tui/dist/editor-component.d.ts +39 -0
  802. package/node_modules/@orient-cli/tui/dist/editor-component.d.ts.map +1 -0
  803. package/node_modules/@orient-cli/tui/dist/editor-component.js +2 -0
  804. package/node_modules/@orient-cli/tui/dist/editor-component.js.map +1 -0
  805. package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts +16 -0
  806. package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts.map +1 -0
  807. package/node_modules/@orient-cli/tui/dist/fuzzy.js +107 -0
  808. package/node_modules/@orient-cli/tui/dist/fuzzy.js.map +1 -0
  809. package/node_modules/@orient-cli/tui/dist/index.d.ts +23 -0
  810. package/node_modules/@orient-cli/tui/dist/index.d.ts.map +1 -0
  811. package/node_modules/@orient-cli/tui/dist/index.js +32 -0
  812. package/node_modules/@orient-cli/tui/dist/index.js.map +1 -0
  813. package/node_modules/@orient-cli/tui/dist/keybindings.d.ts +193 -0
  814. package/node_modules/@orient-cli/tui/dist/keybindings.d.ts.map +1 -0
  815. package/node_modules/@orient-cli/tui/dist/keybindings.js +174 -0
  816. package/node_modules/@orient-cli/tui/dist/keybindings.js.map +1 -0
  817. package/node_modules/@orient-cli/tui/dist/keys.d.ts +170 -0
  818. package/node_modules/@orient-cli/tui/dist/keys.d.ts.map +1 -0
  819. package/node_modules/@orient-cli/tui/dist/keys.js +1124 -0
  820. package/node_modules/@orient-cli/tui/dist/keys.js.map +1 -0
  821. package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts +28 -0
  822. package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts.map +1 -0
  823. package/node_modules/@orient-cli/tui/dist/kill-ring.js +44 -0
  824. package/node_modules/@orient-cli/tui/dist/kill-ring.js.map +1 -0
  825. package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts +48 -0
  826. package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts.map +1 -0
  827. package/node_modules/@orient-cli/tui/dist/stdin-buffer.js +317 -0
  828. package/node_modules/@orient-cli/tui/dist/stdin-buffer.js.map +1 -0
  829. package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts +68 -0
  830. package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts.map +1 -0
  831. package/node_modules/@orient-cli/tui/dist/terminal-image.js +288 -0
  832. package/node_modules/@orient-cli/tui/dist/terminal-image.js.map +1 -0
  833. package/node_modules/@orient-cli/tui/dist/terminal.d.ts +84 -0
  834. package/node_modules/@orient-cli/tui/dist/terminal.d.ts.map +1 -0
  835. package/node_modules/@orient-cli/tui/dist/terminal.js +285 -0
  836. package/node_modules/@orient-cli/tui/dist/terminal.js.map +1 -0
  837. package/node_modules/@orient-cli/tui/dist/tui.d.ts +222 -0
  838. package/node_modules/@orient-cli/tui/dist/tui.d.ts.map +1 -0
  839. package/node_modules/@orient-cli/tui/dist/tui.js +1008 -0
  840. package/node_modules/@orient-cli/tui/dist/tui.js.map +1 -0
  841. package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts +17 -0
  842. package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts.map +1 -0
  843. package/node_modules/@orient-cli/tui/dist/undo-stack.js +25 -0
  844. package/node_modules/@orient-cli/tui/dist/undo-stack.js.map +1 -0
  845. package/node_modules/@orient-cli/tui/dist/utils.d.ts +78 -0
  846. package/node_modules/@orient-cli/tui/dist/utils.d.ts.map +1 -0
  847. package/node_modules/@orient-cli/tui/dist/utils.js +960 -0
  848. package/node_modules/@orient-cli/tui/dist/utils.js.map +1 -0
  849. package/node_modules/@orient-cli/tui/package.json +52 -0
  850. package/package.json +47 -8
  851. package/schemas/orient-standard/templates-tier-1/brief.md +22 -0
  852. package/schemas/orient-standard/templates-tier-1/plan.md +17 -0
  853. package/schemas/orient-standard/templates-tier-1/spec.md +23 -0
  854. package/schemas/orient-standard/templates-tier-1/tasks.md +14 -0
  855. package/schemas/orient-standard/templates-tier-2/brief.md +32 -0
  856. package/schemas/orient-standard/templates-tier-2/plan.md +44 -0
  857. package/schemas/orient-standard/templates-tier-2/spec.md +46 -0
  858. package/schemas/orient-standard/templates-tier-2/tasks.md +34 -0
  859. package/schemas/orient-standard/templates-tier-3/brief.md +54 -0
  860. package/schemas/orient-standard/templates-tier-3/plan.md +67 -0
  861. package/schemas/orient-standard/templates-tier-3/spec.md +65 -0
  862. package/schemas/orient-standard/templates-tier-3/tasks.md +79 -0
@@ -0,0 +1,234 @@
1
+ import chalk from "chalk";
2
+ import { selectConfig } from "./cli/config-selector.js";
3
+ import { APP_NAME, getAgentDir } from "./config.js";
4
+ import { DefaultPackageManager } from "./core/package-manager.js";
5
+ import { SettingsManager } from "./core/settings-manager.js";
6
+ function reportSettingsErrors(settingsManager, context) {
7
+ const errors = settingsManager.drainErrors();
8
+ for (const { scope, error } of errors) {
9
+ console.error(chalk.yellow(`Warning (${context}, ${scope} settings): ${error.message}`));
10
+ if (error.stack) {
11
+ console.error(chalk.dim(error.stack));
12
+ }
13
+ }
14
+ }
15
+ function getPackageCommandUsage(command) {
16
+ switch (command) {
17
+ case "install":
18
+ return `${APP_NAME} install <source> [-l]`;
19
+ case "remove":
20
+ return `${APP_NAME} remove <source> [-l]`;
21
+ case "update":
22
+ return `${APP_NAME} update [source]`;
23
+ case "list":
24
+ return `${APP_NAME} list`;
25
+ }
26
+ }
27
+ function printPackageCommandHelp(command) {
28
+ switch (command) {
29
+ case "install":
30
+ console.log(`${chalk.bold("Usage:")}
31
+ ${getPackageCommandUsage("install")}
32
+
33
+ Install a package and add it to settings.
34
+
35
+ Options:
36
+ -l, --local Install project-locally (.pi/settings.json)
37
+
38
+ Examples:
39
+ ${APP_NAME} install npm:@foo/bar
40
+ ${APP_NAME} install git:github.com/user/repo
41
+ ${APP_NAME} install git:git@github.com:user/repo
42
+ ${APP_NAME} install https://github.com/user/repo
43
+ ${APP_NAME} install ssh://git@github.com/user/repo
44
+ ${APP_NAME} install ./local/path
45
+ `);
46
+ return;
47
+ case "remove":
48
+ console.log(`${chalk.bold("Usage:")}
49
+ ${getPackageCommandUsage("remove")}
50
+
51
+ Remove a package and its source from settings.
52
+ Alias: ${APP_NAME} uninstall <source> [-l]
53
+
54
+ Options:
55
+ -l, --local Remove from project settings (.pi/settings.json)
56
+
57
+ Examples:
58
+ ${APP_NAME} remove npm:@foo/bar
59
+ ${APP_NAME} uninstall npm:@foo/bar
60
+ `);
61
+ return;
62
+ case "update":
63
+ console.log(`${chalk.bold("Usage:")}
64
+ ${getPackageCommandUsage("update")}
65
+
66
+ Update installed packages.
67
+ If <source> is provided, only that package is updated.
68
+ `);
69
+ return;
70
+ case "list":
71
+ console.log(`${chalk.bold("Usage:")}
72
+ ${getPackageCommandUsage("list")}
73
+
74
+ List installed packages from user and project settings.
75
+ `);
76
+ return;
77
+ }
78
+ }
79
+ function parsePackageCommand(args) {
80
+ const [rawCommand, ...rest] = args;
81
+ let command;
82
+ if (rawCommand === "uninstall") {
83
+ command = "remove";
84
+ }
85
+ else if (rawCommand === "install" || rawCommand === "remove" || rawCommand === "update" || rawCommand === "list") {
86
+ command = rawCommand;
87
+ }
88
+ if (!command) {
89
+ return undefined;
90
+ }
91
+ let local = false;
92
+ let help = false;
93
+ let invalidOption;
94
+ let source;
95
+ for (const arg of rest) {
96
+ if (arg === "-h" || arg === "--help") {
97
+ help = true;
98
+ continue;
99
+ }
100
+ if (arg === "-l" || arg === "--local") {
101
+ if (command === "install" || command === "remove") {
102
+ local = true;
103
+ }
104
+ else {
105
+ invalidOption = invalidOption ?? arg;
106
+ }
107
+ continue;
108
+ }
109
+ if (arg.startsWith("-")) {
110
+ invalidOption = invalidOption ?? arg;
111
+ continue;
112
+ }
113
+ if (!source) {
114
+ source = arg;
115
+ }
116
+ }
117
+ return { command, source, local, help, invalidOption };
118
+ }
119
+ export async function handleConfigCommand(args) {
120
+ if (args[0] !== "config") {
121
+ return false;
122
+ }
123
+ const cwd = process.cwd();
124
+ const agentDir = getAgentDir();
125
+ const settingsManager = SettingsManager.create(cwd, agentDir);
126
+ reportSettingsErrors(settingsManager, "config command");
127
+ const packageManager = new DefaultPackageManager({ cwd, agentDir, settingsManager });
128
+ const resolvedPaths = await packageManager.resolve();
129
+ await selectConfig({
130
+ resolvedPaths,
131
+ settingsManager,
132
+ cwd,
133
+ agentDir,
134
+ });
135
+ process.exit(0);
136
+ }
137
+ export async function handlePackageCommand(args) {
138
+ const options = parsePackageCommand(args);
139
+ if (!options) {
140
+ return false;
141
+ }
142
+ if (options.help) {
143
+ printPackageCommandHelp(options.command);
144
+ return true;
145
+ }
146
+ if (options.invalidOption) {
147
+ console.error(chalk.red(`Unknown option ${options.invalidOption} for "${options.command}".`));
148
+ console.error(chalk.dim(`Use "${APP_NAME} --help" or "${getPackageCommandUsage(options.command)}".`));
149
+ process.exitCode = 1;
150
+ return true;
151
+ }
152
+ const source = options.source;
153
+ if ((options.command === "install" || options.command === "remove") && !source) {
154
+ console.error(chalk.red(`Missing ${options.command} source.`));
155
+ console.error(chalk.dim(`Usage: ${getPackageCommandUsage(options.command)}`));
156
+ process.exitCode = 1;
157
+ return true;
158
+ }
159
+ const cwd = process.cwd();
160
+ const agentDir = getAgentDir();
161
+ const settingsManager = SettingsManager.create(cwd, agentDir);
162
+ reportSettingsErrors(settingsManager, "package command");
163
+ const packageManager = new DefaultPackageManager({ cwd, agentDir, settingsManager });
164
+ packageManager.setProgressCallback((event) => {
165
+ if (event.type === "start") {
166
+ process.stdout.write(chalk.dim(`${event.message}\n`));
167
+ }
168
+ });
169
+ try {
170
+ switch (options.command) {
171
+ case "install":
172
+ await packageManager.installAndPersist(source, { local: options.local });
173
+ console.log(chalk.green(`Installed ${source}`));
174
+ return true;
175
+ case "remove": {
176
+ const removed = await packageManager.removeAndPersist(source, { local: options.local });
177
+ if (!removed) {
178
+ console.error(chalk.red(`No matching package found for ${source}`));
179
+ process.exitCode = 1;
180
+ return true;
181
+ }
182
+ console.log(chalk.green(`Removed ${source}`));
183
+ return true;
184
+ }
185
+ case "list": {
186
+ const configuredPackages = packageManager.listConfiguredPackages();
187
+ const userPackages = configuredPackages.filter((pkg) => pkg.scope === "user");
188
+ const projectPackages = configuredPackages.filter((pkg) => pkg.scope === "project");
189
+ if (configuredPackages.length === 0) {
190
+ console.log(chalk.dim("No packages installed."));
191
+ return true;
192
+ }
193
+ const formatPackage = (pkg) => {
194
+ const display = pkg.filtered ? `${pkg.source} (filtered)` : pkg.source;
195
+ console.log(` ${display}`);
196
+ if (pkg.installedPath) {
197
+ console.log(chalk.dim(` ${pkg.installedPath}`));
198
+ }
199
+ };
200
+ if (userPackages.length > 0) {
201
+ console.log(chalk.bold("User packages:"));
202
+ for (const pkg of userPackages) {
203
+ formatPackage(pkg);
204
+ }
205
+ }
206
+ if (projectPackages.length > 0) {
207
+ if (userPackages.length > 0)
208
+ console.log();
209
+ console.log(chalk.bold("Project packages:"));
210
+ for (const pkg of projectPackages) {
211
+ formatPackage(pkg);
212
+ }
213
+ }
214
+ return true;
215
+ }
216
+ case "update":
217
+ await packageManager.update(source);
218
+ if (source) {
219
+ console.log(chalk.green(`Updated ${source}`));
220
+ }
221
+ else {
222
+ console.log(chalk.green("Updated packages"));
223
+ }
224
+ return true;
225
+ }
226
+ }
227
+ catch (error) {
228
+ const message = error instanceof Error ? error.message : "Unknown package command error";
229
+ console.error(chalk.red(`Error: ${message}`));
230
+ process.exitCode = 1;
231
+ return true;
232
+ }
233
+ }
234
+ //# sourceMappingURL=package-manager-cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-manager-cli.js","sourceRoot":"","sources":["../src/package-manager-cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAY7D,SAAS,oBAAoB,CAAC,eAAgC,EAAE,OAAe,EAAQ;IACtF,MAAM,MAAM,GAAG,eAAe,CAAC,WAAW,EAAE,CAAC;IAC7C,KAAK,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,MAAM,EAAE,CAAC;QACvC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,OAAO,KAAK,KAAK,eAAe,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACzF,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YACjB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACvC,CAAC;IACF,CAAC;AAAA,CACD;AAED,SAAS,sBAAsB,CAAC,OAAu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GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,MAAM,EAAE,CAAC,CAAC,CAAC;gBAC/C,CAAC;qBAAM,CAAC;oBACP,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBAC9C,CAAC;gBACD,OAAO,IAAI,CAAC;QACd,CAAC;IACF,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC;QACzF,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC,CAAC;QAC9C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;AAAA,CACD","sourcesContent":["import chalk from \"chalk\";\nimport { selectConfig } from \"./cli/config-selector.js\";\nimport { APP_NAME, getAgentDir } from \"./config.js\";\nimport { DefaultPackageManager } from \"./core/package-manager.js\";\nimport { SettingsManager } from \"./core/settings-manager.js\";\n\nexport type PackageCommand = \"install\" | \"remove\" | \"update\" | \"list\";\n\ninterface PackageCommandOptions {\n\tcommand: PackageCommand;\n\tsource?: string;\n\tlocal: boolean;\n\thelp: boolean;\n\tinvalidOption?: string;\n}\n\nfunction reportSettingsErrors(settingsManager: SettingsManager, context: string): void {\n\tconst errors = settingsManager.drainErrors();\n\tfor (const { scope, error } of errors) {\n\t\tconsole.error(chalk.yellow(`Warning (${context}, ${scope} settings): ${error.message}`));\n\t\tif (error.stack) {\n\t\t\tconsole.error(chalk.dim(error.stack));\n\t\t}\n\t}\n}\n\nfunction getPackageCommandUsage(command: PackageCommand): string {\n\tswitch (command) {\n\t\tcase \"install\":\n\t\t\treturn `${APP_NAME} install <source> [-l]`;\n\t\tcase \"remove\":\n\t\t\treturn `${APP_NAME} remove <source> [-l]`;\n\t\tcase \"update\":\n\t\t\treturn `${APP_NAME} update [source]`;\n\t\tcase \"list\":\n\t\t\treturn `${APP_NAME} list`;\n\t}\n}\n\nfunction printPackageCommandHelp(command: PackageCommand): void {\n\tswitch (command) {\n\t\tcase \"install\":\n\t\t\tconsole.log(`${chalk.bold(\"Usage:\")}\n ${getPackageCommandUsage(\"install\")}\n\nInstall a package and add it to settings.\n\nOptions:\n -l, --local Install project-locally (.pi/settings.json)\n\nExamples:\n ${APP_NAME} install npm:@foo/bar\n ${APP_NAME} install git:github.com/user/repo\n ${APP_NAME} install git:git@github.com:user/repo\n ${APP_NAME} install https://github.com/user/repo\n ${APP_NAME} install ssh://git@github.com/user/repo\n ${APP_NAME} install ./local/path\n`);\n\t\t\treturn;\n\n\t\tcase \"remove\":\n\t\t\tconsole.log(`${chalk.bold(\"Usage:\")}\n ${getPackageCommandUsage(\"remove\")}\n\nRemove a package and its source from settings.\nAlias: ${APP_NAME} uninstall <source> [-l]\n\nOptions:\n -l, --local Remove from project settings (.pi/settings.json)\n\nExamples:\n ${APP_NAME} remove npm:@foo/bar\n ${APP_NAME} uninstall npm:@foo/bar\n`);\n\t\t\treturn;\n\n\t\tcase \"update\":\n\t\t\tconsole.log(`${chalk.bold(\"Usage:\")}\n ${getPackageCommandUsage(\"update\")}\n\nUpdate installed packages.\nIf <source> is provided, only that package is updated.\n`);\n\t\t\treturn;\n\n\t\tcase \"list\":\n\t\t\tconsole.log(`${chalk.bold(\"Usage:\")}\n ${getPackageCommandUsage(\"list\")}\n\nList installed packages from user and project settings.\n`);\n\t\t\treturn;\n\t}\n}\n\nfunction parsePackageCommand(args: string[]): PackageCommandOptions | undefined {\n\tconst [rawCommand, ...rest] = args;\n\tlet command: PackageCommand | undefined;\n\tif (rawCommand === \"uninstall\") {\n\t\tcommand = \"remove\";\n\t} else if (rawCommand === \"install\" || rawCommand === \"remove\" || rawCommand === \"update\" || rawCommand === \"list\") {\n\t\tcommand = rawCommand;\n\t}\n\tif (!command) {\n\t\treturn undefined;\n\t}\n\n\tlet local = false;\n\tlet help = false;\n\tlet invalidOption: string | undefined;\n\tlet source: string | undefined;\n\n\tfor (const arg of rest) {\n\t\tif (arg === \"-h\" || arg === \"--help\") {\n\t\t\thelp = true;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (arg === \"-l\" || arg === \"--local\") {\n\t\t\tif (command === \"install\" || command === \"remove\") {\n\t\t\t\tlocal = true;\n\t\t\t} else {\n\t\t\t\tinvalidOption = invalidOption ?? arg;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (arg.startsWith(\"-\")) {\n\t\t\tinvalidOption = invalidOption ?? arg;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!source) {\n\t\t\tsource = arg;\n\t\t}\n\t}\n\n\treturn { command, source, local, help, invalidOption };\n}\n\nexport async function handleConfigCommand(args: string[]): Promise<boolean> {\n\tif (args[0] !== \"config\") {\n\t\treturn false;\n\t}\n\n\tconst cwd = process.cwd();\n\tconst agentDir = getAgentDir();\n\tconst settingsManager = SettingsManager.create(cwd, agentDir);\n\treportSettingsErrors(settingsManager, \"config command\");\n\tconst packageManager = new DefaultPackageManager({ cwd, agentDir, settingsManager });\n\tconst resolvedPaths = await packageManager.resolve();\n\n\tawait selectConfig({\n\t\tresolvedPaths,\n\t\tsettingsManager,\n\t\tcwd,\n\t\tagentDir,\n\t});\n\n\tprocess.exit(0);\n}\n\nexport async function handlePackageCommand(args: string[]): Promise<boolean> {\n\tconst options = parsePackageCommand(args);\n\tif (!options) {\n\t\treturn false;\n\t}\n\n\tif (options.help) {\n\t\tprintPackageCommandHelp(options.command);\n\t\treturn true;\n\t}\n\n\tif (options.invalidOption) {\n\t\tconsole.error(chalk.red(`Unknown option ${options.invalidOption} for \"${options.command}\".`));\n\t\tconsole.error(chalk.dim(`Use \"${APP_NAME} --help\" or \"${getPackageCommandUsage(options.command)}\".`));\n\t\tprocess.exitCode = 1;\n\t\treturn true;\n\t}\n\n\tconst source = options.source;\n\tif ((options.command === \"install\" || options.command === \"remove\") && !source) {\n\t\tconsole.error(chalk.red(`Missing ${options.command} source.`));\n\t\tconsole.error(chalk.dim(`Usage: ${getPackageCommandUsage(options.command)}`));\n\t\tprocess.exitCode = 1;\n\t\treturn true;\n\t}\n\n\tconst cwd = process.cwd();\n\tconst agentDir = getAgentDir();\n\tconst settingsManager = SettingsManager.create(cwd, agentDir);\n\treportSettingsErrors(settingsManager, \"package command\");\n\tconst packageManager = new DefaultPackageManager({ cwd, agentDir, settingsManager });\n\n\tpackageManager.setProgressCallback((event) => {\n\t\tif (event.type === \"start\") {\n\t\t\tprocess.stdout.write(chalk.dim(`${event.message}\\n`));\n\t\t}\n\t});\n\n\ttry {\n\t\tswitch (options.command) {\n\t\t\tcase \"install\":\n\t\t\t\tawait packageManager.installAndPersist(source!, { local: options.local });\n\t\t\t\tconsole.log(chalk.green(`Installed ${source}`));\n\t\t\t\treturn true;\n\n\t\t\tcase \"remove\": {\n\t\t\t\tconst removed = await packageManager.removeAndPersist(source!, { local: options.local });\n\t\t\t\tif (!removed) {\n\t\t\t\t\tconsole.error(chalk.red(`No matching package found for ${source}`));\n\t\t\t\t\tprocess.exitCode = 1;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tconsole.log(chalk.green(`Removed ${source}`));\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcase \"list\": {\n\t\t\t\tconst configuredPackages = packageManager.listConfiguredPackages();\n\t\t\t\tconst userPackages = configuredPackages.filter((pkg) => pkg.scope === \"user\");\n\t\t\t\tconst projectPackages = configuredPackages.filter((pkg) => pkg.scope === \"project\");\n\n\t\t\t\tif (configuredPackages.length === 0) {\n\t\t\t\t\tconsole.log(chalk.dim(\"No packages installed.\"));\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tconst formatPackage = (pkg: (typeof configuredPackages)[number]) => {\n\t\t\t\t\tconst display = pkg.filtered ? `${pkg.source} (filtered)` : pkg.source;\n\t\t\t\t\tconsole.log(` ${display}`);\n\t\t\t\t\tif (pkg.installedPath) {\n\t\t\t\t\t\tconsole.log(chalk.dim(` ${pkg.installedPath}`));\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tif (userPackages.length > 0) {\n\t\t\t\t\tconsole.log(chalk.bold(\"User packages:\"));\n\t\t\t\t\tfor (const pkg of userPackages) {\n\t\t\t\t\t\tformatPackage(pkg);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (projectPackages.length > 0) {\n\t\t\t\t\tif (userPackages.length > 0) console.log();\n\t\t\t\t\tconsole.log(chalk.bold(\"Project packages:\"));\n\t\t\t\t\tfor (const pkg of projectPackages) {\n\t\t\t\t\t\tformatPackage(pkg);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcase \"update\":\n\t\t\t\tawait packageManager.update(source);\n\t\t\t\tif (source) {\n\t\t\t\t\tconsole.log(chalk.green(`Updated ${source}`));\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(chalk.green(\"Updated packages\"));\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t}\n\t} catch (error: unknown) {\n\t\tconst message = error instanceof Error ? error.message : \"Unknown package command error\";\n\t\tconsole.error(chalk.red(`Error: ${message}`));\n\t\tprocess.exitCode = 1;\n\t\treturn true;\n\t}\n}\n"]}
@@ -0,0 +1,21 @@
1
+ export interface ChangelogEntry {
2
+ major: number;
3
+ minor: number;
4
+ patch: number;
5
+ content: string;
6
+ }
7
+ /**
8
+ * Parse changelog entries from CHANGELOG.md
9
+ * Scans for ## lines and collects content until next ## or EOF
10
+ */
11
+ export declare function parseChangelog(changelogPath: string): ChangelogEntry[];
12
+ /**
13
+ * Compare versions. Returns: -1 if v1 < v2, 0 if v1 === v2, 1 if v1 > v2
14
+ */
15
+ export declare function compareVersions(v1: ChangelogEntry, v2: ChangelogEntry): number;
16
+ /**
17
+ * Get entries newer than lastVersion
18
+ */
19
+ export declare function getNewEntries(entries: ChangelogEntry[], lastVersion: string): ChangelogEntry[];
20
+ export { getChangelogPath } from "../config.js";
21
+ //# sourceMappingURL=changelog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/utils/changelog.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,cAAc,EAAE,CAyDtE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,cAAc,GAAG,MAAM,CAI9E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,cAAc,EAAE,CAW9F;AAGD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import { existsSync, readFileSync } from \"fs\";\n\nexport interface ChangelogEntry {\n\tmajor: number;\n\tminor: number;\n\tpatch: number;\n\tcontent: string;\n}\n\n/**\n * Parse changelog entries from CHANGELOG.md\n * Scans for ## lines and collects content until next ## or EOF\n */\nexport function parseChangelog(changelogPath: string): ChangelogEntry[] {\n\tif (!existsSync(changelogPath)) {\n\t\treturn [];\n\t}\n\n\ttry {\n\t\tconst content = readFileSync(changelogPath, \"utf-8\");\n\t\tconst lines = content.split(\"\\n\");\n\t\tconst entries: ChangelogEntry[] = [];\n\n\t\tlet currentLines: string[] = [];\n\t\tlet currentVersion: { major: number; minor: number; patch: number } | null = null;\n\n\t\tfor (const line of lines) {\n\t\t\t// Check if this is a version header (## [x.y.z] ...)\n\t\t\tif (line.startsWith(\"## \")) {\n\t\t\t\t// Save previous entry if exists\n\t\t\t\tif (currentVersion && currentLines.length > 0) {\n\t\t\t\t\tentries.push({\n\t\t\t\t\t\t...currentVersion,\n\t\t\t\t\t\tcontent: currentLines.join(\"\\n\").trim(),\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Try to parse version from this line\n\t\t\t\tconst versionMatch = line.match(/##\\s+\\[?(\\d+)\\.(\\d+)\\.(\\d+)\\]?/);\n\t\t\t\tif (versionMatch) {\n\t\t\t\t\tcurrentVersion = {\n\t\t\t\t\t\tmajor: Number.parseInt(versionMatch[1], 10),\n\t\t\t\t\t\tminor: Number.parseInt(versionMatch[2], 10),\n\t\t\t\t\t\tpatch: Number.parseInt(versionMatch[3], 10),\n\t\t\t\t\t};\n\t\t\t\t\tcurrentLines = [line];\n\t\t\t\t} else {\n\t\t\t\t\t// Reset if we can't parse version\n\t\t\t\t\tcurrentVersion = null;\n\t\t\t\t\tcurrentLines = [];\n\t\t\t\t}\n\t\t\t} else if (currentVersion) {\n\t\t\t\t// Collect lines for current version\n\t\t\t\tcurrentLines.push(line);\n\t\t\t}\n\t\t}\n\n\t\t// Save last entry\n\t\tif (currentVersion && currentLines.length > 0) {\n\t\t\tentries.push({\n\t\t\t\t...currentVersion,\n\t\t\t\tcontent: currentLines.join(\"\\n\").trim(),\n\t\t\t});\n\t\t}\n\n\t\treturn entries;\n\t} catch (error) {\n\t\tconsole.error(`Warning: Could not parse changelog: ${error}`);\n\t\treturn [];\n\t}\n}\n\n/**\n * Compare versions. Returns: -1 if v1 < v2, 0 if v1 === v2, 1 if v1 > v2\n */\nexport function compareVersions(v1: ChangelogEntry, v2: ChangelogEntry): number {\n\tif (v1.major !== v2.major) return v1.major - v2.major;\n\tif (v1.minor !== v2.minor) return v1.minor - v2.minor;\n\treturn v1.patch - v2.patch;\n}\n\n/**\n * Get entries newer than lastVersion\n */\nexport function getNewEntries(entries: ChangelogEntry[], lastVersion: string): ChangelogEntry[] {\n\t// Parse lastVersion\n\tconst parts = lastVersion.split(\".\").map(Number);\n\tconst last: ChangelogEntry = {\n\t\tmajor: parts[0] || 0,\n\t\tminor: parts[1] || 0,\n\t\tpatch: parts[2] || 0,\n\t\tcontent: \"\",\n\t};\n\n\treturn entries.filter((entry) => compareVersions(entry, last) > 0);\n}\n\n// Re-export getChangelogPath from paths.ts for convenience\nexport { getChangelogPath } from \"../config.js\";\n"]}
@@ -0,0 +1,87 @@
1
+ import { existsSync, readFileSync } from "fs";
2
+ /**
3
+ * Parse changelog entries from CHANGELOG.md
4
+ * Scans for ## lines and collects content until next ## or EOF
5
+ */
6
+ export function parseChangelog(changelogPath) {
7
+ if (!existsSync(changelogPath)) {
8
+ return [];
9
+ }
10
+ try {
11
+ const content = readFileSync(changelogPath, "utf-8");
12
+ const lines = content.split("\n");
13
+ const entries = [];
14
+ let currentLines = [];
15
+ let currentVersion = null;
16
+ for (const line of lines) {
17
+ // Check if this is a version header (## [x.y.z] ...)
18
+ if (line.startsWith("## ")) {
19
+ // Save previous entry if exists
20
+ if (currentVersion && currentLines.length > 0) {
21
+ entries.push({
22
+ ...currentVersion,
23
+ content: currentLines.join("\n").trim(),
24
+ });
25
+ }
26
+ // Try to parse version from this line
27
+ const versionMatch = line.match(/##\s+\[?(\d+)\.(\d+)\.(\d+)\]?/);
28
+ if (versionMatch) {
29
+ currentVersion = {
30
+ major: Number.parseInt(versionMatch[1], 10),
31
+ minor: Number.parseInt(versionMatch[2], 10),
32
+ patch: Number.parseInt(versionMatch[3], 10),
33
+ };
34
+ currentLines = [line];
35
+ }
36
+ else {
37
+ // Reset if we can't parse version
38
+ currentVersion = null;
39
+ currentLines = [];
40
+ }
41
+ }
42
+ else if (currentVersion) {
43
+ // Collect lines for current version
44
+ currentLines.push(line);
45
+ }
46
+ }
47
+ // Save last entry
48
+ if (currentVersion && currentLines.length > 0) {
49
+ entries.push({
50
+ ...currentVersion,
51
+ content: currentLines.join("\n").trim(),
52
+ });
53
+ }
54
+ return entries;
55
+ }
56
+ catch (error) {
57
+ console.error(`Warning: Could not parse changelog: ${error}`);
58
+ return [];
59
+ }
60
+ }
61
+ /**
62
+ * Compare versions. Returns: -1 if v1 < v2, 0 if v1 === v2, 1 if v1 > v2
63
+ */
64
+ export function compareVersions(v1, v2) {
65
+ if (v1.major !== v2.major)
66
+ return v1.major - v2.major;
67
+ if (v1.minor !== v2.minor)
68
+ return v1.minor - v2.minor;
69
+ return v1.patch - v2.patch;
70
+ }
71
+ /**
72
+ * Get entries newer than lastVersion
73
+ */
74
+ export function getNewEntries(entries, lastVersion) {
75
+ // Parse lastVersion
76
+ const parts = lastVersion.split(".").map(Number);
77
+ const last = {
78
+ major: parts[0] || 0,
79
+ minor: parts[1] || 0,
80
+ patch: parts[2] || 0,
81
+ content: "",
82
+ };
83
+ return entries.filter((entry) => compareVersions(entry, last) > 0);
84
+ }
85
+ // Re-export getChangelogPath from paths.ts for convenience
86
+ export { getChangelogPath } from "../config.js";
87
+ //# sourceMappingURL=changelog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/utils/changelog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAS9C;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,aAAqB,EAAoB;IACvE,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QAChC,OAAO,EAAE,CAAC;IACX,CAAC;IAED,IAAI,CAAC;QACJ,MAAM,OAAO,GAAG,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,OAAO,GAAqB,EAAE,CAAC;QAErC,IAAI,YAAY,GAAa,EAAE,CAAC;QAChC,IAAI,cAAc,GAA2D,IAAI,CAAC;QAElF,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YAC1B,qDAAqD;YACrD,IAAI,IAAI,CAAC,UAAU,CAAC,K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C;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,uCAAuC,KAAK,EAAE,CAAC,CAAC;QAC9D,OAAO,EAAE,CAAC;IACX,CAAC;AAAA,CACD;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,EAAkB,EAAE,EAAkB,EAAU;IAC/E,IAAI,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IACtD,IAAI,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IACtD,OAAO,EAAE,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;AAAA,CAC3B;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAyB,EAAE,WAAmB,EAAoB;IAC/F,oBAAoB;IACpB,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACjD,MAAM,IAAI,GAAmB;QAC5B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QACpB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QACpB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QACpB,OAAO,EAAE,EAAE;KACX,CAAC;IAEF,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAAA,CACnE;AAED,2DAA2D;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import { existsSync, readFileSync } from \"fs\";\n\nexport interface ChangelogEntry {\n\tmajor: number;\n\tminor: number;\n\tpatch: number;\n\tcontent: string;\n}\n\n/**\n * Parse changelog entries from CHANGELOG.md\n * Scans for ## lines and collects content until next ## or EOF\n */\nexport function parseChangelog(changelogPath: string): ChangelogEntry[] {\n\tif (!existsSync(changelogPath)) {\n\t\treturn [];\n\t}\n\n\ttry {\n\t\tconst content = readFileSync(changelogPath, \"utf-8\");\n\t\tconst lines = content.split(\"\\n\");\n\t\tconst entries: ChangelogEntry[] = [];\n\n\t\tlet currentLines: string[] = [];\n\t\tlet currentVersion: { major: number; minor: number; patch: number } | null = null;\n\n\t\tfor (const line of lines) {\n\t\t\t// Check if this is a version header (## [x.y.z] ...)\n\t\t\tif (line.startsWith(\"## \")) {\n\t\t\t\t// Save previous entry if exists\n\t\t\t\tif (currentVersion && currentLines.length > 0) {\n\t\t\t\t\tentries.push({\n\t\t\t\t\t\t...currentVersion,\n\t\t\t\t\t\tcontent: currentLines.join(\"\\n\").trim(),\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Try to parse version from this line\n\t\t\t\tconst versionMatch = line.match(/##\\s+\\[?(\\d+)\\.(\\d+)\\.(\\d+)\\]?/);\n\t\t\t\tif (versionMatch) {\n\t\t\t\t\tcurrentVersion = {\n\t\t\t\t\t\tmajor: Number.parseInt(versionMatch[1], 10),\n\t\t\t\t\t\tminor: Number.parseInt(versionMatch[2], 10),\n\t\t\t\t\t\tpatch: Number.parseInt(versionMatch[3], 10),\n\t\t\t\t\t};\n\t\t\t\t\tcurrentLines = [line];\n\t\t\t\t} else {\n\t\t\t\t\t// Reset if we can't parse version\n\t\t\t\t\tcurrentVersion = null;\n\t\t\t\t\tcurrentLines = [];\n\t\t\t\t}\n\t\t\t} else if (currentVersion) {\n\t\t\t\t// Collect lines for current version\n\t\t\t\tcurrentLines.push(line);\n\t\t\t}\n\t\t}\n\n\t\t// Save last entry\n\t\tif (currentVersion && currentLines.length > 0) {\n\t\t\tentries.push({\n\t\t\t\t...currentVersion,\n\t\t\t\tcontent: currentLines.join(\"\\n\").trim(),\n\t\t\t});\n\t\t}\n\n\t\treturn entries;\n\t} catch (error) {\n\t\tconsole.error(`Warning: Could not parse changelog: ${error}`);\n\t\treturn [];\n\t}\n}\n\n/**\n * Compare versions. Returns: -1 if v1 < v2, 0 if v1 === v2, 1 if v1 > v2\n */\nexport function compareVersions(v1: ChangelogEntry, v2: ChangelogEntry): number {\n\tif (v1.major !== v2.major) return v1.major - v2.major;\n\tif (v1.minor !== v2.minor) return v1.minor - v2.minor;\n\treturn v1.patch - v2.patch;\n}\n\n/**\n * Get entries newer than lastVersion\n */\nexport function getNewEntries(entries: ChangelogEntry[], lastVersion: string): ChangelogEntry[] {\n\t// Parse lastVersion\n\tconst parts = lastVersion.split(\".\").map(Number);\n\tconst last: ChangelogEntry = {\n\t\tmajor: parts[0] || 0,\n\t\tminor: parts[1] || 0,\n\t\tpatch: parts[2] || 0,\n\t\tcontent: \"\",\n\t};\n\n\treturn entries.filter((entry) => compareVersions(entry, last) > 0);\n}\n\n// Re-export getChangelogPath from paths.ts for convenience\nexport { getChangelogPath } from \"../config.js\";\n"]}
@@ -0,0 +1,11 @@
1
+ import type { ChildProcess } from "node:child_process";
2
+ /**
3
+ * Wait for a child process to terminate without hanging on inherited stdio handles.
4
+ *
5
+ * On Windows, daemonized descendants can inherit the child's stdout/stderr pipe
6
+ * handles. In that case the child emits `exit`, but `close` can hang forever even
7
+ * though the original process is already gone. We wait briefly for stdio to end,
8
+ * then forcibly stop tracking the inherited handles.
9
+ */
10
+ export declare function waitForChildProcess(child: ChildProcess): Promise<number | null>;
11
+ //# sourceMappingURL=child-process.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"child-process.d.ts","sourceRoot":"","sources":["../../src/utils/child-process.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyE/E","sourcesContent":["import type { ChildProcess } from \"node:child_process\";\n\nconst EXIT_STDIO_GRACE_MS = 100;\n\n/**\n * Wait for a child process to terminate without hanging on inherited stdio handles.\n *\n * On Windows, daemonized descendants can inherit the child's stdout/stderr pipe\n * handles. In that case the child emits `exit`, but `close` can hang forever even\n * though the original process is already gone. We wait briefly for stdio to end,\n * then forcibly stop tracking the inherited handles.\n */\nexport function waitForChildProcess(child: ChildProcess): Promise<number | null> {\n\treturn new Promise((resolve, reject) => {\n\t\tlet settled = false;\n\t\tlet exited = false;\n\t\tlet exitCode: number | null = null;\n\t\tlet postExitTimer: NodeJS.Timeout | undefined;\n\t\tlet stdoutEnded = child.stdout === null;\n\t\tlet stderrEnded = child.stderr === null;\n\n\t\tconst cleanup = () => {\n\t\t\tif (postExitTimer) {\n\t\t\t\tclearTimeout(postExitTimer);\n\t\t\t\tpostExitTimer = undefined;\n\t\t\t}\n\t\t\tchild.removeListener(\"error\", onError);\n\t\t\tchild.removeListener(\"exit\", onExit);\n\t\t\tchild.removeListener(\"close\", onClose);\n\t\t\tchild.stdout?.removeListener(\"end\", onStdoutEnd);\n\t\t\tchild.stderr?.removeListener(\"end\", onStderrEnd);\n\t\t};\n\n\t\tconst finalize = (code: number | null) => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tcleanup();\n\t\t\tchild.stdout?.destroy();\n\t\t\tchild.stderr?.destroy();\n\t\t\tresolve(code);\n\t\t};\n\n\t\tconst maybeFinalizeAfterExit = () => {\n\t\t\tif (!exited || settled) return;\n\t\t\tif (stdoutEnded && stderrEnded) {\n\t\t\t\tfinalize(exitCode);\n\t\t\t}\n\t\t};\n\n\t\tconst onStdoutEnd = () => {\n\t\t\tstdoutEnded = true;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t};\n\n\t\tconst onStderrEnd = () => {\n\t\t\tstderrEnded = true;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t};\n\n\t\tconst onError = (err: Error) => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tcleanup();\n\t\t\treject(err);\n\t\t};\n\n\t\tconst onExit = (code: number | null) => {\n\t\t\texited = true;\n\t\t\texitCode = code;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t\tif (!settled) {\n\t\t\t\tpostExitTimer = setTimeout(() => finalize(code), EXIT_STDIO_GRACE_MS);\n\t\t\t}\n\t\t};\n\n\t\tconst onClose = (code: number | null) => {\n\t\t\tfinalize(code);\n\t\t};\n\n\t\tchild.stdout?.once(\"end\", onStdoutEnd);\n\t\tchild.stderr?.once(\"end\", onStderrEnd);\n\t\tchild.once(\"error\", onError);\n\t\tchild.once(\"exit\", onExit);\n\t\tchild.once(\"close\", onClose);\n\t});\n}\n"]}
@@ -0,0 +1,78 @@
1
+ const EXIT_STDIO_GRACE_MS = 100;
2
+ /**
3
+ * Wait for a child process to terminate without hanging on inherited stdio handles.
4
+ *
5
+ * On Windows, daemonized descendants can inherit the child's stdout/stderr pipe
6
+ * handles. In that case the child emits `exit`, but `close` can hang forever even
7
+ * though the original process is already gone. We wait briefly for stdio to end,
8
+ * then forcibly stop tracking the inherited handles.
9
+ */
10
+ export function waitForChildProcess(child) {
11
+ return new Promise((resolve, reject) => {
12
+ let settled = false;
13
+ let exited = false;
14
+ let exitCode = null;
15
+ let postExitTimer;
16
+ let stdoutEnded = child.stdout === null;
17
+ let stderrEnded = child.stderr === null;
18
+ const cleanup = () => {
19
+ if (postExitTimer) {
20
+ clearTimeout(postExitTimer);
21
+ postExitTimer = undefined;
22
+ }
23
+ child.removeListener("error", onError);
24
+ child.removeListener("exit", onExit);
25
+ child.removeListener("close", onClose);
26
+ child.stdout?.removeListener("end", onStdoutEnd);
27
+ child.stderr?.removeListener("end", onStderrEnd);
28
+ };
29
+ const finalize = (code) => {
30
+ if (settled)
31
+ return;
32
+ settled = true;
33
+ cleanup();
34
+ child.stdout?.destroy();
35
+ child.stderr?.destroy();
36
+ resolve(code);
37
+ };
38
+ const maybeFinalizeAfterExit = () => {
39
+ if (!exited || settled)
40
+ return;
41
+ if (stdoutEnded && stderrEnded) {
42
+ finalize(exitCode);
43
+ }
44
+ };
45
+ const onStdoutEnd = () => {
46
+ stdoutEnded = true;
47
+ maybeFinalizeAfterExit();
48
+ };
49
+ const onStderrEnd = () => {
50
+ stderrEnded = true;
51
+ maybeFinalizeAfterExit();
52
+ };
53
+ const onError = (err) => {
54
+ if (settled)
55
+ return;
56
+ settled = true;
57
+ cleanup();
58
+ reject(err);
59
+ };
60
+ const onExit = (code) => {
61
+ exited = true;
62
+ exitCode = code;
63
+ maybeFinalizeAfterExit();
64
+ if (!settled) {
65
+ postExitTimer = setTimeout(() => finalize(code), EXIT_STDIO_GRACE_MS);
66
+ }
67
+ };
68
+ const onClose = (code) => {
69
+ finalize(code);
70
+ };
71
+ child.stdout?.once("end", onStdoutEnd);
72
+ child.stderr?.once("end", onStderrEnd);
73
+ child.once("error", onError);
74
+ child.once("exit", onExit);
75
+ child.once("close", onClose);
76
+ });
77
+ }
78
+ //# sourceMappingURL=child-process.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"child-process.js","sourceRoot":"","sources":["../../src/utils/child-process.ts"],"names":[],"mappings":"AAEA,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAmB,EAA0B;IAChF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC;QACvC,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,QAAQ,GAAkB,IAAI,CAAC;QACnC,IAAI,aAAyC,CAAC;QAC9C,IAAI,WAAW,GAAG,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC;QACxC,IAAI,WAAW,GAAG,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC;QAExC,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC;YACrB,IAAI,aAAa,EA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AO;gBAAE,OAAO;YACpB,OAAO,GAAG,IAAI,CAAC;YACf,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,GAAG,CAAC,CAAC;QAAA,CACZ,CAAC;QAEF,MAAM,MAAM,GAAG,CAAC,IAAmB,EAAE,EAAE,CAAC;YACvC,MAAM,GAAG,IAAI,CAAC;YACd,QAAQ,GAAG,IAAI,CAAC;YAChB,sBAAsB,EAAE,CAAC;YACzB,IAAI,CAAC,OAAO,EAAE,CAAC;gBACd,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,mBAAmB,CAAC,CAAC;YACvE,CAAC;QAAA,CACD,CAAC;QAEF,MAAM,OAAO,GAAG,CAAC,IAAmB,EAAE,EAAE,CAAC;YACxC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAAA,CACf,CAAC;QAEF,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACvC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACvC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAAA,CAC7B,CAAC,CAAC;AAAA,CACH","sourcesContent":["import type { ChildProcess } from \"node:child_process\";\n\nconst EXIT_STDIO_GRACE_MS = 100;\n\n/**\n * Wait for a child process to terminate without hanging on inherited stdio handles.\n *\n * On Windows, daemonized descendants can inherit the child's stdout/stderr pipe\n * handles. In that case the child emits `exit`, but `close` can hang forever even\n * though the original process is already gone. We wait briefly for stdio to end,\n * then forcibly stop tracking the inherited handles.\n */\nexport function waitForChildProcess(child: ChildProcess): Promise<number | null> {\n\treturn new Promise((resolve, reject) => {\n\t\tlet settled = false;\n\t\tlet exited = false;\n\t\tlet exitCode: number | null = null;\n\t\tlet postExitTimer: NodeJS.Timeout | undefined;\n\t\tlet stdoutEnded = child.stdout === null;\n\t\tlet stderrEnded = child.stderr === null;\n\n\t\tconst cleanup = () => {\n\t\t\tif (postExitTimer) {\n\t\t\t\tclearTimeout(postExitTimer);\n\t\t\t\tpostExitTimer = undefined;\n\t\t\t}\n\t\t\tchild.removeListener(\"error\", onError);\n\t\t\tchild.removeListener(\"exit\", onExit);\n\t\t\tchild.removeListener(\"close\", onClose);\n\t\t\tchild.stdout?.removeListener(\"end\", onStdoutEnd);\n\t\t\tchild.stderr?.removeListener(\"end\", onStderrEnd);\n\t\t};\n\n\t\tconst finalize = (code: number | null) => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tcleanup();\n\t\t\tchild.stdout?.destroy();\n\t\t\tchild.stderr?.destroy();\n\t\t\tresolve(code);\n\t\t};\n\n\t\tconst maybeFinalizeAfterExit = () => {\n\t\t\tif (!exited || settled) return;\n\t\t\tif (stdoutEnded && stderrEnded) {\n\t\t\t\tfinalize(exitCode);\n\t\t\t}\n\t\t};\n\n\t\tconst onStdoutEnd = () => {\n\t\t\tstdoutEnded = true;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t};\n\n\t\tconst onStderrEnd = () => {\n\t\t\tstderrEnded = true;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t};\n\n\t\tconst onError = (err: Error) => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tcleanup();\n\t\t\treject(err);\n\t\t};\n\n\t\tconst onExit = (code: number | null) => {\n\t\t\texited = true;\n\t\t\texitCode = code;\n\t\t\tmaybeFinalizeAfterExit();\n\t\t\tif (!settled) {\n\t\t\t\tpostExitTimer = setTimeout(() => finalize(code), EXIT_STDIO_GRACE_MS);\n\t\t\t}\n\t\t};\n\n\t\tconst onClose = (code: number | null) => {\n\t\t\tfinalize(code);\n\t\t};\n\n\t\tchild.stdout?.once(\"end\", onStdoutEnd);\n\t\tchild.stderr?.once(\"end\", onStderrEnd);\n\t\tchild.once(\"error\", onError);\n\t\tchild.once(\"exit\", onExit);\n\t\tchild.once(\"close\", onClose);\n\t});\n}\n"]}
@@ -0,0 +1,11 @@
1
+ export type ClipboardImage = {
2
+ bytes: Uint8Array;
3
+ mimeType: string;
4
+ };
5
+ export declare function isWaylandSession(env?: NodeJS.ProcessEnv): boolean;
6
+ export declare function extensionForImageMimeType(mimeType: string): string | null;
7
+ export declare function readClipboardImage(options?: {
8
+ env?: NodeJS.ProcessEnv;
9
+ platform?: NodeJS.Platform;
10
+ }): Promise<ClipboardImage | null>;
11
+ //# sourceMappingURL=clipboard-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard-image.d.ts","sourceRoot":"","sources":["../../src/utils/clipboard-image.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,cAAc,GAAG;IAC5B,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AASF,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAE9E;AAMD,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAazE;AAmND,wBAAsB,kBAAkB,CAAC,OAAO,CAAC,EAAE;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;CAC3B,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CA2CjC","sourcesContent":["import { spawnSync } from \"child_process\";\nimport { randomUUID } from \"crypto\";\nimport { readFileSync, unlinkSync } from \"fs\";\nimport { tmpdir } from \"os\";\nimport { join } from \"path\";\n\nimport { clipboard } from \"./clipboard-native.js\";\nimport { loadPhoton } from \"./photon.js\";\n\nexport type ClipboardImage = {\n\tbytes: Uint8Array;\n\tmimeType: string;\n};\n\nconst SUPPORTED_IMAGE_MIME_TYPES = [\"image/png\", \"image/jpeg\", \"image/webp\", \"image/gif\"] as const;\n\nconst DEFAULT_LIST_TIMEOUT_MS = 1000;\nconst DEFAULT_READ_TIMEOUT_MS = 3000;\nconst DEFAULT_POWERSHELL_TIMEOUT_MS = 5000;\nconst DEFAULT_MAX_BUFFER_BYTES = 50 * 1024 * 1024;\n\nexport function isWaylandSession(env: NodeJS.ProcessEnv = process.env): boolean {\n\treturn Boolean(env.WAYLAND_DISPLAY) || env.XDG_SESSION_TYPE === \"wayland\";\n}\n\nfunction baseMimeType(mimeType: string): string {\n\treturn mimeType.split(\";\")[0]?.trim().toLowerCase() ?? mimeType.toLowerCase();\n}\n\nexport function extensionForImageMimeType(mimeType: string): string | null {\n\tswitch (baseMimeType(mimeType)) {\n\t\tcase \"image/png\":\n\t\t\treturn \"png\";\n\t\tcase \"image/jpeg\":\n\t\t\treturn \"jpg\";\n\t\tcase \"image/webp\":\n\t\t\treturn \"webp\";\n\t\tcase \"image/gif\":\n\t\t\treturn \"gif\";\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\nfunction selectPreferredImageMimeType(mimeTypes: string[]): string | null {\n\tconst normalized = mimeTypes\n\t\t.map((t) => t.trim())\n\t\t.filter(Boolean)\n\t\t.map((t) => ({ raw: t, base: baseMimeType(t) }));\n\n\tfor (const preferred of SUPPORTED_IMAGE_MIME_TYPES) {\n\t\tconst match = normalized.find((t) => t.base === preferred);\n\t\tif (match) {\n\t\t\treturn match.raw;\n\t\t}\n\t}\n\n\tconst anyImage = normalized.find((t) => t.base.startsWith(\"image/\"));\n\treturn anyImage?.raw ?? null;\n}\n\nfunction isSupportedImageMimeType(mimeType: string): boolean {\n\tconst base = baseMimeType(mimeType);\n\treturn SUPPORTED_IMAGE_MIME_TYPES.some((t) => t === base);\n}\n\n/**\n * Convert unsupported image formats to PNG using Photon.\n * Returns null if conversion is unavailable or fails.\n */\nasync function convertToPng(bytes: Uint8Array): Promise<Uint8Array | null> {\n\tconst photon = await loadPhoton();\n\tif (!photon) {\n\t\treturn null;\n\t}\n\n\ttry {\n\t\tconst image = photon.PhotonImage.new_from_byteslice(bytes);\n\t\ttry {\n\t\t\treturn image.get_bytes();\n\t\t} finally {\n\t\t\timage.free();\n\t\t}\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction runCommand(\n\tcommand: string,\n\targs: string[],\n\toptions?: { timeoutMs?: number; maxBufferBytes?: number; env?: NodeJS.ProcessEnv },\n): { stdout: Buffer; ok: boolean } {\n\tconst timeoutMs = options?.timeoutMs ?? DEFAULT_READ_TIMEOUT_MS;\n\tconst maxBufferBytes = options?.maxBufferBytes ?? DEFAULT_MAX_BUFFER_BYTES;\n\n\tconst result = spawnSync(command, args, {\n\t\ttimeout: timeoutMs,\n\t\tmaxBuffer: maxBufferBytes,\n\t\tenv: options?.env,\n\t});\n\n\tif (result.error) {\n\t\treturn { ok: false, stdout: Buffer.alloc(0) };\n\t}\n\n\tif (result.status !== 0) {\n\t\treturn { ok: false, stdout: Buffer.alloc(0) };\n\t}\n\n\tconst stdout = Buffer.isBuffer(result.stdout)\n\t\t? result.stdout\n\t\t: Buffer.from(result.stdout ?? \"\", typeof result.stdout === \"string\" ? \"utf-8\" : undefined);\n\n\treturn { ok: true, stdout };\n}\n\nfunction readClipboardImageViaWlPaste(): ClipboardImage | null {\n\tconst list = runCommand(\"wl-paste\", [\"--list-types\"], { timeoutMs: DEFAULT_LIST_TIMEOUT_MS });\n\tif (!list.ok) {\n\t\treturn null;\n\t}\n\n\tconst types = list.stdout\n\t\t.toString(\"utf-8\")\n\t\t.split(/\\r?\\n/)\n\t\t.map((t) => t.trim())\n\t\t.filter(Boolean);\n\n\tconst selectedType = selectPreferredImageMimeType(types);\n\tif (!selectedType) {\n\t\treturn null;\n\t}\n\n\tconst data = runCommand(\"wl-paste\", [\"--type\", selectedType, \"--no-newline\"]);\n\tif (!data.ok || data.stdout.length === 0) {\n\t\treturn null;\n\t}\n\n\treturn { bytes: data.stdout, mimeType: baseMimeType(selectedType) };\n}\n\nfunction isWSL(env: NodeJS.ProcessEnv = process.env): boolean {\n\tif (env.WSL_DISTRO_NAME || env.WSLENV) {\n\t\treturn true;\n\t}\n\n\ttry {\n\t\tconst release = readFileSync(\"/proc/version\", \"utf-8\");\n\t\treturn /microsoft|wsl/i.test(release);\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * On WSL, the Linux clipboard (Wayland/X11) does not receive image data from\n * Windows screenshots (Win+Shift+S). PowerShell can access the Windows clipboard\n * directly, so we use it as a fallback.\n */\nfunction readClipboardImageViaPowerShell(): ClipboardImage | null {\n\tconst tmpFile = join(tmpdir(), `pi-wsl-clip-${randomUUID()}.png`);\n\n\ttry {\n\t\tconst winPathResult = runCommand(\"wslpath\", [\"-w\", tmpFile], { timeoutMs: DEFAULT_LIST_TIMEOUT_MS });\n\t\tif (!winPathResult.ok) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst winPath = winPathResult.stdout.toString(\"utf-8\").trim();\n\t\tif (!winPath) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst psScript = [\n\t\t\t\"Add-Type -AssemblyName System.Windows.Forms\",\n\t\t\t\"Add-Type -AssemblyName System.Drawing\",\n\t\t\t\"$path = $env:PI_WSL_CLIPBOARD_IMAGE_PATH\",\n\t\t\t\"$img = [System.Windows.Forms.Clipboard]::GetImage()\",\n\t\t\t\"if ($img) { $img.Save($path, [System.Drawing.Imaging.ImageFormat]::Png); Write-Output 'ok' } else { Write-Output 'empty' }\",\n\t\t].join(\"; \");\n\n\t\tconst result = runCommand(\"powershell.exe\", [\"-NoProfile\", \"-Command\", psScript], {\n\t\t\ttimeoutMs: DEFAULT_POWERSHELL_TIMEOUT_MS,\n\t\t\tenv: { ...process.env, PI_WSL_CLIPBOARD_IMAGE_PATH: winPath },\n\t\t});\n\t\tif (!result.ok) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst output = result.stdout.toString(\"utf-8\").trim();\n\t\tif (output !== \"ok\") {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst bytes = readFileSync(tmpFile);\n\t\tif (bytes.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn { bytes: new Uint8Array(bytes), mimeType: \"image/png\" };\n\t} catch {\n\t\treturn null;\n\t} finally {\n\t\ttry {\n\t\t\tunlinkSync(tmpFile);\n\t\t} catch {\n\t\t\t// Ignore cleanup errors.\n\t\t}\n\t}\n}\n\nfunction readClipboardImageViaXclip(): ClipboardImage | null {\n\tconst targets = runCommand(\"xclip\", [\"-selection\", \"clipboard\", \"-t\", \"TARGETS\", \"-o\"], {\n\t\ttimeoutMs: DEFAULT_LIST_TIMEOUT_MS,\n\t});\n\n\tlet candidateTypes: string[] = [];\n\tif (targets.ok) {\n\t\tcandidateTypes = targets.stdout\n\t\t\t.toString(\"utf-8\")\n\t\t\t.split(/\\r?\\n/)\n\t\t\t.map((t) => t.trim())\n\t\t\t.filter(Boolean);\n\t}\n\n\tconst preferred = candidateTypes.length > 0 ? selectPreferredImageMimeType(candidateTypes) : null;\n\tconst tryTypes = preferred ? [preferred, ...SUPPORTED_IMAGE_MIME_TYPES] : [...SUPPORTED_IMAGE_MIME_TYPES];\n\n\tfor (const mimeType of tryTypes) {\n\t\tconst data = runCommand(\"xclip\", [\"-selection\", \"clipboard\", \"-t\", mimeType, \"-o\"]);\n\t\tif (data.ok && data.stdout.length > 0) {\n\t\t\treturn { bytes: data.stdout, mimeType: baseMimeType(mimeType) };\n\t\t}\n\t}\n\n\treturn null;\n}\n\nasync function readClipboardImageViaNativeClipboard(): Promise<ClipboardImage | null> {\n\tif (!clipboard || !clipboard.hasImage()) {\n\t\treturn null;\n\t}\n\n\tconst imageData = await clipboard.getImageBinary();\n\tif (!imageData || imageData.length === 0) {\n\t\treturn null;\n\t}\n\n\tconst bytes = imageData instanceof Uint8Array ? imageData : Uint8Array.from(imageData);\n\treturn { bytes, mimeType: \"image/png\" };\n}\n\nexport async function readClipboardImage(options?: {\n\tenv?: NodeJS.ProcessEnv;\n\tplatform?: NodeJS.Platform;\n}): Promise<ClipboardImage | null> {\n\tconst env = options?.env ?? process.env;\n\tconst platform = options?.platform ?? process.platform;\n\n\tif (env.TERMUX_VERSION) {\n\t\treturn null;\n\t}\n\n\tlet image: ClipboardImage | null = null;\n\n\tif (platform === \"linux\") {\n\t\tconst wsl = isWSL(env);\n\t\tconst wayland = isWaylandSession(env);\n\n\t\tif (wayland || wsl) {\n\t\t\timage = readClipboardImageViaWlPaste() ?? readClipboardImageViaXclip();\n\t\t}\n\n\t\tif (!image && wsl) {\n\t\t\timage = readClipboardImageViaPowerShell();\n\t\t}\n\n\t\tif (!image && !wayland) {\n\t\t\timage = await readClipboardImageViaNativeClipboard();\n\t\t}\n\t} else {\n\t\timage = await readClipboardImageViaNativeClipboard();\n\t}\n\n\tif (!image) {\n\t\treturn null;\n\t}\n\n\t// Convert unsupported formats (e.g., BMP from WSLg) to PNG\n\tif (!isSupportedImageMimeType(image.mimeType)) {\n\t\tconst pngBytes = await convertToPng(image.bytes);\n\t\tif (!pngBytes) {\n\t\t\treturn null;\n\t\t}\n\t\treturn { bytes: pngBytes, mimeType: \"image/png\" };\n\t}\n\n\treturn image;\n}\n"]}