@runtypelabs/cli 2.57.0 → 2.57.1

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 (2) hide show
  1. package/dist/index.js +155 -103
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -56,7 +56,7 @@ var __exportAll = (all, no_symbols) => {
56
56
  return target;
57
57
  };
58
58
  var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
59
- // ../shared/dist/chunk-D9RiVw4h.mjs
59
+ // ../shared/dist/chunk-7fm07YIO.mjs
60
60
  /**
61
61
  * Every product surface type the platform stores and serves. The single source for the FPO surface
62
62
  * enum, the REST create and ensure schemas, and the shared `SurfaceType`; add a new type here only.
@@ -65,6 +65,7 @@ const PRODUCT_SURFACE_TYPES = [
65
65
  "chat",
66
66
  "mcp",
67
67
  "mcp_code",
68
+ "cli",
68
69
  "api",
69
70
  "webhook",
70
71
  "schedule",
@@ -110,7 +111,7 @@ function mergeResults(...results) {
110
111
  merged.valid = merged.errors.length === 0;
111
112
  return merged;
112
113
  }
113
- // ../shared/dist/chunk-XcxbQPuh.mjs
114
+ // ../shared/dist/chunk-BbTDzQd7.mjs
114
115
  /** Names every key of `T` exactly once, so a new credential field fails the build. */
