@kmlckj/aios-agent-server-sdk 0.0.1 → 0.0.5
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/README.md +42 -8
- package/dist/core/auth/platform-client.d.ts +7 -1
- package/dist/index.js +5 -4
- package/dist/sdk/src/index.d.ts +19 -16
- package/dist/sdk/src/platform.d.ts +4 -0
- package/dist/sdk/src/product-resources.d.ts +6 -0
- package/dist/sdk/src/runtime-integrity.d.ts +4 -2
- package/dist/sdk/src/types.d.ts +7 -93
- package/dist/shared/account-schedules-api.d.ts +110 -0
- package/dist/shared/agent-team.d.ts +2 -0
- package/dist/shared/cloud-assistant-api.d.ts +11 -499
- package/dist/shared/cloud-task-resources.d.ts +24 -0
- package/dist/shared/cloud-task-runtime-api.d.ts +253 -0
- package/dist/shared/collaboration-api.d.ts +3 -2
- package/dist/shared/collaboration-deep-link.d.ts +0 -3
- package/dist/shared/collaboration-task-api.d.ts +3 -99
- package/dist/shared/collaboration-task-execution.d.ts +39 -0
- package/dist/shared/desktop-api.d.ts +1 -0
- package/dist/shared/execution-context.d.ts +25 -0
- package/dist/shared/expert-selection.d.ts +22 -0
- package/dist/shared/local-task-api.d.ts +2 -0
- package/dist/shared/local-task-command.d.ts +2 -0
- package/dist/shared/managed-authorization.d.ts +2 -0
- package/dist/shared/profession-market-api.d.ts +1 -1
- package/dist/shared/sdk-session-contract.d.ts +96 -0
- package/dist/shared/task-enterprise-project-api.d.ts +75 -0
- package/dist/shared/task-execution-api.d.ts +35 -0
- package/package.json +32 -12
- package/dist/shared/cloud-task-event-api.d.ts +0 -22
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import type { HistoryPage, QueueSnapshot, RunState, SessionEvent } from './sdk-session-contract.js';
|
|
2
|
+
import type { CloudTask, CloudTaskAttachment as LegacyTaskAttachment, CloudTaskArtifact, CloudTaskEvent, CloudTaskRun } from './collaboration-task-api.js';
|
|
3
|
+
import type { TaskSelectedResource } from './account-schedules-api.js';
|
|
4
|
+
import type { LocalTaskMessageMode, LocalTaskPermissionMode } from './local-task-api.js';
|
|
5
|
+
import type { ModelReasoningEffort } from './model-selection.js';
|
|
6
|
+
import type { TaskExecutionBinding, TaskExecutionEndpointsApi } from './task-execution-api.js';
|
|
7
|
+
import type { CloudSessionResources } from './cloud-task-resources.js';
|
|
8
|
+
export type { HistoryPage, QueueSnapshot, RunState, SessionEvent } from './sdk-session-contract.js';
|
|
9
|
+
export interface CloudTaskRef {
|
|
10
|
+
actorUserId: string;
|
|
11
|
+
taskId: string;
|
|
12
|
+
remote?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface CloudTaskLifecycleInput {
|
|
15
|
+
commandId: string;
|
|
16
|
+
action: 'reset' | 'delete';
|
|
17
|
+
revision: number;
|
|
18
|
+
sessionId: string | null;
|
|
19
|
+
historyVersion: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface CloudTaskLifecycleReceipt {
|
|
22
|
+
command_id: string;
|
|
23
|
+
action: 'reset' | 'delete';
|
|
24
|
+
status: 'settled';
|
|
25
|
+
session_id: string | null;
|
|
26
|
+
session_generation: number | null;
|
|
27
|
+
replacement?: {
|
|
28
|
+
session_id: string;
|
|
29
|
+
session_generation: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface CloudTaskEntry {
|
|
33
|
+
id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
workspaceId: string;
|
|
36
|
+
projectId: string | null;
|
|
37
|
+
sourceType: string;
|
|
38
|
+
status: string;
|
|
39
|
+
pinned: boolean;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
}
|
|
43
|
+
export interface CloudTaskDetail {
|
|
44
|
+
task: Omit<CloudTask, 'runtimeEngine'> & {
|
|
45
|
+
runtimeEngine: 'cloud-task';
|
|
46
|
+
};
|
|
47
|
+
memory: {
|
|
48
|
+
read: boolean;
|
|
49
|
+
write: boolean;
|
|
50
|
+
};
|
|
51
|
+
resources: TaskSelectedResource[];
|
|
52
|
+
execution: TaskExecutionBinding | null;
|
|
53
|
+
}
|
|
54
|
+
export interface CloudTaskCreation {
|
|
55
|
+
commandId: string;
|
|
56
|
+
content: string;
|
|
57
|
+
model: string;
|
|
58
|
+
mode: LocalTaskMessageMode;
|
|
59
|
+
thinkingEnabled: boolean;
|
|
60
|
+
reasoningEffort?: ModelReasoningEffort;
|
|
61
|
+
permissionMode: LocalTaskPermissionMode;
|
|
62
|
+
memory: {
|
|
63
|
+
read: boolean;
|
|
64
|
+
write: boolean;
|
|
65
|
+
};
|
|
66
|
+
projectId?: string;
|
|
67
|
+
executionEndpointId?: string;
|
|
68
|
+
title?: string;
|
|
69
|
+
visibility?: 'PRIVATE' | 'PROJECT';
|
|
70
|
+
resourceBindingIds?: string[];
|
|
71
|
+
skillIds?: string[];
|
|
72
|
+
}
|
|
73
|
+
export interface CloudTaskMessage {
|
|
74
|
+
commandId: string;
|
|
75
|
+
content: string;
|
|
76
|
+
options: Record<string, unknown>;
|
|
77
|
+
memory: {
|
|
78
|
+
read: boolean;
|
|
79
|
+
write: boolean;
|
|
80
|
+
};
|
|
81
|
+
enqueue?: boolean;
|
|
82
|
+
attachmentIds?: string[];
|
|
83
|
+
}
|
|
84
|
+
export interface CloudTaskReceipt {
|
|
85
|
+
command_id: string;
|
|
86
|
+
session_id: string;
|
|
87
|
+
session_generation: number;
|
|
88
|
+
run_id?: string;
|
|
89
|
+
message_id?: string;
|
|
90
|
+
status?: string;
|
|
91
|
+
}
|
|
92
|
+
export interface CloudTaskCommand {
|
|
93
|
+
command_id: string;
|
|
94
|
+
state: 'ABSENT' | 'PENDING' | 'ACCEPTED' | 'FINISHED' | 'REJECTED' | 'SUPERSEDED';
|
|
95
|
+
receipt: CloudTaskReceipt | null;
|
|
96
|
+
rejection?: {
|
|
97
|
+
code: string;
|
|
98
|
+
message?: string;
|
|
99
|
+
};
|
|
100
|
+
queue?: {
|
|
101
|
+
reason: 'ACCOUNT_CAPACITY';
|
|
102
|
+
maximum: number;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
export interface CloudTaskNotAdmitted {
|
|
106
|
+
command_id: string;
|
|
107
|
+
admitted: false;
|
|
108
|
+
error: {
|
|
109
|
+
status: number;
|
|
110
|
+
message: string;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export type CloudTaskSendResult = CloudTaskReceipt | CloudTaskCommand | CloudTaskNotAdmitted;
|
|
114
|
+
export interface CloudTaskSnapshot extends CloudSessionResources {
|
|
115
|
+
history: HistoryPage;
|
|
116
|
+
queue: QueueSnapshot;
|
|
117
|
+
configuration: Record<string, unknown>;
|
|
118
|
+
}
|
|
119
|
+
export interface CloudTaskBinding {
|
|
120
|
+
taskId: string;
|
|
121
|
+
sessionId: string;
|
|
122
|
+
generation: number;
|
|
123
|
+
cursor: string | null;
|
|
124
|
+
snapshot: CloudTaskSnapshot | null;
|
|
125
|
+
snapshotRevision: number;
|
|
126
|
+
}
|
|
127
|
+
export interface CloudTaskProjection {
|
|
128
|
+
bindings: CloudTaskBinding[];
|
|
129
|
+
events: Array<{
|
|
130
|
+
order: number;
|
|
131
|
+
event: SessionEvent;
|
|
132
|
+
}>;
|
|
133
|
+
}
|
|
134
|
+
export interface CloudTaskAction {
|
|
135
|
+
sessionId: string;
|
|
136
|
+
runId: string;
|
|
137
|
+
action: 'cancel' | 'confirm-plan' | 'approve' | 'answer' | 'cancel-input';
|
|
138
|
+
parameters: Record<string, unknown>;
|
|
139
|
+
}
|
|
140
|
+
export interface CloudTaskQueueAction {
|
|
141
|
+
sessionId: string;
|
|
142
|
+
action: 'edit' | 'remove' | 'reorder' | 'dispatch';
|
|
143
|
+
parameters: Record<string, unknown>;
|
|
144
|
+
}
|
|
145
|
+
export interface CloudTaskAttachment {
|
|
146
|
+
id: string;
|
|
147
|
+
taskId: string;
|
|
148
|
+
uploaderUserId: string;
|
|
149
|
+
fileName: string;
|
|
150
|
+
mediaType: string;
|
|
151
|
+
sizeBytes: number;
|
|
152
|
+
sha256: string;
|
|
153
|
+
createdAt: string;
|
|
154
|
+
}
|
|
155
|
+
export interface CloudTaskRuntimeApi extends TaskExecutionEndpointsApi {
|
|
156
|
+
projectExecutions(ref: import('./collaboration-task-execution.js').ProjectExecutionRef, offset: number): Promise<import('./collaboration-task-execution.js').ProjectTaskExecution[]>;
|
|
157
|
+
startProjectMessage(ref: import('./collaboration-task-execution.js').ProjectExecutionRef, input: import('./collaboration-task-execution.js').ProjectTaskStart): Promise<import('./collaboration-task-execution.js').ProjectTaskExecution | import('./collaboration-task-execution.js').ProjectTaskNotAdmitted>;
|
|
158
|
+
cancelProjectExecution(ref: import('./collaboration-task-execution.js').ProjectExecutionRef, id: string, commandId: string): Promise<void>;
|
|
159
|
+
catalog(actorUserId: string, workspaceId: string, query: Parameters<import('./collaboration-task-api.js').CloudTaskApi['list']>[0]): Promise<CloudTask[]>;
|
|
160
|
+
legacyHistory(ref: CloudTaskRef): Promise<{
|
|
161
|
+
runs: CloudTaskRun[];
|
|
162
|
+
attachments: LegacyTaskAttachment[];
|
|
163
|
+
artifacts: CloudTaskArtifact[];
|
|
164
|
+
events: CloudTaskEvent[];
|
|
165
|
+
}>;
|
|
166
|
+
legacyFile(ref: CloudTaskRef, kind: 'attachments' | 'artifacts', id: string): Promise<{
|
|
167
|
+
data: Uint8Array;
|
|
168
|
+
mediaType: string | null;
|
|
169
|
+
}>;
|
|
170
|
+
inspect(ref: CloudTaskRef): Promise<CloudTask>;
|
|
171
|
+
projectResources(ref: CloudTaskRef): Promise<{
|
|
172
|
+
skills: Record<string, unknown>[];
|
|
173
|
+
plugins: Record<string, unknown>[];
|
|
174
|
+
}>;
|
|
175
|
+
list(actorUserId: string, query: {
|
|
176
|
+
keyword: string;
|
|
177
|
+
view: 'recent' | 'running' | 'archived';
|
|
178
|
+
offset: number;
|
|
179
|
+
}): Promise<CloudTaskEntry[]>;
|
|
180
|
+
detail(ref: CloudTaskRef): Promise<CloudTaskDetail>;
|
|
181
|
+
create(actorUserId: string, workspaceId: string, input: CloudTaskCreation): Promise<CloudTaskDetail>;
|
|
182
|
+
update(ref: CloudTaskRef, revision: number, change: {
|
|
183
|
+
title: string;
|
|
184
|
+
} | {
|
|
185
|
+
pinned: boolean;
|
|
186
|
+
}): Promise<CloudTaskDetail['task']>;
|
|
187
|
+
lifecycle(ref: CloudTaskRef, input: CloudTaskLifecycleInput): Promise<CloudTaskLifecycleReceipt | CloudTaskCommand | CloudTaskNotAdmitted>;
|
|
188
|
+
enterpriseInvocations(ref: CloudTaskRef, sessionId: string): Promise<import('./task-enterprise-project-api.js').EnterpriseProjectInvocation[]>;
|
|
189
|
+
respondEnterpriseInvocation(ref: CloudTaskRef, invocationId: string, interactionId: string, responseId: string, response: import('./task-enterprise-project-api.js').JsonValue): Promise<import('./task-enterprise-project-api.js').EnterpriseProjectInvocation>;
|
|
190
|
+
projection(ref: CloudTaskRef, after: number): Promise<CloudTaskProjection>;
|
|
191
|
+
send(ref: CloudTaskRef, input: CloudTaskMessage): Promise<CloudTaskSendResult>;
|
|
192
|
+
command(ref: CloudTaskRef, commandId: string): Promise<CloudTaskCommand>;
|
|
193
|
+
action(ref: CloudTaskRef, input: CloudTaskAction): Promise<CloudTaskReceipt>;
|
|
194
|
+
queueAction(ref: CloudTaskRef, input: CloudTaskQueueAction): Promise<CloudTaskReceipt>;
|
|
195
|
+
availability(ref: CloudTaskRef): Promise<{
|
|
196
|
+
present: boolean;
|
|
197
|
+
terminating?: boolean;
|
|
198
|
+
}>;
|
|
199
|
+
history(ref: CloudTaskRef, sessionId: string, cursor?: string): Promise<HistoryPage>;
|
|
200
|
+
queue(ref: CloudTaskRef, sessionId: string): Promise<QueueSnapshot>;
|
|
201
|
+
state(ref: CloudTaskRef, sessionId: string, runId: string): Promise<RunState>;
|
|
202
|
+
resources(ref: CloudTaskRef, sessionId: string): Promise<CloudSessionResources>;
|
|
203
|
+
attachments(ref: CloudTaskRef): Promise<CloudTaskAttachment[]>;
|
|
204
|
+
upload(ref: CloudTaskRef, uploadId: string, file: {
|
|
205
|
+
name: string;
|
|
206
|
+
mediaType: string;
|
|
207
|
+
data: Uint8Array;
|
|
208
|
+
}): Promise<CloudTaskAttachment>;
|
|
209
|
+
downloadAttachment(ref: CloudTaskRef, id: string): Promise<{
|
|
210
|
+
data: Uint8Array;
|
|
211
|
+
mediaType: string | null;
|
|
212
|
+
}>;
|
|
213
|
+
files(ref: CloudTaskRef, path?: string, cursor?: string): Promise<{
|
|
214
|
+
items: CloudTaskFile[];
|
|
215
|
+
nextCursor: string | null;
|
|
216
|
+
}>;
|
|
217
|
+
downloadFile(ref: CloudTaskRef, path: string): Promise<{
|
|
218
|
+
data: Uint8Array;
|
|
219
|
+
mediaType: string | null;
|
|
220
|
+
}>;
|
|
221
|
+
}
|
|
222
|
+
export interface CloudTaskFile {
|
|
223
|
+
name: string;
|
|
224
|
+
path: string;
|
|
225
|
+
directory: boolean;
|
|
226
|
+
size: number;
|
|
227
|
+
modifiedAt: string | null;
|
|
228
|
+
}
|
|
229
|
+
export interface CloudTaskEventRequest extends CloudTaskRef {
|
|
230
|
+
sessionId: string;
|
|
231
|
+
cursor?: string;
|
|
232
|
+
}
|
|
233
|
+
export type CloudTaskEventMessage = {
|
|
234
|
+
subscriptionId: string;
|
|
235
|
+
type: 'event';
|
|
236
|
+
event: SessionEvent;
|
|
237
|
+
} | {
|
|
238
|
+
subscriptionId: string;
|
|
239
|
+
type: 'connection';
|
|
240
|
+
state: 'live' | 'closed';
|
|
241
|
+
cursor?: string;
|
|
242
|
+
error?: string;
|
|
243
|
+
retryable?: boolean;
|
|
244
|
+
};
|
|
245
|
+
export interface TaskConversationEventApi {
|
|
246
|
+
subscribe(request: CloudTaskEventRequest): Promise<{
|
|
247
|
+
subscriptionId: string;
|
|
248
|
+
}>;
|
|
249
|
+
start(subscriptionId: string): Promise<void>;
|
|
250
|
+
acknowledge(subscriptionId: string, cursor: string): Promise<void>;
|
|
251
|
+
unsubscribe(subscriptionId: string): Promise<void>;
|
|
252
|
+
onEvent(listener: (message: CloudTaskEventMessage) => void): () => void;
|
|
253
|
+
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { CollaborationProjectApi } from './collaboration-project-api.js';
|
|
2
2
|
import type { CollaborationPlanApi } from './collaboration-plan-api.js';
|
|
3
3
|
import type { CloudTaskApi } from './collaboration-task-api.js';
|
|
4
|
+
import type { CloudTaskRuntimeApi, TaskConversationEventApi } from './cloud-task-runtime-api.js';
|
|
4
5
|
import type { CollaborationResourceApi } from './collaboration-resource-api.js';
|
|
5
6
|
import type { CollaborationAutomationApi } from './collaboration-automation-api.js';
|
|
6
7
|
import type { CollaborationEventApi } from './collaboration-event-api.js';
|
|
7
|
-
import type { CloudTaskEventApi } from './cloud-task-event-api.js';
|
|
8
8
|
export interface CollaborationDesktopApi {
|
|
9
9
|
projects: CollaborationProjectApi;
|
|
10
10
|
plan: CollaborationPlanApi;
|
|
11
11
|
tasks: CloudTaskApi;
|
|
12
|
-
|
|
12
|
+
taskConversations: CloudTaskRuntimeApi;
|
|
13
|
+
conversationEvents: TaskConversationEventApi;
|
|
13
14
|
resources: CollaborationResourceApi;
|
|
14
15
|
automations: CollaborationAutomationApi;
|
|
15
16
|
events: CollaborationEventApi;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { LocalTaskEventType, LocalTaskMessageMode, LocalTaskRichContent } from './local-task-api.js';
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export type CloudTaskSource = 'MANUAL' | 'PLAN' | 'AUTOMATION' | 'TRANSFER';
|
|
2
|
+
export type CloudTaskRuntimeEngine = 'licos' | 'codex' | 'cloud-task';
|
|
3
|
+
export type CloudTaskStatus = 'DRAFT' | 'PLANNING' | 'PROVISIONING' | 'RUNNING' | 'WAITING_INPUT' | 'COMPLETED' | 'FAILED' | 'CANCELED' | 'INTERRUPTED' | 'ARCHIVED';
|
|
4
|
+
export type CloudTaskSource = 'MANUAL' | 'PLAN' | 'AUTOMATION' | 'SCHEDULE' | 'COLLABORATION' | 'CODING';
|
|
6
5
|
export type CloudTaskInstanceStatus = 'UNINITIALIZED' | 'PROVISIONING' | 'READY' | 'FAILED';
|
|
7
6
|
export interface CloudTaskResourceSnapshot {
|
|
8
7
|
bindingId: string;
|
|
@@ -51,27 +50,6 @@ export interface CloudTask {
|
|
|
51
50
|
createdAt: string;
|
|
52
51
|
updatedAt: string;
|
|
53
52
|
}
|
|
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
53
|
export interface CloudTaskRun {
|
|
76
54
|
id: string;
|
|
77
55
|
taskId: string;
|
|
@@ -226,23 +204,6 @@ export interface CloudTaskEventPage {
|
|
|
226
204
|
taskStatus: CloudTaskStatus;
|
|
227
205
|
runStatus: string | null;
|
|
228
206
|
}
|
|
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
207
|
export interface CloudTaskApi {
|
|
247
208
|
sources(): Promise<CloudTaskSource[]>;
|
|
248
209
|
list(query?: {
|
|
@@ -256,65 +217,17 @@ export interface CloudTaskApi {
|
|
|
256
217
|
limit?: number;
|
|
257
218
|
offset?: number;
|
|
258
219
|
}): Promise<CloudTask[]>;
|
|
259
|
-
create(request: CreateCloudTaskRequest): Promise<CloudTask>;
|
|
260
220
|
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
221
|
markRead(taskId: string): Promise<void>;
|
|
301
|
-
runs(taskId: string): Promise<CloudTaskRun[]>;
|
|
302
222
|
artifacts(taskId: string): Promise<CloudTaskArtifact[]>;
|
|
303
223
|
readArtifact(taskId: string, artifactId: string): Promise<{
|
|
304
224
|
data: Uint8Array;
|
|
305
225
|
mediaType: string | null;
|
|
306
226
|
}>;
|
|
307
|
-
attachments(taskId: string): Promise<CloudTaskAttachment[]>;
|
|
308
|
-
uploadAttachment(taskId: string, request: {
|
|
309
|
-
fileName: string;
|
|
310
|
-
mediaType: string;
|
|
311
|
-
data: Uint8Array;
|
|
312
|
-
}): Promise<CloudTaskAttachment>;
|
|
313
227
|
readAttachment(taskId: string, attachmentId: string): Promise<{
|
|
314
228
|
data: Uint8Array;
|
|
315
229
|
mediaType: string | null;
|
|
316
230
|
}>;
|
|
317
|
-
deleteAttachment(taskId: string, attachmentId: string): Promise<void>;
|
|
318
231
|
artifact(taskId: string, artifactId: string): Promise<CloudTaskArtifact>;
|
|
319
232
|
artifactAccess(taskId: string, artifactId: string): Promise<{
|
|
320
233
|
artifactId: string;
|
|
@@ -330,7 +243,6 @@ export interface CloudTaskApi {
|
|
|
330
243
|
}): Promise<CloudTaskArtifact>;
|
|
331
244
|
pin(taskId: string): Promise<CloudTask>;
|
|
332
245
|
unpin(taskId: string): Promise<CloudTask>;
|
|
333
|
-
archive(taskId: string): Promise<CloudTask>;
|
|
334
246
|
comments(taskId: string): Promise<Array<Record<string, unknown>>>;
|
|
335
247
|
addComment(taskId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
336
248
|
updateComment(taskId: string, commentId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
@@ -338,7 +250,6 @@ export interface CloudTaskApi {
|
|
|
338
250
|
shares: TaskShareApi;
|
|
339
251
|
invitations: TaskInvitationApi;
|
|
340
252
|
collaborators: TaskCollaboratorApi;
|
|
341
|
-
transfers: TaskTransferApi;
|
|
342
253
|
}
|
|
343
254
|
export interface TaskShareApi {
|
|
344
255
|
list(taskId: string): Promise<Array<Record<string, unknown>>>;
|
|
@@ -362,11 +273,4 @@ export interface TaskCollaboratorApi {
|
|
|
362
273
|
update(taskId: string, collaboratorId: string, role: string): Promise<Record<string, unknown>>;
|
|
363
274
|
remove(taskId: string, collaboratorId: string): Promise<void>;
|
|
364
275
|
}
|
|
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
276
|
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface ProjectExecutionRef {
|
|
2
|
+
actorUserId: string;
|
|
3
|
+
projectId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ProjectTaskNotAdmitted {
|
|
6
|
+
admitted: false;
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ProjectTaskExecution {
|
|
10
|
+
id: string;
|
|
11
|
+
projectId: string;
|
|
12
|
+
sourceMessageId: string;
|
|
13
|
+
actorUserId: string;
|
|
14
|
+
taskId: string;
|
|
15
|
+
taskTitle: string;
|
|
16
|
+
messageCommandId: string;
|
|
17
|
+
status: string;
|
|
18
|
+
replyMessageId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ProjectTaskStart {
|
|
21
|
+
commandId: string;
|
|
22
|
+
sourceMessageId: string;
|
|
23
|
+
taskId?: string;
|
|
24
|
+
workspaceId?: string;
|
|
25
|
+
memory?: {
|
|
26
|
+
read: boolean;
|
|
27
|
+
write: boolean;
|
|
28
|
+
};
|
|
29
|
+
newTask?: {
|
|
30
|
+
title: string;
|
|
31
|
+
model: string;
|
|
32
|
+
mode: 'agent' | 'plan';
|
|
33
|
+
thinkingEnabled: boolean;
|
|
34
|
+
reasoningEffort?: string;
|
|
35
|
+
approvalMode: 'DEFAULT' | 'AUTO';
|
|
36
|
+
};
|
|
37
|
+
options: Record<string, unknown>;
|
|
38
|
+
attachmentIds?: string[];
|
|
39
|
+
}
|
|
@@ -351,6 +351,7 @@ export interface DesktopApi {
|
|
|
351
351
|
navigation: NavigationApi;
|
|
352
352
|
taskMenu: TaskMenuApi;
|
|
353
353
|
app: {
|
|
354
|
+
connectTaskExecution: (actor: string, pairingId: string) => Promise<void>;
|
|
354
355
|
getConfig: () => Promise<DesktopRuntimeConfig>;
|
|
355
356
|
getVersion: () => Promise<string>;
|
|
356
357
|
getAboutInfo: () => Promise<DesktopAboutInfo>;
|
|
@@ -29,6 +29,31 @@ export interface ExecutionBinding {
|
|
|
29
29
|
runId: string;
|
|
30
30
|
context?: ExecutionContext;
|
|
31
31
|
}
|
|
32
|
+
/** A supplemental message has its own correlation IDs but must retain the active execution scope. */
|
|
33
|
+
export declare function executionSteeringScope(context?: ExecutionContext): {
|
|
34
|
+
actor: {
|
|
35
|
+
userId: string;
|
|
36
|
+
tenantId: string | null;
|
|
37
|
+
name?: string;
|
|
38
|
+
};
|
|
39
|
+
owner: {
|
|
40
|
+
userId: string;
|
|
41
|
+
tenantId: string | null;
|
|
42
|
+
name?: string;
|
|
43
|
+
};
|
|
44
|
+
workspaceId: string | null;
|
|
45
|
+
projectId?: string;
|
|
46
|
+
collaborationProjectId?: string;
|
|
47
|
+
assistantId?: string;
|
|
48
|
+
platformSessionId?: string;
|
|
49
|
+
platformTurnId?: string;
|
|
50
|
+
platformTaskId?: string;
|
|
51
|
+
platformRunId?: string;
|
|
52
|
+
traceId?: string;
|
|
53
|
+
/** Host-owned business data; never used as identity or routing headers. */
|
|
54
|
+
metadata?: Record<string, Record<string, string | number | boolean | null>>;
|
|
55
|
+
usageScene: "personal" | "greeting" | "task" | "collaboration" | "coding";
|
|
56
|
+
} | null;
|
|
32
57
|
export declare function parseExecutionContext(value: unknown): ExecutionContext;
|
|
33
58
|
export declare function parseExecutionBinding(value: unknown): ExecutionBinding;
|
|
34
59
|
export declare function executionRoutingIdentity(context: ExecutionContext): ModelRoutingIdentity;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AgentTeamDefinition } from './agent-team.js';
|
|
2
|
+
import type { LocalTaskProfessionReference } from './local-task-api.js';
|
|
3
|
+
/** Only an immutable platform version is selected; executable content is resolved by the host. */
|
|
4
|
+
export interface ExpertSelection {
|
|
5
|
+
professionId: string;
|
|
6
|
+
versionId: string;
|
|
7
|
+
}
|
|
8
|
+
/** A business host must authorize this source before supplying it. It is never model input. */
|
|
9
|
+
export interface ResolvedExpertSource extends ExpertSelection {
|
|
10
|
+
versionNo: string;
|
|
11
|
+
professionForm: 'EXPERT' | 'EXPERT_TEAM';
|
|
12
|
+
name: string;
|
|
13
|
+
summary: string;
|
|
14
|
+
iconUrl?: string | null;
|
|
15
|
+
instructions?: string;
|
|
16
|
+
packageRef?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface PreparedExpertAgent {
|
|
19
|
+
profession: LocalTaskProfessionReference;
|
|
20
|
+
instructions: string;
|
|
21
|
+
team?: AgentTeamDefinition;
|
|
22
|
+
}
|
|
@@ -32,6 +32,8 @@ export interface LocalTask {
|
|
|
32
32
|
memoryScope?: import('./local-memory.js').MemoryScope;
|
|
33
33
|
/** Absent on pre-integrity task records. Original journal formats are unchanged. */
|
|
34
34
|
storageVersion?: 1;
|
|
35
|
+
/** Absent means the original directory. New tasks use the compact repository root. */
|
|
36
|
+
pathLayoutVersion?: 2;
|
|
35
37
|
/** Immutable command entry selected when the task was created; absent means the original native shell entry. */
|
|
36
38
|
commandEntryVersion?: 2;
|
|
37
39
|
/** Read-only projection; never saved back as execution state. */
|
|
@@ -27,6 +27,7 @@ export type LocalTaskCommand = Header<'send' | 'enqueue', {
|
|
|
27
27
|
}> | Header<'plan_start', {
|
|
28
28
|
runId: string;
|
|
29
29
|
targetRunId: string | null;
|
|
30
|
+
planRunId?: string;
|
|
30
31
|
}> | Header<'compact', {
|
|
31
32
|
runId: string;
|
|
32
33
|
historyVersion: string;
|
|
@@ -85,6 +86,7 @@ export interface LocalTaskCommandRecord {
|
|
|
85
86
|
}
|
|
86
87
|
export interface LocalTaskCommandTargets {
|
|
87
88
|
activeRunId: string | null;
|
|
89
|
+
planRunId?: string | null;
|
|
88
90
|
queueVersion: string;
|
|
89
91
|
historyVersion: string;
|
|
90
92
|
}
|
|
@@ -43,6 +43,8 @@ export interface ManagedAuthorizationConnection extends CredentialConnection {
|
|
|
43
43
|
platformBaseUrl: string;
|
|
44
44
|
principal: ManagedPrincipal;
|
|
45
45
|
allowedOrigins: string[];
|
|
46
|
+
/** Resolved from authenticated platform model details, keyed by model code. */
|
|
47
|
+
configuredModelOrigins?: Record<string, string[]>;
|
|
46
48
|
}
|
|
47
49
|
export interface AuthorizedPlatformContext {
|
|
48
50
|
accessToken: string;
|
|
@@ -91,6 +91,6 @@ export interface ProfessionMarketApi {
|
|
|
91
91
|
search: (query: ProfessionMarketSearchQuery) => Promise<ProfessionMarketSearchResult>;
|
|
92
92
|
getDetail: (professionId: string) => Promise<ProfessionMarketDetail>;
|
|
93
93
|
listInstalled: (query: ListInstalledProfessionsQuery) => Promise<InstalledProfessionResult>;
|
|
94
|
-
prepareForLocalTask: (professionId: string) => Promise<import('./local-task-api.js').LocalTaskProfessionReference>;
|
|
94
|
+
prepareForLocalTask: (professionId: string, versionId?: string) => Promise<import('./local-task-api.js').LocalTaskProfessionReference>;
|
|
95
95
|
recordUsage: (professionId: string) => Promise<void>;
|
|
96
96
|
}
|