@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.
Files changed (435) hide show
  1. package/dist/bin/mesh.d.ts +0 -12
  2. package/dist/bin/mesh.js +12 -12
  3. package/dist/bin/mesh.js.map +0 -1
  4. package/dist/build-info.json +2 -2
  5. package/dist/src/commands/agent-api-client.d.ts +0 -70
  6. package/dist/src/commands/agent-api-client.js +0 -80
  7. package/dist/src/commands/app-check.d.ts +0 -56
  8. package/dist/src/commands/app-check.js +0 -72
  9. package/dist/src/commands/artifacts.d.ts +0 -11
  10. package/dist/src/commands/artifacts.js +0 -33
  11. package/dist/src/commands/cluster.d.ts +0 -39
  12. package/dist/src/commands/cluster.js +0 -73
  13. package/dist/src/commands/conversations.d.ts +0 -36
  14. package/dist/src/commands/conversations.js +0 -59
  15. package/dist/src/commands/create-app.d.ts +0 -98
  16. package/dist/src/commands/create-app.js +1 -163
  17. package/dist/src/commands/db/connect.d.ts +0 -7
  18. package/dist/src/commands/db/connect.js +0 -9
  19. package/dist/src/commands/db/credentials.d.ts +0 -7
  20. package/dist/src/commands/db/credentials.js +0 -10
  21. package/dist/src/commands/db/env.d.ts +0 -6
  22. package/dist/src/commands/db/env.js +0 -14
  23. package/dist/src/commands/db/exec.d.ts +0 -43
  24. package/dist/src/commands/db/exec.js +0 -69
  25. package/dist/src/commands/db/index.d.ts +0 -10
  26. package/dist/src/commands/db/index.js +0 -10
  27. package/dist/src/commands/db/psql.d.ts +0 -7
  28. package/dist/src/commands/db/psql.js +0 -18
  29. package/dist/src/commands/deploy.d.ts +0 -38
  30. package/dist/src/commands/deploy.js +1 -76
  31. package/dist/src/commands/dev-doctor.d.ts +0 -82
  32. package/dist/src/commands/dev-doctor.js +3 -132
  33. package/dist/src/commands/dev-launch.d.ts +0 -52
  34. package/dist/src/commands/dev-launch.js +0 -56
  35. package/dist/src/commands/dev-token-server.d.ts +0 -18
  36. package/dist/src/commands/dev-token-server.js +1 -24
  37. package/dist/src/commands/dev.d.ts +0 -246
  38. package/dist/src/commands/dev.js +5 -963
  39. package/dist/src/commands/docs.d.ts +0 -1
  40. package/dist/src/commands/docs.js +0 -12
  41. package/dist/src/commands/hub/index.d.ts +0 -60
  42. package/dist/src/commands/hub/index.js +2 -139
  43. package/dist/src/commands/init/wizard.d.ts +0 -128
  44. package/dist/src/commands/init/wizard.js +0 -109
  45. package/dist/src/commands/init.d.ts +0 -55
  46. package/dist/src/commands/init.js +0 -70
  47. package/dist/src/commands/install-shim.d.ts +0 -23
  48. package/dist/src/commands/install-shim.js +2 -29
  49. package/dist/src/commands/local/auth-provision.d.ts +0 -80
  50. package/dist/src/commands/local/auth-provision.js +0 -109
  51. package/dist/src/commands/local/dev-local.d.ts +0 -91
  52. package/dist/src/commands/local/dev-local.js +0 -147
  53. package/dist/src/commands/local/docker-runner.d.ts +0 -22
  54. package/dist/src/commands/local/docker-runner.js +2 -35
  55. package/dist/src/commands/local/helpers.d.ts +0 -14
  56. package/dist/src/commands/local/helpers.js +0 -13
  57. package/dist/src/commands/local/hub-local.d.ts +0 -96
  58. package/dist/src/commands/local/hub-local.js +0 -111
  59. package/dist/src/commands/local/index.d.ts +0 -14
  60. package/dist/src/commands/local/index.js +0 -86
  61. package/dist/src/commands/local/mocks.d.ts +0 -269
  62. package/dist/src/commands/local/mocks.js +1 -274
  63. package/dist/src/commands/local/seed-hub-catalog.d.ts +0 -25
  64. package/dist/src/commands/local/seed-hub-catalog.js +0 -41
  65. package/dist/src/commands/local/seed-zitadel.d.ts +0 -82
  66. package/dist/src/commands/local/seed-zitadel.js +0 -158
  67. package/dist/src/commands/local/seed.d.ts +0 -64
  68. package/dist/src/commands/local/seed.js +0 -78
  69. package/dist/src/commands/local/stack.d.ts +0 -141
  70. package/dist/src/commands/local/stack.js +0 -153
  71. package/dist/src/commands/login.d.ts +0 -265
  72. package/dist/src/commands/login.js +4 -418
  73. package/dist/src/commands/peer-addressing.d.ts +0 -39
  74. package/dist/src/commands/peer-addressing.js +0 -37
  75. package/dist/src/commands/port-ownership.d.ts +0 -44
  76. package/dist/src/commands/port-ownership.js +0 -47
  77. package/dist/src/commands/registry-publish.d.ts +0 -1
  78. package/dist/src/commands/registry-publish.js +0 -46
  79. package/dist/src/commands/registry.d.ts +4 -237
  80. package/dist/src/commands/registry.js +2 -316
  81. package/dist/src/commands/secrets/exec.d.ts +0 -16
  82. package/dist/src/commands/secrets/exec.js +0 -24
  83. package/dist/src/commands/secrets/index.d.ts +0 -9
  84. package/dist/src/commands/secrets/index.js +0 -10
  85. package/dist/src/commands/secrets/migrate-config.d.ts +0 -17
  86. package/dist/src/commands/secrets/migrate-config.js +0 -40
  87. package/dist/src/commands/secrets/reindex.d.ts +0 -38
  88. package/dist/src/commands/secrets/reindex.js +0 -39
  89. package/dist/src/commands/secrets/set.d.ts +0 -47
  90. package/dist/src/commands/secrets/set.js +0 -107
  91. package/dist/src/commands/site.d.ts +0 -1
  92. package/dist/src/commands/site.js +0 -61
  93. package/dist/src/commands/skills.d.ts +0 -61
  94. package/dist/src/commands/skills.js +0 -83
  95. package/dist/src/commands/stack.d.ts +0 -15
  96. package/dist/src/commands/stack.js +1 -128
  97. package/dist/src/commands/temporal.d.ts +0 -30
  98. package/dist/src/commands/temporal.js.map +0 -1
  99. package/dist/src/commands/tenant.d.ts +0 -31
  100. package/dist/src/commands/tenant.js +0 -55
  101. package/dist/src/commands/tunnel/index.d.ts +0 -40
  102. package/dist/src/commands/tunnel/index.js +0 -141
  103. package/dist/src/commands/vcs/clone.d.ts +0 -1
  104. package/dist/src/commands/vcs/clone.js +0 -4
  105. package/dist/src/commands/vcs/common.d.ts +0 -32
  106. package/dist/src/commands/vcs/common.js +0 -41
  107. package/dist/src/commands/vcs/drafts.d.ts +0 -1
  108. package/dist/src/commands/vcs/drafts.js +0 -1
  109. package/dist/src/commands/vcs/get.d.ts +0 -1
  110. package/dist/src/commands/vcs/get.js +0 -11
  111. package/dist/src/commands/vcs/index.d.ts +0 -1
  112. package/dist/src/commands/vcs/index.js +0 -1
  113. package/dist/src/commands/vcs/propose.d.ts +0 -26
  114. package/dist/src/commands/vcs/propose.js +3 -34
  115. package/dist/src/commands/vcs/review.d.ts +0 -1
  116. package/dist/src/commands/vcs/review.js +0 -1
  117. package/dist/src/commands/vcs/rm.d.ts +0 -11
  118. package/dist/src/commands/vcs/rm.js +0 -14
  119. package/dist/src/commands/vcs-enrich.d.ts +0 -12
  120. package/dist/src/commands/vcs-enrich.js +0 -12
  121. package/dist/src/commands/vpn/index.d.ts +0 -17
  122. package/dist/src/commands/vpn/index.js +0 -102
  123. package/dist/src/commands/vpn/tunnel.d.ts +0 -9
  124. package/dist/src/commands/vpn/tunnel.js +0 -37
  125. package/dist/src/commands/workflow.d.ts +0 -22
  126. package/dist/src/commands/workflow.js +0 -80
  127. package/dist/src/docs/assemble.d.ts +0 -117
  128. package/dist/src/docs/assemble.js +0 -142
  129. package/dist/src/docs/cli-reference.d.ts +0 -58
  130. package/dist/src/docs/cli-reference.js +0 -77
  131. package/dist/src/docs/discover.d.ts +0 -40
  132. package/dist/src/docs/discover.js +2 -60
  133. package/dist/src/docs/portal.d.ts +0 -44
  134. package/dist/src/docs/portal.js +0 -49
  135. package/dist/src/docs/registry-docs.d.ts +0 -29
  136. package/dist/src/docs/registry-docs.js +0 -40
  137. package/dist/src/docs/schema.d.ts +0 -36
  138. package/dist/src/docs/schema.js +0 -52
  139. package/dist/src/docs/serve.d.ts +0 -18
  140. package/dist/src/docs/serve.js +2 -30
  141. package/dist/src/docs/start.d.ts +0 -42
  142. package/dist/src/docs/start.js +0 -70
  143. package/dist/src/eval/agent-eval.d.mts +0 -12
  144. package/dist/src/eval/agent-eval.mjs +0 -22
  145. package/dist/src/index.d.ts +0 -6
  146. package/dist/src/index.js.map +0 -1
  147. package/dist/src/program.d.ts +0 -20
  148. package/dist/src/program.js +0 -24
  149. package/dist/src/utils/auth-preflight.d.ts +0 -137
  150. package/dist/src/utils/auth-preflight.js +0 -149
  151. package/dist/src/utils/aws-auth.d.ts +0 -163
  152. package/dist/src/utils/aws-auth.js +3 -232
  153. package/dist/src/utils/bastion.d.ts +0 -27
  154. package/dist/src/utils/bastion.js +0 -28
  155. package/dist/src/utils/build-info.d.ts +0 -22
  156. package/dist/src/utils/build-info.js +0 -27
  157. package/dist/src/utils/cache-home.d.ts +0 -23
  158. package/dist/src/utils/cache-home.js +0 -25
  159. package/dist/src/utils/capture-history.d.ts +0 -54
  160. package/dist/src/utils/capture-history.js +1 -55
  161. package/dist/src/utils/context.d.ts +0 -23
  162. package/dist/src/utils/context.js +0 -43
  163. package/dist/src/utils/credentials.d.ts +0 -38
  164. package/dist/src/utils/credentials.js +0 -39
  165. package/dist/src/utils/deploy-preflight.d.ts +0 -38
  166. package/dist/src/utils/deploy-preflight.js +1 -71
  167. package/dist/src/utils/errors.d.ts +0 -53
  168. package/dist/src/utils/errors.js +0 -49
  169. package/dist/src/utils/first-party-contexts.d.ts +0 -38
  170. package/dist/src/utils/first-party-contexts.js +0 -44
  171. package/dist/src/utils/index.d.ts +0 -4
  172. package/dist/src/utils/index.js +0 -4
  173. package/dist/src/utils/kubeconfig.d.ts +0 -40
  174. package/dist/src/utils/kubeconfig.js +0 -44
  175. package/dist/src/utils/log.d.ts +0 -20
  176. package/dist/src/utils/log.js +0 -20
  177. package/dist/src/utils/mesh-json.d.ts +0 -46
  178. package/dist/src/utils/mesh-json.js +0 -39
  179. package/dist/src/utils/pid.d.ts +0 -42
  180. package/dist/src/utils/pid.js +0 -48
  181. package/dist/src/utils/pulumi-run.d.ts +0 -14
  182. package/dist/src/utils/pulumi-run.js +0 -42
  183. package/dist/src/utils/pulumi.d.ts +0 -34
  184. package/dist/src/utils/pulumi.js +0 -38
  185. package/dist/src/utils/reachability.d.ts +0 -27
  186. package/dist/src/utils/reachability.js +0 -40
  187. package/dist/src/utils/recover-conversation.d.ts +0 -110
  188. package/dist/src/utils/recover-conversation.js +0 -108
  189. package/dist/src/utils/registry-broker.d.ts +5 -84
  190. package/dist/src/utils/registry-broker.js +0 -62
  191. package/dist/src/utils/registry-identity.d.ts +0 -149
  192. package/dist/src/utils/registry-identity.js +0 -143
  193. package/dist/src/utils/scaffold-versions.d.ts +0 -41
  194. package/dist/src/utils/scaffold-versions.js +0 -42
  195. package/dist/src/utils/socks-forward.d.ts +0 -24
  196. package/dist/src/utils/socks-forward.js +2 -25
  197. package/dist/src/utils/stack-flag.d.ts +0 -13
  198. package/dist/src/utils/stack-flag.js +0 -21
  199. package/dist/src/utils/tailscale-targets.d.ts +0 -37
  200. package/dist/src/utils/tailscale-targets.js +0 -33
  201. package/dist/src/utils/tailscale.d.ts +0 -177
  202. package/dist/src/utils/tailscale.js +6 -337
  203. package/dist/src/utils/temporal-auth.d.ts +0 -41
  204. package/dist/src/utils/temporal-auth.js +0 -52
  205. package/dist/src/utils/temporal-codec.d.ts +0 -89
  206. package/dist/src/utils/temporal-codec.js.map +0 -1
  207. package/dist/src/utils/tunnel-ownership.d.ts +0 -79
  208. package/dist/src/utils/tunnel-ownership.js +0 -74
  209. package/dist/src/utils/vpn-join.d.ts +0 -16
  210. package/dist/src/utils/vpn-join.js +0 -17
  211. package/dist/src/utils/vpn.d.ts +0 -42
  212. package/dist/src/utils/vpn.js +0 -52
  213. package/dist/src/utils/workflow-fingerprint.d.ts +0 -39
  214. package/dist/src/utils/workflow-fingerprint.js +1 -63
  215. package/dist/src/utils/worktree-identity.d.ts +0 -62
  216. package/dist/src/utils/worktree-identity.js +0 -88
  217. package/package.json +1 -1
  218. package/skills/core/SKILL.md +9 -10
  219. package/templates/api-auth/api/src/index.ts.hbs +1 -1
  220. package/templates/api-auth/api/src/spicedb-http-provider.ts.hbs +2 -2
  221. package/templates/api-role-gating/api/src/authn.ts.hbs +2 -2
  222. package/templates/api-role-gating/index.ts.hbs +1 -1
  223. package/templates/api-role-gating/skills/develop/SKILL.md.hbs +1 -1
  224. package/templates/platform-repo/core/Pulumi.{{tenant}}-{{env}}.yaml.hbs +2 -2
  225. package/templates/platform-repo/platform/index.ts +1 -1
  226. package/dist/bin/mesh.d.ts.map +0 -1
  227. package/dist/src/commands/agent-api-client.d.ts.map +0 -1
  228. package/dist/src/commands/agent-api-client.js.map +0 -1
  229. package/dist/src/commands/app-check.d.ts.map +0 -1
  230. package/dist/src/commands/app-check.js.map +0 -1
  231. package/dist/src/commands/artifacts.d.ts.map +0 -1
  232. package/dist/src/commands/artifacts.js.map +0 -1
  233. package/dist/src/commands/cluster.d.ts.map +0 -1
  234. package/dist/src/commands/cluster.js.map +0 -1
  235. package/dist/src/commands/conversations.d.ts.map +0 -1
  236. package/dist/src/commands/conversations.js.map +0 -1
  237. package/dist/src/commands/create-app.d.ts.map +0 -1
  238. package/dist/src/commands/create-app.js.map +0 -1
  239. package/dist/src/commands/db/connect.d.ts.map +0 -1
  240. package/dist/src/commands/db/connect.js.map +0 -1
  241. package/dist/src/commands/db/credentials.d.ts.map +0 -1
  242. package/dist/src/commands/db/credentials.js.map +0 -1
  243. package/dist/src/commands/db/env.d.ts.map +0 -1
  244. package/dist/src/commands/db/env.js.map +0 -1
  245. package/dist/src/commands/db/exec.d.ts.map +0 -1
  246. package/dist/src/commands/db/exec.js.map +0 -1
  247. package/dist/src/commands/db/index.d.ts.map +0 -1
  248. package/dist/src/commands/db/index.js.map +0 -1
  249. package/dist/src/commands/db/psql.d.ts.map +0 -1
  250. package/dist/src/commands/db/psql.js.map +0 -1
  251. package/dist/src/commands/deploy.d.ts.map +0 -1
  252. package/dist/src/commands/deploy.js.map +0 -1
  253. package/dist/src/commands/dev-doctor.d.ts.map +0 -1
  254. package/dist/src/commands/dev-doctor.js.map +0 -1
  255. package/dist/src/commands/dev-launch.d.ts.map +0 -1
  256. package/dist/src/commands/dev-launch.js.map +0 -1
  257. package/dist/src/commands/dev-token-server.d.ts.map +0 -1
  258. package/dist/src/commands/dev-token-server.js.map +0 -1
  259. package/dist/src/commands/dev.d.ts.map +0 -1
  260. package/dist/src/commands/dev.js.map +0 -1
  261. package/dist/src/commands/docs.d.ts.map +0 -1
  262. package/dist/src/commands/docs.js.map +0 -1
  263. package/dist/src/commands/hub/index.d.ts.map +0 -1
  264. package/dist/src/commands/hub/index.js.map +0 -1
  265. package/dist/src/commands/init/wizard.d.ts.map +0 -1
  266. package/dist/src/commands/init/wizard.js.map +0 -1
  267. package/dist/src/commands/init.d.ts.map +0 -1
  268. package/dist/src/commands/init.js.map +0 -1
  269. package/dist/src/commands/install-shim.d.ts.map +0 -1
  270. package/dist/src/commands/install-shim.js.map +0 -1
  271. package/dist/src/commands/local/auth-provision.d.ts.map +0 -1
  272. package/dist/src/commands/local/auth-provision.js.map +0 -1
  273. package/dist/src/commands/local/dev-local.d.ts.map +0 -1
  274. package/dist/src/commands/local/dev-local.js.map +0 -1
  275. package/dist/src/commands/local/docker-runner.d.ts.map +0 -1
  276. package/dist/src/commands/local/docker-runner.js.map +0 -1
  277. package/dist/src/commands/local/helpers.d.ts.map +0 -1
  278. package/dist/src/commands/local/helpers.js.map +0 -1
  279. package/dist/src/commands/local/hub-local.d.ts.map +0 -1
  280. package/dist/src/commands/local/hub-local.js.map +0 -1
  281. package/dist/src/commands/local/index.d.ts.map +0 -1
  282. package/dist/src/commands/local/index.js.map +0 -1
  283. package/dist/src/commands/local/mocks.d.ts.map +0 -1
  284. package/dist/src/commands/local/mocks.js.map +0 -1
  285. package/dist/src/commands/local/seed-hub-catalog.d.ts.map +0 -1
  286. package/dist/src/commands/local/seed-hub-catalog.js.map +0 -1
  287. package/dist/src/commands/local/seed-zitadel.d.ts.map +0 -1
  288. package/dist/src/commands/local/seed-zitadel.js.map +0 -1
  289. package/dist/src/commands/local/seed.d.ts.map +0 -1
  290. package/dist/src/commands/local/seed.js.map +0 -1
  291. package/dist/src/commands/local/stack.d.ts.map +0 -1
  292. package/dist/src/commands/local/stack.js.map +0 -1
  293. package/dist/src/commands/login.d.ts.map +0 -1
  294. package/dist/src/commands/login.js.map +0 -1
  295. package/dist/src/commands/peer-addressing.d.ts.map +0 -1
  296. package/dist/src/commands/peer-addressing.js.map +0 -1
  297. package/dist/src/commands/port-ownership.d.ts.map +0 -1
  298. package/dist/src/commands/port-ownership.js.map +0 -1
  299. package/dist/src/commands/registry-publish.d.ts.map +0 -1
  300. package/dist/src/commands/registry-publish.js.map +0 -1
  301. package/dist/src/commands/registry.d.ts.map +0 -1
  302. package/dist/src/commands/registry.js.map +0 -1
  303. package/dist/src/commands/secrets/exec.d.ts.map +0 -1
  304. package/dist/src/commands/secrets/exec.js.map +0 -1
  305. package/dist/src/commands/secrets/index.d.ts.map +0 -1
  306. package/dist/src/commands/secrets/index.js.map +0 -1
  307. package/dist/src/commands/secrets/migrate-config.d.ts.map +0 -1
  308. package/dist/src/commands/secrets/migrate-config.js.map +0 -1
  309. package/dist/src/commands/secrets/reindex.d.ts.map +0 -1
  310. package/dist/src/commands/secrets/reindex.js.map +0 -1
  311. package/dist/src/commands/secrets/set.d.ts.map +0 -1
  312. package/dist/src/commands/secrets/set.js.map +0 -1
  313. package/dist/src/commands/site.d.ts.map +0 -1
  314. package/dist/src/commands/site.js.map +0 -1
  315. package/dist/src/commands/skills.d.ts.map +0 -1
  316. package/dist/src/commands/skills.js.map +0 -1
  317. package/dist/src/commands/stack.d.ts.map +0 -1
  318. package/dist/src/commands/stack.js.map +0 -1
  319. package/dist/src/commands/temporal.d.ts.map +0 -1
  320. package/dist/src/commands/tenant.d.ts.map +0 -1
  321. package/dist/src/commands/tenant.js.map +0 -1
  322. package/dist/src/commands/tunnel/index.d.ts.map +0 -1
  323. package/dist/src/commands/tunnel/index.js.map +0 -1
  324. package/dist/src/commands/vcs/clone.d.ts.map +0 -1
  325. package/dist/src/commands/vcs/clone.js.map +0 -1
  326. package/dist/src/commands/vcs/common.d.ts.map +0 -1
  327. package/dist/src/commands/vcs/common.js.map +0 -1
  328. package/dist/src/commands/vcs/drafts.d.ts.map +0 -1
  329. package/dist/src/commands/vcs/drafts.js.map +0 -1
  330. package/dist/src/commands/vcs/get.d.ts.map +0 -1
  331. package/dist/src/commands/vcs/get.js.map +0 -1
  332. package/dist/src/commands/vcs/index.d.ts.map +0 -1
  333. package/dist/src/commands/vcs/index.js.map +0 -1
  334. package/dist/src/commands/vcs/propose.d.ts.map +0 -1
  335. package/dist/src/commands/vcs/propose.js.map +0 -1
  336. package/dist/src/commands/vcs/review.d.ts.map +0 -1
  337. package/dist/src/commands/vcs/review.js.map +0 -1
  338. package/dist/src/commands/vcs/rm.d.ts.map +0 -1
  339. package/dist/src/commands/vcs/rm.js.map +0 -1
  340. package/dist/src/commands/vcs-enrich.d.ts.map +0 -1
  341. package/dist/src/commands/vcs-enrich.js.map +0 -1
  342. package/dist/src/commands/vpn/index.d.ts.map +0 -1
  343. package/dist/src/commands/vpn/index.js.map +0 -1
  344. package/dist/src/commands/vpn/tunnel.d.ts.map +0 -1
  345. package/dist/src/commands/vpn/tunnel.js.map +0 -1
  346. package/dist/src/commands/workflow.d.ts.map +0 -1
  347. package/dist/src/commands/workflow.js.map +0 -1
  348. package/dist/src/docs/assemble.d.ts.map +0 -1
  349. package/dist/src/docs/assemble.js.map +0 -1
  350. package/dist/src/docs/cli-reference.d.ts.map +0 -1
  351. package/dist/src/docs/cli-reference.js.map +0 -1
  352. package/dist/src/docs/discover.d.ts.map +0 -1
  353. package/dist/src/docs/discover.js.map +0 -1
  354. package/dist/src/docs/portal.d.ts.map +0 -1
  355. package/dist/src/docs/portal.js.map +0 -1
  356. package/dist/src/docs/registry-docs.d.ts.map +0 -1
  357. package/dist/src/docs/registry-docs.js.map +0 -1
  358. package/dist/src/docs/schema.d.ts.map +0 -1
  359. package/dist/src/docs/schema.js.map +0 -1
  360. package/dist/src/docs/serve.d.ts.map +0 -1
  361. package/dist/src/docs/serve.js.map +0 -1
  362. package/dist/src/docs/start.d.ts.map +0 -1
  363. package/dist/src/docs/start.js.map +0 -1
  364. package/dist/src/eval/agent-eval.d.mts.map +0 -1
  365. package/dist/src/eval/agent-eval.mjs.map +0 -1
  366. package/dist/src/index.d.ts.map +0 -1
  367. package/dist/src/program.d.ts.map +0 -1
  368. package/dist/src/program.js.map +0 -1
  369. package/dist/src/utils/auth-preflight.d.ts.map +0 -1
  370. package/dist/src/utils/auth-preflight.js.map +0 -1
  371. package/dist/src/utils/aws-auth.d.ts.map +0 -1
  372. package/dist/src/utils/aws-auth.js.map +0 -1
  373. package/dist/src/utils/bastion.d.ts.map +0 -1
  374. package/dist/src/utils/bastion.js.map +0 -1
  375. package/dist/src/utils/build-info.d.ts.map +0 -1
  376. package/dist/src/utils/build-info.js.map +0 -1
  377. package/dist/src/utils/cache-home.d.ts.map +0 -1
  378. package/dist/src/utils/cache-home.js.map +0 -1
  379. package/dist/src/utils/capture-history.d.ts.map +0 -1
  380. package/dist/src/utils/capture-history.js.map +0 -1
  381. package/dist/src/utils/context.d.ts.map +0 -1
  382. package/dist/src/utils/context.js.map +0 -1
  383. package/dist/src/utils/credentials.d.ts.map +0 -1
  384. package/dist/src/utils/credentials.js.map +0 -1
  385. package/dist/src/utils/deploy-preflight.d.ts.map +0 -1
  386. package/dist/src/utils/deploy-preflight.js.map +0 -1
  387. package/dist/src/utils/errors.d.ts.map +0 -1
  388. package/dist/src/utils/errors.js.map +0 -1
  389. package/dist/src/utils/first-party-contexts.d.ts.map +0 -1
  390. package/dist/src/utils/first-party-contexts.js.map +0 -1
  391. package/dist/src/utils/index.d.ts.map +0 -1
  392. package/dist/src/utils/index.js.map +0 -1
  393. package/dist/src/utils/kubeconfig.d.ts.map +0 -1
  394. package/dist/src/utils/kubeconfig.js.map +0 -1
  395. package/dist/src/utils/log.d.ts.map +0 -1
  396. package/dist/src/utils/log.js.map +0 -1
  397. package/dist/src/utils/mesh-json.d.ts.map +0 -1
  398. package/dist/src/utils/mesh-json.js.map +0 -1
  399. package/dist/src/utils/pid.d.ts.map +0 -1
  400. package/dist/src/utils/pid.js.map +0 -1
  401. package/dist/src/utils/pulumi-run.d.ts.map +0 -1
  402. package/dist/src/utils/pulumi-run.js.map +0 -1
  403. package/dist/src/utils/pulumi.d.ts.map +0 -1
  404. package/dist/src/utils/pulumi.js.map +0 -1
  405. package/dist/src/utils/reachability.d.ts.map +0 -1
  406. package/dist/src/utils/reachability.js.map +0 -1
  407. package/dist/src/utils/recover-conversation.d.ts.map +0 -1
  408. package/dist/src/utils/recover-conversation.js.map +0 -1
  409. package/dist/src/utils/registry-broker.d.ts.map +0 -1
  410. package/dist/src/utils/registry-broker.js.map +0 -1
  411. package/dist/src/utils/registry-identity.d.ts.map +0 -1
  412. package/dist/src/utils/registry-identity.js.map +0 -1
  413. package/dist/src/utils/scaffold-versions.d.ts.map +0 -1
  414. package/dist/src/utils/scaffold-versions.js.map +0 -1
  415. package/dist/src/utils/socks-forward.d.ts.map +0 -1
  416. package/dist/src/utils/socks-forward.js.map +0 -1
  417. package/dist/src/utils/stack-flag.d.ts.map +0 -1
  418. package/dist/src/utils/stack-flag.js.map +0 -1
  419. package/dist/src/utils/tailscale-targets.d.ts.map +0 -1
  420. package/dist/src/utils/tailscale-targets.js.map +0 -1
  421. package/dist/src/utils/tailscale.d.ts.map +0 -1
  422. package/dist/src/utils/tailscale.js.map +0 -1
  423. package/dist/src/utils/temporal-auth.d.ts.map +0 -1
  424. package/dist/src/utils/temporal-auth.js.map +0 -1
  425. package/dist/src/utils/temporal-codec.d.ts.map +0 -1
  426. package/dist/src/utils/tunnel-ownership.d.ts.map +0 -1
  427. package/dist/src/utils/tunnel-ownership.js.map +0 -1
  428. package/dist/src/utils/vpn-join.d.ts.map +0 -1
  429. package/dist/src/utils/vpn-join.js.map +0 -1
  430. package/dist/src/utils/vpn.d.ts.map +0 -1
  431. package/dist/src/utils/vpn.js.map +0 -1
  432. package/dist/src/utils/workflow-fingerprint.d.ts.map +0 -1
  433. package/dist/src/utils/workflow-fingerprint.js.map +0 -1
  434. package/dist/src/utils/worktree-identity.d.ts.map +0 -1
  435. package/dist/src/utils/worktree-identity.js.map +0 -1