115
116
  function credentialKeysOf(presence) {
116
117
  return Object.keys(presence);
@@ -122,7 +123,8 @@ const SURFACE_INBOUND_CREDENTIAL_KEYS = credentialKeysOf({
122
123
  secret: true,
123
124
  publicKey: true,
124
125
  authToken: true,
125
- twilioAuthToken: true
126
+ twilioAuthToken: true,
127
+ identityClientSecret: true
126
128
  });
127
129
  const SURFACE_OUTBOUND_CREDENTIAL_KEYS = credentialKeysOf({
128
130
  botToken: true,
@@ -135,6 +137,15 @@ const SURFACE_OUTBOUND_CREDENTIAL_KEYS = credentialKeysOf({
135
137
  smtpPassword: true
136
138
  });
137
139
  [.../* @__PURE__ */ new Set([...SURFACE_INBOUND_CREDENTIAL_KEYS, ...SURFACE_OUTBOUND_CREDENTIAL_KEYS])];
140
+ const OFFERS_OAUTH = {
141
+ keys_only: false,
142
+ consent: true,
143
+ required: true,
144
+ none: false
145
+ };
146
+ /** Every `authMode` a surface can store. Any other stored value reads as unset. */
147
+ const SURFACE_AUTH_MODES = Object.keys(OFFERS_OAUTH);
148
+ new Set(SURFACE_AUTH_MODES.filter((mode) => OFFERS_OAUTH[mode]));
138
149
  // ../shared/dist/chunk-DRY4gGEy.mjs
139
150
  /** Every evaluation model the gateway lists, keyed by the gateway id a call names. */
140
151
  const GATEWAY_EVALUATION_MODELS = Object.freeze({
@@ -7135,7 +7146,7 @@ function resolveFallback(parsed, context, tracking, options = {}) {
7135
7146
  return tracking.match;
7136
7147
  }
7137
7148
  new SimpleTemplateEngine();
7138
- // ../shared/dist/chunk-BfSQ06hZ.mjs
7149
+ // ../shared/dist/chunk-CYZSyWdd.mjs
7139
7150
  /**
7140
7151
  * Maps model families to provider-specific model IDs.
7141
7152
  * Use for routing: family + provider → exact model ID
@@ -7157,9 +7168,13 @@ const MODEL_FAMILY_PROVIDER_IDS = {
7157
7168
  "vercel": "anthropic/claude-fable-5.1"
7158
7169
  },
7159
7170
  "claude-fable-5-1-batch": { "vercel": "anthropic/claude-fable-5.1-batch" },
7171
+ "claude-fable-5-2": { "vercel": "anthropic/claude-fable-5.2" },
7172
+ "claude-fable-5-2-batch": { "vercel": "anthropic/claude-fable-5.2-batch" },
7160
7173
  "claude-fable-5-batch": { "vercel": "anthropic/claude-fable-5-batch" },
7161
7174
  "claude-fable-5.1": { "vercel": "anthropic/claude-fable-5.1" },
7162
7175
  "claude-fable-5.1-batch": { "vercel": "anthropic/claude-fable-5.1-batch" },
7176
+ "claude-fable-5.2": { "vercel": "anthropic/claude-fable-5.2" },
7177
+ "claude-fable-5.2-batch": { "vercel": "anthropic/claude-fable-5.2-batch" },
7163
7178
  "claude-haiku-4-5": {
7164
7179
  "anthropic": "claude-haiku-4-5-20251001",
7165
7180
  "vercel": "anthropic/claude-haiku-4.5"
@@ -7839,6 +7854,7 @@ const MODEL_FAMILY_PROVIDER_IDS = {
7839
7854
  "mistral-small": { "vercel": "mistral/mistral-small" },
7840
7855
  "morph-v3-fast": { "vercel": "morph/morph-v3-fast" },
7841
7856
  "morph-v3-large": { "vercel": "morph/morph-v3-large" },
7857
+ "muse-ember": { "vercel": "meta/muse-ember" },
7842
7858
  "muse-glimmer-30b": { "vercel": "meta/muse-glimmer-30b" },
7843
7859
  "muse-spark-1-1": { "vercel": "meta/muse-spark-1.1" },
7844
7860
  "muse-spark-1-2": { "vercel": "meta/muse-spark-1.2" },
@@ -8236,7 +8252,7 @@ const CREATOR_TO_PROVIDER = {
8236
8252
  "unknown": "openai"
8237
8253
  };
8238
8254
  new RegExp(`^${/Model stream stalled \((awaiting_first_token|idle|empty_completion)\) after \d+ms with no progress/.source}`);
8239
- // ../shared/dist/chunk-BtSflVAD.mjs
8255
+ // ../shared/dist/chunk-F1-FFFE7.mjs
8240
8256
  /**
8241
8257
  * Unwraps a single {{variableName}} template to its bare variable name, preserving array/object identity instead of stringifying via the template engine.
8242
8258
  * Returns source unchanged when it is not a lone {{...}} wrapper.
@@ -12659,7 +12675,7 @@ object$4({
12659
12675
  externalId: string$2().min(1).max(500).optional().describe("The conversation id in the source system. Re-creating with the same system and externalId returns the existing conversation with imported: false instead of a duplicate."),
12660
12676
  importedAt: string$2().datetime({ offset: true }).optional()
12661
12677
  });
12662
- // ../shared/dist/chunk-CoA2IB3c.mjs
12678
+ // ../shared/dist/chunk-Dkn7TqhO.mjs
12663
12679
  const voiceInterruptionModeSchema = _enum([
12664
12680
  "none",
12665
12681
  "cancel",
@@ -26276,12 +26292,13 @@ function loadBrandConfig(env) {
26276
26292
  }
26277
26293
  loadBrandConfig();
26278
26294
  BRAND_CONFIGS[DEFAULT_BRAND_NAME];
26279
- // ../shared/dist/chunk-2W0oIwXh.mjs
26295
+ // ../shared/dist/chunk-DV7xJaYR.mjs
26280
26296
  const ARCHITECTURE_PREVIEW_SURFACE_TYPES = [
26281
26297
  "chat",
26282
26298
  "api",
26283
26299
  "mcp",
26284
26300
  "mcp_code",
26301
+ "cli",
26285
26302
  "webhook",
26286
26303
  "schedule",
26287
26304
  "a2a",
@@ -27747,7 +27764,14 @@ object$4({
27747
27764
  simulationsAvailable: boolean().optional(),
27748
27765
  enableDelegateToRuntype: boolean().optional(),
27749
27766
  enableDelegateToOtto: boolean().optional(),
27750
- signalsConfigured: boolean().optional()
27767
+ signalsConfigured: boolean().optional(),
27768
+ enableCliSurface: boolean().optional(),
27769
+ enableCliSurfacePublish: boolean().optional(),
27770
+ enableCliSurfaceGraduation: boolean().optional(),
27771
+ enableMcpSurfaceSignIn: boolean().optional(),
27772
+ enableMcpSurfaceDeviceGrant: boolean().optional(),
27773
+ enableMcpSurfaceOobApprovals: boolean().optional(),
27774
+ enableMcpSurfaceCustomerIdp: boolean().optional()
27751
27775
  });
27752
27776
  const SLACK_REQUIRED_BOT_SCOPES = [
27753
27777
  "channels:history",
@@ -62752,7 +62776,7 @@ function h$2(e, t) {
62752
62776
  }
62753
62777
  }
62754
62778
  }
62755
- // ../mcp-cli/dist/chunk-CL8BNzsR.mjs
62779
+ // ../mcp-cli/dist/chunk-Ce22LqPV.mjs
62756
62780
  const i = /* @__PURE__ */ new Set([
62757
62781
  `approvals`,
62758
62782
  `auth`,
@@ -62799,7 +62823,10 @@ function l(e, t = {}) {
62799
62823
  for (let i of e) {
62800
62824
  if (a.has(i.name)) continue;
62801
62825
  let e = Object.prototype.hasOwnProperty.call(t, i.name) ? t[i.name] : void 0, c = s(i, e), l = {
62802
- tool: i,
62826
+ tool: e?.description ? {
62827
+ ...i,
62828
+ description: e.description
62829
+ } : i,
62803
62830
  path: c,
62804
62831
  aliases: [],
62805
62832
  hidden: e?.hidden === !0,
@@ -63090,16 +63117,16 @@ function te(e) {
63090
63117
  required: Array.isArray(t.required) ? t.required.filter((e) => typeof e == `string` && Object.hasOwn(i, e)) : []
63091
63118
  };
63092
63119
  }
63093
- function C$1(e, t) {
63120
+ function ne(e, t) {
63094
63121
  let n = (Array.isArray(t.anyOf) ? t.anyOf : Array.isArray(t.oneOf) ? t.oneOf : []).filter((e) => u(e) && !v$1(e));
63095
63122
  return n.length === 1 ? g$1(e, n[0]).schema : t;
63096
63123
  }
63097
- function w$1(e, t) {
63124
+ function re(e, t) {
63098
63125
  let n = e;
63099
63126
  for (let r of t) {
63100
63127
  let { schema: t, recursive: i } = g$1(e, n);
63101
63128
  if (i) return;
63102
- let a = C$1(e, t);
63129
+ let a = ne(e, t);
63103
63130
  if (r === `[]`) {
63104
63131
  if (!u(a.items)) return;
63105
63132
  n = a.items;
@@ -63109,11 +63136,11 @@ function w$1(e, t) {
63109
63136
  }
63110
63137
  return S$1(e, n);
63111
63138
  }
63112
- const T$1 = /* @__PURE__ */ new Set(/* @__PURE__ */ `answers.approvals.approve.approve-all.color.deny.detach.dry-run.example.field.help.help-all.input.json.json-body.jsonl.max-output.no-color.no-input.output.profile.raw-field.raw-strings.save.stream.timeout.token.verbose.wait.yes`.split(`.`));
63113
- function E$1(e) {
63139
+ const C$1 = /* @__PURE__ */ new Set(/* @__PURE__ */ `answers.approvals.approve.approve-all.color.deny.detach.dry-run.example.field.help.help-all.input.json.json-body.jsonl.max-output.no-color.no-input.output.profile.raw-field.raw-strings.save.stream.timeout.token.verbose.wait.yes`.split(`.`));
63140
+ function w$1(e) {
63114
63141
  return e.kind === `string` || e.kind === `enum` || e.kind === `binary`;
63115
63142
  }
63116
- function D$1(e, t) {
63143
+ function T$1(e, t) {
63117
63144
  let r = e.inputSchema ?? {}, i = te(r);
63118
63145
  if (!i) return {
63119
63146
  tool: e,
@@ -63132,21 +63159,23 @@ function D$1(e, t) {
63132
63159
  let u = S$1(r, t);
63133
63160
  if (u.readOnly) continue;
63134
63161
  if (u.kind === `const`) {
63135
- O$1(a, e, u.constValue);
63162
+ E$1(a, e, u.constValue);
63136
63163
  continue;
63137
63164
  }
63138
63165
  let d = e$1(e) || e, f = d;
63139
- if (T$1.has(f) || (l.get(d) ?? 0) > 1 || c.has(f)) for (f = `arg-${d}`, (c.has(f) || (l.get(d) ?? 0) > 1) && (f = `arg-${e}`); c.has(f);) f = `arg-${f}`;
63140
- c.add(f), s.push({
63166
+ if (C$1.has(f) || (l.get(d) ?? 0) > 1 || c.has(f)) for (f = `arg-${d}`, (c.has(f) || (l.get(d) ?? 0) > 1) && (f = `arg-${e}`); c.has(f);) f = `arg-${f}`;
63167
+ c.add(f);
63168
+ let p = i.required.includes(e);
63169
+ p && u.hasDefault && !Object.hasOwn(o, e) && E$1(o, e, u.defaultValue), s.push({
63141
63170
  wire: e,
63142
63171
  flag: f,
63143
63172
  field: u,
63144
- required: i.required.includes(e) && !u.hasDefault && !Object.hasOwn(o, e),
63173
+ required: p && !Object.hasOwn(o, e),
63145
63174
  hidden: u.deprecated
63146
63175
  });
63147
63176
  }
63148
63177
  let u = new Map(s.map((e) => [e.wire, e])), d = [];
63149
- if (t?.positional && t.positional.length > 0) d = t.positional.map((e) => u.get(e)).filter((e) => e !== void 0 && E$1(e.field));
63178
+ if (t?.positional && t.positional.length > 0) d = t.positional.map((e) => u.get(e)).filter((e) => e !== void 0 && w$1(e.field));
63150
63179
  else {
63151
63180
  let e = s.filter((e) => e.required);
63152
63181
  e.length === 1 && e[0].field.kind === `string` && (d = e);
@@ -63165,7 +63194,7 @@ function D$1(e, t) {
63165
63194
  required: s.filter((e) => e.required).map((e) => e.wire)
63166
63195
  };
63167
63196
  }
63168
- function O$1(e, t, n) {
63197
+ function E$1(e, t, n) {
63169
63198
  Object.defineProperty(e, t, {
63170
63199
  value: n,
63171
63200
  enumerable: !0,
@@ -63173,14 +63202,14 @@ function O$1(e, t, n) {
63173
63202
  writable: !0
63174
63203
  });
63175
63204
  }
63176
- function k$1(e) {
63205
+ function D$1(e) {
63177
63206
  return e?.startsWith(`\0`) === !0;
63178
63207
  }
63179
- function A$1(t, n) {
63208
+ function O$1(t, n) {
63180
63209
  let r = n.slice(1), i = t.startsWith(`--`) ? `${t}=${r}` : `${t}${r}`;
63181
63210
  return new n$2(`usage`, `${t} needs a value, but the word after it, ${r}, is a global flag`, `Write ${i} to pass it as the value, or put ${r} after the value`);
63182
63211
  }
63183
- const j$1 = /* @__PURE__ */ new Set([
63212
+ const k$1 = /* @__PURE__ */ new Set([
63184
63213
  `auto`,
63185
63214
  `json`,
63186
63215
  `text`,
@@ -63188,7 +63217,7 @@ const j$1 = /* @__PURE__ */ new Set([
63188
63217
  `ndjson`,
63189
63218
  `table`
63190
63219
  ]);
63191
- const M$1 = /* @__PURE__ */ new Set([
63220
+ const A$1 = /* @__PURE__ */ new Set([
63192
63221
  `output`,
63193
63222
  `timeout`,
63194
63223
  `save`,
@@ -63204,34 +63233,34 @@ const M$1 = /* @__PURE__ */ new Set([
63204
63233
  `wait`,
63205
63234
  `stream`
63206
63235
  ]);
63207
- const N$1 = /* @__PURE__ */ new Set([
63236
+ const j$1 = /* @__PURE__ */ new Set([
63208
63237
  `auto`,
63209
63238
  `raw`,
63210
63239
  `off`
63211
63240
  ]);
63212
- const re = /* @__PURE__ */ new Set([
63241
+ const M$1 = /* @__PURE__ */ new Set([
63213
63242
  `prompt`,
63214
63243
  `fail`,
63215
63244
  `deny`
63216
63245
  ]);
63217
- const P$1 = {
63246
+ const N$1 = {
63218
63247
  h: `help`,
63219
63248
  o: `output`,
63220
63249
  y: `yes`,
63221
63250
  f: `raw-field`,
63222
63251
  F: `field`
63223
63252
  };
63224
- function F(e) {
63253
+ function P$1(e) {
63225
63254
  return e.field.kind === `scalar-array` || e.field.kind === `object-array` || e.field.kind === `map`;
63226
63255
  }
63227
- function I(t, n) {
63256
+ function F(t, n) {
63228
63257
  let r = /^(\d+(?:\.\d+)?)(ms|s|m|h)?$/.exec(t.trim());
63229
63258
  if (!r) throw new n$2(`invalid_value`, `${n} expects a duration such as 30000, 30s or 5m`);
63230
63259
  let i = Number(r[1]), a = r[2] ?? `ms`, o = Math.round(i * (a === `h` ? 36e5 : a === `m` ? 6e4 : a === `s` ? 1e3 : 1));
63231
63260
  if (o <= 0) throw new n$2(`invalid_value`, `${n} must be greater than zero`);
63232
63261
  return o;
63233
63262
  }
63234
- function ie(t) {
63263
+ function I(t) {
63235
63264
  if (t === `0` || t === `none` || t === `unlimited`) return null;
63236
63265
  if (!/^\d+$/.test(t)) throw new n$2(`invalid_value`, `--max-output expects a character count, or 0 for unlimited`);
63237
63266
  return Number(t);
@@ -63260,11 +63289,11 @@ function ae(t, n) {
63260
63289
  if (s.has(t)) throw new n$2(`usage`, `--${t} was given more than once`);
63261
63290
  switch (s.add(t), t) {
63262
63291
  case `output`:
63263
- if (!j$1.has(n)) throw new n$2(`invalid_value`, `--output must be one of ${[...j$1].join(`, `)}`);
63292
+ if (!k$1.has(n)) throw new n$2(`invalid_value`, `--output must be one of ${[...k$1].join(`, `)}`);
63264
63293
  r.output = L(r.output, n);
63265
63294
  return;
63266
63295
  case `timeout`:
63267
- r.timeoutMs = I(n, `--timeout`);
63296
+ r.timeoutMs = F(n, `--timeout`);
63268
63297
  return;
63269
63298
  case `save`:
63270
63299
  r.save = n;
@@ -63276,10 +63305,10 @@ function ae(t, n) {
63276
63305
  r.jsonBody = n;
63277
63306
  return;
63278
63307
  case `max-output`:
63279
- r.maxOutput = ie(n);
63308
+ r.maxOutput = I(n);
63280
63309
  return;
63281
63310
  case `approvals`:
63282
- if (!re.has(n)) throw new n$2(`invalid_value`, `--approvals must be prompt, fail or deny`);
63311
+ if (!M$1.has(n)) throw new n$2(`invalid_value`, `--approvals must be prompt, fail or deny`);
63283
63312
  r.approvals = n;
63284
63313
  return;
63285
63314
  case `answers`:
@@ -63289,7 +63318,7 @@ function ae(t, n) {
63289
63318
  r.wait = n;
63290
63319
  return;
63291
63320
  case `stream`:
63292
- if (!N$1.has(n)) throw new n$2(`invalid_value`, `--stream must be auto, raw or off`);
63321
+ if (!j$1.has(n)) throw new n$2(`invalid_value`, `--stream must be auto, raw or off`);
63293
63322
  r.stream = n;
63294
63323
  return;
63295
63324
  }
@@ -63310,7 +63339,7 @@ function ae(t, n) {
63310
63339
  }
63311
63340
  }, u = (t, n) => {
63312
63341
  let r = i.get(t) ?? [];
63313
- if (r.length > 0 && !F(t)) throw new n$2(`usage`, `--${t.flag} was given more than once`, oe(t));
63342
+ if (r.length > 0 && !P$1(t)) throw new n$2(`usage`, `--${t.flag} was given more than once`, oe(t));
63314
63343
  r.push(n), i.set(t, r);
63315
63344
  }, d = (t, n) => {
63316
63345
  if (a.has(t)) throw new n$2(`usage`, `--${t.flag} was given more than once`);
@@ -63318,7 +63347,7 @@ function ae(t, n) {
63318
63347
  };
63319
63348
  for (let r = 0; r < t.length; r += 1) {
63320
63349
  let i = t[r];
63321
- if (!k$1(i)) {
63350
+ if (!D$1(i)) {
63322
63351
  if (i === `--`) {
63323
63352
  o.push(...t.slice(r + 1));
63324
63353
  break;
@@ -63326,7 +63355,7 @@ function ae(t, n) {
63326
63355
  if (i.startsWith(`--`) && i.length > 2) {
63327
63356
  let a = i.indexOf(`=`), o = a === -1 ? i.slice(2) : i.slice(2, a), s = a === -1 ? void 0 : i.slice(a + 1), f = () => {
63328
63357
  if (s !== void 0) return s;
63329
- if (k$1(t[r + 1])) throw A$1(i, t[r + 1]);
63358
+ if (D$1(t[r + 1])) throw O$1(i, t[r + 1]);
63330
63359
  if (r + 1 >= t.length) throw new n$2(`missing_argument`, `--${o} needs a value`);
63331
63360
  return r += 1, t[r];
63332
63361
  }, p = n.byFlag.get(o);
@@ -63342,7 +63371,7 @@ function ae(t, n) {
63342
63371
  continue;
63343
63372
  }
63344
63373
  }
63345
- if (M$1.has(o)) {
63374
+ if (A$1.has(o)) {
63346
63375
  c(o, f());
63347
63376
  continue;
63348
63377
  }
@@ -63350,13 +63379,13 @@ function ae(t, n) {
63350
63379
  throw R(o, n);
63351
63380
  }
63352
63381
  if (i.startsWith(`-`) && i.length > 1 && !/^-\d/.test(i)) {
63353
- let a = i.slice(1, 2), o = P$1[a];
63382
+ let a = i.slice(1, 2), o = N$1[a];
63354
63383
  if (!o) throw R(i.slice(1), n);
63355
63384
  let s = i.slice(2);
63356
- if (M$1.has(o)) {
63385
+ if (A$1.has(o)) {
63357
63386
  let n = s;
63358
63387
  if (n === ``) {
63359
- if (k$1(t[r + 1])) throw A$1(i, t[r + 1]);
63388
+ if (D$1(t[r + 1])) throw O$1(i, t[r + 1]);
63360
63389
  if (r + 1 >= t.length) throw new n$2(`missing_argument`, `-${a} needs a value`);
63361
63390
  r += 1, n = t[r];
63362
63391
  }
@@ -63389,7 +63418,7 @@ function se(t, n) {
63389
63418
  throw new n$2(`invalid_value`, `${n} expects true or false, got ${JSON.stringify(t)}`);
63390
63419
  }
63391
63420
  function R(n, r) {
63392
- let a = n$1(n, [...r.flags.filter((e) => !e.hidden).map((e) => e.flag), ...T$1]);
63421
+ let a = n$1(n, [...r.flags.filter((e) => !e.hidden).map((e) => e.flag), ...C$1]);
63393
63422
  return new n$2(`unknown_flag`, `Unknown flag --${n} for ${r.tool.name}`, a.length > 0 ? `Did you mean ${a.map((e) => `--${e}`).join(`, `)}?` : `Run with --help to list flags`);
63394
63423
  }
63395
63424
  function z(e) {
@@ -63433,7 +63462,7 @@ function U(e, t, n = 0) {
63433
63462
  return a.length > 0 ? `{ ${a.join(`; `)} }` : `object`;
63434
63463
  }
63435
63464
  function W(e) {
63436
- let t = e.inputSchema ?? {}, n = D$1(e);
63465
+ let t = e.inputSchema ?? {}, n = T$1(e);
63437
63466
  if (n.bodyOnly) return r(`${e.name}(body: unknown)`);
63438
63467
  let i = n.flags.filter((e) => !e.hidden).map((e) => `${e.wire}${e.required ? `` : `?`}: ${V(e.field, t)}${e.field.nullable ? ` | null` : ``}`);
63439
63468
  return r(`${e.name}(${i.length > 0 ? `{ ${i.join(`; `)} }` : ``})`);
@@ -63456,7 +63485,7 @@ function de(e) {
63456
63485
  return r(`${e.map((e) => ` ${e.command.padEnd(t)} ${e.summary}${e.badges.length > 0 ? ` [${e.badges.join(`, `)}]` : ``}`.trimEnd()).join(`
63457
63486
  `)}\n`);
63458
63487
  }
63459
- // ../mcp-cli/dist/chunk-DqN1GrzM.mjs
63488
+ // ../mcp-cli/dist/chunk-BRgLEWMS.mjs
63460
63489
  var p = class extends n$2 {};
63461
63490
  function m(e) {
63462
63491
  return typeof e == `object` && !!e && !Array.isArray(e);
@@ -63472,17 +63501,17 @@ function g(e) {
63472
63501
  if (Array.isArray(e)) return e.map(g);
63473
63502
  if (m(e)) {
63474
63503
  let t = {};
63475
- for (let [r, i] of Object.entries(e)) O$1(t, r, g(i));
63504
+ for (let [r, i] of Object.entries(e)) E$1(t, r, g(i));
63476
63505
  return t;
63477
63506
  }
63478
63507
  return e;
63479
63508
  }
63480
63509
  function _(e, t) {
63481
63510
  let r = {};
63482
- for (let [t, i] of Object.entries(e)) O$1(r, t, i);
63511
+ for (let [t, i] of Object.entries(e)) E$1(r, t, i);
63483
63512
  for (let [e, i] of Object.entries(t)) {
63484
63513
  let t = Object.prototype.hasOwnProperty.call(r, e) ? r[e] : void 0;
63485
- O$1(r, e, m(t) && m(i) ? _(t, i) : i);
63514
+ E$1(r, e, m(t) && m(i) ? _(t, i) : i);
63486
63515
  }
63487
63516
  return r;
63488
63517
  }
@@ -63594,7 +63623,7 @@ async function w(t, r, i) {
63594
63623
  if (r <= 0) throw new p(`invalid_value`, `${a} expects key=value`);
63595
63624
  let c = s.slice(0, r);
63596
63625
  if (Object.prototype.hasOwnProperty.call(t, c)) throw new n$2(`usage`, `${a} sets ${c} more than once`);
63597
- O$1(t, c, await C(o.item ?? o, s.slice(r + 1), `${a} ${c}`, i));
63626
+ E$1(t, c, await C(o.item ?? o, s.slice(r + 1), `${a} ${c}`, i));
63598
63627
  }
63599
63628
  return t;
63600
63629
  }
@@ -63624,7 +63653,7 @@ function T(t, n) {
63624
63653
  async function E(e, n, r, i) {
63625
63654
  let a = `${e.typed ? `-F` : `-f`} ${e.path.join(`.`)}`;
63626
63655
  if (!e.typed || r) return e.raw;
63627
- let s = w$1(n, e.append ? [...e.path, `[]`] : e.path), c = e.raw;
63656
+ let s = re(n, e.append ? [...e.path, `[]`] : e.path), c = e.raw;
63628
63657
  if (c.startsWith(`@@`)) c = c.slice(1);
63629
63658
  else if (c.startsWith(`@`)) {
63630
63659
  let e = await v(c, i, a);
@@ -63651,19 +63680,19 @@ function O(t, r, i) {
63651
63680
  let i = Object.prototype.hasOwnProperty.call(a, t) ? a[t] : void 0;
63652
63681
  if (i === void 0) {
63653
63682
  let e = {};
63654
- O$1(a, t, e), a = e;
63683
+ E$1(a, t, e), a = e;
63655
63684
  } else if (m(i)) a = i;
63656
63685
  else throw new n$2(`usage`, `-F ${r.path.join(`.`)} conflicts with a non-object value`);
63657
63686
  }
63658
63687
  let o = r.path[r.path.length - 1];
63659
63688
  if (r.append) {
63660
63689
  let t = Object.prototype.hasOwnProperty.call(a, o) ? a[o] : void 0, s = r.empty ? [] : [i];
63661
- if (t === void 0) O$1(a, o, s);
63690
+ if (t === void 0) E$1(a, o, s);
63662
63691
  else if (Array.isArray(t)) t.push(...s);
63663
63692
  else throw new n$2(`usage`, `-F ${o}[] conflicts with a non-array value`);
63664
63693
  } else {
63665
63694
  if (Object.prototype.hasOwnProperty.call(a, o)) throw new n$2(`usage`, `${r.path.join(`.`)} is set more than once by -f/-F`);
63666
- O$1(a, o, i);
63695
+ E$1(a, o, i);
63667
63696
  }
63668
63697
  }
63669
63698
  async function k(e, t) {
@@ -63745,12 +63774,12 @@ async function P(t, r, i) {
63745
63774
  for (let [a, o] of r.positionals.entries()) {
63746
63775
  let s = t.positionals[a], c = r.values.get(s);
63747
63776
  if (c && c.some((e) => e !== o)) throw new n$2(`usage`, `${s.wire} was given both positionally and as --${s.flag}, with different values`);
63748
- O$1(d, s.wire, await C(s.field, o, s.wire, i));
63777
+ E$1(d, s.wire, await C(s.field, o, s.wire, i));
63749
63778
  }
63750
- for (let [e, t] of r.values) O$1(d, e.wire, await w(e, t, i));
63751
- for (let [e, t] of r.booleans) O$1(d, e.wire, t);
63779
+ for (let [e, t] of r.values) E$1(d, e.wire, await w(e, t, i));
63780
+ for (let [e, t] of r.booleans) E$1(d, e.wire, t);
63752
63781
  u = _(u, d);
63753
- for (let [e, r] of [...Object.entries(t.constFields), ...Object.entries(t.defaults)]) Object.prototype.hasOwnProperty.call(u, e) || O$1(u, e, structuredClone(r));
63782
+ for (let [e, r] of [...Object.entries(t.constFields), ...Object.entries(t.defaults)]) Object.prototype.hasOwnProperty.call(u, e) || E$1(u, e, structuredClone(r));
63754
63783
  let f = t.required.filter((e) => !Object.prototype.hasOwnProperty.call(u, e));
63755
63784
  if (f.length > 0) {
63756
63785
  let e = f.map((e) => {
@@ -63779,7 +63808,7 @@ function toMcpCliArgv(options) {
63779
63808
  }
63780
63809
  /** Whether resolving these arguments will consume the process stdin stream; the parser that reads it decides. */
63781
63810
  function usesMcpStdin(options) {
63782
- const spec = D$1(SCHEMALESS);
63811
+ const spec = T$1(SCHEMALESS);
63783
63812
  try {
63784
63813
  return N(ae(toMcpCliArgv(options), spec), spec);
63785
63814
  } catch {
@@ -63809,8 +63838,8 @@ async function resolveMcpArguments(options, dependencies = {}) {
63809
63838
  },
63810
63839
  ...dependencies
63811
63840
  };
63812
- const toolSpec = D$1(deps.tool ?? SCHEMALESS);
63813
- const spec = toolSpec.bodyOnly ? D$1(SCHEMALESS) : {
63841
+ const toolSpec = T$1(deps.tool ?? SCHEMALESS);
63842
+ const spec = toolSpec.bodyOnly ? T$1(SCHEMALESS) : {
63814
63843
  ...toolSpec,
63815
63844
  required: [],
63816
63845
  positionals: []
@@ -70302,6 +70331,43 @@ function createHarnessCaptureFactory(options) {
70302
70331
  });
70303
70332
  return factory;
70304
70333
  }
70334
+ // ../shared/dist/simulation/reported-usage.mjs
70335
+ const amount = number$2().finite().nonnegative();
70336
+ const tokens = amount.int();
70337
+ /** Producer estimates for one turn, independent of Runtype's measured usage and billing. */
70338
+ const reportedUsageSchema = object$4({
70339
+ costUsd: amount.nullable(),
70340
+ completeness: _enum(["complete", "partial"]),
70341
+ scope: string$2().min(1).max(120),
70342
+ models: array(object$4({
70343
+ model: string$2().min(1).max(200),
70344
+ canonicalModel: string$2().min(1).max(200).optional(),
70345
+ provider: string$2().max(100).optional(),
70346
+ pricingBasis: _enum([
70347
+ "list",
70348
+ "managed",
70349
+ "unknown"
70350
+ ]).optional(),
70351
+ costUsd: amount.nullable().optional(),
70352
+ inputTokens: tokens.optional(),
70353
+ outputTokens: tokens.optional(),
70354
+ cacheReadInputTokens: tokens.optional(),
70355
+ cacheCreationInputTokens: tokens.optional()
70356
+ })).max(100).optional()
70357
+ });
70358
+ /** Known estimates and reporting coverage; a partial sum is never a whole-episode cost. */
70359
+ const selfReportedCostSchema = object$4({
70360
+ knownCostUsd: amount.nullable(),
70361
+ reportedTurns: tokens,
70362
+ totalTurns: tokens,
70363
+ completeTurns: tokens,
70364
+ unknownEpisodes: tokens.optional(),
70365
+ completeness: _enum([
70366
+ "complete",
70367
+ "partial",
70368
+ "unknown"
70369
+ ])
70370
+ });
70305
70371
  const simTerminationSchema = _enum([
70306
70372
  "goal_met",
70307
70373
  "gave_up",
@@ -70432,43 +70498,7 @@ const productKindSchema = _enum([
70432
70498
  "external",
70433
70499
  "spec_only"
70434
70500
  ]);
70435
- // ../shared/dist/chunk-CLmUyAjf.mjs
70436
- const amount = number$2().finite().nonnegative();
70437
- const tokens = amount.int();
70438
- /** Producer estimates for one turn, independent of Runtype's measured usage and billing. */
70439
- const reportedUsageSchema = object$4({
70440
- costUsd: amount.nullable(),
70441
- completeness: _enum(["complete", "partial"]),
70442
- scope: string$2().min(1).max(120),
70443
- models: array(object$4({
70444
- model: string$2().min(1).max(200),
70445
- canonicalModel: string$2().min(1).max(200).optional(),
70446
- provider: string$2().max(100).optional(),
70447
- pricingBasis: _enum([
70448
- "list",
70449
- "managed",
70450
- "unknown"
70451
- ]).optional(),
70452
- costUsd: amount.nullable().optional(),
70453
- inputTokens: tokens.optional(),
70454
- outputTokens: tokens.optional(),
70455
- cacheReadInputTokens: tokens.optional(),
70456
- cacheCreationInputTokens: tokens.optional()
70457
- })).max(100).optional()
70458
- });
70459
- /** Known estimates and reporting coverage; a partial sum is never a whole-episode cost. */
70460
- const selfReportedCostSchema = object$4({
70461
- knownCostUsd: amount.nullable(),
70462
- reportedTurns: tokens,
70463
- totalTurns: tokens,
70464
- completeTurns: tokens,
70465
- unknownEpisodes: tokens.optional(),
70466
- completeness: _enum([
70467
- "complete",
70468
- "partial",
70469
- "unknown"
70470
- ])
70471
- });
70501
+ // ../shared/dist/chunk-BobaAxaK.mjs
70472
70502
  /** The manifest file at the root of a candidate's source bundle. */
70473
70503
  const CANDIDATE_MANIFEST_FILENAME = "runtype-candidate.json";
70474
70504
  const candidateRuntimeSchema = _enum([
@@ -71044,7 +71074,8 @@ const targetRecordingSchema = object$4({
71044
71074
  enabled: boolean(),
71045
71075
  retentionDays: number$2().int().min(1).max(365)
71046
71076
  });
71047
- object$4({
71077
+ /** One target's recording policy as admission froze it into the run plan. */
71078
+ const frozenTargetRecordingSchema = object$4({
71048
71079
  mode: _enum([
71049
71080
  "off",
71050
71081
  "shape-only",
@@ -73164,10 +73195,18 @@ const draftSimulationToolsSchema = array(object$4({
73164
73195
  /** The tool's input JSON Schema as the target listed it; the drafting agent reads its parameters. */
73165
73196
  inputSchema: record$2(string$2(), unknown()).refine((schema) => jsonChars(schema) <= MAX_DRAFT_TOOL_INPUT_SCHEMA_CHARS, { message: `An inputSchema may take at most ${MAX_DRAFT_TOOL_INPUT_SCHEMA_CHARS} characters as JSON.` }).optional()
73166
73197
  })).min(1).max(1e3).refine((tools) => tools.reduce((sum, tool) => sum + (tool.inputSchema ? jsonChars(tool.inputSchema) : 0), 0) <= MAX_DRAFT_TOOL_INPUT_SCHEMAS_TOTAL_CHARS, { message: `The inputSchemas of one request may take at most ${MAX_DRAFT_TOOL_INPUT_SCHEMAS_TOTAL_CHARS} characters together.` });
73198
+ /** Harder tasks than a simulation already runs: each chains two or more tool calls, around the tools agents used least. */
73199
+ const draftHarderTasksSchema = object$4({
73200
+ /** Tools agents called least in a report; when any is listed, every task uses at least one of them. */
73201
+ focusTools: array(string$2().min(1).max(128)).max(12),
73202
+ /** The titles of the tasks the simulation already has; a task repeating one is turned back. */
73203
+ existingTitles: array(string$2().min(1).max(255)).max(200)
73204
+ });
73167
73205
  object$4({
73168
73206
  targetName: string$2().min(1).max(255),
73169
73207
  tools: draftSimulationToolsSchema,
73170
- count: number$2().int().min(1).max(12).optional()
73208
+ count: number$2().int().min(1).max(12).optional(),
73209
+ harder: draftHarderTasksSchema.optional()
73171
73210
  });
73172
73211
  /** One drafted task; every `expectedTools` name is one the request listed. */
73173
73212
  const draftedSimulationTaskSchema = object$4({
@@ -73282,11 +73321,18 @@ object$4({
73282
73321
  trials: number$2().int().min(1).max(10).optional(),
73283
73322
  trigger: simulationRunTriggerSchema.optional(),
73284
73323
  /** The variant the others are compared against: one of the run's variants, over the simulation's own baseline. */
73285
- baselineVariantId: entityId.optional()
73324
+ baselineVariantId: entityId.optional(),
73325
+ /**
73326
+ * A recording run: these server tools answer live on every variant, so the recorder keeps their real answers for
73327
+ * later replay. Every variant must be today's version (no overlay), and every target must record in `full`.
73328
+ */
73329
+ recordTools: array(string$2().min(1).max(255)).min(1).max(64).optional()
73286
73330
  });
73287
73331
  discriminatedUnion("dryRun", [object$4({
73288
73332
  dryRun: literal(true),
73289
- estimate: runEstimateSchema
73333
+ estimate: runEstimateSchema,
73334
+ /** How each variant target would record this run, keyed by target id: the kill switch, then the target (D1). */
73335
+ recording: record$2(string$2(), frozenTargetRecordingSchema).optional()
73290
73336
  }), object$4({
73291
73337
  dryRun: literal(false),
73292
73338
  runId: entityId,
@@ -73298,6 +73344,12 @@ const simulationRunResponseSchema = object$4({
73298
73344
  run: simulationRunSchema,
73299
73345
  reportId: entityId.nullable()
73300
73346
  });
73347
+ object$4({
73348
+ /** Comma-separated server tools; the response then counts this run's live calls to each that the recorder kept. */
73349
+ recordedCallsFor: string$2().max(4096).optional() });
73350
+ simulationRunResponseSchema.extend({
73351
+ /** Per tool named in `recordedCallsFor`: this run's live calls the recorder kept, 0 for a tool with none. */
73352
+ recordedCalls: record$2(string$2(), number$2().int()).optional() });
73301
73353
  object$4({ run: simulationRunSchema });
73302
73354
  simulationRunResponseSchema.extend({ repair: object$4({
73303
73355
  /** Episodes whose AI judge failed, graded again from their stored transcripts. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/cli",
3
- "version": "2.57.0",
3
+ "version": "2.57.1",
4
4
  "description": "Command-line interface for Runtype AI platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -13,7 +13,7 @@
13
13
  "@modelcontextprotocol/core": "2.3.1",
14
14
  "@napi-rs/keyring": "2.1.0",
15
15
  "@runtypelabs/ink-components": "0.3.13",
16
- "@runtypelabs/sdk": "11.17.0",
16
+ "@runtypelabs/sdk": "11.18.0",
17
17
  "@runtypelabs/terminal-animations": "0.2.4",
18
18
  "add-mcp": "2.6.0",
19
19
  "chalk": "^5.3.0",
@@ -37,10 +37,10 @@
37
37
  "devDependencies": {
38
38
  "@modelcontextprotocol/server": "2.3.1",
39
39
  "@runtypelabs/device-bridge": "0.2.5",
40
- "@runtypelabs/mcp-cli": "0.1.0",
41
- "@runtypelabs/model-execution": "0.41.6",
40
+ "@runtypelabs/mcp-cli": "0.2.0",
41
+ "@runtypelabs/model-execution": "0.41.7",
42
42
  "@runtypelabs/persona": "4.34.0",
43
- "@runtypelabs/shared": "3.110.0",
43
+ "@runtypelabs/shared": "3.111.0",
44
44
  "@types/express": "^5.0.6",
45
45
  "@types/micromatch": "^4.0.9",
46
46
  "@types/node": "^25.3.3",