feat(canvas): finalize mixer reconnect swap and related updates

This commit is contained in:
2026-04-11 07:42:42 +02:00
parent f3dcaf89f2
commit 028fce35c2
52 changed files with 3859 additions and 272 deletions

View File

@@ -215,6 +215,24 @@ function formatExecutionRequirements(plan: AgentExecutionPlan): string {
.join("\n");
}
function formatDeliverableFirstInstructions(definition: AgentDefinition): string {
const rules = [
"Prioritize publishable, user-facing deliverables for every execution step.",
"Lead with final copy/content that can be shipped immediately.",
"Keep assumptions, rationale, and risk notes secondary and concise.",
"Do not produce reasoning-dominant output or long meta commentary.",
"When context is partial, deliver the best safe draft first and clearly note assumptions in brief form.",
];
if (definition.id === "campaign-distributor") {
rules.push(
"For Campaign Distributor steps, output channel-ready publishable copy first, then short format/assumption notes.",
);
}
return `deliverable-first rules:\n- ${rules.join("\n- ")}`;
}
export function buildExecuteMessages(input: {
definition: AgentDefinition;
locale: AgentLocale;
@@ -235,6 +253,7 @@ export function buildExecuteMessages(input: {
"Use the following compiled prompt segments:",
formatPromptSegments(segments),
`execution rules:\n- ${input.definition.executionRules.join("\n- ")}`,
formatDeliverableFirstInstructions(input.definition),
"Return one output payload per execution step keyed by step id.",
].join("\n\n"),
},