@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.
- package/README.md +138 -6
- package/boundary.json +5 -0
- package/dist/admin.js +13712 -0
- package/dist/admin.js.map +1 -0
- package/dist/chat.js +1627 -109
- package/dist/chat.js.map +1 -1
- package/dist/chunks/{AgentsConversationClientContext-C4T7g_Qk.js → AgentsConversationClientContext-B_UJSLXU.js} +2 -2
- package/dist/chunks/{AgentsConversationClientContext-C4T7g_Qk.js.map → AgentsConversationClientContext-B_UJSLXU.js.map} +1 -1
- package/dist/chunks/{ConversationMarkdown-D-aP3Ssl.js → ConversationMarkdown-DlvwT3Qk.js} +5 -4
- package/dist/chunks/{ConversationMarkdown-D-aP3Ssl.js.map → ConversationMarkdown-DlvwT3Qk.js.map} +1 -1
- package/dist/chunks/{ConversationMessageInputComposerWidgets-7HNAmZE1.js → ConversationMessageInputComposerWidgets-TchR1lPj.js} +6 -6
- package/dist/chunks/{ConversationMessageInputComposerWidgets-7HNAmZE1.js.map → ConversationMessageInputComposerWidgets-TchR1lPj.js.map} +1 -1
- package/dist/chunks/{VoiceBarsIcon-FhLAcgLG.js → VoiceBarsIcon-y3mgSqbn.js} +4 -4
- package/dist/chunks/{VoiceBarsIcon-FhLAcgLG.js.map → VoiceBarsIcon-y3mgSqbn.js.map} +1 -1
- package/dist/chunks/{WebSearchResultsConversationWidget-dEq19U7k.js → WebSearchResultsConversationWidget-l9Aek_lG.js} +3 -2
- package/dist/chunks/WebSearchResultsConversationWidget-l9Aek_lG.js.map +1 -0
- package/dist/chunks/agents-http-trace-mappers-LWNi-3a4.js +759 -0
- package/dist/chunks/agents-http-trace-mappers-LWNi-3a4.js.map +1 -0
- package/dist/chunks/{browser-request-interception-ydNOzeUL.js → browser-request-interception-D678IemW.js} +2 -2
- package/dist/chunks/{browser-request-interception-ydNOzeUL.js.map → browser-request-interception-D678IemW.js.map} +1 -1
- package/dist/chunks/{canvas-reducers-BInd3xNz.js → canvas-reducers-BYArW_Ji.js} +2 -2
- package/dist/chunks/{canvas-reducers-BInd3xNz.js.map → canvas-reducers-BYArW_Ji.js.map} +1 -1
- package/dist/chunks/{canvas-title-slot-context-BI1PLnPn.js → canvas-title-slot-context-BRGnFzYP.js} +3 -3
- package/dist/chunks/{canvas-title-slot-context-BI1PLnPn.js.map → canvas-title-slot-context-BRGnFzYP.js.map} +1 -1
- package/dist/chunks/{canvasBodies-CRVh8pCw.js → canvasBodies-BjXypuHf.js} +4 -4
- package/dist/chunks/{canvasBodies-CRVh8pCw.js.map → canvasBodies-BjXypuHf.js.map} +1 -1
- package/dist/chunks/{canvasStorage-Cr3omZeI.js → canvasStorage-DSspwRMg.js} +2 -2
- package/dist/chunks/{canvasStorage-Cr3omZeI.js.map → canvasStorage-DSspwRMg.js.map} +1 -1
- package/dist/chunks/content-from-unified-diff-CovnmG2Q.js +2927 -0
- package/dist/chunks/content-from-unified-diff-CovnmG2Q.js.map +1 -0
- package/dist/chunks/{contract-C18owGKs.js → contract-886XjdID.js} +2 -2
- package/dist/chunks/{contract-C18owGKs.js.map → contract-886XjdID.js.map} +1 -1
- package/dist/chunks/{conversation-CbWEHPbL.js → conversation-B7-evdj_.js} +4 -4
- package/dist/chunks/{conversation-CbWEHPbL.js.map → conversation-B7-evdj_.js.map} +1 -1
- package/dist/chunks/{icon-names-Di6c4zLo.js → icon-names-C5PeVvkJ.js} +32 -1
- package/dist/chunks/icon-names-C5PeVvkJ.js.map +1 -0
- package/dist/chunks/{link-navigation-DRHt6g7U.js → index-DZovGMpG.js} +65 -106
- package/dist/chunks/index-DZovGMpG.js.map +1 -0
- package/dist/chunks/link-navigation-a_sRfmsj.js +49 -0
- package/dist/chunks/link-navigation-a_sRfmsj.js.map +1 -0
- package/dist/chunks/{widget-name-resolver-Dq6Ejo7d.js → widget-name-resolver-DS3zH_5W.js} +5 -4
- package/dist/chunks/{widget-name-resolver-Dq6Ejo7d.js.map → widget-name-resolver-DS3zH_5W.js.map} +1 -1
- package/dist/chunks/{withPollingChangeSubscription-ClyOABgu.js → withPollingChangeSubscription-XvCpjGmd.js} +13 -2
- package/dist/chunks/{withPollingChangeSubscription-ClyOABgu.js.map → withPollingChangeSubscription-XvCpjGmd.js.map} +1 -1
- package/dist/client-testing.js +5 -5
- package/dist/client.js +50 -231
- package/dist/client.js.map +1 -1
- package/dist/contract.js +5 -5
- package/dist/files/i18n-keys.json +18091 -1287
- package/dist/files/widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.md +3 -3
- package/dist/image-render.js +7 -7
- package/dist/index.js +62 -61
- package/dist/index.js.map +1 -1
- package/dist/kit.js +2 -2
- package/dist/preview.js +7 -7
- package/dist/provider.js +57 -56
- package/dist/provider.js.map +1 -1
- package/dist/renderer.js +15 -15
- package/dist/styles.css +2962 -15
- package/dist/types/admin/blocks/CodeBlock.d.ts +28 -0
- package/dist/types/admin/blocks/DetailModal.d.ts +34 -0
- package/dist/types/admin/blocks/Disclosure.d.ts +25 -0
- package/dist/types/admin/blocks/JsonTree.d.ts +18 -0
- package/dist/types/admin/blocks/LineDiffView.d.ts +18 -0
- package/dist/types/admin/blocks/ProportionBar.d.ts +43 -0
- package/dist/types/admin/blocks/TokenFigure.d.ts +14 -0
- package/dist/types/admin/blocks/json-tree.d.ts +40 -0
- package/dist/types/admin/blocks/line-diff.d.ts +46 -0
- package/dist/types/admin/blocks/proportion-bar.d.ts +34 -0
- package/dist/types/admin/blocks/series-fill-classes.d.ts +13 -0
- package/dist/types/admin/blocks/token-figure.d.ts +8 -0
- package/dist/types/admin/connections/AgentConnectionCard.d.ts +21 -0
- package/dist/types/admin/connections/AgentConnectionDriveRootSpaces.d.ts +25 -0
- package/dist/types/admin/connections/AgentConnectionDriveScopeDialog.d.ts +20 -0
- package/dist/types/admin/connections/AgentConnectionDriveSearchFilters.d.ts +34 -0
- package/dist/types/admin/connections/AgentConnectionDrivesDrawer.d.ts +39 -0
- package/dist/types/admin/connections/AgentConnectionLevelsDrawer.d.ts +27 -0
- package/dist/types/admin/connections/AgentConnectionSharingDialog.d.ts +12 -0
- package/dist/types/admin/connections/AgentConnectionsPanel.d.ts +97 -0
- package/dist/types/admin/connections/AgentConnectionsScreen.d.ts +18 -0
- package/dist/types/admin/connections/ConnectDialogs.d.ts +22 -0
- package/dist/types/admin/connections/agent-connection-drive-scope.d.ts +112 -0
- package/dist/types/admin/connections/agent-connection-drives.d.ts +107 -0
- package/dist/types/admin/connections/agent-connection-format.d.ts +82 -0
- package/dist/types/admin/connections/agent-connection-oauth.d.ts +122 -0
- package/dist/types/admin/connections/agent-connections-api.d.ts +420 -0
- package/dist/types/admin/connections/agent-connections-context.d.ts +60 -0
- package/dist/types/admin/connections/agent-connections-types.d.ts +447 -0
- package/dist/types/admin/connections/connection-logos.d.ts +53 -0
- package/dist/types/admin/connections/connection-parts.d.ts +84 -0
- package/dist/types/admin/connections/use-agent-connect.d.ts +25 -0
- package/dist/types/admin/context/CompactionThresholdBanner.d.ts +13 -0
- package/dist/types/admin/context/ContextCompositionPanel.d.ts +27 -0
- package/dist/types/admin/context/ContextSegmentList.d.ts +20 -0
- package/dist/types/admin/context/SentPayloadPanel.d.ts +37 -0
- package/dist/types/admin/context/agent-inspect-context-api.d.ts +53 -0
- package/dist/types/admin/context/agent-inspect-context-types.d.ts +98 -0
- package/dist/types/admin/context/context-composition-grouping.d.ts +78 -0
- package/dist/types/admin/context/context-segment-families.d.ts +18 -0
- package/dist/types/admin/context/context-segment-label-texts.d.ts +19 -0
- package/dist/types/admin/context/context-segment-labels.d.ts +18 -0
- package/dist/types/admin/control-panel/AgentControlPanelScreen.d.ts +71 -0
- package/dist/types/admin/control-panel/BudgetsTab.d.ts +13 -0
- package/dist/types/admin/control-panel/SettingsTab.d.ts +22 -0
- package/dist/types/admin/control-panel/SpacesTab.d.ts +24 -0
- package/dist/types/admin/control-panel/StatisticsTab.d.ts +26 -0
- package/dist/types/admin/control-panel/TimeSeriesChartCard.d.ts +37 -0
- package/dist/types/admin/control-panel/ToolResponseSamplesDrawer.d.ts +22 -0
- package/dist/types/admin/control-panel/agent-control-panel-api.d.ts +104 -0
- package/dist/types/admin/control-panel/agent-control-panel-types.d.ts +241 -0
- package/dist/types/admin/control-panel/budget-meters.d.ts +35 -0
- package/dist/types/admin/control-panel/control-panel-statistics.d.ts +49 -0
- package/dist/types/admin/control-panel/runtime-settings-form.d.ts +44 -0
- package/dist/types/admin/control-panel/time-series-chart.d.ts +54 -0
- package/dist/types/admin/conversations/AgentConversationDetailScreen.d.ts +128 -0
- package/dist/types/admin/conversations/AgentConversationsScreen.d.ts +60 -0
- package/dist/types/admin/conversations/ContextPanel.d.ts +9 -0
- package/dist/types/admin/conversations/ConversationActions.d.ts +32 -0
- package/dist/types/admin/conversations/ConversationTurns.d.ts +56 -0
- package/dist/types/admin/conversations/DebugSwitchBar.d.ts +23 -0
- package/dist/types/admin/conversations/DelegationPanel.d.ts +6 -0
- package/dist/types/admin/conversations/ModelContextDialog.d.ts +31 -0
- package/dist/types/admin/conversations/RequestCompositionRows.d.ts +14 -0
- package/dist/types/admin/conversations/RequestsPanel.d.ts +21 -0
- package/dist/types/admin/conversations/SandboxPanel.d.ts +42 -0
- package/dist/types/admin/conversations/StepDetailDialog.d.ts +19 -0
- package/dist/types/admin/conversations/agent-inspect-api.d.ts +259 -0
- package/dist/types/admin/conversations/agent-inspect-mappers.d.ts +23 -0
- package/dist/types/admin/conversations/agent-inspect-types.d.ts +517 -0
- package/dist/types/admin/conversations/conversation-list-export.d.ts +64 -0
- package/dist/types/admin/conversations/conversation-list-filters.d.ts +59 -0
- package/dist/types/admin/conversations/debug-switches.d.ts +27 -0
- package/dist/types/admin/conversations/delegation-swimlanes.d.ts +78 -0
- package/dist/types/admin/conversations/header-facts.d.ts +23 -0
- package/dist/types/admin/conversations/inspect-format.d.ts +44 -0
- package/dist/types/admin/conversations/inspect-parts.d.ts +42 -0
- package/dist/types/admin/conversations/inspect-scope.d.ts +92 -0
- package/dist/types/admin/conversations/model-call-rows.d.ts +78 -0
- package/dist/types/admin/conversations/step-descriptions.d.ts +43 -0
- package/dist/types/admin/conversations/touched-files-tree.d.ts +47 -0
- package/dist/types/admin/conversations/turn-paging.d.ts +56 -0
- package/dist/types/admin/conversations/turn-segments.d.ts +36 -0
- package/dist/types/admin/conversations/turn-timeline.d.ts +22 -0
- package/dist/types/admin/conversations/use-query-loader.d.ts +8 -0
- package/dist/types/admin/period/AdminPeriodControl.d.ts +15 -0
- package/dist/types/admin/period/admin-period.d.ts +51 -0
- package/dist/types/admin/quality/AgentQualityEvalRunScreen.d.ts +30 -0
- package/dist/types/admin/quality/AgentQualityScreen.d.ts +38 -0
- package/dist/types/admin/quality/SaveAsEvalCaseDialog.d.ts +27 -0
- package/dist/types/admin/quality/agent-quality-api.d.ts +86 -0
- package/dist/types/admin/quality/agent-quality-format.d.ts +52 -0
- package/dist/types/admin/quality/agent-quality-types.d.ts +161 -0
- package/dist/types/admin/schedules/AgentSchedulesPanel.d.ts +43 -0
- package/dist/types/admin/schedules/agent-schedules-api.d.ts +116 -0
- package/dist/types/admin/schedules/agent-schedules-format.d.ts +25 -0
- package/dist/types/admin/schedules/agent-schedules-types.d.ts +113 -0
- package/dist/types/admin/shared/AdminHrefLink.d.ts +13 -0
- package/dist/types/admin/skills/AgentSkillCatalogScreen.d.ts +51 -0
- package/dist/types/admin/skills/SharedBlocksPanel.d.ts +14 -0
- package/dist/types/admin/skills/SkillPurposesPanel.d.ts +16 -0
- package/dist/types/admin/skills/SkillTreeRowView.d.ts +31 -0
- package/dist/types/admin/skills/ToolSchemaDrawer.d.ts +21 -0
- package/dist/types/admin/skills/agent-skill-catalog-api.d.ts +89 -0
- package/dist/types/admin/skills/agent-skill-catalog-types.d.ts +223 -0
- package/dist/types/admin/skills/skill-catalog-colors.d.ts +10 -0
- package/dist/types/admin/skills/skill-catalog-tree.d.ts +159 -0
- package/dist/types/admin/skills/skill-purpose-texts.d.ts +11 -0
- package/dist/types/admin/wire/admin-wire.d.ts +21 -0
- package/dist/types/chat/controller/AgentChatController.d.ts +22 -0
- package/dist/types/chat/controller/turn-initiators.d.ts +21 -0
- package/dist/types/chat/trace/BackgroundTasksList.d.ts +35 -0
- package/dist/types/chat/trace/ChangeSetCard.d.ts +34 -0
- package/dist/types/chat/trace/ChangedFilesPane.d.ts +33 -0
- package/dist/types/chat/trace/ChangedRecordsList.d.ts +34 -0
- package/dist/types/chat/trace/ConsentRequestCard.d.ts +23 -0
- package/dist/types/chat/trace/ContextRing.d.ts +19 -0
- package/dist/types/chat/trace/ConversationChildTrace.d.ts +18 -0
- package/dist/types/chat/trace/ConversationTurnTrace.d.ts +48 -0
- package/dist/types/chat/trace/EntityChip.d.ts +23 -0
- package/dist/types/chat/trace/FileChangesSummary.d.ts +14 -0
- package/dist/types/chat/trace/FileEditBlock.d.ts +42 -0
- package/dist/types/chat/trace/LoadedSkillsDisclosure.d.ts +16 -0
- package/dist/types/chat/trace/QueuedMessageChip.d.ts +17 -0
- package/dist/types/chat/trace/RunStatusLine.d.ts +27 -0
- package/dist/types/chat/trace/StepKindDetails.d.ts +59 -0
- package/dist/types/chat/trace/SubAgentStepGroup.d.ts +53 -0
- package/dist/types/chat/trace/TaskPlanPane.d.ts +31 -0
- package/dist/types/chat/trace/TaskPlanRow.d.ts +28 -0
- package/dist/types/chat/trace/TerminalBlock.d.ts +16 -0
- package/dist/types/chat/trace/ThinkingBlock.d.ts +19 -0
- package/dist/types/chat/trace/ToolStepDetail.d.ts +49 -0
- package/dist/types/chat/trace/ToolStepGroup.d.ts +58 -0
- package/dist/types/chat/trace/ToolStepRow.d.ts +52 -0
- package/dist/types/chat/trace/TraceViewModeSwitch.d.ts +14 -0
- package/dist/types/chat/trace/TurnMetaLine.d.ts +27 -0
- package/dist/types/chat/trace/content-from-unified-diff.d.ts +25 -0
- package/dist/types/chat/trace/conversation-trace-loader.d.ts +133 -0
- package/dist/types/chat/trace/index.d.ts +34 -0
- package/dist/types/chat/trace/parse-unified-diff.d.ts +51 -0
- package/dist/types/chat/trace/task-plan-counts.d.ts +41 -0
- package/dist/types/chat/trace/trace-collect.d.ts +91 -0
- package/dist/types/chat/trace/trace-counts.d.ts +21 -0
- package/dist/types/chat/trace/trace-format.d.ts +73 -0
- package/dist/types/chat/trace/trace-labels.d.ts +60 -0
- package/dist/types/chat/trace/trace-parts.d.ts +63 -0
- package/dist/types/chat/trace/trace-step-focus.d.ts +12 -0
- package/dist/types/chat/trace/trace-types.d.ts +370 -0
- package/dist/types/chat/trace/use-conversation-trace.d.ts +47 -0
- package/dist/types/client/AgentsConversationClient.d.ts +20 -0
- package/dist/types/client/http/agents-http-trace-mappers.d.ts +31 -0
- package/dist/types/client/http/agents-http-trace-wire.d.ts +433 -0
- package/dist/types/contract/conversation-trace.d.ts +594 -0
- package/dist/types/entries/admin.d.ts +85 -0
- package/dist/types/entries/chat.d.ts +3 -1
- package/dist/types/entries/client.d.ts +2 -0
- package/dist/types/entries/contract.d.ts +1 -0
- package/dist/types/provider/components/icon-names.d.ts +4 -2
- package/dist/types/provider/components/types.d.ts +3 -1
- package/dist/types/widgets/DriveFilesConversationWidget/shared/drive-files.d.ts +1 -1
- package/dist/voice.js +3 -3
- package/dist/widgets.js +6 -6
- package/package.json +7 -3
- package/public-api.json +1036 -3
- package/dist/chunks/WebSearchResultsConversationWidget-dEq19U7k.js.map +0 -1
- package/dist/chunks/icon-names-Di6c4zLo.js.map +0 -1
- package/dist/chunks/link-navigation-DRHt6g7U.js.map +0 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { type UrlStateAdapter } from "@mgamadeus/ddd-admin-ui/logic";
|
|
2
|
+
import { type EntityDetailBack } from "@mgamadeus/ddd-admin-ui/page";
|
|
3
|
+
import { type PageLinkComponent } from "@mgamadeus/ddd-admin-ui/primitives";
|
|
4
|
+
import type { CodeHighlighterLoader } from "@mgamadeus/ddd-admin-ui/files";
|
|
5
|
+
import { type ReactNode } from "react";
|
|
6
|
+
import type { TraceDescribeMount, TraceEntityDescription, TraceEntityReference, TraceFileChange } from "../../chat/trace/trace-types";
|
|
7
|
+
import type { AgentQualityApi } from "../quality/agent-quality-api";
|
|
8
|
+
import type { AgentInspectApi } from "./agent-inspect-api";
|
|
9
|
+
import type { AgentInspectConversationHeader } from "./agent-inspect-types";
|
|
10
|
+
import { type AgentInspectDebugSwitches } from "./debug-switches";
|
|
11
|
+
import { type AgentTraceFrameAttributes } from "./inspect-parts";
|
|
12
|
+
import { type AgentInspectScope } from "./inspect-scope";
|
|
13
|
+
/** The tabs of the conversation detail, in order. */
|
|
14
|
+
export declare const AGENT_CONVERSATION_DETAIL_TABS: readonly ["conversation", "delegation", "sandbox", "files", "requests", "context"];
|
|
15
|
+
export type AgentConversationDetailTab = (typeof AGENT_CONVERSATION_DETAIL_TABS)[number];
|
|
16
|
+
/**
|
|
17
|
+
* What the detail keeps in the URL: the tab, the debug switch, the view mode of the steps, the switches of the debug
|
|
18
|
+
* bar (unless the host keeps them, `debugSwitches`) and its truncated rows, the model call whose context is open (`call` = its message id, `callView` = `payload`), the message
|
|
19
|
+
* a link names (`message`: its turn is marked and scrolled to), the step whose detail is open (`step` = its id) and
|
|
20
|
+
* the file of the sandbox and files tabs (`file` = its path, `change` = the id of one of its changes).
|
|
21
|
+
*/
|
|
22
|
+
export declare const AGENT_CONVERSATION_DETAIL_KEYS: readonly ["tab", "debug", "view", "switches", "truncated", "call", "callView", "message", "step", "file", "change"];
|
|
23
|
+
/**
|
|
24
|
+
* The query of a link to a file of a conversation's sandbox tab: `tab=sandbox&file=<path>&change=<id>`. A host adds
|
|
25
|
+
* it to its route of the conversation detail; the tab opens with that file picked and that change shown.
|
|
26
|
+
*/
|
|
27
|
+
export declare const buildAgentConversationSandboxQuery: ({ path, fileChangeId }: {
|
|
28
|
+
path?: string | null;
|
|
29
|
+
fileChangeId?: number | null;
|
|
30
|
+
}) => string;
|
|
31
|
+
export interface AgentConversationDetailScreenProps {
|
|
32
|
+
/** The hooks of the inspection routes (`createAgentInspectApi`, or `createStaticAgentInspectApi` over fixtures). */
|
|
33
|
+
api: AgentInspectApi;
|
|
34
|
+
conversationId: number;
|
|
35
|
+
/** Where the tab, the debug switch and the open model call are kept (the host's URL adapter). */
|
|
36
|
+
urlStateAdapter: UrlStateAdapter;
|
|
37
|
+
/** The list the back button leads to. */
|
|
38
|
+
back?: EntityDetailBack;
|
|
39
|
+
/** The app's router link; default the admin UI provider's. */
|
|
40
|
+
linkComponent?: PageLinkComponent;
|
|
41
|
+
/** The detail route of another conversation (a sub-agent's, the parent's); without it they are not linked. */
|
|
42
|
+
buildConversationHref?: (conversationId: number) => string | null;
|
|
43
|
+
/** The record behind an id argument of a tool call, as a chip (`describeEntity` of the trace blocks). */
|
|
44
|
+
describeEntity?: (reference: TraceEntityReference) => TraceEntityDescription | null;
|
|
45
|
+
/** The detail route of the record behind an id argument (`worldId`, 12); null for an argument without a screen. */
|
|
46
|
+
buildEntityHref?: (argumentName: string, id: number) => string | null;
|
|
47
|
+
/** The host's label and tint of a mount of the sandbox. */
|
|
48
|
+
describeMount?: TraceDescribeMount;
|
|
49
|
+
/** Opens a changed file in the host's viewer. */
|
|
50
|
+
openFileInViewer?: (fileChange: TraceFileChange) => void;
|
|
51
|
+
/** Formats an amount in US dollars; default four digits for small amounts. */
|
|
52
|
+
formatCost?: (costInUsd: number) => string;
|
|
53
|
+
/** Draws the markdown of an answer; without it answers are shown as plain text. */
|
|
54
|
+
renderMarkdown?: (source: string) => ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* The attributes of the element around the chat's trace blocks: the selector the host maps the package's
|
|
57
|
+
* `--agents-*` properties to its theme below (`{ "data-agent-window": "" }` for a host that themes its chat window).
|
|
58
|
+
*/
|
|
59
|
+
traceFrameAttributes?: AgentTraceFrameAttributes;
|
|
60
|
+
/** How the agent is named beside its answers; default "Agent". */
|
|
61
|
+
agentDisplayName?: string;
|
|
62
|
+
/** The reader may switch to the debug level (arguments, results, costs, the sent payload). */
|
|
63
|
+
isDebugAllowed?: boolean;
|
|
64
|
+
/** The reader may drive the conversation: continue as admin, truncate, replay, stop, cancel. */
|
|
65
|
+
isDriveAllowed?: boolean;
|
|
66
|
+
/** False: the drive controls show, disabled (the environment locks writes). */
|
|
67
|
+
writesAllowed?: boolean;
|
|
68
|
+
/** The models "Continue as admin" offers beside the conversation's own. */
|
|
69
|
+
selectableModelNames?: readonly string[];
|
|
70
|
+
/** How often a running conversation is read again, in ms; 0 switches it off. Default 4000. */
|
|
71
|
+
livePollingIntervalMs?: number;
|
|
72
|
+
/** How many turns are read at once. Default 10, at most 100. */
|
|
73
|
+
turnPageSize?: number;
|
|
74
|
+
/** More actions right of the title, before the package's own. */
|
|
75
|
+
headerActions?: ReactNode;
|
|
76
|
+
/**
|
|
77
|
+
* The preview of a changed file as it is stored, for the "Preview" side of the sandbox and files tabs (the host's
|
|
78
|
+
* own file viewer on the stored version, read under the reader's rights). It answers null for a change without a
|
|
79
|
+
* stored version; without the prop the tabs show the diff alone. Its second argument carries `fallback`: the file's
|
|
80
|
+
* content rebuilt from the recorded change (null when the diff does not hold the whole file), which the host shows
|
|
81
|
+
* in place of its own "cannot show this file" state (file gone, no read right, not released by the malware check);
|
|
82
|
+
* for a change the host answers null for, the tabs show that fallback themselves.
|
|
83
|
+
*/
|
|
84
|
+
renderFilePreview?: AgentInspectScope["renderFilePreview"];
|
|
85
|
+
/** The facts of the conversation's live workspace (state, usage, a link to its screen), above the sandbox tab. */
|
|
86
|
+
renderSandboxFacts?: (header: AgentInspectConversationHeader) => ReactNode;
|
|
87
|
+
/** The display name of a model by its catalog name ("GPT-6 Luna"), for the models the trace does not name itself. */
|
|
88
|
+
describeModelName?: (modelName: string) => string | null;
|
|
89
|
+
/** The hooks of the quality routes: with them a debug reader saves a turn as an evaluation case. */
|
|
90
|
+
qualityApi?: Pick<AgentQualityApi, "useDraftEvalCaseMutation">;
|
|
91
|
+
/** Colours the JSON of the evaluation case draft, and the source of a file rebuilt from a recorded change, with the host's highlighter. */
|
|
92
|
+
loadCodeHighlighter?: CodeHighlighterLoader;
|
|
93
|
+
/**
|
|
94
|
+
* The switches of the debug bar, kept by the host (its stored preference, so they hold across conversations); with
|
|
95
|
+
* `onDebugSwitchesChange` the bar is controlled, without it the switches live in the URL (`switches`).
|
|
96
|
+
*/
|
|
97
|
+
debugSwitches?: AgentInspectDebugSwitches;
|
|
98
|
+
onDebugSwitchesChange?: (switches: AgentInspectDebugSwitches) => void;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* One agent conversation for an admin: its facts in the header, a Debug switch for a reader who may, and six tabs
|
|
102
|
+
* kept in the URL.
|
|
103
|
+
*
|
|
104
|
+
* - **Conversation**: turn by turn — the message that started the turn, its steps in the chosen view mode with the
|
|
105
|
+
* texts the assistant wrote between them, the answers. Every text comes from the trace read itself (a long one is
|
|
106
|
+
* cut and read whole on demand), so a host needs no messages read of its own; a turn the owner stopped is marked. A tool reached through `call_tool` shows as that tool (with the quiet "via call_tool" mark in the
|
|
107
|
+
* verbose view); a delegation shows inline at its delegate call and opens the sub-agent's own trace; every model
|
|
108
|
+
* call and every answer opens what the model was sent ("What the model saw"), with Debug also the sent payload.
|
|
109
|
+
* - **Delegation**: totals, batches, a swimlane per sub-agent, a card per sub-agent with its trace.
|
|
110
|
+
* - **Sandbox** (only for a conversation that ran a command or changed a file): chronicle, touched files, the
|
|
111
|
+
* history of the picked file with its preview or its diff. A link names the file and the change
|
|
112
|
+
* (`buildAgentConversationSandboxQuery`).
|
|
113
|
+
* - **Files**: every file change with its preview or its diff.
|
|
114
|
+
* - **Requests** (only for a reader with the debug right): every model call as a row — model, effort, tokens, cache
|
|
115
|
+
* share, cost, duration, how it ended, the tools it called — with the totals; a row opens what the model was sent.
|
|
116
|
+
* - **Context**: the composition of the newest model call and the compaction nodes.
|
|
117
|
+
*
|
|
118
|
+
* Every step of a turn opens to its detail beside the conversation (`?step=<id>`): a side decision with its input and
|
|
119
|
+
* output, a model call with the context of that very call, a tool call with arguments and result. A link to a step
|
|
120
|
+
* the loaded level does not hold (a skill preload, a decision, a model call exist at the debug level only) switches a
|
|
121
|
+
* reader who may to that level, looks through earlier pages, and says plainly when the step cannot be found.
|
|
122
|
+
*
|
|
123
|
+
* Styles: the admin parts use the host's Tailwind tokens. The steps, terminal and diff blocks are the chat's, so the
|
|
124
|
+
* host imports the package stylesheet and its theme mapping once — `import "@mgamadeus/ddd-agents/styles.css"` and
|
|
125
|
+
* the css file that maps the `--agents-*` properties to its tokens — and names the selector of that mapping in
|
|
126
|
+
* `traceFrameAttributes`. The texts of the chat blocks come from the agents environment (`setAgentsEnvironment`).
|
|
127
|
+
*/
|
|
128
|
+
export declare const AgentConversationDetailScreen: ({ api, conversationId, urlStateAdapter, back, linkComponent, buildConversationHref, describeEntity, buildEntityHref, describeMount, openFileInViewer, formatCost, renderMarkdown, traceFrameAttributes, agentDisplayName, isDebugAllowed, isDriveAllowed, writesAllowed, selectableModelNames, livePollingIntervalMs, turnPageSize, headerActions, renderFilePreview, renderSandboxFacts, describeModelName, qualityApi, loadCodeHighlighter, debugSwitches: debugSwitchesOfHost, onDebugSwitchesChange, }: AgentConversationDetailScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type FilterOption } from "@mgamadeus/ddd-admin-ui/list";
|
|
2
|
+
import { type UrlStateAdapter } from "@mgamadeus/ddd-admin-ui/logic";
|
|
3
|
+
import { type PageLinkComponent } from "@mgamadeus/ddd-admin-ui/primitives";
|
|
4
|
+
import { type ReactNode } from "react";
|
|
5
|
+
import type { AgentInspectApi } from "./agent-inspect-api";
|
|
6
|
+
export interface AgentConversationsScreenProps {
|
|
7
|
+
/** `createAgentInspectApi(…)` of the host. */
|
|
8
|
+
api: AgentInspectApi;
|
|
9
|
+
/** The host's URL adapter (`useNextUrlStateAdapter({ listId })`): segment, search, filters and page live in the URL. */
|
|
10
|
+
urlStateAdapter: UrlStateAdapter;
|
|
11
|
+
/** Default "Agent conversations". Already translated. */
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
description?: ReactNode;
|
|
14
|
+
headerActions?: ReactNode;
|
|
15
|
+
/** The route of a conversation's detail; `null` = no link. */
|
|
16
|
+
buildConversationHref?: (conversationId: number) => string | null;
|
|
17
|
+
/** Opens a conversation from a click anywhere on its row (the host's `router.push`). */
|
|
18
|
+
onOpenConversation?: (conversationId: number) => void;
|
|
19
|
+
/** The host's router link; default `AdminUiProvider.linkComponent`, else a plain `<a>`. */
|
|
20
|
+
linkComponent?: PageLinkComponent;
|
|
21
|
+
/** A cost in the host's currency and format. Default: US dollars. */
|
|
22
|
+
formatCost?: (costInUsd: number) => string;
|
|
23
|
+
/** Conversations per page (default 50, at most 200). */
|
|
24
|
+
pageSize?: number;
|
|
25
|
+
/** The choices of a filter; without them the filter is a text field (purpose, model, tool, skill). */
|
|
26
|
+
purposeOptions?: readonly FilterOption[];
|
|
27
|
+
modelOptions?: readonly FilterOption[];
|
|
28
|
+
toolOptions?: readonly FilterOption[];
|
|
29
|
+
skillOptions?: readonly FilterOption[];
|
|
30
|
+
/** The accounts and spaces to pick from; default: the ones of the listed page. */
|
|
31
|
+
accountOptions?: readonly FilterOption[];
|
|
32
|
+
agentSpaceOptions?: readonly FilterOption[];
|
|
33
|
+
/** Origins of the application beside the package's (its own initiator types). */
|
|
34
|
+
originOptions?: readonly FilterOption[];
|
|
35
|
+
/** Refetches the list while it shows a running conversation, every n ms (default 15000; 0 = off). */
|
|
36
|
+
livePollingIntervalMs?: number;
|
|
37
|
+
/**
|
|
38
|
+
* The columns the reader switched off (`AGENT_CONVERSATION_COLUMN_IDS`), kept by the host (its stored preference);
|
|
39
|
+
* with `onHiddenColumnIdsChange` the column chooser is controlled, without it the screen keeps the choice itself.
|
|
40
|
+
*/
|
|
41
|
+
hiddenColumnIds?: readonly string[];
|
|
42
|
+
onHiddenColumnIdsChange?: (hiddenColumnIds: string[]) => void;
|
|
43
|
+
}
|
|
44
|
+
/** The columns a reader may switch off in the column chooser (the conversation column always shows). */
|
|
45
|
+
export declare const AGENT_CONVERSATION_COLUMN_IDS: readonly ["space", "purpose", "state", "turns", "errors", "cost", "lastActivity"];
|
|
46
|
+
/** The most conversations one page shows (the route's cap). */
|
|
47
|
+
export declare const AGENT_CONVERSATIONS_MAX_PAGE_SIZE = 200;
|
|
48
|
+
/**
|
|
49
|
+
* The conversations of the agent as an analysis list: the figures of the period with their change against the period
|
|
50
|
+
* before, the segments (all, running, awaiting owner, with problems, scheduled runs, sub-agents), a search, filters
|
|
51
|
+
* (period, account, space, purpose, run state, origin, model, tool, skill, cost, evaluation runs) and a table with what each
|
|
52
|
+
* conversation is about (its title, the start of the owner's first message and of the newest answer), whose it is,
|
|
53
|
+
* what it cost and where it stands. Segment, search, filters and page live in the URL through `urlStateAdapter`; a row
|
|
54
|
+
* opens the conversation's detail (`buildConversationHref`, `onOpenConversation`). The runs of evaluation suites are
|
|
55
|
+
* left out unless the filter "Include evaluation runs" is on. "Export CSV" writes the filtered list as a file, every
|
|
56
|
+
* page of it up to `AGENT_CONVERSATION_EXPORT_MAX_ROWS` conversations.
|
|
57
|
+
* Needs `AdminAgentConversationsInspectTrait` mounted at the api's prefix; which conversations a reader sees is the
|
|
58
|
+
* server's scope. Render it inside `<Suspense>` when the adapter reads search parameters.
|
|
59
|
+
*/
|
|
60
|
+
export declare const AgentConversationsScreen: ({ api, urlStateAdapter, title, description, headerActions, buildConversationHref, onOpenConversation, linkComponent, formatCost: formatCostOfHost, pageSize, purposeOptions, modelOptions, toolOptions, skillOptions, accountOptions, agentSpaceOptions, originOptions, livePollingIntervalMs, hiddenColumnIds: hiddenColumnIdsOfHost, onHiddenColumnIdsChange, }: AgentConversationsScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ContextPanelProps {
|
|
2
|
+
/** The page of turns the conversation tab reads first; the same number shares its answer. */
|
|
3
|
+
turnPageSize?: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The context of a conversation as it stands: what the newest model call was sent (the composition with the
|
|
7
|
+
* compaction threshold) and the compaction nodes written so far, newest first.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ContextPanel: ({ turnPageSize }: ContextPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type MoreActionItem } from "@mgamadeus/ddd-admin-ui/page";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import type { AgentInspectApi } from "./agent-inspect-api";
|
|
4
|
+
import type { AgentInspectActions } from "./inspect-scope";
|
|
5
|
+
export interface UseConversationActionsOptions {
|
|
6
|
+
api: AgentInspectApi;
|
|
7
|
+
conversationId: number;
|
|
8
|
+
/** False: no action is offered at all (the reader may not drive conversations). */
|
|
9
|
+
isDriveAllowed: boolean;
|
|
10
|
+
/** False: the controls show, disabled. */
|
|
11
|
+
writesAllowed: boolean;
|
|
12
|
+
selectableModelNames: readonly string[];
|
|
13
|
+
configuredModelName: string | null;
|
|
14
|
+
/** A turn runs (or is queued, or waits for sub-agents): stop and cancel are offered. */
|
|
15
|
+
isRunActive: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ConversationActionsResult {
|
|
18
|
+
/** Null when the reader may not drive conversations. */
|
|
19
|
+
actions: AgentInspectActions | null;
|
|
20
|
+
/** The buttons of the page header while a turn runs: stop, cancel. */
|
|
21
|
+
headerActions: ReactNode;
|
|
22
|
+
/** The entries of the header's "…" menu: continue as admin, run settings. Empty when the reader may not drive. */
|
|
23
|
+
menuItems: MoreActionItem[];
|
|
24
|
+
/** The dialogs of the actions; render once. */
|
|
25
|
+
dialogs: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The admin actions on one conversation: continue as admin (optionally from an earlier position), truncate, run a
|
|
29
|
+
* reading tool call again, stop the running turn, cancel the run. Every action names its effect in a confirmation
|
|
30
|
+
* before it runs; the drive mutations refresh the conversation's reads through their cache tags.
|
|
31
|
+
*/
|
|
32
|
+
export declare const useConversationActions: ({ api, conversationId, isDriveAllowed, writesAllowed, selectableModelNames, configuredModelName, isRunActive, }: UseConversationActionsOptions) => ConversationActionsResult;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { TraceViewMode } from "../../chat/trace/trace-types";
|
|
2
|
+
import type { AgentInspectCompactionNode, AgentInspectStep, AgentInspectTrace } from "./agent-inspect-types";
|
|
3
|
+
import { type AgentInspectDebugSwitches } from "./debug-switches";
|
|
4
|
+
/** A compaction node in one line, its summary behind a fold. */
|
|
5
|
+
export declare const CompactionNodeLine: ({ node, className }: {
|
|
6
|
+
node: AgentInspectCompactionNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
/** What the admin view adds to the open detail of a step: its facts and the actions on it. */
|
|
10
|
+
export declare const InspectStepExtras: ({ step, showsDetailLink, showsModelCallFacts, }: {
|
|
11
|
+
step: AgentInspectStep;
|
|
12
|
+
/** The button that opens the step's detail (off inside that detail and for the steps of a sub-agent). */
|
|
13
|
+
showsDetailLink?: boolean;
|
|
14
|
+
/** The line of a model call's technical facts (off where they stand as a grid already). */
|
|
15
|
+
showsModelCallFacts?: boolean;
|
|
16
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* The trace of a sub-agent's conversation, inside the open row of its delegate call: its turns as nested step groups
|
|
19
|
+
* with their figures. It is mounted (and so read) only while the row is open.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ChildConversationTrace: ({ conversationId, className }: {
|
|
22
|
+
conversationId: number;
|
|
23
|
+
className?: string;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export interface ConversationTurnsProps {
|
|
26
|
+
viewMode: TraceViewMode;
|
|
27
|
+
/** The switches of the debug bar; null while Debug is off. */
|
|
28
|
+
debugSwitches: AgentInspectDebugSwitches | null;
|
|
29
|
+
/** Grows on every "Refresh" of the screen: the turns are read again. */
|
|
30
|
+
refreshCount?: number;
|
|
31
|
+
includeTruncated: boolean;
|
|
32
|
+
/** How the owner of the conversation is named beside its messages. */
|
|
33
|
+
ownerLabel: string;
|
|
34
|
+
/** Refetches a running conversation's newest turn every n ms (0 = off). */
|
|
35
|
+
livePollingIntervalMs: number;
|
|
36
|
+
turnPageSize?: number;
|
|
37
|
+
/** Told the merged trace whenever it changes (the model calls of the loaded turns, the run state). */
|
|
38
|
+
onTraceChange?: (trace: AgentInspectTrace | null) => void;
|
|
39
|
+
/**
|
|
40
|
+
* The message a link named (the message that started a turn, or one of its answers): its turn is marked and
|
|
41
|
+
* scrolled into view. While it is in none of the loaded turns, earlier pages are read (a few, then it stops).
|
|
42
|
+
*/
|
|
43
|
+
focusMessageId?: number | null;
|
|
44
|
+
/** The step a link named (`?step=`): while none of the loaded turns holds it, earlier pages are read like for a message. */
|
|
45
|
+
focusStepId?: string | null;
|
|
46
|
+
/** Told whether earlier pages are still being read to reach the linked message or step. */
|
|
47
|
+
onFocusSearchChange?: (isSearching: boolean) => void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The conversation turn by turn: the message that started a turn, its steps in the chosen view mode with the texts
|
|
51
|
+
* the assistant wrote between them, and the answers — all from the trace read itself. It reads the page of the newest
|
|
52
|
+
* turns first and earlier pages on "Load earlier turns" (the trace says whether older turns exist); while a turn runs
|
|
53
|
+
* it follows the conversation with the read of the turns after the newest row it has seen and lays them over the
|
|
54
|
+
* loaded ones (the live tail).
|
|
55
|
+
*/
|
|
56
|
+
export declare const ConversationTurns: ({ viewMode, debugSwitches, refreshCount, includeTruncated, ownerLabel, livePollingIntervalMs, turnPageSize, onTraceChange, focusMessageId, focusStepId, onFocusSearchChange, }: ConversationTurnsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type AgentInspectDebugSwitchName, type AgentInspectDebugSwitches } from "./debug-switches";
|
|
3
|
+
export interface DebugSwitchBarProps {
|
|
4
|
+
switches: AgentInspectDebugSwitches;
|
|
5
|
+
onSwitchChange: (name: AgentInspectDebugSwitchName, isOn: boolean) => void;
|
|
6
|
+
/** Opens what the newest model call was sent; null hides the action (no model call loaded yet). */
|
|
7
|
+
onViewRequest: (() => void) | null;
|
|
8
|
+
/** More switches after the ten (the truncated rows). */
|
|
9
|
+
extraSwitches?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/** One labelled switch of the debug bar. */
|
|
12
|
+
export declare const DebugBarSwitch: ({ label, checked, onCheckedChange, testId }: {
|
|
13
|
+
label: string;
|
|
14
|
+
checked: boolean;
|
|
15
|
+
onCheckedChange: (checked: boolean) => void;
|
|
16
|
+
testId?: string;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* The dark bar of the debug view: the ten switches of what every turn shows (skills, tool calls, arguments and results,
|
|
20
|
+
* model and effort, tokens and costs, times, compaction, sub-agents, widgets, signals and decisions) and "View request"
|
|
21
|
+
* (what the newest model call was sent). The state is the caller's.
|
|
22
|
+
*/
|
|
23
|
+
export declare const DebugSwitchBar: ({ switches, onSwitchChange, onViewRequest, extraSwitches }: DebugSwitchBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The delegation of a conversation: what its sub-agents cost together, the batches, a timeline with one lane per
|
|
3
|
+
* sub-agent (its runs as bars on a shared axis, the parent's waiting windows above) and a card per sub-agent with its
|
|
4
|
+
* task, result and figures. A lane, a bar or "Show trace" opens the sub-agent's own trace below the cards.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DelegationPanel: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AgentInspectModelCallReference } from "./turn-paging";
|
|
2
|
+
/**
|
|
3
|
+
* The outline of a request body in one short JSON line: the model, the reasoning effort and how many tools and input
|
|
4
|
+
* items it sent (`{ "model": "gpt-6-luna", "reasoning": { "effort": "medium" }, "tools": [ … 22 ], "input": [ … 31 ] }`);
|
|
5
|
+
* null for a body that is no JSON object. Pure.
|
|
6
|
+
*/
|
|
7
|
+
export declare const describeRequestOutline: (payload: unknown) => string | null;
|
|
8
|
+
/** The tabs of the drawer: the composition of the request, its raw JSON, its difference to the call before. */
|
|
9
|
+
export type ModelContextView = "composition" | "payload" | "diff";
|
|
10
|
+
export interface ModelContextDialogProps {
|
|
11
|
+
/** The message whose model call is shown; null closes the drawer. */
|
|
12
|
+
messageId: number | null;
|
|
13
|
+
view: ModelContextView;
|
|
14
|
+
/** The model calls of the loaded turns: the picker's choices and what a payload is compared with. */
|
|
15
|
+
modelCalls: readonly AgentInspectModelCallReference[];
|
|
16
|
+
onMessageIdChange: (messageId: number | null) => void;
|
|
17
|
+
onViewChange: (view: ModelContextView) => void;
|
|
18
|
+
/** The model and the reasoning effort of the call in words, for the line under the title; null when unknown. */
|
|
19
|
+
describeCall?: (modelCall: AgentInspectModelCallReference) => {
|
|
20
|
+
modelLabel: string | null;
|
|
21
|
+
effort: string | null;
|
|
22
|
+
} | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The request one model call sent, in a drawer at the right: its composition (the segments with their tokens, each
|
|
26
|
+
* opening to its text), at the debug level its raw JSON and its difference to the call before. The line under the
|
|
27
|
+
* title says whether the request is the snapshot stored when the call was made or rebuilt, and which model and effort
|
|
28
|
+
* it ran with. A picker steps to the other model calls of the loaded turns; the footer copies the JSON and saves the
|
|
29
|
+
* turn as an evaluation case.
|
|
30
|
+
*/
|
|
31
|
+
export declare const ModelContextDialog: ({ messageId, view, modelCalls, onMessageIdChange, onViewChange, describeCall }: ModelContextDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { AgentInspectContextApi } from "../context/agent-inspect-context-api";
|
|
3
|
+
export interface RequestCompositionRowsProps {
|
|
4
|
+
api: AgentInspectContextApi;
|
|
5
|
+
conversationId: number | string;
|
|
6
|
+
messageId: number | string;
|
|
7
|
+
renderMarkdown?: (source: string) => ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The composition of one sent request as rows, in the order of the request: the segment (role groups of the message tail
|
|
11
|
+
* with their count), a meter of its share and its tokens. A row opens the texts of its segments; the line below sums
|
|
12
|
+
* the segments, says whether the breakdown was rebuilt and opens the whole context.
|
|
13
|
+
*/
|
|
14
|
+
export declare const RequestCompositionRows: ({ api, conversationId, messageId, renderMarkdown }: RequestCompositionRowsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AgentInspectConversationHeader } from "./agent-inspect-types";
|
|
2
|
+
/** The costs of the whole conversation by where they came from, as its header names them. */
|
|
3
|
+
export type AgentInspectConversationCosts = Pick<AgentInspectConversationHeader, "modelCallsCostInUSD" | "toolExecutionCostInUSD" | "overheadCostInUSD" | "subAgentsCostInUSD" | "treeCostInUSD">;
|
|
4
|
+
export interface RequestsPanelProps {
|
|
5
|
+
/** The cost split of the whole conversation (all turns, not only the loaded ones), below the table. */
|
|
6
|
+
conversationCosts?: AgentInspectConversationCosts | null;
|
|
7
|
+
/** Conversations of sub-agents below this one: their model calls are listed on their own pages. */
|
|
8
|
+
subAgentConversationCount?: number;
|
|
9
|
+
/** Reads the newest turns again while a turn runs, every n ms (0 = off). */
|
|
10
|
+
livePollingIntervalMs?: number;
|
|
11
|
+
/** Turns read per page, at most 100. */
|
|
12
|
+
pageSize?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The requests of a conversation: every model call as one row — turn, call number, model, effort, tokens in, out and
|
|
16
|
+
* from the cache, cost, duration, how it ended and the tools it called — with the totals below. It reads the trace at
|
|
17
|
+
* the debug level itself, whatever the Debug switch says (the tab is offered to a reader with the debug right), the
|
|
18
|
+
* newest turns first and the earlier pages after them. A row opens what the model was sent at that call; the button
|
|
19
|
+
* at its end opens the sent payload.
|
|
20
|
+
*/
|
|
21
|
+
export declare const RequestsPanel: ({ conversationCosts, subAgentConversationCount, livePollingIntervalMs, pageSize, }: RequestsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { AgentInspectFileChange } from "./agent-inspect-types";
|
|
3
|
+
/** The one-letter mark of a file operation (A, M, D, R, +). */
|
|
4
|
+
export declare const FileChangeLetter: ({ changeType }: {
|
|
5
|
+
changeType: string | null | undefined;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/** The chip of a mount: the host's label and tint, else the mount's name. Nothing without a label. */
|
|
8
|
+
export declare const MountTag: ({ mountKind, mountName, driveSpaceId }: {
|
|
9
|
+
mountKind: string | null;
|
|
10
|
+
mountName: string | null;
|
|
11
|
+
driveSpaceId: number | null;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
/** `+12 −3` of a change; nothing for a change without line counts. */
|
|
14
|
+
export declare const LineCounts: ({ linesAdded, linesRemoved }: {
|
|
15
|
+
linesAdded: number | null;
|
|
16
|
+
linesRemoved: number | null;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
|
+
export interface FileChangeViewerProps {
|
|
19
|
+
/** The change whose file is shown. */
|
|
20
|
+
fileChange: AgentInspectFileChange;
|
|
21
|
+
/** The diff of the change against the version before (a file edit block, or the file's changes with their diffs). */
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* One changed file with a switch between its preview and its diff to the version before. The preview is the host's
|
|
26
|
+
* (`renderFilePreview`: the stored version of the file under the reader's own rights). Where the host has none to
|
|
27
|
+
* show — a change without a stored version (a temporary file, a change that never reached the drive), or a stored
|
|
28
|
+
* file it cannot show (gone, no read right, not released by the malware check) — and the change is text whose diff
|
|
29
|
+
* holds the whole file (an added file, or hunks that span the file), the preview is that content rebuilt from the
|
|
30
|
+
* diff, marked "from the recorded change". Otherwise the change shows its diff alone and says so.
|
|
31
|
+
*/
|
|
32
|
+
export declare const FileChangeViewer: ({ fileChange, children }: FileChangeViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* The sandbox of a conversation: the chronicle (shell commands as terminal blocks and file changes, in time order),
|
|
35
|
+
* the touched files as a tree by mount, and for the picked file its history with the diff of each change.
|
|
36
|
+
*/
|
|
37
|
+
export declare const SandboxPanel: () => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Every file change of the conversation as a table (path, mount, operation, lines, size, tool, time); a row opens the
|
|
40
|
+
* change's diff below the table.
|
|
41
|
+
*/
|
|
42
|
+
export declare const FilesPanel: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AgentInspectStep } from "./agent-inspect-types";
|
|
2
|
+
export interface StepDetailDialogProps {
|
|
3
|
+
/** The id a link names (`?step=`); null closes the dialog. */
|
|
4
|
+
stepId: string | null;
|
|
5
|
+
/** The step of that id among the loaded turns; null when it is not among them. */
|
|
6
|
+
step: AgentInspectStep | null;
|
|
7
|
+
/** The turns are still being read (or earlier pages are looked through), so a missing step may yet arrive. */
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
/** The reader may switch to the debug level and has not: the note of an unresolved step names it as a way. */
|
|
10
|
+
canSwitchToDebug?: boolean;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* One step of a conversation in full, beside the conversation: a side decision with its input and output, a model
|
|
15
|
+
* call with its figures and the context of that very call, a tool call with arguments, result, terminal and file
|
|
16
|
+
* edits, a skill load, a delegation with the sub-agent's trace, a compaction, a signal, a widget. The link `?step=`
|
|
17
|
+
* names it, so a step can be passed on.
|
|
18
|
+
*/
|
|
19
|
+
export declare const StepDetailDialog: ({ stepId, step, isLoading, canSwitchToDebug, onClose }: StepDetailDialogProps) => import("react/jsx-runtime").JSX.Element;
|