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: apply default video model prompt guidance
[._.]/ Adam Eivydf6936f0107e
diff --git a/server/services/creativeCommissions/abilityAdapters.js b/server/services/creativeCommissions/abilityAdapters.jsindex efb55059b8..1b6d9f30f8 100644--- a/server/services/creativeCommissions/abilityAdapters.js+++ b/server/services/creativeCommissions/abilityAdapters.js@@ -102,9 +102,11 @@ function genValue(commission, key) {return coerceGenerationValue(key, commission?.generation);}-function videoPromptGuidanceFor(commission) {+function videoPromptGuidanceFor(commission, { defaultVideoModelId } = {}) {const generation = commission?.generation;- return buildVideoPromptGuidance(generation?.videoModelId || generation?.model);+ const modelId = generation?.videoModelId || generation?.model+ || (typeof defaultVideoModelId === 'function' ? defaultVideoModelId() : undefined);+ return buildVideoPromptGuidance(modelId);}/**@@ -183,11 +185,11 @@ const videoAdapter = {label: 'Video',sanitizeGeneration: (raw) => sanitizeGenerationFor('video', raw),buildProjectParams: buildVideoGeometryParams,- buildDirective(commission) {+ buildDirective(commission, { defaultVideoModelId } = {}) {const duration = commission?.generation?.durationMode === 'auto'? ' Choose an appropriate duration between 5 and 600 seconds for the brief.' : '';const { lines, digest, constraints } = briefContext(commission, `Create a short-form video piece.${duration}`);- lines.unshift(videoPromptGuidanceFor(commission));+ lines.unshift(videoPromptGuidanceFor(commission, { defaultVideoModelId }));return { goal: composeDirectiveGoal(lines, digest), deliverables: ['One rendered video matching the brief'], constraints };},};@@ -197,7 +199,7 @@ const imageAdapter = {label: 'Image',sanitizeGeneration: (raw) => sanitizeGenerationFor('image', raw),buildProjectParams: buildVideoGeometryParams,- buildDirective(commission) {+ buildDirective(commission, { defaultVideoModelId } = {}) {const count = genValue(commission, 'imageCount');const noun = count === 1 ? 'a single still image' : `${count} still images`;const lead = `Produce ${noun}. Use the image / catalog generation tools; do NOT plan a video or music render.`;@@ -234,12 +236,12 @@ const musicVideoAdapter = {label: 'Music video',sanitizeGeneration: (raw) => sanitizeGenerationFor('music-video', raw),buildProjectParams: buildVideoGeometryParams,- buildDirective(commission) {+ buildDirective(commission, { defaultVideoModelId } = {}) {const duration = commission?.generation?.durationMode === 'auto'? ' Choose an appropriate video duration between 5 and 600 seconds for the brief.' : '';const lead = `Create a short-form music video:${duration} Generate an original music bed AND a matching video scored to it.`;const { lines, digest, constraints } = briefContext(commission, lead);- lines.unshift(videoPromptGuidanceFor(commission));+ lines.unshift(videoPromptGuidanceFor(commission, { defaultVideoModelId }));return {goal: composeDirectiveGoal(lines, digest),deliverables: ['One original music bed', 'One video matching the brief, scored to the music bed'],diff --git a/server/services/creativeCommissions/abilityAdapters.test.js b/server/services/creativeCommissions/abilityAdapters.test.jsindex 14bcbf1fee..765d8b9ce0 100644--- a/server/services/creativeCommissions/abilityAdapters.test.js+++ b/server/services/creativeCommissions/abilityAdapters.test.js@@ -101,6 +101,14 @@ describe('buildCommissionDirective — video (unchanged brief/feedback fold)', (});expect(directive.goal).toContain('MiniMax H3 prompt template');});++ it('uses the install default model when choosing model-specific guidance', () => {+ const directive = buildCommissionDirective(+ { targetAbility: 'video', brief: { intent: 'a quiet harbor' } },+ { defaultVideoModelId: () => 'minimax_h3_8bit' },+ );+ expect(directive.goal).toContain('MiniMax H3 prompt template');+ });});describe('per-ability directives steer the planner to the right tools', () => {diff --git a/server/services/creativeCommissions/scheduler.js b/server/services/creativeCommissions/scheduler.jsindex aa9df7537e..8199374590 100644--- a/server/services/creativeCommissions/scheduler.js+++ b/server/services/creativeCommissions/scheduler.js@@ -277,7 +277,10 @@ async function fireCommission(commission, trigger) {import('../videoGen/local.js'),]);- const directive = buildCommissionDirective(commission, { tasteRecipe: startedTasteRecipe });+ const directive = buildCommissionDirective(commission, {+ tasteRecipe: startedTasteRecipe,+ defaultVideoModelId,+ });// Fan the commission's single LLM pin onto BOTH CD cognitive stages// (treatment + plan) as the project's `modelOverrides`, so the scheduled// fire is processed by the provider/model the user chose rather than the