@bevel-software/platform-core-backend 0.32.0 → 0.34.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/access-control.md +24 -8
- package/agent-guide/html-views.md +277 -15
- package/agent-guide/tool-manuals.md +1 -1
- package/dist/core/catalog-revision.d.ts +12 -1
- package/dist/core/catalog-revision.d.ts.map +1 -1
- package/dist/core/catalog-revision.js +23 -3
- package/dist/core/catalog-revision.js.map +1 -1
- package/dist/core/core-ports.d.ts +41 -0
- 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 +42 -10
- package/dist/core/create-core-server.js.map +1 -1
- package/dist/core/create-core-services.d.ts +22 -6
- package/dist/core/create-core-services.d.ts.map +1 -1
- package/dist/core/create-core-services.js +58 -17
- package/dist/core/create-core-services.js.map +1 -1
- package/dist/core/lifecycle.d.ts +24 -0
- package/dist/core/lifecycle.d.ts.map +1 -1
- package/dist/core/lifecycle.js +16 -2
- package/dist/core/lifecycle.js.map +1 -1
- package/dist/core/public-config.d.ts +10 -0
- package/dist/core/public-config.d.ts.map +1 -1
- package/dist/core/public-config.js +10 -0
- package/dist/core/public-config.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/access/access-control.interface.d.ts +17 -9
- package/dist/modules/access/access-control.interface.d.ts.map +1 -1
- package/dist/modules/access/access-control.service.d.ts +13 -3
- package/dist/modules/access/access-control.service.d.ts.map +1 -1
- package/dist/modules/access/access-control.service.js +165 -77
- package/dist/modules/access/access-control.service.js.map +1 -1
- package/dist/modules/access/access-declarations.d.ts +1 -1
- package/dist/modules/access/access-declarations.d.ts.map +1 -1
- package/dist/modules/access/access-declarations.js +1 -1
- package/dist/modules/access/access-declarations.js.map +1 -1
- package/dist/modules/access/access-mutation.service.d.ts +28 -25
- package/dist/modules/access/access-mutation.service.d.ts.map +1 -1
- package/dist/modules/access/access-mutation.service.js +50 -53
- package/dist/modules/access/access-mutation.service.js.map +1 -1
- package/dist/modules/access/access-requests.contract.d.ts +1 -1
- package/dist/modules/access/access-requests.contract.d.ts.map +1 -1
- package/dist/modules/access/access-requests.routes.d.ts +3 -3
- package/dist/modules/access/access-requests.routes.d.ts.map +1 -1
- package/dist/modules/access/access-requests.routes.js +7 -7
- package/dist/modules/access/access-requests.routes.js.map +1 -1
- package/dist/modules/access/access-requests.service.d.ts +21 -20
- package/dist/modules/access/access-requests.service.d.ts.map +1 -1
- package/dist/modules/access/access-requests.service.js +22 -68
- package/dist/modules/access/access-requests.service.js.map +1 -1
- package/dist/modules/access/access-view.d.ts +1 -1
- package/dist/modules/access/access-view.d.ts.map +1 -1
- package/dist/modules/access/access-view.js +12 -11
- package/dist/modules/access/access-view.js.map +1 -1
- package/dist/modules/access/access.routes.d.ts +8 -7
- package/dist/modules/access/access.routes.d.ts.map +1 -1
- package/dist/modules/access/access.routes.js +38 -32
- package/dist/modules/access/access.routes.js.map +1 -1
- package/dist/modules/access/admin-locked-commit.d.ts +2 -2
- package/dist/modules/access/admin-locked-commit.d.ts.map +1 -1
- package/dist/modules/access/admin-locked-commit.js +1 -1
- package/dist/modules/access/admin-locked-commit.js.map +1 -1
- package/dist/modules/access/capability-registry.js +1 -1
- package/dist/modules/access/capability-registry.js.map +1 -1
- package/dist/modules/access/change-read-gate.d.ts +2 -2
- package/dist/modules/access/change-read-gate.d.ts.map +1 -1
- package/dist/modules/access/change-read-gate.js +1 -3
- package/dist/modules/access/change-read-gate.js.map +1 -1
- package/dist/modules/access/creator-access.d.ts +2 -2
- package/dist/modules/access/creator-access.d.ts.map +1 -1
- package/dist/modules/access/creator-access.js +2 -4
- package/dist/modules/access/creator-access.js.map +1 -1
- package/dist/modules/access/directory-sync-bot.d.ts +1 -1
- package/dist/modules/access/directory-sync-bot.d.ts.map +1 -1
- package/dist/modules/access/directory-sync-bot.js +1 -1
- package/dist/modules/access/directory-sync-bot.js.map +1 -1
- package/dist/modules/access/groups-admin.routes.d.ts +2 -2
- package/dist/modules/access/groups-admin.routes.d.ts.map +1 -1
- package/dist/modules/access/groups-admin.routes.js +6 -4
- package/dist/modules/access/groups-admin.routes.js.map +1 -1
- package/dist/modules/access/groups-admin.service.d.ts +45 -14
- package/dist/modules/access/groups-admin.service.d.ts.map +1 -1
- package/dist/modules/access/groups-admin.service.js +80 -39
- package/dist/modules/access/groups-admin.service.js.map +1 -1
- package/dist/modules/access/groups-edit.d.ts +1 -1
- package/dist/modules/access/groups-edit.d.ts.map +1 -1
- package/dist/modules/access/groups-edit.js +3 -3
- package/dist/modules/access/groups-edit.js.map +1 -1
- package/dist/modules/access/index.d.ts +17 -0
- package/dist/modules/access/index.d.ts.map +1 -0
- package/dist/modules/access/index.js +6 -0
- package/dist/modules/access/index.js.map +1 -0
- package/dist/modules/access/reference-scan.d.ts +116 -24
- package/dist/modules/access/reference-scan.d.ts.map +1 -1
- package/dist/modules/access/reference-scan.js +305 -44
- package/dist/modules/access/reference-scan.js.map +1 -1
- package/dist/modules/access/roles-admin.service.d.ts +18 -9
- package/dist/modules/access/roles-admin.service.d.ts.map +1 -1
- package/dist/modules/access/roles-admin.service.js +32 -26
- package/dist/modules/access/roles-admin.service.js.map +1 -1
- package/dist/modules/access/roles-edit.js +1 -1
- package/dist/modules/access/roles-edit.js.map +1 -1
- package/dist/modules/access/synced-groups-committer.d.ts +2 -2
- package/dist/modules/access/synced-groups-committer.d.ts.map +1 -1
- package/dist/modules/access/synced-groups-committer.js +2 -2
- package/dist/modules/access/synced-groups-committer.js.map +1 -1
- package/dist/modules/access/synced-groups-writer.js +2 -2
- package/dist/modules/access/synced-groups-writer.js.map +1 -1
- package/dist/modules/access/user-access-removal.service.d.ts +1 -1
- package/dist/modules/access/user-access-removal.service.d.ts.map +1 -1
- package/dist/modules/access/user-access-removal.service.js +2 -5
- package/dist/modules/access/user-access-removal.service.js.map +1 -1
- package/dist/modules/access-model/access-grammar.d.ts +35 -10
- package/dist/modules/access-model/access-grammar.d.ts.map +1 -1
- package/dist/modules/access-model/access-grammar.js +60 -20
- package/dist/modules/access-model/access-grammar.js.map +1 -1
- package/dist/modules/access-model/access-splice.d.ts +22 -18
- package/dist/modules/access-model/access-splice.d.ts.map +1 -1
- package/dist/modules/access-model/access-splice.js +20 -14
- package/dist/modules/access-model/access-splice.js.map +1 -1
- package/dist/modules/access-model/group-files.d.ts +1 -0
- package/dist/modules/access-model/group-files.d.ts.map +1 -1
- package/dist/modules/access-model/group-files.js +5 -1
- package/dist/modules/access-model/group-files.js.map +1 -1
- package/dist/modules/access-model/index.d.ts +20 -5
- package/dist/modules/access-model/index.d.ts.map +1 -1
- package/dist/modules/access-model/index.js +18 -5
- package/dist/modules/access-model/index.js.map +1 -1
- package/dist/modules/access-model/roles-yaml-guard.d.ts +1 -1
- package/dist/modules/access-model/roles-yaml-guard.d.ts.map +1 -1
- package/dist/modules/admin/admin-access.routes.d.ts +1 -1
- package/dist/modules/admin/admin-access.routes.d.ts.map +1 -1
- package/dist/modules/admin/admin-access.routes.js +1 -1
- package/dist/modules/admin/admin-access.routes.js.map +1 -1
- package/dist/modules/admin/admin-access.service.d.ts +2 -2
- package/dist/modules/admin/admin-access.service.d.ts.map +1 -1
- package/dist/modules/admin/index.d.ts +8 -0
- package/dist/modules/admin/index.d.ts.map +1 -0
- package/dist/modules/admin/index.js +2 -0
- package/dist/modules/admin/index.js.map +1 -0
- package/dist/modules/agent-guide/agent-guide.js +1 -1
- package/dist/modules/agent-guide/agent-guide.js.map +1 -1
- package/dist/modules/agent-guide/agent-guide.tools.d.ts +3 -3
- package/dist/modules/agent-guide/agent-guide.tools.d.ts.map +1 -1
- package/dist/modules/agent-guide/agent-guide.tools.js +15 -7
- package/dist/modules/agent-guide/agent-guide.tools.js.map +1 -1
- package/dist/modules/agent-guide/index.d.ts +1 -1
- package/dist/modules/agent-guide/index.d.ts.map +1 -1
- package/dist/modules/agent-guide/index.js +1 -1
- package/dist/modules/agent-guide/index.js.map +1 -1
- package/dist/modules/agent-instructions/compose.d.ts +3 -1
- package/dist/modules/agent-instructions/compose.d.ts.map +1 -1
- package/dist/modules/agent-instructions/compose.js +3 -1
- package/dist/modules/agent-instructions/compose.js.map +1 -1
- package/dist/modules/agent-instructions/read-preamble.d.ts +1 -1
- package/dist/modules/agent-instructions/read-preamble.d.ts.map +1 -1
- package/dist/modules/agent-instructions/shared-file-rules.d.ts +5 -1
- package/dist/modules/agent-instructions/shared-file-rules.d.ts.map +1 -1
- package/dist/modules/agent-instructions/shared-file-rules.js +16 -1
- package/dist/modules/agent-instructions/shared-file-rules.js.map +1 -1
- package/dist/modules/agent-scope/agent-scope.contract.d.ts +67 -0
- package/dist/modules/agent-scope/agent-scope.contract.d.ts.map +1 -0
- package/dist/modules/agent-scope/agent-scope.contract.js +27 -0
- package/dist/modules/agent-scope/agent-scope.contract.js.map +1 -0
- package/dist/modules/agent-scope/connection-scope.d.ts +111 -0
- package/dist/modules/agent-scope/connection-scope.d.ts.map +1 -0
- package/dist/modules/agent-scope/connection-scope.js +165 -0
- package/dist/modules/agent-scope/connection-scope.js.map +1 -0
- package/dist/modules/agent-scope/index.d.ts +3 -0
- package/dist/modules/agent-scope/index.d.ts.map +1 -0
- package/dist/modules/agent-scope/index.js +3 -0
- package/dist/modules/agent-scope/index.js.map +1 -0
- package/dist/modules/audit/agent-audit.service.d.ts +2 -2
- package/dist/modules/audit/agent-audit.service.d.ts.map +1 -1
- package/dist/modules/audit/agent-audit.service.js +3 -1
- package/dist/modules/audit/agent-audit.service.js.map +1 -1
- package/dist/modules/audit/agent-connection.routes.d.ts +1 -1
- package/dist/modules/audit/agent-connection.routes.d.ts.map +1 -1
- package/dist/modules/audit/agent-connection.routes.js +1 -1
- package/dist/modules/audit/agent-connection.routes.js.map +1 -1
- package/dist/modules/audit/agent-rest-audit.middleware.d.ts +1 -1
- package/dist/modules/audit/agent-rest-audit.middleware.d.ts.map +1 -1
- package/dist/modules/audit/agent-rest-audit.middleware.js +1 -1
- package/dist/modules/audit/agent-rest-audit.middleware.js.map +1 -1
- package/dist/modules/audit/audit.contract.d.ts +6 -0
- package/dist/modules/audit/audit.contract.d.ts.map +1 -1
- package/dist/modules/audit/audit.contract.js.map +1 -1
- package/dist/modules/audit/audit.routes.d.ts +3 -3
- package/dist/modules/audit/audit.routes.d.ts.map +1 -1
- package/dist/modules/audit/audit.routes.js +2 -2
- package/dist/modules/audit/audit.routes.js.map +1 -1
- package/dist/modules/auth/account-admission.d.ts +12 -0
- package/dist/modules/auth/account-admission.d.ts.map +1 -1
- package/dist/modules/auth/account-admission.js +15 -0
- package/dist/modules/auth/account-admission.js.map +1 -1
- package/dist/modules/auth/account-erasure.service.d.ts +3 -3
- package/dist/modules/auth/account-erasure.service.d.ts.map +1 -1
- package/dist/modules/auth/account-erasure.service.js +1 -5
- package/dist/modules/auth/account-erasure.service.js.map +1 -1
- package/dist/modules/auth/account-switch-lock.d.ts +1 -1
- package/dist/modules/auth/account-switch-lock.d.ts.map +1 -1
- package/dist/modules/auth/account-switch-lock.js +1 -1
- package/dist/modules/auth/account-switch-lock.js.map +1 -1
- package/dist/modules/auth/account.routes.d.ts +2 -2
- package/dist/modules/auth/account.routes.d.ts.map +1 -1
- package/dist/modules/auth/account.routes.js +1 -1
- package/dist/modules/auth/account.routes.js.map +1 -1
- package/dist/modules/auth/auth.middleware.d.ts +27 -1
- package/dist/modules/auth/auth.middleware.d.ts.map +1 -1
- package/dist/modules/auth/auth.middleware.js +42 -4
- package/dist/modules/auth/auth.middleware.js.map +1 -1
- package/dist/modules/auth/auth.routes.d.ts +13 -9
- package/dist/modules/auth/auth.routes.d.ts.map +1 -1
- package/dist/modules/auth/auth.routes.js +35 -29
- package/dist/modules/auth/auth.routes.js.map +1 -1
- package/dist/modules/auth/auth.service.d.ts +56 -7
- package/dist/modules/auth/auth.service.d.ts.map +1 -1
- package/dist/modules/auth/auth.service.js +131 -37
- package/dist/modules/auth/auth.service.js.map +1 -1
- package/dist/modules/auth/index.d.ts +3 -1
- package/dist/modules/auth/index.d.ts.map +1 -1
- package/dist/modules/auth/index.js +1 -1
- package/dist/modules/auth/index.js.map +1 -1
- package/dist/modules/auth/oidc-auth-provider.d.ts.map +1 -1
- package/dist/modules/auth/oidc-auth-provider.js +3 -10
- package/dist/modules/auth/oidc-auth-provider.js.map +1 -1
- package/dist/modules/code-mode/code-mode.tool.d.ts +1 -1
- package/dist/modules/code-mode/code-mode.tool.d.ts.map +1 -1
- package/dist/modules/connection-probe/connection-probe.service.d.ts +2 -2
- package/dist/modules/connection-probe/connection-probe.service.d.ts.map +1 -1
- package/dist/modules/connection-probe/connection-probe.service.js +1 -4
- package/dist/modules/connection-probe/connection-probe.service.js.map +1 -1
- package/dist/modules/database/core-schema.d.ts +175 -234
- package/dist/modules/database/core-schema.d.ts.map +1 -1
- package/dist/modules/database/core-schema.js +72 -35
- package/dist/modules/database/core-schema.js.map +1 -1
- package/dist/modules/database/index.d.ts +10 -0
- package/dist/modules/database/index.d.ts.map +1 -0
- package/dist/modules/database/index.js +4 -0
- package/dist/modules/database/index.js.map +1 -0
- package/dist/modules/database/migrate.d.ts.map +1 -1
- package/dist/modules/database/migrate.js +78 -3
- package/dist/modules/database/migrate.js.map +1 -1
- package/dist/modules/declared-variables/declared-variables.routes.d.ts +10 -3
- package/dist/modules/declared-variables/declared-variables.routes.d.ts.map +1 -1
- package/dist/modules/declared-variables/declared-variables.routes.js +13 -2
- package/dist/modules/declared-variables/declared-variables.routes.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 +3 -3
- package/dist/modules/diff/diff.routes.js.map +1 -1
- package/dist/modules/diff/diff.service.d.ts +2 -2
- package/dist/modules/diff/diff.service.d.ts.map +1 -1
- package/dist/modules/diff/index.d.ts +7 -0
- package/dist/modules/diff/index.d.ts.map +1 -0
- package/dist/modules/diff/index.js +2 -0
- package/dist/modules/diff/index.js.map +1 -0
- package/dist/modules/embed/account-link.service.d.ts +1 -1
- package/dist/modules/embed/account-link.service.d.ts.map +1 -1
- package/dist/modules/embed/account-link.service.js +1 -1
- package/dist/modules/embed/account-link.service.js.map +1 -1
- package/dist/modules/embed/embed.routes.d.ts +1 -1
- package/dist/modules/embed/embed.routes.d.ts.map +1 -1
- package/dist/modules/embed/embed.routes.js +2 -2
- package/dist/modules/embed/embed.routes.js.map +1 -1
- package/dist/modules/embed/embed.service.d.ts +1 -1
- package/dist/modules/embed/embed.service.d.ts.map +1 -1
- package/dist/modules/embed/embed.tools.d.ts +4 -4
- package/dist/modules/embed/embed.tools.d.ts.map +1 -1
- package/dist/modules/embed/embed.tools.js +8 -5
- package/dist/modules/embed/embed.tools.js.map +1 -1
- package/dist/modules/github-app/github-app.connection.d.ts +1 -1
- package/dist/modules/github-app/github-app.connection.d.ts.map +1 -1
- package/dist/modules/github-app/github-app.routes.d.ts +3 -3
- package/dist/modules/github-app/github-app.routes.d.ts.map +1 -1
- package/dist/modules/github-app/github-app.routes.js +1 -1
- package/dist/modules/github-app/github-app.routes.js.map +1 -1
- package/dist/modules/kb-fs/index.d.ts +12 -0
- package/dist/modules/kb-fs/index.d.ts.map +1 -1
- package/dist/modules/kb-fs/index.js +11 -0
- package/dist/modules/kb-fs/index.js.map +1 -1
- package/dist/modules/kb-fs/locking-filesystem.d.ts +1 -1
- package/dist/modules/kb-fs/locking-filesystem.d.ts.map +1 -1
- package/dist/modules/kb-fs/locking-filesystem.js +7 -1
- package/dist/modules/kb-fs/locking-filesystem.js.map +1 -1
- package/dist/modules/kb-fs/repo-path.d.ts +26 -6
- package/dist/modules/kb-fs/repo-path.d.ts.map +1 -1
- package/dist/modules/kb-fs/repo-path.js +22 -7
- package/dist/modules/kb-fs/repo-path.js.map +1 -1
- package/dist/modules/kb-fs/tmp-ref.d.ts +36 -0
- package/dist/modules/kb-fs/tmp-ref.d.ts.map +1 -0
- package/dist/modules/kb-fs/tmp-ref.js +76 -0
- package/dist/modules/kb-fs/tmp-ref.js.map +1 -0
- package/dist/modules/kb-sync/kb-sync.routes.d.ts +1 -1
- package/dist/modules/kb-sync/kb-sync.routes.d.ts.map +1 -1
- package/dist/modules/kb-sync/kb-sync.routes.js +2 -2
- package/dist/modules/kb-sync/kb-sync.routes.js.map +1 -1
- package/dist/modules/kb-sync/kb-sync.service.js +1 -1
- package/dist/modules/kb-sync/kb-sync.service.js.map +1 -1
- package/dist/modules/kb-sync/sync-auth.js +1 -1
- package/dist/modules/kb-sync/sync-auth.js.map +1 -1
- package/dist/modules/kb-sync/sync-payload.js +1 -1
- package/dist/modules/kb-sync/sync-payload.js.map +1 -1
- package/dist/modules/marketplace/git-http.routes.d.ts +1 -1
- package/dist/modules/marketplace/git-http.routes.d.ts.map +1 -1
- package/dist/modules/marketplace/git-http.routes.js +1 -1
- package/dist/modules/marketplace/git-http.routes.js.map +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-admin.routes.d.ts +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-admin.routes.d.ts.map +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-admin.routes.js +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-admin.routes.js.map +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-codes.store.d.ts +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-codes.store.d.ts.map +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-codes.store.js +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-codes.store.js.map +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-credentials.service.d.ts +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-credentials.service.d.ts.map +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-credentials.service.js +1 -1
- package/dist/modules/marketplace/github-facade/github-facade-credentials.service.js.map +1 -1
- package/dist/modules/marketplace/github-facade/github-facade.routes.d.ts +2 -2
- package/dist/modules/marketplace/github-facade/github-facade.routes.d.ts.map +1 -1
- package/dist/modules/marketplace/github-facade/github-facade.routes.js +2 -2
- package/dist/modules/marketplace/github-facade/github-facade.routes.js.map +1 -1
- package/dist/modules/marketplace/github-facade/github-facade.service.d.ts +2 -2
- package/dist/modules/marketplace/github-facade/github-facade.service.d.ts.map +1 -1
- package/dist/modules/marketplace/github-facade/github-facade.service.js +1 -1
- package/dist/modules/marketplace/github-facade/github-facade.service.js.map +1 -1
- package/dist/modules/marketplace/marketplace-repo.service.d.ts +1 -1
- package/dist/modules/marketplace/marketplace-repo.service.d.ts.map +1 -1
- package/dist/modules/marketplace/marketplace-repo.service.js +1 -1
- package/dist/modules/mcp/index.d.ts +8 -0
- package/dist/modules/mcp/index.d.ts.map +1 -0
- package/dist/modules/mcp/index.js +7 -0
- package/dist/modules/mcp/index.js.map +1 -0
- package/dist/modules/mcp/mcp-auth.middleware.d.ts +11 -5
- package/dist/modules/mcp/mcp-auth.middleware.d.ts.map +1 -1
- package/dist/modules/mcp/mcp-auth.middleware.js +18 -5
- package/dist/modules/mcp/mcp-auth.middleware.js.map +1 -1
- package/dist/modules/mcp/mcp.routes.d.ts +9 -5
- package/dist/modules/mcp/mcp.routes.d.ts.map +1 -1
- package/dist/modules/mcp/mcp.routes.js +41 -6
- package/dist/modules/mcp/mcp.routes.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +25 -4
- package/dist/modules/mcp/mcp.service.d.ts.map +1 -1
- package/dist/modules/mcp/mcp.service.js +84 -19
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/oauth/bevel-oauth-provider.d.ts +25 -2
- package/dist/modules/mcp/oauth/bevel-oauth-provider.d.ts.map +1 -1
- package/dist/modules/mcp/oauth/bevel-oauth-provider.js +46 -11
- package/dist/modules/mcp/oauth/bevel-oauth-provider.js.map +1 -1
- package/dist/modules/mcp/oauth/oauth-consent.routes.d.ts +10 -1
- package/dist/modules/mcp/oauth/oauth-consent.routes.d.ts.map +1 -1
- package/dist/modules/mcp/oauth/oauth-consent.routes.js +35 -2
- package/dist/modules/mcp/oauth/oauth-consent.routes.js.map +1 -1
- package/dist/modules/onboarding/onboarding.routes.d.ts +1 -1
- package/dist/modules/onboarding/onboarding.routes.d.ts.map +1 -1
- package/dist/modules/onboarding/onboarding.routes.js +1 -1
- package/dist/modules/onboarding/onboarding.routes.js.map +1 -1
- package/dist/modules/onboarding/starter-pack.service.d.ts +4 -5
- package/dist/modules/onboarding/starter-pack.service.d.ts.map +1 -1
- package/dist/modules/onboarding/starter-pack.service.js +2 -2
- package/dist/modules/onboarding/starter-pack.service.js.map +1 -1
- package/dist/modules/plugins/compile/compile-marketplace.d.ts +1 -1
- package/dist/modules/plugins/compile/compile-marketplace.d.ts.map +1 -1
- package/dist/modules/plugins/compile/compile-marketplace.js +1 -1
- package/dist/modules/plugins/compile/compile-marketplace.js.map +1 -1
- package/dist/modules/plugins/compile/marketplace-compiler.service.d.ts +3 -3
- package/dist/modules/plugins/compile/marketplace-compiler.service.d.ts.map +1 -1
- package/dist/modules/plugins/discovery/bundle-dialect/registry.d.ts +1 -1
- package/dist/modules/plugins/discovery/bundle-dialect/registry.d.ts.map +1 -1
- package/dist/modules/plugins/discovery/bundle-dialect/registry.js +1 -1
- package/dist/modules/plugins/discovery/bundle-dialect/registry.js.map +1 -1
- package/dist/modules/plugins/index.d.ts +2 -1
- package/dist/modules/plugins/index.d.ts.map +1 -1
- package/dist/modules/plugins/index.js +2 -0
- package/dist/modules/plugins/index.js.map +1 -1
- package/dist/modules/plugins/join-proposals.d.ts +2 -2
- package/dist/modules/plugins/join-proposals.d.ts.map +1 -1
- package/dist/modules/plugins/join-proposals.js +1 -1
- package/dist/modules/plugins/join-proposals.js.map +1 -1
- package/dist/modules/plugins/join-request-jobs.service.d.ts +1 -1
- package/dist/modules/plugins/join-request-jobs.service.d.ts.map +1 -1
- package/dist/modules/plugins/join-request-jobs.service.js +2 -2
- package/dist/modules/plugins/join-request-jobs.service.js.map +1 -1
- package/dist/modules/plugins/join-request-records.store.d.ts +1 -1
- package/dist/modules/plugins/join-request-records.store.d.ts.map +1 -1
- package/dist/modules/plugins/join-request-records.store.js +1 -1
- package/dist/modules/plugins/join-request-records.store.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 +1 -1
- package/dist/modules/plugins/join-requests.service.js.map +1 -1
- package/dist/modules/plugins/plugin-links.d.ts +21 -5
- package/dist/modules/plugins/plugin-links.d.ts.map +1 -1
- package/dist/modules/plugins/plugin-links.js +1 -1
- package/dist/modules/plugins/plugin-links.js.map +1 -1
- package/dist/modules/plugins/plugin-links.service.d.ts +8 -5
- package/dist/modules/plugins/plugin-links.service.d.ts.map +1 -1
- package/dist/modules/plugins/plugin-links.service.js +8 -6
- package/dist/modules/plugins/plugin-links.service.js.map +1 -1
- package/dist/modules/plugins/plugin-provision.service.d.ts +2 -2
- package/dist/modules/plugins/plugin-provision.service.d.ts.map +1 -1
- package/dist/modules/plugins/plugin-provision.service.js +2 -3
- package/dist/modules/plugins/plugin-provision.service.js.map +1 -1
- package/dist/modules/plugins/plugin-rename.service.d.ts +2 -2
- package/dist/modules/plugins/plugin-rename.service.d.ts.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.contract.d.ts +1 -1
- package/dist/modules/plugins/plugins.contract.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.routes.d.ts +7 -3
- package/dist/modules/plugins/plugins.routes.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.routes.js +35 -8
- package/dist/modules/plugins/plugins.routes.js.map +1 -1
- package/dist/modules/plugins/plugins.service.d.ts +4 -4
- package/dist/modules/plugins/plugins.service.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.service.js +1 -1
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/dist/modules/plugins/plugins.tools.d.ts +1 -1
- package/dist/modules/plugins/plugins.tools.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.tools.js +3 -3
- package/dist/modules/plugins/plugins.tools.js.map +1 -1
- package/dist/modules/plugins/teams.routes.d.ts +3 -3
- package/dist/modules/plugins/teams.routes.d.ts.map +1 -1
- package/dist/modules/secrets-vault/db-secrets-vault.service.d.ts +1 -1
- package/dist/modules/secrets-vault/db-secrets-vault.service.d.ts.map +1 -1
- package/dist/modules/secrets-vault/db-secrets-vault.service.js +1 -1
- package/dist/modules/secrets-vault/db-secrets-vault.service.js.map +1 -1
- package/dist/modules/secrets-vault/index.d.ts +1 -0
- package/dist/modules/secrets-vault/index.d.ts.map +1 -1
- package/dist/modules/secrets-vault/index.js +2 -0
- package/dist/modules/secrets-vault/index.js.map +1 -1
- package/dist/modules/secrets-vault/secrets-vault.routes.d.ts +13 -4
- package/dist/modules/secrets-vault/secrets-vault.routes.d.ts.map +1 -1
- package/dist/modules/secrets-vault/secrets-vault.routes.js +16 -4
- 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.d.ts +7 -1
- package/dist/modules/settings/deployment-settings.service.d.ts.map +1 -1
- package/dist/modules/settings/deployment-settings.service.js +45 -3
- package/dist/modules/settings/deployment-settings.service.js.map +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/index.d.ts +13 -0
- package/dist/modules/settings/index.d.ts.map +1 -0
- package/dist/modules/settings/index.js +3 -0
- package/dist/modules/settings/index.js.map +1 -0
- package/dist/modules/settings/setup.routes.d.ts +3 -3
- package/dist/modules/settings/setup.routes.d.ts.map +1 -1
- package/dist/modules/settings/setup.routes.js +2 -2
- package/dist/modules/settings/setup.routes.js.map +1 -1
- package/dist/modules/skills/allowed-tools-check.d.ts +2 -2
- package/dist/modules/skills/allowed-tools-check.d.ts.map +1 -1
- package/dist/modules/skills/allowed-tools-check.js +1 -1
- package/dist/modules/skills/allowed-tools-check.js.map +1 -1
- package/dist/modules/skills/index.d.ts +4 -3
- package/dist/modules/skills/index.d.ts.map +1 -1
- package/dist/modules/skills/index.js +0 -2
- package/dist/modules/skills/index.js.map +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.map +1 -1
- package/dist/modules/skills/skill-access-requests.routes.d.ts +5 -5
- package/dist/modules/skills/skill-access-requests.routes.d.ts.map +1 -1
- package/dist/modules/skills/skill-access-requests.routes.js +6 -13
- package/dist/modules/skills/skill-access-requests.routes.js.map +1 -1
- package/dist/modules/skills/skills.contract.d.ts +16 -0
- package/dist/modules/skills/skills.contract.d.ts.map +1 -1
- package/dist/modules/skills/skills.routes.d.ts +1 -1
- package/dist/modules/skills/skills.routes.d.ts.map +1 -1
- package/dist/modules/skills/skills.routes.js +1 -1
- package/dist/modules/skills/skills.routes.js.map +1 -1
- package/dist/modules/skills/skills.service.d.ts +2 -2
- package/dist/modules/skills/skills.service.d.ts.map +1 -1
- package/dist/modules/skills/skills.service.js +6 -1
- package/dist/modules/skills/skills.service.js.map +1 -1
- package/dist/modules/skills/skills.tools.d.ts +3 -3
- package/dist/modules/skills/skills.tools.d.ts.map +1 -1
- package/dist/modules/skills/skills.tools.js +27 -19
- package/dist/modules/skills/skills.tools.js.map +1 -1
- package/dist/modules/tool-auth/connection-key-rejection.js +1 -1
- package/dist/modules/tool-auth/connection-key-rejection.js.map +1 -1
- package/dist/modules/tool-auth/connection-keys-admin.routes.d.ts +2 -2
- package/dist/modules/tool-auth/connection-keys-admin.routes.d.ts.map +1 -1
- package/dist/modules/tool-auth/connection-keys-admin.routes.js +1 -1
- package/dist/modules/tool-auth/connection-keys-admin.routes.js.map +1 -1
- package/dist/modules/tool-auth/external-api-key.interface.d.ts +11 -0
- package/dist/modules/tool-auth/external-api-key.interface.d.ts.map +1 -1
- package/dist/modules/tool-auth/external-api-key.interface.js.map +1 -1
- package/dist/modules/tool-auth/external-api-key.service.d.ts +2 -1
- package/dist/modules/tool-auth/external-api-key.service.d.ts.map +1 -1
- package/dist/modules/tool-auth/external-api-key.service.js +5 -2
- package/dist/modules/tool-auth/external-api-key.service.js.map +1 -1
- package/dist/modules/tool-auth/index.d.ts +15 -0
- package/dist/modules/tool-auth/index.d.ts.map +1 -0
- package/dist/modules/tool-auth/index.js +11 -0
- package/dist/modules/tool-auth/index.js.map +1 -0
- package/dist/modules/tool-auth/internal-token.service.d.ts +9 -0
- package/dist/modules/tool-auth/internal-token.service.d.ts.map +1 -1
- package/dist/modules/tool-auth/internal-token.service.js +1 -0
- package/dist/modules/tool-auth/internal-token.service.js.map +1 -1
- package/dist/modules/tool-auth/tool-auth.middleware.d.ts +29 -5
- package/dist/modules/tool-auth/tool-auth.middleware.d.ts.map +1 -1
- package/dist/modules/tool-auth/tool-auth.middleware.js +33 -7
- package/dist/modules/tool-auth/tool-auth.middleware.js.map +1 -1
- package/dist/modules/tool-helpers/default-branch-write.d.ts +1 -1
- package/dist/modules/tool-helpers/default-branch-write.d.ts.map +1 -1
- package/dist/modules/tool-helpers/index.d.ts +4 -1
- package/dist/modules/tool-helpers/index.d.ts.map +1 -1
- package/dist/modules/tool-helpers/index.js +3 -0
- package/dist/modules/tool-helpers/index.js.map +1 -1
- package/dist/modules/tool-helpers/route-argument-check.js +1 -1
- package/dist/modules/tool-helpers/route-argument-check.js.map +1 -1
- package/dist/modules/tool-helpers/route-tool-schemas.d.ts +1 -1
- package/dist/modules/tool-helpers/route-tool-schemas.d.ts.map +1 -1
- package/dist/modules/tool-helpers/tool-context.d.ts +12 -6
- package/dist/modules/tool-helpers/tool-context.d.ts.map +1 -1
- package/dist/modules/tool-helpers/tool-context.js +5 -3
- package/dist/modules/tool-helpers/tool-context.js.map +1 -1
- package/dist/modules/tool-helpers/tool-def.d.ts +4 -2
- package/dist/modules/tool-helpers/tool-def.d.ts.map +1 -1
- package/dist/modules/tool-helpers/tool-def.js +3 -1
- package/dist/modules/tool-helpers/tool-def.js.map +1 -1
- package/dist/modules/tool-helpers/tool-handler.d.ts +17 -2
- package/dist/modules/tool-helpers/tool-handler.d.ts.map +1 -1
- package/dist/modules/tool-helpers/tool-handler.js +21 -2
- package/dist/modules/tool-helpers/tool-handler.js.map +1 -1
- package/dist/modules/tool-helpers/tool.contract.d.ts +12 -2
- package/dist/modules/tool-helpers/tool.contract.d.ts.map +1 -1
- package/dist/modules/tool-helpers/tool.contract.js.map +1 -1
- package/dist/modules/tool-helpers/validate-token.d.ts +3 -2
- package/dist/modules/tool-helpers/validate-token.d.ts.map +1 -1
- package/dist/modules/tool-helpers/validate-token.js +2 -2
- package/dist/modules/tool-helpers/validate-token.js.map +1 -1
- package/dist/modules/tool-manuals/index.d.ts +8 -3
- package/dist/modules/tool-manuals/index.d.ts.map +1 -1
- package/dist/modules/tool-manuals/index.js +4 -2
- package/dist/modules/tool-manuals/index.js.map +1 -1
- package/dist/modules/tool-manuals/mcp-server-edit.service.d.ts +2 -2
- package/dist/modules/tool-manuals/mcp-server-edit.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/pending-tools.service.d.ts +2 -2
- package/dist/modules/tool-manuals/pending-tools.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-delete.service.d.ts +5 -6
- package/dist/modules/tool-manuals/tool-delete.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-delete.service.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.contract.d.ts +19 -6
- package/dist/modules/tool-manuals/tool-manuals.contract.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.routes.d.ts +12 -6
- package/dist/modules/tool-manuals/tool-manuals.routes.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.routes.js +43 -6
- package/dist/modules/tool-manuals/tool-manuals.routes.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts +16 -9
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.js +23 -15
- package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.tools.d.ts +3 -3
- package/dist/modules/tool-manuals/tool-manuals.tools.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.tools.js +26 -12
- package/dist/modules/tool-manuals/tool-manuals.tools.js.map +1 -1
- package/dist/modules/tool-registry/description-length.js +2 -2
- package/dist/modules/tool-registry/description-length.js.map +1 -1
- package/dist/modules/tool-registry/index.d.ts +8 -0
- package/dist/modules/tool-registry/index.d.ts.map +1 -0
- package/dist/modules/tool-registry/index.js +8 -0
- package/dist/modules/tool-registry/index.js.map +1 -0
- package/dist/modules/tool-registry/manual.routes.d.ts +44 -2
- package/dist/modules/tool-registry/manual.routes.d.ts.map +1 -1
- package/dist/modules/tool-registry/manual.routes.js +38 -11
- package/dist/modules/tool-registry/manual.routes.js.map +1 -1
- package/dist/modules/tool-registry/read-only-hints.contract.d.ts +52 -0
- package/dist/modules/tool-registry/read-only-hints.contract.d.ts.map +1 -0
- package/dist/modules/tool-registry/read-only-hints.contract.js +2 -0
- package/dist/modules/tool-registry/read-only-hints.contract.js.map +1 -0
- package/dist/modules/tool-registry/read-only-hints.d.ts +89 -0
- package/dist/modules/tool-registry/read-only-hints.d.ts.map +1 -0
- package/dist/modules/tool-registry/read-only-hints.js +212 -0
- package/dist/modules/tool-registry/read-only-hints.js.map +1 -0
- package/dist/modules/tool-registry/tool.contract.d.ts +15 -0
- package/dist/modules/tool-registry/tool.contract.d.ts.map +1 -1
- package/dist/modules/tool-registry/tool.contract.js +10 -1
- package/dist/modules/tool-registry/tool.contract.js.map +1 -1
- package/dist/modules/update-check/update-check.routes.d.ts +2 -2
- package/dist/modules/update-check/update-check.routes.d.ts.map +1 -1
- package/dist/modules/update-check/update-check.routes.js +1 -1
- package/dist/modules/update-check/update-check.routes.js.map +1 -1
- package/dist/modules/workflow/agent-tools/change-request-read-shape.d.ts +9 -104
- package/dist/modules/workflow/agent-tools/change-request-read-shape.d.ts.map +1 -1
- package/dist/modules/workflow/agent-tools/change-request-read-shape.js +8 -118
- package/dist/modules/workflow/agent-tools/change-request-read-shape.js.map +1 -1
- package/dist/modules/workflow/agent-tools/change-request-read.tools.d.ts +16 -17
- package/dist/modules/workflow/agent-tools/change-request-read.tools.d.ts.map +1 -1
- package/dist/modules/workflow/agent-tools/change-request-read.tools.js +19 -86
- package/dist/modules/workflow/agent-tools/change-request-read.tools.js.map +1 -1
- package/dist/modules/workflow/agent-tools/change-request-summary.d.ts +5 -1
- package/dist/modules/workflow/agent-tools/change-request-summary.d.ts.map +1 -1
- package/dist/modules/workflow/agent-tools/change-request-summary.js +10 -1
- package/dist/modules/workflow/agent-tools/change-request-summary.js.map +1 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.d.ts +7 -5
- package/dist/modules/workflow/agent-tools/workflow.tools.d.ts.map +1 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.js +60 -77
- package/dist/modules/workflow/agent-tools/workflow.tools.js.map +1 -1
- package/dist/modules/workflow/change-request-hooks.d.ts +1 -1
- package/dist/modules/workflow/event-bus.d.ts.map +1 -1
- package/dist/modules/workflow/event-bus.js +3 -1
- package/dist/modules/workflow/event-bus.js.map +1 -1
- package/dist/modules/workflow/events-delivery.d.ts +120 -0
- package/dist/modules/workflow/events-delivery.d.ts.map +1 -0
- package/dist/modules/workflow/events-delivery.js +202 -0
- package/dist/modules/workflow/events-delivery.js.map +1 -0
- package/dist/modules/workflow/events.routes.d.ts +16 -7
- package/dist/modules/workflow/events.routes.d.ts.map +1 -1
- package/dist/modules/workflow/events.routes.js +23 -4
- package/dist/modules/workflow/events.routes.js.map +1 -1
- package/dist/modules/workflow/file-lock.service.d.ts +1 -1
- package/dist/modules/workflow/file-lock.service.d.ts.map +1 -1
- package/dist/modules/workflow/file-lock.service.js +1 -1
- package/dist/modules/workflow/file-lock.service.js.map +1 -1
- package/dist/modules/workflow/git/git.service.d.ts +4 -4
- package/dist/modules/workflow/git/git.service.d.ts.map +1 -1
- package/dist/modules/workflow/git/git.service.js +23 -41
- package/dist/modules/workflow/git/git.service.js.map +1 -1
- package/dist/modules/workflow/git/node-git-runner.js +1 -1
- package/dist/modules/workflow/git/node-git-runner.js.map +1 -1
- package/dist/modules/workflow/git/pull-request.service.d.ts +6 -7
- package/dist/modules/workflow/git/pull-request.service.d.ts.map +1 -1
- package/dist/modules/workflow/git/pull-request.service.js +40 -33
- package/dist/modules/workflow/git/pull-request.service.js.map +1 -1
- package/dist/modules/workflow/index.d.ts +14 -2
- package/dist/modules/workflow/index.d.ts.map +1 -1
- package/dist/modules/workflow/index.js +11 -2
- package/dist/modules/workflow/index.js.map +1 -1
- package/dist/modules/workflow/pending-commits.service.d.ts +1 -1
- package/dist/modules/workflow/pending-commits.service.d.ts.map +1 -1
- package/dist/modules/workflow/pending-commits.service.js +1 -1
- package/dist/modules/workflow/pending-commits.service.js.map +1 -1
- package/dist/modules/workflow/read-on-branch.d.ts +1 -1
- package/dist/modules/workflow/read-on-branch.d.ts.map +1 -1
- package/dist/modules/workflow/recovery-bot.d.ts +1 -1
- package/dist/modules/workflow/recovery-bot.d.ts.map +1 -1
- package/dist/modules/workflow/recovery-bot.js +1 -1
- package/dist/modules/workflow/recovery-bot.js.map +1 -1
- package/dist/modules/workflow/review-workflow/approval-lock.d.ts +1 -1
- package/dist/modules/workflow/review-workflow/approval-lock.d.ts.map +1 -1
- package/dist/modules/workflow/review-workflow/review-workflow.interface.d.ts +4 -20
- package/dist/modules/workflow/review-workflow/review-workflow.interface.d.ts.map +1 -1
- package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts +4 -8
- package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts.map +1 -1
- package/dist/modules/workflow/review-workflow/review-workflow.service.js +3 -138
- package/dist/modules/workflow/review-workflow/review-workflow.service.js.map +1 -1
- package/dist/modules/workflow/workflow.routes.d.ts +5 -5
- package/dist/modules/workflow/workflow.routes.d.ts.map +1 -1
- package/dist/modules/workflow/workflow.routes.js +42 -94
- package/dist/modules/workflow/workflow.routes.js.map +1 -1
- package/dist/modules/workflow/workflow.service.d.ts +41 -50
- package/dist/modules/workflow/workflow.service.d.ts.map +1 -1
- package/dist/modules/workflow/workflow.service.js +221 -154
- package/dist/modules/workflow/workflow.service.js.map +1 -1
- package/dist/modules/workspace/agent-access.gate.d.ts +3 -3
- package/dist/modules/workspace/agent-access.gate.d.ts.map +1 -1
- package/dist/modules/workspace/agent-download.builder.d.ts +1 -1
- package/dist/modules/workspace/agent-download.builder.d.ts.map +1 -1
- package/dist/modules/workspace/agent-download.builder.js +1 -1
- package/dist/modules/workspace/agent-download.builder.js.map +1 -1
- package/dist/modules/workspace/agent-upload.routes.d.ts.map +1 -1
- package/dist/modules/workspace/agent-upload.routes.js +19 -0
- package/dist/modules/workspace/agent-upload.routes.js.map +1 -1
- package/dist/modules/workspace/agent-upload.store.d.ts +11 -0
- package/dist/modules/workspace/agent-upload.store.d.ts.map +1 -1
- package/dist/modules/workspace/agent-upload.store.js +18 -0
- package/dist/modules/workspace/agent-upload.store.js.map +1 -1
- package/dist/modules/workspace/file-readers/doc-extract.service.d.ts +82 -14
- package/dist/modules/workspace/file-readers/doc-extract.service.d.ts.map +1 -1
- package/dist/modules/workspace/file-readers/doc-extract.service.js +109 -36
- package/dist/modules/workspace/file-readers/doc-extract.service.js.map +1 -1
- package/dist/modules/workspace/file-readers/doc-extract.types.d.ts +9 -2
- package/dist/modules/workspace/file-readers/doc-extract.types.d.ts.map +1 -1
- package/dist/modules/workspace/file-readers/doc-extract.types.js.map +1 -1
- package/dist/modules/workspace/file-readers/document-extractor.contract.d.ts +41 -0
- package/dist/modules/workspace/file-readers/document-extractor.contract.d.ts.map +1 -0
- package/dist/modules/workspace/file-readers/document-extractor.contract.js +5 -0
- package/dist/modules/workspace/file-readers/document-extractor.contract.js.map +1 -0
- package/dist/modules/workspace/file-readers/document-extractors.d.ts +9 -0
- package/dist/modules/workspace/file-readers/document-extractors.d.ts.map +1 -0
- package/dist/modules/workspace/file-readers/document-extractors.js +26 -0
- package/dist/modules/workspace/file-readers/document-extractors.js.map +1 -0
- package/dist/modules/workspace/file-readers/document-formats.d.ts +12 -0
- package/dist/modules/workspace/file-readers/document-formats.d.ts.map +1 -0
- package/dist/modules/workspace/file-readers/document-formats.js +11 -0
- package/dist/modules/workspace/file-readers/document-formats.js.map +1 -0
- package/dist/modules/workspace/file-readers/document-reader.d.ts +21 -17
- package/dist/modules/workspace/file-readers/document-reader.d.ts.map +1 -1
- package/dist/modules/workspace/file-readers/document-reader.js +38 -34
- package/dist/modules/workspace/file-readers/document-reader.js.map +1 -1
- package/dist/modules/workspace/file-readers/extract-in-worker.d.ts +60 -0
- package/dist/modules/workspace/file-readers/extract-in-worker.d.ts.map +1 -0
- package/dist/modules/workspace/file-readers/extract-in-worker.js +140 -0
- package/dist/modules/workspace/file-readers/extract-in-worker.js.map +1 -0
- package/dist/modules/workspace/file-readers/extract-pdf.d.ts +2 -0
- package/dist/modules/workspace/file-readers/extract-pdf.d.ts.map +1 -1
- package/dist/modules/workspace/file-readers/extract-pdf.js +20 -3
- package/dist/modules/workspace/file-readers/extract-pdf.js.map +1 -1
- package/dist/modules/workspace/file-readers/extract.worker.d.ts +2 -0
- package/dist/modules/workspace/file-readers/extract.worker.d.ts.map +1 -0
- package/dist/modules/workspace/file-readers/extract.worker.js +5 -0
- package/dist/modules/workspace/file-readers/extract.worker.js.map +1 -0
- package/dist/modules/workspace/file-readers/extraction-cache.d.ts +21 -5
- package/dist/modules/workspace/file-readers/extraction-cache.d.ts.map +1 -1
- package/dist/modules/workspace/file-readers/extraction-cache.js +24 -10
- package/dist/modules/workspace/file-readers/extraction-cache.js.map +1 -1
- package/dist/modules/workspace/file-readers/extraction-worker.d.ts +42 -0
- package/dist/modules/workspace/file-readers/extraction-worker.d.ts.map +1 -0
- package/dist/modules/workspace/file-readers/extraction-worker.js +69 -0
- package/dist/modules/workspace/file-readers/extraction-worker.js.map +1 -0
- package/dist/modules/workspace/file-readers/file-reader.d.ts +13 -4
- package/dist/modules/workspace/file-readers/file-reader.d.ts.map +1 -1
- package/dist/modules/workspace/file-readers/file-reader.js.map +1 -1
- package/dist/modules/workspace/file-readers/file-reader.registry.d.ts +3 -2
- package/dist/modules/workspace/file-readers/file-reader.registry.d.ts.map +1 -1
- package/dist/modules/workspace/file-readers/file-reader.registry.js +6 -20
- package/dist/modules/workspace/file-readers/file-reader.registry.js.map +1 -1
- package/dist/modules/workspace/first-run.js +1 -1
- package/dist/modules/workspace/first-run.js.map +1 -1
- package/dist/modules/workspace/git-internals.middleware.d.ts +1 -1
- package/dist/modules/workspace/git-internals.middleware.d.ts.map +1 -1
- package/dist/modules/workspace/git-internals.middleware.js +1 -1
- package/dist/modules/workspace/git-internals.middleware.js.map +1 -1
- package/dist/modules/workspace/index.d.ts +24 -0
- package/dist/modules/workspace/index.d.ts.map +1 -1
- package/dist/modules/workspace/index.js +21 -0
- package/dist/modules/workspace/index.js.map +1 -1
- package/dist/modules/workspace/kb-repository.d.ts.map +1 -1
- package/dist/modules/workspace/kb-repository.js +1 -1
- package/dist/modules/workspace/kb-repository.js.map +1 -1
- package/dist/modules/workspace/not-found.d.ts +1 -1
- package/dist/modules/workspace/not-found.d.ts.map +1 -1
- package/dist/modules/workspace/not-found.js +1 -1
- package/dist/modules/workspace/not-found.js.map +1 -1
- package/dist/modules/workspace/nul-scan.d.ts +19 -0
- package/dist/modules/workspace/nul-scan.d.ts.map +1 -0
- package/dist/modules/workspace/nul-scan.js +55 -0
- package/dist/modules/workspace/nul-scan.js.map +1 -0
- package/dist/modules/workspace/pattern-matcher.contract.d.ts +111 -28
- package/dist/modules/workspace/pattern-matcher.contract.d.ts.map +1 -1
- package/dist/modules/workspace/pattern-matcher.contract.js +31 -14
- package/dist/modules/workspace/pattern-matcher.contract.js.map +1 -1
- package/dist/modules/workspace/ripgrep-search.d.ts +54 -0
- package/dist/modules/workspace/ripgrep-search.d.ts.map +1 -0
- package/dist/modules/workspace/ripgrep-search.js +657 -0
- package/dist/modules/workspace/ripgrep-search.js.map +1 -0
- package/dist/modules/workspace/ripgrep-version.d.ts +15 -0
- package/dist/modules/workspace/ripgrep-version.d.ts.map +1 -0
- package/dist/modules/workspace/ripgrep-version.js +31 -0
- package/dist/modules/workspace/ripgrep-version.js.map +1 -0
- package/dist/modules/workspace/routine-write-policy.js +1 -1
- package/dist/modules/workspace/routine-write-policy.js.map +1 -1
- package/dist/modules/workspace/startup/beside-checkout.d.ts +8 -5
- package/dist/modules/workspace/startup/beside-checkout.d.ts.map +1 -1
- package/dist/modules/workspace/startup/beside-checkout.js +14 -5
- package/dist/modules/workspace/startup/beside-checkout.js.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/kb-startup-runner.d.ts.map +1 -1
- package/dist/modules/workspace/startup/kb-startup-runner.js +1 -2
- package/dist/modules/workspace/startup/kb-startup-runner.js.map +1 -1
- package/dist/modules/workspace/startup/steps/groups-to-plugins.step.js +2 -2
- package/dist/modules/workspace/startup/steps/groups-to-plugins.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/personal-spaces.step.js +2 -2
- package/dist/modules/workspace/startup/steps/personal-spaces.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/plugin-layout.js +1 -1
- package/dist/modules/workspace/startup/steps/plugin-layout.js.map +1 -1
- package/dist/modules/workspace/startup/steps/roles-yaml.step.js +1 -1
- package/dist/modules/workspace/startup/steps/roles-yaml.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/seed-tree.js +2 -2
- package/dist/modules/workspace/startup/steps/seed-tree.js.map +1 -1
- package/dist/modules/workspace/startup/steps/template-files.step.d.ts +1 -1
- 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.js +2 -2
- package/dist/modules/workspace/startup/steps/template-source.js.map +1 -1
- package/dist/modules/workspace/worker-pool.d.ts +99 -0
- package/dist/modules/workspace/worker-pool.d.ts.map +1 -0
- package/dist/modules/workspace/worker-pool.js +156 -0
- package/dist/modules/workspace/worker-pool.js.map +1 -0
- package/dist/modules/workspace/workspace-tmp.d.ts +146 -0
- package/dist/modules/workspace/workspace-tmp.d.ts.map +1 -0
- package/dist/modules/workspace/workspace-tmp.js +435 -0
- package/dist/modules/workspace/workspace-tmp.js.map +1 -0
- package/dist/modules/workspace/workspace.routes.d.ts +7 -8
- package/dist/modules/workspace/workspace.routes.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.routes.js +9 -32
- package/dist/modules/workspace/workspace.routes.js.map +1 -1
- package/dist/modules/workspace/workspace.service.d.ts +48 -7
- package/dist/modules/workspace/workspace.service.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.service.js +89 -12
- package/dist/modules/workspace/workspace.service.js.map +1 -1
- package/dist/modules/workspace/workspace.tools.d.ts +7 -7
- package/dist/modules/workspace/workspace.tools.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.tools.js +502 -140
- package/dist/modules/workspace/workspace.tools.js.map +1 -1
- package/dist/modules/workspace/write-denial.d.ts +4 -4
- package/dist/modules/workspace/write-denial.d.ts.map +1 -1
- package/dist/modules/workspace/write-denial.js +2 -3
- package/dist/modules/workspace/write-denial.js.map +1 -1
- package/dist/modules/write-access/index.d.ts +8 -0
- package/dist/modules/write-access/index.d.ts.map +1 -0
- package/dist/modules/write-access/index.js +7 -0
- package/dist/modules/write-access/index.js.map +1 -0
- package/dist/shared/path-order.d.ts +28 -8
- package/dist/shared/path-order.d.ts.map +1 -1
- package/dist/shared/path-order.js +37 -8
- package/dist/shared/path-order.js.map +1 -1
- package/migrations/0020_change_request_body_is_the_description.sql +20 -0
- package/migrations/0021_data_migrations_ledger.sql +11 -0
- package/migrations/0022_session_version.sql +6 -0
- package/migrations/0023_agent_path.sql +3 -0
- package/migrations/meta/0020_snapshot.json +2321 -0
- package/migrations/meta/0021_snapshot.json +2353 -0
- package/migrations/meta/0022_snapshot.json +2360 -0
- package/migrations/meta/0023_snapshot.json +2378 -0
- package/migrations/meta/_journal.json +28 -0
- package/package.json +3 -3
- package/src/__tests__/pg-scratch.test.ts +69 -0
- package/src/__tests__/pg-scratch.ts +31 -0
- package/src/__tests__/slow-ripgrep.ts +65 -0
- package/src/core/__tests__/boot-without-ripgrep.test.ts +34 -0
- package/src/core/__tests__/catalog-revision.test.ts +89 -0
- package/src/core/__tests__/damaged-document.tools.test.ts +374 -0
- package/src/core/__tests__/gated-boot.test.ts +8 -1
- package/src/core/__tests__/lifecycle.test.ts +46 -13
- package/src/core/__tests__/public-config.test.ts +5 -0
- package/src/core/catalog-revision.ts +24 -2
- package/src/core/core-ports.ts +42 -0
- package/src/core/create-core-server.ts +45 -3
- package/src/core/create-core-services.ts +81 -17
- package/src/core/lifecycle.ts +36 -2
- package/src/core/public-config.ts +10 -0
- package/src/index.ts +1 -1
- package/src/modules/access/__tests__/access-control.admin-root-floor.test.ts +12 -0
- package/src/modules/access/__tests__/access-control.colliding-name-cases.test.ts +113 -0
- package/src/modules/access/__tests__/access-control.frontmatter-head.test.ts +117 -0
- package/src/modules/access/__tests__/access-control.group-named-admin.test.ts +122 -0
- package/src/modules/access/__tests__/access-control.preview-relocation.test.ts +50 -0
- package/src/modules/access/__tests__/access-declarations.test.ts +19 -0
- package/src/modules/access/__tests__/access-groups.test.ts +55 -22
- package/src/modules/access/__tests__/access-mutation.service.test.ts +85 -59
- package/src/modules/access/__tests__/access-requests.routes.test.ts +29 -15
- package/src/modules/access/__tests__/access-restrict-here.test.ts +7 -5
- package/src/modules/access/__tests__/access.routes.admins.test.ts +1 -0
- package/src/modules/access/__tests__/access.routes.batch.test.ts +2 -0
- package/src/modules/access/__tests__/access.routes.folder-governs.test.ts +2 -0
- package/src/modules/access/__tests__/access.routes.group-grant.test.ts +50 -14
- package/src/modules/access/__tests__/access.routes.overrides.test.ts +2 -1
- package/src/modules/access/__tests__/access.routes.proposal-branch.test.ts +1 -0
- package/src/modules/access/__tests__/access.routes.prospective.test.ts +2 -0
- package/src/modules/access/__tests__/access.routes.revoke.test.ts +18 -13
- package/src/modules/access/__tests__/access.routes.unknown-email.test.ts +2 -0
- package/src/modules/access/__tests__/grant-sources.test.ts +20 -15
- package/src/modules/access/__tests__/groups-admin.routes.test.ts +61 -0
- package/src/modules/access/__tests__/groups-admin.service.test.ts +211 -18
- package/src/modules/access/__tests__/reference-scan.test.ts +366 -14
- package/src/modules/access/__tests__/roles-admin.security.test.ts +1 -1
- package/src/modules/access/__tests__/roles-admin.service.test.ts +43 -22
- package/src/modules/access/__tests__/roles-capabilities.test.ts +6 -2
- package/src/modules/access/__tests__/roles.routes.test.ts +1 -1
- package/src/modules/access/access-control.interface.ts +17 -10
- package/src/modules/access/access-control.service.ts +161 -76
- package/src/modules/access/access-declarations.ts +1 -1
- package/src/modules/access/access-mutation.service.ts +58 -57
- package/src/modules/access/access-requests.contract.ts +1 -1
- package/src/modules/access/access-requests.routes.ts +10 -15
- package/src/modules/access/access-requests.service.ts +29 -71
- package/src/modules/access/access-view.ts +13 -11
- package/src/modules/access/access.routes.ts +51 -43
- package/src/modules/access/admin-locked-commit.ts +3 -2
- package/src/modules/access/capability-registry.ts +1 -1
- package/src/modules/access/change-read-gate.ts +3 -5
- package/src/modules/access/creator-access.ts +3 -5
- package/src/modules/access/directory-sync-bot.ts +2 -2
- package/src/modules/access/groups-admin.routes.ts +7 -5
- package/src/modules/access/groups-admin.service.ts +116 -47
- package/src/modules/access/groups-edit.ts +3 -3
- package/src/modules/access/index.ts +17 -0
- package/src/modules/access/reference-scan.ts +320 -47
- package/src/modules/access/roles-admin.service.ts +45 -31
- package/src/modules/access/roles-edit.ts +1 -1
- package/src/modules/access/synced-groups-committer.ts +4 -4
- package/src/modules/access/synced-groups-writer.ts +3 -3
- package/src/modules/access/user-access-removal.service.ts +3 -6
- package/src/modules/access-model/__tests__/access-grammar.test.ts +38 -1
- package/src/modules/access-model/__tests__/access-splice.test.ts +50 -8
- package/src/modules/access-model/access-grammar.ts +65 -20
- package/src/modules/access-model/access-splice.ts +31 -23
- package/src/modules/access-model/group-files.ts +5 -0
- package/src/modules/access-model/index.ts +21 -5
- package/src/modules/access-model/roles-yaml-guard.ts +1 -1
- package/src/modules/admin/admin-access.routes.ts +1 -1
- package/src/modules/admin/admin-access.service.ts +2 -2
- package/src/modules/admin/index.ts +7 -0
- package/src/modules/agent-guide/__tests__/agent-guide.test.ts +36 -0
- package/src/modules/agent-guide/agent-guide.tools.ts +17 -8
- package/src/modules/agent-guide/agent-guide.ts +1 -1
- package/src/modules/agent-guide/index.ts +1 -1
- package/src/modules/agent-instructions/__tests__/shared-file-rules.test.ts +1 -0
- package/src/modules/agent-instructions/compose.ts +3 -1
- package/src/modules/agent-instructions/read-preamble.ts +1 -1
- package/src/modules/agent-instructions/shared-file-rules.ts +17 -1
- package/src/modules/agent-scope/__tests__/agent-surfaces.connect-as.test.ts +421 -0
- package/src/modules/agent-scope/__tests__/connection-scope.test.ts +46 -0
- package/src/modules/agent-scope/__tests__/in-memory-kb.ts +148 -0
- package/src/modules/agent-scope/agent-scope.contract.ts +83 -0
- package/src/modules/agent-scope/connection-scope.ts +199 -0
- package/src/modules/agent-scope/index.ts +15 -0
- package/src/modules/audit/agent-audit.service.ts +5 -3
- package/src/modules/audit/agent-connection.routes.ts +1 -1
- package/src/modules/audit/agent-rest-audit.middleware.ts +1 -1
- package/src/modules/audit/audit.contract.ts +6 -0
- package/src/modules/audit/audit.routes.ts +4 -4
- package/src/modules/auth/__tests__/auth.middleware.test.ts +30 -2
- package/src/modules/auth/__tests__/auth.routes.test.ts +71 -5
- package/src/modules/auth/__tests__/auth.service.test.ts +90 -9
- package/src/modules/auth/__tests__/password-change-sessions.pg.test.ts +269 -0
- package/src/modules/auth/account-admission.ts +19 -0
- package/src/modules/auth/account-erasure.service.ts +4 -9
- package/src/modules/auth/account-switch-lock.ts +2 -2
- package/src/modules/auth/account.routes.ts +3 -3
- package/src/modules/auth/auth.middleware.ts +45 -4
- package/src/modules/auth/auth.routes.ts +46 -29
- package/src/modules/auth/auth.service.ts +139 -38
- package/src/modules/auth/index.ts +5 -0
- package/src/modules/auth/oidc-auth-provider.ts +3 -10
- package/src/modules/code-mode/code-mode.tool.ts +1 -1
- package/src/modules/connection-probe/connection-probe.service.ts +3 -6
- package/src/modules/database/__tests__/legacy-change-request-body.test.ts +118 -0
- package/src/modules/database/__tests__/legacy-request-bodies.pg.test.ts +258 -0
- package/src/modules/database/__tests__/pii-backfill.pg.test.ts +15 -18
- package/src/modules/database/__tests__/session-version-migration.pg.test.ts +133 -0
- package/src/modules/database/core-schema.ts +76 -36
- package/src/modules/database/index.ts +9 -0
- package/src/modules/database/migrate.ts +79 -3
- package/src/modules/declared-variables/__tests__/declared-variables.route.test.ts +44 -1
- package/src/modules/declared-variables/declared-variables.routes.ts +14 -3
- package/src/modules/diff/diff.routes.ts +5 -5
- package/src/modules/diff/diff.service.ts +2 -2
- package/src/modules/diff/index.ts +6 -0
- package/src/modules/embed/__tests__/embed.tools.test.ts +12 -0
- package/src/modules/embed/account-link.service.ts +2 -2
- package/src/modules/embed/embed.routes.ts +2 -2
- package/src/modules/embed/embed.service.ts +1 -1
- package/src/modules/embed/embed.tools.ts +11 -9
- package/src/modules/github-app/github-app.connection.ts +1 -1
- package/src/modules/github-app/github-app.routes.ts +3 -3
- package/src/modules/kb-fs/__tests__/locking-filesystem.test.ts +25 -0
- package/src/modules/kb-fs/__tests__/repo-path.test.ts +53 -8
- package/src/modules/kb-fs/index.ts +13 -0
- package/src/modules/kb-fs/locking-filesystem.ts +8 -2
- package/src/modules/kb-fs/repo-path.ts +33 -7
- package/src/modules/kb-fs/tmp-ref.ts +81 -0
- package/src/modules/kb-sync/kb-sync.routes.ts +3 -3
- package/src/modules/kb-sync/kb-sync.service.ts +1 -1
- package/src/modules/kb-sync/sync-auth.ts +1 -1
- package/src/modules/kb-sync/sync-payload.ts +1 -1
- package/src/modules/marketplace/git-http.routes.ts +1 -1
- package/src/modules/marketplace/github-facade/github-facade-admin.routes.ts +1 -1
- package/src/modules/marketplace/github-facade/github-facade-codes.store.ts +2 -2
- package/src/modules/marketplace/github-facade/github-facade-credentials.service.ts +2 -2
- package/src/modules/marketplace/github-facade/github-facade.routes.ts +2 -2
- package/src/modules/marketplace/github-facade/github-facade.service.ts +2 -2
- package/src/modules/marketplace/marketplace-repo.service.ts +2 -2
- package/src/modules/mcp/__tests__/connect-as.pg.test.ts +137 -0
- package/src/modules/mcp/__tests__/mcp-auth.middleware.test.ts +29 -5
- package/src/modules/mcp/__tests__/mcp-routes-harness.ts +8 -0
- package/src/modules/mcp/__tests__/mcp.connect-as.test.ts +195 -0
- package/src/modules/mcp/__tests__/mcp.routes.connect-as.test.ts +192 -0
- package/src/modules/mcp/__tests__/oauth-consent.connect-as.test.ts +146 -0
- package/src/modules/mcp/__tests__/read-only-hint.e2e.test.ts +213 -0
- package/src/modules/mcp/index.ts +7 -0
- package/src/modules/mcp/mcp-auth.middleware.ts +25 -9
- package/src/modules/mcp/mcp.routes.ts +42 -8
- package/src/modules/mcp/mcp.service.ts +136 -29
- package/src/modules/mcp/oauth/bevel-oauth-provider.ts +48 -10
- package/src/modules/mcp/oauth/oauth-consent.routes.ts +42 -2
- package/src/modules/onboarding/onboarding.routes.ts +1 -1
- package/src/modules/onboarding/starter-pack.service.ts +5 -6
- package/src/modules/plugins/__tests__/bundle-dialect.e2e.test.ts +2 -1
- package/src/modules/plugins/__tests__/plugin-links.service.test.ts +2 -1
- package/src/modules/plugins/__tests__/plugins.tools.test.ts +38 -2
- package/src/modules/plugins/compile/compile-marketplace.ts +2 -2
- package/src/modules/plugins/compile/marketplace-compiler.service.ts +3 -3
- package/src/modules/plugins/discovery/bundle-dialect/registry.ts +1 -1
- package/src/modules/plugins/index.ts +3 -1
- package/src/modules/plugins/join-proposals.ts +2 -2
- package/src/modules/plugins/join-request-jobs.service.ts +3 -3
- package/src/modules/plugins/join-request-records.store.ts +2 -2
- package/src/modules/plugins/join-requests.service.ts +4 -4
- package/src/modules/plugins/plugin-links.service.ts +10 -11
- package/src/modules/plugins/plugin-links.ts +23 -6
- package/src/modules/plugins/plugin-provision.service.ts +4 -5
- package/src/modules/plugins/plugin-rename.service.ts +3 -3
- package/src/modules/plugins/plugins.contract.ts +1 -1
- package/src/modules/plugins/plugins.routes.ts +39 -8
- package/src/modules/plugins/plugins.service.ts +5 -5
- package/src/modules/plugins/plugins.tools.ts +4 -4
- package/src/modules/plugins/teams.routes.ts +3 -3
- package/src/modules/secrets-vault/__tests__/connect-pending.route.test.ts +113 -0
- package/src/modules/secrets-vault/db-secrets-vault.service.ts +2 -2
- package/src/modules/secrets-vault/index.ts +2 -0
- package/src/modules/secrets-vault/secrets-vault.routes.ts +27 -7
- package/src/modules/settings/__tests__/deployment-settings.service.test.ts +88 -1
- package/src/modules/settings/connection-check.ts +1 -1
- package/src/modules/settings/deployment-settings.service.ts +44 -4
- package/src/modules/settings/git-root-folders.ts +1 -1
- package/src/modules/settings/index.ts +12 -0
- package/src/modules/settings/setup.routes.ts +5 -4
- package/src/modules/skills/__tests__/allowed-tools-warn.tools.test.ts +2 -2
- package/src/modules/skills/__tests__/skill-access-requests.routes.test.ts +6 -3
- package/src/modules/skills/__tests__/skills.service.test.ts +34 -0
- package/src/modules/skills/allowed-tools-check.ts +2 -6
- package/src/modules/skills/index.ts +9 -2
- package/src/modules/skills/pending-skills.service.ts +3 -4
- package/src/modules/skills/skill-access-requests.routes.ts +10 -17
- package/src/modules/skills/skills.contract.ts +17 -0
- package/src/modules/skills/skills.routes.ts +1 -1
- package/src/modules/skills/skills.service.ts +7 -3
- package/src/modules/skills/skills.tools.ts +49 -22
- package/src/modules/tool-auth/__tests__/external-api-key.service.test.ts +4 -0
- package/src/modules/tool-auth/connection-key-rejection.ts +1 -1
- package/src/modules/tool-auth/connection-keys-admin.routes.ts +2 -2
- package/src/modules/tool-auth/external-api-key.interface.ts +11 -1
- package/src/modules/tool-auth/external-api-key.service.ts +7 -4
- package/src/modules/tool-auth/index.ts +14 -0
- package/src/modules/tool-auth/internal-token.service.ts +10 -0
- package/src/modules/tool-auth/tool-auth.middleware.ts +48 -6
- package/src/modules/tool-helpers/__tests__/agent-roles-write.test.ts +2 -2
- package/src/modules/tool-helpers/__tests__/can-write.tools.test.ts +5 -3
- package/src/modules/tool-helpers/__tests__/phase4-tools.test.ts +2 -2
- package/src/modules/tool-helpers/default-branch-write.ts +1 -1
- package/src/modules/tool-helpers/index.ts +5 -1
- package/src/modules/tool-helpers/route-argument-check.ts +1 -1
- package/src/modules/tool-helpers/route-tool-schemas.ts +1 -1
- package/src/modules/tool-helpers/tool-context.ts +18 -10
- package/src/modules/tool-helpers/tool-def.ts +7 -3
- package/src/modules/tool-helpers/tool-handler.ts +36 -2
- package/src/modules/tool-helpers/tool.contract.ts +12 -2
- package/src/modules/tool-helpers/validate-token.ts +5 -4
- package/src/modules/tool-manuals/__tests__/tool-manuals.archive.route.test.ts +80 -4
- package/src/modules/tool-manuals/__tests__/tool-manuals.service.test.ts +42 -0
- package/src/modules/tool-manuals/__tests__/tool-manuals.tools.test.ts +3 -3
- package/src/modules/tool-manuals/index.ts +12 -2
- package/src/modules/tool-manuals/mcp-server-edit.service.ts +2 -2
- package/src/modules/tool-manuals/pending-tools.service.ts +2 -2
- package/src/modules/tool-manuals/tool-delete.service.ts +5 -6
- package/src/modules/tool-manuals/tool-manuals.contract.ts +18 -6
- package/src/modules/tool-manuals/tool-manuals.routes.ts +45 -8
- package/src/modules/tool-manuals/tool-manuals.service.ts +34 -18
- package/src/modules/tool-manuals/tool-manuals.tools.ts +32 -17
- package/src/modules/tool-registry/__tests__/read-only-hints.test.ts +439 -0
- package/src/modules/tool-registry/__tests__/tool-description-length.test.ts +2 -2
- package/src/modules/tool-registry/__tests__/tool-registry.test.ts +9 -2
- package/src/modules/tool-registry/description-length.ts +2 -2
- package/src/modules/tool-registry/index.ts +22 -0
- package/src/modules/tool-registry/manual.routes.ts +38 -11
- package/src/modules/tool-registry/read-only-hints.contract.ts +54 -0
- package/src/modules/tool-registry/read-only-hints.ts +225 -0
- package/src/modules/tool-registry/tool.contract.ts +18 -0
- package/src/modules/update-check/update-check.routes.ts +2 -2
- package/src/modules/workflow/__tests__/event-bus.test.ts +14 -2
- package/src/modules/workflow/__tests__/events-delivery.test.ts +778 -0
- package/src/modules/workflow/__tests__/workflow.service.facade.test.ts +85 -22
- package/src/modules/workflow/__tests__/workflow.service.sync.test.ts +1 -1
- package/src/modules/workflow/__tests__/workflow.service.update-change-request.pg.test.ts +120 -0
- package/src/modules/workflow/__tests__/workflow.service.update-change-request.test.ts +346 -0
- package/src/modules/workflow/agent-tools/__tests__/change-request-read-shape.test.ts +32 -209
- package/src/modules/workflow/agent-tools/__tests__/change-request-read.tools.test.ts +16 -245
- package/src/modules/workflow/agent-tools/__tests__/update-change-request.parity.test.ts +306 -0
- package/src/modules/workflow/agent-tools/__tests__/workflow.tools.test.ts +87 -60
- package/src/modules/workflow/agent-tools/change-request-read-shape.ts +18 -153
- package/src/modules/workflow/agent-tools/change-request-read.tools.ts +24 -96
- package/src/modules/workflow/agent-tools/change-request-summary.ts +16 -2
- package/src/modules/workflow/agent-tools/workflow.tools.ts +63 -84
- package/src/modules/workflow/change-request-hooks.ts +1 -1
- package/src/modules/workflow/event-bus.ts +3 -1
- package/src/modules/workflow/events-delivery.ts +278 -0
- package/src/modules/workflow/events.routes.ts +30 -9
- package/src/modules/workflow/file-lock.service.ts +2 -2
- package/src/modules/workflow/git/__tests__/git.service.list-branches.test.ts +130 -3
- package/src/modules/workflow/git/__tests__/pull-request.service.getPrDetail.test.ts +24 -9
- package/src/modules/workflow/git/git.service.ts +34 -56
- package/src/modules/workflow/git/node-git-runner.ts +1 -1
- package/src/modules/workflow/git/pull-request.service.ts +34 -29
- package/src/modules/workflow/index.ts +15 -2
- package/src/modules/workflow/pending-commits.service.ts +2 -2
- package/src/modules/workflow/read-on-branch.ts +1 -1
- package/src/modules/workflow/recovery-bot.ts +2 -2
- package/src/modules/workflow/review-workflow/approval-lock.ts +1 -1
- package/src/modules/workflow/review-workflow/review-workflow.interface.ts +3 -35
- package/src/modules/workflow/review-workflow/review-workflow.service.ts +6 -165
- package/src/modules/workflow/workflow.routes.ts +46 -100
- package/src/modules/workflow/workflow.service.ts +277 -191
- package/src/modules/workspace/__tests__/agent-downloads.test.ts +2 -1
- package/src/modules/workspace/__tests__/agent-uploads.test.ts +87 -1
- package/src/modules/workspace/__tests__/escape-sequences.routes.test.ts +2 -1
- package/src/modules/workspace/__tests__/file-stat-access.test.ts +2 -1
- package/src/modules/workspace/__tests__/git-internals.security.test.ts +4 -3
- package/src/modules/workspace/__tests__/holds-nul.test.ts +66 -0
- package/src/modules/workspace/__tests__/rest-tool-arguments.test.ts +5 -4
- package/src/modules/workspace/__tests__/ripgrep-search.test.ts +570 -0
- package/src/modules/workspace/__tests__/ripgrep-version.test.ts +29 -0
- package/src/modules/workspace/__tests__/worker-pool.test.ts +118 -0
- package/src/modules/workspace/__tests__/workspace-paths-inside-the-repo.test.ts +3 -2
- package/src/modules/workspace/__tests__/workspace-tmp.tools.test.ts +928 -0
- package/src/modules/workspace/__tests__/workspace.routes.read-gate.test.ts +17 -37
- package/src/modules/workspace/__tests__/workspace.service.ensure-remotes-fetched.test.ts +30 -0
- package/src/modules/workspace/__tests__/workspace.service.read-filter.test.ts +20 -8
- package/src/modules/workspace/__tests__/workspace.tools.agents-file.test.ts +4 -3
- package/src/modules/workspace/__tests__/workspace.tools.branch-errors.test.ts +24 -11
- package/src/modules/workspace/__tests__/workspace.tools.test.ts +423 -117
- package/src/modules/workspace/agent-access.gate.ts +3 -3
- package/src/modules/workspace/agent-download.builder.ts +1 -1
- package/src/modules/workspace/agent-upload.routes.ts +19 -0
- package/src/modules/workspace/agent-upload.store.ts +18 -0
- package/src/modules/workspace/file-readers/README.md +9 -0
- package/src/modules/workspace/file-readers/__tests__/doc-extract.service.test.ts +175 -0
- package/src/modules/workspace/file-readers/__tests__/doc-extract.test.ts +21 -16
- package/src/modules/workspace/file-readers/__tests__/extract-in-worker.test.ts +229 -0
- package/src/modules/workspace/file-readers/__tests__/file-reader.registry.test.ts +2 -1
- package/src/modules/workspace/file-readers/__tests__/fixtures/damaged-pdf.ts +34 -0
- package/src/modules/workspace/file-readers/__tests__/fixtures/misbehaving-extract.worker.ts +57 -0
- package/src/modules/workspace/file-readers/__tests__/fixtures/pdf-in-trouble.worker.ts +20 -0
- package/src/modules/workspace/file-readers/__tests__/fixtures/unloadable-extract.worker.ts +2 -0
- package/src/modules/workspace/file-readers/doc-extract.service.ts +144 -36
- package/src/modules/workspace/file-readers/doc-extract.types.ts +13 -3
- package/src/modules/workspace/file-readers/document-extractor.contract.ts +42 -0
- package/src/modules/workspace/file-readers/document-extractors.ts +28 -0
- package/src/modules/workspace/file-readers/document-formats.ts +13 -0
- package/src/modules/workspace/file-readers/document-reader.ts +40 -36
- package/src/modules/workspace/file-readers/extract-in-worker.ts +183 -0
- package/src/modules/workspace/file-readers/extract-pdf.ts +23 -4
- package/src/modules/workspace/file-readers/extract.worker.ts +5 -0
- package/src/modules/workspace/file-readers/extraction-cache.ts +33 -12
- package/src/modules/workspace/file-readers/extraction-worker.ts +86 -0
- package/src/modules/workspace/file-readers/file-reader.registry.ts +6 -20
- package/src/modules/workspace/file-readers/file-reader.ts +14 -4
- package/src/modules/workspace/first-run.ts +1 -1
- package/src/modules/workspace/git-internals.middleware.ts +1 -1
- package/src/modules/workspace/index.ts +37 -0
- package/src/modules/workspace/kb-repository.ts +3 -2
- package/src/modules/workspace/not-found.ts +1 -1
- package/src/modules/workspace/nul-scan.ts +50 -0
- package/src/modules/workspace/pattern-matcher.contract.ts +124 -33
- package/src/modules/workspace/ripgrep-search.ts +715 -0
- package/src/modules/workspace/ripgrep-version.ts +35 -0
- package/src/modules/workspace/routine-write-policy.ts +1 -1
- package/src/modules/workspace/startup/__tests__/beside-checkout.test.ts +11 -0
- package/src/modules/workspace/startup/beside-checkout.ts +13 -5
- package/src/modules/workspace/startup/kb-git.ts +1 -1
- package/src/modules/workspace/startup/kb-startup-runner.ts +1 -2
- package/src/modules/workspace/startup/steps/groups-to-plugins.step.ts +3 -3
- package/src/modules/workspace/startup/steps/personal-spaces.step.ts +2 -2
- package/src/modules/workspace/startup/steps/plugin-layout.ts +1 -1
- package/src/modules/workspace/startup/steps/roles-yaml.step.ts +1 -1
- package/src/modules/workspace/startup/steps/seed-tree.ts +2 -2
- package/src/modules/workspace/startup/steps/template-files.step.ts +2 -2
- package/src/modules/workspace/startup/steps/template-source.ts +2 -2
- package/src/modules/workspace/worker-pool.ts +192 -0
- package/src/modules/workspace/workspace-tmp.ts +457 -0
- package/src/modules/workspace/workspace.routes.ts +15 -39
- package/src/modules/workspace/workspace.service.ts +96 -22
- package/src/modules/workspace/workspace.tools.ts +550 -186
- package/src/modules/workspace/write-denial.ts +4 -5
- package/src/modules/write-access/index.ts +7 -0
- package/src/shared/__tests__/module-boundaries.lint.test.ts +301 -0
- package/src/shared/path-order.ts +37 -8
- package/starter-packs/engineering/Plugins/engineering-starter/access.md +1 -1
- package/starter-packs/general/Plugins/general-starter/access.md +1 -1
- package/starter-packs/operations/Plugins/operations-starter/access.md +1 -1
- package/starter-packs/sales/Plugins/sales-starter/access.md +1 -1
- package/starter-packs/support/Plugins/support-starter/access.md +1 -1
- package/dist/modules/workspace/bounded-matcher.d.ts +0 -79
- package/dist/modules/workspace/bounded-matcher.d.ts.map +0 -1
- package/dist/modules/workspace/bounded-matcher.js +0 -261
- package/dist/modules/workspace/bounded-matcher.js.map +0 -1
- package/src/modules/workflow/__tests__/format-affected-owners.test.ts +0 -85
- package/src/modules/workspace/__tests__/bounded-matcher.test.ts +0 -213
- package/src/modules/workspace/bounded-matcher.ts +0 -328
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who may receive an event: the per-kind delivery rule the events route
|
|
3
|
+
* applies, once per event per session, before it writes the event out.
|
|
4
|
+
*
|
|
5
|
+
* The bus decides which sessions HEAR about an event — its focus filter
|
|
6
|
+
* (workspace-scoped kinds) and user filter (user-scoped kinds). That is a
|
|
7
|
+
* delivery filter, and a session may name any workspace as its focus. This is
|
|
8
|
+
* the access check on top of it: an event that names something reaches only a
|
|
9
|
+
* person who may read what it names, judged by the same services the routes
|
|
10
|
+
* that serve that thing judge it by.
|
|
11
|
+
*
|
|
12
|
+
* - An event that names a path on a workspace (`file-changed`, the two lock
|
|
13
|
+
* events, and any later kind that carries `workspaceId` and `path`): the
|
|
14
|
+
* person may read the path on that branch, as the file routes judge it —
|
|
15
|
+
* after the one normaliser the file routes put every path through, so a
|
|
16
|
+
* path a client sent without the `<kbDirName>/` prefix (the lock route
|
|
17
|
+
* takes both spellings) is judged as the repository path it names, never
|
|
18
|
+
* as "outside the knowledge base, readable".
|
|
19
|
+
* - `approval-changed`: the person may read the approved path on the
|
|
20
|
+
* request's target branch — judged as a file event on that branch is,
|
|
21
|
+
* from the server's checkout of it (a cached read of the access rules
|
|
22
|
+
* from disk, no git), and only for a target the server holds no checkout
|
|
23
|
+
* of from its published ref. Never by reading the request's detail, which
|
|
24
|
+
* diffs the branch pair with several git subprocesses per person per event.
|
|
25
|
+
* - `change-request-opened`: the person may see the request, by the rule the
|
|
26
|
+
* request tools list and 404 by (`maySeeChangeRequest`): its author, or
|
|
27
|
+
* someone who may read one of its files — both names of a move — at its
|
|
28
|
+
* target, read at `origin/<target>` exactly as the tools read it
|
|
29
|
+
* (`readablePathsAt`), so the event never announces a request the tools
|
|
30
|
+
* answer as not found. The request's file list is read ONCE per event,
|
|
31
|
+
* however many sessions are judged; each person then costs one batch
|
|
32
|
+
* verdict from the access tree cached by commit.
|
|
33
|
+
* - `git-sync-failed`: the event names the workspace's root and, for a sync
|
|
34
|
+
* conflict, each conflicted file (its `reason` quotes them too). The person
|
|
35
|
+
* gets the paths they may read; git's words reach only a person who may
|
|
36
|
+
* read the root and every path the conflict names, and everyone else gets
|
|
37
|
+
* a fixed sentence.
|
|
38
|
+
* - `agent-tool-call`: the person whose agent made the call, as the bus
|
|
39
|
+
* already filters it; the rule says the same, so a bus that passed it on
|
|
40
|
+
* would not widen the audience.
|
|
41
|
+
*
|
|
42
|
+
* Every other kind is delivered as it is. That includes the number-only
|
|
43
|
+
* change-request lifecycle kinds (`-merged`, `-rejected`, `-apply-failed`),
|
|
44
|
+
* which follow an announcement the person was either given or not. A verdict
|
|
45
|
+
* that cannot be reached (the access tree fails to load, the request cannot be
|
|
46
|
+
* read) withholds, or for `git-sync-failed` redacts:
|
|
47
|
+
* failing closed costs a live refresh, failing open names a file.
|
|
48
|
+
*
|
|
49
|
+
* Nothing here changes what publishers emit; the rule only reads the event.
|
|
50
|
+
*/
|
|
51
|
+
import type { ChangeRequest, WorkflowEvent } from '@bevel-software/platform-shared';
|
|
52
|
+
import type { IAccessControl } from '../access/index.js';
|
|
53
|
+
/** The person behind a session, as the auth middleware named them. */
|
|
54
|
+
export interface EventViewer {
|
|
55
|
+
userId: string;
|
|
56
|
+
email: string | undefined;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The verdicts the rule asks for. Each one is the question a route already
|
|
60
|
+
* answers for the thing the event names; `createEventAccess` wires them to
|
|
61
|
+
* those services, and tests to a fake.
|
|
62
|
+
*/
|
|
63
|
+
export interface EventAccess {
|
|
64
|
+
/** May `email` read the workspace-relative `wsPath` on `workspaceId` — the file routes' verdict. */
|
|
65
|
+
mayReadPath(workspaceId: string, email: string, wsPath: string): Promise<boolean>;
|
|
66
|
+
/** May `email` read the KB-repo-relative `repoPath` on `workspaceId`; `''` is the root. */
|
|
67
|
+
mayReadRepoPath(workspaceId: string, email: string, repoPath: string): Promise<boolean>;
|
|
68
|
+
/** Which of the KB-repo-relative `repoPaths` `email` may read on `targetBranch` — what a request into that branch is scoped by. */
|
|
69
|
+
readableAtTarget(targetBranch: string, email: string, repoPaths: string[]): Promise<Set<string>>;
|
|
70
|
+
/** Which of the KB-repo-relative `repoPaths` `email` may read at `origin/<base>` — the change-request tools' verdict, `readablePathsAt`. */
|
|
71
|
+
readableAtBase(base: string, email: string, repoPaths: string[]): Promise<Set<string>>;
|
|
72
|
+
/**
|
|
73
|
+
* Request `number` as the request list judges it — its target, author and
|
|
74
|
+
* changed files — or null when there is none. Read once per event: callers
|
|
75
|
+
* judging one event for many sessions share the read.
|
|
76
|
+
*/
|
|
77
|
+
changeRequest(number: number): Promise<ChangeRequestFacts | null>;
|
|
78
|
+
}
|
|
79
|
+
/** What the visibility rule reads of a request. */
|
|
80
|
+
export type ChangeRequestFacts = Pick<ChangeRequest, 'base' | 'authorId' | 'touchedNodeFiles'>;
|
|
81
|
+
/**
|
|
82
|
+
* What the events route asks of the rule. The route depends on this, never on
|
|
83
|
+
* `EventDelivery`, so the rule can be substituted behind it.
|
|
84
|
+
*/
|
|
85
|
+
export interface IEventDelivery {
|
|
86
|
+
/** The event as `viewer` may receive it: itself, a redacted copy, or null. Never rejects. */
|
|
87
|
+
judge(event: WorkflowEvent, viewer: EventViewer): Promise<WorkflowEvent | null>;
|
|
88
|
+
}
|
|
89
|
+
/** The deployment's `EventAccess`: the access service the file routes use, read in the server's own checkouts. */
|
|
90
|
+
export declare function createEventAccess(deps: {
|
|
91
|
+
accessControl: Pick<IAccessControl, 'canRead' | 'canReadBatch' | 'canReadBatchAtRef'>;
|
|
92
|
+
kbDirName: string;
|
|
93
|
+
/** `IWorkflowService.getChangeRequest`: the summary the request list judges, files included. */
|
|
94
|
+
getChangeRequest(number: number): Promise<ChangeRequestFacts | null>;
|
|
95
|
+
workspaces: {
|
|
96
|
+
/** Whether the server holds a checkout for `workspaceId` (the branch's own workspace). */
|
|
97
|
+
hasWorkspace(workspaceId: string): Promise<boolean>;
|
|
98
|
+
/**
|
|
99
|
+
* A workspace to read a published ref in: always for a request's base,
|
|
100
|
+
* and for an approval's target the server holds no checkout of. Every
|
|
101
|
+
* verdict at `origin/<branch>` is the same from any clone of the
|
|
102
|
+
* repository, so any existing one serves.
|
|
103
|
+
*/
|
|
104
|
+
anyWorkspaceId(): Promise<string>;
|
|
105
|
+
};
|
|
106
|
+
}): EventAccess;
|
|
107
|
+
/**
|
|
108
|
+
* The rule, shared per (event, person) while it is being judged: a person with
|
|
109
|
+
* three tabs open is judged once per event, not three times. A verdict is
|
|
110
|
+
* dropped the moment it settles and never reused, so a replay after a
|
|
111
|
+
* reconnect asks again, and a grant or a revocation since the event was first
|
|
112
|
+
* delivered decides what the replay carries.
|
|
113
|
+
*/
|
|
114
|
+
export declare class EventDelivery implements IEventDelivery {
|
|
115
|
+
private readonly access;
|
|
116
|
+
private readonly inFlight;
|
|
117
|
+
constructor(access: EventAccess);
|
|
118
|
+
judge(event: WorkflowEvent, viewer: EventViewer): Promise<WorkflowEvent | null>;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=events-delivery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events-delivery.d.ts","sourceRoot":"","sources":["../../../src/modules/workflow/events-delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAGpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAWzD,sEAAsE;AACtE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,W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kBAAkB,GAAG,IAAI,CAAC,CAAC;IACrE,UAAU,EAAE;QACV,0FAA0F;QAC1F,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QACpD;;;;;WAKG;QACH,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;KACnC,CAAC;CACH,GAAG,WAAW,CA6Cd;AAwFD;;;;;;GAMG;AACH,qBAAa,aAAc,YAAW,cAAc;IAGtC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoD;gBAEhD,MAAM,EAAE,WAAW;IAEhD,KAAK,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;CAUhF"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who may receive an event: the per-kind delivery rule the events route
|
|
3
|
+
* applies, once per event per session, before it writes the event out.
|
|
4
|
+
*
|
|
5
|
+
* The bus decides which sessions HEAR about an event — its focus filter
|
|
6
|
+
* (workspace-scoped kinds) and user filter (user-scoped kinds). That is a
|
|
7
|
+
* delivery filter, and a session may name any workspace as its focus. This is
|
|
8
|
+
* the access check on top of it: an event that names something reaches only a
|
|
9
|
+
* person who may read what it names, judged by the same services the routes
|
|
10
|
+
* that serve that thing judge it by.
|
|
11
|
+
*
|
|
12
|
+
* - An event that names a path on a workspace (`file-changed`, the two lock
|
|
13
|
+
* events, and any later kind that carries `workspaceId` and `path`): the
|
|
14
|
+
* person may read the path on that branch, as the file routes judge it —
|
|
15
|
+
* after the one normaliser the file routes put every path through, so a
|
|
16
|
+
* path a client sent without the `<kbDirName>/` prefix (the lock route
|
|
17
|
+
* takes both spellings) is judged as the repository path it names, never
|
|
18
|
+
* as "outside the knowledge base, readable".
|
|
19
|
+
* - `approval-changed`: the person may read the approved path on the
|
|
20
|
+
* request's target branch — judged as a file event on that branch is,
|
|
21
|
+
* from the server's checkout of it (a cached read of the access rules
|
|
22
|
+
* from disk, no git), and only for a target the server holds no checkout
|
|
23
|
+
* of from its published ref. Never by reading the request's detail, which
|
|
24
|
+
* diffs the branch pair with several git subprocesses per person per event.
|
|
25
|
+
* - `change-request-opened`: the person may see the request, by the rule the
|
|
26
|
+
* request tools list and 404 by (`maySeeChangeRequest`): its author, or
|
|
27
|
+
* someone who may read one of its files — both names of a move — at its
|
|
28
|
+
* target, read at `origin/<target>` exactly as the tools read it
|
|
29
|
+
* (`readablePathsAt`), so the event never announces a request the tools
|
|
30
|
+
* answer as not found. The request's file list is read ONCE per event,
|
|
31
|
+
* however many sessions are judged; each person then costs one batch
|
|
32
|
+
* verdict from the access tree cached by commit.
|
|
33
|
+
* - `git-sync-failed`: the event names the workspace's root and, for a sync
|
|
34
|
+
* conflict, each conflicted file (its `reason` quotes them too). The person
|
|
35
|
+
* gets the paths they may read; git's words reach only a person who may
|
|
36
|
+
* read the root and every path the conflict names, and everyone else gets
|
|
37
|
+
* a fixed sentence.
|
|
38
|
+
* - `agent-tool-call`: the person whose agent made the call, as the bus
|
|
39
|
+
* already filters it; the rule says the same, so a bus that passed it on
|
|
40
|
+
* would not widen the audience.
|
|
41
|
+
*
|
|
42
|
+
* Every other kind is delivered as it is. That includes the number-only
|
|
43
|
+
* change-request lifecycle kinds (`-merged`, `-rejected`, `-apply-failed`),
|
|
44
|
+
* which follow an announcement the person was either given or not. A verdict
|
|
45
|
+
* that cannot be reached (the access tree fails to load, the request cannot be
|
|
46
|
+
* read) withholds, or for `git-sync-failed` redacts:
|
|
47
|
+
* failing closed costs a live refresh, failing open names a file.
|
|
48
|
+
*
|
|
49
|
+
* Nothing here changes what publishers emit; the rule only reads the event.
|
|
50
|
+
*/
|
|
51
|
+
import { logger } from '../../shared/logging.js';
|
|
52
|
+
import { workspaceIdForBranch } from '../../shared/workspace-id.js';
|
|
53
|
+
import { canReadWorkspacePath } from '../access-model/index.js';
|
|
54
|
+
import { normalizeWorkspacePath } from '../kb-fs/index.js';
|
|
55
|
+
import { fileIsReadable, isAuthor, maySeeChangeRequest, pathsOf } from './agent-tools/change-request-read-shape.js';
|
|
56
|
+
import { readablePathsAt } from './read-on-branch.js';
|
|
57
|
+
const log = logger('events');
|
|
58
|
+
/** What a `git-sync-failed` says in place of git's words. */
|
|
59
|
+
const GIT_SYNC_FAILED_REDACTED_REASON = 'The last push did not land.';
|
|
60
|
+
/** The deployment's `EventAccess`: the access service the file routes use, read in the server's own checkouts. */
|
|
61
|
+
export function createEventAccess(deps) {
|
|
62
|
+
/** A request's read, shared while it is in flight: one per event's fan-out, never a stale one after. */
|
|
63
|
+
const requestsInFlight = new Map();
|
|
64
|
+
return {
|
|
65
|
+
// Normalised first, by the file routes' own normaliser: a path it refuses
|
|
66
|
+
// throws, and the rule withholds the event.
|
|
67
|
+
mayReadPath: async (workspaceId, email, wsPath) => canReadWorkspacePath((w, e, p) => deps.accessControl.canRead(w, e, p), workspaceId, email, deps.kbDirName, normalizeWorkspacePath(wsPath, deps.kbDirName)),
|
|
68
|
+
mayReadRepoPath: (workspaceId, email, repoPath) => deps.accessControl.canRead(workspaceId, email, repoPath),
|
|
69
|
+
readableAtTarget: async (targetBranch, email, repoPaths) => {
|
|
70
|
+
if (repoPaths.length === 0)
|
|
71
|
+
return new Set();
|
|
72
|
+
const unique = [...new Set(repoPaths)];
|
|
73
|
+
// The branch's own checkout, when the server has one (the default
|
|
74
|
+
// branch always): the same disk read a file event on that branch gets.
|
|
75
|
+
const own = workspaceIdForBranch(targetBranch);
|
|
76
|
+
const verdicts = (await deps.workspaces.hasWorkspace(own))
|
|
77
|
+
? await deps.accessControl.canReadBatch(own, email, unique)
|
|
78
|
+
: await deps.accessControl.canReadBatchAtRef(await deps.workspaces.anyWorkspaceId(), `origin/${targetBranch}`, email, unique);
|
|
79
|
+
// A ref that cannot be resolved answers null: nothing is granted on it.
|
|
80
|
+
return new Set(unique.filter((p) => verdicts?.get(p) === true));
|
|
81
|
+
},
|
|
82
|
+
// The request tools' own rule and reading, never the target's checkout: a
|
|
83
|
+
// grant there that is not yet published must not announce a request
|
|
84
|
+
// `get_change_request` answers as not found.
|
|
85
|
+
readableAtBase: async (base, email, repoPaths) => readablePathsAt(deps.accessControl, await deps.workspaces.anyWorkspaceId(), email, base, repoPaths),
|
|
86
|
+
changeRequest: (number) => {
|
|
87
|
+
const pending = requestsInFlight.get(number);
|
|
88
|
+
if (pending)
|
|
89
|
+
return pending;
|
|
90
|
+
const read = deps.getChangeRequest(number).finally(() => requestsInFlight.delete(number));
|
|
91
|
+
requestsInFlight.set(number, read);
|
|
92
|
+
return read;
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The event as `viewer` may receive it: the event itself, a redacted copy, or
|
|
98
|
+
* null for nothing at all.
|
|
99
|
+
*/
|
|
100
|
+
async function deliveryFor(event, viewer, access) {
|
|
101
|
+
const email = viewer.email;
|
|
102
|
+
try {
|
|
103
|
+
switch (event.kind) {
|
|
104
|
+
case 'approval-changed':
|
|
105
|
+
return email && (await access.readableAtTarget(event.targetBranch, email, [event.path])).has(event.path)
|
|
106
|
+
? event
|
|
107
|
+
: null;
|
|
108
|
+
case 'change-request-opened':
|
|
109
|
+
return email && (await maySeeRequest(event.number, email, access)) ? event : null;
|
|
110
|
+
case 'git-sync-failed':
|
|
111
|
+
return email ? await gitSyncFailedFor(event, email, access) : redactGitSyncFailed(event, []);
|
|
112
|
+
case 'agent-tool-call':
|
|
113
|
+
return viewer.userId === event.forUserId ? event : null;
|
|
114
|
+
}
|
|
115
|
+
// Structural, not by kind: anything that names a path on a workspace is
|
|
116
|
+
// judged by the path, so a kind added later is covered without a line here.
|
|
117
|
+
const named = pathOnWorkspace(event);
|
|
118
|
+
if (named)
|
|
119
|
+
return email && (await access.mayReadPath(named.workspaceId, email, named.path)) ? event : null;
|
|
120
|
+
return event;
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
log.warn(`delivery verdict failed for event id=${event.id} kind=${event.kind} user=${viewer.userId}; withheld`, { err });
|
|
124
|
+
return event.kind === 'git-sync-failed' ? redactGitSyncFailed(event, []) : null;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The request tools' visibility rule, over the request the list judges: its
|
|
129
|
+
* author sees it; anyone else sees it when one of its files is readable at
|
|
130
|
+
* the target, a move only when both its names are. No request, no file list
|
|
131
|
+
* (a diff that could not be computed): author only, as the tools answer it.
|
|
132
|
+
*/
|
|
133
|
+
async function maySeeRequest(number, email, access) {
|
|
134
|
+
const request = await access.changeRequest(number);
|
|
135
|
+
if (!request)
|
|
136
|
+
return false;
|
|
137
|
+
if (isAuthor(request, email))
|
|
138
|
+
return true;
|
|
139
|
+
const files = request.touchedNodeFiles ?? [];
|
|
140
|
+
const readable = await access.readableAtBase(request.base, email, files.flatMap(pathsOf));
|
|
141
|
+
const readableFiles = files.filter((f) => fileIsReadable(f, (p) => readable.has(p))).length;
|
|
142
|
+
return maySeeChangeRequest({ readableFiles, isAuthor: false });
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Every path the event names is judged: the root, which git's words are about,
|
|
146
|
+
* and each conflicted file, which a conflict's `reason` also quotes. Git's
|
|
147
|
+
* words go out only when every one of them is readable; otherwise the person
|
|
148
|
+
* keeps the conflicted files they may read and a fixed sentence.
|
|
149
|
+
*/
|
|
150
|
+
async function gitSyncFailedFor(event, email, access) {
|
|
151
|
+
const conflicted = event.conflictedPaths ?? [];
|
|
152
|
+
const [root, ...each] = await Promise.all([
|
|
153
|
+
access.mayReadRepoPath(event.workspaceId, email, ''),
|
|
154
|
+
...conflicted.map((p) => access.mayReadRepoPath(event.workspaceId, email, p)),
|
|
155
|
+
]);
|
|
156
|
+
const readable = conflicted.filter((_, i) => each[i]);
|
|
157
|
+
return root && readable.length === conflicted.length ? event : redactGitSyncFailed(event, readable);
|
|
158
|
+
}
|
|
159
|
+
function pathOnWorkspace(event) {
|
|
160
|
+
const e = event;
|
|
161
|
+
return typeof e.workspaceId === 'string' && typeof e.path === 'string'
|
|
162
|
+
? { workspaceId: e.workspaceId, path: e.path }
|
|
163
|
+
: null;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Same shape, so a client parses it as before: git's words are gone, and of
|
|
167
|
+
* the conflicted files only `readable` remain (none, the key absent).
|
|
168
|
+
*/
|
|
169
|
+
function redactGitSyncFailed(event, readable) {
|
|
170
|
+
const redacted = { ...event, reason: GIT_SYNC_FAILED_REDACTED_REASON };
|
|
171
|
+
if (readable.length > 0)
|
|
172
|
+
redacted.conflictedPaths = readable;
|
|
173
|
+
else
|
|
174
|
+
delete redacted.conflictedPaths;
|
|
175
|
+
return redacted;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* The rule, shared per (event, person) while it is being judged: a person with
|
|
179
|
+
* three tabs open is judged once per event, not three times. A verdict is
|
|
180
|
+
* dropped the moment it settles and never reused, so a replay after a
|
|
181
|
+
* reconnect asks again, and a grant or a revocation since the event was first
|
|
182
|
+
* delivered decides what the replay carries.
|
|
183
|
+
*/
|
|
184
|
+
export class EventDelivery {
|
|
185
|
+
access;
|
|
186
|
+
inFlight = new Map();
|
|
187
|
+
constructor(access) {
|
|
188
|
+
this.access = access;
|
|
189
|
+
}
|
|
190
|
+
judge(event, viewer) {
|
|
191
|
+
const key = `${event.id}\u0000${event.ts}\u0000${viewer.userId}`;
|
|
192
|
+
const pending = this.inFlight.get(key);
|
|
193
|
+
if (pending)
|
|
194
|
+
return pending;
|
|
195
|
+
// `deliveryFor` never rejects: a verdict it cannot reach withholds the
|
|
196
|
+
// event, or for `git-sync-failed` redacts it.
|
|
197
|
+
const verdict = deliveryFor(event, viewer, this.access).finally(() => this.inFlight.delete(key));
|
|
198
|
+
this.inFlight.set(key, verdict);
|
|
199
|
+
return verdict;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=events-delivery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events-delivery.js","sourceRoot":"","sources":["../../../src/modules/workflow/events-delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,4CAA4C,CAAC;AACpH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAE7B,6DAA6D;AAC7D,MAAM,+BAA+B,GAAG,6BAA6B,CAAC;AA0CtE,kHAAkH;AAClH,MAAM,UAAU,iBAAiB,CAAC,IAgBjC;IACC,wGAAwG;IACxG,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA8C,CAAC;IAC/E,OAAO;QACL,0EAA0E;QAC1E,4CAA4C;QAC5C,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAChD,oBAAoB,CAClB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAChD,WAAW,EACX,KAAK,EACL,IAAI,CAAC,SAAS,EACd,sBAAsB,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAC/C;QACH,eAAe,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,IAA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
28
28
|
* client refetches state from scratch.
|
|
29
29
|
*
|
|
30
|
+
* **Who receives what** — the bus picks the sessions that HEAR about an
|
|
31
|
+
* event (focus for workspace events, owner for user events); before writing
|
|
32
|
+
* it, the route asks the delivery rule (`IEventDelivery`) whether this
|
|
33
|
+
* session's person may have it, and in what form (`events-delivery.ts`). Live fan-out and replay go
|
|
34
|
+
* through the same rule, and through one ordered queue per session, so a
|
|
35
|
+
* slow verdict never reorders a session's stream.
|
|
36
|
+
*
|
|
30
37
|
* **Heartbeat** — every 25 s the route writes an SSE comment (`:\n\n`).
|
|
31
38
|
* Keeps proxies (nginx, Coolify's Traefik, Cloudflare) from killing the
|
|
32
39
|
* connection as idle. Cheap (~15 bytes), eliminates a whole class of bug.
|
|
33
40
|
*/
|
|
34
41
|
import type { Response } from 'express';
|
|
35
42
|
import express from 'express';
|
|
36
|
-
import type
|
|
43
|
+
import { type WorkflowEvent } from '@bevel-software/platform-shared';
|
|
37
44
|
import type { WorkflowEventBus } from './event-bus.js';
|
|
38
|
-
import '
|
|
45
|
+
import type { IEventDelivery } from './events-delivery.js';
|
|
46
|
+
import '../auth/index.js';
|
|
39
47
|
/**
|
|
40
48
|
* Per-session bookkeeping the route owns. The bus's `Subscriber` holds a
|
|
41
49
|
* `getFocusedWorkspaceIds()` getter pointing at `session.focusedWorkspaceIds`,
|
|
@@ -55,15 +63,16 @@ interface ActiveSession {
|
|
|
55
63
|
* suggestion branch got no `file-changed` for the images on screen and kept
|
|
56
64
|
* showing a screenshot a teammate had already replaced.
|
|
57
65
|
*
|
|
58
|
-
* The client declares the list
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* reader may open what changed is settled by the routes that serve it.
|
|
66
|
+
* The client declares the list, and may name any workspace in it: this is
|
|
67
|
+
* a delivery filter, not an access check. The access check is the
|
|
68
|
+
* delivery rule (`IEventDelivery`) every event passes on its way to the session.
|
|
62
69
|
*/
|
|
63
70
|
focusedWorkspaceIds: string[];
|
|
64
71
|
/** Set when the SSE connection closes. Used by the focus POST so a
|
|
65
72
|
* request that arrives after the connection drops 404s cleanly. */
|
|
66
73
|
closed: boolean;
|
|
74
|
+
/** Tail of this session's writes: each event waits for its verdict, in arrival order. */
|
|
75
|
+
queue: Promise<void>;
|
|
67
76
|
/** The Express response stream backing this session. Stored so a
|
|
68
77
|
* same-id reconnect can `end()` the old response and close its TCP
|
|
69
78
|
* socket immediately, rather than leaving a dangling connection that
|
|
@@ -75,7 +84,7 @@ interface ActiveSession {
|
|
|
75
84
|
* session closed before the OS-level close event fires). */
|
|
76
85
|
cleanup: () => void;
|
|
77
86
|
}
|
|
78
|
-
export declare function createEventsRoutes(bus: WorkflowEventBus, authMiddleware: express.RequestHandler): express.Router;
|
|
87
|
+
export declare function createEventsRoutes(bus: WorkflowEventBus, authMiddleware: express.RequestHandler, delivery: IEventDelivery): express.Router;
|
|
79
88
|
/**
|
|
80
89
|
* Serialise `event` into the SSE wire format. Each frame is:
|
|
81
90
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.routes.d.ts","sourceRoot":"","sources":["../../../src/modules/workflow/events.routes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"events.routes.d.ts","sourceRoot":"","sources":["../../../src/modules/workflow/events.routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,kBAAkB,CAAC;AAe1B;;;;;GAKG;AACH,UAAU,aAAa;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;OAaG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B;wEACoE;IACpE,MAAM,EAAE,OAAO,CAAC;IAChB,yFAAyF;IACzF,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB;;;sDAGkD;IAClD,GAAG,EAAE,QAAQ,CAAC;IACd;;;iEAG6D;IAC7D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,gBAAgB,EACrB,cAAc,EAAE,OAAO,CAAC,cAAc,EACtC,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CA+LhB;AAED;;;;;;;;;;;GAWG;AACH,iBAAS,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,IAAI,CAGhE;AAED,4EAA4E;AAC5E,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -27,6 +27,13 @@
|
|
|
27
27
|
* has evicted past `n`, the route emits `{ kind: 'resync' }` so the
|
|
28
28
|
* client refetches state from scratch.
|
|
29
29
|
*
|
|
30
|
+
* **Who receives what** — the bus picks the sessions that HEAR about an
|
|
31
|
+
* event (focus for workspace events, owner for user events); before writing
|
|
32
|
+
* it, the route asks the delivery rule (`IEventDelivery`) whether this
|
|
33
|
+
* session's person may have it, and in what form (`events-delivery.ts`). Live fan-out and replay go
|
|
34
|
+
* through the same rule, and through one ordered queue per session, so a
|
|
35
|
+
* slow verdict never reorders a session's stream.
|
|
36
|
+
*
|
|
30
37
|
* **Heartbeat** — every 25 s the route writes an SSE comment (`:\n\n`).
|
|
31
38
|
* Keeps proxies (nginx, Coolify's Traefik, Cloudflare) from killing the
|
|
32
39
|
* connection as idle. Cheap (~15 bytes), eliminates a whole class of bug.
|
|
@@ -34,7 +41,7 @@
|
|
|
34
41
|
import { logger } from '../../shared/logging.js';
|
|
35
42
|
const log = logger('events');
|
|
36
43
|
import express from 'express';
|
|
37
|
-
import '../auth/
|
|
44
|
+
import '../auth/index.js'; // Express Request augmentation
|
|
38
45
|
/** Interval between SSE keep-alive comments (ms). 25 s sits comfortably under
|
|
39
46
|
* the typical 30–100 s proxy idle timeout. */
|
|
40
47
|
const HEARTBEAT_INTERVAL_MS = 25_000;
|
|
@@ -46,7 +53,7 @@ const HEARTBEAT_INTERVAL_MS = 25_000;
|
|
|
46
53
|
* default branch a skill page reads from.
|
|
47
54
|
*/
|
|
48
55
|
const MAX_WATCHED_WORKSPACES = 8;
|
|
49
|
-
export function createEventsRoutes(bus, authMiddleware) {
|
|
56
|
+
export function createEventsRoutes(bus, authMiddleware, delivery) {
|
|
50
57
|
const router = express.Router();
|
|
51
58
|
/**
|
|
52
59
|
* Process-wide session registry. The same map services the SSE open
|
|
@@ -61,6 +68,7 @@ export function createEventsRoutes(bus, authMiddleware) {
|
|
|
61
68
|
return;
|
|
62
69
|
}
|
|
63
70
|
const userId = req.userId;
|
|
71
|
+
const viewer = { userId, email: req.userEmail };
|
|
64
72
|
// SSE headers. `X-Accel-Buffering: no` tells nginx not to buffer the
|
|
65
73
|
// response (would batch events behind a flush boundary, killing
|
|
66
74
|
// latency). `Cache-Control: no-cache` + omitted `Content-Length`
|
|
@@ -105,15 +113,25 @@ export function createEventsRoutes(bus, authMiddleware) {
|
|
|
105
113
|
userId,
|
|
106
114
|
focusedWorkspaceIds: [],
|
|
107
115
|
closed: false,
|
|
116
|
+
queue: Promise.resolve(),
|
|
108
117
|
res,
|
|
109
118
|
// Filled in below once `unsubscribe` + `heartbeat` exist.
|
|
110
119
|
cleanup: () => { },
|
|
111
120
|
};
|
|
112
121
|
sessions.set(sessionId, session);
|
|
122
|
+
// Every event this session hears goes through the delivery rule, in the
|
|
123
|
+
// order it arrived: the verdict is async, the stream must not reorder.
|
|
113
124
|
const push = (event) => {
|
|
114
125
|
if (session.closed)
|
|
115
126
|
return;
|
|
116
|
-
|
|
127
|
+
const verdict = delivery.judge(event, viewer);
|
|
128
|
+
session.queue = session.queue.then(async () => {
|
|
129
|
+
const deliverable = await verdict;
|
|
130
|
+
if (deliverable && !session.closed)
|
|
131
|
+
writeSseEvent(res, deliverable);
|
|
132
|
+
}).catch((err) => {
|
|
133
|
+
log.warn(`write to session=${sessionId} failed:`, { err });
|
|
134
|
+
});
|
|
117
135
|
};
|
|
118
136
|
const unsubscribe = bus.subscribe({
|
|
119
137
|
sessionId,
|
|
@@ -142,8 +160,9 @@ export function createEventsRoutes(bus, authMiddleware) {
|
|
|
142
160
|
});
|
|
143
161
|
}
|
|
144
162
|
else {
|
|
163
|
+
// The same rule as live delivery, queued ahead of anything live.
|
|
145
164
|
for (const event of replay)
|
|
146
|
-
|
|
165
|
+
push(event);
|
|
147
166
|
}
|
|
148
167
|
}
|
|
149
168
|
const heartbeat = setInterval(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.routes.js","sourceRoot":"","sources":["../../../src/modules/workflow/events.routes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"events.routes.js","sourceRoot":"","sources":["../../../src/modules/workflow/events.routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC7B,OAAO,OAAO,MAAM,SAAS,CAAC;AAI9B,OAAO,kBAAkB,CAAC,CAAC,+BAA+B;AAE1D;8CAC8C;AAC9C,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,sBAAsB,GAAG,CAAC,CAAC;AA2CjC,MAAM,UAAU,kBAAkB,CAChC,GAAqB,EACrB,cAAsC,EACtC,QAAwB;IAExB,MAAM,MAAM,GAAG,O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,CAAC;QACP,qEAAqE;QACrE,MAAM,IAAI,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,sBAAsB,CAAC,CAAC;QACpF,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC;QAC7C,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;QACnC,GAAG,CAAC,IAAI,CACN,iBAAiB,SAAS,SAAS,MAAM,IACvC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QACxB,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CACvB,CAAC;QACF,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,CAAC;IACzF,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAS,aAAa,CAAC,GAAa,EAAE,KAAoB;IACxD,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;IAC/B,GAAG,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,4EAA4E;AAC5E,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
* lazily on next access rather than running a sweeper — the row count is
|
|
57
57
|
* bounded by concurrent editors, not history, so lazy GC is fine.
|
|
58
58
|
*/
|
|
59
|
-
import type { Database } from '../database/
|
|
59
|
+
import type { Database } from '../database/index.js';
|
|
60
60
|
import type { AcquireLockResult, AuthUser, FileLock } from '@bevel-software/platform-shared';
|
|
61
61
|
export declare class FileLockService {
|
|
62
62
|
private readonly db;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-lock.service.d.ts","sourceRoot":"","sources":["../../../src/modules/workflow/file-lock.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"file-lock.service.d.ts","sourceRoot":"","sources":["../../../src/modules/workflow/file-lock.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAwC7F,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ;IAEzC;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IAErD;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA4C;IAEtE;;;;;OAKG;IACG,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAY5E;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,OAAO,CACX,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,QAAQ,EACd,IAAI,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAChC,OAAO,CAAC,iBAAiB,CAAC;IAsB7B,wCAAwC;YAC1B,gBAAgB;IAmH9B;;;;;OAKG;IACG,SAAS,CACb,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,QAAQ,CAAC;IAsCpB;;;;OAIG;IACG,OAAO,CACX,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,IAAI,CAAC;IAehB;;;;OAIG;IACG,GAAG,CACP,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IA0C3B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQzD;;;;;;;OAOG;IACG,YAAY,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAS7D"}
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
* bounded by concurrent editors, not history, so lazy GC is fine.
|
|
58
58
|
*/
|
|
59
59
|
import { and, eq, gt, inArray, lte } from 'drizzle-orm';
|
|
60
|
-
import { fileLocks } from '../database/
|
|
60
|
+
import { fileLocks } from '../database/index.js';
|
|
61
61
|
import { WorkflowValidationError } from '../../shared/domain-errors.js';
|
|
62
62
|
import { canonicalFileIdentity } from '../../shared/canonical-file-identity.js';
|
|
63
63
|
import { branchForWorkspaceId, canonicalWorkspaceId } from '../../shared/workspace-id.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-lock.service.js","sourceRoot":"","sources":["../../../src/modules/workflow/file-lock.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AA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aACvB,MAAM,CAAC,SAAS,CAAC;aACjB,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;aACnC,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,YAAY,CAAC,cAAsB;QACvC,MAAM,WAAW,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAC;QACzD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,EAAE;aACvB,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;aAChC,IAAI,CAAC,SAAS,CAAC;aACf,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;aAChH,KAAK,CAAC,CAAC,CAAC,CAAC;QACZ,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AppliedChangeRef, AppliedMergeResult, AuthUser, BranchInfo, ChangedPathPair, CommitAttribution, IGitService, MergeIntoBranchOutcome, MergeResolution, ReservedPushOps, RemoteSyncPullResult, PrFileStatus, PullRequestFile, ShareChangesRequest, WorkingTreeStatus } from '@bevel-software/platform-shared';
|
|
2
|
-
import type { WorkspaceService } from '../../workspace/
|
|
1
|
+
import type { AppliedChangeRef, AppliedMergeResult, AuthUser, BranchCounts, BranchInfo, ChangedPathPair, CommitAttribution, IGitService, MergeIntoBranchOutcome, MergeResolution, ReservedPushOps, RemoteSyncPullResult, PrFileStatus, PullRequestFile, ShareChangesRequest, WorkingTreeStatus } from '@bevel-software/platform-shared';
|
|
2
|
+
import type { WorkspaceService } from '../../workspace/index.js';
|
|
3
3
|
import type { WorkflowHooks } from '../workflow-hooks.js';
|
|
4
|
-
import type { IAccessControl } from '../../access/
|
|
4
|
+
import type { IAccessControl } from '../../access/index.js';
|
|
5
5
|
import { type WorkspaceMutex } from '../../kb-fs/index.js';
|
|
6
6
|
import type { KbContext } from '../../../shared/kb-context.js';
|
|
7
7
|
import { type GitCredentials, type IGitRunner } from '../../../shared/git.contract.js';
|
|
@@ -55,7 +55,6 @@ export declare class GitService implements IGitService {
|
|
|
55
55
|
/** Whether the last implicit fetch per workspace SUCCEEDED — see `fetchOriginIfStale`. */
|
|
56
56
|
private readonly lastImplicitFetchOk;
|
|
57
57
|
private static readonly IMPLICIT_FETCH_TTL_MS;
|
|
58
|
-
private static readonly MAX_AHEAD_BEHIND_CONCURRENCY;
|
|
59
58
|
/**
|
|
60
59
|
* A change request's changed entries, keyed by the two commits its diff
|
|
61
60
|
* was read between. Two commits never change, and neither does the
|
|
@@ -173,6 +172,7 @@ export declare class GitService implements IGitService {
|
|
|
173
172
|
freshFetch?: boolean;
|
|
174
173
|
strictFetch?: boolean;
|
|
175
174
|
}): Promise<BranchInfo[]>;
|
|
175
|
+
branchCounts(workspaceId: string): Promise<BranchCounts>;
|
|
176
176
|
/**
|
|
177
177
|
* Run `git fetch --prune origin` outside the workspace mutex, with a short
|
|
178
178
|
* TTL so back-to-back callers (mount + dropdown-open + 30s poll) coalesce
|