@aexhq/sdk 0.18.0 → 0.19.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/dist/skill.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { type AssetRef, type FetchLike, type SkillRef } from "./_contracts/index.js";
2
2
  import { type SkillFiles } from "./bundle.js";
3
3
  /**
4
- * One `Skill` class for skill bytes. `client.submitRun` materializes the bytes
4
+ * One `Skill` class for skill bytes. `client.submit` materializes the bytes
5
5
  * as an uploaded asset before the run lands; the wire ref becomes
6
6
  * `kind:"asset"`.
7
7
  *
@@ -30,7 +30,7 @@ export declare class Skill {
30
30
  /**
31
31
  * The wire-level reference. Returns the SDK-private draft shape for
32
32
  * un-materialized skills (kind:"draft", with name + contentHash).
33
- * `client.submitRun` walks these and uploads them before the run
33
+ * `client.submit` walks these and uploads them before the run
34
34
  * lands.
35
35
  */
36
36
  get ref(): AssetRef | DraftSkillRef;
@@ -41,7 +41,7 @@ export declare class Skill {
41
41
  * Build a draft Skill from an inline files map. The SDK validates
42
42
  * basic safety (no path traversal, size caps, has `SKILL.md`),
43
43
  * deterministically zips the bundle, and computes the
44
- * `sha256:<hex>` content hash. `client.submitRun` materializes
44
+ * `sha256:<hex>` content hash. `client.submit` materializes
45
45
  * these before the run lands.
46
46
  */
47
47
  static fromFiles(args: {
@@ -66,7 +66,7 @@ export declare class Skill {
66
66
  *
67
67
  * The archive must contain `SKILL.md` at its root, or inside a single
68
68
  * top-level folder (which is stripped). The signed URL only needs to be valid
69
- * for this call; `client.submitRun` snapshots the bytes into the run.
69
+ * for this call; `client.submit` snapshots the bytes into the run.
70
70
  *
71
71
  * Universal (Node 18+ / browser): requires a global `fetch`, or pass one.
72
72
  */
@@ -86,7 +86,7 @@ export declare class Skill {
86
86
  * `Skill` record returned by `client.skills.list()` / `.get()`:
87
87
  *
88
88
  * const [s] = await client.skills.list();
89
- * await client.submitRun({ ..., skills: [Skill.fromCatalog(s)] });
89
+ * await client.submit({ ..., skills: [Skill.fromCatalog(s)] });
90
90
  *
91
91
  * The record must be `ready` (it has a content hash). Unlike the draft
92
92
  * builders this performs no upload — the bytes already live in the catalog.
@@ -96,9 +96,9 @@ export declare class Skill {
96
96
  readonly hash?: string | null;
97
97
  }): Skill;
98
98
  /**
99
- * Internal: yield the draft's bytes + metadata so `client.submitRun`
99
+ * Internal: yield the draft's bytes + metadata so `client.submit`
100
100
  * can upload the asset. After this returns, the Skill is marked consumed
101
- * so a second submitRun call against the same instance throws
101
+ * so a second submit call against the same instance throws
102
102
  * (avoid silently re-uploading; explicit re-construction is the
103
103
  * supported retry pattern).
104
104
  *
@@ -123,7 +123,7 @@ export declare class Skill {
123
123
  }
124
124
  /**
125
125
  * SDK-internal draft skill marker. Never reaches the wire; the
126
- * materialize step inside `client.submitRun` converts these to
126
+ * materialize step inside `client.submit` converts these to
127
127
  * `kind:"asset"` refs.
128
128
  */
129
129
  export interface DraftSkillRef {
package/dist/skill.js CHANGED
@@ -3,7 +3,7 @@ import { bundleSkillFiles, hashSkillBundle } from "./bundle.js";
3
3
  import { fetchSkillArchive } from "./fetch-archive.js";
4
4
  import { readDirectoryAsFiles } from "./node-fs.js";
5
5
  /**
6
- * One `Skill` class for skill bytes. `client.submitRun` materializes the bytes
6
+ * One `Skill` class for skill bytes. `client.submit` materializes the bytes
7
7
  * as an uploaded asset before the run lands; the wire ref becomes
8
8
  * `kind:"asset"`.
9
9
  *
@@ -37,7 +37,7 @@ export class Skill {
37
37
  /**
38
38
  * The wire-level reference. Returns the SDK-private draft shape for
39
39
  * un-materialized skills (kind:"draft", with name + contentHash).
40
- * `client.submitRun` walks these and uploads them before the run
40
+ * `client.submit` walks these and uploads them before the run
41
41
  * lands.
42
42
  */
43
43
  get ref() {
@@ -54,7 +54,7 @@ export class Skill {
54
54
  * Build a draft Skill from an inline files map. The SDK validates
55
55
  * basic safety (no path traversal, size caps, has `SKILL.md`),
56
56
  * deterministically zips the bundle, and computes the
57
- * `sha256:<hex>` content hash. `client.submitRun` materializes
57
+ * `sha256:<hex>` content hash. `client.submit` materializes
58
58
  * these before the run lands.
59
59
  */
60
60
  static async fromFiles(args) {
@@ -92,7 +92,7 @@ export class Skill {
92
92
  *
93
93
  * The archive must contain `SKILL.md` at its root, or inside a single
94
94
  * top-level folder (which is stripped). The signed URL only needs to be valid
95
- * for this call; `client.submitRun` snapshots the bytes into the run.
95
+ * for this call; `client.submit` snapshots the bytes into the run.
96
96
  *
97
97
  * Universal (Node 18+ / browser): requires a global `fetch`, or pass one.
98
98
  */
@@ -120,7 +120,7 @@ export class Skill {
120
120
  * `Skill` record returned by `client.skills.list()` / `.get()`:
121
121
  *
122
122
  * const [s] = await client.skills.list();
123
- * await client.submitRun({ ..., skills: [Skill.fromCatalog(s)] });
123
+ * await client.submit({ ..., skills: [Skill.fromCatalog(s)] });
124
124
  *
125
125
  * The record must be `ready` (it has a content hash). Unlike the draft
126
126
  * builders this performs no upload — the bytes already live in the catalog.
@@ -141,9 +141,9 @@ export class Skill {
141
141
  return new Skill(ref);
142
142
  }
143
143
  /**
144
- * Internal: yield the draft's bytes + metadata so `client.submitRun`
144
+ * Internal: yield the draft's bytes + metadata so `client.submit`
145
145
  * can upload the asset. After this returns, the Skill is marked consumed
146
- * so a second submitRun call against the same instance throws
146
+ * so a second submit call against the same instance throws
147
147
  * (avoid silently re-uploading; explicit re-construction is the
148
148
  * supported retry pattern).
149
149
  *
@@ -151,8 +151,8 @@ export class Skill {
151
151
  */
152
152
  _takeDraftBundle() {
153
153
  if (this.#consumed) {
154
- throw new Error("Skill: cannot reuse a consumed Skill in submitRun. Build a fresh Skill via " +
155
- "Skill.fromPath(...) / Skill.fromFiles(...) per submitRun call.");
154
+ throw new Error("Skill: cannot reuse a consumed Skill in submit. Build a fresh Skill via " +
155
+ "Skill.fromPath(...) / Skill.fromFiles(...) per submit call.");
156
156
  }
157
157
  if (this.#ref.kind !== "draft" || !this.#inlineBytes) {
158
158
  return undefined;
@@ -190,7 +190,7 @@ export class Skill {
190
190
  toJSON() {
191
191
  if (this.#ref.kind === "draft") {
192
192
  throw new Error("Skill: draft Skills cannot be JSON-serialised — they only become wire refs when " +
193
- "client.submitRun uploads the bytes as an asset.");
193
+ "client.submit uploads the bytes as an asset.");
194
194
  }
195
195
  return this.#ref;
196
196
  }
package/dist/skill.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"skill.js","sourceRoot":"","sources":["../src/skill.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAInB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAmB,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,KAAK;IACP,IAAI,CAA2B;IAC/B,YAAY,CAAyB;IAC9C,SAAS,GAAG,KAAK,CAAC;IAElB;;;OAGG;IACH,YAAoB,GAA6B,EAAE,WAAwB;QACzE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACH,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,kEAAkE;IAClE,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;IACvD,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAA2D;QAChF,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAA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AAC;QACvC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,gEAAgE;gBAC9D,iDAAiD,CACpD,CAAC;QACJ,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC;YACzC,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,IAAI,EAAE,MAAM,CAAC,WAAW;YACxB,WAAW,EAAE,iBAAiB;SAC/B,CAAC,CAAC;QACH,MAAM,GAAG,GAAa,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QACtF,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CACb,kFAAkF;gBAClF,8CAA8C,CAC/C,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF"}
package/dist/version.d.ts CHANGED
@@ -6,4 +6,4 @@
6
6
  *
7
7
  * Used by the (future) User-Agent header on outbound SDK requests.
8
8
  */
9
- export declare const SDK_VERSION = "0.18.0";
9
+ export declare const SDK_VERSION = "0.19.0";
package/dist/version.js CHANGED
@@ -6,5 +6,5 @@
6
6
  *
7
7
  * Used by the (future) User-Agent header on outbound SDK requests.
8
8
  */
9
- export const SDK_VERSION = "0.18.0";
9
+ export const SDK_VERSION = "0.19.0";
10
10
  //# sourceMappingURL=version.js.map
package/docs/cleanup.md CHANGED
@@ -17,7 +17,7 @@ retention field is rejected if supplied.
17
17
  ```ts
18
18
  import { RunModels } from "@aexhq/sdk";
19
19
 
20
- const runId = await aex.submitRun({
20
+ const runId = await aex.submit({
21
21
  model: RunModels.CLAUDE_HAIKU_4_5,
22
22
  prompt: "...",
23
23
  secrets: { apiKey: process.env.ANTHROPIC_API_KEY! }
@@ -6,7 +6,7 @@ title: Credentials
6
6
 
7
7
  aex does not store provider keys or MCP credential values across runs.
8
8
 
9
- The caller passes a workspace-scoped SDK token and the provider key inline on every `submitRun` call. aex holds the bundle in run-scoped custody for the run lifecycle and attempts terminal cleanup/revocation for the aex-controlled references. MCP credentials and proxy endpoint auth values travel the same way.
9
+ The caller passes a workspace-scoped SDK token and the provider key inline on every `submit` call. aex holds the bundle in run-scoped custody for the run lifecycle and attempts terminal cleanup/revocation for the aex-controlled references. MCP credentials and proxy endpoint auth values travel the same way.
10
10
 
11
11
  A run targets exactly one provider (selected by `provider`, default `anthropic`), so the key is a single flat field:
12
12
 
@@ -80,7 +80,7 @@ const proxyEndpointAuth = [
80
80
  // Fail fast at submission time when policy and auth disagree.
81
81
  validateProxyAuth(proxyEndpoints, proxyEndpointAuth);
82
82
 
83
- const runId = await aex.submitRun({
83
+ const runId = await aex.submit({
84
84
  model: RunModels.CLAUDE_HAIKU_4_5,
85
85
  prompt: "…",
86
86
  proxyEndpoints,
@@ -119,7 +119,7 @@ const proxyEndpoints = [
119
119
  }
120
120
  ] as const;
121
121
 
122
- const runId = await aex.submitRun({
122
+ const runId = await aex.submit({
123
123
  model: RunModels.CLAUDE_HAIKU_4_5,
124
124
  prompt: "…",
125
125
  proxyEndpoints,
@@ -155,4 +155,4 @@ const allowedHosts = buildPlatformAllowedHosts({
155
155
 
156
156
  ### Secrets are always explicit at the call site
157
157
 
158
- There is no `defaultSecrets` and no client-held secret state. Every `submitRun` call carries its full `secrets` bundle (one provider key + optional MCP credentials + optional `proxyEndpointAuth`). This is the agent-first invariant: the credentials being used on any given call are visible in the same line of code that submits the run.
158
+ There is no `defaultSecrets` and no client-held secret state. Every `submit` call carries its full `secrets` bundle (one provider key + optional MCP credentials + optional `proxyEndpointAuth`). This is the agent-first invariant: the credentials being used on any given call are visible in the same line of code that submits the run.
package/docs/events.md CHANGED
@@ -48,7 +48,7 @@ and `3` when `--timeout` elapses first (a `--timeout` on `events --follow` /
48
48
  `run --follow` uses the same exit-`3` convention). Durations accept `ms`/`s`/`m`/`h`
49
49
  suffixes or a bare millisecond integer.
50
50
 
51
- Both surfaces observe the same events. A subscriber attached after `submitRun()` returns replays the events it missed, then continues live.
51
+ Both surfaces observe the same events. A subscriber attached after `submit()` returns replays the events it missed, then continues live.
52
52
 
53
53
  ## Terminal events vs. the run record
54
54
 
@@ -90,7 +90,7 @@ run's last stream event, immediately after the durable record commits.
90
90
 
91
91
  ## Event shape
92
92
 
93
- Events are typed as the discriminated `RunEvent` union for compatibility and as the versioned coordinator envelope for live consumers. aex records raw runtime/provider payloads **after** secret redaction and structural sanitization, so the bytes you see never contain the provider key, MCP credentials, or proxy bearer that were supplied to `submitRun`.
93
+ Events are typed as the discriminated `RunEvent` union for compatibility and as the versioned coordinator envelope for live consumers. aex records raw runtime/provider payloads **after** secret redaction and structural sanitization, so the bytes you see never contain the provider key, MCP credentials, or proxy bearer that were supplied to `submit`.
94
94
 
95
95
  ## Typed helpers
96
96
 
package/docs/outputs.md CHANGED
@@ -11,7 +11,7 @@ Every run produces durable metadata (status, events, snapshots, cleanup state) a
11
11
  ```ts
12
12
  import { RunModels } from "@aexhq/sdk";
13
13
 
14
- const runId = await aex.submitRun({
14
+ const runId = await aex.submit({
15
15
  model: RunModels.CLAUDE_HAIKU_4_5,
16
16
  prompt: "Produce a report and save it as a file.",
17
17
  secrets: { apiKey }
@@ -90,7 +90,7 @@ console.log(looseReport.byteLength);
90
90
  ## `outputs.allowedDirs` — override capture roots
91
91
 
92
92
  ```ts
93
- aex.submitRun({
93
+ aex.submit({
94
94
  /* ... */,
95
95
  outputs: {
96
96
  allowedDirs: ["/workspace/reports", "/workspace/state"]
@@ -115,7 +115,7 @@ Runtime notes:
115
115
  ## `outputs.deniedDirs` — subtract noise
116
116
 
117
117
  ```ts
118
- aex.submitRun({
118
+ aex.submit({
119
119
  /* ... */,
120
120
  outputs: {
121
121
  deniedDirs: ["node_modules", "/var/cache", "*.tmp"]
@@ -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.0",
3
+ "version": "0.19.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.0"
29
+ "@aexhq/contracts": "0.19.0"
30
30
  },
31
31
  "engines": {
32
32
  "node": ">=20"