@mgamadeus/ddd-agents 0.11.13 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -6
- package/boundary.json +5 -0
- package/dist/admin.js +13712 -0
- package/dist/admin.js.map +1 -0
- package/dist/chat.js +1627 -109
- package/dist/chat.js.map +1 -1
- package/dist/chunks/{AgentsConversationClientContext-C4T7g_Qk.js → AgentsConversationClientContext-B_UJSLXU.js} +2 -2
- package/dist/chunks/{AgentsConversationClientContext-C4T7g_Qk.js.map → AgentsConversationClientContext-B_UJSLXU.js.map} +1 -1
- package/dist/chunks/{ConversationMarkdown-D-aP3Ssl.js → ConversationMarkdown-DlvwT3Qk.js} +5 -4
- package/dist/chunks/{ConversationMarkdown-D-aP3Ssl.js.map → ConversationMarkdown-DlvwT3Qk.js.map} +1 -1
- package/dist/chunks/{ConversationMessageInputComposerWidgets-7HNAmZE1.js → ConversationMessageInputComposerWidgets-TchR1lPj.js} +6 -6
- package/dist/chunks/{ConversationMessageInputComposerWidgets-7HNAmZE1.js.map → ConversationMessageInputComposerWidgets-TchR1lPj.js.map} +1 -1
- package/dist/chunks/{VoiceBarsIcon-FhLAcgLG.js → VoiceBarsIcon-y3mgSqbn.js} +4 -4
- package/dist/chunks/{VoiceBarsIcon-FhLAcgLG.js.map → VoiceBarsIcon-y3mgSqbn.js.map} +1 -1
- package/dist/chunks/{WebSearchResultsConversationWidget-dEq19U7k.js → WebSearchResultsConversationWidget-l9Aek_lG.js} +3 -2
- package/dist/chunks/WebSearchResultsConversationWidget-l9Aek_lG.js.map +1 -0
- package/dist/chunks/agents-http-trace-mappers-LWNi-3a4.js +759 -0
- package/dist/chunks/agents-http-trace-mappers-LWNi-3a4.js.map +1 -0
- package/dist/chunks/{browser-request-interception-ydNOzeUL.js → browser-request-interception-D678IemW.js} +2 -2
- package/dist/chunks/{browser-request-interception-ydNOzeUL.js.map → browser-request-interception-D678IemW.js.map} +1 -1
- package/dist/chunks/{canvas-reducers-BInd3xNz.js → canvas-reducers-BYArW_Ji.js} +2 -2
- package/dist/chunks/{canvas-reducers-BInd3xNz.js.map → canvas-reducers-BYArW_Ji.js.map} +1 -1
- package/dist/chunks/{canvas-title-slot-context-BI1PLnPn.js → canvas-title-slot-context-BRGnFzYP.js} +3 -3
- package/dist/chunks/{canvas-title-slot-context-BI1PLnPn.js.map → canvas-title-slot-context-BRGnFzYP.js.map} +1 -1
- package/dist/chunks/{canvasBodies-CRVh8pCw.js → canvasBodies-BjXypuHf.js} +4 -4
- package/dist/chunks/{canvasBodies-CRVh8pCw.js.map → canvasBodies-BjXypuHf.js.map} +1 -1
- package/dist/chunks/{canvasStorage-Cr3omZeI.js → canvasStorage-DSspwRMg.js} +2 -2
- package/dist/chunks/{canvasStorage-Cr3omZeI.js.map → canvasStorage-DSspwRMg.js.map} +1 -1
- package/dist/chunks/content-from-unified-diff-CovnmG2Q.js +2927 -0
- package/dist/chunks/content-from-unified-diff-CovnmG2Q.js.map +1 -0
- package/dist/chunks/{contract-C18owGKs.js → contract-886XjdID.js} +2 -2
- package/dist/chunks/{contract-C18owGKs.js.map → contract-886XjdID.js.map} +1 -1
- package/dist/chunks/{conversation-CbWEHPbL.js → conversation-B7-evdj_.js} +4 -4
- package/dist/chunks/{conversation-CbWEHPbL.js.map → conversation-B7-evdj_.js.map} +1 -1
- package/dist/chunks/{icon-names-Di6c4zLo.js → icon-names-C5PeVvkJ.js} +32 -1
- package/dist/chunks/icon-names-C5PeVvkJ.js.map +1 -0
- package/dist/chunks/{link-navigation-DRHt6g7U.js → index-DZovGMpG.js} +65 -106
- package/dist/chunks/index-DZovGMpG.js.map +1 -0
- package/dist/chunks/link-navigation-a_sRfmsj.js +49 -0
- package/dist/chunks/link-navigation-a_sRfmsj.js.map +1 -0
- package/dist/chunks/{widget-name-resolver-Dq6Ejo7d.js → widget-name-resolver-DS3zH_5W.js} +5 -4
- package/dist/chunks/{widget-name-resolver-Dq6Ejo7d.js.map → widget-name-resolver-DS3zH_5W.js.map} +1 -1
- package/dist/chunks/{withPollingChangeSubscription-ClyOABgu.js → withPollingChangeSubscription-XvCpjGmd.js} +13 -2
- package/dist/chunks/{withPollingChangeSubscription-ClyOABgu.js.map → withPollingChangeSubscription-XvCpjGmd.js.map} +1 -1
- package/dist/client-testing.js +5 -5
- package/dist/client.js +50 -231
- package/dist/client.js.map +1 -1
- package/dist/contract.js +5 -5
- package/dist/files/i18n-keys.json +18091 -1287
- package/dist/files/widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.md +3 -3
- package/dist/image-render.js +7 -7
- package/dist/index.js +62 -61
- package/dist/index.js.map +1 -1
- package/dist/kit.js +2 -2
- package/dist/preview.js +7 -7
- package/dist/provider.js +57 -56
- package/dist/provider.js.map +1 -1
- package/dist/renderer.js +15 -15
- package/dist/styles.css +2962 -15
- package/dist/types/admin/blocks/CodeBlock.d.ts +28 -0
- package/dist/types/admin/blocks/DetailModal.d.ts +34 -0
- package/dist/types/admin/blocks/Disclosure.d.ts +25 -0
- package/dist/types/admin/blocks/JsonTree.d.ts +18 -0
- package/dist/types/admin/blocks/LineDiffView.d.ts +18 -0
- package/dist/types/admin/blocks/ProportionBar.d.ts +43 -0
- package/dist/types/admin/blocks/TokenFigure.d.ts +14 -0
- package/dist/types/admin/blocks/json-tree.d.ts +40 -0
- package/dist/types/admin/blocks/line-diff.d.ts +46 -0
- package/dist/types/admin/blocks/proportion-bar.d.ts +34 -0
- package/dist/types/admin/blocks/series-fill-classes.d.ts +13 -0
- package/dist/types/admin/blocks/token-figure.d.ts +8 -0
- package/dist/types/admin/connections/AgentConnectionCard.d.ts +21 -0
- package/dist/types/admin/connections/AgentConnectionDriveRootSpaces.d.ts +25 -0
- package/dist/types/admin/connections/AgentConnectionDriveScopeDialog.d.ts +20 -0
- package/dist/types/admin/connections/AgentConnectionDriveSearchFilters.d.ts +34 -0
- package/dist/types/admin/connections/AgentConnectionDrivesDrawer.d.ts +39 -0
- package/dist/types/admin/connections/AgentConnectionLevelsDrawer.d.ts +27 -0
- package/dist/types/admin/connections/AgentConnectionSharingDialog.d.ts +12 -0
- package/dist/types/admin/connections/AgentConnectionsPanel.d.ts +97 -0
- package/dist/types/admin/connections/AgentConnectionsScreen.d.ts +18 -0
- package/dist/types/admin/connections/ConnectDialogs.d.ts +22 -0
- package/dist/types/admin/connections/agent-connection-drive-scope.d.ts +112 -0
- package/dist/types/admin/connections/agent-connection-drives.d.ts +107 -0
- package/dist/types/admin/connections/agent-connection-format.d.ts +82 -0
- package/dist/types/admin/connections/agent-connection-oauth.d.ts +122 -0
- package/dist/types/admin/connections/agent-connections-api.d.ts +420 -0
- package/dist/types/admin/connections/agent-connections-context.d.ts +60 -0
- package/dist/types/admin/connections/agent-connections-types.d.ts +447 -0
- package/dist/types/admin/connections/connection-logos.d.ts +53 -0
- package/dist/types/admin/connections/connection-parts.d.ts +84 -0
- package/dist/types/admin/connections/use-agent-connect.d.ts +25 -0
- package/dist/types/admin/context/CompactionThresholdBanner.d.ts +13 -0
- package/dist/types/admin/context/ContextCompositionPanel.d.ts +27 -0
- package/dist/types/admin/context/ContextSegmentList.d.ts +20 -0
- package/dist/types/admin/context/SentPayloadPanel.d.ts +37 -0
- package/dist/types/admin/context/agent-inspect-context-api.d.ts +53 -0
- package/dist/types/admin/context/agent-inspect-context-types.d.ts +98 -0
- package/dist/types/admin/context/context-composition-grouping.d.ts +78 -0
- package/dist/types/admin/context/context-segment-families.d.ts +18 -0
- package/dist/types/admin/context/context-segment-label-texts.d.ts +19 -0
- package/dist/types/admin/context/context-segment-labels.d.ts +18 -0
- package/dist/types/admin/control-panel/AgentControlPanelScreen.d.ts +71 -0
- package/dist/types/admin/control-panel/BudgetsTab.d.ts +13 -0
- package/dist/types/admin/control-panel/SettingsTab.d.ts +22 -0
- package/dist/types/admin/control-panel/SpacesTab.d.ts +24 -0
- package/dist/types/admin/control-panel/StatisticsTab.d.ts +26 -0
- package/dist/types/admin/control-panel/TimeSeriesChartCard.d.ts +37 -0
- package/dist/types/admin/control-panel/ToolResponseSamplesDrawer.d.ts +22 -0
- package/dist/types/admin/control-panel/agent-control-panel-api.d.ts +104 -0
- package/dist/types/admin/control-panel/agent-control-panel-types.d.ts +241 -0
- package/dist/types/admin/control-panel/budget-meters.d.ts +35 -0
- package/dist/types/admin/control-panel/control-panel-statistics.d.ts +49 -0
- package/dist/types/admin/control-panel/runtime-settings-form.d.ts +44 -0
- package/dist/types/admin/control-panel/time-series-chart.d.ts +54 -0
- package/dist/types/admin/conversations/AgentConversationDetailScreen.d.ts +128 -0
- package/dist/types/admin/conversations/AgentConversationsScreen.d.ts +60 -0
- package/dist/types/admin/conversations/ContextPanel.d.ts +9 -0
- package/dist/types/admin/conversations/ConversationActions.d.ts +32 -0
- package/dist/types/admin/conversations/ConversationTurns.d.ts +56 -0
- package/dist/types/admin/conversations/DebugSwitchBar.d.ts +23 -0
- package/dist/types/admin/conversations/DelegationPanel.d.ts +6 -0
- package/dist/types/admin/conversations/ModelContextDialog.d.ts +31 -0
- package/dist/types/admin/conversations/RequestCompositionRows.d.ts +14 -0
- package/dist/types/admin/conversations/RequestsPanel.d.ts +21 -0
- package/dist/types/admin/conversations/SandboxPanel.d.ts +42 -0
- package/dist/types/admin/conversations/StepDetailDialog.d.ts +19 -0
- package/dist/types/admin/conversations/agent-inspect-api.d.ts +259 -0
- package/dist/types/admin/conversations/agent-inspect-mappers.d.ts +23 -0
- package/dist/types/admin/conversations/agent-inspect-types.d.ts +517 -0
- package/dist/types/admin/conversations/conversation-list-export.d.ts +64 -0
- package/dist/types/admin/conversations/conversation-list-filters.d.ts +59 -0
- package/dist/types/admin/conversations/debug-switches.d.ts +27 -0
- package/dist/types/admin/conversations/delegation-swimlanes.d.ts +78 -0
- package/dist/types/admin/conversations/header-facts.d.ts +23 -0
- package/dist/types/admin/conversations/inspect-format.d.ts +44 -0
- package/dist/types/admin/conversations/inspect-parts.d.ts +42 -0
- package/dist/types/admin/conversations/inspect-scope.d.ts +92 -0
- package/dist/types/admin/conversations/model-call-rows.d.ts +78 -0
- package/dist/types/admin/conversations/step-descriptions.d.ts +43 -0
- package/dist/types/admin/conversations/touched-files-tree.d.ts +47 -0
- package/dist/types/admin/conversations/turn-paging.d.ts +56 -0
- package/dist/types/admin/conversations/turn-segments.d.ts +36 -0
- package/dist/types/admin/conversations/turn-timeline.d.ts +22 -0
- package/dist/types/admin/conversations/use-query-loader.d.ts +8 -0
- package/dist/types/admin/period/AdminPeriodControl.d.ts +15 -0
- package/dist/types/admin/period/admin-period.d.ts +51 -0
- package/dist/types/admin/quality/AgentQualityEvalRunScreen.d.ts +30 -0
- package/dist/types/admin/quality/AgentQualityScreen.d.ts +38 -0
- package/dist/types/admin/quality/SaveAsEvalCaseDialog.d.ts +27 -0
- package/dist/types/admin/quality/agent-quality-api.d.ts +86 -0
- package/dist/types/admin/quality/agent-quality-format.d.ts +52 -0
- package/dist/types/admin/quality/agent-quality-types.d.ts +161 -0
- package/dist/types/admin/schedules/AgentSchedulesPanel.d.ts +43 -0
- package/dist/types/admin/schedules/agent-schedules-api.d.ts +116 -0
- package/dist/types/admin/schedules/agent-schedules-format.d.ts +25 -0
- package/dist/types/admin/schedules/agent-schedules-types.d.ts +113 -0
- package/dist/types/admin/shared/AdminHrefLink.d.ts +13 -0
- package/dist/types/admin/skills/AgentSkillCatalogScreen.d.ts +51 -0
- package/dist/types/admin/skills/SharedBlocksPanel.d.ts +14 -0
- package/dist/types/admin/skills/SkillPurposesPanel.d.ts +16 -0
- package/dist/types/admin/skills/SkillTreeRowView.d.ts +31 -0
- package/dist/types/admin/skills/ToolSchemaDrawer.d.ts +21 -0
- package/dist/types/admin/skills/agent-skill-catalog-api.d.ts +89 -0
- package/dist/types/admin/skills/agent-skill-catalog-types.d.ts +223 -0
- package/dist/types/admin/skills/skill-catalog-colors.d.ts +10 -0
- package/dist/types/admin/skills/skill-catalog-tree.d.ts +159 -0
- package/dist/types/admin/skills/skill-purpose-texts.d.ts +11 -0
- package/dist/types/admin/wire/admin-wire.d.ts +21 -0
- package/dist/types/chat/controller/AgentChatController.d.ts +22 -0
- package/dist/types/chat/controller/turn-initiators.d.ts +21 -0
- package/dist/types/chat/trace/BackgroundTasksList.d.ts +35 -0
- package/dist/types/chat/trace/ChangeSetCard.d.ts +34 -0
- package/dist/types/chat/trace/ChangedFilesPane.d.ts +33 -0
- package/dist/types/chat/trace/ChangedRecordsList.d.ts +34 -0
- package/dist/types/chat/trace/ConsentRequestCard.d.ts +23 -0
- package/dist/types/chat/trace/ContextRing.d.ts +19 -0
- package/dist/types/chat/trace/ConversationChildTrace.d.ts +18 -0
- package/dist/types/chat/trace/ConversationTurnTrace.d.ts +48 -0
- package/dist/types/chat/trace/EntityChip.d.ts +23 -0
- package/dist/types/chat/trace/FileChangesSummary.d.ts +14 -0
- package/dist/types/chat/trace/FileEditBlock.d.ts +42 -0
- package/dist/types/chat/trace/LoadedSkillsDisclosure.d.ts +16 -0
- package/dist/types/chat/trace/QueuedMessageChip.d.ts +17 -0
- package/dist/types/chat/trace/RunStatusLine.d.ts +27 -0
- package/dist/types/chat/trace/StepKindDetails.d.ts +59 -0
- package/dist/types/chat/trace/SubAgentStepGroup.d.ts +53 -0
- package/dist/types/chat/trace/TaskPlanPane.d.ts +31 -0
- package/dist/types/chat/trace/TaskPlanRow.d.ts +28 -0
- package/dist/types/chat/trace/TerminalBlock.d.ts +16 -0
- package/dist/types/chat/trace/ThinkingBlock.d.ts +19 -0
- package/dist/types/chat/trace/ToolStepDetail.d.ts +49 -0
- package/dist/types/chat/trace/ToolStepGroup.d.ts +58 -0
- package/dist/types/chat/trace/ToolStepRow.d.ts +52 -0
- package/dist/types/chat/trace/TraceViewModeSwitch.d.ts +14 -0
- package/dist/types/chat/trace/TurnMetaLine.d.ts +27 -0
- package/dist/types/chat/trace/content-from-unified-diff.d.ts +25 -0
- package/dist/types/chat/trace/conversation-trace-loader.d.ts +133 -0
- package/dist/types/chat/trace/index.d.ts +34 -0
- package/dist/types/chat/trace/parse-unified-diff.d.ts +51 -0
- package/dist/types/chat/trace/task-plan-counts.d.ts +41 -0
- package/dist/types/chat/trace/trace-collect.d.ts +91 -0
- package/dist/types/chat/trace/trace-counts.d.ts +21 -0
- package/dist/types/chat/trace/trace-format.d.ts +73 -0
- package/dist/types/chat/trace/trace-labels.d.ts +60 -0
- package/dist/types/chat/trace/trace-parts.d.ts +63 -0
- package/dist/types/chat/trace/trace-step-focus.d.ts +12 -0
- package/dist/types/chat/trace/trace-types.d.ts +370 -0
- package/dist/types/chat/trace/use-conversation-trace.d.ts +47 -0
- package/dist/types/client/AgentsConversationClient.d.ts +20 -0
- package/dist/types/client/http/agents-http-trace-mappers.d.ts +31 -0
- package/dist/types/client/http/agents-http-trace-wire.d.ts +433 -0
- package/dist/types/contract/conversation-trace.d.ts +594 -0
- package/dist/types/entries/admin.d.ts +85 -0
- package/dist/types/entries/chat.d.ts +3 -1
- package/dist/types/entries/client.d.ts +2 -0
- package/dist/types/entries/contract.d.ts +1 -0
- package/dist/types/provider/components/icon-names.d.ts +4 -2
- package/dist/types/provider/components/types.d.ts +3 -1
- package/dist/types/widgets/DriveFilesConversationWidget/shared/drive-files.d.ts +1 -1
- package/dist/voice.js +3 -3
- package/dist/widgets.js +6 -6
- package/package.json +7 -3
- package/public-api.json +1036 -3
- package/dist/chunks/WebSearchResultsConversationWidget-dEq19U7k.js.map +0 -1
- package/dist/chunks/icon-names-Di6c4zLo.js.map +0 -1
- package/dist/chunks/link-navigation-DRHt6g7U.js.map +0 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import type { AgentSkillCatalog, AgentSkillCatalogEntry, AgentSkillCatalogNamespaceGroup, AgentSkillCatalogPackage, AgentSkillCatalogPurposeGroup, AgentSkillCatalogSharedBlock, AgentSkillCatalogTool, AgentSkillCatalogToolComponents, AgentSkillLoadCounts, AgentSkillSharedBlocksResponse, AgentSkillTokenEntry } from "./agent-skill-catalog-types";
|
|
2
|
+
/**
|
|
3
|
+
* Named token counts as a list, whatever shape they arrived in: a map keeps its key order, a list of
|
|
4
|
+
* `{ name, tokens }` its own, an empty list (how an empty map arrives) or anything else gives none.
|
|
5
|
+
*/
|
|
6
|
+
export declare const normalizeSkillTokenEntries: (value: unknown) => AgentSkillTokenEntry[];
|
|
7
|
+
/** The parameters of a tool with their tokens: the list form (`parameterTokens`) when sent, else the map. */
|
|
8
|
+
export declare const skillToolParameterTokensOf: (components: AgentSkillCatalogToolComponents | null | undefined) => AgentSkillTokenEntry[];
|
|
9
|
+
/** The shared definitions of a tool with their tokens: the list form (`defTokens`) when sent, else the map. */
|
|
10
|
+
export declare const skillToolDefinitionTokensOf: (components: AgentSkillCatalogToolComponents | null | undefined) => AgentSkillTokenEntry[];
|
|
11
|
+
/** The loads of a period by skill name (`AgentSkillLoadCounts`); a skill named twice adds up. */
|
|
12
|
+
export declare const skillLoadCountsByNameOf: (loadCounts: AgentSkillLoadCounts | null | undefined) => Map<string, number>;
|
|
13
|
+
/** The kind of a part of a tool's wire schema. */
|
|
14
|
+
export type SkillToolTokenPartKind = "description" | "parameter" | "envelope" | "definition";
|
|
15
|
+
/** One part of a tool's wire schema with its tokens. */
|
|
16
|
+
export interface SkillToolTokenPart {
|
|
17
|
+
key: string;
|
|
18
|
+
kind: SkillToolTokenPartKind;
|
|
19
|
+
/** The parameter or definition name; empty for the description and the envelope. */
|
|
20
|
+
name: string;
|
|
21
|
+
tokens: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The parts of a tool's tokens in the order of the bar: the description, every parameter, the envelope, every shared
|
|
25
|
+
* definition. Parts without tokens are left out.
|
|
26
|
+
*/
|
|
27
|
+
export declare const buildSkillToolTokenParts: (components: AgentSkillCatalogToolComponents | null | undefined) => SkillToolTokenPart[];
|
|
28
|
+
type JsonSchemaLike = Readonly<Record<string, unknown>>;
|
|
29
|
+
/**
|
|
30
|
+
* A JSON-Schema type in one short text: `string`, `integer`, `array<string>`, `enum(3)`, `object{name, id}`, a `$ref`
|
|
31
|
+
* by its definition name, unions as `a | b`, a nullable type with ` | null`. Nested types are named, not unfolded
|
|
32
|
+
* (two levels at most).
|
|
33
|
+
*/
|
|
34
|
+
export declare const summarizeJsonSchemaType: (schema: unknown, depth?: number) => string;
|
|
35
|
+
/** One row of a tool's parameter table. */
|
|
36
|
+
export interface SkillToolParameterRow {
|
|
37
|
+
name: string;
|
|
38
|
+
/** The type in short (`summarizeJsonSchemaType`). */
|
|
39
|
+
type: string;
|
|
40
|
+
isRequired: boolean;
|
|
41
|
+
/** The parameter's tokens; `null` when the breakdown does not name it. */
|
|
42
|
+
tokens: number | null;
|
|
43
|
+
description: string;
|
|
44
|
+
}
|
|
45
|
+
/** The `function.parameters` schema of a tool's wire schema; `null` when the schema has none. */
|
|
46
|
+
export declare const skillToolParametersSchemaOf: (openAiToolSchema: unknown) => JsonSchemaLike | null;
|
|
47
|
+
/** The description of a tool's wire schema (`function.description`). */
|
|
48
|
+
export declare const skillToolDescriptionOf: (openAiToolSchema: unknown) => string;
|
|
49
|
+
/**
|
|
50
|
+
* A text without the line breaks of its source's line length: a single line break between two lines of prose becomes a
|
|
51
|
+
* space; an empty line (a paragraph) and a break before a list line (`-`, `*`, `1.`) stay.
|
|
52
|
+
*/
|
|
53
|
+
export declare const unwrapHardLineBreaks: (text: string) => string;
|
|
54
|
+
/**
|
|
55
|
+
* The parameters of a tool for its table, from `function.parameters.properties` of the wire schema, with the tokens of
|
|
56
|
+
* the breakdown: heaviest first where tokens are known, the rest in schema order. A parameter the breakdown names but
|
|
57
|
+
* the schema lacks is listed too (type `any`). A description loses the line breaks of its source's line length.
|
|
58
|
+
*/
|
|
59
|
+
export declare const buildSkillToolParameterRows: (openAiToolSchema: unknown, components: AgentSkillCatalogToolComponents | null | undefined) => SkillToolParameterRow[];
|
|
60
|
+
/** One row of a skill tree: a skill and the sub-skills listed under it. */
|
|
61
|
+
export interface SkillTreeRow {
|
|
62
|
+
skill: AgentSkillCatalogEntry;
|
|
63
|
+
subSkills: AgentSkillCatalogEntry[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A tree over `candidates`: the top level is every candidate no candidate root claims as its sub-skill; each root
|
|
67
|
+
* carries the sub-skills it lists (looked up in `skillsByName`, so a root always shows all of them). A sub-skill of
|
|
68
|
+
* several roots appears under each; a sub-skill no candidate root lists stays at the top level instead of vanishing.
|
|
69
|
+
*/
|
|
70
|
+
export declare const buildSkillTreeRows: (candidates: readonly AgentSkillCatalogEntry[], skillsByName: ReadonlyMap<string, AgentSkillCatalogEntry>) => SkillTreeRow[];
|
|
71
|
+
/** The general skills of a catalog: those an open conversation is offered. */
|
|
72
|
+
export declare const generalSkillsOf: (catalog: AgentSkillCatalog | null | undefined) => AgentSkillCatalogEntry[];
|
|
73
|
+
/** One namespace group with its skill tree. */
|
|
74
|
+
export interface SkillNamespaceSection {
|
|
75
|
+
key: string;
|
|
76
|
+
group: AgentSkillCatalogNamespaceGroup;
|
|
77
|
+
rows: SkillTreeRow[];
|
|
78
|
+
}
|
|
79
|
+
/** One purpose with the tree of the skills bound to it. */
|
|
80
|
+
export interface SkillPurposeSection {
|
|
81
|
+
key: string;
|
|
82
|
+
group: AgentSkillCatalogPurposeGroup;
|
|
83
|
+
rows: SkillTreeRow[];
|
|
84
|
+
}
|
|
85
|
+
/** The key of a group section; namespace and purpose groups never collide. */
|
|
86
|
+
export declare const skillGroupSectionKeyOf: (kind: "namespace" | "purpose", name: string) => string;
|
|
87
|
+
/**
|
|
88
|
+
* The general skills, one tree per namespace group in the backend's order (it decides the membership and puts
|
|
89
|
+
* "Ungrouped" last). A backend that sends no groups gives one unnamed group over all general skills, so the screen
|
|
90
|
+
* always has a section to draw.
|
|
91
|
+
*/
|
|
92
|
+
export declare const buildSkillNamespaceSections: (catalog: AgentSkillCatalog | null | undefined) => SkillNamespaceSection[];
|
|
93
|
+
/** The purpose-bound skills, one tree per purpose in the backend's order. */
|
|
94
|
+
export declare const buildSkillPurposeSections: (catalog: AgentSkillCatalog | null | undefined) => SkillPurposeSection[];
|
|
95
|
+
/** The figures of a group over its skills, computed as the backend computes them (a shared tool counts once). */
|
|
96
|
+
export declare const summarizeSkillGroup: (name: string, skills: readonly AgentSkillCatalogEntry[]) => AgentSkillCatalogNamespaceGroup;
|
|
97
|
+
/** Σ of the totals of a root's sub-skills (counted beside the root's own total, never inside it). */
|
|
98
|
+
export declare const sumSubSkillTotals: (subSkills: readonly AgentSkillCatalogEntry[]) => number;
|
|
99
|
+
/** The heaviest tool of a skill in tokens (the full width of the tool bars of that skill); 0 without tools. */
|
|
100
|
+
export declare const heaviestToolTokensOf: (skill: AgentSkillCatalogEntry) => number;
|
|
101
|
+
/** A skill as the search left it: the skill, why it stayed, and the packages and tools still shown. */
|
|
102
|
+
export interface FilteredSkill {
|
|
103
|
+
skill: AgentSkillCatalogEntry;
|
|
104
|
+
/** True: the skill's own name matches (all its packages and tools stay). */
|
|
105
|
+
isNameMatch: boolean;
|
|
106
|
+
/** The packages shown: all of them on a name match or without a query, else those with a matching name or tool. */
|
|
107
|
+
packages: AgentSkillCatalogPackage[];
|
|
108
|
+
/** True: the skill stayed because of a package or a tool, so its content opens by itself. */
|
|
109
|
+
isOpenedBySearch: boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* One skill against a search text (case-insensitive, part of a name): it stays when its name matches (everything
|
|
113
|
+
* inside stays), or when a package name or a tool name matches (then only the matching packages, and inside a package
|
|
114
|
+
* that does not match by name only the matching tools). `null` when nothing matches. An empty query keeps everything.
|
|
115
|
+
*/
|
|
116
|
+
export declare const filterSkill: (skill: AgentSkillCatalogEntry, query: string) => FilteredSkill | null;
|
|
117
|
+
/** One row of a filtered tree. */
|
|
118
|
+
export interface FilteredSkillTreeRow {
|
|
119
|
+
skill: FilteredSkill;
|
|
120
|
+
subSkills: FilteredSkill[];
|
|
121
|
+
/** True: a sub-skill matched (and the root did not match by name), so the root is shown as the path to it. */
|
|
122
|
+
isKeptForSubSkill: boolean;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The rows of a tree against a search text: a root stays when it matches or one of its sub-skills does; under a root
|
|
126
|
+
* that matches by name every sub-skill stays, else only the matching ones. An empty query keeps every row.
|
|
127
|
+
*/
|
|
128
|
+
export declare const filterSkillTreeRows: (rows: readonly SkillTreeRow[], query: string) => FilteredSkillTreeRow[];
|
|
129
|
+
/** The roots of one area of a namespace group, with the sub-skills under each. */
|
|
130
|
+
export interface SkillAreaSection {
|
|
131
|
+
/** The area: the first name segment after the group's prefix (`Agent.Web.Search` in `Agent` → `Web`). */
|
|
132
|
+
area: string;
|
|
133
|
+
rows: FilteredSkillTreeRow[];
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The area of a skill inside its group: the first name segment after the group's name as a prefix; a skill outside
|
|
137
|
+
* that prefix (an ungrouped skill, a group named otherwise) takes its own first segment.
|
|
138
|
+
*/
|
|
139
|
+
export declare const skillAreaOf: (skillName: string, groupName: string) => string;
|
|
140
|
+
/**
|
|
141
|
+
* The rows of a namespace group by area ({@link skillAreaOf} of each root): inside an area the base skills first, then
|
|
142
|
+
* the roots by name; the sub-skills stay under their root. The areas that hold a base skill come first, then the
|
|
143
|
+
* areas by name. Derived from the names and the root/sub-skill data alone: a root that becomes a sub-skill moves
|
|
144
|
+
* under its new root with no change here.
|
|
145
|
+
*/
|
|
146
|
+
export declare const groupSkillTreeRowsByArea: (rows: readonly FilteredSkillTreeRow[], groupName: string) => SkillAreaSection[];
|
|
147
|
+
/** How many skills (roots and sub-skills) a filtered tree shows. */
|
|
148
|
+
export declare const countFilteredSkills: (rows: readonly FilteredSkillTreeRow[]) => number;
|
|
149
|
+
/** The shared blocks of the answer as a list, whether they arrive as a set (`blocks`) or as a list. */
|
|
150
|
+
export declare const sharedBlocksOf: (response: AgentSkillSharedBlocksResponse | null | undefined) => AgentSkillCatalogSharedBlock[];
|
|
151
|
+
/** Where a tool sits in the catalog: the first skill and package that list it. */
|
|
152
|
+
export interface SkillToolLocation {
|
|
153
|
+
skillName: string;
|
|
154
|
+
packageName: string;
|
|
155
|
+
tool: AgentSkillCatalogTool;
|
|
156
|
+
}
|
|
157
|
+
/** Every place of the catalog that lists the tool (a shared tool sits in several skills), in catalog order. */
|
|
158
|
+
export declare const findSkillToolLocations: (catalog: AgentSkillCatalog | null | undefined, toolName: string) => SkillToolLocation[];
|
|
159
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type TranslateFn } from "@mgamadeus/ddd-admin-ui/i18n";
|
|
2
|
+
/**
|
|
3
|
+
* The owner-facing description of the package's own purposes, as English text keys: the purpose files' descriptions
|
|
4
|
+
* are written for the model and in English. A host describes its own purposes through `describeSkillPurpose`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PACKAGE_PURPOSE_DESCRIPTIONS: Readonly<Record<string, string>>;
|
|
7
|
+
/**
|
|
8
|
+
* The description of a purpose in the viewer's language: the host's words (`describeSkillPurpose`, already translated),
|
|
9
|
+
* else the package's for its own purposes, else what the server sent.
|
|
10
|
+
*/
|
|
11
|
+
export declare const describeSkillPurposeText: (purposeName: string, serverDescription: string | null | undefined, t: TranslateFn, describeSkillPurpose?: (purposeName: string) => string | null | undefined) => string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A set of the backend as it arrives: its elements under `elements` (an object set), or a plain list. Read it through
|
|
3
|
+
* `wireElementsOf`.
|
|
4
|
+
*/
|
|
5
|
+
export type AdminWireSet<TElement> = {
|
|
6
|
+
elements?: readonly TElement[] | null;
|
|
7
|
+
} | readonly TElement[];
|
|
8
|
+
/** The elements of a set in either wire form; empty for anything else. */
|
|
9
|
+
export declare const wireElementsOf: <TElement>(value: AdminWireSet<TElement> | null | undefined) => TElement[];
|
|
10
|
+
/** A finite number of a wire value (a number, or digits as text); `null` for everything else. */
|
|
11
|
+
export declare const wireNumberOf: (value: unknown) => number | null;
|
|
12
|
+
/** The change history a stored row carries. */
|
|
13
|
+
export interface AdminWireChangeHistory {
|
|
14
|
+
createdTime?: string | null;
|
|
15
|
+
modifiedTime?: string | null;
|
|
16
|
+
}
|
|
17
|
+
/** When a stored row was created: its change history's time, else its own `created`. */
|
|
18
|
+
export declare const wireCreatedTimeOf: (row: {
|
|
19
|
+
changeHistory?: AdminWireChangeHistory | null;
|
|
20
|
+
created?: string | null;
|
|
21
|
+
} | null | undefined) => string | null;
|
|
@@ -39,6 +39,16 @@ export interface AgentChatAssistantAvatarProps {
|
|
|
39
39
|
export interface AgentChatActivityHistoryProps {
|
|
40
40
|
turn: ActivityTickerTurn | null;
|
|
41
41
|
}
|
|
42
|
+
/** What the host's trace of one turn gets (`TurnTrace`): the message that started the turn and where the turn stands. */
|
|
43
|
+
export interface AgentChatTurnTraceProps {
|
|
44
|
+
conversationId: number;
|
|
45
|
+
/** The message that may have started a turn: the owner's message or a signal that owes work. */
|
|
46
|
+
turnMessageId: number | string;
|
|
47
|
+
/** live = the turn this message started runs right now; done = it ended (or the message started none). */
|
|
48
|
+
phase: "live" | "done";
|
|
49
|
+
/** The chat is the compact side panel: the trace takes its narrow form. */
|
|
50
|
+
isCompact: boolean;
|
|
51
|
+
}
|
|
42
52
|
/** What a host does with the composer of a mounted chat (`AgentChat`'s `composerRef`). */
|
|
43
53
|
export interface AgentChatComposerHandle {
|
|
44
54
|
/**
|
|
@@ -147,6 +157,18 @@ export interface AgentChatControllerProps {
|
|
|
147
157
|
ContentOverlay?: ComponentType<AgentChatActivityProps>;
|
|
148
158
|
/** The kept activity lines under the message that started a turn (with `keepActivityHistoryAfterAnswer`). */
|
|
149
159
|
ActivityHistory?: ComponentType<AgentChatActivityHistoryProps>;
|
|
160
|
+
/**
|
|
161
|
+
* The trace of a turn (its step rows), between the message that started the turn and the answer. Mounted once after
|
|
162
|
+
* every message that can start a turn (the owner's messages and the signals that owe work), for turns read from the
|
|
163
|
+
* history as for turns watched live; the component reads the turn's trace by `turnMessageId` and renders nothing for
|
|
164
|
+
* a message that started none. When given it stands in place of `ActivityHistory`. Default: none.
|
|
165
|
+
*/
|
|
166
|
+
TurnTrace?: ComponentType<AgentChatTurnTraceProps>;
|
|
167
|
+
/**
|
|
168
|
+
* Marks the owner's messages sent while a turn runs as queued (`QueuedMessageChip` under the message) until the turn
|
|
169
|
+
* ends: the agent reads them after its current step. Default false.
|
|
170
|
+
*/
|
|
171
|
+
showsQueuedMessages?: boolean;
|
|
150
172
|
/** Rendered inside the chat's widget provider (the host's canvas syncs). */
|
|
151
173
|
children?: ReactNode;
|
|
152
174
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ChatMessage } from "../chat-message";
|
|
2
|
+
/**
|
|
3
|
+
* Whether a message can start a turn of the agent: the owner's own message, or a signal that owes work (a widget
|
|
4
|
+
* click, a nudge). Tool-result reports, bookkeeping rows (ERROR, CHECKPOINT) and the signals that owe no work never
|
|
5
|
+
* start one. Which of these messages did start a turn is the server's word (its trace names the message of each
|
|
6
|
+
* turn); the chat offers the per-turn slot after each of them.
|
|
7
|
+
*/
|
|
8
|
+
export declare const isTurnInitiatorMessage: (message: ChatMessage) => boolean;
|
|
9
|
+
export interface TurnsInFlight {
|
|
10
|
+
/** The message that started the turn in flight; null when none runs or it is not known yet. */
|
|
11
|
+
liveTurnMessageId: number | null;
|
|
12
|
+
/** The owner's messages sent while that turn ran, still unanswered: the agent reads them after the current step. */
|
|
13
|
+
queuedMessages: ChatMessage[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The turn in flight and the owner's messages queued behind it, from the loaded messages. The messages that can start
|
|
17
|
+
* a turn and stand after the agent's newest answer are the candidates: the one the activity read named
|
|
18
|
+
* (`namedTurnMessageId`), else the oldest of them, started the turn in flight; every owner message after it waits.
|
|
19
|
+
* Nothing is in flight while no turn runs.
|
|
20
|
+
*/
|
|
21
|
+
export declare const findTurnsInFlight: (messages: ChatMessage[] | null, isTurnRunning: boolean, namedTurnMessageId: number | null) => TurnsInFlight;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TraceStepState } from "./trace-types";
|
|
3
|
+
export type BackgroundTaskType = "subAgent" | "schedule" | "command" | "call";
|
|
4
|
+
export interface BackgroundTask {
|
|
5
|
+
key: string;
|
|
6
|
+
type: BackgroundTaskType;
|
|
7
|
+
/** What runs ("#2 Check the BARMER price list", a command, a schedule's name); data, never translated. */
|
|
8
|
+
title: string;
|
|
9
|
+
/** A quiet second line ("every Monday 08:00", a working directory). */
|
|
10
|
+
detail?: string | null;
|
|
11
|
+
state: TraceStepState;
|
|
12
|
+
/** When the task started (a server date-time); a running task's clock ticks from it. */
|
|
13
|
+
startedAt?: string | null;
|
|
14
|
+
/** How long a finished task ran. */
|
|
15
|
+
durationMs?: number | null;
|
|
16
|
+
/** The badge's words when the host names the type itself. */
|
|
17
|
+
typeLabel?: string | null;
|
|
18
|
+
/** The conversation of a sub-agent, for a host that opens it. */
|
|
19
|
+
childConversationId?: number | null;
|
|
20
|
+
}
|
|
21
|
+
export interface BackgroundTasksListProps {
|
|
22
|
+
tasks: BackgroundTask[];
|
|
23
|
+
/** The list's title. Default: "Background tasks". */
|
|
24
|
+
title?: string | null;
|
|
25
|
+
/** Opens a task (its conversation, its output); with it every row is a button. */
|
|
26
|
+
onOpenTask?: (task: BackgroundTask) => void;
|
|
27
|
+
/** Controls on the right of the head. */
|
|
28
|
+
headerActions?: ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* What a conversation has running beside its turn: sub-agents, schedules, shell commands in the background and calls,
|
|
33
|
+
* one row each with its state, its duration (a clock while it runs) and a badge for its type.
|
|
34
|
+
*/
|
|
35
|
+
export declare const BackgroundTasksList: (props: BackgroundTasksListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type AgentsIconName } from "../../provider/components";
|
|
3
|
+
export interface ChangeSetChange {
|
|
4
|
+
/** A stable key; default: the row's position. */
|
|
5
|
+
key?: string;
|
|
6
|
+
/** The field's name, in the reader's language. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** The value before; null or absent for a field that had none. */
|
|
9
|
+
before?: string | null;
|
|
10
|
+
/** The value after; null or absent for a field that was cleared. */
|
|
11
|
+
after?: string | null;
|
|
12
|
+
}
|
|
13
|
+
export interface ChangeSetCardProps {
|
|
14
|
+
/** What was changed ("Ride changed"), in the reader's language. */
|
|
15
|
+
title: string;
|
|
16
|
+
icon?: AgentsIconName;
|
|
17
|
+
/** The chip of the changed record (`EntityChip`). */
|
|
18
|
+
entity?: ReactNode;
|
|
19
|
+
changes: ChangeSetChange[];
|
|
20
|
+
/** A quiet line under the rows (who changed it, when). */
|
|
21
|
+
note?: ReactNode;
|
|
22
|
+
/** Takes the change back; without it no Undo button. A promise keeps the button disabled until it settles. */
|
|
23
|
+
onUndo?: () => void | Promise<void>;
|
|
24
|
+
/** The change was taken back: the card says so and offers no Undo. */
|
|
25
|
+
isUndone?: boolean;
|
|
26
|
+
/** Further controls beside Undo (a link to the record's history). */
|
|
27
|
+
actions?: ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* What a turn changed on one record: a row per field with the old value struck through and the new one highlighted,
|
|
32
|
+
* and an Undo button when the host can take the change back.
|
|
33
|
+
*/
|
|
34
|
+
export declare const ChangeSetCard: (props: ChangeSetCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type FileEditBlockProps } from "./FileEditBlock";
|
|
3
|
+
import type { TraceFileChange, TraceLinkComponent } from "./trace-types";
|
|
4
|
+
export interface ChangedFilesPaneProps extends Pick<FileEditBlockProps, "describeMount" | "maxLines" | "isNarrow" | "diffModesBelowHead" | "defaultDiffMode" | "onLoadFullDiff" | "onOpenInViewer" | "describeFileType"> {
|
|
5
|
+
/** The changed files, in the order they are listed. */
|
|
6
|
+
fileChanges: TraceFileChange[];
|
|
7
|
+
/**
|
|
8
|
+
* Controls the selected file (its position in `fileChanges`); without it the pane keeps its own, starting at
|
|
9
|
+
* `defaultSelectedIndex`.
|
|
10
|
+
*/
|
|
11
|
+
selectedIndex?: number;
|
|
12
|
+
onSelectedIndexChange?: (selectedIndex: number) => void;
|
|
13
|
+
/** The file selected at first when the pane keeps the selection itself. Default 0. */
|
|
14
|
+
defaultSelectedIndex?: number;
|
|
15
|
+
/** A title before the summary in the pane's head ("Turn 3"). */
|
|
16
|
+
title?: ReactNode;
|
|
17
|
+
/** Controls on the right of the pane's head (a link to the drive). */
|
|
18
|
+
headerActions?: ReactNode;
|
|
19
|
+
/** A small picture of a changed file, for the preview card of a binary file. */
|
|
20
|
+
renderThumbnail?: (fileChange: TraceFileChange) => ReactNode;
|
|
21
|
+
/** Whether the viewer of `onOpenInViewer` can show this file; "open" is offered only then. Default: every file. */
|
|
22
|
+
canOpenInViewer?: (fileChange: TraceFileChange) => boolean;
|
|
23
|
+
/** The route of the screen that shows a changed file in the conversation's sandbox; each row and the file's block link to it. Null: no link. */
|
|
24
|
+
buildSandboxHref?: (fileChange: TraceFileChange) => string | null;
|
|
25
|
+
/** The host's link (an in-app route); a plain anchor otherwise. */
|
|
26
|
+
linkComponent?: TraceLinkComponent;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The files a turn or a conversation changed: a list with the letter of each operation (A, M, D, R), the path, the
|
|
31
|
+
* mount and the size of the change, and below it the file edit block of the selected file.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ChangedFilesPane: (props: ChangedFilesPaneProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TraceChangedRecord } from "./trace-collect";
|
|
3
|
+
import type { TraceEntityDescription, TraceEntityReference, TraceLinkComponent } from "./trace-types";
|
|
4
|
+
export interface ChangedRecordsListProps {
|
|
5
|
+
/** The tool calls that changed or deleted records, in the order they are listed (`collectTraceChangedRecords`). */
|
|
6
|
+
records: TraceChangedRecord[];
|
|
7
|
+
/** The list's title. Default: "Records changed". */
|
|
8
|
+
title?: string | null;
|
|
9
|
+
/** The chip of a record a call names; null leaves the reference out. Default: no chips. */
|
|
10
|
+
describeEntity?: (reference: TraceEntityReference) => TraceEntityDescription | null;
|
|
11
|
+
/** The route of a record, for a host that only links (`describeEntity` wins when it names an `href`). */
|
|
12
|
+
buildEntityHref?: (argumentName: string, id: number) => string | null;
|
|
13
|
+
/** The route of the call's step in the host's analysis view; null for none. With it a row offers "Open in analysis". */
|
|
14
|
+
buildStepHref?: (record: TraceChangedRecord) => string | null;
|
|
15
|
+
/** The host's link (an in-app route); a plain anchor otherwise. */
|
|
16
|
+
linkComponent?: TraceLinkComponent;
|
|
17
|
+
/** A quiet line under the list. */
|
|
18
|
+
note?: ReactNode;
|
|
19
|
+
/** A changed record in words (`Support directive 41`) for the before → after card; null keeps table and id. */
|
|
20
|
+
describeRecord?: (tableName: string, recordId: number | null) => string | null;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
/** `validUntil` reads "valid until", `isActive` "is active": a stored column name in words. */
|
|
24
|
+
export declare const describeChangedFieldName: (fieldName: string) => string;
|
|
25
|
+
/** `SupportDirectives` and 41 read "Support directives 41": a changed record without the host's words. */
|
|
26
|
+
export declare const describeChangedRecord: (tableName: string, recordId: number | null) => string;
|
|
27
|
+
/**
|
|
28
|
+
* The records a conversation changed, as far as its trace knows them: one row per tool call that changes or deletes
|
|
29
|
+
* data, with the tool in words, when it ran, the chips of the records its arguments name and a link to its step. A
|
|
30
|
+
* call that failed or still waits for the owner's approval is marked, since it changed nothing (yet). Under a call
|
|
31
|
+
* the server captured writes for, its change set lists every record with each field before → after
|
|
32
|
+
* ({@link ChangeSetCard}); a call stored before the capture shows the row only. No undo is offered.
|
|
33
|
+
*/
|
|
34
|
+
export declare const ChangedRecordsList: (props: ChangedRecordsListProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** A tool call of the turn that waits for the owner's approval. */
|
|
2
|
+
export interface ConsentRequestCardCall {
|
|
3
|
+
/** The tool in words ("Create support directive"); the tool's name when there are none. */
|
|
4
|
+
title: string;
|
|
5
|
+
/** What the call would do, as the step narrated it. */
|
|
6
|
+
line?: string | null;
|
|
7
|
+
}
|
|
8
|
+
export interface ConsentRequestCardProps {
|
|
9
|
+
/** The conversation the turn belongs to: the card acts only inside the live chat of that conversation. */
|
|
10
|
+
conversationId: number;
|
|
11
|
+
/** The message that started the turn: once the owner wrote after it, the request is answered and the card goes. */
|
|
12
|
+
turnMessageId: number;
|
|
13
|
+
calls: ConsentRequestCardCall[];
|
|
14
|
+
isCompact?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The card of a turn that ended on a tool call held for the owner's approval: what would run, and two buttons that
|
|
18
|
+
* answer the agent's question in the owner's words, as an explicit yes to exactly the described step (the server's
|
|
19
|
+
* consent check accepts nothing less) or a clear no. The agent reads the answer
|
|
20
|
+
* like any reply; the call runs only after a yes. Outside the live chat (the analysis view) and once the owner wrote
|
|
21
|
+
* after the turn, the card is not shown: the step's "waits for approval" badge tells the story there.
|
|
22
|
+
*/
|
|
23
|
+
export declare const ConsentRequestCard: (props: ConsentRequestCardProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ContextRingProps {
|
|
2
|
+
/** The share of the context window in use, 0–100. */
|
|
3
|
+
percent: number;
|
|
4
|
+
/** Tokens in the context and the window's size, named in the label when given. */
|
|
5
|
+
usedTokens?: number | null;
|
|
6
|
+
contextWindowTokens?: number | null;
|
|
7
|
+
/** The figure beside the ring ("71 %"). Default true. */
|
|
8
|
+
showsPercent?: boolean;
|
|
9
|
+
/** Edge length of the ring in px. Default 26. */
|
|
10
|
+
size?: number;
|
|
11
|
+
/** Opens what fills the context; with it the ring is a button. */
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* How full the model's context window is, as a ring with its percentage. It names itself to assistive technology
|
|
17
|
+
* ("Context 71 % full"), turns amber from 80 % and red from 95 %, and is a button when a click handler is given.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ContextRing: (props: ContextRingProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ConversationTraceClient } from "./conversation-trace-loader";
|
|
2
|
+
import type { TraceHostBindings, TraceViewMode } from "./trace-types";
|
|
3
|
+
export interface ConversationChildTraceProps {
|
|
4
|
+
/** The conversation client; the server lets a reader of a conversation read the traces of its sub-agents. */
|
|
5
|
+
client: ConversationTraceClient;
|
|
6
|
+
/** The conversation of the sub-agent. */
|
|
7
|
+
conversationId: number;
|
|
8
|
+
/** `verbose` reads the debug level and shows tool names and details. Default `normal`. */
|
|
9
|
+
viewMode?: TraceViewMode;
|
|
10
|
+
host?: TraceHostBindings;
|
|
11
|
+
isCompact?: boolean;
|
|
12
|
+
pollIntervalMs?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The steps of a sub-agent's conversation, shown inside its open row: read when the row opens (through the shared
|
|
16
|
+
* loader of that conversation), followed while the sub-agent runs. A failed read shows nothing.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ConversationChildTrace: (props: ConversationChildTraceProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AgentsConversationClient } from "../../client/AgentsConversationClient";
|
|
2
|
+
import { type TaskPlanItem } from "./TaskPlanRow";
|
|
3
|
+
import type { TraceHostBindings, TraceViewMode } from "./trace-types";
|
|
4
|
+
/** The part of the conversation client the turn trace uses: the trace read, the stop and the stored diffs. */
|
|
5
|
+
export type ConversationTurnTraceClient = Pick<AgentsConversationClient, "getTurnTraces" | "stopTurn" | "getFileChangeDiff">;
|
|
6
|
+
/** A task plan whose items the host knows (the conversation's working state): shown while the turn runs. */
|
|
7
|
+
export interface ConversationTurnTracePlan {
|
|
8
|
+
title?: string | null;
|
|
9
|
+
items: TaskPlanItem[];
|
|
10
|
+
}
|
|
11
|
+
export interface ConversationTurnTraceProps {
|
|
12
|
+
conversationId: number;
|
|
13
|
+
/** The message that started the turn (`AgentChat`'s `TurnTrace` slot hands it over). */
|
|
14
|
+
turnMessageId: number | string;
|
|
15
|
+
/** live = the turn runs right now; done = it ended, or the message started none. */
|
|
16
|
+
phase: "live" | "done";
|
|
17
|
+
/** The chat is the compact side panel: narrow blocks, no side-by-side diff. */
|
|
18
|
+
isCompact: boolean;
|
|
19
|
+
/** The conversation client port: `getTurnTraces` feeds the trace, `stopTurn` the Stop button, `getFileChangeDiff` the full diffs. */
|
|
20
|
+
client: ConversationTurnTraceClient;
|
|
21
|
+
/** `summary` (Short), `normal` or `verbose`; verbose needs `isDebugAllowed`, else it reads as normal. */
|
|
22
|
+
viewMode: TraceViewMode;
|
|
23
|
+
/** The host's records, links, mounts and money. `loadFullDiff` and `renderChildTrace` default to the client's reads. */
|
|
24
|
+
host?: TraceHostBindings;
|
|
25
|
+
/** The reader may see the debug level (tool names, arguments, results, tokens, cost). Default false. */
|
|
26
|
+
isDebugAllowed?: boolean;
|
|
27
|
+
/** How often a running turn is read again. Default 1500 ms. */
|
|
28
|
+
pollIntervalMs?: number;
|
|
29
|
+
/** Opens what the model was sent at a call of this turn (verbose): the id of the turn's newest model call message. */
|
|
30
|
+
onOpenContext?: (messageId: number) => void;
|
|
31
|
+
/** The route of the turn in the host's analysis view (verbose); null for none. */
|
|
32
|
+
buildAnalysisHref?: (conversationId: number, turnMessageId: number) => string | null;
|
|
33
|
+
/** The task plan with its items, when the host has it; without it a running turn shows the plan's counts from the trace. */
|
|
34
|
+
taskPlan?: ConversationTurnTracePlan | null;
|
|
35
|
+
/** A value that changes with every new message of the conversation; default: read from the chat's store. */
|
|
36
|
+
conversationRevision?: string | number | null;
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The trace of one turn in the chat, ready for `AgentChat`'s `TurnTrace` slot: it reads the turn through the
|
|
41
|
+
* conversation's shared loader (the turns on screen share their requests), follows it while it runs and shows it by
|
|
42
|
+
* the view mode. Short: one line "12 steps · 48 s" that opens the steps. Normal: the steps folded, each with its
|
|
43
|
+
* narrated line, sub-agents with their own steps, commands and file edits. Verbose (debug readers): the steps open,
|
|
44
|
+
* with tool names, thinking, arguments and results, the loaded skills and the turn's figures with the links to what
|
|
45
|
+
* the model saw and to the analysis. While the turn runs: the status line with the clock and Stop, and the task plan.
|
|
46
|
+
* A failed read renders nothing: the thread stays as it is.
|
|
47
|
+
*/
|
|
48
|
+
export declare const ConversationTurnTrace: (props: ConversationTurnTraceProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TraceLinkComponent } from "./trace-types";
|
|
3
|
+
export interface EntityChipProps {
|
|
4
|
+
/** The chip's text ("Ticket #13082"); data, never translated. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** A small icon before the label (12 px), in the host's own icon set. */
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
/** Where the chip links to. Without it and without `buildEntityHref` the chip is plain text. */
|
|
9
|
+
href?: string | null;
|
|
10
|
+
/** The record the chip stands for, for `buildEntityHref`. */
|
|
11
|
+
argumentName?: string;
|
|
12
|
+
id?: number;
|
|
13
|
+
/** The route of a record by the argument that named it; used when `href` is not given. */
|
|
14
|
+
buildEntityHref?: (argumentName: string, id: number) => string | null;
|
|
15
|
+
/** The host's link (an in-app route); a plain anchor otherwise. */
|
|
16
|
+
linkComponent?: TraceLinkComponent;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The chip of a record a step names (a ticket, a ride, an account): its label with an optional icon, a link to the
|
|
21
|
+
* record when the host has a route for it, plain otherwise.
|
|
22
|
+
*/
|
|
23
|
+
export declare const EntityChip: (props: EntityChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface FileChangesSummaryProps {
|
|
2
|
+
/** Shell commands of the turn. */
|
|
3
|
+
commandCount?: number | null;
|
|
4
|
+
/** Files the turn changed. */
|
|
5
|
+
fileCount?: number | null;
|
|
6
|
+
linesAdded?: number | null;
|
|
7
|
+
linesRemoved?: number | null;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* What a turn did to files, in one line: "3 commands · 4 files · +3 −1". A part without a figure (or with 0) is left
|
|
12
|
+
* out; nothing is rendered when no part is left.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FileChangesSummary: (props: FileChangesSummaryProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { TraceDescribeMount, TraceFileChange, TraceLinkComponent } from "./trace-types";
|
|
3
|
+
export type FileEditDiffMode = "unified" | "sideBySide";
|
|
4
|
+
export interface FileEditBlockProps {
|
|
5
|
+
fileChange: TraceFileChange;
|
|
6
|
+
/** Names the mount of the file (its label and tint). Default: the mount's name. */
|
|
7
|
+
describeMount?: TraceDescribeMount;
|
|
8
|
+
/** Rows of the diff shown before "… n more lines". Default: all, 12 in the narrow variant. */
|
|
9
|
+
maxLines?: number;
|
|
10
|
+
/** The narrow variant (a floating panel): unified only, no toggle, fewer facts in the head. */
|
|
11
|
+
isNarrow?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The layout toggle (unified / side by side) on its own row under the head: for a pane that is narrow for the head
|
|
14
|
+
* (`isNarrow`) yet wide enough for two columns, such as the pane beside a full-screen chat.
|
|
15
|
+
*/
|
|
16
|
+
diffModesBelowHead?: boolean;
|
|
17
|
+
/** Controls the diff's layout; without it the block keeps its own, starting at `defaultDiffMode`. */
|
|
18
|
+
diffMode?: FileEditDiffMode;
|
|
19
|
+
defaultDiffMode?: FileEditDiffMode;
|
|
20
|
+
onDiffModeChange?: (diffMode: FileEditDiffMode) => void;
|
|
21
|
+
/** Loads the whole diff of a change whose preview is cut (`diffState` `STORED`): resolves to unified diff text. */
|
|
22
|
+
onLoadFullDiff?: (fileChange: TraceFileChange) => Promise<string>;
|
|
23
|
+
/** Opens the file in the host's viewer (the preview card of a binary file, the head of every other). */
|
|
24
|
+
onOpenInViewer?: (fileChange: TraceFileChange) => void;
|
|
25
|
+
/** The route of the screen that shows this file in the conversation's sandbox; the head links to it. */
|
|
26
|
+
sandboxHref?: string | null;
|
|
27
|
+
/** The host's link (an in-app route) for `sandboxHref`; a plain anchor otherwise. */
|
|
28
|
+
linkComponent?: TraceLinkComponent;
|
|
29
|
+
/** A small picture of the file for the preview card of a binary file. Default: a drawn page. */
|
|
30
|
+
thumbnail?: ReactNode;
|
|
31
|
+
/** The words for the file's type on the preview card ("Word document"). Default: its extension. */
|
|
32
|
+
describeFileType?: (fileChange: TraceFileChange) => string | null;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* One file operation of the agent (an edit, a new file, a deletion, a rename, a new folder): a head with the path, the
|
|
37
|
+
* mount, the added and removed lines, the size before and after and the short sha256, and a body by what the change
|
|
38
|
+
* carries — a diff with old and new line numbers (unified, or side by side through the toggle), cut at `maxLines` with
|
|
39
|
+
* "… n more lines" and "Load the full diff" for a stored one; a preview card for a binary file; a note when the diff
|
|
40
|
+
* is unavailable or the file too large; nothing for an operation without content.
|
|
41
|
+
*/
|
|
42
|
+
export declare const FileEditBlock: (props: FileEditBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TraceLoadedSkill } from "./trace-types";
|
|
2
|
+
export interface LoadedSkillsDisclosureProps {
|
|
3
|
+
/** The skills loaded at a model call, with their tools. */
|
|
4
|
+
skills: TraceLoadedSkill[];
|
|
5
|
+
/** Controls the list; without it the block keeps its own state, starting at `defaultOpen`. */
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The skills the model had loaded at a call: one line "5 skills · 3.4K tokens" that opens the list — each skill with
|
|
13
|
+
* its weight in tokens and a mark when it is new at this call or always loaded — and each skill opens its tools with
|
|
14
|
+
* how often each was called.
|
|
15
|
+
*/
|
|
16
|
+
export declare const LoadedSkillsDisclosure: (props: LoadedSkillsDisclosureProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface QueuedMessageChipProps {
|
|
2
|
+
/** The queued message, quoted in the chip (above a composer). Without it the chip only says that the message waits. */
|
|
3
|
+
text?: string | null;
|
|
4
|
+
/** The chip stands in a narrow thread (a floating panel). */
|
|
5
|
+
isCompact?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* The turn is over and took the message up: a quiet label above the message's bubble ("Sent during the run · taken
|
|
8
|
+
* up in this turn") instead of the wait; `text` is only its tooltip.
|
|
9
|
+
*/
|
|
10
|
+
wasTakenUp?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The mark of an owner message sent while a turn runs: the agent reads it at its next step. Under the message in the
|
|
15
|
+
* thread it is one quiet line; with `text` it quotes the message (above a composer).
|
|
16
|
+
*/
|
|
17
|
+
export declare const QueuedMessageChip: (props: QueuedMessageChipProps) => import("react/jsx-runtime").JSX.Element;
|