@kmlckj/aios-agent-server-sdk 0.0.0-stage → 0.0.2
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 +656 -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 +65 -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 +260 -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 +39 -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 +405 -0
- package/dist/shared/account-context-api.d.ts +47 -0
- package/dist/shared/account-schedules-api.d.ts +110 -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 +19 -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 +532 -0
- 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 +17 -0
- package/dist/shared/collaboration-automation-api.d.ts +55 -0
- package/dist/shared/collaboration-deep-link.d.ts +15 -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 +276 -0
- package/dist/shared/collaboration-task-execution.d.ts +39 -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 +450 -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 +62 -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-selection.d.ts +22 -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 +93 -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 +72 -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/sdk-session-contract.d.ts +96 -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-enterprise-project-api.d.ts +75 -0
- package/dist/shared/task-execution-api.d.ts +35 -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 +40 -4
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CollaborationProjectApi } from './collaboration-project-api.js';
|
|
2
|
+
import type { CollaborationPlanApi } from './collaboration-plan-api.js';
|
|
3
|
+
import type { CloudTaskApi } from './collaboration-task-api.js';
|
|
4
|
+
import type { CloudTaskRuntimeApi, TaskConversationEventApi } from './cloud-task-runtime-api.js';
|
|
5
|
+
import type { CollaborationResourceApi } from './collaboration-resource-api.js';
|
|
6
|
+
import type { CollaborationAutomationApi } from './collaboration-automation-api.js';
|
|
7
|
+
import type { CollaborationEventApi } from './collaboration-event-api.js';
|
|
8
|
+
export interface CollaborationDesktopApi {
|
|
9
|
+
projects: CollaborationProjectApi;
|
|
10
|
+
plan: CollaborationPlanApi;
|
|
11
|
+
tasks: CloudTaskApi;
|
|
12
|
+
taskConversations: CloudTaskRuntimeApi;
|
|
13
|
+
conversationEvents: TaskConversationEventApi;
|
|
14
|
+
resources: CollaborationResourceApi;
|
|
15
|
+
automations: CollaborationAutomationApi;
|
|
16
|
+
events: CollaborationEventApi;
|
|
17
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface CollaborationAutomation {
|
|
2
|
+
id: string;
|
|
3
|
+
projectId: string;
|
|
4
|
+
name: string;
|
|
5
|
+
prompt: string;
|
|
6
|
+
triggerType: 'ONCE' | 'INTERVAL' | 'CRON';
|
|
7
|
+
triggerAt: string | null;
|
|
8
|
+
intervalSeconds: number | null;
|
|
9
|
+
cronExpression: string | null;
|
|
10
|
+
zoneId: string | null;
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
expertMode: boolean;
|
|
13
|
+
modelId: string;
|
|
14
|
+
thinkingEnabled: boolean;
|
|
15
|
+
reasoningEffort: string | null;
|
|
16
|
+
approvalMode: string;
|
|
17
|
+
resourceBindingIds: string[];
|
|
18
|
+
lastRunStatus: string | null;
|
|
19
|
+
lastRunAt: string | null;
|
|
20
|
+
revision: number;
|
|
21
|
+
nextRunAt: string | null;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
}
|
|
25
|
+
export interface SaveCollaborationAutomationRequest {
|
|
26
|
+
name: string;
|
|
27
|
+
prompt: string;
|
|
28
|
+
trigger_type: CollaborationAutomation['triggerType'];
|
|
29
|
+
trigger_config: {
|
|
30
|
+
cron: string | null;
|
|
31
|
+
zone_id: string | null;
|
|
32
|
+
trigger_at: string | null;
|
|
33
|
+
interval_seconds: number | null;
|
|
34
|
+
};
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
runtime_config: {
|
|
37
|
+
expert_mode: boolean;
|
|
38
|
+
model_id: string;
|
|
39
|
+
thinking_enabled: boolean;
|
|
40
|
+
reasoning_effort: string | null;
|
|
41
|
+
approval_mode: string;
|
|
42
|
+
resource_binding_ids: string[];
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface CollaborationAutomationApi {
|
|
46
|
+
list(projectId: string): Promise<CollaborationAutomation[]>;
|
|
47
|
+
get(projectId: string, automationId: string): Promise<CollaborationAutomation>;
|
|
48
|
+
create(projectId: string, request: SaveCollaborationAutomationRequest): Promise<CollaborationAutomation>;
|
|
49
|
+
update(projectId: string, automationId: string, request: Partial<SaveCollaborationAutomationRequest> & {
|
|
50
|
+
revision: number;
|
|
51
|
+
}): Promise<CollaborationAutomation>;
|
|
52
|
+
delete(projectId: string, automationId: string): Promise<void>;
|
|
53
|
+
test(projectId: string, automationId: string): Promise<import('./collaboration-task-api.js').CloudTask>;
|
|
54
|
+
runs(projectId: string, automationId: string): Promise<Array<Record<string, unknown>>>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type CollaborationDeepLink = {
|
|
2
|
+
kind: 'project_invitation';
|
|
3
|
+
token: string;
|
|
4
|
+
} | {
|
|
5
|
+
kind: 'task_invitation';
|
|
6
|
+
token: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'task_share';
|
|
9
|
+
token: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'plan_item';
|
|
12
|
+
projectId: string;
|
|
13
|
+
itemId: string;
|
|
14
|
+
};
|
|
15
|
+
export type CollaborationDeepLinkKind = CollaborationDeepLink['kind'];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface CollaborationDesktopEvent {
|
|
2
|
+
eventId: string;
|
|
3
|
+
projectId: string;
|
|
4
|
+
sequence: number;
|
|
5
|
+
eventType: string;
|
|
6
|
+
occurredAt: string;
|
|
7
|
+
payload: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export interface CollaborationEventApi {
|
|
10
|
+
subscribe(request: {
|
|
11
|
+
projectId: string;
|
|
12
|
+
afterSequence?: number;
|
|
13
|
+
versions: number[];
|
|
14
|
+
}): Promise<{
|
|
15
|
+
subscriptionId: string;
|
|
16
|
+
}>;
|
|
17
|
+
unsubscribe(subscriptionId: string): Promise<void>;
|
|
18
|
+
onEvent(listener: (event: CollaborationDesktopEvent) => void): () => void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
export type CollaborationPlanViewType = 'LIST' | 'BOARD' | 'TABLE' | 'GANTT' | 'CALENDAR';
|
|
2
|
+
export type CollaborationPlanStatus = 'TODO' | 'IN_PROGRESS' | 'PAUSED' | 'DONE';
|
|
3
|
+
export type CollaborationPlanPriority = 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT';
|
|
4
|
+
export type CollaborationPlanSource = 'MANUAL' | 'TRANSFER' | 'AUTOMATION' | 'IMPORT';
|
|
5
|
+
export interface CollaborationPlanView {
|
|
6
|
+
id: string;
|
|
7
|
+
projectId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
viewType: CollaborationPlanViewType;
|
|
10
|
+
config: Record<string, unknown>;
|
|
11
|
+
shared: boolean;
|
|
12
|
+
sortOrder: number;
|
|
13
|
+
systemView: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface CollaborationPlanItem {
|
|
16
|
+
id: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
parentId: string | null;
|
|
19
|
+
title: string;
|
|
20
|
+
description: unknown;
|
|
21
|
+
status: CollaborationPlanStatus;
|
|
22
|
+
priority: CollaborationPlanPriority;
|
|
23
|
+
assigneeUserIds: string[];
|
|
24
|
+
tagIds: string[];
|
|
25
|
+
attachments: CollaborationPlanAttachment[];
|
|
26
|
+
sourceType: CollaborationPlanSource;
|
|
27
|
+
startAt: string | null;
|
|
28
|
+
dueAt: string | null;
|
|
29
|
+
estimateMinutes: number | null;
|
|
30
|
+
progress: number;
|
|
31
|
+
sortOrder: number;
|
|
32
|
+
executionTaskId: string | null;
|
|
33
|
+
taskProgressSummary: string | null;
|
|
34
|
+
taskArtifactRefs: unknown[];
|
|
35
|
+
commentCount: number;
|
|
36
|
+
revision: number;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
}
|
|
40
|
+
export interface CollaborationPlanComment {
|
|
41
|
+
id: string;
|
|
42
|
+
projectId: string;
|
|
43
|
+
itemId: string;
|
|
44
|
+
authorUserId: string;
|
|
45
|
+
content: unknown;
|
|
46
|
+
mentions: unknown[];
|
|
47
|
+
attachments: unknown[];
|
|
48
|
+
createdAt: string;
|
|
49
|
+
updatedAt: string;
|
|
50
|
+
}
|
|
51
|
+
export interface CollaborationPlanActivity {
|
|
52
|
+
id: string;
|
|
53
|
+
projectId: string;
|
|
54
|
+
itemId: string;
|
|
55
|
+
activityType: string;
|
|
56
|
+
actorUserId: string;
|
|
57
|
+
payload: Record<string, unknown>;
|
|
58
|
+
createdAt: string;
|
|
59
|
+
}
|
|
60
|
+
export interface CollaborationPlanTag {
|
|
61
|
+
id: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
name: string;
|
|
64
|
+
color: string;
|
|
65
|
+
}
|
|
66
|
+
export interface CollaborationPlanAttachment {
|
|
67
|
+
artifactId: string;
|
|
68
|
+
projectId: string;
|
|
69
|
+
name: string;
|
|
70
|
+
fullPath: string;
|
|
71
|
+
contentType: string | null;
|
|
72
|
+
sizeBytes: number;
|
|
73
|
+
}
|
|
74
|
+
export interface CollaborationPlanImportPreview {
|
|
75
|
+
importId: string;
|
|
76
|
+
mapping: Record<string, string>;
|
|
77
|
+
validCount: number;
|
|
78
|
+
errorCount: number;
|
|
79
|
+
previewRows: Array<Record<string, unknown>>;
|
|
80
|
+
errors: Array<{
|
|
81
|
+
rowNumber: number;
|
|
82
|
+
message: string;
|
|
83
|
+
}>;
|
|
84
|
+
}
|
|
85
|
+
export interface CollaborationPlanImportCommit {
|
|
86
|
+
importId: string;
|
|
87
|
+
itemIds: string[];
|
|
88
|
+
committedCount: number;
|
|
89
|
+
}
|
|
90
|
+
export interface CollaborationPlanApi {
|
|
91
|
+
listViews(projectId: string): Promise<CollaborationPlanView[]>;
|
|
92
|
+
createView(projectId: string, request: Partial<CollaborationPlanView> & {
|
|
93
|
+
name: string;
|
|
94
|
+
viewType: CollaborationPlanViewType;
|
|
95
|
+
}): Promise<CollaborationPlanView>;
|
|
96
|
+
updateView(projectId: string, viewId: string, request: Record<string, unknown>): Promise<CollaborationPlanView>;
|
|
97
|
+
deleteView(projectId: string, viewId: string): Promise<void>;
|
|
98
|
+
reorderViews(projectId: string, items: Array<{
|
|
99
|
+
id: string;
|
|
100
|
+
sortOrder: number;
|
|
101
|
+
}>): Promise<CollaborationPlanView[]>;
|
|
102
|
+
listItems(projectId: string, query?: {
|
|
103
|
+
statuses?: CollaborationPlanStatus[];
|
|
104
|
+
assigneeUserIds?: string[];
|
|
105
|
+
tagIds?: string[];
|
|
106
|
+
priorities?: CollaborationPlanPriority[];
|
|
107
|
+
sourceTypes?: CollaborationPlanSource[];
|
|
108
|
+
matchMode?: 'ALL' | 'ANY';
|
|
109
|
+
keyword?: string;
|
|
110
|
+
}): Promise<CollaborationPlanItem[]>;
|
|
111
|
+
getItem(projectId: string, itemId: string): Promise<CollaborationPlanItem>;
|
|
112
|
+
createItem(projectId: string, request: Record<string, unknown> & {
|
|
113
|
+
title: string;
|
|
114
|
+
}): Promise<CollaborationPlanItem>;
|
|
115
|
+
updateItem(projectId: string, itemId: string, request: Record<string, unknown> & {
|
|
116
|
+
revision: number;
|
|
117
|
+
}): Promise<CollaborationPlanItem>;
|
|
118
|
+
deleteItem(projectId: string, itemId: string): Promise<void>;
|
|
119
|
+
deleteItems(projectId: string, items: Array<{
|
|
120
|
+
id: string;
|
|
121
|
+
revision: number;
|
|
122
|
+
}>): Promise<void>;
|
|
123
|
+
reorderItems(projectId: string, items: Array<{
|
|
124
|
+
id: string;
|
|
125
|
+
status: CollaborationPlanStatus;
|
|
126
|
+
sortOrder: number;
|
|
127
|
+
revision: number;
|
|
128
|
+
}>): Promise<CollaborationPlanItem[]>;
|
|
129
|
+
batchItems(projectId: string, items: Array<Record<string, unknown> & {
|
|
130
|
+
id: string;
|
|
131
|
+
revision: number;
|
|
132
|
+
}>): Promise<CollaborationPlanItem[]>;
|
|
133
|
+
executeItem(projectId: string, itemId: string, request?: Record<string, unknown>): Promise<import('./collaboration-task-api.js').CloudTask>;
|
|
134
|
+
listActivities(projectId: string, itemId: string): Promise<CollaborationPlanActivity[]>;
|
|
135
|
+
listComments(projectId: string, itemId: string): Promise<CollaborationPlanComment[]>;
|
|
136
|
+
createComment(projectId: string, itemId: string, request: Record<string, unknown>): Promise<CollaborationPlanComment>;
|
|
137
|
+
updateComment(projectId: string, itemId: string, commentId: string, request: Record<string, unknown>): Promise<CollaborationPlanComment>;
|
|
138
|
+
deleteComment(projectId: string, itemId: string, commentId: string): Promise<void>;
|
|
139
|
+
uploadCommentAttachment(projectId: string, itemId: string, request: {
|
|
140
|
+
fileName: string;
|
|
141
|
+
mediaType: string;
|
|
142
|
+
data: Uint8Array;
|
|
143
|
+
}): Promise<CollaborationPlanAttachment>;
|
|
144
|
+
listTags(projectId: string): Promise<CollaborationPlanTag[]>;
|
|
145
|
+
createTag(projectId: string, request: {
|
|
146
|
+
name: string;
|
|
147
|
+
color: string;
|
|
148
|
+
}): Promise<CollaborationPlanTag>;
|
|
149
|
+
updateTag(projectId: string, tagId: string, request: {
|
|
150
|
+
name?: string;
|
|
151
|
+
color?: string;
|
|
152
|
+
}): Promise<CollaborationPlanTag>;
|
|
153
|
+
deleteTag(projectId: string, tagId: string): Promise<void>;
|
|
154
|
+
previewImport(projectId: string, request: {
|
|
155
|
+
mapping: Record<string, string>;
|
|
156
|
+
rows: Array<Record<string, unknown>>;
|
|
157
|
+
}): Promise<CollaborationPlanImportPreview>;
|
|
158
|
+
commitImport(projectId: string, importId: string, idempotencyKey: string): Promise<CollaborationPlanImportCommit>;
|
|
159
|
+
}
|