@gentbajko/slopify 2.5.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -21
- package/NOTICE +12 -0
- package/README.md +21 -40
- package/SUBTITLES.md +1 -1
- package/dist/adapter-registry.js +3 -0
- package/dist/adapters/alignment/cache.js +4 -1
- package/dist/adapters/alignment/ctc.js +25 -23
- package/dist/adapters/alignment/index.js +37 -6
- package/dist/adapters/alignment/multilingual.js +267 -0
- package/dist/adapters/alignment/protocol.js +11 -0
- package/dist/adapters/alignment/quality.js +4 -3
- package/dist/adapters/alignment/sentences.js +95 -0
- package/dist/adapters/alignment/spec.js +24 -0
- package/dist/adapters/alignment/spell.js +769 -0
- package/dist/adapters/alignment/text.js +56 -9
- package/dist/adapters/alignment/window.js +34 -30
- package/dist/adapters/alignment/worker.js +23 -21
- package/dist/adapters/explain.js +11 -11
- package/dist/adapters/host-cli/index.js +44 -5
- package/dist/adapters/host-cli/transport.js +7 -5
- package/dist/adapters/image/bytes.js +2 -2
- package/dist/adapters/image/codex-output.js +1 -1
- package/dist/adapters/image/codex.js +87 -22
- package/dist/adapters/image/fal.js +13 -5
- package/dist/adapters/image/google.js +11 -8
- package/dist/adapters/image/openai.js +14 -7
- package/dist/adapters/image/reference.js +34 -0
- package/dist/adapters/image/replicate.js +7 -2
- package/dist/adapters/image/video.js +2 -2
- package/dist/adapters/key-probes.js +36 -0
- package/dist/adapters/llm/claude-code.js +168 -32
- package/dist/adapters/llm/cli-login-error.js +1 -1
- package/dist/adapters/llm/codex-limits.js +157 -0
- package/dist/adapters/llm/codex.js +99 -12
- package/dist/adapters/llm/document-workspace.js +2 -2
- package/dist/adapters/llm/gemini-workspace.js +1 -1
- package/dist/adapters/llm/gemini.js +16 -3
- package/dist/adapters/llm/image-workspace.js +58 -0
- package/dist/adapters/llm/openrouter.js +11 -3
- package/dist/adapters/llm/run-cli.js +12 -7
- package/dist/adapters/tts/cartesia.js +10 -0
- package/dist/adapters/tts/elevenlabs.js +31 -9
- package/dist/adapters/tts/inworld-async.js +9 -5
- package/dist/adapters/tts/inworld.js +17 -3
- package/dist/adapters/tts/openai.js +3 -0
- package/dist/adapters/tts/voice-languages.js +80 -0
- package/dist/assets/fonts/noto/NotoSans-Regular.ttf +0 -0
- package/dist/assets/fonts/noto/NotoSansArabic-Regular.ttf +0 -0
- package/dist/assets/fonts/noto/NotoSansDevanagari-Regular.ttf +0 -0
- package/dist/assets/fonts/noto/NotoSansHebrew-Regular.ttf +0 -0
- package/dist/assets/fonts/noto/NotoSansThai-Regular.ttf +0 -0
- package/dist/assets/fonts/noto/OFL.txt +93 -0
- package/dist/assets/fonts/noto/SOURCE.txt +18 -0
- package/dist/assets/sample/sample-audiobook.tar +0 -0
- package/dist/assets/sample/sample-podcast.tar +0 -0
- package/dist/assets/sample/sample-project.tar +0 -0
- package/dist/catalog/merge.js +132 -0
- package/dist/catalog/registry.js +13 -13
- package/dist/catalog/schema.js +2 -0
- package/dist/catalog/store.js +147 -8
- package/dist/compose.yaml +71 -0
- package/dist/edge/autostart/docker-record.js +32 -0
- package/dist/edge/autostart/docker.js +50 -0
- package/dist/edge/autostart/index.js +78 -0
- package/dist/edge/autostart/launcher.js +176 -0
- package/dist/edge/autostart/model.js +3 -0
- package/dist/edge/autostart/native.js +210 -0
- package/dist/edge/autostart/prompt.js +66 -0
- package/dist/edge/autostart/service.js +81 -0
- package/dist/edge/cli.js +57 -51
- package/dist/edge/docker-install/activation.js +56 -0
- package/dist/edge/docker-install/apply.js +458 -0
- package/dist/edge/docker-install/engine.js +362 -0
- package/dist/edge/docker-install/run.js +154 -0
- package/dist/edge/docker-install/state.js +146 -0
- package/dist/edge/{docker-projects → docker-install}/volume.js +1 -5
- package/dist/edge/docker.js +14 -22
- package/dist/edge/host-cli.js +1 -1
- package/dist/edge/http/actions.js +32 -10
- package/dist/edge/http/app.js +58 -2
- package/dist/edge/http/auditions.js +70 -0
- package/dist/edge/http/autostart.js +37 -0
- package/dist/edge/http/channel-memory.js +92 -0
- package/dist/edge/http/channels.js +128 -0
- package/dist/edge/http/entries.js +22 -3
- package/dist/edge/http/files.js +1 -1
- package/dist/edge/http/folder-location.js +1 -1
- package/dist/edge/http/home.js +39 -0
- package/dist/edge/http/host-cli.js +29 -5
- package/dist/edge/http/narration-peaks.js +76 -0
- package/dist/edge/http/onboarding.js +152 -0
- package/dist/edge/http/open-folder.js +1 -1
- package/dist/edge/http/patch-notes.js +45 -0
- package/dist/edge/http/planning.js +4 -2
- package/dist/edge/http/project-create.js +87 -0
- package/dist/edge/http/projects.js +31 -99
- package/dist/edge/http/prompts.js +40 -3
- package/dist/edge/http/pronunciations.js +23 -4
- package/dist/edge/http/providers.js +86 -0
- package/dist/edge/http/reviews.js +121 -0
- package/dist/edge/http/revision-files.js +1 -1
- package/dist/edge/http/revisions.js +1 -1
- package/dist/edge/http/run-cost.js +25 -0
- package/dist/edge/http/schedules.js +111 -6
- package/dist/edge/http/settings.js +84 -6
- package/dist/edge/http/storage-files.js +50 -0
- package/dist/edge/http/storage.js +29 -2
- package/dist/edge/http/studio.js +207 -0
- package/dist/edge/http/style-preview.js +100 -0
- package/dist/edge/http/subtitles.js +1 -1
- package/dist/edge/http/trash.js +69 -0
- package/dist/edge/http/update.js +24 -3
- package/dist/edge/http/whats-new.js +15 -0
- package/dist/edge/http/youtube-edits.js +83 -0
- package/dist/edge/native-update.js +62 -0
- package/dist/host-cli/open-folder.js +10 -10
- package/dist/host-cli/runtime.js +9 -1
- package/dist/kernel/db/migrations/0025-automatic-reviews.sql +40 -0
- package/dist/kernel/db/migrations/0026-schedule-topic-generation.sql +23 -0
- package/dist/kernel/db/migrations/0027-run-cost.sql +58 -0
- package/dist/kernel/db/migrations/0030-automatic-retries.sql +18 -0
- package/dist/kernel/db/migrations/0031-prompt-history-and-description-edits.sql +33 -0
- package/dist/kernel/db/migrations/0032-channels.sql +65 -0
- package/dist/kernel/db/migrations/0034-script-prompts.sql +23 -0
- package/dist/kernel/db/migrations/0035-narration-aliases.sql +13 -0
- package/dist/kernel/db/migrations/0037-project-uploads.sql +8 -0
- package/dist/kernel/db/migrations/0038-voice-languages.sql +7 -0
- package/dist/kernel/db/migrations/0039-channel-essentials.sql +64 -0
- package/dist/kernel/db/migrations/0040-standalone-usage.sql +35 -0
- package/dist/kernel/paths.js +27 -6
- package/dist/kernel/pipeline.js +4 -1
- package/dist/kernel/ports/host-cli.js +122 -14
- package/dist/kernel/ports/key-probe.js +1 -0
- package/dist/kernel/ports/languages.js +157 -0
- package/dist/kernel/ports/model.js +5 -2
- package/dist/kernel/ports/narration-aliases.js +60 -0
- package/dist/kernel/ports/plan-limits.js +36 -0
- package/dist/kernel/runner/attempt.js +17 -8
- package/dist/kernel/runner/audition.js +36 -0
- package/dist/kernel/runner/graph.js +24 -5
- package/dist/kernel/runner/index.js +35 -5
- package/dist/kernel/runner/meter.js +1 -0
- package/dist/kernel/runner/providers.js +142 -7
- package/dist/kernel/runner/retry-policy.js +43 -0
- package/dist/kernel/runner/standalone.js +134 -0
- package/dist/kernel/runner/work-authority.js +28 -2
- package/dist/main.js +272 -16
- package/dist/patch-notes/0.4.2-to-1.0.md +93 -0
- package/dist/patch-notes/1.0-to-2.0.md +74 -0
- package/dist/patch-notes/2.0-to-3.0.md +257 -0
- package/dist/patch-notes/3.0.0.md +70 -0
- package/dist/patch-notes/index.json +26 -0
- package/dist/slices/admission/model.js +27 -0
- package/dist/slices/admission/repo.js +24 -4
- package/dist/slices/admission/rules.js +79 -1
- package/dist/slices/admission/schema.js +58 -1
- package/dist/slices/admission/short-mode.js +47 -0
- package/dist/slices/admission/start.js +41 -5
- package/dist/slices/article/continuation.js +2 -2
- package/dist/slices/article/provided-entries.js +2 -2
- package/dist/slices/article/run.js +6 -2
- package/dist/slices/article/segments.js +3 -3
- package/dist/slices/backups/folder.js +14 -6
- package/dist/slices/batch/index.js +7 -2
- package/dist/slices/cancel/index.js +1 -1
- package/dist/slices/channels/cast-images.js +110 -0
- package/dist/slices/channels/cast-match.js +32 -0
- package/dist/slices/channels/images.js +19 -0
- package/dist/slices/channels/model.js +5 -0
- package/dist/slices/channels/rebrand.js +100 -0
- package/dist/slices/channels/repo.js +218 -0
- package/dist/slices/channels/runs.js +129 -0
- package/dist/slices/channels/schema.js +129 -0
- package/dist/slices/channels/service.js +180 -0
- package/dist/slices/channels/studio-csv.js +110 -0
- package/dist/slices/channels/videos.js +120 -0
- package/dist/slices/checkpoints/recovery.js +10 -0
- package/dist/slices/control/index.js +2 -1
- package/dist/slices/document/fonts.js +1 -1
- package/dist/slices/document/render.js +1 -1
- package/dist/slices/episodes/related.js +90 -0
- package/dist/slices/episodes/repo.js +60 -0
- package/dist/slices/episodes/service.js +58 -0
- package/dist/slices/episodes/summarize.js +170 -0
- package/dist/slices/estimate/index.js +109 -28
- package/dist/slices/estimate/requests.js +60 -2
- package/dist/slices/fixes/rules.js +73 -0
- package/dist/slices/fonts/coverage.js +82 -0
- package/dist/slices/fonts/sfnt.js +74 -0
- package/dist/slices/images/run.js +8 -5
- package/dist/slices/images/scale.js +84 -0
- package/dist/slices/library/diff.js +122 -0
- package/dist/slices/library/history.js +100 -0
- package/dist/slices/library/model.js +3 -0
- package/dist/slices/library/photorealistic.js +49 -0
- package/dist/slices/library/repo.js +19 -14
- package/dist/slices/library/save.js +62 -12
- package/dist/slices/library/slots.js +7 -1
- package/dist/slices/library/used-by.js +153 -0
- package/dist/slices/loudness/level-pieces.js +41 -0
- package/dist/slices/loudness/loudnorm.js +164 -0
- package/dist/slices/loudness/model.js +153 -0
- package/dist/slices/model-upkeep/model.js +10 -0
- package/dist/slices/model-upkeep/switch.js +217 -0
- package/dist/slices/model-upkeep/usage.js +183 -0
- package/dist/slices/narration/aliases-library.js +31 -0
- package/dist/slices/narration/aliases-schema.js +53 -0
- package/dist/slices/narration/aliases.js +49 -0
- package/dist/slices/narration/blocks.js +352 -0
- package/dist/slices/narration/chunk.js +19 -7
- package/dist/slices/narration/concat.js +2 -2
- package/dist/slices/narration/describe.js +45 -0
- package/dist/slices/narration/pauses-model.js +63 -0
- package/dist/slices/narration/pauses.js +269 -0
- package/dist/slices/narration/peaks-model.js +1 -0
- package/dist/slices/narration/peaks.js +94 -0
- package/dist/slices/narration/preparation.js +21 -3
- package/dist/slices/narration/pronunciation-chunks.js +3 -3
- package/dist/slices/narration/pronunciation.js +72 -25
- package/dist/slices/narration/run.js +6 -6
- package/dist/slices/narration/shared-glossary.js +1 -1
- package/dist/slices/narration/steering.js +15 -4
- package/dist/slices/notifications/notifier.js +21 -3
- package/dist/slices/notifications/rules.js +22 -1
- package/dist/slices/onboarding/copy.js +143 -0
- package/dist/slices/onboarding/first-run.js +46 -0
- package/dist/slices/onboarding/install.js +119 -0
- package/dist/slices/onboarding/model.js +64 -0
- package/dist/slices/onboarding/packs.js +491 -0
- package/dist/slices/onboarding/quick-short.js +129 -0
- package/dist/slices/onboarding/sample.js +132 -0
- package/dist/slices/onboarding/state.js +68 -0
- package/dist/slices/onboarding/template.js +73 -0
- package/dist/slices/patch-notes/library.js +73 -0
- package/dist/slices/patch-notes/seen.js +77 -0
- package/dist/slices/play-drafts/convert.js +125 -6
- package/dist/slices/play-drafts/readiness.js +3 -0
- package/dist/slices/play-drafts/repo.js +2 -0
- package/dist/slices/play-drafts/review-inputs.js +20 -3
- package/dist/slices/play-drafts/schema.js +89 -0
- package/dist/slices/play-drafts/service.js +4 -1
- package/dist/slices/play-drafts/start.js +43 -18
- package/dist/slices/project-templates/from-project.js +50 -4
- package/dist/slices/project-templates/one-off.js +26 -0
- package/dist/slices/project-templates/repo.js +2 -1
- package/dist/slices/project-templates/service.js +15 -4
- package/dist/slices/project-templates/setup.js +18 -2
- package/dist/slices/rebuild/admission-repo.js +1 -1
- package/dist/slices/rebuild/model.js +6 -0
- package/dist/slices/rebuild/preview-details.js +46 -3
- package/dist/slices/rebuild/preview-plan.js +13 -6
- package/dist/slices/rebuild/recipe-audio-parts.js +40 -7
- package/dist/slices/rebuild/recipe-audio.js +66 -12
- package/dist/slices/rebuild/recipe-build.js +8 -4
- package/dist/slices/rebuild/recipe-cast.js +18 -0
- package/dist/slices/rebuild/recipe-checkpoints.js +11 -9
- package/dist/slices/rebuild/recipe-describe.js +93 -0
- package/dist/slices/rebuild/recipe-edit.js +13 -1
- package/dist/slices/rebuild/recipe-exports.js +62 -8
- package/dist/slices/rebuild/recipe-input-schema.js +35 -0
- package/dist/slices/rebuild/recipe-legacy.js +9 -0
- package/dist/slices/rebuild/recipe-loudness.js +45 -0
- package/dist/slices/rebuild/recipe-model.js +25 -6
- package/dist/slices/rebuild/recipe-pauses.js +7 -0
- package/dist/slices/rebuild/recipe-preparation.js +3 -3
- package/dist/slices/rebuild/recipe-provider-choice.js +11 -1
- package/dist/slices/rebuild/recipe-reference.js +15 -1
- package/dist/slices/rebuild/recipe-reviews.js +117 -0
- package/dist/slices/rebuild/recipe-save.js +4 -1
- package/dist/slices/rebuild/recipe-shorts.js +23 -3
- package/dist/slices/rebuild/recipe-text.js +114 -19
- package/dist/slices/rebuild/recipe-validation.js +14 -2
- package/dist/slices/rebuild/recipe-visual.js +96 -33
- package/dist/slices/rebuild/recipe-voices.js +286 -0
- package/dist/slices/rebuild/recipe-work.js +77 -6
- package/dist/slices/rebuild/recipe-youtube.js +2 -0
- package/dist/slices/rebuild/recovery-conflict.js +7 -3
- package/dist/slices/rebuild/recovery-model.js +3 -0
- package/dist/slices/rebuild/recovery-selection.js +28 -2
- package/dist/slices/rebuild/recovery.js +35 -17
- package/dist/slices/rebuild/repo.js +3 -3
- package/dist/slices/rebuild/retry.js +18 -0
- package/dist/slices/rebuild/review-redo.js +110 -0
- package/dist/slices/rebuild/runtime-actions.js +5 -0
- package/dist/slices/rebuild/runtime-admission.js +4 -1
- package/dist/slices/rebuild/runtime-animate.js +4 -4
- package/dist/slices/rebuild/runtime-article.js +5 -5
- package/dist/slices/rebuild/runtime-document.js +4 -4
- package/dist/slices/rebuild/runtime-export-bed.js +43 -0
- package/dist/slices/rebuild/runtime-export-edit.js +70 -11
- package/dist/slices/rebuild/runtime-export-inputs.js +52 -10
- package/dist/slices/rebuild/runtime-export-short.js +85 -0
- package/dist/slices/rebuild/runtime-export.js +84 -19
- package/dist/slices/rebuild/runtime-figure-card.js +87 -0
- package/dist/slices/rebuild/runtime-image.js +21 -2
- package/dist/slices/rebuild/runtime-local.js +148 -24
- package/dist/slices/rebuild/runtime-materialize.js +8 -0
- package/dist/slices/rebuild/runtime-narration-reuse.js +2 -1
- package/dist/slices/rebuild/runtime-narration-text.js +7 -7
- package/dist/slices/rebuild/runtime-pictures.js +28 -0
- package/dist/slices/rebuild/runtime-piece-label.js +27 -0
- package/dist/slices/rebuild/runtime-provider.js +126 -18
- package/dist/slices/rebuild/runtime-publication.js +21 -5
- package/dist/slices/rebuild/runtime-review.js +237 -0
- package/dist/slices/rebuild/runtime-run.js +17 -11
- package/dist/slices/rebuild/runtime-shorts.js +44 -17
- package/dist/slices/rebuild/runtime-store.js +39 -10
- package/dist/slices/rebuild/runtime-subtitles.js +72 -19
- package/dist/slices/rebuild/runtime-voices.js +103 -0
- package/dist/slices/rebuild/runtime-youtube.js +7 -6
- package/dist/slices/rebuild/soften.js +49 -0
- package/dist/slices/rebuild/transition-repo.js +9 -2
- package/dist/slices/research/run.js +4 -4
- package/dist/slices/research/synthesis.js +2 -2
- package/dist/slices/reviews/model.js +105 -0
- package/dist/slices/reviews/outcome.js +22 -0
- package/dist/slices/reviews/repo.js +106 -0
- package/dist/slices/reviews/rules.js +63 -0
- package/dist/slices/reviews/verdict.js +71 -0
- package/dist/slices/reviews/view.js +30 -0
- package/dist/slices/revisions/adopt-content.js +5 -2
- package/dist/slices/revisions/adopt.js +3 -1
- package/dist/slices/revisions/downloads.js +7 -1
- package/dist/slices/revisions/image-plan.js +183 -0
- package/dist/slices/revisions/mutation-assets.js +10 -0
- package/dist/slices/revisions/mutation-cues.js +71 -0
- package/dist/slices/revisions/mutation-request.js +2 -1
- package/dist/slices/revisions/mutations.js +97 -3
- package/dist/slices/revisions/schema.js +11 -1
- package/dist/slices/run-cost/limits.js +128 -0
- package/dist/slices/run-cost/meter.js +47 -0
- package/dist/slices/run-cost/panel.js +234 -0
- package/dist/slices/run-cost/pricing.js +92 -0
- package/dist/slices/run-cost/week.js +108 -0
- package/dist/slices/schedules/agenda.js +158 -0
- package/dist/slices/schedules/repo.js +58 -18
- package/dist/slices/schedules/scheduler.js +67 -16
- package/dist/slices/schedules/schema.js +138 -1
- package/dist/slices/schedules/service.js +43 -4
- package/dist/slices/schedules/similar.js +90 -0
- package/dist/slices/schedules/topic-list.js +163 -0
- package/dist/slices/schedules/topics.js +422 -0
- package/dist/slices/settings/first-run.js +102 -0
- package/dist/slices/settings/health.js +190 -0
- package/dist/slices/settings/key-guides.js +128 -0
- package/dist/slices/settings/key-test.js +85 -0
- package/dist/slices/settings/model.js +6 -1
- package/dist/slices/settings/playback.js +15 -0
- package/dist/slices/settings/repo.js +17 -3
- package/dist/slices/settings/voices.js +64 -4
- package/dist/slices/settings/whats-new.js +64 -0
- package/dist/slices/shorts/captions.js +9 -0
- package/dist/slices/shorts/pick.js +3 -3
- package/dist/slices/shorts/prompts.js +1 -1
- package/dist/slices/shorts/render.js +54 -5
- package/dist/slices/storage/asset-name.js +3 -0
- package/dist/slices/storage/backup-export.js +48 -9
- package/dist/slices/storage/backup-format.js +38 -1
- package/dist/slices/storage/backup-import.js +191 -19
- package/dist/slices/storage/delete-project.js +7 -4
- package/dist/slices/storage/documents.js +79 -0
- package/dist/slices/storage/files-location.js +531 -0
- package/dist/slices/storage/layout.js +14 -4
- package/dist/slices/storage/model.js +11 -0
- package/dist/slices/storage/portable.js +92 -12
- package/dist/slices/storage/reconcile.js +14 -1
- package/dist/slices/storage/repo.js +4 -1
- package/dist/slices/storage/schema.js +11 -0
- package/dist/slices/storage/trim.js +146 -0
- package/dist/slices/studio/disclosure.js +74 -0
- package/dist/slices/studio/model.js +28 -0
- package/dist/slices/studio/pack.js +209 -0
- package/dist/slices/studio/settings.js +133 -0
- package/dist/slices/style-preview/images.js +61 -0
- package/dist/slices/style-preview/render.js +161 -0
- package/dist/slices/style-preview/schema.js +45 -0
- package/dist/slices/style-preview/service.js +93 -0
- package/dist/slices/style-preview/settings.js +89 -0
- package/dist/slices/subtitles/captions.js +42 -9
- package/dist/slices/subtitles/model.js +22 -0
- package/dist/slices/subtitles/prepare.js +27 -16
- package/dist/slices/subtitles/transcript.js +1 -1
- package/dist/slices/thumbnail/run.js +7 -7
- package/dist/slices/trash/model.js +25 -0
- package/dist/slices/trash/service.js +273 -0
- package/dist/slices/uploads/repo.js +20 -0
- package/dist/slices/video/ambient-bed-schema.js +15 -0
- package/dist/slices/video/ambient-bed.js +95 -0
- package/dist/slices/video/ambient-mix.js +72 -0
- package/dist/slices/video/audio-inputs.js +2 -2
- package/dist/slices/video/cards.js +5 -2
- package/dist/slices/video/edit-list.js +23 -2
- package/dist/slices/video/edit-settings.js +13 -3
- package/dist/slices/video/ffmpeg.js +63 -9
- package/dist/slices/video/figure-card.js +492 -0
- package/dist/slices/video/figure-spans.js +51 -0
- package/dist/slices/video/plan.js +125 -13
- package/dist/slices/video/run.js +14 -12
- package/dist/slices/video/slideshow.js +39 -4
- package/dist/slices/voices/attribution.js +69 -0
- package/dist/slices/voices/audio-files.js +82 -0
- package/dist/slices/voices/audition.js +25 -0
- package/dist/slices/voices/cast.js +56 -0
- package/dist/slices/voices/grouping.js +49 -0
- package/dist/slices/voices/join.js +35 -0
- package/dist/slices/voices/languages.js +25 -0
- package/dist/slices/voices/model.js +179 -0
- package/dist/slices/voices/palette.js +26 -0
- package/dist/slices/voices/panel.js +91 -0
- package/dist/slices/voices/portraits.js +55 -0
- package/dist/slices/voices/script.js +136 -0
- package/dist/slices/voices/timing.js +58 -0
- package/dist/slices/youtube/answer.js +1 -1
- package/dist/slices/youtube/chapters.js +126 -0
- package/dist/slices/youtube/edits-repo.js +69 -0
- package/dist/slices/youtube/edits.js +89 -0
- package/dist/slices/youtube/placeholders.js +98 -0
- package/dist/slices/youtube/transcript.js +11 -4
- package/dist/updater/service.js +66 -21
- package/dist/web/assets/index-CUA2sUxU.css +1 -0
- package/dist/web/assets/index-CX590kE-.js +303 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/dist/web/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/dist/web/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/dist/web/assets/{pdf-BLF2i8c2.js → pdf-BG8n_uc5.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +4 -4
- package/dist/edge/docker-launch.js +0 -81
- package/dist/edge/docker-projects/activation.js +0 -35
- package/dist/edge/docker-projects/claims.js +0 -85
- package/dist/edge/docker-projects/committed.js +0 -40
- package/dist/edge/docker-projects/engine.js +0 -461
- package/dist/edge/docker-projects/install.js +0 -254
- package/dist/edge/docker-projects/prune.js +0 -66
- package/dist/edge/docker-projects/recover.js +0 -100
- package/dist/edge/docker-projects/state.js +0 -225
- package/dist/web/assets/index-CktpxlJd.js +0 -171
- package/dist/web/assets/index-DB-vOnGU.css +0 -1
- package/scripts/docker-run.sh +0 -3
- /package/dist/edge/{docker-projects → docker-install}/tree.js +0 -0
package/dist/web/index.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
7
|
<meta name="color-scheme" content="dark light" />
|
|
8
8
|
<title>Slopify</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-CX590kE-.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CUA2sUxU.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gentbajko/slopify",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Turn a prompt into a finished video, locally, with your own provider keys",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
6
|
"author": "Gent Bajko",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
21
|
+
"NOTICE",
|
|
21
22
|
"SUBTITLES.md",
|
|
22
|
-
"scripts/docker-run.sh",
|
|
23
23
|
"!dist/**/*.d.ts"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsc -p tsconfig.build.json && node scripts/copy-migrations.mjs && node scripts/copy-assets.mjs && node scripts/copy-web.mjs",
|
|
27
27
|
"build:types": "tsc -p tsconfig.build.json --declaration --emitDeclarationOnly",
|
|
28
28
|
"typecheck": "tsc --noEmit",
|
|
29
|
-
"smoke:docker-
|
|
29
|
+
"smoke:docker-install": "node scripts/docker-install-smoke.mjs"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@fastify/busboy": "^3.2.2",
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { spawn } from "node:child_process";
|
|
3
|
-
import { constants } from "node:fs";
|
|
4
|
-
import { open } from "node:fs/promises";
|
|
5
|
-
import { homedir } from "node:os";
|
|
6
|
-
import { join } from "node:path";
|
|
7
|
-
import { fileURLToPath } from "node:url";
|
|
8
|
-
import { nodeHostSetupRunner } from "../host-cli/install.js";
|
|
9
|
-
import { assertManagedDockerHost } from "./docker.js";
|
|
10
|
-
import { dockerEngine } from "./docker-projects/engine.js";
|
|
11
|
-
import { installProjects } from "./docker-projects/install.js";
|
|
12
|
-
import { dockerConfig, privateDirectory } from "./docker-projects/state.js";
|
|
13
|
-
async function main() {
|
|
14
|
-
const uid = process.getuid?.();
|
|
15
|
-
const gid = process.getgid?.();
|
|
16
|
-
assertManagedDockerHost(process.platform, uid, gid);
|
|
17
|
-
if (gid === undefined)
|
|
18
|
-
throw new Error("Could not read your user's group. Run the --docker launcher as your normal logged-in user.");
|
|
19
|
-
const c = dockerConfig(process.env, homedir(), process.cwd(), uid, gid);
|
|
20
|
-
await privateDirectory(c.root, uid);
|
|
21
|
-
if (process.argv[2] !== "--locked") {
|
|
22
|
-
const path = join(c.root, "setup.lock");
|
|
23
|
-
const fd = await open(path, constants.O_CREAT | constants.O_RDWR | constants.O_NOFOLLOW, 0o600);
|
|
24
|
-
try {
|
|
25
|
-
const s = await fd.stat();
|
|
26
|
-
if (!s.isFile() || s.nlink !== 1 || s.uid !== uid || (s.mode & 0o077) !== 0)
|
|
27
|
-
throw new Error(`The launcher's lock file ${path} has the wrong owner or permissions. Delete it and run the launcher again.`);
|
|
28
|
-
const child = spawn("flock", [
|
|
29
|
-
"--nonblock",
|
|
30
|
-
"--no-fork",
|
|
31
|
-
"--conflict-exit-code",
|
|
32
|
-
"73",
|
|
33
|
-
path,
|
|
34
|
-
process.execPath,
|
|
35
|
-
fileURLToPath(import.meta.url),
|
|
36
|
-
"--locked",
|
|
37
|
-
], { stdio: "inherit" });
|
|
38
|
-
const code = await new Promise((resolve, reject) => {
|
|
39
|
-
child.once("error", () => reject(new Error("The --docker launcher needs the flock command, which isn't installed. Install util-linux (for example sudo apt install util-linux, or sudo pacman -S util-linux) and try again.")));
|
|
40
|
-
child.once("exit", (status, signal) => signal
|
|
41
|
-
? reject(new Error("Docker setup was interrupted before it finished. Run the same command again; Slopify will finish or undo the half-done step."))
|
|
42
|
-
: resolve(status ?? 1));
|
|
43
|
-
});
|
|
44
|
-
if (code === 73)
|
|
45
|
-
throw new Error("Another Slopify --docker launcher is already running and changing your installation. Wait for it to finish, then run the command again.");
|
|
46
|
-
process.exitCode = code;
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
finally {
|
|
50
|
-
await fd.close();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const controller = new AbortController();
|
|
54
|
-
const abort = () => controller.abort(new Error("Docker setup was stopped before it finished. Run the same command again; Slopify will finish or undo the half-done step."));
|
|
55
|
-
process.once("SIGINT", abort);
|
|
56
|
-
process.once("SIGTERM", abort);
|
|
57
|
-
try {
|
|
58
|
-
const e = dockerEngine(nodeHostSetupRunner, controller.signal, process.env);
|
|
59
|
-
const recovery = () => dockerEngine(nodeHostSetupRunner, AbortSignal.timeout(5 * 60_000), process.env);
|
|
60
|
-
const result = await installProjects(c, e, recovery);
|
|
61
|
-
console.log(`Slopify is running at ${result.url}`);
|
|
62
|
-
console.log(`Project files on this machine: ${result.projects}`);
|
|
63
|
-
if (result.recovery)
|
|
64
|
-
console.log(`Recovery volume retained: ${result.recovery}. Previous containers remain stopped.`);
|
|
65
|
-
for (const name of result.pruned.removed)
|
|
66
|
-
console.log(`Removed older recovery volume: ${name}`);
|
|
67
|
-
for (const problem of result.pruned.problems)
|
|
68
|
-
console.warn(problem);
|
|
69
|
-
}
|
|
70
|
-
finally {
|
|
71
|
-
process.off("SIGINT", abort);
|
|
72
|
-
process.off("SIGTERM", abort);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
try {
|
|
76
|
-
await main();
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
console.error(error instanceof Error ? error.message : "Docker setup failed.");
|
|
80
|
-
process.exitCode = 1;
|
|
81
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { timingSafeEqual } from "node:crypto";
|
|
2
|
-
import { lstat, readFile } from "node:fs/promises";
|
|
3
|
-
import { isAbsolute, resolve } from "node:path";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
import { readState } from "./state.js";
|
|
6
|
-
const activationSchema = z
|
|
7
|
-
.object({
|
|
8
|
-
version: z.literal(1),
|
|
9
|
-
token: z.string().regex(/^[a-f0-9]{64}$/),
|
|
10
|
-
committed: z.boolean(),
|
|
11
|
-
})
|
|
12
|
-
.strict();
|
|
13
|
-
export async function dockerActivationCommitted(path, token) {
|
|
14
|
-
if (!/^[a-f0-9]{64}$/.test(token))
|
|
15
|
-
return false;
|
|
16
|
-
const marker = await readState(path, activationSchema, process.getuid?.() ?? -1);
|
|
17
|
-
return (marker?.committed === true && timingSafeEqual(Buffer.from(marker.token), Buffer.from(token)));
|
|
18
|
-
}
|
|
19
|
-
export async function dockerFolderConfiguration(env, projectsRoot) {
|
|
20
|
-
if (env.SLOPIFY_CONTAINER !== "1")
|
|
21
|
-
return { container: false, hostProjects: null };
|
|
22
|
-
const host = env.SLOPIFY_DOCKER_PROJECTS_DIR;
|
|
23
|
-
if (!host || env.SLOPIFY_DOCKER_INSTALL_STATE !== "/opt/slopify-install/activation.json")
|
|
24
|
-
return { container: true, hostProjects: null };
|
|
25
|
-
if (!isAbsolute(host) || resolve(host) !== host || /[\p{Cc},]/u.test(host))
|
|
26
|
-
throw new Error("Invalid Docker host project path.");
|
|
27
|
-
const root = await lstat(projectsRoot);
|
|
28
|
-
const mounts = await readFile("/proc/self/mountinfo", "utf8");
|
|
29
|
-
if (projectsRoot !== "/data/projects" ||
|
|
30
|
-
!root.isDirectory() ||
|
|
31
|
-
root.isSymbolicLink() ||
|
|
32
|
-
!mounts.split("\n").some((line) => line.split(" ")[4] === "/data/projects"))
|
|
33
|
-
throw new Error("Managed Docker project bind is missing.");
|
|
34
|
-
return { container: true, hostProjects: host };
|
|
35
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { lstat, readdir } from "node:fs/promises";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { journalSchema, readState } from "./state.js";
|
|
4
|
-
export async function assertVolumeClaims(c, e, daemon, volumeIdentity, current) {
|
|
5
|
-
const permitted = new Set(current ? [current.id] : []);
|
|
6
|
-
for (const entry of await readdir(c.directory)) {
|
|
7
|
-
if (!/^[a-f0-9-]{36}$/.test(entry))
|
|
8
|
-
continue;
|
|
9
|
-
const directory = join(c.directory, entry);
|
|
10
|
-
const s = await lstat(directory);
|
|
11
|
-
if (!s.isDirectory() || s.isSymbolicLink() || s.uid !== c.uid || (s.mode & 0o077) !== 0)
|
|
12
|
-
throw new Error("Unsafe recovery transaction directory.");
|
|
13
|
-
const j = await readState(join(directory, "journal.json"), journalSchema, c.uid);
|
|
14
|
-
if (!j ||
|
|
15
|
-
j.id !== entry ||
|
|
16
|
-
j.name !== c.name ||
|
|
17
|
-
j.daemon !== daemon ||
|
|
18
|
-
j.volume !== c.volume ||
|
|
19
|
-
j.volumeIdentity !== volumeIdentity)
|
|
20
|
-
continue;
|
|
21
|
-
const readerName = `slopify-reader-${j.id}`;
|
|
22
|
-
const reader = await e.inspect(readerName);
|
|
23
|
-
if (reader) {
|
|
24
|
-
const transaction = await e.command([
|
|
25
|
-
"inspect",
|
|
26
|
-
"--format",
|
|
27
|
-
'{{index .Config.Labels "io.slopify.reader"}}',
|
|
28
|
-
reader.id,
|
|
29
|
-
]);
|
|
30
|
-
const source = reader.mounts.find((m) => m.destination === "/source");
|
|
31
|
-
const bind = reader.mounts.find((m) => m.destination === "/source/projects");
|
|
32
|
-
if (reader.name !== readerName ||
|
|
33
|
-
transaction !== j.id ||
|
|
34
|
-
reader.image !== j.image ||
|
|
35
|
-
reader.running ||
|
|
36
|
-
source?.type !== "volume" ||
|
|
37
|
-
source.name !== j.volume ||
|
|
38
|
-
source.rw ||
|
|
39
|
-
(j.sourceBind !== null &&
|
|
40
|
-
(bind?.type !== "bind" || bind.source !== j.sourceBind || bind.rw)) ||
|
|
41
|
-
reader.mounts.some((m) => m !== source &&
|
|
42
|
-
!(j.sourceBind !== null && m === bind) &&
|
|
43
|
-
!(m.type === "tmpfs" && m.destination === "/data")))
|
|
44
|
-
throw new Error("Copy reader identity or mounts conflict; recovery material is retained.");
|
|
45
|
-
await e.command(["rm", reader.id]);
|
|
46
|
-
}
|
|
47
|
-
if (j.previous) {
|
|
48
|
-
const prior = await e.inspect(j.previous.id);
|
|
49
|
-
if (prior &&
|
|
50
|
-
[j.previous.name, `${c.name}-previous-${j.id}`].includes(prior.name) &&
|
|
51
|
-
prior.image === j.previous.image &&
|
|
52
|
-
prior.user === j.previous.user &&
|
|
53
|
-
sameMounts(prior.mounts, j.previous.mounts))
|
|
54
|
-
permitted.add(prior.id);
|
|
55
|
-
}
|
|
56
|
-
if (j.candidate) {
|
|
57
|
-
const candidate = await e.inspect(j.candidate);
|
|
58
|
-
if (candidate &&
|
|
59
|
-
[c.name, `${c.name}-failed-${j.id}`].includes(candidate.name) &&
|
|
60
|
-
candidate.installation === j.installation &&
|
|
61
|
-
candidate.signature === j.signature)
|
|
62
|
-
permitted.add(candidate.id);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
await e.claims(c.volume, [...permitted], (container) => legacyRollback(container, c.name));
|
|
66
|
-
}
|
|
67
|
-
// Docker reports a container's mounts in no fixed order, so the recorded shape is compared as
|
|
68
|
-
// a set; comparing the JSON as listed refused this installation's own retained container on
|
|
69
|
-
// some runs.
|
|
70
|
-
function sameMounts(a, b) {
|
|
71
|
-
const shape = (mounts) => JSON.stringify([...mounts].sort((x, y) => `${x.destination}\0${x.type}\0${x.name}\0${x.source}`.localeCompare(`${y.destination}\0${y.type}\0${y.name}\0${y.source}`)));
|
|
72
|
-
return shape(a) === shape(b);
|
|
73
|
-
}
|
|
74
|
-
// Launchers before project folders kept each replaced container stopped as a rollback, named
|
|
75
|
-
// `<name>-previous-<YYYYmmddHHMMSS>` with the launcher's label and restart off. Such a container
|
|
76
|
-
// never writes unless someone starts it by hand, which is equally true of the rollbacks this
|
|
77
|
-
// launcher keeps itself, so it does not block an upgrade. Anything running, restartable,
|
|
78
|
-
// unlabelled or otherwise named still does.
|
|
79
|
-
function legacyRollback(container, name) {
|
|
80
|
-
const escaped = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
81
|
-
return (!container.running &&
|
|
82
|
-
container.restart.Name === "no" &&
|
|
83
|
-
container.signature !== null &&
|
|
84
|
-
new RegExp(`^${escaped}-previous-\\d{14}$`).test(container.name));
|
|
85
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
2
|
-
import { journalSchema, readState, } from "./state.js";
|
|
3
|
-
export async function readCommittedJournal(c, receipt, current) {
|
|
4
|
-
const j = await readState(join(c.directory, receipt.transaction, "journal.json"), journalSchema, c.uid);
|
|
5
|
-
if (!j ||
|
|
6
|
-
j.id !== receipt.transaction ||
|
|
7
|
-
j.name !== receipt.name ||
|
|
8
|
-
j.installation !== receipt.installation ||
|
|
9
|
-
j.daemon !== receipt.daemon ||
|
|
10
|
-
j.volume !== receipt.volume ||
|
|
11
|
-
j.volumeIdentity !== receipt.volumeIdentity ||
|
|
12
|
-
j.destination !== receipt.projects ||
|
|
13
|
-
j.signature !== receipt.signature ||
|
|
14
|
-
j.image !== receipt.image ||
|
|
15
|
-
j.user !== receipt.user ||
|
|
16
|
-
j.publishedIdentity?.dev !== receipt.directoryIdentity.dev ||
|
|
17
|
-
j.publishedIdentity.ino !== receipt.directoryIdentity.ino)
|
|
18
|
-
throw new Error("Committed activation journal is missing or inconsistent.");
|
|
19
|
-
if (current) {
|
|
20
|
-
const data = current.mounts.find((m) => m.destination === "/data");
|
|
21
|
-
const projects = current.mounts.find((m) => m.destination === "/data/projects");
|
|
22
|
-
const activation = current.mounts.find((m) => m.destination === "/opt/slopify-install");
|
|
23
|
-
if (current.id !== j.candidate ||
|
|
24
|
-
current.image !== receipt.image ||
|
|
25
|
-
current.user !== receipt.user ||
|
|
26
|
-
current.signature !== receipt.signature ||
|
|
27
|
-
current.installation !== receipt.installation ||
|
|
28
|
-
data?.type !== "volume" ||
|
|
29
|
-
data.name !== receipt.volume ||
|
|
30
|
-
!data.rw ||
|
|
31
|
-
projects?.type !== "bind" ||
|
|
32
|
-
projects.source !== receipt.projects ||
|
|
33
|
-
!projects.rw ||
|
|
34
|
-
activation?.type !== "bind" ||
|
|
35
|
-
activation.source !== join(c.directory, receipt.transaction) ||
|
|
36
|
-
activation.rw)
|
|
37
|
-
throw new Error("Committed container identity or mounts differ from its receipt.");
|
|
38
|
-
}
|
|
39
|
-
return j;
|
|
40
|
-
}
|