@truefoundry/trueforge-ui 0.3.0-rc.3 → 0.3.0-rc.5

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.
Files changed (86) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/dist/{AgentCodeSnippets-N546FNNS.js → AgentCodeSnippets-V5A56M7R.js} +7 -7
  4. package/dist/AgentMetricChart-GEADURES.js +15 -0
  5. package/dist/{AgentOverview-VF74XC7I.js → AgentOverview-NPC4P2EY.js} +7 -7
  6. package/dist/{AgentSessionEventTimeline-RFR6LQMY.js → AgentSessionEventTimeline-UUXOJXTC.js} +7 -7
  7. package/dist/{AgentSessionEventTimelineChart-27CQF6FX.js → AgentSessionEventTimelineChart-FIAQCYJC.js} +7 -7
  8. package/dist/{AgentSessions-4IVX2SGD.js → AgentSessions-WHODEG2M.js} +44 -20
  9. package/dist/AgentSessions-WHODEG2M.js.map +1 -0
  10. package/dist/{ConnectorSettings-R5VEP7BO.js → ConnectorSettings-QTAI4TQX.js} +7 -7
  11. package/dist/{DockLayout-F44RWGEY.js → DockLayout-TATYU5SV.js} +10 -10
  12. package/dist/{DrawerLayout-SQ323AVM.js → DrawerLayout-DXHNV33K.js} +11 -11
  13. package/dist/{ModelSettings-6QLS63HM.js → ModelSettings-UWTBHQRG.js} +7 -7
  14. package/dist/OpenUiFenceBlock-FHEYXZEQ.js +9 -0
  15. package/dist/{SandboxSettings-OLKDXIQS.js → SandboxSettings-BITQONS3.js} +7 -7
  16. package/dist/SchedulesPage-JIUWNYUH.js +15 -0
  17. package/dist/{SettingsBuilder-GISAH2WU.js → SettingsBuilder-3OA4UCIM.js} +8 -8
  18. package/dist/{ShellRouteSync-EN33DUQ7.js → ShellRouteSync-J74MV23Q.js} +4 -4
  19. package/dist/{SidebarLayout-35K4AKTC.js → SidebarLayout-EQXQPYIU.js} +13 -13
  20. package/dist/SidebarLayout-EQXQPYIU.js.map +1 -0
  21. package/dist/{SkillSettings-JSX2BTII.js → SkillSettings-KQ6GQ7JW.js} +7 -7
  22. package/dist/{TrueForgeUIWithRouter-6VCR7ES3.js → TrueForgeUIWithRouter-R3UXQZRY.js} +9 -9
  23. package/dist/{WidgetLayout-RKBSN2FZ.js → WidgetLayout-YWZTYFZL.js} +10 -10
  24. package/dist/{chunk-KR7WYHVF.js → chunk-3QWUHGNL.js} +2 -2
  25. package/dist/{chunk-73FQVITT.js → chunk-4MCIDE2C.js} +3 -3
  26. package/dist/{chunk-LUG7E6BL.js → chunk-7NYDADYN.js} +5 -5
  27. package/dist/{chunk-J5BPHEDT.js → chunk-CFGLAGWH.js} +2 -2
  28. package/dist/{chunk-GSJAYYLR.js → chunk-DCVKW445.js} +11 -6
  29. package/dist/chunk-DCVKW445.js.map +1 -0
  30. package/dist/{chunk-XY6LZQES.js → chunk-ERIIJKJY.js} +4 -4
  31. package/dist/{chunk-Q6TCT7ZJ.js → chunk-IIHJ32YH.js} +3 -3
  32. package/dist/{chunk-F5QVQIBH.js → chunk-INY3J2BV.js} +27 -16
  33. package/dist/{chunk-F5QVQIBH.js.map → chunk-INY3J2BV.js.map} +1 -1
  34. package/dist/{chunk-XLFOXQKZ.js → chunk-IVDIBAVH.js} +2 -2
  35. package/dist/{chunk-2O5EJ6QS.js → chunk-MMU55KCW.js} +1427 -1239
  36. package/dist/chunk-MMU55KCW.js.map +1 -0
  37. package/dist/chunk-OWDH67NY.js +587 -0
  38. package/dist/chunk-OWDH67NY.js.map +1 -0
  39. package/dist/{chunk-PT4EENB3.js → chunk-TAABBM7F.js} +31 -3
  40. package/dist/chunk-TAABBM7F.js.map +1 -0
  41. package/dist/{chunk-6WCIL3H2.js → chunk-TFFTZB26.js} +6 -6
  42. package/dist/{chunk-GIPFF6FZ.js → chunk-ZZB3JIBQ.js} +9 -9
  43. package/dist/index.d.ts +25 -7
  44. package/dist/index.js +14 -12
  45. package/dist/index.js.map +1 -1
  46. package/dist/plugins/trueforge-agent-server-adapter/index.d.ts +8 -0
  47. package/dist/plugins/trueforge-agent-server-adapter/index.js +4 -2
  48. package/dist/plugins/trueforge-agent-server-adapter/index.js.map +1 -1
  49. package/dist/styles.css +1 -1
  50. package/package.json +4 -3
  51. package/dist/AgentMetricChart-YWJYVYYA.js +0 -15
  52. package/dist/AgentSessions-4IVX2SGD.js.map +0 -1
  53. package/dist/OpenUiFenceBlock-4ROX3G4X.js +0 -9
  54. package/dist/SchedulesPage-TMOTK6DR.js +0 -15
  55. package/dist/SidebarLayout-35K4AKTC.js.map +0 -1
  56. package/dist/chunk-2O5EJ6QS.js.map +0 -1
  57. package/dist/chunk-GSJAYYLR.js.map +0 -1
  58. package/dist/chunk-LXJMINS6.js +0 -587
  59. package/dist/chunk-LXJMINS6.js.map +0 -1
  60. package/dist/chunk-PT4EENB3.js.map +0 -1
  61. /package/dist/{AgentCodeSnippets-N546FNNS.js.map → AgentCodeSnippets-V5A56M7R.js.map} +0 -0
  62. /package/dist/{AgentMetricChart-YWJYVYYA.js.map → AgentMetricChart-GEADURES.js.map} +0 -0
  63. /package/dist/{AgentOverview-VF74XC7I.js.map → AgentOverview-NPC4P2EY.js.map} +0 -0
  64. /package/dist/{AgentSessionEventTimeline-RFR6LQMY.js.map → AgentSessionEventTimeline-UUXOJXTC.js.map} +0 -0
  65. /package/dist/{AgentSessionEventTimelineChart-27CQF6FX.js.map → AgentSessionEventTimelineChart-FIAQCYJC.js.map} +0 -0
  66. /package/dist/{ConnectorSettings-R5VEP7BO.js.map → ConnectorSettings-QTAI4TQX.js.map} +0 -0
  67. /package/dist/{DockLayout-F44RWGEY.js.map → DockLayout-TATYU5SV.js.map} +0 -0
  68. /package/dist/{DrawerLayout-SQ323AVM.js.map → DrawerLayout-DXHNV33K.js.map} +0 -0
  69. /package/dist/{ModelSettings-6QLS63HM.js.map → ModelSettings-UWTBHQRG.js.map} +0 -0
  70. /package/dist/{OpenUiFenceBlock-4ROX3G4X.js.map → OpenUiFenceBlock-FHEYXZEQ.js.map} +0 -0
  71. /package/dist/{SandboxSettings-OLKDXIQS.js.map → SandboxSettings-BITQONS3.js.map} +0 -0
  72. /package/dist/{SchedulesPage-TMOTK6DR.js.map → SchedulesPage-JIUWNYUH.js.map} +0 -0
  73. /package/dist/{SettingsBuilder-GISAH2WU.js.map → SettingsBuilder-3OA4UCIM.js.map} +0 -0
  74. /package/dist/{ShellRouteSync-EN33DUQ7.js.map → ShellRouteSync-J74MV23Q.js.map} +0 -0
  75. /package/dist/{SkillSettings-JSX2BTII.js.map → SkillSettings-KQ6GQ7JW.js.map} +0 -0
  76. /package/dist/{TrueForgeUIWithRouter-6VCR7ES3.js.map → TrueForgeUIWithRouter-R3UXQZRY.js.map} +0 -0
  77. /package/dist/{WidgetLayout-RKBSN2FZ.js.map → WidgetLayout-YWZTYFZL.js.map} +0 -0
  78. /package/dist/{chunk-KR7WYHVF.js.map → chunk-3QWUHGNL.js.map} +0 -0
  79. /package/dist/{chunk-73FQVITT.js.map → chunk-4MCIDE2C.js.map} +0 -0
  80. /package/dist/{chunk-LUG7E6BL.js.map → chunk-7NYDADYN.js.map} +0 -0
  81. /package/dist/{chunk-J5BPHEDT.js.map → chunk-CFGLAGWH.js.map} +0 -0
  82. /package/dist/{chunk-XY6LZQES.js.map → chunk-ERIIJKJY.js.map} +0 -0
  83. /package/dist/{chunk-Q6TCT7ZJ.js.map → chunk-IIHJ32YH.js.map} +0 -0
  84. /package/dist/{chunk-XLFOXQKZ.js.map → chunk-IVDIBAVH.js.map} +0 -0
  85. /package/dist/{chunk-6WCIL3H2.js.map → chunk-TFFTZB26.js.map} +0 -0
  86. /package/dist/{chunk-GIPFF6FZ.js.map → chunk-ZZB3JIBQ.js.map} +0 -0
