@mesh-tech/mesh-cli 0.1.1 → 0.12.1

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 (504) hide show
  1. package/assets/intent/agents-fence.md +10 -0
  2. package/assets/intent/intent-claude-gate.mjs +255 -0
  3. package/assets/log-shipper.mjs +94 -0
  4. package/bin/mesh.mjs +80 -0
  5. package/dist/bin/mesh.d.ts +7 -9
  6. package/dist/bin/mesh.d.ts.map +1 -1
  7. package/dist/bin/mesh.js +20878 -37
  8. package/dist/bin/mesh.js.map +7 -1
  9. package/dist/build-info.json +4 -0
  10. package/dist/src/commands/agent-api-client.d.ts +79 -0
  11. package/dist/src/commands/agent-api-client.d.ts.map +1 -0
  12. package/dist/src/commands/agent-api-client.js +170 -0
  13. package/dist/src/commands/agent-api-client.js.map +1 -0
  14. package/dist/src/commands/artifacts.d.ts +13 -0
  15. package/dist/src/commands/artifacts.d.ts.map +1 -0
  16. package/dist/src/commands/artifacts.js +140 -0
  17. package/dist/src/commands/artifacts.js.map +1 -0
  18. package/dist/src/commands/cluster.d.ts +45 -0
  19. package/dist/src/commands/cluster.d.ts.map +1 -0
  20. package/dist/src/commands/cluster.js +259 -0
  21. package/dist/src/commands/cluster.js.map +1 -0
  22. package/dist/src/commands/conversations.d.ts +61 -0
  23. package/dist/src/commands/conversations.d.ts.map +1 -0
  24. package/dist/src/commands/conversations.js +239 -0
  25. package/dist/src/commands/conversations.js.map +1 -0
  26. package/dist/src/commands/create-app.d.ts +26 -3
  27. package/dist/src/commands/create-app.d.ts.map +1 -1
  28. package/dist/src/commands/create-app.js +465 -107
  29. package/dist/src/commands/create-app.js.map +1 -1
  30. package/dist/src/commands/deploy.d.ts +19 -0
  31. package/dist/src/commands/deploy.d.ts.map +1 -1
  32. package/dist/src/commands/deploy.js +83 -142
  33. package/dist/src/commands/deploy.js.map +1 -1
  34. package/dist/src/commands/dev-doctor.d.ts +137 -0
  35. package/dist/src/commands/dev-doctor.d.ts.map +1 -0
  36. package/dist/src/commands/dev-doctor.js +671 -0
  37. package/dist/src/commands/dev-doctor.js.map +1 -0
  38. package/dist/src/commands/dev-launch.d.ts +59 -0
  39. package/dist/src/commands/dev-launch.d.ts.map +1 -0
  40. package/dist/src/commands/dev-launch.js +118 -0
  41. package/dist/src/commands/dev-launch.js.map +1 -0
  42. package/dist/src/commands/dev-token-server.d.ts +32 -0
  43. package/dist/src/commands/dev-token-server.d.ts.map +1 -0
  44. package/dist/src/commands/dev-token-server.js +68 -0
  45. package/dist/src/commands/dev-token-server.js.map +1 -0
  46. package/dist/src/commands/dev.d.ts +289 -2
  47. package/dist/src/commands/dev.d.ts.map +1 -1
  48. package/dist/src/commands/dev.js +2501 -574
  49. package/dist/src/commands/dev.js.map +1 -1
  50. package/dist/src/commands/docs.d.ts +3 -0
  51. package/dist/src/commands/docs.d.ts.map +1 -0
  52. package/dist/src/commands/docs.js +262 -0
  53. package/dist/src/commands/docs.js.map +1 -0
  54. package/dist/src/commands/hub/index.d.ts +99 -0
  55. package/dist/src/commands/hub/index.d.ts.map +1 -0
  56. package/dist/src/commands/hub/index.js +452 -0
  57. package/dist/src/commands/hub/index.js.map +1 -0
  58. package/dist/src/commands/init.d.ts +65 -0
  59. package/dist/src/commands/init.d.ts.map +1 -0
  60. package/dist/src/commands/init.js +370 -0
  61. package/dist/src/commands/init.js.map +1 -0
  62. package/dist/src/commands/install-shim.d.ts +28 -0
  63. package/dist/src/commands/install-shim.d.ts.map +1 -0
  64. package/dist/src/commands/install-shim.js +191 -0
  65. package/dist/src/commands/install-shim.js.map +1 -0
  66. package/dist/src/commands/local/auth-provision.d.ts +71 -0
  67. package/dist/src/commands/local/auth-provision.d.ts.map +1 -0
  68. package/dist/src/commands/local/auth-provision.js +286 -0
  69. package/dist/src/commands/local/auth-provision.js.map +1 -0
  70. package/dist/src/commands/local/dev-local.d.ts +97 -0
  71. package/dist/src/commands/local/dev-local.d.ts.map +1 -0
  72. package/dist/src/commands/local/dev-local.js +306 -0
  73. package/dist/src/commands/local/dev-local.js.map +1 -0
  74. package/dist/src/commands/local/docker-runner.d.ts +37 -0
  75. package/dist/src/commands/local/docker-runner.d.ts.map +1 -0
  76. package/dist/src/commands/local/docker-runner.js +104 -0
  77. package/dist/src/commands/local/docker-runner.js.map +1 -0
  78. package/dist/src/commands/local/helpers.d.ts +22 -0
  79. package/dist/src/commands/local/helpers.d.ts.map +1 -0
  80. package/dist/src/commands/local/helpers.js +46 -0
  81. package/dist/src/commands/local/helpers.js.map +1 -0
  82. package/dist/src/commands/local/hub-local.d.ts +51 -0
  83. package/dist/src/commands/local/hub-local.d.ts.map +1 -0
  84. package/dist/src/commands/local/hub-local.js +197 -0
  85. package/dist/src/commands/local/hub-local.js.map +1 -0
  86. package/dist/src/commands/local/index.d.ts +23 -0
  87. package/dist/src/commands/local/index.d.ts.map +1 -0
  88. package/dist/src/commands/local/index.js +386 -0
  89. package/dist/src/commands/local/index.js.map +1 -0
  90. package/dist/src/commands/local/mocks.d.ts +361 -0
  91. package/dist/src/commands/local/mocks.d.ts.map +1 -0
  92. package/dist/src/commands/local/mocks.js +756 -0
  93. package/dist/src/commands/local/mocks.js.map +1 -0
  94. package/dist/src/commands/local/seed-zitadel.d.ts +151 -0
  95. package/dist/src/commands/local/seed-zitadel.d.ts.map +1 -0
  96. package/dist/src/commands/local/seed-zitadel.js +408 -0
  97. package/dist/src/commands/local/seed-zitadel.js.map +1 -0
  98. package/dist/src/commands/local/seed.d.ts +106 -0
  99. package/dist/src/commands/local/seed.d.ts.map +1 -0
  100. package/dist/src/commands/local/seed.js +252 -0
  101. package/dist/src/commands/local/seed.js.map +1 -0
  102. package/dist/src/commands/local/stack.d.ts +173 -0
  103. package/dist/src/commands/local/stack.d.ts.map +1 -0
  104. package/dist/src/commands/local/stack.js +499 -0
  105. package/dist/src/commands/local/stack.js.map +1 -0
  106. package/dist/src/commands/login.d.ts +256 -12
  107. package/dist/src/commands/login.d.ts.map +1 -1
  108. package/dist/src/commands/login.js +978 -50
  109. package/dist/src/commands/login.js.map +1 -1
  110. package/dist/src/commands/peer-addressing.d.ts +51 -0
  111. package/dist/src/commands/peer-addressing.d.ts.map +1 -0
  112. package/dist/src/commands/peer-addressing.js +64 -0
  113. package/dist/src/commands/peer-addressing.js.map +1 -0
  114. package/dist/src/commands/port-ownership.d.ts +69 -0
  115. package/dist/src/commands/port-ownership.d.ts.map +1 -0
  116. package/dist/src/commands/port-ownership.js +161 -0
  117. package/dist/src/commands/port-ownership.js.map +1 -0
  118. package/dist/src/commands/registry-publish.d.ts +3 -0
  119. package/dist/src/commands/registry-publish.d.ts.map +1 -0
  120. package/dist/src/commands/registry-publish.js +161 -0
  121. package/dist/src/commands/registry-publish.js.map +1 -0
  122. package/dist/src/commands/registry.d.ts +146 -2
  123. package/dist/src/commands/registry.d.ts.map +1 -1
  124. package/dist/src/commands/registry.js +541 -85
  125. package/dist/src/commands/registry.js.map +1 -1
  126. package/dist/src/commands/secrets/index.d.ts.map +1 -1
  127. package/dist/src/commands/secrets/index.js +15 -1
  128. package/dist/src/commands/secrets/index.js.map +1 -1
  129. package/dist/src/commands/secrets/migrate-config.d.ts +24 -0
  130. package/dist/src/commands/secrets/migrate-config.d.ts.map +1 -0
  131. package/dist/src/commands/secrets/migrate-config.js +277 -0
  132. package/dist/src/commands/secrets/migrate-config.js.map +1 -0
  133. package/dist/src/commands/secrets/set.d.ts +1 -0
  134. package/dist/src/commands/secrets/set.d.ts.map +1 -1
  135. package/dist/src/commands/secrets/set.js +96 -2
  136. package/dist/src/commands/secrets/set.js.map +1 -1
  137. package/dist/src/commands/skills.d.ts +34 -0
  138. package/dist/src/commands/skills.d.ts.map +1 -0
  139. package/dist/src/commands/skills.js +207 -0
  140. package/dist/src/commands/skills.js.map +1 -0
  141. package/dist/src/commands/stack.d.ts.map +1 -1
  142. package/dist/src/commands/stack.js +361 -23
  143. package/dist/src/commands/stack.js.map +1 -1
  144. package/dist/src/commands/temporal.d.ts +15 -0
  145. package/dist/src/commands/temporal.d.ts.map +1 -0
  146. package/dist/src/commands/temporal.js +781 -0
  147. package/dist/src/commands/temporal.js.map +1 -0
  148. package/dist/src/commands/tenant.d.ts +56 -0
  149. package/dist/src/commands/tenant.d.ts.map +1 -0
  150. package/dist/src/commands/tenant.js +233 -0
  151. package/dist/src/commands/tenant.js.map +1 -0
  152. package/dist/src/commands/tunnel/index.d.ts +49 -3
  153. package/dist/src/commands/tunnel/index.d.ts.map +1 -1
  154. package/dist/src/commands/tunnel/index.js +331 -8
  155. package/dist/src/commands/tunnel/index.js.map +1 -1
  156. package/dist/src/commands/vcs/clone.d.ts +3 -0
  157. package/dist/src/commands/vcs/clone.d.ts.map +1 -0
  158. package/dist/src/commands/vcs/clone.js +20 -0
  159. package/dist/src/commands/vcs/clone.js.map +1 -0
  160. package/dist/src/commands/vcs/common.d.ts +21 -0
  161. package/dist/src/commands/vcs/common.d.ts.map +1 -0
  162. package/dist/src/commands/vcs/common.js +62 -0
  163. package/dist/src/commands/vcs/common.js.map +1 -0
  164. package/dist/src/commands/vcs/drafts.d.ts +13 -0
  165. package/dist/src/commands/vcs/drafts.d.ts.map +1 -0
  166. package/dist/src/commands/vcs/drafts.js +45 -0
  167. package/dist/src/commands/vcs/drafts.js.map +1 -0
  168. package/dist/src/commands/vcs/get.d.ts +8 -0
  169. package/dist/src/commands/vcs/get.d.ts.map +1 -0
  170. package/dist/src/commands/vcs/get.js +61 -0
  171. package/dist/src/commands/vcs/get.js.map +1 -0
  172. package/dist/src/commands/vcs/index.d.ts +3 -0
  173. package/dist/src/commands/vcs/index.d.ts.map +1 -0
  174. package/dist/src/commands/vcs/index.js +58 -0
  175. package/dist/src/commands/vcs/index.js.map +1 -0
  176. package/dist/src/commands/vcs/propose.d.ts +23 -0
  177. package/dist/src/commands/vcs/propose.d.ts.map +1 -0
  178. package/dist/src/commands/vcs/propose.js +94 -0
  179. package/dist/src/commands/vcs/propose.js.map +1 -0
  180. package/dist/src/commands/vcs/review.d.ts +15 -0
  181. package/dist/src/commands/vcs/review.d.ts.map +1 -0
  182. package/dist/src/commands/vcs/review.js +35 -0
  183. package/dist/src/commands/vcs/review.js.map +1 -0
  184. package/dist/src/commands/vcs-enrich.d.ts +15 -0
  185. package/dist/src/commands/vcs-enrich.d.ts.map +1 -0
  186. package/dist/src/commands/vcs-enrich.js +28 -0
  187. package/dist/src/commands/vcs-enrich.js.map +1 -0
  188. package/dist/src/commands/vpn/index.d.ts +24 -0
  189. package/dist/src/commands/vpn/index.d.ts.map +1 -0
  190. package/dist/src/commands/vpn/index.js +543 -0
  191. package/dist/src/commands/vpn/index.js.map +1 -0
  192. package/dist/src/commands/vpn/tunnel.d.ts +11 -0
  193. package/dist/src/commands/vpn/tunnel.d.ts.map +1 -0
  194. package/dist/src/commands/vpn/tunnel.js +188 -0
  195. package/dist/src/commands/vpn/tunnel.js.map +1 -0
  196. package/dist/src/commands/workflow.d.ts +24 -0
  197. package/dist/src/commands/workflow.d.ts.map +1 -0
  198. package/dist/src/commands/workflow.js +577 -0
  199. package/dist/src/commands/workflow.js.map +1 -0
  200. package/dist/src/docs/assemble.d.ts +217 -0
  201. package/dist/src/docs/assemble.d.ts.map +1 -0
  202. package/dist/src/docs/assemble.js +739 -0
  203. package/dist/src/docs/assemble.js.map +1 -0
  204. package/dist/src/docs/cli-reference.d.ts +93 -0
  205. package/dist/src/docs/cli-reference.d.ts.map +1 -0
  206. package/dist/src/docs/cli-reference.js +256 -0
  207. package/dist/src/docs/cli-reference.js.map +1 -0
  208. package/dist/src/docs/discover.d.ts +60 -0
  209. package/dist/src/docs/discover.d.ts.map +1 -0
  210. package/dist/src/docs/discover.js +233 -0
  211. package/dist/src/docs/discover.js.map +1 -0
  212. package/dist/src/docs/portal.d.ts +79 -0
  213. package/dist/src/docs/portal.d.ts.map +1 -0
  214. package/dist/src/docs/portal.js +242 -0
  215. package/dist/src/docs/portal.js.map +1 -0
  216. package/dist/src/docs/registry-docs.d.ts +43 -0
  217. package/dist/src/docs/registry-docs.d.ts.map +1 -0
  218. package/dist/src/docs/registry-docs.js +138 -0
  219. package/dist/src/docs/registry-docs.js.map +1 -0
  220. package/dist/src/docs/schema.d.ts +48 -0
  221. package/dist/src/docs/schema.d.ts.map +1 -0
  222. package/dist/src/docs/schema.js +96 -0
  223. package/dist/src/docs/schema.js.map +1 -0
  224. package/dist/src/docs/serve.d.ts +27 -0
  225. package/dist/src/docs/serve.d.ts.map +1 -0
  226. package/dist/src/docs/serve.js +102 -0
  227. package/dist/src/docs/serve.js.map +1 -0
  228. package/dist/src/docs/start.d.ts +80 -0
  229. package/dist/src/docs/start.d.ts.map +1 -0
  230. package/dist/src/docs/start.js +313 -0
  231. package/dist/src/docs/start.js.map +1 -0
  232. package/dist/src/eval/agent-eval.d.mts +14 -0
  233. package/dist/src/eval/agent-eval.d.mts.map +1 -0
  234. package/dist/src/eval/agent-eval.mjs +273 -0
  235. package/dist/src/eval/agent-eval.mjs.map +1 -0
  236. package/dist/src/index.js +624 -7
  237. package/dist/src/index.js.map +7 -1
  238. package/dist/src/program.d.ts +26 -0
  239. package/dist/src/program.d.ts.map +1 -0
  240. package/dist/src/program.js +76 -0
  241. package/dist/src/program.js.map +1 -0
  242. package/dist/src/utils/auth-preflight.d.ts +159 -0
  243. package/dist/src/utils/auth-preflight.d.ts.map +1 -0
  244. package/dist/src/utils/auth-preflight.js +298 -0
  245. package/dist/src/utils/auth-preflight.js.map +1 -0
  246. package/dist/src/utils/aws-auth.d.ts +181 -0
  247. package/dist/src/utils/aws-auth.d.ts.map +1 -0
  248. package/dist/src/utils/aws-auth.js +527 -0
  249. package/dist/src/utils/aws-auth.js.map +1 -0
  250. package/dist/src/utils/bastion.d.ts +1 -1
  251. package/dist/src/utils/bastion.d.ts.map +1 -1
  252. package/dist/src/utils/bastion.js +29 -8
  253. package/dist/src/utils/bastion.js.map +1 -1
  254. package/dist/src/utils/build-info.d.ts +33 -0
  255. package/dist/src/utils/build-info.d.ts.map +1 -0
  256. package/dist/src/utils/build-info.js +102 -0
  257. package/dist/src/utils/build-info.js.map +1 -0
  258. package/dist/src/utils/capture-history.d.ts +62 -0
  259. package/dist/src/utils/capture-history.d.ts.map +1 -0
  260. package/dist/src/utils/capture-history.js +94 -0
  261. package/dist/src/utils/capture-history.js.map +1 -0
  262. package/dist/src/utils/deploy-preflight.d.ts +52 -0
  263. package/dist/src/utils/deploy-preflight.d.ts.map +1 -0
  264. package/dist/src/utils/deploy-preflight.js +183 -0
  265. package/dist/src/utils/deploy-preflight.js.map +1 -0
  266. package/dist/src/utils/errors.d.ts +75 -0
  267. package/dist/src/utils/errors.d.ts.map +1 -0
  268. package/dist/src/utils/errors.js +106 -0
  269. package/dist/src/utils/errors.js.map +1 -0
  270. package/dist/src/utils/first-party-contexts.d.ts +40 -0
  271. package/dist/src/utils/first-party-contexts.d.ts.map +1 -0
  272. package/dist/src/utils/first-party-contexts.js +53 -0
  273. package/dist/src/utils/first-party-contexts.js.map +1 -0
  274. package/dist/src/utils/index.d.ts +2 -0
  275. package/dist/src/utils/index.d.ts.map +1 -1
  276. package/dist/src/utils/index.js +2 -0
  277. package/dist/src/utils/index.js.map +1 -1
  278. package/dist/src/utils/kubeconfig.d.ts +62 -0
  279. package/dist/src/utils/kubeconfig.d.ts.map +1 -0
  280. package/dist/src/utils/kubeconfig.js +118 -0
  281. package/dist/src/utils/kubeconfig.js.map +1 -0
  282. package/dist/src/utils/log.d.ts +27 -1
  283. package/dist/src/utils/log.d.ts.map +1 -1
  284. package/dist/src/utils/log.js +59 -5
  285. package/dist/src/utils/log.js.map +1 -1
  286. package/dist/src/utils/pid.d.ts +47 -0
  287. package/dist/src/utils/pid.d.ts.map +1 -0
  288. package/dist/src/utils/pid.js +83 -0
  289. package/dist/src/utils/pid.js.map +1 -0
  290. package/dist/src/utils/pulumi-run.d.ts +23 -0
  291. package/dist/src/utils/pulumi-run.d.ts.map +1 -0
  292. package/dist/src/utils/pulumi-run.js +112 -0
  293. package/dist/src/utils/pulumi-run.js.map +1 -0
  294. package/dist/src/utils/pulumi.d.ts +15 -0
  295. package/dist/src/utils/pulumi.d.ts.map +1 -1
  296. package/dist/src/utils/pulumi.js +35 -0
  297. package/dist/src/utils/pulumi.js.map +1 -1
  298. package/dist/src/utils/reachability.d.ts +29 -0
  299. package/dist/src/utils/reachability.d.ts.map +1 -0
  300. package/dist/src/utils/reachability.js +81 -0
  301. package/dist/src/utils/reachability.js.map +1 -0
  302. package/dist/src/utils/recover-conversation.d.ts +154 -0
  303. package/dist/src/utils/recover-conversation.d.ts.map +1 -0
  304. package/dist/src/utils/recover-conversation.js +314 -0
  305. package/dist/src/utils/recover-conversation.js.map +1 -0
  306. package/dist/src/utils/registry-broker.d.ts +148 -0
  307. package/dist/src/utils/registry-broker.d.ts.map +1 -0
  308. package/dist/src/utils/registry-broker.js +180 -0
  309. package/dist/src/utils/registry-broker.js.map +1 -0
  310. package/dist/src/utils/socks-forward.d.ts +40 -0
  311. package/dist/src/utils/socks-forward.d.ts.map +1 -0
  312. package/dist/src/utils/socks-forward.js +97 -0
  313. package/dist/src/utils/socks-forward.js.map +1 -0
  314. package/dist/src/utils/stack-flag.d.ts +23 -0
  315. package/dist/src/utils/stack-flag.d.ts.map +1 -0
  316. package/dist/src/utils/stack-flag.js +41 -0
  317. package/dist/src/utils/stack-flag.js.map +1 -0
  318. package/dist/src/utils/tailscale-targets.d.ts +52 -0
  319. package/dist/src/utils/tailscale-targets.d.ts.map +1 -0
  320. package/dist/src/utils/tailscale-targets.js +93 -0
  321. package/dist/src/utils/tailscale-targets.js.map +1 -0
  322. package/dist/src/utils/tailscale.d.ts +277 -0
  323. package/dist/src/utils/tailscale.d.ts.map +1 -0
  324. package/dist/src/utils/tailscale.js +1007 -0
  325. package/dist/src/utils/tailscale.js.map +1 -0
  326. package/dist/src/utils/temporal-auth.d.ts +43 -0
  327. package/dist/src/utils/temporal-auth.d.ts.map +1 -0
  328. package/dist/src/utils/temporal-auth.js +176 -0
  329. package/dist/src/utils/temporal-auth.js.map +1 -0
  330. package/dist/src/utils/temporal-codec.d.ts +101 -0
  331. package/dist/src/utils/temporal-codec.d.ts.map +1 -0
  332. package/dist/src/utils/temporal-codec.js +319 -0
  333. package/dist/src/utils/temporal-codec.js.map +1 -0
  334. package/dist/src/utils/tunnel-ownership.d.ts +130 -0
  335. package/dist/src/utils/tunnel-ownership.d.ts.map +1 -0
  336. package/dist/src/utils/tunnel-ownership.js +274 -0
  337. package/dist/src/utils/tunnel-ownership.js.map +1 -0
  338. package/dist/src/utils/vpn-join.d.ts +32 -0
  339. package/dist/src/utils/vpn-join.d.ts.map +1 -0
  340. package/dist/src/utils/vpn-join.js +62 -0
  341. package/dist/src/utils/vpn-join.js.map +1 -0
  342. package/dist/src/utils/vpn.d.ts +62 -0
  343. package/dist/src/utils/vpn.d.ts.map +1 -0
  344. package/dist/src/utils/vpn.js +183 -0
  345. package/dist/src/utils/vpn.js.map +1 -0
  346. package/dist/src/utils/workflow-fingerprint.d.ts +49 -0
  347. package/dist/src/utils/workflow-fingerprint.d.ts.map +1 -0
  348. package/dist/src/utils/workflow-fingerprint.js +135 -0
  349. package/dist/src/utils/workflow-fingerprint.js.map +1 -0
  350. package/dist/src/utils/worktree-identity.d.ts +86 -0
  351. package/dist/src/utils/worktree-identity.d.ts.map +1 -0
  352. package/dist/src/utils/worktree-identity.js +164 -0
  353. package/dist/src/utils/worktree-identity.js.map +1 -0
  354. package/fragments/agents/AGENTS.md.hbs +92 -0
  355. package/fragments/agents/CLAUDE.md.hbs +8 -0
  356. package/fragments/base/Pulumi.dev.yaml.hbs +10 -0
  357. package/fragments/base/Pulumi.yaml.hbs +9 -0
  358. package/fragments/base/index.ts.hbs +107 -0
  359. package/fragments/base/package.json.hbs +22 -0
  360. package/{templates/api-web-db/api → fragments/base}/tsconfig.json +3 -4
  361. package/fragments/bucket/api/src/storage.ts.hbs +81 -0
  362. package/fragments/database/api/src/db.ts.hbs +23 -0
  363. package/fragments/database/prisma/schema.prisma.hbs +18 -0
  364. package/{templates/api-web-db → fragments/service}/api/.dockerignore +2 -0
  365. package/fragments/service/api/package.json.hbs +40 -0
  366. package/fragments/service/api/src/index.ts.hbs +58 -0
  367. package/{templates/api-web-db → fragments/service/api}/tsconfig.json +5 -3
  368. package/fragments/temporal/worker/.dockerignore +4 -0
  369. package/fragments/temporal/worker/Dockerfile +15 -0
  370. package/{templates/temporal-api-worker → fragments/temporal}/worker/package.json.hbs +3 -2
  371. package/fragments/temporal/worker/src/activities.ts.hbs +14 -0
  372. package/fragments/temporal/worker/src/worker.ts.hbs +27 -0
  373. package/fragments/temporal/worker/src/workflows.ts.hbs +24 -0
  374. package/fragments/temporal/worker/tsconfig.json +13 -0
  375. package/package.json +36 -22
  376. package/skills/core/SKILL.md +365 -0
  377. package/skills/pull-remote-agent-context/SKILL.md +194 -0
  378. package/stack/docker-compose.hub.yml +134 -0
  379. package/stack/docker-compose.yml +447 -0
  380. package/stack/hub/Dockerfile.api +18 -0
  381. package/stack/hub/Dockerfile.auth +10 -0
  382. package/stack/hub/Dockerfile.ui +10 -0
  383. package/stack/init/01-databases.sql +12 -0
  384. package/stack/observability/blackbox.yml +20 -0
  385. package/stack/observability/otel-collector.yaml +73 -0
  386. package/stack/observability/prometheus.yml +36 -0
  387. package/stack/observability/tempo.yaml +25 -0
  388. package/stack/temporal/local.yaml +44 -0
  389. package/templates/api-auth/AGENTS.md.hbs +16 -0
  390. package/templates/api-auth/Pulumi.dev.yaml.hbs +8 -0
  391. package/templates/api-auth/Pulumi.yaml.hbs +8 -0
  392. package/templates/api-auth/README.md.hbs +67 -0
  393. package/templates/api-auth/api/package.json.hbs +28 -0
  394. package/templates/api-auth/api/src/index.ts.hbs +96 -0
  395. package/templates/api-auth/api/src/schema.ts.hbs +35 -0
  396. package/templates/api-auth/api/src/seed-authz.ts.hbs +48 -0
  397. package/templates/api-auth/api/src/spicedb-http-provider.ts.hbs +89 -0
  398. package/templates/api-auth/index.ts.hbs +65 -0
  399. package/templates/api-auth/package.json.hbs +20 -0
  400. package/templates/api-auth/skills/develop/SKILL.md.hbs +32 -0
  401. package/templates/api-role-gating/AGENTS.md.hbs +20 -0
  402. package/templates/api-role-gating/Pulumi.dev.yaml.hbs +8 -0
  403. package/templates/api-role-gating/Pulumi.yaml.hbs +8 -0
  404. package/templates/api-role-gating/README.md.hbs +64 -0
  405. package/templates/api-role-gating/api/Dockerfile +17 -0
  406. package/templates/api-role-gating/api/package.json.hbs +28 -0
  407. package/templates/api-role-gating/api/src/authn.ts.hbs +29 -0
  408. package/templates/api-role-gating/api/src/authz.ts.hbs +12 -0
  409. package/templates/api-role-gating/api/src/main.ts.hbs +58 -0
  410. package/templates/api-role-gating/api/src/schema.ts.hbs +22 -0
  411. package/templates/api-role-gating/api/tsconfig.json +13 -0
  412. package/templates/api-role-gating/index.ts.hbs +107 -0
  413. package/templates/api-role-gating/package.json.hbs +21 -0
  414. package/templates/api-role-gating/skills/develop/SKILL.md.hbs +60 -0
  415. package/templates/api-role-gating/tsconfig.json +10 -0
  416. package/templates/apps-repo/README.md.hbs +24 -0
  417. package/templates/apps-repo/gitignore +41 -0
  418. package/templates/apps-repo/npmrc.hbs +7 -0
  419. package/templates/apps-repo/package.json.hbs +15 -0
  420. package/templates/apps-repo/pnpm-workspace.yaml +3 -0
  421. package/templates/apps-repo/tsconfig.json +18 -0
  422. package/templates/external-service/AGENTS.md.hbs +20 -0
  423. package/templates/external-service/Pulumi.dev.yaml.hbs +8 -0
  424. package/templates/external-service/Pulumi.yaml.hbs +8 -0
  425. package/templates/external-service/README.md.hbs +56 -0
  426. package/templates/external-service/api/Dockerfile +15 -0
  427. package/templates/external-service/api/package.json.hbs +25 -0
  428. package/templates/external-service/api/src/index.ts.hbs +81 -0
  429. package/templates/external-service/index.ts.hbs +82 -0
  430. package/templates/external-service/mocks/vendorpay/package.json.hbs +9 -0
  431. package/templates/external-service/mocks/vendorpay/server.mjs.hbs +61 -0
  432. package/templates/external-service/package.json.hbs +34 -0
  433. package/templates/external-service/skills/develop/SKILL.md.hbs +55 -0
  434. package/templates/external-service/tsconfig.json +10 -0
  435. package/templates/platform-repo/AGENTS.md.hbs +18 -0
  436. package/templates/platform-repo/README.md.hbs +38 -0
  437. package/templates/platform-repo/core/Pulumi.yaml.hbs +12 -0
  438. package/templates/platform-repo/core/Pulumi.{{tenant}}-{{env}}.yaml.hbs +57 -0
  439. package/templates/platform-repo/core/index.ts +62 -0
  440. package/templates/platform-repo/core/package.json.hbs +22 -0
  441. package/templates/platform-repo/core/tsconfig.json +8 -0
  442. package/templates/platform-repo/package.json.hbs +15 -0
  443. package/templates/platform-repo/platform/Pulumi.yaml.hbs +12 -0
  444. package/templates/platform-repo/platform/Pulumi.{{tenant}}-{{env}}.yaml.hbs +59 -0
  445. package/templates/platform-repo/platform/index.ts +95 -0
  446. package/templates/platform-repo/platform/package.json.hbs +26 -0
  447. package/templates/platform-repo/platform/tsconfig.json +8 -0
  448. package/templates/platform-repo/pnpm-workspace.yaml +3 -0
  449. package/templates/workflow/AGENTS.md.hbs +15 -0
  450. package/templates/workflow/Pulumi.dev.yaml.hbs +8 -0
  451. package/templates/workflow/Pulumi.yaml.hbs +8 -0
  452. package/templates/workflow/README.md.hbs +45 -0
  453. package/templates/workflow/api/.dockerignore +4 -0
  454. package/templates/workflow/api/Dockerfile +15 -0
  455. package/templates/{temporal-api-worker → workflow}/api/package.json.hbs +8 -6
  456. package/templates/workflow/api/src/index.ts.hbs +130 -0
  457. package/templates/workflow/api/tsconfig.json +14 -0
  458. package/templates/workflow/index.ts.hbs +67 -0
  459. package/templates/workflow/package.json.hbs +20 -0
  460. package/templates/workflow/skills/develop/SKILL.md.hbs +32 -0
  461. package/templates/workflow/tsconfig.json +10 -0
  462. package/templates/workflow/worker/.dockerignore +4 -0
  463. package/templates/workflow/worker/Dockerfile +13 -0
  464. package/templates/workflow/worker/package.json.hbs +25 -0
  465. package/templates/workflow/worker/src/worker.ts.hbs +24 -0
  466. package/templates/workflow/worker/tsconfig.json +14 -0
  467. package/dist/src/commands/devbox.d.ts +0 -22
  468. package/dist/src/commands/devbox.d.ts.map +0 -1
  469. package/dist/src/commands/devbox.js +0 -463
  470. package/dist/src/commands/devbox.js.map +0 -1
  471. package/templates/api-web-db/api/Dockerfile +0 -16
  472. package/templates/api-web-db/api/package.json.hbs +0 -21
  473. package/templates/api-web-db/api/src/index.ts.hbs +0 -123
  474. package/templates/api-web-db/package.json.hbs +0 -27
  475. package/templates/api-web-db/sst.config.ts.hbs +0 -151
  476. package/templates/api-web-db/web/.dockerignore +0 -3
  477. package/templates/api-web-db/web/Dockerfile +0 -17
  478. package/templates/api-web-db/web/app/lib/db.server.ts +0 -36
  479. package/templates/api-web-db/web/app/root.tsx +0 -29
  480. package/templates/api-web-db/web/app/routes/home.tsx.hbs +0 -114
  481. package/templates/api-web-db/web/app/routes.ts +0 -3
  482. package/templates/api-web-db/web/package.json.hbs +0 -30
  483. package/templates/api-web-db/web/prisma/schema.prisma +0 -25
  484. package/templates/api-web-db/web/prisma.config.ts +0 -18
  485. package/templates/api-web-db/web/react-router.config.ts +0 -5
  486. package/templates/api-web-db/web/tsconfig.json +0 -19
  487. package/templates/api-web-db/web/vite.config.ts +0 -9
  488. package/templates/temporal-api-worker/README.md.hbs +0 -133
  489. package/templates/temporal-api-worker/api/src/index.ts.hbs +0 -145
  490. package/templates/temporal-api-worker/package.json.hbs +0 -29
  491. package/templates/temporal-api-worker/sst.config.ts.hbs +0 -161
  492. package/templates/temporal-api-worker/worker/Dockerfile +0 -11
  493. package/templates/temporal-api-worker/worker/src/bundle-workflows.ts +0 -38
  494. package/templates/temporal-api-worker/worker/src/worker.ts.hbs +0 -93
  495. /package/templates/{temporal-api-worker → api-auth}/api/.dockerignore +0 -0
  496. /package/templates/{temporal-api-worker → api-auth}/api/Dockerfile +0 -0
  497. /package/templates/{temporal-api-worker → api-auth}/api/tsconfig.json +0 -0
  498. /package/templates/{temporal-api-worker → api-auth}/tsconfig.json +0 -0
  499. /package/templates/{temporal-api-worker/worker → api-role-gating/api}/.dockerignore +0 -0
  500. /package/templates/{temporal-api-worker/worker → external-service/api}/tsconfig.json +0 -0
  501. /package/templates/{temporal-api-worker → workflow}/api/src/encryption-codec.ts +0 -0
  502. /package/templates/{temporal-api-worker → workflow}/worker/src/activities.ts.hbs +0 -0
  503. /package/templates/{temporal-api-worker → workflow}/worker/src/encryption-codec.ts +0 -0
  504. /package/templates/{temporal-api-worker → workflow}/worker/src/workflows.ts.hbs +0 -0