@@ -1,29 +1,3 @@
1
- /**
2
- * mesh login — Authenticate with Zitadel via OIDC PKCE or Device Code flow.
3
- *
4
- * Opens browser to Zitadel (PKCE) or prints a code to enter in the browser
5
- * (Device Code). Exchanges for tokens and caches at ~/.config/mesh/credentials.json.
6
- *
7
- * Config is read from ~/.config/mesh/config.json, keyed by context
8
- * (e.g., "mesh.dev"). After deploying the platform, copy the CLI client ID
9
- * from the Pulumi stack output into the config file.
10
- *
11
- * In containers/SSH sessions, device code flow is used automatically.
12
- *
13
- * `mesh login` is for a DEPLOYED platform only — the tenant platform you
14
- * deploy to, reach the Hub of, or tunnel into. Package-registry access is a
15
- * separate, global identity owned by `mesh registry login`; a platform login
16
- * never writes ~/.npmrc, and the reserved `registry` credential key is refused
17
- * here so the two can never be confused.
18
- *
19
- * Usage:
20
- * mesh login acme.dev — authenticate to the acme dev platform
21
- * mesh login acme.dev --device — force device code flow
22
- * mesh login acme.dev --status — show current auth state (Zitadel session if
23
- * there is one, otherwise whatever the AWS
24
- * credential chain resolves — SSO or key pair)
25
- * mesh logout acme.dev — clear cached credentials
26
- */
27
1
  import { Command } from "commander";
