@aexhq/sdk 0.70.0 → 0.72.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 +21 -0
- package/README.md +22 -3
- package/package.json +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aex contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -10,18 +10,37 @@ console.log(await aex.account.get());
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
`Aex` extends the pinned Brain client. Its sessions, registration, Events, Components and
|
|
13
|
-
extension builders are Brain's implementations.
|
|
14
|
-
|
|
13
|
+
extension builders are Brain's implementations. SDK 0.72 uses Brain SDK 0.21 and official
|
|
14
|
+
extension packages 5.x. Rebuild custom Wasm Components against Brain 0.20's WIT; older
|
|
15
|
+
Components and session configurations are not migrated automatically. See https://aex.dev/docs
|
|
16
|
+
for a complete session example.
|
|
15
17
|
|
|
16
18
|
Place uploaded Wasm Agentloops and Tools in `brainEnv` for hosted execution. `hostEnv`
|
|
17
19
|
executes application functions in your process. Native hosted Components receive no server
|
|
18
20
|
secrets, filesystem or network grants. Customer-selected HTTP Environments are not enabled
|
|
19
|
-
on the initial deployment.
|
|
21
|
+
on the initial deployment. Hosted `brainEnv` configuration must be empty; resource access
|
|
22
|
+
is configured by each Environment, not declared through extension `needs`. Prepare dependencies
|
|
23
|
+
for `hostEnv` Tools in your application before registering them. Supply your model key per session.
|
|
20
24
|
|
|
21
25
|
`account.get()` and `account.usage()` accept a workload API key. `keys` management requires
|
|
22
26
|
an authenticated account session and is normally performed in the dashboard. API keys do
|
|
23
27
|
not grant authority to create more credentials. New key secrets are returned once.
|
|
24
28
|
|
|
29
|
+
## Structured output
|
|
30
|
+
|
|
31
|
+
Pass `output: { type: z.object({ name: z.string() }), maxRetries: 2 }` in the second
|
|
32
|
+
argument to `session.send`. The SDK prompts for JSON, validates with Zod locally,
|
|
33
|
+
and returns the inferred parsed value. Two additional correction turns are allowed
|
|
34
|
+
by default; set zero to disable retries. Ordinary sends keep returning session state.
|
|
35
|
+
|
|
36
|
+
See the [executable example](https://github.com/aexhq/aex/blob/main/examples/structured-output.mjs)
|
|
37
|
+
and [full contract](https://aex.dev/brain/docs/guides/structured-output).
|
|
38
|
+
Exhaustion throws `StructuredOutputError` with `attempts`, `lastOutput`, and `issues`.
|
|
39
|
+
Retries run in your client and are ordinary turns with the session's existing tools.
|
|
40
|
+
Use exclusive ownership of sends during the operation. An optional top-level
|
|
41
|
+
`signal` cancels the active turn and stops corrections. Raw attempts remain visible
|
|
42
|
+
in history and streams; validation does not change the Agentloop or provider format.
|
|
43
|
+
|
|
25
44
|
## Account management
|
|
26
45
|
|
|
27
46
|
Use an account session obtained through browser login for account management. Workload
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aexhq/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.0",
|
|
4
4
|
"description": "Aex accounts and hosted sessions using the Brain SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"tag": "next"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aexhq/brain": "0.
|
|
31
|
+
"@aexhq/brain": "0.21.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"gen": "node ../../tools/sdk-contracts.mjs",
|