thevoidforge 21.0.0

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 (328) hide show
  1. package/dist/scripts/vault-read.d.ts +11 -0
  2. package/dist/scripts/vault-read.js +89 -0
  3. package/dist/scripts/voidforge.d.ts +20 -0
  4. package/dist/scripts/voidforge.js +404 -0
  5. package/dist/tsconfig.tsbuildinfo +1 -0
  6. package/dist/wizard/api/auth.d.ts +5 -0
  7. package/dist/wizard/api/auth.js +133 -0
  8. package/dist/wizard/api/blueprint.d.ts +45 -0
  9. package/dist/wizard/api/blueprint.js +184 -0
  10. package/dist/wizard/api/cloud-providers.d.ts +16 -0
  11. package/dist/wizard/api/cloud-providers.js +363 -0
  12. package/dist/wizard/api/credentials.d.ts +1 -0
  13. package/dist/wizard/api/credentials.js +258 -0
  14. package/dist/wizard/api/danger-room.d.ts +18 -0
  15. package/dist/wizard/api/danger-room.js +401 -0
  16. package/dist/wizard/api/deploy.d.ts +4 -0
  17. package/dist/wizard/api/deploy.js +164 -0
  18. package/dist/wizard/api/prd.d.ts +1 -0
  19. package/dist/wizard/api/prd.js +363 -0
  20. package/dist/wizard/api/project.d.ts +1 -0
  21. package/dist/wizard/api/project.js +239 -0
  22. package/dist/wizard/api/projects.d.ts +6 -0
  23. package/dist/wizard/api/projects.js +648 -0
  24. package/dist/wizard/api/provision.d.ts +4 -0
  25. package/dist/wizard/api/provision.js +535 -0
  26. package/dist/wizard/api/terminal.d.ts +25 -0
  27. package/dist/wizard/api/terminal.js +241 -0
  28. package/dist/wizard/api/users.d.ts +6 -0
  29. package/dist/wizard/api/users.js +244 -0
  30. package/dist/wizard/api/war-room.d.ts +14 -0
  31. package/dist/wizard/api/war-room.js +45 -0
  32. package/dist/wizard/lib/ad-platform-core.d.ts +6 -0
  33. package/dist/wizard/lib/ad-platform-core.js +1 -0
  34. package/dist/wizard/lib/adapters/index.d.ts +52 -0
  35. package/dist/wizard/lib/adapters/index.js +38 -0
  36. package/dist/wizard/lib/adapters/sandbox-bank.d.ts +17 -0
  37. package/dist/wizard/lib/adapters/sandbox-bank.js +77 -0
  38. package/dist/wizard/lib/adapters/sandbox.d.ts +39 -0
  39. package/dist/wizard/lib/adapters/sandbox.js +174 -0
  40. package/dist/wizard/lib/adapters/stripe.d.ts +19 -0
  41. package/dist/wizard/lib/adapters/stripe.js +143 -0
  42. package/dist/wizard/lib/adapters/types.d.ts +9 -0
  43. package/dist/wizard/lib/adapters/types.js +10 -0
  44. package/dist/wizard/lib/agent-memory.d.ts +36 -0
  45. package/dist/wizard/lib/agent-memory.js +114 -0
  46. package/dist/wizard/lib/anomaly-detection.d.ts +59 -0
  47. package/dist/wizard/lib/anomaly-detection.js +122 -0
  48. package/dist/wizard/lib/anthropic.d.ts +21 -0
  49. package/dist/wizard/lib/anthropic.js +105 -0
  50. package/dist/wizard/lib/asset-scanner.d.ts +23 -0
  51. package/dist/wizard/lib/asset-scanner.js +107 -0
  52. package/dist/wizard/lib/audit-log.d.ts +23 -0
  53. package/dist/wizard/lib/audit-log.js +70 -0
  54. package/dist/wizard/lib/autonomy-controller.d.ts +76 -0
  55. package/dist/wizard/lib/autonomy-controller.js +183 -0
  56. package/dist/wizard/lib/body-parser.d.ts +2 -0
  57. package/dist/wizard/lib/body-parser.js +36 -0
  58. package/dist/wizard/lib/build-analytics.d.ts +39 -0
  59. package/dist/wizard/lib/build-analytics.js +91 -0
  60. package/dist/wizard/lib/build-step.d.ts +21 -0
  61. package/dist/wizard/lib/build-step.js +104 -0
  62. package/dist/wizard/lib/campaign-proposer.d.ts +39 -0
  63. package/dist/wizard/lib/campaign-proposer.js +180 -0
  64. package/dist/wizard/lib/campaign-state-machine.d.ts +63 -0
  65. package/dist/wizard/lib/campaign-state-machine.js +114 -0
  66. package/dist/wizard/lib/ci-generator.d.ts +14 -0
  67. package/dist/wizard/lib/ci-generator.js +187 -0
  68. package/dist/wizard/lib/claude-merge.d.ts +38 -0
  69. package/dist/wizard/lib/claude-merge.js +115 -0
  70. package/dist/wizard/lib/codegen/erd-gen.d.ts +16 -0
  71. package/dist/wizard/lib/codegen/erd-gen.js +98 -0
  72. package/dist/wizard/lib/codegen/integrations.d.ts +18 -0
  73. package/dist/wizard/lib/codegen/integrations.js +189 -0
  74. package/dist/wizard/lib/codegen/openapi-gen.d.ts +15 -0
  75. package/dist/wizard/lib/codegen/openapi-gen.js +79 -0
  76. package/dist/wizard/lib/codegen/prisma-types.d.ts +15 -0
  77. package/dist/wizard/lib/codegen/prisma-types.js +44 -0
  78. package/dist/wizard/lib/codegen/seed-gen.d.ts +16 -0
  79. package/dist/wizard/lib/codegen/seed-gen.js +128 -0
  80. package/dist/wizard/lib/compliance.d.ts +51 -0
  81. package/dist/wizard/lib/compliance.js +112 -0
  82. package/dist/wizard/lib/correlation-engine.d.ts +59 -0
  83. package/dist/wizard/lib/correlation-engine.js +151 -0
  84. package/dist/wizard/lib/cost-estimator.d.ts +22 -0
  85. package/dist/wizard/lib/cost-estimator.js +72 -0
  86. package/dist/wizard/lib/cost-tracker.d.ts +27 -0
  87. package/dist/wizard/lib/cost-tracker.js +37 -0
  88. package/dist/wizard/lib/daemon-aggregator.d.ts +71 -0
  89. package/dist/wizard/lib/daemon-aggregator.js +204 -0
  90. package/dist/wizard/lib/daemon-core.d.ts +6 -0
  91. package/dist/wizard/lib/daemon-core.js +5 -0
  92. package/dist/wizard/lib/dashboard-data.d.ts +132 -0
  93. package/dist/wizard/lib/dashboard-data.js +336 -0
  94. package/dist/wizard/lib/dashboard-ws.d.ts +25 -0
  95. package/dist/wizard/lib/dashboard-ws.js +91 -0
  96. package/dist/wizard/lib/deep-current.d.ts +77 -0
  97. package/dist/wizard/lib/deep-current.js +234 -0
  98. package/dist/wizard/lib/deploy-coordinator.d.ts +40 -0
  99. package/dist/wizard/lib/deploy-coordinator.js +86 -0
  100. package/dist/wizard/lib/deploy-log.d.ts +28 -0
  101. package/dist/wizard/lib/deploy-log.js +52 -0
  102. package/dist/wizard/lib/desktop-notify.d.ts +27 -0
  103. package/dist/wizard/lib/desktop-notify.js +98 -0
  104. package/dist/wizard/lib/dns/cloudflare-dns.d.ts +35 -0
  105. package/dist/wizard/lib/dns/cloudflare-dns.js +216 -0
  106. package/dist/wizard/lib/dns/cloudflare-registrar.d.ts +31 -0
  107. package/dist/wizard/lib/dns/cloudflare-registrar.js +148 -0
  108. package/dist/wizard/lib/dns/types.d.ts +22 -0
  109. package/dist/wizard/lib/dns/types.js +4 -0
  110. package/dist/wizard/lib/document-discovery.d.ts +33 -0
  111. package/dist/wizard/lib/document-discovery.js +145 -0
  112. package/dist/wizard/lib/env-validator.d.ts +14 -0
  113. package/dist/wizard/lib/env-validator.js +205 -0
  114. package/dist/wizard/lib/env-writer.d.ts +13 -0
  115. package/dist/wizard/lib/env-writer.js +26 -0
  116. package/dist/wizard/lib/exec.d.ts +30 -0
  117. package/dist/wizard/lib/exec.js +52 -0
  118. package/dist/wizard/lib/experiment.d.ts +70 -0
  119. package/dist/wizard/lib/experiment.js +169 -0
  120. package/dist/wizard/lib/extensions.d.ts +20 -0
  121. package/dist/wizard/lib/extensions.js +183 -0
  122. package/dist/wizard/lib/financial/adapter-factory.d.ts +47 -0
  123. package/dist/wizard/lib/financial/adapter-factory.js +225 -0
  124. package/dist/wizard/lib/financial/billing/base.d.ts +6 -0
  125. package/dist/wizard/lib/financial/billing/base.js +1 -0
  126. package/dist/wizard/lib/financial/billing/google-billing.d.ts +56 -0
  127. package/dist/wizard/lib/financial/billing/google-billing.js +298 -0
  128. package/dist/wizard/lib/financial/billing/meta-billing.d.ts +54 -0
  129. package/dist/wizard/lib/financial/billing/meta-billing.js +243 -0
  130. package/dist/wizard/lib/financial/billing/tiktok-billing.d.ts +54 -0
  131. package/dist/wizard/lib/financial/billing/tiktok-billing.js +260 -0
  132. package/dist/wizard/lib/financial/campaign/base.d.ts +13 -0
  133. package/dist/wizard/lib/financial/campaign/base.js +1 -0
  134. package/dist/wizard/lib/financial/campaign/google-campaign.d.ts +42 -0
  135. package/dist/wizard/lib/financial/campaign/google-campaign.js +388 -0
  136. package/dist/wizard/lib/financial/campaign/meta-campaign.d.ts +41 -0
  137. package/dist/wizard/lib/financial/campaign/meta-campaign.js +311 -0
  138. package/dist/wizard/lib/financial/campaign/sandbox-campaign.d.ts +45 -0
  139. package/dist/wizard/lib/financial/campaign/sandbox-campaign.js +261 -0
  140. package/dist/wizard/lib/financial/campaign/tiktok-campaign.d.ts +40 -0
  141. package/dist/wizard/lib/financial/campaign/tiktok-campaign.js +350 -0
  142. package/dist/wizard/lib/financial/funding-auto.d.ts +44 -0
  143. package/dist/wizard/lib/financial/funding-auto.js +52 -0
  144. package/dist/wizard/lib/financial/funding-policy.d.ts +60 -0
  145. package/dist/wizard/lib/financial/funding-policy.js +179 -0
  146. package/dist/wizard/lib/financial/platform-planner.d.ts +47 -0
  147. package/dist/wizard/lib/financial/platform-planner.js +134 -0
  148. package/dist/wizard/lib/financial/reconciliation-engine.d.ts +78 -0
  149. package/dist/wizard/lib/financial/reconciliation-engine.js +193 -0
  150. package/dist/wizard/lib/financial/registry.d.ts +22 -0
  151. package/dist/wizard/lib/financial/registry.js +26 -0
  152. package/dist/wizard/lib/financial/reporting.d.ts +96 -0
  153. package/dist/wizard/lib/financial/reporting.js +198 -0
  154. package/dist/wizard/lib/financial/stablecoin/base.d.ts +6 -0
  155. package/dist/wizard/lib/financial/stablecoin/base.js +1 -0
  156. package/dist/wizard/lib/financial/stablecoin/circle.d.ts +54 -0
  157. package/dist/wizard/lib/financial/stablecoin/circle.js +367 -0
  158. package/dist/wizard/lib/financial/stablecoin/mercury.d.ts +24 -0
  159. package/dist/wizard/lib/financial/stablecoin/mercury.js +171 -0
  160. package/dist/wizard/lib/financial/stablecoin/sandbox-stablecoin.d.ts +47 -0
  161. package/dist/wizard/lib/financial/stablecoin/sandbox-stablecoin.js +202 -0
  162. package/dist/wizard/lib/financial/treasury-planner.d.ts +52 -0
  163. package/dist/wizard/lib/financial/treasury-planner.js +128 -0
  164. package/dist/wizard/lib/financial-core.d.ts +6 -0
  165. package/dist/wizard/lib/financial-core.js +5 -0
  166. package/dist/wizard/lib/financial-vault.d.ts +34 -0
  167. package/dist/wizard/lib/financial-vault.js +199 -0
  168. package/dist/wizard/lib/frontmatter.d.ts +30 -0
  169. package/dist/wizard/lib/frontmatter.js +96 -0
  170. package/dist/wizard/lib/gap-analysis.d.ts +37 -0
  171. package/dist/wizard/lib/gap-analysis.js +218 -0
  172. package/dist/wizard/lib/github.d.ts +22 -0
  173. package/dist/wizard/lib/github.js +261 -0
  174. package/dist/wizard/lib/headless-deploy.d.ts +14 -0
  175. package/dist/wizard/lib/headless-deploy.js +452 -0
  176. package/dist/wizard/lib/health-monitor.d.ts +15 -0
  177. package/dist/wizard/lib/health-monitor.js +91 -0
  178. package/dist/wizard/lib/health-poller.d.ts +9 -0
  179. package/dist/wizard/lib/health-poller.js +123 -0
  180. package/dist/wizard/lib/heartbeat.d.ts +15 -0
  181. package/dist/wizard/lib/heartbeat.js +827 -0
  182. package/dist/wizard/lib/http-helpers.d.ts +9 -0
  183. package/dist/wizard/lib/http-helpers.js +24 -0
  184. package/dist/wizard/lib/image-gen.d.ts +56 -0
  185. package/dist/wizard/lib/image-gen.js +159 -0
  186. package/dist/wizard/lib/instance-sizing.d.ts +26 -0
  187. package/dist/wizard/lib/instance-sizing.js +51 -0
  188. package/dist/wizard/lib/kongo/analytics.d.ts +29 -0
  189. package/dist/wizard/lib/kongo/analytics.js +179 -0
  190. package/dist/wizard/lib/kongo/campaigns.d.ts +52 -0
  191. package/dist/wizard/lib/kongo/campaigns.js +91 -0
  192. package/dist/wizard/lib/kongo/client.d.ts +58 -0
  193. package/dist/wizard/lib/kongo/client.js +221 -0
  194. package/dist/wizard/lib/kongo/jobs.d.ts +57 -0
  195. package/dist/wizard/lib/kongo/jobs.js +122 -0
  196. package/dist/wizard/lib/kongo/pages.d.ts +60 -0
  197. package/dist/wizard/lib/kongo/pages.js +150 -0
  198. package/dist/wizard/lib/kongo/provisioner.d.ts +64 -0
  199. package/dist/wizard/lib/kongo/provisioner.js +116 -0
  200. package/dist/wizard/lib/kongo/seed.d.ts +49 -0
  201. package/dist/wizard/lib/kongo/seed.js +237 -0
  202. package/dist/wizard/lib/kongo/types.d.ts +323 -0
  203. package/dist/wizard/lib/kongo/types.js +11 -0
  204. package/dist/wizard/lib/kongo/variants.d.ts +57 -0
  205. package/dist/wizard/lib/kongo/variants.js +88 -0
  206. package/dist/wizard/lib/kongo/webhooks.d.ts +41 -0
  207. package/dist/wizard/lib/kongo/webhooks.js +112 -0
  208. package/dist/wizard/lib/marker.d.ts +28 -0
  209. package/dist/wizard/lib/marker.js +79 -0
  210. package/dist/wizard/lib/migrator.d.ts +35 -0
  211. package/dist/wizard/lib/migrator.js +190 -0
  212. package/dist/wizard/lib/natural-language-deploy.d.ts +30 -0
  213. package/dist/wizard/lib/natural-language-deploy.js +186 -0
  214. package/dist/wizard/lib/network.d.ts +22 -0
  215. package/dist/wizard/lib/network.js +72 -0
  216. package/dist/wizard/lib/oauth-core.d.ts +6 -0
  217. package/dist/wizard/lib/oauth-core.js +5 -0
  218. package/dist/wizard/lib/open-browser.d.ts +1 -0
  219. package/dist/wizard/lib/open-browser.js +26 -0
  220. package/dist/wizard/lib/patterns/ad-billing-adapter.d.ts +209 -0
  221. package/dist/wizard/lib/patterns/ad-billing-adapter.js +269 -0
  222. package/dist/wizard/lib/patterns/ad-platform-adapter.d.ts +200 -0
  223. package/dist/wizard/lib/patterns/ad-platform-adapter.js +212 -0
  224. package/dist/wizard/lib/patterns/daemon-process.d.ts +88 -0
  225. package/dist/wizard/lib/patterns/daemon-process.js +271 -0
  226. package/dist/wizard/lib/patterns/financial-transaction.d.ts +161 -0
  227. package/dist/wizard/lib/patterns/financial-transaction.js +132 -0
  228. package/dist/wizard/lib/patterns/funding-plan.d.ts +136 -0
  229. package/dist/wizard/lib/patterns/funding-plan.js +200 -0
  230. package/dist/wizard/lib/patterns/oauth-token-lifecycle.d.ts +94 -0
  231. package/dist/wizard/lib/patterns/oauth-token-lifecycle.js +139 -0
  232. package/dist/wizard/lib/patterns/outbound-rate-limiter.d.ts +67 -0
  233. package/dist/wizard/lib/patterns/outbound-rate-limiter.js +216 -0
  234. package/dist/wizard/lib/patterns/revenue-source-adapter.d.ts +96 -0
  235. package/dist/wizard/lib/patterns/revenue-source-adapter.js +182 -0
  236. package/dist/wizard/lib/patterns/stablecoin-adapter.d.ts +218 -0
  237. package/dist/wizard/lib/patterns/stablecoin-adapter.js +264 -0
  238. package/dist/wizard/lib/prd-validator.d.ts +39 -0
  239. package/dist/wizard/lib/prd-validator.js +137 -0
  240. package/dist/wizard/lib/project-init.d.ts +24 -0
  241. package/dist/wizard/lib/project-init.js +193 -0
  242. package/dist/wizard/lib/project-registry.d.ts +86 -0
  243. package/dist/wizard/lib/project-registry.js +359 -0
  244. package/dist/wizard/lib/provision-manifest.d.ts +44 -0
  245. package/dist/wizard/lib/provision-manifest.js +164 -0
  246. package/dist/wizard/lib/provisioner-registry.d.ts +15 -0
  247. package/dist/wizard/lib/provisioner-registry.js +34 -0
  248. package/dist/wizard/lib/provisioners/aws-vps.d.ts +6 -0
  249. package/dist/wizard/lib/provisioners/aws-vps.js +643 -0
  250. package/dist/wizard/lib/provisioners/cloudflare.d.ts +6 -0
  251. package/dist/wizard/lib/provisioners/cloudflare.js +300 -0
  252. package/dist/wizard/lib/provisioners/docker.d.ts +6 -0
  253. package/dist/wizard/lib/provisioners/docker.js +75 -0
  254. package/dist/wizard/lib/provisioners/http-client.d.ts +20 -0
  255. package/dist/wizard/lib/provisioners/http-client.js +79 -0
  256. package/dist/wizard/lib/provisioners/railway.d.ts +6 -0
  257. package/dist/wizard/lib/provisioners/railway.js +413 -0
  258. package/dist/wizard/lib/provisioners/scripts/caddyfile.d.ts +10 -0
  259. package/dist/wizard/lib/provisioners/scripts/caddyfile.js +54 -0
  260. package/dist/wizard/lib/provisioners/scripts/deploy-vps.d.ts +10 -0
  261. package/dist/wizard/lib/provisioners/scripts/deploy-vps.js +112 -0
  262. package/dist/wizard/lib/provisioners/scripts/docker-compose.d.ts +11 -0
  263. package/dist/wizard/lib/provisioners/scripts/docker-compose.js +91 -0
  264. package/dist/wizard/lib/provisioners/scripts/dockerfile.d.ts +5 -0
  265. package/dist/wizard/lib/provisioners/scripts/dockerfile.js +185 -0
  266. package/dist/wizard/lib/provisioners/scripts/ecosystem-config.d.ts +10 -0
  267. package/dist/wizard/lib/provisioners/scripts/ecosystem-config.js +36 -0
  268. package/dist/wizard/lib/provisioners/scripts/provision-vps.d.ts +14 -0
  269. package/dist/wizard/lib/provisioners/scripts/provision-vps.js +202 -0
  270. package/dist/wizard/lib/provisioners/scripts/rollback-vps.d.ts +10 -0
  271. package/dist/wizard/lib/provisioners/scripts/rollback-vps.js +67 -0
  272. package/dist/wizard/lib/provisioners/self-deploy.d.ts +41 -0
  273. package/dist/wizard/lib/provisioners/self-deploy.js +185 -0
  274. package/dist/wizard/lib/provisioners/static-s3.d.ts +6 -0
  275. package/dist/wizard/lib/provisioners/static-s3.js +235 -0
  276. package/dist/wizard/lib/provisioners/types.d.ts +40 -0
  277. package/dist/wizard/lib/provisioners/types.js +4 -0
  278. package/dist/wizard/lib/provisioners/vercel.d.ts +6 -0
  279. package/dist/wizard/lib/provisioners/vercel.js +287 -0
  280. package/dist/wizard/lib/pty-manager.d.ts +42 -0
  281. package/dist/wizard/lib/pty-manager.js +231 -0
  282. package/dist/wizard/lib/rate-limiter-core.d.ts +5 -0
  283. package/dist/wizard/lib/rate-limiter-core.js +5 -0
  284. package/dist/wizard/lib/reconciliation.d.ts +43 -0
  285. package/dist/wizard/lib/reconciliation.js +173 -0
  286. package/dist/wizard/lib/revenue-types.d.ts +5 -0
  287. package/dist/wizard/lib/revenue-types.js +1 -0
  288. package/dist/wizard/lib/route-optimizer.d.ts +28 -0
  289. package/dist/wizard/lib/route-optimizer.js +93 -0
  290. package/dist/wizard/lib/s3-deploy.d.ts +19 -0
  291. package/dist/wizard/lib/s3-deploy.js +156 -0
  292. package/dist/wizard/lib/safety-tiers.d.ts +76 -0
  293. package/dist/wizard/lib/safety-tiers.js +134 -0
  294. package/dist/wizard/lib/sentry-generator.d.ts +15 -0
  295. package/dist/wizard/lib/sentry-generator.js +116 -0
  296. package/dist/wizard/lib/server-config.d.ts +13 -0
  297. package/dist/wizard/lib/server-config.js +23 -0
  298. package/dist/wizard/lib/service-install.d.ts +18 -0
  299. package/dist/wizard/lib/service-install.js +182 -0
  300. package/dist/wizard/lib/site-scanner.d.ts +80 -0
  301. package/dist/wizard/lib/site-scanner.js +262 -0
  302. package/dist/wizard/lib/ssh-deploy.d.ts +25 -0
  303. package/dist/wizard/lib/ssh-deploy.js +225 -0
  304. package/dist/wizard/lib/templates.d.ts +24 -0
  305. package/dist/wizard/lib/templates.js +219 -0
  306. package/dist/wizard/lib/totp.d.ts +35 -0
  307. package/dist/wizard/lib/totp.js +276 -0
  308. package/dist/wizard/lib/tower-auth.d.ts +43 -0
  309. package/dist/wizard/lib/tower-auth.js +352 -0
  310. package/dist/wizard/lib/tower-rate-limit.d.ts +14 -0
  311. package/dist/wizard/lib/tower-rate-limit.js +61 -0
  312. package/dist/wizard/lib/tower-session.d.ts +28 -0
  313. package/dist/wizard/lib/tower-session.js +119 -0
  314. package/dist/wizard/lib/treasury-backup.d.ts +23 -0
  315. package/dist/wizard/lib/treasury-backup.js +126 -0
  316. package/dist/wizard/lib/treasury-heartbeat.d.ts +82 -0
  317. package/dist/wizard/lib/treasury-heartbeat.js +1104 -0
  318. package/dist/wizard/lib/updater.d.ts +29 -0
  319. package/dist/wizard/lib/updater.js +190 -0
  320. package/dist/wizard/lib/user-manager.d.ts +39 -0
  321. package/dist/wizard/lib/user-manager.js +182 -0
  322. package/dist/wizard/lib/vault.d.ts +26 -0
  323. package/dist/wizard/lib/vault.js +161 -0
  324. package/dist/wizard/router.d.ts +5 -0
  325. package/dist/wizard/router.js +15 -0
  326. package/dist/wizard/server.d.ts +18 -0
  327. package/dist/wizard/server.js +436 -0
  328. package/package.json +59 -0
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env npx tsx
2
+ /**
3
+ * Standalone vault reader — read a single key from the encrypted vault.
4
+ *
5
+ * Usage:
6
+ * npx tsx scripts/vault-read.ts --key "env:WHATSAPP_ACCESS_TOKEN"
7
+ * npx tsx scripts/vault-read.ts --list
8
+ *
9
+ * For non-interactive use (CI/CD), set VOIDFORGE_VAULT_PASSWORD env var.
10
+ */
11
+ export {};
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env npx tsx
2
+ /**
3
+ * Standalone vault reader — read a single key from the encrypted vault.
4
+ *
5
+ * Usage:
6
+ * npx tsx scripts/vault-read.ts --key "env:WHATSAPP_ACCESS_TOKEN"
7
+ * npx tsx scripts/vault-read.ts --list
8
+ *
9
+ * For non-interactive use (CI/CD), set VOIDFORGE_VAULT_PASSWORD env var.
10
+ */
11
+ import { createInterface } from 'node:readline';
12
+ import { vaultExists, vaultUnlock, vaultGet, vaultKeys } from '../wizard/lib/vault.js';
13
+ const args = process.argv.slice(2);
14
+ const keyFlag = args.find((_, i) => args[i - 1] === '--key');
15
+ const listMode = args.includes('--list');
16
+ if (!keyFlag && !listMode) {
17
+ console.log('Usage:');
18
+ console.log(' npx tsx scripts/vault-read.ts --key "env:WHATSAPP_ACCESS_TOKEN"');
19
+ console.log(' npx tsx scripts/vault-read.ts --list');
20
+ console.log('');
21
+ console.log('Set VOIDFORGE_VAULT_PASSWORD env var for non-interactive use.');
22
+ process.exit(1);
23
+ }
24
+ if (!vaultExists()) {
25
+ console.error('No vault found at ~/.voidforge/vault.enc');
26
+ process.exit(1);
27
+ }
28
+ async function getPassword() {
29
+ const envPassword = process.env['VOIDFORGE_VAULT_PASSWORD'];
30
+ if (envPassword)
31
+ return envPassword;
32
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
33
+ return new Promise((resolve) => {
34
+ process.stdout.write('Vault password: ');
35
+ const stdin = process.stdin;
36
+ const wasRaw = stdin.isRaw;
37
+ if (stdin.isTTY && stdin.setRawMode) {
38
+ stdin.setRawMode(true);
39
+ }
40
+ let password = '';
41
+ const onData = (ch) => {
42
+ const c = ch.toString();
43
+ if (c === '\n' || c === '\r') {
44
+ stdin.removeListener('data', onData);
45
+ if (stdin.isTTY && stdin.setRawMode)
46
+ stdin.setRawMode(wasRaw ?? false);
47
+ process.stdout.write('\n');
48
+ rl.close();
49
+ resolve(password);
50
+ }
51
+ else if (c === '\u007f' || c === '\b') {
52
+ password = password.slice(0, -1);
53
+ }
54
+ else if (c === '\u0003') {
55
+ process.exit(1);
56
+ }
57
+ else {
58
+ password += c;
59
+ }
60
+ };
61
+ stdin.on('data', onData);
62
+ });
63
+ }
64
+ async function main() {
65
+ const password = await getPassword();
66
+ const valid = await vaultUnlock(password);
67
+ if (!valid) {
68
+ console.error('Wrong vault password');
69
+ process.exit(1);
70
+ }
71
+ if (listMode) {
72
+ const keys = await vaultKeys(password);
73
+ for (const key of keys) {
74
+ console.log(key);
75
+ }
76
+ return;
77
+ }
78
+ const value = await vaultGet(password, keyFlag);
79
+ if (value === null) {
80
+ console.error(`Key not found: ${keyFlag}`);
81
+ process.exit(1);
82
+ }
83
+ // Output value only — suitable for piping
84
+ process.stdout.write(value);
85
+ }
86
+ main().catch((err) => {
87
+ console.error(err.message);
88
+ process.exit(1);
89
+ });
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env npx tsx
2
+ /**
3
+ * VoidForge CLI — v21.0 The Extraction
4
+ *
5
+ * npx voidforge Launch wizard (browser UI at :3141)
6
+ * npx voidforge init Create new project (Gandalf flow)
7
+ * npx voidforge init --headless Create project without browser
8
+ * npx voidforge init --core Minimal methodology (no Holocron, no patterns)
9
+ * npx voidforge update Update project methodology (Bombadil)
10
+ * npx voidforge update --self Update the wizard itself
11
+ * npx voidforge update --extensions Update all installed extensions
12
+ * npx voidforge install <ext> Add extension to current project
13
+ * npx voidforge uninstall <ext> Remove extension from current project
14
+ * npx voidforge deploy Deploy project (Haku)
15
+ * npx voidforge doctor Check versions, compatibility, health
16
+ * npx voidforge migrate Migrate old-model project to v21.0
17
+ * npx voidforge version Show wizard + methodology versions
18
+ * npx voidforge templates List available project templates
19
+ */
20
+ export {};
@@ -0,0 +1,404 @@
1
+ #!/usr/bin/env npx tsx
2
+ /**
3
+ * VoidForge CLI — v21.0 The Extraction
4
+ *
5
+ * npx voidforge Launch wizard (browser UI at :3141)
6
+ * npx voidforge init Create new project (Gandalf flow)
7
+ * npx voidforge init --headless Create project without browser
8
+ * npx voidforge init --core Minimal methodology (no Holocron, no patterns)
9
+ * npx voidforge update Update project methodology (Bombadil)
10
+ * npx voidforge update --self Update the wizard itself
11
+ * npx voidforge update --extensions Update all installed extensions
12
+ * npx voidforge install <ext> Add extension to current project
13
+ * npx voidforge uninstall <ext> Remove extension from current project
14
+ * npx voidforge deploy Deploy project (Haku)
15
+ * npx voidforge doctor Check versions, compatibility, health
16
+ * npx voidforge migrate Migrate old-model project to v21.0
17
+ * npx voidforge version Show wizard + methodology versions
18
+ * npx voidforge templates List available project templates
19
+ */
20
+ import { existsSync } from 'node:fs';
21
+ import { readFile } from 'node:fs/promises';
22
+ import { join, resolve } from 'node:path';
23
+ const args = process.argv.slice(2);
24
+ const command = args[0];
25
+ // ── Version ──────────────────────────────────────────────
26
+ async function getPackageVersion() {
27
+ const dir = import.meta.dirname ?? new URL('.', import.meta.url).pathname;
28
+ // Try ../package.json (dev: scripts/) then ../../package.json (dist: dist/scripts/)
29
+ for (const rel of ['..', '../..']) {
30
+ const pkgPath = resolve(dir, rel, 'package.json');
31
+ try {
32
+ const raw = await readFile(pkgPath, 'utf-8');
33
+ const pkg = JSON.parse(raw);
34
+ if (pkg.name === 'voidforge' && pkg.version)
35
+ return pkg.version;
36
+ }
37
+ catch {
38
+ continue;
39
+ }
40
+ }
41
+ return 'unknown';
42
+ }
43
+ // ── Commands ─────────────────────────────────────────────
44
+ async function cmdVersion() {
45
+ const ver = await getPackageVersion();
46
+ const nodeVer = process.version;
47
+ console.log(`VoidForge v${ver}`);
48
+ console.log(`Methodology v${ver}`);
49
+ console.log(`Node ${nodeVer}`);
50
+ }
51
+ async function cmdDoctor() {
52
+ const ver = await getPackageVersion();
53
+ const nodeVer = process.version;
54
+ const nodeMajor = parseInt(nodeVer.slice(1), 10);
55
+ const { findProjectRoot, getGlobalDir, getVaultPath, readMarker } = await import('../wizard/lib/marker.js');
56
+ const { readRegistry } = await import('../wizard/lib/project-registry.js');
57
+ console.log('\nVoidForge Doctor\n');
58
+ // Node.js check
59
+ const nodeOk = nodeMajor >= 20 && nodeMajor < 25;
60
+ console.log(`${nodeOk ? '✓' : '✗'} Node.js ${nodeVer} (required: >=20.11.0 <25.0.0)`);
61
+ // Wizard install
62
+ console.log(`✓ Wizard v${ver}`);
63
+ // Global config
64
+ const globalDir = getGlobalDir();
65
+ const globalExists = existsSync(globalDir);
66
+ console.log(`${globalExists ? '✓' : '✗'} Global config at ${globalDir}`);
67
+ if (globalExists) {
68
+ const vaultExists = existsSync(getVaultPath());
69
+ console.log(` - Vault: ${vaultExists ? '✓ (encrypted)' : '✗ not found'}`);
70
+ const projects = await readRegistry();
71
+ console.log(` - Projects: ${projects.length} registered`);
72
+ }
73
+ // Current project
74
+ const projectRoot = findProjectRoot();
75
+ if (projectRoot) {
76
+ const marker = await readMarker(projectRoot);
77
+ console.log(`✓ Current project: ${projectRoot}`);
78
+ if (marker) {
79
+ console.log(` - Marker: v${marker.version} (${marker.tier})`);
80
+ if (marker.extensions.length > 0) {
81
+ console.log(` - Extensions: ${marker.extensions.join(', ')}`);
82
+ }
83
+ }
84
+ }
85
+ else {
86
+ console.log('— No VoidForge project detected in current directory tree');
87
+ }
88
+ console.log('');
89
+ }
90
+ async function cmdTemplates() {
91
+ const { listTemplates } = await import('../wizard/lib/templates.js');
92
+ console.log('\nVoidForge Project Templates\n');
93
+ for (const t of listTemplates()) {
94
+ console.log(` ${t.id.padEnd(12)} ${t.name}`);
95
+ console.log(` ${''.padEnd(12)} ${t.description}\n`);
96
+ }
97
+ console.log('Usage: npx voidforge init --template <id>\n');
98
+ }
99
+ async function cmdDeploy() {
100
+ const isHeadless = args.includes('--headless');
101
+ const isSelfDeploy = args.includes('--self');
102
+ const isEnvOnly = args.includes('--env-only');
103
+ const projectDirFlag = args.find((a, i) => args[i - 1] === '--dir');
104
+ const hostFlag = args.find((a, i) => args[i - 1] === '--host');
105
+ if (isEnvOnly) {
106
+ const { envOnlyDeploy } = await import('../wizard/lib/headless-deploy.js');
107
+ await envOnlyDeploy(projectDirFlag);
108
+ }
109
+ else if (isSelfDeploy) {
110
+ const { generateCaddyTemplate } = await import('../wizard/lib/provisioners/self-deploy.js');
111
+ const domain = hostFlag ?? 'forge.yourdomain.com';
112
+ console.log('\nVoidForge Self-Deploy\n');
113
+ console.log('Generate the Caddy config and provision script with:');
114
+ console.log(' npx voidforge deploy --self --host forge.yourdomain.com\n');
115
+ console.log('Caddy template:\n');
116
+ console.log(generateCaddyTemplate(domain));
117
+ }
118
+ else if (isHeadless) {
119
+ const { headlessDeploy } = await import('../wizard/lib/headless-deploy.js');
120
+ await headlessDeploy(projectDirFlag);
121
+ }
122
+ else {
123
+ await launchWizard('deploy');
124
+ }
125
+ }
126
+ async function launchWizard(mode = 'init') {
127
+ const port = parseInt(process.env['VOIDFORGE_PORT'] ?? '3141', 10);
128
+ const isRemote = args.includes('--remote');
129
+ const isLan = args.includes('--lan');
130
+ const hostFlag = args.find((a, i) => args[i - 1] === '--host');
131
+ const wizardNames = {
132
+ init: { name: 'Gandalf', path: '/' },
133
+ deploy: { name: 'Haku', path: '/deploy.html' },
134
+ };
135
+ const wizard = wizardNames[mode];
136
+ const { startServer } = await import('../wizard/server.js');
137
+ const { openBrowser } = await import('../wizard/lib/open-browser.js');
138
+ const protocol = isRemote ? 'https' : 'http';
139
+ const host = isRemote ? (hostFlag ?? 'localhost') : 'localhost';
140
+ const url = `${protocol}://${host}:${port}${wizard.path}`;
141
+ const modeLabel = isRemote ? ' (Remote Mode)' : isLan ? ' (LAN Mode)' : '';
142
+ console.log('');
143
+ console.log(` VoidForge — ${wizard.name}${modeLabel}`);
144
+ console.log(` Server running at ${url}`);
145
+ if (isLan) {
146
+ console.log(' LAN Mode: Listening on all interfaces (0.0.0.0)');
147
+ console.log(' Access from private network: http://<your-ip>:' + port + wizard.path);
148
+ console.log(' Auth: optional password (no TOTP, no Caddy)');
149
+ }
150
+ if (isRemote)
151
+ console.log(' Authentication: REQUIRED (5-layer security active)');
152
+ console.log(' Press Ctrl+C to stop');
153
+ console.log('');
154
+ const serverOptions = isRemote ? { remote: true, host: hostFlag }
155
+ : isLan ? { lan: true }
156
+ : undefined;
157
+ await startServer(port, serverOptions);
158
+ if (!isRemote && !isLan)
159
+ await openBrowser(url);
160
+ }
161
+ async function cmdInitHeadless() {
162
+ const nameFlag = args.find((a, i) => args[i - 1] === '--name');
163
+ const dirFlag = args.find((a, i) => args[i - 1] === '--dir');
164
+ const onelinerFlag = args.find((a, i) => args[i - 1] === '--oneliner');
165
+ const domainFlag = args.find((a, i) => args[i - 1] === '--domain');
166
+ const repoFlag = args.find((a, i) => args[i - 1] === '--repo');
167
+ const isCore = args.includes('--core');
168
+ if (!nameFlag) {
169
+ console.error('Error: --name is required for headless init.');
170
+ console.error('Usage: npx voidforge init --headless --name "My Project" [--dir path] [--oneliner "..."]');
171
+ process.exit(1);
172
+ }
173
+ const defaultDir = join(process.env['HOME'] ?? process.env['USERPROFILE'] ?? '.', 'Projects', nameFlag.replace(/[^a-zA-Z0-9-_ ]/g, '').replace(/\s+/g, '-').toLowerCase());
174
+ const directory = dirFlag ?? defaultDir;
175
+ const { createProject } = await import('../wizard/lib/project-init.js');
176
+ const result = await createProject({
177
+ name: nameFlag,
178
+ directory,
179
+ oneliner: onelinerFlag,
180
+ domain: domainFlag,
181
+ repoUrl: repoFlag,
182
+ core: isCore,
183
+ });
184
+ console.log('');
185
+ console.log(` VoidForge — Project Created`);
186
+ console.log(` Name: ${nameFlag}`);
187
+ console.log(` Directory: ${result.projectDir}`);
188
+ console.log(` Files: ${result.filesCreated} methodology files`);
189
+ console.log(` Marker: ${result.markerId}`);
190
+ console.log('');
191
+ console.log(' Next: cd into the project and start building with Claude Code.');
192
+ console.log('');
193
+ }
194
+ function showHelp() {
195
+ console.log('VoidForge — From nothing, everything.\n');
196
+ console.log('Usage: npx voidforge <command> [options]\n');
197
+ console.log('Commands:');
198
+ console.log(' (no command) Launch the wizard (browser UI)');
199
+ console.log(' init Create a new project');
200
+ console.log(' update Update project methodology');
201
+ console.log(' update --self Update the wizard itself');
202
+ console.log(' install <ext> Add extension to current project');
203
+ console.log(' uninstall <ext> Remove extension from current project');
204
+ console.log(' deploy Deploy project');
205
+ console.log(' migrate Migrate v20.x project to v21.0');
206
+ console.log(' doctor Check versions, compatibility, health');
207
+ console.log(' version Show version information');
208
+ console.log(' templates List project templates');
209
+ console.log('\nOptions:');
210
+ console.log(' --help, -h Show this help');
211
+ console.log(' --remote Launch in remote mode (0.0.0.0 + auth)');
212
+ console.log(' --lan Launch in LAN mode');
213
+ console.log(' --headless CLI-only (no browser)');
214
+ console.log(' --self Deploy VoidForge itself');
215
+ console.log(' --env-only Write vault credentials to .env');
216
+ console.log('');
217
+ }
218
+ // ── Router ───────────────────────────────────────────────
219
+ async function main() {
220
+ try {
221
+ switch (command) {
222
+ case 'version':
223
+ case '--version':
224
+ case '-v':
225
+ await cmdVersion();
226
+ break;
227
+ case 'doctor':
228
+ await cmdDoctor();
229
+ break;
230
+ case 'templates':
231
+ await cmdTemplates();
232
+ break;
233
+ case 'deploy':
234
+ await cmdDeploy();
235
+ break;
236
+ case 'install': {
237
+ const extName = args[1];
238
+ if (!extName) {
239
+ const { listExtensions } = await import('../wizard/lib/extensions.js');
240
+ console.log('\nAvailable extensions:\n');
241
+ for (const ext of listExtensions()) {
242
+ console.log(` ${ext.name.padEnd(16)} ${ext.description}`);
243
+ }
244
+ console.log('\nUsage: npx voidforge install <extension>\n');
245
+ break;
246
+ }
247
+ const { installExtension } = await import('../wizard/lib/extensions.js');
248
+ const { findProjectRoot } = await import('../wizard/lib/marker.js');
249
+ const projectRoot = findProjectRoot();
250
+ if (!projectRoot) {
251
+ console.error('Not a VoidForge project — run `npx voidforge init` first.');
252
+ process.exit(1);
253
+ }
254
+ const result = await installExtension(projectRoot, extName);
255
+ console.log(`\n Extension "${extName}" installed (${result.filesCreated} files created).\n`);
256
+ break;
257
+ }
258
+ case 'uninstall': {
259
+ const extToRemove = args[1];
260
+ if (!extToRemove) {
261
+ console.error('Usage: npx voidforge uninstall <extension>');
262
+ process.exit(1);
263
+ }
264
+ const { uninstallExtension } = await import('../wizard/lib/extensions.js');
265
+ const { findProjectRoot: findRoot } = await import('../wizard/lib/marker.js');
266
+ const root = findRoot();
267
+ if (!root) {
268
+ console.error('Not a VoidForge project — run `npx voidforge init` first.');
269
+ process.exit(1);
270
+ }
271
+ await uninstallExtension(root, extToRemove);
272
+ console.log(`\n Extension "${extToRemove}" uninstalled.\n`);
273
+ break;
274
+ }
275
+ case 'update': {
276
+ if (args.includes('--self')) {
277
+ const { selfUpdate } = await import('../wizard/lib/updater.js');
278
+ const result = selfUpdate();
279
+ console.log(result.message);
280
+ process.exit(result.success ? 0 : 1);
281
+ }
282
+ if (args.includes('--extensions')) {
283
+ const { readRegistry } = await import('../wizard/lib/project-registry.js');
284
+ const { readMarker: readMkr } = await import('../wizard/lib/marker.js');
285
+ const { getExtension } = await import('../wizard/lib/extensions.js');
286
+ let updated = 0;
287
+ try {
288
+ const projects = await readRegistry();
289
+ for (const p of projects) {
290
+ const marker = await readMkr(p.directory);
291
+ if (!marker || marker.extensions.length === 0)
292
+ continue;
293
+ for (const extName of marker.extensions) {
294
+ const ext = getExtension(extName);
295
+ if (ext) {
296
+ await ext.install(p.directory);
297
+ updated++;
298
+ }
299
+ }
300
+ }
301
+ }
302
+ catch {
303
+ // Registry read failure — non-fatal
304
+ }
305
+ console.log(`\n Extensions updated across ${updated} project(s).\n`);
306
+ break;
307
+ }
308
+ // Methodology update
309
+ const { findProjectRoot: findProjRoot } = await import('../wizard/lib/marker.js');
310
+ const projRoot = findProjRoot();
311
+ if (!projRoot) {
312
+ console.error('Not a VoidForge project — run `npx voidforge init` first.');
313
+ process.exit(1);
314
+ }
315
+ const { diffMethodology, applyUpdate } = await import('../wizard/lib/updater.js');
316
+ const plan = await diffMethodology(projRoot);
317
+ if (plan.added.length === 0 && plan.modified.length === 0) {
318
+ console.log('\n Methodology is up to date. No changes needed.\n');
319
+ break;
320
+ }
321
+ console.log('\n VoidForge Update Plan (Bombadil)\n');
322
+ if (plan.added.length > 0) {
323
+ console.log(` New files (${plan.added.length}):`);
324
+ for (const f of plan.added)
325
+ console.log(` + ${f}`);
326
+ }
327
+ if (plan.modified.length > 0) {
328
+ console.log(` Modified (${plan.modified.length}):`);
329
+ for (const f of plan.modified)
330
+ console.log(` ~ ${f}`);
331
+ }
332
+ if (plan.removed.length > 0) {
333
+ console.log(` Removed upstream (${plan.removed.length}):`);
334
+ for (const f of plan.removed)
335
+ console.log(` - ${f} (kept locally)`);
336
+ }
337
+ console.log(` Unchanged: ${plan.unchanged} files\n`);
338
+ const result = await applyUpdate(projRoot);
339
+ console.log(` Updated to v${result.newVersion}. ${plan.added.length + plan.modified.length} files changed.\n`);
340
+ break;
341
+ }
342
+ case 'migrate': {
343
+ const isDryRun = args.includes('--dry-run');
344
+ const migrateDir = args.find((a, i) => args[i - 1] === '--dir') ?? process.cwd();
345
+ const { detectV20Project, migrateProject } = await import('../wizard/lib/migrator.js');
346
+ const migPlan = await detectV20Project(migrateDir);
347
+ if (!migPlan.hasWizardDir) {
348
+ console.log('\n No wizard/ directory found — this is not a v20.x project.\n');
349
+ break;
350
+ }
351
+ console.log('\n VoidForge v21.0 — Migration\n');
352
+ console.log(' Your project contains an embedded wizard (v20.x model).');
353
+ console.log(' VoidForge now runs as a standalone application.\n');
354
+ console.log(' Plan:');
355
+ console.log(` 1. Backup wizard/ (${migPlan.wizardFileCount} files) to ~/.voidforge/migration-backup/`);
356
+ if (migPlan.voidforgeDeps.length > 0) {
357
+ console.log(` 2. Remove ${migPlan.voidforgeDeps.length} VoidForge deps from package.json`);
358
+ }
359
+ console.log(' 3. Remove wizard/ directory');
360
+ console.log(' 4. Add .voidforge marker file');
361
+ console.log(' 5. Keep all methodology files in place\n');
362
+ if (isDryRun) {
363
+ console.log(' (dry-run — no changes made)\n');
364
+ break;
365
+ }
366
+ const migResult = await migrateProject(migrateDir);
367
+ console.log(` Migration complete.`);
368
+ console.log(` Backup: ${migResult.backupDir}`);
369
+ console.log(` Files removed: ${migResult.wizardFilesRemoved}`);
370
+ if (migResult.depsRemoved.length > 0) {
371
+ console.log(` Deps removed: ${migResult.depsRemoved.join(', ')}`);
372
+ }
373
+ console.log(` Marker created: ${migResult.markerCreated}\n`);
374
+ console.log(' To rollback: restore from the backup directory.\n');
375
+ break;
376
+ }
377
+ case 'init':
378
+ if (args.includes('--headless')) {
379
+ await cmdInitHeadless();
380
+ }
381
+ else {
382
+ await launchWizard('init');
383
+ }
384
+ break;
385
+ case '--help':
386
+ case '-h':
387
+ showHelp();
388
+ break;
389
+ case undefined:
390
+ // No command — launch wizard
391
+ await launchWizard('init');
392
+ break;
393
+ default:
394
+ console.error(`Unknown command: ${command}`);
395
+ showHelp();
396
+ process.exit(1);
397
+ }
398
+ }
399
+ catch (err) {
400
+ console.error('Error:', err.message);
401
+ process.exit(1);
402
+ }
403
+ }
404
+ main();