@kmlckj/aios-agent-server-sdk 0.0.1 → 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/README.md +34 -6
- package/dist/core/auth/platform-client.d.ts +7 -1
- package/dist/index.js +4 -4
- package/dist/sdk/src/index.d.ts +19 -16
- package/dist/sdk/src/platform.d.ts +4 -0
- package/dist/sdk/src/types.d.ts +6 -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-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
|
@@ -6,6 +6,7 @@ import type { PersonalUsageStatistics } from '../../shared/usage-statistics-api.
|
|
|
6
6
|
import type { SkillMarketApi } from '../../shared/skill-market-api.js';
|
|
7
7
|
import type { PluginMarketApi } from '../../shared/plugin-market-api.js';
|
|
8
8
|
import type { EnterpriseKnowledgeApi } from '../../shared/enterprise-knowledge-api.js';
|
|
9
|
+
import type { ExpertSelection, PreparedExpertAgent, ResolvedExpertSource } from '../../shared/expert-selection.js';
|
|
9
10
|
/** Explicit platform queries, independent of the model's builtin tool permissions. */
|
|
10
11
|
export declare class PlatformApi {
|
|
11
12
|
private readonly connection;
|
|
@@ -19,6 +20,9 @@ export declare class PlatformApi {
|
|
|
19
20
|
list: () => Promise<AvailableChatModel[]>;
|
|
20
21
|
listSpeechRecognition: () => Promise<AvailableChatModel[]>;
|
|
21
22
|
};
|
|
23
|
+
readonly experts: {
|
|
24
|
+
prepare: (selection: ExpertSelection, resolved?: ResolvedExpertSource) => Promise<PreparedExpertAgent>;
|
|
25
|
+
};
|
|
22
26
|
readonly account: {
|
|
23
27
|
getSummary: (query?: AccountContextQuery) => Promise<AccountContextSummary>;
|
|
24
28
|
listPlanPurchases: () => Promise<AccountPlanPurchase[]>;
|
package/dist/sdk/src/types.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export type { TaskEvent, SessionEvent, SessionEventPage, EventObservationOptions, TaskInteraction, TaskMessage, HistoryQuery, HistoryPage, RunQuery, RunRecord, RunPage, RunState, QueueSnapshot } from '../../shared/sdk-session-contract.js';
|
|
1
2
|
import type { BuiltinSelection, BuiltinSnapshot, CapabilityDescriptor } from '../../shared/agent-capabilities.js';
|
|
2
3
|
import type { AuthSession, AuthPasswordChangeRequired } from '../../shared/desktop-api.js';
|
|
3
4
|
import type { CredentialProvider, ManagedAuthentication } from '../../shared/managed-authorization.js';
|
|
4
5
|
export type { TeamState, TeamMemberState, TeamTaskState, TeamCommand, TeamCommandResult } from '../../shared/team-control.js';
|
|
6
|
+
export type { ExpertSelection, PreparedExpertAgent, ResolvedExpertSource } from '../../shared/expert-selection.js';
|
|
5
7
|
export type { ManagedAuthentication, ManagedPrincipal, ManagedCredential, ManagedCredentialRequest, CredentialProvider, CredentialReason, ManagedAuthorizationEvent } from '../../shared/managed-authorization.js';
|
|
6
8
|
export type { BuiltinSelection, BuiltinSnapshot, CapabilityDescriptor, ToolCategory, SkillCategory } from '../../shared/agent-capabilities.js';
|
|
7
9
|
export type { AuthSession, PlatformUser, TenantSummary, LoginContext, AuthRequiredPasswordChangeRequest, AuthSwitchSubjectRequest } from '../../shared/desktop-api.js';
|
|
@@ -50,7 +52,6 @@ export interface RuntimeOptions {
|
|
|
50
52
|
temporaryDirectory?: string;
|
|
51
53
|
nodeExecutable?: string;
|
|
52
54
|
tools?: Partial<Record<'node' | 'python' | 'git' | 'bash' | 'npm', string>>;
|
|
53
|
-
chromiumExecutable?: string;
|
|
54
55
|
/** Override only for a runtime built and signed by your own organization. */
|
|
55
56
|
trustedPublicKey?: string;
|
|
56
57
|
}
|
|
@@ -290,43 +291,6 @@ export type LocalPreferenceDomain = import('../../cli/daemon/preferences.js').Pr
|
|
|
290
291
|
export type { ComputerUseSettings } from '../../shared/computer-use-api.js';
|
|
291
292
|
export type { NativeSettings, NativeCapabilityStatus } from './native-status.js';
|
|
292
293
|
export type { MemoryView, MemoryEditRequest } from '../../shared/local-memory.js';
|
|
293
|
-
export interface TaskEvent {
|
|
294
|
-
schemaVersion: 1;
|
|
295
|
-
/** Save after processing this event to resume without skipping the rest of its page. */
|
|
296
|
-
cursor: string;
|
|
297
|
-
sessionId: string;
|
|
298
|
-
id: string;
|
|
299
|
-
type: import('../../shared/local-task-api.js').LocalTaskEventType;
|
|
300
|
-
runId: string;
|
|
301
|
-
/** Sequence within this cursor stream; use the event ID for deduplication. */
|
|
302
|
-
sequence: number;
|
|
303
|
-
runtimeSequence?: number;
|
|
304
|
-
/** Original engine event kind; payload retains its full structured fields. */
|
|
305
|
-
runtimeType?: string;
|
|
306
|
-
threadId?: string;
|
|
307
|
-
turnId?: string;
|
|
308
|
-
itemId?: string;
|
|
309
|
-
requestId?: string;
|
|
310
|
-
rootThreadId?: string;
|
|
311
|
-
sourceThreadId?: string;
|
|
312
|
-
parentThreadId?: string;
|
|
313
|
-
/** Host-supplied business ownership; separate from local task/member/thread identifiers. */
|
|
314
|
-
context?: import('../../shared/execution-context.js').ExecutionContext;
|
|
315
|
-
payload: Record<string, unknown>;
|
|
316
|
-
createdAt?: string;
|
|
317
|
-
}
|
|
318
|
-
/** Includes session-level events without a run and late updates after a run completes. */
|
|
319
|
-
export type SessionEvent = Omit<TaskEvent, 'runId'> & {
|
|
320
|
-
runId?: string;
|
|
321
|
-
};
|
|
322
|
-
export interface SessionEventPage {
|
|
323
|
-
events: SessionEvent[];
|
|
324
|
-
cursor: string;
|
|
325
|
-
}
|
|
326
|
-
export interface EventObservationOptions {
|
|
327
|
-
cursor?: string;
|
|
328
|
-
signal?: AbortSignal;
|
|
329
|
-
}
|
|
330
294
|
export interface SessionMemoryApi {
|
|
331
295
|
get(request: import('../../shared/local-memory.js').MemoryContextRequest & {
|
|
332
296
|
sessionId: string;
|
|
@@ -342,54 +306,6 @@ export interface SessionMemoryApi {
|
|
|
342
306
|
enabled: boolean;
|
|
343
307
|
}): Promise<import('../../shared/local-memory.js').MemoryView>;
|
|
344
308
|
}
|
|
345
|
-
export interface TaskInteraction {
|
|
346
|
-
id: string;
|
|
347
|
-
kind: string;
|
|
348
|
-
requestId: string;
|
|
349
|
-
runId: string;
|
|
350
|
-
status: string;
|
|
351
|
-
payload: Record<string, unknown>;
|
|
352
|
-
}
|
|
353
|
-
/** Same history contract consumed by the desktop renderer, including references, reasoning and usage. */
|
|
354
|
-
export type TaskMessage = import('../../shared/local-task-api.js').LocalTaskMessage;
|
|
355
|
-
export interface HistoryQuery {
|
|
356
|
-
text?: string;
|
|
357
|
-
around?: string;
|
|
358
|
-
cursor?: string;
|
|
359
|
-
limit?: number;
|
|
360
|
-
}
|
|
361
|
-
export interface HistoryPage {
|
|
362
|
-
items: TaskMessage[];
|
|
363
|
-
historyVersion: string;
|
|
364
|
-
hasMore: boolean;
|
|
365
|
-
nextCursor?: string;
|
|
366
|
-
}
|
|
367
|
-
export interface RunQuery {
|
|
368
|
-
cursor?: string;
|
|
369
|
-
limit?: number;
|
|
370
|
-
}
|
|
371
|
-
export interface RunRecord {
|
|
372
|
-
runId: string;
|
|
373
|
-
status: RunState['status'];
|
|
374
|
-
messageCount: number;
|
|
375
|
-
/** Journal timestamps; these do not claim the time a model request began. */
|
|
376
|
-
firstMessageAt?: string;
|
|
377
|
-
queuedAt?: string;
|
|
378
|
-
finishedAt?: string;
|
|
379
|
-
context?: import('../../shared/execution-context.js').ExecutionContext;
|
|
380
|
-
}
|
|
381
|
-
export interface RunPage {
|
|
382
|
-
items: RunRecord[];
|
|
383
|
-
revision: string;
|
|
384
|
-
hasMore: boolean;
|
|
385
|
-
nextCursor?: string;
|
|
386
|
-
}
|
|
387
|
-
export interface RunState {
|
|
388
|
-
status: 'queued' | 'running' | 'waiting' | 'completed' | 'failed' | 'cancelled' | 'interrupted';
|
|
389
|
-
runId: string;
|
|
390
|
-
interactions: TaskInteraction[];
|
|
391
|
-
messages: TaskMessage[];
|
|
392
|
-
}
|
|
393
309
|
export interface AuthTokens {
|
|
394
310
|
accessToken: string;
|
|
395
311
|
refreshToken: string;
|
|
@@ -448,6 +364,8 @@ export interface BrowserLoginStatus {
|
|
|
448
364
|
};
|
|
449
365
|
}
|
|
450
366
|
export interface SendOptions extends Partial<ExecutionDefaults> {
|
|
367
|
+
/** Selected scene and its implicit resources, preserved in this turn's history and queue. */
|
|
368
|
+
sceneContext?: import('../../shared/local-task-api.js').LocalTaskSceneContext;
|
|
451
369
|
/** Narrow this run's long-term memory access within the session grant. */
|
|
452
370
|
memory?: import('../../shared/session-policy.js').RunMemoryPolicy;
|
|
453
371
|
/** Trusted host metadata. Immutable for this run, including queued dispatch and continuations. */
|
|
@@ -466,13 +384,8 @@ export interface SendOptions extends Partial<ExecutionDefaults> {
|
|
|
466
384
|
skills?: import('../../shared/local-task-api.js').LocalTaskSkillReference[];
|
|
467
385
|
plugins?: import('../../shared/local-task-api.js').LocalTaskPluginReference[];
|
|
468
386
|
}
|
|
469
|
-
export
|
|
470
|
-
|
|
471
|
-
queueVersion: string;
|
|
472
|
-
activeRunId: string | null;
|
|
473
|
-
historyVersion: string;
|
|
474
|
-
}
|
|
475
|
-
export type CommandReceipt = import('../../shared/local-task-command.js').LocalTaskCommandRecord | null;
|
|
387
|
+
export type CommandReceipt = import('../../shared/local-task-command.js').LocalTaskCommandReply | null;
|
|
388
|
+
export type CommandResult = import('../../shared/local-task-command.js').LocalTaskCommandResult;
|
|
476
389
|
export interface CapabilityQuery {
|
|
477
390
|
kind?: 'tool' | 'skill';
|
|
478
391
|
category?: string;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { AvailableChatModel } from './cloud-assistant-api.js';
|
|
2
|
+
import type { PluginAuthorizationSaveRequest, PluginAuthorizationStatus } from './plugin-market-api.js';
|
|
3
|
+
export type ScheduleTriggerType = 'ONCE' | 'DAILY' | 'CRON';
|
|
4
|
+
export interface ScheduleTaskConfiguration {
|
|
5
|
+
model: string;
|
|
6
|
+
thinkingEnabled: boolean;
|
|
7
|
+
reasoningEffort?: 'low' | 'medium' | 'high' | 'xhigh' | null;
|
|
8
|
+
permissionMode: 'ask_dangerous' | 'allow_all';
|
|
9
|
+
memoryRead: boolean;
|
|
10
|
+
memoryWrite: boolean;
|
|
11
|
+
timeoutSeconds: number;
|
|
12
|
+
resources: {
|
|
13
|
+
skills: Record<string, string | null>[];
|
|
14
|
+
plugins: Record<string, string | null>[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface WorkbenchSchedule {
|
|
18
|
+
scheduleId: string;
|
|
19
|
+
userId: string;
|
|
20
|
+
workspaceId: string;
|
|
21
|
+
taskConfiguration: ScheduleTaskConfiguration;
|
|
22
|
+
content: string;
|
|
23
|
+
triggerType: ScheduleTriggerType;
|
|
24
|
+
triggerAt: string;
|
|
25
|
+
timezone: string;
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
createdAt: string | null;
|
|
28
|
+
updatedAt: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface WorkbenchScheduleRun {
|
|
31
|
+
runId: string;
|
|
32
|
+
scheduleId: string;
|
|
33
|
+
workspaceId: string;
|
|
34
|
+
taskId: string | null;
|
|
35
|
+
plannedTriggerAt: string;
|
|
36
|
+
triggerKey: string;
|
|
37
|
+
status: string;
|
|
38
|
+
resultContent: string | null;
|
|
39
|
+
errorMessage: string | null;
|
|
40
|
+
startedAt: string | null;
|
|
41
|
+
finishedAt: string | null;
|
|
42
|
+
createdAt: string | null;
|
|
43
|
+
}
|
|
44
|
+
export interface SaveScheduleRequest {
|
|
45
|
+
actorUserId: string;
|
|
46
|
+
workspaceId: string;
|
|
47
|
+
taskConfiguration: ScheduleTaskConfiguration;
|
|
48
|
+
content: string;
|
|
49
|
+
triggerType: ScheduleTriggerType;
|
|
50
|
+
triggerAt: string;
|
|
51
|
+
timezone: string;
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
}
|
|
54
|
+
export type UpdateScheduleRequest = {
|
|
55
|
+
actorUserId: string;
|
|
56
|
+
scheduleId: string;
|
|
57
|
+
} & Partial<Omit<SaveScheduleRequest, 'actorUserId'>>;
|
|
58
|
+
export interface ScheduleListQuery {
|
|
59
|
+
actorUserId: string;
|
|
60
|
+
enabled?: boolean;
|
|
61
|
+
limit?: number;
|
|
62
|
+
offset?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface ScheduleRunQuery {
|
|
65
|
+
actorUserId: string;
|
|
66
|
+
from: string;
|
|
67
|
+
before: string;
|
|
68
|
+
limit?: number;
|
|
69
|
+
offset?: number;
|
|
70
|
+
}
|
|
71
|
+
export interface SchedulePage<T> {
|
|
72
|
+
items: T[];
|
|
73
|
+
total: number;
|
|
74
|
+
}
|
|
75
|
+
export type TaskResourceScope = 'PLATFORM_SKILL' | 'ENTERPRISE_SKILL' | 'CREATED_SKILL' | 'INSTALLED_SKILL' | 'PLATFORM_PLUGIN' | 'ENTERPRISE_PLUGIN';
|
|
76
|
+
export interface TaskSelectedResource {
|
|
77
|
+
kind: 'skill' | 'plugin';
|
|
78
|
+
name: string;
|
|
79
|
+
description: string;
|
|
80
|
+
selection: Record<string, string | null>;
|
|
81
|
+
}
|
|
82
|
+
export interface ScheduleResourceQuery {
|
|
83
|
+
actorUserId: string;
|
|
84
|
+
workspaceId: string;
|
|
85
|
+
scope: TaskResourceScope;
|
|
86
|
+
keyword: string;
|
|
87
|
+
page: number;
|
|
88
|
+
}
|
|
89
|
+
export interface AccountSchedulesApi {
|
|
90
|
+
list(query: ScheduleListQuery): Promise<SchedulePage<WorkbenchSchedule>>;
|
|
91
|
+
get(scheduleId: string, actorUserId: string): Promise<WorkbenchSchedule>;
|
|
92
|
+
create(request: SaveScheduleRequest): Promise<WorkbenchSchedule>;
|
|
93
|
+
update(request: UpdateScheduleRequest): Promise<WorkbenchSchedule>;
|
|
94
|
+
delete(scheduleId: string, actorUserId: string): Promise<void>;
|
|
95
|
+
listRuns(scheduleId: string, actorUserId: string, offset?: number): Promise<SchedulePage<WorkbenchScheduleRun>>;
|
|
96
|
+
listRunsByWindow(query: ScheduleRunQuery): Promise<SchedulePage<WorkbenchScheduleRun>>;
|
|
97
|
+
workspaces(actorUserId: string): Promise<{
|
|
98
|
+
id: string;
|
|
99
|
+
name: string;
|
|
100
|
+
}[]>;
|
|
101
|
+
models(actorUserId: string, workspaceId: string): Promise<AvailableChatModel[]>;
|
|
102
|
+
resources(query: ScheduleResourceQuery): Promise<{
|
|
103
|
+
list: TaskSelectedResource[];
|
|
104
|
+
hasNext: boolean;
|
|
105
|
+
}>;
|
|
106
|
+
selectResource(actorUserId: string, workspaceId: string, resource: TaskSelectedResource): Promise<TaskSelectedResource>;
|
|
107
|
+
getPluginAuthorization(actorUserId: string, workspaceId: string, pluginId: string): Promise<PluginAuthorizationStatus>;
|
|
108
|
+
savePluginAuthorization(actorUserId: string, workspaceId: string, pluginId: string, request: PluginAuthorizationSaveRequest): Promise<PluginAuthorizationStatus>;
|
|
109
|
+
verifyPluginAuthorization(actorUserId: string, workspaceId: string, pluginId: string): Promise<PluginAuthorizationStatus>;
|
|
110
|
+
}
|
|
@@ -13,5 +13,7 @@ export interface AgentTeamMember {
|
|
|
13
13
|
export interface AgentTeamDefinition {
|
|
14
14
|
members: AgentTeamMember[];
|
|
15
15
|
workflow?: string;
|
|
16
|
+
/** Validated platform package; keeps the desktop's roles, limits and write policy. */
|
|
17
|
+
package?: import('./expert-team-api.js').ExpertTeamRunSnapshot;
|
|
16
18
|
}
|
|
17
19
|
export declare function parseAgentTeam(value: unknown): AgentTeamDefinition;
|