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.
- package/.env.production +8 -0
- package/LICENSE +44 -0
- package/README.md +240 -14
- package/bin/dev.js +8 -1
- package/bin/run.js +8 -1
- package/dist/agent/core/domain/knowledge/conflict-detector.d.ts +38 -0
- package/dist/agent/core/domain/knowledge/conflict-detector.js +71 -0
- package/dist/agent/core/domain/knowledge/conflict-resolver.d.ts +17 -0
- package/dist/agent/core/domain/knowledge/conflict-resolver.js +118 -0
- package/dist/agent/core/domain/knowledge/utils.d.ts +4 -0
- package/dist/agent/core/domain/knowledge/utils.js +6 -0
- package/dist/agent/core/interfaces/i-curate-service.d.ts +6 -0
- package/dist/agent/infra/tools/implementations/curate-tool.d.ts +67 -34
- package/dist/agent/infra/tools/implementations/curate-tool.js +294 -47
- package/dist/agent/resources/prompts/system-prompt.yml +15 -8
- package/dist/agent/resources/tools/code_exec.txt +3 -0
- package/dist/agent/resources/tools/curate.txt +12 -3
- package/dist/oclif/commands/connectors/install.d.ts +2 -1
- package/dist/oclif/commands/connectors/install.js +38 -3
- package/dist/oclif/commands/curate/index.d.ts +18 -0
- package/dist/oclif/commands/curate/index.js +78 -1
- package/dist/oclif/commands/init.d.ts +12 -0
- package/dist/oclif/commands/init.js +75 -0
- package/dist/oclif/commands/locations.js +1 -1
- package/dist/oclif/commands/providers/connect.d.ts +31 -1
- package/dist/oclif/commands/providers/connect.js +307 -27
- package/dist/oclif/commands/pull.d.ts +1 -0
- package/dist/oclif/commands/pull.js +7 -0
- package/dist/oclif/commands/push.d.ts +1 -0
- package/dist/oclif/commands/push.js +8 -0
- package/dist/oclif/commands/review/approve.d.ts +17 -0
- package/dist/oclif/commands/review/approve.js +37 -0
- package/dist/oclif/commands/review/base-review-decision.d.ts +18 -0
- package/dist/oclif/commands/review/base-review-decision.js +71 -0
- package/dist/oclif/commands/review/pending.d.ts +13 -0
- package/dist/oclif/commands/review/pending.js +94 -0
- package/dist/oclif/commands/review/reject.d.ts +17 -0
- package/dist/oclif/commands/review/reject.js +38 -0
- package/dist/oclif/commands/space/list.d.ts +2 -2
- package/dist/oclif/commands/space/list.js +13 -35
- package/dist/oclif/commands/space/switch.d.ts +2 -7
- package/dist/oclif/commands/space/switch.js +13 -56
- package/dist/oclif/commands/status.d.ts +1 -0
- package/dist/oclif/commands/status.js +11 -1
- package/dist/oclif/commands/vc/add.d.ts +7 -0
- package/dist/oclif/commands/vc/add.js +29 -0
- package/dist/oclif/commands/vc/branch.d.ts +15 -0
- package/dist/oclif/commands/vc/branch.js +70 -0
- package/dist/oclif/commands/vc/checkout.d.ts +14 -0
- package/dist/oclif/commands/vc/checkout.js +47 -0
- package/dist/oclif/commands/vc/clone.d.ts +9 -0
- package/dist/oclif/commands/vc/clone.js +61 -0
- package/dist/oclif/commands/vc/commit.d.ts +10 -0
- package/dist/oclif/commands/vc/commit.js +32 -0
- package/dist/oclif/commands/vc/config.d.ts +10 -0
- package/dist/oclif/commands/vc/config.js +30 -0
- package/dist/oclif/commands/vc/fetch.d.ts +10 -0
- package/dist/oclif/commands/vc/fetch.js +42 -0
- package/dist/oclif/commands/vc/index.d.ts +6 -0
- package/dist/oclif/commands/vc/index.js +8 -0
- package/dist/oclif/commands/vc/init.d.ts +6 -0
- package/dist/oclif/commands/vc/init.js +25 -0
- package/dist/oclif/commands/vc/log.d.ts +13 -0
- package/dist/oclif/commands/vc/log.js +48 -0
- package/dist/oclif/commands/vc/merge.d.ts +19 -0
- package/dist/oclif/commands/vc/merge.js +130 -0
- package/dist/oclif/commands/vc/pull.d.ts +13 -0
- package/dist/oclif/commands/vc/pull.js +60 -0
- package/dist/oclif/commands/vc/push.d.ts +13 -0
- package/dist/oclif/commands/vc/push.js +60 -0
- package/dist/oclif/commands/vc/remote/add.d.ts +10 -0
- package/dist/oclif/commands/vc/remote/add.js +30 -0
- package/dist/oclif/commands/vc/remote/index.d.ts +6 -0
- package/dist/oclif/commands/vc/remote/index.js +16 -0
- package/dist/oclif/commands/vc/remote/set-url.d.ts +10 -0
- package/dist/oclif/commands/vc/remote/set-url.js +30 -0
- package/dist/oclif/commands/vc/reset.d.ts +13 -0
- package/dist/oclif/commands/vc/reset.js +62 -0
- package/dist/oclif/commands/vc/status.d.ts +8 -0
- package/dist/oclif/commands/vc/status.js +106 -0
- package/dist/oclif/hooks/init/validate-brv-config.d.ts +26 -0
- package/dist/oclif/hooks/init/validate-brv-config.js +62 -0
- package/dist/oclif/lib/daemon-client.d.ts +2 -0
- package/dist/oclif/lib/daemon-client.js +36 -10
- package/dist/oclif/lib/prompt-utils.d.ts +43 -0
- package/dist/oclif/lib/prompt-utils.js +84 -0
- package/dist/oclif/lib/spinner.d.ts +8 -0
- package/dist/oclif/lib/spinner.js +23 -0
- package/dist/oclif/lib/task-client.d.ts +5 -0
- package/dist/oclif/lib/task-client.js +15 -2
- package/dist/server/config/environment.d.ts +2 -19
- package/dist/server/config/environment.js +31 -38
- package/dist/server/constants.d.ts +3 -9
- package/dist/server/constants.js +9 -12
- package/dist/server/core/domain/entities/auth-token.d.ts +2 -0
- package/dist/server/core/domain/entities/auth-token.js +7 -1
- package/dist/server/core/domain/entities/curate-log-entry.d.ts +11 -0
- package/dist/server/core/domain/entities/space.d.ts +4 -0
- package/dist/server/core/domain/entities/space.js +8 -0
- package/dist/server/core/domain/entities/team.d.ts +2 -0
- package/dist/server/core/domain/entities/team.js +4 -0
- package/dist/server/core/domain/errors/auth-error.d.ts +0 -6
- package/dist/server/core/domain/errors/auth-error.js +0 -12
- package/dist/server/core/domain/errors/git-error.d.ts +6 -0
- package/dist/server/core/domain/errors/git-error.js +12 -0
- package/dist/server/core/domain/errors/task-error.d.ts +4 -3
- package/dist/server/core/domain/errors/task-error.js +8 -8
- package/dist/server/core/domain/errors/transport-error.d.ts +0 -31
- package/dist/server/core/domain/errors/transport-error.js +0 -50
- package/dist/server/core/domain/errors/vc-error.d.ts +5 -0
- package/dist/server/core/domain/errors/vc-error.js +8 -0
- package/dist/server/core/domain/knowledge/markdown-writer.d.ts +4 -1
- package/dist/server/core/domain/knowledge/markdown-writer.js +37 -7
- package/dist/server/core/domain/transport/schemas.d.ts +6 -6
- package/dist/server/core/interfaces/context-tree/i-context-tree-service.d.ts +11 -0
- package/dist/server/core/interfaces/process/i-task-lifecycle-hook.d.ts +6 -0
- package/dist/server/core/interfaces/services/i-git-service.d.ts +234 -0
- package/dist/server/core/interfaces/storage/i-curate-log-store.d.ts +5 -0
- package/dist/server/core/interfaces/storage/i-review-backup-store.d.ts +19 -0
- package/dist/server/core/interfaces/vc/i-vc-git-config-store.d.ts +8 -0
- package/dist/server/infra/config/auto-init.d.ts +0 -2
- package/dist/server/infra/config/auto-init.js +0 -1
- package/dist/server/infra/connectors/rules/rules-connector-config.d.ts +0 -4
- package/dist/server/infra/context-tree/file-context-tree-service.d.ts +2 -0
- package/dist/server/infra/context-tree/file-context-tree-service.js +13 -0
- package/dist/server/infra/daemon/brv-server.js +23 -3
- package/dist/server/infra/git/cogit-url.d.ts +17 -0
- package/dist/server/infra/git/cogit-url.js +39 -0
- package/dist/server/infra/git/git-http-wrapper.d.ts +20 -0
- package/dist/server/infra/git/git-http-wrapper.js +334 -0
- package/dist/server/infra/git/isomorphic-git-service.d.ts +78 -0
- package/dist/server/infra/git/isomorphic-git-service.js +983 -0
- package/dist/server/infra/http/models-dev-client.d.ts +0 -4
- package/dist/server/infra/http/models-dev-client.js +0 -6
- package/dist/server/infra/http/openrouter-api-client.d.ts +0 -8
- package/dist/server/infra/http/openrouter-api-client.js +0 -13
- package/dist/server/infra/http/provider-model-fetcher-registry.d.ts +0 -5
- package/dist/server/infra/http/provider-model-fetcher-registry.js +0 -7
- package/dist/server/infra/http/review-api-handler.d.ts +13 -0
- package/dist/server/infra/http/review-api-handler.js +286 -0
- package/dist/server/infra/http/review-ui.d.ts +7 -0
- package/dist/server/infra/http/review-ui.js +606 -0
- package/dist/server/infra/mcp/tools/brv-curate-tool.d.ts +2 -2
- package/dist/server/infra/process/curate-log-handler.d.ts +18 -2
- package/dist/server/infra/process/curate-log-handler.js +50 -13
- package/dist/server/infra/process/feature-handlers.js +41 -1
- package/dist/server/infra/process/task-router.js +16 -0
- package/dist/server/infra/provider/env-provider-detector.d.ts +0 -20
- package/dist/server/infra/provider/env-provider-detector.js +0 -27
- package/dist/server/infra/space/http-space-service.js +2 -0
- package/dist/server/infra/storage/file-curate-log-store.d.ts +10 -0
- package/dist/server/infra/storage/file-curate-log-store.js +35 -0
- package/dist/server/infra/storage/file-provider-config-store.d.ts +0 -4
- package/dist/server/infra/storage/file-provider-config-store.js +0 -6
- package/dist/server/infra/storage/file-review-backup-store.d.ts +29 -0
- package/dist/server/infra/storage/file-review-backup-store.js +121 -0
- package/dist/server/infra/transport/handlers/auth-handler.js +9 -5
- package/dist/server/infra/transport/handlers/handler-types.d.ts +9 -0
- package/dist/server/infra/transport/handlers/handler-types.js +11 -0
- package/dist/server/infra/transport/handlers/index.d.ts +4 -0
- package/dist/server/infra/transport/handlers/index.js +2 -0
- package/dist/server/infra/transport/handlers/init-handler.d.ts +1 -0
- package/dist/server/infra/transport/handlers/init-handler.js +13 -1
- package/dist/server/infra/transport/handlers/pull-handler.d.ts +3 -0
- package/dist/server/infra/transport/handlers/pull-handler.js +5 -1
- package/dist/server/infra/transport/handlers/push-handler.d.ts +20 -0
- package/dist/server/infra/transport/handlers/push-handler.js +116 -14
- package/dist/server/infra/transport/handlers/reset-handler.d.ts +11 -0
- package/dist/server/infra/transport/handlers/reset-handler.js +37 -1
- package/dist/server/infra/transport/handlers/review-handler.d.ts +35 -0
- package/dist/server/infra/transport/handlers/review-handler.js +162 -0
- package/dist/server/infra/transport/handlers/space-handler.d.ts +3 -0
- package/dist/server/infra/transport/handlers/space-handler.js +4 -1
- package/dist/server/infra/transport/handlers/status-handler.d.ts +5 -0
- package/dist/server/infra/transport/handlers/status-handler.js +51 -16
- package/dist/server/infra/transport/handlers/vc-handler.d.ts +100 -0
- package/dist/server/infra/transport/handlers/vc-handler.js +1050 -0
- package/dist/server/infra/transport/socket-io-transport-server.d.ts +7 -0
- package/dist/server/infra/transport/socket-io-transport-server.js +12 -1
- package/dist/server/infra/transport/transport-connector.d.ts +1 -1
- package/dist/server/infra/transport/transport-connector.js +2 -1
- package/dist/server/infra/vc/file-vc-git-config-store.d.ts +11 -0
- package/dist/server/infra/vc/file-vc-git-config-store.js +43 -0
- package/dist/server/templates/skill/SKILL.md +167 -33
- package/dist/server/utils/curate-result-parser.d.ts +64 -0
- package/dist/server/utils/curate-result-parser.js +8 -0
- package/dist/server/utils/file-content-reader.d.ts +2 -1
- package/dist/server/utils/file-helpers.d.ts +0 -24
- package/dist/server/utils/file-helpers.js +0 -81
- package/dist/server/utils/gitignore.d.ts +9 -0
- package/dist/server/utils/gitignore.js +47 -0
- package/dist/server/utils/process-logger.d.ts +0 -13
- package/dist/server/utils/process-logger.js +1 -78
- package/dist/shared/transport/events/index.d.ts +6 -0
- package/dist/shared/transport/events/index.js +3 -0
- package/dist/shared/transport/events/init-events.d.ts +8 -0
- package/dist/shared/transport/events/init-events.js +1 -0
- package/dist/shared/transport/events/push-events.d.ts +6 -0
- package/dist/shared/transport/events/review-events.d.ts +41 -0
- package/dist/shared/transport/events/review-events.js +5 -0
- package/dist/shared/transport/events/vc-events.d.ts +257 -0
- package/dist/shared/transport/events/vc-events.js +67 -0
- package/dist/shared/transport/types/dto.d.ts +6 -1
- package/dist/tui/app/pages/init-project-page.d.ts +9 -0
- package/dist/tui/app/pages/init-project-page.js +54 -0
- package/dist/tui/app/pages/protected-routes.js +14 -6
- package/dist/tui/components/index.d.ts +0 -2
- package/dist/tui/components/index.js +0 -1
- package/dist/tui/features/activity/hooks/use-activity-logs.js +7 -1
- package/dist/tui/features/commands/definitions/index.js +3 -0
- package/dist/tui/features/commands/definitions/space-list.js +9 -18
- package/dist/tui/features/commands/definitions/space-switch.js +10 -6
- package/dist/tui/features/commands/definitions/vc-add.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-add.js +15 -0
- package/dist/tui/features/commands/definitions/vc-branch.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-branch.js +33 -0
- package/dist/tui/features/commands/definitions/vc-checkout.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-checkout.js +32 -0
- package/dist/tui/features/commands/definitions/vc-clone.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-clone.js +18 -0
- package/dist/tui/features/commands/definitions/vc-commit.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-commit.js +32 -0
- package/dist/tui/features/commands/definitions/vc-config.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-config.js +40 -0
- package/dist/tui/features/commands/definitions/vc-fetch.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-fetch.js +37 -0
- package/dist/tui/features/commands/definitions/vc-init.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-init.js +11 -0
- package/dist/tui/features/commands/definitions/vc-log.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-log.js +25 -0
- package/dist/tui/features/commands/definitions/vc-merge.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-merge.js +48 -0
- package/dist/tui/features/commands/definitions/vc-pull.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-pull.js +42 -0
- package/dist/tui/features/commands/definitions/vc-push.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-push.js +38 -0
- package/dist/tui/features/commands/definitions/vc-remote.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-remote.js +57 -0
- package/dist/tui/features/commands/definitions/vc-reset.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-reset.js +35 -0
- package/dist/tui/features/commands/definitions/vc-status.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc-status.js +11 -0
- package/dist/tui/features/commands/definitions/vc.d.ts +2 -0
- package/dist/tui/features/commands/definitions/vc.js +36 -0
- package/dist/tui/features/commands/hooks/use-slash-command-processor.js +5 -5
- package/dist/tui/features/log/api/execute-log.d.ts +8 -0
- package/dist/tui/features/log/api/execute-log.js +13 -0
- package/dist/tui/features/log/components/log-flow.d.ts +14 -0
- package/dist/tui/features/log/components/log-flow.js +29 -0
- package/dist/tui/features/log/utils/format-log.d.ts +3 -0
- package/dist/tui/features/log/utils/format-log.js +42 -0
- package/dist/tui/features/onboarding/hooks/use-app-view-mode.d.ts +9 -5
- package/dist/tui/features/onboarding/hooks/use-app-view-mode.js +12 -5
- package/dist/tui/features/push/components/push-flow.js +9 -2
- package/dist/tui/features/reset/components/reset-flow.js +2 -1
- package/dist/tui/features/status/components/status-view.js +2 -1
- package/dist/tui/features/status/utils/format-status.js +9 -0
- package/dist/tui/features/tasks/hooks/use-task-subscriptions.js +11 -0
- package/dist/tui/features/tasks/stores/tasks-store.d.ts +10 -0
- package/dist/tui/features/tasks/stores/tasks-store.js +16 -0
- package/dist/tui/features/vc/add/api/execute-vc-add.d.ts +8 -0
- package/dist/tui/features/vc/add/api/execute-vc-add.js +13 -0
- package/dist/tui/features/vc/add/components/vc-add-flow.d.ts +7 -0
- package/dist/tui/features/vc/add/components/vc-add-flow.js +35 -0
- package/dist/tui/features/vc/branch/api/execute-vc-branch.d.ts +8 -0
- package/dist/tui/features/vc/branch/api/execute-vc-branch.js +13 -0
- package/dist/tui/features/vc/branch/components/vc-branch-flow.d.ts +8 -0
- package/dist/tui/features/vc/branch/components/vc-branch-flow.js +53 -0
- package/dist/tui/features/vc/branch/utils/format-branch.d.ts +4 -0
- package/dist/tui/features/vc/branch/utils/format-branch.js +12 -0
- package/dist/tui/features/vc/checkout/api/execute-vc-checkout.d.ts +8 -0
- package/dist/tui/features/vc/checkout/api/execute-vc-checkout.js +13 -0
- package/dist/tui/features/vc/checkout/components/vc-checkout-flow.d.ts +8 -0
- package/dist/tui/features/vc/checkout/components/vc-checkout-flow.js +33 -0
- package/dist/tui/features/vc/clone/api/execute-vc-clone.d.ts +8 -0
- package/dist/tui/features/vc/clone/api/execute-vc-clone.js +13 -0
- package/dist/tui/features/vc/clone/components/vc-clone-flow.d.ts +7 -0
- package/dist/tui/features/vc/clone/components/vc-clone-flow.js +79 -0
- package/dist/tui/features/vc/commit/api/execute-vc-commit.d.ts +8 -0
- package/dist/tui/features/vc/commit/api/execute-vc-commit.js +13 -0
- package/dist/tui/features/vc/commit/components/vc-commit-flow.d.ts +7 -0
- package/dist/tui/features/vc/commit/components/vc-commit-flow.js +29 -0
- package/dist/tui/features/vc/config/api/execute-vc-config.d.ts +8 -0
- package/dist/tui/features/vc/config/api/execute-vc-config.js +13 -0
- package/dist/tui/features/vc/config/components/vc-config-flow.d.ts +9 -0
- package/dist/tui/features/vc/config/components/vc-config-flow.js +30 -0
- package/dist/tui/features/vc/fetch/api/execute-vc-fetch.d.ts +8 -0
- package/dist/tui/features/vc/fetch/api/execute-vc-fetch.js +13 -0
- package/dist/tui/features/vc/fetch/components/vc-fetch-flow.d.ts +8 -0
- package/dist/tui/features/vc/fetch/components/vc-fetch-flow.js +75 -0
- package/dist/tui/features/vc/init/api/execute-vc-init.d.ts +8 -0
- package/dist/tui/features/vc/init/api/execute-vc-init.js +13 -0
- package/dist/tui/features/vc/init/components/vc-init-flow.d.ts +10 -0
- package/dist/tui/features/vc/init/components/vc-init-flow.js +37 -0
- package/dist/tui/features/vc/merge/api/execute-vc-merge.d.ts +8 -0
- package/dist/tui/features/vc/merge/api/execute-vc-merge.js +13 -0
- package/dist/tui/features/vc/merge/components/vc-merge-flow.d.ts +11 -0
- package/dist/tui/features/vc/merge/components/vc-merge-flow.js +72 -0
- package/dist/tui/features/vc/pull/api/execute-vc-pull.d.ts +8 -0
- package/dist/tui/features/vc/pull/api/execute-vc-pull.js +13 -0
- package/dist/tui/features/vc/pull/components/vc-pull-flow.d.ts +9 -0
- package/dist/tui/features/vc/pull/components/vc-pull-flow.js +83 -0
- package/dist/tui/features/vc/push/api/execute-vc-push.d.ts +8 -0
- package/dist/tui/features/vc/push/api/execute-vc-push.js +13 -0
- package/dist/tui/features/vc/push/components/vc-push-flow.d.ts +8 -0
- package/dist/tui/features/vc/push/components/vc-push-flow.js +83 -0
- package/dist/tui/features/vc/remote/api/execute-vc-remote.d.ts +8 -0
- package/dist/tui/features/vc/remote/api/execute-vc-remote.js +13 -0
- package/dist/tui/features/vc/remote/components/vc-remote-flow.d.ts +9 -0
- package/dist/tui/features/vc/remote/components/vc-remote-flow.js +42 -0
- package/dist/tui/features/vc/reset/api/execute-vc-reset.d.ts +8 -0
- package/dist/tui/features/vc/reset/api/execute-vc-reset.js +13 -0
- package/dist/tui/features/vc/reset/components/vc-reset-flow.d.ts +10 -0
- package/dist/tui/features/vc/reset/components/vc-reset-flow.js +63 -0
- package/dist/tui/features/vc/status/api/execute-vc-status.d.ts +8 -0
- package/dist/tui/features/vc/status/api/execute-vc-status.js +13 -0
- package/dist/tui/features/vc/status/components/vc-status-flow.d.ts +10 -0
- package/dist/tui/features/vc/status/components/vc-status-flow.js +133 -0
- package/dist/tui/lib/environment.d.ts +8 -0
- package/dist/tui/lib/environment.js +8 -0
- package/dist/tui/utils/error-messages.d.ts +5 -1
- package/dist/tui/utils/error-messages.js +32 -3
- package/node_modules/@campfirein/brv-transport-client/LICENSE +95 -0
- package/node_modules/@campfirein/brv-transport-client/README.md +3 -4
- package/node_modules/@campfirein/brv-transport-client/package.json +2 -2
- package/oclif.manifest.json +985 -65
- package/package.json +13 -5
- package/dist/oclif/hooks/prerun/validate-brv-config-version.d.ts +0 -33
- package/dist/oclif/hooks/prerun/validate-brv-config-version.js +0 -86
- package/dist/server/core/domain/entities/bullet.d.ts +0 -51
- package/dist/server/core/domain/entities/bullet.js +0 -94
- package/dist/server/core/domain/entities/memory.d.ts +0 -55
- package/dist/server/core/domain/entities/memory.js +0 -90
- package/dist/server/core/domain/entities/playbook.d.ts +0 -80
- package/dist/server/core/domain/entities/playbook.js +0 -214
- package/dist/server/core/domain/entities/presigned-url.d.ts +0 -9
- package/dist/server/core/domain/entities/presigned-url.js +0 -18
- package/dist/server/core/domain/entities/presigned-urls-response.d.ts +0 -10
- package/dist/server/core/domain/entities/presigned-urls-response.js +0 -18
- package/dist/server/core/domain/entities/retrieve-result.d.ts +0 -35
- package/dist/server/core/domain/entities/retrieve-result.js +0 -35
- package/dist/server/core/domain/errors/headless-prompt-error.d.ts +0 -11
- package/dist/server/core/domain/errors/headless-prompt-error.js +0 -18
- package/dist/server/core/interfaces/services/i-legacy-rule-detector.d.ts +0 -56
- package/dist/server/core/interfaces/services/i-memory-retrieval-service.d.ts +0 -39
- package/dist/server/core/interfaces/services/i-memory-storage-service.d.ts +0 -53
- package/dist/server/core/interfaces/services/i-terminal.d.ts +0 -146
- package/dist/server/core/interfaces/services/i-terminal.js +0 -1
- package/dist/server/core/interfaces/services/i-workspace-detector-service.d.ts +0 -8
- package/dist/server/core/interfaces/services/i-workspace-detector-service.js +0 -1
- package/dist/server/core/interfaces/storage/i-onboarding-preference-store.d.ts +0 -20
- package/dist/server/core/interfaces/storage/i-onboarding-preference-store.js +0 -1
- package/dist/server/infra/connectors/rules/legacy-rule-detector.d.ts +0 -21
- package/dist/server/infra/connectors/rules/legacy-rule-detector.js +0 -106
- package/dist/server/infra/memory/http-memory-retrieval-service.d.ts +0 -18
- package/dist/server/infra/memory/http-memory-retrieval-service.js +0 -64
- package/dist/server/infra/memory/http-memory-storage-service.d.ts +0 -18
- package/dist/server/infra/memory/http-memory-storage-service.js +0 -72
- package/dist/server/infra/memory/memory-to-playbook-mapper.d.ts +0 -33
- package/dist/server/infra/memory/memory-to-playbook-mapper.js +0 -51
- package/dist/server/infra/storage/file-onboarding-preference-store.d.ts +0 -10
- package/dist/server/infra/storage/file-onboarding-preference-store.js +0 -45
- package/dist/server/infra/terminal/headless-terminal.d.ts +0 -91
- package/dist/server/infra/terminal/headless-terminal.js +0 -211
- package/dist/server/infra/workspace/workspace-detector-service.d.ts +0 -57
- package/dist/server/infra/workspace/workspace-detector-service.js +0 -165
- package/dist/server/utils/crash-log.d.ts +0 -14
- package/dist/server/utils/crash-log.js +0 -19
- package/dist/server/utils/emoji-helpers.d.ts +0 -38
- package/dist/server/utils/emoji-helpers.js +0 -42
- package/dist/server/utils/error-handler.d.ts +0 -51
- package/dist/server/utils/error-handler.js +0 -169
- package/dist/server/utils/oclif-error-helpers.d.ts +0 -40
- package/dist/server/utils/oclif-error-helpers.js +0 -46
- package/dist/server/utils/tool-display-formatter.d.ts +0 -53
- package/dist/server/utils/tool-display-formatter.js +0 -257
- package/dist/tui/components/init.d.ts +0 -33
- package/dist/tui/components/init.js +0 -234
- package/dist/tui/features/space/api/get-spaces.d.ts +0 -16
- package/dist/tui/features/space/api/get-spaces.js +0 -17
- package/dist/tui/features/space/api/switch-space.d.ts +0 -11
- package/dist/tui/features/space/api/switch-space.js +0 -24
- package/dist/tui/features/space/components/space-list-view.d.ts +0 -12
- package/dist/tui/features/space/components/space-list-view.js +0 -56
- package/dist/tui/features/space/components/space-switch-flow.d.ts +0 -13
- package/dist/tui/features/space/components/space-switch-flow.js +0 -97
- /package/dist/server/core/interfaces/services/{i-legacy-rule-detector.js → i-git-service.js} +0 -0
- /package/dist/server/core/interfaces/{services/i-memory-retrieval-service.js → storage/i-review-backup-store.js} +0 -0
- /package/dist/server/core/interfaces/{services/i-memory-storage-service.js → vc/i-vc-git-config-store.js} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appends ByteRover gitignore entries to the project's .gitignore.
|
|
3
|
+
*
|
|
4
|
+
* Only acts when the project is a git repo (.git/ exists).
|
|
5
|
+
* Idempotent: skips if entries are already present.
|
|
6
|
+
* Best-effort: failures are silently ignored since gitignore
|
|
7
|
+
* is a convenience feature that should never block the caller.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ensureGitignoreEntries(directory: string): Promise<void>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { access, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
const GITIGNORE_ENTRIES = `# ByteRover — .brv/context-tree/ contains a nested .git managed by brv vc.
|
|
4
|
+
# Without these entries, \`git add .\` fails with "does not have a commit checked out".
|
|
5
|
+
.brv/
|
|
6
|
+
`;
|
|
7
|
+
/**
|
|
8
|
+
* Appends ByteRover gitignore entries to the project's .gitignore.
|
|
9
|
+
*
|
|
10
|
+
* Only acts when the project is a git repo (.git/ exists).
|
|
11
|
+
* Idempotent: skips if entries are already present.
|
|
12
|
+
* Best-effort: failures are silently ignored since gitignore
|
|
13
|
+
* is a convenience feature that should never block the caller.
|
|
14
|
+
*/
|
|
15
|
+
export async function ensureGitignoreEntries(directory) {
|
|
16
|
+
try {
|
|
17
|
+
const dir = directory;
|
|
18
|
+
// Only add entries in git repositories
|
|
19
|
+
await access(join(dir, '.git'));
|
|
20
|
+
const gitignorePath = join(dir, '.gitignore');
|
|
21
|
+
let existing = '';
|
|
22
|
+
try {
|
|
23
|
+
existing = await readFile(gitignorePath, 'utf8');
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
// .gitignore doesn't exist yet — will create it
|
|
27
|
+
}
|
|
28
|
+
// Idempotent: skip if already present
|
|
29
|
+
if (existing.includes('.brv/'))
|
|
30
|
+
return;
|
|
31
|
+
// Ensure a blank line separates existing content from new entries
|
|
32
|
+
let content;
|
|
33
|
+
if (existing.length === 0) {
|
|
34
|
+
content = GITIGNORE_ENTRIES;
|
|
35
|
+
}
|
|
36
|
+
else if (existing.endsWith('\n')) {
|
|
37
|
+
content = existing + '\n' + GITIGNORE_ENTRIES;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
content = existing + '\n\n' + GITIGNORE_ENTRIES;
|
|
41
|
+
}
|
|
42
|
+
await writeFile(gitignorePath, content, 'utf8');
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// Best-effort — gitignore failure should not block the caller
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -8,11 +8,6 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Each session creates a new log file with timestamp.
|
|
10
10
|
*/
|
|
11
|
-
/**
|
|
12
|
-
* Initialize session log - creates a new log file for this session.
|
|
13
|
-
* Should be called once when the main process starts.
|
|
14
|
-
*/
|
|
15
|
-
export declare function initSessionLog(): void;
|
|
16
11
|
/**
|
|
17
12
|
* Write a log entry to the log file.
|
|
18
13
|
* Uses synchronous append for reliability in process shutdown scenarios.
|
|
@@ -26,18 +21,10 @@ export declare function transportLog(message: string): void;
|
|
|
26
21
|
* Log with [Agent] prefix.
|
|
27
22
|
*/
|
|
28
23
|
export declare function agentLog(message: string): void;
|
|
29
|
-
/**
|
|
30
|
-
* Log with [ProcessManager] prefix.
|
|
31
|
-
*/
|
|
32
|
-
export declare function processManagerLog(message: string): void;
|
|
33
24
|
/**
|
|
34
25
|
* Log a transport event (for TUI monitoring).
|
|
35
26
|
*/
|
|
36
27
|
export declare function eventLog(eventName: string, data?: unknown): void;
|
|
37
|
-
/**
|
|
38
|
-
* Log an error with full details.
|
|
39
|
-
*/
|
|
40
|
-
export declare function errorLog(error: Error | string, context?: string): void;
|
|
41
28
|
/**
|
|
42
29
|
* Log a crash with full environment details.
|
|
43
30
|
* Everything goes to the session log file.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Each session creates a new log file with timestamp.
|
|
10
10
|
*/
|
|
11
|
-
import { appendFileSync, existsSync, mkdirSync
|
|
11
|
+
import { appendFileSync, existsSync, mkdirSync } from 'node:fs';
|
|
12
12
|
import { join } from 'node:path';
|
|
13
13
|
import { getGlobalLogsDir } from './global-logs-path.js';
|
|
14
14
|
/** Current session's log file path (set on init) */
|
|
@@ -35,34 +35,6 @@ function ensureLogDir() {
|
|
|
35
35
|
// Logging will fail gracefully later when trying to write
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
/** Max age for log files in milliseconds (30 days) */
|
|
39
|
-
const LOG_MAX_AGE_MS = 30 * 24 * 60 * 60 * 1000;
|
|
40
|
-
/**
|
|
41
|
-
* Clean up log files older than 30 days.
|
|
42
|
-
* Runs silently - errors are ignored to not affect the main process.
|
|
43
|
-
*/
|
|
44
|
-
function cleanupOldLogs() {
|
|
45
|
-
try {
|
|
46
|
-
const logsDir = getLogsDir();
|
|
47
|
-
if (!existsSync(logsDir))
|
|
48
|
-
return;
|
|
49
|
-
const now = Date.now();
|
|
50
|
-
const files = readdirSync(logsDir);
|
|
51
|
-
for (const file of files) {
|
|
52
|
-
if (!file.endsWith('.log'))
|
|
53
|
-
continue;
|
|
54
|
-
const filePath = join(logsDir, file);
|
|
55
|
-
const stats = statSync(filePath);
|
|
56
|
-
const age = now - stats.mtimeMs;
|
|
57
|
-
if (age > LOG_MAX_AGE_MS) {
|
|
58
|
-
unlinkSync(filePath);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
63
|
-
// Silently ignore - don't crash the process
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
38
|
/**
|
|
67
39
|
* Format timestamp for log entries.
|
|
68
40
|
*/
|
|
@@ -104,32 +76,6 @@ function getLogPath() {
|
|
|
104
76
|
}
|
|
105
77
|
return sessionLogPath;
|
|
106
78
|
}
|
|
107
|
-
/**
|
|
108
|
-
* Initialize session log - creates a new log file for this session.
|
|
109
|
-
* Should be called once when the main process starts.
|
|
110
|
-
*/
|
|
111
|
-
export function initSessionLog() {
|
|
112
|
-
if (sessionLogPath)
|
|
113
|
-
return;
|
|
114
|
-
try {
|
|
115
|
-
ensureLogDir();
|
|
116
|
-
cleanupOldLogs();
|
|
117
|
-
sessionLogPath = join(getLogsDir(), generateSessionLogFilename());
|
|
118
|
-
const timestamp = formatTimestamp();
|
|
119
|
-
const header = [
|
|
120
|
-
'='.repeat(70),
|
|
121
|
-
`BRV Session Log - Started: ${timestamp}`,
|
|
122
|
-
`CWD: ${process.cwd()}`,
|
|
123
|
-
`Node: ${process.version} | Platform: ${process.platform} | PID: ${process.pid}`,
|
|
124
|
-
'='.repeat(70),
|
|
125
|
-
'',
|
|
126
|
-
].join('\n');
|
|
127
|
-
writeFileSync(sessionLogPath, header);
|
|
128
|
-
}
|
|
129
|
-
catch {
|
|
130
|
-
// Silently ignore - don't crash the process
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
79
|
/**
|
|
134
80
|
* Write a log entry to the log file.
|
|
135
81
|
* Uses synchronous append for reliability in process shutdown scenarios.
|
|
@@ -157,12 +103,6 @@ export function transportLog(message) {
|
|
|
157
103
|
export function agentLog(message) {
|
|
158
104
|
processLog(`[Agent] ${message}`);
|
|
159
105
|
}
|
|
160
|
-
/**
|
|
161
|
-
* Log with [ProcessManager] prefix.
|
|
162
|
-
*/
|
|
163
|
-
export function processManagerLog(message) {
|
|
164
|
-
processLog(`[ProcessManager] ${message}`);
|
|
165
|
-
}
|
|
166
106
|
/**
|
|
167
107
|
* Log a transport event (for TUI monitoring).
|
|
168
108
|
*/
|
|
@@ -170,23 +110,6 @@ export function eventLog(eventName, data) {
|
|
|
170
110
|
const dataStr = data ? ` ${JSON.stringify(data)}` : '';
|
|
171
111
|
processLog(`[Event] ${eventName}${dataStr}`);
|
|
172
112
|
}
|
|
173
|
-
/**
|
|
174
|
-
* Log an error with full details.
|
|
175
|
-
*/
|
|
176
|
-
export function errorLog(error, context) {
|
|
177
|
-
const errorMessage = error instanceof Error ? error.message : error;
|
|
178
|
-
const errorStack = error instanceof Error ? error.stack : undefined;
|
|
179
|
-
const contextStr = context ? ` (${context})` : '';
|
|
180
|
-
processLog(`[ERROR]${contextStr} ${errorMessage}`);
|
|
181
|
-
if (errorStack) {
|
|
182
|
-
const indentedStack = errorStack
|
|
183
|
-
.split('\n')
|
|
184
|
-
.slice(1)
|
|
185
|
-
.map((line) => ` ${line}`)
|
|
186
|
-
.join('\n');
|
|
187
|
-
processLog(indentedStack);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
113
|
/**
|
|
191
114
|
* Log a crash with full environment details.
|
|
192
115
|
* Everything goes to the session log file.
|
|
@@ -13,6 +13,7 @@ export * from './provider-events.js';
|
|
|
13
13
|
export * from './pull-events.js';
|
|
14
14
|
export * from './push-events.js';
|
|
15
15
|
export * from './reset-events.js';
|
|
16
|
+
export * from './review-events.js';
|
|
16
17
|
export * from './session-events.js';
|
|
17
18
|
export * from './space-events.js';
|
|
18
19
|
export * from './status-events.js';
|
|
@@ -64,6 +65,7 @@ export declare const AllEventGroups: readonly [{
|
|
|
64
65
|
readonly GET_AGENTS: "init:getAgents";
|
|
65
66
|
readonly GET_SPACES: "init:getSpaces";
|
|
66
67
|
readonly GET_TEAMS: "init:getTeams";
|
|
68
|
+
readonly LOCAL: "init:local";
|
|
67
69
|
readonly PROGRESS: "init:progress";
|
|
68
70
|
}, {
|
|
69
71
|
readonly CHUNK: "llmservice:chunk";
|
|
@@ -107,6 +109,10 @@ export declare const AllEventGroups: readonly [{
|
|
|
107
109
|
readonly PROGRESS: "push:progress";
|
|
108
110
|
}, {
|
|
109
111
|
readonly EXECUTE: "reset:execute";
|
|
112
|
+
}, {
|
|
113
|
+
readonly DECIDE_TASK: "review:decideTask";
|
|
114
|
+
readonly NOTIFY: "review:notify";
|
|
115
|
+
readonly PENDING: "review:pending";
|
|
110
116
|
}, {
|
|
111
117
|
readonly SWITCHED: "session:switched";
|
|
112
118
|
}, {
|
|
@@ -15,6 +15,7 @@ export * from './provider-events.js';
|
|
|
15
15
|
export * from './pull-events.js';
|
|
16
16
|
export * from './push-events.js';
|
|
17
17
|
export * from './reset-events.js';
|
|
18
|
+
export * from './review-events.js';
|
|
18
19
|
export * from './session-events.js';
|
|
19
20
|
export * from './space-events.js';
|
|
20
21
|
export * from './status-events.js';
|
|
@@ -34,6 +35,7 @@ import { ProviderEvents } from './provider-events.js';
|
|
|
34
35
|
import { PullEvents } from './pull-events.js';
|
|
35
36
|
import { PushEvents } from './push-events.js';
|
|
36
37
|
import { ResetEvents } from './reset-events.js';
|
|
38
|
+
import { ReviewEvents } from './review-events.js';
|
|
37
39
|
import { SessionEvents } from './session-events.js';
|
|
38
40
|
import { SpaceEvents } from './space-events.js';
|
|
39
41
|
import { StatusEvents } from './status-events.js';
|
|
@@ -56,6 +58,7 @@ export const AllEventGroups = [
|
|
|
56
58
|
PullEvents,
|
|
57
59
|
PushEvents,
|
|
58
60
|
ResetEvents,
|
|
61
|
+
ReviewEvents,
|
|
59
62
|
SessionEvents,
|
|
60
63
|
LocationsEvents,
|
|
61
64
|
SpaceEvents,
|
|
@@ -7,6 +7,7 @@ export declare const InitEvents: {
|
|
|
7
7
|
readonly GET_AGENTS: "init:getAgents";
|
|
8
8
|
readonly GET_SPACES: "init:getSpaces";
|
|
9
9
|
readonly GET_TEAMS: "init:getTeams";
|
|
10
|
+
readonly LOCAL: "init:local";
|
|
10
11
|
readonly PROGRESS: "init:progress";
|
|
11
12
|
};
|
|
12
13
|
export interface InitGetTeamsResponse {
|
|
@@ -31,6 +32,13 @@ export interface InitExecuteRequest {
|
|
|
31
32
|
export interface InitExecuteResponse {
|
|
32
33
|
success: boolean;
|
|
33
34
|
}
|
|
35
|
+
export interface InitLocalRequest {
|
|
36
|
+
force?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface InitLocalResponse {
|
|
39
|
+
alreadyInitialized: boolean;
|
|
40
|
+
success: boolean;
|
|
41
|
+
}
|
|
34
42
|
export interface InitProgressEvent {
|
|
35
43
|
message: string;
|
|
36
44
|
step: string;
|
|
@@ -7,8 +7,14 @@ export interface PushPrepareRequest {
|
|
|
7
7
|
branch: string;
|
|
8
8
|
}
|
|
9
9
|
export interface PushPrepareResponse {
|
|
10
|
+
/** Number of changed files excluded from push due to pending/rejected reviews. */
|
|
11
|
+
excludedReviewCount: number;
|
|
10
12
|
fileCount: number;
|
|
11
13
|
hasChanges: boolean;
|
|
14
|
+
/** Number of files with pending HITL reviews (0 if none). */
|
|
15
|
+
pendingReviewCount: number;
|
|
16
|
+
/** URL to the local review UI (only set when pendingReviewCount > 0). */
|
|
17
|
+
reviewUrl?: string;
|
|
12
18
|
summary: string;
|
|
13
19
|
}
|
|
14
20
|
export interface PushExecuteRequest {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const ReviewEvents: {
|
|
2
|
+
readonly DECIDE_TASK: "review:decideTask";
|
|
3
|
+
readonly NOTIFY: "review:notify";
|
|
4
|
+
readonly PENDING: "review:pending";
|
|
5
|
+
};
|
|
6
|
+
export interface ReviewNotifyEvent {
|
|
7
|
+
pendingCount: number;
|
|
8
|
+
reviewUrl: string;
|
|
9
|
+
taskId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ReviewDecideTaskRequest {
|
|
12
|
+
decision: 'approved' | 'rejected';
|
|
13
|
+
/** When provided, only operations targeting these context-tree-relative paths are affected. */
|
|
14
|
+
filePaths?: string[];
|
|
15
|
+
taskId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ReviewDecideTaskResponse {
|
|
18
|
+
files: Array<{
|
|
19
|
+
path: string;
|
|
20
|
+
reverted: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
totalCount: number;
|
|
23
|
+
}
|
|
24
|
+
export interface ReviewPendingOperation {
|
|
25
|
+
/** Context-tree-relative file path (e.g. architecture/daemon/lifecycle.md). Used with --file flag. */
|
|
26
|
+
filePath?: string;
|
|
27
|
+
impact?: 'high' | 'low';
|
|
28
|
+
path: string;
|
|
29
|
+
previousSummary?: string;
|
|
30
|
+
reason?: string;
|
|
31
|
+
summary?: string;
|
|
32
|
+
type: 'ADD' | 'DELETE' | 'MERGE' | 'UPDATE' | 'UPSERT';
|
|
33
|
+
}
|
|
34
|
+
export interface ReviewPendingTask {
|
|
35
|
+
operations: ReviewPendingOperation[];
|
|
36
|
+
taskId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ReviewPendingResponse {
|
|
39
|
+
pendingCount: number;
|
|
40
|
+
tasks: ReviewPendingTask[];
|
|
41
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
export declare const VcErrorCode: {
|
|
2
|
+
readonly ALREADY_INITIALIZED: "ERR_VC_ALREADY_INITIALIZED";
|
|
3
|
+
readonly AUTH_FAILED: "ERR_VC_AUTH_FAILED";
|
|
4
|
+
readonly BRANCH_ALREADY_EXISTS: "ERR_VC_BRANCH_ALREADY_EXISTS";
|
|
5
|
+
readonly BRANCH_NOT_FOUND: "ERR_VC_BRANCH_NOT_FOUND";
|
|
6
|
+
readonly BRANCH_NOT_MERGED: "ERR_VC_BRANCH_NOT_MERGED";
|
|
7
|
+
readonly CANNOT_DELETE_CURRENT_BRANCH: "ERR_VC_CANNOT_DELETE_CURRENT_BRANCH";
|
|
8
|
+
readonly CLONE_FAILED: "ERR_VC_CLONE_FAILED";
|
|
9
|
+
readonly CONFIG_KEY_NOT_SET: "ERR_VC_CONFIG_KEY_NOT_SET";
|
|
10
|
+
readonly CONFLICT_MARKERS_PRESENT: "ERR_VC_CONFLICT_MARKERS_PRESENT";
|
|
11
|
+
readonly FETCH_FAILED: "ERR_VC_FETCH_FAILED";
|
|
12
|
+
readonly FILE_NOT_FOUND: "ERR_VC_FILE_NOT_FOUND";
|
|
13
|
+
readonly GIT_NOT_INITIALIZED: "ERR_VC_GIT_NOT_INITIALIZED";
|
|
14
|
+
readonly INVALID_ACTION: "ERR_VC_INVALID_ACTION";
|
|
15
|
+
readonly INVALID_BRANCH_NAME: "ERR_VC_INVALID_BRANCH_NAME";
|
|
16
|
+
readonly INVALID_CONFIG_KEY: "ERR_VC_INVALID_CONFIG_KEY";
|
|
17
|
+
readonly INVALID_REF: "ERR_VC_INVALID_REF";
|
|
18
|
+
readonly INVALID_REMOTE_URL: "ERR_VC_INVALID_REMOTE_URL";
|
|
19
|
+
readonly MERGE_CONFLICT: "ERR_VC_MERGE_CONFLICT";
|
|
20
|
+
readonly MERGE_IN_PROGRESS: "ERR_VC_MERGE_IN_PROGRESS";
|
|
21
|
+
readonly NETWORK_ERROR: "ERR_VC_NETWORK_ERROR";
|
|
22
|
+
readonly NO_BRANCH_RESOLVED: "ERR_VC_NO_BRANCH_RESOLVED";
|
|
23
|
+
readonly NO_COMMITS: "ERR_VC_NO_COMMITS";
|
|
24
|
+
readonly NO_MERGE_IN_PROGRESS: "ERR_VC_NO_MERGE_IN_PROGRESS";
|
|
25
|
+
readonly NO_REMOTE: "ERR_VC_NO_REMOTE";
|
|
26
|
+
readonly NO_UPSTREAM: "ERR_VC_NO_UPSTREAM";
|
|
27
|
+
readonly NON_FAST_FORWARD: "ERR_VC_NON_FAST_FORWARD";
|
|
28
|
+
readonly NOTHING_STAGED: "ERR_VC_NOTHING_STAGED";
|
|
29
|
+
readonly NOTHING_TO_PUSH: "ERR_VC_NOTHING_TO_PUSH";
|
|
30
|
+
readonly NOTHING_TO_RESET: "ERR_VC_NOTHING_TO_RESET";
|
|
31
|
+
readonly PULL_FAILED: "ERR_VC_PULL_FAILED";
|
|
32
|
+
readonly PUSH_FAILED: "ERR_VC_PUSH_FAILED";
|
|
33
|
+
readonly REMOTE_ALREADY_EXISTS: "ERR_VC_REMOTE_ALREADY_EXISTS";
|
|
34
|
+
readonly UNCOMMITTED_CHANGES: "ERR_VC_UNCOMMITTED_CHANGES";
|
|
35
|
+
readonly UNRELATED_HISTORIES: "ERR_VC_UNRELATED_HISTORIES";
|
|
36
|
+
readonly USER_NOT_CONFIGURED: "ERR_VC_USER_NOT_CONFIGURED";
|
|
37
|
+
};
|
|
38
|
+
export type VcErrorCodeType = (typeof VcErrorCode)[keyof typeof VcErrorCode];
|
|
39
|
+
export declare const VcEvents: {
|
|
40
|
+
readonly ADD: "vc:add";
|
|
41
|
+
readonly BRANCH: "vc:branch";
|
|
42
|
+
readonly CHECKOUT: "vc:checkout";
|
|
43
|
+
readonly CLONE: "vc:clone";
|
|
44
|
+
readonly CLONE_PROGRESS: "vc:clone:progress";
|
|
45
|
+
readonly COMMIT: "vc:commit";
|
|
46
|
+
readonly CONFIG: "vc:config";
|
|
47
|
+
readonly FETCH: "vc:fetch";
|
|
48
|
+
readonly INIT: "vc:init";
|
|
49
|
+
readonly LOG: "vc:log";
|
|
50
|
+
readonly MERGE: "vc:merge";
|
|
51
|
+
readonly PULL: "vc:pull";
|
|
52
|
+
readonly PUSH: "vc:push";
|
|
53
|
+
readonly REMOTE: "vc:remote";
|
|
54
|
+
readonly RESET: "vc:reset";
|
|
55
|
+
readonly STATUS: "vc:status";
|
|
56
|
+
};
|
|
57
|
+
export interface IVcInitResponse {
|
|
58
|
+
gitDir: string;
|
|
59
|
+
reinitialized: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface IVcStatusResponse {
|
|
62
|
+
ahead?: number;
|
|
63
|
+
behind?: number;
|
|
64
|
+
branch?: string;
|
|
65
|
+
conflictMarkerFiles?: string[];
|
|
66
|
+
hasCommits?: boolean;
|
|
67
|
+
initialized: boolean;
|
|
68
|
+
mergeInProgress?: boolean;
|
|
69
|
+
staged: {
|
|
70
|
+
added: string[];
|
|
71
|
+
deleted: string[];
|
|
72
|
+
modified: string[];
|
|
73
|
+
};
|
|
74
|
+
trackingBranch?: string;
|
|
75
|
+
unmerged?: Array<{
|
|
76
|
+
path: string;
|
|
77
|
+
type: string;
|
|
78
|
+
}>;
|
|
79
|
+
unstaged: {
|
|
80
|
+
deleted: string[];
|
|
81
|
+
modified: string[];
|
|
82
|
+
};
|
|
83
|
+
untracked: string[];
|
|
84
|
+
}
|
|
85
|
+
export interface IVcAddRequest {
|
|
86
|
+
filePaths?: string[];
|
|
87
|
+
}
|
|
88
|
+
export interface IVcAddResponse {
|
|
89
|
+
count: number;
|
|
90
|
+
}
|
|
91
|
+
export interface IVcCommitRequest {
|
|
92
|
+
message: string;
|
|
93
|
+
}
|
|
94
|
+
export interface IVcCommitResponse {
|
|
95
|
+
message: string;
|
|
96
|
+
sha: string;
|
|
97
|
+
}
|
|
98
|
+
export type VcConfigKey = 'user.email' | 'user.name';
|
|
99
|
+
export declare const VC_CONFIG_KEYS: readonly string[];
|
|
100
|
+
export declare function isVcConfigKey(key: string): key is VcConfigKey;
|
|
101
|
+
export interface IVcConfigRequest {
|
|
102
|
+
key: VcConfigKey;
|
|
103
|
+
value?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface IVcConfigResponse {
|
|
106
|
+
key: string;
|
|
107
|
+
value: string;
|
|
108
|
+
}
|
|
109
|
+
export interface IVcPushRequest {
|
|
110
|
+
branch?: string;
|
|
111
|
+
setUpstream?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface IVcPushResponse {
|
|
114
|
+
alreadyUpToDate?: boolean;
|
|
115
|
+
branch: string;
|
|
116
|
+
upstreamSet?: boolean;
|
|
117
|
+
}
|
|
118
|
+
export interface IVcFetchRequest {
|
|
119
|
+
ref?: string;
|
|
120
|
+
remote?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface IVcFetchResponse {
|
|
123
|
+
remote: string;
|
|
124
|
+
}
|
|
125
|
+
export interface IVcPullRequest {
|
|
126
|
+
allowUnrelatedHistories?: boolean;
|
|
127
|
+
branch?: string;
|
|
128
|
+
remote?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface IVcPullResponse {
|
|
131
|
+
alreadyUpToDate?: boolean;
|
|
132
|
+
branch: string;
|
|
133
|
+
conflicts?: Array<{
|
|
134
|
+
path: string;
|
|
135
|
+
type: string;
|
|
136
|
+
}>;
|
|
137
|
+
}
|
|
138
|
+
export interface IVcLogRequest {
|
|
139
|
+
all?: boolean;
|
|
140
|
+
limit?: number;
|
|
141
|
+
ref?: string;
|
|
142
|
+
}
|
|
143
|
+
export interface IVcLogResponse {
|
|
144
|
+
commits: Array<{
|
|
145
|
+
author: {
|
|
146
|
+
email: string;
|
|
147
|
+
name: string;
|
|
148
|
+
};
|
|
149
|
+
message: string;
|
|
150
|
+
sha: string;
|
|
151
|
+
timestamp: string;
|
|
152
|
+
}>;
|
|
153
|
+
currentBranch?: string;
|
|
154
|
+
}
|
|
155
|
+
export type VcRemoteSubcommand = 'add' | 'set-url' | 'show';
|
|
156
|
+
export declare const VC_REMOTE_SUBCOMMANDS: readonly string[];
|
|
157
|
+
export declare function isVcRemoteSubcommand(value: string): value is VcRemoteSubcommand;
|
|
158
|
+
export interface IVcRemoteRequest {
|
|
159
|
+
subcommand: VcRemoteSubcommand;
|
|
160
|
+
url?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface IVcRemoteResponse {
|
|
163
|
+
action: VcRemoteSubcommand;
|
|
164
|
+
url?: string;
|
|
165
|
+
}
|
|
166
|
+
export type IVcCloneRequest = {
|
|
167
|
+
spaceId: string;
|
|
168
|
+
spaceName: string;
|
|
169
|
+
teamId: string;
|
|
170
|
+
teamName: string;
|
|
171
|
+
url?: never;
|
|
172
|
+
} | {
|
|
173
|
+
spaceId?: string;
|
|
174
|
+
spaceName?: string;
|
|
175
|
+
teamId?: string;
|
|
176
|
+
teamName?: string;
|
|
177
|
+
url: string;
|
|
178
|
+
};
|
|
179
|
+
export interface IVcCloneResponse {
|
|
180
|
+
gitDir: string;
|
|
181
|
+
spaceName?: string;
|
|
182
|
+
teamName?: string;
|
|
183
|
+
}
|
|
184
|
+
export interface IVcCloneProgressEvent {
|
|
185
|
+
message: string;
|
|
186
|
+
step: 'cloning' | 'saving';
|
|
187
|
+
}
|
|
188
|
+
export type VcBranchAction = 'create' | 'delete' | 'list' | 'set-upstream';
|
|
189
|
+
export type IVcBranchRequest = {
|
|
190
|
+
action: 'create';
|
|
191
|
+
name: string;
|
|
192
|
+
} | {
|
|
193
|
+
action: 'delete';
|
|
194
|
+
name: string;
|
|
195
|
+
} | {
|
|
196
|
+
action: 'list';
|
|
197
|
+
all?: boolean;
|
|
198
|
+
} | {
|
|
199
|
+
action: 'set-upstream';
|
|
200
|
+
upstream: string;
|
|
201
|
+
};
|
|
202
|
+
export type IVcBranchResponse = {
|
|
203
|
+
action: 'create';
|
|
204
|
+
created: string;
|
|
205
|
+
} | {
|
|
206
|
+
action: 'delete';
|
|
207
|
+
deleted: string;
|
|
208
|
+
} | {
|
|
209
|
+
action: 'list';
|
|
210
|
+
branches: Array<{
|
|
211
|
+
isCurrent: boolean;
|
|
212
|
+
isRemote: boolean;
|
|
213
|
+
name: string;
|
|
214
|
+
}>;
|
|
215
|
+
} | {
|
|
216
|
+
action: 'set-upstream';
|
|
217
|
+
branch: string;
|
|
218
|
+
upstream: string;
|
|
219
|
+
};
|
|
220
|
+
export interface IVcCheckoutRequest {
|
|
221
|
+
branch: string;
|
|
222
|
+
create?: boolean;
|
|
223
|
+
force?: boolean;
|
|
224
|
+
}
|
|
225
|
+
export interface IVcCheckoutResponse {
|
|
226
|
+
branch: string;
|
|
227
|
+
created: boolean;
|
|
228
|
+
previousBranch?: string;
|
|
229
|
+
}
|
|
230
|
+
export type VcMergeAction = 'abort' | 'continue' | 'merge';
|
|
231
|
+
export interface IVcMergeRequest {
|
|
232
|
+
action: VcMergeAction;
|
|
233
|
+
allowUnrelatedHistories?: boolean;
|
|
234
|
+
branch?: string;
|
|
235
|
+
message?: string;
|
|
236
|
+
}
|
|
237
|
+
export interface IVcMergeResponse {
|
|
238
|
+
action: VcMergeAction;
|
|
239
|
+
alreadyUpToDate?: boolean;
|
|
240
|
+
branch?: string;
|
|
241
|
+
conflicts?: Array<{
|
|
242
|
+
path: string;
|
|
243
|
+
type: string;
|
|
244
|
+
}>;
|
|
245
|
+
defaultMessage?: string;
|
|
246
|
+
}
|
|
247
|
+
export type VcResetMode = 'hard' | 'mixed' | 'soft';
|
|
248
|
+
export interface IVcResetRequest {
|
|
249
|
+
filePaths?: string[];
|
|
250
|
+
mode?: VcResetMode;
|
|
251
|
+
ref?: string;
|
|
252
|
+
}
|
|
253
|
+
export interface IVcResetResponse {
|
|
254
|
+
filesUnstaged?: number;
|
|
255
|
+
headSha?: string;
|
|
256
|
+
mode: VcResetMode;
|
|
257
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export const VcErrorCode = {
|
|
2
|
+
ALREADY_INITIALIZED: 'ERR_VC_ALREADY_INITIALIZED',
|
|
3
|
+
AUTH_FAILED: 'ERR_VC_AUTH_FAILED',
|
|
4
|
+
BRANCH_ALREADY_EXISTS: 'ERR_VC_BRANCH_ALREADY_EXISTS',
|
|
5
|
+
BRANCH_NOT_FOUND: 'ERR_VC_BRANCH_NOT_FOUND',
|
|
6
|
+
BRANCH_NOT_MERGED: 'ERR_VC_BRANCH_NOT_MERGED',
|
|
7
|
+
CANNOT_DELETE_CURRENT_BRANCH: 'ERR_VC_CANNOT_DELETE_CURRENT_BRANCH',
|
|
8
|
+
CLONE_FAILED: 'ERR_VC_CLONE_FAILED',
|
|
9
|
+
CONFIG_KEY_NOT_SET: 'ERR_VC_CONFIG_KEY_NOT_SET',
|
|
10
|
+
CONFLICT_MARKERS_PRESENT: 'ERR_VC_CONFLICT_MARKERS_PRESENT',
|
|
11
|
+
FETCH_FAILED: 'ERR_VC_FETCH_FAILED',
|
|
12
|
+
FILE_NOT_FOUND: 'ERR_VC_FILE_NOT_FOUND',
|
|
13
|
+
GIT_NOT_INITIALIZED: 'ERR_VC_GIT_NOT_INITIALIZED',
|
|
14
|
+
INVALID_ACTION: 'ERR_VC_INVALID_ACTION',
|
|
15
|
+
INVALID_BRANCH_NAME: 'ERR_VC_INVALID_BRANCH_NAME',
|
|
16
|
+
INVALID_CONFIG_KEY: 'ERR_VC_INVALID_CONFIG_KEY',
|
|
17
|
+
INVALID_REF: 'ERR_VC_INVALID_REF',
|
|
18
|
+
INVALID_REMOTE_URL: 'ERR_VC_INVALID_REMOTE_URL',
|
|
19
|
+
MERGE_CONFLICT: 'ERR_VC_MERGE_CONFLICT',
|
|
20
|
+
MERGE_IN_PROGRESS: 'ERR_VC_MERGE_IN_PROGRESS',
|
|
21
|
+
NETWORK_ERROR: 'ERR_VC_NETWORK_ERROR',
|
|
22
|
+
NO_BRANCH_RESOLVED: 'ERR_VC_NO_BRANCH_RESOLVED',
|
|
23
|
+
NO_COMMITS: 'ERR_VC_NO_COMMITS',
|
|
24
|
+
NO_MERGE_IN_PROGRESS: 'ERR_VC_NO_MERGE_IN_PROGRESS',
|
|
25
|
+
NO_REMOTE: 'ERR_VC_NO_REMOTE',
|
|
26
|
+
NO_UPSTREAM: 'ERR_VC_NO_UPSTREAM',
|
|
27
|
+
NON_FAST_FORWARD: 'ERR_VC_NON_FAST_FORWARD',
|
|
28
|
+
NOTHING_STAGED: 'ERR_VC_NOTHING_STAGED',
|
|
29
|
+
NOTHING_TO_PUSH: 'ERR_VC_NOTHING_TO_PUSH',
|
|
30
|
+
NOTHING_TO_RESET: 'ERR_VC_NOTHING_TO_RESET',
|
|
31
|
+
PULL_FAILED: 'ERR_VC_PULL_FAILED',
|
|
32
|
+
PUSH_FAILED: 'ERR_VC_PUSH_FAILED',
|
|
33
|
+
REMOTE_ALREADY_EXISTS: 'ERR_VC_REMOTE_ALREADY_EXISTS',
|
|
34
|
+
UNCOMMITTED_CHANGES: 'ERR_VC_UNCOMMITTED_CHANGES',
|
|
35
|
+
UNRELATED_HISTORIES: 'ERR_VC_UNRELATED_HISTORIES',
|
|
36
|
+
USER_NOT_CONFIGURED: 'ERR_VC_USER_NOT_CONFIGURED',
|
|
37
|
+
};
|
|
38
|
+
export const VcEvents = {
|
|
39
|
+
ADD: 'vc:add',
|
|
40
|
+
BRANCH: 'vc:branch',
|
|
41
|
+
CHECKOUT: 'vc:checkout',
|
|
42
|
+
CLONE: 'vc:clone',
|
|
43
|
+
CLONE_PROGRESS: 'vc:clone:progress',
|
|
44
|
+
COMMIT: 'vc:commit',
|
|
45
|
+
CONFIG: 'vc:config',
|
|
46
|
+
FETCH: 'vc:fetch',
|
|
47
|
+
INIT: 'vc:init',
|
|
48
|
+
LOG: 'vc:log',
|
|
49
|
+
MERGE: 'vc:merge',
|
|
50
|
+
PULL: 'vc:pull',
|
|
51
|
+
PUSH: 'vc:push',
|
|
52
|
+
REMOTE: 'vc:remote',
|
|
53
|
+
RESET: 'vc:reset',
|
|
54
|
+
STATUS: 'vc:status',
|
|
55
|
+
};
|
|
56
|
+
export const VC_CONFIG_KEYS = ['user.name', 'user.email'];
|
|
57
|
+
export function isVcConfigKey(key) {
|
|
58
|
+
return VC_CONFIG_KEYS.includes(key);
|
|
59
|
+
}
|
|
60
|
+
export const VC_REMOTE_SUBCOMMANDS = [
|
|
61
|
+
'add',
|
|
62
|
+
'set-url',
|
|
63
|
+
'show',
|
|
64
|
+
];
|
|
65
|
+
export function isVcRemoteSubcommand(value) {
|
|
66
|
+
return VC_REMOTE_SUBCOMMANDS.includes(value);
|
|
67
|
+
}
|
|
@@ -10,6 +10,7 @@ export interface UserDTO {
|
|
|
10
10
|
email: string;
|
|
11
11
|
hasOnboardedCli: boolean;
|
|
12
12
|
id: string;
|
|
13
|
+
name?: string;
|
|
13
14
|
}
|
|
14
15
|
export interface AuthTokenDTO {
|
|
15
16
|
accessToken: string;
|
|
@@ -119,8 +120,12 @@ export interface StatusDTO {
|
|
|
119
120
|
contextTreeDir?: string;
|
|
120
121
|
/** Relative path to the context tree directory from project root (e.g., '.brv/context-tree') */
|
|
121
122
|
contextTreeRelativeDir?: string;
|
|
122
|
-
contextTreeStatus: 'has_changes' | 'no_changes' | 'not_initialized' | 'unknown';
|
|
123
|
+
contextTreeStatus: 'git_vc' | 'has_changes' | 'no_changes' | 'not_initialized' | 'unknown';
|
|
123
124
|
currentDirectory: string;
|
|
125
|
+
/** Number of files with pending HITL review (0 if none or unavailable). */
|
|
126
|
+
pendingReviewCount?: number;
|
|
127
|
+
/** URL to the local review UI (only set when pendingReviewCount > 0). */
|
|
128
|
+
reviewUrl?: string;
|
|
124
129
|
spaceName?: string;
|
|
125
130
|
teamName?: string;
|
|
126
131
|
userEmail?: string;
|