jfl 0.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.
- package/LICENSE +21 -0
- package/README.md +313 -0
- package/clawdbot-skill/README.md +328 -0
- package/clawdbot-skill/SKILL.md +362 -0
- package/clawdbot-skill/index.ts +486 -0
- package/clawdbot-skill/package.json +28 -0
- package/clawdbot-skill/skill.json +28 -0
- package/dist/commands/agents.d.ts +5 -0
- package/dist/commands/agents.d.ts.map +1 -0
- package/dist/commands/agents.js +399 -0
- package/dist/commands/agents.js.map +1 -0
- package/dist/commands/context-hub.d.ts +12 -0
- package/dist/commands/context-hub.d.ts.map +1 -0
- package/dist/commands/context-hub.js +642 -0
- package/dist/commands/context-hub.js.map +1 -0
- package/dist/commands/deploy.d.ts +5 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +370 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/feedback.d.ts +2 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +178 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/hud.d.ts +4 -0
- package/dist/commands/hud.d.ts.map +1 -0
- package/dist/commands/hud.js +262 -0
- package/dist/commands/hud.js.map +1 -0
- package/dist/commands/init.d.ts +4 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +553 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/login.d.ts +23 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +818 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/ralph.d.ts +9 -0
- package/dist/commands/ralph.d.ts.map +1 -0
- package/dist/commands/ralph.js +67 -0
- package/dist/commands/ralph.js.map +1 -0
- package/dist/commands/repair.d.ts +7 -0
- package/dist/commands/repair.d.ts.map +1 -0
- package/dist/commands/repair.js +283 -0
- package/dist/commands/repair.js.map +1 -0
- package/dist/commands/session-mgmt.d.ts +33 -0
- package/dist/commands/session-mgmt.d.ts.map +1 -0
- package/dist/commands/session-mgmt.js +404 -0
- package/dist/commands/session-mgmt.js.map +1 -0
- package/dist/commands/session.d.ts +2 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +639 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/skills.d.ts +31 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +314 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +127 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/synopsis.d.ts +10 -0
- package/dist/commands/synopsis.d.ts.map +1 -0
- package/dist/commands/synopsis.js +277 -0
- package/dist/commands/synopsis.js.map +1 -0
- package/dist/commands/update.d.ts +10 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +165 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/voice.d.ts +410 -0
- package/dist/commands/voice.d.ts.map +1 -0
- package/dist/commands/voice.js +4763 -0
- package/dist/commands/voice.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +512 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/context-hub-mcp.d.ts +11 -0
- package/dist/mcp/context-hub-mcp.d.ts.map +1 -0
- package/dist/mcp/context-hub-mcp.js +548 -0
- package/dist/mcp/context-hub-mcp.js.map +1 -0
- package/dist/telegram/voice.d.ts +146 -0
- package/dist/telegram/voice.d.ts.map +1 -0
- package/dist/telegram/voice.js +351 -0
- package/dist/telegram/voice.js.map +1 -0
- package/dist/types/skills.d.ts +44 -0
- package/dist/types/skills.d.ts.map +1 -0
- package/dist/types/skills.js +5 -0
- package/dist/types/skills.js.map +1 -0
- package/dist/ui/banner.d.ts +18 -0
- package/dist/ui/banner.d.ts.map +1 -0
- package/dist/ui/banner.js +323 -0
- package/dist/ui/banner.js.map +1 -0
- package/dist/ui/index.d.ts +8 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +8 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/prompts.d.ts +52 -0
- package/dist/ui/prompts.d.ts.map +1 -0
- package/dist/ui/prompts.js +72 -0
- package/dist/ui/prompts.js.map +1 -0
- package/dist/ui/theme.d.ts +82 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +142 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/utils/auth-guard.d.ts +66 -0
- package/dist/utils/auth-guard.d.ts.map +1 -0
- package/dist/utils/auth-guard.js +348 -0
- package/dist/utils/auth-guard.js.map +1 -0
- package/dist/utils/ensure-project.d.ts +11 -0
- package/dist/utils/ensure-project.d.ts.map +1 -0
- package/dist/utils/ensure-project.js +70 -0
- package/dist/utils/ensure-project.js.map +1 -0
- package/dist/utils/git.d.ts +73 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +219 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/github-auth.d.ts +54 -0
- package/dist/utils/github-auth.d.ts.map +1 -0
- package/dist/utils/github-auth.js +375 -0
- package/dist/utils/github-auth.js.map +1 -0
- package/dist/utils/github-repo.d.ts +30 -0
- package/dist/utils/github-repo.d.ts.map +1 -0
- package/dist/utils/github-repo.js +219 -0
- package/dist/utils/github-repo.js.map +1 -0
- package/dist/utils/platform-auth.d.ts +81 -0
- package/dist/utils/platform-auth.d.ts.map +1 -0
- package/dist/utils/platform-auth.js +191 -0
- package/dist/utils/platform-auth.js.map +1 -0
- package/dist/utils/project-config.d.ts +43 -0
- package/dist/utils/project-config.d.ts.map +1 -0
- package/dist/utils/project-config.js +97 -0
- package/dist/utils/project-config.js.map +1 -0
- package/dist/utils/skill-registry.d.ts +49 -0
- package/dist/utils/skill-registry.d.ts.map +1 -0
- package/dist/utils/skill-registry.js +192 -0
- package/dist/utils/skill-registry.js.map +1 -0
- package/dist/utils/wallet.d.ts +62 -0
- package/dist/utils/wallet.d.ts.map +1 -0
- package/dist/utils/wallet.js +252 -0
- package/dist/utils/wallet.js.map +1 -0
- package/dist/utils/x402-client.d.ts +86 -0
- package/dist/utils/x402-client.d.ts.map +1 -0
- package/dist/utils/x402-client.js +265 -0
- package/dist/utils/x402-client.js.map +1 -0
- package/package.json +76 -0
- package/scripts/postinstall.js +116 -0
- package/scripts/test-onboarding.sh +121 -0
- package/scripts/voice-start.sh +128 -0
- package/scripts/voice-stop.sh +33 -0
- package/template/.claude/settings.json +92 -0
- package/template/.claude/skills/agent-browser/SKILL.md +116 -0
- package/template/.claude/skills/brand-architect/SKILL.md +240 -0
- package/template/.claude/skills/brand-architect/config.yaml +137 -0
- package/template/.claude/skills/campaign-hud/config.yaml +112 -0
- package/template/.claude/skills/content-creator/SKILL.md +294 -0
- package/template/.claude/skills/debug/MULTI_AGENT.md +360 -0
- package/template/.claude/skills/debug/SKILL.md +549 -0
- package/template/.claude/skills/fly-deploy/SKILL.md +676 -0
- package/template/.claude/skills/founder-video/SKILL.md +467 -0
- package/template/.claude/skills/hud/SKILL.md +157 -0
- package/template/.claude/skills/ralph-tui/SKILL.md +210 -0
- package/template/.claude/skills/react-best-practices/AGENTS.md +2249 -0
- package/template/.claude/skills/react-best-practices/README.md +123 -0
- package/template/.claude/skills/react-best-practices/SKILL.md +125 -0
- package/template/.claude/skills/react-best-practices/metadata.json +15 -0
- package/template/.claude/skills/react-best-practices/rules/_sections.md +46 -0
- package/template/.claude/skills/react-best-practices/rules/_template.md +28 -0
- package/template/.claude/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/template/.claude/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
- package/template/.claude/skills/react-best-practices/rules/async-api-routes.md +38 -0
- package/template/.claude/skills/react-best-practices/rules/async-defer-await.md +80 -0
- package/template/.claude/skills/react-best-practices/rules/async-dependencies.md +36 -0
- package/template/.claude/skills/react-best-practices/rules/async-parallel.md +28 -0
- package/template/.claude/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/template/.claude/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/template/.claude/skills/react-best-practices/rules/bundle-conditional.md +31 -0
- package/template/.claude/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/template/.claude/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/template/.claude/skills/react-best-practices/rules/bundle-preload.md +50 -0
- package/template/.claude/skills/react-best-practices/rules/client-event-listeners.md +74 -0
- package/template/.claude/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/template/.claude/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
- package/template/.claude/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/template/.claude/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/template/.claude/skills/react-best-practices/rules/js-cache-storage.md +70 -0
- package/template/.claude/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/template/.claude/skills/react-best-practices/rules/js-early-exit.md +50 -0
- package/template/.claude/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/template/.claude/skills/react-best-practices/rules/js-index-maps.md +37 -0
- package/template/.claude/skills/react-best-practices/rules/js-length-check-first.md +49 -0
- package/template/.claude/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/template/.claude/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/template/.claude/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/template/.claude/skills/react-best-practices/rules/rendering-activity.md +26 -0
- package/template/.claude/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/template/.claude/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/template/.claude/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/template/.claude/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/template/.claude/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/template/.claude/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/template/.claude/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/template/.claude/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/template/.claude/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/template/.claude/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/template/.claude/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/template/.claude/skills/react-best-practices/rules/rerender-memo.md +44 -0
- package/template/.claude/skills/react-best-practices/rules/rerender-transitions.md +40 -0
- package/template/.claude/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/template/.claude/skills/react-best-practices/rules/server-cache-lru.md +41 -0
- package/template/.claude/skills/react-best-practices/rules/server-cache-react.md +26 -0
- package/template/.claude/skills/react-best-practices/rules/server-parallel-fetching.md +79 -0
- package/template/.claude/skills/react-best-practices/rules/server-serialization.md +38 -0
- package/template/.claude/skills/remotion-best-practices/SKILL.md +43 -0
- package/template/.claude/skills/remotion-best-practices/rules/3d.md +86 -0
- package/template/.claude/skills/remotion-best-practices/rules/animations.md +29 -0
- package/template/.claude/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/template/.claude/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/template/.claude/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/template/.claude/skills/remotion-best-practices/rules/assets.md +78 -0
- package/template/.claude/skills/remotion-best-practices/rules/audio.md +172 -0
- package/template/.claude/skills/remotion-best-practices/rules/calculate-metadata.md +104 -0
- package/template/.claude/skills/remotion-best-practices/rules/can-decode.md +75 -0
- package/template/.claude/skills/remotion-best-practices/rules/charts.md +58 -0
- package/template/.claude/skills/remotion-best-practices/rules/compositions.md +146 -0
- package/template/.claude/skills/remotion-best-practices/rules/display-captions.md +126 -0
- package/template/.claude/skills/remotion-best-practices/rules/extract-frames.md +229 -0
- package/template/.claude/skills/remotion-best-practices/rules/fonts.md +152 -0
- package/template/.claude/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/template/.claude/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/template/.claude/skills/remotion-best-practices/rules/get-video-duration.md +58 -0
- package/template/.claude/skills/remotion-best-practices/rules/gifs.md +138 -0
- package/template/.claude/skills/remotion-best-practices/rules/images.md +130 -0
- package/template/.claude/skills/remotion-best-practices/rules/import-srt-captions.md +67 -0
- package/template/.claude/skills/remotion-best-practices/rules/lottie.md +68 -0
- package/template/.claude/skills/remotion-best-practices/rules/measuring-dom-nodes.md +35 -0
- package/template/.claude/skills/remotion-best-practices/rules/measuring-text.md +143 -0
- package/template/.claude/skills/remotion-best-practices/rules/sequencing.md +106 -0
- package/template/.claude/skills/remotion-best-practices/rules/tailwind.md +11 -0
- package/template/.claude/skills/remotion-best-practices/rules/text-animations.md +20 -0
- package/template/.claude/skills/remotion-best-practices/rules/timing.md +179 -0
- package/template/.claude/skills/remotion-best-practices/rules/transcribe-captions.md +19 -0
- package/template/.claude/skills/remotion-best-practices/rules/transitions.md +122 -0
- package/template/.claude/skills/remotion-best-practices/rules/trimming.md +53 -0
- package/template/.claude/skills/remotion-best-practices/rules/videos.md +171 -0
- package/template/.claude/skills/search/SKILL.md +220 -0
- package/template/.claude/skills/spec/SKILL.md +377 -0
- package/template/.claude/skills/startup/SKILL.md +310 -0
- package/template/.claude/skills/web-architect/SKILL.md +309 -0
- package/template/.claude/skills/x-algorithm/SKILL.md +305 -0
- package/template/.jfl/config.json +8 -0
- package/template/.mcp.json +11 -0
- package/template/CLAUDE.md +960 -0
- package/template/content/.gitkeep +0 -0
- package/template/context-hub +3 -0
- package/template/knowledge/BRAND_BRIEF.md +124 -0
- package/template/knowledge/BRAND_DECISIONS.md +168 -0
- package/template/knowledge/NARRATIVE.md +114 -0
- package/template/knowledge/ROADMAP.md +128 -0
- package/template/knowledge/THESIS.md +108 -0
- package/template/knowledge/VISION.md +74 -0
- package/template/knowledge/VOICE_AND_TONE.md +146 -0
- package/template/previews/.gitkeep +0 -0
- package/template/scripts/session/auto-commit.sh +245 -0
- package/template/scripts/session/auto-merge.sh +325 -0
- package/template/scripts/session/jfl-doctor.sh +587 -0
- package/template/scripts/session/session-end.sh +194 -0
- package/template/scripts/session/session-init.sh +163 -0
- package/template/scripts/session/session-sync.sh +167 -0
- package/template/scripts/session/test-context-preservation.sh +160 -0
- package/template/skills/agent-browser/SKILL.md +116 -0
- package/template/skills/brand-architect/SKILL.md +240 -0
- package/template/skills/brand-architect/config.yaml +137 -0
- package/template/skills/campaign-hud/config.yaml +112 -0
- package/template/skills/content-creator/SKILL.md +294 -0
- package/template/skills/debug/MULTI_AGENT.md +360 -0
- package/template/skills/debug/SKILL.md +549 -0
- package/template/skills/fly-deploy/SKILL.md +676 -0
- package/template/skills/founder-video/SKILL.md +467 -0
- package/template/skills/hud/SKILL.md +204 -0
- package/template/skills/ralph-tui/SKILL.md +210 -0
- package/template/skills/react-best-practices/AGENTS.md +2249 -0
- package/template/skills/react-best-practices/README.md +123 -0
- package/template/skills/react-best-practices/SKILL.md +125 -0
- package/template/skills/react-best-practices/metadata.json +15 -0
- package/template/skills/react-best-practices/rules/_sections.md +46 -0
- package/template/skills/react-best-practices/rules/_template.md +28 -0
- package/template/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/template/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
- package/template/skills/react-best-practices/rules/async-api-routes.md +38 -0
- package/template/skills/react-best-practices/rules/async-defer-await.md +80 -0
- package/template/skills/react-best-practices/rules/async-dependencies.md +36 -0
- package/template/skills/react-best-practices/rules/async-parallel.md +28 -0
- package/template/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/template/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/template/skills/react-best-practices/rules/bundle-conditional.md +31 -0
- package/template/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/template/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/template/skills/react-best-practices/rules/bundle-preload.md +50 -0
- package/template/skills/react-best-practices/rules/client-event-listeners.md +74 -0
- package/template/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/template/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
- package/template/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/template/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/template/skills/react-best-practices/rules/js-cache-storage.md +70 -0
- package/template/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/template/skills/react-best-practices/rules/js-early-exit.md +50 -0
- package/template/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/template/skills/react-best-practices/rules/js-index-maps.md +37 -0
- package/template/skills/react-best-practices/rules/js-length-check-first.md +49 -0
- package/template/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/template/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/template/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/template/skills/react-best-practices/rules/rendering-activity.md +26 -0
- package/template/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/template/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/template/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/template/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/template/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/template/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/template/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/template/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/template/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/template/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/template/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/template/skills/react-best-practices/rules/rerender-memo.md +44 -0
- package/template/skills/react-best-practices/rules/rerender-transitions.md +40 -0
- package/template/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/template/skills/react-best-practices/rules/server-cache-lru.md +41 -0
- package/template/skills/react-best-practices/rules/server-cache-react.md +26 -0
- package/template/skills/react-best-practices/rules/server-parallel-fetching.md +79 -0
- package/template/skills/react-best-practices/rules/server-serialization.md +38 -0
- package/template/skills/remotion-best-practices/SKILL.md +43 -0
- package/template/skills/remotion-best-practices/rules/3d.md +86 -0
- package/template/skills/remotion-best-practices/rules/animations.md +29 -0
- package/template/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/template/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/template/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/template/skills/remotion-best-practices/rules/assets.md +78 -0
- package/template/skills/remotion-best-practices/rules/audio.md +172 -0
- package/template/skills/remotion-best-practices/rules/calculate-metadata.md +104 -0
- package/template/skills/remotion-best-practices/rules/can-decode.md +75 -0
- package/template/skills/remotion-best-practices/rules/charts.md +58 -0
- package/template/skills/remotion-best-practices/rules/compositions.md +146 -0
- package/template/skills/remotion-best-practices/rules/display-captions.md +126 -0
- package/template/skills/remotion-best-practices/rules/extract-frames.md +229 -0
- package/template/skills/remotion-best-practices/rules/fonts.md +152 -0
- package/template/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/template/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/template/skills/remotion-best-practices/rules/get-video-duration.md +58 -0
- package/template/skills/remotion-best-practices/rules/gifs.md +138 -0
- package/template/skills/remotion-best-practices/rules/images.md +130 -0
- package/template/skills/remotion-best-practices/rules/import-srt-captions.md +67 -0
- package/template/skills/remotion-best-practices/rules/lottie.md +68 -0
- package/template/skills/remotion-best-practices/rules/measuring-dom-nodes.md +35 -0
- package/template/skills/remotion-best-practices/rules/measuring-text.md +143 -0
- package/template/skills/remotion-best-practices/rules/sequencing.md +106 -0
- package/template/skills/remotion-best-practices/rules/tailwind.md +11 -0
- package/template/skills/remotion-best-practices/rules/text-animations.md +20 -0
- package/template/skills/remotion-best-practices/rules/timing.md +179 -0
- package/template/skills/remotion-best-practices/rules/transcribe-captions.md +19 -0
- package/template/skills/remotion-best-practices/rules/transitions.md +122 -0
- package/template/skills/remotion-best-practices/rules/trimming.md +53 -0
- package/template/skills/remotion-best-practices/rules/videos.md +171 -0
- package/template/skills/search/SKILL.md +220 -0
- package/template/skills/spec/SKILL.md +377 -0
- package/template/skills/startup/SKILL.md +310 -0
- package/template/skills/web-architect/SKILL.md +309 -0
- package/template/skills/x-algorithm/SKILL.md +305 -0
- package/template/suggestions/.gitkeep +0 -0
- package/template/templates/QUICKSTART_SKILL_TO_PRODUCT.md +242 -0
- package/template/templates/brand/BRAND_BRIEF.md +124 -0
- package/template/templates/brand/BRAND_DECISIONS.md +168 -0
- package/template/templates/brand/BRAND_GUIDELINES.md +251 -0
- package/template/templates/brand/VOICE_AND_TONE.md +146 -0
- package/template/templates/brand/global.css +240 -0
- package/template/templates/collaboration/CONTRIBUTOR.md +74 -0
- package/template/templates/collaboration/CRM.md +97 -0
- package/template/templates/collaboration/TASKS.md +83 -0
- package/template/templates/strategic/NARRATIVE.md +114 -0
- package/template/templates/strategic/ROADMAP.md +128 -0
- package/template/templates/strategic/THESIS.md +108 -0
- package/template/templates/strategic/VISION.md +74 -0
package/dist/ui/theme.js
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JFL Theme System
|
|
3
|
+
* Consistent colors and styling across the CLI
|
|
4
|
+
*/
|
|
5
|
+
import chalk from "chalk";
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// COLOR PALETTE
|
|
8
|
+
// ============================================================================
|
|
9
|
+
export const colors = {
|
|
10
|
+
// Primary brand
|
|
11
|
+
accent: "#FFD700", // Gold - main brand color
|
|
12
|
+
accentSoft: "#FFA500", // Orange - secondary
|
|
13
|
+
accentDim: "#B8860B", // Dark gold - subtle emphasis
|
|
14
|
+
// Text hierarchy
|
|
15
|
+
text: "#F5F5F5", // Primary text
|
|
16
|
+
textSoft: "#C0C0C0", // Secondary text
|
|
17
|
+
dim: "#888888", // Muted/subtle
|
|
18
|
+
dimmer: "#555555", // Very subtle
|
|
19
|
+
// Semantic
|
|
20
|
+
success: "#00FF88", // Green - success
|
|
21
|
+
error: "#FF4444", // Red - error
|
|
22
|
+
warning: "#FFAA00", // Amber - warning
|
|
23
|
+
info: "#4FC3F7", // Light blue - info
|
|
24
|
+
// Special
|
|
25
|
+
rocket: "#FF6B6B", // Launch moments
|
|
26
|
+
ship: "#4ECDC4", // Ship references
|
|
27
|
+
code: "#F0C987", // Code/technical
|
|
28
|
+
// Backgrounds (for supported terminals)
|
|
29
|
+
bgDark: "#1E1E1E",
|
|
30
|
+
bgCard: "#2B2F36",
|
|
31
|
+
};
|
|
32
|
+
// ============================================================================
|
|
33
|
+
// THEME HELPERS
|
|
34
|
+
// ============================================================================
|
|
35
|
+
export const theme = {
|
|
36
|
+
// Text styles
|
|
37
|
+
text: (s) => chalk.hex(colors.text)(s),
|
|
38
|
+
soft: (s) => chalk.hex(colors.textSoft)(s),
|
|
39
|
+
dim: (s) => chalk.hex(colors.dim)(s),
|
|
40
|
+
dimmer: (s) => chalk.hex(colors.dimmer)(s),
|
|
41
|
+
// Brand
|
|
42
|
+
accent: (s) => chalk.hex(colors.accent)(s),
|
|
43
|
+
accentSoft: (s) => chalk.hex(colors.accentSoft)(s),
|
|
44
|
+
accentBold: (s) => chalk.hex(colors.accent).bold(s),
|
|
45
|
+
// Semantic
|
|
46
|
+
success: (s) => chalk.hex(colors.success)(s),
|
|
47
|
+
error: (s) => chalk.hex(colors.error)(s),
|
|
48
|
+
warning: (s) => chalk.hex(colors.warning)(s),
|
|
49
|
+
info: (s) => chalk.hex(colors.info)(s),
|
|
50
|
+
// Special
|
|
51
|
+
rocket: (s) => chalk.hex(colors.rocket)(s),
|
|
52
|
+
ship: (s) => chalk.hex(colors.ship)(s),
|
|
53
|
+
code: (s) => chalk.hex(colors.code)(s),
|
|
54
|
+
// Combinations
|
|
55
|
+
bold: chalk.bold,
|
|
56
|
+
italic: chalk.italic,
|
|
57
|
+
underline: chalk.underline,
|
|
58
|
+
// Utility
|
|
59
|
+
check: chalk.hex(colors.success)("✓"),
|
|
60
|
+
cross: chalk.hex(colors.error)("✗"),
|
|
61
|
+
dot: chalk.hex(colors.dim)("•"),
|
|
62
|
+
arrow: chalk.hex(colors.accent)("→"),
|
|
63
|
+
};
|
|
64
|
+
// ============================================================================
|
|
65
|
+
// SYMBOLS
|
|
66
|
+
// ============================================================================
|
|
67
|
+
export const symbols = {
|
|
68
|
+
// Status
|
|
69
|
+
success: "✓",
|
|
70
|
+
error: "✗",
|
|
71
|
+
warning: "⚠",
|
|
72
|
+
info: "ℹ",
|
|
73
|
+
// Progress
|
|
74
|
+
spinner: ["◐", "◓", "◑", "◒"],
|
|
75
|
+
dots: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
|
|
76
|
+
// Structure
|
|
77
|
+
bullet: "•",
|
|
78
|
+
arrow: "→",
|
|
79
|
+
arrowRight: "▸",
|
|
80
|
+
line: "─",
|
|
81
|
+
corner: "└",
|
|
82
|
+
tee: "├",
|
|
83
|
+
pipe: "│",
|
|
84
|
+
// Special
|
|
85
|
+
rocket: "🚀",
|
|
86
|
+
ship: "🚢",
|
|
87
|
+
fire: "🔥",
|
|
88
|
+
star: "⭐",
|
|
89
|
+
sparkle: "✨",
|
|
90
|
+
};
|
|
91
|
+
// ============================================================================
|
|
92
|
+
// BOX DRAWING
|
|
93
|
+
// ============================================================================
|
|
94
|
+
export const box = {
|
|
95
|
+
topLeft: "┌",
|
|
96
|
+
topRight: "┐",
|
|
97
|
+
bottomLeft: "└",
|
|
98
|
+
bottomRight: "┘",
|
|
99
|
+
horizontal: "─",
|
|
100
|
+
vertical: "│",
|
|
101
|
+
teeRight: "├",
|
|
102
|
+
teeLeft: "┤",
|
|
103
|
+
// Heavy variant
|
|
104
|
+
heavyHorizontal: "━",
|
|
105
|
+
heavyVertical: "┃",
|
|
106
|
+
};
|
|
107
|
+
export function drawBox(content, width) {
|
|
108
|
+
const maxLen = width || Math.max(...content.map((l) => stripAnsi(l).length));
|
|
109
|
+
const lines = [];
|
|
110
|
+
lines.push(theme.dim(box.topLeft + box.horizontal.repeat(maxLen + 2) + box.topRight));
|
|
111
|
+
for (const line of content) {
|
|
112
|
+
const stripped = stripAnsi(line);
|
|
113
|
+
const padding = " ".repeat(Math.max(0, maxLen - stripped.length));
|
|
114
|
+
lines.push(theme.dim(box.vertical) + " " + line + padding + " " + theme.dim(box.vertical));
|
|
115
|
+
}
|
|
116
|
+
lines.push(theme.dim(box.bottomLeft + box.horizontal.repeat(maxLen + 2) + box.bottomRight));
|
|
117
|
+
return lines.join("\n");
|
|
118
|
+
}
|
|
119
|
+
// ============================================================================
|
|
120
|
+
// UTILITIES
|
|
121
|
+
// ============================================================================
|
|
122
|
+
// Strip ANSI codes for length calculation
|
|
123
|
+
function stripAnsi(str) {
|
|
124
|
+
return str.replace(/\x1B\[[0-9;]*m/g, "");
|
|
125
|
+
}
|
|
126
|
+
// Get terminal width safely
|
|
127
|
+
export function getTerminalWidth() {
|
|
128
|
+
return process.stdout.columns || 80;
|
|
129
|
+
}
|
|
130
|
+
// Center text
|
|
131
|
+
export function center(text, width) {
|
|
132
|
+
const w = width || getTerminalWidth();
|
|
133
|
+
const stripped = stripAnsi(text);
|
|
134
|
+
const padding = Math.max(0, Math.floor((w - stripped.length) / 2));
|
|
135
|
+
return " ".repeat(padding) + text;
|
|
136
|
+
}
|
|
137
|
+
// Horizontal rule
|
|
138
|
+
export function hr(char = "─", width) {
|
|
139
|
+
const w = width || getTerminalWidth();
|
|
140
|
+
return theme.dimmer(char.repeat(w));
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src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;AACrC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth Guard for JFL CLI
|
|
3
|
+
*
|
|
4
|
+
* Payment model:
|
|
5
|
+
* - Project has ONE wallet (owner's) that pays for the project
|
|
6
|
+
* - Contributors can optionally have their own wallet
|
|
7
|
+
* - If project wallet low + contributor has wallet → can transfer directly
|
|
8
|
+
*/
|
|
9
|
+
import { DayPass } from './x402-client.js';
|
|
10
|
+
export interface AuthResult {
|
|
11
|
+
authenticated: boolean;
|
|
12
|
+
dayPass?: DayPass;
|
|
13
|
+
reason?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Check if user is authenticated (has wallet with signing capability)
|
|
17
|
+
*/
|
|
18
|
+
export declare function hasWallet(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Get user's wallet address
|
|
21
|
+
*/
|
|
22
|
+
export declare function getWalletAddress(): string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Check auth status and day pass
|
|
25
|
+
* Uses PROJECT wallet for payment, not user wallet
|
|
26
|
+
*/
|
|
27
|
+
export declare function checkAuth(): Promise<AuthResult>;
|
|
28
|
+
/**
|
|
29
|
+
* Ensure project has valid day pass
|
|
30
|
+
* Uses PROJECT wallet for payment
|
|
31
|
+
* If project wallet low + user has wallet → offers transfer
|
|
32
|
+
*/
|
|
33
|
+
export declare function ensureDayPass(): Promise<DayPass | null>;
|
|
34
|
+
/**
|
|
35
|
+
* Show day pass status
|
|
36
|
+
*/
|
|
37
|
+
export declare function showDayPassStatus(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Guard decorator for commands requiring day pass
|
|
40
|
+
* Use this to wrap command handlers
|
|
41
|
+
*/
|
|
42
|
+
export declare function requireDayPass<T>(handler: (dayPass: DayPass) => Promise<T>): Promise<T | null>;
|
|
43
|
+
/**
|
|
44
|
+
* Check if running in trial mode (no payment required)
|
|
45
|
+
* Trial mode allows foundation + brand setup without payment
|
|
46
|
+
*
|
|
47
|
+
* Trial ends when:
|
|
48
|
+
* 1. Foundation is complete, OR
|
|
49
|
+
* 2. A teammate has actually joined (authenticated)
|
|
50
|
+
* - Creating a suggestions file doesn't end trial
|
|
51
|
+
* - Teammate must run `jfl login` to trigger payment
|
|
52
|
+
*/
|
|
53
|
+
export declare function isTrialMode(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Mark a teammate as joined in their suggestions file
|
|
56
|
+
*/
|
|
57
|
+
export declare function markTeammateJoined(username: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Mark foundation as complete (triggers payment requirement)
|
|
60
|
+
*/
|
|
61
|
+
export declare function markFoundationComplete(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Check if feature requires payment
|
|
64
|
+
*/
|
|
65
|
+
export declare function requiresPayment(feature: string): boolean;
|
|
66
|
+
//# sourceMappingURL=auth-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-guard.d.ts","sourceRoot":"","sources":["../../src/utils/auth-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,EAIL,OAAO,EACR,MAAM,kBAAkB,CAAA;AAiBzB,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAqBD;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAInC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEhD;AAED;;;GAGG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,CAwBrD;AAED;;;;GAIG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAuH7D;AAqDD;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAkBxC;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,CAAC,EACpC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,GACxC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAQnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAUrC;AA+BD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAsB5D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAcxD"}
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth Guard for JFL CLI
|
|
3
|
+
*
|
|
4
|
+
* Payment model:
|
|
5
|
+
* - Project has ONE wallet (owner's) that pays for the project
|
|
6
|
+
* - Contributors can optionally have their own wallet
|
|
7
|
+
* - If project wallet low + contributor has wallet → can transfer directly
|
|
8
|
+
*/
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
import ora from 'ora';
|
|
11
|
+
import inquirer from 'inquirer';
|
|
12
|
+
import Conf from 'conf';
|
|
13
|
+
import { getDayPass, getDayPassTimeRemaining, purchaseDayPass, } from './x402-client.js';
|
|
14
|
+
import { checkUsdcBalance, waitForUsdcBalance, getNetworkName, seedPhraseToPrivateKey, transferUsdc, } from './wallet.js';
|
|
15
|
+
import { getProjectWallet, getProjectName, } from './project-config.js';
|
|
16
|
+
const config = new Conf({ projectName: 'jfl' });
|
|
17
|
+
/**
|
|
18
|
+
* Get private key from config
|
|
19
|
+
*/
|
|
20
|
+
function getPrivateKey() {
|
|
21
|
+
// Try seed phrase first
|
|
22
|
+
const seedPhrase = config.get('x402SeedPhrase');
|
|
23
|
+
if (seedPhrase) {
|
|
24
|
+
return seedPhraseToPrivateKey(seedPhrase, 0);
|
|
25
|
+
}
|
|
26
|
+
// Try direct private key
|
|
27
|
+
const privateKey = config.get('x402PrivateKey');
|
|
28
|
+
if (privateKey) {
|
|
29
|
+
return privateKey;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if user is authenticated (has wallet with signing capability)
|
|
35
|
+
*/
|
|
36
|
+
export function hasWallet() {
|
|
37
|
+
const address = config.get('x402Address');
|
|
38
|
+
const hasKey = config.get('x402PrivateKey') || config.get('x402SeedPhrase');
|
|
39
|
+
return !!(address && hasKey);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get user's wallet address
|
|
43
|
+
*/
|
|
44
|
+
export function getWalletAddress() {
|
|
45
|
+
return config.get('x402Address');
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Check auth status and day pass
|
|
49
|
+
* Uses PROJECT wallet for payment, not user wallet
|
|
50
|
+
*/
|
|
51
|
+
export async function checkAuth() {
|
|
52
|
+
// Check if project has a wallet configured
|
|
53
|
+
const projectWallet = getProjectWallet();
|
|
54
|
+
if (!projectWallet) {
|
|
55
|
+
return {
|
|
56
|
+
authenticated: false,
|
|
57
|
+
reason: 'no_project_wallet',
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
// Check if day pass is valid (tied to project wallet)
|
|
61
|
+
const dayPass = getDayPass();
|
|
62
|
+
if (dayPass && dayPass.userAddress.toLowerCase() === projectWallet.toLowerCase()) {
|
|
63
|
+
return {
|
|
64
|
+
authenticated: true,
|
|
65
|
+
dayPass,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
// No day pass - need payment
|
|
69
|
+
return {
|
|
70
|
+
authenticated: false,
|
|
71
|
+
reason: 'no_day_pass',
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Ensure project has valid day pass
|
|
76
|
+
* Uses PROJECT wallet for payment
|
|
77
|
+
* If project wallet low + user has wallet → offers transfer
|
|
78
|
+
*/
|
|
79
|
+
export async function ensureDayPass() {
|
|
80
|
+
const auth = await checkAuth();
|
|
81
|
+
const projectName = getProjectName();
|
|
82
|
+
if (auth.authenticated && auth.dayPass) {
|
|
83
|
+
return auth.dayPass;
|
|
84
|
+
}
|
|
85
|
+
// No project wallet configured - owner needs to set one up
|
|
86
|
+
if (auth.reason === 'no_project_wallet') {
|
|
87
|
+
console.log(chalk.yellow(`\n⚠️ No project wallet configured for "${projectName}"`));
|
|
88
|
+
console.log(chalk.gray(' Project owner needs to run: jfl login --x402\n'));
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
// Project has wallet but needs day pass
|
|
92
|
+
const projectWallet = getProjectWallet();
|
|
93
|
+
const userWallet = getWalletAddress();
|
|
94
|
+
const userPrivateKey = getPrivateKey();
|
|
95
|
+
const networkName = getNetworkName();
|
|
96
|
+
console.log(chalk.cyan(`\n💰 Day Pass Required ($5/day)\n`));
|
|
97
|
+
console.log(chalk.dim(`Project: ${projectName}`));
|
|
98
|
+
console.log(chalk.dim(`Network: ${networkName}`));
|
|
99
|
+
// Check project wallet balance
|
|
100
|
+
const spinner = ora('Checking project wallet...').start();
|
|
101
|
+
const { formatted } = await checkUsdcBalance(projectWallet);
|
|
102
|
+
const projectBalance = parseFloat(formatted);
|
|
103
|
+
spinner.stop();
|
|
104
|
+
console.log(chalk.gray(`Project wallet: ${projectWallet.slice(0, 10)}...${projectWallet.slice(-8)}`));
|
|
105
|
+
console.log(chalk.gray(`Balance: ${projectBalance >= 5 ? chalk.green('$' + projectBalance.toFixed(2)) : chalk.yellow('$' + projectBalance.toFixed(2))} USDC`));
|
|
106
|
+
// If project wallet has enough funds, try to purchase
|
|
107
|
+
if (projectBalance >= 5) {
|
|
108
|
+
return await purchaseProjectDayPass(projectWallet);
|
|
109
|
+
}
|
|
110
|
+
// Project wallet is low - check if user can help
|
|
111
|
+
console.log(chalk.yellow(`\n⚠️ Project wallet needs $${(5 - projectBalance).toFixed(2)} more USDC\n`));
|
|
112
|
+
// Does user have their own wallet with funds?
|
|
113
|
+
if (userWallet && userPrivateKey) {
|
|
114
|
+
const userSpinner = ora('Checking your wallet...').start();
|
|
115
|
+
const userUsdc = await checkUsdcBalance(userWallet);
|
|
116
|
+
const userBalance = parseFloat(userUsdc.formatted);
|
|
117
|
+
userSpinner.stop();
|
|
118
|
+
if (userBalance >= 5) {
|
|
119
|
+
console.log(chalk.green(`Your wallet has $${userBalance.toFixed(2)} USDC`));
|
|
120
|
+
console.log();
|
|
121
|
+
const { transfer } = await inquirer.prompt([
|
|
122
|
+
{
|
|
123
|
+
type: 'confirm',
|
|
124
|
+
name: 'transfer',
|
|
125
|
+
message: `Transfer $5 to project wallet? (gasless via x402)`,
|
|
126
|
+
default: true,
|
|
127
|
+
},
|
|
128
|
+
]);
|
|
129
|
+
if (transfer) {
|
|
130
|
+
const transferSpinner = ora('Transferring via x402 (no gas needed)...').start();
|
|
131
|
+
try {
|
|
132
|
+
await transferUsdc(projectWallet, 5);
|
|
133
|
+
transferSpinner.succeed('Transferred $5 to project wallet!');
|
|
134
|
+
console.log();
|
|
135
|
+
// Now purchase day pass with project wallet
|
|
136
|
+
return await purchaseProjectDayPass(projectWallet);
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
transferSpinner.fail('Transfer failed');
|
|
140
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
141
|
+
console.error(chalk.red(errorMsg));
|
|
142
|
+
// If httpcat not installed, show manual instructions
|
|
143
|
+
if (errorMsg.includes('not installed')) {
|
|
144
|
+
console.log(chalk.dim('\nManual option - send USDC directly to:'));
|
|
145
|
+
console.log(chalk.cyan(` ${projectWallet}`));
|
|
146
|
+
}
|
|
147
|
+
console.log();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
else if (userBalance > 0) {
|
|
152
|
+
console.log(chalk.gray(`Your wallet: $${userBalance.toFixed(2)} USDC (not enough to transfer)`));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
// Can't auto-transfer - show funding options
|
|
156
|
+
console.log(chalk.bold('To fund the project, send USDC to:'));
|
|
157
|
+
console.log(chalk.cyan(` ${projectWallet}\n`));
|
|
158
|
+
if (userWallet) {
|
|
159
|
+
console.log(chalk.dim('Or top up your wallet and run jfl again to transfer'));
|
|
160
|
+
console.log(chalk.dim(`Your wallet: ${userWallet}`));
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
console.log(chalk.dim('Want your own wallet? Run: jfl login --x402'));
|
|
164
|
+
}
|
|
165
|
+
console.log(chalk.dim('\nPress q or Escape to exit'));
|
|
166
|
+
console.log();
|
|
167
|
+
// Wait for project wallet funding
|
|
168
|
+
const fundingSpinner = ora('Waiting for project wallet funds...').start();
|
|
169
|
+
const funded = await waitForUsdcBalance(projectWallet, 5, (bal) => {
|
|
170
|
+
fundingSpinner.text = `Project balance: $${bal.toFixed(2)} USDC (need $5.00) - press q to exit`;
|
|
171
|
+
});
|
|
172
|
+
if (!funded) {
|
|
173
|
+
fundingSpinner.info('Exited');
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
fundingSpinner.succeed('Project funded!');
|
|
177
|
+
console.log();
|
|
178
|
+
return await purchaseProjectDayPass(projectWallet);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Purchase day pass using project wallet
|
|
182
|
+
* Owner's private key is needed - stored in project config or user config if they're the owner
|
|
183
|
+
*/
|
|
184
|
+
async function purchaseProjectDayPass(projectWallet) {
|
|
185
|
+
// Check if current user is the owner (has the private key for project wallet)
|
|
186
|
+
const userWallet = getWalletAddress();
|
|
187
|
+
const userPrivateKey = getPrivateKey();
|
|
188
|
+
// User is the owner if their wallet matches project wallet
|
|
189
|
+
if (userWallet?.toLowerCase() === projectWallet.toLowerCase() && userPrivateKey) {
|
|
190
|
+
const { confirm } = await inquirer.prompt([
|
|
191
|
+
{
|
|
192
|
+
type: 'confirm',
|
|
193
|
+
name: 'confirm',
|
|
194
|
+
message: `Activate Day Pass for $5? (valid for 24 hours)`,
|
|
195
|
+
default: true,
|
|
196
|
+
},
|
|
197
|
+
]);
|
|
198
|
+
if (!confirm) {
|
|
199
|
+
console.log(chalk.gray('Cancelled'));
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
const purchaseSpinner = ora('Activating Day Pass...').start();
|
|
203
|
+
try {
|
|
204
|
+
const dayPass = await purchaseDayPass(userPrivateKey);
|
|
205
|
+
purchaseSpinner.succeed('Day Pass activated!');
|
|
206
|
+
const remaining = getDayPassTimeRemaining();
|
|
207
|
+
if (remaining) {
|
|
208
|
+
console.log(chalk.green(`\n✅ Day Pass valid for ${remaining.hours}h ${remaining.minutes}m`));
|
|
209
|
+
}
|
|
210
|
+
console.log();
|
|
211
|
+
return dayPass;
|
|
212
|
+
}
|
|
213
|
+
catch (error) {
|
|
214
|
+
purchaseSpinner.fail('Failed to activate Day Pass');
|
|
215
|
+
console.error(chalk.red(error));
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
// User is NOT the owner - they can't sign for project wallet
|
|
220
|
+
console.log(chalk.yellow('\n⚠️ Project wallet has funds but needs owner to activate'));
|
|
221
|
+
console.log(chalk.gray(' Ask the project owner to run: jfl\n'));
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Show day pass status
|
|
226
|
+
*/
|
|
227
|
+
export function showDayPassStatus() {
|
|
228
|
+
const dayPass = getDayPass();
|
|
229
|
+
if (!dayPass) {
|
|
230
|
+
console.log(chalk.yellow('No active Day Pass'));
|
|
231
|
+
console.log(chalk.gray('Run a JFL command to purchase one'));
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const remaining = getDayPassTimeRemaining();
|
|
235
|
+
if (!remaining) {
|
|
236
|
+
console.log(chalk.yellow('Day Pass expired'));
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
console.log(chalk.green(`✅ Day Pass active`));
|
|
240
|
+
console.log(chalk.gray(` Expires in: ${remaining.hours}h ${remaining.minutes}m`));
|
|
241
|
+
console.log(chalk.gray(` Address: ${dayPass.userAddress}`));
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Guard decorator for commands requiring day pass
|
|
245
|
+
* Use this to wrap command handlers
|
|
246
|
+
*/
|
|
247
|
+
export async function requireDayPass(handler) {
|
|
248
|
+
const dayPass = await ensureDayPass();
|
|
249
|
+
if (!dayPass) {
|
|
250
|
+
return null;
|
|
251
|
+
}
|
|
252
|
+
return handler(dayPass);
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Check if running in trial mode (no payment required)
|
|
256
|
+
* Trial mode allows foundation + brand setup without payment
|
|
257
|
+
*
|
|
258
|
+
* Trial ends when:
|
|
259
|
+
* 1. Foundation is complete, OR
|
|
260
|
+
* 2. A teammate has actually joined (authenticated)
|
|
261
|
+
* - Creating a suggestions file doesn't end trial
|
|
262
|
+
* - Teammate must run `jfl login` to trigger payment
|
|
263
|
+
*/
|
|
264
|
+
export function isTrialMode() {
|
|
265
|
+
// Check if user has completed foundation
|
|
266
|
+
const foundationComplete = config.get('foundationComplete');
|
|
267
|
+
if (foundationComplete)
|
|
268
|
+
return false;
|
|
269
|
+
// Check if any teammates have actually joined (authenticated)
|
|
270
|
+
const hasJoinedTeammates = checkForJoinedTeammates();
|
|
271
|
+
if (hasJoinedTeammates)
|
|
272
|
+
return false;
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Check if any teammates have actually joined (authenticated)
|
|
277
|
+
* Looks for <!-- joined: DATE --> marker in suggestions/*.md files
|
|
278
|
+
*/
|
|
279
|
+
function checkForJoinedTeammates() {
|
|
280
|
+
const cwd = process.cwd();
|
|
281
|
+
const suggestionsDir = `${cwd}/suggestions`;
|
|
282
|
+
try {
|
|
283
|
+
const { readdirSync, existsSync, readFileSync } = require('fs');
|
|
284
|
+
if (!existsSync(suggestionsDir))
|
|
285
|
+
return false;
|
|
286
|
+
const files = readdirSync(suggestionsDir);
|
|
287
|
+
const teammates = files.filter((f) => f.endsWith('.md'));
|
|
288
|
+
// Check each teammate file for joined marker
|
|
289
|
+
for (const file of teammates) {
|
|
290
|
+
const content = readFileSync(`${suggestionsDir}/${file}`, 'utf-8');
|
|
291
|
+
if (content.includes('<!-- joined:')) {
|
|
292
|
+
return true;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
catch {
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Mark a teammate as joined in their suggestions file
|
|
303
|
+
*/
|
|
304
|
+
export function markTeammateJoined(username) {
|
|
305
|
+
const cwd = process.cwd();
|
|
306
|
+
const filePath = `${cwd}/suggestions/${username}.md`;
|
|
307
|
+
try {
|
|
308
|
+
const { existsSync, readFileSync, writeFileSync } = require('fs');
|
|
309
|
+
if (!existsSync(filePath))
|
|
310
|
+
return false;
|
|
311
|
+
const content = readFileSync(filePath, 'utf-8');
|
|
312
|
+
// Already joined?
|
|
313
|
+
if (content.includes('<!-- joined:'))
|
|
314
|
+
return true;
|
|
315
|
+
// Add joined marker at the top
|
|
316
|
+
const date = new Date().toISOString().split('T')[0];
|
|
317
|
+
const newContent = `<!-- joined: ${date} -->\n${content}`;
|
|
318
|
+
writeFileSync(filePath, newContent);
|
|
319
|
+
return true;
|
|
320
|
+
}
|
|
321
|
+
catch {
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Mark foundation as complete (triggers payment requirement)
|
|
327
|
+
*/
|
|
328
|
+
export function markFoundationComplete() {
|
|
329
|
+
config.set('foundationComplete', true);
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Check if feature requires payment
|
|
333
|
+
*/
|
|
334
|
+
export function requiresPayment(feature) {
|
|
335
|
+
const freeFeatures = [
|
|
336
|
+
'init',
|
|
337
|
+
'login',
|
|
338
|
+
'logout',
|
|
339
|
+
'status',
|
|
340
|
+
'help',
|
|
341
|
+
'version',
|
|
342
|
+
'update',
|
|
343
|
+
// Trial features (until foundation complete)
|
|
344
|
+
...(isTrialMode() ? ['foundation', 'brand', 'vision', 'narrative', 'thesis'] : []),
|
|
345
|
+
];
|
|
346
|
+
return !freeFeatures.includes(feature);
|
|
347
|
+
}
|
|
348
|
+
//# sourceMappingURL=auth-guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-guard.js","sourceRoot":"","sources":["../../src/utils/auth-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,eAAe,GAEhB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,YAAY,GACb,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,gBAAgB,EAEhB,cAAc,GACf,MAAM,qBAAqB,CAAA;AAG5B,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAA;AAQ/C;;GAEG;AACH,SAAS,aAAa;IACpB,wBAAwB;IACxB,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAuB,CAAA;IACrE,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,sBAAsB,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;IAC9C,CAAC;IAED,yBAAyB;IACzB,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAoB,CAAA;IAClE,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,UAAU,CAAA;IACnB,CAAC;I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C,QAAQ,CAAC,OAAO,CAAC,CAAA;AACxC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if we're in a JFL project. If not, offer to navigate to known projects.
|
|
3
|
+
* Returns true if we're in a project (or user navigated to one).
|
|
4
|
+
* Returns false if user cancelled or no projects available.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ensureInProject(): Promise<boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* Check if current directory is a JFL project (no prompts)
|
|
9
|
+
*/
|
|
10
|
+
export declare function isJflProject(): boolean;
|
|
11
|
+
//# sourceMappingURL=ensure-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensure-project.d.ts","sourceRoot":"","sources":["../../src/utils/ensure-project.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CA8DxD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAOtC"}
|