@mesh-tech/mesh-cli 0.20.2 → 0.20.4

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/dist/bin/mesh.d.ts +0 -12
  2. package/dist/bin/mesh.js +15 -13
  3. package/dist/bin/mesh.js.map +1 -2
  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 +3 -1
  99. package/dist/src/commands/temporal.js.map +1 -2
  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 +2 -2
  219. package/skills/core/SKILL.md +9 -10
  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,53 +1,23 @@
1
- /**
2
- * Assembly: turn the discovered doc roots into a plain content tree plus a
3
- * navigation manifest, ready for a docs renderer (Zudoku today) to build.
4
- *
5
- * The seam of the whole design is here: assembly's output is a directory of
6
- * markdown files, a generated `zudoku.config.ts`, and a publish manifest.
7
- * Nothing downstream knows about Mesh; nothing upstream knows about Zudoku.
8
- *
9
- * What assembly does, per page:
10
- * - derives the title (front-matter `title:` → first `#` heading → filename)
11
- * and writes it into the assembled front-matter, so nav labels and page
12
- * titles can never drift apart
13
- * - rewrites links: a relative link between two published files is correct
14
- * *on disk* but meaningless at a route, so published targets become
15
- * routes, unpublished-but-real files become repo blob links (reported as
16
- * `external`), and links that resolve to nothing are reported `broken`
17
- * - footers the page with the exact repo file it came from, so a reader who
18
- * spots a mistake knows where to fix it
19
- *
20
- * It also emits the publish manifest — every source path that made it into
21
- * the site — which the CI gate uploads and diffs so growing the public
22
- * surface is a thing a reviewer sees.
23
- */
24
1
  import type { DiscoveredPage, Discovery } from "./discover.js";
25
2
  export type LinkIssueKind = "broken" | "external";
26
3
  export interface LinkIssue {
27
4
  kind: LinkIssueKind;
28
- /** Route of the page whose markdown contains the link. */
29
5
  page: string;
30
- /** The href exactly as written in the source markdown. */
31
6
  href: string;
32
7
  }
33
8
  export interface AssembledPage {
34
- /** Repo-relative source path. */
35
9
  source: string;
36
- /** Absolute site route, e.g. "/building-apps/primitives/service" or "/". */
37
10
  route: string;
38
- /** Route without the leading slash — also the assembled file's stem path. */
39
11
  filePath: string;
40
12
  title: string;
41
13
  sectionTitle: string;
42
14
  sectionOrder: number;
43
15
  sectionSlug: string;
44
- /** Position within its directory: front-matter `order:` → undefined (filename sort). */
45
16
  order?: number;
46
17
  }
47
18
  export interface PublishManifest {
48
19
  version: 1;
49
20
  count: number;
50
- /** Every repo-relative source path that made it into the site, sorted. */
51
21
  sources: string[];
52
22
  }
