Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: select a ready music engine for launch video soundtracks
[._.]/ Adam Eivy840f57ad9623
diff --git a/docs/HTML_COMPOSITIONS.md b/docs/HTML_COMPOSITIONS.mdindex 800db1ff5d..0f25e4cbd6 100644--- a/docs/HTML_COMPOSITIONS.md+++ b/docs/HTML_COMPOSITIONS.md@@ -70,12 +70,21 @@ explicitly when either binary is unavailable; route and queue tests still run.This option is required for directories rooted at `launch-videos/` and can alsobe applied to other composition directories. An app's **Launch Video** tab(`/apps/<appId>/launch-video`, also linked from Overview) queues a user-triggered CoS task with-tone, direction, format, duration, an optional existing Music-library track (each-listed with its filename and an inline audio preview), and an optional+tone, direction, format, duration (15–120 seconds), optional generated original+music or an existing Music-library track (each listed with its filename and an+inline audio preview), and an optionalprovider/model/effort pin (Auto uses the normal CoS provider selection).Closing its drawer does not cancel the run; use CoS agents to follow or cancel it.Overlapping submissions for the same app are refused until its task settles.-No schedule or boot-time provider call is installed.+No schedule or boot-time provider call is installed. Generated music is explicitly+opted into for this run: the agent selects a ready music engine, writes an+instrumental prompt, waits for its media job, and passes the resulting library+filename to the renderer. Shorter music beds loop to fill the video. A generation+failure is reported instead of silently dropping the soundtrack.++The task supplies the selected app repository and process ports separately from+the PortOS media API origin. Product evidence comes from that repository; PortOS+serves only as the orchestration/rendering service unless it is the selected app.App runs pass `appId` and `runId` together in `launchVideo`, with directory exactly`launch-videos/<appId>/<runId>/composition`. The run is pinned to this instance.@@ -104,8 +113,8 @@ Alongside `index.html`, put non-empty `plan.md`, `caption.txt`, and}```-Scene durations must total 15–25 seconds, within two seconds of the requested-15–25 second target. Each line's actual whitespace-separated word count must+Scene durations must total 15–120 seconds, within two seconds of the requested+15–120 second target. Each line's actual whitespace-separated word count mustmatch `wordCount`; its hold must be at least `max(0.8, 0.3 × words)` seconds andfit inside the scene. The composition's runtime duration must equal the total.`posterSec` must be inside that duration and selects the generated thumbnail.diff --git a/server/services/taskPromptDefaults/appLaunchVideo.js b/server/services/taskPromptDefaults/appLaunchVideo.jsindex f6e568c368..26055d8dd9 100644--- a/server/services/taskPromptDefaults/appLaunchVideo.js+++ b/server/services/taskPromptDefaults/appLaunchVideo.js@@ -8,6 +8,6 @@ Write only to the supplied output directory (plus the runner's completion sentin- storyboard.json: {"posterSec":5,"scenes":[{"durationSec":20,"lines":[{"text":"Plan your next great project","wordCount":5,"holdSec":2}]}]}.Every scene has durationSec; every visible text element has text, its exact whitespace-separated wordCount, and holdSec. Total 15–120 seconds and within two seconds of the chosen target. Each hold is at least max(0.8, 0.3 * wordCount) and fits its scene. Implement those holds faithfully, including transitions. Choose posterSec at the strongest settled beat.- index.html and local assets: globalThis.portosComposition = {durationSec, fps:24, width, height, async seek(t){...}}. Use dimensions 1920x1080 (landscape), 1080x1920 (vertical), or 1080x1080 (square). Seek deterministically from t; await fonts and any asynchronous work. No wall-clock animations, external URLs, popups, workers or browser storage. Keep HTML/CSS/JS/SVG/JSON/Markdown/text UTF-8. No raster screenshots or footage.-When generateMusic is true, the user explicitly requests original instrumental music. Compose a music prompt matching the storyboard and tone, using only fictional/public product context. POST {"prompt":"<your musical direction>","instrumentalOnly":true,"durationSec":<targetDurationSec>} to the supplied PortOS service API base + /api/music/generate with the same Authorization header as rendering. Use the configured default engine; do not install models or change provider settings. Subscribe to /api/html-composition/<jobId>/events (the shared media queue stream) until complete; take result.filename from that completed job as musicTrack in the render JSON. Cancel that job via /api/html-composition/<jobId>/cancel if canceled. If generation fails, report the failure rather than silently rendering without music. This API may write its generated track to the Music library; do not write arbitrary files there yourself. When generateMusic is false, never generate music; preserve the supplied library musicTrack, if any.+When generateMusic is true, the user explicitly requests original instrumental music. Compose a music prompt matching the storyboard and tone, using only fictional/public product context. First GET /api/music/engines from the supplied PortOS service API base. Select a ready, platformSupported engine (prefer defaultEngine when ready), using its ready default model or a model marked ready in modelReadyById. If none is ready, report the setup requirement and stop. POST {"prompt":"<your musical direction>","instrumentalOnly":true,"engine":"<selected engine id>","modelId":"<selected model id>","durationSec":<duration within the engine limits>} to the supplied PortOS service API base + /api/music/generate with the same Authorization header as rendering. Aim for targetDurationSec within the engine duration limits; a shorter music bed is looped and faded by the renderer to fill the video. Do not install models or change provider settings. Subscribe to /api/html-composition/<jobId>/events (the shared media queue stream) until complete; take result.filename from that completed job as musicTrack in the render JSON. Cancel that job via /api/html-composition/<jobId>/cancel if canceled. If generation fails, report the failure rather than silently rendering without music. This API may write its generated track to the Music library; do not write arbitrary files there yourself. When generateMusic is false, never generate music; preserve the supplied library musicTrack, if any.Render using the supplied POST URL and JSON payload (adding only the completed generated musicTrack when requested) with the agent's Authorization: Bearer credential from PORTOS_API_TOKEN; never print or persist the credential. Privacy and readability checks fail closed and name the file/pattern or scene/line. Replace offending content, never bypass the gates. A queued job is not success: subscribe to its /events SSE endpoint until complete, error or canceled. Do not poll. On cancellation, cancel the media job with its /cancel endpoint. Keep the CoS run active through rendering. Only report success after complete. The server copies the validated plan, storyboard and caption plus MP4 and poster into the run directory and registers the video in Media History.`;diff --git a/server/services/taskPromptDefaults/integrity.snapshot.json b/server/services/taskPromptDefaults/integrity.snapshot.jsonindex ddb3ef2c48..027e796dbb 100644--- a/server/services/taskPromptDefaults/integrity.snapshot.json+++ b/server/services/taskPromptDefaults/integrity.snapshot.json@@ -2,7 +2,7 @@"DEFAULT_TASK_PROMPTS": {"accessibility": "46f628a44a919bb788de8761e86ca0e1","api-contract": "d52e00ec53eb5618df1a769efccc08f3",- "app-launch-video": "bd2baf243f48760e4181183b251eb23d",+ "app-launch-video": "0247e82d4ae6e812dbd666d3bd75ad62","better-cognitive-load": "a1fe22f6ef936131456c55a6b0623204","better-complexity": "c99f67b43ff54a1c8cf0176c721d9c06","better-dependency-freedom": "8a79c8be829f926bbc7720ee29818d53",