@aexhq/sdk 0.31.0 → 0.33.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 (43) hide show
  1. package/README.md +29 -31
  2. package/dist/_contracts/event-stream-client.d.ts +2 -2
  3. package/dist/_contracts/event-stream-client.js +3 -3
  4. package/dist/_contracts/index.d.ts +0 -1
  5. package/dist/_contracts/index.js +0 -1
  6. package/dist/_contracts/models.d.ts +0 -76
  7. package/dist/_contracts/models.js +0 -20
  8. package/dist/_contracts/operations.d.ts +15 -18
  9. package/dist/_contracts/operations.js +81 -40
  10. package/dist/_contracts/post-hook.d.ts +4 -4
  11. package/dist/_contracts/post-hook.js +1 -1
  12. package/dist/_contracts/run-config.d.ts +0 -4
  13. package/dist/_contracts/run-config.js +0 -7
  14. package/dist/_contracts/run-unit.js +4 -4
  15. package/dist/_contracts/runtime-types.d.ts +86 -2
  16. package/dist/_contracts/status.d.ts +3 -1
  17. package/dist/_contracts/status.js +17 -0
  18. package/dist/_contracts/submission.d.ts +1 -10
  19. package/dist/_contracts/submission.js +0 -4
  20. package/dist/cli.mjs +118 -135
  21. package/dist/cli.mjs.sha256 +1 -1
  22. package/dist/client.d.ts +118 -72
  23. package/dist/client.js +427 -96
  24. package/dist/client.js.map +1 -1
  25. package/dist/index.d.ts +5 -4
  26. package/dist/index.js +3 -2
  27. package/dist/index.js.map +1 -1
  28. package/dist/version.d.ts +1 -1
  29. package/dist/version.js +1 -1
  30. package/docs/cleanup.md +2 -2
  31. package/docs/credentials.md +3 -3
  32. package/docs/defaults.md +0 -2
  33. package/docs/events.md +32 -13
  34. package/docs/limits.md +4 -3
  35. package/docs/outputs.md +2 -2
  36. package/docs/provider-runtime-capabilities.md +2 -2
  37. package/docs/public-surface.json +15 -10
  38. package/docs/quickstart.md +38 -12
  39. package/docs/run-config.md +3 -8
  40. package/docs/secrets.md +2 -2
  41. package/docs/skills.md +4 -4
  42. package/docs/vision-skills.md +2 -2
  43. package/package.json +1 -1
@@ -16,7 +16,6 @@ Allowed fields:
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
18
  - `timeout` - optional run deadline duration string such as `"30m"` or `"2h"`.
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.
20
19
  - `proxyEndpoints` - array of `PlatformProxyEndpoint`; endpoint-level `retry` is allowed here and remains declaration-based.
21
20
  - `metadata` - non-secret structured metadata.
22
21
 
@@ -24,20 +23,16 @@ Allowed fields:
24
23
 
25
24
  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.
26
25
 
27
- When a run uses `postHook`, the terminal event includes `data.postHook` with
28
- attempt counts, the final hook result, and capped failure output. A hook that
29
- exhausts `maxTurns` fails the run with `data.failureClass: "post_hook_failed"`.
30
-
31
26
  ## Reuse in code
32
27
 
33
28
  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.
34
29
 
35
30
  ```ts
36
- import { RunModels } from "@aexhq/sdk";
31
+ import { Models } from "@aexhq/sdk";
37
32
 
38
33
  function summarise(topic: string) {
39
34
  return {
40
- model: RunModels.CLAUDE_HAIKU_4_5,
35
+ model: Models.CLAUDE_HAIKU_4_5,
41
36
  system: "You are a concise automation agent.",
42
37
  prompt: `Write a short answer about ${topic}.`
43
38
  };
@@ -59,4 +54,4 @@ aex run --config ./run.json \
59
54
  --anthropic-api-key "$ANTHROPIC_API_KEY"
60
55
  ```
61
56
 
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.
57
+ ...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.
package/docs/secrets.md CHANGED
@@ -22,7 +22,7 @@ const aex = new AgentExecutor({ apiToken: process.env.AEX_API_TOKEN! });
22
22
 
23
23
  await aex.submit({
24
24
  model: Models.CLAUDE_HAIKU_4_5,
25
- prompt: "Write the report and save outputs.",
25
+ prompt: "Write a short report and save it as a file.",
26
26
  secrets: { apiKeys: { anthropic: process.env.ANTHROPIC_API_KEY! } }
27
27
  });
28
28
  ```
@@ -34,7 +34,7 @@ aex run \
34
34
  --api-token "$AEX_API_TOKEN" \
35
35
  --anthropic-api-key "$ANTHROPIC_API_KEY" \
36
36
  --model claude-haiku-4-5 \
37
- --prompt "Write the report and save outputs."
37
+ --prompt "Write a short report and save it as a file."
38
38
  ```
39
39
 
40
40
  ## Upload An Env Secret
package/docs/skills.md CHANGED
@@ -54,12 +54,12 @@ keep their run-scoped copy.
54
54
  canonical zip bytes and a `sha256:<hex>` content hash.
55
55
 
56
56
  ```ts
57
- import { AgentExecutor, RunModels, Skill } from "@aexhq/sdk";
57
+ import { AgentExecutor, Models, Skill } from "@aexhq/sdk";
58
58
 
59
59
  const aex = new AgentExecutor({ apiToken });
60
60
 
61
61
  await aex.submit({
62
- model: RunModels.CLAUDE_HAIKU_4_5,
62
+ model: Models.CLAUDE_HAIKU_4_5,
63
63
  prompt,
64
64
  skills: [await Skill.fromPath("./skills/rules", { name: "rules" })],
65
65
  secrets: { apiKeys: { anthropic: apiKey } }
@@ -86,7 +86,7 @@ const draft = await Skill.fromFiles({ name: "rules", files });
86
86
  const uploaded = await draft.upload(aex);
87
87
 
88
88
  await aex.submit({
89
- model: RunModels.CLAUDE_HAIKU_4_5,
89
+ model: Models.CLAUDE_HAIKU_4_5,
90
90
  prompt,
91
91
  skills: [uploaded],
92
92
  secrets: { apiKeys: { anthropic: apiKey } }
@@ -123,7 +123,7 @@ assets. Use them when a team wants a named, listed skill record:
123
123
  const [record] = await aex.skills.list();
124
124
 
125
125
  await aex.submit({
126
- model: RunModels.CLAUDE_HAIKU_4_5,
126
+ model: Models.CLAUDE_HAIKU_4_5,
127
127
  prompt,
128
128
  skills: [Skill.fromCatalog(record)],
129
129
  secrets: { apiKeys: { anthropic: apiKey } }
@@ -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, RunModels, Skill, ProxyEndpoint, validateProxyAuth } from "@aexhq/sdk";
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,7 +53,7 @@ const proxyEndpointAuth = [
53
53
  validateProxyAuth(proxyEndpoints, proxyEndpointAuth); // fail fast at submit time
54
54
 
55
55
  const runId = await aex.submit({
56
- model: RunModels.CLAUDE_HAIKU_4_5,
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aexhq/sdk",
3
- "version": "0.31.0",
3
+ "version": "0.33.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": {