@tutti-os/agent-gui 0.0.132 → 0.0.133

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 (54) hide show
  1. package/README.md +5 -2
  2. package/dist/agent-conversation/index.d.ts +4 -6
  3. package/dist/agent-conversation/index.js +3 -3
  4. package/dist/agent-env/index.d.ts +10 -27
  5. package/dist/agent-env/index.js +14 -290
  6. package/dist/agent-env/index.js.map +1 -1
  7. package/dist/agent-gui.d.ts +1090 -20
  8. package/dist/agent-gui.js +7 -7
  9. package/dist/agent-message-center/index.d.ts +42 -7
  10. package/dist/agent-message-center/index.js +2 -2
  11. package/dist/{agentConversationVM-BD0-gg6C.d.ts → agentConversationVM-DWEy7jzx.d.ts} +41 -2
  12. package/dist/{agentGuiNodeTypes-5TL1hyCN.d.ts → agentGuiNodeTypes-B57MfwVo.d.ts} +5 -22
  13. package/dist/agents.d.ts +1 -1
  14. package/dist/agents.js +1 -1
  15. package/dist/app/renderer/agentactivity.css +1 -0
  16. package/dist/app/renderer/assets/icons/@-lined.svg +1 -8
  17. package/dist/{chunk-JZS4SWFJ.js → chunk-A6NSHCRP.js} +8 -7
  18. package/dist/chunk-A6NSHCRP.js.map +1 -0
  19. package/dist/chunk-FM42UN2J.js +462 -0
  20. package/dist/chunk-FM42UN2J.js.map +1 -0
  21. package/dist/{chunk-PQJXWXTS.js → chunk-GBBNYGL7.js} +2 -2
  22. package/dist/{chunk-GCQYN7BR.js → chunk-HCRROERX.js} +2 -2
  23. package/dist/{chunk-G75CPIVV.js → chunk-IZ626FDO.js} +563 -444
  24. package/dist/chunk-IZ626FDO.js.map +1 -0
  25. package/dist/{chunk-YWHGCKMT.js → chunk-N62NVPHT.js} +7 -7
  26. package/dist/chunk-N62NVPHT.js.map +1 -0
  27. package/dist/{chunk-T2NICA5D.js → chunk-VS5BRBY6.js} +4 -1
  28. package/dist/chunk-VS5BRBY6.js.map +1 -0
  29. package/dist/{contribution-yc4CGJmy.d.ts → contribution-BbW-kkpi.d.ts} +52 -1
  30. package/dist/custom-mention.d.ts +4 -2
  31. package/dist/i18n/index.d.ts +11 -6
  32. package/dist/index.d.ts +7982 -33
  33. package/dist/index.js +7 -7
  34. package/dist/runtime-Dwf44VKc.d.ts +7 -0
  35. package/dist/{types-BicfRVrV.d.ts → types-BeAVr4of.d.ts} +3 -5
  36. package/dist/workbench/contribution.d.ts +1 -2
  37. package/dist/workbench/contribution.js +2 -2
  38. package/dist/workbench/index.d.ts +1 -2
  39. package/dist/workbench/index.js +2 -2
  40. package/dist/workspace-agent-generated-files.d.ts +12 -1
  41. package/package.json +13 -13
  42. package/dist/AgentGUI-DxypmD7b.d.ts +0 -1080
  43. package/dist/agentPlanPromptDispatch-C7cCMjve.d.ts +0 -37
  44. package/dist/chunk-G75CPIVV.js.map +0 -1
  45. package/dist/chunk-JZS4SWFJ.js.map +0 -1
  46. package/dist/chunk-T2NICA5D.js.map +0 -1
  47. package/dist/chunk-VMQNG2KI.js +0 -178
  48. package/dist/chunk-VMQNG2KI.js.map +0 -1
  49. package/dist/chunk-YWHGCKMT.js.map +0 -1
  50. package/dist/pastedTextKinds-D-XuInaS.d.ts +0 -4
  51. package/dist/runtime-BBNdWgDU.d.ts +0 -10
  52. package/dist/workspaceAgentActivityListTypes-DZfS_HgG.d.ts +0 -48
  53. /package/dist/{chunk-PQJXWXTS.js.map → chunk-GBBNYGL7.js.map} +0 -0
  54. /package/dist/{chunk-GCQYN7BR.js.map → chunk-HCRROERX.js.map} +0 -0
@@ -1,24 +1,1094 @@
1
- import 'react';
2
- import '@tutti-os/ui-i18n-runtime';
3
- export { n as AgentGUI, w as AgentGUIProps } from './AgentGUI-DxypmD7b.js';
4
- import './agentGuiNodeTypes-5TL1hyCN.js';
5
- export { m as AgentGUIHomeSuggestionId } from './types-BicfRVrV.js';
1
+ import * as react from 'react';
2
+ import { 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, AgentActivitySubmitSettingsPatch } from '@tutti-os/agent-activity-core';
5
+ import { k as AgentHostAgentSessionComposerSettings, o as AgentHostUnactivateAgentSessionResult, b as AgentGUIAgentTarget, f as AgentGUIProvider, p as AgentPromptContentBlock, e as AgentGUINodeData, P as Point, g as AgentGUIProviderRailAllPresentation, h as AgentGUIProviderRailMode, i as AgentGUIProviderReadinessGate, d as AgentGUIHomeSuggestionId, N as NodeFrame, a as AgentGUIAgentDirectorySnapshot, c as AgentGUIAllAgentsPresentation } from './types-BeAVr4of.js';
6
+ import { A as AgentComposerDraft, j as AgentSessionCommand, d as AgentGUIProviderSkillOption, b as AgentGUIComposerSettingsVM, e as AgentGUIQueueStatus, f as AgentGUIQueuedPromptVM, h as AgentMessageMarkdownWorkspaceAppIcon, k as AgentSlashCommandCapability, c as AgentGUINodeViewModel, i as AgentProbeSnapshot, a as AgentComposerDraftFile, g as AgentHostInputApi } from './agentGuiNodeTypes-B57MfwVo.js';
7
+ import { WorkspaceFileReference, ReferenceLocateTarget, WorkspaceFileReferenceAdapter, ReferenceProvenanceCatalog } from '@tutti-os/workspace-file-reference/contracts';
6
8
  export { ReferenceProvenanceCatalog as AgentGUIReferenceProvenanceFilterCatalog } from '@tutti-os/workspace-file-reference/contracts';
7
- import './runtime-BBNdWgDU.js';
8
- import '@tutti-os/agent-activity-core';
9
- import './workspace-query-cache.js';
10
- import './agentFileMentionContracts-CWAeuL7S.js';
11
- import '@tutti-os/workspace-file-manager/services';
12
- import '@tutti-os/workspace-file-reference/core';
13
- import './agentConversationVM-BD0-gg6C.js';
9
+ import { A as AgentContextMentionItem } from './agentFileMentionContracts-CWAeuL7S.js';
10
+ import { WorkspaceFileEntry } from '@tutti-os/workspace-file-manager/services';
11
+ import { ReferenceSourceAggregator } from '@tutti-os/workspace-file-reference/core';
12
+ import { b as AgentConversationPromptVM, g as WorkspaceLinkAction } from './agentConversationVM-DWEy7jzx.js';
13
+ import { WorkspaceUserProjectI18nRuntime } from '@tutti-os/workspace-user-project/i18n';
14
+ import { AgentContextMentionProvider } from './context-mention-provider.js';
15
+ import { WorkspaceUserProjectSelectChangeAction } from '@tutti-os/workspace-user-project/ui';
16
+ import { WorkspaceUserProject } from '@tutti-os/workspace-user-project/contracts';
17
+ import { ReferenceProvenanceFilterSnapshot, ReferenceProvenanceFilterController } from '@tutti-os/workspace-file-reference/react';
18
+ import { RichTextMentionService } from '@tutti-os/ui-rich-text/service';
19
+ import { A as AgentGuiI18nLocale } from './runtime-Dwf44VKc.js';
14
20
  import '@tutti-os/workspace-issue-manager/core';
