@useconvoy/cli 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (664) hide show
  1. package/LICENSE +90 -0
  2. package/README.md +495 -0
  3. package/dist/bin/convoy.d.ts +2 -0
  4. package/dist/bin/convoy.js +129 -0
  5. package/dist/bin/convoy.js.map +1 -0
  6. package/dist/marketplace/.claude-plugin/marketplace.json +14 -0
  7. package/dist/marketplace/opensana/.claude-plugin/plugin.json +5 -0
  8. package/dist/marketplace/opensana/README.md +90 -0
  9. package/dist/marketplace/opensana/skills/tasks/SKILL.md +133 -0
  10. package/dist/marketplace/opensana/skills/tasks/references/mcp-setup.md +164 -0
  11. package/dist/src/agent/app/chunk-flush-buffer.d.ts +35 -0
  12. package/dist/src/agent/app/chunk-flush-buffer.js +133 -0
  13. package/dist/src/agent/app/chunk-flush-buffer.js.map +1 -0
  14. package/dist/src/agent/app/chunk-scrub.d.ts +9 -0
  15. package/dist/src/agent/app/chunk-scrub.js +120 -0
  16. package/dist/src/agent/app/chunk-scrub.js.map +1 -0
  17. package/dist/src/agent/app/interaction-router.d.ts +16 -0
  18. package/dist/src/agent/app/interaction-router.js +29 -0
  19. package/dist/src/agent/app/interaction-router.js.map +1 -0
  20. package/dist/src/agent/app/runner.d.ts +41 -0
  21. package/dist/src/agent/app/runner.js +353 -0
  22. package/dist/src/agent/app/runner.js.map +1 -0
  23. package/dist/src/agent/app/runtime-config.d.ts +3 -0
  24. package/dist/src/agent/app/runtime-config.js +4 -0
  25. package/dist/src/agent/app/runtime-config.js.map +1 -0
  26. package/dist/src/agent/app/thread-attachment-cache.d.ts +17 -0
  27. package/dist/src/agent/app/thread-attachment-cache.js +124 -0
  28. package/dist/src/agent/app/thread-attachment-cache.js.map +1 -0
  29. package/dist/src/agent/app/thread-processor.d.ts +40 -0
  30. package/dist/src/agent/app/thread-processor.js +792 -0
  31. package/dist/src/agent/app/thread-processor.js.map +1 -0
  32. package/dist/src/agent/app/worktree-op-processor.d.ts +27 -0
  33. package/dist/src/agent/app/worktree-op-processor.js +173 -0
  34. package/dist/src/agent/app/worktree-op-processor.js.map +1 -0
  35. package/dist/src/agent/runtimes/agent-instructions.d.ts +16 -0
  36. package/dist/src/agent/runtimes/agent-instructions.js +33 -0
  37. package/dist/src/agent/runtimes/agent-instructions.js.map +1 -0
  38. package/dist/src/agent/runtimes/claudeCode/continuation.d.ts +1 -0
  39. package/dist/src/agent/runtimes/claudeCode/continuation.js +30 -0
  40. package/dist/src/agent/runtimes/claudeCode/continuation.js.map +1 -0
  41. package/dist/src/agent/runtimes/claudeCode/detect.d.ts +12 -0
  42. package/dist/src/agent/runtimes/claudeCode/detect.js +109 -0
  43. package/dist/src/agent/runtimes/claudeCode/detect.js.map +1 -0
  44. package/dist/src/agent/runtimes/claudeCode/interactions.d.ts +13 -0
  45. package/dist/src/agent/runtimes/claudeCode/interactions.js +167 -0
  46. package/dist/src/agent/runtimes/claudeCode/interactions.js.map +1 -0
  47. package/dist/src/agent/runtimes/claudeCode/models.d.ts +3 -0
  48. package/dist/src/agent/runtimes/claudeCode/models.js +16 -0
  49. package/dist/src/agent/runtimes/claudeCode/models.js.map +1 -0
  50. package/dist/src/agent/runtimes/claudeCode/prompts.d.ts +1 -0
  51. package/dist/src/agent/runtimes/claudeCode/prompts.js +5 -0
  52. package/dist/src/agent/runtimes/claudeCode/prompts.js.map +1 -0
  53. package/dist/src/agent/runtimes/claudeCode/runner.d.ts +32 -0
  54. package/dist/src/agent/runtimes/claudeCode/runner.js +941 -0
  55. package/dist/src/agent/runtimes/claudeCode/runner.js.map +1 -0
  56. package/dist/src/agent/runtimes/claudeCode/runtime.d.ts +2 -0
  57. package/dist/src/agent/runtimes/claudeCode/runtime.js +126 -0
  58. package/dist/src/agent/runtimes/claudeCode/runtime.js.map +1 -0
  59. package/dist/src/agent/runtimes/claudeCode/streaming.d.ts +8 -0
  60. package/dist/src/agent/runtimes/claudeCode/streaming.js +88 -0
  61. package/dist/src/agent/runtimes/claudeCode/streaming.js.map +1 -0
  62. package/dist/src/agent/runtimes/codex/app-server-rpc.d.ts +26 -0
  63. package/dist/src/agent/runtimes/codex/app-server-rpc.js +109 -0
  64. package/dist/src/agent/runtimes/codex/app-server-rpc.js.map +1 -0
  65. package/dist/src/agent/runtimes/codex/app-server-runner.d.ts +59 -0
  66. package/dist/src/agent/runtimes/codex/app-server-runner.js +688 -0
  67. package/dist/src/agent/runtimes/codex/app-server-runner.js.map +1 -0
  68. package/dist/src/agent/runtimes/codex/commands.d.ts +23 -0
  69. package/dist/src/agent/runtimes/codex/commands.js +25 -0
  70. package/dist/src/agent/runtimes/codex/commands.js.map +1 -0
  71. package/dist/src/agent/runtimes/codex/detect.d.ts +5 -0
  72. package/dist/src/agent/runtimes/codex/detect.js +17 -0
  73. package/dist/src/agent/runtimes/codex/detect.js.map +1 -0
  74. package/dist/src/agent/runtimes/codex/models.d.ts +2 -0
  75. package/dist/src/agent/runtimes/codex/models.js +4 -0
  76. package/dist/src/agent/runtimes/codex/models.js.map +1 -0
  77. package/dist/src/agent/runtimes/codex/runner.d.ts +46 -0
  78. package/dist/src/agent/runtimes/codex/runner.js +298 -0
  79. package/dist/src/agent/runtimes/codex/runner.js.map +1 -0
  80. package/dist/src/agent/runtimes/codex/runtime.d.ts +10 -0
  81. package/dist/src/agent/runtimes/codex/runtime.js +73 -0
  82. package/dist/src/agent/runtimes/codex/runtime.js.map +1 -0
  83. package/dist/src/agent/runtimes/contracts.d.ts +215 -0
  84. package/dist/src/agent/runtimes/contracts.js +33 -0
  85. package/dist/src/agent/runtimes/contracts.js.map +1 -0
  86. package/dist/src/agent/runtimes/cursor/commands.d.ts +7 -0
  87. package/dist/src/agent/runtimes/cursor/commands.js +39 -0
  88. package/dist/src/agent/runtimes/cursor/commands.js.map +1 -0
  89. package/dist/src/agent/runtimes/cursor/detect.d.ts +17 -0
  90. package/dist/src/agent/runtimes/cursor/detect.js +54 -0
  91. package/dist/src/agent/runtimes/cursor/detect.js.map +1 -0
  92. package/dist/src/agent/runtimes/cursor/models.d.ts +9 -0
  93. package/dist/src/agent/runtimes/cursor/models.js +97 -0
  94. package/dist/src/agent/runtimes/cursor/models.js.map +1 -0
  95. package/dist/src/agent/runtimes/cursor/runner.d.ts +36 -0
  96. package/dist/src/agent/runtimes/cursor/runner.js +293 -0
  97. package/dist/src/agent/runtimes/cursor/runner.js.map +1 -0
  98. package/dist/src/agent/runtimes/cursor/runtime.d.ts +2 -0
  99. package/dist/src/agent/runtimes/cursor/runtime.js +48 -0
  100. package/dist/src/agent/runtimes/cursor/runtime.js.map +1 -0
  101. package/dist/src/agent/runtimes/cursor/streaming.d.ts +8 -0
  102. package/dist/src/agent/runtimes/cursor/streaming.js +78 -0
  103. package/dist/src/agent/runtimes/cursor/streaming.js.map +1 -0
  104. package/dist/src/agent/runtimes/debug.d.ts +8 -0
  105. package/dist/src/agent/runtimes/debug.js +19 -0
  106. package/dist/src/agent/runtimes/debug.js.map +1 -0
  107. package/dist/src/agent/runtimes/message-format.d.ts +6 -0
  108. package/dist/src/agent/runtimes/message-format.js +31 -0
  109. package/dist/src/agent/runtimes/message-format.js.map +1 -0
  110. package/dist/src/agent/runtimes/opencode/client.d.ts +82 -0
  111. package/dist/src/agent/runtimes/opencode/client.js +109 -0
  112. package/dist/src/agent/runtimes/opencode/client.js.map +1 -0
  113. package/dist/src/agent/runtimes/opencode/detect.d.ts +18 -0
  114. package/dist/src/agent/runtimes/opencode/detect.js +100 -0
  115. package/dist/src/agent/runtimes/opencode/detect.js.map +1 -0
  116. package/dist/src/agent/runtimes/opencode/json.d.ts +4 -0
  117. package/dist/src/agent/runtimes/opencode/json.js +17 -0
  118. package/dist/src/agent/runtimes/opencode/json.js.map +1 -0
  119. package/dist/src/agent/runtimes/opencode/runner.d.ts +50 -0
  120. package/dist/src/agent/runtimes/opencode/runner.js +598 -0
  121. package/dist/src/agent/runtimes/opencode/runner.js.map +1 -0
  122. package/dist/src/agent/runtimes/opencode/runtime.d.ts +9 -0
  123. package/dist/src/agent/runtimes/opencode/runtime.js +82 -0
  124. package/dist/src/agent/runtimes/opencode/runtime.js.map +1 -0
  125. package/dist/src/agent/runtimes/opencode/server.d.ts +36 -0
  126. package/dist/src/agent/runtimes/opencode/server.js +210 -0
  127. package/dist/src/agent/runtimes/opencode/server.js.map +1 -0
  128. package/dist/src/agent/runtimes/opencode/streaming.d.ts +7 -0
  129. package/dist/src/agent/runtimes/opencode/streaming.js +47 -0
  130. package/dist/src/agent/runtimes/opencode/streaming.js.map +1 -0
  131. package/dist/src/agent/runtimes/registry.d.ts +10 -0
  132. package/dist/src/agent/runtimes/registry.js +48 -0
  133. package/dist/src/agent/runtimes/registry.js.map +1 -0
  134. package/dist/src/agent/sdk/adapters/adapter-interface.d.ts +2 -0
  135. package/dist/src/agent/sdk/adapters/adapter-interface.js +4 -0
  136. package/dist/src/agent/sdk/adapters/adapter-interface.js.map +1 -0
  137. package/dist/src/agent/sdk/adapters/claude/claude-adapter.d.ts +9 -0
  138. package/dist/src/agent/sdk/adapters/claude/claude-adapter.js +95 -0
  139. package/dist/src/agent/sdk/adapters/claude/claude-adapter.js.map +1 -0
  140. package/dist/src/agent/sdk/adapters/codex/codex-adapter.d.ts +10 -0
  141. package/dist/src/agent/sdk/adapters/codex/codex-adapter.js +87 -0
  142. package/dist/src/agent/sdk/adapters/codex/codex-adapter.js.map +1 -0
  143. package/dist/src/agent/sdk/adapters/executable-resolution.d.ts +2 -0
  144. package/dist/src/agent/sdk/adapters/executable-resolution.js +50 -0
  145. package/dist/src/agent/sdk/adapters/executable-resolution.js.map +1 -0
  146. package/dist/src/agent/sdk/adapters/generic/generic-subprocess-adapter.d.ts +11 -0
  147. package/dist/src/agent/sdk/adapters/generic/generic-subprocess-adapter.js +61 -0
  148. package/dist/src/agent/sdk/adapters/generic/generic-subprocess-adapter.js.map +1 -0
  149. package/dist/src/agent/sdk/adapters/provider-registry.d.ts +8 -0
  150. package/dist/src/agent/sdk/adapters/provider-registry.js +32 -0
  151. package/dist/src/agent/sdk/adapters/provider-registry.js.map +1 -0
  152. package/dist/src/agent/sdk/constants.d.ts +5 -0
  153. package/dist/src/agent/sdk/constants.js +29 -0
  154. package/dist/src/agent/sdk/constants.js.map +1 -0
  155. package/dist/src/agent/sdk/index.d.ts +2 -0
  156. package/dist/src/agent/sdk/index.js +2 -0
  157. package/dist/src/agent/sdk/index.js.map +1 -0
  158. package/dist/src/agent/sdk/run-handle.d.ts +22 -0
  159. package/dist/src/agent/sdk/run-handle.js +90 -0
  160. package/dist/src/agent/sdk/run-handle.js.map +1 -0
  161. package/dist/src/agent/sdk/runtime/isolation-env.d.ts +9 -0
  162. package/dist/src/agent/sdk/runtime/isolation-env.js +39 -0
  163. package/dist/src/agent/sdk/runtime/isolation-env.js.map +1 -0
  164. package/dist/src/agent/sdk/runtime/line-parser.d.ts +11 -0
  165. package/dist/src/agent/sdk/runtime/line-parser.js +59 -0
  166. package/dist/src/agent/sdk/runtime/line-parser.js.map +1 -0
  167. package/dist/src/agent/sdk/runtime/output-pump.d.ts +20 -0
  168. package/dist/src/agent/sdk/runtime/output-pump.js +88 -0
  169. package/dist/src/agent/sdk/runtime/output-pump.js.map +1 -0
  170. package/dist/src/agent/sdk/runtime/process-group.d.ts +9 -0
  171. package/dist/src/agent/sdk/runtime/process-group.js +69 -0
  172. package/dist/src/agent/sdk/runtime/process-group.js.map +1 -0
  173. package/dist/src/agent/sdk/runtime/provider-supervisor-entrypoint.d.ts +1 -0
  174. package/dist/src/agent/sdk/runtime/provider-supervisor-entrypoint.js +3 -0
  175. package/dist/src/agent/sdk/runtime/provider-supervisor-entrypoint.js.map +1 -0
  176. package/dist/src/agent/sdk/runtime/provider-supervisor.d.ts +1 -0
  177. package/dist/src/agent/sdk/runtime/provider-supervisor.js +190 -0
  178. package/dist/src/agent/sdk/runtime/provider-supervisor.js.map +1 -0
  179. package/dist/src/agent/sdk/runtime/spawn-process.d.ts +7 -0
  180. package/dist/src/agent/sdk/runtime/spawn-process.js +16 -0
  181. package/dist/src/agent/sdk/runtime/spawn-process.js.map +1 -0
  182. package/dist/src/agent/sdk/runtime/spawn-supervised-process.d.ts +17 -0
  183. package/dist/src/agent/sdk/runtime/spawn-supervised-process.js +203 -0
  184. package/dist/src/agent/sdk/runtime/spawn-supervised-process.js.map +1 -0
  185. package/dist/src/agent/sdk/runtime/supervisor-protocol.d.ts +29 -0
  186. package/dist/src/agent/sdk/runtime/supervisor-protocol.js +90 -0
  187. package/dist/src/agent/sdk/runtime/supervisor-protocol.js.map +1 -0
  188. package/dist/src/agent/sdk/runtime/timeouts.d.ts +24 -0
  189. package/dist/src/agent/sdk/runtime/timeouts.js +65 -0
  190. package/dist/src/agent/sdk/runtime/timeouts.js.map +1 -0
  191. package/dist/src/agent/sdk/session-manager.d.ts +38 -0
  192. package/dist/src/agent/sdk/session-manager.js +557 -0
  193. package/dist/src/agent/sdk/session-manager.js.map +1 -0
  194. package/dist/src/agent/sdk/transport/json-stream-decoder.d.ts +6 -0
  195. package/dist/src/agent/sdk/transport/json-stream-decoder.js +29 -0
  196. package/dist/src/agent/sdk/transport/json-stream-decoder.js.map +1 -0
  197. package/dist/src/agent/sdk/transport/line-text-decoder.d.ts +6 -0
  198. package/dist/src/agent/sdk/transport/line-text-decoder.js +9 -0
  199. package/dist/src/agent/sdk/transport/line-text-decoder.js.map +1 -0
  200. package/dist/src/agent/sdk/transport/pty-contract.d.ts +12 -0
  201. package/dist/src/agent/sdk/transport/pty-contract.js +2 -0
  202. package/dist/src/agent/sdk/transport/pty-contract.js.map +1 -0
  203. package/dist/src/agent/sdk/types.d.ts +194 -0
  204. package/dist/src/agent/sdk/types.js +2 -0
  205. package/dist/src/agent/sdk/types.js.map +1 -0
  206. package/dist/src/agent/sdk/versioning/provider-version.d.ts +9 -0
  207. package/dist/src/agent/sdk/versioning/provider-version.js +41 -0
  208. package/dist/src/agent/sdk/versioning/provider-version.js.map +1 -0
  209. package/dist/src/cli.d.ts +7 -0
  210. package/dist/src/cli.js +56 -0
  211. package/dist/src/cli.js.map +1 -0
  212. package/dist/src/commands/config/command.d.ts +2 -0
  213. package/dist/src/commands/config/command.js +150 -0
  214. package/dist/src/commands/config/command.js.map +1 -0
  215. package/dist/src/commands/connect/command.d.ts +4 -0
  216. package/dist/src/commands/connect/command.js +19 -0
  217. package/dist/src/commands/connect/command.js.map +1 -0
  218. package/dist/src/commands/connect/workflow.d.ts +92 -0
  219. package/dist/src/commands/connect/workflow.js +381 -0
  220. package/dist/src/commands/connect/workflow.js.map +1 -0
  221. package/dist/src/commands/devcontainer/command.d.ts +2 -0
  222. package/dist/src/commands/devcontainer/command.js +49 -0
  223. package/dist/src/commands/devcontainer/command.js.map +1 -0
  224. package/dist/src/commands/devcontainer/install.d.ts +46 -0
  225. package/dist/src/commands/devcontainer/install.js +107 -0
  226. package/dist/src/commands/devcontainer/install.js.map +1 -0
  227. package/dist/src/commands/init/config/claude-mcp.d.ts +27 -0
  228. package/dist/src/commands/init/config/claude-mcp.js +56 -0
  229. package/dist/src/commands/init/config/claude-mcp.js.map +1 -0
  230. package/dist/src/commands/init/config/codex-mcp.d.ts +12 -0
  231. package/dist/src/commands/init/config/codex-mcp.js +83 -0
  232. package/dist/src/commands/init/config/codex-mcp.js.map +1 -0
  233. package/dist/src/commands/init/config/opencode-mcp.d.ts +16 -0
  234. package/dist/src/commands/init/config/opencode-mcp.js +55 -0
  235. package/dist/src/commands/init/config/opencode-mcp.js.map +1 -0
  236. package/dist/src/commands/init/errors.d.ts +3 -0
  237. package/dist/src/commands/init/errors.js +7 -0
  238. package/dist/src/commands/init/errors.js.map +1 -0
  239. package/dist/src/commands/init/index.d.ts +9 -0
  240. package/dist/src/commands/init/index.js +10 -0
  241. package/dist/src/commands/init/index.js.map +1 -0
  242. package/dist/src/commands/init/io/file-copy.d.ts +18 -0
  243. package/dist/src/commands/init/io/file-copy.js +129 -0
  244. package/dist/src/commands/init/io/file-copy.js.map +1 -0
  245. package/dist/src/commands/init/marketplace.d.ts +8 -0
  246. package/dist/src/commands/init/marketplace.js +25 -0
  247. package/dist/src/commands/init/marketplace.js.map +1 -0
  248. package/dist/src/commands/init/mcp-service.d.ts +2 -0
  249. package/dist/src/commands/init/mcp-service.js +66 -0
  250. package/dist/src/commands/init/mcp-service.js.map +1 -0
  251. package/dist/src/commands/init/parsers.d.ts +4 -0
  252. package/dist/src/commands/init/parsers.js +40 -0
  253. package/dist/src/commands/init/parsers.js.map +1 -0
  254. package/dist/src/commands/init/prompts.d.ts +4 -0
  255. package/dist/src/commands/init/prompts.js +72 -0
  256. package/dist/src/commands/init/prompts.js.map +1 -0
  257. package/dist/src/commands/init/skill-service.d.ts +2 -0
  258. package/dist/src/commands/init/skill-service.js +36 -0
  259. package/dist/src/commands/init/skill-service.js.map +1 -0
  260. package/dist/src/commands/init/summary.d.ts +2 -0
  261. package/dist/src/commands/init/summary.js +22 -0
  262. package/dist/src/commands/init/summary.js.map +1 -0
  263. package/dist/src/commands/init/targets/claude.d.ts +4 -0
  264. package/dist/src/commands/init/targets/claude.js +178 -0
  265. package/dist/src/commands/init/targets/claude.js.map +1 -0
  266. package/dist/src/commands/init/targets/codex.d.ts +4 -0
  267. package/dist/src/commands/init/targets/codex.js +75 -0
  268. package/dist/src/commands/init/targets/codex.js.map +1 -0
  269. package/dist/src/commands/init/targets/driver.d.ts +28 -0
  270. package/dist/src/commands/init/targets/driver.js +2 -0
  271. package/dist/src/commands/init/targets/driver.js.map +1 -0
  272. package/dist/src/commands/init/targets/opencode.d.ts +4 -0
  273. package/dist/src/commands/init/targets/opencode.js +77 -0
  274. package/dist/src/commands/init/targets/opencode.js.map +1 -0
  275. package/dist/src/commands/init/targets/registry.d.ts +4 -0
  276. package/dist/src/commands/init/targets/registry.js +15 -0
  277. package/dist/src/commands/init/targets/registry.js.map +1 -0
  278. package/dist/src/commands/init/types.d.ts +30 -0
  279. package/dist/src/commands/init/types.js +7 -0
  280. package/dist/src/commands/init/types.js.map +1 -0
  281. package/dist/src/commands/init.d.ts +3 -0
  282. package/dist/src/commands/init.js +143 -0
  283. package/dist/src/commands/init.js.map +1 -0
  284. package/dist/src/commands/keys/command.d.ts +2 -0
  285. package/dist/src/commands/keys/command.js +154 -0
  286. package/dist/src/commands/keys/command.js.map +1 -0
  287. package/dist/src/commands/labels/create.d.ts +2 -0
  288. package/dist/src/commands/labels/create.js +31 -0
  289. package/dist/src/commands/labels/create.js.map +1 -0
  290. package/dist/src/commands/labels/delete.d.ts +2 -0
  291. package/dist/src/commands/labels/delete.js +51 -0
  292. package/dist/src/commands/labels/delete.js.map +1 -0
  293. package/dist/src/commands/labels/formatters.d.ts +4 -0
  294. package/dist/src/commands/labels/formatters.js +6 -0
  295. package/dist/src/commands/labels/formatters.js.map +1 -0
  296. package/dist/src/commands/labels/index.d.ts +2 -0
  297. package/dist/src/commands/labels/index.js +13 -0
  298. package/dist/src/commands/labels/index.js.map +1 -0
  299. package/dist/src/commands/labels/list.d.ts +2 -0
  300. package/dist/src/commands/labels/list.js +29 -0
  301. package/dist/src/commands/labels/list.js.map +1 -0
  302. package/dist/src/commands/labels/resolve.d.ts +9 -0
  303. package/dist/src/commands/labels/resolve.js +23 -0
  304. package/dist/src/commands/labels/resolve.js.map +1 -0
  305. package/dist/src/commands/labels/update.d.ts +2 -0
  306. package/dist/src/commands/labels/update.js +37 -0
  307. package/dist/src/commands/labels/update.js.map +1 -0
  308. package/dist/src/commands/lists/constants.d.ts +7 -0
  309. package/dist/src/commands/lists/constants.js +14 -0
  310. package/dist/src/commands/lists/constants.js.map +1 -0
  311. package/dist/src/commands/lists/create.d.ts +2 -0
  312. package/dist/src/commands/lists/create.js +45 -0
  313. package/dist/src/commands/lists/create.js.map +1 -0
  314. package/dist/src/commands/lists/index.d.ts +2 -0
  315. package/dist/src/commands/lists/index.js +10 -0
  316. package/dist/src/commands/lists/index.js.map +1 -0
  317. package/dist/src/commands/lists/list.d.ts +2 -0
  318. package/dist/src/commands/lists/list.js +66 -0
  319. package/dist/src/commands/lists/list.js.map +1 -0
  320. package/dist/src/commands/lists/resolve.d.ts +11 -0
  321. package/dist/src/commands/lists/resolve.js +24 -0
  322. package/dist/src/commands/lists/resolve.js.map +1 -0
  323. package/dist/src/commands/lists/update.d.ts +2 -0
  324. package/dist/src/commands/lists/update.js +61 -0
  325. package/dist/src/commands/lists/update.js.map +1 -0
  326. package/dist/src/commands/login/command.d.ts +8 -0
  327. package/dist/src/commands/login/command.js +20 -0
  328. package/dist/src/commands/login/command.js.map +1 -0
  329. package/dist/src/commands/orgs/index.d.ts +2 -0
  330. package/dist/src/commands/orgs/index.js +6 -0
  331. package/dist/src/commands/orgs/index.js.map +1 -0
  332. package/dist/src/commands/orgs/list.d.ts +2 -0
  333. package/dist/src/commands/orgs/list.js +29 -0
  334. package/dist/src/commands/orgs/list.js.map +1 -0
  335. package/dist/src/commands/paths/command.d.ts +2 -0
  336. package/dist/src/commands/paths/command.js +90 -0
  337. package/dist/src/commands/paths/command.js.map +1 -0
  338. package/dist/src/commands/profiles/index.d.ts +2 -0
  339. package/dist/src/commands/profiles/index.js +6 -0
  340. package/dist/src/commands/profiles/index.js.map +1 -0
  341. package/dist/src/commands/profiles/list.d.ts +2 -0
  342. package/dist/src/commands/profiles/list.js +50 -0
  343. package/dist/src/commands/profiles/list.js.map +1 -0
  344. package/dist/src/commands/project-agents/create.d.ts +2 -0
  345. package/dist/src/commands/project-agents/create.js +53 -0
  346. package/dist/src/commands/project-agents/create.js.map +1 -0
  347. package/dist/src/commands/project-agents/index.d.ts +2 -0
  348. package/dist/src/commands/project-agents/index.js +10 -0
  349. package/dist/src/commands/project-agents/index.js.map +1 -0
  350. package/dist/src/commands/project-agents/list.d.ts +2 -0
  351. package/dist/src/commands/project-agents/list.js +30 -0
  352. package/dist/src/commands/project-agents/list.js.map +1 -0
  353. package/dist/src/commands/project-agents/parsers.d.ts +16 -0
  354. package/dist/src/commands/project-agents/parsers.js +80 -0
  355. package/dist/src/commands/project-agents/parsers.js.map +1 -0
  356. package/dist/src/commands/project-agents/update.d.ts +2 -0
  357. package/dist/src/commands/project-agents/update.js +74 -0
  358. package/dist/src/commands/project-agents/update.js.map +1 -0
  359. package/dist/src/commands/projects/index.d.ts +2 -0
  360. package/dist/src/commands/projects/index.js +6 -0
  361. package/dist/src/commands/projects/index.js.map +1 -0
  362. package/dist/src/commands/projects/list.d.ts +2 -0
  363. package/dist/src/commands/projects/list.js +41 -0
  364. package/dist/src/commands/projects/list.js.map +1 -0
  365. package/dist/src/commands/prompts/create.d.ts +2 -0
  366. package/dist/src/commands/prompts/create.js +48 -0
  367. package/dist/src/commands/prompts/create.js.map +1 -0
  368. package/dist/src/commands/prompts/formatters.d.ts +4 -0
  369. package/dist/src/commands/prompts/formatters.js +7 -0
  370. package/dist/src/commands/prompts/formatters.js.map +1 -0
  371. package/dist/src/commands/prompts/index.d.ts +2 -0
  372. package/dist/src/commands/prompts/index.js +11 -0
  373. package/dist/src/commands/prompts/index.js.map +1 -0
  374. package/dist/src/commands/prompts/list.d.ts +2 -0
  375. package/dist/src/commands/prompts/list.js +34 -0
  376. package/dist/src/commands/prompts/list.js.map +1 -0
  377. package/dist/src/commands/prompts/parsers.d.ts +9 -0
  378. package/dist/src/commands/prompts/parsers.js +12 -0
  379. package/dist/src/commands/prompts/parsers.js.map +1 -0
  380. package/dist/src/commands/prompts/resolve.d.ts +17 -0
  381. package/dist/src/commands/prompts/resolve.js +43 -0
  382. package/dist/src/commands/prompts/resolve.js.map +1 -0
  383. package/dist/src/commands/prompts/update.d.ts +2 -0
  384. package/dist/src/commands/prompts/update.js +58 -0
  385. package/dist/src/commands/prompts/update.js.map +1 -0
  386. package/dist/src/commands/setup/command.d.ts +2 -0
  387. package/dist/src/commands/setup/command.js +15 -0
  388. package/dist/src/commands/setup/command.js.map +1 -0
  389. package/dist/src/commands/setup/prompts.d.ts +66 -0
  390. package/dist/src/commands/setup/prompts.js +199 -0
  391. package/dist/src/commands/setup/prompts.js.map +1 -0
  392. package/dist/src/commands/setup/workflow.d.ts +17 -0
  393. package/dist/src/commands/setup/workflow.js +141 -0
  394. package/dist/src/commands/setup/workflow.js.map +1 -0
  395. package/dist/src/commands/status/command.d.ts +2 -0
  396. package/dist/src/commands/status/command.js +83 -0
  397. package/dist/src/commands/status/command.js.map +1 -0
  398. package/dist/src/commands/task-types/index.d.ts +2 -0
  399. package/dist/src/commands/task-types/index.js +6 -0
  400. package/dist/src/commands/task-types/index.js.map +1 -0
  401. package/dist/src/commands/task-types/list.d.ts +2 -0
  402. package/dist/src/commands/task-types/list.js +32 -0
  403. package/dist/src/commands/task-types/list.js.map +1 -0
  404. package/dist/src/commands/tasks/artifacts/comments/add.d.ts +2 -0
  405. package/dist/src/commands/tasks/artifacts/comments/add.js +32 -0
  406. package/dist/src/commands/tasks/artifacts/comments/add.js.map +1 -0
  407. package/dist/src/commands/tasks/artifacts/comments/formatters.d.ts +7 -0
  408. package/dist/src/commands/tasks/artifacts/comments/formatters.js +32 -0
  409. package/dist/src/commands/tasks/artifacts/comments/formatters.js.map +1 -0
  410. package/dist/src/commands/tasks/artifacts/comments/index.d.ts +2 -0
  411. package/dist/src/commands/tasks/artifacts/comments/index.js +13 -0
  412. package/dist/src/commands/tasks/artifacts/comments/index.js.map +1 -0
  413. package/dist/src/commands/tasks/artifacts/comments/list.d.ts +2 -0
  414. package/dist/src/commands/tasks/artifacts/comments/list.js +24 -0
  415. package/dist/src/commands/tasks/artifacts/comments/list.js.map +1 -0
  416. package/dist/src/commands/tasks/artifacts/comments/parsers.d.ts +6 -0
  417. package/dist/src/commands/tasks/artifacts/comments/parsers.js +8 -0
  418. package/dist/src/commands/tasks/artifacts/comments/parsers.js.map +1 -0
  419. package/dist/src/commands/tasks/artifacts/comments/reply.d.ts +2 -0
  420. package/dist/src/commands/tasks/artifacts/comments/reply.js +23 -0
  421. package/dist/src/commands/tasks/artifacts/comments/reply.js.map +1 -0
  422. package/dist/src/commands/tasks/artifacts/comments/resolve.d.ts +3 -0
  423. package/dist/src/commands/tasks/artifacts/comments/resolve.js +26 -0
  424. package/dist/src/commands/tasks/artifacts/comments/resolve.js.map +1 -0
  425. package/dist/src/commands/tasks/artifacts/create.d.ts +2 -0
  426. package/dist/src/commands/tasks/artifacts/create.js +63 -0
  427. package/dist/src/commands/tasks/artifacts/create.js.map +1 -0
  428. package/dist/src/commands/tasks/artifacts/delete.d.ts +2 -0
  429. package/dist/src/commands/tasks/artifacts/delete.js +27 -0
  430. package/dist/src/commands/tasks/artifacts/delete.js.map +1 -0
  431. package/dist/src/commands/tasks/artifacts/get.d.ts +2 -0
  432. package/dist/src/commands/tasks/artifacts/get.js +54 -0
  433. package/dist/src/commands/tasks/artifacts/get.js.map +1 -0
  434. package/dist/src/commands/tasks/artifacts/index.d.ts +2 -0
  435. package/dist/src/commands/tasks/artifacts/index.js +18 -0
  436. package/dist/src/commands/tasks/artifacts/index.js.map +1 -0
  437. package/dist/src/commands/tasks/artifacts/list.d.ts +2 -0
  438. package/dist/src/commands/tasks/artifacts/list.js +31 -0
  439. package/dist/src/commands/tasks/artifacts/list.js.map +1 -0
  440. package/dist/src/commands/tasks/artifacts/parsers.d.ts +13 -0
  441. package/dist/src/commands/tasks/artifacts/parsers.js +24 -0
  442. package/dist/src/commands/tasks/artifacts/parsers.js.map +1 -0
  443. package/dist/src/commands/tasks/artifacts/replace.d.ts +2 -0
  444. package/dist/src/commands/tasks/artifacts/replace.js +62 -0
  445. package/dist/src/commands/tasks/artifacts/replace.js.map +1 -0
  446. package/dist/src/commands/tasks/artifacts/update.d.ts +2 -0
  447. package/dist/src/commands/tasks/artifacts/update.js +55 -0
  448. package/dist/src/commands/tasks/artifacts/update.js.map +1 -0
  449. package/dist/src/commands/tasks/attach.d.ts +2 -0
  450. package/dist/src/commands/tasks/attach.js +70 -0
  451. package/dist/src/commands/tasks/attach.js.map +1 -0
  452. package/dist/src/commands/tasks/attachments/delete.d.ts +2 -0
  453. package/dist/src/commands/tasks/attachments/delete.js +61 -0
  454. package/dist/src/commands/tasks/attachments/delete.js.map +1 -0
  455. package/dist/src/commands/tasks/attachments/download.d.ts +2 -0
  456. package/dist/src/commands/tasks/attachments/download.js +42 -0
  457. package/dist/src/commands/tasks/attachments/download.js.map +1 -0
  458. package/dist/src/commands/tasks/attachments/formatters.d.ts +5 -0
  459. package/dist/src/commands/tasks/attachments/formatters.js +18 -0
  460. package/dist/src/commands/tasks/attachments/formatters.js.map +1 -0
  461. package/dist/src/commands/tasks/attachments/index.d.ts +2 -0
  462. package/dist/src/commands/tasks/attachments/index.js +11 -0
  463. package/dist/src/commands/tasks/attachments/index.js.map +1 -0
  464. package/dist/src/commands/tasks/attachments/list.d.ts +2 -0
  465. package/dist/src/commands/tasks/attachments/list.js +36 -0
  466. package/dist/src/commands/tasks/attachments/list.js.map +1 -0
  467. package/dist/src/commands/tasks/attachments/resolve.d.ts +6 -0
  468. package/dist/src/commands/tasks/attachments/resolve.js +15 -0
  469. package/dist/src/commands/tasks/attachments/resolve.js.map +1 -0
  470. package/dist/src/commands/tasks/attachments/transfer.d.ts +11 -0
  471. package/dist/src/commands/tasks/attachments/transfer.js +71 -0
  472. package/dist/src/commands/tasks/attachments/transfer.js.map +1 -0
  473. package/dist/src/commands/tasks/comments/add.d.ts +2 -0
  474. package/dist/src/commands/tasks/comments/add.js +44 -0
  475. package/dist/src/commands/tasks/comments/add.js.map +1 -0
  476. package/dist/src/commands/tasks/comments/index.d.ts +2 -0
  477. package/dist/src/commands/tasks/comments/index.js +6 -0
  478. package/dist/src/commands/tasks/comments/index.js.map +1 -0
  479. package/dist/src/commands/tasks/create.d.ts +2 -0
  480. package/dist/src/commands/tasks/create.js +77 -0
  481. package/dist/src/commands/tasks/create.js.map +1 -0
  482. package/dist/src/commands/tasks/delete.d.ts +2 -0
  483. package/dist/src/commands/tasks/delete.js +31 -0
  484. package/dist/src/commands/tasks/delete.js.map +1 -0
  485. package/dist/src/commands/tasks/formatters.d.ts +25 -0
  486. package/dist/src/commands/tasks/formatters.js +40 -0
  487. package/dist/src/commands/tasks/formatters.js.map +1 -0
  488. package/dist/src/commands/tasks/get.d.ts +2 -0
  489. package/dist/src/commands/tasks/get.js +94 -0
  490. package/dist/src/commands/tasks/get.js.map +1 -0
  491. package/dist/src/commands/tasks/hydrate.d.ts +20 -0
  492. package/dist/src/commands/tasks/hydrate.js +47 -0
  493. package/dist/src/commands/tasks/hydrate.js.map +1 -0
  494. package/dist/src/commands/tasks/index.d.ts +2 -0
  495. package/dist/src/commands/tasks/index.js +33 -0
  496. package/dist/src/commands/tasks/index.js.map +1 -0
  497. package/dist/src/commands/tasks/links.d.ts +4 -0
  498. package/dist/src/commands/tasks/links.js +121 -0
  499. package/dist/src/commands/tasks/links.js.map +1 -0
  500. package/dist/src/commands/tasks/list.d.ts +2 -0
  501. package/dist/src/commands/tasks/list.js +47 -0
  502. package/dist/src/commands/tasks/list.js.map +1 -0
  503. package/dist/src/commands/tasks/move-to-list.d.ts +2 -0
  504. package/dist/src/commands/tasks/move-to-list.js +41 -0
  505. package/dist/src/commands/tasks/move-to-list.js.map +1 -0
  506. package/dist/src/commands/tasks/move.d.ts +2 -0
  507. package/dist/src/commands/tasks/move.js +61 -0
  508. package/dist/src/commands/tasks/move.js.map +1 -0
  509. package/dist/src/commands/tasks/parsers.d.ts +22 -0
  510. package/dist/src/commands/tasks/parsers.js +118 -0
  511. package/dist/src/commands/tasks/parsers.js.map +1 -0
  512. package/dist/src/commands/tasks/refs.d.ts +2 -0
  513. package/dist/src/commands/tasks/refs.js +89 -0
  514. package/dist/src/commands/tasks/refs.js.map +1 -0
  515. package/dist/src/commands/tasks/resolve.d.ts +20 -0
  516. package/dist/src/commands/tasks/resolve.js +57 -0
  517. package/dist/src/commands/tasks/resolve.js.map +1 -0
  518. package/dist/src/commands/tasks/search.d.ts +2 -0
  519. package/dist/src/commands/tasks/search.js +110 -0
  520. package/dist/src/commands/tasks/search.js.map +1 -0
  521. package/dist/src/commands/tasks/update.d.ts +2 -0
  522. package/dist/src/commands/tasks/update.js +101 -0
  523. package/dist/src/commands/tasks/update.js.map +1 -0
  524. package/dist/src/commands/test-helpers.d.ts +2 -0
  525. package/dist/src/commands/test-helpers.js +6 -0
  526. package/dist/src/commands/test-helpers.js.map +1 -0
  527. package/dist/src/commands/threads/create.d.ts +2 -0
  528. package/dist/src/commands/threads/create.js +99 -0
  529. package/dist/src/commands/threads/create.js.map +1 -0
  530. package/dist/src/commands/threads/formatters.d.ts +10 -0
  531. package/dist/src/commands/threads/formatters.js +17 -0
  532. package/dist/src/commands/threads/formatters.js.map +1 -0
  533. package/dist/src/commands/threads/get.d.ts +2 -0
  534. package/dist/src/commands/threads/get.js +53 -0
  535. package/dist/src/commands/threads/get.js.map +1 -0
  536. package/dist/src/commands/threads/index.d.ts +2 -0
  537. package/dist/src/commands/threads/index.js +14 -0
  538. package/dist/src/commands/threads/index.js.map +1 -0
  539. package/dist/src/commands/threads/list.d.ts +2 -0
  540. package/dist/src/commands/threads/list.js +69 -0
  541. package/dist/src/commands/threads/list.js.map +1 -0
  542. package/dist/src/commands/threads/messages.d.ts +2 -0
  543. package/dist/src/commands/threads/messages.js +59 -0
  544. package/dist/src/commands/threads/messages.js.map +1 -0
  545. package/dist/src/commands/threads/parsers.d.ts +5 -0
  546. package/dist/src/commands/threads/parsers.js +19 -0
  547. package/dist/src/commands/threads/parsers.js.map +1 -0
  548. package/dist/src/commands/threads/send.d.ts +2 -0
  549. package/dist/src/commands/threads/send.js +49 -0
  550. package/dist/src/commands/threads/send.js.map +1 -0
  551. package/dist/src/commands/threads/spawn-target.d.ts +29 -0
  552. package/dist/src/commands/threads/spawn-target.js +62 -0
  553. package/dist/src/commands/threads/spawn-target.js.map +1 -0
  554. package/dist/src/convex/_generated/ai/ai-files.state.json +6 -0
  555. package/dist/src/convex/_generated/ai/guidelines.md +371 -0
  556. package/dist/src/convex/_generated/api.d.ts +598 -0
  557. package/dist/src/convex/_generated/api.js +23 -0
  558. package/dist/src/convex/_generated/dataModel.d.ts +60 -0
  559. package/dist/src/convex/_generated/server.d.ts +143 -0
  560. package/dist/src/convex/_generated/server.js +93 -0
  561. package/dist/src/lib/argv.d.ts +1 -0
  562. package/dist/src/lib/argv.js +7 -0
  563. package/dist/src/lib/argv.js.map +1 -0
  564. package/dist/src/lib/browser-login.d.ts +43 -0
  565. package/dist/src/lib/browser-login.js +216 -0
  566. package/dist/src/lib/browser-login.js.map +1 -0
  567. package/dist/src/lib/config/convex-client.d.ts +41 -0
  568. package/dist/src/lib/config/convex-client.js +53 -0
  569. package/dist/src/lib/config/convex-client.js.map +1 -0
  570. package/dist/src/lib/config/index.d.ts +7 -0
  571. package/dist/src/lib/config/index.js +13 -0
  572. package/dist/src/lib/config/index.js.map +1 -0
  573. package/dist/src/lib/config/profile.d.ts +40 -0
  574. package/dist/src/lib/config/profile.js +155 -0
  575. package/dist/src/lib/config/profile.js.map +1 -0
  576. package/dist/src/lib/config/provider-keys.d.ts +47 -0
  577. package/dist/src/lib/config/provider-keys.js +97 -0
  578. package/dist/src/lib/config/provider-keys.js.map +1 -0
  579. package/dist/src/lib/config/toml.d.ts +78 -0
  580. package/dist/src/lib/config/toml.js +228 -0
  581. package/dist/src/lib/config/toml.js.map +1 -0
  582. package/dist/src/lib/config/types.d.ts +98 -0
  583. package/dist/src/lib/config/types.js +65 -0
  584. package/dist/src/lib/config/types.js.map +1 -0
  585. package/dist/src/lib/config/validate.d.ts +30 -0
  586. package/dist/src/lib/config/validate.js +66 -0
  587. package/dist/src/lib/config/validate.js.map +1 -0
  588. package/dist/src/lib/connect-events.d.ts +42 -0
  589. package/dist/src/lib/connect-events.js +65 -0
  590. package/dist/src/lib/connect-events.js.map +1 -0
  591. package/dist/src/lib/constants.d.ts +20 -0
  592. package/dist/src/lib/constants.js +27 -0
  593. package/dist/src/lib/constants.js.map +1 -0
  594. package/dist/src/lib/content-type.d.ts +1 -0
  595. package/dist/src/lib/content-type.js +27 -0
  596. package/dist/src/lib/content-type.js.map +1 -0
  597. package/dist/src/lib/convex-error.d.ts +12 -0
  598. package/dist/src/lib/convex-error.js +33 -0
  599. package/dist/src/lib/convex-error.js.map +1 -0
  600. package/dist/src/lib/git/checkpoint.d.ts +74 -0
  601. package/dist/src/lib/git/checkpoint.js +210 -0
  602. package/dist/src/lib/git/checkpoint.js.map +1 -0
  603. package/dist/src/lib/git/exec.d.ts +23 -0
  604. package/dist/src/lib/git/exec.js +46 -0
  605. package/dist/src/lib/git/exec.js.map +1 -0
  606. package/dist/src/lib/git/file-index.d.ts +8 -0
  607. package/dist/src/lib/git/file-index.js +125 -0
  608. package/dist/src/lib/git/file-index.js.map +1 -0
  609. package/dist/src/lib/git/index.d.ts +5 -0
  610. package/dist/src/lib/git/index.js +6 -0
  611. package/dist/src/lib/git/index.js.map +1 -0
  612. package/dist/src/lib/git/repo.d.ts +32 -0
  613. package/dist/src/lib/git/repo.js +95 -0
  614. package/dist/src/lib/git/repo.js.map +1 -0
  615. package/dist/src/lib/git/worktrees.d.ts +49 -0
  616. package/dist/src/lib/git/worktrees.js +97 -0
  617. package/dist/src/lib/git/worktrees.js.map +1 -0
  618. package/dist/src/lib/global-options.d.ts +3 -0
  619. package/dist/src/lib/global-options.js +8 -0
  620. package/dist/src/lib/global-options.js.map +1 -0
  621. package/dist/src/lib/id.d.ts +3 -0
  622. package/dist/src/lib/id.js +14 -0
  623. package/dist/src/lib/id.js.map +1 -0
  624. package/dist/src/lib/one-shot-command.d.ts +7 -0
  625. package/dist/src/lib/one-shot-command.js +30 -0
  626. package/dist/src/lib/one-shot-command.js.map +1 -0
  627. package/dist/src/lib/one-shot-config.d.ts +3 -0
  628. package/dist/src/lib/one-shot-config.js +7 -0
  629. package/dist/src/lib/one-shot-config.js.map +1 -0
  630. package/dist/src/lib/output.d.ts +10 -0
  631. package/dist/src/lib/output.js +27 -0
  632. package/dist/src/lib/output.js.map +1 -0
  633. package/dist/src/lib/pagination.d.ts +16 -0
  634. package/dist/src/lib/pagination.js +45 -0
  635. package/dist/src/lib/pagination.js.map +1 -0
  636. package/dist/src/lib/parsers.d.ts +2 -0
  637. package/dist/src/lib/parsers.js +21 -0
  638. package/dist/src/lib/parsers.js.map +1 -0
  639. package/dist/src/lib/project-resolution.d.ts +41 -0
  640. package/dist/src/lib/project-resolution.js +84 -0
  641. package/dist/src/lib/project-resolution.js.map +1 -0
  642. package/dist/src/lib/pull-requests.d.ts +47 -0
  643. package/dist/src/lib/pull-requests.js +305 -0
  644. package/dist/src/lib/pull-requests.js.map +1 -0
  645. package/dist/src/lib/skill-install-guidance.d.ts +5 -0
  646. package/dist/src/lib/skill-install-guidance.js +41 -0
  647. package/dist/src/lib/skill-install-guidance.js.map +1 -0
  648. package/dist/src/lib/text-input.d.ts +18 -0
  649. package/dist/src/lib/text-input.js +36 -0
  650. package/dist/src/lib/text-input.js.map +1 -0
  651. package/dist/src/lib/thread-attachments.d.ts +21 -0
  652. package/dist/src/lib/thread-attachments.js +104 -0
  653. package/dist/src/lib/thread-attachments.js.map +1 -0
  654. package/dist/src/lib/url.d.ts +13 -0
  655. package/dist/src/lib/url.js +25 -0
  656. package/dist/src/lib/url.js.map +1 -0
  657. package/dist/src/lib/version.d.ts +2 -0
  658. package/dist/src/lib/version.js +33 -0
  659. package/dist/src/lib/version.js.map +1 -0
  660. package/dist/templates/devcontainer/Dockerfile +95 -0
  661. package/dist/templates/devcontainer/README.md +129 -0
  662. package/dist/templates/devcontainer/devcontainer.json +92 -0
  663. package/dist/templates/devcontainer/init-firewall.sh +271 -0
  664. package/package.json +79 -0
