@aexhq/sdk 0.18.1 → 0.20.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.
Files changed (47) hide show
  1. package/README.md +2 -2
  2. package/dist/_contracts/models.d.ts +133 -38
  3. package/dist/_contracts/models.js +114 -69
  4. package/dist/_contracts/operations.d.ts +17 -1
  5. package/dist/_contracts/operations.js +50 -0
  6. package/dist/_contracts/provider-support.d.ts +68 -0
  7. package/dist/_contracts/provider-support.js +28 -0
  8. package/dist/_contracts/run-config.d.ts +1 -1
  9. package/dist/_contracts/run-cost.d.ts +27 -0
  10. package/dist/_contracts/run-cost.js +34 -1
  11. package/dist/_contracts/runtime-types.d.ts +32 -0
  12. package/dist/_contracts/submission.d.ts +58 -2
  13. package/dist/_contracts/submission.js +106 -7
  14. package/dist/agents-md.d.ts +3 -3
  15. package/dist/agents-md.js +6 -6
  16. package/dist/agents-md.js.map +1 -1
  17. package/dist/cli.mjs +116 -86
  18. package/dist/cli.mjs.sha256 +1 -1
  19. package/dist/client.d.ts +90 -10
  20. package/dist/client.js +121 -40
  21. package/dist/client.js.map +1 -1
  22. package/dist/fetch-archive.js +1 -1
  23. package/dist/file.d.ts +3 -3
  24. package/dist/file.js +6 -6
  25. package/dist/file.js.map +1 -1
  26. package/dist/index.d.ts +6 -4
  27. package/dist/index.js +3 -2
  28. package/dist/index.js.map +1 -1
  29. package/dist/proxy-endpoint.d.ts +2 -2
  30. package/dist/proxy-endpoint.js +1 -1
  31. package/dist/secret.d.ts +102 -0
  32. package/dist/secret.js +148 -0
  33. package/dist/secret.js.map +1 -0
  34. package/dist/skill.d.ts +8 -8
  35. package/dist/skill.js +10 -10
  36. package/dist/skill.js.map +1 -1
  37. package/dist/version.d.ts +1 -1
  38. package/dist/version.js +1 -1
  39. package/docs/cleanup.md +1 -1
  40. package/docs/credentials.md +4 -4
  41. package/docs/events.md +2 -2
  42. package/docs/outputs.md +3 -3
  43. package/docs/provider-runtime-capabilities.md +23 -1
  44. package/docs/quickstart.md +7 -7
  45. package/docs/run-config.md +4 -4
  46. package/docs/skills.md +4 -4
  47. package/package.json +2 -2
@@ -8,7 +8,7 @@ Generated from `packages/contracts/src/provider-support.ts`; runtime cells are d
8
8
 
9
9
  Regenerate with `pnpm capabilities:generate`; check with `pnpm capabilities:check`.
10
10
 