15
- import './workspaceAgentActivityListTypes-DZfS_HgG.js';
16
- import '@tutti-os/workspace-user-project/i18n';
17
- import './context-mention-provider.js';
18
21
  import '@tutti-os/ui-rich-text/types';
19
22
  import '@tutti-os/workspace-external-core/contracts';
20
- import '@tutti-os/workspace-user-project/ui';
21
- import '@tutti-os/workspace-user-project/contracts';
22
- import '@tutti-os/workspace-file-reference/react';
23
- import '@tutti-os/ui-rich-text/service';
24
- import './pastedTextKinds-D-XuInaS.js';
23
+
24
+ declare const APP_UPDATE_POLICIES: readonly ["off", "prompt", "auto"];
25
+ type AppUpdatePolicy = (typeof APP_UPDATE_POLICIES)[number];
26
+
27
+ interface WorkspaceQueryCacheEntry<TValue> {
28
+ readonly resolvedAtUnixMs: number;
29
+ readonly stale: boolean;
30
+ readonly value: TValue;
31
+ readonly version: number;
32
+ }
33
+ interface WorkspaceQueryCache<TValue> {
34
+ invalidate(key?: string): void;
35
+ read(key: string): WorkspaceQueryCacheEntry<TValue> | null;
36
+ request(key: string, load: () => Promise<TValue>): Promise<WorkspaceQueryCacheEntry<TValue>>;
37
+ write(key: string, value: TValue): WorkspaceQueryCacheEntry<TValue>;
38
+ }
39
+
40
+ interface AgentActivityRuntimeUpdateSessionSettingsResult {
41
+ agentSessionId: string;
42
+ settings: AgentHostAgentSessionComposerSettings;
43
+ session: AgentActivitySession;
44
+ }
45
+ interface AgentActivityRuntimeListSessionMessagesInput {
46
+ afterVersion?: number;
47
+ beforeVersion?: number;
48
+ cache?: boolean;
49
+ agentSessionId: string;
50
+ limit?: number;
51
+ order?: AgentActivityMessageOrder;
52
+ signal?: AbortSignal;
53
+ workspaceId: string;
54
+ }
55
+ interface AgentActivityRuntimeListGeneratedFilesInput {
56
+ agentTargetIds?: readonly string[];
57
+ cursor?: string;
58
+ limit?: number;
59
+ query?: string;
60
+ sectionKey: string;
61
+ signal?: AbortSignal;
62
+ workspaceId: string;
63
+ }
64
+ interface AgentActivityRuntimeListSessionsPageInput {
65
+ agentTargetId?: string | null;
66
+ cursor?: string;
67
+ limit?: number;
68
+ searchQuery?: string;
69
+ signal?: AbortSignal;
70
+ workspaceId: string;
71
+ }
72
+ interface AgentActivityRuntimeSessionPageResult {
73
+ hasMore: boolean;
74
+ nextCursor?: string;
75
+ sessions: AgentActivitySession[];
76
+ workspaceId: string;
77
+ }
78
+ interface AgentActivityRuntimeListSessionSectionsInput {
79
+ agentTargetId?: string | null;
80
+ limitPerSection?: number;
81
+ signal?: AbortSignal;
82
+ workspaceId: string;
83
+ }
84
+ interface AgentActivityRuntimeListSessionSectionPageInput {
85
+ agentTargetId?: string | null;
86
+ cursor?: string;
87
+ limit?: number;
88
+ sectionKey: string;
89
+ signal?: AbortSignal;
90
+ workspaceId: string;
91
+ }
92
+ interface AgentActivityRuntimeListPinnedSessionsPageInput {
93
+ agentTargetId?: string | null;
94
+ cursor?: string;
95
+ limit?: number;
96
+ signal?: AbortSignal;
97
+ workspaceId: string;
98
+ }
99
+ interface AgentActivityRuntimeUserProject {
100
+ createdAtUnixMs: number;
101
+ id: string;
102
+ label: string;
103
+ lastUsedAtUnixMs?: number;
104
+ path: string;
105
+ pinnedAtUnixMs: number;
106
+ sectionKey: string;
107
+ updatedAtUnixMs: number;
108
+ }
109
+ interface AgentActivityRuntimeSessionSection {
110
+ kind: "conversations" | "project";
111
+ sectionKey: string;
112
+ userProject?: AgentActivityRuntimeUserProject;
113
+ sessions: AgentActivitySession[];
114
+ hasMore: boolean;
115
+ totalCount: number;
116
+ nextCursor?: string;
117
+ }
118
+ interface AgentActivityRuntimeSessionPage {
119
+ sessions: AgentActivitySession[];
120
+ hasMore: boolean;
121
+ totalCount: number;
122
+ nextCursor?: string;
123
+ }
124
+ interface AgentActivityRuntimeSessionSectionsResult {
125
+ pinned?: AgentActivityRuntimeSessionPage;
126
+ sections: AgentActivityRuntimeSessionSection[];
127
+ workspaceId: string;
128
+ }
129
+ interface AgentActivityRuntimeGeneratedFile {
130
+ label: string;
131
+ path: string;
132
+ }
133
+ interface AgentActivityRuntimeGeneratedFileList {
134
+ entries: AgentActivityRuntimeGeneratedFile[];
135
+ hasMore?: boolean;
136
+ nextCursor?: string;
137
+ workspaceId: string;
138
+ }
139
+ interface AgentActivityRuntimeEnsureSessionSynchronizedInput {
140
+ afterVersion?: number;
141
+ agentSessionId: string;
142
+ onError?: (error: unknown) => void;
143
+ workspaceId: string;
144
+ }
145
+ interface AgentActivityRuntimeSetSessionPinnedInput {
146
+ agentSessionId: string;
147
+ pinned: boolean;
148
+ workspaceId: string;
149
+ }
150
+ interface AgentActivityRuntimeTrackSettingsProjectChangeInput {
151
+ action: "clear" | "create_new" | "select_existing";
152
+ agentSessionId: string;
153
+ provider?: string | null;
154
+ workspaceId: string;
155
+ }
156
+ interface AgentActivityRuntimeGetComposerOptionsInput {
157
+ agentTargetId: string;
158
+ cwd?: string | null;
159
+ force?: boolean;
160
+ provider?: string;
161
+ settings?: AgentHostAgentSessionComposerSettings | null;
162
+ workspaceId: string;
163
+ }
164
+ interface AgentActivityRuntimeUpdateSessionSettingsInput {
165
+ agentSessionId: string;
166
+ settings: AgentHostAgentSessionComposerSettings;
167
+ workspaceId: string;
168
+ }
169
+ interface AgentActivityRuntimeTrackDraftComposerSettingsChangeInput {
170
+ nextSettings: AgentHostAgentSessionComposerSettings;
171
+ previousSettings: AgentHostAgentSessionComposerSettings;
172
+ provider: string;
173
+ workspaceId: string;
174
+ }
175
+ interface AgentActivityRuntimeDiagnosticInput {
176
+ details?: Record<string, unknown>;
177
+ event: string;
178
+ level?: "debug" | "info" | "warn" | "error";
179
+ source?: string;
180
+ workspaceId?: string | null;
181
+ }
182
+ interface AgentActivityRuntimeActivateSessionInputBase {
183
+ agentSessionId: string;
184
+ cwd?: string;
185
+ initialContent?: AgentActivitySendInput["content"];
186
+ /** 仅展示用首轮文本(bundle 折叠成一个 chip);initialContent 仍带展开后的文件。 */
187
+ initialDisplayPrompt?: string | null;
188
+ submitDiagnostics?: AgentActivitySendInput["submitDiagnostics"];
189
+ settings?: AgentActivitySessionSettings;
190
+ title?: string;
191
+ visible?: boolean;
192
+ workspaceId: string;
193
+ signal?: AbortSignal;
194
+ }
195
+ type AgentActivityRuntimeActivateSessionInput = (AgentActivityRuntimeActivateSessionInputBase & {
196
+ agentTargetId: string;
197
+ clientSubmitId: string;
198
+ mode: "new";
199
+ }) | (AgentActivityRuntimeActivateSessionInputBase & {
200
+ agentTargetId?: string | null;
201
+ clientSubmitId?: never;
202
+ mode: "existing";
203
+ });
204
+ interface AgentActivityRuntimeUnactivateSessionInput {
205
+ agentSessionId: string;
206
+ workspaceId: string;
207
+ }
208
+ interface AgentActivityRuntimeReadSessionAttachmentInput {
209
+ agentSessionId: string;
210
+ attachmentId: string;
211
+ workspaceId: string;
212
+ }
213
+ interface AgentActivityRuntimeReadPromptAssetInput {
214
+ agentSessionId?: string | null;
215
+ assetId?: string | null;
216
+ hostPath?: string | null;
217
+ kind?: string | null;
218
+ mimeType: string;
219
+ name?: string | null;
220
+ path?: string | null;
221
+ sha256?: string | null;
222
+ uploadStatus?: string | null;
223
+ uri?: string | null;
224
+ workspaceId: string;
225
+ }
226
+ type AgentActivityRuntimePromptContentBlock = AgentActivitySendInput["content"][number] & {
227
+ assetId?: string;
228
+ hostPath?: string;
229
+ kind?: string;
230
+ path?: string;
231
+ sizeBytes?: number;
232
+ uploadStatus?: string;
233
+ uri?: string;
234
+ };
235
+ interface AgentActivityRuntimeUploadPromptContentInput {
236
+ content: AgentActivityRuntimePromptContentBlock[];
237
+ workspaceId: string;
238
+ }
239
+ interface AgentActivityRuntimeUploadPromptContentResult {
240
+ content: AgentActivityRuntimePromptContentBlock[];
241
+ }
242
+ /**
243
+ * Dedicated host boundary for turning an in-memory text paste into a local
244
+ * prompt asset. The runtime owns persistence and returns a sendable host path;
245
+ * AgentGUI must not infer this capability from generic file-upload support.
246
+ */
247
+ interface AgentActivityRuntimeStagePastedTextInput {
248
+ name: string;
249
+ text: string;
250
+ workspaceId: string;
251
+ }
252
+ interface AgentActivityRuntimeStagePastedTextResult {
253
+ name: string;
254
+ path: string;
255
+ sizeBytes: number;
256
+ }
257
+ interface AgentActivityRuntimeSessionSectionScopeInput {
258
+ agentTargetId?: string | null;
259
+ excludePinned?: boolean;
260
+ sectionKey: string;
261
+ signal?: AbortSignal;
262
+ workspaceId: string;
263
+ }
264
+ interface AgentActivityRuntimeSessionSectionDeletionCandidates {
265
+ agentTargetId?: string | null;
266
+ excludePinned: boolean;
267
+ sectionKey: string;
268
+ sessionIds: string[];
269
+ workspaceId: string;
270
+ }
271
+ interface AgentActivityRuntimeDeleteSessionsBatchInput {
272
+ sessionIds: string[];
273
+ signal?: AbortSignal;
274
+ workspaceId: string;
275
+ }
276
+ interface AgentActivityRuntimeDeleteSessionsBatchResult {
277
+ removedMessages: number;
278
+ removedSessionIds: string[];
279
+ removedSessions: number;
280
+ }
281
+ interface AgentActivityRuntimeSessionAttachment {
282
+ attachmentId: string;
283
+ mimeType: string;
284
+ name?: string;
285
+ data: string;
286
+ }
287
+ interface AgentActivityRuntimePromptAsset {
288
+ assetId?: string;
289
+ hostPath?: string;
290
+ kind?: string;
291
+ mimeType: string;
292
+ name?: string;
293
+ path: string;
294
+ uploadStatus?: string;
295
+ uri?: string;
296
+ data: string;
297
+ }
298
+ interface AgentActivityRuntime {
299
+ /**
300
+ * Stable identity of this runtime instance (e.g. a local origin vs a
301
+ * shared/room origin). The runtime owns one session engine per workspace and
302
+ * that engine verifies this origin as part of its injected identity. Runtime
303
+ * consumers resolve only through the nearest React provider; module-global
304
+ * runtime lookup and last-mounted fallback are forbidden. An absent origin
305
+ * means the canonical local origin.
306
+ */
307
+ origin?: string;
308
+ /**
309
+ * The session cwd is not resolvable on the local filesystem (e.g. a
310
+ * shared/cloud sandbox not mounted locally), so AgentGUI must not run its
311
+ * local stat-based "working directory missing" existence check — it would
312
+ * always false-positive. Absent/false (default) => local, legacy behaviour.
313
+ * Only that one guard is gated; project selection/listing is unaffected.
314
+ */
315
+ projectPathIsRemote?: boolean;
316
+ promptContentUploadSupport?: {
317
+ file?: boolean;
318
+ image?: boolean;
319
+ };
320
+ /** Set false to suppress AgentGUI diagnostics in development consoles. */
321
+ devDiagnosticConsoleSink?: boolean;
322
+ goalControl(input: AgentActivityGoalControlInput): Promise<AgentActivityGoalControlResult>;
323
+ createSession(input: AgentActivityCreateSessionInput): Promise<AgentActivitySession>;
324
+ deleteSession(input: AgentActivityDeleteSessionInput): Promise<AgentActivityDeleteSessionResult>;
325
+ activateSession(input: AgentActivityRuntimeActivateSessionInput): Promise<AgentActivityActivateSessionResult>;
326
+ getSession(workspaceId: string, agentSessionId: string): Promise<AgentActivitySession>;
327
+ getComposerOptions(input: AgentActivityRuntimeGetComposerOptionsInput): Promise<unknown>;
328
+ updateSessionSettings(input: AgentActivityRuntimeUpdateSessionSettingsInput): Promise<AgentActivityRuntimeUpdateSessionSettingsResult>;
329
+ getSnapshot(workspaceId: string): AgentActivitySnapshot;
330
+ getSessionEngine(workspaceId: string): AgentSessionEngine;
331
+ getSessionSectionsQueryCache?(workspaceId: string): WorkspaceQueryCache<unknown>;
332
+ listSessionMessages(input: AgentActivityRuntimeListSessionMessagesInput): Promise<AgentActivityMessagePage>;
333
+ listAgentGeneratedFiles?(input: AgentActivityRuntimeListGeneratedFilesInput): Promise<AgentActivityRuntimeGeneratedFileList>;
334
+ listSessionsPage?(input: AgentActivityRuntimeListSessionsPageInput): Promise<AgentActivityRuntimeSessionPageResult>;
335
+ listSessionSections?(input: AgentActivityRuntimeListSessionSectionsInput): Promise<AgentActivityRuntimeSessionSectionsResult>;
336
+ listSessionSectionPage?(input: AgentActivityRuntimeListSessionSectionPageInput): Promise<AgentActivityRuntimeSessionSection>;
337
+ listSessionSectionDeletionCandidates?(input: AgentActivityRuntimeSessionSectionScopeInput): Promise<AgentActivityRuntimeSessionSectionDeletionCandidates>;
338
+ deleteSessionsBatch?(input: AgentActivityRuntimeDeleteSessionsBatchInput): Promise<AgentActivityRuntimeDeleteSessionsBatchResult>;
339
+ listPinnedSessionsPage?(input: AgentActivityRuntimeListPinnedSessionsPageInput): Promise<AgentActivityRuntimeSessionPage>;
340
+ load(workspaceId: string, signal?: AbortSignal): Promise<AgentActivitySnapshot>;
341
+ ensureSessionSynchronized?(input: AgentActivityRuntimeEnsureSessionSynchronizedInput): () => void;
342
+ sendInput(input: AgentActivitySendInput): Promise<AgentActivitySendInputResult>;
343
+ uploadPromptContent?(input: AgentActivityRuntimeUploadPromptContentInput): Promise<AgentActivityRuntimeUploadPromptContentResult>;
344
+ stagePastedText?(input: AgentActivityRuntimeStagePastedTextInput): Promise<AgentActivityRuntimeStagePastedTextResult>;
345
+ readSessionAttachment?(input: AgentActivityRuntimeReadSessionAttachmentInput): Promise<AgentActivityRuntimeSessionAttachment>;
346
+ readPromptAsset?(input: AgentActivityRuntimeReadPromptAssetInput): Promise<AgentActivityRuntimePromptAsset>;
347
+ renameSession(input: AgentActivityRenameSessionInput): Promise<AgentActivitySession>;
348
+ setSessionPinned(input: AgentActivityRuntimeSetSessionPinnedInput): Promise<AgentActivitySession>;
349
+ trackSettingsProjectChange?(input: AgentActivityRuntimeTrackSettingsProjectChangeInput): Promise<void>;
350
+ trackDraftComposerSettingsChange?(input: AgentActivityRuntimeTrackDraftComposerSettingsChangeInput): Promise<void>;
351
+ reportDiagnostic?(input: AgentActivityRuntimeDiagnosticInput): Promise<void> | void;
352
+ unactivateSession(input: AgentActivityRuntimeUnactivateSessionInput): Promise<AgentHostUnactivateAgentSessionResult>;
353
+ submitInteractive(input: AgentActivitySubmitInteractiveInput): Promise<AgentActivitySubmitInteractiveResult>;
354
+ subscribeSessionEvents(workspaceId: string, listener: (event: unknown) => void): () => void;
355
+ subscribe(workspaceId: string, listener: AgentActivitySnapshotListener): () => void;
356
+ }
357
+
358
+ type AgentCustomModelEnabledByProvider<TProvider extends string> = Record<TProvider, boolean>;
359
+ type AgentCustomModelByProvider<TProvider extends string> = Record<TProvider, string>;
360
+ type AgentCustomModelOptionsByProvider<TProvider extends string> = Record<TProvider, string[]>;
361
+
362
+ declare const AGENT_PROVIDERS: readonly ["claude-code", "codex", "cursor", "tutti-agent", "nexight", "opencode", "openclaw", "hermes"];
363
+ type AgentProvider = (typeof AGENT_PROVIDERS)[number];
364
+
365
+ type FocusNodeTargetZoom = number;
366
+
367
+ declare const UI_LANGUAGES: readonly ["en", "zh-CN"];
368
+ type UiLanguage = (typeof UI_LANGUAGES)[number];
369
+ declare const UI_THEMES: readonly ["system", "light", "dark"];
370
+ type UiTheme = (typeof UI_THEMES)[number];
371
+
372
+ declare const COMMAND_IDS: readonly ["commandCenter.toggle", "app.togglePrimarySidebar", "workspaceCanvas.createTerminal"];
373
+ type CommandId = (typeof COMMAND_IDS)[number];
374
+ type KeyChord = {
375
+ code: string;
376
+ altKey: boolean;
377
+ ctrlKey: boolean;
378
+ metaKey: boolean;
379
+ shiftKey: boolean;
380
+ };
381
+ type KeybindingOverrides = Partial<Record<CommandId, KeyChord | null>>;
382
+
383
+ declare const CANVAS_INPUT_MODES: readonly ["auto", "mouse", "trackpad"];
384
+ type CanvasInputMode = (typeof CANVAS_INPUT_MODES)[number];
385
+ declare const CANVAS_WHEEL_BEHAVIORS: readonly ["zoom", "pan"];
386
+ type CanvasWheelBehavior = (typeof CANVAS_WHEEL_BEHAVIORS)[number];
387
+ declare const CANVAS_WHEEL_ZOOM_MODIFIERS: readonly ["primary", "ctrl", "alt"];
388
+ type CanvasWheelZoomModifier = (typeof CANVAS_WHEEL_ZOOM_MODIFIERS)[number];
389
+ declare const STANDARD_WINDOW_SIZE_BUCKETS: readonly ["compact", "regular", "large"];
390
+ type StandardWindowSizeBucket = (typeof STANDARD_WINDOW_SIZE_BUCKETS)[number];
391
+
392
+ type QuickCommand = {
393
+ id: string;
394
+ title: string;
395
+ kind: "terminal";
396
+ command: string;
397
+ enabled: boolean;
398
+ pinned: boolean;
399
+ } | {
400
+ id: string;
401
+ title: string;
402
+ kind: "url";
403
+ url: string;
404
+ enabled: boolean;
405
+ pinned: boolean;
406
+ };
407
+
408
+ type QuickPhrase = {
409
+ id: string;
410
+ title: string;
411
+ content: string;
412
+ enabled: boolean;
413
+ };
414
+
415
+ type AgentEnvRow = {
416
+ id: string;
417
+ key: string;
418
+ value: string;
419
+ enabled: boolean;
420
+ };
421
+ type AgentEnvByProvider = Record<AgentProvider, AgentEnvRow[]>;
422
+
423
+ type TerminalProfileId = string | null;
424
+ interface AgentSettings {
425
+ language: UiLanguage;
426
+ uiTheme: UiTheme;
427
+ isPrimarySidebarCollapsed: boolean;
428
+ defaultProvider: AgentProvider;
429
+ agentProviderOrder: AgentProvider[];
430
+ agentFullAccess: boolean;
431
+ defaultTerminalProfileId: TerminalProfileId;
432
+ customModelEnabledByProvider: AgentCustomModelEnabledByProvider<AgentProvider>;
433
+ customModelByProvider: AgentCustomModelByProvider<AgentProvider>;
434
+ customModelOptionsByProvider: AgentCustomModelOptionsByProvider<AgentProvider>;
435
+ quickCommands: QuickCommand[];
436
+ quickPhrases: QuickPhrase[];
437
+ agentEnvByProvider: AgentEnvByProvider;
438
+ focusNodeOnClick: boolean;
439
+ focusNodeTargetZoom: FocusNodeTargetZoom;
440
+ focusNodeUseVisibleCanvasCenter: boolean;
441
+ standbyBannerEnabled: boolean;
442
+ standbyBannerShowTask: boolean;
443
+ standbyBannerShowSpace: boolean;
444
+ standbyBannerShowBranch: boolean;
445
+ disableAppShortcutsWhenTerminalFocused: boolean;
446
+ keybindings: KeybindingOverrides;
447
+ canvasInputMode: CanvasInputMode;
448
+ canvasWheelBehavior: CanvasWheelBehavior;
449
+ canvasWheelZoomModifier: CanvasWheelZoomModifier;
450
+ standardWindowSizeBucket: StandardWindowSizeBucket;
451
+ defaultTerminalWindowScalePercent: number;
452
+ terminalFontSize: number;
453
+ terminalFontFamily: string | null;
454
+ uiFontSize: number;
455
+ avoidGroupingEdits: boolean;
456
+ updatePolicy: AppUpdatePolicy;
457
+ hideWorktreeMismatchDropWarning: boolean;
458
+ }
459
+
460
+ interface AgentGUIAccountMenuState {
461
+ user: {
462
+ userId: string;
463
+ name?: string | null;
464
+ email?: string | null;
465
+ avatar?: string | null;
466
+ } | null;
467
+ membershipLabel: string;
468
+ creditsLabel: string | null;
469
+ loading: boolean;
470
+ error: string | null;
471
+ partialError?: boolean;
472
+ registrationCreditsToast?: {
473
+ id: string;
474
+ creditsLabel: string;
475
+ visible: boolean;
476
+ autoDismissMs?: number;
477
+ onDismiss(): void;
478
+ } | null;
479
+ links: {
480
+ planUrl: string;
481
+ usageUrl: string;
482
+ settingsUrl: string;
483
+ };
484
+ onOpenChange(open: boolean): void;
485
+ onLogin(): void;
486
+ onLogout?(): void;
487
+ onSettings?(): void;
488
+ onOpenExternal(url: string): void;
489
+ }
490
+
491
+ type AgentDroppedFileReferenceResolver = (files: readonly File[]) => Promise<readonly WorkspaceFileReference[]> | readonly WorkspaceFileReference[];
492
+
493
+ interface AgentProjectPathChangeMetadata {
494
+ action: WorkspaceUserProjectSelectChangeAction;
495
+ project?: WorkspaceUserProject;
496
+ }
497
+
498
+ type AgentGUIComposerFocusMethod = "keyboard" | "pointer" | "programmatic";
499
+ type AgentGUIComposerContentType = "image" | "large_text" | "text";
500
+ interface AgentGUIEngagementContext {
501
+ agentSessionId: string | null;
502
+ agentTargetId: string | null;
503
+ composerReady: boolean;
504
+ conversationState: "existing" | "new";
505
+ provider: string;
506
+ }
507
+ interface AgentGUIEngagementEventBase extends AgentGUIEngagementContext {
508
+ panelVisitId: string;
509
+ }
510
+ type AgentGUIEngagementEvent = (AgentGUIEngagementEventBase & {
511
+ type: "panel_exposed";
512
+ }) | (AgentGUIEngagementEventBase & {
513
+ type: "composer_focused";
514
+ focusMethod: AgentGUIComposerFocusMethod;
515
+ }) | (AgentGUIEngagementEventBase & {
516
+ type: "composer_content_entered";
517
+ contentType: AgentGUIComposerContentType;
518
+ hadPrefill: boolean;
519
+ });
520
+ interface AgentGUIComposerEngagement {
521
+ contentEntered(input: {
522
+ contentType: AgentGUIComposerContentType;
523
+ hadPrefill: boolean;
524
+ }): void;
525
+ focused(focusMethod: AgentGUIComposerFocusMethod): void;
526
+ }
527
+ type AgentGUIEngagementEventSink = (event: AgentGUIEngagementEvent) => Promise<void> | void;
528
+
529
+ interface WorkspaceReferencePickResult {
530
+ files: readonly WorkspaceFileReference[];
531
+ mentionItems: readonly AgentContextMentionItem[];
532
+ }
533
+
534
+ interface AgentComposerReferenceProvenanceFilter {
535
+ snapshot: ReferenceProvenanceFilterSnapshot;
536
+ controller: Pick<ReferenceProvenanceFilterController, "reset" | "toggle" | "toggleAll">;
537
+ }
538
+ interface AgentComposerSubmitOptions {
539
+ requiredSettingsPatch?: AgentActivitySubmitSettingsPatch;
540
+ }
541
+ interface AgentComposerProps {
542
+ workspaceId: string;
543
+ workspacePath?: string | null;
544
+ currentUserId?: string | null;
545
+ provider: string;
546
+ slashStatus?: AgentComposerSlashStatus | null;
547
+ usage?: AgentComposerUsage | null;
548
+ draftContent: AgentComposerDraft;
549
+ engagement?: AgentGUIComposerEngagement;
550
+ /** Stable project/session owner for async draft attachment work. */
551
+ draftScopeKey?: string;
552
+ availableCommands: readonly AgentSessionCommand[];
553
+ hasCompactableContext?: boolean;
554
+ compactSupported?: boolean | null;
555
+ availableSkills?: readonly AgentGUIProviderSkillOption[];
556
+ disabled: boolean;
557
+ disabledReason?: string | null;
558
+ submitDisabled: boolean;
559
+ placeholder: string;
560
+ composerSettings: AgentGUIComposerSettingsVM;
561
+ queueStatus?: AgentGUIQueueStatus;
562
+ queuedPrompts: readonly AgentGUIQueuedPromptVM[];
563
+ drainingQueuedPromptId: string | null;
564
+ workspaceAppIcons?: readonly AgentMessageMarkdownWorkspaceAppIcon[];
565
+ selectedAgentTarget?: AgentGUIAgentTarget | null;
566
+ agentTargets?: readonly AgentGUIAgentTarget[];
567
+ handoffAgentTargets?: readonly AgentGUIAgentTarget[];
568
+ providerSelectReadonly?: boolean;
569
+ onProviderSelect?: (input: {
570
+ provider: AgentGUIProvider;
571
+ agentTargetId?: string | null;
572
+ }) => void;
573
+ onHandoffConversation?: (target: AgentGUIAgentTarget) => void;
574
+ canQueueWhileBusy: boolean;
575
+ showStopButton: boolean;
576
+ activePrompt: AgentConversationPromptVM | null;
577
+ activePromptKeyboardShortcutsEnabled?: boolean;
578
+ promptTips?: readonly AgentComposerPromptTip[];
579
+ isInterrupting: boolean;
580
+ isSendingTurn: boolean;
581
+ isSubmittingPrompt: boolean;
582
+ uiLanguage?: UiLanguage;
583
+ isActive?: boolean;
584
+ previewMode?: boolean;
585
+ workspaceReferencePickerOpen?: boolean;
586
+ promptImagesSupported?: boolean;
587
+ canGoalControl?: boolean;
588
+ canUploadAttachment?: boolean;
589
+ composerFocusRequestSequence?: number | null;
590
+ layoutMode?: "dock" | "hero";
591
+ providerSelectLabel?: string;
592
+ handoffLabel?: string;
593
+ handoffMenuLabel?: string;
594
+ labels: {
595
+ send: string;
596
+ modelLabel: string;
597
+ modelSelectionLabel: string;
598
+ modelContextWindowSuffix: string;
599
+ modelTooltipVersionLabel: string;
600
+ defaultModel: string;
601
+ loadingOptions: string;
602
+ inheritedUnavailable: string;
603
+ loadingConversation: string;
604
+ reasoningLabel: string;
605
+ reasoningDegreeLabel: string;
606
+ reasoningOptionDefault: string;
607
+ reasoningOptionMinimal: string;
608
+ reasoningOptionLow: string;
609
+ reasoningOptionMedium: string;
610
+ reasoningOptionHigh: string;
611
+ reasoningOptionXHigh: string;
612
+ reasoningOptionMax: string;
613
+ reasoningOptionUltra: string;
614
+ speedLabel: string;
615
+ speedSelectionLabel: string;
616
+ speedOptionStandard: string;
617
+ speedOptionStandardDescription: string;
618
+ speedOptionFast: string;
619
+ speedOptionFastDescription: string;
620
+ permissionLabel: string;
621
+ permissionModeReadOnly: string;
622
+ permissionModeAuto: string;
623
+ permissionModeFullAccess: string;
624
+ permissionModeChangeUnavailableDuringTurn: string;
625
+ modelDescriptions: {
626
+ frontierComplexCoding: string;
627
+ everydayCoding: string;
628
+ smallFastCostEfficient: string;
629
+ codingOptimized: string;
630
+ ultraFastCoding: string;
631
+ professionalLongRunning: string;
632
+ };
633
+ planModeLabel: string;
634
+ planModeOnLabel: string;
635
+ planModeOffLabel: string;
636
+ planUnavailable: string;
637
+ goalLabel: string;
638
+ browserUseCapabilityLabel: string;
639
+ browserUseCapabilityDescription: string;
640
+ browserUseCapabilityDescriptionAutoConnect: string;
641
+ browserUseCapabilityDescriptionIsolated: string;
642
+ browserUseCapabilitySettingsLabel: string;
643
+ browserUseCapabilitySettingsDescription: string;
644
+ capabilityInlineSettingsLabel: string;
645
+ computerUseCapabilityLabel: string;
646
+ computerUseCapabilityDescription: string;
647
+ computerUseCapabilitySetupRequiredDescription: string;
648
+ computerUseCapabilityAuthorizationRequiredDescription: string;
649
+ computerUseCapabilityAuthorizationUnknownDescription: string;
650
+ computerUseCapabilitySettingsLabel: string;
651
+ computerUseCapabilitySettingsDescription: string;
652
+ queuedLabel: string;
653
+ queuePausedByUserLabel: string;
654
+ sendQueuedPromptNext: string;
655
+ editQueuedPrompt: string;
656
+ deleteQueuedPrompt: string;
657
+ queuedPromptMoreActions: string;
658
+ stop: string;
659
+ stopping: string;
660
+ slashCommandPalette: string;
661
+ skillPickerPalette: string;
662
+ slashPaletteCommandsGroup: string;
663
+ slashPaletteCapabilitiesGroup: string;
664
+ slashPaletteCapabilitiesLoading: string;
665
+ slashPaletteSkillsGroup: string;
666
+ slashPalettePluginsGroup: string;
667
+ slashPaletteConnectorsGroup: string;
668
+ slashPaletteMcpGroup: string;
669
+ slashCommandCompactLabel: string;
670
+ slashCommandContextLabel: string;
671
+ slashCommandFastLabel: string;
672
+ slashCommandGoalLabel: string;
673
+ slashCommandInitLabel: string;
674
+ slashCommandPlanLabel: string;
675
+ slashCommandReviewLabel: string;
676
+ slashCommandStatusLabel: string;
677
+ slashCommandUsageLabel: string;
678
+ slashCommandCompactDescription: string;
679
+ slashCommandContextDescription: string;
680
+ slashCommandFastDescription: string;
681
+ slashCommandGoalDescription: string;
682
+ slashCommandInitDescription: string;
683
+ slashCommandPlanDescription: string;
684
+ slashCommandReviewDescription: string;
685
+ slashCommandStatusDescription: string;
686
+ slashCommandUsageDescription: string;
687
+ slashStatusTitle: string;
688
+ slashStatusSession: string;
689
+ slashStatusBaseUrl: string;
690
+ slashStatusContext: string;
691
+ slashStatusLimits: string;
692
+ slashStatusClose: string;
693
+ slashStatusContextValue: (input: {
694
+ percentLeft: number;
695
+ usedTokens: string;
696
+ totalTokens: string;
697
+ }) => string;
698
+ slashStatusContextUnavailable: string;
699
+ slashStatusLimitsUnavailable: string;
700
+ usageChipLabel: (input: {
701
+ percent: number;
702
+ }) => string;
703
+ usageTooltipLabel: string;
704
+ usagePopoverTitle: string;
705
+ usageContextWindowLabel: string;
706
+ usageTokensLabel: string;
707
+ usageLimitsLabel: string;
708
+ usageCompactAction: string;
709
+ approvalLead: string;
710
+ fileChangeApprovalLead: string;
711
+ planLead: string;
712
+ planModes: Array<{
713
+ id: string;
714
+ label: string;
715
+ description: string;
716
+ }>;
717
+ stayInPlan: string;
718
+ sendFeedback: string;
719
+ feedbackPlaceholder: string;
720
+ previousQuestion: string;
721
+ nextQuestion: string;
722
+ submitAnswers: string;
723
+ answerPlaceholder: string;
724
+ waitingForAnswer: string;
725
+ planImplementationLead: string;
726
+ planImplementationConfirm: string;
727
+ planImplementationFeedbackPlaceholder: string;
728
+ planImplementationSend: string;
729
+ planImplementationSkip: string;
730
+ fileMentionPalette: string;
731
+ fileMentionLoading: string;
732
+ fileMentionEmpty: string;
733
+ fileMentionError: string;
734
+ fileMentionTabHint: string;
735
+ fileDropHint: string;
736
+ mentionPalette: string;
737
+ removeMention: string;
738
+ addReference: string;
739
+ addContent: string;
740
+ referenceWorkspaceFiles: string;
741
+ handoffConversation: string;
742
+ handoffConversationTooltip: string;
743
+ handoffConversationMenu: string;
744
+ handoffTargetSelf: string;
745
+ handoffTargetShared: string;
746
+ providerSwitchLabel: string;
747
+ projectLocked: string;
748
+ projectMissingDescription: string;
749
+ promptTipsPrefix: string;
750
+ reviewPicker: {
751
+ title: string;
752
+ targetLabel: string;
753
+ searchPlaceholder: string;
754
+ noResults: string;
755
+ uncommitted: string;
756
+ baseBranch: string;
757
+ commit: string;
758
+ custom: string;
759
+ branchLabel: string;
760
+ branchPlaceholder: string;
761
+ branchLoading: string;
762
+ branchEmpty: string;
763
+ commitPlaceholder: string;
764
+ customPlaceholder: string;
765
+ submit: string;
766
+ cancel: string;
767
+ };
768
+ };
769
+ workspaceUserProjectI18n: WorkspaceUserProjectI18nRuntime;
770
+ onDraftContentChange: (draftContent: AgentComposerDraft, sourceScopeKey?: string) => void;
771
+ onProjectPathChange?: (path: string | null, metadata?: AgentProjectPathChangeMetadata) => void;
772
+ onSettingsChange: (settings: {
773
+ model?: string | null;
774
+ reasoningEffort?: string | null;
775
+ speed?: string | null;
776
+ planMode?: boolean;
777
+ browserUse?: boolean;
778
+ computerUse?: boolean;
779
+ permissionModeId?: string | null;
780
+ }) => void;
781
+ capabilityMenuState?: AgentComposerCapabilityMenuState;
782
+ onCapabilitySettingsRequest?: (capability: AgentComposerCapabilitySettingsTarget) => void;
783
+ onSlashStatusOpen?: () => void;
784
+ onSubmit: (content: AgentPromptContentBlock[], displayPrompt?: string, options?: AgentComposerSubmitOptions) => void;
785
+ onSubmitGuidance?: (content: AgentPromptContentBlock[], displayPrompt?: string) => void;
786
+ onSendQueuedPromptNext: (queuedPromptId: string) => void;
787
+ onRemoveQueuedPrompt: (queuedPromptId: string) => void;
788
+ onEditQueuedPrompt: (queuedPromptId: string) => void;
789
+ onInterruptCurrentTurn: () => void;
790
+ onPromptImagesUnsupported?: () => void;
791
+ onSubmitInteractivePrompt: (input: {
792
+ requestId: string;
793
+ action?: string;
794
+ optionId?: string;
795
+ payload?: Record<string, unknown>;
796
+ }) => void;
797
+ onLinkAction?: (action: WorkspaceLinkAction) => void;
798
+ onRequestWorkspaceReferences?: ((entity?: AgentContextMentionItem | null) => Promise<WorkspaceReferencePickResult>) | null;
799
+ resolveDroppedFileReferences?: AgentDroppedFileReferenceResolver | null;
800
+ selectProjectDirectory?: () => Promise<{
801
+ path: string;
802
+ } | null>;
803
+ onRequestGitBranches?: AgentComposerGitBranchLoader | null;
804
+ contextMentionProviders?: readonly AgentContextMentionProvider[];
805
+ referenceProvenanceFilter?: AgentComposerReferenceProvenanceFilter | null;
806
+ }
807
+ type AgentComposerCapabilitySettingsTarget = AgentSlashCommandCapability["capability"];
808
+ interface AgentComposerCapabilityMenuState {
809
+ browserUse?: {
810
+ connectionMode?: "autoConnect" | "isolated" | null;
811
+ };
812
+ computerUse?: {
813
+ authorization?: AgentComposerComputerUseAuthorizationState | null;
814
+ installed?: boolean | null;
815
+ };
816
+ }
817
+ type AgentComposerComputerUseAuthorizationState = "authorized" | "needs-authorization" | "unknown";
818
+ interface AgentComposerGitBranches {
819
+ branches: readonly string[];
820
+ currentBranch?: string | null;
821
+ }
822
+ type AgentComposerGitBranchLoader = (input: {
823
+ agentSessionId?: string | null;
824
+ workingDirectory?: string | null;
825
+ }) => Promise<AgentComposerGitBranches>;
826
+ interface AgentComposerPromptTip {
827
+ id: string;
828
+ label: string;
829
+ prompt: string;
830
+ }
831
+ interface AgentComposerSlashStatus {
832
+ agentSessionId?: string | null;
833
+ baseUrl?: string | null;
834
+ contextWindow?: {
835
+ usedTokens?: number | null;
836
+ totalTokens?: number | null;
837
+ } | null;
838
+ limits?: readonly AgentComposerSlashStatusLimit[];
839
+ limitsLoading?: boolean;
840
+ limitsUnavailable?: boolean;
841
+ }
842
+ interface AgentComposerSlashStatusLimit {
843
+ id: string;
844
+ label: string;
845
+ percentRemaining?: number | null;
846
+ value: string;
847
+ reset?: string | null;
848
+ }
849
+ interface AgentComposerUsage {
850
+ percentUsed: number | null;
851
+ usedTokens: number | null;
852
+ totalTokens: number | null;
853
+ }
854
+
855
+ /** Setup section requested by an AgentGUI remediation action. */
856
+ type AgentEnvPanelFocus = "detect" | "install" | "repair" | "upgrade" | "auth" | "network" | "registry";
857
+ interface OpenAgentEnvPanelInput {
858
+ provider?: string | null;
859
+ focus?: AgentEnvPanelFocus | null;
860
+ }
861
+
862
+ type AgentMentionReferenceTargetResolver = (item: AgentContextMentionItem) => ReferenceLocateTarget | null;
863
+ interface AgentWorkspaceReferenceInitialTargetInput {
864
+ activeConversation: AgentGUINodeViewModel["rail"]["activeConversation"];
865
+ composerSelectedProjectPath: string | null;
866
+ userProjects: AgentGUINodeViewModel["rail"]["userProjects"];
867
+ }
868
+ type AgentWorkspaceReferenceInitialTargetResolver = (input: AgentWorkspaceReferenceInitialTargetInput) => ReferenceLocateTarget | null;
869
+ interface AgentGUISidebarFooterContext {
870
+ currentUserId?: string | null;
871
+ activeConversation: AgentGUINodeViewModel["rail"]["activeConversation"];
872
+ }
873
+ /**
874
+ * Renders the provider rail body when the rail is in "exact" mode and the
875
+ * host-provided target list is empty (and not loading). Lets the host fully own
876
+ * the empty state (e.g. a "no shared agents" message or a create-agent prompt)
877
+ * instead of the library falling back to the static local catalog.
878
+ */
879
+ type AgentGUIAgentsEmptyRenderer = () => ReactNode;
880
+ interface AgentGUIProviderUnavailableStateContext {
881
+ provider: AgentGUIProvider;
882
+ providerLabel: string;
883
+ target: AgentGUIAgentTarget;
884
+ iconUrl: string;
885
+ unavailableReason: string | null;
886
+ }
887
+ /**
888
+ * Renders the main-pane unavailable state for a selected provider target that
889
+ * the host explicitly marks as disabled. This does not replace install,
890
+ * login, checking, or retry readiness gates.
891
+ */
892
+ type AgentGUIProviderUnavailableStateRenderer = (ctx: AgentGUIProviderUnavailableStateContext) => ReactNode;
893
+
894
+ interface DesktopSize {
895
+ width: number;
896
+ height: number;
897
+ bottomInset?: number;
898
+ }
899
+ /** Workspace-scoped agent probes for currently visible Agent GUI windows. */
900
+ interface WorkspaceDesktopAgentProbesState {
901
+ snapshot: AgentProbeSnapshot | null;
902
+ isLoadingAvailability: boolean;
903
+ isLoadingUsage: boolean;
904
+ /** True when the most recent usage probe fetch failed (the retained snapshot,
905
+ * if any, is stale). Lets surfaces show a refresh/retry affordance instead of
906
+ * silently displaying old numbers. Absent is treated as "no failure". */
907
+ usageLoadFailed?: boolean;
908
+ }
909
+ type WorkspaceDesktopAgentProbeDemandChange = (provider: AgentProvider | null, sourceId?: string) => void;
910
+ type WorkspaceDesktopAgentProbeRefreshRequest = (provider: AgentProvider, sourceId?: string) => void;
911
+
912
+ interface AgentGUIComposerDefaults {
913
+ model?: string | null;
914
+ permissionModeId?: string | null;
915
+ reasoningEffort?: string | null;
916
+ speed?: string | null;
917
+ }
918
+ interface AgentGUIRememberComposerDefaultsInput {
919
+ agentTargetId: string | null;
920
+ provider: AgentGUINodeData["provider"];
921
+ defaults: AgentGUIComposerDefaults | null;
922
+ }
923
+ declare const rememberComposerDefaultsFields: readonly ["model", "permissionModeId", "reasoningEffort", "speed"];
924
+ type AgentGUIComposerDefaultsField = (typeof rememberComposerDefaultsFields)[number];
925
+ interface AgentGUIRememberComposerDefaultsResult {
926
+ acknowledgedFields: AgentGUIComposerDefaultsField[];
927
+ supersededFields: AgentGUIComposerDefaultsField[];
928
+ }
929
+
930
+ interface AgentGUIOpenSessionRequest {
931
+ agentSessionId: string;
932
+ sequence: number;
933
+ }
934
+
935
+ type AgentGUIComposerAppendRequest = {
936
+ files: readonly AgentComposerDraftFile[];
937
+ prompt?: string;
938
+ sequence: number;
939
+ } | {
940
+ files?: never;
941
+ prompt: string;
942
+ sequence: number;
943
+ };
944
+
945
+ interface AgentGUIPrefillPromptRequest {
946
+ agentTargetId?: string | null;
947
+ autoSubmit?: boolean;
948
+ draftPrompt: string;
949
+ provider?: AgentGUIProvider;
950
+ sequence: number;
951
+ userProjectPath?: string | null;
952
+ }
953
+
954
+ interface AgentGUINodeIdentity {
955
+ nodeId: string;
956
+ workspaceId: string;
957
+ currentUserId?: string | null;
958
+ title: string;
959
+ }
960
+ interface AgentGUINodeWorkspace {
961
+ path: string;
962
+ fileReferenceAdapter?: WorkspaceFileReferenceAdapter | null;
963
+ onRequestGitBranches?: AgentComposerGitBranchLoader | null;
964
+ selectProjectDirectory?: () => Promise<{
965
+ path: string;
966
+ } | null>;
967
+ resolveDroppedFileReferences?: AgentComposerProps["resolveDroppedFileReferences"];
968
+ referenceSourceAggregator?: ReferenceSourceAggregator | null;
969
+ resolveReferenceEntryIconUrl?: (entry: WorkspaceFileEntry) => Promise<string | null | undefined>;
970
+ resolveMentionReferenceTarget?: AgentMentionReferenceTargetResolver | null;
971
+ resolveReferenceInitialTarget?: AgentWorkspaceReferenceInitialTargetResolver | null;
972
+ onFileReferencesAdded?: (input: {
973
+ provider: AgentGUIProvider;
974
+ references: readonly WorkspaceFileReference[];
975
+ }) => void | Promise<void>;
976
+ agentSettings: Pick<AgentSettings, "avoidGroupingEdits">;
977
+ }
978
+ interface AgentGUINodeFrameLayout {
979
+ position: Point;
980
+ width: number;
981
+ height: number;
982
+ desktopSize: DesktopSize;
983
+ isMaximized?: boolean;
984
+ isActive: boolean;
985
+ /** Host-projected presentation visibility. Independent from node focus. */
986
+ isVisible?: boolean;
987
+ embedded?: boolean;
988
+ previewMode?: boolean;
989
+ /**
990
+ * Container width at or below which the conversation rail auto-hides.
991
+ * Hosts with roomier layouts (e.g. the standalone agent window) raise this
992
+ * above the default AGENT_GUI_AUTO_COLLAPSE_WIDTH_PX.
993
+ */
994
+ conversationRailAutoCollapseWidthPx?: number | null;
995
+ }
996
+ interface AgentGUINodeRuntimeRequests {
997
+ composerAppend?: AgentGUIComposerAppendRequest | null;
998
+ composerFocusSequence?: number | null;
999
+ newConversationSequence?: number | null;
1000
+ openSession?: AgentGUIOpenSessionRequest | null;
1001
+ prefillPrompt?: AgentGUIPrefillPromptRequest | null;
1002
+ agentProbes?: WorkspaceDesktopAgentProbesState | null;
1003
+ onProbeDemandChange?: WorkspaceDesktopAgentProbeDemandChange;
1004
+ onProbeRefreshRequest?: WorkspaceDesktopAgentProbeRefreshRequest;
1005
+ }
1006
+ interface AgentGUINodeHostCapabilities {
1007
+ /**
1008
+ * Complete host-owned catalog for reference provenance filtering. Supplying
1009
+ * it explicitly opts the host into the dimensions declared by the catalog.
1010
+ * Omit it to keep filtering disabled unless the legacy Agent-only flag is
1011
+ * enabled.
1012
+ */
1013
+ referenceProvenanceFilterCatalog?: ReferenceProvenanceCatalog | null;
1014
+ /** Legacy Tutti Agent-only opt-in. Prefer an explicit catalog in new hosts. */
1015
+ referenceProvenanceFilterEnabled?: boolean;
1016
+ capabilityMenuState?: AgentComposerCapabilityMenuState;
1017
+ accountMenuState?: AgentGUIAccountMenuState | null;
1018
+ agentTargets?: readonly AgentGUIAgentTarget[];
1019
+ agentTargetsLoading?: boolean;
1020
+ /** Launch-only targets for active-conversation handoff. */
1021
+ handoffAgentTargets?: readonly AgentGUIAgentTarget[];
1022
+ handoffAgentTargetsLoading?: boolean;
1023
+ providerRailAllPresentation?: AgentGUIProviderRailAllPresentation | null;
1024
+ providerRailMode?: AgentGUIProviderRailMode;
1025
+ comingSoonProviders?: readonly AgentGUIProvider[];
1026
+ providerReadinessGates?: Partial<Record<AgentGUIProvider, AgentGUIProviderReadinessGate | null>> | null;
1027
+ defaultAgentTargetId?: string | null;
1028
+ providerAuthAccountLabels?: Partial<Record<string, string>>;
1029
+ contextMentionProviders?: readonly AgentContextMentionProvider[];
1030
+ mentionService?: RichTextMentionService;
1031
+ workspaceAppIcons?: readonly AgentMessageMarkdownWorkspaceAppIcon[];
1032
+ disabledHomeSuggestions?: readonly AgentGUIHomeSuggestionId[];
1033
+ }
1034
+ interface AgentGUINodeHostActions {
1035
+ onLinkAction?: (action: WorkspaceLinkAction) => void;
1036
+ onHandoffConversation?: (input: {
1037
+ agentTargetId?: string | null;
1038
+ draftPrompt: string;
1039
+ provider: AgentGUIProvider;
1040
+ userProjectPath?: string | null;
1041
+ }) => void | Promise<void>;
1042
+ onCapabilitySettingsRequest?: (capability: AgentComposerCapabilitySettingsTarget) => void;
1043
+ onAgentProviderLogin?: (provider: AgentGUIProvider) => void;
1044
+ onAgentEnvPanelOpen?: (input?: OpenAgentEnvPanelInput) => void;
1045
+ onOpenConversationWindow?: (agentSessionId: string) => void;
1046
+ onClose: () => void;
1047
+ onResize: (frame: NodeFrame) => void;
1048
+ onUpdateNode: (updater: (current: AgentGUINodeData) => AgentGUINodeData) => void;
1049
+ onRememberComposerDefaults?: (input: AgentGUIRememberComposerDefaultsInput) => void | Promise<AgentGUIRememberComposerDefaultsResult>;
1050
+ isMuted?: boolean;
1051
+ onMinimize?: () => void;
1052
+ onToggleMaximize?: () => void;
1053
+ onShowMessage?: (message: string, tone?: "info" | "warning" | "error") => void;
1054
+ onEngagementEvent?: AgentGUIEngagementEventSink;
1055
+ }
1056
+ interface AgentGUINodeRenderSlots {
1057
+ providerRailEmpty?: AgentGUIAgentsEmptyRenderer;
1058
+ providerUnavailableState?: AgentGUIProviderUnavailableStateRenderer;
1059
+ sidebarFooter?: (ctx: AgentGUISidebarFooterContext) => ReactNode;
1060
+ }
1061
+ interface AgentGUINodeProps {
1062
+ identity: AgentGUINodeIdentity;
1063
+ workspace: AgentGUINodeWorkspace;
1064
+ frame: AgentGUINodeFrameLayout;
1065
+ state: AgentGUINodeData;
1066
+ runtimeRequests: AgentGUINodeRuntimeRequests;
1067
+ hostCapabilities: AgentGUINodeHostCapabilities;
1068
+ hostActions: AgentGUINodeHostActions;
1069
+ renderSlots: AgentGUINodeRenderSlots;
1070
+ }
1071
+
1072
+ type AgentGUIPublicHostCapabilities = Omit<AgentGUINodeProps["hostCapabilities"], "agentTargets" | "agentTargetsLoading" | "handoffAgentTargets" | "handoffAgentTargetsLoading" | "providerRailAllPresentation" | "providerRailMode" | "disabledHomeSuggestions">;
1073
+ type AgentGUIPublicRenderSlots = Omit<AgentGUINodeProps["renderSlots"], "providerRailEmpty">;
1074
+ interface AgentGUIProps extends Omit<AgentGUINodeProps, "hostCapabilities" | "renderSlots"> {
1075
+ agentDirectory: AgentGUIAgentDirectorySnapshot;
1076
+ /**
1077
+ * Host-owned launch catalog for conversation handoff. When omitted, handoff
1078
+ * uses `agentDirectory`, preserving the single-runtime host contract.
1079
+ */
1080
+ handoffAgentDirectory?: AgentGUIAgentDirectorySnapshot;
1081
+ allAgentsPresentation?: AgentGUIAllAgentsPresentation | null;
1082
+ renderAgentsEmpty?: AgentGUIAgentsEmptyRenderer;
1083
+ agentActivityRuntime: AgentActivityRuntime;
1084
+ agentHostApi?: AgentHostInputApi | null;
1085
+ /** Starter entries to hide below the empty new-session composer. */
1086
+ disabled?: readonly AgentGUIHomeSuggestionId[];
1087
+ i18n?: I18nRuntime<string> | null;
1088
+ locale?: AgentGuiI18nLocale;
1089
+ hostCapabilities: AgentGUIPublicHostCapabilities;
1090
+ renderSlots: AgentGUIPublicRenderSlots;
1091
+ }
1092
+ declare const AgentGUI: react.NamedExoticComponent<AgentGUIProps>;
1093
+
1094
+ export { AgentGUI, AgentGUIHomeSuggestionId, type AgentGUIProps };