@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.
- 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,370 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from "react";
|
|
2
|
+
import type { AgentsIconName } from "../../provider/components";
|
|
3
|
+
/**
|
|
4
|
+
* The data the trace blocks render. The blocks are presentational: a host maps what it read (the client's
|
|
5
|
+
* `getTurnTraces`, a list of its own) onto these shapes. They follow the conversation contract's trace
|
|
6
|
+
* (`contract/conversation-trace.ts`), with every field optional that a block can do without, so a contract step or
|
|
7
|
+
* file change is a valid value as it is.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* How much of a turn's trace the chat shows: `summary` nothing but the result, `normal` the steps folded with their
|
|
11
|
+
* narrated lines, `verbose` every step open to its details (tool names, thinking, the turn's figures).
|
|
12
|
+
*/
|
|
13
|
+
export type TraceViewMode = "summary" | "normal" | "verbose";
|
|
14
|
+
export type TraceStepKind = "THINKING" | "MODEL_CALL" | "TOOL_CALL" | "SKILL_LOAD" | "SUB_AGENT" | "WIDGET" | "COMPACTION" | "SIGNAL" | "DECISION" | "TASK_PLAN" | "ERROR";
|
|
15
|
+
export type TraceToolEffect = "READ" | "WORKSPACE" | "WRITE" | "DELETE";
|
|
16
|
+
/** Where a step or a task stands, as its row shows it. */
|
|
17
|
+
export type TraceStepState = "running" | "done" | "failed" | "waiting" | "cancelled";
|
|
18
|
+
/** A record a step names by id; the host turns the argument name into a label, an icon and a route. */
|
|
19
|
+
export interface TraceEntityReference {
|
|
20
|
+
argumentName: string;
|
|
21
|
+
id: number;
|
|
22
|
+
}
|
|
23
|
+
/** How a host describes a referenced record for its chip. */
|
|
24
|
+
export interface TraceEntityDescription {
|
|
25
|
+
/** The chip's text ("Ticket #13082"). */
|
|
26
|
+
label: string;
|
|
27
|
+
/** A small icon before the label (12 px). */
|
|
28
|
+
icon?: ReactNode;
|
|
29
|
+
/** Where the chip links to; a plain chip without it. */
|
|
30
|
+
href?: string | null;
|
|
31
|
+
}
|
|
32
|
+
export interface TraceModelCall {
|
|
33
|
+
modelName?: string | null;
|
|
34
|
+
effort?: string | null;
|
|
35
|
+
inputTokens?: number | null;
|
|
36
|
+
outputTokens?: number | null;
|
|
37
|
+
cachedInputTokens?: number | null;
|
|
38
|
+
/** The share of the input tokens read from the cache, 0–100. */
|
|
39
|
+
cachePercent?: number | null;
|
|
40
|
+
costInUsd?: number | null;
|
|
41
|
+
reasoningTokens?: number | null;
|
|
42
|
+
cacheWriteTokens?: number | null;
|
|
43
|
+
wireApi?: string | null;
|
|
44
|
+
forcedToolChoice?: string | null;
|
|
45
|
+
providerCallMs?: number | null;
|
|
46
|
+
loopOverheadMs?: number | null;
|
|
47
|
+
hasStoredPayload?: boolean;
|
|
48
|
+
/** The message whose context composition is the context of this call. */
|
|
49
|
+
contextMessageId?: number | null;
|
|
50
|
+
callNumberInTurn?: number | null;
|
|
51
|
+
toolNames?: string[];
|
|
52
|
+
stopReason?: string | null;
|
|
53
|
+
toolDelivery?: string | null;
|
|
54
|
+
retryCount?: number | null;
|
|
55
|
+
}
|
|
56
|
+
/** A decision the agent's loop took beside the model. */
|
|
57
|
+
export interface TraceDecision {
|
|
58
|
+
site?: string | null;
|
|
59
|
+
siteLabel?: string | null;
|
|
60
|
+
subject?: string | null;
|
|
61
|
+
engine?: string | null;
|
|
62
|
+
engineLabel?: string | null;
|
|
63
|
+
mode?: string | null;
|
|
64
|
+
/** `APPLIED`, `DECIDED`, `SHADOW`, `FALLBACK`, `SKIPPED`, as the server stores it. */
|
|
65
|
+
status?: string | null;
|
|
66
|
+
resultSummary?: string | null;
|
|
67
|
+
modelName?: string | null;
|
|
68
|
+
modelVersion?: string | null;
|
|
69
|
+
durationMs?: number | null;
|
|
70
|
+
/** How many decisions of the turn one request answered together; only the first one's row shows the duration. */
|
|
71
|
+
sharedRequestDecisionCount?: number | null;
|
|
72
|
+
/** 0–1. */
|
|
73
|
+
confidence?: number | null;
|
|
74
|
+
probabilities?: {
|
|
75
|
+
name: string;
|
|
76
|
+
probability: number;
|
|
77
|
+
}[];
|
|
78
|
+
fallbackReason?: string | null;
|
|
79
|
+
skipReason?: string | null;
|
|
80
|
+
inputJson?: string | null;
|
|
81
|
+
isInputCut?: boolean;
|
|
82
|
+
questionsJson?: string | null;
|
|
83
|
+
isQuestionsCut?: boolean;
|
|
84
|
+
outputJson?: string | null;
|
|
85
|
+
isOutputCut?: boolean;
|
|
86
|
+
outcomeJson?: string | null;
|
|
87
|
+
isOutcomeCut?: boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface TraceCompaction {
|
|
90
|
+
level?: number | null;
|
|
91
|
+
foldedMessageCount?: number | null;
|
|
92
|
+
foldedFromMessageIndex?: number | null;
|
|
93
|
+
foldedToMessageIndex?: number | null;
|
|
94
|
+
tokensBefore?: number | null;
|
|
95
|
+
tokensAfter?: number | null;
|
|
96
|
+
/** 0–100. */
|
|
97
|
+
compressionPercent?: number | null;
|
|
98
|
+
modelName?: string | null;
|
|
99
|
+
summaryText?: string | null;
|
|
100
|
+
isSummaryCut?: boolean;
|
|
101
|
+
preservedFactsJson?: string | null;
|
|
102
|
+
}
|
|
103
|
+
export interface TraceSignal {
|
|
104
|
+
source?: string | null;
|
|
105
|
+
kind?: string | null;
|
|
106
|
+
text?: string | null;
|
|
107
|
+
isTextCut?: boolean;
|
|
108
|
+
}
|
|
109
|
+
export interface TraceWidget {
|
|
110
|
+
type?: string | null;
|
|
111
|
+
emittedBy?: string | null;
|
|
112
|
+
isValid?: boolean;
|
|
113
|
+
title?: string | null;
|
|
114
|
+
summary?: string | null;
|
|
115
|
+
payloadJson?: string | null;
|
|
116
|
+
isPayloadCut?: boolean;
|
|
117
|
+
}
|
|
118
|
+
export interface TraceSkillLoadEntry {
|
|
119
|
+
name: string;
|
|
120
|
+
type?: string | null;
|
|
121
|
+
/** `LOADED`, `ALREADY_LOADED`, `NOT_LOADED`. */
|
|
122
|
+
outcome?: string | null;
|
|
123
|
+
cause?: string | null;
|
|
124
|
+
residentTokens?: number | null;
|
|
125
|
+
residentTokensWithTools?: number | null;
|
|
126
|
+
tools?: TraceLoadedSkillTool[];
|
|
127
|
+
}
|
|
128
|
+
/** What a step loaded. */
|
|
129
|
+
export interface TraceSkillLoad {
|
|
130
|
+
/** `MODEL`, `PRELOAD`, `TOOL_CALL`. */
|
|
131
|
+
cause?: string | null;
|
|
132
|
+
loadedCount?: number | null;
|
|
133
|
+
notLoadedCount?: number | null;
|
|
134
|
+
requestedNames?: string[];
|
|
135
|
+
skills?: TraceSkillLoadEntry[];
|
|
136
|
+
notLoadedText?: string | null;
|
|
137
|
+
}
|
|
138
|
+
export interface TraceTaskPlanStepItem {
|
|
139
|
+
key: string;
|
|
140
|
+
numberPath?: string | null;
|
|
141
|
+
depth?: number;
|
|
142
|
+
title: string;
|
|
143
|
+
status?: string | null;
|
|
144
|
+
}
|
|
145
|
+
export interface TraceLoadedSkillTool {
|
|
146
|
+
name: string;
|
|
147
|
+
residentTokens?: number | null;
|
|
148
|
+
usageCount?: number | null;
|
|
149
|
+
}
|
|
150
|
+
export interface TraceLoadedSkill {
|
|
151
|
+
name: string;
|
|
152
|
+
residentTokens?: number | null;
|
|
153
|
+
isNew?: boolean;
|
|
154
|
+
isAlwaysLoaded?: boolean;
|
|
155
|
+
/** What loaded the skill, as the server names it. */
|
|
156
|
+
cause?: string | null;
|
|
157
|
+
/** `LOADED`, `ALREADY_LOADED`, `NOT_LOADED`, for a skill of a load step. */
|
|
158
|
+
outcome?: string | null;
|
|
159
|
+
tools?: TraceLoadedSkillTool[];
|
|
160
|
+
}
|
|
161
|
+
export interface TraceTerminal {
|
|
162
|
+
command?: string | null;
|
|
163
|
+
cwd?: string | null;
|
|
164
|
+
exitCode?: number | null;
|
|
165
|
+
durationMs?: number | null;
|
|
166
|
+
output?: string | null;
|
|
167
|
+
errorOutput?: string | null;
|
|
168
|
+
/** The output was shortened where it was recorded. */
|
|
169
|
+
isTruncated?: boolean;
|
|
170
|
+
isBackground?: boolean;
|
|
171
|
+
timedOut?: boolean;
|
|
172
|
+
}
|
|
173
|
+
export type TraceFileChangeType = "ADDED" | "MODIFIED" | "DELETED" | "RENAMED" | "DIRECTORY_CREATED";
|
|
174
|
+
export type TraceFileDiffState = "NONE" | "INLINE" | "STORED" | "BINARY" | "TOO_LARGE" | "UNAVAILABLE";
|
|
175
|
+
export interface TraceFileChange {
|
|
176
|
+
id?: number | null;
|
|
177
|
+
source?: string | null;
|
|
178
|
+
mountKind?: string | null;
|
|
179
|
+
mountName?: string | null;
|
|
180
|
+
driveSpaceId?: number | null;
|
|
181
|
+
path: string;
|
|
182
|
+
previousPath?: string | null;
|
|
183
|
+
changeType?: TraceFileChangeType | null;
|
|
184
|
+
sizeBefore?: number | null;
|
|
185
|
+
sizeAfter?: number | null;
|
|
186
|
+
sha256Before?: string | null;
|
|
187
|
+
sha256After?: string | null;
|
|
188
|
+
contentType?: string | null;
|
|
189
|
+
isBinary?: boolean;
|
|
190
|
+
linesAdded?: number | null;
|
|
191
|
+
linesRemoved?: number | null;
|
|
192
|
+
diffState?: TraceFileDiffState | null;
|
|
193
|
+
/** Unified diff text: the whole diff (`INLINE`) or its start (`STORED`). */
|
|
194
|
+
diffPreview?: string | null;
|
|
195
|
+
driveNodeId?: number | null;
|
|
196
|
+
driveFileVersionId?: number | null;
|
|
197
|
+
externalRevisionId?: string | null;
|
|
198
|
+
}
|
|
199
|
+
/** How a mount is named on a file block: its label and the tint of its chip. */
|
|
200
|
+
export interface TraceMountDescription {
|
|
201
|
+
label: string;
|
|
202
|
+
/** own = the reader's own drive, shared = a shared drive, external = a drive of another service. Default neutral. */
|
|
203
|
+
tone?: "own" | "shared" | "external" | "neutral";
|
|
204
|
+
}
|
|
205
|
+
/** Names the mount of a file change; a string is a label with the default tint of its kind. */
|
|
206
|
+
export type TraceDescribeMount = (mountKind: string | null, mountName: string | null, driveSpaceId: number | null) => TraceMountDescription | string | null;
|
|
207
|
+
export interface TraceSubAgentRun {
|
|
208
|
+
runNumber?: number | null;
|
|
209
|
+
status?: string | null;
|
|
210
|
+
startedAt?: string | null;
|
|
211
|
+
finishedAt?: string | null;
|
|
212
|
+
verdict?: string | null;
|
|
213
|
+
failureReason?: string | null;
|
|
214
|
+
costInUsd?: number | null;
|
|
215
|
+
inputTokens?: number | null;
|
|
216
|
+
outputTokens?: number | null;
|
|
217
|
+
}
|
|
218
|
+
export interface TraceSubAgent {
|
|
219
|
+
number?: number | null;
|
|
220
|
+
label: string;
|
|
221
|
+
taskText?: string | null;
|
|
222
|
+
/** What the task is: an agent with a task in words, a background job that runs one tool (`toolRun`), an awaited run. */
|
|
223
|
+
taskKind?: "agent" | "toolRun" | "awaitedRun" | null;
|
|
224
|
+
/** The tool a background job runs. */
|
|
225
|
+
toolName?: string | null;
|
|
226
|
+
skillNames?: string[];
|
|
227
|
+
childConversationId?: number | null;
|
|
228
|
+
/** The status of the newest run (`QUEUED`, `RUNNING`, `COMPLETED`, `FAILED`, `CANCELLED`). */
|
|
229
|
+
status?: string | null;
|
|
230
|
+
runs?: TraceSubAgentRun[];
|
|
231
|
+
modelName?: string | null;
|
|
232
|
+
/** That model as the model catalog names it ("GPT-6 Luna"); shown before the words read from `modelName`. */
|
|
233
|
+
modelLabel?: string | null;
|
|
234
|
+
/** The totals of the sub-agent's conversation. */
|
|
235
|
+
costInUsd?: number | null;
|
|
236
|
+
inputTokens?: number | null;
|
|
237
|
+
outputTokens?: number | null;
|
|
238
|
+
cachedInputTokens?: number | null;
|
|
239
|
+
messageCount?: number | null;
|
|
240
|
+
}
|
|
241
|
+
/** One step of a turn, as its row and its detail read it. */
|
|
242
|
+
export interface TraceStep {
|
|
243
|
+
/** A key that is stable within the turn. */
|
|
244
|
+
key: string;
|
|
245
|
+
kind: TraceStepKind;
|
|
246
|
+
messageId?: number | null;
|
|
247
|
+
toolName?: string | null;
|
|
248
|
+
toolNameInWords?: string | null;
|
|
249
|
+
deliveredThroughCallTool?: boolean;
|
|
250
|
+
effect?: TraceToolEffect | null;
|
|
251
|
+
/** The stored status of the step's call (`PENDING`, `RUNNING`, `COMPLETED`, `FAILED`, `CANCELLED`, `ERROR`, …). */
|
|
252
|
+
status?: string | null;
|
|
253
|
+
startedAt?: string | null;
|
|
254
|
+
durationMs?: number | null;
|
|
255
|
+
/** The narrated line of the step. */
|
|
256
|
+
line?: string | null;
|
|
257
|
+
entityReferences?: TraceEntityReference[];
|
|
258
|
+
isHeldForConsent?: boolean;
|
|
259
|
+
isRefused?: boolean;
|
|
260
|
+
errorText?: string | null;
|
|
261
|
+
errorCode?: string | null;
|
|
262
|
+
wasRetried?: boolean;
|
|
263
|
+
stepId?: string | null;
|
|
264
|
+
toolSkillNames?: string[];
|
|
265
|
+
modelLabel?: string | null;
|
|
266
|
+
skillLoad?: TraceSkillLoad | null;
|
|
267
|
+
taskPlanItems?: TraceTaskPlanStepItem[];
|
|
268
|
+
widgetType?: string | null;
|
|
269
|
+
widget?: TraceWidget | null;
|
|
270
|
+
decision?: TraceDecision | null;
|
|
271
|
+
compaction?: TraceCompaction | null;
|
|
272
|
+
signal?: TraceSignal | null;
|
|
273
|
+
taskPlanTitle?: string | null;
|
|
274
|
+
taskPlanItemCount?: number | null;
|
|
275
|
+
taskPlanOpenItemCount?: number | null;
|
|
276
|
+
taskPlanDoneItemCount?: number | null;
|
|
277
|
+
taskPlanBlockedItemCount?: number | null;
|
|
278
|
+
terminal?: TraceTerminal | null;
|
|
279
|
+
fileChanges?: TraceFileChange[];
|
|
280
|
+
subAgent?: TraceSubAgent | null;
|
|
281
|
+
argumentsJson?: string | null;
|
|
282
|
+
isArgumentsCut?: boolean;
|
|
283
|
+
result?: string | null;
|
|
284
|
+
resultChars?: number | null;
|
|
285
|
+
isResultCut?: boolean;
|
|
286
|
+
modelCall?: TraceModelCall | null;
|
|
287
|
+
loadedSkills?: TraceLoadedSkill[] | null;
|
|
288
|
+
loadedSkillNames?: string[];
|
|
289
|
+
/** A summary of the model's reasoning, where the provider returned one. */
|
|
290
|
+
thinkingSummary?: string | null;
|
|
291
|
+
/** The text the assistant wrote in the model call of this step, before the call's tools ran. */
|
|
292
|
+
assistantText?: string | null;
|
|
293
|
+
assistantTextChars?: number | null;
|
|
294
|
+
isAssistantTextCut?: boolean;
|
|
295
|
+
}
|
|
296
|
+
/** The figures of a turn. */
|
|
297
|
+
export interface TraceTurnTotals {
|
|
298
|
+
durationMs?: number | null;
|
|
299
|
+
inputTokens?: number | null;
|
|
300
|
+
outputTokens?: number | null;
|
|
301
|
+
cachedInputTokens?: number | null;
|
|
302
|
+
cachePercent?: number | null;
|
|
303
|
+
costInUsd?: number | null;
|
|
304
|
+
stepCount?: number | null;
|
|
305
|
+
commandCount?: number | null;
|
|
306
|
+
fileCount?: number | null;
|
|
307
|
+
linesAdded?: number | null;
|
|
308
|
+
linesRemoved?: number | null;
|
|
309
|
+
modelName?: string | null;
|
|
310
|
+
effort?: string | null;
|
|
311
|
+
outcome?: string | null;
|
|
312
|
+
}
|
|
313
|
+
/** A link as a host's router draws it (`next/link`, a router link); the blocks render a plain anchor without one. */
|
|
314
|
+
export type TraceLinkComponent = ComponentType<{
|
|
315
|
+
href: string;
|
|
316
|
+
className?: string;
|
|
317
|
+
title?: string;
|
|
318
|
+
children?: ReactNode;
|
|
319
|
+
}>;
|
|
320
|
+
/**
|
|
321
|
+
* What a host binds once for the trace blocks that render steps: its records, links, mounts, money and the callbacks
|
|
322
|
+
* of a file block. Every member is optional; a block without a binding shows the plain value.
|
|
323
|
+
*/
|
|
324
|
+
export interface TraceHostBindings {
|
|
325
|
+
/** The host's link (an in-app route); a plain anchor otherwise. */
|
|
326
|
+
linkComponent?: TraceLinkComponent;
|
|
327
|
+
/** The chip of a record a step names; null leaves the reference out. Default: no chips. */
|
|
328
|
+
describeEntity?: (reference: TraceEntityReference) => TraceEntityDescription | null;
|
|
329
|
+
/** The route of a record, for a host that only links (`describeEntity` wins when it names an `href`). */
|
|
330
|
+
buildEntityHref?: (argumentName: string, id: number) => string | null;
|
|
331
|
+
describeMount?: TraceDescribeMount;
|
|
332
|
+
/** A cost in the host's currency and format. Default: US dollars. */
|
|
333
|
+
formatCost?: (costInUsd: number) => string;
|
|
334
|
+
/** The icon of a tool's row, for a host that knows its tools. Default: by the tool's effect. */
|
|
335
|
+
resolveToolIcon?: (step: TraceStep) => AgentsIconName | undefined;
|
|
336
|
+
/** Loads the whole diff of a file change whose preview is cut (`STORED`). */
|
|
337
|
+
loadFullDiff?: (fileChange: TraceFileChange) => Promise<string>;
|
|
338
|
+
/** Opens a changed file in the host's viewer. */
|
|
339
|
+
openFileInViewer?: (fileChange: TraceFileChange) => void;
|
|
340
|
+
/**
|
|
341
|
+
* The route of the screen that shows a conversation's sandbox (its commands and touched files), with a file or one
|
|
342
|
+
* change of it preselected when `target` names one. Null: no link. The blocks link the step group of a turn that ran
|
|
343
|
+
* a command or changed a file, and every changed file.
|
|
344
|
+
*/
|
|
345
|
+
buildSandboxHref?: (conversationId: number, target: {
|
|
346
|
+
path?: string;
|
|
347
|
+
fileChangeId?: number;
|
|
348
|
+
}) => string | null;
|
|
349
|
+
/**
|
|
350
|
+
* Opens what one model call was sent (its context composition, its payload) in a view of the host; `messageId` is
|
|
351
|
+
* the message the composition is read by. The open detail of a model call offers "Context of this call" with it.
|
|
352
|
+
*/
|
|
353
|
+
openModelCallContext?: (messageId: number) => void;
|
|
354
|
+
/** Whether the host's viewer can show this file (a file it stores); a block offers "open" only then. Default: every file. */
|
|
355
|
+
canOpenFileInViewer?: (fileChange: TraceFileChange) => boolean;
|
|
356
|
+
/** A small picture of a changed file (a thumbnail), for the preview card of a binary file. */
|
|
357
|
+
renderFileThumbnail?: (fileChange: TraceFileChange) => ReactNode;
|
|
358
|
+
/** The route of a sub-agent's conversation. */
|
|
359
|
+
buildChildConversationHref?: (childConversationId: number) => string | null;
|
|
360
|
+
/** Opens a sub-agent's conversation (when the host has no route for it). */
|
|
361
|
+
openChildConversation?: (childConversationId: number) => void;
|
|
362
|
+
/** The trace of a sub-agent's conversation, loaded by the host when its row opens. */
|
|
363
|
+
renderChildTrace?: (childConversationId: number) => ReactNode;
|
|
364
|
+
/**
|
|
365
|
+
* Further content of the host inside the open detail of a step, below what the step shows itself (the actions of an
|
|
366
|
+
* analysis view on a model call or a tool call). Null or undefined adds nothing; a step that has nothing else to
|
|
367
|
+
* show opens for it.
|
|
368
|
+
*/
|
|
369
|
+
renderStepExtras?: (step: TraceStep, viewMode: TraceViewMode) => ReactNode;
|
|
370
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ConversationTraceLevel, ConversationTurnTrace } from "../../contract/conversation-trace";
|
|
2
|
+
import { type ConversationTraceClient, type ConversationTraceState } from "./conversation-trace-loader";
|
|
3
|
+
/**
|
|
4
|
+
* Where the conversation of the chat around this component stands, for the loader's reads after a change: the given
|
|
5
|
+
* value, else the message count and newest message id of the chat's own store; null outside a chat.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useConversationTraceRevision: (conversationRevision?: string | number | null) => string | number | null;
|
|
8
|
+
export interface UseConversationTurnTraceOptions {
|
|
9
|
+
client: ConversationTraceClient;
|
|
10
|
+
conversationId: number;
|
|
11
|
+
/** The message that started the turn; null (an optimistic message without an id yet) reads nothing. */
|
|
12
|
+
turnMessageId: number | null;
|
|
13
|
+
level: ConversationTraceLevel;
|
|
14
|
+
/** The turn runs: the loader follows it until this turns false. */
|
|
15
|
+
isLive: boolean;
|
|
16
|
+
pollIntervalMs?: number;
|
|
17
|
+
/** A value that changes with every new message of the conversation; default: read from the chat's store. */
|
|
18
|
+
conversationRevision?: string | number | null;
|
|
19
|
+
}
|
|
20
|
+
export interface ConversationTurnTraceRead {
|
|
21
|
+
/** The trace of the turn; null while it is not read, when the message started none, and after a failed read. */
|
|
22
|
+
turn: ConversationTurnTrace | null;
|
|
23
|
+
/** The loader's state of the conversation. */
|
|
24
|
+
state: ConversationTraceState;
|
|
25
|
+
/** Reads the changed turns now. */
|
|
26
|
+
refresh: () => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The trace of the turn one message started, read through the conversation's shared loader: every turn on screen
|
|
30
|
+
* shares the loader's reads, a live turn is followed until it ends, and a change of the conversation reads again.
|
|
31
|
+
*/
|
|
32
|
+
export declare const useConversationTurnTrace: (options: UseConversationTurnTraceOptions) => ConversationTurnTraceRead;
|
|
33
|
+
export interface UseConversationTracesOptions {
|
|
34
|
+
client: ConversationTraceClient;
|
|
35
|
+
/** The conversation; null reads nothing. */
|
|
36
|
+
conversationId: number | null;
|
|
37
|
+
level: ConversationTraceLevel;
|
|
38
|
+
/** Follows the conversation while a turn runs in it (a sub-agent's trace, which no chat follows). Default false. */
|
|
39
|
+
followsWhileLive?: boolean;
|
|
40
|
+
pollIntervalMs?: number;
|
|
41
|
+
conversationRevision?: string | number | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The turns the conversation's shared loader holds, the newest window at least: for a pane beside the chat (its
|
|
45
|
+
* changed files, its sub-agents) and for the trace of a sub-agent's conversation.
|
|
46
|
+
*/
|
|
47
|
+
export declare const useConversationTraces: (options: UseConversationTracesOptions) => ConversationTraceState;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AccountRealtimeRead } from "../ui/account-realtime";
|
|
2
2
|
import type { ClientToolAnswer } from "../ui/client-tools";
|
|
3
3
|
import type { AgentsConversation, ChangedConversationMessages, ChangedMessagesRequest, ConversationActivity, ConversationAttachmentReference, ConversationChangeSignal, ConversationListQueryOptions, ConversationMessageSearchHit, ConversationMessageSentPayload, ConversationMessagesPage, ConversationRunStateRead, ConversationSearchGroup, ConversationSearchOptions, ConversationSignal, ConversationSubscriptionEndReason, PostedMessage, BoundConversationSubject, ConversationsOfSubject, ConversationSubject, PurposeStartRequest, SelectableModel, StartedConversation, StartedPurposeConversation } from "../contract/conversation";
|
|
4
|
+
import type { ConversationContextComposition, ConversationFileChangeDiff, ConversationTurnStop, ConversationTurnTraces, ConversationTurnTracesOptions } from "../contract/conversation-trace";
|
|
4
5
|
/**
|
|
5
6
|
* The conversation client port (one function per row of the table, derived from the chat
|
|
6
7
|
* controller's requests). The package calls only this; an app binds it over its own request layer; the package
|
|
@@ -110,6 +111,25 @@ export interface AgentsConversationClient {
|
|
|
110
111
|
composeSentMessageText?: (text: string, attachments: ConversationAttachmentReference[] | undefined) => string;
|
|
111
112
|
/** The reconstructed request of a model call (the admin details panel). Optional. */
|
|
112
113
|
getMessageSentPayload?: (conversationId: number, messageId: number) => Promise<ConversationMessageSentPayload>;
|
|
114
|
+
/**
|
|
115
|
+
* Stops the turn that runs in the conversation (`POST …/{id}/stop`): the server ends it after the step in flight,
|
|
116
|
+
* the conversation stays open for the owner's next message, and the run status turns idle through the live updates.
|
|
117
|
+
* The answer says whether a turn was stopped (false: none ran). Optional: without it the chat offers no stop.
|
|
118
|
+
*/
|
|
119
|
+
stopTurn?: (conversationId: number) => Promise<ConversationTurnStop>;
|
|
120
|
+
/**
|
|
121
|
+
* What the agent did, turn by turn (`GET …/{id}/trace`): the newest turns without options, a window of turns, or the
|
|
122
|
+
* turns that changed after a message position (the read that follows a running turn). The server decides the level
|
|
123
|
+
* of detail the reader gets. Optional: without it a host shows no step rows.
|
|
124
|
+
*/
|
|
125
|
+
getTurnTraces?: (conversationId: number, options?: ConversationTurnTracesOptions) => Promise<ConversationTurnTraces>;
|
|
126
|
+
/**
|
|
127
|
+
* What one model call was sent, by segment (`GET …/{id}/messages/{messageId}/contextComposition`; a debug read).
|
|
128
|
+
* Optional.
|
|
129
|
+
*/
|
|
130
|
+
getMessageContextComposition?: (conversationId: number, messageId: number) => Promise<ConversationContextComposition>;
|
|
131
|
+
/** The whole stored diff of one file change (`GET …/fileChanges/{fileChangeId}/diff`). Optional. */
|
|
132
|
+
getFileChangeDiff?: (fileChangeId: number) => Promise<ConversationFileChangeDiff>;
|
|
113
133
|
/**
|
|
114
134
|
* Live updates: `onSignal` receives the conversation's signal as data, the first one right after the
|
|
115
135
|
* subscription is up; `onEnded` reports that the conversation is gone or no longer accessible (`gone`, `forbidden`) —
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ConversationContextComposition, ConversationFileChange, ConversationFileChangeDiff, ConversationTraceMessage, ConversationTraceStep, ConversationTraceTaskPlanItem, ConversationTurnStop, ConversationTurnTrace, ConversationTurnTraces } from "../../contract/conversation-trace";
|
|
2
|
+
import type { WireContextCompositionResponse, WireFileChangeDiffResponse, WireTurnStopResponse, WireTraceFileChange, WireTraceMessage, WireTraceStep, WireTurnTrace, WireTurnTracesResponse } from "./agents-http-trace-wire";
|
|
3
|
+
export declare const mapWireTraceTaskPlanItems: (wireItems: WireTraceStep["taskPlanItems"]) => ConversationTraceTaskPlanItem[];
|
|
4
|
+
/** An `AgentTraceFileChange` as the contract's file change. */
|
|
5
|
+
export declare const mapWireTraceFileChange: (wireFileChange: WireTraceFileChange) => ConversationFileChange;
|
|
6
|
+
/**
|
|
7
|
+
* An `AgentTraceStep` as the contract's step. A step of a kind the binding does not know is mapped to null and left
|
|
8
|
+
* out of its turn. `position` is the step's place in its turn (part of its key when the server sends no step id).
|
|
9
|
+
*/
|
|
10
|
+
export declare const mapWireTraceStep: (wireStep: WireTraceStep, position: number) => ConversationTraceStep | null;
|
|
11
|
+
/** An `AgentTraceMessage`: a message of a turn with its text; null for anything that is no object. */
|
|
12
|
+
export declare const mapWireTraceMessage: (wireMessage: WireTraceMessage | null | undefined) => ConversationTraceMessage | null;
|
|
13
|
+
/** An `AgentTurnTrace` as the contract's turn trace. */
|
|
14
|
+
export declare const mapWireTurnTrace: (wireTurn: WireTurnTrace) => ConversationTurnTrace;
|
|
15
|
+
/**
|
|
16
|
+
* The trace read (`AgentTurnTraces`) as the contract's turn traces: the traces may be the answer itself or sit in one
|
|
17
|
+
* of its fields (a response DTO). The turns are the elements of the set. An answer without turns reads as an empty
|
|
18
|
+
* trace.
|
|
19
|
+
*/
|
|
20
|
+
export declare const mapWireTurnTraces: (response: WireTurnTracesResponse | null | undefined) => ConversationTurnTraces;
|
|
21
|
+
/**
|
|
22
|
+
* The context composition of one model call. The server's answer carries the composition in `composition` (the
|
|
23
|
+
* segments of the system message, of the tool schemas and of the wire messages, in the order the model read them) and
|
|
24
|
+
* the compaction threshold beside it: the context's size is the provider's count of the newest call, the size it may
|
|
25
|
+
* reach is the threshold in effect. A flat answer (`segments`, `totalTokens`, `contextWindowTokens`) is read as well.
|
|
26
|
+
*/
|
|
27
|
+
export declare const mapWireContextComposition: (response: WireContextCompositionResponse | null | undefined) => ConversationContextComposition;
|
|
28
|
+
/** The whole diff of a file change. */
|
|
29
|
+
export declare const mapWireFileChangeDiff: (response: WireFileChangeDiffResponse | null | undefined, fileChangeId: number) => ConversationFileChangeDiff;
|
|
30
|
+
/** The answer of the stop route: whether a running turn was stopped, and the run state after it. */
|
|
31
|
+
export declare const mapWireTurnStop: (response: WireTurnStopResponse | null | undefined) => ConversationTurnStop;
|