Skip to content

The open-source agent harness - the runtime layer that turns an LLM into a working agent.

Enable generative UI by default with on-demand OpenUI instructions.

debajyoti-truefoundry9966a8da23b9
diff --git a/.dockerignore b/.dockerignore
index 1a2af2e4c..71391071d 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -11,7 +11,6 @@
**/*.log
**/.DS_Store
**/.env
-packages/server/registry
Dockerfile
docker-compose.yml
.dockerignore
diff --git a/fern/openapi/openapi.json b/fern/openapi/openapi.json
index 48863c4d0..8d329a496 100644
--- a/fern/openapi/openapi.json
+++ b/fern/openapi/openapi.json
@@ -192,6 +192,9 @@
"type": "object"
},
"AskUserQuestionsConfig": {
+ "default": {
+ "enabled": true
+ },
"properties": {
"enabled": {
"default": true,
@@ -705,6 +708,9 @@
"type": "object"
},
"DynamicSubAgentsConfig": {
+ "default": {
+ "enabled": true
+ },
"properties": {
"enabled": {
"default": true,
@@ -766,6 +772,9 @@
"type": "string"
},
"GenerativeUIConfig": {
+ "default": {
+ "enabled": true
+ },
"properties": {
"enabled": {
"default": true,
@@ -2002,6 +2011,30 @@
"type": "object"
},
"RuntimeConfig": {
+ "default": {
+ "ask_user_questions": {
+ "enabled": true
+ },
+ "context_management": {
+ "compaction": {
+ "enabled": true
+ },
+ "large_tool_response": {
+ "enabled": true
+ }
+ },
+ "dynamic_sub_agents": {
+ "enabled": true
+ },
+ "generative_ui": {
+ "enabled": true
+ },
+ "iteration_limit": 100,
+ "sandbox": {
+ "enabled": false,
+ "file_downloads": true
+ }
+ },
"properties": {
"ask_user_questions": {
"$ref": "#/components/schemas/AskUserQuestionsConfig"
@@ -2028,6 +2061,10 @@
"type": "object"
},
"SandboxConfig": {
+ "default": {
+ "enabled": false,
+ "file_downloads": true
+ },
"properties": {
"enabled": {
"type": "boolean"
diff --git a/packages/harness/src/agent-session/TurnResourceResolver.ts b/packages/harness/src/agent-session/TurnResourceResolver.ts
index 730798236..a19e08135 100644
--- a/packages/harness/src/agent-session/TurnResourceResolver.ts
+++ b/packages/harness/src/agent-session/TurnResourceResolver.ts
@@ -28,7 +28,7 @@ export type TurnSandboxFactory = (input: {
}) => Promise<Sandbox>;
function specWantsSandbox(spec: AgentSpec): boolean {
- return spec.config?.sandbox?.enabled === true;
+ return spec.config.sandbox.enabled;
}
function toSelectors(entry: {
@@ -192,7 +192,7 @@ export class TurnResourceResolver<
modelParams: spec.model.params,
// Sub-agents should return free-form summaries to the parent, not the user-facing structured response.
responseFormat: agentInfo ? undefined : spec.response_format,
- iterationLimit: spec.config?.iteration_limit,
+ iterationLimit: spec.config.iteration_limit,
toolSets,
},
};
diff --git a/packages/harness/src/agent-session/builtinsFromSpec.ts b/packages/harness/src/agent-session/builtinsFromSpec.ts
index 4f06df009..2bb13f69e 100644
--- a/packages/harness/src/agent-session/builtinsFromSpec.ts
+++ b/packages/harness/src/agent-session/builtinsFromSpec.ts
@@ -27,21 +27,20 @@ export function builtinsFromSpec(input: {
const config = spec.config;
const capabilities: AgentCapability[] = [currentDateTime({ tracing })];
- const compaction = config?.context_management.compaction;
- if (!compaction || compaction.enabled) {
+ if (config.context_management.compaction.enabled) {
capabilities.push(
contextCompaction({
definition,
- compactionThresholdTokens: compaction?.compaction_threshold_tokens,
+ compactionThresholdTokens: config.context_management.compaction.compaction_threshold_tokens,
}),
);
}
- if (!isChild && (config?.ask_user_questions === undefined || config.ask_user_questions.enabled)) {
+ if (!isChild && config.ask_user_questions.enabled) {
capabilities.push(askUserQuestion());
}
- const dynamicSubAgentsEnabled = config?.dynamic_sub_agents === undefined || config.dynamic_sub_agents.enabled;
+ const dynamicSubAgentsEnabled = config.dynamic_sub_agents.enabled;
if (!isChild && dynamicSubAgentsEnabled) {
capabilities.push(
dynamicSubAgents({
@@ -51,8 +50,7 @@ export function builtinsFromSpec(input: {
);
}
- const large = config?.context_management.large_tool_response;
- if (!large || large.enabled) {
+ if (config.context_management.large_tool_response.enabled) {
capabilities.push(
largeToolResponse({
dynamicSubAgentsPresent: !isChild && dynamicSubAgentsEnabled,
@@ -61,8 +59,8 @@ export function builtinsFromSpec(input: {
);
}
- if (!isChild && config?.generative_ui?.enabled) {
- capabilities.push(openUI());
+ if (!isChild && config.generative_ui.enabled) {
+ capabilities.push(openUI({ preload: false, tracing }));
}
return capabilities;
diff --git a/packages/harness/src/agent-session/schemas/agentSpec.ts b/packages/harness/src/agent-session/schemas/agentSpec.ts
index f5a527e1a..277b34bb5 100644
--- a/packages/harness/src/agent-session/schemas/agentSpec.ts
+++ b/packages/harness/src/agent-session/schemas/agentSpec.ts
@@ -181,14 +181,14 @@ const AskUserQuestionsConfigSchema = z
export const RuntimeConfigSchema = z
.object({
iteration_limit: z.number().int().positive().max(1024).default(DEFAULT_AGENT_CONFIG_ITERATION_LIMIT),
- sandbox: SandboxConfigSchema.optional(),
- dynamic_sub_agents: DynamicSubAgentsConfigSchema.optional(),
- context_management: ContextManagementConfigSchema.optional().default(() => ({
+ sandbox: SandboxConfigSchema.default(() => ({ enabled: false, file_downloads: true })),
+ dynamic_sub_agents: DynamicSubAgentsConfigSchema.default(() => ({ enabled: true })),
+ context_management: ContextManagementConfigSchema.default(() => ({
compaction: { enabled: true },
large_tool_response: { enabled: true },
})),
- generative_ui: GenerativeUIConfigSchema.optional(),
- ask_user_questions: AskUserQuestionsConfigSchema.optional(),
+ generative_ui: GenerativeUIConfigSchema.default(() => ({ enabled: true })),
+ ask_user_questions: AskUserQuestionsConfigSchema.default(() => ({ enabled: true })),
})
.openapi('RuntimeConfig');
@@ -235,7 +235,8 @@ export const AgentSpecSchema = z
mcp_servers: z.array(MCPServerRequestSchema).optional(),
response_format: ResponseFormatSchema.optional(),
skills: z.array(SkillNameRefSchema).optional(),
- config: RuntimeConfigSchema.optional(),
+ // Factory must parse so nested RuntimeConfig field defaults materialize.
+ config: RuntimeConfigSchema.default(() => RuntimeConfigSchema.parse({})),
variables: z.record(z.string(), z.string()).optional(),
})
.describe('Agent Definition')
diff --git a/packages/harness/src/core/capabilities/builtins/OpenUI.ts b/packages/harness/src/core/capabilities/builtins/OpenUI.ts
index 92df79603..043626199 100644
--- a/packages/harness/src/core/capabilities/builtins/OpenUI.ts
+++ b/packages/harness/src/core/capabilities/builtins/OpenUI.ts
@@ -1,7 +1,17 @@
import dedent from 'dedent';
+import { z } from 'zod';
import { InstructionBuilder } from '../../InstructionBuilder';
+import { toolResultResponse } from '../../mcp/IMCPServer';
+import { defineTool, LocalToolMCP, type ToolDefinition } from '../../mcp/LocalToolMCP';
+import type { AgentTracing } from '../../tracing/AgentTracing';
+import { NOOP_AGENT_TRACING } from '../../tracing/NoopAgentTracing';
import type { AgentCapability } from '../AgentCapability';
+export const OPENUI_SERVER_ID = 'openui';
+export const GET_OPENUI_INSTRUCTIONS_TOOL_NAME = 'get_openui_instructions';
+
+const getOpenUIInstructionsInputSchema = z.object({}).strict();
+
export const OPENUI_SECTION_TAG = 'openui';
export const OPENUI_MARKDOWN_FENCING_TAG = 'openui-markdown-fencing';
export const OPENUI_SYNTAX_RULES_TAG = 'openui-syntax-rules';
@@ -251,8 +261,69 @@ export function buildOpenUIInstruction(builder: InstructionBuilder): void {
);
}
-export function openUI(): AgentCapability {
+/** Renders the existing OpenUI prompt tree without duplicating section bodies. */
+export function renderOpenUIPrompt(): string {
+ const root = new InstructionBuilder('_openui_render');
+ buildOpenUIInstruction(root);
+ const wrapped = root.build();
+ const openTag = `<${OPENUI_SECTION_TAG}>`;
+ const closeTag = `</${OPENUI_SECTION_TAG}>`;
+ const start = wrapped.indexOf(openTag);
+ const end = wrapped.lastIndexOf(closeTag);
+ if (start === -1 || end === -1) {
+ throw new Error('Failed to render OpenUI prompt from buildOpenUIInstruction');
+ }
+ return wrapped.slice(start, end + closeTag.length);
+}
+
+function buildOpenUIDeferredInstruction(builder: InstructionBuilder): void {
+ builder.addSection(
+ OPENUI_SECTION_TAG,
+ dedent`
+ The Agent can render interactive UI that markdown cannot express by emitting a fenced \`\`\`openui block.
+
+ Before writing any \`\`\`openui fence, the Agent MUST call ${GET_OPENUI_INSTRUCTIONS_TOOL_NAME} with arguments {}.
+ Do not invent OpenUI syntax or component APIs without loading those instructions.
+
+ Use OpenUI only when the response is UI-heavy and needs components markdown does not support.
+ `.trim(),
+ );
+}
+
+export class OpenUIInstructions extends LocalToolMCP {
+ readonly name = OPENUI_SERVER_ID;
+ readonly displayName = 'OpenUI';
+
+ constructor(tracing: AgentTracing) {
+ super({ tracing });
+ }
+
+ private tools: ToolDefinition[] = [
+ defineTool({
+ name: GET_OPENUI_INSTRUCTIONS_TOOL_NAME,
+ description: [
+ 'Load the full OpenUI generative-UI authoring instructions (syntax, components, builtins, examples, rules).',
+ 'Call this before emitting any ```openui fenced block. Pass an empty object as arguments: {}.',
+ ].join(' '),
+ schema: getOpenUIInstructionsInputSchema,
+ handler: () => Promise.resolve(toolResultResponse({ text: renderOpenUIPrompt() })),
+ }),
+ ];
+
+ protected getTools(): ToolDefinition[] {
+ return this.tools;
+ }
+}
+
+export function openUI(options?: { preload?: boolean; tracing?: AgentTracing }): AgentCapability {
+ const preload = options?.preload ?? true;
+ if (preload) {
+ return {
+ instructionBuilders: [buildOpenUIInstruction],
+ };
+ }
return {
- instructionBuilders: [buildOpenUIInstruction],
+ systemToolSets: [new OpenUIInstructions(options?.tracing ?? NOOP_AGENT_TRACING)],
+ instructionBuilders: [buildOpenUIDeferredInstruction],
};
}
diff --git a/packages/harness/tests/agent-session/agentSpecDefaults.test.ts b/packages/harness/tests/agent-session/agentSpecDefaults.test.ts
new file mode 100644
index 000000000..66c1219f8
--- /dev/null
+++ b/packages/harness/tests/agent-session/agentSpecDefaults.test.ts
@@ -0,0 +1,32 @@
+import { AgentSpecSchema, DEFAULT_AGENT_CONFIG_ITERATION_LIMIT } from '../../src/agent-session/schemas/agentSpec';
+
+describe('AgentSpec RuntimeConfig defaults', () => {
+ it('materializes config when omitted', () => {
+ const spec = AgentSpecSchema.parse({ model: { name: 'provider/model' } });
+ expect(spec.config.iteration_limit).toBe(DEFAULT_AGENT_CONFIG_ITERATION_LIMIT);
+ expect(spec.config.sandbox).toEqual({ enabled: false, file_downloads: true });
+ expect(spec.config.generative_ui).toEqual({ enabled: true });
+ expect(spec.config.ask_user_questions).toEqual({ enabled: true });
+ expect(spec.config.dynamic_sub_agents).toEqual({ enabled: true });
+ expect(spec.config.context_management.compaction.enabled).toBe(true);
+ expect(spec.config.context_management.large_tool_response.enabled).toBe(true);
+ });
+
+ it('fills generative_ui when other config fields are present', () => {
+ const spec = AgentSpecSchema.parse({
+ model: { name: 'provider/model' },
+ config: { sandbox: { enabled: true } },
+ });
+ expect(spec.config.sandbox.enabled).toBe(true);
+ expect(spec.config.sandbox.file_downloads).toBe(true);
+ expect(spec.config.generative_ui.enabled).toBe(true);
+ });
+
+ it('allows opting out of generative_ui', () => {
+ const spec = AgentSpecSchema.parse({
+ model: { name: 'provider/model' },
+ config: { generative_ui: { enabled: false } },
+ });
+ expect(spec.config.generative_ui.enabled).toBe(false);
+ });
+});
diff --git a/packages/harness/tests/agent-session/builtinsFromSpec.test.ts b/packages/harness/tests/agent-session/builtinsFromSpec.test.ts
new file mode 100644
index 000000000..03adde315
--- /dev/null
+++ b/packages/harness/tests/agent-session/builtinsFromSpec.test.ts
@@ -0,0 +1,79 @@
+import { builtinsFromSpec } from '../../src/agent-session/builtinsFromSpec';
+import { AgentSpecSchema } from '../../src/agent-session/schemas/agentSpec';
+import {
+ GET_OPENUI_INSTRUCTIONS_TOOL_NAME,
+ OPENUI_SERVER_ID,
+ buildOpenUIInstruction,
+} from '../../src/core/capabilities/builtins/OpenUI';
+import type { AgentDefinition } from '../../src/core/runtime/AgentDefinition';
+import { NOOP_AGENT_TRACING } from '../../src/core/tracing/NoopAgentTracing';
+import { makeMockILLM, makeSilentLogger } from '../core/harnessMocks';
+
+function makeDefinition(): AgentDefinition {
+ return {
+ model: 'provider/model',
+ modelClient: makeMockILLM(),
+ };
+}
+
+function runBuiltins(input: {
+ spec: ReturnType<typeof AgentSpecSchema.parse>;
+ isChild?: boolean;
+}): ReturnType<typeof builtinsFromSpec> {
+ return builtinsFromSpec({
+ spec: input.spec,
+ definition: makeDefinition(),
+ isChild: input.isChild ?? false,
+ sandboxAvailable: false,
+ tracing: NOOP_AGENT_TRACING,
+ logger: makeSilentLogger(),
+ });
+}
+
+function hasOpenUITool(capabilities: ReturnType<typeof builtinsFromSpec>): boolean {
+ return capabilities.some(cap => cap.systemToolSets?.some(ts => ts.name === OPENUI_SERVER_ID));
+}
+
+describe('builtinsFromSpec generative_ui', () => {
+ it('enables OpenUI with preload false when generative_ui is omitted', () => {
+ const capabilities = runBuiltins({
+ spec: AgentSpecSchema.parse({ model: { name: 'provider/model' } }),
+ });
+ expect(hasOpenUITool(capabilities)).toBe(true);
+ const openUICap = capabilities.find(cap => cap.systemToolSets?.some(ts => ts.name === OPENUI_SERVER_ID));
+ expect(openUICap?.instructionBuilders?.[0]).not.toBe(buildOpenUIInstruction);
+ expect(openUICap?.instructionBuilders).toHaveLength(1);
+ });
+
+ it('disables OpenUI when generative_ui.enabled is false', () => {
+ const capabilities = runBuiltins({
+ spec: AgentSpecSchema.parse({
+ model: { name: 'provider/model' },
+ config: { generative_ui: { enabled: false } },
+ }),
+ });
+ expect(hasOpenUITool(capabilities)).toBe(false);
+ });
+
+ it('never enables OpenUI on child threads', () => {
+ const capabilities = runBuiltins({
+ spec: AgentSpecSchema.parse({ model: { name: 'provider/model' } }),
+ isChild: true,
+ });
+ expect(hasOpenUITool(capabilities)).toBe(false);
+ });
+
+ it('registers get_openui_instructions for root threads', async () => {
+ const capabilities = runBuiltins({
+ spec: AgentSpecSchema.parse({ model: { name: 'provider/model' } }),
+ });
+ const toolSet = capabilities
+ .flatMap(cap => [...(cap.systemToolSets ?? [])])
+ .find(ts => ts.name === OPENUI_SERVER_ID);
+ const listed = await toolSet?.listTools();
+ if (!listed || 'authRequired' in listed) {
+ throw new Error('expected listTools result');
+ }
+ expect(listed.result.tools.map(t => t.name)).toEqual([GET_OPENUI_INSTRUCTIONS_TOOL_NAME]);
+ });
+});
diff --git a/packages/harness/tests/agent-session/testHelpers.ts b/packages/harness/tests/agent-session/testHelpers.ts
index 9c85ed734..69a84d53e 100644
--- a/packages/harness/tests/agent-session/testHelpers.ts
+++ b/packages/harness/tests/agent-session/testHelpers.ts
@@ -50,6 +50,7 @@ export function makeAgentSpec(
iteration_limit: 5,
ask_user_questions: { enabled: false },
dynamic_sub_agents: { enabled: false },
+ generative_ui: { enabled: false },
context_management: {
compaction: { enabled: false },
large_tool_response: { enabled: false },
diff --git a/packages/harness/tests/core/capabilities/builtins/OpenUI.test.ts b/packages/harness/tests/core/capabilities/builtins/OpenUI.test.ts
new file mode 100644
index 000000000..14fdf12ce
--- /dev/null
+++ b/packages/harness/tests/core/capabilities/builtins/OpenUI.test.ts
@@ -0,0 +1,54 @@
+import { InstructionBuilder } from '../../../../src/core/InstructionBuilder';
+import {
+ GET_OPENUI_INSTRUCTIONS_TOOL_NAME,
+ OPENUI_MARKDOWN_FENCING_TAG,
+ OPENUI_SECTION_TAG,
+ OPENUI_SERVER_ID,
+ buildOpenUIInstruction,
+ openUI,
+ renderOpenUIPrompt,
+} from '../../../../src/core/capabilities/builtins/OpenUI';
+import { isCallToolResponseResult } from '../../../../src/core/mcp/IMCPServer';
+import { NOOP_AGENT_TRACING } from '../../../../src/core/tracing/NoopAgentTracing';
+
+describe('openUI', () => {
+ it('preload true (default) matches instruction-only wiring', () => {
+ const capability = openUI();
+ expect(capability.systemToolSets).toBeUndefined();
+ expect(capability.instructionBuilders).toHaveLength(1);
+ expect(capability.instructionBuilders?.[0]).toBe(buildOpenUIInstruction);
+
+ const preloaded = openUI({ preload: true });
+ expect(preloaded.systemToolSets).toBeUndefined();
+ expect(preloaded.instructionBuilders?.[0]).toBe(buildOpenUIInstruction);
+ });
+
+ it('preload false exposes get_openui_instructions and a short deferred instruction', async () => {
+ const capability = openUI({ preload: false, tracing: NOOP_AGENT_TRACING });
+ expect(capability.systemToolSets).toHaveLength(1);
+ expect(capability.instructionBuilders).toHaveLength(1);
+
+ const toolSet = capability.systemToolSets?.[0];
+ expect(toolSet?.name).toBe(OPENUI_SERVER_ID);
+ const listed = await toolSet?.listTools();
+ if (!listed || 'authRequired' in listed) {
+ throw new Error('expected listTools result');
+ }
+ expect(listed.result.tools.map(t => t.name)).toEqual([GET_OPENUI_INSTRUCTIONS_TOOL_NAME]);
+
+ const deferred = new InstructionBuilder('capabilities');
+ capability.instructionBuilders?.[0]?.(deferred);
+ const deferredText = deferred.build();
+ expect(deferredText).toContain(GET_OPENUI_INSTRUCTIONS_TOOL_NAME);
+ expect(deferredText).not.toContain(OPENUI_MARKDOWN_FENCING_TAG);
+
+ const response = await toolSet?.callTool({ name: GET_OPENUI_INSTRUCTIONS_TOOL_NAME, arguments: {} });
+ if (!response || !isCallToolResponseResult(response)) {
+ throw new Error('expected tool result response');
+ }
+ const text = response.result.content[0]?.type === 'text' ? response.result.content[0].text : '';
+ expect(text).toContain(`<${OPENUI_SECTION_TAG}>`);
+ expect(text).toContain(`<${OPENUI_MARKDOWN_FENCING_TAG}>`);
+ expect(text).toBe(renderOpenUIPrompt());
+ });
+});
diff --git a/packages/sdk/.fern/metadata.json b/packages/sdk/.fern/metadata.json
index ebffe894d..f5fe89838 100644
--- a/packages/sdk/.fern/metadata.json
+++ b/packages/sdk/.fern/metadata.json
@@ -27,10 +27,9 @@
"streamType": "web",
"useDefaultRequestParameterValues": true
},
- "originGitCommit": "991608091f832a06ed81fd219599ce140ffbc830",
+ "originGitCommit": "5a96f5b12e75f7092b45ab8e8e74216603898fdd",
"originGitCommitIsDirty": true,
- "invokedBy": "ci",
+ "invokedBy": "manual",
"requestedVersion": "0.0.0",
- "ciProvider": "github",
"sdkVersion": "0.0.0"
}
diff --git a/packages/sdk/pnpm-lock.yaml b/packages/sdk/pnpm-lock.yaml
index 900bc8fe2..beaeab47c 100644
--- a/packages/sdk/pnpm-lock.yaml
+++ b/packages/sdk/pnpm-lock.yaml
@@ -694,8 +694,8 @@ packages:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
- resolution: {integrity: sha512-MRlTqhAfoMx/4mhEbPo3Hi02g9LJZaJkka69V6h67Cb1gjrAG0jsTE4CZX1eptNx+VCAwJmfpnDIF4P0Nh1A7A==}
+ resolution: {integrity: sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==}
engines: {node: '>=18'}
@@ -1320,7 +1320,7 @@ snapshots:
baseline-browser-mapping: 2.11.12
caniuse-lite: 1.0.30001806
electron-to-chromium: 1.5.402
- node-releases: 2.0.52
+ node-releases: 2.0.53
update-browserslist-db: 1.2.3([email protected])
@@ -1522,7 +1522,7 @@ snapshots:
diff --git a/packages/server/registry/mcp.yaml b/packages/server/registry/mcp.yaml
deleted file mode 100644
index 1fe84ee8d..000000000
--- a/packages/server/registry/mcp.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-# MCP servers available to agents.
-#
-# Auth headers are configured via env vars, never in this file:
-# MCP_HEADERS - default headers for every MCP server
-# MCP_{NAME}_HEADERS - per-server overrides ({NAME} = server name,
-# uppercased, non-alphanumerics replaced by "_")
-mcp_servers:
- - name: github-remote
- # TODO(oss): replace internal endpoint with a placeholder before the repo
- # goes public.
- url: https://internal.devtest.truefoundry.tech/api/llm/truefoundry/mcp/github-remote/server
diff --git a/packages/server/registry/models.yaml b/packages/server/registry/models.yaml
deleted file mode 100644
index 9079c5826..000000000
--- a/packages/server/registry/models.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-# Models reachable through the OpenAI-compatible gateway at base_url.
-#
-# Auth headers are configured via env vars, never in this file:
-# MODEL_API_KEY - default API key for base_url (required)
-# MODEL_{NAME}_API_KEY - per-model API key override
-# MODEL_HEADERS - extra default headers for every model
-# MODEL_{NAME}_HEADERS - per-model overrides ({NAME} = model name,
-# uppercased, non-alphanumerics replaced by "_")
-
-models:
- - name: claude-sonnet-4-6
- model_id: anthropic/claude-sonnet-4-6
- provider: generic
- base_url: https://internal.devtest.truefoundry.tech/api/llm
- max_output_tokens: 32768
- reasoning_efforts:
- - low
- - medium
- - high
diff --git a/packages/server/registry/skills.yaml b/packages/server/registry/skills.yaml
deleted file mode 100644
index b034051ff..000000000
--- a/packages/server/registry/skills.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-# Agent skills, each a directory with a SKILL.md in a public git repository.
-# url - public git repository
-# path - directory containing SKILL.md (optional, repo root if omitted)
-# ref - branch, tag, or commit SHA to pin (optional, default branch if omitted)
-# description - concise guidance for when to use the skill
-skills:
- - name: algorithmic-art
- url: https://github.com/anthropics/skills
- path: skills/algorithmic-art
- ref: main
- description: Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration.
diff --git a/packages/server/src/apis/turns.ts b/packages/server/src/apis/turns.ts
index 4e5353a0e..4dd6b2cc0 100644
--- a/packages/server/src/apis/turns.ts
+++ b/packages/server/src/apis/turns.ts
@@ -140,7 +140,7 @@ function createTurnResolver(deps: {
provider,
logger,
gitSkills,
- fileDownloadEnabled: spec.config?.sandbox?.file_downloads ?? false,
+ fileDownloadEnabled: spec.config.sandbox.file_downloads,
existingSandboxId,
tracing,
tenantName: TENANT_ID,
diff --git a/packages/server/src/runtime/sessionResources.ts b/packages/server/src/runtime/sessionResources.ts
index 8429656f4..525f83ea0 100644
--- a/packages/server/src/runtime/sessionResources.ts
+++ b/packages/server/src/runtime/sessionResources.ts
@@ -327,7 +327,7 @@ export async function validateAgentSpec({
}
}
- const wantsSandbox = spec.config?.sandbox?.enabled === true;
+ const wantsSandbox = spec.config.sandbox.enabled;
const hasSkills = requestedSkills.length > 0;
if (wantsSandbox || hasSkills) {
const record = await sandboxProviderStore.getSandboxProvider(tenant_id);
diff --git a/packages/server/tests/unit/apis/deletedSessionCrud.test.ts b/packages/server/tests/unit/apis/deletedSessionCrud.test.ts
index 3c00150e5..42f87783d 100644
--- a/packages/server/tests/unit/apis/deletedSessionCrud.test.ts
+++ b/packages/server/tests/unit/apis/deletedSessionCrud.test.ts
@@ -1,5 +1,5 @@
import { OpenAPIHono } from '@hono/zod-openapi';
-import { Sessions } from '@truefoundry/utils-core/agent-session';
+import { AgentSpecSchema, Sessions } from '@truefoundry/utils-core/agent-session';
import { RequestReplyRouter } from '@truefoundry/utils-core/request-reply';
import { createClient } from 'redis';
import { createLogger } from 'winston';
@@ -64,10 +64,10 @@ describe('public CRUD after session deletion', () => {
await sessionStore.createSession({
tenant_id: TENANT_ID,
session_id: 's1',
- agent_spec: {
+ agent_spec: AgentSpecSchema.parse({
model: { name: 'test-provider/test-model' },
instructions: 'test',
- },
+ }),
custom: null,
});
expect((await app.request('/s1', { method: 'DELETE' })).status).toBe(204);
diff --git a/packages/server/tests/unit/apis/turnStreamAfterDelete.test.ts b/packages/server/tests/unit/apis/turnStreamAfterDelete.test.ts
index da06b52c0..6324d8336 100644
--- a/packages/server/tests/unit/apis/turnStreamAfterDelete.test.ts
+++ b/packages/server/tests/unit/apis/turnStreamAfterDelete.test.ts
@@ -1,6 +1,6 @@
import { OpenAPIHono } from '@hono/zod-openapi';
import type { Sessions } from '@truefoundry/utils-core/agent-session';
-import { TurnNotFoundError } from '@truefoundry/utils-core/agent-session';
+import { AgentSpecSchema, TurnNotFoundError } from '@truefoundry/utils-core/agent-session';
import { createLogger } from 'winston';
import { createTurnsRouter } from '../../../src/apis/turns';
import { migrateSqliteToLatest } from '../../../src/db/migrateSqlite';
@@ -45,7 +45,7 @@ describe('turn SSE after session deletion', () => {
const sessions = {
get: () =>
Promise.resolve({
- agent_spec: { model: { name: 'test-provider/test-model' } },
+ agent_spec: AgentSpecSchema.parse({ model: { name: 'test-provider/test-model' } }),
record: { last_turn_id: null },
createTurn: () =>
Promise.resolve({