@tutti-os/agent-gui 0.0.233 → 0.0.235

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +49 -0
  2. package/dist/{AgentRichTextReadonly-U3XUJYCW.js → AgentRichTextReadonly-CCELQPHE.js} +5 -5
  3. package/dist/agent-conversation/index.d.ts +17 -4
  4. package/dist/agent-conversation/index.js +13 -9
  5. package/dist/agent-conversation/index.js.map +1 -1
  6. package/dist/agent-gui.d.ts +19 -3
  7. package/dist/agent-gui.js +22 -16
  8. package/dist/agent-message-center/index.d.ts +1 -1
  9. package/dist/agent-message-center/index.js +10 -7
  10. package/dist/agent-message-center/index.js.map +1 -1
  11. package/dist/{agentGuiNodeTypes-DW7T--Y8.d.ts → agentGuiNodeTypes-Dgl7kQHA.d.ts} +2 -2
  12. package/dist/agents.d.ts +1 -1
  13. package/dist/app/renderer/agentactivity.css +17 -0
  14. package/dist/{chunk-M6WEFXPL.js → chunk-2MCNNB2P.js} +2 -24
  15. package/dist/chunk-2MCNNB2P.js.map +1 -0
  16. package/dist/{chunk-CQFT3MI5.js → chunk-3YYI6RXA.js} +7 -5
  17. package/dist/{chunk-CQFT3MI5.js.map → chunk-3YYI6RXA.js.map} +1 -1
  18. package/dist/{chunk-EDP4D42H.js → chunk-45KN5Z5F.js} +877 -871
  19. package/dist/chunk-45KN5Z5F.js.map +1 -0
  20. package/dist/{chunk-T57ZZWTC.js → chunk-4HAG3FOY.js} +2 -2
  21. package/dist/{chunk-ZBI6R46N.js → chunk-5DN5N2XS.js} +2 -2
  22. package/dist/{chunk-BCBB4HOV.js → chunk-634MNSI5.js} +2 -2
  23. package/dist/chunk-A4KKC324.js +4768 -0
  24. package/dist/chunk-A4KKC324.js.map +1 -0
  25. package/dist/chunk-ALAGL6VL.js +48 -0
  26. package/dist/chunk-ALAGL6VL.js.map +1 -0
  27. package/dist/{chunk-2STAUA73.js → chunk-AYTUAZE3.js} +5 -2
  28. package/dist/chunk-AYTUAZE3.js.map +1 -0
  29. package/dist/{chunk-SWO67UWQ.js → chunk-CZOZBUIM.js} +7 -7
  30. package/dist/{chunk-SWO67UWQ.js.map → chunk-CZOZBUIM.js.map} +1 -1
  31. package/dist/{chunk-2L2LVSOD.js → chunk-EHNPHZE4.js} +881 -5812
  32. package/dist/chunk-EHNPHZE4.js.map +1 -0
  33. package/dist/{chunk-N5356722.js → chunk-EKQ7UX2B.js} +13 -319
  34. package/dist/chunk-EKQ7UX2B.js.map +1 -0
  35. package/dist/{chunk-ZXEICU6J.js → chunk-KK7YXPTS.js} +3 -1
  36. package/dist/chunk-KK7YXPTS.js.map +1 -0
  37. package/dist/{chunk-WGCDSA7P.js → chunk-MBM7PJIF.js} +27 -506
  38. package/dist/chunk-MBM7PJIF.js.map +1 -0
  39. package/dist/chunk-RMC2MGL4.js +557 -0
  40. package/dist/chunk-RMC2MGL4.js.map +1 -0
  41. package/dist/{chunk-JA6XAKKE.js → chunk-TWF6JXPC.js} +2 -2
  42. package/dist/{chunk-7AYFKNLD.js → chunk-TWMV6YTX.js} +4 -4
  43. package/dist/chunk-VV3YIU5W.js +25 -0
  44. package/dist/chunk-VV3YIU5W.js.map +1 -0
  45. package/dist/{chunk-GLVENTN6.js → chunk-WXLO33YP.js} +2 -2
  46. package/dist/chunk-XWPHTXEM.js +529 -0
  47. package/dist/chunk-XWPHTXEM.js.map +1 -0
  48. package/dist/chunk-YEXRTXTE.js +315 -0
  49. package/dist/chunk-YEXRTXTE.js.map +1 -0
  50. package/dist/{chunk-WMJDOMG6.js → chunk-ZELGKLW5.js} +4 -4
  51. package/dist/composer-projection.d.ts +37 -0
  52. package/dist/composer-projection.js +21 -0
  53. package/dist/composer-projection.js.map +1 -0
  54. package/dist/context-mention-palette/index.js +9 -7
  55. package/dist/conversation-projection.d.ts +551 -0
  56. package/dist/conversation-projection.js +42 -0
  57. package/dist/conversation-projection.js.map +1 -0
  58. package/dist/conversation-rail-projection.js +3 -3
  59. package/dist/i18n/index.d.ts +2 -0
  60. package/dist/i18n/index.js +2 -2
  61. package/dist/index.d.ts +32 -13
  62. package/dist/index.js +22 -16
  63. package/dist/index.js.map +1 -1
  64. package/dist/mention-search.js +7 -5
  65. package/dist/{types-CHAMK2g7.d.ts → types-DtXXsISB.d.ts} +1 -1
  66. package/dist/workbench/contribution.js +4 -4
  67. package/dist/workbench/index.js +4 -4
  68. package/dist/workbench/sessionTitle.js +3 -3
  69. package/dist/workspace-agent-generated-files.d.ts +1 -12
  70. package/dist/workspaceAgentActivityListTypes-BUKNyMbh.d.ts +48 -0
  71. package/dist/{workspaceLinkActions-CzsbvGmC.d.ts → workspaceLinkActions-DxyzMy10.d.ts} +13 -12
  72. package/package.json +29 -15
  73. package/dist/chunk-2L2LVSOD.js.map +0 -1
  74. package/dist/chunk-2STAUA73.js.map +0 -1
  75. package/dist/chunk-EDP4D42H.js.map +0 -1
  76. package/dist/chunk-M6WEFXPL.js.map +0 -1
  77. package/dist/chunk-N5356722.js.map +0 -1
  78. package/dist/chunk-WGCDSA7P.js.map +0 -1
  79. package/dist/chunk-ZXEICU6J.js.map +0 -1
  80. /package/dist/{AgentRichTextReadonly-U3XUJYCW.js.map → AgentRichTextReadonly-CCELQPHE.js.map} +0 -0
  81. /package/dist/{chunk-T57ZZWTC.js.map → chunk-4HAG3FOY.js.map} +0 -0
  82. /package/dist/{chunk-ZBI6R46N.js.map → chunk-5DN5N2XS.js.map} +0 -0
  83. /package/dist/{chunk-BCBB4HOV.js.map → chunk-634MNSI5.js.map} +0 -0
  84. /package/dist/{chunk-JA6XAKKE.js.map → chunk-TWF6JXPC.js.map} +0 -0
  85. /package/dist/{chunk-7AYFKNLD.js.map → chunk-TWMV6YTX.js.map} +0 -0
  86. /package/dist/{chunk-GLVENTN6.js.map → chunk-WXLO33YP.js.map} +0 -0
  87. /package/dist/{chunk-WMJDOMG6.js.map → chunk-ZELGKLW5.js.map} +0 -0
