@mesh-tech/mesh-cli 0.20.1 → 0.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. package/README.md +6 -5
  2. package/dist/bin/mesh.d.ts +0 -12
  3. package/dist/bin/mesh.js +99 -50
  4. package/dist/bin/mesh.js.map +2 -3
  5. package/dist/build-info.json +2 -2
  6. package/dist/src/commands/agent-api-client.d.ts +0 -70
  7. package/dist/src/commands/agent-api-client.js +0 -80
  8. package/dist/src/commands/app-check.d.ts +0 -56
  9. package/dist/src/commands/app-check.js +0 -72
  10. package/dist/src/commands/artifacts.d.ts +0 -11
  11. package/dist/src/commands/artifacts.js +0 -33
  12. package/dist/src/commands/cluster.d.ts +0 -39
  13. package/dist/src/commands/cluster.js +0 -73
  14. package/dist/src/commands/conversations.d.ts +0 -36
  15. package/dist/src/commands/conversations.js +0 -59
  16. package/dist/src/commands/create-app.d.ts +4 -88
  17. package/dist/src/commands/create-app.js +16 -155
  18. package/dist/src/commands/db/connect.d.ts +0 -7
  19. package/dist/src/commands/db/connect.js +0 -9
  20. package/dist/src/commands/db/credentials.d.ts +0 -7
  21. package/dist/src/commands/db/credentials.js +0 -10
  22. package/dist/src/commands/db/env.d.ts +0 -6
  23. package/dist/src/commands/db/env.js +0 -14
  24. package/dist/src/commands/db/exec.d.ts +0 -43
  25. package/dist/src/commands/db/exec.js +0 -69
  26. package/dist/src/commands/db/index.d.ts +0 -10
  27. package/dist/src/commands/db/index.js +0 -10
  28. package/dist/src/commands/db/psql.d.ts +0 -7
  29. package/dist/src/commands/db/psql.js +0 -18
  30. package/dist/src/commands/deploy.d.ts +0 -38
  31. package/dist/src/commands/deploy.js +1 -76
  32. package/dist/src/commands/dev-doctor.d.ts +0 -82
  33. package/dist/src/commands/dev-doctor.js +3 -132
  34. package/dist/src/commands/dev-launch.d.ts +0 -52
  35. package/dist/src/commands/dev-launch.js +0 -56
  36. package/dist/src/commands/dev-token-server.d.ts +0 -18
  37. package/dist/src/commands/dev-token-server.js +1 -24
  38. package/dist/src/commands/dev.d.ts +0 -246
  39. package/dist/src/commands/dev.js +5 -963
  40. package/dist/src/commands/docs.d.ts +0 -1
  41. package/dist/src/commands/docs.js +0 -12
  42. package/dist/src/commands/hub/index.d.ts +0 -60
  43. package/dist/src/commands/hub/index.js +2 -139
  44. package/dist/src/commands/init/wizard.d.ts +5 -116
  45. package/dist/src/commands/init/wizard.js +42 -110
  46. package/dist/src/commands/init.d.ts +0 -55
  47. package/dist/src/commands/init.js +0 -70
  48. package/dist/src/commands/install-shim.d.ts +0 -23
  49. package/dist/src/commands/install-shim.js +2 -29
  50. package/dist/src/commands/local/auth-provision.d.ts +0 -80
  51. package/dist/src/commands/local/auth-provision.js +0 -109
  52. package/dist/src/commands/local/dev-local.d.ts +0 -91
  53. package/dist/src/commands/local/dev-local.js +0 -147
  54. package/dist/src/commands/local/docker-runner.d.ts +0 -22
  55. package/dist/src/commands/local/docker-runner.js +2 -35
  56. package/dist/src/commands/local/helpers.d.ts +0 -14
  57. package/dist/src/commands/local/helpers.js +0 -13
  58. package/dist/src/commands/local/hub-local.d.ts +0 -96
  59. package/dist/src/commands/local/hub-local.js +0 -111
  60. package/dist/src/commands/local/index.d.ts +0 -14
  61. package/dist/src/commands/local/index.js +0 -86
  62. package/dist/src/commands/local/mocks.d.ts +0 -269
  63. package/dist/src/commands/local/mocks.js +1 -274
  64. package/dist/src/commands/local/seed-hub-catalog.d.ts +0 -25
  65. package/dist/src/commands/local/seed-hub-catalog.js +0 -41
  66. package/dist/src/commands/local/seed-zitadel.d.ts +0 -82
  67. package/dist/src/commands/local/seed-zitadel.js +0 -158
  68. package/dist/src/commands/local/seed.d.ts +0 -64
  69. package/dist/src/commands/local/seed.js +0 -78
  70. package/dist/src/commands/local/stack.d.ts +0 -141
  71. package/dist/src/commands/local/stack.js +0 -153
  72. package/dist/src/commands/login.d.ts +0 -265
  73. package/dist/src/commands/login.js +4 -418
  74. package/dist/src/commands/peer-addressing.d.ts +0 -39
  75. package/dist/src/commands/peer-addressing.js +0 -37
  76. package/dist/src/commands/port-ownership.d.ts +0 -44
  77. package/dist/src/commands/port-ownership.js +0 -47
  78. package/dist/src/commands/registry-publish.d.ts +0 -1
  79. package/dist/src/commands/registry-publish.js +0 -46
  80. package/dist/src/commands/registry.d.ts +4 -237
  81. package/dist/src/commands/registry.js +2 -316
  82. package/dist/src/commands/secrets/exec.d.ts +0 -16
  83. package/dist/src/commands/secrets/exec.js +0 -24
  84. package/dist/src/commands/secrets/index.d.ts +0 -9
  85. package/dist/src/commands/secrets/index.js +0 -10
  86. package/dist/src/commands/secrets/migrate-config.d.ts +0 -17
  87. package/dist/src/commands/secrets/migrate-config.js +0 -40
  88. package/dist/src/commands/secrets/reindex.d.ts +0 -38
  89. package/dist/src/commands/secrets/reindex.js +0 -39
  90. package/dist/src/commands/secrets/set.d.ts +0 -47
  91. package/dist/src/commands/secrets/set.js +0 -107
  92. package/dist/src/commands/site.d.ts +0 -1
  93. package/dist/src/commands/site.js +0 -61
  94. package/dist/src/commands/skills.d.ts +0 -61
  95. package/dist/src/commands/skills.js +0 -83
  96. package/dist/src/commands/stack.d.ts +0 -15
  97. package/dist/src/commands/stack.js +1 -128
  98. package/dist/src/commands/temporal.d.ts +0 -30
  99. package/dist/src/commands/temporal.js.map +0 -1
  100. package/dist/src/commands/tenant.d.ts +0 -31
  101. package/dist/src/commands/tenant.js +0 -55
  102. package/dist/src/commands/tunnel/index.d.ts +0 -40
  103. package/dist/src/commands/tunnel/index.js +0 -141
  104. package/dist/src/commands/vcs/clone.d.ts +0 -1
  105. package/dist/src/commands/vcs/clone.js +0 -4
  106. package/dist/src/commands/vcs/common.d.ts +0 -32
  107. package/dist/src/commands/vcs/common.js +0 -41
  108. package/dist/src/commands/vcs/drafts.d.ts +0 -1
  109. package/dist/src/commands/vcs/drafts.js +0 -1
  110. package/dist/src/commands/vcs/get.d.ts +0 -1
  111. package/dist/src/commands/vcs/get.js +0 -11
  112. package/dist/src/commands/vcs/index.d.ts +0 -1
  113. package/dist/src/commands/vcs/index.js +0 -1
  114. package/dist/src/commands/vcs/propose.d.ts +0 -26
  115. package/dist/src/commands/vcs/propose.js +3 -34
  116. package/dist/src/commands/vcs/review.d.ts +0 -1
  117. package/dist/src/commands/vcs/review.js +0 -1
  118. package/dist/src/commands/vcs/rm.d.ts +0 -11
  119. package/dist/src/commands/vcs/rm.js +0 -14
  120. package/dist/src/commands/vcs-enrich.d.ts +0 -12
  121. package/dist/src/commands/vcs-enrich.js +0 -12
  122. package/dist/src/commands/vpn/index.d.ts +0 -17
  123. package/dist/src/commands/vpn/index.js +0 -102
  124. package/dist/src/commands/vpn/tunnel.d.ts +0 -9
  125. package/dist/src/commands/vpn/tunnel.js +0 -37
  126. package/dist/src/commands/workflow.d.ts +0 -22
  127. package/dist/src/commands/workflow.js +0 -80
  128. package/dist/src/docs/assemble.d.ts +0 -117
  129. package/dist/src/docs/assemble.js +0 -142
  130. package/dist/src/docs/cli-reference.d.ts +0 -58
  131. package/dist/src/docs/cli-reference.js +0 -77
  132. package/dist/src/docs/discover.d.ts +0 -40
  133. package/dist/src/docs/discover.js +2 -60
  134. package/dist/src/docs/portal.d.ts +0 -44
  135. package/dist/src/docs/portal.js +0 -49
  136. package/dist/src/docs/registry-docs.d.ts +0 -29
  137. package/dist/src/docs/registry-docs.js +0 -40
  138. package/dist/src/docs/schema.d.ts +0 -36
  139. package/dist/src/docs/schema.js +0 -52
  140. package/dist/src/docs/serve.d.ts +0 -18
  141. package/dist/src/docs/serve.js +2 -30
  142. package/dist/src/docs/start.d.ts +0 -42
  143. package/dist/src/docs/start.js +0 -70
  144. package/dist/src/eval/agent-eval.d.mts +0 -12
  145. package/dist/src/eval/agent-eval.mjs +0 -22
  146. package/dist/src/index.d.ts +0 -6
  147. package/dist/src/index.js.map +0 -1
  148. package/dist/src/program.d.ts +0 -20
  149. package/dist/src/program.js +0 -24
  150. package/dist/src/utils/auth-preflight.d.ts +0 -137
  151. package/dist/src/utils/auth-preflight.js +0 -149
  152. package/dist/src/utils/aws-auth.d.ts +0 -163
  153. package/dist/src/utils/aws-auth.js +3 -232
  154. package/dist/src/utils/bastion.d.ts +0 -27
  155. package/dist/src/utils/bastion.js +0 -28
  156. package/dist/src/utils/build-info.d.ts +0 -22
  157. package/dist/src/utils/build-info.js +0 -27
  158. package/dist/src/utils/cache-home.d.ts +0 -23
  159. package/dist/src/utils/cache-home.js +0 -25
  160. package/dist/src/utils/capture-history.d.ts +0 -54
  161. package/dist/src/utils/capture-history.js +1 -55
  162. package/dist/src/utils/context.d.ts +0 -23
  163. package/dist/src/utils/context.js +0 -43
  164. package/dist/src/utils/credentials.d.ts +0 -38
  165. package/dist/src/utils/credentials.js +0 -39
  166. package/dist/src/utils/deploy-preflight.d.ts +0 -38
  167. package/dist/src/utils/deploy-preflight.js +1 -71
  168. package/dist/src/utils/errors.d.ts +0 -53
  169. package/dist/src/utils/errors.js +0 -49
  170. package/dist/src/utils/first-party-contexts.d.ts +0 -38
  171. package/dist/src/utils/first-party-contexts.js +0 -44
  172. package/dist/src/utils/index.d.ts +0 -4
  173. package/dist/src/utils/index.js +0 -4
  174. package/dist/src/utils/kubeconfig.d.ts +0 -40
  175. package/dist/src/utils/kubeconfig.js +0 -44
  176. package/dist/src/utils/log.d.ts +0 -20
  177. package/dist/src/utils/log.js +0 -20
  178. package/dist/src/utils/mesh-json.d.ts +0 -46
  179. package/dist/src/utils/mesh-json.js +0 -39
  180. package/dist/src/utils/pid.d.ts +0 -42
  181. package/dist/src/utils/pid.js +0 -48
  182. package/dist/src/utils/pulumi-run.d.ts +0 -14
  183. package/dist/src/utils/pulumi-run.js +0 -42
  184. package/dist/src/utils/pulumi.d.ts +0 -34
  185. package/dist/src/utils/pulumi.js +0 -38
  186. package/dist/src/utils/reachability.d.ts +0 -27
  187. package/dist/src/utils/reachability.js +0 -40
  188. package/dist/src/utils/recover-conversation.d.ts +0 -110
  189. package/dist/src/utils/recover-conversation.js +0 -108
  190. package/dist/src/utils/registry-broker.d.ts +5 -84
  191. package/dist/src/utils/registry-broker.js +0 -62
  192. package/dist/src/utils/registry-identity.d.ts +0 -149
  193. package/dist/src/utils/registry-identity.js +0 -143
  194. package/dist/src/utils/scaffold-versions.d.ts +0 -41
  195. package/dist/src/utils/scaffold-versions.js +0 -42
  196. package/dist/src/utils/socks-forward.d.ts +0 -24
  197. package/dist/src/utils/socks-forward.js +2 -25
  198. package/dist/src/utils/stack-flag.d.ts +0 -13
  199. package/dist/src/utils/stack-flag.js +0 -21
  200. package/dist/src/utils/tailscale-targets.d.ts +0 -37
  201. package/dist/src/utils/tailscale-targets.js +0 -33
  202. package/dist/src/utils/tailscale.d.ts +0 -177
  203. package/dist/src/utils/tailscale.js +6 -337
  204. package/dist/src/utils/temporal-auth.d.ts +0 -41
  205. package/dist/src/utils/temporal-auth.js +0 -52
  206. package/dist/src/utils/temporal-codec.d.ts +0 -89
  207. package/dist/src/utils/temporal-codec.js.map +0 -1
  208. package/dist/src/utils/tunnel-ownership.d.ts +0 -79
  209. package/dist/src/utils/tunnel-ownership.js +0 -74
  210. package/dist/src/utils/vpn-join.d.ts +0 -16
  211. package/dist/src/utils/vpn-join.js +0 -17
  212. package/dist/src/utils/vpn.d.ts +0 -42
  213. package/dist/src/utils/vpn.js +0 -52
  214. package/dist/src/utils/workflow-fingerprint.d.ts +0 -39
  215. package/dist/src/utils/workflow-fingerprint.js +1 -63
  216. package/dist/src/utils/worktree-identity.d.ts +0 -62
  217. package/dist/src/utils/worktree-identity.js +0 -88
  218. package/package.json +1 -1
  219. package/skills/core/SKILL.md +10 -11
  220. package/templates/api-auth/api/src/index.ts.hbs +1 -1
  221. package/templates/api-auth/api/src/spicedb-http-provider.ts.hbs +2 -2
  222. package/templates/api-role-gating/api/src/authn.ts.hbs +2 -2
  223. package/templates/api-role-gating/index.ts.hbs +1 -1
  224. package/templates/api-role-gating/skills/develop/SKILL.md.hbs +1 -1
  225. package/templates/platform-repo/core/Pulumi.{{tenant}}-{{env}}.yaml.hbs +2 -2
  226. package/templates/platform-repo/platform/index.ts +1 -1
  227. package/dist/bin/mesh.d.ts.map +0 -1
  228. package/dist/src/commands/agent-api-client.d.ts.map +0 -1
  229. package/dist/src/commands/agent-api-client.js.map +0 -1
  230. package/dist/src/commands/app-check.d.ts.map +0 -1
  231. package/dist/src/commands/app-check.js.map +0 -1
  232. package/dist/src/commands/artifacts.d.ts.map +0 -1
  233. package/dist/src/commands/artifacts.js.map +0 -1
  234. package/dist/src/commands/cluster.d.ts.map +0 -1
  235. package/dist/src/commands/cluster.js.map +0 -1
  236. package/dist/src/commands/conversations.d.ts.map +0 -1
  237. package/dist/src/commands/conversations.js.map +0 -1
  238. package/dist/src/commands/create-app.d.ts.map +0 -1
  239. package/dist/src/commands/create-app.js.map +0 -1
  240. package/dist/src/commands/db/connect.d.ts.map +0 -1
  241. package/dist/src/commands/db/connect.js.map +0 -1
  242. package/dist/src/commands/db/credentials.d.ts.map +0 -1
  243. package/dist/src/commands/db/credentials.js.map +0 -1
  244. package/dist/src/commands/db/env.d.ts.map +0 -1
  245. package/dist/src/commands/db/env.js.map +0 -1
  246. package/dist/src/commands/db/exec.d.ts.map +0 -1
  247. package/dist/src/commands/db/exec.js.map +0 -1
  248. package/dist/src/commands/db/index.d.ts.map +0 -1
  249. package/dist/src/commands/db/index.js.map +0 -1
  250. package/dist/src/commands/db/psql.d.ts.map +0 -1
  251. package/dist/src/commands/db/psql.js.map +0 -1
  252. package/dist/src/commands/deploy.d.ts.map +0 -1
  253. package/dist/src/commands/deploy.js.map +0 -1
  254. package/dist/src/commands/dev-doctor.d.ts.map +0 -1
  255. package/dist/src/commands/dev-doctor.js.map +0 -1
  256. package/dist/src/commands/dev-launch.d.ts.map +0 -1
  257. package/dist/src/commands/dev-launch.js.map +0 -1
  258. package/dist/src/commands/dev-token-server.d.ts.map +0 -1
  259. package/dist/src/commands/dev-token-server.js.map +0 -1
  260. package/dist/src/commands/dev.d.ts.map +0 -1
  261. package/dist/src/commands/dev.js.map +0 -1
  262. package/dist/src/commands/docs.d.ts.map +0 -1
  263. package/dist/src/commands/docs.js.map +0 -1
  264. package/dist/src/commands/hub/index.d.ts.map +0 -1
  265. package/dist/src/commands/hub/index.js.map +0 -1
  266. package/dist/src/commands/init/wizard.d.ts.map +0 -1
  267. package/dist/src/commands/init/wizard.js.map +0 -1
  268. package/dist/src/commands/init.d.ts.map +0 -1
  269. package/dist/src/commands/init.js.map +0 -1
  270. package/dist/src/commands/install-shim.d.ts.map +0 -1
  271. package/dist/src/commands/install-shim.js.map +0 -1
  272. package/dist/src/commands/local/auth-provision.d.ts.map +0 -1
  273. package/dist/src/commands/local/auth-provision.js.map +0 -1
  274. package/dist/src/commands/local/dev-local.d.ts.map +0 -1
  275. package/dist/src/commands/local/dev-local.js.map +0 -1
  276. package/dist/src/commands/local/docker-runner.d.ts.map +0 -1
  277. package/dist/src/commands/local/docker-runner.js.map +0 -1
  278. package/dist/src/commands/local/helpers.d.ts.map +0 -1
  279. package/dist/src/commands/local/helpers.js.map +0 -1
  280. package/dist/src/commands/local/hub-local.d.ts.map +0 -1
  281. package/dist/src/commands/local/hub-local.js.map +0 -1
  282. package/dist/src/commands/local/index.d.ts.map +0 -1
  283. package/dist/src/commands/local/index.js.map +0 -1
  284. package/dist/src/commands/local/mocks.d.ts.map +0 -1
  285. package/dist/src/commands/local/mocks.js.map +0 -1
  286. package/dist/src/commands/local/seed-hub-catalog.d.ts.map +0 -1
  287. package/dist/src/commands/local/seed-hub-catalog.js.map +0 -1
  288. package/dist/src/commands/local/seed-zitadel.d.ts.map +0 -1
  289. package/dist/src/commands/local/seed-zitadel.js.map +0 -1
  290. package/dist/src/commands/local/seed.d.ts.map +0 -1
  291. package/dist/src/commands/local/seed.js.map +0 -1
  292. package/dist/src/commands/local/stack.d.ts.map +0 -1
  293. package/dist/src/commands/local/stack.js.map +0 -1
  294. package/dist/src/commands/login.d.ts.map +0 -1
  295. package/dist/src/commands/login.js.map +0 -1
  296. package/dist/src/commands/peer-addressing.d.ts.map +0 -1
  297. package/dist/src/commands/peer-addressing.js.map +0 -1
  298. package/dist/src/commands/port-ownership.d.ts.map +0 -1
  299. package/dist/src/commands/port-ownership.js.map +0 -1
  300. package/dist/src/commands/registry-publish.d.ts.map +0 -1
  301. package/dist/src/commands/registry-publish.js.map +0 -1
  302. package/dist/src/commands/registry.d.ts.map +0 -1
  303. package/dist/src/commands/registry.js.map +0 -1
  304. package/dist/src/commands/secrets/exec.d.ts.map +0 -1
  305. package/dist/src/commands/secrets/exec.js.map +0 -1
  306. package/dist/src/commands/secrets/index.d.ts.map +0 -1
  307. package/dist/src/commands/secrets/index.js.map +0 -1
  308. package/dist/src/commands/secrets/migrate-config.d.ts.map +0 -1
  309. package/dist/src/commands/secrets/migrate-config.js.map +0 -1
  310. package/dist/src/commands/secrets/reindex.d.ts.map +0 -1
  311. package/dist/src/commands/secrets/reindex.js.map +0 -1
  312. package/dist/src/commands/secrets/set.d.ts.map +0 -1
  313. package/dist/src/commands/secrets/set.js.map +0 -1
  314. package/dist/src/commands/site.d.ts.map +0 -1
  315. package/dist/src/commands/site.js.map +0 -1
  316. package/dist/src/commands/skills.d.ts.map +0 -1
  317. package/dist/src/commands/skills.js.map +0 -1
  318. package/dist/src/commands/stack.d.ts.map +0 -1
  319. package/dist/src/commands/stack.js.map +0 -1
  320. package/dist/src/commands/temporal.d.ts.map +0 -1
  321. package/dist/src/commands/tenant.d.ts.map +0 -1
  322. package/dist/src/commands/tenant.js.map +0 -1
  323. package/dist/src/commands/tunnel/index.d.ts.map +0 -1
  324. package/dist/src/commands/tunnel/index.js.map +0 -1
  325. package/dist/src/commands/vcs/clone.d.ts.map +0 -1
  326. package/dist/src/commands/vcs/clone.js.map +0 -1
  327. package/dist/src/commands/vcs/common.d.ts.map +0 -1
  328. package/dist/src/commands/vcs/common.js.map +0 -1
  329. package/dist/src/commands/vcs/drafts.d.ts.map +0 -1
  330. package/dist/src/commands/vcs/drafts.js.map +0 -1
  331. package/dist/src/commands/vcs/get.d.ts.map +0 -1
  332. package/dist/src/commands/vcs/get.js.map +0 -1
  333. package/dist/src/commands/vcs/index.d.ts.map +0 -1
  334. package/dist/src/commands/vcs/index.js.map +0 -1
  335. package/dist/src/commands/vcs/propose.d.ts.map +0 -1
  336. package/dist/src/commands/vcs/propose.js.map +0 -1
  337. package/dist/src/commands/vcs/review.d.ts.map +0 -1
  338. package/dist/src/commands/vcs/review.js.map +0 -1
  339. package/dist/src/commands/vcs/rm.d.ts.map +0 -1
  340. package/dist/src/commands/vcs/rm.js.map +0 -1
  341. package/dist/src/commands/vcs-enrich.d.ts.map +0 -1
  342. package/dist/src/commands/vcs-enrich.js.map +0 -1
  343. package/dist/src/commands/vpn/index.d.ts.map +0 -1
  344. package/dist/src/commands/vpn/index.js.map +0 -1
  345. package/dist/src/commands/vpn/tunnel.d.ts.map +0 -1
  346. package/dist/src/commands/vpn/tunnel.js.map +0 -1
  347. package/dist/src/commands/workflow.d.ts.map +0 -1
  348. package/dist/src/commands/workflow.js.map +0 -1
  349. package/dist/src/docs/assemble.d.ts.map +0 -1
  350. package/dist/src/docs/assemble.js.map +0 -1
  351. package/dist/src/docs/cli-reference.d.ts.map +0 -1
  352. package/dist/src/docs/cli-reference.js.map +0 -1
  353. package/dist/src/docs/discover.d.ts.map +0 -1
  354. package/dist/src/docs/discover.js.map +0 -1
  355. package/dist/src/docs/portal.d.ts.map +0 -1
  356. package/dist/src/docs/portal.js.map +0 -1
  357. package/dist/src/docs/registry-docs.d.ts.map +0 -1
  358. package/dist/src/docs/registry-docs.js.map +0 -1
  359. package/dist/src/docs/schema.d.ts.map +0 -1
  360. package/dist/src/docs/schema.js.map +0 -1
  361. package/dist/src/docs/serve.d.ts.map +0 -1
  362. package/dist/src/docs/serve.js.map +0 -1
  363. package/dist/src/docs/start.d.ts.map +0 -1
  364. package/dist/src/docs/start.js.map +0 -1
  365. package/dist/src/eval/agent-eval.d.mts.map +0 -1
  366. package/dist/src/eval/agent-eval.mjs.map +0 -1
  367. package/dist/src/index.d.ts.map +0 -1
  368. package/dist/src/program.d.ts.map +0 -1
  369. package/dist/src/program.js.map +0 -1
  370. package/dist/src/utils/auth-preflight.d.ts.map +0 -1
  371. package/dist/src/utils/auth-preflight.js.map +0 -1
  372. package/dist/src/utils/aws-auth.d.ts.map +0 -1
  373. package/dist/src/utils/aws-auth.js.map +0 -1
  374. package/dist/src/utils/bastion.d.ts.map +0 -1
  375. package/dist/src/utils/bastion.js.map +0 -1
  376. package/dist/src/utils/build-info.d.ts.map +0 -1
  377. package/dist/src/utils/build-info.js.map +0 -1
  378. package/dist/src/utils/cache-home.d.ts.map +0 -1
  379. package/dist/src/utils/cache-home.js.map +0 -1
  380. package/dist/src/utils/capture-history.d.ts.map +0 -1
  381. package/dist/src/utils/capture-history.js.map +0 -1
  382. package/dist/src/utils/context.d.ts.map +0 -1
  383. package/dist/src/utils/context.js.map +0 -1
  384. package/dist/src/utils/credentials.d.ts.map +0 -1
  385. package/dist/src/utils/credentials.js.map +0 -1
  386. package/dist/src/utils/deploy-preflight.d.ts.map +0 -1
  387. package/dist/src/utils/deploy-preflight.js.map +0 -1
  388. package/dist/src/utils/errors.d.ts.map +0 -1
  389. package/dist/src/utils/errors.js.map +0 -1
  390. package/dist/src/utils/first-party-contexts.d.ts.map +0 -1
  391. package/dist/src/utils/first-party-contexts.js.map +0 -1
  392. package/dist/src/utils/index.d.ts.map +0 -1
  393. package/dist/src/utils/index.js.map +0 -1
  394. package/dist/src/utils/kubeconfig.d.ts.map +0 -1
  395. package/dist/src/utils/kubeconfig.js.map +0 -1
  396. package/dist/src/utils/log.d.ts.map +0 -1
  397. package/dist/src/utils/log.js.map +0 -1
  398. package/dist/src/utils/mesh-json.d.ts.map +0 -1
  399. package/dist/src/utils/mesh-json.js.map +0 -1
  400. package/dist/src/utils/pid.d.ts.map +0 -1
  401. package/dist/src/utils/pid.js.map +0 -1
  402. package/dist/src/utils/pulumi-run.d.ts.map +0 -1
  403. package/dist/src/utils/pulumi-run.js.map +0 -1
  404. package/dist/src/utils/pulumi.d.ts.map +0 -1
  405. package/dist/src/utils/pulumi.js.map +0 -1
  406. package/dist/src/utils/reachability.d.ts.map +0 -1
  407. package/dist/src/utils/reachability.js.map +0 -1
  408. package/dist/src/utils/recover-conversation.d.ts.map +0 -1
  409. package/dist/src/utils/recover-conversation.js.map +0 -1
  410. package/dist/src/utils/registry-broker.d.ts.map +0 -1
  411. package/dist/src/utils/registry-broker.js.map +0 -1
  412. package/dist/src/utils/registry-identity.d.ts.map +0 -1
  413. package/dist/src/utils/registry-identity.js.map +0 -1
  414. package/dist/src/utils/scaffold-versions.d.ts.map +0 -1
  415. package/dist/src/utils/scaffold-versions.js.map +0 -1
  416. package/dist/src/utils/socks-forward.d.ts.map +0 -1
  417. package/dist/src/utils/socks-forward.js.map +0 -1
  418. package/dist/src/utils/stack-flag.d.ts.map +0 -1
  419. package/dist/src/utils/stack-flag.js.map +0 -1
  420. package/dist/src/utils/tailscale-targets.d.ts.map +0 -1
  421. package/dist/src/utils/tailscale-targets.js.map +0 -1
  422. package/dist/src/utils/tailscale.d.ts.map +0 -1
  423. package/dist/src/utils/tailscale.js.map +0 -1
  424. package/dist/src/utils/temporal-auth.d.ts.map +0 -1
  425. package/dist/src/utils/temporal-auth.js.map +0 -1
  426. package/dist/src/utils/temporal-codec.d.ts.map +0 -1
  427. package/dist/src/utils/tunnel-ownership.d.ts.map +0 -1
  428. package/dist/src/utils/tunnel-ownership.js.map +0 -1
  429. package/dist/src/utils/vpn-join.d.ts.map +0 -1
  430. package/dist/src/utils/vpn-join.js.map +0 -1
  431. package/dist/src/utils/vpn.d.ts.map +0 -1
  432. package/dist/src/utils/vpn.js.map +0 -1
  433. package/dist/src/utils/workflow-fingerprint.d.ts.map +0 -1
  434. package/dist/src/utils/workflow-fingerprint.js.map +0 -1
  435. package/dist/src/utils/worktree-identity.d.ts.map +0 -1
  436. package/dist/src/utils/worktree-identity.js.map +0 -1
