The open-source agent harness - the runtime layer that turns an LLM into a working agent.
Enable agent Clone via Save drawer for create-capable viewers (#794)
Govinda Vashishtha51127c4bb640
diff --git a/.changeset/agent-clone-drawer.md b/.changeset/agent-clone-drawer.mdnew file mode 100644index 000000000..206ecfb8a--- /dev/null+++ b/.changeset/agent-clone-drawer.md@@ -0,0 +1,5 @@+---+'@truefoundry/trueforge-ui': patch+---++Open Save Agent drawer on Clone with `{name}-clone` prefilled; stay on Agents list after save.diff --git a/.changeset/web-search-agent-spec.md b/.changeset/web-search-agent-spec.mdnew file mode 100644index 000000000..0e0bd1102--- /dev/null+++ b/.changeset/web-search-agent-spec.md@@ -0,0 +1,5 @@+---+'@truefoundry/trueforge-ui': minor+---++Gate `config.webSearch` on host capabilities: New Chat auto-enables with no toggle; New Agent / edit show a Runtime Config switch (default on when absent).diff --git a/packages/frontend/package.json b/packages/frontend/package.jsonindex 1ade47526..e62272db1 100644--- a/packages/frontend/package.json+++ b/packages/frontend/package.json@@ -26,7 +26,7 @@"@assistant-ui/core": "0.2.22","@assistant-ui/react": "0.14.27","@assistant-ui/store": "0.2.21",- "@truefoundry/assistant-ui-runtime": "0.1.41",+ "@truefoundry/assistant-ui-runtime": "0.1.43","@truefoundry/trueforge-sdk": "workspace:*","@truefoundry/trueforge-ui": "workspace:*","monaco-editor": "^0.52.0",diff --git a/packages/trueforge-ui/package.json b/packages/trueforge-ui/package.jsonindex 5b5cdd582..0acfaa74e 100644--- a/packages/trueforge-ui/package.json+++ b/packages/trueforge-ui/package.json@@ -95,7 +95,7 @@"@openuidev/react-headless": "^0.9.4","@openuidev/react-lang": "^0.2.9","@openuidev/react-ui": "^0.13.2",- "@truefoundry/assistant-ui-runtime": "0.1.41",+ "@truefoundry/assistant-ui-runtime": "0.1.43","@truefoundry/trueforge-sdk": "workspace:*","chart.js": "^4.5.1","clsx": "^2.1.1",diff --git a/packages/trueforge-ui/src/atoms/AgentOverflowMenu.tsx b/packages/trueforge-ui/src/atoms/AgentOverflowMenu.tsxindex 0f588ffab..cc96aa53c 100644--- a/packages/trueforge-ui/src/atoms/AgentOverflowMenu.tsx+++ b/packages/trueforge-ui/src/atoms/AgentOverflowMenu.tsx@@ -3,19 +3,23 @@import { useState } from 'react';import { useToasterOptional } from '../containers/ToasterContainer.js';+import { useCanCreateAgent } from '../hooks/useCanCreateAgent.js';import { Icon } from '../icons/Icon.js';import { useOptionalServer } from '../server/ServerContext.js';import { useOptionalShellMode } from '../server/ShellModeContext.js';import type { AgentSpec } from '../server/types.js';import { useSlot } from '../theme/SlotsProvider.js';+import { getErrorMessage } from '../utils/getErrorMessage.js';import { auiButtonClass } from './lib/buttonClasses.js';+import { cloneAgentSpec } from './lib/cloneAgentSpec.js';import { Button } from './primitives/Button.js';import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from './primitives/Dialog.js';import { DropdownMenu, DropdownMenuItem, DropdownMenuSeparator } from './primitives/DropdownMenu.js';+import { SideDrawer } from './primitives/SideDrawer.js';-/** Immutable clone name for a library agent (`{name}-copy`). */+/** Immutable clone name for a library agent (`{name}-clone`). */export function cloneAgentName(agentName: string): string {- return `${agentName}-copy`;+ return `${agentName}-clone`;}export type AgentOverflowMenuProps = {@@ -34,7 +38,7 @@ export type AgentOverflowMenuProps = {onDeleted?: () => void;};-type PendingAction = 'clone' | 'delete' | null;+const NO_CREATE_AGENT_PERMISSION_MESSAGE = 'No permission to create agents';export function AgentOverflowMenu({agentName,@@ -53,7 +57,15 @@ export function AgentOverflowMenu({const shell = useOptionalShellMode();const toaster = useToasterOptional();const PermissionGuard = useSlot('PermissionGuard');- const [pending, setPending] = useState<PendingAction>(null);+ const SaveAgentForm = useSlot('SaveAgentForm');+ const { canCreateAgent, loading: createAgentPermissionLoading } = useCanCreateAgent();+ const canCreate = canCreateAgent && !createAgentPermissionLoading;+ const [pendingDelete, setPendingDelete] = useState(false);+ const [cloneOpen, setCloneOpen] = useState(false);+ const [cloneName, setCloneName] = useState('');+ const [cloneDescription, setCloneDescription] = useState('');+ const [cloneSpec, setCloneSpec] = useState<AgentSpec | null>(null);+ const [cloneError, setCloneError] = useState<string | null>(null);const [busy, setBusy] = useState(false);const canEditOrClone = canMutate && agentSpec != null;@@ -61,31 +73,50 @@ export function AgentOverflowMenu({const showMenu = canEditOrClone || showManageSchedules || canMutate;if (!showMenu) return null;- const clonedName = cloneAgentName(agentName);-const closePending = () => {if (busy) return;- setPending(null);+ setPendingDelete(false);+ };++ const closeClone = () => {+ if (busy) return;+ setCloneOpen(false);+ setCloneSpec(null);+ setCloneError(null);};- const handleClone = async () => {- if (!canUse || builder == null || agentSpec == null) return;+ const openClone = () => {+ if (agentSpec == null || !canCreate) return;+ setCloneName(cloneAgentName(agentName));+ setCloneDescription(description?.trim() || agentName);+ setCloneSpec(cloneAgentSpec(agentSpec));+ setCloneError(null);+ setCloneOpen(true);+ };++ const handleCloneSave = async () => {+ if (!canCreate || builder == null || cloneSpec == null) return;+ const normalizedName = cloneName.trim();+ const normalizedDescription = cloneDescription.trim();+ if (!normalizedName || !normalizedDescription || !cloneSpec.model.name.trim()) return;setBusy(true);+ setCloneError(null);try {await builder.saveAgent({- agentName: clonedName,- ...(description === undefined ? {} : { description }),- agentSpec,+ agentName: normalizedName,+ description: normalizedDescription,+ agentSpec: cloneSpec,intent: 'create',});shell?.invalidateAgentsList();toaster?.showSuccess({title: 'Agent cloned',- description: `Created “${clonedName}”.`,+ description: `Created “${normalizedName}”.`,});- setPending(null);+ setCloneOpen(false);+ setCloneSpec(null);} catch (caught) {- toaster?.showError(caught);+ setCloneError(getErrorMessage(caught, 'Could not clone agent'));} finally {setBusy(false);}@@ -93,7 +124,7 @@ export function AgentOverflowMenu({const handleDelete = async () => {if (!canDelete || builder == null || typeof builder.deleteAgent !== 'function') return;- setPending(null);+ setPendingDelete(false);setBusy(true);try {await builder.deleteAgent({ agentName });@@ -139,11 +170,11 @@ export function AgentOverflowMenu({</PermissionGuard>) : null}{canEditOrClone ? (- <PermissionGuard allowed={canUse}>+ <PermissionGuard allowed={canCreate} deniedMessage={NO_CREATE_AGENT_PERMISSION_MESSAGE}><DropdownMenuItemclassName="whitespace-nowrap"onClick={() => {- if (canUse) setPending('clone');+ if (canCreate) openClone();}}><Icon name="clone" className="size-3.5" />@@ -171,7 +202,7 @@ export function AgentOverflowMenu({<DropdownMenuItemclassName="whitespace-nowrap text-failure-bg focus-visible:text-failure-bg"onClick={() => {- if (canDelete) setPending('delete');+ if (canDelete) setPendingDelete(true);}}><Icon name="trash" className="size-3.5" />@@ -182,32 +213,31 @@ export function AgentOverflowMenu({) : null}</DropdownMenu>- {pending === 'clone' ? (- <Dialog open onOpenChange={open => !open && closePending()} aria-label="Clone agent" className="max-w-md">- <DialogContent>- <DialogHeader>- <DialogTitle>Clone agent?</DialogTitle>- <p className="text-text-secondary text-sm">- This will create “{clonedName}” with the same configuration as “{agentName}”.- </p>- </DialogHeader>- </DialogContent>- <DialogFooter>- <Button.Secondary type="button" disabled={busy} onClick={closePending}>- Cancel- </Button.Secondary>- <Button.Primary- type="button"- disabled={busy || !canUse || builder == null}- onClick={() => void handleClone()}- >- Clone- </Button.Primary>- </DialogFooter>- </Dialog>- ) : null}+ <SideDrawer+ open={cloneOpen}+ onOpenChange={next => !next && closeClone()}+ title="Clone Agent"+ anchor="right"+ size="md"+ aria-label="Clone Agent"+ >+ {cloneSpec != null ? (+ <SaveAgentForm+ intent="create"+ name={cloneName}+ description={cloneDescription}+ spec={cloneSpec}+ saving={busy}+ error={cloneError}+ onNameChange={setCloneName}+ onDescriptionChange={setCloneDescription}+ onCancel={closeClone}+ onSave={() => void handleCloneSave()}+ />+ ) : null}+ </SideDrawer>- {pending === 'delete' ? (+ {pendingDelete ? (<Dialog open onOpenChange={open => !open && closePending()} aria-label="Delete agent" className="max-w-md"><DialogContent><DialogHeader>diff --git a/packages/trueforge-ui/src/atoms/SaveAgentButton.tsx b/packages/trueforge-ui/src/atoms/SaveAgentButton.tsxindex b4435789b..2ebef736c 100644--- a/packages/trueforge-ui/src/atoms/SaveAgentButton.tsx+++ b/packages/trueforge-ui/src/atoms/SaveAgentButton.tsx@@ -17,6 +17,7 @@ import type { AgentSpec } from '../server/types.js';import { useSlot } from '../theme/SlotsProvider.js';import { getErrorMessage } from '../utils/getErrorMessage.js';import { useOptionalAgentConfigInstructions } from './draft/AgentConfigInstructionsContext.js';+import { cloneAgentSpec } from './lib/cloneAgentSpec.js';import { Button } from './primitives/Button.js';import { SideDrawer } from './primitives/SideDrawer.js';@@ -24,19 +25,6 @@ const NO_CREATE_AGENT_PERMISSION_MESSAGE = 'No permission to create agents';type SaveIntent = 'create' | 'update';-function cloneAgentSpec(spec: AgentSpec): AgentSpec {- return {- ...spec,- model: {- ...spec.model,- params: spec.model.params ? { ...spec.model.params } : undefined,- },- mcpServers: spec.mcpServers?.map((item: object) => ({ ...item })),- skills: spec.skills?.map((item: object) => ({ ...item })),- config: spec.config ? { ...spec.config } : undefined,- };-}-export type SaveAgentButtonProps = {disabled?: boolean;className?: string;@@ -95,10 +83,7 @@ function SaveAgentButtonContent({const [saving, setSaving] = useState(false);const [error, setError] = useState<string | null>(null);- const isUpdateMode =- shell?.mode.status === 'active' &&- shell.mode.isMutable &&- (shell.mode.agentName !== undefined || shell.mode.agentId !== undefined);+ const isUpdateMode = shell?.mode.status === 'active' && shell.mode.isMutable && shell.mode.agentId !== undefined;const canCreate = canCreateAgent && !createAgentPermissionLoading;const canTrigger = isUpdateMode ? canManageAgent : canCreate;@@ -122,7 +107,7 @@ function SaveAgentButtonContent({const latestAgentSpec =instructionsDraft === undefined ? flushedAgentSpec : { ...flushedAgentSpec, instructions: instructionsDraft };const currentName = shell?.mode.status === 'active' ? (shell.mode.agentName ?? shell.mode.agentId ?? '') : '';- setIntent(currentName ? 'update' : 'create');+ setIntent(isUpdateMode ? 'update' : 'create');setName(currentName);setDescription(currentName && shell?.mode.status === 'active' ? (shell.mode.description ?? '') : '');setDraftSpec(cloneAgentSpec(latestAgentSpec));diff --git a/packages/trueforge-ui/src/atoms/agent-details/AgentOverview.tsx b/packages/trueforge-ui/src/atoms/agent-details/AgentOverview.tsxindex 2016322b6..dd2f39fbc 100644--- a/packages/trueforge-ui/src/atoms/agent-details/AgentOverview.tsx+++ b/packages/trueforge-ui/src/atoms/agent-details/AgentOverview.tsx@@ -2,6 +2,7 @@import { useState, type ComponentType } from 'react';import { Icon } from '../../icons/Icon.js';+import { useServerCapabilities } from '../../server/ServerContext.js';import { useSlot } from '../../theme/SlotsProvider.js';import { cn } from '../lib/cn.js';import { AgentOverviewMcpServers } from './AgentOverviewMcpServers.js';@@ -36,6 +37,7 @@ function displayModelName(name: string): string {export default function AgentOverview({ detail }: AgentOverviewProps) {const Markdown = useSlot('Markdown');const AgentOverviewCard = useSlot('AgentOverviewCard');+ const capabilitiesAvailable = useServerCapabilities();const [instructionsView, setInstructionsView] = useState<InstructionsView>('markdown');const [copied, setCopied] = useState(false);const spec = detail.agentSpec;@@ -58,6 +60,9 @@ export default function AgentOverview({ detail }: AgentOverviewProps) {['Generative UI', spec.config?.generativeUi?.enabled],['Dynamic sub-agents', spec.config?.dynamicSubAgents?.enabled],['Ask user questions', spec.config?.askUserQuestions?.enabled],+ ...(capabilitiesAvailable?.webSearch?.enabled === true+ ? ([['Web search', spec.config?.webSearch?.enabled]] as const)+ : []),].filter((entry): entry is [string, boolean] => typeof entry[1] === 'boolean');const toggleLabel = instructionsView === 'markdown' ? 'Raw' : 'Markdown';diff --git a/packages/trueforge-ui/src/atoms/draft/AgentConfigEditors.tsx b/packages/trueforge-ui/src/atoms/draft/AgentConfigEditors.tsxindex 7eb1d4e0c..4344c8b29 100644--- a/packages/trueforge-ui/src/atoms/draft/AgentConfigEditors.tsx+++ b/packages/trueforge-ui/src/atoms/draft/AgentConfigEditors.tsx@@ -22,6 +22,7 @@ export type AgentConfigEditorsProps = {error: string | null;skillsDisabled?: boolean;sandboxAvailable?: boolean;+ webSearchAvailable?: boolean;instructions?: string;onInstructionsSave?: (draft: AgentInstructionsDraft) => void;loadMcpConnector?: (connectorId: string) => Promise<ConnectorState | undefined>;@@ -41,6 +42,7 @@ export function AgentConfigEditors({error,skillsDisabled = false,sandboxAvailable = false,+ webSearchAvailable = false,instructions,onInstructionsSave,loadMcpConnector,@@ -229,6 +231,7 @@ export function AgentConfigEditors({openspec={spec}sandboxAvailable={sandboxAvailable}+ webSearchAvailable={webSearchAvailable}onChange={onChange}onClose={close}/>diff --git a/packages/trueforge-ui/src/atoms/draft/AgentConfigPanel.tsx b/packages/trueforge-ui/src/atoms/draft/AgentConfigPanel.tsxindex 93c06251c..56f73cb93 100644--- a/packages/trueforge-ui/src/atoms/draft/AgentConfigPanel.tsx+++ b/packages/trueforge-ui/src/atoms/draft/AgentConfigPanel.tsx@@ -34,6 +34,7 @@ export type AgentConfigPanelProps = {modelsError: string | null;skills?: AgentSkill[];skillsAvailable: boolean;+ webSearchAvailable?: boolean;instructions: string;onOpenEditor: (editor: AgentConfigEditor) => void;onChange?: (spec: AgentSpec) => void;@@ -283,6 +284,7 @@ export function AgentConfigPanel({modelsError,skills: catalogSkills = [],skillsAvailable,+ webSearchAvailable = false,instructions,onOpenEditor,onChange,@@ -298,7 +300,7 @@ export function AgentConfigPanel({const mcp = editableMountsFromSpec(spec.mcpServers);const skillMounts = editableMountsFromSpec(spec.skills);const modelParams = modelParamSummary(spec.model.params);- const runtimeConfig = runtimeConfigSummary(spec.config);+ const runtimeConfig = runtimeConfigSummary(spec.config, { webSearchAvailable });const instructionPreview = instructions.trim();const userMessageCount = initialUserMessagesFromSpec(spec).length;const modelInfo = [diff --git a/packages/trueforge-ui/src/atoms/draft/AgentRuntimeConfigDrawer.tsx b/packages/trueforge-ui/src/atoms/draft/AgentRuntimeConfigDrawer.tsxindex 8b39e2a61..6c2eef812 100644--- a/packages/trueforge-ui/src/atoms/draft/AgentRuntimeConfigDrawer.tsx+++ b/packages/trueforge-ui/src/atoms/draft/AgentRuntimeConfigDrawer.tsx@@ -8,6 +8,7 @@ export type AgentRuntimeConfigDrawerProps = {open: boolean;spec: AgentSpec;sandboxAvailable: boolean;+ webSearchAvailable?: boolean;onChange: (spec: AgentSpec) => void;onClose: () => void;};@@ -16,6 +17,7 @@ export function AgentRuntimeConfigDrawer({open,spec,sandboxAvailable,+ webSearchAvailable = false,onChange,onClose,}: AgentRuntimeConfigDrawerProps) {@@ -32,7 +34,12 @@ export function AgentRuntimeConfigDrawer({className="md:w-3xl"aria-label="Edit Runtime Config">- <AgentRuntimeEditorContent spec={spec} sandboxAvailable={sandboxAvailable} onChange={onChange} />+ <AgentRuntimeEditorContent+ spec={spec}+ sandboxAvailable={sandboxAvailable}+ webSearchAvailable={webSearchAvailable}+ onChange={onChange}+ /></SideDrawer>);}diff --git a/packages/trueforge-ui/src/atoms/draft/AgentRuntimeConfigFields.tsx b/packages/trueforge-ui/src/atoms/draft/AgentRuntimeConfigFields.tsxindex c7bb54240..e50fd8cdc 100644--- a/packages/trueforge-ui/src/atoms/draft/AgentRuntimeConfigFields.tsx+++ b/packages/trueforge-ui/src/atoms/draft/AgentRuntimeConfigFields.tsx@@ -9,6 +9,7 @@ import { Tooltip } from '../primitives/Tooltip.js';export type AgentRuntimeConfigFieldsProps = {value: AgentRuntimeConfig;sandboxAvailable: boolean;+ webSearchAvailable?: boolean;hasSkills: boolean;disabled?: boolean;showCapabilities?: boolean;@@ -42,6 +43,7 @@ type RuntimeSwitchField = {export function AgentRuntimeConfigFields({value,sandboxAvailable,+ webSearchAvailable = false,hasSkills,disabled = false,showCapabilities = true,@@ -70,6 +72,14 @@ export function AgentRuntimeConfigFields({];const sandboxEnabled = value.sandbox?.enabled ?? false;const compactionEnabled = value.contextManagement?.compaction?.enabled ?? true;+ const webSearchField: RuntimeSwitchField | null = webSearchAvailable+ ? {+ label: 'Web search',+ description: 'Allow the agent to search the web and fetch pages.',+ checked: value.webSearch?.enabled ?? true,+ update: enabled => ({ ...value, webSearch: { enabled } }),+ }+ : null;const sandboxField: RuntimeSwitchField = {label: 'Sandbox',description: 'Provide an isolated environment for code, files, and skills.',@@ -139,7 +149,7 @@ export function AgentRuntimeConfigFields({><div className={cn('flex w-full', className ?? 'items-center justify-between gap-3 py-1.5')}><span className="min-w-0">- <span className={cn('text-text-primary text-xs', layout === 'detailed' && 'block font-medium')}>+ <span className={cn('text-text-primary', layout === 'detailed' ? 'block text-sm font-medium' : 'text-xs')}>{field.label}</span>{layout === 'detailed' ? (@@ -157,11 +167,12 @@ export function AgentRuntimeConfigFields({);if (layout === 'detailed') {+ const rowClassName = 'items-center justify-between gap-4';return (- <div className="space-y-5">+ <div className="divide-y divide-border">{showCapabilities ? (// Stack below `md` so narrow bottom sheets retain usable control widths.- <div className="flex flex-col gap-3 border-b border-border pb-5 md:flex-row">+ <div className="flex flex-col gap-3 py-4 md:flex-row md:gap-4">{capabilityFields.map((field, index) =>switchField({field,@@ -169,16 +180,16 @@ export function AgentRuntimeConfigFields({wrapperClassName: cn('flex-1',index < capabilityFields.length - 1 &&- 'border-b border-border pb-3 md:border-b-0 md:border-r md:pb-0 md:pr-3',+ 'border-b border-border pb-4 md:border-b-0 md:border-r md:pb-0 md:pr-4',),}),)}</div>) : null}- <label className="flex items-center justify-between gap-4 border-b border-border py-3">- <span>+ <label className={cn('flex py-4', rowClassName)}>+ <span className="min-w-0"><span className="text-text-primary block text-sm font-medium">Iteration limit</span>- <span className="text-text-secondary mt-0.5 block text-xs">+ <span className="text-text-secondary mt-0.5 block text-xs leading-snug">Maximum agent-loop iterations for one turn.</span></span>@@ -188,60 +199,61 @@ export function AgentRuntimeConfigFields({max={1024}disabled={disabled}value={value.iterationLimit ?? 100}- className={auiInputClass('h-8 w-24 disabled:opacity-60')}+ className={auiInputClass('h-8 w-24 shrink-0 disabled:opacity-60')}onChange={event => {const iterationLimit = parseIterationLimit(event.target.value);if (iterationLimit !== null) onChange({ ...value, iterationLimit });}}/></label>- <div className="divide-y divide-border">- <section className="py-3">- {switchField({ field: sandboxField, className: 'items-center justify-between gap-4' })}- <div className={`mt-3 border-l-2 border-primary-button-bg/50 pl-3 ${sandboxEnabled ? '' : 'opacity-50'}`}>- {switchField({ field: fileDownloadsField, className: 'items-center justify-between gap-4' })}- </div>- </section>- <section className="py-3">- {switchField({ field: compactionField, className: 'items-center justify-between gap-4' })}- <label- className={`mt-3 flex items-center justify-between gap-4 border-l-2 border-primary-button-bg/50 pl-3 ${- compactionEnabled ? '' : 'opacity-50'- }`}- >- <span>- <span className="text-text-primary block text-xs font-medium">Compaction threshold tokens</span>- <span className="text-text-secondary mt-0.5 block text-xs">- Input-token threshold that triggers compaction.- </span>+ {webSearchField != null ? switchField({ field: webSearchField, className: cn('py-4', rowClassName) }) : null}+ <section className="py-4">+ {switchField({ field: sandboxField, className: rowClassName })}+ <div className={`mt-3 border-l-2 border-primary-button-bg/50 pl-3 ${sandboxEnabled ? '' : 'opacity-50'}`}>+ {switchField({ field: fileDownloadsField, className: rowClassName })}+ </div>+ </section>+ <section className="py-4">+ {switchField({ field: compactionField, className: rowClassName })}+ <label+ className={cn(+ 'mt-3 flex border-l-2 border-primary-button-bg/50 pl-3',+ rowClassName,+ compactionEnabled ? '' : 'opacity-50',+ )}+ >+ <span className="min-w-0">+ <span className="text-text-primary block text-sm font-medium">Compaction threshold tokens</span>+ <span className="text-text-secondary mt-0.5 block text-xs leading-snug">+ Input-token threshold that triggers compaction.</span>- <input- type="number"- min={1}- disabled={disabled || !compactionEnabled}- value={compactionThreshold}- className={auiInputClass('h-8 w-28 disabled:opacity-60')}- onChange={event => {- const threshold = parsePositiveInteger(event.target.value);- if (threshold === null) return;- onChange({- ...value,- contextManagement: {- ...value.contextManagement,- compaction: {- ...value.contextManagement?.compaction,- enabled: compactionEnabled,- trigger: { type: 'input_tokens', value: threshold },- },- largeToolResponse: value.contextManagement?.largeToolResponse ?? { enabled: true },+ </span>+ <input+ type="number"+ min={1}+ disabled={disabled || !compactionEnabled}+ value={compactionThreshold}+ className={auiInputClass('h-8 w-28 shrink-0 disabled:opacity-60')}+ onChange={event => {+ const threshold = parsePositiveInteger(event.target.value);+ if (threshold === null) return;+ onChange({+ ...value,+ contextManagement: {+ ...value.contextManagement,+ compaction: {+ ...value.contextManagement?.compaction,+ enabled: compactionEnabled,+ trigger: { type: 'input_tokens', value: threshold },},- });- }}- />- </label>- </section>- {switchField({ field: largeToolResponseField, className: 'items-center justify-between gap-4 py-3' })}- </div>+ largeToolResponse: value.contextManagement?.largeToolResponse ?? { enabled: true },+ },+ });+ }}+ />+ </label>+ </section>+ {switchField({ field: largeToolResponseField, className: cn('py-4', rowClassName) })}</div>);}@@ -263,7 +275,11 @@ export function AgentRuntimeConfigFields({}}/></label>- {[...runtimeFields, ...(showCapabilities ? capabilityFields : [])].map(field => switchField({ field }))}+ {[+ ...(webSearchField != null ? [webSearchField] : []),+ ...runtimeFields,+ ...(showCapabilities ? capabilityFields : []),+ ].map(field => switchField({ field }))}</div>);}diff --git a/packages/trueforge-ui/src/atoms/draft/AgentRuntimeEditorContent.tsx b/packages/trueforge-ui/src/atoms/draft/AgentRuntimeEditorContent.tsxindex 8a5075aea..8f0991854 100644--- a/packages/trueforge-ui/src/atoms/draft/AgentRuntimeEditorContent.tsx+++ b/packages/trueforge-ui/src/atoms/draft/AgentRuntimeEditorContent.tsx@@ -6,10 +6,16 @@ import { useSlot } from '../../theme/SlotsProvider.js';export type AgentRuntimeEditorContentProps = {spec: AgentSpec;sandboxAvailable: boolean;+ webSearchAvailable?: boolean;onChange: (spec: AgentSpec) => void;};-export function AgentRuntimeEditorContent({ spec, sandboxAvailable, onChange }: AgentRuntimeEditorContentProps) {+export function AgentRuntimeEditorContent({+ spec,+ sandboxAvailable,+ webSearchAvailable = false,+ onChange,+}: AgentRuntimeEditorContentProps) {const AgentRuntimeConfigFields = useSlot('AgentRuntimeConfigFields');return (@@ -17,6 +23,7 @@ export function AgentRuntimeEditorContent({ spec, sandboxAvailable, onChange }:<AgentRuntimeConfigFieldsvalue={spec.config ?? {}}sandboxAvailable={sandboxAvailable}+ webSearchAvailable={webSearchAvailable}hasSkills={(spec.skills?.length ?? 0) > 0}layout="detailed"onChange={config => onChange({ ...spec, config })}diff --git a/packages/trueforge-ui/src/atoms/draft/DraftSpecPreferenceBridge.tsx b/packages/trueforge-ui/src/atoms/draft/DraftSpecPreferenceBridge.tsxindex 110bb9c07..b5f9a7672 100644--- a/packages/trueforge-ui/src/atoms/draft/DraftSpecPreferenceBridge.tsx+++ b/packages/trueforge-ui/src/atoms/draft/DraftSpecPreferenceBridge.tsx@@ -3,7 +3,11 @@import { useTrueFoundryAgentSpec, useTrueFoundryUpdateAgentSpec } from '@truefoundry/assistant-ui-runtime';import { useEffect } from 'react';-import { type DraftPreferenceKind, withCapabilitiesSandbox } from '../../server/draftSpecPreferences.js';+import {+ type DraftPreferenceKind,+ withCapabilitiesSandbox,+ withCapabilitiesWebSearch,+} from '../../server/draftSpecPreferences.js';import { useServerCapabilities } from '../../server/ServerContext.js';import { useShellMode } from '../../server/ShellModeContext.js';import type { AgentSkill, AgentSpec, ConnectorState, ModelSelection } from '../../server/types.js';@@ -111,6 +115,19 @@ export function reconcileDraftSandbox({return nextSpec === agentSpec ? {} : { config: nextSpec.config };}+export function reconcileDraftWebSearch({+ agentSpec,+ webSearchEnabled,+ kind = 'agent',+}: {+ agentSpec: AgentSpec;+ webSearchEnabled: boolean | null | undefined;+ kind?: DraftPreferenceKind;+}): Partial<AgentSpec> {+ const nextSpec = withCapabilitiesWebSearch({ spec: agentSpec, webSearchEnabled, kind });+ return nextSpec === agentSpec ? {} : { config: nextSpec.config };+}+/*** Mirrors plain-draft composer choices into the shell seed and removes catalog* entries that disappeared since those choices were stored.@@ -122,9 +139,14 @@ export function DraftSpecPreferenceBridge() {const updateAgentSpec = useTrueFoundryUpdateAgentSpec();const capabilities = useServerCapabilities();const sandboxEnabled = capabilities?.sandbox.enabled;+ const webSearchEnabled = capabilities?.webSearch?.enabled;const { models, skills, connectors, loaded, error, ensureLoaded } = useDraftCatalog();- const isPlainDraft = mode.status === 'active' && mode.isMutable && mode.agentId == null && pendingSessionId == null;+ const isMutableDraft = mode.status === 'active' && mode.isMutable && pendingSessionId == null;+ const isPlainDraft = isMutableDraft && mode.agentId == null;const preferenceKind = mode.status === 'active' && mode.isMutable && mode.isCreateAgent ? 'agent' : 'chat';+ // New Chat forces on; New Agent + edit existing only fill when absent.+ const webSearchKind: DraftPreferenceKind =+ mode.status === 'active' && mode.isMutable && (mode.isCreateAgent || mode.agentId != null) ? 'agent' : 'chat';useEffect(() => {if (isPlainDraft) ensureLoaded();@@ -145,6 +167,15 @@ export function DraftSpecPreferenceBridge() {}}, [agentSpec, isPlainDraft, preferenceKind, sandboxEnabled, updateAgentSpec]);+ useEffect(() => {+ // Apply to New Chat / New Agent / edit-existing mutable drafts.+ if (!isMutableDraft || agentSpec == null || updateAgentSpec == null) return;+ const update = reconcileDraftWebSearch({ agentSpec, webSearchEnabled, kind: webSearchKind });+ if (Object.keys(update).length > 0) {+ updateAgentSpec(update);+ }+ }, [agentSpec, isMutableDraft, webSearchEnabled, webSearchKind, updateAgentSpec]);+useEffect(() => {if (!isPlainDraft || agentSpec == null || updateAgentSpec == null || !loaded || error != null) return;diff --git a/packages/trueforge-ui/src/atoms/draft/agentCapabilities.ts b/packages/trueforge-ui/src/atoms/draft/agentCapabilities.tsindex a00458360..25d9aea83 100644--- a/packages/trueforge-ui/src/atoms/draft/agentCapabilities.ts+++ b/packages/trueforge-ui/src/atoms/draft/agentCapabilities.ts@@ -4,12 +4,14 @@ export type AgentCapabilityValues = {generativeUi: boolean;dynamicSubAgents: boolean;askUserQuestions: boolean;+ webSearch: boolean;};export const DEFAULT_AGENT_CAPABILITIES: AgentCapabilityValues = {generativeUi: true,dynamicSubAgents: true,askUserQuestions: true,+ webSearch: true,};export function readAgentCapabilities(config?: AgentRuntimeConfig): AgentCapabilityValues {@@ -17,6 +19,7 @@ export function readAgentCapabilities(config?: AgentRuntimeConfig): AgentCapabilgenerativeUi: config?.generativeUi?.enabled ?? DEFAULT_AGENT_CAPABILITIES.generativeUi,dynamicSubAgents: config?.dynamicSubAgents?.enabled ?? DEFAULT_AGENT_CAPABILITIES.dynamicSubAgents,askUserQuestions: config?.askUserQuestions?.enabled ?? DEFAULT_AGENT_CAPABILITIES.askUserQuestions,+ webSearch: config?.webSearch?.enabled ?? DEFAULT_AGENT_CAPABILITIES.webSearch,};}@@ -32,5 +35,6 @@ export function withAgentCapabilities({generativeUi: { ...config?.generativeUi, enabled: values.generativeUi },dynamicSubAgents: { ...config?.dynamicSubAgents, enabled: values.dynamicSubAgents },askUserQuestions: { ...config?.askUserQuestions, enabled: values.askUserQuestions },+ webSearch: { ...config?.webSearch, enabled: values.webSearch },};}diff --git a/packages/trueforge-ui/src/atoms/draft/runtimeConfigSummary.ts b/packages/trueforge-ui/src/atoms/draft/runtimeConfigSummary.tsindex d2a8dd1d5..27f96237d 100644--- a/packages/trueforge-ui/src/atoms/draft/runtimeConfigSummary.ts+++ b/packages/trueforge-ui/src/atoms/draft/runtimeConfigSummary.ts@@ -14,7 +14,10 @@ export function runtimeConfigValueClassName(value: string): string {return value === 'off' ? 'text-failure-bg font-medium' : 'text-primary-button-bg font-medium';}-export function runtimeConfigSummary(config?: AgentRuntimeConfig): RuntimeConfigSummaryEntry[] {+export function runtimeConfigSummary(+ config?: AgentRuntimeConfig,+ { webSearchAvailable = false }: { webSearchAvailable?: boolean } = {},+): RuntimeConfigSummaryEntry[] {return [{ label: 'iteration limit', value: String(config?.iterationLimit ?? 100) },{ label: 'sandbox', value: enabledLabel(config?.sandbox?.enabled, false) },@@ -26,5 +29,6 @@ export function runtimeConfigSummary(config?: AgentRuntimeConfig): RuntimeConfig{ label: 'dynamic sub-agents', value: enabledLabel(config?.dynamicSubAgents?.enabled, true) },{ label: 'generative UI', value: enabledLabel(config?.generativeUi?.enabled, true) },{ label: 'ask user questions', value: enabledLabel(config?.askUserQuestions?.enabled, true) },+ ...(webSearchAvailable ? [{ label: 'web search', value: enabledLabel(config?.webSearch?.enabled, true) }] : []),];}diff --git a/packages/trueforge-ui/src/atoms/lib/cloneAgentSpec.ts b/packages/trueforge-ui/src/atoms/lib/cloneAgentSpec.tsnew file mode 100644index 000000000..4f2b5d8f7--- /dev/null+++ b/packages/trueforge-ui/src/atoms/lib/cloneAgentSpec.ts@@ -0,0 +1,15 @@+import type { AgentSpec } from '../../server/types.js';++/** Shallow-clone an agent spec for create/update draft forms. */+export function cloneAgentSpec(spec: AgentSpec): AgentSpec {+ return {+ ...spec,+ model: {+ ...spec.model,+ params: spec.model.params ? { ...spec.model.params } : undefined,+ },+ mcpServers: spec.mcpServers?.map((item: object) => ({ ...item })),+ skills: spec.skills?.map((item: object) => ({ ...item })),+ config: spec.config ? { ...spec.config } : undefined,+ };+}diff --git a/packages/trueforge-ui/src/atoms/schedules/SchedulesPage.tsx b/packages/trueforge-ui/src/atoms/schedules/SchedulesPage.tsxindex 609820a08..847f657ee 100644--- a/packages/trueforge-ui/src/atoms/schedules/SchedulesPage.tsx+++ b/packages/trueforge-ui/src/atoms/schedules/SchedulesPage.tsx@@ -428,7 +428,7 @@ export function SchedulesPage({ agentId }: SchedulesPageProps) {}><Icon name="plus" className="size-3.5" />- Create Schedule+ New Schedule</Button.Primary></>}diff --git a/packages/trueforge-ui/src/containers/AgentConfigDrawerContainer.tsx b/packages/trueforge-ui/src/containers/AgentConfigDrawerContainer.tsxindex 92e6f1229..668cdb46b 100644--- a/packages/trueforge-ui/src/containers/AgentConfigDrawerContainer.tsx+++ b/packages/trueforge-ui/src/containers/AgentConfigDrawerContainer.tsx@@ -148,6 +148,7 @@ export function AgentConfigDrawerContainer({ showClose = false }: { showClose?:modelsError={catalog.error}skills={catalog.skills}skillsAvailable={capabilities?.skill.enabled === true}+ webSearchAvailable={capabilities?.webSearch?.enabled === true}instructions={instructionDraft}onOpenEditor={nextEditor => {if (canManageAgent) setEditor(nextEditor);@@ -166,6 +167,7 @@ export function AgentConfigDrawerContainer({ showClose = false }: { showClose?:error={catalog.error}skillsDisabled={capabilities?.skill.enabled !== true}sandboxAvailable={capabilities?.sandbox.enabled === true}+ webSearchAvailable={capabilities?.webSearch?.enabled === true}instructions={instructionDraft}onInstructionsSave={saveInstructions}{...(server?.getMcpConnector === undefined ? {} : { loadMcpConnector })}diff --git a/packages/trueforge-ui/src/containers/SettingsBuilder/AddMcpServerForm.tsx b/packages/trueforge-ui/src/containers/SettingsBuilder/AddMcpServerForm.tsxindex 0bb099a28..6dbbcae97 100644--- a/packages/trueforge-ui/src/containers/SettingsBuilder/AddMcpServerForm.tsx+++ b/packages/trueforge-ui/src/containers/SettingsBuilder/AddMcpServerForm.tsx@@ -245,7 +245,7 @@ const AddMcpServerForm = ({ open, onOpenChange, onSubmit, connector, busy = falsonChange={event => {setApiKey(event.target.value);}}- placeholder="Paste the server token"+ placeholder="Bearer ..."className={inputClassName}/></div>diff --git a/packages/trueforge-ui/src/containers/useResolvedServer.ts b/packages/trueforge-ui/src/containers/useResolvedServer.tsindex c8f0cda15..dba8ec89b 100644--- a/packages/trueforge-ui/src/containers/useResolvedServer.ts+++ b/packages/trueforge-ui/src/containers/useResolvedServer.ts@@ -22,6 +22,7 @@ const DEFAULT_CAPABILITIES = {sandbox: { enabled: true },skill: { enabled: true },settings: { enabled: true },+ webSearch: { enabled: false },},} satisfies AgentBuilderCapabilitiesResponse;diff --git a/packages/trueforge-ui/src/hooks/useChatChromeActionsVisible.ts b/packages/trueforge-ui/src/hooks/useChatChromeActionsVisible.tsindex 62f3f4974..5cf671f21 100644--- a/packages/trueforge-ui/src/hooks/useChatChromeActionsVisible.ts+++ b/packages/trueforge-ui/src/hooks/useChatChromeActionsVisible.ts@@ -22,7 +22,7 @@ export function useNamedAgentHeaderState(): NamedAgentHeaderState | null {if (identity != null && identity.length > 0) {return {name: identity,- isEditing: shell.mode.isMutable,+ isEditing: shell.mode.isMutable && shell.mode.agentId != null,allowThreadTitle: false,};}diff --git a/packages/trueforge-ui/src/layouts/SidebarLayout.tsx b/packages/trueforge-ui/src/layouts/SidebarLayout.tsxindex 58f32be92..b5f5ca86e 100644--- a/packages/trueforge-ui/src/layouts/SidebarLayout.tsx+++ b/packages/trueforge-ui/src/layouts/SidebarLayout.tsx@@ -165,7 +165,7 @@ function SidebarRail({<SidebarNav /><footer className="flex shrink-0 flex-col items-center border-border p-2"><ShellActions labeled className="flex-col" />- <UserAvatar labeled className="mt-1" />+ <UserAvatar labeled className="mt-2 py-1.5" /></footer></aside>);diff --git a/packages/trueforge-ui/src/server/ShellModeContext.tsx b/packages/trueforge-ui/src/server/ShellModeContext.tsxindex 0d06fdf8f..510adcc3d 100644--- a/packages/trueforge-ui/src/server/ShellModeContext.tsx+++ b/packages/trueforge-ui/src/server/ShellModeContext.tsx@@ -8,6 +8,7 @@ import {readDraftSpecPreferences,selectDraftSpecPreferences,withCapabilitiesSandbox,+ withCapabilitiesWebSearch,writeDraftSpecPreferences,type DraftPreferenceKind,} from './draftSpecPreferences.js';@@ -515,19 +516,32 @@ export function ShellModeProvider({]);const sandboxEnabled = capabilities?.sandbox.enabled;+ const webSearchEnabled = capabilities?.webSearch?.enabled;const rememberDraftSpec = useCallback((agentSpec: AgentSpec, kind: DraftPreferenceKind = 'chat') => {const selected = selectDraftSpecPreferences(agentSpec, kind);- const preferences = kind === 'agent' ? withCapabilitiesSandbox(selected, sandboxEnabled) : selected;+ const withSandbox = kind === 'agent' ? withCapabilitiesSandbox(selected, sandboxEnabled) : selected;+ const preferences =+ kind === 'agent'+ ? withCapabilitiesWebSearch({+ spec: withSandbox,+ webSearchEnabled,+ kind: 'agent',+ })+ : withSandbox;if (kind === 'chat') {chatSeedRef.current = preferences;} else {// Keep the active builder intact in memory; storage remains limited to reusable preferences.- agentSeedRef.current = withCapabilitiesSandbox(agentSpec, sandboxEnabled);+ agentSeedRef.current = withCapabilitiesWebSearch({+ spec: withCapabilitiesSandbox(agentSpec, sandboxEnabled),+ webSearchEnabled,+ kind: 'agent',+ });}writeDraftSpecPreferences(kind, preferences);},- [sandboxEnabled],+ [sandboxEnabled, webSearchEnabled],);const openHistorySession = useCallback(diff --git a/packages/trueforge-ui/src/server/draftSpecPreferences.ts b/packages/trueforge-ui/src/server/draftSpecPreferences.tsindex 91ef4cfa3..9e7f38e78 100644--- a/packages/trueforge-ui/src/server/draftSpecPreferences.ts+++ b/packages/trueforge-ui/src/server/draftSpecPreferences.ts@@ -76,6 +76,12 @@ function readSandboxEnabled(spec: AgentSpec): boolean | undefined {return typeof enabled === 'boolean' ? enabled : undefined;}+function readWebSearchEnabled(spec: AgentSpec): boolean | undefined {+ if (spec.config?.webSearch === undefined) return undefined;+ const enabled = spec.config.webSearch.enabled;+ return typeof enabled === 'boolean' ? enabled : undefined;+}+/** Disable sandbox when unavailable; availability must not override the user's runtime choice. */export function withCapabilitiesSandbox(spec: AgentSpec, sandboxEnabled: boolean | null | undefined): AgentSpec {if (sandboxEnabled !== false || readSandboxEnabled(spec) === false) return spec;@@ -89,6 +95,56 @@ export function withCapabilitiesSandbox(spec: AgentSpec, sandboxEnabled: boolean};}+/**+ * Align `config.webSearch` with host capability.+ * - unavailable → force false+ * - chat + available → force true+ * - agent + available → fill true only when the key is absent (preserve explicit values)+ */+export function withCapabilitiesWebSearch({+ spec,+ webSearchEnabled,+ kind = 'agent',+}: {+ spec: AgentSpec;+ webSearchEnabled: boolean | null | undefined;+ kind?: DraftPreferenceKind;+}): AgentSpec {+ if (webSearchEnabled == null) return spec;++ if (webSearchEnabled === false) {+ if (readWebSearchEnabled(spec) === false) return spec;+ return {+ ...spec,+ config: {+ ...spec.config,+ webSearch: { ...spec.config?.webSearch, enabled: false },+ },+ };+ }++ if (kind === 'chat') {+ if (readWebSearchEnabled(spec) === true) return spec;+ return {+ ...spec,+ config: {+ ...spec.config,+ webSearch: { ...spec.config?.webSearch, enabled: true },+ },+ };+ }++ // Agent: only default true when the field is missing from the spec.+ if (spec.config?.webSearch !== undefined) return spec;+ return {+ ...spec,+ config: {+ ...spec.config,+ webSearch: { enabled: true },+ },+ };+}+function readStoredSpec(key: string): AgentSpec | null {if (typeof window === 'undefined') return null;try {diff --git a/packages/trueforge-ui/test/atoms/AgentsLibrary.test.tsx b/packages/trueforge-ui/test/atoms/AgentsLibrary.test.tsxindex 48d6bbf4e..19f1b8cb9 100644--- a/packages/trueforge-ui/test/atoms/AgentsLibrary.test.tsx+++ b/packages/trueforge-ui/test/atoms/AgentsLibrary.test.tsx@@ -1,5 +1,5 @@// @vitest-environment jsdom-import { fireEvent, render, screen, waitFor } from '@testing-library/react';+import { fireEvent, render, screen, waitFor, within } from '@testing-library/react';import type { ReactNode } from 'react';import { afterEach, beforeAll, describe, expect, it, vi } from 'vitest';@@ -242,9 +242,11 @@ describe('AgentsLibrary', () => {},]),permissions: {- listPermissions: vi.fn(async (): Promise<ListPermissionsResponse> => ({- data: { type: 'agent', permissions: { 'shared-id': ['USE'] } },- })),+ listPermissions: vi.fn(async ({ resourceType }): Promise<ListPermissionsResponse> =>+ resourceType === 'tenant'+ ? { data: { type: 'tenant', permissions: { agent: ['CREATE'] } } }+ : { data: { type: 'agent', permissions: { 'shared-id': ['USE'] } } },+ ),},sessions: createMockAgentSessionsServer(),schedules: createMockScheduleServer(),@@ -269,8 +271,42 @@ describe('AgentsLibrary', () => {});});- it('clones an agent after confirm and stays on the library', async () => {- const saveAgent = vi.fn(async () => ({ agentId: 'writer-copy-id' }));+ it('keeps Clone enabled without USE (read-only agent permissions)', async () => {+ const server = createMockAgentUIServer({+ searchAgents: vi.fn(async () => [+ {+ name: 'shared-agent',+ agentId: 'shared-id',+ agentSpec: { model: { name: 'openai/gpt-5' } },+ },+ ]),+ permissions: {+ listPermissions: vi.fn(async ({ resourceType }): Promise<ListPermissionsResponse> =>+ resourceType === 'tenant'+ ? { data: { type: 'tenant', permissions: { agent: ['CREATE'] } } }+ : { data: { type: 'agent', permissions: { 'shared-id': [] } } },+ ),+ },+ sessions: createMockAgentSessionsServer(),+ schedules: createMockScheduleServer(),+ });++ renderLibrary(<LibraryHarness />, {+ server,+ agentConfig: { mode: 'AgentLibraryWithComposer' },+ });+ fireEvent.click(screen.getByRole('button', { name: 'Open library' }));++ fireEvent.click(await screen.findByRole('button', { name: 'Actions for shared-agent' }));+ await waitFor(() => {+ expect(screen.getByRole('menuitem', { name: 'Edit' })).toBeDisabled();+ expect(screen.getByRole('menuitem', { name: 'Delete' })).toBeDisabled();+ });+ expect(screen.getByRole('menuitem', { name: 'Clone' })).toBeEnabled();+ });++ it('opens Clone Agent drawer on Clone, creates on save, and stays on the library', async () => {+ const saveAgent = vi.fn(async () => ({ agentId: 'writer-clone-id' }));const server = createMockAgentUIServer({searchAgents: vi.fn(async () => [{@@ -293,19 +329,25 @@ describe('AgentsLibrary', () => {fireEvent.click(await screen.findByRole('button', { name: 'Actions for writer' }));fireEvent.click(screen.getByRole('menuitem', { name: 'Clone' }));- expect(screen.getByRole('dialog', { name: 'Clone agent' })).toBeInTheDocument();- expect(screen.getByText(/This will create “writer-copy”/)).toBeInTheDocument();- fireEvent.click(screen.getByRole('button', { name: 'Clone' }));+ const drawer = await screen.findByRole('dialog', { name: 'Clone Agent' });+ expect(within(drawer).getByLabelText('Agent name')).toHaveValue('writer-clone');+ expect(within(drawer).getByLabelText('Description')).toHaveValue('Writes release notes.');+ expect(saveAgent).not.toHaveBeenCalled();++ fireEvent.click(within(drawer).getByRole('button', { name: 'Save changes' }));await waitFor(() => {expect(saveAgent).toHaveBeenCalledWith({- agentName: 'writer-copy',+ agentName: 'writer-clone',description: 'Writes release notes.',agentSpec: { model: { name: 'openai-main/gpt-4.1' } },intent: 'create',});});expect(screen.getByRole('heading', { name: 'Agents' })).toBeInTheDocument();+ await waitFor(() => {+ expect(screen.queryByRole('dialog', { name: 'Clone Agent' })).not.toBeInTheDocument();+ });});it('deletes an agent only after the confirmation dialog is accepted', async () => {diff --git a/packages/trueforge-ui/test/atoms/NamedAgentHeaderLabel.test.tsx b/packages/trueforge-ui/test/atoms/NamedAgentHeaderLabel.test.tsxindex 88fdc3521..53daa4a6f 100644--- a/packages/trueforge-ui/test/atoms/NamedAgentHeaderLabel.test.tsx+++ b/packages/trueforge-ui/test/atoms/NamedAgentHeaderLabel.test.tsx@@ -35,6 +35,25 @@ function SelectEditable() {);}+function SelectCloneDraft() {+ const shell = useShellMode();+ return (+ <button+ type="button"+ onClick={() =>+ shell.selectLibraryAgent({+ isMutable: true,+ isCreateAgent: true,+ agentName: 'reviewer-clone',+ agentSpec: { model: { name: 'openai/gpt-4.1' } },+ })+ }+ >+ clone+ </button>+ );+}+function OpenAgentBuilder() {const shell = useShellMode();return (@@ -101,6 +120,24 @@ describe('NamedAgentHeaderLabel', () => {expect(screen.getByRole('heading', { name: 'reviewer Editing' })).toBeInTheDocument();});+ it('shows the clone draft name without an Editing label', () => {+ render(+ <ShellModeProvider agentConfig={{ mode: 'AgentComposer' }}>+ <RuntimeHarness messages={[]}>+ <SelectCloneDraft />+ <NamedAgentHeaderLabel />+ </RuntimeHarness>+ </ShellModeProvider>,+ );++ act(() => {+ screen.getByRole('button', { name: 'clone' }).click();+ });++ expect(screen.getByRole('heading', { name: 'reviewer-clone' })).toBeInTheDocument();+ expect(screen.queryByText('Editing')).not.toBeInTheDocument();+ });+it('is hidden while idle, then appears after selecting a named agent', () => {render(<ShellModeProvider agentConfig={{ mode: 'AgentLibrary' }}>diff --git a/packages/trueforge-ui/test/atoms/SaveAgentButton.test.tsx b/packages/trueforge-ui/test/atoms/SaveAgentButton.test.tsxindex 63df30f3e..a513cae99 100644--- a/packages/trueforge-ui/test/atoms/SaveAgentButton.test.tsx+++ b/packages/trueforge-ui/test/atoms/SaveAgentButton.test.tsx@@ -131,6 +131,20 @@ function BoundMutableSaveButton({return <SaveAgentButton />;}+function CloneDraftSaveButton({ agentName, description }: { agentName: string; description?: string }) {+ const { selectLibraryAgent } = useShellMode();+ useEffect(() => {+ selectLibraryAgent({+ isMutable: true,+ isCreateAgent: true,+ agentName,+ ...(description === undefined ? {} : { description }),+ agentSpec,+ });+ }, [agentName, description, selectLibraryAgent]);+ return <SaveAgentButton />;+}+function SaveWithInstructionDraft() {const { onChange } = useAgentConfigInstructions();return (@@ -359,6 +373,26 @@ describe('SaveAgentButton', () => {);});+ it('treats a named create draft (clone) as Save Agent create, not update', async () => {+ const saveAgent = vi.fn(async (): Promise<SaveAgentResult> => ({ agentId: 'writer-clone-id' }));+ renderButton({+ saveAgent,+ children: <CloneDraftSaveButton agentName="writer-clone" description="Writes docs." />,+ });++ const trigger = await screen.findByRole('button', { name: 'Save Agent' });+ expect(screen.queryByRole('button', { name: 'Update Agent' })).not.toBeInTheDocument();+ fireEvent.click(trigger);+ const dialog = await screen.findByRole('dialog', { name: 'Save agent' });+ expect(within(dialog).getByLabelText('Agent name')).toHaveValue('writer-clone');+ expect(within(dialog).getByLabelText('Description')).toHaveValue('Writes docs.');+ fireEvent.click(within(dialog).getByRole('button', { name: 'Save changes' }));++ await waitFor(() =>+ expect(saveAgent).toHaveBeenCalledWith(expect.objectContaining({ agentName: 'writer-clone', intent: 'create' })),+ );+ });+it('discards drawer-only changes when closed', async () => {renderButton();fireEvent.click(screen.getByRole('button', { name: 'Save Agent' }));diff --git a/packages/trueforge-ui/test/atoms/draft/runtimeConfigSummary.test.ts b/packages/trueforge-ui/test/atoms/draft/runtimeConfigSummary.test.tsindex b4ab03f2e..035d70586 100644--- a/packages/trueforge-ui/test/atoms/draft/runtimeConfigSummary.test.ts+++ b/packages/trueforge-ui/test/atoms/draft/runtimeConfigSummary.test.ts@@ -1,6 +1,6 @@import { describe, expect, it } from 'vitest';-import { runtimeConfigValueClassName } from '@/atoms/draft/runtimeConfigSummary.js';+import { runtimeConfigSummary, runtimeConfigValueClassName } from '@/atoms/draft/runtimeConfigSummary.js';describe('runtimeConfigValueClassName', () => {it('uses destructive color for off', () => {@@ -12,3 +12,19 @@ describe('runtimeConfigValueClassName', () => {expect(runtimeConfigValueClassName('105')).toContain('text-primary-button-bg');});});++describe('runtimeConfigSummary', () => {+ it('omits web search when the host capability is unavailable', () => {+ expect(runtimeConfigSummary({ webSearch: { enabled: false } }).map(entry => entry.label)).not.toContain(+ 'web search',+ );+ });++ it('includes web search when the host capability is available', () => {+ expect(+ runtimeConfigSummary({ webSearch: { enabled: false } }, { webSearchAvailable: true }).find(+ entry => entry.label === 'web search',+ ),+ ).toEqual({ label: 'web search', value: 'off' });+ });+});diff --git a/packages/trueforge-ui/test/atoms/schedules/SchedulesPage.test.tsx b/packages/trueforge-ui/test/atoms/schedules/SchedulesPage.test.tsxindex 1f71e4e42..0ddc50053 100644--- a/packages/trueforge-ui/test/atoms/schedules/SchedulesPage.test.tsx+++ b/packages/trueforge-ui/test/atoms/schedules/SchedulesPage.test.tsx@@ -125,7 +125,7 @@ describe('SchedulesPage', () => {},});- expect(await screen.findByRole('button', { name: 'Create Schedule' })).toBeDisabled();+ expect(await screen.findByRole('button', { name: 'New Schedule' })).toBeDisabled();expect(await screen.findByRole('button', { name: 'Run now daily-digest' })).toBeDisabled();fireEvent.click(screen.getByRole('button', { name: 'Actions for daily-digest' }));await waitFor(() => {@@ -151,7 +151,7 @@ describe('SchedulesPage', () => {});await waitFor(() => {- expect(screen.getByRole('button', { name: 'Create Schedule' })).toBeEnabled();+ expect(screen.getByRole('button', { name: 'New Schedule' })).toBeEnabled();});expect(screen.getByRole('button', { name: 'Run now daily-digest' })).toBeDisabled();});@@ -167,7 +167,7 @@ describe('SchedulesPage', () => {permissions: { listPermissions },});- expect(await screen.findByRole('button', { name: 'Create Schedule' })).toBeEnabled();+ expect(await screen.findByRole('button', { name: 'New Schedule' })).toBeEnabled();expect(listPermissions).not.toHaveBeenCalledWith(expect.objectContaining({ resourceType: 'agent', resourceIds: expect.arrayContaining(['demo-agent']) }),);@@ -181,7 +181,7 @@ describe('SchedulesPage', () => {resourceType: 'agent',resourceIds: ['demo-agent'],});- expect(screen.getByRole('button', { name: 'Create Schedule' })).toBeDisabled();+ expect(screen.getByRole('button', { name: 'New Schedule' })).toBeDisabled();});});it('locks embedded schedules to the supplied agent', async () => {diff --git a/packages/trueforge-ui/test/containers/useResolvedServer.test.tsx b/packages/trueforge-ui/test/containers/useResolvedServer.test.tsxindex 018ca5af8..488284c55 100644--- a/packages/trueforge-ui/test/containers/useResolvedServer.test.tsx+++ b/packages/trueforge-ui/test/containers/useResolvedServer.test.tsx@@ -170,6 +170,7 @@ describe('useResolvedServer', () => {sandbox: { enabled: true },skill: { enabled: true },settings: { enabled: true },+ webSearch: { enabled: false },},});});diff --git a/packages/trueforge-ui/test/server/draftSpecPreferences.test.ts b/packages/trueforge-ui/test/server/draftSpecPreferences.test.tsindex ff57cbc93..7e432f230 100644--- a/packages/trueforge-ui/test/server/draftSpecPreferences.test.ts+++ b/packages/trueforge-ui/test/server/draftSpecPreferences.test.ts@@ -9,6 +9,7 @@ import {selectAgentDraftSpecPreferences,selectChatDraftSpecPreferences,withCapabilitiesSandbox,+ withCapabilitiesWebSearch,writeDraftSpecPreferences,} from '@/server/draftSpecPreferences.js';@@ -175,3 +176,57 @@ describe('withCapabilitiesSandbox', () => {expect(withCapabilitiesSandbox(spec, false)).toBe(spec);});});++describe('withCapabilitiesWebSearch', () => {+ it('forces false when the host capability is off', () => {+ expect(+ withCapabilitiesWebSearch({+ spec: { model: { name: 'model' }, config: { webSearch: { enabled: true } } },+ webSearchEnabled: false,+ kind: 'chat',+ }),+ ).toEqual({+ model: { name: 'model' },+ config: { webSearch: { enabled: false } },+ });+ });++ it('forces true for New Chat when the capability is on', () => {+ expect(+ withCapabilitiesWebSearch({+ spec: { model: { name: 'model' }, config: { webSearch: { enabled: false } } },+ webSearchEnabled: true,+ kind: 'chat',+ }),+ ).toEqual({+ model: { name: 'model' },+ config: { webSearch: { enabled: true } },+ });+ });++ it('fills true for New Agent when the field is absent', () => {+ expect(+ withCapabilitiesWebSearch({+ spec: { model: { name: 'model' } },+ webSearchEnabled: true,+ kind: 'agent',+ }),+ ).toEqual({+ model: { name: 'model' },+ config: { webSearch: { enabled: true } },+ });+ });++ it('preserves an explicit agent value when the capability is on', () => {+ const spec = { model: { name: 'model' }, config: { webSearch: { enabled: false } } };++ expect(withCapabilitiesWebSearch({ spec, webSearchEnabled: true, kind: 'agent' })).toBe(spec);+ });++ it('does not change the spec while capabilities are still loading', () => {+ const spec = { model: { name: 'model' } };++ expect(withCapabilitiesWebSearch({ spec, webSearchEnabled: undefined, kind: 'chat' })).toBe(spec);+ expect(withCapabilitiesWebSearch({ spec, webSearchEnabled: null, kind: 'agent' })).toBe(spec);+ });+});diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 9a2eb110c..8d15ba059 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -69,8 +69,8 @@ importers:specifier: 0.2.21version: 0.2.21(@assistant-ui/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected])'@truefoundry/assistant-ui-runtime':- specifier: 0.1.41- version: 0.1.41(@assistant-ui/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]([email protected](@opentelemetry/[email protected])))([email protected])([email protected](@opentelemetry/[email protected]))([email protected])([email protected](@types/[email protected])([email protected])([email protected]([email protected])))+ specifier: 0.1.43+ version: 0.1.43(@assistant-ui/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]([email protected](@opentelemetry/[email protected])))([email protected])([email protected](@opentelemetry/[email protected]))([email protected])([email protected](@types/[email protected])([email protected])([email protected]([email protected])))'@truefoundry/trueforge-sdk':specifier: workspace:*version: link:../trueforge-sdk@@ -372,8 +372,8 @@ importers:specifier: ^0.13.2version: 0.13.3(@openuidev/[email protected]([email protected])([email protected](@types/[email protected])([email protected])([email protected]([email protected]))))(@openuidev/[email protected](@modelcontextprotocol/[email protected]([email protected])([email protected]))([email protected])([email protected]))(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected]([email protected])))'@truefoundry/assistant-ui-runtime':- specifier: 0.1.41- version: 0.1.41(@assistant-ui/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]([email protected](@opentelemetry/[email protected])))([email protected])([email protected](@opentelemetry/[email protected]))([email protected])([email protected](@types/[email protected])([email protected])([email protected]([email protected])))+ specifier: 0.1.43+ version: 0.1.43(@assistant-ui/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]([email protected](@opentelemetry/[email protected])))([email protected])([email protected](@opentelemetry/[email protected]))([email protected])([email protected](@types/[email protected])([email protected])([email protected]([email protected])))'@truefoundry/trueforge-sdk':specifier: workspace:*version: link:../trueforge-sdk@@ -1083,6 +1083,12 @@ packages:cpu: [ppc64]os: [aix]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==}+ engines: {node: '>=18'}+ cpu: [ppc64]+ os: [aix]+'@esbuild/[email protected]':resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==}engines: {node: '>=18'}@@ -1101,6 +1107,12 @@ packages:cpu: [arm64]os: [android]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [android]+'@esbuild/[email protected]':resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==}engines: {node: '>=18'}@@ -1119,6 +1131,12 @@ packages:cpu: [arm]os: [android]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==}+ engines: {node: '>=18'}+ cpu: [arm]+ os: [android]+'@esbuild/[email protected]':resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==}engines: {node: '>=18'}@@ -1137,6 +1155,12 @@ packages:cpu: [x64]os: [android]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [android]+'@esbuild/[email protected]':resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==}engines: {node: '>=18'}@@ -1155,6 +1179,12 @@ packages:cpu: [arm64]os: [darwin]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [darwin]+'@esbuild/[email protected]':resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==}engines: {node: '>=18'}@@ -1173,6 +1203,12 @@ packages:cpu: [x64]os: [darwin]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [darwin]+'@esbuild/[email protected]':resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==}engines: {node: '>=18'}@@ -1191,6 +1227,12 @@ packages:cpu: [arm64]os: [freebsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [freebsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==}engines: {node: '>=18'}@@ -1209,6 +1251,12 @@ packages:cpu: [x64]os: [freebsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [freebsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==}engines: {node: '>=18'}@@ -1227,6 +1275,12 @@ packages:cpu: [arm64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==}engines: {node: '>=18'}@@ -1245,6 +1299,12 @@ packages:cpu: [arm]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==}+ engines: {node: '>=18'}+ cpu: [arm]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==}engines: {node: '>=18'}@@ -1263,6 +1323,12 @@ packages:cpu: [ia32]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==}+ engines: {node: '>=18'}+ cpu: [ia32]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==}engines: {node: '>=18'}@@ -1281,6 +1347,12 @@ packages:cpu: [loong64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==}+ engines: {node: '>=18'}+ cpu: [loong64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==}engines: {node: '>=18'}@@ -1299,6 +1371,12 @@ packages:cpu: [mips64el]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==}+ engines: {node: '>=18'}+ cpu: [mips64el]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==}engines: {node: '>=18'}@@ -1317,6 +1395,12 @@ packages:cpu: [ppc64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==}+ engines: {node: '>=18'}+ cpu: [ppc64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==}engines: {node: '>=18'}@@ -1335,6 +1419,12 @@ packages:cpu: [riscv64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==}+ engines: {node: '>=18'}+ cpu: [riscv64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==}engines: {node: '>=18'}@@ -1353,6 +1443,12 @@ packages:cpu: [s390x]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==}+ engines: {node: '>=18'}+ cpu: [s390x]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==}engines: {node: '>=18'}@@ -1371,6 +1467,12 @@ packages:cpu: [x64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==}engines: {node: '>=18'}@@ -1389,6 +1491,12 @@ packages:cpu: [arm64]os: [netbsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [netbsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==}engines: {node: '>=18'}@@ -1407,6 +1515,12 @@ packages:cpu: [x64]os: [netbsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [netbsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==}engines: {node: '>=18'}@@ -1425,6 +1539,12 @@ packages:cpu: [arm64]os: [openbsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [openbsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==}engines: {node: '>=18'}@@ -1443,6 +1563,12 @@ packages:cpu: [x64]os: [openbsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [openbsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==}engines: {node: '>=18'}@@ -1461,6 +1587,12 @@ packages:cpu: [arm64]os: [openharmony]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [openharmony]+'@esbuild/[email protected]':resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==}engines: {node: '>=18'}@@ -1479,6 +1611,12 @@ packages:cpu: [x64]os: [sunos]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [sunos]+'@esbuild/[email protected]':resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==}engines: {node: '>=18'}@@ -1497,6 +1635,12 @@ packages:cpu: [arm64]os: [win32]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==}+ engines: {node: '>=18'}+ cpu: [arm64]+ os: [win32]+'@esbuild/[email protected]':resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==}engines: {node: '>=18'}@@ -1515,6 +1659,12 @@ packages:cpu: [ia32]os: [win32]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==}+ engines: {node: '>=18'}+ cpu: [ia32]+ os: [win32]+'@esbuild/[email protected]':resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==}engines: {node: '>=18'}@@ -1533,6 +1683,12 @@ packages:cpu: [x64]os: [win32]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==}+ engines: {node: '>=18'}+ cpu: [x64]+ os: [win32]+'@esbuild/[email protected]':resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==}engines: {node: '>=18'}@@ -3498,8 +3654,8 @@ packages:'@types/react-dom':optional: true- '@truefoundry/[email protected]':- resolution: {integrity: sha512-fXHbeSpF3TCbbx562VkC/zddV5UZxYNiWMx5Y73f3mQEguZlSQueNcu6IZz8p6Wt9Q/fyAWO8cJa3iD8SNjsVQ==}+ '@truefoundry/[email protected]':+ resolution: {integrity: sha512-Jlqyjs9S60Az6o/gVWX4k7v7O0e5z+6+dke6cdOSdDcJNv4ChCnoepPqZ5nYzGWL0bwg5udar6WhQZMUqQ6Idw==}peerDependencies:'@types/react': '*'react: ^18 || ^19@@ -4678,6 +4834,11 @@ packages:engines: {node: '>=18'}hasBin: true+ resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==}+ engines: {node: '>=18'}+ hasBin: true+resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==}engines: {node: '>=18'}@@ -8345,6 +8506,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8354,6 +8518,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8363,6 +8530,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8372,6 +8542,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8381,6 +8554,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8390,6 +8566,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8399,6 +8578,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8408,6 +8590,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8417,6 +8602,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8426,6 +8614,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8435,6 +8626,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8444,6 +8638,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8453,6 +8650,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8462,6 +8662,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8471,6 +8674,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8480,6 +8686,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8489,6 +8698,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8498,6 +8710,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8507,6 +8722,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8516,6 +8734,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8525,6 +8746,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8534,6 +8758,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8543,6 +8770,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8552,6 +8782,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8561,6 +8794,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -8570,6 +8806,9 @@ snapshots:'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -10678,7 +10917,7 @@ snapshots:'@types/react': 19.2.18'@types/react-dom': 19.2.5(@types/[email protected])- '@truefoundry/[email protected](@assistant-ui/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]([email protected](@opentelemetry/[email protected])))([email protected])([email protected](@opentelemetry/[email protected]))([email protected])([email protected](@types/[email protected])([email protected])([email protected]([email protected])))':+ '@truefoundry/[email protected](@assistant-ui/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]([email protected](@opentelemetry/[email protected])))([email protected])([email protected](@opentelemetry/[email protected]))([email protected])([email protected](@types/[email protected])([email protected])([email protected]([email protected])))':dependencies:'@assistant-ui/core': 0.2.22(@assistant-ui/[email protected](@assistant-ui/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]))(@assistant-ui/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected]([email protected](@opentelemetry/[email protected])))([email protected])([email protected](@opentelemetry/[email protected]))([email protected](@types/[email protected])([email protected])([email protected]([email protected])))'@assistant-ui/store': 0.2.21(@assistant-ui/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected])@@ -10868,10 +11107,10 @@ snapshots:transitivePeerDependencies:- supports-color- '@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected]([email protected])([email protected]))([email protected])([email protected]))([email protected]([email protected])([email protected]))([email protected])([email protected])':+ '@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected]([email protected])([email protected]))([email protected])([email protected]))([email protected]([email protected])([email protected]))([email protected])([email protected])':dependencies:'@eslint-community/regexpp': 4.12.2- '@typescript-eslint/parser': 8.68.0([email protected]([email protected])([email protected]))([email protected])([email protected])+ '@typescript-eslint/parser': 8.68.0([email protected]([email protected])([email protected]))([email protected])([email protected])'@typescript-eslint/scope-manager': 8.68.0'@typescript-eslint/type-utils': 8.68.0([email protected]([email protected])([email protected]))([email protected])([email protected])'@typescript-eslint/utils': 8.68.0([email protected]([email protected])([email protected]))([email protected])([email protected])@@ -11939,6 +12178,35 @@ snapshots:'@esbuild/win32-ia32': 0.27.7'@esbuild/win32-x64': 0.27.7+ optionalDependencies:+ '@esbuild/aix-ppc64': 0.28.1+ '@esbuild/android-arm': 0.28.1+ '@esbuild/android-arm64': 0.28.1+ '@esbuild/android-x64': 0.28.1+ '@esbuild/darwin-arm64': 0.28.1+ '@esbuild/darwin-x64': 0.28.1+ '@esbuild/freebsd-arm64': 0.28.1+ '@esbuild/freebsd-x64': 0.28.1+ '@esbuild/linux-arm': 0.28.1+ '@esbuild/linux-arm64': 0.28.1+ '@esbuild/linux-ia32': 0.28.1+ '@esbuild/linux-loong64': 0.28.1+ '@esbuild/linux-mips64el': 0.28.1+ '@esbuild/linux-ppc64': 0.28.1+ '@esbuild/linux-riscv64': 0.28.1+ '@esbuild/linux-s390x': 0.28.1+ '@esbuild/linux-x64': 0.28.1+ '@esbuild/netbsd-arm64': 0.28.1+ '@esbuild/netbsd-x64': 0.28.1+ '@esbuild/openbsd-arm64': 0.28.1+ '@esbuild/openbsd-x64': 0.28.1+ '@esbuild/openharmony-arm64': 0.28.1+ '@esbuild/sunos-x64': 0.28.1+ '@esbuild/win32-arm64': 0.28.1+ '@esbuild/win32-ia32': 0.28.1+ '@esbuild/win32-x64': 0.28.1+optionalDependencies:'@esbuild/aix-ppc64': 0.28.2@@ -11967,6 +12235,7 @@ snapshots:'@esbuild/win32-arm64': 0.28.2'@esbuild/win32-ia32': 0.28.2'@esbuild/win32-x64': 0.28.2+ optional: true@@ -15046,7 +15315,7 @@ snapshots:dependencies:- esbuild: 0.28.2+ esbuild: 0.28.1optionalDependencies:fsevents: 2.3.3@@ -15081,7 +15350,7 @@ snapshots:[email protected]([email protected]([email protected])([email protected]))([email protected])([email protected]):dependencies:- '@typescript-eslint/eslint-plugin': 8.68.0(@typescript-eslint/[email protected]([email protected]([email protected])([email protected]))([email protected])([email protected]))([email protected]([email protected])([email protected]))([email protected])([email protected])+ '@typescript-eslint/eslint-plugin': 8.68.0(@typescript-eslint/[email protected]([email protected]([email protected])([email protected]))([email protected])([email protected]))([email protected]([email protected])([email protected]))([email protected])([email protected])'@typescript-eslint/parser': 8.68.0([email protected]([email protected])([email protected]))([email protected])([email protected])'@typescript-eslint/typescript-estree': 8.68.0([email protected])([email protected])'@typescript-eslint/utils': 8.68.0([email protected]([email protected])([email protected]))([email protected])([email protected])