53
23
  export interface AssembleResult {
@@ -57,7 +27,6 @@ export interface AssembleResult {
57
27
  brokenLinks: LinkIssue[];
58
28
  externalLinks: LinkIssue[];
59
29
  publishManifest: PublishManifest;
60
- /** Fail-closed assertion data: assembled output paths containing a reserved segment. */
61
30
  reservedViolations: string[];
62
31
  }
63
32
  interface FrontMatter {
@@ -65,48 +34,13 @@ interface FrontMatter {
65
34
  body: string;
66
35
  hasFrontMatter: boolean;
67
36
  }
68
- /**
69
- * Split a markdown document into front-matter and body. Only a `---` fence on
70
- * the very first line counts — a horizontal rule later in the prose is not
71
- * front-matter. A YAML parse failure is not fatal: the document is treated as
72
- * having no front-matter (the heading/filename title fallbacks still apply),
73
- * because one bad page must not take the whole site down at assemble time.
74
- */
75
37
  export declare function splitFrontMatter(markdown: string): FrontMatter;
76
- /**
77
- * The title derivation order, fixed by the design: front-matter `title:` →
78
- * first `#` heading → filename. `sidebar_label` wins for the nav when present
79
- * (Zudoku honours it), but the document still gets its real title.
80
- */
81
38
  export declare function deriveTitle(frontMatter: Record<string, unknown>, body: string, source: string): string;
82
39
  export interface LinkResolution {
83
40
  href: string;
84
41
  issue?: LinkIssue;
85
42
  }
86
- /**
87
- * Remove HTML comments (`<!-- … -->`, single- or multi-line) from a page body.
88
- * They are invisible in any rendered output by definition — the source file
89
- * keeps them — and multi-line comments currently crash Zudoku's MDX plugin
90
- * (`chunks[startIndex].slice is not a function`), which turns one authored
91
- * comment into a failed site build. Fenced code blocks are left alone: a doc
92
- * *teaching* HTML comments shows them as code, and that code must survive.
93
- */
94
43
  export declare function stripHtmlComments(body: string): string;
95
- /**
96
- * Resolve one link, exactly the #3503 semantics with routes instead of slugs:
97
- *
98
- * - anchors, absolute URLs, mailto: → untouched
99
- * - an `ignoreLinkPrefixes` match → untouched (declared deliberately
100
- * unresolvable — the app-kit README's `node_modules/…` guidance exists in
101
- * a tenant's install, never in this repo)
102
- * - a file the portal publishes → that page's route
103
- * - a directory whose index/README the portal publishes → that route
104
- * - a real repo file the portal does not publish → a repo blob link
105
- * (reported `external`)
106
- * - nothing → reported `broken`
107
- * - a site-rooted path (`/guides/x`) → validated against the route set, so a
108
- * typo'd route fails the gate instead of shipping as a 404
109
- */
110
44
  export declare function resolveLink(args: {
111
45
  href: string;
112
46
  pageRoute: string;
@@ -114,11 +48,9 @@ export declare function resolveLink(args: {
114
48
  sourceIndex: Map<string, AssembledPage>;
115
49
  routes: Set<string>;
116
50
  ignoreLinkPrefixes: string[];
117
- /** Exists-on-disk probe (file OR directory); returns "file" | "dir" | null. */
118
51
  pathKind: (repoRelPath: string) => "file" | "dir" | null;
119
52
  repoUrl: string;
120
53
  }): LinkResolution;
121
- /** Rewrite every link in a page body, collecting issues. */
122
54
  export declare function rewriteLinks(args: {
123
55
  body: string;
124
56
  page: AssembledPage;
@@ -134,45 +66,16 @@ export declare function rewriteLinks(args: {
134
66
  export interface AssembleOptions {
135
67
  repoRoot: string;
136
68
  discovery: Discovery;
137
- /** Directory the assembled markdown tree is written to. */
138
69
  outDir: string;
139
70
  repoUrl?: string;
140
71
  ignoreLinkPrefixes?: string[];
141
- /**
142
- * Version string stamped into the footer + version.json — the fixed
143
- * lockstep group's version post-`changeset version`. Undefined outside a
144
- * release build.
145
- */
146
72
  meshBaseline?: string;
147
- /** Short commit the build is from. */
148
73
  commit?: string;
149
74
  }
150
- /** A page's full route: section slug + route path. "/" for the site home. */
151
75
  export declare function pageRoute(page: DiscoveredPage): string;
152
- /** The assembled file path (no leading slash, with extension). */
153
76
  export declare function pageFilePath(route: string): string;
154
- /**
155
- * Assemble the discovered pages into `outDir`. Pure function of the repo tree
156
- * — the same inputs always produce the same tree, manifest, and navigation.
157
- */
158
77
  export declare function assemblePortal(options: AssembleOptions): AssembleResult;
159
- /**
160
- * Build the Zudoku navigation array from the assembled pages.
161
- *
162
- * Shape: one root category ("Documentation", clicking it lands on the home
163
- * page) whose items are one non-collapsible category per doc root — the
164
- * sidebar's section headers — each holding the section's tree: pages as doc
165
- * items, directories as nested categories. A directory with an index page
166
- * becomes a clickable category (its link); the section's own index page
167
- * becomes the section category's link. Order is front-matter `order:` first,
168
- * then filename — never declared anywhere but the files themselves.
169
- */
170
78
  export declare function buildNavigation(pages: AssembledPage[]): unknown[];
171
- /**
172
- * Render the generated `zudoku.config.ts`. It is regenerated on every
173
- * assemble and gitignored — the navigation manifest is derived state, and
174
- * committed derived state is how the old manifest rotted.
175
- */
176
79
  export declare function renderZudokuConfig(args: {
177
80
  navigation: unknown[];
178
81
  title: string;
@@ -180,38 +83,18 @@ export declare function renderZudokuConfig(args: {
180
83
  baseline?: string | undefined;
181
84
  commit?: string | undefined;
182
85
  }): string;
183
- /** version.json — the version-parity contract the parity monitor asserts. */
184
86
  export declare function renderVersionJson(args: {
185
87
  baseline?: string | undefined;
186
88
  commit: string;
187
89
  builtAt: string;
188
90
  }): string;
189
- /** Best-effort short commit of the repo being assembled. */
190
91
  export declare function currentCommit(repoRoot: string): string;
191
- /** The fixed lockstep group's version, read from app-kit's package.json. */
192
92
  export declare function currentBaseline(repoRoot: string): string | undefined;
193
93
  export interface PublishSetDiff {
194
94
  added: string[];
195
95
  removed: string[];
196
96
  }
197
- /**
198
- * Compute the publish set of another git ref WITHOUT checking it out — the
199
- * docs.json files and tree listing are read via `git show`/`git ls-tree`, and
200
- * the same discovery rules (reserved segments, README exclusion, include[])
201
- * are applied to that listing. Lets a PR diff its publish set against its
202
- * merge base in a CI job that has no second worktree and no installed deps
203
- * for the base.
204
- *
205
- * APPROXIMATION, base side only: this reimplementation skips schema
206
- * validation (an invalid docs.json publishes nothing in real discovery but
207
- * is walked here), nested-root rejection, and route-collision detection, so
208
- * it can OVER-report the base's publish set (a spurious "removed" row in the
209
- * summary) — never under-report the head's. The head side is always real
210
- * discovery; the gate's assertions never read this function.
211
- */
212
97
  export declare function publishSetAtRef(repoRoot: string, ref: string): string[];
213
98
  export declare function diffPublishSets(base: string[], head: string[]): PublishSetDiff;
214
- /** Render the publish-set diff as a GitHub job-summary markdown block. */
215
99
  export declare function renderPublishSetSummary(manifest: PublishManifest, diff: PublishSetDiff | null): string;
216
100
  export {};
217
- //# sourceMappingURL=assemble.d.ts.map
@@ -1,26 +1,3 @@
1
- /**
2
- * Assembly: turn the discovered doc roots into a plain content tree plus a
3
- * navigation manifest, ready for a docs renderer (Zudoku today) to build.
4
- *
5
- * The seam of the whole design is here: assembly's output is a directory of
6
- * markdown files, a generated `zudoku.config.ts`, and a publish manifest.
7
- * Nothing downstream knows about Mesh; nothing upstream knows about Zudoku.
8
- *
9
- * What assembly does, per page:
10
- * - derives the title (front-matter `title:` → first `#` heading → filename)
11
- * and writes it into the assembled front-matter, so nav labels and page
12
- * titles can never drift apart
13
- * - rewrites links: a relative link between two published files is correct
14
- * *on disk* but meaningless at a route, so published targets become
15
- * routes, unpublished-but-real files become repo blob links (reported as
16
- * `external`), and links that resolve to nothing are reported `broken`
17
- * - footers the page with the exact repo file it came from, so a reader who
18
- * spots a mistake knows where to fix it
19
- *
20
- * It also emits the publish manifest — every source path that made it into
21
- * the site — which the CI gate uploads and diffs so growing the public
22
- * surface is a thing a reviewer sees.
23
- */
24
1
  import { execFileSync } from "node:child_process";
25
2
  import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
26
3
  import path from "node:path";
@@ -29,13 +6,6 @@ import { pathKind } from "./discover.js";
29
6
  import { hasReservedSegment } from "./schema.js";
30
7
  const DEFAULT_REPO_URL = "https://github.com/mesh-tech/mesh-platform";
31
8
  const DEFAULT_IGNORE_LINK_PREFIXES = ["node_modules/"];
32
- /**
33
- * Split a markdown document into front-matter and body. Only a `---` fence on
34
- * the very first line counts — a horizontal rule later in the prose is not
35
- * front-matter. A YAML parse failure is not fatal: the document is treated as
36
- * having no front-matter (the heading/filename title fallbacks still apply),
37
- * because one bad page must not take the whole site down at assemble time.
38
- */
39
9
  export function splitFrontMatter(markdown) {
40
10
  const normalized = markdown.replace(/^\uFEFF/, "");
41
11
  if (!normalized.startsWith("---\n") && !normalized.startsWith("---\r\n")) {
@@ -58,27 +28,20 @@ export function splitFrontMatter(markdown) {
58
28
  }
59
29
  }
60
30
  catch {
61
- // fall through to the no-front-matter shape
62
31
  }
63
32
  return { data: {}, body, hasFrontMatter: true };
64
33
  }
65
- /** Serialize front-matter data + body back into a markdown document. */
66
34
  function joinFrontMatter(data, body) {
67
35
  const lines = Object.entries(data).map(([key, value]) => {
68
36
  if (typeof value === "number" || typeof value === "boolean")
69
37
  return `${key}: ${value}`;
70
38
  const text = String(value);
71
- // Quote only when YAML would misread the bare form.
72
39
  return /^[\w .,'’()/-]+$/.test(text)
73
40
  ? `${key}: ${text}`
74
41
  : `${key}: ${JSON.stringify(text)}`;
75
42
  });
76
43
  return `---\n${lines.join("\n")}\n---\n\n${body.replace(/^\s*\n/, "")}`;
77
44
  }
78
- // ---------------------------------------------------------------------------
79
- // Title derivation
80
- // ---------------------------------------------------------------------------
81
- /** First `#` heading text, or undefined. Headings inside code fences don't count. */
82
45
  function firstHeading(body) {
83
46
  let inFence = false;
84
47
  for (const line of body.split("\n")) {
@@ -94,16 +57,10 @@ function firstHeading(body) {
94
57
  }
95
58
  return undefined;
96
59
  }
97
- /** Titleize a filename stem for the filename-fallback case: `hub-dev-local` → "Hub dev local". */
98
60
  function titleizeStem(stem) {
99
61
  const words = stem.replace(/[-_]+/g, " ").trim();
100
62
  return words.charAt(0).toUpperCase() + words.slice(1);
101
63
  }
102
- /**
103
- * The title derivation order, fixed by the design: front-matter `title:` →
104
- * first `#` heading → filename. `sidebar_label` wins for the nav when present
105
- * (Zudoku honours it), but the document still gets its real title.
106
- */
107
64
  export function deriveTitle(frontMatter, body, source) {
108
65
  const fmTitle = frontMatter.title;
109
66
  if (typeof fmTitle === "string" && fmTitle.trim())
@@ -135,8 +92,6 @@ function scanLinks(markdown) {
135
92
  offset += line.length + 1;
136
93
  continue;
137
94
  }
138
- // Reference definitions: [id]: href — the href runs to end of line
139
- // (optionally followed by a title). Rewrite in place.
140
95
  const refDef = /^ {0,3}\[[^\]]+\]:\s*(\S+)/.exec(line);
141
96
  if (refDef) {
142
97
  const href = refDef[1];
@@ -145,7 +100,6 @@ function scanLinks(markdown) {
145
100
  offset += line.length + 1;
146
101
  continue;
147
102
  }
148
- // Inline links/images, skipping inline code spans.
149
103
  let i = 0;
150
104
  while (i < line.length) {
151
105
  const ch = line[i];
@@ -174,11 +128,6 @@ function scanLinks(markdown) {
174
128
  }
175
129
  return hits;
176
130
  }
177
- /**
178
- * At `line[i] === "["`, try to read `[...](href …)` or `[...][id]`. Only the
179
- * `(...)` form carries an inline href we can rewrite; reference uses are
180
- * covered by rewriting their definitions.
181
- */
182
131
  function scanBracketLink(line, open, lineOffset, hits) {
183
132
  const closeBracket = line.indexOf("]", open);
184
133
  if (closeBracket === -1)
@@ -203,7 +152,6 @@ function scanBracketLink(line, open, lineOffset, hits) {
203
152
  if (closeParen === -1)
204
153
  return line.length;
205
154
  const inner = line.slice(j, closeParen).trim();
206
- // href may be followed by a "title" — split on the first space.
207
155
  const space = inner.search(/\s/);
208
156
  const href = space === -1 ? inner : inner.slice(0, space);
209
157
  if (href) {
@@ -212,14 +160,6 @@ function scanBracketLink(line, open, lineOffset, hits) {
212
160
  }
213
161
  return closeParen + 1;
214
162
  }
215
- /**
216
- * Remove HTML comments (`<!-- … -->`, single- or multi-line) from a page body.
217
- * They are invisible in any rendered output by definition — the source file
218
- * keeps them — and multi-line comments currently crash Zudoku's MDX plugin
219
- * (`chunks[startIndex].slice is not a function`), which turns one authored
220
- * comment into a failed site build. Fenced code blocks are left alone: a doc
221
- * *teaching* HTML comments shows them as code, and that code must survive.
222
- */
223
163
  export function stripHtmlComments(body) {
224
164
  const lines = body.split("\n");
225
165
  const out = [];
@@ -259,8 +199,6 @@ export function stripHtmlComments(body) {
259
199
  inComment = true;
260
200
  rest = rest.slice(start + 4);
261
201
  }
262
- // A line that held only a comment collapses to nothing; a line with prose
263
- // around a comment keeps its prose.
264
202
  if (rebuilt.trim() !== "" || !inComment)
265
203
  out.push(rebuilt.replace(/\s+$/, ""));
266
204
  }
@@ -281,21 +219,6 @@ function splitHash(href) {
281
219
  ? [href, ""]
282
220
  : [href.slice(0, index), href.slice(index + 1)];
283
221
  }
284
- /**
285
- * Resolve one link, exactly the #3503 semantics with routes instead of slugs:
286
- *
287
- * - anchors, absolute URLs, mailto: → untouched
288
- * - an `ignoreLinkPrefixes` match → untouched (declared deliberately
289
- * unresolvable — the app-kit README's `node_modules/…` guidance exists in
290
- * a tenant's install, never in this repo)
291
- * - a file the portal publishes → that page's route
292
- * - a directory whose index/README the portal publishes → that route
293
- * - a real repo file the portal does not publish → a repo blob link
294
- * (reported `external`)
295
- * - nothing → reported `broken`
296
- * - a site-rooted path (`/guides/x`) → validated against the route set, so a
297
- * typo'd route fails the gate instead of shipping as a 404
298
- */
299
222
  export function resolveLink(args) {
300
223
  const { href, pageRoute, sourceDir, sourceIndex, routes, repoUrl } = args;
301
224
  if (href.startsWith("#") || isAbsoluteHref(href))
@@ -306,7 +229,6 @@ export function resolveLink(args) {
306
229
  const hash = rawHash ? `#${rawHash}` : "";
307
230
  if (rawTarget === "")
308
231
  return { href };
309
- // Site-rooted route reference.
310
232
  if (rawTarget.startsWith("/")) {
311
233
  const route = rawTarget.replace(/\/$/, "") || "/";
312
234
  return routes.has(route)
@@ -317,7 +239,6 @@ export function resolveLink(args) {
317
239
  const page = sourceIndex.get(repoPath);
318
240
  if (page)
319
241
  return { href: `${page.route}${hash}` };
320
- // A link to a directory conventionally means its index page.
321
242
  for (const candidate of [`${repoPath}/index.md`]) {
322
243
  const indexPage = sourceIndex.get(normalizeRepoPath(candidate));
323
244
  if (indexPage)
@@ -333,7 +254,6 @@ export function resolveLink(args) {
333
254
  }
334
255
  return { href, issue: { kind: "broken", page: pageRoute, href } };
335
256
  }
336
- /** Rewrite every link in a page body, collecting issues. */
337
257
  export function rewriteLinks(args) {
338
258
  const issues = [];
339
259
  const hits = scanLinks(args.body);
@@ -361,25 +281,17 @@ export function rewriteLinks(args) {
361
281
  out += args.body.slice(cursor);
362
282
  return { body: out, issues };
363
283
  }
364
- /** A page's full route: section slug + route path. "/" for the site home. */
365
284
  export function pageRoute(page) {
366
285
  const joined = [page.root.slug, page.routePath].filter(Boolean).join("/");
367
286
  return `/${joined}`.replace(/\/$/, "") || "/";
368
287
  }
369
- /** The assembled file path (no leading slash, with extension). */
370
288
  export function pageFilePath(route) {
371
289
  return route === "/" ? "index.md" : `${route.slice(1)}.md`;
372
290
  }
373
- /**
374
- * Assemble the discovered pages into `outDir`. Pure function of the repo tree
375
- * — the same inputs always produce the same tree, manifest, and navigation.
376
- */
377
291
  export function assemblePortal(options) {
378
292
  const { repoRoot, discovery, outDir } = options;
379
293
  const repoUrl = options.repoUrl ?? DEFAULT_REPO_URL;
380
294
  const ignoreLinkPrefixes = options.ignoreLinkPrefixes ?? DEFAULT_IGNORE_LINK_PREFIXES;
381
- // Build the page model first: routes must all exist before any link can be
382
- // rewritten against them.
383
295
  const pages = discovery.pages.map((page) => {
384
296
  const route = pageRoute(page);
385
297
  return {
@@ -418,9 +330,6 @@ export function assemblePortal(options) {
418
330
  for (const issue of rewritten.issues) {
419
331
  (issue.kind === "broken" ? brokenLinks : externalLinks).push(issue);
420
332
  }
421
- // Front-matter: keep the author's, guarantee `title`. `showLastModified`
422
- // is off — the assembled tree is rebuilt every run, so git-mtime-derived
423
- // dates would say "today" on every page.
424
333
  const outData = { ...frontMatter.data, title };
425
334
  const blobBase = repoUrl.replace(/\/$/, "").replace(/\/(blob|tree)$/, "");
426
335
  const sourceNote = `\n\n---\n\n<sub>Source: [\`${page.source}\`](${blobBase}/blob/main/${page.source}) — edit that file, not this page.</sub>\n`;
@@ -429,9 +338,6 @@ export function assemblePortal(options) {
429
338
  writeFileSync(outFile, joinFrontMatter(outData, rewritten.body.trimEnd() + sourceNote));
430
339
  }
431
340
  const navigation = buildNavigation(pages);
432
- // Fail-closed: no assembled output path may contain a reserved segment. The
433
- // walk already skips reserved directories, so a violation here means the
434
- // exclusion itself broke — exactly what the gate exists to catch.
435
341
  const reservedViolations = pages
436
342
  .map((p) => p.filePath)
437
343
  .filter((filePath) => hasReservedSegment(filePath));
@@ -453,17 +359,6 @@ export function assemblePortal(options) {
453
359
  function titleizeDir(name) {
454
360
  return titleizeStem(name);
455
361
  }
456
- /**
457
- * Build the Zudoku navigation array from the assembled pages.
458
- *
459
- * Shape: one root category ("Documentation", clicking it lands on the home
460
- * page) whose items are one non-collapsible category per doc root — the
461
- * sidebar's section headers — each holding the section's tree: pages as doc
462
- * items, directories as nested categories. A directory with an index page
463
- * becomes a clickable category (its link); the section's own index page
464
- * becomes the section category's link. Order is front-matter `order:` first,
465
- * then filename — never declared anywhere but the files themselves.
466
- */
467
362
  export function buildNavigation(pages) {
468
363
  const sections = new Map();
469
364
  for (const page of pages) {
@@ -482,13 +377,6 @@ export function buildNavigation(pages) {
482
377
  const sortPages = (list) => [...list].sort((a, b) => (a.order ?? Number.MAX_SAFE_INTEGER) -
483
378
  (b.order ?? Number.MAX_SAFE_INTEGER) ||
484
379
  a.filePath.localeCompare(b.filePath));
485
- // A nav doc reference (item or category link — same shape in both places).
486
- // A `path` is a CUSTOM path in Zudoku: when it equals the file-derived
487
- // route, the build moves the file's entry onto itself and deletes it
488
- // (resolveCustomNavigationPaths compares `path === file` without the
489
- // leading slash). The assembler already names files so the file route IS
490
- // the desired route — so `path` is only emitted for the one genuinely
491
- // custom mapping: the home page (file "index" → "/").
492
380
  const docRef = (page) => {
493
381
  const file = page.filePath.replace(/\.md$/, "");
494
382
  return page.route === `/${file}`
@@ -500,7 +388,6 @@ export function buildNavigation(pages) {
500
388
  const indexPage = section.pages.find((p) => p.route === `/${section.slug}` ||
501
389
  (section.slug === "" && p.route === "/"));
502
390
  const rest = section.pages.filter((p) => p !== indexPage);
503
- // Group remaining pages by their section-relative directory.
504
391
  const rootPages = [];
505
392
  const dirs = new Map();
506
393
  for (const page of rest) {
@@ -560,14 +447,6 @@ export function buildNavigation(pages) {
560
447
  },
561
448
  ];
562
449
  }
563
- // ---------------------------------------------------------------------------
564
- // Generated config + manifests
565
- // ---------------------------------------------------------------------------
566
- /**
567
- * Render the generated `zudoku.config.ts`. It is regenerated on every
568
- * assemble and gitignored — the navigation manifest is derived state, and
569
- * committed derived state is how the old manifest rotted.
570
- */
571
450
  export function renderZudokuConfig(args) {
572
451
  const versionLine = args.baseline
573
452
  ? `Documents @mesh-tech/* ${args.baseline} · built from ${args.commit ?? "unknown"}`
@@ -594,7 +473,6 @@ export function renderZudokuConfig(args) {
594
473
  },
595
474
  },
596
475
  redirects: [],
597
- // Search is Zudoku's built-in Pagefind index — no config needed.
598
476
  };
599
477
  const json = JSON.stringify(config, null, 2).replace(`"THEME_IMPORT"`, "portalTheme");
600
478
  return `/**
@@ -613,7 +491,6 @@ const config: ZudokuConfig = ${json};
613
491
  export default config;
614
492
  `;
615
493
  }
616
- /** version.json — the version-parity contract the parity monitor asserts. */
617
494
  export function renderVersionJson(args) {
618
495
  return `${JSON.stringify({
619
496
  meshBaseline: args.baseline ?? null,
@@ -621,7 +498,6 @@ export function renderVersionJson(args) {
621
498
  builtAt: args.builtAt,
622
499
  }, null, 2)}\n`;
623
500
  }
624
- /** Best-effort short commit of the repo being assembled. */
625
501
  export function currentCommit(repoRoot) {
626
502
  try {
627
503
  return execFileSync("git", ["rev-parse", "--short", "HEAD"], {
@@ -633,7 +509,6 @@ export function currentCommit(repoRoot) {
633
509
  return "unknown";
634
510
  }
635
511
  }
636
- /** The fixed lockstep group's version, read from app-kit's package.json. */
637
512
  export function currentBaseline(repoRoot) {
638
513
  try {
639
514
  const pkg = JSON.parse(readFileSync(path.join(repoRoot, "libs/app-kit/package.json"), "utf-8"));
@@ -643,21 +518,6 @@ export function currentBaseline(repoRoot) {
643
518
  return undefined;
644
519
  }
645
520
  }
646
- /**
647
- * Compute the publish set of another git ref WITHOUT checking it out — the
648
- * docs.json files and tree listing are read via `git show`/`git ls-tree`, and
649
- * the same discovery rules (reserved segments, README exclusion, include[])
650
- * are applied to that listing. Lets a PR diff its publish set against its
651
- * merge base in a CI job that has no second worktree and no installed deps
652
- * for the base.
653
- *
654
- * APPROXIMATION, base side only: this reimplementation skips schema
655
- * validation (an invalid docs.json publishes nothing in real discovery but
656
- * is walked here), nested-root rejection, and route-collision detection, so
657
- * it can OVER-report the base's publish set (a spurious "removed" row in the
658
- * summary) — never under-report the head's. The head side is always real
659
- * discovery; the gate's assertions never read this function.
660
- */
661
521
  export function publishSetAtRef(repoRoot, ref) {
662
522
  const git = (gitArgs) => execFileSync("git", gitArgs, {
663
523
  cwd: repoRoot,
@@ -711,7 +571,6 @@ export function diffPublishSets(base, head) {
711
571
  removed: base.filter((source) => !headSet.has(source)),
712
572
  };
713
573
  }
714
- /** Render the publish-set diff as a GitHub job-summary markdown block. */
715
574
  export function renderPublishSetSummary(manifest, diff) {
716
575
  const lines = [
717
576
  `## Docs portal publish set`,
@@ -736,4 +595,3 @@ export function renderPublishSetSummary(manifest, diff) {
736
595
  lines.push(``, `</details>`);
737
596
  return `${lines.join("\n")}\n`;
738
597
  }
739
- //# sourceMappingURL=assemble.js.map
@@ -1,38 +1,19 @@
1
- /**
2
- * Generate the `mesh` CLI reference from the commander tree.
3
- *
4
- * This is the load-bearing half of "self-documenting": the reference is not a
5
- * hand-maintained table that drifts from the code, it is a projection of the
6
- * same `Command` objects the CLI parses. Add a flag and the docs grow it; the
7
- * `--check` mode in `mesh docs` fails CI when the two diverge.
8
- *
9
- * Pure by construction — `extractCliReference` and `renderCliReferenceMarkdown`
10
- * do no I/O, so they are directly unit-testable.
11
- */
12
1
  import type { Command } from "commander";
13
2
  export interface CliOptionRef {
14
- /** Option flags exactly as declared, e.g. `-p, --port <n>`. */
15
3
  flags: string;
16
4
  description: string;
17
- /** Rendered default, if the option declares one. */
18
5
  defaultValue?: string;
19
6
  required: boolean;
20
- /** Enumerated allowed values, when the option declares `.choices()`. */
21
7
  choices?: string[];
22
8
  }
23
9
  export interface CliCommandRef {
24
- /** Full invocation path, e.g. `mesh hub dev`. */
25
10
  path: string;
26
- /** Leaf name only, e.g. `dev`. */
27
11
  name: string;
28
12
  aliases: string[];
29
13
  description: string;
30
- /** Positional argument usage, e.g. `<context> [names...]`. */
31
14
  args: string;
32
15
  options: CliOptionRef[];
33
- /** Slug used for the anchor/id of this command's section. */
34
16
  slug: string;
35
- /** Nesting depth below the root program (top-level commands are 1). */
36
17
  depth: number;
37
18
  subcommands: CliCommandRef[];
38
19
  }
@@ -42,52 +23,13 @@ export interface CliReference {
42
23
  options: CliOptionRef[];
43
24
  commands: CliCommandRef[];
44
25
  }
45
- /** Machine-specific paths that must never reach a committed artifact. */
46
26
  export interface MachinePaths {
47
27
  homeDir: string;
48
28
  tmpDir: string;
49
29
  }
50
- /**
51
- * Collapse machine-specific absolute paths to the symbols a reader recognizes.
52
- *
53
- * Some option defaults are computed at registration time from the environment —
54
- * `mesh install-shim --dir` defaults to `path.join(os.homedir(), ".local/bin")`.
55
- * Rendered literally, the generated reference embeds whoever ran the generator
56
- * (`/Users/dmb/.local/bin` vs `/home/runner/.local/bin`), which makes the
57
- * artifact machine-dependent and the `--check` gate pass only on one laptop —
58
- * exactly how this was caught, by CI failing a locally-green gate.
59
- *
60
- * Substituting `~` fixes determinism and is also what the reader wants to see.
61
- * Longest prefix first, since tmpdir can live under home on macOS.
62
- */
63
30
  export declare function normalizeMachinePaths(value: string, paths: MachinePaths): string;
64
- /**
65
- * Render a default value the way a reader would type it, not the way
66
- * `JSON.stringify` would: bare for strings so `docs/docs.config.json` doesn't
67
- * arrive wrapped in quotes, JSON for everything structured.
68
- *
69
- * `paths` is injectable so the normalization above is testable without
70
- * depending on the machine running the test.
71
- */
72
31
  export declare function formatDefault(value: unknown, paths?: MachinePaths): string | undefined;
73
- /** Slugify a command path into a stable anchor: `mesh hub dev` → `mesh-hub-dev`. */
74
32
  export declare function slugifyCommandPath(path: string): string;
75
- /**
76
- * Project a commander program into a serializable reference tree.
77
- *
78
- * The root program's `--version` option is excluded: its value is the CLI
79
- * version, which would make the generated output differ on every release and
80
- * turn the `--check` gate into noise.
81
- */
82
33
  export declare function extractCliReference(program: Command): CliReference;
83
- /** Depth-first walk over every command in the tree, parents before children. */
84
34
  export declare function flattenCommands(reference: CliReference): CliCommandRef[];
85
- /**
86
- * Render the reference as markdown.
87
- *
88
- * The output carries a generated-file banner naming the command that rebuilds
89
- * it, because the failure mode for generated docs is someone hand-editing the
90
- * artifact and losing the change on the next build.
91
- */
92
35
  export declare function renderCliReferenceMarkdown(reference: CliReference): string;
93
- //# sourceMappingURL=cli-reference.d.ts.map