@@ -1,42 +1,17 @@
1
- /**
2
- * mesh vpn — Headscale VPN management commands
3
- *
4
- * Commands:
5
- * mesh vpn connect <context> Connect to VPN via Tailscale + OIDC
6
- * mesh vpn disconnect Disconnect from VPN
7
- * mesh vpn status Show VPN control plane status
8
- * mesh vpn api-key Create a Headscale API key
9
- * mesh vpn pre-auth-key Create a pre-authentication key for a user
10
- * mesh vpn users List registered VPN users
11
- *
12
- * All commands shell out to kubectl. The user must have kubeconfig
13
- * configured for the target cluster (e.g., via `aws eks update-kubeconfig`).
14
- */
15
1
  import { execFileSync } from "child_process";
16
2
  import * as net from "node:net";
17
3
  import { logInfo, logSuccess, logError, logWarn } from "../../utils/index.js";
18
4
  import { getContextConfig } from "../login.js";
19
5
  import { registerTunnelSubcommands } from "./tunnel.js";
20
6
  import { ensureDaemon, joinHeadscale, daemonState, stopDaemon, tailscaleAvailable, readDaemonMeta, findRunningDaemon, } from "../../utils/tailscale.js";
21
- // =============================================================================
22
- // Constants
23
- // =============================================================================
24
- /** Default namespace follows the convention: {tenant}-{env}-headscale */
25
7
  function defaultNamespace(tenant, env) {
26
8
  return `${tenant}-${env}-headscale`;
27
9
  }
