@truefoundry/trueforge-ui 0.3.0-rc.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +181 -4
- package/dist/{AgentCodeSnippets-ARHIK2T6.js → AgentCodeSnippets-EK7KMIY2.js} +7 -7
- package/dist/AgentMetricChart-UZCYOC4M.js +15 -0
- package/dist/AgentOverview-5UPMYHT2.js +314 -0
- package/dist/AgentOverview-5UPMYHT2.js.map +1 -0
- package/dist/{AgentSessionEventTimeline-7QM7QKIQ.js → AgentSessionEventTimeline-V6NPCYMW.js} +7 -7
- package/dist/{AgentSessionEventTimelineChart-PIDYWLYT.js → AgentSessionEventTimelineChart-YQWZBQCG.js} +7 -7
- package/dist/{AgentSessions-MR2DREKN.js → AgentSessions-WNYVVB6Q.js} +81 -16
- package/dist/AgentSessions-WNYVVB6Q.js.map +1 -0
- package/dist/{ConnectorSettings-YBGANZOG.js → ConnectorSettings-O4I24244.js} +12 -10
- package/dist/ConnectorSettings-O4I24244.js.map +1 -0
- package/dist/{DockLayout-O5TS4YZH.js → DockLayout-JMBZVMGB.js} +10 -10
- package/dist/{DrawerLayout-7R3XONK2.js → DrawerLayout-E6G3IF6R.js} +11 -11
- package/dist/{ModelSettings-UXPL4E6X.js → ModelSettings-ZVXMXIU4.js} +7 -7
- package/dist/OpenUiFenceBlock-F3YVDKAG.js +9 -0
- package/dist/{SandboxSettings-5MMPJHBH.js → SandboxSettings-H6BA2DJQ.js} +7 -7
- package/dist/SchedulesPage-FS2QZ5KB.js +15 -0
- package/dist/{SettingsBuilder-JAP4QGMY.js → SettingsBuilder-VA3VGWZC.js} +8 -8
- package/dist/{ShellRouteSync-SJXFKUAJ.js → ShellRouteSync-ZT4PBE6T.js} +4 -4
- package/dist/{SidebarLayout-MYZTVWWE.js → SidebarLayout-ICXEN7ZL.js} +13 -13
- package/dist/SidebarLayout-ICXEN7ZL.js.map +1 -0
- package/dist/{SkillSettings-6C5PH3NN.js → SkillSettings-F5JGGFXR.js} +7 -7
- package/dist/{TrueForgeUIWithRouter-3J5G62O5.js → TrueForgeUIWithRouter-MKJ7IEWG.js} +9 -9
- package/dist/{WidgetLayout-24ZL3QWT.js → WidgetLayout-J7ZRW3V3.js} +10 -10
- package/dist/{chunk-JTQU2N2Q.js → chunk-7VWUB5OV.js} +7 -5
- package/dist/{chunk-JTQU2N2Q.js.map → chunk-7VWUB5OV.js.map} +1 -1
- package/dist/{chunk-RI6TIYWL.js → chunk-BREN6OSX.js} +38 -14
- package/dist/chunk-BREN6OSX.js.map +1 -0
- package/dist/{chunk-2QTH6JHX.js → chunk-JEAULQNF.js} +3 -3
- package/dist/{chunk-3ZW74FHC.js → chunk-KDCVFHPZ.js} +23 -19
- package/dist/chunk-KDCVFHPZ.js.map +1 -0
- package/dist/{chunk-4OEAJKLJ.js → chunk-KZK2PQ4A.js} +2356 -1840
- package/dist/chunk-KZK2PQ4A.js.map +1 -0
- package/dist/{chunk-JF4IELMW.js → chunk-MB7Z5FPI.js} +9 -9
- package/dist/{chunk-UBQYRCCH.js → chunk-MEW7WZ7Q.js} +6 -6
- package/dist/chunk-NXK4XW4U.js +587 -0
- package/dist/chunk-NXK4XW4U.js.map +1 -0
- package/dist/{chunk-JKUYG6HV.js → chunk-QI4HGU5E.js} +7 -7
- package/dist/chunk-QI4HGU5E.js.map +1 -0
- package/dist/{chunk-FEHL45EB.js → chunk-SCIEO6CF.js} +2 -2
- package/dist/{chunk-2GIZY3JJ.js → chunk-U7WONUMR.js} +55 -4
- package/dist/chunk-U7WONUMR.js.map +1 -0
- package/dist/{chunk-T6QQV5LK.js → chunk-UN7WPTTK.js} +2 -2
- package/dist/{chunk-MACHU4OO.js → chunk-VTOW2UIX.js} +4 -4
- package/dist/{chunk-CG75X77Q.js → chunk-WFIA627Q.js} +2 -2
- package/dist/index.d.ts +37 -8
- package/dist/index.js +16 -12
- package/dist/index.js.map +1 -1
- package/dist/plugins/trueforge-agent-server-adapter/index.d.ts +10 -3
- package/dist/plugins/trueforge-agent-server-adapter/index.js +37 -12
- package/dist/plugins/trueforge-agent-server-adapter/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/dist/AgentMetricChart-ZQIRBCZL.js +0 -15
- package/dist/AgentOverview-7GJJV2OU.js +0 -169
- package/dist/AgentOverview-7GJJV2OU.js.map +0 -1
- package/dist/AgentSessions-MR2DREKN.js.map +0 -1
- package/dist/ConnectorSettings-YBGANZOG.js.map +0 -1
- package/dist/OpenUiFenceBlock-KPZFLUSC.js +0 -9
- package/dist/SchedulesPage-5XZRDA5O.js +0 -15
- package/dist/SidebarLayout-MYZTVWWE.js.map +0 -1
- package/dist/chunk-2GIZY3JJ.js.map +0 -1
- package/dist/chunk-3ZW74FHC.js.map +0 -1
- package/dist/chunk-4OEAJKLJ.js.map +0 -1
- package/dist/chunk-JCL3Q7RW.js +0 -587
- package/dist/chunk-JCL3Q7RW.js.map +0 -1
- package/dist/chunk-JKUYG6HV.js.map +0 -1
- package/dist/chunk-RI6TIYWL.js.map +0 -1
- /package/dist/{AgentCodeSnippets-ARHIK2T6.js.map → AgentCodeSnippets-EK7KMIY2.js.map} +0 -0
- /package/dist/{AgentMetricChart-ZQIRBCZL.js.map → AgentMetricChart-UZCYOC4M.js.map} +0 -0
- /package/dist/{AgentSessionEventTimeline-7QM7QKIQ.js.map → AgentSessionEventTimeline-V6NPCYMW.js.map} +0 -0
- /package/dist/{AgentSessionEventTimelineChart-PIDYWLYT.js.map → AgentSessionEventTimelineChart-YQWZBQCG.js.map} +0 -0
- /package/dist/{DockLayout-O5TS4YZH.js.map → DockLayout-JMBZVMGB.js.map} +0 -0
- /package/dist/{DrawerLayout-7R3XONK2.js.map → DrawerLayout-E6G3IF6R.js.map} +0 -0
- /package/dist/{ModelSettings-UXPL4E6X.js.map → ModelSettings-ZVXMXIU4.js.map} +0 -0
- /package/dist/{OpenUiFenceBlock-KPZFLUSC.js.map → OpenUiFenceBlock-F3YVDKAG.js.map} +0 -0
- /package/dist/{SandboxSettings-5MMPJHBH.js.map → SandboxSettings-H6BA2DJQ.js.map} +0 -0
- /package/dist/{SchedulesPage-5XZRDA5O.js.map → SchedulesPage-FS2QZ5KB.js.map} +0 -0
- /package/dist/{SettingsBuilder-JAP4QGMY.js.map → SettingsBuilder-VA3VGWZC.js.map} +0 -0
- /package/dist/{ShellRouteSync-SJXFKUAJ.js.map → ShellRouteSync-ZT4PBE6T.js.map} +0 -0
- /package/dist/{SkillSettings-6C5PH3NN.js.map → SkillSettings-F5JGGFXR.js.map} +0 -0
- /package/dist/{TrueForgeUIWithRouter-3J5G62O5.js.map → TrueForgeUIWithRouter-MKJ7IEWG.js.map} +0 -0
- /package/dist/{WidgetLayout-24ZL3QWT.js.map → WidgetLayout-J7ZRW3V3.js.map} +0 -0
- /package/dist/{chunk-2QTH6JHX.js.map → chunk-JEAULQNF.js.map} +0 -0
- /package/dist/{chunk-JF4IELMW.js.map → chunk-MB7Z5FPI.js.map} +0 -0
- /package/dist/{chunk-UBQYRCCH.js.map → chunk-MEW7WZ7Q.js.map} +0 -0
- /package/dist/{chunk-FEHL45EB.js.map → chunk-SCIEO6CF.js.map} +0 -0
- /package/dist/{chunk-T6QQV5LK.js.map → chunk-UN7WPTTK.js.map} +0 -0
- /package/dist/{chunk-MACHU4OO.js.map → chunk-VTOW2UIX.js.map} +0 -0
- /package/dist/{chunk-CG75X77Q.js.map → chunk-WFIA627Q.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/server/ServerContext.tsx","../src/utils/sessionShareUrl.ts","../src/server/serverChrome.ts","../src/server/ShellModeContext.tsx","../src/server/draftSpecPreferences.ts","../src/utils/getErrorMessage.ts"],"sourcesContent":["'use client';\n\nimport { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, type ReactNode } from 'react';\n\nimport type {\n AgentBuilderCapabilitiesResponse,\n AgentMetricsServer,\n AgentSessionsServer,\n AgentUIServer,\n CatalogServer,\n PermissionsServer,\n ScheduleServer,\n} from './types.js';\n\nconst ServerContext = createContext<AgentUIServer | null>(null);\nconst ServerCapabilitiesContext = createContext<{\n capabilities: AgentBuilderCapabilitiesResponse['data'] | null;\n settled: boolean;\n refresh: () => void;\n} | null>(null);\n\nexport function ServerProvider({ server, children }: { server: AgentUIServer; children: ReactNode }) {\n const [capabilities, setCapabilities] = useState<AgentBuilderCapabilitiesResponse['data'] | null>(null);\n const [capabilitiesSettled, setCapabilitiesSettled] = useState(false);\n const cancelActiveRequestRef = useRef<(() => void) | null>(null);\n const refreshCapabilities = useCallback(() => {\n cancelActiveRequestRef.current?.();\n let cancelled = false;\n cancelActiveRequestRef.current = () => {\n cancelled = true;\n };\n void server\n .getCapabilities()\n .then(response => {\n if (!cancelled) setCapabilities(response.data);\n })\n .catch(() => {\n // Preserve the last known capabilities when a refresh fails.\n })\n .finally(() => {\n if (!cancelled) setCapabilitiesSettled(true);\n });\n }, [server]);\n\n useEffect(() => {\n setCapabilities(null);\n setCapabilitiesSettled(false);\n refreshCapabilities();\n return () => {\n cancelActiveRequestRef.current?.();\n };\n }, [refreshCapabilities]);\n\n const capabilitiesValue = useMemo(\n () => ({ capabilities, settled: capabilitiesSettled, refresh: refreshCapabilities }),\n [capabilities, capabilitiesSettled, refreshCapabilities],\n );\n\n return (\n <ServerContext.Provider value={server}>\n <ServerCapabilitiesContext.Provider value={capabilitiesValue}>{children}</ServerCapabilitiesContext.Provider>\n </ServerContext.Provider>\n );\n}\n\nexport function useServer(): AgentUIServer {\n const server = useContext(ServerContext);\n if (server == null) {\n throw new Error('useServer must be used within a ServerProvider.');\n }\n return server;\n}\n\nexport function useOptionalServer(): AgentUIServer | null {\n return useContext(ServerContext);\n}\n\nexport function useServerCapabilities(): AgentBuilderCapabilitiesResponse['data'] | null {\n return useContext(ServerCapabilitiesContext)?.capabilities ?? null;\n}\n\nexport function useServerCapabilitiesSettled(): boolean {\n return useContext(ServerCapabilitiesContext)?.settled ?? false;\n}\n\nexport function useOptionalRefreshServerCapabilities(): (() => void) | null {\n return useContext(ServerCapabilitiesContext)?.refresh ?? null;\n}\n\nexport function useCatalogServer(): CatalogServer {\n const server = useServer();\n if (server.catalog == null) {\n throw new Error('useCatalogServer requires AgentUIServer.catalog. Pass catalog to createTrueFoundryServer.');\n }\n return server.catalog;\n}\n\nexport function useOptionalCatalogServer(): CatalogServer | null {\n return useOptionalServer()?.catalog ?? null;\n}\n\nexport function useAgentSessionsServer(): AgentSessionsServer {\n const sessions = useServer().sessions;\n if (sessions == null) {\n throw new Error('useAgentSessionsServer requires AgentUIServer.sessions.');\n }\n return sessions;\n}\n\nexport function useOptionalAgentSessionsServer(): AgentSessionsServer | null {\n return useOptionalServer()?.sessions ?? null;\n}\n\nexport function useAgentMetricsServer(): AgentMetricsServer {\n const metrics = useServer().metrics;\n if (metrics == null) {\n throw new Error('useAgentMetricsServer requires AgentUIServer.metrics.');\n }\n return metrics;\n}\n\nexport function useOptionalAgentMetricsServer(): AgentMetricsServer | null {\n return useOptionalServer()?.metrics ?? null;\n}\n\nexport function useScheduleServer(): ScheduleServer {\n const server = useServer();\n if (server.schedules == null) {\n throw new Error('useScheduleServer requires AgentUIServer.schedules. Pass schedules to createTrueFoundryServer.');\n }\n return server.schedules;\n}\n\nexport function useOptionalScheduleServer(): ScheduleServer | null {\n return useOptionalServer()?.schedules ?? null;\n}\n\nexport function useOptionalPermissionsServer(): PermissionsServer | null {\n return useOptionalServer()?.permissions ?? null;\n}\n","export const SESSION_ID_QUERY = 'sessionId';\nexport const AGENT_ID_QUERY = 'agentId';\nexport const AGENT_TAB_QUERY = 'tab';\nexport const SESSIONS_VIEW_QUERY = 'view';\nexport const SESSIONS_VIEW_VALUE = 'sessions';\nexport const SESSION_START_TIME_QUERY = 's_sts';\nexport const SESSION_END_TIME_QUERY = 's_ets';\nexport const SESSION_TIME_WINDOW_QUERY = 's_tw';\nexport const SESSION_TIME_BUFFER_MS = 5 * 60 * 1000;\nexport const SESSION_CUSTOM_RANGE_MAX_DAYS = 70;\nexport const DEFAULT_SESSION_TIME_WINDOW_MS = 30 * 24 * 60 * 60 * 1000;\nexport const DEFAULT_METRICS_TIME_WINDOW_MS = 24 * 60 * 60 * 1000;\n\nexport type LibraryAgentTab = 'overview' | 'sessions' | 'schedules' | 'code' | 'metrics';\n\nexport type SessionTimeRange = {\n startTs: number;\n endTs: number;\n timeWindowMs?: number;\n};\n\nexport type SessionShareSearch = {\n sessionId: string | null;\n agentId: string | null;\n tab: LibraryAgentTab | null;\n view: typeof SESSIONS_VIEW_VALUE | null;\n timeRange: SessionTimeRange | null;\n};\n\nexport type SessionShareWrite = {\n sessionId?: string | null;\n agentId?: string | null;\n tab?: LibraryAgentTab | null;\n view?: typeof SESSIONS_VIEW_VALUE | null;\n timeRange?: SessionTimeRange | null;\n};\n\nfunction parseLibraryAgentTab(value: string | null): LibraryAgentTab | null {\n if (\n value === 'overview' ||\n value === 'sessions' ||\n value === 'schedules' ||\n value === 'code' ||\n value === 'metrics'\n ) {\n return value;\n }\n return null;\n}\n\nfunction nonEmpty(value: string | null): string | null {\n return value != null && value.length > 0 ? value : null;\n}\n\nfunction parseMs(value: string | null): number | null {\n if (value == null || value.length === 0) return null;\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : null;\n}\n\nexport function defaultSessionTimeRange(now = Date.now()): SessionTimeRange {\n return {\n startTs: now - DEFAULT_SESSION_TIME_WINDOW_MS,\n endTs: now,\n timeWindowMs: DEFAULT_SESSION_TIME_WINDOW_MS,\n };\n}\n\nexport function defaultMetricsTimeRange(now = Date.now()): SessionTimeRange {\n return {\n startTs: now - DEFAULT_METRICS_TIME_WINDOW_MS,\n endTs: now,\n timeWindowMs: DEFAULT_METRICS_TIME_WINDOW_MS,\n };\n}\n\nexport function sessionTimeRangeFromCreatedAt(createdAt: string): SessionTimeRange | null {\n const createdAtMs = new Date(createdAt).getTime();\n if (Number.isNaN(createdAtMs)) return null;\n return {\n startTs: createdAtMs - SESSION_TIME_BUFFER_MS,\n endTs: createdAtMs + SESSION_TIME_BUFFER_MS,\n };\n}\n\nexport function resolveSessionTimeRange(range: SessionTimeRange, now = Date.now()): { startTs: number; endTs: number } {\n if (range.timeWindowMs != null) {\n return { startTs: now - range.timeWindowMs, endTs: now };\n }\n return { startTs: range.startTs, endTs: range.endTs };\n}\n\nexport function readSessionShareSearch(search: string): SessionShareSearch {\n const params = new URLSearchParams(search.startsWith('?') ? search.slice(1) : search);\n const startTs = parseMs(params.get(SESSION_START_TIME_QUERY));\n const endTs = parseMs(params.get(SESSION_END_TIME_QUERY));\n const timeWindowMs = parseMs(params.get(SESSION_TIME_WINDOW_QUERY));\n const view = params.get(SESSIONS_VIEW_QUERY);\n const now = Date.now();\n return {\n sessionId: nonEmpty(params.get(SESSION_ID_QUERY)),\n agentId: nonEmpty(params.get(AGENT_ID_QUERY)),\n tab: parseLibraryAgentTab(params.get(AGENT_TAB_QUERY)),\n view: view === SESSIONS_VIEW_VALUE ? SESSIONS_VIEW_VALUE : null,\n timeRange:\n startTs != null && endTs != null\n ? { startTs, endTs }\n : timeWindowMs != null\n ? { startTs: now - timeWindowMs, endTs: now, timeWindowMs }\n : null,\n };\n}\n\n/** Library details tab: `tab=` wins; a matching share `sessionId` still opens Sessions. */\nexport function libraryAgentTabFromSearch(share: SessionShareSearch, agentId: string): LibraryAgentTab {\n if (share.tab != null) return share.tab;\n return share.sessionId != null && share.agentId === agentId ? 'sessions' : 'overview';\n}\n\nexport function writeSessionShareSearch(params: URLSearchParams, next: SessionShareWrite): void {\n if (next.sessionId === null) params.delete(SESSION_ID_QUERY);\n else if (next.sessionId != null) params.set(SESSION_ID_QUERY, next.sessionId);\n if (next.agentId === null) params.delete(AGENT_ID_QUERY);\n else if (next.agentId != null) params.set(AGENT_ID_QUERY, next.agentId);\n if (next.tab === null) params.delete(AGENT_TAB_QUERY);\n else if (next.tab != null) params.set(AGENT_TAB_QUERY, next.tab);\n if (next.view === null) params.delete(SESSIONS_VIEW_QUERY);\n else if (next.view != null) params.set(SESSIONS_VIEW_QUERY, next.view);\n if (next.timeRange === null) {\n params.delete(SESSION_START_TIME_QUERY);\n params.delete(SESSION_END_TIME_QUERY);\n params.delete(SESSION_TIME_WINDOW_QUERY);\n } else if (next.timeRange != null) {\n if (next.timeRange.timeWindowMs != null) {\n params.set(SESSION_TIME_WINDOW_QUERY, String(next.timeRange.timeWindowMs));\n params.delete(SESSION_START_TIME_QUERY);\n params.delete(SESSION_END_TIME_QUERY);\n } else {\n params.set(SESSION_START_TIME_QUERY, String(next.timeRange.startTs));\n params.set(SESSION_END_TIME_QUERY, String(next.timeRange.endTs));\n params.delete(SESSION_TIME_WINDOW_QUERY);\n }\n }\n}\n\n/** Share link for a library or global session. Works with or without `withRouter`. */\nexport function buildAgentSessionShareUrl({\n sessionId,\n agentId,\n createdAt,\n view,\n href = typeof window === 'undefined' ? '' : window.location.href,\n}: {\n sessionId: string;\n agentId?: string;\n createdAt?: string;\n view?: typeof SESSIONS_VIEW_VALUE | null;\n href?: string;\n}): string {\n const url = new URL(href);\n writeSessionShareSearch(url.searchParams, {\n sessionId,\n agentId: agentId == null || agentId.length === 0 ? null : agentId,\n ...(view === undefined ? {} : { view }),\n timeRange: createdAt == null ? undefined : sessionTimeRangeFromCreatedAt(createdAt),\n });\n return url.toString();\n}\n\nexport const SESSION_SHARE_CHANGE_EVENT = 'trueforge-session-share';\n\nexport function replaceSessionShareSearch(next: SessionShareWrite): string {\n const url = new URL(window.location.href);\n writeSessionShareSearch(url.searchParams, next);\n window.history.replaceState(window.history.state, '', url);\n window.dispatchEvent(new Event(SESSION_SHARE_CHANGE_EVENT));\n return url.search;\n}\n","import type { ResolvedRoutes } from '../routing/types.js';\nimport type { AgentMetricsServer, AgentSessionsServer, CatalogServer, ScheduleServer } from './types.js';\n\n/**\n * Whether Settings chrome is available: sidebar button and `/settings` route.\n * Matches the gate in {@link ShellActions}.\n */\nexport function isSettingsChromeEnabled({\n catalog,\n capabilities,\n}: {\n catalog: CatalogServer | null | undefined;\n capabilities: { settings?: { enabled?: boolean } } | null | undefined;\n}): boolean {\n return catalog != null && capabilities?.settings?.enabled === true;\n}\n\n/** Sessions browser + agent-detail surfaces (Overview / sessions / code). */\nexport function isSessionsChromeEnabled({ sessions }: { sessions: AgentSessionsServer | null | undefined }): boolean {\n return sessions != null;\n}\n\n/** Schedules page + library schedules column. */\nexport function isSchedulesChromeEnabled({ schedules }: { schedules: ScheduleServer | null | undefined }): boolean {\n return schedules != null;\n}\n\n/** Agent-details Metrics tab (no top-level path). */\nexport function isMetricsChromeEnabled({ metrics }: { metrics: AgentMetricsServer | null | undefined }): boolean {\n return metrics != null;\n}\n\n/**\n * Unregister path-backed places whose optional server port is absent.\n * Chrome gates and route gates must stay in lockstep.\n */\nexport function toEffectiveRoutes({\n routes,\n catalog,\n capabilities,\n sessions,\n schedules,\n}: {\n routes: ResolvedRoutes;\n catalog: CatalogServer | null | undefined;\n capabilities: { settings?: { enabled?: boolean } } | null | undefined;\n sessions: AgentSessionsServer | null | undefined;\n schedules: ScheduleServer | null | undefined;\n}): ResolvedRoutes {\n const sessionsEnabled = isSessionsChromeEnabled({ sessions });\n return {\n ...routes,\n settings: isSettingsChromeEnabled({ catalog, capabilities }) ? routes.settings : null,\n sessionsBrowser: sessionsEnabled ? routes.sessionsBrowser : null,\n libraryAgent: sessionsEnabled ? routes.libraryAgent : null,\n schedules: isSchedulesChromeEnabled({ schedules }) ? routes.schedules : null,\n };\n}\n","'use client';\n\nimport { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, type ReactNode } from 'react';\n\nimport type { HistoryAgentIntent } from '../utils/historyAgentSearch.js';\nimport { replaceSessionShareSearch } from '../utils/sessionShareUrl.js';\nimport {\n readDraftSpecPreferences,\n selectDraftSpecPreferences,\n withCapabilitiesSandbox,\n withCapabilitiesWebSearch,\n writeDraftSpecPreferences,\n type DraftPreferenceKind,\n} from './draftSpecPreferences.js';\nimport { isSchedulesChromeEnabled, isSessionsChromeEnabled, isSettingsChromeEnabled } from './serverChrome.js';\nimport {\n useOptionalAgentSessionsServer,\n useOptionalCatalogServer,\n useOptionalRefreshServerCapabilities,\n useOptionalScheduleServer,\n useServerCapabilities,\n} from './ServerContext.js';\nimport type { AgentLibraryEntry, AgentSpec } from './types.js';\n\n/** Host-facing shell configuration for agent / library / composer chrome. */\nexport type AgentConfig =\n | { mode: 'SingleAgent'; name: string }\n | { mode: 'AgentLibrary' }\n | { mode: 'AgentComposer'; defaultAgentSpec?: AgentSpec }\n | { mode: 'AgentLibraryWithComposer'; defaultAgentSpec?: AgentSpec };\n\nexport const DEFAULT_AGENT_CONFIG: AgentConfig = {\n mode: 'AgentLibraryWithComposer',\n};\n\n/**\n * Active chat binding. Mutability (`isMutable`) decides draft vs named runtime.\n * `isCreateAgent` (mutable only) splits New Agent builder chrome from simple New Chat.\n */\nexport type ShellMode =\n | { status: 'idle' }\n | {\n status: 'active';\n isMutable: boolean;\n /**\n * Mutable only: true = Agent builder (config drawer + Save); false = simple chat.\n * Always false when `isMutable` is false (Try / named).\n */\n isCreateAgent: boolean;\n /** Identity for immutable bind + history filter. */\n agentId?: string;\n /** Display / welcome label (often same as agentId). */\n agentName?: string;\n /** Published-agent description, kept outside the executable agent spec. */\n description?: string;\n /** Seed for mutable (draft) runtime. */\n agentSpec?: AgentSpec;\n locked: boolean;\n };\n\n/** Library / New Chat / New Agent create intent. */\nexport type SelectLibraryAgentRequest = {\n isMutable: boolean;\n /**\n * Mutable only. When omitted: true if Edit identity is present, else false (New Chat).\n */\n isCreateAgent?: boolean;\n agentId?: string;\n agentName?: string;\n description?: string;\n agentSpec?: AgentSpec;\n};\n\nexport type SettingsSection = 'models' | 'connectors' | 'skills' | 'sandbox';\n\nexport type HistoryAgentFilter = {\n agentId?: string;\n agentName: string;\n intent: HistoryAgentIntent;\n};\n\ntype ShellModeContextValue = {\n mode: ShellMode;\n /** Host agentConfig mode (capabilities source). */\n agentConfigMode: AgentConfig['mode'];\n /** Agents chrome. */\n isLibraryEnabled: boolean;\n /** Mutable composer / Save Agent chrome (host capability). */\n isComposerEnabled: boolean;\n /** Sidebar / list New Chat control. */\n isNewChatEnabled: boolean;\n settingsOpen: boolean;\n settingsSection: SettingsSection;\n setSettingsOpen: (open: boolean, section?: SettingsSection) => void;\n agentConfigOpen: boolean;\n setAgentConfigOpen: (open: boolean) => void;\n /** Agents main-pane overlay (sidebar layout). */\n libraryOpen: boolean;\n libraryAgentId: string | null;\n setLibraryAgentId: (id: string | null) => void;\n setLibraryOpen: (open: boolean) => void;\n /** All-user sessions browser (includes drafts). */\n sessionsOpen: boolean;\n setSessionsOpen: (open: boolean) => void;\n openLibraryAgent: (agentId: string) => void;\n closeLibraryAgent: () => void;\n schedulesOpen: boolean;\n setSchedulesOpen: (open: boolean) => void;\n /**\n * Bind from Agents (Try = immutable, Edit = mutable + agentSpec).\n * Prefer this over `selectAgent` / `openDraft` when both fields are available.\n */\n selectLibraryAgent: (req: SelectLibraryAgentRequest) => void;\n /**\n * Attach identity + agentSpec to the *current* mutable chat without remounting.\n * Used after `saveAgent` so the same draft session continues as an editable agent.\n */\n bindMutableAgent: (req: { agentId: string; agentName: string; description?: string; agentSpec: AgentSpec }) => void;\n /** @deprecated Prefer `selectLibraryAgent({ isMutable: false, agentName })`. */\n selectAgent: (agentName: string) => void;\n /** Open a simple New Chat (mutable, no agent-builder chrome). */\n openDraft: () => void;\n /** Open New Agent builder (mutable + Agent Config drawer). */\n openAgentBuilder: () => void;\n /** Remember plain-draft composer choices as the seed for future New Chat / New Agent. */\n rememberDraftSpec: (agentSpec: AgentSpec, kind?: DraftPreferenceKind) => void;\n /**\n * Open a history session without remounting the runtime.\n * Prefer explicit `isMutable`; otherwise agentName means immutable.\n */\n openHistorySession: (req: {\n sessionId: string;\n agentName?: string;\n isMutable?: boolean;\n isCreateAgent?: boolean;\n }) => void;\n /** Reset current chat; no-op when idle. */\n clearChat: () => void;\n /** Return library-only mode to its idle landing; no-op in other modes. */\n openLibraryHome: () => void;\n /** Changes only when the chat runtime must reset. */\n runtimeKey: string;\n /**\n * History list filter forwarded as `listSessions({ agentId })`.\n * `null` = All chats. Only meaningful when `isLibraryEnabled`.\n */\n historyAgentFilter: HistoryAgentFilter | null;\n setHistoryAgentFilter: (filter: HistoryAgentFilter | null) => void;\n /** Effective `listSessionsAgentId` for the runtime (SingleAgent locks to name). */\n listSessionsAgentId: string | undefined;\n /** Session selected from history. */\n pendingSessionId: string | undefined;\n /** Distinguishes repeated selections of the same session. */\n pendingSessionEpoch: number;\n /**\n * Bumped when the Agents catalog may have changed (e.g. after saveAgent).\n * Library chrome should re-fetch when this changes.\n */\n agentsListEpoch: number;\n invalidateAgentsList: () => void;\n};\n\nconst ShellModeContext = createContext<ShellModeContextValue | null>(null);\n\nconst FALLBACK_MUTABLE_SPEC: AgentSpec = {\n model: { name: 'openai-main/gpt-4.1' },\n};\n\nfunction mutableSeedFromConfig(config: AgentConfig): AgentSpec {\n if (config.mode === 'AgentComposer' || config.mode === 'AgentLibraryWithComposer') {\n return config.defaultAgentSpec ?? FALLBACK_MUTABLE_SPEC;\n }\n return FALLBACK_MUTABLE_SPEC;\n}\n\nfunction initialMode(config: AgentConfig, mutableSeed: AgentSpec): ShellMode {\n switch (config.mode) {\n case 'SingleAgent':\n return {\n status: 'active',\n isMutable: false,\n isCreateAgent: false,\n agentId: config.name,\n agentName: config.name,\n locked: true,\n };\n case 'AgentLibrary':\n return { status: 'idle' };\n case 'AgentComposer':\n case 'AgentLibraryWithComposer':\n return {\n status: 'active',\n isMutable: true,\n isCreateAgent: false,\n agentSpec: mutableSeed,\n locked: false,\n };\n }\n}\n\nfunction resolveMutableIsCreateAgent(req: SelectLibraryAgentRequest): boolean {\n if (req.isCreateAgent !== undefined) return req.isCreateAgent;\n return req.agentId != null || req.agentName != null;\n}\n\nfunction libraryAgentId(agent: Pick<AgentLibraryEntry, 'agentId' | 'name'>): string {\n return agent.agentId ?? agent.name;\n}\n\nexport function ShellModeProvider({\n agentConfig = DEFAULT_AGENT_CONFIG,\n initialSettingsOpen = false,\n children,\n}: {\n agentConfig?: AgentConfig;\n /** Open settings on first paint (e.g. host boot with no models). Does not re-open later. */\n initialSettingsOpen?: boolean;\n children: ReactNode;\n}) {\n const capabilities = useServerCapabilities();\n const catalog = useOptionalCatalogServer();\n const refreshCapabilities = useOptionalRefreshServerCapabilities();\n const sessionsServer = useOptionalAgentSessionsServer();\n const scheduleServer = useOptionalScheduleServer();\n const chatSeedRef = useRef(\n readDraftSpecPreferences('chat') ?? selectDraftSpecPreferences(mutableSeedFromConfig(agentConfig), 'chat'),\n );\n const agentSeedRef = useRef(\n readDraftSpecPreferences('agent') ?? selectDraftSpecPreferences(mutableSeedFromConfig(agentConfig), 'agent'),\n );\n\n const isLibraryEnabled = agentConfig.mode === 'AgentLibrary' || agentConfig.mode === 'AgentLibraryWithComposer';\n const isComposerEnabled = agentConfig.mode === 'AgentComposer' || agentConfig.mode === 'AgentLibraryWithComposer';\n const isNewChatEnabled = agentConfig.mode !== 'AgentLibrary';\n const locked = agentConfig.mode === 'SingleAgent';\n\n const [mode, setMode] = useState<ShellMode>(() => initialMode(agentConfig, chatSeedRef.current));\n const [mutableEpoch, setMutableEpoch] = useState(0);\n const [clearEpoch, setClearEpoch] = useState(0);\n const [agentsListEpoch, setAgentsListEpoch] = useState(0);\n const [settingsOpenState, setSettingsOpenState] = useState(initialSettingsOpen);\n const [settingsSection, setSettingsSection] = useState<SettingsSection>('models');\n const [agentConfigOpenState, setAgentConfigOpenState] = useState(false);\n const [libraryOpenState, setLibraryOpenState] = useState(false);\n const [sessionsOpenState, setSessionsOpenState] = useState(false);\n const [libraryAgentId, setLibraryAgentId] = useState<string | null>(null);\n const [schedulesOpenState, setSchedulesOpenState] = useState(false);\n const [historyAgentFilter, setHistoryAgentFilter] = useState<HistoryAgentFilter | null>(null);\n const [pendingSessionId, setPendingSessionId] = useState<string | undefined>(undefined);\n const [pendingSessionEpoch, setPendingSessionEpoch] = useState(0);\n const settingsEnabled = isSettingsChromeEnabled({ catalog, capabilities });\n const settingsOpen = settingsEnabled && settingsOpenState;\n const sessionsEnabled = isSessionsChromeEnabled({ sessions: sessionsServer });\n const schedulesEnabled = isSchedulesChromeEnabled({ schedules: scheduleServer });\n const schedulesOpen = schedulesEnabled && schedulesOpenState;\n const libraryOpen = isLibraryEnabled && libraryOpenState;\n const sessionsOpen = sessionsEnabled && sessionsOpenState;\n const setSessionsOpen = useCallback(\n (open: boolean) => {\n if (open) {\n setSettingsOpenState(false);\n setAgentConfigOpenState(false);\n setLibraryOpenState(false);\n setLibraryAgentId(null);\n setSchedulesOpenState(false);\n } else {\n replaceSessionShareSearch({ view: null });\n }\n setSessionsOpenState(sessionsEnabled && open);\n },\n [sessionsEnabled],\n );\n const setLibraryOpen = useCallback(\n (open: boolean) => {\n if (!isLibraryEnabled) return;\n if (open) {\n setSettingsOpenState(false);\n setAgentConfigOpenState(false);\n setSessionsOpen(false);\n setSchedulesOpenState(false);\n }\n setLibraryAgentId(null);\n setLibraryOpenState(open);\n },\n [isLibraryEnabled, setSessionsOpen],\n );\n const openLibraryAgent = useCallback(\n (agentId: string) => {\n if (!isLibraryEnabled || !sessionsEnabled) return;\n setSettingsOpenState(false);\n setAgentConfigOpenState(false);\n setSessionsOpen(false);\n setSchedulesOpenState(false);\n setLibraryOpenState(true);\n setLibraryAgentId(agentId);\n },\n [isLibraryEnabled, sessionsEnabled, setSessionsOpen],\n );\n const closeLibraryAgent = useCallback(() => {\n setLibraryAgentId(null);\n }, []);\n const setSettingsOpen = useCallback(\n (open: boolean, section?: SettingsSection) => {\n if (section !== undefined) {\n setSettingsSection(section);\n }\n if (open) {\n setAgentConfigOpenState(false);\n setLibraryOpenState(false);\n setLibraryAgentId(null);\n setSessionsOpen(false);\n setSchedulesOpenState(false);\n }\n setSettingsOpenState(settingsEnabled && open);\n },\n [setSessionsOpen, settingsEnabled],\n );\n const setAgentConfigOpen = useCallback(\n (open: boolean) => {\n if (open) {\n setSettingsOpenState(false);\n setLibraryOpenState(false);\n setLibraryAgentId(null);\n setSessionsOpen(false);\n setSchedulesOpenState(false);\n }\n setAgentConfigOpenState(open);\n },\n [setSessionsOpen],\n );\n const setSchedulesOpen = useCallback(\n (open: boolean) => {\n if (open) {\n setSettingsOpenState(false);\n setAgentConfigOpenState(false);\n setLibraryOpenState(false);\n setLibraryAgentId(null);\n setSessionsOpen(false);\n }\n setSchedulesOpenState(schedulesEnabled && open);\n },\n [schedulesEnabled, setSessionsOpen],\n );\n\n useEffect(() => {\n if (catalog == null || capabilities?.settings?.enabled === false) {\n setSettingsOpenState(false);\n }\n }, [capabilities?.settings?.enabled, catalog]);\n\n useEffect(() => {\n if (!sessionsEnabled) {\n setSessionsOpenState(false);\n setLibraryAgentId(null);\n }\n }, [sessionsEnabled]);\n\n useEffect(() => {\n if (!schedulesEnabled) {\n setSchedulesOpenState(false);\n }\n }, [schedulesEnabled]);\n\n const invalidateAgentsList = useCallback(() => {\n setAgentsListEpoch(n => n + 1);\n }, []);\n\n const lockedAgentName = agentConfig.mode === 'SingleAgent' ? agentConfig.name : '';\n const effectiveMode: ShellMode = useMemo(() => {\n if (!locked) return mode;\n return {\n status: 'active',\n isMutable: false,\n isCreateAgent: false,\n agentId: lockedAgentName,\n agentName: lockedAgentName,\n locked: true,\n };\n }, [locked, lockedAgentName, mode]);\n const agentConfigOpen =\n effectiveMode.status === 'active' && effectiveMode.isMutable && effectiveMode.isCreateAgent && agentConfigOpenState;\n\n useEffect(() => {\n if (effectiveMode.status !== 'active' || !effectiveMode.isMutable || !effectiveMode.isCreateAgent) {\n setAgentConfigOpenState(false);\n }\n }, [effectiveMode]);\n\n const listSessionsAgentId = useMemo(() => {\n if (locked) return lockedAgentName;\n if (!isLibraryEnabled) return undefined;\n return historyAgentFilter?.agentId;\n }, [locked, lockedAgentName, isLibraryEnabled, historyAgentFilter]);\n\n const bumpEpoch = useCallback((isMutable: boolean) => {\n if (isMutable) setMutableEpoch(n => n + 1);\n else setClearEpoch(n => n + 1);\n }, []);\n\n const selectLibraryAgent = useCallback(\n (req: SelectLibraryAgentRequest) => {\n if (req.isMutable) {\n if (!isComposerEnabled) return;\n setSettingsOpen(false);\n setLibraryOpenState(false);\n setLibraryAgentId(null);\n setSessionsOpen(false);\n setSchedulesOpen(false);\n setPendingSessionId(undefined);\n const isCreateAgent = resolveMutableIsCreateAgent(req);\n const kind: DraftPreferenceKind = isCreateAgent ? 'agent' : 'chat';\n setMode({\n status: 'active',\n isMutable: true,\n isCreateAgent,\n agentId: req.agentId,\n agentName: req.agentName,\n description: req.description,\n agentSpec: req.agentSpec ?? (kind === 'agent' ? agentSeedRef.current : chatSeedRef.current),\n locked: false,\n });\n setAgentConfigOpenState(isCreateAgent);\n bumpEpoch(true);\n return;\n }\n if (!isLibraryEnabled) return;\n const agentName = req.agentName ?? req.agentId;\n if (agentName == null) return;\n setSettingsOpen(false);\n setLibraryOpenState(false);\n setLibraryAgentId(null);\n setSessionsOpen(false);\n setSchedulesOpen(false);\n setPendingSessionId(undefined);\n setAgentConfigOpenState(false);\n setMode({\n status: 'active',\n isMutable: false,\n isCreateAgent: false,\n agentId: req.agentId ?? agentName,\n agentName,\n locked: false,\n });\n if (req.agentId != null) {\n setHistoryAgentFilter({\n agentId: req.agentId,\n agentName,\n intent: 'try-agent',\n });\n } else {\n setHistoryAgentFilter(null);\n }\n bumpEpoch(false);\n },\n [isComposerEnabled, isLibraryEnabled, bumpEpoch, setSettingsOpen, setSessionsOpen, setSchedulesOpen],\n );\n\n const bindMutableAgent = useCallback(\n (req: { agentId: string; agentName: string; description?: string; agentSpec: AgentSpec }) => {\n if (!isComposerEnabled) return;\n setMode(prev => {\n if (prev.status !== 'active' || !prev.isMutable) return prev;\n return {\n status: 'active',\n isMutable: true,\n isCreateAgent: true,\n agentId: req.agentId,\n agentName: req.agentName,\n description: req.description,\n agentSpec: req.agentSpec,\n locked: false,\n };\n });\n },\n [isComposerEnabled],\n );\n\n const selectAgent = useCallback(\n (name: string) => {\n selectLibraryAgent({ isMutable: false, agentId: name, agentName: name });\n },\n [selectLibraryAgent],\n );\n\n const openDraft = useCallback(() => {\n if (!isComposerEnabled) return;\n refreshCapabilities?.();\n setHistoryAgentFilter(null);\n selectLibraryAgent({ isMutable: true, isCreateAgent: false, agentSpec: chatSeedRef.current });\n }, [isComposerEnabled, refreshCapabilities, selectLibraryAgent]);\n\n const isActiveAgentBuilder =\n effectiveMode.status === 'active' && effectiveMode.isMutable && effectiveMode.isCreateAgent;\n const openAgentBuilder = useCallback(() => {\n if (!isComposerEnabled) return;\n refreshCapabilities?.();\n // Returning from an overlay must keep the live draft runtime and its unsaved instructions.\n if (isActiveAgentBuilder) {\n setSettingsOpen(false);\n setLibraryOpenState(false);\n setLibraryAgentId(null);\n setSessionsOpen(false);\n setSchedulesOpen(false);\n setAgentConfigOpenState(true);\n return;\n }\n selectLibraryAgent({ isMutable: true, isCreateAgent: true, agentSpec: agentSeedRef.current });\n }, [\n isActiveAgentBuilder,\n isComposerEnabled,\n refreshCapabilities,\n selectLibraryAgent,\n setSchedulesOpen,\n setSessionsOpen,\n setSettingsOpen,\n ]);\n\n const sandboxEnabled = capabilities?.sandbox.enabled;\n const webSearchEnabled = capabilities?.webSearch?.enabled;\n const rememberDraftSpec = useCallback(\n (agentSpec: AgentSpec, kind: DraftPreferenceKind = 'chat') => {\n const selected = selectDraftSpecPreferences(agentSpec, kind);\n const withSandbox = kind === 'agent' ? withCapabilitiesSandbox(selected, sandboxEnabled) : selected;\n const preferences =\n kind === 'agent'\n ? withCapabilitiesWebSearch({\n spec: withSandbox,\n webSearchEnabled,\n kind: 'agent',\n })\n : withSandbox;\n if (kind === 'chat') {\n chatSeedRef.current = preferences;\n } else {\n // Keep the active builder intact in memory; storage remains limited to reusable preferences.\n agentSeedRef.current = withCapabilitiesWebSearch({\n spec: withCapabilitiesSandbox(agentSpec, sandboxEnabled),\n webSearchEnabled,\n kind: 'agent',\n });\n }\n writeDraftSpecPreferences(kind, preferences);\n },\n [sandboxEnabled, webSearchEnabled],\n );\n\n const openHistorySession = useCallback(\n ({\n sessionId,\n agentName,\n isMutable: isMutableOpt,\n isCreateAgent: isCreateAgentOpt,\n }: {\n sessionId: string;\n agentName?: string;\n isMutable?: boolean;\n isCreateAgent?: boolean;\n }) => {\n const isMutable = isMutableOpt ?? agentName == null;\n if (isMutable) {\n if (!isComposerEnabled) return;\n } else if (locked) {\n if (agentName == null || lockedAgentName !== agentName) return;\n } else if (!isLibraryEnabled) {\n return;\n }\n\n setSettingsOpen(false);\n setLibraryOpenState(false);\n setLibraryAgentId(null);\n setSessionsOpen(false);\n setSchedulesOpen(false);\n setPendingSessionId(sessionId);\n setPendingSessionEpoch(n => n + 1);\n if (isMutable) {\n const isCreateAgent = isCreateAgentOpt === true;\n setMode({\n status: 'active',\n isMutable: true,\n isCreateAgent,\n agentSpec: isCreateAgent ? agentSeedRef.current : chatSeedRef.current,\n locked: false,\n });\n setAgentConfigOpenState(isCreateAgent);\n return;\n }\n setAgentConfigOpenState(false);\n setMode({\n status: 'active',\n isMutable: false,\n isCreateAgent: false,\n locked: false,\n ...(agentName != null ? { agentId: agentName, agentName } : {}),\n });\n },\n [isLibraryEnabled, isComposerEnabled, locked, lockedAgentName, setSettingsOpen, setSessionsOpen, setSchedulesOpen],\n );\n\n const clearChat = useCallback(() => {\n if (effectiveMode.status === 'idle') return;\n setPendingSessionId(undefined);\n if (effectiveMode.isMutable) {\n // Preserve Edit / builder vs chat intent; blank drafts fall back to host seed.\n const kind: DraftPreferenceKind = effectiveMode.isCreateAgent ? 'agent' : 'chat';\n setMode({\n status: 'active',\n isMutable: true,\n isCreateAgent: effectiveMode.isCreateAgent,\n agentId: effectiveMode.agentId,\n agentName: effectiveMode.agentName,\n agentSpec: effectiveMode.agentSpec ?? (kind === 'agent' ? agentSeedRef.current : chatSeedRef.current),\n locked: false,\n });\n setAgentConfigOpenState(effectiveMode.isCreateAgent);\n bumpEpoch(true);\n return;\n }\n bumpEpoch(false);\n }, [effectiveMode, bumpEpoch]);\n\n const openLibraryHome = useCallback(() => {\n // Only library-only mode has an idle landing; other modes root via openDraft / clearChat.\n if (!isLibraryEnabled || isComposerEnabled) return;\n setPendingSessionId(undefined);\n setSettingsOpen(false);\n setLibraryOpenState(false);\n setLibraryAgentId(null);\n setSchedulesOpen(false);\n setMode({ status: 'idle' });\n bumpEpoch(false);\n }, [isLibraryEnabled, isComposerEnabled, setSettingsOpen, setSchedulesOpen, bumpEpoch]);\n\n // Only explicit resets remount the runtime; history and identity changes happen in place.\n const runtimeKey = useMemo(() => {\n if (effectiveMode.status === 'idle') return 'idle';\n return `chat:${mutableEpoch}:${clearEpoch}`;\n }, [effectiveMode.status, mutableEpoch, clearEpoch]);\n\n const value = useMemo<ShellModeContextValue>(\n () => ({\n mode: effectiveMode,\n agentConfigMode: agentConfig.mode,\n isLibraryEnabled,\n isComposerEnabled,\n isNewChatEnabled,\n settingsOpen,\n settingsSection,\n setSettingsOpen,\n agentConfigOpen,\n setAgentConfigOpen,\n libraryOpen,\n libraryAgentId,\n setLibraryAgentId,\n setLibraryOpen,\n sessionsOpen,\n setSessionsOpen,\n openLibraryAgent,\n closeLibraryAgent,\n schedulesOpen,\n setSchedulesOpen,\n selectLibraryAgent,\n bindMutableAgent,\n selectAgent,\n openDraft,\n openAgentBuilder,\n rememberDraftSpec,\n openHistorySession,\n clearChat,\n openLibraryHome,\n runtimeKey,\n historyAgentFilter,\n setHistoryAgentFilter,\n listSessionsAgentId,\n pendingSessionId,\n pendingSessionEpoch,\n agentsListEpoch,\n invalidateAgentsList,\n }),\n [\n effectiveMode,\n agentConfig.mode,\n isLibraryEnabled,\n isComposerEnabled,\n isNewChatEnabled,\n settingsOpen,\n settingsSection,\n setSettingsOpen,\n agentConfigOpen,\n setAgentConfigOpen,\n libraryOpen,\n libraryAgentId,\n setLibraryOpen,\n sessionsOpen,\n setSessionsOpen,\n openLibraryAgent,\n closeLibraryAgent,\n schedulesOpen,\n setSchedulesOpen,\n selectLibraryAgent,\n bindMutableAgent,\n selectAgent,\n openDraft,\n openAgentBuilder,\n rememberDraftSpec,\n openHistorySession,\n clearChat,\n openLibraryHome,\n runtimeKey,\n historyAgentFilter,\n listSessionsAgentId,\n pendingSessionId,\n pendingSessionEpoch,\n agentsListEpoch,\n invalidateAgentsList,\n ],\n );\n\n return <ShellModeContext.Provider value={value}>{children}</ShellModeContext.Provider>;\n}\n\nexport function useShellMode(): ShellModeContextValue {\n const ctx = useContext(ShellModeContext);\n if (ctx == null) {\n throw new Error('useShellMode must be used within a ShellModeProvider.');\n }\n return ctx;\n}\n\nexport function useOptionalShellMode(): ShellModeContextValue | null {\n return useContext(ShellModeContext);\n}\n\n/** True when the shell is bound to a mutable (editable) agentSpec. */\nexport function shellIsMutable(mode: ShellMode): boolean {\n return mode.status === 'active' && mode.isMutable;\n}\n\n/** True when the shell is in New Agent / Edit builder chrome. */\nexport function shellIsCreateAgent(mode: ShellMode): boolean {\n return mode.status === 'active' && mode.isMutable && mode.isCreateAgent;\n}\n\nexport { libraryAgentId };\n","import type { AgentSpec } from './types.js';\n\n/** @deprecated Migrated into chat/agent keys on first read. */\nexport const DRAFT_SPEC_PREFERENCES_STORAGE_KEY = 'tfy-aui-draft-spec-preferences';\nexport const CHAT_DRAFT_SPEC_PREFERENCES_STORAGE_KEY = 'tfy-aui-chat-draft-spec-preferences';\nexport const AGENT_DRAFT_SPEC_PREFERENCES_STORAGE_KEY = 'tfy-aui-agent-draft-spec-preferences';\n\nexport type DraftPreferenceKind = 'chat' | 'agent';\n\ntype StoredDraftSpecPreferences = {\n version: 1;\n spec: AgentSpec;\n};\n\nfunction isObject(value: unknown): value is object {\n return typeof value === 'object' && value !== null;\n}\n\nfunction isMountList(value: unknown): boolean {\n return Array.isArray(value) && value.every(isObject);\n}\n\nfunction isAgentSpec(value: unknown): value is AgentSpec {\n if (!isObject(value)) return false;\n const model = Reflect.get(value, 'model');\n if (!isObject(model) || typeof Reflect.get(model, 'name') !== 'string') return false;\n\n const params = Reflect.get(model, 'params');\n if (params !== undefined && !isObject(params)) return false;\n\n const skills = Reflect.get(value, 'skills');\n if (skills !== undefined && !isMountList(skills)) return false;\n\n const mcpServers = Reflect.get(value, 'mcpServers');\n if (mcpServers !== undefined && !isMountList(mcpServers)) return false;\n\n const config = Reflect.get(value, 'config');\n return config === undefined || isObject(config);\n}\n\nfunction isStoredDraftSpecPreferences(value: unknown): value is StoredDraftSpecPreferences {\n return isObject(value) && Reflect.get(value, 'version') === 1 && isAgentSpec(Reflect.get(value, 'spec'));\n}\n\nfunction storageKeyForKind(kind: DraftPreferenceKind): string {\n return kind === 'chat' ? CHAT_DRAFT_SPEC_PREFERENCES_STORAGE_KEY : AGENT_DRAFT_SPEC_PREFERENCES_STORAGE_KEY;\n}\n\n/** New Chat: model (+ reasoning params), skills, and MCP only — no runtime config. */\nexport function selectChatDraftSpecPreferences(spec: AgentSpec): AgentSpec {\n return {\n model: spec.model,\n ...(spec.skills !== undefined ? { skills: spec.skills } : {}),\n ...(spec.mcpServers !== undefined ? { mcpServers: spec.mcpServers } : {}),\n };\n}\n\n/** New Agent: full composer seed including runtime config (sandbox, ask-user, …). */\nexport function selectAgentDraftSpecPreferences(spec: AgentSpec): AgentSpec {\n return {\n ...selectChatDraftSpecPreferences(spec),\n ...(spec.config !== undefined ? { config: spec.config } : {}),\n };\n}\n\nexport function selectDraftSpecPreferences(spec: AgentSpec, kind: DraftPreferenceKind): AgentSpec {\n return kind === 'chat' ? selectChatDraftSpecPreferences(spec) : selectAgentDraftSpecPreferences(spec);\n}\n\nfunction readSandboxEnabled(spec: AgentSpec): boolean | undefined {\n if (spec.config === undefined) return undefined;\n // `sandbox` is persisted on draft config but is not part of AgentRuntimeConfig.\n const sandbox = Reflect.get(spec.config, 'sandbox');\n if (!isObject(sandbox)) return undefined;\n const enabled = Reflect.get(sandbox, 'enabled');\n return typeof enabled === 'boolean' ? enabled : undefined;\n}\n\nfunction readWebSearchEnabled(spec: AgentSpec): boolean | undefined {\n if (spec.config?.webSearch === undefined) return undefined;\n const enabled = spec.config.webSearch.enabled;\n return typeof enabled === 'boolean' ? enabled : undefined;\n}\n\n/** Disable sandbox when unavailable; availability must not override the user's runtime choice. */\nexport function withCapabilitiesSandbox(spec: AgentSpec, sandboxEnabled: boolean | null | undefined): AgentSpec {\n if (sandboxEnabled !== false || readSandboxEnabled(spec) === false) return spec;\n const config = {\n ...spec.config,\n sandbox: { ...spec.config?.sandbox, enabled: false },\n };\n return {\n ...spec,\n config,\n };\n}\n\n/**\n * Align `config.webSearch` with host capability.\n * - unavailable → force false\n * - chat + available → force true\n * - agent + available → fill true only when the key is absent (preserve explicit values)\n */\nexport function withCapabilitiesWebSearch({\n spec,\n webSearchEnabled,\n kind = 'agent',\n}: {\n spec: AgentSpec;\n webSearchEnabled: boolean | null | undefined;\n kind?: DraftPreferenceKind;\n}): AgentSpec {\n if (webSearchEnabled == null) return spec;\n\n if (webSearchEnabled === false) {\n if (readWebSearchEnabled(spec) === false) return spec;\n return {\n ...spec,\n config: {\n ...spec.config,\n webSearch: { ...spec.config?.webSearch, enabled: false },\n },\n };\n }\n\n if (kind === 'chat') {\n if (readWebSearchEnabled(spec) === true) return spec;\n return {\n ...spec,\n config: {\n ...spec.config,\n webSearch: { ...spec.config?.webSearch, enabled: true },\n },\n };\n }\n\n // Agent: only default true when the field is missing from the spec.\n if (spec.config?.webSearch !== undefined) return spec;\n return {\n ...spec,\n config: {\n ...spec.config,\n webSearch: { enabled: true },\n },\n };\n}\n\nfunction readStoredSpec(key: string): AgentSpec | null {\n if (typeof window === 'undefined') return null;\n try {\n const stored: unknown = JSON.parse(window.localStorage.getItem(key) ?? 'null');\n return isStoredDraftSpecPreferences(stored) ? stored.spec : null;\n } catch {\n return null;\n }\n}\n\nfunction writeStoredSpec(key: string, spec: AgentSpec): boolean {\n if (typeof window === 'undefined') return false;\n try {\n const stored: StoredDraftSpecPreferences = { version: 1, spec };\n window.localStorage.setItem(key, JSON.stringify(stored));\n return true;\n } catch {\n // Storage can be unavailable or full; in-memory carry-over still works.\n return false;\n }\n}\n\n/** One-shot split of the pre-split shared key into chat + agent stores. */\nfunction migrateLegacyDraftPreferences(): void {\n if (typeof window === 'undefined') return;\n const legacy = readStoredSpec(DRAFT_SPEC_PREFERENCES_STORAGE_KEY);\n if (legacy == null) return;\n\n const chatReady =\n readStoredSpec(CHAT_DRAFT_SPEC_PREFERENCES_STORAGE_KEY) != null ||\n writeStoredSpec(CHAT_DRAFT_SPEC_PREFERENCES_STORAGE_KEY, selectChatDraftSpecPreferences(legacy));\n const agentReady =\n readStoredSpec(AGENT_DRAFT_SPEC_PREFERENCES_STORAGE_KEY) != null ||\n writeStoredSpec(AGENT_DRAFT_SPEC_PREFERENCES_STORAGE_KEY, selectAgentDraftSpecPreferences(legacy));\n\n // Keep the legacy key if either destination write failed so a later read can retry.\n if (!chatReady || !agentReady) return;\n\n try {\n window.localStorage.removeItem(DRAFT_SPEC_PREFERENCES_STORAGE_KEY);\n } catch {\n // Ignore quota / private-mode failures; next read still prefers kind keys.\n }\n}\n\nexport function readDraftSpecPreferences(kind: DraftPreferenceKind): AgentSpec | null {\n migrateLegacyDraftPreferences();\n const stored = readStoredSpec(storageKeyForKind(kind));\n return stored == null ? null : selectDraftSpecPreferences(stored, kind);\n}\n\nexport function writeDraftSpecPreferences(kind: DraftPreferenceKind, spec: AgentSpec): void {\n writeStoredSpec(storageKeyForKind(kind), selectDraftSpecPreferences(spec, kind));\n}\n","function isRecord(value: unknown): value is Record<string, unknown> {\n return value != null && typeof value === 'object';\n}\n\nfunction readNonEmptyString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() !== '' ? value : undefined;\n}\n\nconst LITERAL_ESCAPE_PATTERN = /\\\\(?:[nrtbfv0'\"\\\\]|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{2})/; // literal escape sequences like \\n, \\t, \\b, \\f, \\v, \\uXXXX, \\xHH\nconst REAL_CONTROL_PATTERN = /[\\n\\t\\b\\f\\v]/; // real control characters like \\n, \\t, \\b, \\f, \\v\n\nfunction decodeLiteralEscapes(text: string): string {\n let out = '';\n for (let i = 0; i < text.length; i += 1) {\n const char = text[i];\n if (char !== '\\\\' || i + 1 >= text.length) {\n out += char;\n continue;\n }\n\n const next = text[i + 1];\n switch (next) {\n case 'n':\n out += '\\n';\n i += 1;\n break;\n case 't':\n out += '\\t';\n i += 1;\n break;\n case 'r':\n out += '\\r';\n i += 1;\n break;\n case 'b':\n out += '\\b';\n i += 1;\n break;\n case 'f':\n out += '\\f';\n i += 1;\n break;\n case 'v':\n out += '\\v';\n i += 1;\n break;\n case '0':\n out += '\\0';\n i += 1;\n break;\n case '\\\\':\n out += '\\\\';\n i += 1;\n break;\n case '\"':\n out += '\"';\n i += 1;\n break;\n case \"'\":\n out += \"'\";\n i += 1;\n break;\n case 'u': {\n const hex = text.slice(i + 2, i + 6);\n if (/^[0-9a-fA-F]{4}$/.test(hex)) {\n out += String.fromCharCode(Number.parseInt(hex, 16));\n i += 5;\n } else {\n out += char;\n }\n break;\n }\n case 'x': {\n const hex = text.slice(i + 2, i + 4);\n if (/^[0-9a-fA-F]{2}$/.test(hex)) {\n out += String.fromCharCode(Number.parseInt(hex, 16));\n i += 3;\n } else {\n out += char;\n }\n break;\n }\n default:\n out += char;\n break;\n }\n }\n return out;\n}\n\n// Decodes JSON/C-style escape sequences (e.g., \\n, \\t) in error messages, preserving real control characters and normalizing line endings.\nexport function decodeErrorMessageEscapes(text: string): string {\n const normalized = text.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n if (REAL_CONTROL_PATTERN.test(normalized) || !LITERAL_ESCAPE_PATTERN.test(normalized)) {\n // If the string contains real control characters or no literal escape sequences, return the normalized string.\n return normalized;\n }\n // else decode the literal escape sequences and normalize line endings\n return decodeLiteralEscapes(normalized).replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n}\n\n/**\n * Reads a display string from API-shaped errors: `message`, then nested\n * `error.message`. When neither exists, stringifies the value.\n */\nfunction messageFromErrorShaped(value: unknown): string | undefined {\n if (!isRecord(value)) return undefined;\n const direct = readNonEmptyString(value.message);\n if (direct != null) return direct;\n if (isRecord(value.error)) {\n return readNonEmptyString(value.error.message);\n }\n return undefined;\n}\n\nfunction stringifyError(error: unknown): string {\n if (typeof error === 'string') return error;\n if (isRecord(error)) {\n try {\n return JSON.stringify(error);\n } catch {\n return Object.prototype.toString.call(error);\n }\n }\n return String(error);\n}\n\n/**\n * User-facing error text. Prefers HTTP body `{ error: { message } }` when\n * present (e.g. TrueForgeError), then `error.message` / `error.error.message`,\n * then `fallback`, then a string form of the value.\n *\n * Escape sequences (`\\n`, `\\t`, `\\r`, `\\uXXXX`, …) are decoded for display when\n * still present as literal text.\n */\nexport function getErrorMessage(error: unknown, fallback?: string): string {\n if (typeof error === 'string') {\n const trimmed = error.trim();\n if (trimmed !== '') return decodeErrorMessageEscapes(error);\n return fallback != null ? decodeErrorMessageEscapes(fallback) : decodeErrorMessageEscapes(error);\n }\n\n if (isRecord(error) && 'body' in error) {\n const fromBody = messageFromErrorShaped(error.body);\n if (fromBody != null) return decodeErrorMessageEscapes(fromBody);\n if (error.body != null) {\n if (typeof error.body === 'string') {\n const trimmed = error.body.trim();\n if (trimmed !== '') return decodeErrorMessageEscapes(error.body);\n } else {\n return stringifyError(error.body);\n }\n }\n }\n\n const fromShape = messageFromErrorShaped(error);\n if (fromShape != null) return decodeErrorMessageEscapes(fromShape);\n\n if (fallback != null) return decodeErrorMessageEscapes(fallback);\n return stringifyError(error);\n}\n"],"mappings":";AAEA,SAAS,eAAe,aAAa,YAAY,WAAW,SAAS,QAAQ,gBAAgC;AA0DvG;AA9CN,IAAM,gBAAgB,cAAoC,IAAI;AAC9D,IAAM,4BAA4B,cAIxB,IAAI;AAEP,SAAS,eAAe,EAAE,QAAQ,SAAS,GAAmD;AACnG,QAAM,CAAC,cAAc,eAAe,IAAI,SAA0D,IAAI;AACtG,QAAM,CAAC,qBAAqB,sBAAsB,IAA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AAO;AAC3B,MAAI,SAAS,MAAM,KAAK,GAAG;AACzB,WAAO,mBAAmB,MAAM,MAAM,OAAO;AAAA,EAC/C;AACA,SAAO;AACT;AAEA,SAAS,eAAe,OAAwB;AAC9C,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,SAAS,KAAK,GAAG;AACnB,QAAI;AACF,aAAO,KAAK,UAAU,KAAK;AAAA,IAC7B,QAAQ;AACN,aAAO,OAAO,UAAU,SAAS,KAAK,KAAK;AAAA,IAC7C;AAAA,EACF;AACA,SAAO,OAAO,KAAK;AACrB;AAUO,SAAS,gBAAgB,OAAgB,UAA2B;AACzE,MAAI,OAAO,UAAU,UAAU;AAC7B,UAAM,UAAU,MAAM,KAAK;AAC3B,QAAI,YAAY,GAAI,QAAO,0BAA0B,KAAK;AAC1D,WAAO,YAAY,OAAO,0BAA0B,QAAQ,IAAI,0BAA0B,KAAK;AAAA,EACjG;AAEA,MAAI,SAAS,KAAK,KAAK,UAAU,OAAO;AACtC,UAAM,WAAW,uBAAuB,MAAM,IAAI;AAClD,QAAI,YAAY,KAAM,QAAO,0BAA0B,QAAQ;AAC/D,QAAI,MAAM,QAAQ,MAAM;AACtB,UAAI,OAAO,MAAM,SAAS,UAAU;AAClC,cAAM,UAAU,MAAM,KAAK,KAAK;AAChC,YAAI,YAAY,GAAI,QAAO,0BAA0B,MAAM,IAAI;AAAA,MACjE,OAAO;AACL,eAAO,eAAe,MAAM,IAAI;AAAA,MAClC;AAAA,IACF;AAAA,EACF;AAEA,QAAM,YAAY,uBAAuB,KAAK;AAC9C,MAAI,aAAa,KAAM,QAAO,0BAA0B,SAAS;AAEjE,MAAI,YAAY,KAAM,QAAO,0BAA0B,QAAQ;AAC/D,SAAO,eAAe,KAAK;AAC7B;","names":["createContext","useCallback","useContext","useEffect","useMemo","useRef","useState","jsx","createContext","useRef","useState","libraryAgentId","useCallback","useEffect","useMemo","useContext"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getErrorMessage,
|
|
3
3
|
useOptionalServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U7WONUMR.js";
|
|
5
5
|
|
|
6
6
|
// src/atoms/lib/useSearchAgentsList.ts
|
|
7
7
|
import { useCallback, useEffect as useEffect2, useRef, useState as useState2 } from "react";
|
|
@@ -235,4 +235,4 @@ export {
|
|
|
235
235
|
clearScheduleShareSearch,
|
|
236
236
|
replaceScheduleShareSearch
|
|
237
237
|
};
|
|
238
|
-
//# sourceMappingURL=chunk-
|
|
238
|
+
//# sourceMappingURL=chunk-UN7WPTTK.js.map
|
|
@@ -19,16 +19,16 @@ import {
|
|
|
19
19
|
useOptionalApprovalFocus,
|
|
20
20
|
useSlot,
|
|
21
21
|
useSlotIsDefault
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KZK2PQ4A.js";
|
|
23
23
|
import {
|
|
24
24
|
DraftCatalogProvider,
|
|
25
25
|
useDraftCatalog
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KDCVFHPZ.js";
|
|
27
27
|
import {
|
|
28
28
|
useOptionalCatalogServer,
|
|
29
29
|
useOptionalServer,
|
|
30
30
|
useOptionalShellMode
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-U7WONUMR.js";
|
|
32
32
|
import {
|
|
33
33
|
useAui,
|
|
34
34
|
useAuiState
|
|
@@ -679,4 +679,4 @@ export {
|
|
|
679
679
|
ThreadContainer,
|
|
680
680
|
Thread
|
|
681
681
|
};
|
|
682
|
-
//# sourceMappingURL=chunk-
|
|
682
|
+
//# sourceMappingURL=chunk-VTOW2UIX.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cn,
|
|
3
3
|
useOptionalContentClassNames
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NXK4XW4U.js";
|
|
5
5
|
|
|
6
6
|
// src/atoms/OpenUiFenceBlock.tsx
|
|
7
7
|
import { Renderer } from "@openuidev/react-lang";
|
|
@@ -21,4 +21,4 @@ function OpenUiFenceBlock({ content, isStreaming, darkTheme }) {
|
|
|
21
21
|
export {
|
|
22
22
|
OpenUiFenceBlock
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-WFIA627Q.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { LucideIcon } from 'lucide-react';
|
|
|
4
4
|
import { SessionEventItem, AgentDetail, AgentMetricMeter, AgentMetricChartDefinition, AgentMetricGraph, CodeSnippet, AgentLibraryEntry, AgentSpec, ModelSelection, ConnectorState, AgentSkill, McpToolSelection, AgentRuntimeConfig, Schedule, ScheduleRun, ScheduleStatus, CatalogServer, PermissionsServer, AgentUIServer, PermissionResourceType, ResourcePermission, AgentMetricsServer, AgentSessionsServer, ScheduleServer, AgentBuilderCapabilitiesResponse } from '@truefoundry/assistant-ui-runtime/server';
|
|
5
5
|
export { AgentBuilderCapabilitiesResponse, AgentBuilderServer, AgentChatServer, AgentDetail, AgentLibraryEntry, AgentMetricChartData, AgentMetricChartDataRequest, AgentMetricChartDefinition, AgentMetricChartType, AgentMetricGraph, AgentMetricGraphLine, AgentMetricMeter, AgentMetricPoint, AgentMetricRangeRequest, AgentMetricsServer, AgentSessionsServer, AgentSkill, AgentSpec, AgentUIServer, ApprovalDecision, AuthenticateConnectorRequest, CatalogServer, CodeSnippet, CodeSnippetSampleCode, ConnectorAuth, ConnectorAuthApiKey, ConnectorAuthNone, ConnectorAuthOAuth, ConnectorAuthPublic, ConnectorAuthPublicApiKey, ConnectorAuthPublicNone, ConnectorAuthPublicOAuth, ConnectorAuthType, ConnectorAuthenticationResult, ConnectorBase, ConnectorCatalogEntry, ConnectorCatalogServer, ConnectorConfigBase, ConnectorState, CreateConnectorRequest, CreateModelProviderRequest, CreateSandboxProviderRequest, CreateSessionRequest, CreateSkillRequest, CreateSkillRequestBase, CreatedBySubject, DefinedSkill, GithubSkill, ImportGithubSkillRequest, ListPermissionsRequest, ListPermissionsResponse, ListResult, ListSessionEventsParams, ListSessionsOrder, ListSessionsParams, McpServerMount, Model, ModelCatalogServer, ModelEntry, ModelParams, ModelProperties, ModelProviderBase, ModelProviderCatalogEntry, ModelProviderConfigBase, ModelSelection, ModelSelectorEntry, PageParams, PermissionResourceType, PermissionsServer, PreviousTurnIdInput, ProviderEntry, ProviderType, RegistrySkill, ResourcePermission, SandboxCatalogServer, SandboxProviderBase, SandboxProviderCatalogEntry, SandboxProviderConfig, SandboxProviderListEntry, SandboxSnapshotSyncStatus, SaveAgentRequest, SaveAgentResult, SearchAgentsParams, SelectRegistrySkillRequest, Session, SessionEventItem, SessionListEntry, SessionListMetrics, SkillBase, SkillCatalogEntry, SkillCatalogServer, SkillConfigBase, SkillMount, ToolBase, Turn, TurnDoneMetrics, TurnInputItem, TurnState, TurnStreamData, TurnStreamingEvent, UpdateConnectorRequest, UpdateModelProviderRequest, UpdateSandboxProviderRequest, UpdateSessionRequest, UserMessage, UserMessageContent, UserToolApprovalEvent, UserToolResponseEvent } from '@truefoundry/assistant-ui-runtime/server';
|
|
6
6
|
import { TrueForgeApi } from '@truefoundry/trueforge-sdk';
|
|
7
|
+
import * as monaco_editor from 'monaco-editor';
|
|
7
8
|
import { MessagePrimitive, ToolCallMessagePartComponent } from '@assistant-ui/react';
|
|
8
9
|
export { AssistantState, useAui, useAuiState } from '@assistant-ui/react';
|
|
9
10
|
import { UseTrueFoundryAgentRuntimeOptions, TrueFoundryAgentConfig } from '@truefoundry/assistant-ui-runtime';
|
|
@@ -487,6 +488,10 @@ type AgentSessionListRowProps = {
|
|
|
487
488
|
};
|
|
488
489
|
active: boolean;
|
|
489
490
|
onSelect: () => void;
|
|
491
|
+
/** Opens delete confirmation; does not call the API. */
|
|
492
|
+
onRequestDelete?: () => void;
|
|
493
|
+
/** When false, Delete is disabled via PermissionGuard. Defaults to true. */
|
|
494
|
+
canDelete?: boolean;
|
|
490
495
|
};
|
|
491
496
|
type AgentSessionDetailHeaderProps = {
|
|
492
497
|
title: string;
|
|
@@ -680,7 +685,7 @@ declare module '../../theme/SlotsProvider.js' {
|
|
|
680
685
|
}
|
|
681
686
|
}
|
|
682
687
|
|
|
683
|
-
declare function AgentSessionListRow({ title, agentName, sourceType, lastActivityAt, metrics, active, onSelect, }: AgentSessionListRowProps): react.JSX.Element;
|
|
688
|
+
declare function AgentSessionListRow({ title, agentName, sourceType, lastActivityAt, metrics, active, onSelect, onRequestDelete, canDelete, }: AgentSessionListRowProps): react.JSX.Element;
|
|
684
689
|
declare module '../../theme/SlotsProvider.js' {
|
|
685
690
|
interface AtomSlots {
|
|
686
691
|
AgentSessionListRow: typeof AgentSessionListRow;
|
|
@@ -990,6 +995,7 @@ type AgentConfigEditorsProps = {
|
|
|
990
995
|
error: string | null;
|
|
991
996
|
skillsDisabled?: boolean;
|
|
992
997
|
sandboxAvailable?: boolean;
|
|
998
|
+
webSearchAvailable?: boolean;
|
|
993
999
|
instructions?: string;
|
|
994
1000
|
onInstructionsSave?: (draft: AgentInstructionsDraft) => void;
|
|
995
1001
|
loadMcpConnector?: (connectorId: string) => Promise<ConnectorState | undefined>;
|
|
@@ -998,7 +1004,7 @@ type AgentConfigEditorsProps = {
|
|
|
998
1004
|
onChange: (spec: AgentSpec) => void;
|
|
999
1005
|
onClose: () => void;
|
|
1000
1006
|
};
|
|
1001
|
-
declare function AgentConfigEditors({ editor, spec, models, connectors, skills, loading, error, skillsDisabled, sandboxAvailable, instructions, onInstructionsSave, loadMcpConnector, loadMcpTools, onRefreshConnectors, onChange, onClose, }: AgentConfigEditorsProps): react.JSX.Element;
|
|
1007
|
+
declare function AgentConfigEditors({ editor, spec, models, connectors, skills, loading, error, skillsDisabled, sandboxAvailable, webSearchAvailable, instructions, onInstructionsSave, loadMcpConnector, loadMcpTools, onRefreshConnectors, onChange, onClose, }: AgentConfigEditorsProps): react.JSX.Element;
|
|
1002
1008
|
declare module '../../theme/SlotsProvider.js' {
|
|
1003
1009
|
interface AtomSlots {
|
|
1004
1010
|
AgentConfigEditors: typeof AgentConfigEditors;
|
|
@@ -1013,6 +1019,7 @@ type AgentConfigPanelProps = {
|
|
|
1013
1019
|
modelsError: string | null;
|
|
1014
1020
|
skills?: AgentSkill[];
|
|
1015
1021
|
skillsAvailable: boolean;
|
|
1022
|
+
webSearchAvailable?: boolean;
|
|
1016
1023
|
instructions: string;
|
|
1017
1024
|
onOpenEditor: (editor: AgentConfigEditor) => void;
|
|
1018
1025
|
onChange?: (spec: AgentSpec) => void;
|
|
@@ -1028,7 +1035,7 @@ declare function AgentConfigSection({ title, description, icon, actionIcon, acti
|
|
|
1028
1035
|
onEdit?: () => void;
|
|
1029
1036
|
children?: ReactNode;
|
|
1030
1037
|
}): react.JSX.Element;
|
|
1031
|
-
declare function AgentConfigPanel({ spec, model, models, modelsLoading, modelsError, skills: catalogSkills, skillsAvailable, instructions, onOpenEditor, onChange, onClose, disabled, }: AgentConfigPanelProps): react.JSX.Element;
|
|
1038
|
+
declare function AgentConfigPanel({ spec, model, models, modelsLoading, modelsError, skills: catalogSkills, skillsAvailable, webSearchAvailable, instructions, onOpenEditor, onChange, onClose, disabled, }: AgentConfigPanelProps): react.JSX.Element;
|
|
1032
1039
|
declare module '../../theme/SlotsProvider.js' {
|
|
1033
1040
|
interface AtomSlots {
|
|
1034
1041
|
AgentConfigPanel: typeof AgentConfigPanel;
|
|
@@ -1054,6 +1061,8 @@ type AgentMcpEditorContentProps = {
|
|
|
1054
1061
|
query: string;
|
|
1055
1062
|
activeConnectorId: string | null;
|
|
1056
1063
|
tools: McpToolSelection[];
|
|
1064
|
+
/** Tools already loaded per connector id, so selected servers can show approval state. */
|
|
1065
|
+
toolsByConnector?: Record<string, McpToolSelection[]>;
|
|
1057
1066
|
connectorLoading: boolean;
|
|
1058
1067
|
connectorError: string | null;
|
|
1059
1068
|
toolsLoading: boolean;
|
|
@@ -1064,7 +1073,7 @@ type AgentMcpEditorContentProps = {
|
|
|
1064
1073
|
onRefreshConnector?: () => void;
|
|
1065
1074
|
onChange: (spec: AgentSpec) => void;
|
|
1066
1075
|
};
|
|
1067
|
-
declare function AgentMcpEditorContent({ spec, connectors, query, activeConnectorId, tools, connectorLoading, connectorError, toolsLoading, toolsError, onQueryChange, onSelectConnector, onRetryTools, onRefreshConnector, onChange, }: AgentMcpEditorContentProps): react.JSX.Element;
|
|
1076
|
+
declare function AgentMcpEditorContent({ spec, connectors, query, activeConnectorId, tools, toolsByConnector, connectorLoading, connectorError, toolsLoading, toolsError, onQueryChange, onSelectConnector, onRetryTools, onRefreshConnector, onChange, }: AgentMcpEditorContentProps): react.JSX.Element;
|
|
1068
1077
|
declare module '../../theme/SlotsProvider.js' {
|
|
1069
1078
|
interface AtomSlots {
|
|
1070
1079
|
AgentMcpEditorContent: typeof AgentMcpEditorContent;
|
|
@@ -1126,6 +1135,7 @@ type AgentResourceConfigModalProps = {
|
|
|
1126
1135
|
query: string;
|
|
1127
1136
|
activeConnectorId: string | null;
|
|
1128
1137
|
tools: McpToolSelection[];
|
|
1138
|
+
toolsByConnector?: Record<string, McpToolSelection[]>;
|
|
1129
1139
|
connectorLoading: boolean;
|
|
1130
1140
|
connectorError: string | null;
|
|
1131
1141
|
toolsLoading: boolean;
|
|
@@ -1153,6 +1163,7 @@ type AgentResourceEditorContentProps = {
|
|
|
1153
1163
|
query: string;
|
|
1154
1164
|
activeConnectorId: string | null;
|
|
1155
1165
|
tools: McpToolSelection[];
|
|
1166
|
+
toolsByConnector?: Record<string, McpToolSelection[]>;
|
|
1156
1167
|
connectorLoading: boolean;
|
|
1157
1168
|
connectorError: string | null;
|
|
1158
1169
|
toolsLoading: boolean;
|
|
@@ -1174,10 +1185,11 @@ type AgentRuntimeConfigDrawerProps = {
|
|
|
1174
1185
|
open: boolean;
|
|
1175
1186
|
spec: AgentSpec;
|
|
1176
1187
|
sandboxAvailable: boolean;
|
|
1188
|
+
webSearchAvailable?: boolean;
|
|
1177
1189
|
onChange: (spec: AgentSpec) => void;
|
|
1178
1190
|
onClose: () => void;
|
|
1179
1191
|
};
|
|
1180
|
-
declare function AgentRuntimeConfigDrawer({ open, spec, sandboxAvailable, onChange, onClose, }: AgentRuntimeConfigDrawerProps): react.JSX.Element;
|
|
1192
|
+
declare function AgentRuntimeConfigDrawer({ open, spec, sandboxAvailable, webSearchAvailable, onChange, onClose, }: AgentRuntimeConfigDrawerProps): react.JSX.Element;
|
|
1181
1193
|
declare module '../../theme/SlotsProvider.js' {
|
|
1182
1194
|
interface AtomSlots {
|
|
1183
1195
|
AgentRuntimeConfigDrawer: typeof AgentRuntimeConfigDrawer;
|
|
@@ -1187,13 +1199,14 @@ declare module '../../theme/SlotsProvider.js' {
|
|
|
1187
1199
|
type AgentRuntimeConfigFieldsProps = {
|
|
1188
1200
|
value: AgentRuntimeConfig;
|
|
1189
1201
|
sandboxAvailable: boolean;
|
|
1202
|
+
webSearchAvailable?: boolean;
|
|
1190
1203
|
hasSkills: boolean;
|
|
1191
1204
|
disabled?: boolean;
|
|
1192
1205
|
showCapabilities?: boolean;
|
|
1193
1206
|
layout?: 'compact' | 'detailed';
|
|
1194
1207
|
onChange: (value: AgentRuntimeConfig) => void;
|
|
1195
1208
|
};
|
|
1196
|
-
declare function AgentRuntimeConfigFields({ value, sandboxAvailable, hasSkills, disabled, showCapabilities, layout, onChange, }: AgentRuntimeConfigFieldsProps): react.JSX.Element;
|
|
1209
|
+
declare function AgentRuntimeConfigFields({ value, sandboxAvailable, webSearchAvailable, hasSkills, disabled, showCapabilities, layout, onChange, }: AgentRuntimeConfigFieldsProps): react.JSX.Element;
|
|
1197
1210
|
declare module '../../theme/SlotsProvider.js' {
|
|
1198
1211
|
interface AtomSlots {
|
|
1199
1212
|
AgentRuntimeConfigFields: typeof AgentRuntimeConfigFields;
|
|
@@ -1203,9 +1216,10 @@ declare module '../../theme/SlotsProvider.js' {
|
|
|
1203
1216
|
type AgentRuntimeEditorContentProps = {
|
|
1204
1217
|
spec: AgentSpec;
|
|
1205
1218
|
sandboxAvailable: boolean;
|
|
1219
|
+
webSearchAvailable?: boolean;
|
|
1206
1220
|
onChange: (spec: AgentSpec) => void;
|
|
1207
1221
|
};
|
|
1208
|
-
declare function AgentRuntimeEditorContent({ spec, sandboxAvailable, onChange }: AgentRuntimeEditorContentProps): react.JSX.Element;
|
|
1222
|
+
declare function AgentRuntimeEditorContent({ spec, sandboxAvailable, webSearchAvailable, onChange, }: AgentRuntimeEditorContentProps): react.JSX.Element;
|
|
1209
1223
|
declare module '../../theme/SlotsProvider.js' {
|
|
1210
1224
|
interface AtomSlots {
|
|
1211
1225
|
AgentRuntimeEditorContent: typeof AgentRuntimeEditorContent;
|
|
@@ -1242,6 +1256,7 @@ type AgentCapabilityValues = {
|
|
|
1242
1256
|
generativeUi: boolean;
|
|
1243
1257
|
dynamicSubAgents: boolean;
|
|
1244
1258
|
askUserQuestions: boolean;
|
|
1259
|
+
webSearch: boolean;
|
|
1245
1260
|
};
|
|
1246
1261
|
|
|
1247
1262
|
declare function DraftCapabilitiesPanel({ value, onChange, disabled, divided, layout, }: {
|
|
@@ -2258,6 +2273,9 @@ declare function AvatarImage({ className, src, alt, onError, ...props }: AvatarI
|
|
|
2258
2273
|
type AvatarFallbackProps = react__default.HTMLAttributes<HTMLDivElement>;
|
|
2259
2274
|
declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): react__default.JSX.Element;
|
|
2260
2275
|
|
|
2276
|
+
/** Start loading Monaco without mounting an editor. Safe to call repeatedly. */
|
|
2277
|
+
declare function preloadMonaco(): Promise<typeof monaco_editor>;
|
|
2278
|
+
|
|
2261
2279
|
interface AgentStepsContainerProps {
|
|
2262
2280
|
toolCount: number;
|
|
2263
2281
|
thinkingCount: number;
|
|
@@ -2730,6 +2748,17 @@ type ApprovalNavState = {
|
|
|
2730
2748
|
*/
|
|
2731
2749
|
declare function useApprovalNav(): ApprovalNavState;
|
|
2732
2750
|
|
|
2751
|
+
type UseCanCreateAgentResult = {
|
|
2752
|
+
loading: boolean;
|
|
2753
|
+
/** False while loading, on error, or when CREATE is not granted (fail-closed). */
|
|
2754
|
+
canCreateAgent: boolean;
|
|
2755
|
+
};
|
|
2756
|
+
/**
|
|
2757
|
+
* Tenant-scoped create-agent grant via `list-permissions` (`resource_type: tenant`).
|
|
2758
|
+
* When no permissions server is configured (standalone without port), allows create.
|
|
2759
|
+
*/
|
|
2760
|
+
declare function useCanCreateAgent(): UseCanCreateAgentResult;
|
|
2761
|
+
|
|
2733
2762
|
type ComposerBusyState = {
|
|
2734
2763
|
/** True while submitting or while the turn stream is active. */
|
|
2735
2764
|
isBusy: boolean;
|
|
@@ -2910,4 +2939,4 @@ declare function DraftCatalogProvider({ children }: {
|
|
|
2910
2939
|
}): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null | undefined;
|
|
2911
2940
|
declare function useDraftCatalog(): DraftCatalogValue;
|
|
2912
2941
|
|
|
2913
|
-
export { AgentCodeBlock, type AgentCodeBlockProps, type AgentCodeSnippetsProps, type AgentConfig, type AgentConfigEditor, AgentConfigEditors, type AgentConfigEditorsProps, AgentConfigPanel, type AgentConfigPanelProps, AgentConfigSection, AgentCustomParametersEditor, type AgentCustomParametersEditorProps, AgentDetailsHeader, type AgentDetailsHeaderProps, AgentDetailsPage, type AgentDetailsPageProps, type AgentDetailsTab, AgentDetailsTabs, type AgentDetailsTabsProps, AgentDetailsUnavailable, type AgentDetailsUnavailableProps, AgentInstructionsDrawer, type AgentInstructionsDrawerProps, AgentMcpEditorContent, type AgentMcpEditorContentProps, AgentMetricCard, type AgentMetricCardProps, AgentMetricChart, type AgentMetricChartProps, type AgentMetricChartResult, AgentMetricStatistics, type AgentMetricStatisticsProps, AgentMetricsContainer, type AgentMetricsProps, AgentMetricsTimeRangeFilter, type AgentMetricsTimeRangeFilterProps, AgentMetricsView, type AgentMetricsViewProps, AgentModelConfigModal, type AgentModelConfigModalProps, AgentModelEditorContent, type AgentModelEditorContentProps, AgentModelSettingsContent, type AgentModelSettingsContentProps, AgentOverviewCard, type AgentOverviewCardProps, type AgentOverviewProps, AgentResourceConfigModal, type AgentResourceConfigModalProps, AgentResourceEditorContent, type AgentResourceEditorContentProps, AgentRuntimeConfigDrawer, type AgentRuntimeConfigDrawerProps, AgentRuntimeConfigFields, type AgentRuntimeConfigFieldsProps, AgentRuntimeEditorContent, type AgentRuntimeEditorContentProps, type AgentSessionDetailHeaderProps, type AgentSessionEventTimelineChartProps, type AgentSessionEventTimelineProps, type AgentSessionListRowProps, type AgentSessionMetricsStripProps, type AgentSessionTurnHeaderProps, AgentSessionsFilters, type AgentSessionsFiltersProps, type AgentSessionsProps, AgentSkillsEditorContent, type AgentSkillsEditorContentProps, type AgentStepPart, AgentStepsCard, type AgentStepsCardProps, AgentStepsContainer, type AgentStepsContainerProps, type AgentStepsSplitResult, AgentsLibrary, AgentsLibraryButton, type AgentsLibraryButtonProps, type AgentsLibraryProps, ApprovalNavBanner, type ApprovalNavBannerProps, ApprovalNavContainer, type ApprovalNavState, type AskUserAnswerDraft, type AnsweredQuestion as AskUserAnsweredQuestion, AskUserContainer, type AskUserPromptProps, type Question as AskUserQuestion, type AskUserPromptProps as AskUserQuestionCardProps, AssistantMessageBubble, type AssistantMessageBubbleProps, AssistantMessageContainer, AssistantTextContainer, type PublicAtomSlots as AtomSlots, AttachmentCard, type AttachmentCardProps, type AttachmentCardSize, AttachmentPickerButton, type AttachmentPickerButtonProps, AttachmentPreviewDialog, type AttachmentPreviewDialogProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, BottomSheet, type BottomSheetProps, type BrandChrome, type BrandConfig, type BrandImage, BrandLogo, type BrandLogoConfig, type BrandMode, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CenteredModal, type CenteredModalProps, ChatFileDownload, type ChatFileDownloadFile, type ChatFileDownloadProps, type ChatLayout, ClearChatButton, CodeEditor, type CodeEditorProps, ComposerAttachmentPickerContainer, ComposerAttachmentsContainer, ComposerBusyProvider, type ComposerBusyState, ComposerContainer, type ComposerContainerProps, ComposerLeftSection, type ComposerLeftSectionProps, type ComposerPauseView, ComposerRightSection, type ComposerRightSectionProps, ComposerSendButton, type ComposerSendButtonProps, ComposerShell, type ComposerShellProps, type ContentClassNames, type CurrentUser, CustomActionContainer, type CustomActionRendererProps, type CustomActionRenderers, CustomActionRenderersProvider, DEFAULT_AGENT_CONFIG, DEFAULT_TABLE_PAGE_SIZE, DraftAgentConfigTrigger, type DraftAgentConfigTriggerProps, DraftCapabilitiesPanel, DraftCatalogProvider, type DraftComposerAction, DraftComposerActionsMenu, type DraftComposerActionsMenuProps, DraftComposerLeftSection, DraftComposerRightSection, DraftCompositeSelector, type DraftCompositeSelectorProps, DraftModelSelector, type DraftModelSelectorProps, type FixedVariantButtonProps, HistoryLoader, HistoryLoaderContainer, type HistoryLoaderProps, IS_CREATE_AGENT_METADATA_KEY, Icon, type IconButtonProps, type IconMap, type IconProps, type LayoutProp, MCP_AUTH_POPUP_CHANNEL, Markdown, type MarkdownProps, type McpAuthCallback, type McpAuthPromptProps as McpAuthCardProps, McpAuthContainer, type McpAuthPopupMessage, type McpAuthPromptProps, type McpServer as McpAuthServer, MessageActionBar, type MessageActionBarProps, MessageAttachmentsContainer, MessageErrorBanner, type MessageErrorBannerProps, MessageGroup, type MessageGroupProps, MessageIndicator, type MessageIndicatorProps, MessageListSkeleton, type MessageListSkeletonProps, MessageTimestamp, type MessageTimestampProps, MonacoEditorCore, type MonacoEditorCoreProps, OpenUiFenceBlock, type OpenUiFenceBlockProps, PRESETS, PermissionGuard, type PermissionGuardProps, PopoverSelect, type PopoverSelectOption, type PopoverSelectProps, PostMcpOauthScreen, type ReasoningCardProps, ReasoningContainer, ResponsiveDropdownMenu, type ResponsiveDropdownMenuProps, ResumeUnavailable, ResumeUnavailableContainer, type ResumeUnavailableProps, type RoutePlace, type RoutesConfig, SandboxArtifactDownload, type SandboxArtifactDownloadProps, SandboxToolCallCard, type SandboxToolCallCardProps, SaveAgentButton, type SaveAgentButtonProps, SaveAgentForm, type SaveAgentFormProps, ScheduleFormDrawer, type ScheduleFormDrawerProps, ScheduleFormFields, type ScheduleFormFieldsProps, ScheduleLastRunsCell, type ScheduleMcpMount, ScheduleRunChip, ScheduleStatusBadge, SchedulesButton, type SchedulesButtonProps, SchedulesPage, type SchedulesPageProps, ScrollToBottomButton, type ScrollToBottomButtonProps, SelectAgentEmptyState, type SelectLibraryAgentRequest, type SemanticTokens, ServerProvider, type SessionEventTimelineSegment, type SessionEventType, type SessionTurnView, SessionsBrowserButton, type SessionsBrowserButtonProps, SessionsPage, ShellActionsActionSlot, type ShellMode, ShellModeProvider, SideDrawer, type SideDrawerAnchor, type SideDrawerProps, type SideDrawerSize, type SlotOverrides, SlotsProvider, SubAgentCard, type SubAgentCardProps, Switch, type SwitchProps, type SwitchSize, SyntaxHighlighter, type SyntaxHighlighterProps, TABLE_PAGE_SIZE_OPTIONS, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, TableTokenPagination, type TableTokenPaginationProps, TestScheduleScreen, type TestScheduleScreenProps, type ThemeConfig, type IconProps$1 as ThemeIconProps, type ThemeMode, type ThemePreset, ThemeProvider, Thread, ThreadComposerAreaShell, type ThreadComposerAreaShellProps, ThreadContainer, type ThreadContainerProps, type ThreadGroupPart, ThreadListContainer, type ThreadListContainerProps, ThreadListEmptyState, type ThreadListEmptyStateProps, ThreadListNewButton, type ThreadListNewButtonProps, ThreadListRow, type ThreadListRowProps, ThreadListRowSkeleton, type ThreadListRowSkeletonProps, ThreadListShell, type ThreadListShellProps, type ThreadPauseState, ThreadRootShell, type ThreadRootShellProps, ThreadViewportShell, type ThreadViewportShellProps, Toast, type ToastProps, ToastStack, type ToastStackProps, ToasterProvider, ToolApprovalBar, type ToolApprovalBarProps, ToolApprovalContainer, type ToolApprovalOption, ToolCallCard, type ToolCallCardProps, ToolCallContainer, ToolCallContentBlock, ToolCallContentBlockContainer, type ToolCallContentBlockProps, type ToolCallStatus, ToolGroupCard, type ToolGroupCardProps, ToolGroupContainer, type TrueForgeBuiltInServerConfig, type TrueForgeServerConfig, TrueForgeUI, type TrueForgeUIProps, TrueFoundryChatProvider, type TrueFoundryChatProviderProps, USER_MESSAGE_ATTACHMENT_PREVIEW_REM, type UseMCPAuthOptions, type UseResourcePermissionsOptions, type UseResourcePermissionsResult, UserAvatar, type UserAvatarProps, UserEditComposerContainer, UserMessageActionBar, type UserMessageActionBarProps, UserMessageBubble, type UserMessageBubbleProps, UserMessageContainer, UserMessageEdit, type UserMessageEditProps, WelcomeScreen, type WelcomeScreenProps, computeAgentStepsSplit, defaultSlots, findSubAgentAncestorsForApproval, getErrorMessage, isCreateAgentMetadataValue, libraryAgentId, preloadMarkdownOpenUI, readSessionIsCreateAgent, resolveBrandChrome, resolvePresetTokens, sessionIsCreateAgent, shellIsCreateAgent, shellIsMutable, threadHasPendingMcpAuth, useAgentMetricsServer, useAgentSessionsServer, useApprovalNav, useBrand, useBrandName, useCatalogServer, useComposerBusyState, useComposerPauseView, useContentClassNames, useDraftCatalog, useMCPAuth, useOptionalAgentMetricsServer, useOptionalAgentSessionsServer, useOptionalCatalogServer, useOptionalContentClassNames, useOptionalCurrentUser, useOptionalCustomActionRenderers, useOptionalPermissionsServer, useOptionalScheduleServer, useOptionalServer, useOptionalShellMode, useResourcePermissions, useScheduleServer, useServer, useServerCapabilities, useShellMode, useSlot, useTheme, useThemeIcons, useThemeMode, useToaster, useToasterOptional };
|
|
2942
|
+
export { AgentCodeBlock, type AgentCodeBlockProps, type AgentCodeSnippetsProps, type AgentConfig, type AgentConfigEditor, AgentConfigEditors, type AgentConfigEditorsProps, AgentConfigPanel, type AgentConfigPanelProps, AgentConfigSection, AgentCustomParametersEditor, type AgentCustomParametersEditorProps, AgentDetailsHeader, type AgentDetailsHeaderProps, AgentDetailsPage, type AgentDetailsPageProps, type AgentDetailsTab, AgentDetailsTabs, type AgentDetailsTabsProps, AgentDetailsUnavailable, type AgentDetailsUnavailableProps, AgentInstructionsDrawer, type AgentInstructionsDrawerProps, AgentMcpEditorContent, type AgentMcpEditorContentProps, AgentMetricCard, type AgentMetricCardProps, AgentMetricChart, type AgentMetricChartProps, type AgentMetricChartResult, AgentMetricStatistics, type AgentMetricStatisticsProps, AgentMetricsContainer, type AgentMetricsProps, AgentMetricsTimeRangeFilter, type AgentMetricsTimeRangeFilterProps, AgentMetricsView, type AgentMetricsViewProps, AgentModelConfigModal, type AgentModelConfigModalProps, AgentModelEditorContent, type AgentModelEditorContentProps, AgentModelSettingsContent, type AgentModelSettingsContentProps, AgentOverviewCard, type AgentOverviewCardProps, type AgentOverviewProps, AgentResourceConfigModal, type AgentResourceConfigModalProps, AgentResourceEditorContent, type AgentResourceEditorContentProps, AgentRuntimeConfigDrawer, type AgentRuntimeConfigDrawerProps, AgentRuntimeConfigFields, type AgentRuntimeConfigFieldsProps, AgentRuntimeEditorContent, type AgentRuntimeEditorContentProps, type AgentSessionDetailHeaderProps, type AgentSessionEventTimelineChartProps, type AgentSessionEventTimelineProps, type AgentSessionListRowProps, type AgentSessionMetricsStripProps, type AgentSessionTurnHeaderProps, AgentSessionsFilters, type AgentSessionsFiltersProps, type AgentSessionsProps, AgentSkillsEditorContent, type AgentSkillsEditorContentProps, type AgentStepPart, AgentStepsCard, type AgentStepsCardProps, AgentStepsContainer, type AgentStepsContainerProps, type AgentStepsSplitResult, AgentsLibrary, AgentsLibraryButton, type AgentsLibraryButtonProps, type AgentsLibraryProps, ApprovalNavBanner, type ApprovalNavBannerProps, ApprovalNavContainer, type ApprovalNavState, type AskUserAnswerDraft, type AnsweredQuestion as AskUserAnsweredQuestion, AskUserContainer, type AskUserPromptProps, type Question as AskUserQuestion, type AskUserPromptProps as AskUserQuestionCardProps, AssistantMessageBubble, type AssistantMessageBubbleProps, AssistantMessageContainer, AssistantTextContainer, type PublicAtomSlots as AtomSlots, AttachmentCard, type AttachmentCardProps, type AttachmentCardSize, AttachmentPickerButton, type AttachmentPickerButtonProps, AttachmentPreviewDialog, type AttachmentPreviewDialogProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, BottomSheet, type BottomSheetProps, type BrandChrome, type BrandConfig, type BrandImage, BrandLogo, type BrandLogoConfig, type BrandMode, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CenteredModal, type CenteredModalProps, ChatFileDownload, type ChatFileDownloadFile, type ChatFileDownloadProps, type ChatLayout, ClearChatButton, CodeEditor, type CodeEditorProps, ComposerAttachmentPickerContainer, ComposerAttachmentsContainer, ComposerBusyProvider, type ComposerBusyState, ComposerContainer, type ComposerContainerProps, ComposerLeftSection, type ComposerLeftSectionProps, type ComposerPauseView, ComposerRightSection, type ComposerRightSectionProps, ComposerSendButton, type ComposerSendButtonProps, ComposerShell, type ComposerShellProps, type ContentClassNames, type CurrentUser, CustomActionContainer, type CustomActionRendererProps, type CustomActionRenderers, CustomActionRenderersProvider, DEFAULT_AGENT_CONFIG, DEFAULT_TABLE_PAGE_SIZE, DraftAgentConfigTrigger, type DraftAgentConfigTriggerProps, DraftCapabilitiesPanel, DraftCatalogProvider, type DraftComposerAction, DraftComposerActionsMenu, type DraftComposerActionsMenuProps, DraftComposerLeftSection, DraftComposerRightSection, DraftCompositeSelector, type DraftCompositeSelectorProps, DraftModelSelector, type DraftModelSelectorProps, type FixedVariantButtonProps, HistoryLoader, HistoryLoaderContainer, type HistoryLoaderProps, IS_CREATE_AGENT_METADATA_KEY, Icon, type IconButtonProps, type IconMap, type IconProps, type LayoutProp, MCP_AUTH_POPUP_CHANNEL, Markdown, type MarkdownProps, type McpAuthCallback, type McpAuthPromptProps as McpAuthCardProps, McpAuthContainer, type McpAuthPopupMessage, type McpAuthPromptProps, type McpServer as McpAuthServer, MessageActionBar, type MessageActionBarProps, MessageAttachmentsContainer, MessageErrorBanner, type MessageErrorBannerProps, MessageGroup, type MessageGroupProps, MessageIndicator, type MessageIndicatorProps, MessageListSkeleton, type MessageListSkeletonProps, MessageTimestamp, type MessageTimestampProps, MonacoEditorCore, type MonacoEditorCoreProps, OpenUiFenceBlock, type OpenUiFenceBlockProps, PRESETS, PermissionGuard, type PermissionGuardProps, PopoverSelect, type PopoverSelectOption, type PopoverSelectProps, PostMcpOauthScreen, type ReasoningCardProps, ReasoningContainer, ResponsiveDropdownMenu, type ResponsiveDropdownMenuProps, ResumeUnavailable, ResumeUnavailableContainer, type ResumeUnavailableProps, type RoutePlace, type RoutesConfig, SandboxArtifactDownload, type SandboxArtifactDownloadProps, SandboxToolCallCard, type SandboxToolCallCardProps, SaveAgentButton, type SaveAgentButtonProps, SaveAgentForm, type SaveAgentFormProps, ScheduleFormDrawer, type ScheduleFormDrawerProps, ScheduleFormFields, type ScheduleFormFieldsProps, ScheduleLastRunsCell, type ScheduleMcpMount, ScheduleRunChip, ScheduleStatusBadge, SchedulesButton, type SchedulesButtonProps, SchedulesPage, type SchedulesPageProps, ScrollToBottomButton, type ScrollToBottomButtonProps, SelectAgentEmptyState, type SelectLibraryAgentRequest, type SemanticTokens, ServerProvider, type SessionEventTimelineSegment, type SessionEventType, type SessionTurnView, SessionsBrowserButton, type SessionsBrowserButtonProps, SessionsPage, ShellActionsActionSlot, type ShellMode, ShellModeProvider, SideDrawer, type SideDrawerAnchor, type SideDrawerProps, type SideDrawerSize, type SlotOverrides, SlotsProvider, SubAgentCard, type SubAgentCardProps, Switch, type SwitchProps, type SwitchSize, SyntaxHighlighter, type SyntaxHighlighterProps, TABLE_PAGE_SIZE_OPTIONS, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, TableTokenPagination, type TableTokenPaginationProps, TestScheduleScreen, type TestScheduleScreenProps, type ThemeConfig, type IconProps$1 as ThemeIconProps, type ThemeMode, type ThemePreset, ThemeProvider, Thread, ThreadComposerAreaShell, type ThreadComposerAreaShellProps, ThreadContainer, type ThreadContainerProps, type ThreadGroupPart, ThreadListContainer, type ThreadListContainerProps, ThreadListEmptyState, type ThreadListEmptyStateProps, ThreadListNewButton, type ThreadListNewButtonProps, ThreadListRow, type ThreadListRowProps, ThreadListRowSkeleton, type ThreadListRowSkeletonProps, ThreadListShell, type ThreadListShellProps, type ThreadPauseState, ThreadRootShell, type ThreadRootShellProps, ThreadViewportShell, type ThreadViewportShellProps, Toast, type ToastProps, ToastStack, type ToastStackProps, ToasterProvider, ToolApprovalBar, type ToolApprovalBarProps, ToolApprovalContainer, type ToolApprovalOption, ToolCallCard, type ToolCallCardProps, ToolCallContainer, ToolCallContentBlock, ToolCallContentBlockContainer, type ToolCallContentBlockProps, type ToolCallStatus, ToolGroupCard, type ToolGroupCardProps, ToolGroupContainer, type TrueForgeBuiltInServerConfig, type TrueForgeServerConfig, TrueForgeUI, type TrueForgeUIProps, TrueFoundryChatProvider, type TrueFoundryChatProviderProps, USER_MESSAGE_ATTACHMENT_PREVIEW_REM, type UseCanCreateAgentResult, type UseMCPAuthOptions, type UseResourcePermissionsOptions, type UseResourcePermissionsResult, UserAvatar, type UserAvatarProps, UserEditComposerContainer, UserMessageActionBar, type UserMessageActionBarProps, UserMessageBubble, type UserMessageBubbleProps, UserMessageContainer, UserMessageEdit, type UserMessageEditProps, WelcomeScreen, type WelcomeScreenProps, computeAgentStepsSplit, defaultSlots, findSubAgentAncestorsForApproval, getErrorMessage, isCreateAgentMetadataValue, libraryAgentId, preloadMarkdownOpenUI, preloadMonaco, readSessionIsCreateAgent, resolveBrandChrome, resolvePresetTokens, sessionIsCreateAgent, shellIsCreateAgent, shellIsMutable, threadHasPendingMcpAuth, useAgentMetricsServer, useAgentSessionsServer, useApprovalNav, useBrand, useBrandName, useCanCreateAgent, useCatalogServer, useComposerBusyState, useComposerPauseView, useContentClassNames, useDraftCatalog, useMCPAuth, useOptionalAgentMetricsServer, useOptionalAgentSessionsServer, useOptionalCatalogServer, useOptionalContentClassNames, useOptionalCurrentUser, useOptionalCustomActionRenderers, useOptionalPermissionsServer, useOptionalScheduleServer, useOptionalServer, useOptionalShellMode, useResourcePermissions, useScheduleServer, useServer, useServerCapabilities, useShellMode, useSlot, useTheme, useThemeIcons, useThemeMode, useToaster, useToasterOptional };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
ThreadListContainer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MEW7WZ7Q.js";
|
|
5
5
|
import {
|
|
6
6
|
ApprovalNavContainer,
|
|
7
7
|
AskUserContainer,
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
threadHasPendingMcpAuth,
|
|
17
17
|
useApprovalNav,
|
|
18
18
|
useComposerPauseView
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VTOW2UIX.js";
|
|
20
20
|
import {
|
|
21
21
|
ServerInitLoader,
|
|
22
22
|
TrueForgeUIShell,
|
|
23
23
|
TrueFoundryChatProvider
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-BREN6OSX.js";
|
|
25
25
|
import "./chunk-DJUFS2BW.js";
|
|
26
26
|
import {
|
|
27
27
|
ComposerBusyProvider,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunk-BSIPI3KV.js";
|
|
32
32
|
import {
|
|
33
33
|
AgentMetricChart
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-SCIEO6CF.js";
|
|
35
35
|
import {
|
|
36
36
|
createTrueFoundryServer
|
|
37
37
|
} from "./chunk-7AAO4UDQ.js";
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
ScheduleStatusBadge,
|
|
51
51
|
SchedulesPage,
|
|
52
52
|
TestScheduleScreen
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-QI4HGU5E.js";
|
|
54
54
|
import {
|
|
55
55
|
AgentCodeBlock,
|
|
56
56
|
AgentConfigEditors,
|
|
@@ -183,8 +183,10 @@ import {
|
|
|
183
183
|
defaultSlots,
|
|
184
184
|
findSubAgentAncestorsForApproval,
|
|
185
185
|
preloadMarkdownOpenUI,
|
|
186
|
+
preloadMonaco,
|
|
186
187
|
resolveBrandChrome,
|
|
187
188
|
useBrandName,
|
|
189
|
+
useCanCreateAgent,
|
|
188
190
|
useMCPAuth,
|
|
189
191
|
useOptionalCurrentUser,
|
|
190
192
|
useResourcePermissions,
|
|
@@ -192,14 +194,14 @@ import {
|
|
|
192
194
|
useThemeMode,
|
|
193
195
|
useToaster,
|
|
194
196
|
useToasterOptional
|
|
195
|
-
} from "./chunk-
|
|
196
|
-
import "./chunk-
|
|
197
|
+
} from "./chunk-KZK2PQ4A.js";
|
|
198
|
+
import "./chunk-UN7WPTTK.js";
|
|
197
199
|
import {
|
|
198
200
|
DraftCatalogProvider,
|
|
199
201
|
Icon,
|
|
200
202
|
registerIcons,
|
|
201
203
|
useDraftCatalog
|
|
202
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-KDCVFHPZ.js";
|
|
203
205
|
import {
|
|
204
206
|
DEFAULT_AGENT_CONFIG,
|
|
205
207
|
ServerProvider,
|
|
@@ -222,14 +224,14 @@ import {
|
|
|
222
224
|
useServer,
|
|
223
225
|
useServerCapabilities,
|
|
224
226
|
useShellMode
|
|
225
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-U7WONUMR.js";
|
|
226
228
|
import {
|
|
227
229
|
useAui,
|
|
228
230
|
useAuiState
|
|
229
231
|
} from "./chunk-M6MHLVSO.js";
|
|
230
232
|
import {
|
|
231
233
|
OpenUiFenceBlock
|
|
232
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-WFIA627Q.js";
|
|
233
235
|
import {
|
|
234
236
|
PRESETS,
|
|
235
237
|
ThemeProvider,
|
|
@@ -239,7 +241,7 @@ import {
|
|
|
239
241
|
useOptionalContentClassNames,
|
|
240
242
|
useTheme,
|
|
241
243
|
useThemeIcons
|
|
242
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-NXK4XW4U.js";
|
|
243
245
|
|
|
244
246
|
// src/icons/agent-2.svg
|
|
245
247
|
import * as React from "react";
|
|
@@ -440,7 +442,7 @@ function ToolGroupContainer({ children, group }) {
|
|
|
440
442
|
import { lazy, Suspense } from "react";
|
|
441
443
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
442
444
|
var TrueForgeUIWithRouter = lazy(
|
|
443
|
-
() => import("./TrueForgeUIWithRouter-
|
|
445
|
+
() => import("./TrueForgeUIWithRouter-MKJ7IEWG.js").then((m) => ({ default: m.TrueForgeUIWithRouter }))
|
|
444
446
|
);
|
|
445
447
|
function TrueForgeUI(props) {
|
|
446
448
|
const isMcpAuthScreen = typeof window !== "undefined" && new URLSearchParams(window.location.search).get("screenType") === "mcp-auth";
|
|
@@ -641,6 +643,7 @@ export {
|
|
|
641
643
|
libraryAgentId,
|
|
642
644
|
mergeAgentSpec,
|
|
643
645
|
preloadMarkdownOpenUI,
|
|
646
|
+
preloadMonaco,
|
|
644
647
|
readSessionIsCreateAgent,
|
|
645
648
|
resolveBrandChrome,
|
|
646
649
|
resolvePresetTokens,
|
|
@@ -656,6 +659,7 @@ export {
|
|
|
656
659
|
useAuiState,
|
|
657
660
|
useBrand,
|
|
658
661
|
useBrandName,
|
|
662
|
+
useCanCreateAgent,
|
|
659
663
|
useCatalogServer,
|
|
660
664
|
useComposerBusyState,
|
|
661
665
|
useComposerPauseView,
|