@aexhq/sdk 0.30.0 → 0.32.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 (71) hide show
  1. package/README.md +23 -9
  2. package/dist/_contracts/connection-ticket.d.ts +1 -1
  3. package/dist/_contracts/connection-ticket.js +1 -1
  4. package/dist/_contracts/event-envelope.d.ts +5 -8
  5. package/dist/_contracts/event-envelope.js +5 -6
  6. package/dist/_contracts/event-stream-client.d.ts +1 -1
  7. package/dist/_contracts/http.js +1 -1
  8. package/dist/_contracts/models.d.ts +0 -76
  9. package/dist/_contracts/models.js +0 -20
  10. package/dist/_contracts/operations.d.ts +2 -64
  11. package/dist/_contracts/operations.js +9 -152
  12. package/dist/_contracts/provider-support.d.ts +48 -138
  13. package/dist/_contracts/provider-support.js +10 -41
  14. package/dist/_contracts/proxy-protocol.d.ts +7 -7
  15. package/dist/_contracts/proxy-protocol.js +8 -8
  16. package/dist/_contracts/run-config.d.ts +7 -20
  17. package/dist/_contracts/run-config.js +8 -46
  18. package/dist/_contracts/run-cost.d.ts +1 -5
  19. package/dist/_contracts/run-cost.js +0 -8
  20. package/dist/_contracts/run-custody.d.ts +4 -6
  21. package/dist/_contracts/run-custody.js +0 -8
  22. package/dist/_contracts/run-unit.d.ts +1 -1
  23. package/dist/_contracts/run-unit.js +6 -6
  24. package/dist/_contracts/runner-event.d.ts +1 -1
  25. package/dist/_contracts/runner-event.js +1 -1
  26. package/dist/_contracts/runtime-manifest.d.ts +13 -26
  27. package/dist/_contracts/runtime-manifest.js +6 -35
  28. package/dist/_contracts/runtime-types.d.ts +1 -3
  29. package/dist/_contracts/sdk-secrets.js +4 -4
  30. package/dist/_contracts/side-effect-audit.d.ts +2 -4
  31. package/dist/_contracts/side-effect-audit.js +2 -4
  32. package/dist/_contracts/status.d.ts +1 -1
  33. package/dist/_contracts/status.js +1 -1
  34. package/dist/_contracts/submission.d.ts +5 -126
  35. package/dist/_contracts/submission.js +10 -182
  36. package/dist/_contracts/webhook-verify.d.ts +1 -1
  37. package/dist/_contracts/webhook-verify.js +1 -1
  38. package/dist/asset-upload.d.ts +4 -10
  39. package/dist/asset-upload.js +4 -47
  40. package/dist/asset-upload.js.map +1 -1
  41. package/dist/cli.mjs +27 -231
  42. package/dist/cli.mjs.sha256 +1 -1
  43. package/dist/client.d.ts +10 -107
  44. package/dist/client.js +23 -132
  45. package/dist/client.js.map +1 -1
  46. package/dist/index.d.ts +4 -4
  47. package/dist/index.js +3 -4
  48. package/dist/index.js.map +1 -1
  49. package/dist/skill.d.ts +1 -1
  50. package/dist/skill.js +1 -1
  51. package/dist/version.d.ts +1 -1
  52. package/dist/version.js +1 -1
  53. package/docs/cleanup.md +4 -4
  54. package/docs/concepts/agent-tools.md +2 -2
  55. package/docs/concepts/composition.md +1 -1
  56. package/docs/concepts/providers-and-runtimes.md +2 -4
  57. package/docs/concepts/runs.md +3 -6
  58. package/docs/credentials.md +5 -8
  59. package/docs/defaults.md +22 -22
  60. package/docs/limits-and-quotas.md +40 -40
  61. package/docs/limits.md +1 -1
  62. package/docs/networking.md +2 -2
  63. package/docs/outputs.md +3 -3
  64. package/docs/provider-runtime-capabilities.md +37 -65
  65. package/docs/public-surface.json +4 -5
  66. package/docs/quickstart.md +19 -6
  67. package/docs/run-config.md +5 -6
  68. package/docs/secrets.md +9 -7
  69. package/docs/skills.md +8 -16
  70. package/docs/vision-skills.md +3 -3
  71. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -3323,14 +3323,14 @@ var init_files = __esm({
3323
3323
  });
