@vorionsys/agent-sdk 0.1.0
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/LICENSE +190 -0
- package/README.md +92 -0
- package/dist/AuraisAgent.d.ts +92 -0
- package/dist/AuraisAgent.d.ts.map +1 -0
- package/dist/AuraisAgent.js +406 -0
- package/dist/AuraisAgent.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +216 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/package.json +70 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Vorion, Inc.
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# @vorionsys/agent-sdk
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for connecting AI agents to Aurais Mission Control via WebSocket.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @vorionsys/agent-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **WebSocket connectivity** -- Persistent connection to Aurais Mission Control.
|
|
14
|
+
- **Auto-reconnection** -- Exponential backoff with configurable max attempts.
|
|
15
|
+
- **Heartbeat management** -- Automatic keepalive with ping/pong.
|
|
16
|
+
- **Type-safe messages** -- Strongly typed inbound/outbound message handling.
|
|
17
|
+
- **Event emitter** -- Subscribe to tasks, decisions, config changes, and connection events.
|
|
18
|
+
- **Task lifecycle** -- Report progress, complete, or fail assigned tasks.
|
|
19
|
+
- **Action requests** -- Submit actions that require human or governance approval.
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { AuraisAgent } from '@vorionsys/agent-sdk';
|
|
25
|
+
|
|
26
|
+
const agent = new AuraisAgent({
|
|
27
|
+
apiKey: process.env.AURAIS_API_KEY!,
|
|
28
|
+
capabilities: ['execute', 'external'],
|
|
29
|
+
skills: ['web-dev', 'data-analysis'],
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
await agent.connect();
|
|
33
|
+
|
|
34
|
+
agent.on('task:assigned', async (task) => {
|
|
35
|
+
await agent.updateStatus('WORKING');
|
|
36
|
+
await agent.reportProgress(task.id, 50, 'Halfway done');
|
|
37
|
+
await agent.completeTask(task.id, { output: 'result' });
|
|
38
|
+
await agent.updateStatus('IDLE');
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
agent.on('decision:required', (req) => console.log(`Decision needed: ${req.title}`));
|
|
42
|
+
agent.on('decision:result', (d) => console.log(`${d.decision} by ${d.decidedBy}`));
|
|
43
|
+
agent.on('error', (err) => console.error(err));
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Configuration
|
|
47
|
+
|
|
48
|
+
| Option | Default | Description |
|
|
49
|
+
| ---------------------- | -------------------------- | ---------------------------- |
|
|
50
|
+
| `apiKey` | (required) | API key for authentication |
|
|
51
|
+
| `capabilities` | `['execute']` | Agent capabilities |
|
|
52
|
+
| `skills` | `[]` | Agent skills list |
|
|
53
|
+
| `serverUrl` | `wss://api.aurais.ai/ws` | WebSocket server URL |
|
|
54
|
+
| `autoReconnect` | `true` | Enable auto-reconnection |
|
|
55
|
+
| `maxReconnectAttempts` | `10` | Max reconnection attempts |
|
|
56
|
+
| `heartbeatInterval` | `30000` | Heartbeat interval (ms) |
|
|
57
|
+
| `connectionTimeout` | `10000` | Connection timeout (ms) |
|
|
58
|
+
|
|
59
|
+
## Agent Capabilities
|
|
60
|
+
|
|
61
|
+
| Capability | Description |
|
|
62
|
+
| ----------- | ------------------------------- |
|
|
63
|
+
| `execute` | Can execute tasks locally |
|
|
64
|
+
| `external` | Can make external API calls |
|
|
65
|
+
| `delegate` | Can delegate to other agents |
|
|
66
|
+
| `spawn` | Can spawn sub-agents |
|
|
67
|
+
| `admin` | Administrative privileges |
|
|
68
|
+
|
|
69
|
+
## Agent Statuses
|
|
70
|
+
|
|
71
|
+
`IDLE` | `WORKING` | `PAUSED` | `ERROR` | `OFFLINE`
|
|
72
|
+
|
|
73
|
+
## Events
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
agent.on('connected', () => void);
|
|
77
|
+
agent.on('disconnected', (reason: string) => void);
|
|
78
|
+
agent.on('reconnecting', (attempt, maxAttempts) => void);
|
|
79
|
+
agent.on('task:assigned', (task: Task) => void);
|
|
80
|
+
agent.on('task:completed', (result: TaskResult) => void);
|
|
81
|
+
agent.on('decision:required', (request: ActionRequest) => void);
|
|
82
|
+
agent.on('decision:result', (decision: ActionDecision) => void);
|
|
83
|
+
agent.on('error', (error: Error) => void);
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Requirements
|
|
87
|
+
|
|
88
|
+
- Node.js >= 18
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
Apache-2.0
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aurais Agent SDK - Main Agent Class
|
|
3
|
+
*
|
|
4
|
+
* Provides easy WebSocket connection to Aurais Mission Control with:
|
|
5
|
+
* - Auto-reconnection with exponential backoff
|
|
6
|
+
* - Type-safe message handling
|
|
7
|
+
* - Event emitter pattern
|
|
8
|
+
* - Heartbeat management
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
import { EventEmitter } from 'eventemitter3';
|
|
13
|
+
import { type AuraisAgentConfig, type AgentEvents, type AgentStatus, type ConnectionState, type TaskProgress, type ActionRequestSubmission } from './types.js';
|
|
14
|
+
export declare class AuraisAgent extends EventEmitter<AgentEvents> {
|
|
15
|
+
private config;
|
|
16
|
+
private ws;
|
|
17
|
+
private connectionState;
|
|
18
|
+
private status;
|
|
19
|
+
private agentId;
|
|
20
|
+
private structuredId;
|
|
21
|
+
private reconnectAttempts;
|
|
22
|
+
private reconnectTimer;
|
|
23
|
+
private heartbeatTimer;
|
|
24
|
+
private lastPongTime;
|
|
25
|
+
private messageCounter;
|
|
26
|
+
private pendingAcks;
|
|
27
|
+
constructor(config: AuraisAgentConfig);
|
|
28
|
+
/**
|
|
29
|
+
* Connect to Aurais Mission Control
|
|
30
|
+
*/
|
|
31
|
+
connect(): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Disconnect from Aurais Mission Control
|
|
34
|
+
*/
|
|
35
|
+
disconnect(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get current connection state
|
|
38
|
+
*/
|
|
39
|
+
getConnectionState(): ConnectionState;
|
|
40
|
+
/**
|
|
41
|
+
* Check if connected
|
|
42
|
+
*/
|
|
43
|
+
isConnected(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Get agent ID (available after successful registration)
|
|
46
|
+
*/
|
|
47
|
+
getAgentId(): string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Get structured agent ID (available after successful registration)
|
|
50
|
+
*/
|
|
51
|
+
getStructuredId(): string | null;
|
|
52
|
+
/**
|
|
53
|
+
* Update agent status
|
|
54
|
+
*/
|
|
55
|
+
updateStatus(status: AgentStatus, progress?: number, message?: string): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Get current agent status
|
|
58
|
+
*/
|
|
59
|
+
getStatus(): AgentStatus;
|
|
60
|
+
/**
|
|
61
|
+
* Report task progress
|
|
62
|
+
*/
|
|
63
|
+
reportProgress(taskId: string, progress: number, message?: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Complete a task
|
|
66
|
+
*/
|
|
67
|
+
completeTask(taskId: string, result: unknown, metrics?: TaskProgress['currentStep'] extends string ? never : object): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Fail a task
|
|
70
|
+
*/
|
|
71
|
+
failTask(taskId: string, error: string): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Request an action that requires approval
|
|
74
|
+
*/
|
|
75
|
+
requestAction(request: ActionRequestSubmission): Promise<string>;
|
|
76
|
+
private establishConnection;
|
|
77
|
+
private onOpen;
|
|
78
|
+
private onMessage;
|
|
79
|
+
private onClose;
|
|
80
|
+
private onError;
|
|
81
|
+
private handleMessage;
|
|
82
|
+
private sendMessage;
|
|
83
|
+
private sendPong;
|
|
84
|
+
private handleAck;
|
|
85
|
+
private startHeartbeat;
|
|
86
|
+
private stopHeartbeat;
|
|
87
|
+
private sendHeartbeat;
|
|
88
|
+
private scheduleReconnect;
|
|
89
|
+
private cleanup;
|
|
90
|
+
private generateMessageId;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=AuraisAgent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuraisAgent.d.ts","sourceRoot":"","sources":["../src/AuraisAgent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,eAAe,EAGpB,KAAK,YAAY,EAEjB,KAAK,uBAAuB,EAO/B,MAAM,YAAY,CAAC;AAiBpB,qBAAa,WAAY,SAAQ,YAAY,CAAC,WAAW,CAAC;IACtD,OAAO,CAAC,MAAM,CAA8B;IAC5C,OAAO,CAAC,EAAE,CAA0B;IACpC,OAAO,CAAC,eAAe,CAAmC;IAC1D,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,YAAY,CAAuB;IAG3C,OAAO,CAAC,iBAAiB,CAAK;IAC9B,OAAO,CAAC,cAAc,CAA8C;IAGpE,OAAO,CAAC,cAAc,CAA+C;IACrE,OAAO,CAAC,YAAY,CAAa;IAGjC,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,WAAW,CAIJ;gBAEH,MAAM,EAAE,iBAAiB;IA0BrC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC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OAAO;IAwBf,OAAO,CAAC,iBAAiB;CAG5B"}
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aurais Agent SDK - Main Agent Class
|
|
3
|
+
*
|
|
4
|
+
* Provides easy WebSocket connection to Aurais Mission Control with:
|
|
5
|
+
* - Auto-reconnection with exponential backoff
|
|
6
|
+
* - Type-safe message handling
|
|
7
|
+
* - Event emitter pattern
|
|
8
|
+
* - Heartbeat management
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
import { EventEmitter } from 'eventemitter3';
|
|
13
|
+
import WebSocket from 'ws';
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// Constants
|
|
16
|
+
// ============================================================================
|
|
17
|
+
const DEFAULT_SERVER_URL = 'wss://api.aurais.ai/ws';
|
|
18
|
+
const DEFAULT_HEARTBEAT_INTERVAL = 30000; // 30 seconds
|
|
19
|
+
const DEFAULT_CONNECTION_TIMEOUT = 10000; // 10 seconds
|
|
20
|
+
const DEFAULT_RECONNECT_BASE_DELAY = 1000; // 1 second
|
|
21
|
+
const DEFAULT_RECONNECT_MAX_DELAY = 30000; // 30 seconds
|
|
22
|
+
const DEFAULT_MAX_RECONNECT_ATTEMPTS = 10;
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// AuraisAgent Class
|
|
25
|
+
// ============================================================================
|
|
26
|
+
export class AuraisAgent extends EventEmitter {
|
|
27
|
+
config;
|
|
28
|
+
ws = null;
|
|
29
|
+
connectionState = 'disconnected';
|
|
30
|
+
status = 'IDLE';
|
|
31
|
+
agentId = null;
|
|
32
|
+
structuredId = null;
|
|
33
|
+
// Reconnection state
|
|
34
|
+
reconnectAttempts = 0;
|
|
35
|
+
reconnectTimer = null;
|
|
36
|
+
// Heartbeat state
|
|
37
|
+
heartbeatTimer = null;
|
|
38
|
+
lastPongTime = 0;
|
|
39
|
+
// Message tracking
|
|
40
|
+
messageCounter = 0;
|
|
41
|
+
pendingAcks = new Map();
|
|
42
|
+
constructor(config) {
|
|
43
|
+
super();
|
|
44
|
+
if (!config.apiKey) {
|
|
45
|
+
throw new Error('API key is required');
|
|
46
|
+
}
|
|
47
|
+
this.config = {
|
|
48
|
+
apiKey: config.apiKey,
|
|
49
|
+
capabilities: config.capabilities ?? ['execute'],
|
|
50
|
+
skills: config.skills ?? [],
|
|
51
|
+
serverUrl: config.serverUrl ?? DEFAULT_SERVER_URL,
|
|
52
|
+
autoReconnect: config.autoReconnect ?? true,
|
|
53
|
+
maxReconnectAttempts: config.maxReconnectAttempts ?? DEFAULT_MAX_RECONNECT_ATTEMPTS,
|
|
54
|
+
reconnectBaseDelay: config.reconnectBaseDelay ?? DEFAULT_RECONNECT_BASE_DELAY,
|
|
55
|
+
reconnectMaxDelay: config.reconnectMaxDelay ?? DEFAULT_RECONNECT_MAX_DELAY,
|
|
56
|
+
heartbeatInterval: config.heartbeatInterval ?? DEFAULT_HEARTBEAT_INTERVAL,
|
|
57
|
+
connectionTimeout: config.connectionTimeout ?? DEFAULT_CONNECTION_TIMEOUT,
|
|
58
|
+
metadata: config.metadata ?? {},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
// =========================================================================
|
|
62
|
+
// Connection Management
|
|
63
|
+
// =========================================================================
|
|
64
|
+
/**
|
|
65
|
+
* Connect to Aurais Mission Control
|
|
66
|
+
*/
|
|
67
|
+
async connect() {
|
|
68
|
+
if (this.connectionState === 'connected' || this.connectionState === 'connecting') {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.connectionState = 'connecting';
|
|
72
|
+
this.reconnectAttempts = 0;
|
|
73
|
+
return this.establishConnection();
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Disconnect from Aurais Mission Control
|
|
77
|
+
*/
|
|
78
|
+
disconnect() {
|
|
79
|
+
this.cleanup();
|
|
80
|
+
this.connectionState = 'disconnected';
|
|
81
|
+
this.emit('disconnected', 'Manual disconnect');
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get current connection state
|
|
85
|
+
*/
|
|
86
|
+
getConnectionState() {
|
|
87
|
+
return this.connectionState;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Check if connected
|
|
91
|
+
*/
|
|
92
|
+
isConnected() {
|
|
93
|
+
return this.connectionState === 'connected';
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Get agent ID (available after successful registration)
|
|
97
|
+
*/
|
|
98
|
+
getAgentId() {
|
|
99
|
+
return this.agentId;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get structured agent ID (available after successful registration)
|
|
103
|
+
*/
|
|
104
|
+
getStructuredId() {
|
|
105
|
+
return this.structuredId;
|
|
106
|
+
}
|
|
107
|
+
// =========================================================================
|
|
108
|
+
// Status Updates
|
|
109
|
+
// =========================================================================
|
|
110
|
+
/**
|
|
111
|
+
* Update agent status
|
|
112
|
+
*/
|
|
113
|
+
async updateStatus(status, progress, message) {
|
|
114
|
+
const oldStatus = this.status;
|
|
115
|
+
this.status = status;
|
|
116
|
+
if (oldStatus !== status) {
|
|
117
|
+
this.emit('status:changed', oldStatus, status);
|
|
118
|
+
}
|
|
119
|
+
await this.sendMessage({
|
|
120
|
+
type: 'status:update',
|
|
121
|
+
payload: { status, progress, message },
|
|
122
|
+
messageId: this.generateMessageId(),
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get current agent status
|
|
127
|
+
*/
|
|
128
|
+
getStatus() {
|
|
129
|
+
return this.status;
|
|
130
|
+
}
|
|
131
|
+
// =========================================================================
|
|
132
|
+
// Task Management
|
|
133
|
+
// =========================================================================
|
|
134
|
+
/**
|
|
135
|
+
* Report task progress
|
|
136
|
+
*/
|
|
137
|
+
async reportProgress(taskId, progress, message) {
|
|
138
|
+
const payload = {
|
|
139
|
+
taskId,
|
|
140
|
+
status: this.status,
|
|
141
|
+
progress: Math.min(100, Math.max(0, progress)),
|
|
142
|
+
message,
|
|
143
|
+
};
|
|
144
|
+
await this.sendMessage({
|
|
145
|
+
type: 'task:progress',
|
|
146
|
+
payload,
|
|
147
|
+
messageId: this.generateMessageId(),
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Complete a task
|
|
152
|
+
*/
|
|
153
|
+
async completeTask(taskId, result, metrics) {
|
|
154
|
+
const taskResult = {
|
|
155
|
+
taskId,
|
|
156
|
+
success: true,
|
|
157
|
+
result,
|
|
158
|
+
metrics: metrics,
|
|
159
|
+
};
|
|
160
|
+
await this.sendMessage({
|
|
161
|
+
type: 'task:completed',
|
|
162
|
+
payload: taskResult,
|
|
163
|
+
messageId: this.generateMessageId(),
|
|
164
|
+
});
|
|
165
|
+
this.emit('task:completed', taskResult);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Fail a task
|
|
169
|
+
*/
|
|
170
|
+
async failTask(taskId, error) {
|
|
171
|
+
const taskResult = {
|
|
172
|
+
taskId,
|
|
173
|
+
success: false,
|
|
174
|
+
error,
|
|
175
|
+
};
|
|
176
|
+
await this.sendMessage({
|
|
177
|
+
type: 'task:completed',
|
|
178
|
+
payload: taskResult,
|
|
179
|
+
messageId: this.generateMessageId(),
|
|
180
|
+
});
|
|
181
|
+
this.emit('task:completed', taskResult);
|
|
182
|
+
}
|
|
183
|
+
// =========================================================================
|
|
184
|
+
// Action Requests
|
|
185
|
+
// =========================================================================
|
|
186
|
+
/**
|
|
187
|
+
* Request an action that requires approval
|
|
188
|
+
*/
|
|
189
|
+
async requestAction(request) {
|
|
190
|
+
const messageId = this.generateMessageId();
|
|
191
|
+
await this.sendMessage({
|
|
192
|
+
type: 'action:request',
|
|
193
|
+
payload: request,
|
|
194
|
+
messageId,
|
|
195
|
+
});
|
|
196
|
+
return messageId;
|
|
197
|
+
}
|
|
198
|
+
// =========================================================================
|
|
199
|
+
// Private Methods
|
|
200
|
+
// =========================================================================
|
|
201
|
+
async establishConnection() {
|
|
202
|
+
return new Promise((resolve, reject) => {
|
|
203
|
+
const url = new URL(this.config.serverUrl);
|
|
204
|
+
url.searchParams.set('apiKey', this.config.apiKey);
|
|
205
|
+
const connectionTimeout = setTimeout(() => {
|
|
206
|
+
if (this.ws) {
|
|
207
|
+
this.ws.close();
|
|
208
|
+
}
|
|
209
|
+
reject(new Error('Connection timeout'));
|
|
210
|
+
}, this.config.connectionTimeout);
|
|
211
|
+
try {
|
|
212
|
+
this.ws = new WebSocket(url.toString());
|
|
213
|
+
this.ws.on('open', () => {
|
|
214
|
+
clearTimeout(connectionTimeout);
|
|
215
|
+
this.onOpen();
|
|
216
|
+
resolve();
|
|
217
|
+
});
|
|
218
|
+
this.ws.on('message', (data) => {
|
|
219
|
+
this.onMessage(data.toString());
|
|
220
|
+
});
|
|
221
|
+
this.ws.on('close', (code, reason) => {
|
|
222
|
+
clearTimeout(connectionTimeout);
|
|
223
|
+
this.onClose(code, reason.toString());
|
|
224
|
+
});
|
|
225
|
+
this.ws.on('error', (error) => {
|
|
226
|
+
clearTimeout(connectionTimeout);
|
|
227
|
+
this.onError(error);
|
|
228
|
+
reject(error);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
catch (error) {
|
|
232
|
+
clearTimeout(connectionTimeout);
|
|
233
|
+
reject(error);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
onOpen() {
|
|
238
|
+
this.connectionState = 'connected';
|
|
239
|
+
this.reconnectAttempts = 0;
|
|
240
|
+
this.lastPongTime = Date.now();
|
|
241
|
+
// Start heartbeat
|
|
242
|
+
this.startHeartbeat();
|
|
243
|
+
// Send registration message
|
|
244
|
+
this.sendMessage({
|
|
245
|
+
type: 'register',
|
|
246
|
+
payload: {
|
|
247
|
+
apiKey: this.config.apiKey,
|
|
248
|
+
capabilities: this.config.capabilities,
|
|
249
|
+
skills: this.config.skills,
|
|
250
|
+
metadata: this.config.metadata,
|
|
251
|
+
},
|
|
252
|
+
});
|
|
253
|
+
if (this.reconnectAttempts > 0) {
|
|
254
|
+
this.emit('reconnected');
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
this.emit('connected');
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
onMessage(data) {
|
|
261
|
+
try {
|
|
262
|
+
const message = JSON.parse(data);
|
|
263
|
+
this.handleMessage(message);
|
|
264
|
+
}
|
|
265
|
+
catch (error) {
|
|
266
|
+
this.emit('error', new Error(`Failed to parse message: ${error}`));
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
onClose(code, reason) {
|
|
270
|
+
this.cleanup();
|
|
271
|
+
const wasConnected = this.connectionState === 'connected';
|
|
272
|
+
this.connectionState = 'disconnected';
|
|
273
|
+
if (wasConnected) {
|
|
274
|
+
this.emit('disconnected', reason || `Connection closed (code: ${code})`);
|
|
275
|
+
}
|
|
276
|
+
// Attempt reconnection if enabled
|
|
277
|
+
if (this.config.autoReconnect && this.reconnectAttempts < this.config.maxReconnectAttempts) {
|
|
278
|
+
this.scheduleReconnect();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
onError(error) {
|
|
282
|
+
this.emit('error', error);
|
|
283
|
+
}
|
|
284
|
+
handleMessage(message) {
|
|
285
|
+
this.emit('message', message);
|
|
286
|
+
switch (message.type) {
|
|
287
|
+
case 'task:assigned':
|
|
288
|
+
this.emit('task:assigned', message.payload);
|
|
289
|
+
break;
|
|
290
|
+
case 'decision:required':
|
|
291
|
+
this.emit('decision:required', message.payload);
|
|
292
|
+
break;
|
|
293
|
+
case 'decision:result':
|
|
294
|
+
this.emit('decision:result', message.payload);
|
|
295
|
+
break;
|
|
296
|
+
case 'config:updated':
|
|
297
|
+
this.emit('config:updated', message.payload);
|
|
298
|
+
break;
|
|
299
|
+
case 'ping':
|
|
300
|
+
this.sendPong(message.timestamp);
|
|
301
|
+
break;
|
|
302
|
+
case 'ack':
|
|
303
|
+
this.handleAck(message.messageId, message.success);
|
|
304
|
+
break;
|
|
305
|
+
case 'error':
|
|
306
|
+
this.emit('error', new Error(`Server error: ${message.message} (${message.code})`));
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
async sendMessage(message) {
|
|
311
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
312
|
+
throw new Error('Not connected');
|
|
313
|
+
}
|
|
314
|
+
const data = JSON.stringify(message);
|
|
315
|
+
this.ws.send(data);
|
|
316
|
+
if ('messageId' in message) {
|
|
317
|
+
this.emit('message:sent', message);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
sendPong(timestamp) {
|
|
321
|
+
this.lastPongTime = Date.now();
|
|
322
|
+
this.sendMessage({
|
|
323
|
+
type: 'pong',
|
|
324
|
+
timestamp,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
handleAck(messageId, success) {
|
|
328
|
+
const pending = this.pendingAcks.get(messageId);
|
|
329
|
+
if (pending) {
|
|
330
|
+
clearTimeout(pending.timeout);
|
|
331
|
+
this.pendingAcks.delete(messageId);
|
|
332
|
+
pending.resolve(success);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
startHeartbeat() {
|
|
336
|
+
this.stopHeartbeat();
|
|
337
|
+
this.heartbeatTimer = setInterval(() => {
|
|
338
|
+
this.sendHeartbeat();
|
|
339
|
+
}, this.config.heartbeatInterval);
|
|
340
|
+
}
|
|
341
|
+
stopHeartbeat() {
|
|
342
|
+
if (this.heartbeatTimer) {
|
|
343
|
+
clearInterval(this.heartbeatTimer);
|
|
344
|
+
this.heartbeatTimer = null;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
sendHeartbeat() {
|
|
348
|
+
if (!this.isConnected())
|
|
349
|
+
return;
|
|
350
|
+
try {
|
|
351
|
+
this.sendMessage({
|
|
352
|
+
type: 'heartbeat',
|
|
353
|
+
payload: {
|
|
354
|
+
timestamp: Date.now(),
|
|
355
|
+
status: this.status,
|
|
356
|
+
},
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
catch {
|
|
360
|
+
// Connection may have closed
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
scheduleReconnect() {
|
|
364
|
+
if (this.reconnectTimer) {
|
|
365
|
+
clearTimeout(this.reconnectTimer);
|
|
366
|
+
}
|
|
367
|
+
this.reconnectAttempts++;
|
|
368
|
+
this.connectionState = 'reconnecting';
|
|
369
|
+
// Exponential backoff with jitter
|
|
370
|
+
const delay = Math.min(this.config.reconnectBaseDelay * Math.pow(2, this.reconnectAttempts - 1) +
|
|
371
|
+
Math.random() * 1000, this.config.reconnectMaxDelay);
|
|
372
|
+
this.emit('reconnecting', this.reconnectAttempts, this.config.maxReconnectAttempts);
|
|
373
|
+
this.reconnectTimer = setTimeout(async () => {
|
|
374
|
+
try {
|
|
375
|
+
await this.establishConnection();
|
|
376
|
+
}
|
|
377
|
+
catch {
|
|
378
|
+
// Will trigger onClose which will schedule another reconnect
|
|
379
|
+
}
|
|
380
|
+
}, delay);
|
|
381
|
+
}
|
|
382
|
+
cleanup() {
|
|
383
|
+
this.stopHeartbeat();
|
|
384
|
+
if (this.reconnectTimer) {
|
|
385
|
+
clearTimeout(this.reconnectTimer);
|
|
386
|
+
this.reconnectTimer = null;
|
|
387
|
+
}
|
|
388
|
+
// Clear pending acks
|
|
389
|
+
for (const [, pending] of this.pendingAcks) {
|
|
390
|
+
clearTimeout(pending.timeout);
|
|
391
|
+
pending.reject(new Error('Connection closed'));
|
|
392
|
+
}
|
|
393
|
+
this.pendingAcks.clear();
|
|
394
|
+
if (this.ws) {
|
|
395
|
+
this.ws.removeAllListeners();
|
|
396
|
+
if (this.ws.readyState === WebSocket.OPEN) {
|
|
397
|
+
this.ws.close();
|
|
398
|
+
}
|
|
399
|
+
this.ws = null;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
generateMessageId() {
|
|
403
|
+
return `msg_${Date.now()}_${++this.messageCounter}`;
|
|
404
|
+
}
|
|
405
|
+
}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,CAAC;YACD,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC;QACnB,CAAC;IACL,CAAC;IAEO,iBAAiB;QACrB,OAAO,OAAO,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC;IACxD,CAAC;CACJ"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vorionsys/agent-sdk
|
|
3
|
+
*
|
|
4
|
+
* TypeScript SDK for connecting AI agents to Aurais Mission Control.
|
|
5
|
+
* Provides WebSocket connectivity with auto-reconnection, heartbeat
|
|
6
|
+
* management, and type-safe message handling.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
export { AuraisAgent } from './AuraisAgent.js';
|
|
11
|
+
export type { AuraisAgentConfig, AgentCapability, AgentStatus, ConnectionState, Task, TaskPriority, TaskResult, TaskMetrics, TaskProgress, ActionRequest, ActionRequestSubmission, ActionDecision, RiskLevel, Urgency, AgentConfig, InboundMessage, OutboundMessage, TaskAssignedMessage, DecisionRequiredMessage, DecisionResultMessage, ConfigUpdatedMessage, PingMessage, ErrorMessage, AcknowledgeMessage, StatusUpdateMessage, ActionRequestMessage, TaskCompletedMessage, TaskProgressMessage, HeartbeatMessage, PongMessage, RegisterMessage, AgentMetrics, AgentEvents, RegistrationResponse, } from './types.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,YAAY,EAER,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,eAAe,EAGf,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,YAAY,EAGZ,aAAa,EACb,uBAAuB,EACvB,cAAc,EACd,SAAS,EACT,OAAO,EAGP,WAAW,EAGX,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,eAAe,EAGf,YAAY,EAGZ,WAAW,EAGX,oBAAoB,GACvB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vorionsys/agent-sdk
|
|
3
|
+
*
|
|
4
|
+
* TypeScript SDK for connecting AI agents to Aurais Mission Control.
|
|
5
|
+
* Provides WebSocket connectivity with auto-reconnection, heartbeat
|
|
6
|
+
* management, and type-safe message handling.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
// Main class
|
|
11
|
+
export { AuraisAgent } from './AuraisAgent.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,aAAa;AACb,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vorion Agent SDK - Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for connecting AI agents to Aurais Mission Control.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
export interface AuraisAgentConfig {
|
|
9
|
+
/** API key for authentication */
|
|
10
|
+
apiKey: string;
|
|
11
|
+
/** Agent capabilities (e.g., 'execute', 'external', 'delegate') */
|
|
12
|
+
capabilities?: AgentCapability[];
|
|
13
|
+
/** Agent skills (e.g., 'web-dev', 'api-integration') */
|
|
14
|
+
skills?: string[];
|
|
15
|
+
/** WebSocket server URL (defaults to wss://api.aurais.ai/ws) */
|
|
16
|
+
serverUrl?: string;
|
|
17
|
+
/** Enable auto-reconnection (default: true) */
|
|
18
|
+
autoReconnect?: boolean;
|
|
19
|
+
/** Maximum reconnection attempts (default: 10) */
|
|
20
|
+
maxReconnectAttempts?: number;
|
|
21
|
+
/** Base reconnection delay in ms (default: 1000) */
|
|
22
|
+
reconnectBaseDelay?: number;
|
|
23
|
+
/** Maximum reconnection delay in ms (default: 30000) */
|
|
24
|
+
reconnectMaxDelay?: number;
|
|
25
|
+
/** Heartbeat interval in ms (default: 30000) */
|
|
26
|
+
heartbeatInterval?: number;
|
|
27
|
+
/** Connection timeout in ms (default: 10000) */
|
|
28
|
+
connectionTimeout?: number;
|
|
29
|
+
/** Agent metadata */
|
|
30
|
+
metadata?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
export type AgentCapability = 'execute' | 'external' | 'delegate' | 'spawn' | 'admin';
|
|
33
|
+
export type AgentStatus = 'IDLE' | 'WORKING' | 'PAUSED' | 'ERROR' | 'OFFLINE';
|
|
34
|
+
export type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'reconnecting';
|
|
35
|
+
export interface Task {
|
|
36
|
+
id: string;
|
|
37
|
+
type: string;
|
|
38
|
+
title: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
priority: TaskPriority;
|
|
41
|
+
payload: Record<string, unknown>;
|
|
42
|
+
assignedAt: string;
|
|
43
|
+
deadline?: string;
|
|
44
|
+
metadata?: Record<string, unknown>;
|
|
45
|
+
}
|
|
46
|
+
export type TaskPriority = 'low' | 'medium' | 'high' | 'critical';
|
|
47
|
+
export interface TaskResult {
|
|
48
|
+
taskId: string;
|
|
49
|
+
success: boolean;
|
|
50
|
+
result?: unknown;
|
|
51
|
+
error?: string;
|
|
52
|
+
metrics?: TaskMetrics;
|
|
53
|
+
}
|
|
54
|
+
export interface TaskMetrics {
|
|
55
|
+
startedAt: string;
|
|
56
|
+
completedAt: string;
|
|
57
|
+
durationMs: number;
|
|
58
|
+
resourcesUsed?: Record<string, number>;
|
|
59
|
+
}
|
|
60
|
+
export interface TaskProgress {
|
|
61
|
+
taskId: string;
|
|
62
|
+
status: AgentStatus;
|
|
63
|
+
progress: number;
|
|
64
|
+
message?: string;
|
|
65
|
+
currentStep?: string;
|
|
66
|
+
totalSteps?: number;
|
|
67
|
+
currentStepIndex?: number;
|
|
68
|
+
}
|
|
69
|
+
export interface ActionRequest {
|
|
70
|
+
id: string;
|
|
71
|
+
type: string;
|
|
72
|
+
title: string;
|
|
73
|
+
description: string;
|
|
74
|
+
riskLevel: RiskLevel;
|
|
75
|
+
urgency: Urgency;
|
|
76
|
+
payload: Record<string, unknown>;
|
|
77
|
+
requestedAt: string;
|
|
78
|
+
expiresAt?: string;
|
|
79
|
+
metadata?: Record<string, unknown>;
|
|
80
|
+
}
|
|
81
|
+
export type RiskLevel = 'low' | 'medium' | 'high' | 'critical';
|
|
82
|
+
export type Urgency = 'queued' | 'immediate';
|
|
83
|
+
export interface ActionRequestSubmission {
|
|
84
|
+
type: string;
|
|
85
|
+
title: string;
|
|
86
|
+
description: string;
|
|
87
|
+
riskLevel: RiskLevel;
|
|
88
|
+
payload: Record<string, unknown>;
|
|
89
|
+
metadata?: Record<string, unknown>;
|
|
90
|
+
}
|
|
91
|
+
export interface ActionDecision {
|
|
92
|
+
requestId: string;
|
|
93
|
+
decision: 'approved' | 'denied';
|
|
94
|
+
reason?: string;
|
|
95
|
+
decidedBy: string;
|
|
96
|
+
decidedAt: string;
|
|
97
|
+
}
|
|
98
|
+
export interface AgentConfig {
|
|
99
|
+
id: string;
|
|
100
|
+
key: string;
|
|
101
|
+
value: unknown;
|
|
102
|
+
updatedAt: string;
|
|
103
|
+
}
|
|
104
|
+
export type InboundMessage = TaskAssignedMessage | DecisionRequiredMessage | DecisionResultMessage | ConfigUpdatedMessage | PingMessage | ErrorMessage | AcknowledgeMessage;
|
|
105
|
+
export interface TaskAssignedMessage {
|
|
106
|
+
type: 'task:assigned';
|
|
107
|
+
payload: Task;
|
|
108
|
+
messageId: string;
|
|
109
|
+
}
|
|
110
|
+
export interface DecisionRequiredMessage {
|
|
111
|
+
type: 'decision:required';
|
|
112
|
+
payload: ActionRequest;
|
|
113
|
+
messageId: string;
|
|
114
|
+
}
|
|
115
|
+
export interface DecisionResultMessage {
|
|
116
|
+
type: 'decision:result';
|
|
117
|
+
payload: ActionDecision;
|
|
118
|
+
messageId: string;
|
|
119
|
+
}
|
|
120
|
+
export interface ConfigUpdatedMessage {
|
|
121
|
+
type: 'config:updated';
|
|
122
|
+
payload: AgentConfig;
|
|
123
|
+
messageId: string;
|
|
124
|
+
}
|
|
125
|
+
export interface PingMessage {
|
|
126
|
+
type: 'ping';
|
|
127
|
+
timestamp: number;
|
|
128
|
+
}
|
|
129
|
+
export interface ErrorMessage {
|
|
130
|
+
type: 'error';
|
|
131
|
+
code: string;
|
|
132
|
+
message: string;
|
|
133
|
+
details?: Record<string, unknown>;
|
|
134
|
+
}
|
|
135
|
+
export interface AcknowledgeMessage {
|
|
136
|
+
type: 'ack';
|
|
137
|
+
messageId: string;
|
|
138
|
+
success: boolean;
|
|
139
|
+
}
|
|
140
|
+
export type OutboundMessage = StatusUpdateMessage | ActionRequestMessage | TaskCompletedMessage | TaskProgressMessage | HeartbeatMessage | PongMessage | RegisterMessage;
|
|
141
|
+
export interface StatusUpdateMessage {
|
|
142
|
+
type: 'status:update';
|
|
143
|
+
payload: {
|
|
144
|
+
status: AgentStatus;
|
|
145
|
+
progress?: number;
|
|
146
|
+
message?: string;
|
|
147
|
+
taskId?: string;
|
|
148
|
+
};
|
|
149
|
+
messageId: string;
|
|
150
|
+
}
|
|
151
|
+
export interface ActionRequestMessage {
|
|
152
|
+
type: 'action:request';
|
|
153
|
+
payload: ActionRequestSubmission;
|
|
154
|
+
messageId: string;
|
|
155
|
+
}
|
|
156
|
+
export interface TaskCompletedMessage {
|
|
157
|
+
type: 'task:completed';
|
|
158
|
+
payload: TaskResult;
|
|
159
|
+
messageId: string;
|
|
160
|
+
}
|
|
161
|
+
export interface TaskProgressMessage {
|
|
162
|
+
type: 'task:progress';
|
|
163
|
+
payload: TaskProgress;
|
|
164
|
+
messageId: string;
|
|
165
|
+
}
|
|
166
|
+
export interface HeartbeatMessage {
|
|
167
|
+
type: 'heartbeat';
|
|
168
|
+
payload: {
|
|
169
|
+
timestamp: number;
|
|
170
|
+
status: AgentStatus;
|
|
171
|
+
metrics?: AgentMetrics;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
export interface PongMessage {
|
|
175
|
+
type: 'pong';
|
|
176
|
+
timestamp: number;
|
|
177
|
+
}
|
|
178
|
+
export interface RegisterMessage {
|
|
179
|
+
type: 'register';
|
|
180
|
+
payload: {
|
|
181
|
+
apiKey: string;
|
|
182
|
+
capabilities: AgentCapability[];
|
|
183
|
+
skills: string[];
|
|
184
|
+
metadata?: Record<string, unknown>;
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
export interface AgentMetrics {
|
|
188
|
+
cpuUsage?: number;
|
|
189
|
+
memoryUsage?: number;
|
|
190
|
+
taskQueue?: number;
|
|
191
|
+
activeTasks?: number;
|
|
192
|
+
uptime?: number;
|
|
193
|
+
customMetrics?: Record<string, number>;
|
|
194
|
+
}
|
|
195
|
+
export interface AgentEvents {
|
|
196
|
+
'connected': () => void;
|
|
197
|
+
'disconnected': (reason: string) => void;
|
|
198
|
+
'reconnecting': (attempt: number, maxAttempts: number) => void;
|
|
199
|
+
'reconnected': () => void;
|
|
200
|
+
'error': (error: Error) => void;
|
|
201
|
+
'task:assigned': (task: Task) => void;
|
|
202
|
+
'task:completed': (result: TaskResult) => void;
|
|
203
|
+
'decision:required': (request: ActionRequest) => void;
|
|
204
|
+
'decision:result': (decision: ActionDecision) => void;
|
|
205
|
+
'config:updated': (config: AgentConfig) => void;
|
|
206
|
+
'status:changed': (oldStatus: AgentStatus, newStatus: AgentStatus) => void;
|
|
207
|
+
'message': (message: InboundMessage) => void;
|
|
208
|
+
'message:sent': (message: OutboundMessage) => void;
|
|
209
|
+
}
|
|
210
|
+
export interface RegistrationResponse {
|
|
211
|
+
success: boolean;
|
|
212
|
+
agentId?: string;
|
|
213
|
+
structuredId?: string;
|
|
214
|
+
error?: string;
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,WAAW,iBAAiB;IAC9B,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,YAAY,CAAC,EAAE,eAAe,EAAE,CAAC;IACjC,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS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,CAAC;CAC1C;AAMD,MAAM,WAAW,WAAW;IAExB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAGhC,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC,gBAAgB,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAG/C,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IACtD,iBAAiB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;IAGtD,gBAAgB,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAGhD,gBAAgB,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,KAAK,IAAI,CAAC;IAG3E,SAAS,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;CACtD;AAMD,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vorionsys/agent-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TypeScript SDK for connecting AI agents to Aurais Mission Control",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"dev": "tsc --watch",
|
|
21
|
+
"test": "vitest run --passWithNoTests",
|
|
22
|
+
"test:watch": "vitest",
|
|
23
|
+
"typecheck": "tsc --noEmit",
|
|
24
|
+
"clean": "rm -rf dist"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"aurais",
|
|
28
|
+
"vorion",
|
|
29
|
+
"ai-agent",
|
|
30
|
+
"mission-control",
|
|
31
|
+
"websocket",
|
|
32
|
+
"sdk",
|
|
33
|
+
"governance"
|
|
34
|
+
],
|
|
35
|
+
"author": "Vorion <team@vorion.org>",
|
|
36
|
+
"license": "Apache-2.0",
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/vorionsys/vorion/issues"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://vorion.org",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/vorionsys/vorion.git",
|
|
47
|
+
"directory": "packages/agent-sdk"
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=18.0.0"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"eventemitter3": "^5.0.1",
|
|
54
|
+
"ws": "^8.18.0"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/node": "^22.10.5",
|
|
58
|
+
"@types/ws": "^8.5.0",
|
|
59
|
+
"typescript": "^5.7.2",
|
|
60
|
+
"vitest": "^4.0.18"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"typescript": ">=5.0.0"
|
|
64
|
+
},
|
|
65
|
+
"peerDependenciesMeta": {
|
|
66
|
+
"typescript": {
|
|
67
|
+
"optional": true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|