byterover-cli 2.5.2 → 3.0.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 (389) hide show
  1. package/.env.production +8 -0
  2. package/LICENSE +44 -0
  3. package/README.md +240 -14
  4. package/bin/dev.js +8 -1
  5. package/bin/run.js +8 -1
  6. package/dist/agent/core/domain/knowledge/conflict-detector.d.ts +38 -0
  7. package/dist/agent/core/domain/knowledge/conflict-detector.js +71 -0
  8. package/dist/agent/core/domain/knowledge/conflict-resolver.d.ts +17 -0
  9. package/dist/agent/core/domain/knowledge/conflict-resolver.js +118 -0
  10. package/dist/agent/core/domain/knowledge/utils.d.ts +4 -0
  11. package/dist/agent/core/domain/knowledge/utils.js +6 -0
  12. package/dist/agent/core/interfaces/i-curate-service.d.ts +6 -0
  13. package/dist/agent/infra/tools/implementations/curate-tool.d.ts +67 -34
  14. package/dist/agent/infra/tools/implementations/curate-tool.js +294 -47
  15. package/dist/agent/resources/prompts/system-prompt.yml +15 -8
  16. package/dist/agent/resources/tools/code_exec.txt +3 -0
  17. package/dist/agent/resources/tools/curate.txt +12 -3
  18. package/dist/oclif/commands/connectors/install.d.ts +2 -1
  19. package/dist/oclif/commands/connectors/install.js +38 -3
  20. package/dist/oclif/commands/curate/index.d.ts +18 -0
  21. package/dist/oclif/commands/curate/index.js +78 -1
  22. package/dist/oclif/commands/init.d.ts +12 -0
  23. package/dist/oclif/commands/init.js +75 -0
  24. package/dist/oclif/commands/locations.js +1 -1
  25. package/dist/oclif/commands/providers/connect.d.ts +31 -1
  26. package/dist/oclif/commands/providers/connect.js +307 -27
  27. package/dist/oclif/commands/pull.d.ts +1 -0
  28. package/dist/oclif/commands/pull.js +7 -0
  29. package/dist/oclif/commands/push.d.ts +1 -0
  30. package/dist/oclif/commands/push.js +8 -0
  31. package/dist/oclif/commands/review/approve.d.ts +17 -0
  32. package/dist/oclif/commands/review/approve.js +37 -0
  33. package/dist/oclif/commands/review/base-review-decision.d.ts +18 -0
  34. package/dist/oclif/commands/review/base-review-decision.js +71 -0
  35. package/dist/oclif/commands/review/pending.d.ts +13 -0
  36. package/dist/oclif/commands/review/pending.js +94 -0
  37. package/dist/oclif/commands/review/reject.d.ts +17 -0
  38. package/dist/oclif/commands/review/reject.js +38 -0
  39. package/dist/oclif/commands/space/list.d.ts +2 -2
  40. package/dist/oclif/commands/space/list.js +13 -35
  41. package/dist/oclif/commands/space/switch.d.ts +2 -7
  42. package/dist/oclif/commands/space/switch.js +13 -56
  43. package/dist/oclif/commands/status.d.ts +1 -0
  44. package/dist/oclif/commands/status.js +11 -1
  45. package/dist/oclif/commands/vc/add.d.ts +7 -0
  46. package/dist/oclif/commands/vc/add.js +29 -0
  47. package/dist/oclif/commands/vc/branch.d.ts +15 -0
  48. package/dist/oclif/commands/vc/branch.js +70 -0
  49. package/dist/oclif/commands/vc/checkout.d.ts +14 -0
  50. package/dist/oclif/commands/vc/checkout.js +47 -0
  51. package/dist/oclif/commands/vc/clone.d.ts +9 -0
  52. package/dist/oclif/commands/vc/clone.js +61 -0
  53. package/dist/oclif/commands/vc/commit.d.ts +10 -0
  54. package/dist/oclif/commands/vc/commit.js +32 -0
  55. package/dist/oclif/commands/vc/config.d.ts +10 -0
  56. package/dist/oclif/commands/vc/config.js +30 -0
  57. package/dist/oclif/commands/vc/fetch.d.ts +10 -0
  58. package/dist/oclif/commands/vc/fetch.js +42 -0
  59. package/dist/oclif/commands/vc/index.d.ts +6 -0
  60. package/dist/oclif/commands/vc/index.js +8 -0
  61. package/dist/oclif/commands/vc/init.d.ts +6 -0
  62. package/dist/oclif/commands/vc/init.js +25 -0
  63. package/dist/oclif/commands/vc/log.d.ts +13 -0
  64. package/dist/oclif/commands/vc/log.js +48 -0
  65. package/dist/oclif/commands/vc/merge.d.ts +19 -0
  66. package/dist/oclif/commands/vc/merge.js +130 -0
  67. package/dist/oclif/commands/vc/pull.d.ts +13 -0
  68. package/dist/oclif/commands/vc/pull.js +60 -0
  69. package/dist/oclif/commands/vc/push.d.ts +13 -0
  70. package/dist/oclif/commands/vc/push.js +60 -0
  71. package/dist/oclif/commands/vc/remote/add.d.ts +10 -0
  72. package/dist/oclif/commands/vc/remote/add.js +30 -0
  73. package/dist/oclif/commands/vc/remote/index.d.ts +6 -0
  74. package/dist/oclif/commands/vc/remote/index.js +16 -0
  75. package/dist/oclif/commands/vc/remote/set-url.d.ts +10 -0
  76. package/dist/oclif/commands/vc/remote/set-url.js +30 -0
  77. package/dist/oclif/commands/vc/reset.d.ts +13 -0
  78. package/dist/oclif/commands/vc/reset.js +62 -0
  79. package/dist/oclif/commands/vc/status.d.ts +8 -0
  80. package/dist/oclif/commands/vc/status.js +106 -0
  81. package/dist/oclif/hooks/init/validate-brv-config.d.ts +26 -0
  82. package/dist/oclif/hooks/init/validate-brv-config.js +62 -0
  83. package/dist/oclif/lib/daemon-client.d.ts +2 -0
  84. package/dist/oclif/lib/daemon-client.js +36 -10
  85. package/dist/oclif/lib/prompt-utils.d.ts +43 -0
  86. package/dist/oclif/lib/prompt-utils.js +84 -0
  87. package/dist/oclif/lib/spinner.d.ts +8 -0
  88. package/dist/oclif/lib/spinner.js +23 -0
  89. package/dist/oclif/lib/task-client.d.ts +5 -0
  90. package/dist/oclif/lib/task-client.js +15 -2
  91. package/dist/server/config/environment.d.ts +2 -19
  92. package/dist/server/config/environment.js +31 -38
  93. package/dist/server/constants.d.ts +3 -9
  94. package/dist/server/constants.js +9 -12
  95. package/dist/server/core/domain/entities/auth-token.d.ts +2 -0
  96. package/dist/server/core/domain/entities/auth-token.js +7 -1
  97. package/dist/server/core/domain/entities/curate-log-entry.d.ts +11 -0
  98. package/dist/server/core/domain/entities/space.d.ts +4 -0
  99. package/dist/server/core/domain/entities/space.js +8 -0
  100. package/dist/server/core/domain/entities/team.d.ts +2 -0
  101. package/dist/server/core/domain/entities/team.js +4 -0
  102. package/dist/server/core/domain/errors/auth-error.d.ts +0 -6
  103. package/dist/server/core/domain/errors/auth-error.js +0 -12
  104. package/dist/server/core/domain/errors/git-error.d.ts +6 -0
  105. package/dist/server/core/domain/errors/git-error.js +12 -0
  106. package/dist/server/core/domain/errors/task-error.d.ts +4 -3
  107. package/dist/server/core/domain/errors/task-error.js +8 -8
  108. package/dist/server/core/domain/errors/transport-error.d.ts +0 -31
  109. package/dist/server/core/domain/errors/transport-error.js +0 -50
  110. package/dist/server/core/domain/errors/vc-error.d.ts +5 -0
  111. package/dist/server/core/domain/errors/vc-error.js +8 -0
  112. package/dist/server/core/domain/knowledge/markdown-writer.d.ts +4 -1
  113. package/dist/server/core/domain/knowledge/markdown-writer.js +37 -7
  114. package/dist/server/core/domain/transport/schemas.d.ts +6 -6
  115. package/dist/server/core/interfaces/context-tree/i-context-tree-service.d.ts +11 -0
  116. package/dist/server/core/interfaces/process/i-task-lifecycle-hook.d.ts +6 -0
  117. package/dist/server/core/interfaces/services/i-git-service.d.ts +234 -0
  118. package/dist/server/core/interfaces/storage/i-curate-log-store.d.ts +5 -0
  119. package/dist/server/core/interfaces/storage/i-review-backup-store.d.ts +19 -0
  120. package/dist/server/core/interfaces/vc/i-vc-git-config-store.d.ts +8 -0
  121. package/dist/server/infra/config/auto-init.d.ts +0 -2
  122. package/dist/server/infra/config/auto-init.js +0 -1
  123. package/dist/server/infra/connectors/rules/rules-connector-config.d.ts +0 -4
  124. package/dist/server/infra/context-tree/file-context-tree-service.d.ts +2 -0
  125. package/dist/server/infra/context-tree/file-context-tree-service.js +13 -0
  126. package/dist/server/infra/daemon/brv-server.js +23 -3
  127. package/dist/server/infra/git/cogit-url.d.ts +17 -0
  128. package/dist/server/infra/git/cogit-url.js +39 -0
  129. package/dist/server/infra/git/git-http-wrapper.d.ts +20 -0
  130. package/dist/server/infra/git/git-http-wrapper.js +334 -0
  131. package/dist/server/infra/git/isomorphic-git-service.d.ts +78 -0
  132. package/dist/server/infra/git/isomorphic-git-service.js +983 -0
  133. package/dist/server/infra/http/models-dev-client.d.ts +0 -4
  134. package/dist/server/infra/http/models-dev-client.js +0 -6
  135. package/dist/server/infra/http/openrouter-api-client.d.ts +0 -8
  136. package/dist/server/infra/http/openrouter-api-client.js +0 -13
  137. package/dist/server/infra/http/provider-model-fetcher-registry.d.ts +0 -5
  138. package/dist/server/infra/http/provider-model-fetcher-registry.js +0 -7
  139. package/dist/server/infra/http/review-api-handler.d.ts +13 -0
  140. package/dist/server/infra/http/review-api-handler.js +286 -0
  141. package/dist/server/infra/http/review-ui.d.ts +7 -0
  142. package/dist/server/infra/http/review-ui.js +606 -0
  143. package/dist/server/infra/mcp/tools/brv-curate-tool.d.ts +2 -2
  144. package/dist/server/infra/process/curate-log-handler.d.ts +18 -2
  145. package/dist/server/infra/process/curate-log-handler.js +50 -13
  146. package/dist/server/infra/process/feature-handlers.js +41 -1
  147. package/dist/server/infra/process/task-router.js +16 -0
  148. package/dist/server/infra/provider/env-provider-detector.d.ts +0 -20
  149. package/dist/server/infra/provider/env-provider-detector.js +0 -27
  150. package/dist/server/infra/space/http-space-service.js +2 -0
  151. package/dist/server/infra/storage/file-curate-log-store.d.ts +10 -0
  152. package/dist/server/infra/storage/file-curate-log-store.js +35 -0
  153. package/dist/server/infra/storage/file-provider-config-store.d.ts +0 -4
  154. package/dist/server/infra/storage/file-provider-config-store.js +0 -6
  155. package/dist/server/infra/storage/file-review-backup-store.d.ts +29 -0
  156. package/dist/server/infra/storage/file-review-backup-store.js +121 -0
  157. package/dist/server/infra/transport/handlers/auth-handler.js +9 -5
  158. package/dist/server/infra/transport/handlers/handler-types.d.ts +9 -0
  159. package/dist/server/infra/transport/handlers/handler-types.js +11 -0
  160. package/dist/server/infra/transport/handlers/index.d.ts +4 -0
  161. package/dist/server/infra/transport/handlers/index.js +2 -0
  162. package/dist/server/infra/transport/handlers/init-handler.d.ts +1 -0
  163. package/dist/server/infra/transport/handlers/init-handler.js +13 -1
  164. package/dist/server/infra/transport/handlers/pull-handler.d.ts +3 -0
  165. package/dist/server/infra/transport/handlers/pull-handler.js +5 -1
  166. package/dist/server/infra/transport/handlers/push-handler.d.ts +20 -0
  167. package/dist/server/infra/transport/handlers/push-handler.js +116 -14
  168. package/dist/server/infra/transport/handlers/reset-handler.d.ts +11 -0
  169. package/dist/server/infra/transport/handlers/reset-handler.js +37 -1
  170. package/dist/server/infra/transport/handlers/review-handler.d.ts +35 -0
  171. package/dist/server/infra/transport/handlers/review-handler.js +162 -0
  172. package/dist/server/infra/transport/handlers/space-handler.d.ts +3 -0
  173. package/dist/server/infra/transport/handlers/space-handler.js +4 -1
  174. package/dist/server/infra/transport/handlers/status-handler.d.ts +5 -0
  175. package/dist/server/infra/transport/handlers/status-handler.js +51 -16
  176. package/dist/server/infra/transport/handlers/vc-handler.d.ts +100 -0
  177. package/dist/server/infra/transport/handlers/vc-handler.js +1050 -0
  178. package/dist/server/infra/transport/socket-io-transport-server.d.ts +7 -0
  179. package/dist/server/infra/transport/socket-io-transport-server.js +12 -1
  180. package/dist/server/infra/transport/transport-connector.d.ts +1 -1
  181. package/dist/server/infra/transport/transport-connector.js +2 -1
  182. package/dist/server/infra/vc/file-vc-git-config-store.d.ts +11 -0
  183. package/dist/server/infra/vc/file-vc-git-config-store.js +43 -0
  184. package/dist/server/templates/skill/SKILL.md +167 -33
  185. package/dist/server/utils/curate-result-parser.d.ts +64 -0
  186. package/dist/server/utils/curate-result-parser.js +8 -0
  187. package/dist/server/utils/file-content-reader.d.ts +2 -1
  188. package/dist/server/utils/file-helpers.d.ts +0 -24
  189. package/dist/server/utils/file-helpers.js +0 -81
  190. package/dist/server/utils/gitignore.d.ts +9 -0
  191. package/dist/server/utils/gitignore.js +47 -0
  192. package/dist/server/utils/process-logger.d.ts +0 -13
  193. package/dist/server/utils/process-logger.js +1 -78
  194. package/dist/shared/transport/events/index.d.ts +6 -0
  195. package/dist/shared/transport/events/index.js +3 -0
  196. package/dist/shared/transport/events/init-events.d.ts +8 -0
  197. package/dist/shared/transport/events/init-events.js +1 -0
  198. package/dist/shared/transport/events/push-events.d.ts +6 -0
  199. package/dist/shared/transport/events/review-events.d.ts +41 -0
  200. package/dist/shared/transport/events/review-events.js +5 -0
  201. package/dist/shared/transport/events/vc-events.d.ts +257 -0
  202. package/dist/shared/transport/events/vc-events.js +67 -0
  203. package/dist/shared/transport/types/dto.d.ts +6 -1
  204. package/dist/tui/app/pages/init-project-page.d.ts +9 -0
  205. package/dist/tui/app/pages/init-project-page.js +54 -0
  206. package/dist/tui/app/pages/protected-routes.js +14 -6
  207. package/dist/tui/components/index.d.ts +0 -2
  208. package/dist/tui/components/index.js +0 -1
  209. package/dist/tui/features/activity/hooks/use-activity-logs.js +7 -1
  210. package/dist/tui/features/commands/definitions/index.js +3 -0
  211. package/dist/tui/features/commands/definitions/space-list.js +9 -18
  212. package/dist/tui/features/commands/definitions/space-switch.js +10 -6
  213. package/dist/tui/features/commands/definitions/vc-add.d.ts +2 -0
  214. package/dist/tui/features/commands/definitions/vc-add.js +15 -0
  215. package/dist/tui/features/commands/definitions/vc-branch.d.ts +2 -0
  216. package/dist/tui/features/commands/definitions/vc-branch.js +33 -0
  217. package/dist/tui/features/commands/definitions/vc-checkout.d.ts +2 -0
  218. package/dist/tui/features/commands/definitions/vc-checkout.js +32 -0
  219. package/dist/tui/features/commands/definitions/vc-clone.d.ts +2 -0
  220. package/dist/tui/features/commands/definitions/vc-clone.js +18 -0
  221. package/dist/tui/features/commands/definitions/vc-commit.d.ts +2 -0
  222. package/dist/tui/features/commands/definitions/vc-commit.js +32 -0
  223. package/dist/tui/features/commands/definitions/vc-config.d.ts +2 -0
  224. package/dist/tui/features/commands/definitions/vc-config.js +40 -0
  225. package/dist/tui/features/commands/definitions/vc-fetch.d.ts +2 -0
  226. package/dist/tui/features/commands/definitions/vc-fetch.js +37 -0
  227. package/dist/tui/features/commands/definitions/vc-init.d.ts +2 -0
  228. package/dist/tui/features/commands/definitions/vc-init.js +11 -0
  229. package/dist/tui/features/commands/definitions/vc-log.d.ts +2 -0
  230. package/dist/tui/features/commands/definitions/vc-log.js +25 -0
  231. package/dist/tui/features/commands/definitions/vc-merge.d.ts +2 -0
  232. package/dist/tui/features/commands/definitions/vc-merge.js +48 -0
  233. package/dist/tui/features/commands/definitions/vc-pull.d.ts +2 -0
  234. package/dist/tui/features/commands/definitions/vc-pull.js +42 -0
  235. package/dist/tui/features/commands/definitions/vc-push.d.ts +2 -0
  236. package/dist/tui/features/commands/definitions/vc-push.js +38 -0
  237. package/dist/tui/features/commands/definitions/vc-remote.d.ts +2 -0
  238. package/dist/tui/features/commands/definitions/vc-remote.js +57 -0
  239. package/dist/tui/features/commands/definitions/vc-reset.d.ts +2 -0
  240. package/dist/tui/features/commands/definitions/vc-reset.js +35 -0
  241. package/dist/tui/features/commands/definitions/vc-status.d.ts +2 -0
  242. package/dist/tui/features/commands/definitions/vc-status.js +11 -0
  243. package/dist/tui/features/commands/definitions/vc.d.ts +2 -0
  244. package/dist/tui/features/commands/definitions/vc.js +36 -0
  245. package/dist/tui/features/commands/hooks/use-slash-command-processor.js +5 -5
  246. package/dist/tui/features/log/api/execute-log.d.ts +8 -0
  247. package/dist/tui/features/log/api/execute-log.js +13 -0
  248. package/dist/tui/features/log/components/log-flow.d.ts +14 -0
  249. package/dist/tui/features/log/components/log-flow.js +29 -0
  250. package/dist/tui/features/log/utils/format-log.d.ts +3 -0
  251. package/dist/tui/features/log/utils/format-log.js +42 -0
  252. package/dist/tui/features/onboarding/hooks/use-app-view-mode.d.ts +9 -5
  253. package/dist/tui/features/onboarding/hooks/use-app-view-mode.js +12 -5
  254. package/dist/tui/features/push/components/push-flow.js +9 -2
  255. package/dist/tui/features/reset/components/reset-flow.js +2 -1
  256. package/dist/tui/features/status/components/status-view.js +2 -1
  257. package/dist/tui/features/status/utils/format-status.js +9 -0
  258. package/dist/tui/features/tasks/hooks/use-task-subscriptions.js +11 -0
  259. package/dist/tui/features/tasks/stores/tasks-store.d.ts +10 -0
  260. package/dist/tui/features/tasks/stores/tasks-store.js +16 -0
  261. package/dist/tui/features/vc/add/api/execute-vc-add.d.ts +8 -0
  262. package/dist/tui/features/vc/add/api/execute-vc-add.js +13 -0
  263. package/dist/tui/features/vc/add/components/vc-add-flow.d.ts +7 -0
  264. package/dist/tui/features/vc/add/components/vc-add-flow.js +35 -0
  265. package/dist/tui/features/vc/branch/api/execute-vc-branch.d.ts +8 -0
  266. package/dist/tui/features/vc/branch/api/execute-vc-branch.js +13 -0
  267. package/dist/tui/features/vc/branch/components/vc-branch-flow.d.ts +8 -0
  268. package/dist/tui/features/vc/branch/components/vc-branch-flow.js +53 -0
  269. package/dist/tui/features/vc/branch/utils/format-branch.d.ts +4 -0
  270. package/dist/tui/features/vc/branch/utils/format-branch.js +12 -0
  271. package/dist/tui/features/vc/checkout/api/execute-vc-checkout.d.ts +8 -0
  272. package/dist/tui/features/vc/checkout/api/execute-vc-checkout.js +13 -0
  273. package/dist/tui/features/vc/checkout/components/vc-checkout-flow.d.ts +8 -0
  274. package/dist/tui/features/vc/checkout/components/vc-checkout-flow.js +33 -0
  275. package/dist/tui/features/vc/clone/api/execute-vc-clone.d.ts +8 -0
  276. package/dist/tui/features/vc/clone/api/execute-vc-clone.js +13 -0
  277. package/dist/tui/features/vc/clone/components/vc-clone-flow.d.ts +7 -0
  278. package/dist/tui/features/vc/clone/components/vc-clone-flow.js +79 -0
  279. package/dist/tui/features/vc/commit/api/execute-vc-commit.d.ts +8 -0
  280. package/dist/tui/features/vc/commit/api/execute-vc-commit.js +13 -0
  281. package/dist/tui/features/vc/commit/components/vc-commit-flow.d.ts +7 -0
  282. package/dist/tui/features/vc/commit/components/vc-commit-flow.js +29 -0
  283. package/dist/tui/features/vc/config/api/execute-vc-config.d.ts +8 -0
  284. package/dist/tui/features/vc/config/api/execute-vc-config.js +13 -0
  285. package/dist/tui/features/vc/config/components/vc-config-flow.d.ts +9 -0
  286. package/dist/tui/features/vc/config/components/vc-config-flow.js +30 -0
  287. package/dist/tui/features/vc/fetch/api/execute-vc-fetch.d.ts +8 -0
  288. package/dist/tui/features/vc/fetch/api/execute-vc-fetch.js +13 -0
  289. package/dist/tui/features/vc/fetch/components/vc-fetch-flow.d.ts +8 -0
  290. package/dist/tui/features/vc/fetch/components/vc-fetch-flow.js +75 -0
  291. package/dist/tui/features/vc/init/api/execute-vc-init.d.ts +8 -0
  292. package/dist/tui/features/vc/init/api/execute-vc-init.js +13 -0
  293. package/dist/tui/features/vc/init/components/vc-init-flow.d.ts +10 -0
  294. package/dist/tui/features/vc/init/components/vc-init-flow.js +37 -0
  295. package/dist/tui/features/vc/merge/api/execute-vc-merge.d.ts +8 -0
  296. package/dist/tui/features/vc/merge/api/execute-vc-merge.js +13 -0
  297. package/dist/tui/features/vc/merge/components/vc-merge-flow.d.ts +11 -0
  298. package/dist/tui/features/vc/merge/components/vc-merge-flow.js +72 -0
  299. package/dist/tui/features/vc/pull/api/execute-vc-pull.d.ts +8 -0
  300. package/dist/tui/features/vc/pull/api/execute-vc-pull.js +13 -0
  301. package/dist/tui/features/vc/pull/components/vc-pull-flow.d.ts +9 -0
  302. package/dist/tui/features/vc/pull/components/vc-pull-flow.js +83 -0
  303. package/dist/tui/features/vc/push/api/execute-vc-push.d.ts +8 -0
  304. package/dist/tui/features/vc/push/api/execute-vc-push.js +13 -0
  305. package/dist/tui/features/vc/push/components/vc-push-flow.d.ts +8 -0
  306. package/dist/tui/features/vc/push/components/vc-push-flow.js +83 -0
  307. package/dist/tui/features/vc/remote/api/execute-vc-remote.d.ts +8 -0
  308. package/dist/tui/features/vc/remote/api/execute-vc-remote.js +13 -0
  309. package/dist/tui/features/vc/remote/components/vc-remote-flow.d.ts +9 -0
  310. package/dist/tui/features/vc/remote/components/vc-remote-flow.js +42 -0
  311. package/dist/tui/features/vc/reset/api/execute-vc-reset.d.ts +8 -0
  312. package/dist/tui/features/vc/reset/api/execute-vc-reset.js +13 -0
  313. package/dist/tui/features/vc/reset/components/vc-reset-flow.d.ts +10 -0
  314. package/dist/tui/features/vc/reset/components/vc-reset-flow.js +63 -0
  315. package/dist/tui/features/vc/status/api/execute-vc-status.d.ts +8 -0
  316. package/dist/tui/features/vc/status/api/execute-vc-status.js +13 -0
  317. package/dist/tui/features/vc/status/components/vc-status-flow.d.ts +10 -0
  318. package/dist/tui/features/vc/status/components/vc-status-flow.js +133 -0
  319. package/dist/tui/lib/environment.d.ts +8 -0
  320. package/dist/tui/lib/environment.js +8 -0
  321. package/dist/tui/utils/error-messages.d.ts +5 -1
  322. package/dist/tui/utils/error-messages.js +32 -3
  323. package/node_modules/@campfirein/brv-transport-client/LICENSE +95 -0
  324. package/node_modules/@campfirein/brv-transport-client/README.md +3 -4
  325. package/node_modules/@campfirein/brv-transport-client/package.json +2 -2
  326. package/oclif.manifest.json +985 -65
  327. package/package.json +13 -5
  328. package/dist/oclif/hooks/prerun/validate-brv-config-version.d.ts +0 -33
  329. package/dist/oclif/hooks/prerun/validate-brv-config-version.js +0 -86
  330. package/dist/server/core/domain/entities/bullet.d.ts +0 -51
  331. package/dist/server/core/domain/entities/bullet.js +0 -94
  332. package/dist/server/core/domain/entities/memory.d.ts +0 -55
  333. package/dist/server/core/domain/entities/memory.js +0 -90
  334. package/dist/server/core/domain/entities/playbook.d.ts +0 -80
  335. package/dist/server/core/domain/entities/playbook.js +0 -214
  336. package/dist/server/core/domain/entities/presigned-url.d.ts +0 -9
  337. package/dist/server/core/domain/entities/presigned-url.js +0 -18
  338. package/dist/server/core/domain/entities/presigned-urls-response.d.ts +0 -10
  339. package/dist/server/core/domain/entities/presigned-urls-response.js +0 -18
  340. package/dist/server/core/domain/entities/retrieve-result.d.ts +0 -35
  341. package/dist/server/core/domain/entities/retrieve-result.js +0 -35
  342. package/dist/server/core/domain/errors/headless-prompt-error.d.ts +0 -11
  343. package/dist/server/core/domain/errors/headless-prompt-error.js +0 -18
  344. package/dist/server/core/interfaces/services/i-legacy-rule-detector.d.ts +0 -56
  345. package/dist/server/core/interfaces/services/i-memory-retrieval-service.d.ts +0 -39
  346. package/dist/server/core/interfaces/services/i-memory-storage-service.d.ts +0 -53
  347. package/dist/server/core/interfaces/services/i-terminal.d.ts +0 -146
  348. package/dist/server/core/interfaces/services/i-terminal.js +0 -1
  349. package/dist/server/core/interfaces/services/i-workspace-detector-service.d.ts +0 -8
  350. package/dist/server/core/interfaces/services/i-workspace-detector-service.js +0 -1
  351. package/dist/server/core/interfaces/storage/i-onboarding-preference-store.d.ts +0 -20
  352. package/dist/server/core/interfaces/storage/i-onboarding-preference-store.js +0 -1
  353. package/dist/server/infra/connectors/rules/legacy-rule-detector.d.ts +0 -21
  354. package/dist/server/infra/connectors/rules/legacy-rule-detector.js +0 -106
  355. package/dist/server/infra/memory/http-memory-retrieval-service.d.ts +0 -18
  356. package/dist/server/infra/memory/http-memory-retrieval-service.js +0 -64
  357. package/dist/server/infra/memory/http-memory-storage-service.d.ts +0 -18
  358. package/dist/server/infra/memory/http-memory-storage-service.js +0 -72
  359. package/dist/server/infra/memory/memory-to-playbook-mapper.d.ts +0 -33
  360. package/dist/server/infra/memory/memory-to-playbook-mapper.js +0 -51
  361. package/dist/server/infra/storage/file-onboarding-preference-store.d.ts +0 -10
  362. package/dist/server/infra/storage/file-onboarding-preference-store.js +0 -45
  363. package/dist/server/infra/terminal/headless-terminal.d.ts +0 -91
  364. package/dist/server/infra/terminal/headless-terminal.js +0 -211
  365. package/dist/server/infra/workspace/workspace-detector-service.d.ts +0 -57
  366. package/dist/server/infra/workspace/workspace-detector-service.js +0 -165
  367. package/dist/server/utils/crash-log.d.ts +0 -14
  368. package/dist/server/utils/crash-log.js +0 -19
  369. package/dist/server/utils/emoji-helpers.d.ts +0 -38
  370. package/dist/server/utils/emoji-helpers.js +0 -42
  371. package/dist/server/utils/error-handler.d.ts +0 -51
  372. package/dist/server/utils/error-handler.js +0 -169
  373. package/dist/server/utils/oclif-error-helpers.d.ts +0 -40
  374. package/dist/server/utils/oclif-error-helpers.js +0 -46
  375. package/dist/server/utils/tool-display-formatter.d.ts +0 -53
  376. package/dist/server/utils/tool-display-formatter.js +0 -257
  377. package/dist/tui/components/init.d.ts +0 -33
  378. package/dist/tui/components/init.js +0 -234
  379. package/dist/tui/features/space/api/get-spaces.d.ts +0 -16
  380. package/dist/tui/features/space/api/get-spaces.js +0 -17
  381. package/dist/tui/features/space/api/switch-space.d.ts +0 -11
  382. package/dist/tui/features/space/api/switch-space.js +0 -24
  383. package/dist/tui/features/space/components/space-list-view.d.ts +0 -12
  384. package/dist/tui/features/space/components/space-list-view.js +0 -56
  385. package/dist/tui/features/space/components/space-switch-flow.d.ts +0 -13
  386. package/dist/tui/features/space/components/space-switch-flow.js +0 -97
  387. /package/dist/server/core/interfaces/services/{i-legacy-rule-detector.js → i-git-service.js} +0 -0
  388. /package/dist/server/core/interfaces/{services/i-memory-retrieval-service.js → storage/i-review-backup-store.js} +0 -0
  389. /package/dist/server/core/interfaces/{services/i-memory-storage-service.js → vc/i-vc-git-config-store.js} +0 -0
