@bevel-software/platform-core-backend 0.25.2 → 0.27.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 +251 -0
- package/agent-guide/conventions.md +35 -0
- package/agent-guide/directory-structure.md +145 -0
- package/agent-guide/finding-things.md +7 -0
- package/agent-guide/html-views.md +83 -0
- package/agent-guide/introduction.md +27 -0
- package/agent-guide/new-knowledge-base.md +24 -0
- package/agent-guide/skills.md +47 -0
- package/agent-guide/tool-manuals.md +227 -0
- package/agent-guide/where-a-new-file-goes.md +36 -0
- package/dist/assets.d.ts +26 -0
- package/dist/assets.d.ts.map +1 -1
- package/dist/assets.js +35 -2
- package/dist/assets.js.map +1 -1
- package/dist/core/catalog-revision.d.ts +19 -1
- package/dist/core/catalog-revision.d.ts.map +1 -1
- package/dist/core/catalog-revision.js +14 -3
- package/dist/core/catalog-revision.js.map +1 -1
- package/dist/core/core-ports.d.ts +11 -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 +5 -0
- package/dist/core/create-core-server.d.ts.map +1 -1
- package/dist/core/create-core-server.js +65 -3
- package/dist/core/create-core-server.js.map +1 -1
- package/dist/core/create-core-services.d.ts +35 -0
- package/dist/core/create-core-services.d.ts.map +1 -1
- package/dist/core/create-core-services.js +114 -12
- package/dist/core/create-core-services.js.map +1 -1
- package/dist/core/lifecycle.d.ts +16 -1
- package/dist/core/lifecycle.d.ts.map +1 -1
- package/dist/core/lifecycle.js +18 -1
- package/dist/core/lifecycle.js.map +1 -1
- package/dist/core-config.d.ts +21 -0
- package/dist/core-config.d.ts.map +1 -1
- package/dist/core-config.js +22 -1
- package/dist/core-config.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/access/access-control.interface.d.ts +17 -0
- package/dist/modules/access/access-control.interface.d.ts.map +1 -1
- package/dist/modules/access/access-control.service.d.ts +2 -0
- package/dist/modules/access/access-control.service.d.ts.map +1 -1
- package/dist/modules/access/access-control.service.js +27 -0
- package/dist/modules/access/access-control.service.js.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/agent-guide/agent-guide.d.ts +145 -0
- package/dist/modules/agent-guide/agent-guide.d.ts.map +1 -0
- package/dist/modules/agent-guide/agent-guide.js +199 -0
- package/dist/modules/agent-guide/agent-guide.js.map +1 -0
- package/dist/modules/agent-guide/agent-guide.tools.d.ts +24 -0
- package/dist/modules/agent-guide/agent-guide.tools.d.ts.map +1 -0
- package/dist/modules/agent-guide/agent-guide.tools.js +100 -0
- package/dist/modules/agent-guide/agent-guide.tools.js.map +1 -0
- package/dist/modules/agent-guide/index.d.ts +4 -0
- package/dist/modules/agent-guide/index.d.ts.map +1 -0
- package/dist/modules/agent-guide/index.js +4 -0
- package/dist/modules/agent-guide/index.js.map +1 -0
- package/dist/modules/agent-instructions/agent-instructions.routes.d.ts +3 -2
- package/dist/modules/agent-instructions/agent-instructions.routes.d.ts.map +1 -1
- package/dist/modules/agent-instructions/agent-instructions.routes.js +3 -2
- package/dist/modules/agent-instructions/agent-instructions.routes.js.map +1 -1
- package/dist/modules/agent-instructions/compose.d.ts +14 -6
- package/dist/modules/agent-instructions/compose.d.ts.map +1 -1
- package/dist/modules/agent-instructions/compose.js +28 -8
- package/dist/modules/agent-instructions/compose.js.map +1 -1
- package/dist/modules/agent-instructions/index.d.ts +1 -1
- package/dist/modules/agent-instructions/index.d.ts.map +1 -1
- package/dist/modules/agent-instructions/index.js +1 -1
- package/dist/modules/agent-instructions/index.js.map +1 -1
- package/dist/modules/agent-instructions/shared-file-rules.d.ts +10 -50
- package/dist/modules/agent-instructions/shared-file-rules.d.ts.map +1 -1
- package/dist/modules/agent-instructions/shared-file-rules.js +51 -104
- package/dist/modules/agent-instructions/shared-file-rules.js.map +1 -1
- package/dist/modules/audit/agent-audit.service.d.ts +21 -2
- package/dist/modules/audit/agent-audit.service.d.ts.map +1 -1
- package/dist/modules/audit/agent-audit.service.js +43 -2
- package/dist/modules/audit/agent-audit.service.js.map +1 -1
- package/dist/modules/audit/agent-connection.routes.d.ts +34 -0
- package/dist/modules/audit/agent-connection.routes.d.ts.map +1 -0
- package/dist/modules/audit/agent-connection.routes.js +38 -0
- package/dist/modules/audit/agent-connection.routes.js.map +1 -0
- package/dist/modules/audit/audit.contract.d.ts +24 -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/index.d.ts +1 -0
- package/dist/modules/audit/index.d.ts.map +1 -1
- package/dist/modules/audit/index.js +1 -0
- package/dist/modules/audit/index.js.map +1 -1
- package/dist/modules/auth/account.routes.d.ts.map +1 -1
- package/dist/modules/auth/account.routes.js +10 -3
- package/dist/modules/auth/account.routes.js.map +1 -1
- package/dist/modules/auth/auth.middleware.d.ts +7 -0
- package/dist/modules/auth/auth.middleware.d.ts.map +1 -1
- package/dist/modules/auth/auth.middleware.js +1 -1
- package/dist/modules/auth/auth.middleware.js.map +1 -1
- package/dist/modules/code-mode/code-mode.tool.d.ts.map +1 -1
- package/dist/modules/code-mode/code-mode.tool.js +11 -3
- package/dist/modules/code-mode/code-mode.tool.js.map +1 -1
- package/dist/modules/database/core-schema.d.ts +96 -0
- package/dist/modules/database/core-schema.d.ts.map +1 -1
- package/dist/modules/database/core-schema.js +32 -3
- package/dist/modules/database/core-schema.js.map +1 -1
- package/dist/modules/embed/account-link.service.d.ts +42 -0
- package/dist/modules/embed/account-link.service.d.ts.map +1 -0
- package/dist/modules/embed/account-link.service.js +50 -0
- package/dist/modules/embed/account-link.service.js.map +1 -0
- package/dist/modules/embed/embed-link.d.ts +58 -0
- package/dist/modules/embed/embed-link.d.ts.map +1 -0
- package/dist/modules/embed/embed-link.js +160 -0
- package/dist/modules/embed/embed-link.js.map +1 -0
- package/dist/modules/embed/embed.errors.d.ts +30 -0
- package/dist/modules/embed/embed.errors.d.ts.map +1 -0
- package/dist/modules/embed/embed.errors.js +42 -0
- package/dist/modules/embed/embed.errors.js.map +1 -0
- package/dist/modules/embed/embed.interface.d.ts +204 -0
- package/dist/modules/embed/embed.interface.d.ts.map +1 -0
- package/dist/modules/embed/embed.interface.js +2 -0
- package/dist/modules/embed/embed.interface.js.map +1 -0
- package/dist/modules/embed/embed.routes.d.ts +59 -0
- package/dist/modules/embed/embed.routes.d.ts.map +1 -0
- package/dist/modules/embed/embed.routes.js +343 -0
- package/dist/modules/embed/embed.routes.js.map +1 -0
- package/dist/modules/embed/embed.service.d.ts +169 -0
- package/dist/modules/embed/embed.service.d.ts.map +1 -0
- package/dist/modules/embed/embed.service.js +627 -0
- package/dist/modules/embed/embed.service.js.map +1 -0
- package/dist/modules/embed/embed.tools.d.ts +51 -0
- package/dist/modules/embed/embed.tools.d.ts.map +1 -0
- package/dist/modules/embed/embed.tools.js +170 -0
- package/dist/modules/embed/embed.tools.js.map +1 -0
- package/dist/modules/embed/mcp-app.d.ts +64 -0
- package/dist/modules/embed/mcp-app.d.ts.map +1 -0
- package/dist/modules/embed/mcp-app.js +147 -0
- package/dist/modules/embed/mcp-app.js.map +1 -0
- package/dist/modules/embed/mcp-app.routes.d.ts +21 -0
- package/dist/modules/embed/mcp-app.routes.d.ts.map +1 -0
- package/dist/modules/embed/mcp-app.routes.js +36 -0
- package/dist/modules/embed/mcp-app.routes.js.map +1 -0
- package/dist/modules/github-app/github-app.connection.d.ts +15 -0
- package/dist/modules/github-app/github-app.connection.d.ts.map +1 -1
- package/dist/modules/github-app/github-app.connection.js +34 -3
- package/dist/modules/github-app/github-app.connection.js.map +1 -1
- package/dist/modules/kb-fs/locking-filesystem.d.ts +65 -0
- package/dist/modules/kb-fs/locking-filesystem.d.ts.map +1 -1
- package/dist/modules/kb-fs/locking-filesystem.js +300 -0
- package/dist/modules/kb-fs/locking-filesystem.js.map +1 -1
- package/dist/modules/kb-sync/kb-sync.interface.d.ts +5 -0
- package/dist/modules/kb-sync/kb-sync.interface.d.ts.map +1 -1
- package/dist/modules/kb-sync/kb-sync.service.d.ts.map +1 -1
- package/dist/modules/kb-sync/kb-sync.service.js +6 -0
- package/dist/modules/kb-sync/kb-sync.service.js.map +1 -1
- package/dist/modules/mcp/mcp-auth.middleware.d.ts.map +1 -1
- package/dist/modules/mcp/mcp-auth.middleware.js +2 -1
- package/dist/modules/mcp/mcp-auth.middleware.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +57 -3
- package/dist/modules/mcp/mcp.service.d.ts.map +1 -1
- package/dist/modules/mcp/mcp.service.js +177 -24
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/oauth/bevel-oauth-provider.d.ts +24 -0
- package/dist/modules/mcp/oauth/bevel-oauth-provider.d.ts.map +1 -1
- package/dist/modules/mcp/oauth/bevel-oauth-provider.js +32 -4
- package/dist/modules/mcp/oauth/bevel-oauth-provider.js.map +1 -1
- package/dist/modules/mcp/tool-schema-guard.d.ts +105 -0
- package/dist/modules/mcp/tool-schema-guard.d.ts.map +1 -0
- package/dist/modules/mcp/tool-schema-guard.js +171 -0
- package/dist/modules/mcp/tool-schema-guard.js.map +1 -0
- package/dist/modules/onboarding/onboarding.contract.d.ts +80 -0
- package/dist/modules/onboarding/onboarding.contract.d.ts.map +1 -0
- package/dist/modules/onboarding/onboarding.contract.js +7 -0
- package/dist/modules/onboarding/onboarding.contract.js.map +1 -0
- package/dist/modules/onboarding/onboarding.routes.d.ts +18 -0
- package/dist/modules/onboarding/onboarding.routes.d.ts.map +1 -0
- package/dist/modules/onboarding/onboarding.routes.js +81 -0
- package/dist/modules/onboarding/onboarding.routes.js.map +1 -0
- package/dist/modules/onboarding/starter-pack.service.d.ts +213 -0
- package/dist/modules/onboarding/starter-pack.service.d.ts.map +1 -0
- package/dist/modules/onboarding/starter-pack.service.js +492 -0
- package/dist/modules/onboarding/starter-pack.service.js.map +1 -0
- package/dist/modules/onboarding/starter-packs.d.ts +78 -0
- package/dist/modules/onboarding/starter-packs.d.ts.map +1 -0
- package/dist/modules/onboarding/starter-packs.js +156 -0
- package/dist/modules/onboarding/starter-packs.js.map +1 -0
- package/dist/modules/plugins/index.d.ts +1 -1
- package/dist/modules/plugins/index.d.ts.map +1 -1
- package/dist/modules/plugins/index.js +1 -1
- package/dist/modules/plugins/index.js.map +1 -1
- package/dist/modules/plugins/plugin-provision.service.d.ts +19 -0
- package/dist/modules/plugins/plugin-provision.service.d.ts.map +1 -1
- package/dist/modules/plugins/plugin-provision.service.js +18 -1
- package/dist/modules/plugins/plugin-provision.service.js.map +1 -1
- package/dist/modules/plugins/plugins.routes.d.ts +0 -36
- package/dist/modules/plugins/plugins.routes.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.routes.js +31 -0
- package/dist/modules/plugins/plugins.routes.js.map +1 -1
- package/dist/modules/plugins/plugins.tools.d.ts +36 -2
- package/dist/modules/plugins/plugins.tools.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.tools.js +71 -14
- package/dist/modules/plugins/plugins.tools.js.map +1 -1
- package/dist/modules/settings/deployment-settings.service.d.ts +34 -7
- package/dist/modules/settings/deployment-settings.service.d.ts.map +1 -1
- package/dist/modules/settings/deployment-settings.service.js +148 -54
- package/dist/modules/settings/deployment-settings.service.js.map +1 -1
- package/dist/modules/settings/repository-source.d.ts +1 -0
- package/dist/modules/settings/repository-source.d.ts.map +1 -1
- package/dist/modules/settings/repository-source.js +3 -3
- package/dist/modules/settings/repository-source.js.map +1 -1
- package/dist/modules/settings/setup.routes.d.ts.map +1 -1
- package/dist/modules/settings/setup.routes.js +3 -6
- package/dist/modules/settings/setup.routes.js.map +1 -1
- package/dist/modules/skills/skills.tools.d.ts.map +1 -1
- package/dist/modules/skills/skills.tools.js +103 -43
- package/dist/modules/skills/skills.tools.js.map +1 -1
- package/dist/modules/tool-auth/connection-key-rejection.d.ts +10 -1
- package/dist/modules/tool-auth/connection-key-rejection.d.ts.map +1 -1
- package/dist/modules/tool-auth/connection-key-rejection.js +11 -3
- package/dist/modules/tool-auth/connection-key-rejection.js.map +1 -1
- package/dist/modules/tool-auth/external-api-key.interface.d.ts +8 -0
- package/dist/modules/tool-auth/external-api-key.interface.d.ts.map +1 -1
- package/dist/modules/tool-auth/external-api-key.service.d.ts +24 -2
- package/dist/modules/tool-auth/external-api-key.service.d.ts.map +1 -1
- package/dist/modules/tool-auth/external-api-key.service.js +59 -2
- package/dist/modules/tool-auth/external-api-key.service.js.map +1 -1
- package/dist/modules/tool-auth/tool-auth.middleware.d.ts.map +1 -1
- package/dist/modules/tool-auth/tool-auth.middleware.js +9 -4
- package/dist/modules/tool-auth/tool-auth.middleware.js.map +1 -1
- package/dist/modules/tool-helpers/index.d.ts +28 -1
- package/dist/modules/tool-helpers/index.d.ts.map +1 -1
- package/dist/modules/tool-helpers/index.js +28 -1
- package/dist/modules/tool-helpers/index.js.map +1 -1
- package/dist/modules/tool-helpers/route-argument-check.d.ts +10 -0
- package/dist/modules/tool-helpers/route-argument-check.d.ts.map +1 -0
- package/dist/modules/tool-helpers/route-argument-check.js +132 -0
- package/dist/modules/tool-helpers/route-argument-check.js.map +1 -0
- package/dist/modules/tool-helpers/route-tool-schemas.d.ts +89 -0
- package/dist/modules/tool-helpers/route-tool-schemas.d.ts.map +1 -0
- package/dist/modules/tool-helpers/route-tool-schemas.js +113 -0
- package/dist/modules/tool-helpers/route-tool-schemas.js.map +1 -0
- package/dist/modules/tool-helpers/tool-def.d.ts +71 -0
- package/dist/modules/tool-helpers/tool-def.d.ts.map +1 -1
- package/dist/modules/tool-helpers/tool-def.js +70 -6
- package/dist/modules/tool-helpers/tool-def.js.map +1 -1
- package/dist/modules/tool-helpers/tool-handler.d.ts +46 -6
- package/dist/modules/tool-helpers/tool-handler.d.ts.map +1 -1
- package/dist/modules/tool-helpers/tool-handler.js +157 -8
- package/dist/modules/tool-helpers/tool-handler.js.map +1 -1
- package/dist/modules/tool-helpers/tool.contract.d.ts +9 -0
- 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-manuals/tool-manuals.contract.d.ts +23 -4
- package/dist/modules/tool-manuals/tool-manuals.contract.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.contract.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts +4 -0
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.js +14 -0
- package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.tools.d.ts +7 -0
- package/dist/modules/tool-manuals/tool-manuals.tools.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.tools.js +77 -38
- package/dist/modules/tool-manuals/tool-manuals.tools.js.map +1 -1
- package/dist/modules/tool-registry/description-length.d.ts +20 -16
- package/dist/modules/tool-registry/description-length.d.ts.map +1 -1
- package/dist/modules/tool-registry/description-length.js +50 -30
- package/dist/modules/tool-registry/description-length.js.map +1 -1
- package/dist/modules/tool-registry/guide-first.d.ts +27 -0
- package/dist/modules/tool-registry/guide-first.d.ts.map +1 -0
- package/dist/modules/tool-registry/guide-first.js +40 -0
- package/dist/modules/tool-registry/guide-first.js.map +1 -0
- package/dist/modules/tool-registry/tool-registry.d.ts +6 -0
- package/dist/modules/tool-registry/tool-registry.d.ts.map +1 -1
- package/dist/modules/tool-registry/tool-registry.js +9 -2
- package/dist/modules/tool-registry/tool-registry.js.map +1 -1
- package/dist/modules/workflow/agent-tools/change-request-read-shape.d.ts +449 -0
- package/dist/modules/workflow/agent-tools/change-request-read-shape.d.ts.map +1 -0
- package/dist/modules/workflow/agent-tools/change-request-read-shape.js +481 -0
- package/dist/modules/workflow/agent-tools/change-request-read-shape.js.map +1 -0
- package/dist/modules/workflow/agent-tools/change-request-read.tools.d.ts +126 -0
- package/dist/modules/workflow/agent-tools/change-request-read.tools.d.ts.map +1 -0
- package/dist/modules/workflow/agent-tools/change-request-read.tools.js +611 -0
- package/dist/modules/workflow/agent-tools/change-request-read.tools.js.map +1 -0
- package/dist/modules/workflow/agent-tools/change-request-summary.d.ts +12 -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 +5 -1
- package/dist/modules/workflow/agent-tools/change-request-summary.js.map +1 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.d.ts +8 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.d.ts.map +1 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.js +133 -37
- package/dist/modules/workflow/agent-tools/workflow.tools.js.map +1 -1
- package/dist/modules/workflow/file-lock.service.d.ts +29 -5
- package/dist/modules/workflow/file-lock.service.d.ts.map +1 -1
- package/dist/modules/workflow/file-lock.service.js +62 -5
- package/dist/modules/workflow/file-lock.service.js.map +1 -1
- package/dist/modules/workflow/git/git.service.d.ts +282 -14
- package/dist/modules/workflow/git/git.service.d.ts.map +1 -1
- package/dist/modules/workflow/git/git.service.js +627 -126
- package/dist/modules/workflow/git/git.service.js.map +1 -1
- package/dist/modules/workflow/git/merge-commit.d.ts +73 -0
- package/dist/modules/workflow/git/merge-commit.d.ts.map +1 -0
- package/dist/modules/workflow/git/merge-commit.js +89 -0
- package/dist/modules/workflow/git/merge-commit.js.map +1 -0
- package/dist/modules/workflow/git/node-git-runner.d.ts +15 -0
- package/dist/modules/workflow/git/node-git-runner.d.ts.map +1 -1
- package/dist/modules/workflow/git/node-git-runner.js +78 -6
- package/dist/modules/workflow/git/node-git-runner.js.map +1 -1
- package/dist/modules/workflow/git/pull-request.service.d.ts +94 -1
- package/dist/modules/workflow/git/pull-request.service.d.ts.map +1 -1
- package/dist/modules/workflow/git/pull-request.service.js +332 -37
- package/dist/modules/workflow/git/pull-request.service.js.map +1 -1
- package/dist/modules/workflow/pending-commits.service.d.ts +15 -0
- package/dist/modules/workflow/pending-commits.service.d.ts.map +1 -1
- package/dist/modules/workflow/pending-commits.service.js +25 -1
- package/dist/modules/workflow/pending-commits.service.js.map +1 -1
- package/dist/modules/workflow/pending-commits.worker.d.ts +6 -1
- package/dist/modules/workflow/pending-commits.worker.d.ts.map +1 -1
- package/dist/modules/workflow/pending-commits.worker.js +23 -6
- package/dist/modules/workflow/pending-commits.worker.js.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/review-workflow.service.d.ts +35 -0
- package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts.map +1 -1
- package/dist/modules/workflow/review-workflow/review-workflow.service.js +180 -13
- package/dist/modules/workflow/review-workflow/review-workflow.service.js.map +1 -1
- package/dist/modules/workflow/sanitize-error.d.ts +16 -0
- package/dist/modules/workflow/sanitize-error.d.ts.map +1 -1
- package/dist/modules/workflow/sanitize-error.js +45 -0
- package/dist/modules/workflow/sanitize-error.js.map +1 -1
- package/dist/modules/workflow/workflow.routes.d.ts +6 -2
- package/dist/modules/workflow/workflow.routes.d.ts.map +1 -1
- package/dist/modules/workflow/workflow.routes.js +7 -2
- package/dist/modules/workflow/workflow.routes.js.map +1 -1
- package/dist/modules/workflow/workflow.service.d.ts +187 -15
- package/dist/modules/workflow/workflow.service.d.ts.map +1 -1
- package/dist/modules/workflow/workflow.service.js +808 -106
- package/dist/modules/workflow/workflow.service.js.map +1 -1
- package/dist/modules/workspace/agent-download.builder.d.ts +105 -0
- package/dist/modules/workspace/agent-download.builder.d.ts.map +1 -0
- package/dist/modules/workspace/agent-download.builder.js +238 -0
- package/dist/modules/workspace/agent-download.builder.js.map +1 -0
- package/dist/modules/workspace/agent-download.routes.d.ts +77 -0
- package/dist/modules/workspace/agent-download.routes.d.ts.map +1 -0
- package/dist/modules/workspace/agent-download.routes.js +156 -0
- package/dist/modules/workspace/agent-download.routes.js.map +1 -0
- package/dist/modules/workspace/agent-download.store.d.ts +225 -0
- package/dist/modules/workspace/agent-download.store.d.ts.map +1 -0
- package/dist/modules/workspace/agent-download.store.js +423 -0
- package/dist/modules/workspace/agent-download.store.js.map +1 -0
- package/dist/modules/workspace/agent-upload.store.d.ts +10 -1
- package/dist/modules/workspace/agent-upload.store.d.ts.map +1 -1
- package/dist/modules/workspace/agent-upload.store.js +16 -6
- package/dist/modules/workspace/agent-upload.store.js.map +1 -1
- package/dist/modules/workspace/file-readers/raw-mime.d.ts +6 -0
- package/dist/modules/workspace/file-readers/raw-mime.d.ts.map +1 -0
- package/dist/modules/workspace/file-readers/raw-mime.js +38 -0
- package/dist/modules/workspace/file-readers/raw-mime.js.map +1 -0
- package/dist/modules/workspace/file-readers/text-reader.d.ts +5 -5
- package/dist/modules/workspace/file-readers/text-reader.d.ts.map +1 -1
- package/dist/modules/workspace/file-readers/text-reader.js +5 -8
- package/dist/modules/workspace/file-readers/text-reader.js.map +1 -1
- package/dist/modules/workspace/first-run.d.ts +111 -0
- package/dist/modules/workspace/first-run.d.ts.map +1 -0
- package/dist/modules/workspace/first-run.js +181 -0
- package/dist/modules/workspace/first-run.js.map +1 -0
- package/dist/modules/workspace/move-links.d.ts +92 -0
- package/dist/modules/workspace/move-links.d.ts.map +1 -0
- package/dist/modules/workspace/move-links.js +173 -0
- package/dist/modules/workspace/move-links.js.map +1 -0
- package/dist/modules/workspace/startup/steps/seed-tree.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/seed-tree.js +24 -39
- package/dist/modules/workspace/startup/steps/seed-tree.js.map +1 -1
- package/dist/modules/workspace/startup/steps/template-files.step.d.ts +58 -52
- package/dist/modules/workspace/startup/steps/template-files.step.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/template-files.step.js +209 -223
- package/dist/modules/workspace/startup/steps/template-files.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/template-source.d.ts +5 -3
- package/dist/modules/workspace/startup/steps/template-source.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/template-source.js +5 -3
- package/dist/modules/workspace/startup/steps/template-source.js.map +1 -1
- package/dist/modules/workspace/workspace.routes.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.routes.js +63 -22
- package/dist/modules/workspace/workspace.routes.js.map +1 -1
- package/dist/modules/workspace/workspace.service.d.ts +75 -2
- package/dist/modules/workspace/workspace.service.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.service.js +197 -24
- package/dist/modules/workspace/workspace.service.js.map +1 -1
- package/dist/modules/workspace/workspace.tools.d.ts +68 -1
- package/dist/modules/workspace/workspace.tools.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.tools.js +642 -71
- package/dist/modules/workspace/workspace.tools.js.map +1 -1
- package/dist/modules/write-access/write-access.d.ts.map +1 -1
- package/dist/modules/write-access/write-access.js +9 -0
- package/dist/modules/write-access/write-access.js.map +1 -1
- package/dist/shared/domain-errors.d.ts +84 -1
- package/dist/shared/domain-errors.d.ts.map +1 -1
- package/dist/shared/domain-errors.js +100 -12
- package/dist/shared/domain-errors.js.map +1 -1
- package/dist/shared/git.contract.d.ts +10 -1
- package/dist/shared/git.contract.d.ts.map +1 -1
- package/dist/shared/git.contract.js.map +1 -1
- package/dist/shared/hidden-tools.d.ts +44 -0
- package/dist/shared/hidden-tools.d.ts.map +1 -0
- package/dist/shared/hidden-tools.js +13 -0
- package/dist/shared/hidden-tools.js.map +1 -0
- package/dist/shared/utf8-text.d.ts +15 -0
- package/dist/shared/utf8-text.d.ts.map +1 -0
- package/dist/shared/utf8-text.js +20 -0
- package/dist/shared/utf8-text.js.map +1 -0
- package/dist/tenancy/static-tenant-source.d.ts +2 -1
- package/dist/tenancy/static-tenant-source.d.ts.map +1 -1
- package/dist/tenancy/static-tenant-source.js +9 -2
- package/dist/tenancy/static-tenant-source.js.map +1 -1
- package/kb-template/.bevelignore +0 -5
- package/mcp-app/page.html +349 -0
- package/migrations/0017_atlassian_account_links.sql +37 -0
- package/migrations/meta/0017_snapshot.json +2396 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +6 -3
- package/src/__tests__/kb-layout-config.test.ts +10 -100
- package/src/__tests__/packaged-assets-ship.test.ts +66 -0
- package/src/assets.ts +38 -2
- package/src/core/__tests__/catalog-revision.test.ts +40 -0
- package/src/core/__tests__/gated-boot.test.ts +1 -0
- package/src/core/__tests__/lifecycle.test.ts +14 -0
- package/src/core/catalog-revision.ts +15 -2
- package/src/core/core-ports.ts +11 -0
- package/src/core/create-core-server.ts +78 -3
- package/src/core/create-core-services.ts +168 -10
- package/src/core/lifecycle.ts +28 -2
- package/src/core-config.ts +24 -1
- package/src/index.ts +2 -2
- package/src/modules/access/__tests__/access-control.atref-batch.test.ts +58 -0
- package/src/modules/access/__tests__/access-control.platform-restore.test.ts +8 -7
- package/src/modules/access/__tests__/access-control.service.test.ts +19 -0
- package/src/modules/access/__tests__/access-personal-plugin.test.ts +1 -18
- package/src/modules/access/access-control.interface.ts +28 -0
- package/src/modules/access/access-control.service.ts +37 -0
- package/src/modules/access/directory-sync-bot.ts +1 -1
- package/src/modules/agent-guide/__tests__/agent-guide.test.ts +386 -0
- package/src/modules/agent-guide/__tests__/agent-guide.tools.test.ts +207 -0
- package/src/modules/agent-guide/agent-guide.tools.ts +122 -0
- package/src/modules/agent-guide/agent-guide.ts +300 -0
- package/src/modules/agent-guide/index.ts +22 -0
- package/src/modules/agent-instructions/__tests__/shared-file-rules.test.ts +39 -118
- package/src/modules/agent-instructions/agent-instructions.routes.ts +3 -2
- package/src/modules/agent-instructions/compose.ts +26 -8
- package/src/modules/agent-instructions/index.ts +0 -3
- package/src/modules/agent-instructions/shared-file-rules.ts +50 -112
- package/src/modules/audit/__tests__/agent-audit.service.test.ts +64 -4
- package/src/modules/audit/__tests__/agent-connection.routes.test.ts +102 -0
- package/src/modules/audit/agent-audit.service.ts +58 -3
- package/src/modules/audit/agent-connection.routes.ts +56 -0
- package/src/modules/audit/audit.contract.ts +26 -0
- package/src/modules/audit/index.ts +1 -0
- package/src/modules/auth/__tests__/account.routes.test.ts +5 -3
- package/src/modules/auth/account.routes.ts +10 -3
- package/src/modules/auth/auth.middleware.ts +1 -1
- package/src/modules/code-mode/__tests__/code-mode.tool.test.ts +18 -2
- package/src/modules/code-mode/code-mode.tool.ts +13 -2
- package/src/modules/database/core-schema.ts +33 -3
- package/src/modules/embed/__tests__/account-links.migration.test.ts +98 -0
- package/src/modules/embed/__tests__/embed-link.test.ts +122 -0
- package/src/modules/embed/__tests__/embed.routes.test.ts +362 -0
- package/src/modules/embed/__tests__/embed.service.lock.test.ts +193 -0
- package/src/modules/embed/__tests__/embed.service.test.ts +805 -0
- package/src/modules/embed/__tests__/embed.tools.test.ts +304 -0
- package/src/modules/embed/__tests__/mcp-app.test.ts +207 -0
- package/src/modules/embed/account-link.service.ts +76 -0
- package/src/modules/embed/embed-link.ts +180 -0
- package/src/modules/embed/embed.errors.ts +43 -0
- package/src/modules/embed/embed.interface.ts +203 -0
- package/src/modules/embed/embed.routes.ts +363 -0
- package/src/modules/embed/embed.service.ts +705 -0
- package/src/modules/embed/embed.tools.ts +206 -0
- package/src/modules/embed/mcp-app.routes.ts +41 -0
- package/src/modules/embed/mcp-app.ts +173 -0
- package/src/modules/github-app/__tests__/github-app.test.ts +76 -0
- package/src/modules/github-app/github-app.connection.ts +38 -4
- package/src/modules/kb-fs/__tests__/move-with-edits.test.ts +304 -0
- package/src/modules/kb-fs/locking-filesystem.ts +287 -0
- package/src/modules/kb-sync/__tests__/kb-sync.service.test.ts +35 -0
- package/src/modules/kb-sync/kb-sync.interface.ts +2 -0
- package/src/modules/kb-sync/kb-sync.service.ts +6 -0
- package/src/modules/mcp/__tests__/bevel-oauth-provider.test.ts +68 -11
- package/src/modules/mcp/__tests__/fake-downstream-mcp-server.ts +14 -3
- package/src/modules/mcp/__tests__/mcp-proxy-helpers.test.ts +37 -2
- package/src/modules/mcp/__tests__/mcp.app.e2e.test.ts +200 -0
- package/src/modules/mcp/__tests__/mcp.e2e.test.ts +252 -0
- package/src/modules/mcp/__tests__/mcp.service.test.ts +42 -24
- package/src/modules/mcp/__tests__/tool-call-interface.e2e.test.ts +499 -0
- package/src/modules/mcp/__tests__/tool-schema-guard.test.ts +266 -0
- package/src/modules/mcp/mcp-auth.middleware.ts +2 -1
- package/src/modules/mcp/mcp.service.ts +218 -31
- package/src/modules/mcp/oauth/bevel-oauth-provider.ts +42 -4
- package/src/modules/mcp/tool-schema-guard.ts +196 -0
- package/src/modules/onboarding/__tests__/onboarding.routes.test.ts +163 -0
- package/src/modules/onboarding/__tests__/starter-pack.service.test.ts +635 -0
- package/src/modules/onboarding/__tests__/starter-packs.test.ts +169 -0
- package/src/modules/onboarding/onboarding.contract.ts +85 -0
- package/src/modules/onboarding/onboarding.routes.ts +85 -0
- package/src/modules/onboarding/starter-pack.service.ts +580 -0
- package/src/modules/onboarding/starter-packs.ts +182 -0
- package/src/modules/plugins/__tests__/plugins.tools.test.ts +177 -4
- package/src/modules/plugins/index.ts +1 -0
- package/src/modules/plugins/plugin-provision.service.ts +22 -1
- package/src/modules/plugins/plugins.routes.ts +29 -0
- package/src/modules/plugins/plugins.tools.ts +75 -15
- package/src/modules/settings/__tests__/deployment-settings.service.test.ts +176 -56
- package/src/modules/settings/__tests__/repository-source.test.ts +9 -0
- package/src/modules/settings/deployment-settings.service.ts +144 -55
- package/src/modules/settings/repository-source.ts +4 -4
- package/src/modules/settings/setup.routes.ts +3 -6
- package/src/modules/skills/__tests__/skills.tools.description.test.ts +95 -0
- package/src/modules/skills/skills.tools.ts +112 -46
- package/src/modules/tool-auth/__tests__/connection-key-rejection.test.ts +32 -0
- package/src/modules/tool-auth/__tests__/external-api-key.service.test.ts +65 -0
- package/src/modules/tool-auth/connection-key-rejection.ts +13 -3
- package/src/modules/tool-auth/external-api-key.interface.ts +9 -0
- package/src/modules/tool-auth/external-api-key.service.ts +61 -4
- package/src/modules/tool-auth/tool-auth.middleware.ts +13 -4
- package/src/modules/tool-helpers/__tests__/branch-declaration.test.ts +502 -0
- package/src/modules/tool-helpers/__tests__/route-argument-check.test.ts +337 -0
- package/src/modules/tool-helpers/index.ts +34 -1
- package/src/modules/tool-helpers/route-argument-check.ts +149 -0
- package/src/modules/tool-helpers/route-tool-schemas.ts +171 -0
- package/src/modules/tool-helpers/tool-def.ts +132 -7
- package/src/modules/tool-helpers/tool-handler.ts +196 -8
- package/src/modules/tool-helpers/tool.contract.ts +9 -0
- package/src/modules/tool-manuals/__tests__/tool-manuals.detail.route.test.ts +57 -0
- package/src/modules/tool-manuals/__tests__/tool-manuals.tools.test.ts +73 -4
- package/src/modules/tool-manuals/tool-manuals.contract.ts +24 -4
- package/src/modules/tool-manuals/tool-manuals.service.ts +17 -0
- package/src/modules/tool-manuals/tool-manuals.tools.ts +86 -38
- package/src/modules/tool-registry/__tests__/own-tool-schemas.test.ts +173 -0
- package/src/modules/tool-registry/__tests__/tool-description-length.test.ts +81 -66
- package/src/modules/tool-registry/description-length.ts +57 -32
- package/src/modules/tool-registry/guide-first.ts +41 -0
- package/src/modules/tool-registry/tool-registry.ts +9 -2
- package/src/modules/workflow/__tests__/apply-failure.test.ts +6 -1
- package/src/modules/workflow/__tests__/file-lock.service.deletion-gate.test.ts +104 -0
- package/src/modules/workflow/__tests__/pending-commits.repository-replaced.test.ts +66 -0
- package/src/modules/workflow/__tests__/pending-commits.worker.test.ts +31 -2
- package/src/modules/workflow/__tests__/preserve-roles-yaml.test.ts +110 -6
- package/src/modules/workflow/__tests__/sanitize-error.test.ts +89 -1
- package/src/modules/workflow/__tests__/workflow.routes.push-refused.test.ts +202 -0
- package/src/modules/workflow/__tests__/workflow.service.branch-in-use.test.ts +6 -6
- package/src/modules/workflow/__tests__/workflow.service.delete-branch.test.ts +1026 -0
- package/src/modules/workflow/__tests__/workflow.service.facade.test.ts +468 -10
- package/src/modules/workflow/__tests__/workflow.service.folder-proposals.test.ts +4 -0
- package/src/modules/workflow/__tests__/workflow.service.releaseLock.test.ts +5 -4
- package/src/modules/workflow/__tests__/workflow.service.update-from-target.test.ts +54 -2
- package/src/modules/workflow/agent-tools/__tests__/change-request-read-shape.test.ts +705 -0
- package/src/modules/workflow/agent-tools/__tests__/change-request-read.tools.test.ts +1554 -0
- package/src/modules/workflow/agent-tools/__tests__/workflow.tools.test.ts +150 -4
- package/src/modules/workflow/agent-tools/change-request-read-shape.ts +712 -0
- package/src/modules/workflow/agent-tools/change-request-read.tools.ts +759 -0
- package/src/modules/workflow/agent-tools/change-request-summary.ts +5 -1
- package/src/modules/workflow/agent-tools/workflow.tools.ts +137 -35
- package/src/modules/workflow/file-lock.service.ts +67 -5
- package/src/modules/workflow/git/__tests__/git.service.appliedChange.test.ts +285 -0
- package/src/modules/workflow/git/__tests__/git.service.changedFilesForPr.test.ts +124 -0
- package/src/modules/workflow/git/__tests__/git.service.deleteBranch.test.ts +164 -0
- package/src/modules/workflow/git/__tests__/git.service.mergeChangeRequest.test.ts +334 -0
- package/src/modules/workflow/git/__tests__/git.service.pull.test.ts +48 -1
- package/src/modules/workflow/git/__tests__/node-git-runner.test.ts +231 -2
- package/src/modules/workflow/git/__tests__/pull-request.service.list-fetch.test.ts +72 -2
- package/src/modules/workflow/git/__tests__/pull-request.service.placeholder.test.ts +24 -2
- package/src/modules/workflow/git/__tests__/pull-request.service.test.ts +620 -1
- package/src/modules/workflow/git/git.service.ts +714 -133
- package/src/modules/workflow/git/merge-commit.ts +88 -0
- package/src/modules/workflow/git/node-git-runner.ts +82 -7
- package/src/modules/workflow/git/pull-request.service.ts +380 -54
- package/src/modules/workflow/pending-commits.service.ts +29 -1
- package/src/modules/workflow/pending-commits.worker.ts +24 -6
- package/src/modules/workflow/recovery-bot.ts +1 -1
- package/src/modules/workflow/review-workflow/__tests__/approval-states.test.ts +7 -1
- package/src/modules/workflow/review-workflow/__tests__/merge-records-own-commit.test.ts +407 -0
- package/src/modules/workflow/review-workflow/review-workflow.service.ts +191 -12
- package/src/modules/workflow/sanitize-error.ts +50 -0
- package/src/modules/workflow/workflow.routes.ts +7 -2
- package/src/modules/workflow/workflow.service.ts +886 -112
- package/src/modules/workspace/__tests__/agent-downloads.test.ts +823 -0
- package/src/modules/workspace/__tests__/escape-sequences.routes.test.ts +4 -3
- package/src/modules/workspace/__tests__/first-run.test.ts +234 -0
- package/src/modules/workspace/__tests__/git-internals.security.test.ts +5 -2
- package/src/modules/workspace/__tests__/md-links.test.ts +353 -0
- package/src/modules/workspace/__tests__/move-links.test.ts +261 -0
- package/src/modules/workspace/__tests__/rest-tool-arguments.test.ts +219 -0
- package/src/modules/workspace/__tests__/workspace-paths-inside-the-repo.test.ts +3 -0
- package/src/modules/workspace/__tests__/workspace.routes.delete.test.ts +102 -0
- package/src/modules/workspace/__tests__/workspace.routes.download.test.ts +52 -5
- package/src/modules/workspace/__tests__/workspace.routes.folder-zip-access.test.ts +190 -0
- package/src/modules/workspace/__tests__/workspace.routes.move-platform-files.test.ts +21 -10
- package/src/modules/workspace/__tests__/workspace.service.forget-clone-races.test.ts +8 -4
- package/src/modules/workspace/__tests__/workspace.service.test.ts +50 -8
- package/src/modules/workspace/__tests__/workspace.tools.agents-file.test.ts +33 -55
- package/src/modules/workspace/__tests__/workspace.tools.branch-errors.test.ts +44 -1
- package/src/modules/workspace/__tests__/workspace.tools.test.ts +664 -34
- package/src/modules/workspace/agent-download.builder.ts +308 -0
- package/src/modules/workspace/agent-download.routes.ts +183 -0
- package/src/modules/workspace/agent-download.store.ts +533 -0
- package/src/modules/workspace/agent-upload.store.ts +23 -7
- package/src/modules/workspace/file-readers/raw-mime.ts +40 -0
- package/src/modules/workspace/file-readers/text-reader.ts +5 -8
- package/src/modules/workspace/first-run.ts +222 -0
- package/src/modules/workspace/move-links.ts +237 -0
- package/src/modules/workspace/startup/steps/__tests__/steps.test.ts +191 -489
- package/src/modules/workspace/startup/steps/seed-tree.ts +23 -38
- package/src/modules/workspace/startup/steps/template-files.step.ts +217 -249
- package/src/modules/workspace/startup/steps/template-source.ts +5 -3
- package/src/modules/workspace/workspace.routes.ts +64 -22
- package/src/modules/workspace/workspace.service.ts +202 -25
- package/src/modules/workspace/workspace.tools.ts +707 -68
- package/src/modules/write-access/__tests__/write-access.test.ts +13 -0
- package/src/modules/write-access/write-access.ts +9 -0
- package/src/shared/domain-errors.ts +123 -11
- package/src/shared/git.contract.ts +8 -1
- package/src/shared/hidden-tools.ts +45 -0
- package/src/shared/utf8-text.ts +21 -0
- package/src/tenancy/__tests__/static-tenant-source.test.ts +1 -0
- package/src/tenancy/static-tenant-source.ts +10 -2
- package/starter-packs/README.md +103 -0
- package/starter-packs/engineering/KnowledgeBase/About us.md +9 -0
- package/starter-packs/engineering/KnowledgeBase/Architecture.md +9 -0
- package/starter-packs/engineering/KnowledgeBase/Glossary.md +9 -0
- package/starter-packs/engineering/KnowledgeBase/How we ship.md +9 -0
- package/starter-packs/engineering/Plugins/engineering-starter/LICENSE +21 -0
- package/starter-packs/engineering/Plugins/engineering-starter/SOURCE.md +20 -0
- package/starter-packs/engineering/Plugins/engineering-starter/access.md +19 -0
- package/starter-packs/engineering/Plugins/engineering-starter/plugin.json +10 -0
- package/starter-packs/engineering/Plugins/engineering-starter/skills/office-hours/SKILL.md +171 -0
- package/starter-packs/engineering/Plugins/engineering-starter/skills/office-hours/sections/phase-2a-startup-diagnostic.md +157 -0
- package/starter-packs/engineering/Plugins/engineering-starter/skills/office-hours/sections/phase-2b-builder-brainstorm.md +39 -0
- package/starter-packs/engineering/Plugins/engineering-starter/skills/plan-ceo-review/SKILL.md +144 -0
- package/starter-packs/engineering/Plugins/engineering-starter/skills/plan-eng-review/SKILL.md +144 -0
- package/starter-packs/engineering/Plugins/engineering-starter/skills/review/SKILL.md +80 -0
- package/starter-packs/engineering/Plugins/engineering-starter/skills/review/checklist.md +184 -0
- package/starter-packs/engineering/pack.yaml +11 -0
- package/starter-packs/general/KnowledgeBase/About us.md +9 -0
- package/starter-packs/general/KnowledgeBase/Glossary.md +9 -0
- package/starter-packs/general/KnowledgeBase/How we work.md +9 -0
- package/starter-packs/general/Plugins/general-starter/LICENSE +202 -0
- package/starter-packs/general/Plugins/general-starter/SOURCE.md +10 -0
- package/starter-packs/general/Plugins/general-starter/access.md +19 -0
- package/starter-packs/general/Plugins/general-starter/plugin.json +10 -0
- package/starter-packs/general/Plugins/general-starter/skills/memory-management/SKILL.md +332 -0
- package/starter-packs/general/Plugins/general-starter/skills/productivity-start/SKILL.md +163 -0
- package/starter-packs/general/Plugins/general-starter/skills/productivity-update/SKILL.md +167 -0
- package/starter-packs/general/Plugins/general-starter/skills/task-management/SKILL.md +83 -0
- package/starter-packs/general/pack.yaml +10 -0
- package/starter-packs/operations/KnowledgeBase/Glossary.md +9 -0
- package/starter-packs/operations/KnowledgeBase/How we work.md +9 -0
- package/starter-packs/operations/KnowledgeBase/Processes.md +9 -0
- package/starter-packs/operations/KnowledgeBase/Tools we use.md +9 -0
- package/starter-packs/operations/KnowledgeBase/Vendors.md +9 -0
- package/starter-packs/operations/Plugins/operations-starter/LICENSE +202 -0
- package/starter-packs/operations/Plugins/operations-starter/SOURCE.md +10 -0
- package/starter-packs/operations/Plugins/operations-starter/access.md +19 -0
- package/starter-packs/operations/Plugins/operations-starter/plugin.json +10 -0
- package/starter-packs/operations/Plugins/operations-starter/skills/capacity-plan/SKILL.md +111 -0
- package/starter-packs/operations/Plugins/operations-starter/skills/change-request/SKILL.md +119 -0
- package/starter-packs/operations/Plugins/operations-starter/skills/compliance-tracking/SKILL.md +44 -0
- package/starter-packs/operations/Plugins/operations-starter/skills/process-doc/SKILL.md +80 -0
- package/starter-packs/operations/Plugins/operations-starter/skills/process-optimization/SKILL.md +39 -0
- package/starter-packs/operations/Plugins/operations-starter/skills/risk-assessment/SKILL.md +40 -0
- package/starter-packs/operations/Plugins/operations-starter/skills/runbook/SKILL.md +85 -0
- package/starter-packs/operations/Plugins/operations-starter/skills/status-report/SKILL.md +75 -0
- package/starter-packs/operations/Plugins/operations-starter/skills/vendor-review/SKILL.md +102 -0
- package/starter-packs/operations/pack.yaml +12 -0
- package/starter-packs/sales/KnowledgeBase/About us.md +9 -0
- package/starter-packs/sales/KnowledgeBase/Customers.md +9 -0
- package/starter-packs/sales/KnowledgeBase/Glossary.md +9 -0
- package/starter-packs/sales/KnowledgeBase/How we sell.md +9 -0
- package/starter-packs/sales/KnowledgeBase/Objections.md +9 -0
- package/starter-packs/sales/KnowledgeBase/Pricing.md +9 -0
- package/starter-packs/sales/Plugins/sales-starter/LICENSE +202 -0
- package/starter-packs/sales/Plugins/sales-starter/SOURCE.md +10 -0
- package/starter-packs/sales/Plugins/sales-starter/access.md +19 -0
- package/starter-packs/sales/Plugins/sales-starter/plugin.json +10 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/account-context/SKILL.md +94 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/account-plan/SKILL.md +95 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/account-research/SKILL.md +99 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/account-tiering/SKILL.md +101 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/call-prep/SKILL.md +111 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/call-summary/SKILL.md +111 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/close-plan/SKILL.md +106 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/competitive-intelligence/SKILL.md +102 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/create-an-asset/SKILL.md +105 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/crm-hygiene-check/SKILL.md +103 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/customer-health/SKILL.md +108 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/customer-voice/SKILL.md +94 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/daily-briefing/SKILL.md +61 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/deal-advance-gap/SKILL.md +102 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/deal-review/SKILL.md +105 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/deal-signals/SKILL.md +96 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/deal-slip-scenario/SKILL.md +104 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/draft-outreach/SKILL.md +116 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/end-of-day/SKILL.md +114 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/expansion-whitespace/SKILL.md +97 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/forecast/SKILL.md +100 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/handle-objection/SKILL.md +93 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/inbox-sweep/SKILL.md +114 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/lead-triage/SKILL.md +106 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/log-activity/SKILL.md +111 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/pipeline-review/SKILL.md +97 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/renewal-radar/SKILL.md +95 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/rep-context/SKILL.md +90 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/route-lead/SKILL.md +111 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/sales-setup/SKILL.md +200 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/schedule-meeting/SKILL.md +99 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/stakeholder-map/SKILL.md +107 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/team-pipeline/SKILL.md +105 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/update-opportunity/SKILL.md +112 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/weekly-wrap/SKILL.md +90 -0
- package/starter-packs/sales/Plugins/sales-starter/skills/win-loss-review/SKILL.md +88 -0
- package/starter-packs/sales/pack.yaml +13 -0
- package/starter-packs/support/KnowledgeBase/Escalations.md +9 -0
- package/starter-packs/support/KnowledgeBase/Glossary.md +9 -0
- package/starter-packs/support/KnowledgeBase/Known issues.md +9 -0
- package/starter-packs/support/KnowledgeBase/Products.md +9 -0
- package/starter-packs/support/KnowledgeBase/Tone of voice.md +9 -0
- package/starter-packs/support/Plugins/support-starter/LICENSE +202 -0
- package/starter-packs/support/Plugins/support-starter/SOURCE.md +10 -0
- package/starter-packs/support/Plugins/support-starter/access.md +19 -0
- package/starter-packs/support/Plugins/support-starter/plugin.json +10 -0
- package/starter-packs/support/Plugins/support-starter/skills/customer-escalation/SKILL.md +246 -0
- package/starter-packs/support/Plugins/support-starter/skills/customer-research/SKILL.md +250 -0
- package/starter-packs/support/Plugins/support-starter/skills/draft-response/SKILL.md +416 -0
- package/starter-packs/support/Plugins/support-starter/skills/kb-article/SKILL.md +350 -0
- package/starter-packs/support/Plugins/support-starter/skills/ticket-triage/SKILL.md +273 -0
- package/starter-packs/support/pack.yaml +12 -0
- package/kb-template/AGENTS.md +0 -730
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mapping from Hexis's change-request types to the shapes the five agent
|
|
3
|
+
* read tools answer in.
|
|
4
|
+
*
|
|
5
|
+
* The tools are named and shaped after GitHub's pull-request API — one tool per
|
|
6
|
+
* GitHub endpoint, the same filters, the same paging — but they SPEAK HEXIS
|
|
7
|
+
* (decision by Razvan, 2026-10-02, on the review of PR #347). An agent opens a
|
|
8
|
+
* change request with `open_change_request` and reads it back with these five;
|
|
9
|
+
* answering the first in Hexis's words and the second in GitHub's would make
|
|
10
|
+
* one request two vocabularies. So every field these answers share with
|
|
11
|
+
* `open_change_request`'s summary takes that summary's name — `url`, `number`,
|
|
12
|
+
* `title`, `state`, `sourceBranch`, `targetBranch`, `approvals`,
|
|
13
|
+
* `mergeBlockedReasons`, `files[].path`, `files[].change` — and the rest follow
|
|
14
|
+
* the same style (camelCase, Hexis's own words for Hexis's own facts).
|
|
15
|
+
*
|
|
16
|
+
* What that changed, against GitHub, and why each is the better answer here:
|
|
17
|
+
*
|
|
18
|
+
* - **State is Hexis's own.** GitHub has two states and a `merged` flag;
|
|
19
|
+
* Hexis has three — `open`, `merged`, `closed` — and reports them. A merged
|
|
20
|
+
* request is `state: "merged"`, not `closed` with `merged: true`: the flag
|
|
21
|
+
* exists on GitHub only because its model has nowhere else to put the fact,
|
|
22
|
+
* and an agent reading `state` should not have to read a second field to
|
|
23
|
+
* learn whether the change landed.
|
|
24
|
+
* - **One name per path.** GitHub names a pull-request file's path `filename`
|
|
25
|
+
* and a review comment's `path`; mirroring that inconsistency was the point
|
|
26
|
+
* while these tools wore GitHub's names, and is now just a trap. Every path
|
|
27
|
+
* in every answer is `path`, and a moved file's old name is `previousPath`,
|
|
28
|
+
* as `open_change_request` names them.
|
|
29
|
+
* - **A file's kind of change** is `change` — `added` / `changed` / `deleted`
|
|
30
|
+
* / `moved`, from the very function `open_change_request` uses
|
|
31
|
+
* ({@link changeKindOf}), not git's seven-way `status`. One request, one
|
|
32
|
+
* spelling of what happened to a file.
|
|
33
|
+
* - **Approvals are per FILE**, not per review submission, because that is
|
|
34
|
+
* what Hexis records. A reviewer's approvals at one staleness are gathered
|
|
35
|
+
* into one entry naming the files, which is as close to a GitHub review as
|
|
36
|
+
* Hexis's model honestly gets.
|
|
37
|
+
* - **`stale`, not `DISMISSED`.** Hexis's word for an approval a later push
|
|
38
|
+
* invalidated is `isStale`; a review entry reports `stale: true` rather
|
|
39
|
+
* than borrowing GitHub's review state.
|
|
40
|
+
* - **A reply names its parent `parentId`**, which is the argument
|
|
41
|
+
* `post_change_request_comment` takes to create one. Reading a comment and
|
|
42
|
+
* replying to it use the same word for the same thing.
|
|
43
|
+
*
|
|
44
|
+
* The tools' INPUTS are untouched and stay GitHub's (`state`, `head`, `base`,
|
|
45
|
+
* `author`, `per_page`, `page`, `include`): the ticket pins them by name, and
|
|
46
|
+
* they are the one part of the surface where matching GitHub's spelling helps —
|
|
47
|
+
* an agent that knows GitHub's list filters can use these without reading the
|
|
48
|
+
* schema. Only the ANSWERS are Hexis's.
|
|
49
|
+
*
|
|
50
|
+
* Pure, and deliberately so: every judgement these tools make about what a
|
|
51
|
+
* caller may see is either an access lookup (which belongs to the service) or
|
|
52
|
+
* one of the functions below (which belongs to a test that can read it). The
|
|
53
|
+
* tools file does the IO and calls in here for every decision.
|
|
54
|
+
*/
|
|
55
|
+
import type { ChangeRequest, ChangeRequestComment, ChangeRequestDetail, ChangeRequestState, ChangedFile, FileApproval } from '@bevel-software/platform-shared';
|
|
56
|
+
import { type ChangeKind } from './change-request-summary.js';
|
|
57
|
+
/** A person on a change request, a review or a comment. */
|
|
58
|
+
export interface CrUser {
|
|
59
|
+
/** Hexis's author login — `user-<first 12 of the email hash>`, no raw email. */
|
|
60
|
+
login: string;
|
|
61
|
+
/** Display name, when Hexis knows one. */
|
|
62
|
+
name?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The person's address, for a comment author and an approver — the two
|
|
65
|
+
* places the app's own change-request surfaces already show it, and what an
|
|
66
|
+
* agent needs to address a reply to a reviewer. Never set on a change
|
|
67
|
+
* request's `author`, which carries a hash-derived login only.
|
|
68
|
+
*/
|
|
69
|
+
email?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A change request as a LIST row.
|
|
73
|
+
*
|
|
74
|
+
* `url` first, for the reason `open_change_request` puts it first: it is the
|
|
75
|
+
* one field an agent must be able to hand a person, so it survives a truncation
|
|
76
|
+
* of anything after it.
|
|
77
|
+
*/
|
|
78
|
+
export interface CrSummary {
|
|
79
|
+
url: string;
|
|
80
|
+
/** Present only when `url` is relative — how to get absolute links. */
|
|
81
|
+
urlNote?: string;
|
|
82
|
+
number: number;
|
|
83
|
+
title: string;
|
|
84
|
+
/** Hexis's own three states. A merged request says so; there is no flag. */
|
|
85
|
+
state: ChangeRequestState;
|
|
86
|
+
author: CrUser;
|
|
87
|
+
sourceBranch: string;
|
|
88
|
+
targetBranch: string;
|
|
89
|
+
createdAt: string;
|
|
90
|
+
updatedAt: string;
|
|
91
|
+
/** How many of this request's files the CALLER may read. */
|
|
92
|
+
changedFiles: number;
|
|
93
|
+
/** How many it may not. Never named. */
|
|
94
|
+
withheldFiles: number;
|
|
95
|
+
/**
|
|
96
|
+
* The most recent apply attempt that did not land, while the request is
|
|
97
|
+
* open — as the app shows it. Its `reason` can name files, so it is the
|
|
98
|
+
* author's words only for a caller who may read EVERY file of a request
|
|
99
|
+
* that has some; otherwise the reason is the withheld line the app shows.
|
|
100
|
+
*/
|
|
101
|
+
lastApplyFailure?: {
|
|
102
|
+
reason: string;
|
|
103
|
+
conflicts: boolean;
|
|
104
|
+
at: string;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/** What the app says in place of an apply-failure reason the caller may not read. */
|
|
108
|
+
export declare const APPLY_FAILURE_REASON_WITHHELD = "The reason names files you do not have access to read.";
|
|
109
|
+
/** A change request read by number: the row, its description, and the gate. */
|
|
110
|
+
export interface CrDetail extends CrSummary {
|
|
111
|
+
body: string;
|
|
112
|
+
/** The source tip the answer describes. Absent when no ref could be resolved. */
|
|
113
|
+
headSha?: string;
|
|
114
|
+
/** The target tip it is read against. Absent when no ref could be resolved. */
|
|
115
|
+
baseSha?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Whether Hexis's merge gate would let this be applied — which, unlike
|
|
118
|
+
* GitHub's `mergeable`, also waits on the per-file approvals. Kept beside the
|
|
119
|
+
* blockers because a filtered `mergeBlockedReasons` can be empty while the
|
|
120
|
+
* gate is still shut: see {@link visibleBlockers}.
|
|
121
|
+
*/
|
|
122
|
+
mergeable: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Why it cannot be applied yet, in the gate's own words — the detail's list,
|
|
125
|
+
* minus any line naming a file the caller may not read.
|
|
126
|
+
*/
|
|
127
|
+
mergeBlockedReasons: string[];
|
|
128
|
+
/** How many blockers were withheld because they name a withheld file. */
|
|
129
|
+
withheldMergeBlockedReasons: number;
|
|
130
|
+
/** What this caller, specifically, may do with the request. */
|
|
131
|
+
viewer: CrViewer;
|
|
132
|
+
}
|
|
133
|
+
/** What the caller may do — Hexis's own facts, under Hexis's own names. */
|
|
134
|
+
export interface CrViewer {
|
|
135
|
+
/** Whether the caller may approve at least one file they are shown. */
|
|
136
|
+
mayApprove: boolean;
|
|
137
|
+
/** Whether the caller's Apply would be accepted right now. */
|
|
138
|
+
mayMerge: boolean;
|
|
139
|
+
/** Whether the caller opened this request (their agent counts as them). */
|
|
140
|
+
isAuthor: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface CrFile {
|
|
143
|
+
path: string;
|
|
144
|
+
/** Where a `moved` file came from. */
|
|
145
|
+
previousPath?: string;
|
|
146
|
+
/** `added` | `changed` | `deleted` | `moved` — `open_change_request`'s four. */
|
|
147
|
+
change: ChangeKind;
|
|
148
|
+
additions: number;
|
|
149
|
+
deletions: number;
|
|
150
|
+
/** Unified diff. Only on `include: ["patches"]`, and absent for binaries. */
|
|
151
|
+
patch?: string;
|
|
152
|
+
isBinary: boolean;
|
|
153
|
+
/** Who must approve this file for the request to be applied. */
|
|
154
|
+
requiredApprovers: {
|
|
155
|
+
roles: string[];
|
|
156
|
+
users: CrUser[];
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Present when the approver set could not be resolved — then an empty
|
|
160
|
+
* `requiredApprovers` means "not known", NOT "nobody has to approve". Same
|
|
161
|
+
* name and same fail-closed reading as `open_change_request`'s.
|
|
162
|
+
*/
|
|
163
|
+
approversUnknown?: true;
|
|
164
|
+
/** Who has approved this file, and when. */
|
|
165
|
+
approvedBy: CrFileApproval[];
|
|
166
|
+
/** Whether a current approval by an eligible approver stands. */
|
|
167
|
+
approved: boolean;
|
|
168
|
+
/** Whether the merge gate waits on this file at all. */
|
|
169
|
+
inMergeGate: boolean;
|
|
170
|
+
/** Whether the caller may approve this file. */
|
|
171
|
+
viewerMayApprove: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface CrFileApproval {
|
|
174
|
+
user: CrUser;
|
|
175
|
+
approvedAt: string;
|
|
176
|
+
/** True when the approval was given against a head that has since moved. */
|
|
177
|
+
stale: boolean;
|
|
178
|
+
/** True when the approver is the request's own author. */
|
|
179
|
+
selfApproval: boolean;
|
|
180
|
+
}
|
|
181
|
+
export interface CrReview {
|
|
182
|
+
/** Stable within the request: the reviewer, and whether their approvals stand. */
|
|
183
|
+
id: string;
|
|
184
|
+
reviewer: CrUser;
|
|
185
|
+
/** True once a later push invalidated the approvals gathered here. */
|
|
186
|
+
stale: boolean;
|
|
187
|
+
/** The most recent of the approvals gathered into this entry. */
|
|
188
|
+
submittedAt: string;
|
|
189
|
+
/** The files this reviewer approved — the readable ones. */
|
|
190
|
+
files: string[];
|
|
191
|
+
/** How many further files of this review the caller may not read. */
|
|
192
|
+
withheldFiles: number;
|
|
193
|
+
}
|
|
194
|
+
export interface CrComment {
|
|
195
|
+
id: string;
|
|
196
|
+
author: CrUser;
|
|
197
|
+
body: string;
|
|
198
|
+
/** Set on a file-level or inline comment. */
|
|
199
|
+
path?: string;
|
|
200
|
+
/** Set on an inline comment. */
|
|
201
|
+
line?: number;
|
|
202
|
+
/**
|
|
203
|
+
* The comment this one replies to — the same `parentId`
|
|
204
|
+
* `post_change_request_comment` takes to post the reply.
|
|
205
|
+
*/
|
|
206
|
+
parentId?: string;
|
|
207
|
+
/** The head the comment was anchored to. */
|
|
208
|
+
headSha: string;
|
|
209
|
+
createdAt: string;
|
|
210
|
+
/** Present once edited. */
|
|
211
|
+
updatedAt?: string;
|
|
212
|
+
}
|
|
213
|
+
/** One page of a list, and whether there is another. */
|
|
214
|
+
export interface CrPage<T> {
|
|
215
|
+
items: T[];
|
|
216
|
+
totalCount: number;
|
|
217
|
+
page: number;
|
|
218
|
+
perPage: number;
|
|
219
|
+
hasNextPage: boolean;
|
|
220
|
+
}
|
|
221
|
+
export declare const PER_PAGE_DEFAULT = 30;
|
|
222
|
+
export declare const PER_PAGE_MAX = 100;
|
|
223
|
+
/**
|
|
224
|
+
* GitHub's `per_page` (default 30, at most 100) and `page` (from 1), read off
|
|
225
|
+
* whatever the caller sent. A value out of range is clamped rather than
|
|
226
|
+
* refused, because a tool call that asks for 500 wants as many as it can have.
|
|
227
|
+
*/
|
|
228
|
+
export declare function pagingOf(args: {
|
|
229
|
+
per_page?: unknown;
|
|
230
|
+
page?: unknown;
|
|
231
|
+
}): {
|
|
232
|
+
perPage: number;
|
|
233
|
+
page: number;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* One page out of an already-filtered list. Paging runs AFTER the access
|
|
237
|
+
* filter, always: a page sliced before it would say by its own short length
|
|
238
|
+
* how many entries were withheld, which is the count's job to say and nobody
|
|
239
|
+
* else's.
|
|
240
|
+
*/
|
|
241
|
+
export declare function pageOf<T>(all: T[], perPage: number, page: number): CrPage<T>;
|
|
242
|
+
/**
|
|
243
|
+
* The Hexis states the `state` FILTER selects. The filter keeps GitHub's three
|
|
244
|
+
* words because the ticket names them, and `closed` there means "not open" —
|
|
245
|
+
* which over Hexis's states is `closed` (declined) and `merged` alike. The
|
|
246
|
+
* ANSWER still reports which of the two a request is.
|
|
247
|
+
*/
|
|
248
|
+
export declare function statesFor(filter: 'open' | 'closed' | 'all'): ChangeRequestState[];
|
|
249
|
+
/** The request's author: a hash-derived login, never an email. */
|
|
250
|
+
export declare function crAuthor(cr: Pick<ChangeRequest, 'author' | 'appAuthor'>): CrUser;
|
|
251
|
+
/**
|
|
252
|
+
* Whether `needle` names this request's author — an email (compared as the
|
|
253
|
+
* author hash, since the request stores no raw address) or a login. Mirrors
|
|
254
|
+
* `listPrsAuthoredBy`, so the tool's `author` filter and the app's "mine" list
|
|
255
|
+
* agree on who wrote what.
|
|
256
|
+
*/
|
|
257
|
+
export declare function matchesAuthor(cr: Pick<ChangeRequest, 'author' | 'authorId'>, needle: string): boolean;
|
|
258
|
+
/** Whether `viewerEmail` opened this request. */
|
|
259
|
+
export declare function isAuthor(cr: Pick<ChangeRequest, 'authorId'>, viewerEmail: string | undefined): boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Whether the caller may SEE a change request at all.
|
|
262
|
+
*
|
|
263
|
+
* Readable files, or authorship. Nothing else: a request every file of which
|
|
264
|
+
* is closed to the caller tells them, by existing, that somebody proposed a
|
|
265
|
+
* change to something they may not look at, and requirement 7 answers that
|
|
266
|
+
* with a 404 rather than an empty shell.
|
|
267
|
+
*
|
|
268
|
+
* A request with NO files resolved is not visible to a non-author either, and
|
|
269
|
+
* that is deliberate rather than an oversight: an empty file set is what both a
|
|
270
|
+
* request that genuinely changes nothing and a request whose diff could not be
|
|
271
|
+
* computed look like, and the two are indistinguishable from here. So an empty
|
|
272
|
+
* set proves no read access — the same rule `scopeApplyFailures` applies to the
|
|
273
|
+
* same question on the same lists.
|
|
274
|
+
*
|
|
275
|
+
* Since the 2026-10-02 decision this is a far smaller class than it was: a
|
|
276
|
+
* MERGED request's files are recovered from its merge commit, so being applied
|
|
277
|
+
* no longer hides a request from everyone but its author. What is left is a
|
|
278
|
+
* DECLINED request (no merge commit was ever written, and its branch is gone)
|
|
279
|
+
* and a clone that cannot resolve the commit at all.
|
|
280
|
+
*/
|
|
281
|
+
export declare function maySeeChangeRequest(input: {
|
|
282
|
+
readableFiles: number;
|
|
283
|
+
isAuthor: boolean;
|
|
284
|
+
}): boolean;
|
|
285
|
+
/** A list row. `readable` / `withheld` come from the access filter. */
|
|
286
|
+
export declare function toCrSummary(cr: ChangeRequest, counts: {
|
|
287
|
+
readable: number;
|
|
288
|
+
withheld: number;
|
|
289
|
+
}): CrSummary;
|
|
290
|
+
/** A detail: the row, the author's description, and the gate as this caller sees it. */
|
|
291
|
+
export declare function toCrDetail(detail: ChangeRequestDetail, counts: {
|
|
292
|
+
readable: number;
|
|
293
|
+
withheld: number;
|
|
294
|
+
}, blockers: {
|
|
295
|
+
visible: string[];
|
|
296
|
+
withheld: number;
|
|
297
|
+
}, viewer: CrViewer): CrDetail;
|
|
298
|
+
/**
|
|
299
|
+
* The part of a change-request body its AUTHOR wrote.
|
|
300
|
+
*
|
|
301
|
+
* A Hexis body is part human and part machine: `openChangeRequest` appends an
|
|
302
|
+
* `## Affected owners` block — one line per changed path, naming that path and
|
|
303
|
+
* its eligible approvers — to whatever the author typed. Returning the body
|
|
304
|
+
* verbatim NAMED every file of the request, including the ones this caller may
|
|
305
|
+
* not read: Local Testing caught a GTM-team reader being handed
|
|
306
|
+
* `- \`KnowledgeBase/Engineering/…\` — Admin` out of a request whose file list
|
|
307
|
+
* had correctly withheld that very path.
|
|
308
|
+
*
|
|
309
|
+
* So the generated block goes, and NOTHING ELSE does. The first cut at this
|
|
310
|
+
* copied the app's dialog, which drops everything from the first `##` heading
|
|
311
|
+
* on; Razvan's review (2026-10-02) asked for the narrower cut, because an
|
|
312
|
+
* author who writes their description in sections loses it from that heading
|
|
313
|
+
* onwards and is never told. The generated block is appended LAST and begins
|
|
314
|
+
* with a line that is exactly `## Affected owners`, so cutting at the LAST such
|
|
315
|
+
* line removes the machinery and keeps every heading a person wrote. (An author
|
|
316
|
+
* who writes that exact heading themselves loses their text from there — the
|
|
317
|
+
* safe direction, and the only way this can err.)
|
|
318
|
+
*
|
|
319
|
+
* Hexis's OWN hidden markers go too — the `<!--hexis:…-->` / `<!--bevel:…-->`
|
|
320
|
+
* comments older bodies carry identity in — and no other comment: an HTML
|
|
321
|
+
* comment the author wrote is the author's prose, like the rest.
|
|
322
|
+
*
|
|
323
|
+
* Who must approve each file is NOT lost by this — it is what
|
|
324
|
+
* `list_change_request_files` answers under `requiredApprovers`, per file and
|
|
325
|
+
* access-filtered, which is where a caller should read it from anyway.
|
|
326
|
+
*
|
|
327
|
+
* Two things this deliberately does not do. It does not vary by caller: one
|
|
328
|
+
* body for everyone is a body nobody has to reason about. And it does not touch
|
|
329
|
+
* the author's own prose, which may mention any path they chose to write about —
|
|
330
|
+
* that is a person's sentence, shown to every viewer in the app, not Hexis
|
|
331
|
+
* naming a file it was asked to withhold.
|
|
332
|
+
*/
|
|
333
|
+
export declare function authorsDescription(body: string): string;
|
|
334
|
+
/**
|
|
335
|
+
* What this caller may do with the request.
|
|
336
|
+
*
|
|
337
|
+
* `mayMerge` reproduces what `mergePr` would accept, from the detail's own
|
|
338
|
+
* published fields: no hard block, and either nothing missing or an admin who
|
|
339
|
+
* may bypass what is. Deriving it here rather than asking a second time keeps
|
|
340
|
+
* the answer and the enforcement reading the same gate.
|
|
341
|
+
*
|
|
342
|
+
* `mayApprove` answers over `shownApprovals` — the approvals of the files this
|
|
343
|
+
* caller is SHOWN — and not over the request's whole approval set, which is why
|
|
344
|
+
* the set is passed in rather than read off `detail`. The two differ:
|
|
345
|
+
* `viewerCanApprove` is a WRITE grant at `origin/<base>`, and a write grant can
|
|
346
|
+
* hold for a file whose read verdict withholds it. Answering true off such a
|
|
347
|
+
* file would both contradict the contract ("at least one file they are shown")
|
|
348
|
+
* and tell the caller something about a file they were refused.
|
|
349
|
+
*/
|
|
350
|
+
export declare function toCrViewer(detail: Pick<ChangeRequestDetail, 'state' | 'mergeBlockedReasons' | 'mergeWarnings' | 'viewerCanBypassMerge'>, viewerIsAuthor: boolean, shownApprovals: Pick<FileApproval, 'viewerCanApprove'>[]): CrViewer;
|
|
351
|
+
/**
|
|
352
|
+
* The merge blockers the caller may read.
|
|
353
|
+
*
|
|
354
|
+
* A gate warning quotes the path it waits on (`Waiting on approval for
|
|
355
|
+
* X from …`), so a blocker about a withheld file would name that file. Each
|
|
356
|
+
* blocker mentioning any withheld path is dropped and counted. Matching on the
|
|
357
|
+
* text rather than rebuilding the gate's sentences is deliberate: the gate owns
|
|
358
|
+
* its wording, and the only way this can err is by withholding a line that
|
|
359
|
+
* contains a withheld path as a substring — which is the safe direction.
|
|
360
|
+
*/
|
|
361
|
+
export declare function visibleBlockers(reasons: string[], withheldPaths: string[]): {
|
|
362
|
+
visible: string[];
|
|
363
|
+
withheld: number;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* Whether the caller may read a changed file AT ALL.
|
|
367
|
+
*
|
|
368
|
+
* Both of its names must be readable. A moved file carries its old path in
|
|
369
|
+
* `previousPath`, and the diff of a move shows the content that was at that
|
|
370
|
+
* old path — so a file moved OUT of a folder the caller may not read is not
|
|
371
|
+
* readable here either, however open its new home is, and `previousPath` can
|
|
372
|
+
* never name a path they were refused. Fail-closed in the one direction that
|
|
373
|
+
* matters: a file with nowhere to hide is listed, a file with a hidden side is
|
|
374
|
+
* withheld and counted.
|
|
375
|
+
*/
|
|
376
|
+
export declare function fileIsReadable(file: Pick<ChangedFile, 'path' | 'previousPath'>, mayRead: (path: string) => boolean): boolean;
|
|
377
|
+
/** Every path a changed file names — both sides of a move. */
|
|
378
|
+
export declare function pathsOf(file: Pick<ChangedFile, 'path' | 'previousPath'>): string[];
|
|
379
|
+
/** A changed file plus its approval state. */
|
|
380
|
+
export declare function toCrFile(file: ChangedFile, approval: FileApproval | undefined,
|
|
381
|
+
/** `open`: whether the request still is — an approval can be given on an open request only. */
|
|
382
|
+
opts: {
|
|
383
|
+
patches: boolean;
|
|
384
|
+
open: boolean;
|
|
385
|
+
}): CrFile;
|
|
386
|
+
/** The same hash-derived login the change-request summaries carry. */
|
|
387
|
+
export declare function loginFor(email: string): string;
|
|
388
|
+
/**
|
|
389
|
+
* The reviews of a change request, gathered out of its per-file approvals.
|
|
390
|
+
*
|
|
391
|
+
* Hexis records an approval per FILE; a review list wants one entry per review.
|
|
392
|
+
* One entry per (reviewer, staleness) is the closest honest join: it names the
|
|
393
|
+
* reviewer once and the files they approved, which is what the ticket's
|
|
394
|
+
* scenario asks to read back. A reviewer holding both a current and a stale
|
|
395
|
+
* approval appears twice — one entry for the files that still stand and one
|
|
396
|
+
* with `stale: true` for the ones the latest push invalidated.
|
|
397
|
+
*
|
|
398
|
+
* `mayShow` decides, per file, what this caller may be told. A review keeps the
|
|
399
|
+
* files they may read and counts the rest in its own `withheldFiles`; a review
|
|
400
|
+
* EVERY file of which is withheld is dropped and counted in `withheldReviews`,
|
|
401
|
+
* because naming the reviewer would itself say that somebody approved a change
|
|
402
|
+
* to something the caller may not look at. `submittedAt` is taken from the
|
|
403
|
+
* readable approvals alone, for the same reason.
|
|
404
|
+
*
|
|
405
|
+
* Hexis records nothing about who DECLINED a request — a rejection closes it
|
|
406
|
+
* and stores no reviewer — so no review entry can report one. A reviewer's
|
|
407
|
+
* objection lives in a comment, which `list_change_request_comments` returns.
|
|
408
|
+
*/
|
|
409
|
+
export declare function toCrReviews(approvals: FileApproval[], mayShow?: (path: string) => boolean): {
|
|
410
|
+
reviews: CrReview[];
|
|
411
|
+
withheldReviews: number;
|
|
412
|
+
};
|
|
413
|
+
/** A comment. Covers the file-anchored and the general ones — Hexis has one table. */
|
|
414
|
+
export declare function toCrComment(comment: ChangeRequestComment): CrComment;
|
|
415
|
+
/**
|
|
416
|
+
* The comments the caller may read, replies included in the answer only when
|
|
417
|
+
* the comment they reply to is.
|
|
418
|
+
*
|
|
419
|
+
* A comment with no path is about the request as a whole, and a comment with
|
|
420
|
+
* one is as readable as that path is NAMEABLE here (`mayShow`, so a comment
|
|
421
|
+
* anchored to the new name of a file withheld for its old one goes with the
|
|
422
|
+
* file rather than announcing it). A REPLY is neither, quite: it carries no
|
|
423
|
+
* path of its own when it was posted without one, so judged on itself it is a
|
|
424
|
+
* general comment — and `post_change_request_comment` takes `parentId` without
|
|
425
|
+
* requiring `path`, so a reply to a comment on a withheld file was returned
|
|
426
|
+
* with its body and a `parentId` naming a comment the caller cannot see.
|
|
427
|
+
* Razvan's review (2026-10-02) asked for the rule the ticket states: a reply is
|
|
428
|
+
* shown only when its parent is.
|
|
429
|
+
*
|
|
430
|
+
* So a comment is visible when its OWN path may be shown (if it has one) AND
|
|
431
|
+
* its parent is visible, all the way up the chain. Both halves are needed:
|
|
432
|
+
* inheriting only would show a reply naming a withheld file under a readable
|
|
433
|
+
* parent, and checking only its own path would show it under a withheld one.
|
|
434
|
+
*
|
|
435
|
+
* Fail-closed at the edges. A `parentId` naming a comment that is not in this
|
|
436
|
+
* request's list (deleted, or from somewhere this answer cannot see) is not
|
|
437
|
+
* provably pathless, so the reply goes. A cycle — which the schema does not
|
|
438
|
+
* permit and a corrupted row could still hold — is unresolvable, so it goes
|
|
439
|
+
* too. Both are counted in the withheld total, never named.
|
|
440
|
+
*/
|
|
441
|
+
export declare function visibleComments<T extends {
|
|
442
|
+
id: string;
|
|
443
|
+
path?: string;
|
|
444
|
+
parentId?: string;
|
|
445
|
+
}>(comments: T[], mayShow: (path: string) => boolean): {
|
|
446
|
+
visible: T[];
|
|
447
|
+
withheld: number;
|
|
448
|
+
};
|
|
449
|
+
//# sourceMappingURL=change-request-read-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-request-read-shape.d.ts","sourceRoot":"","sources":["../../../../src/modules/workflow/agent-tools/change-request-read-shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,YAAY,EACb,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE5E,2DAA2D;AAC3D,MAAM,WAAW,MAAM;IACrB,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,KAAK,EAAE,kBAAkB,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;I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