@runtypelabs/sdk 11.11.0 → 11.12.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/index.cjs CHANGED
@@ -11991,25 +11991,28 @@ const AGENT_CONFIG_KEYS = [
11991
11991
  "tenancyStrategy",
11992
11992
  "durability",
11993
11993
  "busyMessageRouting",
11994
- "state"
11994
+ "state",
11995
+ "output"
11995
11996
  ];
11996
11997
  const AGENT_CONFIG_KEY_LIST = [...AGENT_CONFIG_KEYS].sort();
11997
11998
  function isPlainObject(value) {
11998
11999
  return value !== null && typeof value === "object" && !Array.isArray(value);
11999
12000
  }
12000
- function normalizeValue(value) {
12001
- if (Array.isArray(value)) return value.map((item) => normalizeValue(item));
12001
+ function normalizeValue(value, keepNulls = false) {
12002
+ if (Array.isArray(value)) return value.map((item) => normalizeValue(item, keepNulls));
12002
12003
  if (isPlainObject(value)) {
12003
12004
  const normalized = {};
12004
12005
  for (const key of Object.keys(value).sort()) {
12005
12006
  const entry = value[key];
12006
- if (entry === void 0 || entry === null) continue;
12007
- normalized[key] = normalizeValue(entry);
12007
+ if (entry === void 0 || entry === null && !keepNulls) continue;
12008
+ normalized[key] = normalizeValue(entry, keepNulls);
12008
12009
  }
12009
12010
  return normalized;
12010
12011
  }
12011
12012
  return value;
12012
12013
  }
12014
+ /** Config keys whose nested nulls are literal values (a validator schema's `const: null`), not "unset". */
12015
+ const NULL_LITERAL_CONFIG_KEYS = /* @__PURE__ */ new Set(["output"]);
12013
12016
  /** Canonical normalized form — must stay byte-identical to the shared impl. */
12014
12017
  function normalizeAgentDefinition(definition) {
12015
12018
  const config = {};
@@ -12017,7 +12020,7 @@ function normalizeAgentDefinition(definition) {
12017
12020
  for (const key of AGENT_CONFIG_KEY_LIST) {
12018
12021
  const value = rawConfig[key];
12019
12022
  if (value === void 0 || value === null) continue;
12020
- config[key] = normalizeValue(value);
12023
+ config[key] = normalizeValue(value, NULL_LITERAL_CONFIG_KEYS.has(key));
12021
12024
  }
12022
12025
  return {
12023
12026
  name: definition.name,
@@ -14715,7 +14718,7 @@ function transformQueryParams(params) {
14715
14718
  return result;
14716
14719
  }
14717
14720
  // src/version.ts
14718
- const SDK_VERSION = "11.11.0";
14721
+ const SDK_VERSION = "11.12.0";
14719
14722
  /**
14720
14723
  * Canonical client identity the API uses for attribution
14721
14724
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
package/dist/index.d.cts CHANGED
@@ -1019,6 +1019,16 @@ interface paths {
1019
1019
  profileTemplate?: string;
1020
1020
  };
1021
1021
  model?: string;
1022
+ output?: {
1023
+ validators?: {
1024
+ maxBounces?: number;
1025
+ schema?: {
1026
+ [key: string]: unknown;
1027
+ };
1028
+ /** @enum {string} */
1029
+ type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
1030
+ }[];
1031
+ };
1022
1032
  /** @enum {string} */
1023
1033
  piiRedaction?: "default" | "off" | "redact";
1024
1034
  presencePenalty?: number;
@@ -1575,6 +1585,16 @@ interface paths {
1575
1585
  profileTemplate?: string;
1576
1586
  };
1577
1587
  model?: string;
1588
+ output?: {
1589
+ validators?: {
1590
+ maxBounces?: number;
1591
+ schema?: {
1592
+ [key: string]: unknown;
1593
+ };
1594
+ /** @enum {string} */
1595
+ type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
1596
+ }[];
1597
+ };
1578
1598
  /** @enum {string} */
1579
1599
  piiRedaction?: "default" | "off" | "redact";
1580
1600
  presencePenalty?: number;
@@ -2421,6 +2441,16 @@ interface paths {
2421
2441
  profileTemplate?: string;
2422
2442
  };
2423
2443
  model?: string;
2444
+ output?: {
2445
+ validators?: {
2446
+ maxBounces?: number;
2447
+ schema?: {
2448
+ [key: string]: unknown;
2449
+ };
2450
+ /** @enum {string} */
2451
+ type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
2452
+ }[];
2453
+ };
2424
2454
  /** @enum {string} */
2425
2455
  piiRedaction?: "default" | "off" | "redact";
2426
2456
  presencePenalty?: number;
@@ -60208,6 +60238,16 @@ interface components {
60208
60238
  profileTemplate?: string;
60209
60239
  };
60210
60240
  model?: string;
60241
+ output?: {
60242
+ validators?: {
60243
+ maxBounces?: number;
60244
+ schema?: {
60245
+ [key: string]: unknown;
60246
+ };
60247
+ /** @enum {string} */
60248
+ type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
60249
+ }[];
60250
+ };
60211
60251
  /** @enum {string} */
60212
60252
  piiRedaction?: "default" | "off" | "redact";
60213
60253
  presencePenalty?: number;
@@ -61046,6 +61086,16 @@ interface components {
61046
61086
  profileTemplate?: string;
61047
61087
  };
61048
61088
  model?: string;
61089
+ output?: {
61090
+ validators?: {
61091
+ maxBounces?: number;
61092
+ schema?: {
61093
+ [key: string]: unknown;
61094
+ };
61095
+ /** @enum {string} */
61096
+ type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
61097
+ }[];
61098
+ };
61049
61099
  /** @enum {string} */
61050
61100
  piiRedaction?: "default" | "off" | "redact";
61051
61101
  presencePenalty?: number;
@@ -62249,6 +62299,11 @@ interface components {
62249
62299
  * @enum {string}
62250
62300
  */
62251
62301
  outcome?: "completed" | "error" | "aborted";
62302
+ output?: {
62303
+ validation?: {
62304
+ failed: string[];
62305
+ };
62306
+ };
62252
62307
  seq: number;
62253
62308
  stepErrorCount?: number;
62254
62309
  stopReason?: string;
@@ -76179,6 +76234,15 @@ interface AgentDefinitionConfig {
76179
76234
  toolArgument: string;
76180
76235
  }>;
76181
76236
  };
76237
+ /** Settlement validators the loop runs before it settles; a failing one re-prompts up to `maxBounces` times. */
76238
+ output?: {
76239
+ validators?: Array<{
76240
+ type: 'candidate-question' | 'requested-json' | 'no-action' | 'json-schema';
76241
+ maxBounces?: number;
76242
+ /** Required on a `json-schema` validator, rejected on the others. */
76243
+ schema?: Record<string, unknown>;
76244
+ }>;
76245
+ };
76182
76246
  }
76183
76247
  /**
76184
76248
  * `defineAgent` input — the flat authoring shape: identity + presentation
package/dist/index.d.ts CHANGED
@@ -1019,6 +1019,16 @@ interface paths {
1019
1019
  profileTemplate?: string;
1020
1020
  };
1021
1021
  model?: string;
1022
+ output?: {
1023
+ validators?: {
1024
+ maxBounces?: number;
1025
+ schema?: {
1026
+ [key: string]: unknown;
1027
+ };
1028
+ /** @enum {string} */
1029
+ type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
1030
+ }[];
1031
+ };
1022
1032
  /** @enum {string} */
