@hasna/skills 0.1.27 → 0.1.29
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 +1 -10
- package/README.md +141 -39
- package/bin/index.js +30121 -27576
- package/bin/mcp.js +22073 -18556
- package/dist/cli/cli.test-utils.d.ts +15 -0
- package/dist/cli/commands/auth.d.ts +2 -0
- package/dist/cli/commands/install.d.ts +1 -1
- package/dist/cli/commands/runtime-mcp.d.ts +4 -0
- package/dist/index.d.ts +9 -4
- package/dist/index.js +11606 -598
- package/dist/lib/auth-store.d.ts +13 -0
- package/dist/lib/installer.d.ts +58 -55
- package/dist/lib/mcp-contracts.d.ts +86 -0
- package/dist/lib/project-state.d.ts +43 -0
- package/dist/lib/registry-data/business-marketing.d.ts +2 -0
- package/dist/lib/registry-data/communication.d.ts +2 -0
- package/dist/lib/registry-data/content-generation.d.ts +2 -0
- package/dist/lib/registry-data/data-analysis.d.ts +2 -0
- package/dist/lib/registry-data/design-branding.d.ts +2 -0
- package/dist/lib/registry-data/development-tools.d.ts +2 -0
- package/dist/lib/registry-data/education-learning.d.ts +2 -0
- package/dist/lib/registry-data/event-management.d.ts +2 -0
- package/dist/lib/registry-data/finance-compliance.d.ts +2 -0
- package/dist/lib/registry-data/health-wellness.d.ts +2 -0
- package/dist/lib/registry-data/index.d.ts +2 -0
- package/dist/lib/registry-data/media-processing.d.ts +2 -0
- package/dist/lib/registry-data/productivity-organization.d.ts +2 -0
- package/dist/lib/registry-data/project-management.d.ts +2 -0
- package/dist/lib/registry-data/research-writing.d.ts +2 -0
- package/dist/lib/registry-data/science-academic.d.ts +2 -0
- package/dist/lib/registry-data/travel-lifestyle.d.ts +2 -0
- package/dist/lib/registry-data/web-browser.d.ts +2 -0
- package/dist/lib/registry-types.d.ts +27 -0
- package/dist/lib/registry.d.ts +6 -18
- package/dist/lib/remote-registry.d.ts +3 -0
- package/dist/lib/run-state.d.ts +60 -0
- package/dist/lib/skill-aliases.d.ts +17 -0
- package/dist/lib/skillinfo.d.ts +5 -1
- package/dist/mcp/discovery-tools.d.ts +2 -0
- package/dist/mcp/helpers.d.ts +26 -0
- package/dist/mcp/http.d.ts +10 -0
- package/dist/mcp/index.d.ts +3 -2
- package/dist/mcp/operation-tools.d.ts +2 -0
- package/dist/mcp/resource-meta-tools.d.ts +2 -0
- package/dist/mcp/schedule-tools.d.ts +2 -0
- package/dist/mcp/server.d.ts +4 -0
- package/dist/types/api.d.ts +7 -4
- package/package.json +22 -11
- package/skills/_common/http-client.ts +1 -1
- package/skills/_common/index.ts +2 -3
- package/skills/_common/install.sh +5 -110
- package/skills/_common/installer.ts +31 -282
- package/skills/_common/skill-install.ts +14 -181
- package/skills/ad-creative-pack/SKILL.md +45 -0
- package/skills/ad-creative-pack/package.json +14 -0
- package/skills/advanced-math/package.json +3 -1
- package/skills/advanced-math/src/calculators.ts +118 -0
- package/skills/advanced-math/src/cli.ts +130 -0
- package/skills/advanced-math/src/conversion.ts +90 -0
- package/skills/advanced-math/src/finance.ts +75 -0
- package/skills/advanced-math/src/formatting.ts +95 -0
- package/skills/advanced-math/src/index.ts +24 -702
- package/skills/advanced-math/src/runtime.ts +49 -0
- package/skills/advanced-math/src/symbolic.ts +110 -0
- package/skills/advanced-math/src/types.ts +36 -0
- package/skills/analyze-data/SKILL.md +2 -2
- package/skills/analyze-data/src/analysis.ts +401 -0
- package/skills/analyze-data/src/cli.ts +66 -0
- package/skills/analyze-data/src/formatters.ts +235 -0
- package/skills/analyze-data/src/index.ts +6 -1027
- package/skills/analyze-data/src/logger.ts +36 -0
- package/skills/analyze-data/src/parsers.ts +57 -0
- package/skills/analyze-data/src/stats.ts +151 -0
- package/skills/analyze-data/src/types.ts +85 -0
- package/skills/api-docs-portal/SKILL.md +46 -0
- package/skills/api-docs-portal/package.json +9 -0
- package/skills/api-test-suite/src/index.ts +13 -0
- package/skills/apidocs/package.json +1 -1
- package/skills/apidocs/src/index.ts +3 -0
- package/skills/audio/package.json +2 -3
- package/skills/audio-cleanup-lab/SKILL.md +2 -2
- package/skills/audio-extract/CLAUDE.md +1 -1
- package/skills/audio-transcript-pack/SKILL.md +43 -0
- package/skills/audio-transcript-pack/package.json +10 -0
- package/skills/blog-article/CLAUDE.md +12 -0
- package/skills/blog-article/SKILL.md +45 -0
- package/skills/{create-blog-article → blog-article}/package.json +3 -3
- package/skills/brand-kit/SKILL.md +45 -0
- package/skills/brand-kit/package.json +14 -0
- package/skills/brand-photo-shoot/SKILL.md +28 -0
- package/skills/brand-photo-shoot/package.json +10 -0
- package/skills/brand-style-guide/SKILL.md +2 -2
- package/skills/brand-style-guide/src/index.ts +0 -0
- package/skills/budget-variance-analyzer/SKILL.md +2 -2
- package/skills/businessactivity/package.json +1 -1
- package/skills/businessactivity/src/index.ts +3 -0
- package/skills/calendar-events/src/ai-parser.ts +103 -0
- package/skills/calendar-events/src/api.ts +157 -0
- package/skills/calendar-events/src/auth.ts +22 -0
- package/skills/calendar-events/src/config.ts +6 -0
- package/skills/calendar-events/src/format.ts +96 -0
- package/skills/calendar-events/src/help.ts +54 -0
- package/skills/calendar-events/src/index.ts +21 -524
- package/skills/calendar-events/src/logger.ts +34 -0
- package/skills/calendar-events/src/types.ts +67 -0
- package/skills/compress-video/SKILL.md +2 -2
- package/skills/consolelog/exports/products-2025-12-14T13-50-53-041Z.csv +16 -0
- package/skills/consolelog/exports/products-2025-12-14T13-50-53-041Z.json +227 -0
- package/skills/consolelog/package.json +1 -1
- package/skills/consolelog/src/index.ts +3 -0
- package/skills/contract-review-report/SKILL.md +43 -0
- package/skills/contract-review-report/package.json +10 -0
- package/skills/convert/SKILL.md +2 -3
- package/skills/customer-feedback-report/SKILL.md +44 -0
- package/skills/customer-feedback-report/package.json +10 -0
- package/skills/dashboard-builder/package.json +3 -1
- package/skills/database-explorer/package.json +3 -1
- package/skills/deepresearch/README.md +4 -13
- package/skills/deploy/src/http-client.ts +1 -1
- package/skills/diff-viewer/package.json +4 -1
- package/skills/doc-generate/package.json +0 -1
- package/skills/doc-generate/src/ai.ts +50 -0
- package/skills/doc-generate/src/cli.ts +203 -0
- package/skills/doc-generate/src/dependencies.ts +44 -0
- package/skills/doc-generate/src/document-builder.ts +299 -0
- package/skills/doc-generate/src/index.ts +40 -764
- package/skills/doc-generate/src/markdown-parser.ts +125 -0
- package/skills/doc-generate/src/types.ts +68 -0
- package/skills/domainpurchase/SKILL.md +1 -1
- package/skills/domainpurchase/package.json +1 -1
- package/skills/domainpurchase/src/index.ts +3 -0
- package/skills/domainsearch/SKILL.md +1 -1
- package/skills/domainsearch/package.json +1 -1
- package/skills/domainsearch/src/index.ts +3 -0
- package/skills/email-sequence/SKILL.md +44 -0
- package/skills/email-sequence/package.json +14 -0
- package/skills/excel/CLAUDE.md +2 -2
- package/skills/experiment-power-calculator/package.json +3 -1
- package/skills/extract-invoice/src/cli.ts +97 -0
- package/skills/extract-invoice/src/extractor.ts +170 -0
- package/skills/extract-invoice/src/file-utils.ts +46 -0
- package/skills/extract-invoice/src/formatters.ts +144 -0
- package/skills/extract-invoice/src/index.ts +44 -629
- package/skills/extract-invoice/src/runtime.ts +46 -0
- package/skills/extract-invoice/src/types.ts +88 -0
- package/skills/folder-tree/package.json +3 -1
- package/skills/form-filler/package.json +3 -1
- package/skills/generate-api-client/package.json +3 -1
- package/skills/generate-api-client/src/generator.ts +47 -0
- package/skills/generate-api-client/src/index.ts +3 -777
- package/skills/generate-api-client/src/logger.ts +34 -0
- package/skills/generate-api-client/src/python-generator.ts +245 -0
- package/skills/generate-api-client/src/spec-loader.ts +48 -0
- package/skills/generate-api-client/src/type-mappers.ts +79 -0
- package/skills/generate-api-client/src/types.ts +76 -0
- package/skills/generate-api-client/src/typescript-generator.ts +247 -0
- package/skills/generate-book-cover/package.json +3 -1
- package/skills/generate-dockerfile/src/cli.ts +78 -0
- package/skills/generate-dockerfile/src/dockerfile-templates.ts +392 -0
- package/skills/generate-dockerfile/src/index.ts +12 -790
- package/skills/generate-dockerfile/src/logger.ts +30 -0
- package/skills/generate-dockerfile/src/project-detection.ts +68 -0
- package/skills/generate-dockerfile/src/support-files.ts +171 -0
- package/skills/generate-dockerfile/src/types.ts +29 -0
- package/skills/generate-documentation/src/ai.ts +131 -0
- package/skills/generate-documentation/src/cli.ts +71 -0
- package/skills/generate-documentation/src/code-parser.ts +300 -0
- package/skills/generate-documentation/src/file-processing.ts +182 -0
- package/skills/generate-documentation/src/index.ts +13 -753
- package/skills/generate-documentation/src/runtime.ts +35 -0
- package/skills/generate-documentation/src/types.ts +30 -0
- package/skills/generate-env/package.json +3 -1
- package/skills/generate-env/src/cli.ts +85 -0
- package/skills/generate-env/src/detection.ts +161 -0
- package/skills/generate-env/src/env-data.ts +66 -0
- package/skills/generate-env/src/generators.ts +240 -0
- package/skills/generate-env/src/index.ts +76 -676
- package/skills/generate-env/src/runtime.ts +30 -0
- package/skills/generate-env/src/types.ts +32 -0
- package/skills/generate-favicon/package.json +3 -1
- package/skills/generate-mock-data/package.json +3 -1
- package/skills/generate-mock-data/src/ai.ts +102 -0
- package/skills/generate-mock-data/src/formatters.ts +84 -0
- package/skills/generate-mock-data/src/generator.ts +377 -0
- package/skills/generate-mock-data/src/index.ts +15 -716
- package/skills/generate-mock-data/src/logger.ts +37 -0
- package/skills/generate-mock-data/src/presets.ts +110 -0
- package/skills/generate-mock-data/src/types.ts +21 -0
- package/skills/generate-pr-description/src/ai.ts +144 -0
- package/skills/generate-pr-description/src/cli.ts +80 -0
- package/skills/generate-pr-description/src/clipboard.ts +30 -0
- package/skills/generate-pr-description/src/formatters.ts +231 -0
- package/skills/generate-pr-description/src/git.ts +153 -0
- package/skills/generate-pr-description/src/index.ts +21 -714
- package/skills/generate-pr-description/src/types.ts +49 -0
- package/skills/generate-presentation/src/ai-clients.ts +61 -0
- package/skills/generate-presentation/src/cli.ts +126 -0
- package/skills/generate-presentation/src/index.ts +3 -751
- package/skills/generate-presentation/src/logger.ts +67 -0
- package/skills/generate-presentation/src/presentation-generator.ts +425 -0
- package/skills/generate-presentation/src/runtime.ts +6 -0
- package/skills/generate-presentation/src/security.ts +12 -0
- package/skills/generate-presentation/src/types.ts +28 -0
- package/skills/generate-qrcode/package.json +4 -1
- package/skills/generate-regex/package.json +3 -1
- package/skills/generate-resume/src/cli.ts +157 -0
- package/skills/generate-resume/src/index.ts +13 -917
- package/skills/generate-resume/src/parsers.ts +95 -0
- package/skills/generate-resume/src/renderers.ts +538 -0
- package/skills/generate-resume/src/security.ts +39 -0
- package/skills/generate-resume/src/types.ts +86 -0
- package/skills/generate-social-posts/src/ai.ts +88 -0
- package/skills/generate-social-posts/src/cli.ts +118 -0
- package/skills/generate-social-posts/src/exporters.ts +126 -0
- package/skills/generate-social-posts/src/generator.ts +130 -0
- package/skills/generate-social-posts/src/index.ts +19 -709
- package/skills/generate-social-posts/src/platforms.ts +39 -0
- package/skills/generate-social-posts/src/runtime.ts +34 -0
- package/skills/generate-social-posts/src/source.ts +116 -0
- package/skills/generate-social-posts/src/types.ts +58 -0
- package/skills/gif-maker/package.json +4 -1
- package/skills/github-manager/package.json +3 -1
- package/skills/gmail/CLAUDE.md +1 -1
- package/skills/highlight-reel-generator/src/index.ts +19 -0
- package/skills/hook/src/commands/create.ts +20 -845
- package/skills/hook/src/templates/root.ts +196 -0
- package/skills/hook/src/templates/source.ts +647 -0
- package/skills/http-server/package.json +3 -1
- package/skills/icon-pack/README.md +28 -0
- package/skills/icon-pack/SKILL.md +23 -0
- package/skills/icon-pack/package.json +29 -0
- package/skills/{audio → icon-pack}/tsconfig.json +10 -12
- package/skills/image/package.json +1 -2
- package/skills/implementation-agent/package.json +3 -1
- package/skills/implementation-agent/src/ai-generation.ts +225 -0
- package/skills/implementation-agent/src/index.ts +3 -960
- package/skills/implementation-agent/src/minimist.d.ts +15 -0
- package/skills/implementation-agent/src/templates.ts +686 -0
- package/skills/implementation-agent/src/types.ts +53 -0
- package/skills/implementation-plan/package.json +3 -1
- package/skills/implementation-todo/package.json +3 -1
- package/skills/invoice/package.json +1 -1
- package/skills/invoice/src/index.ts +3 -0
- package/skills/invoice-reconciliation/SKILL.md +42 -0
- package/skills/invoice-reconciliation/package.json +10 -0
- package/skills/landing-page-pack/SKILL.md +47 -0
- package/skills/landing-page-pack/package.json +14 -0
- package/skills/latex-table-generator/package.json +3 -1
- package/skills/logo-design/SKILL.md +25 -44
- package/skills/logo-design/package.json +3 -15
- package/skills/lorem-generator/package.json +3 -1
- package/skills/lorem-generator/src/index.ts +13 -0
- package/skills/managehook/package.json +1 -1
- package/skills/managehook/src/index.ts +3 -0
- package/skills/managemcp/package.json +1 -1
- package/skills/managemcp/src/index.ts +3 -0
- package/skills/manageskill/package.json +1 -1
- package/skills/manageskill/src/index.ts +3 -0
- package/skills/markdown-validator/package.json +3 -1
- package/skills/markdown-validator/src/index.ts +1 -4
- package/skills/market-research-report/SKILL.md +41 -0
- package/skills/market-research-report/package.json +10 -0
- package/skills/mcp-builder/package.json +4 -1
- package/skills/mcp-builder/src/ai-descriptions.ts +37 -0
- package/skills/mcp-builder/src/generators.ts +513 -0
- package/skills/mcp-builder/src/index.ts +7 -908
- package/skills/mcp-builder/src/minimist.d.ts +15 -0
- package/skills/mcp-builder/src/naming.ts +12 -0
- package/skills/mcp-builder/src/options.ts +170 -0
- package/skills/mcp-builder/src/templates.ts +149 -0
- package/skills/mcp-builder/src/types.ts +42 -0
- package/skills/meeting-pack/SKILL.md +43 -0
- package/skills/meeting-pack/package.json +10 -0
- package/skills/merge-pdfs/package.json +5 -1
- package/skills/migration-plan-pack/SKILL.md +45 -0
- package/skills/migration-plan-pack/package.json +10 -0
- package/skills/music/package.json +2 -3
- package/skills/music-album/SKILL.md +37 -0
- package/skills/music-album/package.json +10 -0
- package/skills/notion-manager/package.json +3 -1
- package/skills/npmpublish/CLAUDE.md +5 -8
- package/skills/npmpublish/README.md +5 -26
- package/skills/npmpublish/src/index.ts +9 -147
- package/skills/one-page-website/SKILL.md +46 -0
- package/skills/one-page-website/package.json +10 -0
- package/skills/one-page-website/tsconfig.json +8 -0
- package/skills/pdf-generate/src/cli.ts +162 -0
- package/skills/pdf-generate/src/html.ts +84 -0
- package/skills/pdf-generate/src/index.ts +11 -800
- package/skills/pdf-generate/src/markdown.ts +27 -0
- package/skills/pdf-generate/src/pdf-writer.ts +78 -0
- package/skills/pdf-generate/src/runtime.ts +34 -0
- package/skills/pdf-generate/src/security.ts +37 -0
- package/skills/pdf-generate/src/templates.ts +311 -0
- package/skills/pdf-generate/src/types.ts +28 -0
- package/skills/pdf-read/SKILL.md +10 -10
- package/skills/pdf-to-dataset/SKILL.md +45 -0
- package/skills/pdf-to-dataset/package.json +10 -0
- package/skills/pdf-to-markdown/SKILL.md +49 -0
- package/skills/pdf-to-markdown/package.json +10 -0
- package/skills/pdf-to-markdown/tsconfig.json +10 -0
- package/skills/performance-audit-report/SKILL.md +42 -0
- package/skills/performance-audit-report/package.json +10 -0
- package/skills/persona-based-adwriter/src/index.ts +19 -0
- package/skills/photo-album/SKILL.md +29 -0
- package/skills/photo-album/package.json +9 -0
- package/skills/photo-album/tsconfig.json +4 -0
- package/skills/pitch-deck/SKILL.md +43 -0
- package/skills/pitch-deck/package.json +9 -0
- package/skills/playlist-maker/SKILL.md +33 -0
- package/skills/playlist-maker/package.json +9 -0
- package/skills/playlist-maker/tsconfig.json +4 -0
- package/skills/product-mockup/SKILL.md +45 -0
- package/skills/product-mockup/package.json +3 -20
- package/skills/product-mockup/tsconfig.json +3 -5
- package/skills/project-retro-companion/src/index.ts +19 -0
- package/skills/proposal-pack/SKILL.md +45 -0
- package/skills/proposal-pack/package.json +10 -0
- package/skills/read-pdf/SKILL.md +5 -4
- package/skills/repo-onboarding-report/SKILL.md +42 -0
- package/skills/repo-onboarding-report/package.json +10 -0
- package/skills/sales-call-recapper/src/index.ts +20 -0
- package/skills/salescopy/package.json +1 -1
- package/skills/salescopy/src/index.ts +3 -0
- package/skills/scaffold-project/src/ai-detect.ts +136 -0
- package/skills/scaffold-project/src/file-generators.ts +292 -0
- package/skills/scaffold-project/src/index.ts +8 -991
- package/skills/scaffold-project/src/project-config.ts +338 -0
- package/skills/scaffold-project/src/templates.ts +173 -0
- package/skills/scaffold-project/src/types.ts +58 -0
- package/skills/scientific-figure-check/package.json +3 -1
- package/skills/sdk-generator/SKILL.md +45 -0
- package/skills/sdk-generator/package.json +10 -0
- package/skills/sdk-generator/tsconfig.json +8 -0
- package/skills/security-audit/src/index.ts +25 -6
- package/skills/security-audit-report/SKILL.md +40 -0
- package/skills/security-audit-report/package.json +10 -0
- package/skills/seo-content-pack/SKILL.md +44 -0
- package/skills/seo-content-pack/package.json +9 -0
- package/skills/short-video-pack/SKILL.md +30 -0
- package/skills/short-video-pack/package.json +10 -0
- package/skills/slack-assistant/package.json +3 -1
- package/skills/slide-deck-generator/SKILL.md +44 -0
- package/skills/slide-deck-generator/package.json +10 -0
- package/skills/sms/package.json +1 -1
- package/skills/sms/src/index.ts +15 -0
- package/skills/social-content-calendar/SKILL.md +45 -0
- package/skills/social-content-calendar/package.json +14 -0
- package/skills/split-pdf/package.json +4 -1
- package/skills/subtitle/package.json +2 -1
- package/skills/subtitle/src/index.ts +3 -0
- package/skills/terraform-generator/package.json +3 -1
- package/skills/test-suite-generator/SKILL.md +41 -0
- package/skills/test-suite-generator/package.json +10 -0
- package/skills/timesheet/package.json +1 -1
- package/skills/timesheet/src/index.ts +3 -0
- package/skills/transcript/SKILL.md +1 -8
- package/skills/validate-config/package.json +3 -1
- package/skills/video/package.json +6 -4
- package/skills/video-downloader/package.json +3 -1
- package/skills/video-highlight-pack/SKILL.md +44 -0
- package/skills/video-highlight-pack/package.json +10 -0
- package/skills/voiceover-jingle-pack/SKILL.md +28 -0
- package/skills/voiceover-jingle-pack/package.json +10 -0
- package/skills/watermark/package.json +6 -1
- package/skills/webcrawling/package.json +2 -1
- package/skills/write/SKILL.md +6 -6
- package/dist/server/serve.d.ts +0 -11
- package/skills/apidocs/.claude/settings.json +0 -5
- package/skills/audio/.env.example +0 -14
- package/skills/audio/QUICKSTART.md +0 -158
- package/skills/audio/README.md +0 -256
- package/skills/audio/src/index-local.ts +0 -206
- package/skills/audio/src/index.ts +0 -95
- package/skills/audio/src/providers/elevenlabs.ts +0 -115
- package/skills/audio/src/providers/google.ts +0 -116
- package/skills/audio/src/providers/minimax.ts +0 -83
- package/skills/audio/src/providers/openai.ts +0 -115
- package/skills/audio/src/types.ts +0 -79
- package/skills/audiobook-chapter-proofer/CLAUDE.md +0 -19
- package/skills/audiobook-chapter-proofer/package.json +0 -27
- package/skills/audiobook-chapter-proofer/src/index.ts +0 -285
- package/skills/browse/src/client.ts +0 -373
- package/skills/browse/src/index-local.ts +0 -430
- package/skills/browse/src/index.ts +0 -110
- package/skills/browse/src/sse-server.ts +0 -919
- package/skills/browse/src/types.ts +0 -104
- package/skills/consolelog/src/server/index.ts +0 -508
- package/skills/create-blog-article/CLAUDE.md +0 -19
- package/skills/create-blog-article/src/index.ts +0 -745
- package/skills/create-blog-article/tsconfig.json +0 -10
- package/skills/deepresearch/src/agents/query-generator.ts +0 -91
- package/skills/deepresearch/src/agents/synthesizer.ts +0 -111
- package/skills/deepresearch/src/index.ts +0 -224
- package/skills/deepresearch/src/research.ts +0 -166
- package/skills/deepresearch/src/services/anthropic.ts +0 -69
- package/skills/deepresearch/src/services/exa.ts +0 -108
- package/skills/deepresearch/src/services/firecrawl.ts +0 -88
- package/skills/deepresearch/src/services/openai.ts +0 -81
- package/skills/deepresearch/src/types.ts +0 -76
- package/skills/deepresearch/src/utils/file.ts +0 -111
- package/skills/deepresearch/src/utils/logger.ts +0 -84
- package/skills/domainpurchase/src/server/index.ts +0 -332
- package/skills/domainsearch/src/server/index.ts +0 -229
- package/skills/e2bswarm/README.md +0 -135
- package/skills/e2bswarm/SKILL.md +0 -118
- package/skills/e2bswarm/examples/tasks-example.json +0 -38
- package/skills/e2bswarm/package.json +0 -59
- package/skills/e2bswarm/src/commands/collect.ts +0 -135
- package/skills/e2bswarm/src/commands/install.ts +0 -164
- package/skills/e2bswarm/src/commands/kill.ts +0 -62
- package/skills/e2bswarm/src/commands/spawn.ts +0 -134
- package/skills/e2bswarm/src/commands/status.ts +0 -90
- package/skills/e2bswarm/src/commands/sync.ts +0 -208
- package/skills/e2bswarm/src/index.ts +0 -121
- package/skills/e2bswarm/src/lib/config.ts +0 -75
- package/skills/e2bswarm/src/lib/e2b.ts +0 -490
- package/skills/e2bswarm/src/lib/github.ts +0 -253
- package/skills/e2bswarm/src/lib/logger.ts +0 -41
- package/skills/e2bswarm/src/lib/paths.ts +0 -75
- package/skills/e2bswarm/src/lib/tasks.ts +0 -320
- package/skills/e2bswarm/src/types/index.ts +0 -107
- package/skills/e2bswarm/templates/codebox/e2b.Dockerfile +0 -38
- package/skills/e2bswarm/templates/codebox/e2b.toml +0 -3
- package/skills/e2bswarm/templates/setup.sh +0 -21
- package/skills/e2bswarm/tsconfig.json +0 -19
- package/skills/generate-book-cover/src/index.ts +0 -694
- package/skills/image/src/index-local.ts +0 -206
- package/skills/image/src/index.ts +0 -96
- package/skills/image/src/providers/google.ts +0 -79
- package/skills/image/src/providers/minimax.ts +0 -94
- package/skills/image/src/providers/openai.ts +0 -80
- package/skills/image/src/providers/xai.ts +0 -73
- package/skills/image/src/types.ts +0 -37
- package/skills/logo-design/CLAUDE.md +0 -30
- package/skills/logo-design/src/index.ts +0 -322
- package/skills/managehook/src/server/index.ts +0 -108
- package/skills/managemcp/src/server/index.ts +0 -108
- package/skills/manageskill/src/server/index.ts +0 -108
- package/skills/music/CLAUDE.md +0 -9
- package/skills/music/src/index.ts +0 -94
- package/skills/music/tsconfig.json +0 -10
- package/skills/pdf-read/src/index.ts +0 -320
- package/skills/product-mockup/CLAUDE.md +0 -19
- package/skills/product-mockup/src/index.ts +0 -290
- package/skills/read-pdf/src/index.ts +0 -388
- package/skills/remove-background/src/index.ts +0 -405
- package/skills/sound-effects/SKILL.md +0 -34
- package/skills/sound-effects/package.json +0 -21
- package/skills/sound-effects/src/index.ts +0 -172
- package/skills/sound-effects/tsconfig.json +0 -8
- package/skills/transcript/src/chunker.ts +0 -215
- package/skills/transcript/src/formatter.ts +0 -134
- package/skills/transcript/src/index-local.ts +0 -226
- package/skills/transcript/src/index.ts +0 -110
- package/skills/transcript/src/providers/elevenlabs.ts +0 -133
- package/skills/transcript/src/providers/gemini.ts +0 -192
- package/skills/transcript/src/providers/index.ts +0 -54
- package/skills/transcript/src/providers/openai.ts +0 -203
- package/skills/transcript/src/types.ts +0 -106
- package/skills/video/.env.example +0 -14
- package/skills/video/EXAMPLES.md +0 -266
- package/skills/video/LICENSE +0 -192
- package/skills/video/README.md +0 -174
- package/skills/video/src/cli.ts +0 -155
- package/skills/video/src/index-local.ts +0 -148
- package/skills/video/src/index.ts +0 -96
- package/skills/video/src/providers/google-veo.ts +0 -126
- package/skills/video/src/providers/index.ts +0 -22
- package/skills/video/src/providers/minimax.ts +0 -100
- package/skills/video/src/providers/openai-sora.ts +0 -164
- package/skills/video/src/providers/runway.ts +0 -159
- package/skills/video/src/types.ts +0 -35
- package/skills/video/tsconfig.json +0 -22
- package/skills/voiceover-casting-assistant/CLAUDE.md +0 -19
- package/skills/voiceover-casting-assistant/package.json +0 -27
- package/skills/voiceover-casting-assistant/src/index.ts +0 -255
- package/skills/voiceover-casting-assistant/tsconfig.json +0 -10
- package/skills/webcrawling/src/commands/config.ts +0 -34
- package/skills/webcrawling/src/commands/crawl.ts +0 -33
- package/skills/webcrawling/src/commands/scrape.ts +0 -32
- package/skills/webcrawling/src/commands/sessions.ts +0 -42
- package/skills/webcrawling/src/lib/crawler.ts +0 -174
- package/skills/webcrawling/src/lib/storage.ts +0 -130
- package/skills/webcrawling/src/types/index.ts +0 -45
- package/skills/webcrawling/src/utils/logger.ts +0 -30
- package/skills/webcrawling/src/utils/paths.ts +0 -28
- /package/skills/{audiobook-chapter-proofer → blog-article}/tsconfig.json +0 -0
package/skills/video/src/cli.ts
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import type { GenerateOptions, StatusOptions } from './types';
|
|
2
|
-
|
|
3
|
-
export function parseArgs(): { command: string; options: any } {
|
|
4
|
-
const args = process.argv.slice(2);
|
|
5
|
-
|
|
6
|
-
if (args.length === 0) {
|
|
7
|
-
showHelp();
|
|
8
|
-
process.exit(0);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const command = args[0];
|
|
12
|
-
|
|
13
|
-
if (command === 'help' || command === '--help' || command === '-h') {
|
|
14
|
-
showHelp();
|
|
15
|
-
process.exit(0);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const options: any = {};
|
|
19
|
-
|
|
20
|
-
for (let i = 1; i < args.length; i++) {
|
|
21
|
-
const arg = args[i];
|
|
22
|
-
|
|
23
|
-
if (arg.startsWith('--')) {
|
|
24
|
-
const key = arg.slice(2);
|
|
25
|
-
const value = args[i + 1];
|
|
26
|
-
|
|
27
|
-
if (!value || value.startsWith('--')) {
|
|
28
|
-
options[key] = true;
|
|
29
|
-
} else {
|
|
30
|
-
options[key] = value;
|
|
31
|
-
i++;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return { command, options };
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function validateGenerateOptions(options: any): GenerateOptions {
|
|
40
|
-
if (!options.provider) {
|
|
41
|
-
throw new Error('--provider is required (google, openai, or runway)');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (!['google', 'openai', 'runway'].includes(options.provider)) {
|
|
45
|
-
throw new Error('Invalid provider. Use: google, openai, or runway');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (!options.prompt) {
|
|
49
|
-
throw new Error('--prompt is required');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const validated: GenerateOptions = {
|
|
53
|
-
provider: options.provider,
|
|
54
|
-
prompt: options.prompt,
|
|
55
|
-
output: options.output,
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
if (options.duration) {
|
|
59
|
-
validated.duration = parseInt(options.duration);
|
|
60
|
-
if (isNaN(validated.duration) || validated.duration < 1) {
|
|
61
|
-
throw new Error('Invalid duration. Must be a positive number.');
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (options.resolution) {
|
|
66
|
-
if (!['720p', '1080p', '4k'].includes(options.resolution)) {
|
|
67
|
-
throw new Error('Invalid resolution. Use: 720p, 1080p, or 4k');
|
|
68
|
-
}
|
|
69
|
-
validated.resolution = options.resolution;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (options.aspectRatio || options['aspect-ratio']) {
|
|
73
|
-
const ratio = options.aspectRatio || options['aspect-ratio'];
|
|
74
|
-
if (!['16:9', '9:16', '1:1'].includes(ratio)) {
|
|
75
|
-
throw new Error('Invalid aspect ratio. Use: 16:9, 9:16, or 1:1');
|
|
76
|
-
}
|
|
77
|
-
validated.aspectRatio = ratio;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return validated;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function validateStatusOptions(options: any): StatusOptions {
|
|
84
|
-
if (!options.provider) {
|
|
85
|
-
throw new Error('--provider is required');
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (!['google', 'openai', 'runway'].includes(options.provider)) {
|
|
89
|
-
throw new Error('Invalid provider. Use: google, openai, or runway');
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (!options.jobId && !options['job-id']) {
|
|
93
|
-
throw new Error('--job-id is required');
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return {
|
|
97
|
-
provider: options.provider,
|
|
98
|
-
jobId: options.jobId || options['job-id'],
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function showHelp() {
|
|
103
|
-
console.log(`
|
|
104
|
-
Video Generation CLI
|
|
105
|
-
|
|
106
|
-
USAGE:
|
|
107
|
-
bun run src/index.ts <command> [options]
|
|
108
|
-
|
|
109
|
-
COMMANDS:
|
|
110
|
-
generate Generate a new video
|
|
111
|
-
status Check the status of a video generation job
|
|
112
|
-
help Show this help message
|
|
113
|
-
|
|
114
|
-
GENERATE OPTIONS:
|
|
115
|
-
--provider <name> Provider to use (google, openai, runway) [required]
|
|
116
|
-
--prompt <text> Text prompt for video generation [required]
|
|
117
|
-
--output <path> Output file path (default: ./output.mp4)
|
|
118
|
-
--duration <seconds> Video duration in seconds (default: 5)
|
|
119
|
-
--resolution <size> Video resolution (720p, 1080p, 4k)
|
|
120
|
-
--aspect-ratio <ratio> Aspect ratio (16:9, 9:16, 1:1)
|
|
121
|
-
|
|
122
|
-
STATUS OPTIONS:
|
|
123
|
-
--provider <name> Provider to use (google, openai, runway) [required]
|
|
124
|
-
--job-id <id> Job ID to check [required]
|
|
125
|
-
|
|
126
|
-
EXAMPLES:
|
|
127
|
-
# Generate a video with Google Veo 2
|
|
128
|
-
bun run src/index.ts generate \\
|
|
129
|
-
--provider google \\
|
|
130
|
-
--prompt "a cat walking on a beach at sunset" \\
|
|
131
|
-
--output ./cat.mp4
|
|
132
|
-
|
|
133
|
-
# Generate with Runway
|
|
134
|
-
bun run src/index.ts generate \\
|
|
135
|
-
--provider runway \\
|
|
136
|
-
--prompt "ocean waves crashing on rocks" \\
|
|
137
|
-
--duration 10 \\
|
|
138
|
-
--resolution 1080p
|
|
139
|
-
|
|
140
|
-
# Check generation status
|
|
141
|
-
bun run src/index.ts status \\
|
|
142
|
-
--provider runway \\
|
|
143
|
-
--job-id abc123xyz
|
|
144
|
-
|
|
145
|
-
ENVIRONMENT VARIABLES:
|
|
146
|
-
GOOGLE_API_KEY Google Cloud API key
|
|
147
|
-
GOOGLE_APPLICATION_CREDENTIALS Path to Google service account JSON
|
|
148
|
-
GOOGLE_CLOUD_PROJECT Google Cloud project ID
|
|
149
|
-
GOOGLE_CLOUD_LOCATION Google Cloud location (default: us-central1)
|
|
150
|
-
OPENAI_API_KEY OpenAI API key
|
|
151
|
-
RUNWAY_API_KEY Runway API key
|
|
152
|
-
|
|
153
|
-
For more information, see SKILL.md
|
|
154
|
-
`);
|
|
155
|
-
}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
|
|
3
|
-
import { parseArgs, validateGenerateOptions, validateStatusOptions } from './cli';
|
|
4
|
-
import { getProvider } from './providers';
|
|
5
|
-
import { resolve } from 'path';
|
|
6
|
-
import { handleInstallCommand } from '../../_common';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// Handle install/uninstall commands
|
|
10
|
-
const SKILL_META = {
|
|
11
|
-
name: 'video',
|
|
12
|
-
description: 'Claude Code skill for AI video generation',
|
|
13
|
-
version: '1.0.0',
|
|
14
|
-
commands: `Use: video --help`,
|
|
15
|
-
requiredEnvVars: ['SKILL_API_KEY'],
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
if (await handleInstallCommand(SKILL_META, process.argv.slice(2))) {
|
|
19
|
-
process.exit(0);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async function main() {
|
|
23
|
-
try {
|
|
24
|
-
const { command, options } = parseArgs();
|
|
25
|
-
|
|
26
|
-
switch (command) {
|
|
27
|
-
case 'generate': {
|
|
28
|
-
const generateOptions = validateGenerateOptions(options);
|
|
29
|
-
const provider = getProvider(generateOptions.provider);
|
|
30
|
-
|
|
31
|
-
console.log('\n=== Video Generation ===');
|
|
32
|
-
console.log(`Provider: ${provider.name}`);
|
|
33
|
-
console.log(`Prompt: "${generateOptions.prompt}"\n`);
|
|
34
|
-
|
|
35
|
-
// Start generation
|
|
36
|
-
const job = await provider.generate(generateOptions);
|
|
37
|
-
|
|
38
|
-
console.log(`\n=== Generation Started ===`);
|
|
39
|
-
console.log(`Job ID: ${job.jobId}`);
|
|
40
|
-
console.log(`Status: ${job.status}`);
|
|
41
|
-
|
|
42
|
-
// If already completed (synchronous providers)
|
|
43
|
-
if (job.status === 'completed' && job.videoUrl) {
|
|
44
|
-
console.log(`\nVideo is ready!`);
|
|
45
|
-
|
|
46
|
-
if (generateOptions.output) {
|
|
47
|
-
const outputPath = resolve(generateOptions.output);
|
|
48
|
-
await provider.download(job.videoUrl, outputPath);
|
|
49
|
-
console.log(`\nSaved to: ${outputPath}`);
|
|
50
|
-
} else {
|
|
51
|
-
console.log(`\nVideo URL: ${job.videoUrl}`);
|
|
52
|
-
console.log(`Use --output to download automatically.`);
|
|
53
|
-
}
|
|
54
|
-
} else {
|
|
55
|
-
// Async generation - poll for status
|
|
56
|
-
console.log(`\nVideo generation in progress...`);
|
|
57
|
-
console.log(`\nTo check status, run:`);
|
|
58
|
-
console.log(`bun run src/index.ts status --provider ${generateOptions.provider} --job-id ${job.jobId}`);
|
|
59
|
-
|
|
60
|
-
// Auto-poll if output path is specified
|
|
61
|
-
if (generateOptions.output) {
|
|
62
|
-
console.log(`\nAuto-polling for completion...`);
|
|
63
|
-
await pollUntilComplete(provider, job.jobId, generateOptions.output);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
case 'status': {
|
|
71
|
-
const statusOptions = validateStatusOptions(options);
|
|
72
|
-
const provider = getProvider(statusOptions.provider);
|
|
73
|
-
|
|
74
|
-
console.log('\n=== Checking Status ===');
|
|
75
|
-
console.log(`Provider: ${provider.name}`);
|
|
76
|
-
console.log(`Job ID: ${statusOptions.jobId}\n`);
|
|
77
|
-
|
|
78
|
-
const job = await provider.getStatus(statusOptions.jobId);
|
|
79
|
-
|
|
80
|
-
console.log(`Status: ${job.status}`);
|
|
81
|
-
if (job.progress !== undefined) {
|
|
82
|
-
console.log(`Progress: ${job.progress}%`);
|
|
83
|
-
}
|
|
84
|
-
if (job.error) {
|
|
85
|
-
console.log(`Error: ${job.error}`);
|
|
86
|
-
}
|
|
87
|
-
if (job.videoUrl) {
|
|
88
|
-
console.log(`Video URL: ${job.videoUrl}`);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// Offer to download if completed
|
|
92
|
-
if (job.status === 'completed' && job.videoUrl && options.output) {
|
|
93
|
-
const outputPath = resolve(options.output);
|
|
94
|
-
console.log(`\nDownloading video...`);
|
|
95
|
-
await provider.download(job.videoUrl, outputPath);
|
|
96
|
-
console.log(`Saved to: ${outputPath}`);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
default:
|
|
103
|
-
console.error(`Unknown command: ${command}`);
|
|
104
|
-
console.log(`Run "bun run src/index.ts help" for usage information.`);
|
|
105
|
-
process.exit(1);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
} catch (error) {
|
|
109
|
-
console.error('\nError:', error instanceof Error ? error.message : error);
|
|
110
|
-
process.exit(1);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
async function pollUntilComplete(
|
|
115
|
-
provider: any,
|
|
116
|
-
jobId: string,
|
|
117
|
-
outputPath: string,
|
|
118
|
-
maxAttempts: number = 60,
|
|
119
|
-
intervalMs: number = 10000
|
|
120
|
-
): Promise<void> {
|
|
121
|
-
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
122
|
-
await new Promise(resolve => setTimeout(resolve, intervalMs));
|
|
123
|
-
|
|
124
|
-
const job = await provider.getStatus(jobId);
|
|
125
|
-
|
|
126
|
-
if (job.progress !== undefined) {
|
|
127
|
-
console.log(`Progress: ${job.progress}%`);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (job.status === 'completed') {
|
|
131
|
-
if (job.videoUrl) {
|
|
132
|
-
console.log(`\nVideo generation complete!`);
|
|
133
|
-
const resolvedPath = resolve(outputPath);
|
|
134
|
-
await provider.download(job.videoUrl, resolvedPath);
|
|
135
|
-
console.log(`Saved to: ${resolvedPath}`);
|
|
136
|
-
}
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (job.status === 'failed') {
|
|
141
|
-
throw new Error(`Video generation failed: ${job.error || 'Unknown error'}`);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
throw new Error('Video generation timed out. Use status command to check manually.');
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
main();
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
|
|
3
|
-
import { executeAndSave, executeSkill, handleInstallCommand } from "../../_common";
|
|
4
|
-
|
|
5
|
-
const SKILL = "video";
|
|
6
|
-
|
|
7
|
-
const SKILL_META = {
|
|
8
|
-
name: "video",
|
|
9
|
-
description: "Generate videos using provider-cost AI backends",
|
|
10
|
-
version: "1.0.0",
|
|
11
|
-
commands: "video generate --provider <provider> --prompt <prompt> --output <file>",
|
|
12
|
-
requiredEnvVars: ["SKILL_API_KEY"],
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
if (await handleInstallCommand(SKILL_META, process.argv.slice(2))) {
|
|
16
|
-
process.exit(0);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function parseArgs(): Record<string, string | boolean> {
|
|
20
|
-
const parsed: Record<string, string | boolean> = {};
|
|
21
|
-
const args = process.argv.slice(2);
|
|
22
|
-
for (let i = 0; i < args.length; i++) {
|
|
23
|
-
const arg = args[i];
|
|
24
|
-
if (arg.startsWith("--")) {
|
|
25
|
-
const key = arg.slice(2);
|
|
26
|
-
const next = args[i + 1];
|
|
27
|
-
if (next && !next.startsWith("--")) {
|
|
28
|
-
parsed[key] = next;
|
|
29
|
-
i++;
|
|
30
|
-
} else {
|
|
31
|
-
parsed[key] = true;
|
|
32
|
-
}
|
|
33
|
-
} else if (!parsed.command) {
|
|
34
|
-
parsed.command = arg;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return parsed;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function printHelp() {
|
|
41
|
-
console.log(`Skill Video CLI
|
|
42
|
-
|
|
43
|
-
USAGE:
|
|
44
|
-
video generate --provider <provider> --prompt <prompt> [options]
|
|
45
|
-
|
|
46
|
-
PROVIDERS:
|
|
47
|
-
openai sora-2, sora-2-pro
|
|
48
|
-
minimax MiniMax-Hailuo-2.3-Fast, MiniMax-Hailuo-2.3
|
|
49
|
-
gemini veo-3.1-fast-generate-preview, veo-3.1-generate-preview
|
|
50
|
-
seedance dreamina-seedance-2.0, dreamina-seedance-2.0-fast
|
|
51
|
-
|
|
52
|
-
OPTIONS:
|
|
53
|
-
--model <model> Provider model override
|
|
54
|
-
--duration <seconds> Requested duration
|
|
55
|
-
--image <path-or-url> Optional reference image
|
|
56
|
-
--size <value> Provider-specific size/aspect ratio
|
|
57
|
-
--output <path> Save generated video
|
|
58
|
-
|
|
59
|
-
EXAMPLES:
|
|
60
|
-
video generate --provider seedance --prompt "cinematic product reveal" --duration 6 --output ./video.mp4
|
|
61
|
-
video generate --provider openai --model sora-2 --prompt "aerial city sunrise" --output ./video.mp4`);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
async function main() {
|
|
65
|
-
const args = parseArgs();
|
|
66
|
-
const command = (args.command as string) || "help";
|
|
67
|
-
|
|
68
|
-
if (command === "help" || args.help) {
|
|
69
|
-
printHelp();
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const { command: _command, ...params } = args;
|
|
74
|
-
if (params.output) {
|
|
75
|
-
const success = await executeAndSave({ skill: SKILL, command, ...params });
|
|
76
|
-
process.exit(success ? 0 : 1);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const result = await executeSkill({ skill: SKILL, command, ...params });
|
|
80
|
-
if (result instanceof Blob) {
|
|
81
|
-
console.error("Unexpected binary response. Pass --output to save video output.");
|
|
82
|
-
process.exit(1);
|
|
83
|
-
}
|
|
84
|
-
if (result.success && result.output) {
|
|
85
|
-
console.log(result.output);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
console.error(`Error: ${result.error || "Video generation failed"}`);
|
|
89
|
-
if (result.details) console.error(result.details);
|
|
90
|
-
process.exit(1);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
main().catch((error) => {
|
|
94
|
-
console.error(`Fatal error: ${(error as Error).message}`);
|
|
95
|
-
process.exit(1);
|
|
96
|
-
});
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { VertexAI } from '@google-cloud/vertexai';
|
|
2
|
-
import type { VideoProvider, GenerateOptions, VideoJob } from '../types';
|
|
3
|
-
import { writeFile } from 'fs/promises';
|
|
4
|
-
|
|
5
|
-
export class GoogleVeoProvider implements VideoProvider {
|
|
6
|
-
name = 'Google Veo 3.1';
|
|
7
|
-
private vertexAI: VertexAI;
|
|
8
|
-
private jobs: Map<string, VideoJob> = new Map();
|
|
9
|
-
|
|
10
|
-
constructor() {
|
|
11
|
-
// Initialize Vertex AI
|
|
12
|
-
const projectId = process.env.GOOGLE_CLOUD_PROJECT || 'your-project-id';
|
|
13
|
-
const location = process.env.GOOGLE_CLOUD_LOCATION || 'us-central1';
|
|
14
|
-
|
|
15
|
-
this.vertexAI = new VertexAI({
|
|
16
|
-
project: projectId,
|
|
17
|
-
location: location,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async generate(options: GenerateOptions): Promise<VideoJob> {
|
|
22
|
-
console.log(`[${this.name}] Starting video generation...`);
|
|
23
|
-
console.log(`Prompt: "${options.prompt}"`);
|
|
24
|
-
|
|
25
|
-
try {
|
|
26
|
-
// Generate a unique job ID
|
|
27
|
-
const jobId = `veo_${Date.now()}_${Math.random().toString(36).substring(7)}`;
|
|
28
|
-
|
|
29
|
-
// Initialize job status
|
|
30
|
-
const job: VideoJob = {
|
|
31
|
-
jobId,
|
|
32
|
-
status: 'processing',
|
|
33
|
-
progress: 0,
|
|
34
|
-
};
|
|
35
|
-
this.jobs.set(jobId, job);
|
|
36
|
-
|
|
37
|
-
// Get the generative model
|
|
38
|
-
// Veo 3.1 - Google's latest video generation model
|
|
39
|
-
const model = this.vertexAI.preview.getGenerativeModel({
|
|
40
|
-
model: 'veo-3.1',
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// Prepare the prompt with cinematography hints if applicable
|
|
44
|
-
let enhancedPrompt = options.prompt;
|
|
45
|
-
|
|
46
|
-
// Add resolution hint
|
|
47
|
-
if (options.resolution) {
|
|
48
|
-
const resMap = { '720p': '1280x720', '1080p': '1920x1080', '4k': '3840x2160' };
|
|
49
|
-
enhancedPrompt += ` (${resMap[options.resolution]} resolution)`;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Generate video
|
|
53
|
-
console.log(`[${this.name}] Sending request to Vertex AI...`);
|
|
54
|
-
|
|
55
|
-
// Note: This is a placeholder for the actual API call
|
|
56
|
-
// The real implementation depends on the final Veo 2 API structure
|
|
57
|
-
const result = await model.generateContent({
|
|
58
|
-
contents: [{
|
|
59
|
-
role: 'user',
|
|
60
|
-
parts: [{
|
|
61
|
-
text: enhancedPrompt,
|
|
62
|
-
}],
|
|
63
|
-
}],
|
|
64
|
-
generationConfig: {
|
|
65
|
-
temperature: 0.7,
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// Update job with result
|
|
70
|
-
// In reality, Veo 2 will likely return a job ID for async processing
|
|
71
|
-
job.status = 'completed';
|
|
72
|
-
job.progress = 100;
|
|
73
|
-
|
|
74
|
-
// Extract video URL from response
|
|
75
|
-
// This is a placeholder - actual implementation will depend on API response structure
|
|
76
|
-
const response = result.response;
|
|
77
|
-
job.videoUrl = 'https://storage.googleapis.com/generated-video-url'; // Placeholder
|
|
78
|
-
|
|
79
|
-
this.jobs.set(jobId, job);
|
|
80
|
-
|
|
81
|
-
console.log(`[${this.name}] Video generation initiated. Job ID: ${jobId}`);
|
|
82
|
-
console.log(`Note: Google Veo 2 API is in preview. This is a reference implementation.`);
|
|
83
|
-
|
|
84
|
-
return job;
|
|
85
|
-
|
|
86
|
-
} catch (error) {
|
|
87
|
-
console.error(`[${this.name}] Error:`, error);
|
|
88
|
-
throw new Error(`Failed to generate video: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
async getStatus(jobId: string): Promise<VideoJob> {
|
|
93
|
-
const job = this.jobs.get(jobId);
|
|
94
|
-
|
|
95
|
-
if (!job) {
|
|
96
|
-
throw new Error(`Job ${jobId} not found`);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// In a real implementation, this would query the Vertex AI API
|
|
100
|
-
// for the actual job status
|
|
101
|
-
console.log(`[${this.name}] Job ${jobId} status: ${job.status}`);
|
|
102
|
-
|
|
103
|
-
return job;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
async download(videoUrl: string, outputPath: string): Promise<void> {
|
|
107
|
-
console.log(`[${this.name}] Downloading video to ${outputPath}...`);
|
|
108
|
-
|
|
109
|
-
try {
|
|
110
|
-
const response = await fetch(videoUrl);
|
|
111
|
-
|
|
112
|
-
if (!response.ok) {
|
|
113
|
-
throw new Error(`Failed to download: ${response.statusText}`);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
117
|
-
const buffer = Buffer.from(arrayBuffer);
|
|
118
|
-
|
|
119
|
-
await writeFile(outputPath, buffer);
|
|
120
|
-
|
|
121
|
-
console.log(`[${this.name}] Video downloaded successfully!`);
|
|
122
|
-
} catch (error) {
|
|
123
|
-
throw new Error(`Download failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Provider, VideoProvider } from '../types';
|
|
2
|
-
import { MinimaxProvider } from './minimax';
|
|
3
|
-
import { GoogleVeoProvider } from './google-veo';
|
|
4
|
-
import { OpenAISoraProvider } from './openai-sora';
|
|
5
|
-
import { RunwayProvider } from './runway';
|
|
6
|
-
|
|
7
|
-
export function getProvider(provider: Provider): VideoProvider {
|
|
8
|
-
switch (provider) {
|
|
9
|
-
case 'minimax':
|
|
10
|
-
return new MinimaxProvider();
|
|
11
|
-
case 'google':
|
|
12
|
-
return new GoogleVeoProvider();
|
|
13
|
-
case 'openai':
|
|
14
|
-
return new OpenAISoraProvider();
|
|
15
|
-
case 'runway':
|
|
16
|
-
return new RunwayProvider();
|
|
17
|
-
default:
|
|
18
|
-
throw new Error(`Unknown provider: ${provider}`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { MinimaxProvider, GoogleVeoProvider, OpenAISoraProvider, RunwayProvider };
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import type { VideoProvider, GenerateOptions, VideoJob } from '../types';
|
|
2
|
-
import { writeFile } from 'fs/promises';
|
|
3
|
-
|
|
4
|
-
export class MinimaxProvider implements VideoProvider {
|
|
5
|
-
name = 'Minimax Video-01';
|
|
6
|
-
private apiKey: string;
|
|
7
|
-
private baseUrl = 'https://api.minimax.chat/v1';
|
|
8
|
-
|
|
9
|
-
constructor() {
|
|
10
|
-
this.apiKey = process.env.MINIMAX_API_KEY || '';
|
|
11
|
-
if (!this.apiKey) {
|
|
12
|
-
throw new Error('MINIMAX_API_KEY environment variable is required');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
async generate(options: GenerateOptions): Promise<VideoJob> {
|
|
17
|
-
console.log(`[${this.name}] Starting video generation...`);
|
|
18
|
-
console.log(`Prompt: "${options.prompt}"`);
|
|
19
|
-
|
|
20
|
-
const body: Record<string, unknown> = {
|
|
21
|
-
model: 'T2V-01',
|
|
22
|
-
prompt: options.prompt,
|
|
23
|
-
prompt_optimizer: true,
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const response = await fetch(`${this.baseUrl}/video_generation`, {
|
|
27
|
-
method: 'POST',
|
|
28
|
-
headers: {
|
|
29
|
-
'Content-Type': 'application/json',
|
|
30
|
-
'Authorization': `Bearer ${this.apiKey}`,
|
|
31
|
-
},
|
|
32
|
-
body: JSON.stringify(body),
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
if (!response.ok) {
|
|
36
|
-
const err = await response.text();
|
|
37
|
-
throw new Error(`Minimax API error: ${response.status} - ${err}`);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const data = await response.json() as { task_id: string };
|
|
41
|
-
|
|
42
|
-
return {
|
|
43
|
-
jobId: data.task_id,
|
|
44
|
-
status: 'processing',
|
|
45
|
-
progress: 0,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async getStatus(jobId: string): Promise<VideoJob> {
|
|
50
|
-
const response = await fetch(
|
|
51
|
-
`${this.baseUrl}/query/video_generation?task_id=${jobId}`,
|
|
52
|
-
{ headers: { 'Authorization': `Bearer ${this.apiKey}` } }
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
const data = await response.json() as {
|
|
56
|
-
task_id: string;
|
|
57
|
-
status: string;
|
|
58
|
-
file_id?: string;
|
|
59
|
-
base_resp?: { status_msg: string };
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
if (data.status === 'Success' && data.file_id) {
|
|
63
|
-
const fileRes = await fetch(
|
|
64
|
-
`${this.baseUrl}/files/retrieve?file_id=${data.file_id}`,
|
|
65
|
-
{ headers: { 'Authorization': `Bearer ${this.apiKey}` } }
|
|
66
|
-
);
|
|
67
|
-
const fileData = await fileRes.json() as { file: { download_url: string } };
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
jobId,
|
|
71
|
-
status: 'completed',
|
|
72
|
-
progress: 100,
|
|
73
|
-
videoUrl: fileData.file.download_url,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (data.status === 'Fail') {
|
|
78
|
-
return {
|
|
79
|
-
jobId,
|
|
80
|
-
status: 'failed',
|
|
81
|
-
error: data.base_resp?.status_msg || 'Unknown error',
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return {
|
|
86
|
-
jobId,
|
|
87
|
-
status: 'processing',
|
|
88
|
-
progress: data.status === 'Processing' ? 50 : 10,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
async download(videoUrl: string, outputPath: string): Promise<void> {
|
|
93
|
-
console.log(`[${this.name}] Downloading video to ${outputPath}...`);
|
|
94
|
-
const response = await fetch(videoUrl);
|
|
95
|
-
if (!response.ok) throw new Error(`Download failed: ${response.statusText}`);
|
|
96
|
-
const buffer = Buffer.from(await response.arrayBuffer());
|
|
97
|
-
await writeFile(outputPath, buffer);
|
|
98
|
-
console.log(`[${this.name}] Video downloaded.`);
|
|
99
|
-
}
|
|
100
|
-
}
|