@mesh-tech/mesh-cli 0.20.2 → 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/dist/bin/mesh.d.ts +0 -12
- package/dist/bin/mesh.js +12 -12
- package/dist/bin/mesh.js.map +0 -1
- 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 +0 -98
- package/dist/src/commands/create-app.js +1 -163
- 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 +0 -128
- package/dist/src/commands/init/wizard.js +0 -109
- 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 +9 -10
- 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,21 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `mesh site` — publish a built directory as an OAuth-protected static site.
|
|
3
|
-
*
|
|
4
|
-
* mesh site publish <name> <dir> walk, hash, upload what's missing, commit
|
|
5
|
-
* mesh site versions <name> what has been published, newest first
|
|
6
|
-
* mesh site rollback <name> <ver> flip the pointer back
|
|
7
|
-
*
|
|
8
|
-
* Content-addressed and incremental, which is not an optimisation here so much
|
|
9
|
-
* as the thing that makes it usable: Enlight's build is 138 MB across 138 files,
|
|
10
|
-
* and 106 MB of that is six Dynamsoft installers that never change. They upload
|
|
11
|
-
* on the first publish and never again.
|
|
12
|
-
*
|
|
13
|
-
* Three stateless calls against the agent-api, so a run that dies partway
|
|
14
|
-
* through leaves nothing to clean up and a re-run resumes by re-asking what is
|
|
15
|
-
* missing.
|
|
16
|
-
*
|
|
17
|
-
* Design: `docs/superpowers/specs/2026-08-07-studio-static-sites-design.md`.
|
|
18
|
-
*/
|
|
19
1
|
import { createHash } from "node:crypto";
|
|
20
2
|
import { createReadStream } from "node:fs";
|
|
21
3
|
import { readdir, readFile, stat } from "node:fs/promises";
|
|
@@ -23,27 +5,8 @@ import { join, relative, resolve, sep } from "node:path";
|
|
|
23
5
|
import { logError, logInfo, logSuccess, logWarn } from "../utils/log.js";
|
|
24
6
|
import { agentApiFetch, agentApiSend, describeHttpError, describeNetworkError, resolveTarget, } from "./agent-api-client.js";
|
|
25
7
|
const DEFAULT_AUTH_CONTEXT = "mesh.dev";
|
|
26
|
-
/** How many blob uploads run at once. Bounded because the API buffers each blob
|
|
27
|
-
* to verify its hash, and the largest real file in this corpus is 43 MB. */
|
|
28
8
|
const UPLOAD_CONCURRENCY = 4;
|
|
29
|
-
/** Names never worth publishing, skipped rather than uploaded and served. */
|
|
30
9
|
const SKIP_ENTRIES = new Set([".DS_Store", "Thumbs.db", ".git"]);
|
|
31
|
-
/**
|
|
32
|
-
* HTTP failures in site language.
|
|
33
|
-
*
|
|
34
|
-
* The shared `describeHttpError` is written for conversations, and two of its
|
|
35
|
-
* branches actively mislead here:
|
|
36
|
-
*
|
|
37
|
-
* - It folds **403 into 401** and advises `mesh login`. For a publish that is
|
|
38
|
-
* the wrong instruction and the wrong diagnosis — the caller IS authenticated
|
|
39
|
-
* and simply lacks the grant, so logging in again changes nothing and hides
|
|
40
|
-
* the one fact that would fix it.
|
|
41
|
-
* - Its **404** says "conversation/artifact not found … run `mesh conversations
|
|
42
|
-
* list`", which sends someone debugging a rollback to an unrelated command.
|
|
43
|
-
*
|
|
44
|
-
* Everything else defers to the shared renderer, so there is still one place
|
|
45
|
-
* that handles 503s, redirects and the generic shape.
|
|
46
|
-
*/
|
|
47
10
|
async function describeSiteHttpError(res, target, site) {
|
|
48
11
|
if (res.status === 403) {
|
|
49
12
|
return (`not allowed to publish "${site}" — you are authenticated but lack the grant. ` +
|
|
@@ -54,7 +17,6 @@ async function describeSiteHttpError(res, target, site) {
|
|
|
54
17
|
}
|
|
55
18
|
return describeHttpError(res, target, { id: site });
|
|
56
19
|
}
|
|
57
|
-
/** SHA-256 of a file, streamed so a 43 MB installer never lands in memory whole. */
|
|
58
20
|
async function hashFile(absolute) {
|
|
59
21
|
const h = createHash("sha256");
|
|
60
22
|
await new Promise((res, rej) => {
|
|
@@ -65,7 +27,6 @@ async function hashFile(absolute) {
|
|
|
65
27
|
});
|
|
66
28
|
return h.digest("hex");
|
|
67
29
|
}
|
|
68
|
-
/** Walk a directory into manifest entries, hashing as it goes. */
|
|
69
30
|
async function walk(root) {
|
|
70
31
|
const out = [];
|
|
71
32
|
async function visit(dir) {
|
|
@@ -73,9 +34,6 @@ async function walk(root) {
|
|
|
73
34
|
if (SKIP_ENTRIES.has(entry.name))
|
|
74
35
|
continue;
|
|
75
36
|
const absolute = join(dir, entry.name);
|
|
76
|
-
// Symlinks are NOT followed. A build directory that links outside itself
|
|
77
|
-
// would otherwise publish whatever it points at, and a link cycle would
|
|
78
|
-
// hang the walk — neither is a thing a built site legitimately needs.
|
|
79
37
|
if (entry.isSymbolicLink()) {
|
|
80
38
|
logWarn(`skipping symlink ${relative(root, absolute)}`);
|
|
81
39
|
continue;
|
|
@@ -88,8 +46,6 @@ async function walk(root) {
|
|
|
88
46
|
continue;
|
|
89
47
|
const info = await stat(absolute);
|
|
90
48
|
out.push({
|
|
91
|
-
// Manifest paths are always forward-slashed, whatever the host OS uses,
|
|
92
|
-
// so a site published from Windows resolves identically to one from a Mac.
|
|
93
49
|
path: relative(root, absolute).split(sep).join("/"),
|
|
94
50
|
absolute,
|
|
95
51
|
hash: await hashFile(absolute),
|
|
@@ -109,7 +65,6 @@ function human(bytes) {
|
|
|
109
65
|
return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
|
|
110
66
|
return `${(bytes / 1024 / 1024 / 1024).toFixed(2)} GB`;
|
|
111
67
|
}
|
|
112
|
-
/** Run `worker` over `items`, at most `limit` at a time. */
|
|
113
68
|
async function pooled(items, limit, worker) {
|
|
114
69
|
let next = 0;
|
|
115
70
|
const runners = Array.from({ length: Math.min(limit, items.length) }, async () => {
|
|
@@ -135,12 +90,8 @@ async function publish(name, dir, opts, target) {
|
|
|
135
90
|
const total = files.reduce((n, f) => n + f.size, 0);
|
|
136
91
|
logInfo(`${files.length} files, ${human(total)}`);
|
|
137
92
|
if (!files.some((f) => f.path === "index.html")) {
|
|
138
|
-
// A warning, not an error — a site of pure assets is legitimate. But an SPA
|
|
139
|
-
// without index.html serves nothing at its root and the fallback has no
|
|
140
|
-
// target, which is much cheaper to hear now than to diagnose in a browser.
|
|
141
93
|
logWarn("no index.html at the root — deep links and the site root will 404");
|
|
142
94
|
}
|
|
143
|
-
// ── ① what is missing ────────────────────────────────────────────────────
|
|
144
95
|
const unique = [...new Set(files.map((f) => f.hash))];
|
|
145
96
|
const checkRes = await agentApiSend(target, `/v1/sites/${encodeURIComponent(name)}/blobs/check`, {
|
|
146
97
|
method: "POST",
|
|
@@ -151,13 +102,11 @@ async function publish(name, dir, opts, target) {
|
|
|
151
102
|
const { missing } = (await checkRes.json());
|
|
152
103
|
const missingSet = new Set(missing);
|
|
153
104
|
const toUpload = files.filter((f) => missingSet.has(f.hash));
|
|
154
|
-
// Deduplicated by hash: a build with the same bytes at two paths uploads once.
|
|
155
105
|
const seen = new Set();
|
|
156
106
|
const uploads = toUpload.filter((f) => (seen.has(f.hash) ? false : (seen.add(f.hash), true)));
|
|
157
107
|
const uploadBytes = uploads.reduce((n, f) => n + f.size, 0);
|
|
158
108
|
const reused = files.length - uploads.length;
|
|
159
109
|
logInfo(`${uploads.length} to upload (${human(uploadBytes)}); ${reused} already present (${human(total - uploadBytes)})`);
|
|
160
|
-
// ── ② upload them ────────────────────────────────────────────────────────
|
|
161
110
|
let done = 0;
|
|
162
111
|
await pooled(uploads, UPLOAD_CONCURRENCY, async (file) => {
|
|
163
112
|
const body = await readFile(file.absolute);
|
|
@@ -169,7 +118,6 @@ async function publish(name, dir, opts, target) {
|
|
|
169
118
|
done += 1;
|
|
170
119
|
logInfo(` [${done}/${uploads.length}] ${file.path} (${human(file.size)})`);
|
|
171
120
|
});
|
|
172
|
-
// ── ③ commit ─────────────────────────────────────────────────────────────
|
|
173
121
|
const fileMap = Object.fromEntries(files.map((f) => [f.path, f.hash]));
|
|
174
122
|
const commitRes = await agentApiSend(target, `/v1/sites/${encodeURIComponent(name)}/versions`, {
|
|
175
123
|
method: "POST",
|
|
@@ -177,9 +125,6 @@ async function publish(name, dir, opts, target) {
|
|
|
177
125
|
});
|
|
178
126
|
if (!commitRes.ok) {
|
|
179
127
|
if (commitRes.status === 409) {
|
|
180
|
-
// The server holds the truth about what is actually stored, so report its
|
|
181
|
-
// list rather than re-deriving one — a mismatch here means the upload and
|
|
182
|
-
// the commit disagree, and the server's view is the one that matters.
|
|
183
128
|
const body = (await commitRes.json().catch(() => ({})));
|
|
184
129
|
throw new Error(`commit rejected: ${body.missing?.length ?? "some"} blobs are missing server-side. ` +
|
|
185
130
|
`Re-run to upload them.`);
|
|
@@ -221,7 +166,6 @@ async function rollback(name, version, target) {
|
|
|
221
166
|
throw new Error(await describeSiteHttpError(res, target, name));
|
|
222
167
|
logSuccess(`${name} now serves ${version}`);
|
|
223
168
|
}
|
|
224
|
-
/** Shared target resolution + error reporting for every subcommand. */
|
|
225
169
|
async function run(opts, body) {
|
|
226
170
|
let target;
|
|
227
171
|
try {
|
|
@@ -257,10 +201,6 @@ export function registerSiteCommands(program) {
|
|
|
257
201
|
.description("Publish a built directory as a new version\n\n" +
|
|
258
202
|
"Uploads only files the server does not already hold, so a rebuild moves\n" +
|
|
259
203
|
"only what changed.")
|
|
260
|
-
// NOT `--version`: commander registers `-V, --version` on the root program,
|
|
261
|
-
// and it wins. `mesh site publish x ./dist --version abc` printed the CLI's
|
|
262
|
-
// own version and exited 0 without publishing anything — a silent no-op that
|
|
263
|
-
// looks like success, which is the worst shape a CI flag can have.
|
|
264
204
|
.option("--version-id <id>", "Version id (default: a UTC timestamp; CI usually passes a git sha)")
|
|
265
205
|
.option("--no-activate", "Publish without pointing the site at it")).action(async (name, dir, opts) => {
|
|
266
206
|
await run(opts, (target) => publish(name, dir, { version: opts.versionId, activate: opts.activate }, target));
|
|
@@ -274,4 +214,3 @@ export function registerSiteCommands(program) {
|
|
|
274
214
|
await run(opts, (target) => rollback(name, version, target));
|
|
275
215
|
});
|
|
276
216
|
}
|
|
277
|
-
//# sourceMappingURL=site.js.map
|
|
@@ -1,74 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mesh skills sync — agent-skill distribution (design §7.2, AC D1/D2).
|
|
3
|
-
*
|
|
4
|
-
* Three layers, one command:
|
|
5
|
-
*
|
|
6
|
-
* 1. BASE skills (how to drive the CLI — the CLI's own skills/) are
|
|
7
|
-
* installed into the repo's `.claude/skills/mesh-<name>/SKILL.md`.
|
|
8
|
-
* CLI-managed: files carry a managed marker and are only overwritten
|
|
9
|
-
* when they carry it (hand-edited copies are left alone with a warning).
|
|
10
|
-
*
|
|
11
|
-
* 2. PLATFORM skills — the build-an-app recipes that ship inside the
|
|
12
|
-
* `@mesh-tech/*` packages the repo already depends on
|
|
13
|
-
* (`node_modules/@mesh-tech/<pkg>/skills/<domain>/`). These are FETCHED
|
|
14
|
-
* from the installed package rather than vendored into the CLI, so the
|
|
15
|
-
* recipe stays owned by the platform package it documents and moves with
|
|
16
|
-
* it. `@mesh-tech/app-kit#apps` — the scaffold → wire → run → debug
|
|
17
|
-
* recipe — is the one every app repo needs.
|
|
18
|
-
* Requires `pnpm install` to have run; before that the layer is a no-op
|
|
19
|
-
* with a note.
|
|
20
|
-
*
|
|
21
|
-
* 3. INTENT discovery for those same package skills, for agents that read
|
|
22
|
-
* the catalog rather than `.claude/skills/`: the hook mechanism
|
|
23
|
-
* vendored into the CLI (deterministic, offline — no interactive
|
|
24
|
-
* installer):
|
|
25
|
-
* - .intent/hooks/intent-claude-gate.mjs (SessionStart catalog +
|
|
26
|
-
* edit gate; invokes the REPO-PINNED `pnpm exec intent`)
|
|
27
|
-
* - `@tanstack/intent` in the repo's devDependencies — the fence tells
|
|
28
|
-
* agents to run `pnpm exec intent list`, so the binary has to be
|
|
29
|
-
* pinned in the repo it runs in, tenant app repos included
|
|
30
|
-
* - .claude/settings.json SessionStart hook (JSON-merged, idempotent)
|
|
31
|
-
* - AGENTS.md fence (<!-- intent-skills:start/end -->) for
|
|
32
|
-
* non-Claude agents
|
|
33
|
-
*
|
|
34
|
-
* `mesh skills sync --check` is the CI/doctor form: exits 1 listing what is
|
|
35
|
-
* missing or stale, changes nothing. `mesh create-app` runs a best-effort
|
|
36
|
-
* sync after scaffolding so a fresh Claude session in a fresh repo sees every
|
|
37
|
-
* skill layer with zero manual setup (D1).
|
|
38
|
-
*/
|
|
39
1
|
import { Command } from "commander";
|
|
40
|
-
/**
|
|
41
|
-
* The `@tanstack/intent` range pinned into a target repo, and the single
|
|
42
|
-
* source for every place that range appears: the standalone apps-repo
|
|
43
|
-
* template renders from it, and `test/skills-sync.test.ts` holds it equal to
|
|
44
|
-
* the CLI's own devDependency, so the binary agents invoke matches the
|
|
45
|
-
* catalog format the vendored gate hook expects.
|
|
46
|
-
*/
|
|
47
2
|
export declare const INTENT_RANGE = "^0.3.6";
|
|
48
|
-
/** The repo root skills sync targets: the enclosing git root, else cwd. */
|
|
49
3
|
export declare function resolveTargetRoot(startDir?: string): string;
|
|
50
|
-
/**
|
|
51
|
-
* Platform skills reachable from the target repo: every
|
|
52
|
-
* `node_modules/@mesh-tech/<pkg>/skills/<domain>/SKILL.md`. Installed under
|
|
53
|
-
* `mesh-<pkg>-<domain>` so a package's `core` skill can never collide with the
|
|
54
|
-
* CLI's own `mesh-core`. One entry per `<pkg>/<domain>` — the same package
|
|
55
|
-
* linked from several workspace packages is still one skill.
|
|
56
|
-
*/
|
|
57
4
|
export declare function listPackageSkills(root: string): Array<{
|
|
58
5
|
name: string;
|
|
59
6
|
dir: string;
|
|
60
7
|
source: string;
|
|
61
8
|
}>;
|
|
62
|
-
/**
|
|
63
|
-
* Seed the app's OWN skill — the stub a developer grows into the guidance only
|
|
64
|
-
* their app can carry. Written once and never touched again: it carries no
|
|
65
|
-
* managed marker, so `sync` leaves it alone forever.
|
|
66
|
-
* Returns the repo-relative path when it wrote one, else null.
|
|
67
|
-
*/
|
|
68
9
|
export declare function seedAppSkill(root: string, appName: string, appRelPath: string): string | null;
|
|
69
|
-
/** Run a sync (or check). Returns true when everything is in place. */
|
|
70
10
|
export declare function syncSkills(root: string, opts?: {
|
|
71
11
|
check?: boolean;
|
|
72
12
|
}): boolean;
|
|
73
13
|
export declare function registerSkillsCommands(program: Command): void;
|
|
74
|
-
//# sourceMappingURL=skills.d.ts.map
|
|
@@ -1,41 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mesh skills sync — agent-skill distribution (design §7.2, AC D1/D2).
|
|
3
|
-
*
|
|
4
|
-
* Three layers, one command:
|
|
5
|
-
*
|
|
6
|
-
* 1. BASE skills (how to drive the CLI — the CLI's own skills/) are
|
|
7
|
-
* installed into the repo's `.claude/skills/mesh-<name>/SKILL.md`.
|
|
8
|
-
* CLI-managed: files carry a managed marker and are only overwritten
|
|
9
|
-
* when they carry it (hand-edited copies are left alone with a warning).
|
|
10
|
-
*
|
|
11
|
-
* 2. PLATFORM skills — the build-an-app recipes that ship inside the
|
|
12
|
-
* `@mesh-tech/*` packages the repo already depends on
|
|
13
|
-
* (`node_modules/@mesh-tech/<pkg>/skills/<domain>/`). These are FETCHED
|
|
14
|
-
* from the installed package rather than vendored into the CLI, so the
|
|
15
|
-
* recipe stays owned by the platform package it documents and moves with
|
|
16
|
-
* it. `@mesh-tech/app-kit#apps` — the scaffold → wire → run → debug
|
|
17
|
-
* recipe — is the one every app repo needs.
|
|
18
|
-
* Requires `pnpm install` to have run; before that the layer is a no-op
|
|
19
|
-
* with a note.
|
|
20
|
-
*
|
|
21
|
-
* 3. INTENT discovery for those same package skills, for agents that read
|
|
22
|
-
* the catalog rather than `.claude/skills/`: the hook mechanism
|
|
23
|
-
* vendored into the CLI (deterministic, offline — no interactive
|
|
24
|
-
* installer):
|
|
25
|
-
* - .intent/hooks/intent-claude-gate.mjs (SessionStart catalog +
|
|
26
|
-
* edit gate; invokes the REPO-PINNED `pnpm exec intent`)
|
|
27
|
-
* - `@tanstack/intent` in the repo's devDependencies — the fence tells
|
|
28
|
-
* agents to run `pnpm exec intent list`, so the binary has to be
|
|
29
|
-
* pinned in the repo it runs in, tenant app repos included
|
|
30
|
-
* - .claude/settings.json SessionStart hook (JSON-merged, idempotent)
|
|
31
|
-
* - AGENTS.md fence (<!-- intent-skills:start/end -->) for
|
|
32
|
-
* non-Claude agents
|
|
33
|
-
*
|
|
34
|
-
* `mesh skills sync --check` is the CI/doctor form: exits 1 listing what is
|
|
35
|
-
* missing or stale, changes nothing. `mesh create-app` runs a best-effort
|
|
36
|
-
* sync after scaffolding so a fresh Claude session in a fresh repo sees every
|
|
37
|
-
* skill layer with zero manual setup (D1).
|
|
38
|
-
*/
|
|
39
1
|
import * as fs from "fs";
|
|
40
2
|
import * as path from "path";
|
|
41
3
|
import { execFileSync } from "child_process";
|
|
@@ -45,15 +7,7 @@ import { findPackageRoot } from "./local/stack.js";
|
|
|
45
7
|
const MANAGED_MARKER = "<!-- managed-by: mesh skills sync — edits are overwritten; copy content elsewhere to customize -->";
|
|
46
8
|
const FENCE_START = "<!-- intent-skills:start -->";
|
|
47
9
|
const HOOK_RELATIVE = path.join(".intent", "hooks", "intent-claude-gate.mjs");
|
|
48
|
-
/**
|
|
49
|
-
* The `@tanstack/intent` range pinned into a target repo, and the single
|
|
50
|
-
* source for every place that range appears: the standalone apps-repo
|
|
51
|
-
* template renders from it, and `test/skills-sync.test.ts` holds it equal to
|
|
52
|
-
* the CLI's own devDependency, so the binary agents invoke matches the
|
|
53
|
-
* catalog format the vendored gate hook expects.
|
|
54
|
-
*/
|
|
55
10
|
export const INTENT_RANGE = "^0.3.6";
|
|
56
|
-
/** The repo root skills sync targets: the enclosing git root, else cwd. */
|
|
57
11
|
export function resolveTargetRoot(startDir = process.cwd()) {
|
|
58
12
|
try {
|
|
59
13
|
return execFileSync("git", ["rev-parse", "--show-toplevel"], {
|
|
@@ -69,7 +23,6 @@ export function resolveTargetRoot(startDir = process.cwd()) {
|
|
|
69
23
|
function cliAsset(...segments) {
|
|
70
24
|
return path.join(findPackageRoot(), ...segments);
|
|
71
25
|
}
|
|
72
|
-
/** Base skills shipped in the CLI package (skills/<name>/SKILL.md). */
|
|
73
26
|
function listBaseSkills() {
|
|
74
27
|
const dir = cliAsset("skills");
|
|
75
28
|
if (!fs.existsSync(dir))
|
|
@@ -79,7 +32,6 @@ function listBaseSkills() {
|
|
|
79
32
|
.filter((entry) => entry.isDirectory() && fs.existsSync(path.join(dir, entry.name, "SKILL.md")))
|
|
80
33
|
.map((entry) => ({ name: entry.name, source: path.join(dir, entry.name, "SKILL.md") }));
|
|
81
34
|
}
|
|
82
|
-
/** Managed content = source SKILL.md with the marker after its frontmatter. */
|
|
83
35
|
function renderManagedSkill(source) {
|
|
84
36
|
const raw = fs.readFileSync(source, "utf-8");
|
|
85
37
|
const frontmatter = raw.match(/^(---\n[\s\S]*?\n---\n)/)?.[1];
|
|
@@ -87,14 +39,7 @@ function renderManagedSkill(source) {
|
|
|
87
39
|
return `${MANAGED_MARKER}\n\n${raw}`;
|
|
88
40
|
return `${frontmatter}\n${MANAGED_MARKER}\n${raw.slice(frontmatter.length)}`;
|
|
89
41
|
}
|
|
90
|
-
/** The CLI's own skills are layer 1; fetching them again as a package skill would double-install them. */
|
|
91
42
|
const BASE_SKILL_PACKAGE = "mesh-cli";
|
|
92
|
-
/**
|
|
93
|
-
* Every `node_modules/@mesh-tech` directory in the repo. In a pnpm workspace a
|
|
94
|
-
* dependency is linked into the node_modules of the package that DECLARES it,
|
|
95
|
-
* so `@mesh-tech/app-kit` — declared by `apps/<name>/` — is not under the repo
|
|
96
|
-
* root's node_modules at all.
|
|
97
|
-
*/
|
|
98
43
|
function meshTechScopeDirs(root, maxDepth = 6) {
|
|
99
44
|
const scopes = [];
|
|
100
45
|
const walk = (dir, depth) => {
|
|
@@ -111,8 +56,6 @@ function meshTechScopeDirs(root, maxDepth = 6) {
|
|
|
111
56
|
if (!entry.isDirectory())
|
|
112
57
|
continue;
|
|
113
58
|
if (entry.name === "node_modules") {
|
|
114
|
-
// Don't descend: the scope dir here already links everything this level
|
|
115
|
-
// can see, and `.pnpm/` would yield the same content many times over.
|
|
116
59
|
const scope = path.join(dir, entry.name, "@mesh-tech");
|
|
117
60
|
if (fs.existsSync(scope))
|
|
118
61
|
scopes.push(scope);
|
|
@@ -126,13 +69,6 @@ function meshTechScopeDirs(root, maxDepth = 6) {
|
|
|
126
69
|
walk(root, 0);
|
|
127
70
|
return scopes;
|
|
128
71
|
}
|
|
129
|
-
/**
|
|
130
|
-
* Platform skills reachable from the target repo: every
|
|
131
|
-
* `node_modules/@mesh-tech/<pkg>/skills/<domain>/SKILL.md`. Installed under
|
|
132
|
-
* `mesh-<pkg>-<domain>` so a package's `core` skill can never collide with the
|
|
133
|
-
* CLI's own `mesh-core`. One entry per `<pkg>/<domain>` — the same package
|
|
134
|
-
* linked from several workspace packages is still one skill.
|
|
135
|
-
*/
|
|
136
72
|
export function listPackageSkills(root) {
|
|
137
73
|
const byName = new Map();
|
|
138
74
|
for (const scopeDir of meshTechScopeDirs(root)) {
|
|
@@ -156,7 +92,6 @@ export function listPackageSkills(root) {
|
|
|
156
92
|
}
|
|
157
93
|
return [...byName.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
158
94
|
}
|
|
159
|
-
/** Copy a skill's supporting files (references/, examples/, …) alongside SKILL.md. */
|
|
160
95
|
function copySkillExtras(sourceDir, targetDir) {
|
|
161
96
|
for (const entry of fs.readdirSync(sourceDir, { withFileTypes: true })) {
|
|
162
97
|
if (entry.name === "SKILL.md")
|
|
@@ -164,12 +99,6 @@ function copySkillExtras(sourceDir, targetDir) {
|
|
|
164
99
|
fs.cpSync(path.join(sourceDir, entry.name), path.join(targetDir, entry.name), { recursive: true });
|
|
165
100
|
}
|
|
166
101
|
}
|
|
167
|
-
/**
|
|
168
|
-
* Seed the app's OWN skill — the stub a developer grows into the guidance only
|
|
169
|
-
* their app can carry. Written once and never touched again: it carries no
|
|
170
|
-
* managed marker, so `sync` leaves it alone forever.
|
|
171
|
-
* Returns the repo-relative path when it wrote one, else null.
|
|
172
|
-
*/
|
|
173
102
|
export function seedAppSkill(root, appName, appRelPath) {
|
|
174
103
|
const target = path.join(root, ".claude", "skills", appName, "SKILL.md");
|
|
175
104
|
if (fs.existsSync(target))
|
|
@@ -182,7 +111,6 @@ export function seedAppSkill(root, appName, appRelPath) {
|
|
|
182
111
|
}
|
|
183
112
|
function planSync(root) {
|
|
184
113
|
const items = [];
|
|
185
|
-
// 1. Base skills → .claude/skills/mesh-<name>/SKILL.md
|
|
186
114
|
for (const skill of listBaseSkills()) {
|
|
187
115
|
const target = path.join(root, ".claude", "skills", `mesh-${skill.name}`, "SKILL.md");
|
|
188
116
|
const desired = renderManagedSkill(skill.source);
|
|
@@ -210,7 +138,6 @@ function planSync(root) {
|
|
|
210
138
|
}
|
|
211
139
|
}
|
|
212
140
|
}
|
|
213
|
-
// 2. Platform skills fetched from installed @mesh-tech/* packages
|
|
214
141
|
const packageSkills = listPackageSkills(root);
|
|
215
142
|
for (const skill of packageSkills) {
|
|
216
143
|
const targetDir = path.join(root, ".claude", "skills", skill.name);
|
|
@@ -251,7 +178,6 @@ function planSync(root) {
|
|
|
251
178
|
if (packageSkills.length === 0 && meshTechScopeDirs(root).length === 0) {
|
|
252
179
|
logInfo("No @mesh-tech packages installed yet — run `pnpm install`, then `mesh skills sync` again for the platform skills.");
|
|
253
180
|
}
|
|
254
|
-
// 3. Intent gate hook (CLI-managed generated file — kept current)
|
|
255
181
|
const hookSource = cliAsset("assets", "intent", "intent-claude-gate.mjs");
|
|
256
182
|
const hookTarget = path.join(root, HOOK_RELATIVE);
|
|
257
183
|
const hookDesired = fs.readFileSync(hookSource, "utf-8");
|
|
@@ -266,8 +192,6 @@ function planSync(root) {
|
|
|
266
192
|
fs.writeFileSync(hookTarget, hookDesired, { mode: 0o755 });
|
|
267
193
|
},
|
|
268
194
|
});
|
|
269
|
-
// 4. `@tanstack/intent` devDependency — the fence tells agents to run
|
|
270
|
-
// `pnpm exec intent`, which only resolves when the repo pins it.
|
|
271
195
|
const rootPkgPath = path.join(root, "package.json");
|
|
272
196
|
if (fs.existsSync(rootPkgPath)) {
|
|
273
197
|
let rootPkg = null;
|
|
@@ -287,9 +211,6 @@ function planSync(root) {
|
|
|
287
211
|
else {
|
|
288
212
|
items.push({
|
|
289
213
|
label,
|
|
290
|
-
// Writing the dependency does not install it. Bare `mesh skills sync`
|
|
291
|
-
// in an already-installed repo leaves `pnpm exec intent` unresolvable
|
|
292
|
-
// until the next install, so say so rather than reporting success.
|
|
293
214
|
remediation: "Added @tanstack/intent — run `pnpm install` so `pnpm exec intent` resolves.",
|
|
294
215
|
state: "write",
|
|
295
216
|
apply: () => {
|
|
@@ -301,7 +222,6 @@ function planSync(root) {
|
|
|
301
222
|
});
|
|
302
223
|
}
|
|
303
224
|
}
|
|
304
|
-
// 5. .claude/settings.json SessionStart hook (JSON merge, idempotent)
|
|
305
225
|
const settingsPath = path.join(root, ".claude", "settings.json");
|
|
306
226
|
let settings = {};
|
|
307
227
|
try {
|
|
@@ -336,7 +256,6 @@ function planSync(root) {
|
|
|
336
256
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 1) + "\n");
|
|
337
257
|
},
|
|
338
258
|
});
|
|
339
|
-
// 6. AGENTS.md fence (non-Claude agents discover Intent skills too)
|
|
340
259
|
const agentsPath = path.join(root, "AGENTS.md");
|
|
341
260
|
const fence = fs.readFileSync(cliAsset("assets", "intent", "agents-fence.md"), "utf-8");
|
|
342
261
|
const agentsCurrent = fs.existsSync(agentsPath) ? fs.readFileSync(agentsPath, "utf-8") : null;
|
|
@@ -352,7 +271,6 @@ function planSync(root) {
|
|
|
352
271
|
});
|
|
353
272
|
return items;
|
|
354
273
|
}
|
|
355
|
-
/** Run a sync (or check). Returns true when everything is in place. */
|
|
356
274
|
export function syncSkills(root, opts = {}) {
|
|
357
275
|
const items = planSync(root);
|
|
358
276
|
let dirty = false;
|
|
@@ -396,4 +314,3 @@ export function registerSkillsCommands(program) {
|
|
|
396
314
|
}
|
|
397
315
|
});
|
|
398
316
|
}
|
|
399
|
-
//# sourceMappingURL=skills.js.map
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mesh stack — Manage personal Pulumi stacks.
|
|
3
|
-
*
|
|
4
|
-
* mesh stack init Create a personal dev stack (dev-{github-user})
|
|
5
|
-
* mesh stack init --from uat Base on a different stack
|
|
6
|
-
*
|
|
7
|
-
* Creates Pulumi.<stack>.yaml with:
|
|
8
|
-
* - mesh:deploy: false (skip K8s deployments — dev-only stack)
|
|
9
|
-
* - mesh:deployerRole copied from the base stack
|
|
10
|
-
* - aws:region copied from the base stack
|
|
11
|
-
*/
|
|
12
1
|
import { Command } from "commander";
|
|
13
|
-
/**
|
|
14
|
-
* Find Pulumi.<stack>.yaml files in the app root.
|
|
15
|
-
*/
|
|
16
2
|
export declare function registerStackCommand(program: Command): void;
|
|
17
|
-
//# sourceMappingURL=stack.d.ts.map
|