@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.
- package/dist/AgentMessageMarkdown-BnpM_dCB.d.ts +658 -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-CGYkOuOP.d.ts → agentConversationVM-BvlmCNOm.d.ts} +2 -2
- package/dist/app/renderer/agentactivity.css +21 -28
- package/dist/{chunk-MQAGIHYM.js → chunk-3QDLVPMJ.js} +36 -4
- package/dist/chunk-3QDLVPMJ.js.map +1 -0
- package/dist/{chunk-3LVEFR2N.js → chunk-5PIXN7UF.js} +15 -14
- package/dist/{chunk-3LVEFR2N.js.map → chunk-5PIXN7UF.js.map} +1 -1
- package/dist/{chunk-ZC4E2QJU.js → chunk-OSBLVO4N.js} +3 -3
- package/dist/{chunk-7Q3JKSQ5.js → chunk-VNRRXUI3.js} +125 -44
- package/dist/chunk-VNRRXUI3.js.map +1 -0
- package/dist/{chunk-CCI6EK5W.js → chunk-YHRJD6HA.js} +1 -1
- package/dist/chunk-YHRJD6HA.js.map +1 -0
- 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 -417
- package/dist/index.js +473 -130
- 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-7Q3JKSQ5.js.map +0 -1
- package/dist/chunk-CCI6EK5W.js.map +0 -1
- package/dist/chunk-MQAGIHYM.js.map +0 -1
- /package/dist/{chunk-ZC4E2QJU.js.map → chunk-OSBLVO4N.js.map} +0 -0
|
@@ -0,0 +1,658 @@
|
|
|
1
|
+
import { AgentActivityUsage } from '@tutti-os/agent-activity-core';
|
|
2
|
+
import { A as AgentHostBatchUserInfoInput, a as AgentHostBatchUserInfoResult, b as AgentHostDeleteWorkspaceAgentSessionInput, k as AgentHostWorkspaceAgentSessionSummaryInput, j as AgentHostWorkspaceAgentSessionSummary, e as AgentHostWorkspaceAgentListInput, l as AgentHostWorkspaceAgentSnapshot, i as AgentHostWorkspaceAgentSessionMessagesInput, h as AgentHostWorkspaceAgentSessionMessages, p as WorkspaceAgentActivitySyncState } from './workspaceAgentActivityListViewModel-jRF8cP37.js';
|
|
3
|
+
import { A as AgentApprovalItemVM, a as AgentAskUserQuestionVM, b as AgentConversationPromptVM, c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from './agentConversationVM-BvlmCNOm.js';
|
|
4
|
+
import { WorkspaceUserProjectService } from '@tutti-os/workspace-user-project/contracts';
|
|
5
|
+
|
|
6
|
+
type AgentHostAgentSessionProvider = "claude-code" | "codex" | "nexight" | "gemini" | "hermes" | "openclaw";
|
|
7
|
+
type AgentHostAgentSessionPermissionModeSemantic = "ask-before-write" | "accept-edits" | "locked-down" | "auto" | "full-access" | "unconfigurable";
|
|
8
|
+
type AgentHostAgentSessionReasoningEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | string;
|
|
9
|
+
type AgentHostAgentSessionSpeed = "standard" | "fast" | string;
|
|
10
|
+
interface AgentHostAgentSessionPermissionModeOption {
|
|
11
|
+
id: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
semantic: AgentHostAgentSessionPermissionModeSemantic;
|
|
15
|
+
}
|
|
16
|
+
interface AgentHostAgentSessionPermissionConfig {
|
|
17
|
+
configurable: boolean;
|
|
18
|
+
defaultValue?: string | null;
|
|
19
|
+
modes: AgentHostAgentSessionPermissionModeOption[];
|
|
20
|
+
}
|
|
21
|
+
interface AgentHostAgentSessionComposerSettings {
|
|
22
|
+
model?: string | null;
|
|
23
|
+
reasoningEffort?: AgentHostAgentSessionReasoningEffort | null;
|
|
24
|
+
speed?: AgentHostAgentSessionSpeed | null;
|
|
25
|
+
planMode?: boolean;
|
|
26
|
+
browserUse?: boolean;
|
|
27
|
+
computerUse?: boolean;
|
|
28
|
+
permissionModeId?: string | null;
|
|
29
|
+
}
|
|
30
|
+
interface AgentHostAgentSession {
|
|
31
|
+
workspaceId: string;
|
|
32
|
+
agentSessionId: string;
|
|
33
|
+
provider: AgentHostAgentSessionProvider;
|
|
34
|
+
providerSessionId: string;
|
|
35
|
+
resumable?: boolean;
|
|
36
|
+
cwd?: string;
|
|
37
|
+
status: "ready" | "working" | "canceled" | "failed" | "completed" | string;
|
|
38
|
+
title?: string;
|
|
39
|
+
pinnedAtUnixMs?: number | null;
|
|
40
|
+
visible?: boolean;
|
|
41
|
+
permissionModeId?: string;
|
|
42
|
+
permissionConfig?: AgentHostAgentSessionPermissionConfig;
|
|
43
|
+
settings?: AgentHostAgentSessionComposerSettings;
|
|
44
|
+
createdAtUnixMs: number;
|
|
45
|
+
updatedAtUnixMs: number;
|
|
46
|
+
}
|
|
47
|
+
interface AgentHostAgentSessionInteractivePrompt {
|
|
48
|
+
kind: string;
|
|
49
|
+
requestId?: string;
|
|
50
|
+
toolName?: string;
|
|
51
|
+
status?: string;
|
|
52
|
+
input?: Record<string, unknown>;
|
|
53
|
+
output?: Record<string, unknown>;
|
|
54
|
+
error?: Record<string, unknown>;
|
|
55
|
+
metadata?: Record<string, unknown>;
|
|
56
|
+
}
|
|
57
|
+
interface AgentHostAgentSessionState {
|
|
58
|
+
workspaceId: string;
|
|
59
|
+
agentSessionId: string;
|
|
60
|
+
provider: AgentHostAgentSessionProvider;
|
|
61
|
+
providerSessionId?: string;
|
|
62
|
+
resumable?: boolean;
|
|
63
|
+
status: AgentHostAgentSession["status"];
|
|
64
|
+
permissionModeId?: string;
|
|
65
|
+
permissionConfig?: AgentHostAgentSessionPermissionConfig;
|
|
66
|
+
settings?: AgentHostAgentSessionComposerSettings;
|
|
67
|
+
authState?: string;
|
|
68
|
+
runtimeContext?: Record<string, unknown>;
|
|
69
|
+
pinnedAtUnixMs?: number | null;
|
|
70
|
+
pendingInteractive?: AgentHostAgentSessionInteractivePrompt | null;
|
|
71
|
+
updatedAtUnixMs: number;
|
|
72
|
+
}
|
|
73
|
+
type AgentHostAgentSessionActivationMode = "new" | "existing";
|
|
74
|
+
type AgentHostAgentSessionActivationStatus = "attached" | "already_attached" | "failed";
|
|
75
|
+
interface AgentHostActivateAgentSessionResult {
|
|
76
|
+
session: AgentHostAgentSession;
|
|
77
|
+
activation: {
|
|
78
|
+
mode: AgentHostAgentSessionActivationMode;
|
|
79
|
+
status: AgentHostAgentSessionActivationStatus;
|
|
80
|
+
};
|
|
81
|
+
error?: {
|
|
82
|
+
code: string;
|
|
83
|
+
message: string;
|
|
84
|
+
debugMessage?: string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
interface AgentHostUnactivateAgentSessionResult {
|
|
88
|
+
agentSessionId: string;
|
|
89
|
+
buffered: boolean;
|
|
90
|
+
}
|
|
91
|
+
interface AgentPromptContentBlock {
|
|
92
|
+
type: "text" | "image" | "file" | "skill" | "mention";
|
|
93
|
+
text?: string;
|
|
94
|
+
mimeType?: "image/png" | "image/jpeg" | "image/webp" | string;
|
|
95
|
+
data?: string;
|
|
96
|
+
url?: string;
|
|
97
|
+
attachmentId?: string;
|
|
98
|
+
name?: string;
|
|
99
|
+
path?: string;
|
|
100
|
+
uri?: string;
|
|
101
|
+
hostPath?: string;
|
|
102
|
+
uploadStatus?: string;
|
|
103
|
+
assetId?: string;
|
|
104
|
+
kind?: string;
|
|
105
|
+
sizeBytes?: number;
|
|
106
|
+
}
|
|
107
|
+
interface AgentHostUpdateAgentSessionSettingsResult {
|
|
108
|
+
agentSessionId: string;
|
|
109
|
+
settings: AgentHostAgentSessionComposerSettings;
|
|
110
|
+
}
|
|
111
|
+
interface AgentHostAgentSessionCommand {
|
|
112
|
+
name: string;
|
|
113
|
+
description?: string;
|
|
114
|
+
inputHint?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
type AgentAvailabilityStatus = "available" | "unavailable" | "unknown";
|
|
118
|
+
type AgentQuotaType = "session" | "weekly" | "monthly" | "daily" | "model" | "cost";
|
|
119
|
+
interface AgentAvailabilityCheck {
|
|
120
|
+
name: string;
|
|
121
|
+
passed: boolean;
|
|
122
|
+
detail?: string;
|
|
123
|
+
}
|
|
124
|
+
interface AgentAvailability {
|
|
125
|
+
status: AgentAvailabilityStatus;
|
|
126
|
+
detailsVisible: boolean;
|
|
127
|
+
checks?: AgentAvailabilityCheck[];
|
|
128
|
+
}
|
|
129
|
+
interface AgentUsageQuota {
|
|
130
|
+
quotaType: AgentQuotaType;
|
|
131
|
+
percentRemaining?: number;
|
|
132
|
+
resetsAtUnixMs?: number;
|
|
133
|
+
resetText?: string;
|
|
134
|
+
dollarRemaining?: number;
|
|
135
|
+
modelName?: string;
|
|
136
|
+
}
|
|
137
|
+
interface AgentCostUsage {
|
|
138
|
+
dollarUsed: number;
|
|
139
|
+
dollarLimit?: number;
|
|
140
|
+
}
|
|
141
|
+
interface AgentUsageSnapshot {
|
|
142
|
+
quotas?: AgentUsageQuota[];
|
|
143
|
+
accountTier?: string;
|
|
144
|
+
costUsage?: AgentCostUsage;
|
|
145
|
+
capturedAtUnixMs: number;
|
|
146
|
+
}
|
|
147
|
+
interface AgentProbeAttempt {
|
|
148
|
+
strategy: string;
|
|
149
|
+
success: boolean;
|
|
150
|
+
errorCode?: string;
|
|
151
|
+
errorMessage?: string;
|
|
152
|
+
}
|
|
153
|
+
interface AgentProbeError {
|
|
154
|
+
code: string;
|
|
155
|
+
message?: string;
|
|
156
|
+
}
|
|
157
|
+
interface AgentProbeProvider {
|
|
158
|
+
provider: string;
|
|
159
|
+
availability: AgentAvailability;
|
|
160
|
+
usage?: AgentUsageSnapshot;
|
|
161
|
+
attempts?: AgentProbeAttempt[];
|
|
162
|
+
lastError?: AgentProbeError;
|
|
163
|
+
}
|
|
164
|
+
interface AgentProbeSnapshot {
|
|
165
|
+
workspaceId: string;
|
|
166
|
+
roomId?: string;
|
|
167
|
+
capturedAtUnixMs: number;
|
|
168
|
+
providers: AgentProbeProvider[];
|
|
169
|
+
}
|
|
170
|
+
interface AgentHostListWorkspaceAgentProbesInput {
|
|
171
|
+
workspaceId: string;
|
|
172
|
+
/** Compatibility input while carried call sites finish migrating from TSH room naming. */
|
|
173
|
+
roomId?: string;
|
|
174
|
+
providers?: string[];
|
|
175
|
+
includeUsage?: boolean;
|
|
176
|
+
refresh?: boolean;
|
|
177
|
+
}
|
|
178
|
+
type AgentHostWorkspaceAgentProbesResult = AgentProbeSnapshot;
|
|
179
|
+
|
|
180
|
+
interface ReadWorkspaceFileResult {
|
|
181
|
+
bytes: Uint8Array;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
type AgentHostAsyncResult<T = any> = Promise<T>;
|
|
185
|
+
type AgentHostRecord = Record<string, unknown>;
|
|
186
|
+
type AgentHostUnsubscribe = () => void;
|
|
187
|
+
type AgentHostWorkspaceScopedInput<T extends {
|
|
188
|
+
workspaceId?: string | null;
|
|
189
|
+
}> = Omit<T, "workspaceId"> & {
|
|
190
|
+
workspaceId: string;
|
|
191
|
+
};
|
|
192
|
+
type AgentHostWorkspaceAgentsListInput = AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentListInput>;
|
|
193
|
+
type AgentHostWorkspaceAgentSessionMessagesRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionMessagesInput>;
|
|
194
|
+
type AgentHostWorkspaceAgentSessionSummaryRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionSummaryInput>;
|
|
195
|
+
type AgentHostDeleteWorkspaceAgentSessionRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostDeleteWorkspaceAgentSessionInput>;
|
|
196
|
+
type AgentHostClipboardApi = {
|
|
197
|
+
writeText: (text: string) => AgentHostAsyncResult<void>;
|
|
198
|
+
};
|
|
199
|
+
type AgentHostDebugApi = {
|
|
200
|
+
logRuntimeDiagnostics: (payload: unknown) => AgentHostAsyncResult<void> | void;
|
|
201
|
+
logTerminalDiagnostics?: (payload: unknown) => AgentHostAsyncResult<void> | void;
|
|
202
|
+
};
|
|
203
|
+
type AgentHostFilesystemApi = AgentHostRecord & {
|
|
204
|
+
readFileText: (payload: {
|
|
205
|
+
path?: string;
|
|
206
|
+
uri?: string;
|
|
207
|
+
}) => AgentHostAsyncResult<{
|
|
208
|
+
content: string;
|
|
209
|
+
name?: string;
|
|
210
|
+
path?: string;
|
|
211
|
+
}>;
|
|
212
|
+
};
|
|
213
|
+
type AgentHostMetaApi = AgentHostRecord & {
|
|
214
|
+
appVersion?: string | null;
|
|
215
|
+
isPackaged?: boolean;
|
|
216
|
+
isTest?: boolean;
|
|
217
|
+
mainPid?: number | null;
|
|
218
|
+
platform?: string;
|
|
219
|
+
workspaceId?: string;
|
|
220
|
+
};
|
|
221
|
+
type AgentHostEnvironmentApi = AgentHostRecord & {
|
|
222
|
+
getBaseUrl?: () => AgentHostAsyncResult<string>;
|
|
223
|
+
warmupOpenclawGateway?: (input?: unknown) => AgentHostAsyncResult<unknown>;
|
|
224
|
+
};
|
|
225
|
+
interface AgentHostSelectedFile {
|
|
226
|
+
name?: string;
|
|
227
|
+
path: string;
|
|
228
|
+
}
|
|
229
|
+
type AgentHostWorkspaceApi = AgentHostRecord & {
|
|
230
|
+
copyPath?: (input: {
|
|
231
|
+
path: string;
|
|
232
|
+
}) => AgentHostAsyncResult<void>;
|
|
233
|
+
ensureDirectory: (input: {
|
|
234
|
+
path: string;
|
|
235
|
+
}) => AgentHostAsyncResult<void>;
|
|
236
|
+
getPathForFile: (file: File) => string;
|
|
237
|
+
readFile: (input: {
|
|
238
|
+
path: string;
|
|
239
|
+
}) => AgentHostAsyncResult<ReadWorkspaceFileResult>;
|
|
240
|
+
selectContextEntries?: () => AgentHostAsyncResult<{
|
|
241
|
+
entries: unknown[];
|
|
242
|
+
}>;
|
|
243
|
+
selectDirectory: () => AgentHostAsyncResult<{
|
|
244
|
+
path: string;
|
|
245
|
+
} | null>;
|
|
246
|
+
selectFiles: () => AgentHostAsyncResult<AgentHostSelectedFile[]>;
|
|
247
|
+
writeFileText: (input: {
|
|
248
|
+
content: string;
|
|
249
|
+
path: string;
|
|
250
|
+
}) => AgentHostAsyncResult<unknown>;
|
|
251
|
+
};
|
|
252
|
+
interface AgentHostInputApi {
|
|
253
|
+
account?: AgentHostAccountApi;
|
|
254
|
+
agentGuiBatch?: AgentHostAgentGuiBatchApi;
|
|
255
|
+
agentSessions?: AgentHostAgentSessionsApi;
|
|
256
|
+
clipboard: AgentHostClipboardApi;
|
|
257
|
+
debug?: AgentHostDebugApi;
|
|
258
|
+
filesystem: AgentHostFilesystemApi;
|
|
259
|
+
meta?: AgentHostMetaApi;
|
|
260
|
+
onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;
|
|
261
|
+
runtime?: AgentHostEnvironmentApi;
|
|
262
|
+
userProjects?: AgentHostUserProjectsApi;
|
|
263
|
+
workspace: AgentHostWorkspaceApi;
|
|
264
|
+
workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;
|
|
265
|
+
workspaceAgents?: AgentHostWorkspaceAgentsApi;
|
|
266
|
+
}
|
|
267
|
+
type AgentHostApi = AgentHostInputApi;
|
|
268
|
+
type AgentHostAccountApi = AgentHostRecord & {
|
|
269
|
+
batchGetUserInfo: (input: AgentHostBatchUserInfoInput) => AgentHostAsyncResult<AgentHostBatchUserInfoResult>;
|
|
270
|
+
ensureProfiles?: (input: any) => AgentHostAsyncResult<any>;
|
|
271
|
+
};
|
|
272
|
+
type AgentHostAgentGuiBatchApi = AgentHostRecord & {
|
|
273
|
+
exportRun: (input: any) => AgentHostAsyncResult<any>;
|
|
274
|
+
};
|
|
275
|
+
type AgentHostWorkspaceAgentProbesApi = AgentHostRecord & {
|
|
276
|
+
list: (input: AgentHostListWorkspaceAgentProbesInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentProbesResult>;
|
|
277
|
+
};
|
|
278
|
+
type AgentProviderProbeListInput = AgentHostListWorkspaceAgentProbesInput;
|
|
279
|
+
type AgentProviderProbeListResult = AgentHostWorkspaceAgentProbesResult;
|
|
280
|
+
interface AgentHostUserProject {
|
|
281
|
+
id: string;
|
|
282
|
+
path: string;
|
|
283
|
+
label: string;
|
|
284
|
+
createdAtUnixMs?: number;
|
|
285
|
+
updatedAtUnixMs?: number;
|
|
286
|
+
lastUsedAtUnixMs?: number;
|
|
287
|
+
}
|
|
288
|
+
type AgentHostUserProjectsApi = AgentHostRecord & {
|
|
289
|
+
service?: WorkspaceUserProjectService;
|
|
290
|
+
checkPath?: (input: {
|
|
291
|
+
path: string;
|
|
292
|
+
}) => AgentHostAsyncResult<{
|
|
293
|
+
exists: boolean;
|
|
294
|
+
isDirectory: boolean;
|
|
295
|
+
path: string;
|
|
296
|
+
}>;
|
|
297
|
+
create?: (input: {
|
|
298
|
+
name: string;
|
|
299
|
+
}) => AgentHostAsyncResult<AgentHostUserProject>;
|
|
300
|
+
getDefaultSelection?: () => AgentHostAsyncResult<{
|
|
301
|
+
path: string | null;
|
|
302
|
+
} | null>;
|
|
303
|
+
list: () => AgentHostAsyncResult<{
|
|
304
|
+
projects: AgentHostUserProject[];
|
|
305
|
+
}>;
|
|
306
|
+
subscribe?: (listener: () => void) => AgentHostUnsubscribe;
|
|
307
|
+
prepareSelection?: (input: {
|
|
308
|
+
projectLocked: boolean;
|
|
309
|
+
selectedPath: string | null;
|
|
310
|
+
}) => AgentHostAsyncResult<{
|
|
311
|
+
isSelectedPathMissing: boolean;
|
|
312
|
+
projects: AgentHostUserProject[];
|
|
313
|
+
selection: {
|
|
314
|
+
kind: "clear";
|
|
315
|
+
suppressedPath: string;
|
|
316
|
+
} | {
|
|
317
|
+
kind: "none";
|
|
318
|
+
} | {
|
|
319
|
+
kind: "select";
|
|
320
|
+
path: string;
|
|
321
|
+
};
|
|
322
|
+
}>;
|
|
323
|
+
remove?: (input: {
|
|
324
|
+
path: string;
|
|
325
|
+
}) => AgentHostAsyncResult<void>;
|
|
326
|
+
isNoProjectPath?: (input: {
|
|
327
|
+
path: string;
|
|
328
|
+
}) => boolean;
|
|
329
|
+
rememberDefaultSelection?: (input: {
|
|
330
|
+
path: string | null;
|
|
331
|
+
}) => AgentHostAsyncResult<void>;
|
|
332
|
+
use: (input: {
|
|
333
|
+
path: string;
|
|
334
|
+
}) => AgentHostAsyncResult<AgentHostUserProject>;
|
|
335
|
+
};
|
|
336
|
+
type AgentHostAgentSessionsApi = AgentHostRecord & {
|
|
337
|
+
activate: (input: any) => AgentHostAsyncResult<any>;
|
|
338
|
+
/**
|
|
339
|
+
* @deprecated AgentGUI production writes must use AgentActivityRuntime.cancelSession.
|
|
340
|
+
*/
|
|
341
|
+
cancel: (input: any) => AgentHostAsyncResult<any>;
|
|
342
|
+
/**
|
|
343
|
+
* @deprecated AgentGUI production writes must use AgentActivityRuntime.sendInput.
|
|
344
|
+
*/
|
|
345
|
+
exec: (input: any) => AgentHostAsyncResult<any>;
|
|
346
|
+
getComposerOptions?: (input: any) => AgentHostAsyncResult<any>;
|
|
347
|
+
getState: (input: any) => AgentHostAsyncResult<any>;
|
|
348
|
+
onEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;
|
|
349
|
+
/**
|
|
350
|
+
* @deprecated AgentGUI production writes must use AgentActivityRuntime.setSessionPinned.
|
|
351
|
+
*/
|
|
352
|
+
pinSession?: (input: any) => AgentHostAsyncResult<any>;
|
|
353
|
+
/**
|
|
354
|
+
* @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.
|
|
355
|
+
*/
|
|
356
|
+
releaseEventStream?: (input?: any) => AgentHostAsyncResult;
|
|
357
|
+
/**
|
|
358
|
+
* @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.
|
|
359
|
+
*/
|
|
360
|
+
retainEventStream?: (input: any) => AgentHostAsyncResult;
|
|
361
|
+
/**
|
|
362
|
+
* @deprecated AgentGUI production writes must use AgentActivityRuntime.submitInteractive.
|
|
363
|
+
*/
|
|
364
|
+
submitInteractive: (input: any) => AgentHostAsyncResult<any>;
|
|
365
|
+
/**
|
|
366
|
+
* @deprecated AgentGUI production UI must derive events from AgentActivityRuntime snapshots.
|
|
367
|
+
*/
|
|
368
|
+
trackSettingsProjectChange?: (input: {
|
|
369
|
+
action: "clear" | "create_new" | "select_existing";
|
|
370
|
+
agentSessionId: string;
|
|
371
|
+
provider?: string | null;
|
|
372
|
+
}) => AgentHostAsyncResult<void>;
|
|
373
|
+
subscribeEvents: (input: any, listener: (event: any) => void) => AgentHostUnsubscribe;
|
|
374
|
+
unactivate: (input: any) => AgentHostAsyncResult<any>;
|
|
375
|
+
updateSettings: (input: any) => AgentHostAsyncResult<any>;
|
|
376
|
+
};
|
|
377
|
+
/**
|
|
378
|
+
* @deprecated Legacy host DTO projection. AgentGUI production reads and writes
|
|
379
|
+
* must use AgentActivityRuntime and AgentActivity* models.
|
|
380
|
+
*/
|
|
381
|
+
type AgentHostWorkspaceAgentsApi = AgentHostRecord & {
|
|
382
|
+
/**
|
|
383
|
+
* @deprecated Use AgentActivityRuntime.deleteSession.
|
|
384
|
+
*/
|
|
385
|
+
deleteSession: (input: AgentHostDeleteWorkspaceAgentSessionRuntimeInput) => AgentHostAsyncResult<any>;
|
|
386
|
+
/**
|
|
387
|
+
* @deprecated Derive summaries from AgentActivitySnapshot/session messages.
|
|
388
|
+
*/
|
|
389
|
+
getSessionSummary: (input: AgentHostWorkspaceAgentSessionSummaryRuntimeInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionSummary>;
|
|
390
|
+
/**
|
|
391
|
+
* @deprecated Use AgentActivityRuntime.load/getSnapshot.
|
|
392
|
+
*/
|
|
393
|
+
list: (input: string | AgentHostWorkspaceAgentsListInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentSnapshot>;
|
|
394
|
+
/**
|
|
395
|
+
* @deprecated Use AgentActivityRuntime.listSessionMessages.
|
|
396
|
+
*/
|
|
397
|
+
listSessionMessages: (input: AgentHostWorkspaceAgentSessionMessagesRuntimeInput) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionMessages>;
|
|
398
|
+
};
|
|
399
|
+
interface AgentHostRuntimeApi {
|
|
400
|
+
account?: AgentHostAccountApi;
|
|
401
|
+
agentGuiBatch: AgentHostAgentGuiBatchApi;
|
|
402
|
+
clipboard: AgentHostClipboardApi;
|
|
403
|
+
debug?: AgentHostDebugApi;
|
|
404
|
+
filesystem: AgentHostFilesystemApi;
|
|
405
|
+
meta?: AgentHostMetaApi;
|
|
406
|
+
onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;
|
|
407
|
+
runtime?: AgentHostEnvironmentApi;
|
|
408
|
+
userProjects?: AgentHostUserProjectsApi;
|
|
409
|
+
workspace: AgentHostWorkspaceApi;
|
|
410
|
+
workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
declare const AGENT_PROVIDERS: readonly ["claude-code", "codex", "nexight", "opencode", "gemini", "openclaw", "hermes"];
|
|
414
|
+
type AgentProvider = (typeof AGENT_PROVIDERS)[number];
|
|
415
|
+
|
|
416
|
+
interface AgentGUINodeData {
|
|
417
|
+
provider: AgentGUIProvider;
|
|
418
|
+
lastActiveAgentSessionId: string | null;
|
|
419
|
+
lastActiveConversationTitle?: string | null;
|
|
420
|
+
conversationCount?: number | null;
|
|
421
|
+
conversationRailWidthPx?: number | null;
|
|
422
|
+
conversationRailCollapsed?: boolean | null;
|
|
423
|
+
composerOverrides?: AgentHostAgentSessionComposerSettings | null;
|
|
424
|
+
composerOverridesByProvider?: Partial<Record<AgentGUIProvider, AgentHostAgentSessionComposerSettings | null>> | null;
|
|
425
|
+
}
|
|
426
|
+
type AgentGUIProvider = Extract<AgentProvider, "claude-code" | "codex" | "nexight" | "gemini" | "hermes" | "openclaw">;
|
|
427
|
+
interface Size {
|
|
428
|
+
width: number;
|
|
429
|
+
height: number;
|
|
430
|
+
}
|
|
431
|
+
interface Point {
|
|
432
|
+
x: number;
|
|
433
|
+
y: number;
|
|
434
|
+
}
|
|
435
|
+
interface NodeFrame {
|
|
436
|
+
position: Point;
|
|
437
|
+
size: Size;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
type AgentSessionCommand = AgentHostAgentSessionCommand;
|
|
441
|
+
type AgentSessionComposerSettings = AgentHostAgentSessionComposerSettings;
|
|
442
|
+
type AgentSessionPermissionConfig = AgentHostAgentSessionPermissionConfig;
|
|
443
|
+
type AgentSessionReasoningEffort = AgentHostAgentSessionReasoningEffort;
|
|
444
|
+
type AgentSessionSpeed = AgentHostAgentSessionSpeed;
|
|
445
|
+
type AgentSessionState = AgentHostAgentSessionState;
|
|
446
|
+
|
|
447
|
+
type AgentGUIResolvedProvider = AgentGUIProvider | "unknown";
|
|
448
|
+
type AgentGUIConversationTitleFallback = "generic-agent" | null;
|
|
449
|
+
|
|
450
|
+
interface AgentGUIConversationProjectSummary {
|
|
451
|
+
id: string;
|
|
452
|
+
path: string;
|
|
453
|
+
label: string;
|
|
454
|
+
createdAtUnixMs?: number;
|
|
455
|
+
updatedAtUnixMs?: number;
|
|
456
|
+
lastUsedAtUnixMs?: number;
|
|
457
|
+
}
|
|
458
|
+
type AgentGUIConversationUserProject = Pick<AgentHostUserProject, "id" | "path" | "label" | "createdAtUnixMs" | "updatedAtUnixMs" | "lastUsedAtUnixMs">;
|
|
459
|
+
|
|
460
|
+
interface AgentGUIConversationSummary {
|
|
461
|
+
id: string;
|
|
462
|
+
userId?: string;
|
|
463
|
+
provider: AgentGUIResolvedProvider;
|
|
464
|
+
resumable?: boolean;
|
|
465
|
+
title: string;
|
|
466
|
+
titleFallback?: AgentGUIConversationTitleFallback;
|
|
467
|
+
status: AgentGUIConversationStatus;
|
|
468
|
+
cwd: string;
|
|
469
|
+
project?: AgentGUIConversationProjectSummary | null;
|
|
470
|
+
pinnedAtUnixMs?: number | null;
|
|
471
|
+
sortTimeUnixMs?: number;
|
|
472
|
+
updatedAtUnixMs: number;
|
|
473
|
+
hasUnreadCompletion?: boolean;
|
|
474
|
+
syncState?: WorkspaceAgentActivitySyncState;
|
|
475
|
+
}
|
|
476
|
+
type AgentGUIConversationStatus = "working" | "waiting" | "ready" | "completed" | "failed" | "canceled";
|
|
477
|
+
type AgentGUIApprovalRequest = AgentApprovalItemVM;
|
|
478
|
+
interface AgentGUIInteractiveQuestion extends AgentAskUserQuestionVM {
|
|
479
|
+
isOther?: boolean;
|
|
480
|
+
}
|
|
481
|
+
type AgentGUIInteractivePrompt = AgentGUIApprovalRequest | {
|
|
482
|
+
kind: "ask-user";
|
|
483
|
+
requestId: string;
|
|
484
|
+
title: string;
|
|
485
|
+
questions: AgentGUIInteractiveQuestion[];
|
|
486
|
+
} | Extract<AgentConversationPromptVM, {
|
|
487
|
+
kind: "exit-plan";
|
|
488
|
+
}> | Extract<AgentConversationPromptVM, {
|
|
489
|
+
kind: "plan-implementation";
|
|
490
|
+
}>;
|
|
491
|
+
|
|
492
|
+
type UsageAlertTier = "warn" | "critical";
|
|
493
|
+
|
|
494
|
+
interface AgentGUISessionChrome {
|
|
495
|
+
auth: {
|
|
496
|
+
message: string;
|
|
497
|
+
} | null;
|
|
498
|
+
approval: AgentGUIApprovalRequest | null;
|
|
499
|
+
recovery: {
|
|
500
|
+
kind: "activating" | "failed" | "warning";
|
|
501
|
+
message: string;
|
|
502
|
+
canRetry?: boolean;
|
|
503
|
+
followupAction?: "continue-in-new-conversation";
|
|
504
|
+
} | null;
|
|
505
|
+
rawState: AgentSessionState | null;
|
|
506
|
+
}
|
|
507
|
+
interface OpenclawGatewayViewState {
|
|
508
|
+
status: "starting" | "ready" | "failed";
|
|
509
|
+
error: string | null;
|
|
510
|
+
}
|
|
511
|
+
interface AgentGUIInlineNotice {
|
|
512
|
+
id: string;
|
|
513
|
+
message: string;
|
|
514
|
+
tone: "warning" | "error";
|
|
515
|
+
autoDismissMs: number | null;
|
|
516
|
+
}
|
|
517
|
+
interface AgentGUIProjectConversationDeleteTarget {
|
|
518
|
+
conversationCount: number;
|
|
519
|
+
label: string;
|
|
520
|
+
path: string;
|
|
521
|
+
}
|
|
522
|
+
interface AgentGUIComposerSettingOption {
|
|
523
|
+
value: string;
|
|
524
|
+
label: string;
|
|
525
|
+
description?: string;
|
|
526
|
+
}
|
|
527
|
+
interface AgentGUIProviderSkillOption {
|
|
528
|
+
name: string;
|
|
529
|
+
trigger: string;
|
|
530
|
+
sourceKind: "project" | "personal" | "bundled" | "plugin" | "system" | "tutti-injected" | "connector";
|
|
531
|
+
description?: string;
|
|
532
|
+
pluginName?: string;
|
|
533
|
+
path?: string;
|
|
534
|
+
kind?: "skill" | "connector";
|
|
535
|
+
}
|
|
536
|
+
interface AgentComposerDraftImage {
|
|
537
|
+
id: string;
|
|
538
|
+
name: string;
|
|
539
|
+
mimeType: "image/png" | "image/jpeg" | "image/webp";
|
|
540
|
+
data?: string;
|
|
541
|
+
path?: string;
|
|
542
|
+
previewUrl: string;
|
|
543
|
+
uploading?: boolean;
|
|
544
|
+
uploadError?: string;
|
|
545
|
+
}
|
|
546
|
+
interface AgentComposerDraftFile {
|
|
547
|
+
id: string;
|
|
548
|
+
name: string;
|
|
549
|
+
mimeType?: string;
|
|
550
|
+
path?: string;
|
|
551
|
+
hostPath?: string;
|
|
552
|
+
assetId?: string;
|
|
553
|
+
sizeBytes?: number;
|
|
554
|
+
uploading?: boolean;
|
|
555
|
+
uploadError?: string;
|
|
556
|
+
}
|
|
557
|
+
interface AgentComposerDraft {
|
|
558
|
+
prompt: string;
|
|
559
|
+
images: AgentComposerDraftImage[];
|
|
560
|
+
files?: AgentComposerDraftFile[];
|
|
561
|
+
}
|
|
562
|
+
interface AgentGUIComposerSettingsVM {
|
|
563
|
+
sessionSettings: AgentSessionComposerSettings | null;
|
|
564
|
+
draftSettings: {
|
|
565
|
+
model: string | null;
|
|
566
|
+
reasoningEffort: AgentSessionReasoningEffort | null;
|
|
567
|
+
speed: AgentSessionSpeed | null;
|
|
568
|
+
planMode: boolean;
|
|
569
|
+
browserUse?: boolean;
|
|
570
|
+
computerUse?: boolean;
|
|
571
|
+
permissionModeId?: string | null;
|
|
572
|
+
};
|
|
573
|
+
supportsModel: boolean;
|
|
574
|
+
supportsReasoningEffort: boolean;
|
|
575
|
+
supportsSpeed: boolean;
|
|
576
|
+
supportsPermissionMode?: boolean;
|
|
577
|
+
supportsPlanMode: boolean;
|
|
578
|
+
planExclusiveWithPermissionMode?: boolean;
|
|
579
|
+
supportsBrowser?: boolean;
|
|
580
|
+
supportsComputerUse?: boolean;
|
|
581
|
+
isSettingsLoading: boolean;
|
|
582
|
+
modelUnavailable: boolean;
|
|
583
|
+
reasoningUnavailable: boolean;
|
|
584
|
+
speedUnavailable: boolean;
|
|
585
|
+
permissionModeUnavailable?: boolean;
|
|
586
|
+
selectedModelValue?: string | null;
|
|
587
|
+
selectedReasoningEffortValue?: AgentSessionReasoningEffort | null;
|
|
588
|
+
selectedSpeedValue?: AgentSessionSpeed | null;
|
|
589
|
+
selectedPermissionModeValue?: string | null;
|
|
590
|
+
permissionConfig?: AgentSessionPermissionConfig | null;
|
|
591
|
+
selectedProjectPath?: string | null;
|
|
592
|
+
projectLocked?: boolean;
|
|
593
|
+
availableModels: AgentGUIComposerSettingOption[];
|
|
594
|
+
availableReasoningEfforts: AgentGUIComposerSettingOption[];
|
|
595
|
+
availableSpeeds: AgentGUIComposerSettingOption[];
|
|
596
|
+
availablePermissionModes?: AgentGUIComposerSettingOption[];
|
|
597
|
+
}
|
|
598
|
+
interface AgentGUIQueuedPromptVM {
|
|
599
|
+
id: string;
|
|
600
|
+
content: AgentPromptContentBlock[];
|
|
601
|
+
/** 仅展示用文本(bundle 折叠成一个 chip);content 仍带展开后的文件。 */
|
|
602
|
+
displayPrompt?: string;
|
|
603
|
+
createdAtUnixMs: number;
|
|
604
|
+
}
|
|
605
|
+
interface AgentGUINodeViewModel {
|
|
606
|
+
workspaceId: string;
|
|
607
|
+
workspacePath?: string | null;
|
|
608
|
+
currentUserId?: string | null;
|
|
609
|
+
data: AgentGUINodeData;
|
|
610
|
+
conversations: AgentGUIConversationSummary[];
|
|
611
|
+
userProjects: AgentGUIConversationUserProject[];
|
|
612
|
+
activeConversation: AgentGUIConversationSummary | null;
|
|
613
|
+
activeConversationId: string | null;
|
|
614
|
+
availableCommands: AgentSessionCommand[];
|
|
615
|
+
availableSkills: AgentGUIProviderSkillOption[];
|
|
616
|
+
draftPrompt: string;
|
|
617
|
+
draftContent: AgentComposerDraft;
|
|
618
|
+
isLoadingConversations: boolean;
|
|
619
|
+
isLoadingMessages: boolean;
|
|
620
|
+
isCreatingConversation: boolean;
|
|
621
|
+
isSubmitting: boolean;
|
|
622
|
+
isInterrupting: boolean;
|
|
623
|
+
isRespondingApproval: boolean;
|
|
624
|
+
promptImagesSupported: boolean;
|
|
625
|
+
compactSupported: boolean | null;
|
|
626
|
+
usage: AgentActivityUsage | null;
|
|
627
|
+
usageAlert: UsageAlertTier | null;
|
|
628
|
+
/** Codex plan turn finished: offer the TUI-equivalent implement prompt. */
|
|
629
|
+
listError: string | null;
|
|
630
|
+
isDeletingConversation: boolean;
|
|
631
|
+
isDeletingProjectConversations: boolean;
|
|
632
|
+
pendingDeleteConversation: AgentGUIConversationSummary | null;
|
|
633
|
+
pendingDeleteProjectConversations: AgentGUIProjectConversationDeleteTarget | null;
|
|
634
|
+
pendingApproval: AgentGUIApprovalRequest | null;
|
|
635
|
+
pendingInteractivePrompt: AgentGUIInteractivePrompt | null;
|
|
636
|
+
activeLiveState: "inactive" | "activating" | "active" | "failed";
|
|
637
|
+
activationError: string | null;
|
|
638
|
+
openclawGateway: OpenclawGatewayViewState | null;
|
|
639
|
+
canSubmit: boolean;
|
|
640
|
+
composerSettings: AgentGUIComposerSettingsVM;
|
|
641
|
+
queuedPrompts: AgentGUIQueuedPromptVM[];
|
|
642
|
+
drainingQueuedPromptId: string | null;
|
|
643
|
+
canQueueWhileBusy: boolean;
|
|
644
|
+
hasSentUserMessage: boolean;
|
|
645
|
+
avoidGroupingEdits: boolean;
|
|
646
|
+
conversation?: AgentConversationVM | null;
|
|
647
|
+
conversationDetail: WorkspaceAgentSessionDetailViewModel | null;
|
|
648
|
+
sessionChrome: AgentGUISessionChrome;
|
|
649
|
+
inlineNotice: AgentGUIInlineNotice | null;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
interface AgentMessageMarkdownWorkspaceAppIcon {
|
|
653
|
+
appId: string;
|
|
654
|
+
iconUrl: string | null;
|
|
655
|
+
workspaceId?: string | null;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export type { AgentGUINodeData as A, NodeFrame as N, Point as P, AgentGUINodeViewModel as a, AgentGUIProviderSkillOption as b, AgentHostActivateAgentSessionResult as c, AgentHostAgentSessionComposerSettings as d, AgentHostAgentSessionState as e, AgentHostApi as f, AgentHostInputApi as g, AgentHostRuntimeApi as h, AgentHostUnactivateAgentSessionResult as i, AgentHostUpdateAgentSessionSettingsResult as j, AgentMessageMarkdownWorkspaceAppIcon as k, AgentProbeProvider as l, AgentProbeSnapshot as m, AgentProvider as n, AgentProviderProbeListInput as o, AgentProviderProbeListResult as p, AgentUsageQuota as q, AgentUsageSnapshot as r };
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, JSX } from 'react';
|
|
3
3
|
import { W as WorkspaceLinkAction } from '../workspaceLinkActions-CqWZaCY4.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
export { B as BuildWorkspaceAgentSessionDetailInput,
|
|
7
|
-
export { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession,
|
|
4
|
+
import { b as AgentGUIProviderSkillOption, k as AgentMessageMarkdownWorkspaceAppIcon } from '../AgentMessageMarkdown-BnpM_dCB.js';
|
|
5
|
+
import { c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-BvlmCNOm.js';
|
|
6
|
+
export { B as BuildWorkspaceAgentSessionDetailInput, d as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-BvlmCNOm.js';
|
|
7
|
+
export { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, q as WorkspaceAgentActivityTimelineItem } from '../workspaceAgentActivityListViewModel-jRF8cP37.js';
|
|
8
8
|
import '@tutti-os/workspace-issue-manager/core';
|
|
9
9
|
import '@tutti-os/agent-activity-core';
|
|
10
|
-
|
|
11
|
-
interface AgentGUIProviderSkillOption {
|
|
12
|
-
name: string;
|
|
13
|
-
trigger: string;
|
|
14
|
-
sourceKind: "project" | "personal" | "bundled" | "plugin" | "system" | "tutti-injected" | "connector";
|
|
15
|
-
description?: string;
|
|
16
|
-
pluginName?: string;
|
|
17
|
-
path?: string;
|
|
18
|
-
kind?: "skill" | "connector";
|
|
19
|
-
}
|
|
10
|
+
import '@tutti-os/workspace-user-project/contracts';
|
|
20
11
|
|
|
21
12
|
interface AgentConversationFlowProps {
|
|
22
13
|
conversation: AgentConversationVM | null;
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
projectAgentConversationVM,
|
|
7
7
|
reconcileProjectedAgentConversationVM,
|
|
8
8
|
useProjectedAgentConversation
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-3QDLVPMJ.js";
|
|
10
|
+
import "../chunk-VNRRXUI3.js";
|
|
11
11
|
import "../chunk-XAQQN6MP.js";
|
|
12
12
|
import "../chunk-XJ34OIEQ.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-YHRJD6HA.js";
|
|
14
14
|
import "../chunk-TYGL25EL.js";
|
|
15
15
|
import {
|
|
16
16
|
translate
|