@tutti-os/agent-gui 0.0.23 → 0.0.25

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 (30) hide show
  1. package/dist/AgentMessageMarkdown-BnpM_dCB.d.ts +658 -0
  2. package/dist/agent-conversation/index.d.ts +5 -14
  3. package/dist/agent-conversation/index.js +3 -3
  4. package/dist/agent-message-center/index.d.ts +2 -2
  5. package/dist/agent-message-center/index.js +3 -3
  6. package/dist/{agentConversationVM-CGYkOuOP.d.ts → agentConversationVM-BvlmCNOm.d.ts} +2 -2
  7. package/dist/app/renderer/agentactivity.css +21 -28
  8. package/dist/{chunk-MQAGIHYM.js → chunk-3QDLVPMJ.js} +36 -4
  9. package/dist/chunk-3QDLVPMJ.js.map +1 -0
  10. package/dist/{chunk-3LVEFR2N.js → chunk-5PIXN7UF.js} +15 -14
  11. package/dist/{chunk-3LVEFR2N.js.map → chunk-5PIXN7UF.js.map} +1 -1
  12. package/dist/{chunk-ZC4E2QJU.js → chunk-OSBLVO4N.js} +3 -3
  13. package/dist/{chunk-7Q3JKSQ5.js → chunk-VNRRXUI3.js} +125 -44
  14. package/dist/chunk-VNRRXUI3.js.map +1 -0
  15. package/dist/{chunk-CCI6EK5W.js → chunk-YHRJD6HA.js} +1 -1
  16. package/dist/chunk-YHRJD6HA.js.map +1 -0
  17. package/dist/context-mention-palette/index.d.ts +1 -3
  18. package/dist/context-mention-palette/index.js +2 -2
  19. package/dist/index.d.ts +29 -417
  20. package/dist/index.js +473 -130
  21. package/dist/index.js.map +1 -1
  22. package/dist/plan-decision-ops.d.ts +2 -2
  23. package/dist/workspace-agent-generated-files.d.ts +1 -1
  24. package/dist/{workspaceAgentActivityListViewModel-BK_J3aNX.d.ts → workspaceAgentActivityListViewModel-jRF8cP37.d.ts} +2 -2
  25. package/package.json +12 -12
  26. package/dist/AgentMessageMarkdown-DeYPURtF.d.ts +0 -7
  27. package/dist/chunk-7Q3JKSQ5.js.map +0 -1
  28. package/dist/chunk-CCI6EK5W.js.map +0 -1
  29. package/dist/chunk-MQAGIHYM.js.map +0 -1
  30. /package/dist/{chunk-ZC4E2QJU.js.map → chunk-OSBLVO4N.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot, AgentActivityCancelSessionInput, AgentActivityCancelSessionResult, AgentActivityCreateSessionInput, AgentActivitySession, AgentActivityDeleteSessionInput, AgentActivityDeleteSessionResult, AgentActivitySendInput, AgentActivityMessageOrder, AgentActivityMessagePage, AgentActivitySubmitInteractiveInput, AgentActivitySnapshotListener } from '@tutti-os/agent-activity-core';
2
2
  export { AgentActivityAdapter, AgentActivityController, AgentActivityMessage, AgentActivityNeedsAttentionItem, AgentActivitySnapshot, selectNeedsAttentionCount, selectNeedsAttentionItems } from '@tutti-os/agent-activity-core';
3
- import { m as WorkspaceAgentActivityListViewModel, g as AgentHostWorkspaceAgentSession, f as AgentHostWorkspaceAgentMessage, l as AgentHostWorkspaceAgentSnapshot, B as BuildWorkspaceAgentActivityListOptions, d as AgentHostRuntimeOpenclawGatewayWarmupResult, A as AgentHostBatchUserInfoInput, a as AgentHostBatchUserInfoResult, b as AgentHostDeleteWorkspaceAgentSessionInput, k as AgentHostWorkspaceAgentSessionSummaryInput, j as AgentHostWorkspaceAgentSessionSummary, e as AgentHostWorkspaceAgentListInput, i as AgentHostWorkspaceAgentSessionMessagesInput, h as AgentHostWorkspaceAgentSessionMessages, c as AgentHostManagedAgentsState } from './workspaceAgentActivityListViewModel-BK_J3aNX.js';
3
+ import { m as WorkspaceAgentActivityListViewModel, g as AgentHostWorkspaceAgentSession, f as AgentHostWorkspaceAgentMessage, l as AgentHostWorkspaceAgentSnapshot, B as BuildWorkspaceAgentActivityListOptions, d as AgentHostRuntimeOpenclawGatewayWarmupResult, c as AgentHostManagedAgentsState } from './workspaceAgentActivityListViewModel-jRF8cP37.js';
4
4
  import * as react from 'react';