11
- Providers: [Anthropic](#anthropic) (`anthropic`), [DeepSeek](#deepseek) (`deepseek`), [OpenAI](#openai) (`openai`), [Gemini](#gemini) (`gemini`), [Mistral](#mistral) (`mistral`), [OpenRouter](#openrouter) (`openrouter`). Runtime selectors: `managed`.
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`). Runtime selectors: `managed`.
12
12
 
13
13
  All new submissions run on the managed runtime. Public support facts are listed separately from runtime dispatch facts.
14
14
 
@@ -24,6 +24,8 @@ Status vocabulary: `supported`, `live-unverified`, `rejected`.
24
24
  | [Gemini](#gemini) | `gemini` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [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) |
25
25
  | [Mistral](#mistral) | `mistral` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [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) |
26
26
  | [OpenRouter](#openrouter) | `openrouter` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [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) |
27
+ | [Doubao](#doubao) | `doubao` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [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) |
28
+ | [Doubao (China)](#doubao-cn) | `doubao-cn` | live-unverified | [Credentials](credentials.md); [Events](events.md) | [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) |
27
29
 
28
30
  ## Runtime routing
29
31
 
@@ -35,6 +37,8 @@ Status vocabulary: `supported`, `live-unverified`, `rejected`.
35
37
  | `gemini` | no | `managed` | [live-unverified](#gemini) |
36
38
  | `mistral` | no | `managed` | [live-unverified](#mistral) |
37
39
  | `openrouter` | no | `managed` | [live-unverified](#openrouter) |
40
+ | `doubao` | no | `managed` | [live-unverified](#doubao) |
41
+ | `doubao-cn` | no | `managed` | [live-unverified](#doubao-cn) |
38
42
 
39
43
  ## Runtime cell evidence
40
44
 
@@ -46,6 +50,8 @@ Status vocabulary: `supported`, `live-unverified`, `rejected`.
46
50
  | `gemini` | `managed` | live-unverified | live-unverified | 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) |
47
51
  | `mistral` | `managed` | live-unverified | live-unverified | 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
52
  | `openrouter` | `managed` | live-unverified | live-unverified | 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
+ | `doubao` | `managed` | live-unverified | live-unverified | 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) |
54
+ | `doubao-cn` | `managed` | live-unverified | live-unverified | 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
55
 
50
56
  ## Validation errors
51
57
 
@@ -112,3 +118,19 @@ Notes:
112
118
  - Auto route: `managed`
113
119
  - Docs: [Credentials](credentials.md); [Events](events.md)
114
120
  - Evidence: [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)
121
+
122
+ ### Doubao
123
+
124
+ - Wire provider: `doubao`
125
+ - Public status: live-unverified
126
+ - Auto route: `managed`
127
+ - Docs: [Credentials](credentials.md); [Events](events.md)
128
+ - Evidence: [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)
129
+
130
+ ### Doubao (China)
131
+
132
+ - Wire provider: `doubao-cn`
133
+ - Public status: live-unverified
134
+ - Auto route: `managed`
135
+ - Docs: [Credentials](credentials.md); [Events](events.md)
136
+ - Evidence: [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)
@@ -16,7 +16,7 @@ const aex = new AgentExecutor({
16
16
  // baseUrl defaults to https://api.aex.dev - set it for local or staging planes.
17
17
  });
18
18
 
19
- const runId = await aex.submitRun({
19
+ const runId = await aex.submit({
20
20
  model: RunModels.CLAUDE_HAIKU_4_5,
21
21
  prompt: "Write a short answer about agent-first SDK design.",
22
22
  secrets: { apiKey: process.env.ANTHROPIC_API_KEY! }
@@ -37,7 +37,7 @@ function summarise(topic: string) {
37
37
  };
38
38
  }
39
39
 
40
- const runId = await aex.submitRun({
40
+ const runId = await aex.submit({
41
41
  ...summarise("agent-first SDK design"),
42
42
  secrets: { apiKey: process.env.ANTHROPIC_API_KEY! }
43
43
  });
@@ -58,7 +58,7 @@ For a config-file flow, pass `--config <path>` with a run-config JSON file for a
58
58
 
59
59
  ## Runtime controls
60
60
 
61
- `submitRun` also accepts per-run controls that are not secrets:
61
+ `submit` also accepts per-run controls that are not secrets:
62
62
 
63
63
  - `runtimeSize` - a closed managed-runtime preset. Prefer `RuntimeSizes`, e.g. `RuntimeSizes.SHARED_2X_2GB`.
64
64
  - `timeout` - run deadline as a duration string such as `"30m"` or `"2h"`; bounded server-side.
@@ -75,7 +75,7 @@ Every kind of thing you want to ship at run time has exactly one right primitive
75
75
  | Non-secret paths or config (`BROLL_STORE`, mode flags) | `environment.envVars` | Mounted as `RUNTIME.env` / `RUNTIME.json`; `__KEY__` substitution in agent-facing markdown; echoed back as `run.runtimeManifest.envVars` |
76
76
  | Upstream HTTPS API keys (TMDB, Brave, Tavily, …) | `ProxyEndpoint` | Credentials live server-side; aex proxy injects them on outbound calls. The key never enters the container. |
77
77
  | MCP server credentials | `secrets.mcpServers` | Held in run-scoped custody, attached per run |
78
- | Provider API key | `secrets.apiKey` | Required on every `submitRun`; held in run-scoped custody. Carries the BYOK key for the selected `provider` |
78
+ | Provider API key | `secrets.apiKey` | Required on every `submit`; held in run-scoped custody. Carries the BYOK key for the selected `provider` |
79
79
  | Non-secret reference data folders (transcripts, persona docs, PDFs) | `File.fromPath('./customer-folder/')` | Materialized under `files/<f_id>/<name>` in the run workspace by default and described in the agent-facing instructions |
80
80
  | Executable skill code (a `.pyz` wrapper, scripts, prompts) | `Skill.fromPath('./skills/my-skill/')` | Mounted under `skills/<name>/`; the bundle's `SKILL.md` is composed into the agent's instructions |
81
81
  | Agent instructions file | `AgentsMd.fromPath('./AGENTS.md')` | Prepended as the first user turn |
@@ -84,7 +84,7 @@ Every kind of thing you want to ship at run time has exactly one right primitive
84
84
 
85
85
  ## Safe retries with `idempotencyKey`
86
86
 
87
- Every `submitRun` call carries an `idempotencyKey`. When omitted the SDK auto-generates a UUID per call. Supplying your own key makes retries deterministic:
87
+ Every `submit` call carries an `idempotencyKey`. When omitted the SDK auto-generates a UUID per call. Supplying your own key makes retries deterministic:
88
88
 
89
89
  | Submit shape | Server response |
90
90
  | --- | --- |
@@ -102,7 +102,7 @@ const idempotencyKey = crypto.randomUUID();
102
102
  async function submitWithRetry() {
103
103
  for (let attempt = 0; attempt < 3; attempt++) {
104
104
  try {
105
- return await aex.submitRun({
105
+ return await aex.submit({
106
106
  model: RunModels.CLAUDE_HAIKU_4_5,
107
107
  prompt: "...",
108
108
  idempotencyKey,
@@ -113,7 +113,7 @@ async function submitWithRetry() {
113
113
  throw err;
114
114
  }
115
115
  }
116
- throw new Error("submitRun failed after retries");
116
+ throw new Error("submit failed after retries");
117
117
  }
118
118
  ```
119
119
 
@@ -4,7 +4,7 @@ title: Run configuration
4
4
 
5
5
  # Run configuration
6
6
 
7
- A run config is the credential-free subset of a `submitRun` request that you can keep in code or load from a JSON file. It is not a platform object, saved definition, DSL, trigger, or persistent agent profile. aex only stores the immutable run record created when you submit.
7
+ A run config is the credential-free subset of a `submit` request that you can keep in code or load from a JSON file. It is not a platform object, saved definition, DSL, trigger, or persistent agent profile. aex only stores the immutable run record created when you submit.
8
8
 
9
9
  Allowed fields:
10
10
 
@@ -20,9 +20,9 @@ Allowed fields:
20
20
  - `proxyEndpoints` - array of `PlatformProxyEndpoint`; endpoint-level `retry` is allowed here and remains declaration-based.
21
21
  - `metadata` - non-secret structured metadata.
22
22
 
23
- `agentsMd`, `files`, `outputs`, `builtins`, and `outputMode` are top-level `submitRun` options, not run-config fields. They carry bytes, capture behavior, or agent tool/output controls that belong on a concrete run submission.
23
+ `agentsMd`, `files`, `outputs`, `builtins`, 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.
24
24
 
25
- Secrets never live in run config. Pass credentials through `submitRun({ ...config, secrets })` in the SDK or the equivalent host-mode flags (`--anthropic-api-key`, `--mcp-auth`, `--proxy-auth`) in the CLI. See [Credentials](credentials.md) for the proxy endpoint policy/auth split and retry fields.
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 [Credentials](credentials.md) for the proxy endpoint policy/auth split and retry fields.
26
26
 
27
27
  ## Reuse in code
28
28
 
@@ -39,7 +39,7 @@ function summarise(topic: string) {
39
39
  };
40
40
  }
