@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,38 +1,17 @@
1
- /**
2
- * The docs-as-registry-artifact client.
3
- *
4
- * The release job publishes the built portal as `@mesh-tech/docs` in the
5
- * fixed lockstep group, so the docs version IS the @mesh-tech/* baseline
6
- * version it describes. The audience is exactly "people who can install the
7
- * packages": the CodeArtifact registry is Zitadel-role-gated (see
8
- * `mesh registry login`), so no public hosting is required for the docs to
9
- * reach precisely the authorized set.
10
- *
11
- * This module reads the user's existing `~/.npmrc` CodeArtifact token (the
12
- * one `mesh registry login` writes), lists published docs versions, and
13
- * fetches + caches a version's tarball. It never talks to AWS directly.
14
- */
15
1
  import { execFileSync } from "node:child_process";
16
2
  import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
17
3
  import { tmpdir } from "node:os";
18
4
  import path from "node:path";
19
5
  import { homeNpmrcPath, parseNpmrcRegistryAuth } from "../utils/auth-preflight.js";
20
6
  export const DOCS_PACKAGE = "@mesh-tech/docs";
21
- /** The CodeArtifact token + endpoint from `mesh registry login`'s ~/.npmrc line. */
22
7
  export function readDocsRegistryAuth(npmrcPath = homeNpmrcPath()) {
23
8
  if (!existsSync(npmrcPath))
24
9
  return null;
25
10
  return parseNpmrcRegistryAuth(readFileSync(npmrcPath, "utf-8"));
26
11
  }
27
- /** The packument URL for a package (`@scope/name` → `@scope%2fname` path encoding). */
28
12
  function packumentUrl(endpoint, pkg) {
29
13
  return `${endpoint.replace(/\/+$/, "")}/${pkg.replace(/\//g, "%2f")}`;
30
14
  }
31
- /**
32
- * An authenticated registry request. `accept` defaults to JSON for packument
33
- * reads; a tarball download must ask for the octet stream instead — the
34
- * registry answers 406 to a JSON accept on a `.tgz` URL.
35
- */
36
15
  async function registryFetch(auth, url, fetchImpl, accept = "application/json") {
37
16
  return fetchImpl(url, {
38
17
  headers: {
@@ -41,7 +20,6 @@ async function registryFetch(auth, url, fetchImpl, accept = "application/json")
41
20
  },
42
21
  });
43
22
  }