5
5
  import { PropsWithChildren, JSX } from 'react';
6
6
  import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
7
- import { WorkspaceUserProjectService } from '@tutti-os/workspace-user-project/contracts';
7
+ import { d as AgentHostAgentSessionComposerSettings, c as AgentHostActivateAgentSessionResult, j as AgentHostUpdateAgentSessionSettingsResult, e as AgentHostAgentSessionState, i as AgentHostUnactivateAgentSessionResult, n as AgentProvider, m as AgentProbeSnapshot, a as AgentGUINodeViewModel, A as AgentGUINodeData, P as Point, N as NodeFrame, k as AgentMessageMarkdownWorkspaceAppIcon, g as AgentHostInputApi } from './AgentMessageMarkdown-BnpM_dCB.js';
8
+ export { f as AgentHostApi, h as AgentHostRuntimeApi, l as AgentProbeProvider, o as AgentProviderProbeListInput, p as AgentProviderProbeListResult, q as AgentUsageQuota, r as AgentUsageSnapshot } from './AgentMessageMarkdown-BnpM_dCB.js';
8
9
  import { ReferenceLocateTarget, WorkspaceFileReferenceAdapter, WorkspaceFileReference } from '@tutti-os/workspace-file-reference/contracts';
9
10
  import { ReferenceSourceAggregator } from '@tutti-os/workspace-file-reference/core';
10
11
  import { W as WorkspaceLinkAction } from './workspaceLinkActions-CqWZaCY4.js';
@@ -12,174 +13,18 @@ import { A as AgentContextMentionItem } from './AgentMentionSearchController-2Vj
12
13
  export { p as preloadAgentMentionBrowse } from './AgentMentionSearchController-2Vjvmzh3.js';
13
14
  import { AgentContextMentionProvider } from './context-mention-provider.js';
14
15
  export { AGENT_CONTEXT_MENTION_PROVIDER_IDS, AgentContextMentionProviderId } from './context-mention-provider.js';
15
- import { A as AgentMessageMarkdownWorkspaceAppIcon } from './AgentMessageMarkdown-DeYPURtF.js';
16
16
  import { AgentGuiI18nLocale } from './i18n/index.js';
17
17
  export { AgentGuiI18nProvider, agentGuiI18nModule, agentGuiI18nResources } from './i18n/index.js';
18
+ import './agentConversationVM-BvlmCNOm.js';
19
+ import '@tutti-os/workspace-user-project/contracts';
18
20
  import '@tutti-os/workspace-issue-manager/core';
19
21
  import '@tutti-os/ui-rich-text/at-panel';
20
22
  import '@tutti-os/ui-rich-text/types';
21
23
  import '@tutti-os/workspace-external-core/contracts';
22
24
 
