@tutti-os/agent-gui 0.0.93 → 0.0.95

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 (164) hide show
  1. package/README.md +48 -32
  2. package/dist/AgentGUI-CwBLYtv-.d.ts +992 -0
  3. package/dist/agent-conversation/index.d.ts +5 -7
  4. package/dist/agent-conversation/index.js +13 -9
  5. package/dist/agent-conversation/index.js.map +1 -1
  6. package/dist/agent-env/index.d.ts +14 -38
  7. package/dist/agent-env/index.js +2 -57
  8. package/dist/agent-env/index.js.map +1 -1
  9. package/dist/agent-gui.d.ts +21 -0
  10. package/dist/agent-gui.js +39 -0
  11. package/dist/agent-message-center/index.d.ts +145 -122
  12. package/dist/agent-message-center/index.js +1473 -1398
  13. package/dist/agent-message-center/index.js.map +1 -1
  14. package/dist/{agentConversationVM-CfXN_TQ2.d.ts → agentConversationVM-C335TR6S.d.ts} +112 -7
  15. package/dist/agentFileMentionContracts-Czvz6YMI.d.ts +107 -0
  16. package/dist/{agentGuiNodeTypes-rGaDqxVR.d.ts → agentGuiNodeTypes-DppADPHW.d.ts} +102 -149
  17. package/dist/agentPlanPromptDispatch-C7cCMjve.d.ts +37 -0
  18. package/dist/agents.d.ts +13 -0
  19. package/dist/agents.js +13 -0
  20. package/dist/app/renderer/agentactivity.css +431 -75
  21. package/dist/app/renderer/assets/icons/agent-vinyl-player-chassis.png +0 -0
  22. package/dist/app/renderer/assets/icons/agent-vinyl-tonearm.png +0 -0
  23. package/dist/app/renderer/assets/icons/agent-vinyls/claude-vinyl.png +0 -0
  24. package/dist/app/renderer/assets/icons/agent-vinyls/codex-vinyl.png +0 -0
  25. package/dist/app/renderer/assets/icons/agent-vinyls/cursor-vinyl.png +0 -0
  26. package/dist/app/renderer/assets/icons/agent-vinyls/hermes-vinyl.png +0 -0
  27. package/dist/app/renderer/assets/icons/agent-vinyls/openclaw-vinyl.png +0 -0
  28. package/dist/app/renderer/assets/icons/agent-vinyls/opencode-vinyl.png +0 -0
  29. package/dist/app/renderer/assets/icons/agent-vinyls/tutti-vinyl.png +0 -0
  30. package/dist/app/renderer/assets/icons/open-link-lined.svg +4 -0
  31. package/dist/{chunk-7QHBFRG5.js → chunk-3R2D4E57.js} +3137 -3396
  32. package/dist/chunk-3R2D4E57.js.map +1 -0
  33. package/dist/chunk-4YG7YK7S.js +23 -0
  34. package/dist/chunk-4YG7YK7S.js.map +1 -0
  35. package/dist/chunk-5X7YDOC6.js +42 -0
  36. package/dist/chunk-5X7YDOC6.js.map +1 -0
  37. package/dist/{chunk-IBIMGLCD.js → chunk-7J4K6WKB.js} +1 -1
  38. package/dist/chunk-7J4K6WKB.js.map +1 -0
  39. package/dist/{chunk-KQE5KV2V.js → chunk-7PFDA2HQ.js} +505 -504
  40. package/dist/chunk-7PFDA2HQ.js.map +1 -0
  41. package/dist/{chunk-M2LWH54R.js → chunk-7RDD3EWP.js} +557 -569
  42. package/dist/chunk-7RDD3EWP.js.map +1 -0
  43. package/dist/{chunk-VWXFFSIM.js → chunk-AOS2VWU6.js} +1357 -1301
  44. package/dist/chunk-AOS2VWU6.js.map +1 -0
  45. package/dist/{chunk-3HARXLAZ.js → chunk-BFNJKTDV.js} +295 -255
  46. package/dist/chunk-BFNJKTDV.js.map +1 -0
  47. package/dist/{chunk-U7D7G3UU.js → chunk-BIHBXWK5.js} +2 -2
  48. package/dist/{chunk-XQUUELKF.js → chunk-C5FV4UGI.js} +2921 -2944
  49. package/dist/chunk-C5FV4UGI.js.map +1 -0
  50. package/dist/{chunk-HOSX5C5V.js → chunk-CRO2MV2Y.js} +36 -46
  51. package/dist/chunk-CRO2MV2Y.js.map +1 -0
  52. package/dist/chunk-FGLQZ6I4.js +9 -0
  53. package/dist/chunk-FGLQZ6I4.js.map +1 -0
  54. package/dist/chunk-H6IQ63DQ.js +14 -0
  55. package/dist/chunk-H6IQ63DQ.js.map +1 -0
  56. package/dist/{chunk-4SQNOOJ3.js → chunk-JX2SIXNL.js} +1293 -1702
  57. package/dist/chunk-JX2SIXNL.js.map +1 -0
  58. package/dist/chunk-KAL4XZMA.js +231 -0
  59. package/dist/chunk-KAL4XZMA.js.map +1 -0
  60. package/dist/chunk-KJQERFKX.js +259 -0
  61. package/dist/chunk-KJQERFKX.js.map +1 -0
  62. package/dist/chunk-LQVXBT65.js +491 -0
  63. package/dist/chunk-LQVXBT65.js.map +1 -0
  64. package/dist/{chunk-AOVPGJBC.js → chunk-NITOD7WF.js} +2 -2
  65. package/dist/{chunk-7LMJXF4R.js → chunk-NJAZ7LQM.js} +20 -16
  66. package/dist/chunk-NJAZ7LQM.js.map +1 -0
  67. package/dist/chunk-NX3CZJXW.js +25 -0
  68. package/dist/chunk-NX3CZJXW.js.map +1 -0
  69. package/dist/chunk-O6W72SEP.js +93 -0
  70. package/dist/chunk-O6W72SEP.js.map +1 -0
  71. package/dist/{chunk-PSLAWU25.js → chunk-R2EWECUP.js} +7 -1
  72. package/dist/chunk-R2EWECUP.js.map +1 -0
  73. package/dist/chunk-RY6GIO3K.js +31700 -0
  74. package/dist/chunk-RY6GIO3K.js.map +1 -0
  75. package/dist/{chunk-XDV4ZRVK.js → chunk-UGVI47X6.js} +98 -37
  76. package/dist/chunk-UGVI47X6.js.map +1 -0
  77. package/dist/{chunk-XW4CVBUH.js → chunk-UQJPV6HP.js} +18 -11
  78. package/dist/chunk-UQJPV6HP.js.map +1 -0
  79. package/dist/{chunk-GAPTLVII.js → chunk-VF22EG3F.js} +1 -1
  80. package/dist/{chunk-GAPTLVII.js.map → chunk-VF22EG3F.js.map} +1 -1
  81. package/dist/{chunk-45FF4DQU.js → chunk-WEDMAVX2.js} +22 -24
  82. package/dist/chunk-WEDMAVX2.js.map +1 -0
  83. package/dist/{chunk-SXDLSEHO.js → chunk-XMO45GKA.js} +531 -401
  84. package/dist/chunk-XMO45GKA.js.map +1 -0
  85. package/dist/{chunk-UNO7CEAF.js → chunk-YE25HN6T.js} +6 -9
  86. package/dist/chunk-YE25HN6T.js.map +1 -0
  87. package/dist/context-mention-palette/index.d.ts +3 -2
  88. package/dist/context-mention-palette/index.js +19 -14
  89. package/dist/custom-mention.d.ts +44 -0
  90. package/dist/custom-mention.js +17 -0
  91. package/dist/custom-mention.js.map +1 -0
  92. package/dist/dock-icons.d.ts +6 -0
  93. package/dist/dock-icons.js +11 -0
  94. package/dist/dock-icons.js.map +1 -0
  95. package/dist/i18n/index.d.ts +852 -837
  96. package/dist/i18n/index.js +2 -2
  97. package/dist/index.d.ts +52 -1061
  98. package/dist/index.js +72 -35254
  99. package/dist/index.js.map +1 -1
  100. package/dist/mention-search.d.ts +226 -0
  101. package/dist/mention-search.js +29 -0
  102. package/dist/mention-search.js.map +1 -0
  103. package/dist/open-link-lined-JWEKUKME.svg +4 -0
  104. package/dist/provider-icons.d.ts +6 -0
  105. package/dist/provider-icons.js +12 -0
  106. package/dist/provider-icons.js.map +1 -0
  107. package/dist/provider-identity.d.ts +9 -0
  108. package/dist/provider-identity.js +21 -0
  109. package/dist/provider-identity.js.map +1 -0
  110. package/dist/runtime-BBNdWgDU.d.ts +10 -0
  111. package/dist/{types-PLFZ8SBX.d.ts → types-DX2bxgB8.d.ts} +28 -83
  112. package/dist/workbench/contribution.d.ts +32 -40
  113. package/dist/workbench/contribution.js +10 -6
  114. package/dist/workbench/index.d.ts +6 -2
  115. package/dist/workbench/index.js +24 -20
  116. package/dist/workbench/launch.d.ts +2 -5
  117. package/dist/workbench/launch.js +4 -3
  118. package/dist/workbench/providerCatalog.js +2 -1
  119. package/dist/workbench/sessionTitle.d.ts +4 -3
  120. package/dist/workbench/sessionTitle.js +4 -3
  121. package/dist/workbench/state.d.ts +1 -1
  122. package/dist/workbench/state.js +3 -2
  123. package/dist/workbench/types.d.ts +0 -3
  124. package/dist/workbench/types.js +1 -1
  125. package/dist/workspace-agent-generated-files.d.ts +20 -2
  126. package/dist/workspace-agent-generated-files.js +7 -6
  127. package/dist/workspaceAgentActivityListTypes-C7gPWYiA.d.ts +71 -0
  128. package/package.json +65 -28
  129. package/dist/AgentMentionSearchController-DD_WOred.d.ts +0 -241
  130. package/dist/AgentMessageMarkdown-DeYPURtF.d.ts +0 -7
  131. package/dist/chunk-3HARXLAZ.js.map +0 -1
  132. package/dist/chunk-45FF4DQU.js.map +0 -1
  133. package/dist/chunk-4HP6V2YA.js +0 -207
  134. package/dist/chunk-4HP6V2YA.js.map +0 -1
  135. package/dist/chunk-4SQNOOJ3.js.map +0 -1
  136. package/dist/chunk-7LMJXF4R.js.map +0 -1
  137. package/dist/chunk-7QHBFRG5.js.map +0 -1
  138. package/dist/chunk-HOSX5C5V.js.map +0 -1
  139. package/dist/chunk-IBIMGLCD.js.map +0 -1
  140. package/dist/chunk-KQE5KV2V.js.map +0 -1
  141. package/dist/chunk-LR4FA5X6.js +0 -368
  142. package/dist/chunk-LR4FA5X6.js.map +0 -1
  143. package/dist/chunk-M2LWH54R.js.map +0 -1
  144. package/dist/chunk-MKHDRIGN.js +0 -71
  145. package/dist/chunk-MKHDRIGN.js.map +0 -1
  146. package/dist/chunk-PSLAWU25.js.map +0 -1
  147. package/dist/chunk-SXDLSEHO.js.map +0 -1
  148. package/dist/chunk-UNO7CEAF.js.map +0 -1
  149. package/dist/chunk-VAKFNNKT.js +0 -410
  150. package/dist/chunk-VAKFNNKT.js.map +0 -1
  151. package/dist/chunk-VWXFFSIM.js.map +0 -1
  152. package/dist/chunk-XDV4ZRVK.js.map +0 -1
  153. package/dist/chunk-XQUUELKF.js.map +0 -1
  154. package/dist/chunk-XW4CVBUH.js.map +0 -1
  155. package/dist/plan-decision-ops.d.ts +0 -70
  156. package/dist/plan-decision-ops.js +0 -19
  157. package/dist/queued-prompt-runtime.d.ts +0 -115
  158. package/dist/queued-prompt-runtime.js +0 -9
  159. package/dist/workspaceAgentActivityListViewModel-TXH1VXrk.d.ts +0 -339
  160. package/dist/workspaceLinkActions-DS9LWqzI.d.ts +0 -74
  161. /package/dist/{plan-decision-ops.js.map → agent-gui.js.map} +0 -0
  162. /package/dist/{queued-prompt-runtime.js.map → agents.js.map} +0 -0
  163. /package/dist/{chunk-U7D7G3UU.js.map → chunk-BIHBXWK5.js.map} +0 -0
  164. /package/dist/{chunk-AOVPGJBC.js.map → chunk-NITOD7WF.js.map} +0 -0