41
41
 
42
- await aex.submitRun({
42
+ await aex.submit({
43
43
  ...summarise("agent-first SDK design"),
44
44
  secrets: { apiKey }
45
45
  });
package/docs/skills.md CHANGED
@@ -12,7 +12,7 @@ that asset into the run's object-storage prefix before dispatch.
12
12
  There are three sources for skill bytes:
13
13
 
14
14
  - **Inline/local draft:** `Skill.fromFiles(...)`, `Skill.fromPath(...)`, or
15
- `Skill.fromUrl(...)` builds a draft in the SDK process. `submitRun` uploads
15
+ `Skill.fromUrl(...)` builds a draft in the SDK process. `submit` uploads
16
16
  it before posting `/runs`.
17
17
  - **Pre-uploaded workspace asset:** call `await draft.upload(aex)` and reuse the
18
18
  returned materialized `Skill`, or pass an existing `kind:"asset"` ref from a
@@ -63,7 +63,7 @@ import { AgentExecutor, RunModels, Skill } from "@aexhq/sdk";
63
63
 
64
64
  const aex = new AgentExecutor({ apiToken });
65
65
 
66
- await aex.submitRun({
66
+ await aex.submit({
67
67
  model: RunModels.CLAUDE_HAIKU_4_5,
68
68
  prompt,
69
69
  skills: [await Skill.fromPath("./skills/rules", { name: "rules" })],
@@ -92,7 +92,7 @@ multiple submissions, upload the draft explicitly:
92
92
  const draft = await Skill.fromFiles({ name: "rules", files });
93
93
  const uploaded = await draft.upload(aex);
94
94
 
95
- await aex.submitRun({
95
+ await aex.submit({
96
96
  model: RunModels.CLAUDE_HAIKU_4_5,
97
97
  prompt,
98
98
  skills: [uploaded],
@@ -129,7 +129,7 @@ assets. Use them when a team wants a named, listed skill record:
129
129
  ```ts
130
130
  const [record] = await aex.skills.list();
131
131
 
132
- await aex.submitRun({
132
+ await aex.submit({
133
133
  model: RunModels.CLAUDE_HAIKU_4_5,
134
134
  prompt,
135
135
  skills: [Skill.fromCatalog(record)],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aexhq/sdk",
3
- "version": "0.18.1",
3
+ "version": "0.20.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": {
@@ -26,7 +26,7 @@
26
26
  "examples"
27
27
  ],
28
28
  "devDependencies": {
29
- "@aexhq/contracts": "0.18.1"
29
+ "@aexhq/contracts": "0.20.0"
30
30
  },
31
31
  "engines": {
32
32
  "node": ">=20"