@@ -1,214 +0,0 @@
1
- import { Bullet } from './bullet.js';
2
- /**
3
- * The central knowledge repository that stores and manages bullets.
4
- * Playbooks are organized into sections.
5
- * Playbooks are used as temporary notes then will be pushed to byterover for usage.
6
- */
7
- export class Playbook {
8
- bullets;
9
- nextId;
10
- sections;
11
- constructor(bullets = new Map(), sections = new Map(), nextId = 1) {
12
- this.bullets = new Map(bullets);
13
- this.sections = new Map(sections);
14
- this.nextId = nextId;
15
- }
16
- // ===== CRUD Operations =====
17
- /**
18
- * Adds a new bullet to the playbook
19
- */
20
- addBullet(section, content, bulletId, metadata) {
21
- const id = bulletId ?? this._generateId(section);
22
- const now = new Date().toISOString();
23
- // Create metadata with defaults if not provided
24
- const bulletMetadata = metadata ?? {
25
- relatedFiles: [],
26
- tags: [],
27
- timestamp: now,
28
- };
29
- const bullet = new Bullet(id, section, content, bulletMetadata, undefined);
30
- // Add to bullets map
31
- this.bullets.set(id, bullet);
32
- // Add to sections map
33
- if (!this.sections.has(section)) {
34
- this.sections.set(section, []);
35
- }
36
- this.sections.get(section).push(id);
37
- return bullet;
38
- }
39
- /**
40
- * Adds a tag to a bullet
41
- */
42
- addTagToBullet(bulletId, tag) {
43
- const bullet = this.bullets.get(bulletId);
44
- if (!bullet)
45
- return undefined;
46
- // Check if tag already exists
47
- if (bullet.metadata.tags.includes(tag)) {
48
- return bullet;
49
- }
50
- const updatedMetadata = {
51
- ...bullet.metadata,
52
- tags: [...bullet.metadata.tags, tag],
53
- timestamp: new Date().toISOString(),
54
- };
55
- const updatedBullet = new Bullet(bullet.id, bullet.section, bullet.content, updatedMetadata, bullet.memoryId);
56
- this.bullets.set(bulletId, updatedBullet);
57
- return updatedBullet;
58
- }
59
- /**
60
- * Converts playbook to markdown format for LLM prompts
61
- */
62
- asPrompt() {
63
- const sections = this.getSections();
64
- if (sections.length === 0) {
65
- return '(Empty playbook)';
66
- }
67
- const lines = [];
68
- for (const section of sections) {
69
- lines.push(`## ${section}`);
70
- const bullets = this.getBulletsInSection(section);
71
- for (const bullet of bullets) {
72
- lines.push(bullet.toDisplayString());
73
- }
74
- lines.push(''); // Empty line between sections
75
- }
76
- return lines.join('\n').trim();
77
- }
78
- /**
79
- * Serializes to JSON string (pretty-printed)
80
- * @param includeContent If false, content field is omitted from bullets (for file-based storage)
81
- */
82
- dumps(includeContent = true) {
83
- return JSON.stringify(this.toJson(includeContent), null, 2);
84
- }
85
- /**
86
- * Retrieves a single bullet by ID
87
- */
88
- getBullet(bulletId) {
89
- return this.bullets.get(bulletId);
90
- }
91
- /**
92
- * Returns all bullets as an array
93
- */
94
- getBullets() {
95
- return [...this.bullets.values()];
96
- }
97
- /**
98
- * Returns bullets in a specific section
99
- */
100
- getBulletsInSection(section) {
101
- const bulletIds = this.sections.get(section) ?? [];
102
- return bulletIds.map((id) => this.bullets.get(id)).filter((b) => b !== undefined);
103
- }
104
- /**
105
- * Returns the next bullet ID that will be generated
106
- */
107
- getNextId() {
108
- // Use "temp" as prefix since we don't know the section yet
109
- return String(this.nextId).padStart(5, '0');
110
- }
111
- /**
112
- * Returns all section names
113
- */
114
- getSections() {
115
- return [...this.sections.keys()].sort();
116
- }
117
- /**
118
- * Removes a bullet from the playbook
119
- */
120
- removeBullet(bulletId) {
121
- const bullet = this.bullets.get(bulletId);
122
- if (!bullet)
123
- return;
124
- // Remove from bullets map
125
- this.bullets.delete(bulletId);
126
- // Remove from sections map
127
- const sectionBullets = this.sections.get(bullet.section);
128
- if (sectionBullets) {
129
- const index = sectionBullets.indexOf(bulletId);
130
- if (index !== -1) {
131
- sectionBullets.splice(index, 1);
132
- }
133
- // Clean up empty sections
134
- if (sectionBullets.length === 0) {
135
- this.sections.delete(bullet.section);
136
- }
137
- }
138
- }
139
- /**
140
- * Removes a tag from a bullet
141
- */
142
- removeTagFromBullet(bulletId, tag) {
143
- const bullet = this.bullets.get(bulletId);
144
- if (!bullet)
145
- return undefined;
146
- const updatedMetadata = {
147
- ...bullet.metadata,
148
- tags: bullet.metadata.tags.filter((t) => t !== tag),
149
- timestamp: new Date().toISOString(),
150
- };
151
- const updatedBullet = new Bullet(bullet.id, bullet.section, bullet.content, updatedMetadata, bullet.memoryId);
152
- this.bullets.set(bulletId, updatedBullet);
153
- return updatedBullet;
154
- }
155
- // ===== Presentation =====
156
- /**
157
- * Returns playbook statistics
158
- */
159
- stats() {
160
- const tagsSet = new Set();
161
- for (const bullet of this.bullets.values()) {
162
- for (const tag of bullet.metadata.tags) {
163
- tagsSet.add(tag);
164
- }
165
- }
166
- return {
167
- bullets: this.bullets.size,
168
- sections: this.sections.size,
169
- tags: [...tagsSet].sort(),
170
- };
171
- }
172
- toJson(includeContent = true) {
173
- const bulletsObj = {};
174
- for (const [id, bullet] of this.bullets) {
175
- bulletsObj[id] = bullet.toJson(includeContent);
176
- }
177
- const sectionsObj = {};
178
- for (const [section, bulletIds] of this.sections) {
179
- sectionsObj[section] = [...bulletIds];
180
- }
181
- return {
182
- bullets: bulletsObj,
183
- nextId: this.nextId,
184
- sections: sectionsObj,
185
- };
186
- }
187
- // ===== Serialization =====
188
- /**
189
- * Updates an existing bullet's content and/or metadata
190
- */
191
- updateBullet(bulletId, options) {
192
- const bullet = this.bullets.get(bulletId);
193
- if (!bullet)
194
- return undefined;
195
- const updatedMetadata = options.metadata ?? {
196
- ...bullet.metadata,
197
- timestamp: new Date().toISOString(),
198
- };
199
- const updatedBullet = new Bullet(bullet.id, bullet.section, options.content ?? bullet.content, updatedMetadata, bullet.memoryId);
200
- this.bullets.set(bulletId, updatedBullet);
201
- return updatedBullet;
202
- }
203
- // ===== Private Helpers =====
204
- _generateId(section) {
205
- // Convert section to prefix: "Common Errors" -> "common"
206
- const prefix = section
207
- .toLowerCase()
208
- .split(' ')[0]
209
- .replaceAll(/[^a-z0-9]/g, '');
210
- const id = `${prefix}-${String(this.nextId).padStart(5, '0')}`;
211
- this.nextId++;
212
- return id;
213
- }
214
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Represents a presigned URL for uploading files to cloud storage.
3
- * Contains the file name and the temporary upload URL with embedded credentials.
4
- */
5
- export declare class PresignedUrl {
6
- readonly fileName: string;
7
- readonly uploadUrl: string;
8
- constructor(fileName: string, uploadUrl: string);
9
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Represents a presigned URL for uploading files to cloud storage.
3
- * Contains the file name and the temporary upload URL with embedded credentials.
4
- */
5
- export class PresignedUrl {
6
- fileName;
7
- uploadUrl;
8
- constructor(fileName, uploadUrl) {
9
- if (fileName.trim().length === 0) {
10
- throw new Error('File name cannot be empty');
11
- }
12
- if (uploadUrl.trim().length === 0) {
13
- throw new Error('Upload URL cannot be empty');
14
- }
15
- this.fileName = fileName;
16
- this.uploadUrl = uploadUrl;
17
- }
18
- }
@@ -1,10 +0,0 @@
1
- import type { PresignedUrl } from './presigned-url.js';
2
- /**
3
- * Represents the response from requesting presigned URLs.
4
- * Contains both the presigned URLs for file upload and the request ID for confirmation.
5
- */
6
- export declare class PresignedUrlsResponse {
7
- readonly presignedUrls: ReadonlyArray<PresignedUrl>;
8
- readonly requestId: string;
9
- constructor(presignedUrls: PresignedUrl[], requestId: string);
10
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Represents the response from requesting presigned URLs.
3
- * Contains both the presigned URLs for file upload and the request ID for confirmation.
4
- */
5
- export class PresignedUrlsResponse {
6
- presignedUrls;
7
- requestId;
8
- constructor(presignedUrls, requestId) {
9
- if (presignedUrls.length === 0) {
10
- throw new Error('Presigned URLs array cannot be empty');
11
- }
12
- if (requestId.trim().length === 0) {
13
- throw new Error('Request ID cannot be empty');
14
- }
15
- this.presignedUrls = Object.freeze([...presignedUrls]);
16
- this.requestId = requestId;
17
- }
18
- }
@@ -1,35 +0,0 @@
1
- import { Memory, MemoryParams } from './memory.js';
2
- /**
3
- * Parameters for creating a RetrieveResult instance.
4
- */
5
- export type RetrieveResultParams = {
6
- memories: Memory[];
7
- relatedMemories: Memory[];
8
- };
9
- /**
10
- * JSON representation of a RetrieveResult.
11
- */
12
- export type RetrieveResultJson = {
13
- memories: MemoryParams[];
14
- relatedMemories: MemoryParams[];
15
- };
16
- /**
17
- * Represents the result of a memory retrieval operation from the ByteRover Memora service.
18
- * Contains both directly matching memories and related memories.
19
- */
20
- export declare class RetrieveResult {
21
- readonly memories: readonly Memory[];
22
- readonly relatedMemories: readonly Memory[];
23
- constructor(params: RetrieveResultParams);
24
- /**
25
- * Creates a RetrieveResult instance from a JSON object.
26
- * @param json JSON object representing the RetrieveResult
27
- * @returns An instance of RetrieveResult
28
- */
29
- static fromJson(json: RetrieveResultJson): RetrieveResult;
30
- /**
31
- * Converts the RetrieveResult instance to a JSON object.
32
- * @returns A JSON object representing the RetrieveResult
33
- */
34
- toJson(): RetrieveResultJson;
35
- }
@@ -1,35 +0,0 @@
1
- import { Memory } from './memory.js';
2
- /**
3
- * Represents the result of a memory retrieval operation from the ByteRover Memora service.
4
- * Contains both directly matching memories and related memories.
5
- */
6
- export class RetrieveResult {
7
- memories;
8
- relatedMemories;
9
- constructor(params) {
10
- // Defensive copy to prevent external mutation
11
- this.memories = [...params.memories];
12
- this.relatedMemories = [...params.relatedMemories];
13
- }
14
- /**
15
- * Creates a RetrieveResult instance from a JSON object.
16
- * @param json JSON object representing the RetrieveResult
17
- * @returns An instance of RetrieveResult
18
- */
19
- static fromJson(json) {
20
- return new RetrieveResult({
21
- memories: json.memories.map((m) => Memory.fromJson(m)),
22
- relatedMemories: json.relatedMemories.map((m) => Memory.fromJson(m)),
23
- });
24
- }
25
- /**
26
- * Converts the RetrieveResult instance to a JSON object.
27
- * @returns A JSON object representing the RetrieveResult
28
- */
29
- toJson() {
30
- return {
31
- memories: this.memories.map((m) => m.toJson()),
32
- relatedMemories: this.relatedMemories.map((m) => m.toJson()),
33
- };
34
- }
35
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Error thrown when headless mode encounters a prompt that cannot be handled.
3
- * Provides detailed information about what prompt was required and available choices.
4
- */
5
- export declare class HeadlessPromptError extends Error {
6
- readonly availableChoices?: string[];
7
- readonly code = "HEADLESS_PROMPT_REQUIRED";
8
- readonly promptMessage: string;
9
- readonly promptType: string;
10
- constructor(promptType: string, promptMessage: string, availableChoices?: string[]);
11
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Error thrown when headless mode encounters a prompt that cannot be handled.
3
- * Provides detailed information about what prompt was required and available choices.
4
- */
5
- export class HeadlessPromptError extends Error {
6
- availableChoices;
7
- code = 'HEADLESS_PROMPT_REQUIRED';
8
- promptMessage;
9
- promptType;
10
- constructor(promptType, promptMessage, availableChoices) {
11
- const choicesInfo = availableChoices?.length ? ` Available choices: ${availableChoices.join(', ')}` : '';
12
- super(`Headless mode cannot handle ${promptType} prompt: "${promptMessage}".${choicesInfo}`);
13
- this.name = 'HeadlessPromptError';
14
- this.promptType = promptType;
15
- this.promptMessage = promptMessage;
16
- this.availableChoices = availableChoices;
17
- }
18
- }
@@ -1,56 +0,0 @@
1
- import type { Agent } from '../../domain/entities/agent.js';
2
- /**
3
- * Represents a reliably detected legacy ByteRover rule section.
4
- */
5
- export type LegacyRuleMatch = {
6
- /**
7
- * Content of the detected section.
8
- */
9
- content: string;
10
- /**
11
- * Ending line number (1-indexed)
12
- */
13
- endLine: number;
14
- /**
15
- * Starting line number (1-indexed)
16
- */
17
- startLine: number;
18
- };
19
- /**
20
- * Represents an uncertain detection where the footer was found but start couldn't be reliably determined.
21
- */
22
- export type UncertainMatch = {
23
- /**
24
- * Line number where the footer tag was found (1-indexed).
25
- */
26
- footerLine: number;
27
- /**
28
- * Reason why the start couldn't be determined.
29
- */
30
- reason: string;
31
- };
32
- /**
33
- * Result of detecting legacy ByteRover rules in a file.
34
- */
35
- export type LegacyRuleDetectionResult = {
36
- /**
37
- * Reliably detected rule sections with known start and end positions.
38
- */
39
- reliableMatches: LegacyRuleMatch[];
40
- /**
41
- * Uncertain matches where only the footer was found.
42
- */
43
- uncertainMatches: UncertainMatch[];
44
- };
45
- /**
46
- * Service for detecting legacy ByteRover rules (without boundary markers) in instruction files.
47
- */
48
- export interface ILegacyRuleDetector {
49
- /**
50
- * Detects legacy ByteRover rule sections in file content.
51
- * @param content The file content to analyze.
52
- * @param agentName The agent name to look for in the footer tag.
53
- * @returns Detection result with reliable and uncertain matches.
54
- */
55
- detectLegacyRules: (content: string, agentName: Agent) => LegacyRuleDetectionResult;
56
- }
@@ -1,39 +0,0 @@
1
- import type { RetrieveResult } from '../../domain/entities/retrieve-result.js';
2
- export type RetrieveParams = {
3
- nodeKeys?: string[];
4
- query: string;
5
- sessionKey: string;
6
- spaceId: string;
7
- };
8
- /**
9
- * Interface for memory retrieval operations from ByteRover Memora service.
10
- * This service is responsible for fetching memories based on search queries.
11
- */
12
- export interface IMemoryRetrievalService {
13
- /**
14
- * Retrieves memories from the ByteRover Memora service based on a search query.
15
- *
16
- * @param params The retrieve operation parameters
17
- * @returns A promise that resolves to the RetrieveResult containing memories and related memories
18
- *
19
- * @example
20
- * // Broad search across entire space
21
- * const result = await memoryService.retrieve({
22
- * query: "authentication best practices",
23
- * spaceId: "a0000000-b001-0000-0000-000000000000",
24
- * accessToken: token.accessToken,
25
- * sessionKey: token.sessionKey,
26
- * });
27
- *
28
- * @example
29
- * // Scoped search to specific files
30
- * const result = await memoryService.retrieve({
31
- * query: "error handling",
32
- * spaceId: "a0000000-b001-0000-0000-000000000000",
33
- * accessToken: token.accessToken,
34
- * sessionKey: token.sessionKey,
35
- * nodeKeys: ["src/auth/login.ts", "src/auth/oauth.ts"],
36
- * });
37
- */
38
- retrieve: (params: RetrieveParams) => Promise<RetrieveResult>;
39
- }
@@ -1,53 +0,0 @@
1
- import type { PresignedUrlsResponse } from '../../domain/entities/presigned-urls-response.js';
2
- /**
3
- * Parameters for requesting presigned URLs.
4
- */
5
- export type GetPresignedUrlsParams = {
6
- branch: string;
7
- fileNames: string[];
8
- sessionKey: string;
9
- spaceId: string;
10
- teamId: string;
11
- };
12
- /**
13
- * Parameters for confirming upload completion.
14
- */
15
- export type ConfirmUploadParams = {
16
- requestId: string;
17
- sessionKey: string;
18
- spaceId: string;
19
- teamId: string;
20
- };
21
- /**
22
- * Interface for memory storage operations to ByteRover CoGit service.
23
- * This service is responsible for uploading playbooks to blob storage.
24
- */
25
- export interface IMemoryStorageService {
26
- /**
27
- * Confirms that file upload is complete.
28
- * Notifies the server that all files have been successfully uploaded to blob storage.
29
- *
30
- * @param params Confirmation parameters including request ID from presigned URLs response
31
- * @returns Promise that resolves when confirmation succeeds
32
- * @throws Error if confirmation fails
33
- */
34
- confirmUpload: (params: ConfirmUploadParams) => Promise<void>;
35
- /**
36
- * Generates presigned URLs for uploading files to memory storage.
37
- *
38
- * @param params Request parameters including authentication, identifiers, and file list
39
- * @returns Response object containing presigned URLs and request ID for confirmation
40
- * @throws Error if the request fails
41
- */
42
- getPresignedUrls: (params: GetPresignedUrlsParams) => Promise<PresignedUrlsResponse>;
43
- /**
44
- * Uploads file content to a presigned URL.
45
- * Uses HTTP PUT with the file content in the request body.
46
- *
47
- * @param uploadUrl The presigned URL from Google Cloud Storage
48
- * @param content File content as string (typically JSON)
49
- * @returns Promise that resolves when upload completes
50
- * @throws Error if upload fails (network error, expired URL, etc.)
51
- */
52
- uploadFile: (uploadUrl: string, content: string) => Promise<void>;
53
- }
@@ -1,146 +0,0 @@
1
- /**
2
- * Choice option for select prompts.
3
- */
4
- export interface SelectChoice<T> {
5
- description?: string;
6
- name: string;
7
- value: T;
8
- }
9
- /**
10
- * Search source function type.
11
- */
12
- export type SearchSource<T> = (input: string | undefined) => Promise<SelectChoice<T>[]> | SelectChoice<T>[];
13
- /**
14
- * Options for confirm prompt.
15
- */
16
- export interface ConfirmOptions {
17
- /** The default value (default: true) */
18
- default?: boolean;
19
- /** The confirmation message */
20
- message: string;
21
- }
22
- /**
23
- * Options for search prompt.
24
- */
25
- export interface SearchOptions<T> {
26
- /** The prompt message */
27
- message: string;
28
- /** Function that returns choices based on input */
29
- source: SearchSource<T>;
30
- }
31
- /**
32
- * Options for select prompt.
33
- */
34
- export interface SelectOptions<T> {
35
- /** The available choices */
36
- choices: SelectChoice<T>[];
37
- /** The prompt message */
38
- message: string;
39
- }
40
- /**
41
- * Options for input prompt.
42
- */
43
- export interface InputOptions {
44
- /** The prompt message */
45
- message: string;
46
- /** Validation function (return true if valid, or error message string) */
47
- validate?: (value: string) => boolean | string;
48
- }
49
- /**
50
- * File selector item representation.
51
- */
52
- export interface FileSelectorItem {
53
- /** Whether the item is a directory */
54
- isDirectory: boolean;
55
- /** The file/directory name */
56
- name: string;
57
- /** The full path to the item */
58
- path: string;
59
- }
60
- /**
61
- * Options for file selector prompt.
62
- */
63
- export interface FileSelectorOptions {
64
- /** Allow user to cancel selection */
65
- allowCancel?: boolean;
66
- /** Base path to start selection from */
67
- basePath: string;
68
- /** Filter function to show/hide items */
69
- filter?: (item: Readonly<FileSelectorItem>) => boolean;
70
- /** The prompt message */
71
- message: string;
72
- /** Number of items to show per page */
73
- pageSize?: number;
74
- /** Custom theme labels */
75
- theme?: {
76
- labels?: {
77
- messages?: {
78
- cancel?: string;
79
- empty?: string;
80
- };
81
- };
82
- };
83
- /** Type of items to select: 'directory' or 'file' */
84
- type?: 'directory' | 'file';
85
- }
86
- /**
87
- * Interface for terminal interactions.
88
- * Provides output and user input operations.
89
- */
90
- export interface ITerminal {
91
- /**
92
- * Start a spinner/action indicator with a message.
93
- * @param message The message to display while action is in progress
94
- */
95
- actionStart(message: string): void;
96
- /**
97
- * Stop the current spinner/action indicator.
98
- * @param message Optional message to display when stopped
99
- */
100
- actionStop(message?: string): void;
101
- /**
102
- * Display a error message.
103
- * @param message The message to display
104
- */
105
- error(message: string): void;
106
- /**
107
- * Display a message to the terminal.
108
- * @param message The message to display (optional, empty line if omitted)
109
- */
110
- log(message?: string): void;
111
- /**
112
- * Display a warning message.
113
- * @param message The message to display
114
- */
115
- warn(message: string): void;
116
- /**
117
- * Prompt the user for confirmation.
118
- * @param options Confirmation options
119
- * @returns Promise resolving to user's choice
120
- */
121
- confirm(options: ConfirmOptions): Promise<boolean>;
122
- /**
123
- * Prompt the user to select a file or directory.
124
- * @param options File selector options
125
- * @returns Promise resolving to selected item, or null if cancelled
126
- */
127
- fileSelector(options: FileSelectorOptions): Promise<FileSelectorItem | null>;
128
- /**
129
- * Prompt the user for text input.
130
- * @param options Input options
131
- * @returns Promise resolving to user's input string
132
- */
133
- input(options: InputOptions): Promise<string>;
134
- /**
135
- * Prompt the user to search and select from options.
136
- * @param options Search options
137
- * @returns Promise resolving to selected value
138
- */
139
- search<T>(options: SearchOptions<T>): Promise<T>;
140
- /**
141
- * Prompt the user to select from a list of choices.
142
- * @param options Select options
143
- * @returns Promise resolving to selected value
144
- */
145
- select<T>(options: SelectOptions<T>): Promise<T>;
146
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- import type { Agent } from '../../domain/entities/agent.js';
2
- export interface WorkspaceInfo {
3
- chatLogPath: string;
4
- cwd: string;
5
- }
6
- export interface IWorkspaceDetectorService {
7
- detectWorkspaces(agent: Agent): WorkspaceInfo;
8
- }