@cleocode/core 2026.9.26 → 2026.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/build-provenance.json +2 -2
  2. package/dist/cloud/nexus-attach.d.ts +94 -0
  3. package/dist/cloud/nexus-attach.d.ts.map +1 -0
  4. package/dist/cloud/nexus-attach.js +192 -0
  5. package/dist/cloud/nexus-attach.js.map +1 -0
  6. package/dist/cloud/nexus-auth.d.ts +15 -3
  7. package/dist/cloud/nexus-auth.d.ts.map +1 -1
  8. package/dist/cloud/nexus-auth.js +90 -6
  9. package/dist/cloud/nexus-auth.js.map +1 -1
  10. package/dist/cloud/nexus-cloud-status.d.ts +132 -0
  11. package/dist/cloud/nexus-cloud-status.d.ts.map +1 -0
  12. package/dist/cloud/nexus-cloud-status.js +440 -0
  13. package/dist/cloud/nexus-cloud-status.js.map +1 -0
  14. package/dist/cloud/nexus-cloud.d.ts +179 -0
  15. package/dist/cloud/nexus-cloud.d.ts.map +1 -0
  16. package/dist/cloud/nexus-cloud.js +296 -0
  17. package/dist/cloud/nexus-cloud.js.map +1 -0
  18. package/dist/cloud/nexus-device.d.ts +31 -6
  19. package/dist/cloud/nexus-device.d.ts.map +1 -1
  20. package/dist/cloud/nexus-device.js +54 -7
  21. package/dist/cloud/nexus-device.js.map +1 -1
  22. package/dist/cloud/nexus-enrol.d.ts +35 -4
  23. package/dist/cloud/nexus-enrol.d.ts.map +1 -1
  24. package/dist/cloud/nexus-enrol.js +187 -47
  25. package/dist/cloud/nexus-enrol.js.map +1 -1
  26. package/dist/cloud/nexus-link.d.ts +8 -1
  27. package/dist/cloud/nexus-link.d.ts.map +1 -1
  28. package/dist/cloud/nexus-link.js +138 -11
  29. package/dist/cloud/nexus-link.js.map +1 -1
  30. package/dist/cloud/nexus-logout.d.ts +114 -0
  31. package/dist/cloud/nexus-logout.d.ts.map +1 -0
  32. package/dist/cloud/nexus-logout.js +429 -0
  33. package/dist/cloud/nexus-logout.js.map +1 -0
  34. package/dist/docs/export-document.js +242 -37
  35. package/dist/docs/export-document.js.map +3 -3
  36. package/dist/llm/plugin-facade.js +343 -138
  37. package/dist/llm/plugin-facade.js.map +3 -3
  38. package/dist/selfimprove/fix-gen.js +347 -142
  39. package/dist/selfimprove/fix-gen.js.map +3 -3
  40. package/dist/setup/sections/nexus-account.d.ts +8 -6
  41. package/dist/setup/sections/nexus-account.d.ts.map +1 -1
  42. package/dist/setup/sections/nexus-account.js +53 -9
  43. package/dist/setup/sections/nexus-account.js.map +1 -1
  44. package/dist/store/sync/replica.d.ts +34 -3
  45. package/dist/store/sync/replica.d.ts.map +1 -1
  46. package/dist/store/sync/replica.js +39 -2
  47. package/dist/store/sync/replica.js.map +1 -1
  48. package/dist/store/sync/schema.d.ts +6 -3
  49. package/dist/store/sync/schema.d.ts.map +1 -1
  50. package/dist/store/sync/schema.js +6 -3
  51. package/dist/store/sync/schema.js.map +1 -1
  52. package/package.json +13 -13
@@ -17537,6 +17537,210 @@ var init_nexus_account = __esm({
17537
17537
  }
17538
17538
  });
17539
17539
 