@@ -0,0 +1,47 @@
1
+ import { Command } from "commander";
2
+ import chalk from "chalk";
3
+ import { api } from "../../convex/_generated/api.js";
4
+ import { addGlobalOptions } from "../../cli.js";
5
+ import { runOneShotCommand } from "../../lib/one-shot-command.js";
6
+ import { printOutput, resolveOutputMode, addOutputOptions } from "../../lib/output.js";
7
+ import { resolveProjectFromCommand } from "../../lib/project-resolution.js";
8
+ import { LIST_OPTION_DESCRIPTION, parseOptionalListIdentifier, parseOptionalTaskStatus } from "./parsers.js";
9
+ import { formatExternalLinkLine, formatTaskSummaryLine } from "./formatters.js";
10
+ export const listTasksCommand = addGlobalOptions(addOutputOptions(new Command("list")
11
+ .description("List tasks")
12
+ .option("--org <org>", "Organization ID or slug (used with --project alias)")
13
+ .option("--archived", "List archived tasks")
14
+ .option("--list <list>", LIST_OPTION_DESCRIPTION)
15
+ .option("--status <status>", "Filter by task status")
16
+ .option("--include-links", "Print each task's external links in text output"))).action(async (options, cmd) => {
17
+ await runOneShotCommand(cmd, async ({ client, config }) => {
18
+ const outputMode = resolveOutputMode(options);
19
+ const { projectId } = await resolveProjectFromCommand(client, config, cmd, options.org);
20
+ const status = parseOptionalTaskStatus(options.status);
21
+ const listId = parseOptionalListIdentifier(options.list);
22
+ const taskQueryArgs = {
23
+ projectId,
24
+ archiveFilter: options.archived ? "archived" : undefined,
25
+ status,
26
+ ...(listId !== undefined && { listId }),
27
+ };
28
+ const tasks = await client.query(api.tasks.core.listByProject, taskQueryArgs);
29
+ printOutput(outputMode, tasks, (rows) => {
30
+ if (rows.length === 0) {
31
+ console.log(chalk.dim("\nNo tasks found."));
32
+ return;
33
+ }
34
+ console.log(chalk.bold(`\nFound ${rows.length} task(s):\n`));
35
+ for (const task of rows) {
36
+ console.log(` ${formatTaskSummaryLine(task)}`);
37
+ if (options.includeLinks === true) {
38
+ for (const link of task.externalLinks) {
39
+ console.log(` ${formatExternalLinkLine(link)}`);
40
+ }
41
+ }
42
+ }
43
+ console.log();
44
+ });
45
+ });
46
+ });
47
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/tasks/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAA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,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;YACxD,MAAM;YACN,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;SAC6B,CAAC;QACvE,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;QAE9E,WAAW,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;YACtC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACtB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC;gBAC5C,OAAO;YACT,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,aAAa,CAAC,CAAC,CAAC;YAC7D,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;gBACxB,OAAO,CAAC,GAAG,CAAC,KAAK,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAChD,IAAI,OAAO,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;oBAClC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;wBACtC,OAAO,CAAC,GAAG,CAAC,SAAS,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBACvD,CAAC;gBACH,CAAC;YACH,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const moveTasksToListCommand: Command;
@@ -0,0 +1,41 @@
1
+ import chalk from "chalk";
2
+ import { Command } from "commander";
3
+ import { addGlobalOptions } from "../../cli.js";
4
+ import { api } from "../../convex/_generated/api.js";
5
+ import { runOneShotCommand } from "../../lib/one-shot-command.js";
6
+ import { addOutputOptions, printOutput, resolveOutputMode } from "../../lib/output.js";
7
+ import { resolveProjectFromCommand } from "../../lib/project-resolution.js";
8
+ import { LIST_OPTION_DESCRIPTION, parseOptionalListIdentifier } from "./parsers.js";
9
+ import { resolveTaskIdOrRef } from "./resolve.js";
10
+ const MAX_MOVE_ROOTS = 25;
11
+ export const moveTasksToListCommand = addGlobalOptions(addOutputOptions(new Command("move-to-list")
12
+ .description("Move one or more tasks to a List")
13
+ .argument("<tasks...>", "Task IDs or refs (maximum 25)")
14
+ .requiredOption("--list <list>", `${LIST_OPTION_DESCRIPTION} or BACKLOG`)
15
+ .option("--org <org>", "Organization ID or slug (used with --project alias)"))).action(async (tasks, options, cmd) => {
16
+ await runOneShotCommand(cmd, async ({ client, config }) => {
17
+ const outputMode = resolveOutputMode(options);
18
+ if (tasks.length === 0 || tasks.length > MAX_MOVE_ROOTS) {
19
+ throw new Error(`Pass between 1 and ${MAX_MOVE_ROOTS} task IDs or refs.`);
20
+ }
21
+ const listId = parseOptionalListIdentifier(options.list);
22
+ if (listId === undefined) {
23
+ throw new Error("--list is required.");
24
+ }
25
+ const { projects, projectId } = await resolveProjectFromCommand(client, config, cmd, options.org);
26
+ const rootIds = await Promise.all(tasks.map((task) => resolveTaskIdOrRef(client, {
27
+ value: task,
28
+ label: "task",
29
+ projectId,
30
+ projects,
31
+ })));
32
+ const result = await client.mutation(api.tasks.core.move.toList, {
33
+ rootIds,
34
+ listId,
35
+ });
36
+ printOutput(outputMode, result, (value) => {
37
+ console.log(chalk.green("✓") + ` Moved ${value.taskIds.length} task(s) to ${value.list.name} (${value.list.ref})`);
38
+ });
39
+ });
40
+ });
41
+ //# sourceMappingURL=move-to-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"move-to-list.js","sourceRoot":"","sources":["../../../../src/commands/tasks/move-to-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,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,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACzC,CAAC;QAED,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,MAAM,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QAClG,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACjB,kBAAkB,CAAC,MAAM,EAAE;YACzB,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,MAAM;YACb,SAAS;YACT,QAAQ;SACT,CAAC,CACH,CACF,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAC/D,OAAO;YACP,MAAM;SACP,CAAC,CAAC;QAEH,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YACxC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,UAAU,KAAK,CAAC,OAAO,CAAC,MAAM,eAAe,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACrH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const moveTaskCommand: Command;
@@ -0,0 +1,61 @@
1
+ import { Command } from "commander";
2
+ import chalk from "chalk";
3
+ import { api } from "../../convex/_generated/api.js";
4
+ import { addGlobalOptions } from "../../cli.js";
5
+ import { runOneShotCommand } from "../../lib/one-shot-command.js";
6
+ import { addOutputOptions, printOutput, resolveOutputMode } from "../../lib/output.js";
7
+ import { resolveProjectIdFromCommand } from "../../lib/project-resolution.js";
8
+ import { isTaskRef, parseScopedTaskRef } from "./parsers.js";
9
+ import { resolveTaskIdOrRef } from "./resolve.js";
10
+ export const moveTaskCommand = addGlobalOptions(addOutputOptions(new Command("move")
11
+ .description("Move a task to a new parent or to top-level")
12
+ .argument("<task>", "Task ID or task ref")
13
+ .option("--org <org>", "Organization ID or slug (used with --project alias)")
14
+ .option("--parent <parent>", "Parent task ID or task ref")
15
+ .option("--top-level", "Move task to top-level"))).action(async (task, options, cmd) => {
16
+ await runOneShotCommand(cmd, async ({ client, config }) => {
17
+ const outputMode = resolveOutputMode(options);
18
+ const hasParent = options.parent !== undefined;
19
+ const topLevel = options.topLevel === true;
20
+ const parentValue = options.parent ?? "";
21
+ if (hasParent === topLevel) {
22
+ throw new Error("Pass exactly one of --parent or --top-level.");
23
+ }
24
+ const needsAccessibleProjects = isTaskRef(task) ||
25
+ (hasParent && isTaskRef(parentValue)) ||
26
+ parseScopedTaskRef(task) !== undefined ||
27
+ (hasParent && parseScopedTaskRef(parentValue) !== undefined);
28
+ const accessibleProjects = needsAccessibleProjects ? await client.query(api.projects.core.listAccessible, {}) : undefined;
29
+ const needsProjectContext = isTaskRef(task) || (hasParent && isTaskRef(parentValue));
30
+ const projectId = needsProjectContext ? resolveProjectIdFromCommand(accessibleProjects ?? [], config, cmd, options.org) : undefined;
31
+ const taskId = await resolveTaskIdOrRef(client, {
32
+ value: task,
33
+ label: "task",
34
+ projectId,
35
+ projects: accessibleProjects,
36
+ });
37
+ const parentId = topLevel
38
+ ? null
39
+ : await resolveTaskIdOrRef(client, {
40
+ value: parentValue,
41
+ label: "parent",
42
+ projectId,
43
+ projects: accessibleProjects,
44
+ });
45
+ await client.mutation(api.tasks.core.move.toParent, {
46
+ id: taskId,
47
+ parentId,
48
+ });
49
+ const payload = {
50
+ taskId,
51
+ parentId,
52
+ };
53
+ printOutput(outputMode, payload, (value) => {
54
+ console.log(chalk.green("✓") + " Task moved");
55
+ console.log(` ID: ${value.taskId}`);
56
+ console.log(` Parent: ${value.parentId ?? "Top-level"}`);
57
+ console.log();
58
+ });
59
+ });
60
+ });
61
+ //# sourceMappingURL=move.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"move.js","sourceRoot":"","sources":["../../../../src/commands/tasks/move.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAsB,MAAM,qBAAqB,CAAC;AAC3G,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAQlD,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAC7C,gBAAgB,CACd,IAAI,OAAO,CAAC,MAAM,CAAC;KAChB,WAAW,CAAC,6CAA6C,CAAC;KAC1D,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;KACzC,MAAM,CAAC,aAAa,EAAE,qDAAqD,CAAC;KAC5E,MAAM,CAAC,mBAAmB,EAAE,4BAA4B,CAAC;KACzD,MAAM,CAAC,aAAa,EAAE,wBAAwB,CAAC,CACnD,CACF,CAAC,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,OAAwB,EAAE,GAAY,EAAE,EAAE;IACtE,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE;QACxD,MAAM,UA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I;YACN,CAAC,CAAC,MAAM,kBAAkB,CAAC,MAAM,EAAE;gBAC/B,KAAK,EAAE,WAAW;gBAClB,KAAK,EAAE,QAAQ;gBACf,SAAS;gBACT,QAAQ,EAAE,kBAAkB;aAC7B,CAAC,CAAC;QAEP,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClD,EAAE,EAAE,MAAM;YACV,QAAQ;SACT,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG;YACd,MAAM;YACN,QAAQ;SACT,CAAC;QAEF,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC;YAC9C,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;YACrC,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,CAAC,QAAQ,IAAI,WAAW,EAAE,CAAC,CAAC;YAC1D,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ declare const VALID_PRIORITIES: readonly ["None", "Low", "Medium", "High", "Critical"];
2
+ declare const VALID_ARCHIVE_MODES: readonly ["active", "archived"];
3
+ export declare const LIST_OPTION_DESCRIPTION = "List ID or bare List ref";
4
+ export type TaskPriority = (typeof VALID_PRIORITIES)[number];
5
+ export type TaskArchiveMode = (typeof VALID_ARCHIVE_MODES)[number];
6
+ export interface ScopedTaskRef {
7
+ orgSlug: string;
8
+ ref: string;
9
+ }
10
+ export declare function isTaskRef(value: string): boolean;
11
+ export declare function parseScopedTaskRef(value: string): ScopedTaskRef | undefined;
12
+ export declare function getProjectAliasFromTaskRef(ref: string): string;
13
+ export declare function parseOptionalTaskStatus(value: string | undefined): string | undefined;
14
+ export declare function parseOptionalTaskTypeKey(value: string | undefined): string | undefined;
15
+ export declare function parseOptionalTaskPriority(value: string | undefined): TaskPriority | undefined;
16
+ export declare function parseOptionalTaskArchiveMode(value: string | undefined): TaskArchiveMode | undefined;
17
+ export declare function parseOptionalListIdentifier(value: string | undefined): string | undefined;
18
+ export declare function parseOptionalCommentsLimit(value: string | undefined): number | undefined;
19
+ export declare function parseOptionalTags(values: string[] | undefined): string[] | undefined;
20
+ export declare function parseOptionalDueDate(value: string | undefined): number | undefined;
21
+ export declare function validateNoConflict(enabledFlag: boolean, hasValue: boolean, message: string): void;
22
+ export {};
@@ -0,0 +1,118 @@
1
+ import { parseOptionalNonEmptyString } from "../../lib/parsers.js";
2
+ const VALID_PRIORITIES = ["None", "Low", "Medium", "High", "Critical"];
3
+ const VALID_ARCHIVE_MODES = ["active", "archived"];
4
+ const MAX_COMMENTS_LIMIT = 50;
5
+ const TASK_REF_PATTERN = /^[A-Z][A-Z0-9]{1,4}-\d+$/i;
6
+ const SCOPED_TASK_REF_PATTERN = /^([^/\s]+)\/([A-Z][A-Z0-9]{1,4}-\d+)$/i;
7
+ export const LIST_OPTION_DESCRIPTION = "List ID or bare List ref";
8
+ export function isTaskRef(value) {
9
+ return TASK_REF_PATTERN.test(value.trim());
10
+ }
11
+ export function parseScopedTaskRef(value) {
12
+ const match = value.trim().match(SCOPED_TASK_REF_PATTERN);
13
+ if (!match) {
14
+ return undefined;
15
+ }
16
+ const [, orgSlug, ref] = match;
17
+ return {
18
+ orgSlug,
19
+ ref: ref.toUpperCase(),
20
+ };
21
+ }
22
+ export function getProjectAliasFromTaskRef(ref) {
23
+ const dashIndex = ref.indexOf("-");
24
+ if (dashIndex <= 0) {
25
+ throw new Error(`Invalid task ref "${ref}".`);
26
+ }
27
+ return ref.slice(0, dashIndex).toUpperCase();
28
+ }
29
+ function splitValues(values) {
30
+ if (!values) {
31
+ return [];
32
+ }
33
+ return values
34
+ .flatMap((value) => value.split(","))
35
+ .map((value) => value.trim())
36
+ .filter((value) => value.length > 0);
37
+ }
38
+ export function parseOptionalTaskStatus(value) {
39
+ return parseOptionalNonEmptyString(value, "Status");
40
+ }
41
+ export function parseOptionalTaskTypeKey(value) {
42
+ return parseOptionalNonEmptyString(value, "Task type key");
43
+ }
44
+ export function parseOptionalTaskPriority(value) {
45
+ if (value === undefined) {
46
+ return undefined;
47
+ }
48
+ if (!VALID_PRIORITIES.includes(value)) {
49
+ throw new Error(`Invalid priority "${value}". Valid values: ${VALID_PRIORITIES.join(", ")}`);
50
+ }
51
+ return value;
52
+ }
53
+ export function parseOptionalTaskArchiveMode(value) {
54
+ if (value === undefined) {
55
+ return undefined;
56
+ }
57
+ if (!VALID_ARCHIVE_MODES.includes(value)) {
58
+ throw new Error(`Invalid archive mode "${value}". Valid values: ${VALID_ARCHIVE_MODES.join(", ")}`);
59
+ }
60
+ return value;
61
+ }
62
+ export function parseOptionalListIdentifier(value) {
63
+ const normalized = parseOptionalNonEmptyString(value, "List");
64
+ if (normalized === undefined) {
65
+ return undefined;
66
+ }
67
+ if (normalized.includes("/")) {
68
+ throw new Error("Cross-project List refs containing '/' are not supported here. Use a raw List ID or a bare List ref like 'SPRINT-1'.");
69
+ }
70
+ return normalized;
71
+ }
72
+ export function parseOptionalCommentsLimit(value) {
73
+ if (value === undefined) {
74
+ return undefined;
75
+ }
76
+ const normalized = value.trim();
77
+ const limit = Number(normalized);
78
+ if (!/^\d+$/.test(normalized) || limit < 1 || limit > MAX_COMMENTS_LIMIT) {
79
+ throw new Error(`Invalid comments limit "${value}". Use an integer from 1 to ${MAX_COMMENTS_LIMIT}.`);
80
+ }
81
+ return limit;
82
+ }
83
+ export function parseOptionalTags(values) {
84
+ const tags = splitValues(values);
85
+ if (tags.length === 0) {
86
+ return undefined;
87
+ }
88
+ return tags;
89
+ }
90
+ export function parseOptionalDueDate(value) {
91
+ if (value === undefined) {
92
+ return undefined;
93
+ }
94
+ const numeric = Number(value);
95
+ if (Number.isFinite(numeric)) {
96
+ if (numeric <= 0) {
97
+ throw new Error("dueDate must be a positive timestamp");
98
+ }
99
+ // Treat plausible unix-second values as seconds and everything larger as
100
+ // milliseconds. This handles leading zeroes and numeric notation better
101
+ // than string-length checks.
102
+ if (numeric < 1e11) {
103
+ return numeric * 1000;
104
+ }
105
+ return numeric;
106
+ }
107
+ const parsed = Date.parse(value);
108
+ if (!Number.isFinite(parsed)) {
109
+ throw new Error(`Invalid due date "${value}". Use unix seconds/ms or ISO-8601.`);
110
+ }
111
+ return parsed;
112
+ }
113
+ export function validateNoConflict(enabledFlag, hasValue, message) {
114
+ if (enabledFlag && hasValue) {
115
+ throw new Error(message);
116
+ }
117
+ }
118
+ //# sourceMappingURL=parsers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../../../src/commands/tasks/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAU,CAAC;AAChF,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAU,CAAC;AAC5D,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AACrD,MAAM,uBAAuB,GAAG,wCAAwC,CAAC;AAEzE,MAAM,CAAC,MAAM,uBAAuB,GAAG,0BAA0B,CAAC;AASlE,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC1D,IAAI,CAAC,K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,QAAQ,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const refsTasksCommand: Command;
@@ -0,0 +1,89 @@
1
+ import { Command } from "commander";
2
+ import chalk from "chalk";
3
+ import { api } from "../../convex/_generated/api.js";
4
+ import { addGlobalOptions } from "../../cli.js";
5
+ import { runOneShotCommand } from "../../lib/one-shot-command.js";
6
+ import { addOutputOptions, printOutput, resolveOutputMode, } from "../../lib/output.js";
7
+ import { resolveProjectFromCommand } from "../../lib/project-resolution.js";
8
+ import { parseOptionalCommentsLimit } from "./parsers.js";
9
+ import { fetchTaskResources } from "./hydrate.js";
10
+ import { formatArtifactSummaryLine, formatCommentSummaryLine, formatTaskSummaryLine } from "./formatters.js";
11
+ export const refsTasksCommand = addGlobalOptions(addOutputOptions(new Command("refs")
12
+ .description("Get tasks by refs (for example: ABC-1 ABC-2)")
13
+ .argument("<refs...>", "Task refs")
14
+ .option("--comments <n>", "Include latest comments (1-50)")
15
+ .option("--org <org>", "Organization ID or slug (used with --project alias)"))).action(async (refs, options, cmd) => {
16
+ await runOneShotCommand(cmd, async ({ client, config }) => {
17
+ const outputMode = resolveOutputMode(options);
18
+ const commentLimit = parseOptionalCommentsLimit(options.comments);
19
+ const { projectId } = await resolveProjectFromCommand(client, config, cmd, options.org);
20
+ const refsResult = await client.query(api.tasks.core.getByRefs, {
21
+ refs,
22
+ projectId,
23
+ });
24
+ const enrichedResults = await Promise.all(refsResult.results.map(async (item) => {
25
+ if (!item.task) {
26
+ return item;
27
+ }
28
+ const resources = await fetchTaskResources(client, item.task._id, {
29
+ commentLimit,
30
+ });
31
+ return {
32
+ ...item,
33
+ task: {
34
+ ...item.task,
35
+ ...resources,
36
+ },
37
+ };
38
+ }));
39
+ const payload = {
40
+ results: enrichedResults,
41
+ };
42
+ printOutput(outputMode, payload, (value) => {
43
+ const found = value.results.filter((item) => item.task !== null);
44
+ const missing = value.results.filter((item) => item.task === null);
45
+ const foundWithArtifacts = found.filter((item) => item.task.artifacts.length > 0);
46
+ const foundWithComments = found.filter((item) => item.task.comments !== undefined);
47
+ console.log(chalk.bold(`\nResolved ${found.length}/${value.results.length} ref(s).`));
48
+ if (found.length > 0) {
49
+ console.log("\nMatches:");
50
+ for (const item of found) {
51
+ console.log(` ${formatTaskSummaryLine(item.task)}`);
52
+ }
53
+ }
54
+ if (missing.length > 0) {
55
+ console.log("\nMissing:");
56
+ for (const item of missing) {
57
+ console.log(` - ${item.ref}${item.error ? ` (${item.error})` : ""}`);
58
+ }
59
+ }
60
+ if (foundWithArtifacts.length > 0) {
61
+ console.log("\nArtifact details:");
62
+ for (const item of foundWithArtifacts) {
63
+ console.log(` ${item.task.refId} ${item.task.name}`);
64
+ for (const artifact of item.task.artifacts) {
65
+ console.log(` - ${formatArtifactSummaryLine(artifact)}`);
66
+ }
67
+ }
68
+ }
69
+ if (foundWithComments.length > 0) {
70
+ console.log("\nComments:");
71
+ for (const item of foundWithComments) {
72
+ const comments = item.task.comments ?? [];
73
+ const moreSuffix = item.task.commentsHasMore === true ? "; more available" : "";
74
+ console.log(` ${item.task.refId} ${item.task.name} (showing latest ${comments.length}${moreSuffix})`);
75
+ if (comments.length === 0) {
76
+ console.log(" (none)");
77
+ }
78
+ else {
79
+ for (const comment of comments) {
80
+ console.log(` - ${formatCommentSummaryLine(comment)}`);
81
+ }
82
+ }
83
+ }
84
+ }
85
+ console.log();
86
+ });
87
+ });
88
+ });
89
+ //# sourceMappingURL=refs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refs.js","sourceRoot":"","sources":["../../../../src/commands/tasks/refs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,OAAO,EAAE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,GAAG,CAAC,aAAa,CAAC,CAAC;gBAC3B,KAAK,MAAM,IAAI,IAAI,iBAAiB,EAAE,CAAC;oBACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;oBAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;oBAChF,OAAO,CAAC,GAAG,CACT,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,oBAAoB,QAAQ,CAAC,MAAM,GAAG,UAAU,GAAG,CAC1F,CAAC;oBACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;wBAC1B,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;oBAC5B,CAAC;yBAAM,CAAC;wBACN,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;4BAC/B,OAAO,CAAC,GAAG,CAAC,SAAS,wBAAwB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;wBAC5D,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YAED,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { Command } from "commander";
2
+ import type { Id } from "../../convex/_generated/dataModel.js";
3
+ import type { OpenSanaClient, RequiredConfig } from "../../lib/config/index.js";
4
+ import type { AccessibleProject } from "../../lib/project-resolution.js";
5
+ interface ResolveTaskIdOrRefArgs {
6
+ value: string;
7
+ label: string;
8
+ projectId?: Id<"projects">;
9
+ projects?: AccessibleProject[];
10
+ }
11
+ export declare function resolveTaskIdOrRef(client: OpenSanaClient, args: ResolveTaskIdOrRefArgs): Promise<Id<"tasks">>;
12
+ interface ResolveTaskForCommandArgs {
13
+ client: OpenSanaClient;
14
+ config: RequiredConfig;
15
+ cmd: Command;
16
+ taskIdOrRef: string;
17
+ org?: string;
18
+ }
19
+ export declare function resolveTaskIdForCommand({ client, config, cmd, taskIdOrRef, org }: ResolveTaskForCommandArgs): Promise<Id<"tasks">>;
20
+ export {};
@@ -0,0 +1,57 @@
1
+ import { api } from "../../convex/_generated/api.js";
2
+ import { resolveProjectIdFromCommand } from "../../lib/project-resolution.js";
3
+ import { parseId } from "../../lib/id.js";
4
+ import { getProjectAliasFromTaskRef, isTaskRef, parseScopedTaskRef } from "./parsers.js";
5
+ export async function resolveTaskIdOrRef(client, args) {
6
+ const scopedRef = parseScopedTaskRef(args.value);
7
+ if (scopedRef) {
8
+ const projectAlias = getProjectAliasFromTaskRef(scopedRef.ref);
9
+ const project = args.projects?.find((candidate) => candidate.organizationSlug.toLowerCase() === scopedRef.orgSlug.toLowerCase() && candidate.alias.toUpperCase() === projectAlias);
10
+ if (!project) {
11
+ throw new Error(`Project "${projectAlias}" was not found for organization "${scopedRef.orgSlug}".`);
12
+ }
13
+ const result = await client.query(api.tasks.core.getByRefs, {
14
+ refs: [scopedRef.ref],
15
+ projectId: project._id,
16
+ });
17
+ const match = result.results[0];
18
+ if (!match?.task) {
19
+ throw new Error(`${args.label} ref "${scopedRef.ref}" was not found.`);
20
+ }
21
+ return match.task._id;
22
+ }
23
+ if (!isTaskRef(args.value)) {
24
+ return parseId(args.value, args.label);
25
+ }
26
+ if (!args.projectId) {
27
+ throw new Error(`${args.label} ref "${args.value}" requires a project. Pass --project or configure a default project.`);
28
+ }
29
+ const result = await client.query(api.tasks.core.getByRefs, {
30
+ refs: [args.value],
31
+ projectId: args.projectId,
32
+ });
33
+ const match = result.results[0];
34
+ if (!match?.task) {
35
+ throw new Error(`${args.label} ref "${args.value}" was not found.`);
36
+ }
37
+ return match.task._id;
38
+ }
39
+ export async function resolveTaskIdForCommand({ client, config, cmd, taskIdOrRef, org }) {
40
+ const needsProjectContext = isTaskRef(taskIdOrRef) || parseScopedTaskRef(taskIdOrRef) !== undefined;
41
+ if (!needsProjectContext) {
42
+ return resolveTaskIdOrRef(client, {
43
+ value: taskIdOrRef,
44
+ label: "taskId",
45
+ });
46
+ }
47
+ const projects = await client.query(api.projects.core.listAccessible, {});
48
+ const scopedRef = parseScopedTaskRef(taskIdOrRef);
49
+ const projectId = scopedRef === undefined ? resolveProjectIdFromCommand(projects, config, cmd, org) : undefined;
50
+ return resolveTaskIdOrRef(client, {
51
+ value: taskIdOrRef,
52
+ label: "taskId",
53
+ projectId,
54
+ projects,
55
+ });
56
+ }
57
+ //# sourceMappingURL=resolve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../../../src/commands/tasks/resolve.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAIrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AASzF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,MAAsB,EAAE,IAA4B;IAC3F,MAAM,SAAS,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjD,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,YAAY,GAAG,0BAA0B,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAC/D,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,CACjC,CAAC,SAAS,EAAE,EAAE,CACZ,SAAS,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,YAAY,CACjI,CAAC;QACF,IAAI,CAAC,OAAO,EAAE,CAAC;YAC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I,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,kBAAkB,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;AACxB,CAAC;AAUD,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAA6B;IAChH,MAAM,mBAAmB,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,kBAAkB,CAAC,WAAW,CAAC,KAAK,SAAS,CAAC;IACpG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,OAAO,kBAAkB,CAAC,MAAM,EAAE;YAChC,KAAK,EAAE,WAAW;YAClB,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAC1E,MAAM,SAAS,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEhH,OAAO,kBAAkB,CAAC,MAAM,EAAE;QAChC,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,QAAQ;QACf,SAAS;QACT,QAAQ;KACT,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const searchTasksCommand: Command;
@@ -0,0 +1,110 @@
1
+ import { Command } from "commander";
2
+ import chalk from "chalk";
3
+ import { api } from "../../convex/_generated/api.js";
4
+ import { addGlobalOptions } from "../../cli.js";
5
+ import { parseId } from "../../lib/id.js";
6
+ import { addPaginationOptions, parsePageSize, parsePaginationCursor, printPaginatedOutput, shellQuote, } from "../../lib/pagination.js";
7
+ import { runOneShotCommand } from "../../lib/one-shot-command.js";
8
+ import { addOutputOptions, resolveOutputMode } from "../../lib/output.js";
9
+ import { resolveProjectFromCommand } from "../../lib/project-resolution.js";
10
+ import { LIST_OPTION_DESCRIPTION, parseOptionalListIdentifier, parseOptionalTaskArchiveMode, parseOptionalTaskStatus, validateNoConflict, } from "./parsers.js";
11
+ import { formatTaskSummaryLine } from "./formatters.js";
12
+ function isSearchTaskSummary(value) {
13
+ if (typeof value !== "object" || value === null) {
14
+ return false;
15
+ }
16
+ return (typeof Reflect.get(value, "_id") === "string" &&
17
+ typeof Reflect.get(value, "refId") === "string" &&
18
+ typeof Reflect.get(value, "name") === "string" &&
19
+ typeof Reflect.get(value, "status") === "string" &&
20
+ typeof Reflect.get(value, "priority") === "string");
21
+ }
22
+ function buildNextCommand(query, projectId, options, nextCursor) {
23
+ const segments = ["convoy", "tasks", "search", shellQuote(query), "--project", shellQuote(projectId)];
24
+ if (options.archiveMode) {
25
+ segments.push("--archive-mode", shellQuote(options.archiveMode));
26
+ }
27
+ if (options.status) {
28
+ segments.push("--status", shellQuote(options.status));
29
+ }
30
+ if (options.assigneeId) {
31
+ segments.push("--assignee-id", shellQuote(options.assigneeId));
32
+ }
33
+ if (options.unassigned) {
34
+ segments.push("--unassigned");
35
+ }
36
+ if (options.delegatedToAgent) {
37
+ segments.push("--delegated-to-agent", shellQuote(options.delegatedToAgent));
38
+ }
39
+ if (options.list) {
40
+ segments.push("--list", shellQuote(options.list));
41
+ }
42
+ if (options.limit !== undefined) {
43
+ segments.push("--limit", shellQuote(String(options.limit)));
44
+ }
45
+ segments.push("--cursor", shellQuote(nextCursor));
46
+ return segments.join(" ");
47
+ }
48
+ export const searchTasksCommand = addGlobalOptions(addOutputOptions(addPaginationOptions(new Command("search")
49
+ .description("Search tasks")
50
+ .argument("<query>", "Search query")
51
+ .option("--org <org>", "Organization ID or slug (used with --project alias)")
52
+ .option("--archive-mode <mode>", "Archive mode: active|archived (default: active)")
53
+ .option("--status <status>", "Filter by task status")
54
+ .option("--assignee-id <userId>", "Filter by assignee (human owner) user ID")
55
+ .option("--unassigned", "Filter to tasks with no assignee")
56
+ .option("--delegated-to-agent <projectAgentId>", "Filter by delegated project agent ID")
57
+ .option("--list <list>", LIST_OPTION_DESCRIPTION)))).action(async (queryText, options, cmd) => {
58
+ await runOneShotCommand(cmd, async ({ client, config }) => {
59
+ const outputMode = resolveOutputMode(options);
60
+ const query = queryText.trim();
61
+ if (query.length === 0) {
62
+ throw new Error("Search query must be non-empty.");
63
+ }
64
+ validateNoConflict(options.unassigned === true, options.assigneeId !== undefined, "Cannot use --assignee-id and --unassigned together");
65
+ const { projectId } = await resolveProjectFromCommand(client, config, cmd, options.org);
66
+ const archiveMode = parseOptionalTaskArchiveMode(options.archiveMode) ?? "active";
67
+ const status = parseOptionalTaskStatus(options.status);
68
+ const listId = parseOptionalListIdentifier(options.list);
69
+ const limit = parsePageSize(options.limit);
70
+ const cursor = parsePaginationCursor(options.cursor);
71
+ const filters = {
72
+ ...(status !== undefined && { status }),
73
+ ...(options.assigneeId !== undefined && {
74
+ assigneeId: parseId(options.assigneeId, "assigneeId"),
75
+ }),
76
+ ...(options.unassigned === true && { assigneeId: null }),
77
+ ...(options.delegatedToAgent !== undefined && {
78
+ delegatedToAgentId: parseId(options.delegatedToAgent, "delegatedToAgentId"),
79
+ }),
80
+ };
81
+ const searchArgs = {
82
+ projectId,
83
+ query,
84
+ archiveMode,
85
+ ...(listId !== undefined && { listId }),
86
+ paginationOpts: {
87
+ numItems: limit,
88
+ cursor,
89
+ },
90
+ filters: Object.keys(filters).length > 0 ? filters : undefined,
91
+ };
92
+ const results = await client.query(api.tasks.core.search.byProject, searchArgs);
93
+ const nextCommand = buildNextCommand(query, projectId, options, results.continueCursor);
94
+ printPaginatedOutput(outputMode, results, (value) => {
95
+ if (value.page.length === 0) {
96
+ console.log(chalk.dim("\nNo tasks found."));
97
+ return;
98
+ }
99
+ console.log(chalk.bold(`\nFound ${value.page.length} task(s) on this page:\n`));
100
+ for (const task of value.page) {
101
+ if (!isSearchTaskSummary(task)) {
102
+ continue;
103
+ }
104
+ console.log(` ${formatTaskSummaryLine(task)}`);
105
+ }
106
+ console.log();
107
+ }, nextCommand);
108
+ });
109
+ });
110
+ //# sourceMappingURL=search.js.map