@crievo/omni 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +41 -0
- package/README.md +2 -2
- package/bin/omni.mjs +18 -0
- package/docs/onboarding/clone-voice.png +0 -0
- package/docs/onboarding/getting-started.png +0 -0
- package/docs/onboarding/new-video.png +0 -0
- package/docs/onboarding/providers.png +0 -0
- package/docs/onboarding/publish.png +0 -0
- package/docs/onboarding/references.png +0 -0
- package/docs/onboarding.md +212 -0
- package/omnivideo.config.example.json +437 -0
- package/package.json +40 -4
- package/reference/captions.md +156 -0
- package/reference/carousel-contract.md +91 -0
- package/reference/cloud.md +96 -0
- package/reference/learnings.md +792 -0
- package/reference/omnichat.md +305 -0
- package/reference/premiere-mcp.md +91 -0
- package/reference/publish.md +305 -0
- package/reference/scenes-contract.md +109 -0
- package/reference/studio.md +666 -0
- package/reference/voicestudio.md +81 -0
- package/reference/writing-for-voice.md +67 -0
- package/requirements.txt +3 -0
- package/studio/api/app.ts +87 -0
- package/studio/api/lib/errors.ts +33 -0
- package/studio/api/lib/files.ts +41 -0
- package/studio/api/lib/hono.ts +9 -0
- package/studio/api/lib/result.ts +14 -0
- package/studio/api/lib/validate.ts +31 -0
- package/studio/api/lib/video.ts +10 -0
- package/studio/api/middleware/json-charset.ts +11 -0
- package/studio/api/middleware/local-only.ts +32 -0
- package/studio/api/middleware/no-timeout.ts +10 -0
- package/studio/api/routes/admin.ts +18 -0
- package/studio/api/routes/agent-cascade.ts +100 -0
- package/studio/api/routes/agent-history.ts +23 -0
- package/studio/api/routes/agent.ts +162 -0
- package/studio/api/routes/analytics.ts +31 -0
- package/studio/api/routes/approval.ts +60 -0
- package/studio/api/routes/archive.ts +12 -0
- package/studio/api/routes/captions.ts +28 -0
- package/studio/api/routes/carousel.ts +38 -0
- package/studio/api/routes/clone.ts +27 -0
- package/studio/api/routes/create.ts +19 -0
- package/studio/api/routes/events.ts +11 -0
- package/studio/api/routes/export.ts +14 -0
- package/studio/api/routes/media.ts +30 -0
- package/studio/api/routes/omnichat.ts +113 -0
- package/studio/api/routes/onboarding.ts +14 -0
- package/studio/api/routes/publish.ts +40 -0
- package/studio/api/routes/queue.ts +14 -0
- package/studio/api/routes/references.ts +40 -0
- package/studio/api/routes/runner.ts +17 -0
- package/studio/api/routes/schedule.ts +47 -0
- package/studio/api/routes/services.ts +11 -0
- package/studio/api/routes/sessions.ts +27 -0
- package/studio/api/routes/settings.ts +102 -0
- package/studio/api/routes/sound.ts +45 -0
- package/studio/api/routes/thumbnail.ts +18 -0
- package/studio/api/routes/usage.ts +13 -0
- package/studio/api/routes/videos.ts +41 -0
- package/studio/api/routes/voices.ts +71 -0
- package/studio/api/services/admin.ts +113 -0
- package/studio/api/services/agent-cascade.ts +975 -0
- package/studio/api/services/agent-claude.ts +47 -0
- package/studio/api/services/agent-history.ts +103 -0
- package/studio/api/services/agent-persona.ts +77 -0
- package/studio/api/services/agent-tools.ts +2237 -0
- package/studio/api/services/agent-ui-tools.ts +259 -0
- package/studio/api/services/agent-wait.ts +32 -0
- package/studio/api/services/agent.ts +553 -0
- package/studio/api/services/analytics.ts +92 -0
- package/studio/api/services/approval.ts +134 -0
- package/studio/api/services/archive.ts +38 -0
- package/studio/api/services/captions.ts +268 -0
- package/studio/api/services/carousel.ts +206 -0
- package/studio/api/services/classify.ts +196 -0
- package/studio/api/services/clone-phrases.ts +75 -0
- package/studio/api/services/clone.ts +722 -0
- package/studio/api/services/create.ts +421 -0
- package/studio/api/services/events.ts +215 -0
- package/studio/api/services/media.ts +32 -0
- package/studio/api/services/omnichat.ts +624 -0
- package/studio/api/services/onboarding.ts +77 -0
- package/studio/api/services/publish.ts +287 -0
- package/studio/api/services/queue.ts +150 -0
- package/studio/api/services/references.ts +269 -0
- package/studio/api/services/root.ts +60 -0
- package/studio/api/services/services.ts +114 -0
- package/studio/api/services/sessions.ts +1007 -0
- package/studio/api/services/settings.ts +983 -0
- package/studio/api/services/sound.ts +311 -0
- package/studio/api/services/thumbnail.ts +133 -0
- package/studio/api/services/usage.ts +27 -0
- package/studio/api/services/videos.ts +418 -0
- package/studio/api/services/voice-pause.ts +98 -0
- package/studio/api/services/voices.ts +324 -0
- package/studio/runner/runner.ts +244 -0
- package/studio/shared/omni-actions.ts +68 -0
- package/studio/shared/omni-admin.ts +52 -0
- package/studio/shared/omni-farewell.ts +48 -0
- package/studio/shared/omni-hotword.ts +20 -0
- package/studio/shared/omni-screens.ts +228 -0
- package/studio/shared/schemas/admin.ts +15 -0
- package/studio/shared/schemas/agent-cascade.ts +58 -0
- package/studio/shared/schemas/agent-history.ts +73 -0
- package/studio/shared/schemas/agent.ts +50 -0
- package/studio/shared/schemas/analytics.ts +6 -0
- package/studio/shared/schemas/approval.ts +22 -0
- package/studio/shared/schemas/captions.ts +19 -0
- package/studio/shared/schemas/carousel.ts +26 -0
- package/studio/shared/schemas/clone.ts +40 -0
- package/studio/shared/schemas/common.ts +16 -0
- package/studio/shared/schemas/omnichat.ts +54 -0
- package/studio/shared/schemas/onboarding.ts +5 -0
- package/studio/shared/schemas/publish.ts +45 -0
- package/studio/shared/schemas/references.ts +20 -0
- package/studio/shared/schemas/settings.ts +82 -0
- package/studio/shared/schemas/sound.ts +22 -0
- package/studio/shared/schemas/videos.ts +38 -0
- package/studio/shared/schemas/voices.ts +23 -0
- package/studio/shared/types/api.ts +1290 -0
- package/studio/studio.ts +148 -0
- package/studio/tsconfig.json +15 -0
- package/studio/web/assets/logos/cartesia.svg +4 -0
- package/studio/web/assets/logos/elevenlabs.svg +12 -0
- package/studio/web/assets/logos/fish.svg +24 -0
- package/studio/web/assets/logos/omni-black.png +0 -0
- package/studio/web/assets/logos/omni-white.png +0 -0
- package/studio/web/assets/logos/voicestudio.svg +21 -0
- package/studio/web/components/AgentMark.tsx +7 -0
- package/studio/web/components/AgentWalking.tsx +11 -0
- package/studio/web/components/ApiKeyField.tsx +104 -0
- package/studio/web/components/AppShell.tsx +64 -0
- package/studio/web/components/ApprovalNotice.tsx +65 -0
- package/studio/web/components/AvatarGroupIcon.tsx +22 -0
- package/studio/web/components/AvatarNameField.tsx +86 -0
- package/studio/web/components/AvatarPicker.tsx +84 -0
- package/studio/web/components/BrandLogo.tsx +16 -0
- package/studio/web/components/CartesiaPlanSetting.tsx +90 -0
- package/studio/web/components/ClaudeWalking.tsx +32 -0
- package/studio/web/components/CloneVoiceDialog/GuidedScript.tsx +39 -0
- package/studio/web/components/CloneVoiceDialog/LanguageBar.tsx +37 -0
- package/studio/web/components/CloneVoiceDialog/LevelMeter.tsx +31 -0
- package/studio/web/components/CloneVoiceDialog/ProviderChoice.tsx +81 -0
- package/studio/web/components/CloneVoiceDialog/QualityPanel.tsx +62 -0
- package/studio/web/components/CloneVoiceDialog/RecordStep.tsx +50 -0
- package/studio/web/components/CloneVoiceDialog/RecorderBar.tsx +79 -0
- package/studio/web/components/CloneVoiceDialog/RedoSummary.tsx +54 -0
- package/studio/web/components/CloneVoiceDialog/SaveStep.tsx +91 -0
- package/studio/web/components/CloneVoiceDialog/SourceBar.tsx +30 -0
- package/studio/web/components/CloneVoiceDialog/index.tsx +141 -0
- package/studio/web/components/CloneVoiceDialog/types.ts +28 -0
- package/studio/web/components/CloneVoiceDialog/useCloneVoice.ts +528 -0
- package/studio/web/components/ConnectionSignals.tsx +51 -0
- package/studio/web/components/EditVoiceDialog/EditVoiceFooter.tsx +72 -0
- package/studio/web/components/EditVoiceDialog/ProviderCards.tsx +81 -0
- package/studio/web/components/EditVoiceDialog/index.tsx +256 -0
- package/studio/web/components/ErrorBanner.tsx +115 -0
- package/studio/web/components/FinishedTask.tsx +41 -0
- package/studio/web/components/FishModelSetting.tsx +69 -0
- package/studio/web/components/FishPriceSetting.tsx +44 -0
- package/studio/web/components/HumanBanner.tsx +64 -0
- package/studio/web/components/Lightbox.tsx +41 -0
- package/studio/web/components/LogStream.tsx +42 -0
- package/studio/web/components/Markdown.tsx +21 -0
- package/studio/web/components/MissingDmsPanel/BatchSend.tsx +137 -0
- package/studio/web/components/MissingDmsPanel/CommentCard.tsx +168 -0
- package/studio/web/components/MissingDmsPanel/CommentFeed.tsx +45 -0
- package/studio/web/components/MissingDmsPanel/DmBubble.tsx +38 -0
- package/studio/web/components/MissingDmsPanel/ReplyComposer.tsx +63 -0
- package/studio/web/components/MissingDmsPanel/index.tsx +98 -0
- package/studio/web/components/NotFound.tsx +48 -0
- package/studio/web/components/Omni/OmniAvatarPicker.tsx +92 -0
- package/studio/web/components/Omni/OmniCards.tsx +202 -0
- package/studio/web/components/Omni/OmniGlow.tsx +183 -0
- package/studio/web/components/Omni/OmniHistory.tsx +119 -0
- package/studio/web/components/Omni/OmniHotword.tsx +40 -0
- package/studio/web/components/Omni/OmniMicSelect.tsx +92 -0
- package/studio/web/components/Omni/OmniVoiceSample.tsx +81 -0
- package/studio/web/components/Omni/OmniWidget.tsx +743 -0
- package/studio/web/components/Omni/PendingActions.tsx +200 -0
- package/studio/web/components/Omni/Transcript.tsx +127 -0
- package/studio/web/components/OmnichatAccountStatus.tsx +87 -0
- package/studio/web/components/OmnichatRulePanel/RuleConfig.tsx +150 -0
- package/studio/web/components/OmnichatRulePanel/RuleDryRun.tsx +15 -0
- package/studio/web/components/OmnichatRulePanel/RuleEnableConfirm.tsx +42 -0
- package/studio/web/components/OmnichatRulePanel/RuleSkeleton.tsx +18 -0
- package/studio/web/components/OmnichatRulePanel/RuleStatus.tsx +55 -0
- package/studio/web/components/OmnichatRulePanel/index.tsx +115 -0
- package/studio/web/components/OmnichatRulePanel/rule-steps.ts +67 -0
- package/studio/web/components/OmnichatRulePanel/steps/MessageStep.tsx +91 -0
- package/studio/web/components/OmnichatRulePanel/steps/RepliesStep.tsx +201 -0
- package/studio/web/components/OmnichatRulePanel/steps/TriggerStep.tsx +76 -0
- package/studio/web/components/OmnichatRulePanel/steps/types.ts +11 -0
- package/studio/web/components/Palette.tsx +17 -0
- package/studio/web/components/PlatformCard.tsx +109 -0
- package/studio/web/components/PlatformIcon.tsx +19 -0
- package/studio/web/components/ProviderCard.tsx +80 -0
- package/studio/web/components/ProviderDetail.tsx +367 -0
- package/studio/web/components/ProviderLogo.tsx +20 -0
- package/studio/web/components/QueuePanel.tsx +77 -0
- package/studio/web/components/ReferenceActions.tsx +89 -0
- package/studio/web/components/ReferencePicker.tsx +136 -0
- package/studio/web/components/ResultMessage.tsx +7 -0
- package/studio/web/components/RuleForm.tsx +138 -0
- package/studio/web/components/RuleLog.tsx +151 -0
- package/studio/web/components/RunningTask.tsx +23 -0
- package/studio/web/components/SampleList.tsx +55 -0
- package/studio/web/components/SessionPanel.tsx +352 -0
- package/studio/web/components/SettingRow.tsx +14 -0
- package/studio/web/components/SettingsCategorySkeleton.tsx +25 -0
- package/studio/web/components/SidePanel.tsx +77 -0
- package/studio/web/components/Sidebar.tsx +289 -0
- package/studio/web/components/StageStepper.tsx +87 -0
- package/studio/web/components/StudioOffline.tsx +80 -0
- package/studio/web/components/TaskName.tsx +17 -0
- package/studio/web/components/TopBanners.tsx +30 -0
- package/studio/web/components/VideoOmnichatPanel.tsx +287 -0
- package/studio/web/components/VoiceAvatar.tsx +33 -0
- package/studio/web/components/VoiceCarousel.tsx +196 -0
- package/studio/web/components/VoiceCategory.tsx +9 -0
- package/studio/web/components/VoiceModal.tsx +39 -0
- package/studio/web/components/VoiceProfileCard.tsx +75 -0
- package/studio/web/components/VoiceProfilePicker.tsx +107 -0
- package/studio/web/components/VoiceProfilesSettings.tsx +150 -0
- package/studio/web/components/VoiceProviderCard.tsx +118 -0
- package/studio/web/components/VoiceProvidersCard.tsx +26 -0
- package/studio/web/components/WaitList.tsx +21 -0
- package/studio/web/components/icons.tsx +247 -0
- package/studio/web/components/ui/accordion.tsx +47 -0
- package/studio/web/components/ui/badge.tsx +18 -0
- package/studio/web/components/ui/calendar.tsx +43 -0
- package/studio/web/components/ui/chart.tsx +229 -0
- package/studio/web/components/ui/checkbox.tsx +26 -0
- package/studio/web/components/ui/cx.ts +2 -0
- package/studio/web/components/ui/date-time-picker.tsx +84 -0
- package/studio/web/components/ui/panel.tsx +23 -0
- package/studio/web/components/ui/picker.tsx +58 -0
- package/studio/web/components/ui/popover.tsx +24 -0
- package/studio/web/components/ui/select.tsx +89 -0
- package/studio/web/components/ui/skeleton.tsx +10 -0
- package/studio/web/components/ui/slider.tsx +68 -0
- package/studio/web/components/ui/switch.tsx +13 -0
- package/studio/web/components/ui/tooltip.tsx +59 -0
- package/studio/web/hooks/useAccounts.ts +27 -0
- package/studio/web/hooks/useAdmin.ts +12 -0
- package/studio/web/hooks/useAnalytics.ts +21 -0
- package/studio/web/hooks/useAvatarAudioReactive.ts +87 -0
- package/studio/web/hooks/useBrowserConnect.ts +48 -0
- package/studio/web/hooks/useClonePlan.ts +14 -0
- package/studio/web/hooks/useConnected.ts +7 -0
- package/studio/web/hooks/useLiveQuery.ts +29 -0
- package/studio/web/hooks/useMenuCollapsed.ts +32 -0
- package/studio/web/hooks/useMicDevices.ts +53 -0
- package/studio/web/hooks/useMissingDms.ts +211 -0
- package/studio/web/hooks/useMissingSetupSteps.ts +26 -0
- package/studio/web/hooks/useNow.ts +11 -0
- package/studio/web/hooks/useOmniAgent.ts +278 -0
- package/studio/web/hooks/useOmniClaude.ts +124 -0
- package/studio/web/hooks/useOmniDock.ts +142 -0
- package/studio/web/hooks/useOmniGreeting.ts +60 -0
- package/studio/web/hooks/useOmniHotword.ts +128 -0
- package/studio/web/hooks/useOmnichat.ts +26 -0
- package/studio/web/hooks/useOnboarding.ts +27 -0
- package/studio/web/hooks/usePost.ts +23 -0
- package/studio/web/hooks/useQueue.ts +10 -0
- package/studio/web/hooks/useReferences.ts +20 -0
- package/studio/web/hooks/useRuleEditor.ts +101 -0
- package/studio/web/hooks/useRunner.ts +24 -0
- package/studio/web/hooks/useSaveAction.ts +23 -0
- package/studio/web/hooks/useSchedule.ts +11 -0
- package/studio/web/hooks/useServices.ts +10 -0
- package/studio/web/hooks/useSessions.ts +15 -0
- package/studio/web/hooks/useSettings.ts +11 -0
- package/studio/web/hooks/useSettingsSection.ts +30 -0
- package/studio/web/hooks/useSidePanel.ts +23 -0
- package/studio/web/hooks/useSound.ts +30 -0
- package/studio/web/hooks/useUsage.ts +11 -0
- package/studio/web/hooks/useVideoVoice.ts +36 -0
- package/studio/web/hooks/useVideos.ts +21 -0
- package/studio/web/hooks/useVoiceProfilePreview.ts +52 -0
- package/studio/web/hooks/useVoiceProfiles.ts +7 -0
- package/studio/web/hooks/useVoiceRunning.ts +10 -0
- package/studio/web/hooks/useVoiceStudioClosed.ts +8 -0
- package/studio/web/index.html +19 -0
- package/studio/web/lib/agent.ts +7 -0
- package/studio/web/lib/alerts.ts +210 -0
- package/studio/web/lib/analytics-metrics.ts +351 -0
- package/studio/web/lib/api.ts +70 -0
- package/studio/web/lib/audio.ts +39 -0
- package/studio/web/lib/avatars.ts +41 -0
- package/studio/web/lib/calendar.ts +218 -0
- package/studio/web/lib/caption-position.ts +249 -0
- package/studio/web/lib/carousel.ts +24 -0
- package/studio/web/lib/chime.ts +42 -0
- package/studio/web/lib/clone-voice.ts +55 -0
- package/studio/web/lib/export.ts +11 -0
- package/studio/web/lib/files.ts +8 -0
- package/studio/web/lib/format.ts +93 -0
- package/studio/web/lib/media.ts +29 -0
- package/studio/web/lib/mic-device.ts +72 -0
- package/studio/web/lib/missing-dms.ts +70 -0
- package/studio/web/lib/omni-cards.ts +42 -0
- package/studio/web/lib/omni-cascade.ts +1067 -0
- package/studio/web/lib/omni-greeting-audio.ts +24 -0
- package/studio/web/lib/omni-hotword.ts +231 -0
- package/studio/web/lib/omni-panel.ts +67 -0
- package/studio/web/lib/omni-realtime.ts +811 -0
- package/studio/web/lib/omni-ui.ts +402 -0
- package/studio/web/lib/omni-wait.ts +174 -0
- package/studio/web/lib/omnichat-api.ts +44 -0
- package/studio/web/lib/orb.ts +270 -0
- package/studio/web/lib/pcm-recorder.ts +115 -0
- package/studio/web/lib/platforms.ts +17 -0
- package/studio/web/lib/providers.ts +27 -0
- package/studio/web/lib/publish-draft.ts +52 -0
- package/studio/web/lib/publish-settings.ts +81 -0
- package/studio/web/lib/query-client.ts +122 -0
- package/studio/web/lib/references.ts +13 -0
- package/studio/web/lib/services.ts +40 -0
- package/studio/web/lib/sessions.ts +103 -0
- package/studio/web/lib/settings-categories.ts +58 -0
- package/studio/web/lib/sound-audio.ts +33 -0
- package/studio/web/lib/sound-timeline.ts +291 -0
- package/studio/web/lib/sse.ts +86 -0
- package/studio/web/lib/stage-history.ts +141 -0
- package/studio/web/lib/stages.ts +344 -0
- package/studio/web/lib/studio-offline.ts +60 -0
- package/studio/web/lib/upload.ts +24 -0
- package/studio/web/lib/video-tabs.ts +118 -0
- package/studio/web/lib/voice-profile-draft.ts +34 -0
- package/studio/web/lib/voice-profiles.ts +3 -0
- package/studio/web/main.tsx +14 -0
- package/studio/web/pages/AdminPage/index.tsx +123 -0
- package/studio/web/pages/AgentPage/components/Measurements.tsx +102 -0
- package/studio/web/pages/AgentPage/index.tsx +28 -0
- package/studio/web/pages/AnalyticsPage/components/About.tsx +52 -0
- package/studio/web/pages/AnalyticsPage/components/ChannelCards.tsx +106 -0
- package/studio/web/pages/AnalyticsPage/components/ChannelView.tsx +137 -0
- package/studio/web/pages/AnalyticsPage/components/CollectionStatus.tsx +46 -0
- package/studio/web/pages/AnalyticsPage/components/Comparison.tsx +68 -0
- package/studio/web/pages/AnalyticsPage/components/Diagnosis.tsx +50 -0
- package/studio/web/pages/AnalyticsPage/components/Highlights.tsx +49 -0
- package/studio/web/pages/AnalyticsPage/components/Hint.tsx +11 -0
- package/studio/web/pages/AnalyticsPage/components/HookVsBody.tsx +100 -0
- package/studio/web/pages/AnalyticsPage/components/HourlyWave.tsx +133 -0
- package/studio/web/pages/AnalyticsPage/components/Insights.tsx +70 -0
- package/studio/web/pages/AnalyticsPage/components/MetricCard.tsx +46 -0
- package/studio/web/pages/AnalyticsPage/components/PlanSection.tsx +40 -0
- package/studio/web/pages/AnalyticsPage/components/ProgressionChart.tsx +155 -0
- package/studio/web/pages/AnalyticsPage/components/ReelBarsChart.tsx +154 -0
- package/studio/web/pages/AnalyticsPage/components/ReelThumb.tsx +19 -0
- package/studio/web/pages/AnalyticsPage/components/ReelView.tsx +290 -0
- package/studio/web/pages/AnalyticsPage/components/ReelsTable.tsx +269 -0
- package/studio/web/pages/AnalyticsPage/components/RequestWithFocus.tsx +38 -0
- package/studio/web/pages/AnalyticsPage/components/SegmentedControl.tsx +35 -0
- package/studio/web/pages/AnalyticsPage/components/VsMedian.tsx +31 -0
- package/studio/web/pages/AnalyticsPage/index.tsx +17 -0
- package/studio/web/pages/GettingStartedPage/index.tsx +174 -0
- package/studio/web/pages/NewVideoPage/components/DeliverablesPicker.tsx +62 -0
- package/studio/web/pages/NewVideoPage/components/FormatPicker.tsx +33 -0
- package/studio/web/pages/NewVideoPage/index.tsx +133 -0
- package/studio/web/pages/NotFoundPage/index.tsx +9 -0
- package/studio/web/pages/OmnichatPage/components/NewFromLink.tsx +59 -0
- package/studio/web/pages/OmnichatPage/components/RuleListItem.tsx +64 -0
- package/studio/web/pages/OmnichatPage/components/RulePreview.tsx +14 -0
- package/studio/web/pages/OmnichatPage/components/RuleView.tsx +88 -0
- package/studio/web/pages/OmnichatPage/index.tsx +153 -0
- package/studio/web/pages/QueuePage/index.tsx +22 -0
- package/studio/web/pages/ReferencePage/components/ReferenceTexts.tsx +131 -0
- package/studio/web/pages/ReferencePage/index.tsx +216 -0
- package/studio/web/pages/ReferencesPage/components/NewReferenceForm.tsx +150 -0
- package/studio/web/pages/ReferencesPage/components/ReferenceCard.tsx +42 -0
- package/studio/web/pages/ReferencesPage/components/ReferenceGridSkeleton.tsx +31 -0
- package/studio/web/pages/ReferencesPage/index.tsx +67 -0
- package/studio/web/pages/SchedulePage/components/CalendarSkeleton.tsx +18 -0
- package/studio/web/pages/SchedulePage/components/DayView.tsx +177 -0
- package/studio/web/pages/SchedulePage/components/HourPicker.tsx +103 -0
- package/studio/web/pages/SchedulePage/components/MonthDayCell.tsx +111 -0
- package/studio/web/pages/SchedulePage/components/MonthView.tsx +47 -0
- package/studio/web/pages/SchedulePage/components/PlatformIcons.tsx +12 -0
- package/studio/web/pages/SchedulePage/components/PostThumb.tsx +15 -0
- package/studio/web/pages/SchedulePage/components/WeekColumn.tsx +75 -0
- package/studio/web/pages/SchedulePage/components/WeekView.tsx +35 -0
- package/studio/web/pages/SchedulePage/index.tsx +285 -0
- package/studio/web/pages/SettingsPage/components/AgentAccounts.tsx +263 -0
- package/studio/web/pages/SettingsPage/components/AgentCategory.tsx +20 -0
- package/studio/web/pages/SettingsPage/components/ModelPicker.tsx +49 -0
- package/studio/web/pages/SettingsPage/components/ModelsSettings.tsx +138 -0
- package/studio/web/pages/SettingsPage/components/PlatformsCategory.tsx +23 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/AccountStatus.tsx +29 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/AutoPublishPanel.tsx +90 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/BrowserConnect.tsx +62 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/CheckField.tsx +19 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/InstagramPanel.tsx +113 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/OmnichatSettingsPanel.tsx +146 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/SaveBar.tsx +33 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/SchedulePanel.tsx +132 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/SettingsCard.tsx +47 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/SettingsCardGroup.tsx +19 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/TextPanel.tsx +55 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/TiktokPanel.tsx +123 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/YoutubePanel.tsx +100 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/badges.tsx +15 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/index.tsx +40 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/types.ts +10 -0
- package/studio/web/pages/SettingsPage/components/UsageCategory.tsx +389 -0
- package/studio/web/pages/SettingsPage/components/VoiceProvidersCategory.tsx +97 -0
- package/studio/web/pages/SettingsPage/index.tsx +85 -0
- package/studio/web/pages/VideoPage/components/AudioPlayer.tsx +113 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/AxisField.tsx +50 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/CaptionList.tsx +56 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/CaptionListItem.tsx +92 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/CaptionMargins.tsx +57 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/CaptionStyleFields.tsx +70 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/CaptionTextForm.tsx +87 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/ColorField.tsx +37 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/MarginField.tsx +59 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/NumberField.tsx +57 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/PositionControls.tsx +140 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/captionEditor.ts +215 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/useCaptionPosition.ts +154 -0
- package/studio/web/pages/VideoPage/components/CarouselChangeRequest.tsx +72 -0
- package/studio/web/pages/VideoPage/components/CarouselCompositionStage.tsx +80 -0
- package/studio/web/pages/VideoPage/components/CarouselCreate.tsx +63 -0
- package/studio/web/pages/VideoPage/components/CarouselMissing.tsx +19 -0
- package/studio/web/pages/VideoPage/components/CarouselPublishStage.tsx +173 -0
- package/studio/web/pages/VideoPage/components/CarouselScriptStage.tsx +82 -0
- package/studio/web/pages/VideoPage/components/CarouselSlideCard.tsx +49 -0
- package/studio/web/pages/VideoPage/components/CarouselViewer.tsx +55 -0
- package/studio/web/pages/VideoPage/components/ChangedVoices.tsx +53 -0
- package/studio/web/pages/VideoPage/components/CompositionStage.tsx +78 -0
- package/studio/web/pages/VideoPage/components/CoverPicker.tsx +32 -0
- package/studio/web/pages/VideoPage/components/EditorStage.tsx +53 -0
- package/studio/web/pages/VideoPage/components/LineTakes.tsx +160 -0
- package/studio/web/pages/VideoPage/components/LineTextEditor.tsx +124 -0
- package/studio/web/pages/VideoPage/components/LineVoicePicker.tsx +37 -0
- package/studio/web/pages/VideoPage/components/MediaImage.tsx +25 -0
- package/studio/web/pages/VideoPage/components/MotionScriptStage.tsx +39 -0
- package/studio/web/pages/VideoPage/components/NarrationStage.tsx +70 -0
- package/studio/web/pages/VideoPage/components/PublishForm.tsx +387 -0
- package/studio/web/pages/VideoPage/components/PublishStage.tsx +76 -0
- package/studio/web/pages/VideoPage/components/PublishText.tsx +149 -0
- package/studio/web/pages/VideoPage/components/ScenesApprovalPanel.tsx +278 -0
- package/studio/web/pages/VideoPage/components/ScheduledInfo.tsx +72 -0
- package/studio/web/pages/VideoPage/components/ScriptApprovalPanel.tsx +189 -0
- package/studio/web/pages/VideoPage/components/ScriptStage.tsx +17 -0
- package/studio/web/pages/VideoPage/components/SequencePlayer.tsx +146 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/AddSound.tsx +117 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/AreaSelection.tsx +74 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/BedPanel.tsx +94 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/BedRow.tsx +45 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/CaptionOverlay.tsx +44 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/CaptionSaveBar.tsx +32 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/CaptionsPanel.tsx +22 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/ClipBlock.tsx +111 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/ClipPanel.tsx +76 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/CutsPanel.tsx +44 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/EditorTabBar.tsx +73 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/EffectChoice.tsx +46 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/EffectItem.tsx +89 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/EffectPanel.tsx +232 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/EffectsRow.tsx +21 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/Lane.tsx +39 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/MarkerRow.tsx +40 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/MuteButton.tsx +36 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/NumberInput.tsx +37 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/PlanWarnings.tsx +19 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/PlayerResizeHandle.tsx +50 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/PreviewControls.tsx +51 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/SceneRow.tsx +54 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/SettingsPanel.tsx +65 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/SoundLibrary.tsx +99 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/SoundPreview.tsx +82 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/SpeedPanel.tsx +128 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TimelineDock.tsx +56 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TimelineFooter.tsx +26 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TimelineSkeleton.tsx +21 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TimelineToolbar.tsx +160 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TimelineTracks.tsx +121 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TrackSidebar.tsx +30 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/VoiceRow.tsx +53 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/Waveform.tsx +97 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/clipActions.ts +50 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/effectActions.ts +161 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/index.tsx +161 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/timelineGeometry.ts +45 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/types.ts +43 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useAutosave.ts +107 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useEditorShortcuts.ts +168 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useFitHeight.ts +40 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useFollowPlayhead.ts +21 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useListenMix.ts +43 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/usePlayback.ts +231 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/usePlayerWidth.ts +27 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useSoundData.ts +124 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useSoundTimeline.ts +511 -0
- package/studio/web/pages/VideoPage/components/StageDrawer/CompareVersions.tsx +111 -0
- package/studio/web/pages/VideoPage/components/StageDrawer/VersionCard.tsx +81 -0
- package/studio/web/pages/VideoPage/components/StageDrawer/VersionMedia.tsx +24 -0
- package/studio/web/pages/VideoPage/components/StageDrawer/VersionText.tsx +15 -0
- package/studio/web/pages/VideoPage/components/StageDrawer/index.tsx +109 -0
- package/studio/web/pages/VideoPage/components/StageProcess.tsx +126 -0
- package/studio/web/pages/VideoPage/components/StageResult.tsx +69 -0
- package/studio/web/pages/VideoPage/components/SwapReference.tsx +92 -0
- package/studio/web/pages/VideoPage/components/ThumbnailPanel.tsx +252 -0
- package/studio/web/pages/VideoPage/components/TimingPanel.tsx +89 -0
- package/studio/web/pages/VideoPage/components/VideoPlayer.tsx +18 -0
- package/studio/web/pages/VideoPage/components/VideoSkeleton.tsx +50 -0
- package/studio/web/pages/VideoPage/components/VideoVoiceInfo.tsx +33 -0
- package/studio/web/pages/VideoPage/components/VideoVoicePicker.tsx +165 -0
- package/studio/web/pages/VideoPage/components/VoicePauseBanner.tsx +56 -0
- package/studio/web/pages/VideoPage/components/WithLogo.tsx +10 -0
- package/studio/web/pages/VideoPage/index.tsx +295 -0
- package/studio/web/pages/VideosPage/components/PublishedOn.tsx +85 -0
- package/studio/web/pages/VideosPage/components/ServicesPanel.tsx +81 -0
- package/studio/web/pages/VideosPage/components/SessionsPanel.tsx +62 -0
- package/studio/web/pages/VideosPage/components/VideoListSkeleton.tsx +25 -0
- package/studio/web/pages/VideosPage/components/VideoRow.tsx +122 -0
- package/studio/web/pages/VideosPage/index.tsx +134 -0
- package/studio/web/pages/VoicePage/index.tsx +28 -0
- package/studio/web/router.tsx +201 -0
- package/studio/web/styles/base/elements.css +55 -0
- package/studio/web/styles/base/utilities.css +25 -0
- package/studio/web/styles/components/badge.css +33 -0
- package/studio/web/styles/components/claude-running.css +27 -0
- package/studio/web/styles/components/claude-session.css +212 -0
- package/studio/web/styles/components/claude-walking.css +92 -0
- package/studio/web/styles/components/clone-voice-save.css +136 -0
- package/studio/web/styles/components/clone-voice.css +379 -0
- package/studio/web/styles/components/controls.css +70 -0
- package/studio/web/styles/components/data-and-image.css +54 -0
- package/studio/web/styles/components/forms.css +132 -0
- package/studio/web/styles/components/human-banner.css +99 -0
- package/studio/web/styles/components/lightbox.css +50 -0
- package/studio/web/styles/components/markdown.css +68 -0
- package/studio/web/styles/components/modal.css +70 -0
- package/studio/web/styles/components/omni-cards.css +105 -0
- package/studio/web/styles/components/omni.css +859 -0
- package/studio/web/styles/components/omnichat.css +538 -0
- package/studio/web/styles/components/panel.css +115 -0
- package/studio/web/styles/components/platform-card.css +140 -0
- package/studio/web/styles/components/provider-card.css +132 -0
- package/studio/web/styles/components/queue.css +185 -0
- package/studio/web/styles/components/reference-actions.css +133 -0
- package/studio/web/styles/components/reference-picker.css +146 -0
- package/studio/web/styles/components/results-drawer.css +224 -0
- package/studio/web/styles/components/segmented.css +115 -0
- package/studio/web/styles/components/side-panel-tab.css +23 -0
- package/studio/web/styles/components/status-signals.css +66 -0
- package/studio/web/styles/components/stepper.css +208 -0
- package/studio/web/styles/components/table.css +19 -0
- package/studio/web/styles/components/tabs.css +24 -0
- package/studio/web/styles/components/ui/accordion.css +71 -0
- package/studio/web/styles/components/ui/chart.css +162 -0
- package/studio/web/styles/components/ui/checkbox.css +37 -0
- package/studio/web/styles/components/ui/date-picker.css +153 -0
- package/studio/web/styles/components/ui/select.css +110 -0
- package/studio/web/styles/components/ui/skeleton.css +25 -0
- package/studio/web/styles/components/ui/slider.css +81 -0
- package/studio/web/styles/components/ui/switch.css +41 -0
- package/studio/web/styles/components/ui/tooltip.css +24 -0
- package/studio/web/styles/components/voice-carousel.css +255 -0
- package/studio/web/styles/components/voice-editor.css +179 -0
- package/studio/web/styles/components/voice-grid.css +56 -0
- package/studio/web/styles/components/voice-profiles.css +192 -0
- package/studio/web/styles/design-system.md +136 -0
- package/studio/web/styles/index.css +116 -0
- package/studio/web/styles/layout/page.css +41 -0
- package/studio/web/styles/layout/sidebar-groups.css +39 -0
- package/studio/web/styles/layout/sidebar.css +111 -0
- package/studio/web/styles/pages/agent.css +26 -0
- package/studio/web/styles/pages/analytics/dashboard.css +614 -0
- package/studio/web/styles/pages/analytics/insights.css +48 -0
- package/studio/web/styles/pages/getting-started.css +166 -0
- package/studio/web/styles/pages/new-video/form.css +32 -0
- package/studio/web/styles/pages/not-found.css +59 -0
- package/studio/web/styles/pages/references.css +204 -0
- package/studio/web/styles/pages/schedule/calendar.css +541 -0
- package/studio/web/styles/pages/schedule/chip-states.css +60 -0
- package/studio/web/styles/pages/settings/models.css +72 -0
- package/studio/web/styles/pages/settings/shell.css +361 -0
- package/studio/web/styles/pages/settings/usage.css +63 -0
- package/studio/web/styles/pages/studio-offline.css +105 -0
- package/studio/web/styles/pages/video/caption-controls.css +194 -0
- package/studio/web/styles/pages/video/captions-grid.css +70 -0
- package/studio/web/styles/pages/video/captions.css +79 -0
- package/studio/web/styles/pages/video/editor-chat.css +103 -0
- package/studio/web/styles/pages/video/export.css +50 -0
- package/studio/web/styles/pages/video/frames.css +29 -0
- package/studio/web/styles/pages/video/fullscreen-stage.css +400 -0
- package/studio/web/styles/pages/video/instagram-carousel.css +309 -0
- package/studio/web/styles/pages/video/layout.css +285 -0
- package/studio/web/styles/pages/video/narration.css +138 -0
- package/studio/web/styles/pages/video/preview-overview.css +11 -0
- package/studio/web/styles/pages/video/processing-notice.css +34 -0
- package/studio/web/styles/pages/video/publish-when.css +76 -0
- package/studio/web/styles/pages/video/publish.css +97 -0
- package/studio/web/styles/pages/video/result.css +96 -0
- package/studio/web/styles/pages/video/scenes.css +167 -0
- package/studio/web/styles/pages/video/sound-timeline.css +672 -0
- package/studio/web/styles/pages/video/sound-toolbar.css +149 -0
- package/studio/web/styles/pages/video/take-player.css +100 -0
- package/studio/web/styles/pages/video/thumbnail.css +157 -0
- package/studio/web/styles/pages/video/timeline.css +117 -0
- package/studio/web/styles/pages/video/voice-picker.css +14 -0
- package/studio/web/styles/pages/video-list/active-row.css +27 -0
- package/studio/web/styles/pages/video-list/card-link.css +49 -0
- package/studio/web/styles/pages/video-list/list.css +86 -0
- package/studio/web/styles/theme/identity/details.css +204 -0
- package/studio/web/styles/theme/identity/shell.css +249 -0
- package/studio/web/styles/theme/identity/surfaces.css +183 -0
- package/studio/web/styles/theme/identity/titles-and-buttons.css +120 -0
- package/studio/web/styles/theme/no-borders/blocks.css +208 -0
- package/studio/web/styles/theme/no-borders/controls.css +256 -0
- package/studio/web/styles/tokens.css +245 -0
- package/studio/web/types/api.ts +2 -0
- package/studio/web/types/assets.d.ts +9 -0
- package/templates/brief.md +27 -0
- package/templates/captions.html +204 -0
- package/templates/carousel-composition.md +47 -0
- package/templates/carousel-script.md +60 -0
- package/templates/components/voiceavatar/README.md +87 -0
- package/templates/components/voiceavatar/demo.html +50 -0
- package/templates/components/voiceavatar/voiceavatar.js +415 -0
- package/templates/motion.md +80 -0
- package/templates/playbook.md +43 -0
- package/templates/reference.md +123 -0
- package/templates/scene.html +112 -0
- package/templates/scenes.example.json +96 -0
- package/templates/script.md +63 -0
- package/templates/slide.html +71 -0
- package/templates/wireframe.html +91 -0
- package/tools/analysis.mjs +300 -0
- package/tools/approval.mjs +442 -0
- package/tools/assemble.mjs +942 -0
- package/tools/build-motion.mjs +437 -0
- package/tools/captions.mjs +246 -0
- package/tools/carousel.mjs +558 -0
- package/tools/compose.mjs +307 -0
- package/tools/cuts.mjs +74 -0
- package/tools/editor.mjs +419 -0
- package/tools/epidemic-capture.js +54 -0
- package/tools/fanout.mjs +69 -0
- package/tools/history.mjs +70 -0
- package/tools/history.py +61 -0
- package/tools/job-queue.mjs +180 -0
- package/tools/job_queue.py +430 -0
- package/tools/lib/agents.mjs +412 -0
- package/tools/lib/channel.mjs +399 -0
- package/tools/lib/claude-settings.mjs +67 -0
- package/tools/lib/cli.mjs +9 -0
- package/tools/lib/fanout.mjs +234 -0
- package/tools/lib/http.mjs +94 -0
- package/tools/lib/index.js +14 -0
- package/tools/lib/mcp-server.mjs +69 -0
- package/tools/lib/metrics/metrics.mjs +204 -0
- package/tools/lib/narration.mjs +15 -0
- package/tools/lib/oauth-client.mjs +295 -0
- package/tools/lib/omnichat/config.mjs +139 -0
- package/tools/lib/omnichat/errors.mjs +42 -0
- package/tools/lib/omnichat/extract.mjs +82 -0
- package/tools/lib/omnichat/gate.mjs +151 -0
- package/tools/lib/omnichat/manual.mjs +166 -0
- package/tools/lib/omnichat/match.mjs +78 -0
- package/tools/lib/omnichat/pass.mjs +393 -0
- package/tools/lib/omnichat/record.mjs +208 -0
- package/tools/lib/omnichat/text.mjs +315 -0
- package/tools/lib/omnichat/webhook.mjs +166 -0
- package/tools/lib/pairing.mjs +99 -0
- package/tools/lib/paths.mjs +41 -0
- package/tools/lib/platforms/instagram.mjs +469 -0
- package/tools/lib/platforms/tiktok.mjs +343 -0
- package/tools/lib/platforms/youtube.mjs +228 -0
- package/tools/lib/publish/publish.mjs +244 -0
- package/tools/lib/schedule/schedule.mjs +191 -0
- package/tools/lib/service.mjs +134 -0
- package/tools/lib/skill-client.mjs +126 -0
- package/tools/lib/skills-release.mjs +196 -0
- package/tools/lib/testing.mjs +52 -0
- package/tools/lib/up.mjs +187 -0
- package/tools/metrics.mjs +415 -0
- package/tools/models.mjs +134 -0
- package/tools/narrate.mjs +257 -0
- package/tools/omni.mjs +298 -0
- package/tools/omni_paths.py +12 -0
- package/tools/omnichat.mjs +1577 -0
- package/tools/omnivideo.py +1122 -0
- package/tools/package.mjs +130 -0
- package/tools/platforms.mjs +236 -0
- package/tools/premiere.mjs +533 -0
- package/tools/publish.mjs +1496 -0
- package/tools/reference.mjs +1408 -0
- package/tools/render.mjs +426 -0
- package/tools/runner.mjs +156 -0
- package/tools/setup.mjs +466 -0
- package/tools/skills-release.mjs +93 -0
- package/tools/sound.mjs +1323 -0
- package/tools/soundtrack.mjs +217 -0
- package/tools/thumbnail.mjs +271 -0
- package/tools/timing.mjs +108 -0
- package/tools/usage.py +628 -0
- package/tools/voice-envelope.mjs +185 -0
- package/tools/voice.py +448 -0
- package/tools/voice_sample.py +75 -0
- package/tools/wireframe.mjs +230 -0
package/tools/setup.mjs
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* Prepares a fresh OmniVideo clone and checks whether the machine is ready for
|
|
3
|
+
the first video. The full walkthrough (with the provider accounts) is in
|
|
4
|
+
docs/onboarding.md and in the studio's Getting started page
|
|
5
|
+
(/getting-started), which uses this same check.
|
|
6
|
+
|
|
7
|
+
node tools/setup.mjs prepares what's missing and checks everything
|
|
8
|
+
node tools/setup.mjs check [--json] only checks (the UI reads --json)
|
|
9
|
+
|
|
10
|
+
Prepare never overwrites: it creates .env and omnivideo.config.json from the
|
|
11
|
+
examples only if they don't exist, the empty reference library and sound
|
|
12
|
+
kit, the project's Python (.venv, with requirements.txt) and the studio
|
|
13
|
+
dependencies. System programs (Node, Bun, ffmpeg, Python, Chrome) it only
|
|
14
|
+
checks: installing them is in the guide, step 1. */
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
existsSync,
|
|
18
|
+
readFileSync,
|
|
19
|
+
writeFileSync,
|
|
20
|
+
copyFileSync,
|
|
21
|
+
mkdirSync,
|
|
22
|
+
readdirSync,
|
|
23
|
+
chmodSync,
|
|
24
|
+
statSync,
|
|
25
|
+
} from "node:fs";
|
|
26
|
+
import { join, resolve } from "node:path";
|
|
27
|
+
import { homedir } from "node:os";
|
|
28
|
+
import { spawnSync } from "node:child_process";
|
|
29
|
+
import { accountsOf, codexBin, loginCommand, loginOf, tildify } from "./lib/agents.mjs";
|
|
30
|
+
import { CODE_ROOT, DATA_ROOT as ROOT } from "./lib/paths.mjs";
|
|
31
|
+
|
|
32
|
+
const CONFIG = join(ROOT, "omnivideo.config.json");
|
|
33
|
+
const ENV = join(ROOT, ".env");
|
|
34
|
+
const VENV_PY = join(CODE_ROOT, ".venv", "bin", "python");
|
|
35
|
+
|
|
36
|
+
const args = process.argv.slice(2);
|
|
37
|
+
const sub = args[0] && !args[0].startsWith("--") ? args[0] : "prepare";
|
|
38
|
+
const JSON_OUT = args.includes("--json");
|
|
39
|
+
|
|
40
|
+
const run = (cmd, a, opts = {}) => {
|
|
41
|
+
const r = spawnSync(cmd, a, { encoding: "utf8", timeout: 20_000, ...opts });
|
|
42
|
+
return { ok: r.status === 0, output: `${r.stdout ?? ""}${r.stderr ?? ""}`.trim(), error: r.error };
|
|
43
|
+
};
|
|
44
|
+
const readJson = file => {
|
|
45
|
+
try {
|
|
46
|
+
return JSON.parse(readFileSync(file, "utf8"));
|
|
47
|
+
} catch {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const toPath = p => resolve(ROOT, String(p).replace(/^~(?=\/|$)/, homedir()));
|
|
52
|
+
const cfg = () => readJson(CONFIG);
|
|
53
|
+
|
|
54
|
+
/* the .env keys that have a value (the value never leaves here) */
|
|
55
|
+
function keysWithValue() {
|
|
56
|
+
if (!existsSync(ENV)) return new Set();
|
|
57
|
+
const found = new Set();
|
|
58
|
+
for (const row of readFileSync(ENV, "utf8").split("\n")) {
|
|
59
|
+
const m = row.match(/^\s*([A-Z0-9_]+)\s*=\s*(.*)$/);
|
|
60
|
+
if (m && m[2].trim().replace(/^["']|["']$/g, "")) found.add(m[1]);
|
|
61
|
+
}
|
|
62
|
+
return found;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* the same lookup as render.mjs */
|
|
66
|
+
function findChrome() {
|
|
67
|
+
const fixed = [
|
|
68
|
+
process.env.CHROME_PATH,
|
|
69
|
+
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
|
|
70
|
+
"/Applications/Chromium.app/Contents/MacOS/Chromium",
|
|
71
|
+
"/Applications/Brave Browser.app/Contents/MacOS/Brave Browser",
|
|
72
|
+
"/usr/bin/google-chrome",
|
|
73
|
+
"/usr/bin/chromium",
|
|
74
|
+
].filter(Boolean);
|
|
75
|
+
const found = fixed.find(p => existsSync(p));
|
|
76
|
+
if (found) return found;
|
|
77
|
+
const cache = join(homedir(), "Library", "Caches", "ms-playwright");
|
|
78
|
+
try {
|
|
79
|
+
if (readdirSync(cache).some(d => d.startsWith("chromium-"))) return cache;
|
|
80
|
+
} catch {
|
|
81
|
+
/* no cache */
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const version = (cmd, a = ["--version"]) => {
|
|
87
|
+
const r = run(cmd, a);
|
|
88
|
+
return r.ok ? r.output.split("\n")[0] : null;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/* --- check ------------------------------------------------------------------
|
|
92
|
+
One step per guide section (the id is the `<!-- step: id -->` in docs/onboarding.md).
|
|
93
|
+
state: ok · missing (blocks the first video) · warning (works, but take a look) */
|
|
94
|
+
function check() {
|
|
95
|
+
const c = cfg();
|
|
96
|
+
const env = keysWithValue();
|
|
97
|
+
const item = (id, title, state, detail) => ({ id, title, state, detail });
|
|
98
|
+
const steps = [];
|
|
99
|
+
|
|
100
|
+
/* 1. the machine */
|
|
101
|
+
{
|
|
102
|
+
const node = process.versions.node;
|
|
103
|
+
const nodeOk = Number(node.split(".")[0]) >= 20;
|
|
104
|
+
const bun = version("bun");
|
|
105
|
+
const ffmpeg = version("ffmpeg", ["-version"]);
|
|
106
|
+
const ffprobe = version("ffprobe", ["-version"]);
|
|
107
|
+
const py = version("python3");
|
|
108
|
+
const pyOk =
|
|
109
|
+
!!py &&
|
|
110
|
+
(() => {
|
|
111
|
+
const [, a, b] = py.match(/(\d+)\.(\d+)/) ?? [];
|
|
112
|
+
return Number(a) === 3 && Number(b) >= 10;
|
|
113
|
+
})();
|
|
114
|
+
const chrome = findChrome();
|
|
115
|
+
steps.push({
|
|
116
|
+
id: "machine",
|
|
117
|
+
items: [
|
|
118
|
+
item(
|
|
119
|
+
"macos",
|
|
120
|
+
"macOS",
|
|
121
|
+
process.platform === "darwin" ? "ok" : "warning",
|
|
122
|
+
process.platform === "darwin"
|
|
123
|
+
? "macOS"
|
|
124
|
+
: `${process.platform}: o studio roda, mas a agenda de publicação usa o launchd do macOS`,
|
|
125
|
+
),
|
|
126
|
+
item("node", "Node.js 20 ou mais novo", nodeOk ? "ok" : "missing", `v${node}`),
|
|
127
|
+
item("bun", "Bun", bun ? "ok" : "missing", bun ? `v${bun}` : "não achei o bun no PATH"),
|
|
128
|
+
item(
|
|
129
|
+
"ffmpeg",
|
|
130
|
+
"ffmpeg e ffprobe",
|
|
131
|
+
ffmpeg && ffprobe ? "ok" : "missing",
|
|
132
|
+
ffmpeg ? ffmpeg.replace(/ Copyright.*/, "") : "não achei o ffmpeg no PATH",
|
|
133
|
+
),
|
|
134
|
+
item("python", "Python 3.10 ou mais novo", pyOk ? "ok" : "missing", py ?? "não achei o python3 no PATH"),
|
|
135
|
+
item(
|
|
136
|
+
"chrome",
|
|
137
|
+
"Google Chrome (o render do motion usa)",
|
|
138
|
+
chrome ? "ok" : "missing",
|
|
139
|
+
chrome ?? "instale o Google Chrome ou defina CHROME_PATH",
|
|
140
|
+
),
|
|
141
|
+
item(
|
|
142
|
+
"yt-dlp",
|
|
143
|
+
"yt-dlp (estilo visual a partir de um link)",
|
|
144
|
+
version("yt-dlp") ? "ok" : "warning",
|
|
145
|
+
version("yt-dlp")
|
|
146
|
+
? `v${version("yt-dlp")}`
|
|
147
|
+
: "opcional: sem ele, o estilo visual entra só por foto ou arquivo",
|
|
148
|
+
),
|
|
149
|
+
],
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* 2. the project */
|
|
154
|
+
{
|
|
155
|
+
const pyPackages = existsSync(VENV_PY) && run(VENV_PY, ["-c", "import requests, soundfile, numpy"]).ok;
|
|
156
|
+
steps.push({
|
|
157
|
+
id: "project",
|
|
158
|
+
items: [
|
|
159
|
+
item("config", "omnivideo.config.json", c ? "ok" : "missing", c ? "existe" : "rode node tools/setup.mjs"),
|
|
160
|
+
item(
|
|
161
|
+
"env",
|
|
162
|
+
".env (chaves, fora do git)",
|
|
163
|
+
existsSync(ENV) ? "ok" : "missing",
|
|
164
|
+
existsSync(ENV) ? "existe" : "rode node tools/setup.mjs",
|
|
165
|
+
),
|
|
166
|
+
item(
|
|
167
|
+
"venv",
|
|
168
|
+
"Python do projeto (.venv)",
|
|
169
|
+
pyPackages ? "ok" : "missing",
|
|
170
|
+
pyPackages ? ".venv com requests, soundfile e numpy" : "rode node tools/setup.mjs",
|
|
171
|
+
),
|
|
172
|
+
item(
|
|
173
|
+
"studio",
|
|
174
|
+
"Dependências do studio",
|
|
175
|
+
existsSync(join(CODE_ROOT, "studio", "node_modules")) ? "ok" : "missing",
|
|
176
|
+
"studio/node_modules",
|
|
177
|
+
),
|
|
178
|
+
],
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* 3. the agents (Claude Code, Codex), on the accounts the studio uses (agents.accounts) */
|
|
183
|
+
{
|
|
184
|
+
const cfg = readJson(CONFIG) ?? {};
|
|
185
|
+
const accounts = accountsOf(cfg).filter(a => a.enabled);
|
|
186
|
+
const cli = version("claude");
|
|
187
|
+
const usesCodex = accounts.some(a => a.provider === "codex");
|
|
188
|
+
const codex = usesCodex ? version(codexBin(cfg)) : null;
|
|
189
|
+
const ready = accounts.filter(a => loginOf(a));
|
|
190
|
+
steps.push({
|
|
191
|
+
id: "claude",
|
|
192
|
+
items: [
|
|
193
|
+
item("claude-cli", "Claude Code instalado", cli ? "ok" : "missing", cli ?? "não achei o claude no PATH"),
|
|
194
|
+
...(usesCodex
|
|
195
|
+
? [
|
|
196
|
+
item(
|
|
197
|
+
"codex-cli",
|
|
198
|
+
"Codex instalado",
|
|
199
|
+
codex ? "ok" : "missing",
|
|
200
|
+
codex ?? "instale o app do ChatGPT ou o codex no PATH",
|
|
201
|
+
),
|
|
202
|
+
]
|
|
203
|
+
: []),
|
|
204
|
+
item(
|
|
205
|
+
"claude-login",
|
|
206
|
+
"Conta de agente com login",
|
|
207
|
+
ready.length ? "ok" : "missing",
|
|
208
|
+
ready.length
|
|
209
|
+
? `${ready.length} de ${accounts.length} conta(s) com login`
|
|
210
|
+
: `rode ${accounts[0] ? loginCommand(accounts[0], cfg) : "CLAUDE_CONFIG_DIR=~/.claude-personal claude auth login"}`,
|
|
211
|
+
),
|
|
212
|
+
...accounts
|
|
213
|
+
.filter(a => !loginOf(a) && a !== accounts[0])
|
|
214
|
+
.map(a => item(`login-${a.id}`, `Sem login em ${tildify(a.dir)}`, "warning", `rode ${loginCommand(a, cfg)}`)),
|
|
215
|
+
],
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* 4. the voice: a provider key and a voice with that provider's id */
|
|
220
|
+
{
|
|
221
|
+
const provs = [
|
|
222
|
+
["fish", "FISH_API_KEY", "Fish Audio"],
|
|
223
|
+
["cartesia", "CARTESIA_API_KEY", "Cartesia"],
|
|
224
|
+
["elevenlabs", "ELEVENLABS_API_KEY", "ElevenLabs"],
|
|
225
|
+
];
|
|
226
|
+
const withKey = provs.filter(([, k]) => env.has(k));
|
|
227
|
+
const profiles = c?.voice?.profiles ?? [];
|
|
228
|
+
const readyVoice = profiles.find(p => withKey.some(([id]) => p[id]));
|
|
229
|
+
steps.push({
|
|
230
|
+
id: "voice",
|
|
231
|
+
items: [
|
|
232
|
+
item(
|
|
233
|
+
"voice-key",
|
|
234
|
+
"Chave de um provider de voz",
|
|
235
|
+
withKey.length ? "ok" : "missing",
|
|
236
|
+
withKey.length
|
|
237
|
+
? withKey.map(([, , name]) => name).join(", ")
|
|
238
|
+
: "nenhuma chave da Fish, Cartesia ou ElevenLabs no .env",
|
|
239
|
+
),
|
|
240
|
+
item(
|
|
241
|
+
"voice-profile",
|
|
242
|
+
"Uma voz clonada no studio",
|
|
243
|
+
readyVoice ? "ok" : "missing",
|
|
244
|
+
readyVoice
|
|
245
|
+
? `${readyVoice.name}`
|
|
246
|
+
: profiles.length
|
|
247
|
+
? "a voz criada não tem o ID do provider que tem chave"
|
|
248
|
+
: "nenhuma voz em Configurações → Voz",
|
|
249
|
+
),
|
|
250
|
+
],
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* 5. the style: at least one reference in the library */
|
|
255
|
+
{
|
|
256
|
+
const dir = c ? toPath(c.references?.dir ?? "../referencias") : null;
|
|
257
|
+
let refs = [];
|
|
258
|
+
try {
|
|
259
|
+
refs = readdirSync(dir).filter(d => !d.startsWith(".") && statSync(join(dir, d)).isDirectory());
|
|
260
|
+
} catch {
|
|
261
|
+
/* no dir */
|
|
262
|
+
}
|
|
263
|
+
steps.push({
|
|
264
|
+
id: "reference",
|
|
265
|
+
items: [
|
|
266
|
+
item(
|
|
267
|
+
"reference",
|
|
268
|
+
"Um estilo visual",
|
|
269
|
+
refs.length ? "ok" : "missing",
|
|
270
|
+
refs.length
|
|
271
|
+
? `${refs.length} na biblioteca de estilos visuais (${dir})`
|
|
272
|
+
: `a biblioteca de estilos visuais está vazia${dir ? ` (${dir})` : ""}`,
|
|
273
|
+
),
|
|
274
|
+
],
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* 6. sound: the kit may start empty, but then Claude searches Epidemic through Chrome */
|
|
279
|
+
{
|
|
280
|
+
const kit = readJson(join(ROOT, "kit", "sfx", "kit.json")) ?? {};
|
|
281
|
+
const n = Object.keys(kit).length;
|
|
282
|
+
/* any Claude account that already connected the extension */
|
|
283
|
+
const ext = accountsOf(readJson(CONFIG) ?? {})
|
|
284
|
+
.filter(a => a.provider === "claude")
|
|
285
|
+
.map(a => readJson(join(a.dir, ".claude.json")))
|
|
286
|
+
.some(c => c?.hasCompletedClaudeInChromeOnboarding || c?.cachedChromeExtensionInstalled);
|
|
287
|
+
steps.push({
|
|
288
|
+
id: "sound",
|
|
289
|
+
items: [
|
|
290
|
+
item(
|
|
291
|
+
"kit",
|
|
292
|
+
"Kit de efeitos",
|
|
293
|
+
n ? "ok" : "warning",
|
|
294
|
+
n ? `${n} efeitos` : "vazio: a primeira composição busca os efeitos na Epidemic Sound",
|
|
295
|
+
),
|
|
296
|
+
item(
|
|
297
|
+
"chrome-ext",
|
|
298
|
+
"Claude in Chrome (para buscar efeitos)",
|
|
299
|
+
ext ? "ok" : n ? "warning" : "missing",
|
|
300
|
+
ext ? "extensão conectada" : "instale a extensão Claude in Chrome e entre na Epidemic Sound no Chrome",
|
|
301
|
+
),
|
|
302
|
+
],
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* 7. the first video */
|
|
307
|
+
{
|
|
308
|
+
let done = null;
|
|
309
|
+
try {
|
|
310
|
+
for (const v of readdirSync(join(ROOT, "videos"))) {
|
|
311
|
+
const exp = join(ROOT, "videos", v, "export");
|
|
312
|
+
if (existsSync(exp) && readdirSync(exp).some(a => a.endsWith(".mp4"))) {
|
|
313
|
+
done = v;
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
} catch {
|
|
318
|
+
/* no videos/ */
|
|
319
|
+
}
|
|
320
|
+
steps.push({
|
|
321
|
+
id: "first-video",
|
|
322
|
+
items: [
|
|
323
|
+
item("video", "Um vídeo exportado", done ? "ok" : "missing", done ?? "nenhum ainda: crie em Criar vídeo"),
|
|
324
|
+
],
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/* 8. publish (optional) */
|
|
329
|
+
{
|
|
330
|
+
const has = (...ks) => ks.every(k => env.has(k));
|
|
331
|
+
const cloudflared = version("cloudflared");
|
|
332
|
+
steps.push({
|
|
333
|
+
id: "publish",
|
|
334
|
+
optional: true,
|
|
335
|
+
items: [
|
|
336
|
+
item(
|
|
337
|
+
"cloudflared",
|
|
338
|
+
"cloudflared (o Instagram busca o vídeo por ele)",
|
|
339
|
+
cloudflared ? "ok" : "warning",
|
|
340
|
+
cloudflared ? cloudflared.split(" (")[0] : "opcional: só para publicar no Instagram",
|
|
341
|
+
),
|
|
342
|
+
item(
|
|
343
|
+
"youtube",
|
|
344
|
+
"YouTube",
|
|
345
|
+
has("YOUTUBE_CLIENT_ID", "YOUTUBE_CLIENT_SECRET", "YOUTUBE_REFRESH_TOKEN") ? "ok" : "warning",
|
|
346
|
+
has("YOUTUBE_REFRESH_TOKEN") ? "conectado" : "opcional: não conectado",
|
|
347
|
+
),
|
|
348
|
+
item(
|
|
349
|
+
"instagram",
|
|
350
|
+
"Instagram",
|
|
351
|
+
has("INSTAGRAM_TOKEN", "INSTAGRAM_USER_ID") ? "ok" : "warning",
|
|
352
|
+
has("INSTAGRAM_TOKEN") ? "conectado" : "opcional: não conectado",
|
|
353
|
+
),
|
|
354
|
+
item(
|
|
355
|
+
"tiktok",
|
|
356
|
+
"TikTok",
|
|
357
|
+
has("TIKTOK_CLIENT_KEY", "TIKTOK_ACCESS_TOKEN") ? "ok" : "warning",
|
|
358
|
+
has("TIKTOK_ACCESS_TOKEN") ? "conectado" : "opcional: não conectado",
|
|
359
|
+
),
|
|
360
|
+
],
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
for (const s of steps) {
|
|
365
|
+
s.state = s.items.some(i => i.state === "missing")
|
|
366
|
+
? "missing"
|
|
367
|
+
: s.items.some(i => i.state === "warning")
|
|
368
|
+
? "warning"
|
|
369
|
+
: "ok";
|
|
370
|
+
}
|
|
371
|
+
/* ready for the first video: everything before it with nothing missing */
|
|
372
|
+
const upTo = steps.findIndex(s => s.id === "first-video");
|
|
373
|
+
const ready = steps.slice(0, upTo).every(s => s.state !== "missing");
|
|
374
|
+
return { ready, steps };
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* --- prepare ------------------------------------------------------------------------ */
|
|
378
|
+
function prepare() {
|
|
379
|
+
const done = [];
|
|
380
|
+
if (!existsSync(ENV)) {
|
|
381
|
+
copyFileSync(join(CODE_ROOT, ".env.example"), ENV);
|
|
382
|
+
chmodSync(ENV, 0o600);
|
|
383
|
+
done.push("criei o .env a partir do .env.example (as chaves entram pela tela)");
|
|
384
|
+
}
|
|
385
|
+
if (!existsSync(CONFIG)) {
|
|
386
|
+
copyFileSync(join(CODE_ROOT, "omnivideo.config.example.json"), CONFIG);
|
|
387
|
+
done.push("criei o omnivideo.config.json a partir do exemplo");
|
|
388
|
+
}
|
|
389
|
+
const c = cfg();
|
|
390
|
+
const library = toPath(c?.references?.dir ?? "../referencias");
|
|
391
|
+
if (!existsSync(library)) {
|
|
392
|
+
mkdirSync(library, { recursive: true });
|
|
393
|
+
done.push(`criei a biblioteca de estilos visuais em ${library}`);
|
|
394
|
+
}
|
|
395
|
+
const kit = join(ROOT, "kit", "sfx");
|
|
396
|
+
if (!existsSync(join(kit, "kit.json"))) {
|
|
397
|
+
mkdirSync(kit, { recursive: true });
|
|
398
|
+
writeFileSync(join(kit, "kit.json"), "{}\n");
|
|
399
|
+
done.push("criei o kit de efeitos vazio (kit/sfx/kit.json)");
|
|
400
|
+
}
|
|
401
|
+
mkdirSync(join(ROOT, "videos"), { recursive: true });
|
|
402
|
+
|
|
403
|
+
if (!existsSync(VENV_PY)) {
|
|
404
|
+
if (!version("python3")) done.push("✗ sem python3: instale (passo 1 do guia) e rode de novo");
|
|
405
|
+
else {
|
|
406
|
+
process.stdout.write("criando o Python do projeto (.venv)… ");
|
|
407
|
+
const r = run("python3", ["-m", "venv", join(CODE_ROOT, ".venv")], { timeout: 120_000 });
|
|
408
|
+
console.log(r.ok ? "ok" : `falhou\n${r.output}`);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
if (existsSync(VENV_PY) && !run(VENV_PY, ["-c", "import requests, soundfile, numpy"]).ok) {
|
|
412
|
+
process.stdout.write("instalando requests, soundfile e numpy… ");
|
|
413
|
+
const r = run(VENV_PY, ["-m", "pip", "install", "-q", "-r", join(CODE_ROOT, "requirements.txt")], {
|
|
414
|
+
timeout: 600_000,
|
|
415
|
+
});
|
|
416
|
+
console.log(r.ok ? "ok" : `falhou\n${r.output}`);
|
|
417
|
+
}
|
|
418
|
+
if (!existsSync(join(CODE_ROOT, "studio", "node_modules"))) {
|
|
419
|
+
if (!version("bun")) done.push("✗ sem bun: instale (passo 1 do guia) e rode de novo");
|
|
420
|
+
else {
|
|
421
|
+
process.stdout.write("instalando as dependências do studio (bun install)… ");
|
|
422
|
+
const r = run("bun", ["install", "--frozen-lockfile"], { cwd: join(CODE_ROOT, "studio"), timeout: 600_000 });
|
|
423
|
+
console.log(r.ok ? "ok" : `falhou\n${r.output}`);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
for (const f of done) console.log(f.startsWith("✗") ? f : `• ${f}`);
|
|
427
|
+
if (done.length) console.log("");
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/* --- output --------------------------------------------------------------------------- */
|
|
431
|
+
const TITLES = {
|
|
432
|
+
machine: "1. Ferramentas da máquina",
|
|
433
|
+
project: "2. O projeto",
|
|
434
|
+
claude: "3. Claude Code",
|
|
435
|
+
voice: "4. Voz",
|
|
436
|
+
reference: "5. Estilo visual",
|
|
437
|
+
sound: "6. Efeitos sonoros",
|
|
438
|
+
"first-video": "7. Primeiro vídeo",
|
|
439
|
+
publish: "8. Publicar (opcional)",
|
|
440
|
+
};
|
|
441
|
+
const MARK = { ok: "✓", missing: "✗", warning: "!" };
|
|
442
|
+
|
|
443
|
+
function print(r) {
|
|
444
|
+
for (const s of r.steps) {
|
|
445
|
+
console.log(`${MARK[s.state]} ${TITLES[s.id] ?? s.id}`);
|
|
446
|
+
for (const i of s.items) console.log(` ${MARK[i.state]} ${i.title}: ${i.detail}`);
|
|
447
|
+
}
|
|
448
|
+
console.log("");
|
|
449
|
+
console.log(
|
|
450
|
+
r.ready
|
|
451
|
+
? "Pronto para o primeiro vídeo: cd studio && bun start, e abra http://127.0.0.1:5432"
|
|
452
|
+
: "Ainda falta algo (✗). O passo a passo está em docs/onboarding.md e na tela Primeiros passos do studio (http://127.0.0.1:5432/getting-started).",
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if (sub === "check") {
|
|
457
|
+
const r = check();
|
|
458
|
+
if (JSON_OUT) console.log(JSON.stringify(r));
|
|
459
|
+
else print(r);
|
|
460
|
+
} else if (sub === "prepare") {
|
|
461
|
+
prepare();
|
|
462
|
+
print(check());
|
|
463
|
+
} else {
|
|
464
|
+
console.error("uso: node tools/setup.mjs [check [--json]]");
|
|
465
|
+
process.exit(2);
|
|
466
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
A release of the skills (docs/specs/phase-2-plugin-cli.md, step 3): builds it from .claude/skills
|
|
4
|
+
(tools/lib/skills-release.mjs) and publishes it to the studio's registry (cloud/studio/src/skills.mjs).
|
|
5
|
+
Meant for CI on every merge into main; runs the same here.
|
|
6
|
+
|
|
7
|
+
node tools/skills-release.mjs build [--out <pasta>] [--cli "<comando>"]
|
|
8
|
+
writes <pasta>/release.json (what the registry stores) and <pasta>/plugin/ (the whole public
|
|
9
|
+
plugin: manifest, marketplace, hook, MCP and the skills' headers); default <pasta>: .release/skills.
|
|
10
|
+
--cli is the command the plugin and the served skills call (default: npx -y @crievo/omni, or
|
|
11
|
+
OMNI_CLI_COMMAND), e.g. "node /caminho/bin/omni.mjs" to try it before publishing
|
|
12
|
+
node tools/skills-release.mjs publish [--out <pasta>]
|
|
13
|
+
sends <pasta>/release.json to <cloud.studio_url>/skills/publish with SKILLS_PUBLISH_SECRET
|
|
14
|
+
(the environment, else .env)
|
|
15
|
+
============================================================================ */
|
|
16
|
+
|
|
17
|
+
import { mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
18
|
+
import { dirname, join, resolve } from "node:path";
|
|
19
|
+
import { CLI_COMMAND } from "./lib/cli.mjs";
|
|
20
|
+
import { buildRelease, pluginFiles } from "./lib/skills-release.mjs";
|
|
21
|
+
import { CODE_ROOT } from "./lib/paths.mjs";
|
|
22
|
+
import { cloudSettings, env } from "./platforms.mjs";
|
|
23
|
+
|
|
24
|
+
const args = process.argv.slice(2);
|
|
25
|
+
const flag = (/** @type {string} */ name) => {
|
|
26
|
+
const i = args.indexOf(`--${name}`);
|
|
27
|
+
return i < 0 ? undefined : (args[i + 1] ?? "");
|
|
28
|
+
};
|
|
29
|
+
const fail = (/** @type {string} */ m) => {
|
|
30
|
+
console.error(`erro: ${m}`);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const SKILLS = join(CODE_ROOT, ".claude", "skills");
|
|
35
|
+
const out = resolve(flag("out") ?? join(CODE_ROOT, ".release", "skills"));
|
|
36
|
+
|
|
37
|
+
/** every skill folder, its text files by path (SKILL.md and the siblings it reads) */
|
|
38
|
+
function readSkills() {
|
|
39
|
+
/** @param {string} dir @param {string} [prefix] @returns {[string, string][]} */
|
|
40
|
+
const walk = (dir, prefix = "") =>
|
|
41
|
+
readdirSync(dir, { withFileTypes: true }).flatMap(e =>
|
|
42
|
+
e.isDirectory()
|
|
43
|
+
? walk(join(dir, e.name), `${prefix}${e.name}/`)
|
|
44
|
+
: /\.(md|txt|json|html|css|js|mjs|py|sh)$/.test(e.name)
|
|
45
|
+
? [[`${prefix}${e.name}`, readFileSync(join(dir, e.name), "utf8")]]
|
|
46
|
+
: [],
|
|
47
|
+
);
|
|
48
|
+
return readdirSync(SKILLS, { withFileTypes: true })
|
|
49
|
+
.filter(e => e.isDirectory())
|
|
50
|
+
.map(e => ({ name: e.name, files: Object.fromEntries(walk(join(SKILLS, e.name))) }));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const [cmd] = args;
|
|
54
|
+
|
|
55
|
+
if (cmd === "build") {
|
|
56
|
+
const cli = flag("cli") || CLI_COMMAND;
|
|
57
|
+
const release = buildRelease(readSkills(), { run: `${cli} run`, skill: `${cli} skill` });
|
|
58
|
+
rmSync(out, { recursive: true, force: true });
|
|
59
|
+
mkdirSync(out, { recursive: true });
|
|
60
|
+
const { headers: _headers, warnings, ...stored } = release;
|
|
61
|
+
writeFileSync(join(out, "release.json"), JSON.stringify(stored));
|
|
62
|
+
for (const [path, text] of Object.entries(pluginFiles(release, { cli }))) {
|
|
63
|
+
mkdirSync(dirname(join(out, "plugin", path)), { recursive: true });
|
|
64
|
+
writeFileSync(join(out, "plugin", path), text);
|
|
65
|
+
}
|
|
66
|
+
console.log(`versão ${release.version} · ${release.skills.length} skills em ${out}`);
|
|
67
|
+
for (const s of release.skills)
|
|
68
|
+
console.log(
|
|
69
|
+
` ${s.name.padEnd(14)} ${String(s.size).padStart(6)} caracteres${s.parts.length > 1 ? ` · ${s.parts.length} partes` : ""}`,
|
|
70
|
+
);
|
|
71
|
+
for (const w of warnings) console.error(`aviso: ${w}`);
|
|
72
|
+
} else if (cmd === "publish") {
|
|
73
|
+
const secret = process.env.SKILLS_PUBLISH_SECRET || env("SKILLS_PUBLISH_SECRET");
|
|
74
|
+
if (!secret) fail("falta SKILLS_PUBLISH_SECRET (no ambiente ou no .env)");
|
|
75
|
+
const url = cloudSettings().studio.url;
|
|
76
|
+
if (!url) fail("falta cloud.studio_url no omnivideo.config.json");
|
|
77
|
+
let body;
|
|
78
|
+
try {
|
|
79
|
+
body = readFileSync(join(out, "release.json"), "utf8");
|
|
80
|
+
} catch {
|
|
81
|
+
fail(`não achei ${join(out, "release.json")}: rode build antes`);
|
|
82
|
+
}
|
|
83
|
+
const r = await fetch(`${url}/skills/publish`, {
|
|
84
|
+
method: "POST",
|
|
85
|
+
headers: { "content-type": "application/json", "x-publish-secret": secret },
|
|
86
|
+
body,
|
|
87
|
+
}).catch(e => fail(`o studio não respondeu: ${e.message}`));
|
|
88
|
+
const j = /** @type {any} */ (await r.json().catch(() => ({})));
|
|
89
|
+
if (!r.ok) fail(j.error ?? `o studio respondeu ${r.status}`);
|
|
90
|
+
console.log(`publicada a versão ${j.version}: ${j.added} skills novas no registro`);
|
|
91
|
+
} else {
|
|
92
|
+
fail('uso: node tools/skills-release.mjs build [--out <pasta>] [--cli "<comando>"] | publish [--out <pasta>]');
|
|
93
|
+
}
|