17540
+ // packages/contracts/src/nexus-cloud.ts
17541
+ import { z as z26 } from "zod";
17542
+ var NEXUS_DEVICE_STATES, NEXUS_CLOUD_PROFILES, NEXUS_DEVICE_STATE_UNKNOWN, isoTime, profile, deviceState, nexusCloudCredentialSchema, nexusCloudDeviceSchema, nexusCloudOrganizationSchema, nexusCloudUserSchema, nexusCloudWhoamiSchema, nexusCloudDevicePageSchema, nexusCloudPresenceSchema, nexusCloudReplicaSchema, nexusCloudDeviceCountsSchema, projectFields, nexusCloudProjectListItemSchema, nexusCloudProjectPageSchema, nexusCloudProjectDetailSchema, nexusCloudReplicaPageSchema, NEXUS_STATUS_CHECK_IDS, NEXUS_STATUS_VERDICTS, CLOUD_STATUS_VERDICTS, knownCheckId, nexusCloudStatusCheckSchema, nexusCloudStatusSchema;
17543
+ var init_nexus_cloud = __esm({
17544
+ "packages/contracts/src/nexus-cloud.ts"() {
17545
+ "use strict";
17546
+ NEXUS_DEVICE_STATES = ["active", "signed-out", "revoked"];
17547
+ NEXUS_CLOUD_PROFILES = ["device", "read-only"];
17548
+ NEXUS_DEVICE_STATE_UNKNOWN = "unknown";
17549
+ isoTime = z26.iso.datetime({ offset: true });
17550
+ profile = z26.enum(NEXUS_CLOUD_PROFILES).nullable().catch(null);
17551
+ deviceState = z26.enum([...NEXUS_DEVICE_STATES, NEXUS_DEVICE_STATE_UNKNOWN]).catch(NEXUS_DEVICE_STATE_UNKNOWN);
17552
+ nexusCloudCredentialSchema = z26.object({
17553
+ kind: z26.enum(["device", "session"]),
17554
+ credentialId: z26.string().nullable().optional(),
17555
+ profile: profile.optional(),
17556
+ scopes: z26.array(z26.string()).default([]),
17557
+ createdAt: isoTime.nullable().optional(),
17558
+ lastUsedAt: isoTime.nullable().optional(),
17559
+ /** When the credential expires if it is not used again; null for sessions. */
17560
+ idleExpiresAt: isoTime.nullable().optional()
17561
+ });
17562
+ nexusCloudDeviceSchema = z26.object({
17563
+ deviceId: z26.string(),
17564
+ name: z26.string(),
17565
+ platform: z26.string().optional(),
17566
+ arch: z26.string().nullable().optional(),
17567
+ cliVersion: z26.string().nullable().optional(),
17568
+ createdAt: isoTime.optional(),
17569
+ lastSeenAt: isoTime.nullable().optional(),
17570
+ state: deviceState,
17571
+ signedOutAt: isoTime.nullable().optional(),
17572
+ /** Base64 device certificate; null until the device holds a key grant. */
17573
+ certificate: z26.string().nullable().optional(),
17574
+ /** The current credential's profile, or null with none (signed out or revoked). */
17575
+ profile: profile.optional(),
17576
+ /** True for the device whose credential made this request. */
17577
+ current: z26.boolean().default(false),
17578
+ projects: z26.number().int().nonnegative().optional(),
17579
+ replicas: z26.number().int().nonnegative().optional(),
17580
+ lastSyncAt: isoTime.nullable().optional(),
17581
+ lastPresenceAt: isoTime.nullable().optional()
17582
+ });
17583
+ nexusCloudOrganizationSchema = z26.object({
17584
+ id: z26.string(),
17585
+ name: z26.string(),
17586
+ slug: z26.string().nullable().optional(),
17587
+ role: z26.string().optional(),
17588
+ personal: z26.boolean().optional()
17589
+ });
17590
+ nexusCloudUserSchema = z26.object({
17591
+ id: z26.string(),
17592
+ email: z26.string(),
17593
+ name: z26.string().nullable().optional()
17594
+ });
17595
+ nexusCloudWhoamiSchema = z26.object({
17596
+ serverTime: isoTime.optional(),
17597
+ user: nexusCloudUserSchema,
17598
+ organizations: z26.array(nexusCloudOrganizationSchema).default([]),
17599
+ credential: nexusCloudCredentialSchema,
17600
+ /** The calling device; null for a session caller. */
17601
+ device: nexusCloudDeviceSchema.nullable()
17602
+ });
17603
+ nexusCloudDevicePageSchema = z26.object({
17604
+ devices: z26.array(nexusCloudDeviceSchema),
17605
+ nextCursor: z26.string().max(512).nullable().default(null),
17606
+ truncated: z26.boolean().default(false)
17607
+ });
17608
+ nexusCloudPresenceSchema = z26.looseObject({
17609
+ observedAt: isoTime.optional(),
17610
+ sync: z26.object({ enabled: z26.boolean() }).optional()
17611
+ });
17612
+ nexusCloudReplicaSchema = z26.object({
17613
+ projectId: z26.string(),
17614
+ replicaId: z26.string(),
17615
+ deviceId: z26.string(),
17616
+ deviceName: z26.string(),
17617
+ deviceState: deviceState.optional(),
17618
+ attachedAt: isoTime.optional(),
17619
+ lastSyncAt: isoTime.nullable(),
17620
+ presence: nexusCloudPresenceSchema.nullable(),
17621
+ presenceAt: isoTime.nullable()
17622
+ });
17623
+ nexusCloudDeviceCountsSchema = z26.object({
17624
+ active: z26.number().int().nonnegative(),
17625
+ total: z26.number().int().nonnegative()
17626
+ });
17627
+ projectFields = {
17628
+ projectId: z26.string(),
17629
+ label: z26.string().nullable(),
17630
+ organizationId: z26.string(),
17631
+ organizationName: z26.string().optional(),
17632
+ remoteUrl: z26.string().nullable().optional(),
17633
+ createdAt: isoTime.optional()
17634
+ };
17635
+ nexusCloudProjectListItemSchema = z26.object({
17636
+ ...projectFields,
17637
+ role: z26.string(),
17638
+ streamId: z26.string().optional(),
17639
+ headSeq: z26.number().int().nonnegative().nullable().optional(),
17640
+ openConflicts: z26.number().int().nonnegative().optional(),
17641
+ replicas: z26.array(nexusCloudReplicaSchema).default([]),
17642
+ devices: nexusCloudDeviceCountsSchema.optional(),
17643
+ replicaCount: z26.number().int().nonnegative().optional(),
17644
+ lastSyncAt: isoTime.nullable().optional(),
17645
+ lastPresenceAt: isoTime.nullable().optional(),
17646
+ /** This project's replica list was cut at 50 (T12858). */
17647
+ replicasTruncated: z26.boolean().default(false)
17648
+ });
17649
+ nexusCloudProjectPageSchema = z26.object({
17650
+ projects: z26.array(nexusCloudProjectListItemSchema),
17651
+ nextCursor: z26.string().max(512).nullable().default(null),
17652
+ /** Anything in the page was cut (the project list or a replica list). */
17653
+ truncated: z26.boolean().default(false),
17654
+ /** The project list itself was cut at 1000 (T12858). */
17655
+ projectsTruncated: z26.boolean().default(false)
17656
+ });
17657
+ nexusCloudProjectDetailSchema = z26.object({
17658
+ project: z26.object({ ...projectFields, deletedAt: isoTime.nullable().optional() }),
17659
+ role: z26.string(),
17660
+ canTrash: z26.boolean().optional(),
17661
+ openConflicts: z26.number().int().nonnegative(),
17662
+ /** At most 50, oldest attachment first. */
17663
+ replicas: z26.array(nexusCloudReplicaSchema),
17664
+ devices: nexusCloudDeviceCountsSchema,
17665
+ replicaCount: z26.number().int().nonnegative().optional(),
17666
+ lastSyncAt: isoTime.nullable().optional(),
17667
+ /** `replicas` was cut at 50. */
17668
+ truncated: z26.boolean().default(false),
17669
+ stream: z26.object({
17670
+ streamId: z26.string(),
17671
+ headSeq: z26.number().int().nonnegative(),
17672
+ headCheckpointId: z26.string().nullable()
17673
+ }).nullable()
17674
+ });
17675
+ nexusCloudReplicaPageSchema = z26.object({
17676
+ replicas: z26.array(nexusCloudReplicaSchema),
17677
+ devices: nexusCloudDeviceCountsSchema.optional(),
17678
+ nextCursor: z26.string().max(512).nullable().default(null),
17679
+ truncated: z26.boolean().default(false)
17680
+ });
17681
+ NEXUS_STATUS_CHECK_IDS = [
17682
+ "credential.valid",
17683
+ "device.registered",
17684
+ "device.active",
17685
+ "device.certified",
17686
+ "project.registered",
17687
+ "project.writable",
17688
+ "replica.attached",
17689
+ "presence.fresh",
17690
+ "replica.synced",
17691
+ "conflicts.none"
17692
+ ];
17693
+ NEXUS_STATUS_VERDICTS = ["ok", "attention", "not-linked", "not-registered"];
17694
+ CLOUD_STATUS_VERDICTS = [...NEXUS_STATUS_VERDICTS, "not-signed-in"];
17695
+ knownCheckId = z26.enum(NEXUS_STATUS_CHECK_IDS);
17696
+ nexusCloudStatusCheckSchema = z26.object({
17697
+ id: z26.enum(NEXUS_STATUS_CHECK_IDS),
17698
+ ok: z26.boolean(),
17699
+ required: z26.boolean(),
17700
+ detail: z26.string()
17701
+ });
17702
+ nexusCloudStatusSchema = z26.object({
17703
+ serverTime: isoTime.optional(),
17704
+ apiVersion: z26.string().optional(),
17705
+ user: nexusCloudUserSchema,
17706
+ credential: nexusCloudCredentialSchema,
17707
+ device: nexusCloudDeviceSchema.nullable(),
17708
+ project: z26.object({
17709
+ projectId: z26.string(),
17710
+ registered: z26.boolean(),
17711
+ organizationId: z26.string().nullable(),
17712
+ organizationName: z26.string().nullable(),
17713
+ role: z26.string().nullable()
17714
+ }).nullable(),
17715
+ replica: z26.object({
17716
+ replicaId: z26.string(),
17717
+ attached: z26.boolean(),
17718
+ attachedElsewhere: z26.boolean(),
17719
+ attachedAt: isoTime.nullable(),
17720
+ lastSyncAt: isoTime.nullable(),
17721
+ presenceAt: isoTime.nullable(),
17722
+ lastReplicaSeq: z26.number().int().nonnegative().nullable().optional()
17723
+ }).nullable(),
17724
+ stream: z26.object({
17725
+ streamId: z26.string(),
17726
+ headSeq: z26.number().int().nonnegative(),
17727
+ headCheckpointId: z26.string().nullable(),
17728
+ openConflicts: z26.number().int().nonnegative(),
17729
+ devices: nexusCloudDeviceCountsSchema
17730
+ }).nullable(),
17731
+ /** Check ids added by a newer server are dropped, never a parse failure. */
17732
+ checks: z26.array(nexusCloudStatusCheckSchema.extend({ id: z26.string() })).transform(
17733
+ (list) => list.flatMap((c) => {
17734
+ const id = knownCheckId.safeParse(c.id);
17735
+ return id.success ? [{ ...c, id: id.data }] : [];
17736
+ })
17737
+ ),
17738
+ /** A verdict added by a newer server reads as `attention`: never `ok` by accident. */
17739
+ verdict: z26.enum(NEXUS_STATUS_VERDICTS).catch("attention")
17740
+ });
17741
+ }
17742
+ });
17743
+
17540
17744
  // packages/contracts/src/task-id.ts
