@mgamadeus/ddd-agents 0.11.12 → 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,259 @@
1
+ import { type ApiMutationHook, type ApiQueryHook, type InjectableBaseApi, type InjectedRequest, type StaticQueryFailure } from "@mgamadeus/ddd-admin-ui/logic/pure";
2
+ import { type AgentInspectContextApi, type StaticAgentInspectContextData } from "../context/agent-inspect-context-api";
3
+ import type { AgentInspectCompactionNodesResponse, AgentInspectConversationArg, AgentInspectConversationResponse, AgentInspectConversationsResponse, AgentInspectDelegationsResponse, AgentInspectDriveArg, AgentInspectDriveResponse, AgentInspectFileChangeArg, AgentInspectFileChangeDiffResponse, AgentInspectFileChangesResponse, AgentInspectListArg, AgentInspectMessageRouteArg, AgentInspectMessageTextResponse, AgentInspectMetricsResponse, AgentInspectRunControlResponse, AgentInspectRunSettingsArg, AgentInspectRunSettingsResponse, AgentInspectSandboxResponse, AgentInspectToolCallReplayResponse, AgentInspectToolCallResultResponse, AgentInspectTraceArg, AgentInspectTraceResponse, AgentInspectTruncateArg, AgentInspectTruncateResponse } from "./agent-inspect-types";
4
+ /** The cache tag type of the inspection reads (ids `LIST`, `METRICS`, `CONVERSATION`). */
5
+ export declare const AGENT_INSPECT_TAG = "AdminUiAgentInspect";
6
+ /**
7
+ * The hooks `createAgentInspectApi` returns; the conversation screens take them as `api`. Every read of one
8
+ * conversation carries the tag `CONVERSATION`, so an admin action (drive, truncate, run settings, cancel, stop)
9
+ * refreshes the open detail, the list and the metrics.
10
+ */
11
+ export interface AgentInspectApi {
12
+ /** `GET /list`: a page of conversations with the labels of their accounts and spaces. */
13
+ useConversationsQuery: ApiQueryHook<AgentInspectListArg, AgentInspectConversationsResponse>;
14
+ /** `GET /metrics`: the figures of the period and of the period before. */
15
+ useMetricsQuery: ApiQueryHook<AgentInspectListArg, AgentInspectMetricsResponse>;
16
+ /** `GET /{id}`: the header of one conversation. */
17
+ useConversationQuery: ApiQueryHook<AgentInspectConversationArg, AgentInspectConversationResponse>;
18
+ /** `GET /{id}/trace`: a window of turns with their steps (`mapAgentInspectTrace` reads the answer). */
19
+ useTraceQuery: ApiQueryHook<AgentInspectTraceArg, AgentInspectTraceResponse>;
20
+ /** `GET /{id}/delegations` (`mapAgentInspectDelegationTree`). */
21
+ useDelegationsQuery: ApiQueryHook<AgentInspectConversationArg, AgentInspectDelegationsResponse>;
22
+ /** `GET /{id}/fileChanges` (`mapAgentInspectFileChanges`). */
23
+ useFileChangesQuery: ApiQueryHook<AgentInspectConversationArg, AgentInspectFileChangesResponse>;
24
+ /** `GET /{id}/fileChanges/{fileChangeId}/diff`: the whole diff of one change. */
25
+ useFileChangeDiffQuery: ApiQueryHook<AgentInspectFileChangeArg, AgentInspectFileChangeDiffResponse>;
26
+ /** `GET /{id}/sandbox` (`mapAgentInspectSandboxChronicle`). */
27
+ useSandboxQuery: ApiQueryHook<AgentInspectConversationArg, AgentInspectSandboxResponse>;
28
+ /** `GET /{id}/compactionNodes`. */
29
+ useCompactionNodesQuery: ApiQueryHook<AgentInspectConversationArg, AgentInspectCompactionNodesResponse>;
30
+ /** `GET /{id}/toolCalls/{messageId}/result`: the whole stored result of a tool call. */
31
+ useToolCallResultQuery: ApiQueryHook<AgentInspectMessageRouteArg, AgentInspectToolCallResultResponse>;
32
+ /** `GET /{id}/messages/{messageId}/text`: the whole text of a message the trace cut (`mapAgentInspectMessageText`). */
33
+ useMessageTextQuery: ApiQueryHook<AgentInspectMessageRouteArg, AgentInspectMessageTextResponse>;
34
+ /** `POST /{id}/drive`: writes a message as admin and runs a turn. */
35
+ useDriveMutation: ApiMutationHook<AgentInspectDriveArg, AgentInspectDriveResponse>;
36
+ /** `POST /{id}/truncate`: truncates from a position. */
37
+ useTruncateMutation: ApiMutationHook<AgentInspectTruncateArg, AgentInspectTruncateResponse>;
38
+ /** `POST /{id}/runSettings`: sets run settings on the conversation. */
39
+ useRunSettingsMutation: ApiMutationHook<AgentInspectRunSettingsArg, AgentInspectRunSettingsResponse>;
40
+ /** `POST /{id}/toolCalls/{messageId}/replay`: runs a reading tool again with the stored arguments. */
41
+ useReplayToolCallMutation: ApiMutationHook<AgentInspectMessageRouteArg, AgentInspectToolCallReplayResponse>;
42
+ /** `POST /{id}/cancel`: asks the running turn to end at its next step. */
43
+ useCancelRunMutation: ApiMutationHook<AgentInspectConversationArg, AgentInspectRunControlResponse>;
44
+ /** `POST /{id}/stop`: ends the run at once. */
45
+ useStopRunMutation: ApiMutationHook<AgentInspectConversationArg, AgentInspectRunControlResponse>;
46
+ /** The context composition and the sent payload of a message's model call, for the context panels. */
47
+ context: AgentInspectContextApi;
48
+ }
49
+ export interface CreateAgentInspectApiOptions {
50
+ /** The host's RTK Query api (`createApi` with the React hooks module). */
51
+ baseApi: InjectableBaseApi;
52
+ /** Where the host mounts the inspection and drive traits, without a trailing slash (`/api/admin/ai/agentInspect`). */
53
+ apiPrefix: string;
54
+ }
55
+ /** The query string of the list and the metrics: the filters as the request DTO names them, lists comma-separated. */
56
+ export declare const buildAgentInspectListQuery: (arg?: AgentInspectListArg, withPaging?: boolean) => string;
57
+ /** The request of every operation, on `apiPrefix`. Pure: no RTK runtime. */
58
+ export declare const buildAgentInspectRequests: (apiPrefix: string) => {
59
+ conversations: (arg?: AgentInspectListArg) => InjectedRequest;
60
+ metrics: (arg?: AgentInspectListArg) => InjectedRequest;
61
+ conversation: (arg: AgentInspectConversationArg) => InjectedRequest;
62
+ trace: (arg: AgentInspectTraceArg) => InjectedRequest;
63
+ delegations: (arg: AgentInspectConversationArg) => InjectedRequest;
64
+ fileChanges: (arg: AgentInspectConversationArg) => InjectedRequest;
65
+ fileChangeDiff: (arg: AgentInspectFileChangeArg) => InjectedRequest;
66
+ sandbox: (arg: AgentInspectConversationArg) => InjectedRequest;
67
+ compactionNodes: (arg: AgentInspectConversationArg) => InjectedRequest;
68
+ toolCallResult: (arg: AgentInspectMessageRouteArg) => InjectedRequest;
69
+ messageText: (arg: AgentInspectMessageRouteArg) => InjectedRequest;
70
+ drive: ({ conversationId, ...body }: AgentInspectDriveArg) => InjectedRequest;
71
+ truncate: ({ conversationId, fromIndex }: AgentInspectTruncateArg) => InjectedRequest;
72
+ runSettings: ({ conversationId, runSettingsOverride }: AgentInspectRunSettingsArg) => InjectedRequest;
73
+ replayToolCall: (arg: AgentInspectMessageRouteArg) => InjectedRequest;
74
+ cancelRun: (arg: AgentInspectConversationArg) => InjectedRequest;
75
+ stopRun: (arg: AgentInspectConversationArg) => InjectedRequest;
76
+ };
77
+ /** The operations as injected. */
78
+ export declare const agentInspectEndpointDefinitions: (apiPrefix: string) => {
79
+ readonly adminUiAgentInspectConversations: {
80
+ readonly kind: "query";
81
+ readonly request: (arg?: AgentInspectListArg) => InjectedRequest;
82
+ readonly providesTags: readonly [{
83
+ readonly type: "AdminUiAgentInspect";
84
+ readonly id: "LIST";
85
+ }];
86
+ };
87
+ readonly adminUiAgentInspectMetrics: {
88
+ readonly kind: "query";
89
+ readonly request: (arg?: AgentInspectListArg) => InjectedRequest;
90
+ readonly providesTags: readonly [{
91
+ readonly type: "AdminUiAgentInspect";
92
+ readonly id: "METRICS";
93
+ }];
94
+ };
95
+ readonly adminUiAgentInspectConversation: {
96
+ readonly kind: "query";
97
+ readonly request: (arg: AgentInspectConversationArg) => InjectedRequest;
98
+ readonly providesTags: readonly [{
99
+ readonly type: "AdminUiAgentInspect";
100
+ readonly id: "CONVERSATION";
101
+ }];
102
+ };
103
+ readonly adminUiAgentInspectTrace: {
104
+ readonly kind: "query";
105
+ readonly request: (arg: AgentInspectTraceArg) => InjectedRequest;
106
+ readonly providesTags: readonly [{
107
+ readonly type: "AdminUiAgentInspect";
108
+ readonly id: "CONVERSATION";
109
+ }];
110
+ };
111
+ readonly adminUiAgentInspectDelegations: {
112
+ readonly kind: "query";
113
+ readonly request: (arg: AgentInspectConversationArg) => InjectedRequest;
114
+ readonly providesTags: readonly [{
115
+ readonly type: "AdminUiAgentInspect";
116
+ readonly id: "CONVERSATION";
117
+ }];
118
+ };
119
+ readonly adminUiAgentInspectFileChanges: {
120
+ readonly kind: "query";
121
+ readonly request: (arg: AgentInspectConversationArg) => InjectedRequest;
122
+ readonly providesTags: readonly [{
123
+ readonly type: "AdminUiAgentInspect";
124
+ readonly id: "CONVERSATION";
125
+ }];
126
+ };
127
+ readonly adminUiAgentInspectFileChangeDiff: {
128
+ readonly kind: "query";
129
+ readonly request: (arg: AgentInspectFileChangeArg) => InjectedRequest;
130
+ };
131
+ readonly adminUiAgentInspectSandbox: {
132
+ readonly kind: "query";
133
+ readonly request: (arg: AgentInspectConversationArg) => InjectedRequest;
134
+ readonly providesTags: readonly [{
135
+ readonly type: "AdminUiAgentInspect";
136
+ readonly id: "CONVERSATION";
137
+ }];
138
+ };
139
+ readonly adminUiAgentInspectCompactionNodes: {
140
+ readonly kind: "query";
141
+ readonly request: (arg: AgentInspectConversationArg) => InjectedRequest;
142
+ readonly providesTags: readonly [{
143
+ readonly type: "AdminUiAgentInspect";
144
+ readonly id: "CONVERSATION";
145
+ }];
146
+ };
147
+ readonly adminUiAgentInspectToolCallResult: {
148
+ readonly kind: "query";
149
+ readonly request: (arg: AgentInspectMessageRouteArg) => InjectedRequest;
150
+ };
151
+ readonly adminUiAgentInspectMessageText: {
152
+ readonly kind: "query";
153
+ readonly request: (arg: AgentInspectMessageRouteArg) => InjectedRequest;
154
+ };
155
+ readonly adminUiAgentInspectDrive: {
156
+ readonly kind: "mutation";
157
+ readonly request: ({ conversationId, ...body }: AgentInspectDriveArg) => InjectedRequest;
158
+ readonly invalidatesTags: readonly [{
159
+ readonly type: "AdminUiAgentInspect";
160
+ readonly id: "CONVERSATION";
161
+ }, {
162
+ readonly type: "AdminUiAgentInspect";
163
+ readonly id: "LIST";
164
+ }, {
165
+ readonly type: "AdminUiAgentInspect";
166
+ readonly id: "METRICS";
167
+ }];
168
+ };
169
+ readonly adminUiAgentInspectTruncate: {
170
+ readonly kind: "mutation";
171
+ readonly request: ({ conversationId, fromIndex }: AgentInspectTruncateArg) => InjectedRequest;
172
+ readonly invalidatesTags: readonly [{
173
+ readonly type: "AdminUiAgentInspect";
174
+ readonly id: "CONVERSATION";
175
+ }, {
176
+ readonly type: "AdminUiAgentInspect";
177
+ readonly id: "LIST";
178
+ }, {
179
+ readonly type: "AdminUiAgentInspect";
180
+ readonly id: "METRICS";
181
+ }];
182
+ };
183
+ readonly adminUiAgentInspectRunSettings: {
184
+ readonly kind: "mutation";
185
+ readonly request: ({ conversationId, runSettingsOverride }: AgentInspectRunSettingsArg) => InjectedRequest;
186
+ readonly invalidatesTags: readonly [{
187
+ readonly type: "AdminUiAgentInspect";
188
+ readonly id: "CONVERSATION";
189
+ }, {
190
+ readonly type: "AdminUiAgentInspect";
191
+ readonly id: "LIST";
192
+ }, {
193
+ readonly type: "AdminUiAgentInspect";
194
+ readonly id: "METRICS";
195
+ }];
196
+ };
197
+ readonly adminUiAgentInspectReplayToolCall: {
198
+ readonly kind: "mutation";
199
+ readonly request: (arg: AgentInspectMessageRouteArg) => InjectedRequest;
200
+ };
201
+ readonly adminUiAgentInspectCancelRun: {
202
+ readonly kind: "mutation";
203
+ readonly request: (arg: AgentInspectConversationArg) => InjectedRequest;
204
+ readonly invalidatesTags: readonly [{
205
+ readonly type: "AdminUiAgentInspect";
206
+ readonly id: "CONVERSATION";
207
+ }, {
208
+ readonly type: "AdminUiAgentInspect";
209
+ readonly id: "LIST";
210
+ }, {
211
+ readonly type: "AdminUiAgentInspect";
212
+ readonly id: "METRICS";
213
+ }];
214
+ };
215
+ readonly adminUiAgentInspectStopRun: {
216
+ readonly kind: "mutation";
217
+ readonly request: (arg: AgentInspectConversationArg) => InjectedRequest;
218
+ readonly invalidatesTags: readonly [{
219
+ readonly type: "AdminUiAgentInspect";
220
+ readonly id: "CONVERSATION";
221
+ }, {
222
+ readonly type: "AdminUiAgentInspect";
223
+ readonly id: "LIST";
224
+ }, {
225
+ readonly type: "AdminUiAgentInspect";
226
+ readonly id: "METRICS";
227
+ }];
228
+ };
229
+ };
230
+ /**
231
+ * Injects the inspection and drive operations into the host's RTK Query api and returns their hooks. Call it once at
232
+ * module scope:
233
+ * `export const agentInspectApi = createAgentInspectApi({ baseApi: adminApi, apiPrefix: "/api/admin/ai/agentInspect" });`
234
+ */
235
+ export declare const createAgentInspectApi: ({ baseApi, apiPrefix }: CreateAgentInspectApiOptions) => AgentInspectApi;
236
+ type StaticAnswer<TArg, TData> = (arg: TArg) => TData | StaticQueryFailure | undefined;
237
+ /** Fixed answers of a `createStaticAgentInspectApi`; a query without one stays loading, a mutation without one answers `{}`. */
238
+ export interface StaticAgentInspectData extends StaticAgentInspectContextData {
239
+ conversations?: StaticAnswer<AgentInspectListArg, AgentInspectConversationsResponse>;
240
+ metrics?: StaticAnswer<AgentInspectListArg, AgentInspectMetricsResponse>;
241
+ conversation?: StaticAnswer<AgentInspectConversationArg, AgentInspectConversationResponse>;
242
+ trace?: StaticAnswer<AgentInspectTraceArg, AgentInspectTraceResponse>;
243
+ delegations?: StaticAnswer<AgentInspectConversationArg, AgentInspectDelegationsResponse>;
244
+ fileChanges?: StaticAnswer<AgentInspectConversationArg, AgentInspectFileChangesResponse>;
245
+ fileChangeDiff?: StaticAnswer<AgentInspectFileChangeArg, AgentInspectFileChangeDiffResponse>;
246
+ sandbox?: StaticAnswer<AgentInspectConversationArg, AgentInspectSandboxResponse>;
247
+ compactionNodes?: StaticAnswer<AgentInspectConversationArg, AgentInspectCompactionNodesResponse>;
248
+ toolCallResult?: StaticAnswer<AgentInspectMessageRouteArg, AgentInspectToolCallResultResponse>;
249
+ messageText?: StaticAnswer<AgentInspectMessageRouteArg, AgentInspectMessageTextResponse>;
250
+ drive?: (arg: AgentInspectDriveArg) => AgentInspectDriveResponse;
251
+ truncate?: (arg: AgentInspectTruncateArg) => AgentInspectTruncateResponse;
252
+ runSettings?: (arg: AgentInspectRunSettingsArg) => AgentInspectRunSettingsResponse;
253
+ replayToolCall?: (arg: AgentInspectMessageRouteArg) => AgentInspectToolCallReplayResponse;
254
+ cancelRun?: (arg: AgentInspectConversationArg) => AgentInspectRunControlResponse;
255
+ stopRun?: (arg: AgentInspectConversationArg) => AgentInspectRunControlResponse;
256
+ }
257
+ /** An `AgentInspectApi` answering fixed payloads, without a store or a request (previews, tests, reviews). */
258
+ export declare const createStaticAgentInspectApi: (data: StaticAgentInspectData) => AgentInspectApi;
259
+ export {};
@@ -0,0 +1,23 @@
1
+ import type { AgentInspectCompactionNode, AgentInspectDelegationsResponse, AgentInspectDelegationTree, AgentInspectFileChange, AgentInspectFileChangesResponse, AgentInspectMessage, AgentInspectMessageTextResponse, AgentInspectSandboxChronicle, AgentInspectSandboxResponse, AgentInspectStep, AgentInspectSubAgent, AgentInspectTrace, AgentInspectTraceResponse, AgentInspectTurn } from "./agent-inspect-types";
2
+ /** The elements of a list that arrives as an array or as a set. */
3
+ export declare const readInspectList: (value: unknown) => unknown[];
4
+ /** An `AgentTraceFileChange` with the facts the files table reads. */
5
+ export declare const mapAgentInspectFileChange: (wireFileChange: unknown) => AgentInspectFileChange | null;
6
+ /** `GET /{id}/fileChanges`: the file changes, oldest first. */
7
+ export declare const mapAgentInspectFileChanges: (response: AgentInspectFileChangesResponse | null | undefined) => AgentInspectFileChange[];
8
+ /** An `AgentTraceSubAgent` outside a step (the delegation tree). */
9
+ export declare const mapAgentInspectSubAgent: (wireSubAgent: unknown) => AgentInspectSubAgent | null;
10
+ /** A compaction node as sent; null for anything else. */
11
+ export declare const mapAgentInspectCompactionNode: (wireNode: unknown) => AgentInspectCompactionNode | null;
12
+ /** An `AgentTraceStep`: the contract's step and the admin facts; null for a step of an unknown kind. */
13
+ export declare const mapAgentInspectStep: (wireStep: unknown, position: number, turnNumber?: number | null) => AgentInspectStep | null;
14
+ /** An `AgentTurnTrace`. */
15
+ export declare const mapAgentInspectTurn: (wireTurn: unknown) => AgentInspectTurn | null;
16
+ /** `GET /{id}/messages/{messageId}/text`: the message with its whole text; null for an answer without one. */
17
+ export declare const mapAgentInspectMessageText: (response: AgentInspectMessageTextResponse | null | undefined) => AgentInspectMessage | null;
18
+ /** `GET /{id}/trace`; an answer without turns reads as an empty trace. */
19
+ export declare const mapAgentInspectTrace: (response: AgentInspectTraceResponse | null | undefined) => AgentInspectTrace;
20
+ /** `GET /{id}/delegations`. */
21
+ export declare const mapAgentInspectDelegationTree: (response: AgentInspectDelegationsResponse | null | undefined) => AgentInspectDelegationTree;
22
+ /** `GET /{id}/sandbox`. */
23
+ export declare const mapAgentInspectSandboxChronicle: (response: AgentInspectSandboxResponse | null | undefined) => AgentInspectSandboxChronicle;