@agent-native/core 0.117.2 → 0.118.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 (776) hide show
  1. package/corpus/README.md +3 -3
  2. package/corpus/core/CHANGELOG.md +51 -0
  3. package/corpus/core/docs/content/custom-design-system.mdx +445 -0
  4. package/corpus/core/docs/content/toolkit-ui.mdx +16 -0
  5. package/corpus/core/package.json +1 -1
  6. package/corpus/core/src/a2a/client.ts +32 -10
  7. package/corpus/core/src/a2a/types.ts +1 -0
  8. package/corpus/core/src/agent/types.ts +1 -1
  9. package/corpus/core/src/cli/index.ts +18 -10
  10. package/corpus/core/src/cli/multi-frontier-runs.ts +5 -3
  11. package/corpus/core/src/cli/templates-meta.ts +0 -12
  12. package/corpus/core/src/cli/workspace-dev.ts +1 -1
  13. package/corpus/core/src/client/AgentPanel.tsx +99 -108
  14. package/corpus/core/src/client/AssistantChat.tsx +30 -13
  15. package/corpus/core/src/client/CommandMenu.tsx +68 -178
  16. package/corpus/core/src/client/RunStuckBanner.tsx +39 -47
  17. package/corpus/core/src/client/agent-chat-adapter.ts +3 -1
  18. package/corpus/core/src/client/app-providers.tsx +1 -1
  19. package/corpus/core/src/client/chat/action-chat-ui-surface.tsx +32 -0
  20. package/corpus/core/src/client/chat/message-components.tsx +169 -18
  21. package/corpus/core/src/client/chat/tool-call-display.tsx +50 -14
  22. package/corpus/core/src/client/chat/widgets/InlineExtensionWidget.tsx +13 -40
  23. package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +7 -3
  24. package/corpus/core/src/client/components/ui/message-scroller.tsx +15 -1
  25. package/corpus/core/src/client/conversation/AgentConversation.tsx +12 -1
  26. package/corpus/core/src/client/error-capture.ts +2 -6
  27. package/corpus/core/src/client/i18n.tsx +22 -0
  28. package/corpus/core/src/client/index.ts +17 -0
  29. package/corpus/core/src/client/org/TeamPage.tsx +257 -153
  30. package/corpus/core/src/client/progress/RunsTray.tsx +89 -88
  31. package/corpus/core/src/client/resources/McpConnectionSuggestion.tsx +25 -16
  32. package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +34 -13
  33. package/corpus/core/src/client/resources/ResourcesPanel.tsx +5 -1
  34. package/corpus/core/src/client/resources/mcp-integration-catalog.ts +20 -17
  35. package/corpus/core/src/client/resources/mcp-integration-logos.ts +2 -2
  36. package/corpus/core/src/client/route-chunk-recovery.ts +5 -3
  37. package/corpus/core/src/client/session-replay.ts +3 -3
  38. package/corpus/core/src/client/settings/DemoModeSection.tsx +6 -18
  39. package/corpus/core/src/client/settings/SecretsSection.tsx +97 -52
  40. package/corpus/core/src/client/settings/SettingsPanel.tsx +217 -252
  41. package/corpus/core/src/client/settings/SettingsTabsPage.tsx +23 -2
  42. package/corpus/core/src/client/settings/VoiceTranscriptionSection.tsx +7 -18
  43. package/corpus/core/src/client/settings/index.ts +7 -0
  44. package/corpus/core/src/client/settings/useSettingsPanelController.ts +155 -0
  45. package/corpus/core/src/client/setup-connections/BuilderConnectCard.tsx +116 -51
  46. package/corpus/core/src/client/setup-connections/index.ts +10 -0
  47. package/corpus/core/src/client/setup-connections/useBuilderConnectCardController.ts +82 -0
  48. package/corpus/core/src/client/sharing/ShareButton.tsx +64 -586
  49. package/corpus/core/src/client/sharing/ShareDialog.tsx +299 -633
  50. package/corpus/core/src/client/sharing/index.ts +42 -0
  51. package/corpus/core/src/client/sharing/share-controller-helpers.ts +318 -0
  52. package/corpus/core/src/client/sharing/useShareButtonController.ts +600 -0
  53. package/corpus/core/src/client/sharing/useShareDialogController.ts +559 -0
  54. package/corpus/core/src/client/sse-event-processor.ts +23 -0
  55. package/corpus/core/src/client/tool-display.ts +71 -0
  56. package/corpus/core/src/client/transcription/use-live-transcription.ts +64 -45
  57. package/corpus/core/src/client/use-agent-engine-configured.ts +12 -19
  58. package/corpus/core/src/client/use-chat-threads.ts +33 -12
  59. package/corpus/core/src/deploy/build.ts +2 -1
  60. package/corpus/core/src/guards/db-tool-scoping.ts +1 -1
  61. package/corpus/core/src/integrations/adapters/slack.ts +84 -5
  62. package/corpus/core/src/integrations/index.ts +5 -1
  63. package/corpus/core/src/localization/default-messages.ts +6 -1
  64. package/corpus/core/src/mcp-client/oauth-routes.ts +61 -14
  65. package/corpus/core/src/scripts/call-agent.ts +5 -1
  66. package/corpus/core/src/server/realtime-voice.ts +5 -2
  67. package/corpus/core/src/styles/agent-native.css +0 -24
  68. package/corpus/core/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  69. package/corpus/core/src/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  70. package/corpus/core/src/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
  71. package/corpus/core/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
  72. package/corpus/core/src/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
  73. package/corpus/core/src/templates/default/app/design-system.ts +3 -0
  74. package/corpus/core/src/templates/default/app/root.tsx +5 -2
  75. package/corpus/core/src/templates/default/package.json +1 -0
  76. package/corpus/core/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  77. package/corpus/core/src/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  78. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  79. package/corpus/core/src/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  80. package/corpus/core/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
  81. package/corpus/core/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
  82. package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +7 -5
  83. package/corpus/core/src/terminal/cli-registry.ts +1 -1
  84. package/corpus/core/src/vite/client.ts +205 -1
  85. package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  86. package/corpus/templates/analytics/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  87. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +22 -2
  88. package/corpus/templates/analytics/.agents/skills/shadcn-ui/SKILL.md +28 -4
  89. package/corpus/templates/analytics/app/components/ui/toolkit-provider.tsx +6 -1
  90. package/corpus/templates/analytics/app/design-system.ts +3 -0
  91. package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +13 -1
  92. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +10 -0
  93. package/corpus/templates/analytics/changelog/2026-07-22-show-a-useful-error-when-saving-a-dashboard-view-fails.md +6 -0
  94. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  95. package/corpus/templates/assets/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  96. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +22 -2
  97. package/corpus/templates/assets/.agents/skills/shadcn-ui/SKILL.md +28 -4
  98. package/corpus/templates/assets/app/components/ui/alert.tsx +1 -0
  99. package/corpus/templates/assets/app/components/ui/toolkit-provider.tsx +6 -1
  100. package/corpus/templates/assets/app/design-system.ts +3 -0
  101. package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +26 -30
  102. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  103. package/corpus/templates/brain/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  104. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +22 -2
  105. package/corpus/templates/brain/.agents/skills/shadcn-ui/SKILL.md +28 -4
  106. package/corpus/templates/brain/app/components/ui/dialog.tsx +1 -0
  107. package/corpus/templates/brain/app/components/ui/toolkit-provider.tsx +6 -1
  108. package/corpus/templates/brain/app/design-system.ts +3 -0
  109. package/corpus/templates/brain/app/routes/sources.tsx +189 -122
  110. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  111. package/corpus/templates/calendar/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  112. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +22 -2
  113. package/corpus/templates/calendar/.agents/skills/shadcn-ui/SKILL.md +28 -4
  114. package/corpus/templates/calendar/app/components/ui/toolkit-provider.tsx +6 -1
  115. package/corpus/templates/calendar/app/design-system.ts +3 -0
  116. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  117. package/corpus/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  118. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
  119. package/corpus/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
  120. package/corpus/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
  121. package/corpus/templates/chat/app/design-system.ts +3 -0
  122. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  123. package/corpus/templates/clips/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  124. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +22 -2
  125. package/corpus/templates/clips/.agents/skills/shadcn-ui/SKILL.md +28 -4
  126. package/corpus/templates/clips/AGENTS.md +8 -6
  127. package/corpus/templates/clips/actions/request-transcript.ts +90 -420
  128. package/corpus/templates/clips/actions/save-browser-transcript.ts +11 -28
  129. package/corpus/templates/clips/app/components/capture-install-options.tsx +5 -3
  130. package/corpus/templates/clips/app/components/player/transcript-panel.tsx +3 -136
  131. package/corpus/templates/clips/app/components/ui/toolkit-provider.tsx +6 -1
  132. package/corpus/templates/clips/app/design-system.ts +3 -0
  133. package/corpus/templates/clips/app/lib/capture-install-options.ts +15 -4
  134. package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
  135. package/corpus/templates/clips/app/routes/download.tsx +3 -2
  136. package/corpus/templates/clips/changelog/2026-07-22-fixed-an-intermittent-hydration-error-on-the-download-page.md +6 -0
  137. package/corpus/templates/clips/changelog/2026-07-22-fixed-transcript-generation-when-native-speech-capture-retur.md +6 -0
  138. package/corpus/templates/clips/changelog/2026-07-22-fixed-windows-recordings-aborting-during-the-countdown.md +6 -0
  139. package/corpus/templates/clips/changelog/2026-07-22-permissions-and-rewind-controls-are-now-grouped-with-clearer.md +6 -0
  140. package/corpus/templates/clips/changelog/2026-07-22-the-desktop-popover-opens-centered-under-the-menu-bar-icon-o.md +6 -0
  141. package/corpus/templates/clips/changelog/2026-07-22-transcript-generation-now-retries-with-backup-speech-recogni.md +6 -0
  142. package/corpus/templates/clips/desktop/src/app.tsx +86 -82
  143. package/corpus/templates/clips/desktop/src/styles.css +13 -0
  144. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +10 -1
  145. package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +37 -2
  146. package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +18 -0
  147. package/corpus/templates/clips/server/lib/public-agent-context.ts +2 -2
  148. package/corpus/templates/clips/server/register-secrets.ts +7 -6
  149. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  150. package/corpus/templates/content/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  151. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +22 -2
  152. package/corpus/templates/content/.agents/skills/shadcn-ui/SKILL.md +28 -4
  153. package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +41 -59
  154. package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +16 -84
  155. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +13 -7
  156. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +41 -41
  157. package/corpus/templates/content/app/components/editor/database/GalleryView.tsx +2 -1
  158. package/corpus/templates/content/app/components/editor/database/ListView.tsx +2 -1
  159. package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +9 -9
  160. package/corpus/templates/content/app/components/editor/database/sidebar.tsx +7 -7
  161. package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +11 -11
  162. package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +2 -2
  163. package/corpus/templates/content/app/components/ui/checkbox.tsx +1 -0
  164. package/corpus/templates/content/app/components/ui/collapsible.tsx +1 -0
  165. package/corpus/templates/content/app/components/ui/toolkit-provider.tsx +6 -1
  166. package/corpus/templates/content/app/design-system.ts +3 -0
  167. package/corpus/templates/content/app/global.css +29 -3
  168. package/corpus/templates/content/app/i18n-data.ts +10 -0
  169. package/corpus/templates/content/changelog/2026-07-22-page-actions-are-grouped-into-the-three-dots-menu-for-a-clea.md +6 -0
  170. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  171. package/corpus/templates/design/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  172. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +22 -2
  173. package/corpus/templates/design/.agents/skills/shadcn-ui/SKILL.md +28 -4
  174. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +8 -8
  175. package/corpus/templates/design/app/components/ui/command.tsx +1 -0
  176. package/corpus/templates/design/app/components/ui/toolkit-provider.tsx +6 -1
  177. package/corpus/templates/design/app/design-system.ts +3 -0
  178. package/corpus/templates/design/server/lib/fig-file-decoder.ts +1 -0
  179. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  180. package/corpus/templates/dispatch/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  181. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +22 -2
  182. package/corpus/templates/dispatch/.agents/skills/shadcn-ui/SKILL.md +28 -4
  183. package/corpus/templates/dispatch/app/components/ui/button.tsx +1 -0
  184. package/corpus/templates/dispatch/app/components/ui/toolkit-provider.tsx +17 -0
  185. package/corpus/templates/dispatch/app/design-system.ts +3 -0
  186. package/corpus/templates/dispatch/app/root.tsx +10 -7
  187. package/corpus/templates/dispatch/package.json +1 -0
  188. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  189. package/corpus/templates/forms/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  190. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +22 -2
  191. package/corpus/templates/forms/.agents/skills/shadcn-ui/SKILL.md +28 -4
  192. package/corpus/templates/forms/app/components/ui/toolkit-provider.tsx +6 -1
  193. package/corpus/templates/forms/app/design-system.ts +3 -0
  194. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  195. package/corpus/templates/macros/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  196. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +22 -2
  197. package/corpus/templates/macros/.agents/skills/shadcn-ui/SKILL.md +28 -4
  198. package/corpus/templates/macros/app/components/ui/toolkit-provider.tsx +6 -1
  199. package/corpus/templates/macros/app/design-system.ts +3 -0
  200. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  201. package/corpus/templates/mail/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  202. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +22 -2
  203. package/corpus/templates/mail/.agents/skills/shadcn-ui/SKILL.md +28 -4
  204. package/corpus/templates/mail/app/components/email/EmailThread.tsx +134 -93
  205. package/corpus/templates/mail/app/components/email/email-iframe-document.ts +8 -2
  206. package/corpus/templates/mail/app/components/ui/textarea.tsx +1 -21
  207. package/corpus/templates/mail/app/components/ui/toolkit-provider.tsx +6 -1
  208. package/corpus/templates/mail/app/design-system.ts +3 -0
  209. package/corpus/templates/mail/changelog/2026-07-22-email-messages-no-longer-flash-with-an-unstyled-page-while-l.md +6 -0
  210. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  211. package/corpus/templates/plan/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  212. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +22 -2
  213. package/corpus/templates/plan/.agents/skills/shadcn-ui/SKILL.md +28 -4
  214. package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +1 -1
  215. package/corpus/templates/plan/app/components/ui/toolkit-provider.tsx +6 -1
  216. package/corpus/templates/plan/app/design-system.ts +3 -0
  217. package/corpus/templates/plan/app/entry.client.tsx +3 -0
  218. package/corpus/templates/plan/changelog/2026-07-22-recover-stale-pages-after-a-deployment-refresh-automatically.md +6 -0
  219. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  220. package/corpus/templates/slides/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  221. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +22 -2
  222. package/corpus/templates/slides/.agents/skills/shadcn-ui/SKILL.md +28 -4
  223. package/corpus/templates/slides/app/components/ui/toolkit-provider.tsx +6 -1
  224. package/corpus/templates/slides/app/design-system.ts +3 -0
  225. package/corpus/templates/slides/app/hooks/use-agent-generating.ts +10 -3
  226. package/corpus/templates/slides/app/pages/Index.tsx +1 -0
  227. package/corpus/templates/slides/changelog/2026-07-22-new-deck-prompts-now-open-in-their-own-visible-chat-thread.md +6 -0
  228. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  229. package/corpus/templates/tasks/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  230. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +22 -2
  231. package/corpus/templates/tasks/.agents/skills/shadcn-ui/SKILL.md +28 -4
  232. package/corpus/templates/tasks/app/components/ui/toolkit-provider.tsx +17 -0
  233. package/corpus/templates/tasks/app/design-system.ts +3 -0
  234. package/corpus/templates/tasks/app/root.tsx +5 -2
  235. package/corpus/toolkit/CHANGELOG.md +23 -0
  236. package/corpus/toolkit/agent-native.eject.json +71 -0
  237. package/corpus/toolkit/package.json +31 -1
  238. package/corpus/toolkit/src/chat-history/ChatHistoryRail.tsx +100 -39
  239. package/corpus/toolkit/src/chat-history/index.ts +9 -0
  240. package/corpus/toolkit/src/chat-history/useChatHistoryRailController.ts +76 -0
  241. package/corpus/toolkit/src/chat-history.css +2 -0
  242. package/corpus/toolkit/src/composer/ComposerPlusMenu.tsx +11 -8
  243. package/corpus/toolkit/src/composer/PromptComposer.tsx +32 -7
  244. package/corpus/toolkit/src/composer/RealtimeVoiceMode.tsx +119 -31
  245. package/corpus/toolkit/src/composer/useRealtimeVoiceMode.tsx +124 -9
  246. package/corpus/toolkit/src/conformance/__fixtures__/css-in-js-adapter.tsx +401 -0
  247. package/corpus/toolkit/src/conformance/index.ts +3 -0
  248. package/corpus/toolkit/src/conformance/runner.tsx +862 -0
  249. package/corpus/toolkit/src/conformance/types.ts +45 -0
  250. package/corpus/toolkit/src/conformance/version.ts +22 -0
  251. package/corpus/toolkit/src/design-system/components.tsx +146 -0
  252. package/corpus/toolkit/src/design-system/context.tsx +31 -0
  253. package/corpus/toolkit/src/design-system/default-adapter.tsx +915 -0
  254. package/corpus/toolkit/src/design-system/definition.ts +14 -0
  255. package/corpus/toolkit/src/design-system/error-boundary.tsx +37 -0
  256. package/corpus/toolkit/src/design-system/index.ts +7 -0
  257. package/corpus/toolkit/src/design-system/theme.ts +145 -0
  258. package/corpus/toolkit/src/design-system/types.ts +363 -0
  259. package/corpus/toolkit/src/editor/SharedRichEditor.tsx +13 -2
  260. package/corpus/toolkit/src/editor/SlashCommandMenu.tsx +20 -0
  261. package/corpus/toolkit/src/editor/index.ts +2 -0
  262. package/corpus/toolkit/src/provider.tsx +98 -5
  263. package/corpus/toolkit/src/styles.css +52 -23
  264. package/corpus/toolkit/src/ui/button.tsx +95 -6
  265. package/corpus/toolkit/src/ui/dialog.tsx +48 -23
  266. package/corpus/toolkit/src/ui/popover.tsx +16 -2
  267. package/corpus/toolkit/src/ui/select.tsx +7 -3
  268. package/corpus/toolkit/src/ui/sidebar.tsx +47 -48
  269. package/corpus/toolkit/src/ui/tooltip.tsx +7 -3
  270. package/dist/a2a/client.d.ts +3 -1
  271. package/dist/a2a/client.d.ts.map +1 -1
  272. package/dist/a2a/client.js +17 -12
  273. package/dist/a2a/client.js.map +1 -1
  274. package/dist/a2a/types.d.ts +1 -1
  275. package/dist/a2a/types.d.ts.map +1 -1
  276. package/dist/a2a/types.js.map +1 -1
  277. package/dist/agent/types.d.ts +1 -1
  278. package/dist/agent/types.d.ts.map +1 -1
  279. package/dist/agent/types.js.map +1 -1
  280. package/dist/cli/index.js +18 -8
  281. package/dist/cli/index.js.map +1 -1
  282. package/dist/cli/multi-frontier-runs.js +3 -3
  283. package/dist/cli/multi-frontier-runs.js.map +1 -1
  284. package/dist/cli/templates-meta.d.ts.map +1 -1
  285. package/dist/cli/templates-meta.js +0 -12
  286. package/dist/cli/templates-meta.js.map +1 -1
  287. package/dist/cli/workspace-dev.js +1 -1
  288. package/dist/cli/workspace-dev.js.map +1 -1
  289. package/dist/client/AgentPanel.d.ts.map +1 -1
  290. package/dist/client/AgentPanel.js +18 -15
  291. package/dist/client/AgentPanel.js.map +1 -1
  292. package/dist/client/AssistantChat.d.ts.map +1 -1
  293. package/dist/client/AssistantChat.js +26 -15
  294. package/dist/client/AssistantChat.js.map +1 -1
  295. package/dist/client/CommandMenu.d.ts.map +1 -1
  296. package/dist/client/CommandMenu.js +18 -106
  297. package/dist/client/CommandMenu.js.map +1 -1
  298. package/dist/client/RunStuckBanner.d.ts +3 -5
  299. package/dist/client/RunStuckBanner.d.ts.map +1 -1
  300. package/dist/client/RunStuckBanner.js +17 -18
  301. package/dist/client/RunStuckBanner.js.map +1 -1
  302. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  303. package/dist/client/agent-chat-adapter.js +2 -1
  304. package/dist/client/agent-chat-adapter.js.map +1 -1
  305. package/dist/client/app-providers.d.ts.map +1 -1
  306. package/dist/client/app-providers.js +1 -1
  307. package/dist/client/app-providers.js.map +1 -1
  308. package/dist/client/chat/action-chat-ui-surface.d.ts +8 -0
  309. package/dist/client/chat/action-chat-ui-surface.d.ts.map +1 -0
  310. package/dist/client/chat/action-chat-ui-surface.js +10 -0
  311. package/dist/client/chat/action-chat-ui-surface.js.map +1 -0
  312. package/dist/client/chat/message-components.d.ts +12 -1
  313. package/dist/client/chat/message-components.d.ts.map +1 -1
  314. package/dist/client/chat/message-components.js +102 -14
  315. package/dist/client/chat/message-components.js.map +1 -1
  316. package/dist/client/chat/tool-call-display.d.ts +3 -1
  317. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  318. package/dist/client/chat/tool-call-display.js +33 -14
  319. package/dist/client/chat/tool-call-display.js.map +1 -1
  320. package/dist/client/chat/widgets/InlineExtensionWidget.d.ts.map +1 -1
  321. package/dist/client/chat/widgets/InlineExtensionWidget.js +9 -12
  322. package/dist/client/chat/widgets/InlineExtensionWidget.js.map +1 -1
  323. package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
  324. package/dist/client/chat/widgets/builtin-tool-renderers.js +5 -3
  325. package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
  326. package/dist/client/components/ui/message-scroller.d.ts +1 -1
  327. package/dist/client/components/ui/message-scroller.d.ts.map +1 -1
  328. package/dist/client/components/ui/message-scroller.js +4 -3
  329. package/dist/client/components/ui/message-scroller.js.map +1 -1
  330. package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
  331. package/dist/client/conversation/AgentConversation.js +3 -2
  332. package/dist/client/conversation/AgentConversation.js.map +1 -1
  333. package/dist/client/error-capture.d.ts.map +1 -1
  334. package/dist/client/error-capture.js +2 -2
  335. package/dist/client/error-capture.js.map +1 -1
  336. package/dist/client/i18n.d.ts.map +1 -1
  337. package/dist/client/i18n.js +9 -0
  338. package/dist/client/i18n.js.map +1 -1
  339. package/dist/client/index.d.ts +2 -2
  340. package/dist/client/index.d.ts.map +1 -1
  341. package/dist/client/index.js +2 -2
  342. package/dist/client/index.js.map +1 -1
  343. package/dist/client/org/TeamPage.d.ts.map +1 -1
  344. package/dist/client/org/TeamPage.js +41 -33
  345. package/dist/client/org/TeamPage.js.map +1 -1
  346. package/dist/client/progress/RunsTray.d.ts.map +1 -1
  347. package/dist/client/progress/RunsTray.js +9 -10
  348. package/dist/client/progress/RunsTray.js.map +1 -1
  349. package/dist/client/resources/McpConnectionSuggestion.d.ts +1 -0
  350. package/dist/client/resources/McpConnectionSuggestion.d.ts.map +1 -1
  351. package/dist/client/resources/McpConnectionSuggestion.js +14 -12
  352. package/dist/client/resources/McpConnectionSuggestion.js.map +1 -1
  353. package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
  354. package/dist/client/resources/McpIntegrationDialog.js +10 -8
  355. package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
  356. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  357. package/dist/client/resources/ResourcesPanel.js +3 -1
  358. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  359. package/dist/client/resources/mcp-integration-catalog.d.ts +2 -0
  360. package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
  361. package/dist/client/resources/mcp-integration-catalog.js +17 -17
  362. package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
  363. package/dist/client/resources/mcp-integration-logos.js +2 -2
  364. package/dist/client/resources/mcp-integration-logos.js.map +1 -1
  365. package/dist/client/route-chunk-recovery.d.ts.map +1 -1
  366. package/dist/client/route-chunk-recovery.js +5 -3
  367. package/dist/client/route-chunk-recovery.js.map +1 -1
  368. package/dist/client/session-replay.js +3 -3
  369. package/dist/client/session-replay.js.map +1 -1
  370. package/dist/client/settings/DemoModeSection.d.ts.map +1 -1
  371. package/dist/client/settings/DemoModeSection.js +2 -5
  372. package/dist/client/settings/DemoModeSection.js.map +1 -1
  373. package/dist/client/settings/SecretsSection.d.ts.map +1 -1
  374. package/dist/client/settings/SecretsSection.js +18 -6
  375. package/dist/client/settings/SecretsSection.js.map +1 -1
  376. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  377. package/dist/client/settings/SettingsPanel.js +53 -118
  378. package/dist/client/settings/SettingsPanel.js.map +1 -1
  379. package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
  380. package/dist/client/settings/SettingsTabsPage.js +16 -1
  381. package/dist/client/settings/SettingsTabsPage.js.map +1 -1
  382. package/dist/client/settings/VoiceTranscriptionSection.d.ts.map +1 -1
  383. package/dist/client/settings/VoiceTranscriptionSection.js +2 -5
  384. package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
  385. package/dist/client/settings/index.d.ts +1 -0
  386. package/dist/client/settings/index.d.ts.map +1 -1
  387. package/dist/client/settings/index.js +1 -0
  388. package/dist/client/settings/index.js.map +1 -1
  389. package/dist/client/settings/useSettingsPanelController.d.ts +22 -0
  390. package/dist/client/settings/useSettingsPanelController.d.ts.map +1 -0
  391. package/dist/client/settings/useSettingsPanelController.js +103 -0
  392. package/dist/client/settings/useSettingsPanelController.js.map +1 -0
  393. package/dist/client/setup-connections/BuilderConnectCard.d.ts +14 -6
  394. package/dist/client/setup-connections/BuilderConnectCard.d.ts.map +1 -1
  395. package/dist/client/setup-connections/BuilderConnectCard.js +24 -16
  396. package/dist/client/setup-connections/BuilderConnectCard.js.map +1 -1
  397. package/dist/client/setup-connections/index.d.ts +2 -1
  398. package/dist/client/setup-connections/index.d.ts.map +1 -1
  399. package/dist/client/setup-connections/index.js +2 -1
  400. package/dist/client/setup-connections/index.js.map +1 -1
  401. package/dist/client/setup-connections/useBuilderConnectCardController.d.ts +34 -0
  402. package/dist/client/setup-connections/useBuilderConnectCardController.d.ts.map +1 -0
  403. package/dist/client/setup-connections/useBuilderConnectCardController.js +39 -0
  404. package/dist/client/setup-connections/useBuilderConnectCardController.js.map +1 -0
  405. package/dist/client/sharing/ShareButton.d.ts +2 -1
  406. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  407. package/dist/client/sharing/ShareButton.js +17 -463
  408. package/dist/client/sharing/ShareButton.js.map +1 -1
  409. package/dist/client/sharing/ShareDialog.d.ts +6 -6
  410. package/dist/client/sharing/ShareDialog.d.ts.map +1 -1
  411. package/dist/client/sharing/ShareDialog.js +69 -283
  412. package/dist/client/sharing/ShareDialog.js.map +1 -1
  413. package/dist/client/sharing/index.d.ts +3 -0
  414. package/dist/client/sharing/index.d.ts.map +1 -1
  415. package/dist/client/sharing/index.js +3 -0
  416. package/dist/client/sharing/index.js.map +1 -1
  417. package/dist/client/sharing/share-controller-helpers.d.ts +70 -0
  418. package/dist/client/sharing/share-controller-helpers.d.ts.map +1 -0
  419. package/dist/client/sharing/share-controller-helpers.js +224 -0
  420. package/dist/client/sharing/share-controller-helpers.js.map +1 -0
  421. package/dist/client/sharing/useShareButtonController.d.ts +91 -0
  422. package/dist/client/sharing/useShareButtonController.d.ts.map +1 -0
  423. package/dist/client/sharing/useShareButtonController.js +397 -0
  424. package/dist/client/sharing/useShareButtonController.js.map +1 -0
  425. package/dist/client/sharing/useShareDialogController.d.ts +109 -0
  426. package/dist/client/sharing/useShareDialogController.d.ts.map +1 -0
  427. package/dist/client/sharing/useShareDialogController.js +348 -0
  428. package/dist/client/sharing/useShareDialogController.js.map +1 -0
  429. package/dist/client/sse-event-processor.d.ts.map +1 -1
  430. package/dist/client/sse-event-processor.js +21 -0
  431. package/dist/client/sse-event-processor.js.map +1 -1
  432. package/dist/client/tool-display.d.ts +16 -0
  433. package/dist/client/tool-display.d.ts.map +1 -1
  434. package/dist/client/tool-display.js +52 -0
  435. package/dist/client/tool-display.js.map +1 -1
  436. package/dist/client/transcription/use-live-transcription.d.ts +3 -3
  437. package/dist/client/transcription/use-live-transcription.d.ts.map +1 -1
  438. package/dist/client/transcription/use-live-transcription.js +22 -11
  439. package/dist/client/transcription/use-live-transcription.js.map +1 -1
  440. package/dist/client/use-agent-engine-configured.d.ts +3 -2
  441. package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
  442. package/dist/client/use-agent-engine-configured.js +7 -19
  443. package/dist/client/use-agent-engine-configured.js.map +1 -1
  444. package/dist/client/use-chat-threads.d.ts.map +1 -1
  445. package/dist/client/use-chat-threads.js +21 -8
  446. package/dist/client/use-chat-threads.js.map +1 -1
  447. package/dist/collab/routes.d.ts +1 -1
  448. package/dist/collab/struct-routes.d.ts +1 -1
  449. package/dist/deploy/build.d.ts.map +1 -1
  450. package/dist/deploy/build.js +1 -1
  451. package/dist/deploy/build.js.map +1 -1
  452. package/dist/guards/db-tool-scoping.js +1 -1
  453. package/dist/guards/db-tool-scoping.js.map +1 -1
  454. package/dist/integrations/adapters/slack.d.ts +1 -0
  455. package/dist/integrations/adapters/slack.d.ts.map +1 -1
  456. package/dist/integrations/adapters/slack.js +61 -5
  457. package/dist/integrations/adapters/slack.js.map +1 -1
  458. package/dist/integrations/index.d.ts +1 -1
  459. package/dist/integrations/index.d.ts.map +1 -1
  460. package/dist/integrations/index.js +1 -1
  461. package/dist/integrations/index.js.map +1 -1
  462. package/dist/localization/default-messages.d.ts +4 -0
  463. package/dist/localization/default-messages.d.ts.map +1 -1
  464. package/dist/localization/default-messages.js +5 -1
  465. package/dist/localization/default-messages.js.map +1 -1
  466. package/dist/mcp-client/oauth-routes.d.ts +5 -0
  467. package/dist/mcp-client/oauth-routes.d.ts.map +1 -1
  468. package/dist/mcp-client/oauth-routes.js +53 -14
  469. package/dist/mcp-client/oauth-routes.js.map +1 -1
  470. package/dist/notifications/routes.d.ts +2 -2
  471. package/dist/observability/routes.d.ts +1 -1
  472. package/dist/provider-api/actions/custom-provider-registration.d.ts +12 -12
  473. package/dist/provider-api/actions/provider-api.d.ts +11 -11
  474. package/dist/scripts/call-agent.d.ts.map +1 -1
  475. package/dist/scripts/call-agent.js +5 -1
  476. package/dist/scripts/call-agent.js.map +1 -1
  477. package/dist/secrets/routes.d.ts +6 -6
  478. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  479. package/dist/server/realtime-voice.d.ts.map +1 -1
  480. package/dist/server/realtime-voice.js +2 -2
  481. package/dist/server/realtime-voice.js.map +1 -1
  482. package/dist/styles/agent-native.css +0 -24
  483. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  484. package/dist/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  485. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
  486. package/dist/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
  487. package/dist/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
  488. package/dist/templates/chat/app/design-system.ts +3 -0
  489. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  490. package/dist/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  491. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
  492. package/dist/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
  493. package/dist/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
  494. package/dist/templates/default/app/design-system.ts +3 -0
  495. package/dist/templates/default/app/root.tsx +5 -2
  496. package/dist/templates/default/package.json +1 -0
  497. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  498. package/dist/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  499. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  500. package/dist/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  501. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
  502. package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
  503. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +7 -5
  504. package/dist/terminal/cli-registry.js +1 -1
  505. package/dist/terminal/cli-registry.js.map +1 -1
  506. package/dist/vite/client.d.ts +11 -1
  507. package/dist/vite/client.d.ts.map +1 -1
  508. package/dist/vite/client.js +144 -2
  509. package/dist/vite/client.js.map +1 -1
  510. package/docs/content/custom-design-system.mdx +445 -0
  511. package/docs/content/toolkit-ui.mdx +16 -0
  512. package/package.json +2 -2
  513. package/src/a2a/client.ts +32 -10
  514. package/src/a2a/types.ts +1 -0
  515. package/src/agent/types.ts +1 -1
  516. package/src/cli/index.ts +18 -10
  517. package/src/cli/multi-frontier-runs.ts +5 -3
  518. package/src/cli/templates-meta.ts +0 -12
  519. package/src/cli/workspace-dev.ts +1 -1
  520. package/src/client/AgentPanel.tsx +99 -108
  521. package/src/client/AssistantChat.tsx +30 -13
  522. package/src/client/CommandMenu.tsx +68 -178
  523. package/src/client/RunStuckBanner.tsx +39 -47
  524. package/src/client/agent-chat-adapter.ts +3 -1
  525. package/src/client/app-providers.tsx +1 -1
  526. package/src/client/chat/action-chat-ui-surface.tsx +32 -0
  527. package/src/client/chat/message-components.tsx +169 -18
  528. package/src/client/chat/tool-call-display.tsx +50 -14
  529. package/src/client/chat/widgets/InlineExtensionWidget.tsx +13 -40
  530. package/src/client/chat/widgets/builtin-tool-renderers.tsx +7 -3
  531. package/src/client/components/ui/message-scroller.tsx +15 -1
  532. package/src/client/conversation/AgentConversation.tsx +12 -1
  533. package/src/client/error-capture.ts +2 -6
  534. package/src/client/i18n.tsx +22 -0
  535. package/src/client/index.ts +17 -0
  536. package/src/client/org/TeamPage.tsx +257 -153
  537. package/src/client/progress/RunsTray.tsx +89 -88
  538. package/src/client/resources/McpConnectionSuggestion.tsx +25 -16
  539. package/src/client/resources/McpIntegrationDialog.tsx +34 -13
  540. package/src/client/resources/ResourcesPanel.tsx +5 -1
  541. package/src/client/resources/mcp-integration-catalog.ts +20 -17
  542. package/src/client/resources/mcp-integration-logos.ts +2 -2
  543. package/src/client/route-chunk-recovery.ts +5 -3
  544. package/src/client/session-replay.ts +3 -3
  545. package/src/client/settings/DemoModeSection.tsx +6 -18
  546. package/src/client/settings/SecretsSection.tsx +97 -52
  547. package/src/client/settings/SettingsPanel.tsx +217 -252
  548. package/src/client/settings/SettingsTabsPage.tsx +23 -2
  549. package/src/client/settings/VoiceTranscriptionSection.tsx +7 -18
  550. package/src/client/settings/index.ts +7 -0
  551. package/src/client/settings/useSettingsPanelController.ts +155 -0
  552. package/src/client/setup-connections/BuilderConnectCard.tsx +116 -51
  553. package/src/client/setup-connections/index.ts +10 -0
  554. package/src/client/setup-connections/useBuilderConnectCardController.ts +82 -0
  555. package/src/client/sharing/ShareButton.tsx +64 -586
  556. package/src/client/sharing/ShareDialog.tsx +299 -633
  557. package/src/client/sharing/index.ts +42 -0
  558. package/src/client/sharing/share-controller-helpers.ts +318 -0
  559. package/src/client/sharing/useShareButtonController.ts +600 -0
  560. package/src/client/sharing/useShareDialogController.ts +559 -0
  561. package/src/client/sse-event-processor.ts +23 -0
  562. package/src/client/tool-display.ts +71 -0
  563. package/src/client/transcription/use-live-transcription.ts +64 -45
  564. package/src/client/use-agent-engine-configured.ts +12 -19
  565. package/src/client/use-chat-threads.ts +33 -12
  566. package/src/deploy/build.ts +2 -1
  567. package/src/guards/db-tool-scoping.ts +1 -1
  568. package/src/integrations/adapters/slack.ts +84 -5
  569. package/src/integrations/index.ts +5 -1
  570. package/src/localization/default-messages.ts +6 -1
  571. package/src/mcp-client/oauth-routes.ts +61 -14
  572. package/src/scripts/call-agent.ts +5 -1
  573. package/src/server/realtime-voice.ts +5 -2
  574. package/src/styles/agent-native.css +0 -24
  575. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  576. package/src/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  577. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +22 -2
  578. package/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +28 -4
  579. package/src/templates/chat/app/components/ui/toolkit-provider.tsx +6 -1
  580. package/src/templates/chat/app/design-system.ts +3 -0
  581. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  582. package/src/templates/default/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  583. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +22 -2
  584. package/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +28 -4
  585. package/src/templates/default/app/components/ui/toolkit-provider.tsx +10 -0
  586. package/src/templates/default/app/design-system.ts +3 -0
  587. package/src/templates/default/app/root.tsx +5 -2
  588. package/src/templates/default/package.json +1 -0
  589. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  590. package/src/templates/headless/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  591. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +37 -2
  592. package/src/templates/workspace-core/.agents/skills/customizing-agent-native/SKILL.md +86 -11
  593. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +22 -2
  594. package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +28 -4
  595. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +7 -5
  596. package/src/terminal/cli-registry.ts +1 -1
  597. package/src/vite/client.ts +205 -1
  598. package/corpus/templates/analytics/app/components/ui/calendar.tsx +0 -70
  599. package/corpus/templates/analytics/app/components/ui/chart.tsx +0 -386
  600. package/corpus/templates/calendar/app/components/ui/sonner.tsx +0 -58
  601. package/corpus/templates/crm/.agents/skills/agent-native-docs/SKILL.md +0 -115
  602. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +0 -142
  603. package/corpus/templates/crm/.agents/skills/crm/SKILL.md +0 -128
  604. package/corpus/templates/crm/.agents/skills/customizing-agent-native/SKILL.md +0 -145
  605. package/corpus/templates/crm/.agents/skills/feature-flags/SKILL.md +0 -169
  606. package/corpus/templates/crm/.agents/skills/upgrade-agent-native/SKILL.md +0 -100
  607. package/corpus/templates/crm/.env.example +0 -5
  608. package/corpus/templates/crm/AGENTS.md +0 -120
  609. package/corpus/templates/crm/CHANGELOG.md +0 -1
  610. package/corpus/templates/crm/DEVELOPING.md +0 -66
  611. package/corpus/templates/crm/README.md +0 -106
  612. package/corpus/templates/crm/_gitignore +0 -12
  613. package/corpus/templates/crm/actions/_crm-action-utils.ts +0 -87
  614. package/corpus/templates/crm/actions/_crm-dashboard.ts +0 -69
  615. package/corpus/templates/crm/actions/_crm-data-program-actions.ts +0 -15
  616. package/corpus/templates/crm/actions/_crm-signal-utils.ts +0 -79
  617. package/corpus/templates/crm/actions/apply-crm-proposals.ts +0 -203
  618. package/corpus/templates/crm/actions/attach-call-evidence.ts +0 -170
  619. package/corpus/templates/crm/actions/configure-crm-connection.ts +0 -126
  620. package/corpus/templates/crm/actions/configure-native-crm.ts +0 -44
  621. package/corpus/templates/crm/actions/create-crm-record.ts +0 -148
  622. package/corpus/templates/crm/actions/create-crm-signal-tracker.ts +0 -58
  623. package/corpus/templates/crm/actions/delete-staged-dataset.ts +0 -14
  624. package/corpus/templates/crm/actions/get-crm-automation-recipe.ts +0 -36
  625. package/corpus/templates/crm/actions/get-crm-dashboard-panel.ts +0 -35
  626. package/corpus/templates/crm/actions/get-crm-dashboard.ts +0 -14
  627. package/corpus/templates/crm/actions/get-crm-overview.ts +0 -13
  628. package/corpus/templates/crm/actions/get-crm-pipeline-data.ts +0 -61
  629. package/corpus/templates/crm/actions/get-crm-record.ts +0 -75
  630. package/corpus/templates/crm/actions/install-crm-pipeline-dashboard.ts +0 -81
  631. package/corpus/templates/crm/actions/list-crm-dashboard-revisions.ts +0 -15
  632. package/corpus/templates/crm/actions/list-crm-dashboards.ts +0 -15
  633. package/corpus/templates/crm/actions/list-crm-proposals.ts +0 -31
  634. package/corpus/templates/crm/actions/list-crm-records.ts +0 -79
  635. package/corpus/templates/crm/actions/list-crm-saved-views.ts +0 -15
  636. package/corpus/templates/crm/actions/list-crm-signal-hits.ts +0 -43
  637. package/corpus/templates/crm/actions/list-crm-signal-trackers.ts +0 -32
  638. package/corpus/templates/crm/actions/list-crm-tasks.ts +0 -22
  639. package/corpus/templates/crm/actions/list-staged-datasets.ts +0 -14
  640. package/corpus/templates/crm/actions/list-workspace-connections.ts +0 -47
  641. package/corpus/templates/crm/actions/manage-crm-signal-tracker.ts +0 -87
  642. package/corpus/templates/crm/actions/manage-crm-task.ts +0 -132
  643. package/corpus/templates/crm/actions/navigate.ts +0 -63
  644. package/corpus/templates/crm/actions/provider-api-catalog.ts +0 -22
  645. package/corpus/templates/crm/actions/provider-api-docs.ts +0 -54
  646. package/corpus/templates/crm/actions/provider-api-request.ts +0 -92
  647. package/corpus/templates/crm/actions/query-staged-dataset.ts +0 -44
  648. package/corpus/templates/crm/actions/record-crm-call-insight.ts +0 -160
  649. package/corpus/templates/crm/actions/record-crm-smart-signal.ts +0 -150
  650. package/corpus/templates/crm/actions/restore-crm-dashboard-revision.ts +0 -23
  651. package/corpus/templates/crm/actions/review-crm-signal.ts +0 -31
  652. package/corpus/templates/crm/actions/run-crm-saved-view-program.ts +0 -103
  653. package/corpus/templates/crm/actions/run-crm-signal-trackers.ts +0 -275
  654. package/corpus/templates/crm/actions/run.ts +0 -7
  655. package/corpus/templates/crm/actions/save-crm-dashboard.ts +0 -51
  656. package/corpus/templates/crm/actions/save-crm-saved-view.ts +0 -119
  657. package/corpus/templates/crm/actions/sync-crm.ts +0 -146
  658. package/corpus/templates/crm/actions/update-crm-record.ts +0 -510
  659. package/corpus/templates/crm/actions/view-screen.ts +0 -218
  660. package/corpus/templates/crm/agent-native.app-skill.json +0 -58
  661. package/corpus/templates/crm/app/components/crm/CreateCrmRecordDialog.tsx +0 -158
  662. package/corpus/templates/crm/app/components/crm/CrmDashboardPanel.tsx +0 -83
  663. package/corpus/templates/crm/app/components/crm/CrmSignalsPanel.tsx +0 -225
  664. package/corpus/templates/crm/app/components/crm/IntelligenceSettings.tsx +0 -413
  665. package/corpus/templates/crm/app/components/crm/RecordActions.tsx +0 -510
  666. package/corpus/templates/crm/app/components/crm/RecordGrid.tsx +0 -134
  667. package/corpus/templates/crm/app/components/crm/RecordWorkspace.tsx +0 -367
  668. package/corpus/templates/crm/app/components/crm/SavedViewDataProgram.tsx +0 -92
  669. package/corpus/templates/crm/app/components/crm/Surface.tsx +0 -96
  670. package/corpus/templates/crm/app/components/crm/WorkOverview.tsx +0 -180
  671. package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +0 -112
  672. package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +0 -84
  673. package/corpus/templates/crm/app/entry.client.tsx +0 -16
  674. package/corpus/templates/crm/app/entry.server.tsx +0 -10
  675. package/corpus/templates/crm/app/global.css +0 -167
  676. package/corpus/templates/crm/app/hooks/use-navigation-state.ts +0 -60
  677. package/corpus/templates/crm/app/i18n/en-US.ts +0 -89
  678. package/corpus/templates/crm/app/i18n/index.ts +0 -34
  679. package/corpus/templates/crm/app/lib/dashboard.ts +0 -13
  680. package/corpus/templates/crm/app/lib/navigation.ts +0 -54
  681. package/corpus/templates/crm/app/lib/tab-id.ts +0 -1
  682. package/corpus/templates/crm/app/lib/types.ts +0 -172
  683. package/corpus/templates/crm/app/lib/utils.ts +0 -1
  684. package/corpus/templates/crm/app/root.tsx +0 -88
  685. package/corpus/templates/crm/app/routes/_index.tsx +0 -26
  686. package/corpus/templates/crm/app/routes/accounts.tsx +0 -41
  687. package/corpus/templates/crm/app/routes/agent.tsx +0 -5
  688. package/corpus/templates/crm/app/routes/ask.tsx +0 -53
  689. package/corpus/templates/crm/app/routes/dashboard.tsx +0 -118
  690. package/corpus/templates/crm/app/routes/opportunities.tsx +0 -41
  691. package/corpus/templates/crm/app/routes/people.tsx +0 -41
  692. package/corpus/templates/crm/app/routes/proposals.tsx +0 -266
  693. package/corpus/templates/crm/app/routes/records.$recordId.tsx +0 -35
  694. package/corpus/templates/crm/app/routes/settings.tsx +0 -63
  695. package/corpus/templates/crm/app/routes/setup.tsx +0 -308
  696. package/corpus/templates/crm/app/routes/tasks.tsx +0 -252
  697. package/corpus/templates/crm/app/routes/views.tsx +0 -333
  698. package/corpus/templates/crm/app/routes.ts +0 -17
  699. package/corpus/templates/crm/app/vite-env.d.ts +0 -6
  700. package/corpus/templates/crm/changelog/2026-07-21-agent-native-crm.md +0 -6
  701. package/corpus/templates/crm/changelog/2026-07-21-clips-call-evidence-review-recipe.md +0 -6
  702. package/corpus/templates/crm/changelog/2026-07-21-crm-can-now-find-and-review-evidence-grounded-call-signals-w.md +0 -6
  703. package/corpus/templates/crm/changelog/2026-07-21-crm-can-now-manage-keyword-and-smart-call-signal-trackers-fr.md +0 -6
  704. package/corpus/templates/crm/changelog/2026-07-21-delegated-local-crm-automation.md +0 -6
  705. package/corpus/templates/crm/changelog/2026-07-21-native-sql.md +0 -6
  706. package/corpus/templates/crm/changelog/2026-07-21-pipeline-dashboard.md +0 -6
  707. package/corpus/templates/crm/changelog/2026-07-21-pipeline-dashboards-now-install-correctly-from-the-crm-actio.md +0 -6
  708. package/corpus/templates/crm/changelog/2026-07-21-salesforce-connection.md +0 -6
  709. package/corpus/templates/crm/changelog/2026-07-22-crm-field-validation-now-explains-which-fields-cannot-be-edi.md +0 -6
  710. package/corpus/templates/crm/changelog/2026-07-22-fixed-hubspot-contact-syncs-missing-records-updated-after-th.md +0 -6
  711. package/corpus/templates/crm/changelog/2026-07-22-fixed-pipeline-dashboard-panels-so-their-opportunity-data-lo.md +0 -6
  712. package/corpus/templates/crm/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +0 -6
  713. package/corpus/templates/crm/components.json +0 -20
  714. package/corpus/templates/crm/docs/architecture/crm-contract.md +0 -180
  715. package/corpus/templates/crm/learnings.defaults.md +0 -5
  716. package/corpus/templates/crm/package.json +0 -59
  717. package/corpus/templates/crm/public/favicon.svg +0 -1
  718. package/corpus/templates/crm/public/icon-180.svg +0 -1
  719. package/corpus/templates/crm/public/manifest.json +0 -11
  720. package/corpus/templates/crm/react-router.config.ts +0 -7
  721. package/corpus/templates/crm/server/crm/adapter.ts +0 -32
  722. package/corpus/templates/crm/server/crm/crm-field-firewall.ts +0 -64
  723. package/corpus/templates/crm/server/crm/crm-mirror.ts +0 -711
  724. package/corpus/templates/crm/server/crm/hubspot-adapter.ts +0 -1146
  725. package/corpus/templates/crm/server/crm/native-adapter.ts +0 -1715
  726. package/corpus/templates/crm/server/crm/read-through.ts +0 -207
  727. package/corpus/templates/crm/server/crm/salesforce-adapter.ts +0 -1255
  728. package/corpus/templates/crm/server/db/crm-store.ts +0 -1170
  729. package/corpus/templates/crm/server/db/index.ts +0 -169
  730. package/corpus/templates/crm/server/db/schema.ts +0 -441
  731. package/corpus/templates/crm/server/lib/intelligence/default-detectors.ts +0 -65
  732. package/corpus/templates/crm/server/lib/intelligence/evidence.ts +0 -105
  733. package/corpus/templates/crm/server/lib/intelligence/keyword-detector.ts +0 -100
  734. package/corpus/templates/crm/server/lib/intelligence/smart-detector.ts +0 -144
  735. package/corpus/templates/crm/server/lib/intelligence/summary.ts +0 -141
  736. package/corpus/templates/crm/server/lib/provider-api.ts +0 -64
  737. package/corpus/templates/crm/server/middleware/auth.ts +0 -4
  738. package/corpus/templates/crm/server/plugins/agent-chat.ts +0 -68
  739. package/corpus/templates/crm/server/plugins/auth.ts +0 -14
  740. package/corpus/templates/crm/server/plugins/core-routes.ts +0 -17
  741. package/corpus/templates/crm/server/plugins/db.ts +0 -454
  742. package/corpus/templates/crm/server/routes/[...page].get.ts +0 -5
  743. package/corpus/templates/crm/shared/crm-automation-recipes.ts +0 -132
  744. package/corpus/templates/crm/shared/crm-contract.ts +0 -254
  745. package/corpus/templates/crm/shared/crm-sales-config.ts +0 -63
  746. package/corpus/templates/crm/ssr-entry.ts +0 -11
  747. package/corpus/templates/crm/tsconfig.json +0 -24
  748. package/corpus/templates/crm/vite.config.ts +0 -15
  749. package/corpus/templates/crm/vitest.config.ts +0 -5
  750. package/corpus/templates/forms/app/components/ui/calendar.tsx +0 -214
  751. package/corpus/templates/forms/app/components/ui/chart.tsx +0 -379
  752. package/corpus/templates/forms/app/components/ui/command.tsx +0 -153
  753. package/corpus/templates/forms/app/components/ui/context-menu.tsx +0 -198
  754. package/corpus/templates/forms/app/components/ui/menubar.tsx +0 -254
  755. package/corpus/templates/macros/app/components/ui/menubar.tsx +0 -238
  756. package/corpus/templates/macros/app/components/ui/progress.tsx +0 -26
  757. package/corpus/templates/mail/app/components/ui/calendar.tsx +0 -211
  758. package/corpus/templates/mail/app/components/ui/chart.tsx +0 -379
  759. package/corpus/templates/mail/app/components/ui/command.tsx +0 -153
  760. package/corpus/templates/mail/app/components/ui/context-menu.tsx +0 -198
  761. package/corpus/templates/mail/app/components/ui/menubar.tsx +0 -254
  762. package/corpus/templates/tasks/app/components/ui/accordion.tsx +0 -56
  763. package/corpus/templates/tasks/app/components/ui/aspect-ratio.tsx +0 -5
  764. package/corpus/templates/tasks/app/components/ui/breadcrumb.tsx +0 -115
  765. package/corpus/templates/tasks/app/components/ui/calendar.tsx +0 -70
  766. package/corpus/templates/tasks/app/components/ui/carousel.tsx +0 -260
  767. package/corpus/templates/tasks/app/components/ui/chart.tsx +0 -379
  768. package/corpus/templates/tasks/app/components/ui/form.tsx +0 -177
  769. package/corpus/templates/tasks/app/components/ui/hover-card.tsx +0 -27
  770. package/corpus/templates/tasks/app/components/ui/input-otp.tsx +0 -69
  771. package/corpus/templates/tasks/app/components/ui/menubar.tsx +0 -254
  772. package/corpus/templates/tasks/app/components/ui/navigation-menu.tsx +0 -128
  773. package/corpus/templates/tasks/app/components/ui/pagination.tsx +0 -121
  774. package/corpus/templates/tasks/app/components/ui/resizable.tsx +0 -43
  775. package/corpus/templates/tasks/app/components/ui/sidebar.tsx +0 -782
  776. package/corpus/templates/tasks/app/components/ui/toggle.tsx +0 -43
