@aexhq/sdk 0.33.1 → 0.35.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 (81) hide show
  1. package/README.md +19 -27
  2. package/dist/_contracts/operations.d.ts +2 -54
  3. package/dist/_contracts/operations.js +2 -87
  4. package/dist/_contracts/run-config.d.ts +19 -13
  5. package/dist/_contracts/run-config.js +6 -33
  6. package/dist/_contracts/run-unit.d.ts +1 -33
  7. package/dist/_contracts/run-unit.js +2 -21
  8. package/dist/_contracts/runtime-sizes.d.ts +2 -2
  9. package/dist/_contracts/runtime-sizes.js +2 -2
  10. package/dist/_contracts/status.d.ts +2 -2
  11. package/dist/_contracts/status.js +3 -0
  12. package/dist/_contracts/submission.d.ts +80 -41
  13. package/dist/_contracts/submission.js +114 -52
  14. package/dist/agents-md.d.ts +5 -5
  15. package/dist/agents-md.js +7 -7
  16. package/dist/agents-md.js.map +1 -1
  17. package/dist/asset-upload.d.ts +4 -4
  18. package/dist/asset-upload.js +4 -4
  19. package/dist/bundle.d.ts +2 -2
  20. package/dist/bundle.js +2 -2
  21. package/dist/cli.mjs +369 -12918
  22. package/dist/cli.mjs.sha256 +1 -1
  23. package/dist/client.d.ts +234 -383
  24. package/dist/client.js +436 -648
  25. package/dist/client.js.map +1 -1
  26. package/dist/data-tools.d.ts +25 -22
  27. package/dist/data-tools.js +75 -62
  28. package/dist/data-tools.js.map +1 -1
  29. package/dist/fetch-archive.js +16 -16
  30. package/dist/fetch-archive.js.map +1 -1
  31. package/dist/file.d.ts +5 -5
  32. package/dist/file.js +7 -7
  33. package/dist/file.js.map +1 -1
  34. package/dist/index.d.ts +11 -9
  35. package/dist/index.js +20 -13
  36. package/dist/index.js.map +1 -1
  37. package/dist/mcp-server.d.ts +4 -4
  38. package/dist/mcp-server.js +4 -4
  39. package/dist/proxy-endpoint.d.ts +4 -4
  40. package/dist/proxy-endpoint.js +1 -1
  41. package/dist/retry.d.ts +162 -0
  42. package/dist/retry.js +320 -0
  43. package/dist/retry.js.map +1 -0
  44. package/dist/secret.d.ts +8 -8
  45. package/dist/secret.js +8 -8
  46. package/dist/secret.js.map +1 -1
  47. package/dist/skill-tool.d.ts +102 -0
  48. package/dist/skill-tool.js +190 -0
  49. package/dist/skill-tool.js.map +1 -0
  50. package/dist/tool.d.ts +1 -1
  51. package/dist/tool.js +3 -3
  52. package/dist/tool.js.map +1 -1
  53. package/dist/version.d.ts +1 -1
  54. package/dist/version.js +1 -1
  55. package/docs/cleanup.md +3 -3
  56. package/docs/concepts/agent-tools.md +6 -25
  57. package/docs/concepts/composition.md +15 -12
  58. package/docs/concepts/providers-and-runtimes.md +3 -3
  59. package/docs/concepts/runs.md +27 -22
  60. package/docs/credentials.md +52 -84
  61. package/docs/defaults.md +6 -6
  62. package/docs/events.md +65 -44
  63. package/docs/limits-and-quotas.md +3 -4
  64. package/docs/mcp.md +3 -3
  65. package/docs/networking.md +8 -8
  66. package/docs/outputs.md +44 -40
  67. package/docs/provider-runtime-capabilities.md +1 -1
  68. package/docs/public-surface.json +2 -2
  69. package/docs/quickstart.md +20 -10
  70. package/docs/retries.md +129 -0
  71. package/docs/run-config.md +12 -14
  72. package/docs/run-record.md +8 -8
  73. package/docs/secrets.md +16 -26
  74. package/docs/skills.md +55 -110
  75. package/docs/vision-skills.md +29 -40
  76. package/examples/chat-corpus.ts +8 -9
  77. package/examples/feature-tour.ts +301 -0
  78. package/package.json +1 -1
  79. package/dist/skill.d.ts +0 -149
  80. package/dist/skill.js +0 -198
  81. package/dist/skill.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { PROXY_ENDPOINT_DEFAULTS, type ProxyAuthShape, type ProxyMethod, type ProxyRetryPolicy, type ProxyResponseMode } from "./proxy-protocol.js";
2
2
  export { PROXY_ENDPOINT_DEFAULTS };
3
- import type { AgentsMdRef, FileRef, McpServerRef, SkillRef, ToolRef } from "./run-config.js";
3
+ import type { AgentsMdRef, FileRef, McpServerRef, SkillToolRef, ToolRef } from "./run-config.js";
4
4
  import { type RuntimeSize } from "./runtime-sizes.js";
5
5
  import { type RunModel } from "./models.js";
6
6
  import { type RuntimeSecurityProfileName } from "./runtime-security-profile.js";
@@ -274,16 +274,24 @@ export declare function optionalPositiveNumber(input: unknown, field: string): n
274
274
  * only the non-secret half; bearer headers travel in
275
275
  * `secrets.mcpServers` keyed by `name`.
276
276
  *