44
- /** x.y.z numeric compare (release versions carry no prerelease suffixes). */
45
23
  export function compareVersions(a, b) {
46
24
  const parse = (v) => {
47
25
  const parts = v.split(".").map((n) => Number.parseInt(n, 10) || 0);
@@ -57,11 +35,6 @@ export function compareVersions(a, b) {
57
35
  }
58
36
  return 0;
59
37
  }
60
- /**
61
- * Every published docs version, oldest → newest, plus the registry's
62
- * `latest` dist-tag. Throws with the login remediation when the registry
63
- * rejects the token — an expired token is the common case (12h TTL).
64
- */
65
38
  export async function listDocsVersions(auth, fetchImpl = fetch) {
66
39
  const response = await registryFetch(auth, packumentUrl(auth.endpoint, DOCS_PACKAGE), fetchImpl).catch((error) => {
67
40
  throw new Error(`could not reach the package registry: ${error instanceof Error ? error.message : String(error)}`);
@@ -79,7 +52,6 @@ export async function listDocsVersions(auth, fetchImpl = fetch) {
79
52
  const versions = Object.keys(packument.versions ?? {}).sort(compareVersions);
80
53
  return { versions, latest: packument["dist-tags"]?.latest };
81
54
  }
82
- /** Where fetched docs versions live: `~/.cache/mesh/docs/<version>/`. */
83
55
  export function docsCacheRoot() {
84
56
  const base = process.env.XDG_CACHE_HOME ?? path.join(homeDir(), ".cache");
85
57
  return path.join(base, "mesh", "docs");
@@ -87,12 +59,6 @@ export function docsCacheRoot() {
87
59
  function homeDir() {
88
60
  return process.env.HOME ?? tmpdir();
89
61
  }
90
- /**
91
- * Fetch and extract a docs version into the cache; returns the directory
92
- * containing the site's `dist/`. Cache hit = the directory already has a
93
- * `dist/index.html`. Partial downloads extract to a temp sibling and rename,
94
- * so an interrupted fetch never leaves a half-written "good" cache entry.
95
- */
96
62
  export async function fetchDocsArtifact(auth, version, cacheRoot = docsCacheRoot(), fetchImpl = fetch) {
97
63
  const targetDir = path.join(cacheRoot, version);
98
64
  if (existsSync(path.join(targetDir, "dist", "index.html")))
@@ -106,10 +72,6 @@ export async function fetchDocsArtifact(auth, version, cacheRoot = docsCacheRoot
106
72
  if (!tarball) {
107
73
  throw new Error(`${DOCS_PACKAGE}@${version} is not in the registry. Run \`mesh docs list\` to see published versions.`);
108
74
  }
109
- // Only ever send the registry credential to the registry's own origin: the
110
- // tarball URL comes out of a response BODY, and a bearer token must not
111
- // follow it to an arbitrary host. Real CodeArtifact tarball URLs are
112
- // same-origin; anything else is a malformed (or hostile) packument.
113
75
  if (new URL(tarball).origin !== new URL(auth.endpoint).origin) {
114
76
  throw new Error(`${DOCS_PACKAGE}@${version} points its tarball at ${new URL(tarball).origin}, not the registry (${new URL(auth.endpoint).origin}) — refusing to send the registry token off-origin`);
115
77
  }
@@ -124,7 +86,6 @@ export async function fetchDocsArtifact(auth, version, cacheRoot = docsCacheRoot
124
86
  rmSync(staging, { recursive: true, force: true });
125
87
  mkdirSync(staging, { recursive: true });
126
88
  try {
127
- // npm tarballs wrap everything in `package/` — strip one component.
128
89
  execFileSync("tar", ["-xzf", tgzPath, "-C", staging, "--strip-components", "1"], {
129
90
  stdio: ["pipe", "pipe", "pipe"],
130
91
  });
@@ -140,4 +101,3 @@ export async function fetchDocsArtifact(auth, version, cacheRoot = docsCacheRoot
140
101
  renameSync(staging, targetDir);
141
102
  return targetDir;
142
103
  }
143
- //# sourceMappingURL=registry-docs.js.map
@@ -1,34 +1,5 @@
1
- /**
2
- * The `docs.json` contract — the one file that turns a directory into portal
3
- * content, and the reserved-name list that keeps internal material
4
- * unpublishable even inside an opted-in directory.
5
- *
6
- * The reserved list is the safety property of the whole design: it is frozen,
7
- * deliberately coarse, and matched case-insensitively against every path
8
- * segment at any depth. Publishing internal material takes TWO mistakes —
9
- * adding a `docs.json` to a directory that holds it AND moving the material
10
- * out of a reserved directory. Keep the list coarse; when a document should be
11
- * public, move the document to a publishable directory rather than narrowing
12
- * the list.
13
- */
14
1
  import { z } from "zod";
15
- /**
16
- * Directory/file names that never publish, at any depth beneath a doc root.
17
- * Matched case-insensitively against each individual path segment.
18
- *
19
- * Evidence-derived from the repo's own `docs/` tree (plans/, superpowers/,
20
- * incidents/, handoffs/, HRAN/, reviews/, runbooks/, proposals/, designs/,
21
- * templates/ hold the internal corpus) plus the tooling directories that must
22
- * never leak (node_modules, __tests__, .claude, .pi) and the generic internal
23
- * markers (archive, internal, drafts).
24
- */
25
2
  export declare const RESERVED_SEGMENTS: readonly string[];
26
- /**
27
- * A doc root's declaration. Everything else about the site is derived from the
28
- * tree, never declared — this schema is deliberately tiny, and STRICT: an
29
- * unknown key is a typo the author meant something by, so it fails validation
30
- * rather than being silently ignored.
31
- */
32
3
  export declare const docsJsonSchema: z.ZodObject<{
33
4
  title: z.ZodString;
34
5
  order: z.ZodDefault<z.ZodNumber>;
@@ -36,13 +7,6 @@ export declare const docsJsonSchema: z.ZodObject<{
36
7
  include: z.ZodDefault<z.ZodArray<z.ZodString>>;
37
8
  }, z.core.$strict>;
38
9
  export type DocsJson = z.infer<typeof docsJsonSchema>;
39
- /** True when one path segment is a reserved name (case-insensitive). */
40
10
  export declare function isReservedSegment(segment: string): boolean;
41
- /**
42
- * True when ANY segment of a repo-relative path is reserved. This is the
43
- * fail-closed check the CI gate runs over every assembled output path.
44
- */
45
11
  export declare function hasReservedSegment(relPath: string): boolean;
46
- /** Lower-kebab-case form of a title or filename stem, for routes. */
47
12
  export declare function slugify(value: string): string;
48
- //# sourceMappingURL=schema.d.ts.map
@@ -1,27 +1,4 @@
1
- /**
2
- * The `docs.json` contract — the one file that turns a directory into portal
3
- * content, and the reserved-name list that keeps internal material
4
- * unpublishable even inside an opted-in directory.
5
- *
6
- * The reserved list is the safety property of the whole design: it is frozen,
7
- * deliberately coarse, and matched case-insensitively against every path
8
- * segment at any depth. Publishing internal material takes TWO mistakes —
9
- * adding a `docs.json` to a directory that holds it AND moving the material
10
- * out of a reserved directory. Keep the list coarse; when a document should be
11
- * public, move the document to a publishable directory rather than narrowing
12
- * the list.
13
- */
14
1
  import { z } from "zod";
15
- /**
16
- * Directory/file names that never publish, at any depth beneath a doc root.
17
- * Matched case-insensitively against each individual path segment.
18
- *
19
- * Evidence-derived from the repo's own `docs/` tree (plans/, superpowers/,
20
- * incidents/, handoffs/, HRAN/, reviews/, runbooks/, proposals/, designs/,
21
- * templates/ hold the internal corpus) plus the tooling directories that must
22
- * never leak (node_modules, __tests__, .claude, .pi) and the generic internal
23
- * markers (archive, internal, drafts).
24
- */
25
2
  export const RESERVED_SEGMENTS = [
26
3
  "plans",
27
4
  "designs",
@@ -41,56 +18,27 @@ export const RESERVED_SEGMENTS = [
41
18
  ".claude",
42
19
  ".pi",
43
20
  ];
44
- /**
45
- * A doc root's declaration. Everything else about the site is derived from the
46
- * tree, never declared — this schema is deliberately tiny, and STRICT: an
47
- * unknown key is a typo the author meant something by, so it fails validation
48
- * rather than being silently ignored.
49
- */
50
21
  export const docsJsonSchema = z
51
22
  .object({
52
- /** Section label in the nav, e.g. "Building apps". */
53
23
  title: z.string().min(1),
54
- /**
55
- * Section position in the nav. Ties break alphabetically by title, so two
56
- * sections can never fight over a slot nondeterministically.
57
- */
58
24
  order: z.number().int().default(50),
59
- /**
60
- * Route prefix for the section. Defaults to the slugified title. The
61
- * empty string is legal and means "this section lives at the site root" —
62
- * exactly one root should do that (the front door, `docs/portal`).
63
- */
64
25
  slug: z
65
26
  .string()
66
27
  .regex(/^$|^[a-z0-9]+(?:-[a-z0-9]+)*$/, 'slug must be lower-kebab-case or ""')
67
28
  .optional(),
68
- /**
69
- * Escape hatch: explicit repo-relative paths to publish that live outside
70
- * any natural doc root (a package README, a repo-root policy file). Expected
71
- * to hold a handful of entries across the whole repo — adding one is a
72
- * deliberate, reviewable act. Paths under a reserved segment are refused.
73
- */
74
29
  include: z.array(z.string().min(1)).default([]),
75
30
  })
76
31
  .strict();
77
- /** True when one path segment is a reserved name (case-insensitive). */
78
32
  export function isReservedSegment(segment) {
79
33
  const lowered = segment.toLowerCase();
80
34
  return RESERVED_SEGMENTS.some((reserved) => reserved === lowered);
81
35
  }
82
- /**
83
- * True when ANY segment of a repo-relative path is reserved. This is the
84
- * fail-closed check the CI gate runs over every assembled output path.
85
- */
86
36
  export function hasReservedSegment(relPath) {
87
37
  return relPath.split("/").some(isReservedSegment);
88
38
  }
89
- /** Lower-kebab-case form of a title or filename stem, for routes. */
90
39
  export function slugify(value) {
91
40
  return (value
92
41
  .toLowerCase()
93
42
  .replace(/[^a-z0-9]+/g, "-")
94
43
  .replace(/^-+|-+$/g, "") || "index");
95
44
  }
96
- //# sourceMappingURL=schema.js.map
@@ -1,27 +1,9 @@
1
- /**
2
- * Serve a BUILT docs site (the Zudoku `dist/`) over loopback HTTP.
3
- *
4
- * This is deliberately not the deleted portal-serve.ts: that one served a
5
- * bespoke renderer's output with a custom search-index API. This one serves
6
- * a prerendered static tree and nothing else — try the exact path, then
7
- * `<path>.html` (Zudoku's prerendered routes), then `<path>/index.html`,
8
- * then the SPA fallback. No search endpoint: Pagefind runs client-side
9
- * against the shipped index files.
10
- */
11
1
  export interface DocsServer {
12
2
  url: string;
13
3
  port: number;
14
4
  close: () => Promise<void>;
15
5
  }
16
- /**
17
- * Start the server. `port: 0` picks a free one (what tests use).
18
- *
19
- * Path safety: the URL path is normalized and rejected outright if it escapes
20
- * the root — this serves a local preview to the machine's own user, but a
21
- * `..` escape is a hole with no excuse to exist.
22
- */
23
6
  export declare function serveDocsSite(args: {
24
7
  root: string;
25
8
  port: number;
26
9
  }): Promise<DocsServer>;
27
- //# sourceMappingURL=serve.d.ts.map
@@ -1,13 +1,3 @@
1
- /**
2
- * Serve a BUILT docs site (the Zudoku `dist/`) over loopback HTTP.
3
- *
4
- * This is deliberately not the deleted portal-serve.ts: that one served a
5
- * bespoke renderer's output with a custom search-index API. This one serves
6
- * a prerendered static tree and nothing else — try the exact path, then
7
- * `<path>.html` (Zudoku's prerendered routes), then `<path>/index.html`,
8
- * then the SPA fallback. No search endpoint: Pagefind runs client-side
9
- * against the shipped index files.
10
- */
11
1
  import { createServer } from "node:http";
12
2
  import { readFile } from "node:fs/promises";
13
3
  import { extname, join, normalize, sep } from "node:path";
@@ -30,20 +20,8 @@ const CONTENT_TYPES = {
30
20
  ".md": "text/markdown; charset=utf-8",
31
21
  ".webmanifest": "application/manifest+json",
32
22
  };
33
- /**
34
- * Start the server. `port: 0` picks a free one (what tests use).
35
- *
36
- * Path safety: the URL path is normalized and rejected outright if it escapes
37
- * the root — this serves a local preview to the machine's own user, but a
38
- * `..` escape is a hole with no excuse to exist.
39
- */
40
23
  export async function serveDocsSite(args) {
41
24
  const root = normalize(args.root);
42
- // Containment, not prefix-match: the prefix test alone admits SIBLINGS
43
- // whose names extend the root's basename (`<parent>/dist-secret/x` starts
44
- // with `<parent>/dist`). The vector that reaches it is an encoded slash —
45
- // WHATWG URL parsing strips dot-segments, then decodeURIComponent turns
46
- // `..%2f` back into `../`. (Review on #3612.)
47
25
  const rootPrefix = root.endsWith(sep) ? root : root + sep;
48
26
  const server = createServer((req, res) => {
49
27
  void (async () => {
@@ -59,25 +37,20 @@ export async function serveDocsSite(args) {
59
37
  `${pathname.replace(/\/$/, "")}/index.html`,
60
38
  ];
61
39
  if (pathname !== "/")
62
- candidates.push("/index.html"); // SPA fallback
40
+ candidates.push("/index.html");
63
41
  for (const candidate of candidates) {
64
42
  const filePath = normalize(join(root, candidate));
65
- // `continue`, not `break`: one malformed candidate must not change
66
- // the response for the rest (the SPA fallback lives inside the root).
67
43
  if (filePath !== root && !filePath.startsWith(rootPrefix))
68
- continue; // outside the root — never serve
44
+ continue;
69
45
  try {
70
46
  const body = await readFile(filePath);
71
47
  const type = CONTENT_TYPES[extname(filePath)] ?? "application/octet-stream";
72
- // Prerendered HTML can be stale the moment a newer build exists;
73
- // hashed assets are immutable.
74
48
  const cache = candidate.includes("/assets/") ? "public, max-age=31536000, immutable" : "no-cache";
75
49
  res.writeHead(200, { "content-type": type, "cache-control": cache });
76
50
  res.end(body);
77
51
  return;
78
52
  }
79
53
  catch {
80
- // try the next candidate
81
54
  }
82
55
  }
83
56
  res.writeHead(404, { "content-type": "text/plain" }).end("not found");
@@ -99,4 +72,3 @@ export async function serveDocsSite(args) {
99
72
  }),
100
73
  };
101
74
  }
102
- //# sourceMappingURL=serve.js.map
@@ -1,50 +1,13 @@
1
- /**
2
- * `mesh docs start` / `mesh docs list` / `mesh docs stop` — the docs as a
3
- * local, role-gated server (MESH-1803 follow-up).
4
- *
5
- * Two content modes, chosen automatically:
6
- *
7
- * - **Repo mode** — inside a checkout that has doc roots (mesh-platform):
8
- * assemble the working tree, build, and serve the static output. This is
9
- * the contributor path; the docs are exactly what is on disk.
10
- * - **Registry mode** — anywhere else (a tenant repo, a global install):
11
- * fetch the published `@mesh-tech/docs` artifact — versioned with the
12
- * @mesh-tech/* baseline — from the role-gated registry and serve it.
13
- * `-v <version>` pins; default is the registry's `latest` dist-tag.
14
- *
15
- * Two run modes: by default the server runs DETACHED in a tmux session with
16
- * the constant name `mesh-docs` — the handle that keeps a backgrounded server
17
- * from getting lost — and the command prints the URL once it answers.
18
- * `--foreground` (or a non-TTY, i.e. an agent/CI) serves in the foreground.
19
- * `--dev` (repo mode) runs the Zudoku dev server and is foreground-only: it
20
- * is an authoring tool — you are supposed to watch it.
21
- *
22
- * The registry mode is the distribution point: the people who can read the
23
- * docs are exactly the people who can install the packages, and no public
24
- * hosting is required.
25
- */
26
- /** The one tmux session name — the constant handle for the detached server. */
27
1
  export declare const DOCS_TMUX_SESSION = "mesh-docs";
28
- /** `mesh docs list` — published docs versions, newest first. */
29
2
  export declare function runDocsList(): Promise<void>;
30
- /** The install command to show when tmux is missing, per platform. */
31
3
  export declare function tmuxInstallHint(platform?: string): string;
32
- /** True when tmux is runnable. */
33
4
  export declare function tmuxAvailable(): boolean;
34
- /** The detached/foreground decision, as one pure predicate. */
35
5
  export declare function shouldDetach(args: {
36
6
  foreground: boolean;
37
7
  dev: boolean;
38
8
  isTTY: boolean;
39
9
  }): boolean;
40
- /** True when the detached session currently exists. */
41
10
  export declare function docsSessionExists(): boolean;
42
- /**
43
- * The argv the tmux session runs: a hidden foreground serve of the prepared
44
- * directory. Source checkouts re-enter through `pnpm exec mesh` at the repo
45
- * root (the shim-free canonical form); a published install re-enters through
46
- * the `mesh` bin on PATH.
47
- */
48
11
  export declare function tmuxServeArgs(args: {
49
12
  mode: "source" | "dist";
50
13
  repoRoot: string;
@@ -54,7 +17,6 @@ export declare function tmuxServeArgs(args: {
54
17
  command: string[];
55
18
  cwd: string;
56
19
  };
57
- /** (Re)start the detached docs session and wait for it to answer. */
58
20
  export declare function startDetached(args: {
59
21
  mode: "source" | "dist";
60
22
  repoRoot: string;
@@ -62,14 +24,11 @@ export declare function startDetached(args: {
62
24
  port: number;
63
25
  label: string;
64
26
  }): Promise<void>;
65
- /** `mesh docs stop` — kill the detached session if it exists. */
66
27
  export declare function runDocsStop(): void;
67
- /** The hidden `mesh docs serve-static` the tmux session re-enters through. */
68
28
  export declare function runDocsServeStatic(args: {
69
29
  root: string;
70
30
  port: string;
71
31
  }): Promise<void>;
72
- /** `mesh docs start` — serve the docs locally, detached by default. */
73
32
  export declare function runDocsStart(args: {
74
33
  repoRoot: string;
75
34
  version?: string | undefined;
@@ -77,4 +36,3 @@ export declare function runDocsStart(args: {
77
36
  dev: boolean;
78
37
  foreground: boolean;
79
38
  }): Promise<void>;
80
- //# sourceMappingURL=start.d.ts.map
@@ -1,28 +1,3 @@
1
- /**
2
- * `mesh docs start` / `mesh docs list` / `mesh docs stop` — the docs as a
3
- * local, role-gated server (MESH-1803 follow-up).
4
- *
5
- * Two content modes, chosen automatically:
6
- *
7
- * - **Repo mode** — inside a checkout that has doc roots (mesh-platform):
8
- * assemble the working tree, build, and serve the static output. This is
9
- * the contributor path; the docs are exactly what is on disk.
10
- * - **Registry mode** — anywhere else (a tenant repo, a global install):
11
- * fetch the published `@mesh-tech/docs` artifact — versioned with the
12
- * @mesh-tech/* baseline — from the role-gated registry and serve it.
13
- * `-v <version>` pins; default is the registry's `latest` dist-tag.
14
- *
15
- * Two run modes: by default the server runs DETACHED in a tmux session with
16
- * the constant name `mesh-docs` — the handle that keeps a backgrounded server
17
- * from getting lost — and the command prints the URL once it answers.
18
- * `--foreground` (or a non-TTY, i.e. an agent/CI) serves in the foreground.
19
- * `--dev` (repo mode) runs the Zudoku dev server and is foreground-only: it
20
- * is an authoring tool — you are supposed to watch it.
21
- *
22
- * The registry mode is the distribution point: the people who can read the
23
- * docs are exactly the people who can install the packages, and no public
24
- * hosting is required.
25
- */
26
1
  import { execFileSync } from "node:child_process";
27
2
  import { appendFileSync, existsSync, writeFileSync } from "node:fs";
28
3
  import path from "node:path";
@@ -32,7 +7,6 @@ import { discoverDocRoots } from "./discover.js";
32
7
  import { runAssemble, reportAssembly, DOCS_APP_DIR } from "./portal.js";
33
8
  import { serveDocsSite } from "./serve.js";
34
9
  import { DOCS_PACKAGE, fetchDocsArtifact, listDocsVersions, readDocsRegistryAuth, } from "./registry-docs.js";
35
- /** The one tmux session name — the constant handle for the detached server. */
36
10
  export const DOCS_TMUX_SESSION = "mesh-docs";
37
11
  function registryAuthOrThrow() {
38
12
  const auth = readDocsRegistryAuth();
@@ -42,7 +16,6 @@ function registryAuthOrThrow() {
42
16
  }
43
17
  return auth;
44
18
  }
45
- /** `mesh docs list` — published docs versions, newest first. */
46
19
  export async function runDocsList() {
47
20
  const auth = registryAuthOrThrow();
48
21
  const { versions, latest } = await listDocsVersions(auth);
@@ -56,10 +29,6 @@ export async function runDocsList() {
56
29
  process.stdout.write(` ${version}${marker}\n`);
57
30
  }
58
31
  }
59
- // ---------------------------------------------------------------------------
60
- // Detached (tmux) machinery
61
- // ---------------------------------------------------------------------------
62
- /** The install command to show when tmux is missing, per platform. */
63
32
  export function tmuxInstallHint(platform = process.platform) {
64
33
  if (platform === "darwin")
65
34
  return "brew install tmux";
@@ -67,7 +36,6 @@ export function tmuxInstallHint(platform = process.platform) {
67
36
  return "sudo apt-get install tmux # or your distro's package manager";
68
37
  return "install tmux via your package manager";
69
38
  }
70
- /** True when tmux is runnable. */
71
39
  export function tmuxAvailable() {
72
40
  try {
73
41
  execFileSync("tmux", ["-V"], { stdio: ["pipe", "pipe", "pipe"] });
@@ -77,11 +45,9 @@ export function tmuxAvailable() {
77
45
  return false;
78
46
  }
79
47
  }
80
- /** The detached/foreground decision, as one pure predicate. */
81
48
  export function shouldDetach(args) {
82
49
  return !args.foreground && !args.dev && args.isTTY;
83
50
  }
84
- /** True when the detached session currently exists. */
85
51
  export function docsSessionExists() {
86
52
  try {
87
53
  execFileSync("tmux", ["has-session", "-t", DOCS_TMUX_SESSION], { stdio: ["pipe", "pipe", "pipe"] });
@@ -91,12 +57,6 @@ export function docsSessionExists() {
91
57
  return false;
92
58
  }
93
59
  }
94
- /**
95
- * The argv the tmux session runs: a hidden foreground serve of the prepared
96
- * directory. Source checkouts re-enter through `pnpm exec mesh` at the repo
97
- * root (the shim-free canonical form); a published install re-enters through
98
- * the `mesh` bin on PATH.
99
- */
100
60
  export function tmuxServeArgs(args) {
101
61
  const serveArgs = ["docs", "serve-static", "--root", args.serveRoot, "--port", String(args.port)];
102
62
  if (args.mode === "dist") {
@@ -104,34 +64,22 @@ export function tmuxServeArgs(args) {
104
64
  }
105
65
  return { command: ["pnpm", "exec", "mesh", ...serveArgs], cwd: args.repoRoot };
106
66
  }
107
- /** (Re)start the detached docs session and wait for it to answer. */
108
67
  export async function startDetached(args) {
109
68
  if (!tmuxAvailable()) {
110
69
  throw new Error(`tmux is not installed — the detached docs server runs in a tmux session named "${DOCS_TMUX_SESSION}".\n` +
111
70
  `Install it with: ${tmuxInstallHint()}\n` +
112
71
  `Or run in the foreground instead: mesh docs start --foreground`);
113
72
  }
114
- // Restart semantics: the session name is the constant handle, so a second
115
- // `docs start` replaces the first rather than orphaning it. Say so when it
116
- // happens — a developer serving `-v 1.11.3` who starts the working tree
117
- // should not lose the first server silently.
118
73
  if (docsSessionExists()) {
119
74
  logInfo(`Replacing the docs server already running in tmux session "${DOCS_TMUX_SESSION}".`);
120
75
  try {
121
76
  execFileSync("tmux", ["kill-session", "-t", DOCS_TMUX_SESSION], { stdio: ["pipe", "pipe", "pipe"] });
122
77
  }
123
78
  catch {
124
- // raced with its own shutdown — harmless
125
79
  }
126
80
  }
127
81
  const { command, cwd } = tmuxServeArgs(args);
128
- // Pass the argv ARRAY: tmux execs a multi-argument command directly, with no
129
- // shell. A single joined string would go through `sh -c`, and a `$()` or
130
- // backtick in a path (which mesh-ops worktree names can legitimately carry)
131
- // would be evaluated. Verified empirically on tmux 3.6a.
132
82
  execFileSync("tmux", ["new-session", "-d", "-s", DOCS_TMUX_SESSION, "-c", cwd, "--", ...command], { stdio: ["pipe", "pipe", "pipe"] });
133
- // Wait for the server to answer before printing the URL — "one click" only
134
- // works if the link is live when it appears.
135
83
  const deadline = Date.now() + 60_000;
136
84
  const url = `http://127.0.0.1:${args.port}`;
137
85
  let lastError = "";
@@ -154,13 +102,11 @@ export async function startDetached(args) {
154
102
  }
155
103
  function printReady(url, label) {
156
104
  logSuccess(`Mesh docs (${label}) are live:`);
157
- // Bare on its own line — one click from any terminal.
158
105
  process.stdout.write(`\n ${url}\n\n`);
159
106
  logInfo(`Running detached in the tmux session "${DOCS_TMUX_SESSION}".`);
160
107
  logInfo(` attach: tmux attach -t ${DOCS_TMUX_SESSION}`);
161
108
  logInfo(` stop: mesh docs stop`);
162
109
  }
163
- /** `mesh docs stop` — kill the detached session if it exists. */
164
110
  export function runDocsStop() {
165
111
  try {
166
112
  execFileSync("tmux", ["kill-session", "-t", DOCS_TMUX_SESSION], { stdio: ["pipe", "pipe", "pipe"] });
@@ -170,7 +116,6 @@ export function runDocsStop() {
170
116
  logInfo(`No docs server is running (no tmux session named "${DOCS_TMUX_SESSION}").`);
171
117
  }
172
118
  }
173
- /** The hidden `mesh docs serve-static` the tmux session re-enters through. */
174
119
  export async function runDocsServeStatic(args) {
175
120
  const requestedPort = Number.parseInt(args.port, 10);
176
121
  if (!Number.isInteger(requestedPort) || requestedPort < 0 || requestedPort > 65535) {
@@ -188,26 +133,17 @@ export async function runDocsServeStatic(args) {
188
133
  process.once("SIGTERM", stop);
189
134
  });
190
135
  }
191
- // ---------------------------------------------------------------------------
192
- // mesh docs start
193
- // ---------------------------------------------------------------------------
194
- /** `mesh docs start` — serve the docs locally, detached by default. */
195
136
  export async function runDocsStart(args) {
196
137
  const requestedPort = Number.parseInt(args.port, 10);
197
138
  if (!Number.isInteger(requestedPort) || requestedPort < 0 || requestedPort > 65535) {
198
139
  throw new Error(`Invalid --port: ${args.port}`);
199
140
  }
200
- // Compute the run mode BEFORE any prepare work (assemble+build is the
201
- // expensive part; refuse bad combinations up front).
202
141
  const detached = shouldDetach({
203
142
  foreground: args.foreground,
204
143
  dev: args.dev,
205
144
  isTTY: process.stdout.isTTY === true,
206
145
  });
207
146
  if (detached && requestedPort === 0) {
208
- // A detached server that picks its own port cannot report the choice back:
209
- // the parent would poll 127.0.0.1:0 for a minute and "fail" while a
210
- // perfectly good server runs on a port nobody knows.
211
147
  throw new Error("--port 0 (pick a free port) needs a foreground server, because the detached session " +
212
148
  "cannot report the port it chose back to this process. Use `mesh docs start --foreground --port 0`, " +
213
149
  "or pass an explicit port to run detached.");
@@ -238,9 +174,6 @@ export async function runDocsStart(args) {
238
174
  }
239
175
  const appDir = path.join(args.repoRoot, DOCS_APP_DIR);
240
176
  if (args.dev) {
241
- // HMR mode for docs authoring: assemble, then hand the tree to the
242
- // Zudoku dev server. Foreground-only by design — an authoring tool is
243
- // watched, not detached.
244
177
  const result = runAssemble({
245
178
  repoRoot: args.repoRoot,
246
179
  outDir: path.join(appDir, "content"),
@@ -260,8 +193,6 @@ export async function runDocsStart(args) {
260
193
  });
261
194
  return;
262
195
  }
263
- // Detached mode keeps the waiting display to two lines; the build's noise
264
- // lands in a log file instead of the terminal.
265
196
  const buildLog = path.join(args.repoRoot, DOCS_APP_DIR, "build.log");
266
197
  logInfo(`Preparing the docs from this checkout (assemble + build — log: ${path.relative(args.repoRoot, buildLog)})…`);
267
198
  const result = runAssemble({
@@ -310,4 +241,3 @@ export async function runDocsStart(args) {
310
241
  process.once("SIGTERM", stop);
311
242
  });
312
243
  }
313
- //# sourceMappingURL=start.js.map
@@ -1,14 +1,2 @@
1
1
  #!/usr/bin/env npx tsx
2
- /**
3
- * Agent eval runner — sends prompts to a mesh.ai.Agent API and captures
4
- * structured traces of tool calls, results, errors, and artifacts.
5
- *
6
- * Usage:
7
- * npx tsx agent-eval.mts --prompt "Build a contract onboarding workflow..."
8
- * npx tsx agent-eval.mts --prompt-file prompts/contract-onboarding.md
9
- * npx tsx agent-eval.mts --prompt "..." --api http://localhost:8787 --conversation conv-123
10
- *
11
- * Output: JSON trace to stdout (pipe to jq or a file), human summary to stderr.
12
- */
13
2
  export {};
14
- //# sourceMappingURL=agent-eval.d.mts.map