28
2
  import { type AwsIdentity } from "../utils/aws-auth.js";
29
3
  declare const CONFIG_DIR: string;
@@ -32,33 +6,11 @@ declare const CREDENTIALS_FILE: string;
32
6
  interface ContextConfig {
33
7
  issuer: string;
34
8
  clientId: string;
35
- /**
36
- * Default IAM role ARN to assume for this context when no `--role` flag
37
- * and no `MESH_AWS_ROLE` env var are provided. Set automatically the first
38
- * time `mesh login ... --export --role <arn>` runs against this context;
39
- * subsequent `--role` values overwrite it.
40
- */
41
9
  defaultRole?: string;
42
- /**
43
- * Optional admin-tier IAM role for this context. When set,
44
- * `selectRoleForCaller` upgrades to this ARN automatically when the
45
- * caller's Zitadel JWT carries the admin role (default
46
- * `mesh.platform:admin`; override via adminClaimRoles).
47
- */
48
10
  adminRole?: string;
49
- /**
50
- * Zitadel role names that map a caller to `adminRole`. Defaults to
51
- * `["mesh.platform:admin"]` when omitted.
52
- */
53
11
  adminClaimRoles?: string[];
54
- /** Headscale login server (published by the platform). */
55
12
  vpn?: string;
56
- /** Zero-touch pre-auth broker URL (published by the platform). */
57
13
  vpnJoinBroker?: string;
58
- /**
59
- * Zitadel-gated registry-auth broker URL (published by the platform).
60
- * With this set, `mesh registry login` needs no AWS credentials at all.
61
- */
62
14
  registryBroker?: string;
63
15
  }
