@truefoundry/trueforge-ui 0.3.0-rc.9 → 0.3.1

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 (93) hide show
  1. package/CHANGELOG.md +190 -4
  2. package/dist/{AgentCodeSnippets-ARHIK2T6.js → AgentCodeSnippets-DAZWEBJS.js} +7 -7
  3. package/dist/AgentMetricChart-VDIE3S2P.js +15 -0
  4. package/dist/AgentOverview-5JIVYXPX.js +314 -0
  5. package/dist/AgentOverview-5JIVYXPX.js.map +1 -0
  6. package/dist/{AgentSessionEventTimeline-7QM7QKIQ.js → AgentSessionEventTimeline-WELJSS6O.js} +7 -7
  7. package/dist/{AgentSessionEventTimelineChart-PIDYWLYT.js → AgentSessionEventTimelineChart-ADB3KICM.js} +7 -7
  8. package/dist/{AgentSessions-MR2DREKN.js → AgentSessions-NSN4LIGJ.js} +81 -16
  9. package/dist/AgentSessions-NSN4LIGJ.js.map +1 -0
  10. package/dist/{ConnectorSettings-YBGANZOG.js → ConnectorSettings-C6MFCKYX.js} +12 -10
  11. package/dist/ConnectorSettings-C6MFCKYX.js.map +1 -0
  12. package/dist/{DockLayout-O5TS4YZH.js → DockLayout-VY7OZ55R.js} +10 -10
  13. package/dist/{DrawerLayout-7R3XONK2.js → DrawerLayout-B2UA3CZO.js} +11 -11
  14. package/dist/{ModelSettings-UXPL4E6X.js → ModelSettings-3YAHICJ3.js} +9 -9
  15. package/dist/ModelSettings-3YAHICJ3.js.map +1 -0
  16. package/dist/OpenUiFenceBlock-BZPFNXWZ.js +9 -0
  17. package/dist/{SandboxSettings-5MMPJHBH.js → SandboxSettings-ALR6F5KU.js} +7 -7
  18. package/dist/SchedulesPage-TIS3BH67.js +15 -0
  19. package/dist/{SettingsBuilder-JAP4QGMY.js → SettingsBuilder-G5CP5X6Q.js} +8 -8
  20. package/dist/{ShellRouteSync-SJXFKUAJ.js → ShellRouteSync-G7IJ5VIW.js} +4 -4
  21. package/dist/{SidebarLayout-MYZTVWWE.js → SidebarLayout-FKRLGEDB.js} +13 -13
  22. package/dist/SidebarLayout-FKRLGEDB.js.map +1 -0
  23. package/dist/{SkillSettings-6C5PH3NN.js → SkillSettings-E5SJ4U3T.js} +7 -7
  24. package/dist/{TrueForgeUIWithRouter-3J5G62O5.js → TrueForgeUIWithRouter-WD7O3TWR.js} +9 -9
  25. package/dist/{WidgetLayout-24ZL3QWT.js → WidgetLayout-KQZTQNE7.js} +10 -10
  26. package/dist/{chunk-UBQYRCCH.js → chunk-2XFOONKH.js} +251 -97
  27. package/dist/chunk-2XFOONKH.js.map +1 -0
  28. package/dist/{chunk-2GIZY3JJ.js → chunk-2XT2VUT4.js} +58 -5
  29. package/dist/chunk-2XT2VUT4.js.map +1 -0
  30. package/dist/{chunk-3ZW74FHC.js → chunk-4OZFQVSR.js} +23 -19
  31. package/dist/chunk-4OZFQVSR.js.map +1 -0
  32. package/dist/chunk-6UACSIIY.js +587 -0
  33. package/dist/chunk-6UACSIIY.js.map +1 -0
  34. package/dist/{chunk-RI6TIYWL.js → chunk-7UE7LZS2.js} +45 -15
  35. package/dist/chunk-7UE7LZS2.js.map +1 -0
  36. package/dist/{chunk-T6QQV5LK.js → chunk-AO23SZBG.js} +2 -2
  37. package/dist/{chunk-MACHU4OO.js → chunk-AU4BJQMK.js} +60 -25
  38. package/dist/chunk-AU4BJQMK.js.map +1 -0
  39. package/dist/{chunk-2QTH6JHX.js → chunk-B76JC5B2.js} +3 -3
  40. package/dist/{chunk-JTQU2N2Q.js → chunk-G7BT4OKG.js} +7 -5
  41. package/dist/{chunk-JTQU2N2Q.js.map → chunk-G7BT4OKG.js.map} +1 -1
  42. package/dist/{chunk-JF4IELMW.js → chunk-IGYCJIU7.js} +9 -9
  43. package/dist/{chunk-CG75X77Q.js → chunk-QKFMAQ7O.js} +2 -2
  44. package/dist/{chunk-JKUYG6HV.js → chunk-SAYUMANU.js} +9 -15
  45. package/dist/chunk-SAYUMANU.js.map +1 -0
  46. package/dist/{chunk-FEHL45EB.js → chunk-XHPIJ77Q.js} +2 -2
  47. package/dist/{chunk-4OEAJKLJ.js → chunk-XR4S7B2K.js} +2528 -1923
  48. package/dist/chunk-XR4S7B2K.js.map +1 -0
  49. package/dist/index.d.ts +53 -11
  50. package/dist/index.js +16 -12
  51. package/dist/index.js.map +1 -1
  52. package/dist/plugins/trueforge-agent-server-adapter/index.d.ts +10 -3
  53. package/dist/plugins/trueforge-agent-server-adapter/index.js +43 -14
  54. package/dist/plugins/trueforge-agent-server-adapter/index.js.map +1 -1
  55. package/dist/styles.css +1 -1
  56. package/package.json +3 -3
  57. package/dist/AgentMetricChart-ZQIRBCZL.js +0 -15
  58. package/dist/AgentOverview-7GJJV2OU.js +0 -169
  59. package/dist/AgentOverview-7GJJV2OU.js.map +0 -1
  60. package/dist/AgentSessions-MR2DREKN.js.map +0 -1
  61. package/dist/ConnectorSettings-YBGANZOG.js.map +0 -1
  62. package/dist/ModelSettings-UXPL4E6X.js.map +0 -1
  63. package/dist/OpenUiFenceBlock-KPZFLUSC.js +0 -9
  64. package/dist/SchedulesPage-5XZRDA5O.js +0 -15
  65. package/dist/SidebarLayout-MYZTVWWE.js.map +0 -1
  66. package/dist/chunk-2GIZY3JJ.js.map +0 -1
  67. package/dist/chunk-3ZW74FHC.js.map +0 -1
  68. package/dist/chunk-4OEAJKLJ.js.map +0 -1
  69. package/dist/chunk-JCL3Q7RW.js +0 -587
  70. package/dist/chunk-JCL3Q7RW.js.map +0 -1
  71. package/dist/chunk-JKUYG6HV.js.map +0 -1
  72. package/dist/chunk-MACHU4OO.js.map +0 -1
  73. package/dist/chunk-RI6TIYWL.js.map +0 -1
  74. package/dist/chunk-UBQYRCCH.js.map +0 -1
  75. /package/dist/{AgentCodeSnippets-ARHIK2T6.js.map → AgentCodeSnippets-DAZWEBJS.js.map} +0 -0
  76. /package/dist/{AgentMetricChart-ZQIRBCZL.js.map → AgentMetricChart-VDIE3S2P.js.map} +0 -0
  77. /package/dist/{AgentSessionEventTimeline-7QM7QKIQ.js.map → AgentSessionEventTimeline-WELJSS6O.js.map} +0 -0
  78. /package/dist/{AgentSessionEventTimelineChart-PIDYWLYT.js.map → AgentSessionEventTimelineChart-ADB3KICM.js.map} +0 -0
  79. /package/dist/{DockLayout-O5TS4YZH.js.map → DockLayout-VY7OZ55R.js.map} +0 -0
  80. /package/dist/{DrawerLayout-7R3XONK2.js.map → DrawerLayout-B2UA3CZO.js.map} +0 -0
  81. /package/dist/{OpenUiFenceBlock-KPZFLUSC.js.map → OpenUiFenceBlock-BZPFNXWZ.js.map} +0 -0
  82. /package/dist/{SandboxSettings-5MMPJHBH.js.map → SandboxSettings-ALR6F5KU.js.map} +0 -0
  83. /package/dist/{SchedulesPage-5XZRDA5O.js.map → SchedulesPage-TIS3BH67.js.map} +0 -0
  84. /package/dist/{SettingsBuilder-JAP4QGMY.js.map → SettingsBuilder-G5CP5X6Q.js.map} +0 -0
  85. /package/dist/{ShellRouteSync-SJXFKUAJ.js.map → ShellRouteSync-G7IJ5VIW.js.map} +0 -0
  86. /package/dist/{SkillSettings-6C5PH3NN.js.map → SkillSettings-E5SJ4U3T.js.map} +0 -0
  87. /package/dist/{TrueForgeUIWithRouter-3J5G62O5.js.map → TrueForgeUIWithRouter-WD7O3TWR.js.map} +0 -0
  88. /package/dist/{WidgetLayout-24ZL3QWT.js.map → WidgetLayout-KQZTQNE7.js.map} +0 -0
  89. /package/dist/{chunk-T6QQV5LK.js.map → chunk-AO23SZBG.js.map} +0 -0
  90. /package/dist/{chunk-2QTH6JHX.js.map → chunk-B76JC5B2.js.map} +0 -0
  91. /package/dist/{chunk-JF4IELMW.js.map → chunk-IGYCJIU7.js.map} +0 -0
  92. /package/dist/{chunk-CG75X77Q.js.map → chunk-QKFMAQ7O.js.map} +0 -0
  93. /package/dist/{chunk-FEHL45EB.js.map → chunk-XHPIJ77Q.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,191 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 56b3a59: Keep newly saved builders editable until the user leaves the build-agent page, then start fresh when they return.
8
+ - a122ba1: Show successful MCP authentication in chat, automatically continue after every required server connects, and indicate while the turn is starting. Confirm OAuth against the chat MCP connector read (`getMcpConnector`) so non-admins are not blocked by settings-only catalog GETs, and ignore authorize callbacks after the prompt unmounts.
9
+ - acad1a1: Add chat-history rename for servers that implement `renameSession`, including TrueForge harness title updates.
10
+ - a08c75a: Show absolute session activity timestamps on hover, label deferred MCP tools in the session timeline, and fix Safari collapsing contentSized modal bodies (flex-auto).
11
+
12
+ ## 0.3.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 51127c4: Gate `config.webSearch` on host capabilities: New Chat auto-enables with no toggle; New Agent / edit show a Runtime Config switch (default on when absent).
17
+ - d269b01: Add a live advanced agent configuration drawer with shared model, runtime, MCP tool, skill, and Save Agent editors.
18
+ - e74e953: Keep agent configuration visible on the left in full-width builder layouts, add a responsive instructions and initial-messages drawer with explicit save, make mobile config overlays closable, save the current instruction draft, align builder chrome, and preserve open widgets across chat runtime changes.
19
+ - a189482: Add routed agent detail pages with lazy Overview, Sessions, and Use In Code tabs backed by the optional AgentSessionsServer port and built-in TrueForge adapter.
20
+ - 8491843: Add a slot-driven agent Metrics tab with aggregate cards, time-range filtering, and Harness-backed line charts.
21
+ - e3973a5: Open agent model settings inline and support typed custom model parameters.
22
+ - a189482: Add the agent library Sessions tab and an all-user Sessions sidebar page (including drafts) with agent and time filters, shareable query params, and the same two-pane timeline. Library agent details keep the active tab in `?tab=` so opening an agent lands on Overview.
23
+ - 555bef0: Add a composer approval-nav banner (overridable `ApprovalNavBanner` slot) that counts pending tool approvals, pauses the composer, and jumps/expands/flashes the focused approval — including nested subagent tools.
24
+ - 3539da2: Add `brand.mode` (`icon-title` | `icon-only` | `logo`) so hosts pick chrome look first; `name` always labels the mark, and `resolveBrandChrome` maps mode to layout chrome.
25
+ - 16feb29: Add `customActionRenderers` so hosts can pause the composer on client-side tools with their own UI and resume via `onSubmit(content)`.
26
+ - 74eae6c: Remove pagination from list MCP servers across the API, SDK, and UI; return and search the complete configured MCP catalog client-side.
27
+ - bc11131: MCP selectors (composer + agent config) infinite-scroll through `listMcp` pages via DraftCatalogProvider.
28
+ - 0297727: Add context-management compaction triggers with model-aware defaults and migrate persisted legacy token thresholds.
29
+ - 860e322: Split New Chat vs New Agent: simple chat keeps the Connectors/Skills picker; New Agent keeps Agent Config + Save Agent. Session metadata `is_create_agent` drives resume from the sessions browser.
30
+ - 12b02ff: Open Runtime Config in a right-side drawer and label scheduled sessions consistently.
31
+ - 0cc59f8: Wire schedule test runs and show last five run status chips on the schedules table. Bump `@truefoundry/assistant-ui-runtime` to `0.1.25`.
32
+ - 0cc59f8: Add global Schedules page at `/schedules` with listing, popover-based filters, and create/edit drawer wired to the schedule API. New schedules save as paused, open a Test Schedule review with MCP connect status, and support Activate Anyway. List schedules uses server token pagination and multi-agent filters. Agents shows a Schedules count column (warning when any are paused) loaded via a batched list for on-screen agents. Add Table primitives with client-side and token pagination plus portal DropdownMenu so row actions are not clipped by overflow. Export a reusable popover select with single- and multi-select modes.
33
+ - 788636d: Sidebar layout is a permanent icon+label nav rail (no expand/collapse). Recent chats are hidden from the sidebar and mobile drawer; the drawer shows nav actions only.
34
+ - 04d2ee6: Add a `sidebarText` semantic token for sidebar nav labels, refresh trueforge sidebar colors, set trueforge base `radius` to `0.375rem` (6px), and set sidebar / thread-list control corners to `0.75rem` (12px).
35
+
36
+ Expose design-system `Button` (`Button.Primary` / `.Secondary` / `.Ghost` / `.Destructive`). `ButtonVariant` is now `primary | secondary | ghost | destructive` (`default` renamed to `primary`; `outline` removed — use `secondary`). Button sizes are `large` (default) and `small` (`icon` for icon-only).
37
+
38
+ - 7e25f68: Open Save Agent in a right-side drawer with only the agent name while preserving configuration from Agent Config.
39
+ - 8f1a2dc: [truefoundry] Add a TrueFoundry-managed model registry. When `TRUEFOUNDRY_SERVICEFOUNDRY_SERVER_URL` is set, models are listed from the TrueFoundry ServiceFoundry server and turns are routed through the tenant's default AI Gateway with the caller's token. Mutually exclusive with OIDC. Supports internal mutual TLS to the ServiceFoundry server via `TRUEFOUNDRY_MTLS_ENABLED`/`TRUEFOUNDRY_MTLS_CERTS_DIR`.
40
+ - f8b5eeb: Add optional resource permissions and gate agent, schedule, and session mutations.
41
+
42
+ ### Patch Changes
43
+
44
+ - 51127c4: Open Save Agent drawer on Clone with `{name}-clone` prefilled; stay on Agents list after save.
45
+ - d29717b: Clarify MCP API key entry: Bearer placeholders, auto-prefix Authorization values, and a header-name hint on the form.
46
+ - a273ed8: Preload Monaco when the UI shell mounts so tool request/response editors open faster.
47
+ - 347a7e7: Refresh composer and composer-trigger styling: 0.75rem composer corners with a light-theme primary-token gradient hairline (faded top → solid bottom) and a neutral hairline in dark, an icon-only tools trigger in place of the "Tools" caption and count badge, the shared `agent-2` glyph on the agents-library trigger, and squared-off chrome-action geometry on the save-agent trigger. Also fixes `agent-2.svg` to use `currentColor` so it is legible in dark mode.
48
+ - 2a0ae4c: Show connector catalog logos in the composer Tools picker, matching the Connectors settings page.
49
+ - 2a0ae4c: Align AttachmentCard with assistant-ui's default square thumbnail, filename tooltip, and overlay remove control.
50
+ - 762ecc0: [truefoundry] TrueFoundry skills catalog: proxy GET /skills and /skills/versions from ServiceFoundry; settings skill writes return 424. SkillManifest is a type-discriminated oneOf of GitSkill | TrueFoundryRegistrySkill (`type: truefoundry`; name is FQN, display_name is short). AvailableSkill exposes optional metadata (display_name, repository_name, version). AgentSpec skill refs allow opaque FQN names, optional preload (registry), and max 50. UI draft skill mounts map catalog `id` to AgentSpec `name`.
51
+ - a189482: Load agent Use In Code snippets through `client.internal.agents.getCodeSnippets` instead of a raw `client.fetch`.
52
+ - 26a9b80: Add an agent-scoped Schedules tab and route library schedule actions into it.
53
+ - 1b8a3f7: Add documentation links to the code snippets view and shell actions.
54
+ - 584e815: Gate Save Agent (create) on tenant CREATE from list-permissions, keep Update Agent on agent MANAGE, unwrap `{ type, permissions }`, and bump `@truefoundry/assistant-ui-runtime` to `0.1.39`.
55
+ - d2fdfc9: Add agent-filtered chat history labels, preserve Try Agent and explicit history-filter intent in URL query state while resolving backend IDs, reset active chats when users change filters, keep Try Agent highlighted as chat, and route fresh agent builders at `/build-agent` before their session URL is assigned.
56
+ - 8296c52: Make Runtime Config, MCP Servers, and Skills blocks clickable with a hover action icon, explain disabled sandbox and large-tool-response toggles in tooltips, and replace boxed capability cards with divider-separated columns.
57
+ - 8c31eae: Round-trip agent description through save/load and show it in the library and agent details.
58
+ - 0e01eba: Polish metric charts with sharp dot-free lines, distinct series colors, and a quieter Metrics tab background.
59
+ - c4ee138: Agent list and details overflow menu: Edit, Clone (`{name}-copy` via saveAgent), Manage Schedules, and Delete (wired through harness `deleteAgent`).
60
+ - 629b6e9: Paginate the Agent Sessions list on scroll instead of a "Load more" button, showing a skeleton row while the next page loads.
61
+ - c4ee138: AgentSessions list pane uses a quieter surface, and the resize grip stays gray until hover, press, or focus.
62
+ - 629b6e9: Fix Agents library table scrolling when rows exceed the viewport
63
+ - 26a9b80: Allow sending user messages that contain attachments without text.
64
+ - d7136a1: Avatar fallbacks use a light primary-button gradient in light mode, a solid primary gradient in dark mode, and show a single initial character.
65
+ - 4e72afc: Announce boot loading with a light-themed orb for contrast outside ThemeProvider.
66
+ - 26a9b80: Add an empty state and Build Agent action to the schedule agent picker.
67
+ - 4c522e2: Bump `@truefoundry/assistant-ui-runtime` to `0.1.30`.
68
+ - 4c522e2: Bump `@truefoundry/assistant-ui-runtime` to `0.1.31`.
69
+ - fd1bf7f: Bump `@truefoundry/assistant-ui-runtime` to `0.1.38` for assistant completion timestamps and keep-alive turn streams on session switch.
70
+ - 4be60e7: Bump `@truefoundry/assistant-ui-runtime` to `0.1.41` for turn-scoped sandbox artifact downloads and to stop stale session history from merging after a session switch.
71
+ - d719155: Keep composer catalogs cached when starting a new chat.
72
+ - b11cfc3: Wire remote chat session deletion and improve the history delete action styling.
73
+ - fe6a14b: Improve session timelines with sub-agent wait states, grouped point-event markers, clean linear ticks, and readable summary durations.
74
+ - c4ee138: Agent Code (`SyntaxHighlighter` / `AgentCodeBlock`) copy control uses the bordered secondary button, and a trailing source newline no longer paints an empty last line while Copy still keeps the exact source.
75
+ - c0359ca: Strip a trailing slash from the `base_url` passed to agent code-snippets.
76
+ - 57f1fc2: Improve compact agent building with model configuration bottom sheets, provider-first model selection, and a contextual composer actions menu.
77
+ - e3973a5: Show the selected connector and skill count beside the composer tools icon.
78
+ - 26a9b80: Hide model selection in the Build Agent composer and correct concurrent sub-agent timeline bars.
79
+ - 629b6e9: Show Created by (avatar + name) on Agents and Schedules tables when creator info is present.
80
+ - 26a9b80: Require direct switch clicks in the Runtime Config sidebar.
81
+ - 531f0ce: Keep close-on-click dropdown menus and bottom sheets open when a click or drag lands on their own scrollbar, so scrolling a long menu no longer dismisses it before a choice is made.
82
+ - 1ec19f0: Replace API key replacement with connector configuration editing from the connector list and details view.
83
+ - c4ee138: Agents, Sessions, and Schedules empty states use a shared centered empty-box screen with title and supporting copy.
84
+ - b482cdd: Show the four primary agent metrics in a compact summary-card layout.
85
+ - b32d2be: Filter chat history to sessions created by the current user, and bump `@truefoundry/assistant-ui-runtime` to `0.1.34`.
86
+ - a9430bd: Accept optional `base_url` on agent code-snippets (FE public host); fall back to request origin + `PUBLIC_BASE_URL` path.
87
+ - 3ca4e2e: fixed the button component icon and padding, delete conflicting local prettier.json in trueforge-ui package
88
+ - a655537: Update published dependency ranges (AI SDK, Hono, MCP SDK, Redis, assistant-ui, and related packages).
89
+ - 54e4ec4: Keep Settings hidden until the server explicitly enables it.
90
+ - 0cc59f8: Use Google Sans as the default `trueforge` theme font and load it from Google Fonts when styles are injected.
91
+ - 64ca089: Hide Clear chat while the thread is fresh (New Chat, New Agent, and Try Agent) since there is nothing to clear.
92
+ - 4c522e2: Hide session cost metrics when cost data is unavailable.
93
+ - 4e7b67a: Check live per-user MCP authentication before loading tools in the agent builder.
94
+ - aa4be44: Open markdown links in assistant messages in a new tab
95
+ - 551b6a8: Default MCP tool approval to `@destructive` only. Selecting Other/read-only tools clears approval; selecting destructive tools keeps it on. Migrate mounts still carrying the old `@write`+`@destructive` default.
96
+ - 64ca089: Add a book-icon preload toggle and dashed add button to Agent Config MCP server pills.
97
+ - d269b01: Improve MCP and skill selectors with consistent search sizing, explicit MCP selection controls, grouped tool summaries, and removable MCP chips.
98
+ - 64ca089: Revamp the MCP tools selector modal with focus rows, connect empty state, and grouped selected-tools summary.
99
+ - 551b6a8: Let Build Agent pick which MCP tools require human approval, saved as `require_approval_for_tools` on the agent spec, and make unchecked tool checkboxes legible in both tool selectors. The agent Overview tab now expands each attached MCP server into its tools, with read/write/destructive labels and approval state.
100
+ - d2fdfc9: Section MCP tools in the Build Agent selector by read-only, others, and destructive annotations, with a read-only enable-all toggle.
101
+ - d7136a1: Assistant message loading indicator uses ThinkingOrb with left-to-right shimmering Working... text.
102
+ - ea86853: Move the agent metrics time range filter into the active Metrics tab row.
103
+ - bc11131: New Chat enables sandbox on the live draft agent config when capabilities report sandbox as available.
104
+ - d5b479d: Clamp optional sessions/schedules chrome and unregister `/sessions`, `/schedules`, and `/library/:agentId` when those server ports are omitted, matching the Settings Lego gate.
105
+ - b316430: Slide SideDrawer/BottomSheet and add a light fade+scale enter on dropdowns and popup cards.
106
+ - dc2151f: Paginate `GET /api/v1/agents` with `limit` / `page_token` and a `pagination` envelope; optional `agent_name` filters by case-insensitive substring. Agents library uses rows-per-page and prev/next against the token-paginated API. Schedule create and the schedules listing agent filter use a searchable agent combobox backed by the same filtered list API.
107
+ - 26a9b80: Show agent names without an icon in the Agents table.
108
+ - d7015fd: show mcp server tool name on tool approval
109
+ - d7136a1: Flip PopoverSelect menus when the preferred side lacks viewport room (e.g. table rows-per-page).
110
+ - 629b6e9: Portal PopoverSelect menus so table page-size and other selects are not clipped by overflow parents.
111
+ - 98ab384: Preserve the active agent draft when returning to Build Agent from another page.
112
+ - 04460fb: Prevent the schedule search field from shrinking and clipping its placeholder.
113
+ - ef278dd: Stop highlighting New Chat while trying a named agent, and clear the Try Agent URL and history filter when starting a new chat.
114
+ - 079f832: Show an optional tooltip when sandbox artifact downloads are read-only.
115
+ - 4cea38c: Show draft and named sessions in the history panel, exclude agent-builder sessions, cache session pages, and switch history sessions in place without remounting the chat runtime.
116
+ - fa0730b: Reduce the agent code snippet font size to match its surrounding controls.
117
+ - 2284d3b: Polish the MCP tool selector controls, loading state, and API error messages.
118
+ - c4ee138: Resume Chat / Resume Agent building opens in a new tab when routed (`/sessions/:id` + square-arrow-out-up-right); without a router it keeps the in-shell resume fallback.
119
+ - 788636d: Open the create schedule drawer when Agents "+ Schedule" navigates with `isNew=true`, then clear the flag from the URL.
120
+ - e3973a5: Group schedule recurrence controls and display the cadence in an attached summary footer.
121
+ - d7136a1: Stop draining the full agents catalog on Schedules mount; load agents only when the filter opens (infinite scroll).
122
+ - f2ca338: Show active/paused schedule counts in the Agents library, pin selected MCPs when reopening the tools modal, and align paused schedule badge colors.
123
+ - ffbb239: Add a hover ellipsis delete menu with confirmation dialog on Sessions list rows.
124
+ - 333230d: Improve Agent Sessions with a resizable divider, accurate turn grouping, optional cost display, and reliable timeline tooltips with sub-agent details. Simplify schedule recurrence and default new schedules to the local timezone.
125
+ - d7136a1: Settings sidebar uses a subtle primary tint for the selected section instead of a solid fill.
126
+ - c4ee138: Unregister the `/settings` route when Settings chrome is unavailable (no catalog or `capabilities.settings.enabled` is false), matching the sidebar Settings button gate.
127
+ - ceeb56f: Show turn and duration statistics alongside the featured agent metric cards.
128
+ - 531f0ce: Cap the skill version menu height and scroll it, so skills with many versions no longer run off screen. While it is open, scrolling is confined to the menu.
129
+ - 77c5c33: [truefoundry] Show TrueFoundry skill repositories and versions in skill pickers, load version choices lazily, preserve the chosen version FQN when attaching skills, keep picker ordering stable while open, and add registry-only preload controls to selected skill pills.
130
+ - c4ee138: Split New Chat and New Agent draft preference stores. New Chat remembers only model (+ reasoning), skills, and MCP; New Agent keeps the full seed including runtime config.
131
+ - 4c1260e: [truefoundry] Wire TrueFoundry MCP authorize, status, and delete through ServiceFoundry; stub list auth_status; gate oauth2 invoke mid-turn with authRequired; paginate MCP server lists. UI treats SFY consent `code`/`error` on the FE landing like local DCR success/failure.
132
+ - 4e72afc: Use an animated thinking orb for application boot and server initialization.
133
+ - c4ee138: Per-turn Tokens in Agent Sessions shows a keyboard-accessible Input / Output / Cached tooltip (Input is uncached).
134
+ - a655537: Add a `turn.update` event schema with paused/running status and `action_required_on_events`.
135
+ - bc11131: Share a single `PageHeader` across chat and list chrome so title size/height stay consistent, and drop decorative title icons.
136
+ - 1b5b674: Add a host-overridable user avatar slot with initials and display-name chrome across every built-in layout, wired to the current authenticated frontend user.
137
+ - 26a9b80: Show weekly schedule days before the time controls.
138
+ - 1b8a3f7: Match the Build Agent configuration panel width to the agent playground and identify sessions created by schedule runs.
139
+ - adaf532: Widen the sidebar rail and its nav buttons so labels like "Build Agent" have more breathing room.
140
+ - 5d72138: Keep `npx @truefoundry/trueforge` working on native Windows: import Kysely migrations with `pathToFileURL`, and keep sandbox guest paths POSIX. Source development stays Unix/WSL; CI also runs unit and SQLite store tests on Windows.
141
+ - Updated dependencies [648273b]
142
+ - Updated dependencies [648273b]
143
+ - Updated dependencies [648273b]
144
+ - Updated dependencies [648273b]
145
+ - Updated dependencies [648273b]
146
+ - Updated dependencies [648273b]
147
+ - Updated dependencies [648273b]
148
+ - Updated dependencies [648273b]
149
+ - Updated dependencies [648273b]
150
+ - Updated dependencies [648273b]
151
+ - Updated dependencies [648273b]
152
+ - Updated dependencies [648273b]
153
+ - Updated dependencies [648273b]
154
+ - Updated dependencies [2dcb3a0]
155
+ - Updated dependencies [a000b47]
156
+ - Updated dependencies [74eae6c]
157
+ - Updated dependencies [9501536]
158
+ - Updated dependencies [0ec8dc6]
159
+ - Updated dependencies [dc2151f]
160
+ - Updated dependencies [134dcb9]
161
+ - Updated dependencies [52987a7]
162
+ - Updated dependencies [38ce068]
163
+ - Updated dependencies [b654052]
164
+ - Updated dependencies [11865b4]
165
+ - Updated dependencies [4c1260e]
166
+ - Updated dependencies [44f9cbe]
167
+ - Updated dependencies [f175245]
168
+ - @truefoundry/trueforge-sdk@0.2.0
169
+
170
+ ## 0.3.0-rc.11
171
+
172
+ ### Patch Changes
173
+
174
+ - 4be60e7: Bump `@truefoundry/assistant-ui-runtime` to `0.1.41` for turn-scoped sandbox artifact downloads and to stop stale session history from merging after a session switch.
175
+ - 551b6a8: Default MCP tool approval to `@destructive` only. Selecting Other/read-only tools clears approval; selecting destructive tools keeps it on. Migrate mounts still carrying the old `@write`+`@destructive` default.
176
+ - 551b6a8: Let Build Agent pick which MCP tools require human approval, saved as `require_approval_for_tools` on the agent spec, and make unchecked tool checkboxes legible in both tool selectors. The agent Overview tab now expands each attached MCP server into its tools, with read/write/destructive labels and approval state.
177
+ - ffbb239: Add a hover ellipsis delete menu with confirmation dialog on Sessions list rows.
178
+ - a655537: Add a `turn.update` event schema with paused/running status and `action_required_on_events`.
179
+ - Updated dependencies [648273b]
180
+ - Updated dependencies [648273b]
181
+ - @truefoundry/trueforge-sdk@0.2.0-rc.9
182
+
183
+ ## 0.3.0-rc.10
184
+
185
+ ### Patch Changes
186
+
187
+ - 584e815: Gate Save Agent (create) on tenant CREATE from list-permissions, keep Update Agent on agent MANAGE, unwrap `{ type, permissions }`, and bump `@truefoundry/assistant-ui-runtime` to `0.1.39`.
188
+
3
189
  ## 0.3.0-rc.9
4
190
 
5
191
  ### Patch Changes
@@ -79,7 +265,7 @@
79
265
 
80
266
  ### Patch Changes
81
267
 
82
- - 762ecc0: TrueFoundry skills catalog: proxy GET /skills and /skills/versions from ServiceFoundry; settings skill writes return 424. SkillManifest is a type-discriminated oneOf of GitSkill | TrueFoundryRegistrySkill (`type: truefoundry`; name is FQN, display_name is short). AvailableSkill exposes optional metadata (display_name, repository_name, version). AgentSpec skill refs allow opaque FQN names, optional preload (registry), and max 50. UI draft skill mounts map catalog `id` to AgentSpec `name`.
268
+ - 762ecc0: [truefoundry] TrueFoundry skills catalog: proxy GET /skills and /skills/versions from ServiceFoundry; settings skill writes return 424. SkillManifest is a type-discriminated oneOf of GitSkill | TrueFoundryRegistrySkill (`type: truefoundry`; name is FQN, display_name is short). AvailableSkill exposes optional metadata (display_name, repository_name, version). AgentSpec skill refs allow opaque FQN names, optional preload (registry), and max 50. UI draft skill mounts map catalog `id` to AgentSpec `name`.
83
269
  - 26a9b80: Add an agent-scoped Schedules tab and route library schedule actions into it.
84
270
  - 1b8a3f7: Add documentation links to the code snippets view and shell actions.
85
271
  - d2fdfc9: Add agent-filtered chat history labels, preserve Try Agent and explicit history-filter intent in URL query state while resolving backend IDs, reset active chats when users change filters, keep Try Agent highlighted as chat, and route fresh agent builders at `/build-agent` before their session URL is assigned.
@@ -106,7 +292,7 @@
106
292
  - 2284d3b: Polish the MCP tool selector controls, loading state, and API error messages.
107
293
  - e3973a5: Group schedule recurrence controls and display the cadence in an attached summary footer.
108
294
  - f2ca338: Show active/paused schedule counts in the Agents library, pin selected MCPs when reopening the tools modal, and align paused schedule badge colors.
109
- - 77c5c33: Show TrueFoundry skill repositories and versions in skill pickers, load version choices lazily, preserve the chosen version FQN when attaching skills, keep picker ordering stable while open, and add registry-only preload controls to selected skill pills.
295
+ - 77c5c33: [truefoundry] Show TrueFoundry skill repositories and versions in skill pickers, load version choices lazily, preserve the chosen version FQN when attaching skills, keep picker ordering stable while open, and add registry-only preload controls to selected skill pills.
110
296
  - 26a9b80: Show weekly schedule days before the time controls.
111
297
  - 1b8a3f7: Match the Build Agent configuration panel width to the agent playground and identify sessions created by schedule runs.
112
298
  - adaf532: Widen the sidebar rail and its nav buttons so labels like "Build Agent" have more breathing room.
@@ -151,7 +337,7 @@
151
337
  - 0cc59f8: Wire schedule test runs and show last five run status chips on the schedules table. Bump `@truefoundry/assistant-ui-runtime` to `0.1.25`.
152
338
  - 0cc59f8: Add global Schedules page at `/schedules` with listing, popover-based filters, and create/edit drawer wired to the schedule API. New schedules save as paused, open a Test Schedule review with MCP connect status, and support Activate Anyway. List schedules uses server token pagination and multi-agent filters. Agents shows a Schedules count column (warning when any are paused) loaded via a batched list for on-screen agents. Add Table primitives with client-side and token pagination plus portal DropdownMenu so row actions are not clipped by overflow. Export a reusable popover select with single- and multi-select modes.
153
339
  - 788636d: Sidebar layout is a permanent icon+label nav rail (no expand/collapse). Recent chats are hidden from the sidebar and mobile drawer; the drawer shows nav actions only.
154
- - 8f1a2dc: Add a TrueFoundry-managed model registry. When `TRUEFOUNDRY_SERVICEFOUNDRY_SERVER_URL` is set, models are listed from the TrueFoundry ServiceFoundry server and turns are routed through the tenant's default AI Gateway with the caller's token. Mutually exclusive with OIDC. Supports internal mutual TLS to the ServiceFoundry server via `TRUEFOUNDRY_MTLS_ENABLED`/`TRUEFOUNDRY_MTLS_CERTS_DIR`.
340
+ - 8f1a2dc: [truefoundry] Add a TrueFoundry-managed model registry. When `TRUEFOUNDRY_SERVICEFOUNDRY_SERVER_URL` is set, models are listed from the TrueFoundry ServiceFoundry server and turns are routed through the tenant's default AI Gateway with the caller's token. Mutually exclusive with OIDC. Supports internal mutual TLS to the ServiceFoundry server via `TRUEFOUNDRY_MTLS_ENABLED`/`TRUEFOUNDRY_MTLS_CERTS_DIR`.
155
341
 
156
342
  ### Patch Changes
157
343
 
@@ -172,7 +358,7 @@
172
358
  - 333230d: Improve Agent Sessions with a resizable divider, accurate turn grouping, optional cost display, and reliable timeline tooltips with sub-agent details. Simplify schedule recurrence and default new schedules to the local timezone.
173
359
  - c4ee138: Unregister the `/settings` route when Settings chrome is unavailable (no catalog or `capabilities.settings.enabled` is false), matching the sidebar Settings button gate.
174
360
  - c4ee138: Split New Chat and New Agent draft preference stores. New Chat remembers only model (+ reasoning), skills, and MCP; New Agent keeps the full seed including runtime config.
175
- - 4c1260e: Wire TrueFoundry MCP authorize, status, and delete through ServiceFoundry; stub list auth_status; gate oauth2 invoke mid-turn with authRequired; paginate MCP server lists. UI treats SFY consent `code`/`error` on the FE landing like local DCR success/failure.
361
+ - 4c1260e: [truefoundry] Wire TrueFoundry MCP authorize, status, and delete through ServiceFoundry; stub list auth_status; gate oauth2 invoke mid-turn with authRequired; paginate MCP server lists. UI treats SFY consent `code`/`error` on the FE landing like local DCR success/failure.
176
362
  - c4ee138: Per-turn Tokens in Agent Sessions shows a keyboard-accessible Input / Output / Cached tooltip (Input is uncached).
177
363
  - bc11131: Share a single `PageHeader` across chat and list chrome so title size/height stay consistent, and drop decorative title icons.
178
364
  - Updated dependencies [648273b]
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  useSlot
4
- } from "./chunk-4OEAJKLJ.js";
5
- import "./chunk-T6QQV5LK.js";
4
+ } from "./chunk-XR4S7B2K.js";
5
+ import "./chunk-AO23SZBG.js";
6
6
  import {
7
7
  Icon
8
- } from "./chunk-3ZW74FHC.js";
9
- import "./chunk-2GIZY3JJ.js";
8
+ } from "./chunk-4OZFQVSR.js";
9
+ import "./chunk-2XT2VUT4.js";
10
10
  import "./chunk-M6MHLVSO.js";
