@mgamadeus/ddd-agents 0.11.13 → 0.13.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 +13839 -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 +18277 -1298
- 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 +105 -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 +138 -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/SkillLoadSourcesPanel.d.ts +20 -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 +101 -0
- package/dist/types/admin/skills/agent-skill-catalog-types.d.ts +259 -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 +86 -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 +1047 -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,517 @@
|
|
|
1
|
+
import type { ConversationFileChange, ConversationTraceDecision, ConversationTraceLevel, ConversationTraceMessage, ConversationTraceStep, ConversationTraceSubAgent, ConversationTraceWindowMode, ConversationTurnTrace } from "../../contract/conversation-trace";
|
|
2
|
+
import type { WireTraceTaskPlanItem } from "../../client/http/agents-http-trace-wire";
|
|
3
|
+
import type { WireSet } from "../../client/http/agents-http-wire";
|
|
4
|
+
import type { AdminWireSet } from "../wire/admin-wire";
|
|
5
|
+
/**
|
|
6
|
+
* The shapes of the conversation inspection routes (`AdminAgentConversationsInspectTrait`,
|
|
7
|
+
* `AdminAgentConversationsDriveTrait`). The answers of the list, the metrics, the header and the delegation and sandbox
|
|
8
|
+
* reads keep the server's field names, every field optional; the trace is mapped onto the conversation contract's
|
|
9
|
+
* trace with the admin facts beside it (`mapAgentInspectTrace`).
|
|
10
|
+
*/
|
|
11
|
+
/** The segments of the list (`AgentInspectFilters::SEGMENT_*`). */
|
|
12
|
+
export declare const AGENT_INSPECT_SEGMENTS: readonly ["ALL", "RUNNING", "AWAITING_OWNER", "WITH_PROBLEMS", "SCHEDULED", "SUB_AGENTS"];
|
|
13
|
+
export type AgentInspectSegment = (typeof AGENT_INSPECT_SEGMENTS)[number];
|
|
14
|
+
/** The orders of the list (`AgentInspectFilters::SORT_*`); `LAST_ACTIVITY` is the server's default. */
|
|
15
|
+
export declare const AGENT_INSPECT_SORT_ORDERS: readonly ["LAST_ACTIVITY", "CREATED", "COST"];
|
|
16
|
+
export type AgentInspectSortOrder = (typeof AGENT_INSPECT_SORT_ORDERS)[number];
|
|
17
|
+
/** The run states a conversation is listed by. */
|
|
18
|
+
export declare const AGENT_INSPECT_RUN_STATES: readonly ["IDLE", "QUEUED", "RUNNING", "AWAITING_DELEGATES", "COMPLETED", "FAILED", "CANCELLED"];
|
|
19
|
+
export type AgentInspectRunState = (typeof AGENT_INSPECT_RUN_STATES)[number];
|
|
20
|
+
/** The origins the package itself knows; an application adds its own initiator types. */
|
|
21
|
+
export declare const AGENT_INSPECT_ORIGINS: readonly ["OWNER", "DELEGATION", "SCHEDULE", "ADMIN_TASK", "PHONE_CALL", "EXTERNAL_AGENT"];
|
|
22
|
+
/** `AgentInspectLabel`: the application's label of an account or an agent space. */
|
|
23
|
+
export interface AgentInspectLabel {
|
|
24
|
+
id?: number | null;
|
|
25
|
+
label?: string | null;
|
|
26
|
+
/** A second line (the kind of the space, the role of the account). */
|
|
27
|
+
description?: string | null;
|
|
28
|
+
}
|
|
29
|
+
/** `AgentInspectedConversation`: one row of the list; cost and tokens are those of the conversation's tree. */
|
|
30
|
+
export interface AgentInspectedConversation {
|
|
31
|
+
aiConversationId?: number | null;
|
|
32
|
+
rootConversationId?: number | null;
|
|
33
|
+
accountId?: number | null;
|
|
34
|
+
agentSpaceId?: number | null;
|
|
35
|
+
title?: string | null;
|
|
36
|
+
purposeName?: string | null;
|
|
37
|
+
/** The start of the first message of the owner, and of the newest answer of the assistant. */
|
|
38
|
+
firstOwnerTextExcerpt?: string | null;
|
|
39
|
+
lastAnswerTextExcerpt?: string | null;
|
|
40
|
+
runState?: string | null;
|
|
41
|
+
initiatorType?: string | null;
|
|
42
|
+
isSubAgentConversation?: boolean | null;
|
|
43
|
+
scheduleId?: number | null;
|
|
44
|
+
created?: string | null;
|
|
45
|
+
lastActivityAt?: string | null;
|
|
46
|
+
lastMessageAt?: string | null;
|
|
47
|
+
runHeartbeatAt?: string | null;
|
|
48
|
+
costInUSD?: number | null;
|
|
49
|
+
overheadCostsInUSD?: number | null;
|
|
50
|
+
inputTokens?: number | null;
|
|
51
|
+
outputTokens?: number | null;
|
|
52
|
+
cachedInputTokens?: number | null;
|
|
53
|
+
turnCount?: number | null;
|
|
54
|
+
messageCount?: number | null;
|
|
55
|
+
failedRowCount?: number | null;
|
|
56
|
+
modelNames?: string[] | null;
|
|
57
|
+
/** Those models as the model catalog names them ("GPT-6 Luna"), in the order of the names. */
|
|
58
|
+
modelLabels?: string[] | null;
|
|
59
|
+
subAgentCount?: number | null;
|
|
60
|
+
}
|
|
61
|
+
/** The filters of `GET /list` and `GET /metrics`, as the request carries them. */
|
|
62
|
+
export interface AgentInspectListArg {
|
|
63
|
+
/** The first day of the period of last activity (`YYYY-MM-DD`, UTC, inclusive). */
|
|
64
|
+
from?: string;
|
|
65
|
+
/** The last day of the period (`YYYY-MM-DD`, UTC, inclusive). */
|
|
66
|
+
to?: string;
|
|
67
|
+
accountIds?: readonly number[];
|
|
68
|
+
agentSpaceIds?: readonly number[];
|
|
69
|
+
runStates?: readonly string[];
|
|
70
|
+
purposeName?: string;
|
|
71
|
+
origin?: string;
|
|
72
|
+
modelName?: string;
|
|
73
|
+
toolName?: string;
|
|
74
|
+
loadedSkillName?: string;
|
|
75
|
+
minimumCostInUSD?: number;
|
|
76
|
+
search?: string;
|
|
77
|
+
segment?: AgentInspectSegment;
|
|
78
|
+
/** The order of the list; left out = last activity first. The metrics ignore it. */
|
|
79
|
+
sortBy?: AgentInspectSortOrder;
|
|
80
|
+
/** Lists the runs of evaluation suites too (they are left out by default). */
|
|
81
|
+
includeEvalRuns?: boolean;
|
|
82
|
+
limit?: number;
|
|
83
|
+
offset?: number;
|
|
84
|
+
}
|
|
85
|
+
/** `GET /list`: the page (`AgentInspectedConversations`, an object set: its conversations under `elements`) and the labels. */
|
|
86
|
+
export interface AgentInspectConversationsResponse {
|
|
87
|
+
conversations?: AdminWireSet<AgentInspectedConversation> | null;
|
|
88
|
+
hasMore?: boolean | null;
|
|
89
|
+
limit?: number | null;
|
|
90
|
+
offset?: number | null;
|
|
91
|
+
accountLabels?: AdminWireSet<AgentInspectLabel> | null;
|
|
92
|
+
agentSpaceLabels?: AdminWireSet<AgentInspectLabel> | null;
|
|
93
|
+
}
|
|
94
|
+
/** `AgentInspectMetric`: a figure of the period and of the period of equal length before. */
|
|
95
|
+
export interface AgentInspectMetric {
|
|
96
|
+
value?: number | null;
|
|
97
|
+
previousValue?: number | null;
|
|
98
|
+
}
|
|
99
|
+
/** `AgentInspectMetrics`. */
|
|
100
|
+
export interface AgentInspectMetrics {
|
|
101
|
+
activeFrom?: string | null;
|
|
102
|
+
activeUntil?: string | null;
|
|
103
|
+
previousActiveFrom?: string | null;
|
|
104
|
+
previousActiveUntil?: string | null;
|
|
105
|
+
conversationCount?: AgentInspectMetric | null;
|
|
106
|
+
costInUSD?: AgentInspectMetric | null;
|
|
107
|
+
/** `USAGE_LOG` / `MESSAGE_ROWS` (the period cost, same figure as the control-panel statistics) or `CONVERSATION_TREES` (a narrowed list). */
|
|
108
|
+
costSource?: string | null;
|
|
109
|
+
/** First day the cost source holds data for (`Y-m-d`); null when unknown. */
|
|
110
|
+
costDataAvailableFrom?: string | null;
|
|
111
|
+
averageCostInUSD?: AgentInspectMetric | null;
|
|
112
|
+
conversationWithErrorsCount?: AgentInspectMetric | null;
|
|
113
|
+
cacheHitPercent?: AgentInspectMetric | null;
|
|
114
|
+
medianAnswerSeconds?: AgentInspectMetric | null;
|
|
115
|
+
}
|
|
116
|
+
/** `AgentInspectSegmentCount`: the conversations one segment lists under the list's other filters. */
|
|
117
|
+
export interface AgentInspectSegmentCount {
|
|
118
|
+
segment?: string | null;
|
|
119
|
+
conversationCount?: number | null;
|
|
120
|
+
}
|
|
121
|
+
/** `GET /metrics`. */
|
|
122
|
+
export interface AgentInspectMetricsResponse {
|
|
123
|
+
metrics?: AgentInspectMetrics | null;
|
|
124
|
+
/** Per segment, under the list's filters (its period as the list reads it); a server before the counts sends none. */
|
|
125
|
+
segmentCounts?: AdminWireSet<AgentInspectSegmentCount> | null;
|
|
126
|
+
}
|
|
127
|
+
/** `AgentInspectConversationHeader`. */
|
|
128
|
+
export interface AgentInspectConversationHeader {
|
|
129
|
+
aiConversationId?: number | null;
|
|
130
|
+
rootConversationId?: number | null;
|
|
131
|
+
delegatedFromMessageId?: number | null;
|
|
132
|
+
accountId?: number | null;
|
|
133
|
+
agentSpaceId?: number | null;
|
|
134
|
+
title?: string | null;
|
|
135
|
+
purposeName?: string | null;
|
|
136
|
+
initiatorType?: string | null;
|
|
137
|
+
scheduleId?: number | null;
|
|
138
|
+
created?: string | null;
|
|
139
|
+
lastInboundMessageAt?: string | null;
|
|
140
|
+
modelName?: string | null;
|
|
141
|
+
/** The configured model (`modelName`) as the model catalog names it ("GPT-6 Luna"). */
|
|
142
|
+
modelLabel?: string | null;
|
|
143
|
+
modelNameOverride?: string | null;
|
|
144
|
+
reasoningEffort?: string | null;
|
|
145
|
+
runSettingsOverrideCount?: number | null;
|
|
146
|
+
budgetBypass?: boolean | null;
|
|
147
|
+
storesFullRequestSnapshots?: boolean | null;
|
|
148
|
+
/** The sum of the four parts below. */
|
|
149
|
+
treeCostInUSD?: number | null;
|
|
150
|
+
/** What the model calls of the conversation itself cost. */
|
|
151
|
+
modelCallsCostInUSD?: number | null;
|
|
152
|
+
/** What the tool executions of the conversation itself booked. */
|
|
153
|
+
toolExecutionCostInUSD?: number | null;
|
|
154
|
+
/** The overhead booked on the conversation itself (overhead exists per conversation, never per step). */
|
|
155
|
+
overheadCostInUSD?: number | null;
|
|
156
|
+
/** What the other conversations of the tree cost (sub-agents, supervisor), their overhead included; 0 on a sub-agent's header. */
|
|
157
|
+
subAgentsCostInUSD?: number | null;
|
|
158
|
+
treeOverheadCostsInUSD?: number | null;
|
|
159
|
+
treeInputTokens?: number | null;
|
|
160
|
+
treeOutputTokens?: number | null;
|
|
161
|
+
treeCachedInputTokens?: number | null;
|
|
162
|
+
treeConversationCount?: number | null;
|
|
163
|
+
turnCount?: number | null;
|
|
164
|
+
modelCallCount?: number | null;
|
|
165
|
+
toolCallCount?: number | null;
|
|
166
|
+
failedRowCount?: number | null;
|
|
167
|
+
messageCount?: number | null;
|
|
168
|
+
runState?: string | null;
|
|
169
|
+
isRunLive?: boolean | null;
|
|
170
|
+
runHeartbeatAt?: string | null;
|
|
171
|
+
resumeAttempts?: number | null;
|
|
172
|
+
taskPlanTitle?: string | null;
|
|
173
|
+
taskPlanItemCount?: number | null;
|
|
174
|
+
taskPlanOpenItemCount?: number | null;
|
|
175
|
+
taskPlanDoneItemCount?: number | null;
|
|
176
|
+
taskPlanBlockedItemCount?: number | null;
|
|
177
|
+
/** The plan's items with their state: the open plan, or the newest snapshot once the plan is closed (a set on the wire). */
|
|
178
|
+
taskPlanItems?: WireSet<WireTraceTaskPlanItem> | null;
|
|
179
|
+
/** True when the plan figures come from the newest snapshot of a closed plan. */
|
|
180
|
+
isTaskPlanClosed?: boolean | null;
|
|
181
|
+
contextTokens?: number | null;
|
|
182
|
+
contextThresholdTokens?: number | null;
|
|
183
|
+
contextFillPercent?: number | null;
|
|
184
|
+
compactionNodeCount?: number | null;
|
|
185
|
+
loadedSkillCount?: number | null;
|
|
186
|
+
loadedToolCount?: number | null;
|
|
187
|
+
}
|
|
188
|
+
/** `GET /{id}`. */
|
|
189
|
+
export interface AgentInspectConversationResponse {
|
|
190
|
+
header?: AgentInspectConversationHeader | null;
|
|
191
|
+
accountLabel?: AgentInspectLabel | null;
|
|
192
|
+
agentSpaceLabel?: AgentInspectLabel | null;
|
|
193
|
+
}
|
|
194
|
+
export interface AgentInspectConversationArg {
|
|
195
|
+
conversationId: number | string;
|
|
196
|
+
}
|
|
197
|
+
/** Which turns `GET /{id}/trace` returns. */
|
|
198
|
+
export interface AgentInspectTraceArg extends AgentInspectConversationArg {
|
|
199
|
+
detailLevel?: ConversationTraceLevel;
|
|
200
|
+
fromTurnNumber?: number;
|
|
201
|
+
limit?: number;
|
|
202
|
+
afterMessageIndex?: number;
|
|
203
|
+
includeTruncated?: boolean;
|
|
204
|
+
}
|
|
205
|
+
/** `GET /{id}/trace` as sent: `AgentTurnTraces` under `trace`. */
|
|
206
|
+
export interface AgentInspectTraceResponse {
|
|
207
|
+
trace?: unknown;
|
|
208
|
+
}
|
|
209
|
+
/** `AgentTraceCompaction`: one compaction node. */
|
|
210
|
+
export interface AgentInspectCompactionNode {
|
|
211
|
+
compactionNodeId?: number | null;
|
|
212
|
+
/** 0 = over stored rows, higher = over nodes. */
|
|
213
|
+
level?: number | null;
|
|
214
|
+
coveredFromMessageIndex?: number | null;
|
|
215
|
+
coveredToMessageIndex?: number | null;
|
|
216
|
+
coveredMessageCount?: number | null;
|
|
217
|
+
coveredTokens?: number | null;
|
|
218
|
+
summaryTokens?: number | null;
|
|
219
|
+
modelName?: string | null;
|
|
220
|
+
fromRawMessages?: boolean | null;
|
|
221
|
+
createdAt?: string | null;
|
|
222
|
+
/** Debug level: the summary. */
|
|
223
|
+
summaryText?: string | null;
|
|
224
|
+
isSummaryCut?: boolean | null;
|
|
225
|
+
}
|
|
226
|
+
/** The facts of a model call the conversation contract leaves out. */
|
|
227
|
+
export interface AgentInspectModelCallFacts {
|
|
228
|
+
wireApi: string | null;
|
|
229
|
+
cacheWriteTokens: number | null;
|
|
230
|
+
/** The forced tool choice of the call (`none` = a step without tools). */
|
|
231
|
+
forceToolChoice: string | null;
|
|
232
|
+
providerCallMs: number | null;
|
|
233
|
+
loopOverheadMs: number | null;
|
|
234
|
+
hasStoredPayload: boolean;
|
|
235
|
+
}
|
|
236
|
+
/** A side decision of a turn, as the conversation contract carries it. */
|
|
237
|
+
export type AgentInspectDecision = ConversationTraceDecision;
|
|
238
|
+
/** A sub-agent with the facts of its delegation. */
|
|
239
|
+
export interface AgentInspectSubAgent extends ConversationTraceSubAgent {
|
|
240
|
+
delegateCallMessageId: number | null;
|
|
241
|
+
requestedByToolName: string | null;
|
|
242
|
+
notifiesParentWithoutResuming: boolean;
|
|
243
|
+
/** The run state of the sub-agent's conversation. */
|
|
244
|
+
childRunState: string | null;
|
|
245
|
+
/** The tokens are the total of the sub-agent's conversation, because its runs carry no stamp of their own. */
|
|
246
|
+
tokensAreChildConversationTotal: boolean;
|
|
247
|
+
/** When each run was queued, by run number (the swimlanes start a queued run there). */
|
|
248
|
+
queuedAtByRunNumber: Record<number, string>;
|
|
249
|
+
}
|
|
250
|
+
/** A file change with what the files table reads beside the contract's fields. */
|
|
251
|
+
export interface AgentInspectFileChange extends ConversationFileChange {
|
|
252
|
+
conversationId: number | null;
|
|
253
|
+
messageId: number | null;
|
|
254
|
+
toolName: string | null;
|
|
255
|
+
changedAt: string | null;
|
|
256
|
+
hasStoredDiff: boolean;
|
|
257
|
+
}
|
|
258
|
+
/** One step of a turn: the contract's step and the admin facts of its row. */
|
|
259
|
+
export interface AgentInspectStep extends ConversationTraceStep {
|
|
260
|
+
/** The id a link names the step by (`?step=`): the server's, else the step's key in its turn. */
|
|
261
|
+
stepId: string;
|
|
262
|
+
/** The message whose context composition is this model call's (the call's own message unless the server names another). */
|
|
263
|
+
contextMessageId: number | null;
|
|
264
|
+
/** The position of the step's message (`indexInConversation`): where a truncation starts. */
|
|
265
|
+
messageIndex: number | null;
|
|
266
|
+
detailKind: string | null;
|
|
267
|
+
isSilent: boolean;
|
|
268
|
+
/** The row belongs to a branch an admin truncated. */
|
|
269
|
+
isTruncated: boolean;
|
|
270
|
+
isCallToolWithoutToolName: boolean;
|
|
271
|
+
wasRefusedByGate: boolean;
|
|
272
|
+
wasRefusedAsDuplicate: boolean;
|
|
273
|
+
wasRefusedAsFinal: boolean;
|
|
274
|
+
wasRemovedForSecurity: boolean;
|
|
275
|
+
errorCode: string | null;
|
|
276
|
+
executionCostInUsd: number | null;
|
|
277
|
+
modelCallFacts: AgentInspectModelCallFacts | null;
|
|
278
|
+
/** The loaded skills are those of the model call before (the server sends them only when they changed). */
|
|
279
|
+
loadedSkillsSameAsPreviousModelCall: boolean;
|
|
280
|
+
/** The compaction node a `COMPACTION` step wrote, with the messages it covers. */
|
|
281
|
+
compactionNode: AgentInspectCompactionNode | null;
|
|
282
|
+
signalSource: string | null;
|
|
283
|
+
signalText: string | null;
|
|
284
|
+
eventKind: string | null;
|
|
285
|
+
eventSite: string | null;
|
|
286
|
+
eventSubject: string | null;
|
|
287
|
+
eventPayloadExcerpt: string | null;
|
|
288
|
+
subAgent: AgentInspectSubAgent | null;
|
|
289
|
+
fileChanges: AgentInspectFileChange[];
|
|
290
|
+
}
|
|
291
|
+
/** One turn: the contract's turn and what the admin reads of its start and its end. */
|
|
292
|
+
export interface AgentInspectTurn extends ConversationTurnTrace {
|
|
293
|
+
/** The position of the message that started the turn (`indexInConversation`). */
|
|
294
|
+
initiatorMessageIndex: number | null;
|
|
295
|
+
/** The start of the initiator's text (the trace carries no more). */
|
|
296
|
+
initiatorTextExcerpt: string | null;
|
|
297
|
+
/** `OWNER`, `SIGNAL`, `ORCHESTRATOR` or `PLATFORM`. */
|
|
298
|
+
initiatorAuthor: string | null;
|
|
299
|
+
initiatorSignalSource: string | null;
|
|
300
|
+
endedAt: string | null;
|
|
301
|
+
isTruncated: boolean;
|
|
302
|
+
modelCallCount: number;
|
|
303
|
+
toolCallCount: number;
|
|
304
|
+
subAgentCount: number;
|
|
305
|
+
/** The assistant's text messages of the turn, in order. */
|
|
306
|
+
answerMessageIds: number[];
|
|
307
|
+
steps: AgentInspectStep[];
|
|
308
|
+
}
|
|
309
|
+
/** `AgentTurnTraces` as the admin reads it. */
|
|
310
|
+
export interface AgentInspectTrace {
|
|
311
|
+
conversationId: number | null;
|
|
312
|
+
level: ConversationTraceLevel;
|
|
313
|
+
/** Oldest first. */
|
|
314
|
+
turns: AgentInspectTurn[];
|
|
315
|
+
/** How the window was asked for; null when the server does not say. */
|
|
316
|
+
windowMode: ConversationTraceWindowMode | null;
|
|
317
|
+
totalTurnCount: number;
|
|
318
|
+
/** The numbers of the first and the last turn of `turns`; null without turns. */
|
|
319
|
+
firstTurnNumber: number | null;
|
|
320
|
+
lastTurnNumber: number | null;
|
|
321
|
+
/** Facts of a page read (`NEWEST`, `FROM_TURN`); both false on a follow-up read. */
|
|
322
|
+
hasOlderTurns: boolean;
|
|
323
|
+
hasNewerTurns: boolean;
|
|
324
|
+
newestMessageIndex: number | null;
|
|
325
|
+
isRunLive: boolean;
|
|
326
|
+
runState: string | null;
|
|
327
|
+
}
|
|
328
|
+
/** `AgentInspectDelegationBatch`. */
|
|
329
|
+
export interface AgentInspectDelegationBatch {
|
|
330
|
+
delegationBatchId?: number | null;
|
|
331
|
+
spawnedByMessageId?: number | null;
|
|
332
|
+
expectedDelegationCount?: number | null;
|
|
333
|
+
/** When the parent resumes (`ALL`, `ANY`, `QUORUM`, `BACKGROUND`, …). */
|
|
334
|
+
delegateWakeCondition?: string | null;
|
|
335
|
+
quorumSuccessThreshold?: number | null;
|
|
336
|
+
timeoutSeconds?: number | null;
|
|
337
|
+
createdAt?: string | null;
|
|
338
|
+
deadlineAt?: string | null;
|
|
339
|
+
settledAt?: string | null;
|
|
340
|
+
foldedAt?: string | null;
|
|
341
|
+
}
|
|
342
|
+
/** `AgentInspectWaitingWindow`: a window in which the conversation waited for sub-agents. */
|
|
343
|
+
export interface AgentInspectWaitingWindow {
|
|
344
|
+
startedAt?: string | null;
|
|
345
|
+
/** Null while the waiting lasts. */
|
|
346
|
+
endedAt?: string | null;
|
|
347
|
+
delegationBatchIds?: number[] | null;
|
|
348
|
+
/** The `delegate` call messages whose runs without a batch row lie in the window. */
|
|
349
|
+
delegateCallMessageIds?: number[] | null;
|
|
350
|
+
/** What the window was derived from: `DELEGATION_BATCHES`, `SUB_AGENT_RUNS` (the times of runs without a batch row) or `BOTH`. */
|
|
351
|
+
source?: string | null;
|
|
352
|
+
}
|
|
353
|
+
/** `GET /{id}/delegations` as sent (`AgentInspectDelegationTree` under `delegationTree`). */
|
|
354
|
+
export interface AgentInspectDelegationsResponse {
|
|
355
|
+
delegationTree?: {
|
|
356
|
+
aiConversationId?: number | null;
|
|
357
|
+
runState?: string | null;
|
|
358
|
+
subAgents?: unknown;
|
|
359
|
+
batches?: AgentInspectDelegationBatch[] | null;
|
|
360
|
+
waitingWindows?: AgentInspectWaitingWindow[] | null;
|
|
361
|
+
waitingWindowSource?: string | null;
|
|
362
|
+
} | null;
|
|
363
|
+
}
|
|
364
|
+
/** The delegation tree with its sub-agents mapped. */
|
|
365
|
+
export interface AgentInspectDelegationTree {
|
|
366
|
+
conversationId: number | null;
|
|
367
|
+
runState: string | null;
|
|
368
|
+
subAgents: AgentInspectSubAgent[];
|
|
369
|
+
batches: AgentInspectDelegationBatch[];
|
|
370
|
+
waitingWindows: AgentInspectWaitingWindow[];
|
|
371
|
+
/** What the waiting windows were derived from (`DELEGATION_BATCHES`, `SUB_AGENT_RUNS`, `BOTH`); null without windows. */
|
|
372
|
+
waitingWindowSource: string | null;
|
|
373
|
+
}
|
|
374
|
+
/** `GET /{id}/fileChanges` as sent. */
|
|
375
|
+
export interface AgentInspectFileChangesResponse {
|
|
376
|
+
fileChanges?: unknown;
|
|
377
|
+
}
|
|
378
|
+
export interface AgentInspectFileChangeArg extends AgentInspectConversationArg {
|
|
379
|
+
fileChangeId: number | string;
|
|
380
|
+
}
|
|
381
|
+
/** `GET /{id}/fileChanges/{fileChangeId}/diff`. */
|
|
382
|
+
export interface AgentInspectFileChangeDiffResponse {
|
|
383
|
+
fileChange?: unknown;
|
|
384
|
+
/** The whole diff; null for a change without one. */
|
|
385
|
+
diff?: string | null;
|
|
386
|
+
}
|
|
387
|
+
/** `GET /{id}/sandbox` as sent (`AgentInspectSandboxChronicle` under `sandboxChronicle`). */
|
|
388
|
+
export interface AgentInspectSandboxResponse {
|
|
389
|
+
sandboxChronicle?: {
|
|
390
|
+
aiConversationId?: number | null;
|
|
391
|
+
entries?: unknown;
|
|
392
|
+
mounts?: unknown;
|
|
393
|
+
commandCount?: number | null;
|
|
394
|
+
fileChangeCount?: number | null;
|
|
395
|
+
linesAdded?: number | null;
|
|
396
|
+
linesRemoved?: number | null;
|
|
397
|
+
} | null;
|
|
398
|
+
}
|
|
399
|
+
/** One entry of the sandbox chronicle: a shell command or a file change. */
|
|
400
|
+
export interface AgentInspectSandboxEntry {
|
|
401
|
+
key: string;
|
|
402
|
+
kind: "COMMAND" | "FILE_CHANGE";
|
|
403
|
+
at: string | null;
|
|
404
|
+
messageId: number | null;
|
|
405
|
+
messageIndex: number | null;
|
|
406
|
+
toolName: string | null;
|
|
407
|
+
status: string | null;
|
|
408
|
+
terminal: ConversationTraceStep["terminal"];
|
|
409
|
+
fileChange: AgentInspectFileChange | null;
|
|
410
|
+
}
|
|
411
|
+
/** `AgentInspectTouchedFile`. */
|
|
412
|
+
export interface AgentInspectTouchedFile {
|
|
413
|
+
path: string;
|
|
414
|
+
changeCount: number;
|
|
415
|
+
lastChangeType: string | null;
|
|
416
|
+
linesAdded: number;
|
|
417
|
+
linesRemoved: number;
|
|
418
|
+
/** The changes of the file, oldest first. */
|
|
419
|
+
history: AgentInspectFileChange[];
|
|
420
|
+
}
|
|
421
|
+
/** `AgentInspectTouchedMount`. */
|
|
422
|
+
export interface AgentInspectTouchedMount {
|
|
423
|
+
mountKind: string | null;
|
|
424
|
+
mountName: string | null;
|
|
425
|
+
driveSpaceId: number | null;
|
|
426
|
+
files: AgentInspectTouchedFile[];
|
|
427
|
+
}
|
|
428
|
+
/** The sandbox chronicle with its entries and mounts mapped. */
|
|
429
|
+
export interface AgentInspectSandboxChronicle {
|
|
430
|
+
conversationId: number | null;
|
|
431
|
+
entries: AgentInspectSandboxEntry[];
|
|
432
|
+
mounts: AgentInspectTouchedMount[];
|
|
433
|
+
commandCount: number;
|
|
434
|
+
fileChangeCount: number;
|
|
435
|
+
linesAdded: number;
|
|
436
|
+
linesRemoved: number;
|
|
437
|
+
}
|
|
438
|
+
/** `GET /{id}/compactionNodes`. */
|
|
439
|
+
export interface AgentInspectCompactionNodesResponse {
|
|
440
|
+
compactionNodes?: AdminWireSet<AgentInspectCompactionNode> | null;
|
|
441
|
+
}
|
|
442
|
+
export interface AgentInspectMessageRouteArg extends AgentInspectConversationArg {
|
|
443
|
+
messageId: number | string;
|
|
444
|
+
}
|
|
445
|
+
/** `GET /{id}/messages/{messageId}/text` as sent: an `AgentTraceMessage` with the whole text under `message`. */
|
|
446
|
+
export interface AgentInspectMessageTextResponse {
|
|
447
|
+
message?: unknown;
|
|
448
|
+
}
|
|
449
|
+
/** A message of a turn with its text (`AgentTraceMessage`). */
|
|
450
|
+
export type AgentInspectMessage = ConversationTraceMessage;
|
|
451
|
+
/** `GET /{id}/toolCalls/{messageId}/result`. */
|
|
452
|
+
export interface AgentInspectToolCallResultResponse {
|
|
453
|
+
messageId?: number | null;
|
|
454
|
+
result?: string | null;
|
|
455
|
+
resultChars?: number | null;
|
|
456
|
+
}
|
|
457
|
+
/** `RunSettingsOverride`, the switches the action dialog offers; a field left out stays as it is. */
|
|
458
|
+
export interface AgentInspectRunSettingsOverride {
|
|
459
|
+
/** The kill switch of every decision site. */
|
|
460
|
+
decisionModelOff?: boolean;
|
|
461
|
+
/** `inherit`, `off`, `low`, `medium`, `high`. */
|
|
462
|
+
decisionModelReasoningEffort?: string;
|
|
463
|
+
/** `inherit`, `chatCompletions`, `responses`, `messages`. */
|
|
464
|
+
agentWireApi?: string;
|
|
465
|
+
[setting: string]: unknown;
|
|
466
|
+
}
|
|
467
|
+
/** `POST /{id}/drive`. */
|
|
468
|
+
export interface AgentInspectDriveArg extends AgentInspectConversationArg {
|
|
469
|
+
message: string;
|
|
470
|
+
aiModelName?: string;
|
|
471
|
+
budgetBypass?: boolean;
|
|
472
|
+
/** Truncates from this position (`indexInConversation`) before the message is written. */
|
|
473
|
+
truncateFromIndex?: number;
|
|
474
|
+
runSettingsOverride?: AgentInspectRunSettingsOverride;
|
|
475
|
+
/** The turn runs on a worker (default) or inside the request. */
|
|
476
|
+
async?: boolean;
|
|
477
|
+
}
|
|
478
|
+
export interface AgentInspectDriveResponse {
|
|
479
|
+
aiConversationId?: number | null;
|
|
480
|
+
runState?: string | null;
|
|
481
|
+
isAsync?: boolean | null;
|
|
482
|
+
}
|
|
483
|
+
/** `POST /{id}/truncate`. */
|
|
484
|
+
export interface AgentInspectTruncateArg extends AgentInspectConversationArg {
|
|
485
|
+
fromIndex: number;
|
|
486
|
+
}
|
|
487
|
+
export interface AgentInspectTruncateResponse {
|
|
488
|
+
truncatedMessageCount?: number | null;
|
|
489
|
+
}
|
|
490
|
+
/** `POST /{id}/runSettings`. */
|
|
491
|
+
export interface AgentInspectRunSettingsArg extends AgentInspectConversationArg {
|
|
492
|
+
runSettingsOverride: AgentInspectRunSettingsOverride;
|
|
493
|
+
}
|
|
494
|
+
export interface AgentInspectRunSettingsResponse {
|
|
495
|
+
runSettings?: Record<string, unknown> | null;
|
|
496
|
+
}
|
|
497
|
+
/** `AgentToolCallReplay`: the answer of a tool run again with the stored arguments. */
|
|
498
|
+
export interface AgentInspectToolCallReplay {
|
|
499
|
+
messageId?: number | null;
|
|
500
|
+
toolName?: string | null;
|
|
501
|
+
argumentsJson?: string | null;
|
|
502
|
+
result?: string | null;
|
|
503
|
+
resultChars?: number | null;
|
|
504
|
+
isResultCut?: boolean | null;
|
|
505
|
+
isError?: boolean | null;
|
|
506
|
+
durationMs?: number | null;
|
|
507
|
+
isSameAsStoredResult?: boolean | null;
|
|
508
|
+
}
|
|
509
|
+
/** `POST /{id}/toolCalls/{messageId}/replay`. */
|
|
510
|
+
export interface AgentInspectToolCallReplayResponse {
|
|
511
|
+
replay?: AgentInspectToolCallReplay | null;
|
|
512
|
+
}
|
|
513
|
+
/** `POST /{id}/cancel` and `POST /{id}/stop`. */
|
|
514
|
+
export interface AgentInspectRunControlResponse {
|
|
515
|
+
runState?: string | null;
|
|
516
|
+
[field: string]: unknown;
|
|
517
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { AgentInspectedConversation, AgentInspectLabel } from "./agent-inspect-types";
|
|
2
|
+
/** Conversations per request of the export (the list route's cap). */
|
|
3
|
+
export declare const AGENT_CONVERSATION_EXPORT_PAGE_SIZE = 200;
|
|
4
|
+
/** The most conversations one export carries; a filtered list beyond it is cut and the reader is told. */
|
|
5
|
+
export declare const AGENT_CONVERSATION_EXPORT_MAX_ROWS = 5000;
|
|
6
|
+
/** The columns of the export, in order: the table's, with the tokens split and the two dates as moments. */
|
|
7
|
+
export declare const AGENT_CONVERSATION_EXPORT_COLUMNS: readonly ["id", "title", "firstOwnerText", "lastAnswerText", "space", "account", "purpose", "origin", "runState", "turns", "inputTokens", "outputTokens", "cachedInputTokens", "problems", "costInUsd", "models", "subAgents", "created", "lastActivity"];
|
|
8
|
+
export type AgentConversationExportColumn = (typeof AGENT_CONVERSATION_EXPORT_COLUMNS)[number];
|
|
9
|
+
export type AgentConversationExportCell = string | number | null | undefined;
|
|
10
|
+
export type AgentConversationExportRow = Readonly<Record<AgentConversationExportColumn, AgentConversationExportCell>>;
|
|
11
|
+
/**
|
|
12
|
+
* An excerpt of a message as one line: the Markdown marks of emphasis, code and headings left out (`**10 Welten**`
|
|
13
|
+
* reads "10 Welten"), line breaks and runs of blanks as one blank; null for no text.
|
|
14
|
+
*/
|
|
15
|
+
export declare const readAgentConversationExcerpt: (text: string | null | undefined) => string | null;
|
|
16
|
+
/**
|
|
17
|
+
* A text cell a spreadsheet must not run as a formula: a text that starts with `=`, `+`, `-`, `@`, a tab or a
|
|
18
|
+
* carriage return gets a leading apostrophe.
|
|
19
|
+
*/
|
|
20
|
+
export declare const guardCsvText: (text: string) => string;
|
|
21
|
+
/**
|
|
22
|
+
* One cell as RFC 4180 writes it: a number as it is (never guarded: `-3` is a number), a text guarded against
|
|
23
|
+
* formulas and quoted when it holds a comma, a quote or a line break; nothing for no value.
|
|
24
|
+
*/
|
|
25
|
+
export declare const encodeCsvCell: (value: AgentConversationExportCell) => string;
|
|
26
|
+
/** The byte order mark a spreadsheet reads the file as UTF-8 by. */
|
|
27
|
+
export declare const CSV_BYTE_ORDER_MARK = "\uFEFF";
|
|
28
|
+
/** The text of a CSV file (RFC 4180: commas, CRLF line ends, a header line) with a byte order mark before it. */
|
|
29
|
+
export declare const buildCsvText: (header: readonly string[], rows: readonly (readonly AgentConversationExportCell[])[]) => string;
|
|
30
|
+
/** A date-time of the server (UTC without a zone) as an ISO moment (`2026-11-28T21:07:49Z`); nothing for none. */
|
|
31
|
+
export declare const formatAgentConversationExportMoment: (value: string | null | undefined) => string | null;
|
|
32
|
+
export interface AgentConversationExportWords {
|
|
33
|
+
accountLabelById: ReadonlyMap<number, AgentInspectLabel>;
|
|
34
|
+
agentSpaceLabelById: ReadonlyMap<number, AgentInspectLabel>;
|
|
35
|
+
/** The origin of a conversation in the reader's words. */
|
|
36
|
+
describeOrigin: (conversation: AgentInspectedConversation) => string;
|
|
37
|
+
/** A run state in the reader's words. */
|
|
38
|
+
describeRunState: (runState: string) => string;
|
|
39
|
+
/** How a conversation at the level of its account (no space) is named. */
|
|
40
|
+
accountLevelLabel: string;
|
|
41
|
+
}
|
|
42
|
+
/** One conversation as the cells of its export row. */
|
|
43
|
+
export declare const buildAgentConversationExportRow: (conversation: AgentInspectedConversation, words: AgentConversationExportWords) => AgentConversationExportRow;
|
|
44
|
+
/** The CSV text of the export: the header in the reader's words, one line per conversation, columns in their order. */
|
|
45
|
+
export declare const buildAgentConversationExportCsv: (headerByColumn: Readonly<Record<AgentConversationExportColumn, string>>, rows: readonly AgentConversationExportRow[]) => string;
|
|
46
|
+
/**
|
|
47
|
+
* The name of the export's file with its period: `agent-conversations_2026-11-22_2026-11-28.csv`, an open bound as
|
|
48
|
+
* `from-…` or `until-…`, no bounds as `agent-conversations_all.csv`.
|
|
49
|
+
*/
|
|
50
|
+
export declare const buildAgentConversationExportFileName: ({ from, to }: {
|
|
51
|
+
from?: string;
|
|
52
|
+
to?: string;
|
|
53
|
+
}) => string;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the export goes on after a page, and from where: it stops at the last page (the route says no more, or
|
|
56
|
+
* the page is empty) and at the cap, where it says that the list was cut.
|
|
57
|
+
*/
|
|
58
|
+
export declare const readAgentConversationExportProgress: (loadedRowCount: number, page: {
|
|
59
|
+
rowCount: number;
|
|
60
|
+
hasMore: boolean;
|
|
61
|
+
}, maximumRows?: number) => {
|
|
62
|
+
isDone: boolean;
|
|
63
|
+
wasCut: boolean;
|
|
64
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type AgentInspectListArg, type AgentInspectSegment, type AgentInspectSortOrder } from "./agent-inspect-types";
|
|
2
|
+
/**
|
|
3
|
+
* The filters of the conversations list as the URL holds them: one search parameter per key, each a string (`""` =
|
|
4
|
+
* unset), lists comma-separated. Pure, so the mapping between the URL and the request is covered by tests.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AGENT_CONVERSATION_LIST_KEYS: readonly ["segment", "q", "period", "from", "to", "accounts", "spaces", "purpose", "states", "origin", "model", "tool", "skill", "minCost", "evalRuns", "sort", "page"];
|
|
7
|
+
export type AgentConversationListKey = (typeof AGENT_CONVERSATION_LIST_KEYS)[number];
|
|
8
|
+
export type AgentConversationListValues = Readonly<Record<AgentConversationListKey, string>>;
|
|
9
|
+
/** The keys that are no filter of the toolbar's count: the search has its own clear button, the segment and the page are places, the order is no filter. */
|
|
10
|
+
export declare const AGENT_CONVERSATION_LIST_UNCOUNTED_KEYS: readonly AgentConversationListKey[];
|
|
11
|
+
/** The periods the list offers; `custom` shows the two day fields, `all` has no bounds. */
|
|
12
|
+
export declare const AGENT_CONVERSATION_LIST_PERIODS: readonly ["today", "7d", "30d", "all", "custom"];
|
|
13
|
+
export type AgentConversationListPeriod = (typeof AGENT_CONVERSATION_LIST_PERIODS)[number];
|
|
14
|
+
/** The period of a list whose URL names none: the one the metrics default to. */
|
|
15
|
+
export declare const AGENT_CONVERSATION_LIST_DEFAULT_PERIOD: AgentConversationListPeriod;
|
|
16
|
+
/** `day` moved by `days` calendar days (`YYYY-MM-DD`, no clock involved). */
|
|
17
|
+
export declare const shiftAgentInspectDay: (day: string, days: number) => string;
|
|
18
|
+
/** The period the values name: the URL's, else the default; a custom period needs at least one valid day. */
|
|
19
|
+
export declare const readAgentConversationListPeriod: (values: Pick<AgentConversationListValues, "period" | "from" | "to">) => AgentConversationListPeriod;
|
|
20
|
+
/** The first and the last day (inclusive) of the values' period on `today`; an open bound is left out. */
|
|
21
|
+
export declare const resolveAgentConversationListPeriod: (values: Pick<AgentConversationListValues, "period" | "from" | "to">, today: string) => {
|
|
22
|
+
from?: string;
|
|
23
|
+
to?: string;
|
|
24
|
+
};
|
|
25
|
+
/** The values of a comma-separated key, trimmed, without empty ones and repeats. */
|
|
26
|
+
export declare const readAgentConversationListValues: (value: string) => string[];
|
|
27
|
+
/** The ids of a comma-separated key; anything that is no positive whole number is dropped. */
|
|
28
|
+
export declare const readAgentConversationListIds: (value: string) => number[];
|
|
29
|
+
/** The segment the values name; an unknown one reads as all. */
|
|
30
|
+
export declare const readAgentConversationListSegment: (value: string) => AgentInspectSegment;
|
|
31
|
+
/** The order the values name; an unknown one reads as last activity first. */
|
|
32
|
+
export declare const readAgentConversationListSort: (value: string) => AgentInspectSortOrder;
|
|
33
|
+
/** The page the values name, from 1. */
|
|
34
|
+
export declare const readAgentConversationListPage: (value: string) => number;
|
|
35
|
+
/** A cost threshold as typed (`0.10`, `0,10`); undefined for no or an unreadable value. */
|
|
36
|
+
export declare const readAgentConversationListCost: (value: string) => number | undefined;
|
|
37
|
+
export interface AgentConversationListArgOptions {
|
|
38
|
+
/** The viewer's day (`YYYY-MM-DD`) the periods are resolved on. */
|
|
39
|
+
today: string;
|
|
40
|
+
/** Conversations per page. */
|
|
41
|
+
pageSize: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The request of the list for the URL's values. A value the route would refuse (an unknown segment or run state, a
|
|
45
|
+
* day that is none, a cost that is no number) is left out, so a hand-edited URL still lists.
|
|
46
|
+
*/
|
|
47
|
+
export declare const buildAgentConversationListArg: (values: AgentConversationListValues, { today, pageSize }: AgentConversationListArgOptions) => AgentInspectListArg;
|
|
48
|
+
/**
|
|
49
|
+
* The request of the metrics and the segment counts: the list's filters without its page and its order (neither
|
|
50
|
+
* changes a figure). The segment stays: the metrics follow it, the counts ignore it.
|
|
51
|
+
*/
|
|
52
|
+
export declare const buildAgentConversationMetricsArg: (values: AgentConversationListValues, today: string) => AgentInspectListArg;
|
|
53
|
+
/**
|
|
54
|
+
* The URL values that stand for a request (the reverse of `buildAgentConversationListArg` for a custom period): what
|
|
55
|
+
* a link to a filtered list carries. Keys the request does not set are `""`.
|
|
56
|
+
*/
|
|
57
|
+
export declare const buildAgentConversationListValues: (arg: AgentInspectListArg) => AgentConversationListValues;
|
|
58
|
+
/** The query string of a link to the list with these values (`?segment=RUNNING&q=…`), `""` without any. */
|
|
59
|
+
export declare const buildAgentConversationListSearch: (values: Partial<AgentConversationListValues>) => string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { TraceTurnTotals } from "../../chat/trace/trace-types";
|
|
2
|
+
import type { AgentInspectStep } from "./agent-inspect-types";
|
|
3
|
+
/** The switches, in the order of the bar. */
|
|
4
|
+
export declare const AGENT_INSPECT_DEBUG_SWITCH_NAMES: readonly ["skills", "toolCalls", "argumentsAndResults", "modelAndEffort", "tokensAndCosts", "times", "compaction", "subAgents", "widgets", "signalsAndDecisions"];
|
|
5
|
+
export type AgentInspectDebugSwitchName = (typeof AGENT_INSPECT_DEBUG_SWITCH_NAMES)[number];
|
|
6
|
+
/** Which switch is on. */
|
|
7
|
+
export type AgentInspectDebugSwitches = Readonly<Record<AgentInspectDebugSwitchName, boolean>>;
|
|
8
|
+
/** Every switch on except the signals and decisions (they are many and quiet: the reader turns them on when needed). */
|
|
9
|
+
export declare const AGENT_INSPECT_DEBUG_SWITCH_DEFAULTS: AgentInspectDebugSwitches;
|
|
10
|
+
export declare const AGENT_INSPECT_DEBUG_SWITCH_CONTEXT = "agent-debug-switch";
|
|
11
|
+
/** The words of the switches. */
|
|
12
|
+
export declare const AGENT_INSPECT_DEBUG_SWITCH_LABELS: Readonly<Record<AgentInspectDebugSwitchName, string>>;
|
|
13
|
+
/**
|
|
14
|
+
* The switches as a stored text keeps them: the names of the switches that differ from the defaults, each with `+`
|
|
15
|
+
* (on) or `-` (off), comma-separated (`-times,+signalsAndDecisions`); `""` = the defaults.
|
|
16
|
+
*/
|
|
17
|
+
export declare const writeAgentInspectDebugSwitches: (switches: AgentInspectDebugSwitches) => string;
|
|
18
|
+
/** The switches a stored text names (`writeAgentInspectDebugSwitches`); an unknown or broken part is ignored. */
|
|
19
|
+
export declare const readAgentInspectDebugSwitches: (text: string | null | undefined) => AgentInspectDebugSwitches;
|
|
20
|
+
/**
|
|
21
|
+
* The steps of a turn as the switches show them: the kinds of a switch that is off are left out, and the facts of a
|
|
22
|
+
* switch that is off are taken off the steps that stay (arguments and results, tokens and costs, durations, the
|
|
23
|
+
* loaded skills). A step the reader opened by a link stays, whatever the switches say (`keptStepId`).
|
|
24
|
+
*/
|
|
25
|
+
export declare const applyAgentInspectDebugSwitches: <TStep extends AgentInspectStep>(steps: readonly TStep[], switches: AgentInspectDebugSwitches, keptStepId?: string | null) => TStep[];
|
|
26
|
+
/** The totals of a turn as the switches show them: tokens and costs, and the duration, only while their switch is on. */
|
|
27
|
+
export declare const applyAgentInspectDebugSwitchesToTotals: <TTotals extends TraceTurnTotals>(totals: TTotals, switches: AgentInspectDebugSwitches) => TTotals;
|