@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.
@@ -66,6 +66,12 @@ export declare class AiosClient {
66
66
  };
67
67
  readonly skills: {
68
68
  list: () => Promise<import("./types.js").LocalSkillDefinition[]>;
69
+ /** Installs an additive immutable package version; does not change task selections. */
70
+ importVersion: (request: {
71
+ packagePath: string;
72
+ folderName: string;
73
+ packageSha256: string;
74
+ }) => Promise<import("./types.js").LocalSkillDefinition>;
69
75
  importPaths: (paths: string[]) => Promise<import("./types.js").LocalSkillDefinition[]>;
70
76
  remove: (reference: string) => Promise<void>;
71
77
  };
@@ -98,6 +104,8 @@ export declare class AiosClient {
98
104
  defineAgent(definition: AgentDefinition): Promise<Agent>;
99
105
  private registerAgent;
100
106
  openSession(id: string): Promise<Session>;
107
+ /** Reopen an immutable, already defined agent version without replacing its tool registrations. */
108
+ openAgent(id: string, version: string): Promise<Agent>;
101
109
  listSessions(query?: {
102
110
  scope?: string;
103
111
  includeArchived?: boolean;
@@ -152,19 +160,13 @@ export declare class Session {
152
160
  setEnabled: (enabled: boolean) => Promise<import("./types.js").MemoryView>;
153
161
  };
154
162
  send(content: string, options?: SendOptions): Promise<Run>;
155
- enqueue(content: string, options?: SendOptions): Promise<{
156
- status: string;
157
- messageId: string;
158
- }>;
163
+ enqueue(content: string, options?: SendOptions): Promise<import("../../shared/local-task-command.js").LocalTaskCommandResult>;
159
164
  queue(): Promise<import("./types.js").QueueSnapshot>;
160
- editQueued(messageId: string, content: string, queueVersion: string, commandId?: `${string}-${string}-${string}-${string}-${string}`): Promise<unknown>;
161
- removeQueued(messageId: string, snapshot: Pick<import('./types.js').QueueSnapshot, 'queueVersion' | 'activeRunId'>, commandId?: `${string}-${string}-${string}-${string}-${string}`): Promise<unknown>;
162
- reorderQueue(messageIds: string[], queueVersion: string, commandId?: `${string}-${string}-${string}-${string}-${string}`): Promise<unknown>;
165
+ editQueued(messageId: string, content: string, queueVersion: string, commandId?: string): Promise<import("../../shared/local-task-command.js").LocalTaskCommandResult>;
166
+ removeQueued(messageId: string, snapshot: Pick<import('./types.js').QueueSnapshot, 'queueVersion' | 'activeRunId'>, commandId?: string): Promise<import("../../shared/local-task-command.js").LocalTaskCommandResult>;
167
+ reorderQueue(messageIds: string[], queueVersion: string, commandId?: string): Promise<import("../../shared/local-task-command.js").LocalTaskCommandResult>;
163
168
  /** A non-null targetRunId adds this message to that active run; null starts its own run. */
164
- dispatchQueued(messageId: string, queueVersion: string, targetRunId: string | null, commandId?: `${string}-${string}-${string}-${string}-${string}`): Promise<{
165
- status: string;
166
- runId?: string;
167
- }>;
169
+ dispatchQueued(messageId: string, queueVersion: string, targetRunId: string | null, commandId?: string): Promise<import("../../shared/local-task-command.js").LocalTaskCommandResult>;
168
170
  history(): Promise<import("../../shared/local-task-api.js").LocalTaskMessage[]>;
169
171
  rename(name: string, expectedRevision: string): Promise<SessionInfo>;
170
172
  setArchived(archived: boolean, expectedRevision: string): Promise<SessionInfo>;
@@ -212,7 +214,7 @@ export declare class Session {
212
214
  updateAgent(update: import('./types.js').SessionAgentUpdate): Promise<import("./types.js").SessionConfiguration>;
213
215
  receipt(commandId: string): Promise<import("./types.js").CommandReceipt>;
214
216
  resumeRun(runId: string): Run;
215
- compact(): Promise<Run>;
217
+ compact(commandId?: string): Promise<Run>;
216
218
  }
217
219
  export declare class Run {
218
220
  private readonly transport;
@@ -238,11 +240,12 @@ export declare class Run {
238
240
  cancelOperation(operationId: string, options?: {
239
241
  signal?: AbortSignal;
240
242
  }): Promise<import("./types.js").TaskOperationSnapshot>;
241
- cancel(): Promise<void>;
243
+ cancel(commandId?: string): Promise<void>;
242
244
  detach(): Promise<void>;
243
- approve(toolCallId: string, decision: 'approve' | 'approve_for_session' | 'deny'): Promise<void>;
244
- answer(requestId: string, response: Record<string, unknown>): Promise<void>;
245
- confirmPlan(): Promise<Run>;
245
+ approve(toolCallId: string, decision: 'approve' | 'approve_for_session' | 'deny', commandId?: string): Promise<void>;
246
+ answer(requestId: string, response: Record<string, unknown>, commandId?: string): Promise<void>;
247
+ cancelInput(requestId: string, commandId?: string): Promise<void>;
248
+ confirmPlan(commandId?: string): Promise<Run>;
246
249
  /** Aborting observation never sends task cancellation. */
247
250
  events(options?: {
248
251
  cursor?: string;
@@ -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[]>;
@@ -0,0 +1,6 @@
1
+ export interface ProductRuntimeResources {
2
+ root: string;
3
+ codexExecutable: string;
4
+ }
5
+ /** References are covered by the same signed manifest as the small SDK host. */
6
+ export declare function validateProductResources(directory: string, value: unknown): Promise<ProductRuntimeResources>;
@@ -1,10 +1,12 @@
1
+ import { type ProductRuntimeResources } from './product-resources.js';
1
2
  export interface VerifiedRuntime {
2
3
  version: string;
3
4
  protocol: number;
4
5
  dataFormat: number;
5
6
  platform: NodeJS.Platform;
6
7
  arch: string;
7
- profile: 'light';
8
+ profile: 'light' | 'product';
8
9
  manifestSha256: string;
10
+ productResources?: ProductRuntimeResources;
9
11
  }
10
- export declare function validateSdkRuntimeDirectory(directory: string, trustedPublicKey?: string): Promise<VerifiedRuntime>;
12
+ export declare function validateSdkRuntimeDirectory(directory: string, trustedPublicKey?: string, expectedTarget?: Pick<VerifiedRuntime, 'platform' | 'arch'>): Promise<VerifiedRuntime>;
@@ -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
  }
@@ -272,6 +273,7 @@ export interface ClientConfiguration {
272
273
  contextDirectory: string;
273
274
  resourcesDirectory: string;
274
275
  tasksDirectory: string;
276
+ legacyTasksDirectory?: string;
275
277
  workspacesDirectory: string;
276
278
  temporaryDirectory: string;
277
279
  cacheDirectory: string;
@@ -290,43 +292,6 @@ export type LocalPreferenceDomain = import('../../cli/daemon/preferences.js').Pr
290
292
  export type { ComputerUseSettings } from '../../shared/computer-use-api.js';
291
293
  export type { NativeSettings, NativeCapabilityStatus } from './native-status.js';
292
294
  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
295
  export interface SessionMemoryApi {
331
296
  get(request: import('../../shared/local-memory.js').MemoryContextRequest & {
332
297
  sessionId: string;
@@ -342,54 +307,6 @@ export interface SessionMemoryApi {
342
307
  enabled: boolean;
343
308
  }): Promise<import('../../shared/local-memory.js').MemoryView>;
344
309
  }
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
310
  export interface AuthTokens {
394
311
  accessToken: string;
395
312
  refreshToken: string;
@@ -448,6 +365,8 @@ export interface BrowserLoginStatus {
448
365
  };
449
366
  }
450
367
  export interface SendOptions extends Partial<ExecutionDefaults> {
368
+ /** Selected scene and its implicit resources, preserved in this turn's history and queue. */
369
+ sceneContext?: import('../../shared/local-task-api.js').LocalTaskSceneContext;
451
370
  /** Narrow this run's long-term memory access within the session grant. */
452
371
  memory?: import('../../shared/session-policy.js').RunMemoryPolicy;
453
372
  /** Trusted host metadata. Immutable for this run, including queued dispatch and continuations. */
@@ -466,13 +385,8 @@ export interface SendOptions extends Partial<ExecutionDefaults> {
466
385
  skills?: import('../../shared/local-task-api.js').LocalTaskSkillReference[];
467
386
  plugins?: import('../../shared/local-task-api.js').LocalTaskPluginReference[];
468
387
  }
469
- export interface QueueSnapshot {
470
- messages: import('../../shared/local-task-api.js').LocalTaskPendingMessage[];
471
- queueVersion: string;
472
- activeRunId: string | null;
473
- historyVersion: string;
474
- }
475
- export type CommandReceipt = import('../../shared/local-task-command.js').LocalTaskCommandRecord | null;
388
+ export type CommandReceipt = import('../../shared/local-task-command.js').LocalTaskCommandReply | null;
389
+ export type CommandResult = import('../../shared/local-task-command.js').LocalTaskCommandResult;
476
390
  export interface CapabilityQuery {
477
391
  kind?: 'tool' | 'skill';
478
392
  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;