@wildo-ai/wildo-cli 1.1.2 → 1.1.4
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/bin/wildo.d.ts.map +1 -1
- package/dist/src/__tests__/sandbox-dependencies.test-helpers.d.ts.map +1 -1
- package/dist/src/commands/acp/probe.command.d.ts.map +1 -1
- package/dist/src/commands/acp/probe.command.js +13 -0
- package/dist/src/commands/acp/probe.command.js.map +1 -1
- package/dist/src/commands/align-deps.command.d.ts.map +1 -1
- package/dist/src/commands/assets/sync.command.d.ts +6 -0
- package/dist/src/commands/assets/sync.command.d.ts.map +1 -1
- package/dist/src/commands/assets/sync.command.js +13 -3
- package/dist/src/commands/assets/sync.command.js.map +1 -1
- package/dist/src/commands/brand/propagate.command.d.ts.map +1 -1
- package/dist/src/commands/compose.command.d.ts.map +1 -1
- package/dist/src/commands/compose.command.js +16 -0
- package/dist/src/commands/compose.command.js.map +1 -1
- package/dist/src/commands/config/__tests__/reapply-declaration.command.test.d.ts.map +1 -1
- package/dist/src/commands/config/__tests__/reapply-declaration.command.test.js +1 -1
- package/dist/src/commands/config/__tests__/reapply-declaration.command.test.js.map +1 -1
- package/dist/src/commands/config/__tests__/sync.command.test.d.ts.map +1 -1
- package/dist/src/commands/config/__tests__/sync.command.test.js +115 -8
- package/dist/src/commands/config/__tests__/sync.command.test.js.map +1 -1
- package/dist/src/commands/config/__tests__/validate.command.test.d.ts.map +1 -1
- package/dist/src/commands/config/mutate.command.d.ts.map +1 -1
- package/dist/src/commands/config/reapply-declaration.command.d.ts.map +1 -1
- package/dist/src/commands/config/sync.command.d.ts +36 -0
- package/dist/src/commands/config/sync.command.d.ts.map +1 -1
- package/dist/src/commands/config/sync.command.js +61 -7
- package/dist/src/commands/config/sync.command.js.map +1 -1
- package/dist/src/commands/config/validate.command.d.ts.map +1 -1
- package/dist/src/commands/context/__tests__/assurance-basis.command.test.d.ts +2 -0
- package/dist/src/commands/context/__tests__/assurance-basis.command.test.d.ts.map +1 -0
- package/dist/src/commands/context/__tests__/assurance-basis.command.test.js +63 -0
- package/dist/src/commands/context/__tests__/assurance-basis.command.test.js.map +1 -0
- package/dist/src/commands/context/__tests__/jurisdictions.command.test.d.ts +19 -0
- package/dist/src/commands/context/__tests__/jurisdictions.command.test.d.ts.map +1 -0
- package/dist/src/commands/context/__tests__/jurisdictions.command.test.js +106 -0
- package/dist/src/commands/context/__tests__/jurisdictions.command.test.js.map +1 -0
- package/dist/src/commands/context/assurance-basis.command.d.ts +61 -0
- package/dist/src/commands/context/assurance-basis.command.d.ts.map +1 -0
- package/dist/src/commands/context/assurance-basis.command.js +166 -0
- package/dist/src/commands/context/assurance-basis.command.js.map +1 -0
- package/dist/src/commands/context/coherence.command.d.ts.map +1 -1
- package/dist/src/commands/context/context-command.utils.d.ts.map +1 -1
- package/dist/src/commands/context/health.command.d.ts.map +1 -1
- package/dist/src/commands/context/info.command.d.ts.map +1 -1
- package/dist/src/commands/context/journey.command.d.ts +6 -2
- package/dist/src/commands/context/journey.command.d.ts.map +1 -1
- package/dist/src/commands/context/journey.command.js +8 -4
- package/dist/src/commands/context/journey.command.js.map +1 -1
- package/dist/src/commands/context/jurisdictions.command.d.ts +36 -0
- package/dist/src/commands/context/jurisdictions.command.d.ts.map +1 -0
- package/dist/src/commands/context/jurisdictions.command.js +115 -0
- package/dist/src/commands/context/jurisdictions.command.js.map +1 -0
- package/dist/src/commands/context/list.command.d.ts.map +1 -1
- package/dist/src/commands/db/db-schema-plan.utils.d.ts.map +1 -1
- package/dist/src/commands/db/diff.command.d.ts.map +1 -1
- package/dist/src/commands/db/generate.command.d.ts.map +1 -1
- package/dist/src/commands/db/migrate.command.d.ts.map +1 -1
- package/dist/src/commands/db/resolve.command.d.ts.map +1 -1
- package/dist/src/commands/dev/__tests__/design-tokens.command.test.d.ts.map +1 -1
- package/dist/src/commands/dev/__tests__/start.command.test.d.ts.map +1 -1
- package/dist/src/commands/dev/__tests__/start.command.test.js +6 -6
- package/dist/src/commands/dev/__tests__/start.command.test.js.map +1 -1
- package/dist/src/commands/dev/__tests__/stop.command.test.d.ts.map +1 -1
- package/dist/src/commands/dev/__tests__/sync-csp.command.test.d.ts.map +1 -1
- package/dist/src/commands/dev/__tests__/sync-csp.command.test.js +71 -0
- package/dist/src/commands/dev/__tests__/sync-csp.command.test.js.map +1 -1
- package/dist/src/commands/dev/charts-audit.command.d.ts +5 -3
- package/dist/src/commands/dev/charts-audit.command.d.ts.map +1 -1
- package/dist/src/commands/dev/charts-audit.command.js +36 -7
- package/dist/src/commands/dev/charts-audit.command.js.map +1 -1
- package/dist/src/commands/dev/design-tokens-generate.command.d.ts.map +1 -1
- package/dist/src/commands/dev/design-tokens-init.command.d.ts.map +1 -1
- package/dist/src/commands/dev/design-tokens-validate.command.d.ts.map +1 -1
- package/dist/src/commands/dev/force-stop.command.d.ts.map +1 -1
- package/dist/src/commands/dev/resources.command.d.ts.map +1 -1
- package/dist/src/commands/dev/start.command.d.ts.map +1 -1
- package/dist/src/commands/dev/start.command.js +8 -7
- package/dist/src/commands/dev/start.command.js.map +1 -1
- package/dist/src/commands/dev/stop-all.command.d.ts.map +1 -1
- package/dist/src/commands/dev/sync-csp.command.d.ts.map +1 -1
- package/dist/src/commands/dev/sync-csp.command.js +35 -7
- package/dist/src/commands/dev/sync-csp.command.js.map +1 -1
- package/dist/src/commands/docs/__tests__/publish.command.test.d.ts +2 -0
- package/dist/src/commands/docs/__tests__/publish.command.test.d.ts.map +1 -0
- package/dist/src/commands/docs/__tests__/publish.command.test.js +101 -0
- package/dist/src/commands/docs/__tests__/publish.command.test.js.map +1 -0
- package/dist/src/commands/docs/publish.command.d.ts +29 -0
- package/dist/src/commands/docs/publish.command.d.ts.map +1 -0
- package/dist/src/commands/docs/publish.command.js +82 -0
- package/dist/src/commands/docs/publish.command.js.map +1 -0
- package/dist/src/commands/frontend/publish.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/__tests__/dev-skills.command.test.d.ts.map +1 -1
- package/dist/src/commands/fwk/__tests__/generate-docs.command.test.d.ts.map +1 -1
- package/dist/src/commands/fwk/__tests__/generate-docs.command.test.js.map +1 -1
- package/dist/src/commands/fwk/audit.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/dev-skills.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/dev-skills.command.js +12 -0
- package/dist/src/commands/fwk/dev-skills.command.js.map +1 -1
- package/dist/src/commands/fwk/generate-docs.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/generate-providers.command.d.ts +21 -0
- package/dist/src/commands/fwk/generate-providers.command.d.ts.map +1 -0
- package/dist/src/commands/fwk/generate-providers.command.js +325 -0
- package/dist/src/commands/fwk/generate-providers.command.js.map +1 -0
- package/dist/src/commands/fwk/graph.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-npm.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/version-bump.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/version-set.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/version-show.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/version-show.command.js +9 -1
- package/dist/src/commands/fwk/version-show.command.js.map +1 -1
- package/dist/src/commands/fwk/version-sync.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/what-touches.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/wt-status.command.d.ts +13 -4
- package/dist/src/commands/fwk/wt-status.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/wt-status.command.js +34 -5
- package/dist/src/commands/fwk/wt-status.command.js.map +1 -1
- package/dist/src/commands/fwk/wt-tail.command.d.ts +12 -6
- package/dist/src/commands/fwk/wt-tail.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/wt-tail.command.js +40 -10
- package/dist/src/commands/fwk/wt-tail.command.js.map +1 -1
- package/dist/src/commands/generate/__tests__/email-command.utils.test.d.ts.map +1 -1
- package/dist/src/commands/generate/__tests__/email-command.utils.test.js +0 -1
- package/dist/src/commands/generate/__tests__/email-command.utils.test.js.map +1 -1
- package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
- package/dist/src/commands/generate/email-command.utils.js +1 -0
- package/dist/src/commands/generate/email-command.utils.js.map +1 -1
- package/dist/src/commands/generate/email-preview.command.d.ts +8 -0
- package/dist/src/commands/generate/email-preview.command.d.ts.map +1 -1
- package/dist/src/commands/generate/email-preview.command.js +57 -0
- package/dist/src/commands/generate/email-preview.command.js.map +1 -1
- package/dist/src/commands/generate/email-status.command.d.ts.map +1 -1
- package/dist/src/commands/generate/email-test-send.command.d.ts.map +1 -1
- package/dist/src/commands/generate/email-translate.command.d.ts.map +1 -1
- package/dist/src/commands/generate/email.command.d.ts.map +1 -1
- package/dist/src/commands/generate/labelling-command.utils.d.ts.map +1 -1
- package/dist/src/commands/generate/labelling-command.utils.js +1 -0
- package/dist/src/commands/generate/labelling-command.utils.js.map +1 -1
- package/dist/src/commands/generate/labels-plan.command.d.ts.map +1 -1
- package/dist/src/commands/generate/labels.command.d.ts.map +1 -1
- package/dist/src/commands/generate/translate.command.d.ts.map +1 -1
- package/dist/src/commands/help.command.d.ts.map +1 -1
- package/dist/src/commands/help.command.js +2 -0
- package/dist/src/commands/help.command.js.map +1 -1
- package/dist/src/commands/init.command.d.ts +17 -0
- package/dist/src/commands/init.command.d.ts.map +1 -1
- package/dist/src/commands/init.command.js +89 -4
- package/dist/src/commands/init.command.js.map +1 -1
- package/dist/src/commands/local/__tests__/dev-status.command.test.d.ts.map +1 -1
- package/dist/src/commands/local/__tests__/dev.command.test.d.ts.map +1 -1
- package/dist/src/commands/local/__tests__/dev.command.test.js +60 -0
- package/dist/src/commands/local/__tests__/dev.command.test.js.map +1 -1
- package/dist/src/commands/local/__tests__/doctor.command.test.d.ts.map +1 -1
- package/dist/src/commands/local/__tests__/doctor.command.test.js +16 -2
- package/dist/src/commands/local/__tests__/doctor.command.test.js.map +1 -1
- package/dist/src/commands/local/__tests__/init.command.test.d.ts.map +1 -1
- package/dist/src/commands/local/__tests__/init.command.test.js +28 -1
- package/dist/src/commands/local/__tests__/init.command.test.js.map +1 -1
- package/dist/src/commands/local/__tests__/reinit.command.test.d.ts.map +1 -1
- package/dist/src/commands/local/__tests__/reset.command.test.d.ts.map +1 -1
- package/dist/src/commands/local/__tests__/up.command.test.d.ts.map +1 -1
- package/dist/src/commands/local/__tests__/up.command.test.js +7 -0
- package/dist/src/commands/local/__tests__/up.command.test.js.map +1 -1
- package/dist/src/commands/local/dev-status.command.d.ts.map +1 -1
- package/dist/src/commands/local/dev.command.d.ts +6 -3
- package/dist/src/commands/local/dev.command.d.ts.map +1 -1
- package/dist/src/commands/local/dev.command.js +13 -4
- package/dist/src/commands/local/dev.command.js.map +1 -1
- package/dist/src/commands/local/doctor.command.d.ts +9 -0
- package/dist/src/commands/local/doctor.command.d.ts.map +1 -1
- package/dist/src/commands/local/doctor.command.js +24 -6
- package/dist/src/commands/local/doctor.command.js.map +1 -1
- package/dist/src/commands/local/down.command.d.ts.map +1 -1
- package/dist/src/commands/local/init.command.d.ts.map +1 -1
- package/dist/src/commands/local/init.command.js +11 -2
- package/dist/src/commands/local/init.command.js.map +1 -1
- package/dist/src/commands/local/logs.command.d.ts.map +1 -1
- package/dist/src/commands/local/reinit.command.d.ts.map +1 -1
- package/dist/src/commands/local/reset.command.d.ts.map +1 -1
- package/dist/src/commands/local/status.command.d.ts.map +1 -1
- package/dist/src/commands/local/up.command.d.ts.map +1 -1
- package/dist/src/commands/local/up.command.js.map +1 -1
- package/dist/src/commands/lock/__tests__/check.command.test.d.ts.map +1 -1
- package/dist/src/commands/lock/__tests__/check.live.contract.test.d.ts.map +1 -1
- package/dist/src/commands/lock/check.command.d.ts.map +1 -1
- package/dist/src/commands/lock/check.command.js +4 -10
- package/dist/src/commands/lock/check.command.js.map +1 -1
- package/dist/src/commands/market/__tests__/generate.command.test.d.ts.map +1 -1
- package/dist/src/commands/market/__tests__/market-command.utils.test.d.ts.map +1 -1
- package/dist/src/commands/market/__tests__/market-command.utils.test.js +0 -1
- package/dist/src/commands/market/__tests__/market-command.utils.test.js.map +1 -1
- package/dist/src/commands/market/generate.command.d.ts.map +1 -1
- package/dist/src/commands/market/market-command.utils.d.ts.map +1 -1
- package/dist/src/commands/market/market-command.utils.js +1 -0
- package/dist/src/commands/market/market-command.utils.js.map +1 -1
- package/dist/src/commands/providers/__tests__/required-inputs.test.d.ts +2 -0
- package/dist/src/commands/providers/__tests__/required-inputs.test.d.ts.map +1 -0
- package/dist/src/commands/providers/__tests__/required-inputs.test.js +35 -0
- package/dist/src/commands/providers/__tests__/required-inputs.test.js.map +1 -0
- package/dist/src/commands/providers/show.command.d.ts +51 -0
- package/dist/src/commands/providers/show.command.d.ts.map +1 -0
- package/dist/src/commands/providers/show.command.js +152 -0
- package/dist/src/commands/providers/show.command.js.map +1 -0
- package/dist/src/commands/registry/add.command.d.ts.map +1 -1
- package/dist/src/commands/registry/info.command.d.ts.map +1 -1
- package/dist/src/commands/registry/lockfile-smoke.command.d.ts.map +1 -1
- package/dist/src/commands/registry/login.command.d.ts.map +1 -1
- package/dist/src/commands/registry/login.command.js +2 -0
- package/dist/src/commands/registry/login.command.js.map +1 -1
- package/dist/src/commands/registry/logout.command.d.ts.map +1 -1
- package/dist/src/commands/registry/ping.command.d.ts.map +1 -1
- package/dist/src/commands/registry/publish.command.d.ts.map +1 -1
- package/dist/src/commands/registry/publish.command.js +2 -0
- package/dist/src/commands/registry/publish.command.js.map +1 -1
- package/dist/src/commands/registry/registry-transport.constants.d.ts +33 -0
- package/dist/src/commands/registry/registry-transport.constants.d.ts.map +1 -0
- package/dist/src/commands/registry/registry-transport.constants.js +33 -0
- package/dist/src/commands/registry/registry-transport.constants.js.map +1 -0
- package/dist/src/commands/registry/remove.command.d.ts.map +1 -1
- package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
- package/dist/src/commands/registry/search.command.d.ts.map +1 -1
- package/dist/src/commands/registry/update.command.d.ts.map +1 -1
- package/dist/src/commands/registry/whoami.command.d.ts.map +1 -1
- package/dist/src/commands/registry/whoami.command.js +2 -0
- package/dist/src/commands/registry/whoami.command.js.map +1 -1
- package/dist/src/commands/remote/__tests__/remote-commands.test.d.ts.map +1 -1
- package/dist/src/commands/remote/create.command.d.ts.map +1 -1
- package/dist/src/commands/remote/list.command.d.ts.map +1 -1
- package/dist/src/commands/remote/status.command.d.ts.map +1 -1
- package/dist/src/commands/remote/sync.command.d.ts.map +1 -1
- package/dist/src/commands/setup.command.d.ts.map +1 -1
- package/dist/src/commands/version.command.d.ts.map +1 -1
- package/dist/src/commands/website/__tests__/audit.command.test.d.ts.map +1 -1
- package/dist/src/commands/website/audit.command.d.ts.map +1 -1
- package/dist/src/commands/workbench/__tests__/workbench.commands.test.d.ts.map +1 -1
- package/dist/src/commands/workbench/open.command.d.ts.map +1 -1
- package/dist/src/commands/workbench/status.command.d.ts.map +1 -1
- package/dist/src/infrastructure/errors/error.utils.d.ts.map +1 -1
- package/dist/src/infrastructure/io/file.utils.d.ts.map +1 -1
- package/dist/src/infrastructure/io/io.schemas.d.ts.map +1 -1
- package/dist/src/infrastructure/io/template-processor.d.ts.map +1 -1
- package/dist/src/infrastructure/logger/logger.service.d.ts.map +1 -1
- package/dist/src/infrastructure/process/__tests__/spawn.utils.test.d.ts.map +1 -1
- package/dist/src/infrastructure/process/spawn.utils.d.ts.map +1 -1
- package/dist/src/infrastructure/ui/formatting.service.d.ts.map +1 -1
- package/dist/src/infrastructure/ui/interaction-engine.service.d.ts.map +1 -1
- package/dist/src/infrastructure/ui/markdown-renderer.service.d.ts.map +1 -1
- package/dist/src/infrastructure/ui/ui.schemas.d.ts.map +1 -1
- package/dist/src/infrastructure/utils/string.utils.d.ts.map +1 -1
- package/dist/src/infrastructure/validation/validator.service.d.ts.map +1 -1
- package/dist/src/kernel/__tests__/bootstrap.test.d.ts.map +1 -1
- package/dist/src/kernel/__tests__/command-registry.test.d.ts.map +1 -1
- package/dist/src/kernel/__tests__/command-registry.test.js +9 -0
- package/dist/src/kernel/__tests__/command-registry.test.js.map +1 -1
- package/dist/src/kernel/__tests__/command-runner.test.d.ts.map +1 -1
- package/dist/src/kernel/__tests__/command-scope-utils.test.d.ts.map +1 -1
- package/dist/src/kernel/__tests__/flag-utils.test.d.ts.map +1 -1
- package/dist/src/kernel/__tests__/hooks.test.d.ts.map +1 -1
- package/dist/src/kernel/base-command.d.ts.map +1 -1
- package/dist/src/kernel/bootstrap.d.ts.map +1 -1
- package/dist/src/kernel/command-registry.d.ts.map +1 -1
- package/dist/src/kernel/command-registry.js +6 -0
- package/dist/src/kernel/command-registry.js.map +1 -1
- package/dist/src/kernel/command-runner.d.ts.map +1 -1
- package/dist/src/kernel/command-scope-utils.d.ts.map +1 -1
- package/dist/src/kernel/flag-utils.d.ts.map +1 -1
- package/dist/src/kernel/hooks.d.ts.map +1 -1
- package/dist/src/kernel/logger.d.ts.map +1 -1
- package/dist/src/kernel/types.d.ts +17 -1
- package/dist/src/kernel/types.d.ts.map +1 -1
- package/dist/src/kernel/types.js +16 -0
- package/dist/src/kernel/types.js.map +1 -1
- package/dist/src/main.d.ts.map +1 -1
- package/dist/src/modules/domain/credentials/__tests__/admin-user.module.test.d.ts.map +1 -1
- package/dist/src/modules/domain/credentials/__tests__/approver-user.module.test.d.ts +2 -0
- package/dist/src/modules/domain/credentials/__tests__/approver-user.module.test.d.ts.map +1 -0
- package/dist/src/modules/domain/credentials/__tests__/approver-user.module.test.js +146 -0
- package/dist/src/modules/domain/credentials/__tests__/approver-user.module.test.js.map +1 -0
- package/dist/src/modules/domain/credentials/__tests__/providers-config.module.test.d.ts.map +1 -1
- package/dist/src/modules/domain/credentials/__tests__/providers-config.module.test.js +2 -2
- package/dist/src/modules/domain/credentials/__tests__/providers-config.module.test.js.map +1 -1
- package/dist/src/modules/domain/credentials/admin-user.module.d.ts.map +1 -1
- package/dist/src/modules/domain/credentials/approver-user.module.d.ts +85 -0
- package/dist/src/modules/domain/credentials/approver-user.module.d.ts.map +1 -0
- package/dist/src/modules/domain/credentials/approver-user.module.js +92 -0
- package/dist/src/modules/domain/credentials/approver-user.module.js.map +1 -0
- package/dist/src/modules/domain/credentials/module.types.d.ts.map +1 -1
- package/dist/src/modules/domain/credentials/providers-config.module.d.ts +17 -9
- package/dist/src/modules/domain/credentials/providers-config.module.d.ts.map +1 -1
- package/dist/src/modules/domain/credentials/providers-config.module.js +18 -10
- package/dist/src/modules/domain/credentials/providers-config.module.js.map +1 -1
- package/dist/src/modules/domain/environment/__tests__/database-config.module.test.d.ts.map +1 -1
- package/dist/src/modules/domain/environment/database-config.module.d.ts.map +1 -1
- package/dist/src/modules/domain/environment/module.types.d.ts.map +1 -1
- package/dist/src/modules/domain/environment/paths-config.module.d.ts.map +1 -1
- package/dist/src/modules/domain/environment/runtime-selector.module.d.ts.map +1 -1
- package/dist/src/modules/domain/environment/runtime-semantics.module.d.ts.map +1 -1
- package/dist/src/modules/domain/module.types.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.approving-administrator.test.d.ts +2 -0
- package/dist/src/services/application/__tests__/app-bootstrap.approving-administrator.test.d.ts.map +1 -0
- package/dist/src/services/application/__tests__/app-bootstrap.approving-administrator.test.js +111 -0
- package/dist/src/services/application/__tests__/app-bootstrap.approving-administrator.test.js.map +1 -0
- package/dist/src/services/application/__tests__/app-bootstrap.service.apps-manager-reconnect.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.service.degraded-env.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.service.operation-timeout.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.service.operation-timeout.test.js +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.service.operation-timeout.test.js.map +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.service.test.js +22 -29
- package/dist/src/services/application/__tests__/app-bootstrap.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.js +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.js.map +1 -1
- package/dist/src/services/application/__tests__/app-runtime-targets.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/app-runtime-targets.service.test.js +2 -2
- package/dist/src/services/application/__tests__/app-runtime-targets.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/application-assets-delivery.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/application-assets-delivery.service.test.js +19 -0
- package/dist/src/services/application/__tests__/application-assets-delivery.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/application-dependency-alignment.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/application-initialization-verification.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/application-runtime-bootstrap.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/apps-manager-unavailable-classification.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/apps-manager-unavailable-classification.test.js.map +1 -1
- package/dist/src/services/application/__tests__/audit-provider-immudb-backing.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/dev-orchestrator.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/dev-schema-drift.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/existing-app-bootstrap.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/existing-app-bootstrap.service.test.js +0 -1
- package/dist/src/services/application/__tests__/existing-app-bootstrap.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/local-app-reinit.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/local-app-reinit.service.test.js +8 -1
- package/dist/src/services/application/__tests__/local-app-reinit.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/local-application-initialization.guard.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/local-application-initialization.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/local-application-initialization.service.test.js +35 -0
- package/dist/src/services/application/__tests__/local-application-initialization.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/provider-package-links.service.test.d.ts +2 -0
- package/dist/src/services/application/__tests__/provider-package-links.service.test.d.ts.map +1 -0
- package/dist/src/services/application/__tests__/provider-package-links.service.test.js +224 -0
- package/dist/src/services/application/__tests__/provider-package-links.service.test.js.map +1 -0
- package/dist/src/services/application/__tests__/provider-runtime-sync.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/provider-runtime-sync.service.test.js +28 -0
- package/dist/src/services/application/__tests__/provider-runtime-sync.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/saas-and-infra-contracts.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/saas-and-infra-contracts.test.js +0 -1
- package/dist/src/services/application/__tests__/saas-and-infra-contracts.test.js.map +1 -1
- package/dist/src/services/application/__tests__/saas-scaffold.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/saas-skeleton.service.test.d.ts.map +1 -1
- package/dist/src/services/application/__tests__/saas-skeleton.service.test.js.map +1 -1
- package/dist/src/services/application/app-bootstrap.service.d.ts +43 -10
- package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/app-bootstrap.service.js +92 -49
- package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
- package/dist/src/services/application/app-env.service.d.ts.map +1 -1
- package/dist/src/services/application/app-local-runtime-addresses.service.d.ts.map +1 -1
- package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
- package/dist/src/services/application/app-schema-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/application-assets-delivery.service.d.ts +22 -1
- package/dist/src/services/application/application-assets-delivery.service.d.ts.map +1 -1
- package/dist/src/services/application/application-assets-delivery.service.js +35 -7
- package/dist/src/services/application/application-assets-delivery.service.js.map +1 -1
- package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
- package/dist/src/services/application/application-dev-port-offsets.d.ts.map +1 -1
- package/dist/src/services/application/application-initialization-verification.service.d.ts.map +1 -1
- package/dist/src/services/application/application-root.utils.d.ts.map +1 -1
- package/dist/src/services/application/application-runtime-bootstrap.service.d.ts +6 -0
- package/dist/src/services/application/application-runtime-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/application-runtime-bootstrap.service.js +41 -2
- package/dist/src/services/application/application-runtime-bootstrap.service.js.map +1 -1
- package/dist/src/services/application/dev-orchestrator.service.d.ts.map +1 -1
- package/dist/src/services/application/dev-schema-drift.service.d.ts.map +1 -1
- package/dist/src/services/application/existing-app-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/local-app-reinit.service.d.ts.map +1 -1
- package/dist/src/services/application/local-application-initialization.service.d.ts.map +1 -1
- package/dist/src/services/application/local-application-initialization.service.js +22 -6
- package/dist/src/services/application/local-application-initialization.service.js.map +1 -1
- package/dist/src/services/application/provider-package-links.service.d.ts +160 -0
- package/dist/src/services/application/provider-package-links.service.d.ts.map +1 -0
- package/dist/src/services/application/provider-package-links.service.js +312 -0
- package/dist/src/services/application/provider-package-links.service.js.map +1 -0
- package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
- package/dist/src/services/application/provider-runtime-sync.service.js +7 -20
- package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
- package/dist/src/services/application/saas-scaffold.service.d.ts.map +1 -1
- package/dist/src/services/application/saas-scaffold.service.js +11 -2
- package/dist/src/services/application/saas-scaffold.service.js.map +1 -1
- package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
- package/dist/src/services/application/saas-skeleton.service.js +46 -26
- package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
- package/dist/src/services/brand/__tests__/brand-asset-delivery.test.d.ts.map +1 -1
- package/dist/src/services/brand/brand-asset-projection.d.ts.map +1 -1
- package/dist/src/services/brand/brand-destination-utils.d.ts.map +1 -1
- package/dist/src/services/brand/brand-propagation.types.d.ts.map +1 -1
- package/dist/src/services/brand/brand-ssot-reader.d.ts.map +1 -1
- package/dist/src/services/brand/destinations/app-public.destination.d.ts.map +1 -1
- package/dist/src/services/brand/destinations/runtime-app-config.destination.d.ts.map +1 -1
- package/dist/src/services/brand/destinations/technical-doc-static.destination.d.ts.map +1 -1
- package/dist/src/services/brand/destinations/website-og.destination.d.ts.map +1 -1
- package/dist/src/services/brand/destinations/website-public.destination.d.ts.map +1 -1
- package/dist/src/services/catalog/__tests__/durable-state-classification.test.d.ts +2 -0
- package/dist/src/services/catalog/__tests__/durable-state-classification.test.d.ts.map +1 -0
- package/dist/src/services/catalog/__tests__/durable-state-classification.test.js +93 -0
- package/dist/src/services/catalog/__tests__/durable-state-classification.test.js.map +1 -0
- package/dist/src/services/catalog/__tests__/service-address-resolver.service.test.d.ts.map +1 -1
- package/dist/src/services/catalog/__tests__/service-address-resolver.service.test.js +25 -5
- package/dist/src/services/catalog/__tests__/service-address-resolver.service.test.js.map +1 -1
- package/dist/src/services/catalog/__tests__/service-catalog.schemas.test.d.ts.map +1 -1
- package/dist/src/services/catalog/__tests__/service-catalog.schemas.test.js +109 -51
- package/dist/src/services/catalog/__tests__/service-catalog.schemas.test.js.map +1 -1
- package/dist/src/services/catalog/service-address-resolver.service.d.ts +0 -1
- package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
- package/dist/src/services/catalog/service-address-resolver.service.js +23 -7
- package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
- package/dist/src/services/catalog/service-catalog.schemas.d.ts +148 -51
- package/dist/src/services/catalog/service-catalog.schemas.d.ts.map +1 -1
- package/dist/src/services/catalog/service-catalog.schemas.js +230 -78
- package/dist/src/services/catalog/service-catalog.schemas.js.map +1 -1
- package/dist/src/services/coding-agents/__tests__/acp-conformance-probe.service.test.d.ts +2 -0
- package/dist/src/services/coding-agents/__tests__/acp-conformance-probe.service.test.d.ts.map +1 -0
- package/dist/src/services/coding-agents/__tests__/acp-conformance-probe.service.test.js +110 -0
- package/dist/src/services/coding-agents/__tests__/acp-conformance-probe.service.test.js.map +1 -0
- package/dist/src/services/coding-agents/acp-conformance-probe.service.d.ts +32 -0
- package/dist/src/services/coding-agents/acp-conformance-probe.service.d.ts.map +1 -1
- package/dist/src/services/coding-agents/acp-conformance-probe.service.js +165 -7
- package/dist/src/services/coding-agents/acp-conformance-probe.service.js.map +1 -1
- package/dist/src/services/companion/__tests__/companion-client.service.test.d.ts.map +1 -1
- package/dist/src/services/companion/__tests__/companion-client.service.test.js +96 -0
- package/dist/src/services/companion/__tests__/companion-client.service.test.js.map +1 -1
- package/dist/src/services/companion/__tests__/companion-lifecycle.service.test.d.ts.map +1 -1
- package/dist/src/services/companion/__tests__/workbench-browser-launcher.service.test.d.ts.map +1 -1
- package/dist/src/services/companion/__tests__/workbench-cli.service.test.d.ts.map +1 -1
- package/dist/src/services/companion/companion-client-options.utils.d.ts.map +1 -1
- package/dist/src/services/companion/companion-client-options.utils.js +6 -0
- package/dist/src/services/companion/companion-client-options.utils.js.map +1 -1
- package/dist/src/services/companion/companion-client.service.d.ts.map +1 -1
- package/dist/src/services/companion/companion-client.service.js +34 -0
- package/dist/src/services/companion/companion-client.service.js.map +1 -1
- package/dist/src/services/companion/companion-lifecycle.service.d.ts.map +1 -1
- package/dist/src/services/companion/companion-local-token.utils.d.ts +20 -0
- package/dist/src/services/companion/companion-local-token.utils.d.ts.map +1 -0
- package/dist/src/services/companion/companion-local-token.utils.js +62 -0
- package/dist/src/services/companion/companion-local-token.utils.js.map +1 -0
- package/dist/src/services/companion/companion.schemas.d.ts +12 -0
- package/dist/src/services/companion/companion.schemas.d.ts.map +1 -1
- package/dist/src/services/companion/companion.schemas.js.map +1 -1
- package/dist/src/services/companion/git-helper.service.d.ts.map +1 -1
- package/dist/src/services/companion/local-companion-authority.service.d.ts.map +1 -1
- package/dist/src/services/companion/local-companion-authority.service.js +9 -30
- package/dist/src/services/companion/local-companion-authority.service.js.map +1 -1
- package/dist/src/services/companion/workbench-browser-launcher.service.d.ts.map +1 -1
- package/dist/src/services/companion/workbench-cli.service.d.ts.map +1 -1
- package/dist/src/services/companion/workbench-cli.service.js +10 -1
- package/dist/src/services/companion/workbench-cli.service.js.map +1 -1
- package/dist/src/services/context/__tests__/context-manager.installed-assets.test.d.ts.map +1 -1
- package/dist/src/services/context/__tests__/context-manager.installed-assets.test.js +7 -0
- package/dist/src/services/context/__tests__/context-manager.installed-assets.test.js.map +1 -1
- package/dist/src/services/context/__tests__/context-manager.service.test.d.ts.map +1 -1
- package/dist/src/services/context/context-manager.service.d.ts +9 -0
- package/dist/src/services/context/context-manager.service.d.ts.map +1 -1
- package/dist/src/services/context/context-manager.service.js +13 -1
- package/dist/src/services/context/context-manager.service.js.map +1 -1
- package/dist/src/services/context/context.schemas.d.ts.map +1 -1
- package/dist/src/services/context/state-manager.service.d.ts.map +1 -1
- package/dist/src/services/credentials/__tests__/ci-secrets-mapping.test.d.ts +28 -0
- package/dist/src/services/credentials/__tests__/ci-secrets-mapping.test.d.ts.map +1 -0
- package/dist/src/services/credentials/__tests__/ci-secrets-mapping.test.js +197 -0
- package/dist/src/services/credentials/__tests__/ci-secrets-mapping.test.js.map +1 -0
- package/dist/src/services/credentials/__tests__/composed-provider-secrets.guard.test.d.ts +2 -0
- package/dist/src/services/credentials/__tests__/composed-provider-secrets.guard.test.d.ts.map +1 -0
- package/dist/src/services/credentials/__tests__/composed-provider-secrets.guard.test.js +327 -0
- package/dist/src/services/credentials/__tests__/composed-provider-secrets.guard.test.js.map +1 -0
- package/dist/src/services/credentials/__tests__/framework-managed-secrets.test.d.ts.map +1 -1
- package/dist/src/services/credentials/__tests__/provider-contribution-registration.guard.test.d.ts +2 -0
- package/dist/src/services/credentials/__tests__/provider-contribution-registration.guard.test.d.ts.map +1 -0
- package/dist/src/services/credentials/__tests__/provider-contribution-registration.guard.test.js +94 -0
- package/dist/src/services/credentials/__tests__/provider-contribution-registration.guard.test.js.map +1 -0
- package/dist/src/services/credentials/__tests__/secrets-contracts.test.d.ts.map +1 -1
- package/dist/src/services/credentials/ci-secrets-adapter.service.d.ts.map +1 -1
- package/dist/src/services/credentials/ci-secrets-adapter.service.js +114 -37
- package/dist/src/services/credentials/ci-secrets-adapter.service.js.map +1 -1
- package/dist/src/services/credentials/composed-provider-catalogue.d.ts +209 -0
- package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -0
- package/dist/src/services/credentials/composed-provider-catalogue.js +263 -0
- package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -0
- package/dist/src/services/credentials/credentials.schemas.d.ts +29 -22
- package/dist/src/services/credentials/credentials.schemas.d.ts.map +1 -1
- package/dist/src/services/credentials/credentials.schemas.js +67 -5
- package/dist/src/services/credentials/credentials.schemas.js.map +1 -1
- package/dist/src/services/credentials/credentials.service.d.ts.map +1 -1
- package/dist/src/services/credentials/framework-managed-secrets.d.ts +105 -1
- package/dist/src/services/credentials/framework-managed-secrets.d.ts.map +1 -1
- package/dist/src/services/credentials/framework-managed-secrets.js +51 -8
- package/dist/src/services/credentials/framework-managed-secrets.js.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.d.ts +127 -7
- package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.js +189 -45
- package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
- package/dist/src/services/credentials/secrets-provisioning.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-reader.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-rotation.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
- package/dist/src/services/data-services/data-services.schemas.d.ts +0 -1
- package/dist/src/services/data-services/data-services.schemas.d.ts.map +1 -1
- package/dist/src/services/data-services/data-services.schemas.js +0 -1
- package/dist/src/services/data-services/data-services.schemas.js.map +1 -1
- package/dist/src/services/data-services/data-services.service.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/apps-manager-diagnostics.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/ci-deploy-generator.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/ci-deploy-generator.service.test.js +91 -1
- package/dist/src/services/deployment/__tests__/ci-deploy-generator.service.test.js.map +1 -1
- package/dist/src/services/deployment/__tests__/ci-workflow-generator.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/deployment-template-contracts.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/deployment-template-contracts.test.js +45 -15
- package/dist/src/services/deployment/__tests__/deployment-template-contracts.test.js.map +1 -1
- package/dist/src/services/deployment/__tests__/host-toolchain-readiness.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/host-toolchain-readiness.service.test.js +33 -1
- package/dist/src/services/deployment/__tests__/host-toolchain-readiness.service.test.js.map +1 -1
- package/dist/src/services/deployment/__tests__/infra-templates-render-smoke.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/local-dev-observer-lifecycle.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/local-dev-output-boundary.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/local-dev-session-lease.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/local-dev-shutdown-coordinator.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/local-precondition-checks.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/local-precondition-checks.service.test.js +44 -1
- package/dist/src/services/deployment/__tests__/local-precondition-checks.service.test.js.map +1 -1
- package/dist/src/services/deployment/__tests__/local-runtime-process-cleanup.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/parity.compose-vs-k8s.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/parity.compose-vs-k8s.test.js +82 -87
- package/dist/src/services/deployment/__tests__/parity.compose-vs-k8s.test.js.map +1 -1
- package/dist/src/services/deployment/__tests__/platform-lifecycle.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/__tests__/platform-runtime-policy.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/apps-manager-diagnostics.service.d.ts.map +1 -1
- package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/ci-deploy-generator.service.js +11 -1
- package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
- package/dist/src/services/deployment/ci-workflow-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/ci-workflow-generator.service.js +23 -4
- package/dist/src/services/deployment/ci-workflow-generator.service.js.map +1 -1
- package/dist/src/services/deployment/docker/__tests__/compose-env-value-encoding.test.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/__tests__/compose-host-mounted-artifact.test.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/__tests__/docker-compose-generator.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/__tests__/docker-compose-generator.service.test.js +150 -7
- package/dist/src/services/deployment/docker/__tests__/docker-compose-generator.service.test.js.map +1 -1
- package/dist/src/services/deployment/docker/__tests__/docker-compose-readiness.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js +60 -12
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-readiness.service.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker.schemas.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker.service.d.ts.map +1 -1
- package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts.map +1 -1
- package/dist/src/services/deployment/infra-writer.service.d.ts.map +1 -1
- package/dist/src/services/deployment/infra-writer.service.js +34 -7
- package/dist/src/services/deployment/infra-writer.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/k8s-bootstrap.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/k8s-bootstrap.service.test.js +45 -2
- package/dist/src/services/deployment/k8s/__tests__/k8s-bootstrap.service.test.js.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/k8s-manifest-generator.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/k8s-manifest-generator.service.test.js +110 -9
- package/dist/src/services/deployment/k8s/__tests__/k8s-manifest-generator.service.test.js.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/k8s-operations.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/k8s-runtime-env-secrets.test.d.ts +2 -0
- package/dist/src/services/deployment/k8s/__tests__/k8s-runtime-env-secrets.test.d.ts.map +1 -0
- package/dist/src/services/deployment/k8s/__tests__/k8s-runtime-env-secrets.test.js +226 -0
- package/dist/src/services/deployment/k8s/__tests__/k8s-runtime-env-secrets.test.js.map +1 -0
- package/dist/src/services/deployment/k8s/__tests__/k8s-secrets-generator.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/k8s-secrets-generator.service.test.js +132 -12
- package/dist/src/services/deployment/k8s/__tests__/k8s-secrets-generator.service.test.js.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/kind.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/local-k8s-application-pruning.service.test.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-bootstrap.service.d.ts +23 -0
- package/dist/src/services/deployment/k8s/k8s-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-bootstrap.service.js +52 -6
- package/dist/src/services/deployment/k8s/k8s-bootstrap.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-local-infra-readiness.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +45 -9
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts +4 -3
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js +0 -4
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-operations.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts +10 -1
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js +193 -33
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s.schemas.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/kind.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/local-k8s-application-pruning.service.d.ts.map +1 -1
- package/dist/src/services/deployment/local-dev-observer-lifecycle.d.ts.map +1 -1
- package/dist/src/services/deployment/local-dev-output-boundary.d.ts.map +1 -1
- package/dist/src/services/deployment/local-dev-session-lease.service.d.ts.map +1 -1
- package/dist/src/services/deployment/local-dev-shutdown-coordinator.d.ts.map +1 -1
- package/dist/src/services/deployment/local-infrastructure-initialization.service.d.ts.map +1 -1
- package/dist/src/services/deployment/local-precondition-checks.schemas.d.ts.map +1 -1
- package/dist/src/services/deployment/local-precondition-checks.service.d.ts +28 -17
- package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
- package/dist/src/services/deployment/local-precondition-checks.service.js +83 -3
- package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
- package/dist/src/services/deployment/local-runtime-process-cleanup.service.d.ts.map +1 -1
- package/dist/src/services/deployment/platform-lifecycle.service.d.ts.map +1 -1
- package/dist/src/services/deployment/platform-runtime-policy.service.d.ts.map +1 -1
- package/dist/src/services/deployment/version-compare.utils.d.ts.map +1 -1
- package/dist/src/services/design-tokens/design-tokens-command.service.d.ts.map +1 -1
- package/dist/src/services/design-tokens/design-tokens-config.service.d.ts.map +1 -1
- package/dist/src/services/design-tokens/design-tokens-config.template.d.ts.map +1 -1
- package/dist/src/services/design-tokens/design-tokens-css-block.service.d.ts.map +1 -1
- package/dist/src/services/design-tokens/design-tokens-paths.service.d.ts.map +1 -1
- package/dist/src/services/design-tokens/design-tokens.constants.d.ts.map +1 -1
- package/dist/src/services/design-tokens/design-tokens.models.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/compose-converge-args.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/config-hydration-seam.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/env-configuration-generator.service.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/env-configuration-generator.service.test.js +36 -20
- package/dist/src/services/environment/__tests__/env-configuration-generator.service.test.js.map +1 -1
- package/dist/src/services/environment/__tests__/env-sync.service.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/env-sync.service.test.js +6 -4
- package/dist/src/services/environment/__tests__/env-sync.service.test.js.map +1 -1
- package/dist/src/services/environment/__tests__/env-vars-builder.service.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/env-vars-builder.service.test.js +89 -8
- package/dist/src/services/environment/__tests__/env-vars-builder.service.test.js.map +1 -1
- package/dist/src/services/environment/__tests__/environment-hydration.utils.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/environment-lifecycle.needs-local-mongodb.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/environment-lifecycle.needs-local-postgresql.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/environment-lifecycle.self-hosts-backing-service.test.d.ts +2 -0
- package/dist/src/services/environment/__tests__/environment-lifecycle.self-hosts-backing-service.test.d.ts.map +1 -0
- package/dist/src/services/environment/__tests__/environment-lifecycle.self-hosts-backing-service.test.js +136 -0
- package/dist/src/services/environment/__tests__/environment-lifecycle.self-hosts-backing-service.test.js.map +1 -0
- package/dist/src/services/environment/__tests__/environment-paths.service.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/environment-registry.service.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/environment-setup.non-interactive.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/environment-setup.non-interactive.test.js +23 -0
- package/dist/src/services/environment/__tests__/environment-setup.non-interactive.test.js.map +1 -1
- package/dist/src/services/environment/__tests__/platform-engine-change.utils.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/platform-image-ref.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/platform-image-ref.test.js.map +1 -1
- package/dist/src/services/environment/__tests__/platform-runtime-state.service.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/provider-secrets-env.service.test.d.ts.map +1 -1
- package/dist/src/services/environment/__tests__/runtime-bootstrap.authored-database-refresh.test.d.ts.map +1 -1
- package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.d.ts +52 -14
- package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.js +41 -38
- package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
- package/dist/src/services/environment/env-sync.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-sync.service.js +13 -13
- package/dist/src/services/environment/env-sync.service.js.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.d.ts +28 -0
- package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.js +188 -41
- package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
- package/dist/src/services/environment/environment-hydration.utils.d.ts.map +1 -1
- package/dist/src/services/environment/environment-lifecycle.service.d.ts +53 -1
- package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment-lifecycle.service.js +65 -1
- package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
- package/dist/src/services/environment/environment-paths.service.d.ts +2 -1
- package/dist/src/services/environment/environment-paths.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment-paths.service.js +5 -3
- package/dist/src/services/environment/environment-paths.service.js.map +1 -1
- package/dist/src/services/environment/environment-registry.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment-setup.service.js +23 -9
- package/dist/src/services/environment/environment-setup.service.js.map +1 -1
- package/dist/src/services/environment/environment.schemas.d.ts.map +1 -1
- package/dist/src/services/environment/environment.service.d.ts +6 -1
- package/dist/src/services/environment/environment.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment.service.js +2 -0
- package/dist/src/services/environment/environment.service.js.map +1 -1
- package/dist/src/services/environment/platform-engine-change.utils.d.ts.map +1 -1
- package/dist/src/services/environment/platform-runtime-state.service.d.ts.map +1 -1
- package/dist/src/services/environment/platform-runtime.schemas.d.ts.map +1 -1
- package/dist/src/services/environment/platform-runtime.schemas.js.map +1 -1
- package/dist/src/services/environment/runtime-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/application-rule-imports.test.d.ts +2 -0
- package/dist/src/services/framework/__tests__/application-rule-imports.test.d.ts.map +1 -0
- package/dist/src/services/framework/__tests__/application-rule-imports.test.js +58 -0
- package/dist/src/services/framework/__tests__/application-rule-imports.test.js.map +1 -0
- package/dist/src/services/framework/__tests__/engine-provider-specifications.reconciliation.test.d.ts +2 -0
- package/dist/src/services/framework/__tests__/engine-provider-specifications.reconciliation.test.d.ts.map +1 -0
- package/dist/src/services/framework/__tests__/engine-provider-specifications.reconciliation.test.js +55 -0
- package/dist/src/services/framework/__tests__/engine-provider-specifications.reconciliation.test.js.map +1 -0
- package/dist/src/services/framework/__tests__/fixtures/framework-knowledge-package-only.fixture.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/fixtures/framework-knowledge-package-only.fixture.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-development-skills-sync.installed-package.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-development-skills-sync.installed-package.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-development-skills-sync.package-only.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-development-skills-sync.service.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-docker-publish.service.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-docker-publish.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-knowledge-application-guidance.validator.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-knowledge-audit.live.contract.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-knowledge-audit.live.contract.test.js +17 -0
- package/dist/src/services/framework/__tests__/framework-knowledge-audit.live.contract.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-knowledge-audit.service.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-knowledge-audit.service.test.js +101 -0
- package/dist/src/services/framework/__tests__/framework-knowledge-audit.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-knowledge-generation.service.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-knowledge-generation.service.test.js +4 -70
- package/dist/src/services/framework/__tests__/framework-knowledge-generation.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-npm-publish.service.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-npm-publish.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-publish-manifest.service.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-publish-manifest.service.test.js +78 -6
- package/dist/src/services/framework/__tests__/framework-publish-manifest.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-release.service.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-release.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-secrets-writer.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-version.service.test.d.ts.map +1 -1
- package/dist/src/services/framework/__tests__/framework-version.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/installed-framework-assets.service.test.d.ts.map +1 -1
- package/dist/src/services/framework/application-rule-imports.d.ts +36 -0
- package/dist/src/services/framework/application-rule-imports.d.ts.map +1 -0
- package/dist/src/services/framework/application-rule-imports.js +77 -0
- package/dist/src/services/framework/application-rule-imports.js.map +1 -0
- package/dist/src/services/framework/framework-development-skills-sync.service.d.ts +23 -0
- package/dist/src/services/framework/framework-development-skills-sync.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-development-skills-sync.service.js +51 -0
- package/dist/src/services/framework/framework-development-skills-sync.service.js.map +1 -1
- package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
- package/dist/src/services/framework/framework-knowledge-application-guidance.validator.d.ts.map +1 -1
- package/dist/src/services/framework/framework-knowledge-audit.service.d.ts +86 -1
- package/dist/src/services/framework/framework-knowledge-audit.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-knowledge-audit.service.js +212 -1
- package/dist/src/services/framework/framework-knowledge-audit.service.js.map +1 -1
- package/dist/src/services/framework/framework-knowledge-generation.service.d.ts +0 -1
- package/dist/src/services/framework/framework-knowledge-generation.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-knowledge-generation.service.js +29 -215
- package/dist/src/services/framework/framework-knowledge-generation.service.js.map +1 -1
- package/dist/src/services/framework/framework-knowledge-scan.constants.d.ts.map +1 -1
- package/dist/src/services/framework/framework-npm-publish.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-npm-publish.service.js +7 -3
- package/dist/src/services/framework/framework-npm-publish.service.js.map +1 -1
- package/dist/src/services/framework/framework-publish-manifest.service.d.ts +44 -1
- package/dist/src/services/framework/framework-publish-manifest.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-publish-manifest.service.js +79 -4
- package/dist/src/services/framework/framework-publish-manifest.service.js.map +1 -1
- package/dist/src/services/framework/framework-release.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-version.service.d.ts +13 -0
- package/dist/src/services/framework/framework-version.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-version.service.js +23 -24
- package/dist/src/services/framework/framework-version.service.js.map +1 -1
- package/dist/src/services/framework/installed-framework-assets.service.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/__tests__/base-url-is-a-declared-env-slot.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/base-url-is-a-declared-env-slot.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/base-url-is-a-declared-env-slot.test.js +100 -0
- package/dist/src/services/framework/provider-transposition/__tests__/base-url-is-a-declared-env-slot.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/client-and-schema-agree.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/client-and-schema-agree.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/client-and-schema-agree.test.js +92 -0
- package/dist/src/services/framework/provider-transposition/__tests__/client-and-schema-agree.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/decision-projection.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/decision-projection.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/decision-projection.test.js +83 -0
- package/dist/src/services/framework/provider-transposition/__tests__/decision-projection.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/plan-matches-emit.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/plan-matches-emit.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/plan-matches-emit.test.js +219 -0
- package/dist/src/services/framework/provider-transposition/__tests__/plan-matches-emit.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/provider-catalogue-record.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/provider-catalogue-record.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/provider-catalogue-record.test.js +372 -0
- package/dist/src/services/framework/provider-transposition/__tests__/provider-catalogue-record.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/transposition-contract.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/transposition-contract.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/transposition-contract.test.js +794 -0
- package/dist/src/services/framework/provider-transposition/__tests__/transposition-contract.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/activepieces-source.reader.d.ts +14 -0
- package/dist/src/services/framework/provider-transposition/activepieces-source.reader.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/activepieces-source.reader.js +1047 -0
- package/dist/src/services/framework/provider-transposition/activepieces-source.reader.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/openapi-enrichment.d.ts +26 -0
- package/dist/src/services/framework/provider-transposition/openapi-enrichment.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/openapi-enrichment.js +57 -0
- package/dist/src/services/framework/provider-transposition/openapi-enrichment.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/openapi-source.reader.d.ts +35 -0
- package/dist/src/services/framework/provider-transposition/openapi-source.reader.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/openapi-source.reader.js +204 -0
- package/dist/src/services/framework/provider-transposition/openapi-source.reader.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/provider-catalogue-record.d.ts +410 -0
- package/dist/src/services/framework/provider-transposition/provider-catalogue-record.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/provider-catalogue-record.js +434 -0
- package/dist/src/services/framework/provider-transposition/provider-catalogue-record.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/provider-merge.d.ts +39 -0
- package/dist/src/services/framework/provider-transposition/provider-merge.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/provider-merge.js +274 -0
- package/dist/src/services/framework/provider-transposition/provider-merge.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/provider-package.emitter.d.ts +139 -0
- package/dist/src/services/framework/provider-transposition/provider-package.emitter.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/provider-package.emitter.js +1586 -0
- package/dist/src/services/framework/provider-transposition/provider-package.emitter.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/sim-source.reader.d.ts +35 -0
- package/dist/src/services/framework/provider-transposition/sim-source.reader.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/sim-source.reader.js +527 -0
- package/dist/src/services/framework/provider-transposition/sim-source.reader.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/transposed-provider.model.d.ts +229 -0
- package/dist/src/services/framework/provider-transposition/transposed-provider.model.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/transposed-provider.model.js +96 -0
- package/dist/src/services/framework/provider-transposition/transposed-provider.model.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/url-template.extractor.d.ts +55 -0
- package/dist/src/services/framework/provider-transposition/url-template.extractor.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/url-template.extractor.js +196 -0
- package/dist/src/services/framework/provider-transposition/url-template.extractor.js.map +1 -0
- package/dist/src/services/frontend/__tests__/cloudflare-cdn.service.test.d.ts.map +1 -1
- package/dist/src/services/frontend/__tests__/frontend-dist-uploader.service.test.d.ts.map +1 -1
- package/dist/src/services/frontend/__tests__/frontend-publish.service.test.d.ts.map +1 -1
- package/dist/src/services/frontend/cloudflare-cdn.service.d.ts.map +1 -1
- package/dist/src/services/frontend/cloudflare-cdn.service.js +33 -2
- package/dist/src/services/frontend/cloudflare-cdn.service.js.map +1 -1
- package/dist/src/services/frontend/frontend-dist-uploader.service.d.ts.map +1 -1
- package/dist/src/services/frontend/frontend-publish.service.d.ts.map +1 -1
- package/dist/src/services/frontend/frontend-publish.service.js +1 -1
- package/dist/src/services/frontend/frontend-publish.service.js.map +1 -1
- package/dist/src/services/generation/domain-generator.service.d.ts.map +1 -1
- package/dist/src/services/generation/generator.schemas.d.ts.map +1 -1
- package/dist/src/services/generation/operation-generator.service.d.ts.map +1 -1
- package/dist/src/services/generation/resource-generator.service.d.ts.map +1 -1
- package/dist/src/services/generation/template-registry.service.d.ts.map +1 -1
- package/dist/src/services/registry/artifact-extractor.utils.d.ts.map +1 -1
- package/dist/src/services/registry/boundary-fanout.utils.d.ts.map +1 -1
- package/dist/src/services/registry/index.d.ts.map +1 -1
- package/dist/src/services/registry/registry-command.utils.d.ts.map +1 -1
- package/dist/src/services/registry/registry-config-resolver.service.d.ts.map +1 -1
- package/dist/src/services/registry/registry-credentials.service.d.ts.map +1 -1
- package/dist/src/services/registry/saas-root-required.error.d.ts.map +1 -1
- package/dist/src/services/security/__tests__/csp-artifact-currency.live.contract.test.d.ts +67 -0
- package/dist/src/services/security/__tests__/csp-artifact-currency.live.contract.test.d.ts.map +1 -0
- package/dist/src/services/security/__tests__/csp-artifact-currency.live.contract.test.js +212 -0
- package/dist/src/services/security/__tests__/csp-artifact-currency.live.contract.test.js.map +1 -0
- package/dist/src/services/security/__tests__/csp-boundary.test.d.ts.map +1 -1
- package/dist/src/services/security/__tests__/csp-sync.service.test.d.ts.map +1 -1
- package/dist/src/services/security/__tests__/csp-sync.service.test.js +411 -5
- package/dist/src/services/security/__tests__/csp-sync.service.test.js.map +1 -1
- package/dist/src/services/security/csp-sync.service.d.ts +27 -5
- package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
- package/dist/src/services/security/csp-sync.service.js +204 -16
- package/dist/src/services/security/csp-sync.service.js.map +1 -1
- package/dist/src/services/tools/utility-tools.service.d.ts.map +1 -1
- package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.d.ts +2 -0
- package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.d.ts.map +1 -0
- package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.js +94 -0
- package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.js.map +1 -0
- package/dist/src/services/website/website-structured-data-audit.service.d.ts +9 -0
- package/dist/src/services/website/website-structured-data-audit.service.d.ts.map +1 -1
- package/dist/src/services/website/website-structured-data-audit.service.js +72 -11
- package/dist/src/services/website/website-structured-data-audit.service.js.map +1 -1
- package/dist/src/test-utils/resolved-homes.test.utils.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/framework-root-package.json +2 -0
- package/package.json +19 -17
- package/scripts/app-dependency-alignment/propagated-engine-overrides.json +15 -0
- package/templates/infra/ci/deploy-docker-compose.yml.hbs +1 -1
- package/templates/infra/ci/deploy-k8s.yml.hbs +1 -1
- package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +394 -90
- package/templates/infra/docker-images/backend/Dockerfile.backend-base +7 -1
- package/templates/infra/docker-images/backend/Dockerfile.backend-base-java +7 -1
- package/templates/infra/docker-images/platform/Dockerfile.platform-base.dockerignore +23 -0
- package/templates/infra/k8s/applications/wildo-ai-application/backend.deployment.yaml.hbs +8 -5
- package/templates/infra/k8s/applications/wildo-ai-application/ingress.yaml.hbs +3 -2
- package/templates/infra/k8s/applications/wildo-ai-application/minion.deployment.yaml.hbs +22 -6
- package/templates/infra/k8s/applications/wildo-ai-application/worker.deployment.yaml.hbs +17 -13
- package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +11 -0
- package/templates/infra/k8s/storage/local/persistent-volumes.yaml.hbs +18 -4
- package/templates/saas/engine-peer-closure.json +12 -0
- package/templates/saas/i18n/email/components/EmailHeader.tsx +9 -0
- package/templates/saas/i18n/email/components/EmailLayout.tsx +14 -0
- package/templates/saas/i18n/email/resources/applicationApiKeys/create.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationApiKeys/deactivate.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationApiKeys/reactivate.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationApiKeys/regenerate.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationApiKeys/rotate.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationOAuthClients/create.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationOAuthClients/regenerate.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationOAuthClients/rotate.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationVersions/create.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationVersions/delete.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationVersions/deprecate.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationVersions/promote.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applicationVersions/rollback.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applications/create.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applications/create.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applications/delete.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applications/delete.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applications/transfer.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applications/transfer.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applications/update.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/applications/update.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/create.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/create.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/deactivate.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/deactivate.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/delete.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/delete.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/reactivate.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/reactivate.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/regenerate.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/regenerate.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/rotate.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationApiKeys/rotate.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationFeatures/disable_feature.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationFeatures/enable_feature.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationFeatures/reset_features.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationFeatures/update.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/create.user-self/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/delete.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/grantOwnership.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/reactivate.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/reactivate.user-self/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/resend.user-self/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/revoke.user-self_admin/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/revoke.user-self_invitee/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/suspend.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/suspend.user-self/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationMembers/update.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationOAuthClients/create.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationOAuthClients/create.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationOAuthClients/delete.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationOAuthClients/delete.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationOAuthClients/regenerate.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationOAuthClients/regenerate.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationOAuthClients/rotate.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationOAuthClients/rotate.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationUnits/archive.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationUnits/create.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationUnits/delete.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationUnits/move.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationUnits/restore.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizationUnits/update.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizations/activate.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizations/create.admin.user-self/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizations/create.user-self/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizations/request_deletion.admin.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizations/request_deletion.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizations/restore.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizations/suspend.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizations/update.admin.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/organizations/update.organization-administrative/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/platformAccessGrants/requestAccess.organization-users/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/user_self/deactivate_account.user-self/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/user_self/reactivate_account.user-self/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/users/assign_roles.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/users/create.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/users/delete.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/users/force_password_reset.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/users/revoke_roles.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/users/send_invitation.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/users/suspend_user.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/users/unsuspend_user.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/resources/users/update.application-administrator/template.tsx +1 -1
- package/templates/saas/i18n/email/system/email-otp/template.tsx +1 -0
- package/templates/saas/i18n/email/system/email-verification/template.tsx +1 -1
- package/templates/saas/i18n/email/system/magic-link/template.tsx +1 -1
- package/templates/saas/i18n/email/system/new-device-login/template.tsx +1 -1
- package/templates/saas/i18n/email/system/organization-invitation/template.tsx +1 -0
- package/templates/saas/i18n/email/system/organization-member-removed/template.tsx +1 -0
- package/templates/saas/i18n/email/system/password-reset/template.tsx +1 -1
- package/templates/saas/i18n/email/system/payment-failed/template.tsx +1 -1
- package/templates/saas/i18n/email/system/security-alert/template.tsx +1 -0
- package/templates/saas/i18n/email/system/subscription-cancelled/template.tsx +1 -1
- package/templates/saas/i18n/email/system/subscription-confirmation/template.tsx +1 -0
- package/templates/saas/i18n/email/system/welcome-email/template.tsx +1 -1
- package/templates/saas/scenarios/add-file-picker-provider/files/frontend/src/engine/providers/__providerRef__.frontend-app.module.ts.hbs +10 -4
- package/templates/saas/scenarios/add-minion/files/minions/__minionDir__/src/index.ts.hbs +9 -5
- package/templates/saas/scenarios/add-module/scenario.json +3 -3
- package/templates/saas/scenarios/add-provider/scenario.json +36 -0
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/docusaurus.config.ts.hbs +52 -2
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/csp.config.ts +20 -3
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/pages/auth/exchange.tsx +75 -0
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/pages/search.tsx.hbs +47 -3
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/theme/Root.tsx +46 -4
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/static/img/favicon.svg +5 -4
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/static/img/logo.svg +11 -5
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/wildo.tech-doc.config.ts.hbs +18 -7
- package/templates/saas/scenarios/add-website/files/website/src/app-origin.ts.hbs +32 -16
- package/templates/saas/scenarios/add-website/files/website/src/components/HeaderComponent.tsx +2 -2
- package/templates/saas/scenarios/add-website/files/website/src/pages/index.astro +1 -0
- package/templates/saas/scenarios/add-website/files/website/src/sections/landing.sections.tsx +2 -2
- package/templates/saas/scenarios/add-worker-node/files/workers/__workerDir__/src/index.ts.hbs +9 -5
- package/templates/saas/skeleton/.wildo-saas/dev-framework-scripts/sync-engine.sh +46 -14
- package/templates/saas/skeleton/CLAUDE.md.hbs +12 -0
- package/templates/saas/skeleton/backend-api/package.json.hbs +1 -1
- package/templates/saas/skeleton/backend-api/src/companion-exports.ts +13 -2
- package/templates/saas/skeleton/backend-api/src/index.ts +16 -0
- package/templates/saas/skeleton/frontend/src/config/settings-hub.config.ts +11 -5
- package/templates/saas/skeleton/frontend/src/engine/app-level-views/app-level-views.definitions.module.frontend.ts +1 -1
- package/templates/saas/skeleton/frontend/src/generated/csp.generated.json.hbs +17 -0
- package/templates/saas/skeleton/infrastructure/local/wildo.infra.local.config.ts.hbs +19 -0
- package/templates/saas/skeleton/wildo.saas.config.ts.init.hbs +59 -2
- package/wildo-framework.info.json +1 -1
- package/templates/infra/k8s/internal/gotenberg/deployment.yaml.hbs +0 -46
- package/templates/infra/k8s/internal/gotenberg/service.yaml.hbs +0 -19
- package/templates/infra/k8s/middleware.yaml.hbs +0 -101
- package/templates/saas/scenarios/add-backend-provider/scenario.json +0 -17
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/static/img/favicon.png +0 -0
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/static/img/logo.png +0 -0
- package/templates/saas/skeleton/backend-api/src/provider-contributions.ts +0 -44
|
@@ -0,0 +1,1586 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { engineBackendProviderContributions } from '@wildo-ai/external-connectors-private/companion';
|
|
4
|
+
import { ProviderTier } from '@wildo-ai/saas-models';
|
|
5
|
+
import { ExternalProvider_Connection_DelegationMode, ExternalProvider_Connection_OwnerScope, } from '@wildo-ai/external-connectors-models';
|
|
6
|
+
import { applyRecord, ledgerRefs, readDecisionRefs, readDecisions, readLedger, withdrawVendor, writeLedger, } from './provider-catalogue-record.js';
|
|
7
|
+
import { TransposedAuthKind, TransposedInputKind, TransposedOperationResolution, TransposedParameterLocation, } from './transposed-provider.model.js';
|
|
8
|
+
/**
|
|
9
|
+
* Why an otherwise-resolved operation was not emitted.
|
|
10
|
+
*
|
|
11
|
+
* A closed vocabulary rather than a sentence, because the ACCEPTANCE of a refusal is stored as a
|
|
12
|
+
* per-vendor shrink-only baseline keyed by this code — the shape `spec-citations.baseline.json` and
|
|
13
|
+
* `check:invented-display-text` already use — so that a NEW refusal stands out against an
|
|
14
|
+
* understood one. The list of refused ids is deliberately NOT stored: the guard re-derives it every
|
|
15
|
+
* run, and a stored copy would rot the first time a hole is named.
|
|
16
|
+
*/
|
|
17
|
+
export var EmitRefusalReason;
|
|
18
|
+
(function (EmitRefusalReason) {
|
|
19
|
+
/** No path template at all, or `/` — there is no endpoint to call. */
|
|
20
|
+
EmitRefusalReason["NO_PATH_TEMPLATE"] = "NO_PATH_TEMPLATE";
|
|
21
|
+
/** A `{hole}` in the path that the operation's own parameters never declare. */
|
|
22
|
+
EmitRefusalReason["UNDECLARED_PATH_HOLE"] = "UNDECLARED_PATH_HOLE";
|
|
23
|
+
/**
|
|
24
|
+
* A PATH parameter no input field feeds. Dominated by positionally-named holes (`{param1}`,
|
|
25
|
+
* `{param2}`) where the source's URL expression was too complex to name, and `declareWhatTheWireNeeds`
|
|
26
|
+
* declines to invent a name because an input called `param1` is a sentence no caller can act on.
|
|
27
|
+
*/
|
|
28
|
+
EmitRefusalReason["UNFED_PATH_PARAMETER"] = "UNFED_PATH_PARAMETER";
|
|
29
|
+
/**
|
|
30
|
+
* A path template that is not a PATH — it carries whitespace, so it is a query language the source
|
|
31
|
+
* expressed as a URL rather than an endpoint.
|
|
32
|
+
*
|
|
33
|
+
* Measured 2026-09-09 across 4,328 emitted operations: THREE, all Salesforce, all SOQL —
|
|
34
|
+
* `/SELECT FIELDS(ALL) FROM {object} WHERE {field} = '…' LIMIT 200`. Salesforce takes SOQL in a
|
|
35
|
+
* QUERY PARAMETER (`/services/data/vXX.0/query?q=…`), never in the path, so each of the three
|
|
36
|
+
* would have requested a nonsense URL. They shipped as callable and typechecked perfectly.
|
|
37
|
+
*
|
|
38
|
+
* Whitespace, and NOT the quotes or parentheses a first pass reached for. Eleven operations carry
|
|
39
|
+
* one of those and eight are correct: OData addresses a resource as
|
|
40
|
+
* `/workbook/worksheets('{sheetName}')/range(address='{address}')`, where both are legal inside a
|
|
41
|
+
* path segment. A space is not legal unencoded, so it is the one character that separates a
|
|
42
|
+
* malformed path from an unusual one.
|
|
43
|
+
*/
|
|
44
|
+
EmitRefusalReason["PATH_TEMPLATE_IS_NOT_A_PATH"] = "PATH_TEMPLATE_IS_NOT_A_PATH";
|
|
45
|
+
})(EmitRefusalReason || (EmitRefusalReason = {}));
|
|
46
|
+
const PACKAGE_NAME = '@wildo-ai/providers';
|
|
47
|
+
/**
|
|
48
|
+
* Where a HUMAN supplements a generated vendor.
|
|
49
|
+
*
|
|
50
|
+
* `providers/src/_authored/<ref>.authored.ts`. It lives INSIDE `src/` because the package compiles
|
|
51
|
+
* with `rootDir: "./src"` and an `authored/` sibling would need a different dist layout and a
|
|
52
|
+
* different exports map for one file — churn in the two places a mistake is most expensive.
|
|
53
|
+
*
|
|
54
|
+
* So the replace narrows instead: the emitter removes every child of `src/` that does not begin with
|
|
55
|
+
* `_`, and everything it writes is a vendor directory or a root module. The underscore is the whole
|
|
56
|
+
* convention — hand-owned, never regenerated — which is checkable in one line rather than a growing
|
|
57
|
+
* list of names to remember.
|
|
58
|
+
*
|
|
59
|
+
* The file is TypeScript rather than JSON on purpose: an authored operation carries a Zod input
|
|
60
|
+
* schema, and it is checked against the SAME contract the generated ones satisfy, by the same
|
|
61
|
+
* compiler, in the same package. A JSON supplement could express neither.
|
|
62
|
+
*/
|
|
63
|
+
const AUTHORED_DIRECTORY = 'src/_authored';
|
|
64
|
+
const AUTHORED_FILE_SUFFIX = '.authored.ts';
|
|
65
|
+
/** From `src/<ref>/backend.exports.ts` across to `src/_authored/`. */
|
|
66
|
+
const AUTHORED_IMPORT_PREFIX = '../_authored/';
|
|
67
|
+
/** The import specifier drops `.ts`, which the emitted module resolves through the package's own tsconfig. */
|
|
68
|
+
const AUTHORED_FILE_SUFFIX_IMPORT = '.authored';
|
|
69
|
+
/**
|
|
70
|
+
* Which vendors a human has supplemented.
|
|
71
|
+
*
|
|
72
|
+
* Discovered by LISTING rather than by evaluating: the emitter never loads an authored file, so a
|
|
73
|
+
* supplement that does not compile fails the package typecheck — where a compiler explains it — and
|
|
74
|
+
* not the batch, where it would take 693 unrelated vendors down with it.
|
|
75
|
+
*/
|
|
76
|
+
function readAuthoredVendors(packageRoot) {
|
|
77
|
+
const directory = join(packageRoot, AUTHORED_DIRECTORY);
|
|
78
|
+
if (!existsSync(directory))
|
|
79
|
+
return new Set();
|
|
80
|
+
return new Set(readdirSync(directory)
|
|
81
|
+
.filter((entry) => entry.endsWith(AUTHORED_FILE_SUFFIX))
|
|
82
|
+
.map((entry) => entry.slice(0, -AUTHORED_FILE_SUFFIX.length)));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* An operation whose declaration disagrees with its own path template is not emitted.
|
|
86
|
+
*
|
|
87
|
+
* The executor binds a `{token}` from a declared PATH parameter. A hole with no parameter cannot be
|
|
88
|
+
* bound and the call goes out with a literal `{token}` in the URL; a path with no holes at all is a
|
|
89
|
+
* template that lost its subject. Both are broken operations that TYPECHECK perfectly — the shape is
|
|
90
|
+
* right and the content disagrees with itself — which is why the check has to exist here rather than
|
|
91
|
+
* being left to the compiler. Measured when it was added: 18 unbound holes and 11 empty paths across
|
|
92
|
+
* 6,955 operations, every one of which would have failed at the vendor rather than at the batch.
|
|
93
|
+
*
|
|
94
|
+
* Refused rather than repaired: the mapper cannot know what the vendor meant by a hole nobody named.
|
|
95
|
+
*/
|
|
96
|
+
/**
|
|
97
|
+
* A parameter the operation declares but its input does not — DECLARED, not dropped and not refused.
|
|
98
|
+
*
|
|
99
|
+
* This replaces refusing 1,334 operations, and the reconsideration is worth writing down. A parameter
|
|
100
|
+
* with no feeding input field is a gap in the DOCUMENTATION, not proof that the operation is
|
|
101
|
+
* impossible: the value is one the vendor's own URL asks for, the name comes from that URL, and the
|
|
102
|
+
* input schema is loose, so a caller who knows to pass it already can. Refusing the operation
|
|
103
|
+
* withheld a capability to punish a missing sentence.
|
|
104
|
+
*
|
|
105
|
+
* So the missing sentence is written instead. The field is named after what the compiler will look
|
|
106
|
+
* for (`from ?? name`), required exactly when the wire position requires it — a path cannot have a
|
|
107
|
+
* hole — and described as coming from the request rather than from a source that never mentioned it.
|
|
108
|
+
* Nothing is guessed: every name here is one the source's own URL template or query bag states.
|
|
109
|
+
*
|
|
110
|
+
* What still refuses, in `refusalReason`, is the case this cannot honestly repair: a hole named
|
|
111
|
+
* positionally (`param1`), where the source's expression was too complex to name. Declaring an input
|
|
112
|
+
* called `param1` would be a sentence no caller can act on.
|
|
113
|
+
*/
|
|
114
|
+
function declareWhatTheWireNeeds(operation) {
|
|
115
|
+
const declared = new Set(operation.inputFields.map((field) => field.name));
|
|
116
|
+
const missing = [];
|
|
117
|
+
for (const parameter of operation.parameters) {
|
|
118
|
+
if (parameter.in === TransposedParameterLocation.BODY)
|
|
119
|
+
continue;
|
|
120
|
+
const feeder = parameter.from ?? parameter.name;
|
|
121
|
+
if (declared.has(feeder) || /^param\d+$/.test(feeder))
|
|
122
|
+
continue;
|
|
123
|
+
// A credential is resolved, never asked for — except in a PATH, where the name is a resource id
|
|
124
|
+
// wearing a credential's spelling and nothing but the caller can supply it.
|
|
125
|
+
if (parameter.in !== TransposedParameterLocation.PATH && CALLER_SUPPLIES_NO_CREDENTIAL.has(feeder))
|
|
126
|
+
continue;
|
|
127
|
+
declared.add(feeder);
|
|
128
|
+
missing.push({
|
|
129
|
+
name: feeder,
|
|
130
|
+
kind: parameter.in === TransposedParameterLocation.PATH ? TransposedInputKind.WIRE_SCALAR : TransposedInputKind.WIRE_SCALAR_OR_LIST,
|
|
131
|
+
required: parameter.in === TransposedParameterLocation.PATH,
|
|
132
|
+
description: `Sent as the ${parameter.in} parameter \`${parameter.name}\`.`,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
return missing.length === 0 ? operation : { ...operation, inputFields: [...operation.inputFields, ...missing] };
|
|
136
|
+
}
|
|
137
|
+
function refusalReason(operation) {
|
|
138
|
+
const template = operation.pathTemplate ?? '';
|
|
139
|
+
if (template === '' || template === '/')
|
|
140
|
+
return EmitRefusalReason.NO_PATH_TEMPLATE;
|
|
141
|
+
// Before asking anything about the HOLES, ask whether this is a path at all — see the enum member.
|
|
142
|
+
if (/\s/.test(template))
|
|
143
|
+
return EmitRefusalReason.PATH_TEMPLATE_IS_NOT_A_PATH;
|
|
144
|
+
const pathParameters = operation.parameters.filter((parameter) => parameter.in === TransposedParameterLocation.PATH);
|
|
145
|
+
const declared = new Set(pathParameters.map((parameter) => parameter.name));
|
|
146
|
+
if (![...template.matchAll(/\{([^}]+)\}/g)].every((match) => declared.has(match[1])))
|
|
147
|
+
return EmitRefusalReason.UNDECLARED_PATH_HOLE;
|
|
148
|
+
// A PATH parameter no input field can feed makes the operation UNEXECUTABLE by anyone following its
|
|
149
|
+
// own types: the compiler reads `from ?? name`, finds nothing in the input, and refuses with
|
|
150
|
+
// INPUT_INCOMPLETE before a socket opens. Measured when this clause was added: 1,722 operations
|
|
151
|
+
// across 313 vendors shipped in exactly that state, every one of them typechecking perfectly.
|
|
152
|
+
//
|
|
153
|
+
// Only checked when the operation HAS an input schema. An operation that declares no input at all
|
|
154
|
+
// passes its input through unvalidated, which the contract permits, and there is nothing to
|
|
155
|
+
// disagree with.
|
|
156
|
+
// A POSITIONALLY-NAMED path hole is refused whatever feeds it, and BEFORE the pass-through escape
|
|
157
|
+
// below. `{param2}` is not a parameter a caller can supply: the name carries no meaning, so even a
|
|
158
|
+
// correctly-wired input leaves the operation uncallable by anyone who did not read the vendor's
|
|
159
|
+
// own URL. This is the shape the reason code was written for, and 856 operations are refused for
|
|
160
|
+
// it — but exactly one reached the package, because it declares NO input fields and the escape
|
|
161
|
+
// below returned early. `ninox`'s `trigger.newRecord.poll` shipped as `GET /{param2}` with a
|
|
162
|
+
// required path parameter called `param2`.
|
|
163
|
+
//
|
|
164
|
+
// The escape is right for a BODY or QUERY it cannot see: pass-through is a real contract, and the
|
|
165
|
+
// caller supplies whatever the vendor wants. It is wrong for a PATH hole, which is structural —
|
|
166
|
+
// the URL cannot be built without it, so "unvalidated pass-through" is not an answer, it is a
|
|
167
|
+
// request the caller has no way to satisfy.
|
|
168
|
+
if ([...template.matchAll(/\{([^}]+)\}/g)].some((match) => /^param\d+$/.test(match[1]))) {
|
|
169
|
+
return EmitRefusalReason.UNFED_PATH_PARAMETER;
|
|
170
|
+
}
|
|
171
|
+
if (operation.inputFields.length === 0)
|
|
172
|
+
return undefined;
|
|
173
|
+
const fields = new Set(operation.inputFields.map((field) => field.name));
|
|
174
|
+
return pathParameters.every((parameter) => fields.has(parameter.from ?? parameter.name)) ? undefined : EmitRefusalReason.UNFED_PATH_PARAMETER;
|
|
175
|
+
}
|
|
176
|
+
export function emitProvidersPackage(options) {
|
|
177
|
+
const sourceRoot = join(options.packageRoot, 'src');
|
|
178
|
+
const authoredVendors = readAuthoredVendors(options.packageRoot);
|
|
179
|
+
// Today's date is read ONCE, so every row a single run writes carries the same `firstEmitted` and
|
|
180
|
+
// a batch spanning midnight does not produce two answers to one question.
|
|
181
|
+
const today = new Date().toISOString().slice(0, 10);
|
|
182
|
+
// ── PLAN ─────────────────────────────────────────────────────────────────────────────────────
|
|
183
|
+
// Nothing is written and nothing is deleted until the record has reconciled. A refusal that fires
|
|
184
|
+
// halfway through leaves a package with vendor directories and no `companion-exports.ts` — a
|
|
185
|
+
// correct refusal with a broken outcome, which is worse than either alone.
|
|
186
|
+
const planned = [];
|
|
187
|
+
const refusedByVendor = new Map();
|
|
188
|
+
const seenRefs = new Set();
|
|
189
|
+
const unmatchedRecordEntries = [];
|
|
190
|
+
const refusalMovement = new Map();
|
|
191
|
+
let executable = 0;
|
|
192
|
+
let pending = 0;
|
|
193
|
+
let unreadable = 0;
|
|
194
|
+
for (const provider of options.providers) {
|
|
195
|
+
const plan = planVendor(provider);
|
|
196
|
+
if (plan.refusals.size > 0)
|
|
197
|
+
refusedByVendor.set(provider.ref, plan.refusals);
|
|
198
|
+
pending += plan.pendingOperations.length;
|
|
199
|
+
unreadable += (options.unreadableByVendor.get(provider.ref) ?? []).length;
|
|
200
|
+
// IDENTITY comes from the ledger, not from this run's derivation. An id an application already
|
|
201
|
+
// calls survives a source rename, a re-ordering and a new collision; only an operation the
|
|
202
|
+
// ledger has never seen gets a freshly derived id. This is the whole point of #390.
|
|
203
|
+
const applied = applyRecord({
|
|
204
|
+
provider,
|
|
205
|
+
operations: plan.resolved,
|
|
206
|
+
pending: plan.pendingOperations,
|
|
207
|
+
ledger: readLedger(options.packageRoot, provider.ref),
|
|
208
|
+
decisions: readDecisions(options.packageRoot, provider.ref),
|
|
209
|
+
refusals: plan.refusals,
|
|
210
|
+
today,
|
|
211
|
+
});
|
|
212
|
+
unmatchedRecordEntries.push(...applied.unmatched);
|
|
213
|
+
if (Object.keys(applied.refusalDelta).length > 0)
|
|
214
|
+
refusalMovement.set(provider.ref, applied.refusalDelta);
|
|
215
|
+
seenRefs.add(provider.ref);
|
|
216
|
+
executable += applied.operations.length;
|
|
217
|
+
// `scrape: false` withholds the SUBPATH and nothing else. The vendor is still emitted and its
|
|
218
|
+
// ledger still maintained, so re-enabling it cannot renumber ids an application called before it
|
|
219
|
+
// was withheld — which is exactly the breakage this record exists to prevent.
|
|
220
|
+
//
|
|
221
|
+
// A vendor with nothing executable is likewise not exported: a subpath that resolves to auth and
|
|
222
|
+
// no operations looks complete to everyone downstream and can do nothing.
|
|
223
|
+
const decisions = readDecisions(options.packageRoot, provider.ref);
|
|
224
|
+
planned.push({
|
|
225
|
+
provider,
|
|
226
|
+
resolved: applied.operations,
|
|
227
|
+
pendingOperations: plan.pendingOperations,
|
|
228
|
+
refusals: plan.refusals,
|
|
229
|
+
ledger: applied.ledger,
|
|
230
|
+
exported: vendorIsExported(provider.ref, applied.operations.length, decisions),
|
|
231
|
+
decisions,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
reconcileRecord({
|
|
235
|
+
packageRoot: options.packageRoot,
|
|
236
|
+
seenRefs,
|
|
237
|
+
unmatched: unmatchedRecordEntries,
|
|
238
|
+
fullBatch: options.fullBatch,
|
|
239
|
+
today,
|
|
240
|
+
});
|
|
241
|
+
// ── WRITE ────────────────────────────────────────────────────────────────────────────────────
|
|
242
|
+
// A regeneration REPLACES the vendor tree. A vendor that disappears upstream must disappear here,
|
|
243
|
+
// and leaving its directory behind would keep a subpath exported that the package no longer
|
|
244
|
+
// describes — a door onto a room that was demolished.
|
|
245
|
+
//
|
|
246
|
+
// Everything EXCEPT an underscore-prefixed child: those are hand-owned and survive by convention
|
|
247
|
+
// (`src/_authored/`). One rule, checkable in a line, rather than a list of exceptions to remember.
|
|
248
|
+
mkdirSync(sourceRoot, { recursive: true });
|
|
249
|
+
for (const entry of readdirSync(sourceRoot)) {
|
|
250
|
+
if (entry.startsWith('_'))
|
|
251
|
+
continue;
|
|
252
|
+
rmSync(join(sourceRoot, entry), { recursive: true, force: true });
|
|
253
|
+
}
|
|
254
|
+
const emitted = [];
|
|
255
|
+
for (const entry of planned) {
|
|
256
|
+
writeLedger(options.packageRoot, entry.ledger);
|
|
257
|
+
if (!entry.exported)
|
|
258
|
+
continue;
|
|
259
|
+
emitted.push(entry.provider);
|
|
260
|
+
const directory = join(sourceRoot, entry.provider.ref);
|
|
261
|
+
mkdirSync(directory, { recursive: true });
|
|
262
|
+
writeFileSync(join(directory, 'operations.generated.ts'), renderOperations(entry.provider, entry.resolved), 'utf8');
|
|
263
|
+
writeFileSync(join(directory, 'backend.exports.ts'), renderBackendModule(entry.provider, entry.resolved, authoredVendors.has(entry.provider.ref), entry.decisions), 'utf8');
|
|
264
|
+
writeFileSync(join(directory, 'pending-operations.json'), `${JSON.stringify({
|
|
265
|
+
provider: entry.provider.ref,
|
|
266
|
+
pending: entry.pendingOperations,
|
|
267
|
+
unreadable: options.unreadableByVendor.get(entry.provider.ref) ?? [],
|
|
268
|
+
refusedAtEmit: Object.fromEntries(entry.refusals),
|
|
269
|
+
}, null, 2)}\n`, 'utf8');
|
|
270
|
+
}
|
|
271
|
+
writeFileSync(join(sourceRoot, 'companion-exports.ts'), renderCompanionExports(emitted, new Map(planned.filter((e) => e.decisions !== undefined).map((e) => [e.provider.ref, e.decisions]))), 'utf8');
|
|
272
|
+
writeFileSync(join(options.packageRoot, 'package.json'), renderPackageJson(emitted, readExistingPackageVersion(options.packageRoot)), 'utf8');
|
|
273
|
+
writeFileSync(join(options.packageRoot, 'tsconfig.build.json'), renderBuildTsconfig(), 'utf8');
|
|
274
|
+
writeFileSync(join(options.packageRoot, 'tsconfig.json'), renderTypecheckTsconfig(), 'utf8');
|
|
275
|
+
writeFileSync(join(options.packageRoot, 'NOTICE'), renderNotice(emitted), 'utf8');
|
|
276
|
+
return {
|
|
277
|
+
vendors: emitted.length,
|
|
278
|
+
// Built from the same `exported` flag that decides whether a directory is written and whether the
|
|
279
|
+
// ref reaches the package manifest and the companion barrel, so this cannot disagree with what
|
|
280
|
+
// shipped. `emitted` itself carries no operation count, which is why this reads `planned`.
|
|
281
|
+
exportedOperationCounts: new Map(planned.filter((entry) => entry.exported).map((entry) => [entry.provider.ref, entry.resolved.length])),
|
|
282
|
+
executableOperations: executable,
|
|
283
|
+
pendingOperations: pending,
|
|
284
|
+
unreadableOperations: unreadable,
|
|
285
|
+
refusedByVendor,
|
|
286
|
+
refusalMovement,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* What a vendor WOULD emit, computed once so that a dry run and a real emit cannot disagree.
|
|
291
|
+
*
|
|
292
|
+
* They did disagree, by 856 operations (~14%): the dry-run branch counted every RESOLVED operation
|
|
293
|
+
* while the emit branch counted RESOLVED minus the coherence guard's refusals. A dry run exists to
|
|
294
|
+
* predict an emit; two copies of the accounting is how a prediction stops predicting (#393).
|
|
295
|
+
*/
|
|
296
|
+
function planVendor(provider) {
|
|
297
|
+
// The guard REFUSES rather than filtering: a refusal is recorded with its reason, so that an
|
|
298
|
+
// operation leaving the catalogue is a fact somebody can read afterwards. Filtering silently is
|
|
299
|
+
// how 856 operations left with no count anywhere (#392).
|
|
300
|
+
const refusals = new Map();
|
|
301
|
+
const resolved = [];
|
|
302
|
+
for (const operation of provider.operations) {
|
|
303
|
+
if (operation.resolution !== TransposedOperationResolution.RESOLVED)
|
|
304
|
+
continue;
|
|
305
|
+
const declared = declareWhatTheWireNeeds(operation);
|
|
306
|
+
const reason = refusalReason(declared);
|
|
307
|
+
if (reason === undefined) {
|
|
308
|
+
resolved.push(declared);
|
|
309
|
+
continue;
|
|
310
|
+
}
|
|
311
|
+
refusals.set(reason, (refusals.get(reason) ?? 0) + 1);
|
|
312
|
+
}
|
|
313
|
+
// A stable order so the committed artifact diffs as CONTENT. Neither reader sorts `readdirSync`
|
|
314
|
+
// and the merge preserves read order, so without this the same source yields the same operations
|
|
315
|
+
// in a filesystem-dependent order — a regeneration on another machine reads as a 6,000-line
|
|
316
|
+
// rewrite, and a diff nobody can read is a record nobody can review.
|
|
317
|
+
resolved.sort((left, right) => left.operationId.localeCompare(right.operationId));
|
|
318
|
+
return {
|
|
319
|
+
resolved,
|
|
320
|
+
refusals,
|
|
321
|
+
pendingOperations: provider.operations.filter((o) => o.resolution === TransposedOperationResolution.PENDING_ENDPOINT),
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
/** The emit's own accounting, without writing anything. `--dry-run` reports exactly this. */
|
|
325
|
+
/**
|
|
326
|
+
* The provider refs the ENGINE owns, read from the engine's own registry.
|
|
327
|
+
*
|
|
328
|
+
* A ref is an application's whole address for a provider — `providerRef: 'stripe'` in an HTTP-API
|
|
329
|
+
* binding, `stripe:` in a saas-config provider scope — so two contributions carrying one ref is not
|
|
330
|
+
* a duplicate, it is a name that means two things. The platform refuses it rather than picking:
|
|
331
|
+
* `wildo config sync` fails with *"discovered runtime owners disagree on its secret-contract
|
|
332
|
+
* shape"*, and the refusal lands on the APPLICATION, which never asked for the catalogue's copy.
|
|
333
|
+
* Installing this package for `slack` was enough to make an unrelated `openai` declaration
|
|
334
|
+
* unmaterializable.
|
|
335
|
+
*
|
|
336
|
+
* The engine's contribution wins every time, and not by seniority: it is bound to an engine
|
|
337
|
+
* capability, its secrets contract was AUTHORED rather than transposed from a source that had no
|
|
338
|
+
* opinion about it, and applications already declare it.
|
|
339
|
+
*
|
|
340
|
+
* ## Why this is DERIVED, and what it cost to learn
|
|
341
|
+
*
|
|
342
|
+
* This rule shipped on 2026-09-08 as NINE hand-written `scrape: false` decision files, one per
|
|
343
|
+
* colliding vendor, each carrying the sentence *"Nine of the engine's 23 providers collide this
|
|
344
|
+
* way."* Measured 2026-09-09 against the engine registry: **eleven** collide. `openai` and `google`
|
|
345
|
+
* were missed, and the count in the reason — derived by the same hand, in the same pass — recorded
|
|
346
|
+
* the miss as fact.
|
|
347
|
+
*
|
|
348
|
+
* Only `openai` was live: `google` is withheld anyway for having nothing executable, so its
|
|
349
|
+
* collision was covered by luck and would have surfaced the day the source grew it an operation.
|
|
350
|
+
* `openai` had no such cover, and every application that installed this package while declaring the
|
|
351
|
+
* engine's LLM provider — which is to say every application that wants an LLM and any integration —
|
|
352
|
+
* could not run `wildo config sync` at all.
|
|
353
|
+
*
|
|
354
|
+
* So the set is read from `engineBackendProviderContributions`, the same value the platform's own
|
|
355
|
+
* discovery uses. A list that enumerates ANOTHER party's catalogue by hand is a list that rots; the
|
|
356
|
+
* 24th engine provider is now withheld here on the day it is added, by nobody remembering anything.
|
|
357
|
+
*/
|
|
358
|
+
const ENGINE_OWNED_PROVIDER_REFS = new Set(engineBackendProviderContributions.map((contribution) => contribution.ref));
|
|
359
|
+
/**
|
|
360
|
+
* Whether a vendor gets a SUBPATH in the emitted package.
|
|
361
|
+
*
|
|
362
|
+
* One function because the answers must agree and twice already did not. `--dry-run` exists so a
|
|
363
|
+
* batch can be inspected before it replaces every vendor directory in the package, which is worth
|
|
364
|
+
* nothing if the plan and the emit compute different things: they disagreed by 856 operations once
|
|
365
|
+
* (#393, one copy of the refusal accounting), and by 9 VENDORS until 2026-09-08 — the plan applied
|
|
366
|
+
* the "nothing executable" half and skipped the decisions half, so a dry run promised subpaths for
|
|
367
|
+
* exactly the nine vendors then withheld for colliding with an engine provider. That is the worst
|
|
368
|
+
* possible set to over-report: it tells the reader the collision is back.
|
|
369
|
+
*
|
|
370
|
+
* The three clauses:
|
|
371
|
+
*
|
|
372
|
+
* - **nothing executable** — a subpath resolving to auth and no operations looks complete to
|
|
373
|
+
* everyone downstream and can do nothing;
|
|
374
|
+
* - **the engine owns the ref** — see `ENGINE_OWNED_PROVIDER_REFS`. Derived, so it cannot be short
|
|
375
|
+
* by two the way the hand-written version was;
|
|
376
|
+
* - **`scrape: false`** — a deliberate withholding, for a reason no rule derives. It is the door
|
|
377
|
+
* that stays open for the next one-off.
|
|
378
|
+
*
|
|
379
|
+
* All three withhold the SUBPATH and nothing else: the vendor is still emitted and its ledger still
|
|
380
|
+
* maintained, so re-enabling it cannot renumber ids an application called before it was withheld,
|
|
381
|
+
* which is exactly the breakage the record exists to prevent.
|
|
382
|
+
*/
|
|
383
|
+
export function vendorIsExported(ref, resolvedOperationCount, decisions) {
|
|
384
|
+
return resolvedOperationCount > 0 && !ENGINE_OWNED_PROVIDER_REFS.has(ref) && decisions?.scrape !== false;
|
|
385
|
+
}
|
|
386
|
+
export function planProvidersPackage(options) {
|
|
387
|
+
const refusedByVendor = new Map();
|
|
388
|
+
const exportedOperationCounts = new Map();
|
|
389
|
+
let vendors = 0;
|
|
390
|
+
let executable = 0;
|
|
391
|
+
let pending = 0;
|
|
392
|
+
let unreadable = 0;
|
|
393
|
+
for (const provider of options.providers) {
|
|
394
|
+
const { resolved, refusals, pendingOperations } = planVendor(provider);
|
|
395
|
+
if (refusals.size > 0)
|
|
396
|
+
refusedByVendor.set(provider.ref, refusals);
|
|
397
|
+
pending += pendingOperations.length;
|
|
398
|
+
unreadable += (options.unreadableByVendor.get(provider.ref) ?? []).length;
|
|
399
|
+
if (resolved.length === 0)
|
|
400
|
+
continue;
|
|
401
|
+
executable += resolved.length;
|
|
402
|
+
// The SAME predicate the emit applies. Counting `resolved.length > 0` alone is what made a dry
|
|
403
|
+
// run promise nine subpaths the emit withholds.
|
|
404
|
+
if (vendorIsExported(provider.ref, resolved.length, readDecisions(options.packageRoot, provider.ref))) {
|
|
405
|
+
vendors += 1;
|
|
406
|
+
exportedOperationCounts.set(provider.ref, resolved.length);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
// A plan does not consult the ledger, so it cannot know what moved. Empty rather than absent: the
|
|
410
|
+
// shape is the emit's, and a dry run that invented a movement would be reporting on a comparison
|
|
411
|
+
// it never made.
|
|
412
|
+
return { vendors, exportedOperationCounts, executableOperations: executable, pendingOperations: pending, unreadableOperations: unreadable, refusedByVendor, refusalMovement: new Map() };
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Close the record against what this run actually produced, and REFUSE anything that matched
|
|
416
|
+
* nothing.
|
|
417
|
+
*
|
|
418
|
+
* ## Why a refusal, and not a warning
|
|
419
|
+
*
|
|
420
|
+
* Every correction in this lane has failed the same way: a fix that silently stops applying. A
|
|
421
|
+
* succession for an endpoint that moved again, a decision for a vendor the source dropped — each is
|
|
422
|
+
* a statement about a world that has moved, and each is invisible unless the run refuses. Withdrawal
|
|
423
|
+
* is the explicit way to say "this is gone", precisely so that silence never means it.
|
|
424
|
+
*
|
|
425
|
+
* ## Why only on a FULL batch
|
|
426
|
+
*
|
|
427
|
+
* A partial run CANNOT SEE the entries it did not cover: `--vendor slack` leaves 696 vendors'
|
|
428
|
+
* records matching nothing, and one catalogue alone leaves every entry the other contributed. Making
|
|
429
|
+
* those fail would refuse a run for doing exactly what it was asked to do. So a partial run reports
|
|
430
|
+
* and writes no withdrawals, and only a full batch may conclude that something is gone.
|
|
431
|
+
*/
|
|
432
|
+
function reconcileRecord(options) {
|
|
433
|
+
if (!options.fullBatch)
|
|
434
|
+
return;
|
|
435
|
+
/*
|
|
436
|
+
* A vendor the sources stop describing is WITHDRAWN, not deleted (#500).
|
|
437
|
+
*
|
|
438
|
+
* This used to `removeLedger`, which was the one path in this record where an id could be lost. An
|
|
439
|
+
* operation that disappears keeps its keys so a restored endpoint resurrects its id; a withheld
|
|
440
|
+
* vendor keeps its whole ledger so re-enabling reuses every id. A vendor that vanishes upstream for
|
|
441
|
+
* one release and returns had neither — every operation came back freshly derived, and every
|
|
442
|
+
* application calling one of its ids broke silently.
|
|
443
|
+
*
|
|
444
|
+
* `withdrawVendor` drops refusals and moves every live operation to `withdrawn`, so a vendor whose
|
|
445
|
+
* ledger held ONLY refusals reduces to nothing and `writeLedger` removes the file. That is right:
|
|
446
|
+
* there were no ids to preserve, and a file asserting three empty objects records nothing.
|
|
447
|
+
*/
|
|
448
|
+
for (const ref of ledgerRefs(options.packageRoot)) {
|
|
449
|
+
if (options.seenRefs.has(ref))
|
|
450
|
+
continue;
|
|
451
|
+
const ledger = readLedger(options.packageRoot, ref);
|
|
452
|
+
if (ledger === undefined)
|
|
453
|
+
continue;
|
|
454
|
+
writeLedger(options.packageRoot, withdrawVendor(ledger, options.today, 'This batch produced no such vendor — the sources no longer describe it.'));
|
|
455
|
+
}
|
|
456
|
+
const stale = [
|
|
457
|
+
...readDecisionRefs(options.packageRoot)
|
|
458
|
+
.filter((ref) => !options.seenRefs.has(ref))
|
|
459
|
+
.map((ref) => `decisions/${ref}.json names a vendor this batch did not produce`),
|
|
460
|
+
...options.unmatched.map((entry) => `${entry.ref}: ${entry.detail}`),
|
|
461
|
+
];
|
|
462
|
+
if (stale.length === 0)
|
|
463
|
+
return;
|
|
464
|
+
throw new Error(`The catalogue record contains ${stale.length} entr${stale.length === 1 ? 'y' : 'ies'} that matched nothing in this batch:\n`
|
|
465
|
+
+ stale.map((line) => ` - ${line}`).join('\n')
|
|
466
|
+
+ '\n\nA record entry that matches nothing is a decision that has stopped applying. Either the thing it names is genuinely gone '
|
|
467
|
+
+ '(delete the entry, or record the withdrawal deliberately) or it moved (follow it). Silence must never mean either.');
|
|
468
|
+
}
|
|
469
|
+
const GENERATED_BANNER = `/**
|
|
470
|
+
* GENERATED by \`wildo fwk generate-providers\`. Do not edit by hand — a regeneration overwrites it.
|
|
471
|
+
*
|
|
472
|
+
* An edit made in this file is lost the next time the batch runs, and a fix that silently disappears
|
|
473
|
+
* is worse than one that was never made. Corrections have three homes instead:
|
|
474
|
+
* - the transposer, for a defect that spans vendors;
|
|
475
|
+
* - the source catalogue, for something the vendor's own entry gets wrong;
|
|
476
|
+
* - \`src/_authored/<ref>.authored.ts\`, for one vendor's peculiarity — an operation no source
|
|
477
|
+
* describes, an operation to withhold, a credential entry, a corrected runtime fact.
|
|
478
|
+
*/`;
|
|
479
|
+
/**
|
|
480
|
+
* The subpath a vendor is imported through: `@wildo-ai/providers/slack`.
|
|
481
|
+
*
|
|
482
|
+
* The vendor's name is in the PATH, never in the package name — which is the whole point of the
|
|
483
|
+
* one-package shape, and the half that cannot be quietly undone once published.
|
|
484
|
+
*/
|
|
485
|
+
function subpathFor(ref) {
|
|
486
|
+
return `./${ref}`;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* One manifest, one published name, and an export map with one entry per vendor.
|
|
490
|
+
*
|
|
491
|
+
* `sideEffects: false` is load-bearing rather than hygiene: it tells a bundler that importing one
|
|
492
|
+
* vendor's subpath can never require evaluating another's, which is what keeps an application's
|
|
493
|
+
* bundle proportional to what it declares even though its `node_modules` holds every vendor.
|
|
494
|
+
*
|
|
495
|
+
* The version is a placeholder the publish lane sets. A generator cannot know which release a batch
|
|
496
|
+
* belongs to, and inventing one would put a plausible wrong version on the whole catalogue.
|
|
497
|
+
*/
|
|
498
|
+
/**
|
|
499
|
+
* The version is CARRIED OVER, never re-rendered.
|
|
500
|
+
*
|
|
501
|
+
* A regeneration rewrites this manifest wholesale, and a literal here means every regeneration
|
|
502
|
+
* silently un-releases the package: it reverts to `0.0.0` and the next publish either fails or
|
|
503
|
+
* republishes an old number. That is not hypothetical — `providers` was released as `1.1.3` and the
|
|
504
|
+
* very next regeneration, minutes later, reset it, which is how this was found.
|
|
505
|
+
*
|
|
506
|
+
* The version is a RELEASE decision and belongs to whoever cuts one; the transposer's business is
|
|
507
|
+
* the vendor surface. `0.0.0` remains the value for a package root that does not exist yet, which
|
|
508
|
+
* is the only case where nothing has decided.
|
|
509
|
+
*/
|
|
510
|
+
function readExistingPackageVersion(packageRoot) {
|
|
511
|
+
try {
|
|
512
|
+
const manifest = JSON.parse(readFileSync(join(packageRoot, 'package.json'), 'utf8'));
|
|
513
|
+
return typeof manifest.version === 'string' && manifest.version.length > 0 ? manifest.version : '0.0.0';
|
|
514
|
+
}
|
|
515
|
+
catch {
|
|
516
|
+
// No manifest yet, or an unreadable one. A first emit legitimately has nothing to carry over.
|
|
517
|
+
return '0.0.0';
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
function renderPackageJson(providers, version) {
|
|
521
|
+
const exportsMap = {
|
|
522
|
+
// The ONE door discovery opens. `resolvePackageCompanionEntryPath` reads this subpath from the
|
|
523
|
+
// manifest and hands the resolved path to the loader, so no application ever writes the
|
|
524
|
+
// specifier — which is why it must exist even though nothing imports it by name.
|
|
525
|
+
'./companion': {
|
|
526
|
+
// `companion-exports.ts`, hyphenated, because `resolvePackageCompanionEntryPath` hard-codes
|
|
527
|
+
// exactly that filename as its source fallback and every other contributing package uses it.
|
|
528
|
+
// Emitting `companion.exports.ts` resolved fine through the export map once BUILT and failed
|
|
529
|
+
// the moment discovery ran against source — which is how it was found: by running the real
|
|
530
|
+
// walk rather than by reading the manifest and believing it.
|
|
531
|
+
source: './src/companion-exports.ts',
|
|
532
|
+
types: './dist/esm/companion-exports.d.ts',
|
|
533
|
+
default: './dist/esm/companion-exports.js',
|
|
534
|
+
},
|
|
535
|
+
};
|
|
536
|
+
for (const provider of [...providers].sort((left, right) => left.ref.localeCompare(right.ref))) {
|
|
537
|
+
exportsMap[subpathFor(provider.ref)] = {
|
|
538
|
+
source: `./src/${provider.ref}/backend.exports.ts`,
|
|
539
|
+
types: `./dist/esm/${provider.ref}/backend.exports.d.ts`,
|
|
540
|
+
default: `./dist/esm/${provider.ref}/backend.exports.js`,
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
return `${JSON.stringify({
|
|
544
|
+
name: PACKAGE_NAME,
|
|
545
|
+
version,
|
|
546
|
+
type: 'module',
|
|
547
|
+
description: `Wildo provider catalogue: ${providers.length} vendors transposed from open integration catalogues. Each vendor is a subpath export; there is no root barrel.`,
|
|
548
|
+
license: 'MIT',
|
|
549
|
+
publishConfig: { access: 'public' },
|
|
550
|
+
sideEffects: false,
|
|
551
|
+
files: ['dist', 'NOTICE'],
|
|
552
|
+
/*
|
|
553
|
+
* `watch` is what puts this package in the dev fleet, and its absence is why the catalogue's
|
|
554
|
+
* `dist` went silently stale.
|
|
555
|
+
*
|
|
556
|
+
* `selectWatchPackages` in the dev orchestrator filters on `pkg.scripts.watch`, so a package
|
|
557
|
+
* that declares only `build` is never watched — and 103 watchers were running while nothing
|
|
558
|
+
* rebuilt this one. Everything that reads the catalogue at RUNTIME resolves through the
|
|
559
|
+
* `exports` map to `dist`: discovery, `wildo config sync`, a booted backend. Measured
|
|
560
|
+
* 2026-09-07, `dist` sat 29 minutes behind `src` and `config sync` refused against a barrel
|
|
561
|
+
* that no longer existed — a wrong diagnosis until the artifact was dated.
|
|
562
|
+
*
|
|
563
|
+
* The alias finalizer runs on `--onSuccess` in both scripts, matching every engine package.
|
|
564
|
+
* Nothing generated here uses a `~` alias, so it rewrites nothing today; it is the step that
|
|
565
|
+
* marks an emitted tree PUBLISHED, and a build that skips it leaves readers looking at a dist
|
|
566
|
+
* nobody finished.
|
|
567
|
+
*
|
|
568
|
+
* `../scripts/` and not `../../scripts/`: this package sits one level below the repository
|
|
569
|
+
* root, where every engine package sits two.
|
|
570
|
+
*/
|
|
571
|
+
scripts: {
|
|
572
|
+
// `pnpm -r typecheck` visits every workspace member that declares this script and SKIPS the
|
|
573
|
+
// rest, so without it nothing in CI ever compiled the catalogue — every vendor and every
|
|
574
|
+
// operation in it, checked by the emitter's own unit tests and by no compiler. `tsconfig.json`
|
|
575
|
+
// exists for exactly this: it extends the emit config with `noEmit`, so the two cannot drift
|
|
576
|
+
// into describing different programs.
|
|
577
|
+
typecheck: 'tsc -p tsconfig.json',
|
|
578
|
+
build: 'tsc -p tsconfig.build.json && node ../scripts/run-tsc-alias-safe.mjs --project tsconfig.build.json --dist dist/esm',
|
|
579
|
+
watch: 'node ../scripts/run-tsc-watch-single-writer.mjs --dist dist/esm --exec tsc-watch -- -p tsconfig.build.json --preserveWatchOutput '
|
|
580
|
+
+ '--onSuccess "node ../scripts/run-tsc-alias-safe.mjs --project tsconfig.build.json --dist dist/esm"',
|
|
581
|
+
},
|
|
582
|
+
exports: exportsMap,
|
|
583
|
+
// `workspace:*` for the engine, matching every other package in this monorepo. `"*"` looked
|
|
584
|
+
// equivalent and is not: pnpm resolved it from the REGISTRY, so the generated catalogue
|
|
585
|
+
// compiled and loaded against a PUBLISHED 1.1.2 engine while the local source moved under it —
|
|
586
|
+
// which is how a probe for #378 died on an export that had existed locally for a day. pnpm
|
|
587
|
+
// rewrites `workspace:*` to the concrete version at publish time, so the published manifest is
|
|
588
|
+
// unaffected. `zod` stays `"*"`, which the publish lane substitutes from the root override.
|
|
589
|
+
dependencies: {
|
|
590
|
+
'@wildo-ai/saas-models': 'workspace:*',
|
|
591
|
+
'@wildo-ai/external-connectors-models': 'workspace:*',
|
|
592
|
+
'@wildo-ai/external-connectors-private': 'workspace:*',
|
|
593
|
+
zod: '*',
|
|
594
|
+
},
|
|
595
|
+
/**
|
|
596
|
+
* The COMPILER, declared for the same reason every other package in this fleet declares it —
|
|
597
|
+
* and its absence was not cosmetic. Measured 2026-09-09: `providers` was the ONLY workspace
|
|
598
|
+
* package with no `typescript` devDependency, and consequently the only one whose `tsc`
|
|
599
|
+
* resolved **7.0.2** instead of the fleet's 5.9.3. With nothing in its own `node_modules`,
|
|
600
|
+
* every invocation walked up to the repository root, where the TS7 alias installed for the
|
|
601
|
+
* native-compiler migration also publishes a `tsc` bin.
|
|
602
|
+
*
|
|
603
|
+
* So the largest emitter in the repository was on the native lane by accident. That lane is
|
|
604
|
+
* OPT-IN per package by design — `wildo-compiler-runner.mjs` asserts its exact version and
|
|
605
|
+
* fails closed — and this package bypassed it entirely, because its own `build` and `watch`
|
|
606
|
+
* scripts call `tsc` directly rather than through the runner. Its published `dist`, which
|
|
607
|
+
* every consumer resolves, was emitted by a compiler nobody chose for it.
|
|
608
|
+
*
|
|
609
|
+
* It also hid the defect above: TypeScript 7 does not surface `watchOptions` in
|
|
610
|
+
* `--showConfig`, so the missing watch exclusions read as an inheritance failure until the
|
|
611
|
+
* measurement was repeated naming 5.9.3 explicitly.
|
|
612
|
+
*
|
|
613
|
+
* `"*"` rather than a version: the pin is the root `pnpm.overrides` entry, exactly as for the
|
|
614
|
+
* rest of the fleet, so a compiler bump needs no edit here.
|
|
615
|
+
*/
|
|
616
|
+
devDependencies: {
|
|
617
|
+
typescript: '*',
|
|
618
|
+
},
|
|
619
|
+
}, null, 2)}\n`;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* One tsconfig for the whole catalogue, and therefore one `tsc` process.
|
|
623
|
+
*
|
|
624
|
+
* Measured on 2026-09-06, when the 684-package shape took a development machine down: a single `tsc`
|
|
625
|
+
* peaks at ~391 MB, almost all of it the engine's `.d.ts` closure and the TypeScript lib — a fixed
|
|
626
|
+
* cost per PROCESS, not per package. One process typechecking every vendor peaks at 1.23 GB in about
|
|
627
|
+
* a second. The package count was never what cost anything; the process count was.
|
|
628
|
+
*
|
|
629
|
+
* Self-contained on purpose: no `extends` reaching outside this package, so it builds from a checkout
|
|
630
|
+
* that contains only this directory.
|
|
631
|
+
*/
|
|
632
|
+
/**
|
|
633
|
+
* The EMIT config, and the one the dev fleet compiles this package with.
|
|
634
|
+
*
|
|
635
|
+
* `tsconfig.build.json` is not a preference — it is the watcher's package contract, hard-coded in
|
|
636
|
+
* `dev-compile-status.mjs` (`projectPath: resolve(pkg.root, 'tsconfig.build.json')`, and again in
|
|
637
|
+
* `emitted-artifact-validity.mjs` and the declaration-recovery path). Emitting only `tsconfig.json`
|
|
638
|
+
* made the package eligible for watching and then unwatchable: the fleet spawned a watcher that died
|
|
639
|
+
* on `TS5058: The specified path does not exist: 'tsconfig.build.json'`, and the application's
|
|
640
|
+
* diagnostics reported `NOT_READY @wildo-ai/providers — COMPILE_WATCHER_EXITED`.
|
|
641
|
+
*
|
|
642
|
+
* `composite: true` matches every engine package, because the fleet's machinery is built around
|
|
643
|
+
* packages that have it — interrupted-declaration recovery and emitted-artifact validity both open
|
|
644
|
+
* this project by path.
|
|
645
|
+
*/
|
|
646
|
+
function renderBuildTsconfig() {
|
|
647
|
+
return `${JSON.stringify({
|
|
648
|
+
// The repository-wide WATCH exclusions, inherited exactly as every engine package inherits them
|
|
649
|
+
// (through `engine/tsconfig.common.json`, which extends this same file). Added 2026-09-09.
|
|
650
|
+
//
|
|
651
|
+
// Without it this package was watched with NO `watchOptions` at all, and it is the worst one in
|
|
652
|
+
// the repository to watch naively: it emits 1,380 `.d.ts` files and its `.wildo-runtime-signals/`
|
|
653
|
+
// had grown to 23 MB. Those journals snapshot every emitted declaration on each compile cycle,
|
|
654
|
+
// and pnpm links make the directory reachable as
|
|
655
|
+
// `<consumer>/node_modules/@wildo-ai/providers/.wildo-runtime-signals/…` — so every consumer
|
|
656
|
+
// installs a recursive watcher over it and reschedules a recompile on each journal write. That
|
|
657
|
+
// is the compile storm `tsconfig.watch-exclusions.json` documents, aimed at the largest emitter
|
|
658
|
+
// in the tree, and it went live the moment the catalogue became fleet-watched.
|
|
659
|
+
//
|
|
660
|
+
// It must be inherited from the REPOSITORY ROOT rather than restated here: TypeScript re-roots
|
|
661
|
+
// path-like options against the file that DECLARED them, so a copy living in `providers/` would
|
|
662
|
+
// resolve its globs to `providers/**` and cover nothing else.
|
|
663
|
+
extends: '../tsconfig.watch-exclusions.json',
|
|
664
|
+
compilerOptions: {
|
|
665
|
+
target: 'ES2022',
|
|
666
|
+
module: 'ESNext',
|
|
667
|
+
moduleResolution: 'Bundler',
|
|
668
|
+
composite: true,
|
|
669
|
+
declaration: true,
|
|
670
|
+
strict: false,
|
|
671
|
+
skipLibCheck: true,
|
|
672
|
+
esModuleInterop: true,
|
|
673
|
+
outDir: './dist/esm',
|
|
674
|
+
rootDir: './src',
|
|
675
|
+
},
|
|
676
|
+
include: ['src/**/*.ts'],
|
|
677
|
+
exclude: ['node_modules', 'dist'],
|
|
678
|
+
}, null, 2)}\n`;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* The TYPECHECK config, which emits nothing.
|
|
682
|
+
*
|
|
683
|
+
* Extends the build config so the two cannot drift into disagreeing about what compiles — the pair
|
|
684
|
+
* exists to separate emitting from checking, not to describe two different programs.
|
|
685
|
+
*/
|
|
686
|
+
function renderTypecheckTsconfig() {
|
|
687
|
+
return `${JSON.stringify({
|
|
688
|
+
extends: './tsconfig.build.json',
|
|
689
|
+
compilerOptions: { composite: false, noEmit: true },
|
|
690
|
+
include: ['src/**/*.ts'],
|
|
691
|
+
}, null, 2)}\n`;
|
|
692
|
+
}
|
|
693
|
+
function renderNotice(providers) {
|
|
694
|
+
const sources = new Map();
|
|
695
|
+
for (const provider of providers) {
|
|
696
|
+
for (const provenance of provider.provenances) {
|
|
697
|
+
const revisions = sources.get(provenance.source) ?? new Set();
|
|
698
|
+
revisions.add(provenance.sourceVersion);
|
|
699
|
+
sources.set(provenance.source, revisions);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
const lines = [...sources.entries()].map(([source, revisions]) => `- ${source} — revision(s) ${[...revisions].join(', ')}`);
|
|
703
|
+
return `${PACKAGE_NAME}
|
|
704
|
+
|
|
705
|
+
This package's provider DEFINITIONS were derived at build time from the catalogues below, covering
|
|
706
|
+
${providers.length} vendors. No code from them is redistributed here and none of it executes: what
|
|
707
|
+
ships is a Wildo operation catalogue — method, path template, parameters and auth shape — executed by
|
|
708
|
+
Wildo's own HTTP client.
|
|
709
|
+
|
|
710
|
+
${lines.join('\n')}
|
|
711
|
+
|
|
712
|
+
Activepieces pieces are MIT (Activepieces Inc). Sim is Apache-2.0. Their notices apply to the source
|
|
713
|
+
that was read, not to this file. Each vendor's own provenance, down to the exact artifact read, is
|
|
714
|
+
recorded in its generated module's metadata.
|
|
715
|
+
`;
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* The operation's declared input as a Zod object — the half of D4's promise the emitter used to drop.
|
|
719
|
+
*
|
|
720
|
+
* `requestBody: { encoding: JSON }` says a body exists and nothing about what is in it, which is not
|
|
721
|
+
* enough for anything: the executor cannot validate a call, a typed client (R3) has nothing to derive
|
|
722
|
+
* an argument type from, and a caller cannot discover what to pass. The sources declare it — 12,193
|
|
723
|
+
* `Property.ShortText`, 3,797 `Property.Number` and so on in Activepieces, a `type` string per param
|
|
724
|
+
* in Sim — so the schema is READ, never invented.
|
|
725
|
+
*
|
|
726
|
+
* Two decisions inside it. Optional fields stay optional rather than being given a default, because a
|
|
727
|
+
* default is a decision about the VENDOR's behaviour that no catalogue states. And an input whose kind
|
|
728
|
+
* could not be read is `z.unknown()` rather than `z.string()`: most inputs are strings, and typing an
|
|
729
|
+
* unknown as the common case is exactly how a schema comes to lie about the one that is not.
|
|
730
|
+
*
|
|
731
|
+
* Absent when the source declared no input at all — an operation with no fields is passed through
|
|
732
|
+
* unvalidated, which the contract permits and which is honest about carrying no contract.
|
|
733
|
+
*
|
|
734
|
+
* ## Every object schema is rendered `z.looseObject<z.ZodRawShape>({...})`, never bare
|
|
735
|
+
*
|
|
736
|
+
* The explicit type argument is what keeps the catalogue compilable, and it was measured rather than
|
|
737
|
+
* reasoned about. `ProviderRestOperationCatalogue` types every schema slot as a plain `z.ZodType`, and
|
|
738
|
+
* nothing anywhere derives a TypeScript type from these schemas (the typed client renders its own
|
|
739
|
+
* argument types from the same field set). Yet a bare `z.looseObject({ ... })` still makes the checker
|
|
740
|
+
* INFER the call's full generic result — a mapped input/output type over every field — once per call,
|
|
741
|
+
* and the catalogue makes ~7,200 such calls. On 2026-09-09 that cost the package's watcher its life:
|
|
742
|
+
* one compile of 689 vendors needed 3.5 GB of heap (4.0M symbols, 1.9M types, 5.8M instantiations,
|
|
743
|
+
* 21 s to check), an incremental rebuild holds two programs, and `tsc-watch` died with "JavaScript
|
|
744
|
+
* heap out of memory" at the default 4 GB limit — taking the platform watch group down with it.
|
|
745
|
+
*
|
|
746
|
+
* With the type argument supplied, inference has nothing to do: the argument is checked against the
|
|
747
|
+
* one shared `ZodRawShape` instantiation and the result type is the same for every call. The same
|
|
748
|
+
* 689 vendors then compile in 0.9 GB (0.73M symbols, 0.19M types, 0.10M instantiations, 1.5 s to
|
|
749
|
+
* check). The emitted RUNTIME value is byte-identical — a type argument is erased — so validation,
|
|
750
|
+
* OpenAPI projection and the executor see exactly the schemas they saw before.
|
|
751
|
+
*/
|
|
752
|
+
function renderInputSchema(operation) {
|
|
753
|
+
// The SAME set the typed client renders — see `callerSuppliedInputFields`. Walking
|
|
754
|
+
// `operation.inputFields` raw here is what made 1,668 operations uncallable through their own
|
|
755
|
+
// client: the schema demanded a credential the client refuses to accept.
|
|
756
|
+
const fields = callerSuppliedInputFields(operation);
|
|
757
|
+
if (fields.length === 0)
|
|
758
|
+
return undefined;
|
|
759
|
+
const entries = fields
|
|
760
|
+
.map((field) => {
|
|
761
|
+
const base = zodFor(field.kind);
|
|
762
|
+
const described = field.description === undefined ? base : `${base}.describe(${quote(field.description)})`;
|
|
763
|
+
return ` ${quote(field.name)}: ${field.required ? described : `${described}.optional()`},`;
|
|
764
|
+
})
|
|
765
|
+
.join('\n');
|
|
766
|
+
// `looseObject`, deliberately: a vendor's API accepts fields no catalogue mentioned, and a strict
|
|
767
|
+
// schema would refuse a legitimate call for the crime of being more complete than the source.
|
|
768
|
+
return `z.looseObject<z.ZodRawShape>({\n${entries}\n })`;
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* A response shape as Zod, rendered recursively.
|
|
772
|
+
*
|
|
773
|
+
* Every object is LOOSE and every member keeps whatever optionality its source stated. Both are
|
|
774
|
+
* about the same asymmetry: a response schema exists so a caller can rely on the fields it names,
|
|
775
|
+
* not so Wildo can police a vendor. A vendor that adds a field must never break a call, and a
|
|
776
|
+
* vendor that omits one the source happened to describe must not either — the engine contract says
|
|
777
|
+
* as much ("authors should keep these permissive; the value is in naming the fields a caller may
|
|
778
|
+
* rely on"). A strict response schema turns every vendor release into an outage.
|
|
779
|
+
*/
|
|
780
|
+
function renderShape(shape, indent) {
|
|
781
|
+
const pad = ' '.repeat(indent);
|
|
782
|
+
const described = (rendered) => shape.description === undefined ? rendered : `${rendered}.describe(${quote(shape.description)})`;
|
|
783
|
+
// EVERY member of a response is optional, whatever the source said it was required.
|
|
784
|
+
//
|
|
785
|
+
// Not a weakening — a correction, and it was found by a socket rather than reasoned about. Slack's
|
|
786
|
+
// `conversations.info` answers `{ ok, channel }`; the source's own output description named a
|
|
787
|
+
// required `channelInfo`, so the executor refused a perfectly good vendor response with
|
|
788
|
+
// "expected object, received undefined". A source describes what it CHOSE to surface, under its
|
|
789
|
+
// own names — it is not, and never was, a statement about the vendor's wire format.
|
|
790
|
+
//
|
|
791
|
+
// The engine contract asks for exactly this: "a vendor adding a field must never break a call, so
|
|
792
|
+
// authors should keep these permissive; the value is in naming the fields a caller may rely on,
|
|
793
|
+
// not in policing the vendor." Required-ness derived from a third party's summary is how a
|
|
794
|
+
// generated catalogue turns a working vendor into an outage.
|
|
795
|
+
const optional = (rendered) => (rendered.endsWith('.optional()') ? rendered : `${rendered}.optional()`);
|
|
796
|
+
if (shape.kind === TransposedInputKind.OBJECT && shape.fields !== undefined && Object.keys(shape.fields).length > 0) {
|
|
797
|
+
const members = Object.entries(shape.fields)
|
|
798
|
+
.map(([name, member]) => `${pad} ${quote(name)}: ${renderShape(member, indent + 2)},`)
|
|
799
|
+
.join('\n');
|
|
800
|
+
return optional(described(`z.looseObject<z.ZodRawShape>({\n${members}\n${pad}})`));
|
|
801
|
+
}
|
|
802
|
+
if (shape.kind === TransposedInputKind.ARRAY) {
|
|
803
|
+
const element = shape.items === undefined ? 'z.unknown()' : renderShape(shape.items, indent + 2);
|
|
804
|
+
return optional(described(`z.array(${element})`));
|
|
805
|
+
}
|
|
806
|
+
return optional(described(zodFor(shape.kind)));
|
|
807
|
+
}
|
|
808
|
+
function zodFor(kind) {
|
|
809
|
+
switch (kind) {
|
|
810
|
+
case TransposedInputKind.STRING:
|
|
811
|
+
return 'z.string()';
|
|
812
|
+
case TransposedInputKind.NUMBER:
|
|
813
|
+
return 'z.number()';
|
|
814
|
+
case TransposedInputKind.BOOLEAN:
|
|
815
|
+
return 'z.boolean()';
|
|
816
|
+
case TransposedInputKind.ARRAY:
|
|
817
|
+
return 'z.array(z.unknown())';
|
|
818
|
+
case TransposedInputKind.OBJECT:
|
|
819
|
+
return 'z.looseObject<z.ZodRawShape>({})';
|
|
820
|
+
case TransposedInputKind.UNKNOWN:
|
|
821
|
+
return 'z.unknown()';
|
|
822
|
+
case TransposedInputKind.WIRE_SCALAR:
|
|
823
|
+
return 'z.union([z.string(), z.number(), z.boolean()])';
|
|
824
|
+
case TransposedInputKind.WIRE_SCALAR_OR_LIST:
|
|
825
|
+
return 'z.union([z.string(), z.number(), z.boolean(), z.array(z.union([z.string(), z.number(), z.boolean()]))])';
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
/** An operation's classification and method are engine enums; everything else is data. */
|
|
829
|
+
function renderOperations(provider, operations) {
|
|
830
|
+
const entries = operations
|
|
831
|
+
.map((operation) => {
|
|
832
|
+
const parameters = operation.parameters
|
|
833
|
+
.filter((parameter) => parameter.in !== TransposedParameterLocation.BODY)
|
|
834
|
+
.map((parameter) => {
|
|
835
|
+
// `from` is emitted only when the wire name and the input field DIFFER, which is what the
|
|
836
|
+
// contract asks for: absent means "the input field is spelled exactly like the wire name".
|
|
837
|
+
const from = parameter.from === undefined || parameter.from === parameter.name ? '' : `, from: ${quote(parameter.from)}`;
|
|
838
|
+
return ` { name: ${quote(parameter.name)}, in: ProviderRestParameterLocation.${parameter.in.toUpperCase()}, required: ${parameter.required === true}${from} },`;
|
|
839
|
+
})
|
|
840
|
+
.join('\n');
|
|
841
|
+
const inputSchema = renderInputSchema(operation);
|
|
842
|
+
const outputSchema = operation.outputShape === undefined ? undefined : renderShape(operation.outputShape, 6);
|
|
843
|
+
return ` ${quote(operation.operationId)}: {
|
|
844
|
+
operationId: ${quote(operation.operationId)},
|
|
845
|
+
domain: ${quote(operation.domain)},
|
|
846
|
+
method: API_HttpMethod.${operation.method},
|
|
847
|
+
pathTemplate: ${quote(operation.pathTemplate ?? '/')},
|
|
848
|
+
classification: ExternalOperation_Classification.${operation.classification},${operation.summary === undefined ? '' : `
|
|
849
|
+
summary: ${quote(operation.summary)},`}${parameters === '' ? '' : `
|
|
850
|
+
parameters: [
|
|
851
|
+
${parameters}
|
|
852
|
+
],`}${declaresRequestBody(operation) ? `
|
|
853
|
+
requestBody: { encoding: ProviderRestRequestBodyEncoding.JSON },` : ''}${inputSchema === undefined ? '' : `
|
|
854
|
+
inputSchema: ${inputSchema},`}${outputSchema === undefined ? '' : `
|
|
855
|
+
outputSchema: ${outputSchema},`}
|
|
856
|
+
},`;
|
|
857
|
+
})
|
|
858
|
+
.join('\n');
|
|
859
|
+
return `${GENERATED_BANNER}
|
|
860
|
+
|
|
861
|
+
import { z } from 'zod';
|
|
862
|
+
|
|
863
|
+
import {
|
|
864
|
+
API_HttpMethod,
|
|
865
|
+
ExternalOperation_Classification,
|
|
866
|
+
ProviderRestParameterLocation,
|
|
867
|
+
ProviderRestRequestBodyEncoding,
|
|
868
|
+
type ProviderRestOperationCatalogue,
|
|
869
|
+
} from '@wildo-ai/external-connectors-models';
|
|
870
|
+
|
|
871
|
+
/** ${operations.length} executable operation(s) transposed for \`${provider.ref}\`. */
|
|
872
|
+
export const catalogue: ProviderRestOperationCatalogue = {
|
|
873
|
+
domains: ['default'],
|
|
874
|
+
operations: {
|
|
875
|
+
${entries}
|
|
876
|
+
},
|
|
877
|
+
};
|
|
878
|
+
`;
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* A GET or HEAD operation NEVER declares a request body, whatever the source did.
|
|
882
|
+
*
|
|
883
|
+
* `fetch` refuses outright — `Request with GET/HEAD method cannot have body` — so an operation that
|
|
884
|
+
* declares one is not merely unusual, it is unexecutable, and it fails at the socket with a message
|
|
885
|
+
* about the method rather than about the vendor. 231 generated operations across 53 vendors carried
|
|
886
|
+
* one, and every single one of them would have failed on first use.
|
|
887
|
+
* spec-cite: RFC 9110 §9.3.1 — a GET's payload has no defined semantics; the Fetch standard turns
|
|
888
|
+
* that into a hard refusal.
|
|
889
|
+
*
|
|
890
|
+
* Sources do write it: a piece passes a `body` alongside a GET because its own HTTP helper ignores
|
|
891
|
+
* it, or because the vendor tolerates it. The transposer cannot carry that forward — the parameters
|
|
892
|
+
* that matter are already declared as QUERY, so dropping the body loses nothing a caller can send.
|
|
893
|
+
*
|
|
894
|
+
* Found by executing a generated operation against a real server, which is the only thing that could
|
|
895
|
+
* have found it: it typechecks, it parses, it validates against every schema, and it fails the
|
|
896
|
+
* instant a socket is involved.
|
|
897
|
+
*/
|
|
898
|
+
function declaresRequestBody(operation) {
|
|
899
|
+
if (!operation.hasRequestBody)
|
|
900
|
+
return false;
|
|
901
|
+
return operation.method !== 'GET' && operation.method !== 'HEAD';
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* The vendor's TIER, from the record — `CATALOGUE` unless a human promoted it.
|
|
905
|
+
*
|
|
906
|
+
* `ProviderMetadata.tier`'s own contract says "a recorded decision, never inferred", and until this
|
|
907
|
+
* existed the emitter hardcoded `CATALOGUE` while `CatalogueDecisions.tier` was read by nothing. A
|
|
908
|
+
* declared field that nothing consumes is the exact failure the catalogue record was built to stop —
|
|
909
|
+
* a decision that silently does not apply — sitting inside the record's own consumer.
|
|
910
|
+
*
|
|
911
|
+
* An unrecognised value REFUSES rather than falling back, because a typo that quietly leaves a vendor
|
|
912
|
+
* at `CATALOGUE` is indistinguishable from not having written the decision at all.
|
|
913
|
+
*/
|
|
914
|
+
function renderTier(decisions, ref) {
|
|
915
|
+
const declared = decisions?.tier;
|
|
916
|
+
if (declared === undefined)
|
|
917
|
+
return 'ProviderTier.CATALOGUE';
|
|
918
|
+
const member = Object.entries(ProviderTier).find(([, value]) => value === declared)?.[0];
|
|
919
|
+
if (member === undefined) {
|
|
920
|
+
throw new Error(`decisions/${ref}.json declares tier '${declared}', which is not a ProviderTier value `
|
|
921
|
+
+ `(${Object.values(ProviderTier).join(', ')}).`);
|
|
922
|
+
}
|
|
923
|
+
return `ProviderTier.${member}`;
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* WHICH connections the vendor admits — projected from the record, never derived from the source.
|
|
927
|
+
*
|
|
928
|
+
* Emitting nothing is the floor (`APPLICATION` × `SERVICE`), and it is what every vendor gets until
|
|
929
|
+
* someone records otherwise. The generator cannot know whether a vendor can be connected per tenant:
|
|
930
|
+
* that is a fact about the vendor's product and about what somebody verified, and "it declares OAuth2"
|
|
931
|
+
* is a fact about the scraped catalogue. Deriving one from the other would produce an unfalsifiable
|
|
932
|
+
* claim that one upstream change flips silently.
|
|
933
|
+
*
|
|
934
|
+
* An unrecognised member REFUSES for the same reason as the tier: a typo that silently narrows a
|
|
935
|
+
* vendor back to the floor reads exactly like a decision nobody made.
|
|
936
|
+
*/
|
|
937
|
+
function renderAdmissibleConnections(decisions) {
|
|
938
|
+
const admissible = decisions?.admissibleConnections;
|
|
939
|
+
if (admissible === undefined || admissible.length === 0)
|
|
940
|
+
return '';
|
|
941
|
+
const ownerScopes = Object.entries(ExternalProvider_Connection_OwnerScope);
|
|
942
|
+
const delegations = Object.entries(ExternalProvider_Connection_DelegationMode);
|
|
943
|
+
const rendered = admissible.map((entry) => {
|
|
944
|
+
const owner = ownerScopes.find(([, value]) => value === entry.ownerScope)?.[0];
|
|
945
|
+
const delegation = delegations.find(([, value]) => value === entry.delegation)?.[0];
|
|
946
|
+
if (owner === undefined || delegation === undefined) {
|
|
947
|
+
throw new Error(`decisions/${decisions?.ref}.json admits '${entry.ownerScope}' × '${entry.delegation}', `
|
|
948
|
+
+ `which is not a (ExternalProvider_Connection_OwnerScope × ExternalProvider_Connection_DelegationMode) pair.`);
|
|
949
|
+
}
|
|
950
|
+
return ` { ownerScope: ExternalProvider_Connection_OwnerScope.${owner}, delegation: ExternalProvider_Connection_DelegationMode.${delegation} },`;
|
|
951
|
+
});
|
|
952
|
+
return `\n admissibleConnections: [\n${rendered.join('\n')}\n ],`;
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* NOTE on `import('./operations.generated.js')` in this template — the extension is load-bearing and
|
|
956
|
+
* must not be "tidied" away.
|
|
957
|
+
*
|
|
958
|
+
* That literal is DATA: the text written into every vendor module. But it is import-SHAPED, so the
|
|
959
|
+
* alias finalizer rewrote it when THIS file was built — the source said `./operations.generated` and
|
|
960
|
+
* the shipped generator wrote `./operations.generated.js`. The generator's OUTPUT therefore depended
|
|
961
|
+
* on how the generator itself had been built, and running it from source rather than from dist would
|
|
962
|
+
* emit a different catalogue.
|
|
963
|
+
*
|
|
964
|
+
* It went unnoticed for the worst possible reason: the rewrite was RIGHT. The emitted module compiles
|
|
965
|
+
* to ESM, where the extension is required. Found 2026-09-08 by reading a regeneration diff, not by a
|
|
966
|
+
* test — none pinned either form. Saying it at the source makes source and build agree, and rule
|
|
967
|
+
* `lazy-catalogue-import-drops-its-extension` in `check-provider-catalogue.mjs` pins it on the SHIPPED
|
|
968
|
+
* tree, whichever build produced it.
|
|
969
|
+
*
|
|
970
|
+
* The reasoning lives here rather than beside the line because the line is inside a template literal:
|
|
971
|
+
* a comment there is emitted into every vendor module, and a backtick in it ends the template.
|
|
972
|
+
*/
|
|
973
|
+
function renderBackendModule(provider, operations, authored, decisions) {
|
|
974
|
+
// Computed once: the metadata block and the import line must agree, and rendering the enums
|
|
975
|
+
// without importing them emits a module that reads correctly and does not compile.
|
|
976
|
+
const admissible = renderAdmissibleConnections(decisions);
|
|
977
|
+
const envPrefix = envPrefixFor(provider.ref);
|
|
978
|
+
const secretEnvVar = accountSecretEnvVarFor(provider, envPrefix);
|
|
979
|
+
const header = authHeaderFor(provider.auth.kind);
|
|
980
|
+
return `${GENERATED_BANNER}
|
|
981
|
+
|
|
982
|
+
import { ProviderProtocolRuntimeKind, ExternalProvider_ExchangeProtocol_Kind${provider.baseUrl === undefined ? ', ExternalProvider_SecretScope' : ''}${admissible === '' ? '' : ', ExternalProvider_Connection_DelegationMode, ExternalProvider_Connection_OwnerScope'} } from '@wildo-ai/external-connectors-models';
|
|
983
|
+
import { defineProviderMetadata, ProviderCatalogueSource, ProviderOriginKind, ProviderTier } from '@wildo-ai/saas-models';
|
|
984
|
+
import type { ProviderOperationExecute } from '@wildo-ai/external-connectors-models';
|
|
985
|
+
import type { ExternalProvider_ConnectionTarget } from '@wildo-ai/external-connectors-models';
|
|
986
|
+
import type { BackendProviderModule, BackendProviderRegistryFragment, ProviderRef } from '@wildo-ai/external-connectors-private/backend';
|
|
987
|
+
${authored ? `import { withAuthoredSupplement } from '@wildo-ai/external-connectors-private/backend';
|
|
988
|
+
|
|
989
|
+
import { authored as authoredSupplement, authoredClient } from '${AUTHORED_IMPORT_PREFIX}${provider.ref}${AUTHORED_FILE_SUFFIX_IMPORT}';
|
|
990
|
+
` : ''}
|
|
991
|
+
/**
|
|
992
|
+
* \`${provider.ref}\` — transposed from ${provider.provenances.map((p) => p.source).join(', ')}.
|
|
993
|
+
*
|
|
994
|
+
* Auth shape read from the source: ${provider.auth.kind}.${provider.auth.kind === TransposedAuthKind.CUSTOM
|
|
995
|
+
? `
|
|
996
|
+
* The source declares a vendor-specific credential bag (${(provider.auth.customFields ?? []).join(', ') || 'fields not recovered'});
|
|
997
|
+
* the secrets contract below names ONE key, and completing it is a human decision the transposer
|
|
998
|
+
* refuses to guess.`
|
|
999
|
+
: ''}${provider.auth.kind === TransposedAuthKind.OAUTH2
|
|
1000
|
+
? `
|
|
1001
|
+
* OAuth2 endpoints: authorize ${provider.auth.authUrl ?? '(not recovered)'}, token ${provider.auth.tokenUrl ?? '(not recovered)'}.
|
|
1002
|
+
* The dance itself is Wildo's and identical for every vendor; only these endpoints and the scopes differ.`
|
|
1003
|
+
: ''}
|
|
1004
|
+
*/
|
|
1005
|
+
${authored ? 'const generated' : `export const ${identifierFor(provider.ref)}BackendProvider`}: BackendProviderModule = {
|
|
1006
|
+
metadata: defineProviderMetadata({
|
|
1007
|
+
ref: ${quote(provider.ref)},
|
|
1008
|
+
packageName: ${quote(PACKAGE_NAME)},
|
|
1009
|
+
tier: ${renderTier(decisions, provider.ref)},
|
|
1010
|
+
vendor: ${quote(provider.vendor)},
|
|
1011
|
+
origin: {
|
|
1012
|
+
kind: ProviderOriginKind.GENERATED,
|
|
1013
|
+
catalogue: {
|
|
1014
|
+
source: ProviderCatalogueSource.${provider.provenances[0]?.source ?? 'ACTIVEPIECES'},
|
|
1015
|
+
sourceRef: ${quote(provider.provenances[0]?.sourceRef ?? provider.ref)},
|
|
1016
|
+
sourceVersion: ${quote(provider.provenances[0]?.sourceVersion ?? 'unknown')},
|
|
1017
|
+
},
|
|
1018
|
+
},
|
|
1019
|
+
}),
|
|
1020
|
+
providerCapabilities: [],${admissible}
|
|
1021
|
+
secretsContract: {
|
|
1022
|
+
${renderSecretsContract(provider, secretEnvVar, envPrefix)} },
|
|
1023
|
+
protocols: [
|
|
1024
|
+
{
|
|
1025
|
+
// The MEMBER NAME, not the enum value. \`composeBackendProviders\` indexes the enum BY this
|
|
1026
|
+
// string and compares the result to \`runtimeContract.kind\`, so the value ("rest_api") makes the
|
|
1027
|
+
// lookup \`undefined\` and composition refuses the provider. The binding is typed
|
|
1028
|
+
// \`TProtocol extends string\`, so the wrong one compiled — and every generated provider carried
|
|
1029
|
+
// it, unloadable, until the chain was walked instead of doubled.
|
|
1030
|
+
protocol: 'REST_API',
|
|
1031
|
+
runtimeContract: {
|
|
1032
|
+
kind: ProviderProtocolRuntimeKind.REST,
|
|
1033
|
+
${provider.baseUrl === undefined ? ` // No single base URL was recovered from the source; the deployment names it.
|
|
1034
|
+
baseUrlEnvVarName: ${quote(`${envPrefix}_BASE_URL`)},` : ` baseUrl: ${quote(provider.baseUrl)},`}
|
|
1035
|
+
${renderOAuth2Block(provider, envPrefix)} apiKey: { secretRef: ${quote(secretEnvVar)}, headerName: ${quote(header.name)}${header.prefix === undefined ? '' : `, prefix: ${quote(header.prefix)}`} },
|
|
1036
|
+
operations: async () => (await import('./operations.generated.js')).catalogue,
|
|
1037
|
+
},
|
|
1038
|
+
},
|
|
1039
|
+
],
|
|
1040
|
+
};
|
|
1041
|
+
${authored ? `
|
|
1042
|
+
/**
|
|
1043
|
+
* The generated module, supplemented by hand. See the authored file for why it exists — the batch
|
|
1044
|
+
* regenerates everything above and never touches it.
|
|
1045
|
+
*/
|
|
1046
|
+
export const ${identifierFor(provider.ref)}BackendProvider: BackendProviderModule = withAuthoredSupplement(generated, authoredSupplement);
|
|
1047
|
+
` : ''}
|
|
1048
|
+
/**
|
|
1049
|
+
* The CONVENTIONAL export a host loads this vendor by.
|
|
1050
|
+
*
|
|
1051
|
+
* A host resolving \`${PACKAGE_NAME}/${provider.ref}\` knows the specifier and nothing else — not
|
|
1052
|
+
* which symbol inside is the provider. So the name is fixed for every package, and
|
|
1053
|
+
* \`readBackendProviderFragment\` refuses a namespace that does not carry it. Without this export the
|
|
1054
|
+
* subpath resolves, typechecks, and is unloadable.
|
|
1055
|
+
*
|
|
1056
|
+
* The key is the module's OWN declared ref, branded at this boundary exactly as
|
|
1057
|
+
* \`EngineBackendProviderRegistryFragment\` brands its own — \`ProviderRef\` is a compile-time facet with
|
|
1058
|
+
* no runtime content, and the value being branded is the identity this module already publishes.
|
|
1059
|
+
* That is a different act from casting a dynamically imported namespace, which asserts a shape
|
|
1060
|
+
* nobody checked; here the shape is the literal above.
|
|
1061
|
+
*/
|
|
1062
|
+
export const backendProviderFragment: BackendProviderRegistryFragment = {
|
|
1063
|
+
modules: new Map([[${identifierFor(provider.ref)}BackendProvider.metadata.ref as ProviderRef, ${identifierFor(provider.ref)}BackendProvider]]),
|
|
1064
|
+
};
|
|
1065
|
+
|
|
1066
|
+
${renderTypedClient(provider, operations, authored)}`;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* The typed client — R3, bought with a TYPE rather than a dependency.
|
|
1070
|
+
*
|
|
1071
|
+
* `slack.slackGetChannelInfo({ channel: 'C1' })`, with the compiler checking the parameters and no
|
|
1072
|
+
* runtime import of the engine: the factory takes the executor as an argument, so an application
|
|
1073
|
+
* wires its own. Importing the executor here would put the whole backend into the module graph of
|
|
1074
|
+
* anything touching a vendor — the exact weight #378 removed.
|
|
1075
|
+
*
|
|
1076
|
+
* ## Only RESOLVED operations appear
|
|
1077
|
+
*
|
|
1078
|
+
* A pending operation has no method and no path. Putting one on the client would offer a method that
|
|
1079
|
+
* cannot execute, which is worse than an absent one: the absent method sends a caller to look, and
|
|
1080
|
+
* the present one sends them to file a bug against the vendor. The emitter passes only resolved
|
|
1081
|
+
* operations here, and the catalogue keyed beside it contains exactly the same set.
|
|
1082
|
+
*
|
|
1083
|
+
* ## The name comes from the FINAL operation id
|
|
1084
|
+
*
|
|
1085
|
+
* Ids are already disambiguated upstream — method, then path tail, then ordinal — so deriving a name
|
|
1086
|
+
* from anything else re-collides the cases that pass already resolved (twenty of them in `discord`).
|
|
1087
|
+
* The camelCase name is ergonomics; the id travelling inside the call is identity, and the two are
|
|
1088
|
+
* derived one from the other so they cannot drift.
|
|
1089
|
+
*
|
|
1090
|
+
* ## Inputs are typed CLOSED, while the runtime is loose
|
|
1091
|
+
*
|
|
1092
|
+
* The input type names exactly the fields the request needs. The `inputSchema` beside it is a
|
|
1093
|
+
* `looseObject`, so a vendor field no catalogue mentioned is still ACCEPTED at runtime and a caller
|
|
1094
|
+
* who needs one passes it through a cast. Widening the type with an index signature instead would
|
|
1095
|
+
* make every typo compile, which is the one thing a typed client exists to prevent.
|
|
1096
|
+
*
|
|
1097
|
+
* ## The argument covers the WIRE, not only what the catalogue asked its user for
|
|
1098
|
+
*
|
|
1099
|
+
* Input fields and parameters are different populations: an input field is what the SOURCE CATALOGUE
|
|
1100
|
+
* asked its user for, a parameter is what the REQUEST places on the wire. A path token is routinely
|
|
1101
|
+
* the second without the first — an unsubscribe reads `/webhooks/{webhookId}`, and the id is one the
|
|
1102
|
+
* caller already holds from the subscribe rather than something a form asked for. A client typed from
|
|
1103
|
+
* input fields as the source left them therefore REFUSED to offer the value the executor demands.
|
|
1104
|
+
*
|
|
1105
|
+
* `declareWhatTheWireNeeds` folds the wire's parameters into `inputFields` before anything is
|
|
1106
|
+
* rendered, under the key `compileProviderOperationRequest` reads (`from ?? name`), so the argument
|
|
1107
|
+
* type and the `inputSchema` beside it stay two renderings of one set rather than two lists that can
|
|
1108
|
+
* disagree.
|
|
1109
|
+
*/
|
|
1110
|
+
function renderTypedClient(provider, operations, authored) {
|
|
1111
|
+
const usedNames = new Set();
|
|
1112
|
+
const methods = operations
|
|
1113
|
+
.map((operation) => {
|
|
1114
|
+
const name = uniqueMethodName(operation.operationId, usedNames);
|
|
1115
|
+
const fields = callerSuppliedFields(operation)
|
|
1116
|
+
.map((field) => `${quote(field.key)}${field.required ? '' : '?'}: ${field.type}`)
|
|
1117
|
+
.join('; ');
|
|
1118
|
+
const shape = fields.length === 0 ? 'Record<string, never>' : `{ ${fields} }`;
|
|
1119
|
+
const summary = (operation.summary ?? operation.operationId).replace(/\*\//g, '*\\/');
|
|
1120
|
+
return ` /** ${summary} */
|
|
1121
|
+
${name}: (input: ${shape}, connection?: ExternalProvider_ConnectionTarget): Promise<unknown> =>
|
|
1122
|
+
execute(${quote(provider.ref)}, ${quote(operation.operationId)}, input, connection),`;
|
|
1123
|
+
})
|
|
1124
|
+
.join('\n');
|
|
1125
|
+
return `/**
|
|
1126
|
+
* Typed access to ${provider.vendor}'s ${operations.length} executable operation(s).
|
|
1127
|
+
*
|
|
1128
|
+
* Takes the executor rather than importing one, so this package carries no runtime dependency on the
|
|
1129
|
+
* engine. Operations awaiting an endpoint are absent by construction.${authored ? `
|
|
1130
|
+
*
|
|
1131
|
+
* The authored fragment is spread LAST, so a hand-written method wins a name collision with a
|
|
1132
|
+
* generated one — the author saw both and chose.` : ''}
|
|
1133
|
+
*/
|
|
1134
|
+
export function create${identifierFor(provider.ref)}Client(execute: ProviderOperationExecute) {
|
|
1135
|
+
return {
|
|
1136
|
+
${methods}${authored ? `
|
|
1137
|
+
...authoredClient(execute),` : ''}
|
|
1138
|
+
};
|
|
1139
|
+
}
|
|
1140
|
+
`;
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* The fields a CALLER supplies for one operation.
|
|
1144
|
+
*
|
|
1145
|
+
* A projection of `inputFields` and nothing else, which is the point: `declareWhatTheWireNeeds` has
|
|
1146
|
+
* already folded every wire parameter into that list, so the client's argument type and the
|
|
1147
|
+
* `inputSchema` beside it are two renderings of ONE set. An earlier revision computed the union here
|
|
1148
|
+
* as well, and that was two mechanisms for one invariant — the second silently doing nothing, and a
|
|
1149
|
+
* pin written against it passing for the wrong reason.
|
|
1150
|
+
*
|
|
1151
|
+
* The one thing this must know that a name cannot tell it: which fields ride in a PATH. A credential
|
|
1152
|
+
* is resolved and never asked for, but nothing except the caller can fill a path token, so a token
|
|
1153
|
+
* whose name merely SPELLS like a credential must still be offered — `simplybookme`'s
|
|
1154
|
+
* `/admin/clients/{clientId}` is a client RECORD's id, and filtering it by name shipped a method
|
|
1155
|
+
* whose URL kept a literal hole. Requiredness comes from the same authority: the executor refuses an
|
|
1156
|
+
* empty path token whatever the declaration says.
|
|
1157
|
+
*/
|
|
1158
|
+
function callerSuppliedFields(operation) {
|
|
1159
|
+
return callerSuppliedInputFields(operation).map((field) => ({
|
|
1160
|
+
key: field.name,
|
|
1161
|
+
required: field.required,
|
|
1162
|
+
type: typeScriptFor(field.kind),
|
|
1163
|
+
}));
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* THE set — the one both the typed client and the runtime `inputSchema` render.
|
|
1167
|
+
*
|
|
1168
|
+
* Extracted 2026-09-08, because the sentence above ("two renderings of ONE set") was describing an
|
|
1169
|
+
* invariant the code did not hold. `callerSuppliedFields` filtered; `renderInputSchema` walked
|
|
1170
|
+
* `operation.inputFields` raw. So every generated module shipped a typed client that WITHHELD the
|
|
1171
|
+
* credential — correctly, it is resolved from the secrets contract — beside a Zod schema that
|
|
1172
|
+
* REQUIRED it, and the executor validates against the schema.
|
|
1173
|
+
*
|
|
1174
|
+
* The consequence is the worst arrangement available: the type-safe door is the one that fails. An
|
|
1175
|
+
* application calling `client.salesforceGetDashboard({ dashboardId })` compiles, because the client's
|
|
1176
|
+
* argument type does not mention `accessToken`, and is then refused at execution with
|
|
1177
|
+
* `INPUT_REJECTED: accessToken — Required`. Measured across the catalogue before the fix: **1,668 of
|
|
1178
|
+
* 5,675 operations (29.4%), across 151 of 689 vendors**, could not be called at all through their own
|
|
1179
|
+
* client.
|
|
1180
|
+
*
|
|
1181
|
+
* Found by driving one operation to a socket for the first time — the ETL-binding proof. No
|
|
1182
|
+
* typecheck could see it (the two artifacts are a `.ts` type and a Zod value), and no test did,
|
|
1183
|
+
* because every existing pin either read the client's TEXT or executed a vendor whose auth happens to
|
|
1184
|
+
* carry no input field at all.
|
|
1185
|
+
*
|
|
1186
|
+
* The PATH exemption is carried here, once, and it is not optional: nothing except the caller can
|
|
1187
|
+
* fill a path token, so a token that merely SPELLS like a credential must still be offered and must
|
|
1188
|
+
* be required. `simplybookme`'s `/admin/clients/{clientId}` is a client RECORD's id.
|
|
1189
|
+
*/
|
|
1190
|
+
function callerSuppliedInputFields(operation) {
|
|
1191
|
+
const pathKeys = new Set(operation.parameters
|
|
1192
|
+
.filter((parameter) => parameter.in === TransposedParameterLocation.PATH)
|
|
1193
|
+
.map((parameter) => parameter.from ?? parameter.name));
|
|
1194
|
+
return operation.inputFields
|
|
1195
|
+
.filter((field) => pathKeys.has(field.name) || !CALLER_SUPPLIES_NO_CREDENTIAL.has(field.name))
|
|
1196
|
+
.map((field) => ({ ...field, required: field.required === true || pathKeys.has(field.name) }));
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Input names a CALLER never supplies, because Wildo supplies them.
|
|
1200
|
+
*
|
|
1201
|
+
* A source catalogue declares the credential alongside the operation's real parameters — a piece's
|
|
1202
|
+
* props carry `accessToken` and `botToken` beside `channel` — because in that catalogue the user
|
|
1203
|
+
* fills both in. In Wildo they are different things entirely: the credential is resolved from the
|
|
1204
|
+
* provider's secrets contract at execution, and the operation's parameters come from the caller. A
|
|
1205
|
+
* typed client that asked for both would invite an application to pass a token by hand, which is the
|
|
1206
|
+
* one habit the whole secrets contract exists to remove.
|
|
1207
|
+
*
|
|
1208
|
+
* **A PATH position is exempt, and the exemption is not optional** — see `callerSuppliedFields` and
|
|
1209
|
+
* `declareWhatTheWireNeeds`, which both carry it. Nothing except the caller can fill a path token, so
|
|
1210
|
+
* withholding one by NAME ships a method whose URL keeps a literal hole. `simplybookme`
|
|
1211
|
+
* `/admin/clients/{clientId}` is a client RECORD's id that merely spells itself like OAuth's, and a
|
|
1212
|
+
* name-based filter cannot see through that coincidence. Do not unify the two positions: the same
|
|
1213
|
+
* spelling in a QUERY really is the credential, which is why they must be decided separately.
|
|
1214
|
+
*
|
|
1215
|
+
* Matched on EXACT names only, and the omissions are deliberate. Bare `token` and `secret` are not
|
|
1216
|
+
* here: a vendor legitimately uses `token` for pagination, and dropping a real parameter to tidy the
|
|
1217
|
+
* type would make a call silently incomplete — worse than an extra field a caller can ignore.
|
|
1218
|
+
*/
|
|
1219
|
+
const CALLER_SUPPLIES_NO_CREDENTIAL = new Set([
|
|
1220
|
+
'authMethod', 'auth_method',
|
|
1221
|
+
'accessToken', 'access_token',
|
|
1222
|
+
// `authToken` joined on 2026-09-08, after the first sweep that could see the population: it is
|
|
1223
|
+
// unambiguous in a way bare `token` is not — nothing paginates with an `authToken` — and it was
|
|
1224
|
+
// Twilio's credential, sitting in the input schema of every one of its operations.
|
|
1225
|
+
'authToken', 'auth_token',
|
|
1226
|
+
'botToken', 'bot_token',
|
|
1227
|
+
'apiKey', 'api_key',
|
|
1228
|
+
'bearerToken', 'bearer_token',
|
|
1229
|
+
'clientId', 'client_id',
|
|
1230
|
+
'clientSecret', 'client_secret',
|
|
1231
|
+
'password',
|
|
1232
|
+
'refreshToken', 'refresh_token',
|
|
1233
|
+
]);
|
|
1234
|
+
/** The source's declared kind, as the type a caller writes against. */
|
|
1235
|
+
function typeScriptFor(kind) {
|
|
1236
|
+
switch (kind) {
|
|
1237
|
+
case TransposedInputKind.STRING:
|
|
1238
|
+
return 'string';
|
|
1239
|
+
case TransposedInputKind.NUMBER:
|
|
1240
|
+
return 'number';
|
|
1241
|
+
case TransposedInputKind.BOOLEAN:
|
|
1242
|
+
return 'boolean';
|
|
1243
|
+
case TransposedInputKind.ARRAY:
|
|
1244
|
+
return 'readonly unknown[]';
|
|
1245
|
+
case TransposedInputKind.OBJECT:
|
|
1246
|
+
return 'Record<string, unknown>';
|
|
1247
|
+
case TransposedInputKind.UNKNOWN:
|
|
1248
|
+
// The source declared the field and not its kind. `unknown` forces the caller to be explicit
|
|
1249
|
+
// rather than quietly accepting whatever they had — a guess here would be a lie with a type.
|
|
1250
|
+
return 'unknown';
|
|
1251
|
+
case TransposedInputKind.WIRE_SCALAR:
|
|
1252
|
+
return 'string | number | boolean';
|
|
1253
|
+
case TransposedInputKind.WIRE_SCALAR_OR_LIST:
|
|
1254
|
+
return 'string | number | boolean | readonly (string | number | boolean)[]';
|
|
1255
|
+
default: {
|
|
1256
|
+
const exhaustive = kind;
|
|
1257
|
+
return exhaustive;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* `slack-find-user-by-email` → `slackFindUserByEmail`; `trigger.new-lead.poll` → `triggerNewLeadPoll`.
|
|
1263
|
+
*
|
|
1264
|
+
* Collisions take an ordinal rather than overwriting each other: two methods with one name silently
|
|
1265
|
+
* drops an operation the catalogue shows, which is the same defect the operation-id uniqueness pass
|
|
1266
|
+
* exists for one layer down.
|
|
1267
|
+
*/
|
|
1268
|
+
function uniqueMethodName(operationId, taken) {
|
|
1269
|
+
const parts = operationId.split(/[^a-zA-Z0-9]+/).filter((part) => part.length > 0);
|
|
1270
|
+
const base = parts
|
|
1271
|
+
.map((part, index) => (index === 0 ? part[0].toLowerCase() + part.slice(1) : part[0].toUpperCase() + part.slice(1)))
|
|
1272
|
+
.join('');
|
|
1273
|
+
const safe = /^[a-zA-Z_]/.test(base) ? base : `operation${base}`;
|
|
1274
|
+
let candidate = safe;
|
|
1275
|
+
let ordinal = 2;
|
|
1276
|
+
while (taken.has(candidate)) {
|
|
1277
|
+
candidate = `${safe}${ordinal}`;
|
|
1278
|
+
ordinal += 1;
|
|
1279
|
+
}
|
|
1280
|
+
taken.add(candidate);
|
|
1281
|
+
return candidate;
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* The `./companion` barrel — how discovery learns that 699 vendors exist without loading one.
|
|
1285
|
+
*
|
|
1286
|
+
* A contribution is a values-free DECLARATION: the ref, the identity, the protocols, the runtime
|
|
1287
|
+
* targets and the shape of the secrets a deployment must supply. The CLI reads them to build the
|
|
1288
|
+
* lockfile and the generated catalogue types; the companion reads them to know what an application
|
|
1289
|
+
* may declare. None of it loads a provider's runtime module, which is the point — the whole
|
|
1290
|
+
* catalogue is discoverable at a cost that does not grow with what it contains.
|
|
1291
|
+
*
|
|
1292
|
+
* `runtimeImportPath` is each vendor's SUBPATH (`@wildo-ai/providers/slack`), and that is what makes
|
|
1293
|
+
* the one-package shape work with on-demand loading: discovery names 699 reachable entries, and a
|
|
1294
|
+
* host imports exactly the one an application declared.
|
|
1295
|
+
*
|
|
1296
|
+
* `runtimeTargets` is `backend` only. These are REST providers reached by an application's own
|
|
1297
|
+
* services; nothing here belongs in the companion, whose LLM-provider exception exists for
|
|
1298
|
+
* AI-assisted development and has no analogue in a vendor catalogue.
|
|
1299
|
+
*/
|
|
1300
|
+
/**
|
|
1301
|
+
* `protocols` carries the enum MEMBER NAME, not its value.
|
|
1302
|
+
*
|
|
1303
|
+
* That is what an application authors — `protocols: ['REST_API']` — and what every engine-shipped
|
|
1304
|
+
* contribution declares, and discovery VALIDATES the application's scope against this list. Emitting
|
|
1305
|
+
* the enum value made `wildo config sync` refuse with *"declares protocol 'REST_API' but discovery
|
|
1306
|
+
* does not report that protocol"*, which reads like a missing binding and is a spelling
|
|
1307
|
+
* disagreement.
|
|
1308
|
+
*
|
|
1309
|
+
* The THIRD field in this emitter where the convention is the name and the value was written
|
|
1310
|
+
* instead, after the protocol binding and the loader fragment. The convention is stated nowhere a
|
|
1311
|
+
* generator can read, and every one of these types accepts a bare string — so each instance had to be
|
|
1312
|
+
* found by running the real thing (#397).
|
|
1313
|
+
*/
|
|
1314
|
+
function renderCompanionExports(providers, decisionsByRef) {
|
|
1315
|
+
const entries = [...providers]
|
|
1316
|
+
.sort((left, right) => left.ref.localeCompare(right.ref))
|
|
1317
|
+
.map((provider) => {
|
|
1318
|
+
const envPrefix = envPrefixFor(provider.ref);
|
|
1319
|
+
return ` {
|
|
1320
|
+
ref: ${quote(provider.ref)},
|
|
1321
|
+
identity: {
|
|
1322
|
+
packageName: ${quote(PACKAGE_NAME)},
|
|
1323
|
+
tier: ${renderTier(decisionsByRef.get(provider.ref), provider.ref)},
|
|
1324
|
+
vendor: ${quote(provider.vendor)},
|
|
1325
|
+
origin: {
|
|
1326
|
+
kind: ProviderOriginKind.GENERATED,
|
|
1327
|
+
catalogue: {
|
|
1328
|
+
source: ProviderCatalogueSource.${provider.provenances[0]?.source ?? 'ACTIVEPIECES'},
|
|
1329
|
+
sourceRef: ${quote(provider.provenances[0]?.sourceRef ?? provider.ref)},
|
|
1330
|
+
sourceVersion: ${quote(provider.provenances[0]?.sourceVersion ?? 'unknown')},
|
|
1331
|
+
},
|
|
1332
|
+
},
|
|
1333
|
+
},
|
|
1334
|
+
runtimeImportPath: ${quote(`${PACKAGE_NAME}/${provider.ref}`)},
|
|
1335
|
+
runtimeTargets: [{ kind: 'backend' }],
|
|
1336
|
+
engineCapabilities: [],
|
|
1337
|
+
providerCapabilities: [],
|
|
1338
|
+
protocols: ['REST_API'],
|
|
1339
|
+
secretsContractShape: [
|
|
1340
|
+
${renderContributionSecretShape(provider, envPrefix)} ],
|
|
1341
|
+
},`;
|
|
1342
|
+
})
|
|
1343
|
+
.join('\n');
|
|
1344
|
+
return `${GENERATED_BANNER}
|
|
1345
|
+
|
|
1346
|
+
import { ExternalProvider_ExchangeProtocol_Kind } from '@wildo-ai/external-connectors-models';
|
|
1347
|
+
import { ProviderCatalogueSource, ProviderOriginKind, ProviderTier } from '@wildo-ai/saas-models';
|
|
1348
|
+
import type { RuntimeOwnerCompanionExports } from '@wildo-ai/saas-models/companion';
|
|
1349
|
+
|
|
1350
|
+
/** ${providers.length} vendors, declared without loading any of them. */
|
|
1351
|
+
const companionExports: RuntimeOwnerCompanionExports = {
|
|
1352
|
+
providerContributions: [
|
|
1353
|
+
${entries}
|
|
1354
|
+
],
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1357
|
+
export default companionExports;
|
|
1358
|
+
`;
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* The same secrets the module declares, in the discovery contract's own shape.
|
|
1362
|
+
*
|
|
1363
|
+
* It must AGREE with `renderSecretsContract` — discovery's whole job is to say what a deployment
|
|
1364
|
+
* owes before anything is loaded, and a contribution that disagreed with the module would be a
|
|
1365
|
+
* lockfile built on a promise the runtime does not keep. Sorted by slug, because the schema's
|
|
1366
|
+
* `superRefine` requires it and an unsorted list fails discovery at parse rather than at use.
|
|
1367
|
+
*/
|
|
1368
|
+
function renderContributionSecretShape(provider, envPrefix) {
|
|
1369
|
+
const entry = (slug, envVarName, required, description) => ` {
|
|
1370
|
+
slug: ${quote(slug)},
|
|
1371
|
+
envVarName: ${quote(envVarName)},
|
|
1372
|
+
required: ${required},
|
|
1373
|
+
description: ${quote(description)},
|
|
1374
|
+
},
|
|
1375
|
+
`;
|
|
1376
|
+
// Sorted by slug, which `ProviderSecretContractShapeSchema.superRefine` enforces — so `baseUrl`
|
|
1377
|
+
// sits after `apiKey`/`accessToken` and before `clientId`, not at the end where it reads naturally.
|
|
1378
|
+
const baseUrl = provider.baseUrl !== undefined
|
|
1379
|
+
? ''
|
|
1380
|
+
: entry('baseUrl', `${envPrefix}_BASE_URL`, true, baseUrlSlotDescription(provider.vendor));
|
|
1381
|
+
if (provider.auth.kind !== TransposedAuthKind.OAUTH2) {
|
|
1382
|
+
return entry('apiKey', accountSecretEnvVarFor(provider, envPrefix), true, `Credential for ${provider.vendor}, transposed as ${provider.auth.kind}.`) + baseUrl;
|
|
1383
|
+
}
|
|
1384
|
+
return (entry('accessToken', accountSecretEnvVarFor(provider, envPrefix), false, `Access token for ${provider.vendor}. Minted by the OAuth2 exchange, not authored — set it only if ${provider.vendor} issues a long-lived token.`)
|
|
1385
|
+
+ baseUrl
|
|
1386
|
+
+ entry('clientId', `${envPrefix}_CLIENT_ID`, true, `OAuth2 client id for the application's ${provider.vendor} registration.`)
|
|
1387
|
+
+ entry('clientSecret', `${envPrefix}_CLIENT_SECRET`, true, `OAuth2 client secret for the application's ${provider.vendor} registration.`));
|
|
1388
|
+
}
|
|
1389
|
+
/**
|
|
1390
|
+
* The BASE URL slot, for a vendor whose base URL the deployment names.
|
|
1391
|
+
*
|
|
1392
|
+
* ## Why a base URL is in the SECRETS contract, which is not a contradiction
|
|
1393
|
+
*
|
|
1394
|
+
* `secretsContract` is the provider's declared ENVIRONMENT surface, not a list of things that are
|
|
1395
|
+
* secret. The env builder says so where it matters — "a provider whose configuration is a hostname
|
|
1396
|
+
* or a database name puts THAT in its contract too: immudb and odoo both do" — and immudb declares
|
|
1397
|
+
* `host` and `port` there for exactly this reason.
|
|
1398
|
+
*
|
|
1399
|
+
* It has to, because that contract is the ALLOW-LIST. `filterProviderEnvToScope` admits a
|
|
1400
|
+
* `providerEnv` key only when some declared slot names it, and drops the rest. A base URL declared
|
|
1401
|
+
* ONLY as `baseUrlEnvVarName` on the runtime contract is named by nothing the builder reads, so it
|
|
1402
|
+
* was stripped from every runtime — measured 2026-09-10, `ASANA_BASE_URL` was authored in the
|
|
1403
|
+
* application's secrets and absent from the generated `.env`, while `ASANA_CLIENT_ID` and
|
|
1404
|
+
* `ASANA_CLIENT_SECRET` beside it came through. 465 of the 684 generated vendors declare
|
|
1405
|
+
* `baseUrlEnvVarName` and NONE of them declared the matching slot, so this is the whole population:
|
|
1406
|
+
* a connection could be minted and its operations then had no base URL to call.
|
|
1407
|
+
*
|
|
1408
|
+
* ## REGISTRATION, declared explicitly, because the derivation cannot see this one
|
|
1409
|
+
*
|
|
1410
|
+
* `getProviderSecretScope` falls back to REGISTRATION only for the two refs the OAuth2 block names,
|
|
1411
|
+
* and CREDENTIAL for everything else. A base URL is neither, so an undeclared slot would classify as
|
|
1412
|
+
* CREDENTIAL — and the `scope` field's own JSDoc names that consequence: "a registration it cannot
|
|
1413
|
+
* see is one a tenant could store as if it were their own credential". A tenant-supplied base URL is
|
|
1414
|
+
* the address every one of that provider's calls is sent to, so it is the last thing that may be
|
|
1415
|
+
* per-tenant credential material. Declared REGISTRATION, the connect leg refuses it with
|
|
1416
|
+
* `SECRET_SLUG_NOT_A_CREDENTIAL` and the catalogue reports it under `missingRegistration`, where an
|
|
1417
|
+
* operator can see what is owed.
|
|
1418
|
+
*
|
|
1419
|
+
* `required: true` is the honest statement — such a provider cannot execute an operation without it
|
|
1420
|
+
* — and does not gate boot: `clientId` and `clientSecret` are required on all 684 vendors and most
|
|
1421
|
+
* deployments configure none of them. Connectability is unaffected too; `connectabilityBlocker`
|
|
1422
|
+
* reads the two OAuth2 refs and nothing else.
|
|
1423
|
+
*
|
|
1424
|
+
* Emitted only when no literal `baseUrl` was recovered, which is the same condition that emits
|
|
1425
|
+
* `baseUrlEnvVarName` — the two are one decision and must not drift apart.
|
|
1426
|
+
*/
|
|
1427
|
+
function renderBaseUrlSecretSlot(provider, envPrefix) {
|
|
1428
|
+
if (provider.baseUrl !== undefined)
|
|
1429
|
+
return '';
|
|
1430
|
+
return ` baseUrl: {
|
|
1431
|
+
envVarName: ${quote(`${envPrefix}_BASE_URL`)},
|
|
1432
|
+
required: true,
|
|
1433
|
+
scope: ExternalProvider_SecretScope.REGISTRATION,
|
|
1434
|
+
description: ${quote(baseUrlSlotDescription(provider.vendor))},
|
|
1435
|
+
},
|
|
1436
|
+
`;
|
|
1437
|
+
}
|
|
1438
|
+
/** One wording, so the module and the discovery contribution cannot describe the slot differently. */
|
|
1439
|
+
function baseUrlSlotDescription(vendor) {
|
|
1440
|
+
return `API base URL for ${vendor}. No single base URL was recovered from the source catalogue, so the deployment names it; without it this provider's operations have no address to call.`;
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* What the ACCOUNT slot is called — and for an OAuth2 vendor it is not an API key.
|
|
1444
|
+
*
|
|
1445
|
+
* Every vendor used to get `<PREFIX>_API_KEY`, including the 99 whose credential is a MINTED OAuth2
|
|
1446
|
+
* access token that no operator ever types. That name is the row's storage key and it is what a
|
|
1447
|
+
* person sees on their connected-accounts card, so Wonder Todos showed a delegated Asana grant as
|
|
1448
|
+
* `asana · ASANA_API_KEY` — and the first question anybody asked was "why apikey? we did it with
|
|
1449
|
+
* oauth". The name was answering wrongly, and a display-side relabel would have left the storage key
|
|
1450
|
+
* and the environment surface still saying "API key".
|
|
1451
|
+
*
|
|
1452
|
+
* The slot's AUTHORING slug already made the distinction — `accessToken` for OAuth2, `apiKey`
|
|
1453
|
+
* otherwise (see {@link renderSecretsContract}) — so this only brings the env-var name into
|
|
1454
|
+
* agreement with the slug beside it.
|
|
1455
|
+
*
|
|
1456
|
+
* Safe to rename for exactly the reason the slot exists: an OAuth2 vendor's account slot is
|
|
1457
|
+
* `required: false` and documented as "minted by the OAuth2 exchange, not authored", so no
|
|
1458
|
+
* deployment sets it and no operator instruction changes. A credential already stored under the old
|
|
1459
|
+
* name is keyed by it, so a tenant that connected before this reconnects once.
|
|
1460
|
+
*/
|
|
1461
|
+
function accountSecretEnvVarFor(provider, envPrefix) {
|
|
1462
|
+
return provider.auth.kind === TransposedAuthKind.OAUTH2
|
|
1463
|
+
? `${envPrefix}_ACCESS_TOKEN`
|
|
1464
|
+
: `${envPrefix}_API_KEY`;
|
|
1465
|
+
}
|
|
1466
|
+
/** The env-var prefix a vendor's credential takes. One derivation, used by both emitted files. */
|
|
1467
|
+
function envPrefixFor(ref) {
|
|
1468
|
+
return ref.replace(/[^a-zA-Z0-9]+/g, '_').toUpperCase();
|
|
1469
|
+
}
|
|
1470
|
+
/**
|
|
1471
|
+
* What a deployment must actually supply, which differs by credential model.
|
|
1472
|
+
*
|
|
1473
|
+
* For a pasted credential — an API key, a basic password — that is one secret and the runtime reads
|
|
1474
|
+
* it directly. For OAuth2 it is the APPLICATION REGISTRATION (client id and client secret), which an
|
|
1475
|
+
* operator genuinely does paste, plus a slot for the ACCESS TOKEN that an authorization exchange
|
|
1476
|
+
* mints and nobody types. Declaring the token slot as `required: false` is the honest statement:
|
|
1477
|
+
* absent is the normal state until an account is connected, and demanding it at boot would make
|
|
1478
|
+
* every OAuth2 provider un-deployable.
|
|
1479
|
+
*/
|
|
1480
|
+
function renderSecretsContract(provider, secretEnvVar, envPrefix) {
|
|
1481
|
+
if (provider.auth.kind !== TransposedAuthKind.OAUTH2) {
|
|
1482
|
+
return ` apiKey: {
|
|
1483
|
+
envVarName: ${quote(secretEnvVar)},
|
|
1484
|
+
required: true,
|
|
1485
|
+
description: ${quote(`Credential for ${provider.vendor}, transposed as ${provider.auth.kind}.`)},
|
|
1486
|
+
},
|
|
1487
|
+
` + renderBaseUrlSecretSlot(provider, envPrefix);
|
|
1488
|
+
}
|
|
1489
|
+
return ` clientId: {
|
|
1490
|
+
envVarName: ${quote(`${envPrefix}_CLIENT_ID`)},
|
|
1491
|
+
required: true,
|
|
1492
|
+
description: ${quote(`OAuth2 client id for the application's ${provider.vendor} registration.`)},
|
|
1493
|
+
},
|
|
1494
|
+
clientSecret: {
|
|
1495
|
+
envVarName: ${quote(`${envPrefix}_CLIENT_SECRET`)},
|
|
1496
|
+
required: true,
|
|
1497
|
+
description: ${quote(`OAuth2 client secret for the application's ${provider.vendor} registration.`)},
|
|
1498
|
+
},
|
|
1499
|
+
accessToken: {
|
|
1500
|
+
envVarName: ${quote(secretEnvVar)},
|
|
1501
|
+
required: false,
|
|
1502
|
+
description: ${quote(`Access token for ${provider.vendor}. Minted by the OAuth2 exchange, not authored — set it only if ${provider.vendor} issues a long-lived token.`)},
|
|
1503
|
+
},
|
|
1504
|
+
` + renderBaseUrlSecretSlot(provider, envPrefix);
|
|
1505
|
+
}
|
|
1506
|
+
/**
|
|
1507
|
+
* The OAuth2 declaration, emitted as DATA rather than as the JSDoc comment it used to be.
|
|
1508
|
+
*
|
|
1509
|
+
* These endpoints and scopes exist nowhere in this repository except the catalogue that was read.
|
|
1510
|
+
* Extracting them and keeping them in prose meant the delegated-authorization lane would re-derive
|
|
1511
|
+
* 131 vendors' worth of endpoints by hand.
|
|
1512
|
+
*/
|
|
1513
|
+
function renderOAuth2Block(provider, envPrefix) {
|
|
1514
|
+
if (provider.auth.kind !== TransposedAuthKind.OAUTH2 || provider.auth.authUrl === undefined || provider.auth.tokenUrl === undefined) {
|
|
1515
|
+
return '';
|
|
1516
|
+
}
|
|
1517
|
+
const scopes = provider.auth.scopes ?? [];
|
|
1518
|
+
const connectionParameters = collectEndpointPlaceholders([provider.auth.authUrl, provider.auth.tokenUrl]);
|
|
1519
|
+
return ` oauth2: {
|
|
1520
|
+
authorizeUrl: ${quote(provider.auth.authUrl)},
|
|
1521
|
+
tokenUrl: ${quote(provider.auth.tokenUrl)},${scopes.length === 0 ? '' : `
|
|
1522
|
+
scopes: [${scopes.map((scope) => quote(scope)).join(', ')}],`}
|
|
1523
|
+
clientIdSecretRef: ${quote(`${envPrefix}_CLIENT_ID`)},
|
|
1524
|
+
clientSecretSecretRef: ${quote(`${envPrefix}_CLIENT_SECRET`)},${connectionParameters.length === 0 ? '' : `
|
|
1525
|
+
connectionParameters: [${connectionParameters.map((name) => quote(name)).join(', ')}],`}
|
|
1526
|
+
},
|
|
1527
|
+
`;
|
|
1528
|
+
}
|
|
1529
|
+
/**
|
|
1530
|
+
* The `{token}` placeholders an OAuth2 endpoint carries, deduplicated and in first-appearance order.
|
|
1531
|
+
*
|
|
1532
|
+
* Measured over the transposed catalogue on 2026-09-08: 21 of the 96 vendors with both endpoints
|
|
1533
|
+
* carry at least one — `{cloud}` (18), `{location}` (10), `{tenantId}` (6), plus `{region}`,
|
|
1534
|
+
* `{environment}`, `{domain}`, `{baseUrl}`, `{authHost}`, `{apiHost}`. Each names something only the
|
|
1535
|
+
* person connecting the account can supply.
|
|
1536
|
+
*
|
|
1537
|
+
* Deliberately the same brace syntax the operation path templates already use, so one vocabulary
|
|
1538
|
+
* covers both. Deliberately NOT a URL parse: an authorize URL with an unresolved placeholder in its
|
|
1539
|
+
* HOST is not a parseable URL, which is exactly the population this exists to find.
|
|
1540
|
+
*
|
|
1541
|
+
* First-appearance order rather than sorted, because the order a vendor writes them in is the order
|
|
1542
|
+
* they read to a person filling in a form — `{cloud}` then `{tenantId}` is how Microsoft's own
|
|
1543
|
+
* documentation presents them, and re-sorting to `cloud, tenantId` is luck rather than design.
|
|
1544
|
+
*/
|
|
1545
|
+
function collectEndpointPlaceholders(urls) {
|
|
1546
|
+
const names = [];
|
|
1547
|
+
for (const url of urls) {
|
|
1548
|
+
for (const match of url.matchAll(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g)) {
|
|
1549
|
+
const name = match[1];
|
|
1550
|
+
if (!names.includes(name))
|
|
1551
|
+
names.push(name);
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
return names;
|
|
1555
|
+
}
|
|
1556
|
+
/**
|
|
1557
|
+
* Where the credential rides.
|
|
1558
|
+
*
|
|
1559
|
+
* A bearer header is the right default for SECRET_TEXT and OAUTH2 and is what the overwhelming
|
|
1560
|
+
* majority of the catalogue's vendors use; BASIC and CUSTOM are named honestly rather than forced
|
|
1561
|
+
* into it, because a wrong header placement authenticates nothing and the failure reads as a
|
|
1562
|
+
* credential problem rather than a transposition one.
|
|
1563
|
+
*/
|
|
1564
|
+
function authHeaderFor(kind) {
|
|
1565
|
+
switch (kind) {
|
|
1566
|
+
case TransposedAuthKind.OAUTH2:
|
|
1567
|
+
case TransposedAuthKind.SECRET_TEXT:
|
|
1568
|
+
return { name: 'Authorization', prefix: 'Bearer ' };
|
|
1569
|
+
case TransposedAuthKind.BASIC:
|
|
1570
|
+
return { name: 'Authorization', prefix: 'Basic ' };
|
|
1571
|
+
case TransposedAuthKind.CUSTOM:
|
|
1572
|
+
case TransposedAuthKind.NONE:
|
|
1573
|
+
return { name: 'Authorization' };
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
function identifierFor(ref) {
|
|
1577
|
+
return ref
|
|
1578
|
+
.split(/[^a-zA-Z0-9]+/)
|
|
1579
|
+
.filter((part) => part.length > 0)
|
|
1580
|
+
.map((part) => part[0].toUpperCase() + part.slice(1))
|
|
1581
|
+
.join('');
|
|
1582
|
+
}
|
|
1583
|
+
function quote(value) {
|
|
1584
|
+
return JSON.stringify(value);
|
|
1585
|
+
}
|
|
1586
|
+
//# sourceMappingURL=provider-package.emitter.js.map
|