@mgamadeus/ddd-agents 0.11.13 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/README.md +138 -6
  2. package/boundary.json +5 -0
  3. package/dist/admin.js +13712 -0
  4. package/dist/admin.js.map +1 -0
  5. package/dist/chat.js +1627 -109
  6. package/dist/chat.js.map +1 -1
  7. package/dist/chunks/{AgentsConversationClientContext-C4T7g_Qk.js → AgentsConversationClientContext-B_UJSLXU.js} +2 -2
  8. package/dist/chunks/{AgentsConversationClientContext-C4T7g_Qk.js.map → AgentsConversationClientContext-B_UJSLXU.js.map} +1 -1
  9. package/dist/chunks/{ConversationMarkdown-D-aP3Ssl.js → ConversationMarkdown-DlvwT3Qk.js} +5 -4
  10. package/dist/chunks/{ConversationMarkdown-D-aP3Ssl.js.map → ConversationMarkdown-DlvwT3Qk.js.map} +1 -1
  11. package/dist/chunks/{ConversationMessageInputComposerWidgets-7HNAmZE1.js → ConversationMessageInputComposerWidgets-TchR1lPj.js} +6 -6
  12. package/dist/chunks/{ConversationMessageInputComposerWidgets-7HNAmZE1.js.map → ConversationMessageInputComposerWidgets-TchR1lPj.js.map} +1 -1
  13. package/dist/chunks/{VoiceBarsIcon-FhLAcgLG.js → VoiceBarsIcon-y3mgSqbn.js} +4 -4
  14. package/dist/chunks/{VoiceBarsIcon-FhLAcgLG.js.map → VoiceBarsIcon-y3mgSqbn.js.map} +1 -1
  15. package/dist/chunks/{WebSearchResultsConversationWidget-dEq19U7k.js → WebSearchResultsConversationWidget-l9Aek_lG.js} +3 -2
  16. package/dist/chunks/WebSearchResultsConversationWidget-l9Aek_lG.js.map +1 -0
  17. package/dist/chunks/agents-http-trace-mappers-LWNi-3a4.js +759 -0
  18. package/dist/chunks/agents-http-trace-mappers-LWNi-3a4.js.map +1 -0
  19. package/dist/chunks/{browser-request-interception-ydNOzeUL.js → browser-request-interception-D678IemW.js} +2 -2
  20. package/dist/chunks/{browser-request-interception-ydNOzeUL.js.map → browser-request-interception-D678IemW.js.map} +1 -1
  21. package/dist/chunks/{canvas-reducers-BInd3xNz.js → canvas-reducers-BYArW_Ji.js} +2 -2
  22. package/dist/chunks/{canvas-reducers-BInd3xNz.js.map → canvas-reducers-BYArW_Ji.js.map} +1 -1
  23. package/dist/chunks/{canvas-title-slot-context-BI1PLnPn.js → canvas-title-slot-context-BRGnFzYP.js} +3 -3
  24. package/dist/chunks/{canvas-title-slot-context-BI1PLnPn.js.map → canvas-title-slot-context-BRGnFzYP.js.map} +1 -1
  25. package/dist/chunks/{canvasBodies-CRVh8pCw.js → canvasBodies-BjXypuHf.js} +4 -4
  26. package/dist/chunks/{canvasBodies-CRVh8pCw.js.map → canvasBodies-BjXypuHf.js.map} +1 -1
  27. package/dist/chunks/{canvasStorage-Cr3omZeI.js → canvasStorage-DSspwRMg.js} +2 -2
  28. package/dist/chunks/{canvasStorage-Cr3omZeI.js.map → canvasStorage-DSspwRMg.js.map} +1 -1
  29. package/dist/chunks/content-from-unified-diff-CovnmG2Q.js +2927 -0
  30. package/dist/chunks/content-from-unified-diff-CovnmG2Q.js.map +1 -0
  31. package/dist/chunks/{contract-C18owGKs.js → contract-886XjdID.js} +2 -2
  32. package/dist/chunks/{contract-C18owGKs.js.map → contract-886XjdID.js.map} +1 -1
  33. package/dist/chunks/{conversation-CbWEHPbL.js → conversation-B7-evdj_.js} +4 -4
  34. package/dist/chunks/{conversation-CbWEHPbL.js.map → conversation-B7-evdj_.js.map} +1 -1
  35. package/dist/chunks/{icon-names-Di6c4zLo.js → icon-names-C5PeVvkJ.js} +32 -1
  36. package/dist/chunks/icon-names-C5PeVvkJ.js.map +1 -0
  37. package/dist/chunks/{link-navigation-DRHt6g7U.js → index-DZovGMpG.js} +65 -106
  38. package/dist/chunks/index-DZovGMpG.js.map +1 -0
  39. package/dist/chunks/link-navigation-a_sRfmsj.js +49 -0
  40. package/dist/chunks/link-navigation-a_sRfmsj.js.map +1 -0
  41. package/dist/chunks/{widget-name-resolver-Dq6Ejo7d.js → widget-name-resolver-DS3zH_5W.js} +5 -4
  42. package/dist/chunks/{widget-name-resolver-Dq6Ejo7d.js.map → widget-name-resolver-DS3zH_5W.js.map} +1 -1
  43. package/dist/chunks/{withPollingChangeSubscription-ClyOABgu.js → withPollingChangeSubscription-XvCpjGmd.js} +13 -2
  44. package/dist/chunks/{withPollingChangeSubscription-ClyOABgu.js.map → withPollingChangeSubscription-XvCpjGmd.js.map} +1 -1
  45. package/dist/client-testing.js +5 -5
  46. package/dist/client.js +50 -231
  47. package/dist/client.js.map +1 -1
  48. package/dist/contract.js +5 -5
  49. package/dist/files/i18n-keys.json +18091 -1287
  50. package/dist/files/widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.md +3 -3
  51. package/dist/image-render.js +7 -7
  52. package/dist/index.js +62 -61
  53. package/dist/index.js.map +1 -1
  54. package/dist/kit.js +2 -2
  55. package/dist/preview.js +7 -7
  56. package/dist/provider.js +57 -56
  57. package/dist/provider.js.map +1 -1
  58. package/dist/renderer.js +15 -15
  59. package/dist/styles.css +2962 -15
  60. package/dist/types/admin/blocks/CodeBlock.d.ts +28 -0
  61. package/dist/types/admin/blocks/DetailModal.d.ts +34 -0
  62. package/dist/types/admin/blocks/Disclosure.d.ts +25 -0
  63. package/dist/types/admin/blocks/JsonTree.d.ts +18 -0
  64. package/dist/types/admin/blocks/LineDiffView.d.ts +18 -0
  65. package/dist/types/admin/blocks/ProportionBar.d.ts +43 -0
  66. package/dist/types/admin/blocks/TokenFigure.d.ts +14 -0
  67. package/dist/types/admin/blocks/json-tree.d.ts +40 -0
  68. package/dist/types/admin/blocks/line-diff.d.ts +46 -0
  69. package/dist/types/admin/blocks/proportion-bar.d.ts +34 -0
  70. package/dist/types/admin/blocks/series-fill-classes.d.ts +13 -0
  71. package/dist/types/admin/blocks/token-figure.d.ts +8 -0
  72. package/dist/types/admin/connections/AgentConnectionCard.d.ts +21 -0
  73. package/dist/types/admin/connections/AgentConnectionDriveRootSpaces.d.ts +25 -0
  74. package/dist/types/admin/connections/AgentConnectionDriveScopeDialog.d.ts +20 -0
  75. package/dist/types/admin/connections/AgentConnectionDriveSearchFilters.d.ts +34 -0
  76. package/dist/types/admin/connections/AgentConnectionDrivesDrawer.d.ts +39 -0
  77. package/dist/types/admin/connections/AgentConnectionLevelsDrawer.d.ts +27 -0
  78. package/dist/types/admin/connections/AgentConnectionSharingDialog.d.ts +12 -0
  79. package/dist/types/admin/connections/AgentConnectionsPanel.d.ts +97 -0
  80. package/dist/types/admin/connections/AgentConnectionsScreen.d.ts +18 -0
  81. package/dist/types/admin/connections/ConnectDialogs.d.ts +22 -0
  82. package/dist/types/admin/connections/agent-connection-drive-scope.d.ts +112 -0
  83. package/dist/types/admin/connections/agent-connection-drives.d.ts +107 -0
  84. package/dist/types/admin/connections/agent-connection-format.d.ts +82 -0
  85. package/dist/types/admin/connections/agent-connection-oauth.d.ts +122 -0
  86. package/dist/types/admin/connections/agent-connections-api.d.ts +420 -0
  87. package/dist/types/admin/connections/agent-connections-context.d.ts +60 -0
  88. package/dist/types/admin/connections/agent-connections-types.d.ts +447 -0
  89. package/dist/types/admin/connections/connection-logos.d.ts +53 -0
  90. package/dist/types/admin/connections/connection-parts.d.ts +84 -0
  91. package/dist/types/admin/connections/use-agent-connect.d.ts +25 -0
  92. package/dist/types/admin/context/CompactionThresholdBanner.d.ts +13 -0
  93. package/dist/types/admin/context/ContextCompositionPanel.d.ts +27 -0
  94. package/dist/types/admin/context/ContextSegmentList.d.ts +20 -0
  95. package/dist/types/admin/context/SentPayloadPanel.d.ts +37 -0
  96. package/dist/types/admin/context/agent-inspect-context-api.d.ts +53 -0
  97. package/dist/types/admin/context/agent-inspect-context-types.d.ts +98 -0
  98. package/dist/types/admin/context/context-composition-grouping.d.ts +78 -0
  99. package/dist/types/admin/context/context-segment-families.d.ts +18 -0
  100. package/dist/types/admin/context/context-segment-label-texts.d.ts +19 -0
  101. package/dist/types/admin/context/context-segment-labels.d.ts +18 -0
  102. package/dist/types/admin/control-panel/AgentControlPanelScreen.d.ts +71 -0
  103. package/dist/types/admin/control-panel/BudgetsTab.d.ts +13 -0
  104. package/dist/types/admin/control-panel/SettingsTab.d.ts +22 -0
  105. package/dist/types/admin/control-panel/SpacesTab.d.ts +24 -0
  106. package/dist/types/admin/control-panel/StatisticsTab.d.ts +26 -0
  107. package/dist/types/admin/control-panel/TimeSeriesChartCard.d.ts +37 -0
  108. package/dist/types/admin/control-panel/ToolResponseSamplesDrawer.d.ts +22 -0
  109. package/dist/types/admin/control-panel/agent-control-panel-api.d.ts +104 -0
  110. package/dist/types/admin/control-panel/agent-control-panel-types.d.ts +241 -0
  111. package/dist/types/admin/control-panel/budget-meters.d.ts +35 -0
  112. package/dist/types/admin/control-panel/control-panel-statistics.d.ts +49 -0
  113. package/dist/types/admin/control-panel/runtime-settings-form.d.ts +44 -0
  114. package/dist/types/admin/control-panel/time-series-chart.d.ts +54 -0
  115. package/dist/types/admin/conversations/AgentConversationDetailScreen.d.ts +128 -0
  116. package/dist/types/admin/conversations/AgentConversationsScreen.d.ts +60 -0
  117. package/dist/types/admin/conversations/ContextPanel.d.ts +9 -0
  118. package/dist/types/admin/conversations/ConversationActions.d.ts +32 -0
  119. package/dist/types/admin/conversations/ConversationTurns.d.ts +56 -0
  120. package/dist/types/admin/conversations/DebugSwitchBar.d.ts +23 -0
  121. package/dist/types/admin/conversations/DelegationPanel.d.ts +6 -0
  122. package/dist/types/admin/conversations/ModelContextDialog.d.ts +31 -0
  123. package/dist/types/admin/conversations/RequestCompositionRows.d.ts +14 -0
  124. package/dist/types/admin/conversations/RequestsPanel.d.ts +21 -0
  125. package/dist/types/admin/conversations/SandboxPanel.d.ts +42 -0
  126. package/dist/types/admin/conversations/StepDetailDialog.d.ts +19 -0
  127. package/dist/types/admin/conversations/agent-inspect-api.d.ts +259 -0
  128. package/dist/types/admin/conversations/agent-inspect-mappers.d.ts +23 -0
  129. package/dist/types/admin/conversations/agent-inspect-types.d.ts +517 -0
  130. package/dist/types/admin/conversations/conversation-list-export.d.ts +64 -0
  131. package/dist/types/admin/conversations/conversation-list-filters.d.ts +59 -0
  132. package/dist/types/admin/conversations/debug-switches.d.ts +27 -0
  133. package/dist/types/admin/conversations/delegation-swimlanes.d.ts +78 -0
  134. package/dist/types/admin/conversations/header-facts.d.ts +23 -0
  135. package/dist/types/admin/conversations/inspect-format.d.ts +44 -0
  136. package/dist/types/admin/conversations/inspect-parts.d.ts +42 -0
  137. package/dist/types/admin/conversations/inspect-scope.d.ts +92 -0
  138. package/dist/types/admin/conversations/model-call-rows.d.ts +78 -0
  139. package/dist/types/admin/conversations/step-descriptions.d.ts +43 -0
  140. package/dist/types/admin/conversations/touched-files-tree.d.ts +47 -0
  141. package/dist/types/admin/conversations/turn-paging.d.ts +56 -0
  142. package/dist/types/admin/conversations/turn-segments.d.ts +36 -0
  143. package/dist/types/admin/conversations/turn-timeline.d.ts +22 -0
  144. package/dist/types/admin/conversations/use-query-loader.d.ts +8 -0
  145. package/dist/types/admin/period/AdminPeriodControl.d.ts +15 -0
  146. package/dist/types/admin/period/admin-period.d.ts +51 -0
  147. package/dist/types/admin/quality/AgentQualityEvalRunScreen.d.ts +30 -0
  148. package/dist/types/admin/quality/AgentQualityScreen.d.ts +38 -0
  149. package/dist/types/admin/quality/SaveAsEvalCaseDialog.d.ts +27 -0
  150. package/dist/types/admin/quality/agent-quality-api.d.ts +86 -0
  151. package/dist/types/admin/quality/agent-quality-format.d.ts +52 -0
  152. package/dist/types/admin/quality/agent-quality-types.d.ts +161 -0
  153. package/dist/types/admin/schedules/AgentSchedulesPanel.d.ts +43 -0
  154. package/dist/types/admin/schedules/agent-schedules-api.d.ts +116 -0
  155. package/dist/types/admin/schedules/agent-schedules-format.d.ts +25 -0
  156. package/dist/types/admin/schedules/agent-schedules-types.d.ts +113 -0
  157. package/dist/types/admin/shared/AdminHrefLink.d.ts +13 -0
  158. package/dist/types/admin/skills/AgentSkillCatalogScreen.d.ts +51 -0
  159. package/dist/types/admin/skills/SharedBlocksPanel.d.ts +14 -0
  160. package/dist/types/admin/skills/SkillPurposesPanel.d.ts +16 -0
  161. package/dist/types/admin/skills/SkillTreeRowView.d.ts +31 -0
  162. package/dist/types/admin/skills/ToolSchemaDrawer.d.ts +21 -0
  163. package/dist/types/admin/skills/agent-skill-catalog-api.d.ts +89 -0
  164. package/dist/types/admin/skills/agent-skill-catalog-types.d.ts +223 -0
  165. package/dist/types/admin/skills/skill-catalog-colors.d.ts +10 -0
  166. package/dist/types/admin/skills/skill-catalog-tree.d.ts +159 -0
  167. package/dist/types/admin/skills/skill-purpose-texts.d.ts +11 -0
  168. package/dist/types/admin/wire/admin-wire.d.ts +21 -0
  169. package/dist/types/chat/controller/AgentChatController.d.ts +22 -0
  170. package/dist/types/chat/controller/turn-initiators.d.ts +21 -0
  171. package/dist/types/chat/trace/BackgroundTasksList.d.ts +35 -0
  172. package/dist/types/chat/trace/ChangeSetCard.d.ts +34 -0
  173. package/dist/types/chat/trace/ChangedFilesPane.d.ts +33 -0
  174. package/dist/types/chat/trace/ChangedRecordsList.d.ts +34 -0
  175. package/dist/types/chat/trace/ConsentRequestCard.d.ts +23 -0
  176. package/dist/types/chat/trace/ContextRing.d.ts +19 -0
  177. package/dist/types/chat/trace/ConversationChildTrace.d.ts +18 -0
  178. package/dist/types/chat/trace/ConversationTurnTrace.d.ts +48 -0
  179. package/dist/types/chat/trace/EntityChip.d.ts +23 -0
  180. package/dist/types/chat/trace/FileChangesSummary.d.ts +14 -0
  181. package/dist/types/chat/trace/FileEditBlock.d.ts +42 -0
  182. package/dist/types/chat/trace/LoadedSkillsDisclosure.d.ts +16 -0
  183. package/dist/types/chat/trace/QueuedMessageChip.d.ts +17 -0
  184. package/dist/types/chat/trace/RunStatusLine.d.ts +27 -0
  185. package/dist/types/chat/trace/StepKindDetails.d.ts +59 -0
  186. package/dist/types/chat/trace/SubAgentStepGroup.d.ts +53 -0
  187. package/dist/types/chat/trace/TaskPlanPane.d.ts +31 -0
  188. package/dist/types/chat/trace/TaskPlanRow.d.ts +28 -0
  189. package/dist/types/chat/trace/TerminalBlock.d.ts +16 -0
  190. package/dist/types/chat/trace/ThinkingBlock.d.ts +19 -0
  191. package/dist/types/chat/trace/ToolStepDetail.d.ts +49 -0
  192. package/dist/types/chat/trace/ToolStepGroup.d.ts +58 -0
  193. package/dist/types/chat/trace/ToolStepRow.d.ts +52 -0
  194. package/dist/types/chat/trace/TraceViewModeSwitch.d.ts +14 -0
  195. package/dist/types/chat/trace/TurnMetaLine.d.ts +27 -0
  196. package/dist/types/chat/trace/content-from-unified-diff.d.ts +25 -0
  197. package/dist/types/chat/trace/conversation-trace-loader.d.ts +133 -0
  198. package/dist/types/chat/trace/index.d.ts +34 -0
  199. package/dist/types/chat/trace/parse-unified-diff.d.ts +51 -0
  200. package/dist/types/chat/trace/task-plan-counts.d.ts +41 -0
  201. package/dist/types/chat/trace/trace-collect.d.ts +91 -0
  202. package/dist/types/chat/trace/trace-counts.d.ts +21 -0
  203. package/dist/types/chat/trace/trace-format.d.ts +73 -0
  204. package/dist/types/chat/trace/trace-labels.d.ts +60 -0
  205. package/dist/types/chat/trace/trace-parts.d.ts +63 -0
  206. package/dist/types/chat/trace/trace-step-focus.d.ts +12 -0
  207. package/dist/types/chat/trace/trace-types.d.ts +370 -0
  208. package/dist/types/chat/trace/use-conversation-trace.d.ts +47 -0
  209. package/dist/types/client/AgentsConversationClient.d.ts +20 -0
  210. package/dist/types/client/http/agents-http-trace-mappers.d.ts +31 -0
  211. package/dist/types/client/http/agents-http-trace-wire.d.ts +433 -0
  212. package/dist/types/contract/conversation-trace.d.ts +594 -0
  213. package/dist/types/entries/admin.d.ts +85 -0
  214. package/dist/types/entries/chat.d.ts +3 -1
  215. package/dist/types/entries/client.d.ts +2 -0
  216. package/dist/types/entries/contract.d.ts +1 -0
  217. package/dist/types/provider/components/icon-names.d.ts +4 -2
  218. package/dist/types/provider/components/types.d.ts +3 -1
  219. package/dist/types/widgets/DriveFilesConversationWidget/shared/drive-files.d.ts +1 -1
  220. package/dist/voice.js +3 -3
  221. package/dist/widgets.js +6 -6
  222. package/package.json +7 -3
  223. package/public-api.json +1036 -3
  224. package/dist/chunks/WebSearchResultsConversationWidget-dEq19U7k.js.map +0 -1
  225. package/dist/chunks/icon-names-Di6c4zLo.js.map +0 -1
  226. package/dist/chunks/link-navigation-DRHt6g7U.js.map +0 -1
