@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
package/dist/cli.mjs CHANGED
@@ -126,97 +126,81 @@ var PROVIDER_PUBLIC_SUPPORT = {
126
126
  runtimeEvidence: {
127
127
  managed: COMMON_EVIDENCE
128
128
  }
129
+ },
130
+ // Doubao (ByteDance) via the official Ark API — international BytePlus gateway.
131
+ // Wired + parser/routing-verified but not yet proven against a live BytePlus
132
+ // account, so `live-unverified`. Promote to `supported` (and swap COMMON_EVIDENCE
133
+ // for a DOUBAO_MANAGED_EVIDENCE pointer to live-sdk-doubao.test.ts) once the
134
+ // live run passes.
135
+ doubao: {
136
+ displayName: "Doubao",
137
+ status: "live-unverified",
138
+ docsAnchor: "doubao",
139
+ docs: COMMON_DOCS,
140
+ evidence: COMMON_EVIDENCE,
141
+ runtimeEvidence: {
142
+ managed: COMMON_EVIDENCE
143
+ }
144
+ },
145
+ // Doubao (ByteDance) via the official Ark API — China Volcengine gateway.
146
+ // Same wiring as `doubao`; additionally gated on CF Worker egress reaching the
147
+ // Beijing host (see apps/egress-probe). `live-unverified` until proven live.
148
+ "doubao-cn": {
149
+ displayName: "Doubao (China)",
150
+ status: "live-unverified",
151
+ docsAnchor: "doubao-cn",
152
+ docs: COMMON_DOCS,
153
+ evidence: COMMON_EVIDENCE,
154
+ runtimeEvidence: {
155
+ managed: COMMON_EVIDENCE
156
+ }
129
157
  }
130
158
  };
131
159
 
132
160
  // ../contracts/dist/models.js