@@ -0,0 +1,134 @@
1
+ # Local Hub overlay (`mesh start --with-hub`).
2
+ #
3
+ # Images are built from the published @mesh-tech/hub tarball on first use
4
+ # (see hub-local.ts) — the interim path until the hub pipeline publishes
5
+ # pullable images. Requires one-time registry access (mesh registry login);
6
+ # the core profile stays zero-access without this overlay.
7
+ #
8
+ # The Hub reads the SAME local fabric the apps use: SSM registry via
9
+ # ministack (x-local-aws-env in the base file), the seeded `hub` database,
10
+ # Temporal, SpiceDB — and the local observability backends (Loki logs,
11
+ # Tempo traces, Prometheus metrics via the base file's OTel collector), so
12
+ # the Hub's operational views run the exact hosted code paths. Only the
13
+ # K8s-API views (pod state/metrics) have no local backend.
14
+ #
15
+ # No HUB_TENANT here on purpose: a local platform is a STANDALONE hub, so
16
+ # hub-api resolves the single-tenant conventions ({tenant}-{env}-{app} for
17
+ # K8s + Temporal namespaces) that everything local creates — zero
18
+ # local-vs-hosted translation.
19
+
20
+ services:
21
+ hub-api:
22
+ image: mesh-local-hub-api:${MESH_HUB_VERSION:-latest}
23
+ ports:
24
+ # 4568 host-side: the 3000 range belongs to `mesh dev` app services
25
+ - '4568:3002'
26
+ environment:
27
+ AWS_ENDPOINT_URL: http://ministack:4566
28
+ AWS_REGION: us-east-2
29
+ AWS_ACCESS_KEY_ID: test
30
+ AWS_SECRET_ACCESS_KEY: test
31
+ PORT: 3002
32
+ PULUMI_STATE_BUCKET: mesh-local-artifacts
33
+ DATABASE_URL: postgres://postgres:postgres@database:5432/hub?sslmode=disable
34
+ OPS_DB_HOST: database
35
+ OPS_DB_PORT: 5432
36
+ OPS_DB_NAME: hub
37
+ OPS_DB_USER: postgres
38
+ DATABASE_PASSWORD: postgres
39
+ PGSSLMODE: disable
40
+ TEMPORAL_ADDRESS: temporal:7233
41
+ TEMPORAL_NAMESPACE: local-dev
42
+ TEMPORAL_UI_URL: http://localhost:8233
43
+ LOKI_URL: http://loki:3100
44
+ TEMPO_URL: http://tempo:3200
45
+ PROMETHEUS_URL: http://prometheus:9090
46
+ # The REAL issuer URL (what `mesh login local` tokens carry). Valid
47
+ # inside the container via the Dockerfile's loopback forward to the
48
+ # zitadel service — Zitadel routes by Host header, so the issuer host
49
+ # must be `localhost` everywhere, exactly like the hosted public URL.
50
+ ZITADEL_ISSUER: http://localhost:8080
51
+ SPICEDB_ENDPOINT: spicedb:50051
52
+ SPICEDB_HTTP_ENDPOINT: http://spicedb:8443
53
+ SPICEDB_HTTP_SCHEME: http
54
+ SPICEDB_PRESHARED_KEY: local-dev-key
55
+ CORS_ORIGINS: http://localhost:${MESH_HUB_PORT:-9000}
56
+ MESH_LOCAL: "1"
57
+ depends_on:
58
+ database:
59
+ condition: service_healthy
60
+ ministack:
61
+ condition: service_healthy
62
+ networks:
63
+ - mesh_network
64
+
65
+ hub-ui:
66
+ image: mesh-local-hub-ui:${MESH_HUB_VERSION:-latest}
67
+ environment:
68
+ PORT: 9000
69
+ API_URL: http://hub-api:3002
70
+ # Browser-facing API base (SSR link env is in-network; the browser
71
+ # needs the host-published port).
72
+ PUBLIC_API_URL: http://localhost:4568
73
+ AGENT_API_URL: http://hub-api:3002
74
+ MESH_LOCAL: "1"
75
+ depends_on:
76
+ - hub-api
77
+ networks:
78
+ - mesh_network
79
+
80
+ # oauth2-proxy in front of the Hub UI — the SAME sidecar mesh.apps.Service
81
+ # deploys with `auth.provider: "mesh"` (image + flags mirrored from
82
+ # Service.ts; local deltas: cookie-secure=false because http, in-network
83
+ # upstream instead of localhost, and the roles scope the hub reads).
84
+ # Serves the Hub at http://localhost:9000: unauthenticated browsers land on
85
+ # the local Zitadel login, then get X-Forwarded-Access-Token / -User /
86
+ # -Email + Authorization headers forwarded — exactly like deployed.
87
+ hub-auth:
88
+ # Built locally from stack/hub/Dockerfile.auth (public images only):
89
+ # oauth2-proxy v7.7.1 + the in-container loopback forward that makes the
90
+ # real issuer URL valid here (Zitadel routes by Host header).
91
+ image: mesh-local-hub-auth:v7.7.1-r1
92
+ restart: unless-stopped
93
+ ports:
94
+ # MESH_HUB_PORT lets this Hub run beside another process that owns
95
+ # 9000 (e.g. a hub-ui dev server from a different checkout). The CLI's
96
+ # status probes + Zitadel seeding read the same variable.
97
+ - '${MESH_HUB_PORT:-9000}:4180'
98
+ command:
99
+ - --http-address=0.0.0.0:4180
100
+ - --upstream=http://hub-ui:9000
101
+ - --provider=oidc
102
+ # The ONE issuer URL tokens carry; valid in-container via the
103
+ # baked-in loopback forward.
104
+ - --oidc-issuer-url=http://localhost:8080
105
+ - --scope=openid email profile urn:zitadel:iam:org:project:roles
106
+ - --email-domain=*
107
+ # RP-initiated logout: hub-ui's /logout redirects through
108
+ # /oauth2/sign_out?rd=<issuer end_session>; rd hosts must be
109
+ # whitelisted (same flag the Service sidecar sets in the cloud).
110
+ - --whitelist-domain=localhost:8080
111
+ - --pass-authorization-header=true
112
+ - --pass-access-token=true
113
+ - --pass-user-headers=true
114
+ - --cookie-secure=false
115
+ - --cookie-samesite=lax
116
+ - --cookie-refresh=4h
117
+ - --cookie-expire=12h
118
+ - --skip-jwt-bearer-tokens=true
119
+ - --skip-provider-button=true
120
+ - --silence-ping-logging=true
121
+ - --auth-logging=true
122
+ - --standard-logging=true
123
+ - --redirect-url=http://localhost:${MESH_HUB_PORT:-9000}/oauth2/callback
124
+ environment:
125
+ OAUTH2_PROXY_CLIENT_ID: ${MESH_HUB_OAUTH2_CLIENT_ID:-unseeded}
126
+ OAUTH2_PROXY_CLIENT_SECRET: ${MESH_HUB_OAUTH2_CLIENT_SECRET:-unseeded}
127
+ # Placeholder (raw 32 bytes) keeps the container from crash-looping
128
+ # pre-seed; the CLI always passes the real persisted secret
129
+ # (hub-auth.json).
130
+ OAUTH2_PROXY_COOKIE_SECRET: ${MESH_HUB_OAUTH2_COOKIE_SECRET:-local-dev-placeholder-cookie-32b}
131
+ depends_on:
132
+ - hub-ui
133
+ networks:
134
+ - mesh_network
@@ -0,0 +1,447 @@
1
+ # Mesh full-local platform (`mesh start`).
2
+ #
3
+ # Shipped inside @mesh-tech/mesh-cli so any repo can run the platform locally
4
+ # with only Docker installed — no AWS credentials, no VPN, no Pulumi state.
5
+ # Evolved from tools/local/docker-compose.yml in mesh-platform; every image is
6
+ # pullable (no monorepo build contexts). The codec server and Temporal UI
7
+ # gateway require monorepo image builds and join the stack once their images
8
+ # are published.
9
+ #
10
+ # Discovery fabric: ministack (MIT-licensed AWS emulator) provides SSM
11
+ # Parameter Store + Secrets Manager + S3 so the registry
12
+ # (/mesh-platform/{tenant}/{env}/…) works locally with unchanged code paths —
13
+ # services point at it via the SDK-native AWS_ENDPOINT_URL_* env overrides.
14
+ # `mesh start` seeds tenant `local` / env `dev`.
15
+ #
16
+ # SECURITY: every credential in this stack (postgres/postgres, test/test AWS
17
+ # keys, the Zitadel masterkey, SpiceDB's local-dev-key, permissive CORS) is a
18
+ # LOCAL-ONLY default. Never reuse any of them outside this compose project —
19
+ # deployed platforms mint their own secrets. Data/secret ports are bound to
20
+ # 127.0.0.1 so none of this is reachable from the LAN.
21
+ name: mesh-local
22
+
23
+ # AWS wiring for in-network services (Hub API/worker join the stack once
24
+ # their images are published): merge this anchor into a service's environment
25
+ # and its AWS SDK clients hit the local fabric with zero code changes —
26
+ # AWS_ENDPOINT_URL is the SDK-native endpoint override.
27
+ x-local-aws-env: &local-aws-env
28
+ AWS_ENDPOINT_URL: http://ministack:4566
29
+ AWS_REGION: us-east-2
30
+ AWS_ACCESS_KEY_ID: test
31
+ AWS_SECRET_ACCESS_KEY: test
32
+
33
+ services:
34
+ database:
35
+ image: postgres:17@sha256:a426e44bac0b759c95894d68e1a0ac03ecc20b619f498a91aae373bf06d8508d
36
+ ports:
37
+ - '127.0.0.1:5433:5432'
38
+ environment:
39
+ PGUSER: postgres
40
+ POSTGRES_PASSWORD: postgres
41
+ POSTGRES_DB: temporal
42
+ volumes:
43
+ - postgres_data:/var/lib/postgresql/data
44
+ - ./init:/docker-entrypoint-initdb.d
45
+ networks:
46
+ - mesh_network
47
+ healthcheck:
48
+ # Single-string CMD-SHELL (an array's extra elements are ignored shell
49
+ # positionals) probing over TCP: the entrypoint's temporary initdb-phase
50
+ # server is socket-only, so -h 127.0.0.1 can't go green until the final
51
+ # server is up — after /docker-entrypoint-initdb.d has created the
52
+ # spicedb/app/hub databases spicedb-migrate needs.
53
+ test: ['CMD-SHELL', 'pg_isready -h 127.0.0.1 -d temporal -U postgres']
54
+ interval: '10s'
55
+ timeout: '30s'
56
+ retries: 5
57
+ start_period: '20s'
58
+
59
+ memcached:
60
+ image: memcached:1.6-alpine@sha256:c29847751abb41f4c268c84fb3087fee05d4edcbda44409ccb5086e26148e8a7
61
+ ports:
62
+ - '11211:11211'
63
+ networks:
64
+ - mesh_network
65
+ command: -m 128
66
+ healthcheck:
67
+ test: ['CMD', 'nc', '-z', 'localhost', '11211']
68
+ interval: 30s
69
+ timeout: 5s
70
+ retries: 3
71
+
72
+ elasticsearch:
73
+ image: opensearchproject/opensearch:2.11.1
74
+ ports:
75
+ - '9200:9200'
76
+ environment:
77
+ - cluster.name=temporal-elasticsearch
78
+ - discovery.type=single-node
79
+ - bootstrap.memory_lock=true
80
+ - "OPENSEARCH_JAVA_OPTS=-Xms256m -Xmx256m"
81
+ - DISABLE_INSTALL_DEMO_CONFIG=true
82
+ - DISABLE_SECURITY_PLUGIN=true
83
+ - compatibility.override_main_response_version=true
84
+ ulimits:
85
+ memlock:
86
+ soft: -1
87
+ hard: -1
88
+ volumes:
89
+ - elasticsearch_data:/usr/share/elasticsearch/data
90
+ networks:
91
+ - mesh_network
92
+ healthcheck:
93
+ # URL must be quoted: an unquoted & backgrounds curl and the check
94
+ # always passes, letting Temporal start before OpenSearch is up.
95
+ test: ['CMD-SHELL', 'curl -f "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=10s" || exit 1']
96
+ interval: 30s
97
+ timeout: 10s
98
+ retries: 5
99
+
100
+ temporal:
101
+ image: temporalio/auto-setup:1.28.1
102
+ depends_on:
103
+ database:
104
+ condition: service_healthy
105
+ elasticsearch:
106
+ condition: service_healthy
107
+ environment:
108
+ - DB=postgres12
109
+ - DB_PORT=5432
110
+ - POSTGRES_USER=postgres
111
+ - POSTGRES_PWD=postgres
112
+ - POSTGRES_SEEDS=database
113
+ - DYNAMIC_CONFIG_FILE_PATH=/etc/temporal/config/dynamicconfig/local.yaml
114
+ - TEMPORAL_ADDRESS=temporal:7233
115
+ - TEMPORAL_CLI_ADDRESS=temporal:7233
116
+ - ENABLE_ES=true
117
+ - ES_SEEDS=elasticsearch
118
+ - ES_PORT=9200
119
+ - ES_VERSION=v7
120
+ - ES_VIS_INDEX=temporal_visibility_v1_dev
121
+ ports:
122
+ - '7233:7233'
123
+ volumes:
124
+ # Mount ONLY the dynamic config — mounting over /etc/temporal/config
125
+ # would clobber the auto-setup image's config_template.yaml.
126
+ - ./temporal/local.yaml:/etc/temporal/config/dynamicconfig/local.yaml
127
+ networks:
128
+ - mesh_network
129
+
130
+ temporal-admin-tools:
131
+ image: temporalio/admin-tools:1.13.4
132
+ depends_on:
133
+ - temporal
134
+ environment:
135
+ - TEMPORAL_ADDRESS=temporal:7233
136
+ - TEMPORAL_CLI_ADDRESS=temporal:7233
137
+ networks:
138
+ - mesh_network
139
+ stdin_open: true
140
+ tty: true
141
+
142
+ temporal-ui:
143
+ image: temporalio/ui:2.16.2
144
+ depends_on:
145
+ - temporal
146
+ environment:
147
+ - TEMPORAL_ADDRESS=temporal:7233
148
+ - TEMPORAL_CORS_ORIGINS=http://localhost:3000,http://localhost:8233,http://localhost:8080
149
+ # Land on the seeded local tenant namespace ({tenant}-{env}).
150
+ - TEMPORAL_DEFAULT_NAMESPACE=local-dev
151
+ # Auth comes back with the seeded local Zitadel (mesh start seeds an
152
+ # org + CLI app + test users in a follow-up; until then the UI is open).
153
+ - TEMPORAL_AUTH_ENABLED=false
154
+ ports:
155
+ # 8233 = Temporal's conventional dev-UI port. Deliberately NOT 8081:
156
+ # the legacy tools/local stack serves its UI there, and a shared origin
157
+ # means shared browser localStorage — the UI would auto-redirect to
158
+ # namespaces remembered from the old stack ("namespace not found").
159
+ - '8233:8080'
160
+ networks:
161
+ - mesh_network
162
+
163
+ # Zitadel Database
164
+ zitadel-db:
165
+ image: postgres:17@sha256:a426e44bac0b759c95894d68e1a0ac03ecc20b619f498a91aae373bf06d8508d
166
+ ports:
167
+ - '127.0.0.1:5435:5432'
168
+ environment:
169
+ POSTGRES_USER: postgres
170
+ POSTGRES_PASSWORD: postgres
171
+ POSTGRES_DB: zitadel
172
+ volumes:
173
+ - zitadel_postgres_data:/var/lib/postgresql/data
174
+ networks:
175
+ - mesh_network
176
+ healthcheck:
177
+ # -h 127.0.0.1 (TCP) so the socket-only initdb-phase server can't
178
+ # satisfy the probe before first-boot init completes.
179
+ test: ['CMD-SHELL', 'pg_isready -h 127.0.0.1 -d zitadel -U postgres']
180
+ interval: '10s'
181
+ timeout: '30s'
182
+ retries: 5
183
+ start_period: '20s'
184
+
185
+ # One-shot: the machinekey volume must be writable by the zitadel user
186
+ # (uid 1000 — the image runs non-root and a fresh named volume is
187
+ # root-owned; the first-instance PAT write fails otherwise).
188
+ zitadel-machinekey-init:
189
+ image: busybox:1.36
190
+ command: chown -R 1000:1000 /machinekey
191
+ restart: 'no'
192
+ volumes:
193
+ - zitadel_machinekey:/machinekey
194
+ networks:
195
+ - mesh_network
196
+
197
+ # Zitadel Identity Server — v4 to match the cloud (approved tenant-auth
198
+ # pattern spec item 7: v4's no-role-claims machine tokens make version
199
+ # parity matter for auth testing).
200
+ zitadel:
201
+ image: ghcr.io/zitadel/zitadel:v4.15.3
202
+ depends_on:
203
+ zitadel-db:
204
+ condition: 'service_healthy'
205
+ zitadel-machinekey-init:
206
+ condition: 'service_completed_successfully'
207
+ ports:
208
+ - '127.0.0.1:8080:8080'
209
+ environment:
210
+ ZITADEL_DATABASE_POSTGRES_HOST: zitadel-db
211
+ ZITADEL_DATABASE_POSTGRES_PORT: 5432
212
+ ZITADEL_DATABASE_POSTGRES_DATABASE: zitadel
213
+ ZITADEL_DATABASE_POSTGRES_USER_USERNAME: zitadel
214
+ ZITADEL_DATABASE_POSTGRES_USER_PASSWORD: zitadel
215
+ ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE: disable
216
+ ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME: postgres
217
+ ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD: postgres
218
+ ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE: disable
219
+ ZITADEL_EXTERNALSECURE: false
220
+ ZITADEL_EXTERNALDOMAIN: localhost
221
+ ZITADEL_EXTERNALPORT: 8080
222
+ ZITADEL_HTTP_CORS_ALLOWORIGIN: "*"
223
+ ZITADEL_HTTP_CORS_ALLOWHEADERS: "*"
224
+ ZITADEL_HTTP_CORS_ALLOWMETHODS: "*"
225
+ ZITADEL_HTTP_CORS_ALLOWCREDENTIALS: true
226
+ ZITADEL_HTTP_CSRF_DISABLED: true
227
+ # v4 defaults new instances to the login-v2 UI, which is a SEPARATE
228
+ # container this stack doesn't run — without this, the authorize flow
229
+ # redirects to /ui/v2/login and dead-ends. Keep the built-in v1 login.
230
+ # (The seeder also flips the instance feature via API, belt-and-braces.)
231
+ ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED: false
232
+ # Platform org (approved Zitadel tenant-auth pattern): `mesh` is the
233
+ # home of platform-layer creds (mesh-cli project, test users; Hub when
234
+ # its images land) — same org name as the cloud platform tenant. App
235
+ # tenants get their own orgs, auto-created by `mesh dev --local`
236
+ # (ZitadelTenantIdentity parity); an app with no `mesh:tenant` config
237
+ # lands in the default app-tenant org `local`.
238
+ ZITADEL_FIRSTINSTANCE_ORG_NAME: mesh
239
+ ZITADEL_FIRSTINSTANCE_ORG_HUMAN_USERNAME: admin@local.mesh
240
+ ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORD: LocalDev1!
241
+ ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORDCHANGEREQUIRED: false
242
+ # Bootstrap machine user for the `mesh start` seeder: its PAT lands on
243
+ # the machinekey volume and the CLI reads it (docker compose cp) to
244
+ # create the Platform project, Mesh CLI OIDC app, and test users.
245
+ # First-instance settings only apply on the FIRST init — a pre-existing
246
+ # zitadel volume needs `mesh stop --destroy` to pick this up.
247
+ ZITADEL_FIRSTINSTANCE_ORG_MACHINE_MACHINE_USERNAME: local-seeder
248
+ ZITADEL_FIRSTINSTANCE_ORG_MACHINE_MACHINE_NAME: Local Seeder
249
+ ZITADEL_FIRSTINSTANCE_ORG_MACHINE_PAT_EXPIRATIONDATE: '2099-01-01T00:00:00Z'
250
+ ZITADEL_FIRSTINSTANCE_PATPATH: /machinekey/pat.txt
251
+ command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode disabled --init-projections=true'
252
+ volumes:
253
+ - zitadel_machinekey:/machinekey
254
+ networks:
255
+ - mesh_network
256
+
257
+ # SpiceDB migration (runs to completion before spicedb serves)
258
+ spicedb-migrate:
259
+ image: authzed/spicedb:v1.42.1
260
+ command: datastore migrate head
261
+ restart: 'no'
262
+ depends_on:
263
+ database:
264
+ condition: service_healthy
265
+ environment:
266
+ SPICEDB_DATASTORE_ENGINE: postgres
267
+ SPICEDB_DATASTORE_CONN_URI: postgres://postgres:postgres@database:5432/spicedb?sslmode=disable
268
+ networks:
269
+ - mesh_network
270
+
271
+ # SpiceDB authorization engine
272
+ spicedb:
273
+ image: authzed/spicedb:v1.42.1
274
+ command: serve
275
+ depends_on:
276
+ spicedb-migrate:
277
+ condition: service_completed_successfully
278
+ environment:
279
+ SPICEDB_GRPC_PRESHARED_KEY: local-dev-key
280
+ SPICEDB_DATASTORE_ENGINE: postgres
281
+ SPICEDB_DATASTORE_CONN_URI: postgres://postgres:postgres@database:5432/spicedb?sslmode=disable
282
+ SPICEDB_HTTP_ENABLED: true
283
+ ports:
284
+ - '127.0.0.1:50051:50051'
285
+ - '127.0.0.1:8443:8443'
286
+ networks:
287
+ - mesh_network
288
+ healthcheck:
289
+ test: ['CMD', 'grpc_health_probe', '-addr=localhost:50051']
290
+ interval: 10s
291
+ timeout: 5s
292
+ retries: 5
293
+ start_period: 10s
294
+
295
+ # ministack — the local AWS fabric (SSM Parameter Store + Secrets Manager +
296
+ # S3, all services on one port). MIT-licensed LocalStack replacement (design
297
+ # §2.5). Point AWS SDK clients at it via AWS_ENDPOINT_URL=http://localhost:4566.
298
+ #
299
+ # State persists across restarts (PERSIST_STATE saves to the volume on
300
+ # graceful shutdown, reloads on boot): the registry and app secrets that
301
+ # `mesh dev` provisions live ONLY here, so without this a Docker Desktop
302
+ # restart silently wiped every provisioned app while its services kept
303
+ # running stale. `mesh start` still re-seeds platform state idempotently;
304
+ # `mesh stop --destroy` removes the volume like every other data volume.
305
+ ministack:
306
+ image: ministackorg/ministack:1.4.1
307
+ ports:
308
+ - '127.0.0.1:4566:4566'
309
+ environment:
310
+ MINISTACK_REGION: us-east-2
311
+ PERSIST_STATE: '1'
312
+ STATE_DIR: /var/lib/ministack-state
313
+ volumes:
314
+ - ministack_state:/var/lib/ministack-state
315
+ networks:
316
+ - mesh_network
317
+ healthcheck:
318
+ # Pure-Python probe — the ministack image ships no curl/wget.
319
+ test: ['CMD', 'python', '-c', "import urllib.request; urllib.request.urlopen('http://localhost:4566/_ministack/health')"]
320
+ interval: 10s
321
+ timeout: 5s
322
+ retries: 10
323
+ start_period: 5s
324
+
325
+ # StackPort — local AWS console over the ministack fabric (MIT). Browse and
326
+ # inspect the registry (SSM), Secrets Manager, and S3 artifacts visually;
327
+ # E4's terminal complement until the local Hub lands. First consumer of the
328
+ # x-local-aws-env anchor. Host 4567 (container serves on 8080 = Zitadel's
329
+ # host port).
330
+ stackport:
331
+ image: davireis/stackport:0.3.4
332
+ ports:
333
+ - '127.0.0.1:4567:8080'
334
+ environment: *local-aws-env
335
+ depends_on:
336
+ ministack:
337
+ condition: service_healthy
338
+ networks:
339
+ - mesh_network
340
+
341
+ # ── Observability — the SAME backends the hosted platform runs ──────────
342
+ # OTel collector → Loki (logs, OTLP) + Tempo (traces, OTLP gRPC), Prometheus
343
+ # scraping the collector's metrics exporter. hub-api's LOKI_URL / TEMPO_URL /
344
+ # PROMETHEUS_URL point here, so the Hub's logs/traces/metrics views run the
345
+ # exact hosted code paths. `mesh dev --local` service logs are tailed from
346
+ # ${MESH_LOCAL_LOGS} (written via tmux pipe-pane) and labeled with the same
347
+ # k8s_namespace_name/k8s_deployment_name scheme the in-cluster
348
+ # k8sattributes processor produces.
349
+ loki:
350
+ image: grafana/loki:3.4.2
351
+ command: -config.file=/etc/loki/local-config.yaml
352
+ ports:
353
+ - '3100:3100'
354
+ volumes:
355
+ # The image's default local-config keeps all state under /tmp/loki.
356
+ - loki_data:/tmp/loki
357
+ networks:
358
+ - mesh_network
359
+
360
+ tempo:
361
+ image: grafana/tempo:2.7.1
362
+ command: -config.file=/etc/tempo/tempo.yaml
363
+ ports:
364
+ - '3200:3200'
365
+ volumes:
366
+ - ./observability/tempo.yaml:/etc/tempo/tempo.yaml
367
+ - tempo_data:/var/tempo
368
+ networks:
369
+ - mesh_network
370
+
371
+ prometheus:
372
+ image: prom/prometheus:v3.2.1
373
+ ports:
374
+ - '9090:9090'
375
+ volumes:
376
+ - ./observability/prometheus.yml:/etc/prometheus/prometheus.yml
377
+ # External-service probe targets (blackbox file_sd) — written by
378
+ # `mesh dev --externals` / ExternalService wiring, same labels the hosted
379
+ # Probe CRs carry (type/tenant/env/app/external_service).
380
+ - ${MESH_LOCAL_PROBES:-/tmp/mesh-local/probes}:/etc/prometheus/probes
381
+ - prometheus_data:/prometheus
382
+ networks:
383
+ - mesh_network
384
+
385
+ # Blackbox exporter — the same prober the hosted monitoring stack runs for
386
+ # ExternalService health checks; Prometheus drives it via the
387
+ # external-services file_sd job.
388
+ blackbox-exporter:
389
+ image: prom/blackbox-exporter:v0.25.0
390
+ command: --config.file=/etc/blackbox/blackbox.yml
391
+ ports:
392
+ - '9115:9115'
393
+ networks:
394
+ - mesh_network
395
+ volumes:
396
+ # IPv4-pinned http_2xx/tcp_connect modules — host.docker.internal's
397
+ # IPv6 ULA is unreachable from the container network.
398
+ - ./observability/blackbox.yml:/etc/blackbox/blackbox.yml
399
+ extra_hosts:
400
+ # Probe targets run on the HOST (mesh dev services/mocks).
401
+ - 'host.docker.internal:host-gateway'
402
+
403
+ otel-collector:
404
+ image: otel/opentelemetry-collector-contrib:0.121.0
405
+ command: --config=/etc/otelcol/config.yaml
406
+ ports:
407
+ - '4317:4317' # OTLP gRPC (apps: OTEL_EXPORTER_OTLP_ENDPOINT)
408
+ - '4318:4318' # OTLP HTTP
409
+ - '13133:13133' # health_check extension (mesh status probe)
410
+ volumes:
411
+ - ./observability/otel-collector.yaml:/etc/otelcol/config.yaml
412
+ # mesh dev --local writes {namespace}/{service}.log here (the CLI passes
413
+ # MESH_LOCAL_LOGS on every compose call; the fallback keeps raw
414
+ # `docker compose` usable).
415
+ - ${MESH_LOCAL_LOGS:-/tmp/mesh-local/logs}:/var/log/mesh-apps:ro
416
+ depends_on:
417
+ - loki
418
+ - tempo
419
+ networks:
420
+ - mesh_network
421
+ healthcheck:
422
+ test: ['CMD', '/otelcol-contrib', '--version']
423
+ interval: 30s
424
+ timeout: 5s
425
+ retries: 3
426
+
427
+ volumes:
428
+ postgres_data:
429
+ driver: local
430
+ ministack_state:
431
+ driver: local
432
+ elasticsearch_data:
433
+ driver: local
434
+ zitadel_postgres_data:
435
+ driver: local
436
+ zitadel_machinekey:
437
+ driver: local
438
+ loki_data:
439
+ driver: local
440
+ tempo_data:
441
+ driver: local
442
+ prometheus_data:
443
+ driver: local
444
+
445
+ networks:
446
+ mesh_network:
447
+ driver: bridge
@@ -0,0 +1,18 @@
1
+ # Local Hub API — built from the published @mesh-tech/hub tarball (interim
2
+ # until the hub pipeline publishes container images; design §11 risk).
3
+ # Build context = the extracted tarball; the CodeArtifact token comes in as
4
+ # a BuildKit secret so it never lands in a layer.
5
+ FROM node:22-slim@sha256:6c74791e557ce11fc957704f6d4fe134a7bc8d6f5ca4403205b2966bd488f6b3
6
+ # socat backs the in-container http://localhost:8080 → zitadel loopback
7
+ # forward (see CMD): Zitadel routes every request by Host header to the
8
+ # instance whose domain is `localhost`, so the ONE issuer URL that tokens
9
+ # carry must resolve inside this container too — same invariant as hosted,
10
+ # where the public issuer URL is valid everywhere.
11
+ RUN apt-get update && apt-get install -y --no-install-recommends socat && rm -rf /var/lib/apt/lists/*
12
+ WORKDIR /hub/api
13
+ COPY api/package.json ./package.json
14
+ RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm install --omit=dev --no-audit --no-fund
15
+ COPY api/dist ./dist
16
+ ENV PORT=3002
17
+ EXPOSE 3002
18
+ CMD ["sh", "-c", "socat TCP-LISTEN:8080,bind=127.0.0.1,fork,reuseaddr TCP:zitadel:8080 & exec node dist/index.js"]
@@ -0,0 +1,10 @@
1
+ # Local oauth2-proxy for the Hub UI — the hosted auth sidecar (same binary,
2
+ # same version as Service.ts deploys) plus a loopback forward: Zitadel routes
3
+ # every request by Host header, so the ONE issuer URL (http://localhost:8080)
4
+ # must be reachable inside this container too. Public images only — no
5
+ # registry auth needed.
6
+ FROM quay.io/oauth2-proxy/oauth2-proxy:v7.7.1 AS proxy
7
+ FROM alpine:3.21
8
+ RUN apk add --no-cache socat ca-certificates
9
+ COPY --from=proxy /bin/oauth2-proxy /bin/oauth2-proxy
10
+ ENTRYPOINT ["/bin/sh", "-c", "socat TCP-LISTEN:8080,bind=127.0.0.1,fork,reuseaddr TCP:zitadel:8080 & exec /bin/oauth2-proxy \"$@\"", "--"]
@@ -0,0 +1,10 @@
1
+ # Local Hub UI — React Router SSR server from the published @mesh-tech/hub
2
+ # tarball (see Dockerfile.api for the interim-build rationale).
3
+ FROM node:22-slim@sha256:6c74791e557ce11fc957704f6d4fe134a7bc8d6f5ca4403205b2966bd488f6b3
4
+ WORKDIR /hub/ui
5
+ COPY ui/package.json ./package.json
6
+ RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm install --omit=dev --no-audit --no-fund
7
+ COPY ui/build ./build
8
+ ENV PORT=9000
9
+ EXPOSE 9000
10
+ CMD ["node", "build/server.js", "./build/server/index.js"]
@@ -0,0 +1,12 @@
1
+ -- Databases provisioned on first boot of the `mesh start` postgres instance.
2
+ -- (POSTGRES_DB already creates `temporal`; opensearch handles visibility.)
3
+
4
+ -- Application database for `mesh dev` apps
5
+ CREATE DATABASE app;
6
+
7
+ -- SpiceDB datastore (migrated by the spicedb-migrate service)
8
+ CREATE DATABASE spicedb;
9
+
10
+ -- Hub database (permission metadata lives in SpiceDB *and* here — with this
11
+ -- DB and the Hub running, apps deploy locally with no additional services)
12
+ CREATE DATABASE hub;
@@ -0,0 +1,20 @@
1
+ # NOTE: --config.file makes this file REPLACE the image's built-in module set,
2
+ # so every module a probe can select must be defined here (a probe naming a
3
+ # module that isn't in this file fails the scrape). Add new modules below.
4
+ #
5
+ # Local blackbox-exporter modules — same names the scrape config uses, with
6
+ # IPv4 pinned: probe targets are host.docker.internal (mesh dev services /
7
+ # mocks on the host), whose Docker-provided IPv6 ULA is unreachable from the
8
+ # container network, so the default ip6-preferred resolution dials a dead
9
+ # address and every probe reads down.
10
+ modules:
11
+ http_2xx:
12
+ prober: http
13
+ http:
14
+ preferred_ip_protocol: ip4
15
+ ip_protocol_fallback: true
16
+ tcp_connect:
17
+ prober: tcp
18
+ tcp:
19
+ preferred_ip_protocol: ip4
20
+ ip_protocol_fallback: true