@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
|
@@ -6,15 +6,15 @@ import type { IAccessControl } from '../../access/index.js';
|
|
|
6
6
|
import { type AgentAccessGate } from '../../workspace/index.js';
|
|
7
7
|
import type { KbContext } from '../../../shared/kb-context.js';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Version-control domain tools, registered into the central catalog and hosted on the
|
|
10
10
|
* shared tools router — the ONE mechanism: build a self-describing UTCP def,
|
|
11
11
|
* host the endpoint behind `toolAuth` + `toolHandler`, register the def. Each is
|
|
12
|
-
* a thin facade over `
|
|
12
|
+
* a thin facade over `IVersionControlService`; identity + workspace come from the
|
|
13
13
|
* resolved `ToolContext` (so a caller can never address another user/workspace).
|
|
14
14
|
* All are `both` (external agents can drive repo ops directly); the write ones
|
|
15
15
|
* carry the `write` tag so read-scoped callers are refused.
|
|
16
16
|
*/
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function registerVersionControlTools(registry: IToolRegistry, router: Router, toolAuth: RequestHandler, toolHandler: ToolHandlerFactory,
|
|
18
18
|
/** The clone folder at the workspace root (`save_file` refuses a path outside it) and the branch model. */
|
|
19
19
|
kb: Pick<KbContext, 'kbDirName' | 'defaultBranch' | 'defaultWorkspaceId' | 'protectedBranches'>,
|
|
20
20
|
/**
|
|
@@ -40,4 +40,4 @@ accessControl: Pick<IAccessControl, 'canRead' | 'canReadAtRef' | 'canReadBatch'
|
|
|
40
40
|
* refuses the history too.
|
|
41
41
|
*/
|
|
42
42
|
agentAccessGate: AgentAccessGate): void;
|
|
43
|
-
//# sourceMappingURL=
|
|
43
|
+
//# sourceMappingURL=version-control.tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-control.tools.d.ts","sourceRoot":"","sources":["../../../../src/modules/version-control/agent-tools/version-control.tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAA4B,KAAK,WAAW,EAA6B,MAAM,6BAA6B,CAAC;AAEpH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAA8D,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE5H,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAmI/D;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAE,kBAAkB;AAC/B,2GAA2G;AAC3G,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,GAAG,eAAe,GAAG,oBAAoB,GAAG,mBAAmB,CAAC;AAC/F;;;;;;GAMG;AACH,mBAAmB,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC;AAC3E;;;;;;;GAOG;AACH,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,cAAc,GAAG,cAAc,GAAG,mBAAmB,CAAC;AACtG;;;;GAIG;AACH,eAAe,EAAE,eAAe,GAC/B,IAAI,CA6/BN"}
|
|
@@ -14,7 +14,7 @@ function stripKbDir(path, kbDirName) {
|
|
|
14
14
|
// Read at call time, not captured: the branch model is applied during boot,
|
|
15
15
|
// and a value taken at registration would be the empty set that exists before it.
|
|
16
16
|
const protectedInline = (kb) => [...kb.protectedBranches].map((b) => `\`${b}\``).join(' / ');
|
|
17
|
-
// Output sub-schemas for the git-aliased
|
|
17
|
+
// Output sub-schemas for the git-aliased version-control payloads (Branch, Change,
|
|
18
18
|
// ChangeRequest, …). Defined once and referenced by the individual tool
|
|
19
19
|
// defs below so each tool still declares its own `outputs`.
|
|
20
20
|
const branchSchema = {
|
|
@@ -116,15 +116,15 @@ const changeRequestSummarySchema = {
|
|
|
116
116
|
required: ['url', 'number', 'title', 'state', 'sourceBranch', 'targetBranch', 'approvals', 'mergeBlockedReasons', 'files', 'totalFiles'],
|
|
117
117
|
};
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* Version-control domain tools, registered into the central catalog and hosted on the
|
|
120
120
|
* shared tools router — the ONE mechanism: build a self-describing UTCP def,
|
|
121
121
|
* host the endpoint behind `toolAuth` + `toolHandler`, register the def. Each is
|
|
122
|
-
* a thin facade over `
|
|
122
|
+
* a thin facade over `IVersionControlService`; identity + workspace come from the
|
|
123
123
|
* resolved `ToolContext` (so a caller can never address another user/workspace).
|
|
124
124
|
* All are `both` (external agents can drive repo ops directly); the write ones
|
|
125
125
|
* carry the `write` tag so read-scoped callers are refused.
|
|
126
126
|
*/
|
|
127
|
-
export function
|
|
127
|
+
export function registerVersionControlTools(registry, router, toolAuth, toolHandler,
|
|
128
128
|
/** The clone folder at the workspace root (`save_file` refuses a path outside it) and the branch model. */
|
|
129
129
|
kb,
|
|
130
130
|
/**
|
|
@@ -153,7 +153,7 @@ agentAccessGate) {
|
|
|
153
153
|
const { kbDirName } = kb;
|
|
154
154
|
const mount = (spec) => {
|
|
155
155
|
const path = `/api/agent/tools/${spec.name}`;
|
|
156
|
-
// Every
|
|
156
|
+
// Every version-control tool that takes a branch REQUIRES it — the injected input
|
|
157
157
|
// and a hand-declared one (the fork base, the draft to switch to) alike.
|
|
158
158
|
// A hand-declared one is required by its own schema, which `toolDef`
|
|
159
159
|
// reads as `required` too; the tool handler refuses a call without it.
|
|
@@ -214,7 +214,7 @@ agentAccessGate) {
|
|
|
214
214
|
},
|
|
215
215
|
write: false,
|
|
216
216
|
handler: async (_args, ctx) => ({
|
|
217
|
-
branches: await ctx.
|
|
217
|
+
branches: await ctx.versionControlService.listBranches(await repoGlobalWorkspaceId(ctx)),
|
|
218
218
|
}),
|
|
219
219
|
});
|
|
220
220
|
mount({
|
|
@@ -239,7 +239,7 @@ agentAccessGate) {
|
|
|
239
239
|
},
|
|
240
240
|
write: true,
|
|
241
241
|
handler: async (args, ctx) => ({
|
|
242
|
-
change: await ctx.
|
|
242
|
+
change: await ctx.versionControlService.commitChange(workspaceIdForBranch(args.branch), ctx.user, {
|
|
243
243
|
summary: args.summary,
|
|
244
244
|
description: typeof args.description === 'string' ? args.description : undefined,
|
|
245
245
|
}),
|
|
@@ -284,11 +284,11 @@ agentAccessGate) {
|
|
|
284
284
|
}
|
|
285
285
|
assertInsideRepo(path, kbDirName);
|
|
286
286
|
const workspaceId = workspaceIdForBranch(branch);
|
|
287
|
-
const acquired = await ctx.
|
|
287
|
+
const acquired = await ctx.versionControlService.acquireLock(workspaceId, branch, path, ctx.user);
|
|
288
288
|
if (!acquired.acquired) {
|
|
289
289
|
return { saved: false, reason: `Locked by ${acquired.lock.holderName ?? 'another user'} — try again later.` };
|
|
290
290
|
}
|
|
291
|
-
await ctx.
|
|
291
|
+
await ctx.versionControlService.releaseLock(workspaceId, branch, path, ctx.user);
|
|
292
292
|
return { saved: true, queued: true };
|
|
293
293
|
},
|
|
294
294
|
});
|
|
@@ -305,7 +305,7 @@ agentAccessGate) {
|
|
|
305
305
|
},
|
|
306
306
|
write: true,
|
|
307
307
|
handler: async (args, ctx) => {
|
|
308
|
-
await ctx.
|
|
308
|
+
await ctx.versionControlService.shareCurrentBranch(workspaceIdForBranch(args.branch), ctx.user);
|
|
309
309
|
return { shared: true };
|
|
310
310
|
},
|
|
311
311
|
});
|
|
@@ -361,7 +361,7 @@ agentAccessGate) {
|
|
|
361
361
|
throw new ToolError(`\`branch\` must be an existing branch to fork from — not '${name}', the draft being created.`, 400);
|
|
362
362
|
}
|
|
363
363
|
return {
|
|
364
|
-
branch: await ctx.
|
|
364
|
+
branch: await ctx.versionControlService.createBranch(workspaceIdForBranch(base), name),
|
|
365
365
|
};
|
|
366
366
|
},
|
|
367
367
|
});
|
|
@@ -404,7 +404,7 @@ agentAccessGate) {
|
|
|
404
404
|
// The service still returns the full detail — the app's routes serve the
|
|
405
405
|
// same call and must keep getting it. The shaping happens here, in the
|
|
406
406
|
// answer, so nothing below the tool changes.
|
|
407
|
-
handler: async (args, ctx) => summarizeChangeRequest(await ctx.
|
|
407
|
+
handler: async (args, ctx) => summarizeChangeRequest(await ctx.versionControlService.openChangeRequest(workspaceIdForBranch(args.sourceBranch), ctx.user, {
|
|
408
408
|
sourceBranch: args.sourceBranch,
|
|
409
409
|
targetBranch: args.targetBranch,
|
|
410
410
|
title: args.title,
|
|
@@ -458,7 +458,7 @@ agentAccessGate) {
|
|
|
458
458
|
if (!(await maySeeChangeRequest(ctx, number))) {
|
|
459
459
|
throw new ToolError(`Change request #${number} not found.`, 404);
|
|
460
460
|
}
|
|
461
|
-
const updated = await ctx.
|
|
461
|
+
const updated = await ctx.versionControlService.updateChangeRequest(number, ctx.user, {
|
|
462
462
|
title,
|
|
463
463
|
description,
|
|
464
464
|
appendDescription,
|
|
@@ -531,7 +531,7 @@ agentAccessGate) {
|
|
|
531
531
|
if (typeof source !== 'string' || source.length === 0 || typeof target !== 'string' || target.length === 0) {
|
|
532
532
|
throw new ToolError('`source` and `target` are required branch names.', 400);
|
|
533
533
|
}
|
|
534
|
-
return { outcome: await ctx.
|
|
534
|
+
return { outcome: await ctx.versionControlService.mergeBranch(ctx.user, source, target) };
|
|
535
535
|
},
|
|
536
536
|
});
|
|
537
537
|
mount({
|
|
@@ -600,7 +600,7 @@ agentAccessGate) {
|
|
|
600
600
|
kind: 'name-required',
|
|
601
601
|
});
|
|
602
602
|
}
|
|
603
|
-
return ctx.
|
|
603
|
+
return ctx.versionControlService.deleteBranchChecked(ctx.user, name, {
|
|
604
604
|
dryRun: args.dryRun === true,
|
|
605
605
|
discardUnmerged: args.discardUnmerged === true,
|
|
606
606
|
maySee: (number) => maySeeChangeRequest(ctx, number),
|
|
@@ -646,7 +646,7 @@ agentAccessGate) {
|
|
|
646
646
|
// Validate the target exists by listing from any existing clone (every
|
|
647
647
|
// clone tracks all remote refs) — there is no "current" workspace here,
|
|
648
648
|
// and the default branch may not even be on the remote.
|
|
649
|
-
const branches = await ctx.
|
|
649
|
+
const branches = await ctx.versionControlService.listBranches(await repoGlobalWorkspaceId(ctx));
|
|
650
650
|
if (!branches.find((b) => b.name === target)) {
|
|
651
651
|
const known = branches.map((b) => b.name).slice(0, 25).join(', ');
|
|
652
652
|
throw new ToolError(`No draft named "${target}" on this workspace. Known: ${known || '(none)'}.`, 404);
|
|
@@ -668,7 +668,7 @@ agentAccessGate) {
|
|
|
668
668
|
//
|
|
669
669
|
// What the app's History tab, compare view and "update from target" do,
|
|
670
670
|
// as tools: the agent never runs git itself. Each reads through the
|
|
671
|
-
//
|
|
671
|
+
// version-control service's gated methods and takes the per-file read the file
|
|
672
672
|
// itself takes.
|
|
673
673
|
/** The branch's workspace, made when it is not on disk yet, and its id. */
|
|
674
674
|
const workspaceOf = async (ctx, branch) => {
|
|
@@ -732,7 +732,7 @@ agentAccessGate) {
|
|
|
732
732
|
const workspaceId = await workspaceOf(ctx, branch);
|
|
733
733
|
const rel = await requireRead(ctx, branch, workspaceId, path);
|
|
734
734
|
const limit = typeof args.limit === 'number' ? args.limit : undefined;
|
|
735
|
-
const changes = await ctx.
|
|
735
|
+
const changes = await ctx.versionControlService.listChangesForFile(workspaceId, path, limit);
|
|
736
736
|
return { path: rel, changes };
|
|
737
737
|
},
|
|
738
738
|
});
|
|
@@ -779,14 +779,14 @@ agentAccessGate) {
|
|
|
779
779
|
// read: the file is this workspace's file.
|
|
780
780
|
const rel = await requireRead(ctx, branch, workspaceId, path);
|
|
781
781
|
if (isCommitSha(at)) {
|
|
782
|
-
const { baseline, current } = await ctx.
|
|
782
|
+
const { baseline, current } = await ctx.versionControlService.fileAtChange(workspaceId, path, at);
|
|
783
783
|
return { path: rel, at, kind: 'commit', sha: at, content: current, before: baseline };
|
|
784
784
|
}
|
|
785
785
|
// Read at the branch's published tip, authorized at that very commit
|
|
786
786
|
// inside the read — before anything is said about the path there,
|
|
787
787
|
// the folder refusal included: the ref is a name a fetch may move
|
|
788
788
|
// between a verdict and a read; the commit is not.
|
|
789
|
-
const read = await ctx.
|
|
789
|
+
const read = await ctx.versionControlService.fileAtBranch(workspaceId, path, at, (commits) => requireReadAtCommits(ctx, workspaceId, rel, commits, at));
|
|
790
790
|
return { path: rel, at, kind: 'branch', sha: read.sha, content: read.content };
|
|
791
791
|
},
|
|
792
792
|
});
|
|
@@ -829,14 +829,14 @@ agentAccessGate) {
|
|
|
829
829
|
if (typeof args.at === 'string' && args.at.length > 0) {
|
|
830
830
|
if (!isCommitSha(args.at))
|
|
831
831
|
throw new ToolError('`at` must be a full commit sha.', 400);
|
|
832
|
-
return { path: rel, diff: await ctx.
|
|
832
|
+
return { path: rel, diff: await ctx.versionControlService.showFileAtChange(workspaceId, path, args.at) };
|
|
833
833
|
}
|
|
834
834
|
const from = args.from;
|
|
835
835
|
const to = args.to;
|
|
836
836
|
if (typeof from !== 'string' || from.length === 0 || typeof to !== 'string' || to.length === 0) {
|
|
837
837
|
throw new ToolError('Give `from` and `to` (two branches), or `at` (one commit).', 400);
|
|
838
838
|
}
|
|
839
|
-
const compared = await ctx.
|
|
839
|
+
const compared = await ctx.versionControlService.compareFile(workspaceId, path, from, to, async (sides) => {
|
|
840
840
|
await requireReadAtCommits(ctx, workspaceId, rel, sides.from, from);
|
|
841
841
|
await requireReadAtCommits(ctx, workspaceId, rel, sides.to, to);
|
|
842
842
|
});
|
|
@@ -887,19 +887,19 @@ agentAccessGate) {
|
|
|
887
887
|
// The counts alone wait for the listing: its fetch refreshes the
|
|
888
888
|
// remote-tracking refs they are measured against.
|
|
889
889
|
const [status, [branches, counts], pending, forkBase] = await Promise.all([
|
|
890
|
-
ctx.
|
|
891
|
-
ctx.
|
|
890
|
+
ctx.versionControlService.branchStatus(workspaceId),
|
|
891
|
+
ctx.versionControlService
|
|
892
892
|
.listBranches(workspaceId)
|
|
893
|
-
.then(async (listed) => [listed, await ctx.
|
|
894
|
-
ctx.
|
|
895
|
-
ctx.
|
|
893
|
+
.then(async (listed) => [listed, await ctx.versionControlService.branchCounts(workspaceId)]),
|
|
894
|
+
ctx.versionControlService.listPendingChangePaths(workspaceId),
|
|
895
|
+
ctx.versionControlService.resolveForkBase(workspaceId, branch),
|
|
896
896
|
]);
|
|
897
897
|
const info = branches.find((b) => b.name === branch);
|
|
898
898
|
const base = typeof args.base === 'string' && args.base.length > 0 ? args.base : forkBase;
|
|
899
899
|
// A path's name is information too: the changed paths are shown as the
|
|
900
900
|
// change-request reads show them (readable at `origin/<base>`), the
|
|
901
901
|
// uncommitted ones as the workspace's own listing would.
|
|
902
|
-
const changedAll = base && base !== branch ? await ctx.
|
|
902
|
+
const changedAll = base && base !== branch ? await ctx.versionControlService.changedPathsBetweenBranches(workspaceId, base, branch) : [];
|
|
903
903
|
const readableChanged = base ? await readableAt(ctx, workspaceId, base, changedAll) : new Set();
|
|
904
904
|
const changedPaths = changedAll.filter((p) => readableChanged.has(p));
|
|
905
905
|
const pendingRel = pending.map((p) => stripKbDir(p, kbDirName));
|
|
@@ -1077,12 +1077,12 @@ agentAccessGate) {
|
|
|
1077
1077
|
// filesystem runs (`roles.yaml` must parse, no new role, no unknown
|
|
1078
1078
|
// group), handed to the service to ask before the merge.
|
|
1079
1079
|
const outcome = resolutions !== undefined
|
|
1080
|
-
? await ctx.
|
|
1080
|
+
? await ctx.versionControlService.updateBranch(workspaceId, ctx.user, {
|
|
1081
1081
|
...(from !== undefined ? { from } : {}),
|
|
1082
1082
|
resolutions,
|
|
1083
1083
|
validateWrite: await ctx.getWriteValidator(branch),
|
|
1084
1084
|
})
|
|
1085
|
-
: await ctx.
|
|
1085
|
+
: await ctx.versionControlService.updateBranch(workspaceId, ctx.user, from !== undefined ? { from } : {});
|
|
1086
1086
|
if (outcome.kind !== 'conflicts')
|
|
1087
1087
|
return outcome;
|
|
1088
1088
|
// A conflict answer carries the file on both branches, and a path's
|
|
@@ -1102,4 +1102,4 @@ agentAccessGate) {
|
|
|
1102
1102
|
},
|
|
1103
1103
|
});
|
|
1104
1104
|
}
|
|
1105
|
-
//# sourceMappingURL=
|
|
1105
|
+
//# sourceMappingURL=version-control.tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-control.tools.js","sourceRoot":"","sources":["../../../../src/modules/version-control/agent-tools/version-control.tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAsC,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACpH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,gBAAgB,EAAwB,MAAM,0BAA0B,CAAC;AAC5H,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,YAAY,EACZ,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AAErC,2FAA2F;AAC3F,SAAS,UAAU,CAAC,IAAY,EAAE,SAAiB;IACjD,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpF,CAAC;AAED,4EAA4E;AAC5E,kFAAkF;AAClF,MAAM,eAAe,GAAG,CAAC,EAAwC,EAAE,EAAE,CACnE,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE/D,mFAAmF;AACnF,wEAAwE;AACxE,4DAA4D;AAC5D,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AAC,qBAAqB,CAAC,YAAY,CAAC,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC9G,IAAI,OAAO,CAAC,IAAI,KAAK,WAAW;gBAAE,OAAO,OAAO,CAAC;YACjD,oEAAoE;YACpE,qEAAqE;YACrE,+DAA+D;YAC/D,MAAM,KAAK,GAAG,EAAE,CAAC;YACjB,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,KAAK;gBAAE,IAAI,MAAM,gBAAgB,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC;oBAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC1F,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YAChD,OAAO;gBACL,GAAG,OAAO;gBACV,KAAK;gBACL,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC1D,iBAAiB,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM;aACvD,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { type NotifyingListener } from '../../shared/listener-seam.js';
|
|
|
4
4
|
export type ChangeRequestPerson = Pick<AuthUser, 'id' | 'email' | 'name'>;
|
|
5
5
|
/**
|
|
6
6
|
* A change request was OPENED — by a person in the app or by an agent through
|
|
7
|
-
* its tool, which take the one road (`
|
|
7
|
+
* its tool, which take the one road (`VersionControlService.openChangeRequest`).
|
|
8
8
|
* Raised once per request, after its row exists and its source branch was
|
|
9
9
|
* pushed, or the push was refused: the request exists either way, and the
|
|
10
10
|
* branch's next push carries the commits. Never raised for a request that is
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-request-hooks.d.ts","sourceRoot":"","sources":["../../../src/modules/version-control/change-request-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIrF,2EAA2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AAE1E;;;;;;;;GAQG;AACH,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,QAAQ,EAAE,mBAAmB,CAAC;IAC9B;;;;;;;OAOG;IACH,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;OAQG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,wBAAwB,CAAC,CAAC;AAElF;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,qBAAqB,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC3D,wGAAwG;IACxG,sBAAsB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC5E;AAED,qBAAa,kBAAmB,YAAW,mBAAmB;IAG5D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAGrB;IAEF,qBAAqB,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI;IAI1D,sBAAsB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAG3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-request-hooks.js","sourceRoot":"","sources":["../../../src/modules/version-control/change-request-hooks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,YAAY,EAA0B,MAAM,+BAA+B,CAAC;AAErF,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AA4EzB,MAAM,OAAO,kBAAkB;IAC7B,0EAA0E;IAC1E,4EAA4E;IAC3D,MAAM,GAAG,IAAI,YAAY,CACxC,GAAG,EACH,iFAAiF,CAClF,CAAC;IAEF,qBAAqB,CAAC,IAA6B;QACjD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,sBAAsB,CAAC,KAA+B;QACpD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval-lock.d.ts","sourceRoot":"","sources":["../../../../src/modules/version-control/change-request-review/approval-lock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AA2CxD;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAC9C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAI9C,oFAAoF;AACpF,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAK3D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAAC,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMtF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,qBAAqB,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval-lock.js","sourceRoot":"","sources":["../../../../src/modules/version-control/change-request-review/approval-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAGlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,mBAAmB,GAAG,IAAI,CAAC;AACjC;;;;;;;;;GASG;AACH,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAC9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAC9C,4DAA4D;AAC5D,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAKnC;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAY;IAChD,KAAK,IAAI,CAAC,GAAY,GAAG,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC,GAAI,CAAyB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;QACpG,IAAK,CAAwB,CAAC,IAAI,KAAK,kBAAkB;YAAE,OAAO,IAAI,CAAC;IACzE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EAAc,EAAE,QAAgB;IACrE,0EAA0E;IAC1E,oDAAoD;IACpD,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,4BAA4B,wBAAwB,EAAE,CAAC,CAAC,CAAC;IAClF,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAA,uCAAuC,mBAAmB,KAAK,aAAa,GAAG,CAAC,CAAC;IACrG,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAA,gCAAgC,mBAAmB,KAAK,QAAQ,GAAG,CAAC,CAAC;AAC3F,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,EAAc;IACxD,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,4BAA4B,uBAAuB,EAAE,CAAC,CAAC,CAAC;IACjF,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAA,gCAAgC,mBAAmB,KAAK,aAAa,GAAG,CAAC,CAAC;AAChG,CAAC"}
|
|
@@ -34,7 +34,7 @@ export interface MergeGateResult {
|
|
|
34
34
|
* merge; everything in this interface is in-app state
|
|
35
35
|
* the team uses to decide whether the merge should fire.
|
|
36
36
|
*/
|
|
37
|
-
export interface
|
|
37
|
+
export interface IChangeRequestReviewService {
|
|
38
38
|
/**
|
|
39
39
|
* Compose the per-file approval state for a PR detail response. Resolves
|
|
40
40
|
* the eligible approver set against **the PR's base branch on origin**
|
|
@@ -165,4 +165,4 @@ export interface IReviewWorkflowService {
|
|
|
165
165
|
/** Workspace clone — used for the access-tree lookup that gates admin authority. */
|
|
166
166
|
workspaceId: string): Promise<CancelPrResult>;
|
|
167
167
|
}
|
|
168
|
-
//# sourceMappingURL=review
|
|
168
|
+
//# sourceMappingURL=change-request-review.interface.d.ts.map
|
package/dist/modules/version-control/change-request-review/change-request-review.interface.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-request-review.interface.d.ts","sourceRoot":"","sources":["../../../../src/modules/version-control/change-request-review/change-request-review.interface.ts"],"names":[],"mappings":"A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AAY,EAAE,MAAM,GAAG,IAAI;IAC3B,iFAAiF;IACjF,UAAU,EAAE,MAAM;IAClB,oFAAoF;IACpF,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,CAAC;CAC5B"}
|
package/dist/modules/version-control/change-request-review/change-request-review.interface.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-request-review.interface.js","sourceRoot":"","sources":["../../../../src/modules/version-control/change-request-review/change-request-review.interface.ts"],"names":[],"mappings":""}
|
|
@@ -3,9 +3,9 @@ import type { Database } from '../../database/index.js';
|
|
|
3
3
|
import type { IAccessControl } from '../../access/index.js';
|
|
4
4
|
import type { GitService } from '../git/git.service.js';
|
|
5
5
|
import type { WorkspaceService } from '../../workspace/index.js';
|
|
6
|
-
import type {
|
|
6
|
+
import type { IChangeRequestReviewService, MergeGateInput, MergeGateResult } from './change-request-review.interface.js';
|
|
7
7
|
import { type ApprovalTx } from './approval-lock.js';
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class ChangeRequestReviewService implements IChangeRequestReviewService {
|
|
9
9
|
private readonly db;
|
|
10
10
|
private readonly accessControl;
|
|
11
11
|
private readonly workspaceService;
|
|
@@ -118,4 +118,4 @@ export declare class ReviewWorkflowService implements IReviewWorkflowService {
|
|
|
118
118
|
private withApprovalLock;
|
|
119
119
|
unapproveFile(prNumber: number, path: string, user: AuthUser, files: PullRequestFile[], headSha: string, baseBranch: string, prAuthorIdHash: string | null, workspaceId: string): Promise<FileApprovalState[]>;
|
|
120
120
|
}
|
|
121
|
-
//# sourceMappingURL=review
|
|
121
|
+
//# sourceMappingURL=change-request-review.service.d.ts.map
|
package/dist/modules/version-control/change-request-review/change-request-review.service.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-request-review.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/version-control/change-request-review/change-request-review.service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,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AE,eAAe,EAAE,EACxB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAiChC"}
|
|
@@ -5,7 +5,7 @@ import { changeRequests, prFileApprovals, prMergeLog, users } from '../../databa
|
|
|
5
5
|
import { AccessUnreadableError } from '../../access-model/index.js';
|
|
6
6
|
import { mergeCommitSubject } from '../git/merge-commit.js';
|
|
7
7
|
import { redactSecret } from '../../../shared/redact-secret.js';
|
|
8
|
-
import { ChangeRequestConflictsError,
|
|
8
|
+
import { ChangeRequestConflictsError, VersionControlDomainError, VersionControlValidationError, } from '../../../shared/domain-errors.js';
|
|
9
9
|
import { canonicalEmail, hashEmail } from '../../../shared/email-identity.js';
|
|
10
10
|
import { APPROVAL_LOCK_TIMEOUT_MS, isApprovalLockTimeout, takeApprovalLock, takeEveryApprovalLock, } from './approval-lock.js';
|
|
11
11
|
// Merge commit (not squash): change requests can carry many meaningful commits
|
|
@@ -34,13 +34,13 @@ function redactTokens(msg, token) {
|
|
|
34
34
|
* let go. Retryable BY THE CALLER, and said in words a business user can act
|
|
35
35
|
* on: nothing was written, and trying again is the whole fix.
|
|
36
36
|
*/
|
|
37
|
-
class ApprovalBusyError extends
|
|
37
|
+
class ApprovalBusyError extends VersionControlDomainError {
|
|
38
38
|
constructor() {
|
|
39
39
|
super('This change request is being updated right now — try that again in a moment.', 503, { kind: 'approval-write-busy', retryable: true });
|
|
40
40
|
this.name = 'ApprovalBusyError';
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
class MergeBlockedError extends
|
|
43
|
+
class MergeBlockedError extends VersionControlDomainError {
|
|
44
44
|
constructor(reasons) {
|
|
45
45
|
super(`Merge gate rejected: ${reasons.join('; ') || 'unknown'}`, 422, {
|
|
46
46
|
mergeBlockedReasons: reasons,
|
|
@@ -48,13 +48,13 @@ class MergeBlockedError extends WorkflowDomainError {
|
|
|
48
48
|
this.name = 'MergeBlockedError';
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
class MergeExecutionError extends
|
|
51
|
+
class MergeExecutionError extends VersionControlDomainError {
|
|
52
52
|
constructor(reason) {
|
|
53
53
|
super(`Merge failed: ${reason}`, 502);
|
|
54
54
|
this.name = 'MergeExecutionError';
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
class ApprovalAuthError extends
|
|
57
|
+
class ApprovalAuthError extends VersionControlDomainError {
|
|
58
58
|
constructor(reason) {
|
|
59
59
|
const { status, msg } = {
|
|
60
60
|
'not-eligible': { status: 403, msg: "You don't have write access on this file's path" },
|
|
@@ -74,7 +74,7 @@ class ApprovalAuthError extends WorkflowDomainError {
|
|
|
74
74
|
* Signing in again makes a fresh account at the same address, and approvals
|
|
75
75
|
* made then are that new person's.
|
|
76
76
|
*/
|
|
77
|
-
class ApprovalAccountGoneError extends
|
|
77
|
+
class ApprovalAccountGoneError extends VersionControlDomainError {
|
|
78
78
|
constructor() {
|
|
79
79
|
super('This account no longer exists — sign in again to approve.', 401, {
|
|
80
80
|
kind: 'approval-account-erased',
|
|
@@ -82,13 +82,13 @@ class ApprovalAccountGoneError extends WorkflowDomainError {
|
|
|
82
82
|
this.name = 'ApprovalAccountGoneError';
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
class BypassAuthError extends
|
|
85
|
+
class BypassAuthError extends VersionControlDomainError {
|
|
86
86
|
constructor() {
|
|
87
87
|
super("Only admins can merge with bypass. You need write access to roles.yaml on the base branch to skip approval warnings.", 403);
|
|
88
88
|
this.name = 'BypassAuthError';
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
class CancelStateError extends
|
|
91
|
+
class CancelStateError extends VersionControlDomainError {
|
|
92
92
|
constructor(reason) {
|
|
93
93
|
const msg = reason === 'already-applied'
|
|
94
94
|
? 'This change request was already applied.'
|
|
@@ -97,7 +97,7 @@ class CancelStateError extends WorkflowDomainError {
|
|
|
97
97
|
this.name = 'CancelStateError';
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
class CancelAuthError extends
|
|
100
|
+
class CancelAuthError extends VersionControlDomainError {
|
|
101
101
|
constructor() {
|
|
102
102
|
super("You can't cancel this change request — that takes being its author, an admin, " +
|
|
103
103
|
'or having edit access to every file it changes.', 403);
|
|
@@ -106,7 +106,7 @@ class CancelAuthError extends WorkflowDomainError {
|
|
|
106
106
|
}
|
|
107
107
|
function assertValidPrNumber(n) {
|
|
108
108
|
if (!Number.isInteger(n) || n <= 0) {
|
|
109
|
-
throw new
|
|
109
|
+
throw new VersionControlValidationError('PR number must be a positive integer');
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
@@ -180,15 +180,15 @@ function assertValidPath(p) {
|
|
|
180
180
|
if (p === undefined || p === null)
|
|
181
181
|
return;
|
|
182
182
|
if (typeof p !== 'string')
|
|
183
|
-
throw new
|
|
183
|
+
throw new VersionControlValidationError('path must be a string');
|
|
184
184
|
if (!p)
|
|
185
|
-
throw new
|
|
185
|
+
throw new VersionControlValidationError('path, if provided, must be non-empty');
|
|
186
186
|
if (p.length > 4096)
|
|
187
|
-
throw new
|
|
187
|
+
throw new VersionControlValidationError('path exceeds 4096 character limit');
|
|
188
188
|
if (p.includes('\0'))
|
|
189
|
-
throw new
|
|
189
|
+
throw new VersionControlValidationError('path contains NUL');
|
|
190
190
|
}
|
|
191
|
-
export class
|
|
191
|
+
export class ChangeRequestReviewService {
|
|
192
192
|
db;
|
|
193
193
|
accessControl;
|
|
194
194
|
workspaceService;
|
|
@@ -305,9 +305,9 @@ export class ReviewWorkflowService {
|
|
|
305
305
|
assertValidPrNumber(prNumber);
|
|
306
306
|
assertValidPath(path);
|
|
307
307
|
if (!headSha)
|
|
308
|
-
throw new
|
|
308
|
+
throw new VersionControlValidationError('head sha is required');
|
|
309
309
|
if (!baseBranch)
|
|
310
|
-
throw new
|
|
310
|
+
throw new VersionControlValidationError('base branch is required');
|
|
311
311
|
if (!files.some((f) => f.path === path)) {
|
|
312
312
|
throw new ApprovalAuthError('path-not-in-pr');
|
|
313
313
|
}
|
|
@@ -403,11 +403,11 @@ export class ReviewWorkflowService {
|
|
|
403
403
|
async mergePr(prNumber, user, headSha, approvals, state, prTitle, baseBranch, workspaceId, opts = {}) {
|
|
404
404
|
assertValidPrNumber(prNumber);
|
|
405
405
|
if (!headSha)
|
|
406
|
-
throw new
|
|
406
|
+
throw new VersionControlValidationError('head sha is required');
|
|
407
407
|
if (!baseBranch)
|
|
408
|
-
throw new
|
|
408
|
+
throw new VersionControlValidationError('base branch is required');
|
|
409
409
|
if (!workspaceId)
|
|
410
|
-
throw new
|
|
410
|
+
throw new VersionControlValidationError('workspace id is required');
|
|
411
411
|
// Server-side re-validation — never trust the frontend's cached gate.
|
|
412
412
|
// Hard blocks always refuse. Missing approvals refuse unless the caller
|
|
413
413
|
// opted into bypass; with bypass, the bypassed warnings get inlined in the
|
|
@@ -449,7 +449,7 @@ export class ReviewWorkflowService {
|
|
|
449
449
|
.where(eq(changeRequests.number, prNumber))
|
|
450
450
|
.limit(1);
|
|
451
451
|
if (!cr)
|
|
452
|
-
throw new
|
|
452
|
+
throw new VersionControlValidationError(`Change request #${prNumber} not found`);
|
|
453
453
|
// Re-validate lifecycle against the AUTHORITATIVE row, not the caller's
|
|
454
454
|
// `state` (which only drove the gate). A stale or duplicate request must not
|
|
455
455
|
// re-run the git merge on a CR that's already merged or closed.
|
|
@@ -694,9 +694,9 @@ export class ReviewWorkflowService {
|
|
|
694
694
|
async cancelPr(prNumber, user, state, authorIdHash, baseBranch, workspaceId) {
|
|
695
695
|
assertValidPrNumber(prNumber);
|
|
696
696
|
if (!baseBranch)
|
|
697
|
-
throw new
|
|
697
|
+
throw new VersionControlValidationError('base branch is required');
|
|
698
698
|
if (!workspaceId)
|
|
699
|
-
throw new
|
|
699
|
+
throw new VersionControlValidationError('workspace id is required');
|
|
700
700
|
// Refuse early on terminal states so the gh call only fires for genuinely
|
|
701
701
|
// open PRs. Two distinct 422s — frontend distinguishes "already applied"
|
|
702
702
|
// from "already cancelled" in friendlyGitError to drive different copy.
|
|
@@ -784,7 +784,7 @@ export class ReviewWorkflowService {
|
|
|
784
784
|
async carryApprovalsForward(prNumber, fromHeadSha, toHeadSha, changedPaths) {
|
|
785
785
|
assertValidPrNumber(prNumber);
|
|
786
786
|
if (!fromHeadSha || !toHeadSha) {
|
|
787
|
-
throw new
|
|
787
|
+
throw new VersionControlValidationError('both head shas are required');
|
|
788
788
|
}
|
|
789
789
|
if (fromHeadSha === toHeadSha)
|
|
790
790
|
return 0;
|
|
@@ -852,7 +852,7 @@ export class ReviewWorkflowService {
|
|
|
852
852
|
assertValidPrNumber(prNumber);
|
|
853
853
|
assertValidPath(path);
|
|
854
854
|
if (!headSha)
|
|
855
|
-
throw new
|
|
855
|
+
throw new VersionControlValidationError('head sha is required');
|
|
856
856
|
const callerEmail = canonicalEmail(user.email);
|
|
857
857
|
// Only revoke the caller's OWN approval — never someone else's. Filter on
|
|
858
858
|
// (PR, path, approverEmail) without pinning the SHA so a user revoking
|
|
@@ -874,4 +874,4 @@ export class ReviewWorkflowService {
|
|
|
874
874
|
return this.getApprovalStates(prNumber, files, headSha, baseBranch, prAuthorIdHash, workspaceId, user.email);
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
|
-
//# sourceMappingURL=review
|
|
877
|
+
//# sourceMappingURL=change-request-review.service.js.map
|