@bevel-software/platform-core-backend 0.20.0 → 0.21.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/dist/core/catalog-cache-invalidation.d.ts +7 -2
- package/dist/core/catalog-cache-invalidation.d.ts.map +1 -1
- package/dist/core/catalog-cache-invalidation.js +8 -9
- package/dist/core/catalog-cache-invalidation.js.map +1 -1
- package/dist/core/core-ports.d.ts +19 -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 +2 -0
- package/dist/core/create-core-server.d.ts.map +1 -1
- package/dist/core/create-core-server.js +23 -105
- package/dist/core/create-core-server.js.map +1 -1
- package/dist/core/create-core-services.d.ts +30 -5
- package/dist/core/create-core-services.d.ts.map +1 -1
- package/dist/core/create-core-services.js +136 -81
- package/dist/core/create-core-services.js.map +1 -1
- package/dist/core/lifecycle.d.ts +74 -28
- package/dist/core/lifecycle.d.ts.map +1 -1
- package/dist/core/lifecycle.js +157 -20
- package/dist/core/lifecycle.js.map +1 -1
- package/dist/core/public-config.d.ts +5 -1
- package/dist/core/public-config.d.ts.map +1 -1
- package/dist/core/public-config.js +7 -5
- package/dist/core/public-config.js.map +1 -1
- package/dist/core-config.d.ts +95 -1
- package/dist/core-config.d.ts.map +1 -1
- package/dist/core-config.js +24 -8
- package/dist/core-config.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/modules/access/access-control.service.d.ts +18 -1
- package/dist/modules/access/access-control.service.d.ts.map +1 -1
- package/dist/modules/access/access-control.service.js +19 -8
- package/dist/modules/access/access-control.service.js.map +1 -1
- package/dist/modules/access/access.routes.d.ts +2 -1
- package/dist/modules/access/access.routes.d.ts.map +1 -1
- package/dist/modules/access/access.routes.js +10 -10
- package/dist/modules/access/access.routes.js.map +1 -1
- package/dist/modules/access/change-read-gate.d.ts +6 -3
- package/dist/modules/access/change-read-gate.d.ts.map +1 -1
- package/dist/modules/access/change-read-gate.js +9 -6
- package/dist/modules/access/change-read-gate.js.map +1 -1
- package/dist/modules/access/creator-access.d.ts +4 -2
- package/dist/modules/access/creator-access.d.ts.map +1 -1
- package/dist/modules/access/creator-access.js +7 -4
- package/dist/modules/access/creator-access.js.map +1 -1
- package/dist/modules/agent-instructions/read-preamble.d.ts +2 -1
- package/dist/modules/agent-instructions/read-preamble.d.ts.map +1 -1
- package/dist/modules/agent-instructions/read-preamble.js +6 -9
- package/dist/modules/agent-instructions/read-preamble.js.map +1 -1
- package/dist/modules/auth/account-admission.d.ts +40 -0
- package/dist/modules/auth/account-admission.d.ts.map +1 -0
- package/dist/modules/auth/account-admission.js +17 -0
- package/dist/modules/auth/account-admission.js.map +1 -0
- package/dist/modules/auth/account.routes.d.ts.map +1 -1
- package/dist/modules/auth/account.routes.js +4 -1
- package/dist/modules/auth/account.routes.js.map +1 -1
- package/dist/modules/auth/auth.service.d.ts +19 -1
- package/dist/modules/auth/auth.service.d.ts.map +1 -1
- package/dist/modules/auth/auth.service.js +33 -1
- package/dist/modules/auth/auth.service.js.map +1 -1
- package/dist/modules/auth/oidc-auth-provider.d.ts.map +1 -1
- package/dist/modules/auth/oidc-auth-provider.js +9 -0
- package/dist/modules/auth/oidc-auth-provider.js.map +1 -1
- package/dist/modules/connection-probe/connection-probe.service.d.ts +13 -1
- package/dist/modules/connection-probe/connection-probe.service.d.ts.map +1 -1
- package/dist/modules/connection-probe/connection-probe.service.js +10 -2
- package/dist/modules/connection-probe/connection-probe.service.js.map +1 -1
- package/dist/modules/database/advisory-lock.d.ts +17 -0
- package/dist/modules/database/advisory-lock.d.ts.map +1 -1
- package/dist/modules/database/advisory-lock.js +24 -3
- package/dist/modules/database/advisory-lock.js.map +1 -1
- package/dist/modules/database/connection.d.ts +67 -2
- package/dist/modules/database/connection.d.ts.map +1 -1
- package/dist/modules/database/connection.js +118 -12
- package/dist/modules/database/connection.js.map +1 -1
- package/dist/modules/database/migrate.d.ts +1 -1
- package/dist/modules/database/migrate.d.ts.map +1 -1
- package/dist/modules/database/migrate.js +27 -3
- package/dist/modules/database/migrate.js.map +1 -1
- package/dist/modules/kb-fs/branch-name.d.ts +0 -1
- package/dist/modules/kb-fs/branch-name.d.ts.map +1 -1
- package/dist/modules/kb-fs/branch-name.js +3 -3
- package/dist/modules/kb-fs/branch-name.js.map +1 -1
- package/dist/modules/kb-fs/clone-config.d.ts +9 -8
- package/dist/modules/kb-fs/clone-config.d.ts.map +1 -1
- package/dist/modules/kb-fs/clone-config.js +14 -12
- package/dist/modules/kb-fs/clone-config.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +7 -0
- package/dist/modules/mcp/mcp.service.d.ts.map +1 -1
- package/dist/modules/mcp/mcp.service.js +4 -4
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/plugins/compile/marketplace-compiler.service.d.ts +4 -4
- package/dist/modules/plugins/compile/marketplace-compiler.service.d.ts.map +1 -1
- package/dist/modules/plugins/compile/marketplace-compiler.service.js +7 -10
- package/dist/modules/plugins/compile/marketplace-compiler.service.js.map +1 -1
- package/dist/modules/plugins/discovery/bundle-dialect/bundle.source.d.ts +4 -1
- package/dist/modules/plugins/discovery/bundle-dialect/bundle.source.d.ts.map +1 -1
- package/dist/modules/plugins/discovery/bundle-dialect/bundle.source.js +5 -3
- package/dist/modules/plugins/discovery/bundle-dialect/bundle.source.js.map +1 -1
- package/dist/modules/plugins/discovery/kb-plugin-source.d.ts +6 -1
- package/dist/modules/plugins/discovery/kb-plugin-source.d.ts.map +1 -1
- package/dist/modules/plugins/discovery/kb-plugin-source.js +14 -9
- package/dist/modules/plugins/discovery/kb-plugin-source.js.map +1 -1
- package/dist/modules/plugins/discovery/native.source.d.ts +4 -1
- package/dist/modules/plugins/discovery/native.source.d.ts.map +1 -1
- package/dist/modules/plugins/discovery/native.source.js +4 -2
- package/dist/modules/plugins/discovery/native.source.js.map +1 -1
- 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/join-request-jobs.service.d.ts +3 -1
- package/dist/modules/plugins/join-request-jobs.service.d.ts.map +1 -1
- package/dist/modules/plugins/join-request-jobs.service.js +6 -6
- package/dist/modules/plugins/join-request-jobs.service.js.map +1 -1
- package/dist/modules/plugins/join-requests.service.d.ts +3 -1
- package/dist/modules/plugins/join-requests.service.d.ts.map +1 -1
- package/dist/modules/plugins/join-requests.service.js +9 -8
- package/dist/modules/plugins/join-requests.service.js.map +1 -1
- package/dist/modules/plugins/plugin-links.d.ts +65 -10
- package/dist/modules/plugins/plugin-links.d.ts.map +1 -1
- package/dist/modules/plugins/plugin-links.js +136 -31
- package/dist/modules/plugins/plugin-links.js.map +1 -1
- package/dist/modules/plugins/plugin-links.service.d.ts +107 -5
- package/dist/modules/plugins/plugin-links.service.d.ts.map +1 -1
- package/dist/modules/plugins/plugin-links.service.js +151 -21
- package/dist/modules/plugins/plugin-links.service.js.map +1 -1
- package/dist/modules/plugins/plugin-provision.service.d.ts +10 -3
- package/dist/modules/plugins/plugin-provision.service.d.ts.map +1 -1
- package/dist/modules/plugins/plugin-provision.service.js +33 -26
- package/dist/modules/plugins/plugin-provision.service.js.map +1 -1
- package/dist/modules/plugins/plugin-rename.service.d.ts +4 -2
- package/dist/modules/plugins/plugin-rename.service.d.ts.map +1 -1
- package/dist/modules/plugins/plugin-rename.service.js +10 -12
- package/dist/modules/plugins/plugin-rename.service.js.map +1 -1
- package/dist/modules/plugins/plugins.routes.d.ts +3 -0
- package/dist/modules/plugins/plugins.routes.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.routes.js +45 -15
- package/dist/modules/plugins/plugins.routes.js.map +1 -1
- package/dist/modules/plugins/plugins.service.d.ts +4 -4
- package/dist/modules/plugins/plugins.service.d.ts.map +1 -1
- package/dist/modules/plugins/plugins.service.js +7 -10
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/dist/modules/plugins/teams.routes.d.ts +4 -1
- package/dist/modules/plugins/teams.routes.d.ts.map +1 -1
- package/dist/modules/plugins/teams.routes.js +11 -9
- package/dist/modules/plugins/teams.routes.js.map +1 -1
- package/dist/modules/secrets-vault/index.d.ts +1 -1
- package/dist/modules/secrets-vault/index.d.ts.map +1 -1
- package/dist/modules/secrets-vault/index.js +1 -1
- package/dist/modules/secrets-vault/index.js.map +1 -1
- package/dist/modules/secrets-vault/secrets-variable-loader.d.ts +29 -11
- package/dist/modules/secrets-vault/secrets-variable-loader.d.ts.map +1 -1
- package/dist/modules/secrets-vault/secrets-variable-loader.js +46 -21
- package/dist/modules/secrets-vault/secrets-variable-loader.js.map +1 -1
- package/dist/modules/secrets-vault/secrets-vault.routes.d.ts +3 -0
- package/dist/modules/secrets-vault/secrets-vault.routes.d.ts.map +1 -1
- package/dist/modules/secrets-vault/secrets-vault.routes.js +4 -6
- package/dist/modules/secrets-vault/secrets-vault.routes.js.map +1 -1
- package/dist/modules/settings/deployment-settings.service.d.ts +12 -8
- package/dist/modules/settings/deployment-settings.service.d.ts.map +1 -1
- package/dist/modules/settings/deployment-settings.service.js +20 -22
- package/dist/modules/settings/deployment-settings.service.js.map +1 -1
- package/dist/modules/settings/setup.routes.d.ts +9 -2
- package/dist/modules/settings/setup.routes.d.ts.map +1 -1
- package/dist/modules/settings/setup.routes.js +20 -14
- package/dist/modules/settings/setup.routes.js.map +1 -1
- package/dist/modules/skills/allowed-tools-check.d.ts +4 -3
- package/dist/modules/skills/allowed-tools-check.d.ts.map +1 -1
- package/dist/modules/skills/allowed-tools-check.js +8 -8
- package/dist/modules/skills/allowed-tools-check.js.map +1 -1
- package/dist/modules/skills/pending-skills.service.d.ts +3 -1
- package/dist/modules/skills/pending-skills.service.d.ts.map +1 -1
- package/dist/modules/skills/pending-skills.service.js +9 -6
- package/dist/modules/skills/pending-skills.service.js.map +1 -1
- package/dist/modules/skills/skill-access-requests.routes.d.ts +2 -1
- package/dist/modules/skills/skill-access-requests.routes.d.ts.map +1 -1
- package/dist/modules/skills/skill-access-requests.routes.js +6 -6
- package/dist/modules/skills/skill-access-requests.routes.js.map +1 -1
- package/dist/modules/skills/skills.routes.d.ts +4 -1
- package/dist/modules/skills/skills.routes.d.ts.map +1 -1
- package/dist/modules/skills/skills.routes.js +4 -4
- package/dist/modules/skills/skills.routes.js.map +1 -1
- package/dist/modules/skills/skills.service.d.ts +4 -2
- package/dist/modules/skills/skills.service.d.ts.map +1 -1
- package/dist/modules/skills/skills.service.js +13 -11
- package/dist/modules/skills/skills.service.js.map +1 -1
- package/dist/modules/tool-manuals/mcp-json-discovery.d.ts +2 -1
- package/dist/modules/tool-manuals/mcp-json-discovery.d.ts.map +1 -1
- package/dist/modules/tool-manuals/mcp-json-discovery.js +6 -5
- package/dist/modules/tool-manuals/mcp-json-discovery.js.map +1 -1
- package/dist/modules/tool-manuals/mcp-server-edit.service.d.ts +4 -2
- package/dist/modules/tool-manuals/mcp-server-edit.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/mcp-server-edit.service.js +12 -10
- package/dist/modules/tool-manuals/mcp-server-edit.service.js.map +1 -1
- package/dist/modules/tool-manuals/pending-tools.service.d.ts +3 -1
- package/dist/modules/tool-manuals/pending-tools.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/pending-tools.service.js +19 -16
- package/dist/modules/tool-manuals/pending-tools.service.js.map +1 -1
- package/dist/modules/tool-manuals/tool-delete.service.d.ts +4 -2
- package/dist/modules/tool-manuals/tool-delete.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-delete.service.js +14 -12
- package/dist/modules/tool-manuals/tool-delete.service.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.routes.d.ts +3 -1
- package/dist/modules/tool-manuals/tool-manuals.routes.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.routes.js +7 -7
- package/dist/modules/tool-manuals/tool-manuals.routes.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts +4 -2
- package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.service.js +15 -12
- package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.tools.d.ts +3 -0
- package/dist/modules/tool-manuals/tool-manuals.tools.d.ts.map +1 -1
- package/dist/modules/tool-manuals/tool-manuals.tools.js +4 -6
- package/dist/modules/tool-manuals/tool-manuals.tools.js.map +1 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.d.ts +3 -2
- package/dist/modules/workflow/agent-tools/workflow.tools.d.ts.map +1 -1
- package/dist/modules/workflow/agent-tools/workflow.tools.js +9 -9
- package/dist/modules/workflow/agent-tools/workflow.tools.js.map +1 -1
- package/dist/modules/workflow/git/git.service.d.ts +11 -5
- package/dist/modules/workflow/git/git.service.d.ts.map +1 -1
- package/dist/modules/workflow/git/git.service.js +23 -14
- package/dist/modules/workflow/git/git.service.js.map +1 -1
- package/dist/modules/workflow/git/node-git-runner.d.ts +26 -2
- package/dist/modules/workflow/git/node-git-runner.d.ts.map +1 -1
- package/dist/modules/workflow/git/node-git-runner.js +35 -5
- package/dist/modules/workflow/git/node-git-runner.js.map +1 -1
- package/dist/modules/workflow/review-workflow/review-workflow.service.d.ts.map +1 -1
- package/dist/modules/workflow/review-workflow/review-workflow.service.js +9 -4
- package/dist/modules/workflow/review-workflow/review-workflow.service.js.map +1 -1
- package/dist/modules/workflow/session-ontology.service.d.ts +6 -1
- package/dist/modules/workflow/session-ontology.service.d.ts.map +1 -1
- package/dist/modules/workflow/session-ontology.service.js +6 -2
- package/dist/modules/workflow/session-ontology.service.js.map +1 -1
- package/dist/modules/workflow/workflow.service.d.ts +8 -3
- package/dist/modules/workflow/workflow.service.d.ts.map +1 -1
- package/dist/modules/workflow/workflow.service.js +33 -23
- package/dist/modules/workflow/workflow.service.js.map +1 -1
- package/dist/modules/workspace/session-ontology.gate.d.ts +3 -1
- package/dist/modules/workspace/session-ontology.gate.d.ts.map +1 -1
- package/dist/modules/workspace/session-ontology.gate.js +3 -3
- package/dist/modules/workspace/session-ontology.gate.js.map +1 -1
- package/dist/modules/workspace/startup/kb-git.d.ts +4 -3
- package/dist/modules/workspace/startup/kb-git.d.ts.map +1 -1
- package/dist/modules/workspace/startup/kb-git.js +15 -13
- package/dist/modules/workspace/startup/kb-git.js.map +1 -1
- package/dist/modules/workspace/startup/kb-startup-runner.d.ts +5 -8
- package/dist/modules/workspace/startup/kb-startup-runner.d.ts.map +1 -1
- package/dist/modules/workspace/startup/kb-startup-runner.js +35 -38
- package/dist/modules/workspace/startup/kb-startup-runner.js.map +1 -1
- package/dist/modules/workspace/startup/steps/groups-to-plugins.step.d.ts +7 -1
- package/dist/modules/workspace/startup/steps/groups-to-plugins.step.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/groups-to-plugins.step.js +23 -16
- package/dist/modules/workspace/startup/steps/groups-to-plugins.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/personal-spaces.step.d.ts +7 -1
- package/dist/modules/workspace/startup/steps/personal-spaces.step.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/personal-spaces.step.js +12 -5
- package/dist/modules/workspace/startup/steps/personal-spaces.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/plugin-display-names.step.d.ts +7 -1
- package/dist/modules/workspace/startup/steps/plugin-display-names.step.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/plugin-display-names.step.js +12 -5
- package/dist/modules/workspace/startup/steps/plugin-display-names.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/plugin-manifests.step.d.ts +7 -1
- package/dist/modules/workspace/startup/steps/plugin-manifests.step.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/plugin-manifests.step.js +12 -5
- package/dist/modules/workspace/startup/steps/plugin-manifests.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/seed-tree.d.ts +4 -1
- package/dist/modules/workspace/startup/steps/seed-tree.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/seed-tree.js +14 -11
- package/dist/modules/workspace/startup/steps/seed-tree.js.map +1 -1
- package/dist/modules/workspace/startup/steps/template-files.step.d.ts +17 -3
- package/dist/modules/workspace/startup/steps/template-files.step.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/template-files.step.js +36 -30
- package/dist/modules/workspace/startup/steps/template-files.step.js.map +1 -1
- package/dist/modules/workspace/startup/steps/template-source.d.ts +6 -1
- package/dist/modules/workspace/startup/steps/template-source.d.ts.map +1 -1
- package/dist/modules/workspace/startup/steps/template-source.js +10 -6
- package/dist/modules/workspace/startup/steps/template-source.js.map +1 -1
- package/dist/modules/workspace/workspace.routes.d.ts +2 -1
- package/dist/modules/workspace/workspace.routes.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.routes.js +8 -7
- package/dist/modules/workspace/workspace.routes.js.map +1 -1
- package/dist/modules/workspace/workspace.service.d.ts +18 -12
- package/dist/modules/workspace/workspace.service.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.service.js +32 -28
- package/dist/modules/workspace/workspace.service.js.map +1 -1
- package/dist/modules/workspace/workspace.tools.d.ts +2 -1
- package/dist/modules/workspace/workspace.tools.d.ts.map +1 -1
- package/dist/modules/workspace/workspace.tools.js +20 -18
- package/dist/modules/workspace/workspace.tools.js.map +1 -1
- package/dist/modules/workspace/write-denial.d.ts +3 -2
- package/dist/modules/workspace/write-denial.d.ts.map +1 -1
- package/dist/modules/workspace/write-denial.js +6 -5
- package/dist/modules/workspace/write-denial.js.map +1 -1
- package/dist/shared/git.contract.d.ts +52 -7
- package/dist/shared/git.contract.d.ts.map +1 -1
- package/dist/shared/git.contract.js +30 -8
- package/dist/shared/git.contract.js.map +1 -1
- package/dist/shared/kb-context.d.ts +76 -0
- package/dist/shared/kb-context.d.ts.map +1 -0
- package/dist/shared/kb-context.js +108 -0
- package/dist/shared/kb-context.js.map +1 -0
- package/dist/shared/kb-layout.d.ts +3 -2
- package/dist/shared/kb-layout.d.ts.map +1 -1
- package/dist/shared/kb-layout.js +4 -3
- package/dist/shared/kb-layout.js.map +1 -1
- package/dist/shared/kb-layout.test.js +35 -27
- package/dist/shared/kb-layout.test.js.map +1 -1
- package/dist/shared/pending-proposals.d.ts +4 -1
- package/dist/shared/pending-proposals.d.ts.map +1 -1
- package/dist/shared/pending-proposals.js +3 -4
- package/dist/shared/pending-proposals.js.map +1 -1
- package/dist/shared/redact-secret.d.ts +5 -5
- package/dist/shared/redact-secret.js +5 -5
- package/dist/tenancy/index.d.ts +13 -0
- package/dist/tenancy/index.d.ts.map +1 -0
- package/dist/tenancy/index.js +13 -0
- package/dist/tenancy/index.js.map +1 -0
- package/dist/tenancy/static-tenant-source.d.ts +98 -0
- package/dist/tenancy/static-tenant-source.d.ts.map +1 -0
- package/dist/tenancy/static-tenant-source.js +220 -0
- package/dist/tenancy/static-tenant-source.js.map +1 -0
- package/dist/tenancy/tenant-host.d.ts +80 -0
- package/dist/tenancy/tenant-host.d.ts.map +1 -0
- package/dist/tenancy/tenant-host.js +217 -0
- package/dist/tenancy/tenant-host.js.map +1 -0
- package/dist/tenancy/tenant-runtime.d.ts +91 -0
- package/dist/tenancy/tenant-runtime.d.ts.map +1 -0
- package/dist/tenancy/tenant-runtime.js +174 -0
- package/dist/tenancy/tenant-runtime.js.map +1 -0
- package/dist/tenancy/tenant-secrets.d.ts +24 -0
- package/dist/tenancy/tenant-secrets.d.ts.map +1 -0
- package/dist/tenancy/tenant-secrets.js +30 -0
- package/dist/tenancy/tenant-secrets.js.map +1 -0
- package/dist/tenancy/tenant-source.contract.d.ts +45 -0
- package/dist/tenancy/tenant-source.contract.d.ts.map +1 -0
- package/dist/tenancy/tenant-source.contract.js +21 -0
- package/dist/tenancy/tenant-source.contract.js.map +1 -0
- package/migrations/0000_core_init.sql +14 -14
- package/migrations/0003_deployment_settings.sql +1 -1
- package/migrations/0005_github_facade.sql +1 -1
- package/migrations/0012_agent_audit.sql +6 -6
- package/package.json +3 -3
- package/src/__tests__/branch-model.test.ts +7 -6
- package/src/__tests__/kb-context.ts +30 -0
- package/src/__tests__/kb-layout-config.test.ts +35 -30
- package/src/core/__tests__/catalog-cache-invalidation.test.ts +2 -1
- package/src/core/__tests__/lifecycle.test.ts +78 -1
- package/src/core/__tests__/public-config.test.ts +5 -1
- package/src/core/catalog-cache-invalidation.ts +16 -11
- package/src/core/core-ports.ts +19 -0
- package/src/core/create-core-server.ts +27 -106
- package/src/core/create-core-services.ts +180 -95
- package/src/core/lifecycle.ts +214 -29
- package/src/core/public-config.ts +8 -5
- package/src/core-config.ts +107 -8
- package/src/index.ts +25 -2
- package/src/modules/access/__tests__/access-control.admin-root-floor.test.ts +2 -1
- package/src/modules/access/__tests__/access.routes.batch.test.ts +2 -1
- package/src/modules/access/__tests__/access.routes.folder-governs.test.ts +2 -1
- package/src/modules/access/__tests__/access.routes.group-grant.test.ts +2 -1
- package/src/modules/access/__tests__/access.routes.overrides.test.ts +2 -1
- package/src/modules/access/__tests__/access.routes.proposal-branch.test.ts +2 -1
- package/src/modules/access/__tests__/access.routes.prospective.test.ts +2 -1
- package/src/modules/access/__tests__/access.routes.revoke.test.ts +2 -1
- package/src/modules/access/__tests__/access.routes.unknown-email.test.ts +2 -1
- package/src/modules/access/__tests__/change-read-gate.test.ts +13 -11
- package/src/modules/access/__tests__/creator-access.test.ts +3 -2
- package/src/modules/access/__tests__/roles.routes.test.ts +2 -1
- package/src/modules/access/access-control.service.ts +20 -6
- package/src/modules/access/access.routes.ts +10 -13
- package/src/modules/access/change-read-gate.ts +10 -4
- package/src/modules/access/creator-access.ts +7 -2
- package/src/modules/agent-instructions/__tests__/read-preamble.test.ts +13 -12
- package/src/modules/agent-instructions/read-preamble.ts +10 -12
- package/src/modules/auth/__tests__/account.routes.test.ts +15 -0
- package/src/modules/auth/__tests__/auth.service.test.ts +60 -0
- package/src/modules/auth/account-admission.ts +44 -0
- package/src/modules/auth/account.routes.ts +4 -1
- package/src/modules/auth/auth.service.ts +33 -1
- package/src/modules/auth/oidc-auth-provider.ts +9 -0
- package/src/modules/connection-probe/connection-probe.service.ts +7 -1
- package/src/modules/database/__tests__/advisory-lock.test.ts +23 -1
- package/src/modules/database/__tests__/connection.test.ts +98 -0
- package/src/modules/database/__tests__/migrations-unqualified.test.ts +32 -0
- package/src/modules/database/advisory-lock.ts +28 -4
- package/src/modules/database/connection.ts +143 -13
- package/src/modules/database/migrate.ts +48 -14
- package/src/modules/diff/__tests__/diff.service.seed-atomicity.test.ts +2 -1
- package/src/modules/diff/__tests__/diff.service.test.ts +2 -1
- package/src/modules/kb-fs/__tests__/branch-name.test.ts +6 -6
- package/src/modules/kb-fs/__tests__/clone-config.test.ts +24 -20
- package/src/modules/kb-fs/branch-name.ts +3 -3
- package/src/modules/kb-fs/clone-config.ts +15 -12
- package/src/modules/marketplace/__tests__/marketplace-repo.head.test.ts +2 -1
- package/src/modules/mcp/mcp.service.ts +11 -4
- package/src/modules/plugins/__tests__/bundle-dialect.e2e.test.ts +12 -11
- package/src/modules/plugins/__tests__/bundle-dialect.test.ts +2 -1
- package/src/modules/plugins/__tests__/compile-marketplace.test.ts +6 -4
- package/src/modules/plugins/__tests__/join-request-jobs.service.test.ts +2 -1
- package/src/modules/plugins/__tests__/join-requests.service.test.ts +2 -1
- package/src/modules/plugins/__tests__/plugin-creation-display-name.test.ts +4 -3
- package/src/modules/plugins/__tests__/plugin-index.service.test.ts +6 -4
- package/src/modules/plugins/__tests__/plugin-links.service.test.ts +220 -5
- package/src/modules/plugins/__tests__/plugin-provision.service.test.ts +3 -1
- package/src/modules/plugins/__tests__/plugin-rename.service.test.ts +7 -6
- package/src/modules/plugins/__tests__/plugins.routes.test.ts +11 -2
- package/src/modules/plugins/__tests__/teams.routes.test.ts +2 -1
- package/src/modules/plugins/compile/marketplace-compiler.service.ts +7 -9
- package/src/modules/plugins/discovery/__tests__/kb-plugin-source.test.ts +20 -16
- package/src/modules/plugins/discovery/bundle-dialect/bundle.source.ts +9 -2
- package/src/modules/plugins/discovery/kb-plugin-source.ts +15 -8
- package/src/modules/plugins/discovery/native.source.ts +4 -1
- package/src/modules/plugins/index.ts +1 -1
- package/src/modules/plugins/join-request-jobs.service.ts +8 -7
- package/src/modules/plugins/join-requests.service.ts +7 -7
- package/src/modules/plugins/plugin-links.service.ts +192 -19
- package/src/modules/plugins/plugin-links.ts +147 -27
- package/src/modules/plugins/plugin-provision.service.ts +54 -27
- package/src/modules/plugins/plugin-rename.service.ts +10 -10
- package/src/modules/plugins/plugins.routes.ts +45 -15
- package/src/modules/plugins/plugins.service.ts +7 -11
- package/src/modules/plugins/teams.routes.ts +16 -8
- package/src/modules/secrets-vault/__tests__/connect-pending.route.test.ts +7 -0
- package/src/modules/secrets-vault/__tests__/secrets-variable-loader.test.ts +40 -0
- package/src/modules/secrets-vault/__tests__/tool-owner-gate.route.test.ts +2 -0
- package/src/modules/secrets-vault/index.ts +2 -0
- package/src/modules/secrets-vault/secrets-variable-loader.ts +51 -21
- package/src/modules/secrets-vault/secrets-vault.routes.ts +7 -6
- package/src/modules/settings/__tests__/deployment-settings.service.test.ts +24 -11
- package/src/modules/settings/__tests__/git-root-folders.test.ts +2 -1
- package/src/modules/settings/__tests__/setup.routes.boot-failure.test.ts +2 -1
- package/src/modules/settings/__tests__/setup.routes.layout-phase.test.ts +7 -4
- package/src/modules/settings/__tests__/setup.routes.oidc.test.ts +2 -0
- package/src/modules/settings/__tests__/setup.routes.sync-status.test.ts +2 -0
- package/src/modules/settings/__tests__/setup.routes.test.ts +33 -52
- package/src/modules/settings/deployment-settings.service.ts +21 -20
- package/src/modules/settings/setup.routes.ts +26 -16
- package/src/modules/skills/__tests__/allowed-tools-check.test.ts +11 -10
- package/src/modules/skills/__tests__/allowed-tools-warn.tools.test.ts +4 -3
- package/src/modules/skills/__tests__/pending-skills.service.test.ts +3 -1
- package/src/modules/skills/__tests__/skill-access-requests.routes.test.ts +2 -1
- package/src/modules/skills/__tests__/skills.routes.warnings.test.ts +2 -1
- package/src/modules/skills/__tests__/skills.service.test.ts +3 -2
- package/src/modules/skills/allowed-tools-check.ts +7 -6
- package/src/modules/skills/pending-skills.service.ts +9 -8
- package/src/modules/skills/skill-access-requests.routes.ts +7 -7
- package/src/modules/skills/skills.routes.ts +4 -3
- package/src/modules/skills/skills.service.ts +13 -9
- package/src/modules/tool-helpers/__tests__/agent-roles-write.test.ts +3 -2
- package/src/modules/tool-helpers/__tests__/phase4-tools.test.ts +3 -2
- package/src/modules/tool-manuals/__tests__/mcp-json-discovery.test.ts +17 -12
- package/src/modules/tool-manuals/__tests__/mcp-server-edit.service.test.ts +2 -1
- package/src/modules/tool-manuals/__tests__/pending-tools.service.test.ts +4 -1
- package/src/modules/tool-manuals/__tests__/tool-delete.service.test.ts +2 -1
- package/src/modules/tool-manuals/__tests__/tool-manuals.archive.route.test.ts +2 -1
- package/src/modules/tool-manuals/__tests__/tool-manuals.cli.test.ts +5 -4
- package/src/modules/tool-manuals/__tests__/tool-manuals.detail.route.test.ts +2 -1
- package/src/modules/tool-manuals/__tests__/tool-manuals.invalid.routes.test.ts +4 -2
- package/src/modules/tool-manuals/__tests__/tool-manuals.invalid.test.ts +13 -5
- package/src/modules/tool-manuals/__tests__/tool-manuals.mcp-oauth.test.ts +2 -1
- package/src/modules/tool-manuals/__tests__/tool-manuals.restart.test.ts +9 -1
- package/src/modules/tool-manuals/__tests__/tool-manuals.service.test.ts +3 -2
- package/src/modules/tool-manuals/__tests__/tool-manuals.tools.test.ts +2 -0
- package/src/modules/tool-manuals/mcp-json-discovery.ts +6 -4
- package/src/modules/tool-manuals/mcp-server-edit.service.ts +13 -11
- package/src/modules/tool-manuals/pending-tools.service.ts +19 -16
- package/src/modules/tool-manuals/tool-delete.service.ts +13 -10
- package/src/modules/tool-manuals/tool-manuals.routes.ts +10 -8
- package/src/modules/tool-manuals/tool-manuals.service.ts +15 -13
- package/src/modules/tool-manuals/tool-manuals.tools.ts +7 -6
- package/src/modules/workflow/__tests__/apply-failure.test.ts +2 -1
- package/src/modules/workflow/__tests__/merge-announces-tree.test.ts +14 -26
- package/src/modules/workflow/__tests__/preserve-roles-yaml.test.ts +2 -1
- package/src/modules/workflow/__tests__/session-ontology.service.test.ts +3 -2
- package/src/modules/workflow/__tests__/workflow.routes.lock-path.test.ts +2 -1
- package/src/modules/workflow/__tests__/workflow.service.branch-in-use.test.ts +3 -10
- package/src/modules/workflow/__tests__/workflow.service.commitFileWhileLocked.test.ts +2 -1
- package/src/modules/workflow/__tests__/workflow.service.deleted-branch-sweep.test.ts +3 -10
- package/src/modules/workflow/__tests__/workflow.service.facade.test.ts +28 -27
- package/src/modules/workflow/__tests__/workflow.service.folder-proposals.test.ts +2 -1
- package/src/modules/workflow/__tests__/workflow.service.platform-restore.test.ts +2 -1
- package/src/modules/workflow/__tests__/workflow.service.read-gate.test.ts +3 -2
- package/src/modules/workflow/__tests__/workflow.service.releaseLock.test.ts +2 -1
- package/src/modules/workflow/__tests__/workflow.service.sync.test.ts +5 -4
- package/src/modules/workflow/__tests__/workflow.service.update-from-target.test.ts +2 -1
- package/src/modules/workflow/agent-tools/__tests__/workflow.tools.test.ts +2 -1
- package/src/modules/workflow/agent-tools/workflow.tools.ts +11 -9
- package/src/modules/workflow/git/__tests__/git.service.accessGating.test.ts +5 -4
- package/src/modules/workflow/git/__tests__/git.service.changedFilesForPr.test.ts +12 -11
- package/src/modules/workflow/git/__tests__/git.service.commitChanges.test.ts +9 -8
- package/src/modules/workflow/git/__tests__/git.service.commitFile.strayPath.test.ts +8 -7
- package/src/modules/workflow/git/__tests__/git.service.commitFile.test.ts +6 -5
- package/src/modules/workflow/git/__tests__/git.service.createBranch.test.ts +3 -2
- package/src/modules/workflow/git/__tests__/git.service.deleteBranch.test.ts +3 -2
- package/src/modules/workflow/git/__tests__/git.service.diffFileAtCommit.test.ts +7 -6
- package/src/modules/workflow/git/__tests__/git.service.diffFileBetweenBranches.test.ts +16 -15
- package/src/modules/workflow/git/__tests__/git.service.fileContentsAtCommit.test.ts +3 -2
- package/src/modules/workflow/git/__tests__/git.service.forkPoint.test.ts +2 -1
- package/src/modules/workflow/git/__tests__/git.service.history-guards.test.ts +2 -1
- package/src/modules/workflow/git/__tests__/git.service.list-branches.test.ts +10 -9
- package/src/modules/workflow/git/__tests__/git.service.listTrackedFiles.test.ts +2 -1
- package/src/modules/workflow/git/__tests__/git.service.logForFile.test.ts +6 -5
- package/src/modules/workflow/git/__tests__/git.service.mergeChangeRequest.test.ts +9 -8
- package/src/modules/workflow/git/__tests__/git.service.pendingChanges.test.ts +2 -1
- package/src/modules/workflow/git/__tests__/git.service.postMergePull.test.ts +4 -3
- package/src/modules/workflow/git/__tests__/git.service.pull.test.ts +9 -8
- package/src/modules/workflow/git/__tests__/git.service.readFileAtRef.test.ts +2 -1
- package/src/modules/workflow/git/__tests__/git.service.revertPathsAndPush.test.ts +2 -1
- package/src/modules/workflow/git/__tests__/git.service.status.test.ts +4 -3
- package/src/modules/workflow/git/__tests__/git.service.syncFromRemote.test.ts +8 -7
- package/src/modules/workflow/git/__tests__/node-git-runner.test.ts +41 -3
- package/src/modules/workflow/git/git.service.ts +24 -13
- package/src/modules/workflow/git/node-git-runner.ts +37 -4
- package/src/modules/workflow/review-workflow/review-workflow.service.ts +9 -6
- package/src/modules/workflow/session-ontology.service.ts +7 -2
- package/src/modules/workflow/workflow.service.ts +31 -24
- package/src/modules/workspace/__tests__/file-stat-access.test.ts +3 -2
- package/src/modules/workspace/__tests__/git-internals.security.test.ts +10 -9
- package/src/modules/workspace/__tests__/session-ontology.gate.test.ts +4 -2
- package/src/modules/workspace/__tests__/workspace-paths-inside-the-repo.test.ts +3 -2
- package/src/modules/workspace/__tests__/workspace.routes.branch-errors.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.routes.create-grant.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.routes.delete.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.routes.download-implies-read.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.routes.download.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.routes.file-writes.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.routes.folders.test.ts +5 -4
- package/src/modules/workspace/__tests__/workspace.routes.move-platform-files.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.routes.read-gate.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.service.ensure-remotes-fetched.test.ts +2 -2
- package/src/modules/workspace/__tests__/workspace.service.list-cloned.test.ts +6 -5
- package/src/modules/workspace/__tests__/workspace.service.move-never-overwrites.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.service.read-filter.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.service.test.ts +84 -50
- package/src/modules/workspace/__tests__/workspace.service.unknown-branch.test.ts +2 -1
- package/src/modules/workspace/__tests__/workspace.tools.agents-file.test.ts +10 -7
- package/src/modules/workspace/__tests__/workspace.tools.branch-errors.test.ts +4 -3
- package/src/modules/workspace/__tests__/workspace.tools.test.ts +9 -8
- package/src/modules/workspace/__tests__/write-denial.test.ts +5 -4
- package/src/modules/workspace/session-ontology.gate.ts +6 -4
- package/src/modules/workspace/startup/__tests__/kb-startup-runner.degraded.test.ts +6 -2
- package/src/modules/workspace/startup/__tests__/kb-startup-runner.test.ts +29 -21
- package/src/modules/workspace/startup/kb-git.ts +15 -22
- package/src/modules/workspace/startup/kb-startup-runner.ts +40 -46
- package/src/modules/workspace/startup/steps/__tests__/steps.test.ts +104 -98
- package/src/modules/workspace/startup/steps/groups-to-plugins.step.ts +24 -16
- package/src/modules/workspace/startup/steps/personal-spaces.step.ts +14 -5
- package/src/modules/workspace/startup/steps/plugin-display-names.step.ts +13 -5
- package/src/modules/workspace/startup/steps/plugin-manifests.step.ts +14 -5
- package/src/modules/workspace/startup/steps/seed-tree.ts +11 -9
- package/src/modules/workspace/startup/steps/template-files.step.ts +43 -34
- package/src/modules/workspace/startup/steps/template-source.ts +8 -5
- package/src/modules/workspace/workspace.routes.ts +8 -7
- package/src/modules/workspace/workspace.service.ts +30 -27
- package/src/modules/workspace/workspace.tools.ts +21 -20
- package/src/modules/workspace/write-denial.ts +7 -5
- package/src/shared/__tests__/kb-layout.plugin.test.ts +19 -16
- package/src/shared/git.contract.ts +70 -8
- package/src/shared/kb-context.ts +130 -0
- package/src/shared/kb-layout.test.ts +37 -27
- package/src/shared/kb-layout.ts +4 -3
- package/src/shared/pending-proposals.ts +7 -4
- package/src/shared/redact-secret.ts +5 -5
- package/src/tenancy/__tests__/static-tenant-source.test.ts +177 -0
- package/src/tenancy/__tests__/tenant-host.test.ts +372 -0
- package/src/tenancy/__tests__/tenant-runtime.test.ts +221 -0
- package/src/tenancy/__tests__/tenant-secrets.test.ts +35 -0
- package/src/tenancy/index.ts +35 -0
- package/src/tenancy/static-tenant-source.ts +296 -0
- package/src/tenancy/tenant-host.ts +261 -0
- package/src/tenancy/tenant-runtime.ts +208 -0
- package/src/tenancy/tenant-secrets.ts +41 -0
- package/src/tenancy/tenant-source.contract.ts +59 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import {
|
|
3
|
+
import { isPersonalPluginFolder } from '@bevel-software/platform-shared';
|
|
4
4
|
import { EVERYONE_CANONICAL, KNOWN_VERBS, accessMdDeclaresBodyRules, parseAccessFile, parseOwnAccessEntries, sourceVerbsFor, } from '../../../access-model/access-grammar.js';
|
|
5
5
|
import { spliceGrant } from '../../../access-model/access-splice.js';
|
|
6
6
|
import { isAbsence } from '../../../../shared/fs.contract.js';
|
|
@@ -29,9 +29,16 @@ import { isAbsence } from '../../../../shared/fs.contract.js';
|
|
|
29
29
|
*/
|
|
30
30
|
export class PersonalSpacesStep {
|
|
31
31
|
disk;
|
|
32
|
+
kb;
|
|
32
33
|
name = 'personal-spaces';
|
|
33
|
-
constructor(disk
|
|
34
|
+
constructor(disk,
|
|
35
|
+
/** Read per run, never captured: the setup-completing save may rename the plugins root first. */
|
|
36
|
+
kb) {
|
|
34
37
|
this.disk = disk;
|
|
38
|
+
this.kb = kb;
|
|
39
|
+
}
|
|
40
|
+
get pluginsDir() {
|
|
41
|
+
return this.kb.layout.pluginsDir;
|
|
35
42
|
}
|
|
36
43
|
async run(ctx) {
|
|
37
44
|
for (const branch of await ctx.allBranches()) {
|
|
@@ -41,14 +48,14 @@ export class PersonalSpacesStep {
|
|
|
41
48
|
}
|
|
42
49
|
async closePersonalSpaces(branch) {
|
|
43
50
|
const repoDir = await branch.repoDir();
|
|
44
|
-
const entries = await this.disk.listDir(path.join(repoDir,
|
|
51
|
+
const entries = await this.disk.listDir(path.join(repoDir, this.pluginsDir));
|
|
45
52
|
if (entries === null)
|
|
46
53
|
return;
|
|
47
54
|
const closed = [];
|
|
48
55
|
for (const entry of entries) {
|
|
49
56
|
if (!entry.isDirectory() || !isPersonalPluginFolder(entry.name))
|
|
50
57
|
continue;
|
|
51
|
-
const rel = `${
|
|
58
|
+
const rel = `${this.pluginsDir}/${entry.name}/access.md`;
|
|
52
59
|
let text;
|
|
53
60
|
try {
|
|
54
61
|
text = await fs.readFile(path.join(repoDir, rel), 'utf8');
|
|
@@ -68,7 +75,7 @@ export class PersonalSpacesStep {
|
|
|
68
75
|
return;
|
|
69
76
|
branch.note(`Keep ${closed.length === 1 ? 'a personal space' : `${closed.length} personal spaces`} private`);
|
|
70
77
|
for (const name of closed)
|
|
71
|
-
branch.note(`${
|
|
78
|
+
branch.note(`${this.pluginsDir}/${name}/access.md: read denies everyone`);
|
|
72
79
|
}
|
|
73
80
|
}
|
|
74
81
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personal-spaces.step.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/personal-spaces.step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"personal-spaces.step.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/personal-spaces.step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,yBAAyB,EACzB,eAAe,EACf,qBAAqB,EACrB,cAAc,GAGf,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAiB,MAAM,mCAAmC,CAAC;AAG7E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,kBAAkB;IAIV;IAEA;IALV,IAAI,GAAG,iBAAiB,CAAC;IAElC,YACmB,IAAc;IAC/B,iGAAiG;IAChF,EAA6B;QAF7B,SAAI,GAAJ,IAAI,CAAU;QAEd,OAAE,GAAF,EAAE,CAA2B;IAC7C,CAAC;IAEJ,IAAY,UAAU;QACpB,OAAO,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,GAAuB;QAC/B,KAAK,MAAM,MAAM,IAAI,MAAM,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC;YAC7C,MAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEO,KAAK,CAAC,mBAAmB,CAAC,MAAgB;QAChD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;QACvC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,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,IAAI,CAAC,CAAC;IACxC,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,MAAM,GAAG,GAAoE,EAAE,CAAC;IAChF,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;QAC/B,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,IAAI;gBAAE,SAAS;YAClD,uEAAuE;YACvE,iEAAiE;YACjE,mEAAmE;YACnE,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC;YACpF,IAAI,CAAC,IAAI;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IFsProbe, ITreeWalker } from '../../../../shared/fs.contract.js';
|
|
2
|
+
import type { KbContext } from '../../../../shared/kb-context.js';
|
|
2
3
|
import type { OnServerStart, ServerStartContext, StepResult } from '../on-server-start.js';
|
|
3
4
|
/**
|
|
4
5
|
* Write down what each existing plugin is already CALLED, as an
|
|
@@ -43,8 +44,13 @@ import type { OnServerStart, ServerStartContext, StepResult } from '../on-server
|
|
|
43
44
|
*/
|
|
44
45
|
export declare class PluginDisplayNamesStep implements OnServerStart {
|
|
45
46
|
private readonly disk;
|
|
47
|
+
/** Read per run, never captured: the setup-completing save may rename the plugins root first. */
|
|
48
|
+
private readonly kb;
|
|
46
49
|
readonly name = "plugin-display-names";
|
|
47
|
-
constructor(disk: IFsProbe & ITreeWalker
|
|
50
|
+
constructor(disk: IFsProbe & ITreeWalker,
|
|
51
|
+
/** Read per run, never captured: the setup-completing save may rename the plugins root first. */
|
|
52
|
+
kb: Pick<KbContext, 'layout'>);
|
|
53
|
+
private get pluginsDir();
|
|
48
54
|
run(ctx: ServerStartContext): Promise<StepResult>;
|
|
49
55
|
private backfill;
|
|
50
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-display-names.step.d.ts","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/plugin-display-names.step.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-display-names.step.d.ts","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/plugin-display-names.step.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAY,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAErG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,qBAAa,sBAAuB,YAAW,aAAa;IAIxD,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,iGAAiG;IACjG,OAAO,CAAC,QAAQ,CAAC,EAAE;IALrB,QAAQ,CAAC,IAAI,0BAA0B;gBAGpB,IAAI,EAAE,QAAQ,GAAG,WAAW;IAC7C,iGAAiG;IAChF,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC;IAGhD,OAAO,KAAK,UAAU,GAErB;IAEK,GAAG,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;YAOzC,QAAQ;CAwEvB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import {
|
|
2
|
+
import { PLUGIN_MANIFEST_FILE, pluginDisplayNameOf, } from '@bevel-software/platform-shared';
|
|
3
3
|
import { hasManifestEntry } from './plugin-layout.js';
|
|
4
4
|
/**
|
|
5
5
|
* Write down what each existing plugin is already CALLED, as an
|
|
@@ -44,9 +44,16 @@ import { hasManifestEntry } from './plugin-layout.js';
|
|
|
44
44
|
*/
|
|
45
45
|
export class PluginDisplayNamesStep {
|
|
46
46
|
disk;
|
|
47
|
+
kb;
|
|
47
48
|
name = 'plugin-display-names';
|
|
48
|
-
constructor(disk
|
|
49
|
+
constructor(disk,
|
|
50
|
+
/** Read per run, never captured: the setup-completing save may rename the plugins root first. */
|
|
51
|
+
kb) {
|
|
49
52
|
this.disk = disk;
|
|
53
|
+
this.kb = kb;
|
|
54
|
+
}
|
|
55
|
+
get pluginsDir() {
|
|
56
|
+
return this.kb.layout.pluginsDir;
|
|
50
57
|
}
|
|
51
58
|
async run(ctx) {
|
|
52
59
|
for (const branch of await ctx.allBranches()) {
|
|
@@ -56,7 +63,7 @@ export class PluginDisplayNamesStep {
|
|
|
56
63
|
}
|
|
57
64
|
async backfill(branch) {
|
|
58
65
|
const repoDir = await branch.repoDir();
|
|
59
|
-
const root = path.join(repoDir,
|
|
66
|
+
const root = path.join(repoDir, this.pluginsDir);
|
|
60
67
|
// Plugin folders by the judgement discovery makes, entry for entry: a
|
|
61
68
|
// manifest as a REGULAR file, and nothing beneath a plugin is a plugin.
|
|
62
69
|
// Absence is the plugins root not existing yet; any other hole stops the
|
|
@@ -110,7 +117,7 @@ export class PluginDisplayNamesStep {
|
|
|
110
117
|
// the file for no change anyone can see.
|
|
111
118
|
if (folderName === pluginDisplayNameOf(manifest))
|
|
112
119
|
continue;
|
|
113
|
-
branch.write(`${
|
|
120
|
+
branch.write(`${this.pluginsDir}/${rel}/${PLUGIN_MANIFEST_FILE}`, `${JSON.stringify(withDisplayName(manifest, folderName), null, 2)}\n`);
|
|
114
121
|
filled.push(rel);
|
|
115
122
|
}
|
|
116
123
|
if (filled.length === 0)
|
|
@@ -119,7 +126,7 @@ export class PluginDisplayNamesStep {
|
|
|
119
126
|
? "Record a plugin's display name in its manifest"
|
|
120
127
|
: `Record the display names of ${filled.length} plugins in their manifests`);
|
|
121
128
|
for (const rel of filled)
|
|
122
|
-
branch.note(`${
|
|
129
|
+
branch.note(`${this.pluginsDir}/${rel}: displayName "${path.posix.basename(rel)}"`);
|
|
123
130
|
}
|
|
124
131
|
}
|
|
125
132
|
/** A string a reader would show — the shared rule's test for "says something". */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-display-names.step.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/plugin-display-names.step.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"plugin-display-names.step.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/plugin-display-names.step.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,OAAO,sBAAsB;IAId;IAEA;IALV,IAAI,GAAG,sBAAsB,CAAC;IAEvC,YACmB,IAA4B;IAC7C,iGAAiG;IAChF,EAA6B;QAF7B,SAAI,GAAJ,IAAI,CAAwB;QAE5B,OAAE,GAAF,EAAE,CAA2B;IAC7C,CAAC;IAEJ,IAAY,UAAU;QACpB,OAAO,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,GAAuB;QAC/B,KAAK,MAAM,MAAM,IAAI,MAAM,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC;YAC7C,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;Q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AG,CAAC,CAAC;IAChH,CAAC;CACF;AAED,kFAAkF;AAClF,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;AAC1D,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,eAAe,CAAC,QAAiC,EAAE,WAAmB;IAC7E,MAAM,IAAI,GAA4B,EAAE,CAAC;IACzC,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,KAAc,EAAE,EAAE,CAC1C,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpG,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,0EAA0E;QAC1E,wEAAwE;QACxE,IAAI,GAAG,KAAK,aAAa;YAAE,SAAS;QACpC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAChB,IAAI,GAAG,KAAK,MAAM;YAAE,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IACtD,CAAC;IACD,wEAAwE;IACxE,yEAAyE;IACzE,mDAAmD;IACnD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC;QAAE,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IACzE,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ITreeWalker } from '../../../../shared/fs.contract.js';
|
|
2
|
+
import type { KbContext } from '../../../../shared/kb-context.js';
|
|
2
3
|
import type { OnServerStart, ServerStartContext, StepResult } from '../on-server-start.js';
|
|
3
4
|
/**
|
|
4
5
|
* Give every legacy plugin folder its manifest, as an {@link OnServerStart}
|
|
@@ -32,9 +33,14 @@ import type { OnServerStart, ServerStartContext, StepResult } from '../on-server
|
|
|
32
33
|
*/
|
|
33
34
|
export declare class PluginManifestsStep implements OnServerStart {
|
|
34
35
|
private readonly disk;
|
|
36
|
+
/** Read per run, never captured: the setup-completing save may rename the plugins root first. */
|
|
37
|
+
private readonly kb;
|
|
35
38
|
readonly name = "plugin-manifests";
|
|
36
39
|
private readonly layout;
|
|
37
|
-
constructor(disk: ITreeWalker
|
|
40
|
+
constructor(disk: ITreeWalker,
|
|
41
|
+
/** Read per run, never captured: the setup-completing save may rename the plugins root first. */
|
|
42
|
+
kb: Pick<KbContext, 'layout'>);
|
|
43
|
+
private get pluginsDir();
|
|
38
44
|
run(ctx: ServerStartContext): Promise<StepResult>;
|
|
39
45
|
private addManifests;
|
|
40
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-manifests.step.d.ts","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/plugin-manifests.step.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin-manifests.step.d.ts","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/plugin-manifests.step.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAY,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAErG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IAMrD,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,iGAAiG;IACjG,OAAO,CAAC,QAAQ,CAAC,EAAE;IAPrB,QAAQ,CAAC,IAAI,sBAAsB;IAEnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAGnB,IAAI,EAAE,WAAW;IAClC,iGAAiG;IAChF,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC;IAKhD,OAAO,KAAK,UAAU,GAErB;IAEK,GAAG,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;YAOzC,YAAY;CAqC3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import {
|
|
2
|
+
import { PLUGIN_MANIFEST_FILE, renderPluginManifest } from '@bevel-software/platform-shared';
|
|
3
3
|
import { PluginLayout, hasManifestEntry } from './plugin-layout.js';
|
|
4
4
|
/**
|
|
5
5
|
* Give every legacy plugin folder its manifest, as an {@link OnServerStart}
|
|
@@ -33,12 +33,19 @@ import { PluginLayout, hasManifestEntry } from './plugin-layout.js';
|
|
|
33
33
|
*/
|
|
34
34
|
export class PluginManifestsStep {
|
|
35
35
|
disk;
|
|
36
|
+
kb;
|
|
36
37
|
name = 'plugin-manifests';
|
|
37
38
|
layout;
|
|
38
|
-
constructor(disk
|
|
39
|
+
constructor(disk,
|
|
40
|
+
/** Read per run, never captured: the setup-completing save may rename the plugins root first. */
|
|
41
|
+
kb) {
|
|
39
42
|
this.disk = disk;
|
|
43
|
+
this.kb = kb;
|
|
40
44
|
this.layout = new PluginLayout(disk);
|
|
41
45
|
}
|
|
46
|
+
get pluginsDir() {
|
|
47
|
+
return this.kb.layout.pluginsDir;
|
|
48
|
+
}
|
|
42
49
|
async run(ctx) {
|
|
43
50
|
for (const branch of await ctx.allBranches()) {
|
|
44
51
|
await this.addManifests(branch);
|
|
@@ -47,7 +54,7 @@ export class PluginManifestsStep {
|
|
|
47
54
|
}
|
|
48
55
|
async addManifests(branch) {
|
|
49
56
|
const repoDir = await branch.repoDir();
|
|
50
|
-
const root = path.join(repoDir,
|
|
57
|
+
const root = path.join(repoDir, this.pluginsDir);
|
|
51
58
|
const added = [];
|
|
52
59
|
// A plugin is a folder whose OWN listing holds a manifest as a regular
|
|
53
60
|
// file — the judgement discovery makes, entry for entry (a symlink so
|
|
@@ -72,14 +79,14 @@ export class PluginManifestsStep {
|
|
|
72
79
|
continue;
|
|
73
80
|
if (!(await this.layout.looksLikeLegacyPlugin(path.join(root, rel), entries)))
|
|
74
81
|
continue;
|
|
75
|
-
branch.write(`${
|
|
82
|
+
branch.write(`${this.pluginsDir}/${rel}/${PLUGIN_MANIFEST_FILE}`, renderPluginManifest(rel));
|
|
76
83
|
added.push(rel);
|
|
77
84
|
}
|
|
78
85
|
if (added.length === 0)
|
|
79
86
|
return;
|
|
80
87
|
branch.note(`Add plugin manifests to ${added.length === 1 ? 'a legacy plugin folder' : `${added.length} legacy plugin folders`}`);
|
|
81
88
|
for (const rel of added)
|
|
82
|
-
branch.note(`${
|
|
89
|
+
branch.note(`${this.pluginsDir}/${rel}: ${PLUGIN_MANIFEST_FILE} written`);
|
|
83
90
|
}
|
|
84
91
|
}
|
|
85
92
|
//# sourceMappingURL=plugin-manifests.step.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-manifests.step.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/plugin-manifests.step.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin-manifests.step.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/plugin-manifests.step.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAG7F,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,mBAAmB;IAMX;IAEA;IAPV,IAAI,GAAG,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'../../../../shared/fs.contract.js';
|
|
2
|
+
import type { KbContext } from '../../../../shared/kb-context.js';
|
|
2
3
|
/**
|
|
3
4
|
* The empty-remote seed builder the runner takes as `buildSeedTree`: the full
|
|
4
5
|
* template tree, every reserved root, and a generated roles.yaml. DIRECT fs
|
|
@@ -18,5 +19,7 @@ import type { IFsProbe, ITreeWalker } from '../../../../shared/fs.contract.js';
|
|
|
18
19
|
* runner's port is a function: it asks for a directory to be filled and gets
|
|
19
20
|
* back what was generated, and knows nothing of templates or disks.
|
|
20
21
|
*/
|
|
21
|
-
export declare function buildSeedTree(disk: IFsProbe & ITreeWalker, templateDir: string, extraRootDirs: readonly string[], seedAdminEmails: readonly string[]
|
|
22
|
+
export declare function buildSeedTree(disk: IFsProbe & ITreeWalker, templateDir: string, extraRootDirs: readonly string[], seedAdminEmails: readonly string[],
|
|
23
|
+
/** Read per seed, never captured: the setup-completing save may apply the layout after this builder was composed. */
|
|
24
|
+
kb: Pick<KbContext, 'layout'>): (dir: string) => Promise<string[]>;
|
|
22
25
|
//# sourceMappingURL=seed-tree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed-tree.d.ts","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/seed-tree.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"seed-tree.d.ts","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/seed-tree.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAOlE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,QAAQ,GAAG,WAAW,EAC5B,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,eAAe,EAAE,SAAS,MAAM,EAAE;AAClC,qHAAqH;AACrH,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,GAC5B,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAKpC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import {
|
|
3
|
+
import { LEGACY_AGENTS_FILE, renderKbLayoutPlaceholders, } from '@bevel-software/platform-shared';
|
|
4
4
|
import { renderRolesYaml } from '../../../access-model/render-roles-yaml.js';
|
|
5
5
|
import { reservedRootDirs } from './template-files.step.js';
|
|
6
6
|
import { TEMPLATE_SOURCE_FALLBACKS, TemplateSource } from './template-source.js';
|
|
@@ -25,11 +25,12 @@ import { GitInternalsError } from '../../../../shared/domain-errors.js';
|
|
|
25
25
|
* runner's port is a function: it asks for a directory to be filled and gets
|
|
26
26
|
* back what was generated, and knows nothing of templates or disks.
|
|
27
27
|
*/
|
|
28
|
-
export function buildSeedTree(disk, templateDir, extraRootDirs, seedAdminEmails
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
export function buildSeedTree(disk, templateDir, extraRootDirs, seedAdminEmails,
|
|
29
|
+
/** Read per seed, never captured: the setup-completing save may apply the layout after this builder was composed. */
|
|
30
|
+
kb) {
|
|
31
|
+
// Validated eagerly; resolved per seed.
|
|
32
|
+
reservedRootDirs(extraRootDirs, kb.layout);
|
|
33
|
+
const seeder = new KbSeedTree(disk, new TemplateSource(disk, templateDir, kb), extraRootDirs, seedAdminEmails, kb);
|
|
33
34
|
return (dir) => seeder.seed(dir);
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
@@ -45,11 +46,13 @@ class KbSeedTree {
|
|
|
45
46
|
templates;
|
|
46
47
|
extraRootDirs;
|
|
47
48
|
seedAdminEmails;
|
|
48
|
-
|
|
49
|
+
kb;
|
|
50
|
+
constructor(disk, templates, extraRootDirs, seedAdminEmails, kb) {
|
|
49
51
|
this.disk = disk;
|
|
50
52
|
this.templates = templates;
|
|
51
53
|
this.extraRootDirs = extraRootDirs;
|
|
52
54
|
this.seedAdminEmails = seedAdminEmails;
|
|
55
|
+
this.kb = kb;
|
|
53
56
|
}
|
|
54
57
|
/** Fill `dir` with a complete knowledge base; resolve to what was GENERATED. */
|
|
55
58
|
async seed(dir) {
|
|
@@ -63,7 +66,7 @@ class KbSeedTree {
|
|
|
63
66
|
// root never gets a pointless placeholder beside it.
|
|
64
67
|
// Resolved NOW, not when the builder was composed: a seed that runs on the
|
|
65
68
|
// save completing first-run setup must lay down the names that save applied.
|
|
66
|
-
for (const rootDir of reservedRootDirs(this.extraRootDirs)) {
|
|
69
|
+
for (const rootDir of reservedRootDirs(this.extraRootDirs, this.kb.layout)) {
|
|
67
70
|
const abs = path.join(dir, rootDir);
|
|
68
71
|
const found = await this.disk.lstatOrNull(abs);
|
|
69
72
|
if (found) {
|
|
@@ -138,7 +141,7 @@ class KbSeedTree {
|
|
|
138
141
|
// `AGENTS.md` this seed had just laid down — two commits saying opposite
|
|
139
142
|
// things about a knowledge base nobody had used yet.
|
|
140
143
|
if (relDir === '' && name === LEGACY_AGENTS_FILE) {
|
|
141
|
-
await this.copyTemplateFile(name, dest,
|
|
144
|
+
await this.copyTemplateFile(name, dest, this.kb.layout.agentsFile);
|
|
142
145
|
return;
|
|
143
146
|
}
|
|
144
147
|
// TWO template entries, ONE destination. A custom template that happens to
|
|
@@ -150,7 +153,7 @@ class KbSeedTree {
|
|
|
150
153
|
// is the file the platform owns, refreshes from the packaged template on
|
|
151
154
|
// every start and tells every agent to read. The twin is skipped, on the
|
|
152
155
|
// same reasoning as the packable spelling above.
|
|
153
|
-
if (relDir === '' && name ===
|
|
156
|
+
if (relDir === '' && name === this.kb.layout.agentsFile && (await this.templates.carries(LEGACY_AGENTS_FILE))) {
|
|
154
157
|
return;
|
|
155
158
|
}
|
|
156
159
|
await this.copyTemplateFile(relDir ? path.join(relDir, name) : name, dest);
|
|
@@ -179,7 +182,7 @@ class KbSeedTree {
|
|
|
179
182
|
await fs.copyFile(from, to);
|
|
180
183
|
}
|
|
181
184
|
else {
|
|
182
|
-
await fs.writeFile(to, renderKbLayoutPlaceholders(text), 'utf8');
|
|
185
|
+
await fs.writeFile(to, renderKbLayoutPlaceholders(text, this.kb.layout), 'utf8');
|
|
183
186
|
}
|
|
184
187
|
await fs.chmod(to, (await fs.stat(from)).mode & 0o777);
|
|
185
188
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed-tree.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/seed-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"seed-tree.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/seed-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,aAAa,CAC3B,IAA4B,EAC5B,WAAmB,EACnB,aAAgC,EAChC,eAAkC;AAClC,qHAAqH;AACrH,EAA6B;IAE7B,wCAAwC;IACxC,gBAAgB,CAAC,aAAa,EAAE,E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CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { type KbLayout } from '@bevel-software/platform-shared';
|
|
1
2
|
import { type IFsProbe } from '../../../../shared/fs.contract.js';
|
|
3
|
+
import type { KbContext } from '../../../../shared/kb-context.js';
|
|
2
4
|
import type { OnServerStart, ServerStartContext, StepResult } from '../on-server-start.js';
|
|
3
5
|
/**
|
|
4
6
|
* The **required scaffolding** — the minimum an operational KB needs. Any of
|
|
@@ -17,7 +19,7 @@ import type { OnServerStart, ServerStartContext, StepResult } from '../on-server
|
|
|
17
19
|
* generated from `ADMIN_EMAIL` (see roles-yaml.step.ts), so a repo can't be
|
|
18
20
|
* seeded with a stale hard-coded Admin list.
|
|
19
21
|
*/
|
|
20
|
-
export declare function requiredFiles(): readonly string[];
|
|
22
|
+
export declare function requiredFiles(layout: Required<KbLayout>): readonly string[];
|
|
21
23
|
/** Whether `text` is a copy of the platform's managed guide, of any vintage. */
|
|
22
24
|
export declare function isManagedGuide(text: string): boolean;
|
|
23
25
|
/**
|
|
@@ -37,7 +39,7 @@ export declare const GENERATED_FILES: readonly string[];
|
|
|
37
39
|
* base. Shared with the empty-remote seed builder (seed-tree.ts) so the two
|
|
38
40
|
* paths can never disagree about what a deployment guarantees.
|
|
39
41
|
*/
|
|
40
|
-
export declare function reservedRootDirs(extraRootDirs: readonly string[]): readonly string[];
|
|
42
|
+
export declare function reservedRootDirs(extraRootDirs: readonly string[], layout: Required<KbLayout>): readonly string[];
|
|
41
43
|
/**
|
|
42
44
|
* The template top-up as an {@link OnServerStart} step: add any missing base
|
|
43
45
|
* scaffolding to every PROTECTED branch, and keep the managed agent guide
|
|
@@ -56,6 +58,12 @@ export declare function reservedRootDirs(extraRootDirs: readonly string[]): read
|
|
|
56
58
|
*/
|
|
57
59
|
export declare class TemplateFilesStep implements OnServerStart {
|
|
58
60
|
private readonly disk;
|
|
61
|
+
/**
|
|
62
|
+
* Read per run, never captured: the save that completes first-run setup
|
|
63
|
+
* applies the admin's names after this step was built. A snapshot taken
|
|
64
|
+
* here scaffolded `Skills/` beside the `skills/` they had just chosen.
|
|
65
|
+
*/
|
|
66
|
+
private readonly kb;
|
|
59
67
|
private readonly extraRootDirs;
|
|
60
68
|
private readonly agentsFileLink;
|
|
61
69
|
readonly name = "template-files";
|
|
@@ -72,7 +80,13 @@ export declare class TemplateFilesStep implements OnServerStart {
|
|
|
72
80
|
* the setting behind it may be saved by the very
|
|
73
81
|
* first-run save that then runs this phase.
|
|
74
82
|
*/
|
|
75
|
-
constructor(disk: IFsProbe,
|
|
83
|
+
constructor(disk: IFsProbe,
|
|
84
|
+
/**
|
|
85
|
+
* Read per run, never captured: the save that completes first-run setup
|
|
86
|
+
* applies the admin's names after this step was built. A snapshot taken
|
|
87
|
+
* here scaffolded `Skills/` beside the `skills/` they had just chosen.
|
|
88
|
+
*/
|
|
89
|
+
kb: Pick<KbContext, 'layout'>, extraRootDirs?: readonly string[], agentsFileLink?: () => boolean);
|
|
76
90
|
run(ctx: ServerStartContext): Promise<StepResult>;
|
|
77
91
|
private topUp;
|
|
78
92
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-files.step.d.ts","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/template-files.step.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"template-files.step.d.ts","sourceRoot":"","sources":["../../../../../src/modules/workspace/startup/steps/template-files.step.ts"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,QAAQ,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC9F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,KAAK,EAAY,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAMrG;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,MAAM,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