@aexhq/sdk 0.54.0 → 0.54.1
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 +51 -51
- package/dist/client/aex.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @aexhq/sdk
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The TypeScript SDK for Aex, with no dependencies of its own.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install @aexhq/sdk
|
|
@@ -46,16 +46,16 @@ await aex.sessions.sessionTerminate({
|
|
|
46
46
|
});
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
`providerApiKey
|
|
51
|
-
never
|
|
49
|
+
Creating a session takes the exact provider and model you want plus your own
|
|
50
|
+
`providerApiKey`, which is write only. That key is encrypted for the session,
|
|
51
|
+
never returned, and never shared with another one. You can use OpenAI,
|
|
52
52
|
Anthropic, DeepSeek, xAI, Meta, Moonshot AI, and Alibaba.
|
|
53
53
|
|
|
54
|
-
##
|
|
54
|
+
## The client
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
both
|
|
56
|
+
Session and file calls use a workspace `apiKey`. Account, API key, and billing
|
|
57
|
+
calls use a `dashboardSession` from signing in with GitHub. One client can hold
|
|
58
|
+
both, and it only ever sends each one to the service it belongs to.
|
|
59
59
|
|
|
60
60
|
```ts
|
|
61
61
|
const aex = new Aex({
|
|
@@ -64,67 +64,67 @@ const aex = new Aex({
|
|
|
64
64
|
});
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
`sessions`, and `uploads`. `aex.workspaceFiles` adds
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
The namespaces are `apiKeys`, `auth`, `billing`, `bootstrap`, `registry`,
|
|
68
|
+
`sessions`, and `uploads`. `aex.workspaceFiles` adds friendlier helpers for
|
|
69
|
+
working with files. `ROUTES` and `aex.execute(...)` give you the same generated
|
|
70
|
+
contract directly, so there is no second route table to keep in step.
|
|
71
71
|
|
|
72
|
-
## Sessions and
|
|
72
|
+
## Sessions and machines
|
|
73
73
|
|
|
74
|
-
A session is the only
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
A session is the only thing you create. It holds the conversation, the work in
|
|
75
|
+
flight, the tools it has used, its helper agents, its mounted files, its
|
|
76
|
+
machine, and its telemetry.
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
Every session gets a Linux machine unless you turn it off. It starts warming up
|
|
79
|
+
as soon as the session is created and goes to sleep when nothing is running.
|
|
80
|
+
The next tool call waits for it and wakes it if needed. Set `sandbox.enabled`
|
|
81
|
+
to `false` to get no machine at all; tools that need one then return a clear
|
|
82
|
+
error the model can handle.
|
|
83
83
|
|
|
84
|
-
Cancel
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
Cancel ends the current work and leaves the session idle. Terminate destroys
|
|
85
|
+
the machine but keeps the messages and telemetry. Delete removes everything the
|
|
86
|
+
session owns; files you uploaded to the workspace survive.
|
|
87
87
|
|
|
88
88
|
## Files, tools, and MCP
|
|
89
89
|
|
|
90
|
-
`aex.workspaceFiles`
|
|
91
|
-
`delete`. Each
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
`aex.workspaceFiles` gives you `put`, `upload`, `get`, `list`, `download`, and
|
|
91
|
+
`delete`. Each name has one current value, which you can set from text or
|
|
92
|
+
bytes, an HTTPS link, or a direct upload. Creating a session pins the names and
|
|
93
|
+
paths it uses, so replacing a file later cannot change a session already
|
|
94
|
+
running.
|
|
95
95
|
|
|
96
|
-
Messages are text
|
|
97
|
-
|
|
96
|
+
Messages are text only. Upload images, PDFs, video, archives, or source, then
|
|
97
|
+
tell the model which path under `/workspace` to look at.
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
`storage.persist`, and
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
Out of the box the model gets Bash, file read, edit, and write, MCP,
|
|
100
|
+
`storage.persist`, and tools to start, wait for, and stop helper agents. Attach
|
|
101
|
+
MCP servers per session, either over HTTP or as a process on the machine. A
|
|
102
|
+
large tool result leaves a short preview in the transcript and keeps the full
|
|
103
|
+
bytes on the machine, and `storage.persist` saves a chosen file back to your
|
|
104
|
+
workspace. A session can start at most 12 helper agents, nested no more than
|
|
105
|
+
three deep.
|
|
105
106
|
|
|
106
|
-
`sessionMessageSend`
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
`sessionMessageSend` takes an optional `responseFormat` for JSON Schema output.
|
|
108
|
+
Aex allows it only when the provider and model support it natively, and will
|
|
109
|
+
not pass prompting off as the real thing.
|
|
109
110
|
|
|
110
111
|
## Streaming, telemetry, and billing
|
|
111
112
|
|
|
112
|
-
`sessionMessagesStream`
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
`sessionMessagesStream` sends preview, gap, committed, reconcile, and heartbeat
|
|
114
|
+
frames. Committed messages keep text, tool calls, and tool results in the same
|
|
115
|
+
shape whichever provider you use.
|
|
115
116
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
require `apiKey`.
|
|
117
|
+
Telemetry comes as a live stream, a replay, and a verified compressed download.
|
|
118
|
+
The billing methods cover your prepaid balance, saved card details, hosted card
|
|
119
|
+
setup and top up, a permanent record of transactions, and usage. Billing needs
|
|
120
|
+
`dashboardSession`; sessions and files need `apiKey`.
|
|
121
121
|
|
|
122
|
-
See the [
|
|
122
|
+
See the [Aex documentation](https://aex.dev/docs) for fuller examples.
|
|
123
123
|
|
|
124
124
|
## Status
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
on the hosted service for production workloads yet.
|
|
126
|
+
Aex is in active prelaunch development. Expect breaking changes, and do not
|
|
127
|
+
rely on the hosted service for production workloads yet.
|
|
128
128
|
|
|
129
129
|
## License
|
|
130
130
|
|
package/dist/client/aex.js
CHANGED
|
@@ -5,7 +5,7 @@ import { CONTRACT_DIGEST, ROUTES } from "../generated/routes.js";
|
|
|
5
5
|
import { GeneratedResources } from "../generated/resources.js";
|
|
6
6
|
import { WorkspaceFiles } from "../files/workspace-files.js";
|
|
7
7
|
import { apiErrorFromResponse } from "../transport/errors.js";
|
|
8
|
-
const SDK_VERSION = "0.54.
|
|
8
|
+
const SDK_VERSION = "0.54.1";
|
|
9
9
|
/**
|
|
10
10
|
* The client.
|
|
11
11
|
*
|