@tutti-os/agent-gui 0.0.103 → 0.0.105

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 (81) hide show
  1. package/dist/{AgentGUI-D6IQ0F_N.d.ts → AgentGUI-Do6py-T_.d.ts} +10 -6
  2. package/dist/AgentRichTextReadonly-F6PHC5SX.js +18 -0
  3. package/dist/AgentRichTextReadonly-F6PHC5SX.js.map +1 -0
  4. package/dist/agent-conversation/index.d.ts +3 -3
  5. package/dist/agent-conversation/index.js +11 -7
  6. package/dist/agent-conversation/index.js.map +1 -1
  7. package/dist/agent-gui.d.ts +4 -4
  8. package/dist/agent-gui.js +18 -14
  9. package/dist/agent-message-center/index.d.ts +1 -1
  10. package/dist/agent-message-center/index.js +13 -9
  11. package/dist/agent-message-center/index.js.map +1 -1
  12. package/dist/{agentConversationVM-BzHZhwFP.d.ts → agentConversationVM-Bf3Zv3iI.d.ts} +12 -2
  13. package/dist/{agentFileMentionContracts-58IjMU-u.d.ts → agentFileMentionContracts-B70VnPWO.d.ts} +2 -0
  14. package/dist/{agentGuiNodeTypes-8U3q_frv.d.ts → agentGuiNodeTypes-DbgQBiYz.d.ts} +4 -2
  15. package/dist/app/renderer/agentactivity.css +99 -0
  16. package/dist/{chunk-SGGGE2F3.js → chunk-4ZWV57MF.js} +42 -10
  17. package/dist/chunk-4ZWV57MF.js.map +1 -0
  18. package/dist/{chunk-XZD5KTM4.js → chunk-6R7GHXRQ.js} +12 -6
  19. package/dist/chunk-6R7GHXRQ.js.map +1 -0
  20. package/dist/{chunk-UHOVZI6B.js → chunk-7MPN2JGL.js} +122 -154
  21. package/dist/chunk-7MPN2JGL.js.map +1 -0
  22. package/dist/{chunk-5X7YDOC6.js → chunk-D2JUDUYY.js} +1 -1
  23. package/dist/chunk-D2JUDUYY.js.map +1 -0
  24. package/dist/{chunk-IVY4OL7B.js → chunk-IR2CL2X2.js} +1119 -2178
  25. package/dist/chunk-IR2CL2X2.js.map +1 -0
  26. package/dist/{chunk-PCXBTG5X.js → chunk-J2HG7UCP.js} +46 -22
  27. package/dist/chunk-J2HG7UCP.js.map +1 -0
  28. package/dist/{chunk-WXMBD2O7.js → chunk-JG7HGKZL.js} +597 -63
  29. package/dist/chunk-JG7HGKZL.js.map +1 -0
  30. package/dist/chunk-KPMQGPYU.js +43 -0
  31. package/dist/chunk-KPMQGPYU.js.map +1 -0
  32. package/dist/{chunk-6PMLIVTI.js → chunk-LDZ6C3YV.js} +3 -39
  33. package/dist/chunk-LDZ6C3YV.js.map +1 -0
  34. package/dist/{chunk-L2MTZMVH.js → chunk-N3HTEYLZ.js} +1985 -1315
  35. package/dist/chunk-N3HTEYLZ.js.map +1 -0
  36. package/dist/{chunk-3ZBDWWCV.js → chunk-N4WVVCNI.js} +2 -2
  37. package/dist/{chunk-IBFGOAY3.js → chunk-OWW7CU4U.js} +2 -2
  38. package/dist/chunk-SN6UYX54.js +42 -0
  39. package/dist/chunk-SN6UYX54.js.map +1 -0
  40. package/dist/{chunk-RGG5UGJD.js → chunk-TKBEVCHG.js} +5 -5
  41. package/dist/chunk-TKBEVCHG.js.map +1 -0
  42. package/dist/chunk-UFIEUC3Y.js +755 -0
  43. package/dist/chunk-UFIEUC3Y.js.map +1 -0
  44. package/dist/{chunk-5Z4ZXXX4.js → chunk-V5ROOS2O.js} +124 -2
  45. package/dist/chunk-V5ROOS2O.js.map +1 -0
  46. package/dist/chunk-XJ34OIEQ.js +18 -0
  47. package/dist/chunk-XJ34OIEQ.js.map +1 -0
  48. package/dist/{chunk-ZRJS4MOQ.js → chunk-ZSJBCZUH.js} +54 -7
  49. package/dist/chunk-ZSJBCZUH.js.map +1 -0
  50. package/dist/context-mention-palette/index.d.ts +1 -1
  51. package/dist/context-mention-palette/index.js +10 -8
  52. package/dist/{contribution-CTVBPN0R.d.ts → contribution-C6K5YfJ7.d.ts} +1 -0
  53. package/dist/custom-mention.d.ts +6 -0
  54. package/dist/custom-mention.js +1 -1
  55. package/dist/i18n/index.d.ts +4 -4
  56. package/dist/i18n/index.js +2 -2
  57. package/dist/index.d.ts +6 -6
  58. package/dist/index.js +18 -14
  59. package/dist/index.js.map +1 -1
  60. package/dist/mention-search.d.ts +42 -6
  61. package/dist/mention-search.js +8 -6
  62. package/dist/workbench/contribution.d.ts +1 -1
  63. package/dist/workbench/contribution.js +3 -3
  64. package/dist/workbench/index.d.ts +3 -2
  65. package/dist/workbench/index.js +3 -3
  66. package/dist/workbench/sessionTitle.js +2 -2
  67. package/package.json +14 -14
  68. package/dist/chunk-5X7YDOC6.js.map +0 -1
  69. package/dist/chunk-5Z4ZXXX4.js.map +0 -1
  70. package/dist/chunk-6PMLIVTI.js.map +0 -1
  71. package/dist/chunk-IVY4OL7B.js.map +0 -1
  72. package/dist/chunk-L2MTZMVH.js.map +0 -1
  73. package/dist/chunk-PCXBTG5X.js.map +0 -1
  74. package/dist/chunk-RGG5UGJD.js.map +0 -1
  75. package/dist/chunk-SGGGE2F3.js.map +0 -1
  76. package/dist/chunk-UHOVZI6B.js.map +0 -1
  77. package/dist/chunk-WXMBD2O7.js.map +0 -1
  78. package/dist/chunk-XZD5KTM4.js.map +0 -1
  79. package/dist/chunk-ZRJS4MOQ.js.map +0 -1
  80. /package/dist/{chunk-3ZBDWWCV.js.map → chunk-N4WVVCNI.js.map} +0 -0
  81. /package/dist/{chunk-IBFGOAY3.js.map → chunk-OWW7CU4U.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { A as AgentContextMentionItem } from './agentFileMentionContracts-58IjMU-u.js';
1
+ import { A as AgentContextMentionItem } from './agentFileMentionContracts-B70VnPWO.js';
2
2
  import { AgentContextMentionProvider } from './context-mention-provider.js';
3
3
  import { MentionPaletteGroup, MentionPaletteState } from '@tutti-os/ui-rich-text/at-panel';
4
4
  import { ReferenceProvenanceFilter } from '@tutti-os/workspace-file-reference/contracts';
@@ -33,10 +33,21 @@ interface AgentMentionSearchDiagnosticLog {
33
33
  }
34
34
 
35
35
  type AgentMentionFilterId = "session" | "file" | "issue" | "agent" | "app";
36
- type AgentMentionGroupId = "apps" | "agents" | "files" | "opened_files" | "agent_generated_files" | "my_sessions" | "collab_sessions" | "issues";
37
- type AgentMentionRawGroupId = Exclude<AgentMentionGroupId, "files">;
36
+ type AgentMentionStaticGroupId = "apps" | "agents" | "files" | "opened_files" | "agent_generated_files" | "my_sessions" | "collab_sessions" | "issues";
37
+ type AgentMentionGroupId = AgentMentionStaticGroupId | `issue-topic:${string}`;
38
+ type AgentMentionRawGroupId = Exclude<AgentMentionStaticGroupId, "files">;
38
39
  type AgentMentionRawGroups = Record<AgentMentionRawGroupId, AgentContextMentionItem[]>;
39
40
  type AgentMentionTotalCounts = Partial<Record<AgentMentionGroupId, number>>;
41
+ interface AgentMentionIssueTopicGroup {
42
+ id: `issue-topic:${string}`;
43
+ providerGroupId: string;
44
+ label: string;
45
+ items: AgentContextMentionItem[];
46
+ totalCount: number;
47
+ nextPageToken: string | null;
48
+ loadMoreStatus: "idle" | "loading" | "error";
49
+ loadMoreError: string | null;
50
+ }
40
51
  interface AgentMentionBrowseCategory {
41
52
  id: AgentMentionFilterId;
42
53
  label: string;
@@ -64,6 +75,7 @@ interface AgentMentionBrowseFetchResult {
64
75
  providerDiagnostics: AgentMentionProviderQueryDiagnostic[];
65
76
  rawGroups: AgentMentionRawGroups;
66
77
  totalCounts: AgentMentionTotalCounts;
78
+ issueTopicGroups: AgentMentionIssueTopicGroup[] | null;
67
79
  }
68
80
  interface AgentMentionBrowseCacheEntry extends AgentMentionBrowseFetchResult {
69
81
  cachedAt: number;
@@ -97,6 +109,7 @@ declare class AgentMentionSearchControllerBase {
97
109
  protected preloadCancel: (() => void) | null;
98
110
  protected pendingPreloadKey: string | null;
99
111
  protected requestId: number;
112
+ protected activeRequestAbortController: AbortController | null;
100
113
  protected disposed: boolean;
101
114
  protected activeWorkspaceId: string;
102
115
  protected currentUserId: string;
@@ -108,6 +121,7 @@ declare class AgentMentionSearchControllerBase {
108
121
  protected currentIssueSearchLimit: number;
109
122
  protected agentGeneratedBrowsePath: string | null;
110
123
  protected rawGroups: AgentMentionRawGroups;
124
+ protected issueTopicGroups: AgentMentionIssueTopicGroup[] | null;
111
125
  protected state: AgentMentionSearchState;
112
126
  constructor(options: AgentMentionSearchControllerOptions);
113
127
  protected startBrowseModeFetch(filter: AgentMentionFilterId): void;
@@ -117,6 +131,9 @@ declare class AgentMentionSearchControllerBase {
117
131
  query: string;
118
132
  requestId: number;
119
133
  filter: AgentMentionFilterId;
134
+ provenanceFilter: ReferenceProvenanceFilter | null;
135
+ sessionCwd: string;
136
+ abortSignal?: AbortSignal;
120
137
  }): Promise<void>;
121
138
  protected runBrowseSearch(input: {
122
139
  workspaceId: string;
@@ -124,13 +141,14 @@ declare class AgentMentionSearchControllerBase {
124
141
  requestId: number;
125
142
  filter: AgentMentionFilterId;
126
143
  sessionCwd: string;
144
+ abortSignal: AbortSignal;
127
145
  }): Promise<void>;
128
146
  protected fetchBrowseResult(input: {
129
147
  workspaceId: string;
130
148
  currentUserId: string;
131
149
  filter: AgentMentionFilterId;
132
150
  sessionCwd: string;
133
- }, provenanceFilter?: ReferenceProvenanceFilter | null): Promise<AgentMentionBrowseFetchResult>;
151
+ }, provenanceFilter?: ReferenceProvenanceFilter | null, abortSignal?: AbortSignal): Promise<AgentMentionBrowseFetchResult>;
134
152
  protected applyBrowseFetchResult(result: AgentMentionBrowseFetchResult): void;
135
153
  protected logBrowseCacheState(input: {
136
154
  cacheKey: string;
@@ -153,7 +171,19 @@ declare class AgentMentionSearchControllerBase {
153
171
  limit?: number;
154
172
  sessionCwd?: string;
155
173
  provenanceFilter: ReferenceProvenanceFilter | null;
174
+ abortSignal?: AbortSignal;
156
175
  }): Promise<AgentContextMentionItem[]>;
176
+ protected queryProviderMentionGroupsById(input: {
177
+ diagnostics: AgentMentionProviderQueryDiagnostic[];
178
+ providerId: string;
179
+ workspaceId: string;
180
+ currentUserId: string;
181
+ query: string;
182
+ limit?: number;
183
+ sessionCwd?: string;
184
+ provenanceFilter: ReferenceProvenanceFilter | null;
185
+ abortSignal?: AbortSignal;
186
+ }): Promise<AgentMentionIssueTopicGroup[] | null>;
157
187
  protected logSearchDiagnostic(input: {
158
188
  error?: unknown;
159
189
  filter: AgentMentionFilterId;
@@ -191,7 +221,7 @@ declare class AgentMentionSearchControllerBase {
191
221
  currentUserId: string;
192
222
  filter: AgentMentionFilterId;
193
223
  sessionCwd: string;
194
- }, cacheKey: string, reason: AgentMentionBrowseLoadReason, provenanceFilter?: ReferenceProvenanceFilter | null): Promise<AgentMentionBrowseFetchResult>;
224
+ }, cacheKey: string, reason: AgentMentionBrowseLoadReason, provenanceFilter?: ReferenceProvenanceFilter | null, abortSignal?: AbortSignal): Promise<AgentMentionBrowseFetchResult>;
195
225
  protected fetchFilterResult(input: {
196
226
  workspaceId: string;
197
227
  currentUserId: string;
@@ -199,10 +229,13 @@ declare class AgentMentionSearchControllerBase {
199
229
  filter: AgentMentionFilterId;
200
230
  sessionCwd: string;
201
231
  includeAgentGeneratedFiles: boolean;
202
- }, provenanceFilter?: ReferenceProvenanceFilter | null): Promise<AgentMentionBrowseFetchResult>;
232
+ }, provenanceFilter?: ReferenceProvenanceFilter | null, abortSignal?: AbortSignal): Promise<AgentMentionBrowseFetchResult>;
233
+ protected beginActiveRequest(): AbortSignal;
234
+ protected abortActiveRequest(): void;
203
235
  }
204
236
 
205
237
  declare class AgentMentionSearchController extends AgentMentionSearchControllerBase {
238
+ private readonly issueLoadMoreRequests;
206
239
  setProvenanceFilter(filter: ReferenceProvenanceFilter | null): void;
207
240
  subscribe(listener: AgentMentionSearchListener): () => void;
208
241
  updateQuery(input: {
@@ -226,6 +259,9 @@ declare class AgentMentionSearchController extends AgentMentionSearchControllerB
226
259
  expandGroup(groupId: AgentMentionGroupId): void;
227
260
  close(): void;
228
261
  dispose(): void;
262
+ private loadMoreIssueTopic;
263
+ private emitIssueTopicGroupsState;
264
+ private cancelIssueLoadMoreRequests;
229
265
  }
230
266
  declare function preloadAgentMentionBrowse(input: {
231
267
  workspaceId: string;
@@ -3,20 +3,22 @@ import {
3
3
  MAX_BROWSE_CACHE_ENTRIES,
4
4
  preloadAgentMentionBrowse,
5
5
  resetAgentMentionSearchBrowseCacheForTests
6
- } from "./chunk-WXMBD2O7.js";
6
+ } from "./chunk-JG7HGKZL.js";
7
7
  import "./chunk-4YCCATI4.js";
8
- import "./chunk-PCXBTG5X.js";
8
+ import "./chunk-XJ34OIEQ.js";
9
+ import "./chunk-J2HG7UCP.js";
9
10
  import "./chunk-LUGELG5V.js";
10
11
  import "./chunk-JM24HADP.js";
11
12
  import "./chunk-YMXYBG7U.js";
12
- import "./chunk-6PMLIVTI.js";
13
+ import "./chunk-LDZ6C3YV.js";
13
14
  import "./chunk-F5UR6EJG.js";
15
+ import "./chunk-SN6UYX54.js";
14
16
  import "./chunk-PJP5BUU6.js";
15
17
  import "./chunk-H6IQ63DQ.js";
16
18
  import "./chunk-MIJXEELH.js";
17
- import "./chunk-IBFGOAY3.js";
18
- import "./chunk-RGG5UGJD.js";
19
- import "./chunk-5X7YDOC6.js";
19
+ import "./chunk-OWW7CU4U.js";
20
+ import "./chunk-TKBEVCHG.js";
21
+ import "./chunk-D2JUDUYY.js";
20
22
  import "./chunk-KJQERFKX.js";
21
23
  import "./chunk-UGVI47X6.js";
22
24
  export {
@@ -1,6 +1,6 @@
1
1
  import 'react';
2
2
  import '@tutti-os/agent-activity-core';
3
3
  import '@tutti-os/workbench-surface';
4
- export { A as AGENT_GUI_WORKBENCH_CONVERSATION_RAIL_TOGGLE_EVENT, a as AGENT_GUI_WORKBENCH_NEW_CONVERSATION_EVENT, b as AGENT_GUI_WORKBENCH_OPEN_EXTERNAL_IMPORT_EVENT, c as AgentGuiWorkbenchContributionCopy, d as AgentGuiWorkbenchContributionCopyOverrides, e as AgentGuiWorkbenchConversationIdentity, f as AgentGuiWorkbenchConversationRailToggleDetail, g as AgentGuiWorkbenchNewConversationDetail, h as AgentGuiWorkbenchProviderAvailability, i as AgentGuiWorkbenchRenderBodyHelpers, B as BuildAgentGuiDockEntriesInput, C as CreateAgentGuiWorkbenchContributionInput, j as agentGuiWorkbenchCompactVisibleAreaRatio, l as agentGuiWorkbenchDefaultCopy, m as agentGuiWorkbenchDefaultNodeFrame, n as agentGuiWorkbenchDefaultUsableHeightRatio, o as agentGuiWorkbenchDefaultUsableWidthRatio, p as agentGuiWorkbenchNewWindowCascadeOffset, q as agentGuiWorkbenchProviderRailWidthPx, r as buildAgentGuiDockEntries, s as createAgentGuiWorkbenchContribution, t as resolveAgentGuiUnifiedDockLaunchPayload, u as resolveAgentGuiWorkbenchContributionCopy, w as resolveAgentGuiWorkbenchDefaultLaunchFrame } from '../contribution-CTVBPN0R.js';
4
+ export { A as AGENT_GUI_WORKBENCH_CONVERSATION_RAIL_TOGGLE_EVENT, a as AGENT_GUI_WORKBENCH_NEW_CONVERSATION_EVENT, b as AGENT_GUI_WORKBENCH_OPEN_EXTERNAL_IMPORT_EVENT, c as AgentGuiWorkbenchContributionCopy, d as AgentGuiWorkbenchContributionCopyOverrides, e as AgentGuiWorkbenchConversationIdentity, f as AgentGuiWorkbenchConversationRailToggleDetail, g as AgentGuiWorkbenchNewConversationDetail, h as AgentGuiWorkbenchProviderAvailability, i as AgentGuiWorkbenchRenderBodyHelpers, B as BuildAgentGuiDockEntriesInput, C as CreateAgentGuiWorkbenchContributionInput, j as agentGuiWorkbenchCompactVisibleAreaRatio, l as agentGuiWorkbenchDefaultCopy, m as agentGuiWorkbenchDefaultNodeFrame, n as agentGuiWorkbenchDefaultUsableHeightRatio, o as agentGuiWorkbenchDefaultUsableWidthRatio, p as agentGuiWorkbenchNewWindowCascadeOffset, q as agentGuiWorkbenchProviderRailWidthPx, r as buildAgentGuiDockEntries, s as createAgentGuiWorkbenchContribution, t as resolveAgentGuiUnifiedDockLaunchPayload, u as resolveAgentGuiWorkbenchContributionCopy, w as resolveAgentGuiWorkbenchDefaultLaunchFrame } from '../contribution-C6K5YfJ7.js';
5
5
  import './types.js';
6
6
  import '../types-CnT8rNUI.js';
@@ -14,8 +14,8 @@ import {
14
14
  resolveAgentGuiUnifiedDockLaunchPayload,
15
15
  resolveAgentGuiWorkbenchContributionCopy,
16
16
  resolveAgentGuiWorkbenchDefaultLaunchFrame
17
- } from "../chunk-ZRJS4MOQ.js";
18
- import "../chunk-5Z4ZXXX4.js";
17
+ } from "../chunk-ZSJBCZUH.js";
18
+ import "../chunk-V5ROOS2O.js";
19
19
  import "../chunk-4YVKAPKW.js";
20
20
  import "../chunk-QY22OBJS.js";
21
21
  import "../chunk-L3GMMGRS.js";
@@ -25,7 +25,7 @@ import "../chunk-4YG7YK7S.js";
25
25
  import "../chunk-2RQM7PJN.js";
26
26
  import "../chunk-H6IQ63DQ.js";
27
27
  import "../chunk-MIJXEELH.js";
28
- import "../chunk-RGG5UGJD.js";
28
+ import "../chunk-TKBEVCHG.js";
29
29
  import "../chunk-KJQERFKX.js";
30
30
  import "../chunk-UGVI47X6.js";
31
31
  export {
@@ -1,4 +1,4 @@
1
- export { A as AGENT_GUI_WORKBENCH_CONVERSATION_RAIL_TOGGLE_EVENT, a as AGENT_GUI_WORKBENCH_NEW_CONVERSATION_EVENT, c as AgentGuiWorkbenchContributionCopy, d as AgentGuiWorkbenchContributionCopyOverrides, e as AgentGuiWorkbenchConversationIdentity, f as AgentGuiWorkbenchConversationRailToggleDetail, g as AgentGuiWorkbenchNewConversationDetail, h as AgentGuiWorkbenchProviderAvailability, i as AgentGuiWorkbenchRenderBodyHelpers, B as BuildAgentGuiDockEntriesInput, C as CreateAgentGuiWorkbenchContributionInput, k as agentGuiWorkbenchConversationIdentitiesEqual, l as agentGuiWorkbenchDefaultCopy, m as agentGuiWorkbenchDefaultNodeFrame, r as buildAgentGuiDockEntries, s as createAgentGuiWorkbenchContribution, t as resolveAgentGuiUnifiedDockLaunchPayload, u as resolveAgentGuiWorkbenchContributionCopy, v as resolveAgentGuiWorkbenchConversationIdentity } from '../contribution-CTVBPN0R.js';
1
+ export { A as AGENT_GUI_WORKBENCH_CONVERSATION_RAIL_TOGGLE_EVENT, a as AGENT_GUI_WORKBENCH_NEW_CONVERSATION_EVENT, c as AgentGuiWorkbenchContributionCopy, d as AgentGuiWorkbenchContributionCopyOverrides, e as AgentGuiWorkbenchConversationIdentity, f as AgentGuiWorkbenchConversationRailToggleDetail, g as AgentGuiWorkbenchNewConversationDetail, h as AgentGuiWorkbenchProviderAvailability, i as AgentGuiWorkbenchRenderBodyHelpers, B as BuildAgentGuiDockEntriesInput, C as CreateAgentGuiWorkbenchContributionInput, k as agentGuiWorkbenchConversationIdentitiesEqual, l as agentGuiWorkbenchDefaultCopy, m as agentGuiWorkbenchDefaultNodeFrame, r as buildAgentGuiDockEntries, s as createAgentGuiWorkbenchContribution, t as resolveAgentGuiUnifiedDockLaunchPayload, u as resolveAgentGuiWorkbenchContributionCopy, v as resolveAgentGuiWorkbenchConversationIdentity } from '../contribution-C6K5YfJ7.js';
2
2
  export { agentGuiWorkbenchComingSoonProviders, agentGuiWorkbenchDefaultDockProviders, agentGuiWorkbenchDockSuppressedProviders, agentGuiWorkbenchProviderLabels, agentGuiWorkbenchProviders, isAgentGuiWorkbenchComingSoonProvider, isAgentGuiWorkbenchDefaultDockProvider, isAgentGuiWorkbenchDockSuppressedProvider, isAgentGuiWorkbenchProvider, normalizeAgentGuiWorkbenchProvider, resolveAgentGuiWorkbenchProviderLabel } from './providerCatalog.js';
3
3
  export { AgentGuiWorkbenchLaunchDescriptor, agentGuiWorkbenchDockEntryId, agentGuiWorkbenchDockIdentityFromIdentifier, agentGuiWorkbenchInstanceId, agentGuiWorkbenchProviderFromIdentifier, agentGuiWorkbenchProviderFromLaunchRequest, agentGuiWorkbenchTypeId, agentGuiWorkbenchUnifiedDockEntryId, createAgentGuiWorkbenchDraftLaunchRequest, createAgentGuiWorkbenchInstanceId, createAgentGuiWorkbenchLaunchDescriptor, createAgentGuiWorkbenchSessionLaunchRequest, resolveAgentGuiWorkbenchLaunchDockEntryId } from './launch.js';
4
4
  export { agentGuiWorkbenchProviderFromInstanceId, areAgentGuiWorkbenchNodeStatesEqual, areAgentGuiWorkbenchStatesEqual, createAgentGuiWorkbenchNodeStateSource, createDefaultAgentGuiWorkbenchNodeState, normalizeAgentGuiWorkbenchNodeState, normalizeAgentGuiWorkbenchState, projectAgentGuiWorkbenchState } from './state.js';
@@ -36,6 +36,7 @@ interface AgentGuiWorkbenchHeaderProps extends HTMLAttributes<HTMLElement> {
36
36
  primaryAccessory?: ReactNode;
37
37
  secondaryAccessory?: ReactNode;
38
38
  conversationTitle?: string | null;
39
+ conversationTitleDisplayPrompt?: string | null;
39
40
  nodeId: string;
40
41
  onCreateConversation?: () => void;
41
42
  onOpenDetachedWindow?: () => void;
@@ -46,6 +47,6 @@ interface AgentGuiWorkbenchHeaderProps extends HTMLAttributes<HTMLElement> {
46
47
  title?: string;
47
48
  windowActions?: Pick<WorkbenchHostNodeHeaderWindowActions, "close" | "minimize" | "toggleDisplayMode">;
48
49
  }
49
- declare function AgentGuiWorkbenchHeader({ className, copy, agentTitle, defaultActions: _defaultActions, displayMode, isConversationRailAutoCollapsed, isConversationRailCollapsed, conversationRailWidthPx, conversationIconUrl, conversationIconFallbackUrl, hasConversation, providerRailWidthPx, primaryAccessory, secondaryAccessory, conversationTitle, nodeId, onCreateConversation, onOpenDetachedWindow, onToggleConversationRail, showAppTitle, showConversationRailToggle, showWindowControls, title: _title, windowActions, ...headerProps }: AgentGuiWorkbenchHeaderProps): ReactNode;
50
+ declare function AgentGuiWorkbenchHeader({ className, copy, agentTitle, defaultActions: _defaultActions, displayMode, isConversationRailAutoCollapsed, isConversationRailCollapsed, conversationRailWidthPx, conversationIconUrl, conversationIconFallbackUrl, hasConversation, providerRailWidthPx, primaryAccessory, secondaryAccessory, conversationTitle, conversationTitleDisplayPrompt, nodeId, onCreateConversation, onOpenDetachedWindow, onToggleConversationRail, showAppTitle, showConversationRailToggle, showWindowControls, title: _title, windowActions, ...headerProps }: AgentGuiWorkbenchHeaderProps): ReactNode;
50
51
 
51
52
  export { AgentGuiWorkbenchHeader, type AgentGuiWorkbenchHeaderCopy, type AgentGuiWorkbenchHeaderProps };
@@ -10,11 +10,11 @@ import {
10
10
  resolveAgentGuiUnifiedDockLaunchPayload,
11
11
  resolveAgentGuiWorkbenchContributionCopy,
12
12
  resolveAgentGuiWorkbenchConversationIdentity
13
- } from "../chunk-ZRJS4MOQ.js";
13
+ } from "../chunk-ZSJBCZUH.js";
14
14
  import {
15
15
  resolveAgentGuiWorkbenchHeaderTitle,
16
16
  resolveAgentGuiWorkbenchSessionTitle
17
- } from "../chunk-5Z4ZXXX4.js";
17
+ } from "../chunk-V5ROOS2O.js";
18
18
  import {
19
19
  agentGuiWorkbenchProviderFromInstanceId,
20
20
  areAgentGuiWorkbenchNodeStatesEqual,
@@ -61,7 +61,7 @@ import "../chunk-4YG7YK7S.js";
61
61
  import "../chunk-2RQM7PJN.js";
62
62
  import "../chunk-H6IQ63DQ.js";
63
63
  import "../chunk-MIJXEELH.js";
64
- import "../chunk-RGG5UGJD.js";
64
+ import "../chunk-TKBEVCHG.js";
65
65
  import "../chunk-KJQERFKX.js";
66
66
  import "../chunk-UGVI47X6.js";
67
67
  export {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveAgentGuiWorkbenchHeaderTitle,
3
3
  resolveAgentGuiWorkbenchSessionTitle
4
- } from "../chunk-5Z4ZXXX4.js";
4
+ } from "../chunk-V5ROOS2O.js";
5
5
  import "../chunk-MIJXEELH.js";
6
- import "../chunk-RGG5UGJD.js";
6
+ import "../chunk-TKBEVCHG.js";
7
7
  import "../chunk-KJQERFKX.js";
8
8
  export {
9
9
  resolveAgentGuiWorkbenchHeaderTitle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tutti-os/agent-gui",
3
- "version": "0.0.103",
3
+ "version": "0.0.105",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -124,17 +124,17 @@
124
124
  "@tiptap/react": "^3.11.1",
125
125
  "@tiptap/starter-kit": "^3.11.1",
126
126
  "@tiptap/suggestion": "^3.11.1",
127
- "@tutti-os/agent-activity-core": "0.0.103",
128
- "@tutti-os/ui-i18n-runtime": "0.0.103",
129
- "@tutti-os/ui-react-hooks": "0.0.103",
130
- "@tutti-os/ui-rich-text": "0.0.103",
131
- "@tutti-os/ui-system": "0.0.103",
132
- "@tutti-os/workbench-surface": "0.0.103",
133
- "@tutti-os/workspace-external-core": "0.0.103",
134
- "@tutti-os/workspace-file-manager": "0.0.103",
135
- "@tutti-os/workspace-file-reference": "0.0.103",
136
- "@tutti-os/workspace-issue-manager": "0.0.103",
137
- "@tutti-os/workspace-user-project": "0.0.103",
127
+ "@tutti-os/agent-activity-core": "0.0.105",
128
+ "@tutti-os/ui-i18n-runtime": "0.0.105",
129
+ "@tutti-os/ui-react-hooks": "0.0.105",
130
+ "@tutti-os/ui-rich-text": "0.0.105",
131
+ "@tutti-os/ui-system": "0.0.105",
132
+ "@tutti-os/workbench-surface": "0.0.105",
133
+ "@tutti-os/workspace-external-core": "0.0.105",
134
+ "@tutti-os/workspace-file-manager": "0.0.105",
135
+ "@tutti-os/workspace-file-reference": "0.0.105",
136
+ "@tutti-os/workspace-issue-manager": "0.0.105",
137
+ "@tutti-os/workspace-user-project": "0.0.105",
138
138
  "clsx": "^2.1.1",
139
139
  "framer-motion": "^12.40.0",
140
140
  "lodash": "^4.17.21",
@@ -162,8 +162,8 @@
162
162
  "typescript": "^5.8.3",
163
163
  "vite": "^6.4.2",
164
164
  "vitest": "^4.0.13",
165
- "@tutti-os/config-tsconfig": "0.0.0",
166
- "@tutti-os/client-tuttid-ts": "0.0.0"
165
+ "@tutti-os/client-tuttid-ts": "0.0.0",
166
+ "@tutti-os/config-tsconfig": "0.0.0"
167
167
  },
168
168
  "peerDependencies": {
169
169
  "react": "^19.1.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../shared/agentCustomMentionKinds.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\n// 自定义 mention kind 注册表:让宿主(如 tsh)从外部注册 mention://<kind>/... 链接的\n// 解析与 composer 内 chip 渲染,包内不内置任何具体业务 kind。\n//\n// 管线接点:\n// - 解析:agentFileMentionExtension.parseMentionItemFromHref 命中注册 kind 时产出\n// AgentMentionCustomItem(展示字段由 present() 提取;href 是完整信息源,round-trip 无损)\n// - 渲染:AgentMentionNodeView 对 kind===\"custom\" 调 renderChip(),缺省用包内通用双行卡\n// - 点击:clickable 的 kind 经 resolveWorkspaceMentionLinkAction 上抛\n// open-custom-mention 链接动作(携带原始 href,宿主自行二次解析)\n//\n// 注册时机:宿主渲染进程 bootstrap(早于首个 composer 挂载);模块级单例,重复注册以\n// 后者为准(HMR 友好)。\n\nexport interface AgentCustomMentionIdentity {\n entityId: string;\n label: string;\n scope?: Readonly<Record<string, string>>;\n}\n\nexport interface AgentCustomMentionPresentation {\n /** chip 第一行(缺省用链接 label)。 */\n name: string;\n /** chip 第二行(可选,通用双行卡的次要文案)。 */\n summary?: string;\n /** 所属 workspace(可选;custom kind 的 scope 键由注册方约定)。 */\n workspaceId?: string;\n}\n\nexport interface AgentCustomMentionChipContext {\n href: string;\n name: string;\n summary?: string;\n isEditable: boolean;\n /** 可编辑态的移除按钮,由 NodeView 注入;自定义渲染需自行摆放。 */\n removeAction?: ReactNode;\n}\n\nexport interface AgentCustomMentionKindDefinition {\n /** mention://<kind>/... 的 providerId(URL hostname,小写)。 */\n kind: string;\n /**\n * 从 canonical mention 链接提取展示字段;返回 null 表示链接无效,\n * 退化为普通链接/字面文本。\n */\n present(\n mention: AgentCustomMentionIdentity,\n href: string\n ): AgentCustomMentionPresentation | null;\n /** 自定义 chip 渲染;缺省用包内通用双行卡(name + summary)。 */\n renderChip?(context: AgentCustomMentionChipContext): ReactNode;\n /** 点击是否上抛 open-custom-mention 链接动作;缺省 false(chip 只展示)。 */\n clickable?: boolean;\n}\n\nconst registry = new Map<string, AgentCustomMentionKindDefinition>();\n\n// 包内管线已内置处理的 providerId(agentFileMentionExtension /\n// resolveWorkspaceMentionLinkAction),以及宿主侧沿用的 legacy 短名与内部 kind。\n// 注册表查找在部分链路先于内置分支执行,若放行同名注册会静默劫持内置 mention\n// 的解析——注册发生在宿主 bootstrap,直接抛错 fail-fast。\nconst RESERVED_AGENT_MENTION_PROVIDER_IDS = new Set([\n \"agent-session\",\n \"agent-target\",\n \"custom\",\n \"file\",\n \"issue\",\n \"session\",\n \"task\",\n \"workspace-app\",\n \"workspace-app-factory\",\n \"workspace-issue\",\n \"workspace-reference\"\n]);\n\nexport function registerAgentCustomMentionKind(\n definition: AgentCustomMentionKindDefinition\n): void {\n const kind = definition.kind.trim().toLowerCase();\n if (!kind) {\n throw new Error(\n \"[agent-gui] custom mention kind must be a non-empty provider id\"\n );\n }\n if (RESERVED_AGENT_MENTION_PROVIDER_IDS.has(kind)) {\n throw new Error(\n `[agent-gui] custom mention kind \"${kind}\" collides with a built-in provider id`\n );\n }\n registry.set(kind, definition);\n}\n\nexport function getAgentCustomMentionKind(\n kind: string\n): AgentCustomMentionKindDefinition | undefined {\n return registry.get(kind.trim().toLowerCase());\n}\n\nexport function resetAgentCustomMentionKindsForTests(): void {\n registry.clear();\n}\n"],"mappings":";AAwDA,IAAM,WAAW,oBAAI,IAA8C;AAMnE,IAAM,sCAAsC,oBAAI,IAAI;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,SAAS,+BACd,YACM;AACN,QAAM,OAAO,WAAW,KAAK,KAAK,EAAE,YAAY;AAChD,MAAI,CAAC,MAAM;AACT,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,MAAI,oCAAoC,IAAI,IAAI,GAAG;AACjD,UAAM,IAAI;AAAA,MACR,oCAAoC,IAAI;AAAA,IAC1C;AAAA,EACF;AACA,WAAS,IAAI,MAAM,UAAU;AAC/B;AAEO,SAAS,0BACd,MAC8C;AAC9C,SAAO,SAAS,IAAI,KAAK,KAAK,EAAE,YAAY,CAAC;AAC/C;AAEO,SAAS,uCAA6C;AAC3D,WAAS,MAAM;AACjB;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../contexts/settings/domain/agentSettings.providers.ts","../contexts/settings/domain/agentSettings.providerMeta.ts","../shared/agentConversationTitleProjection.ts","../workbench/sessionTitle.ts"],"sourcesContent":["export const AGENT_PROVIDERS = [\n \"claude-code\",\n \"codex\",\n \"cursor\",\n \"tutti-agent\",\n \"nexight\",\n \"opencode\",\n \"openclaw\",\n \"hermes\"\n] as const;\nexport const EXPERIMENTAL_AGENT_PROVIDERS = [] as const;\n\nexport type AgentProvider = (typeof AGENT_PROVIDERS)[number];\n\nexport function isValidProvider(value: unknown): value is AgentProvider {\n return (\n typeof value === \"string\" &&\n AGENT_PROVIDERS.includes(value as AgentProvider)\n );\n}\n\nexport function normalizeAgentProviderOrder(value: unknown): AgentProvider[] {\n if (!Array.isArray(value)) {\n return [...AGENT_PROVIDERS];\n }\n\n const normalized: AgentProvider[] = [];\n const seen = new Set<AgentProvider>();\n\n for (const item of value) {\n if (!isValidProvider(item)) {\n continue;\n }\n\n if (seen.has(item)) {\n continue;\n }\n\n seen.add(item);\n normalized.push(item);\n }\n\n for (const provider of AGENT_PROVIDERS) {\n if (seen.has(provider)) {\n continue;\n }\n\n seen.add(provider);\n normalized.push(provider);\n }\n\n return normalized;\n}\n","import { resolveAgentGUIProviderCatalogIdentity } from \"../../../providerIdentityCatalog.ts\";\nimport {\n AGENT_PROVIDERS,\n type AgentProvider\n} from \"./agentSettings.providers.ts\";\n\nexport const AGENT_PROVIDER_LABEL = Object.fromEntries(\n AGENT_PROVIDERS.map((provider) => {\n const identity = resolveAgentGUIProviderCatalogIdentity(provider);\n if (!identity) {\n throw new Error(`Missing provider identity for ${provider}`);\n }\n return [provider, identity.displayName];\n })\n) as Record<AgentProvider, string>;\n\nexport interface AgentProviderCapabilities {\n runtimeObservation: \"jsonl\" | \"provider-api\" | \"none\";\n experimental: boolean;\n}\n\nexport const AGENT_PROVIDER_CAPABILITIES: Record<\n AgentProvider,\n AgentProviderCapabilities\n> = {\n \"claude-code\": {\n runtimeObservation: \"jsonl\",\n experimental: false\n },\n codex: {\n runtimeObservation: \"jsonl\",\n experimental: false\n },\n \"tutti-agent\": {\n runtimeObservation: \"provider-api\",\n experimental: false\n },\n cursor: {\n runtimeObservation: \"jsonl\",\n experimental: false\n },\n nexight: {\n runtimeObservation: \"jsonl\",\n experimental: false\n },\n opencode: {\n runtimeObservation: \"provider-api\",\n experimental: false\n },\n openclaw: {\n runtimeObservation: \"jsonl\",\n experimental: false\n },\n hermes: {\n runtimeObservation: \"jsonl\",\n experimental: false\n }\n};\n","import { AGENT_PROVIDER_LABEL } from \"../contexts/settings/domain/agentSettings.providerMeta.ts\";\nimport { translateInUiLanguage } from \"../i18n/runtime.ts\";\nimport { resolveAgentGUIProviderCatalogIdentity } from \"../providerIdentityCatalog.ts\";\nimport type { AgentGUIProvider } from \"../types.ts\";\nimport type { WorkspaceAgentActivityTimelineItem } from \"./workspaceAgentTimelineTypes.ts\";\nimport { normalizeAgentTitleText } from \"./utils/agentTitleText.ts\";\n\nexport type AgentGUIResolvedProvider = AgentGUIProvider | \"unknown\";\nexport type AgentGUIConversationTitleFallback = \"untitled-conversation\" | null;\n\nconst AGENT_GUI_UNRESOLVED_PROVIDER: AgentGUIResolvedProvider = \"unknown\";\nconst AGENT_GUI_MAX_OPTIMISTIC_TITLE_CODE_POINTS = 120;\nconst AGENT_GUI_TRUNCATED_TITLE_SUFFIX = \"...\";\n\nexport function isAgentGUIProviderUnresolved(\n value: AgentGUIResolvedProvider\n): value is \"unknown\" {\n return value === AGENT_GUI_UNRESOLVED_PROVIDER;\n}\n\nexport interface AgentGUIConversationTitleMessage {\n id?: number | string | null;\n messageId?: string | null;\n version?: number | null;\n role?: string | null;\n kind?: string | null;\n payload?: {\n content?: unknown;\n displayPrompt?: unknown;\n text?: unknown;\n } | null;\n occurredAtUnixMs?: number | null;\n completedAtUnixMs?: number | null;\n startedAtUnixMs?: number | null;\n}\n\nexport function normalizeAgentGUIProviderIdentity(\n provider: string | null | undefined\n): AgentGUIResolvedProvider {\n const normalized = provider?.trim().toLowerCase() ?? \"\";\n const catalogIdentity = resolveAgentGUIProviderCatalogIdentity(normalized);\n if (catalogIdentity) {\n return catalogIdentity.providerId as AgentGUIProvider;\n }\n if (!/^[a-z][a-z0-9._:-]{0,127}$/.test(normalized)) {\n return \"unknown\";\n }\n return normalized as AgentGUIProvider;\n}\n\nfunction providerLabel(provider: AgentGUIProvider): string {\n return (AGENT_PROVIDER_LABEL as Record<string, string>)[provider] ?? provider;\n}\n\nexport function resolveAgentGUIProviderIdentity(input: {\n sessionProvider?: string | null;\n workspaceSessionProvider?: string | null;\n conversationProvider?: string | null;\n timelineItems?: readonly WorkspaceAgentActivityTimelineItem[];\n}): AgentGUIResolvedProvider {\n const candidates = [\n input.sessionProvider,\n input.workspaceSessionProvider,\n input.conversationProvider,\n timelineProviderHint(input.timelineItems ?? [])\n ];\n for (const candidate of candidates) {\n const normalized = normalizeAgentGUIProviderIdentity(candidate);\n if (normalized !== \"unknown\") {\n return normalized;\n }\n }\n return \"unknown\";\n}\n\nexport function resolveAgentGUIConversationTitle(\n title: string | null | undefined\n): {\n title: string;\n titleFallback: AgentGUIConversationTitleFallback;\n} {\n const normalizedTitle = stripAgentGUITitleTrailingPeriod(title?.trim() ?? \"\");\n if (normalizedTitle) {\n return {\n title: normalizedTitle,\n titleFallback: null\n };\n }\n return {\n title: \"\",\n titleFallback: \"untitled-conversation\"\n };\n}\n\nexport function deriveAgentGUIOptimisticConversationTitle(\n visiblePrompt: string | null | undefined\n): string {\n const normalizedTitle = normalizeAgentTitleText(visiblePrompt);\n const codePoints = Array.from(normalizedTitle);\n if (codePoints.length <= AGENT_GUI_MAX_OPTIMISTIC_TITLE_CODE_POINTS) {\n return normalizedTitle;\n }\n return `${codePoints\n .slice(\n 0,\n AGENT_GUI_MAX_OPTIMISTIC_TITLE_CODE_POINTS -\n AGENT_GUI_TRUNCATED_TITLE_SUFFIX.length\n )\n .join(\"\")\n .trimEnd()}${AGENT_GUI_TRUNCATED_TITLE_SUFFIX}`;\n}\n\nexport function resolveAgentGUIConversationDisplayTitle(\n input: {\n title: string;\n titleFallback?: AgentGUIConversationTitleFallback;\n },\n untitledConversationLabel: string\n): string {\n if (input.title) {\n return stripAgentGUITitleTrailingPeriod(input.title.trim());\n }\n if (input.titleFallback === \"untitled-conversation\") {\n return stripAgentGUITitleTrailingPeriod(untitledConversationLabel);\n }\n return \"\";\n}\n\nexport function resolveAgentGUIDockConversationTitle(input: {\n provider: AgentGUIResolvedProvider;\n title: string;\n titleFallback?: AgentGUIConversationTitleFallback;\n}): string | null {\n return resolveAgentGUIExplicitConversationTitle(input);\n}\n\nexport function resolveAgentGUIExplicitConversationTitle(input: {\n provider: AgentGUIResolvedProvider;\n title: string;\n titleFallback?: AgentGUIConversationTitleFallback;\n}): string | null {\n if (input.titleFallback) {\n return null;\n }\n\n const title = stripAgentGUITitleTrailingPeriod(input.title.trim());\n if (!title) {\n return null;\n }\n if (isAgentGUIUntitledTaskTitle(title)) {\n return null;\n }\n\n if (input.provider !== \"unknown\" && title === providerLabel(input.provider)) {\n return null;\n }\n\n return title;\n}\n\nexport function resolveAgentGUIExplicitConversationTitleFromMessages(input: {\n messages: readonly AgentGUIConversationTitleMessage[];\n provider: AgentGUIResolvedProvider;\n title: string | null | undefined;\n}): string | null {\n const explicitTitle = resolveAgentGUIExplicitConversationTitle({\n provider: input.provider,\n title: input.title?.trim() ?? \"\"\n });\n if (explicitTitle) {\n return explicitTitle;\n }\n return resolveAgentGUIExplicitConversationTitle({\n provider: input.provider,\n title: firstAgentGUIUserMessageTitle(input.messages)\n });\n}\n\nexport function resolveAgentGUIProviderDisplayLabel(\n provider: string | null | undefined,\n fallbackAgentLabel: string\n): string {\n const resolvedProvider = normalizeAgentGUIProviderIdentity(provider);\n if (resolvedProvider === \"unknown\") {\n return fallbackAgentLabel;\n }\n return providerLabel(resolvedProvider);\n}\n\nexport function firstAgentGUIUserMessageTitle(\n messages: readonly AgentGUIConversationTitleMessage[]\n): string {\n const userMessage = [...messages]\n .filter(\n (message) =>\n messageRole(message) === \"user\" && messageText(message).length > 0\n )\n .sort(compareMessagesAscending)[0];\n return userMessage ? messageText(userMessage) : \"\";\n}\n\nfunction messageRole(\n message: AgentGUIConversationTitleMessage\n): \"user\" | \"agent\" | null {\n const role = message.role?.trim().toLowerCase();\n if (role === \"user\") {\n return \"user\";\n }\n if (role === \"assistant\" || role === \"agent\") {\n return \"agent\";\n }\n const kind = message.kind?.trim().toLowerCase() ?? \"\";\n if (kind === \"message.user\") {\n return \"user\";\n }\n if (kind === \"message.assistant\" || kind === \"message.agent\") {\n return \"agent\";\n }\n return null;\n}\n\nfunction messageText(message: AgentGUIConversationTitleMessage): string {\n const payload = message.payload;\n const displayPrompt =\n typeof payload?.displayPrompt === \"string\" ? payload.displayPrompt : \"\";\n const text = typeof payload?.text === \"string\" ? payload.text : \"\";\n const content = typeof payload?.content === \"string\" ? payload.content : \"\";\n return normalizeAgentTitleText(displayPrompt || text || content);\n}\n\nfunction compareMessagesAscending(\n left: AgentGUIConversationTitleMessage,\n right: AgentGUIConversationTitleMessage\n): number {\n const leftTime =\n left.occurredAtUnixMs ??\n left.completedAtUnixMs ??\n left.startedAtUnixMs ??\n 0;\n const rightTime =\n right.occurredAtUnixMs ??\n right.completedAtUnixMs ??\n right.startedAtUnixMs ??\n 0;\n const timeDiff = leftTime - rightTime;\n if (timeDiff !== 0) {\n return timeDiff;\n }\n const sequenceDiff =\n messageSequence(left) - messageSequence(right) ||\n (left.messageId ?? \"\").localeCompare(right.messageId ?? \"\");\n return sequenceDiff;\n}\n\nfunction messageSequence(message: AgentGUIConversationTitleMessage): number {\n const numericId =\n typeof message.id === \"number\" && Number.isFinite(message.id)\n ? message.id\n : 0;\n return message.version ?? numericId;\n}\n\nfunction stripAgentGUITitleTrailingPeriod(title: string): string {\n return title\n .trimEnd()\n .replace(/[.。]+$/u, \"\")\n .trimEnd();\n}\n\nfunction isAgentGUIUntitledTaskTitle(title: string): boolean {\n return localizedAgentGUIUntitledTaskLabels().has(compactTitleText(title));\n}\n\nfunction localizedAgentGUIUntitledTaskLabels(): Set<string> {\n return new Set(\n ([\"en\", \"zh-CN\"] as const)\n .map((language) =>\n compactTitleText(\n translateInUiLanguage(\n language,\n \"agentHost.workspaceAgentsUntitledConversation\"\n )\n )\n )\n .filter(Boolean)\n );\n}\n\nfunction timelineProviderHint(\n timelineItems: readonly WorkspaceAgentActivityTimelineItem[]\n): string | null {\n for (const item of timelineItems) {\n if (isUserTimelineItem(item)) {\n continue;\n }\n const normalized = normalizeAgentGUIProviderIdentity(item.actorId);\n if (normalized !== \"unknown\") {\n return normalized;\n }\n }\n return null;\n}\n\nfunction isUserTimelineItem(item: WorkspaceAgentActivityTimelineItem): boolean {\n const role = item.role?.trim().toLowerCase();\n if (role === \"user\") {\n return true;\n }\n const actorType = item.actorType.trim().toLowerCase();\n if (actorType === \"user\") {\n return true;\n }\n return item.itemType.trim().toLowerCase() === \"message.user\";\n}\n\nfunction compactTitleText(value: string): string {\n return value.trim().replace(/\\s+/g, \" \");\n}\n","import type { AgentActivitySession } from \"@tutti-os/agent-activity-core\";\nimport { resolveAgentGUIProviderDisplayLabel } from \"../shared/agentConversationTitleProjection.ts\";\n\nexport interface ResolveAgentGuiWorkbenchHeaderTitleInput {\n agentName?: string | null;\n conversationTitle?: string | null;\n provider?: string | null;\n}\n\nexport interface ResolveAgentGuiWorkbenchSessionTitleInput {\n agentSessionId?: string | null;\n fallbackTitle?: string | null;\n optimisticTitle?: string | null;\n session?: Pick<AgentActivitySession, \"title\"> | null;\n}\n\nexport interface AgentGuiWorkbenchSessionTitleResult {\n agentSessionId: string | null;\n source: \"snapshot\" | \"optimistic\" | \"fallback\" | \"none\";\n title: string | null;\n}\n\nexport function resolveAgentGuiWorkbenchHeaderTitle({\n agentName,\n conversationTitle,\n provider\n}: ResolveAgentGuiWorkbenchHeaderTitleInput): string | null {\n return (\n stripTitle(agentName) ||\n stripTitle(resolveAgentGUIProviderDisplayLabel(provider, \"\")) ||\n stripTitle(conversationTitle) ||\n null\n );\n}\n\nexport function resolveAgentGuiWorkbenchSessionTitle({\n agentSessionId,\n fallbackTitle,\n optimisticTitle,\n session = null\n}: ResolveAgentGuiWorkbenchSessionTitleInput): AgentGuiWorkbenchSessionTitleResult {\n const normalizedAgentSessionId = agentSessionId?.trim() ?? \"\";\n if (!normalizedAgentSessionId) {\n return { agentSessionId: null, source: \"none\", title: null };\n }\n\n const snapshotTitle = stripTitle(session?.title);\n if (snapshotTitle) {\n return {\n agentSessionId: normalizedAgentSessionId,\n source: \"snapshot\",\n title: snapshotTitle\n };\n }\n\n const projectedOptimisticTitle = stripTitle(optimisticTitle);\n if (projectedOptimisticTitle) {\n return {\n agentSessionId: normalizedAgentSessionId,\n source: \"optimistic\",\n title: projectedOptimisticTitle\n };\n }\n\n if (session) {\n return {\n agentSessionId: normalizedAgentSessionId,\n source: \"none\",\n title: null\n };\n }\n\n const fallbackDisplayTitle = stripTitle(fallbackTitle);\n return fallbackDisplayTitle\n ? {\n agentSessionId: normalizedAgentSessionId,\n source: \"fallback\",\n title: fallbackDisplayTitle\n }\n : {\n agentSessionId: normalizedAgentSessionId,\n source: \"none\",\n title: null\n };\n}\n\nfunction stripTitle(value: string | null | undefined): string {\n return value?.trim() ?? \"\";\n}\n"],"mappings":";;;;;;;;;;;AAAO,IAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;;ACHO,IAAM,uBAAuB,OAAO;AAAA,EACzC,gBAAgB,IAAI,CAAC,aAAa;AAChC,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;AAEA,MAAI,SAAS;AACX,WAAO;AAAA,MACL,gBAAgB;AAAA,MAChB,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AAAA,EACF;AAEA,QAAM,uBAAuB,WAAW,aAAa;AACrD,SAAO,uBACH;AAAA,IACE,gBAAgB;AAAA,IAChB,QAAQ;AAAA,IACR,OAAO;AAAA,EACT,IACA;AAAA,IACE,gBAAgB;AAAA,IAChB,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AACN;AAEA,SAAS,WAAW,OAA0C;AAC5D,SAAO,OAAO,KAAK,KAAK;AAC1B;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../agentActivityRuntime.tsx","../agentActivityHost.tsx","../host/agentHostApi.ts","../shared/managedAgentIcons.ts","../shared/workspaceAgentProviderLabel.ts"],"sourcesContent":["import {\n createContext,\n useContext,\n useSyncExternalStore,\n type JSX,\n type PropsWithChildren\n} from \"react\";\nimport type {\n AgentActivityActivateSessionResult,\n AgentActivityGoalControlInput,\n AgentActivityGoalControlResult,\n AgentActivityCreateSessionInput,\n AgentActivityDeleteSessionInput,\n AgentActivityDeleteSessionResult,\n AgentActivityMessageOrder,\n AgentActivityMessagePage,\n AgentActivityRenameSessionInput,\n AgentActivitySendInput,\n AgentActivitySendInputResult,\n AgentActivitySession,\n AgentActivitySessionSettings,\n AgentActivitySnapshot,\n AgentActivitySnapshotListener,\n AgentActivitySubmitInteractiveInput,\n AgentActivitySubmitInteractiveResult,\n AgentSessionEngine\n} from \"@tutti-os/agent-activity-core\";\nimport type {\n AgentHostAgentSessionComposerSettings,\n AgentHostUnactivateAgentSessionResult\n} from \"./shared/contracts/dto\";\n\nexport interface AgentActivityRuntimeUpdateSessionSettingsResult {\n agentSessionId: string;\n settings: AgentHostAgentSessionComposerSettings;\n session: AgentActivitySession;\n}\n\nexport interface AgentActivityRuntimeListSessionMessagesInput {\n afterVersion?: number;\n beforeVersion?: number;\n cache?: boolean;\n agentSessionId: string;\n limit?: number;\n order?: AgentActivityMessageOrder;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListGeneratedFilesInput {\n agentTargetIds?: readonly string[];\n limit?: number;\n query?: string;\n sessionCwd?: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListSessionsPageInput {\n agentTargetId?: string | null;\n cursor?: string;\n limit?: number;\n searchQuery?: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeSessionPageResult {\n hasMore: boolean;\n nextCursor?: string;\n sessions: AgentActivitySession[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListSessionSectionsInput {\n agentTargetId?: string | null;\n limitPerSection?: number;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListSessionSectionPageInput {\n agentTargetId?: string | null;\n cursor?: string;\n limit?: number;\n sectionKey: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListPinnedSessionsPageInput {\n agentTargetId?: string | null;\n cursor?: string;\n limit?: number;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUserProject {\n createdAtUnixMs: number;\n id: string;\n label: string;\n lastUsedAtUnixMs?: number;\n path: string;\n sectionKey: string;\n updatedAtUnixMs: number;\n}\n\nexport interface AgentActivityRuntimeSessionSection {\n kind: \"conversations\" | \"project\";\n sectionKey: string;\n userProject?: AgentActivityRuntimeUserProject;\n sessions: AgentActivitySession[];\n hasMore: boolean;\n totalCount: number;\n nextCursor?: string;\n}\n\nexport interface AgentActivityRuntimeSessionPage {\n sessions: AgentActivitySession[];\n hasMore: boolean;\n totalCount: number;\n nextCursor?: string;\n}\n\nexport interface AgentActivityRuntimeSessionSectionsResult {\n pinned?: AgentActivityRuntimeSessionPage;\n sections: AgentActivityRuntimeSessionSection[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFile {\n label: string;\n path: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFileList {\n entries: AgentActivityRuntimeGeneratedFile[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeEnsureSessionSynchronizedInput {\n afterVersion?: number;\n agentSessionId: string;\n onError?: (error: unknown) => void;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeSetSessionPinnedInput {\n agentSessionId: string;\n pinned: boolean;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeTrackSettingsProjectChangeInput {\n action: \"clear\" | \"create_new\" | \"select_existing\";\n agentSessionId: string;\n provider?: string | null;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGetComposerOptionsInput {\n agentTargetId: string;\n cwd?: string | null;\n force?: boolean;\n provider?: string;\n settings?: AgentHostAgentSessionComposerSettings | null;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUpdateSessionSettingsInput {\n agentSessionId: string;\n settings: AgentHostAgentSessionComposerSettings;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeTrackDraftComposerSettingsChangeInput {\n nextSettings: AgentHostAgentSessionComposerSettings;\n previousSettings: AgentHostAgentSessionComposerSettings;\n provider: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeDiagnosticInput {\n details?: Record<string, unknown>;\n event: string;\n level?: \"debug\" | \"info\" | \"warn\" | \"error\";\n source?: string;\n workspaceId?: string | null;\n}\n\ninterface AgentActivityRuntimeActivateSessionInputBase {\n agentSessionId: string;\n cwd?: string;\n initialContent?: AgentActivitySendInput[\"content\"];\n /** 仅展示用首轮文本(bundle 折叠成一个 chip);initialContent 仍带展开后的文件。 */\n initialDisplayPrompt?: string | null;\n submitDiagnostics?: AgentActivitySendInput[\"submitDiagnostics\"];\n settings?: AgentActivitySessionSettings;\n title?: string;\n visible?: boolean;\n workspaceId: string;\n signal?: AbortSignal;\n}\n\nexport type AgentActivityRuntimeActivateSessionInput =\n | (AgentActivityRuntimeActivateSessionInputBase & {\n agentTargetId: string;\n clientSubmitId: string;\n mode: \"new\";\n })\n | (AgentActivityRuntimeActivateSessionInputBase & {\n agentTargetId?: string | null;\n clientSubmitId?: never;\n mode: \"existing\";\n });\n\nexport interface AgentActivityRuntimeUnactivateSessionInput {\n agentSessionId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeReadSessionAttachmentInput {\n agentSessionId: string;\n attachmentId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeReadPromptAssetInput {\n agentSessionId?: string | null;\n assetId?: string | null;\n hostPath?: string | null;\n kind?: string | null;\n mimeType: string;\n name?: string | null;\n path?: string | null;\n sha256?: string | null;\n uploadStatus?: string | null;\n uri?: string | null;\n workspaceId: string;\n}\n\nexport type AgentActivityRuntimePromptContentBlock =\n AgentActivitySendInput[\"content\"][number] & {\n assetId?: string;\n hostPath?: string;\n kind?: string;\n path?: string;\n sizeBytes?: number;\n uploadStatus?: string;\n uri?: string;\n };\n\nexport interface AgentActivityRuntimeUploadPromptContentInput {\n content: AgentActivityRuntimePromptContentBlock[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUploadPromptContentResult {\n content: AgentActivityRuntimePromptContentBlock[];\n}\n\n/**\n * Dedicated host boundary for turning an in-memory text paste into a local\n * prompt asset. The runtime owns persistence and returns a sendable host path;\n * AgentGUI must not infer this capability from generic file-upload support.\n */\nexport interface AgentActivityRuntimeStagePastedTextInput {\n name: string;\n text: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeStagePastedTextResult {\n name: string;\n path: string;\n sizeBytes: number;\n}\n\nexport interface AgentActivityRuntimeSessionSectionScopeInput {\n agentTargetId?: string | null;\n excludePinned?: boolean;\n sectionKey: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeSessionSectionDeletionCandidates {\n agentTargetId?: string | null;\n excludePinned: boolean;\n sectionKey: string;\n sessionIds: string[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeDeleteSessionsBatchInput {\n sessionIds: string[];\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeDeleteSessionsBatchResult {\n removedMessages: number;\n removedSessionIds: string[];\n removedSessions: number;\n}\n\nexport interface AgentActivityRuntimeSessionAttachment {\n attachmentId: string;\n mimeType: string;\n name?: string;\n data: string;\n}\n\nexport interface AgentActivityRuntimePromptAsset {\n assetId?: string;\n hostPath?: string;\n kind?: string;\n mimeType: string;\n name?: string;\n path: string;\n uploadStatus?: string;\n uri?: string;\n data: string;\n}\n\nexport interface AgentActivityRuntime {\n /**\n * Stable identity of this runtime instance (e.g. a local origin vs a\n * shared/room origin). The runtime owns one session engine per workspace and\n * that engine verifies this origin as part of its injected identity. Runtime\n * consumers resolve only through the nearest React provider; module-global\n * runtime lookup and last-mounted fallback are forbidden. An absent origin\n * means the canonical local origin.\n */\n origin?: string;\n /**\n * The session cwd is not resolvable on the local filesystem (e.g. a\n * shared/cloud sandbox not mounted locally), so AgentGUI must not run its\n * local stat-based \"working directory missing\" existence check — it would\n * always false-positive. Absent/false (default) => local, legacy behaviour.\n * Only that one guard is gated; project selection/listing is unaffected.\n */\n projectPathIsRemote?: boolean;\n promptContentUploadSupport?: {\n file?: boolean;\n image?: boolean;\n };\n /** Set false to suppress AgentGUI diagnostics in development consoles. */\n devDiagnosticConsoleSink?: boolean;\n goalControl(\n input: AgentActivityGoalControlInput\n ): Promise<AgentActivityGoalControlResult>;\n createSession(\n input: AgentActivityCreateSessionInput\n ): Promise<AgentActivitySession>;\n deleteSession(\n input: AgentActivityDeleteSessionInput\n ): Promise<AgentActivityDeleteSessionResult>;\n activateSession(\n input: AgentActivityRuntimeActivateSessionInput\n ): Promise<AgentActivityActivateSessionResult>;\n getSession(\n workspaceId: string,\n agentSessionId: string\n ): Promise<AgentActivitySession>;\n getComposerOptions(\n input: AgentActivityRuntimeGetComposerOptionsInput\n ): Promise<unknown>;\n updateSessionSettings(\n input: AgentActivityRuntimeUpdateSessionSettingsInput\n ): Promise<AgentActivityRuntimeUpdateSessionSettingsResult>;\n getSnapshot(workspaceId: string): AgentActivitySnapshot;\n getSessionEngine(workspaceId: string): AgentSessionEngine;\n listSessionMessages(\n input: AgentActivityRuntimeListSessionMessagesInput\n ): Promise<AgentActivityMessagePage>;\n listAgentGeneratedFiles?(\n input: AgentActivityRuntimeListGeneratedFilesInput\n ): Promise<AgentActivityRuntimeGeneratedFileList>;\n listSessionsPage?(\n input: AgentActivityRuntimeListSessionsPageInput\n ): Promise<AgentActivityRuntimeSessionPageResult>;\n listSessionSections?(\n input: AgentActivityRuntimeListSessionSectionsInput\n ): Promise<AgentActivityRuntimeSessionSectionsResult>;\n listSessionSectionPage?(\n input: AgentActivityRuntimeListSessionSectionPageInput\n ): Promise<AgentActivityRuntimeSessionSection>;\n listSessionSectionDeletionCandidates?(\n input: AgentActivityRuntimeSessionSectionScopeInput\n ): Promise<AgentActivityRuntimeSessionSectionDeletionCandidates>;\n deleteSessionsBatch?(\n input: AgentActivityRuntimeDeleteSessionsBatchInput\n ): Promise<AgentActivityRuntimeDeleteSessionsBatchResult>;\n listPinnedSessionsPage?(\n input: AgentActivityRuntimeListPinnedSessionsPageInput\n ): Promise<AgentActivityRuntimeSessionPage>;\n load(\n workspaceId: string,\n signal?: AbortSignal\n ): Promise<AgentActivitySnapshot>;\n ensureSessionSynchronized?(\n input: AgentActivityRuntimeEnsureSessionSynchronizedInput\n ): () => void;\n sendInput(\n input: AgentActivitySendInput\n ): Promise<AgentActivitySendInputResult>;\n uploadPromptContent?(\n input: AgentActivityRuntimeUploadPromptContentInput\n ): Promise<AgentActivityRuntimeUploadPromptContentResult>;\n stagePastedText?(\n input: AgentActivityRuntimeStagePastedTextInput\n ): Promise<AgentActivityRuntimeStagePastedTextResult>;\n readSessionAttachment?(\n input: AgentActivityRuntimeReadSessionAttachmentInput\n ): Promise<AgentActivityRuntimeSessionAttachment>;\n readPromptAsset?(\n input: AgentActivityRuntimeReadPromptAssetInput\n ): Promise<AgentActivityRuntimePromptAsset>;\n renameSession(\n input: AgentActivityRenameSessionInput\n ): Promise<AgentActivitySession>;\n setSessionPinned(\n input: AgentActivityRuntimeSetSessionPinnedInput\n ): Promise<AgentActivitySession>;\n trackSettingsProjectChange?(\n input: AgentActivityRuntimeTrackSettingsProjectChangeInput\n ): Promise<void>;\n trackDraftComposerSettingsChange?(\n input: AgentActivityRuntimeTrackDraftComposerSettingsChangeInput\n ): Promise<void>;\n reportDiagnostic?(\n input: AgentActivityRuntimeDiagnosticInput\n ): Promise<void> | void;\n unactivateSession(\n input: AgentActivityRuntimeUnactivateSessionInput\n ): Promise<AgentHostUnactivateAgentSessionResult>;\n submitInteractive(\n input: AgentActivitySubmitInteractiveInput\n ): Promise<AgentActivitySubmitInteractiveResult>;\n subscribeSessionEvents(\n workspaceId: string,\n listener: (event: unknown) => void\n ): () => void;\n subscribe(\n workspaceId: string,\n listener: AgentActivitySnapshotListener\n ): () => void;\n}\n\nconst AgentActivityRuntimeContext = createContext<AgentActivityRuntime | null>(\n null\n);\n\nfunction createTestAgentActivityRuntimeHolder(): {\n get: () => AgentActivityRuntime | null;\n set: (runtime: AgentActivityRuntime | null) => void;\n} {\n let runtime: AgentActivityRuntime | null = null;\n return {\n get: () => runtime,\n set: (nextRuntime) => {\n runtime = nextRuntime;\n }\n };\n}\n\nconst testAgentActivityRuntimeHolder = createTestAgentActivityRuntimeHolder();\n\nexport interface AgentActivityRuntimeProviderProps extends PropsWithChildren {\n runtime?: AgentActivityRuntime | null;\n}\n\nexport function AgentActivityRuntimeProvider({\n children,\n runtime\n}: AgentActivityRuntimeProviderProps): JSX.Element {\n return (\n <AgentActivityRuntimeContext.Provider value={runtime ?? null}>\n {children}\n </AgentActivityRuntimeContext.Provider>\n );\n}\n\nexport function useAgentActivityRuntime(): AgentActivityRuntime {\n const runtime =\n useContext(AgentActivityRuntimeContext) ?? getTestAgentActivityRuntime();\n if (!runtime) {\n throw new Error(\n \"AgentActivityRuntimeProvider is missing an AgentActivityRuntime instance.\"\n );\n }\n return runtime;\n}\n\nexport function useOptionalAgentActivityRuntime(): AgentActivityRuntime | null {\n return (\n useContext(AgentActivityRuntimeContext) ?? getTestAgentActivityRuntime()\n );\n}\n\nexport function useAgentActivitySnapshot(\n workspaceId: string\n): AgentActivitySnapshot {\n const runtime = useAgentActivityRuntime();\n const normalizedWorkspaceId = workspaceId.trim();\n return useSyncExternalStore(\n (listener) => runtime.subscribe(normalizedWorkspaceId, listener),\n () => runtime.getSnapshot(normalizedWorkspaceId),\n () => runtime.getSnapshot(normalizedWorkspaceId)\n );\n}\n\nexport function resetAgentActivityRuntimeForTests(): void {\n if (process.env.NODE_ENV === \"test\") {\n testAgentActivityRuntimeHolder.set(null);\n }\n}\n\nexport function setAgentActivityRuntimeForTests(\n runtime: AgentActivityRuntime | null\n): void {\n if (process.env.NODE_ENV === \"test\") {\n testAgentActivityRuntimeHolder.set(runtime);\n }\n}\n\nfunction getTestAgentActivityRuntime(): AgentActivityRuntime | null {\n if (process.env.NODE_ENV !== \"test\") {\n return null;\n }\n if (typeof window === \"undefined\") {\n return null;\n }\n const explicitRuntime = getExplicitWindowTestAgentActivityRuntime();\n if (explicitRuntime) {\n return explicitRuntime;\n }\n const testRuntimeOverride = testAgentActivityRuntimeHolder.get();\n if (testRuntimeOverride) {\n return testRuntimeOverride;\n }\n const testRuntime = (\n window as unknown as Window & {\n agentActivityRuntime?: AgentActivityRuntime;\n }\n ).agentActivityRuntime;\n return testRuntime ?? null;\n}\n\nfunction getExplicitWindowTestAgentActivityRuntime(): AgentActivityRuntime | null {\n if (process.env.NODE_ENV !== \"test\" || typeof window === \"undefined\") {\n return null;\n }\n const testDescriptor = Object.getOwnPropertyDescriptor(\n window,\n \"agentActivityRuntime\"\n );\n if (!testDescriptor || !(\"value\" in testDescriptor)) {\n return null;\n }\n return (testDescriptor.value as AgentActivityRuntime | undefined) ?? null;\n}\n","import {\n createContext,\n useContext,\n useMemo,\n type JSX,\n type PropsWithChildren\n} from \"react\";\nimport {\n toAgentHostRuntimeApi,\n type AgentHostInputApi,\n type AgentHostRuntimeApi\n} from \"./host/agentHostApi\";\nimport {\n AgentActivityRuntimeProvider,\n type AgentActivityRuntime\n} from \"./agentActivityRuntime\";\n\nconst AgentActivityHostContext = createContext<AgentHostRuntimeApi | null>(\n null\n);\n\nlet currentAgentHostApi: AgentHostRuntimeApi | null = null;\n\nexport interface AgentActivityHostProviderProps extends PropsWithChildren {\n agentActivityRuntime?: AgentActivityRuntime | null;\n agentHostApi?: AgentHostInputApi | null;\n}\n\nexport function AgentActivityHostProvider({\n agentActivityRuntime,\n agentHostApi,\n children\n}: AgentActivityHostProviderProps): JSX.Element {\n const resolvedAgentHostApi = useMemo(\n () => (agentHostApi ? toAgentHostRuntimeApi(agentHostApi) : null),\n [agentHostApi]\n );\n currentAgentHostApi = resolvedAgentHostApi;\n return (\n <AgentActivityRuntimeProvider runtime={agentActivityRuntime}>\n <AgentActivityHostContext.Provider value={resolvedAgentHostApi}>\n {children}\n </AgentActivityHostContext.Provider>\n </AgentActivityRuntimeProvider>\n );\n}\n\nexport function useAgentHostApi(): AgentHostRuntimeApi {\n const agentHostApi =\n useContext(AgentActivityHostContext) ?? getTestAgentHostApi();\n if (!agentHostApi) {\n throw new Error(\n \"AgentActivityHostProvider is missing an agentHostApi instance.\"\n );\n }\n return agentHostApi;\n}\n\nexport function useOptionalAgentHostApi(): AgentHostRuntimeApi | null {\n return useContext(AgentActivityHostContext) ?? getTestAgentHostApi();\n}\n\nexport function getOptionalAgentHostApi(): AgentHostRuntimeApi | null {\n return (\n getExplicitWindowTestAgentHostApi() ??\n currentAgentHostApi ??\n getTestAgentHostApi()\n );\n}\n\nexport function resetAgentHostApiForTests(): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentHostApi = null;\n }\n}\n\nexport function setAgentHostApiForTests(\n agentHostApi: AgentHostInputApi | AgentHostRuntimeApi | null\n): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentHostApi = agentHostApi\n ? toAgentHostRuntimeApi(agentHostApi)\n : null;\n }\n}\n\nfunction getTestAgentHostApi(): AgentHostRuntimeApi | null {\n if (process.env.NODE_ENV !== \"test\") {\n return null;\n }\n if (typeof window === \"undefined\") {\n return null;\n }\n const explicitAgentHostApi = getExplicitWindowTestAgentHostApi();\n if (explicitAgentHostApi) {\n return explicitAgentHostApi;\n }\n if (currentAgentHostApi) {\n return currentAgentHostApi;\n }\n const testAgentHostApi = (\n window as unknown as Window & {\n agentHostApi?: AgentHostInputApi | AgentHostRuntimeApi;\n }\n ).agentHostApi;\n return testAgentHostApi ? toAgentHostRuntimeApi(testAgentHostApi) : null;\n}\n\nfunction getExplicitWindowTestAgentHostApi(): AgentHostRuntimeApi | null {\n if (process.env.NODE_ENV !== \"test\" || typeof window === \"undefined\") {\n return null;\n }\n const testDescriptor = Object.getOwnPropertyDescriptor(\n window,\n \"agentHostApi\"\n );\n if (!testDescriptor || !(\"value\" in testDescriptor)) {\n return null;\n }\n const testAgentHostApi = testDescriptor.value as\n | AgentHostInputApi\n | AgentHostRuntimeApi\n | undefined;\n return testAgentHostApi ? toAgentHostRuntimeApi(testAgentHostApi) : null;\n}\n","import type {\n AgentHostBatchUserInfoInput,\n AgentHostBatchUserInfoResult,\n AgentHostListWorkspaceAgentProbesInput,\n AgentHostWorkspaceAgentProbesResult,\n PersistWriteResult,\n ReadWorkspaceAgentReadStateInput,\n ReadWorkspaceFileResult as AgentHostReadWorkspaceFileResult,\n WorkspaceAgentReadStateSnapshot,\n WriteWorkspaceAgentReadStateInput\n} from \"../shared/contracts/dto\";\nimport type { WorkspaceUserProjectService } from \"@tutti-os/workspace-user-project/contracts\";\n\ntype AgentHostAsyncResult<T = any> = Promise<T>;\ntype AgentHostRecord = Record<string, unknown>;\ntype AgentHostUnsubscribe = () => void;\n\nexport type AgentHostClipboardApi = {\n writeImage?: (input: {\n data: string;\n mimeType: \"image/png\";\n }) => AgentHostAsyncResult<void>;\n writeText: (text: string) => AgentHostAsyncResult<void>;\n};\n\nexport type AgentHostDebugApi = {\n logRuntimeDiagnostics: (\n payload: unknown\n ) => AgentHostAsyncResult<void> | void;\n logTerminalDiagnostics?: (\n payload: unknown\n ) => AgentHostAsyncResult<void> | void;\n};\n\nexport type AgentHostFilesystemApi = AgentHostRecord & {\n readFileText: (payload: {\n path?: string;\n uri?: string;\n }) => AgentHostAsyncResult<{\n content: string;\n name?: string;\n path?: string;\n }>;\n};\n\nexport type AgentHostMetaApi = AgentHostRecord & {\n appVersion?: string | null;\n isPackaged?: boolean;\n isTest?: boolean;\n mainPid?: number | null;\n platform?: string;\n workspaceId?: string;\n};\n\nexport type AgentHostEnvironmentApi = AgentHostRecord & {\n getBaseUrl?: () => AgentHostAsyncResult<string>;\n};\n\nexport type AgentHostPersistenceApi = AgentHostRecord & {\n readWorkspaceAgentReadState: (\n input: ReadWorkspaceAgentReadStateInput\n ) => AgentHostAsyncResult<WorkspaceAgentReadStateSnapshot>;\n writeWorkspaceAgentReadState: (\n input: WriteWorkspaceAgentReadStateInput\n ) => AgentHostAsyncResult<PersistWriteResult>;\n};\n\nexport type AgentHostToastApi = AgentHostRecord & {\n error: (title: string, description?: string) => void;\n info?: (title: string, description?: string) => void;\n success?: (title: string, description?: string) => void;\n};\n\nexport interface AgentHostSelectedFile {\n name?: string;\n path: string;\n}\n\nexport interface AgentHostSelectFilesInput {\n allowDirectories?: boolean;\n}\n\nexport interface AgentHostApplyWorkspaceGitPatchInput {\n allowBinary?: boolean;\n atomic?: boolean;\n cwd: string;\n diff: string;\n revert?: boolean;\n target?: \"unstaged\" | \"staged\" | \"staged-and-unstaged\";\n}\n\nexport interface AgentHostApplyWorkspaceGitPatchResult {\n status: \"success\" | \"partial-success\" | \"error\";\n appliedPaths: string[];\n skippedPaths: string[];\n conflictedPaths: string[];\n errorCode?: \"not-git-repo\" | string;\n execOutput?: {\n command: string;\n stdout: string;\n stderr: string;\n };\n}\n\nexport interface AgentHostResolveWorkspaceGitPatchSupportInput {\n cwd: string;\n}\n\nexport interface AgentHostResolveWorkspaceGitPatchSupportResult {\n supported: boolean;\n root?: string;\n errorCode?: \"not-git-repo\" | string;\n}\n\nexport type AgentHostWorkspaceApi = AgentHostRecord & {\n applyGitPatch?: (\n input: AgentHostApplyWorkspaceGitPatchInput\n ) => AgentHostAsyncResult<AgentHostApplyWorkspaceGitPatchResult>;\n resolveGitPatchSupport?: (\n input: AgentHostResolveWorkspaceGitPatchSupportInput\n ) => AgentHostAsyncResult<AgentHostResolveWorkspaceGitPatchSupportResult>;\n copyPath?: (input: { path: string }) => AgentHostAsyncResult<void>;\n ensureDirectory: (input: { path: string }) => AgentHostAsyncResult<void>;\n getReferenceForFile?: (file: File) => {\n kind: \"file\" | \"folder\";\n path: string;\n };\n readFile: (input: {\n path: string;\n }) => AgentHostAsyncResult<AgentHostReadWorkspaceFileResult>;\n selectContextEntries?: () => AgentHostAsyncResult<{ entries: unknown[] }>;\n selectDirectory: () => AgentHostAsyncResult<{ path: string } | null>;\n selectFiles: (\n input?: AgentHostSelectFilesInput\n ) => AgentHostAsyncResult<AgentHostSelectedFile[]>;\n writeFileText: (input: {\n content: string;\n path: string;\n }) => AgentHostAsyncResult<unknown>;\n};\n\nexport interface AgentHostInputApi {\n account?: AgentHostAccountApi;\n agentSessions?: AgentHostAgentSessionsApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n persistence?: AgentHostPersistenceApi;\n runtime?: AgentHostEnvironmentApi;\n toast?: AgentHostToastApi;\n userProjects?: AgentHostUserProjectsApi;\n workspace: AgentHostWorkspaceApi;\n workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;\n}\n\nexport type AgentHostApi = AgentHostInputApi;\n\nexport type AgentHostAccountApi = AgentHostRecord & {\n batchGetUserInfo: (\n input: AgentHostBatchUserInfoInput\n ) => AgentHostAsyncResult<AgentHostBatchUserInfoResult>;\n ensureProfiles?: (input: any) => AgentHostAsyncResult<any>;\n};\n\nexport type AgentHostWorkspaceAgentProbesApi = AgentHostRecord & {\n list: (\n input: AgentHostListWorkspaceAgentProbesInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentProbesResult>;\n};\n\nexport type AgentProviderProbeListInput =\n AgentHostListWorkspaceAgentProbesInput;\nexport type AgentProviderProbeListResult = AgentHostWorkspaceAgentProbesResult;\n\nexport interface AgentHostUserProject {\n id: string;\n path: string;\n label: string;\n sectionKey?: string;\n createdAtUnixMs?: number;\n updatedAtUnixMs?: number;\n lastUsedAtUnixMs?: number;\n}\n\nexport type AgentHostUserProjectsApi = AgentHostRecord & {\n service?: WorkspaceUserProjectService;\n checkPath?: (input: { path: string }) => AgentHostAsyncResult<{\n exists: boolean;\n isDirectory: boolean;\n path: string;\n }>;\n create?: (input: {\n name: string;\n }) => AgentHostAsyncResult<AgentHostUserProject>;\n getDefaultSelection?: () => AgentHostAsyncResult<{\n path: string | null;\n } | null>;\n list: () => AgentHostAsyncResult<{\n projects: AgentHostUserProject[];\n }>;\n subscribe?: (listener: () => void) => AgentHostUnsubscribe;\n prepareSelection?: (input: {\n projectLocked: boolean;\n selectedPath: string | null;\n }) => AgentHostAsyncResult<{\n isSelectedPathMissing: boolean;\n projects: AgentHostUserProject[];\n selection:\n | {\n kind: \"clear\";\n suppressedPath: string;\n }\n | {\n kind: \"none\";\n }\n | {\n kind: \"select\";\n path: string;\n };\n }>;\n remove?: (input: { path: string }) => AgentHostAsyncResult<void>;\n isNoProjectPath?: (input: { path: string }) => boolean;\n rememberDefaultSelection?: (input: {\n path: string | null;\n }) => AgentHostAsyncResult<void>;\n use: (input: { path: string }) => AgentHostAsyncResult<AgentHostUserProject>;\n};\n\nexport type AgentHostAgentSessionsApi = AgentHostRecord & {\n activate: (input: any) => AgentHostAsyncResult<any>;\n getComposerOptions?: (input: any) => AgentHostAsyncResult<any>;\n getState: (input: any) => AgentHostAsyncResult<any>;\n onEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n subscribeEvents: (\n input: any,\n listener: (event: any) => void\n ) => AgentHostUnsubscribe;\n unactivate: (input: any) => AgentHostAsyncResult<any>;\n updateSettings: (input: any) => AgentHostAsyncResult<any>;\n};\n\nexport interface AgentHostRuntimeApi {\n account?: AgentHostAccountApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n persistence?: AgentHostPersistenceApi;\n runtime?: AgentHostEnvironmentApi;\n toast?: AgentHostToastApi;\n userProjects?: AgentHostUserProjectsApi;\n workspace: AgentHostWorkspaceApi;\n workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;\n}\n\nexport function toAgentHostRuntimeApi(\n hostApi: AgentHostInputApi | AgentHostRuntimeApi\n): AgentHostRuntimeApi {\n return {\n account: hostApi.account,\n clipboard: hostApi.clipboard,\n debug: hostApi.debug,\n filesystem: hostApi.filesystem,\n meta: hostApi.meta,\n onHostEvent: hostApi.onHostEvent,\n persistence: hostApi.persistence,\n runtime: hostApi.runtime,\n toast: hostApi.toast,\n userProjects: hostApi.userProjects,\n workspace: hostApi.workspace,\n workspaceAgentProbes: hostApi.workspaceAgentProbes\n };\n}\n","import { agentColorfulUrl } from \"../managedAgentIconAssets.ts\";\nimport { migratedAgentGUIProviderIdentityCatalog } from \"../providerIdentityCatalog.ts\";\nimport { createProviderIconUrlMap } from \"../providerIconAssets.ts\";\nimport { normalizeManagedAgentProvider } from \"./managedAgentProviders\";\n\n// `tutti` is a historical presentation alias rather than a provider id.\nconst managedAgentPresentationIconAliases = {\n tutti: \"tutti\"\n} as const;\n\n/** Square avatar art for the managed toolchain agents (used by Manage Agents and Launch home Agents floor). */\nexport const MANAGED_AGENT_ICON_URLS: Record<string, string> =\n createProviderIconUrlMap(\n \"manage\",\n managedAgentPresentationIconAliases,\n migratedAgentGUIProviderIdentityCatalog\n );\n\n/** Colorful provider rail icons used by AgentGUI's left provider filter. */\nexport const MANAGED_AGENT_PROVIDER_RAIL_ICON_URLS: Record<string, string> =\n createProviderIconUrlMap(\n \"providerRail\",\n managedAgentPresentationIconAliases,\n migratedAgentGUIProviderIdentityCatalog\n );\n\n/** Rounded avatars for Room status / room activity panel only. */\nexport const MANAGED_AGENT_ICON_ROUNDED_URLS: Record<string, string> =\n createProviderIconUrlMap(\n \"rounded\",\n managedAgentPresentationIconAliases,\n migratedAgentGUIProviderIdentityCatalog\n );\n\n/** Neutral artwork for UI surfaces that require a non-null fallback. */\nexport const MANAGED_AGENT_ICON_FALLBACK_URL = agentColorfulUrl;\n\nexport function managedAgentRoundedIconUrl(\n provider: string | undefined\n): string {\n return (\n MANAGED_AGENT_ICON_ROUNDED_URLS[normalizeManagedAgentProvider(provider)] ??\n MANAGED_AGENT_ICON_FALLBACK_URL\n );\n}\n","import {\n agentGUIProviderIdentityDisplayName,\n resolveMigratedAgentGUIProviderIdentity\n} from \"../providerIdentityCatalog.ts\";\nimport { translate } from \"../i18n/index.ts\";\n\nexport function workspaceAgentProviderLabel(provider: string): string {\n const normalized = provider.trim().toLowerCase();\n const migratedIdentity = resolveMigratedAgentGUIProviderIdentity(normalized);\n if (migratedIdentity) {\n return agentGUIProviderIdentityDisplayName(migratedIdentity, translate);\n }\n return titleCase(provider);\n}\n\nfunction titleCase(value: string): string {\n return value\n .split(/[-_\\s]+/)\n .filter(Boolean)\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(\" \");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAydH;AA5BJ,IAAM,8BAA8B;AAAA,EAClC;AACF;AAEA,SAAS,uCAGP;AACA,MAAI,UAAuC;AAC3C,SAAO;AAAA,IACL,KAAK,MAAM;AAAA,IACX,KAAK,CAAC,gBAAgB;AACpB,gBAAU;AAAA,IACZ;AAAA,EACF;AACF;A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