@@ -109,6 +109,7 @@ var SESSION_TIME_WINDOW_QUERY = "s_tw";
109
109
  var SESSION_TIME_BUFFER_MS = 5 * 60 * 1e3;
110
110
  var SESSION_CUSTOM_RANGE_MAX_DAYS = 70;
111
111
  var DEFAULT_SESSION_TIME_WINDOW_MS = 30 * 24 * 60 * 60 * 1e3;
112
+ var DEFAULT_METRICS_TIME_WINDOW_MS = 24 * 60 * 60 * 1e3;
112
113
  function parseLibraryAgentTab(value) {
113
114
  if (value === "overview" || value === "sessions" || value === "schedules" || value === "code" || value === "metrics") {
114
115
  return value;
@@ -130,6 +131,13 @@ function defaultSessionTimeRange(now = Date.now()) {
130
131
  timeWindowMs: DEFAULT_SESSION_TIME_WINDOW_MS
131
132
  };
132
133
  }
134
+ function defaultMetricsTimeRange(now = Date.now()) {
135
+ return {
136
+ startTs: now - DEFAULT_METRICS_TIME_WINDOW_MS,
137
+ endTs: now,
138
+ timeWindowMs: DEFAULT_METRICS_TIME_WINDOW_MS
139
+ };
140
+ }
133
141
  function sessionTimeRangeFromCreatedAt(createdAt) {
134
142
  const createdAtMs = new Date(createdAt).getTime();
135
143
  if (Number.isNaN(createdAtMs)) return null;
@@ -654,13 +662,32 @@ function ShellModeProvider({
654
662
  const openDraft = useCallback2(() => {
655
663
  if (!isComposerEnabled) return;
656
664
  refreshCapabilities?.();
665
+ setHistoryAgentFilter(null);
657
666
  selectLibraryAgent({ isMutable: true, isCreateAgent: false, agentSpec: chatSeedRef.current });
658
667
  }, [isComposerEnabled, refreshCapabilities, selectLibraryAgent]);
668
+ const isActiveAgentBuilder = effectiveMode.status === "active" && effectiveMode.isMutable && effectiveMode.isCreateAgent;
659
669
  const openAgentBuilder = useCallback2(() => {
660
670
  if (!isComposerEnabled) return;
661
671
  refreshCapabilities?.();
672
+ if (isActiveAgentBuilder) {
673
+ setSettingsOpen(false);
674
+ setLibraryOpenState(false);
675
+ setLibraryAgentId(null);
676
+ setSessionsOpen(false);
677
+ setSchedulesOpen(false);
678
+ setAgentConfigOpenState(true);
679
+ return;
680
+ }
662
681
  selectLibraryAgent({ isMutable: true, isCreateAgent: true, agentSpec: agentSeedRef.current });
663
- }, [isComposerEnabled, refreshCapabilities, selectLibraryAgent]);
682
+ }, [
683
+ isActiveAgentBuilder,
684
+ isComposerEnabled,
685
+ refreshCapabilities,
686
+ selectLibraryAgent,
687
+ setSchedulesOpen,
688
+ setSessionsOpen,
689
+ setSettingsOpen
690
+ ]);
664
691
  const sandboxEnabled = capabilities?.sandbox.enabled;
665
692
  const rememberDraftSpec = useCallback2(
666
693
  (agentSpec, kind = "chat") => {
@@ -669,7 +696,7 @@ function ShellModeProvider({
669
696
  if (kind === "chat") {
670
697
  chatSeedRef.current = preferences;
671
698
  } else {
672
- agentSeedRef.current = preferences;
699
+ agentSeedRef.current = withCapabilitiesSandbox(agentSpec, sandboxEnabled);
673
700
  }
674
701
  writeDraftSpecPreferences(kind, preferences);
675
702
  },
@@ -1006,6 +1033,7 @@ export {
1006
1033
  useOptionalPermissionsServer,
1007
1034
  SESSION_CUSTOM_RANGE_MAX_DAYS,
1008
1035
  defaultSessionTimeRange,
1036
+ defaultMetricsTimeRange,
1009
1037
  sessionTimeRangeFromCreatedAt,
1010
1038
  resolveSessionTimeRange,
1011
1039
  readSessionShareSearch,
@@ -1029,4 +1057,4 @@ export {
1029
1057
  shellIsCreateAgent,
1030
1058
  getErrorMessage
1031
1059
  };
1032
- //# sourceMappingURL=chunk-PT4EENB3.js.map
1060
+ //# sourceMappingURL=chunk-TAABBM7F.js.map
@@ -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 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 /** 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 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; 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 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; 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 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 rememberDraftSpec = useCallback(\n (agentSpec: AgentSpec, kind: DraftPreferenceKind = 'chat') => {\n const selected = selectDraftSpecPreferences(agentSpec, kind);\n const preferences = kind === 'agent' ? withCapabilitiesSandbox(selected, sandboxEnabled) : selected;\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 = withCapabilitiesSandbox(agentSpec, sandboxEnabled);\n }\n writeDraftSpecPreferences(kind, preferences);\n },\n [sandboxEnabled],\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\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\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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createContext","useRef","useState","libraryAgentId","useCallback","useEffect","useMemo","useContext"]}
@@ -10,23 +10,23 @@ import {
10
10
  useIsMobile,
11
11
  useResourcePermissions,
12
12
  useSlot
13
- } from "./chunk-2O5EJ6QS.js";
13
+ } from "./chunk-MMU55KCW.js";
14
14
  import {
15
15
  useSearchAgentsList
16
- } from "./chunk-KR7WYHVF.js";
16
+ } from "./chunk-3QWUHGNL.js";
17
17
  import {
18
18
  Icon,
19
19
  auiButtonClass,
20
20
  useCompactLayout
21
- } from "./chunk-Q6TCT7ZJ.js";
21
+ } from "./chunk-IIHJ32YH.js";
22
22
  import {
23
23
  libraryAgentId,
24
24
  useOptionalServer,
25
25
  useOptionalShellMode
26
- } from "./chunk-PT4EENB3.js";
26
+ } from "./chunk-TAABBM7F.js";
27
27
  import {
28
28
  cn
29
- } from "./chunk-LXJMINS6.js";
29
+ } from "./chunk-OWDH67NY.js";
30
30
 
31
31
  // src/containers/ThreadListContainer.tsx
32
32
  import {
@@ -514,4 +514,4 @@ function ThreadListContainer({ onThreadOpen, variant = "default" } = {}) {
514
514
  export {
515
515
  ThreadListContainer
516
516
  };
517
- //# sourceMappingURL=chunk-6WCIL3H2.js.map
517
+ //# sourceMappingURL=chunk-TFFTZB26.js.map
@@ -2,35 +2,35 @@ import {
2
2
  AgentConfigDrawerContainer,
3
3
  NamedAgentHeaderLabel,
4
4
  ShellActions
5
- } from "./chunk-LUG7E6BL.js";
5
+ } from "./chunk-7NYDADYN.js";
6
6
  import {
7
7
  Thread
8
- } from "./chunk-XY6LZQES.js";
8
+ } from "./chunk-ERIIJKJY.js";
9
9
  import {
10
10
  useSlot
11
- } from "./chunk-2O5EJ6QS.js";
11
+ } from "./chunk-MMU55KCW.js";
12
12
  import {
13
13
  Icon,
14
14
  PageHeader,
15
15
  Spinner,
16
16
  auiButtonClass
17
- } from "./chunk-Q6TCT7ZJ.js";
17
+ } from "./chunk-IIHJ32YH.js";
18
18
  import {
19
19
  useOptionalShellMode
20
- } from "./chunk-PT4EENB3.js";
20
+ } from "./chunk-TAABBM7F.js";
21
21
  import {
22
22
  useAui
23
23
  } from "./chunk-M6MHLVSO.js";
24
24
  import {
25
25
  cn
26
- } from "./chunk-LXJMINS6.js";
26
+ } from "./chunk-OWDH67NY.js";
27
27
 
28
28
  // src/layouts/StackChatPanel.tsx
29
29
  import { lazy, Suspense, useEffect } from "react";
30
30
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
31
- var TruefoundrySettingsBuilder = lazy(() => import("./SettingsBuilder-GISAH2WU.js"));
31
+ var TruefoundrySettingsBuilder = lazy(() => import("./SettingsBuilder-3OA4UCIM.js"));
32
32
  var SchedulesPage = lazy(
33
- () => import("./SchedulesPage-TMOTK6DR.js").then((m) => ({ default: m.SchedulesPage }))
33
+ () => import("./SchedulesPage-JIUWNYUH.js").then((m) => ({ default: m.SchedulesPage }))
34
34
  );
35
35
  function StackChatPanel({ className, threadHeaderEnd }) {
36
36
  const aui = useAui();
@@ -181,4 +181,4 @@ function StackChatPanel({ className, threadHeaderEnd }) {
181
181
  export {
182
182
  StackChatPanel
183
183
  };
184
- //# sourceMappingURL=chunk-GIPFF6FZ.js.map
184
+ //# sourceMappingURL=chunk-ZZB3JIBQ.js.map
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as react from 'react';
2
2
  import react__default, { CSSProperties, ReactNode, FC, SVGProps, ComponentType, ComponentPropsWithRef, ComponentProps, HTMLAttributes, ReactElement, MouseEventHandler, ComponentPropsWithoutRef, PropsWithChildren } from 'react';
3
3
  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
- 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, 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';
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
7
  import { MessagePrimitive, ToolCallMessagePartComponent } from '@assistant-ui/react';
8
8
  export { AssistantState, useAui, useAuiState } from '@assistant-ui/react';
@@ -544,10 +544,18 @@ type AgentDetailsTabsProps = {
544
544
  onTabChange: (tab: AgentDetailsTab) => void;
545
545
  showMetrics?: boolean;
546
546
  showSchedules?: boolean;
547
+ end?: ReactNode;
547
548
  };
548
549
  type AgentMetricsProps = {
549
550
  agentId: string;
550
- };
551
+ showTimeRangeFilter?: boolean;
552
+ } & ({
553
+ timeRange: SessionTimeRange;
554
+ onTimeRangeChange: (range: SessionTimeRange) => void;
555
+ } | {
556
+ timeRange?: undefined;
557
+ onTimeRangeChange?: undefined;
558
+ });
551
559
  type AgentMetricChartResult = {
552
560
  definition: AgentMetricChartDefinition;
553
561
  graphs?: AgentMetricGraph[];
@@ -561,6 +569,10 @@ type AgentMetricsViewProps = {
561
569
  chartsError?: string;
562
570
  timeRange: SessionTimeRange;
563
571
  onTimeRangeChange: (range: SessionTimeRange) => void;
572
+ showTimeRangeFilter?: boolean;
573
+ };
574
+ type AgentMetricStatisticsProps = {
575
+ meters: AgentMetricMeter[];
564
576
  };
565
577
  type AgentMetricsTimeRangeFilterProps = {
566
578
  timeRange: SessionTimeRange;
@@ -617,7 +629,7 @@ declare module '../../theme/SlotsProvider.js' {
617
629
  }
618
630
  }
619
631
 
620
- declare function AgentDetailsTabs({ activeTab, onTabChange, showMetrics, showSchedules, }: AgentDetailsTabsProps): react.JSX.Element;
632
+ declare function AgentDetailsTabs({ activeTab, onTabChange, showMetrics, showSchedules, end, }: AgentDetailsTabsProps): react.JSX.Element;
621
633
  declare module '../../theme/SlotsProvider.js' {
622
634
  interface AtomSlots {
623
635
  AgentDetailsTabs: typeof AgentDetailsTabs;
@@ -645,9 +657,11 @@ declare module '../../theme/SlotsProvider.js' {
645
657
  }
646
658
  }
647
659
 
648
- declare function AgentMetricsView({ meters, meterError, charts, chartsLoading, chartsError, timeRange, onTimeRangeChange, }: AgentMetricsViewProps): react.JSX.Element;
660
+ declare function AgentMetricStatistics({ meters }: AgentMetricStatisticsProps): react.JSX.Element;
661
+ declare function AgentMetricsView({ meters, meterError, charts, chartsLoading, chartsError, timeRange, onTimeRangeChange, showTimeRangeFilter, }: AgentMetricsViewProps): react.JSX.Element;
649
662
  declare module '../../theme/SlotsProvider.js' {
650
663
  interface AtomSlots {
664
+ AgentMetricStatistics: ComponentType<AgentMetricStatisticsProps>;
651
665
  AgentMetricsView: ComponentType<AgentMetricsViewProps>;
652
666
  }
653
667
  }
@@ -715,6 +729,8 @@ type AgentsLibraryProps = {
715
729
  type AgentScheduleSummary = {
716
730
  count: number;
717
731
  pausedCount: number;
732
+ activeNames: string[];
733
+ pausedNames: string[];
718
734
  };
719
735
  type AgentLibraryRowProps = {
720
736
  agent: AgentLibraryEntry;
@@ -723,6 +739,7 @@ type AgentLibraryRowProps = {
723
739
  canManageAgent?: boolean;
724
740
  canDeleteAgent?: boolean;
725
741
  canManageSchedules: boolean;
742
+ showCreatedBy?: boolean;
726
743
  scheduleSummary?: AgentScheduleSummary | null;
727
744
  onOpenSchedules?: () => void;
728
745
  onCreateSchedule?: () => void;
@@ -731,7 +748,7 @@ type AgentLibraryRowProps = {
731
748
  onEdit: () => void;
732
749
  onManageSchedules?: () => void;
733
750
  };
734
- declare function AgentLibraryRow({ agent, canMutate, canUseAgent, canManageAgent, canDeleteAgent, canManageSchedules, scheduleSummary, onOpenSchedules, onCreateSchedule, onOpen, onTry, onEdit, onManageSchedules, }: AgentLibraryRowProps): react.JSX.Element;
751
+ declare function AgentLibraryRow({ agent, canMutate, canUseAgent, canManageAgent, canDeleteAgent, canManageSchedules, showCreatedBy, scheduleSummary, onOpenSchedules, onCreateSchedule, onOpen, onTry, onEdit, onManageSchedules, }: AgentLibraryRowProps): react.JSX.Element;
735
752
  declare function AgentsLibrary({ onSelectAgent }: AgentsLibraryProps): react.JSX.Element | null;
736
753
  declare module '../theme/SlotsProvider.js' {
737
754
  interface AtomSlots {
@@ -1782,7 +1799,7 @@ declare module '../theme/SlotsProvider.js' {
1782
1799
  }
1783
1800
  }
1784
1801
 
1785
- declare function AgentMetricsContainer({ agentId }: AgentMetricsProps): react.JSX.Element;
1802
+ declare function AgentMetricsContainer({ agentId, timeRange: controlledTimeRange, onTimeRangeChange, showTimeRangeFilter, }: AgentMetricsProps): react.JSX.Element;
1786
1803
  declare module '../theme/SlotsProvider.js' {
1787
1804
  interface AtomSlots {
1788
1805
  AgentMetrics: ComponentType<AgentMetricsProps>;
@@ -1888,6 +1905,7 @@ declare const defaultSlots: {
1888
1905
  AgentMetricsView: typeof AgentMetricsView;
1889
1906
  AgentMetricsTimeRangeFilter: typeof AgentMetricsTimeRangeFilter;
1890
1907
  AgentMetricCard: typeof AgentMetricCard;
1908
+ AgentMetricStatistics: typeof AgentMetricStatistics;
1891
1909
  AgentMetricChart: react.FunctionComponent<AgentMetricChartProps>;
1892
1910
  AgentSessionDetailHeader: typeof AgentSessionDetailHeader;
1893
1911
  AgentSessionsFilters: typeof AgentSessionsFilters;
@@ -2882,4 +2900,4 @@ declare function DraftCatalogProvider({ children }: {
2882
2900
  }): 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;
2883
2901
  declare function useDraftCatalog(): DraftCatalogValue;
2884
2902
 
2885
- 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, 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 };
2903
+ 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 };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  ThreadListContainer
4
- } from "./chunk-6WCIL3H2.js";
4
+ } from "./chunk-TFFTZB26.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-XY6LZQES.js";
19
+ } from "./chunk-ERIIJKJY.js";
20
20
  import {
21
21
  ServerInitLoader,
22
22
  TrueForgeUIShell,
23
23
  TrueFoundryChatProvider
24
- } from "./chunk-F5QVQIBH.js";
24
+ } from "./chunk-INY3J2BV.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-XLFOXQKZ.js";
34
+ } from "./chunk-IVDIBAVH.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-GSJAYYLR.js";
53
+ } from "./chunk-DCVKW445.js";
54
54
  import {
55
55
  AgentCodeBlock,
56
56
  AgentConfigEditors,
@@ -64,6 +64,7 @@ import {
64
64
  AgentInstructionsDrawer,
65
65
  AgentMcpEditorContent,
66
66
  AgentMetricCard,
67
+ AgentMetricStatistics,
67
68
  AgentMetricsContainer,
68
69
  AgentMetricsTimeRangeFilter,
69
70
  AgentMetricsView,
@@ -191,14 +192,14 @@ import {
191
192
  useThemeMode,
192
193
  useToaster,
193
194
  useToasterOptional
194
- } from "./chunk-2O5EJ6QS.js";
195
- import "./chunk-KR7WYHVF.js";
195
+ } from "./chunk-MMU55KCW.js";
196
+ import "./chunk-3QWUHGNL.js";
196
197
  import {
197
198
  DraftCatalogProvider,
198
199
  Icon,
199
200
  registerIcons,
200
201
  useDraftCatalog
201
- } from "./chunk-Q6TCT7ZJ.js";
202
+ } from "./chunk-IIHJ32YH.js";
202
203
  import {
203
204
  DEFAULT_AGENT_CONFIG,
204
205
  ServerProvider,
@@ -221,14 +222,14 @@ import {
221
222
  useServer,
222
223
  useServerCapabilities,
223
224
  useShellMode
224
- } from "./chunk-PT4EENB3.js";
225
+ } from "./chunk-TAABBM7F.js";
225
226
  import {
226
227
  useAui,
227
228
  useAuiState
228
229
  } from "./chunk-M6MHLVSO.js";
229
230
  import {
230
231
  OpenUiFenceBlock
231
- } from "./chunk-J5BPHEDT.js";
232
+ } from "./chunk-CFGLAGWH.js";
232
233
  import {
233
234
  PRESETS,
234
235
  ThemeProvider,
@@ -238,7 +239,7 @@ import {
238
239
  useOptionalContentClassNames,
239
240
  useTheme,
240
241
  useThemeIcons
241
- } from "./chunk-LXJMINS6.js";
242
+ } from "./chunk-OWDH67NY.js";
242
243
 
243
244
  // src/icons/agent-2.svg
244
245
  import * as React from "react";
@@ -439,7 +440,7 @@ function ToolGroupContainer({ children, group }) {
439
440
  import { lazy, Suspense } from "react";
440
441
  import { jsx as jsx12 } from "react/jsx-runtime";
441
442
  var TrueForgeUIWithRouter = lazy(
442
- () => import("./TrueForgeUIWithRouter-6VCR7ES3.js").then((m) => ({ default: m.TrueForgeUIWithRouter }))
443
+ () => import("./TrueForgeUIWithRouter-R3UXQZRY.js").then((m) => ({ default: m.TrueForgeUIWithRouter }))
443
444
  );
444
445
  function TrueForgeUI(props) {
445
446
  const isMcpAuthScreen = typeof window !== "undefined" && new URLSearchParams(window.location.search).get("screenType") === "mcp-auth";
@@ -483,6 +484,7 @@ export {
483
484
  AgentMcpEditorContent,
484
485
  AgentMetricCard,
485
486
  AgentMetricChart,
487
+ AgentMetricStatistics,
486
488
  AgentMetricsContainer,
487
489
  AgentMetricsTimeRangeFilter,
488
490
  AgentMetricsView,