@@ -0,0 +1,992 @@
1
+ import * as react from 'react';
2
+ import { PropsWithChildren, JSX, HTMLAttributes, ReactNode } from 'react';
3
+ import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
4
+ import { AgentActivityGoalControlInput, AgentActivityGoalControlResult, AgentActivityCreateSessionInput, AgentActivitySession, AgentActivityDeleteSessionInput, AgentActivityDeleteSessionResult, AgentActivitySendInput, AgentActivitySessionSettings, AgentActivityActivateSessionResult, AgentActivitySnapshot, AgentSessionEngine, AgentActivityMessageOrder, AgentActivityMessagePage, AgentActivitySendInputResult, AgentActivityRenameSessionInput, AgentActivitySubmitInteractiveInput, AgentActivitySubmitInteractiveResult, AgentActivitySnapshotListener } from '@tutti-os/agent-activity-core';
5
+ import { t as AgentHostAgentSessionComposerSettings, x as AgentHostUnactivateAgentSessionResult, z as AgentProvider, h as AgentGUIAgentTarget, m as AgentGUIProvider, y as AgentPromptContentBlock, l as AgentGUINodeData, P as Point, n as AgentGUIProviderRailAllPresentation, o as AgentGUIProviderRailMode, p as AgentGUIProviderReadinessGate, N as NodeFrame, e as AgentGUIAgentDirectorySnapshot, k as AgentGUIAllAgentsPresentation } from './types-DX2bxgB8.js';
6
+ import { A as AgentComposerDraft, o as AgentSessionCommand, c as AgentGUIProviderSkillOption, a as AgentGUIComposerSettingsVM, d as AgentGUIQueuedPromptVM, j as AgentMessageMarkdownWorkspaceAppIcon, p as AgentSlashCommandCapability, b as AgentGUINodeViewModel, l as AgentProbeSnapshot, g as AgentHostInputApi } from './agentGuiNodeTypes-DppADPHW.js';
7
+ import { WorkspaceFileReference, ReferenceLocateTarget, WorkspaceFileReferenceAdapter } from '@tutti-os/workspace-file-reference/contracts';
8
+ import { A as AgentContextMentionItem } from './agentFileMentionContracts-Czvz6YMI.js';
9
+ import { WorkspaceFileEntry } from '@tutti-os/workspace-file-manager/services';
10
+ import { ReferenceSourceAggregator } from '@tutti-os/workspace-file-reference/core';
11
+ import { U as UiLanguage, a as UiTheme } from './uiSettings-BQS9r2eo.js';
12
+ import { b as AgentConversationPromptVM, e as WorkspaceLinkAction } from './agentConversationVM-C335TR6S.js';
13
+ import { AgentContextMentionProvider } from './context-mention-provider.js';
14
+ import { WorkspaceUserProjectI18nRuntime } from '@tutti-os/workspace-user-project/i18n';
15
+ import { WorkspaceUserProjectSelectChangeAction } from '@tutti-os/workspace-user-project/ui';
16
+ import { WorkspaceUserProject } from '@tutti-os/workspace-user-project/contracts';
17
+ import { A as AgentGuiI18nLocale } from './runtime-BBNdWgDU.js';
18
+
19
+ interface AgentHostManagedAgentsStateItem {
20
+ toolId: string;
21
+ toolClass: string;
22
+ agentId?: string;
23
+ hostDetected?: boolean;
24
+ hostConfigDetected?: boolean;
25
+ hostVersion?: string;
26
+ targetVersion: string;
27
+ recommendedVersion?: string;
28
+ decisionReason: string;
29
+ fallbackApplied: boolean;
30
+ notes?: string;
31
+ }
32
+ interface AgentHostToolchainConfigSyncedAgent {
33
+ agentId: string;
34
+ /** RFC3339 timestamp for when Tutti last synced this agent's host config. */
35
+ syncedAt?: string;
36
+ }
37
+ interface AgentHostManagedAgentsState {
38
+ metadataSynced: boolean;
39
+ toolCatalogRevision: string;
40
+ agentProfileRevision: string;
41
+ totalCount: number;
42
+ items: AgentHostManagedAgentsStateItem[];
43
+ /** Agent IDs ready for normal AgentGUI use (installed and authenticated/ready). */
44
+ readyAgentIds: string[];
45
+ /** Agent IDs whose host config has been synced to the VM through Manage Agents. */
46
+ configSyncedAgentIds: string[];
47
+ /** Agent config sync metadata, including when Tutti last copied host config. */
48
+ configSyncedAgents?: AgentHostToolchainConfigSyncedAgent[];
49
+ }
50
+
51
+ declare const APP_UPDATE_POLICIES: readonly ["off", "prompt", "auto"];
52
+ type AppUpdatePolicy = (typeof APP_UPDATE_POLICIES)[number];
53
+
54
+ interface AgentActivityRuntimeUpdateSessionSettingsResult {
55
+ agentSessionId: string;
56
+ settings: AgentHostAgentSessionComposerSettings;
57
+ session: AgentActivitySession;
58
+ }
59
+ interface AgentActivityRuntimeListSessionMessagesInput {
60
+ afterVersion?: number;
61
+ beforeVersion?: number;
62
+ cache?: boolean;
63
+ agentSessionId: string;
64
+ limit?: number;
65
+ order?: AgentActivityMessageOrder;
66
+ signal?: AbortSignal;
67
+ workspaceId: string;
68
+ }
69
+ interface AgentActivityRuntimeListGeneratedFilesInput {
70
+ limit?: number;
71
+ query?: string;
72
+ sessionCwd?: string;
73
+ signal?: AbortSignal;
74
+ workspaceId: string;
75
+ }
76
+ interface AgentActivityRuntimeListSessionsPageInput {
77
+ limit?: number;
78
+ searchQuery?: string;
79
+ signal?: AbortSignal;
80
+ workspaceId: string;
81
+ }
82
+ interface AgentActivityRuntimeSessionPageResult {
83
+ hasMore: boolean;
84
+ nextCursor?: string;
85
+ sessions: AgentActivitySession[];
86
+ workspaceId: string;
87
+ }
88
+ interface AgentActivityRuntimeListSessionSectionsInput {
89
+ agentTargetId?: string | null;
90
+ limitPerSection?: number;
91
+ signal?: AbortSignal;
92
+ workspaceId: string;
93
+ }
94
+ interface AgentActivityRuntimeListSessionSectionPageInput {
95
+ agentTargetId?: string | null;
96
+ cursor?: string;
97
+ limit?: number;
98
+ sectionKey: string;
99
+ signal?: AbortSignal;
100
+ workspaceId: string;
101
+ }
102
+ interface AgentActivityRuntimeListPinnedSessionsPageInput {
103
+ agentTargetId?: string | null;
104
+ cursor?: string;
105
+ limit?: number;
106
+ signal?: AbortSignal;
107
+ workspaceId: string;
108
+ }
109
+ interface AgentActivityRuntimeUserProject {
110
+ createdAtUnixMs: number;
111
+ id: string;
112
+ label: string;
113
+ lastUsedAtUnixMs?: number;
114
+ path: string;
115
+ sectionKey: string;
116
+ updatedAtUnixMs: number;
117
+ }
118
+ interface AgentActivityRuntimeSessionSection {
119
+ kind: "conversations" | "project";
120
+ sectionKey: string;
121
+ userProject?: AgentActivityRuntimeUserProject;
122
+ sessions: AgentActivitySession[];
123
+ hasMore: boolean;
124
+ nextCursor?: string;
125
+ }
126
+ interface AgentActivityRuntimeSessionPage {
127
+ sessions: AgentActivitySession[];
128
+ hasMore: boolean;
129
+ nextCursor?: string;
130
+ }
131
+ interface AgentActivityRuntimeSessionSectionsResult {
132
+ pinned?: AgentActivityRuntimeSessionPage;
133
+ sections: AgentActivityRuntimeSessionSection[];
134
+ workspaceId: string;
135
+ }
136
+ interface AgentActivityRuntimeGeneratedFile {
137
+ label: string;
138
+ path: string;
139
+ }
140
+ interface AgentActivityRuntimeGeneratedFileList {
141
+ entries: AgentActivityRuntimeGeneratedFile[];
142
+ workspaceId: string;
143
+ }
144
+ interface AgentActivityRuntimeEnsureSessionSynchronizedInput {
145
+ afterVersion?: number;
146
+ agentSessionId: string;
147
+ onError?: (error: unknown) => void;
148
+ workspaceId: string;
149
+ }
150
+ interface AgentActivityRuntimeSetSessionPinnedInput {
151
+ agentSessionId: string;
152
+ pinned: boolean;
153
+ workspaceId: string;
154
+ }
155
+ interface AgentActivityRuntimeTrackSettingsProjectChangeInput {
156
+ action: "clear" | "create_new" | "select_existing";
157
+ agentSessionId: string;
158
+ provider?: string | null;
159
+ workspaceId: string;
160
+ }
161
+ interface AgentActivityRuntimeGetComposerOptionsInput {
162
+ agentTargetId: string;
163
+ cwd?: string | null;
164
+ force?: boolean;
165
+ provider?: string;
166
+ settings?: AgentHostAgentSessionComposerSettings | null;
167
+ workspaceId: string;
168
+ }
169
+ interface AgentActivityRuntimeUpdateSessionSettingsInput {
170
+ agentSessionId: string;
171
+ settings: AgentHostAgentSessionComposerSettings;
172
+ workspaceId: string;
173
+ }
174
+ interface AgentActivityRuntimeTrackDraftComposerSettingsChangeInput {
175
+ nextSettings: AgentHostAgentSessionComposerSettings;
176
+ previousSettings: AgentHostAgentSessionComposerSettings;
177
+ provider: string;
178
+ workspaceId: string;
179
+ }
180
+ interface AgentActivityRuntimeDiagnosticInput {
181
+ details?: Record<string, unknown>;
182
+ event: string;
183
+ level?: "debug" | "info" | "warn" | "error";
184
+ source?: string;
185
+ workspaceId?: string | null;
186
+ }
187
+ interface AgentActivityRuntimeActivateSessionInputBase {
188
+ agentSessionId: string;
189
+ cwd?: string;
190
+ initialContent?: AgentActivitySendInput["content"];
191
+ /** 仅展示用首轮文本(bundle 折叠成一个 chip);initialContent 仍带展开后的文件。 */
192
+ initialDisplayPrompt?: string | null;
193
+ submitDiagnostics?: AgentActivitySendInput["submitDiagnostics"];
194
+ settings?: AgentActivitySessionSettings;
195
+ title?: string;
196
+ visible?: boolean;
197
+ workspaceId: string;
198
+ signal?: AbortSignal;
199
+ }
200
+ type AgentActivityRuntimeActivateSessionInput = (AgentActivityRuntimeActivateSessionInputBase & {
201
+ agentTargetId: string;
202
+ clientSubmitId: string;
203
+ mode: "new";
204
+ }) | (AgentActivityRuntimeActivateSessionInputBase & {
205
+ agentTargetId?: string | null;
206
+ clientSubmitId?: never;
207
+ mode: "existing";
208
+ });
209
+ interface AgentActivityRuntimeUnactivateSessionInput {
210
+ agentSessionId: string;
211
+ workspaceId: string;
212
+ }
213
+ interface AgentActivityRuntimeReadSessionAttachmentInput {
214
+ agentSessionId: string;
215
+ attachmentId: string;
216
+ workspaceId: string;
217
+ }
218
+ interface AgentActivityRuntimeReadPromptAssetInput {
219
+ agentSessionId?: string | null;
220
+ assetId?: string | null;
221
+ hostPath?: string | null;
222
+ kind?: string | null;
223
+ mimeType: string;
224
+ name?: string | null;
225
+ path?: string | null;
226
+ sha256?: string | null;
227
+ uploadStatus?: string | null;
228
+ uri?: string | null;
229
+ workspaceId: string;
230
+ }
231
+ type AgentActivityRuntimePromptContentBlock = AgentActivitySendInput["content"][number] & {
232
+ assetId?: string;
233
+ hostPath?: string;
234
+ kind?: string;
235
+ path?: string;
236
+ sizeBytes?: number;
237
+ uploadStatus?: string;
238
+ uri?: string;
239
+ };
240
+ interface AgentActivityRuntimeUploadPromptContentInput {
241
+ content: AgentActivityRuntimePromptContentBlock[];
242
+ workspaceId: string;
243
+ }
244
+ interface AgentActivityRuntimeUploadPromptContentResult {
245
+ content: AgentActivityRuntimePromptContentBlock[];
246
+ }
247
+ interface AgentActivityRuntimeSessionSectionScopeInput {
248
+ agentTargetId?: string | null;
249
+ sectionKey: string;
250
+ signal?: AbortSignal;
251
+ workspaceId: string;
252
+ }
253
+ interface AgentActivityRuntimeSessionSectionCount {
254
+ agentTargetId?: string | null;
255
+ count: number;
256
+ sectionKey: string;
257
+ workspaceId: string;
258
+ }
259
+ interface AgentActivityRuntimeDeleteSessionSectionResult {
260
+ agentTargetId?: string | null;
261
+ removedMessages: number;
262
+ removedSessionIds: string[];
263
+ removedSessions: number;
264
+ sectionKey: string;
265
+ workspaceId: string;
266
+ }
267
+ interface AgentActivityRuntimeSessionAttachment {
268
+ attachmentId: string;
269
+ mimeType: string;
270
+ name?: string;
271
+ data: string;
272
+ }
273
+ interface AgentActivityRuntimePromptAsset {
274
+ assetId?: string;
275
+ hostPath?: string;
276
+ kind?: string;
277
+ mimeType: string;
278
+ name?: string;
279
+ path: string;
280
+ uploadStatus?: string;
281
+ uri?: string;
282
+ data: string;
283
+ }
284
+ interface AgentActivityRuntime {
285
+ /**
286
+ * Stable identity of this runtime instance (e.g. a local origin vs a
287
+ * shared/room origin). The runtime owns one session engine per workspace and
288
+ * that engine verifies this origin as part of its injected identity. Runtime
289
+ * consumers resolve only through the nearest React provider; module-global
290
+ * runtime lookup and last-mounted fallback are forbidden. An absent origin
291
+ * means the canonical local origin.
292
+ */
293
+ origin?: string;
294
+ /**
295
+ * The session cwd is not resolvable on the local filesystem (e.g. a
296
+ * shared/cloud sandbox not mounted locally), so AgentGUI must not run its
297
+ * local stat-based "working directory missing" existence check — it would
298
+ * always false-positive. Absent/false (default) => local, legacy behaviour.
299
+ * Only that one guard is gated; project selection/listing is unaffected.
300
+ */
301
+ projectPathIsRemote?: boolean;
302
+ promptContentUploadSupport?: {
303
+ file?: boolean;
304
+ image?: boolean;
305
+ };
306
+ /** Set false to suppress AgentGUI diagnostics in development consoles. */
307
+ devDiagnosticConsoleSink?: boolean;
308
+ goalControl(input: AgentActivityGoalControlInput): Promise<AgentActivityGoalControlResult>;
309
+ createSession(input: AgentActivityCreateSessionInput): Promise<AgentActivitySession>;
310
+ deleteSession(input: AgentActivityDeleteSessionInput): Promise<AgentActivityDeleteSessionResult>;
311
+ activateSession(input: AgentActivityRuntimeActivateSessionInput): Promise<AgentActivityActivateSessionResult>;
312
+ getSession(workspaceId: string, agentSessionId: string): Promise<AgentActivitySession>;
313
+ getComposerOptions(input: AgentActivityRuntimeGetComposerOptionsInput): Promise<unknown>;
314
+ updateSessionSettings(input: AgentActivityRuntimeUpdateSessionSettingsInput): Promise<AgentActivityRuntimeUpdateSessionSettingsResult>;
315
+ getSnapshot(workspaceId: string): AgentActivitySnapshot;
316
+ getSessionEngine(workspaceId: string): AgentSessionEngine;
317
+ listSessionMessages(input: AgentActivityRuntimeListSessionMessagesInput): Promise<AgentActivityMessagePage>;
318
+ listAgentGeneratedFiles?(input: AgentActivityRuntimeListGeneratedFilesInput): Promise<AgentActivityRuntimeGeneratedFileList>;
319
+ listSessionsPage?(input: AgentActivityRuntimeListSessionsPageInput): Promise<AgentActivityRuntimeSessionPageResult>;
320
+ listSessionSections?(input: AgentActivityRuntimeListSessionSectionsInput): Promise<AgentActivityRuntimeSessionSectionsResult>;
321
+ listSessionSectionPage?(input: AgentActivityRuntimeListSessionSectionPageInput): Promise<AgentActivityRuntimeSessionSection>;
322
+ countSessionSection?(input: AgentActivityRuntimeSessionSectionScopeInput): Promise<AgentActivityRuntimeSessionSectionCount>;
323
+ deleteSessionSection?(input: AgentActivityRuntimeSessionSectionScopeInput): Promise<AgentActivityRuntimeDeleteSessionSectionResult>;
324
+ listPinnedSessionsPage?(input: AgentActivityRuntimeListPinnedSessionsPageInput): Promise<AgentActivityRuntimeSessionPage>;
325
+ load(workspaceId: string, signal?: AbortSignal): Promise<AgentActivitySnapshot>;
326
+ ensureSessionSynchronized?(input: AgentActivityRuntimeEnsureSessionSynchronizedInput): () => void;
327
+ sendInput(input: AgentActivitySendInput): Promise<AgentActivitySendInputResult>;
328
+ uploadPromptContent?(input: AgentActivityRuntimeUploadPromptContentInput): Promise<AgentActivityRuntimeUploadPromptContentResult>;
329
+ readSessionAttachment?(input: AgentActivityRuntimeReadSessionAttachmentInput): Promise<AgentActivityRuntimeSessionAttachment>;
330
+ readPromptAsset?(input: AgentActivityRuntimeReadPromptAssetInput): Promise<AgentActivityRuntimePromptAsset>;
331
+ renameSession(input: AgentActivityRenameSessionInput): Promise<AgentActivitySession>;
332
+ setSessionPinned(input: AgentActivityRuntimeSetSessionPinnedInput): Promise<AgentActivitySession>;
333
+ trackSettingsProjectChange?(input: AgentActivityRuntimeTrackSettingsProjectChangeInput): Promise<void>;
334
+ trackDraftComposerSettingsChange?(input: AgentActivityRuntimeTrackDraftComposerSettingsChangeInput): Promise<void>;
335
+ reportDiagnostic?(input: AgentActivityRuntimeDiagnosticInput): Promise<void> | void;
336
+ unactivateSession(input: AgentActivityRuntimeUnactivateSessionInput): Promise<AgentHostUnactivateAgentSessionResult>;
337
+ submitInteractive(input: AgentActivitySubmitInteractiveInput): Promise<AgentActivitySubmitInteractiveResult>;
338
+ subscribeSessionEvents(workspaceId: string, listener: (event: unknown) => void): () => void;
339
+ subscribe(workspaceId: string, listener: AgentActivitySnapshotListener): () => void;
340
+ }
341
+ interface AgentActivityRuntimeProviderProps extends PropsWithChildren {
342
+ runtime?: AgentActivityRuntime | null;
343
+ }
344
+ declare function AgentActivityRuntimeProvider({ children, runtime }: AgentActivityRuntimeProviderProps): JSX.Element;
345
+ declare function useAgentActivityRuntime(): AgentActivityRuntime;
346
+ declare function useOptionalAgentActivityRuntime(): AgentActivityRuntime | null;
347
+ declare function useAgentActivitySnapshot(workspaceId: string): AgentActivitySnapshot;
348
+ declare function resetAgentActivityRuntimeForTests(): void;
349
+ declare function setAgentActivityRuntimeForTests(runtime: AgentActivityRuntime | null): void;
350
+
351
+ type AgentCustomModelEnabledByProvider<TProvider extends string> = Record<TProvider, boolean>;
352
+ type AgentCustomModelByProvider<TProvider extends string> = Record<TProvider, string>;
353
+ type AgentCustomModelOptionsByProvider<TProvider extends string> = Record<TProvider, string[]>;
354
+
355
+ type FocusNodeTargetZoom = number;
356
+
357
+ declare const COMMAND_IDS: readonly ["commandCenter.toggle", "app.togglePrimarySidebar", "workspaceCanvas.createTerminal"];
358
+ type CommandId = (typeof COMMAND_IDS)[number];
359
+ type KeyChord = {
360
+ code: string;
361
+ altKey: boolean;
362
+ ctrlKey: boolean;
363
+ metaKey: boolean;
364
+ shiftKey: boolean;
365
+ };
366
+ type KeybindingOverrides = Partial<Record<CommandId, KeyChord | null>>;
367
+
368
+ declare const CANVAS_INPUT_MODES: readonly ["auto", "mouse", "trackpad"];
369
+ type CanvasInputMode = (typeof CANVAS_INPUT_MODES)[number];
370
+ declare const CANVAS_WHEEL_BEHAVIORS: readonly ["zoom", "pan"];
371
+ type CanvasWheelBehavior = (typeof CANVAS_WHEEL_BEHAVIORS)[number];
372
+ declare const CANVAS_WHEEL_ZOOM_MODIFIERS: readonly ["primary", "ctrl", "alt"];
373
+ type CanvasWheelZoomModifier = (typeof CANVAS_WHEEL_ZOOM_MODIFIERS)[number];
374
+ declare const STANDARD_WINDOW_SIZE_BUCKETS: readonly ["compact", "regular", "large"];
375
+ type StandardWindowSizeBucket = (typeof STANDARD_WINDOW_SIZE_BUCKETS)[number];
376
+
377
+ type QuickCommand = {
378
+ id: string;
379
+ title: string;
380
+ kind: "terminal";
381
+ command: string;
382
+ enabled: boolean;
383
+ pinned: boolean;
384
+ } | {
385
+ id: string;
386
+ title: string;
387
+ kind: "url";
388
+ url: string;
389
+ enabled: boolean;
390
+ pinned: boolean;
391
+ };
392
+
393
+ type QuickPhrase = {
394
+ id: string;
395
+ title: string;
396
+ content: string;
397
+ enabled: boolean;
398
+ };
399
+
400
+ type AgentEnvRow = {
401
+ id: string;
402
+ key: string;
403
+ value: string;
404
+ enabled: boolean;
405
+ };
406
+ type AgentEnvByProvider = Record<AgentProvider, AgentEnvRow[]>;
407
+
408
+ type TerminalProfileId = string | null;
409
+ interface AgentSettings {
410
+ language: UiLanguage;
411
+ uiTheme: UiTheme;
412
+ isPrimarySidebarCollapsed: boolean;
413
+ defaultProvider: AgentProvider;
414
+ agentProviderOrder: AgentProvider[];
415
+ agentFullAccess: boolean;
416
+ defaultTerminalProfileId: TerminalProfileId;
417
+ customModelEnabledByProvider: AgentCustomModelEnabledByProvider<AgentProvider>;
418
+ customModelByProvider: AgentCustomModelByProvider<AgentProvider>;
419
+ customModelOptionsByProvider: AgentCustomModelOptionsByProvider<AgentProvider>;
420
+ quickCommands: QuickCommand[];
421
+ quickPhrases: QuickPhrase[];
422
+ agentEnvByProvider: AgentEnvByProvider;
423
+ focusNodeOnClick: boolean;
424
+ focusNodeTargetZoom: FocusNodeTargetZoom;
425
+ focusNodeUseVisibleCanvasCenter: boolean;
426
+ standbyBannerEnabled: boolean;
427
+ standbyBannerShowTask: boolean;
428
+ standbyBannerShowSpace: boolean;
429
+ standbyBannerShowBranch: boolean;
430
+ disableAppShortcutsWhenTerminalFocused: boolean;
431
+ keybindings: KeybindingOverrides;
432
+ canvasInputMode: CanvasInputMode;
433
+ canvasWheelBehavior: CanvasWheelBehavior;
434
+ canvasWheelZoomModifier: CanvasWheelZoomModifier;
435
+ standardWindowSizeBucket: StandardWindowSizeBucket;
436
+ defaultTerminalWindowScalePercent: number;
437
+ terminalFontSize: number;
438
+ terminalFontFamily: string | null;
439
+ uiFontSize: number;
440
+ avoidGroupingEdits: boolean;
441
+ updatePolicy: AppUpdatePolicy;
442
+ hideWorktreeMismatchDropWarning: boolean;
443
+ }
444
+
445
+ interface AgentGUIAccountMenuState {
446
+ user: {
447
+ userId: string;
448
+ name?: string | null;
449
+ email?: string | null;
450
+ avatar?: string | null;
451
+ } | null;
452
+ membershipLabel: string;
453
+ creditsLabel: string | null;
454
+ loading: boolean;
455
+ error: string | null;
456
+ partialError?: boolean;
457
+ registrationCreditsToast?: {
458
+ id: string;
459
+ creditsLabel: string;
460
+ visible: boolean;
461
+ autoDismissMs?: number;
462
+ onDismiss(): void;
463
+ } | null;
464
+ links: {
465
+ planUrl: string;
466
+ usageUrl: string;
467
+ settingsUrl: string;
468
+ };
469
+ onOpenChange(open: boolean): void;
470
+ onLogin(): void;
471
+ onLogout?(): void;
472
+ onSettings?(): void;
473
+ onOpenExternal(url: string): void;
474
+ }
475
+
476
+ type AgentDroppedFileReferenceResolver = (files: readonly File[]) => Promise<readonly WorkspaceFileReference[]> | readonly WorkspaceFileReference[];
477
+
478
+ interface AgentProjectPathChangeMetadata {
479
+ action: WorkspaceUserProjectSelectChangeAction;
480
+ project?: WorkspaceUserProject;
481
+ }
482
+
483
+ interface WorkspaceReferencePickResult {
484
+ files: readonly WorkspaceFileReference[];
485
+ mentionItems: readonly AgentContextMentionItem[];
486
+ }
487
+
488
+ interface AgentComposerSubmitOptions {
489
+ }
490
+ interface AgentComposerProps {
491
+ workspaceId: string;
492
+ workspacePath?: string | null;
493
+ currentUserId?: string | null;
494
+ provider: string;
495
+ slashStatus?: AgentComposerSlashStatus | null;
496
+ usage?: AgentComposerUsage | null;
497
+ draftContent: AgentComposerDraft;
498
+ availableCommands: readonly AgentSessionCommand[];
499
+ hasCompactableContext?: boolean;
500
+ compactSupported?: boolean | null;
501
+ availableSkills?: readonly AgentGUIProviderSkillOption[];
502
+ disabled: boolean;
503
+ disabledReason?: string | null;
504
+ submitDisabled: boolean;
505
+ placeholder: string;
506
+ composerSettings: AgentGUIComposerSettingsVM;
507
+ queuedPrompts: readonly AgentGUIQueuedPromptVM[];
508
+ drainingQueuedPromptId: string | null;
509
+ workspaceAppIcons?: readonly AgentMessageMarkdownWorkspaceAppIcon[];
510
+ selectedAgentTarget?: AgentGUIAgentTarget | null;
511
+ agentTargets?: readonly AgentGUIAgentTarget[];
512
+ handoffAgentTargets?: readonly AgentGUIAgentTarget[];
513
+ providerSelectReadonly?: boolean;
514
+ onProviderSelect?: (input: {
515
+ provider: AgentGUIProvider;
516
+ agentTargetId?: string | null;
517
+ }) => void;
518
+ onHandoffConversation?: (target: AgentGUIAgentTarget) => void;
519
+ canQueueWhileBusy: boolean;
520
+ showStopButton: boolean;
521
+ activePrompt: AgentConversationPromptVM | null;
522
+ backgroundAgentStatusText?: string | null;
523
+ activePromptKeyboardShortcutsEnabled?: boolean;
524
+ promptTips?: readonly AgentComposerPromptTip[];
525
+ isInterrupting: boolean;
526
+ isSendingTurn: boolean;
527
+ isSubmittingPrompt: boolean;
528
+ uiLanguage?: UiLanguage;
529
+ isActive?: boolean;
530
+ previewMode?: boolean;
531
+ workspaceReferencePickerOpen?: boolean;
532
+ promptImagesSupported?: boolean;
533
+ canGoalControl?: boolean;
534
+ canUploadAttachment?: boolean;
535
+ composerFocusRequestSequence?: number | null;
536
+ layoutMode?: "dock" | "hero";
537
+ providerSelectLabel?: string;
538
+ handoffLabel?: string;
539
+ handoffMenuLabel?: string;
540
+ labels: {
541
+ send: string;
542
+ modelLabel: string;
543
+ modelSelectionLabel: string;
544
+ modelContextWindowSuffix: string;
545
+ modelTooltipVersionLabel: string;
546
+ defaultModel: string;
547
+ loadingOptions: string;
548
+ inheritedUnavailable: string;
549
+ loadingConversation: string;
550
+ reasoningLabel: string;
551
+ reasoningDegreeLabel: string;
552
+ reasoningOptionDefault: string;
553
+ reasoningOptionMinimal: string;
554
+ reasoningOptionLow: string;
555
+ reasoningOptionMedium: string;
556
+ reasoningOptionHigh: string;
557
+ reasoningOptionXHigh: string;
558
+ reasoningOptionMax: string;
559
+ reasoningOptionUltra: string;
560
+ speedLabel: string;
561
+ speedSelectionLabel: string;
562
+ speedOptionStandard: string;
563
+ speedOptionStandardDescription: string;
564
+ speedOptionFast: string;
565
+ speedOptionFastDescription: string;
566
+ permissionLabel: string;
567
+ permissionModeReadOnly: string;
568
+ permissionModeAuto: string;
569
+ permissionModeFullAccess: string;
570
+ modelDescriptions: {
571
+ frontierComplexCoding: string;
572
+ everydayCoding: string;
573
+ smallFastCostEfficient: string;
574
+ codingOptimized: string;
575
+ ultraFastCoding: string;
576
+ professionalLongRunning: string;
577
+ };
578
+ planModeLabel: string;
579
+ planModeOnLabel: string;
580
+ planModeOffLabel: string;
581
+ planUnavailable: string;
582
+ goalLabel: string;
583
+ browserUseCapabilityLabel: string;
584
+ browserUseCapabilityDescription: string;
585
+ browserUseCapabilityDescriptionAutoConnect: string;
586
+ browserUseCapabilityDescriptionIsolated: string;
587
+ browserUseCapabilitySettingsLabel: string;
588
+ browserUseCapabilitySettingsDescription: string;
589
+ capabilityInlineSettingsLabel: string;
590
+ computerUseCapabilityLabel: string;
591
+ computerUseCapabilityDescription: string;
592
+ computerUseCapabilitySetupRequiredDescription: string;
593
+ computerUseCapabilityAuthorizationRequiredDescription: string;
594
+ computerUseCapabilityAuthorizationUnknownDescription: string;
595
+ computerUseCapabilitySettingsLabel: string;
596
+ computerUseCapabilitySettingsDescription: string;
597
+ queuedLabel: string;
598
+ sendQueuedPromptNext: string;
599
+ editQueuedPrompt: string;
600
+ deleteQueuedPrompt: string;
601
+ queuedPromptMoreActions: string;
602
+ stop: string;
603
+ stopping: string;
604
+ slashCommandPalette: string;
605
+ skillPickerPalette: string;
606
+ slashPaletteCommandsGroup: string;
607
+ slashPaletteCapabilitiesGroup: string;
608
+ slashPaletteCapabilitiesLoading: string;
609
+ slashPaletteSkillsGroup: string;
610
+ slashPalettePluginsGroup: string;
611
+ slashPaletteConnectorsGroup: string;
612
+ slashPaletteMcpGroup: string;
613
+ slashCommandCompactLabel: string;
614
+ slashCommandContextLabel: string;
615
+ slashCommandFastLabel: string;
616
+ slashCommandGoalLabel: string;
617
+ slashCommandInitLabel: string;
618
+ slashCommandPlanLabel: string;
619
+ slashCommandReviewLabel: string;
620
+ slashCommandStatusLabel: string;
621
+ slashCommandUsageLabel: string;
622
+ slashCommandCompactDescription: string;
623
+ slashCommandContextDescription: string;
624
+ slashCommandFastDescription: string;
625
+ slashCommandGoalDescription: string;
626
+ slashCommandInitDescription: string;
627
+ slashCommandPlanDescription: string;
628
+ slashCommandReviewDescription: string;
629
+ slashCommandStatusDescription: string;
630
+ slashCommandUsageDescription: string;
631
+ slashStatusTitle: string;
632
+ slashStatusSession: string;
633
+ slashStatusBaseUrl: string;
634
+ slashStatusContext: string;
635
+ slashStatusLimits: string;
636
+ slashStatusClose: string;
637
+ slashStatusContextValue: (input: {
638
+ percentLeft: number;
639
+ usedTokens: string;
640
+ totalTokens: string;
641
+ }) => string;
642
+ slashStatusContextUnavailable: string;
643
+ slashStatusLimitsUnavailable: string;
644
+ usageChipLabel: (input: {
645
+ percent: number;
646
+ }) => string;
647
+ usageTooltipLabel: string;
648
+ usagePopoverTitle: string;
649
+ usageContextWindowLabel: string;
650
+ usageTokensLabel: string;
651
+ usageLimitsLabel: string;
652
+ usageCompactAction: string;
653
+ approvalLead: string;
654
+ planLead: string;
655
+ planModes: Array<{
656
+ id: string;
657
+ label: string;
658
+ description: string;
659
+ }>;
660
+ stayInPlan: string;
661
+ sendFeedback: string;
662
+ feedbackPlaceholder: string;
663
+ previousQuestion: string;
664
+ nextQuestion: string;
665
+ submitAnswers: string;
666
+ answerPlaceholder: string;
667
+ waitingForAnswer: string;
668
+ planImplementationLead: string;
669
+ planImplementationConfirm: string;
670
+ planImplementationFeedbackPlaceholder: string;
671
+ planImplementationSend: string;
672
+ planImplementationSkip: string;
673
+ fileMentionPalette: string;
674
+ fileMentionLoading: string;
675
+ fileMentionEmpty: string;
676
+ fileMentionError: string;
677
+ fileMentionTabHint: string;
678
+ fileDropHint: string;
679
+ mentionPalette: string;
680
+ removeMention: string;
681
+ addReference: string;
682
+ addContent: string;
683
+ referenceWorkspaceFiles: string;
684
+ handoffConversation: string;
685
+ handoffConversationTooltip: string;
686
+ handoffConversationMenu: string;
687
+ providerSwitchLabel: string;
688
+ projectLocked: string;
689
+ projectMissingDescription: string;
690
+ promptTipsPrefix: string;
691
+ reviewPicker: {
692
+ title: string;
693
+ targetLabel: string;
694
+ searchPlaceholder: string;
695
+ noResults: string;
696
+ uncommitted: string;
697
+ baseBranch: string;
698
+ commit: string;
699
+ custom: string;
700
+ branchLabel: string;
701
+ branchPlaceholder: string;
702
+ branchLoading: string;
703
+ branchEmpty: string;
704
+ commitPlaceholder: string;
705
+ customPlaceholder: string;
706
+ submit: string;
707
+ cancel: string;
708
+ };
709
+ };
710
+ workspaceUserProjectI18n: WorkspaceUserProjectI18nRuntime;
711
+ onDraftContentChange: (draftContent: AgentComposerDraft) => void;
712
+ onProjectPathChange?: (path: string | null, metadata?: AgentProjectPathChangeMetadata) => void;
713
+ onSettingsChange: (settings: {
714
+ model?: string | null;
715
+ reasoningEffort?: string | null;
716
+ speed?: string | null;
717
+ planMode?: boolean;
718
+ browserUse?: boolean;
719
+ computerUse?: boolean;
720
+ permissionModeId?: string | null;
721
+ }) => void;
722
+ capabilityMenuState?: AgentComposerCapabilityMenuState;
723
+ onCapabilitySettingsRequest?: (capability: AgentComposerCapabilitySettingsTarget) => void;
724
+ onSubmit: (content: AgentPromptContentBlock[], displayPrompt?: string, options?: AgentComposerSubmitOptions) => void;
725
+ onSubmitGuidance?: (content: AgentPromptContentBlock[], displayPrompt?: string) => void;
726
+ onSendQueuedPromptNext: (queuedPromptId: string) => void;
727
+ onRemoveQueuedPrompt: (queuedPromptId: string) => void;
728
+ onEditQueuedPrompt: (queuedPromptId: string) => void;
729
+ onInterruptCurrentTurn: () => void;
730
+ onPromptImagesUnsupported?: () => void;
731
+ onSubmitInteractivePrompt: (input: {
732
+ requestId: string;
733
+ action?: string;
734
+ optionId?: string;
735
+ payload?: Record<string, unknown>;
736
+ }) => void;
737
+ onLinkAction?: (action: WorkspaceLinkAction) => void;
738
+ onRequestWorkspaceReferences?: ((entity?: AgentContextMentionItem | null) => Promise<WorkspaceReferencePickResult>) | null;
739
+ resolveDroppedFileReferences?: AgentDroppedFileReferenceResolver | null;
740
+ selectProjectDirectory?: () => Promise<{
741
+ path: string;
742
+ } | null>;
743
+ onRequestGitBranches?: AgentComposerGitBranchLoader | null;
744
+ contextMentionProviders?: readonly AgentContextMentionProvider[];
745
+ }
746
+ type AgentComposerCapabilitySettingsTarget = AgentSlashCommandCapability["capability"];
747
+ interface AgentComposerCapabilityMenuState {
748
+ browserUse?: {
749
+ connectionMode?: "autoConnect" | "isolated" | null;
750
+ };
751
+ computerUse?: {
752
+ authorization?: AgentComposerComputerUseAuthorizationState | null;
753
+ installed?: boolean | null;
754
+ };
755
+ }
756
+ type AgentComposerComputerUseAuthorizationState = "authorized" | "needs-authorization" | "unknown";
757
+ interface AgentComposerGitBranches {
758
+ branches: readonly string[];
759
+ currentBranch?: string | null;
760
+ }
761
+ type AgentComposerGitBranchLoader = (input: {
762
+ agentSessionId?: string | null;
763
+ workingDirectory?: string | null;
764
+ }) => Promise<AgentComposerGitBranches>;
765
+ interface AgentComposerPromptTip {
766
+ id: string;
767
+ label: string;
768
+ prompt: string;
769
+ }
770
+ interface AgentComposerSlashStatus {
771
+ agentSessionId?: string | null;
772
+ baseUrl?: string | null;
773
+ contextWindow?: {
774
+ usedTokens?: number | null;
775
+ totalTokens?: number | null;
776
+ } | null;
777
+ limits?: readonly AgentComposerSlashStatusLimit[];
778
+ limitsLoading?: boolean;
779
+ }
780
+ interface AgentComposerSlashStatusLimit {
781
+ id: string;
782
+ label: string;
783
+ percentRemaining?: number | null;
784
+ value: string;
785
+ reset?: string | null;
786
+ }
787
+ interface AgentComposerUsage {
788
+ percentUsed: number | null;
789
+ usedTokens: number | null;
790
+ totalTokens: number | null;
791
+ }
792
+
793
+ type DotLottieElementProps = HTMLAttributes<HTMLElement> & {
794
+ autoplay?: boolean;
795
+ loop?: boolean;
796
+ src?: string;
797
+ };
798
+ declare module "react" {
799
+ namespace JSX {
800
+ interface IntrinsicElements {
801
+ "dotlottie-wc": DotLottieElementProps;
802
+ }
803
+ }
804
+ }
805
+
806
+ type AgentMentionReferenceTargetResolver = (item: AgentContextMentionItem) => ReferenceLocateTarget | null;
807
+ interface AgentWorkspaceReferenceInitialTargetInput {
808
+ activeConversation: AgentGUINodeViewModel["rail"]["activeConversation"];
809
+ composerSelectedProjectPath: string | null;
810
+ userProjects: AgentGUINodeViewModel["rail"]["userProjects"];
811
+ }
812
+ type AgentWorkspaceReferenceInitialTargetResolver = (input: AgentWorkspaceReferenceInitialTargetInput) => ReferenceLocateTarget | null;
813
+ interface AgentGUISidebarFooterContext {
814
+ currentUserId?: string | null;
815
+ activeConversation: AgentGUINodeViewModel["rail"]["activeConversation"];
816
+ }
817
+ type AgentGUISidebarFooterRenderer = (ctx: AgentGUISidebarFooterContext) => ReactNode;
818
+ /**
819
+ * Renders the provider rail body when the rail is in "exact" mode and the
820
+ * host-provided target list is empty (and not loading). Lets the host fully own
821
+ * the empty state (e.g. a "no shared agents" message or a create-agent prompt)
822
+ * instead of the library falling back to the static local catalog.
823
+ */
824
+ type AgentGUIAgentsEmptyRenderer = () => ReactNode;
825
+ interface AgentGUIProviderUnavailableStateContext {
826
+ provider: AgentGUIProvider;
827
+ providerLabel: string;
828
+ target: AgentGUIAgentTarget;
829
+ iconUrl: string;
830
+ unavailableReason: string | null;
831
+ }
832
+ /**
833
+ * Renders the main-pane unavailable state for a selected provider target that
834
+ * the host explicitly marks as disabled. This does not replace install,
835
+ * login, checking, or retry readiness gates.
836
+ */
837
+ type AgentGUIProviderUnavailableStateRenderer = (ctx: AgentGUIProviderUnavailableStateContext) => ReactNode;
838
+
839
+ interface DesktopSize {
840
+ width: number;
841
+ height: number;
842
+ bottomInset?: number;
843
+ }
844
+ /** Workspace-scoped agent probes for currently visible Agent GUI windows. */
845
+ interface WorkspaceDesktopAgentProbesState {
846
+ snapshot: AgentProbeSnapshot | null;
847
+ isLoadingAvailability: boolean;
848
+ isLoadingUsage: boolean;
849
+ /** True when the most recent usage probe fetch failed (the retained snapshot,
850
+ * if any, is stale). Lets surfaces show a refresh/retry affordance instead of
851
+ * silently displaying old numbers. Absent is treated as "no failure". */
852
+ usageLoadFailed?: boolean;
853
+ }
854
+ type WorkspaceDesktopAgentProbeDemandChange = (provider: AgentProvider | null, sourceId?: string) => void;
855
+ type WorkspaceDesktopAgentProbeRefreshRequest = (provider: AgentProvider, sourceId?: string) => void;
856
+
857
+ interface AgentGUIComposerDefaults {
858
+ model?: string | null;
859
+ permissionModeId?: string | null;
860
+ reasoningEffort?: string | null;
861
+ speed?: string | null;
862
+ }
863
+ interface AgentGUIRememberComposerDefaultsInput {
864
+ agentTargetId: string | null;
865
+ provider: AgentGUINodeData["provider"];
866
+ defaults: AgentGUIComposerDefaults | null;
867
+ }
868
+
869
+ interface AgentGUIOpenSessionRequest {
870
+ agentSessionId: string;
871
+ sequence: number;
872
+ }
873
+
874
+ interface AgentGUIPrefillPromptRequest {
875
+ agentTargetId?: string | null;
876
+ autoSubmit?: boolean;
877
+ draftPrompt: string;
878
+ provider?: AgentGUIProvider;
879
+ sequence: number;
880
+ userProjectPath?: string | null;
881
+ }
882
+
883
+ interface AgentGUINodeIdentity {
884
+ nodeId: string;
885
+ workspaceId: string;
886
+ currentUserId?: string | null;
887
+ title: string;
888
+ }
889
+ interface AgentGUINodeWorkspace {
890
+ path: string;
891
+ fileReferenceAdapter?: WorkspaceFileReferenceAdapter | null;
892
+ onRequestGitBranches?: AgentComposerGitBranchLoader | null;
893
+ selectProjectDirectory?: () => Promise<{
894
+ path: string;
895
+ } | null>;
896
+ resolveDroppedFileReferences?: AgentComposerProps["resolveDroppedFileReferences"];
897
+ referenceSourceAggregator?: ReferenceSourceAggregator | null;
898
+ resolveReferenceEntryIconUrl?: (entry: WorkspaceFileEntry) => Promise<string | null | undefined>;
899
+ resolveMentionReferenceTarget?: AgentMentionReferenceTargetResolver | null;
900
+ resolveReferenceInitialTarget?: AgentWorkspaceReferenceInitialTargetResolver | null;
901
+ onFileReferencesAdded?: (input: {
902
+ provider: AgentProvider;
903
+ references: readonly WorkspaceFileReference[];
904
+ }) => void | Promise<void>;
905
+ agentSettings: Pick<AgentSettings, "avoidGroupingEdits">;
906
+ }
907
+ interface AgentGUINodeFrameLayout {
908
+ position: Point;
909
+ width: number;
910
+ height: number;
911
+ desktopSize: DesktopSize;
912
+ isMaximized?: boolean;
913
+ isActive: boolean;
914
+ embedded?: boolean;
915
+ previewMode?: boolean;
916
+ }
917
+ interface AgentGUINodeRuntimeRequests {
918
+ composerFocusSequence?: number | null;
919
+ newConversationSequence?: number | null;
920
+ openSession?: AgentGUIOpenSessionRequest | null;
921
+ prefillPrompt?: AgentGUIPrefillPromptRequest | null;
922
+ agentProbes?: WorkspaceDesktopAgentProbesState | null;
923
+ onProbeDemandChange?: WorkspaceDesktopAgentProbeDemandChange;
924
+ onProbeRefreshRequest?: WorkspaceDesktopAgentProbeRefreshRequest;
925
+ }
926
+ interface AgentGUINodeHostCapabilities {
927
+ capabilityMenuState?: AgentComposerCapabilityMenuState;
928
+ accountMenuState?: AgentGUIAccountMenuState | null;
929
+ agentTargets?: readonly AgentGUIAgentTarget[];
930
+ agentTargetsLoading?: boolean;
931
+ providerRailAllPresentation?: AgentGUIProviderRailAllPresentation | null;
932
+ providerRailMode?: AgentGUIProviderRailMode;
933
+ comingSoonProviders?: readonly AgentGUIProvider[];
934
+ providerReadinessGates?: Partial<Record<AgentGUIProvider, AgentGUIProviderReadinessGate | null>> | null;
935
+ defaultAgentTargetId?: string | null;
936
+ providerAuthAccountLabels?: Partial<Record<string, string>>;
937
+ managedAgentsState?: AgentHostManagedAgentsState | null;
938
+ contextMentionProviders?: readonly AgentContextMentionProvider[];
939
+ workspaceAppIcons?: readonly AgentMessageMarkdownWorkspaceAppIcon[];
940
+ }
941
+ interface AgentGUINodeHostActions {
942
+ onLinkAction?: (action: WorkspaceLinkAction) => void;
943
+ onHandoffConversation?: (input: {
944
+ agentTargetId?: string | null;
945
+ draftPrompt: string;
946
+ provider: AgentProvider;
947
+ userProjectPath?: string | null;
948
+ }) => void | Promise<void>;
949
+ onCapabilitySettingsRequest?: (capability: AgentComposerCapabilitySettingsTarget) => void;
950
+ onAgentProviderLogin?: (provider: AgentProvider) => void;
951
+ onOpenConversationWindow?: (agentSessionId: string) => void;
952
+ onClose: () => void;
953
+ onResize: (frame: NodeFrame) => void;
954
+ onUpdateNode: (updater: (current: AgentGUINodeData) => AgentGUINodeData) => void;
955
+ onRememberComposerDefaults?: (input: AgentGUIRememberComposerDefaultsInput) => void | Promise<void>;
956
+ isMuted?: boolean;
957
+ onMinimize?: () => void;
958
+ onToggleMaximize?: () => void;
959
+ onShowMessage?: (message: string, tone?: "info" | "warning" | "error") => void;
960
+ }
961
+ interface AgentGUINodeRenderSlots {
962
+ providerRailEmpty?: AgentGUIAgentsEmptyRenderer;
963
+ providerUnavailableState?: AgentGUIProviderUnavailableStateRenderer;
964
+ sidebarFooter?: (ctx: AgentGUISidebarFooterContext) => ReactNode;
965
+ }
966
+ interface AgentGUINodeProps {
967
+ identity: AgentGUINodeIdentity;
968
+ workspace: AgentGUINodeWorkspace;
969
+ frame: AgentGUINodeFrameLayout;
970
+ state: AgentGUINodeData;
971
+ runtimeRequests: AgentGUINodeRuntimeRequests;
972
+ hostCapabilities: AgentGUINodeHostCapabilities;
973
+ hostActions: AgentGUINodeHostActions;
974
+ renderSlots: AgentGUINodeRenderSlots;
975
+ }
976
+
977
+ type AgentGUIPublicHostCapabilities = Omit<AgentGUINodeProps["hostCapabilities"], "agentTargets" | "agentTargetsLoading" | "providerRailAllPresentation" | "providerRailMode">;
978
+ type AgentGUIPublicRenderSlots = Omit<AgentGUINodeProps["renderSlots"], "providerRailEmpty">;
979
+ interface AgentGUIProps extends Omit<AgentGUINodeProps, "hostCapabilities" | "renderSlots"> {
980
+ agentDirectory: AgentGUIAgentDirectorySnapshot;
981
+ allAgentsPresentation?: AgentGUIAllAgentsPresentation | null;
982
+ renderAgentsEmpty?: AgentGUIAgentsEmptyRenderer;
983
+ agentActivityRuntime: AgentActivityRuntime;
984
+ agentHostApi?: AgentHostInputApi | null;
985
+ i18n?: I18nRuntime<string> | null;
986
+ locale?: AgentGuiI18nLocale;
987
+ hostCapabilities: AgentGUIPublicHostCapabilities;
988
+ renderSlots: AgentGUIPublicRenderSlots;
989
+ }
990
+ declare const AgentGUI: react.NamedExoticComponent<AgentGUIProps>;
991
+
992
+ export { type AgentActivityRuntime as A, type AgentActivityRuntimeDeleteSessionSectionResult as a, type AgentActivityRuntimeListSessionMessagesInput as b, type AgentActivityRuntimePromptContentBlock as c, AgentActivityRuntimeProvider as d, type AgentActivityRuntimeProviderProps as e, type AgentActivityRuntimeSessionSectionCount as f, type AgentActivityRuntimeSessionSectionScopeInput as g, type AgentActivityRuntimeSetSessionPinnedInput as h, type AgentActivityRuntimeUpdateSessionSettingsInput as i, type AgentActivityRuntimeUpdateSessionSettingsResult as j, type AgentActivityRuntimeUploadPromptContentInput as k, type AgentActivityRuntimeUploadPromptContentResult as l, AgentGUI as m, type AgentGUIAccountMenuState as n, type AgentGUIAgentsEmptyRenderer as o, type AgentGUIProps as p, type AgentGUIProviderUnavailableStateContext as q, type AgentGUIProviderUnavailableStateRenderer as r, type AgentGUISidebarFooterContext as s, type AgentGUISidebarFooterRenderer as t, resetAgentActivityRuntimeForTests as u, setAgentActivityRuntimeForTests as v, useAgentActivityRuntime as w, useAgentActivitySnapshot as x, useOptionalAgentActivityRuntime as y };