dorkos 0.34.0 → 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.
@@ -22372,6 +22372,7 @@ var init_merge_marketplace = __esm({
22372
22372
  });
22373
22373
 
22374
22374
  // ../marketplace/dist/marketplace-json-parser.js
22375
+ import { z as z23 } from "zod";
22375
22376
  function parseMarketplaceJson(content3) {
22376
22377
  let parsed;
22377
22378
  try {
@@ -22413,60 +22414,112 @@ function parseDorkosSidecar(content3) {
22413
22414
  function formatZodIssues(issues) {
22414
22415
  return issues.map((i4) => `${i4.path.join(".") || "<root>"}: ${i4.message}`).join("; ");
22415
22416
  }
22417
+ function parseMarketplaceJsonLenient(content3) {
22418
+ let parsed;
22419
+ try {
22420
+ parsed = JSON.parse(content3);
22421
+ } catch (err) {
22422
+ return {
22423
+ ok: false,
22424
+ error: `Invalid JSON: ${err instanceof Error ? err.message : String(err)}`
22425
+ };
22426
+ }
22427
+ const envelope = LenientMarketplaceEnvelopeSchema.safeParse(parsed);
22428
+ if (!envelope.success) {
22429
+ return {
22430
+ ok: false,
22431
+ error: `marketplace.json validation failed: ${formatZodIssues(envelope.error.issues)}`
22432
+ };
22433
+ }
22434
+ const validPlugins = [];
22435
+ const skippedPlugins = [];
22436
+ envelope.data.plugins.forEach((rawEntry, index3) => {
22437
+ const entryResult = LenientPluginEntrySchema.safeParse(rawEntry);
22438
+ if (entryResult.success) {
22439
+ validPlugins.push(entryResult.data);
22440
+ return;
22441
+ }
22442
+ const recoveredName = rawEntry !== null && typeof rawEntry === "object" && "name" in rawEntry ? String(rawEntry.name) : void 0;
22443
+ skippedPlugins.push({
22444
+ index: index3,
22445
+ name: recoveredName,
22446
+ error: formatZodIssues(entryResult.error.issues)
22447
+ });
22448
+ });
22449
+ const marketplace = {
22450
+ ...envelope.data,
22451
+ plugins: validPlugins
22452
+ };
22453
+ return {
22454
+ ok: true,
22455
+ marketplace,
22456
+ skippedPlugins
22457
+ };
22458
+ }
22459
+ var LenientMarketplaceEnvelopeSchema, LenientPluginEntrySchema;
22416
22460
  var init_marketplace_json_parser = __esm({
22417
22461
  "../marketplace/dist/marketplace-json-parser.js"() {
22418
22462
  "use strict";
22419
22463
  init_marketplace_json_schema();
22420
22464
  init_dorkos_sidecar_schema();
22421
22465
  init_merge_marketplace();
22466
+ LenientMarketplaceEnvelopeSchema = z23.object({
22467
+ name: z23.string().min(1).regex(/^[a-z0-9][a-z0-9.-]*$/, "Must be kebab-case (letters, digits, dots, hyphens)"),
22468
+ owner: OwnerSchema,
22469
+ metadata: MetadataSchema.optional(),
22470
+ plugins: z23.array(z23.unknown())
22471
+ }).passthrough();
22472
+ LenientPluginEntrySchema = MarketplaceJsonEntrySchema.extend({
22473
+ name: z23.string().min(1).regex(/^[a-z0-9][a-z0-9.-]*$/, "Must be kebab-case (letters, digits, dots, hyphens)")
22474
+ });
22422
22475
  }
22423
22476
  });
22424
22477
 
22425
22478
  // ../marketplace/dist/cc-validator.js
22426
- import { z as z23 } from "zod";
22479
+ import { z as z24 } from "zod";
22427
22480
  var CcSourceSchema, CcAuthorSchema, CcOwnerSchema, CcMetadataSchema, CcMarketplaceJsonEntrySchema, CcMarketplaceJsonSchema;
22428
22481
  var init_cc_validator = __esm({
22429
22482
  "../marketplace/dist/cc-validator.js"() {
22430
22483
  "use strict";
22431
22484
  init_marketplace_json_schema();
22432
22485
  CcSourceSchema = PluginSourceSchema2;
22433
- CcAuthorSchema = z23.object({
22434
- name: z23.string().min(1),
22435
- email: z23.string().email().optional()
22486
+ CcAuthorSchema = z24.object({
22487
+ name: z24.string().min(1),
22488
+ email: z24.string().email().optional()
22436
22489
  }).strict();
22437
- CcOwnerSchema = z23.object({
22438
- name: z23.string().min(1),
22439
- email: z23.string().email().optional()
22490
+ CcOwnerSchema = z24.object({
22491
+ name: z24.string().min(1),
22492
+ email: z24.string().email().optional()
22440
22493
  }).strict();
22441
- CcMetadataSchema = z23.object({
22442
- description: z23.string().optional(),
22443
- version: z23.string().optional(),
22444
- pluginRoot: z23.string().optional()
22494
+ CcMetadataSchema = z24.object({
22495
+ description: z24.string().optional(),
22496
+ version: z24.string().optional(),
22497
+ pluginRoot: z24.string().optional()
22445
22498
  }).strict();
22446
- CcMarketplaceJsonEntrySchema = z23.object({
22447
- name: z23.string().min(1).regex(/^[a-z0-9][a-z0-9-]*$/, "Must be kebab-case"),
22499
+ CcMarketplaceJsonEntrySchema = z24.object({
22500
+ name: z24.string().min(1).regex(/^[a-z0-9][a-z0-9-]*$/, "Must be kebab-case"),
22448
22501
  source: CcSourceSchema,
22449
- description: z23.string().optional(),
22450
- version: z23.string().optional(),
22502
+ description: z24.string().optional(),
22503
+ version: z24.string().optional(),
22451
22504
  author: CcAuthorSchema.optional(),
22452
- homepage: z23.string().url().optional(),
22453
- repository: z23.string().url().optional(),
22454
- license: z23.string().max(64).optional(),
22455
- keywords: z23.array(z23.string()).max(50).optional(),
22456
- category: z23.string().max(64).optional(),
22457
- tags: z23.array(z23.string().max(32)).max(20).optional(),
22458
- strict: z23.boolean().optional(),
22459
- commands: z23.unknown().optional(),
22460
- agents: z23.unknown().optional(),
22461
- hooks: z23.unknown().optional(),
22462
- mcpServers: z23.unknown().optional(),
22463
- lspServers: z23.unknown().optional()
22505
+ homepage: z24.string().url().optional(),
22506
+ repository: z24.string().url().optional(),
22507
+ license: z24.string().max(64).optional(),
22508
+ keywords: z24.array(z24.string()).max(50).optional(),
22509
+ category: z24.string().max(64).optional(),
22510
+ tags: z24.array(z24.string().max(32)).max(20).optional(),
22511
+ strict: z24.boolean().optional(),
22512
+ commands: z24.unknown().optional(),
22513
+ agents: z24.unknown().optional(),
22514
+ hooks: z24.unknown().optional(),
22515
+ mcpServers: z24.unknown().optional(),
22516
+ lspServers: z24.unknown().optional()
22464
22517
  }).strict();
22465
- CcMarketplaceJsonSchema = z23.object({
22466
- name: z23.string().min(1).regex(/^[a-z0-9][a-z0-9-]*$/, "Must be kebab-case").refine((name) => !RESERVED_MARKETPLACE_NAMES.has(name), "Reserved marketplace name \u2014 see CC reserved list"),
22518
+ CcMarketplaceJsonSchema = z24.object({
22519
+ name: z24.string().min(1).regex(/^[a-z0-9][a-z0-9-]*$/, "Must be kebab-case").refine((name) => !RESERVED_MARKETPLACE_NAMES.has(name), "Reserved marketplace name \u2014 see CC reserved list"),
22467
22520
  owner: CcOwnerSchema,
22468
22521
  metadata: CcMetadataSchema.optional(),
22469
- plugins: z23.array(CcMarketplaceJsonEntrySchema)
22522
+ plugins: z24.array(CcMarketplaceJsonEntrySchema)
22470
22523
  }).strict();
22471
22524
  }
22472
22525
  });
@@ -22474,7 +22527,7 @@ var init_cc_validator = __esm({
22474
22527
  // ../marketplace/dist/package-validator.js
22475
22528
  import { promises as fs11 } from "node:fs";
22476
22529
  import path20 from "node:path";
22477
- import { z as z24 } from "zod";
22530
+ import { z as z25 } from "zod";
22478
22531
  async function validatePackage(packagePath) {
22479
22532
  const issues = [];
22480
22533
  const manifestPath = path20.join(packagePath, PACKAGE_MANIFEST_PATH);
@@ -22595,7 +22648,7 @@ var init_package_validator = __esm({
22595
22648
  ".claude/commands",
22596
22649
  ".dork/tasks"
22597
22650
  ];
22598
- PermissiveSkillFrontmatterSchema = z24.unknown();
22651
+ PermissiveSkillFrontmatterSchema = z25.unknown();
22599
22652
  }
22600
22653
  });
22601
22654
 
@@ -22981,7 +23034,7 @@ async function fe2(e4 = {}) {
22981
23034
  args: n4
22982
23035
  } };
22983
23036
  }
22984
- var f3, ee, te, m2, h2, g3, _3, y3, x2, S3, C3, ne, w2, T3, re, E, A3, j, M, N3, P3, F3, I3, L3, R3, z32, B2, V2, ie, H, U, W2, G3, Y2, X2, ae, oe, Z, Q2;
23037
+ var f3, ee, te, m2, h2, g3, _3, y3, x2, S3, C3, ne, w2, T3, re, E, A3, j, M, N3, P3, F3, I3, L3, R3, z33, B2, V2, ie, H, U, W2, G3, Y2, X2, ae, oe, Z, Q2;
22985
23038
  var init_nypm = __esm({
22986
23039
  "../../node_modules/.pnpm/giget@3.2.0/node_modules/giget/dist/_chunks/libs/nypm.mjs"() {
22987
23040
  init_rolldown_runtime();
@@ -23214,7 +23267,7 @@ var init_nypm = __esm({
23214
23267
  R3 = w2((e4, t4) => {
23215
23268
  t4.exports = /^#!(.*)/;
23216
23269
  });
23217
- z32 = w2((e4, t4) => {
23270
+ z33 = w2((e4, t4) => {
23218
23271
  let n4 = R3();
23219
23272
  t4.exports = (e5 = ``) => {
23220
23273
  let t5 = e5.match(n4);
@@ -23224,7 +23277,7 @@ var init_nypm = __esm({
23224
23277
  };
23225
23278
  });
23226
23279
  B2 = w2((e4, t4) => {
23227
- let n4 = T3(`fs`), r5 = z32();
23280
+ let n4 = T3(`fs`), r5 = z33();
23228
23281
  function i4(e5) {
23229
23282
  let t5 = Buffer.alloc(150), i5;
23230
23283
  try {
@@ -23513,7 +23566,7 @@ function Nr(e4, t4) {
23513
23566
  function Pr(e4, t4) {
23514
23567
  e4.head = new Fr(t4, void 0, e4.head, e4), e4.tail ||= e4.head, e4.length++;
23515
23568
  }
23516
- var ce3, le3, ue2, de2, fe3, pe, me, h3, g4, _4, he2, ge, _e, ve2, ye2, be, v3, xe, y4, Se, Ce, b3, x3, S4, we, Te, C4, w3, Ee, De, Oe, ke, T4, Ae, je, Me, Ne, E2, Pe, Fe, Ie, Le, Re, ze, Be, Ve, He, Ue, We, D3, O4, Ge, k3, Ke, A4, qe, Je, Ye, Xe, Ze, Qe, $e, et, tt, j2, M2, nt, N4, rt, it, P4, at, ot, st, ct, lt, ut, dt, ft, pt, mt, ht, gt, _t, vt, yt, bt, xt, St, Ct, wt, F4, Tt, Et, Dt, Ot, kt, At, jt, Mt, Nt, Pt, Ft, It, Lt, Rt, zt, Bt, Vt, Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt, $t, en, I4, tn, nn, rn, an, L4, on, sn, cn, R4, ln, un, dn, fn, pn, mn, hn, gn, _n, vn, z33, yn, bn, xn, Sn, Cn, wn, B3, Tn, V3, En, Dn, H2, On, kn, An, U2, W3, G4, jn, Mn, K2, Nn, Pn, Fn, In, Ln, Rn, zn, Bn, Vn, q3, Hn, Un, Wn, Gn, Kn, qn, Jn, Yn, Xn, Zn, Qn, $n, er, tr, nr, rr, ir, ar, or, sr, cr, lr, ur, dr, fr, pr, mr, hr, gr, _r, vr, yr, br, xr, Sr, Cr, J3, wr, Tr, Er, Y3, Dr, Or, kr, Ar, jr, Fr, Ir, Lr, Rr, zr, X3, Br, Vr, Hr, Ur, Z2, Wr, Gr, Kr, qr, Jr, Yr, Xr, Zr, Qr, $r, ei, ti, ni, ri, ii, ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, Di, Oi, ki, Ai, ji, Mi, Ni, Pi, Fi, Ii, Li, Ri, zi, Bi, Vi, Hi, Ui, Wi, Gi, Q3, Ki, qi, Ji, Yi, Xi, Zi, Qi, $i, ea, ta, $2, na, ra, ia, aa, oa, sa, ca, la, ua, da, fa, pa, ma, ha, ga, _a, va, ya, ba, xa, Sa, Ca, wa, Ta, Ea, Da;
23569
+ var ce3, le3, ue2, de2, fe3, pe, me, h3, g4, _4, he2, ge, _e, ve2, ye2, be, v3, xe, y4, Se, Ce, b3, x3, S4, we, Te, C4, w3, Ee, De, Oe, ke, T4, Ae, je, Me, Ne, E2, Pe, Fe, Ie, Le, Re, ze, Be, Ve, He, Ue, We, D3, O4, Ge, k3, Ke, A4, qe, Je, Ye, Xe, Ze, Qe, $e, et, tt, j2, M2, nt, N4, rt, it, P4, at, ot, st, ct, lt, ut, dt, ft, pt, mt, ht, gt, _t, vt, yt, bt, xt, St, Ct, wt, F4, Tt, Et, Dt, Ot, kt, At, jt, Mt, Nt, Pt, Ft, It, Lt, Rt, zt, Bt, Vt, Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt, $t, en, I4, tn, nn, rn, an, L4, on, sn, cn, R4, ln, un, dn, fn, pn, mn, hn, gn, _n, vn, z34, yn, bn, xn, Sn, Cn, wn, B3, Tn, V3, En, Dn, H2, On, kn, An, U2, W3, G4, jn, Mn, K2, Nn, Pn, Fn, In, Ln, Rn, zn, Bn, Vn, q3, Hn, Un, Wn, Gn, Kn, qn, Jn, Yn, Xn, Zn, Qn, $n, er, tr, nr, rr, ir, ar, or, sr, cr, lr, ur, dr, fr, pr, mr, hr, gr, _r, vr, yr, br, xr, Sr, Cr, J3, wr, Tr, Er, Y3, Dr, Or, kr, Ar, jr, Fr, Ir, Lr, Rr, zr, X3, Br, Vr, Hr, Ur, Z2, Wr, Gr, Kr, qr, Jr, Yr, Xr, Zr, Qr, $r, ei, ti, ni, ri, ii, ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, Di, Oi, ki, Ai, ji, Mi, Ni, Pi, Fi, Ii, Li, Ri, zi, Bi, Vi, Hi, Ui, Wi, Gi, Q3, Ki, qi, Ji, Yi, Xi, Zi, Qi, $i, ea, ta, $2, na, ra, ia, aa, oa, sa, ca, la, ua, da, fa, pa, ma, ha, ga, _a, va, ya, ba, xa, Sa, Ca, wa, Ta, Ea, Da;
23517
23570
  var init_tar = __esm({
23518
23571
  "../../node_modules/.pnpm/giget@3.2.0/node_modules/giget/dist/_chunks/libs/tar.mjs"() {
23519
23572
  init_rolldown_runtime();
@@ -24739,7 +24792,7 @@ var init_tar = __esm({
24739
24792
  let a4 = i4.replace(/^SCHILY\.(dev|ino|nlink)/, `$1`), o5 = r5.join(`=`);
24740
24793
  return e4[a4] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a4) ? /* @__PURE__ */ new Date(Number(o5) * 1e3) : /^[0-9]+$/.test(o5) ? +o5 : o5, e4;
24741
24794
  };
24742
- z33 = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === `win32` ? (e4) => e4 && e4.replaceAll(/\\/g, `/`) : (e4) => e4;
24795
+ z34 = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === `win32` ? (e4) => e4 && e4.replaceAll(/\\/g, `/`) : (e4) => e4;
24743
24796
  yn = class extends Ue {
24744
24797
  extended;
24745
24798
  globalExtended;
@@ -24792,7 +24845,7 @@ var init_tar = __esm({
24792
24845
  this.ignore = true;
24793
24846
  }
24794
24847
  if (!e4.path) throw Error(`no path provided for tar.ReadEntry`);
24795
- this.path = z33(e4.path), this.mode = e4.mode, this.mode && (this.mode &= 4095), this.uid = e4.uid, this.gid = e4.gid, this.uname = e4.uname, this.gname = e4.gname, this.size = this.remain, this.mtime = e4.mtime, this.atime = e4.atime, this.ctime = e4.ctime, this.linkpath = e4.linkpath ? z33(e4.linkpath) : void 0, this.uname = e4.uname, this.gname = e4.gname, t4 && this.#t(t4), n4 && this.#t(n4, true);
24848
+ this.path = z34(e4.path), this.mode = e4.mode, this.mode && (this.mode &= 4095), this.uid = e4.uid, this.gid = e4.gid, this.uname = e4.uname, this.gname = e4.gname, this.size = this.remain, this.mtime = e4.mtime, this.atime = e4.atime, this.ctime = e4.ctime, this.linkpath = e4.linkpath ? z34(e4.linkpath) : void 0, this.uname = e4.uname, this.gname = e4.gname, t4 && this.#t(t4), n4 && this.#t(n4, true);
24796
24849
  }
24797
24850
  write(e4) {
24798
24851
  let t4 = e4.length;
@@ -24801,7 +24854,7 @@ var init_tar = __esm({
24801
24854
  return this.remain = Math.max(0, n4 - t4), this.blockRemain = Math.max(0, r5 - t4), this.ignore ? true : n4 >= t4 ? super.write(e4) : super.write(e4.subarray(0, n4));
24802
24855
  }
24803
24856
  #t(e4, t4 = false) {
24804
- e4.path &&= z33(e4.path), e4.linkpath &&= z33(e4.linkpath), Object.assign(this, Object.fromEntries(Object.entries(e4).filter(([e5, n4]) => !(n4 == null || e5 === `path` && t4))));
24857
+ e4.path &&= z34(e4.path), e4.linkpath &&= z34(e4.linkpath), Object.assign(this, Object.fromEntries(Object.entries(e4).filter(([e5, n4]) => !(n4 == null || e5 === `path` && t4))));
24805
24858
  }
24806
24859
  };
24807
24860
  bn = (e4, t4, n4, r5 = {}) => {
@@ -25148,7 +25201,7 @@ var init_tar = __esm({
25148
25201
  or = new Map(ir.map((e4, t4) => [e4, rr[t4]]));
25149
25202
  sr = (e4) => rr.reduce((e5, t4) => e5.split(t4).join(ar.get(t4)), e4);
25150
25203
  cr = (e4) => ir.reduce((e5, t4) => e5.split(t4).join(or.get(t4)), e4);
25151
- lr = (e4, t4) => t4 ? (e4 = z33(e4).replace(/^\.(\/|$)/, ``), Yn(t4) + `/` + e4) : z33(e4);
25204
+ lr = (e4, t4) => t4 ? (e4 = z34(e4).replace(/^\.(\/|$)/, ``), Yn(t4) + `/` + e4) : z34(e4);
25152
25205
  ur = 16 * 1024 * 1024;
25153
25206
  dr = Symbol(`process`);
25154
25207
  fr = Symbol(`file`);
@@ -25201,13 +25254,13 @@ var init_tar = __esm({
25201
25254
  #t = false;
25202
25255
  constructor(e4, t4 = {}) {
25203
25256
  let n4 = St(t4);
25204
- super(), this.path = z33(e4), this.portable = !!n4.portable, this.maxReadSize = n4.maxReadSize || ur, this.linkCache = n4.linkCache || /* @__PURE__ */ new Map(), this.statCache = n4.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!n4.preservePaths, this.cwd = z33(n4.cwd || process.cwd()), this.strict = !!n4.strict, this.noPax = !!n4.noPax, this.noMtime = !!n4.noMtime, this.mtime = n4.mtime, this.prefix = n4.prefix ? z33(n4.prefix) : void 0, this.onWriteEntry = n4.onWriteEntry, typeof n4.onwarn == `function` && this.on(`warn`, n4.onwarn);
25257
+ super(), this.path = z34(e4), this.portable = !!n4.portable, this.maxReadSize = n4.maxReadSize || ur, this.linkCache = n4.linkCache || /* @__PURE__ */ new Map(), this.statCache = n4.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!n4.preservePaths, this.cwd = z34(n4.cwd || process.cwd()), this.strict = !!n4.strict, this.noPax = !!n4.noPax, this.noMtime = !!n4.noMtime, this.mtime = n4.mtime, this.prefix = n4.prefix ? z34(n4.prefix) : void 0, this.onWriteEntry = n4.onWriteEntry, typeof n4.onwarn == `function` && this.on(`warn`, n4.onwarn);
25205
25258
  let r5 = false;
25206
25259
  if (!this.preservePaths) {
25207
25260
  let [e5, t5] = nr(this.path);
25208
25261
  e5 && typeof t5 == `string` && (this.path = t5, r5 = e5);
25209
25262
  }
25210
- this.win32 = !!n4.win32 || process.platform === `win32`, this.win32 && (this.path = cr(this.path.replaceAll(/\\/g, `/`)), e4 = e4.replaceAll(/\\/g, `/`)), this.absolute = z33(n4.absolute || p2.resolve(this.cwd, e4)), this.path === `` && (this.path = `./`), r5 && this.warn(`TAR_ENTRY_INFO`, `stripping ${r5} from absolute path`, {
25263
+ this.win32 = !!n4.win32 || process.platform === `win32`, this.win32 && (this.path = cr(this.path.replaceAll(/\\/g, `/`)), e4 = e4.replaceAll(/\\/g, `/`)), this.absolute = z34(n4.absolute || p2.resolve(this.cwd, e4)), this.path === `` && (this.path = `./`), r5 && this.warn(`TAR_ENTRY_INFO`, `stripping ${r5} from absolute path`, {
25211
25264
  entry: this,
25212
25265
  path: r5 + this.path
25213
25266
  });
@@ -25290,11 +25343,11 @@ var init_tar = __esm({
25290
25343
  });
25291
25344
  }
25292
25345
  [xr](e4) {
25293
- this.linkpath = z33(e4), this[gr](), this.end();
25346
+ this.linkpath = z34(e4), this[gr](), this.end();
25294
25347
  }
25295
25348
  [hr](e4) {
25296
25349
  if (!this.stat) throw Error(`cannot create link entry without stat`);
25297
- this.type = `Link`, this.linkpath = z33(p2.relative(this.cwd, e4)), this.stat.size = 0, this[gr](), this.end();
25350
+ this.type = `Link`, this.linkpath = z34(p2.relative(this.cwd, e4)), this.stat.size = 0, this[gr](), this.end();
25298
25351
  }
25299
25352
  [fr]() {
25300
25353
  if (!this.stat) throw Error(`cannot create file entry without stat`);
@@ -25439,7 +25492,7 @@ var init_tar = __esm({
25439
25492
  super(), this.preservePaths = !!n4.preservePaths, this.portable = !!n4.portable, this.strict = !!n4.strict, this.noPax = !!n4.noPax, this.noMtime = !!n4.noMtime, this.onWriteEntry = n4.onWriteEntry, this.readEntry = e4;
25440
25493
  let { type: r5 } = e4;
25441
25494
  if (r5 === `Unsupported`) throw Error(`writing entry that should be ignored`);
25442
- this.type = r5, this.type === `Directory` && this.portable && (this.noMtime = true), this.prefix = n4.prefix, this.path = z33(e4.path), this.mode = e4.mode === void 0 ? void 0 : this[wr](e4.mode), this.uid = this.portable ? void 0 : e4.uid, this.gid = this.portable ? void 0 : e4.gid, this.uname = this.portable ? void 0 : e4.uname, this.gname = this.portable ? void 0 : e4.gname, this.size = e4.size, this.mtime = this.noMtime ? void 0 : n4.mtime || e4.mtime, this.atime = this.portable ? void 0 : e4.atime, this.ctime = this.portable ? void 0 : e4.ctime, this.linkpath = e4.linkpath === void 0 ? void 0 : z33(e4.linkpath), typeof n4.onwarn == `function` && this.on(`warn`, n4.onwarn);
25495
+ this.type = r5, this.type === `Directory` && this.portable && (this.noMtime = true), this.prefix = n4.prefix, this.path = z34(e4.path), this.mode = e4.mode === void 0 ? void 0 : this[wr](e4.mode), this.uid = this.portable ? void 0 : e4.uid, this.gid = this.portable ? void 0 : e4.gid, this.uname = this.portable ? void 0 : e4.uname, this.gname = this.portable ? void 0 : e4.gname, this.size = e4.size, this.mtime = this.noMtime ? void 0 : n4.mtime || e4.mtime, this.atime = this.portable ? void 0 : e4.atime, this.ctime = this.portable ? void 0 : e4.ctime, this.linkpath = e4.linkpath === void 0 ? void 0 : z34(e4.linkpath), typeof n4.onwarn == `function` && this.on(`warn`, n4.onwarn);
25443
25496
  let i4 = false;
25444
25497
  if (!this.preservePaths) {
25445
25498
  let [e5, t5] = nr(this.path);
@@ -25709,7 +25762,7 @@ var init_tar = __esm({
25709
25762
  [Hr] = false;
25710
25763
  [zr] = false;
25711
25764
  constructor(e4 = {}) {
25712
- if (super(), this.opt = e4, this.file = e4.file || ``, this.cwd = e4.cwd || process.cwd(), this.maxReadSize = e4.maxReadSize, this.preservePaths = !!e4.preservePaths, this.strict = !!e4.strict, this.noPax = !!e4.noPax, this.prefix = z33(e4.prefix || ``), this.linkCache = e4.linkCache || /* @__PURE__ */ new Map(), this.statCache = e4.statCache || /* @__PURE__ */ new Map(), this.readdirCache = e4.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = e4.onWriteEntry, this[$r] = Dr, typeof e4.onwarn == `function` && this.on(`warn`, e4.onwarn), this.portable = !!e4.portable, e4.gzip || e4.brotli || e4.zstd) {
25765
+ if (super(), this.opt = e4, this.file = e4.file || ``, this.cwd = e4.cwd || process.cwd(), this.maxReadSize = e4.maxReadSize, this.preservePaths = !!e4.preservePaths, this.strict = !!e4.strict, this.noPax = !!e4.noPax, this.prefix = z34(e4.prefix || ``), this.linkCache = e4.linkCache || /* @__PURE__ */ new Map(), this.statCache = e4.statCache || /* @__PURE__ */ new Map(), this.readdirCache = e4.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = e4.onWriteEntry, this[$r] = Dr, typeof e4.onwarn == `function` && this.on(`warn`, e4.onwarn), this.portable = !!e4.portable, e4.gzip || e4.brotli || e4.zstd) {
25713
25766
  if ((e4.gzip ? 1 : 0) + (e4.brotli ? 1 : 0) + (e4.zstd ? 1 : 0) > 1) throw TypeError(`gzip, brotli, zstd are mutually exclusive`);
25714
25767
  if (e4.gzip && (typeof e4.gzip != `object` && (e4.gzip = {}), this.portable && (e4.gzip.portable = true), this.zip = new Pt(e4.gzip)), e4.brotli && (typeof e4.brotli != `object` && (e4.brotli = {}), this.zip = new Lt(e4.brotli)), e4.zstd && (typeof e4.zstd != `object` && (e4.zstd = {}), this.zip = new Bt(e4.zstd)), !this.zip) throw Error(`impossible`);
25715
25768
  let t4 = this.zip;
@@ -25731,7 +25784,7 @@ var init_tar = __esm({
25731
25784
  return e4 instanceof yn ? this[Kr](e4) : this[Gr](e4), this.flowing;
25732
25785
  }
25733
25786
  [Kr](e4) {
25734
- let t4 = z33(p2.resolve(this.cwd, e4.path));
25787
+ let t4 = z34(p2.resolve(this.cwd, e4.path));
25735
25788
  if (!this.filter(e4.path, e4)) e4.resume();
25736
25789
  else {
25737
25790
  let n4 = new Ir(e4.path, t4);
@@ -25740,7 +25793,7 @@ var init_tar = __esm({
25740
25793
  this[Vr]();
25741
25794
  }
25742
25795
  [Gr](e4) {
25743
- let t4 = z33(p2.resolve(this.cwd, e4));
25796
+ let t4 = z34(p2.resolve(this.cwd, e4));
25744
25797
  this[X3].push(new Ir(e4, t4)), this[Vr]();
25745
25798
  }
25746
25799
  [qr](e4) {
@@ -26005,8 +26058,8 @@ var init_tar = __esm({
26005
26058
  });
26006
26059
  };
26007
26060
  ki = (e4, r5, a4) => {
26008
- e4 = z33(e4);
26009
- let o5 = r5.umask ?? 18, s5 = r5.mode | 448, c6 = (s5 & o5) !== 0, l4 = r5.uid, u6 = r5.gid, d5 = typeof l4 == `number` && typeof u6 == `number` && (l4 !== r5.processUid || u6 !== r5.processGid), f7 = r5.preserve, ee3 = r5.unlink, p5 = z33(r5.cwd), m6 = (n4, r6) => {
26061
+ e4 = z34(e4);
26062
+ let o5 = r5.umask ?? 18, s5 = r5.mode | 448, c6 = (s5 & o5) !== 0, l4 = r5.uid, u6 = r5.gid, d5 = typeof l4 == `number` && typeof u6 == `number` && (l4 !== r5.processUid || u6 !== r5.processGid), f7 = r5.preserve, ee3 = r5.unlink, p5 = z34(r5.cwd), m6 = (n4, r6) => {
26010
26063
  n4 ? a4(n4) : r6 && d5 ? Ci(r6, l4, u6, (e5) => m6(e5)) : c6 ? t3.chmod(e4, s5, a4) : a4();
26011
26064
  };
26012
26065
  if (e4 === p5) return Oi(e4, m6);
@@ -26014,16 +26067,16 @@ var init_tar = __esm({
26014
26067
  mode: s5,
26015
26068
  recursive: true
26016
26069
  }).then((e5) => m6(null, e5 ?? void 0), m6);
26017
- Ai(p5, z33(i3.relative(p5, e4)).split(`/`), s5, ee3, p5, void 0, m6);
26070
+ Ai(p5, z34(i3.relative(p5, e4)).split(`/`), s5, ee3, p5, void 0, m6);
26018
26071
  };
26019
26072
  Ai = (e4, n4, r5, a4, o5, s5, c6) => {
26020
26073
  if (n4.length === 0) return c6(null, s5);
26021
- let l4 = n4.shift(), u6 = z33(i3.resolve(e4 + `/` + l4));
26074
+ let l4 = n4.shift(), u6 = z34(i3.resolve(e4 + `/` + l4));
26022
26075
  t3.mkdir(u6, r5, ji(u6, n4, r5, a4, o5, s5, c6));
26023
26076
  };
26024
26077
  ji = (e4, n4, r5, i4, a4, o5, s5) => (c6) => {
26025
26078
  c6 ? t3.lstat(e4, (l4, u6) => {
26026
- if (l4) l4.path = l4.path && z33(l4.path), s5(l4);
26079
+ if (l4) l4.path = l4.path && z34(l4.path), s5(l4);
26027
26080
  else if (u6.isDirectory()) Ai(e4, n4, r5, i4, a4, o5, s5);
26028
26081
  else if (i4) t3.unlink(e4, (c7) => {
26029
26082
  if (c7) return s5(c7);
@@ -26046,8 +26099,8 @@ var init_tar = __esm({
26046
26099
  }
26047
26100
  };
26048
26101
  Ni = (e4, n4) => {
26049
- e4 = z33(e4);
26050
- let r5 = n4.umask ?? 18, a4 = n4.mode | 448, o5 = (a4 & r5) !== 0, s5 = n4.uid, c6 = n4.gid, l4 = typeof s5 == `number` && typeof c6 == `number` && (s5 !== n4.processUid || c6 !== n4.processGid), u6 = n4.preserve, d5 = n4.unlink, f7 = z33(n4.cwd), ee3 = (n5) => {
26102
+ e4 = z34(e4);
26103
+ let r5 = n4.umask ?? 18, a4 = n4.mode | 448, o5 = (a4 & r5) !== 0, s5 = n4.uid, c6 = n4.gid, l4 = typeof s5 == `number` && typeof c6 == `number` && (s5 !== n4.processUid || c6 !== n4.processGid), u6 = n4.preserve, d5 = n4.unlink, f7 = z34(n4.cwd), ee3 = (n5) => {
26051
26104
  n5 && l4 && Ti(n5, s5, c6), o5 && t3.chmodSync(e4, a4);
26052
26105
  };
26053
26106
  if (e4 === f7) return Mi(f7), ee3();
@@ -26055,9 +26108,9 @@ var init_tar = __esm({
26055
26108
  mode: a4,
26056
26109
  recursive: true
26057
26110
  }) ?? void 0);
26058
- let p5 = z33(i3.relative(f7, e4)).split(`/`), m6;
26111
+ let p5 = z34(i3.relative(f7, e4)).split(`/`), m6;
26059
26112
  for (let e5 = p5.shift(), n5 = f7; e5 && (n5 += `/` + e5); e5 = p5.shift()) {
26060
- n5 = z33(i3.resolve(n5));
26113
+ n5 = z34(i3.resolve(n5));
26061
26114
  try {
26062
26115
  t3.mkdirSync(n5, a4), m6 ||= n5;
26063
26116
  } catch {
@@ -26237,7 +26290,7 @@ var init_tar = __esm({
26237
26290
  if (e4.preserveOwner) throw TypeError(`cannot preserve owner in archive and also set owner explicitly`);
26238
26291
  this.uid = e4.uid, this.gid = e4.gid, this.setOwner = true;
26239
26292
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
26240
- this.preserveOwner = e4.preserveOwner === void 0 && typeof e4.uid != `number` ? !!(process.getuid && process.getuid() === 0) : !!e4.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof e4.maxDepth == `number` ? e4.maxDepth : pa, this.forceChown = e4.forceChown === true, this.win32 = !!e4.win32 || fa, this.newer = !!e4.newer, this.keep = !!e4.keep, this.noMtime = !!e4.noMtime, this.preservePaths = !!e4.preservePaths, this.unlink = !!e4.unlink, this.cwd = z33(i3.resolve(e4.cwd || process.cwd())), this.strip = Number(e4.strip) || 0, this.processUmask = this.chmod ? typeof e4.processUmask == `number` ? e4.processUmask : Vi() : 0, this.umask = typeof e4.umask == `number` ? e4.umask : this.processUmask, this.dmode = e4.dmode || 511 & ~this.umask, this.fmode = e4.fmode || 438 & ~this.umask, this.on(`entry`, (e5) => this[Hi](e5));
26293
+ this.preserveOwner = e4.preserveOwner === void 0 && typeof e4.uid != `number` ? !!(process.getuid && process.getuid() === 0) : !!e4.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof e4.maxDepth == `number` ? e4.maxDepth : pa, this.forceChown = e4.forceChown === true, this.win32 = !!e4.win32 || fa, this.newer = !!e4.newer, this.keep = !!e4.keep, this.noMtime = !!e4.noMtime, this.preservePaths = !!e4.preservePaths, this.unlink = !!e4.unlink, this.cwd = z34(i3.resolve(e4.cwd || process.cwd())), this.strip = Number(e4.strip) || 0, this.processUmask = this.chmod ? typeof e4.processUmask == `number` ? e4.processUmask : Vi() : 0, this.umask = typeof e4.umask == `number` ? e4.umask : this.processUmask, this.dmode = e4.dmode || 511 & ~this.umask, this.fmode = e4.fmode || 438 & ~this.umask, this.on(`entry`, (e5) => this[Hi](e5));
26241
26294
  }
26242
26295
  warn(e4, t4, n4 = {}) {
26243
26296
  return (e4 === `TAR_BAD_ARCHIVE` || e4 === `TAR_ABORT`) && (n4.recoverable = false), super.warn(e4, t4, n4);
@@ -26266,11 +26319,11 @@ var init_tar = __esm({
26266
26319
  })), true;
26267
26320
  }
26268
26321
  [$i](e4) {
26269
- let t4 = z33(e4.path), n4 = t4.split(`/`);
26322
+ let t4 = z34(e4.path), n4 = t4.split(`/`);
26270
26323
  if (this.strip) {
26271
26324
  if (n4.length < this.strip) return false;
26272
26325
  if (e4.type === `Link`) {
26273
- let t5 = z33(String(e4.linkpath)).split(`/`);
26326
+ let t5 = z34(String(e4.linkpath)).split(`/`);
26274
26327
  if (t5.length >= this.strip) e4.linkpath = t5.slice(this.strip).join(`/`);
26275
26328
  else return false;
26276
26329
  }
@@ -26283,9 +26336,9 @@ var init_tar = __esm({
26283
26336
  maxDepth: this.maxDepth
26284
26337
  }), false;
26285
26338
  if (!this[ea](e4, `path`) || !this[ea](e4, `linkpath`)) return false;
26286
- if (e4.absolute = i3.isAbsolute(e4.path) ? z33(i3.resolve(e4.path)) : z33(i3.resolve(this.cwd, e4.path)), !this.preservePaths && typeof e4.absolute == `string` && e4.absolute.indexOf(this.cwd + `/`) !== 0 && e4.absolute !== this.cwd) return this.warn(`TAR_ENTRY_ERROR`, `path escaped extraction target`, {
26339
+ if (e4.absolute = i3.isAbsolute(e4.path) ? z34(i3.resolve(e4.path)) : z34(i3.resolve(this.cwd, e4.path)), !this.preservePaths && typeof e4.absolute == `string` && e4.absolute.indexOf(this.cwd + `/`) !== 0 && e4.absolute !== this.cwd) return this.warn(`TAR_ENTRY_ERROR`, `path escaped extraction target`, {
26287
26340
  entry: e4,
26288
- path: z33(e4.path),
26341
+ path: z34(e4.path),
26289
26342
  resolvedPath: e4.absolute,
26290
26343
  cwd: this.cwd
26291
26344
  }), false;
@@ -26318,7 +26371,7 @@ var init_tar = __esm({
26318
26371
  e4.name === `CwdError` ? this.emit(`error`, e4) : (this.warn(`TAR_ENTRY_ERROR`, e4, { entry: t4 }), this[ia](), t4.resume());
26319
26372
  }
26320
26373
  [ta](e4, t4, n4) {
26321
- ki(z33(e4), {
26374
+ ki(z34(e4), {
26322
26375
  uid: this.uid,
26323
26376
  gid: this.gid,
26324
26377
  processUid: this.processUid,
@@ -26395,13 +26448,13 @@ var init_tar = __esm({
26395
26448
  e4.unsupported = true, this.warn(`TAR_ENTRY_UNSUPPORTED`, `unsupported entry type: ${e4.type}`, { entry: e4 }), e4.resume();
26396
26449
  }
26397
26450
  [Yi](e4, t4) {
26398
- let n4 = z33(i3.relative(this.cwd, i3.resolve(i3.dirname(String(e4.absolute)), String(e4.linkpath)))).split(`/`);
26451
+ let n4 = z34(i3.relative(this.cwd, i3.resolve(i3.dirname(String(e4.absolute)), String(e4.linkpath)))).split(`/`);
26399
26452
  this[Zi](e4, this.cwd, n4, () => this[Ji](e4, String(e4.linkpath), `symlink`, t4), (n5) => {
26400
26453
  this[$2](n5, e4), t4();
26401
26454
  });
26402
26455
  }
26403
26456
  [Xi](e4, t4) {
26404
- let n4 = z33(i3.resolve(this.cwd, String(e4.linkpath))), r5 = z33(String(e4.linkpath)).split(`/`);
26457
+ let n4 = z34(i3.resolve(this.cwd, String(e4.linkpath))), r5 = z34(String(e4.linkpath)).split(`/`);
26405
26458
  this[Zi](e4, this.cwd, r5, () => this[Ji](e4, n4, `link`, t4), (n5) => {
26406
26459
  this[$2](n5, e4), t4();
26407
26460
  });
@@ -26446,7 +26499,7 @@ var init_tar = __esm({
26446
26499
  });
26447
26500
  }, o5 = () => {
26448
26501
  if (e4.absolute !== this.cwd) {
26449
- let t4 = z33(i3.dirname(String(e4.absolute)));
26502
+ let t4 = z34(i3.dirname(String(e4.absolute)));
26450
26503
  if (t4 !== this.cwd) return this[ta](t4, this.dmode, (t5) => {
26451
26504
  if (t5) {
26452
26505
  this[$2](t5, e4), r5();
@@ -26521,7 +26574,7 @@ var init_tar = __esm({
26521
26574
  this[da] = true;
26522
26575
  }
26523
26576
  if (e4.absolute !== this.cwd) {
26524
- let t4 = z33(i3.dirname(String(e4.absolute)));
26577
+ let t4 = z34(i3.dirname(String(e4.absolute)));
26525
26578
  if (t4 !== this.cwd) {
26526
26579
  let n5 = this[ta](t4, this.dmode);
26527
26580
  if (n5) return this[$2](n5, e4);
@@ -26612,7 +26665,7 @@ var init_tar = __esm({
26612
26665
  }
26613
26666
  [ta](e4, t4) {
26614
26667
  try {
26615
- return Ni(z33(e4), {
26668
+ return Ni(z34(e4), {
26616
26669
  uid: this.uid,
26617
26670
  gid: this.gid,
26618
26671
  processUid: this.processUid,
@@ -58140,19 +58193,19 @@ var require_range2 = __commonJS({
58140
58193
  var replaceCaret = (comp, options) => {
58141
58194
  debug2("caret", comp, options);
58142
58195
  const r5 = options.loose ? re3[t4.CARETLOOSE] : re3[t4.CARET];
58143
- const z58 = options.includePrerelease ? "-0" : "";
58196
+ const z59 = options.includePrerelease ? "-0" : "";
58144
58197
  return comp.replace(r5, (_6, M4, m6, p5, pr2) => {
58145
58198
  debug2("caret", comp, _6, M4, m6, p5, pr2);
58146
58199
  let ret;
58147
58200
  if (isX(M4)) {
58148
58201
  ret = "";
58149
58202
  } else if (isX(m6)) {
58150
- ret = `>=${M4}.0.0${z58} <${+M4 + 1}.0.0-0`;
58203
+ ret = `>=${M4}.0.0${z59} <${+M4 + 1}.0.0-0`;
58151
58204
  } else if (isX(p5)) {
58152
58205
  if (M4 === "0") {
58153
- ret = `>=${M4}.${m6}.0${z58} <${M4}.${+m6 + 1}.0-0`;
58206
+ ret = `>=${M4}.${m6}.0${z59} <${M4}.${+m6 + 1}.0-0`;
58154
58207
  } else {
58155
- ret = `>=${M4}.${m6}.0${z58} <${+M4 + 1}.0.0-0`;
58208
+ ret = `>=${M4}.${m6}.0${z59} <${+M4 + 1}.0.0-0`;
58156
58209
  }
58157
58210
  } else if (pr2) {
58158
58211
  debug2("replaceCaret pr", pr2);
@@ -58169,9 +58222,9 @@ var require_range2 = __commonJS({
58169
58222
  debug2("no pr");
58170
58223
  if (M4 === "0") {
58171
58224
  if (m6 === "0") {
58172
- ret = `>=${M4}.${m6}.${p5}${z58} <${M4}.${m6}.${+p5 + 1}-0`;
58225
+ ret = `>=${M4}.${m6}.${p5}${z59} <${M4}.${m6}.${+p5 + 1}-0`;
58173
58226
  } else {
58174
- ret = `>=${M4}.${m6}.${p5}${z58} <${M4}.${+m6 + 1}.0-0`;
58227
+ ret = `>=${M4}.${m6}.${p5}${z59} <${M4}.${+m6 + 1}.0-0`;
58175
58228
  }
58176
58229
  } else {
58177
58230
  ret = `>=${M4}.${m6}.${p5} <${+M4 + 1}.0.0-0`;
@@ -83790,7 +83843,7 @@ import { EventEmitter } from "node:events";
83790
83843
  import Conf from "conf";
83791
83844
  import { z as z6 } from "zod";
83792
83845
  import fs3 from "fs";
83793
- import path4 from "path";
83846
+ import path5 from "path";
83794
83847
 
83795
83848
  // ../shared/dist/config-schema.js
83796
83849
  import { z as z5 } from "zod";
@@ -83932,6 +83985,35 @@ var USER_CONFIG_DEFAULTS = UserConfigSchema.parse({
83932
83985
 
83933
83986
  // ../../apps/server/src/services/core/config-manager.ts
83934
83987
  init_logger();
83988
+
83989
+ // ../../apps/server/src/lib/version.ts
83990
+ init_env();
83991
+ import { readFileSync } from "fs";
83992
+ import path4 from "path";
83993
+ import { fileURLToPath as fileURLToPath2 } from "url";
83994
+ var DEV_VERSION_PATTERN = /^0\.0\.0/;
83995
+ var SERVER_VERSION = resolveVersion();
83996
+ var IS_DEV_BUILD = checkDevBuild(SERVER_VERSION);
83997
+ function resolveVersion() {
83998
+ if (env.DORKOS_VERSION_OVERRIDE) return env.DORKOS_VERSION_OVERRIDE;
83999
+ if (true) return "0.35.0";
84000
+ const pkgPath = path4.join(path4.dirname(fileURLToPath2(import.meta.url)), "../../package.json");
84001
+ return JSON.parse(readFileSync(pkgPath, "utf-8")).version;
84002
+ }
84003
+ function checkDevBuild(version2) {
84004
+ if (env.DORKOS_VERSION_OVERRIDE) return false;
84005
+ if (true) return false;
84006
+ return DEV_VERSION_PATTERN.test(version2);
84007
+ }
84008
+
84009
+ // ../../apps/server/src/services/core/config-manager.ts
84010
+ var CONFIG_MIGRATIONS = {
84011
+ "1.0.0": (store) => {
84012
+ if (!store.has("version")) {
84013
+ store.set("version", 1);
84014
+ }
84015
+ }
84016
+ };
83935
84017
  var jsonSchemaFull = z6.toJSONSchema(UserConfigSchema, {
83936
84018
  target: "jsonSchema2019-09"
83937
84019
  });
@@ -83942,24 +84024,24 @@ var ConfigManager = class {
83942
84024
  _isFirstRun = false;
83943
84025
  constructor(dorkHome) {
83944
84026
  const configDir = dorkHome;
83945
- const configPath = path4.join(configDir, "config.json");
84027
+ const configPath = path5.join(configDir, "config.json");
83946
84028
  this._isFirstRun = !fs3.existsSync(configPath);
84029
+ const confOptions = {
84030
+ configName: "config",
84031
+ cwd: configDir,
84032
+ schema: confSchema,
84033
+ defaults: USER_CONFIG_DEFAULTS,
84034
+ clearInvalidConfig: false,
84035
+ // `projectVersion` is the app version — sourced from the canonical
84036
+ // version resolver (`lib/version.ts`) which honors
84037
+ // `DORKOS_VERSION_OVERRIDE`, the esbuild-injected CLI version, and the
84038
+ // package.json dev fallback in that order. Migration keys in
84039
+ // CONFIG_MIGRATIONS must be semver strings matching real releases.
84040
+ projectVersion: SERVER_VERSION,
84041
+ migrations: CONFIG_MIGRATIONS
84042
+ };
83947
84043
  try {
83948
- this.store = new Conf({
83949
- configName: "config",
83950
- cwd: configDir,
83951
- schema: confSchema,
83952
- defaults: USER_CONFIG_DEFAULTS,
83953
- clearInvalidConfig: false,
83954
- projectVersion: "1.0.0",
83955
- migrations: {
83956
- "1.0.0": (store) => {
83957
- if (!store.has("version")) {
83958
- store.set("version", 1);
83959
- }
83960
- }
83961
- }
83962
- });
84044
+ this.store = new Conf(confOptions);
83963
84045
  logger.info(`[Config] Loaded from ${configPath} (first run: ${this._isFirstRun})`);
83964
84046
  } catch (_error) {
83965
84047
  if (fs3.existsSync(configPath)) {
@@ -83969,13 +84051,7 @@ var ConfigManager = class {
83969
84051
  logger.warn(`Corrupt config backed up to ${backupPath}`);
83970
84052
  logger.warn("Creating fresh config with defaults.");
83971
84053
  }
83972
- this.store = new Conf({
83973
- configName: "config",
83974
- cwd: configDir,
83975
- schema: confSchema,
83976
- defaults: USER_CONFIG_DEFAULTS,
83977
- clearInvalidConfig: false
83978
- });
84054
+ this.store = new Conf(confOptions);
83979
84055
  }
83980
84056
  }
83981
84057
  /** Whether this is the first time the config file has been created */
@@ -84116,26 +84192,6 @@ var TunnelManager = class extends EventEmitter {
84116
84192
  };
84117
84193
  var tunnelManager = new TunnelManager();
84118
84194
 
84119
- // ../../apps/server/src/lib/version.ts
84120
- init_env();
84121
- import { readFileSync } from "fs";
84122
- import path5 from "path";
84123
- import { fileURLToPath as fileURLToPath2 } from "url";
84124
- var DEV_VERSION_PATTERN = /^0\.0\.0/;
84125
- var SERVER_VERSION = resolveVersion();
84126
- var IS_DEV_BUILD = checkDevBuild(SERVER_VERSION);
84127
- function resolveVersion() {
84128
- if (env.DORKOS_VERSION_OVERRIDE) return env.DORKOS_VERSION_OVERRIDE;
84129
- if (true) return "0.34.0";
84130
- const pkgPath = path5.join(path5.dirname(fileURLToPath2(import.meta.url)), "../../package.json");
84131
- return JSON.parse(readFileSync(pkgPath, "utf-8")).version;
84132
- }
84133
- function checkDevBuild(version2) {
84134
- if (env.DORKOS_VERSION_OVERRIDE) return false;
84135
- if (true) return false;
84136
- return DEV_VERSION_PATTERN.test(version2);
84137
- }
84138
-
84139
84195
  // ../../apps/server/src/routes/health.ts
84140
84196
  var router3 = Router3();
84141
84197
  router3.get("/", (_req, res) => {
@@ -94203,7 +94259,7 @@ import { createSdkMcpServer } from "@anthropic-ai/claude-agent-sdk";
94203
94259
 
94204
94260
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/core-tools.ts
94205
94261
  import { tool } from "@anthropic-ai/claude-agent-sdk";
94206
- import { z as z25 } from "zod";
94262
+ import { z as z26 } from "zod";
94207
94263
  init_env();
94208
94264
 
94209
94265
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/types.ts
@@ -94319,8 +94375,8 @@ function createGetAgentHandler(deps) {
94319
94375
  };
94320
94376
  }
94321
94377
  var agentScopeSchema = {
94322
- agent_id: z25.string().optional().describe("Agent ULID to scope the query to"),
94323
- cwd: z25.string().optional().describe("Working directory path to scope the query to")
94378
+ agent_id: z26.string().optional().describe("Agent ULID to scope the query to"),
94379
+ cwd: z26.string().optional().describe("Working directory path to scope the query to")
94324
94380
  };
94325
94381
  function getCoreTools(deps) {
94326
94382
  const handleGetSessionCount = createGetSessionCountHandler(deps);
@@ -94335,7 +94391,7 @@ function getCoreTools(deps) {
94335
94391
  tool(
94336
94392
  "get_server_info",
94337
94393
  "Returns DorkOS server metadata including version, port, and optionally uptime.",
94338
- { include_uptime: z25.boolean().optional().describe("Include server uptime in seconds") },
94394
+ { include_uptime: z26.boolean().optional().describe("Include server uptime in seconds") },
94339
94395
  handleGetServerInfo
94340
94396
  ),
94341
94397
  tool(
@@ -94355,7 +94411,7 @@ function getCoreTools(deps) {
94355
94411
 
94356
94412
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/task-tools.ts
94357
94413
  import { tool as tool2 } from "@anthropic-ai/claude-agent-sdk";
94358
- import { z as z26 } from "zod";
94414
+ import { z as z27 } from "zod";
94359
94415
  function requireTasks(deps) {
94360
94416
  if (!deps.taskStore) {
94361
94417
  return jsonContent({ error: "Tasks scheduler is not enabled" }, true);
@@ -94435,20 +94491,20 @@ function getTasksTools(deps) {
94435
94491
  tool2(
94436
94492
  "tasks_list",
94437
94493
  "List all Tasks scheduled jobs. Returns schedule definitions with status and configuration.",
94438
- { enabled_only: z26.boolean().optional().describe("Only return enabled schedules") },
94494
+ { enabled_only: z27.boolean().optional().describe("Only return enabled schedules") },
94439
94495
  createListSchedulesHandler(deps)
94440
94496
  ),
94441
94497
  tool2(
94442
94498
  "tasks_create",
94443
94499
  "Create a new Tasks scheduled job. The schedule will be created with pending_approval status and must be approved by the user before it runs.",
94444
94500
  {
94445
- name: z26.string().describe("Name for the scheduled job"),
94446
- prompt: z26.string().describe("The prompt to send to the agent on each run"),
94447
- cron: z26.string().describe('Cron expression (e.g., "0 2 * * *" for daily at 2am)'),
94448
- description: z26.string().optional().describe("Description of what this task does"),
94449
- timezone: z26.string().optional().describe('IANA timezone (e.g., "America/New_York")'),
94450
- maxRuntime: z26.string().optional().describe('Maximum run time (e.g., "5m", "1h")'),
94451
- permissionMode: z26.string().optional().describe("Permission mode: acceptEdits or bypassPermissions")
94501
+ name: z27.string().describe("Name for the scheduled job"),
94502
+ prompt: z27.string().describe("The prompt to send to the agent on each run"),
94503
+ cron: z27.string().describe('Cron expression (e.g., "0 2 * * *" for daily at 2am)'),
94504
+ description: z27.string().optional().describe("Description of what this task does"),
94505
+ timezone: z27.string().optional().describe('IANA timezone (e.g., "America/New_York")'),
94506
+ maxRuntime: z27.string().optional().describe('Maximum run time (e.g., "5m", "1h")'),
94507
+ permissionMode: z27.string().optional().describe("Permission mode: acceptEdits or bypassPermissions")
94452
94508
  },
94453
94509
  createCreateScheduleHandler(deps)
94454
94510
  ),
@@ -94456,29 +94512,29 @@ function getTasksTools(deps) {
94456
94512
  "tasks_update",
94457
94513
  "Update an existing Tasks schedule. Only provided fields are updated.",
94458
94514
  {
94459
- id: z26.string().describe("Schedule ID to update"),
94460
- name: z26.string().optional().describe("New name"),
94461
- prompt: z26.string().optional().describe("New prompt"),
94462
- cron: z26.string().optional().describe("New cron expression"),
94463
- enabled: z26.boolean().optional().describe("Enable or disable the schedule"),
94464
- timezone: z26.string().optional().describe("New timezone"),
94465
- maxRuntime: z26.string().optional().describe('New max runtime (e.g., "5m", "1h")'),
94466
- permissionMode: z26.string().optional().describe("New permission mode")
94515
+ id: z27.string().describe("Schedule ID to update"),
94516
+ name: z27.string().optional().describe("New name"),
94517
+ prompt: z27.string().optional().describe("New prompt"),
94518
+ cron: z27.string().optional().describe("New cron expression"),
94519
+ enabled: z27.boolean().optional().describe("Enable or disable the schedule"),
94520
+ timezone: z27.string().optional().describe("New timezone"),
94521
+ maxRuntime: z27.string().optional().describe('New max runtime (e.g., "5m", "1h")'),
94522
+ permissionMode: z27.string().optional().describe("New permission mode")
94467
94523
  },
94468
94524
  createUpdateScheduleHandler(deps)
94469
94525
  ),
94470
94526
  tool2(
94471
94527
  "tasks_delete",
94472
94528
  "Delete a Tasks schedule permanently.",
94473
- { id: z26.string().describe("Schedule ID to delete") },
94529
+ { id: z27.string().describe("Schedule ID to delete") },
94474
94530
  createDeleteScheduleHandler(deps)
94475
94531
  ),
94476
94532
  tool2(
94477
94533
  "tasks_get_run_history",
94478
94534
  "Get recent run history for a Tasks schedule.",
94479
94535
  {
94480
- schedule_id: z26.string().describe("Schedule ID to get runs for"),
94481
- limit: z26.number().optional().describe("Max runs to return (default 20)")
94536
+ schedule_id: z27.string().describe("Schedule ID to get runs for"),
94537
+ limit: z27.number().optional().describe("Max runs to return (default 20)")
94482
94538
  },
94483
94539
  createGetRunHistoryHandler(deps)
94484
94540
  )
@@ -94488,7 +94544,7 @@ function getTasksTools(deps) {
94488
94544
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/relay-tools.ts
94489
94545
  import { randomUUID as randomUUID4 } from "node:crypto";
94490
94546
  import { tool as tool3 } from "@anthropic-ai/claude-agent-sdk";
94491
- import { z as z27 } from "zod";
94547
+ import { z as z28 } from "zod";
94492
94548
 
94493
94549
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/relay-helpers.ts
94494
94550
  function inferEndpointType(subject) {
@@ -94812,14 +94868,14 @@ function getRelayTools(deps) {
94812
94868
  "relay_send",
94813
94869
  "Send a message to a Relay subject. Delivers to all endpoints matching the subject pattern.",
94814
94870
  {
94815
- subject: z27.string().describe('Target subject (e.g., "relay.agent.backend")'),
94816
- payload: z27.unknown().describe("Message payload (any JSON-serializable value)"),
94817
- from: z27.string().describe("Sender subject identifier"),
94818
- replyTo: z27.string().optional().describe("Subject to send replies to"),
94819
- budget: z27.object({
94820
- maxHops: z27.number().int().min(1).optional().describe("Max hop count"),
94821
- ttl: z27.number().int().optional().describe("Unix timestamp (ms) expiry"),
94822
- callBudgetRemaining: z27.number().int().min(0).optional().describe("Remaining call budget")
94871
+ subject: z28.string().describe('Target subject (e.g., "relay.agent.backend")'),
94872
+ payload: z28.unknown().describe("Message payload (any JSON-serializable value)"),
94873
+ from: z28.string().describe("Sender subject identifier"),
94874
+ replyTo: z28.string().optional().describe("Subject to send replies to"),
94875
+ budget: z28.object({
94876
+ maxHops: z28.number().int().min(1).optional().describe("Max hop count"),
94877
+ ttl: z28.number().int().optional().describe("Unix timestamp (ms) expiry"),
94878
+ callBudgetRemaining: z28.number().int().min(0).optional().describe("Remaining call budget")
94823
94879
  }).optional().describe("Optional budget constraints")
94824
94880
  },
94825
94881
  createRelaySendHandler(deps)
@@ -94828,9 +94884,9 @@ function getRelayTools(deps) {
94828
94884
  "relay_inbox",
94829
94885
  "Read inbox messages for a Relay endpoint. Returns messages delivered to that endpoint.",
94830
94886
  {
94831
- endpoint_subject: z27.string().describe("Subject of the endpoint to read inbox for"),
94832
- limit: z27.number().int().min(1).max(100).optional().describe("Max messages to return"),
94833
- status: z27.string().optional().describe(
94887
+ endpoint_subject: z28.string().describe("Subject of the endpoint to read inbox for"),
94888
+ limit: z28.number().int().min(1).max(100).optional().describe("Max messages to return"),
94889
+ status: z28.string().optional().describe(
94834
94890
  'Filter by status. Use "unread" (or "new"/"pending") for unread messages, "read" (or "cur"/"delivered") for processed messages, "failed" for delivery failures. Omit to return all.'
94835
94891
  )
94836
94892
  },
@@ -94846,8 +94902,8 @@ function getRelayTools(deps) {
94846
94902
  "relay_register_endpoint",
94847
94903
  "Register a new Relay endpoint to receive messages on a subject.",
94848
94904
  {
94849
- subject: z27.string().describe('Subject for the new endpoint (e.g., "relay.agent.mybot")'),
94850
- description: z27.string().optional().describe("Human-readable description of the endpoint")
94905
+ subject: z28.string().describe('Subject for the new endpoint (e.g., "relay.agent.mybot")'),
94906
+ description: z28.string().optional().describe("Human-readable description of the endpoint")
94851
94907
  },
94852
94908
  createRelayRegisterEndpointHandler(deps)
94853
94909
  ),
@@ -94855,16 +94911,16 @@ function getRelayTools(deps) {
94855
94911
  "relay_send_and_wait",
94856
94912
  'Send a message to an agent and WAIT for the reply in a single call. Preferred over relay_send + relay_inbox polling for request/reply patterns. Internally registers an ephemeral inbox, sends the message with replyTo set, and blocks until the target agent replies or the timeout elapses. Response shape: { reply, progress, from, replyMessageId, sentMessageId }. progress: array of intermediate steps emitted before the final reply (empty [] for quick replies; populated for multi-step CCA tasks). Each progress step: { type: "progress", step: number, step_type: "message"|"tool_result", text: string, done: false }. Callers that only use { reply, from, replyMessageId } are unaffected \u2014 progress is additive.',
94857
94913
  {
94858
- to_subject: z27.string().describe('Target subject for the message (e.g., "relay.agent.{agentId}")'),
94859
- payload: z27.unknown().describe("Message payload (any JSON-serializable value)"),
94860
- from: z27.string().describe("Sender subject identifier"),
94861
- timeout_ms: z27.number().int().min(1e3).max(6e5).optional().describe(
94914
+ to_subject: z28.string().describe('Target subject for the message (e.g., "relay.agent.{agentId}")'),
94915
+ payload: z28.unknown().describe("Message payload (any JSON-serializable value)"),
94916
+ from: z28.string().describe("Sender subject identifier"),
94917
+ timeout_ms: z28.number().int().min(1e3).max(6e5).optional().describe(
94862
94918
  "Max milliseconds to wait for a reply (default: 60000, max: 600000). For tasks longer than 10 min, use relay_send_async instead."
94863
94919
  ),
94864
- budget: z27.object({
94865
- maxHops: z27.number().int().min(1).optional().describe("Max hop count"),
94866
- ttl: z27.number().int().optional().describe("Unix timestamp (ms) expiry"),
94867
- callBudgetRemaining: z27.number().int().min(0).optional().describe("Remaining call budget")
94920
+ budget: z28.object({
94921
+ maxHops: z28.number().int().min(1).optional().describe("Max hop count"),
94922
+ ttl: z28.number().int().optional().describe("Unix timestamp (ms) expiry"),
94923
+ callBudgetRemaining: z28.number().int().min(0).optional().describe("Remaining call budget")
94868
94924
  }).optional().describe("Optional budget constraints")
94869
94925
  },
94870
94926
  createRelayQueryHandler(deps)
@@ -94873,13 +94929,13 @@ function getRelayTools(deps) {
94873
94929
  "relay_send_async",
94874
94930
  "Dispatch a message to an agent and return IMMEDIATELY with a dispatch inbox subject. Unlike relay_send_and_wait (which blocks), relay_send_async returns { messageId, inboxSubject } at once. Agent B runs asynchronously; CCA publishes incremental progress events and a final agent_result to the inbox. Poll relay_inbox(endpoint_subject=inboxSubject) for updates. When you receive a message with done:true, call relay_unregister_endpoint(inboxSubject) to clean up.",
94875
94931
  {
94876
- to_subject: z27.string().describe('Target subject (e.g., "relay.agent.{agentId}")'),
94877
- payload: z27.unknown().describe("Message payload"),
94878
- from: z27.string().describe("Sender subject identifier"),
94879
- budget: z27.object({
94880
- maxHops: z27.number().int().min(1).optional(),
94881
- ttl: z27.number().int().optional(),
94882
- callBudgetRemaining: z27.number().int().min(0).optional()
94932
+ to_subject: z28.string().describe('Target subject (e.g., "relay.agent.{agentId}")'),
94933
+ payload: z28.unknown().describe("Message payload"),
94934
+ from: z28.string().describe("Sender subject identifier"),
94935
+ budget: z28.object({
94936
+ maxHops: z28.number().int().min(1).optional(),
94937
+ ttl: z28.number().int().optional(),
94938
+ callBudgetRemaining: z28.number().int().min(0).optional()
94883
94939
  }).optional()
94884
94940
  },
94885
94941
  createRelayDispatchHandler(deps)
@@ -94888,7 +94944,7 @@ function getRelayTools(deps) {
94888
94944
  "relay_unregister_endpoint",
94889
94945
  "Unregister a Relay endpoint. Use to clean up dispatch inboxes after relay_send_async completes (when done:true received).",
94890
94946
  {
94891
- subject: z27.string().describe("Subject of the endpoint to unregister")
94947
+ subject: z28.string().describe("Subject of the endpoint to unregister")
94892
94948
  },
94893
94949
  createRelayUnregisterEndpointHandler(deps)
94894
94950
  ),
@@ -94896,11 +94952,11 @@ function getRelayTools(deps) {
94896
94952
  "relay_notify_user",
94897
94953
  'Send a message to the user on a bound external channel (Telegram, Slack, etc.). Automatically resolves the best active chat. If channel is omitted, sends to the most recently active chat across all bound adapters. Specify channel to target a specific adapter type (e.g., "telegram") or adapter ID (e.g., "telegram-lifeos").',
94898
94954
  {
94899
- message: z27.string().describe("Message text to send to the user"),
94900
- channel: z27.string().optional().describe(
94955
+ message: z28.string().describe("Message text to send to the user"),
94956
+ channel: z28.string().optional().describe(
94901
94957
  'Optional adapter type or ID to target (e.g., "telegram", "telegram-lifeos"). Omit for most recent.'
94902
94958
  ),
94903
- agentId: z27.string().describe("Your agent ID from <agent_identity>. Required to identify your bindings.")
94959
+ agentId: z28.string().describe("Your agent ID from <agent_identity>. Required to identify your bindings.")
94904
94960
  },
94905
94961
  createRelayNotifyUserHandler(deps)
94906
94962
  )
@@ -94909,7 +94965,7 @@ function getRelayTools(deps) {
94909
94965
 
94910
94966
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/adapter-tools.ts
94911
94967
  import { tool as tool4 } from "@anthropic-ai/claude-agent-sdk";
94912
- import { z as z28 } from "zod";
94968
+ import { z as z29 } from "zod";
94913
94969
  function requireAdapterManager(deps) {
94914
94970
  if (!deps.adapterManager) {
94915
94971
  return jsonContent(
@@ -94979,13 +95035,13 @@ function getAdapterTools(deps) {
94979
95035
  tool4(
94980
95036
  "relay_enable_adapter",
94981
95037
  "Enable a Relay external adapter by ID. Starts the adapter and persists the change to config.",
94982
- { id: z28.string().describe("Adapter ID to enable") },
95038
+ { id: z29.string().describe("Adapter ID to enable") },
94983
95039
  createRelayEnableAdapterHandler(deps)
94984
95040
  ),
94985
95041
  tool4(
94986
95042
  "relay_disable_adapter",
94987
95043
  "Disable a Relay external adapter by ID. Stops the adapter and persists the change to config.",
94988
- { id: z28.string().describe("Adapter ID to disable") },
95044
+ { id: z29.string().describe("Adapter ID to disable") },
94989
95045
  createRelayDisableAdapterHandler(deps)
94990
95046
  ),
94991
95047
  tool4(
@@ -94999,7 +95055,7 @@ function getAdapterTools(deps) {
94999
95055
 
95000
95056
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/binding-tools.ts
95001
95057
  import { tool as tool5 } from "@anthropic-ai/claude-agent-sdk";
95002
- import { z as z29 } from "zod";
95058
+ import { z as z30 } from "zod";
95003
95059
  function requireBindingStore(deps) {
95004
95060
  if (!deps.bindingStore) {
95005
95061
  return jsonContent(
@@ -95090,26 +95146,26 @@ function getBindingTools(deps) {
95090
95146
  "binding_create",
95091
95147
  "Create a new adapter-to-agent binding. Maps an external adapter to a specific agent directory.",
95092
95148
  {
95093
- adapterId: z29.string().describe("ID of the adapter to bind"),
95094
- agentId: z29.string().describe("Agent ID to route messages to"),
95095
- sessionStrategy: z29.string().optional().describe("Session strategy: per-chat, per-user, or stateless (default per-chat)"),
95096
- chatId: z29.string().optional().describe("Optional chat ID for targeted routing"),
95097
- channelType: z29.string().optional().describe("Optional channel type filter: dm, group, channel, or thread"),
95098
- label: z29.string().optional().describe("Optional human-readable label for this binding")
95149
+ adapterId: z30.string().describe("ID of the adapter to bind"),
95150
+ agentId: z30.string().describe("Agent ID to route messages to"),
95151
+ sessionStrategy: z30.string().optional().describe("Session strategy: per-chat, per-user, or stateless (default per-chat)"),
95152
+ chatId: z30.string().optional().describe("Optional chat ID for targeted routing"),
95153
+ channelType: z30.string().optional().describe("Optional channel type filter: dm, group, channel, or thread"),
95154
+ label: z30.string().optional().describe("Optional human-readable label for this binding")
95099
95155
  },
95100
95156
  createBindingCreateHandler(deps)
95101
95157
  ),
95102
95158
  tool5(
95103
95159
  "binding_delete",
95104
95160
  "Delete an adapter-to-agent binding by ID.",
95105
- { id: z29.string().describe("Binding UUID to delete") },
95161
+ { id: z30.string().describe("Binding UUID to delete") },
95106
95162
  createBindingDeleteHandler(deps)
95107
95163
  ),
95108
95164
  tool5(
95109
95165
  "binding_list_sessions",
95110
95166
  "List active chat sessions for adapter-agent bindings. Returns active chats with pre-computed relay subjects for outbound messaging. Use this to discover what channels are available for sending messages.",
95111
95167
  {
95112
- bindingId: z29.string().optional().describe("Optional binding ID to filter sessions. Omit to get all sessions.")
95168
+ bindingId: z30.string().optional().describe("Optional binding ID to filter sessions. Omit to get all sessions.")
95113
95169
  },
95114
95170
  createBindingListSessionsHandler(deps)
95115
95171
  )
@@ -95118,7 +95174,7 @@ function getBindingTools(deps) {
95118
95174
 
95119
95175
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/trace-tools.ts
95120
95176
  import { tool as tool6 } from "@anthropic-ai/claude-agent-sdk";
95121
- import { z as z30 } from "zod";
95177
+ import { z as z31 } from "zod";
95122
95178
  function requireTraceStore(deps) {
95123
95179
  if (!deps.traceStore) {
95124
95180
  return jsonContent({ error: "Relay tracing is not enabled", code: "TRACING_DISABLED" }, true);
@@ -95151,7 +95207,7 @@ function getTraceTools(deps) {
95151
95207
  tool6(
95152
95208
  "relay_get_trace",
95153
95209
  "Get the full delivery trace for a Relay message. Returns all spans in the trace chain.",
95154
- { messageId: z30.string().describe("Message ID to look up the trace for") },
95210
+ { messageId: z31.string().describe("Message ID to look up the trace for") },
95155
95211
  createRelayGetTraceHandler(deps)
95156
95212
  ),
95157
95213
  tool6(
@@ -95165,7 +95221,7 @@ function getTraceTools(deps) {
95165
95221
 
95166
95222
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/mesh-tools.ts
95167
95223
  import { tool as tool7 } from "@anthropic-ai/claude-agent-sdk";
95168
- import { z as z31 } from "zod";
95224
+ import { z as z32 } from "zod";
95169
95225
  function requireMesh(deps) {
95170
95226
  if (!deps.meshCore) {
95171
95227
  return jsonContent({ error: "Mesh is not enabled", code: "MESH_DISABLED" }, true);
@@ -95319,9 +95375,9 @@ function getMeshTools(deps) {
95319
95375
  "mesh_discover",
95320
95376
  "Scan directories for agent candidates. By default returns only unregistered agents (candidates). Set includeRegistered to also see already-registered agents found during the scan.",
95321
95377
  {
95322
- roots: z31.array(z31.string()).describe("Root directories to scan for agents"),
95323
- maxDepth: z31.number().int().min(1).optional().describe("Maximum directory depth (default: 5)"),
95324
- includeRegistered: z31.boolean().optional().describe(
95378
+ roots: z32.array(z32.string()).describe("Root directories to scan for agents"),
95379
+ maxDepth: z32.number().int().min(1).optional().describe("Maximum directory depth (default: 5)"),
95380
+ includeRegistered: z32.boolean().optional().describe(
95325
95381
  "Include already-registered agents in results (default: false \u2014 unregistered candidates only)"
95326
95382
  )
95327
95383
  },
@@ -95331,11 +95387,11 @@ function getMeshTools(deps) {
95331
95387
  "mesh_register",
95332
95388
  "Register an agent from a filesystem path. Creates a .dork/agent.json manifest and adds the agent to the registry.",
95333
95389
  {
95334
- path: z31.string().describe("Filesystem path to the agent directory"),
95335
- name: z31.string().optional().describe("Display name override"),
95336
- description: z31.string().optional().describe("Agent description"),
95337
- runtime: z31.string().optional().describe("Runtime: claude-code, cursor, codex, or other"),
95338
- capabilities: z31.array(z31.string()).optional().describe("Agent capabilities")
95390
+ path: z32.string().describe("Filesystem path to the agent directory"),
95391
+ name: z32.string().optional().describe("Display name override"),
95392
+ description: z32.string().optional().describe("Agent description"),
95393
+ runtime: z32.string().optional().describe("Runtime: claude-code, cursor, codex, or other"),
95394
+ capabilities: z32.array(z32.string()).optional().describe("Agent capabilities")
95339
95395
  },
95340
95396
  createMeshRegisterHandler(deps)
95341
95397
  ),
@@ -95343,9 +95399,9 @@ function getMeshTools(deps) {
95343
95399
  "mesh_list",
95344
95400
  "List all registered agents with optional filters.",
95345
95401
  {
95346
- runtime: z31.string().optional().describe("Filter by runtime"),
95347
- capability: z31.string().optional().describe("Filter by capability"),
95348
- callerNamespace: z31.string().optional().describe("Filter by namespace visibility")
95402
+ runtime: z32.string().optional().describe("Filter by runtime"),
95403
+ capability: z32.string().optional().describe("Filter by capability"),
95404
+ callerNamespace: z32.string().optional().describe("Filter by namespace visibility")
95349
95405
  },
95350
95406
  createMeshListHandler(deps)
95351
95407
  ),
@@ -95353,8 +95409,8 @@ function getMeshTools(deps) {
95353
95409
  "mesh_deny",
95354
95410
  "Deny a candidate path from future discovery scans.",
95355
95411
  {
95356
- path: z31.string().describe("Path to deny"),
95357
- reason: z31.string().optional().describe("Reason for denial")
95412
+ path: z32.string().describe("Path to deny"),
95413
+ reason: z32.string().optional().describe("Reason for denial")
95358
95414
  },
95359
95415
  createMeshDenyHandler(deps)
95360
95416
  ),
@@ -95362,7 +95418,7 @@ function getMeshTools(deps) {
95362
95418
  "mesh_unregister",
95363
95419
  "Unregister an agent by ID, removing it from the registry.",
95364
95420
  {
95365
- agentId: z31.string().describe("Agent ID to unregister")
95421
+ agentId: z32.string().describe("Agent ID to unregister")
95366
95422
  },
95367
95423
  createMeshUnregisterHandler(deps)
95368
95424
  ),
@@ -95376,7 +95432,7 @@ function getMeshTools(deps) {
95376
95432
  "mesh_inspect",
95377
95433
  "Inspect a specific agent \u2014 manifest, health status, relay endpoint.",
95378
95434
  {
95379
- agentId: z31.string().describe("The agent ULID to inspect")
95435
+ agentId: z32.string().describe("The agent ULID to inspect")
95380
95436
  },
95381
95437
  createMeshInspectHandler(deps)
95382
95438
  ),
@@ -95384,7 +95440,7 @@ function getMeshTools(deps) {
95384
95440
  "mesh_query_topology",
95385
95441
  "Query the agent network topology visible to a given namespace. Returns namespaces, agents, and access rules.",
95386
95442
  {
95387
- namespace: z31.string().optional().describe("Caller namespace (omit for admin view)")
95443
+ namespace: z32.string().optional().describe("Caller namespace (omit for admin view)")
95388
95444
  },
95389
95445
  createMeshQueryTopologyHandler(deps)
95390
95446
  )
@@ -95393,7 +95449,7 @@ function getMeshTools(deps) {
95393
95449
 
95394
95450
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/agent-tools.ts
95395
95451
  import { tool as tool8 } from "@anthropic-ai/claude-agent-sdk";
95396
- import { z as z34 } from "zod";
95452
+ import { z as z35 } from "zod";
95397
95453
 
95398
95454
  // ../../apps/server/src/services/core/agent-creator.ts
95399
95455
  import fs12 from "fs/promises";
@@ -95581,10 +95637,10 @@ function getAgentTools(deps) {
95581
95637
  "create_agent",
95582
95638
  "Create a new DorkOS agent workspace with scaffolded config files",
95583
95639
  {
95584
- name: z34.string().describe("Agent name (kebab-case, e.g. my-agent)"),
95585
- directory: z34.string().optional().describe("Optional workspace directory path"),
95586
- description: z34.string().optional().describe("Optional agent description"),
95587
- runtime: z34.string().optional().describe("Agent runtime (default: claude-code)")
95640
+ name: z35.string().describe("Agent name (kebab-case, e.g. my-agent)"),
95641
+ directory: z35.string().optional().describe("Optional workspace directory path"),
95642
+ description: z35.string().optional().describe("Optional agent description"),
95643
+ runtime: z35.string().optional().describe("Agent runtime (default: claude-code)")
95588
95644
  },
95589
95645
  createCreateAgentHandler(deps)
95590
95646
  )
@@ -95593,7 +95649,7 @@ function getAgentTools(deps) {
95593
95649
 
95594
95650
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/ui-tools.ts
95595
95651
  import { tool as tool9 } from "@anthropic-ai/claude-agent-sdk";
95596
- import { z as z35 } from "zod";
95652
+ import { z as z36 } from "zod";
95597
95653
  var DEFAULT_UI_STATE = {
95598
95654
  canvas: { open: false, contentType: null },
95599
95655
  panels: { settings: false, tasks: false, relay: false, mesh: false },
@@ -95633,17 +95689,17 @@ var CONTROL_UI_DESCRIPTION = `Control the DorkOS client UI. Actions:
95633
95689
  - switch_agent: { cwd: string }
95634
95690
  - open_command_palette`;
95635
95691
  var CONTROL_UI_INPUT = {
95636
- action: z35.string().describe("The UI action to perform"),
95637
- panel: z35.string().optional().describe("Panel ID for panel commands"),
95638
- tab: z35.string().optional().describe("Tab name for switch_sidebar_tab"),
95639
- content: z35.record(z35.string(), z35.unknown()).optional().describe("Canvas content for open_canvas/update_canvas"),
95640
- preferredWidth: z35.number().optional().describe("Canvas width percentage (20-80) for open_canvas"),
95641
- message: z35.string().optional().describe("Toast message for show_toast"),
95642
- level: z35.string().optional().describe("Toast level for show_toast"),
95643
- description: z35.string().optional().describe("Toast description for show_toast"),
95644
- theme: z35.string().optional().describe("Theme for set_theme"),
95645
- messageId: z35.string().optional().describe("Message ID for scroll_to_message"),
95646
- cwd: z35.string().optional().describe("Working directory for switch_agent")
95692
+ action: z36.string().describe("The UI action to perform"),
95693
+ panel: z36.string().optional().describe("Panel ID for panel commands"),
95694
+ tab: z36.string().optional().describe("Tab name for switch_sidebar_tab"),
95695
+ content: z36.record(z36.string(), z36.unknown()).optional().describe("Canvas content for open_canvas/update_canvas"),
95696
+ preferredWidth: z36.number().optional().describe("Canvas width percentage (20-80) for open_canvas"),
95697
+ message: z36.string().optional().describe("Toast message for show_toast"),
95698
+ level: z36.string().optional().describe("Toast level for show_toast"),
95699
+ description: z36.string().optional().describe("Toast description for show_toast"),
95700
+ theme: z36.string().optional().describe("Theme for set_theme"),
95701
+ messageId: z36.string().optional().describe("Message ID for scroll_to_message"),
95702
+ cwd: z36.string().optional().describe("Working directory for switch_agent")
95647
95703
  };
95648
95704
  function getUiTools(_deps, session) {
95649
95705
  const controlUiHandler = session ? createControlUiHandler(session) : async (input) => jsonContent({ success: true, action: input.action });
@@ -95666,14 +95722,14 @@ function getUiTools(_deps, session) {
95666
95722
 
95667
95723
  // ../../apps/server/src/services/runtimes/claude-code/mcp-tools/extension-tools.ts
95668
95724
  import { tool as tool10 } from "@anthropic-ai/claude-agent-sdk";
95669
- import { z as z37 } from "zod";
95725
+ import { z as z38 } from "zod";
95670
95726
 
95671
95727
  // ../../apps/server/src/routes/extensions.ts
95672
95728
  init_logger();
95673
95729
  import { Router as Router17 } from "express";
95674
95730
  import fs13 from "fs/promises";
95675
95731
  import path25 from "path";
95676
- import { z as z36 } from "zod";
95732
+ import { z as z37 } from "zod";
95677
95733
 
95678
95734
  // ../shared/dist/extension-secrets.js
95679
95735
  import { createCipheriv, createDecipheriv, randomBytes as randomBytes2, scryptSync } from "node:crypto";
@@ -95860,14 +95916,14 @@ data: ${data}
95860
95916
  }
95861
95917
  }
95862
95918
  }
95863
- var CwdChangedBodySchema = z36.object({
95864
- cwd: z36.string().nullable()
95919
+ var CwdChangedBodySchema = z37.object({
95920
+ cwd: z37.string().nullable()
95865
95921
  });
95866
- var SetSecretBodySchema = z36.object({
95867
- value: z36.string().min(1)
95922
+ var SetSecretBodySchema = z37.object({
95923
+ value: z37.string().min(1)
95868
95924
  });
95869
- var SetSettingBodySchema = z36.object({
95870
- value: z36.union([z36.string(), z36.number(), z36.boolean()])
95925
+ var SetSettingBodySchema = z37.object({
95926
+ value: z37.union([z37.string(), z37.number(), z37.boolean()])
95871
95927
  });
95872
95928
  var SAFE_EXT_ID = /^[a-z0-9][a-z0-9-]*$/;
95873
95929
  function createExtensionsRouter(extensionManager2, dorkHome, getCwd) {
@@ -96548,12 +96604,12 @@ function getExtensionTools(deps) {
96548
96604
  "create_extension",
96549
96605
  "Scaffold a new DorkOS extension with manifest and starter code. Creates the directory, writes extension.json and index.ts, compiles, and enables the extension in one step.",
96550
96606
  {
96551
- name: z37.string().describe("Extension name (kebab-case, e.g. my-dashboard-widget)"),
96552
- description: z37.string().optional().describe("Short description shown in settings UI"),
96553
- template: z37.enum(["dashboard-card", "command", "settings-panel", "data-provider"]).optional().describe(
96607
+ name: z38.string().describe("Extension name (kebab-case, e.g. my-dashboard-widget)"),
96608
+ description: z38.string().optional().describe("Short description shown in settings UI"),
96609
+ template: z38.enum(["dashboard-card", "command", "settings-panel", "data-provider"]).optional().describe(
96554
96610
  "Starter template (default: dashboard-card). Use data-provider for extensions with server-side API integration."
96555
96611
  ),
96556
- scope: z37.enum(["global", "local"]).optional().describe(
96612
+ scope: z38.enum(["global", "local"]).optional().describe(
96557
96613
  "Install scope: global (~/.dork/extensions/) or local (.dork/extensions/ in CWD). Default: global"
96558
96614
  )
96559
96615
  },
@@ -96563,7 +96619,7 @@ function getExtensionTools(deps) {
96563
96619
  "reload_extensions",
96564
96620
  "Re-scan the filesystem for extensions and recompile any that changed. When id is provided, performs a targeted hot-reload of a single extension (recompile only). When omitted, runs a full discovery + recompile cycle.",
96565
96621
  {
96566
- id: z37.string().optional().describe("Extension ID for targeted reload. Omit to reload all.")
96622
+ id: z38.string().optional().describe("Extension ID for targeted reload. Omit to reload all.")
96567
96623
  },
96568
96624
  createReloadExtensionsHandler(deps)
96569
96625
  ),
@@ -96571,7 +96627,7 @@ function getExtensionTools(deps) {
96571
96627
  "test_extension",
96572
96628
  "Compile an extension and activate it against a mock API to verify it loads without errors. Returns contribution counts per UI slot on success, or detailed error information (phase, messages, stack trace) on failure. Also tests server-side compilation when the extension has a server entry. Use after editing extension source to validate before enabling.",
96573
96629
  {
96574
- id: z37.string().describe("Extension ID to test")
96630
+ id: z38.string().describe("Extension ID to test")
96575
96631
  },
96576
96632
  createTestExtensionHandler(deps)
96577
96633
  )
@@ -101970,8 +102026,8 @@ function runMigrations(db) {
101970
102026
  }
101971
102027
 
101972
102028
  // ../skills/dist/duration.js
101973
- import { z as z38 } from "zod";
101974
- var DurationSchema = z38.string().regex(/^(\d+h)?(\d+m)?(\d+s)?$/, 'Duration must be like "5m", "1h", "30s", or "2h30m"').refine((v6) => v6.length > 0, "Duration must not be empty");
102029
+ import { z as z39 } from "zod";
102030
+ var DurationSchema = z39.string().regex(/^(\d+h)?(\d+m)?(\d+s)?$/, 'Duration must be like "5m", "1h", "30s", or "2h30m"').refine((v6) => v6.length > 0, "Duration must not be empty");
101975
102031
  function parseDuration(duration) {
101976
102032
  let ms = 0;
101977
102033
  const hours = duration.match(/(\d+)h/);
@@ -103298,16 +103354,16 @@ import fs15 from "node:fs/promises";
103298
103354
 
103299
103355
  // ../skills/dist/task-schema.js
103300
103356
  init_schema();
103301
- import { z as z39 } from "zod";
103357
+ import { z as z40 } from "zod";
103302
103358
  var TaskFrontmatterSchema = SkillFrontmatterSchema.extend({
103303
103359
  /** Human-readable display name. Falls back to humanized `name` if absent. */
103304
- "display-name": z39.string().optional(),
103360
+ "display-name": z40.string().optional(),
103305
103361
  /** Cron expression for scheduling. Absent means on-demand only. */
103306
- cron: z39.string().optional(),
103362
+ cron: z40.string().optional(),
103307
103363
  /** IANA timezone for cron evaluation. */
103308
- timezone: z39.string().default("UTC"),
103364
+ timezone: z40.string().default("UTC"),
103309
103365
  /** Whether the task is active. Disabled tasks are not scheduled. */
103310
- enabled: z39.boolean().default(true),
103366
+ enabled: z40.boolean().default(true),
103311
103367
  /** Maximum execution time. Duration string: "5m", "1h", "30s", "2h30m". */
103312
103368
  "max-runtime": DurationSchema.optional(),
103313
103369
  /**
@@ -103315,7 +103371,7 @@ var TaskFrontmatterSchema = SkillFrontmatterSchema.extend({
103315
103371
  * - `acceptEdits`: agent can edit files with approval
103316
103372
  * - `bypassPermissions`: agent runs without approval gates
103317
103373
  */
103318
- permissions: z39.enum(["acceptEdits", "bypassPermissions"]).default("acceptEdits")
103374
+ permissions: z40.enum(["acceptEdits", "bypassPermissions"]).default("acceptEdits")
103319
103375
  });
103320
103376
 
103321
103377
  // ../../apps/server/src/services/tasks/task-file-watcher.ts
@@ -123572,7 +123628,7 @@ var m5 = (n4, r5) => {
123572
123628
  }
123573
123629
  return false;
123574
123630
  };
123575
- var z40 = (n4, r5) => {
123631
+ var z41 = (n4, r5) => {
123576
123632
  for (let e4 = r5 - 1; e4 >= 0; e4 -= 1) {
123577
123633
  if (n4[e4] === ">") return false;
123578
123634
  if (n4[e4] === "<") {
@@ -123621,7 +123677,7 @@ var Y4 = (n4) => {
123621
123677
  }
123622
123678
  return r5;
123623
123679
  };
123624
- var bn2 = (n4, r5, e4, i4) => !!(e4 === "\\" || n4.includes("$") && h4(n4, r5) || m5(n4, r5) || z40(n4, r5) || e4 === "_" || i4 === "_" || e4 && i4 && g6(e4) && g6(i4));
123680
+ var bn2 = (n4, r5, e4, i4) => !!(e4 === "\\" || n4.includes("$") && h4(n4, r5) || m5(n4, r5) || z41(n4, r5) || e4 === "_" || i4 === "_" || e4 && i4 && g6(e4) && g6(i4));
123625
123681
  var Tn2 = (n4) => {
123626
123682
  let r5 = 0, e4 = false, i4 = n4.length;
123627
123683
  for (let s5 = 0; s5 < i4; s5 += 1) {
@@ -129893,7 +129949,7 @@ async function resolveSubjectLabels(subjects, deps) {
129893
129949
  // ../../apps/server/src/routes/relay-adapters.ts
129894
129950
  import { Router as Router19 } from "express";
129895
129951
  import express2 from "express";
129896
- import { z as z42 } from "zod";
129952
+ import { z as z43 } from "zod";
129897
129953
 
129898
129954
  // ../../apps/server/src/services/relay/adapter-manager.ts
129899
129955
  import { readFile as readFile13 } from "node:fs/promises";
@@ -130178,9 +130234,9 @@ import { readFile as readFile10, writeFile as writeFile7, mkdir as mkdir8, renam
130178
130234
  import { dirname as dirname7, join as pathJoin } from "node:path";
130179
130235
  import { randomUUID as randomUUID9 } from "node:crypto";
130180
130236
  init_logger();
130181
- import { z as z41 } from "zod";
130182
- var BindingsFileShellSchema = z41.object({
130183
- bindings: z41.array(z41.unknown())
130237
+ import { z as z42 } from "zod";
130238
+ var BindingsFileShellSchema = z42.object({
130239
+ bindings: z42.array(z42.unknown())
130184
130240
  });
130185
130241
  var STABILITY_THRESHOLD_MS = 150;
130186
130242
  var POLL_INTERVAL_MS = 50;
@@ -131569,14 +131625,14 @@ function createAdapterRouter(adapterManager2, traceStore2) {
131569
131625
  if (!bindingStore) {
131570
131626
  return res.status(503).json({ error: "Binding subsystem not available" });
131571
131627
  }
131572
- const UpdateBindingSchema = z42.object({
131628
+ const UpdateBindingSchema = z43.object({
131573
131629
  sessionStrategy: SessionStrategySchema.optional(),
131574
- label: z42.string().optional(),
131575
- chatId: z42.string().optional().nullable(),
131630
+ label: z43.string().optional(),
131631
+ chatId: z43.string().optional().nullable(),
131576
131632
  channelType: ChannelTypeSchema.optional().nullable(),
131577
- canInitiate: z42.boolean().optional(),
131578
- canReply: z42.boolean().optional(),
131579
- canReceive: z42.boolean().optional(),
131633
+ canInitiate: z43.boolean().optional(),
131634
+ canReply: z43.boolean().optional(),
131635
+ canReceive: z43.boolean().optional(),
131580
131636
  permissionMode: PermissionModeSchema.optional()
131581
131637
  });
131582
131638
  const result2 = UpdateBindingSchema.safeParse(req.body);
@@ -136106,13 +136162,13 @@ function createAgentsRouter(meshCore2) {
136106
136162
 
136107
136163
  // ../../apps/server/src/routes/discovery.ts
136108
136164
  import { Router as Router24 } from "express";
136109
- import { z as z43 } from "zod";
136165
+ import { z as z44 } from "zod";
136110
136166
  init_logger();
136111
- var ScanRequestSchema = z43.object({
136112
- root: z43.string().optional(),
136113
- roots: z43.array(z43.string()).optional(),
136114
- maxDepth: z43.number().int().min(1).max(10).optional(),
136115
- timeout: z43.number().int().min(1e3).max(12e4).optional()
136167
+ var ScanRequestSchema = z44.object({
136168
+ root: z44.string().optional(),
136169
+ roots: z44.array(z44.string()).optional(),
136170
+ maxDepth: z44.number().int().min(1).max(10).optional(),
136171
+ timeout: z44.number().int().min(1e3).max(12e4).optional()
136116
136172
  });
136117
136173
  function createDiscoveryRouter(meshCore2) {
136118
136174
  const router16 = Router24();
@@ -136212,8 +136268,8 @@ import fs27 from "fs/promises";
136212
136268
  import path47 from "path";
136213
136269
 
136214
136270
  // ../shared/dist/template-catalog.js
136215
- import { z as z44 } from "zod";
136216
- var TemplateCategorySchema = z44.enum([
136271
+ import { z as z45 } from "zod";
136272
+ var TemplateCategorySchema = z45.enum([
136217
136273
  "general",
136218
136274
  "frontend",
136219
136275
  "backend",
@@ -136221,18 +136277,18 @@ var TemplateCategorySchema = z44.enum([
136221
136277
  "tooling",
136222
136278
  "custom"
136223
136279
  ]);
136224
- var TemplateEntrySchema = z44.object({
136225
- id: z44.string().min(1),
136226
- name: z44.string().min(1),
136227
- description: z44.string(),
136228
- source: z44.string(),
136280
+ var TemplateEntrySchema = z45.object({
136281
+ id: z45.string().min(1),
136282
+ name: z45.string().min(1),
136283
+ description: z45.string(),
136284
+ source: z45.string(),
136229
136285
  category: TemplateCategorySchema,
136230
- builtin: z44.boolean().default(false),
136231
- tags: z44.array(z44.string()).default([])
136286
+ builtin: z45.boolean().default(false),
136287
+ tags: z45.array(z45.string()).default([])
136232
136288
  });
136233
- var TemplateCatalogSchema = z44.object({
136234
- version: z44.literal(1),
136235
- templates: z44.array(TemplateEntrySchema)
136289
+ var TemplateCatalogSchema = z45.object({
136290
+ version: z45.literal(1),
136291
+ templates: z45.array(TemplateEntrySchema)
136236
136292
  });
136237
136293
  var DEFAULT_TEMPLATES2 = [
136238
136294
  {
@@ -136458,88 +136514,88 @@ import fs29 from "fs/promises";
136458
136514
  import path48 from "path";
136459
136515
 
136460
136516
  // ../extension-api/dist/manifest-schema.js
136461
- import { z as z45 } from "zod";
136462
- var SecretDeclarationSchema = z45.object({
136517
+ import { z as z46 } from "zod";
136518
+ var SecretDeclarationSchema = z46.object({
136463
136519
  /** Secret key name (lowercase snake_case). */
136464
- key: z45.string().regex(/^[a-z][a-z0-9_]*$/),
136520
+ key: z46.string().regex(/^[a-z][a-z0-9_]*$/),
136465
136521
  /** Human-readable label for the settings UI. */
136466
- label: z45.string().min(1),
136522
+ label: z46.string().min(1),
136467
136523
  /** Help text shown in the settings UI. */
136468
- description: z45.string().optional(),
136524
+ description: z46.string().optional(),
136469
136525
  /** Custom placeholder hint for the password input (e.g., 'lin_api_xxxx'). */
136470
- placeholder: z45.string().optional(),
136526
+ placeholder: z46.string().optional(),
136471
136527
  /** Whether the extension cannot function without this secret. */
136472
- required: z45.boolean().default(false),
136528
+ required: z46.boolean().default(false),
136473
136529
  /** Group name for collapsible section organization. */
136474
- group: z45.string().optional()
136530
+ group: z46.string().optional()
136475
136531
  });
136476
- var SettingOptionSchema = z45.object({
136477
- label: z45.string().min(1),
136478
- value: z45.union([z45.string(), z45.number()])
136532
+ var SettingOptionSchema = z46.object({
136533
+ label: z46.string().min(1),
136534
+ value: z46.union([z46.string(), z46.number()])
136479
136535
  });
136480
- var SettingDeclarationSchema = z45.object({
136536
+ var SettingDeclarationSchema = z46.object({
136481
136537
  /** Field type: text, number, boolean, or select. */
136482
- type: z45.enum(["text", "number", "boolean", "select"]),
136538
+ type: z46.enum(["text", "number", "boolean", "select"]),
136483
136539
  /** Setting key name (lowercase snake_case). */
136484
- key: z45.string().regex(/^[a-z][a-z0-9_]*$/),
136540
+ key: z46.string().regex(/^[a-z][a-z0-9_]*$/),
136485
136541
  /** Human-readable label for the settings UI. */
136486
- label: z45.string().min(1),
136542
+ label: z46.string().min(1),
136487
136543
  /** Help text shown in the settings UI. */
136488
- description: z45.string().optional(),
136544
+ description: z46.string().optional(),
136489
136545
  /** Placeholder text for text and number inputs. */
136490
- placeholder: z45.string().optional(),
136546
+ placeholder: z46.string().optional(),
136491
136547
  /** Default value used when no user override is stored. */
136492
- default: z45.union([z45.string(), z45.number(), z45.boolean()]).optional(),
136548
+ default: z46.union([z46.string(), z46.number(), z46.boolean()]).optional(),
136493
136549
  /** Whether the extension cannot function without this setting. */
136494
- required: z45.boolean().default(false),
136550
+ required: z46.boolean().default(false),
136495
136551
  /** Group name for collapsible section organization. */
136496
- group: z45.string().optional(),
136552
+ group: z46.string().optional(),
136497
136553
  /** Options for select-type fields. */
136498
- options: z45.array(SettingOptionSchema).optional(),
136554
+ options: z46.array(SettingOptionSchema).optional(),
136499
136555
  /** Minimum value for number-type fields. */
136500
- min: z45.number().optional(),
136556
+ min: z46.number().optional(),
136501
136557
  /** Maximum value for number-type fields. */
136502
- max: z45.number().optional()
136558
+ max: z46.number().optional()
136503
136559
  });
136504
- var DataProxySchema = z45.object({
136560
+ var DataProxySchema = z46.object({
136505
136561
  /** Base URL of the upstream API. */
136506
- baseUrl: z45.string().url(),
136562
+ baseUrl: z46.string().url(),
136507
136563
  /** HTTP header name for the auth credential. */
136508
- authHeader: z45.string().default("Authorization"),
136564
+ authHeader: z46.string().default("Authorization"),
136509
136565
  /** How the secret value is formatted in the header. */
136510
- authType: z45.enum(["Bearer", "Basic", "Token", "Custom"]).default("Bearer"),
136566
+ authType: z46.enum(["Bearer", "Basic", "Token", "Custom"]).default("Bearer"),
136511
136567
  /** Key name in the extension's secret store to use for auth. */
136512
- authSecret: z45.string(),
136568
+ authSecret: z46.string(),
136513
136569
  /** Optional path rewriting rules (from -> to). */
136514
- pathRewrite: z45.record(z45.string(), z45.string()).optional()
136570
+ pathRewrite: z46.record(z46.string(), z46.string()).optional()
136515
136571
  });
136516
- var ServerCapabilitiesSchema = z45.object({
136572
+ var ServerCapabilitiesSchema = z46.object({
136517
136573
  /** Path to the server entry point relative to extension directory. */
136518
- serverEntry: z45.string().default("./server.ts"),
136574
+ serverEntry: z46.string().default("./server.ts"),
136519
136575
  /** Allowlisted external hosts this extension will contact. */
136520
- externalHosts: z45.array(z45.string().url()).optional(),
136576
+ externalHosts: z46.array(z46.string().url()).optional(),
136521
136577
  /** Secrets this extension requires (drives auto-generated settings UI). */
136522
- secrets: z45.array(SecretDeclarationSchema).optional(),
136578
+ secrets: z46.array(SecretDeclarationSchema).optional(),
136523
136579
  /** Non-secret configuration fields (drives auto-generated settings UI). */
136524
- settings: z45.array(SettingDeclarationSchema).optional()
136580
+ settings: z46.array(SettingDeclarationSchema).optional()
136525
136581
  });
136526
- var ExtensionManifestSchema = z45.object({
136582
+ var ExtensionManifestSchema = z46.object({
136527
136583
  /** Unique extension identifier (kebab-case). Used as directory name and registry key. */
136528
- id: z45.string().min(1).regex(/^[a-z0-9][a-z0-9-]*$/),
136584
+ id: z46.string().min(1).regex(/^[a-z0-9][a-z0-9-]*$/),
136529
136585
  /** Human-readable display name. */
136530
- name: z45.string().min(1),
136586
+ name: z46.string().min(1),
136531
136587
  /** Semver version string. */
136532
- version: z45.string().regex(/^\d+\.\d+\.\d+$/),
136588
+ version: z46.string().regex(/^\d+\.\d+\.\d+$/),
136533
136589
  /** Short description shown in settings UI. */
136534
- description: z45.string().optional(),
136590
+ description: z46.string().optional(),
136535
136591
  /** Author name or identifier. */
136536
- author: z45.string().optional(),
136592
+ author: z46.string().optional(),
136537
136593
  /** Minimum DorkOS version required (semver). If host is older, extension cannot be enabled. */
136538
- minHostVersion: z45.string().optional(),
136594
+ minHostVersion: z46.string().optional(),
136539
136595
  /** Declares which slots this extension contributes to. Informational only — not enforced. */
136540
- contributions: z45.record(z45.string(), z45.boolean()).optional(),
136596
+ contributions: z46.record(z46.string(), z46.boolean()).optional(),
136541
136597
  /** Reserved for future permission model. */
136542
- permissions: z45.array(z45.string()).optional(),
136598
+ permissions: z46.array(z46.string()).optional(),
136543
136599
  /** Server-side capability declarations. Present if the extension has server.ts. */
136544
136600
  serverCapabilities: ServerCapabilitiesSchema.optional(),
136545
136601
  /** Declarative proxy config for zero-code API passthrough. */
@@ -138091,24 +138147,28 @@ init_template_downloader();
138091
138147
  // ../../apps/server/src/services/marketplace/marketplace-source-manager.ts
138092
138148
  import { mkdir as mkdir11, readFile as readFile14, rename as rename8, writeFile as writeFile10 } from "node:fs/promises";
138093
138149
  import { dirname as dirname10, join as join18 } from "node:path";
138094
- import { z as z46 } from "zod";
138095
- var MarketplaceSourceSchema2 = z46.object({
138096
- name: z46.string().min(1),
138097
- source: z46.string().min(1),
138098
- enabled: z46.boolean(),
138099
- addedAt: z46.string().min(1)
138150
+ import { z as z47 } from "zod";
138151
+ var MarketplaceSourceSchema2 = z47.object({
138152
+ name: z47.string().min(1),
138153
+ source: z47.string().min(1),
138154
+ enabled: z47.boolean(),
138155
+ addedAt: z47.string().min(1)
138100
138156
  });
138101
- var MarketplacesFileSchema = z46.object({
138102
- version: z46.literal(1),
138103
- sources: z46.array(MarketplaceSourceSchema2)
138157
+ var MarketplacesFileSchema = z47.object({
138158
+ version: z47.literal(1),
138159
+ sources: z47.array(MarketplaceSourceSchema2)
138104
138160
  });
138105
138161
  var MARKETPLACES_FILENAME = "marketplaces.json";
138162
+ var DORKOS_COMMUNITY_URL = "https://github.com/dork-labs/marketplace";
138163
+ var LEGACY_SOURCE_MIGRATIONS = /* @__PURE__ */ new Map([
138164
+ ["https://github.com/dorkos/marketplace", DORKOS_COMMUNITY_URL]
138165
+ ]);
138106
138166
  function buildDefaultSources() {
138107
138167
  const now = (/* @__PURE__ */ new Date()).toISOString();
138108
138168
  return [
138109
138169
  {
138110
138170
  name: "dorkos-community",
138111
- source: "https://github.com/dorkos/marketplace",
138171
+ source: DORKOS_COMMUNITY_URL,
138112
138172
  enabled: true,
138113
138173
  addedAt: now
138114
138174
  },
@@ -138120,6 +138180,17 @@ function buildDefaultSources() {
138120
138180
  }
138121
138181
  ];
138122
138182
  }
138183
+ function migrateKnownBadSources(sources) {
138184
+ let rewrites = 0;
138185
+ for (const source of sources) {
138186
+ const replacement = LEGACY_SOURCE_MIGRATIONS.get(source.source);
138187
+ if (replacement !== void 0) {
138188
+ source.source = replacement;
138189
+ rewrites += 1;
138190
+ }
138191
+ }
138192
+ return rewrites;
138193
+ }
138123
138194
  var MarketplaceSourceManager = class {
138124
138195
  /**
138125
138196
  * Construct a manager rooted at the given dorkHome directory.
@@ -138233,6 +138304,10 @@ var MarketplaceSourceManager = class {
138233
138304
  if (!parsed.success) {
138234
138305
  throw new Error(`Invalid marketplaces.json at ${this.filePath}: ${parsed.error.message}`);
138235
138306
  }
138307
+ const rewrites = migrateKnownBadSources(parsed.data.sources);
138308
+ if (rewrites > 0) {
138309
+ await this.writeFile(parsed.data);
138310
+ }
138236
138311
  return parsed.data;
138237
138312
  }
138238
138313
  /**
@@ -139115,10 +139190,15 @@ var PackageFetcher = class {
139115
139190
  }
139116
139191
  const url = resolveMarketplaceJsonUrl(source.source);
139117
139192
  try {
139118
- const json = await this.fetchAndParseMarketplaceJson(url);
139193
+ const json = await this.fetchAndParseMarketplaceJson(url, source.name);
139119
139194
  await this.cache.writeMarketplace(source.name, json);
139120
139195
  return json;
139121
139196
  } catch (err) {
139197
+ this.logger.warn("package-fetcher: marketplace.json fetch failed", {
139198
+ marketplaceName: source.name,
139199
+ url,
139200
+ error: err instanceof Error ? err.message : String(err)
139201
+ });
139122
139202
  return this.serveStaleMarketplace(source.name, err);
139123
139203
  }
139124
139204
  }
@@ -139213,17 +139293,36 @@ var PackageFetcher = class {
139213
139293
  await this.cache.writeMarketplace(source.name, parsed.marketplace);
139214
139294
  return parsed.marketplace;
139215
139295
  }
139216
- /** GET the marketplace.json URL and parse it. Throws on any failure. */
139217
- async fetchAndParseMarketplaceJson(url) {
139296
+ /**
139297
+ * GET the marketplace.json URL and parse it via the lenient consumption
139298
+ * parser. Throws on network failure or a broken top-level envelope.
139299
+ * Individual plugin entries that fail validation are SKIPPED (not
139300
+ * fatal) and logged with the marketplace name, attempted URL, and
139301
+ * the offending entry identity so future debugging is self-serve.
139302
+ */
139303
+ async fetchAndParseMarketplaceJson(url, marketplaceName) {
139218
139304
  const response = await fetch(url);
139219
139305
  if (!response.ok) {
139220
139306
  throw new Error(`marketplace.json fetch failed: ${response.status} ${response.statusText}`);
139221
139307
  }
139222
139308
  const raw = await response.text();
139223
- const parsed = parseMarketplaceJson(raw);
139309
+ const parsed = parseMarketplaceJsonLenient(raw);
139224
139310
  if (!parsed.ok) {
139225
139311
  throw new Error(parsed.error);
139226
139312
  }
139313
+ if (parsed.skippedPlugins.length > 0) {
139314
+ this.logger.warn("package-fetcher: skipped invalid plugin entries", {
139315
+ marketplaceName,
139316
+ url,
139317
+ skippedCount: parsed.skippedPlugins.length,
139318
+ validCount: parsed.marketplace.plugins.length,
139319
+ skippedPlugins: parsed.skippedPlugins.map((p5) => ({
139320
+ index: p5.index,
139321
+ name: p5.name ?? "<unknown>",
139322
+ error: p5.error
139323
+ }))
139324
+ });
139325
+ }
139227
139326
  return parsed.marketplace;
139228
139327
  }
139229
139328
  /** Serve the stale cached marketplace.json, or rethrow the fetch error. */
@@ -141022,7 +141121,7 @@ init_logger();
141022
141121
  import { Router as Router29 } from "express";
141023
141122
  import { readdir as readdir13, stat as stat13 } from "node:fs/promises";
141024
141123
  import { join as join22 } from "node:path";
141025
- import { z as z47 } from "zod";
141124
+ import { z as z48 } from "zod";
141026
141125
  init_installed_scanner();
141027
141126
 
141028
141127
  // ../../apps/server/src/services/marketplace-mcp/confirmation-registry.ts
@@ -141125,35 +141224,35 @@ var TokenConfirmationProvider = class {
141125
141224
  };
141126
141225
 
141127
141226
  // ../../apps/server/src/routes/marketplace.ts
141128
- var AddSourceBodySchema = z47.object({
141129
- name: z47.string().min(1).max(128),
141130
- source: z47.string().min(1),
141131
- enabled: z47.boolean().optional()
141227
+ var AddSourceBodySchema = z48.object({
141228
+ name: z48.string().min(1).max(128),
141229
+ source: z48.string().min(1),
141230
+ enabled: z48.boolean().optional()
141132
141231
  });
141133
- var InstallRequestBodySchema = z47.object({
141134
- marketplace: z47.string().optional(),
141135
- source: z47.string().optional(),
141136
- force: z47.boolean().optional(),
141137
- yes: z47.boolean().optional(),
141138
- projectPath: z47.string().optional()
141232
+ var InstallRequestBodySchema = z48.object({
141233
+ marketplace: z48.string().optional(),
141234
+ source: z48.string().optional(),
141235
+ force: z48.boolean().optional(),
141236
+ yes: z48.boolean().optional(),
141237
+ projectPath: z48.string().optional()
141139
141238
  });
141140
- var UninstallRequestBodySchema = z47.object({
141141
- purge: z47.boolean().optional(),
141142
- projectPath: z47.string().optional()
141239
+ var UninstallRequestBodySchema = z48.object({
141240
+ purge: z48.boolean().optional(),
141241
+ projectPath: z48.string().optional()
141143
141242
  });
141144
- var UpdateRequestBodySchema = z47.object({
141145
- apply: z47.boolean().optional(),
141146
- projectPath: z47.string().optional()
141243
+ var UpdateRequestBodySchema = z48.object({
141244
+ apply: z48.boolean().optional(),
141245
+ projectPath: z48.string().optional()
141147
141246
  });
141148
- var PruneCacheBodySchema = z47.object({
141149
- keepLastN: z47.number().int().nonnegative().optional()
141247
+ var PruneCacheBodySchema = z48.object({
141248
+ keepLastN: z48.number().int().nonnegative().optional()
141150
141249
  });
141151
- var ConfirmationActionBodySchema = z47.object({
141152
- action: z47.enum(["approve", "decline"]),
141153
- reason: z47.string().max(1024).optional()
141250
+ var ConfirmationActionBodySchema = z48.object({
141251
+ action: z48.enum(["approve", "decline"]),
141252
+ reason: z48.string().max(1024).optional()
141154
141253
  });
141155
- var GetPackageQuerySchema = z47.object({
141156
- marketplace: z47.string().optional()
141254
+ var GetPackageQuerySchema = z48.object({
141255
+ marketplace: z48.string().optional()
141157
141256
  });
141158
141257
  function mapErrorToStatus(err) {
141159
141258
  if (err instanceof InvalidPackageError) {
@@ -141421,18 +141520,25 @@ function createMarketplaceRouter(deps) {
141421
141520
  }
141422
141521
  async function aggregatePackages(sources, fetcher) {
141423
141522
  const results = [];
141523
+ const breakdown = {};
141424
141524
  for (const source of sources) {
141425
141525
  try {
141426
141526
  const json = await fetcher.fetchMarketplaceJson(source);
141427
141527
  for (const entry of json.plugins) {
141428
141528
  results.push({ ...entry, marketplace: source.name });
141429
141529
  }
141530
+ breakdown[source.name] = json.plugins.length;
141430
141531
  } catch (err) {
141431
- logger.warn(
141432
- `[Marketplace] Failed to fetch marketplace.json for ${source.name}: ${err instanceof Error ? err.message : String(err)}`
141433
- );
141532
+ const message = err instanceof Error ? err.message : String(err);
141533
+ breakdown[source.name] = `error: ${message}`;
141534
+ logger.warn(`[Marketplace] Failed to fetch marketplace.json for ${source.name}: ${message}`);
141434
141535
  }
141435
141536
  }
141537
+ logger.info("[Marketplace] Aggregated packages from enabled sources", {
141538
+ totalPlugins: results.length,
141539
+ sourceCount: sources.length,
141540
+ perSource: breakdown
141541
+ });
141436
141542
  return results;
141437
141543
  }
141438
141544
  async function computeCacheStatus(cache) {
@@ -141659,40 +141765,40 @@ var ActivityService = class {
141659
141765
  import { Router as Router30 } from "express";
141660
141766
 
141661
141767
  // ../shared/dist/activity-schemas.js
141662
- import { z as z48 } from "zod";
141768
+ import { z as z49 } from "zod";
141663
141769
  import { extendZodWithOpenApi as extendZodWithOpenApi7 } from "@asteasolutions/zod-to-openapi";
141664
- extendZodWithOpenApi7(z48);
141665
- var ActivityCategorySchema = z48.enum(["tasks", "relay", "agent", "config", "system"]).openapi("ActivityCategory");
141666
- var ActorTypeSchema = z48.enum(["user", "agent", "system", "tasks"]).openapi("ActorType");
141667
- var ActivityItemSchema = z48.object({
141668
- id: z48.string(),
141669
- occurredAt: z48.string(),
141770
+ extendZodWithOpenApi7(z49);
141771
+ var ActivityCategorySchema = z49.enum(["tasks", "relay", "agent", "config", "system"]).openapi("ActivityCategory");
141772
+ var ActorTypeSchema = z49.enum(["user", "agent", "system", "tasks"]).openapi("ActorType");
141773
+ var ActivityItemSchema = z49.object({
141774
+ id: z49.string(),
141775
+ occurredAt: z49.string(),
141670
141776
  actorType: ActorTypeSchema,
141671
- actorId: z48.string().nullable(),
141672
- actorLabel: z48.string(),
141777
+ actorId: z49.string().nullable(),
141778
+ actorLabel: z49.string(),
141673
141779
  category: ActivityCategorySchema,
141674
- eventType: z48.string(),
141675
- resourceType: z48.string().nullable(),
141676
- resourceId: z48.string().nullable(),
141677
- resourceLabel: z48.string().nullable(),
141678
- summary: z48.string(),
141679
- linkPath: z48.string().nullable(),
141680
- metadata: z48.record(z48.string(), z48.unknown()).nullable()
141780
+ eventType: z49.string(),
141781
+ resourceType: z49.string().nullable(),
141782
+ resourceId: z49.string().nullable(),
141783
+ resourceLabel: z49.string().nullable(),
141784
+ summary: z49.string(),
141785
+ linkPath: z49.string().nullable(),
141786
+ metadata: z49.record(z49.string(), z49.unknown()).nullable()
141681
141787
  }).openapi("ActivityItem");
141682
- var ListActivityQuerySchema = z48.object({
141683
- limit: z48.coerce.number().int().min(1).max(100).optional().default(50),
141788
+ var ListActivityQuerySchema = z49.object({
141789
+ limit: z49.coerce.number().int().min(1).max(100).optional().default(50),
141684
141790
  /** ISO 8601 timestamp cursor — fetch events older than this. */
141685
- before: z48.string().datetime({ offset: true }).optional(),
141791
+ before: z49.string().datetime({ offset: true }).optional(),
141686
141792
  /** Comma-separated category names for filtering. */
141687
- categories: z48.string().optional(),
141793
+ categories: z49.string().optional(),
141688
141794
  actorType: ActorTypeSchema.optional(),
141689
- actorId: z48.string().optional(),
141795
+ actorId: z49.string().optional(),
141690
141796
  /** ISO 8601 timestamp lower bound — only events after this time. */
141691
- since: z48.string().datetime({ offset: true }).optional()
141797
+ since: z49.string().datetime({ offset: true }).optional()
141692
141798
  }).openapi("ListActivityQuery");
141693
- var ListActivityResponseSchema = z48.object({
141694
- items: z48.array(ActivityItemSchema),
141695
- nextCursor: z48.string().nullable()
141799
+ var ListActivityResponseSchema = z49.object({
141800
+ items: z49.array(ActivityItemSchema),
141801
+ nextCursor: z49.string().nullable()
141696
141802
  }).openapi("ListActivityResponse");
141697
141803
 
141698
141804
  // ../../apps/server/src/routes/activity.ts
@@ -141875,32 +141981,32 @@ function getLiteralValue(schema) {
141875
141981
  }
141876
141982
 
141877
141983
  // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
141878
- import * as z49 from "zod/v4";
141984
+ import * as z50 from "zod/v4";
141879
141985
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
141880
141986
  var DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
141881
141987
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
141882
141988
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
141883
141989
  var JSONRPC_VERSION = "2.0";
141884
- var AssertObjectSchema = z49.custom((v6) => v6 !== null && (typeof v6 === "object" || typeof v6 === "function"));
141885
- var ProgressTokenSchema = z49.union([z49.string(), z49.number().int()]);
141886
- var CursorSchema = z49.string();
141887
- var TaskCreationParamsSchema = z49.looseObject({
141990
+ var AssertObjectSchema = z50.custom((v6) => v6 !== null && (typeof v6 === "object" || typeof v6 === "function"));
141991
+ var ProgressTokenSchema = z50.union([z50.string(), z50.number().int()]);
141992
+ var CursorSchema = z50.string();
141993
+ var TaskCreationParamsSchema = z50.looseObject({
141888
141994
  /**
141889
141995
  * Requested duration in milliseconds to retain task from creation.
141890
141996
  */
141891
- ttl: z49.number().optional(),
141997
+ ttl: z50.number().optional(),
141892
141998
  /**
141893
141999
  * Time in milliseconds to wait between task status requests.
141894
142000
  */
141895
- pollInterval: z49.number().optional()
142001
+ pollInterval: z50.number().optional()
141896
142002
  });
141897
- var TaskMetadataSchema = z49.object({
141898
- ttl: z49.number().optional()
142003
+ var TaskMetadataSchema = z50.object({
142004
+ ttl: z50.number().optional()
141899
142005
  });
141900
- var RelatedTaskMetadataSchema = z49.object({
141901
- taskId: z49.string()
142006
+ var RelatedTaskMetadataSchema = z50.object({
142007
+ taskId: z50.string()
141902
142008
  });
141903
- var RequestMetaSchema = z49.looseObject({
142009
+ var RequestMetaSchema = z50.looseObject({
141904
142010
  /**
141905
142011
  * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
141906
142012
  */
@@ -141910,7 +142016,7 @@ var RequestMetaSchema = z49.looseObject({
141910
142016
  */
141911
142017
  [RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
141912
142018
  });
141913
- var BaseRequestParamsSchema = z49.object({
142019
+ var BaseRequestParamsSchema = z50.object({
141914
142020
  /**
141915
142021
  * See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
141916
142022
  */
@@ -141928,42 +142034,42 @@ var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
141928
142034
  task: TaskMetadataSchema.optional()
141929
142035
  });
141930
142036
  var isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
141931
- var RequestSchema = z49.object({
141932
- method: z49.string(),
142037
+ var RequestSchema = z50.object({
142038
+ method: z50.string(),
141933
142039
  params: BaseRequestParamsSchema.loose().optional()
141934
142040
  });
141935
- var NotificationsParamsSchema = z49.object({
142041
+ var NotificationsParamsSchema = z50.object({
141936
142042
  /**
141937
142043
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
141938
142044
  * for notes on _meta usage.
141939
142045
  */
141940
142046
  _meta: RequestMetaSchema.optional()
141941
142047
  });
141942
- var NotificationSchema = z49.object({
141943
- method: z49.string(),
142048
+ var NotificationSchema = z50.object({
142049
+ method: z50.string(),
141944
142050
  params: NotificationsParamsSchema.loose().optional()
141945
142051
  });
141946
- var ResultSchema = z49.looseObject({
142052
+ var ResultSchema = z50.looseObject({
141947
142053
  /**
141948
142054
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
141949
142055
  * for notes on _meta usage.
141950
142056
  */
141951
142057
  _meta: RequestMetaSchema.optional()
141952
142058
  });
141953
- var RequestIdSchema = z49.union([z49.string(), z49.number().int()]);
141954
- var JSONRPCRequestSchema = z49.object({
141955
- jsonrpc: z49.literal(JSONRPC_VERSION),
142059
+ var RequestIdSchema = z50.union([z50.string(), z50.number().int()]);
142060
+ var JSONRPCRequestSchema = z50.object({
142061
+ jsonrpc: z50.literal(JSONRPC_VERSION),
141956
142062
  id: RequestIdSchema,
141957
142063
  ...RequestSchema.shape
141958
142064
  }).strict();
141959
142065
  var isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
141960
- var JSONRPCNotificationSchema = z49.object({
141961
- jsonrpc: z49.literal(JSONRPC_VERSION),
142066
+ var JSONRPCNotificationSchema = z50.object({
142067
+ jsonrpc: z50.literal(JSONRPC_VERSION),
141962
142068
  ...NotificationSchema.shape
141963
142069
  }).strict();
141964
142070
  var isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
141965
- var JSONRPCResultResponseSchema = z49.object({
141966
- jsonrpc: z49.literal(JSONRPC_VERSION),
142071
+ var JSONRPCResultResponseSchema = z50.object({
142072
+ jsonrpc: z50.literal(JSONRPC_VERSION),
141967
142073
  id: RequestIdSchema,
141968
142074
  result: ResultSchema
141969
142075
  }).strict();
@@ -141979,32 +142085,32 @@ var ErrorCode;
141979
142085
  ErrorCode2[ErrorCode2["InternalError"] = -32603] = "InternalError";
141980
142086
  ErrorCode2[ErrorCode2["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
141981
142087
  })(ErrorCode || (ErrorCode = {}));
141982
- var JSONRPCErrorResponseSchema = z49.object({
141983
- jsonrpc: z49.literal(JSONRPC_VERSION),
142088
+ var JSONRPCErrorResponseSchema = z50.object({
142089
+ jsonrpc: z50.literal(JSONRPC_VERSION),
141984
142090
  id: RequestIdSchema.optional(),
141985
- error: z49.object({
142091
+ error: z50.object({
141986
142092
  /**
141987
142093
  * The error type that occurred.
141988
142094
  */
141989
- code: z49.number().int(),
142095
+ code: z50.number().int(),
141990
142096
  /**
141991
142097
  * A short description of the error. The message SHOULD be limited to a concise single sentence.
141992
142098
  */
141993
- message: z49.string(),
142099
+ message: z50.string(),
141994
142100
  /**
141995
142101
  * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
141996
142102
  */
141997
- data: z49.unknown().optional()
142103
+ data: z50.unknown().optional()
141998
142104
  })
141999
142105
  }).strict();
142000
142106
  var isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;
142001
- var JSONRPCMessageSchema = z49.union([
142107
+ var JSONRPCMessageSchema = z50.union([
142002
142108
  JSONRPCRequestSchema,
142003
142109
  JSONRPCNotificationSchema,
142004
142110
  JSONRPCResultResponseSchema,
142005
142111
  JSONRPCErrorResponseSchema
142006
142112
  ]);
142007
- var JSONRPCResponseSchema = z49.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
142113
+ var JSONRPCResponseSchema = z50.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
142008
142114
  var EmptyResultSchema = ResultSchema.strict();
142009
142115
  var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
142010
142116
  /**
@@ -142016,28 +142122,28 @@ var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
142016
142122
  /**
142017
142123
  * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
142018
142124
  */
142019
- reason: z49.string().optional()
142125
+ reason: z50.string().optional()
142020
142126
  });
142021
142127
  var CancelledNotificationSchema = NotificationSchema.extend({
142022
- method: z49.literal("notifications/cancelled"),
142128
+ method: z50.literal("notifications/cancelled"),
142023
142129
  params: CancelledNotificationParamsSchema
142024
142130
  });
142025
- var IconSchema = z49.object({
142131
+ var IconSchema = z50.object({
142026
142132
  /**
142027
142133
  * URL or data URI for the icon.
142028
142134
  */
142029
- src: z49.string(),
142135
+ src: z50.string(),
142030
142136
  /**
142031
142137
  * Optional MIME type for the icon.
142032
142138
  */
142033
- mimeType: z49.string().optional(),
142139
+ mimeType: z50.string().optional(),
142034
142140
  /**
142035
142141
  * Optional array of strings that specify sizes at which the icon can be used.
142036
142142
  * Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
142037
142143
  *
142038
142144
  * If not provided, the client should assume that the icon can be used at any size.
142039
142145
  */
142040
- sizes: z49.array(z49.string()).optional(),
142146
+ sizes: z50.array(z50.string()).optional(),
142041
142147
  /**
142042
142148
  * Optional specifier for the theme this icon is designed for. `light` indicates
142043
142149
  * the icon is designed to be used with a light background, and `dark` indicates
@@ -142045,9 +142151,9 @@ var IconSchema = z49.object({
142045
142151
  *
142046
142152
  * If not provided, the client should assume the icon can be used with any theme.
142047
142153
  */
142048
- theme: z49.enum(["light", "dark"]).optional()
142154
+ theme: z50.enum(["light", "dark"]).optional()
142049
142155
  });
142050
- var IconsSchema = z49.object({
142156
+ var IconsSchema = z50.object({
142051
142157
  /**
142052
142158
  * Optional set of sized icons that the client can display in a user interface.
142053
142159
  *
@@ -142059,11 +142165,11 @@ var IconsSchema = z49.object({
142059
142165
  * - `image/svg+xml` - SVG images (scalable but requires security precautions)
142060
142166
  * - `image/webp` - WebP images (modern, efficient format)
142061
142167
  */
142062
- icons: z49.array(IconSchema).optional()
142168
+ icons: z50.array(IconSchema).optional()
142063
142169
  });
142064
- var BaseMetadataSchema = z49.object({
142170
+ var BaseMetadataSchema = z50.object({
142065
142171
  /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
142066
- name: z49.string(),
142172
+ name: z50.string(),
142067
142173
  /**
142068
142174
  * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
142069
142175
  * even by those unfamiliar with domain-specific terminology.
@@ -142072,16 +142178,16 @@ var BaseMetadataSchema = z49.object({
142072
142178
  * where `annotations.title` should be given precedence over using `name`,
142073
142179
  * if present).
142074
142180
  */
142075
- title: z49.string().optional()
142181
+ title: z50.string().optional()
142076
142182
  });
142077
142183
  var ImplementationSchema = BaseMetadataSchema.extend({
142078
142184
  ...BaseMetadataSchema.shape,
142079
142185
  ...IconsSchema.shape,
142080
- version: z49.string(),
142186
+ version: z50.string(),
142081
142187
  /**
142082
142188
  * An optional URL of the website for this implementation.
142083
142189
  */
142084
- websiteUrl: z49.string().optional(),
142190
+ websiteUrl: z50.string().optional(),
142085
142191
  /**
142086
142192
  * An optional human-readable description of what this implementation does.
142087
142193
  *
@@ -142089,23 +142195,23 @@ var ImplementationSchema = BaseMetadataSchema.extend({
142089
142195
  * and capabilities. For example, a server might describe the types of resources
142090
142196
  * or tools it provides, while a client might describe its intended use case.
142091
142197
  */
142092
- description: z49.string().optional()
142198
+ description: z50.string().optional()
142093
142199
  });
142094
- var FormElicitationCapabilitySchema = z49.intersection(z49.object({
142095
- applyDefaults: z49.boolean().optional()
142096
- }), z49.record(z49.string(), z49.unknown()));
142097
- var ElicitationCapabilitySchema = z49.preprocess((value) => {
142200
+ var FormElicitationCapabilitySchema = z50.intersection(z50.object({
142201
+ applyDefaults: z50.boolean().optional()
142202
+ }), z50.record(z50.string(), z50.unknown()));
142203
+ var ElicitationCapabilitySchema = z50.preprocess((value) => {
142098
142204
  if (value && typeof value === "object" && !Array.isArray(value)) {
142099
142205
  if (Object.keys(value).length === 0) {
142100
142206
  return { form: {} };
142101
142207
  }
142102
142208
  }
142103
142209
  return value;
142104
- }, z49.intersection(z49.object({
142210
+ }, z50.intersection(z50.object({
142105
142211
  form: FormElicitationCapabilitySchema.optional(),
142106
142212
  url: AssertObjectSchema.optional()
142107
- }), z49.record(z49.string(), z49.unknown()).optional()));
142108
- var ClientTasksCapabilitySchema = z49.looseObject({
142213
+ }), z50.record(z50.string(), z50.unknown()).optional()));
142214
+ var ClientTasksCapabilitySchema = z50.looseObject({
142109
142215
  /**
142110
142216
  * Present if the client supports listing tasks.
142111
142217
  */
@@ -142117,22 +142223,22 @@ var ClientTasksCapabilitySchema = z49.looseObject({
142117
142223
  /**
142118
142224
  * Capabilities for task creation on specific request types.
142119
142225
  */
142120
- requests: z49.looseObject({
142226
+ requests: z50.looseObject({
142121
142227
  /**
142122
142228
  * Task support for sampling requests.
142123
142229
  */
142124
- sampling: z49.looseObject({
142230
+ sampling: z50.looseObject({
142125
142231
  createMessage: AssertObjectSchema.optional()
142126
142232
  }).optional(),
142127
142233
  /**
142128
142234
  * Task support for elicitation requests.
142129
142235
  */
142130
- elicitation: z49.looseObject({
142236
+ elicitation: z50.looseObject({
142131
142237
  create: AssertObjectSchema.optional()
142132
142238
  }).optional()
142133
142239
  }).optional()
142134
142240
  });
142135
- var ServerTasksCapabilitySchema = z49.looseObject({
142241
+ var ServerTasksCapabilitySchema = z50.looseObject({
142136
142242
  /**
142137
142243
  * Present if the server supports listing tasks.
142138
142244
  */
@@ -142144,24 +142250,24 @@ var ServerTasksCapabilitySchema = z49.looseObject({
142144
142250
  /**
142145
142251
  * Capabilities for task creation on specific request types.
142146
142252
  */
142147
- requests: z49.looseObject({
142253
+ requests: z50.looseObject({
142148
142254
  /**
142149
142255
  * Task support for tool requests.
142150
142256
  */
142151
- tools: z49.looseObject({
142257
+ tools: z50.looseObject({
142152
142258
  call: AssertObjectSchema.optional()
142153
142259
  }).optional()
142154
142260
  }).optional()
142155
142261
  });
142156
- var ClientCapabilitiesSchema = z49.object({
142262
+ var ClientCapabilitiesSchema = z50.object({
142157
142263
  /**
142158
142264
  * Experimental, non-standard capabilities that the client supports.
142159
142265
  */
142160
- experimental: z49.record(z49.string(), AssertObjectSchema).optional(),
142266
+ experimental: z50.record(z50.string(), AssertObjectSchema).optional(),
142161
142267
  /**
142162
142268
  * Present if the client supports sampling from an LLM.
142163
142269
  */
142164
- sampling: z49.object({
142270
+ sampling: z50.object({
142165
142271
  /**
142166
142272
  * Present if the client supports context inclusion via includeContext parameter.
142167
142273
  * If not declared, servers SHOULD only use `includeContext: "none"` (or omit it).
@@ -142179,11 +142285,11 @@ var ClientCapabilitiesSchema = z49.object({
142179
142285
  /**
142180
142286
  * Present if the client supports listing roots.
142181
142287
  */
142182
- roots: z49.object({
142288
+ roots: z50.object({
142183
142289
  /**
142184
142290
  * Whether the client supports issuing notifications for changes to the roots list.
142185
142291
  */
142186
- listChanged: z49.boolean().optional()
142292
+ listChanged: z50.boolean().optional()
142187
142293
  }).optional(),
142188
142294
  /**
142189
142295
  * Present if the client supports task creation.
@@ -142192,26 +142298,26 @@ var ClientCapabilitiesSchema = z49.object({
142192
142298
  /**
142193
142299
  * Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
142194
142300
  */
142195
- extensions: z49.record(z49.string(), AssertObjectSchema).optional()
142301
+ extensions: z50.record(z50.string(), AssertObjectSchema).optional()
142196
142302
  });
142197
142303
  var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
142198
142304
  /**
142199
142305
  * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
142200
142306
  */
142201
- protocolVersion: z49.string(),
142307
+ protocolVersion: z50.string(),
142202
142308
  capabilities: ClientCapabilitiesSchema,
142203
142309
  clientInfo: ImplementationSchema
142204
142310
  });
142205
142311
  var InitializeRequestSchema = RequestSchema.extend({
142206
- method: z49.literal("initialize"),
142312
+ method: z50.literal("initialize"),
142207
142313
  params: InitializeRequestParamsSchema
142208
142314
  });
142209
142315
  var isInitializeRequest = (value) => InitializeRequestSchema.safeParse(value).success;
142210
- var ServerCapabilitiesSchema2 = z49.object({
142316
+ var ServerCapabilitiesSchema2 = z50.object({
142211
142317
  /**
142212
142318
  * Experimental, non-standard capabilities that the server supports.
142213
142319
  */
142214
- experimental: z49.record(z49.string(), AssertObjectSchema).optional(),
142320
+ experimental: z50.record(z50.string(), AssertObjectSchema).optional(),
142215
142321
  /**
142216
142322
  * Present if the server supports sending log messages to the client.
142217
142323
  */
@@ -142223,33 +142329,33 @@ var ServerCapabilitiesSchema2 = z49.object({
142223
142329
  /**
142224
142330
  * Present if the server offers any prompt templates.
142225
142331
  */
142226
- prompts: z49.object({
142332
+ prompts: z50.object({
142227
142333
  /**
142228
142334
  * Whether this server supports issuing notifications for changes to the prompt list.
142229
142335
  */
142230
- listChanged: z49.boolean().optional()
142336
+ listChanged: z50.boolean().optional()
142231
142337
  }).optional(),
142232
142338
  /**
142233
142339
  * Present if the server offers any resources to read.
142234
142340
  */
142235
- resources: z49.object({
142341
+ resources: z50.object({
142236
142342
  /**
142237
142343
  * Whether this server supports clients subscribing to resource updates.
142238
142344
  */
142239
- subscribe: z49.boolean().optional(),
142345
+ subscribe: z50.boolean().optional(),
142240
142346
  /**
142241
142347
  * Whether this server supports issuing notifications for changes to the resource list.
142242
142348
  */
142243
- listChanged: z49.boolean().optional()
142349
+ listChanged: z50.boolean().optional()
142244
142350
  }).optional(),
142245
142351
  /**
142246
142352
  * Present if the server offers any tools to call.
142247
142353
  */
142248
- tools: z49.object({
142354
+ tools: z50.object({
142249
142355
  /**
142250
142356
  * Whether this server supports issuing notifications for changes to the tool list.
142251
142357
  */
142252
- listChanged: z49.boolean().optional()
142358
+ listChanged: z50.boolean().optional()
142253
142359
  }).optional(),
142254
142360
  /**
142255
142361
  * Present if the server supports task creation.
@@ -142258,13 +142364,13 @@ var ServerCapabilitiesSchema2 = z49.object({
142258
142364
  /**
142259
142365
  * Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
142260
142366
  */
142261
- extensions: z49.record(z49.string(), AssertObjectSchema).optional()
142367
+ extensions: z50.record(z50.string(), AssertObjectSchema).optional()
142262
142368
  });
142263
142369
  var InitializeResultSchema = ResultSchema.extend({
142264
142370
  /**
142265
142371
  * The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
142266
142372
  */
142267
- protocolVersion: z49.string(),
142373
+ protocolVersion: z50.string(),
142268
142374
  capabilities: ServerCapabilitiesSchema2,
142269
142375
  serverInfo: ImplementationSchema,
142270
142376
  /**
@@ -142272,31 +142378,31 @@ var InitializeResultSchema = ResultSchema.extend({
142272
142378
  *
142273
142379
  * This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
142274
142380
  */
142275
- instructions: z49.string().optional()
142381
+ instructions: z50.string().optional()
142276
142382
  });
142277
142383
  var InitializedNotificationSchema = NotificationSchema.extend({
142278
- method: z49.literal("notifications/initialized"),
142384
+ method: z50.literal("notifications/initialized"),
142279
142385
  params: NotificationsParamsSchema.optional()
142280
142386
  });
142281
142387
  var PingRequestSchema = RequestSchema.extend({
142282
- method: z49.literal("ping"),
142388
+ method: z50.literal("ping"),
142283
142389
  params: BaseRequestParamsSchema.optional()
142284
142390
  });
142285
- var ProgressSchema = z49.object({
142391
+ var ProgressSchema = z50.object({
142286
142392
  /**
142287
142393
  * The progress thus far. This should increase every time progress is made, even if the total is unknown.
142288
142394
  */
142289
- progress: z49.number(),
142395
+ progress: z50.number(),
142290
142396
  /**
142291
142397
  * Total number of items to process (or total progress required), if known.
142292
142398
  */
142293
- total: z49.optional(z49.number()),
142399
+ total: z50.optional(z50.number()),
142294
142400
  /**
142295
142401
  * An optional message describing the current progress.
142296
142402
  */
142297
- message: z49.optional(z49.string())
142403
+ message: z50.optional(z50.string())
142298
142404
  });
142299
- var ProgressNotificationParamsSchema = z49.object({
142405
+ var ProgressNotificationParamsSchema = z50.object({
142300
142406
  ...NotificationsParamsSchema.shape,
142301
142407
  ...ProgressSchema.shape,
142302
142408
  /**
@@ -142305,7 +142411,7 @@ var ProgressNotificationParamsSchema = z49.object({
142305
142411
  progressToken: ProgressTokenSchema
142306
142412
  });
142307
142413
  var ProgressNotificationSchema = NotificationSchema.extend({
142308
- method: z49.literal("notifications/progress"),
142414
+ method: z50.literal("notifications/progress"),
142309
142415
  params: ProgressNotificationParamsSchema
142310
142416
  });
142311
142417
  var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
@@ -142325,86 +142431,86 @@ var PaginatedResultSchema = ResultSchema.extend({
142325
142431
  */
142326
142432
  nextCursor: CursorSchema.optional()
142327
142433
  });
142328
- var TaskStatusSchema2 = z49.enum(["working", "input_required", "completed", "failed", "cancelled"]);
142329
- var TaskSchema2 = z49.object({
142330
- taskId: z49.string(),
142434
+ var TaskStatusSchema2 = z50.enum(["working", "input_required", "completed", "failed", "cancelled"]);
142435
+ var TaskSchema2 = z50.object({
142436
+ taskId: z50.string(),
142331
142437
  status: TaskStatusSchema2,
142332
142438
  /**
142333
142439
  * Time in milliseconds to keep task results available after completion.
142334
142440
  * If null, the task has unlimited lifetime until manually cleaned up.
142335
142441
  */
142336
- ttl: z49.union([z49.number(), z49.null()]),
142442
+ ttl: z50.union([z50.number(), z50.null()]),
142337
142443
  /**
142338
142444
  * ISO 8601 timestamp when the task was created.
142339
142445
  */
142340
- createdAt: z49.string(),
142446
+ createdAt: z50.string(),
142341
142447
  /**
142342
142448
  * ISO 8601 timestamp when the task was last updated.
142343
142449
  */
142344
- lastUpdatedAt: z49.string(),
142345
- pollInterval: z49.optional(z49.number()),
142450
+ lastUpdatedAt: z50.string(),
142451
+ pollInterval: z50.optional(z50.number()),
142346
142452
  /**
142347
142453
  * Optional diagnostic message for failed tasks or other status information.
142348
142454
  */
142349
- statusMessage: z49.optional(z49.string())
142455
+ statusMessage: z50.optional(z50.string())
142350
142456
  });
142351
142457
  var CreateTaskResultSchema = ResultSchema.extend({
142352
142458
  task: TaskSchema2
142353
142459
  });
142354
142460
  var TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema2);
142355
142461
  var TaskStatusNotificationSchema = NotificationSchema.extend({
142356
- method: z49.literal("notifications/tasks/status"),
142462
+ method: z50.literal("notifications/tasks/status"),
142357
142463
  params: TaskStatusNotificationParamsSchema
142358
142464
  });
142359
142465
  var GetTaskRequestSchema = RequestSchema.extend({
142360
- method: z49.literal("tasks/get"),
142466
+ method: z50.literal("tasks/get"),
142361
142467
  params: BaseRequestParamsSchema.extend({
142362
- taskId: z49.string()
142468
+ taskId: z50.string()
142363
142469
  })
142364
142470
  });
142365
142471
  var GetTaskResultSchema = ResultSchema.merge(TaskSchema2);
142366
142472
  var GetTaskPayloadRequestSchema = RequestSchema.extend({
142367
- method: z49.literal("tasks/result"),
142473
+ method: z50.literal("tasks/result"),
142368
142474
  params: BaseRequestParamsSchema.extend({
142369
- taskId: z49.string()
142475
+ taskId: z50.string()
142370
142476
  })
142371
142477
  });
142372
142478
  var GetTaskPayloadResultSchema = ResultSchema.loose();
142373
142479
  var ListTasksRequestSchema = PaginatedRequestSchema.extend({
142374
- method: z49.literal("tasks/list")
142480
+ method: z50.literal("tasks/list")
142375
142481
  });
142376
142482
  var ListTasksResultSchema = PaginatedResultSchema.extend({
142377
- tasks: z49.array(TaskSchema2)
142483
+ tasks: z50.array(TaskSchema2)
142378
142484
  });
142379
142485
  var CancelTaskRequestSchema = RequestSchema.extend({
142380
- method: z49.literal("tasks/cancel"),
142486
+ method: z50.literal("tasks/cancel"),
142381
142487
  params: BaseRequestParamsSchema.extend({
142382
- taskId: z49.string()
142488
+ taskId: z50.string()
142383
142489
  })
142384
142490
  });
142385
142491
  var CancelTaskResultSchema = ResultSchema.merge(TaskSchema2);
142386
- var ResourceContentsSchema = z49.object({
142492
+ var ResourceContentsSchema = z50.object({
142387
142493
  /**
142388
142494
  * The URI of this resource.
142389
142495
  */
142390
- uri: z49.string(),
142496
+ uri: z50.string(),
142391
142497
  /**
142392
142498
  * The MIME type of this resource, if known.
142393
142499
  */
142394
- mimeType: z49.optional(z49.string()),
142500
+ mimeType: z50.optional(z50.string()),
142395
142501
  /**
142396
142502
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142397
142503
  * for notes on _meta usage.
142398
142504
  */
142399
- _meta: z49.record(z49.string(), z49.unknown()).optional()
142505
+ _meta: z50.record(z50.string(), z50.unknown()).optional()
142400
142506
  });
142401
142507
  var TextResourceContentsSchema = ResourceContentsSchema.extend({
142402
142508
  /**
142403
142509
  * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
142404
142510
  */
142405
- text: z49.string()
142511
+ text: z50.string()
142406
142512
  });
142407
- var Base64Schema = z49.string().refine((val) => {
142513
+ var Base64Schema = z50.string().refine((val) => {
142408
142514
  try {
142409
142515
  atob(val);
142410
142516
  return true;
@@ -142418,44 +142524,44 @@ var BlobResourceContentsSchema = ResourceContentsSchema.extend({
142418
142524
  */
142419
142525
  blob: Base64Schema
142420
142526
  });
142421
- var RoleSchema = z49.enum(["user", "assistant"]);
142422
- var AnnotationsSchema = z49.object({
142527
+ var RoleSchema = z50.enum(["user", "assistant"]);
142528
+ var AnnotationsSchema = z50.object({
142423
142529
  /**
142424
142530
  * Intended audience(s) for the resource.
142425
142531
  */
142426
- audience: z49.array(RoleSchema).optional(),
142532
+ audience: z50.array(RoleSchema).optional(),
142427
142533
  /**
142428
142534
  * Importance hint for the resource, from 0 (least) to 1 (most).
142429
142535
  */
142430
- priority: z49.number().min(0).max(1).optional(),
142536
+ priority: z50.number().min(0).max(1).optional(),
142431
142537
  /**
142432
142538
  * ISO 8601 timestamp for the most recent modification.
142433
142539
  */
142434
- lastModified: z49.iso.datetime({ offset: true }).optional()
142540
+ lastModified: z50.iso.datetime({ offset: true }).optional()
142435
142541
  });
142436
- var ResourceSchema = z49.object({
142542
+ var ResourceSchema = z50.object({
142437
142543
  ...BaseMetadataSchema.shape,
142438
142544
  ...IconsSchema.shape,
142439
142545
  /**
142440
142546
  * The URI of this resource.
142441
142547
  */
142442
- uri: z49.string(),
142548
+ uri: z50.string(),
142443
142549
  /**
142444
142550
  * A description of what this resource represents.
142445
142551
  *
142446
142552
  * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
142447
142553
  */
142448
- description: z49.optional(z49.string()),
142554
+ description: z50.optional(z50.string()),
142449
142555
  /**
142450
142556
  * The MIME type of this resource, if known.
142451
142557
  */
142452
- mimeType: z49.optional(z49.string()),
142558
+ mimeType: z50.optional(z50.string()),
142453
142559
  /**
142454
142560
  * The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
142455
142561
  *
142456
142562
  * This can be used by Hosts to display file sizes and estimate context window usage.
142457
142563
  */
142458
- size: z49.optional(z49.number()),
142564
+ size: z50.optional(z50.number()),
142459
142565
  /**
142460
142566
  * Optional annotations for the client.
142461
142567
  */
@@ -142464,25 +142570,25 @@ var ResourceSchema = z49.object({
142464
142570
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142465
142571
  * for notes on _meta usage.
142466
142572
  */
142467
- _meta: z49.optional(z49.looseObject({}))
142573
+ _meta: z50.optional(z50.looseObject({}))
142468
142574
  });
142469
- var ResourceTemplateSchema = z49.object({
142575
+ var ResourceTemplateSchema = z50.object({
142470
142576
  ...BaseMetadataSchema.shape,
142471
142577
  ...IconsSchema.shape,
142472
142578
  /**
142473
142579
  * A URI template (according to RFC 6570) that can be used to construct resource URIs.
142474
142580
  */
142475
- uriTemplate: z49.string(),
142581
+ uriTemplate: z50.string(),
142476
142582
  /**
142477
142583
  * A description of what this template is for.
142478
142584
  *
142479
142585
  * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
142480
142586
  */
142481
- description: z49.optional(z49.string()),
142587
+ description: z50.optional(z50.string()),
142482
142588
  /**
142483
142589
  * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
142484
142590
  */
142485
- mimeType: z49.optional(z49.string()),
142591
+ mimeType: z50.optional(z50.string()),
142486
142592
  /**
142487
142593
  * Optional annotations for the client.
142488
142594
  */
@@ -142491,19 +142597,19 @@ var ResourceTemplateSchema = z49.object({
142491
142597
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142492
142598
  * for notes on _meta usage.
142493
142599
  */
142494
- _meta: z49.optional(z49.looseObject({}))
142600
+ _meta: z50.optional(z50.looseObject({}))
142495
142601
  });
142496
142602
  var ListResourcesRequestSchema = PaginatedRequestSchema.extend({
142497
- method: z49.literal("resources/list")
142603
+ method: z50.literal("resources/list")
142498
142604
  });
142499
142605
  var ListResourcesResultSchema = PaginatedResultSchema.extend({
142500
- resources: z49.array(ResourceSchema)
142606
+ resources: z50.array(ResourceSchema)
142501
142607
  });
142502
142608
  var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
142503
- method: z49.literal("resources/templates/list")
142609
+ method: z50.literal("resources/templates/list")
142504
142610
  });
142505
142611
  var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
142506
- resourceTemplates: z49.array(ResourceTemplateSchema)
142612
+ resourceTemplates: z50.array(ResourceTemplateSchema)
142507
142613
  });
142508
142614
  var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
142509
142615
  /**
@@ -142511,97 +142617,97 @@ var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
142511
142617
  *
142512
142618
  * @format uri
142513
142619
  */
142514
- uri: z49.string()
142620
+ uri: z50.string()
142515
142621
  });
142516
142622
  var ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
142517
142623
  var ReadResourceRequestSchema = RequestSchema.extend({
142518
- method: z49.literal("resources/read"),
142624
+ method: z50.literal("resources/read"),
142519
142625
  params: ReadResourceRequestParamsSchema
142520
142626
  });
142521
142627
  var ReadResourceResultSchema = ResultSchema.extend({
142522
- contents: z49.array(z49.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
142628
+ contents: z50.array(z50.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
142523
142629
  });
142524
142630
  var ResourceListChangedNotificationSchema = NotificationSchema.extend({
142525
- method: z49.literal("notifications/resources/list_changed"),
142631
+ method: z50.literal("notifications/resources/list_changed"),
142526
142632
  params: NotificationsParamsSchema.optional()
142527
142633
  });
142528
142634
  var SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
142529
142635
  var SubscribeRequestSchema = RequestSchema.extend({
142530
- method: z49.literal("resources/subscribe"),
142636
+ method: z50.literal("resources/subscribe"),
142531
142637
  params: SubscribeRequestParamsSchema
142532
142638
  });
142533
142639
  var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
142534
142640
  var UnsubscribeRequestSchema = RequestSchema.extend({
142535
- method: z49.literal("resources/unsubscribe"),
142641
+ method: z50.literal("resources/unsubscribe"),
142536
142642
  params: UnsubscribeRequestParamsSchema
142537
142643
  });
142538
142644
  var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
142539
142645
  /**
142540
142646
  * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
142541
142647
  */
142542
- uri: z49.string()
142648
+ uri: z50.string()
142543
142649
  });
142544
142650
  var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
142545
- method: z49.literal("notifications/resources/updated"),
142651
+ method: z50.literal("notifications/resources/updated"),
142546
142652
  params: ResourceUpdatedNotificationParamsSchema
142547
142653
  });
142548
- var PromptArgumentSchema = z49.object({
142654
+ var PromptArgumentSchema = z50.object({
142549
142655
  /**
142550
142656
  * The name of the argument.
142551
142657
  */
142552
- name: z49.string(),
142658
+ name: z50.string(),
142553
142659
  /**
142554
142660
  * A human-readable description of the argument.
142555
142661
  */
142556
- description: z49.optional(z49.string()),
142662
+ description: z50.optional(z50.string()),
142557
142663
  /**
142558
142664
  * Whether this argument must be provided.
142559
142665
  */
142560
- required: z49.optional(z49.boolean())
142666
+ required: z50.optional(z50.boolean())
142561
142667
  });
142562
- var PromptSchema = z49.object({
142668
+ var PromptSchema = z50.object({
142563
142669
  ...BaseMetadataSchema.shape,
142564
142670
  ...IconsSchema.shape,
142565
142671
  /**
142566
142672
  * An optional description of what this prompt provides
142567
142673
  */
142568
- description: z49.optional(z49.string()),
142674
+ description: z50.optional(z50.string()),
142569
142675
  /**
142570
142676
  * A list of arguments to use for templating the prompt.
142571
142677
  */
142572
- arguments: z49.optional(z49.array(PromptArgumentSchema)),
142678
+ arguments: z50.optional(z50.array(PromptArgumentSchema)),
142573
142679
  /**
142574
142680
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142575
142681
  * for notes on _meta usage.
142576
142682
  */
142577
- _meta: z49.optional(z49.looseObject({}))
142683
+ _meta: z50.optional(z50.looseObject({}))
142578
142684
  });
142579
142685
  var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
142580
- method: z49.literal("prompts/list")
142686
+ method: z50.literal("prompts/list")
142581
142687
  });
142582
142688
  var ListPromptsResultSchema = PaginatedResultSchema.extend({
142583
- prompts: z49.array(PromptSchema)
142689
+ prompts: z50.array(PromptSchema)
142584
142690
  });
142585
142691
  var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
142586
142692
  /**
142587
142693
  * The name of the prompt or prompt template.
142588
142694
  */
142589
- name: z49.string(),
142695
+ name: z50.string(),
142590
142696
  /**
142591
142697
  * Arguments to use for templating the prompt.
142592
142698
  */
142593
- arguments: z49.record(z49.string(), z49.string()).optional()
142699
+ arguments: z50.record(z50.string(), z50.string()).optional()
142594
142700
  });
142595
142701
  var GetPromptRequestSchema = RequestSchema.extend({
142596
- method: z49.literal("prompts/get"),
142702
+ method: z50.literal("prompts/get"),
142597
142703
  params: GetPromptRequestParamsSchema
142598
142704
  });
142599
- var TextContentSchema = z49.object({
142600
- type: z49.literal("text"),
142705
+ var TextContentSchema = z50.object({
142706
+ type: z50.literal("text"),
142601
142707
  /**
142602
142708
  * The text content of the message.
142603
142709
  */
142604
- text: z49.string(),
142710
+ text: z50.string(),
142605
142711
  /**
142606
142712
  * Optional annotations for the client.
142607
142713
  */
@@ -142610,10 +142716,10 @@ var TextContentSchema = z49.object({
142610
142716
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142611
142717
  * for notes on _meta usage.
142612
142718
  */
142613
- _meta: z49.record(z49.string(), z49.unknown()).optional()
142719
+ _meta: z50.record(z50.string(), z50.unknown()).optional()
142614
142720
  });
142615
- var ImageContentSchema = z49.object({
142616
- type: z49.literal("image"),
142721
+ var ImageContentSchema = z50.object({
142722
+ type: z50.literal("image"),
142617
142723
  /**
142618
142724
  * The base64-encoded image data.
142619
142725
  */
@@ -142621,7 +142727,7 @@ var ImageContentSchema = z49.object({
142621
142727
  /**
142622
142728
  * The MIME type of the image. Different providers may support different image types.
142623
142729
  */
142624
- mimeType: z49.string(),
142730
+ mimeType: z50.string(),
142625
142731
  /**
142626
142732
  * Optional annotations for the client.
142627
142733
  */
@@ -142630,10 +142736,10 @@ var ImageContentSchema = z49.object({
142630
142736
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142631
142737
  * for notes on _meta usage.
142632
142738
  */
142633
- _meta: z49.record(z49.string(), z49.unknown()).optional()
142739
+ _meta: z50.record(z50.string(), z50.unknown()).optional()
142634
142740
  });
142635
- var AudioContentSchema = z49.object({
142636
- type: z49.literal("audio"),
142741
+ var AudioContentSchema = z50.object({
142742
+ type: z50.literal("audio"),
142637
142743
  /**
142638
142744
  * The base64-encoded audio data.
142639
142745
  */
@@ -142641,7 +142747,7 @@ var AudioContentSchema = z49.object({
142641
142747
  /**
142642
142748
  * The MIME type of the audio. Different providers may support different audio types.
142643
142749
  */
142644
- mimeType: z49.string(),
142750
+ mimeType: z50.string(),
142645
142751
  /**
142646
142752
  * Optional annotations for the client.
142647
142753
  */
@@ -142650,34 +142756,34 @@ var AudioContentSchema = z49.object({
142650
142756
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142651
142757
  * for notes on _meta usage.
142652
142758
  */
142653
- _meta: z49.record(z49.string(), z49.unknown()).optional()
142759
+ _meta: z50.record(z50.string(), z50.unknown()).optional()
142654
142760
  });
142655
- var ToolUseContentSchema = z49.object({
142656
- type: z49.literal("tool_use"),
142761
+ var ToolUseContentSchema = z50.object({
142762
+ type: z50.literal("tool_use"),
142657
142763
  /**
142658
142764
  * The name of the tool to invoke.
142659
142765
  * Must match a tool name from the request's tools array.
142660
142766
  */
142661
- name: z49.string(),
142767
+ name: z50.string(),
142662
142768
  /**
142663
142769
  * Unique identifier for this tool call.
142664
142770
  * Used to correlate with ToolResultContent in subsequent messages.
142665
142771
  */
142666
- id: z49.string(),
142772
+ id: z50.string(),
142667
142773
  /**
142668
142774
  * Arguments to pass to the tool.
142669
142775
  * Must conform to the tool's inputSchema.
142670
142776
  */
142671
- input: z49.record(z49.string(), z49.unknown()),
142777
+ input: z50.record(z50.string(), z50.unknown()),
142672
142778
  /**
142673
142779
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142674
142780
  * for notes on _meta usage.
142675
142781
  */
142676
- _meta: z49.record(z49.string(), z49.unknown()).optional()
142782
+ _meta: z50.record(z50.string(), z50.unknown()).optional()
142677
142783
  });
142678
- var EmbeddedResourceSchema = z49.object({
142679
- type: z49.literal("resource"),
142680
- resource: z49.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
142784
+ var EmbeddedResourceSchema = z50.object({
142785
+ type: z50.literal("resource"),
142786
+ resource: z50.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
142681
142787
  /**
142682
142788
  * Optional annotations for the client.
142683
142789
  */
@@ -142686,19 +142792,19 @@ var EmbeddedResourceSchema = z49.object({
142686
142792
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142687
142793
  * for notes on _meta usage.
142688
142794
  */
142689
- _meta: z49.record(z49.string(), z49.unknown()).optional()
142795
+ _meta: z50.record(z50.string(), z50.unknown()).optional()
142690
142796
  });
142691
142797
  var ResourceLinkSchema = ResourceSchema.extend({
142692
- type: z49.literal("resource_link")
142798
+ type: z50.literal("resource_link")
142693
142799
  });
142694
- var ContentBlockSchema = z49.union([
142800
+ var ContentBlockSchema = z50.union([
142695
142801
  TextContentSchema,
142696
142802
  ImageContentSchema,
142697
142803
  AudioContentSchema,
142698
142804
  ResourceLinkSchema,
142699
142805
  EmbeddedResourceSchema
142700
142806
  ]);
142701
- var PromptMessageSchema = z49.object({
142807
+ var PromptMessageSchema = z50.object({
142702
142808
  role: RoleSchema,
142703
142809
  content: ContentBlockSchema
142704
142810
  });
@@ -142706,24 +142812,24 @@ var GetPromptResultSchema = ResultSchema.extend({
142706
142812
  /**
142707
142813
  * An optional description for the prompt.
142708
142814
  */
142709
- description: z49.string().optional(),
142710
- messages: z49.array(PromptMessageSchema)
142815
+ description: z50.string().optional(),
142816
+ messages: z50.array(PromptMessageSchema)
142711
142817
  });
142712
142818
  var PromptListChangedNotificationSchema = NotificationSchema.extend({
142713
- method: z49.literal("notifications/prompts/list_changed"),
142819
+ method: z50.literal("notifications/prompts/list_changed"),
142714
142820
  params: NotificationsParamsSchema.optional()
142715
142821
  });
142716
- var ToolAnnotationsSchema = z49.object({
142822
+ var ToolAnnotationsSchema = z50.object({
142717
142823
  /**
142718
142824
  * A human-readable title for the tool.
142719
142825
  */
142720
- title: z49.string().optional(),
142826
+ title: z50.string().optional(),
142721
142827
  /**
142722
142828
  * If true, the tool does not modify its environment.
142723
142829
  *
142724
142830
  * Default: false
142725
142831
  */
142726
- readOnlyHint: z49.boolean().optional(),
142832
+ readOnlyHint: z50.boolean().optional(),
142727
142833
  /**
142728
142834
  * If true, the tool may perform destructive updates to its environment.
142729
142835
  * If false, the tool performs only additive updates.
@@ -142732,7 +142838,7 @@ var ToolAnnotationsSchema = z49.object({
142732
142838
  *
142733
142839
  * Default: true
142734
142840
  */
142735
- destructiveHint: z49.boolean().optional(),
142841
+ destructiveHint: z50.boolean().optional(),
142736
142842
  /**
142737
142843
  * If true, calling the tool repeatedly with the same arguments
142738
142844
  * will have no additional effect on the its environment.
@@ -142741,7 +142847,7 @@ var ToolAnnotationsSchema = z49.object({
142741
142847
  *
142742
142848
  * Default: false
142743
142849
  */
142744
- idempotentHint: z49.boolean().optional(),
142850
+ idempotentHint: z50.boolean().optional(),
142745
142851
  /**
142746
142852
  * If true, this tool may interact with an "open world" of external
142747
142853
  * entities. If false, the tool's domain of interaction is closed.
@@ -142750,9 +142856,9 @@ var ToolAnnotationsSchema = z49.object({
142750
142856
  *
142751
142857
  * Default: true
142752
142858
  */
142753
- openWorldHint: z49.boolean().optional()
142859
+ openWorldHint: z50.boolean().optional()
142754
142860
  });
142755
- var ToolExecutionSchema = z49.object({
142861
+ var ToolExecutionSchema = z50.object({
142756
142862
  /**
142757
142863
  * Indicates the tool's preference for task-augmented execution.
142758
142864
  * - "required": Clients MUST invoke the tool as a task
@@ -142761,34 +142867,34 @@ var ToolExecutionSchema = z49.object({
142761
142867
  *
142762
142868
  * If not present, defaults to "forbidden".
142763
142869
  */
142764
- taskSupport: z49.enum(["required", "optional", "forbidden"]).optional()
142870
+ taskSupport: z50.enum(["required", "optional", "forbidden"]).optional()
142765
142871
  });
142766
- var ToolSchema = z49.object({
142872
+ var ToolSchema = z50.object({
142767
142873
  ...BaseMetadataSchema.shape,
142768
142874
  ...IconsSchema.shape,
142769
142875
  /**
142770
142876
  * A human-readable description of the tool.
142771
142877
  */
142772
- description: z49.string().optional(),
142878
+ description: z50.string().optional(),
142773
142879
  /**
142774
142880
  * A JSON Schema 2020-12 object defining the expected parameters for the tool.
142775
142881
  * Must have type: 'object' at the root level per MCP spec.
142776
142882
  */
142777
- inputSchema: z49.object({
142778
- type: z49.literal("object"),
142779
- properties: z49.record(z49.string(), AssertObjectSchema).optional(),
142780
- required: z49.array(z49.string()).optional()
142781
- }).catchall(z49.unknown()),
142883
+ inputSchema: z50.object({
142884
+ type: z50.literal("object"),
142885
+ properties: z50.record(z50.string(), AssertObjectSchema).optional(),
142886
+ required: z50.array(z50.string()).optional()
142887
+ }).catchall(z50.unknown()),
142782
142888
  /**
142783
142889
  * An optional JSON Schema 2020-12 object defining the structure of the tool's output
142784
142890
  * returned in the structuredContent field of a CallToolResult.
142785
142891
  * Must have type: 'object' at the root level per MCP spec.
142786
142892
  */
142787
- outputSchema: z49.object({
142788
- type: z49.literal("object"),
142789
- properties: z49.record(z49.string(), AssertObjectSchema).optional(),
142790
- required: z49.array(z49.string()).optional()
142791
- }).catchall(z49.unknown()).optional(),
142893
+ outputSchema: z50.object({
142894
+ type: z50.literal("object"),
142895
+ properties: z50.record(z50.string(), AssertObjectSchema).optional(),
142896
+ required: z50.array(z50.string()).optional()
142897
+ }).catchall(z50.unknown()).optional(),
142792
142898
  /**
142793
142899
  * Optional additional tool information.
142794
142900
  */
@@ -142801,13 +142907,13 @@ var ToolSchema = z49.object({
142801
142907
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142802
142908
  * for notes on _meta usage.
142803
142909
  */
142804
- _meta: z49.record(z49.string(), z49.unknown()).optional()
142910
+ _meta: z50.record(z50.string(), z50.unknown()).optional()
142805
142911
  });
142806
142912
  var ListToolsRequestSchema = PaginatedRequestSchema.extend({
142807
- method: z49.literal("tools/list")
142913
+ method: z50.literal("tools/list")
142808
142914
  });
142809
142915
  var ListToolsResultSchema = PaginatedResultSchema.extend({
142810
- tools: z49.array(ToolSchema)
142916
+ tools: z50.array(ToolSchema)
142811
142917
  });
142812
142918
  var CallToolResultSchema = ResultSchema.extend({
142813
142919
  /**
@@ -142816,13 +142922,13 @@ var CallToolResultSchema = ResultSchema.extend({
142816
142922
  * If the Tool does not define an outputSchema, this field MUST be present in the result.
142817
142923
  * For backwards compatibility, this field is always present, but it may be empty.
142818
142924
  */
142819
- content: z49.array(ContentBlockSchema).default([]),
142925
+ content: z50.array(ContentBlockSchema).default([]),
142820
142926
  /**
142821
142927
  * An object containing structured tool output.
142822
142928
  *
142823
142929
  * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
142824
142930
  */
142825
- structuredContent: z49.record(z49.string(), z49.unknown()).optional(),
142931
+ structuredContent: z50.record(z50.string(), z50.unknown()).optional(),
142826
142932
  /**
142827
142933
  * Whether the tool call ended in an error.
142828
142934
  *
@@ -142837,30 +142943,30 @@ var CallToolResultSchema = ResultSchema.extend({
142837
142943
  * server does not support tool calls, or any other exceptional conditions,
142838
142944
  * should be reported as an MCP error response.
142839
142945
  */
142840
- isError: z49.boolean().optional()
142946
+ isError: z50.boolean().optional()
142841
142947
  });
142842
142948
  var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
142843
- toolResult: z49.unknown()
142949
+ toolResult: z50.unknown()
142844
142950
  }));
142845
142951
  var CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
142846
142952
  /**
142847
142953
  * The name of the tool to call.
142848
142954
  */
142849
- name: z49.string(),
142955
+ name: z50.string(),
142850
142956
  /**
142851
142957
  * Arguments to pass to the tool.
142852
142958
  */
142853
- arguments: z49.record(z49.string(), z49.unknown()).optional()
142959
+ arguments: z50.record(z50.string(), z50.unknown()).optional()
142854
142960
  });
142855
142961
  var CallToolRequestSchema = RequestSchema.extend({
142856
- method: z49.literal("tools/call"),
142962
+ method: z50.literal("tools/call"),
142857
142963
  params: CallToolRequestParamsSchema
142858
142964
  });
142859
142965
  var ToolListChangedNotificationSchema = NotificationSchema.extend({
142860
- method: z49.literal("notifications/tools/list_changed"),
142966
+ method: z50.literal("notifications/tools/list_changed"),
142861
142967
  params: NotificationsParamsSchema.optional()
142862
142968
  });
142863
- var ListChangedOptionsBaseSchema = z49.object({
142969
+ var ListChangedOptionsBaseSchema = z50.object({
142864
142970
  /**
142865
142971
  * If true, the list will be refreshed automatically when a list changed notification is received.
142866
142972
  * The callback will be called with the updated list.
@@ -142869,7 +142975,7 @@ var ListChangedOptionsBaseSchema = z49.object({
142869
142975
  *
142870
142976
  * @default true
142871
142977
  */
142872
- autoRefresh: z49.boolean().default(true),
142978
+ autoRefresh: z50.boolean().default(true),
142873
142979
  /**
142874
142980
  * Debounce time in milliseconds for list changed notification processing.
142875
142981
  *
@@ -142878,9 +142984,9 @@ var ListChangedOptionsBaseSchema = z49.object({
142878
142984
  *
142879
142985
  * @default 300
142880
142986
  */
142881
- debounceMs: z49.number().int().nonnegative().default(300)
142987
+ debounceMs: z50.number().int().nonnegative().default(300)
142882
142988
  });
142883
- var LoggingLevelSchema = z49.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
142989
+ var LoggingLevelSchema = z50.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
142884
142990
  var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
142885
142991
  /**
142886
142992
  * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message.
@@ -142888,7 +142994,7 @@ var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
142888
142994
  level: LoggingLevelSchema
142889
142995
  });
142890
142996
  var SetLevelRequestSchema = RequestSchema.extend({
142891
- method: z49.literal("logging/setLevel"),
142997
+ method: z50.literal("logging/setLevel"),
142892
142998
  params: SetLevelRequestParamsSchema
142893
142999
  });
142894
143000
  var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
@@ -142899,80 +143005,80 @@ var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
142899
143005
  /**
142900
143006
  * An optional name of the logger issuing this message.
142901
143007
  */
142902
- logger: z49.string().optional(),
143008
+ logger: z50.string().optional(),
142903
143009
  /**
142904
143010
  * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
142905
143011
  */
142906
- data: z49.unknown()
143012
+ data: z50.unknown()
142907
143013
  });
142908
143014
  var LoggingMessageNotificationSchema = NotificationSchema.extend({
142909
- method: z49.literal("notifications/message"),
143015
+ method: z50.literal("notifications/message"),
142910
143016
  params: LoggingMessageNotificationParamsSchema
142911
143017
  });
142912
- var ModelHintSchema = z49.object({
143018
+ var ModelHintSchema = z50.object({
142913
143019
  /**
142914
143020
  * A hint for a model name.
142915
143021
  */
142916
- name: z49.string().optional()
143022
+ name: z50.string().optional()
142917
143023
  });
142918
- var ModelPreferencesSchema = z49.object({
143024
+ var ModelPreferencesSchema = z50.object({
142919
143025
  /**
142920
143026
  * Optional hints to use for model selection.
142921
143027
  */
142922
- hints: z49.array(ModelHintSchema).optional(),
143028
+ hints: z50.array(ModelHintSchema).optional(),
142923
143029
  /**
142924
143030
  * How much to prioritize cost when selecting a model.
142925
143031
  */
142926
- costPriority: z49.number().min(0).max(1).optional(),
143032
+ costPriority: z50.number().min(0).max(1).optional(),
142927
143033
  /**
142928
143034
  * How much to prioritize sampling speed (latency) when selecting a model.
142929
143035
  */
142930
- speedPriority: z49.number().min(0).max(1).optional(),
143036
+ speedPriority: z50.number().min(0).max(1).optional(),
142931
143037
  /**
142932
143038
  * How much to prioritize intelligence and capabilities when selecting a model.
142933
143039
  */
142934
- intelligencePriority: z49.number().min(0).max(1).optional()
143040
+ intelligencePriority: z50.number().min(0).max(1).optional()
142935
143041
  });
142936
- var ToolChoiceSchema = z49.object({
143042
+ var ToolChoiceSchema = z50.object({
142937
143043
  /**
142938
143044
  * Controls when tools are used:
142939
143045
  * - "auto": Model decides whether to use tools (default)
142940
143046
  * - "required": Model MUST use at least one tool before completing
142941
143047
  * - "none": Model MUST NOT use any tools
142942
143048
  */
142943
- mode: z49.enum(["auto", "required", "none"]).optional()
143049
+ mode: z50.enum(["auto", "required", "none"]).optional()
142944
143050
  });
142945
- var ToolResultContentSchema = z49.object({
142946
- type: z49.literal("tool_result"),
142947
- toolUseId: z49.string().describe("The unique identifier for the corresponding tool call."),
142948
- content: z49.array(ContentBlockSchema).default([]),
142949
- structuredContent: z49.object({}).loose().optional(),
142950
- isError: z49.boolean().optional(),
143051
+ var ToolResultContentSchema = z50.object({
143052
+ type: z50.literal("tool_result"),
143053
+ toolUseId: z50.string().describe("The unique identifier for the corresponding tool call."),
143054
+ content: z50.array(ContentBlockSchema).default([]),
143055
+ structuredContent: z50.object({}).loose().optional(),
143056
+ isError: z50.boolean().optional(),
142951
143057
  /**
142952
143058
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142953
143059
  * for notes on _meta usage.
142954
143060
  */
142955
- _meta: z49.record(z49.string(), z49.unknown()).optional()
143061
+ _meta: z50.record(z50.string(), z50.unknown()).optional()
142956
143062
  });
142957
- var SamplingContentSchema = z49.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
142958
- var SamplingMessageContentBlockSchema = z49.discriminatedUnion("type", [
143063
+ var SamplingContentSchema = z50.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
143064
+ var SamplingMessageContentBlockSchema = z50.discriminatedUnion("type", [
142959
143065
  TextContentSchema,
142960
143066
  ImageContentSchema,
142961
143067
  AudioContentSchema,
142962
143068
  ToolUseContentSchema,
142963
143069
  ToolResultContentSchema
142964
143070
  ]);
142965
- var SamplingMessageSchema = z49.object({
143071
+ var SamplingMessageSchema = z50.object({
142966
143072
  role: RoleSchema,
142967
- content: z49.union([SamplingMessageContentBlockSchema, z49.array(SamplingMessageContentBlockSchema)]),
143073
+ content: z50.union([SamplingMessageContentBlockSchema, z50.array(SamplingMessageContentBlockSchema)]),
142968
143074
  /**
142969
143075
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
142970
143076
  * for notes on _meta usage.
142971
143077
  */
142972
- _meta: z49.record(z49.string(), z49.unknown()).optional()
143078
+ _meta: z50.record(z50.string(), z50.unknown()).optional()
142973
143079
  });
142974
143080
  var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
142975
- messages: z49.array(SamplingMessageSchema),
143081
+ messages: z50.array(SamplingMessageSchema),
142976
143082
  /**
142977
143083
  * The server's preferences for which model to select. The client MAY modify or omit this request.
142978
143084
  */
@@ -142980,7 +143086,7 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
142980
143086
  /**
142981
143087
  * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
142982
143088
  */
142983
- systemPrompt: z49.string().optional(),
143089
+ systemPrompt: z50.string().optional(),
142984
143090
  /**
142985
143091
  * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt.
142986
143092
  * The client MAY ignore this request.
@@ -142988,15 +143094,15 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
142988
143094
  * Default is "none". Values "thisServer" and "allServers" are soft-deprecated. Servers SHOULD only use these values if the client
142989
143095
  * declares ClientCapabilities.sampling.context. These values may be removed in future spec releases.
142990
143096
  */
142991
- includeContext: z49.enum(["none", "thisServer", "allServers"]).optional(),
142992
- temperature: z49.number().optional(),
143097
+ includeContext: z50.enum(["none", "thisServer", "allServers"]).optional(),
143098
+ temperature: z50.number().optional(),
142993
143099
  /**
142994
143100
  * The requested maximum number of tokens to sample (to prevent runaway completions).
142995
143101
  *
142996
143102
  * The client MAY choose to sample fewer tokens than the requested maximum.
142997
143103
  */
142998
- maxTokens: z49.number().int(),
142999
- stopSequences: z49.array(z49.string()).optional(),
143104
+ maxTokens: z50.number().int(),
143105
+ stopSequences: z50.array(z50.string()).optional(),
143000
143106
  /**
143001
143107
  * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
143002
143108
  */
@@ -143005,7 +143111,7 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
143005
143111
  * Tools that the model may use during generation.
143006
143112
  * The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
143007
143113
  */
143008
- tools: z49.array(ToolSchema).optional(),
143114
+ tools: z50.array(ToolSchema).optional(),
143009
143115
  /**
143010
143116
  * Controls how the model uses tools.
143011
143117
  * The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
@@ -143014,14 +143120,14 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
143014
143120
  toolChoice: ToolChoiceSchema.optional()
143015
143121
  });
143016
143122
  var CreateMessageRequestSchema = RequestSchema.extend({
143017
- method: z49.literal("sampling/createMessage"),
143123
+ method: z50.literal("sampling/createMessage"),
143018
143124
  params: CreateMessageRequestParamsSchema
143019
143125
  });
143020
143126
  var CreateMessageResultSchema = ResultSchema.extend({
143021
143127
  /**
143022
143128
  * The name of the model that generated the message.
143023
143129
  */
143024
- model: z49.string(),
143130
+ model: z50.string(),
143025
143131
  /**
143026
143132
  * The reason why sampling stopped, if known.
143027
143133
  *
@@ -143032,7 +143138,7 @@ var CreateMessageResultSchema = ResultSchema.extend({
143032
143138
  *
143033
143139
  * This field is an open string to allow for provider-specific stop reasons.
143034
143140
  */
143035
- stopReason: z49.optional(z49.enum(["endTurn", "stopSequence", "maxTokens"]).or(z49.string())),
143141
+ stopReason: z50.optional(z50.enum(["endTurn", "stopSequence", "maxTokens"]).or(z50.string())),
143036
143142
  role: RoleSchema,
143037
143143
  /**
143038
143144
  * Response content. Single content block (text, image, or audio).
@@ -143043,7 +143149,7 @@ var CreateMessageResultWithToolsSchema = ResultSchema.extend({
143043
143149
  /**
143044
143150
  * The name of the model that generated the message.
143045
143151
  */
143046
- model: z49.string(),
143152
+ model: z50.string(),
143047
143153
  /**
143048
143154
  * The reason why sampling stopped, if known.
143049
143155
  *
@@ -143055,144 +143161,144 @@ var CreateMessageResultWithToolsSchema = ResultSchema.extend({
143055
143161
  *
143056
143162
  * This field is an open string to allow for provider-specific stop reasons.
143057
143163
  */
143058
- stopReason: z49.optional(z49.enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(z49.string())),
143164
+ stopReason: z50.optional(z50.enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(z50.string())),
143059
143165
  role: RoleSchema,
143060
143166
  /**
143061
143167
  * Response content. May be a single block or array. May include ToolUseContent if stopReason is "toolUse".
143062
143168
  */
143063
- content: z49.union([SamplingMessageContentBlockSchema, z49.array(SamplingMessageContentBlockSchema)])
143064
- });
143065
- var BooleanSchemaSchema = z49.object({
143066
- type: z49.literal("boolean"),
143067
- title: z49.string().optional(),
143068
- description: z49.string().optional(),
143069
- default: z49.boolean().optional()
143070
- });
143071
- var StringSchemaSchema = z49.object({
143072
- type: z49.literal("string"),
143073
- title: z49.string().optional(),
143074
- description: z49.string().optional(),
143075
- minLength: z49.number().optional(),
143076
- maxLength: z49.number().optional(),
143077
- format: z49.enum(["email", "uri", "date", "date-time"]).optional(),
143078
- default: z49.string().optional()
143079
- });
143080
- var NumberSchemaSchema = z49.object({
143081
- type: z49.enum(["number", "integer"]),
143082
- title: z49.string().optional(),
143083
- description: z49.string().optional(),
143084
- minimum: z49.number().optional(),
143085
- maximum: z49.number().optional(),
143086
- default: z49.number().optional()
143087
- });
143088
- var UntitledSingleSelectEnumSchemaSchema = z49.object({
143089
- type: z49.literal("string"),
143090
- title: z49.string().optional(),
143091
- description: z49.string().optional(),
143092
- enum: z49.array(z49.string()),
143093
- default: z49.string().optional()
143094
- });
143095
- var TitledSingleSelectEnumSchemaSchema = z49.object({
143096
- type: z49.literal("string"),
143097
- title: z49.string().optional(),
143098
- description: z49.string().optional(),
143099
- oneOf: z49.array(z49.object({
143100
- const: z49.string(),
143101
- title: z49.string()
143169
+ content: z50.union([SamplingMessageContentBlockSchema, z50.array(SamplingMessageContentBlockSchema)])
143170
+ });
143171
+ var BooleanSchemaSchema = z50.object({
143172
+ type: z50.literal("boolean"),
143173
+ title: z50.string().optional(),
143174
+ description: z50.string().optional(),
143175
+ default: z50.boolean().optional()
143176
+ });
143177
+ var StringSchemaSchema = z50.object({
143178
+ type: z50.literal("string"),
143179
+ title: z50.string().optional(),
143180
+ description: z50.string().optional(),
143181
+ minLength: z50.number().optional(),
143182
+ maxLength: z50.number().optional(),
143183
+ format: z50.enum(["email", "uri", "date", "date-time"]).optional(),
143184
+ default: z50.string().optional()
143185
+ });
143186
+ var NumberSchemaSchema = z50.object({
143187
+ type: z50.enum(["number", "integer"]),
143188
+ title: z50.string().optional(),
143189
+ description: z50.string().optional(),
143190
+ minimum: z50.number().optional(),
143191
+ maximum: z50.number().optional(),
143192
+ default: z50.number().optional()
143193
+ });
143194
+ var UntitledSingleSelectEnumSchemaSchema = z50.object({
143195
+ type: z50.literal("string"),
143196
+ title: z50.string().optional(),
143197
+ description: z50.string().optional(),
143198
+ enum: z50.array(z50.string()),
143199
+ default: z50.string().optional()
143200
+ });
143201
+ var TitledSingleSelectEnumSchemaSchema = z50.object({
143202
+ type: z50.literal("string"),
143203
+ title: z50.string().optional(),
143204
+ description: z50.string().optional(),
143205
+ oneOf: z50.array(z50.object({
143206
+ const: z50.string(),
143207
+ title: z50.string()
143102
143208
  })),
143103
- default: z49.string().optional()
143104
- });
143105
- var LegacyTitledEnumSchemaSchema = z49.object({
143106
- type: z49.literal("string"),
143107
- title: z49.string().optional(),
143108
- description: z49.string().optional(),
143109
- enum: z49.array(z49.string()),
143110
- enumNames: z49.array(z49.string()).optional(),
143111
- default: z49.string().optional()
143112
- });
143113
- var SingleSelectEnumSchemaSchema = z49.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
143114
- var UntitledMultiSelectEnumSchemaSchema = z49.object({
143115
- type: z49.literal("array"),
143116
- title: z49.string().optional(),
143117
- description: z49.string().optional(),
143118
- minItems: z49.number().optional(),
143119
- maxItems: z49.number().optional(),
143120
- items: z49.object({
143121
- type: z49.literal("string"),
143122
- enum: z49.array(z49.string())
143209
+ default: z50.string().optional()
143210
+ });
143211
+ var LegacyTitledEnumSchemaSchema = z50.object({
143212
+ type: z50.literal("string"),
143213
+ title: z50.string().optional(),
143214
+ description: z50.string().optional(),
143215
+ enum: z50.array(z50.string()),
143216
+ enumNames: z50.array(z50.string()).optional(),
143217
+ default: z50.string().optional()
143218
+ });
143219
+ var SingleSelectEnumSchemaSchema = z50.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
143220
+ var UntitledMultiSelectEnumSchemaSchema = z50.object({
143221
+ type: z50.literal("array"),
143222
+ title: z50.string().optional(),
143223
+ description: z50.string().optional(),
143224
+ minItems: z50.number().optional(),
143225
+ maxItems: z50.number().optional(),
143226
+ items: z50.object({
143227
+ type: z50.literal("string"),
143228
+ enum: z50.array(z50.string())
143123
143229
  }),
143124
- default: z49.array(z49.string()).optional()
143125
- });
143126
- var TitledMultiSelectEnumSchemaSchema = z49.object({
143127
- type: z49.literal("array"),
143128
- title: z49.string().optional(),
143129
- description: z49.string().optional(),
143130
- minItems: z49.number().optional(),
143131
- maxItems: z49.number().optional(),
143132
- items: z49.object({
143133
- anyOf: z49.array(z49.object({
143134
- const: z49.string(),
143135
- title: z49.string()
143230
+ default: z50.array(z50.string()).optional()
143231
+ });
143232
+ var TitledMultiSelectEnumSchemaSchema = z50.object({
143233
+ type: z50.literal("array"),
143234
+ title: z50.string().optional(),
143235
+ description: z50.string().optional(),
143236
+ minItems: z50.number().optional(),
143237
+ maxItems: z50.number().optional(),
143238
+ items: z50.object({
143239
+ anyOf: z50.array(z50.object({
143240
+ const: z50.string(),
143241
+ title: z50.string()
143136
143242
  }))
143137
143243
  }),
143138
- default: z49.array(z49.string()).optional()
143244
+ default: z50.array(z50.string()).optional()
143139
143245
  });
143140
- var MultiSelectEnumSchemaSchema = z49.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
143141
- var EnumSchemaSchema = z49.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
143142
- var PrimitiveSchemaDefinitionSchema = z49.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
143246
+ var MultiSelectEnumSchemaSchema = z50.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
143247
+ var EnumSchemaSchema = z50.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
143248
+ var PrimitiveSchemaDefinitionSchema = z50.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
143143
143249
  var ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
143144
143250
  /**
143145
143251
  * The elicitation mode.
143146
143252
  *
143147
143253
  * Optional for backward compatibility. Clients MUST treat missing mode as "form".
143148
143254
  */
143149
- mode: z49.literal("form").optional(),
143255
+ mode: z50.literal("form").optional(),
143150
143256
  /**
143151
143257
  * The message to present to the user describing what information is being requested.
143152
143258
  */
143153
- message: z49.string(),
143259
+ message: z50.string(),
143154
143260
  /**
143155
143261
  * A restricted subset of JSON Schema.
143156
143262
  * Only top-level properties are allowed, without nesting.
143157
143263
  */
143158
- requestedSchema: z49.object({
143159
- type: z49.literal("object"),
143160
- properties: z49.record(z49.string(), PrimitiveSchemaDefinitionSchema),
143161
- required: z49.array(z49.string()).optional()
143264
+ requestedSchema: z50.object({
143265
+ type: z50.literal("object"),
143266
+ properties: z50.record(z50.string(), PrimitiveSchemaDefinitionSchema),
143267
+ required: z50.array(z50.string()).optional()
143162
143268
  })
143163
143269
  });
143164
143270
  var ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
143165
143271
  /**
143166
143272
  * The elicitation mode.
143167
143273
  */
143168
- mode: z49.literal("url"),
143274
+ mode: z50.literal("url"),
143169
143275
  /**
143170
143276
  * The message to present to the user explaining why the interaction is needed.
143171
143277
  */
143172
- message: z49.string(),
143278
+ message: z50.string(),
143173
143279
  /**
143174
143280
  * The ID of the elicitation, which must be unique within the context of the server.
143175
143281
  * The client MUST treat this ID as an opaque value.
143176
143282
  */
143177
- elicitationId: z49.string(),
143283
+ elicitationId: z50.string(),
143178
143284
  /**
143179
143285
  * The URL that the user should navigate to.
143180
143286
  */
143181
- url: z49.string().url()
143287
+ url: z50.string().url()
143182
143288
  });
143183
- var ElicitRequestParamsSchema = z49.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
143289
+ var ElicitRequestParamsSchema = z50.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
143184
143290
  var ElicitRequestSchema = RequestSchema.extend({
143185
- method: z49.literal("elicitation/create"),
143291
+ method: z50.literal("elicitation/create"),
143186
143292
  params: ElicitRequestParamsSchema
143187
143293
  });
143188
143294
  var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
143189
143295
  /**
143190
143296
  * The ID of the elicitation that completed.
143191
143297
  */
143192
- elicitationId: z49.string()
143298
+ elicitationId: z50.string()
143193
143299
  });
143194
143300
  var ElicitationCompleteNotificationSchema = NotificationSchema.extend({
143195
- method: z49.literal("notifications/elicitation/complete"),
143301
+ method: z50.literal("notifications/elicitation/complete"),
143196
143302
  params: ElicitationCompleteNotificationParamsSchema
143197
143303
  });
143198
143304
  var ElicitResultSchema = ResultSchema.extend({
@@ -143202,53 +143308,53 @@ var ElicitResultSchema = ResultSchema.extend({
143202
143308
  * - "decline": User explicitly decline the action
143203
143309
  * - "cancel": User dismissed without making an explicit choice
143204
143310
  */
143205
- action: z49.enum(["accept", "decline", "cancel"]),
143311
+ action: z50.enum(["accept", "decline", "cancel"]),
143206
143312
  /**
143207
143313
  * The submitted form data, only present when action is "accept".
143208
143314
  * Contains values matching the requested schema.
143209
143315
  * Per MCP spec, content is "typically omitted" for decline/cancel actions.
143210
143316
  * We normalize null to undefined for leniency while maintaining type compatibility.
143211
143317
  */
143212
- content: z49.preprocess((val) => val === null ? void 0 : val, z49.record(z49.string(), z49.union([z49.string(), z49.number(), z49.boolean(), z49.array(z49.string())])).optional())
143318
+ content: z50.preprocess((val) => val === null ? void 0 : val, z50.record(z50.string(), z50.union([z50.string(), z50.number(), z50.boolean(), z50.array(z50.string())])).optional())
143213
143319
  });
143214
- var ResourceTemplateReferenceSchema = z49.object({
143215
- type: z49.literal("ref/resource"),
143320
+ var ResourceTemplateReferenceSchema = z50.object({
143321
+ type: z50.literal("ref/resource"),
143216
143322
  /**
143217
143323
  * The URI or URI template of the resource.
143218
143324
  */
143219
- uri: z49.string()
143325
+ uri: z50.string()
143220
143326
  });
143221
- var PromptReferenceSchema = z49.object({
143222
- type: z49.literal("ref/prompt"),
143327
+ var PromptReferenceSchema = z50.object({
143328
+ type: z50.literal("ref/prompt"),
143223
143329
  /**
143224
143330
  * The name of the prompt or prompt template
143225
143331
  */
143226
- name: z49.string()
143332
+ name: z50.string()
143227
143333
  });
143228
143334
  var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
143229
- ref: z49.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
143335
+ ref: z50.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
143230
143336
  /**
143231
143337
  * The argument's information
143232
143338
  */
143233
- argument: z49.object({
143339
+ argument: z50.object({
143234
143340
  /**
143235
143341
  * The name of the argument
143236
143342
  */
143237
- name: z49.string(),
143343
+ name: z50.string(),
143238
143344
  /**
143239
143345
  * The value of the argument to use for completion matching.
143240
143346
  */
143241
- value: z49.string()
143347
+ value: z50.string()
143242
143348
  }),
143243
- context: z49.object({
143349
+ context: z50.object({
143244
143350
  /**
143245
143351
  * Previously-resolved variables in a URI template or prompt.
143246
143352
  */
143247
- arguments: z49.record(z49.string(), z49.string()).optional()
143353
+ arguments: z50.record(z50.string(), z50.string()).optional()
143248
143354
  }).optional()
143249
143355
  });
143250
143356
  var CompleteRequestSchema = RequestSchema.extend({
143251
- method: z49.literal("completion/complete"),
143357
+ method: z50.literal("completion/complete"),
143252
143358
  params: CompleteRequestParamsSchema
143253
143359
  });
143254
143360
  function assertCompleteRequestPrompt(request) {
@@ -143262,48 +143368,48 @@ function assertCompleteRequestResourceTemplate(request) {
143262
143368
  }
143263
143369
  }
143264
143370
  var CompleteResultSchema = ResultSchema.extend({
143265
- completion: z49.looseObject({
143371
+ completion: z50.looseObject({
143266
143372
  /**
143267
143373
  * An array of completion values. Must not exceed 100 items.
143268
143374
  */
143269
- values: z49.array(z49.string()).max(100),
143375
+ values: z50.array(z50.string()).max(100),
143270
143376
  /**
143271
143377
  * The total number of completion options available. This can exceed the number of values actually sent in the response.
143272
143378
  */
143273
- total: z49.optional(z49.number().int()),
143379
+ total: z50.optional(z50.number().int()),
143274
143380
  /**
143275
143381
  * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
143276
143382
  */
143277
- hasMore: z49.optional(z49.boolean())
143383
+ hasMore: z50.optional(z50.boolean())
143278
143384
  })
143279
143385
  });
143280
- var RootSchema = z49.object({
143386
+ var RootSchema = z50.object({
143281
143387
  /**
143282
143388
  * The URI identifying the root. This *must* start with file:// for now.
143283
143389
  */
143284
- uri: z49.string().startsWith("file://"),
143390
+ uri: z50.string().startsWith("file://"),
143285
143391
  /**
143286
143392
  * An optional name for the root.
143287
143393
  */
143288
- name: z49.string().optional(),
143394
+ name: z50.string().optional(),
143289
143395
  /**
143290
143396
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
143291
143397
  * for notes on _meta usage.
143292
143398
  */
143293
- _meta: z49.record(z49.string(), z49.unknown()).optional()
143399
+ _meta: z50.record(z50.string(), z50.unknown()).optional()
143294
143400
  });
143295
143401
  var ListRootsRequestSchema = RequestSchema.extend({
143296
- method: z49.literal("roots/list"),
143402
+ method: z50.literal("roots/list"),
143297
143403
  params: BaseRequestParamsSchema.optional()
143298
143404
  });
143299
143405
  var ListRootsResultSchema = ResultSchema.extend({
143300
- roots: z49.array(RootSchema)
143406
+ roots: z50.array(RootSchema)
143301
143407
  });
143302
143408
  var RootsListChangedNotificationSchema = NotificationSchema.extend({
143303
- method: z49.literal("notifications/roots/list_changed"),
143409
+ method: z50.literal("notifications/roots/list_changed"),
143304
143410
  params: NotificationsParamsSchema.optional()
143305
143411
  });
143306
- var ClientRequestSchema = z49.union([
143412
+ var ClientRequestSchema = z50.union([
143307
143413
  PingRequestSchema,
143308
143414
  InitializeRequestSchema,
143309
143415
  CompleteRequestSchema,
@@ -143322,14 +143428,14 @@ var ClientRequestSchema = z49.union([
143322
143428
  ListTasksRequestSchema,
143323
143429
  CancelTaskRequestSchema
143324
143430
  ]);
143325
- var ClientNotificationSchema = z49.union([
143431
+ var ClientNotificationSchema = z50.union([
143326
143432
  CancelledNotificationSchema,
143327
143433
  ProgressNotificationSchema,
143328
143434
  InitializedNotificationSchema,
143329
143435
  RootsListChangedNotificationSchema,
143330
143436
  TaskStatusNotificationSchema
143331
143437
  ]);
143332
- var ClientResultSchema = z49.union([
143438
+ var ClientResultSchema = z50.union([
143333
143439
  EmptyResultSchema,
143334
143440
  CreateMessageResultSchema,
143335
143441
  CreateMessageResultWithToolsSchema,
@@ -143339,7 +143445,7 @@ var ClientResultSchema = z49.union([
143339
143445
  ListTasksResultSchema,
143340
143446
  CreateTaskResultSchema
143341
143447
  ]);
143342
- var ServerRequestSchema = z49.union([
143448
+ var ServerRequestSchema = z50.union([
143343
143449
  PingRequestSchema,
143344
143450
  CreateMessageRequestSchema,
143345
143451
  ElicitRequestSchema,
@@ -143349,7 +143455,7 @@ var ServerRequestSchema = z49.union([
143349
143455
  ListTasksRequestSchema,
143350
143456
  CancelTaskRequestSchema
143351
143457
  ]);
143352
- var ServerNotificationSchema = z49.union([
143458
+ var ServerNotificationSchema = z50.union([
143353
143459
  CancelledNotificationSchema,
143354
143460
  ProgressNotificationSchema,
143355
143461
  LoggingMessageNotificationSchema,
@@ -143360,7 +143466,7 @@ var ServerNotificationSchema = z49.union([
143360
143466
  TaskStatusNotificationSchema,
143361
143467
  ElicitationCompleteNotificationSchema
143362
143468
  ]);
143363
- var ServerResultSchema = z49.union([
143469
+ var ServerResultSchema = z50.union([
143364
143470
  EmptyResultSchema,
143365
143471
  InitializeResultSchema,
143366
143472
  CompleteResultSchema,
@@ -147278,19 +147384,19 @@ var EMPTY_COMPLETION_RESULT = {
147278
147384
  };
147279
147385
 
147280
147386
  // ../../apps/server/src/services/core/mcp-server.ts
147281
- import { z as z57 } from "zod";
147387
+ import { z as z58 } from "zod";
147282
147388
 
147283
147389
  // ../../apps/server/src/services/marketplace-mcp/tool-search.ts
147284
- import { z as z50 } from "zod";
147390
+ import { z as z51 } from "zod";
147285
147391
  var SearchInputSchema = {
147286
- query: z50.string().optional().describe("Free-text search across name/description/tags"),
147287
- type: z50.enum(["agent", "plugin", "skill-pack", "adapter"]).optional(),
147288
- category: z50.string().optional(),
147289
- tags: z50.array(z50.string()).optional(),
147290
- marketplace: z50.string().optional().describe("Restrict to a specific marketplace source"),
147291
- limit: z50.number().int().min(1).max(100).default(20)
147392
+ query: z51.string().optional().describe("Free-text search across name/description/tags"),
147393
+ type: z51.enum(["agent", "plugin", "skill-pack", "adapter"]).optional(),
147394
+ category: z51.string().optional(),
147395
+ tags: z51.array(z51.string()).optional(),
147396
+ marketplace: z51.string().optional().describe("Restrict to a specific marketplace source"),
147397
+ limit: z51.number().int().min(1).max(100).default(20)
147292
147398
  };
147293
- var SearchInputZodSchema = z50.object(SearchInputSchema);
147399
+ var SearchInputZodSchema = z51.object(SearchInputSchema);
147294
147400
  function createSearchHandler(deps) {
147295
147401
  return async (args) => {
147296
147402
  const aggregated = await collectEntries(deps, args.marketplace);
@@ -147362,10 +147468,10 @@ function applyFilters(entries, args) {
147362
147468
  // ../../apps/server/src/services/marketplace-mcp/tool-get.ts
147363
147469
  import { readFile as readFile23 } from "node:fs/promises";
147364
147470
  import path66 from "node:path";
147365
- import { z as z51 } from "zod";
147471
+ import { z as z52 } from "zod";
147366
147472
  var GetInputSchema = {
147367
- name: z51.string().describe("Package name"),
147368
- marketplace: z51.string().optional().describe("Specific marketplace to look up the package in")
147473
+ name: z52.string().describe("Package name"),
147474
+ marketplace: z52.string().optional().describe("Specific marketplace to look up the package in")
147369
147475
  };
147370
147476
  function createGetHandler(deps) {
147371
147477
  return async (args) => {
@@ -147500,14 +147606,14 @@ function createListMarketplacesHandler(deps) {
147500
147606
 
147501
147607
  // ../../apps/server/src/services/marketplace-mcp/tool-list-installed.ts
147502
147608
  init_installed_scanner();
147503
- import { z as z52 } from "zod";
147609
+ import { z as z53 } from "zod";
147504
147610
  var ListInstalledInputSchema = {
147505
147611
  /**
147506
147612
  * Optional package type filter. When supplied, only installed packages
147507
147613
  * whose `type` matches are returned. When omitted, every installed package
147508
147614
  * is returned.
147509
147615
  */
147510
- type: z52.enum(["agent", "plugin", "skill-pack", "adapter"]).optional()
147616
+ type: z53.enum(["agent", "plugin", "skill-pack", "adapter"]).optional()
147511
147617
  };
147512
147618
  function createListInstalledHandler(deps) {
147513
147619
  return async (args) => {
@@ -147525,7 +147631,7 @@ function createListInstalledHandler(deps) {
147525
147631
  }
147526
147632
 
147527
147633
  // ../../apps/server/src/services/marketplace-mcp/tool-recommend.ts
147528
- import { z as z53 } from "zod";
147634
+ import { z as z54 } from "zod";
147529
147635
 
147530
147636
  // ../../apps/server/src/services/marketplace-mcp/recommend-engine.ts
147531
147637
  var STOPWORDS = /* @__PURE__ */ new Set([
@@ -147607,9 +147713,9 @@ function scoreEntry(entry, marketplace, tokens) {
147607
147713
 
147608
147714
  // ../../apps/server/src/services/marketplace-mcp/tool-recommend.ts
147609
147715
  var RecommendInputSchema = {
147610
- context: z53.string().min(1).max(500).describe("Free-text description of the user's need"),
147611
- type: z53.enum(["agent", "plugin", "skill-pack", "adapter"]).optional(),
147612
- limit: z53.number().int().min(1).max(20).default(5)
147716
+ context: z54.string().min(1).max(500).describe("Free-text description of the user's need"),
147717
+ type: z54.enum(["agent", "plugin", "skill-pack", "adapter"]).optional(),
147718
+ limit: z54.number().int().min(1).max(20).default(5)
147613
147719
  };
147614
147720
  var DEFAULT_PACKAGE_TYPE = "plugin";
147615
147721
  function createRecommendHandler(deps) {
@@ -147658,12 +147764,12 @@ function createRecommendHandler(deps) {
147658
147764
  }
147659
147765
 
147660
147766
  // ../../apps/server/src/services/marketplace-mcp/tool-install.ts
147661
- import { z as z54 } from "zod";
147767
+ import { z as z55 } from "zod";
147662
147768
  var InstallInputSchema = {
147663
- name: z54.string().describe("Package name to install"),
147664
- marketplace: z54.string().optional().describe("Specific marketplace to install from (defaults to first match across enabled)"),
147665
- projectPath: z54.string().optional().describe("Project-local install path (defaults to global)"),
147666
- confirmationToken: z54.string().optional().describe(
147769
+ name: z55.string().describe("Package name to install"),
147770
+ marketplace: z55.string().optional().describe("Specific marketplace to install from (defaults to first match across enabled)"),
147771
+ projectPath: z55.string().optional().describe("Project-local install path (defaults to global)"),
147772
+ confirmationToken: z55.string().optional().describe(
147667
147773
  "Token returned from a previous call where status was requires_confirmation. Re-call with this token after the user has approved out-of-band."
147668
147774
  )
147669
147775
  };
@@ -147750,12 +147856,12 @@ function createInstallHandler(deps) {
147750
147856
  }
147751
147857
 
147752
147858
  // ../../apps/server/src/services/marketplace-mcp/tool-uninstall.ts
147753
- import { z as z55 } from "zod";
147859
+ import { z as z56 } from "zod";
147754
147860
  var UninstallInputSchema = {
147755
- name: z55.string().describe("Package name to uninstall"),
147756
- purge: z55.boolean().optional().describe("Also remove .dork/data/ and .dork/secrets.json (default false)"),
147757
- projectPath: z55.string().optional().describe("Project-local uninstall path (defaults to global)"),
147758
- confirmationToken: z55.string().optional().describe(
147861
+ name: z56.string().describe("Package name to uninstall"),
147862
+ purge: z56.boolean().optional().describe("Also remove .dork/data/ and .dork/secrets.json (default false)"),
147863
+ projectPath: z56.string().optional().describe("Project-local uninstall path (defaults to global)"),
147864
+ confirmationToken: z56.string().optional().describe(
147759
147865
  "Token returned from a previous call where status was requires_confirmation. Re-call with this token after the user has approved out-of-band."
147760
147866
  )
147761
147867
  };
@@ -147822,7 +147928,7 @@ function createUninstallHandler(deps) {
147822
147928
  // ../../apps/server/src/services/marketplace-mcp/tool-create-package.ts
147823
147929
  import path68 from "node:path";
147824
147930
  import { readFile as readFile24, writeFile as writeFile13 } from "node:fs/promises";
147825
- import { z as z56 } from "zod";
147931
+ import { z as z57 } from "zod";
147826
147932
 
147827
147933
  // ../marketplace/dist/scaffolder.js
147828
147934
  init_constants();
@@ -147913,11 +148019,11 @@ function starterDirsForType(type) {
147913
148019
 
147914
148020
  // ../../apps/server/src/services/marketplace-mcp/tool-create-package.ts
147915
148021
  var CreatePackageInputSchema = {
147916
- name: z56.string().regex(/^[a-z][a-z0-9-]*$/, "Package name must be kebab-case and start with a lowercase letter").describe("Package name (kebab-case, must start with a letter)"),
147917
- type: z56.enum(["agent", "plugin", "skill-pack", "adapter"]).describe("Package type \u2014 determines the starter file layout"),
147918
- description: z56.string().min(1).max(1024).describe("Human-readable description written into the manifest"),
147919
- author: z56.string().optional().describe("Optional author name written into the manifest"),
147920
- confirmationToken: z56.string().optional().describe(
148022
+ name: z57.string().regex(/^[a-z][a-z0-9-]*$/, "Package name must be kebab-case and start with a lowercase letter").describe("Package name (kebab-case, must start with a letter)"),
148023
+ type: z57.enum(["agent", "plugin", "skill-pack", "adapter"]).describe("Package type \u2014 determines the starter file layout"),
148024
+ description: z57.string().min(1).max(1024).describe("Human-readable description written into the manifest"),
148025
+ author: z57.string().optional().describe("Optional author name written into the manifest"),
148026
+ confirmationToken: z57.string().optional().describe(
147921
148027
  "Token returned by an earlier call when the request was pending \u2014 re-call with this token after the user approves"
147922
148028
  )
147923
148029
  };
@@ -148079,13 +148185,13 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148079
148185
  "get_server_info",
148080
148186
  "Returns DorkOS server metadata including version, port, and optionally uptime.",
148081
148187
  {
148082
- include_uptime: z57.boolean().optional().describe("Include server uptime in seconds")
148188
+ include_uptime: z58.boolean().optional().describe("Include server uptime in seconds")
148083
148189
  },
148084
148190
  handleGetServerInfo
148085
148191
  );
148086
148192
  const agentScopeSchema2 = {
148087
- agent_id: z57.string().optional().describe("Agent ULID to scope the query to"),
148088
- cwd: z57.string().optional().describe("Working directory path to scope the query to")
148193
+ agent_id: z58.string().optional().describe("Agent ULID to scope the query to"),
148194
+ cwd: z58.string().optional().describe("Working directory path to scope the query to")
148089
148195
  };
148090
148196
  server.tool(
148091
148197
  "get_session_count",
@@ -148103,7 +148209,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148103
148209
  "tasks_list",
148104
148210
  "List all Tasks scheduled jobs. Returns schedule definitions with status and configuration.",
148105
148211
  {
148106
- enabled_only: z57.boolean().optional().describe("Only return enabled schedules")
148212
+ enabled_only: z58.boolean().optional().describe("Only return enabled schedules")
148107
148213
  },
148108
148214
  createListSchedulesHandler(deps)
148109
148215
  );
@@ -148111,13 +148217,13 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148111
148217
  "tasks_create",
148112
148218
  "Create a new Tasks scheduled job. The schedule will be created with pending_approval status and must be approved by the user before it can run.",
148113
148219
  {
148114
- name: z57.string().describe("Name for the scheduled job"),
148115
- prompt: z57.string().describe("The prompt to send to the agent on each run"),
148116
- cron: z57.string().describe('Cron expression (e.g., "0 2 * * *" for daily at 2am)'),
148117
- description: z57.string().optional().describe("Description of what this task does"),
148118
- timezone: z57.string().optional().describe('IANA timezone (e.g., "America/New_York")'),
148119
- maxRuntime: z57.string().optional().describe('Maximum run time (e.g., "5m", "1h")'),
148120
- permissionMode: z57.string().optional().describe("Permission mode: acceptEdits or bypassPermissions")
148220
+ name: z58.string().describe("Name for the scheduled job"),
148221
+ prompt: z58.string().describe("The prompt to send to the agent on each run"),
148222
+ cron: z58.string().describe('Cron expression (e.g., "0 2 * * *" for daily at 2am)'),
148223
+ description: z58.string().optional().describe("Description of what this task does"),
148224
+ timezone: z58.string().optional().describe('IANA timezone (e.g., "America/New_York")'),
148225
+ maxRuntime: z58.string().optional().describe('Maximum run time (e.g., "5m", "1h")'),
148226
+ permissionMode: z58.string().optional().describe("Permission mode: acceptEdits or bypassPermissions")
148121
148227
  },
148122
148228
  createCreateScheduleHandler(deps)
148123
148229
  );
@@ -148125,14 +148231,14 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148125
148231
  "tasks_update",
148126
148232
  "Update an existing Tasks schedule. Only provided fields are updated.",
148127
148233
  {
148128
- id: z57.string().describe("Schedule ID to update"),
148129
- name: z57.string().optional().describe("New name"),
148130
- prompt: z57.string().optional().describe("New prompt"),
148131
- cron: z57.string().optional().describe("New cron expression"),
148132
- enabled: z57.boolean().optional().describe("Enable or disable the schedule"),
148133
- timezone: z57.string().optional().describe("New timezone"),
148134
- maxRuntime: z57.string().optional().describe('New max runtime (e.g., "5m", "1h")'),
148135
- permissionMode: z57.string().optional().describe("New permission mode")
148234
+ id: z58.string().describe("Schedule ID to update"),
148235
+ name: z58.string().optional().describe("New name"),
148236
+ prompt: z58.string().optional().describe("New prompt"),
148237
+ cron: z58.string().optional().describe("New cron expression"),
148238
+ enabled: z58.boolean().optional().describe("Enable or disable the schedule"),
148239
+ timezone: z58.string().optional().describe("New timezone"),
148240
+ maxRuntime: z58.string().optional().describe('New max runtime (e.g., "5m", "1h")'),
148241
+ permissionMode: z58.string().optional().describe("New permission mode")
148136
148242
  },
148137
148243
  createUpdateScheduleHandler(deps)
148138
148244
  );
@@ -148140,7 +148246,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148140
148246
  "tasks_delete",
148141
148247
  "Delete a Tasks schedule permanently.",
148142
148248
  {
148143
- id: z57.string().describe("Schedule ID to delete")
148249
+ id: z58.string().describe("Schedule ID to delete")
148144
148250
  },
148145
148251
  createDeleteScheduleHandler(deps)
148146
148252
  );
@@ -148148,8 +148254,8 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148148
148254
  "tasks_get_run_history",
148149
148255
  "Get recent run history for a Tasks schedule.",
148150
148256
  {
148151
- schedule_id: z57.string().describe("Schedule ID to get runs for"),
148152
- limit: z57.number().optional().describe("Max runs to return (default 20)")
148257
+ schedule_id: z58.string().describe("Schedule ID to get runs for"),
148258
+ limit: z58.number().optional().describe("Max runs to return (default 20)")
148153
148259
  },
148154
148260
  createGetRunHistoryHandler(deps)
148155
148261
  );
@@ -148157,14 +148263,14 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148157
148263
  "relay_send",
148158
148264
  "Send a message to a Relay subject. Delivers to all endpoints matching the subject pattern.",
148159
148265
  {
148160
- subject: z57.string().describe('Target subject (e.g., "relay.agent.backend")'),
148161
- payload: z57.unknown().describe("Message payload (any JSON-serializable value)"),
148162
- from: z57.string().describe("Sender subject identifier"),
148163
- replyTo: z57.string().optional().describe("Subject to send replies to"),
148164
- budget: z57.object({
148165
- maxHops: z57.number().int().min(1).optional().describe("Max hop count"),
148166
- ttl: z57.number().int().optional().describe("Unix timestamp (ms) expiry"),
148167
- callBudgetRemaining: z57.number().int().min(0).optional().describe("Remaining call budget")
148266
+ subject: z58.string().describe('Target subject (e.g., "relay.agent.backend")'),
148267
+ payload: z58.unknown().describe("Message payload (any JSON-serializable value)"),
148268
+ from: z58.string().describe("Sender subject identifier"),
148269
+ replyTo: z58.string().optional().describe("Subject to send replies to"),
148270
+ budget: z58.object({
148271
+ maxHops: z58.number().int().min(1).optional().describe("Max hop count"),
148272
+ ttl: z58.number().int().optional().describe("Unix timestamp (ms) expiry"),
148273
+ callBudgetRemaining: z58.number().int().min(0).optional().describe("Remaining call budget")
148168
148274
  }).optional().describe("Optional budget constraints")
148169
148275
  },
148170
148276
  createRelaySendHandler(deps)
@@ -148173,9 +148279,9 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148173
148279
  "relay_inbox",
148174
148280
  "Read inbox messages for a Relay endpoint. Returns messages delivered to that endpoint.",
148175
148281
  {
148176
- endpoint_subject: z57.string().describe("Subject of the endpoint to read inbox for"),
148177
- limit: z57.number().int().min(1).max(100).optional().describe("Max messages to return"),
148178
- status: z57.string().optional().describe(
148282
+ endpoint_subject: z58.string().describe("Subject of the endpoint to read inbox for"),
148283
+ limit: z58.number().int().min(1).max(100).optional().describe("Max messages to return"),
148284
+ status: z58.string().optional().describe(
148179
148285
  'Filter by status. Use "unread" (or "new"/"pending") for unread messages, "read" (or "cur"/"delivered") for processed messages, "failed" for delivery failures. Omit to return all.'
148180
148286
  )
148181
148287
  },
@@ -148191,8 +148297,8 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148191
148297
  "relay_register_endpoint",
148192
148298
  "Register a new Relay endpoint to receive messages on a subject.",
148193
148299
  {
148194
- subject: z57.string().describe('Subject for the new endpoint (e.g., "relay.agent.mybot")'),
148195
- description: z57.string().optional().describe("Human-readable description of the endpoint")
148300
+ subject: z58.string().describe('Subject for the new endpoint (e.g., "relay.agent.mybot")'),
148301
+ description: z58.string().optional().describe("Human-readable description of the endpoint")
148196
148302
  },
148197
148303
  createRelayRegisterEndpointHandler(deps)
148198
148304
  );
@@ -148200,16 +148306,16 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148200
148306
  "relay_send_and_wait",
148201
148307
  'Send a message to an agent and WAIT for the reply in a single call. Preferred over relay_send + relay_inbox polling for request/reply patterns. Internally registers an ephemeral inbox, sends the message with replyTo set, and blocks until the target agent replies or the timeout elapses. Response shape: { reply, progress, from, replyMessageId, sentMessageId }. progress: array of intermediate steps emitted before the final reply (empty [] for quick replies; populated for multi-step CCA tasks). Each progress step: { type: "progress", step: number, step_type: "message"|"tool_result", text: string, done: false }. Callers that only use { reply, from, replyMessageId } are unaffected \u2014 progress is additive.',
148202
148308
  {
148203
- to_subject: z57.string().describe('Target subject for the message (e.g., "relay.agent.{agentId}")'),
148204
- payload: z57.unknown().describe("Message payload (any JSON-serializable value)"),
148205
- from: z57.string().describe("Sender subject identifier"),
148206
- timeout_ms: z57.number().int().min(1e3).max(6e5).optional().describe(
148309
+ to_subject: z58.string().describe('Target subject for the message (e.g., "relay.agent.{agentId}")'),
148310
+ payload: z58.unknown().describe("Message payload (any JSON-serializable value)"),
148311
+ from: z58.string().describe("Sender subject identifier"),
148312
+ timeout_ms: z58.number().int().min(1e3).max(6e5).optional().describe(
148207
148313
  "Max milliseconds to wait for a reply (default: 60000, max: 600000). For tasks longer than 10 min, use relay_send_async instead."
148208
148314
  ),
148209
- budget: z57.object({
148210
- maxHops: z57.number().int().min(1).optional().describe("Max hop count"),
148211
- ttl: z57.number().int().optional().describe("Unix timestamp (ms) expiry"),
148212
- callBudgetRemaining: z57.number().int().min(0).optional().describe("Remaining call budget")
148315
+ budget: z58.object({
148316
+ maxHops: z58.number().int().min(1).optional().describe("Max hop count"),
148317
+ ttl: z58.number().int().optional().describe("Unix timestamp (ms) expiry"),
148318
+ callBudgetRemaining: z58.number().int().min(0).optional().describe("Remaining call budget")
148213
148319
  }).optional().describe("Optional budget constraints")
148214
148320
  },
148215
148321
  createRelayQueryHandler(deps)
@@ -148218,13 +148324,13 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148218
148324
  "relay_send_async",
148219
148325
  "Dispatch a message to an agent and return IMMEDIATELY with a dispatch inbox subject. Unlike relay_send_and_wait (which blocks), relay_send_async returns { messageId, inboxSubject } at once. Agent B runs asynchronously; CCA publishes incremental progress events and a final agent_result to the inbox. Poll relay_inbox(endpoint_subject=inboxSubject) for updates. When you receive a message with done:true, call relay_unregister_endpoint(inboxSubject) to clean up.",
148220
148326
  {
148221
- to_subject: z57.string().describe('Target subject (e.g., "relay.agent.{agentId}")'),
148222
- payload: z57.unknown().describe("Message payload"),
148223
- from: z57.string().describe("Sender subject identifier"),
148224
- budget: z57.object({
148225
- maxHops: z57.number().int().min(1).optional(),
148226
- ttl: z57.number().int().optional(),
148227
- callBudgetRemaining: z57.number().int().min(0).optional()
148327
+ to_subject: z58.string().describe('Target subject (e.g., "relay.agent.{agentId}")'),
148328
+ payload: z58.unknown().describe("Message payload"),
148329
+ from: z58.string().describe("Sender subject identifier"),
148330
+ budget: z58.object({
148331
+ maxHops: z58.number().int().min(1).optional(),
148332
+ ttl: z58.number().int().optional(),
148333
+ callBudgetRemaining: z58.number().int().min(0).optional()
148228
148334
  }).optional()
148229
148335
  },
148230
148336
  createRelayDispatchHandler(deps)
@@ -148233,7 +148339,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148233
148339
  "relay_unregister_endpoint",
148234
148340
  "Unregister a Relay endpoint. Use to clean up dispatch inboxes after relay_send_async completes (when done:true received).",
148235
148341
  {
148236
- subject: z57.string().describe("Subject of the endpoint to unregister")
148342
+ subject: z58.string().describe("Subject of the endpoint to unregister")
148237
148343
  },
148238
148344
  createRelayUnregisterEndpointHandler(deps)
148239
148345
  );
@@ -148247,7 +148353,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148247
148353
  "relay_enable_adapter",
148248
148354
  "Enable a Relay external adapter by ID. Starts the adapter and persists the change to config.",
148249
148355
  {
148250
- id: z57.string().describe("Adapter ID to enable")
148356
+ id: z58.string().describe("Adapter ID to enable")
148251
148357
  },
148252
148358
  createRelayEnableAdapterHandler(deps)
148253
148359
  );
@@ -148255,7 +148361,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148255
148361
  "relay_disable_adapter",
148256
148362
  "Disable a Relay external adapter by ID. Stops the adapter and persists the change to config.",
148257
148363
  {
148258
- id: z57.string().describe("Adapter ID to disable")
148364
+ id: z58.string().describe("Adapter ID to disable")
148259
148365
  },
148260
148366
  createRelayDisableAdapterHandler(deps)
148261
148367
  );
@@ -148275,12 +148381,12 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148275
148381
  "binding_create",
148276
148382
  "Create a new adapter-to-agent binding. Maps an external adapter to a specific agent directory.",
148277
148383
  {
148278
- adapterId: z57.string().describe("ID of the adapter to bind"),
148279
- agentId: z57.string().describe("Agent ID to route messages to"),
148280
- sessionStrategy: z57.string().optional().describe("Session strategy: per-chat, per-user, or stateless (default per-chat)"),
148281
- chatId: z57.string().optional().describe("Optional chat ID for targeted routing"),
148282
- channelType: z57.string().optional().describe("Optional channel type filter: dm, group, channel, or thread"),
148283
- label: z57.string().optional().describe("Optional human-readable label for this binding")
148384
+ adapterId: z58.string().describe("ID of the adapter to bind"),
148385
+ agentId: z58.string().describe("Agent ID to route messages to"),
148386
+ sessionStrategy: z58.string().optional().describe("Session strategy: per-chat, per-user, or stateless (default per-chat)"),
148387
+ chatId: z58.string().optional().describe("Optional chat ID for targeted routing"),
148388
+ channelType: z58.string().optional().describe("Optional channel type filter: dm, group, channel, or thread"),
148389
+ label: z58.string().optional().describe("Optional human-readable label for this binding")
148284
148390
  },
148285
148391
  createBindingCreateHandler(deps)
148286
148392
  );
@@ -148288,7 +148394,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148288
148394
  "binding_delete",
148289
148395
  "Delete an adapter-to-agent binding by ID.",
148290
148396
  {
148291
- id: z57.string().describe("Binding UUID to delete")
148397
+ id: z58.string().describe("Binding UUID to delete")
148292
148398
  },
148293
148399
  createBindingDeleteHandler(deps)
148294
148400
  );
@@ -148296,7 +148402,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148296
148402
  "relay_get_trace",
148297
148403
  "Get the full delivery trace for a Relay message. Returns all spans in the trace chain.",
148298
148404
  {
148299
- messageId: z57.string().describe("Message ID to look up the trace for")
148405
+ messageId: z58.string().describe("Message ID to look up the trace for")
148300
148406
  },
148301
148407
  createRelayGetTraceHandler(deps)
148302
148408
  );
@@ -148310,8 +148416,8 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148310
148416
  "mesh_discover",
148311
148417
  "Scan directories for agent candidates. Returns paths with detected runtime, capabilities, and suggested names.",
148312
148418
  {
148313
- roots: z57.array(z57.string()).describe("Root directories to scan for agents"),
148314
- maxDepth: z57.number().int().min(1).optional().describe("Maximum directory depth (default 3)")
148419
+ roots: z58.array(z58.string()).describe("Root directories to scan for agents"),
148420
+ maxDepth: z58.number().int().min(1).optional().describe("Maximum directory depth (default 3)")
148315
148421
  },
148316
148422
  createMeshDiscoverHandler(deps)
148317
148423
  );
@@ -148319,11 +148425,11 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148319
148425
  "mesh_register",
148320
148426
  "Register an agent from a filesystem path. Creates a .dork/agent.json manifest and adds the agent to the registry.",
148321
148427
  {
148322
- path: z57.string().describe("Filesystem path to the agent directory"),
148323
- name: z57.string().optional().describe("Display name override"),
148324
- description: z57.string().optional().describe("Agent description"),
148325
- runtime: z57.string().optional().describe("Runtime: claude-code, cursor, codex, or other"),
148326
- capabilities: z57.array(z57.string()).optional().describe("Agent capabilities")
148428
+ path: z58.string().describe("Filesystem path to the agent directory"),
148429
+ name: z58.string().optional().describe("Display name override"),
148430
+ description: z58.string().optional().describe("Agent description"),
148431
+ runtime: z58.string().optional().describe("Runtime: claude-code, cursor, codex, or other"),
148432
+ capabilities: z58.array(z58.string()).optional().describe("Agent capabilities")
148327
148433
  },
148328
148434
  createMeshRegisterHandler(deps)
148329
148435
  );
@@ -148331,9 +148437,9 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148331
148437
  "mesh_list",
148332
148438
  "List all registered agents with optional filters.",
148333
148439
  {
148334
- runtime: z57.string().optional().describe("Filter by runtime"),
148335
- capability: z57.string().optional().describe("Filter by capability"),
148336
- callerNamespace: z57.string().optional().describe("Filter by namespace visibility")
148440
+ runtime: z58.string().optional().describe("Filter by runtime"),
148441
+ capability: z58.string().optional().describe("Filter by capability"),
148442
+ callerNamespace: z58.string().optional().describe("Filter by namespace visibility")
148337
148443
  },
148338
148444
  createMeshListHandler(deps)
148339
148445
  );
@@ -148341,8 +148447,8 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148341
148447
  "mesh_deny",
148342
148448
  "Deny a candidate path from future discovery scans.",
148343
148449
  {
148344
- path: z57.string().describe("Path to deny"),
148345
- reason: z57.string().optional().describe("Reason for denial")
148450
+ path: z58.string().describe("Path to deny"),
148451
+ reason: z58.string().optional().describe("Reason for denial")
148346
148452
  },
148347
148453
  createMeshDenyHandler(deps)
148348
148454
  );
@@ -148350,7 +148456,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148350
148456
  "mesh_unregister",
148351
148457
  "Unregister an agent by ID, removing it from the registry.",
148352
148458
  {
148353
- agentId: z57.string().describe("Agent ID to unregister")
148459
+ agentId: z58.string().describe("Agent ID to unregister")
148354
148460
  },
148355
148461
  createMeshUnregisterHandler(deps)
148356
148462
  );
@@ -148364,7 +148470,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148364
148470
  "mesh_inspect",
148365
148471
  "Inspect a specific agent \u2014 manifest, health status, relay endpoint.",
148366
148472
  {
148367
- agentId: z57.string().describe("The agent ULID to inspect")
148473
+ agentId: z58.string().describe("The agent ULID to inspect")
148368
148474
  },
148369
148475
  createMeshInspectHandler(deps)
148370
148476
  );
@@ -148372,7 +148478,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148372
148478
  "mesh_query_topology",
148373
148479
  "Query the agent network topology visible to a given namespace. Returns namespaces, agents, and access rules.",
148374
148480
  {
148375
- namespace: z57.string().optional().describe("Caller namespace (omit for admin view)")
148481
+ namespace: z58.string().optional().describe("Caller namespace (omit for admin view)")
148376
148482
  },
148377
148483
  createMeshQueryTopologyHandler(deps)
148378
148484
  );
@@ -148380,10 +148486,10 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148380
148486
  "create_agent",
148381
148487
  "Create a new DorkOS agent workspace with scaffolded config files",
148382
148488
  {
148383
- name: z57.string().describe("Agent name (kebab-case, e.g. my-agent)"),
148384
- directory: z57.string().optional().describe("Optional workspace directory path"),
148385
- description: z57.string().optional().describe("Optional agent description"),
148386
- runtime: z57.string().optional().describe("Agent runtime (default: claude-code)")
148489
+ name: z58.string().describe("Agent name (kebab-case, e.g. my-agent)"),
148490
+ directory: z58.string().optional().describe("Optional workspace directory path"),
148491
+ description: z58.string().optional().describe("Optional agent description"),
148492
+ runtime: z58.string().optional().describe("Agent runtime (default: claude-code)")
148387
148493
  },
148388
148494
  createCreateAgentHandler(deps)
148389
148495
  );
@@ -148409,10 +148515,10 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148409
148515
  "create_extension",
148410
148516
  "Scaffold a new DorkOS extension with manifest and starter code. Creates the directory, writes extension.json and index.ts, compiles, and enables the extension in one step.",
148411
148517
  {
148412
- name: z57.string().describe("Extension name (kebab-case, e.g. my-dashboard-widget)"),
148413
- description: z57.string().optional().describe("Short description shown in settings UI"),
148414
- template: z57.enum(["dashboard-card", "command", "settings-panel"]).optional().describe("Starter template (default: dashboard-card)"),
148415
- scope: z57.enum(["global", "local"]).optional().describe(
148518
+ name: z58.string().describe("Extension name (kebab-case, e.g. my-dashboard-widget)"),
148519
+ description: z58.string().optional().describe("Short description shown in settings UI"),
148520
+ template: z58.enum(["dashboard-card", "command", "settings-panel"]).optional().describe("Starter template (default: dashboard-card)"),
148521
+ scope: z58.enum(["global", "local"]).optional().describe(
148416
148522
  "Install scope: global (~/.dork/extensions/) or local (.dork/extensions/ in CWD). Default: global"
148417
148523
  )
148418
148524
  },
@@ -148422,7 +148528,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148422
148528
  "reload_extensions",
148423
148529
  "Re-scan the filesystem for extensions and recompile any that changed. When id is provided, performs a targeted hot-reload of a single extension (recompile only). When omitted, runs a full discovery + recompile cycle.",
148424
148530
  {
148425
- id: z57.string().optional().describe("Extension ID for targeted reload. Omit to reload all.")
148531
+ id: z58.string().optional().describe("Extension ID for targeted reload. Omit to reload all.")
148426
148532
  },
148427
148533
  createReloadExtensionsHandler(deps)
148428
148534
  );
@@ -148430,7 +148536,7 @@ function createExternalMcpServer(deps, marketplaceDeps) {
148430
148536
  "test_extension",
148431
148537
  "Compile an extension and activate it against a mock API to verify it loads without errors. Returns contribution counts per UI slot on success, or detailed error information on failure.",
148432
148538
  {
148433
- id: z57.string().describe("Extension ID to test")
148539
+ id: z58.string().describe("Extension ID to test")
148434
148540
  },
148435
148541
  createTestExtensionHandler(deps)
148436
148542
  );