28
10
  const HEADSCALE_POD = "headscale-0";
29
11
  const HEADSCALE_CONTAINER = "headscale";
30
- // =============================================================================
31
- // Helpers
32
- // =============================================================================
33
12
  function resolveNamespace(options) {
34
13
  return options.namespace ?? defaultNamespace(options.tenant, options.env);
35
14
  }
36
- /**
37
- * Run a headscale CLI command inside the headscale pod.
38
- * Returns stdout as a string. Throws on non-zero exit.
39
- */
40
15
  function headscaleExec(namespace, args, opts) {
41
16
  const cmd = ["headscale", ...args];
42
17
  if (opts?.json) {
@@ -66,15 +41,9 @@ function headscaleExec(namespace, args, opts) {
66
41
  throw error;
67
42
  }
68
43
  }
69
- /**
70
- * Derive the likely EKS cluster name from tenant/env convention.
71
- */
72
44
  function clusterName(tenant, env) {
73
45
  return `${tenant}-${env}-eks`;
74
46
  }
75
- /**
76
- * Check that the headscale pod is running and reachable.
77
- */
78
47
  function assertPodReady(namespace, options) {
79
48
  try {
80
49
  const output = execFileSync("kubectl", [
@@ -102,14 +71,10 @@ function assertPodReady(namespace, options) {
102
71
  process.exit(1);
103
72
  }
104
73
  }
105
- // =============================================================================
106
- // Commands
107
- // =============================================================================
108
74
  async function vpnStatus(options) {
109
75
  const ns = resolveNamespace(options);
110
76
  logInfo(`Checking Headscale in namespace ${ns}...`);
111
77
  assertPodReady(ns, options);
112
- // Get pod details
113
78
  const podJson = execFileSync("kubectl", [
114
79
  "get", "pod", HEADSCALE_POD,
115
80
  "-n", ns,
@@ -120,7 +85,6 @@ async function vpnStatus(options) {
120
85
  const image = container?.image ?? "unknown";
121
86
  const ready = container?.ready ?? false;
122
87
  const restarts = container?.restartCount ?? 0;
123
- // Get the HTTPRoute hostname
124
88
  let endpoint = "unknown";
125
89
  try {
126
90
  endpoint = execFileSync("kubectl", [
@@ -133,9 +97,7 @@ async function vpnStatus(options) {
133
97
  }
134
98
  }
135
99
  catch {
136
- // HTTPRoute may not exist
137
100
  }
138
- // List users
139
101
  let userCount = 0;
140
102
  try {
141
103
  const usersJson = headscaleExec(ns, ["users", "list"], { json: true });
@@ -143,9 +105,7 @@ async function vpnStatus(options) {
143
105
  userCount = Array.isArray(users) ? users.length : 0;
144
106
  }
145
107
  catch {
146
- // Users may not be queryable yet
147
108
  }
148
- // List nodes
149
109
  let nodeCount = 0;
150
110
  try {
151
111
  const nodesJson = headscaleExec(ns, ["nodes", "list"], { json: true });
@@ -153,7 +113,6 @@ async function vpnStatus(options) {
153
113
  nodeCount = Array.isArray(nodes) ? nodes.length : 0;
154
114
  }
155
115
  catch {
156
- // Nodes may not be queryable
157
116
  }
158
117
  console.log("");
159
118
  console.log(` Endpoint: ${endpoint}`);
@@ -195,14 +154,12 @@ async function createPreAuthKey(options) {
195
154
  const { user, expiration, reusable, ephemeral } = options;
196
155
  logInfo(`Creating pre-auth key for user "${user}" in namespace ${ns}...`);
197
156
  assertPodReady(ns, options);
198
- // Ensure the user exists
199
157
  try {
200
158
  headscaleExec(ns, ["users", "create", user]);
201
159
  logInfo(`Created user "${user}"`);
202
160
  }
203
161
  catch (error) {
204
162
  const message = error instanceof Error ? error.message : String(error);
205
- // "already exists" is fine
206
163
  if (!message.includes("already exists")) {
207
164
  logError(`Failed to create user: ${message}`);
208
165
  process.exit(1);
@@ -251,17 +208,6 @@ async function listUsers(options) {
251
208
  process.exit(1);
252
209
  }
253
210
  }
254
- // =============================================================================
255
- // VPN Connect / Disconnect
256
- // =============================================================================
257
- /**
258
- * Derive the VPN (Headscale) endpoint from a mesh login context.
259
- *
260
- * The login config stores an issuer URL like:
261
- * https://identity.dev.mesh-platform.trabian.com
262
- * The VPN endpoint follows the same domain with "vpn" as the subdomain:
263
- * https://vpn.dev.mesh-platform.trabian.com
264
- */
265
211
  function vpnEndpointFromContext(context) {
266
212
  const config = getContextConfig(context);
267
213
  if (!config) {
@@ -269,7 +215,6 @@ function vpnEndpointFromContext(context) {
269
215
  `Run: mesh login ${context} (or add the context to ~/.config/mesh/config.json)`);
270
216
  }
271
217
  const issuerUrl = new URL(config.issuer);
272
- // Replace the first subdomain ("identity") with "vpn"
273
218
  const hostParts = issuerUrl.hostname.split(".");
274
219
  if (hostParts.length < 3) {
275
220
  throw new Error(`Cannot derive VPN endpoint from issuer "${config.issuer}". ` +
@@ -278,12 +223,10 @@ function vpnEndpointFromContext(context) {
278
223
  hostParts[0] = "vpn";
279
224
  return `https://${hostParts.join(".")}`;
280
225
  }
281
- /** Split a platform context ("mesh.dev") into its tenant + env. Pure. */
282
226
  export function parseContextTenantEnv(context) {
283
227
  const [tenant, env] = context.split(".");
284
228
  return { tenant: tenant || "mesh", env: env || "dev" };
285
229
  }
286
- /** Ephemeral free TCP port on loopback for the userspace daemon's SOCKS proxy. */
287
230
  function findFreePort() {
288
231
  return new Promise((resolve, reject) => {
289
232
  const srv = net.createServer();
@@ -295,10 +238,6 @@ function findFreePort() {
295
238
  });
296
239
  });
297
240
  }
298
- /**
299
- * Check whether the `tailscale` CLI is installed and return its path,
300
- * or null if not found.
301
- */
302
241
  function findTailscale() {
303
242
  try {
304
243
  return execFileSync("which", ["tailscale"], {
@@ -310,7 +249,6 @@ function findTailscale() {
310
249
  return null;
311
250
  }
312
251
  }
313
- /** Return Tailscale's full status, or null if tailscale is not running. */
314
252
  function tailscaleStatus() {
315
253
  try {
316
254
  const json = execFileSync("tailscale", ["status", "--json"], {
@@ -323,14 +261,9 @@ function tailscaleStatus() {
323
261
  return null;
324
262
  }
325
263
  }
326
- /** Return Tailscale's BackendState, or null if tailscale is not running. */
327
264
  export function tailscaleBackendState() {
328
265
  return tailscaleStatus()?.BackendState ?? null;
329
266
  }
330
- /**
331
- * Normalize a control server URL for comparison.
332
- * Trims trailing slashes and lowercases the origin.
333
- */
334
267
  function normalizeControlUrl(url) {
335
268
  try {
336
269
  const u = new URL(url);
@@ -343,22 +276,11 @@ function normalizeControlUrl(url) {
343
276
  async function vpnConnect(context, opts = {}) {
344
277
  const endpoint = vpnEndpointFromContext(context);
345
278
  if (opts.system) {
346
- // Whole-machine VPN via the GUI Tailscale.app daemon. Opt-in only: it needs
347
- // the GUI app installed/running and CANNOT run headless or under the safehouse
348
- // sandbox (dyld can't load the app bundle's Sparkle.framework → abort trap).
349
279
  await vpnConnectSystem(endpoint);
350
280
  return;
351
281
  }
352
282
  await vpnConnectUserspace(context, endpoint);
353
283
  }
354
- /**
355
- * Default path: bring up the per-tenant userspace `tailscaled` (brew formula, NOT
356
- * the GUI app) and register this machine with the platform Headscale. This is the
357
- * same daemon `mesh dev --transport tailscale` / `mesh vpn tunnel` already use, so
358
- * it runs headless and under the sandbox. It exposes a local SOCKS5 proxy — the
359
- * userspace analog of system-wide routing — instead of a system TUN; for
360
- * auto-forwarded VPC services (Temporal, RDS, …) use `mesh vpn tunnel` / `mesh dev`.
361
- */
362
284
  async function vpnConnectUserspace(context, loginServer) {
363
285
  if (!tailscaleAvailable()) {
364
286
  logError("Standalone tailscale/tailscaled not found.");
@@ -369,8 +291,6 @@ async function vpnConnectUserspace(context, loginServer) {
369
291
  const { tenant } = parseContextTenantEnv(context);
370
292
  const region = process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION ?? "us-east-2";
371
293
  if (daemonState(tenant).backendState === "Running") {
372
- // Prefer daemon.json; recover the real bound port from argv if meta is missing
373
- // (older build) so a "connected" session always shows how to reach it.
374
294
  const port = readDaemonMeta(tenant)?.socksPort ?? findRunningDaemon(tenant)?.socksPort;
375
295
  logSuccess(`Already connected to the platform VPN for '${tenant}' (userspace).`);
376
296
  if (port)
@@ -380,23 +300,17 @@ async function vpnConnectUserspace(context, loginServer) {
380
300
  logInfo(`Connecting to the platform VPN for '${tenant}' (userspace tailscaled)…`);
381
301
  const socksPort = readDaemonMeta(tenant)?.socksPort ?? (await findFreePort());
382
302
  const realPort = await ensureDaemon(tenant, { region, socksPort });
383
- // Interactive join — joinHeadscale relays the one-time registration URL for
384
- // headless/SSH machines (no local browser to pop) and polls up to ~5 min.
385
303
  await joinHeadscale(tenant, loginServer);
386
304
  logSuccess(`VPN connected (userspace) for '${tenant}'.`);
387
305
  logInfo(` SOCKS5 proxy: 127.0.0.1:${realPort} — route a tool via ALL_PROXY=socks5://127.0.0.1:${realPort}`);
388
306
  logInfo(" For auto-forwarded VPC services (Temporal, RDS, …): mesh vpn tunnel up (or mesh dev)");
389
307
  }
390
- /** Opt-in whole-machine VPN via the GUI Tailscale.app daemon (`mesh vpn connect --system`). */
391
308
  async function vpnConnectSystem(endpoint) {
392
309
  if (!findTailscale()) {
393
310
  logError("Tailscale CLI not found.");
394
311
  logInfo("Install it: brew install tailscale (or see https://tailscale.com/download)");
395
312
  process.exit(1);
396
313
  }
397
- // If already connected to *this* endpoint, short-circuit. But if connected
398
- // to a different control server, fall through and reconnect — otherwise the
399
- // user would silently stay on the wrong tailnet.
400
314
  const status = tailscaleStatus();
401
315
  if (status?.BackendState === "Running") {
402
316
  const current = status.ControlURL ? normalizeControlUrl(status.ControlURL) : null;
@@ -413,15 +327,6 @@ async function vpnConnectSystem(endpoint) {
413
327
  logInfo(`Connecting to VPN at ${endpoint}...`);
414
328
  logInfo("A browser window will open for Zitadel authentication.");
415
329
  console.log("");
416
- // tailscale up is interactive (opens browser), so we inherit stdio.
417
- // On macOS, Tailscale.app owns the daemon — `tailscale up` talks to it.
418
- // On Linux, tailscaled runs as root and `tailscale up` may need sudo.
419
- //
420
- // --reset: wipe prior prefs so this command is idempotent. Without it,
421
- // tailscale refuses to apply prefs if a previous session set non-default
422
- // flags that aren't re-specified here.
423
- // --accept-routes: accept subnet routes advertised by the Headscale
424
- // SubnetRouter so clients can reach in-VPC services (EKS, RDS, internal LBs).
425
330
  const upArgs = [
426
331
  "up",
427
332
  "--reset",
@@ -447,7 +352,6 @@ async function vpnConnectSystem(endpoint) {
447
352
  }
448
353
  async function vpnDisconnect(opts) {
449
354
  if (opts.system) {
450
- // Whole-machine GUI Tailscale down (opt-in, mirrors `connect --system`).
451
355
  if (!findTailscale()) {
452
356
  logError("Tailscale CLI not found.");
453
357
  process.exit(1);
@@ -468,8 +372,6 @@ async function vpnDisconnect(opts) {
468
372
  }
469
373
  return;
470
374
  }
471
- // Default: stop the tenant's userspace daemon (leaves the Headscale node
472
- // identity in the statedir so a later `connect` rejoins without re-login).
473
375
  const { tenant } = opts;
474
376
  if (daemonState(tenant).backendState === "Down") {
475
377
  logInfo(`No userspace VPN daemon running for '${tenant}'.`);
@@ -479,9 +381,6 @@ async function vpnDisconnect(opts) {
479
381
  stopDaemon(tenant);
480
382
  logSuccess(`VPN disconnected for '${tenant}'.`);
481
383
  }
482
- // =============================================================================
483
- // Registration
484
- // =============================================================================
485
384
  export function registerVpnCommands(program) {
486
385
  const vpn = program
487
386
  .command("vpn")
@@ -540,4 +439,3 @@ export function registerVpnCommands(program) {
540
439
  });
541
440
  registerTunnelSubcommands(vpn);
542
441
  }
543
- //# sourceMappingURL=index.js.map
@@ -1,11 +1,2 @@
1
- /**
2
- * `mesh vpn tunnel` — userspace-Tailscale tunnels to a tenant's VPC services.
3
- *
4
- * Stands up the tenant's `localhost:PORT` set (drop-in for the SSM tunnels)
5
- * backed by a per-tenant userspace `tailscaled` + SOCKS5 forwarders. Detached
6
- * and managed: `up` starts everything and returns; `down`/`status` manage it.
7
- * (MESH-2040 / Slice 1 of MESH-2014; graduates the MESH-2036 spike.)
8
- */
9
1
  import type { Command } from "commander";
10
2
  export declare function registerTunnelSubcommands(vpn: Command): void;
11
- //# sourceMappingURL=tunnel.d.ts.map
@@ -1,21 +1,7 @@
1
- /**
2
- * `mesh vpn tunnel` — userspace-Tailscale tunnels to a tenant's VPC services.
3
- *
4
- * Stands up the tenant's `localhost:PORT` set (drop-in for the SSM tunnels)
5
- * backed by a per-tenant userspace `tailscaled` + SOCKS5 forwarders. Detached
6
- * and managed: `up` starts everything and returns; `down`/`status` manage it.
7
- * (MESH-2040 / Slice 1 of MESH-2014; graduates the MESH-2036 spike.)
8
- */
9
1
  import * as net from "node:net";
10
2
  import { logInfo, logError, logSuccess } from "../../utils/log.js";
11
3
  import { getContextConfig } from "../login.js";
12
4
  import { ensureTailscaleTunnels, stopDaemon, logout, daemonState, readTunnelState, clearTunnelState, readDaemonMeta, runTunnels, stopTunnelRunners, verifyTunnelOwnership, } from "../../utils/tailscale.js";
13
- /**
14
- * Derive the Headscale login-server URL from the login context's issuer
15
- * (`identity.<env>.<domain>` → `vpn.<env>.<domain>`). Mirrors
16
- * `vpnEndpointFromContext` in index.ts (kept local to avoid a circular import;
17
- * Slice 2 can unify).
18
- */
19
5
  function deriveLoginServer(context) {
20
6
  const cfg = getContextConfig(context);
21
7
  if (!cfg?.issuer) {
@@ -54,7 +40,6 @@ function canConnect(port) {
54
40
  s.connect(port, "127.0.0.1");
55
41
  });
56
42
  }
57
- // ── up ──────────────────────────────────────────────────────────────────────
58
43
  async function tunnelUp(vpn, cmdOpts) {
59
44
  const { tenant, env } = vpn;
60
45
  const context = cmdOpts.context ?? `${tenant}.${env}`;
@@ -62,9 +47,6 @@ async function tunnelUp(vpn, cmdOpts) {
62
47
  const loginServer = deriveLoginServer(context);
63
48
  const prior = readTunnelState(tenant);
64
49
  const daemonUp = daemonState(tenant).backendState !== "Down";
65
- // When the daemon is already up, reuse the SOCKS port IT is listening on
66
- // (from daemon.json, which `down` doesn't clear) — not `prior` (cleared by
67
- // `down`) and never a fresh port the daemon isn't bound to.
68
50
  const socksPort = daemonUp
69
51
  ? (readDaemonMeta(tenant)?.socksPort ?? prior?.socksPort ?? (await findFreePort()))
70
52
  : await findFreePort();
@@ -75,28 +57,18 @@ async function tunnelUp(vpn, cmdOpts) {
75
57
  logInfo(` ${t.name.padEnd(14)} 127.0.0.1:${t.localPort} → ${t.targetHost}:${t.remotePort}`);
76
58
  }
77
59
  }
78
- // The __run / __supervise runner lives in utils/tailscale.ts (runTunnels) —
79
- // forwarders + a continuous self-heal loop, used under launchd or detached.
80
- // ── down ────────────────────────────────────────────────────────────────────
81
60
  function tunnelDown(vpn, cmdOpts) {
82
61
  const { tenant } = vpn;
83
62
  const st = readTunnelState(tenant);
84
- // Nothing to tear down for the forwarders — but still honor an explicit
85
- // --stop/--logout so a leaked daemon (state file already gone) can be killed.
86
63
  if (!st && !cmdOpts.stop && !cmdOpts.logout) {
87
64
  logInfo(`No tunnels running for tenant '${tenant}'.`);
88
65
  return;
89
66
  }
90
- // One teardown path for every runner shape (state pid group, launchd agent,
91
- // manifest process group, argv-discovered strays) — no kill path may leave a
92
- // grandchild with ports still bound (MESH-2407).
93
67
  stopTunnelRunners(tenant, st);
94
68
  if (cmdOpts.logout) {
95
69
  logout(tenant);
96
70
  logInfo("Logged the VPN daemon out of Headscale.");
97
71
  }
98
- // By default the daemon persists (join-once / reuse). --stop or --logout
99
- // (after which the daemon is useless) tear it down too.
100
72
  if (cmdOpts.stop || cmdOpts.logout) {
101
73
  stopDaemon(tenant);
102
74
  logInfo("Stopped the userspace VPN daemon.");
@@ -104,13 +76,10 @@ function tunnelDown(vpn, cmdOpts) {
104
76
  clearTunnelState(tenant);
105
77
  logSuccess(`VPN tunnels down for '${tenant}'.`);
106
78
  }
107
- // ── status ────────────────────────────────────────────────────────────────────
108
79
  async function tunnelStatus(vpn, cmdOpts) {
109
80
  const { tenant } = vpn;
110
81
  const st = readTunnelState(tenant);
111
82
  const ds = daemonState(tenant);
112
- // Ownership handshake against the runner's manifest — status must distinguish
113
- // "our runner owns the ports" from "something answers the port" (MESH-2407).
114
83
  const owned = st
115
84
  ? await verifyTunnelOwnership(tenant, {
116
85
  socksPort: st.socksPort,
@@ -140,14 +109,10 @@ async function tunnelStatus(vpn, cmdOpts) {
140
109
  : `Runner: NOT OWNED (${owned?.reason}) — ports below may be foreign listeners`);
141
110
  const listening = owned?.ok ? new Set(owned.resp?.listening ?? []) : null;
142
111
  for (const t of st.tunnels) {
143
- // When ownership holds, report from the runner's in-process listening set
144
- // (no data-plane dial); otherwise fall back to a dial, flagged above.
145
112
  const up = listening ? listening.has(t.localPort) : await canConnect(t.localPort);
146
113
  logInfo(` ${up ? "✓" : "✗"} ${t.name.padEnd(14)} 127.0.0.1:${t.localPort} → ${t.targetHost}:${t.remotePort}`);
147
114
  }
148
115
  }
149
- // ── registration ──────────────────────────────────────────────────────────────
150
- /** Run an action, printing a clean error (not a stack trace) + exit 1 on failure. */
151
116
  async function guard(fn) {
152
117
  try {
153
118
  await fn();
@@ -180,9 +145,7 @@ export function registerTunnelSubcommands(vpn) {
180
145
  tunnel
181
146
  .command("__run <tenant>", { hidden: true })
182
147
  .action((tenant) => runTunnels(tenant));
183
- // Back-compat alias for any launchd/detached runner referencing the old name.
184
148
  tunnel
185
149
  .command("__supervise <tenant>", { hidden: true })
186
150
  .action((tenant) => runTunnels(tenant));
187
151
  }
188
- //# sourceMappingURL=tunnel.js.map
@@ -1,24 +1,2 @@
1
- /**
2
- * mesh workflow — workflow tooling commands
3
- *
4
- * Commands:
5
- * mesh workflow extract-ir <path> Extract WorkflowIR from Temporal workflow source
6
- * mesh workflow inventory <path> Extract the as-built command/query/activity inventory
7
- * mesh workflow lint-process <path> Lint a process artifact's bindings against the code inventory
8
- *
9
- * Examples:
10
- * # Extract and print to stdout
11
- * mesh workflow extract-ir apps/ops/worker/src/workflows/
12
- *
13
- * # Extract and upload to S3
14
- * mesh workflow extract-ir apps/ops/worker/src/workflows/ --app ops --upload mesh-trabian-dev-artifacts
15
- *
16
- * # Print the as-built inventory (lint's code-side input)
17
- * mesh workflow inventory apps/ops/worker/src/workflows/workflows.ts
18
- *
19
- * # Lint a process artifact (conformance) — sibling process/*.process.json auto-discovered
20
- * mesh workflow lint-process apps/ops/worker/src/workflows.ts --predicates engagementComplete,accountNumbersComplete
21
- */
22
1
  import { Command } from "commander";
23
2
  export declare function registerWorkflowCommands(program: Command): void;
24
- //# sourceMappingURL=workflow.d.ts.map
@@ -1,37 +1,8 @@
1
- /**
2
- * mesh workflow — workflow tooling commands
3
- *
4
- * Commands:
5
- * mesh workflow extract-ir <path> Extract WorkflowIR from Temporal workflow source
6
- * mesh workflow inventory <path> Extract the as-built command/query/activity inventory
7
- * mesh workflow lint-process <path> Lint a process artifact's bindings against the code inventory
8
- *
9
- * Examples:
10
- * # Extract and print to stdout
11
- * mesh workflow extract-ir apps/ops/worker/src/workflows/
12
- *
13
- * # Extract and upload to S3
14
- * mesh workflow extract-ir apps/ops/worker/src/workflows/ --app ops --upload mesh-trabian-dev-artifacts
15
- *
16
- * # Print the as-built inventory (lint's code-side input)
17
- * mesh workflow inventory apps/ops/worker/src/workflows/workflows.ts
18
- *
19
- * # Lint a process artifact (conformance) — sibling process/*.process.json auto-discovered
20
- * mesh workflow lint-process apps/ops/worker/src/workflows.ts --predicates engagementComplete,accountNumbersComplete
21
- */
22
1
  import * as fs from "fs";
23
2
  import * as path from "path";
24
3
  import { createRequire } from "module";
25
4
  import { execFileSync } from "child_process";
26
5
  import { logError, logInfo, logSuccess, logWarn } from "../utils/log.js";
27
- /**
28
- * Shared subprocess-script helpers: discover auxiliary source files (shared
29
- * helpers/child workflows) and activity definition files referenced by a
30
- * workflow file's imports, so the extractor can resolve calls/signatures
31
- * across files. Emitted verbatim into both the extract-ir and inventory
32
- * tsx scripts below (they run as plain functions inside the subprocess, not
33
- * in this process, so they can't be imported/shared as normal TS).
34
- */
35
6
  const DISCOVERY_HELPERS_SRC = `
36
7
  function discoverAux(filePath, source) {
37
8
  const dir = dirname(filePath);
@@ -122,10 +93,6 @@ function discoverProcessArtifact(filePath, source) {
122
93
  return undefined;
123
94
  }
124
95
  `;
125
- /**
126
- * Resolve the path to @mesh-tech/workflow-viz/ast-extractor source file.
127
- * Uses createRequire from the CLI's own location so workspace links resolve.
128
- */
129
96
  function resolveExtractorPath() {
130
97
  try {
131
98
  const require = createRequire(import.meta.url);
@@ -136,19 +103,6 @@ function resolveExtractorPath() {
136
103
  return null;
137
104
  }
138
105
  }
139
- /**
140
- * Run the extraction in a tsx subprocess. The extractor depends on ts-morph
141
- * and workflow-viz exports TypeScript source (no dist build), so we need tsx
142
- * rather than plain Node.
143
- *
144
- * `explicitProcessPath`, when given, is read here (parent process) and baked
145
- * into the script verbatim, applied to EVERY discovered workflow file
146
- * (extractWorkflowIR's own workflowType check drops it wherever it doesn't
147
- * match — P6). Absent that, each file gets a sibling `process/*.process.json`
148
- * lookup (see `discoverProcessArtifact` in DISCOVERY_HELPERS_SRC).
149
- *
150
- * Returns parsed ExtractedWorkflow[] or null on failure.
151
- */
152
106
  function runExtraction(targetPath, extractorPath, explicitProcessPath) {
153
107
  let explicitProcessArtifact;
154
108
  if (explicitProcessPath) {
@@ -160,8 +114,6 @@ function runExtraction(targetPath, extractorPath, explicitProcessPath) {
160
114
  return null;
161
115
  }
162
116
  }
163
- // Build an inline script that does the extraction and writes JSON to stdout.
164
- // Stderr is used for progress messages.
165
117
  const script = `
166
118
  import { extractWorkflowIR } from "${extractorPath.replace(/\\/g, "/")}";
167
119
  import { readFileSync, readdirSync, statSync, existsSync } from "node:fs";
@@ -207,14 +159,6 @@ process.stdout.write(JSON.stringify(results));
207
159
  return null;
208
160
  }
209
161
  }
210
- /**
211
- * Run inventory extraction in a tsx subprocess — same aux-discovery pattern
212
- * as {@link runExtraction}, but calls `extractInventory` instead of
213
- * `extractWorkflowIR` and returns the as-built {@link Inventory} per
214
- * discovered workflow file.
215
- *
216
- * Returns parsed Inventory[] or null on failure.
217
- */
218
162
  function runInventoryExtraction(targetPath, extractorPath) {
219
163
  const script = `
220
164
  import { extractInventory } from "${extractorPath.replace(/\\/g, "/")}";
@@ -256,20 +200,6 @@ process.stdout.write(JSON.stringify(results));
256
200
  return null;
257
201
  }
258
202
  }
259
- /**
260
- * Run inventory + process-artifact discovery in a tsx subprocess, for
261
- * `lint-process`. Same aux/activity discovery as {@link runInventoryExtraction};
262
- * additionally resolves each file's process artifact the same way
263
- * {@link runExtraction} does — `explicitProcessPath` (baked in, applied to
264
- * every discovered file) if given, else the sibling `process/*.process.json`
265
- * lookup (`discoverProcessArtifact` in DISCOVERY_HELPERS_SRC).
266
- *
267
- * Parsing/linting the artifact happens back in the parent process (not
268
- * here) since `parseProcessArtifact`/`lintProcess` are plain TS this file
269
- * can import directly — no need to duplicate them into the subprocess script.
270
- *
271
- * Returns parsed LintExtractionResult[] or null on failure.
272
- */
273
203
  function runLintExtraction(targetPath, extractorPath, explicitProcessPath) {
274
204
  let explicitProcessArtifact;
275
205
  if (explicitProcessPath) {
@@ -358,12 +288,6 @@ async function uploadToS3(bucket, appName, workflows) {
358
288
  ContentType: "application/json",
359
289
  }));
360
290
  }
361
- /**
362
- * Split a `--predicates` / `--selectors` comma-list into names. `undefined`
363
- * (the flag absent) is load-bearing and distinct from an empty list: it means
364
- * "the CLI cannot check this", which suppresses the corresponding findings
365
- * rather than failing every reference.
366
- */
367
291
  function parseNameList(value) {
368
292
  return value
369
293
  ? value
@@ -519,9 +443,6 @@ export function registerWorkflowCommands(program) {
519
443
  process.exitCode = 1;
520
444
  return;
521
445
  }
522
- // Lazy-load workflow-model's runtime exports (see the import note at top): a
523
- // static import would take down `mesh` bootstrap in the published CLI. Fail
524
- // gracefully here, exactly like the extractor resolution above.
525
446
  let parseProcessArtifact;
526
447
  let lintProcess;
527
448
  try {
@@ -591,4 +512,3 @@ export function registerWorkflowCommands(program) {
591
512
  }
592
513
  });
593
514
  }
594
- //# sourceMappingURL=workflow.js.map