package/README.md CHANGED
@@ -119,6 +119,48 @@ action in its centered error state and retries the failed browse or search when
119
119
  the user activates it. Hosts should return an action only for errors they can
120
120
  recover interactively, such as requesting filesystem authorization again.
121
121
 
122
+ ## DOM-Free Conversation Projection
123
+
124
+ `@tutti-os/agent-gui/conversation-projection` is the renderer-neutral entry
125
+ for hosts that need the same canonical transcript semantics without importing
126
+ the DOM conversation components. Its focused Session projection accepts the
127
+ canonical activity snapshot, the selected Session id, and known Turns. It
128
+ derives the exact Session and message snapshots from that one activity snapshot
129
+ and hides AgentGUI's intermediate activity-card and timeline-item construction.
130
+ The host owns rendering, local disclosure, scrolling, i18n, and semantic
131
+ commands for pending Interactions.
132
+
133
+ The entry also exports `resolveAgentConversationNavigationAction`, whose
134
+ portable action union contains only external URLs and Agent Session mentions.
135
+ Workspace files, local assets, apps, issues, and custom mentions stay in
136
+ host-specific capability adapters. The broad Workspace resolver and this
137
+ portable resolver share only the host-neutral URL and Agent Session parsing
138
+ primitives. Alternate renderers must not parse `mention://` values or invent
139
+ fallback file paths locally.
140
+
141
+ Pending Engine Interactions are projected through
142
+ `projectAgentConversationPromptFromInteraction`. The resulting canonical prompt
143
+ preserves runtime approval and plan option ids; hosts render it and submit those
144
+ exact ids rather than guessing generic allow/deny actions. Missing presentation
145
+ copy remains empty so each renderer can supply localized fallback text.
146
+
147
+ Do not recreate this transformation from raw message kinds in another host.
148
+ The public projection is where AgentGUI canonicalizes message snapshots and
149
+ groups assistant messages, thinking, tool activity, processing, notices, and
150
+ turn summaries.
151
+
152
+ ## DOM-Free Composer Projection
153
+
154
+ `@tutti-os/agent-gui/composer-projection` exposes the shared pure Composer
155
+ support decision and presented-settings projection. The workspace engine
156
+ continues to own target-keyed Composer option loads and semantic settings
157
+ commands. Alternate renderers receive canonical activity-core options and
158
+ session settings, then retain only their menu, sheet, and disclosure UI.
159
+
160
+ The daemon DTO mapper belongs to
161
+ `@tutti-os/agent-activity-tuttid-adapter`, so Desktop and Mobile do not keep
162
+ separate parser implementations for Composer capabilities or option catalogs.
163
+
122
164
  ## Standalone Conversation Participant Presentation
123
165
 
124
166
  The `@tutti-os/agent-gui/agent-conversation` entrypoint exposes one optional,
@@ -380,3 +422,10 @@ The old public `providerTargets`, `providerRailMode`, provider-target renderers,
380
422
  and `defaultProviderTargetId` contract is intentionally unsupported. Workbench
381
423
  state hydration performs a one-time read of legacy `providerTargetId` into
382
424
  `agentTargetId`; new state writes contain only `agentTargetId`.
425
+
426
+ Account and Commerce remain Host chrome. A Host may use
427
+ `renderSlots.agentConfigAccount` to replace the selected target's default
428
+ account/quota block and `hostActions.onAgentConfigMenuOpen` to refresh its
429
+ Host-owned account state. Both receive the same exact target context. Returning
430
+ `null` preserves the default provider account and quota presentation; the slot
431
+ must not start requests or own menu lifecycle.
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  AgentRichTextReadonly
3
- } from "./chunk-2STAUA73.js";
3
+ } from "./chunk-AYTUAZE3.js";
4
4
  import "./chunk-LQMIEH4C.js";
5
- import "./chunk-SWO67UWQ.js";
5
+ import "./chunk-CZOZBUIM.js";
6
6
  import "./chunk-3V5OCA2M.js";
7
7
  import "./chunk-3X5VDG6T.js";
8
- import "./chunk-GLVENTN6.js";
8
+ import "./chunk-WXLO33YP.js";
9
9
  import "./chunk-5BJYO6X3.js";
