@wildo-ai/wildo-cli 1.1.9 → 1.1.10
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/bin/wildo.js +0 -0
- package/dist/bin/wildo.js.map +1 -1
- package/dist/src/commands/acp/probe.command.d.ts.map +1 -1
- 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/align-deps.command.js.map +1 -1
- package/dist/src/commands/assets/sync.command.d.ts.map +1 -1
- 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/brand/propagate.command.js.map +1 -1
- package/dist/src/commands/build/accept.command.d.ts.map +1 -1
- package/dist/src/commands/build/accept.command.js.map +1 -1
- package/dist/src/commands/build/dispatches.command.d.ts.map +1 -1
- package/dist/src/commands/build/dispatches.command.js.map +1 -1
- package/dist/src/commands/build/next.command.d.ts.map +1 -1
- package/dist/src/commands/build/next.command.js.map +1 -1
- package/dist/src/commands/build/rearm.command.d.ts.map +1 -1
- package/dist/src/commands/build/rearm.command.js.map +1 -1
- package/dist/src/commands/build/run.command.d.ts.map +1 -1
- package/dist/src/commands/build/run.command.js.map +1 -1
- package/dist/src/commands/build/tasks.command.d.ts.map +1 -1
- package/dist/src/commands/build/tasks.command.js.map +1 -1
- package/dist/src/commands/compose.command.d.ts.map +1 -1
- package/dist/src/commands/compose.command.js.map +1 -1
- package/dist/src/commands/config/check-resources.command.d.ts +50 -0
- package/dist/src/commands/config/check-resources.command.d.ts.map +1 -0
- package/dist/src/commands/config/check-resources.command.js +121 -0
- package/dist/src/commands/config/check-resources.command.js.map +1 -0
- package/dist/src/commands/config/data-retention.command.d.ts.map +1 -1
- package/dist/src/commands/config/data-retention.command.js.map +1 -1
- package/dist/src/commands/config/document-releases.command.d.ts.map +1 -1
- package/dist/src/commands/config/document-releases.command.js.map +1 -1
- package/dist/src/commands/config/legal-notice.command.d.ts +17 -0
- package/dist/src/commands/config/legal-notice.command.d.ts.map +1 -0
- package/dist/src/commands/config/legal-notice.command.js +59 -0
- package/dist/src/commands/config/legal-notice.command.js.map +1 -0
- package/dist/src/commands/config/mutate.command.d.ts.map +1 -1
- package/dist/src/commands/config/mutate.command.js.map +1 -1
- package/dist/src/commands/config/reapply-declaration.command.d.ts.map +1 -1
- package/dist/src/commands/config/reapply-declaration.command.js.map +1 -1
- package/dist/src/commands/config/service-consent.command.d.ts.map +1 -1
- package/dist/src/commands/config/service-consent.command.js.map +1 -1
- package/dist/src/commands/config/subject-data-recipients.command.d.ts.map +1 -1
- package/dist/src/commands/config/subject-data-recipients.command.js.map +1 -1
- package/dist/src/commands/config/sync.command.d.ts.map +1 -1
- package/dist/src/commands/config/sync.command.js.map +1 -1
- package/dist/src/commands/config/validate.command.d.ts +8 -0
- package/dist/src/commands/config/validate.command.d.ts.map +1 -1
- package/dist/src/commands/config/validate.command.js +65 -4
- package/dist/src/commands/config/validate.command.js.map +1 -1
- package/dist/src/commands/context/assurance-basis.command.d.ts.map +1 -1
- package/dist/src/commands/context/assurance-basis.command.js.map +1 -1
- package/dist/src/commands/context/coherence.command.d.ts.map +1 -1
- package/dist/src/commands/context/coherence.command.js.map +1 -1
- package/dist/src/commands/context/context-command.utils.d.ts.map +1 -1
- package/dist/src/commands/context/context-command.utils.js.map +1 -1
- package/dist/src/commands/context/elements.command.d.ts.map +1 -1
- package/dist/src/commands/context/elements.command.js.map +1 -1
- package/dist/src/commands/context/health.command.d.ts.map +1 -1
- package/dist/src/commands/context/health.command.js.map +1 -1
- package/dist/src/commands/context/info.command.d.ts.map +1 -1
- package/dist/src/commands/context/info.command.js.map +1 -1
- package/dist/src/commands/context/journey.command.d.ts +8 -2
- package/dist/src/commands/context/journey.command.d.ts.map +1 -1
- package/dist/src/commands/context/journey.command.js +102 -12
- package/dist/src/commands/context/journey.command.js.map +1 -1
- package/dist/src/commands/context/jurisdictions.command.d.ts.map +1 -1
- package/dist/src/commands/context/jurisdictions.command.js.map +1 -1
- package/dist/src/commands/context/launch-blockers.command.d.ts +2 -1
- package/dist/src/commands/context/launch-blockers.command.d.ts.map +1 -1
- package/dist/src/commands/context/launch-blockers.command.js +3 -2
- package/dist/src/commands/context/launch-blockers.command.js.map +1 -1
- package/dist/src/commands/context/list.command.d.ts.map +1 -1
- package/dist/src/commands/context/list.command.js.map +1 -1
- package/dist/src/commands/context/pipelines.command.d.ts.map +1 -1
- package/dist/src/commands/context/pipelines.command.js.map +1 -1
- package/dist/src/commands/context/workspace.command.d.ts.map +1 -1
- package/dist/src/commands/context/workspace.command.js.map +1 -1
- package/dist/src/commands/creation/accept.command.d.ts +4 -0
- package/dist/src/commands/creation/accept.command.d.ts.map +1 -1
- package/dist/src/commands/creation/accept.command.js +29 -4
- package/dist/src/commands/creation/accept.command.js.map +1 -1
- package/dist/src/commands/creation/answer.command.d.ts.map +1 -1
- package/dist/src/commands/creation/answer.command.js.map +1 -1
- package/dist/src/commands/creation/brand-logo.command.d.ts +18 -0
- package/dist/src/commands/creation/brand-logo.command.d.ts.map +1 -0
- package/dist/src/commands/creation/brand-logo.command.js +43 -0
- package/dist/src/commands/creation/brand-logo.command.js.map +1 -0
- package/dist/src/commands/creation/brief.command.d.ts.map +1 -1
- package/dist/src/commands/creation/brief.command.js.map +1 -1
- package/dist/src/commands/creation/deliberate.command.d.ts +2 -2
- package/dist/src/commands/creation/deliberate.command.d.ts.map +1 -1
- package/dist/src/commands/creation/deliberate.command.js +2 -2
- package/dist/src/commands/creation/deliberate.command.js.map +1 -1
- package/dist/src/commands/creation/depth.command.d.ts.map +1 -1
- package/dist/src/commands/creation/depth.command.js +1 -1
- package/dist/src/commands/creation/depth.command.js.map +1 -1
- package/dist/src/commands/creation/diff.command.d.ts.map +1 -1
- package/dist/src/commands/creation/diff.command.js.map +1 -1
- package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
- package/dist/src/commands/creation/feed.command.js.map +1 -1
- package/dist/src/commands/creation/loop.command.d.ts.map +1 -1
- package/dist/src/commands/creation/loop.command.js.map +1 -1
- package/dist/src/commands/creation/persona.command.d.ts +3 -2
- package/dist/src/commands/creation/persona.command.d.ts.map +1 -1
- package/dist/src/commands/creation/persona.command.js +10 -3
- package/dist/src/commands/creation/persona.command.js.map +1 -1
- package/dist/src/commands/creation/preflight.command.d.ts.map +1 -1
- package/dist/src/commands/creation/preflight.command.js.map +1 -1
- package/dist/src/commands/creation/prompt-hook.command.d.ts.map +1 -1
- package/dist/src/commands/creation/prompt-hook.command.js.map +1 -1
- package/dist/src/commands/creation/propose.command.d.ts.map +1 -1
- package/dist/src/commands/creation/propose.command.js.map +1 -1
- package/dist/src/commands/creation/pulse.command.d.ts.map +1 -1
- package/dist/src/commands/creation/pulse.command.js.map +1 -1
- package/dist/src/commands/creation/questions.command.d.ts.map +1 -1
- package/dist/src/commands/creation/questions.command.js.map +1 -1
- package/dist/src/commands/creation/reason.command.d.ts.map +1 -1
- package/dist/src/commands/creation/reason.command.js.map +1 -1
- package/dist/src/commands/creation/report.command.d.ts.map +1 -1
- package/dist/src/commands/creation/report.command.js.map +1 -1
- package/dist/src/commands/creation/revert.command.d.ts.map +1 -1
- package/dist/src/commands/creation/revert.command.js.map +1 -1
- package/dist/src/commands/creation/run.command.d.ts.map +1 -1
- package/dist/src/commands/creation/run.command.js.map +1 -1
- package/dist/src/commands/creation/statusline.command.d.ts.map +1 -1
- package/dist/src/commands/creation/statusline.command.js.map +1 -1
- package/dist/src/commands/creation/watch.command.d.ts.map +1 -1
- package/dist/src/commands/creation/watch.command.js.map +1 -1
- package/dist/src/commands/creation/why.command.d.ts +3 -1
- package/dist/src/commands/creation/why.command.d.ts.map +1 -1
- package/dist/src/commands/creation/why.command.js +28 -9
- package/dist/src/commands/creation/why.command.js.map +1 -1
- package/dist/src/commands/creation/writes.command.d.ts.map +1 -1
- package/dist/src/commands/creation/writes.command.js.map +1 -1
- package/dist/src/commands/db/db-schema-plan-migration.utils.d.ts.map +1 -1
- package/dist/src/commands/db/db-schema-plan-migration.utils.js.map +1 -1
- package/dist/src/commands/db/db-schema-plan.utils.d.ts.map +1 -1
- package/dist/src/commands/db/db-schema-plan.utils.js.map +1 -1
- package/dist/src/commands/db/diff.command.d.ts.map +1 -1
- package/dist/src/commands/db/diff.command.js.map +1 -1
- package/dist/src/commands/db/generate.command.d.ts.map +1 -1
- package/dist/src/commands/db/generate.command.js.map +1 -1
- package/dist/src/commands/db/migrate.command.d.ts.map +1 -1
- package/dist/src/commands/db/migrate.command.js.map +1 -1
- package/dist/src/commands/db/resolve.command.d.ts.map +1 -1
- package/dist/src/commands/db/resolve.command.js.map +1 -1
- package/dist/src/commands/dev/charts-audit.command.d.ts.map +1 -1
- 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-generate.command.js.map +1 -1
- package/dist/src/commands/dev/design-tokens-init.command.d.ts.map +1 -1
- package/dist/src/commands/dev/design-tokens-init.command.js.map +1 -1
- package/dist/src/commands/dev/design-tokens-validate.command.d.ts.map +1 -1
- package/dist/src/commands/dev/design-tokens-validate.command.js.map +1 -1
- package/dist/src/commands/dev/force-stop.command.d.ts.map +1 -1
- package/dist/src/commands/dev/force-stop.command.js.map +1 -1
- package/dist/src/commands/dev/resources.command.d.ts.map +1 -1
- package/dist/src/commands/dev/resources.command.js.map +1 -1
- package/dist/src/commands/dev/start.command.d.ts.map +1 -1
- 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/stop-all.command.js.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.map +1 -1
- package/dist/src/commands/docs/publish.command.d.ts.map +1 -1
- package/dist/src/commands/docs/publish.command.js.map +1 -1
- package/dist/src/commands/frontend/publish.command.d.ts.map +1 -1
- package/dist/src/commands/frontend/publish.command.js.map +1 -1
- package/dist/src/commands/fwk/audit.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/audit.command.js.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.map +1 -1
- package/dist/src/commands/fwk/generate-docs.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/generate-docs.command.js.map +1 -1
- package/dist/src/commands/fwk/generate-providers.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/generate-providers.command.js.map +1 -1
- package/dist/src/commands/fwk/graph.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/graph.command.js.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
- package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
- package/dist/src/commands/fwk/publish-npm.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-npm.command.js.map +1 -1
- package/dist/src/commands/fwk/version-bump.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/version-bump.command.js.map +1 -1
- package/dist/src/commands/fwk/version-set.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/version-set.command.js.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.map +1 -1
- package/dist/src/commands/fwk/version-sync.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/version-sync.command.js.map +1 -1
- package/dist/src/commands/fwk/what-touches.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/what-touches.command.js.map +1 -1
- package/dist/src/commands/fwk/wt-status.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/wt-status.command.js.map +1 -1
- package/dist/src/commands/fwk/wt-tail.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/wt-tail.command.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.map +1 -1
- package/dist/src/commands/generate/email-preview.command.d.ts.map +1 -1
- 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-status.command.js.map +1 -1
- package/dist/src/commands/generate/email-test-send.command.d.ts.map +1 -1
- package/dist/src/commands/generate/email-test-send.command.js.map +1 -1
- package/dist/src/commands/generate/email-translate.command.d.ts.map +1 -1
- package/dist/src/commands/generate/email-translate.command.js.map +1 -1
- package/dist/src/commands/generate/email.command.d.ts.map +1 -1
- package/dist/src/commands/generate/email.command.js.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.map +1 -1
- package/dist/src/commands/generate/labels-plan.command.d.ts.map +1 -1
- package/dist/src/commands/generate/labels-plan.command.js.map +1 -1
- package/dist/src/commands/generate/labels.command.d.ts.map +1 -1
- package/dist/src/commands/generate/labels.command.js.map +1 -1
- package/dist/src/commands/generate/translate.command.d.ts.map +1 -1
- package/dist/src/commands/generate/translate.command.js.map +1 -1
- package/dist/src/commands/help.command.d.ts.map +1 -1
- package/dist/src/commands/help.command.js.map +1 -1
- package/dist/src/commands/init.command.d.ts.map +1 -1
- package/dist/src/commands/init.command.js.map +1 -1
- package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
- package/dist/src/commands/local/deregister.command.js.map +1 -1
- package/dist/src/commands/local/dev-status.command.d.ts.map +1 -1
- package/dist/src/commands/local/dev-status.command.js.map +1 -1
- package/dist/src/commands/local/dev.command.d.ts.map +1 -1
- package/dist/src/commands/local/dev.command.js.map +1 -1
- package/dist/src/commands/local/doctor.command.d.ts.map +1 -1
- 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/down.command.js.map +1 -1
- package/dist/src/commands/local/init.command.d.ts.map +1 -1
- 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/logs.command.js.map +1 -1
- package/dist/src/commands/local/reinit.command.d.ts.map +1 -1
- package/dist/src/commands/local/reinit.command.js.map +1 -1
- package/dist/src/commands/local/reset.command.d.ts.map +1 -1
- package/dist/src/commands/local/reset.command.js.map +1 -1
- package/dist/src/commands/local/restore.command.d.ts.map +1 -1
- package/dist/src/commands/local/restore.command.js.map +1 -1
- package/dist/src/commands/local/smoke.command.d.ts.map +1 -1
- package/dist/src/commands/local/smoke.command.js.map +1 -1
- package/dist/src/commands/local/status.command.d.ts.map +1 -1
- package/dist/src/commands/local/status.command.js.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/local-defaults/capture.command.d.ts.map +1 -1
- package/dist/src/commands/local-defaults/capture.command.js.map +1 -1
- package/dist/src/commands/lock/check.command.d.ts.map +1 -1
- package/dist/src/commands/lock/check.command.js.map +1 -1
- package/dist/src/commands/market/generate.command.d.ts.map +1 -1
- package/dist/src/commands/market/generate.command.js.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.map +1 -1
- package/dist/src/commands/prefs/set.command.d.ts.map +1 -1
- package/dist/src/commands/prefs/set.command.js.map +1 -1
- package/dist/src/commands/providers/show.command.d.ts.map +1 -1
- package/dist/src/commands/providers/show.command.js.map +1 -1
- package/dist/src/commands/registry/add.command.d.ts.map +1 -1
- package/dist/src/commands/registry/add.command.js.map +1 -1
- package/dist/src/commands/registry/info.command.d.ts.map +1 -1
- package/dist/src/commands/registry/info.command.js.map +1 -1
- package/dist/src/commands/registry/key.command.d.ts.map +1 -1
- package/dist/src/commands/registry/key.command.js.map +1 -1
- package/dist/src/commands/registry/lockfile-smoke.command.d.ts.map +1 -1
- package/dist/src/commands/registry/lockfile-smoke.command.js.map +1 -1
- package/dist/src/commands/registry/login.command.d.ts.map +1 -1
- 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/logout.command.js.map +1 -1
- package/dist/src/commands/registry/outdated.command.d.ts.map +1 -1
- package/dist/src/commands/registry/outdated.command.js.map +1 -1
- package/dist/src/commands/registry/ping.command.d.ts.map +1 -1
- package/dist/src/commands/registry/ping.command.js.map +1 -1
- package/dist/src/commands/registry/publish.command.d.ts.map +1 -1
- package/dist/src/commands/registry/publish.command.js.map +1 -1
- package/dist/src/commands/registry/registry-transport.constants.d.ts.map +1 -1
- package/dist/src/commands/registry/registry-transport.constants.js.map +1 -1
- package/dist/src/commands/registry/remove.command.d.ts.map +1 -1
- package/dist/src/commands/registry/remove.command.js.map +1 -1
- package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
- package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
- package/dist/src/commands/registry/search.command.d.ts.map +1 -1
- package/dist/src/commands/registry/search.command.js.map +1 -1
- package/dist/src/commands/registry/status.command.d.ts.map +1 -1
- package/dist/src/commands/registry/status.command.js.map +1 -1
- package/dist/src/commands/registry/update.command.d.ts.map +1 -1
- package/dist/src/commands/registry/update.command.js.map +1 -1
- package/dist/src/commands/registry/whoami.command.d.ts.map +1 -1
- package/dist/src/commands/registry/whoami.command.js.map +1 -1
- package/dist/src/commands/registry/yank.command.d.ts.map +1 -1
- package/dist/src/commands/registry/yank.command.js.map +1 -1
- package/dist/src/commands/remote/create.command.d.ts.map +1 -1
- package/dist/src/commands/remote/create.command.js.map +1 -1
- package/dist/src/commands/remote/list.command.d.ts.map +1 -1
- package/dist/src/commands/remote/list.command.js.map +1 -1
- package/dist/src/commands/remote/status.command.d.ts.map +1 -1
- package/dist/src/commands/remote/status.command.js.map +1 -1
- package/dist/src/commands/remote/sync.command.d.ts.map +1 -1
- package/dist/src/commands/remote/sync.command.js.map +1 -1
- package/dist/src/commands/secrets/github.command.d.ts.map +1 -1
- package/dist/src/commands/secrets/github.command.js.map +1 -1
- package/dist/src/commands/secrets/list.command.d.ts.map +1 -1
- package/dist/src/commands/secrets/list.command.js.map +1 -1
- package/dist/src/commands/secrets/set.command.d.ts.map +1 -1
- package/dist/src/commands/secrets/set.command.js.map +1 -1
- package/dist/src/commands/secrets/unset.command.d.ts.map +1 -1
- package/dist/src/commands/secrets/unset.command.js.map +1 -1
- package/dist/src/commands/setup.command.d.ts.map +1 -1
- package/dist/src/commands/setup.command.js.map +1 -1
- package/dist/src/commands/update.command.d.ts.map +1 -1
- package/dist/src/commands/update.command.js.map +1 -1
- package/dist/src/commands/version.command.d.ts.map +1 -1
- package/dist/src/commands/version.command.js.map +1 -1
- package/dist/src/commands/website/audit.command.d.ts.map +1 -1
- package/dist/src/commands/website/audit.command.js.map +1 -1
- package/dist/src/commands/workbench/open.command.d.ts.map +1 -1
- package/dist/src/commands/workbench/open.command.js.map +1 -1
- package/dist/src/commands/workbench/parallelism.command.d.ts.map +1 -1
- package/dist/src/commands/workbench/parallelism.command.js.map +1 -1
- package/dist/src/commands/workbench/status.command.d.ts.map +1 -1
- package/dist/src/commands/workbench/status.command.js.map +1 -1
- package/dist/src/infrastructure/errors/error.utils.d.ts.map +1 -1
- package/dist/src/infrastructure/errors/error.utils.js.map +1 -1
- package/dist/src/infrastructure/io/file.utils.d.ts.map +1 -1
- package/dist/src/infrastructure/io/file.utils.js.map +1 -1
- package/dist/src/infrastructure/io/io.schemas.d.ts.map +1 -1
- package/dist/src/infrastructure/io/io.schemas.js.map +1 -1
- package/dist/src/infrastructure/io/template-processor.d.ts.map +1 -1
- package/dist/src/infrastructure/io/template-processor.js.map +1 -1
- package/dist/src/infrastructure/logger/logger.service.d.ts.map +1 -1
- package/dist/src/infrastructure/logger/logger.service.js.map +1 -1
- package/dist/src/infrastructure/process/spawn.utils.d.ts.map +1 -1
- package/dist/src/infrastructure/process/spawn.utils.js.map +1 -1
- package/dist/src/infrastructure/ui/formatting.service.d.ts.map +1 -1
- package/dist/src/infrastructure/ui/formatting.service.js.map +1 -1
- package/dist/src/infrastructure/ui/interaction-engine.service.d.ts.map +1 -1
- package/dist/src/infrastructure/ui/interaction-engine.service.js.map +1 -1
- package/dist/src/infrastructure/ui/markdown-renderer.service.d.ts.map +1 -1
- package/dist/src/infrastructure/ui/markdown-renderer.service.js.map +1 -1
- package/dist/src/infrastructure/ui/ui.schemas.d.ts.map +1 -1
- package/dist/src/infrastructure/ui/ui.schemas.js.map +1 -1
- package/dist/src/infrastructure/utils/string.utils.d.ts.map +1 -1
- package/dist/src/infrastructure/utils/string.utils.js.map +1 -1
- package/dist/src/infrastructure/validation/validator.service.d.ts.map +1 -1
- package/dist/src/infrastructure/validation/validator.service.js.map +1 -1
- package/dist/src/kernel/base-command.d.ts.map +1 -1
- package/dist/src/kernel/base-command.js.map +1 -1
- package/dist/src/kernel/bootstrap.d.ts.map +1 -1
- package/dist/src/kernel/bootstrap.js.map +1 -1
- package/dist/src/kernel/command-index-cache.d.ts.map +1 -1
- package/dist/src/kernel/command-index-cache.js.map +1 -1
- package/dist/src/kernel/command-registry.d.ts.map +1 -1
- 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-runner.js.map +1 -1
- package/dist/src/kernel/command-scope-utils.d.ts.map +1 -1
- package/dist/src/kernel/command-scope-utils.js.map +1 -1
- package/dist/src/kernel/flag-utils.d.ts.map +1 -1
- package/dist/src/kernel/flag-utils.js.map +1 -1
- package/dist/src/kernel/hooks.d.ts.map +1 -1
- package/dist/src/kernel/hooks.js.map +1 -1
- package/dist/src/kernel/logger.d.ts.map +1 -1
- package/dist/src/kernel/logger.js.map +1 -1
- package/dist/src/kernel/types.d.ts.map +1 -1
- package/dist/src/kernel/types.js.map +1 -1
- package/dist/src/main.d.ts.map +1 -1
- package/dist/src/main.js.map +1 -1
- package/dist/src/modules/domain/credentials/admin-user.module.d.ts.map +1 -1
- package/dist/src/modules/domain/credentials/admin-user.module.js.map +1 -1
- package/dist/src/modules/domain/credentials/approver-user.module.d.ts.map +1 -1
- package/dist/src/modules/domain/credentials/approver-user.module.js.map +1 -1
- package/dist/src/modules/domain/credentials/creation-essentials.module.d.ts.map +1 -1
- package/dist/src/modules/domain/credentials/creation-essentials.module.js.map +1 -1
- package/dist/src/modules/domain/credentials/module.types.d.ts.map +1 -1
- package/dist/src/modules/domain/credentials/module.types.js.map +1 -1
- package/dist/src/modules/domain/environment/database-config.module.d.ts.map +1 -1
- package/dist/src/modules/domain/environment/database-config.module.js.map +1 -1
- package/dist/src/modules/domain/environment/module.types.d.ts.map +1 -1
- package/dist/src/modules/domain/environment/module.types.js.map +1 -1
- package/dist/src/modules/domain/environment/paths-config.module.d.ts.map +1 -1
- package/dist/src/modules/domain/environment/paths-config.module.js.map +1 -1
- package/dist/src/modules/domain/environment/runtime-selector.module.d.ts.map +1 -1
- package/dist/src/modules/domain/environment/runtime-selector.module.js.map +1 -1
- package/dist/src/modules/domain/environment/runtime-semantics.module.d.ts.map +1 -1
- package/dist/src/modules/domain/environment/runtime-semantics.module.js.map +1 -1
- package/dist/src/modules/domain/module.types.d.ts.map +1 -1
- package/dist/src/modules/domain/module.types.js.map +1 -1
- package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
- 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-env.service.js.map +1 -1
- package/dist/src/services/application/app-local-runtime-addresses.service.d.ts.map +1 -1
- package/dist/src/services/application/app-local-runtime-addresses.service.js.map +1 -1
- package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
- package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
- package/dist/src/services/application/app-schema-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/app-schema-bootstrap.service.js.map +1 -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.map +1 -1
- package/dist/src/services/application/application-browser-smoke.service.d.ts.map +1 -1
- package/dist/src/services/application/application-browser-smoke.service.js.map +1 -1
- package/dist/src/services/application/application-creation-readiness.service.d.ts.map +1 -1
- package/dist/src/services/application/application-creation-readiness.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-dependency-alignment.service.js.map +1 -1
- package/dist/src/services/application/application-dev-port-offsets.d.ts.map +1 -1
- package/dist/src/services/application/application-dev-port-offsets.js.map +1 -1
- package/dist/src/services/application/application-initialization-verification.service.d.ts.map +1 -1
- package/dist/src/services/application/application-initialization-verification.service.js.map +1 -1
- package/dist/src/services/application/application-root.utils.d.ts.map +1 -1
- package/dist/src/services/application/application-root.utils.js.map +1 -1
- package/dist/src/services/application/application-runtime-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/application-runtime-bootstrap.service.js.map +1 -1
- package/dist/src/services/application/backend-config.paths.d.ts.map +1 -1
- package/dist/src/services/application/backend-config.paths.js.map +1 -1
- package/dist/src/services/application/composition-provider-plan.service.d.ts.map +1 -1
- package/dist/src/services/application/composition-provider-plan.service.js.map +1 -1
- package/dist/src/services/application/creation-host-readiness.service.d.ts.map +1 -1
- package/dist/src/services/application/creation-host-readiness.service.js.map +1 -1
- package/dist/src/services/application/creation-preflight.service.d.ts.map +1 -1
- package/dist/src/services/application/creation-preflight.service.js.map +1 -1
- package/dist/src/services/application/degraded-registration-declaration-convergence.service.d.ts.map +1 -1
- package/dist/src/services/application/degraded-registration-declaration-convergence.service.js.map +1 -1
- package/dist/src/services/application/dev-orchestrator.service.d.ts.map +1 -1
- package/dist/src/services/application/dev-orchestrator.service.js.map +1 -1
- package/dist/src/services/application/dev-schema-drift.service.d.ts.map +1 -1
- package/dist/src/services/application/dev-schema-drift.service.js.map +1 -1
- package/dist/src/services/application/environment-provider-configurations.service.d.ts.map +1 -1
- package/dist/src/services/application/environment-provider-configurations.service.js.map +1 -1
- package/dist/src/services/application/existing-app-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/existing-app-bootstrap.service.js.map +1 -1
- package/dist/src/services/application/frontend-provider-source.service.d.ts.map +1 -1
- package/dist/src/services/application/frontend-provider-source.service.js.map +1 -1
- package/dist/src/services/application/frontend-public-config-secret-screen.service.d.ts.map +1 -1
- package/dist/src/services/application/frontend-public-config-secret-screen.service.js.map +1 -1
- package/dist/src/services/application/local-app-reinit.service.d.ts.map +1 -1
- package/dist/src/services/application/local-app-reinit.service.js.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.map +1 -1
- package/dist/src/services/application/provider-package-links.service.d.ts.map +1 -1
- package/dist/src/services/application/provider-package-links.service.js.map +1 -1
- package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
- 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.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.map +1 -1
- package/dist/src/services/application/stored-declaration-currency.service.d.ts.map +1 -1
- package/dist/src/services/application/stored-declaration-currency.service.js.map +1 -1
- package/dist/src/services/application/systems-of-record-library.service.d.ts.map +1 -1
- package/dist/src/services/application/systems-of-record-library.service.js.map +1 -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.map +1 -1
- package/dist/src/services/catalog/service-catalog.schemas.d.ts.map +1 -1
- package/dist/src/services/catalog/service-catalog.schemas.js.map +1 -1
- 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.map +1 -1
- package/dist/src/services/coding-agents/coding-agent-login.service.d.ts.map +1 -1
- package/dist/src/services/coding-agents/coding-agent-login.service.js.map +1 -1
- package/dist/src/services/companion/build-console.service.d.ts +62 -2
- package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
- package/dist/src/services/companion/build-console.service.js +70 -5
- package/dist/src/services/companion/build-console.service.js.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.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.map +1 -1
- package/dist/src/services/companion/companion-health-hint.utils.d.ts.map +1 -1
- package/dist/src/services/companion/companion-health-hint.utils.js.map +1 -1
- package/dist/src/services/companion/companion-lifecycle.service.d.ts.map +1 -1
- package/dist/src/services/companion/companion-lifecycle.service.js.map +1 -1
- package/dist/src/services/companion/companion-local-token.utils.d.ts.map +1 -1
- package/dist/src/services/companion/companion-local-token.utils.js.map +1 -1
- 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/console-fast-path.d.ts +21 -3
- package/dist/src/services/companion/console-fast-path.d.ts.map +1 -1
- package/dist/src/services/companion/console-fast-path.js +57 -12
- package/dist/src/services/companion/console-fast-path.js.map +1 -1
- package/dist/src/services/companion/console-verb.utils.d.ts.map +1 -1
- package/dist/src/services/companion/console-verb.utils.js.map +1 -1
- package/dist/src/services/companion/creation-console.service.d.ts +76 -0
- package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
- package/dist/src/services/companion/creation-console.service.js +124 -11
- package/dist/src/services/companion/creation-console.service.js.map +1 -1
- package/dist/src/services/companion/creation-run-report.models.d.ts.map +1 -1
- package/dist/src/services/companion/creation-run-report.models.js.map +1 -1
- package/dist/src/services/companion/git-helper.service.d.ts.map +1 -1
- package/dist/src/services/companion/git-helper.service.js.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.map +1 -1
- package/dist/src/services/companion/workbench-browser-launcher.service.d.ts.map +1 -1
- package/dist/src/services/companion/workbench-browser-launcher.service.js.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.map +1 -1
- package/dist/src/services/compliance/data-retention-schedule.generator.d.ts.map +1 -1
- package/dist/src/services/compliance/data-retention-schedule.generator.js.map +1 -1
- package/dist/src/services/compliance/generated-compliance-module-wiring.d.ts +5 -3
- package/dist/src/services/compliance/generated-compliance-module-wiring.d.ts.map +1 -1
- package/dist/src/services/compliance/generated-compliance-module-wiring.js +4 -2
- package/dist/src/services/compliance/generated-compliance-module-wiring.js.map +1 -1
- package/dist/src/services/compliance/governed-document-releases.generator.d.ts.map +1 -1
- package/dist/src/services/compliance/governed-document-releases.generator.js.map +1 -1
- package/dist/src/services/compliance/legal-notice.generator.d.ts +45 -0
- package/dist/src/services/compliance/legal-notice.generator.d.ts.map +1 -0
- package/dist/src/services/compliance/legal-notice.generator.js +97 -0
- package/dist/src/services/compliance/legal-notice.generator.js.map +1 -0
- package/dist/src/services/compliance/service-consent-requirement.generator.d.ts.map +1 -1
- package/dist/src/services/compliance/service-consent-requirement.generator.js.map +1 -1
- package/dist/src/services/compliance/subject-data-recipients.generator.d.ts.map +1 -1
- package/dist/src/services/compliance/subject-data-recipients.generator.js.map +1 -1
- package/dist/src/services/context/context-manager.service.d.ts.map +1 -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/context.schemas.js.map +1 -1
- package/dist/src/services/context/machine-preferences.writer.d.ts.map +1 -1
- package/dist/src/services/context/machine-preferences.writer.js.map +1 -1
- package/dist/src/services/context/state-manager.service.d.ts.map +1 -1
- package/dist/src/services/context/state-manager.service.js.map +1 -1
- package/dist/src/services/credentials/application-secret-owners.service.d.ts.map +1 -1
- package/dist/src/services/credentials/application-secret-owners.service.js.map +1 -1
- package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
- package/dist/src/services/credentials/application-secrets.service.js.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.map +1 -1
- package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
- package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
- package/dist/src/services/credentials/credentials.schemas.d.ts.map +1 -1
- 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/credentials.service.js.map +1 -1
- package/dist/src/services/credentials/framework-managed-secrets.d.ts.map +1 -1
- package/dist/src/services/credentials/framework-managed-secrets.js.map +1 -1
- package/dist/src/services/credentials/local-defaults.service.d.ts.map +1 -1
- package/dist/src/services/credentials/local-defaults.service.js.map +1 -1
- package/dist/src/services/credentials/local-secrets-store.service.d.ts.map +1 -1
- package/dist/src/services/credentials/local-secrets-store.service.js.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
- package/dist/src/services/credentials/provider-secret-format.d.ts.map +1 -1
- package/dist/src/services/credentials/provider-secret-format.js.map +1 -1
- package/dist/src/services/credentials/remote-secrets-store.service.d.ts.map +1 -1
- package/dist/src/services/credentials/remote-secrets-store.service.js.map +1 -1
- package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
- package/dist/src/services/credentials/secrets-provisioning.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-provisioning.service.js.map +1 -1
- package/dist/src/services/credentials/secrets-reader.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-reader.service.js.map +1 -1
- package/dist/src/services/credentials/secrets-rotation.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-rotation.service.js.map +1 -1
- package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-writer.service.js.map +1 -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.map +1 -1
- package/dist/src/services/data-services/data-services.service.d.ts.map +1 -1
- package/dist/src/services/data-services/data-services.service.js.map +1 -1
- package/dist/src/services/deployment/apps-manager-diagnostics.service.d.ts.map +1 -1
- package/dist/src/services/deployment/apps-manager-diagnostics.service.js.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.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.map +1 -1
- package/dist/src/services/deployment/docker/backing-service-health-watch.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/backing-service-health-watch.js.map +1 -1
- package/dist/src/services/deployment/docker/compose-service-health.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/compose-service-health.js.map +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.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-compose-readiness.service.js.map +1 -1
- package/dist/src/services/deployment/docker/docker.schemas.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker.schemas.js.map +1 -1
- package/dist/src/services/deployment/docker/docker.service.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker.service.js.map +1 -1
- package/dist/src/services/deployment/docker/local-data-adoption.service.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/local-data-adoption.service.js.map +1 -1
- package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts.map +1 -1
- package/dist/src/services/deployment/host-toolchain-readiness.service.js.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.map +1 -1
- package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-bootstrap.service.d.ts.map +1 -1
- 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-local-infra-readiness.service.js.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.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
- 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-operations.service.js.map +1 -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.map +1 -1
- package/dist/src/services/deployment/k8s/k8s.schemas.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s.schemas.js.map +1 -1
- package/dist/src/services/deployment/k8s/kind.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/kind.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/local-k8s-application-pruning.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/local-k8s-application-pruning.service.js.map +1 -1
- package/dist/src/services/deployment/local-dev-observer-lifecycle.d.ts.map +1 -1
- package/dist/src/services/deployment/local-dev-observer-lifecycle.js.map +1 -1
- package/dist/src/services/deployment/local-dev-output-boundary.d.ts.map +1 -1
- package/dist/src/services/deployment/local-dev-output-boundary.js.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-session-lease.service.js.map +1 -1
- package/dist/src/services/deployment/local-dev-shutdown-coordinator.d.ts.map +1 -1
- package/dist/src/services/deployment/local-dev-shutdown-coordinator.js.map +1 -1
- package/dist/src/services/deployment/local-infrastructure-initialization.service.d.ts.map +1 -1
- package/dist/src/services/deployment/local-infrastructure-initialization.service.js.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.schemas.js.map +1 -1
- package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
- 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/local-runtime-process-cleanup.service.js.map +1 -1
- package/dist/src/services/deployment/platform-lifecycle.service.d.ts.map +1 -1
- package/dist/src/services/deployment/platform-lifecycle.service.js.map +1 -1
- package/dist/src/services/deployment/platform-runtime-policy.service.d.ts.map +1 -1
- package/dist/src/services/deployment/platform-runtime-policy.service.js.map +1 -1
- package/dist/src/services/deployment/version-compare.utils.d.ts.map +1 -1
- package/dist/src/services/deployment/version-compare.utils.js.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-command.service.js.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.service.js.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-config.template.js.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-css-block.service.js.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-paths.service.js.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.constants.js.map +1 -1
- package/dist/src/services/design-tokens/design-tokens.models.d.ts.map +1 -1
- package/dist/src/services/design-tokens/design-tokens.models.js.map +1 -1
- package/dist/src/services/environment/application-backing-service-addressing.utils.d.ts.map +1 -1
- package/dist/src/services/environment/application-backing-service-addressing.utils.js.map +1 -1
- package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
- package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
- 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-hydration.utils.js.map +1 -1
- package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
- package/dist/src/services/environment/environment-paths.service.d.ts.map +1 -1
- 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-registry.service.js.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.map +1 -1
- package/dist/src/services/environment/environment.schemas.d.ts.map +1 -1
- package/dist/src/services/environment/environment.schemas.js.map +1 -1
- package/dist/src/services/environment/environment.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment.service.js.map +1 -1
- package/dist/src/services/environment/hosted-infrastructure-leftovers.service.d.ts.map +1 -1
- package/dist/src/services/environment/hosted-infrastructure-leftovers.service.js.map +1 -1
- package/dist/src/services/environment/infrastructure-host.service.d.ts.map +1 -1
- package/dist/src/services/environment/infrastructure-host.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-engine-change.utils.js.map +1 -1
- package/dist/src/services/environment/platform-runtime-state.service.d.ts.map +1 -1
- package/dist/src/services/environment/platform-runtime-state.service.js.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/environment/runtime-bootstrap.service.js.map +1 -1
- package/dist/src/services/framework/application-claude-settings.d.ts +39 -5
- package/dist/src/services/framework/application-claude-settings.d.ts.map +1 -1
- package/dist/src/services/framework/application-claude-settings.js +100 -25
- package/dist/src/services/framework/application-claude-settings.js.map +1 -1
- package/dist/src/services/framework/application-rule-imports.d.ts.map +1 -1
- package/dist/src/services/framework/application-rule-imports.js.map +1 -1
- package/dist/src/services/framework/claude-plugin-compiler.d.ts.map +1 -1
- package/dist/src/services/framework/claude-plugin-compiler.js +3 -2
- package/dist/src/services/framework/claude-plugin-compiler.js.map +1 -1
- package/dist/src/services/framework/dev-compile-status.paths.d.ts.map +1 -1
- package/dist/src/services/framework/dev-compile-status.paths.js.map +1 -1
- 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.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-application-guidance.validator.js.map +1 -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.map +1 -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.map +1 -1
- package/dist/src/services/framework/framework-knowledge-scan.constants.d.ts.map +1 -1
- package/dist/src/services/framework/framework-knowledge-scan.constants.js.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.map +1 -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.map +1 -1
- package/dist/src/services/framework/framework-release.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-release.service.js.map +1 -1
- package/dist/src/services/framework/framework-update.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-update.service.js.map +1 -1
- package/dist/src/services/framework/framework-version.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-version.service.js.map +1 -1
- package/dist/src/services/framework/frontend-component-catalog.generator.d.ts.map +1 -1
- package/dist/src/services/framework/frontend-component-catalog.generator.js.map +1 -1
- package/dist/src/services/framework/frontend-library-root-exports.d.ts.map +1 -1
- package/dist/src/services/framework/frontend-library-root-exports.js.map +1 -1
- package/dist/src/services/framework/installed-framework-assets.service.d.ts.map +1 -1
- package/dist/src/services/framework/installed-framework-assets.service.js.map +1 -1
- package/dist/src/services/framework/npm-registry-output.d.ts.map +1 -1
- package/dist/src/services/framework/npm-registry-output.js.map +1 -1
- package/dist/src/services/framework/package-install.service.d.ts.map +1 -1
- package/dist/src/services/framework/package-install.service.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/activepieces-source.reader.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/activepieces-source.reader.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/api-version-settlement.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/api-version-settlement.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/base-url-settlement.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/base-url-settlement.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/openapi-enrichment.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/openapi-enrichment.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/openapi-source.reader.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/openapi-source.reader.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-catalogue-record.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-catalogue-record.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-merge.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-merge.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-package.emitter.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-package.emitter.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/request-helper-url.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/request-helper-url.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/sim-source.reader.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/sim-source.reader.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/source-static-evaluator.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/source-static-evaluator.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/transposed-provider.model.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/transposed-provider.model.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/url-template.extractor.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/url-template.extractor.js.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.map +1 -1
- package/dist/src/services/frontend/frontend-dist-uploader.service.d.ts.map +1 -1
- package/dist/src/services/frontend/frontend-dist-uploader.service.js.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.map +1 -1
- package/dist/src/services/generation/domain-generator.service.d.ts.map +1 -1
- package/dist/src/services/generation/domain-generator.service.js.map +1 -1
- package/dist/src/services/generation/generator.schemas.d.ts.map +1 -1
- package/dist/src/services/generation/generator.schemas.js.map +1 -1
- package/dist/src/services/generation/operation-generator.service.d.ts.map +1 -1
- package/dist/src/services/generation/operation-generator.service.js.map +1 -1
- package/dist/src/services/generation/resource-generator.service.d.ts.map +1 -1
- package/dist/src/services/generation/resource-generator.service.js.map +1 -1
- package/dist/src/services/generation/template-registry.service.d.ts.map +1 -1
- package/dist/src/services/generation/template-registry.service.js.map +1 -1
- package/dist/src/services/registry/artifact-extractor.utils.d.ts.map +1 -1
- package/dist/src/services/registry/artifact-extractor.utils.js.map +1 -1
- package/dist/src/services/registry/artifact-trust.utils.d.ts.map +1 -1
- package/dist/src/services/registry/artifact-trust.utils.js.map +1 -1
- package/dist/src/services/registry/boundary-fanout.utils.d.ts.map +1 -1
- package/dist/src/services/registry/boundary-fanout.utils.js.map +1 -1
- package/dist/src/services/registry/git-ignored-paths.utils.d.ts.map +1 -1
- package/dist/src/services/registry/git-ignored-paths.utils.js.map +1 -1
- package/dist/src/services/registry/index.d.ts.map +1 -1
- package/dist/src/services/registry/index.js.map +1 -1
- package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
- package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
- package/dist/src/services/registry/local-checkout-module-source.service.d.ts.map +1 -1
- package/dist/src/services/registry/local-checkout-module-source.service.js.map +1 -1
- package/dist/src/services/registry/migration-obligation.utils.d.ts.map +1 -1
- package/dist/src/services/registry/migration-obligation.utils.js.map +1 -1
- package/dist/src/services/registry/module-acquisition.utils.d.ts.map +1 -1
- package/dist/src/services/registry/module-acquisition.utils.js.map +1 -1
- package/dist/src/services/registry/module-artifact-files.utils.d.ts.map +1 -1
- package/dist/src/services/registry/module-artifact-files.utils.js.map +1 -1
- package/dist/src/services/registry/module-registration.service.d.ts.map +1 -1
- package/dist/src/services/registry/module-registration.service.js.map +1 -1
- package/dist/src/services/registry/module-requirements.service.d.ts.map +1 -1
- package/dist/src/services/registry/module-requirements.service.js.map +1 -1
- package/dist/src/services/registry/provider-install-step.d.ts.map +1 -1
- package/dist/src/services/registry/provider-install-step.js.map +1 -1
- package/dist/src/services/registry/provider-module-checks.service.d.ts.map +1 -1
- package/dist/src/services/registry/provider-module-checks.service.js.map +1 -1
- package/dist/src/services/registry/provider-module-identity.service.d.ts.map +1 -1
- package/dist/src/services/registry/provider-module-identity.service.js.map +1 -1
- package/dist/src/services/registry/provider-wiring.service.d.ts.map +1 -1
- package/dist/src/services/registry/provider-wiring.service.js.map +1 -1
- package/dist/src/services/registry/registry-command.utils.d.ts.map +1 -1
- package/dist/src/services/registry/registry-command.utils.js.map +1 -1
- package/dist/src/services/registry/registry-config-resolver.service.d.ts.map +1 -1
- package/dist/src/services/registry/registry-config-resolver.service.js.map +1 -1
- package/dist/src/services/registry/registry-credentials.service.d.ts.map +1 -1
- package/dist/src/services/registry/registry-credentials.service.js.map +1 -1
- package/dist/src/services/registry/saas-root-required.error.d.ts.map +1 -1
- package/dist/src/services/registry/saas-root-required.error.js.map +1 -1
- package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
- 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/tools/utility-tools.service.js.map +1 -1
- package/dist/src/services/tracker/creation-run-tracker.service.d.ts.map +1 -1
- package/dist/src/services/tracker/creation-run-tracker.service.js.map +1 -1
- package/dist/src/services/website/website-label-pack-audit.service.d.ts.map +1 -1
- package/dist/src/services/website/website-label-pack-audit.service.js.map +1 -1
- 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.map +1 -1
- package/dist/src/services/website/website-workspace.service.d.ts.map +1 -1
- package/dist/src/services/website/website-workspace.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +17 -17
- package/templates/saas/i18n/email/email-template-definitions.ts +5 -1
- package/templates/saas/scenarios/add-locale/files/website/src/i18n/__localePath__.json.hbs +21 -1
- package/templates/saas/scenarios/add-locale/files/website/src/pages/__localePath__/index.astro +1 -0
- package/templates/saas/scenarios/add-marketing-page/files/website/src/pages/__pageRef__.astro.hbs +1 -0
- package/templates/saas/scenarios/add-module/scenario.json +5 -0
- package/templates/saas/scenarios/add-website/files/website/src/components/FooterComponent.tsx.hbs +14 -6
- package/templates/saas/scenarios/add-website/files/website/src/content/llms.txt.hbs +3 -3
- package/templates/saas/scenarios/add-website/files/website/src/i18n/en.json.hbs +4 -0
- package/templates/saas/scenarios/add-website/files/website/src/pages/index.astro +1 -0
- package/templates/saas/scenarios/add-website/files/website/src/pages/llms.txt.ts +3 -1
- package/templates/saas/scenarios/add-website/files/website/src/styles/website.css +14 -0
- package/templates/saas/skeleton/backend-api/src/engine/email/email-template-definitions.ts +5 -1
- package/templates/saas/skeleton/shared-lib/src/engine/roles.ts +10 -2
- package/templates/saas/skeleton/specifications/src/companion-exports.ts +28 -3
- package/wildo-framework.info.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-secrets.service.js","sourceRoot":"","sources":["../../../../../../src/services/credentials/application-secrets.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAqC,MAAM,gCAAgC,CAAC;AACrI,OAAO,EAAE,oCAAoC,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAE5G,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,6DA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,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAC1E,OAAO,EAAE,GAAG,CAAC,MAAM,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;IACxJ,CAAC;IACD,4BAA4B,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IACtE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;AAClJ,CAAC","sourcesContent":["/**\n * An application's secrets per environment — provider secrets, system-of-record credentials and inbound\n * endpoint secrets (`ApplicationSecretKind`) — what it needs, what is set, and how to change one, for\n * `wildo secrets` and, through it, the workbench's secrets section (#1637).\n *\n * Local environments keep values in `infrastructure/<env>/secrets/secrets.json`, one section per kind; a\n * change is written there, the runtimes' `.env` files are regenerated, and only the runtimes that read the\n * key are restarted. Remote environments keep them as GitHub Actions secrets, written through the operator's\n * own `gh` login (`remote-secrets-store.service.ts`).\n *\n * A value never leaves this module except to the store that holds it: every report carries names and\n * standings, never a value, so a listing can be printed, logged or shown in a browser.\n */\nimport { spawnSync } from 'child_process';\nimport { existsSync, readFileSync, utimesSync } from 'fs';\nimport { basename, join } from 'path';\n\nimport { loadSaasConfig, WildoLocationType, WORKSPACE_CONFIG_NAMES } from '@wildo-ai/platform-config-lib';\nimport { ApplicationSecretKind, ApplicationSecretStanding, type ApplicationSecretRemoteLevel } from '@wildo-ai/platform-core-shared';\nimport { parseInboundEndpointSecretEnvVarName, parseSystemOfRecordEnvVarName } from '@wildo-ai/saas-models';\n\nimport { readLocalApplicationSecrets, updateLocalApplicationSecrets } from '~wildo-cli/services/credentials/local-secrets-store.service';\nimport { describeSecretValueProblem } from '~wildo-cli/services/credentials/provider-secret-format';\nimport { normalizePotentialMultilineSecret } from '~wildo-cli/services/credentials/ci-secrets-adapter.service';\nimport {\n describeDeployWorkflowGap,\n listRemoteApplicationSecrets,\n setRemoteApplicationSecret,\n unsetRemoteApplicationSecret,\n} from '~wildo-cli/services/credentials/remote-secrets-store.service';\nimport {\n loadSecretRequirementInputs,\n loadSecretRequirements,\n SystemOfRecordEnvironmentPresence,\n systemOfRecordPresenceOf,\n type SecretRequirement,\n type SecretRequirementInputs,\n type StoredApplicationSecrets,\n} from '~wildo-cli/services/credentials/secret-requirements.service';\nimport type { PlatformEnvConfigJson } from '~wildo-cli/services/credentials/credentials.schemas';\nimport { loadAppLocalRuntimeServiceAddresses } from '~wildo-cli/services/application/app-local-runtime-addresses.service';\nimport {\n COMPANION_UNREACHABLE_EXIT_CODE,\n CompanionClient,\n CompanionRefusalError,\n companionFailureExitCode,\n} from '~wildo-cli/services/companion/companion-client.service';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\n\nexport interface EnvironmentSecretsReport {\n readonly envName: string;\n readonly locationType: WildoLocationType;\n readonly requirements: readonly (SecretRequirement & { readonly remoteLevel?: ApplicationSecretRemoteLevel })[];\n /**\n * What this listing could not derive, each saying why — a backend not built (its inbound endpoints are then\n * unknown), a vendor facet that could not be read. Empty when the listing is whole.\n */\n readonly incomplete: readonly string[];\n}\n\n/** An environment's location, refused when the environment is not registered. */\nexport function resolveEnvironmentLocation(envName: string): WildoLocationType {\n const environment = EnvironmentUtils.get(envName);\n if (!environment) {\n throw new Error(`No environment '${envName}'. Registered: ${EnvironmentUtils.listNames().join(', ') || 'none'}.`);\n }\n return environment.locationType;\n}\n\nconst APPLICATION_SECRET_KINDS = Object.values(ApplicationSecretKind);\n\n/**\n * A LOCAL environment's `secrets.json`, per kind: the names with a value (`stored`), and every name the section\n * holds, an empty value included (`present`). A key stored as `\"\"` is not set, but it is still there to remove.\n */\nfunction readLocalStoredSecrets(envName: string): { readonly stored: StoredApplicationSecrets; readonly present: StoredApplicationSecrets } {\n const sections = APPLICATION_SECRET_KINDS.map((kind) => [kind, readLocalApplicationSecrets(envName, kind)] as const);\n return {\n stored: Object.fromEntries(sections.map(([kind, values]) => [\n kind,\n new Set(Object.entries(values).filter(([, value]) => value.trim().length > 0).map(([name]) => name)),\n ])) as unknown as StoredApplicationSecrets,\n present: Object.fromEntries(sections.map(([kind, values]) => [kind, new Set(Object.keys(values))])) as unknown as StoredApplicationSecrets,\n };\n}\n\n/**\n * How the environment addresses each system of record, from its GENERATED config — the file the env builder\n * reads to decide what reaches the backend — or `null` when it cannot be read.\n */\nfunction readSystemOfRecordPresence(envName: string): Readonly<Record<string, SystemOfRecordEnvironmentPresence>> | null {\n let config: PlatformEnvConfigJson | null;\n try {\n config = EnvironmentUtils.loadConfigJson(envName);\n } catch {\n return null;\n }\n if (!config) return null;\n return systemOfRecordPresenceOf(config.systemsOfRecord);\n}\n\n/** One secret's identity across kinds: a name is unique per `secrets.json` section, not across them. */\nconst secretKey = (kind: ApplicationSecretKind, envVarName: string): string => `${kind}:${envVarName}`;\n\n/**\n * What the application needs in one environment, and what is set there. Pass `inputs` when describing\n * several environments, so the application is loaded once (`loadSecretRequirementInputs` with its owners).\n */\nexport async function describeEnvironmentSecrets(saasRoot: string, envName: string, inputs?: SecretRequirementInputs): Promise<EnvironmentSecretsReport> {\n const locationType = resolveEnvironmentLocation(envName);\n const loaded = inputs ?? await loadSecretRequirementInputs(saasRoot, { withOwners: true });\n const incomplete = loaded.owners?.incomplete ?? [];\n const systemOfRecordPresence = readSystemOfRecordPresence(envName);\n if (locationType === WildoLocationType.LOCAL) {\n const requirements = await loadSecretRequirements({ saasRoot, inputs: loaded, ...readLocalStoredSecrets(envName), systemOfRecordPresence });\n return { envName, locationType, requirements, incomplete };\n }\n const remote = new Map(listRemoteApplicationSecrets(envName, saasRoot).map((secret) => [secretKey(secret.kind, secret.envVarName), secret]));\n const stored = Object.fromEntries(APPLICATION_SECRET_KINDS.map((kind) => [\n kind,\n new Set([...remote.values()].filter((secret) => secret.kind === kind).map((secret) => secret.envVarName)),\n ])) as unknown as StoredApplicationSecrets;\n const requirements = await loadSecretRequirements({ saasRoot, inputs: loaded, stored, systemOfRecordPresence });\n return {\n envName,\n locationType,\n requirements: requirements.map((row) => {\n const held = remote.get(secretKey(row.kind, row.envVarName));\n return held ? { ...row, remoteLevel: held.level } : row;\n }),\n incomplete,\n };\n}\n\n/**\n * The requirement a name refers to, refused when nothing the application declares reads it — a key no\n * runtime would receive is a typo or a stale name.\n *\n * A NAME is not an identity: each kind is its own `secrets.json` section, and a migration can leave one key in\n * two (an Odoo credential still in `providerEnv` beside its `systemsOfRecordEnv` copy). So `kind` narrows the\n * match, and a name matching in two kinds without one is refused, naming both, rather than resolved to\n * whichever sorted first — which set or removed the other copy than the one the person meant.\n *\n * One exception, for a name whose OWNER exists but could not be enumerated: an inbound endpoint secret when\n * the backend's endpoints could not be read (it is not built), and a system-of-record slot when its vendor's\n * facet could not be. A well-formed name for such an owner is admitted, because refusing it would make the\n * secret impossible to provide until something unrelated is fixed — the env builder delivers any well-formed\n * name, and the backend is where an endpoint without its secret is reported.\n */\nfunction requirementFor(report: EnvironmentSecretsReport, inputs: SecretRequirementInputs, envVarName: string, kind?: ApplicationSecretKind): SecretRequirement {\n const matches = report.requirements\n .filter((candidate) => candidate.envVarName === envVarName && (kind === undefined || candidate.kind === kind))\n .sort((left, right) => left.kind.localeCompare(right.kind));\n if (matches.length > 1) {\n throw new Error(`${envVarName} is in more than one section of this environment's secrets (${matches.map((row) => `${row.kind}: ${row.standing}`).join(', ')}). `\n + `Name the one you mean with --kind ${matches.map((row) => row.kind).join(' | ')}.`);\n }\n if (matches[0]) return matches[0];\n const owners = inputs.owners;\n const endpoint = kind === undefined || kind === ApplicationSecretKind.INBOUND_ENDPOINT ? parseInboundEndpointSecretEnvVarName(envVarName) : null;\n if (endpoint && owners?.inboundEndpointKeys === null) {\n return unenumeratedOwnerRow(envVarName, ApplicationSecretKind.INBOUND_ENDPOINT, endpoint.endpointKey);\n }\n const slot = kind === undefined || kind === ApplicationSecretKind.SYSTEM_OF_RECORD ? parseSystemOfRecordEnvVarName(envVarName) : null;\n if (slot && owners?.systemsOfRecord.some((system) => system.name === slot.instanceName && system.secretSlots === null)) {\n return unenumeratedOwnerRow(envVarName, ApplicationSecretKind.SYSTEM_OF_RECORD, slot.instanceName);\n }\n const known = [...new Set(report.requirements.filter((candidate) => kind === undefined || candidate.kind === kind).map((candidate) => candidate.envVarName))];\n throw new Error(`Nothing this application declares reads ${envVarName}${kind === undefined ? '' : ` as a ${kind} secret`}. Known here: ${known.join(', ') || 'none'}.`);\n}\n\nfunction unenumeratedOwnerRow(envVarName: string, kind: ApplicationSecretKind, ownerRef: string): SecretRequirement {\n return {\n envVarName, kind, ownerRef, description: null, required: true, capabilities: [], runtimes: ['backend'],\n standing: ApplicationSecretStanding.NEEDED, creationEssential: false,\n };\n}\n\nexport interface SecretChangeOutcome {\n readonly envVarName: string;\n /** Which `secrets.json` section (or, remotely, which GitHub secret prefix) the change was made in. */\n readonly kind: ApplicationSecretKind;\n readonly envName: string;\n /**\n * Local only: the runtimes asked to restart to read the change — those that read the key AND run under\n * a LIVE supervisor of `wildo local dev`. A signal file outlives the stack, so its existence alone is\n * not a restart; a runtime nobody supervises reads the key at its next start.\n */\n readonly restartSignalledRuntimes: readonly string[];\n /** Local only: whether the runtimes' `.env` files were regenerated. */\n readonly envFilesRegenerated: boolean;\n /** Local only: why the `.env` files could not be regenerated, with what to run; `null` otherwise. */\n readonly envFilesRegenerationFailure: string | null;\n /**\n * Local only: the companion reads this key and was NOT asked to restart, because the caller said it\n * applies the change itself (`--no-companion-restart`). The workbench does, in-process: restarting\n * the companion from inside a request would end the process serving it and any run in flight.\n */\n readonly companionAppliesChange: boolean;\n /**\n * Local only: the RUNNING companion loaded the change in place, through `POST /api/companion/runtime/env/apply`,\n * so it was not restarted and no run in flight was ended. False when it reads no such key, is not running,\n * or the caller applies the change itself.\n */\n readonly companionLoadedInProcess: boolean;\n /**\n * Local only: the companion is running and reads this key, but could not be made to load it — with what to\n * do. `null` when nothing failed. Distinct from the workbench's `companionApplyFailure`, which the COMPANION\n * sets about its own in-process apply.\n */\n readonly companionLoadFailure: string | null;\n /**\n * The environment's rows AFTER the change, re-derived from the same application inputs the change was\n * checked against (#1782). One change can move OTHER rows too: setting one LLM provider's key can make a\n * competing provider's key no longer needed. A caller holding a listing replaces that environment's rows\n * with these instead of re-listing, which re-loads the application and takes tens of seconds.\n *\n * `null` when they could not be read after the change was MADE — for a remote environment that is one\n * more `gh` listing, which a network error, a rate limit or an expired token can fail. The change itself\n * stands, and a caller holding a listing drops it instead of patching it.\n */\n readonly environmentAfterChange: EnvironmentSecretsReport | null;\n}\n\n/**\n * The environment's rows after a change that has ALREADY been written. A failure here must never turn the\n * completed change into a reported failure: the person would be told \"not changed\" about a secret that was.\n */\nasync function describeAfterChange(saasRoot: string, envName: string, inputs: SecretRequirementInputs): Promise<EnvironmentSecretsReport | null> {\n try {\n return await describeEnvironmentSecrets(saasRoot, envName, inputs);\n } catch {\n return null;\n }\n}\n\n/** Options every change takes. */\nexport interface SecretChangeOptions {\n /** Which `secrets.json` section the name is in — needed only when it is in more than one (see `requirementFor`). */\n readonly kind?: ApplicationSecretKind;\n /**\n * Whether a change the companion reads restarts it (default). The workbench passes `false` and applies\n * the change in-process — see {@link SecretChangeOutcome.companionAppliesChange}.\n */\n readonly restartCompanion?: boolean;\n}\n\n/** The scope path the dev companion is read under (`providers.scopes.companion`). */\nconst COMPANION_RUNTIME = 'companion';\n\n/** The companion's folder under `.wildo-saas/`, which names its supervisor signal file. */\nconst COMPANION_SIGNAL_FOLDER = 'wildo-dev-companion';\n\n/** Is the pid alive (EPERM means alive and someone else's)? */\nfunction isProcessAlive(pid: unknown): boolean {\n if (typeof pid !== 'number' || !Number.isInteger(pid) || pid <= 0) return false;\n try {\n process.kill(pid, 0);\n return true;\n } catch (error) {\n return (error as NodeJS.ErrnoException).code === 'EPERM';\n }\n}\n\n/**\n * Whether a live `wildo local dev` supervisor runs this runtime: its published observation\n * (`runtime-signals/supervisors/<label>.json`, label = the runtime's folder) names a producer that is alive.\n */\nfunction isSupervised(saasRoot: string, folder: string): boolean {\n try {\n const observation = JSON.parse(readFileSync(join(saasRoot, '.wildo-saas', 'runtime-signals', 'supervisors', `${folder}.json`), 'utf8')) as { producerPid?: unknown };\n return isProcessAlive(observation.producerPid);\n } catch {\n return false;\n }\n}\n\n/**\n * The signal file whose touch restarts a supervised runtime, per scope path (`backend`, `companion`,\n * `<family>.<key>`). Named after the service's folder, as each `dev-supervised.sh` names it; the\n * companion's is fixed. Only runtimes a live supervisor runs are returned.\n */\nasync function runtimeSignalFiles(saasRoot: string, runtimes: readonly string[]): Promise<Map<string, string>> {\n const config = await loadSaasConfig(join(saasRoot, WORKSPACE_CONFIG_NAMES.SAAS)) as {\n services?: Record<string, { path?: string; frontendType?: unknown }>;\n minions?: Record<string, { path?: string }>;\n workers?: Record<string, { path?: string }>;\n };\n const signalDir = join(saasRoot, '.wildo-saas', 'runtime-signals');\n const byFolder = new Map<string, string>();\n const add = (folder: string | undefined): void => {\n if (!folder) return;\n const name = basename(folder);\n const file = join(signalDir, `${name}.signal`);\n if (existsSync(file) && isSupervised(saasRoot, name)) byFolder.set(name, file);\n };\n for (const runtime of runtimes) {\n if (runtime === COMPANION_RUNTIME) add(COMPANION_SIGNAL_FOLDER);\n else if (runtime === 'backend') {\n for (const service of Object.values(config.services ?? {})) if (service.frontendType === undefined) add(service.path);\n } else {\n const [family, key] = runtime.split('.') as [string, string];\n const source = family === 'minions' ? config.minions : family === 'workers' ? config.workers : config.services;\n add(source?.[key]?.path);\n }\n }\n return byFolder;\n}\n\n/**\n * Run this CLI's own `config sync --domain <domain>` for one environment, as one child run. A failure is\n * REPORTED, never swallowed: the value is already in `secrets.json`, and without the regeneration nothing\n * can read it, which the person must be told along with what to run.\n */\nexport function runConfigSyncDomain(\n saasRoot: string,\n envName: string,\n domain: 'env-files' | 'manifest',\n): { readonly regenerated: boolean; readonly failure: string | null } {\n /*\n * `--force` is required, not a convenience. Without it a non-interactive `config sync` finds the\n * existing files, prints \"Skipping env-files regeneration in non-interactive mode\" and EXITS 0 — so\n * every local change reported `envFilesRegenerated: true` and restarted its runtimes on the OLD `.env`\n * (measured 2026-09-26: a key set from the workbench reached `secrets.json` and no `.env`). The prompt\n * that skip replaces asks \"overwrite the existing env files?\", and changing a secret is a request to\n * do exactly that. `--force` skips confirmations only; secret rotation needs `--rotate-secrets`.\n */\n const args = ['config', 'sync', '--domain', domain, '--env', envName, '--non-interactive', '--force'];\n const result = spawnSync(process.execPath, [process.argv[1]!, ...args], { cwd: saasRoot, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });\n if (result.status === 0) return { regenerated: true, failure: null };\n const lastLine = `${result.stderr ?? ''}\\n${result.stdout ?? ''}`\n .split('\\n')\n .map((line) => line.replace(/\\u001b\\[[0-9;]*m/g, '').trim())\n .filter((line) => line.length > 0)\n .at(-1);\n const what = domain === 'env-files' ? \"the runtimes' .env files were\" : 'the deployment manifests were';\n return {\n regenerated: false,\n failure: `The value is saved, but ${what} not regenerated${lastLine ? ` (${lastLine})` : ''}. Run \\`wildo ${args.join(' ')}\\`, then restart what reads it.`,\n };\n}\n\n/** Regenerate the local runtimes' `.env` files — what every application runtime reads. */\nexport function regenerateEnvFiles(saasRoot: string, envName: string): { readonly regenerated: boolean; readonly failure: string | null } {\n return runConfigSyncDomain(saasRoot, envName, 'env-files');\n}\n\n/** The companion route that loads named variables of its regenerated `.env` into the running process. */\nexport const COMPANION_RUNTIME_ENV_APPLY_PATH = '/api/companion/runtime/env/apply';\n\n/** Long enough for a registry refresh on a loaded machine; short enough that a hung companion does not hold `set`. */\nconst COMPANION_ENV_APPLY_TIMEOUT_MS = 20_000;\n\n/** What asking the running companion to load a changed variable came to. */\ntype CompanionLoadResult =\n | { readonly kind: 'loaded' }\n | { readonly kind: 'not-running' }\n | { readonly kind: 'failed'; readonly failure: string };\n\n/**\n * Ask the RUNNING companion to load one changed variable from the `.env` just regenerated (#1637).\n *\n * The answer to a key that \"is set\" and still refused: the companion reads its `.env` once, at boot, and in\n * a created application nothing supervises it (it runs as plain `node --env-file-if-exists=.env` under\n * `pnpm -r run dev`), so there is no signal file to touch and no restart to ask for. Loading in place works\n * whether or not a supervisor exists, and it spares every run in flight, which a restart would end.\n *\n * Only the NAME is sent; the companion reads the value from its own `.env`.\n *\n * Unreachable (refused connection, no token because it never booted) is `not-running`: it then reads the key\n * at its next start, which is what would happen anyway. Anything else is `failed`, including a 404 from a\n * companion older than this route and a timeout.\n */\nasync function loadInRunningCompanion(saasRoot: string, envVarName: string): Promise<CompanionLoadResult> {\n const addresses = await loadAppLocalRuntimeServiceAddresses(saasRoot).catch(() => null);\n const options = {\n appRoot: saasRoot,\n baseUrl: addresses?.devCompanion?.url,\n port: addresses?.devCompanion?.port,\n timeoutMs: COMPANION_ENV_APPLY_TIMEOUT_MS,\n };\n try {\n await CompanionClient.post(COMPANION_RUNTIME_ENV_APPLY_PATH, { envVarNames: [envVarName] }, options);\n return { kind: 'loaded' };\n } catch (error) {\n /*\n * \"Not running\" is exactly what the client already calls UNREACHABLE — a refused or reset connection, or\n * no token because the companion never booted — so the one classifier decides both. Anything else (a\n * timeout, a hung companion, an unreadable token) is a companion that may hold the old value: a failure.\n */\n if (companionFailureExitCode(error) === COMPANION_UNREACHABLE_EXIT_CODE) return { kind: 'not-running' };\n const restart = `restart \\`wildo local dev\\` so it reads the new value.`;\n if (error instanceof CompanionRefusalError && error.status === 404) {\n return { kind: 'failed', failure: `The running companion is older than this CLI and cannot load ${envVarName} in place; ${restart}` };\n }\n return { kind: 'failed', failure: `The running companion could not load ${envVarName} (${ErrorUtils.extractErrorMessage(error)}); ${restart}` };\n }\n}\n\n/**\n * Regenerate the `.env` files and bring the change to the runtimes that receive the key. ALWAYS regenerated,\n * an UNUSED key included: unconsumed is not undelivered (the companion's `.env` carries every provider key),\n * and a removal that skipped this left the value on disk and in the running process (#1637 review, H1).\n *\n * The companion is asked to LOAD the key in place first; only when it is not running, or could not, is it\n * signalled to restart like the other runtimes. Every other runtime is restarted through its supervisor's\n * signal file.\n */\nasync function applyLocalChange(saasRoot: string, envName: string, row: SecretRequirement, options: SecretChangeOptions): Promise<Omit<SecretChangeOutcome, 'environmentAfterChange'>> {\n const restartCompanion = options.restartCompanion !== false;\n const readsKey = row.runtimes.includes(COMPANION_RUNTIME);\n const companionAppliesChange = !restartCompanion && readsKey;\n const identity = { envVarName: row.envVarName, kind: row.kind, envName };\n const regeneration = regenerateEnvFiles(saasRoot, envName);\n const signalled: string[] = [];\n let companionLoad: CompanionLoadResult | null = null;\n if (regeneration.regenerated) {\n if (restartCompanion && readsKey) companionLoad = await loadInRunningCompanion(saasRoot, row.envVarName);\n const companionHandled = !restartCompanion || companionLoad?.kind === 'loaded';\n const now = new Date();\n const runtimes = row.runtimes.filter((runtime) => !companionHandled || runtime !== COMPANION_RUNTIME);\n for (const [folder, file] of await runtimeSignalFiles(saasRoot, runtimes)) {\n utimesSync(file, now, now);\n signalled.push(folder);\n }\n }\n return {\n ...identity,\n restartSignalledRuntimes: signalled,\n envFilesRegenerated: regeneration.regenerated,\n envFilesRegenerationFailure: regeneration.failure,\n companionAppliesChange,\n companionLoadedInProcess: companionLoad?.kind === 'loaded',\n // A supervised companion restarted instead has received the change, so the failure is not worth saying.\n companionLoadFailure: companionLoad?.kind === 'failed' && !signalled.includes(COMPANION_SIGNAL_FOLDER) ? companionLoad.failure : null,\n };\n}\n\nconst REMOTE_OUTCOME = {\n restartSignalledRuntimes: [],\n envFilesRegenerated: false,\n envFilesRegenerationFailure: null,\n companionAppliesChange: false,\n companionLoadedInProcess: false,\n companionLoadFailure: null,\n} as const;\n\n/**\n * Set one secret in one environment, in the section its kind names. The value is validated, never logged.\n *\n * A key holding a PEM (`…PRIVATE_KEY`, `…CERTIFICATE`, a system of record's `certificatePem`) pasted on one\n * line with literal `\\n` is turned into real line breaks locally, exactly as the CI adapter does when it reads\n * the same secret remotely (`normalizePotentialMultilineSecret`), so both lanes hand a runtime the same\n * bytes. A remote value is stored as given, because that adapter normalizes it on the way out.\n *\n * An UNUSED key is refused: nothing consumes it, so a new value would change nothing a runtime does.\n */\nexport async function setApplicationSecret(\n saasRoot: string,\n envName: string,\n envVarName: string,\n value: string,\n options: SecretChangeOptions = {},\n): Promise<SecretChangeOutcome> {\n const inputs = await loadSecretRequirementInputs(saasRoot, { withOwners: true });\n const report = await describeEnvironmentSecrets(saasRoot, envName, inputs);\n const row = requirementFor(report, inputs, envVarName, options.kind);\n if (row.standing === ApplicationSecretStanding.UNUSED) {\n throw new Error(`Nothing consumes ${envVarName}, so setting it would change nothing. Remove it with \\`wildo secrets unset ${envVarName}\\`.`);\n }\n const problem = describeSecretValueProblem(envVarName, value, true);\n if (problem) throw new Error(problem);\n if (report.locationType === WildoLocationType.LOCAL) {\n updateLocalApplicationSecrets(envName, row.kind, { set: { [envVarName]: normalizePotentialMultilineSecret(envVarName, value.trim()) } });\n return { ...(await applyLocalChange(saasRoot, envName, row, options)), environmentAfterChange: await describeAfterChange(saasRoot, envName, inputs) };\n }\n const gap = describeDeployWorkflowGap(envName, row.kind, envVarName, saasRoot);\n if (gap) throw new Error(gap);\n setRemoteApplicationSecret(envName, row.kind, envVarName, value.trim(), saasRoot);\n return { envVarName, kind: row.kind, envName, ...REMOTE_OUTCOME, environmentAfterChange: await describeAfterChange(saasRoot, envName, inputs) };\n}\n\n/** Remove one secret from one environment — including an UNUSED one, which is what that standing is for. */\nexport async function unsetApplicationSecret(\n saasRoot: string,\n envName: string,\n envVarName: string,\n options: SecretChangeOptions = {},\n): Promise<SecretChangeOutcome> {\n const inputs = await loadSecretRequirementInputs(saasRoot, { withOwners: true });\n const report = await describeEnvironmentSecrets(saasRoot, envName, inputs);\n const row = requirementFor(report, inputs, envVarName, options.kind);\n if (report.locationType === WildoLocationType.LOCAL) {\n updateLocalApplicationSecrets(envName, row.kind, { unset: [envVarName] });\n return { ...(await applyLocalChange(saasRoot, envName, row, options)), environmentAfterChange: await describeAfterChange(saasRoot, envName, inputs) };\n }\n unsetRemoteApplicationSecret(envName, row.kind, envVarName, saasRoot);\n return { envVarName, kind: row.kind, envName, ...REMOTE_OUTCOME, environmentAfterChange: await describeAfterChange(saasRoot, envName, inputs) };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"application-secrets.service.js","sourceRoot":"","sources":["../../../../src/services/credentials/application-secrets.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAqC,MAAM,gCAAgC,CAAC;AACrI,OAAO,EAAE,oCAAoC,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAE5G,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AACzI,OAAO,EAAE,0BAA0B,EAAE,MAAM,wDAAwD,CAAC;AACpG,OAAO,EAAE,iCAAiC,EAAE,MAAM,4DAA4D,CAAC;AAC/G,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,8DAA8D,CAAC;AACtE,OAAO,EACL,2BAA2B,EAC3B,sBA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OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;IACxJ,CAAC;IACD,4BAA4B,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IACtE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;AAClJ,CAAC","sourcesContent":["/**\n * An application's secrets per environment — provider secrets, system-of-record credentials and inbound\n * endpoint secrets (`ApplicationSecretKind`) — what it needs, what is set, and how to change one, for\n * `wildo secrets` and, through it, the workbench's secrets section (#1637).\n *\n * Local environments keep values in `infrastructure/<env>/secrets/secrets.json`, one section per kind; a\n * change is written there, the runtimes' `.env` files are regenerated, and only the runtimes that read the\n * key are restarted. Remote environments keep them as GitHub Actions secrets, written through the operator's\n * own `gh` login (`remote-secrets-store.service.ts`).\n *\n * A value never leaves this module except to the store that holds it: every report carries names and\n * standings, never a value, so a listing can be printed, logged or shown in a browser.\n */\nimport { spawnSync } from 'child_process';\nimport { existsSync, readFileSync, utimesSync } from 'fs';\nimport { basename, join } from 'path';\n\nimport { loadSaasConfig, WildoLocationType, WORKSPACE_CONFIG_NAMES } from '@wildo-ai/platform-config-lib';\nimport { ApplicationSecretKind, ApplicationSecretStanding, type ApplicationSecretRemoteLevel } from '@wildo-ai/platform-core-shared';\nimport { parseInboundEndpointSecretEnvVarName, parseSystemOfRecordEnvVarName } from '@wildo-ai/saas-models';\n\nimport { readLocalApplicationSecrets, updateLocalApplicationSecrets } from '~wildo-cli/services/credentials/local-secrets-store.service';\nimport { describeSecretValueProblem } from '~wildo-cli/services/credentials/provider-secret-format';\nimport { normalizePotentialMultilineSecret } from '~wildo-cli/services/credentials/ci-secrets-adapter.service';\nimport {\n describeDeployWorkflowGap,\n listRemoteApplicationSecrets,\n setRemoteApplicationSecret,\n unsetRemoteApplicationSecret,\n} from '~wildo-cli/services/credentials/remote-secrets-store.service';\nimport {\n loadSecretRequirementInputs,\n loadSecretRequirements,\n SystemOfRecordEnvironmentPresence,\n systemOfRecordPresenceOf,\n type SecretRequirement,\n type SecretRequirementInputs,\n type StoredApplicationSecrets,\n} from '~wildo-cli/services/credentials/secret-requirements.service';\nimport type { PlatformEnvConfigJson } from '~wildo-cli/services/credentials/credentials.schemas';\nimport { loadAppLocalRuntimeServiceAddresses } from '~wildo-cli/services/application/app-local-runtime-addresses.service';\nimport {\n COMPANION_UNREACHABLE_EXIT_CODE,\n CompanionClient,\n CompanionRefusalError,\n companionFailureExitCode,\n} from '~wildo-cli/services/companion/companion-client.service';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\n\nexport interface EnvironmentSecretsReport {\n readonly envName: string;\n readonly locationType: WildoLocationType;\n readonly requirements: readonly (SecretRequirement & { readonly remoteLevel?: ApplicationSecretRemoteLevel })[];\n /**\n * What this listing could not derive, each saying why — a backend not built (its inbound endpoints are then\n * unknown), a vendor facet that could not be read. Empty when the listing is whole.\n */\n readonly incomplete: readonly string[];\n}\n\n/** An environment's location, refused when the environment is not registered. */\nexport function resolveEnvironmentLocation(envName: string): WildoLocationType {\n const environment = EnvironmentUtils.get(envName);\n if (!environment) {\n throw new Error(`No environment '${envName}'. Registered: ${EnvironmentUtils.listNames().join(', ') || 'none'}.`);\n }\n return environment.locationType;\n}\n\nconst APPLICATION_SECRET_KINDS = Object.values(ApplicationSecretKind);\n\n/**\n * A LOCAL environment's `secrets.json`, per kind: the names with a value (`stored`), and every name the section\n * holds, an empty value included (`present`). A key stored as `\"\"` is not set, but it is still there to remove.\n */\nfunction readLocalStoredSecrets(envName: string): { readonly stored: StoredApplicationSecrets; readonly present: StoredApplicationSecrets } {\n const sections = APPLICATION_SECRET_KINDS.map((kind) => [kind, readLocalApplicationSecrets(envName, kind)] as const);\n return {\n stored: Object.fromEntries(sections.map(([kind, values]) => [\n kind,\n new Set(Object.entries(values).filter(([, value]) => value.trim().length > 0).map(([name]) => name)),\n ])) as unknown as StoredApplicationSecrets,\n present: Object.fromEntries(sections.map(([kind, values]) => [kind, new Set(Object.keys(values))])) as unknown as StoredApplicationSecrets,\n };\n}\n\n/**\n * How the environment addresses each system of record, from its GENERATED config — the file the env builder\n * reads to decide what reaches the backend — or `null` when it cannot be read.\n */\nfunction readSystemOfRecordPresence(envName: string): Readonly<Record<string, SystemOfRecordEnvironmentPresence>> | null {\n let config: PlatformEnvConfigJson | null;\n try {\n config = EnvironmentUtils.loadConfigJson(envName);\n } catch {\n return null;\n }\n if (!config) return null;\n return systemOfRecordPresenceOf(config.systemsOfRecord);\n}\n\n/** One secret's identity across kinds: a name is unique per `secrets.json` section, not across them. */\nconst secretKey = (kind: ApplicationSecretKind, envVarName: string): string => `${kind}:${envVarName}`;\n\n/**\n * What the application needs in one environment, and what is set there. Pass `inputs` when describing\n * several environments, so the application is loaded once (`loadSecretRequirementInputs` with its owners).\n */\nexport async function describeEnvironmentSecrets(saasRoot: string, envName: string, inputs?: SecretRequirementInputs): Promise<EnvironmentSecretsReport> {\n const locationType = resolveEnvironmentLocation(envName);\n const loaded = inputs ?? await loadSecretRequirementInputs(saasRoot, { withOwners: true });\n const incomplete = loaded.owners?.incomplete ?? [];\n const systemOfRecordPresence = readSystemOfRecordPresence(envName);\n if (locationType === WildoLocationType.LOCAL) {\n const requirements = await loadSecretRequirements({ saasRoot, inputs: loaded, ...readLocalStoredSecrets(envName), systemOfRecordPresence });\n return { envName, locationType, requirements, incomplete };\n }\n const remote = new Map(listRemoteApplicationSecrets(envName, saasRoot).map((secret) => [secretKey(secret.kind, secret.envVarName), secret]));\n const stored = Object.fromEntries(APPLICATION_SECRET_KINDS.map((kind) => [\n kind,\n new Set([...remote.values()].filter((secret) => secret.kind === kind).map((secret) => secret.envVarName)),\n ])) as unknown as StoredApplicationSecrets;\n const requirements = await loadSecretRequirements({ saasRoot, inputs: loaded, stored, systemOfRecordPresence });\n return {\n envName,\n locationType,\n requirements: requirements.map((row) => {\n const held = remote.get(secretKey(row.kind, row.envVarName));\n return held ? { ...row, remoteLevel: held.level } : row;\n }),\n incomplete,\n };\n}\n\n/**\n * The requirement a name refers to, refused when nothing the application declares reads it — a key no\n * runtime would receive is a typo or a stale name.\n *\n * A NAME is not an identity: each kind is its own `secrets.json` section, and a migration can leave one key in\n * two (an Odoo credential still in `providerEnv` beside its `systemsOfRecordEnv` copy). So `kind` narrows the\n * match, and a name matching in two kinds without one is refused, naming both, rather than resolved to\n * whichever sorted first — which set or removed the other copy than the one the person meant.\n *\n * One exception, for a name whose OWNER exists but could not be enumerated: an inbound endpoint secret when\n * the backend's endpoints could not be read (it is not built), and a system-of-record slot when its vendor's\n * facet could not be. A well-formed name for such an owner is admitted, because refusing it would make the\n * secret impossible to provide until something unrelated is fixed — the env builder delivers any well-formed\n * name, and the backend is where an endpoint without its secret is reported.\n */\nfunction requirementFor(report: EnvironmentSecretsReport, inputs: SecretRequirementInputs, envVarName: string, kind?: ApplicationSecretKind): SecretRequirement {\n const matches = report.requirements\n .filter((candidate) => candidate.envVarName === envVarName && (kind === undefined || candidate.kind === kind))\n .sort((left, right) => left.kind.localeCompare(right.kind));\n if (matches.length > 1) {\n throw new Error(`${envVarName} is in more than one section of this environment's secrets (${matches.map((row) => `${row.kind}: ${row.standing}`).join(', ')}). `\n + `Name the one you mean with --kind ${matches.map((row) => row.kind).join(' | ')}.`);\n }\n if (matches[0]) return matches[0];\n const owners = inputs.owners;\n const endpoint = kind === undefined || kind === ApplicationSecretKind.INBOUND_ENDPOINT ? parseInboundEndpointSecretEnvVarName(envVarName) : null;\n if (endpoint && owners?.inboundEndpointKeys === null) {\n return unenumeratedOwnerRow(envVarName, ApplicationSecretKind.INBOUND_ENDPOINT, endpoint.endpointKey);\n }\n const slot = kind === undefined || kind === ApplicationSecretKind.SYSTEM_OF_RECORD ? parseSystemOfRecordEnvVarName(envVarName) : null;\n if (slot && owners?.systemsOfRecord.some((system) => system.name === slot.instanceName && system.secretSlots === null)) {\n return unenumeratedOwnerRow(envVarName, ApplicationSecretKind.SYSTEM_OF_RECORD, slot.instanceName);\n }\n const known = [...new Set(report.requirements.filter((candidate) => kind === undefined || candidate.kind === kind).map((candidate) => candidate.envVarName))];\n throw new Error(`Nothing this application declares reads ${envVarName}${kind === undefined ? '' : ` as a ${kind} secret`}. Known here: ${known.join(', ') || 'none'}.`);\n}\n\nfunction unenumeratedOwnerRow(envVarName: string, kind: ApplicationSecretKind, ownerRef: string): SecretRequirement {\n return {\n envVarName, kind, ownerRef, description: null, required: true, capabilities: [], runtimes: ['backend'],\n standing: ApplicationSecretStanding.NEEDED, creationEssential: false,\n };\n}\n\nexport interface SecretChangeOutcome {\n readonly envVarName: string;\n /** Which `secrets.json` section (or, remotely, which GitHub secret prefix) the change was made in. */\n readonly kind: ApplicationSecretKind;\n readonly envName: string;\n /**\n * Local only: the runtimes asked to restart to read the change — those that read the key AND run under\n * a LIVE supervisor of `wildo local dev`. A signal file outlives the stack, so its existence alone is\n * not a restart; a runtime nobody supervises reads the key at its next start.\n */\n readonly restartSignalledRuntimes: readonly string[];\n /** Local only: whether the runtimes' `.env` files were regenerated. */\n readonly envFilesRegenerated: boolean;\n /** Local only: why the `.env` files could not be regenerated, with what to run; `null` otherwise. */\n readonly envFilesRegenerationFailure: string | null;\n /**\n * Local only: the companion reads this key and was NOT asked to restart, because the caller said it\n * applies the change itself (`--no-companion-restart`). The workbench does, in-process: restarting\n * the companion from inside a request would end the process serving it and any run in flight.\n */\n readonly companionAppliesChange: boolean;\n /**\n * Local only: the RUNNING companion loaded the change in place, through `POST /api/companion/runtime/env/apply`,\n * so it was not restarted and no run in flight was ended. False when it reads no such key, is not running,\n * or the caller applies the change itself.\n */\n readonly companionLoadedInProcess: boolean;\n /**\n * Local only: the companion is running and reads this key, but could not be made to load it — with what to\n * do. `null` when nothing failed. Distinct from the workbench's `companionApplyFailure`, which the COMPANION\n * sets about its own in-process apply.\n */\n readonly companionLoadFailure: string | null;\n /**\n * The environment's rows AFTER the change, re-derived from the same application inputs the change was\n * checked against (#1782). One change can move OTHER rows too: setting one LLM provider's key can make a\n * competing provider's key no longer needed. A caller holding a listing replaces that environment's rows\n * with these instead of re-listing, which re-loads the application and takes tens of seconds.\n *\n * `null` when they could not be read after the change was MADE — for a remote environment that is one\n * more `gh` listing, which a network error, a rate limit or an expired token can fail. The change itself\n * stands, and a caller holding a listing drops it instead of patching it.\n */\n readonly environmentAfterChange: EnvironmentSecretsReport | null;\n}\n\n/**\n * The environment's rows after a change that has ALREADY been written. A failure here must never turn the\n * completed change into a reported failure: the person would be told \"not changed\" about a secret that was.\n */\nasync function describeAfterChange(saasRoot: string, envName: string, inputs: SecretRequirementInputs): Promise<EnvironmentSecretsReport | null> {\n try {\n return await describeEnvironmentSecrets(saasRoot, envName, inputs);\n } catch {\n return null;\n }\n}\n\n/** Options every change takes. */\nexport interface SecretChangeOptions {\n /** Which `secrets.json` section the name is in — needed only when it is in more than one (see `requirementFor`). */\n readonly kind?: ApplicationSecretKind;\n /**\n * Whether a change the companion reads restarts it (default). The workbench passes `false` and applies\n * the change in-process — see {@link SecretChangeOutcome.companionAppliesChange}.\n */\n readonly restartCompanion?: boolean;\n}\n\n/** The scope path the dev companion is read under (`providers.scopes.companion`). */\nconst COMPANION_RUNTIME = 'companion';\n\n/** The companion's folder under `.wildo-saas/`, which names its supervisor signal file. */\nconst COMPANION_SIGNAL_FOLDER = 'wildo-dev-companion';\n\n/** Is the pid alive (EPERM means alive and someone else's)? */\nfunction isProcessAlive(pid: unknown): boolean {\n if (typeof pid !== 'number' || !Number.isInteger(pid) || pid <= 0) return false;\n try {\n process.kill(pid, 0);\n return true;\n } catch (error) {\n return (error as NodeJS.ErrnoException).code === 'EPERM';\n }\n}\n\n/**\n * Whether a live `wildo local dev` supervisor runs this runtime: its published observation\n * (`runtime-signals/supervisors/<label>.json`, label = the runtime's folder) names a producer that is alive.\n */\nfunction isSupervised(saasRoot: string, folder: string): boolean {\n try {\n const observation = JSON.parse(readFileSync(join(saasRoot, '.wildo-saas', 'runtime-signals', 'supervisors', `${folder}.json`), 'utf8')) as { producerPid?: unknown };\n return isProcessAlive(observation.producerPid);\n } catch {\n return false;\n }\n}\n\n/**\n * The signal file whose touch restarts a supervised runtime, per scope path (`backend`, `companion`,\n * `<family>.<key>`). Named after the service's folder, as each `dev-supervised.sh` names it; the\n * companion's is fixed. Only runtimes a live supervisor runs are returned.\n */\nasync function runtimeSignalFiles(saasRoot: string, runtimes: readonly string[]): Promise<Map<string, string>> {\n const config = await loadSaasConfig(join(saasRoot, WORKSPACE_CONFIG_NAMES.SAAS)) as {\n services?: Record<string, { path?: string; frontendType?: unknown }>;\n minions?: Record<string, { path?: string }>;\n workers?: Record<string, { path?: string }>;\n };\n const signalDir = join(saasRoot, '.wildo-saas', 'runtime-signals');\n const byFolder = new Map<string, string>();\n const add = (folder: string | undefined): void => {\n if (!folder) return;\n const name = basename(folder);\n const file = join(signalDir, `${name}.signal`);\n if (existsSync(file) && isSupervised(saasRoot, name)) byFolder.set(name, file);\n };\n for (const runtime of runtimes) {\n if (runtime === COMPANION_RUNTIME) add(COMPANION_SIGNAL_FOLDER);\n else if (runtime === 'backend') {\n for (const service of Object.values(config.services ?? {})) if (service.frontendType === undefined) add(service.path);\n } else {\n const [family, key] = runtime.split('.') as [string, string];\n const source = family === 'minions' ? config.minions : family === 'workers' ? config.workers : config.services;\n add(source?.[key]?.path);\n }\n }\n return byFolder;\n}\n\n/**\n * Run this CLI's own `config sync --domain <domain>` for one environment, as one child run. A failure is\n * REPORTED, never swallowed: the value is already in `secrets.json`, and without the regeneration nothing\n * can read it, which the person must be told along with what to run.\n */\nexport function runConfigSyncDomain(\n saasRoot: string,\n envName: string,\n domain: 'env-files' | 'manifest',\n): { readonly regenerated: boolean; readonly failure: string | null } {\n /*\n * `--force` is required, not a convenience. Without it a non-interactive `config sync` finds the\n * existing files, prints \"Skipping env-files regeneration in non-interactive mode\" and EXITS 0 — so\n * every local change reported `envFilesRegenerated: true` and restarted its runtimes on the OLD `.env`\n * (measured 2026-09-26: a key set from the workbench reached `secrets.json` and no `.env`). The prompt\n * that skip replaces asks \"overwrite the existing env files?\", and changing a secret is a request to\n * do exactly that. `--force` skips confirmations only; secret rotation needs `--rotate-secrets`.\n */\n const args = ['config', 'sync', '--domain', domain, '--env', envName, '--non-interactive', '--force'];\n const result = spawnSync(process.execPath, [process.argv[1]!, ...args], { cwd: saasRoot, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });\n if (result.status === 0) return { regenerated: true, failure: null };\n const lastLine = `${result.stderr ?? ''}\\n${result.stdout ?? ''}`\n .split('\\n')\n .map((line) => line.replace(/\\u001b\\[[0-9;]*m/g, '').trim())\n .filter((line) => line.length > 0)\n .at(-1);\n const what = domain === 'env-files' ? \"the runtimes' .env files were\" : 'the deployment manifests were';\n return {\n regenerated: false,\n failure: `The value is saved, but ${what} not regenerated${lastLine ? ` (${lastLine})` : ''}. Run \\`wildo ${args.join(' ')}\\`, then restart what reads it.`,\n };\n}\n\n/** Regenerate the local runtimes' `.env` files — what every application runtime reads. */\nexport function regenerateEnvFiles(saasRoot: string, envName: string): { readonly regenerated: boolean; readonly failure: string | null } {\n return runConfigSyncDomain(saasRoot, envName, 'env-files');\n}\n\n/** The companion route that loads named variables of its regenerated `.env` into the running process. */\nexport const COMPANION_RUNTIME_ENV_APPLY_PATH = '/api/companion/runtime/env/apply';\n\n/** Long enough for a registry refresh on a loaded machine; short enough that a hung companion does not hold `set`. */\nconst COMPANION_ENV_APPLY_TIMEOUT_MS = 20_000;\n\n/** What asking the running companion to load a changed variable came to. */\ntype CompanionLoadResult =\n | { readonly kind: 'loaded' }\n | { readonly kind: 'not-running' }\n | { readonly kind: 'failed'; readonly failure: string };\n\n/**\n * Ask the RUNNING companion to load one changed variable from the `.env` just regenerated (#1637).\n *\n * The answer to a key that \"is set\" and still refused: the companion reads its `.env` once, at boot, and in\n * a created application nothing supervises it (it runs as plain `node --env-file-if-exists=.env` under\n * `pnpm -r run dev`), so there is no signal file to touch and no restart to ask for. Loading in place works\n * whether or not a supervisor exists, and it spares every run in flight, which a restart would end.\n *\n * Only the NAME is sent; the companion reads the value from its own `.env`.\n *\n * Unreachable (refused connection, no token because it never booted) is `not-running`: it then reads the key\n * at its next start, which is what would happen anyway. Anything else is `failed`, including a 404 from a\n * companion older than this route and a timeout.\n */\nasync function loadInRunningCompanion(saasRoot: string, envVarName: string): Promise<CompanionLoadResult> {\n const addresses = await loadAppLocalRuntimeServiceAddresses(saasRoot).catch(() => null);\n const options = {\n appRoot: saasRoot,\n baseUrl: addresses?.devCompanion?.url,\n port: addresses?.devCompanion?.port,\n timeoutMs: COMPANION_ENV_APPLY_TIMEOUT_MS,\n };\n try {\n await CompanionClient.post(COMPANION_RUNTIME_ENV_APPLY_PATH, { envVarNames: [envVarName] }, options);\n return { kind: 'loaded' };\n } catch (error) {\n /*\n * \"Not running\" is exactly what the client already calls UNREACHABLE — a refused or reset connection, or\n * no token because the companion never booted — so the one classifier decides both. Anything else (a\n * timeout, a hung companion, an unreadable token) is a companion that may hold the old value: a failure.\n */\n if (companionFailureExitCode(error) === COMPANION_UNREACHABLE_EXIT_CODE) return { kind: 'not-running' };\n const restart = `restart \\`wildo local dev\\` so it reads the new value.`;\n if (error instanceof CompanionRefusalError && error.status === 404) {\n return { kind: 'failed', failure: `The running companion is older than this CLI and cannot load ${envVarName} in place; ${restart}` };\n }\n return { kind: 'failed', failure: `The running companion could not load ${envVarName} (${ErrorUtils.extractErrorMessage(error)}); ${restart}` };\n }\n}\n\n/**\n * Regenerate the `.env` files and bring the change to the runtimes that receive the key. ALWAYS regenerated,\n * an UNUSED key included: unconsumed is not undelivered (the companion's `.env` carries every provider key),\n * and a removal that skipped this left the value on disk and in the running process (#1637 review, H1).\n *\n * The companion is asked to LOAD the key in place first; only when it is not running, or could not, is it\n * signalled to restart like the other runtimes. Every other runtime is restarted through its supervisor's\n * signal file.\n */\nasync function applyLocalChange(saasRoot: string, envName: string, row: SecretRequirement, options: SecretChangeOptions): Promise<Omit<SecretChangeOutcome, 'environmentAfterChange'>> {\n const restartCompanion = options.restartCompanion !== false;\n const readsKey = row.runtimes.includes(COMPANION_RUNTIME);\n const companionAppliesChange = !restartCompanion && readsKey;\n const identity = { envVarName: row.envVarName, kind: row.kind, envName };\n const regeneration = regenerateEnvFiles(saasRoot, envName);\n const signalled: string[] = [];\n let companionLoad: CompanionLoadResult | null = null;\n if (regeneration.regenerated) {\n if (restartCompanion && readsKey) companionLoad = await loadInRunningCompanion(saasRoot, row.envVarName);\n const companionHandled = !restartCompanion || companionLoad?.kind === 'loaded';\n const now = new Date();\n const runtimes = row.runtimes.filter((runtime) => !companionHandled || runtime !== COMPANION_RUNTIME);\n for (const [folder, file] of await runtimeSignalFiles(saasRoot, runtimes)) {\n utimesSync(file, now, now);\n signalled.push(folder);\n }\n }\n return {\n ...identity,\n restartSignalledRuntimes: signalled,\n envFilesRegenerated: regeneration.regenerated,\n envFilesRegenerationFailure: regeneration.failure,\n companionAppliesChange,\n companionLoadedInProcess: companionLoad?.kind === 'loaded',\n // A supervised companion restarted instead has received the change, so the failure is not worth saying.\n companionLoadFailure: companionLoad?.kind === 'failed' && !signalled.includes(COMPANION_SIGNAL_FOLDER) ? companionLoad.failure : null,\n };\n}\n\nconst REMOTE_OUTCOME = {\n restartSignalledRuntimes: [],\n envFilesRegenerated: false,\n envFilesRegenerationFailure: null,\n companionAppliesChange: false,\n companionLoadedInProcess: false,\n companionLoadFailure: null,\n} as const;\n\n/**\n * Set one secret in one environment, in the section its kind names. The value is validated, never logged.\n *\n * A key holding a PEM (`…PRIVATE_KEY`, `…CERTIFICATE`, a system of record's `certificatePem`) pasted on one\n * line with literal `\\n` is turned into real line breaks locally, exactly as the CI adapter does when it reads\n * the same secret remotely (`normalizePotentialMultilineSecret`), so both lanes hand a runtime the same\n * bytes. A remote value is stored as given, because that adapter normalizes it on the way out.\n *\n * An UNUSED key is refused: nothing consumes it, so a new value would change nothing a runtime does.\n */\nexport async function setApplicationSecret(\n saasRoot: string,\n envName: string,\n envVarName: string,\n value: string,\n options: SecretChangeOptions = {},\n): Promise<SecretChangeOutcome> {\n const inputs = await loadSecretRequirementInputs(saasRoot, { withOwners: true });\n const report = await describeEnvironmentSecrets(saasRoot, envName, inputs);\n const row = requirementFor(report, inputs, envVarName, options.kind);\n if (row.standing === ApplicationSecretStanding.UNUSED) {\n throw new Error(`Nothing consumes ${envVarName}, so setting it would change nothing. Remove it with \\`wildo secrets unset ${envVarName}\\`.`);\n }\n const problem = describeSecretValueProblem(envVarName, value, true);\n if (problem) throw new Error(problem);\n if (report.locationType === WildoLocationType.LOCAL) {\n updateLocalApplicationSecrets(envName, row.kind, { set: { [envVarName]: normalizePotentialMultilineSecret(envVarName, value.trim()) } });\n return { ...(await applyLocalChange(saasRoot, envName, row, options)), environmentAfterChange: await describeAfterChange(saasRoot, envName, inputs) };\n }\n const gap = describeDeployWorkflowGap(envName, row.kind, envVarName, saasRoot);\n if (gap) throw new Error(gap);\n setRemoteApplicationSecret(envName, row.kind, envVarName, value.trim(), saasRoot);\n return { envVarName, kind: row.kind, envName, ...REMOTE_OUTCOME, environmentAfterChange: await describeAfterChange(saasRoot, envName, inputs) };\n}\n\n/** Remove one secret from one environment — including an UNUSED one, which is what that standing is for. */\nexport async function unsetApplicationSecret(\n saasRoot: string,\n envName: string,\n envVarName: string,\n options: SecretChangeOptions = {},\n): Promise<SecretChangeOutcome> {\n const inputs = await loadSecretRequirementInputs(saasRoot, { withOwners: true });\n const report = await describeEnvironmentSecrets(saasRoot, envName, inputs);\n const row = requirementFor(report, inputs, envVarName, options.kind);\n if (report.locationType === WildoLocationType.LOCAL) {\n updateLocalApplicationSecrets(envName, row.kind, { unset: [envVarName] });\n return { ...(await applyLocalChange(saasRoot, envName, row, options)), environmentAfterChange: await describeAfterChange(saasRoot, envName, inputs) };\n }\n unsetRemoteApplicationSecret(envName, row.kind, envVarName, saasRoot);\n return { envVarName, kind: row.kind, envName, ...REMOTE_OUTCOME, environmentAfterChange: await describeAfterChange(saasRoot, envName, inputs) };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-secrets-adapter.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"ci-secrets-adapter.service.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/ci-secrets-adapter.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAGvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAgHlG;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAErG;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,YAAY,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAKpJ;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAyCD;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKpF;AAeD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,sBAAsB,CA4CxB;AAuDD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,qBAAqB,GAAE,SAAS,sBAAsB,EAAO,GAC5D;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAmB5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-secrets-adapter.service.js","sourceRoot":"","sources":["../../../../../../src/services/credentials/ci-secrets-adapter.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qDAAqD,CAAC;AAEpG,OAAO,EAAE,kCAAkC,EAAE,MAAM,2DAA2D,CAAC;AAE/G;;;GAGG;AACH,MAAM,MAAM,GAAG,eAAe,CAAC;AAE/B;;;;;;;;GAQG;AACH,MAAM,2BAA2B,GAAsB;IACrD,aAAa;IACb,iBAAiB;IACjB,gBAAgB;IAChB;;;;;;;;;;;OAWG;IACH,gBAAgB;IAChB,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;IACnB,oBAAoB;IACpB,qBAAqB;IACrB,eAAe;IACf,kBAAkB;IAClB,mBAAmB;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,SAAS,yBAAyB,CAAC,OAAe;IAChD,OAAO,OAAO;SACX,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;SAC9E,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,cAAc,GAA6C;IAC/D,GAAG,kCAAkC,CAAC,OAAO,CAC3C,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,YAAY,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC,CACjE;IACD,GAAG,2BAA2B;CAC/B,CAAC,GAA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AE,EAAE,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;SACvD,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAE3C,MAAM,QAAQ,GAAG,cAAc;SAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;SACtD,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAE3C,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAmB,CAAC;IACvD,KAAK,MAAM,KAAK,IAAI,qBAAqB,EAAE,CAAC;QAC1C,MAAM,MAAM,GAAG,6BAA6B,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QAC3E,mBAAmB,CAAC,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;IACvG,CAAC;IACD,KAAK,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,mBAAmB,EAAE,CAAC;QACvD,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAChC,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { ApplicationSecretKind } from '@wildo-ai/platform-core-shared';\n\nimport { PlatformEnvSecretsJson_Schema } from '~wildo-cli/services/credentials/credentials.schemas';\nimport type { PlatformEnvSecretsJson } from '~wildo-cli/services/credentials/credentials.schemas';\nimport { FRAMEWORK_MANAGED_SECRET_MATERIALS } from '~wildo-cli/services/credentials/framework-managed-secrets';\n\n/**\n * Prefix for all CI secret env vars.\n * GitHub Secrets are mapped to `WILDO_SECRET_*` env vars in the workflow.\n */\nconst PREFIX = 'WILDO_SECRET_';\n\n/**\n * `secrets.json` paths an OPERATOR types — the only half of the mapping that can legitimately be\n * hand-listed here, because no registry owns them.\n *\n * Everything else is FRAMEWORK-GENERATED material and is derived from\n * {@link FRAMEWORK_MANAGED_SECRET_MATERIALS} below. The admin IDENTITY fields are here while\n * `admin.password` is not, mirroring the registry's own split: the framework mints the password when\n * the operator does not supply one, and never invents an identity.\n */\nconst OPERATOR_TYPED_SECRET_PATHS: readonly string[] = [\n 'admin.email',\n 'admin.firstName',\n 'admin.lastName',\n /*\n * The SECOND administrator, who approves an application-wide access grant (#575).\n *\n * All four, INCLUDING the password, unlike the first administrator. The password is here rather\n * than derived from the registry because the approver block is `.optional()` and a framework-\n * managed key must always exist after provisioning — so `ADMIN_PASSWORD` fills the approver's\n * password without declaring it. Remotely it is operator-typed anyway, which is exactly what this\n * list is for.\n *\n * A CI-reconstructed `secrets.json` missing these rebuilds a platform with ONE administrator —\n * a platform whose widest read refuses for want of anybody able to approve the grant.\n */\n 'approver.email',\n 'approver.firstName',\n 'approver.lastName',\n 'approver.password',\n 'atlas.apiPublicKey',\n 'atlas.apiPrivateKey',\n 'github.orgUrl',\n 'github.adminUser',\n 'github.adminToken',\n];\n\n/**\n * `mongodb.rootUser` → `MONGODB_ROOT_USER`.\n *\n * The env-var name is DERIVED from the secrets path rather than paired with it by hand, and every\n * one of the 16 framework-managed suffixes this replaced comes back byte-identical — which is what\n * makes the derivation admissible rather than a rename disguised as a refactor (pinned in\n * `ci-secrets-mapping.test.ts`).\n */\nfunction envVarSuffixForSecretPath(dotPath: string): string {\n return dotPath\n .split('.')\n .map((segment) => segment.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toUpperCase())\n .join('_');\n}\n\n/**\n * Mapping from flat env var suffixes to the structured `PlatformEnvSecretsJson` paths.\n * Each entry is `[ENV_VAR_SUFFIX, dotPath]`.\n *\n * ## Why this is derived and no longer written out\n *\n * This was a hand-kept list restating a population {@link FRAMEWORK_MANAGED_SECRET_MATERIALS} owns,\n * with no mechanical link to it — and it had drifted by THREE materials: the\n * crontabs-batches-manager signing keypair, the immudb state-signing keypair and the mongot\n * sync-source credential. Each is minted on a developer machine and each was silently absent from a\n * CI-reconstructed `secrets.json`, so a pipeline-built deployment ran with the exact degradations\n * those materials exist to prevent: crontabs signing every scheduled tick with a fallback key,\n * immudb running without `--signingKey`, and mongot with no credential to authenticate to mongod.\n *\n * Deriving it means a material added to the registry tomorrow is a GitHub Secret the generated\n * workflow asks for, with no second edit to remember. The registry is itself compile-time-asserted\n * total over `FrameworkManagedSecretMaterialRef`, so the chain has no hand-maintained link left in\n * it. Identity keys are included alongside secret keys because CI must reconstruct the WHOLE\n * material — a password whose username never arrived is not a credential.\n */\nconst FIXED_MAPPINGS: ReadonlyArray<readonly [string, string]> = [\n ...FRAMEWORK_MANAGED_SECRET_MATERIALS.flatMap(\n (material) => [...material.identityKeys, ...material.secretKeys],\n ),\n ...OPERATOR_TYPED_SECRET_PATHS,\n].map((dotPath) => [envVarSuffixForSecretPath(dotPath), dotPath] as const);\n\n/** Protocol-aware provider env var prefix: `WILDO_SECRET_PROVIDER_ENV_<ENV_VAR_NAME>` */\nconst PROVIDER_ENV_PREFIX = `${PREFIX}PROVIDER_ENV_`;\n\n/**\n * System-of-record credentials (#1055). A third prefix scan rather than a row in the fixed table,\n * for the same reason as `providerEnv` one line up: the key space is open — one key per declared\n * instance per secret slot — and the fixed table's path walker cannot express a `z.record` node.\n * The instance and slot are recovered by parsing the variable name, which the `__` delimiter makes\n * unambiguous.\n */\nconst SYSTEMS_OF_RECORD_ENV_PREFIX = `${PREFIX}SYSTEMS_OF_RECORD_ENV_`;\n\n/**\n * Inbound endpoint secrets (#1596), one prefix over again:\n * `WILDO_SECRET_INBOUND_ENDPOINT_ENV_WILDO_INBOUND_<ENDPOINT_KEY>__SECRET`. Open key space, like the two above.\n */\nconst INBOUND_ENDPOINT_ENV_PREFIX = `${PREFIX}INBOUND_ENDPOINT_ENV_`;\n\n/** The GitHub Actions secret prefix each kind of application secret travels under — one per `secrets.json` section. */\nconst APPLICATION_SECRET_CI_PREFIXES: Readonly<Record<ApplicationSecretKind, string>> = {\n [ApplicationSecretKind.PROVIDER]: PROVIDER_ENV_PREFIX,\n [ApplicationSecretKind.SYSTEM_OF_RECORD]: SYSTEMS_OF_RECORD_ENV_PREFIX,\n [ApplicationSecretKind.INBOUND_ENDPOINT]: INBOUND_ENDPOINT_ENV_PREFIX,\n};\n\n/**\n * The GitHub Actions secret an application secret travels as — what the generated deploy workflow reads\n * and what `wildo secrets set --env <remote>` writes. One function, so the writer and the reader cannot\n * spell it differently, and it uses the same prefixes {@link reconstructSecretsFromEnv} scans.\n */\nexport function applicationSecretCiSecretName(kind: ApplicationSecretKind, envVarName: string): string {\n return `${APPLICATION_SECRET_CI_PREFIXES[kind]}${envVarName}`;\n}\n\n/**\n * Which application secret a GitHub secret carries, or `null` for any other secret. The three prefixes do\n * not prefix one another, so at most one matches.\n */\nexport function applicationSecretFromCiSecretName(ciSecretName: string): { readonly kind: ApplicationSecretKind; readonly envVarName: string } | null {\n for (const [kind, prefix] of Object.entries(APPLICATION_SECRET_CI_PREFIXES) as Array<[ApplicationSecretKind, string]>) {\n if (ciSecretName.startsWith(prefix) && ciSecretName.length > prefix.length) return { kind, envVarName: ciSecretName.slice(prefix.length) };\n }\n return null;\n}\n\n/**\n * One application secret a deploy workflow forwards to its job: WHICH `secrets.json` section it belongs to, the\n * variable the runtime is handed, and whether the deploy needs it. `required` only decides where the line sits in\n * the generated block; every listed secret is forwarded the same way.\n */\nexport interface ApplicationCiSecretKey {\n readonly kind: ApplicationSecretKind;\n readonly envVarName: string;\n readonly required?: boolean;\n}\n\n/**\n * One PEM block, `-----BEGIN <label>-----<body>-----END <label>-----`. The body is captured whole so\n * {@link rewrapFlattenedPemBlocks} can tell a flattened block from a wrapped one.\n */\nconst PEM_BLOCK_PATTERN = /-----BEGIN ([A-Z0-9 ]+)-----([\\s\\S]*?)-----END \\1-----/g;\n\n/**\n * Restores the line breaks of a PEM block that arrived with NONE, and leaves every other block as it is.\n *\n * A single-line input drops the line breaks of whatever is pasted into it: a masked terminal prompt, or a\n * `text`/`password` form field (HTML value sanitization). The workbench's secret field was such a field\n * until 2026-09-26, and a key file pasted into it reached `secrets.json` as one run of characters no\n * parser reads, with nothing saying so. It is a multi-line box now; the repair stays for every other door.\n *\n * Rebuilding is exact, not a guess: textual encoding permits no headers inside a block and fixes the line\n * width, so the body is base64 alone and its wrapping follows from its length.\n * spec-cite: RFC 7468 §2 — \"Generators MUST wrap the base64-encoded lines so that each line consists of\n * exactly 64 characters except for the final line\"; textual encoding does \"not define or permit headers\".\n *\n * Only a block whose body holds no line break is touched, so a key that arrived intact is byte-identical,\n * whatever width it was wrapped at. A body carrying anything besides base64 and spaces (a legacy PEM's\n * `Proc-Type:` header) is left alone: it cannot be re-wrapped safely, so it is not re-wrapped.\n */\nfunction rewrapFlattenedPemBlocks(value: string): string {\n const rewrapped = value.replace(PEM_BLOCK_PATTERN, (block, label: string, body: string) => {\n if (/[\\r\\n]/.test(body)) return block;\n const base64 = body.replace(/ +/g, '');\n if (base64.length === 0 || !/^[A-Za-z0-9+/]+=*$/.test(base64)) return block;\n const lines = base64.match(/.{1,64}/g) ?? [];\n return [`-----BEGIN ${label}-----`, ...lines, `-----END ${label}-----`].join('\\n');\n });\n /*\n * A bundle (a certificate chain, a key with its certificate) flattened the same way leaves one block's\n * END touching the next block's BEGIN. That is never valid PEM (OpenSSL: \"bad end line\"), so they are\n * separated; a bundle that arrived intact already has its line break and is not touched.\n */\n return rewrapped.replace(/(-----END [A-Z0-9 ]+-----)[ \\t]*(-----BEGIN )/g, '$1\\n$2');\n}\n\n/**\n * The value a key holding a PEM should carry, given how it arrived. Two shapes are repaired: literal `\\n`\n * escapes (a one-line GitHub secret, a one-line terminal paste), and a block whose line breaks were lost\n * altogether (a paste into a single-line input). The local and remote lanes both read a value through\n * here, so a runtime receives the same bytes from either.\n */\nexport function normalizePotentialMultilineSecret(key: string, value: string): string {\n if (!/(PRIVATE_KEY|PUBLIC_KEY|PEM|CERTIFICATE)/.test(key)) {\n return value;\n }\n return rewrapFlattenedPemBlocks(value.replace(/\\\\n/g, '\\n'));\n}\n\nfunction setNestedValue(obj: Record<string, unknown>, dotPath: string, value: string): void {\n const parts = dotPath.split('.');\n let current = obj;\n for (let i = 0; i < parts.length - 1; i++) {\n const key = parts[i];\n if (!(key in current) || typeof current[key] !== 'object' || current[key] === null) {\n current[key] = {};\n }\n current = current[key] as Record<string, unknown>;\n }\n current[parts[parts.length - 1]] = value;\n}\n\n/**\n * Reconstructs a `PlatformEnvSecretsJson` from flat environment variables.\n *\n * In CI, secrets are stored in GitHub Secrets and injected as env vars\n * with the `WILDO_SECRET_` prefix. This adapter reads them from `process.env`\n * (or a provided record) and reconstructs the structured object that\n * `PlatformEnvVarsBuilder` and `generateK8sSecrets()` expect.\n *\n * Provider secrets use the protocol-aware convention\n * `WILDO_SECRET_PROVIDER_ENV_<ENV_VAR_NAME>`.\n *\n * System-of-record secrets use the same shape one prefix over:\n * `WILDO_SECRET_SYSTEMS_OF_RECORD_ENV_WILDO_SOR_<NAME>__<SLOT>`. The double name is not redundancy —\n * the outer prefix says which SECTION the value belongs to and the inner one is the variable the\n * runtime is handed.\n *\n * @throws {ZodError} if the reconstructed object doesn't pass schema validation\n */\nexport function reconstructSecretsFromEnv(\n env: Record<string, string | undefined> = process.env,\n): PlatformEnvSecretsJson {\n const raw: Record<string, unknown> = {};\n\n for (const [suffix, dotPath] of FIXED_MAPPINGS) {\n const envKey = `${PREFIX}${suffix}`;\n const value = env[envKey];\n if (value !== undefined && value !== '') {\n setNestedValue(raw, dotPath, normalizePotentialMultilineSecret(suffix, value));\n }\n }\n\n const providerEnv: Record<string, string> = {};\n for (const [key, value] of Object.entries(env)) {\n if (key.startsWith(PROVIDER_ENV_PREFIX) && value) {\n const envVarName = key.slice(PROVIDER_ENV_PREFIX.length);\n providerEnv[envVarName] = normalizePotentialMultilineSecret(envVarName, value);\n }\n }\n if (Object.keys(providerEnv).length > 0) {\n raw.providerEnv = providerEnv;\n }\n\n const systemsOfRecordEnv: Record<string, string> = {};\n for (const [key, value] of Object.entries(env)) {\n if (key.startsWith(SYSTEMS_OF_RECORD_ENV_PREFIX) && value) {\n const envVarName = key.slice(SYSTEMS_OF_RECORD_ENV_PREFIX.length);\n systemsOfRecordEnv[envVarName] = normalizePotentialMultilineSecret(envVarName, value);\n }\n }\n if (Object.keys(systemsOfRecordEnv).length > 0) {\n raw.systemsOfRecordEnv = systemsOfRecordEnv;\n }\n\n const inboundEndpointEnv: Record<string, string> = {};\n for (const [key, value] of Object.entries(env)) {\n if (key.startsWith(INBOUND_ENDPOINT_ENV_PREFIX) && value) {\n inboundEndpointEnv[key.slice(INBOUND_ENDPOINT_ENV_PREFIX.length)] = value;\n }\n }\n if (Object.keys(inboundEndpointEnv).length > 0) {\n raw.inboundEndpointEnv = inboundEndpointEnv;\n }\n\n return PlatformEnvSecretsJson_Schema.parse(raw);\n}\n\n/**\n * Is this secrets path optional according to `PlatformEnvSecretsJson_Schema`?\n *\n * ## Why it is ASKED rather than listed\n *\n * The list this replaced described itself as \"suffixes that map to `.optional()` sections in\n * `PlatformEnvSecretsJson_Schema`\" — i.e. it was already a hand-kept restatement of an answer the\n * schema gives, one file away, and it had no way to notice a section flipping optional. Asking the\n * schema reproduces every one of its nine entries and extends for free to the three materials it\n * never knew about, all of which are `.optional()` branches: `platform.crontabsBatchesManager`,\n * `immudb` and `mongot`.\n *\n * That answer is also what makes adding them SAFE. A pipeline that is green today declares none of\n * the three; classifying them REQUIRED would have made the generated workflow demand three GitHub\n * Secrets that no existing repository has. Optional is not a hedge here — it is what the schema\n * already says, and `reconstructSecretsFromEnv` parses a payload without them today.\n *\n * A path the schema does not describe THROWS rather than defaulting either way: that means the\n * registry and the schema have drifted, and guessing would put a material into a pipeline under a\n * name nothing will ever read back.\n */\nfunction isOptionalSecretPath(dotPath: string): boolean {\n let node: z.ZodType = PlatformEnvSecretsJson_Schema;\n let optional = false;\n\n for (const segment of dotPath.split('.')) {\n // Unwrap every optional/nullable/default wrapper before looking for a shape: optionality\n // ANYWHERE on the path makes the leaf optional, because the whole branch may be absent.\n while (node.def.type === 'optional' || node.def.type === 'nullable' || node.def.type === 'default') {\n optional = true;\n node = (node.def as unknown as { innerType: z.ZodType }).innerType;\n }\n\n if (node.def.type !== 'object') {\n throw new Error(\n `Secrets path '${dotPath}' is not describable by PlatformEnvSecretsJson_Schema: `\n + `'${segment}' has no object to look in. The secret registry and the schema have drifted.`,\n );\n }\n\n const next = (node as z.ZodObject<Record<string, z.ZodType>>).shape[segment];\n if (!next) {\n throw new Error(\n `Secrets path '${dotPath}' is not declared by PlatformEnvSecretsJson_Schema (missing '${segment}'). `\n + `The secret registry and the schema have drifted.`,\n );\n }\n node = next;\n }\n\n return optional || node.def.type === 'optional';\n}\n\n/**\n * Returns the list of env var names that a CI pipeline should configure\n * as GitHub Secrets. Consumed by `wildo config sync --domain cicd` (via\n * `ci-workflow-generator.service.ts:buildSecretsEnvBlock`) to inject the\n * `${{ secrets.X }}` env block into the generated deploy workflows.\n *\n * The fixed mappings come first, then every application secret under its kind's prefix — the SAME name\n * `reconstructSecretsFromEnv` reads back into that kind's section, so a secret the job receives lands where the\n * env builder looks for it (#1650). A name listed twice is forwarded once, required if either listing says so.\n */\nexport function getRequiredCiSecretEnvVars(\n applicationSecretKeys: readonly ApplicationCiSecretKey[] = [],\n): { required: string[]; optional: string[] } {\n const required = FIXED_MAPPINGS\n .filter(([, dotPath]) => !isOptionalSecretPath(dotPath))\n .map(([suffix]) => `${PREFIX}${suffix}`);\n\n const optional = FIXED_MAPPINGS\n .filter(([, dotPath]) => isOptionalSecretPath(dotPath))\n .map(([suffix]) => `${PREFIX}${suffix}`);\n\n const applicationRequired = new Map<string, boolean>();\n for (const entry of applicationSecretKeys) {\n const ciName = applicationSecretCiSecretName(entry.kind, entry.envVarName);\n applicationRequired.set(ciName, applicationRequired.get(ciName) === true || entry.required === true);\n }\n for (const [ciName, isRequired] of applicationRequired) {\n (isRequired ? required : optional).push(ciName);\n }\n\n return { required, optional };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ci-secrets-adapter.service.js","sourceRoot":"","sources":["../../../../src/services/credentials/ci-secrets-adapter.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qDAAqD,CAAC;AAEpG,OAAO,EAAE,kCAAkC,EAAE,MAAM,2DAA2D,CAAC;AAE/G;;;GAGG;AACH,MAAM,MAAM,GAAG,eAAe,CAAC;AAE/B;;;;;;;;GAQG;AACH,MAAM,2BAA2B,GAAsB;IACrD,aAAa;IACb,iBAAiB;IACjB,gBAAgB;IAChB;;;;;;;;;;;OAWG;IACH,gBAAgB;IAChB,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;IACnB,oBAAoB;IACpB,qBAAqB;IACrB,eAAe;IACf,kBAAkB;IAClB,mBAAmB;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,SAAS,yBAAyB,CAAC,OAAe;IAChD,OAAO,OAAO;SACX,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;SAC9E,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,cAAc,GAA6C;IAC/D,GAAG,kCAAkC,CAAC,OAAO,CAC3C,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,YAAY,EAAE,GAAG,QAAQ,CAAC,UAAU,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5B,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;SACvD,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAE3C,MAAM,QAAQ,GAAG,cAAc;SAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;SACtD,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAE3C,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAmB,CAAC;IACvD,KAAK,MAAM,KAAK,IAAI,qBAAqB,EAAE,CAAC;QAC1C,MAAM,MAAM,GAAG,6BAA6B,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QAC3E,mBAAmB,CAAC,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;IACvG,CAAC;IACD,KAAK,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,mBAAmB,EAAE,CAAC;QACvD,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAChC,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { ApplicationSecretKind } from '@wildo-ai/platform-core-shared';\n\nimport { PlatformEnvSecretsJson_Schema } from '~wildo-cli/services/credentials/credentials.schemas';\nimport type { PlatformEnvSecretsJson } from '~wildo-cli/services/credentials/credentials.schemas';\nimport { FRAMEWORK_MANAGED_SECRET_MATERIALS } from '~wildo-cli/services/credentials/framework-managed-secrets';\n\n/**\n * Prefix for all CI secret env vars.\n * GitHub Secrets are mapped to `WILDO_SECRET_*` env vars in the workflow.\n */\nconst PREFIX = 'WILDO_SECRET_';\n\n/**\n * `secrets.json` paths an OPERATOR types — the only half of the mapping that can legitimately be\n * hand-listed here, because no registry owns them.\n *\n * Everything else is FRAMEWORK-GENERATED material and is derived from\n * {@link FRAMEWORK_MANAGED_SECRET_MATERIALS} below. The admin IDENTITY fields are here while\n * `admin.password` is not, mirroring the registry's own split: the framework mints the password when\n * the operator does not supply one, and never invents an identity.\n */\nconst OPERATOR_TYPED_SECRET_PATHS: readonly string[] = [\n 'admin.email',\n 'admin.firstName',\n 'admin.lastName',\n /*\n * The SECOND administrator, who approves an application-wide access grant (#575).\n *\n * All four, INCLUDING the password, unlike the first administrator. The password is here rather\n * than derived from the registry because the approver block is `.optional()` and a framework-\n * managed key must always exist after provisioning — so `ADMIN_PASSWORD` fills the approver's\n * password without declaring it. Remotely it is operator-typed anyway, which is exactly what this\n * list is for.\n *\n * A CI-reconstructed `secrets.json` missing these rebuilds a platform with ONE administrator —\n * a platform whose widest read refuses for want of anybody able to approve the grant.\n */\n 'approver.email',\n 'approver.firstName',\n 'approver.lastName',\n 'approver.password',\n 'atlas.apiPublicKey',\n 'atlas.apiPrivateKey',\n 'github.orgUrl',\n 'github.adminUser',\n 'github.adminToken',\n];\n\n/**\n * `mongodb.rootUser` → `MONGODB_ROOT_USER`.\n *\n * The env-var name is DERIVED from the secrets path rather than paired with it by hand, and every\n * one of the 16 framework-managed suffixes this replaced comes back byte-identical — which is what\n * makes the derivation admissible rather than a rename disguised as a refactor (pinned in\n * `ci-secrets-mapping.test.ts`).\n */\nfunction envVarSuffixForSecretPath(dotPath: string): string {\n return dotPath\n .split('.')\n .map((segment) => segment.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toUpperCase())\n .join('_');\n}\n\n/**\n * Mapping from flat env var suffixes to the structured `PlatformEnvSecretsJson` paths.\n * Each entry is `[ENV_VAR_SUFFIX, dotPath]`.\n *\n * ## Why this is derived and no longer written out\n *\n * This was a hand-kept list restating a population {@link FRAMEWORK_MANAGED_SECRET_MATERIALS} owns,\n * with no mechanical link to it — and it had drifted by THREE materials: the\n * crontabs-batches-manager signing keypair, the immudb state-signing keypair and the mongot\n * sync-source credential. Each is minted on a developer machine and each was silently absent from a\n * CI-reconstructed `secrets.json`, so a pipeline-built deployment ran with the exact degradations\n * those materials exist to prevent: crontabs signing every scheduled tick with a fallback key,\n * immudb running without `--signingKey`, and mongot with no credential to authenticate to mongod.\n *\n * Deriving it means a material added to the registry tomorrow is a GitHub Secret the generated\n * workflow asks for, with no second edit to remember. The registry is itself compile-time-asserted\n * total over `FrameworkManagedSecretMaterialRef`, so the chain has no hand-maintained link left in\n * it. Identity keys are included alongside secret keys because CI must reconstruct the WHOLE\n * material — a password whose username never arrived is not a credential.\n */\nconst FIXED_MAPPINGS: ReadonlyArray<readonly [string, string]> = [\n ...FRAMEWORK_MANAGED_SECRET_MATERIALS.flatMap(\n (material) => [...material.identityKeys, ...material.secretKeys],\n ),\n ...OPERATOR_TYPED_SECRET_PATHS,\n].map((dotPath) => [envVarSuffixForSecretPath(dotPath), dotPath] as const);\n\n/** Protocol-aware provider env var prefix: `WILDO_SECRET_PROVIDER_ENV_<ENV_VAR_NAME>` */\nconst PROVIDER_ENV_PREFIX = `${PREFIX}PROVIDER_ENV_`;\n\n/**\n * System-of-record credentials (#1055). A third prefix scan rather than a row in the fixed table,\n * for the same reason as `providerEnv` one line up: the key space is open — one key per declared\n * instance per secret slot — and the fixed table's path walker cannot express a `z.record` node.\n * The instance and slot are recovered by parsing the variable name, which the `__` delimiter makes\n * unambiguous.\n */\nconst SYSTEMS_OF_RECORD_ENV_PREFIX = `${PREFIX}SYSTEMS_OF_RECORD_ENV_`;\n\n/**\n * Inbound endpoint secrets (#1596), one prefix over again:\n * `WILDO_SECRET_INBOUND_ENDPOINT_ENV_WILDO_INBOUND_<ENDPOINT_KEY>__SECRET`. Open key space, like the two above.\n */\nconst INBOUND_ENDPOINT_ENV_PREFIX = `${PREFIX}INBOUND_ENDPOINT_ENV_`;\n\n/** The GitHub Actions secret prefix each kind of application secret travels under — one per `secrets.json` section. */\nconst APPLICATION_SECRET_CI_PREFIXES: Readonly<Record<ApplicationSecretKind, string>> = {\n [ApplicationSecretKind.PROVIDER]: PROVIDER_ENV_PREFIX,\n [ApplicationSecretKind.SYSTEM_OF_RECORD]: SYSTEMS_OF_RECORD_ENV_PREFIX,\n [ApplicationSecretKind.INBOUND_ENDPOINT]: INBOUND_ENDPOINT_ENV_PREFIX,\n};\n\n/**\n * The GitHub Actions secret an application secret travels as — what the generated deploy workflow reads\n * and what `wildo secrets set --env <remote>` writes. One function, so the writer and the reader cannot\n * spell it differently, and it uses the same prefixes {@link reconstructSecretsFromEnv} scans.\n */\nexport function applicationSecretCiSecretName(kind: ApplicationSecretKind, envVarName: string): string {\n return `${APPLICATION_SECRET_CI_PREFIXES[kind]}${envVarName}`;\n}\n\n/**\n * Which application secret a GitHub secret carries, or `null` for any other secret. The three prefixes do\n * not prefix one another, so at most one matches.\n */\nexport function applicationSecretFromCiSecretName(ciSecretName: string): { readonly kind: ApplicationSecretKind; readonly envVarName: string } | null {\n for (const [kind, prefix] of Object.entries(APPLICATION_SECRET_CI_PREFIXES) as Array<[ApplicationSecretKind, string]>) {\n if (ciSecretName.startsWith(prefix) && ciSecretName.length > prefix.length) return { kind, envVarName: ciSecretName.slice(prefix.length) };\n }\n return null;\n}\n\n/**\n * One application secret a deploy workflow forwards to its job: WHICH `secrets.json` section it belongs to, the\n * variable the runtime is handed, and whether the deploy needs it. `required` only decides where the line sits in\n * the generated block; every listed secret is forwarded the same way.\n */\nexport interface ApplicationCiSecretKey {\n readonly kind: ApplicationSecretKind;\n readonly envVarName: string;\n readonly required?: boolean;\n}\n\n/**\n * One PEM block, `-----BEGIN <label>-----<body>-----END <label>-----`. The body is captured whole so\n * {@link rewrapFlattenedPemBlocks} can tell a flattened block from a wrapped one.\n */\nconst PEM_BLOCK_PATTERN = /-----BEGIN ([A-Z0-9 ]+)-----([\\s\\S]*?)-----END \\1-----/g;\n\n/**\n * Restores the line breaks of a PEM block that arrived with NONE, and leaves every other block as it is.\n *\n * A single-line input drops the line breaks of whatever is pasted into it: a masked terminal prompt, or a\n * `text`/`password` form field (HTML value sanitization). The workbench's secret field was such a field\n * until 2026-09-26, and a key file pasted into it reached `secrets.json` as one run of characters no\n * parser reads, with nothing saying so. It is a multi-line box now; the repair stays for every other door.\n *\n * Rebuilding is exact, not a guess: textual encoding permits no headers inside a block and fixes the line\n * width, so the body is base64 alone and its wrapping follows from its length.\n * spec-cite: RFC 7468 §2 — \"Generators MUST wrap the base64-encoded lines so that each line consists of\n * exactly 64 characters except for the final line\"; textual encoding does \"not define or permit headers\".\n *\n * Only a block whose body holds no line break is touched, so a key that arrived intact is byte-identical,\n * whatever width it was wrapped at. A body carrying anything besides base64 and spaces (a legacy PEM's\n * `Proc-Type:` header) is left alone: it cannot be re-wrapped safely, so it is not re-wrapped.\n */\nfunction rewrapFlattenedPemBlocks(value: string): string {\n const rewrapped = value.replace(PEM_BLOCK_PATTERN, (block, label: string, body: string) => {\n if (/[\\r\\n]/.test(body)) return block;\n const base64 = body.replace(/ +/g, '');\n if (base64.length === 0 || !/^[A-Za-z0-9+/]+=*$/.test(base64)) return block;\n const lines = base64.match(/.{1,64}/g) ?? [];\n return [`-----BEGIN ${label}-----`, ...lines, `-----END ${label}-----`].join('\\n');\n });\n /*\n * A bundle (a certificate chain, a key with its certificate) flattened the same way leaves one block's\n * END touching the next block's BEGIN. That is never valid PEM (OpenSSL: \"bad end line\"), so they are\n * separated; a bundle that arrived intact already has its line break and is not touched.\n */\n return rewrapped.replace(/(-----END [A-Z0-9 ]+-----)[ \\t]*(-----BEGIN )/g, '$1\\n$2');\n}\n\n/**\n * The value a key holding a PEM should carry, given how it arrived. Two shapes are repaired: literal `\\n`\n * escapes (a one-line GitHub secret, a one-line terminal paste), and a block whose line breaks were lost\n * altogether (a paste into a single-line input). The local and remote lanes both read a value through\n * here, so a runtime receives the same bytes from either.\n */\nexport function normalizePotentialMultilineSecret(key: string, value: string): string {\n if (!/(PRIVATE_KEY|PUBLIC_KEY|PEM|CERTIFICATE)/.test(key)) {\n return value;\n }\n return rewrapFlattenedPemBlocks(value.replace(/\\\\n/g, '\\n'));\n}\n\nfunction setNestedValue(obj: Record<string, unknown>, dotPath: string, value: string): void {\n const parts = dotPath.split('.');\n let current = obj;\n for (let i = 0; i < parts.length - 1; i++) {\n const key = parts[i];\n if (!(key in current) || typeof current[key] !== 'object' || current[key] === null) {\n current[key] = {};\n }\n current = current[key] as Record<string, unknown>;\n }\n current[parts[parts.length - 1]] = value;\n}\n\n/**\n * Reconstructs a `PlatformEnvSecretsJson` from flat environment variables.\n *\n * In CI, secrets are stored in GitHub Secrets and injected as env vars\n * with the `WILDO_SECRET_` prefix. This adapter reads them from `process.env`\n * (or a provided record) and reconstructs the structured object that\n * `PlatformEnvVarsBuilder` and `generateK8sSecrets()` expect.\n *\n * Provider secrets use the protocol-aware convention\n * `WILDO_SECRET_PROVIDER_ENV_<ENV_VAR_NAME>`.\n *\n * System-of-record secrets use the same shape one prefix over:\n * `WILDO_SECRET_SYSTEMS_OF_RECORD_ENV_WILDO_SOR_<NAME>__<SLOT>`. The double name is not redundancy —\n * the outer prefix says which SECTION the value belongs to and the inner one is the variable the\n * runtime is handed.\n *\n * @throws {ZodError} if the reconstructed object doesn't pass schema validation\n */\nexport function reconstructSecretsFromEnv(\n env: Record<string, string | undefined> = process.env,\n): PlatformEnvSecretsJson {\n const raw: Record<string, unknown> = {};\n\n for (const [suffix, dotPath] of FIXED_MAPPINGS) {\n const envKey = `${PREFIX}${suffix}`;\n const value = env[envKey];\n if (value !== undefined && value !== '') {\n setNestedValue(raw, dotPath, normalizePotentialMultilineSecret(suffix, value));\n }\n }\n\n const providerEnv: Record<string, string> = {};\n for (const [key, value] of Object.entries(env)) {\n if (key.startsWith(PROVIDER_ENV_PREFIX) && value) {\n const envVarName = key.slice(PROVIDER_ENV_PREFIX.length);\n providerEnv[envVarName] = normalizePotentialMultilineSecret(envVarName, value);\n }\n }\n if (Object.keys(providerEnv).length > 0) {\n raw.providerEnv = providerEnv;\n }\n\n const systemsOfRecordEnv: Record<string, string> = {};\n for (const [key, value] of Object.entries(env)) {\n if (key.startsWith(SYSTEMS_OF_RECORD_ENV_PREFIX) && value) {\n const envVarName = key.slice(SYSTEMS_OF_RECORD_ENV_PREFIX.length);\n systemsOfRecordEnv[envVarName] = normalizePotentialMultilineSecret(envVarName, value);\n }\n }\n if (Object.keys(systemsOfRecordEnv).length > 0) {\n raw.systemsOfRecordEnv = systemsOfRecordEnv;\n }\n\n const inboundEndpointEnv: Record<string, string> = {};\n for (const [key, value] of Object.entries(env)) {\n if (key.startsWith(INBOUND_ENDPOINT_ENV_PREFIX) && value) {\n inboundEndpointEnv[key.slice(INBOUND_ENDPOINT_ENV_PREFIX.length)] = value;\n }\n }\n if (Object.keys(inboundEndpointEnv).length > 0) {\n raw.inboundEndpointEnv = inboundEndpointEnv;\n }\n\n return PlatformEnvSecretsJson_Schema.parse(raw);\n}\n\n/**\n * Is this secrets path optional according to `PlatformEnvSecretsJson_Schema`?\n *\n * ## Why it is ASKED rather than listed\n *\n * The list this replaced described itself as \"suffixes that map to `.optional()` sections in\n * `PlatformEnvSecretsJson_Schema`\" — i.e. it was already a hand-kept restatement of an answer the\n * schema gives, one file away, and it had no way to notice a section flipping optional. Asking the\n * schema reproduces every one of its nine entries and extends for free to the three materials it\n * never knew about, all of which are `.optional()` branches: `platform.crontabsBatchesManager`,\n * `immudb` and `mongot`.\n *\n * That answer is also what makes adding them SAFE. A pipeline that is green today declares none of\n * the three; classifying them REQUIRED would have made the generated workflow demand three GitHub\n * Secrets that no existing repository has. Optional is not a hedge here — it is what the schema\n * already says, and `reconstructSecretsFromEnv` parses a payload without them today.\n *\n * A path the schema does not describe THROWS rather than defaulting either way: that means the\n * registry and the schema have drifted, and guessing would put a material into a pipeline under a\n * name nothing will ever read back.\n */\nfunction isOptionalSecretPath(dotPath: string): boolean {\n let node: z.ZodType = PlatformEnvSecretsJson_Schema;\n let optional = false;\n\n for (const segment of dotPath.split('.')) {\n // Unwrap every optional/nullable/default wrapper before looking for a shape: optionality\n // ANYWHERE on the path makes the leaf optional, because the whole branch may be absent.\n while (node.def.type === 'optional' || node.def.type === 'nullable' || node.def.type === 'default') {\n optional = true;\n node = (node.def as unknown as { innerType: z.ZodType }).innerType;\n }\n\n if (node.def.type !== 'object') {\n throw new Error(\n `Secrets path '${dotPath}' is not describable by PlatformEnvSecretsJson_Schema: `\n + `'${segment}' has no object to look in. The secret registry and the schema have drifted.`,\n );\n }\n\n const next = (node as z.ZodObject<Record<string, z.ZodType>>).shape[segment];\n if (!next) {\n throw new Error(\n `Secrets path '${dotPath}' is not declared by PlatformEnvSecretsJson_Schema (missing '${segment}'). `\n + `The secret registry and the schema have drifted.`,\n );\n }\n node = next;\n }\n\n return optional || node.def.type === 'optional';\n}\n\n/**\n * Returns the list of env var names that a CI pipeline should configure\n * as GitHub Secrets. Consumed by `wildo config sync --domain cicd` (via\n * `ci-workflow-generator.service.ts:buildSecretsEnvBlock`) to inject the\n * `${{ secrets.X }}` env block into the generated deploy workflows.\n *\n * The fixed mappings come first, then every application secret under its kind's prefix — the SAME name\n * `reconstructSecretsFromEnv` reads back into that kind's section, so a secret the job receives lands where the\n * env builder looks for it (#1650). A name listed twice is forwarded once, required if either listing says so.\n */\nexport function getRequiredCiSecretEnvVars(\n applicationSecretKeys: readonly ApplicationCiSecretKey[] = [],\n): { required: string[]; optional: string[] } {\n const required = FIXED_MAPPINGS\n .filter(([, dotPath]) => !isOptionalSecretPath(dotPath))\n .map(([suffix]) => `${PREFIX}${suffix}`);\n\n const optional = FIXED_MAPPINGS\n .filter(([, dotPath]) => isOptionalSecretPath(dotPath))\n .map(([suffix]) => `${PREFIX}${suffix}`);\n\n const applicationRequired = new Map<string, boolean>();\n for (const entry of applicationSecretKeys) {\n const ciName = applicationSecretCiSecretName(entry.kind, entry.envVarName);\n applicationRequired.set(ciName, applicationRequired.get(ciName) === true || entry.required === true);\n }\n for (const [ciName, isRequired] of applicationRequired) {\n (isRequired ? required : optional).push(ciName);\n }\n\n return { required, optional };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composed-provider-catalogue.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"composed-provider-catalogue.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/composed-provider-catalogue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAGL,KAAK,8BAA8B,EACnC,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC,CAAC;AAE/F,+FAA+F;AAC/F,MAAM,WAAW,uBAAuB;IACtC,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;OAWG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,6BAA6B;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,6FAA6F;IAC7F,KAAK,EAAE,M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AI,MAAM,CAAgC;IAClD,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IACzB,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAM7G,IAAI,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC;CAC7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composed-provider-catalogue.js","sourceRoot":"","sources":["../../../../../../src/services/credentials/composed-provider-catalogue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EACL,6BAA6B,GAG9B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,yCAAyC,GAI1C,MAAM,+BAA+B,CAAC;AA4EvC,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,yDAAyD;AACzD,MAAM,uBAAuB,GAAG,IAAI,GAAG,EAAyC,CAAC;AAEjF;;;GAGG;AACH,IAAI,mBAAmB,GAAG,CAAC,CAAC;AAE5B;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,uCAAuC,CACrD,aAAuD;IAEvD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,6BAA6B,CAAC,gB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n * The COMPOSED provider catalogue — the one place the CLI's secrets layer asks\n * \"which providers exist, and which environment variables carry their credentials?\".\n *\n * ## Why this module exists (issue #329, audit finding PL-3)\n *\n * Every secrets and environment path used to answer that question from\n * `EngineBackendProviderRegistry`, a map that by construction can only ever hold the engine's\n * own modules. While every provider was engine-shipped that was invisible. It stopped being\n * true with `providers/slack` (#341), the first provider shipped as its own package, and it\n * becomes routine once the loading slice (#330) lets an application compose one.\n *\n * The consequence was not a missing feature but a SILENT SECURITY REGRESSION, in two places at\n * once:\n *\n * - a package-shipped provider's key is attributable to no provider, so it is not classified\n * sensitive — it can land in a Kubernetes `ConfigMap` instead of a `Secret`;\n * - the per-runtime confinement filter allow-listed by the same registry and KEPT any key it\n * could not attribute, \"because it is configuration rather than a provider secret\" — so the\n * key was copied into every worker and minion environment, which is exactly what LLM-driven\n * minion code can read.\n *\n * Neither logged, warned or refused. That is why the plan orders this slice BEFORE the loader.\n *\n * ## The two sources, one shape\n *\n * | tier | source | carries |\n * |---|---|---|\n * | engine | `EngineBackendProviderRegistry.modules` | metadata, capabilities, `secretsContract`, and the full `protocols[]` runtime contracts |\n * | package / application | {@link ProviderCompanionContribution} | the same, MINUS the runtime contracts (a contribution is values-free DATA, so the CLI can read a provider whose backend module it cannot import) |\n *\n * **For CLASSIFICATION and CONFINEMENT, a contribution-sourced entry loses nothing, and that is\n * measured rather than assumed.** Across all 22 engine providers, every `secretRef` named by any\n * protocol's `runtimeContract` is already an `envVarName` declared in that same provider's\n * `secretsContract` — zero exceptions, 25 occurrences. So `secretsContractShape` is a COMPLETE\n * attribution source for those two questions: a package provider that ships only a `./companion`\n * export is classified and confined exactly as well as an engine one.\n *\n * **The converse does NOT hold, and one consumer depends on it.** The contract half is a strict\n * SUPERSET of what the bindings name — 13 engine contract keys are named by no binding at all\n * (every `IMMUDB_*`, `POSTHOG_PROJECT_API_KEY`, `BETTERSTACK_SOURCE_TOKEN`,\n * `ODOO_BASE_URL`/`_DB`/`_LOGIN`) — so anything that enumerates BINDINGS rather than the contract\n * sees less than the whole provider. `wildo config sync` builds the CI\n * `WILDO_SECRET_PROVIDER_ENV_*` block that way, so a contribution-sourced provider (zero bindings)\n * contributes zero CI secret keys. That gap is pre-existing for those 13 engine keys and is\n * tracked as issue #361; do not read the paragraph above as saying `protocolBindings: []` is\n * harmless everywhere. It is harmless for the two questions this module answers.\n *\n * ## Why registration is a door rather than a constructor argument\n *\n * Discovery of an application's provider packages necessarily runs AFTER this module is\n * imported — `credentials.schemas.ts` evaluates its sensitive-key set at module load, on the\n * first import of the CLI's credential layer. So composition cannot be an argument threaded\n * from a caller; it is a registration the discovery walk performs once it knows the\n * application, and every derived view recomputes from it. See {@link catalogueGeneration}.\n *\n * The engine tier is never registered and never removed: it is the floor.\n */\n\nimport {\n EngineBackendProviderRegistry,\n type BackendProtocolBinding,\n type BackendProviderModule,\n} from '@wildo-ai/external-connectors-private/backend';\nimport {\n resolveValidatedSaasProviderContributions,\n type DiscoveredProviderCompanionContribution,\n type ValidatedSaasProviderDiscovery,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport type { ProviderCompanionContribution } from '@wildo-ai/saas-models';\n\n/**\n * The identity half a catalogue entry carries: package, tier, vendor, origin.\n *\n * Taken from the CONTRIBUTION's inferred type rather than from `ProviderIdentity`, because the\n * two disagree on `origin`: the hand-written `ProviderIdentity` narrows it to the three-member\n * union (`catalogue` present iff `GENERATED`), while the contribution schema types the field\n * straight off `z.infer`, where it is the flat object the union's members all satisfy. This is\n * therefore the widest common shape — an engine module's `ProviderMetadata` assigns to it, and a\n * contribution's does too, with no cast on either side. Narrowing the wire record is territory A's\n * decision, not this slice's.\n */\nexport type ProviderCatalogueIdentity = NonNullable<ProviderCompanionContribution['identity']>;\n\n/** One secret a provider declares, values-free. Mirrors `ProviderSecretContractShapeEntry`. */\nexport interface ProviderCatalogueSecret {\n /** The provider-owned stable slug (the `secretsContract` key). */\n slug: string;\n /** The environment variable that carries the value. */\n envVarName: string;\n /** The provider refuses to boot without it once enabled. */\n required: boolean;\n description?: string;\n /**\n * The slot's value is NOT confidential, by the provider's own declaration (#1705): it holds a vendor\n * key made for browsers (`holdsBrowserPublicValue`) or a deployment host (`holdsDeploymentHost`).\n * Only an ENGINE module can say so today — a contribution's values-free shape carries neither mark —\n * so every slot of a package- or application-shipped provider is confidential, which is the\n * fail-closed direction: the frontend public-config screen then refuses a value equal to it.\n *\n * The backend's screen reads the loaded module's contract, so it DOES honour a package slot marked\n * `holdsDeploymentHost` (the transposer emits that mark for a vendor base URL). The two producers\n * therefore disagree only in the safe direction: sync may refuse a package's host value that the\n * backend would serve. Carrying both marks through the contribution shape would remove that.\n */\n notConfidential?: true;\n}\n\n/**\n * One provider as the CLI's secrets layer sees it, whatever tier shipped it.\n *\n * Deliberately NOT `BackendProviderModule`: that type is only constructible by importing a\n * provider's backend module, which is precisely what a package-shipped provider makes\n * impossible for tooling. This is the intersection the secrets layer actually needs.\n */\nexport interface ProviderSecretsCatalogueEntry {\n providerRef: string;\n /** Operator-facing label. Falls back to the ref — a contribution carries no display name. */\n label: string;\n /** Package / tier / vendor / origin, when the source declares it. */\n identity?: ProviderCatalogueIdentity;\n providerCapabilities: readonly string[];\n /**\n * Sorted by slug. Uniqueness on both slug and env-var name is enforced by\n * `ProviderCompanionContributionSchema` at the WIRE boundary — which this door is not — so the\n * ordering is re-established here rather than assumed, and uniqueness is a caller obligation\n * that {@link registerDiscoveredProviderContributions} deliberately does not re-parse.\n */\n secrets: readonly ProviderCatalogueSecret[];\n /**\n * The provider's protocol bindings — EMPTY for a contribution-sourced entry, because a\n * runtime contract is code and a contribution is data. Consumers that need bindings must\n * tolerate the empty case rather than treating it as an unknown provider.\n */\n protocolBindings: readonly BackendProtocolBinding[];\n /**\n * The OTLP auth hint, when the source is a loadable module. A contribution does not carry it,\n * so a package-shipped telemetry provider currently yields no header — the same outcome as an\n * engine provider that declares none, and a gap owed to whichever slice makes the hint\n * companion-safe.\n */\n otlpAuth?: BackendProviderModule['otlpAuth'];\n}\n\n// ---------------------------------------------------------------------------\n// Composition state\n// ---------------------------------------------------------------------------\n\n/** Registered non-engine contributions, keyed by ref. */\nconst discoveredContributions = new Map<string, ProviderCompanionContribution>();\n\n/**\n * Bumped by every registration and reset. Derived views memoise against it, so a view computed\n * before discovery cannot survive discovery — the stale-singleton failure this slice removes.\n */\nlet catalogueGeneration = 0;\n\n/**\n * Register provider contributions discovered outside the engine registry.\n *\n * This is the door the package-provider discovery walk (#330) calls once it has resolved an\n * application's declared provider packages and read their `./companion` exports. Idempotent by\n * ref: registering the same ref twice replaces the entry rather than duplicating it, so a\n * re-run of discovery is safe.\n *\n * A ref that the ENGINE already ships is ignored, deliberately and loudly: the engine tier is\n * the floor, and a package silently shadowing an engine provider's secret contract is exactly\n * the substitution this layer must not perform.\n */\nexport function registerDiscoveredProviderContributions(\n contributions: readonly ProviderCompanionContribution[],\n): void {\n for (const contribution of contributions) {\n if (EngineBackendProviderRegistry.getProviderByRef(contribution.ref as never)) {\n // eslint-disable-next-line no-console\n console.warn(\n `[provider-catalogue] Contribution for '${contribution.ref}' is ignored: an engine-shipped `\n + 'provider already owns that ref, and the engine tier is authoritative for its secrets contract.',\n );\n continue;\n }\n discoveredContributions.set(contribution.ref, contribution);\n }\n catalogueGeneration += 1;\n}\n\n/**\n * Discover an application's provider contributions AND register them, as one step.\n *\n * ## Why the pairing, and why here (2026-09-09)\n *\n * `resolveValidatedSaasProviderContributions` already pairs the WALK with the VALIDATION, for the\n * reason its own JSDoc gives: three correct call sites with nothing making a fourth correct is the\n * shape `.claude/rules/invariant-call-site-enumeration.md` is about. This is the same defect one\n * step further along — every CLI caller resolved contributions and none of them registered the\n * result, so {@link getComposedProviderSecretsCatalogue} was ENGINE-TIER ONLY in every CLI process\n * that had, moments earlier, read the full catalogue off disk.\n *\n * What that cost is not abstract. {@link filterProviderEnvToScope} attributes a `providerEnv` key\n * by asking this catalogue which provider declares it, and drops what it cannot attribute. So an\n * application that declares `asana` in `providers.scopes.backend`, and authors the\n * `ASANA_CLIENT_ID` / `ASANA_CLIENT_SECRET` its generated secrets contract names, had both keys\n * dropped from the backend runtime's env — with a warning saying they \"belong to no provider the\n * CLI can see\", naming `asana` in the very list of providers the runtime was scoped to. Measured\n * 2026-09-09 on Wonder Todos: the drop reached every one of the catalogue-tier providers, which is\n * the entire OAuth2 connect lane, because a provider registration cannot reach the process that\n * performs the authorization-code exchange.\n *\n * It read as an authoring mistake and was a wiring gap. The engine tier worked throughout, which is\n * exactly why it survived: every provider the framework ships is registered by the floor, so the\n * only population that could reveal this is the one nobody had authored a secret for yet.\n *\n * Registration is idempotent per ref and additive, so calling this more than once in a process is\n * safe; the engine tier always wins a collision (see {@link registerDiscoveredProviderContributions}).\n */\nexport async function resolveAndRegisterSaasProviderContributions(input: {\n saasRoot: string;\n // `systemsOfRecord` decides which facet modules discovery records and whether the facet library is missing (#2013):\n // named so a caller narrowing the config keeps it in view.\n saasConfig: Pick<\n WildoSaasConfig,\n 'modules' | 'services' | 'libraries' | 'minions' | 'providers' | 'workers' | 'systemsOfRecord'\n >;\n}): Promise<ValidatedSaasProviderDiscovery> {\n const discovery = await resolveValidatedSaasProviderContributions(input);\n // Only CONTRIBUTIONS are registered: an augmentation (#1672) owns no secret, so it has no place in the\n // secrets catalogue. It rides the returned discovery to the artifact and the lock instead.\n registerDiscoveredProviderContributions(discovery.contributions);\n return discovery;\n}\n\n/**\n * Drop every registered contribution. The engine tier is untouched — it is not registered.\n *\n * Used when discovery re-runs for a different application, and by tests. A CLI process that\n * handles one application never needs it.\n */\nexport function resetDiscoveredProviderContributions(): void {\n discoveredContributions.clear();\n catalogueGeneration += 1;\n}\n\n// ---------------------------------------------------------------------------\n// The composed view\n// ---------------------------------------------------------------------------\n\nfunction entryFromEngineModule(module: BackendProviderModule): ProviderSecretsCatalogueEntry {\n const secretsContract = module.secretsContract as Record<\n string,\n { envVarName: string; required?: boolean; description?: string; holdsBrowserPublicValue?: true; holdsDeploymentHost?: true }\n >;\n return {\n providerRef: module.metadata.ref,\n label: module.metadata.displayName ?? module.metadata.ref,\n identity: {\n packageName: module.metadata.packageName,\n tier: module.metadata.tier,\n vendor: module.metadata.vendor,\n origin: module.metadata.origin,\n },\n providerCapabilities: [...module.providerCapabilities],\n secrets: Object.entries(secretsContract ?? {})\n .map(([slug, entry]) => ({\n slug,\n envVarName: entry.envVarName,\n required: Boolean(entry.required),\n description: entry.description,\n ...(entry.holdsBrowserPublicValue === true || entry.holdsDeploymentHost === true ? { notConfidential: true as const } : {}),\n }))\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: module.protocols,\n otlpAuth: module.otlpAuth,\n };\n}\n\nfunction entryFromContribution(\n contribution: ProviderCompanionContribution,\n): ProviderSecretsCatalogueEntry {\n return {\n providerRef: contribution.ref,\n // A contribution carries `identity` but no display name — the metadata field is\n // frontend-facing copy and stays out of the values-free wire record. The ref is the honest\n // fallback, and it is what an unnamed engine provider gets too.\n label: contribution.ref,\n identity: contribution.identity,\n providerCapabilities: contribution.providerCapabilities ?? [],\n secrets: (contribution.secretsContractShape ?? [])\n .map((entry) => ({\n slug: entry.slug,\n envVarName: entry.envVarName,\n required: entry.required,\n description: entry.description,\n }))\n // Re-sorted rather than trusted: the schema orders these, but this door accepts a\n // contribution object, not a parsed wire record, so the ordering is only guaranteed where it\n // is performed. The engine branch sorts for the same reason.\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: [],\n };\n}\n\nlet cachedCatalogue: ReadonlyMap<string, ProviderSecretsCatalogueEntry> | undefined;\nlet cachedCatalogueGeneration = -1;\n\n/**\n * Every provider the CLI can currently see: the engine tier, plus whatever discovery has\n * registered. Insertion order is engine-first, then registration order, so callers that sort\n * (the setup catalogue) and callers that do not (classification) both stay deterministic.\n */\nexport function getComposedProviderSecretsCatalogue(): ReadonlyMap<string, ProviderSecretsCatalogueEntry> {\n if (cachedCatalogue && cachedCatalogueGeneration === catalogueGeneration) return cachedCatalogue;\n\n const catalogue = new Map<string, ProviderSecretsCatalogueEntry>();\n for (const module of EngineBackendProviderRegistry.modules.values()) {\n catalogue.set(module.metadata.ref, entryFromEngineModule(module));\n }\n for (const contribution of discoveredContributions.values()) {\n if (catalogue.has(contribution.ref)) continue;\n catalogue.set(contribution.ref, entryFromContribution(contribution));\n }\n\n cachedCatalogue = catalogue;\n cachedCatalogueGeneration = catalogueGeneration;\n return catalogue;\n}\n\n/** One provider by ref, or `undefined` when nothing in the composed catalogue claims it. */\nexport function getComposedProviderEntry(providerRef: string): ProviderSecretsCatalogueEntry | undefined {\n return getComposedProviderSecretsCatalogue().get(providerRef);\n}\n\n/**\n * Memoise a value derived from the composed catalogue, invalidated by registration.\n *\n * The point is not speed. It is that a derived view CANNOT be a module-load snapshot: the\n * previous `PROVIDER_SENSITIVE_ENV_KEYS` was computed the moment its module was imported, which\n * is always before discovery could have run, so a composed catalogue would have been silently\n * ignored by the very classification it exists to feed.\n */\nexport function memoiseOverCatalogue<T>(compute: () => T): () => T {\n let cached: T | undefined;\n let cachedGeneration = -1;\n return () => {\n if (cachedGeneration !== catalogueGeneration) {\n cached = compute();\n cachedGeneration = catalogueGeneration;\n }\n return cached as T;\n };\n}\n\n/**\n * A `ReadonlySet<string>` whose contents are recomputed from the composed catalogue on every\n * read, rather than frozen when the module was imported.\n *\n * Exists so `PROVIDER_SENSITIVE_ENV_KEYS` and `SENSITIVE_ENV_KEYS` can keep their exported\n * NAMES and their `.has()` shape while becoming composition-aware — their consumers\n * (`k8s-secrets-generator.service.ts`, `sync.command.ts`) live outside this slice's territory\n * and must not need an edit to stay correct.\n */\nexport class LiveEnvKeySet implements ReadonlySet<string> {\n constructor(private readonly resolve: () => ReadonlySet<string>) {}\n\n get size(): number { return this.resolve().size; }\n has(key: string): boolean { return this.resolve().has(key); }\n forEach(callback: (value: string, value2: string, set: ReadonlySet<string>) => void, thisArg?: unknown): void {\n for (const key of this.resolve()) callback.call(thisArg, key, key, this);\n }\n // Return types are read OFF `ReadonlySet` rather than spelled as `IterableIterator`: the\n // standard library renamed these to `SetIterator` (which also carries `[Symbol.dispose]`) in a\n // recent lib, so a spelled-out type breaks on one lib version or the other.\n keys(): ReturnType<ReadonlySet<string>['keys']> { return this.resolve().keys(); }\n values(): ReturnType<ReadonlySet<string>['values']> { return this.resolve().values(); }\n entries(): ReturnType<ReadonlySet<string>['entries']> { return this.resolve().entries(); }\n [Symbol.iterator](): ReturnType<ReadonlySet<string>[typeof Symbol.iterator]> { return this.resolve()[Symbol.iterator](); }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"composed-provider-catalogue.js","sourceRoot":"","sources":["../../../../src/services/credentials/composed-provider-catalogue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EACL,6BAA6B,GAG9B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,yCAAyC,GAI1C,MAAM,+BAA+B,CAAC;AA4EvC,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,yDAAyD;AACzD,MAAM,uBAAuB,GAAG,IAAI,GAAG,EAAyC,CAAC;AAEjF;;;GAGG;AACH,IAAI,mBAAmB,GAAG,CAAC,CAAC;AAE5B;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,uCAAuC,CACrD,aAAuD;IAEvD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,6BAA6B,CAAC,gBAAgB,CAAC,YAAY,CAAC,GAAY,CAAC,EAAE,CAAC;YAC9E,sCAAsC;YACtC,OAAO,CAAC,IAAI,CACV,0CAA0C,YAAY,CAAC,GAAG,kCAAkC;kBAC1F,gGAAgG,CACnG,CAAC;YACF,SAAS;QACX,CAAC;QACD,uBAAuB,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC;IACD,mBAAmB,IAAI,CAAC,CAAC;AAC3B,CAAC;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,OAAO,aAAa;IACK;IAA7B,YAA6B,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;IAAG,CAAC;IAEnE,IAAI,IAAI,KAAa,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,GAAG,CAAC,GAAW,IAAa,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7D,OAAO,CAAC,QAA2E,EAAE,OAAiB;QACpG,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE;YAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;IACD,yFAAyF;IACzF,+FAA+F;IAC/F,4EAA4E;IAC5E,IAAI,KAA8C,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACjF,MAAM,KAAgD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACvF,OAAO,KAAiD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC1F,CAAC,MAAM,CAAC,QAAQ,CAAC,KAA8D,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3H","sourcesContent":["/**\n * The COMPOSED provider catalogue — the one place the CLI's secrets layer asks\n * \"which providers exist, and which environment variables carry their credentials?\".\n *\n * ## Why this module exists (issue #329, audit finding PL-3)\n *\n * Every secrets and environment path used to answer that question from\n * `EngineBackendProviderRegistry`, a map that by construction can only ever hold the engine's\n * own modules. While every provider was engine-shipped that was invisible. It stopped being\n * true with `providers/slack` (#341), the first provider shipped as its own package, and it\n * becomes routine once the loading slice (#330) lets an application compose one.\n *\n * The consequence was not a missing feature but a SILENT SECURITY REGRESSION, in two places at\n * once:\n *\n * - a package-shipped provider's key is attributable to no provider, so it is not classified\n * sensitive — it can land in a Kubernetes `ConfigMap` instead of a `Secret`;\n * - the per-runtime confinement filter allow-listed by the same registry and KEPT any key it\n * could not attribute, \"because it is configuration rather than a provider secret\" — so the\n * key was copied into every worker and minion environment, which is exactly what LLM-driven\n * minion code can read.\n *\n * Neither logged, warned or refused. That is why the plan orders this slice BEFORE the loader.\n *\n * ## The two sources, one shape\n *\n * | tier | source | carries |\n * |---|---|---|\n * | engine | `EngineBackendProviderRegistry.modules` | metadata, capabilities, `secretsContract`, and the full `protocols[]` runtime contracts |\n * | package / application | {@link ProviderCompanionContribution} | the same, MINUS the runtime contracts (a contribution is values-free DATA, so the CLI can read a provider whose backend module it cannot import) |\n *\n * **For CLASSIFICATION and CONFINEMENT, a contribution-sourced entry loses nothing, and that is\n * measured rather than assumed.** Across all 22 engine providers, every `secretRef` named by any\n * protocol's `runtimeContract` is already an `envVarName` declared in that same provider's\n * `secretsContract` — zero exceptions, 25 occurrences. So `secretsContractShape` is a COMPLETE\n * attribution source for those two questions: a package provider that ships only a `./companion`\n * export is classified and confined exactly as well as an engine one.\n *\n * **The converse does NOT hold, and one consumer depends on it.** The contract half is a strict\n * SUPERSET of what the bindings name — 13 engine contract keys are named by no binding at all\n * (every `IMMUDB_*`, `POSTHOG_PROJECT_API_KEY`, `BETTERSTACK_SOURCE_TOKEN`,\n * `ODOO_BASE_URL`/`_DB`/`_LOGIN`) — so anything that enumerates BINDINGS rather than the contract\n * sees less than the whole provider. `wildo config sync` builds the CI\n * `WILDO_SECRET_PROVIDER_ENV_*` block that way, so a contribution-sourced provider (zero bindings)\n * contributes zero CI secret keys. That gap is pre-existing for those 13 engine keys and is\n * tracked as issue #361; do not read the paragraph above as saying `protocolBindings: []` is\n * harmless everywhere. It is harmless for the two questions this module answers.\n *\n * ## Why registration is a door rather than a constructor argument\n *\n * Discovery of an application's provider packages necessarily runs AFTER this module is\n * imported — `credentials.schemas.ts` evaluates its sensitive-key set at module load, on the\n * first import of the CLI's credential layer. So composition cannot be an argument threaded\n * from a caller; it is a registration the discovery walk performs once it knows the\n * application, and every derived view recomputes from it. See {@link catalogueGeneration}.\n *\n * The engine tier is never registered and never removed: it is the floor.\n */\n\nimport {\n EngineBackendProviderRegistry,\n type BackendProtocolBinding,\n type BackendProviderModule,\n} from '@wildo-ai/external-connectors-private/backend';\nimport {\n resolveValidatedSaasProviderContributions,\n type DiscoveredProviderCompanionContribution,\n type ValidatedSaasProviderDiscovery,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport type { ProviderCompanionContribution } from '@wildo-ai/saas-models';\n\n/**\n * The identity half a catalogue entry carries: package, tier, vendor, origin.\n *\n * Taken from the CONTRIBUTION's inferred type rather than from `ProviderIdentity`, because the\n * two disagree on `origin`: the hand-written `ProviderIdentity` narrows it to the three-member\n * union (`catalogue` present iff `GENERATED`), while the contribution schema types the field\n * straight off `z.infer`, where it is the flat object the union's members all satisfy. This is\n * therefore the widest common shape — an engine module's `ProviderMetadata` assigns to it, and a\n * contribution's does too, with no cast on either side. Narrowing the wire record is territory A's\n * decision, not this slice's.\n */\nexport type ProviderCatalogueIdentity = NonNullable<ProviderCompanionContribution['identity']>;\n\n/** One secret a provider declares, values-free. Mirrors `ProviderSecretContractShapeEntry`. */\nexport interface ProviderCatalogueSecret {\n /** The provider-owned stable slug (the `secretsContract` key). */\n slug: string;\n /** The environment variable that carries the value. */\n envVarName: string;\n /** The provider refuses to boot without it once enabled. */\n required: boolean;\n description?: string;\n /**\n * The slot's value is NOT confidential, by the provider's own declaration (#1705): it holds a vendor\n * key made for browsers (`holdsBrowserPublicValue`) or a deployment host (`holdsDeploymentHost`).\n * Only an ENGINE module can say so today — a contribution's values-free shape carries neither mark —\n * so every slot of a package- or application-shipped provider is confidential, which is the\n * fail-closed direction: the frontend public-config screen then refuses a value equal to it.\n *\n * The backend's screen reads the loaded module's contract, so it DOES honour a package slot marked\n * `holdsDeploymentHost` (the transposer emits that mark for a vendor base URL). The two producers\n * therefore disagree only in the safe direction: sync may refuse a package's host value that the\n * backend would serve. Carrying both marks through the contribution shape would remove that.\n */\n notConfidential?: true;\n}\n\n/**\n * One provider as the CLI's secrets layer sees it, whatever tier shipped it.\n *\n * Deliberately NOT `BackendProviderModule`: that type is only constructible by importing a\n * provider's backend module, which is precisely what a package-shipped provider makes\n * impossible for tooling. This is the intersection the secrets layer actually needs.\n */\nexport interface ProviderSecretsCatalogueEntry {\n providerRef: string;\n /** Operator-facing label. Falls back to the ref — a contribution carries no display name. */\n label: string;\n /** Package / tier / vendor / origin, when the source declares it. */\n identity?: ProviderCatalogueIdentity;\n providerCapabilities: readonly string[];\n /**\n * Sorted by slug. Uniqueness on both slug and env-var name is enforced by\n * `ProviderCompanionContributionSchema` at the WIRE boundary — which this door is not — so the\n * ordering is re-established here rather than assumed, and uniqueness is a caller obligation\n * that {@link registerDiscoveredProviderContributions} deliberately does not re-parse.\n */\n secrets: readonly ProviderCatalogueSecret[];\n /**\n * The provider's protocol bindings — EMPTY for a contribution-sourced entry, because a\n * runtime contract is code and a contribution is data. Consumers that need bindings must\n * tolerate the empty case rather than treating it as an unknown provider.\n */\n protocolBindings: readonly BackendProtocolBinding[];\n /**\n * The OTLP auth hint, when the source is a loadable module. A contribution does not carry it,\n * so a package-shipped telemetry provider currently yields no header — the same outcome as an\n * engine provider that declares none, and a gap owed to whichever slice makes the hint\n * companion-safe.\n */\n otlpAuth?: BackendProviderModule['otlpAuth'];\n}\n\n// ---------------------------------------------------------------------------\n// Composition state\n// ---------------------------------------------------------------------------\n\n/** Registered non-engine contributions, keyed by ref. */\nconst discoveredContributions = new Map<string, ProviderCompanionContribution>();\n\n/**\n * Bumped by every registration and reset. Derived views memoise against it, so a view computed\n * before discovery cannot survive discovery — the stale-singleton failure this slice removes.\n */\nlet catalogueGeneration = 0;\n\n/**\n * Register provider contributions discovered outside the engine registry.\n *\n * This is the door the package-provider discovery walk (#330) calls once it has resolved an\n * application's declared provider packages and read their `./companion` exports. Idempotent by\n * ref: registering the same ref twice replaces the entry rather than duplicating it, so a\n * re-run of discovery is safe.\n *\n * A ref that the ENGINE already ships is ignored, deliberately and loudly: the engine tier is\n * the floor, and a package silently shadowing an engine provider's secret contract is exactly\n * the substitution this layer must not perform.\n */\nexport function registerDiscoveredProviderContributions(\n contributions: readonly ProviderCompanionContribution[],\n): void {\n for (const contribution of contributions) {\n if (EngineBackendProviderRegistry.getProviderByRef(contribution.ref as never)) {\n // eslint-disable-next-line no-console\n console.warn(\n `[provider-catalogue] Contribution for '${contribution.ref}' is ignored: an engine-shipped `\n + 'provider already owns that ref, and the engine tier is authoritative for its secrets contract.',\n );\n continue;\n }\n discoveredContributions.set(contribution.ref, contribution);\n }\n catalogueGeneration += 1;\n}\n\n/**\n * Discover an application's provider contributions AND register them, as one step.\n *\n * ## Why the pairing, and why here (2026-09-09)\n *\n * `resolveValidatedSaasProviderContributions` already pairs the WALK with the VALIDATION, for the\n * reason its own JSDoc gives: three correct call sites with nothing making a fourth correct is the\n * shape `.claude/rules/invariant-call-site-enumeration.md` is about. This is the same defect one\n * step further along — every CLI caller resolved contributions and none of them registered the\n * result, so {@link getComposedProviderSecretsCatalogue} was ENGINE-TIER ONLY in every CLI process\n * that had, moments earlier, read the full catalogue off disk.\n *\n * What that cost is not abstract. {@link filterProviderEnvToScope} attributes a `providerEnv` key\n * by asking this catalogue which provider declares it, and drops what it cannot attribute. So an\n * application that declares `asana` in `providers.scopes.backend`, and authors the\n * `ASANA_CLIENT_ID` / `ASANA_CLIENT_SECRET` its generated secrets contract names, had both keys\n * dropped from the backend runtime's env — with a warning saying they \"belong to no provider the\n * CLI can see\", naming `asana` in the very list of providers the runtime was scoped to. Measured\n * 2026-09-09 on Wonder Todos: the drop reached every one of the catalogue-tier providers, which is\n * the entire OAuth2 connect lane, because a provider registration cannot reach the process that\n * performs the authorization-code exchange.\n *\n * It read as an authoring mistake and was a wiring gap. The engine tier worked throughout, which is\n * exactly why it survived: every provider the framework ships is registered by the floor, so the\n * only population that could reveal this is the one nobody had authored a secret for yet.\n *\n * Registration is idempotent per ref and additive, so calling this more than once in a process is\n * safe; the engine tier always wins a collision (see {@link registerDiscoveredProviderContributions}).\n */\nexport async function resolveAndRegisterSaasProviderContributions(input: {\n saasRoot: string;\n // `systemsOfRecord` decides which facet modules discovery records and whether the facet library is missing (#2013):\n // named so a caller narrowing the config keeps it in view.\n saasConfig: Pick<\n WildoSaasConfig,\n 'modules' | 'services' | 'libraries' | 'minions' | 'providers' | 'workers' | 'systemsOfRecord'\n >;\n}): Promise<ValidatedSaasProviderDiscovery> {\n const discovery = await resolveValidatedSaasProviderContributions(input);\n // Only CONTRIBUTIONS are registered: an augmentation (#1672) owns no secret, so it has no place in the\n // secrets catalogue. It rides the returned discovery to the artifact and the lock instead.\n registerDiscoveredProviderContributions(discovery.contributions);\n return discovery;\n}\n\n/**\n * Drop every registered contribution. The engine tier is untouched — it is not registered.\n *\n * Used when discovery re-runs for a different application, and by tests. A CLI process that\n * handles one application never needs it.\n */\nexport function resetDiscoveredProviderContributions(): void {\n discoveredContributions.clear();\n catalogueGeneration += 1;\n}\n\n// ---------------------------------------------------------------------------\n// The composed view\n// ---------------------------------------------------------------------------\n\nfunction entryFromEngineModule(module: BackendProviderModule): ProviderSecretsCatalogueEntry {\n const secretsContract = module.secretsContract as Record<\n string,\n { envVarName: string; required?: boolean; description?: string; holdsBrowserPublicValue?: true; holdsDeploymentHost?: true }\n >;\n return {\n providerRef: module.metadata.ref,\n label: module.metadata.displayName ?? module.metadata.ref,\n identity: {\n packageName: module.metadata.packageName,\n tier: module.metadata.tier,\n vendor: module.metadata.vendor,\n origin: module.metadata.origin,\n },\n providerCapabilities: [...module.providerCapabilities],\n secrets: Object.entries(secretsContract ?? {})\n .map(([slug, entry]) => ({\n slug,\n envVarName: entry.envVarName,\n required: Boolean(entry.required),\n description: entry.description,\n ...(entry.holdsBrowserPublicValue === true || entry.holdsDeploymentHost === true ? { notConfidential: true as const } : {}),\n }))\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: module.protocols,\n otlpAuth: module.otlpAuth,\n };\n}\n\nfunction entryFromContribution(\n contribution: ProviderCompanionContribution,\n): ProviderSecretsCatalogueEntry {\n return {\n providerRef: contribution.ref,\n // A contribution carries `identity` but no display name — the metadata field is\n // frontend-facing copy and stays out of the values-free wire record. The ref is the honest\n // fallback, and it is what an unnamed engine provider gets too.\n label: contribution.ref,\n identity: contribution.identity,\n providerCapabilities: contribution.providerCapabilities ?? [],\n secrets: (contribution.secretsContractShape ?? [])\n .map((entry) => ({\n slug: entry.slug,\n envVarName: entry.envVarName,\n required: entry.required,\n description: entry.description,\n }))\n // Re-sorted rather than trusted: the schema orders these, but this door accepts a\n // contribution object, not a parsed wire record, so the ordering is only guaranteed where it\n // is performed. The engine branch sorts for the same reason.\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: [],\n };\n}\n\nlet cachedCatalogue: ReadonlyMap<string, ProviderSecretsCatalogueEntry> | undefined;\nlet cachedCatalogueGeneration = -1;\n\n/**\n * Every provider the CLI can currently see: the engine tier, plus whatever discovery has\n * registered. Insertion order is engine-first, then registration order, so callers that sort\n * (the setup catalogue) and callers that do not (classification) both stay deterministic.\n */\nexport function getComposedProviderSecretsCatalogue(): ReadonlyMap<string, ProviderSecretsCatalogueEntry> {\n if (cachedCatalogue && cachedCatalogueGeneration === catalogueGeneration) return cachedCatalogue;\n\n const catalogue = new Map<string, ProviderSecretsCatalogueEntry>();\n for (const module of EngineBackendProviderRegistry.modules.values()) {\n catalogue.set(module.metadata.ref, entryFromEngineModule(module));\n }\n for (const contribution of discoveredContributions.values()) {\n if (catalogue.has(contribution.ref)) continue;\n catalogue.set(contribution.ref, entryFromContribution(contribution));\n }\n\n cachedCatalogue = catalogue;\n cachedCatalogueGeneration = catalogueGeneration;\n return catalogue;\n}\n\n/** One provider by ref, or `undefined` when nothing in the composed catalogue claims it. */\nexport function getComposedProviderEntry(providerRef: string): ProviderSecretsCatalogueEntry | undefined {\n return getComposedProviderSecretsCatalogue().get(providerRef);\n}\n\n/**\n * Memoise a value derived from the composed catalogue, invalidated by registration.\n *\n * The point is not speed. It is that a derived view CANNOT be a module-load snapshot: the\n * previous `PROVIDER_SENSITIVE_ENV_KEYS` was computed the moment its module was imported, which\n * is always before discovery could have run, so a composed catalogue would have been silently\n * ignored by the very classification it exists to feed.\n */\nexport function memoiseOverCatalogue<T>(compute: () => T): () => T {\n let cached: T | undefined;\n let cachedGeneration = -1;\n return () => {\n if (cachedGeneration !== catalogueGeneration) {\n cached = compute();\n cachedGeneration = catalogueGeneration;\n }\n return cached as T;\n };\n}\n\n/**\n * A `ReadonlySet<string>` whose contents are recomputed from the composed catalogue on every\n * read, rather than frozen when the module was imported.\n *\n * Exists so `PROVIDER_SENSITIVE_ENV_KEYS` and `SENSITIVE_ENV_KEYS` can keep their exported\n * NAMES and their `.has()` shape while becoming composition-aware — their consumers\n * (`k8s-secrets-generator.service.ts`, `sync.command.ts`) live outside this slice's territory\n * and must not need an edit to stay correct.\n */\nexport class LiveEnvKeySet implements ReadonlySet<string> {\n constructor(private readonly resolve: () => ReadonlySet<string>) {}\n\n get size(): number { return this.resolve().size; }\n has(key: string): boolean { return this.resolve().has(key); }\n forEach(callback: (value: string, value2: string, set: ReadonlySet<string>) => void, thisArg?: unknown): void {\n for (const key of this.resolve()) callback.call(thisArg, key, key, this);\n }\n // Return types are read OFF `ReadonlySet` rather than spelled as `IterableIterator`: the\n // standard library renamed these to `SetIterator` (which also carries `[Symbol.dispose]`) in a\n // recent lib, so a spelled-out type breaks on one lib version or the other.\n keys(): ReturnType<ReadonlySet<string>['keys']> { return this.resolve().keys(); }\n values(): ReturnType<ReadonlySet<string>['values']> { return this.resolve().values(); }\n entries(): ReturnType<ReadonlySet<string>['entries']> { return this.resolve().entries(); }\n [Symbol.iterator](): ReturnType<ReadonlySet<string>[typeof Symbol.iterator]> { return this.resolve()[Symbol.iterator](); }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"credentials.schemas.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/credentials.schemas.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAIL,oBAAoB,EAIpB,cAAc,EAGd,sBAAsB,EAEtB,iBAAiB,EACjB,qBAAqB,EAMtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAa3D,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,oBAAY,wBAAwB;IAClC,sBAAsB,2BAA2B;IACjD,0BAA0B,+BAA+B;IACzD,yBAAyB,8BAA8B;IACvD,yBAAyB,8BAA8B;CACxD;AAED;;;;;;;;;;;;;;GAcG;AACH,oBAAY,2BAA2B;IACrC,yBAAyB,8BAA8B;IACvD,6BAA6B,kCAAkC;IAC/D,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;CAC9D;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAMD,eAAO,MAAM,yDAAyD;;;;;;CAM5D,CAAC;AA8BX,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAKlD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