@@ -1 +1 @@
1
- {"version":3,"file":"DemoModeSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/DemoModeSection.tsx"],"names":[],"mappings":"AAAA,8EAA8E;AAO9E,wBAAgB,eAAe,gCAoC9B;AAED,wBAAgB,YAAY,gCAE3B"}
1
+ {"version":3,"file":"DemoModeSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/DemoModeSection.tsx"],"names":[],"mappings":"AAAA,8EAA8E;AAQ9E,wBAAgB,eAAe,gCAuB9B;AAED,wBAAgB,YAAY,gCAE3B"}
@@ -1,15 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /** Browser-local presentation toggle. Backend and agent results stay real. */
3
+ import { Switch } from "@agent-native/toolkit/design-system";
3
4
  import { IconEyeOff } from "@tabler/icons-react";
4
5
  import { setBrowserDemoModeEnabled } from "../../demo/browser-state.js";
5
6
  import { useDemoModeStatus } from "../use-demo-mode-status.js";
6
7
  export function DemoModeSection() {
7
8
  const { enabled } = useDemoModeStatus();
8
- return (_jsxs("div", { className: "flex items-start justify-between gap-3 rounded-md border border-border bg-accent/30 px-2.5 py-2", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "text-[11px] font-medium text-foreground", children: "Enable demo mode" }), _jsx("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: "Anonymize displayed emails in this browser and reshape supported dashboard charts for presentations. Backend, MCP, and agent results stay real and access-scoped." })] }), _jsx("button", { type: "button", role: "switch", "aria-checked": enabled, "aria-label": "Enable demo mode", onClick: () => setBrowserDemoModeEnabled(!enabled),
9
- // Theme tokens; streaming agent owns layout.
10
- className: `relative inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full transition-colors ${enabled
11
- ? "bg-primary"
12
- : "bg-muted-foreground/30 hover:bg-muted-foreground/50"}`, children: _jsx("span", { className: `inline-block h-3 w-3 transform rounded-full bg-background transition-transform ${enabled ? "translate-x-3.5" : "translate-x-0.5"}` }) })] }));
9
+ return (_jsxs("div", { className: "flex items-start justify-between gap-3 rounded-md border border-border bg-accent/30 px-2.5 py-2", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "text-[11px] font-medium text-foreground", children: "Enable demo mode" }), _jsx("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: "Anonymize displayed emails in this browser and reshape supported dashboard charts for presentations. Backend, MCP, and agent results stay real and access-scoped." })] }), _jsx(Switch, { checked: enabled, onChange: (checked) => setBrowserDemoModeEnabled(checked), "aria-label": "Enable demo mode", className: "shrink-0" })] }));
13
10
  }
14
11
  export function DemoModeIcon() {
15
12
  return _jsx(IconEyeOff, { size: 14 });
@@ -1 +1 @@
1
- {"version":3,"file":"DemoModeSection.js","sourceRoot":"","sources":["../../../src/client/settings/DemoModeSection.tsx"],"names":[],"mappings":";AAAA,8EAA8E;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,UAAU,eAAe;IAC7B,MAAM,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAExC,OAAO,CACL,eAAK,SAAS,EAAC,iGAAiG,aAC9G,eAAK,SAAS,EAAC,SAAS,aACtB,cAAK,SAAS,EAAC,yCAAyC,iCAElD,EACN,YAAG,SAAS,EAAC,0CAA0C,kLAInD,IACA,EACN,iBACE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,kBACC,OAAO,gBACV,kBAAkB,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAAC;gBAClD,6CAA6C;gBAC7C,SAAS,EAAE,oGACT,OAAO;oBACL,CAAC,CAAC,YAAY;oBACd,CAAC,CAAC,qDACN,EAAE,YAEF,eACE,SAAS,EAAE,kFACT,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAChC,EAAE,GACF,GACK,IACL,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,KAAC,UAAU,IAAC,IAAI,EAAE,EAAE,GAAI,CAAC;AAClC,CAAC","sourcesContent":["/** Browser-local presentation toggle. Backend and agent results stay real. */\n\nimport { IconEyeOff } from \"@tabler/icons-react\";\n\nimport { setBrowserDemoModeEnabled } from \"../../demo/browser-state.js\";\nimport { useDemoModeStatus } from \"../use-demo-mode-status.js\";\n\nexport function DemoModeSection() {\n const { enabled } = useDemoModeStatus();\n\n return (\n <div className=\"flex items-start justify-between gap-3 rounded-md border border-border bg-accent/30 px-2.5 py-2\">\n <div className=\"min-w-0\">\n <div className=\"text-[11px] font-medium text-foreground\">\n Enable demo mode\n </div>\n <p className=\"text-[10px] text-muted-foreground mt-0.5\">\n Anonymize displayed emails in this browser and reshape supported\n dashboard charts for presentations. Backend, MCP, and agent results\n stay real and access-scoped.\n </p>\n </div>\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={enabled}\n aria-label=\"Enable demo mode\"\n onClick={() => setBrowserDemoModeEnabled(!enabled)}\n // Theme tokens; streaming agent owns layout.\n className={`relative inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full transition-colors ${\n enabled\n ? \"bg-primary\"\n : \"bg-muted-foreground/30 hover:bg-muted-foreground/50\"\n }`}\n >\n <span\n className={`inline-block h-3 w-3 transform rounded-full bg-background transition-transform ${\n enabled ? \"translate-x-3.5\" : \"translate-x-0.5\"\n }`}\n />\n </button>\n </div>\n );\n}\n\nexport function DemoModeIcon() {\n return <IconEyeOff size={14} />;\n}\n"]}
1
+ {"version":3,"file":"DemoModeSection.js","sourceRoot":"","sources":["../../../src/client/settings/DemoModeSection.tsx"],"names":[],"mappings":";AAAA,8EAA8E;AAE9E,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,UAAU,eAAe;IAC7B,MAAM,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAExC,OAAO,CACL,eAAK,SAAS,EAAC,iGAAiG,aAC9G,eAAK,SAAS,EAAC,SAAS,aACtB,cAAK,SAAS,EAAC,yCAAyC,iCAElD,EACN,YAAG,SAAS,EAAC,0CAA0C,kLAInD,IACA,EACN,KAAC,MAAM,IACL,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,yBAAyB,CAAC,OAAO,CAAC,gBAC9C,kBAAkB,EAC7B,SAAS,EAAC,UAAU,GACpB,IACE,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,KAAC,UAAU,IAAC,IAAI,EAAE,EAAE,GAAI,CAAC;AAClC,CAAC","sourcesContent":["/** Browser-local presentation toggle. Backend and agent results stay real. */\n\nimport { Switch } from \"@agent-native/toolkit/design-system\";\nimport { IconEyeOff } from \"@tabler/icons-react\";\n\nimport { setBrowserDemoModeEnabled } from \"../../demo/browser-state.js\";\nimport { useDemoModeStatus } from \"../use-demo-mode-status.js\";\n\nexport function DemoModeSection() {\n const { enabled } = useDemoModeStatus();\n\n return (\n <div className=\"flex items-start justify-between gap-3 rounded-md border border-border bg-accent/30 px-2.5 py-2\">\n <div className=\"min-w-0\">\n <div className=\"text-[11px] font-medium text-foreground\">\n Enable demo mode\n </div>\n <p className=\"text-[10px] text-muted-foreground mt-0.5\">\n Anonymize displayed emails in this browser and reshape supported\n dashboard charts for presentations. Backend, MCP, and agent results\n stay real and access-scoped.\n </p>\n </div>\n <Switch\n checked={enabled}\n onChange={(checked) => setBrowserDemoModeEnabled(checked)}\n aria-label=\"Enable demo mode\"\n className=\"shrink-0\"\n />\n </div>\n );\n}\n\nexport function DemoModeIcon() {\n return <IconEyeOff size={14} />;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SecretsSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SecretsSection.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,KAAoD,MAAM,OAAO,CAAC;AA4CzE,MAAM,WAAW,mBAAmB;IAClC,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,qBA8G/D"}
1
+ {"version":3,"file":"SecretsSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SecretsSection.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH,OAAO,KAAoD,MAAM,OAAO,CAAC;AA6DzE,MAAM,WAAW,mBAAmB;IAClC,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,qBA8G/D"}
@@ -4,11 +4,16 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
4
4
  * secrets registry. Configured keys stay compact; adding or editing one
5
5
  * progressively discloses its controls.
6
6
  */
7
+ import { Picker, TextField } from "@agent-native/toolkit/design-system";
8
+ import { Button as ToolkitButton } from "@agent-native/toolkit/ui/button";
7
9
  import { IconCheck, IconChevronRight, IconExternalLink, IconLoader2, IconPlugConnected, IconPlus, IconTrash, IconRefresh, } from "@tabler/icons-react";
8
10
  import React, { useEffect, useMemo, useState, useCallback } from "react";
9
11
  import { agentNativePath } from "../api-path.js";
10
12
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "../components/ui/dropdown-menu.js";
11
13
  import { Tooltip, TooltipContent, TooltipTrigger, } from "../components/ui/tooltip.js";
14
+ import { cn } from "../utils.js";
15
+ const Button = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToolkitButton, { ref: ref, variant: "ghost", className: cn("h-auto p-0 hover:bg-transparent hover:text-inherit active:scale-100 [&_svg]:!size-auto", className), ...props })));
16
+ Button.displayName = "SecretsPrimitiveButton";
12
17
  const ENDPOINT = agentNativePath("/_agent-native/secrets");
