@bevel-software/platform-core-backend 0.35.0 → 0.37.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/agent-guide/directory-structure.md +1 -1
- package/agent-guide/onboarding.md +111 -0
- package/agent-guide/start-here.md +1 -0
- package/agent-guide/tool-manuals.md +1 -0
- package/dist/core/catalog-cache-invalidation.d.ts +2 -2
- package/dist/core/catalog-cache-invalidation.d.ts.map +1 -1
- package/dist/core/compose-embed.d.ts +2 -2
- package/dist/core/compose-embed.d.ts.map +1 -1
- package/dist/core/compose-embed.js +1 -1
- package/dist/core/compose-embed.js.map +1 -1
- package/dist/core/core-ports.d.ts +19 -4
- package/dist/core/core-ports.d.ts.map +1 -1
- package/dist/core/core-ports.js.map +1 -1
- package/dist/core/create-core-server.d.ts.map +1 -1
- package/dist/core/create-core-server.js +26 -24
- package/dist/core/create-core-server.js.map +1 -1
- package/dist/core/create-core-services.d.ts +19 -13
- package/dist/core/create-core-services.d.ts.map +1 -1
- package/dist/core/create-core-services.js +72 -57
- package/dist/core/create-core-services.js.map +1 -1
- package/dist/core/lifecycle.d.ts +4 -4
- package/dist/core/lifecycle.d.ts.map +1 -1
- package/dist/core/lifecycle.js +5 -5
- package/dist/core/lifecycle.js.map +1 -1
- package/dist/core-config.d.ts +2 -2
- package/dist/core-config.js +3 -3
- package/dist/core-config.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/modules/access/access-control.service.js +1 -1
- package/dist/modules/access/access-control.service.js.map +1 -1
- package/dist/modules/access/access-declarations.d.ts +2 -2
- package/dist/modules/access/access-declarations.d.ts.map +1 -1
- package/dist/modules/access/access-declarations.js +2 -2
- package/dist/modules/access/access-declarations.js.map +1 -1
- package/dist/modules/access/access-mutation.service.d.ts +2 -2
- package/dist/modules/access/access-mutation.service.d.ts.map +1 -1
- package/dist/modules/access/access-mutation.service.js +2 -2
- package/dist/modules/access/access-mutation.service.js.map +1 -1
- package/dist/modules/access/access-requests.routes.d.ts +2 -2
- package/dist/modules/access/access-requests.routes.d.ts.map +1 -1
- package/dist/modules/access/access-requests.routes.js +5 -5
- package/dist/modules/access/access-requests.routes.js.map +1 -1
- package/dist/modules/access/access-requests.service.d.ts +2 -2
- package/dist/modules/access/access-requests.service.d.ts.map +1 -1
- package/dist/modules/access/access-requests.service.js +11 -11
- package/dist/modules/access/access-requests.service.js.map +1 -1
- package/dist/modules/access/access.routes.d.ts +2 -2
- package/dist/modules/access/access.routes.d.ts.map +1 -1
- package/dist/modules/access/access.routes.js +9 -9
- package/dist/modules/access/access.routes.js.map +1 -1
- package/dist/modules/access/admin-locked-commit.d.ts +5 -5
- package/dist/modules/access/admin-locked-commit.d.ts.map +1 -1
- package/dist/modules/access/admin-locked-commit.js +7 -7
- package/dist/modules/access/admin-locked-commit.js.map +1 -1
- package/dist/modules/access/admin-route-helpers.d.ts +1 -1
- package/dist/modules/access/admin-route-helpers.js +5 -5
- package/dist/modules/access/admin-route-helpers.js.map +1 -1
- package/dist/modules/access/change-read-gate.d.ts +1 -1
- package/dist/modules/access/change-read-gate.js +1 -1
- package/dist/modules/access/groups-admin.service.d.ts +7 -7
- package/dist/modules/access/groups-admin.service.d.ts.map +1 -1
- package/dist/modules/access/groups-admin.service.js +6 -6
- package/dist/modules/access/groups-admin.service.js.map +1 -1
- package/dist/modules/access/reference-scan.d.ts +1 -1
- package/dist/modules/access/roles-admin.service.d.ts +7 -7
- package/dist/modules/access/roles-admin.service.d.ts.map +1 -1
- package/dist/modules/access/roles-admin.service.js +8 -8
- package/dist/modules/access/roles-admin.service.js.map +1 -1
- package/dist/modules/access/synced-groups-committer.d.ts +4 -4
- package/dist/modules/access/synced-groups-committer.d.ts.map +1 -1
- package/dist/modules/access/synced-groups-committer.js +7 -7
- package/dist/modules/access/synced-groups-committer.js.map +1 -1
- package/dist/modules/access/user-access-removal.service.d.ts +6 -6
- package/dist/modules/access/user-access-removal.service.d.ts.map +1 -1
- package/dist/modules/access/user-access-removal.service.js +4 -4
- package/dist/modules/access/user-access-removal.service.js.map +1 -1
- package/dist/modules/access-model/access-errors.d.ts +4 -4
- package/dist/modules/access-model/access-errors.d.ts.map +1 -1
- package/dist/modules/access-model/access-errors.js +4 -4
- package/dist/modules/access-model/access-errors.js.map +1 -1
- package/dist/modules/access-model/access-grammar.d.ts +1 -1
- package/dist/modules/access-model/access-grammar.js +4 -4
- package/dist/modules/access-model/change-gate.d.ts +1 -1
- package/dist/modules/access-model/change-gate.js +1 -1
- package/dist/modules/access-model/roles-yaml-guard.d.ts +4 -4
- package/dist/modules/access-model/roles-yaml-guard.d.ts.map +1 -1
- package/dist/modules/access-model/roles-yaml-guard.js +4 -4
- package/dist/modules/access-model/roles-yaml-guard.js.map +1 -1
- package/dist/modules/agent-guide/agent-guide.d.ts +19 -14
- package/dist/modules/agent-guide/agent-guide.d.ts.map +1 -1
- package/dist/modules/agent-guide/agent-guide.js +42 -18
- package/dist/modules/agent-guide/agent-guide.js.map +1 -1
- package/dist/modules/agent-guide/guide-budget.d.ts +5 -2
- package/dist/modules/agent-guide/guide-budget.d.ts.map +1 -1
- package/dist/modules/agent-guide/guide-budget.js +6 -2
- package/dist/modules/agent-guide/guide-budget.js.map +1 -1
- package/dist/modules/agent-instructions/agent-instructions.routes.d.ts +12 -5
- package/dist/modules/agent-instructions/agent-instructions.routes.d.ts.map +1 -1
- package/dist/modules/agent-instructions/agent-instructions.routes.js +13 -6
- package/dist/modules/agent-instructions/agent-instructions.routes.js.map +1 -1
- package/dist/modules/agent-instructions/compose.d.ts +15 -8
- package/dist/modules/agent-instructions/compose.d.ts.map +1 -1
- package/dist/modules/agent-instructions/compose.js +24 -10
- package/dist/modules/agent-instructions/compose.js.map +1 -1
- package/dist/modules/agent-instructions/shared-file-rules.d.ts +14 -6
- package/dist/modules/agent-instructions/shared-file-rules.d.ts.map +1 -1
- package/dist/modules/agent-instructions/shared-file-rules.js +51 -11
- package/dist/modules/agent-instructions/shared-file-rules.js.map +1 -1
- package/dist/modules/auth/account-erasure.service.d.ts +36 -7
- package/dist/modules/auth/account-erasure.service.d.ts.map +1 -1
- package/dist/modules/auth/account-erasure.service.js +30 -10
- package/dist/modules/auth/account-erasure.service.js.map +1 -1
- package/dist/modules/auth/account-hooks.d.ts +20 -0
- package/dist/modules/auth/account-hooks.d.ts.map +1 -1
- package/dist/modules/auth/account-hooks.js +10 -0
- package/dist/modules/auth/account-hooks.js.map +1 -1
- package/dist/modules/auth/account-switch-lock.js +2 -2
- package/dist/modules/auth/account-switch-lock.js.map +1 -1
- package/dist/modules/auth/account.routes.d.ts +7 -2
- package/dist/modules/auth/account.routes.d.ts.map +1 -1
- package/dist/modules/auth/account.routes.js +23 -4
- package/dist/modules/auth/account.routes.js.map +1 -1
- package/dist/modules/auth/auth.service.d.ts +1 -1
- package/dist/modules/auth/auth.service.js +4 -4
- package/dist/modules/auth/auth.service.js.map +1 -1
- package/dist/modules/auth/index.d.ts +1 -0
- package/dist/modules/auth/index.d.ts.map +1 -1
- package/dist/modules/database/connection.d.ts.map +1 -1
- package/dist/modules/database/connection.js +11 -0
- package/dist/modules/database/connection.js.map +1 -1
- package/dist/modules/database/core-schema.js +2 -2
- package/dist/modules/database/core-schema.js.map +1 -1
- package/dist/modules/diff/diff.routes.d.ts +3 -3
- package/dist/modules/diff/diff.routes.d.ts.map +1 -1
- package/dist/modules/diff/diff.routes.js +7 -7
- package/dist/modules/diff/diff.routes.js.map +1 -1
- package/dist/modules/embed/embed.routes.js +1 -1
- package/dist/modules/embed/embed.routes.js.map +1 -1
- package/dist/modules/embed/embed.service.d.ts +4 -4
- package/dist/modules/embed/embed.service.d.ts.map +1 -1
- package/dist/modules/embed/embed.service.js +18 -18
- package/dist/modules/embed/embed.service.js.map +1 -1
- package/dist/modules/kb-fs/branch-name.js +8 -8
- package/dist/modules/kb-fs/branch-name.js.map +1 -1
- package/dist/modules/kb-fs/file-change-notifier.d.ts +51 -26
- package/dist/modules/kb-fs/file-change-notifier.d.ts.map +1 -1
- package/dist/modules/kb-fs/file-change-notifier.js +6 -8
- package/dist/modules/kb-fs/file-change-notifier.js.map +1 -1
- package/dist/modules/kb-fs/locking-filesystem.d.ts +9 -16
- package/dist/modules/kb-fs/locking-filesystem.d.ts.map +1 -1
- package/dist/modules/kb-fs/locking-filesystem.js +31 -39
- package/dist/modules/kb-fs/locking-filesystem.js.map +1 -1
- package/dist/modules/kb-fs/repo-path.js +5 -5
- package/dist/modules/kb-fs/repo-path.js.map +1 -1
- package/dist/modules/kb-fs/tmp-ref.d.ts +2 -2
- package/dist/modules/kb-fs/tmp-ref.d.ts.map +1 -1
- package/dist/modules/kb-fs/tmp-ref.js +2 -2
- package/dist/modules/kb-fs/tmp-ref.js.map +1 -1
- package/dist/modules/kb-sync/index.d.ts +1 -1
- package/dist/modules/kb-sync/index.d.ts.map +1 -1
- package/dist/modules/kb-sync/kb-sync.interface.d.ts +3 -3
- package/dist/modules/kb-sync/kb-sync.interface.d.ts.map +1 -1
- package/dist/modules/kb-sync/kb-sync.service.d.ts +3 -3
- package/dist/modules/kb-sync/kb-sync.service.d.ts.map +1 -1
- package/dist/modules/kb-sync/kb-sync.service.js +10 -10
- package/dist/modules/kb-sync/kb-sync.service.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +11 -4
- package/dist/modules/mcp/mcp.service.d.ts.map +1 -1
- package/dist/modules/mcp/mcp.service.js +75 -19
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/onboarding/onboarding.contract.d.ts +1 -1
- package/dist/modules/onboarding/onboarding.routes.js +2 -2
- package/dist/modules/onboarding/onboarding.routes.js.map +1 -1
- package/dist/modules/onboarding/starter-pack.service.d.ts +5 -7
- package/dist/modules/onboarding/starter-pack.service.d.ts.map +1 -1
- package/dist/modules/onboarding/starter-pack.service.js +4 -4
- package/dist/modules/onboarding/starter-pack.service.js.map +1 -1
- package/dist/modules/plugins/join-request-jobs.service.d.ts +2 -2
- package/dist/modules/plugins/join-request-jobs.service.d.ts.map +1 -1
- package/dist/modules/plugins/join-request-jobs.service.js +7 -7
- package/dist/modules/plugins/join-request-jobs.service.js.map +1 -1
- package/dist/modules/plugins/join-requests.service.d.ts +3 -3
- package/dist/modules/plugins/join-requests.service.d.ts.map +1 -1
- package/dist/modules/plugins/join-requests.service.js +5 -5
- package/dist/modules/plugins/join-requests.service.js.map +1 -1
- package/dist/modules/plugins/plugin-rename.service.js +1 -1
- package/dist/modules/plugins/plugin-rename.service.js.map +1 -1
- package/dist/modules/plugins/plugins.routes.d.ts +2 -2
- package/dist/modules/plugins/plugins.routes.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.routes.js +8 -8
- package/dist/modules/plugins/plugins.routes.js.map +1 -1
- package/dist/modules/secrets-vault/db-secrets-vault.service.d.ts +77 -2
- package/dist/modules/secrets-vault/db-secrets-vault.service.d.ts.map +1 -1
- package/dist/modules/secrets-vault/db-secrets-vault.service.js +479 -53
- package/dist/modules/secrets-vault/db-secrets-vault.service.js.map +1 -1
- package/dist/modules/secrets-vault/index.d.ts +2 -1
- package/dist/modules/secrets-vault/index.d.ts.map +1 -1
- package/dist/modules/secrets-vault/index.js +1 -0
- package/dist/modules/secrets-vault/index.js.map +1 -1
- package/dist/modules/secrets-vault/managed-sign-in-erasure.d.ts +36 -0
- package/dist/modules/secrets-vault/managed-sign-in-erasure.d.ts.map +1 -0
- package/dist/modules/secrets-vault/managed-sign-in-erasure.js +37 -0
- package/dist/modules/secrets-vault/managed-sign-in-erasure.js.map +1 -0
- package/dist/modules/secrets-vault/secrets-vault.contract.d.ts +152 -0
- package/dist/modules/secrets-vault/secrets-vault.contract.d.ts.map +1 -1
- package/dist/modules/secrets-vault/secrets-vault.contract.js.map +1 -1
- package/dist/modules/secrets-vault/secrets-vault.routes.d.ts +7 -1
- package/dist/modules/secrets-vault/secrets-vault.routes.d.ts.map +1 -1
- package/dist/modules/secrets-vault/secrets-vault.routes.js +125 -10
- package/dist/modules/secrets-vault/secrets-vault.routes.js.map +1 -1
- package/dist/modules/settings/connection-check.js +1 -1
- package/dist/modules/settings/connection-check.js.map +1 -1
- package/dist/modules/settings/deployment-settings.service.js +1 -1
- package/dist/modules/settings/git-root-folders.js +1 -1
- package/dist/modules/settings/git-root-folders.js.map +1 -1
- package/dist/modules/settings/setup.routes.d.ts +1 -1
- package/dist/modules/settings/setup.routes.js +1 -1
- package/dist/modules/skills/pending-skills.service.d.ts +3 -3
- package/dist/modules/skills/pending-skills.service.d.ts.map +1 -1
- package/dist/modules/skills/pending-skills.service.js +4 -4
- package/dist/modules/skills/pending-skills.service.js.map +1 -1
- package/dist/modules/skills/skill-access-requests.routes.d.ts +2 -2
- package/dist/modules/skills/skill-access-requests.routes.d.ts.map +1 -1
- package/dist/modules/skills/skill-access-requests.routes.js +5 -5
- package/dist/modules/skills/skill-access-requests.routes.js.map +1 -1
- package/dist/modules/tool-helpers/tool-context.d.ts +4 -4
- package/dist/modules/tool-helpers/tool-context.d.ts.map +1 -1
- package/dist/modules/tool-helpers/tool-context.js +2 -2
- package/dist/modules/tool-helpers/tool-context.js.map +1 -1
- package/dist/modules/tool-helpers/tool-handler.js +2 -2
- package/dist/modules/tool-helpers/tool-handler.js.map +1 -1
- package/dist/modules/tool-helpers/tool.contract.d.ts +4 -4
- package/dist/modules/tool-helpers/tool.contract.d.ts.map +1 -1
- package/dist/modules/tool-manuals/mcp-server-edit.service.js +1 -1
- package/dist/modules/tool-manuals/mcp-server-edit.service.js.map +1 -1
- package/dist/modules/tool-manuals/pending-tools.service.d.ts +3 -3
- package/dist/modules/tool-manuals/pending-tools.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/pending-tools.service.js +4 -4
- package/dist/modules/tool-manuals/pending-tools.service.js.map +1 -1
- package/dist/modules/tool-manuals/tool-delete.service.js +1 -1
- package/dist/modules/tool-manuals/tool-delete.service.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.contract.d.ts +43 -3
- package/dist/modules/tool-manuals/tool-manuals.contract.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts +6 -0
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.js +51 -5
- package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.tools.d.ts +3 -0
- package/dist/modules/tool-manuals/tool-manuals.tools.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.tools.js +36 -15
- package/dist/modules/tool-manuals/tool-manuals.tools.js.map +1 -1
- package/dist/modules/version-control/agent-tools/change-request-read-shape.d.ts.map +1 -0
- package/dist/modules/version-control/agent-tools/change-request-read-shape.js.map +1 -0
- package/dist/modules/version-control/agent-tools/change-request-read.tools.d.ts.map +1 -0
- package/dist/modules/{workflow → version-control}/agent-tools/change-request-read.tools.js +2 -2
- package/dist/modules/version-control/agent-tools/change-request-read.tools.js.map +1 -0
- package/dist/modules/version-control/agent-tools/change-request-summary.d.ts.map +1 -0
- package/dist/modules/version-control/agent-tools/change-request-summary.js.map +1 -0
- package/dist/modules/{workflow/agent-tools/workflow.tools.d.ts → version-control/agent-tools/version-control.tools.d.ts} +4 -4
- package/dist/modules/version-control/agent-tools/version-control.tools.d.ts.map +1 -0
- package/dist/modules/{workflow/agent-tools/workflow.tools.js → version-control/agent-tools/version-control.tools.js} +31 -31
- package/dist/modules/version-control/agent-tools/version-control.tools.js.map +1 -0
- package/dist/modules/{workflow → version-control}/change-request-hooks.d.ts +1 -1
- package/dist/modules/version-control/change-request-hooks.d.ts.map +1 -0
- package/dist/modules/version-control/change-request-hooks.js.map +1 -0
- package/dist/modules/version-control/change-request-review/approval-lock.d.ts.map +1 -0
- package/dist/modules/version-control/change-request-review/approval-lock.js.map +1 -0
- package/dist/modules/{workflow/review-workflow/review-workflow.interface.d.ts → version-control/change-request-review/change-request-review.interface.d.ts} +2 -2
- package/dist/modules/version-control/change-request-review/change-request-review.interface.d.ts.map +1 -0
- package/dist/modules/version-control/change-request-review/change-request-review.interface.js +2 -0
- package/dist/modules/version-control/change-request-review/change-request-review.interface.js.map +1 -0
- package/dist/modules/{workflow/review-workflow/review-workflow.service.d.ts → version-control/change-request-review/change-request-review.service.d.ts} +3 -3
- package/dist/modules/version-control/change-request-review/change-request-review.service.d.ts.map +1 -0
- package/dist/modules/{workflow/review-workflow/review-workflow.service.js → version-control/change-request-review/change-request-review.service.js} +26 -26
- package/dist/modules/version-control/change-request-review/change-request-review.service.js.map +1 -0
- package/dist/modules/{workflow → version-control}/event-bus.d.ts +8 -8
- package/dist/modules/version-control/event-bus.d.ts.map +1 -0
- package/dist/modules/{workflow → version-control}/event-bus.js +4 -4
- package/dist/modules/version-control/event-bus.js.map +1 -0
- package/dist/modules/{workflow → version-control}/events-delivery.d.ts +4 -4
- package/dist/modules/version-control/events-delivery.d.ts.map +1 -0
- package/dist/modules/version-control/events-delivery.js.map +1 -0
- package/dist/modules/{workflow → version-control}/events.routes.d.ts +4 -4
- package/dist/modules/version-control/events.routes.d.ts.map +1 -0
- package/dist/modules/version-control/events.routes.js.map +1 -0
- package/dist/modules/{workflow → version-control}/file-lock.service.d.ts +2 -2
- package/dist/modules/version-control/file-lock.service.d.ts.map +1 -0
- package/dist/modules/{workflow → version-control}/file-lock.service.js +6 -6
- package/dist/modules/version-control/file-lock.service.js.map +1 -0
- package/dist/modules/version-control/git/change-request-link.d.ts.map +1 -0
- package/dist/modules/version-control/git/change-request-link.js.map +1 -0
- package/dist/modules/version-control/git/git-version.d.ts.map +1 -0
- package/dist/modules/version-control/git/git-version.js.map +1 -0
- package/dist/modules/{workflow → version-control}/git/git.service.d.ts +26 -8
- package/dist/modules/version-control/git/git.service.d.ts.map +1 -0
- package/dist/modules/{workflow → version-control}/git/git.service.js +106 -55
- package/dist/modules/version-control/git/git.service.js.map +1 -0
- package/dist/modules/version-control/git/merge-commit.d.ts.map +1 -0
- package/dist/modules/version-control/git/merge-commit.js.map +1 -0
- package/dist/modules/version-control/git/node-git-runner.d.ts.map +1 -0
- package/dist/modules/{workflow → version-control}/git/node-git-runner.js +1 -1
- package/dist/modules/version-control/git/node-git-runner.js.map +1 -0
- package/dist/modules/{workflow → version-control}/git/pull-request.service.d.ts +5 -5
- package/dist/modules/version-control/git/pull-request.service.d.ts.map +1 -0
- package/dist/modules/{workflow → version-control}/git/pull-request.service.js +10 -10
- package/dist/modules/version-control/git/pull-request.service.js.map +1 -0
- package/dist/modules/{workflow → version-control}/index.d.ts +6 -5
- package/dist/modules/version-control/index.d.ts.map +1 -0
- package/dist/modules/{workflow → version-control}/index.js +3 -2
- package/dist/modules/version-control/index.js.map +1 -0
- package/dist/modules/{workflow → version-control}/pending-commits.service.d.ts +2 -2
- package/dist/modules/version-control/pending-commits.service.d.ts.map +1 -0
- package/dist/modules/{workflow → version-control}/pending-commits.service.js +2 -2
- package/dist/modules/version-control/pending-commits.service.js.map +1 -0
- package/dist/modules/{workflow → version-control}/pending-commits.worker.d.ts +5 -5
- package/dist/modules/version-control/pending-commits.worker.d.ts.map +1 -0
- package/dist/modules/{workflow → version-control}/pending-commits.worker.js +3 -3
- package/dist/modules/version-control/pending-commits.worker.js.map +1 -0
- package/dist/modules/{workflow → version-control}/read-on-branch.d.ts +2 -2
- package/dist/modules/version-control/read-on-branch.d.ts.map +1 -0
- package/dist/modules/{workflow → version-control}/read-on-branch.js +2 -2
- package/dist/modules/version-control/read-on-branch.js.map +1 -0
- package/dist/modules/version-control/recovery-bot.d.ts.map +1 -0
- package/dist/modules/version-control/recovery-bot.js.map +1 -0
- package/dist/modules/version-control/sanitize-error.d.ts.map +1 -0
- package/dist/modules/version-control/sanitize-error.js.map +1 -0
- package/dist/modules/{workflow/workflow-hooks.d.ts → version-control/version-control-hooks.d.ts} +33 -6
- package/dist/modules/version-control/version-control-hooks.d.ts.map +1 -0
- package/dist/modules/{workflow/workflow-hooks.js → version-control/version-control-hooks.js} +20 -3
- package/dist/modules/version-control/version-control-hooks.js.map +1 -0
- package/dist/modules/{workflow/workflow.routes.d.ts → version-control/version-control.routes.d.ts} +6 -5
- package/dist/modules/version-control/version-control.routes.d.ts.map +1 -0
- package/dist/modules/{workflow/workflow.routes.js → version-control/version-control.routes.js} +61 -60
- package/dist/modules/version-control/version-control.routes.js.map +1 -0
- package/dist/modules/{workflow/workflow.service.d.ts → version-control/version-control.service.d.ts} +26 -46
- package/dist/modules/version-control/version-control.service.d.ts.map +1 -0
- package/dist/modules/{workflow/workflow.service.js → version-control/version-control.service.js} +93 -107
- package/dist/modules/version-control/version-control.service.js.map +1 -0
- package/dist/modules/workspace/agent-access.gate.d.ts +5 -5
- package/dist/modules/workspace/agent-access.gate.d.ts.map +1 -1
- package/dist/modules/workspace/agent-access.gate.js +1 -1
- package/dist/modules/workspace/git-internals.middleware.d.ts +1 -1
- package/dist/modules/workspace/git-internals.middleware.js +2 -2
- package/dist/modules/workspace/kb-repository.js +1 -1
- package/dist/modules/workspace/kb-repository.js.map +1 -1
- package/dist/modules/workspace/startup/kb-git.d.ts +1 -1
- package/dist/modules/workspace/startup/kb-git.d.ts.map +1 -1
- package/dist/modules/workspace/startup/kb-git.js +1 -1
- package/dist/modules/workspace/startup/kb-git.js.map +1 -1
- package/dist/modules/workspace/startup/steps/seed-tree.d.ts +2 -2
- package/dist/modules/workspace/startup/steps/seed-tree.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/seed-tree.js +1 -1
- package/dist/modules/workspace/startup/steps/seed-tree.js.map +1 -1
- package/dist/modules/workspace/startup/steps/template-files.step.d.ts +2 -2
- package/dist/modules/workspace/startup/steps/template-files.step.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/template-files.step.js +2 -2
- package/dist/modules/workspace/startup/steps/template-files.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/template-source.d.ts +17 -4
- package/dist/modules/workspace/startup/steps/template-source.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/template-source.js +8 -5
- package/dist/modules/workspace/startup/steps/template-source.js.map +1 -1
- package/dist/modules/workspace/workspace-tmp.js +3 -3
- package/dist/modules/workspace/workspace-tmp.js.map +1 -1
- package/dist/modules/workspace/workspace.routes.d.ts +4 -4
- package/dist/modules/workspace/workspace.routes.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.routes.js +22 -22
- package/dist/modules/workspace/workspace.routes.js.map +1 -1
- package/dist/modules/workspace/workspace.service.d.ts +6 -6
- package/dist/modules/workspace/workspace.service.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.service.js +11 -11
- package/dist/modules/workspace/workspace.service.js.map +1 -1
- package/dist/modules/workspace/workspace.tools.d.ts +2 -1
- package/dist/modules/workspace/workspace.tools.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.tools.js +15 -10
- package/dist/modules/workspace/workspace.tools.js.map +1 -1
- package/dist/shared/canonical-file-identity.d.ts +2 -2
- package/dist/shared/canonical-file-identity.js +5 -5
- package/dist/shared/canonical-file-identity.js.map +1 -1
- package/dist/shared/domain-errors.d.ts +39 -39
- package/dist/shared/domain-errors.d.ts.map +1 -1
- package/dist/shared/domain-errors.js +44 -44
- package/dist/shared/domain-errors.js.map +1 -1
- package/dist/shared/fire-and-forget.d.ts +14 -0
- package/dist/shared/fire-and-forget.d.ts.map +1 -0
- package/dist/shared/fire-and-forget.js +23 -0
- package/dist/shared/fire-and-forget.js.map +1 -0
- package/dist/shared/git.contract.d.ts +1 -1
- package/dist/shared/git.contract.js +1 -1
- package/dist/shared/http-errors.d.ts +3 -3
- package/dist/shared/http-errors.d.ts.map +1 -1
- package/dist/shared/http-errors.js +1 -1
- package/dist/shared/http-errors.js.map +1 -1
- package/dist/shared/pending-proposals.d.ts +3 -3
- package/dist/shared/pending-proposals.d.ts.map +1 -1
- package/dist/shared/pending-proposals.js +2 -2
- package/dist/shared/pending-proposals.js.map +1 -1
- package/dist/tenancy/static-tenant-source.js +1 -1
- package/dist/tenancy/static-tenant-source.js.map +1 -1
- package/migrations/0012_agent_audit.sql +40 -40
- package/migrations/0013_agent_identity_and_key_soft_delete.sql +29 -29
- package/migrations/meta/0012_snapshot.json +2246 -2246
- package/migrations/meta/0013_snapshot.json +2258 -2258
- package/package.json +4 -4
- package/src/__tests__/account-admin.ts +27 -0
- package/src/__tests__/capturing-logger.ts +36 -0
- package/src/__tests__/hexis-catalog.ts +4 -4
- package/src/__tests__/kb-context.ts +30 -30
- package/src/__tests__/kb-layout-config.test.ts +21 -0
- package/src/__tests__/open-change-gate.ts +1 -1
- package/src/__tests__/real-access.ts +16 -0
- package/src/__tests__/real-auth.ts +13 -0
- package/src/__tests__/real-readers.ts +27 -0
- package/src/__tests__/real-version-control.ts +22 -0
- package/src/__tests__/tool-handler.ts +15 -0
- package/src/__tests__/tool-wiring.ts +10 -4
- package/src/__tests__/workspace-service.ts +1 -1
- package/src/core/__tests__/catalog-cache-invalidation.test.ts +3 -3
- package/src/core/__tests__/commit-announcements-wired-once.test.ts +53 -0
- package/src/core/__tests__/compose-embed.test.ts +1 -1
- package/src/core/__tests__/damaged-document.tools.test.ts +3 -3
- package/src/core/__tests__/erasure-slices-wired-once.test.ts +46 -0
- package/src/core/__tests__/gated-boot.test.ts +2 -2
- package/src/core/__tests__/lifecycle.test.ts +9 -9
- package/src/core/catalog-cache-invalidation.ts +2 -2
- package/src/core/compose-embed.ts +3 -3
- package/src/core/core-ports.ts +19 -4
- package/src/core/create-core-server.ts +39 -25
- package/src/core/create-core-services.ts +83 -65
- package/src/core/lifecycle.ts +9 -9
- package/src/core-config.ts +3 -3
- package/src/index.ts +5 -5
- package/src/modules/access/__tests__/access-control.admin-root-floor.test.ts +4 -4
- package/src/modules/access/__tests__/access-own-read-grant.test.ts +14 -14
- package/src/modules/access/__tests__/access-requests.routes.test.ts +23 -23
- package/src/modules/access/__tests__/access.routes.admins.test.ts +4 -4
- package/src/modules/access/__tests__/access.routes.batch.test.ts +4 -4
- package/src/modules/access/__tests__/access.routes.folder-governs.test.ts +6 -6
- package/src/modules/access/__tests__/access.routes.group-grant.test.ts +6 -6
- package/src/modules/access/__tests__/access.routes.overrides.test.ts +5 -5
- package/src/modules/access/__tests__/access.routes.proposal-branch.test.ts +6 -6
- package/src/modules/access/__tests__/access.routes.prospective.test.ts +3 -3
- package/src/modules/access/__tests__/access.routes.revoke.test.ts +6 -6
- package/src/modules/access/__tests__/access.routes.unknown-email.test.ts +6 -6
- package/src/modules/access/__tests__/admin-locked-commit.test.ts +6 -6
- package/src/modules/access/__tests__/admin-route-helpers.test.ts +5 -5
- package/src/modules/access/__tests__/groups-admin.service.test.ts +44 -44
- package/src/modules/access/__tests__/roles-admin.security.test.ts +14 -13
- package/src/modules/access/__tests__/roles-admin.service.test.ts +34 -34
- package/src/modules/access/__tests__/roles-capabilities.test.ts +29 -29
- package/src/modules/access/__tests__/roles.routes.test.ts +11 -11
- package/src/modules/access/__tests__/synced-groups-committer.test.ts +14 -14
- package/src/modules/access/__tests__/user-access-removal.service.test.ts +33 -33
- package/src/modules/access/access-control.service.ts +1 -1
- package/src/modules/access/access-declarations.ts +2 -2
- package/src/modules/access/access-mutation.service.ts +2 -2
- package/src/modules/access/access-requests.routes.ts +7 -7
- package/src/modules/access/access-requests.service.ts +13 -13
- package/src/modules/access/access.routes.ts +11 -11
- package/src/modules/access/admin-locked-commit.ts +11 -11
- package/src/modules/access/admin-route-helpers.ts +5 -5
- package/src/modules/access/change-read-gate.ts +1 -1
- package/src/modules/access/groups-admin.service.ts +7 -7
- package/src/modules/access/reference-scan.ts +1 -1
- package/src/modules/access/roles-admin.service.ts +9 -9
- package/src/modules/access/synced-groups-committer.ts +11 -11
- package/src/modules/access/user-access-removal.service.ts +7 -7
- package/src/modules/access-model/__tests__/access-grammar.test.ts +2 -2
- package/src/modules/access-model/access-errors.ts +4 -4
- package/src/modules/access-model/access-grammar.ts +4 -4
- package/src/modules/access-model/change-gate.ts +1 -1
- package/src/modules/access-model/roles-yaml-guard.ts +4 -4
- package/src/modules/agent-guide/__tests__/agent-guide.test.ts +19 -4
- package/src/modules/agent-guide/__tests__/agent-guide.tools.test.ts +1 -1
- package/src/modules/agent-guide/__tests__/guide-matches-code.test.ts +2 -2
- package/src/modules/agent-guide/agent-guide.ts +48 -22
- package/src/modules/agent-guide/guide-budget.ts +6 -2
- package/src/modules/agent-instructions/__tests__/agent-instructions.route.test.ts +4 -5
- package/src/modules/agent-instructions/__tests__/compose.test.ts +1 -1
- package/src/modules/agent-instructions/__tests__/shared-file-rules.test.ts +113 -7
- package/src/modules/agent-instructions/agent-instructions.routes.ts +12 -5
- package/src/modules/agent-instructions/compose.ts +24 -9
- package/src/modules/agent-instructions/shared-file-rules.ts +53 -11
- package/src/modules/agent-scope/__tests__/agent-surfaces.connect-as.test.ts +1 -1
- package/src/modules/audit/__tests__/agent-rest-audit.middleware.test.ts +113 -113
- package/src/modules/audit/__tests__/event-classifier.test.ts +121 -121
- package/src/modules/audit/event-classifier.ts +155 -155
- package/src/modules/auth/__tests__/account-deactivation.test.ts +1 -1
- package/src/modules/auth/__tests__/account-erasure.approval-gate.test.ts +4 -4
- package/src/modules/auth/__tests__/account-erasure.participants.test.ts +56 -0
- package/src/modules/auth/__tests__/account-switch-lock.pg.test.ts +2 -2
- package/src/modules/auth/__tests__/account-switch-lock.test.ts +2 -2
- package/src/modules/auth/__tests__/account.routes.test.ts +73 -11
- package/src/modules/auth/__tests__/auth.service.test.ts +1 -1
- package/src/modules/auth/account-erasure.service.ts +27 -9
- package/src/modules/auth/account-hooks.ts +34 -0
- package/src/modules/auth/account-switch-lock.ts +2 -2
- package/src/modules/auth/account.routes.ts +23 -5
- package/src/modules/auth/auth.service.ts +4 -4
- package/src/modules/auth/index.ts +1 -0
- package/src/modules/database/__tests__/advisory-lock.test.ts +169 -169
- package/src/modules/database/__tests__/connection.pg.test.ts +55 -0
- package/src/modules/database/__tests__/connection.test.ts +30 -0
- package/src/modules/database/__tests__/migrations-unqualified.test.ts +32 -32
- package/src/modules/database/connection.ts +12 -0
- package/src/modules/database/core-schema.ts +2 -2
- package/src/modules/diff/__tests__/diff.routes.read-gate.test.ts +2 -2
- package/src/modules/diff/__tests__/diff.routes.rejectPathsLocked.test.ts +12 -12
- package/src/modules/diff/diff.routes.ts +8 -8
- package/src/modules/embed/__tests__/embed.service.lock.test.ts +7 -7
- package/src/modules/embed/__tests__/embed.service.test.ts +48 -62
- package/src/modules/embed/__tests__/embed.tools.test.ts +1 -1
- package/src/modules/embed/embed.routes.ts +1 -1
- package/src/modules/embed/embed.service.ts +17 -17
- package/src/modules/kb-fs/__tests__/branch-name.test.ts +2 -2
- package/src/modules/kb-fs/__tests__/file-change-notifier.test.ts +23 -4
- package/src/modules/kb-fs/__tests__/locking-filesystem.test.ts +264 -305
- package/src/modules/kb-fs/__tests__/move-with-edits.test.ts +103 -40
- package/src/modules/kb-fs/__tests__/repo-path.test.ts +8 -8
- package/src/modules/kb-fs/branch-name.ts +8 -8
- package/src/modules/kb-fs/file-change-notifier.ts +55 -32
- package/src/modules/kb-fs/locking-filesystem.ts +34 -48
- package/src/modules/kb-fs/repo-path.ts +5 -5
- package/src/modules/kb-fs/tmp-ref.ts +3 -3
- package/src/modules/kb-sync/__tests__/kb-sync.service.test.ts +36 -36
- package/src/modules/kb-sync/index.ts +1 -1
- package/src/modules/kb-sync/kb-sync.interface.ts +3 -3
- package/src/modules/kb-sync/kb-sync.service.ts +9 -9
- package/src/modules/marketplace/__tests__/github-facade.test.ts +1 -1
- package/src/modules/marketplace/__tests__/marketplace-git.test.ts +1 -1
- package/src/modules/mcp/__tests__/mcp-proxy-helpers.test.ts +4 -2
- package/src/modules/mcp/__tests__/mcp.e2e.test.ts +69 -8
- package/src/modules/mcp/__tests__/mcp.service.test.ts +91 -13
- package/src/modules/mcp/__tests__/read-only-hint.pg.test.ts +194 -0
- package/src/modules/mcp/mcp.service.ts +89 -28
- package/src/modules/onboarding/__tests__/starter-pack.service.test.ts +59 -59
- package/src/modules/onboarding/onboarding.contract.ts +1 -1
- package/src/modules/onboarding/onboarding.routes.ts +2 -2
- package/src/modules/onboarding/starter-pack.service.ts +7 -9
- package/src/modules/plugins/__tests__/bundle-dialect.e2e.test.ts +1 -1
- package/src/modules/plugins/__tests__/compile-marketplace.test.ts +1 -1
- package/src/modules/plugins/__tests__/join-request-jobs.service.test.ts +43 -43
- package/src/modules/plugins/__tests__/join-requests.service.test.ts +19 -19
- package/src/modules/plugins/__tests__/join-requests.settlement.test.ts +26 -26
- package/src/modules/plugins/__tests__/plugin-rename.service.test.ts +46 -21
- package/src/modules/plugins/__tests__/plugins.routes.test.ts +31 -31
- package/src/modules/plugins/join-request-jobs.service.ts +10 -10
- package/src/modules/plugins/join-requests.service.ts +4 -4
- package/src/modules/plugins/plugin-rename.service.ts +1 -1
- package/src/modules/plugins/plugins.routes.ts +9 -9
- package/src/modules/secrets-vault/__tests__/db-secrets-vault.managed.test.ts +773 -0
- package/src/modules/secrets-vault/__tests__/db-secrets-vault.oauth.test.ts +28 -1
- package/src/modules/secrets-vault/__tests__/managed-sign-in.route.test.ts +351 -0
- package/src/modules/secrets-vault/db-secrets-vault.service.ts +562 -95
- package/src/modules/secrets-vault/index.ts +7 -0
- package/src/modules/secrets-vault/managed-sign-in-erasure.ts +41 -0
- package/src/modules/secrets-vault/secrets-variable-loader.ts +134 -134
- package/src/modules/secrets-vault/secrets-vault.contract.ts +152 -0
- package/src/modules/secrets-vault/secrets-vault.routes.ts +157 -10
- package/src/modules/settings/__tests__/repository-source.test.ts +1 -1
- package/src/modules/settings/__tests__/setup.routes.layout-phase.test.ts +1 -1
- package/src/modules/settings/__tests__/setup.routes.managed-phase.test.ts +1 -1
- package/src/modules/settings/connection-check.ts +1 -1
- package/src/modules/settings/deployment-settings.service.ts +1 -1
- package/src/modules/settings/git-root-folders.ts +1 -1
- package/src/modules/settings/setup.routes.ts +1 -1
- package/src/modules/skills/__tests__/allowed-tools-warn.tools.test.ts +3 -3
- package/src/modules/skills/__tests__/branch-skills.tools.test.ts +1 -1
- package/src/modules/skills/__tests__/pending-skills.service.test.ts +8 -8
- package/src/modules/skills/__tests__/skill-access-requests.routes.test.ts +18 -18
- package/src/modules/skills/__tests__/skills.service.test.ts +3 -3
- package/src/modules/skills/pending-skills.service.ts +3 -3
- package/src/modules/skills/skill-access-requests.routes.ts +7 -7
- package/src/modules/tool-helpers/__tests__/agent-roles-write.test.ts +4 -4
- package/src/modules/tool-helpers/__tests__/branch-declaration.test.ts +3 -3
- package/src/modules/tool-helpers/__tests__/can-write.tools.test.ts +3 -3
- package/src/modules/tool-helpers/__tests__/phase4-tools.test.ts +4 -4
- package/src/modules/tool-helpers/__tests__/tools-surface.test.ts +3 -3
- package/src/modules/tool-helpers/__tests__/validate-token.test.ts +1 -1
- package/src/modules/tool-helpers/tool-context.ts +6 -6
- package/src/modules/tool-helpers/tool-handler.ts +2 -2
- package/src/modules/tool-helpers/tool.contract.ts +4 -4
- package/src/modules/tool-manuals/__tests__/pending-tools.service.test.ts +9 -9
- package/src/modules/tool-manuals/__tests__/tool-manuals.managed-sign-in.test.ts +89 -0
- package/src/modules/tool-manuals/__tests__/tool-manuals.restart.test.ts +1 -1
- package/src/modules/tool-manuals/__tests__/tool-manuals.tools.test.ts +36 -1
- package/src/modules/tool-manuals/mcp-server-edit.service.ts +1 -1
- package/src/modules/tool-manuals/pending-tools.service.ts +3 -3
- package/src/modules/tool-manuals/tool-delete.service.ts +1 -1
- package/src/modules/tool-manuals/tool-manuals.contract.ts +41 -3
- package/src/modules/tool-manuals/tool-manuals.service.ts +53 -5
- package/src/modules/tool-manuals/tool-manuals.tools.ts +41 -15
- package/src/modules/tool-registry/__tests__/own-tool-schemas.test.ts +4 -4
- package/src/modules/tool-registry/__tests__/read-only-hints.test.ts +3 -3
- package/src/modules/tool-registry/__tests__/tool-description-length.test.ts +6 -6
- package/src/modules/{workflow → version-control}/__tests__/apply-failure.test.ts +54 -54
- package/src/modules/{workflow → version-control}/__tests__/event-bus.test.ts +27 -27
- package/src/modules/{workflow → version-control}/__tests__/events-delivery.test.ts +37 -37
- package/src/modules/{workflow → version-control}/__tests__/file-lock.service.deletion-gate.test.ts +2 -2
- package/src/modules/{workflow → version-control}/__tests__/file-lock.service.path-identity.test.ts +8 -8
- package/src/modules/{workflow → version-control}/__tests__/merge-announces-tree.test.ts +11 -11
- package/src/modules/{workflow → version-control}/__tests__/pending-commits.worker.concurrency.test.ts +9 -9
- package/src/modules/{workflow → version-control}/__tests__/pending-commits.worker.test.ts +25 -25
- package/src/modules/{workflow → version-control}/__tests__/preserve-roles-yaml.test.ts +42 -42
- package/src/modules/version-control/__tests__/public-surface.test.ts +114 -0
- package/src/modules/{workflow/__tests__/workflow.routes.folder-proposals.test.ts → version-control/__tests__/version-control.routes.folder-proposals.test.ts} +18 -18
- package/src/modules/{workflow/__tests__/workflow.routes.fork-point-file.test.ts → version-control/__tests__/version-control.routes.fork-point-file.test.ts} +19 -19
- package/src/modules/{workflow/__tests__/workflow.routes.history-read-gate.test.ts → version-control/__tests__/version-control.routes.history-read-gate.test.ts} +13 -13
- package/src/modules/{workflow/__tests__/workflow.routes.lock-path.test.ts → version-control/__tests__/version-control.routes.lock-path.test.ts} +18 -18
- package/src/modules/{workflow/__tests__/workflow.routes.open-change-request.test.ts → version-control/__tests__/version-control.routes.open-change-request.test.ts} +7 -7
- package/src/modules/{workflow/__tests__/workflow.routes.push-refused.test.ts → version-control/__tests__/version-control.routes.push-refused.test.ts} +14 -14
- package/src/modules/{workflow/__tests__/workflow.service.branch-in-use.test.ts → version-control/__tests__/version-control.service.branch-in-use.test.ts} +6 -6
- package/src/modules/{workflow/__tests__/workflow.service.commitFileWhileLocked.test.ts → version-control/__tests__/version-control.service.commitFileWhileLocked.test.ts} +14 -14
- package/src/modules/{workflow/__tests__/workflow.service.delete-branch.test.ts → version-control/__tests__/version-control.service.delete-branch.test.ts} +14 -14
- package/src/modules/{workflow/__tests__/workflow.service.deleted-branch-sweep.test.ts → version-control/__tests__/version-control.service.deleted-branch-sweep.test.ts} +4 -4
- package/src/modules/{workflow/__tests__/workflow.service.facade.test.ts → version-control/__tests__/version-control.service.facade.test.ts} +100 -102
- package/src/modules/{workflow/__tests__/workflow.service.folder-proposals.test.ts → version-control/__tests__/version-control.service.folder-proposals.test.ts} +7 -7
- package/src/modules/{workflow/__tests__/workflow.service.platform-restore.test.ts → version-control/__tests__/version-control.service.platform-restore.test.ts} +6 -6
- package/src/modules/{workflow/__tests__/workflow.service.read-gate.test.ts → version-control/__tests__/version-control.service.read-gate.test.ts} +9 -9
- package/src/modules/{workflow/__tests__/workflow.service.releaseLock.test.ts → version-control/__tests__/version-control.service.releaseLock.test.ts} +85 -75
- package/src/modules/{workflow/__tests__/workflow.service.repository-replaced.test.ts → version-control/__tests__/version-control.service.repository-replaced.test.ts} +4 -4
- package/src/modules/{workflow/__tests__/workflow.service.sync.test.ts → version-control/__tests__/version-control.service.sync.test.ts} +17 -17
- package/src/modules/{workflow/__tests__/workflow.service.update-change-request.pg.test.ts → version-control/__tests__/version-control.service.update-change-request.pg.test.ts} +6 -6
- package/src/modules/{workflow/__tests__/workflow.service.update-change-request.test.ts → version-control/__tests__/version-control.service.update-change-request.test.ts} +11 -11
- package/src/modules/{workflow/__tests__/workflow.service.update-from-target.test.ts → version-control/__tests__/version-control.service.update-from-target.test.ts} +22 -22
- package/src/modules/{workflow → version-control}/agent-tools/__tests__/change-request-read.tools.test.ts +3 -3
- package/src/modules/{workflow → version-control}/agent-tools/__tests__/update-change-request.parity.test.ts +16 -16
- package/src/modules/{workflow/agent-tools/__tests__/workflow.tools.test.ts → version-control/agent-tools/__tests__/version-control.tools.test.ts} +9 -9
- package/src/modules/{workflow → version-control}/agent-tools/change-request-read.tools.ts +2 -2
- package/src/modules/{workflow/agent-tools/workflow.tools.ts → version-control/agent-tools/version-control.tools.ts} +30 -30
- package/src/modules/{workflow → version-control}/change-request-hooks.ts +1 -1
- package/src/modules/{workflow/review-workflow → version-control/change-request-review}/__tests__/approval-states.test.ts +5 -5
- package/src/modules/{workflow/review-workflow → version-control/change-request-review}/__tests__/cancel-pr.test.ts +8 -8
- package/src/modules/{workflow/review-workflow → version-control/change-request-review}/__tests__/carry-approvals-forward.test.ts +6 -6
- package/src/modules/{workflow/review-workflow → version-control/change-request-review}/__tests__/erase-approver.test.ts +5 -5
- package/src/modules/{workflow/review-workflow → version-control/change-request-review}/__tests__/merge-gate.test.ts +3 -3
- package/src/modules/{workflow/review-workflow → version-control/change-request-review}/__tests__/merge-records-own-commit.test.ts +3 -3
- package/src/modules/{workflow/review-workflow/review-workflow.interface.ts → version-control/change-request-review/change-request-review.interface.ts} +1 -1
- package/src/modules/{workflow/review-workflow/review-workflow.service.ts → version-control/change-request-review/change-request-review.service.ts} +28 -28
- package/src/modules/{workflow → version-control}/event-bus.ts +14 -14
- package/src/modules/{workflow → version-control}/events-delivery.ts +11 -11
- package/src/modules/{workflow → version-control}/events.routes.ts +5 -5
- package/src/modules/{workflow → version-control}/file-lock.service.ts +6 -6
- package/src/modules/{workflow → version-control}/git/__tests__/git-test-helpers.ts +3 -3
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.accessGating.test.ts +5 -5
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.appliedChange.test.ts +4 -4
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.changedFilesForPr.test.ts +16 -16
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.changedPathsMemo.test.ts +2 -2
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.commitChanges.test.ts +3 -3
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.commitFile.strayPath.test.ts +10 -10
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.commitFile.test.ts +3 -3
- package/src/modules/version-control/git/__tests__/git.service.commitLanded.test.ts +199 -0
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.createBranch.test.ts +3 -3
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.deleteBranch.test.ts +7 -7
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.diffFileAtCommit.test.ts +9 -9
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.diffFileBetweenBranches.test.ts +23 -23
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.fileBytesAtCommit.test.ts +7 -7
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.fileContentsAtCommit.test.ts +3 -3
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.forkPoint.test.ts +2 -2
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.history-guards.test.ts +2 -2
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.list-branches.test.ts +12 -12
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.listTrackedFiles.test.ts +2 -2
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.logForFile.test.ts +6 -6
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.mergeChangeRequest.test.ts +99 -22
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.mergeIntoBranch.test.ts +16 -16
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.pendingChanges.test.ts +2 -2
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.postMergePull.test.ts +5 -5
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.prFetchFailure.test.ts +2 -2
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.pull.test.ts +12 -12
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.readFileAtRef.test.ts +3 -3
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.revertPathsAndPush.test.ts +2 -2
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.status.test.ts +4 -4
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.syncFromRemote.test.ts +8 -8
- package/src/modules/{workflow → version-control}/git/__tests__/git.service.worktrees.test.ts +4 -4
- package/src/modules/{workflow → version-control}/git/__tests__/pull-request.service.list-fetch.test.ts +2 -2
- package/src/modules/{workflow → version-control}/git/__tests__/pull-request.service.test.ts +6 -6
- package/src/modules/{workflow → version-control}/git/git.service.ts +112 -59
- package/src/modules/{workflow → version-control}/git/node-git-runner.ts +1 -1
- package/src/modules/{workflow → version-control}/git/pull-request.service.ts +12 -12
- package/src/modules/{workflow → version-control}/index.ts +6 -5
- package/src/modules/{workflow → version-control}/pending-commits.service.ts +2 -2
- package/src/modules/{workflow → version-control}/pending-commits.worker.ts +8 -8
- package/src/modules/{workflow → version-control}/read-on-branch.ts +2 -2
- package/src/modules/{workflow/workflow-hooks.ts → version-control/version-control-hooks.ts} +44 -5
- package/src/modules/{workflow/workflow.routes.ts → version-control/version-control.routes.ts} +64 -63
- package/src/modules/{workflow/workflow.service.ts → version-control/version-control.service.ts} +96 -109
- package/src/modules/workspace/__tests__/agent-access.gate.test.ts +8 -8
- package/src/modules/workspace/__tests__/agent-downloads.test.ts +13 -16
- package/src/modules/workspace/__tests__/agent-uploads.test.ts +11 -12
- package/src/modules/workspace/__tests__/escape-sequences.routes.test.ts +11 -16
- package/src/modules/workspace/__tests__/file-stat-access.test.ts +3 -3
- package/src/modules/workspace/__tests__/git-internals.security.test.ts +27 -27
- package/src/modules/workspace/__tests__/kb-repository.test.ts +1 -1
- package/src/modules/workspace/__tests__/rest-tool-arguments.test.ts +3 -3
- package/src/modules/workspace/__tests__/start-session.default-branch.test.ts +152 -0
- package/src/modules/workspace/__tests__/workspace-paths-inside-the-repo.test.ts +6 -6
- package/src/modules/workspace/__tests__/workspace-tmp.tools.test.ts +13 -14
- package/src/modules/workspace/__tests__/workspace.routes.at-ref.test.ts +6 -6
- package/src/modules/workspace/__tests__/workspace.routes.branch-errors.test.ts +4 -4
- package/src/modules/workspace/__tests__/workspace.routes.create-grant.test.ts +6 -6
- package/src/modules/workspace/__tests__/workspace.routes.delete.test.ts +8 -8
- package/src/modules/workspace/__tests__/workspace.routes.download-implies-read.test.ts +4 -4
- package/src/modules/workspace/__tests__/workspace.routes.download.test.ts +6 -6
- package/src/modules/workspace/__tests__/workspace.routes.file-writes.test.ts +6 -6
- package/src/modules/workspace/__tests__/workspace.routes.folder-zip-access.test.ts +4 -4
- package/src/modules/workspace/__tests__/workspace.routes.folders.test.ts +6 -6
- package/src/modules/workspace/__tests__/workspace.routes.move-platform-files.test.ts +7 -7
- package/src/modules/workspace/__tests__/workspace.routes.read-gate.test.ts +13 -13
- package/src/modules/workspace/__tests__/workspace.service.any-workspace-credentials.test.ts +1 -1
- package/src/modules/workspace/__tests__/workspace.service.replaced-repository.test.ts +1 -1
- package/src/modules/workspace/__tests__/workspace.service.worktrees.test.ts +1 -1
- package/src/modules/workspace/__tests__/workspace.tools.agents-file.test.ts +5 -5
- package/src/modules/workspace/__tests__/workspace.tools.branch-errors.test.ts +5 -5
- package/src/modules/workspace/__tests__/workspace.tools.test.ts +27 -27
- package/src/modules/workspace/agent-access.gate.ts +5 -5
- package/src/modules/workspace/git-internals.middleware.ts +2 -2
- package/src/modules/workspace/kb-repository.ts +1 -1
- package/src/modules/workspace/startup/__tests__/kb-startup-runner.degraded.test.ts +1 -1
- package/src/modules/workspace/startup/__tests__/kb-startup-runner.test.ts +1 -1
- package/src/modules/workspace/startup/__tests__/kb-startup-runner.worktrees.test.ts +1 -1
- package/src/modules/workspace/startup/kb-git.ts +1 -1
- package/src/modules/workspace/startup/steps/__tests__/steps.test.ts +94 -70
- package/src/modules/workspace/startup/steps/seed-tree.ts +4 -5
- package/src/modules/workspace/startup/steps/template-files.step.ts +4 -5
- package/src/modules/workspace/startup/steps/template-source.ts +21 -6
- package/src/modules/workspace/workspace-tmp.ts +4 -4
- package/src/modules/workspace/workspace.routes.ts +26 -26
- package/src/modules/workspace/workspace.service.ts +11 -11
- package/src/modules/workspace/workspace.tools.ts +17 -10
- package/src/shared/__tests__/canonical-file-identity.test.ts +5 -5
- package/src/shared/__tests__/fire-and-forget.test.ts +39 -0
- package/src/shared/__tests__/http-errors.test.ts +4 -4
- package/src/shared/canonical-file-identity.ts +5 -5
- package/src/shared/domain-errors.ts +44 -44
- package/src/shared/fire-and-forget.ts +26 -0
- package/src/shared/git.contract.ts +1 -1
- package/src/shared/http-errors.ts +3 -3
- package/src/shared/kb-context.ts +130 -130
- package/src/shared/pending-proposals.ts +4 -4
- package/src/tenancy/__tests__/tenant-host.test.ts +372 -372
- package/src/tenancy/__tests__/tenant-runtime.test.ts +221 -221
- package/src/tenancy/__tests__/tenant-secrets.test.ts +35 -35
- package/src/tenancy/index.ts +35 -35
- package/src/tenancy/static-tenant-source.ts +1 -1
- package/src/tenancy/tenant-host.ts +261 -261
- package/src/tenancy/tenant-runtime.ts +208 -208
- package/src/tenancy/tenant-source.contract.ts +59 -59
- package/dist/modules/workflow/agent-tools/change-request-read-shape.d.ts.map +0 -1
- package/dist/modules/workflow/agent-tools/change-request-read-shape.js.map +0 -1
- package/dist/modules/workflow/agent-tools/change-request-read.tools.d.ts.map +0 -1
- package/dist/modules/workflow/agent-tools/change-request-read.tools.js.map +0 -1
- package/dist/modules/workflow/agent-tools/change-request-summary.d.ts.map +0 -1
- package/dist/modules/workflow/agent-tools/change-request-summary.js.map +0 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.d.ts.map +0 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.js.map +0 -1
- package/dist/modules/workflow/change-request-hooks.d.ts.map +0 -1
- package/dist/modules/workflow/change-request-hooks.js.map +0 -1
- package/dist/modules/workflow/event-bus.d.ts.map +0 -1
- package/dist/modules/workflow/event-bus.js.map +0 -1
- package/dist/modules/workflow/events-delivery.d.ts.map +0 -1
- package/dist/modules/workflow/events-delivery.js.map +0 -1
- package/dist/modules/workflow/events.routes.d.ts.map +0 -1
- package/dist/modules/workflow/events.routes.js.map +0 -1
- package/dist/modules/workflow/file-lock.service.d.ts.map +0 -1
- package/dist/modules/workflow/file-lock.service.js.map +0 -1
- package/dist/modules/workflow/git/change-request-link.d.ts.map +0 -1
- package/dist/modules/workflow/git/change-request-link.js.map +0 -1
- package/dist/modules/workflow/git/git-version.d.ts.map +0 -1
- package/dist/modules/workflow/git/git-version.js.map +0 -1
- package/dist/modules/workflow/git/git.service.d.ts.map +0 -1
- package/dist/modules/workflow/git/git.service.js.map +0 -1
- package/dist/modules/workflow/git/merge-commit.d.ts.map +0 -1
- package/dist/modules/workflow/git/merge-commit.js.map +0 -1
- package/dist/modules/workflow/git/node-git-runner.d.ts.map +0 -1
- package/dist/modules/workflow/git/node-git-runner.js.map +0 -1
- package/dist/modules/workflow/git/pull-request.service.d.ts.map +0 -1
- package/dist/modules/workflow/git/pull-request.service.js.map +0 -1
- package/dist/modules/workflow/index.d.ts.map +0 -1
- package/dist/modules/workflow/index.js.map +0 -1
- package/dist/modules/workflow/pending-commits.service.d.ts.map +0 -1
- package/dist/modules/workflow/pending-commits.service.js.map +0 -1
- package/dist/modules/workflow/pending-commits.worker.d.ts.map +0 -1
- package/dist/modules/workflow/pending-commits.worker.js.map +0 -1
- package/dist/modules/workflow/read-on-branch.d.ts.map +0 -1
- package/dist/modules/workflow/read-on-branch.js.map +0 -1
- package/dist/modules/workflow/recovery-bot.d.ts.map +0 -1
- package/dist/modules/workflow/recovery-bot.js.map +0 -1
- package/dist/modules/workflow/review-workflow/approval-lock.d.ts.map +0 -1
- package/dist/modules/workflow/review-workflow/approval-lock.js.map +0 -1
- package/dist/modules/workflow/review-workflow/review-workflow.interface.d.ts.map +0 -1
- package/dist/modules/workflow/review-workflow/review-workflow.interface.js +0 -2
- package/dist/modules/workflow/review-workflow/review-workflow.interface.js.map +0 -1
- package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts.map +0 -1
- package/dist/modules/workflow/review-workflow/review-workflow.service.js.map +0 -1
- package/dist/modules/workflow/sanitize-error.d.ts.map +0 -1
- package/dist/modules/workflow/sanitize-error.js.map +0 -1
- package/dist/modules/workflow/workflow-hooks.d.ts.map +0 -1
- package/dist/modules/workflow/workflow-hooks.js.map +0 -1
- package/dist/modules/workflow/workflow.routes.d.ts.map +0 -1
- package/dist/modules/workflow/workflow.routes.js.map +0 -1
- package/dist/modules/workflow/workflow.service.d.ts.map +0 -1
- package/dist/modules/workflow/workflow.service.js.map +0 -1
- package/src/modules/mcp/__tests__/read-only-hint.e2e.test.ts +0 -213
- /package/dist/modules/{workflow → version-control}/agent-tools/change-request-read-shape.d.ts +0 -0
- /package/dist/modules/{workflow → version-control}/agent-tools/change-request-read-shape.js +0 -0
- /package/dist/modules/{workflow → version-control}/agent-tools/change-request-read.tools.d.ts +0 -0
- /package/dist/modules/{workflow → version-control}/agent-tools/change-request-summary.d.ts +0 -0
- /package/dist/modules/{workflow → version-control}/agent-tools/change-request-summary.js +0 -0
- /package/dist/modules/{workflow → version-control}/change-request-hooks.js +0 -0
- /package/dist/modules/{workflow/review-workflow → version-control/change-request-review}/approval-lock.d.ts +0 -0
- /package/dist/modules/{workflow/review-workflow → version-control/change-request-review}/approval-lock.js +0 -0
- /package/dist/modules/{workflow → version-control}/events-delivery.js +0 -0
- /package/dist/modules/{workflow → version-control}/events.routes.js +0 -0
- /package/dist/modules/{workflow → version-control}/git/change-request-link.d.ts +0 -0
- /package/dist/modules/{workflow → version-control}/git/change-request-link.js +0 -0
- /package/dist/modules/{workflow → version-control}/git/git-version.d.ts +0 -0
- /package/dist/modules/{workflow → version-control}/git/git-version.js +0 -0
- /package/dist/modules/{workflow → version-control}/git/merge-commit.d.ts +0 -0
- /package/dist/modules/{workflow → version-control}/git/merge-commit.js +0 -0
- /package/dist/modules/{workflow → version-control}/git/node-git-runner.d.ts +0 -0
- /package/dist/modules/{workflow → version-control}/recovery-bot.d.ts +0 -0
- /package/dist/modules/{workflow → version-control}/recovery-bot.js +0 -0
- /package/dist/modules/{workflow → version-control}/sanitize-error.d.ts +0 -0
- /package/dist/modules/{workflow → version-control}/sanitize-error.js +0 -0
- /package/src/modules/{workflow → version-control}/__tests__/change-request-hooks.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/__tests__/fake-file-lock-db.ts +0 -0
- /package/src/modules/{workflow → version-control}/__tests__/pending-commits.canonical.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/__tests__/pending-commits.enqueue-if-absent.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/__tests__/pending-commits.repository-replaced.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/__tests__/sanitize-error.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/agent-tools/__tests__/change-request-read-shape.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/agent-tools/change-request-read-shape.ts +0 -0
- /package/src/modules/{workflow → version-control}/agent-tools/change-request-summary.ts +0 -0
- /package/src/modules/{workflow/review-workflow → version-control/change-request-review}/approval-lock.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/__tests__/branchAuthor.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/__tests__/change-request-link.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/__tests__/git-version.failure.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/__tests__/git-version.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/__tests__/node-git-runner.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/__tests__/pull-request.service.getPrDetail.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/__tests__/pull-request.service.placeholder.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/__tests__/pull-request.service.viewer-can-cancel.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/__tests__/pull-request.service.viewer-can-delete.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/__tests__/pull-request.service.viewer-can-update.test.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/change-request-link.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/git-version.ts +0 -0
- /package/src/modules/{workflow → version-control}/git/merge-commit.ts +0 -0
- /package/src/modules/{workflow → version-control}/recovery-bot.ts +0 -0
- /package/src/modules/{workflow → version-control}/sanitize-error.ts +0 -0
|
@@ -125,29 +125,31 @@ import {
|
|
|
125
125
|
import {
|
|
126
126
|
DbSecretsVaultService,
|
|
127
127
|
McpOAuthDiscoveryService,
|
|
128
|
+
managedSignInErasure,
|
|
128
129
|
registerBevelSecretsVariableLoader,
|
|
130
|
+
type ManagedSignInPort,
|
|
129
131
|
} from '../modules/secrets-vault/index.js';
|
|
130
132
|
import { ConnectionProbeService } from '../modules/connection-probe/index.js';
|
|
131
|
-
import { GitService } from '../modules/
|
|
132
|
-
import { NodeGitRunner } from '../modules/
|
|
133
|
-
import { PullRequestService } from '../modules/
|
|
133
|
+
import { GitService } from '../modules/version-control/git/git.service.js';
|
|
134
|
+
import { NodeGitRunner } from '../modules/version-control/git/node-git-runner.js';
|
|
135
|
+
import { PullRequestService } from '../modules/version-control/git/pull-request.service.js';
|
|
134
136
|
import { WorkspaceIdMutex, WorkspaceMutex } from '../modules/kb-fs/mutex.js';
|
|
135
|
-
import { assertGitVersion } from '../modules/
|
|
137
|
+
import { assertGitVersion } from '../modules/version-control/git/git-version.js';
|
|
136
138
|
import { DiffService } from '../modules/diff/diff.service.js';
|
|
137
|
-
import {
|
|
138
|
-
import { FileLockService } from '../modules/
|
|
139
|
-
import {
|
|
139
|
+
import { ChangeRequestReviewService } from '../modules/version-control/change-request-review/change-request-review.service.js';
|
|
140
|
+
import { FileLockService } from '../modules/version-control/file-lock.service.js';
|
|
141
|
+
import { VersionControlEventBus } from '../modules/version-control/index.js';
|
|
140
142
|
import { FileChangeNotifier } from '../modules/kb-fs/file-change-notifier.js';
|
|
141
143
|
import { StarterPackService } from '../modules/onboarding/starter-pack.service.js';
|
|
142
|
-
import {
|
|
143
|
-
import {
|
|
144
|
-
import { ChangeRequestHooks, type IChangeRequestHooks } from '../modules/
|
|
145
|
-
import { PendingCommitsService } from '../modules/
|
|
144
|
+
import { VersionControlService } from '../modules/version-control/version-control.service.js';
|
|
145
|
+
import { VersionControlHooks } from '../modules/version-control/version-control-hooks.js';
|
|
146
|
+
import { ChangeRequestHooks, type IChangeRequestHooks } from '../modules/version-control/change-request-hooks.js';
|
|
147
|
+
import { PendingCommitsService } from '../modules/version-control/pending-commits.service.js';
|
|
146
148
|
import {
|
|
147
149
|
PendingCommitsWorker,
|
|
148
150
|
consoleSystemNoticeSink,
|
|
149
|
-
} from '../modules/
|
|
150
|
-
import { ensureRecoveryBotUser } from '../modules/
|
|
151
|
+
} from '../modules/version-control/pending-commits.worker.js';
|
|
152
|
+
import { ensureRecoveryBotUser } from '../modules/version-control/recovery-bot.js';
|
|
151
153
|
import { AdminAccessService } from '../modules/admin/admin-access.service.js';
|
|
152
154
|
import {
|
|
153
155
|
SyncedGroupsWriter,
|
|
@@ -353,9 +355,9 @@ export interface CoreServices {
|
|
|
353
355
|
gitService: GitService;
|
|
354
356
|
pullRequestService: PullRequestService;
|
|
355
357
|
diffService: DiffService;
|
|
356
|
-
|
|
358
|
+
changeRequestReviewService: ChangeRequestReviewService;
|
|
357
359
|
fileLockService: FileLockService;
|
|
358
|
-
|
|
360
|
+
versionControlService: VersionControlService;
|
|
359
361
|
/**
|
|
360
362
|
* The seam for "a change request was opened": a deployment registers here
|
|
361
363
|
* how the reviewers are told (the cloud's mail, say), and the open's answer
|
|
@@ -364,7 +366,7 @@ export interface CoreServices {
|
|
|
364
366
|
changeRequestHooks: IChangeRequestHooks;
|
|
365
367
|
/** Remote sync (`POST /api/sync`): a git host or pipeline makes the clones catch up. */
|
|
366
368
|
kbSyncService: KbSyncService;
|
|
367
|
-
eventBus:
|
|
369
|
+
eventBus: VersionControlEventBus;
|
|
368
370
|
fileChangeNotifier: FileChangeNotifier;
|
|
369
371
|
pendingCommitsService: PendingCommitsService;
|
|
370
372
|
pendingCommitsWorker: PendingCommitsWorker;
|
|
@@ -440,6 +442,12 @@ export interface CoreServices {
|
|
|
440
442
|
// ── Server-time seams (enterprise overwrites after construction) ────────
|
|
441
443
|
/** `start_session` backing — core default {@link UuidSessionSink}. */
|
|
442
444
|
sessionSink: ISessionSink;
|
|
445
|
+
/**
|
|
446
|
+
* The managed sign-in port (see `CorePorts.managedSignIns`), or null when
|
|
447
|
+
* the distribution registers none. Mutable for the same reason the session
|
|
448
|
+
* sink is: the overlay builds it after core, from services core returned.
|
|
449
|
+
*/
|
|
450
|
+
managedSignIns: ManagedSignInPort | null;
|
|
443
451
|
/** Connection-key LLM metering view — core default unmetered. */
|
|
444
452
|
usageMeter: ILlmUsageMeter;
|
|
445
453
|
/** SSO plugins the auth router mounts — same array instance as the port. */
|
|
@@ -922,16 +930,16 @@ export async function createCoreServices(
|
|
|
922
930
|
// registers its listener here, after this returns (see `AccountHooks`).
|
|
923
931
|
const accountHooks = new AccountHooks();
|
|
924
932
|
|
|
925
|
-
//
|
|
933
|
+
// Version-control lifecycle hooks — the ONE registry this composition shares
|
|
926
934
|
// between GitService (advisory commit validation), the agent-access gate
|
|
927
935
|
// (the blocking agentRead / preWrite hooks), and the composition root,
|
|
928
|
-
// which registers module-owned handlers on `
|
|
936
|
+
// which registers module-owned handlers on `versionControlService.hooks` right
|
|
929
937
|
// after this function returns. Core registers none: no commit-time
|
|
930
938
|
// validation (advisory anyway) and nothing that refuses an agent call.
|
|
931
|
-
const
|
|
939
|
+
const versionControlHooks = new VersionControlHooks();
|
|
932
940
|
const gitService = new GitService(
|
|
933
941
|
workspaceService,
|
|
934
|
-
|
|
942
|
+
versionControlHooks,
|
|
935
943
|
kb,
|
|
936
944
|
workspaceMutex,
|
|
937
945
|
accessControl,
|
|
@@ -968,7 +976,7 @@ export async function createCoreServices(
|
|
|
968
976
|
// the post-switch backup reseed — but switchBranch is gone with the
|
|
969
977
|
// per-branch workspace model, so the injection no longer applies.)
|
|
970
978
|
workspaceService.setDiffService(diffService);
|
|
971
|
-
const
|
|
979
|
+
const changeRequestReviewService = new ChangeRequestReviewService(
|
|
972
980
|
db,
|
|
973
981
|
accessControl,
|
|
974
982
|
workspaceService,
|
|
@@ -976,14 +984,14 @@ export async function createCoreServices(
|
|
|
976
984
|
);
|
|
977
985
|
// Late-bind the comment enricher so PullRequestService.getPrDetail includes
|
|
978
986
|
// our DB-backed comments without forcing a circular constructor dependency.
|
|
979
|
-
pullRequestService.setDetailEnricher(
|
|
987
|
+
pullRequestService.setDetailEnricher(changeRequestReviewService);
|
|
980
988
|
|
|
981
|
-
//
|
|
982
|
-
// instead of the individual git / PR / review
|
|
989
|
+
// Version-control facade — the abstraction every app consumer should reach for
|
|
990
|
+
// instead of the individual git / PR / change-request-review services. See
|
|
983
991
|
// PLAN.md for the migration story. Today it delegates straight through;
|
|
984
|
-
// implementations migrate into the
|
|
992
|
+
// implementations migrate into the version-control module over later steps.
|
|
985
993
|
const fileLockService = new FileLockService(db);
|
|
986
|
-
// Background commit queue. The `
|
|
994
|
+
// Background commit queue. The `VersionControlService.releaseLock` path
|
|
987
995
|
// enqueues a row here instead of running commitFile + push inline; the
|
|
988
996
|
// worker drains the queue out of band so a git hiccup can't block the
|
|
989
997
|
// user-visible save path. See `lock-decoupling-plan.md`.
|
|
@@ -998,11 +1006,11 @@ export async function createCoreServices(
|
|
|
998
1006
|
(await pendingCommitsService.hasAnyForWorkspace(workspaceId)) ||
|
|
999
1007
|
(await fileLockService.hasAnyActive(workspaceId)),
|
|
1000
1008
|
);
|
|
1001
|
-
// In-process event bus: every
|
|
1009
|
+
// In-process event bus: every VersionControlService mutation method that
|
|
1002
1010
|
// succeeds emits a typed event; the SSE route fans it to connected
|
|
1003
1011
|
// browser sessions. Single instance per Node process — survives across
|
|
1004
1012
|
// requests, doesn't survive restarts (clients reconnect + resync).
|
|
1005
|
-
const eventBus = new
|
|
1013
|
+
const eventBus = new VersionControlEventBus();
|
|
1006
1014
|
// Office-document/PDF/email text extraction for `read_file`/`grep`, cached
|
|
1007
1015
|
// by content hash beside the workspaces root (see `DocExtractionCache`),
|
|
1008
1016
|
// failures included. A fresh failure is told to the people looking at the
|
|
@@ -1016,15 +1024,19 @@ export async function createCoreServices(
|
|
|
1016
1024
|
// id-repair keeps the id namespace collision-free. Subscribers are registered
|
|
1017
1025
|
// below, once the reacting services exist.
|
|
1018
1026
|
const fileChangeNotifier = new FileChangeNotifier();
|
|
1027
|
+
// Every commit the git service lands — a save, an autosave checkpoint, a
|
|
1028
|
+
// batch, a merge, a `commit_change` — reaches the notifier through this one
|
|
1029
|
+
// registration, and nothing else emits on it (a test pins both).
|
|
1030
|
+
versionControlHooks.onCommitLanded((change) => fileChangeNotifier.emit(change));
|
|
1019
1031
|
// Who tells the reviewers of an opened change request: the composition root
|
|
1020
1032
|
// of a distribution registers its listener here, after this returns (see
|
|
1021
1033
|
// `ChangeRequestHooks`).
|
|
1022
1034
|
const changeRequestHooks = new ChangeRequestHooks();
|
|
1023
|
-
const
|
|
1035
|
+
const versionControlService = new VersionControlService(
|
|
1024
1036
|
db,
|
|
1025
1037
|
gitService,
|
|
1026
1038
|
pullRequestService,
|
|
1027
|
-
|
|
1039
|
+
changeRequestReviewService,
|
|
1028
1040
|
workspaceService,
|
|
1029
1041
|
accessControl,
|
|
1030
1042
|
fileLockService,
|
|
@@ -1032,11 +1044,10 @@ export async function createCoreServices(
|
|
|
1032
1044
|
kb,
|
|
1033
1045
|
changeGate,
|
|
1034
1046
|
eventBus,
|
|
1035
|
-
|
|
1036
|
-
// Exposed as `workflowService.hooks` — the SAME instance GitService and
|
|
1047
|
+
// Exposed as `versionControlService.hooks` — the SAME instance GitService and
|
|
1037
1048
|
// the agent-access gate consult, so a deployment's registrations against
|
|
1038
1049
|
// it reach every hook point.
|
|
1039
|
-
|
|
1050
|
+
versionControlHooks,
|
|
1040
1051
|
// Exposed as `changeRequestHooks`, the same instance, for the same reason.
|
|
1041
1052
|
changeRequestHooks,
|
|
1042
1053
|
// The opened event names the approvers as accounts; auth answers which
|
|
@@ -1045,7 +1056,7 @@ export async function createCoreServices(
|
|
|
1045
1056
|
);
|
|
1046
1057
|
// The leftover-branch cleanup asks the Deployment page at every round, so
|
|
1047
1058
|
// switching it off there applies without a restart.
|
|
1048
|
-
|
|
1059
|
+
versionControlService.leftoverCleanupEnabled = () => retireMergedBranchesOn(settings.resolve('retireMergedBranches'));
|
|
1049
1060
|
|
|
1050
1061
|
// Join requests: derived entirely from two copies of a plugin's `access.md`
|
|
1051
1062
|
// (the request's branch vs the default branch), so it holds no state — it
|
|
@@ -1053,7 +1064,7 @@ export async function createCoreServices(
|
|
|
1053
1064
|
// have all landed.
|
|
1054
1065
|
const joinRequestsService = new JoinRequestsService(
|
|
1055
1066
|
workspaceService,
|
|
1056
|
-
|
|
1067
|
+
versionControlService,
|
|
1057
1068
|
kb,
|
|
1058
1069
|
// Read-only: the one question a request asks of the resolver is whether
|
|
1059
1070
|
// the person it names already holds what it proposes.
|
|
@@ -1065,7 +1076,7 @@ export async function createCoreServices(
|
|
|
1065
1076
|
// answered in a database round-trip instead of a clone, and what survives a
|
|
1066
1077
|
// restart with the request still owed.
|
|
1067
1078
|
const pluginJoinRequestJobs = new PluginJoinRequestJobs(new DbJoinRequestStore(db), {
|
|
1068
|
-
|
|
1079
|
+
versionControl: versionControlService,
|
|
1069
1080
|
workspaceService,
|
|
1070
1081
|
kb,
|
|
1071
1082
|
// A record keys on the plugin's primary FOLDER below the root, which the
|
|
@@ -1095,7 +1106,7 @@ export async function createCoreServices(
|
|
|
1095
1106
|
// index counts, so a link drops that cache too.
|
|
1096
1107
|
const pluginLinksService = new PluginLinksService(
|
|
1097
1108
|
workspaceService,
|
|
1098
|
-
|
|
1109
|
+
versionControlService,
|
|
1099
1110
|
accessControl,
|
|
1100
1111
|
new AccessMutationService(workspaceService, accessControl, kb.kbDirName),
|
|
1101
1112
|
skillService,
|
|
@@ -1108,7 +1119,7 @@ export async function createCoreServices(
|
|
|
1108
1119
|
// then drops every cache that keyed on the old identity.
|
|
1109
1120
|
const pluginRenameService = new PluginRenameService(
|
|
1110
1121
|
workspaceService,
|
|
1111
|
-
|
|
1122
|
+
versionControlService,
|
|
1112
1123
|
accessControl,
|
|
1113
1124
|
pluginSource,
|
|
1114
1125
|
disk,
|
|
@@ -1149,16 +1160,16 @@ export async function createCoreServices(
|
|
|
1149
1160
|
gitRunner,
|
|
1150
1161
|
);
|
|
1151
1162
|
|
|
1152
|
-
// Remote sync. Drives the
|
|
1163
|
+
// Remote sync. Drives the version-control module's per-branch pull-and-announce
|
|
1153
1164
|
// over every clone the workspace service knows about; owns no git of its own.
|
|
1154
|
-
const kbSyncService = new KbSyncService(
|
|
1165
|
+
const kbSyncService = new KbSyncService(versionControlService, workspaceService);
|
|
1155
1166
|
// Server-scoped MCP editing — the tool page's edit form. One server's truth
|
|
1156
1167
|
// spans a plugin's mcp.json AND plugin.json extensions block, and this is
|
|
1157
1168
|
// the ONE writer that rewrites both entries and commits them together (see
|
|
1158
1169
|
// McpServerEditService).
|
|
1159
1170
|
const mcpServerEditService = new McpServerEditService(
|
|
1160
1171
|
workspaceService,
|
|
1161
|
-
|
|
1172
|
+
versionControlService,
|
|
1162
1173
|
accessControl,
|
|
1163
1174
|
toolManualService,
|
|
1164
1175
|
kb,
|
|
@@ -1171,7 +1182,7 @@ export async function createCoreServices(
|
|
|
1171
1182
|
// folder's rules are at HEAD before the endpoint answers.
|
|
1172
1183
|
const pluginProvisionService = new PluginProvisionService(
|
|
1173
1184
|
workspaceService,
|
|
1174
|
-
|
|
1185
|
+
versionControlService,
|
|
1175
1186
|
accessControl,
|
|
1176
1187
|
kb,
|
|
1177
1188
|
eventBus,
|
|
@@ -1181,26 +1192,26 @@ export async function createCoreServices(
|
|
|
1181
1192
|
|
|
1182
1193
|
// Pending skills: the other half of the catalog — skills that exist only on
|
|
1183
1194
|
// an open change request's branch. Built here rather than beside
|
|
1184
|
-
// `skillService` because it needs the
|
|
1195
|
+
// `skillService` because it needs the version-control service, which does not exist
|
|
1185
1196
|
// that early; it holds no state of its own, so where it is constructed is the
|
|
1186
1197
|
// only thing the ordering decides.
|
|
1187
1198
|
const pendingSkillsService = new PendingSkillsService(
|
|
1188
1199
|
workspaceService,
|
|
1189
1200
|
accessControl,
|
|
1190
1201
|
skillService,
|
|
1191
|
-
|
|
1202
|
+
versionControlService,
|
|
1192
1203
|
kb,
|
|
1193
1204
|
);
|
|
1194
1205
|
|
|
1195
1206
|
// The same missing half, for tools: a `.tool` manual or an `mcp.json` server
|
|
1196
1207
|
// an agent proposes is nowhere in the product until its change request
|
|
1197
|
-
// merges. Built here for the same reason — it needs the
|
|
1208
|
+
// merges. Built here for the same reason — it needs the version-control service —
|
|
1198
1209
|
// and stateless for the same reason.
|
|
1199
1210
|
const pendingToolsService = new PendingToolsService(
|
|
1200
1211
|
workspaceService,
|
|
1201
1212
|
accessControl,
|
|
1202
1213
|
toolManualService,
|
|
1203
|
-
|
|
1214
|
+
versionControlService,
|
|
1204
1215
|
kb,
|
|
1205
1216
|
);
|
|
1206
1217
|
|
|
@@ -1238,7 +1249,7 @@ export async function createCoreServices(
|
|
|
1238
1249
|
packsDir: config.starterPacksDir,
|
|
1239
1250
|
kb,
|
|
1240
1251
|
workspaceService,
|
|
1241
|
-
|
|
1252
|
+
versionControl: versionControlService,
|
|
1242
1253
|
adminAccess,
|
|
1243
1254
|
settings,
|
|
1244
1255
|
accessControl,
|
|
@@ -1246,7 +1257,6 @@ export async function createCoreServices(
|
|
|
1246
1257
|
pluginSource,
|
|
1247
1258
|
pluginLocks: pluginProvisionService,
|
|
1248
1259
|
events: eventBus,
|
|
1249
|
-
fileChanges: fileChangeNotifier,
|
|
1250
1260
|
// Its own lock: one starter-pack choice at a time, a concern no other
|
|
1251
1261
|
// service's mutex serialises.
|
|
1252
1262
|
choosing: new WorkspaceMutex(),
|
|
@@ -1288,7 +1298,7 @@ export async function createCoreServices(
|
|
|
1288
1298
|
// can only exist once the vault does.
|
|
1289
1299
|
const toolDeleteService = new ToolDeleteService(
|
|
1290
1300
|
workspaceService,
|
|
1291
|
-
|
|
1301
|
+
versionControlService,
|
|
1292
1302
|
accessControl,
|
|
1293
1303
|
toolManualService,
|
|
1294
1304
|
skillService,
|
|
@@ -1335,12 +1345,16 @@ export async function createCoreServices(
|
|
|
1335
1345
|
});
|
|
1336
1346
|
|
|
1337
1347
|
// GDPR erasure path: admin-driven user deletion. The core service erases the
|
|
1338
|
-
// rows it owns; each module contributes its slice as a participant.
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1348
|
+
// rows it owns; each module contributes its slice as a participant. The
|
|
1349
|
+
// vault's runs first: a managed sign-in's tokens are revoked with their
|
|
1350
|
+
// provider before the user row goes and the vault rows cascade with it.
|
|
1351
|
+
// The port's array is held, never copied (see `CorePorts.erasureParticipants`:
|
|
1352
|
+
// the enterprise root fills it AFTER construction) and never written to
|
|
1353
|
+
// (a root that rebuilds a graph over the same array would otherwise keep
|
|
1354
|
+
// every past graph's vault slice): core's own slices travel beside it.
|
|
1355
|
+
const accountErasureService = new AccountErasureService(db, changeRequestReviewService, ports.erasureParticipants ?? [], [
|
|
1356
|
+
managedSignInErasure(secretsVaultService),
|
|
1357
|
+
]);
|
|
1344
1358
|
|
|
1345
1359
|
// MCP (remote agent access). ExternalApiKeyService handles connection-key
|
|
1346
1360
|
// lifecycle. McpService is a GENERIC, STATELESS proxy: per request it
|
|
@@ -1411,7 +1425,7 @@ export async function createCoreServices(
|
|
|
1411
1425
|
workspaceService,
|
|
1412
1426
|
accessControl,
|
|
1413
1427
|
authService,
|
|
1414
|
-
|
|
1428
|
+
versionControlService,
|
|
1415
1429
|
gitService,
|
|
1416
1430
|
accountLinks: new AccountLinkService(db),
|
|
1417
1431
|
// The SAME extension-to-reader registry `read_file` dispatches on, so the
|
|
@@ -1444,9 +1458,12 @@ export async function createCoreServices(
|
|
|
1444
1458
|
// For the needs-authorization setup link surfaced to external agents.
|
|
1445
1459
|
publicFrontendUrl: config.publicFrontendUrl,
|
|
1446
1460
|
readAgentPreamble: readPreamble,
|
|
1447
|
-
// The
|
|
1448
|
-
// the setup save applies lands without a restart.
|
|
1461
|
+
// The root-folder and platform-file names the shared file rules spell,
|
|
1462
|
+
// read per request so a layout the setup save applies lands without a restart.
|
|
1449
1463
|
kbLayout: () => kb.layout,
|
|
1464
|
+
// The branch the shared rules name as the one people read — a getter
|
|
1465
|
+
// too, so the name in effect is the one an agent is told.
|
|
1466
|
+
defaultBranch: () => kb.defaultBranch,
|
|
1450
1467
|
secretsScope,
|
|
1451
1468
|
// Read at listing time, by when the hints below exist.
|
|
1452
1469
|
readOnlyOverrides: () => readOnlyHints.overrides(),
|
|
@@ -1524,7 +1541,7 @@ export async function createCoreServices(
|
|
|
1524
1541
|
const resolveToolContext = createToolContextResolver({
|
|
1525
1542
|
authService,
|
|
1526
1543
|
workspaceService,
|
|
1527
|
-
|
|
1544
|
+
versionControlService,
|
|
1528
1545
|
events: eventBus,
|
|
1529
1546
|
kbDirName: kbDirName,
|
|
1530
1547
|
creatorAccess,
|
|
@@ -1584,7 +1601,7 @@ export async function createCoreServices(
|
|
|
1584
1601
|
// swallowed the `opts` carrying `skipValidation`, so the burst-validation
|
|
1585
1602
|
// skip was a no-op in production while every unit test — which stubs this
|
|
1586
1603
|
// port — passed. No wrapper, no gap to fall through.
|
|
1587
|
-
|
|
1604
|
+
versionControl: versionControlService,
|
|
1588
1605
|
// Both escalation sinks come through CorePorts: the recovery agent and the
|
|
1589
1606
|
// notice sink are enterprise-owned (background-agent factory / feedback
|
|
1590
1607
|
// dashboard); core defaults skip recovery and log to stderr.
|
|
@@ -1644,7 +1661,7 @@ export async function createCoreServices(
|
|
|
1644
1661
|
source,
|
|
1645
1662
|
...createSyncedGroupsCommitter({
|
|
1646
1663
|
workspaceService,
|
|
1647
|
-
|
|
1664
|
+
versionControlService,
|
|
1648
1665
|
accessControl,
|
|
1649
1666
|
eventBus,
|
|
1650
1667
|
kbDirName,
|
|
@@ -1660,7 +1677,7 @@ export async function createCoreServices(
|
|
|
1660
1677
|
// directory token route drives.
|
|
1661
1678
|
const groupsAdminService = new GroupsAdminService(
|
|
1662
1679
|
workspaceService,
|
|
1663
|
-
|
|
1680
|
+
versionControlService,
|
|
1664
1681
|
accessControl,
|
|
1665
1682
|
disk,
|
|
1666
1683
|
kbDirName,
|
|
@@ -1672,7 +1689,7 @@ export async function createCoreServices(
|
|
|
1672
1689
|
// The deployment owner is never removed this way.
|
|
1673
1690
|
const userAccessRemovalService = new UserAccessRemovalService(
|
|
1674
1691
|
workspaceService,
|
|
1675
|
-
|
|
1692
|
+
versionControlService,
|
|
1676
1693
|
accessControl,
|
|
1677
1694
|
disk,
|
|
1678
1695
|
kbDirName,
|
|
@@ -1754,9 +1771,9 @@ export async function createCoreServices(
|
|
|
1754
1771
|
gitService,
|
|
1755
1772
|
pullRequestService,
|
|
1756
1773
|
diffService,
|
|
1757
|
-
|
|
1774
|
+
changeRequestReviewService,
|
|
1758
1775
|
fileLockService,
|
|
1759
|
-
|
|
1776
|
+
versionControlService,
|
|
1760
1777
|
changeRequestHooks,
|
|
1761
1778
|
kbSyncService,
|
|
1762
1779
|
eventBus,
|
|
@@ -1789,6 +1806,7 @@ export async function createCoreServices(
|
|
|
1789
1806
|
// Server-time seams — defaults here; the enterprise overlay overwrites
|
|
1790
1807
|
// (or, for the array, pushes into) these after construction.
|
|
1791
1808
|
sessionSink: ports.sessionSink ?? new UuidSessionSink(),
|
|
1809
|
+
managedSignIns: ports.managedSignIns ?? null,
|
|
1792
1810
|
usageMeter: ports.usageMeter ?? unmeteredLlmUsage,
|
|
1793
1811
|
authProviders,
|
|
1794
1812
|
};
|
package/src/core/lifecycle.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { AdvisoryLease } from '../modules/database/advisory-lock.js';
|
|
|
4
4
|
import { bootMaySurvive, type KbStartupRunner } from '../modules/workspace/startup/kb-startup-runner.js';
|
|
5
5
|
import { noteBesideCheckout } from '../modules/workspace/startup/beside-checkout.js';
|
|
6
6
|
import { unregisterBevelSecretsVariableLoader } from '../modules/secrets-vault/secrets-variable-loader.js';
|
|
7
|
-
import type {
|
|
7
|
+
import type { VersionControlService } from '../modules/version-control/version-control.service.js';
|
|
8
8
|
import type { PluginJoinRequestJobs } from '../modules/plugins/join-request-jobs.service.js';
|
|
9
9
|
import type { TmpSweeper } from '../modules/workspace/workspace-tmp.js';
|
|
10
10
|
import { printable } from '../shared/printable.js';
|
|
@@ -292,7 +292,7 @@ export interface BootableCore {
|
|
|
292
292
|
config: { workspacesRoot: string };
|
|
293
293
|
kbDirName: string;
|
|
294
294
|
kbStartupRunner: Pick<KbStartupRunner, 'runAll' | 'retryUntilMaintained'>;
|
|
295
|
-
|
|
295
|
+
versionControlService: Pick<VersionControlService, 'closeChangeRequestsWithDeletedBranches' | 'tidyAfterSweep'>;
|
|
296
296
|
pluginJoinRequestJobs: Pick<PluginJoinRequestJobs, 'startSweeping'>;
|
|
297
297
|
/** The periodic sweep of every workspace's `tmp/` folder, started here and stopped by {@link stopCore}. */
|
|
298
298
|
tmpSweeper: Pick<TmpSweeper, 'startSweeping'>;
|
|
@@ -393,7 +393,7 @@ export async function startCore<C extends BootableCore>(
|
|
|
393
393
|
// have been unusable since the branch went away, so landing a few seconds
|
|
394
394
|
// into uptime is soon enough. Errors are swallowed inside the sweep, which
|
|
395
395
|
// fails safe by closing nothing.
|
|
396
|
-
void core.
|
|
396
|
+
void core.versionControlService
|
|
397
397
|
.closeChangeRequestsWithDeletedBranches()
|
|
398
398
|
.then((n) => {
|
|
399
399
|
if (n > 0) {
|
|
@@ -404,7 +404,7 @@ export async function startCore<C extends BootableCore>(
|
|
|
404
404
|
// Then the tidy-up: open requests that propose nothing are closed, and the
|
|
405
405
|
// branches merged requests left behind removed (behind its own setting).
|
|
406
406
|
// Fails safe on a failed fetch, and never throws.
|
|
407
|
-
.then(() => core.
|
|
407
|
+
.then(() => core.versionControlService.tidyAfterSweep());
|
|
408
408
|
|
|
409
409
|
// Recorded join requests that are still owed, resumed — now, and then on a
|
|
410
410
|
// timer. SEQUENCED AFTER the startup phase for the same reason as the sweep
|
|
@@ -481,12 +481,12 @@ export interface CoreStopDeps {
|
|
|
481
481
|
*/
|
|
482
482
|
documentExtractor?: { close(): Promise<void> };
|
|
483
483
|
/**
|
|
484
|
-
* The
|
|
484
|
+
* The version-control service, for the tidy-up it runs after each sweep (closing
|
|
485
485
|
* empty requests, removing leftover branches): detached from whatever
|
|
486
486
|
* started it, so stopped and awaited here before the pool goes. Optional:
|
|
487
487
|
* a caller that has not built one passes nothing.
|
|
488
488
|
*/
|
|
489
|
-
|
|
489
|
+
versionControlService?: { stopTidying(): void; drainTidy(): Promise<void> };
|
|
490
490
|
/** The startup phase's retry, if the boot left one asking — see {@link BootableCore.startupRetry}. */
|
|
491
491
|
startupRetry?: { stop(): void } | null;
|
|
492
492
|
/** The database — its pool is ended last, once nothing above can still need it. */
|
|
@@ -582,7 +582,7 @@ async function releaseCore(deps: CoreStopDeps, remaining: () => number, log: (m:
|
|
|
582
582
|
deps.startupRetry?.stop();
|
|
583
583
|
// The post-sweep tidy-up: no new round, and the one under way stops at its
|
|
584
584
|
// next request or branch. Synchronous.
|
|
585
|
-
deps.
|
|
585
|
+
deps.versionControlService?.stopTidying();
|
|
586
586
|
// Clearing the interval stops future ticks; it does nothing to a job a
|
|
587
587
|
// tick already started, which holds a claim it heartbeats through the
|
|
588
588
|
// pool and is mid-clone or mid-push. Awaited here, in the budget: a job
|
|
@@ -614,8 +614,8 @@ async function releaseCore(deps: CoreStopDeps, remaining: () => number, log: (m:
|
|
|
614
614
|
// The tidy-up in flight fetches and deletes branches through the pool and
|
|
615
615
|
// the default branch's checkout: awaited, so the next graph for this
|
|
616
616
|
// tenant cannot find a branch deletion still running under it.
|
|
617
|
-
if (deps.
|
|
618
|
-
await bounded(deps.
|
|
617
|
+
if (deps.versionControlService) {
|
|
618
|
+
await bounded(deps.versionControlService.drainTidy(), remaining(), 'finishing the branch tidy-up', log);
|
|
619
619
|
}
|
|
620
620
|
// Its ripgrep runs end with the graph; a search still running is answered busy or stopped.
|
|
621
621
|
if (deps.patternMatcher) {
|
package/src/core-config.ts
CHANGED
|
@@ -3,7 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { defaultKbTemplateDir, defaultStarterPacksDir } from './assets.js';
|
|
5
5
|
import { assertKeyDecodesTo32Bytes } from './shared/token-crypto.js';
|
|
6
|
-
import { DEFAULT_GIT_TIMEOUT_MS } from './modules/
|
|
6
|
+
import { DEFAULT_GIT_TIMEOUT_MS } from './modules/version-control/git/node-git-runner.js';
|
|
7
7
|
import { DEFAULT_DB_SCHEMA, assertSchemaName } from './modules/database/connection.js';
|
|
8
8
|
import { logger } from './shared/logging.js';
|
|
9
9
|
import { hasControlCharacter } from './modules/kb-fs/repo-path.js';
|
|
@@ -145,7 +145,7 @@ export interface ProcessConfig {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* Configuration for the CORE platform: the git-backed workspace
|
|
148
|
+
* Configuration for the CORE platform: the git-backed workspace and version control,
|
|
149
149
|
* skills, tools, secrets vault, access control, and the MCP surface. Contains
|
|
150
150
|
* NO LLM, connector, or SSO-provider settings — those live on the enterprise
|
|
151
151
|
* `AppConfig` (config.ts), which extends this class. A core-only deployment
|
|
@@ -372,7 +372,7 @@ export class CoreConfig implements TenantConfig, ProcessConfig {
|
|
|
372
372
|
readonly trustProxy: string;
|
|
373
373
|
/**
|
|
374
374
|
* Deadline in milliseconds on every git command, after which the child is
|
|
375
|
-
* killed and the call fails (see `modules/
|
|
375
|
+
* killed and the call fails (see `modules/version-control/git/node-git-runner.ts`).
|
|
376
376
|
*
|
|
377
377
|
* Configurable because the right ceiling depends on the deployment's own git
|
|
378
378
|
* host and the size of its knowledge base: a first clone over a slow link can
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @bevel-software/platform-core-backend — the open-source core of the Bevel platform:
|
|
3
|
-
* git-backed knowledge workspace,
|
|
3
|
+
* git-backed knowledge workspace, version control (branches / change requests /
|
|
4
4
|
* locks / SSE), skills, tool manuals + registry + auth, secrets vault, access
|
|
5
5
|
* control, diff/backup ledger, code-mode and the remote MCP surface.
|
|
6
6
|
*
|
|
@@ -122,7 +122,7 @@ export type { ISessionSink } from './modules/workspace/session-sink.js';
|
|
|
122
122
|
export type {
|
|
123
123
|
ISystemNoticeSink,
|
|
124
124
|
RecoveryAgentRunner,
|
|
125
|
-
} from './modules/
|
|
125
|
+
} from './modules/version-control/pending-commits.worker.js';
|
|
126
126
|
export type { ILlmUsageMeter } from './modules/tool-auth/llm-usage-meter.js';
|
|
127
127
|
export type { AuthProviderPlugin } from './modules/auth/auth.routes.js';
|
|
128
128
|
export type { IErasureParticipant } from './modules/auth/account-erasure.service.js';
|
|
@@ -144,17 +144,17 @@ export {
|
|
|
144
144
|
type IAccountAdmission,
|
|
145
145
|
} from './modules/auth/account-admission.js';
|
|
146
146
|
export {
|
|
147
|
-
|
|
147
|
+
VersionControlHooks,
|
|
148
148
|
type CommitValidationHook,
|
|
149
149
|
type CommitValidationContext,
|
|
150
150
|
type AgentOperationContext,
|
|
151
151
|
type AgentReadHook,
|
|
152
152
|
type PreWriteHook,
|
|
153
|
-
} from './modules/
|
|
153
|
+
} from './modules/version-control/version-control-hooks.js';
|
|
154
154
|
export {
|
|
155
155
|
ChangeRequestHooks,
|
|
156
156
|
type ChangeRequestOpenedEvent,
|
|
157
157
|
type ChangeRequestOpenedHook,
|
|
158
158
|
type ChangeRequestPerson,
|
|
159
159
|
type IChangeRequestHooks,
|
|
160
|
-
} from './modules/
|
|
160
|
+
} from './modules/version-control/change-request-hooks.js';
|
|
@@ -9,8 +9,8 @@ import { NodeFs } from '../../kb-fs/node-fs.js';
|
|
|
9
9
|
|
|
10
10
|
import type { WorkspaceService } from '../../workspace/workspace.service.js';
|
|
11
11
|
import type { AuthService } from '../../auth/auth.service.js';
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
12
|
+
import type { VersionControlService } from '../../version-control/version-control.service.js';
|
|
13
|
+
import type { VersionControlEventBus } from '../../version-control/event-bus.js';
|
|
14
14
|
import { usersDbDouble } from './users-db-double.js';
|
|
15
15
|
import { AccessControlService } from '../access-control.service.js';
|
|
16
16
|
import {
|
|
@@ -317,8 +317,8 @@ describe('Admin write floor at the repository root', () => {
|
|
|
317
317
|
acquireLock: async () => ({ acquired: true, lock: {} }),
|
|
318
318
|
releaseLock: async () => undefined,
|
|
319
319
|
releaseLockNoCommit: async () => undefined,
|
|
320
|
-
} as unknown as
|
|
321
|
-
{ emit: () => {} } as unknown as
|
|
320
|
+
} as unknown as VersionControlService,
|
|
321
|
+
{ emit: () => {} } as unknown as VersionControlEventBus,
|
|
322
322
|
usersDbDouble(),
|
|
323
323
|
testKbContext({ kbDirName: KB }),
|
|
324
324
|
new NodeFs(),
|
|
@@ -4,9 +4,9 @@ import fs from 'node:fs/promises';
|
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import os from 'node:os';
|
|
6
6
|
|
|
7
|
-
import type { WorkspaceService } from '../../workspace/
|
|
7
|
+
import type { WorkspaceService } from '../../workspace/index.js';
|
|
8
8
|
import { AccessControlService } from '../access-control.service.js';
|
|
9
|
-
import { registerAccessFrontmatterExtensions } from '../../access-model/
|
|
9
|
+
import { registerAccessFrontmatterExtensions } from '../../access-model/index.js';
|
|
10
10
|
|
|
11
11
|
const KB = 'knowledge-base';
|
|
12
12
|
|
|
@@ -74,12 +74,12 @@ describe('a file-own read grant on a whole-document configuration file', () => {
|
|
|
74
74
|
beforeEach(async () => {
|
|
75
75
|
root = await fs.mkdtemp(path.join(os.tmpdir(), 'own-read-'));
|
|
76
76
|
repo = path.join(root, ws, KB);
|
|
77
|
-
await fs.mkdir(path.join(repo, '
|
|
77
|
+
await fs.mkdir(path.join(repo, 'Workflows'), { recursive: true });
|
|
78
78
|
await fs.mkdir(path.join(repo, 'Agents'), { recursive: true });
|
|
79
79
|
await fs.writeFile(path.join(repo, 'roles.yaml'), ROLES_YAML);
|
|
80
80
|
await fs.writeFile(path.join(repo, 'access.md'), '---\nwrite:\n - Admin\ndownload:\n - Admin\nowner: []\n---\n');
|
|
81
|
-
await fs.writeFile(path.join(repo, '
|
|
82
|
-
await fs.writeFile(path.join(repo, '
|
|
81
|
+
await fs.writeFile(path.join(repo, 'Workflows', 'access.md'), '---\nwrite: []\n---\n');
|
|
82
|
+
await fs.writeFile(path.join(repo, 'Workflows', 'Coding-Delivery.workflow'), PIPELINE);
|
|
83
83
|
await fs.writeFile(path.join(repo, 'Agents', 'access.md'), '---\nwrite: []\n---\n');
|
|
84
84
|
await fs.writeFile(path.join(repo, 'Agents', 'delivery-coder.agent'), AGENT);
|
|
85
85
|
});
|
|
@@ -93,26 +93,26 @@ describe('a file-own read grant on a whole-document configuration file', () => {
|
|
|
93
93
|
);
|
|
94
94
|
|
|
95
95
|
it('the grantee reads the file (registered kinds)', async () => {
|
|
96
|
-
registerAccessFrontmatterExtensions(['.
|
|
96
|
+
registerAccessFrontmatterExtensions(['.workflow', '.agent']);
|
|
97
97
|
const s = svc();
|
|
98
|
-
expect(await s.canRead(ws, 'coding-agent@bevel.software', '
|
|
98
|
+
expect(await s.canRead(ws, 'coding-agent@bevel.software', 'Workflows/Coding-Delivery.workflow')).toBe(true);
|
|
99
99
|
expect(await s.canRead(ws, 'coding-agent@bevel.software', 'Agents/delivery-coder.agent')).toBe(true);
|
|
100
|
-
expect(await s.canWrite(ws, 'coding-agent@bevel.software', '
|
|
100
|
+
expect(await s.canWrite(ws, 'coding-agent@bevel.software', 'Workflows/Coding-Delivery.workflow')).toBe(true);
|
|
101
101
|
// Batch path, which the explorer and the tool catalog use.
|
|
102
102
|
const batch = await s.canReadBatch(ws, 'coding-agent@bevel.software', [
|
|
103
|
-
'
|
|
103
|
+
'Workflows/Coding-Delivery.workflow',
|
|
104
104
|
'Agents/delivery-coder.agent',
|
|
105
|
-
'
|
|
105
|
+
'Workflows/README.md',
|
|
106
106
|
]);
|
|
107
107
|
expect([...batch.entries()]).toEqual([
|
|
108
|
-
['
|
|
108
|
+
['Workflows/Coding-Delivery.workflow', true],
|
|
109
109
|
['Agents/delivery-coder.agent', true],
|
|
110
|
-
['
|
|
110
|
+
['Workflows/README.md', false],
|
|
111
111
|
]);
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
it('a stranger does not', async () => {
|
|
115
|
-
registerAccessFrontmatterExtensions(['.
|
|
116
|
-
expect(await svc().canRead(ws, 'someone@else.io', '
|
|
115
|
+
registerAccessFrontmatterExtensions(['.workflow', '.agent']);
|
|
116
|
+
expect(await svc().canRead(ws, 'someone@else.io', 'Workflows/Coding-Delivery.workflow')).toBe(false);
|
|
117
117
|
});
|
|
118
118
|
});
|