@aexhq/sdk 0.30.0 → 0.32.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 +23 -9
- package/dist/_contracts/connection-ticket.d.ts +1 -1
- package/dist/_contracts/connection-ticket.js +1 -1
- package/dist/_contracts/event-envelope.d.ts +5 -8
- package/dist/_contracts/event-envelope.js +5 -6
- package/dist/_contracts/event-stream-client.d.ts +1 -1
- package/dist/_contracts/http.js +1 -1
- package/dist/_contracts/models.d.ts +0 -76
- package/dist/_contracts/models.js +0 -20
- package/dist/_contracts/operations.d.ts +2 -64
- package/dist/_contracts/operations.js +9 -152
- package/dist/_contracts/provider-support.d.ts +48 -138
- package/dist/_contracts/provider-support.js +10 -41
- package/dist/_contracts/proxy-protocol.d.ts +7 -7
- package/dist/_contracts/proxy-protocol.js +8 -8
- package/dist/_contracts/run-config.d.ts +7 -20
- package/dist/_contracts/run-config.js +8 -46
- package/dist/_contracts/run-cost.d.ts +1 -5
- package/dist/_contracts/run-cost.js +0 -8
- package/dist/_contracts/run-custody.d.ts +4 -6
- package/dist/_contracts/run-custody.js +0 -8
- package/dist/_contracts/run-unit.d.ts +1 -1
- package/dist/_contracts/run-unit.js +6 -6
- package/dist/_contracts/runner-event.d.ts +1 -1
- package/dist/_contracts/runner-event.js +1 -1
- package/dist/_contracts/runtime-manifest.d.ts +13 -26
- package/dist/_contracts/runtime-manifest.js +6 -35
- package/dist/_contracts/runtime-types.d.ts +1 -3
- package/dist/_contracts/sdk-secrets.js +4 -4
- package/dist/_contracts/side-effect-audit.d.ts +2 -4
- package/dist/_contracts/side-effect-audit.js +2 -4
- package/dist/_contracts/status.d.ts +1 -1
- package/dist/_contracts/status.js +1 -1
- package/dist/_contracts/submission.d.ts +5 -126
- package/dist/_contracts/submission.js +10 -182
- package/dist/_contracts/webhook-verify.d.ts +1 -1
- package/dist/_contracts/webhook-verify.js +1 -1
- package/dist/asset-upload.d.ts +4 -10
- package/dist/asset-upload.js +4 -47
- package/dist/asset-upload.js.map +1 -1
- package/dist/cli.mjs +27 -231
- package/dist/cli.mjs.sha256 +1 -1
- package/dist/client.d.ts +10 -107
- package/dist/client.js +23 -132
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/skill.d.ts +1 -1
- package/dist/skill.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/cleanup.md +4 -4
- package/docs/concepts/agent-tools.md +2 -2
- package/docs/concepts/composition.md +1 -1
- package/docs/concepts/providers-and-runtimes.md +2 -4
- package/docs/concepts/runs.md +3 -6
- package/docs/credentials.md +5 -8
- package/docs/defaults.md +22 -22
- package/docs/limits-and-quotas.md +40 -40
- package/docs/limits.md +1 -1
- package/docs/networking.md +2 -2
- package/docs/outputs.md +3 -3
- package/docs/provider-runtime-capabilities.md +37 -65
- package/docs/public-surface.json +4 -5
- package/docs/quickstart.md +19 -6
- package/docs/run-config.md +5 -6
- package/docs/secrets.md +9 -7
- package/docs/skills.md +8 -16
- package/docs/vision-skills.md +3 -3
- package/package.json +2 -2
|
@@ -4,11 +4,11 @@ title: Provider runtime capabilities
|
|
|
4
4
|
|
|
5
5
|
# Provider runtime capabilities
|
|
6
6
|
|
|
7
|
-
Generated from `packages/contracts/src/provider-support.ts` and `packages/contracts/src/models.ts
|
|
7
|
+
Generated from `packages/contracts/src/provider-support.ts` and `packages/contracts/src/models.ts`.
|
|
8
8
|
|
|
9
9
|
Regenerate with `bun run capabilities:generate`; check with `bun run capabilities:check`.
|
|
10
10
|
|
|
11
|
-
Providers: [Anthropic](#anthropic) (`anthropic`), [DeepSeek](#deepseek) (`deepseek`), [OpenAI](#openai) (`openai`), [Gemini](#gemini) (`gemini`), [Mistral](#mistral) (`mistral`), [OpenRouter](#openrouter) (`openrouter`), [Doubao](#doubao) (`doubao`), [Doubao (China)](#doubao-cn) (`doubao-cn`).
|
|
11
|
+
Providers: [Anthropic](#anthropic) (`anthropic`), [DeepSeek](#deepseek) (`deepseek`), [OpenAI](#openai) (`openai`), [Gemini](#gemini) (`gemini`), [Mistral](#mistral) (`mistral`), [OpenRouter](#openrouter) (`openrouter`), [Doubao](#doubao) (`doubao`), [Doubao (China)](#doubao-cn) (`doubao-cn`).
|
|
12
12
|
|
|
13
13
|
All new submissions run on the managed runtime. Public support is expressed as supported providers and supported model ids.
|
|
14
14
|
|
|
@@ -16,56 +16,36 @@ All new submissions run on the managed runtime. Public support is expressed as s
|
|
|
16
16
|
|
|
17
17
|
| Provider | Selector | Supported models | Docs | Evidence |
|
|
18
18
|
| --- | --- | --- | --- | --- |
|
|
19
|
-
| [Anthropic](#anthropic) | `anthropic` | `claude-haiku-4-5`, `claude-3-5-haiku-latest`, `claude-3-5-sonnet-latest`, `claude-sonnet-4-6` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
20
|
-
| [DeepSeek](#deepseek) | `deepseek` | `deepseek-v4-flash`, `deepseek-v4-pro
|
|
21
|
-
| [OpenAI](#openai) | `openai` | `gpt-4.1`, `gpt-4o-mini` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
22
|
-
| [Gemini](#gemini) | `gemini` | `gemini-2.0-flash`, `gemini-2.5-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
23
|
-
| [Mistral](#mistral) | `mistral` | `mistral-large-latest`, `mistral-small-latest` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
24
|
-
| [OpenRouter](#openrouter) | `openrouter` | `gpt-4o-mini`, `gpt-4o`, `gemini-2.0-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
25
|
-
| [Doubao](#doubao) | `doubao` | `doubao-seed-pro`, `doubao-seed-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
26
|
-
| [Doubao (China)](#doubao-cn) | `doubao-cn` | `doubao-seed-pro`, `doubao-seed-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
27
|
-
|
|
28
|
-
##
|
|
29
|
-
|
|
30
|
-
| Provider |
|
|
31
|
-
| --- | --- | --- |
|
|
32
|
-
| `anthropic` |
|
|
33
|
-
| `deepseek` |
|
|
34
|
-
| `openai` |
|
|
35
|
-
| `gemini` |
|
|
36
|
-
| `mistral` |
|
|
37
|
-
| `openrouter` |
|
|
38
|
-
| `doubao` |
|
|
39
|
-
| `doubao-cn` |
|
|
40
|
-
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
| --- | --- | --- | --- |
|
|
45
|
-
| `anthropic` | `managed` | submission parser + managed dispatch | [Installed-SDK Anthropic live user test](../../../apps/user-tests/test/live/live-sdk-anthropic-managed.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts) |
|
|
46
|
-
| `deepseek` | `managed` | submission parser + managed dispatch | [Installed-SDK DeepSeek live user test](../../../apps/user-tests/test/live/live-sdk-deepseek.test.ts); [Installed-SDK DeepSeek comprehensive live user matrix](../../../apps/user-tests/test/live/live-sdk-comprehensive.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts) |
|
|
47
|
-
| `openai` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
48
|
-
| `gemini` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
49
|
-
| `mistral` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
50
|
-
| `openrouter` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
51
|
-
| `doubao` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
52
|
-
| `doubao-cn` | `managed` | submission parser + managed dispatch | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Runtime support validator](../../contracts/test/runtime-support.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
53
|
-
|
|
54
|
-
## Validation errors
|
|
55
|
-
|
|
56
|
-
| Code | Docs anchor | Enforcement path | Evidence |
|
|
57
|
-
| --- | --- | --- | --- |
|
|
58
|
-
| `feature_runtime_mismatch` | [managed-unsupported-features](#managed-unsupported-features) | collectManagedUnsupportedFeatures + selectRuntime | [Submission parser and routing parity](../../contracts/test/submission.test.ts) |
|
|
59
|
-
|
|
60
|
-
### Managed unsupported features
|
|
61
|
-
|
|
62
|
-
Provider-hosted skill refs (a `kind:"provider"` skill ref) are rejected because new runs dispatch to the managed runtime. Supply skill bytes through `Skill.fromFiles`, `Skill.fromPath`, `Skill.fromUrl`, or `Skill.fromCatalog`; each path normalizes to an asset that the platform snapshots into durable run asset storage.
|
|
19
|
+
| [Anthropic](#anthropic) | `anthropic` | `claude-haiku-4-5`, `claude-3-5-haiku-latest`, `claude-3-5-sonnet-latest`, `claude-sonnet-4-6` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts); [Installed-SDK Anthropic live user test](../../../apps/user-tests/test/live/live-sdk-anthropic-managed.test.ts) |
|
|
20
|
+
| [DeepSeek](#deepseek) | `deepseek` | `deepseek-v4-flash`, `deepseek-v4-pro` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts); [Installed-SDK DeepSeek live user test](../../../apps/user-tests/test/live/live-sdk-deepseek.test.ts); [Installed-SDK DeepSeek comprehensive live user matrix](../../../apps/user-tests/test/live/live-sdk-comprehensive.test.ts) |
|
|
21
|
+
| [OpenAI](#openai) | `openai` | `gpt-4.1`, `gpt-4o-mini` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
22
|
+
| [Gemini](#gemini) | `gemini` | `gemini-2.0-flash`, `gemini-2.5-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
23
|
+
| [Mistral](#mistral) | `mistral` | `mistral-large-latest`, `mistral-small-latest` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
24
|
+
| [OpenRouter](#openrouter) | `openrouter` | `gpt-4o-mini`, `gpt-4o`, `gemini-2.0-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
25
|
+
| [Doubao](#doubao) | `doubao` | `doubao-seed-pro`, `doubao-seed-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
26
|
+
| [Doubao (China)](#doubao-cn) | `doubao-cn` | `doubao-seed-pro`, `doubao-seed-flash` | [Secrets](secrets.md); [Events](events.md) | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
27
|
+
|
|
28
|
+
## Managed evidence
|
|
29
|
+
|
|
30
|
+
| Provider | Enforcement path | Evidence |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| `anthropic` | submission parser + managed execution | [Installed-SDK Anthropic live user test](../../../apps/user-tests/test/live/live-sdk-anthropic-managed.test.ts) |
|
|
33
|
+
| `deepseek` | submission parser + managed execution | [Installed-SDK DeepSeek live user test](../../../apps/user-tests/test/live/live-sdk-deepseek.test.ts); [Installed-SDK DeepSeek comprehensive live user matrix](../../../apps/user-tests/test/live/live-sdk-comprehensive.test.ts) |
|
|
34
|
+
| `openai` | submission parser + managed execution | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
35
|
+
| `gemini` | submission parser + managed execution | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
36
|
+
| `mistral` | submission parser + managed execution | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
37
|
+
| `openrouter` | submission parser + managed execution | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
38
|
+
| `doubao` | submission parser + managed execution | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
39
|
+
| `doubao-cn` | submission parser + managed execution | [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts) |
|
|
40
|
+
|
|
41
|
+
## Skills
|
|
42
|
+
|
|
43
|
+
Only asset-backed skills are accepted on submissions. Supply skill bytes through `Skill.fromFiles`, `Skill.fromPath`, `Skill.fromUrl`, or `Skill.fromCatalog`; each path normalizes to an asset that the platform snapshots into durable run asset storage.
|
|
63
44
|
|
|
64
45
|
Notes:
|
|
65
46
|
|
|
66
47
|
- Supported models are the public SDK model ids accepted for each provider.
|
|
67
|
-
-
|
|
68
|
-
- `runtime: "native"` is not a runtime selector; the submission parser rejects it as an invalid enum value.
|
|
48
|
+
- Execution uses the managed path; there is no public runtime selector.
|
|
69
49
|
|
|
70
50
|
## Provider anchors
|
|
71
51
|
|
|
@@ -73,62 +53,54 @@ Notes:
|
|
|
73
53
|
|
|
74
54
|
- Wire provider: `anthropic`
|
|
75
55
|
- Supported models: `claude-haiku-4-5`, `claude-3-5-haiku-latest`, `claude-3-5-sonnet-latest`, `claude-sonnet-4-6`
|
|
76
|
-
- Auto route: `managed`
|
|
77
56
|
- Docs: [Secrets](secrets.md); [Events](events.md)
|
|
78
|
-
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
57
|
+
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts); [Installed-SDK Anthropic live user test](../../../apps/user-tests/test/live/live-sdk-anthropic-managed.test.ts)
|
|
79
58
|
|
|
80
59
|
### DeepSeek
|
|
81
60
|
|
|
82
61
|
- Wire provider: `deepseek`
|
|
83
|
-
- Supported models: `deepseek-v4-flash`, `deepseek-v4-pro
|
|
84
|
-
- Auto route: `managed`
|
|
62
|
+
- Supported models: `deepseek-v4-flash`, `deepseek-v4-pro`
|
|
85
63
|
- Docs: [Secrets](secrets.md); [Events](events.md)
|
|
86
|
-
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
64
|
+
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts); [Installed-SDK DeepSeek live user test](../../../apps/user-tests/test/live/live-sdk-deepseek.test.ts); [Installed-SDK DeepSeek comprehensive live user matrix](../../../apps/user-tests/test/live/live-sdk-comprehensive.test.ts)
|
|
87
65
|
|
|
88
66
|
### OpenAI
|
|
89
67
|
|
|
90
68
|
- Wire provider: `openai`
|
|
91
69
|
- Supported models: `gpt-4.1`, `gpt-4o-mini`
|
|
92
|
-
- Auto route: `managed`
|
|
93
70
|
- Docs: [Secrets](secrets.md); [Events](events.md)
|
|
94
|
-
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
71
|
+
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
|
|
95
72
|
|
|
96
73
|
### Gemini
|
|
97
74
|
|
|
98
75
|
- Wire provider: `gemini`
|
|
99
76
|
- Supported models: `gemini-2.0-flash`, `gemini-2.5-flash`
|
|
100
|
-
- Auto route: `managed`
|
|
101
77
|
- Docs: [Secrets](secrets.md); [Events](events.md)
|
|
102
|
-
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
78
|
+
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
|
|
103
79
|
|
|
104
80
|
### Mistral
|
|
105
81
|
|
|
106
82
|
- Wire provider: `mistral`
|
|
107
83
|
- Supported models: `mistral-large-latest`, `mistral-small-latest`
|
|
108
|
-
- Auto route: `managed`
|
|
109
84
|
- Docs: [Secrets](secrets.md); [Events](events.md)
|
|
110
|
-
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
85
|
+
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
|
|
111
86
|
|
|
112
87
|
### OpenRouter
|
|
113
88
|
|
|
114
89
|
- Wire provider: `openrouter`
|
|
115
90
|
- Supported models: `gpt-4o-mini`, `gpt-4o`, `gemini-2.0-flash`
|
|
116
|
-
- Auto route: `managed`
|
|
117
91
|
- Docs: [Secrets](secrets.md); [Events](events.md)
|
|
118
|
-
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
92
|
+
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
|
|
119
93
|
|
|
120
94
|
### Doubao
|
|
121
95
|
|
|
122
96
|
- Wire provider: `doubao`
|
|
123
97
|
- Supported models: `doubao-seed-pro`, `doubao-seed-flash`
|
|
124
|
-
- Auto route: `managed`
|
|
125
98
|
- Docs: [Secrets](secrets.md); [Events](events.md)
|
|
126
|
-
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
99
|
+
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
|
|
127
100
|
|
|
128
101
|
### Doubao (China)
|
|
129
102
|
|
|
130
103
|
- Wire provider: `doubao-cn`
|
|
131
104
|
- Supported models: `doubao-seed-pro`, `doubao-seed-flash`
|
|
132
|
-
- Auto route: `managed`
|
|
133
105
|
- Docs: [Secrets](secrets.md); [Events](events.md)
|
|
134
|
-
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [
|
|
106
|
+
- Evidence: [Submission parser and routing parity](../../contracts/test/submission.test.ts); [Generated matrix freshness](../../../scripts/validate/capability-matrix.test.ts)
|
package/docs/public-surface.json
CHANGED
|
@@ -6,15 +6,14 @@
|
|
|
6
6
|
"installCommand": "bun add @aexhq/sdk",
|
|
7
7
|
"examples": {
|
|
8
8
|
"typescriptLines": [
|
|
9
|
-
"import { AgentExecutor, Models
|
|
9
|
+
"import { AgentExecutor, Models } from \"@aexhq/sdk\";",
|
|
10
10
|
"",
|
|
11
11
|
"const aex = new AgentExecutor({ apiToken: process.env.AEX_API_TOKEN! });",
|
|
12
12
|
"",
|
|
13
13
|
"const runId = await aex.submit({",
|
|
14
|
-
" provider: Providers.ANTHROPIC,",
|
|
15
14
|
" model: Models.CLAUDE_HAIKU_4_5,",
|
|
16
|
-
" prompt: \"Write
|
|
17
|
-
" secrets: {
|
|
15
|
+
" prompt: \"Write a short report and save it as a file.\",",
|
|
16
|
+
" secrets: { apiKeys: { anthropic: process.env.ANTHROPIC_API_KEY! } }",
|
|
18
17
|
"});",
|
|
19
18
|
"",
|
|
20
19
|
"for await (const event of aex.stream(runId)) console.log(event.type);",
|
|
@@ -26,7 +25,7 @@
|
|
|
26
25
|
" --api-token \"$AEX_API_TOKEN\" \\",
|
|
27
26
|
" --anthropic-api-key \"$ANTHROPIC_API_KEY\" \\",
|
|
28
27
|
" --model claude-haiku-4-5 \\",
|
|
29
|
-
" --prompt \"Write
|
|
28
|
+
" --prompt \"Write a short report and save it as a file.\" \\",
|
|
30
29
|
" --follow"
|
|
31
30
|
]
|
|
32
31
|
},
|
package/docs/quickstart.md
CHANGED
|
@@ -10,7 +10,20 @@ title: Quickstart
|
|
|
10
10
|
bun add @aexhq/sdk
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
This installs the TypeScript SDK exports and the bundled `aex` CLI.
|
|
14
|
+
|
|
15
|
+
## 2. Set credentials
|
|
16
|
+
|
|
17
|
+
In the dashboard, create a quickstart SDK token with `runs:read`, `runs:write`,
|
|
18
|
+
and `outputs:read`. The examples also need your BYOK provider key for the model
|
|
19
|
+
you choose. For the Claude examples below:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
export AEX_API_TOKEN="<your-aex-token>"
|
|
23
|
+
export ANTHROPIC_API_KEY="<your-anthropic-api-key>"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 3. Run a prompt
|
|
14
27
|
|
|
15
28
|
```ts
|
|
16
29
|
import { AgentExecutor, Models } from "@aexhq/sdk";
|
|
@@ -18,24 +31,24 @@ import { AgentExecutor, Models } from "@aexhq/sdk";
|
|
|
18
31
|
const aex = new AgentExecutor({ apiToken: process.env.AEX_API_TOKEN! });
|
|
19
32
|
|
|
20
33
|
// run() submits, waits for the run to settle, and returns the result.
|
|
21
|
-
// `provider` is derived from the model; `
|
|
34
|
+
// `provider` is derived from the model; `secrets.apiKeys` carries your BYOK provider key.
|
|
22
35
|
const { text, ok } = await aex.run({
|
|
23
36
|
model: Models.CLAUDE_HAIKU_4_5,
|
|
24
|
-
|
|
37
|
+
secrets: { apiKeys: { anthropic: process.env.ANTHROPIC_API_KEY! } },
|
|
25
38
|
prompt: "Write a short report and save it as a file."
|
|
26
39
|
});
|
|
27
40
|
|
|
28
41
|
console.log(ok, text);
|
|
29
42
|
```
|
|
30
43
|
|
|
31
|
-
##
|
|
44
|
+
## 4. Submit, stream, wait, and download
|
|
32
45
|
|
|
33
46
|
When you need the run id, live events, or downloads, drive the lifecycle yourself:
|
|
34
47
|
|
|
35
48
|
```ts
|
|
36
49
|
const runId = await aex.submit({
|
|
37
50
|
model: Models.CLAUDE_HAIKU_4_5,
|
|
38
|
-
|
|
51
|
+
secrets: { apiKeys: { anthropic: process.env.ANTHROPIC_API_KEY! } },
|
|
39
52
|
prompt: "Write a short report and save it as a file."
|
|
40
53
|
});
|
|
41
54
|
|
|
@@ -49,7 +62,7 @@ console.log(run.status);
|
|
|
49
62
|
await aex.download(runId, { to: "./run.zip" });
|
|
50
63
|
```
|
|
51
64
|
|
|
52
|
-
The same run from the CLI:
|
|
65
|
+
The same run from the bundled CLI:
|
|
53
66
|
|
|
54
67
|
```bash
|
|
55
68
|
aex run \
|
package/docs/run-config.md
CHANGED
|
@@ -15,13 +15,12 @@ Allowed fields:
|
|
|
15
15
|
- `mcpServers` - array of `McpServerRef`; headers are split into `secrets.mcpServers` server-side.
|
|
16
16
|
- `environment` - `{ networking?, packages?, envVars? }`. Networking is open by default; set `networking.mode` to `limited` only when you want an allowlist. `envVars` are merged into the in-container `RUNTIME.env` / `RUNTIME.json` mounts.
|
|
17
17
|
- `runtimeSize` - optional managed-runtime preset. Prefer `RuntimeSizes` in TypeScript.
|
|
18
|
-
- `region` - optional product placement region: `eu-west`, `us-west`, or `ap-northeast`. These are platform placement targets, not exact city guarantees; omitted runs infer a configured region from request geography and fall back when no hint matches.
|
|
19
18
|
- `timeout` - optional run deadline duration string such as `"30m"` or `"2h"`.
|
|
20
19
|
- `postHook` - optional post-agent verifier `{ command, timeout?, maxTurns?, maxChars? }`. It runs after a successful agent process; a failing or timed-out command is sent back to the agent for repair until `maxTurns` is exhausted. Empty `command` is treated as omitted.
|
|
21
20
|
- `proxyEndpoints` - array of `PlatformProxyEndpoint`; endpoint-level `retry` is allowed here and remains declaration-based.
|
|
22
21
|
- `metadata` - non-secret structured metadata.
|
|
23
22
|
|
|
24
|
-
`agentsMd`, `files`, `outputs`, `tools`, `includeBuiltinTools`, `limits`, and `outputMode` are top-level `submit` options, not run-config fields. They carry bytes, capture behavior, or agent tool/output controls that belong on a concrete run submission. The `limits` option sets per-run subagent-lineage caps (`maxConcurrentChildRuns`, `maxSubagentDepth`); see [Limits & quotas](limits-and-quotas.md).
|
|
23
|
+
`agentsMd`, `files`, `outputs`, `tools`, `includeBuiltinTools`, `limits`, and `outputMode` are top-level `submit` options, not run-config fields. They carry bytes, capture behavior, or agent tool/output controls that belong on a concrete run submission. The `limits` option sets per-run caps: the subagent-lineage caps (`maxConcurrentChildRuns`, `maxSubagentDepth`) and a USD spend cap (`maxSpendUsd`, which stops the run once its spend would exceed the cap); see [Limits & quotas](limits-and-quotas.md).
|
|
25
24
|
|
|
26
25
|
Secrets never live in run config. Pass credentials through `submit({ ...config, secrets })` in the SDK or the equivalent host-mode flags (`--anthropic-api-key`, `--mcp-auth`, `--proxy-auth`) in the CLI. See [Secrets](secrets.md) for secret lifecycles and [Credentials](credentials.md) for the proxy endpoint policy/auth split and retry fields.
|
|
27
26
|
|
|
@@ -34,11 +33,11 @@ exhausts `maxTurns` fails the run with `data.failureClass: "post_hook_failed"`.
|
|
|
34
33
|
Use an ordinary function when you want reusable typed parameters. aex does not store or execute this function; it only receives the run parameters you submit.
|
|
35
34
|
|
|
36
35
|
```ts
|
|
37
|
-
import {
|
|
36
|
+
import { Models } from "@aexhq/sdk";
|
|
38
37
|
|
|
39
38
|
function summarise(topic: string) {
|
|
40
39
|
return {
|
|
41
|
-
model:
|
|
40
|
+
model: Models.CLAUDE_HAIKU_4_5,
|
|
42
41
|
system: "You are a concise automation agent.",
|
|
43
42
|
prompt: `Write a short answer about ${topic}.`
|
|
44
43
|
};
|
|
@@ -46,7 +45,7 @@ function summarise(topic: string) {
|
|
|
46
45
|
|
|
47
46
|
await aex.submit({
|
|
48
47
|
...summarise("agent-first SDK design"),
|
|
49
|
-
secrets: { apiKey }
|
|
48
|
+
secrets: { apiKeys: { anthropic: apiKey } }
|
|
50
49
|
});
|
|
51
50
|
```
|
|
52
51
|
|
|
@@ -60,4 +59,4 @@ aex run --config ./run.json \
|
|
|
60
59
|
--anthropic-api-key "$ANTHROPIC_API_KEY"
|
|
61
60
|
```
|
|
62
61
|
|
|
63
|
-
...or as explicit flags (`--model`, `--system`, `--prompt`, `--mcp`, `--mcp-auth`, `--
|
|
62
|
+
...or as explicit flags (`--model`, `--system`, `--prompt`, `--mcp`, `--mcp-auth`, `--runtime-size`, `--run-timeout`, `--proxy-endpoint`, `--proxy-auth`, `--metadata`). The two modes are mutually exclusive. `postHook` is available through `--config`; there are no standalone hook flags.
|
package/docs/secrets.md
CHANGED
|
@@ -8,20 +8,22 @@ 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 `AEX_API_TOKEN` for aex and the matching BYOK
|
|
12
|
+
provider key, such as `ANTHROPIC_API_KEY` for Claude.
|
|
13
|
+
|
|
11
14
|
## Use A Provider Key For One Run
|
|
12
15
|
|
|
13
16
|
### TypeScript
|
|
14
17
|
|
|
15
18
|
```ts
|
|
16
|
-
import { AgentExecutor, Models
|
|
19
|
+
import { AgentExecutor, Models } from "@aexhq/sdk";
|
|
17
20
|
|
|
18
21
|
const aex = new AgentExecutor({ apiToken: process.env.AEX_API_TOKEN! });
|
|
19
22
|
|
|
20
23
|
await aex.submit({
|
|
21
|
-
provider: Providers.ANTHROPIC,
|
|
22
24
|
model: Models.CLAUDE_HAIKU_4_5,
|
|
23
|
-
prompt: "Write
|
|
24
|
-
secrets: {
|
|
25
|
+
prompt: "Write a short report and save it as a file.",
|
|
26
|
+
secrets: { apiKeys: { anthropic: process.env.ANTHROPIC_API_KEY! } }
|
|
25
27
|
});
|
|
26
28
|
```
|
|
27
29
|
|
|
@@ -32,7 +34,7 @@ aex run \
|
|
|
32
34
|
--api-token "$AEX_API_TOKEN" \
|
|
33
35
|
--anthropic-api-key "$ANTHROPIC_API_KEY" \
|
|
34
36
|
--model claude-haiku-4-5 \
|
|
35
|
-
--prompt "Write
|
|
37
|
+
--prompt "Write a short report and save it as a file."
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
## Upload An Env Secret
|
|
@@ -54,7 +56,7 @@ await aex.submit({
|
|
|
54
56
|
model: Models.CLAUDE_HAIKU_4_5,
|
|
55
57
|
prompt: "Inspect the repository issues.",
|
|
56
58
|
secretEnv: { GITHUB_TOKEN: githubToken },
|
|
57
|
-
secrets: {
|
|
59
|
+
secrets: { apiKeys: { anthropic: process.env.ANTHROPIC_API_KEY! } }
|
|
58
60
|
});
|
|
59
61
|
```
|
|
60
62
|
|
|
@@ -109,7 +111,7 @@ await aex.submit({
|
|
|
109
111
|
secretEnv: {
|
|
110
112
|
SERPER_API_KEY: Secret.ref("serper-api-key")
|
|
111
113
|
},
|
|
112
|
-
secrets: {
|
|
114
|
+
secrets: { apiKeys: { anthropic: process.env.ANTHROPIC_API_KEY! } }
|
|
113
115
|
});
|
|
114
116
|
```
|
|
115
117
|
|
package/docs/skills.md
CHANGED
|
@@ -24,12 +24,6 @@ All three sources normalize to the same content-addressed asset. Identical bytes
|
|
|
24
24
|
dedup by hash, so repeated submissions of the same bundle are no-op uploads.
|
|
25
25
|
There is no per-run auto-suffixed `skl_*` row for inline skills.
|
|
26
26
|
|
|
27
|
-
Provider-hosted skill refs (`kind:"provider"`, e.g. Anthropic prebuilt Agent
|
|
28
|
-
Skills or custom provider skill IDs) are not supported on the managed runtime.
|
|
29
|
-
Every new submission dispatches to managed, so a `kind:"provider"` ref is
|
|
30
|
-
rejected at submission time with `feature_runtime_mismatch`. Supply the bytes as
|
|
31
|
-
an aex asset instead.
|
|
32
|
-
|
|
33
27
|
## Materialization
|
|
34
28
|
|
|
35
29
|
For each run, the platform copies referenced skill assets into durable run asset
|
|
@@ -60,15 +54,15 @@ keep their run-scoped copy.
|
|
|
60
54
|
canonical zip bytes and a `sha256:<hex>` content hash.
|
|
61
55
|
|
|
62
56
|
```ts
|
|
63
|
-
import { AgentExecutor,
|
|
57
|
+
import { AgentExecutor, Models, Skill } from "@aexhq/sdk";
|
|
64
58
|
|
|
65
59
|
const aex = new AgentExecutor({ apiToken });
|
|
66
60
|
|
|
67
61
|
await aex.submit({
|
|
68
|
-
model:
|
|
62
|
+
model: Models.CLAUDE_HAIKU_4_5,
|
|
69
63
|
prompt,
|
|
70
64
|
skills: [await Skill.fromPath("./skills/rules", { name: "rules" })],
|
|
71
|
-
secrets: { apiKey }
|
|
65
|
+
secrets: { apiKeys: { anthropic: apiKey } }
|
|
72
66
|
});
|
|
73
67
|
```
|
|
74
68
|
|
|
@@ -80,9 +74,7 @@ flow:
|
|
|
80
74
|
2. The SDK PUTs bytes directly to object storage with the signed checksum headers.
|
|
81
75
|
3. `POST /assets/finalize` confirms the object exists.
|
|
82
76
|
|
|
83
|
-
|
|
84
|
-
the buffered `/assets` upload path. The runner re-verifies the content hash when
|
|
85
|
-
it downloads the asset.
|
|
77
|
+
The runner re-verifies the content hash when it downloads the asset.
|
|
86
78
|
|
|
87
79
|
## Pre-Upload For Reuse
|
|
88
80
|
|
|
@@ -94,10 +86,10 @@ const draft = await Skill.fromFiles({ name: "rules", files });
|
|
|
94
86
|
const uploaded = await draft.upload(aex);
|
|
95
87
|
|
|
96
88
|
await aex.submit({
|
|
97
|
-
model:
|
|
89
|
+
model: Models.CLAUDE_HAIKU_4_5,
|
|
98
90
|
prompt,
|
|
99
91
|
skills: [uploaded],
|
|
100
|
-
secrets: { apiKey }
|
|
92
|
+
secrets: { apiKeys: { anthropic: apiKey } }
|
|
101
93
|
});
|
|
102
94
|
```
|
|
103
95
|
|
|
@@ -131,10 +123,10 @@ assets. Use them when a team wants a named, listed skill record:
|
|
|
131
123
|
const [record] = await aex.skills.list();
|
|
132
124
|
|
|
133
125
|
await aex.submit({
|
|
134
|
-
model:
|
|
126
|
+
model: Models.CLAUDE_HAIKU_4_5,
|
|
135
127
|
prompt,
|
|
136
128
|
skills: [Skill.fromCatalog(record)],
|
|
137
|
-
secrets: { apiKey }
|
|
129
|
+
secrets: { apiKeys: { anthropic: apiKey } }
|
|
138
130
|
});
|
|
139
131
|
```
|
|
140
132
|
|
package/docs/vision-skills.md
CHANGED
|
@@ -30,7 +30,7 @@ settings are `responseMode: "full"` (so the skill gets the upstream JSON back) a
|
|
|
30
30
|
a raised `maxRequestBytes` (so the base64 image fits):
|
|
31
31
|
|
|
32
32
|
```ts
|
|
33
|
-
import { AgentExecutor,
|
|
33
|
+
import { AgentExecutor, Models, Skill, ProxyEndpoint, validateProxyAuth } from "@aexhq/sdk";
|
|
34
34
|
|
|
35
35
|
const aex = new AgentExecutor({ apiToken: process.env.AEX_API_TOKEN! });
|
|
36
36
|
|
|
@@ -53,12 +53,12 @@ const proxyEndpointAuth = [
|
|
|
53
53
|
validateProxyAuth(proxyEndpoints, proxyEndpointAuth); // fail fast at submit time
|
|
54
54
|
|
|
55
55
|
const runId = await aex.submit({
|
|
56
|
-
model:
|
|
56
|
+
model: Models.CLAUDE_HAIKU_4_5,
|
|
57
57
|
prompt: "…read skills/frame-vision-gate/SKILL.md, then caption + verify the frame…",
|
|
58
58
|
skills: [await Skill.fromPath("./vision-skill", { name: "frame-vision-gate" })],
|
|
59
59
|
proxyEndpoints,
|
|
60
60
|
secrets: {
|
|
61
|
-
|
|
61
|
+
apiKeys: { anthropic: process.env.ANTHROPIC_API_KEY! },
|
|
62
62
|
proxyEndpointAuth
|
|
63
63
|
}
|
|
64
64
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aexhq/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.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": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"pack:dry-run": "bun ../../scripts/with-generated-dist-lock.mjs bun pm pack --dry-run --ignore-scripts"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@aexhq/contracts": "0.
|
|
44
|
+
"@aexhq/contracts": "0.31.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"bun": ">=1.3.14"
|