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,5 +1,6 @@
1
1
  import { TaskErrorCode } from '../../server/core/domain/errors/task-error.js';
2
2
  import { LlmEvents, TaskEvents } from '../../shared/transport/events/index.js';
3
+ import { ReviewEvents } from '../../shared/transport/events/review-events.js';
3
4
  import { writeJsonResponse } from './json-response.js';
4
5
  /** Grace period before treating 'reconnecting' as daemon death (ms) */
5
6
  const DISCONNECT_GRACE_MS = 10_000;
@@ -57,6 +58,7 @@ export function waitForTaskCompletion(options, log) {
57
58
  let completed = false;
58
59
  let disconnectTimer;
59
60
  const toolCalls = [];
61
+ let pendingReview;
60
62
  const rejectRetryable = (message) => {
61
63
  if (completed)
62
64
  return;
@@ -169,13 +171,24 @@ export function waitForTaskCompletion(options, log) {
169
171
  return;
170
172
  onResponse(data.content, data.taskId);
171
173
  }),
174
+ // Pending review notification — emitted by server after curate completes with review-required ops
175
+ client.on(ReviewEvents.NOTIFY, (data) => {
176
+ if (data.taskId === taskId) {
177
+ pendingReview = { pendingCount: data.pendingCount, reviewUrl: data.reviewUrl };
178
+ }
179
+ }),
172
180
  // Task completed
173
181
  client.on(TaskEvents.COMPLETED, (payload) => {
174
182
  if (payload.taskId !== taskId || completed)
175
183
  return;
176
184
  completed = true;
177
185
  cleanup();
178
- onCompleted({ logId: payload.logId, result: payload.result, taskId, toolCalls });
186
+ // Prefer pendingReviewCount embedded in payload (set synchronously by server before task:completed).
187
+ // Falls back to review:notify capture for backward compatibility.
188
+ const resolvedPendingReview = payload.pendingReviewCount !== undefined && payload.pendingReviewCount > 0
189
+ ? { pendingCount: payload.pendingReviewCount, reviewUrl: pendingReview?.reviewUrl ?? '' }
190
+ : pendingReview;
191
+ onCompleted({ logId: payload.logId, pendingReview: resolvedPendingReview, result: payload.result, taskId, toolCalls });
179
192
  resolve();
180
193
  }),
181
194
  // Task error
@@ -186,7 +199,7 @@ export function waitForTaskCompletion(options, log) {
186
199
  cleanup();
187
200
  onError({ error: payload.error, logId: payload.logId, taskId, toolCalls });
188
201
  if (isText) {
189
- reject(Object.assign(new Error(payload.error.message), { code: payload.error.code }));
202
+ reject(Object.assign(new Error(payload.error.message), { code: payload.error.code ?? TaskErrorCode.TASK_EXECUTION }));
190
203
  }
191
204
  else {
192
205
  resolve();
@@ -2,11 +2,6 @@
2
2
  * Environment types supported by the CLI.
3
3
  */
4
4
  type Environment = 'development' | 'production';
5
- /**
6
- * Current environment - set at runtime by the launcher scripts.
7
- * - `./bin/dev.js` sets BRV_ENV=development
8
- * - `./bin/run.js` sets BRV_ENV=production
9
- */
10
5
  export declare const ENVIRONMENT: Environment;
11
6
  /**
12
7
  * Environment-specific configuration.
@@ -16,27 +11,15 @@ type EnvironmentConfig = {
16
11
  authorizationUrl: string;
17
12
  clientId: string;
18
13
  cogitApiBaseUrl: string;
14
+ gitRemoteBaseUrl: string;
19
15
  hubRegistryUrl: string;
20
16
  issuerUrl: string;
21
17
  llmApiBaseUrl: string;
22
- memoraApiBaseUrl: string;
23
18
  scopes: string[];
24
19
  tokenUrl: string;
25
20
  webAppUrl: string;
26
21
  };
27
- /**
28
- * Configuration for each environment.
29
- * These values are bundled at build time.
30
- */
31
- export declare const ENV_CONFIG: Record<Environment, EnvironmentConfig>;
32
- /**
33
- * Get the configuration for the current environment.
34
- * @returns The environment configuration.
35
- */
36
22
  export declare const getCurrentConfig: () => EnvironmentConfig;
37
- /**
38
- * Check if the current environment is development.
39
- * @returns True if in development mode, false otherwise.
40
- */
23
+ export declare const getGitRemoteBaseUrl: () => string;
41
24
  export declare const isDevelopment: () => boolean;
42
25
  export {};
@@ -1,48 +1,41 @@
1
+ const isEnvironment = (value) => value === 'development' || value === 'production';
1
2
  /**
2
3
  * Current environment - set at runtime by the launcher scripts.
3
4
  * - `./bin/dev.js` sets BRV_ENV=development
4
5
  * - `./bin/run.js` sets BRV_ENV=production
5
6
  */
6
- export const ENVIRONMENT = process.env.BRV_ENV ?? 'development';
7
+ const envValue = process.env.BRV_ENV;
8
+ export const ENVIRONMENT = isEnvironment(envValue) ? envValue : 'development';
7
9
  /**
8
- * Configuration for each environment.
9
- * These values are bundled at build time.
10
+ * Non-infrastructure config that stays in source (same across envs or not sensitive).
10
11
  */
11
- export const ENV_CONFIG = {
12
- development: {
13
- apiBaseUrl: 'https://dev-beta-iam.byterover.dev/api/v1',
14
- authorizationUrl: 'https://dev-beta-iam.byterover.dev/api/v1/oidc/authorize',
15
- clientId: 'byterover-cli-client',
16
- cogitApiBaseUrl: 'https://dev-beta-cgit.byterover.dev/api/v1',
17
- hubRegistryUrl: 'https://hub.byterover.dev/r/registry.json',
18
- issuerUrl: 'https://dev-beta-iam.byterover.dev/api/v1/oidc',
19
- llmApiBaseUrl: 'https://dev-beta-llm.byterover.dev',
20
- memoraApiBaseUrl: 'https://dev-beta-memora-retrieve.byterover.dev/api/v3',
21
- scopes: ['read', 'write', 'debug'],
22
- tokenUrl: 'https://dev-beta-iam.byterover.dev/api/v1/oidc/token',
23
- webAppUrl: 'https://dev-beta-app.byterover.dev',
24
- },
25
- production: {
26
- apiBaseUrl: 'https://iam.byterover.dev/api/v1',
27
- authorizationUrl: 'https://iam.byterover.dev/api/v1/oidc/authorize',
28
- clientId: 'byterover-cli-client',
29
- cogitApiBaseUrl: 'https://v3-cgit.byterover.dev/api/v1',
30
- hubRegistryUrl: 'https://hub.byterover.dev/r/registry.json',
31
- issuerUrl: 'https://iam.byterover.dev/api/v1/oidc',
32
- llmApiBaseUrl: 'https://llm.byterover.dev',
33
- memoraApiBaseUrl: 'https://beta-memora-retrieve.byterover.dev/api/v3',
34
- scopes: ['read', 'write'],
35
- tokenUrl: 'https://iam.byterover.dev/api/v1/oidc/token',
36
- webAppUrl: 'https://app.byterover.dev',
12
+ const DEFAULTS = {
13
+ clientId: 'byterover-cli-client',
14
+ hubRegistryUrl: 'https://hub.byterover.dev/r/registry.json',
15
+ scopes: {
16
+ development: ['read', 'write', 'debug'],
17
+ production: ['read', 'write'],
37
18
  },
38
19
  };
39
- /**
40
- * Get the configuration for the current environment.
41
- * @returns The environment configuration.
42
- */
43
- export const getCurrentConfig = () => ENV_CONFIG[ENVIRONMENT];
44
- /**
45
- * Check if the current environment is development.
46
- * @returns True if in development mode, false otherwise.
47
- */
20
+ const readRequiredEnv = (name) => {
21
+ const value = process.env[name];
22
+ if (!value) {
23
+ throw new Error(`Missing required environment variable: ${name}. Ensure .env files are loaded via dotenv.`);
24
+ }
25
+ return value;
26
+ };
27
+ export const getCurrentConfig = () => ({
28
+ apiBaseUrl: readRequiredEnv('BRV_API_BASE_URL'),
29
+ authorizationUrl: readRequiredEnv('BRV_AUTHORIZATION_URL'),
30
+ clientId: DEFAULTS.clientId,
31
+ cogitApiBaseUrl: readRequiredEnv('BRV_COGIT_API_BASE_URL'),
32
+ gitRemoteBaseUrl: readRequiredEnv('BRV_GIT_REMOTE_BASE_URL'),
33
+ hubRegistryUrl: DEFAULTS.hubRegistryUrl,
34
+ issuerUrl: readRequiredEnv('BRV_ISSUER_URL'),
35
+ llmApiBaseUrl: readRequiredEnv('BRV_LLM_API_BASE_URL'),
36
+ scopes: [...DEFAULTS.scopes[ENVIRONMENT]],
37
+ tokenUrl: readRequiredEnv('BRV_TOKEN_URL'),
38
+ webAppUrl: readRequiredEnv('BRV_WEB_APP_URL'),
39
+ });
40
+ export const getGitRemoteBaseUrl = () => process.env.BRV_GIT_REMOTE_BASE_URL ?? 'https://byterover.dev';
48
41
  export const isDevelopment = () => ENVIRONMENT === 'development';
@@ -1,12 +1,10 @@
1
1
  export declare const BRV_DIR = ".brv";
2
- export declare const BLOBS_DIR = "blobs";
3
2
  export declare const PROJECT_CONFIG_FILE = "config.json";
4
3
  export declare const BRV_CONFIG_VERSION = "0.0.1";
5
4
  export declare const GLOBAL_CONFIG_DIR = "brv";
6
5
  export declare const GLOBAL_CONFIG_FILE = "config.json";
7
6
  export declare const GLOBAL_CONFIG_VERSION = "0.0.1";
8
7
  export declare const GLOBAL_DATA_DIR = "brv";
9
- export declare const ACE_DIR = "ace";
10
8
  export declare const PROJECT = "byterover";
11
9
  export declare const CONTEXT_TREE_DIR = "context-tree";
12
10
  export declare const CONTEXT_TREE_BACKUP_DIR = "context-tree-backup";
@@ -21,16 +19,9 @@ export declare const SNAPSHOT_FILE = ".snapshot.json";
21
19
  */
22
20
  export declare const DEFAULT_BRANCH = "main";
23
21
  export declare const TRANSPORT_HOST = "127.0.0.1";
24
- export declare const TRANSPORT_REQUEST_TIMEOUT_MS = 10000;
25
22
  export declare const TRANSPORT_SPACE_SWITCH_TIMEOUT_MS = 60000;
26
- export declare const TRANSPORT_ROOM_TIMEOUT_MS = 2000;
27
- export declare const TRANSPORT_CONNECT_TIMEOUT_MS = 3000;
28
- export declare const TRANSPORT_RECONNECTION_DELAY_MS = 50;
29
- export declare const TRANSPORT_RECONNECTION_DELAY_MAX_MS = 1000;
30
- export declare const TRANSPORT_RECONNECTION_ATTEMPTS = 30;
31
23
  export declare const TRANSPORT_PING_INTERVAL_MS = 5000;
32
24
  export declare const TRANSPORT_PING_TIMEOUT_MS = 10000;
33
- export declare const TRANSPORT_DEFAULT_TRANSPORTS: ('polling' | 'websocket')[];
34
25
  export declare const DEFAULT_LLM_MODEL = "gemini-3-flash-preview";
35
26
  export declare const PROJECT_ROOM_PREFIX = "project:";
36
27
  export declare const PROJECT_ROOM_SUFFIX = ":broadcast";
@@ -59,6 +50,7 @@ export declare const AGENT_PROCESS_READY_TIMEOUT_MS = 30000;
59
50
  export declare const AGENT_PROCESS_STOP_TIMEOUT_MS = 5000;
60
51
  export declare const CURATE_LOG_DIR = "curate-log";
61
52
  export declare const CURATE_LOG_ID_PREFIX = "cur";
53
+ export declare const REVIEW_BACKUPS_DIR = "review-backups";
62
54
  export declare const SUMMARY_INDEX_FILE = "_index.md";
63
55
  export declare const ARCHIVE_DIR = "_archived";
64
56
  export declare const STUB_EXTENSION = ".stub.md";
@@ -66,3 +58,5 @@ export declare const FULL_ARCHIVE_EXTENSION = ".full.md";
66
58
  export declare const MANIFEST_FILE = "_manifest.json";
67
59
  export declare const ARCHIVE_IMPORTANCE_THRESHOLD = 35;
68
60
  export declare const DEFAULT_GHOST_CUE_MAX_TOKENS = 220;
61
+ /** .gitignore content for the context tree — ignore derived artifacts only */
62
+ export declare const CONTEXT_TREE_GITIGNORE = "# Derived artifacts \u2014 do not track\n.gitignore\n.snapshot.json\n_manifest.json\n_index.md\n";
@@ -1,5 +1,4 @@
1
1
  export const BRV_DIR = '.brv';
2
- export const BLOBS_DIR = 'blobs';
3
2
  export const PROJECT_CONFIG_FILE = 'config.json';
4
3
  export const BRV_CONFIG_VERSION = '0.0.1';
5
4
  // Global config constants (user-level, stored in XDG config directory)
@@ -9,8 +8,6 @@ export const GLOBAL_CONFIG_VERSION = '0.0.1';
9
8
  // Global data directory name (for XDG_DATA_HOME - secrets, credentials, cache)
10
9
  // Same value as GLOBAL_CONFIG_DIR but different semantic purpose
11
10
  export const GLOBAL_DATA_DIR = 'brv';
12
- // ACE directory structure constants
13
- export const ACE_DIR = 'ace';
14
11
  export const PROJECT = 'byterover';
15
12
  // Context Tree directory structure constants
16
13
  export const CONTEXT_TREE_DIR = 'context-tree';
@@ -27,18 +24,9 @@ export const SNAPSHOT_FILE = '.snapshot.json';
27
24
  export const DEFAULT_BRANCH = 'main';
28
25
  // Transport layer constants (optimized for localhost real-time)
29
26
  export const TRANSPORT_HOST = '127.0.0.1'; // Use IP address for better sandbox compatibility
30
- export const TRANSPORT_REQUEST_TIMEOUT_MS = 10_000; // 10s - most operations complete quickly
31
27
  export const TRANSPORT_SPACE_SWITCH_TIMEOUT_MS = 60_000; // 60s - includes cogit pull + merge
32
- export const TRANSPORT_ROOM_TIMEOUT_MS = 2000; // 2s - room ops are instant on localhost
33
- export const TRANSPORT_CONNECT_TIMEOUT_MS = 3000; // 3s - 127.0.0.1 connects in <10ms
34
- export const TRANSPORT_RECONNECTION_DELAY_MS = 50; // 50ms - ultra aggressive start
35
- export const TRANSPORT_RECONNECTION_DELAY_MAX_MS = 1000; // 1s cap - fail fast, retry fast
36
- export const TRANSPORT_RECONNECTION_ATTEMPTS = 30; // More attempts with faster retry
37
28
  export const TRANSPORT_PING_INTERVAL_MS = 5000; // 5s ping - reasonable for local communication
38
29
  export const TRANSPORT_PING_TIMEOUT_MS = 10_000; // 10s timeout - avoid false disconnects during GC/load
39
- // WebSocket-only transport to avoid HTTP polling issues in sandboxed environments (Cursor, etc.)
40
- // HTTP polling may be blocked by IDE sandboxes causing "xhr poll error"
41
- export const TRANSPORT_DEFAULT_TRANSPORTS = ['websocket'];
42
30
  // LLM Model defaults
43
31
  export const DEFAULT_LLM_MODEL = 'gemini-3-flash-preview';
44
32
  // Project room naming convention
@@ -80,6 +68,8 @@ export const AGENT_PROCESS_STOP_TIMEOUT_MS = 5000; // 5s max wait for child proc
80
68
  // Curate log
81
69
  export const CURATE_LOG_DIR = 'curate-log';
82
70
  export const CURATE_LOG_ID_PREFIX = 'cur';
71
+ // Review backups (stores pre-curate file content for local HITL review diffs)
72
+ export const REVIEW_BACKUPS_DIR = 'review-backups';
83
73
  // === Hierarchical DAG (summary, archive, manifest) ===
84
74
  export const SUMMARY_INDEX_FILE = '_index.md';
85
75
  export const ARCHIVE_DIR = '_archived';
@@ -88,3 +78,10 @@ export const FULL_ARCHIVE_EXTENSION = '.full.md';
88
78
  export const MANIFEST_FILE = '_manifest.json';
89
79
  export const ARCHIVE_IMPORTANCE_THRESHOLD = 35;
90
80
  export const DEFAULT_GHOST_CUE_MAX_TOKENS = 220;
81
+ /** .gitignore content for the context tree — ignore derived artifacts only */
82
+ export const CONTEXT_TREE_GITIGNORE = `# Derived artifacts — do not track
83
+ .gitignore
84
+ .snapshot.json
85
+ _manifest.json
86
+ _index.md
87
+ `;
@@ -6,6 +6,7 @@ export type AuthTokenParams = {
6
6
  tokenType?: string;
7
7
  userEmail: string;
8
8
  userId: string;
9
+ userName?: string;
9
10
  };
10
11
  /**
11
12
  * Represents an authentication token with access and refresh tokens, expiration, and type.
@@ -18,6 +19,7 @@ export declare class AuthToken {
18
19
  readonly tokenType: string;
19
20
  readonly userEmail: string;
20
21
  readonly userId: string;
22
+ readonly userName?: string;
21
23
  constructor(params: AuthTokenParams);
22
24
  /**
23
25
  * Create an AuthToken instance from a JSON object.
@@ -9,6 +9,7 @@ export class AuthToken {
9
9
  tokenType;
10
10
  userEmail;
11
11
  userId;
12
+ userName;
12
13
  constructor(params) {
13
14
  this.accessToken = params.accessToken;
14
15
  this.expiresAt = params.expiresAt;
@@ -17,6 +18,7 @@ export class AuthToken {
17
18
  this.tokenType = params.tokenType ?? 'Bearer';
18
19
  this.userId = params.userId;
19
20
  this.userEmail = params.userEmail;
21
+ this.userName = params.userName;
20
22
  }
21
23
  /**
22
24
  * Create an AuthToken instance from a JSON object.
@@ -39,6 +41,7 @@ export class AuthToken {
39
41
  tokenType: json.tokenType,
40
42
  userEmail: json.userEmail,
41
43
  userId: json.userId,
44
+ userName: json.userName ?? undefined,
42
45
  });
43
46
  }
44
47
  /**
@@ -60,7 +63,7 @@ export class AuthToken {
60
63
  * @returns A JSON object representing the AuthToken
61
64
  */
62
65
  toJson() {
63
- return {
66
+ const json = {
64
67
  accessToken: this.accessToken,
65
68
  expiresAt: this.expiresAt.toISOString(),
66
69
  refreshToken: this.refreshToken,
@@ -69,5 +72,8 @@ export class AuthToken {
69
72
  userEmail: this.userEmail,
70
73
  userId: this.userId,
71
74
  };
75
+ if (this.userName)
76
+ json.userName = this.userName;
77
+ return json;
72
78
  }
73
79
  }
@@ -1,8 +1,19 @@
1
1
  export type CurateLogOperation = {
2
+ additionalFilePaths?: string[];
3
+ confidence?: 'high' | 'low';
2
4
  filePath?: string;
5
+ impact?: 'high' | 'low';
3
6
  message?: string;
7
+ needsReview?: boolean;
4
8
  path: string;
9
+ /** Semantic summary of the file's content before this operation (for review UI). */
10
+ previousSummary?: string;
11
+ reason?: string;
12
+ /** Local review status. Set to 'pending' when needsReview=true; updated to 'approved'/'rejected' by the review UI. */
13
+ reviewStatus?: 'approved' | 'pending' | 'rejected';
5
14
  status: 'failed' | 'success';
15
+ /** Semantic summary of the file's content after this operation (for review UI). */
16
+ summary?: string;
6
17
  type: 'ADD' | 'DELETE' | 'MERGE' | 'UPDATE' | 'UPSERT';
7
18
  };
8
19
  export type CurateLogSummary = {
@@ -5,8 +5,10 @@ interface SpaceParams {
5
5
  id: string;
6
6
  isDefault: boolean;
7
7
  name: string;
8
+ slug?: string;
8
9
  teamId: string;
9
10
  teamName: string;
11
+ teamSlug?: string;
10
12
  }
11
13
  /**
12
14
  * Represents a ByteRover space that belongs to a team.
@@ -16,8 +18,10 @@ export declare class Space {
16
18
  readonly id: string;
17
19
  readonly isDefault: boolean;
18
20
  readonly name: string;
21
+ readonly slug: string;
19
22
  readonly teamId: string;
20
23
  readonly teamName: string;
24
+ readonly teamSlug: string;
21
25
  constructor(params: SpaceParams);
22
26
  /**
23
27
  * Deserializes a space from JSON format
@@ -6,8 +6,10 @@ export class Space {
6
6
  id;
7
7
  isDefault;
8
8
  name;
9
+ slug;
9
10
  teamId;
10
11
  teamName;
12
+ teamSlug;
11
13
  constructor(params) {
12
14
  if (params.id.trim().length === 0) {
13
15
  throw new Error('Space ID cannot be empty');
@@ -24,8 +26,10 @@ export class Space {
24
26
  this.id = params.id;
25
27
  this.isDefault = params.isDefault;
26
28
  this.name = params.name;
29
+ this.slug = params.slug ?? params.name;
27
30
  this.teamId = params.teamId;
28
31
  this.teamName = params.teamName;
32
+ this.teamSlug = params.teamSlug ?? params.teamName;
29
33
  }
30
34
  /**
31
35
  * Deserializes a space from JSON format
@@ -50,8 +54,10 @@ export class Space {
50
54
  id: json.id,
51
55
  isDefault: json.is_default,
52
56
  name: json.name,
57
+ slug: typeof json.slug === 'string' ? json.slug : json.name,
53
58
  teamId: json.team_id,
54
59
  teamName: json.team_name,
60
+ teamSlug: typeof json.team_slug === 'string' ? json.team_slug : json.team_name,
55
61
  });
56
62
  }
57
63
  /**
@@ -69,8 +75,10 @@ export class Space {
69
75
  id: this.id,
70
76
  isDefault: this.isDefault,
71
77
  name: this.name,
78
+ slug: this.slug,
72
79
  teamId: this.teamId,
73
80
  teamName: this.teamName,
81
+ teamSlug: this.teamSlug,
74
82
  };
75
83
  }
76
84
  }
@@ -10,6 +10,7 @@ interface TeamParams {
10
10
  isActive: boolean;
11
11
  isDefault: boolean;
12
12
  name: string;
13
+ slug: string;
13
14
  updatedAt: Date;
14
15
  }
15
16
  /**
@@ -25,6 +26,7 @@ export declare class Team {
25
26
  readonly isActive: boolean;
26
27
  readonly isDefault: boolean;
27
28
  readonly name: string;
29
+ readonly slug: string;
28
30
  readonly updatedAt: Date;
29
31
  constructor(params: TeamParams);
30
32
  /**
@@ -11,6 +11,7 @@ export class Team {
11
11
  isActive;
12
12
  isDefault;
13
13
  name;
14
+ slug;
14
15
  updatedAt;
15
16
  constructor(params) {
16
17
  if (params.id.trim().length === 0) {
@@ -30,6 +31,7 @@ export class Team {
30
31
  this.isActive = params.isActive;
31
32
  this.isDefault = params.isDefault;
32
33
  this.name = params.name;
34
+ this.slug = params.slug;
33
35
  this.updatedAt = params.updatedAt;
34
36
  }
35
37
  /**
@@ -67,6 +69,7 @@ export class Team {
67
69
  isActive: json.is_active,
68
70
  isDefault: json.is_default,
69
71
  name: json.name,
72
+ slug: typeof json.slug === 'string' ? json.slug : json.name,
70
73
  updatedAt: new Date(json.updated_at),
71
74
  });
72
75
  }
@@ -90,6 +93,7 @@ export class Team {
90
93
  isActive: this.isActive,
91
94
  isDefault: this.isDefault,
92
95
  name: this.name,
96
+ slug: this.slug,
93
97
  updatedAt: this.updatedAt.toISOString(),
94
98
  };
95
99
  }
@@ -2,9 +2,3 @@ export declare class AuthenticationError extends Error {
2
2
  readonly code?: string;
3
3
  constructor(message: string, code?: string);
4
4
  }
5
- export declare class TokenExpiredError extends Error {
6
- constructor(message?: string);
7
- }
8
- export declare class InvalidTokenError extends Error {
9
- constructor(message?: string);
10
- }
@@ -6,15 +6,3 @@ export class AuthenticationError extends Error {
6
6
  this.code = code;
7
7
  }
8
8
  }
9
- export class TokenExpiredError extends Error {
10
- constructor(message = 'Token has expired') {
11
- super(message);
12
- this.name = 'TokenExpiredError';
13
- }
14
- }
15
- export class InvalidTokenError extends Error {
16
- constructor(message = 'Token is invalid') {
17
- super(message);
18
- this.name = 'InvalidTokenError';
19
- }
20
- }
@@ -0,0 +1,6 @@
1
+ export declare class GitError extends Error {
2
+ constructor(message: string);
3
+ }
4
+ export declare class GitAuthError extends GitError {
5
+ constructor(message?: string);
6
+ }
@@ -0,0 +1,12 @@
1
+ export class GitError extends Error {
2
+ constructor(message) {
3
+ super(message);
4
+ this.name = 'GitError';
5
+ }
6
+ }
7
+ export class GitAuthError extends GitError {
8
+ constructor(message = 'Git authentication failed. Try /login again.') {
9
+ super(message);
10
+ this.name = 'GitAuthError';
11
+ }
12
+ }
@@ -21,6 +21,7 @@ export declare const TaskErrorCode: {
21
21
  readonly TASK_EXECUTION: "ERR_TASK_EXECUTION";
22
22
  readonly TASK_TIMEOUT: "ERR_TASK_TIMEOUT";
23
23
  readonly UNKNOWN: "ERR_UNKNOWN";
24
+ readonly VC_GIT_INITIALIZED: "ERR_VC_GIT_INITIALIZED";
24
25
  };
25
26
  export type TaskErrorCodeType = (typeof TaskErrorCode)[keyof typeof TaskErrorCode];
26
27
  /**
@@ -57,9 +58,6 @@ export declare class AgentNotAvailableError extends TaskError {
57
58
  export declare class AgentDisconnectedError extends TaskError {
58
59
  constructor();
59
60
  }
60
- export declare class AgentNotInitializedError extends TaskError {
61
- constructor(reason?: string);
62
- }
63
61
  export declare class NotAuthenticatedError extends TaskError {
64
62
  constructor();
65
63
  }
@@ -78,6 +76,9 @@ export declare class LocalChangesExistError extends TaskError {
78
76
  export declare class SpaceNotConfiguredError extends TaskError {
79
77
  constructor();
80
78
  }
79
+ export declare class GitVcInitializedError extends TaskError {
80
+ constructor(message: string);
81
+ }
81
82
  export declare class SpaceNotFoundError extends TaskError {
82
83
  constructor();
83
84
  }
@@ -28,6 +28,8 @@ export const TaskErrorCode = {
28
28
  TASK_TIMEOUT: 'ERR_TASK_TIMEOUT',
29
29
  // Unknown
30
30
  UNKNOWN: 'ERR_UNKNOWN',
31
+ // Version control
32
+ VC_GIT_INITIALIZED: 'ERR_VC_GIT_INITIALIZED',
31
33
  };
32
34
  /**
33
35
  * Base error class for task-related errors.
@@ -121,14 +123,6 @@ export class AgentDisconnectedError extends TaskError {
121
123
  this.name = 'AgentDisconnectedError';
122
124
  }
123
125
  }
124
- export class AgentNotInitializedError extends TaskError {
125
- constructor(reason) {
126
- super(reason
127
- ? `Agent failed to initialize: ${reason}`
128
- : "Agent failed to initialize. Run 'brv restart' to force a clean restart.", TaskErrorCode.AGENT_NOT_INITIALIZED);
129
- this.name = 'AgentNotInitializedError';
130
- }
131
- }
132
126
  export class NotAuthenticatedError extends TaskError {
133
127
  constructor() {
134
128
  super('Not authenticated. Cloud sync features (push/pull/space) require login — local query and curate work without authentication.', TaskErrorCode.NOT_AUTHENTICATED);
@@ -165,6 +159,12 @@ export class SpaceNotConfiguredError extends TaskError {
165
159
  this.name = 'SpaceNotConfiguredError';
166
160
  }
167
161
  }
162
+ export class GitVcInitializedError extends TaskError {
163
+ constructor(message) {
164
+ super(message, TaskErrorCode.VC_GIT_INITIALIZED);
165
+ this.name = 'GitVcInitializedError';
166
+ }
167
+ }
168
168
  export class SpaceNotFoundError extends TaskError {
169
169
  constructor() {
170
170
  super('Space not found', TaskErrorCode.SPACE_NOT_FOUND);
@@ -4,20 +4,6 @@
4
4
  export declare class TransportError extends Error {
5
5
  constructor(message: string);
6
6
  }
7
- /**
8
- * Error thrown when connection to server fails.
9
- */
10
- export declare class TransportConnectionError extends TransportError {
11
- readonly originalError?: Error;
12
- readonly url: string;
13
- constructor(url: string, originalError?: Error);
14
- }
15
- /**
16
- * Error thrown when client is not connected to server.
17
- */
18
- export declare class TransportNotConnectedError extends TransportError {
19
- constructor(operation?: string);
20
- }
21
7
  /**
22
8
  * Error thrown when server is not started.
23
9
  */
@@ -53,20 +39,3 @@ export declare class TransportRequestError extends TransportError {
53
39
  readonly event: string;
54
40
  constructor(event: string, message?: string);
55
41
  }
56
- /**
57
- * Error thrown when room operations fail.
58
- */
59
- export declare class TransportRoomError extends TransportError {
60
- readonly operation: 'join' | 'leave';
61
- readonly room: string;
62
- constructor(room: string, operation: 'join' | 'leave');
63
- }
64
- /**
65
- * Error thrown when room operation times out.
66
- */
67
- export declare class TransportRoomTimeoutError extends TransportError {
68
- readonly operation: 'join' | 'leave';
69
- readonly room: string;
70
- readonly timeoutMs: number;
71
- constructor(room: string, operation: 'join' | 'leave', timeoutMs: number);
72
- }