@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,45 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mesh cluster access — `mesh kubectl` / `mesh logs` / `mesh exec` against a
|
|
3
|
-
* deployed app's EKS cluster, authenticated as the app's Zitadel deployer role
|
|
4
|
-
* (MESH-2060).
|
|
5
|
-
*
|
|
6
|
-
* Reuses exactly what `mesh dev` already does internally: assume the app's
|
|
7
|
-
* deployer role, build a session kubeconfig from the platform `eks` SSM export
|
|
8
|
-
* (`aws eks get-token` — needs neither `eks:DescribeCluster` nor a readable
|
|
9
|
-
* `~/.kube/config`, which macOS TCC blocks for non-FDA shells), and shell out to
|
|
10
|
-
* kubectl with `KUBECONFIG` set.
|
|
11
|
-
*
|
|
12
|
-
* The deployer role's cluster RBAC is namespace-scoped to the tenant's
|
|
13
|
-
* namespaces (verified live: the `<tenant>-<env>-deployers` group grants
|
|
14
|
-
* pods/log/exec read in the app's namespace), so every command defaults to the
|
|
15
|
-
* app's own namespace and callers can still `-n <other>` within the tenant.
|
|
16
|
-
*/
|
|
17
1
|
import { Command } from "commander";
|
|
18
2
|
import { type EnsureKubeconfigFailure } from "../utils/kubeconfig.js";
|
|
19
|
-
/**
|
|
20
|
-
* Render the "couldn't resolve the EKS cluster" failure with the parameter
|
|
21
|
-
* tried and the real exception. The pre-MESH-2515 message guessed "you have
|
|
22
|
-
* SSM read access" at every failure — which sent three investigations after a
|
|
23
|
-
* permission that was never missing when the actual cause was the wrong
|
|
24
|
-
* platform name in the SSM path.
|
|
25
|
-
*/
|
|
26
3
|
export declare function clusterResolveErrorMessage(platformName: string, platformEnv: string, failure?: EnsureKubeconfigFailure): string;
|
|
27
|
-
/**
|
|
28
|
-
* Whether the user already scoped the namespace. Deliberately only detects the
|
|
29
|
-
* split forms (`-n foo`, `--namespace foo`, `--namespace=foo`, `-A`), NOT the
|
|
30
|
-
* smashed short form `-nfoo`: our default `-n <ns>` is PREPENDED, and kubectl's
|
|
31
|
-
* pflag lets the later (user-supplied) `-nfoo` win, so a missed detection here is
|
|
32
|
-
* harmless. Do not "fix" this into an append — that would let our default win
|
|
33
|
-
* over the user's intent.
|
|
34
|
-
*/
|
|
35
4
|
export declare function hasNamespaceFlag(args: string[]): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Translate an ergonomic log/exec target into kubectl selector args.
|
|
38
|
-
* - `deployment/x` / `pod/x` (contains `/`) → passed through
|
|
39
|
-
* - `k=v` (contains `=`) → label selector `-l k=v`
|
|
40
|
-
* - bare `<service>` → `-l app=<service>` (the reliable
|
|
41
|
-
* per-service label; deployment names == service names)
|
|
42
|
-
*/
|
|
43
5
|
export declare function targetToSelector(target: string): string[];
|
|
44
6
|
export declare function registerClusterCommands(program: Command): void;
|
|
45
|
-
//# sourceMappingURL=cluster.d.ts.map
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mesh cluster access — `mesh kubectl` / `mesh logs` / `mesh exec` against a
|
|
3
|
-
* deployed app's EKS cluster, authenticated as the app's Zitadel deployer role
|
|
4
|
-
* (MESH-2060).
|
|
5
|
-
*
|
|
6
|
-
* Reuses exactly what `mesh dev` already does internally: assume the app's
|
|
7
|
-
* deployer role, build a session kubeconfig from the platform `eks` SSM export
|
|
8
|
-
* (`aws eks get-token` — needs neither `eks:DescribeCluster` nor a readable
|
|
9
|
-
* `~/.kube/config`, which macOS TCC blocks for non-FDA shells), and shell out to
|
|
10
|
-
* kubectl with `KUBECONFIG` set.
|
|
11
|
-
*
|
|
12
|
-
* The deployer role's cluster RBAC is namespace-scoped to the tenant's
|
|
13
|
-
* namespaces (verified live: the `<tenant>-<env>-deployers` group grants
|
|
14
|
-
* pods/log/exec read in the app's namespace), so every command defaults to the
|
|
15
|
-
* app's own namespace and callers can still `-n <other>` within the tenant.
|
|
16
|
-
*/
|
|
17
1
|
import { spawnSync } from "node:child_process";
|
|
18
2
|
import { logError, logInfo } from "../utils/log.js";
|
|
19
3
|
import { findAppRoot, findStackConfigs, getCurrentStack, pulumiStackOutput, readStackConfig, } from "../utils/pulumi.js";
|
|
@@ -21,12 +5,6 @@ import { resolveAwsCredentials, derivePlatformContext } from "../utils/aws-auth.
|
|
|
21
5
|
import { ensureKubeconfig, resolveHubPlatformName, } from "../utils/kubeconfig.js";
|
|
22
6
|
import { probeCredentials } from "./login.js";
|
|
23
7
|
import { credProbeToPreflightError } from "../utils/pulumi-run.js";
|
|
24
|
-
/**
|
|
25
|
-
* Assume the app's deployer role, resolve the deployed app's platform env +
|
|
26
|
-
* namespace from stack output, and materialize a session kubeconfig. Throws with
|
|
27
|
-
* an actionable message on any failure (missing app dir, unresolved creds,
|
|
28
|
-
* undeployed stack, unresolvable cluster).
|
|
29
|
-
*/
|
|
30
8
|
async function resolveClusterAccess(opts) {
|
|
31
9
|
const appRoot = findAppRoot(process.cwd());
|
|
32
10
|
if (!appRoot) {
|
|
@@ -41,14 +19,11 @@ async function resolveClusterAccess(opts) {
|
|
|
41
19
|
: "No stack configs found in this directory."));
|
|
42
20
|
}
|
|
43
21
|
const sa = ["--stack", stack];
|
|
44
|
-
// Assume the app's deployer role — same path as `mesh dev` / `mesh temporal`.
|
|
45
22
|
const deployerRole = readStackConfig(appRoot, stack, "mesh:deployerRole");
|
|
46
23
|
const ctx = derivePlatformContext(appRoot, stack);
|
|
47
24
|
const resolved = deployerRole
|
|
48
25
|
? await resolveAwsCredentials(deployerRole, appRoot, stack)
|
|
49
26
|
: null;
|
|
50
|
-
// Login preflight: name the credential problem up front instead of failing
|
|
51
|
-
// deep inside the kubectl `aws eks get-token` exec plugin.
|
|
52
27
|
if (deployerRole && !resolved && !process.env.AWS_ACCESS_KEY_ID) {
|
|
53
28
|
const pf = ctx
|
|
54
29
|
? credProbeToPreflightError(await probeCredentials(ctx, deployerRole), ctx)
|
|
@@ -60,13 +35,8 @@ async function resolveClusterAccess(opts) {
|
|
|
60
35
|
const region = readStackConfig(appRoot, stack, "aws:region");
|
|
61
36
|
if (awsEnv && region && !awsEnv.AWS_REGION)
|
|
62
37
|
awsEnv.AWS_REGION = region;
|
|
63
|
-
// Thread the resolved creds into this process so ensureKubeconfig's SSM read
|
|
64
|
-
// and the kubectl `aws eks get-token` exec plugin run credentialed.
|
|
65
38
|
if (awsEnv)
|
|
66
39
|
Object.assign(process.env, awsEnv);
|
|
67
|
-
// Read the deployed app output for platform env + namespace (mirrors the
|
|
68
|
-
// reader in `mesh temporal`; the `app` struct's `dev` field is secret-tainted,
|
|
69
|
-
// and pulumiStackOutput transparently retries with --show-secrets).
|
|
70
40
|
let appOutput;
|
|
71
41
|
let devOutput;
|
|
72
42
|
try {
|
|
@@ -83,18 +53,11 @@ async function resolveClusterAccess(opts) {
|
|
|
83
53
|
}
|
|
84
54
|
}
|
|
85
55
|
const platformEnv = devOutput?.platform?.env ?? "dev";
|
|
86
|
-
// The HUB platform name (e.g. "trabian") — cluster data lives under it, not
|
|
87
|
-
// under a hardcoded "mesh" (MESH-2515). Same axis `mesh dev` uses for the
|
|
88
|
-
// bastion; "mesh" is only the default hub.
|
|
89
56
|
const platformName = resolveHubPlatformName(devOutput?.platform);
|
|
90
57
|
const namespace = appOutput?.namespace ?? devOutput?.namespace;
|
|
91
58
|
if (!namespace) {
|
|
92
59
|
throw new Error(`No namespace found in stack output for '${stack}'.`);
|
|
93
60
|
}
|
|
94
|
-
// Build a session kubeconfig from the platform eks SSM export. Key the session
|
|
95
|
-
// file on platformName + platformEnv too, so two apps on DIFFERENT platforms
|
|
96
|
-
// that share a stack name (e.g. both "dev") don't race on the same kubeconfig
|
|
97
|
-
// path.
|
|
98
61
|
let failure;
|
|
99
62
|
const kubeconfigPath = await ensureKubeconfig(platformName, platformEnv, `mesh-cluster-${platformName}-${platformEnv}-${stack}`, { onError: (f) => (failure = f) });
|
|
100
63
|
if (!kubeconfigPath) {
|
|
@@ -102,13 +65,6 @@ async function resolveClusterAccess(opts) {
|
|
|
102
65
|
}
|
|
103
66
|
return { kubeconfigPath, namespace, stack };
|
|
104
67
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Render the "couldn't resolve the EKS cluster" failure with the parameter
|
|
107
|
-
* tried and the real exception. The pre-MESH-2515 message guessed "you have
|
|
108
|
-
* SSM read access" at every failure — which sent three investigations after a
|
|
109
|
-
* permission that was never missing when the actual cause was the wrong
|
|
110
|
-
* platform name in the SSM path.
|
|
111
|
-
*/
|
|
112
68
|
export function clusterResolveErrorMessage(platformName, platformEnv, failure) {
|
|
113
69
|
const parameter = failure?.parameter ?? `/mesh-platform/${platformName}/${platformEnv}/core/eks`;
|
|
114
70
|
const err = failure?.error;
|
|
@@ -125,21 +81,9 @@ export function clusterResolveErrorMessage(platformName, platformEnv, failure) {
|
|
|
125
81
|
"means the WRONG platform path, not missing SSM permissions.");
|
|
126
82
|
}
|
|
127
83
|
const NS_FLAGS = new Set(["-n", "--namespace", "-A", "--all-namespaces"]);
|
|
128
|
-
/**
|
|
129
|
-
* Whether the user already scoped the namespace. Deliberately only detects the
|
|
130
|
-
* split forms (`-n foo`, `--namespace foo`, `--namespace=foo`, `-A`), NOT the
|
|
131
|
-
* smashed short form `-nfoo`: our default `-n <ns>` is PREPENDED, and kubectl's
|
|
132
|
-
* pflag lets the later (user-supplied) `-nfoo` win, so a missed detection here is
|
|
133
|
-
* harmless. Do not "fix" this into an append — that would let our default win
|
|
134
|
-
* over the user's intent.
|
|
135
|
-
*/
|
|
136
84
|
export function hasNamespaceFlag(args) {
|
|
137
85
|
return args.some((a) => NS_FLAGS.has(a) || a.startsWith("--namespace="));
|
|
138
86
|
}
|
|
139
|
-
/**
|
|
140
|
-
* Run kubectl with the session kubeconfig, defaulting the namespace to the app's
|
|
141
|
-
* own unless the caller already scoped it. Returns the child exit code.
|
|
142
|
-
*/
|
|
143
87
|
function runKubectl(access, args, opts = {}) {
|
|
144
88
|
const finalArgs = opts.defaultNamespace !== false && !hasNamespaceFlag(args)
|
|
145
89
|
? ["-n", access.namespace, ...args]
|
|
@@ -160,13 +104,6 @@ function runKubectl(access, args, opts = {}) {
|
|
|
160
104
|
}
|
|
161
105
|
return res.status ?? 0;
|
|
162
106
|
}
|
|
163
|
-
/**
|
|
164
|
-
* Translate an ergonomic log/exec target into kubectl selector args.
|
|
165
|
-
* - `deployment/x` / `pod/x` (contains `/`) → passed through
|
|
166
|
-
* - `k=v` (contains `=`) → label selector `-l k=v`
|
|
167
|
-
* - bare `<service>` → `-l app=<service>` (the reliable
|
|
168
|
-
* per-service label; deployment names == service names)
|
|
169
|
-
*/
|
|
170
107
|
export function targetToSelector(target) {
|
|
171
108
|
if (target.includes("/"))
|
|
172
109
|
return [target];
|
|
@@ -175,22 +112,16 @@ export function targetToSelector(target) {
|
|
|
175
112
|
return ["-l", `app=${target}`];
|
|
176
113
|
}
|
|
177
114
|
export function registerClusterCommands(program) {
|
|
178
|
-
// `mesh kubectl [args…]` — passthrough. Help is delegated to kubectl so
|
|
179
|
-
// `mesh kubectl get --help` works; run `mesh kubectl` with no args to see it.
|
|
180
115
|
program
|
|
181
116
|
.command("kubectl")
|
|
182
117
|
.description("Run kubectl against the app's cluster (deployer role + SSM kubeconfig)")
|
|
183
118
|
.option("--stack <stack>", "Deployed Pulumi stack (default: current selection)")
|
|
184
119
|
.allowUnknownOption(true)
|
|
185
|
-
// Forward every positional (kubectl subcommand + args) verbatim. Commander
|
|
186
|
-
// v13 flips the default to ERROR on excess args, so declare it explicitly —
|
|
187
|
-
// a routine dependency bump must not silently break the passthrough.
|
|
188
120
|
.allowExcessArguments(true)
|
|
189
121
|
.helpOption(false)
|
|
190
122
|
.action(async (opts, cmd) => {
|
|
191
123
|
try {
|
|
192
124
|
const access = await resolveClusterAccess({ stack: opts.stack });
|
|
193
|
-
// Context line to stderr so stdout stays clean for piping.
|
|
194
125
|
process.stderr.write(`→ kubectl · ns ${access.namespace} · stack ${access.stack}\n`);
|
|
195
126
|
process.exit(runKubectl(access, cmd.args));
|
|
196
127
|
}
|
|
@@ -199,7 +130,6 @@ export function registerClusterCommands(program) {
|
|
|
199
130
|
process.exit(1);
|
|
200
131
|
}
|
|
201
132
|
});
|
|
202
|
-
// `mesh logs [target]` — ergonomic kubectl logs against the app's namespace.
|
|
203
133
|
program
|
|
204
134
|
.command("logs [target]")
|
|
205
135
|
.description("Tail logs from the app's pods (kubectl logs; target = service, deployment/x, or k=v)")
|
|
@@ -230,7 +160,6 @@ export function registerClusterCommands(program) {
|
|
|
230
160
|
process.exit(1);
|
|
231
161
|
}
|
|
232
162
|
});
|
|
233
|
-
// `mesh exec <target> -- <cmd…>` — exec into one of the app's pods.
|
|
234
163
|
program
|
|
235
164
|
.command("exec <target> [cmd...]")
|
|
236
165
|
.description("Exec a command in the app's pod (kubectl exec; target = service or deployment/x)")
|
|
@@ -239,7 +168,6 @@ export function registerClusterCommands(program) {
|
|
|
239
168
|
.action(async (target, cmdParts, opts) => {
|
|
240
169
|
try {
|
|
241
170
|
const access = await resolveClusterAccess({ stack: opts.stack });
|
|
242
|
-
// exec needs a single pod; a bare service resolves to its deployment.
|
|
243
171
|
const podRef = target.includes("/") ? target : `deployment/${target}`;
|
|
244
172
|
const command = cmdParts.length > 0 ? cmdParts : ["sh"];
|
|
245
173
|
const kargs = ["exec"];
|
|
@@ -256,4 +184,3 @@ export function registerClusterCommands(program) {
|
|
|
256
184
|
}
|
|
257
185
|
});
|
|
258
186
|
}
|
|
259
|
-
//# sourceMappingURL=cluster.js.map
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mesh conversations — read a deployed Mesh agent's conversations
|
|
3
|
-
*
|
|
4
|
-
* Commands:
|
|
5
|
-
* mesh conversations list List conversations visible to the caller
|
|
6
|
-
* mesh conversations show <id> Render a conversation's transcript
|
|
7
|
-
* mesh conversations artifacts <id> List a conversation's artifacts
|
|
8
|
-
*
|
|
9
|
-
* Discovery-first: resolves a target (registry name, --api-url, or
|
|
10
|
-
* fallback) via `resolveTarget`/`agentApiFetch` (Task 3) and renders a
|
|
11
|
-
* table (TTY) or JSON (piped / --json).
|
|
12
|
-
*/
|
|
13
1
|
import { Command } from "commander";
|
|
14
2
|
export interface ConversationSummary {
|
|
15
3
|
id: string;
|
|
@@ -17,45 +5,21 @@ export interface ConversationSummary {
|
|
|
17
5
|
updatedAt?: string;
|
|
18
6
|
lastUpdated?: string;
|
|
19
7
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Pure formatter: JSON verbatim (compact — agents parse this, so it's kept
|
|
22
|
-
* dense rather than pretty-printed) when `asJson`, else a simple aligned
|
|
23
|
-
* ID/TITLE/UPDATED table. Tolerant of missing title/updatedAt/lastUpdated
|
|
24
|
-
* and an empty list.
|
|
25
|
-
*/
|
|
26
8
|
export declare function formatConversations(list: ConversationSummary[], asJson: boolean): string;
|
|
27
9
|
export interface TranscriptMessage {
|
|
28
10
|
role: string;
|
|
29
|
-
/** Plain string, or an AI SDK array of content parts (rendered via renderMessageContent). */
|
|
30
11
|
content?: unknown;
|
|
31
|
-
/** Present on assistant turns that invoked tools; shape varies by agent-sdk version. */
|
|
32
12
|
toolCalls?: unknown[];
|
|
33
|
-
/** Artifact ids/refs produced or referenced by this turn. */
|
|
34
13
|
artifactRefs?: unknown[];
|
|
35
14
|
}
|
|
36
15
|
export interface TranscriptBody {
|
|
37
16
|
messages?: TranscriptMessage[];
|
|
38
17
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Pure formatter: JSON verbatim (compact) when `asJson`, else one `role:
|
|
41
|
-
* content` block per message (blank-line separated). Tolerant of a missing
|
|
42
|
-
* `content` (renders `role: ` with nothing after it) and an empty/missing
|
|
43
|
-
* `messages` array. When a message carries `toolCalls`/`artifactRefs`, notes
|
|
44
|
-
* them compactly on an indented line beneath the block.
|
|
45
|
-
*/
|
|
46
18
|
export declare function formatTranscript(body: TranscriptBody, asJson: boolean): string;
|
|
47
19
|
export interface ArtifactSummary {
|
|
48
20
|
id: string;
|
|
49
21
|
kind?: string;
|
|
50
22
|
title?: string;
|
|
51
23
|
}
|
|
52
|
-
/**
|
|
53
|
-
* Pure formatter: JSON verbatim (compact) when `asJson`, else an
|
|
54
|
-
* `ARTIFACT-ID · KIND · TITLE` table plus a trailing download hint (using
|
|
55
|
-
* `refHint` — the conversation id — and the first artifact's id as the
|
|
56
|
-
* copy-pasteable example). Tolerant of missing kind/title and an empty list
|
|
57
|
-
* (no download hint when there's nothing to download).
|
|
58
|
-
*/
|
|
59
24
|
export declare function formatArtifacts(list: ArtifactSummary[], asJson: boolean, refHint: string): string;
|
|
60
25
|
export declare function registerConversationsCommands(program: Command): void;
|
|
61
|
-
//# sourceMappingURL=conversations.d.ts.map
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mesh conversations — read a deployed Mesh agent's conversations
|
|
3
|
-
*
|
|
4
|
-
* Commands:
|
|
5
|
-
* mesh conversations list List conversations visible to the caller
|
|
6
|
-
* mesh conversations show <id> Render a conversation's transcript
|
|
7
|
-
* mesh conversations artifacts <id> List a conversation's artifacts
|
|
8
|
-
*
|
|
9
|
-
* Discovery-first: resolves a target (registry name, --api-url, or
|
|
10
|
-
* fallback) via `resolveTarget`/`agentApiFetch` (Task 3) and renders a
|
|
11
|
-
* table (TTY) or JSON (piped / --json).
|
|
12
|
-
*/
|
|
13
|
-
// renderMessageContent is needed synchronously by the exported formatter;
|
|
14
|
-
// safe at top level since agent-targets' exports are source-mapped. The
|
|
15
|
-
// heavy pull/writeBundle pair stays lazily imported in the pull action.
|
|
16
1
|
import { renderMessageContent } from "@mesh-tech/agent-targets";
|
|
17
2
|
import { buildVcsEnricher } from "./vcs-enrich.js";
|
|
18
3
|
import { logError, logInfo, logWarn } from "../utils/log.js";
|
|
@@ -21,12 +6,6 @@ const MAX_TITLE_LEN = 40;
|
|
|
21
6
|
function truncate(s, max) {
|
|
22
7
|
return s.length > max ? s.slice(0, max - 1) + "…" : s;
|
|
23
8
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Pure formatter: JSON verbatim (compact — agents parse this, so it's kept
|
|
26
|
-
* dense rather than pretty-printed) when `asJson`, else a simple aligned
|
|
27
|
-
* ID/TITLE/UPDATED table. Tolerant of missing title/updatedAt/lastUpdated
|
|
28
|
-
* and an empty list.
|
|
29
|
-
*/
|
|
30
9
|
export function formatConversations(list, asJson) {
|
|
31
10
|
if (asJson) {
|
|
32
11
|
return JSON.stringify(list);
|
|
@@ -46,7 +25,6 @@ export function formatConversations(list, asJson) {
|
|
|
46
25
|
const lines = rows.map((r) => `${pad(r.id, idWidth)} ${pad(r.title, titleWidth)} ${r.updated}`);
|
|
47
26
|
return [header, ...lines].join("\n");
|
|
48
27
|
}
|
|
49
|
-
/** Compact a list of tool-call/artifact-ref entries to a comma-joined summary. */
|
|
50
28
|
function summarizeRefs(items) {
|
|
51
29
|
return items
|
|
52
30
|
.map((item) => {
|
|
@@ -62,13 +40,6 @@ function summarizeRefs(items) {
|
|
|
62
40
|
})
|
|
63
41
|
.join(", ");
|
|
64
42
|
}
|
|
65
|
-
/**
|
|
66
|
-
* Pure formatter: JSON verbatim (compact) when `asJson`, else one `role:
|
|
67
|
-
* content` block per message (blank-line separated). Tolerant of a missing
|
|
68
|
-
* `content` (renders `role: ` with nothing after it) and an empty/missing
|
|
69
|
-
* `messages` array. When a message carries `toolCalls`/`artifactRefs`, notes
|
|
70
|
-
* them compactly on an indented line beneath the block.
|
|
71
|
-
*/
|
|
72
43
|
export function formatTranscript(body, asJson) {
|
|
73
44
|
if (asJson) {
|
|
74
45
|
return JSON.stringify(body);
|
|
@@ -90,13 +61,6 @@ export function formatTranscript(body, asJson) {
|
|
|
90
61
|
})
|
|
91
62
|
.join("\n\n");
|
|
92
63
|
}
|
|
93
|
-
/**
|
|
94
|
-
* Pure formatter: JSON verbatim (compact) when `asJson`, else an
|
|
95
|
-
* `ARTIFACT-ID · KIND · TITLE` table plus a trailing download hint (using
|
|
96
|
-
* `refHint` — the conversation id — and the first artifact's id as the
|
|
97
|
-
* copy-pasteable example). Tolerant of missing kind/title and an empty list
|
|
98
|
-
* (no download hint when there's nothing to download).
|
|
99
|
-
*/
|
|
100
64
|
export function formatArtifacts(list, asJson, refHint) {
|
|
101
65
|
if (asJson) {
|
|
102
66
|
return JSON.stringify(list);
|
|
@@ -117,7 +81,6 @@ export function formatArtifacts(list, asJson, refHint) {
|
|
|
117
81
|
const exampleId = rows[0]?.id ?? "";
|
|
118
82
|
return [header, ...lines, "", `Download: mesh artifacts get ${refHint}:${exampleId}`].join("\n");
|
|
119
83
|
}
|
|
120
|
-
/** Add the shared `--target/--api-url/--context/--json` option set (same across list/show/artifacts). */
|
|
121
84
|
function withTargetOptions(cmd) {
|
|
122
85
|
return cmd
|
|
123
86
|
.option("--target <name>", "Named agent target from the agent-targets registry")
|
|
@@ -125,18 +88,7 @@ function withTargetOptions(cmd) {
|
|
|
125
88
|
.option("--context <ctx>", "Zitadel auth context, used with --api-url (default: mesh.dev)")
|
|
126
89
|
.option("--json", "Emit JSON (default when stdout is not a TTY)");
|
|
127
90
|
}
|
|
128
|
-
/**
|
|
129
|
-
* Shared resolve → fetch → format → print flow for a conversations verb.
|
|
130
|
-
* `ctx.id` (the conversation id, when the verb has one) is passed through to
|
|
131
|
-
* `describeHttpError` so it can echo it in the 404 message and offer the
|
|
132
|
-
* `mesh temporal recover-conversation <id>` hint on a 503
|
|
133
|
-
* `conversation_unavailable` response (formerly `show`'s own special-case;
|
|
134
|
-
* now folded into the one shared renderer).
|
|
135
|
-
*/
|
|
136
91
|
async function runConversationsVerb(opts, apiPath, format, ctx) {
|
|
137
|
-
// Declared outside the try so a network-error catch can give
|
|
138
|
-
// local-vs-remote-aware guidance (`describeNetworkError` needs the
|
|
139
|
-
// target); stays undefined if `resolveTarget` itself is what threw.
|
|
140
92
|
let target;
|
|
141
93
|
try {
|
|
142
94
|
target = resolveTarget(opts);
|
|
@@ -152,13 +104,6 @@ async function runConversationsVerb(opts, apiPath, format, ctx) {
|
|
|
152
104
|
reportCliError(error, target);
|
|
153
105
|
}
|
|
154
106
|
}
|
|
155
|
-
/**
|
|
156
|
-
* Symmetric with `mesh artifacts get`'s catch: `describeHttpError` failures
|
|
157
|
-
* already carry target-aware guidance in their message (so `hint === message`
|
|
158
|
-
* and nothing further is logged), while a genuine network throw
|
|
159
|
-
* (ECONNREFUSED/"fetch failed"/ENOTFOUND/EAI_AGAIN) gets an extra
|
|
160
|
-
* local-vs-remote hint via `describeNetworkError`.
|
|
161
|
-
*/
|
|
162
107
|
function reportCliError(error, target) {
|
|
163
108
|
if (error instanceof TargetResolutionError) {
|
|
164
109
|
logError(error.message);
|
|
@@ -204,9 +149,6 @@ export function registerConversationsCommands(program) {
|
|
|
204
149
|
.option("--no-recursive", "Only pull direct subagents (default: recurse the delegate tree)")
|
|
205
150
|
.option("--no-vcs", "Skip pulling each design's own vcs folder (docs/manifest); IR-only")
|
|
206
151
|
.action(async (id, opts) => {
|
|
207
|
-
// Lazy: an unbuilt/unresolvable agent-targets must degrade only this
|
|
208
|
-
// command, never brick the whole CLI at boot (src/program.ts imports all
|
|
209
|
-
// command modules eagerly).
|
|
210
152
|
const { pullConversation, writeBundle } = await import("@mesh-tech/agent-targets");
|
|
211
153
|
let target;
|
|
212
154
|
let enricher;
|
|
@@ -236,4 +178,3 @@ export function registerConversationsCommands(program) {
|
|
|
236
178
|
}
|
|
237
179
|
});
|
|
238
180
|
}
|
|
239
|
-
//# sourceMappingURL=conversations.js.map
|
|
@@ -1,67 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mesh create-app - Scaffold a new tenant application
|
|
3
|
-
*
|
|
4
|
-
* Three modes:
|
|
5
|
-
* 1. Legacy: `mesh create-app --template workflow --tenant x --name y`
|
|
6
|
-
* 2. Composable (flags): `mesh create-app --tenant x --name y --primitives service,database`
|
|
7
|
-
* 3. Interactive: `mesh create-app` (prompts when TTY detected and flags missing)
|
|
8
|
-
*
|
|
9
|
-
* All options can be passed as flags for agent/CI usage (no TTY required).
|
|
10
|
-
*/
|
|
11
1
|
import { Command } from "commander";
|
|
12
2
|
import { type RegistryPreflight } from "../utils/auth-preflight.js";
|
|
13
|
-
/** The root `package.json` name that identifies the mesh-platform monorepo. */
|
|
14
3
|
export declare const PLATFORM_MONOREPO_NAME = "mesh-platform";
|
|
15
|
-
/**
|
|
16
|
-
* True when `dir` sits inside the **mesh-platform monorepo** — the one workspace
|
|
17
|
-
* that publishes `@mesh-tech/*`, so a scaffolded app there wants `workspace:*` +
|
|
18
|
-
* `catalog:` (link local source) instead of published ranges.
|
|
19
|
-
*
|
|
20
|
-
* The test is deliberately narrow. Looking for any ancestor `pnpm-workspace.yaml`
|
|
21
|
-
* is not enough: a tenant-apps repo is itself a pnpm workspace (`packages: [apps/*]`).
|
|
22
|
-
* Identity comes from the root `package.json` name, which no tenant repo shares.
|
|
23
|
-
*/
|
|
24
4
|
export declare function isInsidePlatformMonorepo(dir: string): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* A fresh standalone tenant-apps repo (empty clone of {tenant}-mesh-apps) is
|
|
27
|
-
* bootstrappable when the cwd is a git repo root that has none of the layouts
|
|
28
|
-
* `resolveAppDir` looks for. Previously create-app exited with "Tenant
|
|
29
|
-
* directory not found: tenants/<t>/" here — even though the app-tenant
|
|
30
|
-
* doctor's Repo-shape check names create-app as the fix ("workspace files
|
|
31
|
-
* included"), so the command must actually deliver them.
|
|
32
|
-
*/
|
|
33
5
|
export declare function shouldBootstrapAppsRepo(cwd: string): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Generate the repo-level files of a standalone tenant-apps repo (the
|
|
36
|
-
* trabian-mesh-apps shape): pnpm workspace over apps/*, private root
|
|
37
|
-
* package.json, scoped CodeArtifact .npmrc, base tsconfig, .gitignore, README.
|
|
38
|
-
* Only writes files that don't already exist; returns what it created.
|
|
39
|
-
*/
|
|
40
6
|
export declare function bootstrapAppsRepo(cwd: string, tenant: string): string[];
|
|
41
|
-
/**
|
|
42
|
-
* A composed app puts its runnable packages one level below the app dir
|
|
43
|
-
* (`apps/<name>/api`, `apps/<name>/worker`). pnpm only installs dependencies
|
|
44
|
-
* for workspace MEMBERS, and an apps repo whose `pnpm-workspace.yaml` says
|
|
45
|
-
* `packages: [apps/*]` does not match them — so the app scaffolds, the root
|
|
46
|
-
* install reports success, and `pnpm dev` dies on `Cannot find package 'hono'`
|
|
47
|
-
* with nothing pointing at the cause.
|
|
48
|
-
*
|
|
49
|
-
* Append any missing glob as a line under `packages:` (text edit, so comments
|
|
50
|
-
* and ordering survive). Returns the globs added, empty when nothing was missing.
|
|
51
|
-
*/
|
|
52
7
|
export declare function ensureWorkspaceGlobs(root: string, required: string[]): string[];
|
|
53
|
-
/**
|
|
54
|
-
* The `pnpm-workspace.yaml` glob that makes a composed app's nested packages
|
|
55
|
-
* (`<app>/api`, `<app>/worker`) workspace members, derived from where the app
|
|
56
|
-
* actually landed. `resolveAppDir` picks the first existing of
|
|
57
|
-
* `tenants/<t>/apps`, `../<t>/apps` and `apps`, so the glob is rooted at
|
|
58
|
-
* `apps` in one layout and at `tenants/<t>/apps` in another. Returns null when
|
|
59
|
-
* the app resolved outside `root` — nothing there is a member of this workspace.
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* workspaceGlobForApp("/repo", "/repo/tenants/acme/apps/billing");
|
|
63
|
-
* // → "tenants/acme/apps" followed by two wildcard segments
|
|
64
|
-
*/
|
|
65
8
|
export declare function workspaceGlobForApp(root: string, appDir: string): string | null;
|
|
66
9
|
interface CreateAppOptions {
|
|
67
10
|
tenant?: string;
|
|
@@ -69,20 +12,14 @@ interface CreateAppOptions {
|
|
|
69
12
|
template?: string;
|
|
70
13
|
primitives?: string;
|
|
71
14
|
test: boolean;
|
|
72
|
-
/** Scaffold without checking registry access (offline; `pnpm install` will need `mesh registry login` first). */
|
|
73
15
|
skipRegistryCheck?: boolean;
|
|
74
16
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Recursively copy a directory, processing .hbs templates
|
|
77
|
-
*/
|
|
78
17
|
export declare function copyTemplate(srcDir: string, destDir: string, context: Record<string, unknown>): void;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
18
|
+
export declare function describeNoAppsHome(cwd: string, tenant: string, baseDir: string, test: boolean): {
|
|
19
|
+
message: string;
|
|
20
|
+
hint: string;
|
|
21
|
+
};
|
|
82
22
|
export declare function resolveAppDir(cwd: string, tenant: string, name: string, test: boolean): string;
|
|
83
|
-
/**
|
|
84
|
-
* Generate a composable app from fragments
|
|
85
|
-
*/
|
|
86
23
|
export declare function generateComposableApp(appDir: string, context: {
|
|
87
24
|
name: string;
|
|
88
25
|
tenant: string;
|
|
@@ -91,36 +28,15 @@ export declare function generateComposableApp(appDir: string, context: {
|
|
|
91
28
|
temporal: boolean;
|
|
92
29
|
bucket: boolean;
|
|
93
30
|
region: string;
|
|
94
|
-
/** True when scaffolding inside the mesh-platform monorepo → `@mesh-tech/*` = `workspace:*`. */
|
|
95
31
|
workspaceDeps: boolean;
|
|
96
|
-
/** Caret range for the lockstep `@mesh-tech/*` group (standalone repos only). */
|
|
97
32
|
meshRange: string;
|
|
98
|
-
/** Caret range for `@mesh-tech/esm-bundle`, which versions independently. */
|
|
99
33
|
esmBundleRange: string;
|
|
100
|
-
/** Literal toolchain devDep ranges for the standalone branch (no `catalog:`). */
|
|
101
34
|
typesNodeRange: string;
|
|
102
35
|
tsxRange: string;
|
|
103
36
|
typescriptRange: string;
|
|
104
|
-
/** Fully-resolved `mesh:deployerRole` ARN (or an `ACCOUNT_ID` placeholder). */
|
|
105
37
|
deployerRoleArn: string;
|
|
106
38
|
}): void;
|
|
107
39
|
export declare function registerCreateAppCommand(program: Command): void;
|
|
108
|
-
/** Printed when the registry preflight fails — the scaffold stops before any prompt or write. */
|
|
109
40
|
export declare const NO_REGISTRY_ACCESS_MESSAGE: string;
|
|
110
|
-
/**
|
|
111
|
-
* Registry preflight, BEFORE any prompt and before any file is written.
|
|
112
|
-
*
|
|
113
|
-
* A scaffold whose `pnpm install` cannot resolve `@mesh-tech/*` is a trap: the
|
|
114
|
-
* failure arrives minutes later with npm's generic E401/E404 advice, and the
|
|
115
|
-
* fix (registry sign-in) has nothing to do with the app. So outside the
|
|
116
|
-
* platform monorepo — where `workspace:*` links need no registry — the
|
|
117
|
-
* command checks first and, when the machine has no access, stops and names
|
|
118
|
-
* `mesh init`, the one place that sets a machine up. A registry that cannot
|
|
119
|
-
* be reached is a network fault, not a missing grant: warn and carry on.
|
|
120
|
-
*
|
|
121
|
-
* @example
|
|
122
|
-
* await ensureRegistryAccess(process.cwd(), { test: false }); // throws MeshCliError when access is missing
|
|
123
|
-
*/
|
|
124
41
|
export declare function ensureRegistryAccess(cwd: string, options: Pick<CreateAppOptions, "skipRegistryCheck">, preflight?: () => Promise<RegistryPreflight>): Promise<void>;
|
|
125
42
|
export {};
|
|
126
|
-
//# sourceMappingURL=create-app.d.ts.map
|