1023
1033
  piiRedaction?: "default" | "off" | "redact";
1024
1034
  presencePenalty?: number;
@@ -1575,6 +1585,16 @@ interface paths {
1575
1585
  profileTemplate?: string;
1576
1586
  };
1577
1587
  model?: string;
1588
+ output?: {
1589
+ validators?: {
1590
+ maxBounces?: number;
1591
+ schema?: {
1592
+ [key: string]: unknown;
1593
+ };
1594
+ /** @enum {string} */
1595
+ type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
1596
+ }[];
1597
+ };
1578
1598
  /** @enum {string} */
1579
1599
  piiRedaction?: "default" | "off" | "redact";
1580
1600
  presencePenalty?: number;
@@ -2421,6 +2441,16 @@ interface paths {
2421
2441
  profileTemplate?: string;
2422
2442
  };
2423
2443
  model?: string;
2444
+ output?: {
2445
+ validators?: {
2446
+ maxBounces?: number;
2447
+ schema?: {
2448
+ [key: string]: unknown;
2449
+ };
2450
+ /** @enum {string} */
2451
+ type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
2452
+ }[];
2453
+ };
2424
2454
  /** @enum {string} */
2425
2455
  piiRedaction?: "default" | "off" | "redact";
2426
2456
  presencePenalty?: number;
@@ -60208,6 +60238,16 @@ interface components {
60208
60238
  profileTemplate?: string;
60209
60239
  };
60210
60240
  model?: string;
60241
+ output?: {
60242
+ validators?: {
60243
+ maxBounces?: number;
60244
+ schema?: {
60245
+ [key: string]: unknown;
60246
+ };
60247
+ /** @enum {string} */
60248
+ type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
60249
+ }[];
60250
+ };
60211
60251
  /** @enum {string} */
60212
60252
  piiRedaction?: "default" | "off" | "redact";
60213
60253
  presencePenalty?: number;
@@ -61046,6 +61086,16 @@ interface components {
61046
61086
  profileTemplate?: string;
61047
61087
  };
61048
61088
  model?: string;