23
- type AgentHostAgentSessionProvider = "claude-code" | "codex" | "nexight" | "gemini" | "hermes" | "openclaw";
24
- type AgentHostAgentSessionPermissionModeSemantic = "ask-before-write" | "accept-edits" | "locked-down" | "auto" | "full-access" | "unconfigurable";
25
- type AgentHostAgentSessionReasoningEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | string;
26
- type AgentHostAgentSessionSpeed = "standard" | "fast" | string;
27
- interface AgentHostAgentSessionPermissionModeOption {
28
- id: string;
29
- label?: string;
30
- description?: string;
31
- semantic: AgentHostAgentSessionPermissionModeSemantic;
32
- }
33
- interface AgentHostAgentSessionPermissionConfig {
34
- configurable: boolean;
35
- defaultValue?: string | null;
36
- modes: AgentHostAgentSessionPermissionModeOption[];
37
- }
38
- interface AgentHostAgentSessionComposerSettings {
39
- model?: string | null;
40
- reasoningEffort?: AgentHostAgentSessionReasoningEffort | null;
41
- speed?: AgentHostAgentSessionSpeed | null;
42
- planMode?: boolean;
43
- browserUse?: boolean;
44
- computerUse?: boolean;
45
- permissionModeId?: string | null;
46
- }
47
- interface AgentHostAgentSession {
48
- workspaceId: string;
49
- agentSessionId: string;
50
- provider: AgentHostAgentSessionProvider;
51
- providerSessionId: string;
52
- resumable?: boolean;
53
- cwd?: string;
54
- status: "ready" | "working" | "canceled" | "failed" | "completed" | string;
55
- title?: string;
56
- pinnedAtUnixMs?: number | null;
57
- visible?: boolean;
58
- permissionModeId?: string;
59
- permissionConfig?: AgentHostAgentSessionPermissionConfig;
60
- settings?: AgentHostAgentSessionComposerSettings;
61
- createdAtUnixMs: number;
62
- updatedAtUnixMs: number;
63
- }
64
- interface AgentHostAgentSessionInteractivePrompt {
65
- kind: string;
66
- requestId?: string;
67
- toolName?: string;
68
- status?: string;
69
- input?: Record<string, unknown>;
70
- output?: Record<string, unknown>;
71
- error?: Record<string, unknown>;
72
- metadata?: Record<string, unknown>;
73
- }
74
- interface AgentHostAgentSessionState {
75
- workspaceId: string;
76
- agentSessionId: string;
77
- provider: AgentHostAgentSessionProvider;
78
- providerSessionId?: string;
79
- resumable?: boolean;
80
- status: AgentHostAgentSession["status"];
81
- permissionModeId?: string;
82
- permissionConfig?: AgentHostAgentSessionPermissionConfig;
83
- settings?: AgentHostAgentSessionComposerSettings;
84
- authState?: string;
85
- runtimeContext?: Record<string, unknown>;
86
- pinnedAtUnixMs?: number | null;
87
- pendingInteractive?: AgentHostAgentSessionInteractivePrompt | null;
88
- updatedAtUnixMs: number;
89
- }
90
- type AgentHostAgentSessionActivationMode = "new" | "existing";
91
- type AgentHostAgentSessionActivationStatus = "attached" | "already_attached" | "failed";
92
- interface AgentHostActivateAgentSessionResult {
93
- session: AgentHostAgentSession;
94
- activation: {
95
- mode: AgentHostAgentSessionActivationMode;
96
- status: AgentHostAgentSessionActivationStatus;
97
- };
98
- error?: {
99
- code: string;
100
- message: string;
101
- debugMessage?: string;
102
- };
103
- }
104
- interface AgentHostUnactivateAgentSessionResult {
105
- agentSessionId: string;
106
- buffered: boolean;
107
- }
108
- interface AgentHostUpdateAgentSessionSettingsResult {
109
- agentSessionId: string;
110
- settings: AgentHostAgentSessionComposerSettings;
111
- }
112
-
113
- type AgentAvailabilityStatus = "available" | "unavailable" | "unknown";
114
- type AgentQuotaType = "session" | "weekly" | "monthly" | "daily" | "model" | "cost";
115
- interface AgentAvailabilityCheck {
116
- name: string;
117
- passed: boolean;
118
- detail?: string;
119
- }
120
- interface AgentAvailability {
121
- status: AgentAvailabilityStatus;
122
- detailsVisible: boolean;
123
- checks?: AgentAvailabilityCheck[];
124
- }
125
- interface AgentUsageQuota {
126
- quotaType: AgentQuotaType;
127
- percentRemaining?: number;
128
- resetsAtUnixMs?: number;
129
- resetText?: string;
130
- dollarRemaining?: number;
131
- modelName?: string;
132
- }
133
- interface AgentCostUsage {
134
- dollarUsed: number;
135
- dollarLimit?: number;
136
- }
137
- interface AgentUsageSnapshot {
138
- quotas?: AgentUsageQuota[];
139
- accountTier?: string;
140
- costUsage?: AgentCostUsage;
141
- capturedAtUnixMs: number;
142
- }
143
- interface AgentProbeAttempt {
144
- strategy: string;
145
- success: boolean;
146
- errorCode?: string;
147
- errorMessage?: string;
148
- }
149
- interface AgentProbeError {
150
- code: string;
151
- message?: string;
152
- }
153
- interface AgentProbeProvider {
154
- provider: string;
155
- availability: AgentAvailability;
156
- usage?: AgentUsageSnapshot;
157
- attempts?: AgentProbeAttempt[];
158
- lastError?: AgentProbeError;
159
- }
160
- interface AgentProbeSnapshot {
161
- workspaceId: string;
162
- roomId?: string;
163
- capturedAtUnixMs: number;
164
- providers: AgentProbeProvider[];
165
- }
166
- interface AgentHostListWorkspaceAgentProbesInput {
167
- workspaceId: string;
168
- /** Compatibility input while carried call sites finish migrating from TSH room naming. */
169
- roomId?: string;
170
- providers?: string[];
171
- includeUsage?: boolean;
172
- refresh?: boolean;
173
- }
174
- type AgentHostWorkspaceAgentProbesResult = AgentProbeSnapshot;
175
-
176
25
  declare const APP_UPDATE_POLICIES: readonly ["off", "prompt", "auto"];
