byterover-cli 2.6.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.production +1 -0
- package/README.md +240 -14
- 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 -0
- package/dist/server/config/environment.js +2 -0
- package/dist/server/constants.d.ts +3 -0
- package/dist/server/constants.js +9 -0
- 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/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 -0
- package/dist/server/core/domain/errors/task-error.js +8 -0
- 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/services/i-git-service.js +1 -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/storage/i-review-backup-store.js +1 -0
- package/dist/server/core/interfaces/vc/i-vc-git-config-store.d.ts +8 -0
- package/dist/server/core/interfaces/vc/i-vc-git-config-store.js +1 -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/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/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/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-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/gitignore.d.ts +9 -0
- package/dist/server/utils/gitignore.js +47 -0
- 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/oclif.manifest.json +1018 -98
- package/package.json +9 -3
- 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/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
|
@@ -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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InitProjectPage
|
|
3
|
+
*
|
|
4
|
+
* Shown when .brv/ doesn't exist at cwd.
|
|
5
|
+
* Confirms with the user, then runs local init + vc init via daemon.
|
|
6
|
+
* On success, invalidates status cache → useAppViewMode transitions forward.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export declare function InitProjectPage(): React.ReactNode;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* InitProjectPage
|
|
4
|
+
*
|
|
5
|
+
* Shown when .brv/ doesn't exist at cwd.
|
|
6
|
+
* Confirms with the user, then runs local init + vc init via daemon.
|
|
7
|
+
* On success, invalidates status cache → useAppViewMode transitions forward.
|
|
8
|
+
*/
|
|
9
|
+
import { useQueryClient } from '@tanstack/react-query';
|
|
10
|
+
import { Box, Text, useApp } from 'ink';
|
|
11
|
+
import Spinner from 'ink-spinner';
|
|
12
|
+
import { useCallback, useState } from 'react';
|
|
13
|
+
import { InitEvents } from '../../../shared/transport/events/init-events.js';
|
|
14
|
+
import { VcEvents } from '../../../shared/transport/events/vc-events.js';
|
|
15
|
+
import { EnterPrompt } from '../../components/enter-prompt.js';
|
|
16
|
+
import { getStatusQueryOptions } from '../../features/status/api/get-status.js';
|
|
17
|
+
import { useTheme } from '../../hooks/index.js';
|
|
18
|
+
import { useTransportStore } from '../../stores/transport-store.js';
|
|
19
|
+
import { MainLayout } from '../layouts/main-layout.js';
|
|
20
|
+
export function InitProjectPage() {
|
|
21
|
+
const queryClient = useQueryClient();
|
|
22
|
+
const { theme: { colors }, } = useTheme();
|
|
23
|
+
const [state, setState] = useState('confirm');
|
|
24
|
+
const { exit } = useApp();
|
|
25
|
+
const [error, setError] = useState();
|
|
26
|
+
const runInit = useCallback(async () => {
|
|
27
|
+
setState('running');
|
|
28
|
+
try {
|
|
29
|
+
const { apiClient } = useTransportStore.getState();
|
|
30
|
+
if (!apiClient)
|
|
31
|
+
throw new Error('Not connected to daemon');
|
|
32
|
+
// Step 1: Local init
|
|
33
|
+
await apiClient.request(InitEvents.LOCAL, { force: false });
|
|
34
|
+
// Step 2: VC init
|
|
35
|
+
await apiClient.request(VcEvents.INIT, {});
|
|
36
|
+
setState('done');
|
|
37
|
+
// Invalidate status so useAppViewMode re-evaluates and transitions
|
|
38
|
+
queryClient.invalidateQueries(getStatusQueryOptions());
|
|
39
|
+
}
|
|
40
|
+
catch (error_) {
|
|
41
|
+
setError(error_ instanceof Error ? error_.message : 'Initialization failed');
|
|
42
|
+
setState('error');
|
|
43
|
+
}
|
|
44
|
+
}, [queryClient]);
|
|
45
|
+
const handleConfirm = useCallback((confirmed) => {
|
|
46
|
+
if (confirmed) {
|
|
47
|
+
runInit();
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
exit();
|
|
51
|
+
}
|
|
52
|
+
}, [exit, runInit]);
|
|
53
|
+
return (_jsx(MainLayout, { showInput: false, children: _jsxs(Box, { flexDirection: "column", paddingTop: 1, children: [state === 'confirm' && (_jsxs(Box, { flexDirection: "column", gap: 1, children: [_jsxs(Text, { color: colors.secondary, children: ["Project not initialized in ", process.cwd()] }), _jsx(EnterPrompt, { action: "initialize ByteRover here", onEnter: () => handleConfirm(true) })] })), state === 'running' && (_jsxs(Text, { color: colors.text, children: [_jsx(Spinner, { type: "dots" }), " Initializing project..."] })), state === 'error' && _jsx(Text, { color: colors.errorText, children: error })] }) }));
|
|
54
|
+
}
|
|
@@ -2,13 +2,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useAppViewMode } from '../../features/onboarding/hooks/use-app-view-mode.js';
|
|
3
3
|
import { ConfigProviderPage } from './config-provider-page.js';
|
|
4
4
|
import { HomePage } from './home-page.js';
|
|
5
|
+
// import {InitProjectPage} from './init-project-page.js'
|
|
5
6
|
export function ProtectedRoutes() {
|
|
6
7
|
const viewMode = useAppViewMode();
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
switch (viewMode.type) {
|
|
9
|
+
case 'config-provider': {
|
|
10
|
+
return _jsx(ConfigProviderPage, {});
|
|
11
|
+
}
|
|
12
|
+
// case 'init-project': {
|
|
13
|
+
// return <InitProjectPage />
|
|
14
|
+
// }
|
|
15
|
+
case 'loading': {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
case 'ready': {
|
|
19
|
+
return _jsx(HomePage, {});
|
|
20
|
+
}
|
|
9
21
|
}
|
|
10
|
-
if (viewMode.type === 'config-provider') {
|
|
11
|
-
return _jsx(ConfigProviderPage, {});
|
|
12
|
-
}
|
|
13
|
-
return _jsx(HomePage, {});
|
|
14
22
|
}
|
|
@@ -11,8 +11,6 @@ export { EnterPrompt } from './enter-prompt.js';
|
|
|
11
11
|
export { ExecutionChanges, ExecutionContent, ExecutionInput, ExecutionProgress, ExecutionStatus, ExpandedLogView, LogItem, truncateContent, } from './execution/index.js';
|
|
12
12
|
export { Footer } from './footer.js';
|
|
13
13
|
export { Header } from './header.js';
|
|
14
|
-
export { Init } from './init.js';
|
|
15
|
-
export type { InitProps } from './init.js';
|
|
16
14
|
export { List } from './list.js';
|
|
17
15
|
export { Logo } from './logo.js';
|
|
18
16
|
export type { LogoVariant } from './logo.js';
|
|
@@ -9,7 +9,6 @@ export { EnterPrompt } from './enter-prompt.js';
|
|
|
9
9
|
export { ExecutionChanges, ExecutionContent, ExecutionInput, ExecutionProgress, ExecutionStatus, ExpandedLogView, LogItem, truncateContent, } from './execution/index.js';
|
|
10
10
|
export { Footer } from './footer.js';
|
|
11
11
|
export { Header } from './header.js';
|
|
12
|
-
export { Init } from './init.js';
|
|
13
12
|
export { List } from './list.js';
|
|
14
13
|
export { Logo } from './logo.js';
|
|
15
14
|
export { Markdown } from './markdown.js';
|
|
@@ -185,9 +185,15 @@ export function useActivityLogs() {
|
|
|
185
185
|
toolCallName: tc.toolName,
|
|
186
186
|
}));
|
|
187
187
|
const changes = composeChangesFromToolCalls(task.toolCalls);
|
|
188
|
+
let content = task.status === 'error' ? formatTaskError(task.error) : (task.result ?? '');
|
|
189
|
+
if (task.reviewNotification) {
|
|
190
|
+
const { pendingCount, reviewUrl } = task.reviewNotification;
|
|
191
|
+
const fileLabel = pendingCount === 1 ? 'file needs' : 'files need';
|
|
192
|
+
content += `\n\n⚠ ${pendingCount} ${fileLabel} review: ${reviewUrl}`;
|
|
193
|
+
}
|
|
188
194
|
const activityLog = {
|
|
189
195
|
changes,
|
|
190
|
-
content
|
|
196
|
+
content,
|
|
191
197
|
files: task.files,
|
|
192
198
|
folders: task.folders,
|
|
193
199
|
id: task.taskId,
|
|
@@ -14,6 +14,7 @@ import { queryCommand } from './query.js';
|
|
|
14
14
|
import { resetCommand } from './reset.js';
|
|
15
15
|
import { spaceCommand } from './space.js';
|
|
16
16
|
import { statusCommand } from './status.js';
|
|
17
|
+
import { vcCommand } from './vc.js';
|
|
17
18
|
/**
|
|
18
19
|
* Load all REPL slash commands.
|
|
19
20
|
*
|
|
@@ -38,6 +39,8 @@ export const load = () => [
|
|
|
38
39
|
modelCommand,
|
|
39
40
|
// Space management
|
|
40
41
|
spaceCommand,
|
|
42
|
+
// Git semantic (vc commands)
|
|
43
|
+
vcCommand,
|
|
41
44
|
// Context tree management
|
|
42
45
|
resetCommand,
|
|
43
46
|
// Session management
|
|
@@ -1,22 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { SpaceListView } from '../../space/components/space-list-view.js';
|
|
3
|
-
import { Flags, parseReplArgs, toCommandFlags } from '../utils/arg-parser.js';
|
|
4
|
-
const listFlags = {
|
|
5
|
-
json: Flags.boolean({
|
|
6
|
-
char: 'j',
|
|
7
|
-
default: false,
|
|
8
|
-
description: 'Output in JSON format',
|
|
9
|
-
}),
|
|
10
|
-
};
|
|
1
|
+
import { getStatus } from '../../status/api/get-status.js';
|
|
11
2
|
export const spaceListCommand = {
|
|
12
|
-
async action(
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
async action() {
|
|
4
|
+
const { status } = await getStatus();
|
|
5
|
+
const isVc = status.contextTreeStatus === 'git_vc';
|
|
6
|
+
const content = isVc
|
|
7
|
+
? 'The space list command has been deprecated. Visit the ByteRover web dashboard to view your spaces.'
|
|
8
|
+
: 'The space list command has been deprecated. Visit the ByteRover web dashboard to view your spaces and follow the migration guide to version control.';
|
|
9
|
+
return { content, messageType: 'error', type: 'message' };
|
|
18
10
|
},
|
|
19
|
-
description: 'List all spaces
|
|
20
|
-
flags: toCommandFlags(listFlags),
|
|
11
|
+
description: 'List all spaces (deprecated)',
|
|
21
12
|
name: 'list',
|
|
22
13
|
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { SpaceSwitchFlow } from '../../space/components/space-switch-flow.js';
|
|
1
|
+
import { getStatus } from '../../status/api/get-status.js';
|
|
3
2
|
export const spaceSwitchCommand = {
|
|
4
|
-
action
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
async action() {
|
|
4
|
+
const { status } = await getStatus();
|
|
5
|
+
const isVc = status.contextTreeStatus === 'git_vc';
|
|
6
|
+
const content = isVc
|
|
7
|
+
? 'The space switch command has been deprecated. To work with a different space, use: brv vc clone <url>'
|
|
8
|
+
: 'The space switch command has been deprecated. Visit the ByteRover web dashboard to follow the migration guide from snapshot to version control.';
|
|
9
|
+
return { content, messageType: 'error', type: 'message' };
|
|
10
|
+
},
|
|
11
|
+
description: 'Switch to a different space (deprecated)',
|
|
8
12
|
name: 'switch',
|
|
9
13
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { VcAddFlow } from '../../vc/add/components/vc-add-flow.js';
|
|
3
|
+
import { parseReplArgs } from '../utils/arg-parser.js';
|
|
4
|
+
export const vcAddSubCommand = {
|
|
5
|
+
async action(_context, rawArgs) {
|
|
6
|
+
const parsed = await parseReplArgs(rawArgs, { strict: false });
|
|
7
|
+
// argv contains all non-flag tokens; default to '.' like git add .
|
|
8
|
+
const filePaths = parsed.argv.length > 0 ? parsed.argv : ['.'];
|
|
9
|
+
return {
|
|
10
|
+
render: ({ onCancel, onComplete }) => React.createElement(VcAddFlow, { filePaths, onCancel, onComplete }),
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
description: 'Stage files for the next commit',
|
|
14
|
+
name: 'add',
|
|
15
|
+
};
|