@kmlckj/aios-agent-server-sdk 0.0.0-stage → 0.0.1
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/EVENTS.md +88 -0
- package/README.md +628 -2
- package/capabilities.json +2398 -0
- package/dist/cli/daemon/preferences.d.ts +67 -0
- package/dist/cli/daemon/protocol.d.ts +26 -0
- package/dist/cli/daemon/resource-limits.d.ts +39 -0
- package/dist/core/auth/platform-client.d.ts +59 -0
- package/dist/core/host/runtime-dependencies.d.ts +26 -0
- package/dist/core/skills/skill-bindings.d.ts +19 -0
- package/dist/core/skills/skill-versions.d.ts +31 -0
- package/dist/electron/main/bundled-runtime-tools.d.ts +24 -0
- package/dist/events.js +1 -0
- package/dist/index.js +55 -0
- package/dist/sdk/src/auth.d.ts +43 -0
- package/dist/sdk/src/authorization-events.d.ts +16 -0
- package/dist/sdk/src/authorization.d.ts +10 -0
- package/dist/sdk/src/communication.d.ts +9 -0
- package/dist/sdk/src/diagnostics.d.ts +24 -0
- package/dist/sdk/src/errors.d.ts +4 -0
- package/dist/sdk/src/events.d.ts +4 -0
- package/dist/sdk/src/file-api.d.ts +29 -0
- package/dist/sdk/src/file-storage.d.ts +34 -0
- package/dist/sdk/src/index.d.ts +257 -0
- package/dist/sdk/src/local-connection.d.ts +9 -0
- package/dist/sdk/src/managed-host.d.ts +32 -0
- package/dist/sdk/src/native-status.d.ts +59 -0
- package/dist/sdk/src/platform.d.ts +35 -0
- package/dist/sdk/src/runtime-control.d.ts +111 -0
- package/dist/sdk/src/runtime-integrity.d.ts +10 -0
- package/dist/sdk/src/tool-reference.d.ts +11 -0
- package/dist/sdk/src/tool-result.d.ts +36 -0
- package/dist/sdk/src/tool-server.d.ts +14 -0
- package/dist/sdk/src/transport.d.ts +25 -0
- package/dist/sdk/src/types.d.ts +492 -0
- package/dist/shared/account-context-api.d.ts +47 -0
- package/dist/shared/action-center-api.d.ts +50 -0
- package/dist/shared/agent-capabilities.d.ts +42 -0
- package/dist/shared/agent-hooks.d.ts +10 -0
- package/dist/shared/agent-team.d.ts +17 -0
- package/dist/shared/artifact-evidence.d.ts +18 -0
- package/dist/shared/automation-api.d.ts +112 -0
- package/dist/shared/client-downloads-api.d.ts +20 -0
- package/dist/shared/cloud-assistant-api.d.ts +1020 -0
- package/dist/shared/cloud-task-event-api.d.ts +22 -0
- package/dist/shared/collaboration-api.d.ts +16 -0
- package/dist/shared/collaboration-automation-api.d.ts +55 -0
- package/dist/shared/collaboration-deep-link.d.ts +18 -0
- package/dist/shared/collaboration-event-api.d.ts +19 -0
- package/dist/shared/collaboration-plan-api.d.ts +159 -0
- package/dist/shared/collaboration-project-api.d.ts +206 -0
- package/dist/shared/collaboration-resource-api.d.ts +41 -0
- package/dist/shared/collaboration-task-api.d.ts +372 -0
- package/dist/shared/computer-use-api.d.ts +80 -0
- package/dist/shared/computer-use-handshake.d.ts +19 -0
- package/dist/shared/computer-use-protocol.d.ts +488 -0
- package/dist/shared/context-usage.d.ts +15 -0
- package/dist/shared/desktop-api.d.ts +449 -0
- package/dist/shared/desktop-diagnostics-api.d.ts +56 -0
- package/dist/shared/desktop-language.d.ts +3 -0
- package/dist/shared/desktop-mcp-service-api.d.ts +157 -0
- package/dist/shared/document-session-api.d.ts +91 -0
- package/dist/shared/enterprise-knowledge-api.d.ts +103 -0
- package/dist/shared/enterprise-project-api.d.ts +26 -0
- package/dist/shared/execution-activity.d.ts +3 -0
- package/dist/shared/execution-context.d.ts +37 -0
- package/dist/shared/execution-identity.d.ts +7 -0
- package/dist/shared/execution-profile.d.ts +6 -0
- package/dist/shared/execution-target.d.ts +71 -0
- package/dist/shared/expert-team-api.d.ts +54 -0
- package/dist/shared/feedback-api.d.ts +20 -0
- package/dist/shared/git-api.d.ts +227 -0
- package/dist/shared/git-http-api.d.ts +12 -0
- package/dist/shared/hosted-git-api.d.ts +132 -0
- package/dist/shared/js-agent-hooks.d.ts +23 -0
- package/dist/shared/local-custom-model-api.d.ts +55 -0
- package/dist/shared/local-environment-api.d.ts +110 -0
- package/dist/shared/local-mcp-server-api.d.ts +91 -0
- package/dist/shared/local-memory.d.ts +165 -0
- package/dist/shared/local-plugin-api.d.ts +26 -0
- package/dist/shared/local-runtime-api.d.ts +32 -0
- package/dist/shared/local-skill-api.d.ts +42 -0
- package/dist/shared/local-task-api.d.ts +658 -0
- package/dist/shared/local-task-command-client.d.ts +55 -0
- package/dist/shared/local-task-command.d.ts +91 -0
- package/dist/shared/local-task-event-projection.d.ts +29 -0
- package/dist/shared/local-task-projection.d.ts +29 -0
- package/dist/shared/local-workspace.d.ts +9 -0
- package/dist/shared/managed-authorization.d.ts +70 -0
- package/dist/shared/memory-customization.d.ts +32 -0
- package/dist/shared/model-routing.d.ts +31 -0
- package/dist/shared/model-selection.d.ts +11 -0
- package/dist/shared/my-expert-api.d.ts +119 -0
- package/dist/shared/navigation-api.d.ts +20 -0
- package/dist/shared/office-window-api.d.ts +81 -0
- package/dist/shared/platform-branding-api.d.ts +66 -0
- package/dist/shared/plugin-market-api.d.ts +120 -0
- package/dist/shared/profession-market-api.d.ts +96 -0
- package/dist/shared/project-local-skill-api.d.ts +8 -0
- package/dist/shared/remote-connection-api.d.ts +97 -0
- package/dist/shared/remote-connection.d.ts +62 -0
- package/dist/shared/remote-installation-api.d.ts +50 -0
- package/dist/shared/remote-tasks-api.d.ts +118 -0
- package/dist/shared/runtime-tuning.d.ts +44 -0
- package/dist/shared/scene-case-api.d.ts +42 -0
- package/dist/shared/security-center-api.d.ts +74 -0
- package/dist/shared/sensitive-protection-api.d.ts +71 -0
- package/dist/shared/session-policy.d.ts +26 -0
- package/dist/shared/shortcut-api.d.ts +7 -0
- package/dist/shared/skill-activation-api.d.ts +8 -0
- package/dist/shared/skill-asset-api.d.ts +12 -0
- package/dist/shared/skill-market-api.d.ts +119 -0
- package/dist/shared/skill-upload.d.ts +16 -0
- package/dist/shared/speech-recognition-api.d.ts +12 -0
- package/dist/shared/storage-integrity.d.ts +15 -0
- package/dist/shared/target-bridge-protocol.d.ts +67 -0
- package/dist/shared/target-environments.d.ts +15 -0
- package/dist/shared/target-resources.d.ts +105 -0
- package/dist/shared/task-initialization-api.d.ts +44 -0
- package/dist/shared/task-menu-api.d.ts +27 -0
- package/dist/shared/task-operation.d.ts +19 -0
- package/dist/shared/task-path-policy.d.ts +14 -0
- package/dist/shared/task-resource-manifest.d.ts +33 -0
- package/dist/shared/task-storage-recovery.d.ts +33 -0
- package/dist/shared/task-terminal-api.d.ts +48 -0
- package/dist/shared/team-control.d.ts +60 -0
- package/dist/shared/tool-activity.d.ts +18 -0
- package/dist/shared/update-api.d.ts +65 -0
- package/dist/shared/usage-statistics-api.d.ts +18 -0
- package/dist/shared/worktree-api.d.ts +188 -0
- package/examples/business-assistant.mjs +19 -0
- package/examples/common.mjs +51 -0
- package/examples/platform-assistant.mjs +9 -0
- package/examples/standalone-assistant.mjs +16 -0
- package/package.json +20 -4
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import type { LocalTaskEventType, LocalTaskMessageMode, LocalTaskRichContent } from './local-task-api.js';
|
|
2
|
+
import type { ModelReasoningEffort } from './model-selection.js';
|
|
3
|
+
export type CloudTaskRuntimeEngine = 'licos' | 'codex';
|
|
4
|
+
export type CloudTaskStatus = 'DRAFT' | 'PLANNING' | 'PROVISIONING' | 'RUNNING' | 'WAITING_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELED' | 'ARCHIVED';
|
|
5
|
+
export type CloudTaskSource = 'MANUAL' | 'PLAN' | 'AUTOMATION' | 'TRANSFER';
|
|
6
|
+
export type CloudTaskInstanceStatus = 'UNINITIALIZED' | 'PROVISIONING' | 'READY' | 'FAILED';
|
|
7
|
+
export interface CloudTaskResourceSnapshot {
|
|
8
|
+
bindingId: string;
|
|
9
|
+
resourceType: 'SKILL' | 'CONNECTOR';
|
|
10
|
+
resourceId: string;
|
|
11
|
+
resourceVersion: string | null;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string | null;
|
|
14
|
+
iconUrl: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface CloudTask {
|
|
17
|
+
id: string;
|
|
18
|
+
workspaceId: string;
|
|
19
|
+
ownerUserId: string;
|
|
20
|
+
projectId: string | null;
|
|
21
|
+
planItemId: string | null;
|
|
22
|
+
sourceType: CloudTaskSource;
|
|
23
|
+
sourceId: string | null;
|
|
24
|
+
title: string;
|
|
25
|
+
description: string | null;
|
|
26
|
+
prompt: string;
|
|
27
|
+
visibility: 'PRIVATE' | 'PROJECT';
|
|
28
|
+
status: CloudTaskStatus;
|
|
29
|
+
expertMode: boolean;
|
|
30
|
+
runtimeEngine: CloudTaskRuntimeEngine;
|
|
31
|
+
modelId: string;
|
|
32
|
+
recommendedModelId?: string | null;
|
|
33
|
+
thinkingEnabled: boolean;
|
|
34
|
+
reasoningEffort: string | null;
|
|
35
|
+
approvalMode: string;
|
|
36
|
+
messageMode: LocalTaskMessageMode;
|
|
37
|
+
resourceBindingIds: string[];
|
|
38
|
+
resourceSnapshots: CloudTaskResourceSnapshot[];
|
|
39
|
+
instanceId: string | null;
|
|
40
|
+
instanceStatus: CloudTaskInstanceStatus;
|
|
41
|
+
currentRunId: string | null;
|
|
42
|
+
summary: string | null;
|
|
43
|
+
errorCode: string | null;
|
|
44
|
+
errorMessage: string | null;
|
|
45
|
+
diagnosticId: string | null;
|
|
46
|
+
revision: number;
|
|
47
|
+
pinned: boolean;
|
|
48
|
+
unread: boolean;
|
|
49
|
+
viewerRole: 'OWNER' | 'EDITOR' | 'VIEWER' | 'PROJECT_MEMBER';
|
|
50
|
+
archivedAt: string | null;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
}
|
|
54
|
+
export interface CreateCloudTaskRequest {
|
|
55
|
+
projectId?: string;
|
|
56
|
+
planItemId?: string;
|
|
57
|
+
sourceType: CloudTaskSource;
|
|
58
|
+
sourceId?: string;
|
|
59
|
+
title: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
prompt: string;
|
|
62
|
+
visibility: 'PRIVATE' | 'PROJECT';
|
|
63
|
+
expertMode: boolean;
|
|
64
|
+
model: string;
|
|
65
|
+
recommendedModel?: string;
|
|
66
|
+
thinkingEnabled: boolean;
|
|
67
|
+
reasoningEffort?: string;
|
|
68
|
+
approvalMode: string;
|
|
69
|
+
mode: LocalTaskMessageMode;
|
|
70
|
+
resourceBindingIds: string[];
|
|
71
|
+
execute: boolean;
|
|
72
|
+
skillIds?: string[];
|
|
73
|
+
idempotencyKey: string;
|
|
74
|
+
}
|
|
75
|
+
export interface CloudTaskRun {
|
|
76
|
+
id: string;
|
|
77
|
+
taskId: string;
|
|
78
|
+
runNumber: number;
|
|
79
|
+
status: string;
|
|
80
|
+
triggerType: string;
|
|
81
|
+
prompt: string;
|
|
82
|
+
runtimeEngine: CloudTaskRuntimeEngine;
|
|
83
|
+
modelId: string;
|
|
84
|
+
mode: LocalTaskMessageMode;
|
|
85
|
+
resourceBindingIds: string[];
|
|
86
|
+
richContent?: LocalTaskRichContent;
|
|
87
|
+
errorCode: string | null;
|
|
88
|
+
errorMessage: string | null;
|
|
89
|
+
startedAt: string | null;
|
|
90
|
+
completedAt: string | null;
|
|
91
|
+
createdAt: string;
|
|
92
|
+
}
|
|
93
|
+
export interface CloudTaskArtifact {
|
|
94
|
+
id: string;
|
|
95
|
+
taskId: string;
|
|
96
|
+
runId: string | null;
|
|
97
|
+
name: string;
|
|
98
|
+
path: string;
|
|
99
|
+
mimeType: string | null;
|
|
100
|
+
sizeBytes: number | null;
|
|
101
|
+
sha256: string | null;
|
|
102
|
+
artifactType: string;
|
|
103
|
+
promotedProjectId: string | null;
|
|
104
|
+
promotedArtifactId: string | null;
|
|
105
|
+
createdAt: string;
|
|
106
|
+
}
|
|
107
|
+
export interface CloudTaskAttachment {
|
|
108
|
+
id: string;
|
|
109
|
+
taskId: string;
|
|
110
|
+
runId: string | null;
|
|
111
|
+
uploaderUserId: string;
|
|
112
|
+
fileName: string;
|
|
113
|
+
mediaType: string;
|
|
114
|
+
sizeBytes: number;
|
|
115
|
+
sha256: string;
|
|
116
|
+
workspacePath: string | null;
|
|
117
|
+
hydratedAt: string | null;
|
|
118
|
+
createdAt: string;
|
|
119
|
+
}
|
|
120
|
+
export type CloudTaskEventType = 'task.state.changed' | 'task.thinking.delta' | 'task.answer.delta' | 'task.answer.completed' | 'task.execution.event' | 'task.error' | 'task.interaction.required' | 'task.interaction.resolved' | 'task.artifact.created' | 'task.artifact.promoted';
|
|
121
|
+
interface CloudTaskEventBase<TType extends CloudTaskEventType, TPayload> {
|
|
122
|
+
id: string;
|
|
123
|
+
workspaceId: string;
|
|
124
|
+
taskId: string;
|
|
125
|
+
runId: string;
|
|
126
|
+
eventId: string;
|
|
127
|
+
traceId: string | null;
|
|
128
|
+
sessionId: string;
|
|
129
|
+
turnId: string | null;
|
|
130
|
+
executionRoundId: string | null;
|
|
131
|
+
executionRoundIndex: number | null;
|
|
132
|
+
seqId: number;
|
|
133
|
+
eventType: TType;
|
|
134
|
+
payload: TPayload;
|
|
135
|
+
occurredAt: string;
|
|
136
|
+
createdAt: string;
|
|
137
|
+
}
|
|
138
|
+
export interface CloudTaskInteractionOption {
|
|
139
|
+
id?: string;
|
|
140
|
+
label: string;
|
|
141
|
+
description?: string;
|
|
142
|
+
rule?: string;
|
|
143
|
+
}
|
|
144
|
+
export interface CloudTaskInteractionPayload {
|
|
145
|
+
kind: 'approval' | 'user_input' | 'elicitation';
|
|
146
|
+
interactionId: string;
|
|
147
|
+
interactionType?: 'question' | 'elicitation';
|
|
148
|
+
title?: string;
|
|
149
|
+
question?: string;
|
|
150
|
+
description?: string;
|
|
151
|
+
toolCallId?: string;
|
|
152
|
+
toolName?: string;
|
|
153
|
+
toolCategory?: string;
|
|
154
|
+
riskLevel?: string;
|
|
155
|
+
requestId?: string;
|
|
156
|
+
options?: CloudTaskInteractionOption[];
|
|
157
|
+
allowOther?: boolean;
|
|
158
|
+
secret?: boolean;
|
|
159
|
+
mode?: string;
|
|
160
|
+
serverName?: string;
|
|
161
|
+
cancelable?: boolean;
|
|
162
|
+
formSchema?: Record<string, unknown> | unknown[];
|
|
163
|
+
url?: string;
|
|
164
|
+
status?: 'pending' | 'approved' | 'denied' | 'submitted' | 'cancelled' | 'timed_out';
|
|
165
|
+
approved?: boolean;
|
|
166
|
+
response?: unknown;
|
|
167
|
+
}
|
|
168
|
+
export type CloudTaskEvent = CloudTaskEventBase<'task.state.changed', {
|
|
169
|
+
state: string;
|
|
170
|
+
sessionId: string;
|
|
171
|
+
turnId?: string;
|
|
172
|
+
}> | CloudTaskEventBase<'task.thinking.delta', {
|
|
173
|
+
text: string;
|
|
174
|
+
sessionId: string;
|
|
175
|
+
turnId?: string;
|
|
176
|
+
}> | CloudTaskEventBase<'task.answer.delta', {
|
|
177
|
+
text: string;
|
|
178
|
+
sessionId: string;
|
|
179
|
+
turnId?: string;
|
|
180
|
+
}> | CloudTaskEventBase<'task.answer.completed', {
|
|
181
|
+
text: string;
|
|
182
|
+
sessionId: string;
|
|
183
|
+
turnId?: string;
|
|
184
|
+
total_input_tokens?: number;
|
|
185
|
+
total_output_tokens?: number;
|
|
186
|
+
total_cache_read_tokens?: number;
|
|
187
|
+
total_cache_write_tokens?: number;
|
|
188
|
+
charged_points?: number;
|
|
189
|
+
turn_count?: number;
|
|
190
|
+
duration_ms?: number;
|
|
191
|
+
}> | CloudTaskEventBase<'task.execution.event', {
|
|
192
|
+
type: LocalTaskEventType;
|
|
193
|
+
data: Record<string, unknown>;
|
|
194
|
+
sessionId: string;
|
|
195
|
+
turnId?: string;
|
|
196
|
+
}> | CloudTaskEventBase<'task.error', {
|
|
197
|
+
message: string;
|
|
198
|
+
retryable: boolean;
|
|
199
|
+
sessionId: string;
|
|
200
|
+
turnId?: string;
|
|
201
|
+
}> | CloudTaskEventBase<'task.interaction.required', CloudTaskInteractionPayload & {
|
|
202
|
+
sessionId: string;
|
|
203
|
+
turnId?: string;
|
|
204
|
+
}> | CloudTaskEventBase<'task.interaction.resolved', {
|
|
205
|
+
kind: 'approval' | 'user_input' | 'elicitation';
|
|
206
|
+
interactionId: string;
|
|
207
|
+
interactionType?: 'question' | 'elicitation';
|
|
208
|
+
approved?: boolean;
|
|
209
|
+
optionId?: string;
|
|
210
|
+
status?: string;
|
|
211
|
+
response?: unknown;
|
|
212
|
+
sessionId: string;
|
|
213
|
+
turnId?: string;
|
|
214
|
+
}> | CloudTaskEventBase<'task.artifact.created' | 'task.artifact.promoted', {
|
|
215
|
+
artifactId?: string;
|
|
216
|
+
name?: string;
|
|
217
|
+
mimeType?: string;
|
|
218
|
+
size_bytes?: number;
|
|
219
|
+
sessionId: string;
|
|
220
|
+
turnId?: string;
|
|
221
|
+
}>;
|
|
222
|
+
export interface CloudTaskEventPage {
|
|
223
|
+
items: CloudTaskEvent[];
|
|
224
|
+
nextSeqId: number;
|
|
225
|
+
hasMore: boolean;
|
|
226
|
+
taskStatus: CloudTaskStatus;
|
|
227
|
+
runStatus: string | null;
|
|
228
|
+
}
|
|
229
|
+
export interface CloudTaskEventSubscriptionRequest {
|
|
230
|
+
taskId: string;
|
|
231
|
+
afterSeqId?: number;
|
|
232
|
+
}
|
|
233
|
+
export interface ResolveCloudTaskInteractionRequest {
|
|
234
|
+
runId: string;
|
|
235
|
+
interactionId: string;
|
|
236
|
+
decision: string;
|
|
237
|
+
idempotencyKey: string;
|
|
238
|
+
}
|
|
239
|
+
export interface SubmitCloudTaskUserInputRequest {
|
|
240
|
+
runId: string;
|
|
241
|
+
interactionId: string;
|
|
242
|
+
response: Record<string, unknown>;
|
|
243
|
+
cancel?: boolean;
|
|
244
|
+
idempotencyKey: string;
|
|
245
|
+
}
|
|
246
|
+
export interface CloudTaskApi {
|
|
247
|
+
sources(): Promise<CloudTaskSource[]>;
|
|
248
|
+
list(query?: {
|
|
249
|
+
projectId?: string;
|
|
250
|
+
status?: CloudTaskStatus;
|
|
251
|
+
sourceType?: CloudTaskSource;
|
|
252
|
+
ownerUserId?: string;
|
|
253
|
+
keyword?: string;
|
|
254
|
+
createdAfter?: string;
|
|
255
|
+
createdBefore?: string;
|
|
256
|
+
limit?: number;
|
|
257
|
+
offset?: number;
|
|
258
|
+
}): Promise<CloudTask[]>;
|
|
259
|
+
create(request: CreateCloudTaskRequest): Promise<CloudTask>;
|
|
260
|
+
get(taskId: string): Promise<CloudTask>;
|
|
261
|
+
update(taskId: string, request: {
|
|
262
|
+
title?: string;
|
|
263
|
+
description?: string;
|
|
264
|
+
visibility?: 'PRIVATE' | 'PROJECT';
|
|
265
|
+
recommendedModel?: string;
|
|
266
|
+
revision: number;
|
|
267
|
+
}): Promise<CloudTask>;
|
|
268
|
+
updatePlugins(taskId: string, request: {
|
|
269
|
+
pluginBindingIds: string[];
|
|
270
|
+
revision: number;
|
|
271
|
+
}): Promise<CloudTask>;
|
|
272
|
+
delete(taskId: string): Promise<void>;
|
|
273
|
+
initializeInstance(taskId: string): Promise<CloudTask>;
|
|
274
|
+
execute(taskId: string, request?: {
|
|
275
|
+
richContent?: LocalTaskRichContent;
|
|
276
|
+
references?: Array<Record<string, unknown>>;
|
|
277
|
+
}): Promise<CloudTask>;
|
|
278
|
+
messages(taskId: string): Promise<Array<Record<string, unknown>>>;
|
|
279
|
+
events(taskId: string, query?: {
|
|
280
|
+
runId?: string;
|
|
281
|
+
afterSeqId?: number;
|
|
282
|
+
limit?: number;
|
|
283
|
+
}): Promise<CloudTaskEventPage>;
|
|
284
|
+
sendMessage(taskId: string, request: {
|
|
285
|
+
content: string;
|
|
286
|
+
model: string;
|
|
287
|
+
recommendedModel?: string;
|
|
288
|
+
thinkingEnabled: boolean;
|
|
289
|
+
reasoningEffort: ModelReasoningEffort | undefined;
|
|
290
|
+
mode: LocalTaskMessageMode;
|
|
291
|
+
resourceBindingIds: string[];
|
|
292
|
+
attachments?: Array<Record<string, unknown>>;
|
|
293
|
+
references?: Array<Record<string, unknown>>;
|
|
294
|
+
skillIds?: string[];
|
|
295
|
+
richContent?: LocalTaskRichContent;
|
|
296
|
+
}): Promise<Record<string, unknown>>;
|
|
297
|
+
resolveInteraction(taskId: string, request: ResolveCloudTaskInteractionRequest): Promise<void>;
|
|
298
|
+
submitUserInput(taskId: string, request: SubmitCloudTaskUserInputRequest): Promise<void>;
|
|
299
|
+
cancel(taskId: string): Promise<void>;
|
|
300
|
+
markRead(taskId: string): Promise<void>;
|
|
301
|
+
runs(taskId: string): Promise<CloudTaskRun[]>;
|
|
302
|
+
artifacts(taskId: string): Promise<CloudTaskArtifact[]>;
|
|
303
|
+
readArtifact(taskId: string, artifactId: string): Promise<{
|
|
304
|
+
data: Uint8Array;
|
|
305
|
+
mediaType: string | null;
|
|
306
|
+
}>;
|
|
307
|
+
attachments(taskId: string): Promise<CloudTaskAttachment[]>;
|
|
308
|
+
uploadAttachment(taskId: string, request: {
|
|
309
|
+
fileName: string;
|
|
310
|
+
mediaType: string;
|
|
311
|
+
data: Uint8Array;
|
|
312
|
+
}): Promise<CloudTaskAttachment>;
|
|
313
|
+
readAttachment(taskId: string, attachmentId: string): Promise<{
|
|
314
|
+
data: Uint8Array;
|
|
315
|
+
mediaType: string | null;
|
|
316
|
+
}>;
|
|
317
|
+
deleteAttachment(taskId: string, attachmentId: string): Promise<void>;
|
|
318
|
+
artifact(taskId: string, artifactId: string): Promise<CloudTaskArtifact>;
|
|
319
|
+
artifactAccess(taskId: string, artifactId: string): Promise<{
|
|
320
|
+
artifactId: string;
|
|
321
|
+
previewUrl: string;
|
|
322
|
+
downloadUrl: string;
|
|
323
|
+
mimeType: string | null;
|
|
324
|
+
sizeBytes: number | null;
|
|
325
|
+
}>;
|
|
326
|
+
promoteArtifact(taskId: string, artifactId: string, request: {
|
|
327
|
+
projectId: string;
|
|
328
|
+
projectDir?: string;
|
|
329
|
+
name?: string;
|
|
330
|
+
}): Promise<CloudTaskArtifact>;
|
|
331
|
+
pin(taskId: string): Promise<CloudTask>;
|
|
332
|
+
unpin(taskId: string): Promise<CloudTask>;
|
|
333
|
+
archive(taskId: string): Promise<CloudTask>;
|
|
334
|
+
comments(taskId: string): Promise<Array<Record<string, unknown>>>;
|
|
335
|
+
addComment(taskId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
336
|
+
updateComment(taskId: string, commentId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
337
|
+
deleteComment(taskId: string, commentId: string): Promise<void>;
|
|
338
|
+
shares: TaskShareApi;
|
|
339
|
+
invitations: TaskInvitationApi;
|
|
340
|
+
collaborators: TaskCollaboratorApi;
|
|
341
|
+
transfers: TaskTransferApi;
|
|
342
|
+
}
|
|
343
|
+
export interface TaskShareApi {
|
|
344
|
+
list(taskId: string): Promise<Array<Record<string, unknown>>>;
|
|
345
|
+
create(taskId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
346
|
+
revoke(taskId: string, shareId: string): Promise<void>;
|
|
347
|
+
preview(token: string): Promise<Record<string, unknown>>;
|
|
348
|
+
requestAccess(token: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
349
|
+
listRequests(taskId: string): Promise<Array<Record<string, unknown>>>;
|
|
350
|
+
reviewRequest(taskId: string, requestId: string, approve: boolean): Promise<Record<string, unknown>>;
|
|
351
|
+
}
|
|
352
|
+
export interface TaskInvitationApi {
|
|
353
|
+
list(taskId: string): Promise<Array<Record<string, unknown>>>;
|
|
354
|
+
create(taskId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
355
|
+
revoke(taskId: string, invitationId: string): Promise<void>;
|
|
356
|
+
preview(token: string): Promise<Record<string, unknown>>;
|
|
357
|
+
accept(token: string, idempotencyKey: string): Promise<Record<string, unknown>>;
|
|
358
|
+
reject(token: string): Promise<Record<string, unknown>>;
|
|
359
|
+
}
|
|
360
|
+
export interface TaskCollaboratorApi {
|
|
361
|
+
list(taskId: string): Promise<Array<Record<string, unknown>>>;
|
|
362
|
+
update(taskId: string, collaboratorId: string, role: string): Promise<Record<string, unknown>>;
|
|
363
|
+
remove(taskId: string, collaboratorId: string): Promise<void>;
|
|
364
|
+
}
|
|
365
|
+
export interface TaskTransferApi {
|
|
366
|
+
list(taskId: string): Promise<Array<Record<string, unknown>>>;
|
|
367
|
+
create(taskId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
368
|
+
preview(transferId: string): Promise<Record<string, unknown>>;
|
|
369
|
+
accept(transferId: string, idempotencyKey: string): Promise<Record<string, unknown>>;
|
|
370
|
+
reject(transferId: string): Promise<Record<string, unknown>>;
|
|
371
|
+
}
|
|
372
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { ComputerUsePeerMetadata } from './computer-use-handshake.js';
|
|
2
|
+
export type ComputerUseDecision = 'allow' | 'deny';
|
|
3
|
+
export declare const MINIMUM_CHROME_MAJOR_VERSION = 120;
|
|
4
|
+
export type ComputerUseAction = 'navigation' | 'history' | 'download' | 'upload';
|
|
5
|
+
export interface ChromeComputerUseSettings {
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
fullCdpEnabled: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type DesktopComputerUseAction = 'observation' | 'windowControl' | 'pointer' | 'keyboard';
|
|
10
|
+
export interface DesktopComputerUseSettings {
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
executionMode: 'standard' | 'strict_background';
|
|
13
|
+
}
|
|
14
|
+
export interface ComputerUseSettings {
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
chrome: ChromeComputerUseSettings;
|
|
17
|
+
desktop: DesktopComputerUseSettings;
|
|
18
|
+
}
|
|
19
|
+
export interface ComputerUseStatus {
|
|
20
|
+
platform: 'darwin' | 'win32' | 'linux';
|
|
21
|
+
desktop: {
|
|
22
|
+
available: boolean;
|
|
23
|
+
helperRunning: boolean;
|
|
24
|
+
executablePath?: string;
|
|
25
|
+
protocolValidated: boolean;
|
|
26
|
+
protocolVersion?: number;
|
|
27
|
+
architectureValidated: boolean;
|
|
28
|
+
architectureVersion?: number;
|
|
29
|
+
invariants?: string[];
|
|
30
|
+
capabilities?: {
|
|
31
|
+
uiAutomation?: boolean;
|
|
32
|
+
screenCapture?: boolean;
|
|
33
|
+
targetIntegrityBoundary?: string;
|
|
34
|
+
uiAutomationError?: string;
|
|
35
|
+
screenCaptureError?: string;
|
|
36
|
+
};
|
|
37
|
+
error?: string;
|
|
38
|
+
};
|
|
39
|
+
chrome: {
|
|
40
|
+
installed: boolean;
|
|
41
|
+
executablePath?: string;
|
|
42
|
+
connectedBrowser?: {
|
|
43
|
+
name: 'Google Chrome' | 'Microsoft Edge' | 'Opera' | 'Chromium 浏览器';
|
|
44
|
+
version?: string;
|
|
45
|
+
majorVersion?: number;
|
|
46
|
+
supported?: boolean;
|
|
47
|
+
userAgent: string;
|
|
48
|
+
};
|
|
49
|
+
mcpConfigured: boolean;
|
|
50
|
+
mcpEnabled: boolean;
|
|
51
|
+
toolsDiscovered: number;
|
|
52
|
+
toolsEnabled: number;
|
|
53
|
+
};
|
|
54
|
+
bridge: {
|
|
55
|
+
brokerRunning: boolean;
|
|
56
|
+
nativeHostRegistered: boolean;
|
|
57
|
+
hostConnected: boolean;
|
|
58
|
+
extensionInstalled: boolean;
|
|
59
|
+
extensionConnected: boolean;
|
|
60
|
+
extensionInstallationMode: 'bundled' | 'web_store' | 'web_store_with_offline';
|
|
61
|
+
extensionId: string;
|
|
62
|
+
extensionDirectory: string;
|
|
63
|
+
manifestPath: string;
|
|
64
|
+
protocolVersion: number;
|
|
65
|
+
lastHeartbeatAt?: string;
|
|
66
|
+
peers?: Partial<Record<ComputerUsePeerMetadata['role'], ComputerUsePeerMetadata>>;
|
|
67
|
+
error?: string;
|
|
68
|
+
registrationError?: string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export interface ComputerUseApi {
|
|
72
|
+
getStatus: () => Promise<ComputerUseStatus>;
|
|
73
|
+
registerNativeHost: () => Promise<ComputerUseStatus>;
|
|
74
|
+
unregisterNativeHost: () => Promise<ComputerUseStatus>;
|
|
75
|
+
copyExtensionPath: () => Promise<void>;
|
|
76
|
+
openChromeExtensionsPage: () => Promise<void>;
|
|
77
|
+
openExtensionStorePage: () => Promise<void>;
|
|
78
|
+
}
|
|
79
|
+
export declare const DEFAULT_COMPUTER_USE_SETTINGS: ComputerUseSettings;
|
|
80
|
+
export declare function normalizeComputerUseSettings(value: unknown, fallback?: ComputerUseSettings): ComputerUseSettings;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const COMPUTER_USE_METADATA_PROTOCOL_VERSION = 5;
|
|
2
|
+
export declare const COMPUTER_USE_SUPPORTED_PROTOCOLS: readonly [4, 5];
|
|
3
|
+
export type ComputerUseProtocolVersion = typeof COMPUTER_USE_SUPPORTED_PROTOCOLS[number];
|
|
4
|
+
export declare const COMPUTER_USE_TRANSPORT_CAPABILITIES: readonly ["peer-metadata", "connection-diagnostics"];
|
|
5
|
+
export interface ComputerUsePeerMetadata {
|
|
6
|
+
connectionId: string;
|
|
7
|
+
role: 'desktop' | 'host' | 'extension';
|
|
8
|
+
version: string;
|
|
9
|
+
build: string;
|
|
10
|
+
supportedProtocols: number[];
|
|
11
|
+
capabilities: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare const COMPUTER_USE_DIAGNOSTIC_EVENTS: readonly ["capabilities-ready", "control-disabled", "paused", "resumed", "manual-disconnect"];
|
|
14
|
+
export interface ComputerUsePeerDiagnostic {
|
|
15
|
+
connectionId: string;
|
|
16
|
+
event: typeof COMPUTER_USE_DIAGNOSTIC_EVENTS[number];
|
|
17
|
+
}
|
|
18
|
+
export declare function isComputerUsePeerMetadata(value: unknown): value is ComputerUsePeerMetadata;
|
|
19
|
+
export declare function isComputerUsePeerDiagnostic(value: unknown): value is ComputerUsePeerDiagnostic;
|