3324
3324
 
3325
3325
  // ../../node_modules/.bun/@anthropic-ai+sdk@0.106.0+68a1e3a0c4588df3/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs
3326
- var Models;
3326
+ var Models2;
3327
3327
  var init_models = __esm({
3328
3328
  "../../node_modules/.bun/@anthropic-ai+sdk@0.106.0+68a1e3a0c4588df3/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs"() {
3329
3329
  init_resource();
3330
3330
  init_pagination();
3331
3331
  init_headers();
3332
3332
  init_path();
3333
- Models = class extends APIResource {
3333
+ Models2 = class extends APIResource {
3334
3334
  /**
3335
3335
  * Get a specific model.
3336
3336
  *
@@ -9961,7 +9961,7 @@ var init_beta = __esm({
9961
9961
  Beta = class extends APIResource {
9962
9962
  constructor() {
9963
9963
  super(...arguments);
9964
- this.models = new Models(this._client);
9964
+ this.models = new Models2(this._client);
9965
9965
  this.messages = new Messages(this._client);
9966
9966
  this.agents = new Agents(this._client);
9967
9967
  this.environments = new Environments(this._client);
@@ -9976,7 +9976,7 @@ var init_beta = __esm({
9976
9976
  this.userProfiles = new UserProfiles(this._client);
9977
9977
  }
9978
9978
  };
9979
- Beta.Models = Models;
9979
+ Beta.Models = Models2;
9980
9980
  Beta.Messages = Messages;
9981
9981
  Beta.Agents = Agents;
9982
9982
  Beta.Environments = Environments;
@@ -10961,14 +10961,14 @@ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resour
10961
10961
  });
10962
10962
 
10963
10963
  // ../../node_modules/.bun/@anthropic-ai+sdk@0.106.0+68a1e3a0c4588df3/node_modules/@anthropic-ai/sdk/resources/models.mjs
10964
- var Models2;
10964
+ var Models3;
10965
10965
  var init_models2 = __esm({
10966
10966
  "../../node_modules/.bun/@anthropic-ai+sdk@0.106.0+68a1e3a0c4588df3/node_modules/@anthropic-ai/sdk/resources/models.mjs"() {
10967
10967
  init_resource();
10968
10968
  init_pagination();
10969
10969
  init_headers();
10970
10970
  init_path();
10971
- Models2 = class extends APIResource {
10971
+ Models3 = class extends APIResource {
10972
10972
  /**
10973
10973
  * Get a specific model.
10974
10974
  *
@@ -11781,13 +11781,13 @@ var init_client = __esm({
11781
11781
  super(...arguments);
11782
11782
  this.completions = new Completions(this);
11783
11783
  this.messages = new Messages2(this);
11784
- this.models = new Models2(this);
11784
+ this.models = new Models3(this);
11785
11785
  this.beta = new Beta(this);
11786
11786
  }
11787
11787
  };
11788
11788
  Anthropic.Completions = Completions;
11789
11789
  Anthropic.Messages = Messages2;
11790
- Anthropic.Models = Models2;
11790
+ Anthropic.Models = Models3;
11791
11791
  Anthropic.Beta = Beta;
11792
11792
  }
11793
11793
  });
@@ -11841,7 +11841,7 @@ var PROXY_RESPONSE_MODES = ["status_only", "headers_only", "full"];
11841
11841
  var PROXY_ENDPOINT_DEFAULTS = {
11842
11842
  allowHeaders: [],
11843
11843
  responseMode: "headers_only",
11844
- // 10 MiB. The body is buffered into the Worker to enforce this cap, while the
11844
+ // 10 MiB. The body is buffered in the hosted API to enforce this cap, while the
11845
11845
  // launch default fits practical multimodal/tool POSTs without every endpoint
11846
11846
  // needing an override.
11847
11847
  maxRequestBytes: 10 * 1024 * 1024,
@@ -11860,7 +11860,6 @@ var COMMON_DOCS = [
11860
11860
  ];
11861
11861
  var COMMON_EVIDENCE = [
11862
11862
  { label: "Submission parser and routing parity", href: "../../contracts/test/submission.test.ts" },
11863
- { label: "Runtime support validator", href: "../../contracts/test/runtime-support.test.ts" },
11864
11863
  { label: "Generated matrix freshness", href: "../../../scripts/validate/capability-matrix.test.ts" }
11865
11864
  ];
11866
11865
  var ANTHROPIC_LIVE_USER_EVIDENCE = [
@@ -11879,68 +11878,50 @@ var DEEPSEEK_LIVE_USER_EVIDENCE = [
11879
11878
  href: "../../../apps/user-tests/test/live/live-sdk-comprehensive.test.ts"
11880
11879
  }
11881
11880
  ];
11882
- var ANTHROPIC_MANAGED_EVIDENCE = [
11883
- ...ANTHROPIC_LIVE_USER_EVIDENCE,
11884
- { label: "Runtime support validator", href: "../../contracts/test/runtime-support.test.ts" }
11885
- ];
11886
- var DEEPSEEK_MANAGED_EVIDENCE = [
11887
- ...DEEPSEEK_LIVE_USER_EVIDENCE,
11888
- { label: "Runtime support validator", href: "../../contracts/test/runtime-support.test.ts" }
11889
- ];
11881
+ var ANTHROPIC_MANAGED_EVIDENCE = ANTHROPIC_LIVE_USER_EVIDENCE;
11882
+ var DEEPSEEK_MANAGED_EVIDENCE = DEEPSEEK_LIVE_USER_EVIDENCE;
11890
11883
  var PROVIDER_PUBLIC_SUPPORT = {
11891
11884
  anthropic: {
11892
11885
  displayName: "Anthropic",
11893
11886
  docsAnchor: "anthropic",
11894
11887
  docs: COMMON_DOCS,
11895
11888
  evidence: [...COMMON_EVIDENCE, ...ANTHROPIC_MANAGED_EVIDENCE],
11896
- runtimeEvidence: {
11897
- managed: ANTHROPIC_MANAGED_EVIDENCE
11898
- }
11889
+ managedEvidence: ANTHROPIC_MANAGED_EVIDENCE
11899
11890
  },
11900
11891
  deepseek: {
11901
11892
  displayName: "DeepSeek",
11902
11893
  docsAnchor: "deepseek",
11903
11894
  docs: COMMON_DOCS,
11904
11895
  evidence: [...COMMON_EVIDENCE, ...DEEPSEEK_MANAGED_EVIDENCE],
11905
- runtimeEvidence: {
11906
- managed: DEEPSEEK_MANAGED_EVIDENCE
11907
- }
11896
+ managedEvidence: DEEPSEEK_MANAGED_EVIDENCE
11908
11897
  },
11909
11898
  openai: {
11910
11899
  displayName: "OpenAI",
11911
11900
  docsAnchor: "openai",
11912
11901
  docs: COMMON_DOCS,
11913
11902
  evidence: COMMON_EVIDENCE,
11914
- runtimeEvidence: {
11915
- managed: COMMON_EVIDENCE
11916
- }
11903
+ managedEvidence: COMMON_EVIDENCE
11917
11904
  },
11918
11905
  gemini: {
11919
11906
  displayName: "Gemini",
11920
11907
  docsAnchor: "gemini",
11921
11908
  docs: COMMON_DOCS,
11922
11909
  evidence: COMMON_EVIDENCE,
11923
- runtimeEvidence: {
11924
- managed: COMMON_EVIDENCE
11925
- }
11910
+ managedEvidence: COMMON_EVIDENCE
11926
11911
  },
11927
11912
  mistral: {
11928
11913
  displayName: "Mistral",
11929
11914
  docsAnchor: "mistral",
11930
11915
  docs: COMMON_DOCS,
11931
11916
  evidence: COMMON_EVIDENCE,
11932
- runtimeEvidence: {
11933
- managed: COMMON_EVIDENCE
11934
- }
11917
+ managedEvidence: COMMON_EVIDENCE
11935
11918
  },
11936
11919
  openrouter: {
11937
11920
  displayName: "OpenRouter",
11938
11921
  docsAnchor: "openrouter",
11939
11922
  docs: COMMON_DOCS,
11940
11923
  evidence: COMMON_EVIDENCE,
11941
- runtimeEvidence: {
11942
- managed: COMMON_EVIDENCE
11943
- }
11924
+ managedEvidence: COMMON_EVIDENCE
11944
11925
  },
11945
11926
  // Doubao (ByteDance) via the official Ark API — international BytePlus gateway.
11946
11927
  doubao: {
@@ -11948,9 +11929,7 @@ var PROVIDER_PUBLIC_SUPPORT = {
11948
11929
  docsAnchor: "doubao",
11949
11930
  docs: COMMON_DOCS,
11950
11931
  evidence: COMMON_EVIDENCE,
11951
- runtimeEvidence: {
11952
- managed: COMMON_EVIDENCE
11953
- }
11932
+ managedEvidence: COMMON_EVIDENCE
11954
11933
  },
11955
11934
  // Doubao (ByteDance) via the official Ark API — China Volcengine gateway.
11956
11935
  "doubao-cn": {
@@ -11958,9 +11937,7 @@ var PROVIDER_PUBLIC_SUPPORT = {
11958
11937
  docsAnchor: "doubao-cn",
11959
11938
  docs: COMMON_DOCS,
11960
11939
  evidence: COMMON_EVIDENCE,
11961
- runtimeEvidence: {
11962
- managed: COMMON_EVIDENCE
11963
- }
11940
+ managedEvidence: COMMON_EVIDENCE
11964
11941
  }
11965
11942
  };
11966
11943
 
@@ -11972,8 +11949,6 @@ var MODEL_PROVIDER_IDS = {
11972
11949
  "claude-sonnet-4-6": { anthropic: "claude-sonnet-4-6" },
11973
11950
  "deepseek-v4-flash": { deepseek: "deepseek-v4-flash" },
11974
11951
  "deepseek-v4-pro": { deepseek: "deepseek-v4-pro" },
11975
- "deepseek-chat": { deepseek: "deepseek-chat" },
11976
- "deepseek-reasoner": { deepseek: "deepseek-reasoner" },
11977
11952
  "gpt-4.1": { openai: "gpt-4.1" },
11978
11953
  "gpt-4o-mini": { openai: "gpt-4o-mini", openrouter: "openai/gpt-4o-mini" },
11979
11954
  "gpt-4o": { openrouter: "openai/gpt-4o" },
@@ -12177,35 +12152,10 @@ function parseSkillRef(input, path5) {
12177
12152
  }
12178
12153
  const record = input;
12179
12154
  const kind = record.kind;
12180
- if (kind === "provider") {
12181
- for (const key of Object.keys(record)) {
12182
- if (key !== "kind" && key !== "vendor" && key !== "skillId" && key !== "version") {
12183
- throw new Error(`${path5} contains unexpected field for provider SkillRef: ${key}`);
12184
- }
12185
- }
12186
- const vendor = record.vendor;
12187
- if (vendor !== "anthropic" && vendor !== "custom") {
12188
- throw new Error(`${path5}.vendor must be 'anthropic' or 'custom'`);
12189
- }
12190
- const skillId = record.skillId;
12191
- if (typeof skillId !== "string" || skillId.length === 0 || skillId.length > 256) {
12192
- throw new Error(`${path5}.skillId must be a non-empty string (<= 256 chars)`);
12193
- }
12194
- const version = record.version;
12195
- if (version !== void 0 && (typeof version !== "string" || version.length === 0 || version.length > 64)) {
12196
- throw new Error(`${path5}.version, when provided, must be a non-empty string (<= 64 chars)`);
12197
- }
12198
- return {
12199
- kind: "provider",
12200
- vendor,
12201
- skillId,
12202
- ...version !== void 0 ? { version } : {}
12203
- };
12204
- }
12205
12155
  if (kind === "asset") {
12206
12156
  return parseAssetRefFields(record, path5);
12207
12157
  }
12208
- throw new Error(`${path5}.kind must be 'provider' or 'asset'`);
12158
+ throw new Error(`${path5}.kind must be 'asset'`);
12209
12159
  }
12210
12160
  function parseAssetRefFields(record, path5) {
12211
12161
  for (const key of Object.keys(record)) {
@@ -12463,7 +12413,6 @@ function parseRunRequestConfig(input) {
12463
12413
  "mcpServers",
12464
12414
  "environment",
12465
12415
  "runtimeSize",
12466
- "region",
12467
12416
  "timeout",
12468
12417
  "postHook",
12469
12418
  "proxyEndpoints",
@@ -12482,7 +12431,6 @@ function parseRunRequestConfig(input) {
12482
12431
  const prompt = parseRunRequestConfigPrompt(record.prompt);
12483
12432
  const skills = parseRunRequestConfigSkills(record.skills);
12484
12433
  const mcpServers = parseRunRequestConfigMcpServers(record.mcpServers);
12485
- const region = parseRegion(record.region);
12486
12434
  const postHook = parsePostHook(record.postHook, "run request config postHook");
12487
12435
  return {
12488
12436
  model,
@@ -12496,7 +12444,6 @@ function parseRunRequestConfig(input) {
12496
12444
  // of truth. The CLI surfaces structural errors at submission time.
12497
12445
  ...record.environment !== void 0 ? { environment: record.environment } : {},
12498
12446
  ...record.runtimeSize !== void 0 ? { runtimeSize: record.runtimeSize } : {},
12499
- ...region !== void 0 ? { region } : {},
12500
12447
  ...record.timeout !== void 0 ? { timeout: record.timeout } : {},
12501
12448
  ...postHook !== void 0 ? { postHook: record.postHook } : {},
12502
12449
  ...record.proxyEndpoints !== void 0 ? { proxyEndpoints: record.proxyEndpoints } : {},
@@ -12596,20 +12543,9 @@ var RUN_PROVIDERS = [
12596
12543
  "doubao-cn"
12597
12544
  ];
12598
12545
  var DEFAULT_RUN_PROVIDER = "anthropic";
12599
- var REGIONS = ["eu-west", "us-west", "ap-northeast"];
12600
- var RUNTIME_KINDS = ["managed"];
12601
12546
  var MIN_REDACTION_TARGET_BYTES = 4;
12602
12547
  var MIN_PROXY_SECRET_BYTES = 8;
12603
12548
  var _MIN_PROXY_SECRET_BYTES_OK = MIN_PROXY_SECRET_BYTES >= MIN_REDACTION_TARGET_BYTES;
12604
- function parseRegion(input) {
12605
- if (input === void 0) {
12606
- return void 0;
12607
- }
12608
- if (typeof input !== "string" || !REGIONS.includes(input)) {
12609
- throw new Error(`region must be one of: ${REGIONS.join(", ")} (got ${JSON.stringify(input)})`);
12610
- }
12611
- return input;
12612
- }
12613
12549
  var BUILTIN_TOOL_NAMES = [
12614
12550
  "bash",
12615
12551
  "read_file",
@@ -12635,7 +12571,7 @@ var DEFAULT_BUILTIN_TOOLS = BUILTIN_TOOL_NAMES.filter((name) => name !== "notebo
12635
12571
  var MAX_OUTPUT_CAPTURE_TIMEOUT_MS = 6 * 60 * 60 * 1e3;
12636
12572
 
12637
12573
  // ../contracts/dist/event-envelope.js
12638
- var AEX_EVENT_SOURCES = ["agent", "worker", "runtime", "mcp", "aex", "workflow", "host"];
12574
+ var AEX_EVENT_SOURCES = ["agent", "api", "runtime", "mcp", "aex", "workflow", "host"];
12639
12575
  var AEX_EVENT_TYPES = [
12640
12576
  "RUN_STARTED",
12641
12577
  "RUN_FINISHED",
@@ -12872,7 +12808,7 @@ function sleep(ms, signal) {
12872
12808
  }
12873
12809
 
12874
12810
  // ../contracts/dist/runtime-manifest.js
12875
- var ANTHROPIC_PATHS = Object.freeze({
12811
+ var RUNTIME_PATHS = Object.freeze({
12876
12812
  skillsRoot: "/workspace/skills",
12877
12813
  filesRoot: "/mnt/session/uploads/aex/files",
12878
12814
  assetsRoot: "/mnt/session/uploads/aex/assets",
@@ -13448,11 +13384,8 @@ __export(operations_exports, {
13448
13384
  READ_OUTPUT_TEXT_MAX_BYTES: () => READ_OUTPUT_TEXT_MAX_BYTES,
13449
13385
  cancelRun: () => cancelRun,
13450
13386
  classifyOutput: () => classifyOutput,
13451
- createAgentsMd: () => createAgentsMd,
13452
- createFile: () => createFile,
13453
13387
  createOutputLink: () => createOutputLink,
13454
13388
  createSecret: () => createSecret,
13455
- createSkillBundle: () => createSkillBundle,
13456
13389
  createSkillBundleDirect: () => createSkillBundleDirect,
13457
13390
  deleteAgentsMd: () => deleteAgentsMd,
13458
13391
  deleteFile: () => deleteFile,
@@ -13494,7 +13427,6 @@ __export(operations_exports, {
13494
13427
  resolveOutputFileSelector: () => resolveOutputFileSelector,
13495
13428
  rotateSecret: () => rotateSecret,
13496
13429
  submitRun: () => submitRun,
13497
- submitRunMultipart: () => submitRunMultipart,
13498
13430
  uploadWorkspaceAsset: () => uploadWorkspaceAsset,
13499
13431
  whoami: () => whoami
13500
13432
  });
@@ -14707,87 +14639,12 @@ async function submitRun(http, request) {
14707
14639
  body: JSON.stringify(request)
14708
14640
  });
14709
14641
  }
14710
- async function submitRunMultipart(http, request, bundles, agentsMdParts, fileParts) {
14711
- const hasBundles = Array.isArray(bundles) && bundles.length > 0;
14712
- const hasAgentsMd = Array.isArray(agentsMdParts) && agentsMdParts.length > 0;
14713
- const hasFiles = Array.isArray(fileParts) && fileParts.length > 0;
14714
- if (!hasBundles && !hasAgentsMd && !hasFiles) {
14715
- throw new Error("submitRunMultipart: bundles, agentsMdParts, or fileParts must be non-empty");
14716
- }
14717
- const form = new FormData();
14718
- form.append("submission", new Blob([JSON.stringify(request)], { type: "application/json" }), "submission.json");
14719
- const seen = /* @__PURE__ */ new Set();
14720
- for (const bundle of bundles) {
14721
- if (typeof bundle.slot !== "string" || !bundle.slot) {
14722
- throw new Error("submitRunMultipart: each bundle must have a non-empty slot id");
14723
- }
14724
- if (seen.has(bundle.slot)) {
14725
- throw new Error(`submitRunMultipart: duplicate inline skill slot "${bundle.slot}"`);
14726
- }
14727
- seen.add(bundle.slot);
14728
- const blob = toBlob(bundle.bytes, "application/zip");
14729
- form.append(`skill:${bundle.slot}`, blob, bundle.filename);
14730
- }
14731
- for (const part of agentsMdParts ?? []) {
14732
- if (typeof part.slot !== "string" || !part.slot) {
14733
- throw new Error("submitRunMultipart: each agentsMd part must have a non-empty slot id");
14734
- }
14735
- const partKey = `agentsmd:${part.slot}`;
14736
- if (seen.has(partKey)) {
14737
- throw new Error(`submitRunMultipart: duplicate agentsMd slot "${part.slot}"`);
14738
- }
14739
- seen.add(partKey);
14740
- const blob = new Blob([part.content], { type: "text/plain" });
14741
- form.append(partKey, blob, part.filename);
14742
- }
14743
- for (const part of fileParts ?? []) {
14744
- if (typeof part.slot !== "string" || !part.slot) {
14745
- throw new Error("submitRunMultipart: each file part must have a non-empty slot id");
14746
- }
14747
- const partKey = `file:${part.slot}`;
14748
- if (seen.has(partKey)) {
14749
- throw new Error(`submitRunMultipart: duplicate file slot "${part.slot}"`);
14750
- }
14751
- seen.add(partKey);
14752
- const blob = toBlob(part.bytes, "application/zip");
14753
- form.append(partKey, blob, part.filename);
14754
- }
14755
- return http.request("/api/runs", {
14756
- method: "POST",
14757
- body: form
14758
- });
14759
- }
14760
- async function createSkillBundle(http, args) {
14761
- const form = new FormData();
14762
- form.append("name", args.name);
14763
- const blobBody = toBlob(args.body, args.contentType ?? "application/zip");
14764
- form.append("bundle", blobBody, args.filename ?? `${args.name}.zip`);
14765
- const result = await http.request("/api/skills", {
14642
+ async function createSkillBundleDirect(http, fetchImpl, args) {
14643
+ const presign = await http.request("/api/skills/presign", {
14766
14644
  method: "POST",
14767
- body: form
14645
+ headers: { "content-type": "application/json" },
14646
+ body: JSON.stringify({ name: args.name, hash: args.contentHash, sizeBytes: args.body.byteLength })
14768
14647
  });
14769
- return unwrapSkill(result);
14770
- }
14771
- async function createSkillBundleDirect(http, fetchImpl, args) {
14772
- let presign;
14773
- try {
14774
- presign = await http.request("/api/skills/presign", {
14775
- method: "POST",
14776
- headers: { "content-type": "application/json" },
14777
- body: JSON.stringify({ name: args.name, hash: args.contentHash, sizeBytes: args.body.byteLength })
14778
- });
14779
- } catch (err2) {
14780
- const status2 = err2.status;
14781
- const code = (err2.details ?? {}).code;
14782
- if (status2 === 503 && code === "presign_unconfigured") {
14783
- return createSkillBundle(http, {
14784
- name: args.name,
14785
- body: args.body,
14786
- ...args.contentType ? { contentType: args.contentType } : {}
14787
- });
14788
- }
14789
- throw err2;
14790
- }
14791
14648
  const putRes = await fetchImpl(presign.uploadUrl, {
14792
14649
  method: "PUT",
14793
14650
  headers: { "content-type": args.contentType ?? "application/zip", ...presign.requiredHeaders ?? {} },
@@ -14832,13 +14689,6 @@ async function findSkillByName(http, name) {
14832
14689
  const skills = await listSkills(http);
14833
14690
  return skills.find((skill) => skill.name === name) ?? null;
14834
14691
  }
14835
- async function createAgentsMd(http, args) {
14836
- const form = new FormData();
14837
- form.append("name", args.name);
14838
- form.append("content", new Blob([args.content], { type: "text/plain" }), "AGENTS.md");
14839
- const result = await http.request("/api/agentsmd", { method: "POST", body: form });
14840
- return unwrapAgentsMd(result);
14841
- }
14842
14692
  async function listAgentsMd(http) {
14843
14693
  const result = await http.request("/api/agentsmd");
14844
14694
  if (Array.isArray(result)) {
@@ -14861,14 +14711,6 @@ function unwrapAgentsMd(result) {
14861
14711
  }
14862
14712
  return result;
14863
14713
  }
14864
- async function createFile(http, args) {
14865
- const form = new FormData();
14866
- form.append("name", args.name);
14867
- const blob = toBlob(args.bytes, "application/zip");
14868
- form.append("bundle", blob, `${args.name}.zip`);
14869
- const result = await http.request("/api/files", { method: "POST", body: form });
14870
- return unwrapFile(result);
14871
- }
14872
14714
  async function listFiles(http) {
14873
14715
  const result = await http.request("/api/files");
14874
14716
  if (Array.isArray(result)) {
@@ -14935,17 +14777,6 @@ function unwrapSkill(result) {
14935
14777
  }
14936
14778
  return result;
14937
14779
  }
14938
- function toBlob(input, contentType) {
14939
- if (input instanceof Blob) {
14940
- return input;
14941
- }
14942
- if (input instanceof Uint8Array) {
14943
- const copy = new Uint8Array(input.byteLength);
14944
- copy.set(input);
14945
- return new Blob([copy.buffer], { type: contentType });
14946
- }
14947
- return new Blob([input], { type: contentType });
14948
- }
14949
14780
  function hasRun(value) {
14950
14781
  return Boolean(value && typeof value === "object" && "run" in value);
14951
14782
  }
@@ -15648,35 +15479,6 @@ async function runRunCmd(io2, argv) {
15648
15479
  }
15649
15480
  if (!providerKeyValues[provider]) {
15650
15481
  io2.stderr(`--${provider}-api-key is required when --provider is ${provider} (the platform does not store provider keys on your behalf)
15651
- `);
15652
- return USAGE_ERR;
15653
- }
15654
- const runtimeFlag = takeFlagValue(rest, "--runtime");
15655
- if (runtimeFlag.error) {
15656
- io2.stderr(`${runtimeFlag.error}
15657
- `);
15658
- return USAGE_ERR;
15659
- }
15660
- rest = runtimeFlag.remaining;
15661
- let runtime;
15662
- if (runtimeFlag.value !== null) {
15663
- if (!RUNTIME_KINDS.includes(runtimeFlag.value)) {
15664
- io2.stderr(`--runtime must be one of: ${RUNTIME_KINDS.join(", ")} (got: ${runtimeFlag.value})
15665
- `);
15666
- return USAGE_ERR;
15667
- }
15668
- runtime = runtimeFlag.value;
15669
- }
15670
- const regionFlag = takeFlagValue(rest, "--region");
15671
- if (regionFlag.error) {
15672
- io2.stderr(`${regionFlag.error}
15673
- `);
15674
- return USAGE_ERR;
15675
- }
15676
- rest = regionFlag.remaining;
15677
- if (regionFlag.value && !REGIONS.includes(regionFlag.value)) {
15678
- const hint = suggest(regionFlag.value, REGIONS);
15679
- io2.stderr(`--region must be one of: ${REGIONS.join(", ")}${hint ? `; did you mean "${hint}"?` : ""}
15680
15482
  `);
15681
15483
  return USAGE_ERR;
15682
15484
  }
@@ -15959,18 +15761,15 @@ async function runRunCmd(io2, argv) {
15959
15761
  };
15960
15762
  const hasAdditionalProviderKeys = Object.keys(providerKeyValues).some((p) => p !== provider);
15961
15763
  const secrets = {
15962
- apiKey: providerKeyValues[provider],
15963
- ...hasAdditionalProviderKeys ? { apiKeys: providerKeyValues } : {},
15764
+ apiKeys: hasAdditionalProviderKeys ? providerKeyValues : { [provider]: providerKeyValues[provider] },
15964
15765
  ...mcpServerSecrets.length > 0 ? { mcpServers: mcpServerSecrets } : {},
15965
15766
  ...proxyAuth.length > 0 ? { proxyEndpointAuth: proxyAuth } : {}
15966
15767
  };
15967
15768
  const request = {
15968
15769
  idempotencyKey: idempotency.value ?? generateIdempotencyKey(),
15969
15770
  provider,
15970
- ...runtime ? { runtime } : {},
15971
15771
  submission,
15972
15772
  secrets,
15973
- ...regionFlag.value ? { region: regionFlag.value } : runConfig.region ? { region: runConfig.region } : {},
15974
15773
  ...runtimeSizeFlag.value ? { runtimeSize: runtimeSizeFlag.value } : runConfig.runtimeSize ? { runtimeSize: runConfig.runtimeSize } : {},
15975
15774
  ...runTimeoutFlag.value ? { timeout: runTimeoutFlag.value } : runConfig.timeout ? { timeout: runConfig.timeout } : {},
15976
15775
  ...runConfig.postHook ? { postHook: runConfig.postHook } : {},
@@ -18572,7 +18371,6 @@ Protocol version: ${manifest.protocolVersion}
18572
18371
  io2.stdout("aex run flags:\n");
18573
18372
  io2.stdout(` --provider <name> Optional; one of: ${RUN_PROVIDERS.join(", ")} (default anthropic)
18574
18373
  `);
18575
- io2.stdout(" --runtime managed Optional runtime selector; omitted also uses managed\n");
18576
18374
  for (const provider of RUN_PROVIDERS) {
18577
18375
  io2.stdout(` --${provider}-api-key <key>${" ".repeat(Math.max(1, 13 - provider.length))}REQUIRED when --provider ${provider}; never stored
18578
18376
  `);
@@ -18586,8 +18384,6 @@ Protocol version: ${manifest.protocolVersion}
18586
18384
  io2.stdout(" --metadata key=value Submission metadata entry (repeatable)\n");
18587
18385
  io2.stdout(" --proxy-endpoint '<json>' PlatformProxyEndpoint JSON (repeatable)\n");
18588
18386
  io2.stdout(" --proxy-auth name=<spec> bearer:tok | basic:u:p | header:v | query:v (repeatable)\n");
18589
- io2.stdout(` --region <region> Product placement region; one of: ${REGIONS.join(", ")}
18590
- `);
18591
18387
  io2.stdout(" --runtime-size <size> managed runtime preset\n");
18592
18388
  io2.stdout(" --run-timeout <dur> Server-side run deadline (e.g. 1h); distinct from --timeout\n");
18593
18389
  io2.stdout(" --idempotency-key <key> Optional; defaults to a fresh UUID\n");
@@ -1 +1 @@
1
- 88682d1f64442fabb34e7f3645f950c2a109b192183b100cd75dbaf92fd8f385 cli.mjs
1
+ 91bc1e9fe17896658e7fea3117b8a16b601da0a747b121ee3628e6a95a00ddc1 cli.mjs