@tutti-os/agent-gui 0.0.22 → 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.
- package/dist/AgentMessageMarkdown-DQL8udfP.d.ts +640 -0
- package/dist/agent-conversation/index.d.ts +5 -14
- package/dist/agent-conversation/index.js +3 -3
- package/dist/agent-message-center/index.d.ts +2 -2
- package/dist/agent-message-center/index.js +3 -3
- package/dist/{agentConversationVM-BVe64P2E.d.ts → agentConversationVM-BvlmCNOm.d.ts} +3 -2
- package/dist/app/renderer/agentactivity.css +21 -28
- package/dist/{chunk-64FJGJ3F.js → chunk-4MOHKNXA.js} +3 -3
- package/dist/{chunk-KRKC3XXB.js → chunk-7JW4OAKS.js} +94 -14
- package/dist/chunk-7JW4OAKS.js.map +1 -0
- package/dist/{chunk-6TRWLMRE.js → chunk-BUBD5E4F.js} +125 -44
- package/dist/chunk-BUBD5E4F.js.map +1 -0
- package/dist/{chunk-222YHU5Z.js → chunk-CCI6EK5W.js} +1 -1
- package/dist/chunk-CCI6EK5W.js.map +1 -0
- package/dist/{chunk-UUGCUPYW.js → chunk-Q6QE7JNG.js} +15 -14
- package/dist/{chunk-UUGCUPYW.js.map → chunk-Q6QE7JNG.js.map} +1 -1
- package/dist/context-mention-palette/index.d.ts +1 -3
- package/dist/context-mention-palette/index.js +2 -2
- package/dist/index.d.ts +29 -418
- package/dist/index.js +138 -124
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +2 -2
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/{workspaceAgentActivityListViewModel-BK_J3aNX.d.ts → workspaceAgentActivityListViewModel-jRF8cP37.d.ts} +2 -2
- package/package.json +12 -12
- package/dist/AgentMessageMarkdown-DeYPURtF.d.ts +0 -7
- package/dist/chunk-222YHU5Z.js.map +0 -1
- package/dist/chunk-6TRWLMRE.js.map +0 -1
- package/dist/chunk-KRKC3XXB.js.map +0 -1
- /package/dist/{chunk-64FJGJ3F.js.map → chunk-4MOHKNXA.js.map} +0 -0
|
@@ -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,
|
|
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,14 +4,14 @@ import {
|
|
|
4
4
|
AgentMentionSearchController,
|
|
5
5
|
flattenAgentMentionPaletteEntries,
|
|
6
6
|
groupStartKeys
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-Q6QE7JNG.js";
|
|
8
8
|
import "../chunk-B7DTDZVT.js";
|
|
9
9
|
import "../chunk-F7XLV7M3.js";
|
|
10
10
|
import "../chunk-MTFSQWZ6.js";
|
|
11
11
|
import "../chunk-IBIMGLCD.js";
|
|
12
12
|
import "../chunk-XAQQN6MP.js";
|
|
13
13
|
import "../chunk-XJ34OIEQ.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-CCI6EK5W.js";
|
|
15
15
|
import "../chunk-TYGL25EL.js";
|
|
16
16
|
import {
|
|
17
17
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
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,
|
|
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 {
|
|
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>;
|
|
@@ -293,8 +138,16 @@ interface AgentActivityRuntimeReadSessionAttachmentInput {
|
|
|
293
138
|
attachmentId: string;
|
|
294
139
|
workspaceId: string;
|
|
295
140
|
}
|
|
141
|
+
interface AgentActivityRuntimeReadPromptAssetInput {
|
|
142
|
+
agentSessionId?: string | null;
|
|
143
|
+
mimeType: string;
|
|
144
|
+
name?: string | null;
|
|
145
|
+
path?: string | null;
|
|
146
|
+
sha256?: string | null;
|
|
147
|
+
workspaceId: string;
|
|
148
|
+
}
|
|
296
149
|
type AgentActivityRuntimePromptContentBlock = AgentActivitySendInput["content"][number] & {
|
|
297
|
-
|
|
150
|
+
path?: string;
|
|
298
151
|
};
|
|
299
152
|
interface AgentActivityRuntimeUploadPromptContentInput {
|
|
300
153
|
content: AgentActivityRuntimePromptContentBlock[];
|
|
@@ -309,6 +162,12 @@ interface AgentActivityRuntimeSessionAttachment {
|
|
|
309
162
|
name?: string;
|
|
310
163
|
data: string;
|
|
311
164
|
}
|
|
165
|
+
interface AgentActivityRuntimePromptAsset {
|
|
166
|
+
mimeType: string;
|
|
167
|
+
name?: string;
|
|
168
|
+
path: string;
|
|
169
|
+
data: string;
|
|
170
|
+
}
|
|
312
171
|
interface AgentActivityRuntime {
|
|
313
172
|
cancelSession(input: AgentActivityCancelSessionInput): Promise<AgentActivityCancelSessionResult>;
|
|
314
173
|
createSession(input: AgentActivityCreateSessionInput): Promise<AgentActivitySession>;
|
|
@@ -329,6 +188,7 @@ interface AgentActivityRuntime {
|
|
|
329
188
|
sendInput(input: AgentActivitySendInput): Promise<AgentActivitySession>;
|
|
330
189
|
uploadPromptContent?(input: AgentActivityRuntimeUploadPromptContentInput): Promise<AgentActivityRuntimeUploadPromptContentResult>;
|
|
331
190
|
readSessionAttachment?(input: AgentActivityRuntimeReadSessionAttachmentInput): Promise<AgentActivityRuntimeSessionAttachment>;
|
|
191
|
+
readPromptAsset?(input: AgentActivityRuntimeReadPromptAssetInput): Promise<AgentActivityRuntimePromptAsset>;
|
|
332
192
|
setSessionPinned(input: AgentActivityRuntimeSetSessionPinnedInput): Promise<AgentActivitySession>;
|
|
333
193
|
trackSettingsProjectChange?(input: AgentActivityRuntimeTrackSettingsProjectChangeInput): Promise<void>;
|
|
334
194
|
trackDraftComposerSettingsChange?(input: AgentActivityRuntimeTrackDraftComposerSettingsChangeInput): Promise<void>;
|
|
@@ -350,242 +210,10 @@ declare function getOptionalAgentActivityRuntime(): AgentActivityRuntime | null;
|
|
|
350
210
|
declare function resetAgentActivityRuntimeForTests(): void;
|
|
351
211
|
declare function setAgentActivityRuntimeForTests(runtime: AgentActivityRuntime | null): void;
|
|
352
212
|
|
|
353
|
-
type AgentHostAsyncResult<T = any> = Promise<T>;
|
|
354
|
-
type AgentHostRecord = Record<string, unknown>;
|
|
355
|
-
type AgentHostUnsubscribe = () => void;
|
|
356
|
-
type AgentHostWorkspaceScopedInput<T extends {
|
|
357
|
-
workspaceId?: string | null;
|
|
358
|
-
}> = Omit<T, "workspaceId"> & {
|
|
359
|
-
workspaceId: string;
|
|
360
|
-
};
|
|
361
|
-
type AgentHostWorkspaceAgentsListInput = AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentListInput>;
|
|
362
|
-
type AgentHostWorkspaceAgentSessionMessagesRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionMessagesInput>;
|
|
363
|
-
type AgentHostWorkspaceAgentSessionSummaryRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionSummaryInput>;
|
|
364
|
-
type AgentHostDeleteWorkspaceAgentSessionRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostDeleteWorkspaceAgentSessionInput>;
|
|
365
|
-
type AgentHostClipboardApi = {
|
|
366
|
-
writeText: (text: string) => AgentHostAsyncResult<void>;
|
|
367
|
-
};
|
|
368
|
-
type AgentHostDebugApi = {
|
|
369
|
-
logRuntimeDiagnostics: (payload: unknown) => AgentHostAsyncResult<void> | void;
|
|
370
|
-
logTerminalDiagnostics?: (payload: unknown) => AgentHostAsyncResult<void> | void;
|
|
371
|
-
};
|
|
372
|
-
type AgentHostFilesystemApi = AgentHostRecord & {
|
|
373
|
-
readFileText: (payload: {
|
|
374
|
-
path?: string;
|
|
375
|
-
uri?: string;
|
|
376
|
-
}) => AgentHostAsyncResult<{
|
|
377
|
-
content: string;
|
|
378
|
-
name?: string;
|
|
379
|
-
path?: string;
|
|
380
|
-
}>;
|
|
381
|
-
};
|
|
382
|
-
type AgentHostMetaApi = AgentHostRecord & {
|
|
383
|
-
appVersion?: string | null;
|
|
384
|
-
isPackaged?: boolean;
|
|
385
|
-
isTest?: boolean;
|
|
386
|
-
mainPid?: number | null;
|
|
387
|
-
platform?: string;
|
|
388
|
-
workspaceId?: string;
|
|
389
|
-
};
|
|
390
|
-
type AgentHostEnvironmentApi = AgentHostRecord & {
|
|
391
|
-
getBaseUrl?: () => AgentHostAsyncResult<string>;
|
|
392
|
-
warmupOpenclawGateway?: (input?: unknown) => AgentHostAsyncResult<unknown>;
|
|
393
|
-
};
|
|
394
|
-
interface AgentHostSelectedFile {
|
|
395
|
-
name?: string;
|
|
396
|
-
path: string;
|
|
397
|
-
}
|
|
398
|
-
type AgentHostWorkspaceApi = AgentHostRecord & {
|
|
399
|
-
copyPath?: (input: {
|
|
400
|
-
path: string;
|
|
401
|
-
}) => AgentHostAsyncResult<void>;
|
|
402
|
-
ensureDirectory: (input: {
|
|
403
|
-
path: string;
|
|
404
|
-
}) => AgentHostAsyncResult<void>;
|
|
405
|
-
getPathForFile: (file: File) => string;
|
|
406
|
-
readFile: (input: {
|
|
407
|
-
path: string;
|
|
408
|
-
}) => AgentHostAsyncResult<ReadWorkspaceFileResult>;
|
|
409
|
-
selectContextEntries?: () => AgentHostAsyncResult<{
|
|
410
|
-
entries: unknown[];
|
|
411
|
-
}>;
|
|
412
|
-
selectDirectory: () => AgentHostAsyncResult<{
|
|
413
|
-
path: string;
|
|
414
|
-
} | null>;
|
|
415
|
-
selectFiles: () => AgentHostAsyncResult<AgentHostSelectedFile[]>;
|
|
416
|
-
writeFileText: (input: {
|
|
417
|
-
content: string;
|
|
418
|
-
path: string;
|
|
419
|
-
}) => AgentHostAsyncResult<unknown>;
|
|
420
|
-
};
|
|
421
|
-
interface AgentHostInputApi {
|
|
422
|
-
account?: AgentHostAccountApi;
|
|
423
|
-
agentGuiBatch?: AgentHostAgentGuiBatchApi;
|
|
424
|
-
agentSessions?: AgentHostAgentSessionsApi;
|
|
425
|
-
clipboard: AgentHostClipboardApi;
|
|
426
|
-
debug?: AgentHostDebugApi;
|
|
427
|
-
filesystem: AgentHostFilesystemApi;
|
|
428
|
-
meta?: AgentHostMetaApi;
|
|
429
|
-
onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;
|
|
430
|
-
runtime?: AgentHostEnvironmentApi;
|
|
431
|
-
userProjects?: AgentHostUserProjectsApi;
|
|
432
|
-
workspace: AgentHostWorkspaceApi;
|
|
433
|
-
workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;
|
|
434
|
-
workspaceAgents?: AgentHostWorkspaceAgentsApi;
|
|
435
|
-
}
|
|
436
|
-
type AgentHostApi = AgentHostInputApi;
|
|
437
|
-
type AgentHostAccountApi = AgentHostRecord & {
|
|
438
|
-
batchGetUserInfo: (input: AgentHostBatchUserInfoInput) => AgentHostAsyncResult<AgentHostBatchUserInfoResult>;
|
|
439
|
-
ensureProfiles?: (input: any) => AgentHostAsyncResult<any>;
|
|
440
|
-
};
|
|
441
|
-
type AgentHostAgentGuiBatchApi = AgentHostRecord & {
|
|
442
|
-
exportRun: (input: any) => AgentHostAsyncResult<any>;
|
|
443
|
-
};
|
|
444
|
-
type AgentHostWorkspaceAgentProbesApi = AgentHostRecord & {
|
|
445
|
-
list: (input: AgentHostListWorkspaceAgentProbesInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentProbesResult>;
|
|
446
|
-
};
|
|
447
|
-
type AgentProviderProbeListInput = AgentHostListWorkspaceAgentProbesInput;
|
|
448
|
-
type AgentProviderProbeListResult = AgentHostWorkspaceAgentProbesResult;
|
|
449
|
-
interface AgentHostUserProject {
|
|
450
|
-
id: string;
|
|
451
|
-
path: string;
|
|
452
|
-
label: string;
|
|
453
|
-
createdAtUnixMs?: number;
|
|
454
|
-
updatedAtUnixMs?: number;
|
|
455
|
-
lastUsedAtUnixMs?: number;
|
|
456
|
-
}
|
|
457
|
-
type AgentHostUserProjectsApi = AgentHostRecord & {
|
|
458
|
-
service?: WorkspaceUserProjectService;
|
|
459
|
-
checkPath?: (input: {
|
|
460
|
-
path: string;
|
|
461
|
-
}) => AgentHostAsyncResult<{
|
|
462
|
-
exists: boolean;
|
|
463
|
-
isDirectory: boolean;
|
|
464
|
-
path: string;
|
|
465
|
-
}>;
|
|
466
|
-
create?: (input: {
|
|
467
|
-
name: string;
|
|
468
|
-
}) => AgentHostAsyncResult<AgentHostUserProject>;
|
|
469
|
-
getDefaultSelection?: () => AgentHostAsyncResult<{
|
|
470
|
-
path: string | null;
|
|
471
|
-
} | null>;
|
|
472
|
-
list: () => AgentHostAsyncResult<{
|
|
473
|
-
projects: AgentHostUserProject[];
|
|
474
|
-
}>;
|
|
475
|
-
subscribe?: (listener: () => void) => AgentHostUnsubscribe;
|
|
476
|
-
prepareSelection?: (input: {
|
|
477
|
-
projectLocked: boolean;
|
|
478
|
-
selectedPath: string | null;
|
|
479
|
-
}) => AgentHostAsyncResult<{
|
|
480
|
-
isSelectedPathMissing: boolean;
|
|
481
|
-
projects: AgentHostUserProject[];
|
|
482
|
-
selection: {
|
|
483
|
-
kind: "clear";
|
|
484
|
-
suppressedPath: string;
|
|
485
|
-
} | {
|
|
486
|
-
kind: "none";
|
|
487
|
-
} | {
|
|
488
|
-
kind: "select";
|
|
489
|
-
path: string;
|
|
490
|
-
};
|
|
491
|
-
}>;
|
|
492
|
-
remove?: (input: {
|
|
493
|
-
path: string;
|
|
494
|
-
}) => AgentHostAsyncResult<void>;
|
|
495
|
-
isNoProjectPath?: (input: {
|
|
496
|
-
path: string;
|
|
497
|
-
}) => boolean;
|
|
498
|
-
rememberDefaultSelection?: (input: {
|
|
499
|
-
path: string | null;
|
|
500
|
-
}) => AgentHostAsyncResult<void>;
|
|
501
|
-
use: (input: {
|
|
502
|
-
path: string;
|
|
503
|
-
}) => AgentHostAsyncResult<AgentHostUserProject>;
|
|
504
|
-
};
|
|
505
|
-
type AgentHostAgentSessionsApi = AgentHostRecord & {
|
|
506
|
-
activate: (input: any) => AgentHostAsyncResult<any>;
|
|
507
|
-
/**
|
|
508
|
-
* @deprecated AgentGUI production writes must use AgentActivityRuntime.cancelSession.
|
|
509
|
-
*/
|
|
510
|
-
cancel: (input: any) => AgentHostAsyncResult<any>;
|
|
511
|
-
/**
|
|
512
|
-
* @deprecated AgentGUI production writes must use AgentActivityRuntime.sendInput.
|
|
513
|
-
*/
|
|
514
|
-
exec: (input: any) => AgentHostAsyncResult<any>;
|
|
515
|
-
getComposerOptions?: (input: any) => AgentHostAsyncResult<any>;
|
|
516
|
-
getState: (input: any) => AgentHostAsyncResult<any>;
|
|
517
|
-
onEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;
|
|
518
|
-
/**
|
|
519
|
-
* @deprecated AgentGUI production writes must use AgentActivityRuntime.setSessionPinned.
|
|
520
|
-
*/
|
|
521
|
-
pinSession?: (input: any) => AgentHostAsyncResult<any>;
|
|
522
|
-
/**
|
|
523
|
-
* @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.
|
|
524
|
-
*/
|
|
525
|
-
releaseEventStream?: (input?: any) => AgentHostAsyncResult;
|
|
526
|
-
/**
|
|
527
|
-
* @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.
|
|
528
|
-
*/
|
|
529
|
-
retainEventStream?: (input: any) => AgentHostAsyncResult;
|
|
530
|
-
/**
|
|
531
|
-
* @deprecated AgentGUI production writes must use AgentActivityRuntime.submitInteractive.
|
|
532
|
-
*/
|
|
533
|
-
submitInteractive: (input: any) => AgentHostAsyncResult<any>;
|
|
534
|
-
/**
|
|
535
|
-
* @deprecated AgentGUI production UI must derive events from AgentActivityRuntime snapshots.
|
|
536
|
-
*/
|
|
537
|
-
trackSettingsProjectChange?: (input: {
|
|
538
|
-
action: "clear" | "create_new" | "select_existing";
|
|
539
|
-
agentSessionId: string;
|
|
540
|
-
provider?: string | null;
|
|
541
|
-
}) => AgentHostAsyncResult<void>;
|
|
542
|
-
subscribeEvents: (input: any, listener: (event: any) => void) => AgentHostUnsubscribe;
|
|
543
|
-
unactivate: (input: any) => AgentHostAsyncResult<any>;
|
|
544
|
-
updateSettings: (input: any) => AgentHostAsyncResult<any>;
|
|
545
|
-
};
|
|
546
|
-
/**
|
|
547
|
-
* @deprecated Legacy host DTO projection. AgentGUI production reads and writes
|
|
548
|
-
* must use AgentActivityRuntime and AgentActivity* models.
|
|
549
|
-
*/
|
|
550
|
-
type AgentHostWorkspaceAgentsApi = AgentHostRecord & {
|
|
551
|
-
/**
|
|
552
|
-
* @deprecated Use AgentActivityRuntime.deleteSession.
|
|
553
|
-
*/
|
|
554
|
-
deleteSession: (input: AgentHostDeleteWorkspaceAgentSessionRuntimeInput) => AgentHostAsyncResult<any>;
|
|
555
|
-
/**
|
|
556
|
-
* @deprecated Derive summaries from AgentActivitySnapshot/session messages.
|
|
557
|
-
*/
|
|
558
|
-
getSessionSummary: (input: AgentHostWorkspaceAgentSessionSummaryRuntimeInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionSummary>;
|
|
559
|
-
/**
|
|
560
|
-
* @deprecated Use AgentActivityRuntime.load/getSnapshot.
|
|
561
|
-
*/
|
|
562
|
-
list: (input: string | AgentHostWorkspaceAgentsListInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentSnapshot>;
|
|
563
|
-
/**
|
|
564
|
-
* @deprecated Use AgentActivityRuntime.listSessionMessages.
|
|
565
|
-
*/
|
|
566
|
-
listSessionMessages: (input: AgentHostWorkspaceAgentSessionMessagesRuntimeInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionMessages>;
|
|
567
|
-
};
|
|
568
|
-
interface AgentHostRuntimeApi {
|
|
569
|
-
account?: AgentHostAccountApi;
|
|
570
|
-
agentGuiBatch: AgentHostAgentGuiBatchApi;
|
|
571
|
-
clipboard: AgentHostClipboardApi;
|
|
572
|
-
debug?: AgentHostDebugApi;
|
|
573
|
-
filesystem: AgentHostFilesystemApi;
|
|
574
|
-
meta?: AgentHostMetaApi;
|
|
575
|
-
onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;
|
|
576
|
-
runtime?: AgentHostEnvironmentApi;
|
|
577
|
-
userProjects?: AgentHostUserProjectsApi;
|
|
578
|
-
workspace: AgentHostWorkspaceApi;
|
|
579
|
-
workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
213
|
type AgentCustomModelEnabledByProvider<TProvider extends string> = Record<TProvider, boolean>;
|
|
583
214
|
type AgentCustomModelByProvider<TProvider extends string> = Record<TProvider, string>;
|
|
584
215
|
type AgentCustomModelOptionsByProvider<TProvider extends string> = Record<TProvider, string[]>;
|
|
585
216
|
|
|
586
|
-
declare const AGENT_PROVIDERS: readonly ["claude-code", "codex", "nexight", "opencode", "gemini", "openclaw", "hermes"];
|
|
587
|
-
type AgentProvider = (typeof AGENT_PROVIDERS)[number];
|
|
588
|
-
|
|
589
217
|
type FocusNodeTargetZoom = number;
|
|
590
218
|
|
|
591
219
|
declare const UI_LANGUAGES: readonly ["en", "zh-CN"];
|
|
@@ -681,30 +309,6 @@ interface AgentSettings {
|
|
|
681
309
|
hideWorktreeMismatchDropWarning: boolean;
|
|
682
310
|
}
|
|
683
311
|
|
|
684
|
-
interface AgentGUINodeData {
|
|
685
|
-
provider: AgentGUIProvider;
|
|
686
|
-
lastActiveAgentSessionId: string | null;
|
|
687
|
-
lastActiveConversationTitle?: string | null;
|
|
688
|
-
conversationCount?: number | null;
|
|
689
|
-
conversationRailWidthPx?: number | null;
|
|
690
|
-
conversationRailCollapsed?: boolean | null;
|
|
691
|
-
composerOverrides?: AgentHostAgentSessionComposerSettings | null;
|
|
692
|
-
composerOverridesByProvider?: Partial<Record<AgentGUIProvider, AgentHostAgentSessionComposerSettings | null>> | null;
|
|
693
|
-
}
|
|
694
|
-
type AgentGUIProvider = Extract<AgentProvider, "claude-code" | "codex" | "nexight" | "gemini" | "hermes" | "openclaw">;
|
|
695
|
-
interface Size {
|
|
696
|
-
width: number;
|
|
697
|
-
height: number;
|
|
698
|
-
}
|
|
699
|
-
interface Point {
|
|
700
|
-
x: number;
|
|
701
|
-
y: number;
|
|
702
|
-
}
|
|
703
|
-
interface NodeFrame {
|
|
704
|
-
position: Point;
|
|
705
|
-
size: Size;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
312
|
interface DesktopSize {
|
|
709
313
|
width: number;
|
|
710
314
|
height: number;
|
|
@@ -761,6 +365,12 @@ type AgentComposerGitBranchLoader = (input: {
|
|
|
761
365
|
* 由宿主(desktop)注入 —— 源 id 与 params 形态是宿主侧 reference source 的知识。
|
|
762
366
|
*/
|
|
763
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;
|
|
764
374
|
|
|
765
375
|
interface AgentGUINodeProps {
|
|
766
376
|
nodeId: string;
|
|
@@ -771,6 +381,7 @@ interface AgentGUINodeProps {
|
|
|
771
381
|
onRequestGitBranches?: AgentComposerGitBranchLoader | null;
|
|
772
382
|
referenceSourceAggregator?: ReferenceSourceAggregator | null;
|
|
773
383
|
resolveMentionReferenceTarget?: AgentMentionReferenceTargetResolver | null;
|
|
384
|
+
resolveWorkspaceReferenceInitialTarget?: AgentWorkspaceReferenceInitialTargetResolver | null;
|
|
774
385
|
agentSettings: Pick<AgentSettings, "avoidGroupingEdits">;
|
|
775
386
|
title: string;
|
|
776
387
|
state: AgentGUINodeData;
|
|
@@ -860,4 +471,4 @@ interface AgentActivityHostProviderProps extends PropsWithChildren {
|
|
|
860
471
|
}
|
|
861
472
|
declare function AgentActivityHostProvider({ agentActivityRuntime, agentHostApi, children }: AgentActivityHostProviderProps): JSX.Element;
|
|
862
473
|
|
|
863
|
-
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,
|
|
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 };
|