10
10
  import "./chunk-AFUVWWQY.js";
11
- import "./chunk-ZXEICU6J.js";
11
+ import "./chunk-KK7YXPTS.js";
12
12
  import "./chunk-FGLQZ6I4.js";
13
13
  import "./chunk-D2JUDUYY.js";
14
14
  import "./chunk-SEHJINGH.js";
@@ -16,4 +16,4 @@ import "./chunk-O433KXLK.js";
16
16
  export {
17
17
  AgentRichTextReadonly
18
18
  };
19
- //# sourceMappingURL=AgentRichTextReadonly-U3XUJYCW.js.map
19
+ //# sourceMappingURL=AgentRichTextReadonly-CCELQPHE.js.map
@@ -1,11 +1,11 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, Ref, JSX } from 'react';
3
- import { c as AgentConversationVM, g as WorkspaceLinkAction, f as WorkspaceAgentSessionDetailViewModel } from '../workspaceLinkActions-CzsbvGmC.js';
4
- export { B as BuildWorkspaceAgentSessionDetailInput, W as WorkspaceAgentActivityCard, e as WorkspaceAgentActivityTimelineItem, h as buildWorkspaceAgentSessionDetailViewModel } from '../workspaceLinkActions-CzsbvGmC.js';
5
- import { d as AgentGUIProviderSkillOption, h as AgentMessageMarkdownWorkspaceAppIcon } from '../agentGuiNodeTypes-DW7T--Y8.js';
3
+ import { c as AgentConversationVM, g as WorkspaceLinkAction, f as WorkspaceAgentSessionDetailViewModel } from '../workspaceLinkActions-DxyzMy10.js';
4
+ export { B as BuildWorkspaceAgentSessionDetailInput, W as WorkspaceAgentActivityCard, e as WorkspaceAgentActivityTimelineItem, h as buildWorkspaceAgentSessionDetailViewModel } from '../workspaceLinkActions-DxyzMy10.js';
5
+ import { d as AgentGUIProviderSkillOption, h as AgentMessageMarkdownWorkspaceAppIcon } from '../agentGuiNodeTypes-Dgl7kQHA.js';
6
6
  import { AgentActivityMessage } from '@tutti-os/agent-activity-core';
7
7
  import '@tutti-os/workspace-issue-manager/core';
8
- import '../types-CHAMK2g7.js';
8
+ import '../types-DtXXsISB.js';
9
9
  import '../planImplementationPresentation-BxVOLt6A.js';
10
10
  import '@tutti-os/workspace-user-project/contracts';
11
11
 
@@ -32,6 +32,15 @@ interface AgentTranscriptTurnAttachment {
32
32
  }
33
33
  type AgentTranscriptAttachmentLocator = (attachmentId: string) => void;
34
34
 