133
- var RUN_MODELS = [
134
- "claude-haiku-4-5",
135
- "claude-3-5-haiku-latest",
136
- "claude-3-5-sonnet-latest",
137
- "deepseek-v4-flash",
138
- "deepseek-v4-pro",
139
- "deepseek-chat",
140
- "deepseek-reasoner",
141
- "gpt-4.1",
142
- "gpt-4o-mini",
143
- "gemini-2.0-flash",
144
- "gemini-2.5-flash",
145
- "mistral-large-latest",
146
- "mistral-small-latest",
147
- "openai/gpt-4o-mini",
148
- "openai/gpt-4o",
149
- "google/gemini-2.0-flash-001"
150
- ];
151
- var Models = {
152
- /** Claude Haiku 4.5 Anthropic. */
153
- CLAUDE_HAIKU_4_5: "claude-haiku-4-5",
154
- /** Claude 3.5 Haiku (latest)Anthropic. */
155
- CLAUDE_3_5_HAIKU_LATEST: "claude-3-5-haiku-latest",
156
- /** Claude 3.5 Sonnet (latest) Anthropic. */
157
- CLAUDE_3_5_SONNET_LATEST: "claude-3-5-sonnet-latest",
158
- /** DeepSeek V4 Flash — DeepSeek (non-thinking, fast). */
159
- DEEPSEEK_V4_FLASH: "deepseek-v4-flash",
160
- /** DeepSeek V4 Pro — DeepSeek (reasoning-heavy). */
161
- DEEPSEEK_V4_PRO: "deepseek-v4-pro",
162
- /**
163
- * @deprecated Legacy alias DeepSeek routes to `deepseek-v4-flash` (non-thinking).
164
- * DeepSeek removes this name on 2026-07-24 15:59 UTC — migrate to
165
- * {@link Models.DEEPSEEK_V4_FLASH}.
166
- */
167
- DEEPSEEK_CHAT: "deepseek-chat",
168
- /**
169
- * @deprecated Legacy alias DeepSeek routes to `deepseek-v4-flash` (thinking).
170
- * DeepSeek removes this name on 2026-07-24 15:59 UTC — migrate to
171
- * {@link Models.DEEPSEEK_V4_FLASH} (or {@link Models.DEEPSEEK_V4_PRO} for
172
- * heavier reasoning).
173
- */
174
- DEEPSEEK_REASONER: "deepseek-reasoner",
175
- /** GPT-4.1 — OpenAI. */
176
- GPT_4_1: "gpt-4.1",
177
- /** GPT-4o mini — OpenAI. */
178
- GPT_4O_MINI: "gpt-4o-mini",
179
- /** Gemini 2.0 Flash — Gemini. */
180
- GEMINI_2_0_FLASH: "gemini-2.0-flash",
181
- /** Gemini 2.5 Flash — Gemini. */
182
- GEMINI_2_5_FLASH: "gemini-2.5-flash",
183
- /** Mistral Large (latest) — Mistral. */
184
- MISTRAL_LARGE_LATEST: "mistral-large-latest",
185
- /** Mistral Small (latest) — Mistral. */
186
- MISTRAL_SMALL_LATEST: "mistral-small-latest",
187
- /** GPT-4o mini via OpenRouter (provider-prefixed) — cheap, tool-obedient. */
188
- OPENROUTER_GPT_4O_MINI: "openai/gpt-4o-mini",
189
- /** GPT-4o via OpenRouter (provider-prefixed) — stronger, tool-obedient. */
190
- OPENROUTER_GPT_4O: "openai/gpt-4o",
191
- /** Gemini 2.0 Flash via OpenRouter (provider-prefixed) — cheap, tool-obedient. */
192
- OPENROUTER_GEMINI_2_0_FLASH: "google/gemini-2.0-flash-001"
193
- };
194
- var RUN_MODELS_BY_PROVIDER = {
195
- anthropic: [
196
- Models.CLAUDE_HAIKU_4_5,
197
- Models.CLAUDE_3_5_HAIKU_LATEST,
198
- Models.CLAUDE_3_5_SONNET_LATEST
199
- ],
200
- deepseek: [
201
- Models.DEEPSEEK_V4_FLASH,
202
- Models.DEEPSEEK_V4_PRO,
203
- Models.DEEPSEEK_CHAT,
204
- Models.DEEPSEEK_REASONER
205
- ],
206
- openai: [Models.GPT_4_1, Models.GPT_4O_MINI],
207
- gemini: [Models.GEMINI_2_0_FLASH, Models.GEMINI_2_5_FLASH],
208
- mistral: [Models.MISTRAL_LARGE_LATEST, Models.MISTRAL_SMALL_LATEST],
209
- openrouter: [
210
- Models.OPENROUTER_GPT_4O_MINI,
211
- Models.OPENROUTER_GPT_4O,
212
- Models.OPENROUTER_GEMINI_2_0_FLASH
213
- ]
161
+ var MODEL_PROVIDER_IDS = {
162
+ "claude-haiku-4-5": { anthropic: "claude-haiku-4-5" },
163
+ "claude-3-5-haiku-latest": { anthropic: "claude-3-5-haiku-latest" },
164
+ "claude-3-5-sonnet-latest": { anthropic: "claude-3-5-sonnet-latest" },
165
+ "deepseek-v4-flash": { deepseek: "deepseek-v4-flash" },
166
+ "deepseek-v4-pro": { deepseek: "deepseek-v4-pro" },
167
+ "deepseek-chat": { deepseek: "deepseek-chat" },
168
+ "deepseek-reasoner": { deepseek: "deepseek-reasoner" },
169
+ "gpt-4.1": { openai: "gpt-4.1" },
170
+ "gpt-4o-mini": { openai: "gpt-4o-mini", openrouter: "openai/gpt-4o-mini" },
171
+ "gpt-4o": { openrouter: "openai/gpt-4o" },
172
+ "gemini-2.0-flash": { gemini: "gemini-2.0-flash", openrouter: "google/gemini-2.0-flash-001" },
173
+ "gemini-2.5-flash": { gemini: "gemini-2.5-flash" },
174
+ "mistral-large-latest": { mistral: "mistral-large-latest" },
175
+ "mistral-small-latest": { mistral: "mistral-small-latest" },
176
+ // Doubao (ByteDance) via the official Ark API. Served by both the
177
+ // international BytePlus ModelArk gateway (`doubao`, the default) and the
178
+ // China Volcengine Ark gateway (`doubao-cn`). Ark accepts the API-format
179
+ // model NAME directly in the chat-completions `model` field (no `ep-…`
180
+ // inference-endpoint id). The native strings are the same Ark catalog ids on
181
+ // both gateways; BytePlus per-account availability is confirmed at live-verify
182
+ // (both providers ship `live-unverified` until then provider-support.ts).
183
+ // pro — Doubao Seed 1.8 (flagship, 256K context).
184
+ // flash Doubao Seed 1.6 Flash (fast/cheap, 256K context).
185
+ "doubao-seed-pro": { doubao: "doubao-seed-1-8-251228", "doubao-cn": "doubao-seed-1-8-251228" },
186
+ "doubao-seed-flash": {
187
+ doubao: "doubao-seed-1-6-flash-250828",
188
+ "doubao-cn": "doubao-seed-1-6-flash-250828"
189
+ }
214
190
  };
215
- var PROVIDER_BY_MODEL = (() => {
191
+ var RUN_MODELS = Object.keys(MODEL_PROVIDER_IDS);
192
+ var PROVIDERS_BY_MODEL = (() => {
216
193
  const map = {};
217
- for (const [provider, models] of Object.entries(RUN_MODELS_BY_PROVIDER)) {
218
- for (const model of models) {
219
- map[model] = provider;
194
+ for (const [model, providers] of Object.entries(MODEL_PROVIDER_IDS)) {
195
+ map[model] = Object.keys(providers);
196
+ }
197
+ return map;
198
+ })();
199
+ var RUN_MODELS_BY_PROVIDER = (() => {
200
+ const map = {};
201
+ for (const [model, providers] of Object.entries(MODEL_PROVIDER_IDS)) {
202
+ for (const provider of Object.keys(providers)) {
203
+ (map[provider] ??= []).push(model);
220
204
  }
221
205
  }
222
206
  return map;
@@ -801,7 +785,9 @@ var RUN_PROVIDERS = [
801
785
  "openai",
802
786
  "gemini",
803
787
  "mistral",
804
- "openrouter"
788
+ "openrouter",
789
+ "doubao",
790
+ "doubao-cn"
805
791
  ];
806
792
  var DEFAULT_RUN_PROVIDER = "anthropic";
807
793
  var RUNTIME_KINDS = ["managed"];
@@ -1304,11 +1290,13 @@ __export(operations_exports, {
1304
1290
  createAgentsMd: () => createAgentsMd,
1305
1291
  createFile: () => createFile,
1306
1292
  createOutputLink: () => createOutputLink,
1293
+ createSecret: () => createSecret,
1307
1294
  createSkillBundle: () => createSkillBundle,
1308
1295
  createSkillBundleDirect: () => createSkillBundleDirect,
1309
1296
  deleteAgentsMd: () => deleteAgentsMd,
1310
1297
  deleteFile: () => deleteFile,
1311
1298
  deleteRun: () => deleteRun,
1299
+ deleteSecret: () => deleteSecret,
1312
1300
  deleteSkill: () => deleteSkill,
1313
1301
  deleteWorkspaceAsset: () => deleteWorkspaceAsset,
1314
1302
  download: () => download,
@@ -1323,13 +1311,17 @@ __export(operations_exports, {
1323
1311
  getFile: () => getFile,
1324
1312
  getRun: () => getRun,
1325
1313
  getRunUnit: () => getRunUnit,
1314
+ getSecret: () => getSecret,
1326
1315
  getSkill: () => getSkill,
1327
1316
  listAgentsMd: () => listAgentsMd,
1328
1317
  listFiles: () => listFiles,
1329
1318
  listOutputs: () => listOutputs,
1330
1319
  listRunEvents: () => listRunEvents,
1320
+ listSecrets: () => listSecrets,
1331
1321
  listSkills: () => listSkills,
1332
1322
  resolveOutputFileSelector: () => resolveOutputFileSelector,
1323
+ revealSecret: () => revealSecret,
1324
+ rotateSecret: () => rotateSecret,
1333
1325
  submitRun: () => submitRun,
1334
1326
  submitRunMultipart: () => submitRunMultipart,
1335
1327
  uploadWorkspaceAsset: () => uploadWorkspaceAsset,
@@ -2438,6 +2430,44 @@ function unwrapFile(result) {
2438
2430
  }
2439
2431
  return result;
2440
2432
  }
2433
+ async function createSecret(http, args) {
2434
+ const result = await http.request("/api/secrets", {
2435
+ method: "POST",
2436
+ body: JSON.stringify({ name: args.name, value: args.value })
2437
+ });
2438
+ return unwrapSecret(result);
2439
+ }
2440
+ async function listSecrets(http) {
2441
+ const result = await http.request("/api/secrets");
2442
+ if (Array.isArray(result)) {
2443
+ return result;
2444
+ }
2445
+ return result.secrets;
2446
+ }
2447
+ async function getSecret(http, name) {
2448
+ const result = await http.request(`/api/secrets/${encodeURIComponent(name)}`);
2449
+ return unwrapSecret(result);
2450
+ }
2451
+ async function revealSecret(http, name) {
2452
+ return http.request(`/api/secrets/${encodeURIComponent(name)}/reveal`, {
2453
+ method: "POST"
2454
+ });
2455
+ }
2456
+ async function rotateSecret(http, args) {
2457
+ const result = await http.request(`/api/secrets/${encodeURIComponent(args.name)}/rotate`, { method: "POST", body: JSON.stringify({ value: args.value }) });
2458
+ return unwrapSecret(result);
2459
+ }
2460
+ async function deleteSecret(http, name) {
2461
+ await http.request(`/api/secrets/${encodeURIComponent(name)}`, {
2462
+ method: "DELETE"
2463
+ });
2464
+ }
2465
+ function unwrapSecret(result) {
2466
+ if (result && typeof result === "object" && "secret" in result) {
2467
+ return result.secret;
2468
+ }
2469
+ return result;
2470
+ }
2441
2471
  function unwrapSkill(result) {
2442
2472
  if (result && typeof result === "object" && "skill" in result) {
2443
2473
  return result.skill;
@@ -1 +1 @@
1
- 6b7daebf5f92a017a95c00574d40df47dcac2dece0c2098a60bacd5970b98fa7 cli.mjs
1
+ cbf31722f64f1ca909287456236e1e689291516e227dcdd69935300bbc0994c9 cli.mjs
package/dist/client.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { HttpClient, type AexEvent, type AgentsMdRecord, type CredentialMode, type DebugSink, type FetchLike, type FileRecord, type Output, type OutputMode, type PlatformEnvironmentInput, type PlatformSubmission, type PlatformInlineSecrets, type PlatformProxyEndpoint, type PlatformProxyEndpointAuth, type PlatformPostHookInput, type Run, type RunModel, type RunEvent, type RunProvider, type RunUnit, type Builtin, type RuntimeSize, type RuntimeKind, type SignedOutputLink, type Skill as SkillRecord, type WhoAmI } from "./_contracts/index.js";
1
+ import { HttpClient, SecretString, type AexEvent, type AgentsMdRecord, type CredentialMode, type DebugSink, type FetchLike, type FileRecord, type Output, type OutputMode, type PlatformEnvironmentInput, type PlatformSubmission, type PlatformInlineSecrets, type PlatformProxyEndpoint, type PlatformProxyEndpointAuth, type PlatformPostHookInput, type Run, type RunModel, type RunEvent, type RunProvider, type SecretRecord, type SecretReveal, type RunUnit, type Builtin, type RuntimeSize, type RuntimeKind, type SignedOutputLink, type Skill as SkillRecord, type WhoAmI } from "./_contracts/index.js";
2
2
  import { AgentsMd } from "./agents-md.js";
3
3
  import { type UploadedAsset } from "./asset-upload.js";
4
4
  import { File } from "./file.js";
5
5
  import { McpServer } from "./mcp-server.js";
6
6
  import { ProxyEndpoint } from "./proxy-endpoint.js";
7
+ import { Secret } from "./secret.js";
7
8
  import { Skill } from "./skill.js";
8
9
  export interface AgentExecutorOptions {
9
10
  /** Workspace-scoped SDK API token. */
@@ -45,7 +46,7 @@ export interface AgentExecutorOptions {
45
46
  * `idempotencyKey` is auto-generated when omitted; pass one explicitly
46
47
  * if you want client-driven retry safety across process restarts.
47
48
  */
48
- export interface SubmitRunOptions {
49
+ export interface SubmitOptions {
49
50
  /**
50
51
  * Credential source for upstream provider access. Omitted defaults to
51
52
  * `"byok"`, which requires `secrets.apiKey`.
@@ -63,7 +64,7 @@ export interface SubmitRunOptions {
63
64
  *
64
65
  * Optional today: when omitted it is derived from `model` (each currently
65
66
  * supported model maps to a single provider), so existing call sites keep
66
- * working. If supplied it MUST match the model's provider or `submitRun`
67
+ * working. If supplied it MUST match the model's provider or `submit`
67
68
  * throws.
68
69
  */
69
70
  readonly provider?: RunProvider;
@@ -85,6 +86,16 @@ export interface SubmitRunOptions {
85
86
  readonly agentsMd?: readonly AgentsMd[];
86
87
  readonly files?: readonly File[];
87
88
  readonly mcpServers?: readonly McpServer[];
89
+ /**
90
+ * Env-var secrets, keyed by env name. Each value is a {@link Secret}:
91
+ * `Secret.value(v)` (ephemeral per-run — vaulted at submit, deleted at the
92
+ * run's terminal) or `Secret.ref(handle)` (a persisted workspace secret,
93
+ * resolved server-side). The SDK splits these into value-free declarations on
94
+ * the hashed submission and ephemeral values into the vaulted secrets channel,
95
+ * so a value never enters the run snapshot or the idempotency hash. The
96
+ * runtime injects each as the named env var.
97
+ */
98
+ readonly secretEnv?: Readonly<Record<string, Secret>>;
88
99
  readonly environment?: PlatformEnvironmentInput;
89
100
  readonly metadata?: PlatformSubmission["metadata"];
90
101
  /**
@@ -148,8 +159,18 @@ export interface SubmitRunOptions {
148
159
  readonly outputMode?: OutputMode;
149
160
  readonly secrets: PlatformInlineSecrets;
150
161
  readonly idempotencyKey?: string;
162
+ /**
163
+ * Lineage parent (agent-session §9). When set, the server admits this run as
164
+ * a CHILD of `parentRunId` (same workspace required), enforcing the
165
+ * max-subagent-depth + per-root concurrency caps and persisting the lineage.
166
+ * The depth is always derived server-side from the parent row — clients name
167
+ * the parent, never the depth.
168
+ */
169
+ readonly parentRunId?: string;
151
170
  readonly signal?: AbortSignal;
152
171
  }
172
+ /** @deprecated Renamed to {@link SubmitOptions}. Kept for one release. */
173
+ export type SubmitRunOptions = SubmitOptions;
153
174
  export interface StreamEventsOptions {
154
175
  /** Poll interval in ms for the `RunEvent` snapshot loop. Default 1000. */
155
176
  readonly intervalMs?: number;
@@ -193,7 +214,7 @@ export interface OutputDownloadOptions {
193
214
  * Workspace skill admin operations exposed under `client.skills`.
194
215
  *
195
216
  * New run submissions usually use `Skill.fromFiles(...)` or
196
- * `Skill.fromPath(...)` directly inside `submitRun`; the SDK materializes
217
+ * `Skill.fromPath(...)` directly inside `submit`; the SDK materializes
197
218
  * those bytes to the hosted asset store before the run lands. This namespace is the read/delete
198
219
  * surface for workspace skill records and the internal transport used by the
199
220
  * legacy CLI upload command.
@@ -241,7 +262,7 @@ export declare class SkillsClient {
241
262
  * Workspace AgentsMd admin operations exposed under `client.agentsMd`.
242
263
  *
243
264
  * New run submissions usually use `AgentsMd.fromContent(...)` or
244
- * `AgentsMd.fromPath(...)` directly inside `submitRun`; the SDK
265
+ * `AgentsMd.fromPath(...)` directly inside `submit`; the SDK
245
266
  * materializes those bytes to the hosted asset store before the run lands. This namespace is
246
267
  * the read/delete surface for persisted AgentsMd records plus an internal
247
268
  * upload transport retained for legacy callers.
@@ -265,7 +286,7 @@ export declare class AgentsMdClient {
265
286
  * Workspace File admin operations exposed under `client.files`.
266
287
  *
267
288
  * New run submissions usually use `File.fromPath(...)` or
268
- * `File.fromBytes(...)` directly inside `submitRun`; the SDK materializes
289
+ * `File.fromBytes(...)` directly inside `submit`; the SDK materializes
269
290
  * those bytes to the hosted asset store before the run lands. This namespace is the read/delete
270
291
  * surface for persisted file records plus an internal upload transport
271
292
  * retained for legacy callers.
@@ -285,6 +306,52 @@ export declare class FilesClient {
285
306
  readonly bytes: Uint8Array;
286
307
  }): Promise<FileRecord>;
287
308
  }
309
+ /**
310
+ * Workspace secret management exposed under `client.secrets`, mirroring
311
+ * `client.skills` / `client.files`.
312
+ *
313
+ * Lifecycle parity with assets/skills: a `Secret.value(...)` is per-run and
314
+ * gone at terminal; `set` (or promoting an ephemeral via `secret.upload`)
315
+ * persists a named, searchable workspace secret you can `get` (metadata),
316
+ * `reveal` (audited value), `rotate`, `list`, and `delete`. The identity is the
317
+ * `name`; the value rotates under that stable name.
318
+ *
319
+ * Values are write-only: `set`/`rotate` send the value in the request BODY (never
320
+ * the URL); `get`/`list` return metadata only; `reveal` is the explicit audited
321
+ * value read.
322
+ */
323
+ export declare class SecretsClient {
324
+ #private;
325
+ constructor(http: HttpClient);
326
+ /** Create a named workspace secret. Accepts a raw string or a `SecretString`. */
327
+ set(args: {
328
+ readonly name: string;
329
+ readonly value: string | SecretString;
330
+ }): Promise<SecretRecord>;
331
+ /** List workspace secret metadata (searchable by name). Never returns values. */
332
+ list(): Promise<readonly SecretRecord[]>;
333
+ /** Metadata for one workspace secret by name. Never returns the value. */
334
+ get(name: string): Promise<SecretRecord>;
335
+ /** Audited value read — the only path that returns a workspace secret value. */
336
+ reveal(name: string): Promise<SecretReveal>;
337
+ /** Replace the value of an existing workspace secret; bumps its version. */
338
+ rotate(args: {
339
+ readonly name: string;
340
+ readonly value: string | SecretString;
341
+ }): Promise<SecretRecord>;
342
+ delete(name: string): Promise<void>;
343
+ /**
344
+ * Internal: create a workspace secret from an ephemeral `Secret.value(...)`
345
+ * being promoted via `secret.upload(client, { name })`. NOT part of the
346
+ * public API — callers use `set`.
347
+ */
348
+ _createWorkspaceSecret(args: {
349
+ readonly name: string;
350
+ readonly value: string;
351
+ }): Promise<{
352
+ readonly name: string;
353
+ }>;
354
+ }
288
355
  /**
289
356
  * Unified user-facing client for the aex platform. The same class
290
357
  * powers the published `@aexhq/sdk` SDK and (under the hood) every host-side
@@ -301,6 +368,7 @@ export declare class AgentExecutor {
301
368
  readonly skills: SkillsClient;
302
369
  readonly agentsMd: AgentsMdClient;
303
370
  readonly files: FilesClient;
371
+ readonly secrets: SecretsClient;
304
372
  constructor(options: AgentExecutorOptions);
305
373
  /**
306
374
  * Internal: forwards to `SkillsClient._uploadSkillBundle`. NOT part of
@@ -336,6 +404,18 @@ export declare class AgentExecutor {
336
404
  readonly name: string;
337
405
  readonly bytes: Uint8Array;
338
406
  }): Promise<FileRecord>;
407
+ /**
408
+ * Internal: satisfies the `SecretUploader` surface so a
409
+ * `Secret.value(...).upload(client, { name })` promotes an ephemeral secret
410
+ * into the workspace store. Forwarded to `SecretsClient._createWorkspaceSecret`.
411
+ * NOT part of the public API.
412
+ */
413
+ _createWorkspaceSecret(args: {
414
+ readonly name: string;
415
+ readonly value: string;
416
+ }): Promise<{
417
+ readonly name: string;
418
+ }>;
339
419
  /**
340
420
  * Internal: materialize raw bytes to the content-addressable asset store
341
421
  * (`/assets/presign` → PUT → `/assets/finalize`). Used by `Skill.upload(this)`
@@ -353,10 +433,10 @@ export declare class AgentExecutor {
353
433
  * resolve a subsequent `getRun`/`listOutputs` is guaranteed consistent (it
354
434
  * polls `getRun` via {@link waitForRun}, NOT the RUN_FINISHED event, which the
355
435
  * runner emits before the platform commits the record). For long-running flows
356
- * that need live events, prefer `submitRun` + `streamEnvelopes(runId, {
357
- * settleConsistent: true })`, or `submitRun` + `stream(runId)` + `wait(runId)`.
436
+ * that need live events, prefer `submit` + `streamEnvelopes(runId, {
437
+ * settleConsistent: true })`, or `submit` + `stream(runId)` + `wait(runId)`.
358
438
  */
359
- run(options: SubmitRunOptions): Promise<Run>;
439
+ run(options: SubmitOptions): Promise<Run>;
360
440
  /**
361
441
  * Submit a run and return its run id immediately. Use that id with
362
442
  * `wait`, `stream`, `outputs`, `download`, `cancel`, or `delete`.
@@ -373,7 +453,7 @@ export declare class AgentExecutor {
373
453
  * deduped by content hash, and referenced in the submission as plain
374
454
  * `{ kind:"asset" }` refs — identical to a pre-staged `.upload(client)`.
375
455
  */
376
- submitRun(options: SubmitRunOptions): Promise<string>;
456
+ submit(options: SubmitOptions): Promise<string>;
377
457
  getRun(runId: string): Promise<Run>;
378
458
  /** Short alias for `getRun`. */
379
459
  get(runId: string): Promise<Run>;