chore: snapshot WIP across dashboard, engine, and core

Bundles staged work-in-progress modifications across multiple packages
(routes, store, agent-instructions, self-healing, QuickEntryBox, etc.)
plus the dashboard theme-data.css preload fix.

Note: an unstaged 621-line deletion in .fusion/memory.md was deliberately
NOT committed — it appears to be an accidental overwrite of architecture
notes and is left in the working tree for review.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-10 21:12:40 -07:00
parent 54fdeb66df
commit 1a3ff011d3
13 changed files with 279 additions and 17 deletions

View File

@@ -4,6 +4,7 @@ import type { Agent, AgentRatingSummary, AgentStore } from "@fusion/core";
const MAX_INSTRUCTIONS_PATH_LENGTH = 500;
const MAX_INSTRUCTIONS_TEXT_LENGTH = 50_000;
const MAX_SOUL_LENGTH = 10_000;
function trimAndClamp(value: string, maxLength: number, label: string, agentId: string): string {
const trimmed = value.trim();
@@ -77,6 +78,14 @@ function getTrendLabel(trend: AgentRatingSummary["trend"]): string {
}
}
function formatSoulSection(soul: string, agentId: string): string {
const trimmed = trimAndClamp(soul, MAX_SOUL_LENGTH, "soul", agentId);
if (!trimmed) {
return "";
}
return `## Soul\n\n${trimmed}`;
}
function formatPerformanceFeedbackSection(ratingSummary: AgentRatingSummary): string {
const lines: string[] = [
"## Performance Feedback",
@@ -170,6 +179,14 @@ export async function resolveAgentInstructions(
}
}
// Soul/personality section (after instructions, before performance feedback)
if (agent.soul?.trim()) {
const soulSection = formatSoulSection(agent.soul, agent.id);
if (soulSection) {
parts.push(soulSection);
}
}
if (ratingSummary && ratingSummary.totalRatings > 0) {
parts.push(formatPerformanceFeedbackSection(ratingSummary));
}