voidforge-build 23.9.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.
- package/dist/.claude/agents/adolin-brand.md +40 -0
- package/dist/.claude/agents/ahsoka-access-control.md +56 -0
- package/dist/.claude/agents/alfred-dependencies.md +43 -0
- package/dist/.claude/agents/alia-threat-detect.md +40 -0
- package/dist/.claude/agents/anakin-dark-side.md +41 -0
- package/dist/.claude/agents/aquaman-deep-dive.md +43 -0
- package/dist/.claude/agents/aragorn-orchestration.md +39 -0
- package/dist/.claude/agents/archer-greenfield.md +48 -0
- package/dist/.claude/agents/armin-clever.md +39 -0
- package/dist/.claude/agents/arwen-ui-polish.md +42 -0
- package/dist/.claude/agents/ashitaka-tech-debt.md +39 -0
- package/dist/.claude/agents/asuka-performance.md +39 -0
- package/dist/.claude/agents/bail-organa-governance.md +37 -0
- package/dist/.claude/agents/banner-database.md +44 -0
- package/dist/.claude/agents/barton-smoke-test.md +59 -0
- package/dist/.claude/agents/bashir-field-medic.md +63 -0
- package/dist/.claude/agents/batgirl-detail.md +43 -0
- package/dist/.claude/agents/batman-qa.md +73 -0
- package/dist/.claude/agents/bayta-evals.md +41 -0
- package/dist/.claude/agents/beast-boy-cross-env.md +43 -0
- package/dist/.claude/agents/beerus-destroyer.md +39 -0
- package/dist/.claude/agents/bel-riose-orchestration.md +40 -0
- package/dist/.claude/agents/beru-subprocess.md +37 -0
- package/dist/.claude/agents/bilbo-microcopy.md +43 -0
- package/dist/.claude/agents/black-canary-monitoring.md +43 -0
- package/dist/.claude/agents/bliss-ai-safety.md +40 -0
- package/dist/.claude/agents/bo-katan-perimeter.md +40 -0
- package/dist/.claude/agents/bombadil-forge-sync.md +62 -0
- package/dist/.claude/agents/boromir-hubris.md +40 -0
- package/dist/.claude/agents/breeze-platform-relations.md +40 -0
- package/dist/.claude/agents/bucky-legacy.md +43 -0
- package/dist/.claude/agents/bulma-engineering.md +40 -0
- package/dist/.claude/agents/calcifer-daemon.md +39 -0
- package/dist/.claude/agents/cara-dune-enforcement.md +37 -0
- package/dist/.claude/agents/cassian-recon.md +37 -0
- package/dist/.claude/agents/cc-persistent-process.md +39 -0
- package/dist/.claude/agents/celeborn-design-system.md +40 -0
- package/dist/.claude/agents/celebrimbor-forge-artist.md +62 -0
- package/dist/.claude/agents/chakotay-bridge.md +47 -0
- package/dist/.claude/agents/chani-worm-rider.md +61 -0
- package/dist/.claude/agents/chewie-dependency-audit.md +41 -0
- package/dist/.claude/agents/chrome-discovery.md +37 -0
- package/dist/.claude/agents/constantine-cursed-code.md +59 -0
- package/dist/.claude/agents/coulson-release.md +64 -0
- package/dist/.claude/agents/crusher-diagnostics.md +48 -0
- package/dist/.claude/agents/cyborg-system-integration.md +43 -0
- package/dist/.claude/agents/dalinar-positioning.md +40 -0
- package/dist/.claude/agents/daneel-model-migration.md +40 -0
- package/dist/.claude/agents/data-tech-debt.md +48 -0
- package/dist/.claude/agents/dax-legacy-wisdom.md +48 -0
- package/dist/.claude/agents/deathstroke-adversarial.md +59 -0
- package/dist/.claude/agents/denji-determination.md +39 -0
- package/dist/.claude/agents/din-djarin-bounty.md +42 -0
- package/dist/.claude/agents/dockson-treasury.md +67 -0
- package/dist/.claude/agents/dori-integration-check.md +37 -0
- package/dist/.claude/agents/dors-observability.md +40 -0
- package/dist/.claude/agents/drax-exact-match.md +42 -0
- package/dist/.claude/agents/ducem-token-economics.md +41 -0
- package/dist/.claude/agents/duncan-relay.md +40 -0
- package/dist/.claude/agents/duo-teardown.md +38 -0
- package/dist/.claude/agents/ed-network-scan.md +38 -0
- package/dist/.claude/agents/elrond-ux-strategy.md +39 -0
- package/dist/.claude/agents/eowyn-delight.md +56 -0
- package/dist/.claude/agents/erwin-strategy.md +39 -0
- package/dist/.claude/agents/ezra-catches-missed.md +40 -0
- package/dist/.claude/agents/ezri-session-analyst.md +45 -0
- package/dist/.claude/agents/falcon-migration.md +43 -0
- package/dist/.claude/agents/faramir-judgment.md +40 -0
- package/dist/.claude/agents/faye-resourceful.md +39 -0
- package/dist/.claude/agents/fenring-passive-monitor.md +37 -0
- package/dist/.claude/agents/fern-protocol.md +37 -0
- package/dist/.claude/agents/feyd-adversarial.md +41 -0
- package/dist/.claude/agents/flash-rapid-test.md +43 -0
- package/dist/.claude/agents/friday-automation.md +42 -0
- package/dist/.claude/agents/frieren-long-term.md +39 -0
- package/dist/.claude/agents/frodo-critical-path.md +40 -0
- package/dist/.claude/agents/fury-initiative.md +65 -0
- package/dist/.claude/agents/gaal-prompt-arch.md +41 -0
- package/dist/.claude/agents/galadriel-frontend.md +69 -0
- package/dist/.claude/agents/gamora-perf-assassin.md +43 -0
- package/dist/.claude/agents/gandalf-setup-wizard.md +63 -0
- package/dist/.claude/agents/gen-docs.md +37 -0
- package/dist/.claude/agents/ghanima-paired-monitor.md +37 -0
- package/dist/.claude/agents/gimli-performance.md +41 -0
- package/dist/.claude/agents/giyu-silent-guard.md +39 -0
- package/dist/.claude/agents/glorfindel-rendering.md +40 -0
- package/dist/.claude/agents/gohan-hidden-power.md +39 -0
- package/dist/.claude/agents/gojo-infinite-scale.md +39 -0
- package/dist/.claude/agents/goku-scaling.md +39 -0
- package/dist/.claude/agents/goldberry-change-detect.md +37 -0
- package/dist/.claude/agents/gordon-escalation.md +42 -0
- package/dist/.claude/agents/green-arrow-precision.md +43 -0
- package/dist/.claude/agents/green-lantern-scenarios.md +43 -0
- package/dist/.claude/agents/grogu-tiny-vulns.md +38 -0
- package/dist/.claude/agents/groot-caching.md +43 -0
- package/dist/.claude/agents/gurney-delivery.md +40 -0
- package/dist/.claude/agents/haku-deploy-wizard.md +65 -0
- package/dist/.claude/agents/haldir-boundaries.md +40 -0
- package/dist/.claude/agents/han-vuln-hunter.md +40 -0
- package/dist/.claude/agents/hange-experimentation.md +39 -0
- package/dist/.claude/agents/harah-protocol.md +38 -0
- package/dist/.claude/agents/hawkgirl-regression-sweep.md +43 -0
- package/dist/.claude/agents/heero-mission-deploy.md +39 -0
- package/dist/.claude/agents/hera-navigation.md +41 -0
- package/dist/.claude/agents/hill-mission-control.md +43 -0
- package/dist/.claude/agents/himmel-legacy.md +37 -0
- package/dist/.claude/agents/hober-tool-schema.md +40 -0
- package/dist/.claude/agents/hoid-copywriting.md +40 -0
- package/dist/.claude/agents/howl-migration.md +39 -0
- package/dist/.claude/agents/hughes-observability.md +37 -0
- package/dist/.claude/agents/huntress-flaky-bugs.md +42 -0
- package/dist/.claude/agents/irulan-historian.md +37 -0
- package/dist/.claude/agents/jake-reporter.md +45 -0
- package/dist/.claude/agents/janeway-novel-arch.md +48 -0
- package/dist/.claude/agents/janov-context-eng.md +40 -0
- package/dist/.claude/agents/jarvis-status.md +42 -0
- package/dist/.claude/agents/jean-pragmatic.md +39 -0
- package/dist/.claude/agents/jessica-voice.md +40 -0
- package/dist/.claude/agents/jet-maintenance.md +39 -0
- package/dist/.claude/agents/jin-disciplined-adv.md +39 -0
- package/dist/.claude/agents/kaji-intelligence.md +39 -0
- package/dist/.claude/agents/kaladin-organic-growth.md +40 -0
- package/dist/.claude/agents/kallen-hard-deploy.md +39 -0
- package/dist/.claude/agents/kanan-intuitive.md +41 -0
- package/dist/.claude/agents/kaoru-harmony.md +37 -0
- package/dist/.claude/agents/kaworu-solver.md +39 -0
- package/dist/.claude/agents/kelsier-growth.md +64 -0
- package/dist/.claude/agents/kenobi-security.md +70 -0
- package/dist/.claude/agents/kim-api-design.md +49 -0
- package/dist/.claude/agents/kira-pragmatic.md +48 -0
- package/dist/.claude/agents/kishibe-hardening.md +39 -0
- package/dist/.claude/agents/kohaku-rapid-response.md +36 -0
- package/dist/.claude/agents/krillin-support.md +36 -0
- package/dist/.claude/agents/kusanagi-devops.md +70 -0
- package/dist/.claude/agents/la-forge-reliability.md +63 -0
- package/dist/.claude/agents/lang-micro-changes.md +43 -0
- package/dist/.claude/agents/legolas-precision.md +42 -0
- package/dist/.claude/agents/leia-secrets.md +41 -0
- package/dist/.claude/agents/lelouch-orchestration.md +39 -0
- package/dist/.claude/agents/leto-ii-persistence.md +40 -0
- package/dist/.claude/agents/leto-protection.md +40 -0
- package/dist/.claude/agents/levi-deploy.md +40 -0
- package/dist/.claude/agents/liet-kynes-deep-system.md +40 -0
- package/dist/.claude/agents/lift-social-media.md +40 -0
- package/dist/.claude/agents/loki-chaos.md +58 -0
- package/dist/.claude/agents/lucius-config.md +43 -0
- package/dist/.claude/agents/luke-audit-journey.md +41 -0
- package/dist/.claude/agents/manhunter-shapeshifting.md +43 -0
- package/dist/.claude/agents/marsh-competitive-intel.md +41 -0
- package/dist/.claude/agents/maul-red-team.md +57 -0
- package/dist/.claude/agents/merry-pair-review.md +40 -0
- package/dist/.claude/agents/mikasa-protection.md +39 -0
- package/dist/.claude/agents/miles-teg-perf.md +40 -0
- package/dist/.claude/agents/milim-load-test.md +39 -0
- package/dist/.claude/agents/misato-operations.md +39 -0
- package/dist/.claude/agents/mob-capacity.md +39 -0
- package/dist/.claude/agents/mohiam-authentication.md +40 -0
- package/dist/.claude/agents/mon-mothma-security-mgmt.md +41 -0
- package/dist/.claude/agents/mugen-chaos.md +39 -0
- package/dist/.claude/agents/mule-adversarial-ai.md +41 -0
- package/dist/.claude/agents/mustang-cleanup.md +39 -0
- package/dist/.claude/agents/nanami-structured-ops.md +39 -0
- package/dist/.claude/agents/nausicaa-resources.md +39 -0
- package/dist/.claude/agents/navani-technical-seo.md +40 -0
- package/dist/.claude/agents/nebula-optimization.md +43 -0
- package/dist/.claude/agents/nightwing-regression.md +59 -0
- package/dist/.claude/agents/nobara-direct-fix.md +39 -0
- package/dist/.claude/agents/nog-solutions.md +48 -0
- package/dist/.claude/agents/nori-asset-scanner.md +37 -0
- package/dist/.claude/agents/obrien-root-cause.md +48 -0
- package/dist/.claude/agents/odo-structural-anomaly.md +48 -0
- package/dist/.claude/agents/okoye-data-integrity.md +43 -0
- package/dist/.claude/agents/olivier-hardening.md +39 -0
- package/dist/.claude/agents/oracle-static-analysis.md +59 -0
- package/dist/.claude/agents/ori-prompt-crafter.md +37 -0
- package/dist/.claude/agents/padme-data-protection.md +42 -0
- package/dist/.claude/agents/paris-route-planner.md +47 -0
- package/dist/.claude/agents/parker-connections.md +43 -0
- package/dist/.claude/agents/paul-orchestration.md +40 -0
- package/dist/.claude/agents/picard-architecture.md +64 -0
- package/dist/.claude/agents/piccolo-tactics.md +39 -0
- package/dist/.claude/agents/pike-bold-decisions.md +48 -0
- package/dist/.claude/agents/pippin-discovery.md +40 -0
- package/dist/.claude/agents/plo-koon-edge-cases.md +37 -0
- package/dist/.claude/agents/power-chaotic.md +39 -0
- package/dist/.claude/agents/qui-gon-subtle-vulns.md +40 -0
- package/dist/.claude/agents/radagast-edge-cases.md +41 -0
- package/dist/.claude/agents/raoden-conversion.md +41 -0
- package/dist/.claude/agents/raven-deep-analysis.md +43 -0
- package/dist/.claude/agents/red-hood-aggressive.md +47 -0
- package/dist/.claude/agents/rei-dangerous-tasks.md +39 -0
- package/dist/.claude/agents/reigen-debugger.md +39 -0
- package/dist/.claude/agents/rengoku-intense-monitor.md +39 -0
- package/dist/.claude/agents/rex-infrastructure.md +41 -0
- package/dist/.claude/agents/rhodes-production.md +43 -0
- package/dist/.claude/agents/riker-review.md +62 -0
- package/dist/.claude/agents/rimuru-adapter.md +39 -0
- package/dist/.claude/agents/riza-backup.md +39 -0
- package/dist/.claude/agents/robin-apprentice.md +42 -0
- package/dist/.claude/agents/rocket-scrappy.md +43 -0
- package/dist/.claude/agents/rogers-api-design.md +43 -0
- package/dist/.claude/agents/romanoff-integrations.md +44 -0
- package/dist/.claude/agents/sabine-unconventional.md +40 -0
- package/dist/.claude/agents/salvor-model-selection.md +42 -0
- package/dist/.claude/agents/samwise-accessibility.md +43 -0
- package/dist/.claude/agents/sarene-outreach.md +40 -0
- package/dist/.claude/agents/sasha-resources.md +37 -0
- package/dist/.claude/agents/scotty-infrastructure.md +48 -0
- package/dist/.claude/agents/seldon-ai.md +67 -0
- package/dist/.claude/agents/senku-provisioning.md +40 -0
- package/dist/.claude/agents/sentaro-scheduling.md +37 -0
- package/dist/.claude/agents/seven-optimization.md +48 -0
- package/dist/.claude/agents/shallan-creative.md +40 -0
- package/dist/.claude/agents/sheeana-transport.md +40 -0
- package/dist/.claude/agents/shuri-innovation.md +43 -0
- package/dist/.claude/agents/silver-surfer-herald.md +90 -0
- package/dist/.claude/agents/siona-evasion.md +41 -0
- package/dist/.claude/agents/sisko-campaign.md +68 -0
- package/dist/.claude/agents/spike-routing.md +40 -0
- package/dist/.claude/agents/spock-schema.md +62 -0
- package/dist/.claude/agents/starfire-brute-force.md +43 -0
- package/dist/.claude/agents/stark-backend.md +71 -0
- package/dist/.claude/agents/steris-budget.md +41 -0
- package/dist/.claude/agents/stilgar-channel-security.md +40 -0
- package/dist/.claude/agents/strange-service-arch.md +44 -0
- package/dist/.claude/agents/sung-workers.md +39 -0
- package/dist/.claude/agents/superman-strength-test.md +43 -0
- package/dist/.claude/agents/suzaku-execution.md +39 -0
- package/dist/.claude/agents/szeth-compliance.md +40 -0
- package/dist/.claude/agents/tanjiro-persistent.md +39 -0
- package/dist/.claude/agents/tchalla-quality.md +43 -0
- package/dist/.claude/agents/thanos-gauntlet.md +68 -0
- package/dist/.claude/agents/theoden-rally.md +40 -0
- package/dist/.claude/agents/thor-queues.md +44 -0
- package/dist/.claude/agents/thufir-protocol-parsing.md +40 -0
- package/dist/.claude/agents/todo-brute-force.md +39 -0
- package/dist/.claude/agents/torres-site-scanner.md +47 -0
- package/dist/.claude/agents/totoro-guardian.md +39 -0
- package/dist/.claude/agents/tpol-disciplined.md +48 -0
- package/dist/.claude/agents/treebeard-deliberation.md +41 -0
- package/dist/.claude/agents/troi-prd-compliance.md +64 -0
- package/dist/.claude/agents/trunks-rollback.md +39 -0
- package/dist/.claude/agents/tuvok-deep-current.md +63 -0
- package/dist/.claude/agents/uhura-integration.md +47 -0
- package/dist/.claude/agents/valkyrie-recovery.md +43 -0
- package/dist/.claude/agents/vegeta-monitoring.md +39 -0
- package/dist/.claude/agents/veldora-dormant.md +37 -0
- package/dist/.claude/agents/vin-analytics.md +41 -0
- package/dist/.claude/agents/vision-data-analysis.md +43 -0
- package/dist/.claude/agents/wanda-seldon-validation.md +38 -0
- package/dist/.claude/agents/wanda-state.md +43 -0
- package/dist/.claude/agents/wax-paid-ads.md +40 -0
- package/dist/.claude/agents/wayne-ab-testing.md +40 -0
- package/dist/.claude/agents/whis-precision.md +39 -0
- package/dist/.claude/agents/windu-input-validation.md +41 -0
- package/dist/.claude/agents/winry-maintenance.md +39 -0
- package/dist/.claude/agents/wonder-woman-truth.md +43 -0
- package/dist/.claude/agents/wong-documentation.md +58 -0
- package/dist/.claude/agents/worf-security-arch.md +49 -0
- package/dist/.claude/agents/yoda-auth.md +57 -0
- package/dist/.claude/agents/yueh-trust-verify.md +40 -0
- package/dist/.claude/agents/zatanna-impossible.md +43 -0
- package/dist/.claude/agents/zechs-rival.md +39 -0
- package/dist/.claude/agents/zenitsu-alerts.md +37 -0
- package/dist/.claude/commands/ai.md +84 -0
- package/dist/.claude/commands/architect.md +107 -0
- package/dist/.claude/commands/assemble.md +223 -0
- package/dist/.claude/commands/assess.md +86 -0
- package/dist/.claude/commands/blueprint.md +135 -0
- package/dist/.claude/commands/build.md +138 -0
- package/dist/.claude/commands/campaign.md +224 -0
- package/dist/.claude/commands/cultivation.md +184 -0
- package/dist/.claude/commands/current.md +128 -0
- package/dist/.claude/commands/dangerroom.md +74 -0
- package/dist/.claude/commands/debrief.md +180 -0
- package/dist/.claude/commands/deploy.md +108 -0
- package/dist/.claude/commands/devops.md +160 -0
- package/dist/.claude/commands/engage.md +135 -0
- package/dist/.claude/commands/gauntlet.md +179 -0
- package/dist/.claude/commands/git.md +104 -0
- package/dist/.claude/commands/grow.md +160 -0
- package/dist/.claude/commands/imagine.md +126 -0
- package/dist/.claude/commands/portfolio.md +51 -0
- package/dist/.claude/commands/prd.md +113 -0
- package/dist/.claude/commands/qa.md +130 -0
- package/dist/.claude/commands/review.md +9 -0
- package/dist/.claude/commands/security.md +9 -0
- package/dist/.claude/commands/sentinel.md +90 -0
- package/dist/.claude/commands/test.md +114 -0
- package/dist/.claude/commands/thumper.md +116 -0
- package/dist/.claude/commands/treasury.md +117 -0
- package/dist/.claude/commands/ux.md +132 -0
- package/dist/.claude/commands/vault.md +198 -0
- package/dist/.claude/commands/void.md +148 -0
- package/dist/CHANGELOG.md +2621 -0
- package/dist/CLAUDE.md +292 -0
- package/dist/HOLOCRON.md +859 -0
- package/dist/VERSION.md +149 -0
- package/dist/docs/NAMING_REGISTRY.md +479 -0
- package/dist/docs/methods/AI_INTELLIGENCE.md +276 -0
- package/dist/docs/methods/ASSEMBLER.md +142 -0
- package/dist/docs/methods/BACKEND_ENGINEER.md +165 -0
- package/dist/docs/methods/BUILD_JOURNAL.md +214 -0
- package/dist/docs/methods/BUILD_PROTOCOL.md +436 -0
- package/dist/docs/methods/CAMPAIGN.md +569 -0
- package/dist/docs/methods/CONTEXT_MANAGEMENT.md +189 -0
- package/dist/docs/methods/DEEP_CURRENT.md +184 -0
- package/dist/docs/methods/DEVOPS_ENGINEER.md +297 -0
- package/dist/docs/methods/FIELD_MEDIC.md +265 -0
- package/dist/docs/methods/FORGE_ARTIST.md +108 -0
- package/dist/docs/methods/FORGE_KEEPER.md +270 -0
- package/dist/docs/methods/GAUNTLET.md +364 -0
- package/dist/docs/methods/GROWTH_STRATEGIST.md +466 -0
- package/dist/docs/methods/HEARTBEAT.md +168 -0
- package/dist/docs/methods/MCP_INTEGRATION.md +139 -0
- package/dist/docs/methods/MUSTER.md +152 -0
- package/dist/docs/methods/PRD_GENERATOR.md +186 -0
- package/dist/docs/methods/PRODUCT_DESIGN_FRONTEND.md +252 -0
- package/dist/docs/methods/QA_ENGINEER.md +360 -0
- package/dist/docs/methods/RELEASE_MANAGER.md +145 -0
- package/dist/docs/methods/SECURITY_AUDITOR.md +328 -0
- package/dist/docs/methods/SUB_AGENTS.md +375 -0
- package/dist/docs/methods/SYSTEMS_ARCHITECT.md +180 -0
- package/dist/docs/methods/TESTING.md +359 -0
- package/dist/docs/methods/THUMPER.md +175 -0
- package/dist/docs/methods/TIME_VAULT.md +120 -0
- package/dist/docs/methods/TREASURY.md +184 -0
- package/dist/docs/methods/TROUBLESHOOTING.md +265 -0
- package/dist/docs/patterns/README.md +52 -0
- package/dist/docs/patterns/ad-billing-adapter.ts +537 -0
- package/dist/docs/patterns/ad-platform-adapter.ts +421 -0
- package/dist/docs/patterns/ai-classifier.ts +195 -0
- package/dist/docs/patterns/ai-eval.ts +272 -0
- package/dist/docs/patterns/ai-orchestrator.ts +341 -0
- package/dist/docs/patterns/ai-router.ts +194 -0
- package/dist/docs/patterns/ai-tool-schema.ts +237 -0
- package/dist/docs/patterns/api-route.ts +241 -0
- package/dist/docs/patterns/backtest-engine.ts +499 -0
- package/dist/docs/patterns/browser-review.ts +292 -0
- package/dist/docs/patterns/combobox.tsx +300 -0
- package/dist/docs/patterns/component.tsx +262 -0
- package/dist/docs/patterns/daemon-process.ts +338 -0
- package/dist/docs/patterns/data-pipeline.ts +297 -0
- package/dist/docs/patterns/database-migration.ts +466 -0
- package/dist/docs/patterns/e2e-test.ts +629 -0
- package/dist/docs/patterns/error-handling.ts +312 -0
- package/dist/docs/patterns/execution-safety.ts +601 -0
- package/dist/docs/patterns/financial-transaction.ts +366 -0
- package/dist/docs/patterns/funding-plan.ts +462 -0
- package/dist/docs/patterns/game-entity.ts +137 -0
- package/dist/docs/patterns/game-loop.ts +113 -0
- package/dist/docs/patterns/game-state.ts +143 -0
- package/dist/docs/patterns/job-queue.ts +225 -0
- package/dist/docs/patterns/kongo-integration.ts +164 -0
- package/dist/docs/patterns/middleware.ts +363 -0
- package/dist/docs/patterns/mobile-screen.tsx +139 -0
- package/dist/docs/patterns/mobile-service.ts +167 -0
- package/dist/docs/patterns/multi-tenant.ts +382 -0
- package/dist/docs/patterns/oauth-token-lifecycle.ts +223 -0
- package/dist/docs/patterns/outbound-rate-limiter.ts +260 -0
- package/dist/docs/patterns/prompt-template.ts +195 -0
- package/dist/docs/patterns/revenue-source-adapter.ts +311 -0
- package/dist/docs/patterns/service.ts +224 -0
- package/dist/docs/patterns/sse-endpoint.ts +118 -0
- package/dist/docs/patterns/stablecoin-adapter.ts +511 -0
- package/dist/docs/patterns/third-party-script.ts +68 -0
- package/dist/scripts/thumper/gom-jabbar.sh +241 -0
- package/dist/scripts/thumper/relay.sh +610 -0
- package/dist/scripts/thumper/scan.sh +359 -0
- package/dist/scripts/thumper/thumper.sh +190 -0
- package/dist/scripts/thumper/water-rings.sh +76 -0
- package/dist/scripts/vault-read.d.ts +11 -0
- package/dist/scripts/vault-read.js +89 -0
- package/dist/scripts/voidforge.d.ts +21 -0
- package/dist/scripts/voidforge.js +614 -0
- package/dist/wizard/api/auth.d.ts +5 -0
- package/dist/wizard/api/auth.js +139 -0
- package/dist/wizard/api/blueprint.d.ts +34 -0
- package/dist/wizard/api/blueprint.js +161 -0
- package/dist/wizard/api/cloud-providers.d.ts +16 -0
- package/dist/wizard/api/cloud-providers.js +363 -0
- package/dist/wizard/api/credentials.d.ts +1 -0
- package/dist/wizard/api/credentials.js +265 -0
- package/dist/wizard/api/danger-room.d.ts +24 -0
- package/dist/wizard/api/danger-room.js +274 -0
- package/dist/wizard/api/deploy.d.ts +4 -0
- package/dist/wizard/api/deploy.js +164 -0
- package/dist/wizard/api/prd.d.ts +1 -0
- package/dist/wizard/api/prd.js +363 -0
- package/dist/wizard/api/project.d.ts +1 -0
- package/dist/wizard/api/project.js +241 -0
- package/dist/wizard/api/projects-data.d.ts +5 -0
- package/dist/wizard/api/projects-data.js +234 -0
- package/dist/wizard/api/projects-list.d.ts +5 -0
- package/dist/wizard/api/projects-list.js +227 -0
- package/dist/wizard/api/projects.d.ts +7 -0
- package/dist/wizard/api/projects.js +273 -0
- package/dist/wizard/api/provision-status.d.ts +5 -0
- package/dist/wizard/api/provision-status.js +47 -0
- package/dist/wizard/api/provision-steps.d.ts +21 -0
- package/dist/wizard/api/provision-steps.js +44 -0
- package/dist/wizard/api/provision-validate.d.ts +22 -0
- package/dist/wizard/api/provision-validate.js +164 -0
- package/dist/wizard/api/provision.d.ts +2 -0
- package/dist/wizard/api/provision.js +239 -0
- package/dist/wizard/api/terminal.d.ts +25 -0
- package/dist/wizard/api/terminal.js +246 -0
- package/dist/wizard/api/users.d.ts +6 -0
- package/dist/wizard/api/users.js +244 -0
- package/dist/wizard/api/war-room.d.ts +16 -0
- package/dist/wizard/api/war-room.js +70 -0
- package/dist/wizard/danger-room.config.json +5 -0
- package/dist/wizard/lib/ad-platform-core.d.ts +6 -0
- package/dist/wizard/lib/ad-platform-core.js +1 -0
- package/dist/wizard/lib/adapters/index.d.ts +52 -0
- package/dist/wizard/lib/adapters/index.js +38 -0
- package/dist/wizard/lib/adapters/sandbox-bank.d.ts +17 -0
- package/dist/wizard/lib/adapters/sandbox-bank.js +77 -0
- package/dist/wizard/lib/adapters/sandbox.d.ts +39 -0
- package/dist/wizard/lib/adapters/sandbox.js +174 -0
- package/dist/wizard/lib/adapters/stripe.d.ts +19 -0
- package/dist/wizard/lib/adapters/stripe.js +143 -0
- package/dist/wizard/lib/adapters/types.d.ts +9 -0
- package/dist/wizard/lib/adapters/types.js +10 -0
- package/dist/wizard/lib/agent-memory.d.ts +36 -0
- package/dist/wizard/lib/agent-memory.js +114 -0
- package/dist/wizard/lib/agent-registry.d.ts +21 -0
- package/dist/wizard/lib/agent-registry.js +105 -0
- package/dist/wizard/lib/anomaly-detection.d.ts +59 -0
- package/dist/wizard/lib/anomaly-detection.js +122 -0
- package/dist/wizard/lib/anthropic.d.ts +21 -0
- package/dist/wizard/lib/anthropic.js +105 -0
- package/dist/wizard/lib/asset-scanner.d.ts +23 -0
- package/dist/wizard/lib/asset-scanner.js +107 -0
- package/dist/wizard/lib/audit-log.d.ts +23 -0
- package/dist/wizard/lib/audit-log.js +70 -0
- package/dist/wizard/lib/autonomy-controller.d.ts +76 -0
- package/dist/wizard/lib/autonomy-controller.js +184 -0
- package/dist/wizard/lib/body-parser.d.ts +2 -0
- package/dist/wizard/lib/body-parser.js +36 -0
- package/dist/wizard/lib/build-analytics.d.ts +39 -0
- package/dist/wizard/lib/build-analytics.js +91 -0
- package/dist/wizard/lib/build-step.d.ts +21 -0
- package/dist/wizard/lib/build-step.js +104 -0
- package/dist/wizard/lib/campaign-proposer.d.ts +39 -0
- package/dist/wizard/lib/campaign-proposer.js +181 -0
- package/dist/wizard/lib/campaign-state-machine.d.ts +63 -0
- package/dist/wizard/lib/campaign-state-machine.js +114 -0
- package/dist/wizard/lib/ci-generator.d.ts +14 -0
- package/dist/wizard/lib/ci-generator.js +187 -0
- package/dist/wizard/lib/claude-merge.d.ts +38 -0
- package/dist/wizard/lib/claude-merge.js +115 -0
- package/dist/wizard/lib/codegen/erd-gen.d.ts +16 -0
- package/dist/wizard/lib/codegen/erd-gen.js +98 -0
- package/dist/wizard/lib/codegen/integrations.d.ts +18 -0
- package/dist/wizard/lib/codegen/integrations.js +189 -0
- package/dist/wizard/lib/codegen/openapi-gen.d.ts +15 -0
- package/dist/wizard/lib/codegen/openapi-gen.js +79 -0
- package/dist/wizard/lib/codegen/prisma-types.d.ts +15 -0
- package/dist/wizard/lib/codegen/prisma-types.js +44 -0
- package/dist/wizard/lib/codegen/seed-gen.d.ts +16 -0
- package/dist/wizard/lib/codegen/seed-gen.js +128 -0
- package/dist/wizard/lib/compliance.d.ts +51 -0
- package/dist/wizard/lib/compliance.js +112 -0
- package/dist/wizard/lib/correlation-engine.d.ts +59 -0
- package/dist/wizard/lib/correlation-engine.js +152 -0
- package/dist/wizard/lib/cost-estimator.d.ts +22 -0
- package/dist/wizard/lib/cost-estimator.js +72 -0
- package/dist/wizard/lib/cost-tracker.d.ts +27 -0
- package/dist/wizard/lib/cost-tracker.js +37 -0
- package/dist/wizard/lib/daemon-aggregator.d.ts +76 -0
- package/dist/wizard/lib/daemon-aggregator.js +241 -0
- package/dist/wizard/lib/daemon-core.d.ts +16 -0
- package/dist/wizard/lib/daemon-core.js +39 -0
- package/dist/wizard/lib/dashboard-data.d.ts +123 -0
- package/dist/wizard/lib/dashboard-data.js +314 -0
- package/dist/wizard/lib/dashboard-ws.d.ts +28 -0
- package/dist/wizard/lib/dashboard-ws.js +117 -0
- package/dist/wizard/lib/deep-current.d.ts +77 -0
- package/dist/wizard/lib/deep-current.js +247 -0
- package/dist/wizard/lib/deploy-coordinator.d.ts +40 -0
- package/dist/wizard/lib/deploy-coordinator.js +86 -0
- package/dist/wizard/lib/deploy-log.d.ts +28 -0
- package/dist/wizard/lib/deploy-log.js +52 -0
- package/dist/wizard/lib/desktop-notify.d.ts +27 -0
- package/dist/wizard/lib/desktop-notify.js +98 -0
- package/dist/wizard/lib/dns/cloudflare-dns.d.ts +35 -0
- package/dist/wizard/lib/dns/cloudflare-dns.js +216 -0
- package/dist/wizard/lib/dns/cloudflare-registrar.d.ts +31 -0
- package/dist/wizard/lib/dns/cloudflare-registrar.js +148 -0
- package/dist/wizard/lib/dns/types.d.ts +22 -0
- package/dist/wizard/lib/dns/types.js +4 -0
- package/dist/wizard/lib/document-discovery.d.ts +33 -0
- package/dist/wizard/lib/document-discovery.js +145 -0
- package/dist/wizard/lib/env-validator.d.ts +14 -0
- package/dist/wizard/lib/env-validator.js +205 -0
- package/dist/wizard/lib/env-writer.d.ts +13 -0
- package/dist/wizard/lib/env-writer.js +26 -0
- package/dist/wizard/lib/exec.d.ts +30 -0
- package/dist/wizard/lib/exec.js +52 -0
- package/dist/wizard/lib/experiment.d.ts +70 -0
- package/dist/wizard/lib/experiment.js +169 -0
- package/dist/wizard/lib/extensions.d.ts +20 -0
- package/dist/wizard/lib/extensions.js +183 -0
- package/dist/wizard/lib/financial/adapter-factory.d.ts +47 -0
- package/dist/wizard/lib/financial/adapter-factory.js +225 -0
- package/dist/wizard/lib/financial/billing/base.d.ts +6 -0
- package/dist/wizard/lib/financial/billing/base.js +1 -0
- package/dist/wizard/lib/financial/billing/google-billing.d.ts +56 -0
- package/dist/wizard/lib/financial/billing/google-billing.js +298 -0
- package/dist/wizard/lib/financial/billing/meta-billing.d.ts +54 -0
- package/dist/wizard/lib/financial/billing/meta-billing.js +243 -0
- package/dist/wizard/lib/financial/billing/tiktok-billing.d.ts +54 -0
- package/dist/wizard/lib/financial/billing/tiktok-billing.js +260 -0
- package/dist/wizard/lib/financial/campaign/base.d.ts +13 -0
- package/dist/wizard/lib/financial/campaign/base.js +1 -0
- package/dist/wizard/lib/financial/campaign/campaign-common.d.ts +21 -0
- package/dist/wizard/lib/financial/campaign/campaign-common.js +58 -0
- package/dist/wizard/lib/financial/campaign/google-api.d.ts +35 -0
- package/dist/wizard/lib/financial/campaign/google-api.js +118 -0
- package/dist/wizard/lib/financial/campaign/google-campaign.d.ts +38 -0
- package/dist/wizard/lib/financial/campaign/google-campaign.js +186 -0
- package/dist/wizard/lib/financial/campaign/meta-api.d.ts +28 -0
- package/dist/wizard/lib/financial/campaign/meta-api.js +93 -0
- package/dist/wizard/lib/financial/campaign/meta-campaign.d.ts +32 -0
- package/dist/wizard/lib/financial/campaign/meta-campaign.js +189 -0
- package/dist/wizard/lib/financial/campaign/sandbox-campaign.d.ts +45 -0
- package/dist/wizard/lib/financial/campaign/sandbox-campaign.js +261 -0
- package/dist/wizard/lib/financial/campaign/tiktok-api.d.ts +25 -0
- package/dist/wizard/lib/financial/campaign/tiktok-api.js +81 -0
- package/dist/wizard/lib/financial/campaign/tiktok-campaign.d.ts +37 -0
- package/dist/wizard/lib/financial/campaign/tiktok-campaign.js +155 -0
- package/dist/wizard/lib/financial/funding-auto.d.ts +44 -0
- package/dist/wizard/lib/financial/funding-auto.js +52 -0
- package/dist/wizard/lib/financial/funding-policy.d.ts +60 -0
- package/dist/wizard/lib/financial/funding-policy.js +179 -0
- package/dist/wizard/lib/financial/platform-planner.d.ts +47 -0
- package/dist/wizard/lib/financial/platform-planner.js +134 -0
- package/dist/wizard/lib/financial/reconciliation-engine.d.ts +78 -0
- package/dist/wizard/lib/financial/reconciliation-engine.js +193 -0
- package/dist/wizard/lib/financial/registry.d.ts +22 -0
- package/dist/wizard/lib/financial/registry.js +26 -0
- package/dist/wizard/lib/financial/reporting.d.ts +96 -0
- package/dist/wizard/lib/financial/reporting.js +198 -0
- package/dist/wizard/lib/financial/stablecoin/base.d.ts +6 -0
- package/dist/wizard/lib/financial/stablecoin/base.js +1 -0
- package/dist/wizard/lib/financial/stablecoin/circle.d.ts +54 -0
- package/dist/wizard/lib/financial/stablecoin/circle.js +367 -0
- package/dist/wizard/lib/financial/stablecoin/mercury.d.ts +24 -0
- package/dist/wizard/lib/financial/stablecoin/mercury.js +171 -0
- package/dist/wizard/lib/financial/stablecoin/sandbox-stablecoin.d.ts +47 -0
- package/dist/wizard/lib/financial/stablecoin/sandbox-stablecoin.js +202 -0
- package/dist/wizard/lib/financial/treasury-planner.d.ts +52 -0
- package/dist/wizard/lib/financial/treasury-planner.js +128 -0
- package/dist/wizard/lib/financial-core.d.ts +6 -0
- package/dist/wizard/lib/financial-core.js +5 -0
- package/dist/wizard/lib/financial-vault.d.ts +34 -0
- package/dist/wizard/lib/financial-vault.js +200 -0
- package/dist/wizard/lib/frontmatter.d.ts +30 -0
- package/dist/wizard/lib/frontmatter.js +99 -0
- package/dist/wizard/lib/gap-analysis.d.ts +37 -0
- package/dist/wizard/lib/gap-analysis.js +218 -0
- package/dist/wizard/lib/github.d.ts +22 -0
- package/dist/wizard/lib/github.js +261 -0
- package/dist/wizard/lib/headless-deploy.d.ts +14 -0
- package/dist/wizard/lib/headless-deploy.js +452 -0
- package/dist/wizard/lib/health-monitor.d.ts +15 -0
- package/dist/wizard/lib/health-monitor.js +91 -0
- package/dist/wizard/lib/health-poller.d.ts +9 -0
- package/dist/wizard/lib/health-poller.js +123 -0
- package/dist/wizard/lib/heartbeat-lifecycle.d.ts +71 -0
- package/dist/wizard/lib/heartbeat-lifecycle.js +107 -0
- package/dist/wizard/lib/heartbeat-scheduler.d.ts +26 -0
- package/dist/wizard/lib/heartbeat-scheduler.js +155 -0
- package/dist/wizard/lib/heartbeat.d.ts +22 -0
- package/dist/wizard/lib/heartbeat.js +538 -0
- package/dist/wizard/lib/herald.d.ts +28 -0
- package/dist/wizard/lib/herald.js +167 -0
- package/dist/wizard/lib/http-helpers.d.ts +9 -0
- package/dist/wizard/lib/http-helpers.js +24 -0
- package/dist/wizard/lib/image-gen.d.ts +56 -0
- package/dist/wizard/lib/image-gen.js +159 -0
- package/dist/wizard/lib/instance-sizing.d.ts +26 -0
- package/dist/wizard/lib/instance-sizing.js +51 -0
- package/dist/wizard/lib/kongo/analytics.d.ts +29 -0
- package/dist/wizard/lib/kongo/analytics.js +179 -0
- package/dist/wizard/lib/kongo/campaigns.d.ts +52 -0
- package/dist/wizard/lib/kongo/campaigns.js +91 -0
- package/dist/wizard/lib/kongo/client.d.ts +58 -0
- package/dist/wizard/lib/kongo/client.js +221 -0
- package/dist/wizard/lib/kongo/jobs.d.ts +57 -0
- package/dist/wizard/lib/kongo/jobs.js +122 -0
- package/dist/wizard/lib/kongo/pages.d.ts +60 -0
- package/dist/wizard/lib/kongo/pages.js +150 -0
- package/dist/wizard/lib/kongo/provisioner.d.ts +64 -0
- package/dist/wizard/lib/kongo/provisioner.js +116 -0
- package/dist/wizard/lib/kongo/seed.d.ts +49 -0
- package/dist/wizard/lib/kongo/seed.js +237 -0
- package/dist/wizard/lib/kongo/types.d.ts +323 -0
- package/dist/wizard/lib/kongo/types.js +11 -0
- package/dist/wizard/lib/kongo/variants.d.ts +57 -0
- package/dist/wizard/lib/kongo/variants.js +88 -0
- package/dist/wizard/lib/kongo/webhooks.d.ts +41 -0
- package/dist/wizard/lib/kongo/webhooks.js +112 -0
- package/dist/wizard/lib/marker.d.ts +28 -0
- package/dist/wizard/lib/marker.js +79 -0
- package/dist/wizard/lib/migrator.d.ts +35 -0
- package/dist/wizard/lib/migrator.js +190 -0
- package/dist/wizard/lib/natural-language-deploy.d.ts +30 -0
- package/dist/wizard/lib/natural-language-deploy.js +186 -0
- package/dist/wizard/lib/network.d.ts +22 -0
- package/dist/wizard/lib/network.js +72 -0
- package/dist/wizard/lib/oauth-core.d.ts +6 -0
- package/dist/wizard/lib/oauth-core.js +5 -0
- package/dist/wizard/lib/open-browser.d.ts +1 -0
- package/dist/wizard/lib/open-browser.js +26 -0
- package/dist/wizard/lib/patterns/ad-billing-adapter.d.ts +209 -0
- package/dist/wizard/lib/patterns/ad-billing-adapter.js +269 -0
- package/dist/wizard/lib/patterns/ad-platform-adapter.d.ts +200 -0
- package/dist/wizard/lib/patterns/ad-platform-adapter.js +212 -0
- package/dist/wizard/lib/patterns/daemon-process.d.ts +88 -0
- package/dist/wizard/lib/patterns/daemon-process.js +271 -0
- package/dist/wizard/lib/patterns/financial-transaction.d.ts +171 -0
- package/dist/wizard/lib/patterns/financial-transaction.js +154 -0
- package/dist/wizard/lib/patterns/funding-plan.d.ts +136 -0
- package/dist/wizard/lib/patterns/funding-plan.js +200 -0
- package/dist/wizard/lib/patterns/oauth-token-lifecycle.d.ts +94 -0
- package/dist/wizard/lib/patterns/oauth-token-lifecycle.js +139 -0
- package/dist/wizard/lib/patterns/outbound-rate-limiter.d.ts +67 -0
- package/dist/wizard/lib/patterns/outbound-rate-limiter.js +216 -0
- package/dist/wizard/lib/patterns/revenue-source-adapter.d.ts +96 -0
- package/dist/wizard/lib/patterns/revenue-source-adapter.js +182 -0
- package/dist/wizard/lib/patterns/stablecoin-adapter.d.ts +218 -0
- package/dist/wizard/lib/patterns/stablecoin-adapter.js +264 -0
- package/dist/wizard/lib/prd-validator.d.ts +39 -0
- package/dist/wizard/lib/prd-validator.js +137 -0
- package/dist/wizard/lib/project-init.d.ts +24 -0
- package/dist/wizard/lib/project-init.js +228 -0
- package/dist/wizard/lib/project-registry.d.ts +86 -0
- package/dist/wizard/lib/project-registry.js +359 -0
- package/dist/wizard/lib/project-scope.d.ts +64 -0
- package/dist/wizard/lib/project-scope.js +96 -0
- package/dist/wizard/lib/project-vault.d.ts +47 -0
- package/dist/wizard/lib/project-vault.js +221 -0
- package/dist/wizard/lib/provision-manifest.d.ts +44 -0
- package/dist/wizard/lib/provision-manifest.js +164 -0
- package/dist/wizard/lib/provisioner-registry.d.ts +15 -0
- package/dist/wizard/lib/provisioner-registry.js +34 -0
- package/dist/wizard/lib/provisioners/aws-config.d.ts +36 -0
- package/dist/wizard/lib/provisioners/aws-config.js +56 -0
- package/dist/wizard/lib/provisioners/aws-ec2.d.ts +19 -0
- package/dist/wizard/lib/provisioners/aws-ec2.js +241 -0
- package/dist/wizard/lib/provisioners/aws-rds.d.ts +10 -0
- package/dist/wizard/lib/provisioners/aws-rds.js +199 -0
- package/dist/wizard/lib/provisioners/aws-vps.d.ts +6 -0
- package/dist/wizard/lib/provisioners/aws-vps.js +231 -0
- package/dist/wizard/lib/provisioners/cloudflare.d.ts +6 -0
- package/dist/wizard/lib/provisioners/cloudflare.js +300 -0
- package/dist/wizard/lib/provisioners/docker.d.ts +6 -0
- package/dist/wizard/lib/provisioners/docker.js +75 -0
- package/dist/wizard/lib/provisioners/http-client.d.ts +20 -0
- package/dist/wizard/lib/provisioners/http-client.js +79 -0
- package/dist/wizard/lib/provisioners/railway-config.d.ts +24 -0
- package/dist/wizard/lib/provisioners/railway-config.js +220 -0
- package/dist/wizard/lib/provisioners/railway-deploy.d.ts +19 -0
- package/dist/wizard/lib/provisioners/railway-deploy.js +205 -0
- package/dist/wizard/lib/provisioners/railway.d.ts +6 -0
- package/dist/wizard/lib/provisioners/railway.js +45 -0
- package/dist/wizard/lib/provisioners/scripts/caddyfile.d.ts +10 -0
- package/dist/wizard/lib/provisioners/scripts/caddyfile.js +54 -0
- package/dist/wizard/lib/provisioners/scripts/deploy-vps.d.ts +10 -0
- package/dist/wizard/lib/provisioners/scripts/deploy-vps.js +112 -0
- package/dist/wizard/lib/provisioners/scripts/docker-compose.d.ts +11 -0
- package/dist/wizard/lib/provisioners/scripts/docker-compose.js +91 -0
- package/dist/wizard/lib/provisioners/scripts/dockerfile.d.ts +5 -0
- package/dist/wizard/lib/provisioners/scripts/dockerfile.js +185 -0
- package/dist/wizard/lib/provisioners/scripts/ecosystem-config.d.ts +10 -0
- package/dist/wizard/lib/provisioners/scripts/ecosystem-config.js +36 -0
- package/dist/wizard/lib/provisioners/scripts/provision-vps.d.ts +14 -0
- package/dist/wizard/lib/provisioners/scripts/provision-vps.js +202 -0
- package/dist/wizard/lib/provisioners/scripts/rollback-vps.d.ts +10 -0
- package/dist/wizard/lib/provisioners/scripts/rollback-vps.js +67 -0
- package/dist/wizard/lib/provisioners/self-deploy.d.ts +41 -0
- package/dist/wizard/lib/provisioners/self-deploy.js +185 -0
- package/dist/wizard/lib/provisioners/static-s3.d.ts +6 -0
- package/dist/wizard/lib/provisioners/static-s3.js +235 -0
- package/dist/wizard/lib/provisioners/types.d.ts +40 -0
- package/dist/wizard/lib/provisioners/types.js +4 -0
- package/dist/wizard/lib/provisioners/vercel.d.ts +6 -0
- package/dist/wizard/lib/provisioners/vercel.js +287 -0
- package/dist/wizard/lib/pty-manager.d.ts +42 -0
- package/dist/wizard/lib/pty-manager.js +244 -0
- package/dist/wizard/lib/rate-limiter-core.d.ts +5 -0
- package/dist/wizard/lib/rate-limiter-core.js +5 -0
- package/dist/wizard/lib/reconciliation.d.ts +43 -0
- package/dist/wizard/lib/reconciliation.js +173 -0
- package/dist/wizard/lib/revenue-types.d.ts +5 -0
- package/dist/wizard/lib/revenue-types.js +1 -0
- package/dist/wizard/lib/route-optimizer.d.ts +28 -0
- package/dist/wizard/lib/route-optimizer.js +93 -0
- package/dist/wizard/lib/s3-deploy.d.ts +19 -0
- package/dist/wizard/lib/s3-deploy.js +156 -0
- package/dist/wizard/lib/safety-tiers.d.ts +76 -0
- package/dist/wizard/lib/safety-tiers.js +134 -0
- package/dist/wizard/lib/sentry-generator.d.ts +15 -0
- package/dist/wizard/lib/sentry-generator.js +116 -0
- package/dist/wizard/lib/server-config.d.ts +13 -0
- package/dist/wizard/lib/server-config.js +23 -0
- package/dist/wizard/lib/service-install.d.ts +18 -0
- package/dist/wizard/lib/service-install.js +182 -0
- package/dist/wizard/lib/site-scanner.d.ts +80 -0
- package/dist/wizard/lib/site-scanner.js +262 -0
- package/dist/wizard/lib/ssh-deploy.d.ts +25 -0
- package/dist/wizard/lib/ssh-deploy.js +225 -0
- package/dist/wizard/lib/templates.d.ts +24 -0
- package/dist/wizard/lib/templates.js +219 -0
- package/dist/wizard/lib/totp.d.ts +35 -0
- package/dist/wizard/lib/totp.js +277 -0
- package/dist/wizard/lib/tower-auth.d.ts +43 -0
- package/dist/wizard/lib/tower-auth.js +352 -0
- package/dist/wizard/lib/tower-rate-limit.d.ts +14 -0
- package/dist/wizard/lib/tower-rate-limit.js +61 -0
- package/dist/wizard/lib/tower-session.d.ts +28 -0
- package/dist/wizard/lib/tower-session.js +119 -0
- package/dist/wizard/lib/treasury-backup.d.ts +23 -0
- package/dist/wizard/lib/treasury-backup.js +127 -0
- package/dist/wizard/lib/treasury-circuit-breakers.d.ts +28 -0
- package/dist/wizard/lib/treasury-circuit-breakers.js +74 -0
- package/dist/wizard/lib/treasury-handlers.d.ts +21 -0
- package/dist/wizard/lib/treasury-handlers.js +281 -0
- package/dist/wizard/lib/treasury-heartbeat.d.ts +18 -0
- package/dist/wizard/lib/treasury-heartbeat.js +20 -0
- package/dist/wizard/lib/treasury-io.d.ts +107 -0
- package/dist/wizard/lib/treasury-io.js +254 -0
- package/dist/wizard/lib/treasury-jobs.d.ts +14 -0
- package/dist/wizard/lib/treasury-jobs.js +589 -0
- package/dist/wizard/lib/treasury-migrator.d.ts +59 -0
- package/dist/wizard/lib/treasury-migrator.js +227 -0
- package/dist/wizard/lib/treasury-reader.d.ts +52 -0
- package/dist/wizard/lib/treasury-reader.js +235 -0
- package/dist/wizard/lib/updater.d.ts +29 -0
- package/dist/wizard/lib/updater.js +203 -0
- package/dist/wizard/lib/user-manager.d.ts +39 -0
- package/dist/wizard/lib/user-manager.js +182 -0
- package/dist/wizard/lib/vault.d.ts +26 -0
- package/dist/wizard/lib/vault.js +161 -0
- package/dist/wizard/router.d.ts +12 -0
- package/dist/wizard/router.js +58 -0
- package/dist/wizard/server.d.ts +18 -0
- package/dist/wizard/server.js +427 -0
- package/dist/wizard/ui/app.js +1357 -0
- package/dist/wizard/ui/danger-room-prophecy.js +217 -0
- package/dist/wizard/ui/danger-room.html +27 -0
- package/dist/wizard/ui/danger-room.js +29 -0
- package/dist/wizard/ui/deploy.html +181 -0
- package/dist/wizard/ui/deploy.js +616 -0
- package/dist/wizard/ui/favicon.svg +11 -0
- package/dist/wizard/ui/index.html +407 -0
- package/dist/wizard/ui/lobby.html +235 -0
- package/dist/wizard/ui/lobby.js +843 -0
- package/dist/wizard/ui/login.html +111 -0
- package/dist/wizard/ui/login.js +199 -0
- package/dist/wizard/ui/project.html +285 -0
- package/dist/wizard/ui/project.js +324 -0
- package/dist/wizard/ui/rollback.js +107 -0
- package/dist/wizard/ui/styles.css +1040 -0
- package/dist/wizard/ui/tower.html +177 -0
- package/dist/wizard/ui/tower.js +445 -0
- package/dist/wizard/ui/war-room-prophecy.js +217 -0
- package/dist/wizard/ui/war-room.html +27 -0
- package/dist/wizard/ui/war-room.js +29 -0
- package/package.json +60 -0
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import { request as httpsRequest } from 'node:https';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { addRoute } from '../router.js';
|
|
5
|
+
import { vaultGet } from '../lib/vault.js';
|
|
6
|
+
import { getSessionPassword } from './credentials.js';
|
|
7
|
+
import { resolveModelWithLimits } from '../lib/anthropic.js';
|
|
8
|
+
import { parseFrontmatter, validateFrontmatter } from '../lib/frontmatter.js';
|
|
9
|
+
import { parseJsonBody } from '../lib/body-parser.js';
|
|
10
|
+
import { listTemplates, getTemplate } from '../lib/templates.js';
|
|
11
|
+
import { sendJson } from '../lib/http-helpers.js';
|
|
12
|
+
/**
|
|
13
|
+
* Extract the prompt from inside the outer ``` fence after "## The Prompt".
|
|
14
|
+
* Tracks fence nesting so inner ```yaml / ``` pairs don't end extraction early.
|
|
15
|
+
*/
|
|
16
|
+
function extractFencedPrompt(markdown) {
|
|
17
|
+
const promptIdx = markdown.indexOf('## The Prompt');
|
|
18
|
+
if (promptIdx === -1)
|
|
19
|
+
return markdown;
|
|
20
|
+
const afterHeading = markdown.slice(promptIdx);
|
|
21
|
+
// Find the opening fence (a line that is exactly ```)
|
|
22
|
+
const openMatch = afterHeading.match(/\n```\s*\n/);
|
|
23
|
+
if (!openMatch || openMatch.index === undefined)
|
|
24
|
+
return markdown;
|
|
25
|
+
const contentStart = promptIdx + openMatch.index + openMatch[0].length;
|
|
26
|
+
const lines = markdown.slice(contentStart).split('\n');
|
|
27
|
+
const resultLines = [];
|
|
28
|
+
let depth = 0;
|
|
29
|
+
for (const line of lines) {
|
|
30
|
+
// Opening fence: ```something or just ```
|
|
31
|
+
if (/^```\S/.test(line)) {
|
|
32
|
+
depth++;
|
|
33
|
+
resultLines.push(line);
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
// Closing fence: exactly ```
|
|
37
|
+
if (/^```\s*$/.test(line)) {
|
|
38
|
+
if (depth > 0) {
|
|
39
|
+
depth--;
|
|
40
|
+
resultLines.push(line);
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
// depth === 0 means this closes the outer fence
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
resultLines.push(line);
|
|
47
|
+
}
|
|
48
|
+
return resultLines.join('\n').trim();
|
|
49
|
+
}
|
|
50
|
+
// POST /api/prd/validate — validate PRD content
|
|
51
|
+
addRoute('POST', '/api/prd/validate', async (req, res) => {
|
|
52
|
+
const body = await parseJsonBody(req);
|
|
53
|
+
if (!body.content || typeof body.content !== 'string') {
|
|
54
|
+
sendJson(res, 400, { error: 'content is required' });
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const { frontmatter } = parseFrontmatter(body.content);
|
|
58
|
+
const errors = validateFrontmatter(frontmatter);
|
|
59
|
+
sendJson(res, 200, {
|
|
60
|
+
valid: errors.length === 0,
|
|
61
|
+
errors,
|
|
62
|
+
frontmatter,
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
// POST /api/prd/generate — generate PRD from idea using Claude
|
|
66
|
+
addRoute('POST', '/api/prd/generate', async (req, res) => {
|
|
67
|
+
const body = await parseJsonBody(req);
|
|
68
|
+
if (!body.idea || typeof body.idea !== 'string') {
|
|
69
|
+
sendJson(res, 400, { error: 'idea is required' });
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const password = getSessionPassword();
|
|
73
|
+
if (!password) {
|
|
74
|
+
sendJson(res, 401, { error: 'Vault is locked. Unlock with your password first.' });
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const apiKey = await vaultGet(password, 'anthropic-api-key');
|
|
78
|
+
if (!apiKey) {
|
|
79
|
+
sendJson(res, 400, { error: 'Anthropic API key not configured. Complete step 1 first.' });
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
// Load the PRD generator prompt
|
|
83
|
+
const promptPath = join(import.meta.dirname, '..', '..', 'docs', 'methods', 'PRD_GENERATOR.md');
|
|
84
|
+
let generatorPrompt;
|
|
85
|
+
try {
|
|
86
|
+
generatorPrompt = await readFile(promptPath, 'utf-8');
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
sendJson(res, 500, { error: 'Could not load PRD generator prompt' });
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
// Extract prompt from inside the outer ``` fence block after "## The Prompt"
|
|
93
|
+
const basePrompt = extractFencedPrompt(generatorPrompt);
|
|
94
|
+
// Build the idea with any preferences
|
|
95
|
+
let userIdea = body.idea;
|
|
96
|
+
const prefs = [];
|
|
97
|
+
if (body.name)
|
|
98
|
+
prefs.push(`Project name: ${body.name}`);
|
|
99
|
+
if (body.framework)
|
|
100
|
+
prefs.push(`Framework preference: ${body.framework}`);
|
|
101
|
+
if (body.database)
|
|
102
|
+
prefs.push(`Database preference: ${body.database}`);
|
|
103
|
+
if (body.deploy)
|
|
104
|
+
prefs.push(`Deploy target: ${body.deploy}`);
|
|
105
|
+
if (prefs.length > 0) {
|
|
106
|
+
userIdea += '\n\nPreferences:\n' + prefs.join('\n');
|
|
107
|
+
}
|
|
108
|
+
// Resolve the best available model with its max output capacity
|
|
109
|
+
const { id: model, maxTokens } = await resolveModelWithLimits(apiKey);
|
|
110
|
+
// Stream response via SSE
|
|
111
|
+
res.writeHead(200, {
|
|
112
|
+
'Content-Type': 'text/event-stream',
|
|
113
|
+
'Cache-Control': 'no-cache',
|
|
114
|
+
'Connection': 'keep-alive',
|
|
115
|
+
});
|
|
116
|
+
const postData = JSON.stringify({
|
|
117
|
+
model,
|
|
118
|
+
max_tokens: maxTokens,
|
|
119
|
+
stream: true,
|
|
120
|
+
messages: [
|
|
121
|
+
{
|
|
122
|
+
role: 'user',
|
|
123
|
+
content: `${basePrompt}\n\nTHE PRODUCT IDEA:\n${userIdea}`,
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
});
|
|
127
|
+
let clientDisconnected = false;
|
|
128
|
+
/** Safe write — no-op if client already disconnected */
|
|
129
|
+
function sseWrite(chunk) {
|
|
130
|
+
if (clientDisconnected || res.writableEnded)
|
|
131
|
+
return;
|
|
132
|
+
try {
|
|
133
|
+
res.write(chunk);
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
clientDisconnected = true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function sseEnd() {
|
|
140
|
+
if (clientDisconnected || res.writableEnded)
|
|
141
|
+
return;
|
|
142
|
+
try {
|
|
143
|
+
res.end();
|
|
144
|
+
}
|
|
145
|
+
catch { /* already closed */ }
|
|
146
|
+
}
|
|
147
|
+
req.on('close', () => {
|
|
148
|
+
clientDisconnected = true;
|
|
149
|
+
clearInterval(keepaliveTimer);
|
|
150
|
+
apiReq.destroy();
|
|
151
|
+
});
|
|
152
|
+
// SSE keepalive — prevents proxy/VPN/browser timeout during generation
|
|
153
|
+
const keepaliveTimer = setInterval(() => {
|
|
154
|
+
sseWrite(': keepalive\n\n');
|
|
155
|
+
}, 15000);
|
|
156
|
+
const apiReq = httpsRequest({
|
|
157
|
+
hostname: 'api.anthropic.com',
|
|
158
|
+
path: '/v1/messages',
|
|
159
|
+
method: 'POST',
|
|
160
|
+
headers: {
|
|
161
|
+
'Content-Type': 'application/json',
|
|
162
|
+
'x-api-key': apiKey,
|
|
163
|
+
'anthropic-version': '2023-06-01',
|
|
164
|
+
'Content-Length': Buffer.byteLength(postData),
|
|
165
|
+
},
|
|
166
|
+
timeout: 120000,
|
|
167
|
+
}, (apiRes) => {
|
|
168
|
+
if (apiRes.statusCode !== 200) {
|
|
169
|
+
let errBody = '';
|
|
170
|
+
apiRes.on('data', (chunk) => { errBody += chunk.toString(); });
|
|
171
|
+
apiRes.on('end', () => {
|
|
172
|
+
clearInterval(keepaliveTimer);
|
|
173
|
+
sseWrite(`data: ${JSON.stringify({ error: `API error: ${apiRes.statusCode}` })}\n\n`);
|
|
174
|
+
sseWrite('data: [DONE]\n\n');
|
|
175
|
+
sseEnd();
|
|
176
|
+
});
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
let buffer = '';
|
|
180
|
+
let stopReason = null;
|
|
181
|
+
apiRes.on('data', (chunk) => {
|
|
182
|
+
buffer += chunk.toString();
|
|
183
|
+
const lines = buffer.split('\n');
|
|
184
|
+
buffer = lines.pop() ?? '';
|
|
185
|
+
for (const line of lines) {
|
|
186
|
+
if (!line.startsWith('data: '))
|
|
187
|
+
continue;
|
|
188
|
+
const data = line.slice(6);
|
|
189
|
+
if (data === '[DONE]')
|
|
190
|
+
continue;
|
|
191
|
+
try {
|
|
192
|
+
const event = JSON.parse(data);
|
|
193
|
+
if (event.type === 'content_block_delta' && event.delta?.text) {
|
|
194
|
+
sseWrite(`data: ${JSON.stringify({ text: event.delta.text })}\n\n`);
|
|
195
|
+
}
|
|
196
|
+
if (event.type === 'message_delta' && event.delta?.stop_reason) {
|
|
197
|
+
stopReason = event.delta.stop_reason;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
catch {
|
|
201
|
+
// Skip unparseable chunks
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
apiRes.on('end', () => {
|
|
206
|
+
clearInterval(keepaliveTimer);
|
|
207
|
+
if (stopReason === 'max_tokens') {
|
|
208
|
+
sseWrite(`data: ${JSON.stringify({ truncated: true })}\n\n`);
|
|
209
|
+
}
|
|
210
|
+
sseWrite('data: [DONE]\n\n');
|
|
211
|
+
sseEnd();
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
apiReq.on('error', (err) => {
|
|
215
|
+
clearInterval(keepaliveTimer);
|
|
216
|
+
sseWrite(`data: ${JSON.stringify({ error: 'Generation failed' })}\n\n`);
|
|
217
|
+
sseWrite('data: [DONE]\n\n');
|
|
218
|
+
sseEnd();
|
|
219
|
+
});
|
|
220
|
+
apiReq.write(postData);
|
|
221
|
+
apiReq.end();
|
|
222
|
+
});
|
|
223
|
+
// POST /api/prd/env-requirements — parse PRD for project-specific credentials
|
|
224
|
+
addRoute('POST', '/api/prd/env-requirements', async (req, res) => {
|
|
225
|
+
const body = await parseJsonBody(req);
|
|
226
|
+
if (!body.content || typeof body.content !== 'string') {
|
|
227
|
+
sendJson(res, 400, { error: 'content is required' });
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
const groups = parseEnvRequirements(body.content);
|
|
231
|
+
sendJson(res, 200, { groups });
|
|
232
|
+
});
|
|
233
|
+
/**
|
|
234
|
+
* Env vars that are auto-generated, infrastructure, or app config — never collect from user.
|
|
235
|
+
* These are either provisioned by the deploy pipeline, generated at build time,
|
|
236
|
+
* or derived from project config. Generic across all projects.
|
|
237
|
+
*/
|
|
238
|
+
const SKIP_VARS = new Set([
|
|
239
|
+
// App config (derived from project setup)
|
|
240
|
+
'NODE_ENV', 'PORT',
|
|
241
|
+
'NEXT_PUBLIC_APP_URL', 'NEXT_PUBLIC_APP_NAME',
|
|
242
|
+
// Infrastructure (provisioned by deploy pipeline)
|
|
243
|
+
'DATABASE_URL', 'REDIS_URL', 'REDIS_PASSWORD',
|
|
244
|
+
// Secrets (auto-generated at build time)
|
|
245
|
+
'SESSION_SECRET', 'SESSION_COOKIE_NAME', 'SESSION_TTL_DAYS',
|
|
246
|
+
'CSRF_SECRET',
|
|
247
|
+
// Storage (provisioned by deploy pipeline)
|
|
248
|
+
'S3_ENDPOINT', 'S3_ACCESS_KEY', 'S3_SECRET_KEY', 'S3_BUCKET_NAME',
|
|
249
|
+
'S3_REGION', 'S3_PUBLIC_URL',
|
|
250
|
+
]);
|
|
251
|
+
/** Prefixes that indicate feature flags — always skip. */
|
|
252
|
+
const SKIP_PREFIXES = ['ENABLE_'];
|
|
253
|
+
function parseEnvRequirements(prdContent) {
|
|
254
|
+
// Find the env vars section — look for a block with multiple VAR="value" lines
|
|
255
|
+
const lines = prdContent.split('\n');
|
|
256
|
+
const groups = [];
|
|
257
|
+
let currentGroup = null;
|
|
258
|
+
for (const line of lines) {
|
|
259
|
+
// Detect section headers like "# ─── WhatsApp Business API ───────"
|
|
260
|
+
const headerMatch = line.match(/^#\s*[─\-]+\s*(.+?)\s*[─\-]*$/);
|
|
261
|
+
if (headerMatch) {
|
|
262
|
+
const name = headerMatch[1].trim();
|
|
263
|
+
currentGroup = { name, fields: [] };
|
|
264
|
+
groups.push(currentGroup);
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
// Detect env var assignments: VAR_NAME="value" or VAR_NAME=value
|
|
268
|
+
const varMatch = line.match(/^([A-Z][A-Z0-9_]+)=["']?(.*?)["']?\s*(?:#.*)?$/);
|
|
269
|
+
if (!varMatch || !currentGroup)
|
|
270
|
+
continue;
|
|
271
|
+
const [, key, rawValue] = varMatch;
|
|
272
|
+
// Skip auto-generated / infrastructure / tuning vars
|
|
273
|
+
if (SKIP_VARS.has(key))
|
|
274
|
+
continue;
|
|
275
|
+
if (SKIP_PREFIXES.some((p) => key.startsWith(p)))
|
|
276
|
+
continue;
|
|
277
|
+
const value = rawValue.trim();
|
|
278
|
+
// Skip tuning params — values that are purely numeric, boolean, or duration-like
|
|
279
|
+
// These are config knobs, not API credentials (e.g., MAX_RETRIES="5", TIMEOUT_MS="30000")
|
|
280
|
+
if (/^\d+$/.test(value) || value === 'true' || value === 'false')
|
|
281
|
+
continue;
|
|
282
|
+
// Skip if the value looks like a real config URL (not a placeholder)
|
|
283
|
+
const isApiUrl = key.endsWith('_API_URL') || key.endsWith('_URL');
|
|
284
|
+
if (isApiUrl && value.startsWith('http'))
|
|
285
|
+
continue;
|
|
286
|
+
// Only collect vars that look like they need user-provided values
|
|
287
|
+
// (empty, placeholder prefixes, or common API key patterns)
|
|
288
|
+
const isPlaceholder = !value
|
|
289
|
+
|| value.includes('your-')
|
|
290
|
+
|| value.includes('your_')
|
|
291
|
+
|| /^(sk-|pk\.|AIza|re_|ghp_)/.test(value)
|
|
292
|
+
|| value.endsWith('...')
|
|
293
|
+
|| value.startsWith('Bearer ');
|
|
294
|
+
if (!isPlaceholder && value.length > 0)
|
|
295
|
+
continue;
|
|
296
|
+
// Determine if this is a secret field
|
|
297
|
+
const secretPatterns = ['KEY', 'SECRET', 'TOKEN', 'PASSWORD'];
|
|
298
|
+
const isSecret = secretPatterns.some((p) => key.includes(p));
|
|
299
|
+
// Generate human-readable label from var name
|
|
300
|
+
const label = key
|
|
301
|
+
.replace(/_/g, ' ')
|
|
302
|
+
.replace(/\b\w/g, (c) => c.toUpperCase())
|
|
303
|
+
.replace(/\bApi\b/g, 'API')
|
|
304
|
+
.replace(/\bUrl\b/g, 'URL')
|
|
305
|
+
.replace(/\bId\b/g, 'ID')
|
|
306
|
+
.replace(/\bSdk\b/g, 'SDK')
|
|
307
|
+
.replace(/\bApp\b/g, 'App');
|
|
308
|
+
currentGroup.fields.push({
|
|
309
|
+
key,
|
|
310
|
+
label,
|
|
311
|
+
placeholder: value || key.toLowerCase().replace(/_/g, '-'),
|
|
312
|
+
secret: isSecret,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
// Filter out empty groups
|
|
316
|
+
return groups.filter((g) => g.fields.length > 0);
|
|
317
|
+
}
|
|
318
|
+
// GET /api/prd/template — return the PRD template
|
|
319
|
+
addRoute('GET', '/api/prd/template', async (_req, res) => {
|
|
320
|
+
const templatePath = join(import.meta.dirname, '..', '..', 'docs', 'PRD.md');
|
|
321
|
+
try {
|
|
322
|
+
const content = await readFile(templatePath, 'utf-8');
|
|
323
|
+
sendJson(res, 200, { content });
|
|
324
|
+
}
|
|
325
|
+
catch {
|
|
326
|
+
sendJson(res, 500, { error: 'Could not load PRD template' });
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
// GET /api/prd/prompt — return the PRD generator prompt for use with other AIs
|
|
330
|
+
addRoute('GET', '/api/prd/prompt', async (_req, res) => {
|
|
331
|
+
const promptPath = join(import.meta.dirname, '..', '..', 'docs', 'methods', 'PRD_GENERATOR.md');
|
|
332
|
+
try {
|
|
333
|
+
const content = await readFile(promptPath, 'utf-8');
|
|
334
|
+
sendJson(res, 200, { prompt: extractFencedPrompt(content) });
|
|
335
|
+
}
|
|
336
|
+
catch {
|
|
337
|
+
sendJson(res, 500, { error: 'Could not load PRD generator prompt' });
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
// GET /api/prd/templates — list available project templates
|
|
341
|
+
addRoute('GET', '/api/prd/templates', async (_req, res) => {
|
|
342
|
+
sendJson(res, 200, { templates: listTemplates() });
|
|
343
|
+
});
|
|
344
|
+
// GET /api/prd/templates/:id — get a specific template's full PRD content
|
|
345
|
+
addRoute('GET', '/api/prd/templates/get', async (req, res) => {
|
|
346
|
+
const url = new URL(req.url || '', 'http://localhost');
|
|
347
|
+
const id = url.searchParams.get('id');
|
|
348
|
+
if (!id) {
|
|
349
|
+
sendJson(res, 400, { error: 'id query parameter is required' });
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
const template = getTemplate(id);
|
|
353
|
+
if (!template) {
|
|
354
|
+
sendJson(res, 404, { error: `Template not found: ${id}` });
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
// Build a complete PRD with frontmatter
|
|
358
|
+
const frontmatterYaml = Object.entries(template.frontmatter)
|
|
359
|
+
.map(([k, v]) => `${k}: "${v}"`)
|
|
360
|
+
.join('\n');
|
|
361
|
+
const prd = `\`\`\`yaml\nname: "[PROJECT_NAME]"\n${frontmatterYaml}\n\`\`\`\n\n---\n\n${template.prdSections}`;
|
|
362
|
+
sendJson(res, 200, { template: { ...template, prd } });
|
|
363
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile, copyFile, readdir, stat } from 'node:fs/promises';
|
|
2
|
+
import { join, resolve } from 'node:path';
|
|
3
|
+
import { execFile } from 'node:child_process';
|
|
4
|
+
import { promisify } from 'node:util';
|
|
5
|
+
import { addRoute } from '../router.js';
|
|
6
|
+
import { parseJsonBody } from '../lib/body-parser.js';
|
|
7
|
+
import { addProject } from '../lib/project-registry.js';
|
|
8
|
+
import { validateSession, parseSessionCookie, getClientIp, isRemoteMode } from '../lib/tower-auth.js';
|
|
9
|
+
import { sendJson } from '../lib/http-helpers.js';
|
|
10
|
+
const execFileAsync = promisify(execFile);
|
|
11
|
+
const SCAFFOLD_DIR = resolve(import.meta.dirname, '..', '..');
|
|
12
|
+
function sanitizeDirName(name) {
|
|
13
|
+
return name
|
|
14
|
+
.toLowerCase()
|
|
15
|
+
.replace(/[^a-z0-9\-_]/g, '-')
|
|
16
|
+
.replace(/-+/g, '-')
|
|
17
|
+
.replace(/^-|-$/g, '');
|
|
18
|
+
}
|
|
19
|
+
// POST /api/project/validate — validate project config
|
|
20
|
+
addRoute('POST', '/api/project/validate', async (req, res) => {
|
|
21
|
+
const body = await parseJsonBody(req);
|
|
22
|
+
const errors = [];
|
|
23
|
+
if (!body.name || body.name.trim().length === 0) {
|
|
24
|
+
errors.push('Project name is required');
|
|
25
|
+
}
|
|
26
|
+
if (!body.directory || body.directory.trim().length === 0) {
|
|
27
|
+
errors.push('Project directory is required');
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
const dir = resolve(body.directory);
|
|
31
|
+
try {
|
|
32
|
+
const s = await stat(dir);
|
|
33
|
+
if (s.isDirectory()) {
|
|
34
|
+
const entries = await readdir(dir);
|
|
35
|
+
if (entries.length > 0) {
|
|
36
|
+
errors.push('Directory already exists and is not empty');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
// Directory doesn't exist — that's fine
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const homeDir = process.env['HOME'] ?? process.env['USERPROFILE'] ?? '/tmp';
|
|
45
|
+
const suggestedDir = body.name
|
|
46
|
+
? resolve(homeDir, 'Projects', sanitizeDirName(body.name))
|
|
47
|
+
: undefined;
|
|
48
|
+
sendJson(res, 200, { valid: errors.length === 0, errors, suggestedDir });
|
|
49
|
+
});
|
|
50
|
+
/** Recursively copy a directory, excluding specified paths */
|
|
51
|
+
async function copyDir(src, dest, exclude = []) {
|
|
52
|
+
await mkdir(dest, { recursive: true });
|
|
53
|
+
const entries = await readdir(src, { withFileTypes: true });
|
|
54
|
+
for (const entry of entries) {
|
|
55
|
+
const srcPath = join(src, entry.name);
|
|
56
|
+
const destPath = join(dest, entry.name);
|
|
57
|
+
// Check exclusions
|
|
58
|
+
const relative = srcPath.slice(SCAFFOLD_DIR.length + 1);
|
|
59
|
+
if (exclude.some(ex => relative.startsWith(ex))) {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (entry.isDirectory()) {
|
|
63
|
+
await copyDir(srcPath, destPath, exclude);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
await copyFile(srcPath, destPath);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// POST /api/project/create — create the project
|
|
71
|
+
addRoute('POST', '/api/project/create', async (req, res) => {
|
|
72
|
+
const raw = await parseJsonBody(req);
|
|
73
|
+
if (typeof raw !== 'object' || raw === null) {
|
|
74
|
+
sendJson(res, 400, { error: 'Request body must be a JSON object' });
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const body = raw;
|
|
78
|
+
if (typeof body.name !== 'string' || body.name.trim().length === 0 ||
|
|
79
|
+
typeof body.directory !== 'string' || body.directory.trim().length === 0) {
|
|
80
|
+
sendJson(res, 400, { error: 'name and directory are required strings' });
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
// Coerce optional fields to safe strings (strip newlines for .env injection prevention)
|
|
84
|
+
const safeName = String(body.name).replace(/[\r\n]/g, ' ').trim();
|
|
85
|
+
const safeDir = String(body.directory).trim();
|
|
86
|
+
const safeDescription = typeof body.description === 'string' ? body.description.replace(/[\r\n]/g, ' ').trim() : '';
|
|
87
|
+
const safeDomain = typeof body.domain === 'string' ? body.domain.replace(/[\r\n]/g, '').trim() : '';
|
|
88
|
+
const safeHostname = typeof body.hostname === 'string' ? body.hostname.replace(/[\r\n]/g, '').trim() : '';
|
|
89
|
+
const safeDeploy = typeof body.deploy === 'string' ? body.deploy.replace(/[\r\n]/g, '').trim() : '';
|
|
90
|
+
const safePrd = typeof body.prd === 'string' ? body.prd : '';
|
|
91
|
+
const projectDir = resolve(safeDir);
|
|
92
|
+
try {
|
|
93
|
+
// Create project directory
|
|
94
|
+
await mkdir(projectDir, { recursive: true });
|
|
95
|
+
// Copy CLAUDE.md
|
|
96
|
+
await copyFile(join(SCAFFOLD_DIR, 'CLAUDE.md'), join(projectDir, 'CLAUDE.md'));
|
|
97
|
+
// Copy docs/
|
|
98
|
+
await copyDir(join(SCAFFOLD_DIR, 'docs'), join(projectDir, 'docs'));
|
|
99
|
+
// Copy .claude/
|
|
100
|
+
const claudeDir = join(SCAFFOLD_DIR, '.claude');
|
|
101
|
+
try {
|
|
102
|
+
await copyDir(claudeDir, join(projectDir, '.claude'));
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
// .claude dir might not exist
|
|
106
|
+
}
|
|
107
|
+
// Copy .gitignore
|
|
108
|
+
try {
|
|
109
|
+
await copyFile(join(SCAFFOLD_DIR, '.gitignore'), join(projectDir, '.gitignore'));
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
// OK
|
|
113
|
+
}
|
|
114
|
+
// Create logs directory with build-state.md
|
|
115
|
+
await mkdir(join(projectDir, 'logs'), { recursive: true });
|
|
116
|
+
const buildState = `# Build State
|
|
117
|
+
|
|
118
|
+
**Project:** ${safeName}
|
|
119
|
+
**Current Phase:** 0 (not started)
|
|
120
|
+
**Last Updated:** ${new Date().toISOString()}
|
|
121
|
+
**Active Agent:** None
|
|
122
|
+
|
|
123
|
+
## Phase Status
|
|
124
|
+
| Phase | Status | Gate Passed |
|
|
125
|
+
|-------|--------|-------------|
|
|
126
|
+
| 0-13 | not started | — |
|
|
127
|
+
|
|
128
|
+
## Current Blockers
|
|
129
|
+
- None — ready to start. Run /build to begin.
|
|
130
|
+
|
|
131
|
+
## Next Steps
|
|
132
|
+
1. Review docs/PRD.md
|
|
133
|
+
2. Run /build to start Phase 0
|
|
134
|
+
`;
|
|
135
|
+
await writeFile(join(projectDir, 'logs', 'build-state.md'), buildState);
|
|
136
|
+
// Replace placeholder in CLAUDE.md
|
|
137
|
+
const claudeMdPath = join(projectDir, 'CLAUDE.md');
|
|
138
|
+
let claudeMd = await readFile(claudeMdPath, 'utf-8');
|
|
139
|
+
claudeMd = claudeMd.replace(/\[PROJECT_NAME\]/g, safeName);
|
|
140
|
+
if (safeDescription) {
|
|
141
|
+
claudeMd = claudeMd.replace(/\[ONE_LINE_DESCRIPTION\]/g, safeDescription);
|
|
142
|
+
}
|
|
143
|
+
if (safeDomain) {
|
|
144
|
+
claudeMd = claudeMd.replace(/\[DOMAIN\]/g, safeDomain);
|
|
145
|
+
}
|
|
146
|
+
await writeFile(claudeMdPath, claudeMd);
|
|
147
|
+
// Write PRD if provided
|
|
148
|
+
if (safePrd) {
|
|
149
|
+
await writeFile(join(projectDir, 'docs', 'PRD.md'), safePrd);
|
|
150
|
+
}
|
|
151
|
+
// Create .env from template (newlines stripped from values to prevent injection)
|
|
152
|
+
const deployLine = safeDeploy ? `\n# Deploy target: ${safeDeploy}\nDEPLOY_TARGET=${safeDeploy}\n` : '';
|
|
153
|
+
const hostnameLine = safeHostname ? `\n# DNS hostname (Cloudflare)\nHOSTNAME=${safeHostname}\n` : '';
|
|
154
|
+
const envContent = `# ${safeName} — Environment Variables
|
|
155
|
+
# Generated by VoidForge wizard on ${new Date().toISOString()}
|
|
156
|
+
${deployLine}${hostnameLine}
|
|
157
|
+
# Add your environment variables here
|
|
158
|
+
# NODE_ENV=development
|
|
159
|
+
`;
|
|
160
|
+
await writeFile(join(projectDir, '.env'), envContent);
|
|
161
|
+
// Initialize git repo
|
|
162
|
+
try {
|
|
163
|
+
await execFileAsync('git', ['init'], { cwd: projectDir });
|
|
164
|
+
await execFileAsync('git', ['add', '-A'], { cwd: projectDir });
|
|
165
|
+
await execFileAsync('git', ['commit', '-m', `Initial commit: ${safeName} via VoidForge`], { cwd: projectDir });
|
|
166
|
+
}
|
|
167
|
+
catch (err) {
|
|
168
|
+
// Git init is best-effort
|
|
169
|
+
const msg = err instanceof Error ? err.message.split('\n')[0] : String(err);
|
|
170
|
+
console.warn(`Git initialization skipped: ${msg}. Project created but not version-controlled.`);
|
|
171
|
+
}
|
|
172
|
+
// Register in project registry for The Lobby
|
|
173
|
+
try {
|
|
174
|
+
await addProject({
|
|
175
|
+
name: safeName,
|
|
176
|
+
directory: projectDir,
|
|
177
|
+
deployTarget: safeDeploy || 'unknown',
|
|
178
|
+
deployUrl: safeHostname ? `https://${safeHostname}` : '',
|
|
179
|
+
sshHost: '',
|
|
180
|
+
framework: 'unknown',
|
|
181
|
+
database: 'none',
|
|
182
|
+
createdAt: new Date().toISOString(),
|
|
183
|
+
lastBuildPhase: 0,
|
|
184
|
+
lastDeployAt: '',
|
|
185
|
+
healthCheckUrl: '',
|
|
186
|
+
monthlyCost: 0,
|
|
187
|
+
owner: (() => {
|
|
188
|
+
if (!isRemoteMode())
|
|
189
|
+
return 'local';
|
|
190
|
+
const token = parseSessionCookie(req.headers.cookie);
|
|
191
|
+
const ip = getClientIp(req);
|
|
192
|
+
const session = token ? validateSession(token, ip) : null;
|
|
193
|
+
return session?.username ?? '';
|
|
194
|
+
})(),
|
|
195
|
+
access: [],
|
|
196
|
+
linkedProjects: [],
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
catch {
|
|
200
|
+
// Registry write is best-effort — don't fail project creation
|
|
201
|
+
}
|
|
202
|
+
// Write .voidforge marker file for CLI compatibility
|
|
203
|
+
try {
|
|
204
|
+
const { createMarker, writeMarker } = await import('../lib/marker.js');
|
|
205
|
+
const marker = createMarker('21.0.0', 'full');
|
|
206
|
+
await writeMarker(projectDir, marker);
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
// Marker write is best-effort — don't fail project creation
|
|
210
|
+
}
|
|
211
|
+
sendJson(res, 200, {
|
|
212
|
+
created: true,
|
|
213
|
+
directory: projectDir,
|
|
214
|
+
files: [
|
|
215
|
+
'CLAUDE.md',
|
|
216
|
+
'.claude/commands/',
|
|
217
|
+
'.claude/settings.json',
|
|
218
|
+
'docs/PRD.md',
|
|
219
|
+
'docs/methods/',
|
|
220
|
+
'docs/patterns/',
|
|
221
|
+
'docs/LESSONS.md',
|
|
222
|
+
'logs/build-state.md',
|
|
223
|
+
'.env',
|
|
224
|
+
'.gitignore',
|
|
225
|
+
],
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
catch (err) {
|
|
229
|
+
const message = err instanceof Error ? err.message : 'Failed to create project';
|
|
230
|
+
console.error('Project creation error:', message);
|
|
231
|
+
sendJson(res, 500, { error: 'Failed to create project' });
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
// GET /api/project/defaults — return default values
|
|
235
|
+
addRoute('GET', '/api/project/defaults', async (_req, res) => {
|
|
236
|
+
const homeDir = process.env['HOME'] ?? '/tmp';
|
|
237
|
+
sendJson(res, 200, {
|
|
238
|
+
baseDir: resolve(homeDir, 'Projects'),
|
|
239
|
+
scaffoldDir: SCAFFOLD_DIR,
|
|
240
|
+
});
|
|
241
|
+
});
|