64
16
  interface CachedCredentials {
@@ -72,164 +24,37 @@ interface CachedCredentials {
72
24
  type ConfigFile = Record<string, ContextConfig>;
73
25
  type CredentialsFile = Record<string, CachedCredentials>;
74
26
  export declare function writeContextConfig(context: string, config: ContextConfig): void;
75
- /**
76
- * Forget a cached context config so the next use runs discovery again.
77
- *
78
- * @example
79
- * clearContextConfig("registry"); // `mesh registry logout` — re-discovers the registry next time
80
- */
81
27
  export declare function clearContextConfig(context: string): void;
82
28
  declare function getContextConfig(context: string): ContextConfig | null;
83
- /**
84
- * Anonymous discovery against `https://cli.<domain>/.well-known/mesh.json`.
85
- *
86
- * `quiet: true` returns the payload WITHOUT caching it under `contextKey` and
87
- * without the progress lines — for a caller that stores the record itself
88
- * under a name that is not a platform context (the package registry's
89
- * reserved key). Warnings still print, because a failed discovery is the
90
- * caller's problem either way.
91
- *
92
- * @example
93
- * const cfg = await discoverConfigFromWellKnown("dev.platform.meshtech.io", "registry", { quiet: true });
94
- */
95
29
  export declare function discoverConfigFromWellKnown(domain: string, contextKey?: string, opts?: {
96
30
  quiet?: boolean;
97
31
  }): Promise<ContextConfig | null>;
98
32
  declare function readAllCredentials(): CredentialsFile;
99
33
  declare function readCredentials(context: string): CachedCredentials | null;
100
- /**
101
- * Write `data` to `path` atomically: write to a temp file in the SAME
102
- * directory as `path` (so the subsequent rename is same-filesystem, hence
103
- * atomic), then `fs.renameSync` it into place. This guarantees concurrent
104
- * readers (e.g. other `credential_process` invocations racing a refresh)
105
- * only ever observe a fully-written file — never a truncated one from an
106
- * interleaved `fs.writeFileSync`.
107
- *
108
- * On any error, best-effort removes the temp file before rethrowing.
109
- *
110
- * Exported for unit testing.
111
- */
112
34
  export declare function atomicWriteFileSync(path: string, data: string, mode: number): void;
113
35
  declare function clearCredentials(context: string): void;
114
36
  declare function decodeJwtPayload(token: string): Record<string, unknown>;
115
- /**
116
- * Run device-code login, re-issuing a fresh code (up to `maxCodes`) if the user
117
- * doesn't finish before a code expires. `attempt` performs ONE code's
118
- * request+poll and resolves `"success"` or `"expired"`; it rejects only on a
119
- * hard error (denied / network). Extracted + injectable so the reissue loop is
120
- * unit-testable without real network calls.
121
- */
122
37
  export declare function deviceLoginWithReissue(attempt: (codeNumber: number) => Promise<"success" | "expired">, maxCodes?: number): Promise<void>;
123
- /**
124
- * Detect an environment where the PKCE browser-callback flow won't work — a
125
- * container, a remote/SSH session, or any non-interactive shell (piped output,
126
- * headless, agent/CI-run). In all of these the callback flow has no browser to
127
- * open and no interactive terminal, so it can only hang until the 2-minute
128
- * timeout. Device-code flow (print a URL + code to complete elsewhere) is the
129
- * correct fallback, so callers use it whenever this returns true.
130
- *
131
- * Exported for tests.
132
- */
133
38
  export declare function isRemoteEnvironment(): boolean;
134
- /**
135
- * What `--status` reports when there is no usable Zitadel session.
136
- *
137
- * Zitadel is one way to reach a platform's AWS account, not the only one. A
138
- * profile authenticated with SSO — or with a plain access-key/secret pair —
139
- * is just as good, and everything downstream already accepts it: aws-auth's
140
- * path 1 (ambient env creds) and path 3 (AssumeRole via the current session)
141
- * never touch the OIDC cache. Reporting "not logged in" purely because that
142
- * cache is empty sent people off to run a device flow they did not need, and
143
- * failed the check for anyone deliberately using static credentials.
144
- *
145
- * So: fall through to the AWS credential chain and report what it finds.
146
- */
147
- /** One `--status` output line plus which logger it goes through. */
148
39
  export interface StatusLine {
149
40
  level: "success" | "info" | "warn";
150
41
  text: string;
151
42
  }
152
- /**
153
- * The account id embedded in an IAM role ARN
154
- * (`arn:aws:iam::123456789012:role/...`), or undefined when there is no ARN
155
- * to read one from.
156
- */
157
43
  export declare function accountIdFromRoleArn(roleArn: string | undefined): string | undefined;
158
- /**
159
- * Decide everything `--status` says (and its exit code) when there is no
160
- * usable Zitadel session — pure so the wording and the exit decision are
161
- * pinned by tests.
162
- *
163
- * The probe only proves "some AWS identity works on this machine"; it says
164
- * nothing about whether that identity belongs to `context`. So the claim is
165
- * scoped to the credentials — unless the context config carries a role ARN,
166
- * whose account id makes the context check free: verify when we can, say so
167
- * when we can't.
168
- */
169
44
  export declare function renderAwsFallbackStatus(context: string, reason: string, identity: AwsIdentity | null, expectedAccountId?: string): {
170
45
  lines: StatusLine[];
171
46
  exitCode: 0 | 1;
172
47
  };
173
48
  export declare function registerLoginCommand(program: Command): void;
174
- /**
175
- * The credential key the package registry's own session lives under. Not a
176
- * platform: `mesh login` / `mesh logout` refuse it, and the post-login hints
177
- * (VPN, tenants) never apply to it. `utils/registry-identity.ts` owns the
178
- * registry side of this contract and re-exports the key.
179
- */
180
49
  export declare const RESERVED_REGISTRY_CONTEXT = "registry";
181
- /** Printed once when `--no-registry` is passed: the flag no longer changes anything. */
182
50
  export declare const NO_REGISTRY_DEPRECATED = "--no-registry is deprecated and ignored: mesh login no longer touches the registry.";
183
- /** Printed after a platform login on a machine with no package-registry access. */
184
51
  export declare const REGISTRY_SEPARATE_HINT = "Package registry access is separate from platform sign-in \u2014 run: mesh registry login";
185
- /**
186
- * The "no configuration found" explanation for a context that neither SSM,
187
- * the pinned first-party table, nor the well-known endpoint could resolve —
188
- * every path tried, then the `config.json` snippet to add by hand.
189
- *
190
- * Shared by the `login` command and the `mesh init` wizard's platform step so
191
- * a discovery failure reads the same wherever it happens.
192
- *
193
- * @example
194
- * logError(renderNoConfigHelp("acme.dev"));
195
- */
196
52
  export declare function renderNoConfigHelp(context: string): string;
197
- /**
198
- * Get a valid access token for the given context, refreshing if needed.
199
- *
200
- * Returns the id token (a JWT with `sub` claim) suitable for
201
- * Authorization: Bearer headers. Returns null if no credentials are
202
- * cached or refresh fails.
203
- */
204
- /**
205
- * True while a cached token is still valid, treating anything within `marginMs`
206
- * of expiry as already stale. The margin lets pollers (e.g. the dev-user
207
- * token-server) re-mint BEFORE expiry instead of handing out a token that dies
208
- * before the caller's next poll.
209
- */
210
53
  export declare function tokenStillValid(expiresAt: string, marginMs?: number, now?: number): boolean;
211
54
  declare function getValidToken(context: string, opts?: {
212
55
  marginMs?: number;
213
56
  }): Promise<string | null>;
214
- /**
215
- * Re-mint a context's session now, whether or not its token has expired.
216
- * Zitadel writes project roles into a token when it issues it, so a role
217
- * granted after the sign-in stays invisible until a new token is minted —
218
- * this is how a caller picks the grant up without a second browser trip.
219
- * Null when there is no session, no refresh token, or the issuer refuses.
220
- *
221
- * @example
222
- * const idToken = await forceRefreshToken("registry");
223
- * if (idToken) console.log("session re-minted");
224
- */
225
57
  export declare function forceRefreshToken(context: string): Promise<string | null>;
226
- /**
227
- * Structured diagnosis of the deployer-credential path for a context/role,
228
- * without mutating anything. The shared seam behind `mesh dev doctor`'s creds
229
- * check and the launch preflight (MESH-2015), reusing the same
230
- * `getValidToken` + `assumeRoleCredentials` path as `--credential-process`
231
- * (MESH-1965).
232
- */
233
58
  export type CredProbe = {
234
59
  state: "ok";
235
60
  ttlSeconds: number;
@@ -245,77 +70,22 @@ export type CredProbe = {
245
70
  } | {
246
71
  state: "stale-env-override";
247
72
  };
248
- /**
249
- * Probe deployer creds for `context`/`roleArn`. Order matters:
250
- * 1. No cached Zitadel session → `no-session`.
251
- * 2. Cached session AND ambient `AWS_*` env keys present → `stale-env-override`
252
- * (the frozen triple would override the self-refreshing profile at
253
- * runtime — the exact `mesh dev` trap). Guarded on a cached session so
254
- * legitimate CI env-key credentials, which have no `mesh login` session,
255
- * are not misreported.
256
- * 3. Session can't be refreshed → `expired-session`.
257
- * 4. AssumeRoleWithWebIdentity fails → `assume-denied` (valid identity, wrong
258
- * IAM/role/policy).
259
- * 5. Otherwise → `ok` with the STS TTL.
260
- */
261
73
  export declare function probeCredentials(context: string, roleArn: string): Promise<CredProbe>;
262
- /**
263
- * Render the `--static` output: raw temporary AWS credentials as shell
264
- * `export` statements (the old frozen ~1h triple). Pure — no I/O. Includes a
265
- * trailing newline. Exported for unit testing.
266
- */
267
74
  export declare function renderExportStaticLines(args: {
268
75
  accessKey: string;
269
76
  secretKey: string;
270
77
  sessionToken: string;
271
78
  region: string;
272
79
  }): string;
273
- /**
274
- * Render the default `--export` output: point the shell at a self-refreshing
275
- * `credential_process` profile. The leading `unset` clears any stale STS
276
- * triple already in the shell so it can't shadow the profile. Pure — no I/O.
277
- * Includes a trailing newline. Exported for unit testing.
278
- *
279
- * Deliberately does NOT export `AWS_CONFIG_FILE`: the profile lives in the
280
- * user's REAL AWS config file (managed marker section — see
281
- * `upsertManagedAwsConfigSection`), so their other profiles (e.g.
282
- * `AWS_PROFILE=mesh-dev` InfraAdmin) keep working in the same shell.
283
- * Redirecting AWS_CONFIG_FILE to a mesh-private file used to clobber
284
- * ~/.aws/config for every subsequent AWS command.
285
- */
286
80
  export declare function renderExportProfileLines(args: {
287
81
  profileName: string;
288
82
  region: string;
289
83
  }): string;
290
- /**
291
- * The AWS config file the managed profile section is written into: the
292
- * user's `$AWS_CONFIG_FILE` when THEY have set one, else `~/.aws/config` —
293
- * the same file `aws configure sso` manages. Exported for unit testing.
294
- */
295
84
  export declare function resolveUserAwsConfigPath(env?: Record<string, string | undefined>): string;
296
- /**
297
- * Where to write the managed AWS profile, with a safehouse fallback. Normally
298
- * the user's real `~/.aws/config` (augmented in place, so their other tools see
299
- * the profile — hence `redirected: false`, we don't touch their `AWS_CONFIG_FILE`).
300
- * But when `~/.aws` is not writable (a sandbox without a `~/.aws` grant), fall
301
- * back to a mesh-managed file under `~/.config/mesh` we CAN write, and set
302
- * `redirected: true` so the caller also exports `AWS_CONFIG_FILE` (otherwise the
303
- * AWS SDK, looking only at `~/.aws/config`, would never find the profile). An
304
- * explicit `AWS_CONFIG_FILE` always wins and is never redirected.
305
- */
306
85
  export declare function resolveAwsConfigTarget(env?: Record<string, string | undefined>): {
307
86
  configPath: string;
308
87
  redirected: boolean;
309
88
  };
310
- /**
311
- * Resolve which IAM role ARN to use, honoring the same precedence in both
312
- * `--export` and `--credential-process`: explicit `--role` wins, then
313
- * `MESH_AWS_ROLE`, then the context's cached `defaultRole`. Pure aside from
314
- * reading `process.env.MESH_AWS_ROLE` — returns an explanatory error instead
315
- * of throwing so callers can route it to stderr and exit non-zero.
316
- *
317
- * Exported for unit testing.
318
- */
319
89
  export declare function resolveRoleOrExplain(opts: {
320
90
  role?: string;
321
91
  }, config: {
@@ -325,50 +95,15 @@ export declare function resolveRoleOrExplain(opts: {
325
95
  } | {
326
96
  error: string;
327
97
  };
328
- /**
329
- * Ensure a valid Zitadel ID token is cached for the given context — refreshing
330
- * or running the full login flow as needed. Returns null on failure.
331
- */
332
- /**
333
- * Run the sign-in itself — browser PKCE, or the device-code flow when asked
334
- * for or when there is no browser to open (`isRemoteEnvironment`) — and cache
335
- * the resulting session under `context`. Rejects when the user denies, the
336
- * flow times out, or the issuer refuses.
337
- *
338
- * The one sign-in routine every caller shares: the `login` command, on-demand
339
- * login from other commands, and the package registry's own session.
340
- *
341
- * @example
342
- * await runLoginFlow("acme.dev", config, { device: false });
343
- */
344
98
  export declare function runLoginFlow(context: string, config: ContextConfig, opts?: {
345
99
  device?: boolean;
346
100
  }): Promise<void>;
347
- /**
348
- * Ensure a valid login session for `context`, running the login flow (device
349
- * code in remote/non-TTY, browser callback otherwise) if none is cached. Returns
350
- * the cached credentials, or null if no config is available to log in with.
351
- *
352
- * For use by other commands (e.g. `secrets set`, the AWS-cred resolver) so they
353
- * can trigger login on demand instead of just failing with guidance.
354
- */
355
101
  export declare function ensureLogin(context: string, opts?: {
356
102
  device?: boolean;
357
103
  interactive?: boolean;
358
104
  }): Promise<CachedCredentials | null>;
359
105
  export { CONFIG_DIR, CONFIG_FILE, CREDENTIALS_FILE };
360
106
  export type { ContextConfig, CachedCredentials, CredentialsFile };
361
- /** Every cached context config, keyed by context name. */
362
107
  export declare function readAllContextConfigs(): ConfigFile;
363
- /**
364
- * The discovery chain on its own, without the browser flow that follows it.
365
- *
366
- * Exported so the clean-laptop bootstrap — SSM → pinned first-party alias →
367
- * full-domain, and the anti-phishing refusal for an unknown short context — can
368
- * be exercised end-to-end against the live well-known endpoint. The `login`
369
- * command's own path is otherwise only reachable by completing an interactive
370
- * sign-in, which is why this leg had no coverage above the unit tier.
371
- */
372
108
  export declare function discoverConfigForContext(context: string): Promise<ContextConfig | null>;
373
109
  export { readCredentials, readAllCredentials, getContextConfig, decodeJwtPayload, getValidToken, clearCredentials };
374
- //# sourceMappingURL=login.d.ts.map