@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.
@@ -0,0 +1,96 @@
1
+ /** SDK schema version 1, shared by SDK clients and conversation renderers. No host runtime imports. */
2
+ export interface TaskEvent {
3
+ schemaVersion: 1;
4
+ /** Save after processing this event to resume without skipping the rest of its page. */
5
+ cursor: string;
6
+ sessionId: string;
7
+ id: string;
8
+ type: import('./local-task-api.js').LocalTaskEventType;
9
+ runId: string;
10
+ /** Sequence within this cursor stream; use the event ID for deduplication. */
11
+ sequence: number;
12
+ runtimeSequence?: number;
13
+ /** Original engine event kind; payload retains its full structured fields. */
14
+ runtimeType?: string;
15
+ threadId?: string;
16
+ turnId?: string;
17
+ itemId?: string;
18
+ requestId?: string;
19
+ rootThreadId?: string;
20
+ sourceThreadId?: string;
21
+ parentThreadId?: string;
22
+ /** Host-supplied business ownership; separate from local task/member/thread identifiers. */
23
+ context?: import('./execution-context.js').ExecutionContext;
24
+ payload: Record<string, unknown>;
25
+ createdAt?: string;
26
+ }
27
+ /** Includes session-level events without a run and late updates after a run completes. */
28
+ export type SessionEvent = Omit<TaskEvent, 'runId'> & {
29
+ runId?: string;
30
+ };
31
+ export interface SessionEventPage {
32
+ events: SessionEvent[];
33
+ cursor: string;
34
+ }
35
+ export interface EventObservationOptions {
36
+ cursor?: string;
37
+ signal?: AbortSignal;
38
+ }
39
+ export interface TaskInteraction {
40
+ id: string;
41
+ taskId?: string;
42
+ itemId?: string;
43
+ createdAt?: string;
44
+ updatedAt?: string;
45
+ kind: string;
46
+ requestId: string;
47
+ runId: string;
48
+ status: string;
49
+ payload: Record<string, unknown>;
50
+ }
51
+ /** Same history contract consumed by the desktop renderer, including references, reasoning and usage. */
52
+ export type TaskMessage = import('./local-task-api.js').LocalTaskMessage;
53
+ export interface HistoryQuery {
54
+ text?: string;
55
+ around?: string;
56
+ cursor?: string;
57
+ limit?: number;
58
+ }
59
+ export interface HistoryPage {
60
+ items: TaskMessage[];
61
+ historyVersion: string;
62
+ hasMore: boolean;
63
+ nextCursor?: string;
64
+ }
65
+ export interface RunQuery {
66
+ cursor?: string;
67
+ limit?: number;
68
+ }
69
+ export interface RunRecord {
70
+ runId: string;
71
+ status: RunState['status'];
72
+ messageCount: number;
73
+ /** Journal timestamps; these do not claim the time a model request began. */
74
+ firstMessageAt?: string;
75
+ queuedAt?: string;
76
+ finishedAt?: string;
77
+ context?: import('./execution-context.js').ExecutionContext;
78
+ }
79
+ export interface RunPage {
80
+ items: RunRecord[];
81
+ revision: string;
82
+ hasMore: boolean;
83
+ nextCursor?: string;
84
+ }
85
+ export interface RunState {
86
+ status: 'queued' | 'running' | 'waiting' | 'completed' | 'failed' | 'cancelled' | 'interrupted';
87
+ runId: string;
88
+ interactions: TaskInteraction[];
89
+ messages: TaskMessage[];
90
+ }
91
+ export interface QueueSnapshot {
92
+ messages: import('./local-task-api.js').LocalTaskPendingMessage[];
93
+ queueVersion: string;
94
+ activeRunId: string | null;
95
+ historyVersion: string;
96
+ }
@@ -0,0 +1,75 @@
1
+ export type JsonValue = null | boolean | number | string | JsonValue[] | {
2
+ [key: string]: JsonValue;
3
+ };
4
+ export interface EnterpriseProjectInteraction {
5
+ interaction_id: string;
6
+ type: 'approval' | 'single_select' | 'multi_select' | 'form' | 'text';
7
+ title: string;
8
+ description?: string | null;
9
+ details?: JsonValue;
10
+ options: {
11
+ id: string;
12
+ label: string;
13
+ value: JsonValue;
14
+ }[];
15
+ schema: JsonSchema;
16
+ expires_at?: string | null;
17
+ status: 'pending' | 'resolved' | 'expired';
18
+ }
19
+ export interface JsonSchema {
20
+ [keyword: string]: unknown;
21
+ type?: 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | 'null';
22
+ title?: string;
23
+ description?: string;
24
+ properties?: Record<string, JsonSchema>;
25
+ required?: string[];
26
+ items?: JsonSchema;
27
+ enum?: JsonValue[];
28
+ minLength?: number;
29
+ maxLength?: number;
30
+ minimum?: number;
31
+ maximum?: number;
32
+ minItems?: number;
33
+ maxItems?: number;
34
+ pattern?: string;
35
+ format?: string;
36
+ }
37
+ export interface EnterpriseProjectArtifact {
38
+ name: string;
39
+ url: string;
40
+ mime_type?: string;
41
+ }
42
+ export interface EnterpriseProjectInvocation {
43
+ invocation_id: string;
44
+ record_id: string;
45
+ name: string;
46
+ task_id: string;
47
+ session_id: string;
48
+ status: 'queued' | 'running' | 'waiting_input' | 'waiting_approval' | 'succeeded' | 'incomplete' | 'failed' | 'cancelled' | 'interrupted';
49
+ result: JsonValue;
50
+ artifacts: EnterpriseProjectArtifact[];
51
+ required_action: EnterpriseProjectInteraction[];
52
+ error: JsonValue;
53
+ revision: number;
54
+ created_at: string;
55
+ updated_at: string;
56
+ }
57
+ export interface EnterpriseProjectResource {
58
+ tenant_id: string;
59
+ workspace_id: string;
60
+ resource_type: 'AGENT' | 'AICODING_AGENT' | 'AICODING_WORKFLOW';
61
+ resource_id: string;
62
+ }
63
+ export interface EnterpriseProjectCapability extends EnterpriseProjectResource {
64
+ record_id: string;
65
+ name: string;
66
+ description?: string | null;
67
+ contract_revision: string;
68
+ }
69
+ export interface EnterpriseProjectCapabilityPage {
70
+ list: EnterpriseProjectCapability[];
71
+ page: number;
72
+ page_size: number;
73
+ has_next: boolean;
74
+ verification_pending: number;
75
+ }
@@ -0,0 +1,35 @@
1
+ export type TaskExecutionProvider = 'LICOS' | 'CLAUDE' | 'CODEX';
2
+ export interface TaskExecutionEndpoint {
3
+ id: string;
4
+ name: string;
5
+ provider: TaskExecutionProvider;
6
+ status: 'PENDING' | 'ACTIVE' | 'REVOKED';
7
+ connected: boolean;
8
+ deviceId: string | null;
9
+ capabilities: {
10
+ protocolVersion?: number;
11
+ methods?: string[];
12
+ };
13
+ }
14
+ export interface TaskEndpointPairing {
15
+ id: string;
16
+ endpointId: string;
17
+ token: string;
18
+ expiresAt: string;
19
+ }
20
+ export interface TaskExecutionBinding {
21
+ endpointId: string;
22
+ deviceId: string;
23
+ provider: TaskExecutionProvider;
24
+ name: string;
25
+ }
26
+ export interface TaskExecutionEndpointsApi {
27
+ executionEndpoints(actor: string, offset: number): Promise<TaskExecutionEndpoint[]>;
28
+ createExecutionEndpoint(actor: string, name: string, provider: TaskExecutionProvider): Promise<TaskEndpointPairing>;
29
+ pairExecutionEndpoint(actor: string, id: string): Promise<TaskEndpointPairing>;
30
+ executionPairingStatus(actor: string, pair: TaskEndpointPairing): Promise<{
31
+ status: 'PENDING' | 'CLAIMED' | 'CANCELLED' | 'EXPIRED';
32
+ }>;
33
+ cancelExecutionPairing(actor: string, pair: TaskEndpointPairing): Promise<void>;
34
+ revokeExecutionEndpoint(actor: string, id: string): Promise<void>;
35
+ }
package/package.json CHANGED
@@ -1,22 +1,42 @@
1
1
  {
2
2
  "name": "@kmlckj/aios-agent-server-sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.5",
4
4
  "description": "AIOS agent application SDK for Node.js",
5
5
  "type": "module",
6
- "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" },
7
- "engines": { "node": "^22.23.2 || ^24.0.0" },
8
- "dependencies": { "ajv": "8.20.0", "tar": "7.5.22" },
6
+ "publishConfig": {
7
+ "access": "public",
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
10
+ "engines": {
11
+ "node": "^22.23.2 || ^24.0.0"
12
+ },
13
+ "dependencies": {
14
+ "ajv": "8.20.0",
15
+ "tar": "7.5.22"
16
+ },
9
17
  "optionalDependencies": {
10
- "@kmlckj/aios-runtime-win32-x64": "0.0.1",
11
- "@kmlckj/aios-runtime-darwin-x64": "0.0.1",
12
- "@kmlckj/aios-runtime-darwin-arm64": "0.0.1",
13
- "@kmlckj/aios-runtime-linux-x64": "0.0.1",
14
- "@kmlckj/aios-runtime-linux-arm64": "0.0.1"
18
+ "@kmlckj/aios-runtime-win32-x64": "0.0.5",
19
+ "@kmlckj/aios-runtime-darwin-x64": "0.0.5",
20
+ "@kmlckj/aios-runtime-darwin-arm64": "0.0.5",
21
+ "@kmlckj/aios-runtime-linux-x64": "0.0.5",
22
+ "@kmlckj/aios-runtime-linux-arm64": "0.0.5"
15
23
  },
16
24
  "exports": {
17
- ".": { "types": "./dist/sdk/src/index.d.ts", "import": "./dist/index.js" },
18
- "./events": { "types": "./dist/sdk/src/events.d.ts", "import": "./dist/events.js" }
25
+ ".": {
26
+ "types": "./dist/sdk/src/index.d.ts",
27
+ "import": "./dist/index.js"
28
+ },
29
+ "./events": {
30
+ "types": "./dist/sdk/src/events.d.ts",
31
+ "import": "./dist/events.js"
32
+ }
19
33
  },
20
- "files": ["dist", "README.md", "EVENTS.md", "examples", "capabilities.json"],
34
+ "files": [
35
+ "dist",
36
+ "README.md",
37
+ "EVENTS.md",
38
+ "examples",
39
+ "capabilities.json"
40
+ ],
21
41
  "license": "UNLICENSED"
22
42
  }
@@ -1,22 +0,0 @@
1
- import type { CloudTaskEvent, CloudTaskEventSubscriptionRequest } from './collaboration-task-api.js';
2
- export interface CloudTaskEventSubscription {
3
- subscriptionId: string;
4
- }
5
- export type CloudTaskEventStreamMessage = {
6
- type: 'event';
7
- subscriptionId: string;
8
- generation: number;
9
- event: CloudTaskEvent;
10
- } | {
11
- type: 'connection';
12
- subscriptionId: string;
13
- generation: number;
14
- state: 'connecting' | 'connected' | 'recovering' | 'closed';
15
- lastSeqId: number;
16
- reason?: string;
17
- };
18
- export interface CloudTaskEventApi {
19
- subscribe(request: CloudTaskEventSubscriptionRequest): Promise<CloudTaskEventSubscription>;
20
- unsubscribe(subscriptionId: string): Promise<void>;
21
- onEvent(listener: (message: CloudTaskEventStreamMessage) => void): () => void;
22
- }