17541
17745
  var init_task_id = __esm({
17542
17746
  "packages/contracts/src/task-id.ts"() {
@@ -17621,6 +17825,7 @@ var init_src = __esm({
17621
17825
  init_decide();
17622
17826
  init_decide_sites();
17623
17827
  init_nexus_account();
17828
+ init_nexus_cloud();
17624
17829
  init_task_id();
17625
17830
  }
17626
17831
  });
@@ -33441,7 +33646,7 @@ var init_task_claim = __esm({
33441
33646
  });
33442
33647
 
33443
33648
  // packages/core/src/store/converters.ts
33444
- import { z as z26 } from "zod";
33649
+ import { z as z27 } from "zod";
33445
33650
  function readStoredAcceptance(row) {
33446
33651
  if (row.acceptanceJson === null || row.acceptanceJson === void 0) return void 0;
33447
33652
  try {
@@ -33599,7 +33804,7 @@ var init_converters = __esm({
33599
33804
  init_src();
33600
33805
  init_parsers();
33601
33806
  init_task_claim();
33602
- storedAcceptanceSchema = z26.custom(
33807
+ storedAcceptanceSchema = z27.custom(
33603
33808
  (value) => Array.isArray(value) && value.every((item) => acceptanceItemSchema.safeParse(item).success)
33604
33809
  );
33605
33810
  }
@@ -36262,7 +36467,7 @@ import {
36262
36467
  } from "node:fs";
36263
36468
  import { createRequire as createRequire5 } from "node:module";
36264
36469
  import { basename as basename7, dirname as dirname13, join as join15 } from "node:path";
36265
- import { z as z27 } from "zod";
36470
+ import { z as z28 } from "zod";
36266
36471
  function formatBackupTimestamp(d) {
36267
36472
  const pad = (n, len = 2) => String(n).padStart(len, "0");
36268
36473
  return `${d.getFullYear()}${pad(d.getMonth() + 1)}${pad(d.getDate())}-${pad(d.getHours())}${pad(d.getMinutes())}${pad(d.getSeconds())}`;
@@ -36399,16 +36604,16 @@ var init_backup_sidecar = __esm({
36399
36604
  init_logger();
36400
36605
  PRE_COLLAPSE_BACKUP_TYPE = "migration";
36401
36606
  MARKER_PREFIX = "twin_collapse:";
36402
- backupSidecarSchema = z27.object({
36403
- backupId: z27.string().min(1),
36404
- type: z27.string().min(1),
36405
- timestamp: z27.string().min(1),
36406
- note: z27.string().optional(),
36407
- files: z27.array(z27.string()),
36408
- pinned: z27.boolean().optional(),
36409
- pinnedReason: z27.string().optional(),
36410
- releasedAt: z27.string().optional(),
36411
- releasedReason: z27.string().optional()
36607
+ backupSidecarSchema = z28.object({
36608
+ backupId: z28.string().min(1),
36609
+ type: z28.string().min(1),
36610
+ timestamp: z28.string().min(1),
36611
+ note: z28.string().optional(),
36612
+ files: z28.array(z28.string()),
36613
+ pinned: z28.boolean().optional(),
36614
+ pinnedReason: z28.string().optional(),
36615
+ releasedAt: z28.string().optional(),
36616
+ releasedReason: z28.string().optional()
36412
36617
  }).passthrough();
36413
36618
  }
36414
36619
  });
@@ -36580,7 +36785,7 @@ var init_pre_repair_snapshot = __esm({
36580
36785
  import { createHash as createHash5 } from "node:crypto";
36581
36786
  import { basename as basename8, dirname as dirname16 } from "node:path";
36582
36787
  import { fileURLToPath as fileURLToPath4 } from "node:url";
36583
- import { z as z28 } from "zod";
36788
+ import { z as z29 } from "zod";
36584
36789
  function hasMainTable(db, name15) {
36585
36790
  return db.prepare("SELECT 1 FROM main.sqlite_master WHERE type = 'table' AND name = ?").get(name15) !== void 0;
36586
36791
  }
@@ -37713,20 +37918,20 @@ var init_twin_collapse = __esm({
37713
37918
  SHADOW_WRITE_REFUSED = "E_TWIN_COLLAPSE_FAILED: store is read-only until the twin collapse succeeds; run cleo doctor twin-collapse";
37714
37919
  SHADOW_WRITE_OPS = ["INSERT", "UPDATE", "DELETE"];
37715
37920
  STICKY_ARCHIVE_KEY = `${TWIN_COLLAPSE_ARCHIVE_PREFIX}sticky_tags`;
37716
- FocusNotesShape = z28.object({ sessionNotes: z28.array(z28.unknown()) }).passthrough();
37717
- StickyArchiveShape = z28.array(z28.string());
37718
- RecoveryReceiptShape = z28.object({
37719
- task: z28.literal("T12727"),
37720
- id: z28.string(),
37721
- recoveredAt: z28.string(),
37722
- snapshot: z28.string().nullable(),
37723
- archived: z28.array(z28.object({ key: z28.string(), archiveKey: z28.string(), sha: z28.string() })),
37724
- focusNotesAdded: z28.number(),
37725
- stickyArchived: z28.array(z28.string()),
37726
- stickyArchiveKey: z28.string(),
37727
- before: z28.object({ focusState: z28.string().nullable(), stickyArchive: z28.string().nullable() }),
37728
- after: z28.object({ focusState: z28.string().nullable(), stickyArchive: z28.string().nullable() }),
37729
- rolledBackAt: z28.string().nullable()
37921
+ FocusNotesShape = z29.object({ sessionNotes: z29.array(z29.unknown()) }).passthrough();
37922
+ StickyArchiveShape = z29.array(z29.string());
37923
+ RecoveryReceiptShape = z29.object({
37924
+ task: z29.literal("T12727"),
37925
+ id: z29.string(),
37926
+ recoveredAt: z29.string(),
37927
+ snapshot: z29.string().nullable(),
37928
+ archived: z29.array(z29.object({ key: z29.string(), archiveKey: z29.string(), sha: z29.string() })),
37929
+ focusNotesAdded: z29.number(),
37930
+ stickyArchived: z29.array(z29.string()),
37931
+ stickyArchiveKey: z29.string(),
37932
+ before: z29.object({ focusState: z29.string().nullable(), stickyArchive: z29.string().nullable() }),
37933
+ after: z29.object({ focusState: z29.string().nullable(), stickyArchive: z29.string().nullable() }),
37934
+ rolledBackAt: z29.string().nullable()
37730
37935
  });
37731
37936
  }
37732
37937
  });
@@ -45450,7 +45655,7 @@ var init_governor = __esm({
45450
45655
  // packages/core/src/store/exodus/recovery.ts
45451
45656
  import { randomUUID as randomUUID2 } from "node:crypto";
45452
45657
  import { constants } from "node:sqlite";
45453
- import { z as z29 } from "zod";
45658
+ import { z as z30 } from "zod";
45454
45659
  function identityValues(encoded) {
45455
45660
  return identitySchema.parse(JSON.parse(encoded)).map(([kind, value]) => {
45456
45661
  if (kind === "null") return null;
@@ -45786,8 +45991,8 @@ var init_recovery = __esm({
45786
45991
  "use strict";
45787
45992
  init_row_identity_registry();
45788
45993
  RECEIPTS = "_exodus_recovery_rows";
45789
- identitySchema = z29.array(
45790
- z29.tuple([z29.enum(["null", "integer", "real", "text", "blob"]), z29.string()])
45994
+ identitySchema = z30.array(
45995
+ z30.tuple([z30.enum(["null", "integer", "real", "text", "blob"]), z30.string()])
45791
45996
  );
45792
45997
  ExodusRecoveryError = class extends Error {
45793
45998
  };
@@ -45805,7 +46010,7 @@ import {
45805
46010
  writeFileSync as writeFileSync6
45806
46011
  } from "node:fs";
45807
46012
  import { basename as basename9, dirname as dirname20, join as join28, resolve as resolve12 } from "node:path";
45808
- import { z as z30 } from "zod";
46013
+ import { z as z31 } from "zod";
45809
46014
  function scopeBaseDir(scope, cwd, targetDbPath) {
45810
46015
  if (targetDbPath !== void 0) return dirname20(targetDbPath);
45811
46016
  return scope === "project" ? resolveCleoDir(cwd) : getCleoHome();
@@ -45948,11 +46153,11 @@ var init_archive2 = __esm({
45948
46153
  init_ensure_config();
45949
46154
  init_recovery();
45950
46155
  log8 = getLogger("exodus-archive");
45951
- markerIdentity = z30.object({
45952
- version: z30.literal(1),
45953
- scope: z30.enum(["project", "global"]),
45954
- targetDbPath: z30.string().optional(),
45955
- databaseIdentity: z30.string().optional()
46156
+ markerIdentity = z31.object({
46157
+ version: z31.literal(1),
46158
+ scope: z31.enum(["project", "global"]),
46159
+ targetDbPath: z31.string().optional(),
46160
+ databaseIdentity: z31.string().optional()
45956
46161
  });
45957
46162
  ARCHIVE_DIR_NAME = "_archive";
45958
46163
  MARKER_FILENAME_BY_SCOPE = {
@@ -53851,8 +54056,8 @@ async function scanAndLoadPlugins(pluginDir, api) {
53851
54056
  }
53852
54057
  async function runDiscovery(registerProvider2, builtins) {
53853
54058
  const api = { registerProvider: registerProvider2 };
53854
- for (const profile of builtins) {
53855
- registerProvider2(profile);
54059
+ for (const profile2 of builtins) {
54060
+ registerProvider2(profile2);
53856
54061
  }
53857
54062
  await scanAndLoadPlugins(getPluginDir(), api);
53858
54063
  }
@@ -53875,16 +54080,16 @@ __export(provider_registry_exports, {
53875
54080
  listProviders: () => listProviders,
53876
54081
  registerProvider: () => registerProvider
53877
54082
  });
53878
- function registerProvider(profile) {
53879
- const key = profile.name.toLowerCase();
53880
- _registry.set(key, profile);
53881
- for (const alias of profile.aliases ?? []) {
54083
+ function registerProvider(profile2) {
54084
+ const key = profile2.name.toLowerCase();
54085
+ _registry.set(key, profile2);
54086
+ for (const alias of profile2.aliases ?? []) {
53882
54087
  const aliasKey = alias.toLowerCase();
53883
54088
  const existing = _aliases.get(aliasKey);
53884
54089
  if (existing !== void 0 && existing !== key) {
53885
54090
  if (_registry.has(aliasKey) && aliasKey !== key) {
53886
54091
  throw new TypeError(
53887
- `[provider-registry] Alias "${alias}" for provider "${profile.name}" conflicts with the primary name of provider "${_registry.get(aliasKey)?.name ?? aliasKey}".`
54092
+ `[provider-registry] Alias "${alias}" for provider "${profile2.name}" conflicts with the primary name of provider "${_registry.get(aliasKey)?.name ?? aliasKey}".`
53888
54093
  );
53889
54094
  }
53890
54095
  }
@@ -54346,8 +54551,8 @@ var init_credential_pool = __esm({
54346
54551
  */
54347
54552
  async _refreshOAuthCredential(existing) {
54348
54553
  if (!existing.refreshToken) return;
54349
- const profile = await getProviderProfile(this.provider);
54350
- const oauthCfg = profile?.oauth;
54554
+ const profile2 = await getProviderProfile(this.provider);
54555
+ const oauthCfg = profile2?.oauth;
54351
54556
  if (oauthCfg?.mode === "pkce") {
54352
54557
  await this._refreshViaPkce(
54353
54558
  existing,
@@ -54856,15 +55061,15 @@ async function selectBestProvisioned(role, opts) {
54856
55061
  const ollamaProvisioned = provisionedIds.includes("ollama");
54857
55062
  let ollamaAlive = localModels.length > 0;
54858
55063
  if (ollamaProvisioned && !ollamaAlive) {
54859
- const profile = await getProviderProfile2("ollama");
54860
- const ollamaBase = profile?.baseUrl ?? "http://localhost:11434";
55064
+ const profile2 = await getProviderProfile2("ollama");
55065
+ const ollamaBase = profile2?.baseUrl ?? "http://localhost:11434";
54861
55066
  ollamaAlive = await probeOllamaAlive(ollamaBase);
54862
55067
  if (ollamaAlive) localModels = await listOllamaModels(ollamaBase);
54863
55068
  }
54864
55069
  const scored = [];
54865
55070
  for (const id of provisionedIds) {
54866
- const profile = await getProviderProfile2(id);
54867
- const tier = profile?.tier ?? "standard";
55071
+ const profile2 = await getProviderProfile2(id);
55072
+ const tier = profile2?.tier ?? "standard";
54868
55073
  const costInput = 0;
54869
55074
  const score = scoreProvider(id, tier, taskTier, ollamaAlive, costInput);
54870
55075
  const storedCred = await pickCredentialForProvider2(id, { strategy: "priorityOnly" });
@@ -55050,12 +55255,12 @@ function readLlmBlock(config2) {
55050
55255
  }
55051
55256
  function resolveNamedProfile(llm, name15, source) {
55052
55257
  if (!name15) return void 0;
55053
- const profile = llm?.profiles?.[name15];
55054
- if (!profile?.provider || !profile.model) return void 0;
55258
+ const profile2 = llm?.profiles?.[name15];
55259
+ if (!profile2?.provider || !profile2.model) return void 0;
55055
55260
  return {
55056
- provider: profile.provider,
55057
- model: profile.model,
55058
- credentialLabel: profile.credentialLabel,
55261
+ provider: profile2.provider,
55262
+ model: profile2.model,
55263
+ credentialLabel: profile2.credentialLabel,
55059
55264
  source
55060
55265
  };
55061
55266
  }
@@ -55083,11 +55288,11 @@ function resolveSystemBinding(llm, systemKey) {
55083
55288
  function resolveRegisteredSystemDefault(llm, systemKey) {
55084
55289
  const defaults = getRegisteredSystemDefault(systemKey);
55085
55290
  if (!defaults) return void 0;
55086
- const profile = resolveNamedProfile(llm, defaults.profile, "registered-default");
55087
- if (profile) {
55291
+ const profile2 = resolveNamedProfile(llm, defaults.profile, "registered-default");
55292
+ if (profile2) {
55088
55293
  return {
55089
- ...profile,
55090
- credentialLabel: defaults.credentialLabel ?? profile.credentialLabel
55294
+ ...profile2,
55295
+ credentialLabel: defaults.credentialLabel ?? profile2.credentialLabel
55091
55296
  };
55092
55297
  }
55093
55298
  if (defaults.provider && defaults.model) {
@@ -55542,13 +55747,13 @@ async function upgradeCatalogDefault(resolved) {
55542
55747
  return resolved;
55543
55748
  }
55544
55749
  const { getProviderProfile: getProviderProfile2 } = await Promise.resolve().then(() => (init_provider_registry(), provider_registry_exports));
55545
- const profile = await getProviderProfile2(resolved.provider);
55546
- if (profile?.defaultModel && profile.defaultModel !== resolved.model) {
55750
+ const profile2 = await getProviderProfile2(resolved.provider);
55751
+ if (profile2?.defaultModel && profile2.defaultModel !== resolved.model) {
55547
55752
  logger6.debug(
55548
- { provider: resolved.provider, from: resolved.model, to: profile.defaultModel },
55753
+ { provider: resolved.provider, from: resolved.model, to: profile2.defaultModel },
55549
55754
  "system-resolver: catalog empty \u2014 degrading to static builtin defaultModel floor"
55550
55755
  );
55551
- return { ...resolved, model: profile.defaultModel };
55756
+ return { ...resolved, model: profile2.defaultModel };
55552
55757
  }
55553
55758
  return resolved;
55554
55759
  } catch (err) {
@@ -57068,7 +57273,7 @@ var init_structured_output = __esm({
57068
57273
 
57069
57274
  // packages/core/src/llm/transports/anthropic.ts
57070
57275
  import Anthropic2 from "@anthropic-ai/sdk";
57071
- import { z as z31 } from "zod";
57276
+ import { z as z32 } from "zod";
57072
57277
  function isTextBlock(block) {
57073
57278
  return block.type === "text";
57074
57279
  }
@@ -57140,8 +57345,8 @@ function mapUsage(usage) {
57140
57345
  function zodSchemaFrom(responseFormat) {
57141
57346
  if (responseFormat == null) return null;
57142
57347
  const asAny = responseFormat;
57143
- if (asAny["schema"] instanceof z31.ZodType) return asAny["schema"];
57144
- if (responseFormat instanceof z31.ZodType) return responseFormat;
57348
+ if (asAny["schema"] instanceof z32.ZodType) return asAny["schema"];
57349
+ if (responseFormat instanceof z32.ZodType) return responseFormat;
57145
57350
  return null;
57146
57351
  }
57147
57352
  function getJsonSchemaString(responseFormat) {
@@ -57547,7 +57752,7 @@ ${schemaJson}`
57547
57752
  content = typeof validated === "string" ? validated : JSON.stringify(validated);
57548
57753
  } catch {
57549
57754
  try {
57550
- const repaired = repairResponseModelJson(rawContent, zodSchema2 ?? z31.unknown(), modelName);
57755
+ const repaired = repairResponseModelJson(rawContent, zodSchema2 ?? z32.unknown(), modelName);
57551
57756
  content = typeof repaired === "string" ? repaired : JSON.stringify(repaired);
57552
57757
  } catch {
57553
57758
  content = rawContent || null;
@@ -59112,7 +59317,7 @@ var init_caching = __esm({
59112
59317
 
59113
59318
  // packages/core/src/llm/transports/gemini.ts
59114
59319
  import { GoogleGenerativeAI } from "@google/generative-ai";
59115
- import { z as z32 } from "zod";
59320
+ import { z as z33 } from "zod";
59116
59321
  function messagesToRaw(messages, system) {
59117
59322
  const raw = [];
59118
59323
  if (system) {
@@ -59500,7 +59705,7 @@ var init_gemini2 = __esm({
59500
59705
  const parsed = response["parsed"];
59501
59706
  if (parsed !== null && parsed !== void 0) {
59502
59707
  try {
59503
- const zodResult = z32.string().safeParse(String(parsed));
59708
+ const zodResult = z33.string().safeParse(String(parsed));
59504
59709
  if (!zodResult.success) {
59505
59710
  content = JSON.stringify(parsed);
59506
59711
  } else {
@@ -73897,7 +74102,7 @@ function resolveRef2(ref, ctx) {
73897
74102
  function convertBaseSchema(schema, ctx) {
73898
74103
  if (schema.not !== void 0) {
73899
74104
  if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
73900
- return z33.never();
74105
+ return z34.never();
73901
74106
  }
73902
74107
  throw new Error("not is not supported in Zod (except { not: {} } for never)");
73903
74108
  }
@@ -73919,7 +74124,7 @@ function convertBaseSchema(schema, ctx) {
73919
74124
  return ctx.refs.get(refPath);
73920
74125
  }
73921
74126
  if (ctx.processing.has(refPath)) {
73922
- return z33.lazy(() => {
74127
+ return z34.lazy(() => {
73923
74128
  if (!ctx.refs.has(refPath)) {
73924
74129
  throw new Error(`Circular reference not resolved: ${refPath}`);
73925
74130
  }
@@ -73936,25 +74141,25 @@ function convertBaseSchema(schema, ctx) {
73936
74141
  if (schema.enum !== void 0) {
73937
74142
  const enumValues = schema.enum;
73938
74143
  if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
73939
- return z33.null();
74144
+ return z34.null();
73940
74145
  }
73941
74146
  if (enumValues.length === 0) {
73942
- return z33.never();
74147
+ return z34.never();
73943
74148
  }
73944
74149
  if (enumValues.length === 1) {
73945
- return z33.literal(enumValues[0]);
74150
+ return z34.literal(enumValues[0]);
73946
74151
  }
73947
74152
  if (enumValues.every((v) => typeof v === "string")) {
73948
- return z33.enum(enumValues);
74153
+ return z34.enum(enumValues);
73949
74154
  }
73950
- const literalSchemas = enumValues.map((v) => z33.literal(v));
74155
+ const literalSchemas = enumValues.map((v) => z34.literal(v));
73951
74156
  if (literalSchemas.length < 2) {
73952
74157
  return literalSchemas[0];
73953
74158
  }
73954
- return z33.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
74159
+ return z34.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
73955
74160
  }
73956
74161
  if (schema.const !== void 0) {
73957
- return z33.literal(schema.const);
74162
+ return z34.literal(schema.const);
73958
74163
  }
73959
74164
  const type = schema.type;
73960
74165
  if (Array.isArray(type)) {
@@ -73963,68 +74168,68 @@ function convertBaseSchema(schema, ctx) {
73963
74168
  return convertBaseSchema(typeSchema, ctx);
73964
74169
  });
73965
74170
  if (typeSchemas.length === 0) {
73966
- return z33.never();
74171
+ return z34.never();
73967
74172
  }
73968
74173
  if (typeSchemas.length === 1) {
73969
74174
  return typeSchemas[0];
73970
74175
  }
73971
- return z33.union(typeSchemas);
74176
+ return z34.union(typeSchemas);
73972
74177
  }
73973
74178
  if (!type) {
73974
- return z33.any();
74179
+ return z34.any();
73975
74180
  }
73976
74181
  let zodSchema2;
73977
74182
  switch (type) {
73978
74183
  case "string": {
73979
- let stringSchema = z33.string();
74184
+ let stringSchema = z34.string();
73980
74185
  if (schema.format) {
73981
74186
  const format = schema.format;
73982
74187
  if (format === "email") {
73983
- stringSchema = stringSchema.check(z33.email());
74188
+ stringSchema = stringSchema.check(z34.email());
73984
74189
  } else if (format === "uri" || format === "uri-reference") {
73985
- stringSchema = stringSchema.check(z33.url());
74190
+ stringSchema = stringSchema.check(z34.url());
73986
74191
  } else if (format === "uuid" || format === "guid") {
73987
- stringSchema = stringSchema.check(z33.uuid());
74192
+ stringSchema = stringSchema.check(z34.uuid());
73988
74193
  } else if (format === "date-time") {
73989
- stringSchema = stringSchema.check(z33.iso.datetime());
74194
+ stringSchema = stringSchema.check(z34.iso.datetime());
73990
74195
  } else if (format === "date") {
73991
- stringSchema = stringSchema.check(z33.iso.date());
74196
+ stringSchema = stringSchema.check(z34.iso.date());
73992
74197
  } else if (format === "time") {
73993
- stringSchema = stringSchema.check(z33.iso.time());
74198
+ stringSchema = stringSchema.check(z34.iso.time());
73994
74199
  } else if (format === "duration") {
73995
- stringSchema = stringSchema.check(z33.iso.duration());
74200
+ stringSchema = stringSchema.check(z34.iso.duration());
73996
74201
  } else if (format === "ipv4") {
73997
- stringSchema = stringSchema.check(z33.ipv4());
74202
+ stringSchema = stringSchema.check(z34.ipv4());
73998
74203
  } else if (format === "ipv6") {
73999
- stringSchema = stringSchema.check(z33.ipv6());
74204
+ stringSchema = stringSchema.check(z34.ipv6());
74000
74205
  } else if (format === "mac") {
74001
- stringSchema = stringSchema.check(z33.mac());
74206
+ stringSchema = stringSchema.check(z34.mac());
74002
74207
  } else if (format === "cidr") {
74003
- stringSchema = stringSchema.check(z33.cidrv4());
74208
+ stringSchema = stringSchema.check(z34.cidrv4());
74004
74209
  } else if (format === "cidr-v6") {
74005
- stringSchema = stringSchema.check(z33.cidrv6());
74210
+ stringSchema = stringSchema.check(z34.cidrv6());
74006
74211
  } else if (format === "base64") {
74007
- stringSchema = stringSchema.check(z33.base64());
74212
+ stringSchema = stringSchema.check(z34.base64());
74008
74213
  } else if (format === "base64url") {
74009
- stringSchema = stringSchema.check(z33.base64url());
74214
+ stringSchema = stringSchema.check(z34.base64url());
74010
74215
  } else if (format === "e164") {
74011
- stringSchema = stringSchema.check(z33.e164());
74216
+ stringSchema = stringSchema.check(z34.e164());
74012
74217
  } else if (format === "jwt") {
74013
- stringSchema = stringSchema.check(z33.jwt());
74218
+ stringSchema = stringSchema.check(z34.jwt());
74014
74219
  } else if (format === "emoji") {
74015
- stringSchema = stringSchema.check(z33.emoji());
74220
+ stringSchema = stringSchema.check(z34.emoji());
74016
74221
  } else if (format === "nanoid") {
74017
- stringSchema = stringSchema.check(z33.nanoid());
74222
+ stringSchema = stringSchema.check(z34.nanoid());
74018
74223
  } else if (format === "cuid") {
74019
- stringSchema = stringSchema.check(z33.cuid());
74224
+ stringSchema = stringSchema.check(z34.cuid());
74020
74225
  } else if (format === "cuid2") {
74021
- stringSchema = stringSchema.check(z33.cuid2());
74226
+ stringSchema = stringSchema.check(z34.cuid2());
74022
74227
  } else if (format === "ulid") {
74023
- stringSchema = stringSchema.check(z33.ulid());
74228
+ stringSchema = stringSchema.check(z34.ulid());
74024
74229
  } else if (format === "xid") {
74025
- stringSchema = stringSchema.check(z33.xid());
74230
+ stringSchema = stringSchema.check(z34.xid());
74026
74231
  } else if (format === "ksuid") {
74027
- stringSchema = stringSchema.check(z33.ksuid());
74232
+ stringSchema = stringSchema.check(z34.ksuid());
74028
74233
  }
74029
74234
  }
74030
74235
  if (typeof schema.minLength === "number") {
@@ -74041,7 +74246,7 @@ function convertBaseSchema(schema, ctx) {
74041
74246
  }
74042
74247
  case "number":
74043
74248
  case "integer": {
74044
- let numberSchema = type === "integer" ? z33.number().int() : z33.number();
74249
+ let numberSchema = type === "integer" ? z34.number().int() : z34.number();
74045
74250
  if (typeof schema.minimum === "number") {
74046
74251
  numberSchema = numberSchema.min(schema.minimum);
74047
74252
  }
@@ -74065,11 +74270,11 @@ function convertBaseSchema(schema, ctx) {
74065
74270
  break;
74066
74271
  }
74067
74272
  case "boolean": {
74068
- zodSchema2 = z33.boolean();
74273
+ zodSchema2 = z34.boolean();
74069
74274
  break;
74070
74275
  }
74071
74276
  case "null": {
74072
- zodSchema2 = z33.null();
74277
+ zodSchema2 = z34.null();
74073
74278
  break;
74074
74279
  }
74075
74280
  case "object": {
@@ -74082,14 +74287,14 @@ function convertBaseSchema(schema, ctx) {
74082
74287
  }
74083
74288
  if (schema.propertyNames) {
74084
74289
  const keySchema = convertSchema(schema.propertyNames, ctx);
74085
- const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z33.any();
74290
+ const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z34.any();
74086
74291
  if (Object.keys(shape).length === 0) {
74087
- zodSchema2 = z33.record(keySchema, valueSchema);
74292
+ zodSchema2 = z34.record(keySchema, valueSchema);
74088
74293
  break;
74089
74294
  }
74090
- const objectSchema2 = z33.object(shape).passthrough();
74091
- const recordSchema = z33.looseRecord(keySchema, valueSchema);
74092
- zodSchema2 = z33.intersection(objectSchema2, recordSchema);
74295
+ const objectSchema2 = z34.object(shape).passthrough();
74296
+ const recordSchema = z34.looseRecord(keySchema, valueSchema);
74297
+ zodSchema2 = z34.intersection(objectSchema2, recordSchema);
74093
74298
  break;
74094
74299
  }
74095
74300
  if (schema.patternProperties) {
@@ -74098,28 +74303,28 @@ function convertBaseSchema(schema, ctx) {
74098
74303
  const looseRecords = [];
74099
74304
  for (const pattern of patternKeys) {
74100
74305
  const patternValue = convertSchema(patternProps[pattern], ctx);
74101
- const keySchema = z33.string().regex(new RegExp(pattern));
74102
- looseRecords.push(z33.looseRecord(keySchema, patternValue));
74306
+ const keySchema = z34.string().regex(new RegExp(pattern));
74307
+ looseRecords.push(z34.looseRecord(keySchema, patternValue));
74103
74308
  }
74104
74309
  const schemasToIntersect = [];
74105
74310
  if (Object.keys(shape).length > 0) {
74106
- schemasToIntersect.push(z33.object(shape).passthrough());
74311
+ schemasToIntersect.push(z34.object(shape).passthrough());
74107
74312
  }
74108
74313
  schemasToIntersect.push(...looseRecords);
74109
74314
  if (schemasToIntersect.length === 0) {
74110
- zodSchema2 = z33.object({}).passthrough();
74315
+ zodSchema2 = z34.object({}).passthrough();
74111
74316
  } else if (schemasToIntersect.length === 1) {
74112
74317
  zodSchema2 = schemasToIntersect[0];
74113
74318
  } else {
74114
- let result = z33.intersection(schemasToIntersect[0], schemasToIntersect[1]);
74319
+ let result = z34.intersection(schemasToIntersect[0], schemasToIntersect[1]);
74115
74320
  for (let i = 2; i < schemasToIntersect.length; i++) {
74116
- result = z33.intersection(result, schemasToIntersect[i]);
74321
+ result = z34.intersection(result, schemasToIntersect[i]);
74117
74322
  }
74118
74323
  zodSchema2 = result;
74119
74324
  }
74120
74325
  break;
74121
74326
  }
74122
- const objectSchema = z33.object(shape);
74327
+ const objectSchema = z34.object(shape);
74123
74328
  if (schema.additionalProperties === false) {
74124
74329
  zodSchema2 = objectSchema.strict();
74125
74330
  } else if (typeof schema.additionalProperties === "object") {
@@ -74136,33 +74341,33 @@ function convertBaseSchema(schema, ctx) {
74136
74341
  const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
74137
74342
  const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
74138
74343
  if (rest) {
74139
- zodSchema2 = z33.tuple(tupleItems).rest(rest);
74344
+ zodSchema2 = z34.tuple(tupleItems).rest(rest);
74140
74345
  } else {
74141
- zodSchema2 = z33.tuple(tupleItems);
74346
+ zodSchema2 = z34.tuple(tupleItems);
74142
74347
  }
74143
74348
  if (typeof schema.minItems === "number") {
74144
- zodSchema2 = zodSchema2.check(z33.minLength(schema.minItems));
74349
+ zodSchema2 = zodSchema2.check(z34.minLength(schema.minItems));
74145
74350
  }
74146
74351
  if (typeof schema.maxItems === "number") {
74147
- zodSchema2 = zodSchema2.check(z33.maxLength(schema.maxItems));
74352
+ zodSchema2 = zodSchema2.check(z34.maxLength(schema.maxItems));
74148
74353
  }
74149
74354
  } else if (Array.isArray(items)) {
74150
74355
  const tupleItems = items.map((item) => convertSchema(item, ctx));
74151
74356
  const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
74152
74357
  if (rest) {
74153
- zodSchema2 = z33.tuple(tupleItems).rest(rest);
74358
+ zodSchema2 = z34.tuple(tupleItems).rest(rest);
74154
74359
  } else {
74155
- zodSchema2 = z33.tuple(tupleItems);
74360
+ zodSchema2 = z34.tuple(tupleItems);
74156
74361
  }
74157
74362
  if (typeof schema.minItems === "number") {
74158
- zodSchema2 = zodSchema2.check(z33.minLength(schema.minItems));
74363
+ zodSchema2 = zodSchema2.check(z34.minLength(schema.minItems));
74159
74364
  }
74160
74365
  if (typeof schema.maxItems === "number") {
74161
- zodSchema2 = zodSchema2.check(z33.maxLength(schema.maxItems));
74366
+ zodSchema2 = zodSchema2.check(z34.maxLength(schema.maxItems));
74162
74367
  }
74163
74368
  } else if (items !== void 0) {
74164
74369
  const element = convertSchema(items, ctx);
74165
- let arraySchema = z33.array(element);
74370
+ let arraySchema = z34.array(element);
74166
74371
  if (typeof schema.minItems === "number") {
74167
74372
  arraySchema = arraySchema.min(schema.minItems);
74168
74373
  }
@@ -74171,7 +74376,7 @@ function convertBaseSchema(schema, ctx) {
74171
74376
  }
74172
74377
  zodSchema2 = arraySchema;
74173
74378
  } else {
74174
- zodSchema2 = z33.array(z33.any());
74379
+ zodSchema2 = z34.array(z34.any());
74175
74380
  }
74176
74381
  break;
74177
74382
  }
@@ -74188,37 +74393,37 @@ function convertBaseSchema(schema, ctx) {
74188
74393
  }
74189
74394
  function convertSchema(schema, ctx) {
74190
74395
  if (typeof schema === "boolean") {
74191
- return schema ? z33.any() : z33.never();
74396
+ return schema ? z34.any() : z34.never();
74192
74397
  }
74193
74398
  let baseSchema = convertBaseSchema(schema, ctx);
74194
74399
  const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
74195
74400
  if (schema.anyOf && Array.isArray(schema.anyOf)) {
74196
74401
  const options = schema.anyOf.map((s) => convertSchema(s, ctx));
74197
- const anyOfUnion = z33.union(options);
74198
- baseSchema = hasExplicitType ? z33.intersection(baseSchema, anyOfUnion) : anyOfUnion;
74402
+ const anyOfUnion = z34.union(options);
74403
+ baseSchema = hasExplicitType ? z34.intersection(baseSchema, anyOfUnion) : anyOfUnion;
74199
74404
  }
74200
74405
  if (schema.oneOf && Array.isArray(schema.oneOf)) {
74201
74406
  const options = schema.oneOf.map((s) => convertSchema(s, ctx));
74202
- const oneOfUnion = z33.xor(options);
74203
- baseSchema = hasExplicitType ? z33.intersection(baseSchema, oneOfUnion) : oneOfUnion;
74407
+ const oneOfUnion = z34.xor(options);
74408
+ baseSchema = hasExplicitType ? z34.intersection(baseSchema, oneOfUnion) : oneOfUnion;
74204
74409
  }
74205
74410
  if (schema.allOf && Array.isArray(schema.allOf)) {
74206
74411
  if (schema.allOf.length === 0) {
74207
- baseSchema = hasExplicitType ? baseSchema : z33.any();
74412
+ baseSchema = hasExplicitType ? baseSchema : z34.any();
74208
74413
  } else {
74209
74414
  let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
74210
74415
  const startIdx = hasExplicitType ? 0 : 1;
74211
74416
  for (let i = startIdx; i < schema.allOf.length; i++) {
74212
- result = z33.intersection(result, convertSchema(schema.allOf[i], ctx));
74417
+ result = z34.intersection(result, convertSchema(schema.allOf[i], ctx));
74213
74418
  }
74214
74419
  baseSchema = result;
74215
74420
  }
74216
74421
  }
74217
74422
  if (schema.nullable === true && ctx.version === "openapi-3.0") {
74218
- baseSchema = z33.nullable(baseSchema);
74423
+ baseSchema = z34.nullable(baseSchema);
74219
74424
  }
74220
74425
  if (schema.readOnly === true) {
74221
- baseSchema = z33.readonly(baseSchema);
74426
+ baseSchema = z34.readonly(baseSchema);
74222
74427
  }
74223
74428
  const extraMeta = {};
74224
74429
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
@@ -74245,7 +74450,7 @@ function convertSchema(schema, ctx) {
74245
74450
  }
74246
74451
  function fromJSONSchema(schema, params) {
74247
74452
  if (typeof schema === "boolean") {
74248
- return schema ? z33.any() : z33.never();
74453
+ return schema ? z34.any() : z34.never();
74249
74454
  }
74250
74455
  const version2 = detectVersion(schema, params?.defaultTarget);
74251
74456
  const defs = schema.$defs || schema.definitions || {};
@@ -74259,14 +74464,14 @@ function fromJSONSchema(schema, params) {
74259
74464
  };
74260
74465
  return convertSchema(schema, ctx);
74261
74466
  }
74262
- var z33, RECOGNIZED_KEYS;
74467
+ var z34, RECOGNIZED_KEYS;
74263
74468
  var init_from_json_schema = __esm({
74264
74469
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js"() {
74265
74470
  init_registries();
74266
74471
  init_checks2();
74267
74472
  init_iso();
74268
74473
  init_schemas2();
74269
- z33 = {
74474
+ z34 = {
74270
74475
  ...schemas_exports2,
74271
74476
  ...checks_exports2,
74272
74477
  iso: iso_exports