@aexhq/sdk 0.37.3 → 0.38.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/README.md +8 -8
- package/dist/_contracts/event-stream-client.d.ts +11 -0
- package/dist/_contracts/event-stream-client.js +45 -5
- package/dist/_contracts/http.d.ts +1 -1
- package/dist/_contracts/http.js +85 -13
- package/dist/_contracts/operations.d.ts +1 -1
- package/dist/_contracts/operations.js +43 -4
- package/dist/_contracts/provider-support.d.ts +2 -2
- package/dist/_contracts/provider-support.js +1 -1
- package/dist/_contracts/run-retention.d.ts +1 -1
- package/dist/_contracts/run-unit.d.ts +1 -1
- package/dist/_contracts/run-unit.js +12 -9
- package/dist/_contracts/runtime-types.d.ts +21 -9
- package/dist/_contracts/sdk-errors.d.ts +44 -2
- package/dist/_contracts/sdk-errors.js +104 -2
- package/dist/_contracts/sdk-secrets.js +18 -1
- package/dist/_contracts/side-effect-audit.d.ts +4 -4
- package/dist/_contracts/side-effect-audit.js +6 -6
- package/dist/_contracts/submission.d.ts +1 -1
- package/dist/asset-upload.js +8 -41
- package/dist/asset-upload.js.map +1 -1
- package/dist/cli.mjs +327 -87
- package/dist/cli.mjs.sha256 +1 -1
- package/dist/client.d.ts +20 -6
- package/dist/client.js +148 -18
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/retry.js +66 -6
- package/dist/retry.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/authentication.md +16 -7
- package/docs/billing.md +3 -3
- package/docs/concepts/composition.md +1 -1
- package/docs/concepts/providers-and-runtimes.md +1 -1
- package/docs/concepts/runs.md +1 -1
- package/docs/concepts/subagents.md +6 -3
- package/docs/credentials.md +7 -9
- package/docs/defaults.md +3 -3
- package/docs/errors.md +8 -4
- package/docs/events.md +5 -5
- package/docs/limits-and-quotas.md +3 -3
- package/docs/networking.md +1 -1
- package/docs/outputs.md +2 -2
- package/docs/provider-runtime-capabilities.md +3 -3
- package/docs/public-surface.json +2 -2
- package/docs/quickstart.md +4 -4
- package/docs/retries.md +1 -1
- package/docs/run-config.md +1 -1
- package/docs/run-record.md +1 -1
- package/docs/secrets.md +4 -4
- package/docs/skills.md +1 -1
- package/docs/testing.md +1 -1
- package/docs/vision-skills.md +1 -1
- package/docs/webhooks.md +4 -4
- package/examples/feature-tour.ts +3 -3
- package/package.json +2 -2
package/docs/secrets.md
CHANGED
|
@@ -8,7 +8,7 @@ aex supports BYOK provider keys, per-run credentials, and reusable workspace
|
|
|
8
8
|
secrets. Secret values are excluded from the idempotency fingerprint and do not
|
|
9
9
|
belong in run config.
|
|
10
10
|
|
|
11
|
-
Runnable examples need both `
|
|
11
|
+
Runnable examples need both `AEX_API_KEY` for aex and the matching BYOK
|
|
12
12
|
provider key, such as `ANTHROPIC_API_KEY` for Claude.
|
|
13
13
|
|
|
14
14
|
## Use A Provider Key For One Run
|
|
@@ -18,7 +18,7 @@ provider key, such as `ANTHROPIC_API_KEY` for Claude.
|
|
|
18
18
|
```ts
|
|
19
19
|
import { Aex, Models } from "@aexhq/sdk";
|
|
20
20
|
|
|
21
|
-
const aex = new Aex({
|
|
21
|
+
const aex = new Aex({ apiKey: process.env.AEX_API_KEY! });
|
|
22
22
|
|
|
23
23
|
await aex.run({
|
|
24
24
|
model: Models.CLAUDE_HAIKU_4_5,
|
|
@@ -31,7 +31,7 @@ await aex.run({
|
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
aex run \
|
|
34
|
-
--api-
|
|
34
|
+
--api-key "$AEX_API_KEY" \
|
|
35
35
|
--anthropic-api-key "$ANTHROPIC_API_KEY" \
|
|
36
36
|
--model claude-haiku-4-5 \
|
|
37
37
|
--prompt "Write a short report and save it as a file."
|
|
@@ -45,7 +45,7 @@ want to persist it as a named workspace secret for later runs.
|
|
|
45
45
|
```ts
|
|
46
46
|
import { Aex, Models, Providers, Secret } from "@aexhq/sdk";
|
|
47
47
|
|
|
48
|
-
const aex = new Aex({
|
|
48
|
+
const aex = new Aex({ apiKey: process.env.AEX_API_KEY! });
|
|
49
49
|
|
|
50
50
|
const githubToken = await Secret.value(process.env.GITHUB_TOKEN!).upload(aex, {
|
|
51
51
|
name: "github-token"
|
package/docs/skills.md
CHANGED
package/docs/testing.md
CHANGED
|
@@ -31,5 +31,5 @@ that artifact. CI or release validation can pin an explicit artifact with
|
|
|
31
31
|
exactly one of `AEX_USER_TEST_TARBALL` or `AEX_USER_TEST_VERSION`.
|
|
32
32
|
|
|
33
33
|
Live user tests run against a hosted aex API and fail loudly when required env
|
|
34
|
-
is missing: `AEX_API_URL`, `
|
|
34
|
+
is missing: `AEX_API_URL`, `AEX_API_KEY`, `ANTHROPIC_API_KEY`, and
|
|
35
35
|
`DEEPSEEK_API_KEY`.
|
package/docs/vision-skills.md
CHANGED
|
@@ -18,7 +18,7 @@ per-noun "does the frame depict X?" verdict.
|
|
|
18
18
|
```ts
|
|
19
19
|
import { Aex, Models, Secret, Tools } from "@aexhq/sdk";
|
|
20
20
|
|
|
21
|
-
const aex = new Aex({
|
|
21
|
+
const aex = new Aex({ apiKey: process.env.AEX_API_KEY! });
|
|
22
22
|
|
|
23
23
|
const result = await aex.run({
|
|
24
24
|
model: Models.CLAUDE_HAIKU_4_5,
|
package/docs/webhooks.md
CHANGED
|
@@ -17,7 +17,7 @@ pass a callback URL with the submission, and the platform delivers exactly one
|
|
|
17
17
|
```ts
|
|
18
18
|
import { Aex, Models } from "@aexhq/sdk";
|
|
19
19
|
|
|
20
|
-
const aex = new Aex(process.env.
|
|
20
|
+
const aex = new Aex(process.env.AEX_API_KEY!);
|
|
21
21
|
|
|
22
22
|
const session = await aex.openSession({
|
|
23
23
|
model: Models.CLAUDE_HAIKU_4_5,
|
|
@@ -28,7 +28,7 @@ const session = await aex.openSession({
|
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
aex run \
|
|
31
|
-
--api-
|
|
31
|
+
--api-key "$AEX_API_KEY" \
|
|
32
32
|
--anthropic-api-key "$ANTHROPIC_API_KEY" \
|
|
33
33
|
--model claude-haiku-4-5 \
|
|
34
34
|
--prompt "Write the report." \
|
|
@@ -80,7 +80,7 @@ The signing key is a per-workspace secret. Reveal it (it is created on first
|
|
|
80
80
|
use) with either surface:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
aex webhooks secret --api-
|
|
83
|
+
aex webhooks secret --api-key "$AEX_API_KEY" # prints whsec_...
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
```ts
|
|
@@ -120,7 +120,7 @@ await session.webhooks().redeliver(deliveries[0]!.id);
|
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
|
-
aex deliveries <session-id> --api-
|
|
123
|
+
aex deliveries <session-id> --api-key "$AEX_API_KEY"
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
Redelivery re-sends the frozen payload with the **same** `webhook-id`, so a
|
package/examples/feature-tour.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Run from the repository root after building the workspace package:
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* AEX_API_KEY=... DEEPSEEK_API_KEY=... bun packages/sdk/examples/feature-tour.ts
|
|
10
10
|
*
|
|
11
11
|
* Optional:
|
|
12
12
|
*
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
process.on("uncaughtException", handleFatal);
|
|
35
35
|
process.on("unhandledRejection", handleFatal);
|
|
36
36
|
|
|
37
|
-
const
|
|
37
|
+
const apiKey = required("AEX_API_KEY");
|
|
38
38
|
const deepseekKey = required("DEEPSEEK_API_KEY");
|
|
39
39
|
const apiUrl = process.env.AEX_API_URL;
|
|
40
40
|
const demoMcpUrl = process.env.AEX_DEMO_MCP_URL;
|
|
@@ -44,7 +44,7 @@ const downloadPath = process.env.AEX_FEATURE_TOUR_DOWNLOAD;
|
|
|
44
44
|
const textEncoder = new TextEncoder();
|
|
45
45
|
|
|
46
46
|
const aex = new Aex({
|
|
47
|
-
|
|
47
|
+
apiKey,
|
|
48
48
|
...(apiUrl ? { baseUrl: apiUrl } : {}),
|
|
49
49
|
retry: {
|
|
50
50
|
maxAttempts: 4,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aexhq/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "TypeScript SDK for running autonomous agent sessions across providers (Anthropic, OpenAI, DeepSeek, Gemini, Mistral) behind one interface.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"test:unit:unlocked": "vitest run test/unit",
|
|
36
36
|
"test:security": "bun ../../scripts/with-generated-dist-lock.mjs bun run test:security:unlocked",
|
|
37
37
|
"test:security:unlocked": "vitest run test/security",
|
|
38
|
-
"test:property": "vitest run
|
|
38
|
+
"test:property": "vitest run property",
|
|
39
39
|
"test:coverage": "vitest run --coverage test/unit",
|
|
40
40
|
"prepack": "bun run build",
|
|
41
41
|
"pack:dry-run": "bun ../../scripts/with-generated-dist-lock.mjs bun pm pack --dry-run --ignore-scripts"
|