@bevel-software/platform-core-backend 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +6 -6
- package/dist/core/catalog-cache-invalidation.d.ts +29 -0
- package/dist/core/catalog-cache-invalidation.d.ts.map +1 -0
- package/dist/core/catalog-cache-invalidation.js +71 -0
- package/dist/core/catalog-cache-invalidation.js.map +1 -0
- package/dist/core/create-core-server.d.ts.map +1 -1
- package/dist/core/create-core-server.js +99 -8
- package/dist/core/create-core-server.js.map +1 -1
- package/dist/core/create-core-services.d.ts +18 -1
- package/dist/core/create-core-services.d.ts.map +1 -1
- package/dist/core/create-core-services.js +96 -43
- package/dist/core/create-core-services.js.map +1 -1
- package/dist/modules/access/access-control.interface.d.ts +18 -6
- package/dist/modules/access/access-control.interface.d.ts.map +1 -1
- package/dist/modules/access/access-control.service.d.ts +26 -1
- package/dist/modules/access/access-control.service.d.ts.map +1 -1
- package/dist/modules/access/access-control.service.js +213 -71
- package/dist/modules/access/access-control.service.js.map +1 -1
- package/dist/modules/access/access.routes.d.ts.map +1 -1
- package/dist/modules/access/access.routes.js +59 -7
- package/dist/modules/access/access.routes.js.map +1 -1
- package/dist/modules/access-model/access-grammar.d.ts +51 -1
- package/dist/modules/access-model/access-grammar.d.ts.map +1 -1
- package/dist/modules/access-model/access-grammar.js +95 -1
- package/dist/modules/access-model/access-grammar.js.map +1 -1
- package/dist/modules/access-model/group-files.d.ts.map +1 -1
- package/dist/modules/access-model/group-files.js +4 -1
- package/dist/modules/access-model/group-files.js.map +1 -1
- package/dist/modules/access-model/plugin-principals.d.ts +49 -0
- package/dist/modules/access-model/plugin-principals.d.ts.map +1 -0
- package/dist/modules/access-model/plugin-principals.js +125 -0
- package/dist/modules/access-model/plugin-principals.js.map +1 -0
- package/dist/modules/database/core-schema.d.ts +326 -0
- package/dist/modules/database/core-schema.d.ts.map +1 -1
- package/dist/modules/database/core-schema.js +52 -0
- package/dist/modules/database/core-schema.js.map +1 -1
- package/dist/modules/kb-sync/index.d.ts +6 -0
- package/dist/modules/kb-sync/index.d.ts.map +1 -0
- package/dist/modules/kb-sync/index.js +5 -0
- package/dist/modules/kb-sync/index.js.map +1 -0
- package/dist/modules/kb-sync/kb-sync.interface.d.ts +77 -0
- package/dist/modules/kb-sync/kb-sync.interface.d.ts.map +1 -0
- package/dist/modules/kb-sync/kb-sync.interface.js +2 -0
- package/dist/modules/kb-sync/kb-sync.interface.js.map +1 -0
- package/dist/modules/kb-sync/kb-sync.routes.d.ts +70 -0
- package/dist/modules/kb-sync/kb-sync.routes.d.ts.map +1 -0
- package/dist/modules/kb-sync/kb-sync.routes.js +135 -0
- package/dist/modules/kb-sync/kb-sync.routes.js.map +1 -0
- package/dist/modules/kb-sync/kb-sync.service.d.ts +45 -0
- package/dist/modules/kb-sync/kb-sync.service.d.ts.map +1 -0
- package/dist/modules/kb-sync/kb-sync.service.js +183 -0
- package/dist/modules/kb-sync/kb-sync.service.js.map +1 -0
- package/dist/modules/kb-sync/sync-auth.d.ts +59 -0
- package/dist/modules/kb-sync/sync-auth.d.ts.map +1 -0
- package/dist/modules/kb-sync/sync-auth.js +62 -0
- package/dist/modules/kb-sync/sync-auth.js.map +1 -0
- package/dist/modules/kb-sync/sync-payload.d.ts +32 -0
- package/dist/modules/kb-sync/sync-payload.d.ts.map +1 -0
- package/dist/modules/kb-sync/sync-payload.js +105 -0
- package/dist/modules/kb-sync/sync-payload.js.map +1 -0
- package/dist/modules/marketplace/git-http.routes.d.ts +42 -0
- package/dist/modules/marketplace/git-http.routes.d.ts.map +1 -0
- package/dist/modules/marketplace/git-http.routes.js +190 -0
- package/dist/modules/marketplace/git-http.routes.js.map +1 -0
- package/dist/modules/marketplace/github-facade/github-facade-admin.routes.d.ts +23 -0
- package/dist/modules/marketplace/github-facade/github-facade-admin.routes.d.ts.map +1 -0
- package/dist/modules/marketplace/github-facade/github-facade-admin.routes.js +59 -0
- package/dist/modules/marketplace/github-facade/github-facade-admin.routes.js.map +1 -0
- package/dist/modules/marketplace/github-facade/github-facade-codes.store.d.ts +59 -0
- package/dist/modules/marketplace/github-facade/github-facade-codes.store.d.ts.map +1 -0
- package/dist/modules/marketplace/github-facade/github-facade-codes.store.js +96 -0
- package/dist/modules/marketplace/github-facade/github-facade-codes.store.js.map +1 -0
- package/dist/modules/marketplace/github-facade/github-facade-credentials.service.d.ts +99 -0
- package/dist/modules/marketplace/github-facade/github-facade-credentials.service.d.ts.map +1 -0
- package/dist/modules/marketplace/github-facade/github-facade-credentials.service.js +147 -0
- package/dist/modules/marketplace/github-facade/github-facade-credentials.service.js.map +1 -0
- package/dist/modules/marketplace/github-facade/github-facade.routes.d.ts +47 -0
- package/dist/modules/marketplace/github-facade/github-facade.routes.d.ts.map +1 -0
- package/dist/modules/marketplace/github-facade/github-facade.routes.js +228 -0
- package/dist/modules/marketplace/github-facade/github-facade.routes.js.map +1 -0
- package/dist/modules/marketplace/github-facade/github-facade.service.d.ts +109 -0
- package/dist/modules/marketplace/github-facade/github-facade.service.d.ts.map +1 -0
- package/dist/modules/marketplace/github-facade/github-facade.service.js +172 -0
- package/dist/modules/marketplace/github-facade/github-facade.service.js.map +1 -0
- package/dist/modules/marketplace/github-facade/index.d.ts +6 -0
- package/dist/modules/marketplace/github-facade/index.d.ts.map +1 -0
- package/dist/modules/marketplace/github-facade/index.js +6 -0
- package/dist/modules/marketplace/github-facade/index.js.map +1 -0
- package/dist/modules/marketplace/index.d.ts +4 -0
- package/dist/modules/marketplace/index.d.ts.map +1 -0
- package/dist/modules/marketplace/index.js +4 -0
- package/dist/modules/marketplace/index.js.map +1 -0
- package/dist/modules/marketplace/marketplace-repo.service.d.ts +122 -0
- package/dist/modules/marketplace/marketplace-repo.service.d.ts.map +1 -0
- package/dist/modules/marketplace/marketplace-repo.service.js +300 -0
- package/dist/modules/marketplace/marketplace-repo.service.js.map +1 -0
- package/dist/modules/mcp/oauth/bevel-oauth-provider.d.ts.map +1 -1
- package/dist/modules/mcp/oauth/bevel-oauth-provider.js +4 -0
- package/dist/modules/mcp/oauth/bevel-oauth-provider.js.map +1 -1
- package/dist/modules/mcp/oauth/oauth-consent.routes.d.ts +14 -8
- package/dist/modules/mcp/oauth/oauth-consent.routes.d.ts.map +1 -1
- package/dist/modules/mcp/oauth/oauth-consent.routes.js +13 -1
- package/dist/modules/mcp/oauth/oauth-consent.routes.js.map +1 -1
- package/dist/modules/mcp/oauth/oauth-state.d.ts +13 -2
- package/dist/modules/mcp/oauth/oauth-state.d.ts.map +1 -1
- package/dist/modules/mcp/oauth/oauth-state.js +3 -1
- package/dist/modules/mcp/oauth/oauth-state.js.map +1 -1
- package/dist/modules/plugins/compile/compile-marketplace.d.ts +97 -0
- package/dist/modules/plugins/compile/compile-marketplace.d.ts.map +1 -0
- package/dist/modules/plugins/compile/compile-marketplace.js +240 -0
- package/dist/modules/plugins/compile/compile-marketplace.js.map +1 -0
- package/dist/modules/plugins/compile/marketplace-compiler.service.d.ts +66 -0
- package/dist/modules/plugins/compile/marketplace-compiler.service.d.ts.map +1 -0
- package/dist/modules/plugins/compile/marketplace-compiler.service.js +132 -0
- package/dist/modules/plugins/compile/marketplace-compiler.service.js.map +1 -0
- package/dist/modules/plugins/discovery/bundle-dialect/bundle.source.d.ts +37 -0
- package/dist/modules/plugins/discovery/bundle-dialect/bundle.source.d.ts.map +1 -0
- package/dist/modules/plugins/discovery/bundle-dialect/bundle.source.js +135 -0
- package/dist/modules/plugins/discovery/bundle-dialect/bundle.source.js.map +1 -0
- package/dist/modules/plugins/discovery/bundle-dialect/registry.d.ts +45 -0
- package/dist/modules/plugins/discovery/bundle-dialect/registry.d.ts.map +1 -0
- package/dist/modules/plugins/discovery/bundle-dialect/registry.js +147 -0
- package/dist/modules/plugins/discovery/bundle-dialect/registry.js.map +1 -0
- package/dist/modules/plugins/discovery/kb-plugin-source.d.ts +37 -0
- package/dist/modules/plugins/discovery/kb-plugin-source.d.ts.map +1 -0
- package/dist/modules/plugins/discovery/kb-plugin-source.js +107 -0
- package/dist/modules/plugins/discovery/kb-plugin-source.js.map +1 -0
- package/dist/modules/plugins/discovery/native.source.d.ts +15 -0
- package/dist/modules/plugins/discovery/native.source.d.ts.map +1 -0
- package/dist/modules/plugins/discovery/native.source.js +102 -0
- package/dist/modules/plugins/discovery/native.source.js.map +1 -0
- package/dist/modules/plugins/discovery/plugin-source.d.ts +96 -0
- package/dist/modules/plugins/discovery/plugin-source.d.ts.map +1 -0
- package/dist/modules/plugins/discovery/plugin-source.js +2 -0
- package/dist/modules/plugins/discovery/plugin-source.js.map +1 -0
- package/dist/modules/plugins/index.d.ts +10 -1
- package/dist/modules/plugins/index.d.ts.map +1 -1
- package/dist/modules/plugins/index.js +8 -0
- package/dist/modules/plugins/index.js.map +1 -1
- package/dist/modules/plugins/plugin-links.d.ts +66 -0
- package/dist/modules/plugins/plugin-links.d.ts.map +1 -0
- package/dist/modules/plugins/plugin-links.js +160 -0
- package/dist/modules/plugins/plugin-links.js.map +1 -0
- package/dist/modules/plugins/plugin-links.service.d.ts +114 -0
- package/dist/modules/plugins/plugin-links.service.d.ts.map +1 -0
- package/dist/modules/plugins/plugin-links.service.js +304 -0
- package/dist/modules/plugins/plugin-links.service.js.map +1 -0
- package/dist/modules/plugins/plugin-provision.service.d.ts +39 -3
- package/dist/modules/plugins/plugin-provision.service.d.ts.map +1 -1
- package/dist/modules/plugins/plugin-provision.service.js +152 -52
- package/dist/modules/plugins/plugin-provision.service.js.map +1 -1
- package/dist/modules/plugins/plugin-rename.service.d.ts +69 -0
- package/dist/modules/plugins/plugin-rename.service.d.ts.map +1 -0
- package/dist/modules/plugins/plugin-rename.service.js +245 -0
- package/dist/modules/plugins/plugin-rename.service.js.map +1 -0
- package/dist/modules/plugins/plugins.contract.d.ts +27 -1
- package/dist/modules/plugins/plugins.contract.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.routes.d.ts +7 -1
- package/dist/modules/plugins/plugins.routes.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.routes.js +120 -12
- package/dist/modules/plugins/plugins.routes.js.map +1 -1
- package/dist/modules/plugins/plugins.service.d.ts +50 -3
- package/dist/modules/plugins/plugins.service.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.service.js +108 -47
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/dist/modules/settings/deployment-settings.service.d.ts +9 -0
- package/dist/modules/settings/deployment-settings.service.d.ts.map +1 -1
- package/dist/modules/settings/deployment-settings.service.js +82 -2
- package/dist/modules/settings/deployment-settings.service.js.map +1 -1
- package/dist/modules/settings/setup.routes.d.ts +26 -0
- package/dist/modules/settings/setup.routes.d.ts.map +1 -1
- package/dist/modules/settings/setup.routes.js +9 -1
- package/dist/modules/settings/setup.routes.js.map +1 -1
- package/dist/modules/skills/index.d.ts +1 -0
- package/dist/modules/skills/index.d.ts.map +1 -1
- package/dist/modules/skills/index.js +1 -0
- package/dist/modules/skills/index.js.map +1 -1
- package/dist/modules/skills/pending-skills.service.d.ts.map +1 -1
- package/dist/modules/skills/pending-skills.service.js +9 -4
- package/dist/modules/skills/pending-skills.service.js.map +1 -1
- package/dist/modules/skills/skill-access-requests.routes.d.ts +38 -0
- package/dist/modules/skills/skill-access-requests.routes.d.ts.map +1 -0
- package/dist/modules/skills/skill-access-requests.routes.js +168 -0
- package/dist/modules/skills/skill-access-requests.routes.js.map +1 -0
- package/dist/modules/skills/skills.contract.d.ts +31 -0
- package/dist/modules/skills/skills.contract.d.ts.map +1 -1
- package/dist/modules/skills/skills.routes.d.ts +28 -3
- package/dist/modules/skills/skills.routes.d.ts.map +1 -1
- package/dist/modules/skills/skills.routes.js +42 -3
- package/dist/modules/skills/skills.routes.js.map +1 -1
- package/dist/modules/skills/skills.service.d.ts +4 -0
- package/dist/modules/skills/skills.service.d.ts.map +1 -1
- package/dist/modules/skills/skills.service.js +83 -22
- package/dist/modules/skills/skills.service.js.map +1 -1
- package/dist/modules/tool-auth/external-api-key.interface.d.ts +18 -1
- package/dist/modules/tool-auth/external-api-key.interface.d.ts.map +1 -1
- package/dist/modules/tool-auth/external-api-key.interface.js +2 -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 +13 -4
- package/dist/modules/tool-auth/external-api-key.service.d.ts.map +1 -1
- package/dist/modules/tool-auth/external-api-key.service.js +26 -9
- package/dist/modules/tool-auth/external-api-key.service.js.map +1 -1
- package/dist/modules/tool-manuals/mcp-json-discovery.d.ts +36 -0
- package/dist/modules/tool-manuals/mcp-json-discovery.d.ts.map +1 -1
- package/dist/modules/tool-manuals/mcp-json-discovery.js +130 -92
- package/dist/modules/tool-manuals/mcp-json-discovery.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts +6 -1
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.js +18 -25
- package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -1
- package/dist/modules/workflow/git/git.service.d.ts +40 -2
- package/dist/modules/workflow/git/git.service.d.ts.map +1 -1
- package/dist/modules/workflow/git/git.service.js +227 -54
- package/dist/modules/workflow/git/git.service.js.map +1 -1
- package/dist/modules/workflow/git/pull-request.service.d.ts +6 -0
- package/dist/modules/workflow/git/pull-request.service.d.ts.map +1 -1
- package/dist/modules/workflow/git/pull-request.service.js +8 -0
- package/dist/modules/workflow/git/pull-request.service.js.map +1 -1
- package/dist/modules/workflow/workflow.service.d.ts +52 -1
- package/dist/modules/workflow/workflow.service.d.ts.map +1 -1
- package/dist/modules/workflow/workflow.service.js +242 -9
- package/dist/modules/workflow/workflow.service.js.map +1 -1
- package/dist/modules/workspace/startup/steps/plugin-manifests.step.d.ts +35 -0
- package/dist/modules/workspace/startup/steps/plugin-manifests.step.d.ts.map +1 -0
- package/dist/modules/workspace/startup/steps/plugin-manifests.step.js +121 -0
- package/dist/modules/workspace/startup/steps/plugin-manifests.step.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 +46 -2
- package/dist/modules/workspace/startup/steps/seed-tree.js.map +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 +112 -25
- package/dist/modules/workspace/startup/steps/template-files.step.js.map +1 -1
- package/dist/modules/workspace/workspace.routes.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.routes.js +9 -9
- package/dist/modules/workspace/workspace.routes.js.map +1 -1
- package/dist/modules/workspace/workspace.service.d.ts +33 -0
- package/dist/modules/workspace/workspace.service.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.service.js +110 -16
- package/dist/modules/workspace/workspace.service.js.map +1 -1
- package/dist/shared/domain-errors.d.ts +20 -0
- package/dist/shared/domain-errors.d.ts.map +1 -1
- package/dist/shared/domain-errors.js +29 -0
- package/dist/shared/domain-errors.js.map +1 -1
- package/dist/shared/fs-errors.d.ts +8 -0
- package/dist/shared/fs-errors.d.ts.map +1 -0
- package/dist/shared/fs-errors.js +11 -0
- package/dist/shared/fs-errors.js.map +1 -0
- package/dist/shared/fs-walk.d.ts +20 -6
- package/dist/shared/fs-walk.d.ts.map +1 -1
- package/dist/shared/fs-walk.js +35 -27
- package/dist/shared/fs-walk.js.map +1 -1
- package/dist/shared/kb-walk.d.ts +52 -0
- package/dist/shared/kb-walk.d.ts.map +1 -0
- package/dist/shared/kb-walk.js +76 -0
- package/dist/shared/kb-walk.js.map +1 -0
- package/dist/shared/path-order.d.ts +18 -0
- package/dist/shared/path-order.d.ts.map +1 -0
- package/dist/shared/path-order.js +35 -0
- package/dist/shared/path-order.js.map +1 -0
- package/dist/shared/ttl-cache.d.ts +28 -1
- package/dist/shared/ttl-cache.d.ts.map +1 -1
- package/dist/shared/ttl-cache.js +33 -1
- package/dist/shared/ttl-cache.js.map +1 -1
- package/kb-template/.bevelignore +1 -1
- package/kb-template/AGENTS.md +95 -30
- package/kb-template/Skills/.gitkeep +0 -0
- package/migrations/0005_github_facade.sql +25 -0
- package/migrations/meta/0005_snapshot.json +1717 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +6 -6
- package/src/__tests__/kb-layout-config.test.ts +110 -0
- package/src/core/__tests__/catalog-cache-invalidation.test.ts +146 -0
- package/src/core/catalog-cache-invalidation.ts +92 -0
- package/src/core/create-core-server.ts +123 -7
- package/src/core/create-core-services.ts +162 -41
- package/src/modules/access/__tests__/access-control.invalidate-race.test.ts +86 -0
- package/src/modules/access/__tests__/access-control.service.test.ts +19 -3
- package/src/modules/access/__tests__/access-plugin-principals.test.ts +368 -0
- package/src/modules/access/__tests__/groups-admin.service.test.ts +8 -0
- package/src/modules/access/access-control.interface.ts +20 -9
- package/src/modules/access/access-control.service.ts +240 -78
- package/src/modules/access/access.routes.ts +96 -14
- package/src/modules/access-model/__tests__/access-grammar.test.ts +18 -0
- package/src/modules/access-model/__tests__/plugin-token-canonical.test.ts +40 -0
- package/src/modules/access-model/access-grammar.ts +114 -2
- package/src/modules/access-model/group-files.ts +4 -0
- package/src/modules/access-model/plugin-principals.ts +137 -0
- package/src/modules/database/core-schema.ts +54 -0
- package/src/modules/kb-sync/__tests__/kb-sync.routes.test.ts +297 -0
- package/src/modules/kb-sync/__tests__/kb-sync.service.test.ts +295 -0
- package/src/modules/kb-sync/__tests__/sync-auth.test.ts +118 -0
- package/src/modules/kb-sync/__tests__/sync-payload.test.ts +148 -0
- package/src/modules/kb-sync/index.ts +19 -0
- package/src/modules/kb-sync/kb-sync.interface.ts +79 -0
- package/src/modules/kb-sync/kb-sync.routes.ts +197 -0
- package/src/modules/kb-sync/kb-sync.service.ts +201 -0
- package/src/modules/kb-sync/sync-auth.ts +118 -0
- package/src/modules/kb-sync/sync-payload.ts +143 -0
- package/src/modules/marketplace/__tests__/github-facade.test.ts +443 -0
- package/src/modules/marketplace/__tests__/marketplace-git.test.ts +179 -0
- package/src/modules/marketplace/git-http.routes.ts +193 -0
- package/src/modules/marketplace/github-facade/github-facade-admin.routes.ts +78 -0
- package/src/modules/marketplace/github-facade/github-facade-codes.store.ts +145 -0
- package/src/modules/marketplace/github-facade/github-facade-credentials.service.ts +208 -0
- package/src/modules/marketplace/github-facade/github-facade.routes.ts +268 -0
- package/src/modules/marketplace/github-facade/github-facade.service.ts +221 -0
- package/src/modules/marketplace/github-facade/index.ts +25 -0
- package/src/modules/marketplace/index.ts +3 -0
- package/src/modules/marketplace/marketplace-repo.service.ts +337 -0
- package/src/modules/mcp/oauth/bevel-oauth-provider.ts +3 -0
- package/src/modules/mcp/oauth/oauth-consent.routes.ts +24 -2
- package/src/modules/mcp/oauth/oauth-state.ts +15 -3
- package/src/modules/plugins/__tests__/bundle-dialect.e2e.test.ts +163 -0
- package/src/modules/plugins/__tests__/compile-marketplace.test.ts +294 -0
- package/src/modules/plugins/__tests__/plugin-index.service.test.ts +56 -12
- package/src/modules/plugins/__tests__/plugin-links.service.test.ts +287 -0
- package/src/modules/plugins/__tests__/plugin-provision.service.test.ts +205 -5
- package/src/modules/plugins/__tests__/plugin-rename.service.test.ts +394 -0
- package/src/modules/plugins/__tests__/plugins.routes.test.ts +80 -33
- package/src/modules/plugins/compile/compile-marketplace.ts +403 -0
- package/src/modules/plugins/compile/marketplace-compiler.service.ts +150 -0
- package/src/modules/plugins/discovery/__tests__/kb-plugin-source.test.ts +329 -0
- package/src/modules/plugins/discovery/bundle-dialect/bundle.source.ts +140 -0
- package/src/modules/plugins/discovery/bundle-dialect/registry.ts +175 -0
- package/src/modules/plugins/discovery/kb-plugin-source.ts +114 -0
- package/src/modules/plugins/discovery/native.source.ts +122 -0
- package/src/modules/plugins/discovery/plugin-source.ts +99 -0
- package/src/modules/plugins/index.ts +10 -0
- package/src/modules/plugins/plugin-links.service.ts +363 -0
- package/src/modules/plugins/plugin-links.ts +184 -0
- package/src/modules/plugins/plugin-provision.service.ts +160 -54
- package/src/modules/plugins/plugin-rename.service.ts +298 -0
- package/src/modules/plugins/plugins.contract.ts +28 -1
- package/src/modules/plugins/plugins.routes.ts +128 -11
- package/src/modules/plugins/plugins.service.ts +106 -53
- package/src/modules/settings/__tests__/deployment-settings.service.test.ts +57 -0
- package/src/modules/settings/__tests__/setup.routes.sync-status.test.ts +77 -0
- package/src/modules/settings/deployment-settings.service.ts +95 -2
- package/src/modules/settings/setup.routes.ts +24 -0
- package/src/modules/skills/__tests__/skill-access-requests.routes.test.ts +128 -0
- package/src/modules/skills/__tests__/skills.service.test.ts +85 -0
- package/src/modules/skills/index.ts +1 -0
- package/src/modules/skills/pending-skills.service.ts +7 -5
- package/src/modules/skills/skill-access-requests.routes.ts +199 -0
- package/src/modules/skills/skills.contract.ts +32 -0
- package/src/modules/skills/skills.routes.ts +59 -3
- package/src/modules/skills/skills.service.ts +84 -22
- package/src/modules/tool-auth/external-api-key.interface.ts +20 -1
- package/src/modules/tool-auth/external-api-key.service.ts +31 -13
- package/src/modules/tool-manuals/__tests__/mcp-json-discovery.test.ts +24 -1
- package/src/modules/tool-manuals/__tests__/tool-manuals.cli.test.ts +2 -0
- package/src/modules/tool-manuals/mcp-json-discovery.ts +154 -88
- package/src/modules/tool-manuals/tool-manuals.service.ts +14 -23
- package/src/modules/workflow/__tests__/preserve-roles-yaml.test.ts +1 -1
- package/src/modules/workflow/__tests__/workflow.service.commitFileWhileLocked.test.ts +1 -0
- package/src/modules/workflow/__tests__/workflow.service.facade.test.ts +2 -2
- package/src/modules/workflow/__tests__/workflow.service.releaseLock.test.ts +119 -2
- package/src/modules/workflow/__tests__/workflow.service.sync.test.ts +437 -0
- package/src/modules/workflow/git/__tests__/git.service.postMergePull.test.ts +3 -3
- package/src/modules/workflow/git/__tests__/git.service.pull.test.ts +47 -4
- package/src/modules/workflow/git/__tests__/git.service.syncFromRemote.test.ts +253 -0
- package/src/modules/workflow/git/git.service.ts +239 -56
- package/src/modules/workflow/git/pull-request.service.ts +9 -0
- package/src/modules/workflow/workflow.service.ts +260 -9
- package/src/modules/workspace/__tests__/workspace.routes.read-gate.test.ts +6 -7
- package/src/modules/workspace/__tests__/workspace.service.list-cloned.test.ts +93 -0
- package/src/modules/workspace/__tests__/workspace.service.missing-branch.test.ts +28 -0
- package/src/modules/workspace/__tests__/workspace.service.read-filter.test.ts +42 -12
- package/src/modules/workspace/startup/steps/__tests__/steps.test.ts +219 -4
- package/src/modules/workspace/startup/steps/plugin-manifests.step.ts +129 -0
- package/src/modules/workspace/startup/steps/seed-tree.ts +44 -2
- package/src/modules/workspace/startup/steps/template-files.step.ts +131 -27
- package/src/modules/workspace/workspace.routes.ts +9 -17
- package/src/modules/workspace/workspace.service.ts +107 -16
- package/src/shared/__tests__/filename.test.ts +0 -0
- package/src/shared/__tests__/fs-walk.test.ts +22 -1
- package/src/shared/__tests__/kb-walk.test.ts +107 -0
- package/src/shared/__tests__/path-order.test.ts +24 -0
- package/src/shared/__tests__/ttl-cache.test.ts +55 -0
- package/src/shared/domain-errors.ts +29 -0
- package/src/shared/fs-errors.ts +10 -0
- package/src/shared/fs-walk.ts +38 -23
- package/src/shared/kb-walk.ts +95 -0
- package/src/shared/path-order.ts +33 -0
- package/src/shared/ttl-cache.ts +33 -1
package/kb-template/AGENTS.md
CHANGED
|
@@ -6,7 +6,7 @@ maintaining it.
|
|
|
6
6
|
> **This file is managed by the platform.** Every server restart replaces it
|
|
7
7
|
> with the current template, so edits made here are overwritten. Deployment- or
|
|
8
8
|
> team-specific conventions belong in files of your own — anywhere under
|
|
9
|
-
> `
|
|
9
|
+
> `{{knowledgeBaseDir}}/`, linked from wherever they are needed.
|
|
10
10
|
|
|
11
11
|
**There is no required format for knowledge.** Write markdown the way the
|
|
12
12
|
subject wants to be written: prose, tables, checklists, diagrams, whatever
|
|
@@ -20,34 +20,69 @@ change them.
|
|
|
20
20
|
|
|
21
21
|
```text
|
|
22
22
|
knowledge-base/
|
|
23
|
-
├──
|
|
24
|
-
├──
|
|
23
|
+
├── {{knowledgeBaseDir}}/ ← the knowledge itself; organise it however suits you
|
|
24
|
+
├── {{skillsDir}}/ ← shared skills, organised by who owns them
|
|
25
|
+
├── {{pluginsDir}}/ ← one folder per plugin: its tools, and links to skills
|
|
25
26
|
├── roles.yaml ← identity → role mapping (Admin-only edits)
|
|
26
27
|
└── access.md ← repo-root access-control rules
|
|
27
28
|
```
|
|
28
29
|
|
|
30
|
+
(The three root names above are this deployment's own — a deployment may
|
|
31
|
+
rename them in its setup screen, and this guide is rendered with the names in
|
|
32
|
+
effect each time it is written.)
|
|
33
|
+
|
|
29
34
|
Tool paths are workspace-relative, and the workspace root holds this
|
|
30
35
|
repository as the `knowledge-base/` folder: a file in it is
|
|
31
|
-
`knowledge-base/
|
|
36
|
+
`knowledge-base/{{knowledgeBaseDir}}/Foo.md`, never `{{knowledgeBaseDir}}/Foo.md`. A path
|
|
32
37
|
without that prefix is refused, because it would land beside the repository
|
|
33
38
|
where git never sees it.
|
|
34
39
|
|
|
35
|
-
Only those
|
|
40
|
+
Only those three folders are structural. `{{skillsDir}}/` holds shared skills at any
|
|
41
|
+
depth — the folder that holds a `SKILL.md` is the skill, and everything above
|
|
42
|
+
it is ownership (`{{skillsDir}}/<scope>/…/<skill>/SKILL.md`, with an `access.md` in
|
|
43
|
+
any scope folder that needs its own rules). `{{pluginsDir}}/` has a layout the
|
|
36
44
|
platform reads:
|
|
37
45
|
|
|
38
46
|
```text
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
{{pluginsDir}}/<Plugin>/plugin.json the manifest (Agent Plugins) — what makes the folder a plugin; its `name` is the plugin's identity
|
|
48
|
+
{{pluginsDir}}/<Plugin>/skills/<skill>/SKILL.md a skill that lives inside the plugin
|
|
49
|
+
{{pluginsDir}}/<Plugin>/mcp.json MCP servers (authoritative)
|
|
50
|
+
{{pluginsDir}}/<Plugin>/software.bevel.hexis/tools/ `.tool` manuals
|
|
51
|
+
{{pluginsDir}}/<Plugin>/access.md who can read/write the plugin
|
|
52
|
+
{{pluginsDir}}/personal-<user-id>/… one per person: private
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**The manifest's `name` is the plugin.** It is a kebab-case identifier
|
|
56
|
+
(`sales-team`), and it is what every grant spells (`plugin/sales-team/read`),
|
|
57
|
+
what the URLs and the catalog key on, and what the compiled marketplace
|
|
58
|
+
publishes the plugin as. `displayName` is what people see it called ("Sales
|
|
59
|
+
Team"); absent, the folder name is shown. Rename a plugin from its page in the
|
|
60
|
+
app: an identifier change rewrites every grant that names it, in one commit —
|
|
61
|
+
editing `name` by hand leaves those grants pointing at a plugin that no longer
|
|
62
|
+
exists.
|
|
63
|
+
|
|
64
|
+
**A plugin LINKS shared skills rather than containing them.** Its manifest
|
|
65
|
+
lists skill paths under `extensions["software.bevel.hexis"].skills` — each
|
|
66
|
+
entry is one skill folder or a folder of skills under `{{skillsDir}}/`:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{ "extensions": { "software.bevel.hexis": { "skills": ["{{skillsDir}}/Engineering/deploy", "{{skillsDir}}/Sales"] } } }
|
|
45
70
|
```
|
|
46
71
|
|
|
47
|
-
|
|
48
|
-
|
|
72
|
+
One skill, stored once, can be listed by many plugins. A plugin's effective
|
|
73
|
+
skills are the ones inside its folder plus everything its links resolve to.
|
|
74
|
+
Do not edit that list by hand: linking is done from the plugin's page in the
|
|
75
|
+
app, because it is two edits at once — the manifest entry AND a grant on the
|
|
76
|
+
skill (see *Access control* below). A manifest entry without the grant lists
|
|
77
|
+
a skill the plugin's members cannot read; the app shows such a link as
|
|
78
|
+
needing setup and offers Repair.
|
|
49
79
|
|
|
50
|
-
**
|
|
80
|
+
**Ownership decides who may read a skill, never the plugin.** A shared
|
|
81
|
+
skill's readability comes from the `access.md` rules on its own folder and
|
|
82
|
+
the scopes above it. A plugin that links a skill someone cannot read simply
|
|
83
|
+
does not show it to them.
|
|
84
|
+
|
|
85
|
+
**Symlinks are not supported anywhere under `{{pluginsDir}}/`.** Access control
|
|
51
86
|
resolves rules by path, and a symlink is a second path to the same content —
|
|
52
87
|
the two can disagree about who may read what. The platform never creates
|
|
53
88
|
them and ignores any it finds (they can only arrive via a direct git push).
|
|
@@ -89,20 +124,22 @@ answer to that — and `mcp.json` carries only where a server is, never a
|
|
|
89
124
|
under `extensions["software.bevel.hexis"].mcpServers[<name>]`, which is ours
|
|
90
125
|
to interpret and which other clients ignore by design.
|
|
91
126
|
|
|
92
|
-
**Plugin folders are made through the app, not by writing files.** A
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
127
|
+
**Plugin folders are made through the app, not by writing files.** A folder
|
|
128
|
+
is a plugin exactly when it carries a `plugin.json` (the platform writes one
|
|
129
|
+
into every legacy plugin folder at startup), and it is LISTED only when it
|
|
130
|
+
also carries an `access.md` — a bare directory under `{{pluginsDir}}/` is neither.
|
|
131
|
+
Plugins may sit at any depth under `{{pluginsDir}}/`; a folder that holds plugins
|
|
132
|
+
deeper down is a grouping folder, not a plugin. A new plugin needs an
|
|
133
|
+
`access.md` naming who runs it, and the write gate refuses a plain write
|
|
134
|
+
into an unused name there — so do not try to create a plugin by writing a
|
|
135
|
+
skill into `{{pluginsDir}}/<new-name>/…`; it will be denied. Send the user to the app's **New plugin** button (or its
|
|
99
136
|
`POST /api/plugins` endpoint), then write into the folder it made. Names
|
|
100
137
|
starting with `personal-` are reserved: one such folder exists per person,
|
|
101
138
|
created automatically with their first personal skill, readable only by its
|
|
102
139
|
owner and never listed as a plugin — a signed-in user's own skills belong
|
|
103
140
|
there, and move into a plugin by moving the skill's folder.
|
|
104
141
|
|
|
105
|
-
Everything under `
|
|
142
|
+
Everything under `{{knowledgeBaseDir}}/` is yours to arrange. Subfolders, naming,
|
|
106
143
|
whether a topic is one file or twenty — all of it is a judgement call about
|
|
107
144
|
what the next reader needs, not a rule the platform enforces.
|
|
108
145
|
|
|
@@ -118,7 +155,18 @@ Write access to any path is governed by `roles.yaml` (who has which role) and
|
|
|
118
155
|
|
|
119
156
|
- **Roles** in `roles.yaml` map a role name to a list of emails. Role names are
|
|
120
157
|
case- and whitespace-insensitive (`Admin` = `admin` = `ADMIN`; `Product Team`
|
|
121
|
-
= `product team`). The reserved name `deny` cannot be used
|
|
158
|
+
= `product team`). The reserved name `deny` cannot be used, and neither can
|
|
159
|
+
names starting with `role/` or `plugin/` — those spellings are tokens in
|
|
160
|
+
access entries (below).
|
|
161
|
+
- **Plugins are grantable principals.** `plugin/<name>/read`,
|
|
162
|
+
`plugin/<name>/write` and `plugin/<name>/owner` in any access file mean
|
|
163
|
+
everyone who currently holds that verb on the plugin whose manifest `name`
|
|
164
|
+
is `<name>`, derived live from the plugin's own `access.md`. Any spelling
|
|
165
|
+
folds to the identifier (`plugin/GTM/read` and `plugin/gtm/read` are one
|
|
166
|
+
principal). This is how a shared skill is made visible to a plugin's
|
|
167
|
+
members: `read: plugin/gtm/read` on the skill's folder.
|
|
168
|
+
Adding or removing someone on the plugin changes what they can read
|
|
169
|
+
everywhere the token is granted, with no copying.
|
|
122
170
|
- **Access rules** live in `access.md` files, which carry **two blocks with two
|
|
123
171
|
scopes**: the body declares the rules for the folder the file sits in, and the
|
|
124
172
|
frontmatter declares who may read and write that `access.md` itself. Each
|
|
@@ -155,24 +203,41 @@ File-level write access decides how a change lands on the default branch:
|
|
|
155
203
|
review flow — and prefer a change request when in doubt, when the change is
|
|
156
204
|
large, or when it touches content the user does not own.
|
|
157
205
|
|
|
158
|
-
## Skills (`
|
|
206
|
+
## Skills (`{{skillsDir}}/<scope>/…/<skill>/SKILL.md`, or `{{pluginsDir}}/<Plugin>/skills/<skill>/SKILL.md`)
|
|
159
207
|
|
|
160
|
-
A skill is a folder holding a `SKILL.md` and whatever files it needs.
|
|
161
|
-
|
|
208
|
+
A skill is a folder holding a `SKILL.md` and whatever files it needs. Shared
|
|
209
|
+
skills live under `{{skillsDir}}/`, organised by ownership; a skill that belongs to
|
|
210
|
+
exactly one plugin may live inside that plugin's `skills/` folder instead.
|
|
211
|
+
Skill names are unique across the whole catalog, whichever home they have.
|
|
212
|
+
The frontmatter names it, declares which tools it may use, and may carry a
|
|
213
|
+
governance record:
|
|
162
214
|
|
|
163
215
|
```yaml
|
|
164
216
|
---
|
|
165
217
|
name: weekly-newsletter
|
|
166
218
|
description: Drafts the Friday newsletter for review.
|
|
167
219
|
allowed-tools: [slack_post_message]
|
|
220
|
+
metadata:
|
|
221
|
+
version: "1.4.0"
|
|
222
|
+
owner: "GTM"
|
|
223
|
+
lifecycle: active
|
|
168
224
|
---
|
|
169
225
|
```
|
|
170
226
|
|
|
171
227
|
The body is the instructions, in plain markdown. `allowed-tools` entries are
|
|
172
|
-
tool names from the `.tool` manuals
|
|
173
|
-
|
|
228
|
+
tool names from the `.tool` manuals and MCP servers of the plugins that hold
|
|
229
|
+
the skill. `metadata.version` is semver; `metadata.lifecycle` is `active`,
|
|
230
|
+
`deprecated` (still served, flagged in the library) or `retired` (kept for
|
|
231
|
+
its owners, never distributed to agents).
|
|
232
|
+
|
|
233
|
+
**How skills reach agents.** Through the MCP server (`list_skills`,
|
|
234
|
+
`get_skill`), or as native plugins: every user can clone a git remote from
|
|
235
|
+
the app's external-agent page that holds a plugin marketplace compiled from
|
|
236
|
+
exactly the skills they may read — one plugin per plugin here, a
|
|
237
|
+
`skills-and-knowledge` plugin for the rest plus this knowledge base's MCP
|
|
238
|
+
server, and a `hexis-all` bundle that installs everything.
|
|
174
239
|
|
|
175
|
-
## Tool Manuals (`
|
|
240
|
+
## Tool Manuals (`{{pluginsDir}}/<Plugin>/software.bevel.hexis/tools/*.tool`)
|
|
176
241
|
|
|
177
242
|
Each plugin folder holds `*.tool` files — reusable **tool manuals** that let agents call external APIs. They are **not part of the knowledge graph** (never modelled as nodes) and are access-controlled like any other file via `access.md`. Any user who can *read* a `.tool` can use its tools; anyone who can *write* it sets its shared (admin) secrets (see below). Put each manual in the plugin's `software.bevel.hexis/tools/` directory, beside
|
|
178
243
|
the skills that use it. The same integration may exist in several plugins as
|
|
@@ -371,7 +436,7 @@ merely correct.
|
|
|
371
436
|
|
|
372
437
|
## Finding things
|
|
373
438
|
|
|
374
|
-
- `grep` for keywords across `
|
|
439
|
+
- `grep` for keywords across `{{knowledgeBaseDir}}/`.
|
|
375
440
|
- Follow markdown links: when you read `[Some Page](relative/path/Some Page.md)`,
|
|
376
441
|
that path is relative to the file you are reading.
|
|
377
442
|
- `list_files` to see the shape of a folder before assuming where something
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
CREATE TABLE "github_facade_codes" (
|
|
2
|
+
"user_id" uuid PRIMARY KEY NOT NULL,
|
|
3
|
+
"client_id" text NOT NULL,
|
|
4
|
+
"code_hash" text NOT NULL,
|
|
5
|
+
"redirect_uri" text NOT NULL,
|
|
6
|
+
"expires_at" timestamp NOT NULL,
|
|
7
|
+
"consumed_at" timestamp,
|
|
8
|
+
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
9
|
+
CONSTRAINT "github_facade_codes_code_hash_unique" UNIQUE("code_hash")
|
|
10
|
+
);
|
|
11
|
+
--> statement-breakpoint
|
|
12
|
+
CREATE TABLE "github_facade_identity" (
|
|
13
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
14
|
+
"app_id" text NOT NULL,
|
|
15
|
+
"client_id" text NOT NULL,
|
|
16
|
+
"client_secret" text NOT NULL,
|
|
17
|
+
"webhook_secret" text NOT NULL,
|
|
18
|
+
"private_key_pem" text NOT NULL,
|
|
19
|
+
"public_key_pem" text NOT NULL,
|
|
20
|
+
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
21
|
+
"rotated_at" timestamp
|
|
22
|
+
);
|
|
23
|
+
--> statement-breakpoint
|
|
24
|
+
ALTER TABLE "api_tokens" ADD COLUMN "kind" text DEFAULT 'key' NOT NULL;--> statement-breakpoint
|
|
25
|
+
ALTER TABLE "github_facade_codes" ADD CONSTRAINT "github_facade_codes_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
|