35
+ interface AgentTranscriptVirtualScrollController {
36
+ agentSessionId: string;
37
+ enabled: boolean;
38
+ isAtEnd(): boolean;
39
+ scrollToEnd(options?: {
40
+ behavior?: ScrollBehavior;
41
+ }): void;
42
+ }
43
+
35
44
  interface AgentTranscriptViewProps {
36
45
  conversation: AgentConversationVM;
37
46
  turnAttachments?: readonly AgentTranscriptTurnAttachment[];
@@ -43,6 +52,8 @@ interface AgentTranscriptViewProps {
43
52
  workspaceAppIcons?: readonly AgentMessageMarkdownWorkspaceAppIcon[];
44
53
  showRawTimelineJson?: boolean;
45
54
  participantPresentation?: AgentConversationParticipantPresentation;
55
+ virtualListLayoutRevision?: number;
56
+ virtualScrollControllerRef?: Ref<AgentTranscriptVirtualScrollController>;
46
57
  labels: {
47
58
  toolCallsLabel: (count: number) => string;
48
59
  thinkingLabel: string;
@@ -69,6 +80,8 @@ interface AgentConversationFlowProps {
69
80
  workspaceAppIcons?: readonly AgentMessageMarkdownWorkspaceAppIcon[];
70
81
  showRawTimelineJson?: boolean;
71
82
  participantPresentation?: AgentConversationParticipantPresentation;
83
+ virtualListLayoutRevision?: number;
84
+ virtualScrollControllerRef?: Ref<AgentTranscriptVirtualScrollController>;
72
85
  labels: {
73
86
  toolCallsLabel: (count: number) => string;
74
87
  thinkingLabel: string;
@@ -3,29 +3,33 @@ import {
3
3
  AgentTranscriptSkeleton,
4
4
  AgentTranscriptView,
5
5
  buildWorkspaceAgentSessionDetailViewModel,
6
- projectAgentConversationVM,
7
- reconcileProjectedAgentConversationVM,
8
6
  serializeAgentConversationForClipboard,
9
7
  useProjectedAgentConversation
10
- } from "../chunk-2L2LVSOD.js";
11
- import "../chunk-2STAUA73.js";
12
- import "../chunk-WGCDSA7P.js";
8
+ } from "../chunk-EHNPHZE4.js";
9
+ import {
10
+ projectAgentConversationVM,
11
+ reconcileProjectedAgentConversationVM
12
+ } from "../chunk-A4KKC324.js";
13
+ import "../chunk-AYTUAZE3.js";
14
+ import "../chunk-MBM7PJIF.js";
15
+ import "../chunk-XWPHTXEM.js";
13
16
  import "../chunk-LQMIEH4C.js";
14
17
  import "../chunk-N4HLBSMJ.js";
15
18
  import "../chunk-XJ34OIEQ.js";
16
- import "../chunk-SWO67UWQ.js";
19
+ import "../chunk-CZOZBUIM.js";
17
20
  import "../chunk-JDVP33S5.js";
18
21
  import "../chunk-3V5OCA2M.js";
19
- import "../chunk-M6WEFXPL.js";
22
+ import "../chunk-2MCNNB2P.js";
23
+ import "../chunk-VV3YIU5W.js";
20
24
  import "../chunk-3X5VDG6T.js";
21
25
  import "../chunk-F5UR6EJG.js";
22
26
  import {
23
27
  translate
24
- } from "../chunk-GLVENTN6.js";
28
+ } from "../chunk-WXLO33YP.js";
25
29
  import "../chunk-5BJYO6X3.js";
26
30
  import "../chunk-AFUVWWQY.js";
27
31
  import "../chunk-MIJXEELH.js";
28
- import "../chunk-ZXEICU6J.js";
32
+ import "../chunk-KK7YXPTS.js";
29
33
  import "../chunk-FGLQZ6I4.js";
30
34
  import "../chunk-D2JUDUYY.js";
31
35
  import "../chunk-SEHJINGH.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../shared/WorkspaceAgentSessionDetail.tsx"],"sourcesContent":["import { useMemo, type JSX } from \"react\";\nimport type { WorkspaceLinkAction } from \"../contexts/workspace/presentation/renderer/actions/workspaceLinkActions\";\nimport { translate } from \"../i18n/index\";\nimport { AgentConversationFlow } from \"./agentConversation/components/AgentConversationFlow\";\nimport type { AgentConversationParticipantPresentation } from \"./agentConversation/contracts/agentConversationParticipantPresentation\";\nimport { useProjectedAgentConversation } from \"./agentConversation/projection/useProjectedAgentConversation\";\nimport type { WorkspaceAgentSessionDetailViewModel } from \"./workspaceAgentSessionDetailViewModel\";\n\nexport interface WorkspaceAgentSessionDetailProps {\n detail: WorkspaceAgentSessionDetailViewModel;\n avoidGroupingEdits?: boolean;\n isLoading: boolean;\n timelineItemCount: number;\n onLinkAction?: (action: WorkspaceLinkAction) => void;\n toolCallsLabel: (count: number) => string;\n thinkingLabel?: string;\n loadingLabel?: string;\n rawTimelineJsonLabel?: string;\n showRawTimelineJson?: boolean;\n participantPresentation?: AgentConversationParticipantPresentation;\n}\n\nexport function WorkspaceAgentSessionDetail({\n detail,\n avoidGroupingEdits = false,\n isLoading,\n timelineItemCount,\n onLinkAction,\n toolCallsLabel,\n thinkingLabel = translate(\"agentHost.workspaceAgentSessionDetailThinking\"),\n loadingLabel = translate(\"common.loading\"),\n rawTimelineJsonLabel,\n showRawTimelineJson = false,\n participantPresentation\n}: WorkspaceAgentSessionDetailProps): JSX.Element {\n const conversation = useProjectedAgentConversation({\n detail,\n avoidGroupingEdits\n });\n const showLoadingSkeleton =\n detail.turns.length === 0 &&\n (isLoading ||\n detail.activity.status === \"waiting\" ||\n detail.activity.status === \"working\");\n const emptySummary =\n detail.activity.latestActivitySummary ||\n (timelineItemCount > 0\n ? translate(\"agentHost.workspaceAgentSessionDetailEmptyWithTimeline\")\n : translate(\"agentHost.workspaceAgentSessionDetailEmptyNoTimeline\"));\n const flowLabels = useMemo(\n () => ({\n thinkingLabel,\n toolCallsLabel,\n processing: translate(\"agentHost.agentGui.processing\"),\n turnSummary: translate(\"agentHost.agentGui.turnSummary\"),\n rawTimelineJson: rawTimelineJsonLabel\n }),\n [rawTimelineJsonLabel, thinkingLabel, toolCallsLabel]\n );\n const emptyState = useMemo(\n () => (\n <div className=\"workspace-agents-status-panel__detail-empty\">\n {emptySummary}\n </div>\n ),\n [emptySummary]\n );\n\n return (\n <div className=\"workspace-agents-status-panel__detail\">\n <AgentConversationFlow\n conversation={detail.turns.length > 0 ? conversation : null}\n isLoading={showLoadingSkeleton}\n loadingLabel={loadingLabel}\n empty={emptyState}\n onLinkAction={onLinkAction}\n showRawTimelineJson={showRawTimelineJson}\n participantPresentation={participantPresentation}\n labels={flowLabels}\n />\n </div>\n );\n}\n\nexport function WorkspaceAgentSessionDetailSkeleton({\n loading = true,\n loadingLabel = translate(\"common.loading\")\n}: {\n loading?: boolean;\n loadingLabel?: string;\n}): JSX.Element {\n const flowLabels = useMemo(\n () => ({\n thinkingLabel: translate(\"agentHost.workspaceAgentSessionDetailThinking\"),\n toolCallsLabel: (count: number) =>\n translate(\"agentHost.workspaceAgentSessionDetailToolCalls\", { count }),\n processing: translate(\"agentHost.agentGui.processing\"),\n turnSummary: translate(\"agentHost.agentGui.turnSummary\")\n }),\n []\n );\n\n if (!loading) {\n return <></>;\n }\n\n return (\n <div\n className=\"workspace-agents-status-panel__detail-skeleton\"\n data-testid=\"workspace-agents-status-panel-detail-skeleton\"\n role=\"status\"\n aria-busy=\"true\"\n aria-label={loadingLabel}\n >\n <AgentConversationFlow\n conversation={null}\n isLoading\n loadingLabel={loadingLabel}\n loadingTestId=\"workspace-agents-status-panel-detail-skeleton\"\n empty={null}\n labels={flowLabels}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,eAAyB;AA6D5B,SA0CK,UA1CL;AAvCC,SAAS,4BAA4B;AAAA,EAC1C;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAgB,UAAU,+CAA+C;AAAA,EACzE,eAAe,UAAU,gBAAgB;AAAA,EACzC;AAAA,EACA,sBAAsB;AAAA,EACtB;AACF,GAAkD;AAChD,QAAM,eAAe,8BAA8B;AAAA,IACjD;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,sBACJ,OAAO,MAAM,WAAW,MACvB,aACC,OAAO,SAAS,WAAW,aAC3B,OAAO,SAAS,WAAW;AAC/B,QAAM,eACJ,OAAO,SAAS,0BACf,oBAAoB,IACjB,UAAU,wDAAwD,IAClE,UAAU,sDAAsD;AACtE,QAAM,aAAa;AAAA,IACjB,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,YAAY,UAAU,+BAA+B;AAAA,MACrD,aAAa,UAAU,gCAAgC;AAAA,MACvD,iBAAiB;AAAA,IACnB;AAAA,IACA,CAAC,sBAAsB,eAAe,cAAc;AAAA,EACtD;AACA,QAAM,aAAa;AAAA,IACjB,MACE,oBAAC,SAAI,WAAU,+CACZ,wBACH;AAAA,IAEF,CAAC,YAAY;AAAA,EACf;AAEA,SACE,oBAAC,SAAI,WAAU,yCACb;AAAA,IAAC;AAAA;AAAA,MACC,cAAc,OAAO,MAAM,SAAS,IAAI,eAAe;AAAA,MACvD,WAAW;AAAA,MACX;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ;AAAA;AAAA,EACV,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../shared/WorkspaceAgentSessionDetail.tsx"],"sourcesContent":["import { useMemo, type JSX } from \"react\";\nimport type { WorkspaceLinkAction } from \"../contexts/workspace/presentation/renderer/actions/workspaceLinkActions\";\nimport { translate } from \"../i18n/index\";\nimport { AgentConversationFlow } from \"./agentConversation/components/AgentConversationFlow\";\nimport type { AgentConversationParticipantPresentation } from \"./agentConversation/contracts/agentConversationParticipantPresentation\";\nimport { useProjectedAgentConversation } from \"./agentConversation/projection/useProjectedAgentConversation\";\nimport type { WorkspaceAgentSessionDetailViewModel } from \"./workspaceAgentSessionDetailViewModel\";\n\nexport interface WorkspaceAgentSessionDetailProps {\n detail: WorkspaceAgentSessionDetailViewModel;\n avoidGroupingEdits?: boolean;\n isLoading: boolean;\n timelineItemCount: number;\n onLinkAction?: (action: WorkspaceLinkAction) => void;\n toolCallsLabel: (count: number) => string;\n thinkingLabel?: string;\n loadingLabel?: string;\n rawTimelineJsonLabel?: string;\n showRawTimelineJson?: boolean;\n participantPresentation?: AgentConversationParticipantPresentation;\n}\n\nexport function WorkspaceAgentSessionDetail({\n detail,\n avoidGroupingEdits = false,\n isLoading,\n timelineItemCount,\n onLinkAction,\n toolCallsLabel,\n thinkingLabel = translate(\"agentHost.workspaceAgentSessionDetailThinking\"),\n loadingLabel = translate(\"common.loading\"),\n rawTimelineJsonLabel,\n showRawTimelineJson = false,\n participantPresentation\n}: WorkspaceAgentSessionDetailProps): JSX.Element {\n const conversation = useProjectedAgentConversation({\n detail,\n avoidGroupingEdits\n });\n const showLoadingSkeleton =\n detail.turns.length === 0 &&\n (isLoading ||\n detail.activity.status === \"waiting\" ||\n detail.activity.status === \"working\");\n const emptySummary =\n detail.activity.latestActivitySummary ||\n (timelineItemCount > 0\n ? translate(\"agentHost.workspaceAgentSessionDetailEmptyWithTimeline\")\n : translate(\"agentHost.workspaceAgentSessionDetailEmptyNoTimeline\"));\n const flowLabels = useMemo(\n () => ({\n thinkingLabel,\n toolCallsLabel,\n processing: translate(\"agentHost.agentGui.processing\"),\n turnSummary: translate(\"agentHost.agentGui.turnSummary\"),\n rawTimelineJson: rawTimelineJsonLabel\n }),\n [rawTimelineJsonLabel, thinkingLabel, toolCallsLabel]\n );\n const emptyState = useMemo(\n () => (\n <div className=\"workspace-agents-status-panel__detail-empty\">\n {emptySummary}\n </div>\n ),\n [emptySummary]\n );\n\n return (\n <div className=\"workspace-agents-status-panel__detail\">\n <AgentConversationFlow\n conversation={detail.turns.length > 0 ? conversation : null}\n isLoading={showLoadingSkeleton}\n loadingLabel={loadingLabel}\n empty={emptyState}\n onLinkAction={onLinkAction}\n showRawTimelineJson={showRawTimelineJson}\n participantPresentation={participantPresentation}\n labels={flowLabels}\n />\n </div>\n );\n}\n\nexport function WorkspaceAgentSessionDetailSkeleton({\n loading = true,\n loadingLabel = translate(\"common.loading\")\n}: {\n loading?: boolean;\n loadingLabel?: string;\n}): JSX.Element {\n const flowLabels = useMemo(\n () => ({\n thinkingLabel: translate(\"agentHost.workspaceAgentSessionDetailThinking\"),\n toolCallsLabel: (count: number) =>\n translate(\"agentHost.workspaceAgentSessionDetailToolCalls\", { count }),\n processing: translate(\"agentHost.agentGui.processing\"),\n turnSummary: translate(\"agentHost.agentGui.turnSummary\")\n }),\n []\n );\n\n if (!loading) {\n return <></>;\n }\n\n return (\n <div\n className=\"workspace-agents-status-panel__detail-skeleton\"\n data-testid=\"workspace-agents-status-panel-detail-skeleton\"\n role=\"status\"\n aria-busy=\"true\"\n aria-label={loadingLabel}\n >\n <AgentConversationFlow\n conversation={null}\n isLoading\n loadingLabel={loadingLabel}\n loadingTestId=\"workspace-agents-status-panel-detail-skeleton\"\n empty={null}\n labels={flowLabels}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,eAAyB;AA6D5B,SA0CK,UA1CL;AAvCC,SAAS,4BAA4B;AAAA,EAC1C;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAgB,UAAU,+CAA+C;AAAA,EACzE,eAAe,UAAU,gBAAgB;AAAA,EACzC;AAAA,EACA,sBAAsB;AAAA,EACtB;AACF,GAAkD;AAChD,QAAM,eAAe,8BAA8B;AAAA,IACjD;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,sBACJ,OAAO,MAAM,WAAW,MACvB,aACC,OAAO,SAAS,WAAW,aAC3B,OAAO,SAAS,WAAW;AAC/B,QAAM,eACJ,OAAO,SAAS,0BACf,oBAAoB,IACjB,UAAU,wDAAwD,IAClE,UAAU,sDAAsD;AACtE,QAAM,aAAa;AAAA,IACjB,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,YAAY,UAAU,+BAA+B;AAAA,MACrD,aAAa,UAAU,gCAAgC;AAAA,MACvD,iBAAiB;AAAA,IACnB;AAAA,IACA,CAAC,sBAAsB,eAAe,cAAc;AAAA,EACtD;AACA,QAAM,aAAa;AAAA,IACjB,MACE,oBAAC,SAAI,WAAU,+CACZ,wBACH;AAAA,IAEF,CAAC,YAAY;AAAA,EACf;AAEA,SACE,oBAAC,SAAI,WAAU,yCACb;AAAA,IAAC;AAAA;AAAA,MACC,cAAc,OAAO,MAAM,SAAS,IAAI,eAAe;AAAA,MACvD,WAAW;AAAA,MACX;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ;AAAA;AAAA,EACV,GACF;AAEJ;","names":[]}
@@ -2,8 +2,8 @@ import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
4
4
  import { AgentActivityGoalControlInput, AgentActivityGoalControlResult, AgentActivityCreateSessionInput, AgentActivitySession, AgentActivityDeleteSessionInput, AgentActivityDeleteSessionResult, AgentActivitySendInput, AgentActivityRailPlacement, AgentActivitySessionSettings, AgentActivityActivateSessionResult, AgentActivityUpdateTuttiModeActivationInput, AgentActivityUpdateTuttiModeActivationResult, AgentActivitySnapshot, AgentSessionEngine, AgentActivityMessageOrder, AgentActivityMessagePage, AgentActivitySendInputResult, AgentActivityRenameSessionInput, AgentActivitySetCollaborationAdoptionInput, AgentActivityCollaborationRun, AgentActivitySubmitInteractiveInput, AgentActivitySubmitInteractiveResult, AgentActivitySnapshotListener, AgentActivitySubmitSettingsPatch } from '@tutti-os/agent-activity-core';
5
- import { l as AgentHostAgentSessionComposerSettings, p as AgentHostUnactivateAgentSessionResult, b as AgentGUIAgentTarget, f as AgentGUIProvider, q as AgentPromptContentBlock, e as AgentGUINodeData, P as Point, g as AgentGUIProviderRailAllPresentation, h as AgentGUIProviderRailMode, i as AgentGUIProviderReadinessGate, j as AgentGUITargetConnectionSource, d as AgentGUIHomeSuggestionId, N as NodeFrame, a as AgentGUIAgentDirectorySnapshot, c as AgentGUIAllAgentsPresentation } from './types-CHAMK2g7.js';
6
- import { A as AgentComposerDraft, i as AgentSessionCommand, d as AgentGUIProviderSkillOption, b as AgentGUIComposerSettingsVM, e as AgentGUIQueueStatus, f as AgentGUIQueuedPromptVM, h as AgentMessageMarkdownWorkspaceAppIcon, j as AgentSlashCommandCapability, c as AgentGUINodeViewModel, a as AgentComposerDraftFile, k as AgentUsageQuota, g as AgentHostInputApi } from './agentGuiNodeTypes-DW7T--Y8.js';
5
+ import { m as AgentHostAgentSessionComposerSettings, q as AgentHostUnactivateAgentSessionResult, c as AgentGUIAgentTarget, g as AgentGUIProvider, r as AgentPromptContentBlock, f as AgentGUINodeData, P as Point, h as AgentGUIProviderRailAllPresentation, i as AgentGUIProviderRailMode, j as AgentGUIProviderReadinessGate, k as AgentGUITargetConnectionSource, e as AgentGUIHomeSuggestionId, b as AgentGUIAgentOwnership, N as NodeFrame, a as AgentGUIAgentDirectorySnapshot, d as AgentGUIAllAgentsPresentation } from './types-DtXXsISB.js';
6
+ import { A as AgentComposerDraft, i as AgentSessionCommand, d as AgentGUIProviderSkillOption, b as AgentGUIComposerSettingsVM, e as AgentGUIQueueStatus, f as AgentGUIQueuedPromptVM, h as AgentMessageMarkdownWorkspaceAppIcon, j as AgentSlashCommandCapability, c as AgentGUINodeViewModel, a as AgentComposerDraftFile, k as AgentUsageQuota, g as AgentHostInputApi } from './agentGuiNodeTypes-Dgl7kQHA.js';
7
7
  import { WorkspaceFileReference, ReferenceLocateTarget, WorkspaceFileReferenceAdapter, ReferenceProvenanceCatalog } from '@tutti-os/workspace-file-reference/contracts';
8
8
  export { ReferenceProvenanceCatalog as AgentGUIReferenceProvenanceFilterCatalog } from '@tutti-os/workspace-file-reference/contracts';
9
9
  import { A as AgentContextMentionItem, b as AgentMentionFilterId } from './AgentMentionSearchContracts-DIlUt4cC.js';
@@ -11,7 +11,7 @@ import { A as AgentGuiI18nLocale } from './runtime-Dwf44VKc.js';
11
11
  import { WorkspaceFileEntry } from '@tutti-os/workspace-file-manager/services';
12
12
  import { ReferenceSourceAggregator } from '@tutti-os/workspace-file-reference/core';
13
13
  import { ReferenceSourcePickerProps } from '@tutti-os/workspace-file-reference/ui';
14
- import { b as AgentConversationPromptVM, g as WorkspaceLinkAction } from './workspaceLinkActions-CzsbvGmC.js';
14
+ import { b as AgentConversationPromptVM, g as WorkspaceLinkAction } from './workspaceLinkActions-DxyzMy10.js';
15
15
  import { WorkspaceUserProjectI18nRuntime } from '@tutti-os/workspace-user-project/i18n';
16
16
  import { WorkspaceUserProjectSelectChangeAction } from '@tutti-os/workspace-user-project/ui';
17
17
  import { WorkspaceUserProject } from '@tutti-os/workspace-user-project/contracts';
@@ -1523,6 +1523,11 @@ interface AgentGUINodeHostActions {
1523
1523
  onCapabilitySettingsRequest?: (capability: AgentComposerCapabilitySettingsTarget) => void;
1524
1524
  onAgentProviderLogin?: (provider: AgentGUIProvider) => void;
1525
1525
  onAgentEnvPanelOpen?: (input?: OpenAgentEnvPanelInput) => void;
1526
+ /**
1527
+ * Notifies the Host when the exact target's config menu opens. Account and
1528
+ * Commerce refreshes remain Host-owned and must not enter Agent status.
1529
+ */
1530
+ onAgentConfigMenuOpen?: (context: AgentGUIAgentConfigMenuContext) => void;
1526
1531
  onOpenConversationWindow?: (agentSessionId: string) => void;
1527
1532
  onClose: () => void;
1528
1533
  onResize: (frame: NodeFrame) => void;
@@ -1540,7 +1545,18 @@ interface AgentGUINodeHostActions {
1540
1545
  */
1541
1546
  onConversationRailLayoutChange?: (layout: AgentGUIConversationRailLayout) => void;
1542
1547
  }
1548
+ interface AgentGUIAgentConfigMenuContext {
1549
+ agentTargetId: string;
1550
+ provider: AgentGUIProvider;
1551
+ label: string;
1552
+ ownership?: AgentGUIAgentOwnership;
1553
+ }
1543
1554
  interface AgentGUINodeRenderSlots {
1555
+ /**
1556
+ * Optional Host chrome for the exact target's account/Commerce presentation.
1557
+ * Returning null preserves AgentGUI's provider account and quota content.
1558
+ */
1559
+ agentConfigAccount?: (context: AgentGUIAgentConfigMenuContext) => ReactNode;
1544
1560
  projectDirectoryPickerHeaderActions?: ReferenceSourcePickerProps["renderHeaderActions"];
1545
1561
  providerRailEmpty?: AgentGUIAgentsEmptyRenderer;
1546
1562
  providerUnavailableState?: AgentGUIProviderUnavailableStateRenderer;
package/dist/agent-gui.js CHANGED
@@ -1,46 +1,52 @@
1
1
  import {
2
2
  AgentGUI
3
- } from "./chunk-EDP4D42H.js";
4
- import "./chunk-ZBI6R46N.js";
3
+ } from "./chunk-45KN5Z5F.js";
4
+ import "./chunk-5DN5N2XS.js";
5
+ import "./chunk-RMC2MGL4.js";
6
+ import "./chunk-ALAGL6VL.js";
5
7
  import "./chunk-LB4AGT7B.js";
6
8
  import "./chunk-A4WCTHWS.js";
7
- import "./chunk-7AYFKNLD.js";
8
- import "./chunk-T57ZZWTC.js";
9
- import "./chunk-JA6XAKKE.js";
9
+ import "./chunk-TWMV6YTX.js";
10
+ import "./chunk-4HAG3FOY.js";
11
+ import "./chunk-TWF6JXPC.js";
10
12
  import "./chunk-KDN6SLJM.js";
11
13
  import "./chunk-SUVMLCED.js";
12
14
  import "./chunk-MGSRWYRN.js";
13
15
  import "./chunk-CBMWHQ7P.js";
14
- import "./chunk-CQFT3MI5.js";
16
+ import "./chunk-3YYI6RXA.js";
15
17
  import "./chunk-EVQ4JY3N.js";
16
- import "./chunk-2L2LVSOD.js";
17
- import "./chunk-2STAUA73.js";
18
- import "./chunk-WGCDSA7P.js";
18
+ import "./chunk-EHNPHZE4.js";
19
+ import "./chunk-A4KKC324.js";
20
+ import "./chunk-AYTUAZE3.js";
21
+ import "./chunk-MBM7PJIF.js";
22
+ import "./chunk-XWPHTXEM.js";
19
23
  import "./chunk-LQMIEH4C.js";
20
24
  import "./chunk-FMTWYOHM.js";
21
25
  import "./chunk-N4HLBSMJ.js";
22
26
  import "./chunk-UP3ZDYTN.js";
23
27
  import "./chunk-GUFEHWUX.js";
24
- import "./chunk-WMJDOMG6.js";
25
- import "./chunk-BCBB4HOV.js";
28
+ import "./chunk-ZELGKLW5.js";
29
+ import "./chunk-634MNSI5.js";
26
30
  import "./chunk-3MVSOLX3.js";
27
31
  import "./chunk-PPA2OB2H.js";
28
32
  import "./chunk-6GX57XB5.js";
29
- import "./chunk-N5356722.js";
33
+ import "./chunk-EKQ7UX2B.js";
34
+ import "./chunk-YEXRTXTE.js";
30
35
  import "./chunk-VMPA46ET.js";
31
36
  import "./chunk-YMXYBG7U.js";
32
37
  import "./chunk-XJ34OIEQ.js";
33
- import "./chunk-SWO67UWQ.js";
38
+ import "./chunk-CZOZBUIM.js";
34
39
  import "./chunk-JDVP33S5.js";
35
40
  import "./chunk-3V5OCA2M.js";
36
- import "./chunk-M6WEFXPL.js";
41
+ import "./chunk-2MCNNB2P.js";
42
+ import "./chunk-VV3YIU5W.js";
37
43
  import "./chunk-3X5VDG6T.js";
38
44
  import "./chunk-F5UR6EJG.js";
39
- import "./chunk-GLVENTN6.js";
45
+ import "./chunk-WXLO33YP.js";
40
46
  import "./chunk-5BJYO6X3.js";
41
47
  import "./chunk-AFUVWWQY.js";
42
48
  import "./chunk-MIJXEELH.js";
43
- import "./chunk-ZXEICU6J.js";
49
+ import "./chunk-KK7YXPTS.js";
44
50
  import "./chunk-RMQREVJY.js";
45
51
  import "./chunk-FGLQZ6I4.js";
46
52
  import "./chunk-D2JUDUYY.js";
@@ -2,7 +2,7 @@ import * as react from 'react';
2
2
  import { JSX, ReactNode, HTMLAttributes } from 'react';
3
3
  import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
4
4
  import { A as AgentGuiI18nLocale, T as TranslateFn } from '../runtime-Dwf44VKc.js';
5
- import { d as WorkspaceAgentActivityStatus, b as AgentConversationPromptVM, g as WorkspaceLinkAction } from '../workspaceLinkActions-CzsbvGmC.js';
5
+ import { d as WorkspaceAgentActivityStatus, b as AgentConversationPromptVM, g as WorkspaceLinkAction } from '../workspaceLinkActions-DxyzMy10.js';
6
6
  import { AgentActivityNeedsAttentionItem, AgentSessionEngine, WorkspaceAgentConsumerSession, AgentActivitySnapshot, AgentSessionEngineState } from '@tutti-os/agent-activity-core';
7
7
  export { WorkspaceAgentConsumerCounts, WorkspaceAgentConsumerSession, selectWorkspaceAgentConsumerCounts, selectWorkspaceAgentConsumerSession, selectWorkspaceAgentConsumerSessions } from '@tutti-os/agent-activity-core';
8
8
  import { a as PLAN_IMPLEMENTATION_ACTION_IMPLEMENT, P as PLAN_IMPLEMENTATION_ACTION_FEEDBACK, b as PLAN_IMPLEMENTATION_ACTION_SKIP } from '../planImplementationPresentation-BxVOLt6A.js';
@@ -8,20 +8,22 @@ import {
8
8
  isPromptRequestIdTitle,
9
9
  latestPlanTurnId,
10
10
  planImplementationPromptFromPlanTurn
11
- } from "../chunk-CQFT3MI5.js";
11
+ } from "../chunk-3YYI6RXA.js";
12
12
  import {
13
13
  useEngineSelector
14
14
  } from "../chunk-EVQ4JY3N.js";
15
15
  import {
16
16
  AgentMessageMarkdown,
17
- CustomScrollArea,
17
+ CustomScrollArea
18
+ } from "../chunk-MBM7PJIF.js";
19
+ import {
18
20
  extractAgentMcpToolTarget,
19
21
  extractExitPlanKeepPlanningOptionId,
20
22
  extractExitPlanModeOptions,
21
23
  isExitPlanSwitchModeInput,
22
24
  normalizeAgentApprovalPurpose,
23
25
  normalizeAskUserQuestions
24
- } from "../chunk-WGCDSA7P.js";
26
+ } from "../chunk-XWPHTXEM.js";
25
27
  import {
26
28
  cn
27
29
  } from "../chunk-LQMIEH4C.js";
@@ -29,13 +31,14 @@ import "../chunk-FMTWYOHM.js";
29
31
  import {
30
32
  userAvatarPlaceholderUrl,
31
33
  workspaceAgentActivityStatusLabel
32
- } from "../chunk-BCBB4HOV.js";
34
+ } from "../chunk-634MNSI5.js";
33
35
  import {
34
36
  resolveWorkspaceAgentSessionSortTimeUnixMs
35
37
  } from "../chunk-YMXYBG7U.js";
38
+ import "../chunk-2MCNNB2P.js";
36
39
  import {
37
40
  workspaceAgentProviderLabel
38
- } from "../chunk-M6WEFXPL.js";
41
+ } from "../chunk-VV3YIU5W.js";
39
42
  import {
40
43
  managedAgentRoundedIconUrl
41
44
  } from "../chunk-3X5VDG6T.js";
@@ -44,13 +47,13 @@ import {
44
47
  AgentGuiI18nProvider,
45
48
  getActiveUiLanguage,
46
49
  useTranslation
47
- } from "../chunk-GLVENTN6.js";
50
+ } from "../chunk-WXLO33YP.js";
48
51
  import "../chunk-5BJYO6X3.js";
49
52
  import "../chunk-AFUVWWQY.js";
50
53
  import {
51
54
  normalizeAgentTitleText
52
55
  } from "../chunk-MIJXEELH.js";
53
- import "../chunk-ZXEICU6J.js";
56
+ import "../chunk-KK7YXPTS.js";
54
57
  import "../chunk-D2JUDUYY.js";
55
58
  import "../chunk-SEHJINGH.js";
56
59
  import "../chunk-O433KXLK.js";