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,234 @@
1
+ /**
2
+ * Deep Current — Situation Model + Cold Start Intake (v12.0).
3
+ *
4
+ * The Deep Current maintains a persistent situation model that represents
5
+ * the system's understanding of the project at any point in time. The
6
+ * cold start intake classifies new projects and bootstraps the model.
7
+ *
8
+ * PRD Reference: ROADMAP v12.0, docs/methods/DEEP_CURRENT.md
9
+ */
10
+ import { readFile, mkdir, writeFile as writeFileAsync } from 'node:fs/promises';
11
+ import { join } from 'node:path';
12
+ import { existsSync } from 'node:fs';
13
+ import { homedir } from 'node:os';
14
+ import { scanSite, scoreScan } from './site-scanner.js';
15
+ const DEEP_CURRENT_DIR = join(process.cwd(), 'logs', 'deep-current');
16
+ const SITUATION_PATH = join(DEEP_CURRENT_DIR, 'situation.json');
17
+ const PROPOSALS_DIR = join(DEEP_CURRENT_DIR, 'proposals');
18
+ const PREDICTIONS_PATH = join(DEEP_CURRENT_DIR, 'predictions.jsonl');
19
+ const CORRELATIONS_PATH = join(DEEP_CURRENT_DIR, 'correlations.jsonl');
20
+ /**
21
+ * Classify the current project's state by checking for key files and config.
22
+ */
23
+ export async function classifyProject() {
24
+ const cwd = process.cwd();
25
+ // Check for codebase indicators
26
+ const hasCodebase = existsSync(join(cwd, 'package.json')) ||
27
+ existsSync(join(cwd, 'pyproject.toml')) ||
28
+ existsSync(join(cwd, 'Gemfile')) ||
29
+ existsSync(join(cwd, 'src')) ||
30
+ existsSync(join(cwd, 'app'));
31
+ // Check for PRD
32
+ const hasPrd = existsSync(join(cwd, 'docs', 'PRD.md')) ||
33
+ existsSync(join(cwd, 'PRD.md')) ||
34
+ existsSync(join(cwd, 'PRD-VOIDFORGE.md'));
35
+ // Check for deployment evidence
36
+ const voidforgeDir = join(homedir(), '.voidforge');
37
+ const hasDeployLog = existsSync(join(voidforgeDir, 'deploys'));
38
+ const hasEnv = existsSync(join(cwd, '.env'));
39
+ // Check for analytics/revenue connections
40
+ const treasuryExists = existsSync(join(voidforgeDir, 'treasury', 'vault.enc'));
41
+ const heartbeatExists = existsSync(join(voidforgeDir, 'heartbeat.json'));
42
+ // Read deploy URL if available
43
+ let deployedUrl;
44
+ try {
45
+ const deployLog = await readFile(join(voidforgeDir, 'deploys', 'latest.json'), 'utf-8');
46
+ const data = JSON.parse(deployLog);
47
+ deployedUrl = data.url;
48
+ }
49
+ catch { /* no deploy data */ }
50
+ // Classify
51
+ const isDeployed = hasDeployLog && !!deployedUrl;
52
+ const hasAnalytics = treasuryExists || heartbeatExists;
53
+ const hasRevenue = treasuryExists;
54
+ let state;
55
+ if (!hasCodebase && !hasPrd)
56
+ state = 'GREENFIELD';
57
+ else if (hasPrd && !hasCodebase)
58
+ state = 'IDEA_PRD';
59
+ else if (hasCodebase && !isDeployed)
60
+ state = 'PARTIAL';
61
+ else if (isDeployed && !hasRevenue)
62
+ state = 'DEPLOYED';
63
+ else
64
+ state = 'OPERATING';
65
+ return { state, hasCodebase, hasPrd, isDeployed, hasAnalytics, hasRevenue, deployedUrl };
66
+ }
67
+ function createEmptyModel(projectName, state) {
68
+ const emptyDimension = { score: 0, gaps: ['Not yet analyzed'], lastUpdated: new Date().toISOString() };
69
+ return {
70
+ projectState: state,
71
+ projectName,
72
+ lastScan: new Date().toISOString(),
73
+ dimensions: {
74
+ featureCompleteness: { ...emptyDimension },
75
+ quality: { ...emptyDimension },
76
+ performance: { ...emptyDimension },
77
+ growthReadiness: { ...emptyDimension },
78
+ revenuePotential: { ...emptyDimension },
79
+ },
80
+ campaignHistory: [],
81
+ pendingProposals: [],
82
+ averagePredictionAccuracy: 0,
83
+ autonomyTier: 1,
84
+ };
85
+ }
86
+ // ── Persistence ───────────────────────────────────────
87
+ export async function loadSituation() {
88
+ if (!existsSync(SITUATION_PATH))
89
+ return null;
90
+ try {
91
+ const content = await readFile(SITUATION_PATH, 'utf-8');
92
+ return JSON.parse(content);
93
+ }
94
+ catch {
95
+ return null;
96
+ }
97
+ }
98
+ export async function saveSituation(model) {
99
+ await mkdir(DEEP_CURRENT_DIR, { recursive: true });
100
+ await writeFileAsync(SITUATION_PATH, JSON.stringify(model, null, 2));
101
+ }
102
+ // ── SENSE Step — Update situation model from scans ────
103
+ export async function sense(model) {
104
+ const classification = await classifyProject();
105
+ model.projectState = classification.state;
106
+ model.deployedUrl = classification.deployedUrl;
107
+ model.lastScan = new Date().toISOString();
108
+ // Torres scans the site (if deployed)
109
+ if (classification.deployedUrl) {
110
+ try {
111
+ const scanResult = await scanSite(classification.deployedUrl);
112
+ const scores = scoreScan(scanResult);
113
+ model.lastSiteScan = scanResult;
114
+ // Update dimension scores from scan
115
+ model.dimensions.performance = {
116
+ score: scores.performance,
117
+ gaps: buildPerformanceGaps(scanResult),
118
+ lastUpdated: new Date().toISOString(),
119
+ };
120
+ model.dimensions.growthReadiness = {
121
+ score: scores.growthReadiness,
122
+ gaps: buildGrowthGaps(scanResult),
123
+ lastUpdated: new Date().toISOString(),
124
+ };
125
+ }
126
+ catch (err) {
127
+ // Site scan failure — don't crash, just note it
128
+ model.dimensions.performance.gaps.push(`Site scan failed: ${err.message}`);
129
+ }
130
+ }
131
+ return model;
132
+ }
133
+ // ── Gap Builders ──────────────────────────────────────
134
+ function buildPerformanceGaps(scan) {
135
+ const gaps = [];
136
+ if (scan.performance.ttfbMs && scan.performance.ttfbMs > 800) {
137
+ gaps.push(`TTFB ${scan.performance.ttfbMs}ms exceeds 800ms target`);
138
+ }
139
+ if (!scan.performance.compressed)
140
+ gaps.push('Response not compressed (no gzip/brotli)');
141
+ if (!scan.performance.cacheControl)
142
+ gaps.push('No Cache-Control header');
143
+ if (!scan.security.https)
144
+ gaps.push('Not served over HTTPS');
145
+ return gaps;
146
+ }
147
+ function buildGrowthGaps(scan) {
148
+ const gaps = [];
149
+ if (scan.growth.analyticsDetected.length === 0)
150
+ gaps.push('No analytics detected');
151
+ if (!scan.growth.socialMetaComplete)
152
+ gaps.push('Incomplete social meta (OG/Twitter Card)');
153
+ if (!scan.growth.emailCaptureDetected)
154
+ gaps.push('No email capture form detected');
155
+ if (!scan.seo.sitemapExists)
156
+ gaps.push('No sitemap.xml');
157
+ if (!scan.seo.jsonLd)
158
+ gaps.push('No JSON-LD structured data');
159
+ if (!scan.seo.description)
160
+ gaps.push('Missing meta description');
161
+ if (!scan.growth.cookieConsentDetected && scan.growth.analyticsDetected.length > 0) {
162
+ gaps.push('Analytics present but no cookie consent banner');
163
+ }
164
+ return gaps;
165
+ }
166
+ /**
167
+ * Cold start intake: classify the project, scan if deployed, create situation model.
168
+ * Returns the initial situation and a recommended first action.
169
+ */
170
+ export async function intake(projectName) {
171
+ const classification = await classifyProject();
172
+ const model = createEmptyModel(projectName, classification.state);
173
+ let siteScan;
174
+ // Scan deployed site if available
175
+ if (classification.deployedUrl) {
176
+ try {
177
+ siteScan = await scanSite(classification.deployedUrl);
178
+ const scores = scoreScan(siteScan);
179
+ model.lastSiteScan = siteScan;
180
+ model.dimensions.performance.score = scores.performance;
181
+ model.dimensions.performance.gaps = buildPerformanceGaps(siteScan);
182
+ model.dimensions.growthReadiness.score = scores.growthReadiness;
183
+ model.dimensions.growthReadiness.gaps = buildGrowthGaps(siteScan);
184
+ model.dimensions.performance.lastUpdated = new Date().toISOString();
185
+ model.dimensions.growthReadiness.lastUpdated = new Date().toISOString();
186
+ }
187
+ catch { /* scan failed — continue with empty scores */ }
188
+ }
189
+ model.deployedUrl = classification.deployedUrl;
190
+ // Determine recommended first action based on state
191
+ let recommendedFirstAction;
192
+ switch (classification.state) {
193
+ case 'GREENFIELD':
194
+ recommendedFirstAction = 'Run /prd to create a PRD from your product description, then /campaign to build it.';
195
+ break;
196
+ case 'IDEA_PRD':
197
+ recommendedFirstAction = 'PRD exists. Run /campaign to start building.';
198
+ break;
199
+ case 'PARTIAL':
200
+ recommendedFirstAction = 'Code exists but not deployed. Run /campaign --resume to continue building, then deploy.';
201
+ break;
202
+ case 'DEPLOYED':
203
+ recommendedFirstAction = siteScan
204
+ ? `Site is live. Lowest dimension: ${findLowestDimension(model)}. Run /grow to start growth, or /current to get a full campaign proposal.`
205
+ : 'Site is live. Run /current --scan for a full analysis.';
206
+ break;
207
+ case 'OPERATING':
208
+ recommendedFirstAction = 'Revenue connected. Run /current for a data-driven campaign proposal.';
209
+ break;
210
+ }
211
+ // Save the model
212
+ await saveSituation(model);
213
+ return { classification, situation: model, siteScan, recommendedFirstAction };
214
+ }
215
+ function findLowestDimension(model) {
216
+ const dims = model.dimensions;
217
+ let lowest = 'featureCompleteness';
218
+ let lowestScore = dims.featureCompleteness.score;
219
+ for (const [key, val] of Object.entries(dims)) {
220
+ if (val.score < lowestScore) {
221
+ lowestScore = val.score;
222
+ lowest = key;
223
+ }
224
+ }
225
+ const labels = {
226
+ featureCompleteness: 'Feature Completeness',
227
+ quality: 'Quality',
228
+ performance: 'Performance',
229
+ growthReadiness: 'Growth Readiness',
230
+ revenuePotential: 'Revenue Potential',
231
+ };
232
+ return `${labels[lowest]} (${lowestScore}/100)`;
233
+ }
234
+ export { DEEP_CURRENT_DIR, SITUATION_PATH, PROPOSALS_DIR, PREDICTIONS_PATH, CORRELATIONS_PATH };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Deploy Coordinator — Orchestrates coordinated deploys across linked services.
3
+ *
4
+ * When deploying a linked project, checks if peer services also need redeployment
5
+ * (based on last deploy timestamp vs. last build phase change). Executes deploys
6
+ * in configurable order with per-service confirmation gates.
7
+ */
8
+ export interface DeployCheckResult {
9
+ projectId: string;
10
+ name: string;
11
+ needsDeploy: boolean;
12
+ reason: string;
13
+ lastDeployAt: string;
14
+ lastBuildPhase: number;
15
+ }
16
+ export interface CoordinatedDeployPlan {
17
+ triggerProject: string;
18
+ linkedProjects: DeployCheckResult[];
19
+ totalNeedingDeploy: number;
20
+ }
21
+ /**
22
+ * Check which projects in a linked group need redeployment.
23
+ * A project needs deploy if:
24
+ * - It has never been deployed (lastDeployAt is empty)
25
+ * - Its build phase advanced since the last deploy
26
+ * - It was explicitly marked for deploy
27
+ */
28
+ export declare function checkDeployNeeded(projectId: string): Promise<CoordinatedDeployPlan | null>;
29
+ /**
30
+ * Get a deploy plan for a linked group — returns ordered list of projects
31
+ * that need deployment, with the trigger project first.
32
+ */
33
+ export declare function getDeployPlan(projectId: string, username: string, ip: string): Promise<CoordinatedDeployPlan | null>;
34
+ /**
35
+ * Get linked project summary for a single project (used in Lobby UI).
36
+ */
37
+ export declare function getLinkedSummary(projectId: string): Promise<{
38
+ linkedCount: number;
39
+ linkedNames: string[];
40
+ }>;
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Deploy Coordinator — Orchestrates coordinated deploys across linked services.
3
+ *
4
+ * When deploying a linked project, checks if peer services also need redeployment
5
+ * (based on last deploy timestamp vs. last build phase change). Executes deploys
6
+ * in configurable order with per-service confirmation gates.
7
+ */
8
+ import { getLinkedGroup, getProject } from './project-registry.js';
9
+ import { audit } from './audit-log.js';
10
+ /**
11
+ * Check which projects in a linked group need redeployment.
12
+ * A project needs deploy if:
13
+ * - It has never been deployed (lastDeployAt is empty)
14
+ * - Its build phase advanced since the last deploy
15
+ * - It was explicitly marked for deploy
16
+ */
17
+ export async function checkDeployNeeded(projectId) {
18
+ const group = await getLinkedGroup(projectId);
19
+ if (group.length === 0)
20
+ return null;
21
+ const results = group.map((project) => {
22
+ let needsDeploy = false;
23
+ let reason = 'Up to date';
24
+ if (!project.deployTarget || project.deployTarget === 'unknown') {
25
+ reason = 'No deploy target configured';
26
+ }
27
+ else if (!project.lastDeployAt) {
28
+ needsDeploy = true;
29
+ reason = 'Never deployed';
30
+ }
31
+ else if (project.lastBuildPhase > 0) {
32
+ // Simple heuristic: if there's build activity, may need deploy
33
+ // In a real system, this would compare git SHAs or timestamps
34
+ const deployDate = new Date(project.lastDeployAt).getTime();
35
+ const now = Date.now();
36
+ const hoursSinceDeploy = (now - deployDate) / (1000 * 60 * 60);
37
+ if (hoursSinceDeploy > 24) {
38
+ needsDeploy = true;
39
+ reason = `Last deployed ${Math.floor(hoursSinceDeploy)}h ago`;
40
+ }
41
+ }
42
+ return {
43
+ projectId: project.id,
44
+ name: project.name,
45
+ needsDeploy,
46
+ reason,
47
+ lastDeployAt: project.lastDeployAt,
48
+ lastBuildPhase: project.lastBuildPhase,
49
+ };
50
+ });
51
+ return {
52
+ triggerProject: projectId,
53
+ linkedProjects: results,
54
+ totalNeedingDeploy: results.filter((r) => r.needsDeploy).length,
55
+ };
56
+ }
57
+ /**
58
+ * Get a deploy plan for a linked group — returns ordered list of projects
59
+ * that need deployment, with the trigger project first.
60
+ */
61
+ export async function getDeployPlan(projectId, username, ip) {
62
+ const plan = await checkDeployNeeded(projectId);
63
+ if (!plan)
64
+ return null;
65
+ await audit('deploy', ip, username, {
66
+ action: 'deploy_check',
67
+ projectId,
68
+ linkedCount: plan.linkedProjects.length,
69
+ needingDeploy: plan.totalNeedingDeploy,
70
+ });
71
+ return plan;
72
+ }
73
+ /**
74
+ * Get linked project summary for a single project (used in Lobby UI).
75
+ */
76
+ export async function getLinkedSummary(projectId) {
77
+ const project = await getProject(projectId);
78
+ if (!project || project.linkedProjects.length === 0) {
79
+ return { linkedCount: 0, linkedNames: [] };
80
+ }
81
+ const group = await getLinkedGroup(projectId);
82
+ const linkedNames = group
83
+ .filter((p) => p.id !== projectId)
84
+ .map((p) => p.name);
85
+ return { linkedCount: linkedNames.length, linkedNames };
86
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Structured deploy logging (ADR-021).
3
+ * Persists deploy results to ~/.voidforge/deploys/ for history.
4
+ * No dependencies — pure Node.js stdlib.
5
+ */
6
+ export interface DeployLogEntry {
7
+ runId: string;
8
+ timestamp: string;
9
+ target: string;
10
+ projectName: string;
11
+ framework: string;
12
+ deployUrl: string;
13
+ hostname: string;
14
+ region: string;
15
+ resources: {
16
+ type: string;
17
+ id: string;
18
+ }[];
19
+ outputs: Record<string, string>;
20
+ }
21
+ /**
22
+ * Persist a deploy result to the structured log.
23
+ */
24
+ export declare function logDeploy(entry: DeployLogEntry): Promise<string>;
25
+ /**
26
+ * List recent deploy logs, newest first.
27
+ */
28
+ export declare function listDeploys(limit?: number): Promise<DeployLogEntry[]>;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Structured deploy logging (ADR-021).
3
+ * Persists deploy results to ~/.voidforge/deploys/ for history.
4
+ * No dependencies — pure Node.js stdlib.
5
+ */
6
+ import { writeFile, readdir, readFile, mkdir } from 'node:fs/promises';
7
+ import { join } from 'node:path';
8
+ import { homedir } from 'node:os';
9
+ const DEPLOYS_DIR = join(homedir(), '.voidforge', 'deploys');
10
+ /**
11
+ * Persist a deploy result to the structured log.
12
+ */
13
+ export async function logDeploy(entry) {
14
+ await mkdir(DEPLOYS_DIR, { recursive: true });
15
+ const date = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
16
+ const filename = `${date}-${entry.target}-${entry.runId.slice(0, 8)}.json`;
17
+ const filepath = join(DEPLOYS_DIR, filename);
18
+ await writeFile(filepath, JSON.stringify(entry, null, 2) + '\n', { encoding: 'utf-8', mode: 0o600 });
19
+ return filepath;
20
+ }
21
+ /**
22
+ * List recent deploy logs, newest first.
23
+ */
24
+ export async function listDeploys(limit = 20) {
25
+ let files;
26
+ try {
27
+ files = await readdir(DEPLOYS_DIR);
28
+ }
29
+ catch {
30
+ return []; // Directory doesn't exist yet
31
+ }
32
+ const jsonFiles = files
33
+ .filter(f => f.endsWith('.json'))
34
+ .sort()
35
+ .reverse()
36
+ .slice(0, limit);
37
+ const entries = [];
38
+ for (const file of jsonFiles) {
39
+ try {
40
+ const content = await readFile(join(DEPLOYS_DIR, file), 'utf-8');
41
+ const parsed = JSON.parse(content);
42
+ // Basic validation — ensure required fields exist
43
+ if (parsed.runId && parsed.target && parsed.timestamp) {
44
+ entries.push(parsed);
45
+ }
46
+ }
47
+ catch {
48
+ // Skip corrupt log files
49
+ }
50
+ }
51
+ return entries;
52
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Desktop Notifications — macOS/Linux native notifications for daemon events.
3
+ *
4
+ * Uses osascript on macOS and notify-send on Linux. No dependencies.
5
+ * Notifications are non-blocking and failure-tolerant (notification failure
6
+ * should never crash the daemon).
7
+ *
8
+ * PRD Reference: §9.7 (Danger Room shows warning), v11.3 deliverables
9
+ */
10
+ type NotificationUrgency = 'low' | 'normal' | 'critical';
11
+ interface NotificationOptions {
12
+ title: string;
13
+ message: string;
14
+ urgency?: NotificationUrgency;
15
+ sound?: boolean;
16
+ }
17
+ /**
18
+ * Send a desktop notification. Fails silently — never throws.
19
+ */
20
+ export declare function notify(opts: NotificationOptions): void;
21
+ export declare function notifySpendSpike(platform: string, amount: string): void;
22
+ export declare function notifyCampaignKilled(name: string, reason: string): void;
23
+ export declare function notifyTokenExpiring(platform: string, hoursLeft: number): void;
24
+ export declare function notifyReconciliationDiscrepancy(platform: string, amount: string): void;
25
+ export declare function notifyVaultExpiring(hoursLeft: number): void;
26
+ export declare function notifyRevenueMilestone(amount: string): void;
27
+ export {};
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Desktop Notifications — macOS/Linux native notifications for daemon events.
3
+ *
4
+ * Uses osascript on macOS and notify-send on Linux. No dependencies.
5
+ * Notifications are non-blocking and failure-tolerant (notification failure
6
+ * should never crash the daemon).
7
+ *
8
+ * PRD Reference: §9.7 (Danger Room shows warning), v11.3 deliverables
9
+ */
10
+ import { execFileSync } from 'node:child_process';
11
+ import { platform } from 'node:os';
12
+ /**
13
+ * Send a desktop notification. Fails silently — never throws.
14
+ */
15
+ export function notify(opts) {
16
+ try {
17
+ if (platform() === 'darwin') {
18
+ notifyMacOS(opts);
19
+ }
20
+ else if (platform() === 'linux') {
21
+ notifyLinux(opts);
22
+ }
23
+ // Windows: notifications deferred — WSL2 path recommended
24
+ }
25
+ catch {
26
+ // Notification failure is never fatal
27
+ }
28
+ }
29
+ function notifyMacOS(opts) {
30
+ // SEC-005: Use execFileSync with args array to prevent shell injection
31
+ const sound = opts.sound !== false ? ' sound name "Submarine"' : '';
32
+ const script = `display notification "${sanitize(opts.message)}" with title "VoidForge"${sound} subtitle "${sanitize(opts.title)}"`;
33
+ try {
34
+ execFileSync('osascript', ['-e', script], { timeout: 5000, stdio: 'ignore' });
35
+ }
36
+ catch { /* notification failure is never fatal */ }
37
+ }
38
+ function notifyLinux(opts) {
39
+ // SEC-006: Use execFileSync with args array, validate urgency enum
40
+ const validUrgencies = ['low', 'normal', 'critical'];
41
+ const urgency = validUrgencies.includes(opts.urgency || '') ? opts.urgency : 'normal';
42
+ try {
43
+ execFileSync('notify-send', ['-u', urgency, '-a', 'VoidForge', sanitize(opts.title), sanitize(opts.message)], { timeout: 5000, stdio: 'ignore' });
44
+ }
45
+ catch { /* notification failure is never fatal */ }
46
+ }
47
+ /** Strip characters that could be dangerous in shell/AppleScript contexts */
48
+ function sanitize(input) {
49
+ return input.replace(/[`$\\"\n\r\0]/g, '').slice(0, 200);
50
+ }
51
+ // ── Daemon Event Notifications ────────────────────────
52
+ // Pre-built notifications for common daemon events (§9.20.7 agent voice)
53
+ export function notifySpendSpike(platform, amount) {
54
+ notify({
55
+ title: `Spend Spike — ${platform}`,
56
+ message: `Wax reports: ${platform} spend is ${amount} above average this hour.`,
57
+ urgency: 'critical',
58
+ sound: true,
59
+ });
60
+ }
61
+ export function notifyCampaignKilled(name, reason) {
62
+ notify({
63
+ title: 'Campaign Paused',
64
+ message: `Wax pulled the trigger on "${name}" — ${reason}.`,
65
+ urgency: 'normal',
66
+ });
67
+ }
68
+ export function notifyTokenExpiring(platform, hoursLeft) {
69
+ notify({
70
+ title: `Token Expiring — ${platform}`,
71
+ message: `Breeze warns: ${platform} token expires in ${hoursLeft} hours. Refresh needed.`,
72
+ urgency: hoursLeft < 2 ? 'critical' : 'normal',
73
+ sound: hoursLeft < 2,
74
+ });
75
+ }
76
+ export function notifyReconciliationDiscrepancy(platform, amount) {
77
+ notify({
78
+ title: 'Reconciliation Alert',
79
+ message: `Dockson: Numbers don't match on ${platform} — ${amount} discrepancy.`,
80
+ urgency: 'critical',
81
+ sound: true,
82
+ });
83
+ }
84
+ export function notifyVaultExpiring(hoursLeft) {
85
+ notify({
86
+ title: 'Vault Session Expiring',
87
+ message: `Vault session expires in ${hoursLeft} hour(s). Run \`voidforge heartbeat unlock\` to extend.`,
88
+ urgency: 'critical',
89
+ sound: true,
90
+ });
91
+ }
92
+ export function notifyRevenueMilestone(amount) {
93
+ notify({
94
+ title: 'Revenue Milestone!',
95
+ message: `Dockson: ${amount} total revenue. Every coin has a story — this one's a good chapter.`,
96
+ urgency: 'low',
97
+ });
98
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Cloudflare DNS provisioning — zone lookup, record CRUD.
3
+ * Uses the shared HTTP client. No external dependencies.
4
+ */
5
+ import type { DnsRecord, ZoneInfo, DnsProvisionResult } from './types.js';
6
+ import type { ProvisionEmitter } from '../provisioners/types.js';
7
+ /**
8
+ * Extract the root zone from a hostname.
9
+ * "app.voidforge.dev" → "voidforge.dev"
10
+ * "voidforge.dev" → "voidforge.dev"
11
+ */
12
+ export declare function extractZoneName(hostname: string): string;
13
+ /**
14
+ * Find the Cloudflare zone for a hostname.
15
+ * Accepts zones in any status (active, pending, etc.) — Cloudflare allows DNS
16
+ * record creation on pending zones, which is needed after fresh domain registration
17
+ * where zones start as pending until nameservers are verified (Kusanagi-5).
18
+ */
19
+ export declare function findZone(token: string, hostname: string): Promise<ZoneInfo | null>;
20
+ /** List existing DNS records for a hostname. */
21
+ export declare function listRecords(token: string, zoneId: string, hostname: string): Promise<DnsRecord[]>;
22
+ /** Create a DNS record. */
23
+ export declare function createRecord(token: string, zoneId: string, type: 'A' | 'CNAME', name: string, content: string, proxied: boolean): Promise<DnsRecord>;
24
+ /** Delete a DNS record. */
25
+ export declare function deleteRecord(token: string, zoneId: string, recordId: string): Promise<void>;
26
+ /**
27
+ * Full DNS provisioning flow — called as a post-provision step.
28
+ * Non-fatal: returns success=false with error message, never throws.
29
+ */
30
+ export declare function provisionDns(runId: string, token: string, hostname: string, deployTarget: string, outputs: Record<string, string>, emit: ProvisionEmitter): Promise<DnsProvisionResult>;
31
+ /**
32
+ * Clean up DNS records created during provisioning.
33
+ * Resource IDs are stored as "zoneId:recordId".
34
+ */
35
+ export declare function cleanupDnsRecords(token: string, resourceIds: string[]): Promise<void>;