@mesh-tech/mesh-cli 0.20.1 → 0.20.3
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/README.md +6 -5
- package/dist/bin/mesh.d.ts +0 -12
- package/dist/bin/mesh.js +99 -50
- package/dist/bin/mesh.js.map +2 -3
- package/dist/build-info.json +2 -2
- package/dist/src/commands/agent-api-client.d.ts +0 -70
- package/dist/src/commands/agent-api-client.js +0 -80
- package/dist/src/commands/app-check.d.ts +0 -56
- package/dist/src/commands/app-check.js +0 -72
- package/dist/src/commands/artifacts.d.ts +0 -11
- package/dist/src/commands/artifacts.js +0 -33
- package/dist/src/commands/cluster.d.ts +0 -39
- package/dist/src/commands/cluster.js +0 -73
- package/dist/src/commands/conversations.d.ts +0 -36
- package/dist/src/commands/conversations.js +0 -59
- package/dist/src/commands/create-app.d.ts +4 -88
- package/dist/src/commands/create-app.js +16 -155
- package/dist/src/commands/db/connect.d.ts +0 -7
- package/dist/src/commands/db/connect.js +0 -9
- package/dist/src/commands/db/credentials.d.ts +0 -7
- package/dist/src/commands/db/credentials.js +0 -10
- package/dist/src/commands/db/env.d.ts +0 -6
- package/dist/src/commands/db/env.js +0 -14
- package/dist/src/commands/db/exec.d.ts +0 -43
- package/dist/src/commands/db/exec.js +0 -69
- package/dist/src/commands/db/index.d.ts +0 -10
- package/dist/src/commands/db/index.js +0 -10
- package/dist/src/commands/db/psql.d.ts +0 -7
- package/dist/src/commands/db/psql.js +0 -18
- package/dist/src/commands/deploy.d.ts +0 -38
- package/dist/src/commands/deploy.js +1 -76
- package/dist/src/commands/dev-doctor.d.ts +0 -82
- package/dist/src/commands/dev-doctor.js +3 -132
- package/dist/src/commands/dev-launch.d.ts +0 -52
- package/dist/src/commands/dev-launch.js +0 -56
- package/dist/src/commands/dev-token-server.d.ts +0 -18
- package/dist/src/commands/dev-token-server.js +1 -24
- package/dist/src/commands/dev.d.ts +0 -246
- package/dist/src/commands/dev.js +5 -963
- package/dist/src/commands/docs.d.ts +0 -1
- package/dist/src/commands/docs.js +0 -12
- package/dist/src/commands/hub/index.d.ts +0 -60
- package/dist/src/commands/hub/index.js +2 -139
- package/dist/src/commands/init/wizard.d.ts +5 -116
- package/dist/src/commands/init/wizard.js +42 -110
- package/dist/src/commands/init.d.ts +0 -55
- package/dist/src/commands/init.js +0 -70
- package/dist/src/commands/install-shim.d.ts +0 -23
- package/dist/src/commands/install-shim.js +2 -29
- package/dist/src/commands/local/auth-provision.d.ts +0 -80
- package/dist/src/commands/local/auth-provision.js +0 -109
- package/dist/src/commands/local/dev-local.d.ts +0 -91
- package/dist/src/commands/local/dev-local.js +0 -147
- package/dist/src/commands/local/docker-runner.d.ts +0 -22
- package/dist/src/commands/local/docker-runner.js +2 -35
- package/dist/src/commands/local/helpers.d.ts +0 -14
- package/dist/src/commands/local/helpers.js +0 -13
- package/dist/src/commands/local/hub-local.d.ts +0 -96
- package/dist/src/commands/local/hub-local.js +0 -111
- package/dist/src/commands/local/index.d.ts +0 -14
- package/dist/src/commands/local/index.js +0 -86
- package/dist/src/commands/local/mocks.d.ts +0 -269
- package/dist/src/commands/local/mocks.js +1 -274
- package/dist/src/commands/local/seed-hub-catalog.d.ts +0 -25
- package/dist/src/commands/local/seed-hub-catalog.js +0 -41
- package/dist/src/commands/local/seed-zitadel.d.ts +0 -82
- package/dist/src/commands/local/seed-zitadel.js +0 -158
- package/dist/src/commands/local/seed.d.ts +0 -64
- package/dist/src/commands/local/seed.js +0 -78
- package/dist/src/commands/local/stack.d.ts +0 -141
- package/dist/src/commands/local/stack.js +0 -153
- package/dist/src/commands/login.d.ts +0 -265
- package/dist/src/commands/login.js +4 -418
- package/dist/src/commands/peer-addressing.d.ts +0 -39
- package/dist/src/commands/peer-addressing.js +0 -37
- package/dist/src/commands/port-ownership.d.ts +0 -44
- package/dist/src/commands/port-ownership.js +0 -47
- package/dist/src/commands/registry-publish.d.ts +0 -1
- package/dist/src/commands/registry-publish.js +0 -46
- package/dist/src/commands/registry.d.ts +4 -237
- package/dist/src/commands/registry.js +2 -316
- package/dist/src/commands/secrets/exec.d.ts +0 -16
- package/dist/src/commands/secrets/exec.js +0 -24
- package/dist/src/commands/secrets/index.d.ts +0 -9
- package/dist/src/commands/secrets/index.js +0 -10
- package/dist/src/commands/secrets/migrate-config.d.ts +0 -17
- package/dist/src/commands/secrets/migrate-config.js +0 -40
- package/dist/src/commands/secrets/reindex.d.ts +0 -38
- package/dist/src/commands/secrets/reindex.js +0 -39
- package/dist/src/commands/secrets/set.d.ts +0 -47
- package/dist/src/commands/secrets/set.js +0 -107
- package/dist/src/commands/site.d.ts +0 -1
- package/dist/src/commands/site.js +0 -61
- package/dist/src/commands/skills.d.ts +0 -61
- package/dist/src/commands/skills.js +0 -83
- package/dist/src/commands/stack.d.ts +0 -15
- package/dist/src/commands/stack.js +1 -128
- package/dist/src/commands/temporal.d.ts +0 -30
- package/dist/src/commands/temporal.js.map +0 -1
- package/dist/src/commands/tenant.d.ts +0 -31
- package/dist/src/commands/tenant.js +0 -55
- package/dist/src/commands/tunnel/index.d.ts +0 -40
- package/dist/src/commands/tunnel/index.js +0 -141
- package/dist/src/commands/vcs/clone.d.ts +0 -1
- package/dist/src/commands/vcs/clone.js +0 -4
- package/dist/src/commands/vcs/common.d.ts +0 -32
- package/dist/src/commands/vcs/common.js +0 -41
- package/dist/src/commands/vcs/drafts.d.ts +0 -1
- package/dist/src/commands/vcs/drafts.js +0 -1
- package/dist/src/commands/vcs/get.d.ts +0 -1
- package/dist/src/commands/vcs/get.js +0 -11
- package/dist/src/commands/vcs/index.d.ts +0 -1
- package/dist/src/commands/vcs/index.js +0 -1
- package/dist/src/commands/vcs/propose.d.ts +0 -26
- package/dist/src/commands/vcs/propose.js +3 -34
- package/dist/src/commands/vcs/review.d.ts +0 -1
- package/dist/src/commands/vcs/review.js +0 -1
- package/dist/src/commands/vcs/rm.d.ts +0 -11
- package/dist/src/commands/vcs/rm.js +0 -14
- package/dist/src/commands/vcs-enrich.d.ts +0 -12
- package/dist/src/commands/vcs-enrich.js +0 -12
- package/dist/src/commands/vpn/index.d.ts +0 -17
- package/dist/src/commands/vpn/index.js +0 -102
- package/dist/src/commands/vpn/tunnel.d.ts +0 -9
- package/dist/src/commands/vpn/tunnel.js +0 -37
- package/dist/src/commands/workflow.d.ts +0 -22
- package/dist/src/commands/workflow.js +0 -80
- package/dist/src/docs/assemble.d.ts +0 -117
- package/dist/src/docs/assemble.js +0 -142
- package/dist/src/docs/cli-reference.d.ts +0 -58
- package/dist/src/docs/cli-reference.js +0 -77
- package/dist/src/docs/discover.d.ts +0 -40
- package/dist/src/docs/discover.js +2 -60
- package/dist/src/docs/portal.d.ts +0 -44
- package/dist/src/docs/portal.js +0 -49
- package/dist/src/docs/registry-docs.d.ts +0 -29
- package/dist/src/docs/registry-docs.js +0 -40
- package/dist/src/docs/schema.d.ts +0 -36
- package/dist/src/docs/schema.js +0 -52
- package/dist/src/docs/serve.d.ts +0 -18
- package/dist/src/docs/serve.js +2 -30
- package/dist/src/docs/start.d.ts +0 -42
- package/dist/src/docs/start.js +0 -70
- package/dist/src/eval/agent-eval.d.mts +0 -12
- package/dist/src/eval/agent-eval.mjs +0 -22
- package/dist/src/index.d.ts +0 -6
- package/dist/src/index.js.map +0 -1
- package/dist/src/program.d.ts +0 -20
- package/dist/src/program.js +0 -24
- package/dist/src/utils/auth-preflight.d.ts +0 -137
- package/dist/src/utils/auth-preflight.js +0 -149
- package/dist/src/utils/aws-auth.d.ts +0 -163
- package/dist/src/utils/aws-auth.js +3 -232
- package/dist/src/utils/bastion.d.ts +0 -27
- package/dist/src/utils/bastion.js +0 -28
- package/dist/src/utils/build-info.d.ts +0 -22
- package/dist/src/utils/build-info.js +0 -27
- package/dist/src/utils/cache-home.d.ts +0 -23
- package/dist/src/utils/cache-home.js +0 -25
- package/dist/src/utils/capture-history.d.ts +0 -54
- package/dist/src/utils/capture-history.js +1 -55
- package/dist/src/utils/context.d.ts +0 -23
- package/dist/src/utils/context.js +0 -43
- package/dist/src/utils/credentials.d.ts +0 -38
- package/dist/src/utils/credentials.js +0 -39
- package/dist/src/utils/deploy-preflight.d.ts +0 -38
- package/dist/src/utils/deploy-preflight.js +1 -71
- package/dist/src/utils/errors.d.ts +0 -53
- package/dist/src/utils/errors.js +0 -49
- package/dist/src/utils/first-party-contexts.d.ts +0 -38
- package/dist/src/utils/first-party-contexts.js +0 -44
- package/dist/src/utils/index.d.ts +0 -4
- package/dist/src/utils/index.js +0 -4
- package/dist/src/utils/kubeconfig.d.ts +0 -40
- package/dist/src/utils/kubeconfig.js +0 -44
- package/dist/src/utils/log.d.ts +0 -20
- package/dist/src/utils/log.js +0 -20
- package/dist/src/utils/mesh-json.d.ts +0 -46
- package/dist/src/utils/mesh-json.js +0 -39
- package/dist/src/utils/pid.d.ts +0 -42
- package/dist/src/utils/pid.js +0 -48
- package/dist/src/utils/pulumi-run.d.ts +0 -14
- package/dist/src/utils/pulumi-run.js +0 -42
- package/dist/src/utils/pulumi.d.ts +0 -34
- package/dist/src/utils/pulumi.js +0 -38
- package/dist/src/utils/reachability.d.ts +0 -27
- package/dist/src/utils/reachability.js +0 -40
- package/dist/src/utils/recover-conversation.d.ts +0 -110
- package/dist/src/utils/recover-conversation.js +0 -108
- package/dist/src/utils/registry-broker.d.ts +5 -84
- package/dist/src/utils/registry-broker.js +0 -62
- package/dist/src/utils/registry-identity.d.ts +0 -149
- package/dist/src/utils/registry-identity.js +0 -143
- package/dist/src/utils/scaffold-versions.d.ts +0 -41
- package/dist/src/utils/scaffold-versions.js +0 -42
- package/dist/src/utils/socks-forward.d.ts +0 -24
- package/dist/src/utils/socks-forward.js +2 -25
- package/dist/src/utils/stack-flag.d.ts +0 -13
- package/dist/src/utils/stack-flag.js +0 -21
- package/dist/src/utils/tailscale-targets.d.ts +0 -37
- package/dist/src/utils/tailscale-targets.js +0 -33
- package/dist/src/utils/tailscale.d.ts +0 -177
- package/dist/src/utils/tailscale.js +6 -337
- package/dist/src/utils/temporal-auth.d.ts +0 -41
- package/dist/src/utils/temporal-auth.js +0 -52
- package/dist/src/utils/temporal-codec.d.ts +0 -89
- package/dist/src/utils/temporal-codec.js.map +0 -1
- package/dist/src/utils/tunnel-ownership.d.ts +0 -79
- package/dist/src/utils/tunnel-ownership.js +0 -74
- package/dist/src/utils/vpn-join.d.ts +0 -16
- package/dist/src/utils/vpn-join.js +0 -17
- package/dist/src/utils/vpn.d.ts +0 -42
- package/dist/src/utils/vpn.js +0 -52
- package/dist/src/utils/workflow-fingerprint.d.ts +0 -39
- package/dist/src/utils/workflow-fingerprint.js +1 -63
- package/dist/src/utils/worktree-identity.d.ts +0 -62
- package/dist/src/utils/worktree-identity.js +0 -88
- package/package.json +1 -1
- package/skills/core/SKILL.md +10 -11
- package/templates/api-auth/api/src/index.ts.hbs +1 -1
- package/templates/api-auth/api/src/spicedb-http-provider.ts.hbs +2 -2
- package/templates/api-role-gating/api/src/authn.ts.hbs +2 -2
- package/templates/api-role-gating/index.ts.hbs +1 -1
- package/templates/api-role-gating/skills/develop/SKILL.md.hbs +1 -1
- package/templates/platform-repo/core/Pulumi.{{tenant}}-{{env}}.yaml.hbs +2 -2
- package/templates/platform-repo/platform/index.ts +1 -1
- package/dist/bin/mesh.d.ts.map +0 -1
- package/dist/src/commands/agent-api-client.d.ts.map +0 -1
- package/dist/src/commands/agent-api-client.js.map +0 -1
- package/dist/src/commands/app-check.d.ts.map +0 -1
- package/dist/src/commands/app-check.js.map +0 -1
- package/dist/src/commands/artifacts.d.ts.map +0 -1
- package/dist/src/commands/artifacts.js.map +0 -1
- package/dist/src/commands/cluster.d.ts.map +0 -1
- package/dist/src/commands/cluster.js.map +0 -1
- package/dist/src/commands/conversations.d.ts.map +0 -1
- package/dist/src/commands/conversations.js.map +0 -1
- package/dist/src/commands/create-app.d.ts.map +0 -1
- package/dist/src/commands/create-app.js.map +0 -1
- package/dist/src/commands/db/connect.d.ts.map +0 -1
- package/dist/src/commands/db/connect.js.map +0 -1
- package/dist/src/commands/db/credentials.d.ts.map +0 -1
- package/dist/src/commands/db/credentials.js.map +0 -1
- package/dist/src/commands/db/env.d.ts.map +0 -1
- package/dist/src/commands/db/env.js.map +0 -1
- package/dist/src/commands/db/exec.d.ts.map +0 -1
- package/dist/src/commands/db/exec.js.map +0 -1
- package/dist/src/commands/db/index.d.ts.map +0 -1
- package/dist/src/commands/db/index.js.map +0 -1
- package/dist/src/commands/db/psql.d.ts.map +0 -1
- package/dist/src/commands/db/psql.js.map +0 -1
- package/dist/src/commands/deploy.d.ts.map +0 -1
- package/dist/src/commands/deploy.js.map +0 -1
- package/dist/src/commands/dev-doctor.d.ts.map +0 -1
- package/dist/src/commands/dev-doctor.js.map +0 -1
- package/dist/src/commands/dev-launch.d.ts.map +0 -1
- package/dist/src/commands/dev-launch.js.map +0 -1
- package/dist/src/commands/dev-token-server.d.ts.map +0 -1
- package/dist/src/commands/dev-token-server.js.map +0 -1
- package/dist/src/commands/dev.d.ts.map +0 -1
- package/dist/src/commands/dev.js.map +0 -1
- package/dist/src/commands/docs.d.ts.map +0 -1
- package/dist/src/commands/docs.js.map +0 -1
- package/dist/src/commands/hub/index.d.ts.map +0 -1
- package/dist/src/commands/hub/index.js.map +0 -1
- package/dist/src/commands/init/wizard.d.ts.map +0 -1
- package/dist/src/commands/init/wizard.js.map +0 -1
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js.map +0 -1
- package/dist/src/commands/install-shim.d.ts.map +0 -1
- package/dist/src/commands/install-shim.js.map +0 -1
- package/dist/src/commands/local/auth-provision.d.ts.map +0 -1
- package/dist/src/commands/local/auth-provision.js.map +0 -1
- package/dist/src/commands/local/dev-local.d.ts.map +0 -1
- package/dist/src/commands/local/dev-local.js.map +0 -1
- package/dist/src/commands/local/docker-runner.d.ts.map +0 -1
- package/dist/src/commands/local/docker-runner.js.map +0 -1
- package/dist/src/commands/local/helpers.d.ts.map +0 -1
- package/dist/src/commands/local/helpers.js.map +0 -1
- package/dist/src/commands/local/hub-local.d.ts.map +0 -1
- package/dist/src/commands/local/hub-local.js.map +0 -1
- package/dist/src/commands/local/index.d.ts.map +0 -1
- package/dist/src/commands/local/index.js.map +0 -1
- package/dist/src/commands/local/mocks.d.ts.map +0 -1
- package/dist/src/commands/local/mocks.js.map +0 -1
- package/dist/src/commands/local/seed-hub-catalog.d.ts.map +0 -1
- package/dist/src/commands/local/seed-hub-catalog.js.map +0 -1
- package/dist/src/commands/local/seed-zitadel.d.ts.map +0 -1
- package/dist/src/commands/local/seed-zitadel.js.map +0 -1
- package/dist/src/commands/local/seed.d.ts.map +0 -1
- package/dist/src/commands/local/seed.js.map +0 -1
- package/dist/src/commands/local/stack.d.ts.map +0 -1
- package/dist/src/commands/local/stack.js.map +0 -1
- package/dist/src/commands/login.d.ts.map +0 -1
- package/dist/src/commands/login.js.map +0 -1
- package/dist/src/commands/peer-addressing.d.ts.map +0 -1
- package/dist/src/commands/peer-addressing.js.map +0 -1
- package/dist/src/commands/port-ownership.d.ts.map +0 -1
- package/dist/src/commands/port-ownership.js.map +0 -1
- package/dist/src/commands/registry-publish.d.ts.map +0 -1
- package/dist/src/commands/registry-publish.js.map +0 -1
- package/dist/src/commands/registry.d.ts.map +0 -1
- package/dist/src/commands/registry.js.map +0 -1
- package/dist/src/commands/secrets/exec.d.ts.map +0 -1
- package/dist/src/commands/secrets/exec.js.map +0 -1
- package/dist/src/commands/secrets/index.d.ts.map +0 -1
- package/dist/src/commands/secrets/index.js.map +0 -1
- package/dist/src/commands/secrets/migrate-config.d.ts.map +0 -1
- package/dist/src/commands/secrets/migrate-config.js.map +0 -1
- package/dist/src/commands/secrets/reindex.d.ts.map +0 -1
- package/dist/src/commands/secrets/reindex.js.map +0 -1
- package/dist/src/commands/secrets/set.d.ts.map +0 -1
- package/dist/src/commands/secrets/set.js.map +0 -1
- package/dist/src/commands/site.d.ts.map +0 -1
- package/dist/src/commands/site.js.map +0 -1
- package/dist/src/commands/skills.d.ts.map +0 -1
- package/dist/src/commands/skills.js.map +0 -1
- package/dist/src/commands/stack.d.ts.map +0 -1
- package/dist/src/commands/stack.js.map +0 -1
- package/dist/src/commands/temporal.d.ts.map +0 -1
- package/dist/src/commands/tenant.d.ts.map +0 -1
- package/dist/src/commands/tenant.js.map +0 -1
- package/dist/src/commands/tunnel/index.d.ts.map +0 -1
- package/dist/src/commands/tunnel/index.js.map +0 -1
- package/dist/src/commands/vcs/clone.d.ts.map +0 -1
- package/dist/src/commands/vcs/clone.js.map +0 -1
- package/dist/src/commands/vcs/common.d.ts.map +0 -1
- package/dist/src/commands/vcs/common.js.map +0 -1
- package/dist/src/commands/vcs/drafts.d.ts.map +0 -1
- package/dist/src/commands/vcs/drafts.js.map +0 -1
- package/dist/src/commands/vcs/get.d.ts.map +0 -1
- package/dist/src/commands/vcs/get.js.map +0 -1
- package/dist/src/commands/vcs/index.d.ts.map +0 -1
- package/dist/src/commands/vcs/index.js.map +0 -1
- package/dist/src/commands/vcs/propose.d.ts.map +0 -1
- package/dist/src/commands/vcs/propose.js.map +0 -1
- package/dist/src/commands/vcs/review.d.ts.map +0 -1
- package/dist/src/commands/vcs/review.js.map +0 -1
- package/dist/src/commands/vcs/rm.d.ts.map +0 -1
- package/dist/src/commands/vcs/rm.js.map +0 -1
- package/dist/src/commands/vcs-enrich.d.ts.map +0 -1
- package/dist/src/commands/vcs-enrich.js.map +0 -1
- package/dist/src/commands/vpn/index.d.ts.map +0 -1
- package/dist/src/commands/vpn/index.js.map +0 -1
- package/dist/src/commands/vpn/tunnel.d.ts.map +0 -1
- package/dist/src/commands/vpn/tunnel.js.map +0 -1
- package/dist/src/commands/workflow.d.ts.map +0 -1
- package/dist/src/commands/workflow.js.map +0 -1
- package/dist/src/docs/assemble.d.ts.map +0 -1
- package/dist/src/docs/assemble.js.map +0 -1
- package/dist/src/docs/cli-reference.d.ts.map +0 -1
- package/dist/src/docs/cli-reference.js.map +0 -1
- package/dist/src/docs/discover.d.ts.map +0 -1
- package/dist/src/docs/discover.js.map +0 -1
- package/dist/src/docs/portal.d.ts.map +0 -1
- package/dist/src/docs/portal.js.map +0 -1
- package/dist/src/docs/registry-docs.d.ts.map +0 -1
- package/dist/src/docs/registry-docs.js.map +0 -1
- package/dist/src/docs/schema.d.ts.map +0 -1
- package/dist/src/docs/schema.js.map +0 -1
- package/dist/src/docs/serve.d.ts.map +0 -1
- package/dist/src/docs/serve.js.map +0 -1
- package/dist/src/docs/start.d.ts.map +0 -1
- package/dist/src/docs/start.js.map +0 -1
- package/dist/src/eval/agent-eval.d.mts.map +0 -1
- package/dist/src/eval/agent-eval.mjs.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/program.d.ts.map +0 -1
- package/dist/src/program.js.map +0 -1
- package/dist/src/utils/auth-preflight.d.ts.map +0 -1
- package/dist/src/utils/auth-preflight.js.map +0 -1
- package/dist/src/utils/aws-auth.d.ts.map +0 -1
- package/dist/src/utils/aws-auth.js.map +0 -1
- package/dist/src/utils/bastion.d.ts.map +0 -1
- package/dist/src/utils/bastion.js.map +0 -1
- package/dist/src/utils/build-info.d.ts.map +0 -1
- package/dist/src/utils/build-info.js.map +0 -1
- package/dist/src/utils/cache-home.d.ts.map +0 -1
- package/dist/src/utils/cache-home.js.map +0 -1
- package/dist/src/utils/capture-history.d.ts.map +0 -1
- package/dist/src/utils/capture-history.js.map +0 -1
- package/dist/src/utils/context.d.ts.map +0 -1
- package/dist/src/utils/context.js.map +0 -1
- package/dist/src/utils/credentials.d.ts.map +0 -1
- package/dist/src/utils/credentials.js.map +0 -1
- package/dist/src/utils/deploy-preflight.d.ts.map +0 -1
- package/dist/src/utils/deploy-preflight.js.map +0 -1
- package/dist/src/utils/errors.d.ts.map +0 -1
- package/dist/src/utils/errors.js.map +0 -1
- package/dist/src/utils/first-party-contexts.d.ts.map +0 -1
- package/dist/src/utils/first-party-contexts.js.map +0 -1
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/kubeconfig.d.ts.map +0 -1
- package/dist/src/utils/kubeconfig.js.map +0 -1
- package/dist/src/utils/log.d.ts.map +0 -1
- package/dist/src/utils/log.js.map +0 -1
- package/dist/src/utils/mesh-json.d.ts.map +0 -1
- package/dist/src/utils/mesh-json.js.map +0 -1
- package/dist/src/utils/pid.d.ts.map +0 -1
- package/dist/src/utils/pid.js.map +0 -1
- package/dist/src/utils/pulumi-run.d.ts.map +0 -1
- package/dist/src/utils/pulumi-run.js.map +0 -1
- package/dist/src/utils/pulumi.d.ts.map +0 -1
- package/dist/src/utils/pulumi.js.map +0 -1
- package/dist/src/utils/reachability.d.ts.map +0 -1
- package/dist/src/utils/reachability.js.map +0 -1
- package/dist/src/utils/recover-conversation.d.ts.map +0 -1
- package/dist/src/utils/recover-conversation.js.map +0 -1
- package/dist/src/utils/registry-broker.d.ts.map +0 -1
- package/dist/src/utils/registry-broker.js.map +0 -1
- package/dist/src/utils/registry-identity.d.ts.map +0 -1
- package/dist/src/utils/registry-identity.js.map +0 -1
- package/dist/src/utils/scaffold-versions.d.ts.map +0 -1
- package/dist/src/utils/scaffold-versions.js.map +0 -1
- package/dist/src/utils/socks-forward.d.ts.map +0 -1
- package/dist/src/utils/socks-forward.js.map +0 -1
- package/dist/src/utils/stack-flag.d.ts.map +0 -1
- package/dist/src/utils/stack-flag.js.map +0 -1
- package/dist/src/utils/tailscale-targets.d.ts.map +0 -1
- package/dist/src/utils/tailscale-targets.js.map +0 -1
- package/dist/src/utils/tailscale.d.ts.map +0 -1
- package/dist/src/utils/tailscale.js.map +0 -1
- package/dist/src/utils/temporal-auth.d.ts.map +0 -1
- package/dist/src/utils/temporal-auth.js.map +0 -1
- package/dist/src/utils/temporal-codec.d.ts.map +0 -1
- package/dist/src/utils/tunnel-ownership.d.ts.map +0 -1
- package/dist/src/utils/tunnel-ownership.js.map +0 -1
- package/dist/src/utils/vpn-join.d.ts.map +0 -1
- package/dist/src/utils/vpn-join.js.map +0 -1
- package/dist/src/utils/vpn.d.ts.map +0 -1
- package/dist/src/utils/vpn.js.map +0 -1
- package/dist/src/utils/workflow-fingerprint.d.ts.map +0 -1
- package/dist/src/utils/workflow-fingerprint.js.map +0 -1
- package/dist/src/utils/worktree-identity.d.ts.map +0 -1
- package/dist/src/utils/worktree-identity.js.map +0 -1
|
@@ -1,109 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* App-tenant auth auto-provisioning for the local platform — the local analog
|
|
3
|
-
* of what the Pulumi components do in the cloud, per the approved Zitadel
|
|
4
|
-
* tenant-auth pattern (Org / Project / Application / Service User):
|
|
5
|
-
*
|
|
6
|
-
* Org = app tenant (ZitadelTenantIdentity parity)
|
|
7
|
-
* Project = one per app, (ZitadelAppIdentity parity —
|
|
8
|
-
* name = authz schema namespace the app IS the authz boundary)
|
|
9
|
-
* Application = one per service inside it (API app, Basic creds)
|
|
10
|
-
* Secret = mesh/{tenant}/{env}/apps/{app}/zitadel/{service}
|
|
11
|
-
* (ministack Secrets Manager — same canonical path as cloud)
|
|
12
|
-
*
|
|
13
|
-
* `mesh dev --local` calls this on startup so scaffolding + running an app
|
|
14
|
-
* auto-creates its auth config — no Pulumi deploy, no manual Zitadel steps.
|
|
15
|
-
* Idempotent: search-before-create everywhere; the credential secret is only
|
|
16
|
-
* written when the application is first created (Zitadel returns the secret
|
|
17
|
-
* once).
|
|
18
|
-
*/
|
|
19
1
|
export interface AppTenantAuthArgs {
|
|
20
|
-
/** App tenant (org name), e.g. "acme" */
|
|
21
2
|
tenant: string;
|
|
22
|
-
/** App name = project name = authz schema namespace */
|
|
23
3
|
app: string;
|
|
24
|
-
/** Service names → one API application each (api, worker, …) */
|
|
25
4
|
services: string[];
|
|
26
|
-
/**
|
|
27
|
-
* App-declared project roles (package.json → mesh.auth.roles). Created on
|
|
28
|
-
* the app's Zitadel project and granted to the local `{app}-m2m` caller so
|
|
29
|
-
* role-scoped services (roles claim → scopes) accept its tokens.
|
|
30
|
-
*/
|
|
31
5
|
roles?: string[];
|
|
32
6
|
}
|
|
33
7
|
export interface ProvisionedAuth {
|
|
34
8
|
orgId: string;
|
|
35
9
|
projectId: string;
|
|
36
|
-
/** Services whose application (and secret) was created this run */
|
|
37
10
|
created: string[];
|
|
38
11
|
}
|
|
39
12
|
export declare function authSecretPath(tenant: string, app: string, service: string): string;
|
|
40
|
-
/**
|
|
41
|
-
* Register the running app in the local platform registry — the same
|
|
42
|
-
* self-registration path deployed apps use (/mesh-platform/{tenant}/{env}/
|
|
43
|
-
* apps/{app}/meta), so StackPort (and the local Hub once its images land)
|
|
44
|
-
* can visualize local apps.
|
|
45
|
-
*/
|
|
46
13
|
export declare function registerLocalApp(args: AppTenantAuthArgs & {
|
|
47
14
|
ports?: Record<string, number>;
|
|
48
|
-
/** ExternalService names the app's services consume (ExternalService.link()
|
|
49
|
-
* parity) — the Hub derives Integrations consumers + uptime from these. */
|
|
50
15
|
links?: string[];
|
|
51
|
-
/** The app's own version (its package.json), stamped like a deploy. */
|
|
52
16
|
version?: string;
|
|
53
|
-
/** Service kind discriminators from the session's dev output. A
|
|
54
|
-
* `"dagster"` entry makes this registration also write the Dagster
|
|
55
|
-
* discovery record the Hub's Data section reads. */
|
|
56
17
|
kinds?: Record<string, string>;
|
|
57
18
|
}): Promise<string>;
|
|
58
|
-
/**
|
|
59
|
-
* Reconcile the platform registry from Zitadel — every app-tenant org (and
|
|
60
|
-
* its projects = apps, applications = services) provisioned in Zitadel gets
|
|
61
|
-
* a Hub-readable registration, even if the app hasn't been run since it was
|
|
62
|
-
* provisioned. Zitadel is the auth source of truth; the registry mirrors it,
|
|
63
|
-
* exactly like the cloud where ZitadelTenantIdentity/ZitadelAppIdentity and
|
|
64
|
-
* the app's self-registration both flow from the same deploy. Idempotent:
|
|
65
|
-
* existing per-stack registrations (which carry live ports/URLs from
|
|
66
|
-
* `mesh dev --local`) are never overwritten.
|
|
67
|
-
*/
|
|
68
19
|
export declare function reconcileRegistryFromZitadel(): Promise<{
|
|
69
20
|
tenants: string[];
|
|
70
21
|
apps: number;
|
|
71
22
|
}>;
|
|
72
|
-
/**
|
|
73
|
-
* Ensure a service has a BROWSER sign-in, not just an API client.
|
|
74
|
-
*
|
|
75
|
-
* `ensureServiceApp` gives every service a Zitadel **API** application, which is
|
|
76
|
-
* what a machine caller authenticates with. A person cannot sign in to one:
|
|
77
|
-
* there is no authorization endpoint and no redirect URI, so the Hub's
|
|
78
|
-
* Access → Sign-in tab reports the app has no browser login and refuses to
|
|
79
|
-
* create a user — correctly, since the account would have nowhere to log in.
|
|
80
|
-
*
|
|
81
|
-
* An app declares which of its services carry a login in `package.json`:
|
|
82
|
-
*
|
|
83
|
-
* ```json
|
|
84
|
-
* { "mesh": { "auth": { "signIn": ["ui"] } } }
|
|
85
|
-
* ```
|
|
86
|
-
*
|
|
87
|
-
* which mirrors what the Pulumi program expresses as a `web` OIDC application
|
|
88
|
-
* on `ZitadelAppIdentity`. Deployed, the redirect URI comes from the service's
|
|
89
|
-
* public hostname; locally it is the port `mesh dev` allocated, so this runs
|
|
90
|
-
* AFTER port allocation and re-asserts the URIs on every launch — a session
|
|
91
|
-
* that lands on a different port must not leave the previous one registered as
|
|
92
|
-
* the only valid callback.
|
|
93
|
-
*
|
|
94
|
-
* Idempotent, and best-effort at the call site: a missing sign-in app degrades
|
|
95
|
-
* the Access tab, it does not stop the dev loop.
|
|
96
|
-
*/
|
|
97
23
|
export declare function ensureSignInApp(args: {
|
|
98
24
|
tenant: string;
|
|
99
25
|
app: string;
|
|
100
26
|
service: string;
|
|
101
|
-
/** Origin the service is reachable at, e.g. `http://localhost:40881`. */
|
|
102
27
|
baseUrl: string;
|
|
103
28
|
}): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Ensure the app tenant's full auth config exists (org → project →
|
|
106
|
-
* application-per-service → credential secrets).
|
|
107
|
-
*/
|
|
108
29
|
export declare function ensureAppTenantAuth(args: AppTenantAuthArgs): Promise<ProvisionedAuth>;
|
|
109
|
-
//# sourceMappingURL=auth-provision.d.ts.map
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* App-tenant auth auto-provisioning for the local platform — the local analog
|
|
3
|
-
* of what the Pulumi components do in the cloud, per the approved Zitadel
|
|
4
|
-
* tenant-auth pattern (Org / Project / Application / Service User):
|
|
5
|
-
*
|
|
6
|
-
* Org = app tenant (ZitadelTenantIdentity parity)
|
|
7
|
-
* Project = one per app, (ZitadelAppIdentity parity —
|
|
8
|
-
* name = authz schema namespace the app IS the authz boundary)
|
|
9
|
-
* Application = one per service inside it (API app, Basic creds)
|
|
10
|
-
* Secret = mesh/{tenant}/{env}/apps/{app}/zitadel/{service}
|
|
11
|
-
* (ministack Secrets Manager — same canonical path as cloud)
|
|
12
|
-
*
|
|
13
|
-
* `mesh dev --local` calls this on startup so scaffolding + running an app
|
|
14
|
-
* auto-creates its auth config — no Pulumi deploy, no manual Zitadel steps.
|
|
15
|
-
* Idempotent: search-before-create everywhere; the credential secret is only
|
|
16
|
-
* written when the application is first created (Zitadel returns the secret
|
|
17
|
-
* once).
|
|
18
|
-
*/
|
|
19
1
|
import { logInfo, logSuccess } from "../../utils/log.js";
|
|
20
2
|
import { LOCAL_ENV, LOCAL_AWS_CONFIG, registerTenantEnv } from "./seed.js";
|
|
21
3
|
import { api, readSeederPat, PLATFORM_ORG, ensureZitadelProject, searchZitadelApp } from "./seed-zitadel.js";
|
|
@@ -35,8 +17,6 @@ async function ensureOrg(pat, name) {
|
|
|
35
17
|
return created.organizationId;
|
|
36
18
|
}
|
|
37
19
|
const ensureProject = (pat, orgId, name) => ensureZitadelProject(pat, name, { orgId, describe: "app" });
|
|
38
|
-
/** Ensure the service's API application exists; returns fresh credentials
|
|
39
|
-
* when it was created this run. */
|
|
40
20
|
async function ensureServiceApp(pat, orgId, projectId, service) {
|
|
41
21
|
const existing = await searchZitadelApp(pat, projectId, service, orgId);
|
|
42
22
|
if (existing) {
|
|
@@ -46,7 +26,6 @@ async function ensureServiceApp(pat, orgId, projectId, service) {
|
|
|
46
26
|
logSuccess(`Created Zitadel application '${service}' (service)`);
|
|
47
27
|
return { created: true, clientId: created.clientId, clientSecret: created.clientSecret };
|
|
48
28
|
}
|
|
49
|
-
/** Ensure the app-declared project roles exist (idempotent). */
|
|
50
29
|
async function ensureProjectRoles(pat, orgId, projectId, roles) {
|
|
51
30
|
if (roles.length === 0)
|
|
52
31
|
return;
|
|
@@ -59,13 +38,6 @@ async function ensureProjectRoles(pat, orgId, projectId, roles) {
|
|
|
59
38
|
logSuccess(`Created project role '${key}'`);
|
|
60
39
|
}
|
|
61
40
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Ensure the app's LOCAL M2M caller: a machine user (`{app}-m2m`) with a
|
|
64
|
-
* client-credentials secret, granted the app project (+ declared roles).
|
|
65
|
-
* API applications are resource servers — they cannot obtain tokens — so
|
|
66
|
-
* without this there is no way to mint a caller token against the local
|
|
67
|
-
* Zitadel at all. Secret stored at mesh/{tenant}/dev/apps/{app}/zitadel/m2m.
|
|
68
|
-
*/
|
|
69
41
|
async function ensureM2mCaller(pat, tenant, app, orgId, projectId, roles) {
|
|
70
42
|
const userName = `${app}-m2m`;
|
|
71
43
|
const search = await api(pat, "POST", "/management/v1/users/_search", { queries: [{ userNameQuery: { userName, method: "TEXT_QUERY_METHOD_EQUALS" } }] }, orgId);
|
|
@@ -77,8 +49,6 @@ async function ensureM2mCaller(pat, tenant, app, orgId, projectId, roles) {
|
|
|
77
49
|
createdUser = true;
|
|
78
50
|
logSuccess(`Created machine user '${userName}' (local M2M caller)`);
|
|
79
51
|
}
|
|
80
|
-
// Grant the project (+ declared roles); on re-runs update the existing
|
|
81
|
-
// grant so newly-declared roles apply.
|
|
82
52
|
try {
|
|
83
53
|
await api(pat, "POST", `/management/v1/users/${userId}/grants`, { projectId, roleKeys: roles }, orgId);
|
|
84
54
|
}
|
|
@@ -93,10 +63,6 @@ async function ensureM2mCaller(pat, tenant, app, orgId, projectId, roles) {
|
|
|
93
63
|
await api(pat, "PUT", `/management/v1/users/${userId}/grants/${grantId}`, { roleKeys: roles }, orgId);
|
|
94
64
|
}
|
|
95
65
|
catch (updateErr) {
|
|
96
|
-
// Zitadel 400s a no-op update ("User grant has not been changed",
|
|
97
|
-
// COMMAND-Rs8fy) — the grant already carries the declared roles.
|
|
98
|
-
// Anything else is real. Must not throw here: aborting mid-provision
|
|
99
|
-
// skips the secret (re-)mint below and leaves callers without creds.
|
|
100
66
|
const ue = updateErr;
|
|
101
67
|
if (!/has not been changed/i.test(String(ue.message)))
|
|
102
68
|
throw updateErr;
|
|
@@ -126,20 +92,11 @@ async function writeAuthSecret(tenant, app, service, value) {
|
|
|
126
92
|
await upsertLocalSecret(name, value);
|
|
127
93
|
logSuccess(`Stored service credentials → ${name}`);
|
|
128
94
|
}
|
|
129
|
-
/**
|
|
130
|
-
* Register the running app in the local platform registry — the same
|
|
131
|
-
* self-registration path deployed apps use (/mesh-platform/{tenant}/{env}/
|
|
132
|
-
* apps/{app}/meta), so StackPort (and the local Hub once its images land)
|
|
133
|
-
* can visualize local apps.
|
|
134
|
-
*/
|
|
135
95
|
export async function registerLocalApp(args) {
|
|
136
96
|
const { SSMClient, PutParameterCommand } = await import("@aws-sdk/client-ssm");
|
|
137
97
|
const ssm = new SSMClient(LOCAL_AWS_CONFIG);
|
|
138
98
|
const put = (name, value, description) => ssm.send(new PutParameterCommand({ Name: name, Type: "String", Overwrite: true, Value: JSON.stringify(value), Description: description }));
|
|
139
|
-
// The app's tenant + env must be registered for the Hub to list the app.
|
|
140
99
|
await registerTenantEnv(args.tenant);
|
|
141
|
-
// Per-stack registration in the exact shape hub-api's SSM assembler reads
|
|
142
|
-
// (stack "local" = the mesh dev --local runtime).
|
|
143
100
|
const namespace = `${args.tenant}-${LOCAL_ENV}-${args.app}`;
|
|
144
101
|
const base = `/mesh-platform/${args.tenant}/${LOCAL_ENV}/apps/${args.app}/stacks/local`;
|
|
145
102
|
await put(base, {
|
|
@@ -159,14 +116,6 @@ export async function registerLocalApp(args) {
|
|
|
159
116
|
...(!isMock && args.links?.length ? { links: args.links } : {}),
|
|
160
117
|
}, `Local service registration (${service})`);
|
|
161
118
|
}
|
|
162
|
-
// Dagster registration — the local counterpart of the SSM Export a deployed
|
|
163
|
-
// DagsterInstance writes ({kind, graphqlUrl, uiUrl} at …/stacks/{stack}/dagster),
|
|
164
|
-
// which is the record hub-api's discoverDagsterInstances() filters on; the
|
|
165
|
-
// plain services/{name} entry above is invisible to Dagster discovery.
|
|
166
|
-
// graphqlUrl uses host.docker.internal: the consumer is the CONTAINERIZED
|
|
167
|
-
// hub-api (`mesh start`), which must cross the Docker boundary to reach the
|
|
168
|
-
// host `dg dev` process. uiUrl stays localhost — it is opened in the
|
|
169
|
-
// developer's browser, where host.docker.internal does not resolve.
|
|
170
119
|
for (const service of args.services) {
|
|
171
120
|
if (args.kinds?.[service] !== "dagster")
|
|
172
121
|
continue;
|
|
@@ -179,10 +128,6 @@ export async function registerLocalApp(args) {
|
|
|
179
128
|
uiUrl: `http://localhost:${port}`,
|
|
180
129
|
}, `Local Dagster discovery record (${service})`);
|
|
181
130
|
}
|
|
182
|
-
// Worker registration — the shape deployed TemporalWorker components
|
|
183
|
-
// write; hub-api discovers a tenant's Temporal namespaces from these, so
|
|
184
|
-
// the tenant-wide workflows view finds local runs without an explicit
|
|
185
|
-
// namespace filter. Template convention: worker services are named so.
|
|
186
131
|
for (const service of args.services) {
|
|
187
132
|
if (!/worker/i.test(service))
|
|
188
133
|
continue;
|
|
@@ -192,27 +137,12 @@ export async function registerLocalApp(args) {
|
|
|
192
137
|
runtime: "mesh-dev-local",
|
|
193
138
|
services: args.services,
|
|
194
139
|
ports: args.ports ?? {},
|
|
195
|
-
// The same two fields a deployed stack stamps, so the Hub's app list and
|
|
196
|
-
// its activity timeline read a local run exactly as they read a deploy —
|
|
197
|
-
// which version of this app is running here, and since when. Without them
|
|
198
|
-
// a local app shows a blank version and never appears on the timeline,
|
|
199
|
-
// and "deployments aren't tracked" is indistinguishable from "no deploys".
|
|
200
140
|
...(args.version ? { version: args.version } : {}),
|
|
201
141
|
deployedAt: new Date().toISOString(),
|
|
202
142
|
}, "Local run metadata (mesh dev --local)");
|
|
203
143
|
logSuccess(`Registered app in the local registry → ${base}`);
|
|
204
144
|
return base;
|
|
205
145
|
}
|
|
206
|
-
/**
|
|
207
|
-
* Reconcile the platform registry from Zitadel — every app-tenant org (and
|
|
208
|
-
* its projects = apps, applications = services) provisioned in Zitadel gets
|
|
209
|
-
* a Hub-readable registration, even if the app hasn't been run since it was
|
|
210
|
-
* provisioned. Zitadel is the auth source of truth; the registry mirrors it,
|
|
211
|
-
* exactly like the cloud where ZitadelTenantIdentity/ZitadelAppIdentity and
|
|
212
|
-
* the app's self-registration both flow from the same deploy. Idempotent:
|
|
213
|
-
* existing per-stack registrations (which carry live ports/URLs from
|
|
214
|
-
* `mesh dev --local`) are never overwritten.
|
|
215
|
-
*/
|
|
216
146
|
export async function reconcileRegistryFromZitadel() {
|
|
217
147
|
const pat = readSeederPat();
|
|
218
148
|
const { SSMClient, GetParameterCommand, PutParameterCommand } = await import("@aws-sdk/client-ssm");
|
|
@@ -222,7 +152,6 @@ export async function reconcileRegistryFromZitadel() {
|
|
|
222
152
|
let apps = 0;
|
|
223
153
|
for (const org of orgs?.result ?? []) {
|
|
224
154
|
const tenant = org?.name;
|
|
225
|
-
// The platform org holds platform-service auth config, not an app tenant.
|
|
226
155
|
if (!tenant || tenant === PLATFORM_ORG)
|
|
227
156
|
continue;
|
|
228
157
|
await registerTenantEnv(tenant);
|
|
@@ -267,39 +196,12 @@ export async function reconcileRegistryFromZitadel() {
|
|
|
267
196
|
}
|
|
268
197
|
return { tenants, apps };
|
|
269
198
|
}
|
|
270
|
-
/**
|
|
271
|
-
* Ensure a service has a BROWSER sign-in, not just an API client.
|
|
272
|
-
*
|
|
273
|
-
* `ensureServiceApp` gives every service a Zitadel **API** application, which is
|
|
274
|
-
* what a machine caller authenticates with. A person cannot sign in to one:
|
|
275
|
-
* there is no authorization endpoint and no redirect URI, so the Hub's
|
|
276
|
-
* Access → Sign-in tab reports the app has no browser login and refuses to
|
|
277
|
-
* create a user — correctly, since the account would have nowhere to log in.
|
|
278
|
-
*
|
|
279
|
-
* An app declares which of its services carry a login in `package.json`:
|
|
280
|
-
*
|
|
281
|
-
* ```json
|
|
282
|
-
* { "mesh": { "auth": { "signIn": ["ui"] } } }
|
|
283
|
-
* ```
|
|
284
|
-
*
|
|
285
|
-
* which mirrors what the Pulumi program expresses as a `web` OIDC application
|
|
286
|
-
* on `ZitadelAppIdentity`. Deployed, the redirect URI comes from the service's
|
|
287
|
-
* public hostname; locally it is the port `mesh dev` allocated, so this runs
|
|
288
|
-
* AFTER port allocation and re-asserts the URIs on every launch — a session
|
|
289
|
-
* that lands on a different port must not leave the previous one registered as
|
|
290
|
-
* the only valid callback.
|
|
291
|
-
*
|
|
292
|
-
* Idempotent, and best-effort at the call site: a missing sign-in app degrades
|
|
293
|
-
* the Access tab, it does not stop the dev loop.
|
|
294
|
-
*/
|
|
295
199
|
export async function ensureSignInApp(args) {
|
|
296
200
|
const pat = readSeederPat();
|
|
297
201
|
const orgId = await ensureOrg(pat, args.tenant);
|
|
298
202
|
const projectId = await ensureProject(pat, orgId, args.app);
|
|
299
203
|
const name = `${args.service}-web`;
|
|
300
204
|
const base = args.baseUrl.replace(/\/+$/, "");
|
|
301
|
-
// oauth2-proxy's callback, and both slash forms for post-logout — Zitadel
|
|
302
|
-
// exact-matches the latter, and proxies differ on the trailing slash.
|
|
303
205
|
const redirectUris = [`${base}/oauth2/callback`];
|
|
304
206
|
const postLogoutRedirectUris = [base, `${base}/`];
|
|
305
207
|
const config = {
|
|
@@ -309,13 +211,10 @@ export async function ensureSignInApp(args) {
|
|
|
309
211
|
grantTypes: ["OIDC_GRANT_TYPE_AUTHORIZATION_CODE", "OIDC_GRANT_TYPE_REFRESH_TOKEN"],
|
|
310
212
|
appType: "OIDC_APP_TYPE_WEB",
|
|
311
213
|
authMethodType: "OIDC_AUTH_METHOD_TYPE_BASIC",
|
|
312
|
-
// Roles must ride in the token: the app authorizes on them, and the Hub
|
|
313
|
-
// shows which roles a person holds by reading the same grants.
|
|
314
214
|
accessTokenType: "OIDC_TOKEN_TYPE_JWT",
|
|
315
215
|
accessTokenRoleAssertion: true,
|
|
316
216
|
idTokenRoleAssertion: true,
|
|
317
217
|
idTokenUserinfoAssertion: true,
|
|
318
|
-
// http:// callbacks are only permitted in dev mode.
|
|
319
218
|
devMode: true,
|
|
320
219
|
};
|
|
321
220
|
const existing = await searchZitadelApp(pat, projectId, name, orgId);
|
|
@@ -333,10 +232,6 @@ export async function ensureSignInApp(args) {
|
|
|
333
232
|
});
|
|
334
233
|
logSuccess(`Created Zitadel application '${name}' (browser sign-in → ${base}/oauth2/callback)`);
|
|
335
234
|
}
|
|
336
|
-
/**
|
|
337
|
-
* Ensure the app tenant's full auth config exists (org → project →
|
|
338
|
-
* application-per-service → credential secrets).
|
|
339
|
-
*/
|
|
340
235
|
export async function ensureAppTenantAuth(args) {
|
|
341
236
|
const pat = readSeederPat();
|
|
342
237
|
const orgId = await ensureOrg(pat, args.tenant);
|
|
@@ -357,9 +252,6 @@ export async function ensureAppTenantAuth(args) {
|
|
|
357
252
|
created.push(service);
|
|
358
253
|
}
|
|
359
254
|
else if (!(await authSecretExists(args.tenant, args.app, service))) {
|
|
360
|
-
// Zitadel persists across stack restarts but the local secret store is
|
|
361
|
-
// in-memory — heal the gap by regenerating the application's secret
|
|
362
|
-
// (Zitadel returns it only once, so a lost secret can't be re-read).
|
|
363
255
|
const regenerated = await api(pat, "POST", `/management/v1/projects/${projectId}/apps/${result.appId}/api_config/_generate_client_secret`, {}, orgId);
|
|
364
256
|
await writeAuthSecret(args.tenant, args.app, service, {
|
|
365
257
|
clientId: result.clientId ?? "",
|
|
@@ -380,4 +272,3 @@ export async function ensureAppTenantAuth(args) {
|
|
|
380
272
|
}
|
|
381
273
|
return { orgId, projectId, created };
|
|
382
274
|
}
|
|
383
|
-
//# sourceMappingURL=auth-provision.js.map
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Local DevOutput source for `mesh dev` (design §5.2, AC C1/C3).
|
|
3
|
-
*
|
|
4
|
-
* Instead of reading a deployed Pulumi stack, synthesize the same DevOutput
|
|
5
|
-
* shape from repo conventions and point every service at the running
|
|
6
|
-
* `mesh start` platform. Zero AWS credentials, zero VPN, zero Pulumi state —
|
|
7
|
-
* the app's code never knows it's local:
|
|
8
|
-
* - Temporal → localhost:7233, namespace local-dev (seeded)
|
|
9
|
-
* - Postgres → the local `app` database
|
|
10
|
-
* - Zitadel → http://localhost:8080 (seeded org/app/users)
|
|
11
|
-
* - SpiceDB → localhost:50051 (preshared key)
|
|
12
|
-
* - AWS SDK → ministack via AWS_ENDPOINT_URL (SSM/Secrets/S3 registry)
|
|
13
|
-
*
|
|
14
|
-
* Detection convention = what `mesh create-app` templates emit: immediate
|
|
15
|
-
* subdirectories of the app root whose package.json has a `dev` script
|
|
16
|
-
* (api/, worker/, web/, …); a single-package app root with its own `dev`
|
|
17
|
-
* script becomes one service.
|
|
18
|
-
*/
|
|
19
|
-
/** Matches dev.ts's DevEnvVar/DevService/DevOutput shapes (kept structural —
|
|
20
|
-
* dev.ts owns the canonical interfaces). */
|
|
21
1
|
interface LocalDevEnvVar {
|
|
22
2
|
value: string;
|
|
23
3
|
}
|
|
@@ -26,9 +6,6 @@ interface LocalDevService {
|
|
|
26
6
|
port: number;
|
|
27
7
|
command: string[];
|
|
28
8
|
env?: Record<string, LocalDevEnvVar>;
|
|
29
|
-
/** Service kind discriminator (see dev.ts DevService). `"dagster"` marks the
|
|
30
|
-
* synthesized `dg dev` webserver so local registration writes the Dagster
|
|
31
|
-
* discovery record the Hub's Data section reads. */
|
|
32
9
|
kind?: "dagster";
|
|
33
10
|
}
|
|
34
11
|
export interface LocalDevOutput {
|
|
@@ -42,88 +19,20 @@ export interface LocalDevOutput {
|
|
|
42
19
|
tunnels: Record<string, never>;
|
|
43
20
|
}
|
|
44
21
|
export declare const LOCAL_STACK_NAME = "local";
|
|
45
|
-
/**
|
|
46
|
-
* The app's namespace, exactly the name the cloud gives it in K8s AND
|
|
47
|
-
* Temporal ({tenant}-{env}-{app}) — the Hub resolves both from this one
|
|
48
|
-
* convention, so local runs are addressable with zero translation.
|
|
49
|
-
*/
|
|
50
22
|
export declare function localAppNamespace(tenant: string, appName: string): string;
|
|
51
|
-
/** The OTLP log shipper (assets/log-shipper.mjs) each local service's
|
|
52
|
-
* launch pipeline pipes through — ships stdout to the stack's collector
|
|
53
|
-
* with the hosted k8s_* attribution. */
|
|
54
23
|
export declare function logShipperPath(): string;
|
|
55
|
-
/**
|
|
56
|
-
* OTel SDK bootstrap — the local analog of the OTel Operator's pod
|
|
57
|
-
* injection: when the service ships `@opentelemetry/auto-instrumentations-
|
|
58
|
-
* node` (the templates declare it), the platform injects the `--import`
|
|
59
|
-
* register hook + exporter env, and HTTP/fetch/gRPC spans flow to the
|
|
60
|
-
* stack's collector → Tempo → the Hub's Traces views. Apps without the
|
|
61
|
-
* package run untouched.
|
|
62
|
-
*/
|
|
63
24
|
export declare function autoInstrumentationEnv(appRoot: string, src: string): Record<string, LocalDevEnvVar>;
|
|
64
|
-
/** Hosted-parity resource attribution for a local service — what the
|
|
65
|
-
* in-cluster k8sattributes processor stamps. */
|
|
66
25
|
export declare function otelEnv(tenant: string, appName: string, serviceName: string): Record<string, LocalDevEnvVar>;
|
|
67
|
-
/** Endpoints of the running `mesh start` platform, as service env. */
|
|
68
26
|
export declare function localPlatformEnv(tenant: string, appName: string, serviceName: string): Record<string, LocalDevEnvVar>;
|
|
69
|
-
/**
|
|
70
|
-
* A Dagster workspace announces itself in one of the two shapes `dg dev`
|
|
71
|
-
* accepts: a `dg.toml` at the root (workspace convention — one file listing
|
|
72
|
-
* one or more projects), or a root `pyproject.toml` carrying a `[tool.dg]`
|
|
73
|
-
* table (single-project convention). Either earns the synthesized `dg dev`
|
|
74
|
-
* service.
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* isDagsterWorkspaceRoot("/repos/acme-dagster"); // true — has dg.toml
|
|
78
|
-
* isDagsterWorkspaceRoot("/repos/bank-statements"); // true — pyproject.toml has [tool.dg]
|
|
79
|
-
* isDagsterWorkspaceRoot("/repos/plain-hono-api"); // false
|
|
80
|
-
*/
|
|
81
27
|
export declare function isDagsterWorkspaceRoot(appRoot: string): boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Locate the `dg` binary for a workspace, by layout convention:
|
|
84
|
-
* `deployments/local/.venv` (a workspace keeping its dev CLI venv separate
|
|
85
|
-
* from per-project venvs) first, then a root `.venv` (single-project
|
|
86
|
-
* workspaces where one `uv sync` at the root covers everything). Falls back
|
|
87
|
-
* to `dg` on PATH (uv tool install / pipx) when neither venv exists yet —
|
|
88
|
-
* the launch window then shows dg's own error, which names the missing venv
|
|
89
|
-
* more usefully than a failed path lookup would.
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* resolveDgBinary("/repos/acme-dagster"); // "deployments/local/.venv/bin/dg"
|
|
93
|
-
* resolveDgBinary("/repos/bank-statements"); // ".venv/bin/dg" (root uv sync)
|
|
94
|
-
* resolveDgBinary("/repos/fresh-clone"); // "dg" (no venv built yet)
|
|
95
|
-
*/
|
|
96
28
|
export declare function resolveDgBinary(appRoot: string): string;
|
|
97
|
-
/**
|
|
98
|
-
* Detect runnable services by template convention: immediate subdirectories
|
|
99
|
-
* with a package.json `dev` script; falls back to the app root itself when
|
|
100
|
-
* it is a single-package app.
|
|
101
|
-
*/
|
|
102
29
|
export declare function detectLocalServices(appRoot: string): Record<string, {
|
|
103
30
|
src: string;
|
|
104
31
|
}>;
|
|
105
|
-
/** Synthesize the DevOutput `mesh dev` would otherwise read from Pulumi.
|
|
106
|
-
* `tenant` is the app tenant (detectLocalTenant) — it scopes the app's
|
|
107
|
-
* namespace ({tenant}-{env}-{app}) for Temporal, logs, and traces.
|
|
108
|
-
* `opts.mocks` (mesh dev --externals) appends declared mock services and injects
|
|
109
|
-
* their ExternalService credential prefixes into every app service. */
|
|
110
32
|
export declare function buildLocalDevOutput(appRoot: string, tenant: string, opts?: {
|
|
111
33
|
mocks?: Record<string, import("./mocks.js").LocalMockDecl>;
|
|
112
34
|
}): LocalDevOutput;
|
|
113
|
-
/**
|
|
114
|
-
* Whether the app is backed by a Pulumi program: its own (Pulumi.yaml or a
|
|
115
|
-
* Pulumi.<stack>.yaml stack config in the app dir), or a monorepo ROOT
|
|
116
|
-
* program above it (walk up to the repo boundary — .git/pnpm-workspace).
|
|
117
|
-
* Apps like apps/hub deploy via a root program and have no per-app
|
|
118
|
-
* Pulumi.yaml; they must NOT default into `mesh dev` local mode.
|
|
119
|
-
*/
|
|
120
35
|
export declare function hasStackBacking(appRoot: string): boolean;
|
|
121
|
-
/**
|
|
122
|
-
* The app's tenant, for auth provisioning: `mesh:tenant` from the app's
|
|
123
|
-
* Pulumi stack config when present (templates write it), else "local".
|
|
124
|
-
*/
|
|
125
36
|
export declare function detectLocalTenant(appRoot: string): string;
|
|
126
|
-
/** The local platform must be up before `mesh dev` can wire services to it. */
|
|
127
37
|
export declare function ensureLocalPlatformRunning(): Promise<void>;
|
|
128
38
|
export {};
|
|
129
|
-
//# sourceMappingURL=dev-local.d.ts.map
|