@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.
- package/README.md +29 -31
- package/dist/_contracts/event-stream-client.d.ts +2 -2
- package/dist/_contracts/event-stream-client.js +3 -3
- package/dist/_contracts/index.d.ts +0 -1
- package/dist/_contracts/index.js +0 -1
- package/dist/_contracts/models.d.ts +0 -76
- package/dist/_contracts/models.js +0 -20
- package/dist/_contracts/operations.d.ts +15 -18
- package/dist/_contracts/operations.js +81 -40
- package/dist/_contracts/post-hook.d.ts +4 -4
- package/dist/_contracts/post-hook.js +1 -1
- package/dist/_contracts/run-config.d.ts +0 -4
- package/dist/_contracts/run-config.js +0 -7
- package/dist/_contracts/run-unit.js +4 -4
- package/dist/_contracts/runtime-types.d.ts +86 -2
- package/dist/_contracts/status.d.ts +3 -1
- package/dist/_contracts/status.js +17 -0
- package/dist/_contracts/submission.d.ts +1 -10
- package/dist/_contracts/submission.js +0 -4
- package/dist/cli.mjs +118 -135
- package/dist/cli.mjs.sha256 +1 -1
- package/dist/client.d.ts +118 -72
- package/dist/client.js +427 -96
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/cleanup.md +2 -2
- package/docs/credentials.md +3 -3
- package/docs/defaults.md +0 -2
- package/docs/events.md +32 -13
- package/docs/limits.md +4 -3
- package/docs/outputs.md +2 -2
- package/docs/provider-runtime-capabilities.md +2 -2
- package/docs/public-surface.json +15 -10
- package/docs/quickstart.md +38 -12
- package/docs/run-config.md +3 -8
- package/docs/secrets.md +2 -2
- package/docs/skills.md +4 -4
- package/docs/vision-skills.md +2 -2
- package/package.json +1 -1
package/docs/run-config.md
CHANGED
|
@@ -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 {
|
|
31
|
+
import { Models } from "@aexhq/sdk";
|
|
37
32
|
|
|
38
33
|
function summarise(topic: string) {
|
|
39
34
|
return {
|
|
40
|
-
model:
|
|
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.
|
|
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
|
|
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
|
|
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,
|
|
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:
|
|
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:
|
|
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:
|
|
126
|
+
model: Models.CLAUDE_HAIKU_4_5,
|
|
127
127
|
prompt,
|
|
128
128
|
skills: [Skill.fromCatalog(record)],
|
|
129
129
|
secrets: { apiKeys: { anthropic: apiKey } }
|
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,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:
|
|
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.
|
|
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": {
|