@bbigbang/protocol 0.1.0
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/agentSurface.d.ts +5 -0
- package/dist/agentSurface.js +11 -0
- package/dist/handoff.d.ts +45 -0
- package/dist/handoff.js +6 -0
- package/dist/index.d.ts +3685 -0
- package/dist/index.js +398 -0
- package/dist/panel.d.ts +823 -0
- package/dist/panel.js +2116 -0
- package/package.json +31 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3685 @@
|
|
|
1
|
+
import type { DatasetFieldSchema, DatasetMediaSlotSchema, PanelLevelNode, PanelSubmitKind, PanelTemplateNode } from './panel.js';
|
|
2
|
+
import type { AgentSurfaceMode } from './agentSurface.js';
|
|
3
|
+
export { validatePanelTemplateProps } from './panel.js';
|
|
4
|
+
export { collectDatasetAggregateNodes, collectPanelLevelActionBars, collectPanelLevelParameterInputs, collectPanelLevelUnsupportedNodes, collectPanelTemplateUnsupportedNodes, isPanelLevelActionBarNode, isPanelLevelContainerNode, isPanelLevelDatasetAggregateNode, isPanelLevelNodeEffectivelyEmpty, isPanelLevelParameterInputNode, isPanelTemplateContainerNode, mapPanelLevelNodes, matchPanelApiJsonlAllowedUrlPrefix, normalizePanelApiJsonlAuthProfileName, normalizePanelApiJsonlAuthProfileNames, normalizePanelApiJsonlAllowedUrlPrefix, normalizePanelApiJsonlAllowedUrlPrefixes, panelLevelNodeContainsEmptyLayoutContainer, panelLevelNodeHasActionBar, panelLevelNodeUsesDatasetAggregate, validatePanelApiJsonlAuthProfile, validatePanelApiJsonlUrl, validatePanelApiJsonlUrlList, walkPanelTemplateNodes, walkPanelLevelNodes, } from './panel.js';
|
|
5
|
+
export type { MapPanelLevelNodesOptions, PanelApiJsonlAuthProfile, PanelApiJsonlDatasetSource, PanelLevelActionBarNode, PanelLevelContainerNode, PanelLevelDatasetAggregateNode, PanelLevelNode, PanelLevelNodeMapper, PanelLevelNodeVisitor, PanelLevelNodeWalkContext, PanelLevelParameterInputNode, PanelTemplateContainerNode, PanelTemplateNode, PanelTemplateNodeVisitor, PanelTemplateNodeWalkContext, PanelTemplateUnsupportedNodePolicy, PanelLevelUnsupportedNodePolicy, PanelSemanticEvent, PanelSemanticEventRefs, PanelSemanticEventWakePolicy, RowTemplateGridProps, } from './panel.js';
|
|
6
|
+
export type AgentType = 'claude_acp' | 'claude_sdk' | 'codex_acp' | 'codex_app_server';
|
|
7
|
+
export { AGENT_SURFACE_MODE_ENV, AGENT_SURFACE_MODES, DEFAULT_AGENT_SURFACE_MODE, normalizeAgentSurfaceMode, } from './agentSurface.js';
|
|
8
|
+
export type { AgentSurfaceMode } from './agentSurface.js';
|
|
9
|
+
export declare const BUILTIN_UI_PANEL_SKILL_ROOT_SENTINEL = "bigbang:builtin/ui-panel";
|
|
10
|
+
export declare const BUILTIN_LIBRARY_DOCUMENTS_SKILL_ROOT_SENTINEL = "bigbang:builtin/library-documents";
|
|
11
|
+
export declare const BUILTIN_WORKSPACE_TOOL_SKILL_ROOT_SENTINEL = "bigbang:builtin/workspace-tool-builder";
|
|
12
|
+
export type AgentRole = 'user' | 'platform_agent' | 'library_curator' | 'suggested_planner';
|
|
13
|
+
export type ConversationStatus = 'idle' | 'queued' | 'active' | 'recovering' | 'awaiting_approval' | 'failed';
|
|
14
|
+
export type ThreadKind = 'direct' | 'branch';
|
|
15
|
+
export type ServerIdentityResult = {
|
|
16
|
+
serverId: string;
|
|
17
|
+
serverSlug: string;
|
|
18
|
+
serverName: string;
|
|
19
|
+
publicServerUrl: string | null;
|
|
20
|
+
publicBasePath: string | null;
|
|
21
|
+
version?: string;
|
|
22
|
+
};
|
|
23
|
+
export type CreateHubServerRegistrationTokenRequest = {
|
|
24
|
+
serverSlug: string;
|
|
25
|
+
serverName: string;
|
|
26
|
+
version?: string;
|
|
27
|
+
expiresInSeconds?: number;
|
|
28
|
+
};
|
|
29
|
+
export type HubServerRegistrationTokenResult = {
|
|
30
|
+
token: string;
|
|
31
|
+
expiresAt: number;
|
|
32
|
+
installCommand: string;
|
|
33
|
+
serverId: string;
|
|
34
|
+
serverSlug: string;
|
|
35
|
+
serverName: string;
|
|
36
|
+
version: string;
|
|
37
|
+
};
|
|
38
|
+
export type ClaimHubServerRegistrationRequest = {
|
|
39
|
+
token: string;
|
|
40
|
+
serverId: string;
|
|
41
|
+
serverSlug: string;
|
|
42
|
+
serverName: string;
|
|
43
|
+
upstream: string;
|
|
44
|
+
bridgeUrl: string;
|
|
45
|
+
version: string;
|
|
46
|
+
};
|
|
47
|
+
export type ClaimHubServerRegistrationResult = {
|
|
48
|
+
ok: true;
|
|
49
|
+
serverId: string;
|
|
50
|
+
serverSlug: string;
|
|
51
|
+
serverName: string;
|
|
52
|
+
upstream: string;
|
|
53
|
+
replaced: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type AgentPermissionKind = 'read' | 'edit' | 'delete' | 'move' | 'search' | 'execute' | 'think' | 'fetch' | 'switch_mode' | 'other';
|
|
56
|
+
export type AgentPermissionSupportLevel = 'enforced' | 'limited' | 'unsupported';
|
|
57
|
+
export declare const AGENT_PERMISSION_KINDS: AgentPermissionKind[];
|
|
58
|
+
export type AgentPermissionDefinition = {
|
|
59
|
+
kind: AgentPermissionKind;
|
|
60
|
+
label: string;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
export declare const AGENT_PERMISSION_DEFINITIONS: AgentPermissionDefinition[];
|
|
64
|
+
export type AgentRuntimePermissionDefinition = AgentPermissionDefinition & {
|
|
65
|
+
support: AgentPermissionSupportLevel;
|
|
66
|
+
};
|
|
67
|
+
export declare const AGENT_RUNTIME_PERMISSION_SUPPORT: Record<AgentType, Partial<Record<AgentPermissionKind, AgentPermissionSupportLevel>>>;
|
|
68
|
+
export declare function getAgentPermissionSupport(agentType: AgentType, kind: AgentPermissionKind): AgentPermissionSupportLevel;
|
|
69
|
+
export declare function isAgentPermissionSupported(agentType: AgentType, kind: AgentPermissionKind): boolean;
|
|
70
|
+
export declare function listAgentRuntimePermissions(agentType: AgentType): AgentRuntimePermissionDefinition[];
|
|
71
|
+
export declare function parseAgentPermissionKind(value: unknown): AgentPermissionKind | null;
|
|
72
|
+
export declare function normalizeAgentDisabledToolKinds(agentType: AgentType, values: unknown): AgentPermissionKind[] | undefined;
|
|
73
|
+
export type RuntimeDispatchMode = 'cold_start' | 'resume' | 'dream';
|
|
74
|
+
export type MissionRuntimeProvider = 'droid_cli' | 'bigbang_native';
|
|
75
|
+
export type MissionState = 'draft' | 'queued' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled';
|
|
76
|
+
export type MissionModelMode = 'platform_override' | 'droid_default';
|
|
77
|
+
export type MissionAttemptType = 'run' | 'session_continuation' | 'active_interaction';
|
|
78
|
+
export type MissionAttemptState = 'queued' | 'running' | 'completed' | 'failed';
|
|
79
|
+
export type NativeMissionFeatureStatus = 'pending' | 'queued' | 'running' | 'completed' | 'failed' | 'skipped' | 'cancelled';
|
|
80
|
+
export type NativeMissionAssertionStatus = 'pending' | 'passed' | 'failed' | 'blocked';
|
|
81
|
+
export type MissionInteractionStatus = 'queued' | 'delivered' | 'observed' | 'applied' | 'completed' | 'failed';
|
|
82
|
+
export type MissionInfo = {
|
|
83
|
+
missionId: string;
|
|
84
|
+
ownerUserId: string;
|
|
85
|
+
title: string;
|
|
86
|
+
description: string;
|
|
87
|
+
state: MissionState;
|
|
88
|
+
runtimeProvider: MissionRuntimeProvider;
|
|
89
|
+
nodeId: string | null;
|
|
90
|
+
workspacePath: string;
|
|
91
|
+
missionDir: string | null;
|
|
92
|
+
initiatorAgentId: string | null;
|
|
93
|
+
controlConversationId: string | null;
|
|
94
|
+
modelMode: MissionModelMode;
|
|
95
|
+
orchestratorModel: string | null;
|
|
96
|
+
workerModel: string | null;
|
|
97
|
+
validatorModel: string | null;
|
|
98
|
+
effectiveModelConfig: Record<string, unknown> | null;
|
|
99
|
+
createdAt: number;
|
|
100
|
+
updatedAt: number;
|
|
101
|
+
startedAt: number | null;
|
|
102
|
+
completedAt: number | null;
|
|
103
|
+
lastImportedAt: number | null;
|
|
104
|
+
latestFactorySessionId: string | null;
|
|
105
|
+
latestFactoryArtifactDir: string | null;
|
|
106
|
+
latestFactorySeenAt: number | null;
|
|
107
|
+
};
|
|
108
|
+
export type MissionSnapshotInfo = {
|
|
109
|
+
snapshotId: string;
|
|
110
|
+
missionId: string;
|
|
111
|
+
source: string;
|
|
112
|
+
snapshot: Record<string, unknown>;
|
|
113
|
+
createdAt: number;
|
|
114
|
+
};
|
|
115
|
+
export type MissionEventInfo = {
|
|
116
|
+
eventId: string;
|
|
117
|
+
missionId: string;
|
|
118
|
+
eventType: string;
|
|
119
|
+
source: string;
|
|
120
|
+
eventTime: number;
|
|
121
|
+
payload: Record<string, unknown>;
|
|
122
|
+
createdAt: number;
|
|
123
|
+
};
|
|
124
|
+
export type MissionAttemptInfo = {
|
|
125
|
+
attemptId: string;
|
|
126
|
+
missionId: string;
|
|
127
|
+
requestId: string | null;
|
|
128
|
+
attemptType: MissionAttemptType;
|
|
129
|
+
state: MissionAttemptState;
|
|
130
|
+
nodeId: string | null;
|
|
131
|
+
missionDir: string | null;
|
|
132
|
+
promptPreview: string | null;
|
|
133
|
+
pid: number | null;
|
|
134
|
+
exitCode: number | null;
|
|
135
|
+
signal: string | null;
|
|
136
|
+
error: string | null;
|
|
137
|
+
factorySessionId: string | null;
|
|
138
|
+
factoryArtifactDir: string | null;
|
|
139
|
+
stdoutEventCount: number;
|
|
140
|
+
stderrEventCount: number;
|
|
141
|
+
outputPreview: string | null;
|
|
142
|
+
lastOutputAt: number | null;
|
|
143
|
+
supersededBy: string | null;
|
|
144
|
+
supersessionReason: 'retry' | 'recovery' | 'orphan_cleanup' | null;
|
|
145
|
+
supersededAt: number | null;
|
|
146
|
+
createdAt: number;
|
|
147
|
+
acceptedAt: number | null;
|
|
148
|
+
completedAt: number | null;
|
|
149
|
+
updatedAt: number;
|
|
150
|
+
};
|
|
151
|
+
export type MissionFeatureInfo = {
|
|
152
|
+
featureId: string;
|
|
153
|
+
missionId: string;
|
|
154
|
+
milestone: string;
|
|
155
|
+
description: string;
|
|
156
|
+
skillName: string | null;
|
|
157
|
+
status: NativeMissionFeatureStatus;
|
|
158
|
+
ordering: number;
|
|
159
|
+
preconditions: string[];
|
|
160
|
+
expectedBehavior: string[];
|
|
161
|
+
retryCount: number;
|
|
162
|
+
isValidator?: boolean;
|
|
163
|
+
handoff?: Record<string, unknown> | null;
|
|
164
|
+
workerOutput?: Record<string, unknown> | null;
|
|
165
|
+
createdAt: number;
|
|
166
|
+
updatedAt: number;
|
|
167
|
+
};
|
|
168
|
+
export type DiscoveredIssue = {
|
|
169
|
+
id: string;
|
|
170
|
+
severity: 'blocking' | 'non-blocking';
|
|
171
|
+
description: string;
|
|
172
|
+
suggestion?: string;
|
|
173
|
+
};
|
|
174
|
+
export type MissionWorkerTranscriptEntry = {
|
|
175
|
+
workerSessionId: string;
|
|
176
|
+
featureId: string;
|
|
177
|
+
milestone: string;
|
|
178
|
+
role: 'assistant' | 'tool_result';
|
|
179
|
+
kind: 'tool_call' | 'tool_result' | 'content' | 'thinking';
|
|
180
|
+
toolName?: string;
|
|
181
|
+
toolCallId?: string;
|
|
182
|
+
content: string;
|
|
183
|
+
timestamp: number;
|
|
184
|
+
};
|
|
185
|
+
export type NativeMissionHandoff = {
|
|
186
|
+
schemaVersion: '2.0.0';
|
|
187
|
+
salientSummary: string;
|
|
188
|
+
whatWasImplemented: string[];
|
|
189
|
+
whatWasLeftUndone: string;
|
|
190
|
+
verification: {
|
|
191
|
+
commandsRun: Array<{
|
|
192
|
+
command: string;
|
|
193
|
+
exitCode: number;
|
|
194
|
+
observation: string;
|
|
195
|
+
}>;
|
|
196
|
+
interactiveChecks: Array<{
|
|
197
|
+
action: string;
|
|
198
|
+
observed: string;
|
|
199
|
+
}>;
|
|
200
|
+
};
|
|
201
|
+
tests: {
|
|
202
|
+
added: Array<{
|
|
203
|
+
file: string;
|
|
204
|
+
cases: Array<{
|
|
205
|
+
name: string;
|
|
206
|
+
description: string;
|
|
207
|
+
}>;
|
|
208
|
+
}>;
|
|
209
|
+
};
|
|
210
|
+
discoveredIssues: DiscoveredIssue[];
|
|
211
|
+
skillFeedback?: string;
|
|
212
|
+
commitId?: string;
|
|
213
|
+
repoPath?: string;
|
|
214
|
+
successState: 'success' | 'partial' | 'failure';
|
|
215
|
+
returnToOrchestrator: boolean;
|
|
216
|
+
workerSessionId: string;
|
|
217
|
+
};
|
|
218
|
+
export type MissionValidationAssertionInfo = {
|
|
219
|
+
assertionId: string;
|
|
220
|
+
missionId: string;
|
|
221
|
+
featureId: string | null;
|
|
222
|
+
assertionText: string;
|
|
223
|
+
status: NativeMissionAssertionStatus;
|
|
224
|
+
note: string | null;
|
|
225
|
+
evidence: string | null;
|
|
226
|
+
confidence: MissionTraceConfidence | null;
|
|
227
|
+
createdAt: number;
|
|
228
|
+
updatedAt: number;
|
|
229
|
+
};
|
|
230
|
+
export type MissionInteractionInfo = {
|
|
231
|
+
interactionId: string;
|
|
232
|
+
missionId: string;
|
|
233
|
+
prompt: string;
|
|
234
|
+
status: MissionInteractionStatus;
|
|
235
|
+
position: number;
|
|
236
|
+
createdAt: number;
|
|
237
|
+
updatedAt: number;
|
|
238
|
+
};
|
|
239
|
+
export type MissionEvidenceSourceType = 'mission_event' | 'mission_attempt' | 'mission_snapshot' | 'mission_feature' | 'mission_assertion' | 'mission_interaction';
|
|
240
|
+
export type MissionEvidenceRoleHint = 'orchestrator' | 'worker' | 'validator' | 'system' | 'user' | 'unknown';
|
|
241
|
+
export type MissionEvidenceInfo = {
|
|
242
|
+
evidenceId: string;
|
|
243
|
+
missionId: string;
|
|
244
|
+
runtimeProvider: MissionRuntimeProvider;
|
|
245
|
+
sourceType: MissionEvidenceSourceType;
|
|
246
|
+
sourceRef: string;
|
|
247
|
+
eventTime: number;
|
|
248
|
+
roleHint: MissionEvidenceRoleHint;
|
|
249
|
+
payloadPreview: string;
|
|
250
|
+
payloadJson: Record<string, unknown>;
|
|
251
|
+
featureId?: string | null;
|
|
252
|
+
};
|
|
253
|
+
export type MissionTraceRole = 'orchestrator' | 'worker' | 'validator' | 'system' | 'user' | 'unknown';
|
|
254
|
+
export type MissionTraceOperation = 'mission_lifecycle' | 'mission_plan' | 'milestone_start' | 'feature_queued' | 'feature_started' | 'feature_lifecycle' | 'worker_dispatch' | 'worker_prompt_built' | 'worker_output_received' | 'worker_tool_call' | 'handoff_created' | 'validation_started' | 'validation_result' | 'validation_assertion' | 'report_generated' | 'artifact_written' | 'retry_scheduled' | 'pause_requested' | 'pause_effective' | 'resume_requested' | 'resume_effective' | 'cancellation_requested' | 'cancellation_effective' | 'interaction_queued' | 'interaction_observed' | 'interaction_applied' | 'handoff_items_dismissed' | 'mission_event';
|
|
255
|
+
export type MissionTraceConfidence = 'observed' | 'derived' | 'inferred' | 'unknown';
|
|
256
|
+
export type MissionTraceInfo = {
|
|
257
|
+
traceId: string;
|
|
258
|
+
missionId: string;
|
|
259
|
+
runtimeProvider: MissionRuntimeProvider;
|
|
260
|
+
time: number;
|
|
261
|
+
role: MissionTraceRole;
|
|
262
|
+
operation: MissionTraceOperation;
|
|
263
|
+
confidence: MissionTraceConfidence;
|
|
264
|
+
summary: string;
|
|
265
|
+
details: Record<string, unknown>;
|
|
266
|
+
evidenceIds: string[];
|
|
267
|
+
};
|
|
268
|
+
export type MissionValidationPolicy = 'failOnFirst' | 'continueOnWarning';
|
|
269
|
+
export type MissionRetryBackoff = 'fixed' | 'exponential';
|
|
270
|
+
export type MissionRetryPolicy = {
|
|
271
|
+
maxRetries: number;
|
|
272
|
+
backoff: MissionRetryBackoff;
|
|
273
|
+
baseDelayMs?: number;
|
|
274
|
+
maxDelayMs?: number;
|
|
275
|
+
};
|
|
276
|
+
export type CreateMissionRequest = {
|
|
277
|
+
title: string;
|
|
278
|
+
description?: string;
|
|
279
|
+
runtimeProvider?: MissionRuntimeProvider;
|
|
280
|
+
nodeId?: string | null;
|
|
281
|
+
workspacePath: string;
|
|
282
|
+
missionDir?: string | null;
|
|
283
|
+
initiatorAgentId?: string | null;
|
|
284
|
+
controlConversationId?: string | null;
|
|
285
|
+
modelMode?: MissionModelMode;
|
|
286
|
+
orchestratorModel?: string | null;
|
|
287
|
+
workerModel?: string | null;
|
|
288
|
+
validatorModel?: string | null;
|
|
289
|
+
validationPolicy?: MissionValidationPolicy;
|
|
290
|
+
validationTimeoutMs?: number;
|
|
291
|
+
retryPolicy?: MissionRetryPolicy | null;
|
|
292
|
+
};
|
|
293
|
+
export type UpdateMissionRequest = {
|
|
294
|
+
title?: string;
|
|
295
|
+
description?: string | null;
|
|
296
|
+
runtimeProvider?: MissionRuntimeProvider;
|
|
297
|
+
nodeId?: string | null;
|
|
298
|
+
workspacePath?: string;
|
|
299
|
+
missionDir?: string | null;
|
|
300
|
+
initiatorAgentId?: string | null;
|
|
301
|
+
controlConversationId?: string | null;
|
|
302
|
+
modelMode?: MissionModelMode;
|
|
303
|
+
orchestratorModel?: string | null;
|
|
304
|
+
workerModel?: string | null;
|
|
305
|
+
validatorModel?: string | null;
|
|
306
|
+
validationPolicy?: MissionValidationPolicy;
|
|
307
|
+
validationTimeoutMs?: number;
|
|
308
|
+
retryPolicy?: MissionRetryPolicy | null;
|
|
309
|
+
};
|
|
310
|
+
export type DroidModelOptionInfo = {
|
|
311
|
+
id: string;
|
|
312
|
+
label: string;
|
|
313
|
+
source: string;
|
|
314
|
+
provider: string | null;
|
|
315
|
+
model: string | null;
|
|
316
|
+
recommendedFor: Array<'orchestrator' | 'worker' | 'validator' | 'session_default'>;
|
|
317
|
+
};
|
|
318
|
+
export type DroidModelOptionsInfo = {
|
|
319
|
+
options: DroidModelOptionInfo[];
|
|
320
|
+
defaults: {
|
|
321
|
+
orchestratorModel: string | null;
|
|
322
|
+
workerModel: string | null;
|
|
323
|
+
validatorModel: string | null;
|
|
324
|
+
sessionModel: string | null;
|
|
325
|
+
};
|
|
326
|
+
settingsPath: string;
|
|
327
|
+
loadedFromSettings: boolean;
|
|
328
|
+
loadedFromCliHelp: boolean;
|
|
329
|
+
error: string | null;
|
|
330
|
+
};
|
|
331
|
+
export type ImportMissionSnapshotRequest = {
|
|
332
|
+
source?: string;
|
|
333
|
+
snapshot: Record<string, unknown>;
|
|
334
|
+
};
|
|
335
|
+
export type ImportDroidMissionArtifactsRequest = Record<string, never>;
|
|
336
|
+
export type RunDroidMissionRequest = {
|
|
337
|
+
nodeId?: string | null;
|
|
338
|
+
};
|
|
339
|
+
export type ContinueDroidMissionRequest = {
|
|
340
|
+
prompt: string;
|
|
341
|
+
nodeId?: string | null;
|
|
342
|
+
};
|
|
343
|
+
export type RecordMissionPhase1ClosureDecisionRequest = {
|
|
344
|
+
decision: 'accepted_paused_partial_boundary';
|
|
345
|
+
note?: string | null;
|
|
346
|
+
};
|
|
347
|
+
export type MissionContinuationReadinessInfo = {
|
|
348
|
+
ready: boolean;
|
|
349
|
+
reason: string;
|
|
350
|
+
mode: 'active_mailbox' | 'session_continuation' | 'unavailable';
|
|
351
|
+
missionDir: string | null;
|
|
352
|
+
factorySessionId: string | null;
|
|
353
|
+
rootFactorySessionId: string | null;
|
|
354
|
+
factoryArtifactDir: string | null;
|
|
355
|
+
};
|
|
356
|
+
export type ClaudeSessionModeId = 'default' | 'acceptEdits' | 'plan' | 'bypassPermissions';
|
|
357
|
+
export type ClaudePermissionMode = Exclude<ClaudeSessionModeId, 'plan'>;
|
|
358
|
+
export type CodexAppServerMode = 'default' | 'plan';
|
|
359
|
+
export type CodexServiceTier = 'fast' | 'flex';
|
|
360
|
+
export type ClaudeSessionModeDefinition = {
|
|
361
|
+
id: ClaudeSessionModeId;
|
|
362
|
+
label: string;
|
|
363
|
+
description: string;
|
|
364
|
+
};
|
|
365
|
+
export type ClaudeSessionModelDefinition = {
|
|
366
|
+
id: string;
|
|
367
|
+
label: string;
|
|
368
|
+
description?: string;
|
|
369
|
+
isDefault?: boolean;
|
|
370
|
+
};
|
|
371
|
+
export declare const CLAUDE_SESSION_MODEL_OPTIONS: readonly [{
|
|
372
|
+
readonly id: "claude-opus-4-6[1m]";
|
|
373
|
+
readonly label: "Opus 4.6 1M";
|
|
374
|
+
readonly description: "Opus 4.6 with 1M context window";
|
|
375
|
+
}, {
|
|
376
|
+
readonly id: "claude-opus-4-6";
|
|
377
|
+
readonly label: "Opus 4.6";
|
|
378
|
+
readonly description: "Opus 4.6 · Most capable for complex work";
|
|
379
|
+
readonly isDefault: true;
|
|
380
|
+
}, {
|
|
381
|
+
readonly id: "claude-sonnet-4-6";
|
|
382
|
+
readonly label: "Sonnet 4.6";
|
|
383
|
+
readonly description: "Sonnet 4.6 · Best for everyday tasks";
|
|
384
|
+
}, {
|
|
385
|
+
readonly id: "claude-haiku-4-5";
|
|
386
|
+
readonly label: "Haiku 4.5";
|
|
387
|
+
readonly description: "Haiku 4.5 · Fastest for quick answers";
|
|
388
|
+
}];
|
|
389
|
+
export type ClaudeSessionCommandName = 'rewind';
|
|
390
|
+
export type ClaudeSessionCommandDefinition = {
|
|
391
|
+
name: ClaudeSessionCommandName;
|
|
392
|
+
description: string;
|
|
393
|
+
argumentHint?: string;
|
|
394
|
+
};
|
|
395
|
+
export type ClaudeSessionControlState = {
|
|
396
|
+
sessionId: string | null;
|
|
397
|
+
modeId: ClaudeSessionModeId;
|
|
398
|
+
modelId: string | null;
|
|
399
|
+
effectiveModelId: string | null;
|
|
400
|
+
checkpointingEnabled: boolean;
|
|
401
|
+
availableModes: ClaudeSessionModeDefinition[];
|
|
402
|
+
availableModels: ClaudeSessionModelDefinition[];
|
|
403
|
+
availableCommands: ClaudeSessionCommandDefinition[];
|
|
404
|
+
};
|
|
405
|
+
export type ClaudeCommandExecutionResult = {
|
|
406
|
+
commandName: ClaudeSessionCommandName;
|
|
407
|
+
ok: boolean;
|
|
408
|
+
summary: string;
|
|
409
|
+
targetUserMessageUuid?: string;
|
|
410
|
+
canRewind?: boolean;
|
|
411
|
+
filesChanged?: string[];
|
|
412
|
+
insertions?: number;
|
|
413
|
+
deletions?: number;
|
|
414
|
+
};
|
|
415
|
+
export type RuntimeDriverDefinition = {
|
|
416
|
+
agentType: AgentType;
|
|
417
|
+
command: string;
|
|
418
|
+
args: string[];
|
|
419
|
+
supportsResume: boolean;
|
|
420
|
+
supportsPushNotifications: boolean;
|
|
421
|
+
capabilities: AgentRuntimeCapability[];
|
|
422
|
+
nativeMemoryBackend: 'claude' | 'workspace';
|
|
423
|
+
defaultEnv?: Record<string, string>;
|
|
424
|
+
};
|
|
425
|
+
export type AgentRuntimeCapability = 'activeTurnSteer' | 'planApprovalLoop';
|
|
426
|
+
export declare const AGENT_RUNTIME_CAPABILITIES: Record<AgentType, AgentRuntimeCapability[]>;
|
|
427
|
+
export declare function listAgentRuntimeCapabilities(agentType: AgentType): AgentRuntimeCapability[];
|
|
428
|
+
export declare function hasAgentRuntimeCapability(agentType: AgentType, capability: AgentRuntimeCapability): boolean;
|
|
429
|
+
export declare const CODEX_ACP_DEFAULT_ARGS: readonly ["-c", "sandbox_mode=\"danger-full-access\"", "-c", "approval_policy=\"never\"", "-c", "features.memories=false", "-c", "memories.use_memories=false", "-c", "memories.generate_memories=false"];
|
|
430
|
+
export declare const RUNTIME_DRIVERS: Record<AgentType, RuntimeDriverDefinition>;
|
|
431
|
+
export declare function getRuntimeDriver(agentType: AgentType): RuntimeDriverDefinition;
|
|
432
|
+
export declare function listRuntimeDrivers(): RuntimeDriverDefinition[];
|
|
433
|
+
export declare const BEIJING_TIME_ZONE = "Asia/Shanghai";
|
|
434
|
+
type TimeInput = number | string | Date;
|
|
435
|
+
export declare function formatBeijingDateTime(input: TimeInput, options?: {
|
|
436
|
+
withSeconds?: boolean;
|
|
437
|
+
}): string;
|
|
438
|
+
export declare function formatBeijingPromptTimestamp(input: TimeInput): string;
|
|
439
|
+
export declare function formatBeijingMonthDayTime(input: TimeInput, options?: {
|
|
440
|
+
withSeconds?: boolean;
|
|
441
|
+
}): string;
|
|
442
|
+
export declare function formatBeijingTime(input: TimeInput, options?: {
|
|
443
|
+
withSeconds?: boolean;
|
|
444
|
+
}): string;
|
|
445
|
+
export declare const THREAD_SHORT_ID_LENGTH = 16;
|
|
446
|
+
export declare function stripIgnoredMentionContexts(content: string): string;
|
|
447
|
+
export declare function extractMentionedNames(content: string): string[];
|
|
448
|
+
export declare function normalizeThreadShortIdInput(threadRootId: string | null | undefined): string | null;
|
|
449
|
+
export declare function normalizeMessageIdForThreadShortId(messageId: string): string;
|
|
450
|
+
export declare function buildThreadShortId(messageId: string): string;
|
|
451
|
+
export type RecentMessageSourceType = 'dm' | 'channel' | 'thread' | 'task';
|
|
452
|
+
export type RecentMessageSourceItem = {
|
|
453
|
+
sourceKey: string;
|
|
454
|
+
sourceType: RecentMessageSourceType;
|
|
455
|
+
channelId: string;
|
|
456
|
+
channelName?: string | null;
|
|
457
|
+
agentId?: string | null;
|
|
458
|
+
agentName?: string | null;
|
|
459
|
+
threadRootId?: string | null;
|
|
460
|
+
taskRef?: string | null;
|
|
461
|
+
taskNumber?: number | null;
|
|
462
|
+
taskTitle?: string | null;
|
|
463
|
+
latestMessageId: string;
|
|
464
|
+
latestSeq: number;
|
|
465
|
+
latestCreatedAt: string;
|
|
466
|
+
latestSenderName: string;
|
|
467
|
+
latestSenderType: 'user' | 'agent' | 'system';
|
|
468
|
+
latestSnippet: string;
|
|
469
|
+
unreadCount: number;
|
|
470
|
+
};
|
|
471
|
+
export declare function buildRecentMessageSourceKey(params: {
|
|
472
|
+
sourceType: RecentMessageSourceType;
|
|
473
|
+
channelId?: string | null;
|
|
474
|
+
agentId?: string | null;
|
|
475
|
+
threadRootId?: string | null;
|
|
476
|
+
}): string;
|
|
477
|
+
export declare function parseRecentMessageSourceKey(sourceKey: string): ({
|
|
478
|
+
sourceType: 'dm';
|
|
479
|
+
agentId: string;
|
|
480
|
+
} | {
|
|
481
|
+
sourceType: 'channel';
|
|
482
|
+
channelId: string;
|
|
483
|
+
} | {
|
|
484
|
+
sourceType: 'thread' | 'task';
|
|
485
|
+
channelId: string;
|
|
486
|
+
threadRootId: string;
|
|
487
|
+
}) | null;
|
|
488
|
+
export type ConversationStatusEvent = {
|
|
489
|
+
type: 'conversation.status';
|
|
490
|
+
status: ConversationStatus;
|
|
491
|
+
conversationId: string;
|
|
492
|
+
};
|
|
493
|
+
export type TurnBeginEvent = {
|
|
494
|
+
type: 'turn.begin';
|
|
495
|
+
turnId: string;
|
|
496
|
+
startedAt?: number;
|
|
497
|
+
promptText?: string;
|
|
498
|
+
};
|
|
499
|
+
export type TurnEndEvent = {
|
|
500
|
+
type: 'turn.end';
|
|
501
|
+
turnId: string;
|
|
502
|
+
stopReason?: string;
|
|
503
|
+
endedAt?: number;
|
|
504
|
+
error?: string;
|
|
505
|
+
};
|
|
506
|
+
export type ContentDeltaEvent = {
|
|
507
|
+
type: 'content.delta';
|
|
508
|
+
text: string;
|
|
509
|
+
};
|
|
510
|
+
export type ActivityDeltaEvent = {
|
|
511
|
+
type: 'activity.delta';
|
|
512
|
+
text: string;
|
|
513
|
+
};
|
|
514
|
+
export type ThinkingDeltaEvent = {
|
|
515
|
+
type: 'thinking.delta';
|
|
516
|
+
text: string;
|
|
517
|
+
};
|
|
518
|
+
export type PlanUpdateEvent = {
|
|
519
|
+
type: 'plan.update';
|
|
520
|
+
title: string;
|
|
521
|
+
detail?: string;
|
|
522
|
+
createdAt?: number;
|
|
523
|
+
};
|
|
524
|
+
export type PlanPhaseEvent = {
|
|
525
|
+
type: 'plan.phase';
|
|
526
|
+
phase: 'planning' | 'implementation';
|
|
527
|
+
createdAt?: number;
|
|
528
|
+
};
|
|
529
|
+
export type TaskUpdateEvent = {
|
|
530
|
+
type: 'task.update';
|
|
531
|
+
title: string;
|
|
532
|
+
detail?: string;
|
|
533
|
+
createdAt?: number;
|
|
534
|
+
};
|
|
535
|
+
export type ToolCallEvent = {
|
|
536
|
+
type: 'tool.call';
|
|
537
|
+
toolCallId: string;
|
|
538
|
+
name: string;
|
|
539
|
+
input: unknown;
|
|
540
|
+
detail?: string;
|
|
541
|
+
status?: 'running' | 'completed' | 'failed' | 'cancelled';
|
|
542
|
+
metadata?: Record<string, unknown>;
|
|
543
|
+
startedAt?: number;
|
|
544
|
+
};
|
|
545
|
+
export type ToolResultEvent = {
|
|
546
|
+
type: 'tool.result';
|
|
547
|
+
toolCallId: string;
|
|
548
|
+
output: string;
|
|
549
|
+
detail?: string;
|
|
550
|
+
error?: boolean;
|
|
551
|
+
status?: 'completed' | 'failed' | 'cancelled';
|
|
552
|
+
metadata?: Record<string, unknown>;
|
|
553
|
+
endedAt?: number;
|
|
554
|
+
};
|
|
555
|
+
export type AgentFileAccessKind = 'file' | 'directory' | 'unknown';
|
|
556
|
+
export type ChatFileReference = {
|
|
557
|
+
accessId: string;
|
|
558
|
+
token: string;
|
|
559
|
+
absolutePath: string;
|
|
560
|
+
kind: AgentFileAccessKind;
|
|
561
|
+
};
|
|
562
|
+
export type RunUsageEvent = {
|
|
563
|
+
type: 'run.usage';
|
|
564
|
+
inputTokens?: number;
|
|
565
|
+
cachedInputTokens?: number;
|
|
566
|
+
outputTokens?: number;
|
|
567
|
+
reasoningOutputTokens?: number;
|
|
568
|
+
totalTokens?: number;
|
|
569
|
+
currentInputTokens?: number;
|
|
570
|
+
currentCachedInputTokens?: number;
|
|
571
|
+
modelContextWindow?: number;
|
|
572
|
+
createdAt?: number;
|
|
573
|
+
metadata?: Record<string, unknown>;
|
|
574
|
+
};
|
|
575
|
+
export type RuntimeCompactEvent = {
|
|
576
|
+
type: 'runtime.compact';
|
|
577
|
+
threadId: string;
|
|
578
|
+
turnId: string;
|
|
579
|
+
itemId?: string;
|
|
580
|
+
source: 'thread_compacted' | 'raw_response_item' | 'thread_item';
|
|
581
|
+
eventKey: string;
|
|
582
|
+
createdAt?: number;
|
|
583
|
+
};
|
|
584
|
+
export type RunSteerResultEvent = {
|
|
585
|
+
type: 'run.steer.result';
|
|
586
|
+
requestId: string;
|
|
587
|
+
runId: string;
|
|
588
|
+
ok: boolean;
|
|
589
|
+
error?: string;
|
|
590
|
+
createdAt?: number;
|
|
591
|
+
};
|
|
592
|
+
export type ApprovalRequestEvent = {
|
|
593
|
+
type: 'approval.request';
|
|
594
|
+
requestId: string;
|
|
595
|
+
toolName: string;
|
|
596
|
+
toolArgs: unknown;
|
|
597
|
+
toolKind?: string | null;
|
|
598
|
+
approvalKind?: 'tool' | 'plan' | 'question';
|
|
599
|
+
title?: string;
|
|
600
|
+
description?: string;
|
|
601
|
+
input?: unknown;
|
|
602
|
+
actions?: ApprovalAction[];
|
|
603
|
+
};
|
|
604
|
+
export type ErrorEvent = {
|
|
605
|
+
type: 'error';
|
|
606
|
+
message: string;
|
|
607
|
+
};
|
|
608
|
+
export type HistoryCompleteEvent = {
|
|
609
|
+
type: 'history.complete';
|
|
610
|
+
};
|
|
611
|
+
export type HistoryResetEvent = {
|
|
612
|
+
type: 'history.reset';
|
|
613
|
+
};
|
|
614
|
+
export type PeerDeliveryIntent = 'silent' | 'batch' | 'immediate';
|
|
615
|
+
export type HistoryUserMessageEvent = {
|
|
616
|
+
type: 'history.user_message';
|
|
617
|
+
text: string;
|
|
618
|
+
};
|
|
619
|
+
export type ChannelMessageEvent = {
|
|
620
|
+
type: 'channel.message';
|
|
621
|
+
message: {
|
|
622
|
+
id: string;
|
|
623
|
+
senderId?: string;
|
|
624
|
+
senderName: string;
|
|
625
|
+
senderDeleted?: boolean;
|
|
626
|
+
senderType: 'user' | 'agent' | 'system';
|
|
627
|
+
content: string;
|
|
628
|
+
createdAt: string;
|
|
629
|
+
deletedAt?: string | null;
|
|
630
|
+
deletedByName?: string | null;
|
|
631
|
+
seq?: number;
|
|
632
|
+
/** Thread short ID derived from the root message ID. Present only for thread replies. */
|
|
633
|
+
threadRootId?: string;
|
|
634
|
+
/** Present on root messages when the thread surface exists even if it has no visible replies yet. */
|
|
635
|
+
threadActive?: boolean;
|
|
636
|
+
/** Present only when the message was synthesized from raw deltas as a fallback. */
|
|
637
|
+
messageSource?: string;
|
|
638
|
+
/** DB message_kind for special chat projections such as plan or final. */
|
|
639
|
+
messageKind?: string;
|
|
640
|
+
/** Agent-declared peer notification delivery for shared channel/thread messages. */
|
|
641
|
+
peerDelivery?: PeerDeliveryIntent;
|
|
642
|
+
/** Present when this message IS a task thread root. */
|
|
643
|
+
taskNumber?: number;
|
|
644
|
+
taskRef?: string | null;
|
|
645
|
+
taskDescription?: string | null;
|
|
646
|
+
taskStatus?: string;
|
|
647
|
+
taskAssigneeName?: string | null;
|
|
648
|
+
taskAssigneeDeleted?: boolean;
|
|
649
|
+
taskThreadStatus?: ConversationStatus | null;
|
|
650
|
+
/** Attachment UUIDs uploaded with this message. */
|
|
651
|
+
attachmentIds?: string[];
|
|
652
|
+
/** Asset UUIDs uploaded with this message. Compatibility alias of attachmentIds. */
|
|
653
|
+
assetIds?: string[];
|
|
654
|
+
/** File references proven by same-run tool access records. */
|
|
655
|
+
fileRefs?: ChatFileReference[];
|
|
656
|
+
/** Persisted run that produced this message, when available. */
|
|
657
|
+
runId?: string | null;
|
|
658
|
+
/** Panel IDs attached to this message. */
|
|
659
|
+
panelIds?: string[];
|
|
660
|
+
/** Ephemeral Panel preview IDs attached to this message. */
|
|
661
|
+
panelPreviewIds?: string[];
|
|
662
|
+
/** Workspace Tool IDs attached to this message. */
|
|
663
|
+
toolIds?: string[];
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
export type ChannelMessageDeletedEvent = {
|
|
667
|
+
type: 'channel.message.deleted';
|
|
668
|
+
channelId: string;
|
|
669
|
+
messageId: string;
|
|
670
|
+
threadRootId?: string | null;
|
|
671
|
+
seq: number;
|
|
672
|
+
deletedAt: string;
|
|
673
|
+
deletedByName?: string | null;
|
|
674
|
+
};
|
|
675
|
+
export type ChannelNoticeEvent = {
|
|
676
|
+
type: 'channel.notice';
|
|
677
|
+
notice: {
|
|
678
|
+
message: string;
|
|
679
|
+
createdAt: string;
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
export type ChannelHistoryResetEvent = {
|
|
683
|
+
type: 'channel.history.reset';
|
|
684
|
+
};
|
|
685
|
+
export type ChannelTasksChangedEvent = {
|
|
686
|
+
type: 'channel.tasks.changed';
|
|
687
|
+
channelId: string;
|
|
688
|
+
changedAt: number;
|
|
689
|
+
};
|
|
690
|
+
export type ChannelConversationStatusEvent = {
|
|
691
|
+
type: 'channel.conversation.status';
|
|
692
|
+
channelId: string;
|
|
693
|
+
conversation: ConversationInfo;
|
|
694
|
+
};
|
|
695
|
+
export type SystemNoticeEvent = {
|
|
696
|
+
type: 'system.notice';
|
|
697
|
+
message: string;
|
|
698
|
+
};
|
|
699
|
+
export type PanelSharedStateUpdatedEvent = {
|
|
700
|
+
type: 'panel.shared_state_updated';
|
|
701
|
+
panelId: string;
|
|
702
|
+
shared: Record<string, unknown>;
|
|
703
|
+
version: number;
|
|
704
|
+
updatedByUserId?: string;
|
|
705
|
+
updatedAt?: number;
|
|
706
|
+
threadRootId?: string;
|
|
707
|
+
};
|
|
708
|
+
export type PanelActionTriggeredEvent = {
|
|
709
|
+
type: 'panel.action_triggered';
|
|
710
|
+
panelId: string;
|
|
711
|
+
submitKind?: PanelSubmitKind;
|
|
712
|
+
actionId?: string;
|
|
713
|
+
triggeredByUserId: string;
|
|
714
|
+
triggeredAt?: number;
|
|
715
|
+
threadRootId?: string;
|
|
716
|
+
};
|
|
717
|
+
export type PanelUpdatedEvent = {
|
|
718
|
+
type: 'panel.updated';
|
|
719
|
+
panelId: string;
|
|
720
|
+
version: number;
|
|
721
|
+
changed: Array<'props' | 'actions' | 'rows' | 'status' | 'progress' | 'result'>;
|
|
722
|
+
updatedAt?: number;
|
|
723
|
+
threadRootId?: string;
|
|
724
|
+
};
|
|
725
|
+
export type PanelDeletedEvent = {
|
|
726
|
+
type: 'panel.deleted';
|
|
727
|
+
panelId: string;
|
|
728
|
+
deletedAt: number;
|
|
729
|
+
threadRootId?: string;
|
|
730
|
+
};
|
|
731
|
+
export type WorkspaceToolStateUpdatedEvent = {
|
|
732
|
+
type: 'workspace_tool.state_updated';
|
|
733
|
+
toolId: string;
|
|
734
|
+
state: WorkspaceToolStateRow | null;
|
|
735
|
+
updatedAt: number;
|
|
736
|
+
};
|
|
737
|
+
export type MessageReactionSummary = {
|
|
738
|
+
emoji: string;
|
|
739
|
+
count: number;
|
|
740
|
+
reactors: Array<{
|
|
741
|
+
id: string;
|
|
742
|
+
name: string;
|
|
743
|
+
type: 'user' | 'agent';
|
|
744
|
+
}>;
|
|
745
|
+
};
|
|
746
|
+
export type ChannelMessageReactionEvent = {
|
|
747
|
+
type: 'channel.message.reaction';
|
|
748
|
+
channelId: string;
|
|
749
|
+
messageId: string;
|
|
750
|
+
reactions: MessageReactionSummary[];
|
|
751
|
+
};
|
|
752
|
+
export type ServerEvent = ConversationStatusEvent | TurnBeginEvent | TurnEndEvent | ContentDeltaEvent | ActivityDeltaEvent | ThinkingDeltaEvent | PlanUpdateEvent | PlanPhaseEvent | TaskUpdateEvent | ToolCallEvent | ToolResultEvent | RunUsageEvent | RuntimeCompactEvent | RunSteerResultEvent | ApprovalRequestEvent | ErrorEvent | HistoryCompleteEvent | HistoryResetEvent | HistoryUserMessageEvent | ChannelMessageEvent | ChannelMessageDeletedEvent | ChannelNoticeEvent | ChannelHistoryResetEvent | ChannelTasksChangedEvent | ChannelConversationStatusEvent | SystemNoticeEvent | PanelSharedStateUpdatedEvent | PanelActionTriggeredEvent | PanelUpdatedEvent | PanelDeletedEvent | WorkspaceToolStateUpdatedEvent | ChannelMessageReactionEvent;
|
|
753
|
+
export type FileRef = {
|
|
754
|
+
uri: string;
|
|
755
|
+
mimeType?: string;
|
|
756
|
+
assetId?: string;
|
|
757
|
+
filename?: string;
|
|
758
|
+
sizeBytes?: number;
|
|
759
|
+
assetKind?: AssetKind;
|
|
760
|
+
scopeType?: AssetScopeType;
|
|
761
|
+
scopeId?: string;
|
|
762
|
+
canonicalUri?: string;
|
|
763
|
+
canonicalPath?: string;
|
|
764
|
+
preferredLocalPath?: string;
|
|
765
|
+
};
|
|
766
|
+
export type AssetKind = 'image' | 'text' | 'code' | 'json' | 'binary';
|
|
767
|
+
export type AssetScopeType = 'direct_conversation' | 'channel' | 'thread' | 'agent_upload';
|
|
768
|
+
export type PromptRuntimeOverrides = {
|
|
769
|
+
planMode?: boolean | null;
|
|
770
|
+
codexMode?: CodexAppServerMode | null;
|
|
771
|
+
};
|
|
772
|
+
export type ConversationPromptSlashCommand = {
|
|
773
|
+
name: string;
|
|
774
|
+
bodyText: string;
|
|
775
|
+
};
|
|
776
|
+
export type ApprovalAction = {
|
|
777
|
+
id: string;
|
|
778
|
+
label: string;
|
|
779
|
+
variant?: 'primary' | 'secondary' | 'danger';
|
|
780
|
+
requiresInput?: boolean;
|
|
781
|
+
inputPlaceholder?: string;
|
|
782
|
+
};
|
|
783
|
+
export type ApprovalQuestionOption = {
|
|
784
|
+
label: string;
|
|
785
|
+
description?: string;
|
|
786
|
+
};
|
|
787
|
+
export type ApprovalQuestion = {
|
|
788
|
+
id: string;
|
|
789
|
+
header: string;
|
|
790
|
+
question: string;
|
|
791
|
+
options: ApprovalQuestionOption[];
|
|
792
|
+
multiSelect?: boolean;
|
|
793
|
+
isOther?: boolean;
|
|
794
|
+
isSecret?: boolean;
|
|
795
|
+
};
|
|
796
|
+
export type PromptEvent = {
|
|
797
|
+
type: 'prompt';
|
|
798
|
+
text: string;
|
|
799
|
+
attachments?: FileRef[];
|
|
800
|
+
runtimeOverrides?: PromptRuntimeOverrides;
|
|
801
|
+
};
|
|
802
|
+
export type ApprovalResponseEvent = {
|
|
803
|
+
type: 'approval.response';
|
|
804
|
+
requestId: string;
|
|
805
|
+
decision: 'allow' | 'deny';
|
|
806
|
+
selectedActionId?: string;
|
|
807
|
+
responseText?: string;
|
|
808
|
+
answers?: Record<string, string[]>;
|
|
809
|
+
};
|
|
810
|
+
export type CancelEvent = {
|
|
811
|
+
type: 'cancel';
|
|
812
|
+
};
|
|
813
|
+
export type ClientEvent = PromptEvent | ApprovalResponseEvent | CancelEvent;
|
|
814
|
+
export type NodeRegisterMsg = {
|
|
815
|
+
type: 'node.register';
|
|
816
|
+
nodeId: string;
|
|
817
|
+
processInstanceId?: string;
|
|
818
|
+
hostname: string;
|
|
819
|
+
agentTypes: string[];
|
|
820
|
+
version: string;
|
|
821
|
+
terminalBackendAvailable: boolean;
|
|
822
|
+
};
|
|
823
|
+
export type NodeHeartbeatMsg = {
|
|
824
|
+
type: 'node.heartbeat';
|
|
825
|
+
nodeId: string;
|
|
826
|
+
};
|
|
827
|
+
export type NodeHostState = 'idle' | 'active' | 'failed';
|
|
828
|
+
export type NodeHostSnapshot = {
|
|
829
|
+
hostKey: string;
|
|
830
|
+
hostInstanceId?: string | null;
|
|
831
|
+
sessionKey: string;
|
|
832
|
+
workspaceRoot: string;
|
|
833
|
+
agentType: AgentType;
|
|
834
|
+
state: NodeHostState;
|
|
835
|
+
currentRunId: string | null;
|
|
836
|
+
hasPendingApproval: boolean;
|
|
837
|
+
inboxSize: number;
|
|
838
|
+
pendingDispatchCount: number;
|
|
839
|
+
lastWakeAt: number | null;
|
|
840
|
+
lastSleepAt: number | null;
|
|
841
|
+
lastError: string | null;
|
|
842
|
+
resumable: boolean;
|
|
843
|
+
};
|
|
844
|
+
export type NodeHostsSnapshotMsg = {
|
|
845
|
+
type: 'node.hosts.snapshot';
|
|
846
|
+
nodeId: string;
|
|
847
|
+
generatedAt: number;
|
|
848
|
+
hosts: NodeHostSnapshot[];
|
|
849
|
+
};
|
|
850
|
+
export type AssetMaterializedMsg = {
|
|
851
|
+
type: 'asset.materialized';
|
|
852
|
+
assetId: string;
|
|
853
|
+
agentId: string;
|
|
854
|
+
conversationId: string;
|
|
855
|
+
nodeProcessInstanceId: string;
|
|
856
|
+
hostKey: string;
|
|
857
|
+
hostInstanceId: string;
|
|
858
|
+
runId?: string | null;
|
|
859
|
+
localPath: string;
|
|
860
|
+
materializedAt: number;
|
|
861
|
+
};
|
|
862
|
+
export type AssetMaterializationClearedMsg = {
|
|
863
|
+
type: 'asset.materialization.cleared';
|
|
864
|
+
nodeProcessInstanceId: string;
|
|
865
|
+
hostKey: string;
|
|
866
|
+
hostInstanceId: string;
|
|
867
|
+
clearedAt: number;
|
|
868
|
+
reason?: 'host_closed' | 'cache_cleared' | 'node_shutdown';
|
|
869
|
+
};
|
|
870
|
+
export type NodeRuntimeDriverInventory = {
|
|
871
|
+
agentType: AgentType;
|
|
872
|
+
command: string;
|
|
873
|
+
args: string[];
|
|
874
|
+
supportsResume: boolean;
|
|
875
|
+
supportsPushNotifications: boolean;
|
|
876
|
+
capabilities: AgentRuntimeCapability[];
|
|
877
|
+
nativeMemoryBackend: 'claude' | 'workspace';
|
|
878
|
+
supportsClaudeSessionControls: boolean;
|
|
879
|
+
};
|
|
880
|
+
export type NodeRuntimeCapabilities = {
|
|
881
|
+
envProfile?: string | null;
|
|
882
|
+
agentSurfaceMode?: AgentSurfaceMode;
|
|
883
|
+
bigbangCliAvailable?: boolean;
|
|
884
|
+
builtinSkillRoots?: string[];
|
|
885
|
+
panelApiJsonlAllowedOrigins?: string[];
|
|
886
|
+
panelApiJsonlAllowedUrlPrefixes?: string[];
|
|
887
|
+
panelApiJsonlAuthProfiles?: string[];
|
|
888
|
+
workspaceRpc: boolean;
|
|
889
|
+
workspaceInspect: boolean;
|
|
890
|
+
workspaceGit: boolean;
|
|
891
|
+
terminals: boolean;
|
|
892
|
+
skills: boolean;
|
|
893
|
+
codexAppServerRpc: boolean;
|
|
894
|
+
codexTranscripts: boolean;
|
|
895
|
+
claudeTranscripts: boolean;
|
|
896
|
+
claudeControls: boolean;
|
|
897
|
+
nativeMissionWorker: boolean;
|
|
898
|
+
};
|
|
899
|
+
export type NodeRuntimeSnapshot = {
|
|
900
|
+
workspaceRoot: string;
|
|
901
|
+
terminalBackendAvailable: boolean;
|
|
902
|
+
runtimeDrivers: NodeRuntimeDriverInventory[];
|
|
903
|
+
capabilities: NodeRuntimeCapabilities;
|
|
904
|
+
};
|
|
905
|
+
export type NodeRuntimeSnapshotMsg = {
|
|
906
|
+
type: 'node.runtime.snapshot';
|
|
907
|
+
nodeId: string;
|
|
908
|
+
processInstanceId?: string | null;
|
|
909
|
+
generatedAt: number;
|
|
910
|
+
runtime: NodeRuntimeSnapshot;
|
|
911
|
+
};
|
|
912
|
+
export type MissionRunAcceptedMsg = {
|
|
913
|
+
type: 'mission.run.accepted';
|
|
914
|
+
requestId: string;
|
|
915
|
+
missionId: string;
|
|
916
|
+
runtimeProvider?: MissionRuntimeProvider;
|
|
917
|
+
missionDir: string;
|
|
918
|
+
pid?: number | null;
|
|
919
|
+
featureId?: string | null;
|
|
920
|
+
};
|
|
921
|
+
export type DroidMissionRunAcceptedMsg = MissionRunAcceptedMsg;
|
|
922
|
+
export type NativeMissionRunAcceptedMsg = MissionRunAcceptedMsg & {
|
|
923
|
+
runtimeProvider: 'bigbang_native';
|
|
924
|
+
featureId?: string;
|
|
925
|
+
};
|
|
926
|
+
export type MissionRunEventMsg = {
|
|
927
|
+
type: 'mission.run.event';
|
|
928
|
+
requestId: string;
|
|
929
|
+
missionId: string;
|
|
930
|
+
runtimeProvider?: MissionRuntimeProvider;
|
|
931
|
+
eventType: string;
|
|
932
|
+
eventTime: number;
|
|
933
|
+
source: string;
|
|
934
|
+
payload: Record<string, unknown>;
|
|
935
|
+
featureId?: string | null;
|
|
936
|
+
};
|
|
937
|
+
export type DroidMissionRunEventMsg = MissionRunEventMsg;
|
|
938
|
+
export type NativeMissionRunEventMsg = MissionRunEventMsg & {
|
|
939
|
+
runtimeProvider: 'bigbang_native';
|
|
940
|
+
featureId?: string;
|
|
941
|
+
};
|
|
942
|
+
export type MissionRunEndMsg = {
|
|
943
|
+
type: 'mission.run.end';
|
|
944
|
+
requestId: string;
|
|
945
|
+
missionId: string;
|
|
946
|
+
runtimeProvider?: MissionRuntimeProvider;
|
|
947
|
+
missionDir: string;
|
|
948
|
+
factorySessionId?: string | null;
|
|
949
|
+
factoryArtifactDir?: string | null;
|
|
950
|
+
exitCode?: number | null;
|
|
951
|
+
signal?: string | null;
|
|
952
|
+
error?: string;
|
|
953
|
+
reason?: string | null;
|
|
954
|
+
featureId?: string | null;
|
|
955
|
+
output?: Record<string, unknown> | null;
|
|
956
|
+
handoff?: Record<string, unknown> | null;
|
|
957
|
+
};
|
|
958
|
+
export type DroidMissionRunEndMsg = MissionRunEndMsg;
|
|
959
|
+
export type NativeMissionRunEndMsg = MissionRunEndMsg & {
|
|
960
|
+
runtimeProvider: 'bigbang_native';
|
|
961
|
+
featureId?: string;
|
|
962
|
+
};
|
|
963
|
+
export type MissionRunCancelMsg = {
|
|
964
|
+
type: 'mission.run.cancel';
|
|
965
|
+
requestId: string;
|
|
966
|
+
missionId: string;
|
|
967
|
+
runtimeProvider?: MissionRuntimeProvider;
|
|
968
|
+
featureId?: string | null;
|
|
969
|
+
};
|
|
970
|
+
export type DroidMissionContinuationInspectRequestMsg = {
|
|
971
|
+
type: 'mission.continuation.inspect.request';
|
|
972
|
+
requestId: string;
|
|
973
|
+
missionId: string;
|
|
974
|
+
workspaceRoot: string;
|
|
975
|
+
missionDir: string;
|
|
976
|
+
};
|
|
977
|
+
export type DroidMissionContinuationInspectResponseMsg = {
|
|
978
|
+
type: 'mission.continuation.inspect.response';
|
|
979
|
+
requestId: string;
|
|
980
|
+
missionId: string;
|
|
981
|
+
missionDir: string | null;
|
|
982
|
+
rootFactorySessionId?: string | null;
|
|
983
|
+
factorySessionId?: string | null;
|
|
984
|
+
factoryArtifactDir?: string | null;
|
|
985
|
+
error?: string | null;
|
|
986
|
+
};
|
|
987
|
+
/** Agent subprocess event forwarded by node to core */
|
|
988
|
+
export type RunEventMsg = {
|
|
989
|
+
type: 'run.event';
|
|
990
|
+
runId: string;
|
|
991
|
+
conversationId: string;
|
|
992
|
+
event: ServerEvent;
|
|
993
|
+
};
|
|
994
|
+
export type RunEndMsg = {
|
|
995
|
+
type: 'run.end';
|
|
996
|
+
runId: string;
|
|
997
|
+
conversationId: string;
|
|
998
|
+
stopReason?: string;
|
|
999
|
+
error?: string;
|
|
1000
|
+
};
|
|
1001
|
+
export type RunSteerResultMsg = {
|
|
1002
|
+
type: 'run.steer.result';
|
|
1003
|
+
requestId: string;
|
|
1004
|
+
runId: string;
|
|
1005
|
+
conversationId: string;
|
|
1006
|
+
ok: boolean;
|
|
1007
|
+
error?: string;
|
|
1008
|
+
};
|
|
1009
|
+
export type NotificationDeliveryMetadata = {
|
|
1010
|
+
deliveryId: string;
|
|
1011
|
+
roundId: string;
|
|
1012
|
+
ackedThroughSeq: number;
|
|
1013
|
+
surfaceKey: string;
|
|
1014
|
+
};
|
|
1015
|
+
export type RunDeliveryAckMsg = {
|
|
1016
|
+
type: 'run.delivery.ack';
|
|
1017
|
+
deliveryId: string;
|
|
1018
|
+
roundId: string;
|
|
1019
|
+
runId: string;
|
|
1020
|
+
conversationId: string;
|
|
1021
|
+
ackedThroughSeq: number;
|
|
1022
|
+
mode: 'dispatch' | 'steer';
|
|
1023
|
+
};
|
|
1024
|
+
export type RunAcceptedMsg = {
|
|
1025
|
+
type: 'run.accepted';
|
|
1026
|
+
runId: string;
|
|
1027
|
+
conversationId: string;
|
|
1028
|
+
};
|
|
1029
|
+
export type NodePermissionRequestMsg = {
|
|
1030
|
+
type: 'permission.request';
|
|
1031
|
+
runId: string;
|
|
1032
|
+
conversationId: string;
|
|
1033
|
+
requestId: string;
|
|
1034
|
+
toolName: string;
|
|
1035
|
+
toolArgs: unknown;
|
|
1036
|
+
toolKind?: string | null;
|
|
1037
|
+
approvalKind?: 'tool' | 'plan' | 'question';
|
|
1038
|
+
title?: string;
|
|
1039
|
+
description?: string;
|
|
1040
|
+
input?: unknown;
|
|
1041
|
+
actions?: ApprovalAction[];
|
|
1042
|
+
};
|
|
1043
|
+
export type WorkspaceErrorCode = 'invalid_request' | 'not_found' | 'not_directory' | 'not_file' | 'path_outside_workspace' | 'binary_file' | 'file_too_large' | 'io_error';
|
|
1044
|
+
export type WorkspaceWriteMode = 'overwrite' | 'append';
|
|
1045
|
+
export type WorkspaceWriteContentEncoding = 'utf8' | 'base64';
|
|
1046
|
+
export type AgentWorkspaceEntry = {
|
|
1047
|
+
name: string;
|
|
1048
|
+
path: string;
|
|
1049
|
+
kind: 'directory' | 'file';
|
|
1050
|
+
size: number | null;
|
|
1051
|
+
modifiedAt: number | null;
|
|
1052
|
+
isSymlink?: boolean;
|
|
1053
|
+
};
|
|
1054
|
+
export type AgentFileAccessDirectoryEntry = AgentWorkspaceEntry & {
|
|
1055
|
+
canOpen?: boolean;
|
|
1056
|
+
entryToken?: string;
|
|
1057
|
+
};
|
|
1058
|
+
export type DirectoryPageInfo = {
|
|
1059
|
+
nextCursor: string | null;
|
|
1060
|
+
hasMore: boolean;
|
|
1061
|
+
limit: number;
|
|
1062
|
+
};
|
|
1063
|
+
export type AgentSkillEntry = {
|
|
1064
|
+
name: string;
|
|
1065
|
+
path: string;
|
|
1066
|
+
kind: 'directory' | 'file';
|
|
1067
|
+
size: number | null;
|
|
1068
|
+
modifiedAt: number | null;
|
|
1069
|
+
};
|
|
1070
|
+
export type AgentSkillSummary = {
|
|
1071
|
+
name: string;
|
|
1072
|
+
path: string;
|
|
1073
|
+
sourceRoot: string;
|
|
1074
|
+
description?: string;
|
|
1075
|
+
};
|
|
1076
|
+
export type CodexReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
1077
|
+
export type CodexModelDefinition = {
|
|
1078
|
+
id: string;
|
|
1079
|
+
model: string;
|
|
1080
|
+
displayName: string;
|
|
1081
|
+
description?: string;
|
|
1082
|
+
hidden: boolean;
|
|
1083
|
+
supportedReasoningEfforts: CodexReasoningEffort[];
|
|
1084
|
+
defaultReasoningEffort?: CodexReasoningEffort | null;
|
|
1085
|
+
additionalSpeedTiers: string[];
|
|
1086
|
+
isDefault: boolean;
|
|
1087
|
+
};
|
|
1088
|
+
export type CodexModelListResult = {
|
|
1089
|
+
models: CodexModelDefinition[];
|
|
1090
|
+
nextCursor: string | null;
|
|
1091
|
+
defaultModel: string | null;
|
|
1092
|
+
};
|
|
1093
|
+
export type CodexNativeSkillMetadata = {
|
|
1094
|
+
name: string;
|
|
1095
|
+
description: string;
|
|
1096
|
+
shortDescription?: string;
|
|
1097
|
+
path: string;
|
|
1098
|
+
scope?: string;
|
|
1099
|
+
enabled: boolean;
|
|
1100
|
+
interface?: unknown;
|
|
1101
|
+
dependencies?: unknown;
|
|
1102
|
+
};
|
|
1103
|
+
export type CodexNativeSkillListEntry = {
|
|
1104
|
+
cwd: string;
|
|
1105
|
+
skills: CodexNativeSkillMetadata[];
|
|
1106
|
+
errors: unknown[];
|
|
1107
|
+
};
|
|
1108
|
+
export type CodexNativeSkillListResult = {
|
|
1109
|
+
data: CodexNativeSkillListEntry[];
|
|
1110
|
+
};
|
|
1111
|
+
export type CodexThreadSummary = {
|
|
1112
|
+
id: string;
|
|
1113
|
+
forkedFromId?: string | null;
|
|
1114
|
+
preview: string;
|
|
1115
|
+
createdAt: number;
|
|
1116
|
+
updatedAt: number;
|
|
1117
|
+
status: string;
|
|
1118
|
+
path?: string | null;
|
|
1119
|
+
cwd: string;
|
|
1120
|
+
modelProvider?: string;
|
|
1121
|
+
source?: unknown;
|
|
1122
|
+
name?: string | null;
|
|
1123
|
+
turns?: unknown[];
|
|
1124
|
+
};
|
|
1125
|
+
export type CodexThreadListResult = {
|
|
1126
|
+
threads: CodexThreadSummary[];
|
|
1127
|
+
nextCursor: string | null;
|
|
1128
|
+
backwardsCursor: string | null;
|
|
1129
|
+
};
|
|
1130
|
+
export type CodexThreadReadResult = {
|
|
1131
|
+
thread: CodexThreadSummary;
|
|
1132
|
+
};
|
|
1133
|
+
export type CodexConversationSummaryRequestMsg = {
|
|
1134
|
+
type: 'codex.conversation.summary.request';
|
|
1135
|
+
requestId: string;
|
|
1136
|
+
prompt: string;
|
|
1137
|
+
envVars?: Record<string, string>;
|
|
1138
|
+
};
|
|
1139
|
+
export type CodexConversationSummaryResponseMsg = {
|
|
1140
|
+
type: 'codex.conversation.summary.response';
|
|
1141
|
+
requestId: string;
|
|
1142
|
+
content?: string;
|
|
1143
|
+
error?: string;
|
|
1144
|
+
};
|
|
1145
|
+
export type WorkspaceListResponseMsg = {
|
|
1146
|
+
type: 'workspace.list.response';
|
|
1147
|
+
requestId: string;
|
|
1148
|
+
relativePath: string;
|
|
1149
|
+
entries?: AgentWorkspaceEntry[];
|
|
1150
|
+
directoryPage?: DirectoryPageInfo;
|
|
1151
|
+
error?: string;
|
|
1152
|
+
errorCode?: WorkspaceErrorCode;
|
|
1153
|
+
};
|
|
1154
|
+
export type WorkspacePreviewMimeType = 'text/markdown' | 'text/plain' | 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/svg+xml' | 'image/avif' | 'image/bmp' | 'image/x-icon';
|
|
1155
|
+
export type WorkspaceReadResponseMsg = {
|
|
1156
|
+
type: 'workspace.read.response';
|
|
1157
|
+
requestId: string;
|
|
1158
|
+
relativePath: string;
|
|
1159
|
+
content?: string;
|
|
1160
|
+
mimeType?: WorkspacePreviewMimeType;
|
|
1161
|
+
size?: number;
|
|
1162
|
+
modifiedAt?: number | null;
|
|
1163
|
+
offset?: number;
|
|
1164
|
+
limit?: number;
|
|
1165
|
+
nextOffset?: number | null;
|
|
1166
|
+
hasMore?: boolean;
|
|
1167
|
+
error?: string;
|
|
1168
|
+
errorCode?: WorkspaceErrorCode;
|
|
1169
|
+
};
|
|
1170
|
+
export type WorkspaceArchiveResponseMsg = {
|
|
1171
|
+
type: 'workspace.archive.response';
|
|
1172
|
+
requestId: string;
|
|
1173
|
+
relativePath: string;
|
|
1174
|
+
archiveBase64?: string;
|
|
1175
|
+
byteSize?: number;
|
|
1176
|
+
fileCount?: number;
|
|
1177
|
+
error?: string;
|
|
1178
|
+
errorCode?: WorkspaceErrorCode;
|
|
1179
|
+
};
|
|
1180
|
+
export type WorkspaceExtractResponseMsg = {
|
|
1181
|
+
type: 'workspace.extract.response';
|
|
1182
|
+
requestId: string;
|
|
1183
|
+
relativePath: string;
|
|
1184
|
+
ok?: boolean;
|
|
1185
|
+
byteSize?: number;
|
|
1186
|
+
fileCount?: number;
|
|
1187
|
+
error?: string;
|
|
1188
|
+
errorCode?: WorkspaceErrorCode;
|
|
1189
|
+
};
|
|
1190
|
+
export type FsReadPathResponseMsg = {
|
|
1191
|
+
type: 'fs.read_path.response';
|
|
1192
|
+
requestId: string;
|
|
1193
|
+
absolutePath: string;
|
|
1194
|
+
kind?: AgentFileAccessKind;
|
|
1195
|
+
content?: string;
|
|
1196
|
+
rawContentBase64?: boolean;
|
|
1197
|
+
entries?: AgentWorkspaceEntry[];
|
|
1198
|
+
directoryPage?: DirectoryPageInfo;
|
|
1199
|
+
mimeType?: WorkspacePreviewMimeType;
|
|
1200
|
+
size?: number;
|
|
1201
|
+
modifiedAt?: number | null;
|
|
1202
|
+
offset?: number;
|
|
1203
|
+
limit?: number;
|
|
1204
|
+
nextOffset?: number | null;
|
|
1205
|
+
hasMore?: boolean;
|
|
1206
|
+
error?: string;
|
|
1207
|
+
errorCode?: WorkspaceErrorCode;
|
|
1208
|
+
};
|
|
1209
|
+
export type HttpFetchTextResponseMsg = {
|
|
1210
|
+
type: 'http.fetch_text.response';
|
|
1211
|
+
requestId: string;
|
|
1212
|
+
url: string;
|
|
1213
|
+
content?: string;
|
|
1214
|
+
status?: number;
|
|
1215
|
+
contentType?: string | null;
|
|
1216
|
+
size?: number;
|
|
1217
|
+
partialContent?: boolean;
|
|
1218
|
+
rangeStart?: number;
|
|
1219
|
+
rangeEnd?: number;
|
|
1220
|
+
totalSize?: number | null;
|
|
1221
|
+
hasMore?: boolean;
|
|
1222
|
+
notModified?: boolean;
|
|
1223
|
+
etag?: string | null;
|
|
1224
|
+
lastModified?: string | null;
|
|
1225
|
+
error?: string;
|
|
1226
|
+
errorCode?: WorkspaceErrorCode;
|
|
1227
|
+
};
|
|
1228
|
+
export type WorkspaceServiceProxyMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
1229
|
+
export type WorkspaceServiceProxyResponseMsg = {
|
|
1230
|
+
type: 'workspace.service_proxy.response';
|
|
1231
|
+
requestId: string;
|
|
1232
|
+
url: string;
|
|
1233
|
+
method: WorkspaceServiceProxyMethod;
|
|
1234
|
+
status?: number;
|
|
1235
|
+
body?: string;
|
|
1236
|
+
contentType?: string | null;
|
|
1237
|
+
size?: number;
|
|
1238
|
+
error?: string;
|
|
1239
|
+
errorCode?: WorkspaceErrorCode;
|
|
1240
|
+
};
|
|
1241
|
+
export type FsPathSuggestion = {
|
|
1242
|
+
path: string;
|
|
1243
|
+
name: string;
|
|
1244
|
+
parentPath: string;
|
|
1245
|
+
isGitRepo: boolean;
|
|
1246
|
+
};
|
|
1247
|
+
export type FsPathSuggestResponseMsg = {
|
|
1248
|
+
type: 'fs.path_suggest.response';
|
|
1249
|
+
requestId: string;
|
|
1250
|
+
query: string;
|
|
1251
|
+
suggestions?: FsPathSuggestion[];
|
|
1252
|
+
error?: string;
|
|
1253
|
+
errorCode?: WorkspaceErrorCode;
|
|
1254
|
+
};
|
|
1255
|
+
export type FsReadPathStreamStartMsg = {
|
|
1256
|
+
type: 'fs.read_path.stream.start';
|
|
1257
|
+
requestId: string;
|
|
1258
|
+
absolutePath: string;
|
|
1259
|
+
mimeType: WorkspacePreviewMimeType;
|
|
1260
|
+
size: number;
|
|
1261
|
+
modifiedAt?: number | null;
|
|
1262
|
+
};
|
|
1263
|
+
export type FsReadPathStreamChunkMsg = {
|
|
1264
|
+
type: 'fs.read_path.stream.chunk';
|
|
1265
|
+
requestId: string;
|
|
1266
|
+
encoding: 'base64';
|
|
1267
|
+
chunk: string;
|
|
1268
|
+
};
|
|
1269
|
+
export type FsReadPathStreamEndMsg = {
|
|
1270
|
+
type: 'fs.read_path.stream.end';
|
|
1271
|
+
requestId: string;
|
|
1272
|
+
error?: string;
|
|
1273
|
+
errorCode?: WorkspaceErrorCode;
|
|
1274
|
+
};
|
|
1275
|
+
export type WorkspaceWriteResponseMsg = {
|
|
1276
|
+
type: 'workspace.write.response';
|
|
1277
|
+
requestId: string;
|
|
1278
|
+
relativePath: string;
|
|
1279
|
+
ok?: boolean;
|
|
1280
|
+
modifiedAt?: number | null;
|
|
1281
|
+
error?: string;
|
|
1282
|
+
errorCode?: WorkspaceErrorCode;
|
|
1283
|
+
};
|
|
1284
|
+
export type WorkspaceDeleteFileResponseMsg = {
|
|
1285
|
+
type: 'workspace.delete_file.response';
|
|
1286
|
+
requestId: string;
|
|
1287
|
+
relativePath: string;
|
|
1288
|
+
ok?: boolean;
|
|
1289
|
+
error?: string;
|
|
1290
|
+
errorCode?: WorkspaceErrorCode;
|
|
1291
|
+
};
|
|
1292
|
+
export type WorkspaceDeletePathResponseMsg = {
|
|
1293
|
+
type: 'workspace.delete_path.response';
|
|
1294
|
+
requestId: string;
|
|
1295
|
+
relativePath: string;
|
|
1296
|
+
ok?: boolean;
|
|
1297
|
+
error?: string;
|
|
1298
|
+
errorCode?: WorkspaceErrorCode;
|
|
1299
|
+
};
|
|
1300
|
+
export type LibraryMirrorFileEntry = {
|
|
1301
|
+
path: string;
|
|
1302
|
+
content: string;
|
|
1303
|
+
sha256: string;
|
|
1304
|
+
};
|
|
1305
|
+
export type LibraryMirrorTree = {
|
|
1306
|
+
files: LibraryMirrorFileEntry[];
|
|
1307
|
+
};
|
|
1308
|
+
export type LibraryMirrorApplyRequestMsg = {
|
|
1309
|
+
type: 'library.mirror.apply.request';
|
|
1310
|
+
requestId: string;
|
|
1311
|
+
workspaceRoot: string;
|
|
1312
|
+
shared: LibraryMirrorTree | null;
|
|
1313
|
+
personal: LibraryMirrorTree | null;
|
|
1314
|
+
};
|
|
1315
|
+
export type LibraryMirrorApplyResponseMsg = {
|
|
1316
|
+
type: 'library.mirror.apply.response';
|
|
1317
|
+
requestId: string;
|
|
1318
|
+
ok?: boolean;
|
|
1319
|
+
error?: string;
|
|
1320
|
+
};
|
|
1321
|
+
export type LibraryMirrorSnapshotRequestMsg = {
|
|
1322
|
+
type: 'library.mirror.snapshot.request';
|
|
1323
|
+
requestId: string;
|
|
1324
|
+
workspaceRoot: string;
|
|
1325
|
+
};
|
|
1326
|
+
export type LibraryMirrorSnapshotResponseMsg = {
|
|
1327
|
+
type: 'library.mirror.snapshot.response';
|
|
1328
|
+
requestId: string;
|
|
1329
|
+
shared?: LibraryMirrorTree | null;
|
|
1330
|
+
personal?: LibraryMirrorTree | null;
|
|
1331
|
+
error?: string;
|
|
1332
|
+
};
|
|
1333
|
+
export type LibraryAuthorityDeleteRequestMsg = {
|
|
1334
|
+
type: 'library.authority.delete.request';
|
|
1335
|
+
requestId: string;
|
|
1336
|
+
libraryRoot: string;
|
|
1337
|
+
relativePath: string;
|
|
1338
|
+
recursive?: boolean;
|
|
1339
|
+
agentName?: string;
|
|
1340
|
+
};
|
|
1341
|
+
export type LibraryAuthorityDeleteResponseMsg = {
|
|
1342
|
+
type: 'library.authority.delete.response';
|
|
1343
|
+
requestId: string;
|
|
1344
|
+
ok?: boolean;
|
|
1345
|
+
error?: string;
|
|
1346
|
+
errorCode?: WorkspaceErrorCode;
|
|
1347
|
+
};
|
|
1348
|
+
export type LibraryAuthorityRenameRequestMsg = {
|
|
1349
|
+
type: 'library.authority.rename.request';
|
|
1350
|
+
requestId: string;
|
|
1351
|
+
libraryRoot: string;
|
|
1352
|
+
relativePath: string;
|
|
1353
|
+
nextRelativePath: string;
|
|
1354
|
+
agentName?: string;
|
|
1355
|
+
};
|
|
1356
|
+
export type LibraryAuthorityRenameResponseMsg = {
|
|
1357
|
+
type: 'library.authority.rename.response';
|
|
1358
|
+
requestId: string;
|
|
1359
|
+
ok?: boolean;
|
|
1360
|
+
error?: string;
|
|
1361
|
+
errorCode?: WorkspaceErrorCode;
|
|
1362
|
+
};
|
|
1363
|
+
export type WorkspaceResetRequestMsg = {
|
|
1364
|
+
type: 'workspace.reset.request';
|
|
1365
|
+
requestId: string;
|
|
1366
|
+
workspaceRoot: string;
|
|
1367
|
+
agentName?: string;
|
|
1368
|
+
};
|
|
1369
|
+
export type WorkspaceResetResponseMsg = {
|
|
1370
|
+
type: 'workspace.reset.response';
|
|
1371
|
+
requestId: string;
|
|
1372
|
+
workspaceRoot: string;
|
|
1373
|
+
ok?: boolean;
|
|
1374
|
+
error?: string;
|
|
1375
|
+
errorCode?: WorkspaceErrorCode;
|
|
1376
|
+
};
|
|
1377
|
+
export type WorkbenchWorkspaceKind = 'local_checkout' | 'worktree' | 'directory';
|
|
1378
|
+
export type WorkspaceInspectResult = {
|
|
1379
|
+
workspaceRoot: string;
|
|
1380
|
+
isGit: boolean;
|
|
1381
|
+
repoRoot: string | null;
|
|
1382
|
+
workspaceKind: WorkbenchWorkspaceKind;
|
|
1383
|
+
branchName: string | null;
|
|
1384
|
+
remoteUrl: string | null;
|
|
1385
|
+
};
|
|
1386
|
+
export type WorkspaceInspectRequestMsg = {
|
|
1387
|
+
type: 'workspace.inspect.request';
|
|
1388
|
+
requestId: string;
|
|
1389
|
+
workspaceRoot: string;
|
|
1390
|
+
};
|
|
1391
|
+
export type WorkspaceInspectResponseMsg = {
|
|
1392
|
+
type: 'workspace.inspect.response';
|
|
1393
|
+
requestId: string;
|
|
1394
|
+
inspect?: WorkspaceInspectResult;
|
|
1395
|
+
error?: string;
|
|
1396
|
+
errorCode?: WorkspaceErrorCode;
|
|
1397
|
+
};
|
|
1398
|
+
export type WorkbenchGitDiffMode = 'uncommitted' | 'base';
|
|
1399
|
+
export type WorkbenchGitAheadBehind = {
|
|
1400
|
+
ahead: number;
|
|
1401
|
+
behind: number;
|
|
1402
|
+
};
|
|
1403
|
+
export type WorkbenchGitStatusResult = {
|
|
1404
|
+
workspaceRoot: string;
|
|
1405
|
+
isGit: boolean;
|
|
1406
|
+
repoRoot: string | null;
|
|
1407
|
+
workspaceKind: WorkbenchWorkspaceKind;
|
|
1408
|
+
branchName: string | null;
|
|
1409
|
+
remoteUrl: string | null;
|
|
1410
|
+
baseRef: string | null;
|
|
1411
|
+
hasRemote: boolean;
|
|
1412
|
+
isDirty: boolean;
|
|
1413
|
+
changedFiles: number;
|
|
1414
|
+
stagedFiles: number;
|
|
1415
|
+
unstagedFiles: number;
|
|
1416
|
+
untrackedFiles: number;
|
|
1417
|
+
aheadOfOrigin: number;
|
|
1418
|
+
behindOfOrigin: number;
|
|
1419
|
+
aheadBehind: WorkbenchGitAheadBehind | null;
|
|
1420
|
+
};
|
|
1421
|
+
export type WorkbenchGitDiffLineType = 'context' | 'add' | 'remove' | 'header';
|
|
1422
|
+
export type WorkbenchGitDiffLine = {
|
|
1423
|
+
type: WorkbenchGitDiffLineType;
|
|
1424
|
+
content: string;
|
|
1425
|
+
oldLineNumber: number | null;
|
|
1426
|
+
newLineNumber: number | null;
|
|
1427
|
+
};
|
|
1428
|
+
export type WorkbenchGitDiffHunk = {
|
|
1429
|
+
header: string;
|
|
1430
|
+
lines: WorkbenchGitDiffLine[];
|
|
1431
|
+
};
|
|
1432
|
+
export type WorkbenchGitDiffFileStatus = 'modified' | 'added' | 'deleted' | 'renamed' | 'copied' | 'untracked' | 'type_changed' | 'conflicted' | 'unknown';
|
|
1433
|
+
export type WorkbenchGitDiffFile = {
|
|
1434
|
+
path: string;
|
|
1435
|
+
oldPath: string | null;
|
|
1436
|
+
status: WorkbenchGitDiffFileStatus;
|
|
1437
|
+
isNew: boolean;
|
|
1438
|
+
isDeleted: boolean;
|
|
1439
|
+
isUntracked: boolean;
|
|
1440
|
+
hunks: WorkbenchGitDiffHunk[];
|
|
1441
|
+
};
|
|
1442
|
+
export type WorkbenchGitDiffResult = {
|
|
1443
|
+
workspaceRoot: string;
|
|
1444
|
+
isGit: boolean;
|
|
1445
|
+
mode: WorkbenchGitDiffMode;
|
|
1446
|
+
baseRef: string | null;
|
|
1447
|
+
files: WorkbenchGitDiffFile[];
|
|
1448
|
+
};
|
|
1449
|
+
export type WorkbenchGitAction = 'fetch' | 'pull_ff_only' | 'commit_all' | 'push';
|
|
1450
|
+
export type WorkbenchGitActionResult = {
|
|
1451
|
+
workspaceRoot: string;
|
|
1452
|
+
action: WorkbenchGitAction;
|
|
1453
|
+
stdout: string;
|
|
1454
|
+
stderr: string;
|
|
1455
|
+
branchName: string | null;
|
|
1456
|
+
};
|
|
1457
|
+
export type ClaudeControlConversationTarget = {
|
|
1458
|
+
conversationId: string;
|
|
1459
|
+
sessionKey: string;
|
|
1460
|
+
hostKey: string;
|
|
1461
|
+
workspaceRoot: string;
|
|
1462
|
+
envVars?: Record<string, string>;
|
|
1463
|
+
disabledToolKinds?: AgentPermissionKind[];
|
|
1464
|
+
};
|
|
1465
|
+
export type WorkspaceGitStatusRequestMsg = {
|
|
1466
|
+
type: 'workspace.git_status.request';
|
|
1467
|
+
requestId: string;
|
|
1468
|
+
workspaceRoot: string;
|
|
1469
|
+
};
|
|
1470
|
+
export type WorkspaceGitStatusResponseMsg = {
|
|
1471
|
+
type: 'workspace.git_status.response';
|
|
1472
|
+
requestId: string;
|
|
1473
|
+
status?: WorkbenchGitStatusResult;
|
|
1474
|
+
error?: string;
|
|
1475
|
+
errorCode?: WorkspaceErrorCode;
|
|
1476
|
+
};
|
|
1477
|
+
export type WorkspaceGitDiffRequestMsg = {
|
|
1478
|
+
type: 'workspace.git_diff.request';
|
|
1479
|
+
requestId: string;
|
|
1480
|
+
workspaceRoot: string;
|
|
1481
|
+
mode: WorkbenchGitDiffMode;
|
|
1482
|
+
};
|
|
1483
|
+
export type WorkspaceGitDiffResponseMsg = {
|
|
1484
|
+
type: 'workspace.git_diff.response';
|
|
1485
|
+
requestId: string;
|
|
1486
|
+
diff?: WorkbenchGitDiffResult;
|
|
1487
|
+
error?: string;
|
|
1488
|
+
errorCode?: WorkspaceErrorCode;
|
|
1489
|
+
};
|
|
1490
|
+
export type WorkspaceGitActionRequestMsg = {
|
|
1491
|
+
type: 'workspace.git_action.request';
|
|
1492
|
+
requestId: string;
|
|
1493
|
+
workspaceRoot: string;
|
|
1494
|
+
action: WorkbenchGitAction;
|
|
1495
|
+
commitMessage?: string;
|
|
1496
|
+
};
|
|
1497
|
+
export type WorkspaceGitActionResponseMsg = {
|
|
1498
|
+
type: 'workspace.git_action.response';
|
|
1499
|
+
requestId: string;
|
|
1500
|
+
result?: WorkbenchGitActionResult;
|
|
1501
|
+
error?: string;
|
|
1502
|
+
errorCode?: WorkspaceErrorCode;
|
|
1503
|
+
};
|
|
1504
|
+
export type ClaudeControlsRequestMsg = {
|
|
1505
|
+
type: 'claude.controls.request';
|
|
1506
|
+
requestId: string;
|
|
1507
|
+
target: ClaudeControlConversationTarget;
|
|
1508
|
+
};
|
|
1509
|
+
export type ClaudeControlsResponseMsg = {
|
|
1510
|
+
type: 'claude.controls.response';
|
|
1511
|
+
requestId: string;
|
|
1512
|
+
controls?: ClaudeSessionControlState;
|
|
1513
|
+
error?: string;
|
|
1514
|
+
};
|
|
1515
|
+
export type ClaudeSetModeRequestMsg = {
|
|
1516
|
+
type: 'claude.set_mode.request';
|
|
1517
|
+
requestId: string;
|
|
1518
|
+
target: ClaudeControlConversationTarget;
|
|
1519
|
+
modeId: ClaudeSessionModeId;
|
|
1520
|
+
};
|
|
1521
|
+
export type ClaudeSetModeResponseMsg = {
|
|
1522
|
+
type: 'claude.set_mode.response';
|
|
1523
|
+
requestId: string;
|
|
1524
|
+
controls?: ClaudeSessionControlState;
|
|
1525
|
+
error?: string;
|
|
1526
|
+
};
|
|
1527
|
+
export type ClaudeSetModelRequestMsg = {
|
|
1528
|
+
type: 'claude.set_model.request';
|
|
1529
|
+
requestId: string;
|
|
1530
|
+
target: ClaudeControlConversationTarget;
|
|
1531
|
+
modelId?: string | null;
|
|
1532
|
+
};
|
|
1533
|
+
export type ClaudeSetModelResponseMsg = {
|
|
1534
|
+
type: 'claude.set_model.response';
|
|
1535
|
+
requestId: string;
|
|
1536
|
+
controls?: ClaudeSessionControlState;
|
|
1537
|
+
error?: string;
|
|
1538
|
+
};
|
|
1539
|
+
export type CodexModelListRequestMsg = {
|
|
1540
|
+
type: 'codex.model.list.request';
|
|
1541
|
+
requestId: string;
|
|
1542
|
+
workspaceRoot?: string | null;
|
|
1543
|
+
cursor?: string | null;
|
|
1544
|
+
limit?: number | null;
|
|
1545
|
+
includeHidden?: boolean | null;
|
|
1546
|
+
};
|
|
1547
|
+
export type CodexModelListResponseMsg = {
|
|
1548
|
+
type: 'codex.model.list.response';
|
|
1549
|
+
requestId: string;
|
|
1550
|
+
models?: CodexModelDefinition[];
|
|
1551
|
+
nextCursor?: string | null;
|
|
1552
|
+
defaultModel?: string | null;
|
|
1553
|
+
error?: string;
|
|
1554
|
+
};
|
|
1555
|
+
export type CodexSkillsListRequestMsg = {
|
|
1556
|
+
type: 'codex.skills.list.request';
|
|
1557
|
+
requestId: string;
|
|
1558
|
+
workspaceRoot: string;
|
|
1559
|
+
skillRoots?: string[];
|
|
1560
|
+
forceReload?: boolean;
|
|
1561
|
+
};
|
|
1562
|
+
export type CodexSkillsListResponseMsg = {
|
|
1563
|
+
type: 'codex.skills.list.response';
|
|
1564
|
+
requestId: string;
|
|
1565
|
+
data?: CodexNativeSkillListEntry[];
|
|
1566
|
+
error?: string;
|
|
1567
|
+
};
|
|
1568
|
+
export type CodexThreadListRequestMsg = {
|
|
1569
|
+
type: 'codex.thread.list.request';
|
|
1570
|
+
requestId: string;
|
|
1571
|
+
workspaceRoot: string;
|
|
1572
|
+
cursor?: string | null;
|
|
1573
|
+
limit?: number | null;
|
|
1574
|
+
archived?: boolean | null;
|
|
1575
|
+
searchTerm?: string | null;
|
|
1576
|
+
useStateDbOnly?: boolean;
|
|
1577
|
+
};
|
|
1578
|
+
export type CodexThreadListResponseMsg = {
|
|
1579
|
+
type: 'codex.thread.list.response';
|
|
1580
|
+
requestId: string;
|
|
1581
|
+
threads?: CodexThreadSummary[];
|
|
1582
|
+
nextCursor?: string | null;
|
|
1583
|
+
backwardsCursor?: string | null;
|
|
1584
|
+
error?: string;
|
|
1585
|
+
};
|
|
1586
|
+
export type CodexThreadReadRequestMsg = {
|
|
1587
|
+
type: 'codex.thread.read.request';
|
|
1588
|
+
requestId: string;
|
|
1589
|
+
workspaceRoot: string;
|
|
1590
|
+
threadId: string;
|
|
1591
|
+
includeTurns?: boolean;
|
|
1592
|
+
};
|
|
1593
|
+
export type CodexThreadReadResponseMsg = {
|
|
1594
|
+
type: 'codex.thread.read.response';
|
|
1595
|
+
requestId: string;
|
|
1596
|
+
thread?: CodexThreadSummary;
|
|
1597
|
+
error?: string;
|
|
1598
|
+
};
|
|
1599
|
+
export type ClaudeCommandRequestMsg = {
|
|
1600
|
+
type: 'claude.command.request';
|
|
1601
|
+
requestId: string;
|
|
1602
|
+
target: ClaudeControlConversationTarget;
|
|
1603
|
+
commandName: ClaudeSessionCommandName;
|
|
1604
|
+
args?: string | null;
|
|
1605
|
+
};
|
|
1606
|
+
export type ClaudeCommandResponseMsg = {
|
|
1607
|
+
type: 'claude.command.response';
|
|
1608
|
+
requestId: string;
|
|
1609
|
+
result?: ClaudeCommandExecutionResult;
|
|
1610
|
+
controls?: ClaudeSessionControlState;
|
|
1611
|
+
error?: string;
|
|
1612
|
+
};
|
|
1613
|
+
export type WorkbenchTerminalInfo = {
|
|
1614
|
+
terminalId: string;
|
|
1615
|
+
workspaceRoot: string;
|
|
1616
|
+
cwd: string;
|
|
1617
|
+
name: string;
|
|
1618
|
+
cols: number;
|
|
1619
|
+
rows: number;
|
|
1620
|
+
createdAt: number;
|
|
1621
|
+
lastActivityAt: number;
|
|
1622
|
+
exited: boolean;
|
|
1623
|
+
exitCode?: number | null;
|
|
1624
|
+
signal?: string | null;
|
|
1625
|
+
};
|
|
1626
|
+
export type TerminalListRequestMsg = {
|
|
1627
|
+
type: 'terminal.list.request';
|
|
1628
|
+
requestId: string;
|
|
1629
|
+
workspaceRoot: string;
|
|
1630
|
+
};
|
|
1631
|
+
export type TerminalListResponseMsg = {
|
|
1632
|
+
type: 'terminal.list.response';
|
|
1633
|
+
requestId: string;
|
|
1634
|
+
workspaceRoot: string;
|
|
1635
|
+
terminals?: WorkbenchTerminalInfo[];
|
|
1636
|
+
error?: string;
|
|
1637
|
+
errorCode?: WorkspaceErrorCode;
|
|
1638
|
+
};
|
|
1639
|
+
export type TerminalCreateRequestMsg = {
|
|
1640
|
+
type: 'terminal.create.request';
|
|
1641
|
+
requestId: string;
|
|
1642
|
+
workspaceRoot: string;
|
|
1643
|
+
cwd?: string;
|
|
1644
|
+
name?: string;
|
|
1645
|
+
startupCommand?: string;
|
|
1646
|
+
closeOnStartupCommand?: boolean;
|
|
1647
|
+
cols?: number;
|
|
1648
|
+
rows?: number;
|
|
1649
|
+
};
|
|
1650
|
+
export type TerminalCreateResponseMsg = {
|
|
1651
|
+
type: 'terminal.create.response';
|
|
1652
|
+
requestId: string;
|
|
1653
|
+
terminal?: WorkbenchTerminalInfo;
|
|
1654
|
+
error?: string;
|
|
1655
|
+
errorCode?: WorkspaceErrorCode;
|
|
1656
|
+
};
|
|
1657
|
+
export type TerminalSnapshotRequestMsg = {
|
|
1658
|
+
type: 'terminal.snapshot.request';
|
|
1659
|
+
requestId: string;
|
|
1660
|
+
terminalId: string;
|
|
1661
|
+
};
|
|
1662
|
+
export type TerminalSnapshotResponseMsg = {
|
|
1663
|
+
type: 'terminal.snapshot.response';
|
|
1664
|
+
requestId: string;
|
|
1665
|
+
terminal?: WorkbenchTerminalInfo;
|
|
1666
|
+
buffer?: string;
|
|
1667
|
+
error?: string;
|
|
1668
|
+
errorCode?: WorkspaceErrorCode;
|
|
1669
|
+
};
|
|
1670
|
+
export type TerminalInputRequestMsg = {
|
|
1671
|
+
type: 'terminal.input.request';
|
|
1672
|
+
requestId: string;
|
|
1673
|
+
terminalId: string;
|
|
1674
|
+
data: string;
|
|
1675
|
+
};
|
|
1676
|
+
export type TerminalInputResponseMsg = {
|
|
1677
|
+
type: 'terminal.input.response';
|
|
1678
|
+
requestId: string;
|
|
1679
|
+
ok?: boolean;
|
|
1680
|
+
error?: string;
|
|
1681
|
+
errorCode?: WorkspaceErrorCode;
|
|
1682
|
+
};
|
|
1683
|
+
export type TerminalResizeRequestMsg = {
|
|
1684
|
+
type: 'terminal.resize.request';
|
|
1685
|
+
requestId: string;
|
|
1686
|
+
terminalId: string;
|
|
1687
|
+
cols: number;
|
|
1688
|
+
rows: number;
|
|
1689
|
+
};
|
|
1690
|
+
export type TerminalResizeResponseMsg = {
|
|
1691
|
+
type: 'terminal.resize.response';
|
|
1692
|
+
requestId: string;
|
|
1693
|
+
ok?: boolean;
|
|
1694
|
+
error?: string;
|
|
1695
|
+
errorCode?: WorkspaceErrorCode;
|
|
1696
|
+
};
|
|
1697
|
+
export type TerminalCloseRequestMsg = {
|
|
1698
|
+
type: 'terminal.close.request';
|
|
1699
|
+
requestId: string;
|
|
1700
|
+
terminalId: string;
|
|
1701
|
+
};
|
|
1702
|
+
export type TerminalCloseResponseMsg = {
|
|
1703
|
+
type: 'terminal.close.response';
|
|
1704
|
+
requestId: string;
|
|
1705
|
+
ok?: boolean;
|
|
1706
|
+
error?: string;
|
|
1707
|
+
errorCode?: WorkspaceErrorCode;
|
|
1708
|
+
};
|
|
1709
|
+
export type TerminalOutputEventMsg = {
|
|
1710
|
+
type: 'terminal.output.event';
|
|
1711
|
+
terminalId: string;
|
|
1712
|
+
data: string;
|
|
1713
|
+
};
|
|
1714
|
+
export type TerminalExitEventMsg = {
|
|
1715
|
+
type: 'terminal.exit.event';
|
|
1716
|
+
terminalId: string;
|
|
1717
|
+
exitCode?: number | null;
|
|
1718
|
+
signal?: string | null;
|
|
1719
|
+
};
|
|
1720
|
+
export type SkillsListRequestMsg = {
|
|
1721
|
+
type: 'skills.list.request';
|
|
1722
|
+
requestId: string;
|
|
1723
|
+
skillRoots: string[];
|
|
1724
|
+
path?: string | null;
|
|
1725
|
+
agentType?: AgentType;
|
|
1726
|
+
workspaceRoot?: string | null;
|
|
1727
|
+
};
|
|
1728
|
+
export type SkillsListResponseMsg = {
|
|
1729
|
+
type: 'skills.list.response';
|
|
1730
|
+
requestId: string;
|
|
1731
|
+
roots: string[];
|
|
1732
|
+
path?: string | null;
|
|
1733
|
+
skills?: AgentSkillSummary[];
|
|
1734
|
+
entries?: AgentSkillEntry[];
|
|
1735
|
+
error?: string;
|
|
1736
|
+
errorCode?: WorkspaceErrorCode;
|
|
1737
|
+
};
|
|
1738
|
+
export type SkillsReadRequestMsg = {
|
|
1739
|
+
type: 'skills.read.request';
|
|
1740
|
+
requestId: string;
|
|
1741
|
+
skillRoots: string[];
|
|
1742
|
+
path: string;
|
|
1743
|
+
agentType?: AgentType;
|
|
1744
|
+
workspaceRoot?: string | null;
|
|
1745
|
+
};
|
|
1746
|
+
export type SkillsReadResponseMsg = {
|
|
1747
|
+
type: 'skills.read.response';
|
|
1748
|
+
requestId: string;
|
|
1749
|
+
path: string;
|
|
1750
|
+
content?: string;
|
|
1751
|
+
mimeType?: 'text/markdown' | 'text/plain';
|
|
1752
|
+
size?: number;
|
|
1753
|
+
modifiedAt?: number | null;
|
|
1754
|
+
error?: string;
|
|
1755
|
+
errorCode?: WorkspaceErrorCode;
|
|
1756
|
+
};
|
|
1757
|
+
export type CodexTranscriptFileEntry = {
|
|
1758
|
+
path: string;
|
|
1759
|
+
size: number;
|
|
1760
|
+
modifiedAt: number;
|
|
1761
|
+
sessionId?: string;
|
|
1762
|
+
cwd?: string;
|
|
1763
|
+
};
|
|
1764
|
+
export type CodexTranscriptListRequestMsg = {
|
|
1765
|
+
type: 'codex.transcript.list.request';
|
|
1766
|
+
requestId: string;
|
|
1767
|
+
maxFiles?: number;
|
|
1768
|
+
};
|
|
1769
|
+
export type CodexTranscriptListResponseMsg = {
|
|
1770
|
+
type: 'codex.transcript.list.response';
|
|
1771
|
+
requestId: string;
|
|
1772
|
+
rootPath?: string;
|
|
1773
|
+
files?: CodexTranscriptFileEntry[];
|
|
1774
|
+
truncated?: boolean;
|
|
1775
|
+
error?: string;
|
|
1776
|
+
errorCode?: WorkspaceErrorCode;
|
|
1777
|
+
};
|
|
1778
|
+
export type CodexTranscriptReadRequestMsg = {
|
|
1779
|
+
type: 'codex.transcript.read.request';
|
|
1780
|
+
requestId: string;
|
|
1781
|
+
path: string;
|
|
1782
|
+
};
|
|
1783
|
+
export type CodexTranscriptReadResponseMsg = {
|
|
1784
|
+
type: 'codex.transcript.read.response';
|
|
1785
|
+
requestId: string;
|
|
1786
|
+
path: string;
|
|
1787
|
+
rootPath?: string;
|
|
1788
|
+
content?: string;
|
|
1789
|
+
size?: number;
|
|
1790
|
+
modifiedAt?: number | null;
|
|
1791
|
+
error?: string;
|
|
1792
|
+
errorCode?: WorkspaceErrorCode;
|
|
1793
|
+
};
|
|
1794
|
+
export type ClaudeTranscriptListRequestMsg = {
|
|
1795
|
+
type: 'claude.transcript.list.request';
|
|
1796
|
+
requestId: string;
|
|
1797
|
+
workspaceRoot: string;
|
|
1798
|
+
maxFiles?: number;
|
|
1799
|
+
};
|
|
1800
|
+
export type ClaudeTranscriptListResponseMsg = {
|
|
1801
|
+
type: 'claude.transcript.list.response';
|
|
1802
|
+
requestId: string;
|
|
1803
|
+
rootPath?: string;
|
|
1804
|
+
files?: CodexTranscriptFileEntry[];
|
|
1805
|
+
truncated?: boolean;
|
|
1806
|
+
error?: string;
|
|
1807
|
+
errorCode?: WorkspaceErrorCode;
|
|
1808
|
+
};
|
|
1809
|
+
export type ClaudeTranscriptReadRequestMsg = {
|
|
1810
|
+
type: 'claude.transcript.read.request';
|
|
1811
|
+
requestId: string;
|
|
1812
|
+
workspaceRoot: string;
|
|
1813
|
+
path: string;
|
|
1814
|
+
};
|
|
1815
|
+
export type ClaudeTranscriptReadResponseMsg = {
|
|
1816
|
+
type: 'claude.transcript.read.response';
|
|
1817
|
+
requestId: string;
|
|
1818
|
+
path: string;
|
|
1819
|
+
rootPath?: string;
|
|
1820
|
+
content?: string;
|
|
1821
|
+
size?: number;
|
|
1822
|
+
modifiedAt?: number | null;
|
|
1823
|
+
error?: string;
|
|
1824
|
+
errorCode?: WorkspaceErrorCode;
|
|
1825
|
+
};
|
|
1826
|
+
export type RunDebugSnapshotMsg = {
|
|
1827
|
+
type: 'run.debug.snapshot';
|
|
1828
|
+
runId: string;
|
|
1829
|
+
conversationId: string;
|
|
1830
|
+
sessionKey: string;
|
|
1831
|
+
acpSessionId: string;
|
|
1832
|
+
isFreshSession: boolean;
|
|
1833
|
+
isExact: boolean;
|
|
1834
|
+
effectiveSystemPromptText?: string;
|
|
1835
|
+
effectiveContextText?: string;
|
|
1836
|
+
};
|
|
1837
|
+
export type AgentCleanupResponseMsg = {
|
|
1838
|
+
type: 'agent.cleanup.response';
|
|
1839
|
+
requestId: string;
|
|
1840
|
+
agentId: string;
|
|
1841
|
+
ok?: boolean;
|
|
1842
|
+
error?: string;
|
|
1843
|
+
};
|
|
1844
|
+
export type NodeToCore = NodeRegisterMsg | NodeHeartbeatMsg | NodeHostsSnapshotMsg | AssetMaterializedMsg | AssetMaterializationClearedMsg | NodeRuntimeSnapshotMsg | DroidMissionRunAcceptedMsg | DroidMissionRunEventMsg | DroidMissionRunEndMsg | DroidMissionContinuationInspectResponseMsg | RunAcceptedMsg | RunEventMsg | RunEndMsg | RunSteerResultMsg | RunDeliveryAckMsg | NodePermissionRequestMsg | ClaudeControlsResponseMsg | ClaudeSetModeResponseMsg | ClaudeSetModelResponseMsg | ClaudeCommandResponseMsg | CodexModelListResponseMsg | CodexSkillsListResponseMsg | CodexThreadListResponseMsg | CodexThreadReadResponseMsg | CodexConversationSummaryResponseMsg | WorkspaceInspectResponseMsg | WorkspaceGitStatusResponseMsg | WorkspaceGitDiffResponseMsg | WorkspaceGitActionResponseMsg | WorkspaceListResponseMsg | WorkspaceReadResponseMsg | WorkspaceArchiveResponseMsg | WorkspaceExtractResponseMsg | FsReadPathResponseMsg | HttpFetchTextResponseMsg | WorkspaceServiceProxyResponseMsg | FsPathSuggestResponseMsg | FsReadPathStreamStartMsg | FsReadPathStreamChunkMsg | FsReadPathStreamEndMsg | LibraryMirrorApplyResponseMsg | LibraryMirrorSnapshotResponseMsg | LibraryAuthorityDeleteResponseMsg | LibraryAuthorityRenameResponseMsg | WorkspaceWriteResponseMsg | WorkspaceDeleteFileResponseMsg | WorkspaceDeletePathResponseMsg | WorkspaceResetResponseMsg | TerminalListResponseMsg | TerminalCreateResponseMsg | TerminalSnapshotResponseMsg | TerminalInputResponseMsg | TerminalResizeResponseMsg | TerminalCloseResponseMsg | TerminalOutputEventMsg | TerminalExitEventMsg | SkillsListResponseMsg | SkillsReadResponseMsg | CodexTranscriptListResponseMsg | CodexTranscriptReadResponseMsg | ClaudeTranscriptListResponseMsg | ClaudeTranscriptReadResponseMsg | AgentCleanupResponseMsg | RunDebugSnapshotMsg | SoloRunEventMsg | SoloRunEndMsg | SoloPermissionRequestMsg;
|
|
1845
|
+
export type NodeAckMsg = {
|
|
1846
|
+
type: 'node.ack';
|
|
1847
|
+
nodeId: string;
|
|
1848
|
+
};
|
|
1849
|
+
export type RunDispatchMsg = {
|
|
1850
|
+
type: 'run.dispatch';
|
|
1851
|
+
runId: string;
|
|
1852
|
+
conversationId: string;
|
|
1853
|
+
agentType: AgentType;
|
|
1854
|
+
agentSurfaceMode?: AgentSurfaceMode;
|
|
1855
|
+
model?: string;
|
|
1856
|
+
reasoningEffort?: string;
|
|
1857
|
+
claudePermissionMode?: ClaudePermissionMode;
|
|
1858
|
+
codexMode?: CodexAppServerMode;
|
|
1859
|
+
codexServiceTier?: CodexServiceTier;
|
|
1860
|
+
workspacePath: string | null;
|
|
1861
|
+
agentName?: string;
|
|
1862
|
+
skillRoots?: string[];
|
|
1863
|
+
enabledSkillPaths?: string[];
|
|
1864
|
+
envVars?: Record<string, string>;
|
|
1865
|
+
disabledToolKinds?: AgentPermissionKind[];
|
|
1866
|
+
prompt: string;
|
|
1867
|
+
attachments?: FileRef[];
|
|
1868
|
+
runtimeOverrides?: PromptRuntimeOverrides;
|
|
1869
|
+
sessionKey: string;
|
|
1870
|
+
hostKey: string;
|
|
1871
|
+
dispatchMode: RuntimeDispatchMode;
|
|
1872
|
+
systemPromptText?: string;
|
|
1873
|
+
contextText?: string;
|
|
1874
|
+
resumeContextText?: string;
|
|
1875
|
+
delivery?: NotificationDeliveryMetadata;
|
|
1876
|
+
channelBridgeConfig?: {
|
|
1877
|
+
agentId: string;
|
|
1878
|
+
conversationId: string;
|
|
1879
|
+
serverUrl: string;
|
|
1880
|
+
authToken?: string;
|
|
1881
|
+
};
|
|
1882
|
+
};
|
|
1883
|
+
export type RunCancelMsg = {
|
|
1884
|
+
type: 'run.cancel';
|
|
1885
|
+
runId: string;
|
|
1886
|
+
};
|
|
1887
|
+
export type RunSteerMsg = {
|
|
1888
|
+
type: 'run.steer';
|
|
1889
|
+
requestId: string;
|
|
1890
|
+
runId: string;
|
|
1891
|
+
conversationId: string;
|
|
1892
|
+
prompt: string;
|
|
1893
|
+
attachments?: FileRef[];
|
|
1894
|
+
delivery?: NotificationDeliveryMetadata;
|
|
1895
|
+
};
|
|
1896
|
+
export type NodePermissionResponseMsg = {
|
|
1897
|
+
type: 'permission.response';
|
|
1898
|
+
requestId: string;
|
|
1899
|
+
decision: 'allow' | 'deny';
|
|
1900
|
+
selectedActionId?: string;
|
|
1901
|
+
responseText?: string;
|
|
1902
|
+
answers?: Record<string, string[]>;
|
|
1903
|
+
};
|
|
1904
|
+
export type SoloRunDispatchMsg = {
|
|
1905
|
+
type: 'solo.run.dispatch';
|
|
1906
|
+
soloSessionId: string;
|
|
1907
|
+
agentId: string;
|
|
1908
|
+
agentType: AgentType;
|
|
1909
|
+
workspacePath: string;
|
|
1910
|
+
agentName?: string;
|
|
1911
|
+
model?: string;
|
|
1912
|
+
reasoningEffort?: string;
|
|
1913
|
+
codexMode?: CodexAppServerMode;
|
|
1914
|
+
codexServiceTier?: CodexServiceTier;
|
|
1915
|
+
envVars?: Record<string, string>;
|
|
1916
|
+
disabledToolKinds?: AgentPermissionKind[];
|
|
1917
|
+
prompt: string;
|
|
1918
|
+
systemPromptText?: string;
|
|
1919
|
+
};
|
|
1920
|
+
export type SoloCancelMsg = {
|
|
1921
|
+
type: 'solo.cancel';
|
|
1922
|
+
soloSessionId: string;
|
|
1923
|
+
};
|
|
1924
|
+
export type SoloCloseMsg = {
|
|
1925
|
+
type: 'solo.close';
|
|
1926
|
+
soloSessionId: string;
|
|
1927
|
+
};
|
|
1928
|
+
export type SoloSteerMsg = {
|
|
1929
|
+
type: 'solo.steer';
|
|
1930
|
+
soloSessionId: string;
|
|
1931
|
+
prompt: string;
|
|
1932
|
+
};
|
|
1933
|
+
export type SoloPermissionResponseMsg = {
|
|
1934
|
+
type: 'solo.permission.response';
|
|
1935
|
+
soloSessionId: string;
|
|
1936
|
+
requestId: string;
|
|
1937
|
+
decision: 'allow' | 'deny';
|
|
1938
|
+
selectedActionId?: string;
|
|
1939
|
+
responseText?: string;
|
|
1940
|
+
answers?: Record<string, string[]>;
|
|
1941
|
+
};
|
|
1942
|
+
export type SoloRunEventMsg = {
|
|
1943
|
+
type: 'solo.run.event';
|
|
1944
|
+
soloSessionId: string;
|
|
1945
|
+
event: ServerEvent;
|
|
1946
|
+
};
|
|
1947
|
+
export type SoloRunEndMsg = {
|
|
1948
|
+
type: 'solo.run.end';
|
|
1949
|
+
soloSessionId: string;
|
|
1950
|
+
stopReason?: string;
|
|
1951
|
+
error?: string;
|
|
1952
|
+
};
|
|
1953
|
+
export type SoloPermissionRequestMsg = {
|
|
1954
|
+
type: 'solo.permission.request';
|
|
1955
|
+
soloSessionId: string;
|
|
1956
|
+
requestId: string;
|
|
1957
|
+
toolName: string;
|
|
1958
|
+
toolArgs: unknown;
|
|
1959
|
+
toolKind?: string | null;
|
|
1960
|
+
approvalKind?: 'tool' | 'plan' | 'question';
|
|
1961
|
+
title?: string;
|
|
1962
|
+
description?: string;
|
|
1963
|
+
input?: unknown;
|
|
1964
|
+
actions?: Array<{
|
|
1965
|
+
id: string;
|
|
1966
|
+
label: string;
|
|
1967
|
+
}>;
|
|
1968
|
+
};
|
|
1969
|
+
export type SoloClientPromptMsg = {
|
|
1970
|
+
type: 'solo.prompt';
|
|
1971
|
+
soloSessionId: string;
|
|
1972
|
+
text: string;
|
|
1973
|
+
};
|
|
1974
|
+
export type SoloClientSteerMsg = {
|
|
1975
|
+
type: 'solo.steer';
|
|
1976
|
+
soloSessionId: string;
|
|
1977
|
+
text: string;
|
|
1978
|
+
};
|
|
1979
|
+
export type SoloClientApprovalResponseMsg = {
|
|
1980
|
+
type: 'solo.approval.response';
|
|
1981
|
+
soloSessionId: string;
|
|
1982
|
+
requestId: string;
|
|
1983
|
+
decision: 'allow' | 'deny';
|
|
1984
|
+
selectedActionId?: string;
|
|
1985
|
+
responseText?: string;
|
|
1986
|
+
answers?: Record<string, string[]>;
|
|
1987
|
+
};
|
|
1988
|
+
export type SoloClientMessage = SoloClientPromptMsg | SoloCancelMsg | SoloClientSteerMsg | SoloClientApprovalResponseMsg;
|
|
1989
|
+
export type SoloServerMessage = SoloRunEventMsg | SoloRunEndMsg | SoloPermissionRequestMsg | {
|
|
1990
|
+
type: 'error';
|
|
1991
|
+
message: string;
|
|
1992
|
+
};
|
|
1993
|
+
export type WorkspaceListRequestMsg = {
|
|
1994
|
+
type: 'workspace.list.request';
|
|
1995
|
+
requestId: string;
|
|
1996
|
+
workspaceRoot: string;
|
|
1997
|
+
relativePath: string;
|
|
1998
|
+
runId?: string;
|
|
1999
|
+
scaffold?: boolean;
|
|
2000
|
+
agentName?: string;
|
|
2001
|
+
cursor?: string | null;
|
|
2002
|
+
limit?: number;
|
|
2003
|
+
};
|
|
2004
|
+
export type WorkspaceReadRequestMsg = {
|
|
2005
|
+
type: 'workspace.read.request';
|
|
2006
|
+
requestId: string;
|
|
2007
|
+
workspaceRoot: string;
|
|
2008
|
+
relativePath: string;
|
|
2009
|
+
runId?: string;
|
|
2010
|
+
scaffold?: boolean;
|
|
2011
|
+
agentName?: string;
|
|
2012
|
+
offset?: number;
|
|
2013
|
+
limit?: number;
|
|
2014
|
+
};
|
|
2015
|
+
export type WorkspaceArchiveRequestMsg = {
|
|
2016
|
+
type: 'workspace.archive.request';
|
|
2017
|
+
requestId: string;
|
|
2018
|
+
workspaceRoot: string;
|
|
2019
|
+
relativePath: string;
|
|
2020
|
+
maxBytes?: number;
|
|
2021
|
+
};
|
|
2022
|
+
export type WorkspaceExtractRequestMsg = {
|
|
2023
|
+
type: 'workspace.extract.request';
|
|
2024
|
+
requestId: string;
|
|
2025
|
+
workspaceRoot: string;
|
|
2026
|
+
relativePath: string;
|
|
2027
|
+
archiveBase64: string;
|
|
2028
|
+
overwrite?: boolean;
|
|
2029
|
+
maxBytes?: number;
|
|
2030
|
+
};
|
|
2031
|
+
export type FsReadPathRequestMsg = {
|
|
2032
|
+
type: 'fs.read_path.request';
|
|
2033
|
+
requestId: string;
|
|
2034
|
+
absolutePath: string;
|
|
2035
|
+
allowedRoot?: string;
|
|
2036
|
+
trustedRoot?: string;
|
|
2037
|
+
cursor?: string | null;
|
|
2038
|
+
offset?: number;
|
|
2039
|
+
limit?: number;
|
|
2040
|
+
maxPreviewBytes?: number;
|
|
2041
|
+
rawContentBase64?: boolean;
|
|
2042
|
+
};
|
|
2043
|
+
export type FsPathSuggestRequestMsg = {
|
|
2044
|
+
type: 'fs.path_suggest.request';
|
|
2045
|
+
requestId: string;
|
|
2046
|
+
query: string;
|
|
2047
|
+
limit?: number;
|
|
2048
|
+
};
|
|
2049
|
+
export type FsReadPathStreamRequestMsg = {
|
|
2050
|
+
type: 'fs.read_path.stream.request';
|
|
2051
|
+
requestId: string;
|
|
2052
|
+
absolutePath: string;
|
|
2053
|
+
allowedRoot?: string;
|
|
2054
|
+
};
|
|
2055
|
+
export type HttpFetchTextRequestMsg = {
|
|
2056
|
+
type: 'http.fetch_text.request';
|
|
2057
|
+
requestId: string;
|
|
2058
|
+
url: string;
|
|
2059
|
+
maxBytes?: number;
|
|
2060
|
+
authProfile?: string;
|
|
2061
|
+
ifNoneMatch?: string;
|
|
2062
|
+
ifModifiedSince?: string;
|
|
2063
|
+
ifRange?: string;
|
|
2064
|
+
rangeStart?: number;
|
|
2065
|
+
rangeLength?: number;
|
|
2066
|
+
};
|
|
2067
|
+
export type WorkspaceServiceProxyRequestMsg = {
|
|
2068
|
+
type: 'workspace.service_proxy.request';
|
|
2069
|
+
requestId: string;
|
|
2070
|
+
url: string;
|
|
2071
|
+
method?: WorkspaceServiceProxyMethod;
|
|
2072
|
+
headers?: Record<string, string>;
|
|
2073
|
+
body?: string;
|
|
2074
|
+
maxBytes?: number;
|
|
2075
|
+
};
|
|
2076
|
+
export type WorkspaceWriteRequestMsg = {
|
|
2077
|
+
type: 'workspace.write.request';
|
|
2078
|
+
requestId: string;
|
|
2079
|
+
workspaceRoot: string;
|
|
2080
|
+
relativePath: string;
|
|
2081
|
+
content: string;
|
|
2082
|
+
mode: WorkspaceWriteMode;
|
|
2083
|
+
contentEncoding?: WorkspaceWriteContentEncoding;
|
|
2084
|
+
scaffold?: boolean;
|
|
2085
|
+
agentName?: string;
|
|
2086
|
+
};
|
|
2087
|
+
export type WorkspaceDeleteFileRequestMsg = {
|
|
2088
|
+
type: 'workspace.delete_file.request';
|
|
2089
|
+
requestId: string;
|
|
2090
|
+
workspaceRoot: string;
|
|
2091
|
+
relativePath: string;
|
|
2092
|
+
};
|
|
2093
|
+
export type WorkspaceDeletePathRequestMsg = {
|
|
2094
|
+
type: 'workspace.delete_path.request';
|
|
2095
|
+
requestId: string;
|
|
2096
|
+
workspaceRoot: string;
|
|
2097
|
+
relativePath: string;
|
|
2098
|
+
recursive?: boolean;
|
|
2099
|
+
};
|
|
2100
|
+
export type LibraryMirrorApplyCoreRequestMsg = LibraryMirrorApplyRequestMsg;
|
|
2101
|
+
export type LibraryMirrorSnapshotCoreRequestMsg = LibraryMirrorSnapshotRequestMsg;
|
|
2102
|
+
export type LibraryAuthorityDeleteCoreRequestMsg = LibraryAuthorityDeleteRequestMsg;
|
|
2103
|
+
export type LibraryAuthorityRenameCoreRequestMsg = LibraryAuthorityRenameRequestMsg;
|
|
2104
|
+
export type WorkspaceInspectCoreRequestMsg = WorkspaceInspectRequestMsg;
|
|
2105
|
+
export type WorkspaceGitStatusCoreRequestMsg = WorkspaceGitStatusRequestMsg;
|
|
2106
|
+
export type WorkspaceGitDiffCoreRequestMsg = WorkspaceGitDiffRequestMsg;
|
|
2107
|
+
export type WorkspaceGitActionCoreRequestMsg = WorkspaceGitActionRequestMsg;
|
|
2108
|
+
export type TerminalListCoreRequestMsg = TerminalListRequestMsg;
|
|
2109
|
+
export type TerminalCreateCoreRequestMsg = TerminalCreateRequestMsg;
|
|
2110
|
+
export type TerminalSnapshotCoreRequestMsg = TerminalSnapshotRequestMsg;
|
|
2111
|
+
export type TerminalInputCoreRequestMsg = TerminalInputRequestMsg;
|
|
2112
|
+
export type TerminalResizeCoreRequestMsg = TerminalResizeRequestMsg;
|
|
2113
|
+
export type TerminalCloseCoreRequestMsg = TerminalCloseRequestMsg;
|
|
2114
|
+
export type SkillsListCoreRequestMsg = SkillsListRequestMsg;
|
|
2115
|
+
export type SkillsReadCoreRequestMsg = SkillsReadRequestMsg;
|
|
2116
|
+
export type HostCloseMsg = {
|
|
2117
|
+
type: 'host.close';
|
|
2118
|
+
hostKey: string;
|
|
2119
|
+
};
|
|
2120
|
+
export type AgentCleanupRequestMsg = {
|
|
2121
|
+
type: 'agent.cleanup.request';
|
|
2122
|
+
requestId: string;
|
|
2123
|
+
agentId: string;
|
|
2124
|
+
hostKeys: string[];
|
|
2125
|
+
sessionKeys?: string[];
|
|
2126
|
+
};
|
|
2127
|
+
export type NativeMissionFeatureContext = {
|
|
2128
|
+
featureId: string;
|
|
2129
|
+
featureDescription: string;
|
|
2130
|
+
milestone: string;
|
|
2131
|
+
expectedBehavior?: string[];
|
|
2132
|
+
preconditions?: string[];
|
|
2133
|
+
priorHandoffs?: Array<{
|
|
2134
|
+
featureId: string;
|
|
2135
|
+
salientSummary: string;
|
|
2136
|
+
whatWasImplemented?: string[];
|
|
2137
|
+
}>;
|
|
2138
|
+
validationContract?: string;
|
|
2139
|
+
workspaceFiles?: string[];
|
|
2140
|
+
useAgentDispatch?: boolean;
|
|
2141
|
+
isValidator?: boolean;
|
|
2142
|
+
};
|
|
2143
|
+
export type MissionRunRequestMsg = {
|
|
2144
|
+
type: 'mission.run.request';
|
|
2145
|
+
requestId: string;
|
|
2146
|
+
missionId: string;
|
|
2147
|
+
runtimeProvider?: MissionRuntimeProvider;
|
|
2148
|
+
title: string;
|
|
2149
|
+
prompt: string;
|
|
2150
|
+
continueSession?: boolean;
|
|
2151
|
+
interaction?: boolean;
|
|
2152
|
+
workspaceRoot: string;
|
|
2153
|
+
missionDir: string;
|
|
2154
|
+
modelMode: MissionModelMode;
|
|
2155
|
+
orchestratorModel?: string | null;
|
|
2156
|
+
workerModel?: string | null;
|
|
2157
|
+
validatorModel?: string | null;
|
|
2158
|
+
} & Partial<NativeMissionFeatureContext>;
|
|
2159
|
+
export type DroidMissionRunRequestMsg = MissionRunRequestMsg;
|
|
2160
|
+
export type NativeMissionRunRequestMsg = MissionRunRequestMsg & {
|
|
2161
|
+
runtimeProvider: 'bigbang_native';
|
|
2162
|
+
featureId?: string;
|
|
2163
|
+
featureDescription?: string;
|
|
2164
|
+
milestone?: string;
|
|
2165
|
+
};
|
|
2166
|
+
export type CoreToNode = NodeAckMsg | RunDispatchMsg | RunCancelMsg | RunSteerMsg | NodePermissionResponseMsg | ClaudeControlsRequestMsg | ClaudeSetModeRequestMsg | ClaudeSetModelRequestMsg | ClaudeCommandRequestMsg | CodexModelListRequestMsg | CodexSkillsListRequestMsg | CodexThreadListRequestMsg | CodexThreadReadRequestMsg | CodexConversationSummaryRequestMsg | WorkspaceInspectCoreRequestMsg | WorkspaceGitStatusCoreRequestMsg | WorkspaceGitDiffCoreRequestMsg | WorkspaceGitActionCoreRequestMsg | WorkspaceListRequestMsg | WorkspaceReadRequestMsg | WorkspaceArchiveRequestMsg | WorkspaceExtractRequestMsg | FsReadPathRequestMsg | HttpFetchTextRequestMsg | WorkspaceServiceProxyRequestMsg | FsPathSuggestRequestMsg | FsReadPathStreamRequestMsg | LibraryMirrorApplyCoreRequestMsg | LibraryMirrorSnapshotCoreRequestMsg | LibraryAuthorityDeleteCoreRequestMsg | LibraryAuthorityRenameCoreRequestMsg | WorkspaceWriteRequestMsg | WorkspaceDeleteFileRequestMsg | WorkspaceDeletePathRequestMsg | WorkspaceResetRequestMsg | TerminalListCoreRequestMsg | TerminalCreateCoreRequestMsg | TerminalSnapshotCoreRequestMsg | TerminalInputCoreRequestMsg | TerminalResizeCoreRequestMsg | TerminalCloseCoreRequestMsg | SkillsListCoreRequestMsg | SkillsReadCoreRequestMsg | DroidMissionRunRequestMsg | MissionRunCancelMsg | DroidMissionContinuationInspectRequestMsg | CodexTranscriptListRequestMsg | CodexTranscriptReadRequestMsg | ClaudeTranscriptListRequestMsg | ClaudeTranscriptReadRequestMsg | HostCloseMsg | AgentCleanupRequestMsg | SoloRunDispatchMsg | SoloCancelMsg | SoloCloseMsg | SoloSteerMsg | SoloPermissionResponseMsg;
|
|
2167
|
+
export type AgentSurfaceKind = 'dm' | 'dm_thread' | 'channel' | 'channel_thread';
|
|
2168
|
+
export type SurfaceSummaryLastMessage = {
|
|
2169
|
+
messageId: string;
|
|
2170
|
+
target: string;
|
|
2171
|
+
senderName: string;
|
|
2172
|
+
senderType: string;
|
|
2173
|
+
preview: string;
|
|
2174
|
+
createdAt: string;
|
|
2175
|
+
};
|
|
2176
|
+
export type SurfaceSummaryTaskLink = {
|
|
2177
|
+
taskId: string;
|
|
2178
|
+
agentTaskRef: string | null;
|
|
2179
|
+
taskNumber: number;
|
|
2180
|
+
title: string;
|
|
2181
|
+
status: 'todo' | 'in_progress' | 'in_review' | 'done';
|
|
2182
|
+
threadTarget: string | null;
|
|
2183
|
+
};
|
|
2184
|
+
export type SurfaceSummaryBoundTask = SurfaceSummaryTaskLink & {
|
|
2185
|
+
description: string | null;
|
|
2186
|
+
claimedByName: string | null;
|
|
2187
|
+
};
|
|
2188
|
+
export type SurfaceSummaryActiveHandoff = {
|
|
2189
|
+
handoffId: string;
|
|
2190
|
+
mode: 'delegate_only' | 'continue_there' | 'collab';
|
|
2191
|
+
status: 'started' | 'accepted' | 'completed' | 'cancelled' | 'failed';
|
|
2192
|
+
sourceConversationId: string;
|
|
2193
|
+
targetConversationId: string | null;
|
|
2194
|
+
targetReplyTarget: string;
|
|
2195
|
+
sourceTarget: string | null;
|
|
2196
|
+
goal: string;
|
|
2197
|
+
error: string | null;
|
|
2198
|
+
updatedAt: string;
|
|
2199
|
+
};
|
|
2200
|
+
export type SurfaceSummaryPayload = {
|
|
2201
|
+
goal: string | null;
|
|
2202
|
+
recentState: string | null;
|
|
2203
|
+
blockers: string[];
|
|
2204
|
+
nextStep: string | null;
|
|
2205
|
+
lastUserMessage: string | null;
|
|
2206
|
+
lastAgentMessage: string | null;
|
|
2207
|
+
linkedTaskRefs: string[];
|
|
2208
|
+
linkedTaskTitles: string[];
|
|
2209
|
+
unreadCount: number;
|
|
2210
|
+
queuedPromptCount: number;
|
|
2211
|
+
lastMessageAt: string | null;
|
|
2212
|
+
lastMessage: SurfaceSummaryLastMessage | null;
|
|
2213
|
+
linkedTasks: SurfaceSummaryTaskLink[];
|
|
2214
|
+
boundTask: SurfaceSummaryBoundTask | null;
|
|
2215
|
+
ownerAgentId: string | null;
|
|
2216
|
+
ownerName: string | null;
|
|
2217
|
+
participants: string[];
|
|
2218
|
+
myRole: string | null;
|
|
2219
|
+
activeHandoff: SurfaceSummaryActiveHandoff | null;
|
|
2220
|
+
};
|
|
2221
|
+
export type AgentRuntimePresenceHost = {
|
|
2222
|
+
hostKey: string;
|
|
2223
|
+
replyTarget: string | null;
|
|
2224
|
+
surfaceKind: AgentSurfaceKind | null;
|
|
2225
|
+
state: NodeHostState;
|
|
2226
|
+
currentRunId: string | null;
|
|
2227
|
+
hasPendingApproval: boolean;
|
|
2228
|
+
inboxSize: number;
|
|
2229
|
+
pendingDispatchCount: number;
|
|
2230
|
+
resumable: boolean;
|
|
2231
|
+
lastWakeAt: string | null;
|
|
2232
|
+
lastSleepAt: string | null;
|
|
2233
|
+
lastError: string | null;
|
|
2234
|
+
};
|
|
2235
|
+
export type AgentRuntimePresence = {
|
|
2236
|
+
generatedAt: string;
|
|
2237
|
+
node: {
|
|
2238
|
+
nodeId: string | null;
|
|
2239
|
+
machineName: string | null;
|
|
2240
|
+
hostname: string | null;
|
|
2241
|
+
status: 'unassigned' | 'pending' | 'online' | 'offline';
|
|
2242
|
+
version: string | null;
|
|
2243
|
+
lastSeen: string | null;
|
|
2244
|
+
};
|
|
2245
|
+
runtime: {
|
|
2246
|
+
workspaceRoot: string | null;
|
|
2247
|
+
terminalBackendAvailable: boolean | null;
|
|
2248
|
+
runtimeDrivers: NodeRuntimeDriverInventory[];
|
|
2249
|
+
capabilities: NodeRuntimeCapabilities | null;
|
|
2250
|
+
};
|
|
2251
|
+
summary: {
|
|
2252
|
+
totalHosts: number;
|
|
2253
|
+
activeHosts: number;
|
|
2254
|
+
idleHosts: number;
|
|
2255
|
+
failedHosts: number;
|
|
2256
|
+
hostsWithPendingApproval: number;
|
|
2257
|
+
resumableHosts: number;
|
|
2258
|
+
};
|
|
2259
|
+
currentHost: AgentRuntimePresenceHost | null;
|
|
2260
|
+
otherHosts: AgentRuntimePresenceHost[];
|
|
2261
|
+
};
|
|
2262
|
+
export type RuntimePresenceResponse = AgentRuntimePresence & {
|
|
2263
|
+
reportText?: string;
|
|
2264
|
+
};
|
|
2265
|
+
export type SurfaceConversationItem = {
|
|
2266
|
+
conversationId: string;
|
|
2267
|
+
replyTarget: string;
|
|
2268
|
+
status: ConversationStatus;
|
|
2269
|
+
surfaceKind: AgentSurfaceKind;
|
|
2270
|
+
threadKind: ThreadKind;
|
|
2271
|
+
threadRootId?: string | null;
|
|
2272
|
+
unreadCount: number;
|
|
2273
|
+
queuedPromptCount: number;
|
|
2274
|
+
hasActiveRun?: boolean;
|
|
2275
|
+
updatedAt: string;
|
|
2276
|
+
summaryUpdatedAt?: string;
|
|
2277
|
+
summary: SurfaceSummaryPayload;
|
|
2278
|
+
summaryText: string;
|
|
2279
|
+
reportText?: string;
|
|
2280
|
+
};
|
|
2281
|
+
export type SelfStateResponse = {
|
|
2282
|
+
generatedAt?: string;
|
|
2283
|
+
agent?: {
|
|
2284
|
+
agentId?: string;
|
|
2285
|
+
name?: string;
|
|
2286
|
+
agentType?: string;
|
|
2287
|
+
nodeId?: string | null;
|
|
2288
|
+
joinedChannels?: Array<{
|
|
2289
|
+
channelId: string;
|
|
2290
|
+
name: string | null;
|
|
2291
|
+
target: string;
|
|
2292
|
+
}>;
|
|
2293
|
+
};
|
|
2294
|
+
summary?: {
|
|
2295
|
+
totalConversations?: number;
|
|
2296
|
+
activeConversations?: number;
|
|
2297
|
+
queuedConversations?: number;
|
|
2298
|
+
recoveringConversations?: number;
|
|
2299
|
+
awaitingApprovalConversations?: number;
|
|
2300
|
+
failedConversations?: number;
|
|
2301
|
+
totalUnreadMessages?: number;
|
|
2302
|
+
surfacesWithUnread?: number;
|
|
2303
|
+
pendingPrompts?: number;
|
|
2304
|
+
claimedTasks?: number;
|
|
2305
|
+
involvedTasks?: number;
|
|
2306
|
+
inReviewTasks?: number;
|
|
2307
|
+
};
|
|
2308
|
+
currentConversation?: {
|
|
2309
|
+
conversationId?: string;
|
|
2310
|
+
replyTarget: string;
|
|
2311
|
+
status: ConversationStatus;
|
|
2312
|
+
surfaceKind: AgentSurfaceKind;
|
|
2313
|
+
unreadCount: number;
|
|
2314
|
+
queuedPromptCount: number;
|
|
2315
|
+
} | null;
|
|
2316
|
+
reportText?: string;
|
|
2317
|
+
recentTasks?: Array<{
|
|
2318
|
+
taskId: string;
|
|
2319
|
+
agentTaskRef?: string | null;
|
|
2320
|
+
taskNumber: number;
|
|
2321
|
+
title: string;
|
|
2322
|
+
status: 'todo' | 'in_progress' | 'in_review' | 'done';
|
|
2323
|
+
sourceTarget?: string | null;
|
|
2324
|
+
threadTarget?: string | null;
|
|
2325
|
+
}>;
|
|
2326
|
+
recentHandoffs?: Array<{
|
|
2327
|
+
handoffId: string;
|
|
2328
|
+
mode: 'delegate_only' | 'continue_there' | 'collab';
|
|
2329
|
+
status: 'started' | 'accepted' | 'completed' | 'cancelled' | 'failed';
|
|
2330
|
+
sourceTarget?: string | null;
|
|
2331
|
+
targetReplyTarget: string;
|
|
2332
|
+
goal?: string | null;
|
|
2333
|
+
}>;
|
|
2334
|
+
currentContext?: SurfaceSummaryPayload | null;
|
|
2335
|
+
conversations?: Array<SurfaceConversationItem & {
|
|
2336
|
+
context?: SurfaceSummaryPayload;
|
|
2337
|
+
}>;
|
|
2338
|
+
runtimePresence?: AgentRuntimePresence | null;
|
|
2339
|
+
};
|
|
2340
|
+
export type RelevantContextBundleAction = 'inspect_surface' | 'read_history' | 'read_task_history' | 'check_handoff' | 'handoff_candidate' | 'stay_on_current_surface';
|
|
2341
|
+
export type RelevantContextBundleReasonCode = 'bound_task_match' | 'linked_task_match' | 'active_handoff' | 'recent_handoff' | 'same_thread_root' | 'same_target_family' | 'participant_overlap' | 'owner_match' | 'role_present' | 'unread_activity' | 'queued_activity' | 'recent_activity' | 'current_conversation_handoff' | 'task_status_active' | 'task_status_review';
|
|
2342
|
+
export type RelevantContextBundleReason = {
|
|
2343
|
+
code: RelevantContextBundleReasonCode;
|
|
2344
|
+
label: string;
|
|
2345
|
+
weight: number;
|
|
2346
|
+
detail?: string | null;
|
|
2347
|
+
};
|
|
2348
|
+
export type RelevantContextHistorySuggestion = {
|
|
2349
|
+
target: string;
|
|
2350
|
+
around?: string | null;
|
|
2351
|
+
includeRoot?: boolean;
|
|
2352
|
+
reason: string;
|
|
2353
|
+
};
|
|
2354
|
+
export type RelevantContextBundleSurfaceItem = {
|
|
2355
|
+
kind: 'surface';
|
|
2356
|
+
score: number;
|
|
2357
|
+
reasons: RelevantContextBundleReason[];
|
|
2358
|
+
updatedAt: string;
|
|
2359
|
+
conversationId: string;
|
|
2360
|
+
replyTarget: string;
|
|
2361
|
+
status: ConversationStatus;
|
|
2362
|
+
surfaceKind: AgentSurfaceKind;
|
|
2363
|
+
threadKind: ThreadKind;
|
|
2364
|
+
threadRootId?: string | null;
|
|
2365
|
+
unreadCount: number;
|
|
2366
|
+
queuedPromptCount: number;
|
|
2367
|
+
goal?: string | null;
|
|
2368
|
+
nextStep?: string | null;
|
|
2369
|
+
myRole?: string | null;
|
|
2370
|
+
ownerName?: string | null;
|
|
2371
|
+
linkedTaskRefs: string[];
|
|
2372
|
+
boundTask?: SurfaceSummaryBoundTask | null;
|
|
2373
|
+
activeHandoff?: SurfaceSummaryActiveHandoff | null;
|
|
2374
|
+
lastMessage?: SurfaceSummaryLastMessage | null;
|
|
2375
|
+
summaryText: string;
|
|
2376
|
+
};
|
|
2377
|
+
export type RelevantContextBundleTaskItem = {
|
|
2378
|
+
kind: 'task';
|
|
2379
|
+
score: number;
|
|
2380
|
+
reasons: RelevantContextBundleReason[];
|
|
2381
|
+
updatedAt: string;
|
|
2382
|
+
taskId: string;
|
|
2383
|
+
agentTaskRef: string | null;
|
|
2384
|
+
taskNumber: number;
|
|
2385
|
+
title: string;
|
|
2386
|
+
status: TaskInfo['status'];
|
|
2387
|
+
sourceTarget?: string | null;
|
|
2388
|
+
sourceLabel?: string | null;
|
|
2389
|
+
threadTarget?: string | null;
|
|
2390
|
+
};
|
|
2391
|
+
export type RelevantContextBundleHandoffItem = {
|
|
2392
|
+
kind: 'handoff';
|
|
2393
|
+
score: number;
|
|
2394
|
+
reasons: RelevantContextBundleReason[];
|
|
2395
|
+
updatedAt: string;
|
|
2396
|
+
handoffId: string;
|
|
2397
|
+
mode: 'delegate_only' | 'continue_there' | 'collab';
|
|
2398
|
+
status: 'started' | 'accepted' | 'completed' | 'cancelled' | 'failed';
|
|
2399
|
+
workflowKind: 'generic' | 'dm_task_thread' | 'channel_task_thread';
|
|
2400
|
+
sourceDisposition: 'keep_running' | 'cancel_current_run';
|
|
2401
|
+
sourceConversationId: string;
|
|
2402
|
+
sourceTarget?: string | null;
|
|
2403
|
+
targetConversationId: string | null;
|
|
2404
|
+
targetReplyTarget: string;
|
|
2405
|
+
goal: string;
|
|
2406
|
+
relatedTaskRef?: string | null;
|
|
2407
|
+
taskId?: string | null;
|
|
2408
|
+
taskNumber?: number | null;
|
|
2409
|
+
};
|
|
2410
|
+
export type RelevantContextBundleItem = RelevantContextBundleSurfaceItem | RelevantContextBundleTaskItem | RelevantContextBundleHandoffItem;
|
|
2411
|
+
export type RelevantContextBundle = {
|
|
2412
|
+
generatedAt: string;
|
|
2413
|
+
currentConversation: {
|
|
2414
|
+
conversationId: string;
|
|
2415
|
+
replyTarget: string;
|
|
2416
|
+
status: ConversationStatus;
|
|
2417
|
+
surfaceKind: AgentSurfaceKind;
|
|
2418
|
+
boundTaskRef?: string | null;
|
|
2419
|
+
linkedTaskRefs: string[];
|
|
2420
|
+
};
|
|
2421
|
+
recommendedNextAction: RelevantContextBundleAction;
|
|
2422
|
+
recommendedNextActionReason: string;
|
|
2423
|
+
suggestedHistoryReads: RelevantContextHistorySuggestion[];
|
|
2424
|
+
items: RelevantContextBundleItem[];
|
|
2425
|
+
totalCount: number;
|
|
2426
|
+
truncated: boolean;
|
|
2427
|
+
overflowByStatus: Record<string, number>;
|
|
2428
|
+
};
|
|
2429
|
+
export type ConversationInfo = {
|
|
2430
|
+
id: string;
|
|
2431
|
+
channelId: string;
|
|
2432
|
+
replyTarget?: string | null;
|
|
2433
|
+
title: string;
|
|
2434
|
+
agentType: AgentType;
|
|
2435
|
+
runtimeCapabilities?: AgentRuntimeCapability[];
|
|
2436
|
+
threadKind: ThreadKind;
|
|
2437
|
+
isPrimaryThread: boolean;
|
|
2438
|
+
threadRootId?: string | null;
|
|
2439
|
+
surfaceKind?: AgentSurfaceKind;
|
|
2440
|
+
workspacePath: string | null;
|
|
2441
|
+
status: ConversationStatus;
|
|
2442
|
+
createdAt: number;
|
|
2443
|
+
updatedAt: number;
|
|
2444
|
+
historyResetAt?: number | null;
|
|
2445
|
+
nodeId?: string | null;
|
|
2446
|
+
agentId?: string | null;
|
|
2447
|
+
userId?: string | null;
|
|
2448
|
+
activeProjectId?: string | null;
|
|
2449
|
+
uiPanelEnabled?: boolean;
|
|
2450
|
+
};
|
|
2451
|
+
export type WorkspaceSessionStatus = ConversationStatus;
|
|
2452
|
+
export type WorkspaceSessionRuntimeProfile = 'workspace_native';
|
|
2453
|
+
export type WorkspaceSessionInfo = {
|
|
2454
|
+
workspaceSessionId: string;
|
|
2455
|
+
agentId: string;
|
|
2456
|
+
projectId: string | null;
|
|
2457
|
+
workspaceRootId: string;
|
|
2458
|
+
title: string;
|
|
2459
|
+
status: WorkspaceSessionStatus;
|
|
2460
|
+
runtimeProfile: WorkspaceSessionRuntimeProfile;
|
|
2461
|
+
createdByUserId: string | null;
|
|
2462
|
+
createdAt: number;
|
|
2463
|
+
updatedAt: number;
|
|
2464
|
+
lastActiveAt: number;
|
|
2465
|
+
archivedAt: number | null;
|
|
2466
|
+
};
|
|
2467
|
+
export type EnsureWorkspaceSessionRequest = {
|
|
2468
|
+
agentId: string;
|
|
2469
|
+
workspaceRootId: string;
|
|
2470
|
+
title?: string;
|
|
2471
|
+
};
|
|
2472
|
+
export type EnsureWorkspaceSessionResult = {
|
|
2473
|
+
session: WorkspaceSessionInfo;
|
|
2474
|
+
created: boolean;
|
|
2475
|
+
};
|
|
2476
|
+
export type WorkspaceSessionListResult = {
|
|
2477
|
+
sessions: WorkspaceSessionInfo[];
|
|
2478
|
+
};
|
|
2479
|
+
export type WorkspaceSessionPromptRequest = {
|
|
2480
|
+
text: string;
|
|
2481
|
+
runtimeOverrides?: PromptRuntimeOverrides;
|
|
2482
|
+
};
|
|
2483
|
+
export type WorkspaceSessionPromptResult = {
|
|
2484
|
+
queued: boolean;
|
|
2485
|
+
runId: string;
|
|
2486
|
+
dispatchMode: RuntimeDispatchMode;
|
|
2487
|
+
session: WorkspaceSessionInfo;
|
|
2488
|
+
};
|
|
2489
|
+
export type WorkspaceSessionApprovalResponseRequest = {
|
|
2490
|
+
requestId: string;
|
|
2491
|
+
decision: 'allow' | 'deny';
|
|
2492
|
+
selectedActionId?: string;
|
|
2493
|
+
responseText?: string;
|
|
2494
|
+
};
|
|
2495
|
+
export type WorkspaceSessionApprovalResponseResult = {
|
|
2496
|
+
ok: true;
|
|
2497
|
+
session: WorkspaceSessionInfo;
|
|
2498
|
+
};
|
|
2499
|
+
export type WorkspaceSessionCancelResult = {
|
|
2500
|
+
ok: true;
|
|
2501
|
+
runId: string;
|
|
2502
|
+
session: WorkspaceSessionInfo;
|
|
2503
|
+
};
|
|
2504
|
+
export type WorkspaceSessionEventEntry = {
|
|
2505
|
+
runId: string;
|
|
2506
|
+
seq: number;
|
|
2507
|
+
createdAt: number;
|
|
2508
|
+
event: ServerEvent;
|
|
2509
|
+
};
|
|
2510
|
+
export type WorkspaceSessionEventListResult = {
|
|
2511
|
+
session: WorkspaceSessionInfo;
|
|
2512
|
+
events: WorkspaceSessionEventEntry[];
|
|
2513
|
+
};
|
|
2514
|
+
export type CreateConversationRequest = {
|
|
2515
|
+
agentType?: AgentType;
|
|
2516
|
+
workspacePath?: string;
|
|
2517
|
+
title?: string;
|
|
2518
|
+
channelId?: string;
|
|
2519
|
+
threadKind?: ThreadKind;
|
|
2520
|
+
isPrimaryThread?: boolean;
|
|
2521
|
+
threadRootId?: string | null;
|
|
2522
|
+
envVars?: Record<string, string>;
|
|
2523
|
+
nodeId?: string;
|
|
2524
|
+
agentId?: string;
|
|
2525
|
+
activeProjectId?: string | null;
|
|
2526
|
+
};
|
|
2527
|
+
export type SetConversationActiveProjectRequest = {
|
|
2528
|
+
activeProjectId?: string | null;
|
|
2529
|
+
};
|
|
2530
|
+
export type SetClaudeSessionModeRequest = {
|
|
2531
|
+
modeId: ClaudeSessionModeId;
|
|
2532
|
+
};
|
|
2533
|
+
export type SetClaudeSessionModelRequest = {
|
|
2534
|
+
modelId?: string | null;
|
|
2535
|
+
};
|
|
2536
|
+
export type ExecuteClaudeSessionCommandRequest = {
|
|
2537
|
+
commandName: ClaudeSessionCommandName;
|
|
2538
|
+
args?: string | null;
|
|
2539
|
+
};
|
|
2540
|
+
export type AgentWorkspaceListResult = {
|
|
2541
|
+
path: string;
|
|
2542
|
+
entries: AgentWorkspaceEntry[];
|
|
2543
|
+
directoryPage?: DirectoryPageInfo;
|
|
2544
|
+
};
|
|
2545
|
+
export type AgentFileAccessPreviewResult = {
|
|
2546
|
+
accessId: string;
|
|
2547
|
+
absolutePath: string;
|
|
2548
|
+
kind: AgentFileAccessKind;
|
|
2549
|
+
content?: string;
|
|
2550
|
+
entries?: AgentFileAccessDirectoryEntry[];
|
|
2551
|
+
directoryPage?: DirectoryPageInfo;
|
|
2552
|
+
mimeType?: WorkspacePreviewMimeType;
|
|
2553
|
+
size?: number;
|
|
2554
|
+
modifiedAt?: number | null;
|
|
2555
|
+
};
|
|
2556
|
+
export type AssetMetadataResult = {
|
|
2557
|
+
assetId: string;
|
|
2558
|
+
attachmentId: string;
|
|
2559
|
+
filename: string;
|
|
2560
|
+
originalFilename?: string | null;
|
|
2561
|
+
mimeType: string | null;
|
|
2562
|
+
sizeBytes: number;
|
|
2563
|
+
kind: AssetKind;
|
|
2564
|
+
scopeType: AssetScopeType;
|
|
2565
|
+
scopeId: string;
|
|
2566
|
+
canonicalPath: string;
|
|
2567
|
+
storagePath: string;
|
|
2568
|
+
agentLocalPath?: string | null;
|
|
2569
|
+
preferredLocalPath?: string | null;
|
|
2570
|
+
};
|
|
2571
|
+
export type AttachmentMetadataResult = AssetMetadataResult;
|
|
2572
|
+
export type AgentWorkspaceFileResult = {
|
|
2573
|
+
path: string;
|
|
2574
|
+
content: string;
|
|
2575
|
+
mimeType: WorkspacePreviewMimeType;
|
|
2576
|
+
size: number;
|
|
2577
|
+
modifiedAt: number | null;
|
|
2578
|
+
offset?: number;
|
|
2579
|
+
limit?: number;
|
|
2580
|
+
nextOffset?: number | null;
|
|
2581
|
+
hasMore?: boolean;
|
|
2582
|
+
};
|
|
2583
|
+
export type AgentWorkspaceInspectResult = {
|
|
2584
|
+
nodeId: string | null;
|
|
2585
|
+
workspaceRoot: string | null;
|
|
2586
|
+
inspect: WorkspaceInspectResult | null;
|
|
2587
|
+
};
|
|
2588
|
+
export type ResourceSpaceBackendType = 'node_path' | 'shared_mount';
|
|
2589
|
+
export type ResourceSpaceType = 'docs' | 'experiments' | 'mixed';
|
|
2590
|
+
export type ResourceTreeEntry = AgentWorkspaceEntry;
|
|
2591
|
+
export type ResourceTreeResult = {
|
|
2592
|
+
path: string;
|
|
2593
|
+
entries: ResourceTreeEntry[];
|
|
2594
|
+
};
|
|
2595
|
+
export type ResourceFileResult = {
|
|
2596
|
+
path: string;
|
|
2597
|
+
content: string;
|
|
2598
|
+
mimeType: WorkspacePreviewMimeType;
|
|
2599
|
+
size: number;
|
|
2600
|
+
modifiedAt: number | null;
|
|
2601
|
+
};
|
|
2602
|
+
export type ResourceSpaceInfo = {
|
|
2603
|
+
resourceSpaceId: string;
|
|
2604
|
+
name: string;
|
|
2605
|
+
resourceType: ResourceSpaceType;
|
|
2606
|
+
backendType: ResourceSpaceBackendType;
|
|
2607
|
+
nodeId?: string | null;
|
|
2608
|
+
rootPath: string;
|
|
2609
|
+
channelId?: string | null;
|
|
2610
|
+
description?: string | null;
|
|
2611
|
+
createdAt: number;
|
|
2612
|
+
updatedAt: number;
|
|
2613
|
+
};
|
|
2614
|
+
export type ProjectBackendType = 'local_path' | 'shared_mount';
|
|
2615
|
+
export type AgentProjectBindingInfo = {
|
|
2616
|
+
projectId: string;
|
|
2617
|
+
name: string;
|
|
2618
|
+
backendType: ProjectBackendType;
|
|
2619
|
+
rootPath: string;
|
|
2620
|
+
nodeId?: string | null;
|
|
2621
|
+
description?: string | null;
|
|
2622
|
+
isDefault: boolean;
|
|
2623
|
+
};
|
|
2624
|
+
export type ProjectBoundAgentInfo = {
|
|
2625
|
+
agentId: string;
|
|
2626
|
+
name: string;
|
|
2627
|
+
nodeId?: string | null;
|
|
2628
|
+
isDefault: boolean;
|
|
2629
|
+
};
|
|
2630
|
+
export type ProjectInfo = {
|
|
2631
|
+
projectId: string;
|
|
2632
|
+
name: string;
|
|
2633
|
+
backendType: ProjectBackendType;
|
|
2634
|
+
rootPath: string;
|
|
2635
|
+
nodeId?: string | null;
|
|
2636
|
+
description?: string | null;
|
|
2637
|
+
boundAgents: ProjectBoundAgentInfo[];
|
|
2638
|
+
createdAt: number;
|
|
2639
|
+
updatedAt: number;
|
|
2640
|
+
};
|
|
2641
|
+
export type CreateProjectRequest = {
|
|
2642
|
+
name: string;
|
|
2643
|
+
backendType: ProjectBackendType;
|
|
2644
|
+
rootPath: string;
|
|
2645
|
+
nodeId?: string | null;
|
|
2646
|
+
description?: string;
|
|
2647
|
+
};
|
|
2648
|
+
export type UpdateProjectRequest = {
|
|
2649
|
+
name?: string;
|
|
2650
|
+
backendType?: ProjectBackendType;
|
|
2651
|
+
rootPath?: string;
|
|
2652
|
+
nodeId?: string | null;
|
|
2653
|
+
description?: string | null;
|
|
2654
|
+
};
|
|
2655
|
+
export type BindProjectAgentRequest = {
|
|
2656
|
+
agentId: string;
|
|
2657
|
+
isDefault?: boolean;
|
|
2658
|
+
};
|
|
2659
|
+
export type SetAgentDefaultProjectRequest = {
|
|
2660
|
+
projectId?: string | null;
|
|
2661
|
+
};
|
|
2662
|
+
export type WorkbenchRootKind = 'agent_workspace' | 'project_space' | 'resource_space' | 'user_library';
|
|
2663
|
+
export type WorkbenchRootInfo = {
|
|
2664
|
+
workbenchRootId: string;
|
|
2665
|
+
kind: WorkbenchRootKind;
|
|
2666
|
+
displayName: string;
|
|
2667
|
+
rootPath: string;
|
|
2668
|
+
nodeId: string | null;
|
|
2669
|
+
projectId?: string;
|
|
2670
|
+
projectBackendType?: ProjectBackendType;
|
|
2671
|
+
agentId?: string;
|
|
2672
|
+
agentIds?: string[];
|
|
2673
|
+
resourceSpaceId?: string;
|
|
2674
|
+
resourceType?: ResourceSpaceType;
|
|
2675
|
+
backendType?: ResourceSpaceBackendType;
|
|
2676
|
+
writable: boolean;
|
|
2677
|
+
terminalSupported: boolean;
|
|
2678
|
+
terminalDisabledReason?: string | null;
|
|
2679
|
+
sourceLabel: string;
|
|
2680
|
+
};
|
|
2681
|
+
export type WorkbenchProjectKind = 'git' | 'directory';
|
|
2682
|
+
export type WorkbenchWorkspaceInfo = {
|
|
2683
|
+
workspaceId: string;
|
|
2684
|
+
workbenchRootId: string;
|
|
2685
|
+
displayName: string;
|
|
2686
|
+
rootPath: string;
|
|
2687
|
+
workspaceKind: WorkbenchWorkspaceKind;
|
|
2688
|
+
branchName: string | null;
|
|
2689
|
+
remoteUrl: string | null;
|
|
2690
|
+
nodeId: string | null;
|
|
2691
|
+
projectId?: string;
|
|
2692
|
+
projectBackendType?: ProjectBackendType;
|
|
2693
|
+
agentId?: string;
|
|
2694
|
+
agentIds?: string[];
|
|
2695
|
+
writable: boolean;
|
|
2696
|
+
terminalSupported: boolean;
|
|
2697
|
+
terminalDisabledReason?: string | null;
|
|
2698
|
+
};
|
|
2699
|
+
export type WorkbenchProjectInfo = {
|
|
2700
|
+
projectId: string;
|
|
2701
|
+
displayName: string;
|
|
2702
|
+
projectKind: WorkbenchProjectKind;
|
|
2703
|
+
primaryRootPath: string | null;
|
|
2704
|
+
remoteUrl: string | null;
|
|
2705
|
+
workspaces: WorkbenchWorkspaceInfo[];
|
|
2706
|
+
};
|
|
2707
|
+
export type WorkbenchProjectsResult = {
|
|
2708
|
+
projects: WorkbenchProjectInfo[];
|
|
2709
|
+
};
|
|
2710
|
+
export type NodePathSuggestionsResult = {
|
|
2711
|
+
nodeId: string;
|
|
2712
|
+
query: string;
|
|
2713
|
+
suggestions: FsPathSuggestion[];
|
|
2714
|
+
};
|
|
2715
|
+
export type WorkbenchGitStatusApiResult = WorkbenchGitStatusResult;
|
|
2716
|
+
export type WorkbenchGitDiffApiResult = WorkbenchGitDiffResult;
|
|
2717
|
+
export type CreateWorkbenchGitActionRequest = {
|
|
2718
|
+
action: WorkbenchGitAction;
|
|
2719
|
+
commitMessage?: string;
|
|
2720
|
+
};
|
|
2721
|
+
export type WorkbenchGitActionApiResult = WorkbenchGitActionResult;
|
|
2722
|
+
export type WorkbenchTreeResult = AgentWorkspaceListResult;
|
|
2723
|
+
export type WorkbenchFileResult = AgentWorkspaceFileResult;
|
|
2724
|
+
export type CreateWorkbenchTerminalRequest = {
|
|
2725
|
+
cwd?: string;
|
|
2726
|
+
name?: string;
|
|
2727
|
+
startupCommand?: string;
|
|
2728
|
+
closeOnStartupCommand?: boolean;
|
|
2729
|
+
cols?: number;
|
|
2730
|
+
rows?: number;
|
|
2731
|
+
};
|
|
2732
|
+
export type WorkbenchTerminalListResult = {
|
|
2733
|
+
workbenchRootId: string;
|
|
2734
|
+
terminals: WorkbenchTerminalInfo[];
|
|
2735
|
+
};
|
|
2736
|
+
export type WorkbenchTerminalSnapshotResult = {
|
|
2737
|
+
terminal: WorkbenchTerminalInfo;
|
|
2738
|
+
buffer: string;
|
|
2739
|
+
};
|
|
2740
|
+
export type WorkbenchTerminalWsClientEvent = {
|
|
2741
|
+
type: 'input';
|
|
2742
|
+
data: string;
|
|
2743
|
+
} | {
|
|
2744
|
+
type: 'resize';
|
|
2745
|
+
cols: number;
|
|
2746
|
+
rows: number;
|
|
2747
|
+
} | {
|
|
2748
|
+
type: 'ping';
|
|
2749
|
+
};
|
|
2750
|
+
export type WorkbenchTerminalWsServerEvent = {
|
|
2751
|
+
type: 'snapshot';
|
|
2752
|
+
terminal: WorkbenchTerminalInfo;
|
|
2753
|
+
buffer: string;
|
|
2754
|
+
} | {
|
|
2755
|
+
type: 'output';
|
|
2756
|
+
terminalId: string;
|
|
2757
|
+
data: string;
|
|
2758
|
+
} | {
|
|
2759
|
+
type: 'exit';
|
|
2760
|
+
terminalId: string;
|
|
2761
|
+
exitCode?: number | null;
|
|
2762
|
+
signal?: string | null;
|
|
2763
|
+
} | {
|
|
2764
|
+
type: 'pong';
|
|
2765
|
+
} | {
|
|
2766
|
+
type: 'error';
|
|
2767
|
+
message: string;
|
|
2768
|
+
};
|
|
2769
|
+
export type CreateResourceSpaceRequest = {
|
|
2770
|
+
name: string;
|
|
2771
|
+
resourceType: ResourceSpaceType;
|
|
2772
|
+
backendType: ResourceSpaceBackendType;
|
|
2773
|
+
nodeId?: string | null;
|
|
2774
|
+
rootPath: string;
|
|
2775
|
+
channelId?: string | null;
|
|
2776
|
+
description?: string;
|
|
2777
|
+
};
|
|
2778
|
+
export type UpdateResourceSpaceRequest = {
|
|
2779
|
+
name?: string;
|
|
2780
|
+
resourceType?: ResourceSpaceType;
|
|
2781
|
+
backendType?: ResourceSpaceBackendType;
|
|
2782
|
+
nodeId?: string | null;
|
|
2783
|
+
rootPath?: string;
|
|
2784
|
+
channelId?: string | null;
|
|
2785
|
+
description?: string | null;
|
|
2786
|
+
};
|
|
2787
|
+
export type AnalyzeResourceRequest = {
|
|
2788
|
+
agentId: string;
|
|
2789
|
+
question: string;
|
|
2790
|
+
path: string;
|
|
2791
|
+
selection?: string;
|
|
2792
|
+
};
|
|
2793
|
+
export type AnalyzeResourceResult = {
|
|
2794
|
+
conversation: ConversationInfo;
|
|
2795
|
+
queued: boolean;
|
|
2796
|
+
};
|
|
2797
|
+
export type AgentSkillListResult = {
|
|
2798
|
+
path: string | null;
|
|
2799
|
+
roots: string[];
|
|
2800
|
+
skills: AgentSkillSummary[];
|
|
2801
|
+
entries: AgentSkillEntry[];
|
|
2802
|
+
};
|
|
2803
|
+
export type AgentSkillFileResult = {
|
|
2804
|
+
path: string;
|
|
2805
|
+
content: string;
|
|
2806
|
+
mimeType: 'text/markdown' | 'text/plain';
|
|
2807
|
+
size: number;
|
|
2808
|
+
modifiedAt: number | null;
|
|
2809
|
+
};
|
|
2810
|
+
export type MemoryCategory = 'project_knowledge' | 'person' | 'preference' | 'decision' | 'procedure';
|
|
2811
|
+
export type MemoryNodeStatus = 'draft' | 'confirmed' | 'retired';
|
|
2812
|
+
export type MemoryEdgeRelation = 'related_to' | 'depends_on' | 'contradicts' | 'evolved_from';
|
|
2813
|
+
export type MemorySourceRef = {
|
|
2814
|
+
messageId: string;
|
|
2815
|
+
snippet: string;
|
|
2816
|
+
};
|
|
2817
|
+
export type MemoryNodeInfo = {
|
|
2818
|
+
nodeId: string;
|
|
2819
|
+
agentId: string;
|
|
2820
|
+
topic: string;
|
|
2821
|
+
summary: string;
|
|
2822
|
+
category: MemoryCategory;
|
|
2823
|
+
importance: number;
|
|
2824
|
+
sourceRefs?: MemorySourceRef[];
|
|
2825
|
+
status: MemoryNodeStatus;
|
|
2826
|
+
firstSeenAt: number;
|
|
2827
|
+
lastReinforcedAt: number;
|
|
2828
|
+
retiredAt?: number | null;
|
|
2829
|
+
createdAt: number;
|
|
2830
|
+
updatedAt: number;
|
|
2831
|
+
};
|
|
2832
|
+
export type MemoryEdgeInfo = {
|
|
2833
|
+
edgeId: string;
|
|
2834
|
+
agentId: string;
|
|
2835
|
+
sourceNodeId: string;
|
|
2836
|
+
targetNodeId: string;
|
|
2837
|
+
relation: MemoryEdgeRelation;
|
|
2838
|
+
strength: number;
|
|
2839
|
+
createdAt: number;
|
|
2840
|
+
};
|
|
2841
|
+
export type MemoryGraphResponse = {
|
|
2842
|
+
nodes: MemoryNodeInfo[];
|
|
2843
|
+
edges: MemoryEdgeInfo[];
|
|
2844
|
+
};
|
|
2845
|
+
export type AgentInfo = {
|
|
2846
|
+
agentId: string;
|
|
2847
|
+
name: string;
|
|
2848
|
+
agentRole?: AgentRole;
|
|
2849
|
+
agentType: AgentType;
|
|
2850
|
+
model?: string;
|
|
2851
|
+
reasoningEffort?: string;
|
|
2852
|
+
claudePermissionMode?: ClaudePermissionMode;
|
|
2853
|
+
codexMode?: CodexAppServerMode;
|
|
2854
|
+
codexServiceTier?: CodexServiceTier;
|
|
2855
|
+
channelId: string;
|
|
2856
|
+
channelIds: string[];
|
|
2857
|
+
systemPrompt: string;
|
|
2858
|
+
description?: string;
|
|
2859
|
+
envVars?: Record<string, string>;
|
|
2860
|
+
disabledToolKinds?: AgentPermissionKind[];
|
|
2861
|
+
nodeId?: string | null;
|
|
2862
|
+
workspacePath?: string | null;
|
|
2863
|
+
projectPath?: string | null;
|
|
2864
|
+
projects?: AgentProjectBindingInfo[];
|
|
2865
|
+
skillRoots?: string[];
|
|
2866
|
+
enabledSkillPaths?: string[];
|
|
2867
|
+
skillSelectionMode?: 'legacy_all' | 'explicit';
|
|
2868
|
+
memoryNetworkEnabled?: boolean;
|
|
2869
|
+
dreamEnabled?: boolean;
|
|
2870
|
+
dreamSchedule?: string;
|
|
2871
|
+
dreamMinMessages?: number;
|
|
2872
|
+
lastDreamAt?: number | null;
|
|
2873
|
+
lastDreamSeq?: number | null;
|
|
2874
|
+
deletedAt?: number | null;
|
|
2875
|
+
createdAt: number;
|
|
2876
|
+
updatedAt: number;
|
|
2877
|
+
};
|
|
2878
|
+
export type CreateAgentRequest = {
|
|
2879
|
+
name: string;
|
|
2880
|
+
agentType?: AgentType;
|
|
2881
|
+
model?: string;
|
|
2882
|
+
reasoningEffort?: string;
|
|
2883
|
+
claudePermissionMode?: ClaudePermissionMode;
|
|
2884
|
+
codexMode?: CodexAppServerMode;
|
|
2885
|
+
codexServiceTier?: CodexServiceTier;
|
|
2886
|
+
channelId?: string;
|
|
2887
|
+
systemPrompt?: string;
|
|
2888
|
+
description?: string;
|
|
2889
|
+
envVars?: Record<string, string>;
|
|
2890
|
+
disabledToolKinds?: AgentPermissionKind[];
|
|
2891
|
+
nodeId?: string;
|
|
2892
|
+
workspacePath?: string;
|
|
2893
|
+
projectPath?: string;
|
|
2894
|
+
skillRoots?: string[];
|
|
2895
|
+
};
|
|
2896
|
+
export type UpdateAgentRequest = {
|
|
2897
|
+
name?: string;
|
|
2898
|
+
agentType?: AgentType;
|
|
2899
|
+
systemPrompt?: string;
|
|
2900
|
+
description?: string;
|
|
2901
|
+
model?: string | null;
|
|
2902
|
+
reasoningEffort?: string | null;
|
|
2903
|
+
claudePermissionMode?: ClaudePermissionMode | null;
|
|
2904
|
+
codexMode?: CodexAppServerMode | null;
|
|
2905
|
+
codexServiceTier?: CodexServiceTier | null;
|
|
2906
|
+
envVars?: Record<string, string>;
|
|
2907
|
+
disabledToolKinds?: AgentPermissionKind[];
|
|
2908
|
+
channelId?: string;
|
|
2909
|
+
projectPath?: string | null;
|
|
2910
|
+
skillRoots?: string[];
|
|
2911
|
+
enabledSkillPaths?: string[];
|
|
2912
|
+
memoryNetworkEnabled?: boolean;
|
|
2913
|
+
dreamEnabled?: boolean;
|
|
2914
|
+
dreamSchedule?: string;
|
|
2915
|
+
dreamMinMessages?: number;
|
|
2916
|
+
};
|
|
2917
|
+
export type ChannelInfo = {
|
|
2918
|
+
channelId: string;
|
|
2919
|
+
name: string;
|
|
2920
|
+
workspacePath: string | null;
|
|
2921
|
+
description?: string;
|
|
2922
|
+
collaborationMode?: 'mention_only';
|
|
2923
|
+
members?: Array<{
|
|
2924
|
+
agentId: string;
|
|
2925
|
+
name: string;
|
|
2926
|
+
}>;
|
|
2927
|
+
createdAt: number;
|
|
2928
|
+
updatedAt: number;
|
|
2929
|
+
};
|
|
2930
|
+
export type ChannelMemberStatus = {
|
|
2931
|
+
agentId: string;
|
|
2932
|
+
isOwner: boolean;
|
|
2933
|
+
isRecentParticipant: boolean;
|
|
2934
|
+
lastActiveAt: number | null;
|
|
2935
|
+
};
|
|
2936
|
+
export type CreateChannelRequest = {
|
|
2937
|
+
name: string;
|
|
2938
|
+
workspacePath?: string;
|
|
2939
|
+
description?: string;
|
|
2940
|
+
agentIds?: string[];
|
|
2941
|
+
collaborationMode?: 'mention_only';
|
|
2942
|
+
};
|
|
2943
|
+
export type UpdateChannelRequest = {
|
|
2944
|
+
description?: string;
|
|
2945
|
+
collaborationMode?: 'mention_only';
|
|
2946
|
+
};
|
|
2947
|
+
export type TaskInfo = {
|
|
2948
|
+
taskId: string;
|
|
2949
|
+
taskRef?: string | null;
|
|
2950
|
+
channelId: string;
|
|
2951
|
+
taskNumber: number;
|
|
2952
|
+
title: string;
|
|
2953
|
+
description?: string;
|
|
2954
|
+
executionMode?: 'normal' | 'loop';
|
|
2955
|
+
activeLoopId?: string | null;
|
|
2956
|
+
activeLoopStatus?: 'pending' | 'running' | 'awaiting_approval' | 'paused' | 'succeeded' | 'failed' | 'stopped' | 'cancelled' | null;
|
|
2957
|
+
status: 'todo' | 'in_progress' | 'in_review' | 'done';
|
|
2958
|
+
assigneeId?: string | null;
|
|
2959
|
+
assigneeName?: string | null;
|
|
2960
|
+
assigneeDeleted?: boolean;
|
|
2961
|
+
linkedThreadId?: string | null;
|
|
2962
|
+
linkedThreadShortId?: string | null;
|
|
2963
|
+
/** The channel_messages.message_id that IS this task's thread root */
|
|
2964
|
+
messageId?: string | null;
|
|
2965
|
+
participants?: GlobalTaskParticipantInfo[];
|
|
2966
|
+
/** ARCH-2: Blocked task reason, set when task is blocked */
|
|
2967
|
+
blockedReason?: string | null;
|
|
2968
|
+
/** ARCH-2: Timestamp when task was blocked */
|
|
2969
|
+
blockedAt?: string | null;
|
|
2970
|
+
/** ARCH-2: Who (agent name or username) blocked the task */
|
|
2971
|
+
blockedBy?: string | null;
|
|
2972
|
+
createdAt: number;
|
|
2973
|
+
updatedAt: number;
|
|
2974
|
+
};
|
|
2975
|
+
export type GlobalTaskParticipantInfo = {
|
|
2976
|
+
agentId: string;
|
|
2977
|
+
name: string;
|
|
2978
|
+
role: 'owner' | 'collaborator';
|
|
2979
|
+
isChannelMember?: boolean;
|
|
2980
|
+
};
|
|
2981
|
+
export type GlobalTaskInfo = TaskInfo & {
|
|
2982
|
+
sourceType: 'channel' | 'dm';
|
|
2983
|
+
channelName: string;
|
|
2984
|
+
creatorName?: string | null;
|
|
2985
|
+
participants: GlobalTaskParticipantInfo[];
|
|
2986
|
+
};
|
|
2987
|
+
export type ProactiveOpportunityKind = 'task_review_waiting' | 'task_blocked_waiting' | 'task_unassigned_todo' | 'task_stale_in_progress' | 'planner_task_candidate';
|
|
2988
|
+
export type ProactiveOpportunityStatus = 'open' | 'snoozed' | 'dismissed' | 'resolved';
|
|
2989
|
+
export type ProactiveOpportunityTaskSourceType = 'dm' | 'channel';
|
|
2990
|
+
export type ProactiveOpportunitySourceType = ProactiveOpportunityTaskSourceType | 'planner';
|
|
2991
|
+
export type ProactiveOpportunityAction = 'ask_update' | 'create_task';
|
|
2992
|
+
export type ProactiveOpportunityEvidenceLink = {
|
|
2993
|
+
label: string;
|
|
2994
|
+
url: string;
|
|
2995
|
+
summary?: string;
|
|
2996
|
+
};
|
|
2997
|
+
export type ProactiveOpportunityTaskInfo = {
|
|
2998
|
+
taskId: string;
|
|
2999
|
+
taskRef?: string | null;
|
|
3000
|
+
sourceType: ProactiveOpportunityTaskSourceType;
|
|
3001
|
+
channelId: string;
|
|
3002
|
+
channelName?: string | null;
|
|
3003
|
+
agentId?: string | null;
|
|
3004
|
+
agentName?: string | null;
|
|
3005
|
+
taskNumber: number;
|
|
3006
|
+
title: string;
|
|
3007
|
+
description?: string | null;
|
|
3008
|
+
status: TaskInfo['status'];
|
|
3009
|
+
assigneeId?: string | null;
|
|
3010
|
+
assigneeName?: string | null;
|
|
3011
|
+
linkedThreadId?: string | null;
|
|
3012
|
+
linkedThreadShortId?: string | null;
|
|
3013
|
+
messageId?: string | null;
|
|
3014
|
+
blockedReason?: string | null;
|
|
3015
|
+
blockedAt?: string | null;
|
|
3016
|
+
blockedBy?: string | null;
|
|
3017
|
+
createdAt: number;
|
|
3018
|
+
updatedAt: number;
|
|
3019
|
+
};
|
|
3020
|
+
export type ProactiveOpportunityInfo = {
|
|
3021
|
+
opportunityId: string;
|
|
3022
|
+
kind: ProactiveOpportunityKind;
|
|
3023
|
+
status: ProactiveOpportunityStatus;
|
|
3024
|
+
actions: ProactiveOpportunityAction[];
|
|
3025
|
+
dedupeKey: string;
|
|
3026
|
+
sourceType: ProactiveOpportunitySourceType;
|
|
3027
|
+
title: string;
|
|
3028
|
+
rationale: string;
|
|
3029
|
+
evidence: Record<string, unknown>;
|
|
3030
|
+
evidenceLinks?: ProactiveOpportunityEvidenceLink[];
|
|
3031
|
+
task?: ProactiveOpportunityTaskInfo;
|
|
3032
|
+
snoozedUntil?: number | null;
|
|
3033
|
+
dismissedAt?: number | null;
|
|
3034
|
+
resolvedAt?: number | null;
|
|
3035
|
+
createdAt: number;
|
|
3036
|
+
updatedAt: number;
|
|
3037
|
+
};
|
|
3038
|
+
export type ProactiveOpportunityAskUpdateResult = {
|
|
3039
|
+
ok: true;
|
|
3040
|
+
snoozedUntil: number;
|
|
3041
|
+
sourceType: ProactiveOpportunityTaskSourceType;
|
|
3042
|
+
taskId: string;
|
|
3043
|
+
messageId?: string | null;
|
|
3044
|
+
conversationId?: string | null;
|
|
3045
|
+
threadRootId?: string | null;
|
|
3046
|
+
queued?: boolean;
|
|
3047
|
+
runId?: string;
|
|
3048
|
+
};
|
|
3049
|
+
export type ProactiveOpportunityCreateTaskResult = {
|
|
3050
|
+
ok: true;
|
|
3051
|
+
taskId: string;
|
|
3052
|
+
taskNumber: number;
|
|
3053
|
+
sourceType: ProactiveOpportunityTaskSourceType;
|
|
3054
|
+
channelId: string;
|
|
3055
|
+
agentId?: string | null;
|
|
3056
|
+
messageId: string;
|
|
3057
|
+
threadRootId: string;
|
|
3058
|
+
};
|
|
3059
|
+
export type AgentReminderScheduleKind = 'one_time' | 'recurring';
|
|
3060
|
+
export type AgentReminderIntervalUnit = 'hour' | 'day' | 'week';
|
|
3061
|
+
export type AgentReminderStatus = 'active' | 'paused' | 'in_progress' | 'awaiting_review' | 'needs_attention' | 'completed' | 'cancelled';
|
|
3062
|
+
export type AgentReminderOccurrenceStatus = 'pending' | 'dispatched' | 'awaiting_review' | 'snoozed' | 'completed' | 'skipped' | 'failed' | 'cancelled';
|
|
3063
|
+
export type AgentReminderEventType = 'created' | 'updated' | 'paused' | 'resumed' | 'cancelled' | 'scheduled' | 'dispatched' | 'snoozed' | 'completed' | 'failed' | 'skipped' | 'blocked_by_open_occurrence' | 'auto_completed_from_task_done' | 'completed_task_marked_done' | 'submitted_for_review' | 'submitted_task_marked_in_review' | 'reopened_for_rework' | 'abandoned';
|
|
3064
|
+
export type AgentReminderOccurrenceInfo = {
|
|
3065
|
+
occurrenceId: string;
|
|
3066
|
+
reminderId: string;
|
|
3067
|
+
scheduledFor: number;
|
|
3068
|
+
startedAt?: number | null;
|
|
3069
|
+
completedAt?: number | null;
|
|
3070
|
+
status: AgentReminderOccurrenceStatus;
|
|
3071
|
+
taskId?: string | null;
|
|
3072
|
+
conversationId?: string | null;
|
|
3073
|
+
threadRootId?: string | null;
|
|
3074
|
+
taskNumber?: number | null;
|
|
3075
|
+
taskTitle?: string | null;
|
|
3076
|
+
taskStatus?: TaskInfo['status'] | null;
|
|
3077
|
+
error?: string | null;
|
|
3078
|
+
createdAt: number;
|
|
3079
|
+
updatedAt: number;
|
|
3080
|
+
};
|
|
3081
|
+
export type AgentReminderInfo = {
|
|
3082
|
+
reminderId: string;
|
|
3083
|
+
agentId: string;
|
|
3084
|
+
title: string;
|
|
3085
|
+
promptText: string;
|
|
3086
|
+
scheduleKind: AgentReminderScheduleKind;
|
|
3087
|
+
intervalUnit?: AgentReminderIntervalUnit | null;
|
|
3088
|
+
intervalValue?: number | null;
|
|
3089
|
+
startAt: number;
|
|
3090
|
+
endAt?: number | null;
|
|
3091
|
+
maxOccurrences?: number | null;
|
|
3092
|
+
status: AgentReminderStatus;
|
|
3093
|
+
timezone: string;
|
|
3094
|
+
lastScheduledAt?: number | null;
|
|
3095
|
+
nextRunAt?: number | null;
|
|
3096
|
+
createdByUserId?: string | null;
|
|
3097
|
+
createdByAgentId?: string | null;
|
|
3098
|
+
targetUserId?: string | null;
|
|
3099
|
+
createdAt: number;
|
|
3100
|
+
updatedAt: number;
|
|
3101
|
+
recentOccurrences?: AgentReminderOccurrenceInfo[];
|
|
3102
|
+
};
|
|
3103
|
+
export type AgentReminderEventInfo = {
|
|
3104
|
+
eventId: string;
|
|
3105
|
+
reminderId: string;
|
|
3106
|
+
occurrenceId?: string | null;
|
|
3107
|
+
eventType: AgentReminderEventType;
|
|
3108
|
+
actorType: 'user' | 'agent' | 'system';
|
|
3109
|
+
actorId?: string | null;
|
|
3110
|
+
actorName?: string | null;
|
|
3111
|
+
payload?: Record<string, unknown> | null;
|
|
3112
|
+
createdAt: number;
|
|
3113
|
+
};
|
|
3114
|
+
export type CreateAgentReminderRequest = {
|
|
3115
|
+
title: string;
|
|
3116
|
+
promptText: string;
|
|
3117
|
+
scheduleKind: AgentReminderScheduleKind;
|
|
3118
|
+
startAt: number;
|
|
3119
|
+
intervalUnit?: AgentReminderIntervalUnit | null;
|
|
3120
|
+
intervalValue?: number | null;
|
|
3121
|
+
endAt?: number | null;
|
|
3122
|
+
maxOccurrences?: number | null;
|
|
3123
|
+
};
|
|
3124
|
+
export type UpdateAgentReminderRequest = {
|
|
3125
|
+
title?: string;
|
|
3126
|
+
promptText?: string;
|
|
3127
|
+
scheduleKind?: AgentReminderScheduleKind;
|
|
3128
|
+
startAt?: number;
|
|
3129
|
+
intervalUnit?: AgentReminderIntervalUnit | null;
|
|
3130
|
+
intervalValue?: number | null;
|
|
3131
|
+
endAt?: number | null;
|
|
3132
|
+
maxOccurrences?: number | null;
|
|
3133
|
+
};
|
|
3134
|
+
export type AgentReminderListResult = {
|
|
3135
|
+
reminders: AgentReminderInfo[];
|
|
3136
|
+
};
|
|
3137
|
+
export type AgentReminderOccurrenceListResult = {
|
|
3138
|
+
reminder: AgentReminderInfo;
|
|
3139
|
+
occurrences: AgentReminderOccurrenceInfo[];
|
|
3140
|
+
};
|
|
3141
|
+
export type AgentReminderOccurrenceTaskResult = {
|
|
3142
|
+
taskId: string;
|
|
3143
|
+
status: TaskInfo['status'];
|
|
3144
|
+
taskNumber: number;
|
|
3145
|
+
};
|
|
3146
|
+
export type AgentReminderCurrentOccurrenceResult = {
|
|
3147
|
+
reminder: AgentReminderInfo;
|
|
3148
|
+
currentOccurrence: AgentReminderOccurrenceInfo | null;
|
|
3149
|
+
latestOccurrence: AgentReminderOccurrenceInfo | null;
|
|
3150
|
+
};
|
|
3151
|
+
export type AgentReminderOccurrenceActionResult = {
|
|
3152
|
+
ok: true;
|
|
3153
|
+
reminder: AgentReminderInfo;
|
|
3154
|
+
occurrence: AgentReminderOccurrenceInfo;
|
|
3155
|
+
task?: AgentReminderOccurrenceTaskResult | null;
|
|
3156
|
+
};
|
|
3157
|
+
export type CompleteAgentReminderOccurrenceResult = AgentReminderOccurrenceActionResult;
|
|
3158
|
+
export type SubmitReminderOccurrenceForReviewResult = AgentReminderOccurrenceActionResult;
|
|
3159
|
+
export type SnoozeAgentReminderOccurrenceRequest = {
|
|
3160
|
+
until: number;
|
|
3161
|
+
};
|
|
3162
|
+
export type TaskUpdateDeliveryKind = 'task_status_changed' | 'task_created' | 'task_claimed' | 'task_unclaimed' | 'task_details_updated';
|
|
3163
|
+
export type TaskUpdateDelivery = {
|
|
3164
|
+
kind: TaskUpdateDeliveryKind;
|
|
3165
|
+
taskNumber: number;
|
|
3166
|
+
status: TaskInfo['status'];
|
|
3167
|
+
summaryText: string;
|
|
3168
|
+
recommendedNoteTargets: string[];
|
|
3169
|
+
noteGuidance: string;
|
|
3170
|
+
memoryReminder: string;
|
|
3171
|
+
};
|
|
3172
|
+
export type NodeInfoRest = {
|
|
3173
|
+
nodeId: string;
|
|
3174
|
+
hostname: string;
|
|
3175
|
+
agentTypes: string[];
|
|
3176
|
+
version: string;
|
|
3177
|
+
lastSeen: number;
|
|
3178
|
+
terminalBackendAvailable: boolean;
|
|
3179
|
+
};
|
|
3180
|
+
export type NodeHostInventoryRest = NodeHostSnapshot & {
|
|
3181
|
+
nodeId: string;
|
|
3182
|
+
snapshotAt: number;
|
|
3183
|
+
nodeOnline: boolean;
|
|
3184
|
+
};
|
|
3185
|
+
export type NodeRuntimeInventoryRest = NodeRuntimeSnapshot & {
|
|
3186
|
+
nodeId: string;
|
|
3187
|
+
snapshotAt: number;
|
|
3188
|
+
nodeOnline: boolean;
|
|
3189
|
+
};
|
|
3190
|
+
export type MachineInfo = {
|
|
3191
|
+
nodeId: string;
|
|
3192
|
+
name: string;
|
|
3193
|
+
hostname: string | null;
|
|
3194
|
+
agentTypes: string[];
|
|
3195
|
+
version: string | null;
|
|
3196
|
+
status: 'pending' | 'online' | 'offline';
|
|
3197
|
+
envVarKeys: string[];
|
|
3198
|
+
lastSeen: number | null;
|
|
3199
|
+
provisionedAt: number;
|
|
3200
|
+
createdAt: number;
|
|
3201
|
+
};
|
|
3202
|
+
export type CreateMachineRequest = {
|
|
3203
|
+
name: string;
|
|
3204
|
+
envVarKeys?: string[];
|
|
3205
|
+
};
|
|
3206
|
+
export type SavedItemSourceKind = 'dm' | 'channel' | 'thread';
|
|
3207
|
+
export type SavedItemProcessStatus = 'inbox' | 'processed' | 'skipped';
|
|
3208
|
+
export type SavedItem = {
|
|
3209
|
+
id: string;
|
|
3210
|
+
userId: string;
|
|
3211
|
+
messageId: string;
|
|
3212
|
+
senderName: string;
|
|
3213
|
+
content: string;
|
|
3214
|
+
contextUrl: string;
|
|
3215
|
+
sourceKind?: SavedItemSourceKind;
|
|
3216
|
+
processStatus?: SavedItemProcessStatus;
|
|
3217
|
+
processedAt?: number | null;
|
|
3218
|
+
processedRunId?: string | null;
|
|
3219
|
+
sourceDeletedAt?: number | null;
|
|
3220
|
+
sourceDeletedByName?: string | null;
|
|
3221
|
+
createdAt: number;
|
|
3222
|
+
};
|
|
3223
|
+
export type SaveMessageRequest = {
|
|
3224
|
+
messageId: string;
|
|
3225
|
+
senderName: string;
|
|
3226
|
+
content: string;
|
|
3227
|
+
contextUrl: string;
|
|
3228
|
+
sourceKind?: SavedItemSourceKind;
|
|
3229
|
+
};
|
|
3230
|
+
export type LibraryCuratorConfig = {
|
|
3231
|
+
userId: string;
|
|
3232
|
+
curatorAgentId: string;
|
|
3233
|
+
nodeId: string | null;
|
|
3234
|
+
libraryRootPath: string;
|
|
3235
|
+
scheduleIntervalMs: number;
|
|
3236
|
+
categories: string[];
|
|
3237
|
+
lastRunAt: number | null;
|
|
3238
|
+
nextRunAt: number | null;
|
|
3239
|
+
enabled: boolean;
|
|
3240
|
+
createdAt: number;
|
|
3241
|
+
updatedAt: number;
|
|
3242
|
+
};
|
|
3243
|
+
export type UpdateLibraryCuratorConfigRequest = {
|
|
3244
|
+
scheduleIntervalMs?: number;
|
|
3245
|
+
categories?: string[];
|
|
3246
|
+
enabled?: boolean;
|
|
3247
|
+
};
|
|
3248
|
+
export type LibraryScope = 'personal' | 'shared' | 'all';
|
|
3249
|
+
export type WritableLibraryScope = Exclude<LibraryScope, 'all'>;
|
|
3250
|
+
export type SharedLibraryConfig = {
|
|
3251
|
+
sharedKey: string;
|
|
3252
|
+
libraryRootPath: string;
|
|
3253
|
+
createdAt: number;
|
|
3254
|
+
updatedAt: number;
|
|
3255
|
+
};
|
|
3256
|
+
export type PlatformAgentDefinitionId = string;
|
|
3257
|
+
export type PlatformAgentRole = PlatformAgentDefinitionId;
|
|
3258
|
+
export type PlatformWorkflowType = 'planner_suggestions' | 'library_curate';
|
|
3259
|
+
export type PlatformRunMode = 'workflow' | 'debug';
|
|
3260
|
+
export type PlatformResourceScope = 'saved_inbox' | 'open_tasks' | 'recent_messages' | 'conversation_summaries' | 'agent_memory' | 'agent_notes' | 'personal_library_inventory' | 'personal_library_documents';
|
|
3261
|
+
export type PlatformAgentToolPolicy = {
|
|
3262
|
+
disabledToolKinds?: AgentPermissionKind[];
|
|
3263
|
+
};
|
|
3264
|
+
export type PlatformAgentDefinition = {
|
|
3265
|
+
definitionId: PlatformAgentDefinitionId;
|
|
3266
|
+
workflowType: PlatformWorkflowType;
|
|
3267
|
+
label: string;
|
|
3268
|
+
description: string;
|
|
3269
|
+
resourceScopes: PlatformResourceScope[];
|
|
3270
|
+
resourceConfig?: Record<string, unknown>;
|
|
3271
|
+
promptTemplateOverride?: string | null;
|
|
3272
|
+
toolPolicy?: PlatformAgentToolPolicy;
|
|
3273
|
+
enabled: boolean;
|
|
3274
|
+
createdAt: number;
|
|
3275
|
+
updatedAt: number;
|
|
3276
|
+
};
|
|
3277
|
+
export type PlatformAgentRuntimeConfig = {
|
|
3278
|
+
model?: string | null;
|
|
3279
|
+
reasoningEffort?: string | null;
|
|
3280
|
+
envVars?: Record<string, string>;
|
|
3281
|
+
};
|
|
3282
|
+
export type PlatformAgentInstanceConfig = {
|
|
3283
|
+
userId: string;
|
|
3284
|
+
definitionId: PlatformAgentDefinitionId;
|
|
3285
|
+
agentId: string;
|
|
3286
|
+
enabled: boolean;
|
|
3287
|
+
scheduleIntervalMs: number;
|
|
3288
|
+
workflowConfig: Record<string, unknown>;
|
|
3289
|
+
runtimeConfig: PlatformAgentRuntimeConfig;
|
|
3290
|
+
lastRunAt: number | null;
|
|
3291
|
+
nextRunAt: number | null;
|
|
3292
|
+
createdAt: number;
|
|
3293
|
+
updatedAt: number;
|
|
3294
|
+
};
|
|
3295
|
+
export type PlatformAgentRunInfo = {
|
|
3296
|
+
runId: string;
|
|
3297
|
+
definitionId: PlatformAgentDefinitionId;
|
|
3298
|
+
userId: string;
|
|
3299
|
+
mode: PlatformRunMode;
|
|
3300
|
+
status: string;
|
|
3301
|
+
createdAt: number;
|
|
3302
|
+
completedAt?: number | null;
|
|
3303
|
+
error?: string | null;
|
|
3304
|
+
generatedCount?: number | null;
|
|
3305
|
+
resourcesAccessed?: {
|
|
3306
|
+
savedItems: number;
|
|
3307
|
+
tasks: number;
|
|
3308
|
+
messages: number;
|
|
3309
|
+
} | null;
|
|
3310
|
+
};
|
|
3311
|
+
export type PlatformWorkflowCatalogEntry = {
|
|
3312
|
+
workflowType: PlatformWorkflowType;
|
|
3313
|
+
label: string;
|
|
3314
|
+
description: string;
|
|
3315
|
+
defaultResourceScopes: PlatformResourceScope[];
|
|
3316
|
+
defaultToolPolicy: PlatformAgentToolPolicy;
|
|
3317
|
+
defaultPromptTemplate: string;
|
|
3318
|
+
};
|
|
3319
|
+
export type SuggestedPlannerConfig = {
|
|
3320
|
+
userId: string;
|
|
3321
|
+
plannerAgentId: string;
|
|
3322
|
+
nodeId: string | null;
|
|
3323
|
+
scheduleIntervalMs: number;
|
|
3324
|
+
lookbackDays: number;
|
|
3325
|
+
lastRunAt: number | null;
|
|
3326
|
+
nextRunAt: number | null;
|
|
3327
|
+
enabled: boolean;
|
|
3328
|
+
createdAt: number;
|
|
3329
|
+
updatedAt: number;
|
|
3330
|
+
};
|
|
3331
|
+
export type PlatformAgentRuntimeConfigPatch = {
|
|
3332
|
+
model?: string | null;
|
|
3333
|
+
reasoningEffort?: string | null;
|
|
3334
|
+
envVars?: Record<string, string>;
|
|
3335
|
+
};
|
|
3336
|
+
export type UpdateSuggestedPlannerConfigRequest = PlatformAgentRuntimeConfigPatch & {
|
|
3337
|
+
scheduleIntervalMs?: number;
|
|
3338
|
+
lookbackDays?: number;
|
|
3339
|
+
enabled?: boolean;
|
|
3340
|
+
};
|
|
3341
|
+
export type UpdatePlatformLibraryConfigRequest = UpdateLibraryCuratorConfigRequest & PlatformAgentRuntimeConfigPatch;
|
|
3342
|
+
export type UpdatePlatformAgentInstanceRequest = {
|
|
3343
|
+
enabled?: boolean;
|
|
3344
|
+
scheduleIntervalMs?: number;
|
|
3345
|
+
workflowConfig?: Record<string, unknown>;
|
|
3346
|
+
runtimeConfig?: PlatformAgentRuntimeConfig;
|
|
3347
|
+
};
|
|
3348
|
+
export type CreatePlatformAgentDefinitionRequest = {
|
|
3349
|
+
definitionId: PlatformAgentDefinitionId;
|
|
3350
|
+
workflowType: PlatformWorkflowType;
|
|
3351
|
+
label: string;
|
|
3352
|
+
description: string;
|
|
3353
|
+
resourceScopes?: PlatformResourceScope[];
|
|
3354
|
+
resourceConfig?: Record<string, unknown>;
|
|
3355
|
+
promptTemplateOverride?: string | null;
|
|
3356
|
+
toolPolicy?: PlatformAgentToolPolicy;
|
|
3357
|
+
enabled?: boolean;
|
|
3358
|
+
};
|
|
3359
|
+
export type UpdatePlatformAgentDefinitionRequest = {
|
|
3360
|
+
label?: string;
|
|
3361
|
+
description?: string;
|
|
3362
|
+
resourceScopes?: PlatformResourceScope[];
|
|
3363
|
+
resourceConfig?: Record<string, unknown>;
|
|
3364
|
+
promptTemplateOverride?: string | null;
|
|
3365
|
+
toolPolicy?: PlatformAgentToolPolicy;
|
|
3366
|
+
enabled?: boolean;
|
|
3367
|
+
};
|
|
3368
|
+
export type PlatformAgentInfo = {
|
|
3369
|
+
definition: PlatformAgentDefinition;
|
|
3370
|
+
instance: PlatformAgentInstanceConfig;
|
|
3371
|
+
agent: AgentInfo | null;
|
|
3372
|
+
lastRun?: PlatformAgentRunInfo | null;
|
|
3373
|
+
};
|
|
3374
|
+
export type PanelToolPromotionState = 'eligible_unlinked' | 'direct_promotable' | 'agent_assisted_pending' | 'linked_live_tool' | 'source_archived_linked_live_tool' | 'linked_tool_deleted_retryable' | 'ineligible';
|
|
3375
|
+
export type PanelToolPromotionInfo = {
|
|
3376
|
+
panelId: string;
|
|
3377
|
+
state?: PanelToolPromotionState;
|
|
3378
|
+
stateReason?: string | null;
|
|
3379
|
+
ctaLabel?: string | null;
|
|
3380
|
+
disabledReason?: string | null;
|
|
3381
|
+
promotionConversationId?: string | null;
|
|
3382
|
+
toolId?: string | null;
|
|
3383
|
+
toolName?: string | null;
|
|
3384
|
+
toolRevision?: number | null;
|
|
3385
|
+
maintenanceConversationId?: string | null;
|
|
3386
|
+
};
|
|
3387
|
+
export type WorkspaceToolActionKind = 'start' | 'stop' | 'status' | 'restart' | 'custom';
|
|
3388
|
+
export type WorkspaceToolActionMode = 'platform_exec' | 'notify_agent';
|
|
3389
|
+
export type WorkspaceToolScope = 'private' | 'channel' | 'public';
|
|
3390
|
+
export type WorkspaceToolPublicReviewStatus = 'not_requested' | 'pending_review' | 'approved' | 'rejected';
|
|
3391
|
+
export type WorkspaceToolParamInput = 'text' | 'textarea' | 'number' | 'checkbox' | 'select' | 'multiselect' | 'tags' | 'date' | 'file';
|
|
3392
|
+
export type WorkspaceToolParamField = {
|
|
3393
|
+
name: string;
|
|
3394
|
+
label?: string;
|
|
3395
|
+
description?: string;
|
|
3396
|
+
input?: WorkspaceToolParamInput;
|
|
3397
|
+
required?: boolean;
|
|
3398
|
+
placeholder?: string;
|
|
3399
|
+
defaultValue?: unknown;
|
|
3400
|
+
min?: number | string;
|
|
3401
|
+
max?: number | string;
|
|
3402
|
+
accept?: string;
|
|
3403
|
+
multiple?: boolean;
|
|
3404
|
+
maxBytes?: number;
|
|
3405
|
+
options?: Array<{
|
|
3406
|
+
label: string;
|
|
3407
|
+
value: string;
|
|
3408
|
+
}>;
|
|
3409
|
+
};
|
|
3410
|
+
export declare const WORKSPACE_TOOL_PANEL_ACTION_PARAM_NAMESPACE = "tool_action";
|
|
3411
|
+
export declare function buildWorkspaceToolPanelActionParamKey(actionId: string, paramName: string): string;
|
|
3412
|
+
export declare function parseWorkspaceToolPanelActionParamKey(key: string): {
|
|
3413
|
+
actionId: string;
|
|
3414
|
+
paramName: string;
|
|
3415
|
+
} | null;
|
|
3416
|
+
export declare function extractWorkspaceToolPanelActionParams(actionId: string, formValues: Record<string, unknown> | null | undefined): Record<string, unknown>;
|
|
3417
|
+
export type WorkspaceToolMediaSlotSchema = Omit<DatasetMediaSlotSchema, 'kind'> & {
|
|
3418
|
+
kind: 'workspace_path';
|
|
3419
|
+
};
|
|
3420
|
+
export type WorkspaceToolStateRow = {
|
|
3421
|
+
fields: Record<string, unknown>;
|
|
3422
|
+
media?: Record<string, {
|
|
3423
|
+
kind: 'workspace_path';
|
|
3424
|
+
value: string;
|
|
3425
|
+
}>;
|
|
3426
|
+
};
|
|
3427
|
+
export type WorkspaceToolActionManifest = {
|
|
3428
|
+
actionId: string;
|
|
3429
|
+
label: string;
|
|
3430
|
+
description?: string;
|
|
3431
|
+
kind: WorkspaceToolActionKind;
|
|
3432
|
+
mode?: WorkspaceToolActionMode;
|
|
3433
|
+
command?: string;
|
|
3434
|
+
cwd?: string;
|
|
3435
|
+
persistent?: boolean;
|
|
3436
|
+
maxRunSeconds?: number;
|
|
3437
|
+
idleTimeoutSeconds?: number;
|
|
3438
|
+
paramsSchema?: WorkspaceToolParamField[];
|
|
3439
|
+
};
|
|
3440
|
+
export type WorkspaceToolViewManifest = {
|
|
3441
|
+
title?: string;
|
|
3442
|
+
fields: DatasetFieldSchema[];
|
|
3443
|
+
mediaSlots?: WorkspaceToolMediaSlotSchema[];
|
|
3444
|
+
summary?: PanelLevelNode;
|
|
3445
|
+
parameterForm?: PanelLevelNode;
|
|
3446
|
+
template: PanelTemplateNode;
|
|
3447
|
+
};
|
|
3448
|
+
export type WorkspaceToolExecutionEnv = {
|
|
3449
|
+
condaEnv?: string;
|
|
3450
|
+
vars?: Record<string, string>;
|
|
3451
|
+
cwd?: string;
|
|
3452
|
+
};
|
|
3453
|
+
export type WorkspaceToolServiceManifest = {
|
|
3454
|
+
port: number;
|
|
3455
|
+
healthPath?: string;
|
|
3456
|
+
};
|
|
3457
|
+
export type WorkspaceToolCliManifest = {
|
|
3458
|
+
entry: string;
|
|
3459
|
+
};
|
|
3460
|
+
export type WorkspaceToolRuntimeMode = 'per_action' | 'persistent_runtime';
|
|
3461
|
+
export type WorkspaceToolRuntimeManifest = {
|
|
3462
|
+
mode?: WorkspaceToolRuntimeMode;
|
|
3463
|
+
idleTtlSeconds?: number;
|
|
3464
|
+
entry?: string;
|
|
3465
|
+
logDir?: string;
|
|
3466
|
+
};
|
|
3467
|
+
export type WorkspaceToolManifest = {
|
|
3468
|
+
slug: string;
|
|
3469
|
+
name: string;
|
|
3470
|
+
description: string;
|
|
3471
|
+
icon?: string;
|
|
3472
|
+
defaultCwd?: string;
|
|
3473
|
+
env?: WorkspaceToolExecutionEnv;
|
|
3474
|
+
cli?: WorkspaceToolCliManifest;
|
|
3475
|
+
runtime?: WorkspaceToolRuntimeManifest;
|
|
3476
|
+
scope?: WorkspaceToolScope;
|
|
3477
|
+
scopeChannelId?: string | null;
|
|
3478
|
+
allowSharedExec?: boolean;
|
|
3479
|
+
service?: WorkspaceToolServiceManifest;
|
|
3480
|
+
actions: WorkspaceToolActionManifest[];
|
|
3481
|
+
view: WorkspaceToolViewManifest;
|
|
3482
|
+
};
|
|
3483
|
+
export type WorkspaceToolRunStatus = 'running' | 'completed' | 'failed' | 'cancelled' | 'timed_out';
|
|
3484
|
+
export type WorkspaceToolRuntimeState = 'idle' | 'running' | 'failed' | 'completed';
|
|
3485
|
+
export type WorkspaceToolVerificationStatus = 'needs_verification' | 'checking' | 'verified' | 'warning' | 'failed';
|
|
3486
|
+
export type WorkspaceToolPublishDiagnosticSeverity = 'error' | 'warning' | 'info';
|
|
3487
|
+
export type WorkspaceToolPublishDiagnostic = {
|
|
3488
|
+
severity: WorkspaceToolPublishDiagnosticSeverity;
|
|
3489
|
+
code: string;
|
|
3490
|
+
message: string;
|
|
3491
|
+
actionIds?: string[];
|
|
3492
|
+
};
|
|
3493
|
+
export type WorkspaceToolRunEventType = 'log' | 'progress' | 'result' | 'error' | 'artifact' | 'cleanup_started' | 'cleanup_completed' | 'cleanup_timed_out' | 'cleanup_failed' | 'runtime_action_timed_out';
|
|
3494
|
+
export type WorkspaceToolBackendRuntime = 'cli' | 'command' | 'none';
|
|
3495
|
+
export type WorkspaceToolRunArtifactRef = {
|
|
3496
|
+
path: string;
|
|
3497
|
+
label?: string;
|
|
3498
|
+
mimeType?: string;
|
|
3499
|
+
sizeBytes?: number;
|
|
3500
|
+
};
|
|
3501
|
+
export type WorkspaceToolRunEventInfo = {
|
|
3502
|
+
eventId: string;
|
|
3503
|
+
runId: string;
|
|
3504
|
+
toolId: string;
|
|
3505
|
+
sequence: number;
|
|
3506
|
+
type: WorkspaceToolRunEventType;
|
|
3507
|
+
level?: string | null;
|
|
3508
|
+
summary?: string | null;
|
|
3509
|
+
payload?: Record<string, unknown> | null;
|
|
3510
|
+
artifacts?: WorkspaceToolRunArtifactRef[] | null;
|
|
3511
|
+
createdAt: number;
|
|
3512
|
+
};
|
|
3513
|
+
export type WorkspaceToolRunEventsResult = {
|
|
3514
|
+
events: WorkspaceToolRunEventInfo[];
|
|
3515
|
+
nextBeforeSequence?: number | null;
|
|
3516
|
+
};
|
|
3517
|
+
export type WorkspaceToolRunArtifactListItem = {
|
|
3518
|
+
eventId: string;
|
|
3519
|
+
eventSequence: number;
|
|
3520
|
+
eventCreatedAt: number;
|
|
3521
|
+
eventType: WorkspaceToolRunEventType;
|
|
3522
|
+
eventSummary?: string | null;
|
|
3523
|
+
artifact: WorkspaceToolRunArtifactRef;
|
|
3524
|
+
};
|
|
3525
|
+
export type WorkspaceToolRunArtifactsResult = {
|
|
3526
|
+
artifacts: WorkspaceToolRunArtifactListItem[];
|
|
3527
|
+
nextBeforeSequence?: number | null;
|
|
3528
|
+
};
|
|
3529
|
+
export type WorkspaceToolRunInfo = {
|
|
3530
|
+
runId: string;
|
|
3531
|
+
toolId: string;
|
|
3532
|
+
toolRevision?: number | null;
|
|
3533
|
+
actionId: string;
|
|
3534
|
+
actionKind?: WorkspaceToolActionKind;
|
|
3535
|
+
terminalId?: string | null;
|
|
3536
|
+
status: WorkspaceToolRunStatus;
|
|
3537
|
+
params?: Record<string, unknown> | null;
|
|
3538
|
+
exitCode?: number | null;
|
|
3539
|
+
signal?: string | null;
|
|
3540
|
+
startedAt: number;
|
|
3541
|
+
endedAt?: number | null;
|
|
3542
|
+
requestedByUserId?: string | null;
|
|
3543
|
+
requestedByUsername?: string | null;
|
|
3544
|
+
requestedByAgentId?: string | null;
|
|
3545
|
+
requestedByAgentName?: string | null;
|
|
3546
|
+
executionTargetKind?: 'owner_agent' | string | null;
|
|
3547
|
+
executionAgentId?: string | null;
|
|
3548
|
+
executionNodeId?: string | null;
|
|
3549
|
+
executionHostname?: string | null;
|
|
3550
|
+
executionWorkspacePath?: string | null;
|
|
3551
|
+
events?: WorkspaceToolRunEventInfo[];
|
|
3552
|
+
};
|
|
3553
|
+
export type WorkspaceToolAgentHealth = {
|
|
3554
|
+
isOnline: boolean;
|
|
3555
|
+
isDeleted: boolean;
|
|
3556
|
+
hasNode: boolean;
|
|
3557
|
+
hasWorkspace: boolean;
|
|
3558
|
+
};
|
|
3559
|
+
export type WorkspaceToolInfo = {
|
|
3560
|
+
toolId: string;
|
|
3561
|
+
userId: string;
|
|
3562
|
+
agentId: string;
|
|
3563
|
+
agentName?: string | null;
|
|
3564
|
+
agentNodeId?: string | null;
|
|
3565
|
+
agentHealth?: WorkspaceToolAgentHealth | null;
|
|
3566
|
+
sourcePanelId?: string | null;
|
|
3567
|
+
panelId?: string | null;
|
|
3568
|
+
slug: string;
|
|
3569
|
+
name: string;
|
|
3570
|
+
description: string;
|
|
3571
|
+
icon?: string | null;
|
|
3572
|
+
scope: WorkspaceToolScope;
|
|
3573
|
+
scopeChannelId?: string | null;
|
|
3574
|
+
allowSharedExec: boolean;
|
|
3575
|
+
publicReviewStatus: WorkspaceToolPublicReviewStatus;
|
|
3576
|
+
pendingPublicReview: boolean;
|
|
3577
|
+
isOwner: boolean;
|
|
3578
|
+
canManage: boolean;
|
|
3579
|
+
manifestPath: string | null;
|
|
3580
|
+
bundleRoot: string | null;
|
|
3581
|
+
backendRuntime?: WorkspaceToolBackendRuntime;
|
|
3582
|
+
actionBackendRuntimes?: Record<string, WorkspaceToolBackendRuntime>;
|
|
3583
|
+
manifest: WorkspaceToolManifest;
|
|
3584
|
+
latestState?: WorkspaceToolStateRow | null;
|
|
3585
|
+
businessState?: string | null;
|
|
3586
|
+
runtimeState?: WorkspaceToolRuntimeState;
|
|
3587
|
+
isRunning: boolean;
|
|
3588
|
+
activeTerminalId?: string | null;
|
|
3589
|
+
maintenanceConversationId?: string | null;
|
|
3590
|
+
sourceConversationId?: string | null;
|
|
3591
|
+
sourceMessageId?: string | null;
|
|
3592
|
+
clonedFromToolId?: string | null;
|
|
3593
|
+
clonedFromRevision?: number | null;
|
|
3594
|
+
verification?: WorkspaceToolVerificationInfo | null;
|
|
3595
|
+
revision: number;
|
|
3596
|
+
createdAt: number;
|
|
3597
|
+
updatedAt: number;
|
|
3598
|
+
deletedAt?: number | null;
|
|
3599
|
+
lastRun?: WorkspaceToolRunInfo | null;
|
|
3600
|
+
};
|
|
3601
|
+
export type WorkspaceToolVerificationInfo = {
|
|
3602
|
+
verificationId: string;
|
|
3603
|
+
toolId: string;
|
|
3604
|
+
toolRevision: number;
|
|
3605
|
+
sourceToolId?: string | null;
|
|
3606
|
+
sourceRevision?: number | null;
|
|
3607
|
+
targetAgentId: string;
|
|
3608
|
+
targetNodeId?: string | null;
|
|
3609
|
+
targetWorkspacePath?: string | null;
|
|
3610
|
+
conversationId?: string | null;
|
|
3611
|
+
status: WorkspaceToolVerificationStatus;
|
|
3612
|
+
summary?: string | null;
|
|
3613
|
+
details?: Record<string, unknown> | null;
|
|
3614
|
+
smokeRunId?: string | null;
|
|
3615
|
+
startedAt: number;
|
|
3616
|
+
endedAt?: number | null;
|
|
3617
|
+
updatedAt: number;
|
|
3618
|
+
};
|
|
3619
|
+
export type UpdateWorkspaceToolSettingsRequest = {
|
|
3620
|
+
scope: WorkspaceToolScope;
|
|
3621
|
+
scopeChannelId?: string | null;
|
|
3622
|
+
allowSharedExec?: boolean;
|
|
3623
|
+
cancelPendingPublicReview?: boolean;
|
|
3624
|
+
};
|
|
3625
|
+
export type CloneWorkspaceToolRequest = {
|
|
3626
|
+
targetAgentId: string;
|
|
3627
|
+
slug?: string | null;
|
|
3628
|
+
name?: string | null;
|
|
3629
|
+
description?: string | null;
|
|
3630
|
+
};
|
|
3631
|
+
export type CloneWorkspaceToolResponse = {
|
|
3632
|
+
tool: WorkspaceToolInfo;
|
|
3633
|
+
toolUrl: string;
|
|
3634
|
+
verification?: WorkspaceToolVerificationInfo | null;
|
|
3635
|
+
};
|
|
3636
|
+
export type WorkspaceToolPlatformExecActionResult = {
|
|
3637
|
+
mode: 'platform_exec';
|
|
3638
|
+
tool: WorkspaceToolInfo;
|
|
3639
|
+
run: WorkspaceToolRunInfo;
|
|
3640
|
+
latestState?: WorkspaceToolStateRow | null;
|
|
3641
|
+
outputText?: string | null;
|
|
3642
|
+
};
|
|
3643
|
+
export type WorkspaceToolNotifyAgentActionResult = {
|
|
3644
|
+
mode: 'notify_agent';
|
|
3645
|
+
tool: WorkspaceToolInfo;
|
|
3646
|
+
conversationId: string;
|
|
3647
|
+
queued: boolean;
|
|
3648
|
+
runId?: string;
|
|
3649
|
+
latestState?: WorkspaceToolStateRow | null;
|
|
3650
|
+
outputText?: null;
|
|
3651
|
+
};
|
|
3652
|
+
export type WorkspaceToolActionResult = WorkspaceToolPlatformExecActionResult | WorkspaceToolNotifyAgentActionResult;
|
|
3653
|
+
export type LibraryDocument = {
|
|
3654
|
+
id: string;
|
|
3655
|
+
scope?: WritableLibraryScope;
|
|
3656
|
+
userId?: string | null;
|
|
3657
|
+
title: string;
|
|
3658
|
+
category: string;
|
|
3659
|
+
topicPath: string;
|
|
3660
|
+
relativePath: string;
|
|
3661
|
+
summary: string;
|
|
3662
|
+
sourceSavedItemIds: string[];
|
|
3663
|
+
createdAt: number;
|
|
3664
|
+
updatedAt: number;
|
|
3665
|
+
lastRunId?: string | null;
|
|
3666
|
+
notionPageId?: string | null;
|
|
3667
|
+
notionPageUrl?: string | null;
|
|
3668
|
+
};
|
|
3669
|
+
export type LibraryDocumentTreeNode = {
|
|
3670
|
+
scope?: WritableLibraryScope;
|
|
3671
|
+
name: string;
|
|
3672
|
+
path: string;
|
|
3673
|
+
kind: 'directory' | 'file';
|
|
3674
|
+
children?: LibraryDocumentTreeNode[];
|
|
3675
|
+
};
|
|
3676
|
+
export type LibraryOrganizeResult = {
|
|
3677
|
+
ok: boolean;
|
|
3678
|
+
runId?: string;
|
|
3679
|
+
queued?: boolean;
|
|
3680
|
+
skipped?: boolean;
|
|
3681
|
+
reason?: string;
|
|
3682
|
+
error?: string;
|
|
3683
|
+
};
|
|
3684
|
+
export * from './handoff.js';
|
|
3685
|
+
export * from './panel.js';
|