@aexhq/sdk 0.74.0 → 0.75.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 +16 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,12 +10,24 @@ 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. SDK 0.
|
|
14
|
-
6.
|
|
13
|
+
extension builders are Brain's implementations. SDK 0.75 uses Brain SDK 0.24 and Pi/Codex/Tools
|
|
14
|
+
6.1. Images and PDFs use HTTPS URLs; Aex owns attachment publication and expiry. Deploy the matching
|
|
15
15
|
runtime and extensions together. Retained sessions require a compatibility check before upgrading.
|
|
16
16
|
See https://aex.dev/docs
|
|
17
17
|
for a complete session example.
|
|
18
18
|
|
|
19
|
+
Put client use, including session creation, inside `try/finally` and `await aex.close()` in
|
|
20
|
+
`finally`. The client retains one shared host connection until close, even if creation fails.
|
|
21
|
+
Close releases client I/O and local handlers while retaining stored sessions. Use
|
|
22
|
+
`session.interrupt()` to stop the current turn, `session.end()` to finish the conversation,
|
|
23
|
+
and `session.delete()` to remove an ended or failed session. `interrupt()` replaces SDK
|
|
24
|
+
`cancel()`; the HTTP route is unchanged. See the [session example](../../examples/session.mjs).
|
|
25
|
+
|
|
26
|
+
Tool schemas describe accepted inputs. Defaulted arguments are optional; Zod applies defaults
|
|
27
|
+
and transforms before the handler. Ordinary objects strip extra properties and strict objects
|
|
28
|
+
reject them. Pi dispatches in parallel; coordinate shared resources in their owning Tool or
|
|
29
|
+
Environment. The official loops explain unanswered calls after interruption without replaying them.
|
|
30
|
+
|
|
19
31
|
Host Tools return ordinary successful output or a Brain `Outcome` directly. Structured errors retain
|
|
20
32
|
code, message, retryable and details. The top-level statuses `ok`, `error`, `timeout`, `cancelled`
|
|
21
33
|
and `unknown` declare outcomes; malformed envelopes fail validation, and only successful values
|
|
@@ -44,7 +56,8 @@ not grant authority to create more credentials. New key secrets are returned onc
|
|
|
44
56
|
Pass `output: { type: z.object({ name: z.string() }), maxRetries: 2 }` in the second
|
|
45
57
|
argument to `session.send`. The SDK prompts for JSON, validates with Zod locally,
|
|
46
58
|
and returns the inferred parsed value. Two additional correction turns are allowed
|
|
47
|
-
by default; set zero to disable retries. Ordinary sends keep returning session state
|
|
59
|
+
by default; set zero to disable retries. Ordinary sends keep returning session state;
|
|
60
|
+
`idle` alone does not mean the turn succeeded. No terminal Tool is needed for structured output.
|
|
48
61
|
|
|
49
62
|
See the [executable example](https://github.com/aexhq/aex/blob/main/examples/structured-output.mjs)
|
|
50
63
|
and [full contract](https://aex.dev/brain/docs/guides/structured-output).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aexhq/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.1",
|
|
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.24.2"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"gen": "node ../../tools/sdk-contracts.mjs",
|