Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(mcp-host): report dashboard fields the hero and callouts never draw

marcotebef09eb0d5866
diff --git a/mcp-host/src/workflow/__tests__/internalTools.dashboard.fidelity.test.ts b/mcp-host/src/workflow/__tests__/internalTools.dashboard.fidelity.test.ts
index f5c79269c..1ce4577f6 100644
--- a/mcp-host/src/workflow/__tests__/internalTools.dashboard.fidelity.test.ts
+++ b/mcp-host/src/workflow/__tests__/internalTools.dashboard.fidelity.test.ts
@@ -91,6 +91,25 @@ describe('custom list blocks', () => {
})
})
+describe('arguments nothing draws', () => {
+ it('lists fields a fixed template does not read, and keys a callout block does not take', async () => {
+ const brief = await render({
+ template: 'executive-brief',
+ data: {
+ title: 'T',
+ summary: 'Revenue grew 12%.',
+ metrics: [{ label: 'Revenue', value: '$1.2M' }],
+ },
+ })
+ expect(brief.notes).toContain("'data.summary'")
+ expect(brief.notes).toContain("'data.metrics'")
+ const callout = await render(
+ blocks([{ type: 'callout', content: 'Disk almost full', severity: 'danger' }])
+ )
+ expect(callout.notes).toContain("'data.blocks[0].severity'")
+ })
+})
+
describe('tables', () => {
it('pads short rows, trims long ones and says what was left out', async () => {
const { html, notes } = await render({
diff --git a/mcp-host/src/workflow/internalTools.ts b/mcp-host/src/workflow/internalTools.ts
index 023f816f8..a2ba60285 100644
--- a/mcp-host/src/workflow/internalTools.ts
+++ b/mcp-host/src/workflow/internalTools.ts
@@ -4791,8 +4791,16 @@ type DashboardTemplateName =
type DashData = Record<string, unknown>
+// The fields are named rather than spread: a spread reads every key, which
+// would hide the ones nothing draws from the "Ignored arguments" note.
function heroOf(data: DashData, eyebrowFallback?: unknown): string {
- return renderHero({ ...data, eyebrow: data.eyebrow ?? eyebrowFallback })
+ return renderHero({
+ title: data.title,
+ headline: data.headline,
+ status: data.status,
+ statusLabel: data.statusLabel,
+ eyebrow: data.eyebrow ?? eyebrowFallback,
+ })
}
function tablesOf(data: DashData, ctx: DashRender): string {
@@ -4980,7 +4988,16 @@ function renderBlock(b: unknown, where: string, ctx: DashRender): string {
case 'narrative':
case 'code':
case 'callout':
- return renderSectionHtml({ ...block, title }, where)
+ return renderSectionHtml(
+ {
+ type: block.type,
+ content: block.content,
+ language: block.language,
+ tone: block.tone,
+ title,
+ },
+ where
+ )
case 'bullets':
return renderSectionHtml(
{ type: 'bullets', title, content: block.items ?? block.content },