@@ -0,0 +1,28 @@
1
+ import type { CodeHighlighterLoader } from "@mgamadeus/ddd-admin-ui/files";
2
+ import { type ReactNode } from "react";
3
+ export interface CodeBlockProps {
4
+ /** The text, shown as it is in a monospaced face. */
5
+ code: string;
6
+ /** A language the host's highlighter knows (`json`, `php`); `null` / absent: plain. */
7
+ language?: string | null;
8
+ /** Loads the host's highlighter on the first block shown; without it the code stays plain. */
9
+ loadCodeHighlighter?: CodeHighlighterLoader;
10
+ /** Long lines wrap at first (default `true`); the wrap toggle switches to sideways scrolling. */
11
+ defaultWrap?: boolean;
12
+ /** The wrap toggle in the block's corner (default `true`). */
13
+ showWrapToggle?: boolean;
14
+ /** The copy button in the block's corner (default `true`). */
15
+ showCopyButton?: boolean;
16
+ /** Left of the block's buttons (a caption, a badge). */
17
+ caption?: ReactNode;
18
+ /** Height: `auto` grows with the text up to 24 rem and scrolls inside; `fill` takes the height it is given. */
19
+ height?: "auto" | "fill";
20
+ /** Accessible name of the code region. */
21
+ "aria-label"?: string;
22
+ className?: string;
23
+ }
24
+ /**
25
+ * Text in a monospaced block with a wrap toggle and a copy button. The code is drawn as text nodes (plain at once,
26
+ * coloured once the host's highlighter answered), never as HTML. Copy writes exactly `code`.
27
+ */
28
+ export declare const CodeBlock: ({ code, language, loadCodeHighlighter, defaultWrap, showWrapToggle, showCopyButton, caption, height, "aria-label": ariaLabel, className, }: CodeBlockProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { type ReactNode } from "react";
2
+ /** The two readings of a detail: prepared for reading, or the text exactly as it is. */
3
+ export type DetailModalView = "formatted" | "raw";
4
+ export interface DetailModalProps {
5
+ open: boolean;
6
+ onOpenChange: (open: boolean) => void;
7
+ title: ReactNode;
8
+ /** One muted line under the title. */
9
+ description?: ReactNode;
10
+ /** Between the title and the view control (filters, a badge, a picker). */
11
+ toolbar?: ReactNode;
12
+ /** The Formatted / Raw control (default `true`); without it `children` is always asked for `formatted`. */
13
+ showViewControl?: boolean;
14
+ /** Uncontrolled: the view shown first (default `formatted`). */
15
+ defaultView?: DetailModalView;
16
+ /** Controlled view. */
17
+ view?: DetailModalView;
18
+ onViewChange?: (view: DetailModalView) => void;
19
+ /** With it the Copy button is shown; it writes this text (a function is called on the click). */
20
+ copyText?: string | (() => string);
21
+ /** `dialog` (default): a large centred dialog. `sheet`: a wide panel from the right. */
22
+ presentation?: "dialog" | "sheet";
23
+ /** The content, or a function of the chosen view. It scrolls inside the modal. */
24
+ children: ReactNode | ((view: DetailModalView) => ReactNode);
25
+ className?: string;
26
+ bodyClassName?: string;
27
+ }
28
+ /**
29
+ * A large modal for reading one thing in full: the title, a toolbar slot, the Formatted / Raw control, Copy and Close
30
+ * in a fixed head, the content scrolling below. The view control only switches what `children` is asked for; what
31
+ * "formatted" means (markdown, a tree) is the caller's. Copy turns into a check for a moment once the text is on the
32
+ * clipboard. Escape, the Close button and a click outside close it.
33
+ */
34
+ export declare const DetailModal: ({ open, onOpenChange, title, description, toolbar, showViewControl, defaultView, view, onViewChange, copyText, presentation, children, className, bodyClassName, }: DetailModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from "react";
2
+ export interface DisclosureProps {
3
+ /** The line that opens and closes the content. */
4
+ title: ReactNode;
5
+ /** Right of the title, outside the click target's text (figures, a badge). */
6
+ meta?: ReactNode;
7
+ children: ReactNode;
8
+ /** Uncontrolled: open at first. */
9
+ defaultOpen?: boolean;
10
+ /** Controlled state. */
11
+ open?: boolean;
12
+ onOpenChange?: (open: boolean) => void;
13
+ /** `sm`: a line inside a list or a table cell. `md` (default): a section line. */
14
+ size?: "sm" | "md";
15
+ disabled?: boolean;
16
+ className?: string;
17
+ triggerClassName?: string;
18
+ contentClassName?: string;
19
+ }
20
+ /**
21
+ * A line that opens the content below it: a chevron that turns, the title, an optional right-aligned `meta`. The
22
+ * content is mounted only while open, so a closed disclosure costs nothing. The trigger is one button
23
+ * (`aria-expanded`, `aria-controls`); `meta` is part of it, so it holds no control of its own.
24
+ */
25
+ export declare const Disclosure: ({ title, meta, children, defaultOpen, open, onOpenChange, size, disabled, className, triggerClassName, contentClassName, }: DisclosureProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ export interface JsonTreeProps {
2
+ /** The value to show: anything `JSON.parse` returns. */
3
+ value: unknown;
4
+ /** How many levels are open at first (0: only the root line; default 2). */
5
+ defaultExpandDepth?: number;
6
+ /** How many children of one object or array are drawn before "Show more" (default 100). */
7
+ windowSize?: number;
8
+ /** Accessible name of the tree. */
9
+ "aria-label"?: string;
10
+ className?: string;
11
+ }
12
+ /**
13
+ * A JSON value as a tree: objects and arrays open and close (the first `defaultExpandDepth` levels are open), a closed
14
+ * one says how many keys or items it holds, scalars are coloured by kind. A container draws its children only while
15
+ * open and at most `windowSize` of them at a time ("Show more" adds the next window), so a payload with thousands of
16
+ * entries stays light. Strings are shown whole, wrapped. Nothing of the value is inserted as HTML.
17
+ */
18
+ export declare const JsonTree: ({ value, defaultExpandDepth, windowSize, "aria-label": ariaLabel, className }: JsonTreeProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { type LineDiff } from "./line-diff";
2
+ export interface LineDiffViewProps {
3
+ /** The diff to draw (`diffLines(before, after)`). */
4
+ diff: LineDiff;
5
+ /** Equal lines kept around every change (default 3); longer equal runs are folded and open on a click. */
6
+ contextLineCount?: number;
7
+ /** How many rows are drawn before "Show more" (default 1500). */
8
+ maximumRows?: number;
9
+ /** Accessible name of the diff ("Payload of call 4 against call 5"). */
10
+ "aria-label": string;
11
+ className?: string;
12
+ }
13
+ /**
14
+ * A line diff as a table: line number in the first text, line number in the second, the mark (`−` only in the first,
15
+ * `+` only in the second) and the line. Equal lines far from a change are folded into one row that says how many they
16
+ * are and opens on a click. Added and removed lines carry a tint and their mark, so the colour is not the only sign.
17
+ */
18
+ export declare const LineDiffView: ({ diff, contextLineCount, maximumRows, "aria-label": ariaLabel, className }: LineDiffViewProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,43 @@
1
+ import { type ReactNode } from "react";
2
+ /** One part of the whole a `ProportionBar` draws. */
3
+ export interface ProportionBarSegment {
4
+ /** Stable identity of the part (the argument of `onSegmentSelect`). */
5
+ key: string;
6
+ /** The part's size; the bar weighs the parts by it. */
7
+ value: number;
8
+ /** The fill as a colour token class (`bg-primary`, a class of `SERIES_FILL_CLASS_NAMES`); never a colour value. */
9
+ colorClassName: string;
10
+ /** The part's name, already translated. */
11
+ label: string;
12
+ /** After the label in the legend (a count such as `×3`), already translated. */
13
+ badge?: ReactNode;
14
+ /** The value as text; default `formatValue(value)`. */
15
+ valueText?: string;
16
+ }
17
+ export interface ProportionBarProps {
18
+ segments: readonly ProportionBarSegment[];
19
+ /** Accessible name of the bar: what the whole is ("Context of this model call by segment"). */
20
+ "aria-label": string;
21
+ /** With it every part of the bar and every legend chip is a button calling it. */
22
+ onSegmentSelect?: (key: string) => void;
23
+ /** The value of a part as text (bar tooltip, legend); default the grouped number in the UI language's locale. */
24
+ formatValue?: (value: number) => string;
25
+ /** The legend below the bar: colour mark, label, value and share per part. Default `true`. */
26
+ showLegend?: boolean;
27
+ /** The share after the value in the legend (`12%`). Default `true`. */
28
+ showShare?: boolean;
29
+ /** `sm`: a 6 px line for a table row. `md` (default): a 20 px bar. */
30
+ size?: "sm" | "md";
31
+ /** The smallest width in percent a part with a value takes. Default 0.75. */
32
+ minimumWidthPercent?: number;
33
+ className?: string;
34
+ legendClassName?: string;
35
+ }
36
+ /**
37
+ * Parts of one whole as a single horizontal bar, each part as wide as its share, with a 2 px gap between parts, and
38
+ * a legend that names every part with its value and share. Colour never stands alone: every part is named in the
39
+ * legend and in its tooltip, and pointing at a legend entry marks its part in the bar. With `onSegmentSelect` the
40
+ * parts and the legend entries are buttons (one tab stop each, the name says label, value and share); without it the
41
+ * bar is one image with a text alternative and the legend a plain list.
42
+ */
43
+ export declare const ProportionBar: ({ segments, "aria-label": ariaLabel, onSegmentSelect, formatValue, showLegend, showShare, size, minimumWidthPercent, className, legendClassName, }: ProportionBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import type { ReactNode } from "react";
2
+ export interface TokenFigureProps {
3
+ /** The token count; `null` / `undefined` shows a dash. */
4
+ value: number | null | undefined;
5
+ /** `true` (default): an estimate, marked `≈`. */
6
+ isEstimate?: boolean;
7
+ /** The `Intl` locale of the digits; default the locale of the active UI language. */
8
+ locale?: string;
9
+ /** Shown after the figure in the muted colour (a unit such as "tokens"), already translated. */
10
+ suffix?: ReactNode;
11
+ className?: string;
12
+ }
13
+ /** A token count in tabular digits: `≈7,505` for an estimate, `7,505` for an exact count, in the UI language's locale. */
14
+ export declare const TokenFigure: ({ value, isEstimate, locale, suffix, className }: TokenFigureProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,40 @@
1
+ /** A value as JSON carries it. */
2
+ export type JsonValue = string | number | boolean | null | JsonValue[] | {
3
+ [key: string]: JsonValue;
4
+ };
5
+ export type JsonValueKind = "object" | "array" | "string" | "number" | "boolean" | "null";
6
+ /** How many children of one object or array a tree shows before it asks to show more. */
7
+ export declare const JSON_TREE_WINDOW_SIZE = 100;
8
+ /** The kind of a JSON value; anything JSON cannot carry (undefined, a function) reads as `null`. */
9
+ export declare const jsonValueKindOf: (value: unknown) => JsonValueKind;
10
+ /** True for an object or an array: a value with children. */
11
+ export declare const isJsonContainer: (value: unknown) => value is JsonValue[] | {
12
+ [key: string]: JsonValue;
13
+ };
14
+ /**
15
+ * The object or array a text holds as JSON, or `undefined` when the text is anything else (prose, markdown, a JSON
16
+ * scalar, broken JSON). Only a text that starts with `{` or `[` is parsed, so long prose costs nothing.
17
+ */
18
+ export declare const parseJsonContainer: (text: string) => JsonValue[] | {
19
+ [key: string]: JsonValue;
20
+ } | undefined;
21
+ /** One child of a container: its key (an array index as a number) and its value. */
22
+ export interface JsonChildEntry {
23
+ key: string | number;
24
+ value: unknown;
25
+ }
26
+ /** The children of an object (key order as given) or an array (by index); none for a scalar. */
27
+ export declare const jsonChildEntriesOf: (value: unknown) => JsonChildEntry[];
28
+ /** How many children a container has; 0 for a scalar. */
29
+ export declare const jsonChildCountOf: (value: unknown) => number;
30
+ /** The part of a list a window shows and how many entries wait behind it. */
31
+ export interface JsonEntryWindow<TEntry> {
32
+ visible: TEntry[];
33
+ hiddenCount: number;
34
+ }
35
+ /** The first `visibleCount` entries and the number left out (a count below 1 shows one entry). */
36
+ export declare const windowJsonEntries: <TEntry>(entries: readonly TEntry[], visibleCount: number) => JsonEntryWindow<TEntry>;
37
+ /** A JSON value as indented text (two spaces), key order kept; a value JSON cannot carry gives `null`. */
38
+ export declare const formatJsonText: (value: unknown) => string;
39
+ /** A scalar as the tree writes it: a string in quotes with its escapes, the others as JSON. */
40
+ export declare const formatJsonScalar: (value: unknown) => string;
@@ -0,0 +1,46 @@
1
+ /** One line of a line diff: in both texts, only in the first (`removed`) or only in the second (`added`). */
2
+ export interface LineDiffRow {
3
+ kind: "equal" | "removed" | "added";
4
+ text: string;
5
+ /** 1-based line number in the first text (absent for an added line). */
6
+ beforeLineNumber?: number;
7
+ /** 1-based line number in the second text (absent for a removed line). */
8
+ afterLineNumber?: number;
9
+ }
10
+ export interface LineDiff {
11
+ rows: LineDiffRow[];
12
+ addedCount: number;
13
+ removedCount: number;
14
+ /**
15
+ * True when the part that differs was too large to align (`maximumCells`): its lines are then listed as all removed,
16
+ * then all added, without matching equal lines inside it. The common start and end are still exact.
17
+ */
18
+ isApproximate: boolean;
19
+ }
20
+ export interface LineDiffOptions {
21
+ /**
22
+ * The largest table (lines of the differing part of the first text × those of the second) the alignment builds;
23
+ * above it the differing part is not aligned (`isApproximate`). Default 4 000 000 (two parts of 2 000 lines).
24
+ */
25
+ maximumCells?: number;
26
+ }
27
+ /**
28
+ * The line diff of two texts by their longest common subsequence of lines. The common start and the common end are
29
+ * cut off first (two payloads of one conversation share most of their lines), so the table only covers the part in
30
+ * between. A removed line comes before the added line that replaces it. Lines are compared exactly (no trimming).
31
+ */
32
+ export declare const diffLines: (before: string, after: string, options?: LineDiffOptions) => LineDiff;
33
+ /** A stretch of a diff as it is drawn: changed and nearby lines, or a run of equal lines folded away. */
34
+ export type LineDiffSection = {
35
+ kind: "lines";
36
+ rows: LineDiffRow[];
37
+ } | {
38
+ kind: "folded";
39
+ rows: LineDiffRow[];
40
+ };
41
+ /**
42
+ * The rows cut into sections: every changed line with `contextLineCount` equal lines around it stays visible, a longer
43
+ * run of equal lines between (or before, or after) the changes is one folded section. A diff without a change is one
44
+ * folded section; an empty diff has none.
45
+ */
46
+ export declare const foldEqualLines: (rows: readonly LineDiffRow[], contextLineCount?: number) => LineDiffSection[];
@@ -0,0 +1,34 @@
1
+ /** One part of a whole, as the maths reads it. */
2
+ export interface ProportionValue {
3
+ key: string;
4
+ value: number;
5
+ }
6
+ /** A part with its share of the whole and its width in the bar. */
7
+ export interface ProportionShare {
8
+ key: string;
9
+ /** The value counted (a negative or non-finite value counts as 0). */
10
+ value: number;
11
+ /** The part's share of the sum, 0 … 1 (0 when the sum is 0). */
12
+ share: number;
13
+ /** The part's width in the bar in percent; the widths of all parts sum to 100 (all 0 for an empty list). */
14
+ widthPercent: number;
15
+ }
16
+ export interface ProportionShareOptions {
17
+ /**
18
+ * The smallest width in percent a part with a value takes, so a tiny part stays visible and clickable. The other
19
+ * parts shrink in proportion. Default 0.75.
20
+ */
21
+ minimumWidthPercent?: number;
22
+ }
23
+ /**
24
+ * The shares and bar widths of the parts of a whole. A part without a value has share and width 0. A part whose share
25
+ * is below the minimum width takes the minimum, and the parts above it give that width up in proportion; when even
26
+ * the minimum does not fit for every part, the parts with a value share the bar equally. A sum of 0 gives every part
27
+ * the same width (there is nothing to weigh), with share 0.
28
+ */
29
+ export declare const computeProportionShares: (values: readonly ProportionValue[], options?: ProportionShareOptions) => ProportionShare[];
30
+ /**
31
+ * A share as a percentage in `locale` (`12.4%`, German `12,4 %`): one decimal below 10 %, none from there, and
32
+ * `<0.1%` for a share that would round to zero but is not zero.
33
+ */
34
+ export declare const formatProportionShare: (share: number, locale?: string) => string;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Fill classes for parts of a whole (proportion bars, legends): the slots of the host's categorical series palette
3
+ * (`--series-1` … `--series-8`, a fixed, validated order) and two neutral slots. A host without the series properties
4
+ * gets the colour role named as the fallback. Each slot has three steps of one hue (full, 70 %, 45 %): neighbours of the
5
+ * same kind take different steps, so the 2 px gap between them is not the only thing that separates them. The classes
6
+ * are literals, so the host's Tailwind build finds them in the package's JavaScript.
7
+ */
8
+ export type SeriesFillSlot = "series1" | "series2" | "series3" | "series4" | "series5" | "series6" | "series7" | "series8" | "neutral" | "ink";
9
+ /** The three steps of one slot, strongest first. */
10
+ export type SeriesFillSteps = readonly [string, string, string];
11
+ export declare const SERIES_FILL_CLASS_NAMES: Readonly<Record<SeriesFillSlot, SeriesFillSteps>>;
12
+ /** The fill class of a slot for the n-th part of that slot (0-based): the steps repeat, strongest first. */
13
+ export declare const seriesFillClassNameOf: (slot: SeriesFillSlot, positionInSlot?: number) => string;
@@ -0,0 +1,8 @@
1
+ export interface TokenFigureFormatOptions {
2
+ /** `true` (default): the figure is an estimate and carries the mark `≈`. */
3
+ isEstimate?: boolean;
4
+ /** The `Intl` locale of the digits' grouping; default the runtime's. */
5
+ locale?: string;
6
+ }
7
+ /** A token count as text: grouped digits in `locale`, `≈` before an estimate (`≈7,505`), `—` without a number. */
8
+ export declare const formatTokenFigure: (value: number | null | undefined, options?: TokenFigureFormatOptions) => string;
@@ -0,0 +1,21 @@
1
+ import type { AgentConnectionSummary } from "./agent-connections-types";
2
+ import { type AgentConnectionActionHandlers, type AgentConnectionNameEditRequest } from "./connection-parts";
3
+ export interface AgentConnectionCardProps {
4
+ connection: AgentConnectionSummary;
5
+ /** The signed-in account may change it (its owner, or a holder of the system right for a connection of the agent). */
6
+ canManage: boolean;
7
+ handlers: AgentConnectionActionHandlers;
8
+ nameEditRequest: AgentConnectionNameEditRequest | null;
9
+ onNameEditRequestHandled: () => void;
10
+ /** The grid's row key, set on the tile's root (`data-row-key`). */
11
+ rowKey?: string;
12
+ }
13
+ /** The secondary line: the account, the provider and, for the agent's own connections, that note. */
14
+ export declare const useAgentConnectionSubline: (connection: AgentConnectionSummary) => string;
15
+ /**
16
+ * One connection as a tile: the provider's mark, the name (renamed in place), the account, visibility and status, the
17
+ * level per capability with the product marks, what needs doing (expired access, a failing login), the drives and
18
+ * folders of a drive connection, when it was connected and last used; the actions in the "…" menu. Expired and failing
19
+ * connections get a coloured edge.
20
+ */
21
+ export declare const AgentConnectionCard: ({ connection, canManage, handlers, nameEditRequest, onNameEditRequestHandled, rowKey }: AgentConnectionCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { type AgentConnectionDriveRootActions } from "./agent-connection-drives";
2
+ import type { AgentConnectionDriveLabel, AgentConnectionDriveRoot, AgentConnectionDriveRootRelease, AgentConnectionSummary } from "./agent-connections-types";
3
+ /** What a drive answer says about agent spaces: the releases of the roots, where the viewer may release to, what the connection is shared with, the host's names. */
4
+ export interface AgentConnectionDriveSpaces {
5
+ releases: readonly AgentConnectionDriveRootRelease[];
6
+ releasableAgentSpaceIds: readonly number[];
7
+ connectionAgentSpaceIds: readonly number[];
8
+ agentSpaceLabels: readonly AgentConnectionDriveLabel[];
9
+ }
10
+ export interface AgentConnectionDriveRootSpacesProps {
11
+ /** An ACTIVE root. */
12
+ root: AgentConnectionDriveRoot;
13
+ connection: AgentConnectionSummary;
14
+ /** What the viewer may do with the root (`agentConnectionDriveRootActionsOf`). */
15
+ actions: AgentConnectionDriveRootActions;
16
+ spaces: AgentConnectionDriveSpaces;
17
+ }
18
+ /**
19
+ * "Released to" of one active root: which agent spaces use it. By default it follows the connection's sharing; once
20
+ * released to a space or set to "only for the owner" it is restricted to the spaces of its active releases. Whoever
21
+ * manages the connection releases it to a space, restricts it and lets it follow the connection again; a release is
22
+ * taken back by the person who released it or with the system right. Every write names its effect and is off without
23
+ * write access.
24
+ */
25
+ export declare const AgentConnectionDriveRootSpaces: ({ root, connection, actions, spaces }: AgentConnectionDriveRootSpacesProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import type { AgentConnectionSummary } from "./agent-connections-types";
2
+ export interface AgentConnectionDriveScopeDialogProps {
3
+ /** The drive connection the dialog decides for, `null` = closed. */
4
+ connection: AgentConnectionSummary | null;
5
+ /** "Certain areas" was saved: the host opens the picker of "Drives and folders" of this connection. */
6
+ onPickAreas: (connectionId: number) => void;
7
+ onClose: () => void;
8
+ }
9
+ /**
10
+ * "What may the agent see?" of one drive connection, right after it was connected and again from "Drives and
11
+ * folders": certain areas (the default; picked next in the three sections of the picker), all shared drives (a rule:
12
+ * new ones automatically), everything (the account's own drive and all shared drives; only with a warning and only
13
+ * while the connection is visible to its owner alone), or later; with the visibility and the level of Files in the
14
+ * same form. A rule the server does not support for the connection (`supportedRootKinds`) is shown off as "comes
15
+ * soon". Saving runs in this order: the visibility (`POST settings`), the level (`POST level`; a level the grant does
16
+ * not cover goes through the provider's consent last, the browser leaves), the rule (`POST driveRoots` with
17
+ * `rootKind`), then the picker opens for certain areas. Only whoever manages the connection changes anything (as in
18
+ * the drawer); without write access the form is read only.
19
+ */
20
+ export declare const AgentConnectionDriveScopeDialog: ({ connection, onPickAreas, onClose }: AgentConnectionDriveScopeDialogProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { type AgentConnectionDriveSearchFilterField, type AgentConnectionDriveSearchFilterName, type AgentConnectionDriveSearchFilters, type AgentConnectionDriveSearchType } from "./agent-connection-drive-scope";
2
+ /** A place the search can stay below; `null` = everywhere. */
3
+ export interface AgentConnectionDriveSearchLocation {
4
+ folderId: string | null;
5
+ label: string;
6
+ }
7
+ interface FilterToggleProps {
8
+ isOpen: boolean;
9
+ activeCount: number;
10
+ onToggle: () => void;
11
+ controlsId: string;
12
+ }
13
+ /** "Filters" beside the search field: opens and closes the filters, the number says how many are set. */
14
+ export declare const AgentConnectionDriveSearchFilterToggle: ({ isOpen, activeCount, onToggle, controlsId }: FilterToggleProps) => import("react/jsx-runtime").JSX.Element;
15
+ export interface AgentConnectionDriveSearchFiltersPanelProps {
16
+ id: string;
17
+ filters: AgentConnectionDriveSearchFilters;
18
+ onChange: (filters: AgentConnectionDriveSearchFilters) => void;
19
+ /** The filters the server applies (`supportedSearchFilters`); the others are shown off. */
20
+ supported: readonly AgentConnectionDriveSearchFilterName[];
21
+ /** The kinds offered (the picker: folders and shared drives). */
22
+ typeOptions: readonly AgentConnectionDriveSearchType[];
23
+ /** The places the search can stay below, after "Everywhere". */
24
+ locations: readonly AgentConnectionDriveSearchLocation[];
25
+ /** The controls shown (default all; the picker leaves out the size, folders have none). */
26
+ fields?: readonly AgentConnectionDriveSearchFilterField[];
27
+ }
28
+ /**
29
+ * The filters of a drive search: changed and created between two days, kind, size in megabytes, and the place it stays
30
+ * below. A filter the server does not apply (`supportedSearchFilters`) is shown off with "comes soon" and never sent;
31
+ * a range whose start lies after its end is named, the search still runs.
32
+ */
33
+ export declare const AgentConnectionDriveSearchFiltersPanel: ({ id, filters, onChange, supported, typeOptions, locations, fields, }: AgentConnectionDriveSearchFiltersPanelProps) => import("react/jsx-runtime").JSX.Element;
34
+ export {};
@@ -0,0 +1,39 @@
1
+ import type { AgentConnectionSummary } from "./agent-connections-types";
2
+ export interface AgentConnectionDrivesDrawerProps {
3
+ /** The connection whose drives and folders are open, `null` = closed. */
4
+ connection: AgentConnectionSummary | null;
5
+ /** Every connection the viewer sees: the names of releasing connections and the agent's own drive identities. */
6
+ connections: readonly AgentConnectionSummary[];
7
+ /** The root to scroll to and mark (a deep link). */
8
+ highlightedDriveRootId: number | null;
9
+ /**
10
+ * EXTENSION POINT (item search): true shows the search field of the picker (folders and shared drives by name,
11
+ * `GET connections/{id}/driveItems/search` through `useSearchDriveItemsQuery`). A host passes true once its backend
12
+ * mounts that route; until then the picker only browses. Default false.
13
+ */
14
+ isItemSearchAvailable?: boolean;
15
+ /**
16
+ * EXTENSION POINT (shared drives): true shows the section "Shared drives" in the switch of the picker (the shared
17
+ * drives the account is a member of, `GET connections/{id}/driveItems?section=SHARED_DRIVES`). A host passes true
18
+ * once its backend lists them; until then the picker offers the account's own drive and what was shared with it.
19
+ * Default false.
20
+ */
21
+ isSharedDrivesSectionAvailable?: boolean;
22
+ /** "What may the agent see?" for this connection (`AgentConnectionDriveScopeDialog`); without it the drawer offers no button. */
23
+ onOpenScope?: () => void;
24
+ /** A request to open the picker (a changing number, e.g. a time stamp): "Certain areas" of that dialog was saved. */
25
+ pickerRequest?: number | null;
26
+ onClose: () => void;
27
+ }
28
+ /**
29
+ * "Drives and folders" of one drive connection: its roots (`GET connections/{id}/driveRoots`), the only places the
30
+ * agent reaches through the connection: name, kind (shared drive, folder, file), how each came, the provider's role,
31
+ * its status, and for an active root which agent spaces use it (`AgentConnectionDriveRootSpaces`). They are grouped
32
+ * by kind, the shared drives first; the ended roots (revoked by a person, lost at the provider) stay listed below the
33
+ * others of their group, greyed, with who and when. Whoever manages
34
+ * the connection adds a root from the drive's folders, removes one, attaches an ended one again, has the provider
35
+ * checked, and with the system right assigns the unassigned shares of the agent's own account and looks for new ones;
36
+ * a release to the agent is taken back by the person who released it or with the system right. Every write is
37
+ * confirmed with its effect and is off without write access.
38
+ */
39
+ export declare const AgentConnectionDrivesDrawer: ({ connection, connections, highlightedDriveRootId, isItemSearchAvailable, isSharedDrivesSectionAvailable, onOpenScope, pickerRequest, onClose, }: AgentConnectionDrivesDrawerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import type { AgentConnectionCapability, AgentConnectionLevel, AgentConnectionSummary } from "./agent-connections-types";
2
+ interface AgentConnectionLevelsDrawerProps {
3
+ /** The connection being edited, `null` = closed. */
4
+ connection: AgentConnectionSummary | null;
5
+ /**
6
+ * A capability and level the agent suggests (a deep link from the chat): shown as a suggestion beside the saved
7
+ * level, saved only with its own "Apply"; the choice keeps the saved level.
8
+ */
9
+ preset?: {
10
+ capability: AgentConnectionCapability;
11
+ level: AgentConnectionLevel;
12
+ } | null;
13
+ onClose: () => void;
14
+ }
15
+ /**
16
+ * "Change levels": per capability the level the agent works with (the order by power, each level includes the ones
17
+ * before it; the line under the choice says what it allows), and who sees the connection. Only what changed is sent:
18
+ * the visibility with `POST connections/{id}/settings`, each changed level with `POST connections/{id}/level`. On a
19
+ * Google connection a level above the current grant is marked and saved through Google's consent ("Save and ask
20
+ * Google").
21
+ *
22
+ * Opened with a suggestion, the row of its capability carries it: the saved level and the suggested one with its own
23
+ * "Apply", which saves that one level at once (Google: through the consent when the grant does not cover it). A check
24
+ * in the level list only ever marks the saved level; a chosen but unsaved level names the saved one beside it.
25
+ */
26
+ export declare const AgentConnectionLevelsDrawer: ({ connection, preset, onClose }: AgentConnectionLevelsDrawerProps) => import("react/jsx-runtime").JSX.Element;
27
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { AgentConnectionSummary } from "./agent-connections-types";
2
+ interface AgentConnectionSharingDialogProps {
3
+ /** The connection whose sharing is open, `null` = closed. */
4
+ connection: AgentConnectionSummary | null;
5
+ onClose: () => void;
6
+ }
7
+ /**
8
+ * "Sharing": who may let the agent use the connection: only its owner, or everyone working in the shared space (a
9
+ * release to that space, read only at first). Sends the visibility alone (`POST connections/{id}/settings`).
10
+ */
11
+ export declare const AgentConnectionSharingDialog: ({ connection, onClose }: AgentConnectionSharingDialogProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,97 @@
1
+ import { type ListDisplayMode, type UrlStateAdapter } from "@mgamadeus/ddd-admin-ui/logic";
2
+ import { type ReactNode } from "react";
3
+ import { type AgentConnectionsScope } from "./agent-connection-format";
4
+ import { type AgentConnectionDriveSelection, type AgentConnectionLevelsRequest, type AgentConnectionsOAuthAdapter } from "./agent-connection-oauth";
5
+ import type { AgentConnectionsApi } from "./agent-connections-api";
6
+ import { type AgentConnectionsTexts } from "./agent-connections-context";
7
+ import { type AgentConnectionLogos } from "./connection-logos";
8
+ import { type AgentConnectProvider } from "./connection-parts";
9
+ /** The URL state of the panel: the status quick filter and the search. */
10
+ export declare const AGENT_CONNECTIONS_URL_KEYS: readonly ["status", "q"];
11
+ /** The parts of the panel, for a host frame that places them itself (`AgentConnectionsPanelProps.renderFrame`). */
12
+ export interface AgentConnectionsPanelParts {
13
+ /** "Add connection" with the providers; `size` as the place needs it. */
14
+ addMenu: (size: "sm" | "default") => ReactNode;
15
+ /** The result of a provider's return (connected, renewed, merged, refused), `null` without one. */
16
+ banner: ReactNode;
17
+ /** The status quick filters, `null` without a connection. */
18
+ filters: ReactNode;
19
+ /** Search and the view toggle. */
20
+ toolbar: ReactNode;
21
+ /** The connections as tiles or table rows, with their loading, empty and error states. */
22
+ body: ReactNode;
23
+ /** The dialogs and drawers; they render nothing while closed. */
24
+ overlays: ReactNode;
25
+ }
26
+ export interface AgentConnectionsPanelProps {
27
+ /** `createAgentConnectionsApi(…)` of the host. */
28
+ api: AgentConnectionsApi;
29
+ /** The signed-in account: its own connections are the ones it may change. */
30
+ accountId: number | string | null;
31
+ /** False: every control that changes something is off. Default true. */
32
+ writesAllowed?: boolean;
33
+ /** `all` (default): every connection the account sees; `manageable`: only the ones it may change. */
34
+ scope?: AgentConnectionsScope;
35
+ /** The providers the add menu offers, in this order. Default: Google, IMAP/SMTP, Slack (the system right). */
36
+ connectProviders?: readonly AgentConnectProvider[];
37
+ /**
38
+ * The way to a provider and back (storage, address, navigation). Without it the OAuth connects are off: the add menu
39
+ * offers no OAuth provider and no connection reconnects or asks for more scopes.
40
+ */
41
+ oauth?: AgentConnectionsOAuthAdapter | null;
42
+ /**
43
+ * Which panel this is on the way back from a provider: a connect started here is stored with it, and only a panel
44
+ * of the same surface shows its result. Default: the page of the connections.
45
+ */
46
+ surface?: string;
47
+ /** The host's words: the agent's name, what "shared" means here. */
48
+ texts?: AgentConnectionsTexts;
49
+ /** Marks of providers and products beside the package's (Google, Slack). */
50
+ logos?: AgentConnectionLogos;
51
+ /** Search and status filter in the host's URL; default: in the panel's own state. */
52
+ urlStateAdapter?: UrlStateAdapter;
53
+ /** Tiles or table, when the host keeps the choice; default: the panel's own state, starting with tiles. */
54
+ displayMode?: ListDisplayMode;
55
+ onDisplayModeChange?: (displayMode: ListDisplayMode) => void;
56
+ /** False: tiles only, no view toggle (a narrow column). Default true. */
57
+ tableView?: boolean;
58
+ /** A request to open the levels drawer of a connection (a deep link); handled once the list is loaded. */
59
+ levelsRequest?: AgentConnectionLevelsRequest | null;
60
+ onLevelsRequestHandled?: () => void;
61
+ /** False: no "Drives and folders" (a host that does not mount the drive routes). Default true. */
62
+ driveRoots?: boolean;
63
+ /** The connection whose drives and folders are open, when the host keeps it (the URL); with it pass the callback. */
64
+ selectedDrive?: AgentConnectionDriveSelection | null;
65
+ onSelectedDriveChange?: (selection: AgentConnectionDriveSelection | null) => void;
66
+ /**
67
+ * EXTENSION POINT (item search): true shows the search field in the picker of "Drives and folders" (folders and
68
+ * shared drives by name, `GET connections/{id}/driveItems/search`). A host passes true once its backend mounts that
69
+ * route; until then the picker only browses. Default false.
70
+ */
71
+ isItemSearchAvailable?: boolean;
72
+ /**
73
+ * EXTENSION POINT (shared drives): true shows the section "Shared drives" in the picker of "Drives and folders" (the
74
+ * shared drives the account is a member of, `GET connections/{id}/driveItems?section=SHARED_DRIVES`). A host passes
75
+ * true once its backend lists them; until then the picker offers the account's own drive and what was shared with
76
+ * it. Default false.
77
+ */
78
+ isSharedDrivesSectionAvailable?: boolean;
79
+ /** Places the parts itself (a page puts the add menu into its header). Default: stacked, the add menu above the list. */
80
+ renderFrame?: (parts: AgentConnectionsPanelParts) => ReactNode;
81
+ className?: string;
82
+ }
83
+ /**
84
+ * The connections of the signed-in account as one embeddable block, without a page header: the accounts the agent
85
+ * works with for it (`GET connections`: its own, the ones released to a space it belongs to, and with the system right
86
+ * the agent's system connections), as tiles (default; the provider's mark is the identity) or as a table. Quick
87
+ * filters by status, search by name and account. "Add connection" connects Google (consent), an IMAP/SMTP mailbox or
88
+ * the agent's Slack bot; per connection: rename in place, levels and visibility, sharing, the drives and folders of a
89
+ * drive connection, reconnect, disconnect. What the account may not change has no control: the rights are the server's
90
+ * (`canManageAgentConnection` mirrors them), the panel only hides what the server would refuse.
91
+ *
92
+ * The same block serves a page (`AgentConnectionsScreen`) and a column of a dialog (~640 px). A provider's return
93
+ * lands on one route of the host; the panel whose `surface` started the connect shows the result (a new connection, a
94
+ * renewed one, a consent merged into an existing connection, a refusal, a connection the server could not share),
95
+ * wherever it is mounted, and then removes the return parameters through the adapter.
96
+ */
97
+ export declare const AgentConnectionsPanel: ({ api, accountId, writesAllowed, oauth, surface, texts, logos, ...content }: AgentConnectionsPanelProps) => import("react/jsx-runtime").JSX.Element;