11
- import "./chunk-CG75X77Q.js";
11
+ import "./chunk-QKFMAQ7O.js";
12
12
  import {
13
13
  cn
14
- } from "./chunk-JCL3Q7RW.js";
14
+ } from "./chunk-6UACSIIY.js";
15
15
 
16
16
  // src/atoms/agent-details/AgentCodeSnippets.tsx
17
17
  import { useEffect, useState } from "react";
@@ -86,4 +86,4 @@ function AgentCodeSnippets({ snippets }) {
86
86
  export {
87
87
  AgentCodeSnippets as default
88
88
  };
89
- //# sourceMappingURL=AgentCodeSnippets-ARHIK2T6.js.map
89
+ //# sourceMappingURL=AgentCodeSnippets-DAZWEBJS.js.map
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import {
3
+ AgentMetricChart
4
+ } from "./chunk-XHPIJ77Q.js";
5
+ import "./chunk-XR4S7B2K.js";
6
+ import "./chunk-AO23SZBG.js";
7
+ import "./chunk-4OZFQVSR.js";
8
+ import "./chunk-2XT2VUT4.js";
9
+ import "./chunk-M6MHLVSO.js";
10
+ import "./chunk-QKFMAQ7O.js";
11
+ import "./chunk-6UACSIIY.js";
12
+ export {
13
+ AgentMetricChart
14
+ };
15
+ //# sourceMappingURL=AgentMetricChart-VDIE3S2P.js.map
@@ -0,0 +1,314 @@
1
+ "use client";
2
+ import {
3
+ TOOL_TAG_ALL,
4
+ Tooltip,
5
+ approvalSelectorsFromMount,
6
+ disableSelectorsFromMount,
7
+ editableMountsFromSpec,
8
+ enableSelectorsFromMount,
9
+ mcpToolKind,
10
+ namedToolRequiresApproval,
11
+ selectedToolNames,
12
+ useSlot
13
+ } from "./chunk-XR4S7B2K.js";
14
+ import "./chunk-AO23SZBG.js";
15
+ import {
16
+ Icon
17
+ } from "./chunk-4OZFQVSR.js";
18
+ import {
19
+ useOptionalServer,
20
+ useServerCapabilities
21
+ } from "./chunk-2XT2VUT4.js";
22
+ import "./chunk-M6MHLVSO.js";
23
+ import "./chunk-QKFMAQ7O.js";
24
+ import {
25
+ cn
26
+ } from "./chunk-6UACSIIY.js";
27
+
28
+ // src/atoms/agent-details/AgentOverview.tsx
29
+ import { useState as useState2 } from "react";
30
+
31
+ // src/atoms/agent-details/AgentOverviewMcpServers.tsx
32
+ import { useEffect, useMemo, useState } from "react";
33
+ import { jsx, jsxs } from "react/jsx-runtime";
34
+ var KIND_CLASSES = {
35
+ read: "border-border bg-secondary-bg text-text-secondary",
36
+ write: "border-border bg-secondary-bg text-text-primary",
37
+ destructive: "border-failure-bg/30 bg-failure-bg/10 text-failure-bg"
38
+ };
39
+ var KIND_ORDER = {
40
+ read: 0,
41
+ write: 1,
42
+ unknown: 2,
43
+ destructive: 3
44
+ };
45
+ function toolCountLabel(count) {
46
+ return count === 1 ? "1 tool" : `${count} tools`;
47
+ }
48
+ function toolSelectorLabel(enableSelectors) {
49
+ if (enableSelectors.includes(TOOL_TAG_ALL)) return "All tools";
50
+ return enableSelectors.filter((selector) => selector.startsWith("@")).join(" ");
51
+ }
52
+ function ApprovalCountBadge({ count }) {
53
+ return /* @__PURE__ */ jsxs(
54
+ "span",
55
+ {
56
+ className: "border-warning-bg/40 bg-warning-bg/10 text-warning-bg inline-flex shrink-0 items-center gap-1 rounded-full border px-1.5 py-0.5 text-[0.625rem] font-medium",
57
+ "aria-label": `${count} ${count === 1 ? "tool needs" : "tools need"} approval`,
58
+ children: [
59
+ /* @__PURE__ */ jsx(Icon, { name: "shield-check", className: "size-2.5" }),
60
+ count
61
+ ]
62
+ }
63
+ );
64
+ }
65
+ function ToolKindPill({ kind }) {
66
+ return /* @__PURE__ */ jsx("span", { className: cn("shrink-0 rounded-full border px-1.5 py-0.5 text-[0.625rem] font-medium", KIND_CLASSES[kind]), children: kind });
67
+ }
68
+ function ApprovalIndicator({ approvalRequired, toolName }) {
69
+ return /* @__PURE__ */ jsx(
70
+ Tooltip,
71
+ {
72
+ content: approvalRequired ? "Asks for approval before running" : "Runs without asking for approval",
73
+ triggerClassName: "shrink-0",
74
+ children: /* @__PURE__ */ jsx(
75
+ "span",
76
+ {
77
+ role: "img",
78
+ "aria-label": `${toolName} ${approvalRequired ? "requires approval" : "runs without approval"}`,
79
+ className: cn(
80
+ "flex size-5 items-center justify-center rounded-md border",
81
+ approvalRequired ? "border-warning-bg/50 bg-warning-bg/10 text-warning-bg" : "border-border text-text-secondary"
82
+ ),
83
+ children: /* @__PURE__ */ jsx(Icon, { name: approvalRequired ? "shield-check" : "shield", className: "size-3" })
84
+ }
85
+ )
86
+ }
87
+ );
88
+ }
89
+ function AgentOverviewMcpServers({ mcpServers }) {
90
+ const AgentOverviewCard = useSlot("AgentOverviewCard");
91
+ const server = useOptionalServer();
92
+ const getMcpTools = server?.getMcpTools;
93
+ const mounts = useMemo(() => editableMountsFromSpec(mcpServers), [mcpServers]);
94
+ const [toolsByServer, setToolsByServer] = useState({});
95
+ const [expandedIds, setExpandedIds] = useState(() => /* @__PURE__ */ new Set());
96
+ useEffect(() => {
97
+ if (getMcpTools === void 0) return;
98
+ let cancelled = false;
99
+ for (const mount of mounts) {
100
+ void getMcpTools({ connectorId: mount.name }).then(
101
+ (tools) => {
102
+ if (!cancelled) setToolsByServer((prev) => ({ ...prev, [mount.name]: tools }));
103
+ },
104
+ () => {
105
+ }
106
+ );
107
+ }
108
+ return () => {
109
+ cancelled = true;
110
+ };
111
+ }, [getMcpTools, mounts]);
112
+ if (mounts.length === 0) {
113
+ return /* @__PURE__ */ jsx(AgentOverviewCard, { title: "MCP Servers & Tools", icon: "plug", count: 0, children: /* @__PURE__ */ jsx("p", { className: "text-text-secondary text-xs", children: "No connectors attached." }) });
114
+ }
115
+ return /* @__PURE__ */ jsx(AgentOverviewCard, { title: "MCP Servers & Tools", icon: "plug", count: mounts.length, children: /* @__PURE__ */ jsx("ul", { className: "space-y-1.5", children: mounts.map((mount) => {
116
+ const tools = toolsByServer[mount.name] ?? [];
117
+ const selectors = approvalSelectorsFromMount(mount.value);
118
+ const enableSelectors = enableSelectorsFromMount(mount.value);
119
+ const enabled = selectedToolNames({
120
+ enableSelectors,
121
+ disableSelectors: disableSelectorsFromMount(mount.value),
122
+ tools
123
+ });
124
+ const toolNames = enabled.names.map((toolName) => {
125
+ const tool = tools.find((item) => item.name === toolName);
126
+ const kind = tool === void 0 ? void 0 : mcpToolKind(tool);
127
+ return {
128
+ toolName,
129
+ kind,
130
+ approvalRequired: namedToolRequiresApproval({ toolName, tools, selectors })
131
+ };
132
+ }).sort((left, right) => KIND_ORDER[left.kind ?? "unknown"] - KIND_ORDER[right.kind ?? "unknown"]);
133
+ const approvalCount = toolNames.filter((tool) => tool.approvalRequired).length;
134
+ const expanded = expandedIds.has(mount.id);
135
+ return /* @__PURE__ */ jsxs("li", { className: "overflow-hidden rounded-md border border-border", children: [
136
+ /* @__PURE__ */ jsxs(
137
+ "button",
138
+ {
139
+ type: "button",
140
+ "aria-expanded": expanded,
141
+ disabled: toolNames.length === 0,
142
+ className: "flex w-full cursor-pointer items-center gap-2 bg-secondary-bg px-2.5 py-2 text-left text-xs hover:bg-ghost-button-hover disabled:cursor-default disabled:hover:bg-secondary-bg",
143
+ onClick: () => setExpandedIds((prev) => {
144
+ const next = new Set(prev);
145
+ if (expanded) next.delete(mount.id);
146
+ else next.add(mount.id);
147
+ return next;
148
+ }),
149
+ children: [
150
+ /* @__PURE__ */ jsx(
151
+ Icon,
152
+ {
153
+ name: "chevron-down",
154
+ className: cn(
155
+ "size-3 shrink-0 text-text-secondary transition-transform",
156
+ expanded ? void 0 : "-rotate-90",
157
+ toolNames.length === 0 && "invisible"
158
+ )
159
+ }
160
+ ),
161
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate font-medium", children: mount.name }),
162
+ /* @__PURE__ */ jsx("span", { className: "shrink-0 text-text-secondary", children: enabled.resolved ? toolCountLabel(toolNames.length) : toolSelectorLabel(enableSelectors) }),
163
+ approvalCount > 0 ? /* @__PURE__ */ jsx(ApprovalCountBadge, { count: approvalCount }) : null
164
+ ]
165
+ }
166
+ ),
167
+ expanded ? /* @__PURE__ */ jsx("ul", { className: "divide-y divide-border border-t border-border", children: toolNames.map(({ toolName, kind, approvalRequired }) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2 px-2.5 py-1.5", children: [
168
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate font-mono text-[0.6875rem]", title: toolName, children: toolName }),
169
+ kind ? /* @__PURE__ */ jsx(ToolKindPill, { kind }) : null,
170
+ /* @__PURE__ */ jsx(ApprovalIndicator, { approvalRequired, toolName })
171
+ ] }, toolName)) }) : null
172
+ ] }, mount.id);
173
+ }) }) });
174
+ }
175
+
176
+ // src/atoms/agent-details/AgentOverview.tsx
177
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
178
+ var valueClassName = "text-right font-mono text-primary-button-bg";
179
+ function isRecord(value) {
180
+ return typeof value === "object" && value != null;
181
+ }
182
+ function readName(value) {
183
+ if (!("name" in value) || typeof value.name !== "string") return null;
184
+ return value.name;
185
+ }
186
+ function readRecordValue(record, ...keys) {
187
+ for (const key of keys) {
188
+ const value = record?.[key];
189
+ if (value !== void 0) return value;
190
+ }
191
+ return void 0;
192
+ }
193
+ function displayModelName(name) {
194
+ const slash = name.lastIndexOf("/");
195
+ return slash >= 0 ? name.slice(slash + 1) : name;
196
+ }
197
+ function AgentOverview({ detail }) {
198
+ const Markdown = useSlot("Markdown");
199
+ const AgentOverviewCard = useSlot("AgentOverviewCard");
200
+ const capabilitiesAvailable = useServerCapabilities();
201
+ const [instructionsView, setInstructionsView] = useState2("markdown");
202
+ const [copied, setCopied] = useState2(false);
203
+ const spec = detail.agentSpec;
204
+ const skills = spec.skills ?? [];
205
+ const modelParams = isRecord(spec.model.params) ? spec.model.params : null;
206
+ const maxTokens = readRecordValue(modelParams, "maxTokens", "max_tokens");
207
+ const temperature = readRecordValue(modelParams, "temperature");
208
+ const config = isRecord(spec.config) ? spec.config : null;
209
+ const sandbox = isRecord(config?.sandbox) ? config.sandbox : null;
210
+ const instructions = spec.instructions?.trim() ? spec.instructions : null;
211
+ const description = detail.description?.trim() ? detail.description : null;
212
+ const execution = [
213
+ ["Sandbox", typeof sandbox?.enabled === "boolean" ? sandbox.enabled ? "Enabled" : "Disabled" : void 0],
214
+ ["Iteration limit", readRecordValue(config, "iterationLimit", "iteration_limit")],
215
+ ["Response format", readRecordValue(config, "responseFormat", "response_format")]
216
+ ].filter((entry) => {
217
+ return typeof entry[1] === "string" || typeof entry[1] === "number";
218
+ });
219
+ const capabilities = [
220
+ ["Generative UI", spec.config?.generativeUi?.enabled],
221
+ ["Dynamic sub-agents", spec.config?.dynamicSubAgents?.enabled],
222
+ ["Ask user questions", spec.config?.askUserQuestions?.enabled],
223
+ ...capabilitiesAvailable?.webSearch?.enabled === true ? [["Web search", spec.config?.webSearch?.enabled]] : []
224
+ ].filter((entry) => typeof entry[1] === "boolean");
225
+ const toggleLabel = instructionsView === "markdown" ? "Raw" : "Markdown";
226
+ return /* @__PURE__ */ jsx2("div", { className: "flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4 md:overflow-hidden", children: /* @__PURE__ */ jsxs2("div", { className: "grid min-h-0 flex-1 gap-3 md:grid-cols-[minmax(0,1fr)_22rem] md:overflow-hidden", children: [
227
+ /* @__PURE__ */ jsxs2("section", { className: "flex min-h-64 flex-col rounded-lg border border-border bg-card-bg p-4 text-text-primary", children: [
228
+ /* @__PURE__ */ jsxs2("div", { className: "mb-3 flex shrink-0 items-center justify-between gap-2", children: [
229
+ /* @__PURE__ */ jsxs2("h2", { className: "flex items-center gap-1.5 text-sm font-semibold text-text-primary", children: [
230
+ /* @__PURE__ */ jsx2(Icon, { name: "book-open", className: "size-4 text-text-secondary" }),
231
+ "Instructions"
232
+ ] }),
233
+ instructions ? /* @__PURE__ */ jsxs2(
234
+ "div",
235
+ {
236
+ className: "inline-flex h-7 items-stretch overflow-hidden rounded-md border border-border bg-primary-bg text-xs font-medium text-text-secondary",
237
+ role: "group",
238
+ "aria-label": "Instructions actions",
239
+ children: [
240
+ /* @__PURE__ */ jsx2(
241
+ "button",
242
+ {
243
+ type: "button",
244
+ "aria-label": `Show ${toggleLabel}`,
245
+ onClick: () => setInstructionsView((view) => view === "markdown" ? "raw" : "markdown"),
246
+ className: "cursor-pointer px-2.5 transition-colors hover:bg-ghost-button-hover hover:text-text-primary",
247
+ children: toggleLabel
248
+ }
249
+ ),
250
+ /* @__PURE__ */ jsx2("span", { className: "w-px self-stretch bg-border", "aria-hidden": true }),
251
+ /* @__PURE__ */ jsx2(
252
+ "button",
253
+ {
254
+ type: "button",
255
+ title: copied ? "Copied!" : "Copy",
256
+ "aria-label": copied ? "Copied!" : "Copy",
257
+ onClick: () => {
258
+ void navigator.clipboard.writeText(instructions).then(() => {
259
+ setCopied(true);
260
+ setTimeout(() => setCopied(false), 2e3);
261
+ });
262
+ },
263
+ className: "inline-flex cursor-pointer items-center justify-center px-2 transition-colors hover:bg-ghost-button-hover hover:text-text-primary",
264
+ children: /* @__PURE__ */ jsx2(Icon, { name: copied ? "check" : "copy", size: 12 })
265
+ }
266
+ )
267
+ ]
268
+ }
269
+ ) : null
270
+ ] }),
271
+ /* @__PURE__ */ jsx2("div", { className: "min-h-0 flex-1 overflow-auto", children: instructions ? instructionsView === "markdown" ? /* @__PURE__ */ jsx2(Markdown, { content: instructions, readOnly: true, className: "text-sm" }) : /* @__PURE__ */ jsx2("pre", { className: "whitespace-pre-wrap break-words font-mono text-sm text-text-primary", children: instructions }) : /* @__PURE__ */ jsx2("p", { className: "text-sm text-text-secondary", children: "No instructions for this agent." }) })
272
+ ] }),
273
+ /* @__PURE__ */ jsxs2("aside", { className: "flex min-h-0 min-w-0 flex-col gap-3 md:overflow-auto", children: [
274
+ description ? /* @__PURE__ */ jsx2(AgentOverviewCard, { title: "Description", icon: "file", children: /* @__PURE__ */ jsx2("p", { className: "text-xs text-text-secondary", children: description }) }) : null,
275
+ /* @__PURE__ */ jsx2(AgentOverviewCard, { title: "Model Configuration", icon: "cpu", children: /* @__PURE__ */ jsxs2("dl", { className: "grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1 text-xs", children: [
276
+ /* @__PURE__ */ jsx2("dt", { className: "text-text-secondary", children: "Model" }),
277
+ /* @__PURE__ */ jsx2("dd", { className: cn(valueClassName, "truncate"), title: spec.model.name, children: displayModelName(spec.model.name) }),
278
+ typeof maxTokens === "number" ? /* @__PURE__ */ jsxs2(Fragment, { children: [
279
+ /* @__PURE__ */ jsx2("dt", { className: "text-text-secondary", children: "Max tokens" }),
280
+ /* @__PURE__ */ jsx2("dd", { className: valueClassName, children: maxTokens })
281
+ ] }) : null,
282
+ spec.model.params?.reasoningEffort !== void 0 ? /* @__PURE__ */ jsxs2(Fragment, { children: [
283
+ /* @__PURE__ */ jsx2("dt", { className: "text-text-secondary", children: "Reasoning" }),
284
+ /* @__PURE__ */ jsx2("dd", { className: valueClassName, children: spec.model.params.reasoningEffort })
285
+ ] }) : null,
286
+ typeof temperature === "number" ? /* @__PURE__ */ jsxs2(Fragment, { children: [
287
+ /* @__PURE__ */ jsx2("dt", { className: "text-text-secondary", children: "Temperature" }),
288
+ /* @__PURE__ */ jsx2("dd", { className: valueClassName, children: temperature })
289
+ ] }) : null
290
+ ] }) }),
291
+ /* @__PURE__ */ jsx2(AgentOverviewMcpServers, { mcpServers: spec.mcpServers }),
292
+ /* @__PURE__ */ jsx2(AgentOverviewCard, { title: "Attached Skills", icon: "lightbulb", count: skills.length, children: skills.length === 0 ? /* @__PURE__ */ jsx2("p", { className: "text-xs text-text-secondary", children: "No skills attached." }) : /* @__PURE__ */ jsx2("ul", { className: "space-y-1.5", children: skills.map((skill, index) => /* @__PURE__ */ jsx2(
293
+ "li",
294
+ {
295
+ className: "rounded-md bg-secondary-bg px-2 py-1.5 text-xs",
296
+ children: readName(skill) ?? `Skill ${index + 1}`
297
+ },
298
+ `${readName(skill) ?? "skill"}-${index}`
299
+ )) }) }),
300
+ execution.length > 0 ? /* @__PURE__ */ jsx2(AgentOverviewCard, { title: "Execution", icon: "terminal", children: /* @__PURE__ */ jsx2("dl", { className: "space-y-1 text-xs", children: execution.map(([label, value]) => /* @__PURE__ */ jsxs2("div", { className: "flex justify-between gap-3", children: [
301
+ /* @__PURE__ */ jsx2("dt", { className: "text-text-secondary", children: label }),
302
+ /* @__PURE__ */ jsx2("dd", { className: valueClassName, children: value })
303
+ ] }, label)) }) }) : null,
304
+ capabilities.length > 0 ? /* @__PURE__ */ jsx2(AgentOverviewCard, { title: "Capabilities", icon: "cube", children: /* @__PURE__ */ jsx2("dl", { className: "space-y-1 text-xs", children: capabilities.map(([label, enabled]) => /* @__PURE__ */ jsxs2("div", { className: "flex justify-between gap-3", children: [
305
+ /* @__PURE__ */ jsx2("dt", { className: "text-text-secondary", children: label }),
306
+ /* @__PURE__ */ jsx2("dd", { className: valueClassName, children: enabled ? "Enabled" : "Disabled" })
307
+ ] }, label)) }) }) : null
308
+ ] })
309
+ ] }) });
310
+ }
311
+ export {
312
+ AgentOverview as default
313
+ };
314
+ //# sourceMappingURL=AgentOverview-5JIVYXPX.js.map