13
18
  function notifySecretsChanged() {
14
19
  if (typeof window === "undefined")
@@ -75,7 +80,7 @@ export function SecretsSection({ focusKey }) {
75
80
  }, focusInput: openSecretKey === secret.key }, secret.key))) })), _jsx(AdHocKeysSection, { showForm: customKeyOpen, onShowFormChange: setCustomKeyOpen, showEmptyState: visibleSecrets.length === 0 })] }));
76
81
  }
77
82
  function KeysHeader({ availableSecrets = [], onSecret, onCustomKey, }) {
78
- return (_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("p", { className: "text-[11px] font-medium text-foreground", children: "Keys" }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: "inline-flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground", children: [_jsx(IconPlus, { size: 11 }), "New"] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-60", children: [availableSecrets.length > 0 && (_jsxs(_Fragment, { children: [_jsx(DropdownMenuLabel, { children: "Choose a key" }), availableSecrets.map((secret) => (_jsxs(DropdownMenuItem, { onSelect: () => onSecret?.(secret.key), className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "truncate", children: secret.label }), secret.required && (_jsx("span", { className: "text-[9px] font-semibold uppercase tracking-wide text-amber-600 dark:text-amber-400", children: "Required" }))] }, secret.key))), _jsx(DropdownMenuSeparator, {})] })), _jsxs(DropdownMenuItem, { onSelect: onCustomKey, children: [_jsx(IconPlus, { size: 14 }), "Custom"] })] })] })] }));
83
+ return (_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("p", { className: "text-[11px] font-medium text-foreground", children: "Keys" }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { type: "button", intent: "neutral", emphasis: "outline", className: "inline-flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground", children: [_jsx(IconPlus, { size: 11 }), "New"] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-60", children: [availableSecrets.length > 0 && (_jsxs(_Fragment, { children: [_jsx(DropdownMenuLabel, { children: "Choose a key" }), availableSecrets.map((secret) => (_jsxs(DropdownMenuItem, { onSelect: () => onSecret?.(secret.key), className: "flex items-center justify-between gap-3", children: [_jsx("span", { className: "truncate", children: secret.label }), secret.required && (_jsx("span", { className: "text-[9px] font-semibold uppercase tracking-wide text-amber-600 dark:text-amber-400", children: "Required" }))] }, secret.key))), _jsx(DropdownMenuSeparator, {})] })), _jsxs(DropdownMenuItem, { onSelect: onCustomKey, children: [_jsx(IconPlus, { size: 14 }), "Custom"] })] })] })] }));
79
84
  }
80
85
  function SecretCard({ secret, onChanged, open, onOpenChange, focusInput, }) {
81
86
  const [value, setValue] = useState("");
@@ -176,12 +181,12 @@ function SecretCard({ secret, onChanged, open, onOpenChange, focusInput, }) {
176
181
  return (_jsx("span", { className: "rounded-full bg-accent/60 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-muted-foreground", children: "Optional" }));
177
182
  }, [secret.status, secret.required]);
178
183
  const isOAuth = secret.kind === "oauth";
179
- return (_jsxs("div", { className: "border-b border-border last:border-b-0", children: [_jsxs("button", { type: "button", "aria-expanded": open, onClick: () => onOpenChange(!open), className: "flex w-full items-center gap-2 px-2.5 py-2 text-start transition-colors hover:bg-accent/30", children: [_jsx(IconChevronRight, { size: 13, className: `shrink-0 text-muted-foreground transition-transform ${open ? "rotate-90" : ""}` }), _jsx("span", { className: "min-w-0 flex-1 truncate text-[11px] font-medium text-foreground", children: secret.label }), secret.status === "set" && secret.last4 && (_jsxs("code", { className: "text-[10px] text-muted-foreground", children: ["\u2022\u2022\u2022\u2022", secret.last4] })), _jsx("span", { className: "shrink-0", children: pill })] }), open && (_jsxs("div", { className: "border-t border-border/60 bg-accent/20 px-3 pb-3 pt-2.5", children: [secret.description && (_jsx("p", { className: "mb-2 text-[10px] leading-relaxed text-muted-foreground", children: secret.description })), isOAuth ? (_jsxs("div", { className: "mt-2 flex items-center gap-1.5", children: [secret.oauthConnectUrl && (_jsxs("a", { href: secret.oauthConnectUrl, className: "inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium no-underline", style: { backgroundColor: "#00B5FF", color: "white" }, children: [_jsx(IconPlugConnected, { size: 10 }), secret.status === "set" ? "Reconnect" : "Connect"] })), secret.docsUrl && (_jsxs("a", { href: secret.docsUrl, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] no-underline text-muted-foreground hover:text-foreground", children: ["Docs", _jsx(IconExternalLink, { size: 10 })] }))] })) : (_jsxs("div", { className: "mt-2 space-y-1.5", children: [secret.status === "set" && (_jsxs("div", { className: "flex items-center gap-2 text-[10px] text-muted-foreground", children: [_jsx("span", { children: "Stored value ending in" }), _jsx("code", { className: "rounded bg-background px-1 py-0.5 text-foreground", children: secret.last4 })] })), _jsxs("div", { className: "flex gap-1.5", children: [_jsx("input", { ref: inputRef, type: "password", "aria-label": secret.label, value: value, onChange: (e) => setValue(e.target.value), onKeyDown: (e) => {
180
- if (e.key === "Enter")
184
+ return (_jsxs("div", { className: "border-b border-border last:border-b-0", children: [_jsxs(Button, { type: "button", intent: "neutral", emphasis: "ghost", "aria-expanded": open, onClick: () => onOpenChange(!open), className: "flex w-full items-center gap-2 px-2.5 py-2 text-start transition-colors hover:bg-accent/30", children: [_jsx(IconChevronRight, { size: 13, className: `shrink-0 text-muted-foreground transition-transform ${open ? "rotate-90" : ""}` }), _jsx("span", { className: "min-w-0 flex-1 truncate text-[11px] font-medium text-foreground", children: secret.label }), secret.status === "set" && secret.last4 && (_jsxs("code", { className: "text-[10px] text-muted-foreground", children: ["\u2022\u2022\u2022\u2022", secret.last4] })), _jsx("span", { className: "shrink-0", children: pill })] }), open && (_jsxs("div", { className: "border-t border-border/60 bg-accent/20 px-3 pb-3 pt-2.5", children: [secret.description && (_jsx("p", { className: "mb-2 text-[10px] leading-relaxed text-muted-foreground", children: secret.description })), isOAuth ? (_jsxs("div", { className: "mt-2 flex items-center gap-1.5", children: [secret.oauthConnectUrl && (_jsxs("a", { href: secret.oauthConnectUrl, className: "inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium no-underline", style: { backgroundColor: "#00B5FF", color: "white" }, children: [_jsx(IconPlugConnected, { size: 10 }), secret.status === "set" ? "Reconnect" : "Connect"] })), secret.docsUrl && (_jsxs("a", { href: secret.docsUrl, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] no-underline text-muted-foreground hover:text-foreground", children: ["Docs", _jsx(IconExternalLink, { size: 10 })] }))] })) : (_jsxs("div", { className: "mt-2 space-y-1.5", children: [secret.status === "set" && (_jsxs("div", { className: "flex items-center gap-2 text-[10px] text-muted-foreground", children: [_jsx("span", { children: "Stored value ending in" }), _jsx("code", { className: "rounded bg-background px-1 py-0.5 text-foreground", children: secret.last4 })] })), _jsxs("div", { className: "flex gap-1.5", children: [_jsx(TextField, { inputRef: inputRef, type: "password", "aria-label": secret.label, value: value, onChange: setValue, onKeyDown: (event) => {
185
+ if (event.key === "Enter")
181
186
  handleSave();
182
187
  }, placeholder: secret.status === "set"
183
188
  ? "Enter new value to rotate"
184
- : "Paste key", className: "flex-1 rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent" }), _jsx("button", { type: "button", onClick: handleSave, disabled: !value.trim() || busy !== null, className: "inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium disabled:opacity-40", style: { backgroundColor: "#00B5FF", color: "white" }, children: busy === "save" ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : secret.status === "set" ? (_jsxs(_Fragment, { children: [_jsx(IconRefresh, { size: 10 }), "Rotate"] })) : ("Save") })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [secret.status === "set" && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: handleTest, disabled: busy !== null, className: "inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-muted-foreground hover:text-foreground disabled:opacity-40", children: busy === "test" ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : ("Test") }), _jsxs("button", { type: "button", onClick: () => setConfirmDelete(true), disabled: busy !== null, className: "inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-muted-foreground hover:text-red-500 disabled:opacity-40", children: [_jsx(IconTrash, { size: 10 }), "Remove"] })] })), secret.docsUrl && (_jsxs("a", { href: secret.docsUrl, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] no-underline text-muted-foreground hover:text-foreground ms-auto", children: ["Get key", _jsx(IconExternalLink, { size: 10 })] }))] }), confirmDelete && (_jsxs("div", { className: "flex items-center gap-1.5 rounded border border-red-500/30 bg-red-500/10 px-2 py-1.5 text-[10px] text-red-500", children: [_jsx("span", { className: "min-w-0 flex-1", children: "Remove this saved value?" }), _jsx("button", { type: "button", onClick: handleDelete, disabled: busy !== null, className: "inline-flex items-center gap-1 rounded border border-red-500/40 px-1.5 py-0.5 font-medium disabled:opacity-40", children: busy === "delete" ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : ("Confirm") }), _jsx("button", { type: "button", onClick: () => setConfirmDelete(false), disabled: busy !== null, className: "rounded border border-border px-1.5 py-0.5 text-muted-foreground hover:text-foreground disabled:opacity-40", children: "Cancel" })] }))] })), toast && (_jsx("p", { className: `mt-1.5 text-[10px] ${toast.kind === "ok" ? "text-green-500" : "text-red-500"}`, children: toast.text }))] }))] }));
189
+ : "Paste key", className: "flex-1 text-[11px]" }), _jsx(Button, { type: "button", intent: "primary", emphasis: "solid", onClick: handleSave, disabled: !value.trim() || busy !== null, className: "inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium disabled:opacity-40", style: { backgroundColor: "#00B5FF", color: "white" }, children: busy === "save" ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : secret.status === "set" ? (_jsxs(_Fragment, { children: [_jsx(IconRefresh, { size: 10 }), "Rotate"] })) : ("Save") })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [secret.status === "set" && (_jsxs(_Fragment, { children: [_jsx(Button, { type: "button", intent: "neutral", emphasis: "outline", onClick: handleTest, disabled: busy !== null, className: "inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-muted-foreground hover:text-foreground disabled:opacity-40", children: busy === "test" ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : ("Test") }), _jsxs(Button, { type: "button", intent: "danger", emphasis: "outline", onClick: () => setConfirmDelete(true), disabled: busy !== null, className: "inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-muted-foreground hover:text-red-500 disabled:opacity-40", children: [_jsx(IconTrash, { size: 10 }), "Remove"] })] })), secret.docsUrl && (_jsxs("a", { href: secret.docsUrl, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] no-underline text-muted-foreground hover:text-foreground ms-auto", children: ["Get key", _jsx(IconExternalLink, { size: 10 })] }))] }), confirmDelete && (_jsxs("div", { className: "flex items-center gap-1.5 rounded border border-red-500/30 bg-red-500/10 px-2 py-1.5 text-[10px] text-red-500", children: [_jsx("span", { className: "min-w-0 flex-1", children: "Remove this saved value?" }), _jsx(Button, { type: "button", intent: "danger", emphasis: "solid", onClick: handleDelete, disabled: busy !== null, className: "inline-flex items-center gap-1 rounded border border-red-500/40 px-1.5 py-0.5 font-medium disabled:opacity-40", children: busy === "delete" ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : ("Confirm") }), _jsx(Button, { type: "button", intent: "neutral", emphasis: "outline", onClick: () => setConfirmDelete(false), disabled: busy !== null, className: "rounded border border-border px-1.5 py-0.5 text-muted-foreground hover:text-foreground disabled:opacity-40", children: "Cancel" })] }))] })), toast && (_jsx("p", { className: `mt-1.5 text-[10px] ${toast.kind === "ok" ? "text-green-500" : "text-red-500"}`, children: toast.text }))] }))] }));
185
190
  }
186
191
  const ADHOC_ENDPOINT = agentNativePath("/_agent-native/secrets/adhoc");
187
192
  function AdHocKeysSection({ showForm, onShowFormChange, showEmptyState, }) {
@@ -302,8 +307,15 @@ function AdHocKeysSection({ showForm, onShowFormChange, showEmptyState, }) {
302
307
  setDeletingName(null);
303
308
  }
304
309
  }, [showToast, reload]);
305
- return (_jsxs("div", { className: "space-y-2", children: [showForm && (_jsxs("div", { className: "rounded-md border border-border px-2.5 py-2 bg-accent/30 space-y-1.5", children: [_jsx("input", { value: formName, onChange: (e) => setFormName(e.target.value.toUpperCase().replace(/[^A-Z0-9_-]/g, "")), className: "w-full rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent", "aria-label": "Key name", placeholder: "KEY_NAME" }), _jsx("input", { type: "password", "aria-label": "Secret value", value: formValue, onChange: (e) => setFormValue(e.target.value), className: "w-full rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent", placeholder: "Secret value" }), _jsx("input", { value: formDescription, "aria-label": "Description", onChange: (e) => setFormDescription(e.target.value), className: "w-full rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent", placeholder: "Description (optional)" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("select", { "aria-label": "Scope", value: formScope, onChange: (e) => setFormScope(e.target.value), className: "rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none focus:ring-1 focus:ring-accent", children: [_jsx("option", { value: "user", children: "Personal" }), _jsx("option", { value: "workspace", children: "Workspace" })] }), _jsxs("div", { className: "ms-auto flex items-center gap-1.5", children: [_jsx("button", { type: "button", onClick: resetForm, className: "rounded border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:text-foreground", children: "Cancel" }), _jsx("button", { type: "button", onClick: handleAdd, disabled: !formName.trim() || !formValue.trim() || formBusy, className: "inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium disabled:opacity-40", style: { backgroundColor: "#00B5FF", color: "white" }, children: formBusy ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : ("Save") })] })] }), formError && _jsx("p", { className: "text-[10px] text-red-500", children: formError })] })), loading ? (_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-muted-foreground", children: [_jsx(IconLoader2, { size: 10, className: "animate-spin" }), "Loading..."] })) : keys.length === 0 && !showForm && showEmptyState ? (_jsx("p", { className: "text-[10px] text-muted-foreground", children: "No keys added yet." })) : keys.length > 0 ? (_jsx("div", { className: "overflow-hidden rounded-md border border-border", children: keys.map((key) => (_jsx("div", { className: "border-b border-border px-2.5 py-2 last:border-b-0", children: _jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-[11px] font-medium text-foreground font-mono truncate", children: key.name }), _jsx("span", { className: `rounded-full px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide ${key.scope === "workspace"
310
+ return (_jsxs("div", { className: "space-y-2", children: [showForm && (_jsxs("div", { className: "rounded-md border border-border px-2.5 py-2 bg-accent/30 space-y-1.5", children: [_jsx(TextField, { value: formName, onChange: (value) => setFormName(value.toUpperCase().replace(/[^A-Z0-9_-]/g, "")), className: "w-full text-[11px]", "aria-label": "Key name", placeholder: "KEY_NAME" }), _jsx(TextField, { type: "password", "aria-label": "Secret value", value: formValue, onChange: setFormValue, className: "w-full text-[11px]", placeholder: "Secret value" }), _jsx(TextField, { value: formDescription, "aria-label": "Description", onChange: setFormDescription, className: "w-full text-[11px]", placeholder: "Description (optional)" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Picker, { mode: "select", options: [
311
+ { value: "user", label: "Personal" },
312
+ { value: "workspace", label: "Workspace" },
313
+ ], value: formScope, onChange: (value) => {
314
+ if (value === "user" || value === "workspace") {
315
+ setFormScope(value);
316
+ }
317
+ }, "aria-label": "Scope", className: "w-auto text-[11px]" }), _jsxs("div", { className: "ms-auto flex items-center gap-1.5", children: [_jsx(Button, { type: "button", intent: "neutral", emphasis: "outline", onClick: resetForm, className: "rounded border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:text-foreground", children: "Cancel" }), _jsx(Button, { type: "button", intent: "primary", emphasis: "solid", onClick: handleAdd, disabled: !formName.trim() || !formValue.trim() || formBusy, className: "inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium disabled:opacity-40", style: { backgroundColor: "#00B5FF", color: "white" }, children: formBusy ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : ("Save") })] })] }), formError && _jsx("p", { className: "text-[10px] text-red-500", children: formError })] })), loading ? (_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-muted-foreground", children: [_jsx(IconLoader2, { size: 10, className: "animate-spin" }), "Loading..."] })) : keys.length === 0 && !showForm && showEmptyState ? (_jsx("p", { className: "text-[10px] text-muted-foreground", children: "No keys added yet." })) : keys.length > 0 ? (_jsx("div", { className: "overflow-hidden rounded-md border border-border", children: keys.map((key) => (_jsx("div", { className: "border-b border-border px-2.5 py-2 last:border-b-0", children: _jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-[11px] font-medium text-foreground font-mono truncate", children: key.name }), _jsx("span", { className: `rounded-full px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide ${key.scope === "workspace"
306
318
  ? "bg-blue-500/15 text-blue-500"
307
- : "bg-accent/60 text-muted-foreground"}`, children: key.scope === "workspace" ? "workspace" : "personal" })] }), key.description && (_jsx("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: key.description })), _jsx("div", { className: "flex items-center gap-2 text-[10px] text-muted-foreground mt-0.5", children: _jsxs("span", { children: ["Ending in", " ", _jsx("code", { className: "rounded bg-background px-1 py-0.5 text-foreground", children: key.last4 })] }) })] }), _jsx("div", { className: "shrink-0", children: confirmDeleteName === key.name ? (_jsxs("div", { className: "flex items-center gap-1", children: [_jsx("button", { type: "button", onClick: () => handleDelete(key.name), disabled: deletingName === key.name, className: "rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide bg-red-500/15 text-red-500 hover:bg-red-500/25 disabled:opacity-40", children: deletingName === key.name ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : ("Confirm") }), _jsx("button", { type: "button", onClick: () => setConfirmDeleteName(null), className: "rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide bg-accent/60 text-muted-foreground hover:text-foreground", children: "Cancel" })] })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => setConfirmDeleteName(key.name), className: "text-muted-foreground hover:text-red-500", children: _jsx(IconTrash, { size: 12 }) }) }), _jsx(TooltipContent, { children: "Delete" })] })) })] }) }, `${key.scope}-${key.name}`))) })) : null, toast && (_jsx("p", { className: `text-[10px] ${toast.kind === "ok" ? "text-green-500" : "text-red-500"}`, children: toast.text }))] }));
319
+ : "bg-accent/60 text-muted-foreground"}`, children: key.scope === "workspace" ? "workspace" : "personal" })] }), key.description && (_jsx("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: key.description })), _jsx("div", { className: "flex items-center gap-2 text-[10px] text-muted-foreground mt-0.5", children: _jsxs("span", { children: ["Ending in", " ", _jsx("code", { className: "rounded bg-background px-1 py-0.5 text-foreground", children: key.last4 })] }) })] }), _jsx("div", { className: "shrink-0", children: confirmDeleteName === key.name ? (_jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Button, { type: "button", intent: "danger", emphasis: "solid", onClick: () => handleDelete(key.name), disabled: deletingName === key.name, className: "rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide bg-red-500/15 text-red-500 hover:bg-red-500/25 disabled:opacity-40", children: deletingName === key.name ? (_jsx(IconLoader2, { size: 10, className: "animate-spin" })) : ("Confirm") }), _jsx(Button, { type: "button", intent: "neutral", emphasis: "solid", onClick: () => setConfirmDeleteName(null), className: "rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide bg-accent/60 text-muted-foreground hover:text-foreground", children: "Cancel" })] })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { type: "button", intent: "danger", emphasis: "ghost", onClick: () => setConfirmDeleteName(key.name), className: "text-muted-foreground hover:text-red-500", children: _jsx(IconTrash, { size: 12 }) }) }), _jsx(TooltipContent, { children: "Delete" })] })) })] }) }, `${key.scope}-${key.name}`))) })) : null, toast && (_jsx("p", { className: `text-[10px] ${toast.kind === "ok" ? "text-green-500" : "text-red-500"}`, children: toast.text }))] }));
308
320
  }
309
321
  //# sourceMappingURL=SecretsSection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SecretsSection.js","sourceRoot":"","sources":["../../../src/client/settings/SecretsSection.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AAkBrC,MAAM,QAAQ,GAAG,eAAe,CAAC,wBAAwB,CAAC,CAAC;AAE3D,SAAS,oBAAoB;IAC3B,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IAC1C,MAAM,CAAC,aAAa,CAClB,IAAI,WAAW,CAAC,iCAAiC,EAAE;QACjD,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9B,CAAC,CACH,CAAC;AACJ,CAAC;AAOD,MAAM,UAAU,cAAc,CAAC,EAAE,QAAQ,EAAuB;IAC9D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QA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zC,SAAS,EAAC,iIAAiI,uBAGpI,IACL,CACP,CAAC,CAAC,CAAC,CACF,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,EAC7C,SAAS,EAAC,0CAA0C,YAEpD,KAAC,SAAS,IAAC,IAAI,EAAE,EAAE,GAAI,GAChB,GACM,EACjB,KAAC,cAAc,yBAAwB,IAC/B,CACX,GACG,IACF,IAvED,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,IAAI,EAAE,CAwE3B,CACP,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,EAEP,KAAK,IAAI,CACR,YACE,SAAS,EAAE,eAAe,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,cAAc,EAAE,YAElF,KAAK,CAAC,IAAI,GACT,CACL,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * <SecretsSection /> — renders the registered secrets from the framework\n * secrets registry. Configured keys stay compact; adding or editing one\n * progressively discloses its controls.\n */\n\nimport {\n IconCheck,\n IconChevronRight,\n IconExternalLink,\n IconLoader2,\n IconPlugConnected,\n IconPlus,\n IconTrash,\n IconRefresh,\n} from \"@tabler/icons-react\";\nimport React, { useEffect, useMemo, useState, useCallback } from \"react\";\n\nimport { agentNativePath } from \"../api-path.js\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../components/ui/dropdown-menu.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\n\ninterface SecretStatus {\n key: string;\n label: string;\n description?: string;\n docsUrl?: string;\n scope: \"user\" | \"workspace\";\n kind: \"api-key\" | \"oauth\";\n required: boolean;\n status: \"set\" | \"unset\" | \"invalid\";\n last4?: string;\n updatedAt?: number;\n oauthProvider?: string;\n oauthConnectUrl?: string;\n error?: string;\n}\n\nconst ENDPOINT = agentNativePath(\"/_agent-native/secrets\");\n\nfunction notifySecretsChanged() {\n if (typeof window === \"undefined\") return;\n window.dispatchEvent(\n new CustomEvent(\"agent-engine:configured-changed\", {\n detail: { source: \"secrets\" },\n }),\n );\n}\n\nexport interface SecretsSectionProps {\n /** Optional hash fragment to focus a specific secret (e.g. \"secrets:OPENAI_API_KEY\"). */\n focusKey?: string;\n}\n\nexport function SecretsSection({ focusKey }: SecretsSectionProps) {\n const [secrets, setSecrets] = useState<SecretStatus[] | null>(null);\n const [error, setError] = useState<string | null>(null);\n const [reloadToken, setReloadToken] = useState(0);\n const [openSecretKey, setOpenSecretKey] = useState<string | null>(\n focusKey ?? null,\n );\n const [customKeyOpen, setCustomKeyOpen] = useState(false);\n\n useEffect(() => {\n let cancelled = false;\n fetch(ENDPOINT)\n .then(async (r) => {\n if (!r.ok) {\n throw new Error(`Failed to load secrets (${r.status})`);\n }\n return (await r.json()) as SecretStatus[];\n })\n .then((data) => {\n if (!cancelled) setSecrets(data);\n })\n .catch((err) => {\n if (!cancelled) setError(err?.message ?? \"Failed to load\");\n });\n return () => {\n cancelled = true;\n };\n }, [reloadToken]);\n\n const reload = useCallback(() => setReloadToken((t) => t + 1), []);\n\n useEffect(() => {\n if (focusKey) {\n setCustomKeyOpen(false);\n setOpenSecretKey(focusKey);\n }\n }, [focusKey]);\n\n if (error) {\n return (\n <p className=\"text-[10px] text-red-500\">\n Failed to load secrets: {error}\n </p>\n );\n }\n if (secrets === null) {\n return (\n <div className=\"flex items-center gap-1.5 text-[10px] text-muted-foreground\">\n <IconLoader2 size={10} className=\"animate-spin\" />\n Loading…\n </div>\n );\n }\n if (secrets.length === 0) {\n return (\n <div className=\"space-y-3\">\n <KeysHeader onCustomKey={() => setCustomKeyOpen(true)} />\n <AdHocKeysSection\n showForm={customKeyOpen}\n onShowFormChange={setCustomKeyOpen}\n showEmptyState\n />\n </div>\n );\n }\n\n const visibleSecrets = secrets.filter(\n (secret) => secret.status !== \"unset\" || secret.key === openSecretKey,\n );\n const availableSecrets = secrets.filter(\n (secret) => secret.status === \"unset\" && secret.key !== openSecretKey,\n );\n\n return (\n <div className=\"space-y-3\">\n <KeysHeader\n availableSecrets={availableSecrets}\n onSecret={(key) => {\n setCustomKeyOpen(false);\n setOpenSecretKey(key);\n }}\n onCustomKey={() => {\n setOpenSecretKey(null);\n setCustomKeyOpen(true);\n }}\n />\n {visibleSecrets.length > 0 && (\n <div className=\"overflow-hidden rounded-md border border-border\">\n {visibleSecrets.map((secret) => (\n <SecretCard\n key={secret.key}\n secret={secret}\n onChanged={reload}\n open={openSecretKey === secret.key}\n onOpenChange={(open) => {\n if (open) setCustomKeyOpen(false);\n setOpenSecretKey(open ? secret.key : null);\n }}\n focusInput={openSecretKey === secret.key}\n />\n ))}\n </div>\n )}\n <AdHocKeysSection\n showForm={customKeyOpen}\n onShowFormChange={setCustomKeyOpen}\n showEmptyState={visibleSecrets.length === 0}\n />\n </div>\n );\n}\n\nfunction KeysHeader({\n availableSecrets = [],\n onSecret,\n onCustomKey,\n}: {\n availableSecrets?: SecretStatus[];\n onSecret?: (key: string) => void;\n onCustomKey: () => void;\n}) {\n return (\n <div className=\"flex items-center justify-between gap-3\">\n <p className=\"text-[11px] font-medium text-foreground\">Keys</p>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <button\n type=\"button\"\n className=\"inline-flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground\"\n >\n <IconPlus size={11} />\n New\n </button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-60\">\n {availableSecrets.length > 0 && (\n <>\n <DropdownMenuLabel>Choose a key</DropdownMenuLabel>\n {availableSecrets.map((secret) => (\n <DropdownMenuItem\n key={secret.key}\n onSelect={() => onSecret?.(secret.key)}\n className=\"flex items-center justify-between gap-3\"\n >\n <span className=\"truncate\">{secret.label}</span>\n {secret.required && (\n <span className=\"text-[9px] font-semibold uppercase tracking-wide text-amber-600 dark:text-amber-400\">\n Required\n </span>\n )}\n </DropdownMenuItem>\n ))}\n <DropdownMenuSeparator />\n </>\n )}\n <DropdownMenuItem onSelect={onCustomKey}>\n <IconPlus size={14} />\n Custom\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\ninterface SecretCardProps {\n secret: SecretStatus;\n onChanged: () => void;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n focusInput?: boolean;\n}\n\nfunction SecretCard({\n secret,\n onChanged,\n open,\n onOpenChange,\n focusInput,\n}: SecretCardProps) {\n const [value, setValue] = useState(\"\");\n const [busy, setBusy] = useState<null | \"save\" | \"delete\" | \"test\">(null);\n const [confirmDelete, setConfirmDelete] = useState(false);\n const [toast, setToast] = useState<{\n kind: \"ok\" | \"err\";\n text: string;\n } | null>(null);\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (open && focusInput && inputRef.current) {\n inputRef.current.focus();\n }\n }, [focusInput, open]);\n\n const setToastAndClear = (kind: \"ok\" | \"err\", text: string, ms = 2500) => {\n setToast({ kind, text });\n setTimeout(() => setToast(null), ms);\n };\n\n const handleSave = async () => {\n if (!value.trim() || busy) return;\n setBusy(\"save\");\n try {\n const res = await fetch(`${ENDPOINT}/${encodeURIComponent(secret.key)}`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ value: value.trim() }),\n });\n if (!res.ok) {\n const err = await res\n .json()\n .then((j: { error?: string }) => j.error)\n .catch(() => null);\n setToastAndClear(\"err\", err ?? `Save failed (${res.status})`);\n return;\n }\n setValue(\"\");\n setConfirmDelete(false);\n setToastAndClear(\"ok\", \"Saved\");\n notifySecretsChanged();\n onChanged();\n } finally {\n setBusy(null);\n }\n };\n\n const handleDelete = async () => {\n if (busy) return;\n setBusy(\"delete\");\n try {\n const res = await fetch(`${ENDPOINT}/${encodeURIComponent(secret.key)}`, {\n method: \"DELETE\",\n headers: { \"Content-Type\": \"application/json\" },\n });\n if (!res.ok) {\n const err = await res\n .json()\n .then((j: { error?: string }) => j.error)\n .catch(() => null);\n setToastAndClear(\"err\", err ?? `Delete failed (${res.status})`);\n return;\n }\n setToastAndClear(\"ok\", \"Removed\");\n setConfirmDelete(false);\n notifySecretsChanged();\n onChanged();\n } finally {\n setBusy(null);\n }\n };\n\n const handleTest = async () => {\n if (busy) return;\n setBusy(\"test\");\n try {\n const res = await fetch(\n `${ENDPOINT}/${encodeURIComponent(secret.key)}/test`,\n {\n method: \"POST\",\n },\n );\n const body = (await res.json().catch(() => ({}))) as {\n ok?: boolean;\n error?: string;\n };\n if (res.ok && body.ok) {\n setToastAndClear(\"ok\", \"Working\");\n } else {\n setToastAndClear(\n \"err\",\n body.error ?? (body.ok === false ? \"Invalid\" : `Test failed`),\n );\n }\n } finally {\n setBusy(null);\n }\n };\n\n const pill = useMemo(() => {\n if (secret.status === \"set\") {\n return (\n <span className=\"flex items-center gap-1 text-[10px] text-green-500\">\n <IconCheck size={10} />\n Set\n </span>\n );\n }\n if (secret.required) {\n return (\n <span className=\"rounded-full bg-red-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-red-500\">\n Required\n </span>\n );\n }\n return (\n <span className=\"rounded-full bg-accent/60 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-muted-foreground\">\n Optional\n </span>\n );\n }, [secret.status, secret.required]);\n\n const isOAuth = secret.kind === \"oauth\";\n\n return (\n <div className=\"border-b border-border last:border-b-0\">\n <button\n type=\"button\"\n aria-expanded={open}\n onClick={() => onOpenChange(!open)}\n className=\"flex w-full items-center gap-2 px-2.5 py-2 text-start transition-colors hover:bg-accent/30\"\n >\n <IconChevronRight\n size={13}\n className={`shrink-0 text-muted-foreground transition-transform ${open ? \"rotate-90\" : \"\"}`}\n />\n <span className=\"min-w-0 flex-1 truncate text-[11px] font-medium text-foreground\">\n {secret.label}\n </span>\n {secret.status === \"set\" && secret.last4 && (\n <code className=\"text-[10px] text-muted-foreground\">\n ••••{secret.last4}\n </code>\n )}\n <span className=\"shrink-0\">{pill}</span>\n </button>\n\n {open && (\n <div className=\"border-t border-border/60 bg-accent/20 px-3 pb-3 pt-2.5\">\n {secret.description && (\n <p className=\"mb-2 text-[10px] leading-relaxed text-muted-foreground\">\n {secret.description}\n </p>\n )}\n {isOAuth ? (\n <div className=\"mt-2 flex items-center gap-1.5\">\n {secret.oauthConnectUrl && (\n <a\n href={secret.oauthConnectUrl}\n className=\"inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium no-underline\"\n style={{ backgroundColor: \"#00B5FF\", color: \"white\" }}\n >\n <IconPlugConnected size={10} />\n {secret.status === \"set\" ? \"Reconnect\" : \"Connect\"}\n </a>\n )}\n {secret.docsUrl && (\n <a\n href={secret.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] no-underline text-muted-foreground hover:text-foreground\"\n >\n Docs\n <IconExternalLink size={10} />\n </a>\n )}\n </div>\n ) : (\n <div className=\"mt-2 space-y-1.5\">\n {secret.status === \"set\" && (\n <div className=\"flex items-center gap-2 text-[10px] text-muted-foreground\">\n <span>Stored value ending in</span>\n <code className=\"rounded bg-background px-1 py-0.5 text-foreground\">\n {secret.last4}\n </code>\n </div>\n )}\n <div className=\"flex gap-1.5\">\n <input\n ref={inputRef}\n type=\"password\"\n aria-label={secret.label}\n value={value}\n onChange={(e) => setValue(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") handleSave();\n }}\n placeholder={\n secret.status === \"set\"\n ? \"Enter new value to rotate\"\n : \"Paste key\"\n }\n className=\"flex-1 rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent\"\n />\n <button\n type=\"button\"\n onClick={handleSave}\n disabled={!value.trim() || busy !== null}\n className=\"inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium disabled:opacity-40\"\n style={{ backgroundColor: \"#00B5FF\", color: \"white\" }}\n >\n {busy === \"save\" ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : secret.status === \"set\" ? (\n <>\n <IconRefresh size={10} />\n Rotate\n </>\n ) : (\n \"Save\"\n )}\n </button>\n </div>\n <div className=\"flex items-center gap-1.5\">\n {secret.status === \"set\" && (\n <>\n <button\n type=\"button\"\n onClick={handleTest}\n disabled={busy !== null}\n className=\"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-muted-foreground hover:text-foreground disabled:opacity-40\"\n >\n {busy === \"test\" ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : (\n \"Test\"\n )}\n </button>\n <button\n type=\"button\"\n onClick={() => setConfirmDelete(true)}\n disabled={busy !== null}\n className=\"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-muted-foreground hover:text-red-500 disabled:opacity-40\"\n >\n <IconTrash size={10} />\n Remove\n </button>\n </>\n )}\n {secret.docsUrl && (\n <a\n href={secret.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] no-underline text-muted-foreground hover:text-foreground ms-auto\"\n >\n Get key\n <IconExternalLink size={10} />\n </a>\n )}\n </div>\n {confirmDelete && (\n <div className=\"flex items-center gap-1.5 rounded border border-red-500/30 bg-red-500/10 px-2 py-1.5 text-[10px] text-red-500\">\n <span className=\"min-w-0 flex-1\">\n Remove this saved value?\n </span>\n <button\n type=\"button\"\n onClick={handleDelete}\n disabled={busy !== null}\n className=\"inline-flex items-center gap-1 rounded border border-red-500/40 px-1.5 py-0.5 font-medium disabled:opacity-40\"\n >\n {busy === \"delete\" ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : (\n \"Confirm\"\n )}\n </button>\n <button\n type=\"button\"\n onClick={() => setConfirmDelete(false)}\n disabled={busy !== null}\n className=\"rounded border border-border px-1.5 py-0.5 text-muted-foreground hover:text-foreground disabled:opacity-40\"\n >\n Cancel\n </button>\n </div>\n )}\n </div>\n )}\n\n {toast && (\n <p\n className={`mt-1.5 text-[10px] ${\n toast.kind === \"ok\" ? \"text-green-500\" : \"text-red-500\"\n }`}\n >\n {toast.text}\n </p>\n )}\n </div>\n )}\n </div>\n );\n}\n\n// ─── Ad-hoc Keys Section ──────────────────────────────────────────────────\n\ninterface AdHocKey {\n name: string;\n scope: \"user\" | \"workspace\";\n scopeId: string;\n description: string | null;\n last4: string;\n createdAt: number;\n updatedAt: number;\n}\n\nconst ADHOC_ENDPOINT = agentNativePath(\"/_agent-native/secrets/adhoc\");\n\nfunction AdHocKeysSection({\n showForm,\n onShowFormChange,\n showEmptyState,\n}: {\n showForm: boolean;\n onShowFormChange: (show: boolean) => void;\n showEmptyState: boolean;\n}) {\n const [keys, setKeys] = useState<AdHocKey[]>([]);\n const [loading, setLoading] = useState(true);\n const [reloadToken, setReloadToken] = useState(0);\n const [formName, setFormName] = useState(\"\");\n const [formValue, setFormValue] = useState(\"\");\n const [formDescription, setFormDescription] = useState(\"\");\n const [formScope, setFormScope] = useState<\"user\" | \"workspace\">(\"user\");\n const [formBusy, setFormBusy] = useState(false);\n const [formError, setFormError] = useState<string | null>(null);\n const [confirmDeleteName, setConfirmDeleteName] = useState<string | null>(\n null,\n );\n const [deletingName, setDeletingName] = useState<string | null>(null);\n const [toast, setToast] = useState<{\n kind: \"ok\" | \"err\";\n text: string;\n } | null>(null);\n\n const showToast = useCallback(\n (kind: \"ok\" | \"err\", text: string, ms = 2500) => {\n setToast({ kind, text });\n setTimeout(() => setToast(null), ms);\n },\n [],\n );\n\n const reload = useCallback(() => setReloadToken((t) => t + 1), []);\n\n useEffect(() => {\n let cancelled = false;\n setLoading(true);\n fetch(ADHOC_ENDPOINT)\n .then(async (r) => {\n if (!r.ok) throw new Error(`Failed to load (${r.status})`);\n return (await r.json()) as AdHocKey[];\n })\n .then((data) => {\n if (!cancelled) {\n setKeys(data);\n setLoading(false);\n }\n })\n .catch(() => {\n if (!cancelled) {\n setKeys([]);\n setLoading(false);\n }\n });\n return () => {\n cancelled = true;\n };\n }, [reloadToken]);\n\n const resetForm = useCallback(() => {\n onShowFormChange(false);\n setFormName(\"\");\n setFormValue(\"\");\n setFormDescription(\"\");\n setFormScope(\"user\");\n setFormError(null);\n }, [onShowFormChange]);\n\n const handleAdd = useCallback(async () => {\n const name = formName.trim();\n const value = formValue.trim();\n if (!name || !value || formBusy) return;\n setFormBusy(true);\n setFormError(null);\n try {\n const res = await fetch(ADHOC_ENDPOINT, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n name,\n value,\n description: formDescription.trim() || undefined,\n scope: formScope,\n }),\n });\n if (!res.ok) {\n const body = await res\n .json()\n .then((j: { error?: string }) => j.error)\n .catch(() => null);\n setFormError(body ?? `Save failed (${res.status})`);\n return;\n }\n resetForm();\n showToast(\"ok\", \"Key saved\");\n notifySecretsChanged();\n reload();\n } catch (err: any) {\n setFormError(err?.message ?? \"Failed to save\");\n } finally {\n setFormBusy(false);\n }\n }, [\n formName,\n formValue,\n formDescription,\n formScope,\n formBusy,\n resetForm,\n showToast,\n reload,\n ]);\n\n const handleDelete = useCallback(\n async (name: string) => {\n setDeletingName(name);\n try {\n const res = await fetch(\n `${ADHOC_ENDPOINT}/${encodeURIComponent(name)}`,\n {\n method: \"DELETE\",\n headers: { \"Content-Type\": \"application/json\" },\n },\n );\n if (!res.ok) {\n showToast(\"err\", \"Failed to delete key\");\n return;\n }\n showToast(\"ok\", \"Key deleted\");\n setConfirmDeleteName(null);\n notifySecretsChanged();\n reload();\n } finally {\n setDeletingName(null);\n }\n },\n [showToast, reload],\n );\n\n return (\n <div className=\"space-y-2\">\n {showForm && (\n <div className=\"rounded-md border border-border px-2.5 py-2 bg-accent/30 space-y-1.5\">\n <input\n value={formName}\n onChange={(e) =>\n setFormName(\n e.target.value.toUpperCase().replace(/[^A-Z0-9_-]/g, \"\"),\n )\n }\n className=\"w-full rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent\"\n aria-label=\"Key name\"\n placeholder=\"KEY_NAME\"\n />\n <input\n type=\"password\"\n aria-label=\"Secret value\"\n value={formValue}\n onChange={(e) => setFormValue(e.target.value)}\n className=\"w-full rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent\"\n placeholder=\"Secret value\"\n />\n <input\n value={formDescription}\n aria-label=\"Description\"\n onChange={(e) => setFormDescription(e.target.value)}\n className=\"w-full rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent\"\n placeholder=\"Description (optional)\"\n />\n <div className=\"flex items-center gap-2\">\n <select\n aria-label=\"Scope\"\n value={formScope}\n onChange={(e) =>\n setFormScope(e.target.value as \"user\" | \"workspace\")\n }\n className=\"rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none focus:ring-1 focus:ring-accent\"\n >\n <option value=\"user\">Personal</option>\n <option value=\"workspace\">Workspace</option>\n </select>\n <div className=\"ms-auto flex items-center gap-1.5\">\n <button\n type=\"button\"\n onClick={resetForm}\n className=\"rounded border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:text-foreground\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={handleAdd}\n disabled={!formName.trim() || !formValue.trim() || formBusy}\n className=\"inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium disabled:opacity-40\"\n style={{ backgroundColor: \"#00B5FF\", color: \"white\" }}\n >\n {formBusy ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : (\n \"Save\"\n )}\n </button>\n </div>\n </div>\n {formError && <p className=\"text-[10px] text-red-500\">{formError}</p>}\n </div>\n )}\n\n {loading ? (\n <div className=\"flex items-center gap-1.5 text-[10px] text-muted-foreground\">\n <IconLoader2 size={10} className=\"animate-spin\" />\n Loading...\n </div>\n ) : keys.length === 0 && !showForm && showEmptyState ? (\n <p className=\"text-[10px] text-muted-foreground\">No keys added yet.</p>\n ) : keys.length > 0 ? (\n <div className=\"overflow-hidden rounded-md border border-border\">\n {keys.map((key) => (\n <div\n key={`${key.scope}-${key.name}`}\n className=\"border-b border-border px-2.5 py-2 last:border-b-0\"\n >\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-1.5\">\n <span className=\"text-[11px] font-medium text-foreground font-mono truncate\">\n {key.name}\n </span>\n <span\n className={`rounded-full px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide ${\n key.scope === \"workspace\"\n ? \"bg-blue-500/15 text-blue-500\"\n : \"bg-accent/60 text-muted-foreground\"\n }`}\n >\n {key.scope === \"workspace\" ? \"workspace\" : \"personal\"}\n </span>\n </div>\n {key.description && (\n <p className=\"text-[10px] text-muted-foreground mt-0.5\">\n {key.description}\n </p>\n )}\n <div className=\"flex items-center gap-2 text-[10px] text-muted-foreground mt-0.5\">\n <span>\n Ending in{\" \"}\n <code className=\"rounded bg-background px-1 py-0.5 text-foreground\">\n {key.last4}\n </code>\n </span>\n </div>\n </div>\n <div className=\"shrink-0\">\n {confirmDeleteName === key.name ? (\n <div className=\"flex items-center gap-1\">\n <button\n type=\"button\"\n onClick={() => handleDelete(key.name)}\n disabled={deletingName === key.name}\n className=\"rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide bg-red-500/15 text-red-500 hover:bg-red-500/25 disabled:opacity-40\"\n >\n {deletingName === key.name ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : (\n \"Confirm\"\n )}\n </button>\n <button\n type=\"button\"\n onClick={() => setConfirmDeleteName(null)}\n className=\"rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide bg-accent/60 text-muted-foreground hover:text-foreground\"\n >\n Cancel\n </button>\n </div>\n ) : (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={() => setConfirmDeleteName(key.name)}\n className=\"text-muted-foreground hover:text-red-500\"\n >\n <IconTrash size={12} />\n </button>\n </TooltipTrigger>\n <TooltipContent>Delete</TooltipContent>\n </Tooltip>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n ) : null}\n\n {toast && (\n <p\n className={`text-[10px] ${toast.kind === \"ok\" ? \"text-green-500\" : \"text-red-500\"}`}\n >\n {toast.text}\n </p>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"SecretsSection.js","sourceRoot":"","sources":["../../../src/client/settings/SecretsSection.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,MAAM,MAAM,GAAG,KAAK,CAAC,U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,EAAC,OAAO,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,EACzC,SAAS,EAAC,iIAAiI,uBAGpI,IACL,CACP,CAAC,CAAC,CAAC,CACF,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,MAAM,EAAC,QAAQ,EACf,QAAQ,EAAC,OAAO,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,EAC7C,SAAS,EAAC,0CAA0C,YAEpD,KAAC,SAAS,IAAC,IAAI,EAAE,EAAE,GAAI,GAChB,GACM,EACjB,KAAC,cAAc,yBAAwB,IAC/B,CACX,GACG,IACF,IA7ED,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,IAAI,EAAE,CA8E3B,CACP,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,EAEP,KAAK,IAAI,CACR,YACE,SAAS,EAAE,eAAe,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,cAAc,EAAE,YAElF,KAAK,CAAC,IAAI,GACT,CACL,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * <SecretsSection /> — renders the registered secrets from the framework\n * secrets registry. Configured keys stay compact; adding or editing one\n * progressively discloses its controls.\n */\n\nimport { Picker, TextField } from \"@agent-native/toolkit/design-system\";\nimport { Button as ToolkitButton } from \"@agent-native/toolkit/ui/button\";\nimport {\n IconCheck,\n IconChevronRight,\n IconExternalLink,\n IconLoader2,\n IconPlugConnected,\n IconPlus,\n IconTrash,\n IconRefresh,\n} from \"@tabler/icons-react\";\nimport React, { useEffect, useMemo, useState, useCallback } from \"react\";\n\nimport { agentNativePath } from \"../api-path.js\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../components/ui/dropdown-menu.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { cn } from \"../utils.js\";\n\nconst Button = React.forwardRef<\n HTMLButtonElement,\n React.ComponentPropsWithoutRef<typeof ToolkitButton>\n>(({ className, ...props }, ref) => (\n <ToolkitButton\n ref={ref}\n variant=\"ghost\"\n className={cn(\n \"h-auto p-0 hover:bg-transparent hover:text-inherit active:scale-100 [&_svg]:!size-auto\",\n className,\n )}\n {...props}\n />\n));\nButton.displayName = \"SecretsPrimitiveButton\";\n\ninterface SecretStatus {\n key: string;\n label: string;\n description?: string;\n docsUrl?: string;\n scope: \"user\" | \"workspace\";\n kind: \"api-key\" | \"oauth\";\n required: boolean;\n status: \"set\" | \"unset\" | \"invalid\";\n last4?: string;\n updatedAt?: number;\n oauthProvider?: string;\n oauthConnectUrl?: string;\n error?: string;\n}\n\nconst ENDPOINT = agentNativePath(\"/_agent-native/secrets\");\n\nfunction notifySecretsChanged() {\n if (typeof window === \"undefined\") return;\n window.dispatchEvent(\n new CustomEvent(\"agent-engine:configured-changed\", {\n detail: { source: \"secrets\" },\n }),\n );\n}\n\nexport interface SecretsSectionProps {\n /** Optional hash fragment to focus a specific secret (e.g. \"secrets:OPENAI_API_KEY\"). */\n focusKey?: string;\n}\n\nexport function SecretsSection({ focusKey }: SecretsSectionProps) {\n const [secrets, setSecrets] = useState<SecretStatus[] | null>(null);\n const [error, setError] = useState<string | null>(null);\n const [reloadToken, setReloadToken] = useState(0);\n const [openSecretKey, setOpenSecretKey] = useState<string | null>(\n focusKey ?? null,\n );\n const [customKeyOpen, setCustomKeyOpen] = useState(false);\n\n useEffect(() => {\n let cancelled = false;\n fetch(ENDPOINT)\n .then(async (r) => {\n if (!r.ok) {\n throw new Error(`Failed to load secrets (${r.status})`);\n }\n return (await r.json()) as SecretStatus[];\n })\n .then((data) => {\n if (!cancelled) setSecrets(data);\n })\n .catch((err) => {\n if (!cancelled) setError(err?.message ?? \"Failed to load\");\n });\n return () => {\n cancelled = true;\n };\n }, [reloadToken]);\n\n const reload = useCallback(() => setReloadToken((t) => t + 1), []);\n\n useEffect(() => {\n if (focusKey) {\n setCustomKeyOpen(false);\n setOpenSecretKey(focusKey);\n }\n }, [focusKey]);\n\n if (error) {\n return (\n <p className=\"text-[10px] text-red-500\">\n Failed to load secrets: {error}\n </p>\n );\n }\n if (secrets === null) {\n return (\n <div className=\"flex items-center gap-1.5 text-[10px] text-muted-foreground\">\n <IconLoader2 size={10} className=\"animate-spin\" />\n Loading…\n </div>\n );\n }\n if (secrets.length === 0) {\n return (\n <div className=\"space-y-3\">\n <KeysHeader onCustomKey={() => setCustomKeyOpen(true)} />\n <AdHocKeysSection\n showForm={customKeyOpen}\n onShowFormChange={setCustomKeyOpen}\n showEmptyState\n />\n </div>\n );\n }\n\n const visibleSecrets = secrets.filter(\n (secret) => secret.status !== \"unset\" || secret.key === openSecretKey,\n );\n const availableSecrets = secrets.filter(\n (secret) => secret.status === \"unset\" && secret.key !== openSecretKey,\n );\n\n return (\n <div className=\"space-y-3\">\n <KeysHeader\n availableSecrets={availableSecrets}\n onSecret={(key) => {\n setCustomKeyOpen(false);\n setOpenSecretKey(key);\n }}\n onCustomKey={() => {\n setOpenSecretKey(null);\n setCustomKeyOpen(true);\n }}\n />\n {visibleSecrets.length > 0 && (\n <div className=\"overflow-hidden rounded-md border border-border\">\n {visibleSecrets.map((secret) => (\n <SecretCard\n key={secret.key}\n secret={secret}\n onChanged={reload}\n open={openSecretKey === secret.key}\n onOpenChange={(open) => {\n if (open) setCustomKeyOpen(false);\n setOpenSecretKey(open ? secret.key : null);\n }}\n focusInput={openSecretKey === secret.key}\n />\n ))}\n </div>\n )}\n <AdHocKeysSection\n showForm={customKeyOpen}\n onShowFormChange={setCustomKeyOpen}\n showEmptyState={visibleSecrets.length === 0}\n />\n </div>\n );\n}\n\nfunction KeysHeader({\n availableSecrets = [],\n onSecret,\n onCustomKey,\n}: {\n availableSecrets?: SecretStatus[];\n onSecret?: (key: string) => void;\n onCustomKey: () => void;\n}) {\n return (\n <div className=\"flex items-center justify-between gap-3\">\n <p className=\"text-[11px] font-medium text-foreground\">Keys</p>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n type=\"button\"\n intent=\"neutral\"\n emphasis=\"outline\"\n className=\"inline-flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground\"\n >\n <IconPlus size={11} />\n New\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-60\">\n {availableSecrets.length > 0 && (\n <>\n <DropdownMenuLabel>Choose a key</DropdownMenuLabel>\n {availableSecrets.map((secret) => (\n <DropdownMenuItem\n key={secret.key}\n onSelect={() => onSecret?.(secret.key)}\n className=\"flex items-center justify-between gap-3\"\n >\n <span className=\"truncate\">{secret.label}</span>\n {secret.required && (\n <span className=\"text-[9px] font-semibold uppercase tracking-wide text-amber-600 dark:text-amber-400\">\n Required\n </span>\n )}\n </DropdownMenuItem>\n ))}\n <DropdownMenuSeparator />\n </>\n )}\n <DropdownMenuItem onSelect={onCustomKey}>\n <IconPlus size={14} />\n Custom\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\ninterface SecretCardProps {\n secret: SecretStatus;\n onChanged: () => void;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n focusInput?: boolean;\n}\n\nfunction SecretCard({\n secret,\n onChanged,\n open,\n onOpenChange,\n focusInput,\n}: SecretCardProps) {\n const [value, setValue] = useState(\"\");\n const [busy, setBusy] = useState<null | \"save\" | \"delete\" | \"test\">(null);\n const [confirmDelete, setConfirmDelete] = useState(false);\n const [toast, setToast] = useState<{\n kind: \"ok\" | \"err\";\n text: string;\n } | null>(null);\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (open && focusInput && inputRef.current) {\n inputRef.current.focus();\n }\n }, [focusInput, open]);\n\n const setToastAndClear = (kind: \"ok\" | \"err\", text: string, ms = 2500) => {\n setToast({ kind, text });\n setTimeout(() => setToast(null), ms);\n };\n\n const handleSave = async () => {\n if (!value.trim() || busy) return;\n setBusy(\"save\");\n try {\n const res = await fetch(`${ENDPOINT}/${encodeURIComponent(secret.key)}`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ value: value.trim() }),\n });\n if (!res.ok) {\n const err = await res\n .json()\n .then((j: { error?: string }) => j.error)\n .catch(() => null);\n setToastAndClear(\"err\", err ?? `Save failed (${res.status})`);\n return;\n }\n setValue(\"\");\n setConfirmDelete(false);\n setToastAndClear(\"ok\", \"Saved\");\n notifySecretsChanged();\n onChanged();\n } finally {\n setBusy(null);\n }\n };\n\n const handleDelete = async () => {\n if (busy) return;\n setBusy(\"delete\");\n try {\n const res = await fetch(`${ENDPOINT}/${encodeURIComponent(secret.key)}`, {\n method: \"DELETE\",\n headers: { \"Content-Type\": \"application/json\" },\n });\n if (!res.ok) {\n const err = await res\n .json()\n .then((j: { error?: string }) => j.error)\n .catch(() => null);\n setToastAndClear(\"err\", err ?? `Delete failed (${res.status})`);\n return;\n }\n setToastAndClear(\"ok\", \"Removed\");\n setConfirmDelete(false);\n notifySecretsChanged();\n onChanged();\n } finally {\n setBusy(null);\n }\n };\n\n const handleTest = async () => {\n if (busy) return;\n setBusy(\"test\");\n try {\n const res = await fetch(\n `${ENDPOINT}/${encodeURIComponent(secret.key)}/test`,\n {\n method: \"POST\",\n },\n );\n const body = (await res.json().catch(() => ({}))) as {\n ok?: boolean;\n error?: string;\n };\n if (res.ok && body.ok) {\n setToastAndClear(\"ok\", \"Working\");\n } else {\n setToastAndClear(\n \"err\",\n body.error ?? (body.ok === false ? \"Invalid\" : `Test failed`),\n );\n }\n } finally {\n setBusy(null);\n }\n };\n\n const pill = useMemo(() => {\n if (secret.status === \"set\") {\n return (\n <span className=\"flex items-center gap-1 text-[10px] text-green-500\">\n <IconCheck size={10} />\n Set\n </span>\n );\n }\n if (secret.required) {\n return (\n <span className=\"rounded-full bg-red-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-red-500\">\n Required\n </span>\n );\n }\n return (\n <span className=\"rounded-full bg-accent/60 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-muted-foreground\">\n Optional\n </span>\n );\n }, [secret.status, secret.required]);\n\n const isOAuth = secret.kind === \"oauth\";\n\n return (\n <div className=\"border-b border-border last:border-b-0\">\n <Button\n type=\"button\"\n intent=\"neutral\"\n emphasis=\"ghost\"\n aria-expanded={open}\n onClick={() => onOpenChange(!open)}\n className=\"flex w-full items-center gap-2 px-2.5 py-2 text-start transition-colors hover:bg-accent/30\"\n >\n <IconChevronRight\n size={13}\n className={`shrink-0 text-muted-foreground transition-transform ${open ? \"rotate-90\" : \"\"}`}\n />\n <span className=\"min-w-0 flex-1 truncate text-[11px] font-medium text-foreground\">\n {secret.label}\n </span>\n {secret.status === \"set\" && secret.last4 && (\n <code className=\"text-[10px] text-muted-foreground\">\n ••••{secret.last4}\n </code>\n )}\n <span className=\"shrink-0\">{pill}</span>\n </Button>\n\n {open && (\n <div className=\"border-t border-border/60 bg-accent/20 px-3 pb-3 pt-2.5\">\n {secret.description && (\n <p className=\"mb-2 text-[10px] leading-relaxed text-muted-foreground\">\n {secret.description}\n </p>\n )}\n {isOAuth ? (\n <div className=\"mt-2 flex items-center gap-1.5\">\n {secret.oauthConnectUrl && (\n <a\n href={secret.oauthConnectUrl}\n className=\"inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium no-underline\"\n style={{ backgroundColor: \"#00B5FF\", color: \"white\" }}\n >\n <IconPlugConnected size={10} />\n {secret.status === \"set\" ? \"Reconnect\" : \"Connect\"}\n </a>\n )}\n {secret.docsUrl && (\n <a\n href={secret.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] no-underline text-muted-foreground hover:text-foreground\"\n >\n Docs\n <IconExternalLink size={10} />\n </a>\n )}\n </div>\n ) : (\n <div className=\"mt-2 space-y-1.5\">\n {secret.status === \"set\" && (\n <div className=\"flex items-center gap-2 text-[10px] text-muted-foreground\">\n <span>Stored value ending in</span>\n <code className=\"rounded bg-background px-1 py-0.5 text-foreground\">\n {secret.last4}\n </code>\n </div>\n )}\n <div className=\"flex gap-1.5\">\n <TextField\n inputRef={inputRef}\n type=\"password\"\n aria-label={secret.label}\n value={value}\n onChange={setValue}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") handleSave();\n }}\n placeholder={\n secret.status === \"set\"\n ? \"Enter new value to rotate\"\n : \"Paste key\"\n }\n className=\"flex-1 text-[11px]\"\n />\n <Button\n type=\"button\"\n intent=\"primary\"\n emphasis=\"solid\"\n onClick={handleSave}\n disabled={!value.trim() || busy !== null}\n className=\"inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium disabled:opacity-40\"\n style={{ backgroundColor: \"#00B5FF\", color: \"white\" }}\n >\n {busy === \"save\" ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : secret.status === \"set\" ? (\n <>\n <IconRefresh size={10} />\n Rotate\n </>\n ) : (\n \"Save\"\n )}\n </Button>\n </div>\n <div className=\"flex items-center gap-1.5\">\n {secret.status === \"set\" && (\n <>\n <Button\n type=\"button\"\n intent=\"neutral\"\n emphasis=\"outline\"\n onClick={handleTest}\n disabled={busy !== null}\n className=\"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-muted-foreground hover:text-foreground disabled:opacity-40\"\n >\n {busy === \"test\" ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : (\n \"Test\"\n )}\n </Button>\n <Button\n type=\"button\"\n intent=\"danger\"\n emphasis=\"outline\"\n onClick={() => setConfirmDelete(true)}\n disabled={busy !== null}\n className=\"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-muted-foreground hover:text-red-500 disabled:opacity-40\"\n >\n <IconTrash size={10} />\n Remove\n </Button>\n </>\n )}\n {secret.docsUrl && (\n <a\n href={secret.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] no-underline text-muted-foreground hover:text-foreground ms-auto\"\n >\n Get key\n <IconExternalLink size={10} />\n </a>\n )}\n </div>\n {confirmDelete && (\n <div className=\"flex items-center gap-1.5 rounded border border-red-500/30 bg-red-500/10 px-2 py-1.5 text-[10px] text-red-500\">\n <span className=\"min-w-0 flex-1\">\n Remove this saved value?\n </span>\n <Button\n type=\"button\"\n intent=\"danger\"\n emphasis=\"solid\"\n onClick={handleDelete}\n disabled={busy !== null}\n className=\"inline-flex items-center gap-1 rounded border border-red-500/40 px-1.5 py-0.5 font-medium disabled:opacity-40\"\n >\n {busy === \"delete\" ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : (\n \"Confirm\"\n )}\n </Button>\n <Button\n type=\"button\"\n intent=\"neutral\"\n emphasis=\"outline\"\n onClick={() => setConfirmDelete(false)}\n disabled={busy !== null}\n className=\"rounded border border-border px-1.5 py-0.5 text-muted-foreground hover:text-foreground disabled:opacity-40\"\n >\n Cancel\n </Button>\n </div>\n )}\n </div>\n )}\n\n {toast && (\n <p\n className={`mt-1.5 text-[10px] ${\n toast.kind === \"ok\" ? \"text-green-500\" : \"text-red-500\"\n }`}\n >\n {toast.text}\n </p>\n )}\n </div>\n )}\n </div>\n );\n}\n\n// ─── Ad-hoc Keys Section ──────────────────────────────────────────────────\n\ninterface AdHocKey {\n name: string;\n scope: \"user\" | \"workspace\";\n scopeId: string;\n description: string | null;\n last4: string;\n createdAt: number;\n updatedAt: number;\n}\n\nconst ADHOC_ENDPOINT = agentNativePath(\"/_agent-native/secrets/adhoc\");\n\nfunction AdHocKeysSection({\n showForm,\n onShowFormChange,\n showEmptyState,\n}: {\n showForm: boolean;\n onShowFormChange: (show: boolean) => void;\n showEmptyState: boolean;\n}) {\n const [keys, setKeys] = useState<AdHocKey[]>([]);\n const [loading, setLoading] = useState(true);\n const [reloadToken, setReloadToken] = useState(0);\n const [formName, setFormName] = useState(\"\");\n const [formValue, setFormValue] = useState(\"\");\n const [formDescription, setFormDescription] = useState(\"\");\n const [formScope, setFormScope] = useState<\"user\" | \"workspace\">(\"user\");\n const [formBusy, setFormBusy] = useState(false);\n const [formError, setFormError] = useState<string | null>(null);\n const [confirmDeleteName, setConfirmDeleteName] = useState<string | null>(\n null,\n );\n const [deletingName, setDeletingName] = useState<string | null>(null);\n const [toast, setToast] = useState<{\n kind: \"ok\" | \"err\";\n text: string;\n } | null>(null);\n\n const showToast = useCallback(\n (kind: \"ok\" | \"err\", text: string, ms = 2500) => {\n setToast({ kind, text });\n setTimeout(() => setToast(null), ms);\n },\n [],\n );\n\n const reload = useCallback(() => setReloadToken((t) => t + 1), []);\n\n useEffect(() => {\n let cancelled = false;\n setLoading(true);\n fetch(ADHOC_ENDPOINT)\n .then(async (r) => {\n if (!r.ok) throw new Error(`Failed to load (${r.status})`);\n return (await r.json()) as AdHocKey[];\n })\n .then((data) => {\n if (!cancelled) {\n setKeys(data);\n setLoading(false);\n }\n })\n .catch(() => {\n if (!cancelled) {\n setKeys([]);\n setLoading(false);\n }\n });\n return () => {\n cancelled = true;\n };\n }, [reloadToken]);\n\n const resetForm = useCallback(() => {\n onShowFormChange(false);\n setFormName(\"\");\n setFormValue(\"\");\n setFormDescription(\"\");\n setFormScope(\"user\");\n setFormError(null);\n }, [onShowFormChange]);\n\n const handleAdd = useCallback(async () => {\n const name = formName.trim();\n const value = formValue.trim();\n if (!name || !value || formBusy) return;\n setFormBusy(true);\n setFormError(null);\n try {\n const res = await fetch(ADHOC_ENDPOINT, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n name,\n value,\n description: formDescription.trim() || undefined,\n scope: formScope,\n }),\n });\n if (!res.ok) {\n const body = await res\n .json()\n .then((j: { error?: string }) => j.error)\n .catch(() => null);\n setFormError(body ?? `Save failed (${res.status})`);\n return;\n }\n resetForm();\n showToast(\"ok\", \"Key saved\");\n notifySecretsChanged();\n reload();\n } catch (err: any) {\n setFormError(err?.message ?? \"Failed to save\");\n } finally {\n setFormBusy(false);\n }\n }, [\n formName,\n formValue,\n formDescription,\n formScope,\n formBusy,\n resetForm,\n showToast,\n reload,\n ]);\n\n const handleDelete = useCallback(\n async (name: string) => {\n setDeletingName(name);\n try {\n const res = await fetch(\n `${ADHOC_ENDPOINT}/${encodeURIComponent(name)}`,\n {\n method: \"DELETE\",\n headers: { \"Content-Type\": \"application/json\" },\n },\n );\n if (!res.ok) {\n showToast(\"err\", \"Failed to delete key\");\n return;\n }\n showToast(\"ok\", \"Key deleted\");\n setConfirmDeleteName(null);\n notifySecretsChanged();\n reload();\n } finally {\n setDeletingName(null);\n }\n },\n [showToast, reload],\n );\n\n return (\n <div className=\"space-y-2\">\n {showForm && (\n <div className=\"rounded-md border border-border px-2.5 py-2 bg-accent/30 space-y-1.5\">\n <TextField\n value={formName}\n onChange={(value) =>\n setFormName(value.toUpperCase().replace(/[^A-Z0-9_-]/g, \"\"))\n }\n className=\"w-full text-[11px]\"\n aria-label=\"Key name\"\n placeholder=\"KEY_NAME\"\n />\n <TextField\n type=\"password\"\n aria-label=\"Secret value\"\n value={formValue}\n onChange={setFormValue}\n className=\"w-full text-[11px]\"\n placeholder=\"Secret value\"\n />\n <TextField\n value={formDescription}\n aria-label=\"Description\"\n onChange={setFormDescription}\n className=\"w-full text-[11px]\"\n placeholder=\"Description (optional)\"\n />\n <div className=\"flex items-center gap-2\">\n <Picker\n mode=\"select\"\n options={[\n { value: \"user\", label: \"Personal\" },\n { value: \"workspace\", label: \"Workspace\" },\n ]}\n value={formScope}\n onChange={(value) => {\n if (value === \"user\" || value === \"workspace\") {\n setFormScope(value);\n }\n }}\n aria-label=\"Scope\"\n className=\"w-auto text-[11px]\"\n />\n <div className=\"ms-auto flex items-center gap-1.5\">\n <Button\n type=\"button\"\n intent=\"neutral\"\n emphasis=\"outline\"\n onClick={resetForm}\n className=\"rounded border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:text-foreground\"\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n intent=\"primary\"\n emphasis=\"solid\"\n onClick={handleAdd}\n disabled={!formName.trim() || !formValue.trim() || formBusy}\n className=\"inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium disabled:opacity-40\"\n style={{ backgroundColor: \"#00B5FF\", color: \"white\" }}\n >\n {formBusy ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : (\n \"Save\"\n )}\n </Button>\n </div>\n </div>\n {formError && <p className=\"text-[10px] text-red-500\">{formError}</p>}\n </div>\n )}\n\n {loading ? (\n <div className=\"flex items-center gap-1.5 text-[10px] text-muted-foreground\">\n <IconLoader2 size={10} className=\"animate-spin\" />\n Loading...\n </div>\n ) : keys.length === 0 && !showForm && showEmptyState ? (\n <p className=\"text-[10px] text-muted-foreground\">No keys added yet.</p>\n ) : keys.length > 0 ? (\n <div className=\"overflow-hidden rounded-md border border-border\">\n {keys.map((key) => (\n <div\n key={`${key.scope}-${key.name}`}\n className=\"border-b border-border px-2.5 py-2 last:border-b-0\"\n >\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-1.5\">\n <span className=\"text-[11px] font-medium text-foreground font-mono truncate\">\n {key.name}\n </span>\n <span\n className={`rounded-full px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide ${\n key.scope === \"workspace\"\n ? \"bg-blue-500/15 text-blue-500\"\n : \"bg-accent/60 text-muted-foreground\"\n }`}\n >\n {key.scope === \"workspace\" ? \"workspace\" : \"personal\"}\n </span>\n </div>\n {key.description && (\n <p className=\"text-[10px] text-muted-foreground mt-0.5\">\n {key.description}\n </p>\n )}\n <div className=\"flex items-center gap-2 text-[10px] text-muted-foreground mt-0.5\">\n <span>\n Ending in{\" \"}\n <code className=\"rounded bg-background px-1 py-0.5 text-foreground\">\n {key.last4}\n </code>\n </span>\n </div>\n </div>\n <div className=\"shrink-0\">\n {confirmDeleteName === key.name ? (\n <div className=\"flex items-center gap-1\">\n <Button\n type=\"button\"\n intent=\"danger\"\n emphasis=\"solid\"\n onClick={() => handleDelete(key.name)}\n disabled={deletingName === key.name}\n className=\"rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide bg-red-500/15 text-red-500 hover:bg-red-500/25 disabled:opacity-40\"\n >\n {deletingName === key.name ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : (\n \"Confirm\"\n )}\n </Button>\n <Button\n type=\"button\"\n intent=\"neutral\"\n emphasis=\"solid\"\n onClick={() => setConfirmDeleteName(null)}\n className=\"rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide bg-accent/60 text-muted-foreground hover:text-foreground\"\n >\n Cancel\n </Button>\n </div>\n ) : (\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n type=\"button\"\n intent=\"danger\"\n emphasis=\"ghost\"\n onClick={() => setConfirmDeleteName(key.name)}\n className=\"text-muted-foreground hover:text-red-500\"\n >\n <IconTrash size={12} />\n </Button>\n </TooltipTrigger>\n <TooltipContent>Delete</TooltipContent>\n </Tooltip>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n ) : null}\n\n {toast && (\n <p\n className={`text-[10px] ${toast.kind === \"ok\" ? \"text-green-500\" : \"text-red-500\"}`}\n >\n {toast.text}\n </p>\n )}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsPanel.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SettingsPanel.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAQN,MAAM,OAAO,CAAC;AA2Cf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAwoB7D,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,OAAO,GACR,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,qBAqDA;AAs+CD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AA20BD,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAEtD;AAED,wBAAgB,0BAA0B,CAAC,EACzC,kBAAkB,GACnB,EAAE;IACD,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,qBAcA;AAED,wBAAgB,oBAAoB,IAAI,eAAe,EAAE,CAyExD"}
1
+ {"version":3,"file":"SettingsPanel.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SettingsPanel.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAQN,MAAM,OAAO,CAAC;AA2Cf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA0nB7D,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,OAAO,GACR,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,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