61089
+ output?: {
61090
+ validators?: {
61091
+ maxBounces?: number;
61092
+ schema?: {
61093
+ [key: string]: unknown;
61094
+ };
61095
+ /** @enum {string} */
61096
+ type: "candidate-question" | "requested-json" | "no-action" | "json-schema";
61097
+ }[];
61098
+ };
61049
61099
  /** @enum {string} */
61050
61100
  piiRedaction?: "default" | "off" | "redact";
61051
61101
  presencePenalty?: number;
@@ -62249,6 +62299,11 @@ interface components {
62249
62299
  * @enum {string}
62250
62300
  */
62251
62301
  outcome?: "completed" | "error" | "aborted";
62302
+ output?: {
62303
+ validation?: {
62304
+ failed: string[];
62305
+ };
62306
+ };
62252
62307
  seq: number;
62253
62308
  stepErrorCount?: number;
62254
62309
  stopReason?: string;
@@ -76179,6 +76234,15 @@ interface AgentDefinitionConfig {
76179
76234
  toolArgument: string;
76180
76235
  }>;
76181
76236
  };
76237
+ /** Settlement validators the loop runs before it settles; a failing one re-prompts up to `maxBounces` times. */
76238
+ output?: {
76239
+ validators?: Array<{
76240
+ type: 'candidate-question' | 'requested-json' | 'no-action' | 'json-schema';
76241
+ maxBounces?: number;
76242
+ /** Required on a `json-schema` validator, rejected on the others. */
76243
+ schema?: Record<string, unknown>;
76244
+ }>;
76245
+ };
76182
76246
  }
76183
76247
  /**
76184
76248
  * `defineAgent` input — the flat authoring shape: identity + presentation
package/dist/index.mjs CHANGED
@@ -11990,25 +11990,28 @@ const AGENT_CONFIG_KEYS = [
11990
11990
  "tenancyStrategy",
11991
11991
  "durability",
11992
11992
  "busyMessageRouting",
11993
- "state"
11993
+ "state",
11994
+ "output"
11994
11995
  ];
11995
11996
  const AGENT_CONFIG_KEY_LIST = [...AGENT_CONFIG_KEYS].sort();
11996
11997
  function isPlainObject(value) {
11997
11998
  return value !== null && typeof value === "object" && !Array.isArray(value);
11998
11999
  }
11999
- function normalizeValue(value) {
12000
- if (Array.isArray(value)) return value.map((item) => normalizeValue(item));
12000
+ function normalizeValue(value, keepNulls = false) {
12001
+ if (Array.isArray(value)) return value.map((item) => normalizeValue(item, keepNulls));
12001
12002
  if (isPlainObject(value)) {
12002
12003
  const normalized = {};
12003
12004
  for (const key of Object.keys(value).sort()) {
12004
12005
  const entry = value[key];
12005
- if (entry === void 0 || entry === null) continue;
12006
- normalized[key] = normalizeValue(entry);
12006
+ if (entry === void 0 || entry === null && !keepNulls) continue;
12007
+ normalized[key] = normalizeValue(entry, keepNulls);
12007
12008
  }
12008
12009
  return normalized;
12009
12010
  }
12010
12011
  return value;
12011
12012
  }
12013
+ /** Config keys whose nested nulls are literal values (a validator schema's `const: null`), not "unset". */
12014
+ const NULL_LITERAL_CONFIG_KEYS = /* @__PURE__ */ new Set(["output"]);
12012
12015
  /** Canonical normalized form — must stay byte-identical to the shared impl. */
12013
12016
  function normalizeAgentDefinition(definition) {
12014
12017
  const config = {};
@@ -12016,7 +12019,7 @@ function normalizeAgentDefinition(definition) {
12016
12019
  for (const key of AGENT_CONFIG_KEY_LIST) {
12017
12020
  const value = rawConfig[key];
12018
12021
  if (value === void 0 || value === null) continue;
12019
- config[key] = normalizeValue(value);
12022
+ config[key] = normalizeValue(value, NULL_LITERAL_CONFIG_KEYS.has(key));
12020
12023
  }
12021
12024
  return {
12022
12025
  name: definition.name,
@@ -14714,7 +14717,7 @@ function transformQueryParams(params) {
14714
14717
  return result;
14715
14718
  }
14716
14719
  // src/version.ts
14717
- const SDK_VERSION = "11.11.0";
14720
+ const SDK_VERSION = "11.12.0";
14718
14721
  /**
14719
14722
  * Canonical client identity the API uses for attribution
14720
14723
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "11.11.0",
3
+ "version": "11.12.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
6
6
  "main": "dist/index.cjs",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "dependencies": {},
26
26
  "devDependencies": {
27
- "@runtypelabs/shared": "3.102.0",
27
+ "@runtypelabs/shared": "3.103.0",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsdown": "^0.23.2",
30
30
  "typescript": "^6.0.3",