@tutti-os/agent-gui 0.0.23 → 0.0.24

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.
@@ -27,8 +27,6 @@ interface AgentFileMentionPaletteProps {
27
27
  onSelectCategory: (categoryId: AgentMentionBrowseCategory["id"]) => void;
28
28
  onSelectFilter: (filter: AgentMentionFilterId) => void;
29
29
  onExpandGroup: (groupId: AgentMentionGroupId) => void;
30
- onCycleFilter: () => void;
31
- onMoveSelection: (delta: 1 | -1) => void;
32
30
  /**
33
31
  * 可选:点击 issue / app 行末尾的「查看产物文件」图标时回调(打开引用 picker 并定位)。
34
32
  * 仅 workspace-issue / workspace-app 行渲染该入口。
@@ -37,7 +35,7 @@ interface AgentFileMentionPaletteProps {
37
35
  }
38
36
  declare function flattenAgentMentionPaletteEntries(state: AgentMentionSearchState): AgentMentionPaletteEntry[];
39
37
  declare function groupStartKeys(state: AgentMentionSearchState): string[];
40
- declare function AgentFileMentionPalette({ state, highlightedKey, label, loadingLabel, emptyLabel, errorLabel, tabHintLabel, maxHeightPx, shouldCenterHighlightedItem, onHighlightChange, onSelectItem, onSelectCategory, onSelectFilter, onExpandGroup, onCycleFilter, onMoveSelection, onOpenReferences }: AgentFileMentionPaletteProps): React.JSX.Element;
38
+ declare function AgentFileMentionPalette({ state, highlightedKey, label, loadingLabel, emptyLabel, errorLabel, tabHintLabel, maxHeightPx, shouldCenterHighlightedItem, onHighlightChange, onSelectItem, onSelectCategory, onSelectFilter, onExpandGroup, onOpenReferences }: AgentFileMentionPaletteProps): React.JSX.Element;
41
39
  declare const AgentContextMentionPalette: typeof AgentFileMentionPalette;
42
40
  type AgentContextMentionPaletteProps = AgentFileMentionPaletteProps;
43
41
 
@@ -4,7 +4,7 @@ import {
4
4
  AgentMentionSearchController,
5
5
  flattenAgentMentionPaletteEntries,
6
6
  groupStartKeys
7
- } from "../chunk-3LVEFR2N.js";
7
+ } from "../chunk-Q6QE7JNG.js";
8
8
  import "../chunk-B7DTDZVT.js";
9
9
  import "../chunk-F7XLV7M3.js";
10
10
  import "../chunk-MTFSQWZ6.js";
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-DQL8udfP.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-DQL8udfP.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>;
@@ -365,242 +210,10 @@ declare function getOptionalAgentActivityRuntime(): AgentActivityRuntime | null;
365
210
  declare function resetAgentActivityRuntimeForTests(): void;
366
211
  declare function setAgentActivityRuntimeForTests(runtime: AgentActivityRuntime | null): void;
367
212
 
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
213
  type AgentCustomModelEnabledByProvider<TProvider extends string> = Record<TProvider, boolean>;
598
214
  type AgentCustomModelByProvider<TProvider extends string> = Record<TProvider, string>;
599
215
  type AgentCustomModelOptionsByProvider<TProvider extends string> = Record<TProvider, string[]>;
600
216
 
601
- declare const AGENT_PROVIDERS: readonly ["claude-code", "codex", "nexight", "opencode", "gemini", "openclaw", "hermes"];
602
- type AgentProvider = (typeof AGENT_PROVIDERS)[number];
603
-
604
217
  type FocusNodeTargetZoom = number;
605
218
 
606
219
  declare const UI_LANGUAGES: readonly ["en", "zh-CN"];
@@ -696,30 +309,6 @@ interface AgentSettings {
696
309
  hideWorktreeMismatchDropWarning: boolean;
697
310
  }
698
311
 
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
312
  interface DesktopSize {
724
313
  width: number;
725
314
  height: number;
@@ -776,6 +365,12 @@ type AgentComposerGitBranchLoader = (input: {
776
365
  * 由宿主(desktop)注入 —— 源 id 与 params 形态是宿主侧 reference source 的知识。
777
366
  */
778
367
  type AgentMentionReferenceTargetResolver = (item: AgentContextMentionItem) => ReferenceLocateTarget | null;
368
+ interface AgentWorkspaceReferenceInitialTargetInput {
369
+ activeConversation: AgentGUINodeViewModel["activeConversation"];
370
+ composerSelectedProjectPath: string | null;
371
+ userProjects: AgentGUINodeViewModel["userProjects"];
372
+ }
373
+ type AgentWorkspaceReferenceInitialTargetResolver = (input: AgentWorkspaceReferenceInitialTargetInput) => ReferenceLocateTarget | null;
779
374
 
780
375
  interface AgentGUINodeProps {
781
376
  nodeId: string;
@@ -786,6 +381,7 @@ interface AgentGUINodeProps {
786
381
  onRequestGitBranches?: AgentComposerGitBranchLoader | null;
787
382
  referenceSourceAggregator?: ReferenceSourceAggregator | null;
788
383
  resolveMentionReferenceTarget?: AgentMentionReferenceTargetResolver | null;
384
+ resolveWorkspaceReferenceInitialTarget?: AgentWorkspaceReferenceInitialTargetResolver | null;
789
385
  agentSettings: Pick<AgentSettings, "avoidGroupingEdits">;
790
386
  title: string;
791
387
  state: AgentGUINodeData;
@@ -875,4 +471,4 @@ interface AgentActivityHostProviderProps extends PropsWithChildren {
875
471
  }
876
472
  declare function AgentActivityHostProvider({ agentActivityRuntime, agentHostApi, children }: AgentActivityHostProviderProps): JSX.Element;
877
473
 
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 };
474
+ 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 };