@aexhq/sdk 0.13.9 → 0.14.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/client.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { HttpClient, type AexEvent, type AgentsMdRecord, type CredentialMode, type DebugSink, type FetchLike, type FileRecord, type Output, type OutputMode, type PlatformSubmission, type PlatformInlineSecrets, type PlatformProxyEndpoint, type PlatformProxyEndpointAuth, type Run, type RunEvent, type RunProvider, type RunUnit, 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
+ import { type UploadedAsset } from "./asset-upload.js";
3
4
  import { File } from "./file.js";
4
5
  import { McpServer } from "./mcp-server.js";
5
6
  import { ProxyEndpoint } from "./proxy-endpoint.js";
@@ -37,8 +38,9 @@ export interface AgentExecutorOptions {
37
38
  * secret is bundled into the constructor and split into
38
39
  * `secrets.proxyEndpointAuth` server-side; the public submission
39
40
  * only carries the declaration (`{ name, baseUrl, authShape, … }`).
40
- * - `secrets.<provider>.apiKey` — REQUIRED for the selected provider.
41
- * The platform never holds a long-lived provider key on your behalf.
41
+ * - `secrets.apiKey` — REQUIRED: the provider key for the selected
42
+ * `provider`. The platform never holds a long-lived provider key on
43
+ * your behalf.
42
44
  *
43
45
  * `idempotencyKey` is auto-generated when omitted; pass one explicitly
44
46
  * if you want client-driven retry safety across process restarts.
@@ -46,16 +48,16 @@ export interface AgentExecutorOptions {
46
48
  export interface SubmitRunOptions {
47
49
  /**
48
50
  * Credential source for upstream provider access. Omitted defaults to
49
- * `"byok"`, which requires `secrets.<provider>.apiKey` as today.
51
+ * `"byok"`, which requires `secrets.apiKey`.
50
52
  * `"managed"` is reserved for paid managed-key mode and currently fails
51
53
  * closed until the hosted private implementation is wired.
52
54
  */
53
55
  readonly credentialMode?: CredentialMode;
54
56
  /**
55
57
  * Provider selector. Optional — defaults to
56
- * {@link DEFAULT_RUN_PROVIDER} (`"anthropic"`). The call site must
57
- * supply the matching `secrets.<provider>.apiKey` and MUST NOT
58
- * supply any other provider's secret block.
58
+ * {@link DEFAULT_RUN_PROVIDER} (`"anthropic"`). Selects which upstream
59
+ * model route the managed provider-proxy uses; the BYOK key for it is
60
+ * supplied as `secrets.apiKey`.
59
61
  */
60
62
  readonly provider?: RunProvider;
61
63
  /**
@@ -274,10 +276,10 @@ export declare class AgentExecutor {
274
276
  * NOTE (tech-debt): this is part of the legacy workspace-skill upload
275
277
  * surface (`SkillsClient` + `operations.createSkillBundle` + the TUS
276
278
  * chunked path in asset-upload.ts). The live submit path materializes
277
- * inline skills via `uploadAsset` instead; `Skill` no longer
278
- * exposes `.upload()`/`.fromId()`. This surface is retained pending a
279
- * deliberate deprecation pass (it still threads into the CLI host
280
- * commands), tracked in the remediation plan as item 4a.
279
+ * inline skills via `uploadAsset` instead; `Skill.upload(client)`
280
+ * pre-stages a draft explicitly for reuse. This surface is retained
281
+ * pending a deliberate deprecation pass (it still threads into the CLI
282
+ * host commands), tracked in the remediation plan as item 4a.
281
283
  */
282
284
  _uploadSkillBundle(args: {
283
285
  readonly name: string;
@@ -301,6 +303,17 @@ export declare class AgentExecutor {
301
303
  readonly name: string;
302
304
  readonly bytes: Uint8Array;
303
305
  }): Promise<FileRecord>;
306
+ /**
307
+ * Internal: materialize raw bytes to the content-addressable asset store
308
+ * (`/assets/presign` → PUT → `/assets/finalize`). Used by `Skill.upload(this)`
309
+ * to pre-upload a draft skill bundle so a later run carries only a plain
310
+ * `kind:"asset"` ref. NOT part of the public API.
311
+ */
312
+ _uploadAsset(args: {
313
+ readonly bytes: Uint8Array;
314
+ readonly hash: string;
315
+ readonly contentType?: string;
316
+ }): Promise<UploadedAsset>;
304
317
  /**
305
318
  * Submit a run and wait for it to reach a terminal state. Returns the
306
319
  * final `Run` record. For long-running flows, prefer `submitRun` +
@@ -316,15 +329,12 @@ export declare class AgentExecutor {
316
329
  * before sending so credentials never enter the hashed submission or
317
330
  * the run snapshot.
318
331
  *
319
- * Unstaged inline skills (`Skill.fromFiles` / `Skill.fromPath`
320
- * without a prior `.upload`) are accepted: the SDK switches to a
321
- * multipart body that carries the canonical zip bytes alongside the
322
- * JSON submission. The dashboard BFF ingests each one through the
323
- * standard workspace-skill upload pipeline (dedup by content hash;
324
- * upload via the existing two-phase pending ready flow) and
325
- * rewrites the run's `skills[]` to reference the resulting `skl_*`
326
- * ids. The bytes persist on aex; the user can browse and
327
- * download the resulting workspace skill from the dashboard.
332
+ * Unstaged inline skills / agentsMd / files (`Skill.fromFiles` /
333
+ * `Skill.fromPath` / `AgentsMd.fromContent` / `File.fromBytes` without a
334
+ * prior `.upload`) are auto-uploaded to the content-addressable asset
335
+ * store (`/assets/presign` PUT `/assets/finalize`) before `POST /runs`,
336
+ * deduped by content hash, and referenced in the submission as plain
337
+ * `{ kind:"asset" }` refs identical to a pre-staged `.upload(client)`.
328
338
  */
329
339
  submitRun(options: SubmitRunOptions): Promise<string>;
330
340
  getRun(runId: string): Promise<Run>;