177
26
  type AppUpdatePolicy = (typeof APP_UPDATE_POLICIES)[number];
178
27
 
179
- interface ReadWorkspaceFileResult {
180
- bytes: Uint8Array;
181
- }
182
-
183
28
  interface AgentActivitySnapshotProjection {
184
29
  view: WorkspaceAgentActivityListViewModel;
185
30
  sessionsById: Record<string, AgentHostWorkspaceAgentSession>;
@@ -295,14 +140,25 @@ interface AgentActivityRuntimeReadSessionAttachmentInput {
295
140
  }
296
141
  interface AgentActivityRuntimeReadPromptAssetInput {
297
142
  agentSessionId?: string | null;
143
+ assetId?: string | null;
144
+ hostPath?: string | null;
145
+ kind?: string | null;
298
146
  mimeType: string;
299
147
  name?: string | null;
300
148
  path?: string | null;
301
149
  sha256?: string | null;
150
+ uploadStatus?: string | null;
151
+ uri?: string | null;
302
152
  workspaceId: string;
303
153
  }
304
154
  type AgentActivityRuntimePromptContentBlock = AgentActivitySendInput["content"][number] & {
155
+ assetId?: string;
156
+ hostPath?: string;
157
+ kind?: string;
305
158
  path?: string;
159
+ sizeBytes?: number;
160
+ uploadStatus?: string;
161
+ uri?: string;
306
162
  };
307
163
  interface AgentActivityRuntimeUploadPromptContentInput {
308
164
  content: AgentActivityRuntimePromptContentBlock[];
@@ -318,9 +174,14 @@ interface AgentActivityRuntimeSessionAttachment {
318
174
  data: string;
319
175
  }
320
176
  interface AgentActivityRuntimePromptAsset {
177
+ assetId?: string;
178
+ hostPath?: string;
179
+ kind?: string;
321
180
  mimeType: string;
322
181
  name?: string;
323
182
  path: string;
183
+ uploadStatus?: string;
184
+ uri?: string;
324
185
  data: string;
325
186
  }
326
187
  interface AgentActivityRuntime {
@@ -365,242 +226,10 @@ declare function getOptionalAgentActivityRuntime(): AgentActivityRuntime | null;
365
226
  declare function resetAgentActivityRuntimeForTests(): void;
366
227
  declare function setAgentActivityRuntimeForTests(runtime: AgentActivityRuntime | null): void;
367
228
 
368
- type AgentHostAsyncResult<T = any> = Promise<T>;
369
- type AgentHostRecord = Record<string, unknown>;
370
- type AgentHostUnsubscribe = () => void;
371
- type AgentHostWorkspaceScopedInput<T extends {
372
- workspaceId?: string | null;
373
- }> = Omit<T, "workspaceId"> & {
374
- workspaceId: string;
375
- };
376
- type AgentHostWorkspaceAgentsListInput = AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentListInput>;
377
- type AgentHostWorkspaceAgentSessionMessagesRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionMessagesInput>;
378
- type AgentHostWorkspaceAgentSessionSummaryRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionSummaryInput>;
379
- type AgentHostDeleteWorkspaceAgentSessionRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostDeleteWorkspaceAgentSessionInput>;
380
- type AgentHostClipboardApi = {
381
- writeText: (text: string) => AgentHostAsyncResult<void>;
382
- };
383
- type AgentHostDebugApi = {
384
- logRuntimeDiagnostics: (payload: unknown) => AgentHostAsyncResult<void> | void;
385
- logTerminalDiagnostics?: (payload: unknown) => AgentHostAsyncResult<void> | void;
386
- };
387
- type AgentHostFilesystemApi = AgentHostRecord & {
388
- readFileText: (payload: {
389
- path?: string;
390
- uri?: string;
391
- }) => AgentHostAsyncResult<{
392
- content: string;
393
- name?: string;
394
- path?: string;
395
- }>;
396
- };
397
- type AgentHostMetaApi = AgentHostRecord & {
398
- appVersion?: string | null;
399
- isPackaged?: boolean;
400
- isTest?: boolean;
401
- mainPid?: number | null;
402
- platform?: string;
403
- workspaceId?: string;
404
- };
405
- type AgentHostEnvironmentApi = AgentHostRecord & {
406
- getBaseUrl?: () => AgentHostAsyncResult<string>;
407
- warmupOpenclawGateway?: (input?: unknown) => AgentHostAsyncResult<unknown>;
408
- };
409
- interface AgentHostSelectedFile {
410
- name?: string;
411
- path: string;
412
- }
413
- type AgentHostWorkspaceApi = AgentHostRecord & {
414
- copyPath?: (input: {
415
- path: string;
416
- }) => AgentHostAsyncResult<void>;
417
- ensureDirectory: (input: {
418
- path: string;
419
- }) => AgentHostAsyncResult<void>;
420
- getPathForFile: (file: File) => string;
421
- readFile: (input: {
422
- path: string;
423
- }) => AgentHostAsyncResult<ReadWorkspaceFileResult>;
424
- selectContextEntries?: () => AgentHostAsyncResult<{
425
- entries: unknown[];
426
- }>;
427
- selectDirectory: () => AgentHostAsyncResult<{
428
- path: string;
429
- } | null>;
430
- selectFiles: () => AgentHostAsyncResult<AgentHostSelectedFile[]>;
431
- writeFileText: (input: {
432
- content: string;
433
- path: string;
434
- }) => AgentHostAsyncResult<unknown>;
435
- };
436
- interface AgentHostInputApi {
437
- account?: AgentHostAccountApi;
438
- agentGuiBatch?: AgentHostAgentGuiBatchApi;
439
- agentSessions?: AgentHostAgentSessionsApi;
440
- clipboard: AgentHostClipboardApi;
441
- debug?: AgentHostDebugApi;
442
- filesystem: AgentHostFilesystemApi;
443
- meta?: AgentHostMetaApi;
444
- onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;
445
- runtime?: AgentHostEnvironmentApi;
446
- userProjects?: AgentHostUserProjectsApi;
447
- workspace: AgentHostWorkspaceApi;
448
- workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;
449
- workspaceAgents?: AgentHostWorkspaceAgentsApi;
450
- }
451
- type AgentHostApi = AgentHostInputApi;
452
- type AgentHostAccountApi = AgentHostRecord & {
453
- batchGetUserInfo: (input: AgentHostBatchUserInfoInput) => AgentHostAsyncResult<AgentHostBatchUserInfoResult>;
454
- ensureProfiles?: (input: any) => AgentHostAsyncResult<any>;
455
- };
456
- type AgentHostAgentGuiBatchApi = AgentHostRecord & {
457
- exportRun: (input: any) => AgentHostAsyncResult<any>;
458
- };
459
- type AgentHostWorkspaceAgentProbesApi = AgentHostRecord & {
460
- list: (input: AgentHostListWorkspaceAgentProbesInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentProbesResult>;
461
- };
462
- type AgentProviderProbeListInput = AgentHostListWorkspaceAgentProbesInput;
463
- type AgentProviderProbeListResult = AgentHostWorkspaceAgentProbesResult;
464
- interface AgentHostUserProject {
465
- id: string;
466
- path: string;
467
- label: string;
468
- createdAtUnixMs?: number;
469
- updatedAtUnixMs?: number;
470
- lastUsedAtUnixMs?: number;
471
- }
472
- type AgentHostUserProjectsApi = AgentHostRecord & {
473
- service?: WorkspaceUserProjectService;
474
- checkPath?: (input: {
475
- path: string;
476
- }) => AgentHostAsyncResult<{
477
- exists: boolean;
478
- isDirectory: boolean;
479
- path: string;
480
- }>;
481
- create?: (input: {
482
- name: string;
483
- }) => AgentHostAsyncResult<AgentHostUserProject>;
484
- getDefaultSelection?: () => AgentHostAsyncResult<{
485
- path: string | null;
486
- } | null>;
487
- list: () => AgentHostAsyncResult<{
488
- projects: AgentHostUserProject[];
489
- }>;
490
- subscribe?: (listener: () => void) => AgentHostUnsubscribe;
491
- prepareSelection?: (input: {
492
- projectLocked: boolean;
493
- selectedPath: string | null;
494
- }) => AgentHostAsyncResult<{
495
- isSelectedPathMissing: boolean;
496
- projects: AgentHostUserProject[];
497
- selection: {
498
- kind: "clear";
499
- suppressedPath: string;
500
- } | {
501
- kind: "none";
502
- } | {
503
- kind: "select";
504
- path: string;
505
- };
506
- }>;
507
- remove?: (input: {
508
- path: string;
509
- }) => AgentHostAsyncResult<void>;
510
- isNoProjectPath?: (input: {
511
- path: string;
512
- }) => boolean;
513
- rememberDefaultSelection?: (input: {
514
- path: string | null;
515
- }) => AgentHostAsyncResult<void>;
516
- use: (input: {
517
- path: string;
518
- }) => AgentHostAsyncResult<AgentHostUserProject>;
519
- };
520
- type AgentHostAgentSessionsApi = AgentHostRecord & {
521
- activate: (input: any) => AgentHostAsyncResult<any>;
522
- /**
523
- * @deprecated AgentGUI production writes must use AgentActivityRuntime.cancelSession.
524
- */
525
- cancel: (input: any) => AgentHostAsyncResult<any>;
526
- /**
527
- * @deprecated AgentGUI production writes must use AgentActivityRuntime.sendInput.
528
- */
529
- exec: (input: any) => AgentHostAsyncResult<any>;
530
- getComposerOptions?: (input: any) => AgentHostAsyncResult<any>;
531
- getState: (input: any) => AgentHostAsyncResult<any>;
532
- onEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;
533
- /**
534
- * @deprecated AgentGUI production writes must use AgentActivityRuntime.setSessionPinned.
535
- */
536
- pinSession?: (input: any) => AgentHostAsyncResult<any>;
537
- /**
538
- * @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.
539
- */
540
- releaseEventStream?: (input?: any) => AgentHostAsyncResult;
541
- /**
542
- * @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.
543
- */
544
- retainEventStream?: (input: any) => AgentHostAsyncResult;
545
- /**
546
- * @deprecated AgentGUI production writes must use AgentActivityRuntime.submitInteractive.
547
- */
548
- submitInteractive: (input: any) => AgentHostAsyncResult<any>;
549
- /**
550
- * @deprecated AgentGUI production UI must derive events from AgentActivityRuntime snapshots.
551
- */
552
- trackSettingsProjectChange?: (input: {
553
- action: "clear" | "create_new" | "select_existing";
554
- agentSessionId: string;
555
- provider?: string | null;
556
- }) => AgentHostAsyncResult<void>;
557
- subscribeEvents: (input: any, listener: (event: any) => void) => AgentHostUnsubscribe;
558
- unactivate: (input: any) => AgentHostAsyncResult<any>;
559
- updateSettings: (input: any) => AgentHostAsyncResult<any>;
560
- };
561
- /**
562
- * @deprecated Legacy host DTO projection. AgentGUI production reads and writes
563
- * must use AgentActivityRuntime and AgentActivity* models.
564
- */
565
- type AgentHostWorkspaceAgentsApi = AgentHostRecord & {
566
- /**
567
- * @deprecated Use AgentActivityRuntime.deleteSession.
568
- */
569
- deleteSession: (input: AgentHostDeleteWorkspaceAgentSessionRuntimeInput) => AgentHostAsyncResult<any>;
570
- /**
571
- * @deprecated Derive summaries from AgentActivitySnapshot/session messages.
572
- */
573
- getSessionSummary: (input: AgentHostWorkspaceAgentSessionSummaryRuntimeInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionSummary>;
574
- /**
575
- * @deprecated Use AgentActivityRuntime.load/getSnapshot.
576
- */
577
- list: (input: string | AgentHostWorkspaceAgentsListInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentSnapshot>;
578
- /**
579
- * @deprecated Use AgentActivityRuntime.listSessionMessages.
580
- */
581
- listSessionMessages: (input: AgentHostWorkspaceAgentSessionMessagesRuntimeInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionMessages>;
582
- };
583
- interface AgentHostRuntimeApi {
584
- account?: AgentHostAccountApi;
585
- agentGuiBatch: AgentHostAgentGuiBatchApi;
586
- clipboard: AgentHostClipboardApi;
587
- debug?: AgentHostDebugApi;
588
- filesystem: AgentHostFilesystemApi;
589
- meta?: AgentHostMetaApi;
590
- onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;
591
- runtime?: AgentHostEnvironmentApi;
592
- userProjects?: AgentHostUserProjectsApi;
593
- workspace: AgentHostWorkspaceApi;
594
- workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;
595
- }
596
-
597
229
  type AgentCustomModelEnabledByProvider<TProvider extends string> = Record<TProvider, boolean>;
598
230
  type AgentCustomModelByProvider<TProvider extends string> = Record<TProvider, string>;
599
231
  type AgentCustomModelOptionsByProvider<TProvider extends string> = Record<TProvider, string[]>;
600
232
 
601
- declare const AGENT_PROVIDERS: readonly ["claude-code", "codex", "nexight", "opencode", "gemini", "openclaw", "hermes"];
602
- type AgentProvider = (typeof AGENT_PROVIDERS)[number];
603
-
604
233
  type FocusNodeTargetZoom = number;
605
234
 
606
235
  declare const UI_LANGUAGES: readonly ["en", "zh-CN"];
@@ -696,30 +325,6 @@ interface AgentSettings {
696
325
  hideWorktreeMismatchDropWarning: boolean;
697
326
  }
698
327
 
699
- interface AgentGUINodeData {
700
- provider: AgentGUIProvider;
701
- lastActiveAgentSessionId: string | null;
702
- lastActiveConversationTitle?: string | null;
703
- conversationCount?: number | null;
704
- conversationRailWidthPx?: number | null;
705
- conversationRailCollapsed?: boolean | null;
706
- composerOverrides?: AgentHostAgentSessionComposerSettings | null;
707
- composerOverridesByProvider?: Partial<Record<AgentGUIProvider, AgentHostAgentSessionComposerSettings | null>> | null;
708
- }
709
- type AgentGUIProvider = Extract<AgentProvider, "claude-code" | "codex" | "nexight" | "gemini" | "hermes" | "openclaw">;
710
- interface Size {
711
- width: number;
712
- height: number;
713
- }
714
- interface Point {
715
- x: number;
716
- y: number;
717
- }
718
- interface NodeFrame {
719
- position: Point;
720
- size: Size;
721
- }
722
-
723
328
  interface DesktopSize {
724
329
  width: number;
725
330
  height: number;
@@ -776,6 +381,12 @@ type AgentComposerGitBranchLoader = (input: {
776
381
  * 由宿主(desktop)注入 —— 源 id 与 params 形态是宿主侧 reference source 的知识。
777
382
  */
778
383
  type AgentMentionReferenceTargetResolver = (item: AgentContextMentionItem) => ReferenceLocateTarget | null;
384
+ interface AgentWorkspaceReferenceInitialTargetInput {
385
+ activeConversation: AgentGUINodeViewModel["activeConversation"];
386
+ composerSelectedProjectPath: string | null;
387
+ userProjects: AgentGUINodeViewModel["userProjects"];
388
+ }
389
+ type AgentWorkspaceReferenceInitialTargetResolver = (input: AgentWorkspaceReferenceInitialTargetInput) => ReferenceLocateTarget | null;
779
390
 
780
391
  interface AgentGUINodeProps {
781
392
  nodeId: string;
@@ -786,6 +397,7 @@ interface AgentGUINodeProps {
786
397
  onRequestGitBranches?: AgentComposerGitBranchLoader | null;
787
398
  referenceSourceAggregator?: ReferenceSourceAggregator | null;
788
399
  resolveMentionReferenceTarget?: AgentMentionReferenceTargetResolver | null;
400
+ resolveWorkspaceReferenceInitialTarget?: AgentWorkspaceReferenceInitialTargetResolver | null;
789
401
  agentSettings: Pick<AgentSettings, "avoidGroupingEdits">;
790
402
  title: string;
791
403
  state: AgentGUINodeData;
@@ -875,4 +487,4 @@ interface AgentActivityHostProviderProps extends PropsWithChildren {
875
487
  }
876
488
  declare function AgentActivityHostProvider({ agentActivityRuntime, agentHostApi, children }: AgentActivityHostProviderProps): JSX.Element;
877
489
 
878
- export { AgentActivityHostProvider, type AgentActivityHostProviderProps, type AgentActivityRuntime, type AgentActivityRuntimeListSessionMessagesInput, type AgentActivityRuntimePromptContentBlock, AgentActivityRuntimeProvider, type AgentActivityRuntimeProviderProps, type AgentActivityRuntimeRetainSessionEventsInput, type AgentActivityRuntimeSetSessionPinnedInput, type AgentActivityRuntimeUpdateSessionSettingsInput, type AgentActivityRuntimeUploadPromptContentInput, type AgentActivityRuntimeUploadPromptContentResult, type AgentActivityRuntimeWarmupOpenclawGatewayInput, type AgentActivitySnapshotProjection, AgentContextMentionProvider, AgentGUI, type AgentGUIProps, AgentGuiI18nLocale, type AgentHostApi, type AgentHostInputApi, type AgentHostRuntimeApi, type AgentProbeProvider, type AgentProbeSnapshot, type AgentProviderProbeListInput, type AgentProviderProbeListResult, type AgentUsageQuota, type AgentUsageSnapshot, agentGuiDockIconUrl, agentGuiDockIconUrls, agentHostSnapshotFromAgentActivitySnapshot, buildAgentActivitySnapshotProjection, getAgentActivityRuntime, getOptionalAgentActivityRuntime, projectCoreSessionStatus, resetAgentActivityRuntimeForTests, resolveAgentGUIExpandedWindowFrame, setAgentActivityRuntimeForTests, shouldAutoCollapseAgentGUIConversationRail, useAgentActivityRuntime, useAgentActivitySnapshot, useOptionalAgentActivityRuntime };
490
+ export { AgentActivityHostProvider, type AgentActivityHostProviderProps, type AgentActivityRuntime, type AgentActivityRuntimeListSessionMessagesInput, type AgentActivityRuntimePromptContentBlock, AgentActivityRuntimeProvider, type AgentActivityRuntimeProviderProps, type AgentActivityRuntimeRetainSessionEventsInput, type AgentActivityRuntimeSetSessionPinnedInput, type AgentActivityRuntimeUpdateSessionSettingsInput, type AgentActivityRuntimeUploadPromptContentInput, type AgentActivityRuntimeUploadPromptContentResult, type AgentActivityRuntimeWarmupOpenclawGatewayInput, type AgentActivitySnapshotProjection, AgentContextMentionProvider, AgentGUI, type AgentGUIProps, AgentGuiI18nLocale, AgentHostInputApi, AgentProbeSnapshot, agentGuiDockIconUrl, agentGuiDockIconUrls, agentHostSnapshotFromAgentActivitySnapshot, buildAgentActivitySnapshotProjection, getAgentActivityRuntime, getOptionalAgentActivityRuntime, projectCoreSessionStatus, resetAgentActivityRuntimeForTests, resolveAgentGUIExpandedWindowFrame, setAgentActivityRuntimeForTests, shouldAutoCollapseAgentGUIConversationRail, useAgentActivityRuntime, useAgentActivitySnapshot, useOptionalAgentActivityRuntime };