277
- * `skills` is a list of `SkillRef`s. Launch workspace skills use
278
- * content-addressed asset refs; run submission snapshots the bytes into the
279
- * run-owned prefix before dispatch.
277
+ * `tools` is the union of builtin tool names, custom `ToolRef` bundles, and
278
+ * skill-tools (`{ kind:"skill", }`); parsing splits them into `tools`,
279
+ * `builtinTools`, and `skillTools`. Skill bundles are content-addressed asset
280
+ * refs snapshotted into the run-owned prefix before dispatch.
280
281
  */
281
282
  export interface PlatformSubmission {
282
283
  readonly model: RunModel;
283
284
  readonly system?: string;
284
285
  readonly prompt: readonly string[];
285
- readonly skills: readonly SkillRef[];
286
286
  readonly tools?: readonly ToolRef[];
287
+ /**
288
+ * Skill-tools: skills re-expressed as synthetic no-arg load-tools. Derived
289
+ * from the `tools` union at parse time (the `{ kind:"skill", … }` members),
290
+ * like {@link builtinTools}. Each becomes a model-visible tool whose call
291
+ * returns the skill's `SKILL.md` body; the bundle is eagerly staged to
292
+ * `/workspace/skills/<name>/`.
293
+ */
294
+ readonly skillTools?: readonly SkillToolRef[];
287
295
  readonly agentsMd: readonly AgentsMdRef[];
288
296
  readonly files: readonly FileRef[];
289
297
  readonly mcpServers: readonly McpServerRef[];
@@ -311,9 +319,9 @@ export interface PlatformSubmission {
311
319
  * - omitted / `true` (default): inject the standard builtins.
312
320
  * - `false`: inject NO builtins — useful for a pure-MCP / pure-custom run.
313
321
  *
314
- * Cherry-pick individual builtins (e.g. opt the notebook in, or pick a narrow
315
- * subset alongside `includeBuiltinTools: false`) by listing their names in
316
- * `tools` (a bare-string builtin reference, prefer `BuiltinTools.<name>`).
322
+ * Pick a narrow subset alongside `includeBuiltinTools: false` by listing
323
+ * builtin names in `tools` (a bare-string builtin reference; prefer
324
+ * `BuiltinTools.<name>`).
317
325
  */
318
326
  readonly includeBuiltinTools?: boolean;
319
327
  /**
@@ -394,33 +402,31 @@ export interface PlatformRunSubmissionRequest {
394
402
  * terminal wait window and self-kill deadline.
395
403
  */
396
404
  readonly timeoutMs?: number;
397
- /**
398
- * Lineage parent (agent-session §9). When present the server admits this
399
- * run as a CHILD of `parentRunId`: it walks the parent's lineage, enforces
400
- * the max-subagent-depth + per-root concurrency caps, and persists
401
- * `parent_run_id` + a server-derived `depth`. The client may name a parent
402
- * but NEVER the depth — depth is computed server-side from the parent row,
403
- * so a forged value cannot bypass the cap.
404
- */
405
- readonly parentRunId?: string;
406
405
  /**
407
406
  * Optional per-run callback URL. The platform delivers exactly the terminal
408
407
  * `run.finished` event to this URL at the settle-consistent barrier, signed
409
- * Standard-Webhooks style. It is a sibling of {@link idempotencyKey} /
410
- * {@link parentRunId} — an operational/delivery concern, NOT part of the
411
- * hashed submission brief, so the same idempotency key with a different
412
- * callback URL never 409s and the field never enters `request_hash`.
408
+ * Standard-Webhooks style. It is a sibling of {@link idempotencyKey} — an
409
+ * operational/delivery concern, NOT part of the hashed submission brief, so
410
+ * the same idempotency key with a different callback URL never 409s and the
411
+ * field never enters `request_hash`.
413
412
  */
414
413
  readonly webhook?: RunWebhookSpec;
415
414
  /**
416
415
  * Optional per-run override of the lineage limits (max concurrent child runs,
417
- * max subagent depth). A sibling of {@link parentRunId} — these are dials the
418
- * client may *request*; the server resolves them against the per-workspace
419
- * ceiling and the hard platform ceiling (clamping happens in the resolver, NOT
420
- * this parser). Absent fields fall back to the platform defaults. Only shape +
416
+ * max subagent depth, per-run spend cap). These are dials the client may
417
+ * *request*; the server resolves them against the per-workspace ceiling and
418
+ * the hard platform ceiling (clamping happens in the resolver, NOT this
419
+ * parser). Absent fields fall back to the platform defaults. Only shape +
421
420
  * positivity are validated here.
422
421
  */
423
422
  readonly limits?: RunLimits;
423
+ /**
424
+ * Optional capacity intent for the run's managed machine. `spot: true` opts
425
+ * the run into interruptible capacity; absent / `spot: false` requests
426
+ * standard capacity (the default). Intent only — the managed runtime selects
427
+ * capacity from it.
428
+ */
429
+ readonly machine?: RunMachine;
424
430
  }
425
431
  /** Per-run webhook callback. v1: terminal-only; the URL must be https. */
426
432
  export interface RunWebhookSpec {
@@ -436,15 +442,26 @@ export interface RunLimits {
436
442
  readonly maxConcurrentChildRuns?: number;
437
443
  readonly maxSubagentDepth?: number;
438
444
  /**
439
- * Per-run spend cap in USD (defense-in-depth). The platform converts it to a
440
- * wall-clock budget (priced compute is wall-time; BYOK provider tokens cost the
441
- * platform nothing) and kills the run once it would out-spend the cap. A
442
- * positive number; omitted unbounded per-run (only the run's wall-clock
443
- * `timeout` + the per-workspace spend cap apply). Only shape/positivity are
444
- * validated here.
445
+ * Per-run spend cap in USD (defense-in-depth). The platform kills the run once
446
+ * it would out-spend the cap. A positive number; omitted unbounded per-run
447
+ * (only the run's wall-clock `timeout` + the per-workspace spend cap apply).
448
+ * Only shape/positivity are validated here.
449
+ *
450
+ * The frozen boot session config the managed runtime folds the loop against
451
+ * names this same USD value `budgetUsd`; {@link sessionBudgetLimits} is the
452
+ * single source of truth for that wire→boot name mapping.
445
453
  */
446
454
  readonly maxSpendUsd?: number;
447
455
  }
456
+ /**
457
+ * Per-run machine/capacity intent. v1 exposes only `spot`: opt the run into
458
+ * interruptible capacity (`spot: true`) vs standard capacity (absent /
459
+ * `spot: false`, the default). Only the boolean intent is public — capacity
460
+ * selection is a runtime concern.
461
+ */
462
+ export interface RunMachine {
463
+ readonly spot?: boolean;
464
+ }
448
465
  /**
449
466
  * Wire shape posted by the SDK and CLI. `workspaceId` is **omitted by
450
467
  * design** — token-authenticated clients never name the workspace
@@ -492,6 +509,32 @@ export declare function parseRunWebhook(input: unknown): RunWebhookSpec | undefi
492
509
  * collapses to `undefined` so it carries no signal onto the request.
493
510
  */
494
511
  export declare function parseRunLimits(input: unknown): RunLimits | undefined;
512
+ /**
513
+ * Boot-session budget fragment. The public submit surface names a run's spend
514
+ * cap `limits.maxSpendUsd`; the frozen boot session config the managed runtime
515
+ * folds the loop against names the SAME USD value `budgetUsd` — the field the
516
+ * session planner reads to enforce/terminate a run that would out-spend its cap.
517
+ * This is the single source of truth for that wire→boot name mapping so the two
518
+ * layers can never drift.
519
+ *
520
+ * Returns a fragment safe to spread into `sessionConfig.limits`: `{ budgetUsd }`
521
+ * when a cap is set, `{}` when none is (an absent cap stays absent — the run is
522
+ * unbounded per-run, subject only to the run timeout + the per-workspace cap).
523
+ * Pure: same input ⇒ same output.
524
+ */
525
+ export declare function sessionBudgetLimits(limits: RunLimits | undefined): {
526
+ budgetUsd?: number;
527
+ };
528
+ /**
529
+ * Parse the optional per-run `machine` capacity intent. Mirrors
530
+ * {@link parseRunWebhook}: absent ⇒ `undefined`; a non-object or any unknown
531
+ * subfield is rejected so the strict top-level allow-list extends to the nested
532
+ * object. `spot` must be a boolean when present. A no-signal object (e.g.
533
+ * `machine: {}`) collapses to `undefined` so it never lands an empty object on
534
+ * the request. An explicit `spot` (true or false) is preserved verbatim. Only
535
+ * shape is validated here — capacity selection is a runtime concern.
536
+ */
537
+ export declare function parseRunMachine(input: unknown): RunMachine | undefined;
495
538
  export declare function parseRunProvider(input: unknown): RunProvider;
496
539
  /**
497
540
  * Cross-check the supplied secrets bundle against the credential mode. BYOK
@@ -524,12 +567,12 @@ export declare const DEFAULT_OUTPUT_MODE: OutputMode;
524
567
  * Order mirrors `HANDS_TOOLS`. A builtin tool reference (a bare string in
525
568
  * `submission.tools`) must be a member of this set.
526
569
  */
527
- export declare const BUILTIN_TOOL_NAMES: readonly ["bash", "read_file", "write_file", "edit_file", "grep", "glob", "head", "tail", "todo_write", "subagent", "subagent_result", "web_fetch", "web_search", "notebook_edit", "bash_output", "bash_kill", "code_execution", "wait", "git"];
570
+ export declare const BUILTIN_TOOL_NAMES: readonly ["bash", "read_file", "write_file", "edit_file", "grep", "glob", "head", "tail", "todo_write", "subagent", "subagent_result", "web_fetch", "web_search", "bash_output", "bash_kill", "code_execution", "wait", "git"];
528
571
  export type BuiltinToolName = (typeof BUILTIN_TOOL_NAMES)[number];
529
572
  /**
530
573
  * Typo-safe accessors for the closed builtin tool set: each key maps to the
531
574
  * real tool NAME string. Reference a builtin in `submission.tools` via
532
- * `BuiltinTools.notebook_edit` rather than the bare string so a rename is a
575
+ * `BuiltinTools.web_search` rather than the bare string so a rename is a
533
576
  * compile error, not a runtime 400.
534
577
  *
535
578
  * Keys are the real tool names; a unit test asserts `Object.values(BuiltinTools)`
@@ -549,7 +592,6 @@ export declare const BuiltinTools: {
549
592
  readonly subagent_result: "subagent_result";
550
593
  readonly web_fetch: "web_fetch";
551
594
  readonly web_search: "web_search";
552
- readonly notebook_edit: "notebook_edit";
553
595
  readonly bash_output: "bash_output";
554
596
  readonly bash_kill: "bash_kill";
555
597
  readonly code_execution: "code_execution";
@@ -557,11 +599,8 @@ export declare const BuiltinTools: {
557
599
  readonly git: "git";
558
600
  };
559
601
  /**
560
- * The default builtin tool set injected when `includeBuiltinTools !== false`:
561
- * every builtin tool EXCEPT `notebook_edit` (notebook editing stays opt-in —
562
- * add `BuiltinTools.notebook_edit` to `tools` to enable it). Derived by
563
- * filtering {@link BUILTIN_TOOL_NAMES} so it can never drift from the closed
564
- * set.
602
+ * The default builtin tool set injected when `includeBuiltinTools !== false`.
603
+ * It is the complete closed builtin set.
565
604
  */
566
605
  export declare const DEFAULT_BUILTIN_TOOLS: readonly BuiltinToolName[];
567
606
  /**
@@ -570,8 +609,8 @@ export declare const DEFAULT_BUILTIN_TOOLS: readonly BuiltinToolName[];
570
609
  *
571
610
  * - `includeBuiltinTools !== false` ⇒ start from {@link DEFAULT_BUILTIN_TOOLS}
572
611
  * (the standard set); `false` ⇒ start from none (pure-MCP / pure-custom).
573
- * - union in every builtin-name string the caller listed in `tools` (a
574
- * cherry-pick, e.g. `BuiltinTools.notebook_edit` to opt the notebook in).
612
+ * - union in every builtin-name string the caller listed in `tools` (used to
613
+ * cherry-pick a narrow subset when `includeBuiltinTools` is false).
575
614
  *
576
615
  * Every `toolRefs` string MUST be a member of {@link BUILTIN_TOOL_NAMES}; the
577
616
  * union is validated ⊆ the closed set so an invalid name can never leak through.
@@ -4,7 +4,7 @@ import { authShapeHeaderName, PROXY_ALLOWED_METHODS, PROXY_ENDPOINT_DEFAULTS, PR
4
4
  // existing `@aexhq/contracts` consumers of `PROXY_ENDPOINT_DEFAULTS` are
5
5
  // unaffected by the move.
6
6
  export { PROXY_ENDPOINT_DEFAULTS };
7
- import { TOOL_NAME_PATTERN, normaliseSkillBundlePath, parseAssetRefFields, parseMcpServerRef, parseSkillRef } from "./run-config.js";
7
+ import { TOOL_NAME_PATTERN, normaliseSkillBundlePath, parseAssetRefFields, parseMcpServerRef } from "./run-config.js";
8
8
  import { parseRunTimeout, parseRuntimeSize } from "./runtime-sizes.js";
9
9
  import { assertRunModelMatchesProvider, parseRunModel } from "./models.js";
10
10
  import { parseRuntimeSecurityProfile } from "./runtime-security-profile.js";
@@ -658,8 +658,9 @@ export function crossValidateSecretEnvAndValues(secretEnv, envSecrets) {
658
658
  }
659
659
  }
660
660
  export function parseInlineSecrets(input) {
661
- // A child run (parentRunId set) inherits its provider keys server-side from
662
- // the parent's vault, so it may omit `secrets` entirely.
661
+ // Absent/null secrets collapse to an empty bundle; the credential-policy gate
662
+ // (enforceCredentialSecretPolicy) decides whether that is admissible for the
663
+ // run's mode (a run inheriting keys server-side may legitimately omit them).
663
664
  if (input === undefined || input === null)
664
665
  return {};
665
666
  const value = requireRecord(input, "secrets");
@@ -994,9 +995,9 @@ export function parseRunSubmissionRequest(input, options = {}) {
994
995
  "runtimeSize",
995
996
  "timeout",
996
997
  "proxyEndpoints",
997
- "parentRunId",
998
998
  "webhook",
999
999
  "limits",
1000
+ "machine",
1000
1001
  SECRETS_KEY
1001
1002
  ]);
1002
1003
  for (const key of Object.keys(value)) {
@@ -1020,16 +1021,12 @@ export function parseRunSubmissionRequest(input, options = {}) {
1020
1021
  void options;
1021
1022
  const runtimeSize = parseRuntimeSize(value.runtimeSize);
1022
1023
  const timeoutMs = parseRunTimeout(value.timeout);
1023
- // Lineage parent only. `depth` is NEVER accepted from the wire — the server
1024
- // derives it from the parent row (a forged depth must not bypass the cap).
1025
- const parentRunId = optionalString(value.parentRunId, "submission.parentRunId");
1026
1024
  const webhook = parseRunWebhook(value.webhook);
1027
1025
  const limits = parseRunLimits(value.limits);
1026
+ const machine = parseRunMachine(value.machine);
1028
1027
  const proxyEndpoints = parseProxyEndpoints(value.proxyEndpoints);
1029
1028
  const secrets = parseInlineSecrets(value.secrets);
1030
- enforceCredentialSecretPolicy(secrets, provider, {
1031
- inheritsFromParent: parentRunId !== undefined
1032
- });
1029
+ enforceCredentialSecretPolicy(secrets, provider);
1033
1030
  crossValidateProxyEndpointsAndAuth(proxyEndpoints, secrets.proxyEndpointAuth);
1034
1031
  const submission = parseSubmission(value.submission);
1035
1032
  assertRunModelMatchesProvider(provider, submission.model);
@@ -1060,9 +1057,9 @@ export function parseRunSubmissionRequest(input, options = {}) {
1060
1057
  ...(runtimeSize ? { runtimeSize } : {}),
1061
1058
  ...(timeoutMs !== undefined ? { timeoutMs } : {}),
1062
1059
  ...(proxyEndpoints ? { proxyEndpoints } : {}),
1063
- ...(parentRunId !== undefined ? { parentRunId } : {}),
1064
1060
  ...(webhook !== undefined ? { webhook } : {}),
1065
1061
  ...(limits !== undefined ? { limits } : {}),
1062
+ ...(machine !== undefined ? { machine } : {}),
1066
1063
  secrets
1067
1064
  };
1068
1065
  }
@@ -1141,6 +1138,53 @@ export function parseRunLimits(input) {
1141
1138
  ...(maxSpendUsd !== undefined ? { maxSpendUsd } : {})
1142
1139
  };
1143
1140
  }
1141
+ /**
1142
+ * Boot-session budget fragment. The public submit surface names a run's spend
1143
+ * cap `limits.maxSpendUsd`; the frozen boot session config the managed runtime
1144
+ * folds the loop against names the SAME USD value `budgetUsd` — the field the
1145
+ * session planner reads to enforce/terminate a run that would out-spend its cap.
1146
+ * This is the single source of truth for that wire→boot name mapping so the two
1147
+ * layers can never drift.
1148
+ *
1149
+ * Returns a fragment safe to spread into `sessionConfig.limits`: `{ budgetUsd }`
1150
+ * when a cap is set, `{}` when none is (an absent cap stays absent — the run is
1151
+ * unbounded per-run, subject only to the run timeout + the per-workspace cap).
1152
+ * Pure: same input ⇒ same output.
1153
+ */
1154
+ export function sessionBudgetLimits(limits) {
1155
+ if (limits?.maxSpendUsd === undefined) {
1156
+ return {};
1157
+ }
1158
+ return { budgetUsd: limits.maxSpendUsd };
1159
+ }
1160
+ /**
1161
+ * Parse the optional per-run `machine` capacity intent. Mirrors
1162
+ * {@link parseRunWebhook}: absent ⇒ `undefined`; a non-object or any unknown
1163
+ * subfield is rejected so the strict top-level allow-list extends to the nested
1164
+ * object. `spot` must be a boolean when present. A no-signal object (e.g.
1165
+ * `machine: {}`) collapses to `undefined` so it never lands an empty object on
1166
+ * the request. An explicit `spot` (true or false) is preserved verbatim. Only
1167
+ * shape is validated here — capacity selection is a runtime concern.
1168
+ */
1169
+ export function parseRunMachine(input) {
1170
+ if (input === undefined) {
1171
+ return undefined;
1172
+ }
1173
+ const value = requireRecord(input, "machine");
1174
+ const allowed = new Set(["spot"]);
1175
+ for (const key of Object.keys(value)) {
1176
+ if (!allowed.has(key)) {
1177
+ throw new Error(`machine.${key} is not an allowed field; permitted: ${[...allowed].join(", ")}`);
1178
+ }
1179
+ }
1180
+ if (value.spot !== undefined && typeof value.spot !== "boolean") {
1181
+ throw new Error("machine.spot must be a boolean");
1182
+ }
1183
+ if (value.spot === undefined) {
1184
+ return undefined;
1185
+ }
1186
+ return { spot: value.spot };
1187
+ }
1144
1188
  export function parseRunProvider(input) {
1145
1189
  if (input === undefined) {
1146
1190
  return DEFAULT_RUN_PROVIDER;
@@ -1175,7 +1219,6 @@ export function parseSubmission(input) {
1175
1219
  "model",
1176
1220
  "system",
1177
1221
  "prompt",
1178
- "skills",
1179
1222
  "tools",
1180
1223
  "agentsMd",
1181
1224
  "files",
@@ -1197,8 +1240,7 @@ export function parseSubmission(input) {
1197
1240
  const model = parseRunModel(value.model, "submission.model");
1198
1241
  const system = optionalString(value.system, "submission.system");
1199
1242
  const prompt = parsePrompt(value.prompt);
1200
- const skills = parseSkills(value.skills);
1201
- const { tools, builtinTools } = parseTools(value.tools);
1243
+ const { tools, skillTools, builtinTools } = parseTools(value.tools);
1202
1244
  const agentsMd = parseAgentsMd(value.agentsMd);
1203
1245
  const files = parseFiles(value.files);
1204
1246
  const mcpServers = parseMcpServers(value.mcpServers);
@@ -1214,8 +1256,8 @@ export function parseSubmission(input) {
1214
1256
  model,
1215
1257
  ...(system ? { system } : {}),
1216
1258
  prompt,
1217
- skills,
1218
1259
  tools,
1260
+ ...(skillTools.length > 0 ? { skillTools } : {}),
1219
1261
  agentsMd,
1220
1262
  files,
1221
1263
  mcpServers,
@@ -1313,7 +1355,6 @@ export const BUILTIN_TOOL_NAMES = [
1313
1355
  "subagent_result",
1314
1356
  "web_fetch",
1315
1357
  "web_search",
1316
- "notebook_edit",
1317
1358
  "bash_output",
1318
1359
  "bash_kill",
1319
1360
  "code_execution",
@@ -1323,7 +1364,7 @@ export const BUILTIN_TOOL_NAMES = [
1323
1364
  /**
1324
1365
  * Typo-safe accessors for the closed builtin tool set: each key maps to the
1325
1366
  * real tool NAME string. Reference a builtin in `submission.tools` via
1326
- * `BuiltinTools.notebook_edit` rather than the bare string so a rename is a
1367
+ * `BuiltinTools.web_search` rather than the bare string so a rename is a
1327
1368
  * compile error, not a runtime 400.
1328
1369
  *
1329
1370
  * Keys are the real tool names; a unit test asserts `Object.values(BuiltinTools)`
@@ -1343,7 +1384,6 @@ export const BuiltinTools = {
1343
1384
  subagent_result: "subagent_result",
1344
1385
  web_fetch: "web_fetch",
1345
1386
  web_search: "web_search",
1346
- notebook_edit: "notebook_edit",
1347
1387
  bash_output: "bash_output",
1348
1388
  bash_kill: "bash_kill",
1349
1389
  code_execution: "code_execution",
@@ -1351,21 +1391,18 @@ export const BuiltinTools = {
1351
1391
  git: "git"
1352
1392
  };
1353
1393
  /**
1354
- * The default builtin tool set injected when `includeBuiltinTools !== false`:
1355
- * every builtin tool EXCEPT `notebook_edit` (notebook editing stays opt-in —
1356
- * add `BuiltinTools.notebook_edit` to `tools` to enable it). Derived by
1357
- * filtering {@link BUILTIN_TOOL_NAMES} so it can never drift from the closed
1358
- * set.
1394
+ * The default builtin tool set injected when `includeBuiltinTools !== false`.
1395
+ * It is the complete closed builtin set.
1359
1396
  */
1360
- export const DEFAULT_BUILTIN_TOOLS = BUILTIN_TOOL_NAMES.filter((name) => name !== "notebook_edit");
1397
+ export const DEFAULT_BUILTIN_TOOLS = BUILTIN_TOOL_NAMES;
1361
1398
  /**
1362
1399
  * Resolve the set of builtin tool NAMES a submission injects, deduplicated and
1363
1400
  * in {@link BUILTIN_TOOL_NAMES} order.
1364
1401
  *
1365
1402
  * - `includeBuiltinTools !== false` ⇒ start from {@link DEFAULT_BUILTIN_TOOLS}
1366
1403
  * (the standard set); `false` ⇒ start from none (pure-MCP / pure-custom).
1367
- * - union in every builtin-name string the caller listed in `tools` (a
1368
- * cherry-pick, e.g. `BuiltinTools.notebook_edit` to opt the notebook in).
1404
+ * - union in every builtin-name string the caller listed in `tools` (used to
1405
+ * cherry-pick a narrow subset when `includeBuiltinTools` is false).
1369
1406
  *
1370
1407
  * Every `toolRefs` string MUST be a member of {@link BUILTIN_TOOL_NAMES}; the
1371
1408
  * union is validated ⊆ the closed set so an invalid name can never leak through.
@@ -1588,33 +1625,21 @@ function parsePrompt(input) {
1588
1625
  }
1589
1626
  return parts;
1590
1627
  }
1591
- function parseSkills(input) {
1592
- if (input === undefined) {
1593
- return [];
1594
- }
1595
- if (!Array.isArray(input)) {
1596
- throw new Error("submission.skills must be an array of SkillRef objects");
1597
- }
1598
- const seenAssetId = new Set();
1599
- return input.map((item, index) => {
1600
- const ref = parseSkillRef(item, `submission.skills[${index}]`);
1601
- if (seenAssetId.has(ref.assetId)) {
1602
- throw new Error(`submission.skills duplicate assetId: ${ref.assetId}`);
1603
- }
1604
- seenAssetId.add(ref.assetId);
1605
- return ref;
1606
- });
1607
- }
1608
1628
  /**
1609
- * Parse the `submission.tools` union: each entry is either a BARE STRING (a
1610
- * builtin tool reference, validated against {@link BUILTIN_TOOL_NAMES}) or a
1611
- * custom tool bundle OBJECT ({@link ToolRef}). Returns the two groups split:
1612
- * `tools` (custom bundles, the existing downstream shape) and `builtinTools`
1613
- * (the deduped builtin-name references, in {@link BUILTIN_TOOL_NAMES} order).
1629
+ * Parse the `submission.tools` union: each entry is one of THREE shapes
1630
+ * (a) a BARE STRING: a builtin tool reference (validated against
1631
+ * {@link BUILTIN_TOOL_NAMES}).
1632
+ * (b) `{ kind:"asset", }`: a custom tool bundle ({@link ToolRef}).
1633
+ * (c) `{ kind:"skill", assetId, name, description }`: a skill re-expressed as
1634
+ * a synthetic no-arg load-tool ({@link SkillToolRef}).
1635
+ * Returns the three groups split: `tools` (custom bundles), `skillTools`
1636
+ * (skill-tools), and `builtinTools` (the deduped builtin-name references, in
1637
+ * {@link BUILTIN_TOOL_NAMES} order). Tool `name`s and `assetId`s are deduped
1638
+ * across ALL object kinds so a name/asset names at most one tool.
1614
1639
  */
1615
1640
  function parseTools(input) {
1616
1641
  if (input === undefined) {
1617
- return { tools: [], builtinTools: [] };
1642
+ return { tools: [], skillTools: [], builtinTools: [] };
1618
1643
  }
1619
1644
  if (!Array.isArray(input)) {
1620
1645
  throw new Error("submission.tools must be an array of builtin tool names or ToolRef objects");
@@ -1623,9 +1648,10 @@ function parseTools(input) {
1623
1648
  const seenAssetIds = new Set();
1624
1649
  const seenBuiltins = new Set();
1625
1650
  const tools = [];
1651
+ const skillTools = [];
1626
1652
  input.forEach((item, index) => {
1627
1653
  const path = `submission.tools[${index}]`;
1628
- // A bare string is a builtin tool reference (e.g. BuiltinTools.notebook_edit).
1654
+ // A bare string is a builtin tool reference (e.g. BuiltinTools.web_search).
1629
1655
  if (typeof item === "string") {
1630
1656
  if (!BUILTIN_TOOL_NAMES.includes(item)) {
1631
1657
  throw new Error(`${path} (${JSON.stringify(item)}) is not a builtin tool name; ` +
@@ -1635,6 +1661,42 @@ function parseTools(input) {
1635
1661
  return;
1636
1662
  }
1637
1663
  const raw = requireRecord(item, path);
1664
+ // A skill-tool is a synthetic no-arg load-tool: { kind:"skill", assetId,
1665
+ // name, description }. Its call returns the skill's SKILL.md body; it carries
1666
+ // no input_schema / entry (unlike a custom ToolRef).
1667
+ if (raw.kind === "skill") {
1668
+ for (const key of Object.keys(raw)) {
1669
+ if (key !== "kind" && key !== "assetId" && key !== "name" && key !== "description") {
1670
+ throw new Error(`${path}.${key} is not an allowed field for a skill tool; permitted: kind, assetId, name, description`);
1671
+ }
1672
+ }
1673
+ const skillFields = parseAssetRefFields({ kind: "asset", assetId: raw.assetId, name: raw.name }, path);
1674
+ if (!TOOL_NAME_PATTERN.test(skillFields.name)) {
1675
+ throw new Error(`${path}.name must match ${TOOL_NAME_PATTERN.source}`);
1676
+ }
1677
+ if (skillFields.name.includes("__")) {
1678
+ throw new Error(`${path}.name must not contain "__"; that separator is reserved for MCP tools`);
1679
+ }
1680
+ if (seenNames.has(skillFields.name)) {
1681
+ throw new Error(`submission.tools duplicate name: ${skillFields.name}`);
1682
+ }
1683
+ seenNames.add(skillFields.name);
1684
+ if (seenAssetIds.has(skillFields.assetId)) {
1685
+ throw new Error(`submission.tools duplicate assetId: ${skillFields.assetId}`);
1686
+ }
1687
+ seenAssetIds.add(skillFields.assetId);
1688
+ const skillDescription = requireString(raw.description, `${path}.description`);
1689
+ if (skillDescription.trim().length === 0 || skillDescription.length > 2048) {
1690
+ throw new Error(`${path}.description must be non-empty and <= 2048 chars`);
1691
+ }
1692
+ skillTools.push({
1693
+ kind: "skill",
1694
+ assetId: skillFields.assetId,
1695
+ name: skillFields.name,
1696
+ description: skillDescription
1697
+ });
1698
+ return;
1699
+ }
1638
1700
  for (const key of Object.keys(raw)) {
1639
1701
  if (key !== "kind" &&
1640
1702
  key !== "assetId" &&
@@ -1646,7 +1708,7 @@ function parseTools(input) {
1646
1708
  }
1647
1709
  }
1648
1710
  if (raw.kind !== "asset") {
1649
- throw new Error(`${path}.kind must be 'asset' (got ${JSON.stringify(raw.kind)})`);
1711
+ throw new Error(`${path}.kind must be 'asset' or 'skill' (got ${JSON.stringify(raw.kind)})`);
1650
1712
  }
1651
1713
  const fields = parseAssetRefFields({ kind: raw.kind, assetId: raw.assetId, name: raw.name }, path);
1652
1714
  if (!TOOL_NAME_PATTERN.test(fields.name)) {
@@ -1685,7 +1747,7 @@ function parseTools(input) {
1685
1747
  });
1686
1748
  });
1687
1749
  const builtinTools = BUILTIN_TOOL_NAMES.filter((name) => seenBuiltins.has(name));
1688
- return { tools, builtinTools };
1750
+ return { tools, skillTools, builtinTools };
1689
1751
  }
1690
1752
  function parseAgentsMd(input) {
1691
1753
  if (input === undefined)
@@ -5,17 +5,17 @@ import type { AgentsMdRef } from "./_contracts/index.js";
5
5
  * behaviour).
6
6
  *
7
7
  * const rules = await AgentsMd.fromContent("# Be helpful", { name: "rules" });
8
- * await client.submit({ agentsMd: [rules], ... });
8
+ * await client.run({ agentsMd: [rules], message: "..." });
9
9
  *
10
- * `client.submit` materializes the bytes to the hosted asset store before
11
- * the run lands. Asset deduplication handles repeated uploads automatically.
10
+ * `client.run` / `openSession` materializes the bytes to the hosted asset store
11
+ * before the run lands. Asset deduplication handles repeated uploads automatically.
12
12
  */
13
13
  export declare class AgentsMd {
14
14
  #private;
15
15
  constructor(ref: AgentsMdRef | DraftAgentsMdRef, zipBytes?: Uint8Array);
16
16
  get ref(): AgentsMdRef | DraftAgentsMdRef;
17
17
  get isDraft(): boolean;
18
- /** Internal: the asset id resolved on a prior submit, or undefined. */
18
+ /** Internal: the asset id resolved on a prior use, or undefined. */
19
19
  get _cachedAssetId(): string | undefined;
20
20
  /** Internal: remember the asset id resolved for this draft's bytes. */
21
21
  _rememberAsset(assetId: string): void;
@@ -33,7 +33,7 @@ export declare class AgentsMd {
33
33
  }): Promise<AgentsMd>;
34
34
  /**
35
35
  * Internal: yield the draft's zipped bytes + metadata so
36
- * `client.submit` can upload it as an asset.
36
+ * `client.run` / `openSession` can upload it as an asset.
37
37
  */
38
38
  _takeDraftBundle(): {
39
39
  name: string;
package/dist/agents-md.js CHANGED
@@ -7,15 +7,15 @@ import { strToU8, zipSync } from "fflate";
7
7
  * behaviour).
8
8
  *
9
9
  * const rules = await AgentsMd.fromContent("# Be helpful", { name: "rules" });
10
- * await client.submit({ agentsMd: [rules], ... });
10
+ * await client.run({ agentsMd: [rules], message: "..." });
11
11
  *
12
- * `client.submit` materializes the bytes to the hosted asset store before
13
- * the run lands. Asset deduplication handles repeated uploads automatically.
12
+ * `client.run` / `openSession` materializes the bytes to the hosted asset store
13
+ * before the run lands. Asset deduplication handles repeated uploads automatically.
14
14
  */
15
15
  export class AgentsMd {
16
16
  #ref;
17
17
  #zipBytes;
18
- /** Asset id cached after the first submit, so reuse skips a re-upload. */
18
+ /** Asset id cached after the first use, so reuse skips a re-upload. */
19
19
  #assetId;
20
20
  constructor(ref, zipBytes) {
21
21
  this.#ref = ref;
@@ -27,7 +27,7 @@ export class AgentsMd {
27
27
  get isDraft() {
28
28
  return this.#ref.kind === "draft";
29
29
  }
30
- /** Internal: the asset id resolved on a prior submit, or undefined. */
30
+ /** Internal: the asset id resolved on a prior use, or undefined. */
31
31
  get _cachedAssetId() {
32
32
  return this.#assetId;
33
33
  }
@@ -59,7 +59,7 @@ export class AgentsMd {
59
59
  }
60
60
  /**
61
61
  * Internal: yield the draft's zipped bytes + metadata so
62
- * `client.submit` can upload it as an asset.
62
+ * `client.run` / `openSession` can upload it as an asset.
63
63
  */
64
64
  _takeDraftBundle() {
65
65
  if (this.#ref.kind !== "draft" || !this.#zipBytes) {
@@ -74,7 +74,7 @@ export class AgentsMd {
74
74
  toJSON() {
75
75
  if (this.#ref.kind === "draft") {
76
76
  throw new Error("AgentsMd: draft AgentsMd cannot be JSON-serialised — it only becomes a wire " +
77
- "ref when client.submit uploads the bytes as an asset.");
77
+ "ref when aex.run / openSession uploads the bytes as an asset.");
78
78
  }
79
79
  return this.#ref;
80
80
  }
@@ -1 +1 @@
1
- {"version":3,"file":"agents-md.js","sourceRoot":"","sources":["../src/agents-md.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,OAAO,QAAQ;IACV,IAAI,CAAiC;IACrC,SAAS,CAAyB;IAC3C,0EAA0E;IAC1E,QAAQ,CAAqB;IAE7B,YAAY,GAAmC,EAAE,QAAqB;QACpE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC;IACpC,CAAC;IAED,uEAAuE;IACvE,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,uEAAuE;IACvE,cAAc,CAAC,OAAe;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,OAAe,EAAE,IAA+B;QACvE,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxD,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;QAC9E,CAAC;QACD,IAAI,CAA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,IAAI;YACpB,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW;YAClC,KAAK,EAAE,IAAI,CAAC,SAAS;SACtB,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CACb,8EAA8E;gBAC5E,+DAA+D,CAClE,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF;AAQD,MAAM,iBAAiB,GAAG,mCAAmC,CAAC;AAC9D,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"}
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Asset materialization for the SDK submit path.
2
+ * Asset materialization for the SDK run / session path.
3
3
  *
4
- * Every inline `Skill` / `AgentsMd` / `File` draft is materialized to the
5
- * hosted API's content-addressable asset store before the submit round-trip,
6
- * so the wire submission carries only storage-neutral `kind:"asset"` refs.
4
+ * Every inline skill-tool / `Tool` / `AgentsMd` / `File` draft is materialized
5
+ * to the hosted API's content-addressable asset store before the session
6
+ * starts, so the wire submission carries only storage-neutral refs.
7
7
  *
8
8
  * Upload is direct-to-storage (no bytes through the hosted API, so bundle size
9
9
  * is bounded by the object store rather than by the API's memory /
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Asset materialization for the SDK submit path.
2
+ * Asset materialization for the SDK run / session path.
3
3
  *
4
- * Every inline `Skill` / `AgentsMd` / `File` draft is materialized to the
5
- * hosted API's content-addressable asset store before the submit round-trip,
6
- * so the wire submission carries only storage-neutral `kind:"asset"` refs.
4
+ * Every inline skill-tool / `Tool` / `AgentsMd` / `File` draft is materialized
5
+ * to the hosted API's content-addressable asset store before the session
6
+ * starts, so the wire submission carries only storage-neutral refs.
7
7
  *
8
8
  * Upload is direct-to-storage (no bytes through the hosted API, so bundle size
9
9
  * is bounded by the object store rather than by the API's memory /