@cleocode/adapters 2026.5.77 → 2026.5.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -790,10 +790,13 @@ function parseClaudeCodeCredentials(buf) {
790
790
  const expiresAt = typeof block["expiresAt"] === "number" ? block["expiresAt"] : void 0;
791
791
  if (expiresAt !== void 0 && Date.now() > expiresAt) return null;
792
792
  const refreshToken = typeof block["refreshToken"] === "string" && block["refreshToken"].trim() ? block["refreshToken"] : void 0;
793
+ const rawScopes = block["scopes"];
794
+ const scopes = Array.isArray(rawScopes) && rawScopes.every((s) => typeof s === "string") ? rawScopes : void 0;
793
795
  return {
794
796
  accessToken: accessToken.trim(),
795
797
  ...expiresAt !== void 0 ? { expiresAt } : {},
796
- ...refreshToken !== void 0 ? { refreshToken } : {}
798
+ ...refreshToken !== void 0 ? { refreshToken } : {},
799
+ ...scopes !== void 0 ? { scopes } : {}
797
800
  };
798
801
  } catch {
799
802
  return null;
@@ -1166,6 +1169,192 @@ var init_peer = __esm({
1166
1169
  }
1167
1170
  });
1168
1171
 
1172
+ // packages/contracts/src/release/plan.ts
1173
+ import { z as z4 } from "zod";
1174
+ var RELEASE_CHANNEL, RELEASE_SCHEME, RELEASE_KIND, RELEASE_STATUS, GATE_STATUS, GATE_NAME, PLATFORM_TUPLE, PUBLISHER, TASK_KIND, IMPACT, RESOLVED_SOURCE, ReleaseChannelSchema, ReleaseSchemeSchema, ReleaseKindSchema, ReleaseStatusSchema, GateStatusSchema, GateNameSchema, PlatformTupleSchema, PublisherSchema, TaskKindSchema, ImpactSchema, ResolvedSourceSchema, Iso8601, NonEmptyString, ReleasePlanTaskSchema, ReleaseGateSchema, ReleasePlatformMatrixEntrySchema, ReleasePreflightSummarySchema, ReleasePlanChangelogSchema, ReleasePlanMetaSchema, ReleasePlanSchema;
1175
+ var init_plan = __esm({
1176
+ "packages/contracts/src/release/plan.ts"() {
1177
+ "use strict";
1178
+ RELEASE_CHANNEL = ["latest", "beta", "alpha", "rc"];
1179
+ RELEASE_SCHEME = ["calver", "semver", "calver-suffix"];
1180
+ RELEASE_KIND = ["regular", "hotfix", "prerelease"];
1181
+ RELEASE_STATUS = [
1182
+ "planned",
1183
+ "pr-opened",
1184
+ "pr-merged",
1185
+ "published",
1186
+ "reconciled",
1187
+ "rolled_back",
1188
+ "failed",
1189
+ "cancelled"
1190
+ ];
1191
+ GATE_STATUS = ["passed", "failed", "skipped", "unresolved"];
1192
+ GATE_NAME = ["test", "build", "lint", "typecheck", "audit", "security-scan"];
1193
+ PLATFORM_TUPLE = [
1194
+ "linux-x64",
1195
+ "linux-arm64",
1196
+ "macos-x64",
1197
+ "macos-arm64",
1198
+ "windows-x64",
1199
+ "any"
1200
+ ];
1201
+ PUBLISHER = ["npm", "cargo", "docker", "pypi", "github-release", "binary"];
1202
+ TASK_KIND = [
1203
+ "feat",
1204
+ "fix",
1205
+ "chore",
1206
+ "docs",
1207
+ "refactor",
1208
+ "test",
1209
+ "perf",
1210
+ "revert",
1211
+ "breaking",
1212
+ "hotfix"
1213
+ ];
1214
+ IMPACT = ["major", "minor", "patch"];
1215
+ RESOLVED_SOURCE = ["project-context", "language-default", "legacy-alias"];
1216
+ ReleaseChannelSchema = z4.enum(RELEASE_CHANNEL);
1217
+ ReleaseSchemeSchema = z4.enum(RELEASE_SCHEME);
1218
+ ReleaseKindSchema = z4.enum(RELEASE_KIND);
1219
+ ReleaseStatusSchema = z4.enum(RELEASE_STATUS);
1220
+ GateStatusSchema = z4.enum(GATE_STATUS);
1221
+ GateNameSchema = z4.enum(GATE_NAME);
1222
+ PlatformTupleSchema = z4.enum(PLATFORM_TUPLE);
1223
+ PublisherSchema = z4.enum(PUBLISHER);
1224
+ TaskKindSchema = z4.enum(TASK_KIND);
1225
+ ImpactSchema = z4.enum(IMPACT);
1226
+ ResolvedSourceSchema = z4.enum(RESOLVED_SOURCE);
1227
+ Iso8601 = z4.iso.datetime({ offset: true });
1228
+ NonEmptyString = z4.string().min(1);
1229
+ ReleasePlanTaskSchema = z4.object({
1230
+ /** Task ID (e.g. "T10001"). Format intentionally loose so historical IDs validate. */
1231
+ id: NonEmptyString,
1232
+ /** Conventional-commit-aligned task classification. */
1233
+ kind: TaskKindSchema,
1234
+ /** SemVer impact classification. */
1235
+ impact: ImpactSchema,
1236
+ /** Human-readable changelog line for this task. */
1237
+ userFacingSummary: z4.string(),
1238
+ /**
1239
+ * ADR-051 evidence atoms attesting the task's gate results. Format is
1240
+ * `kind:value` (e.g. `commit:abc123`, `test-run:vitest.json`). The contract
1241
+ * accepts empty arrays so legacy plans validate; `cleo release plan`
1242
+ * enforces non-empty via R-301.
1243
+ */
1244
+ evidenceAtoms: z4.array(NonEmptyString),
1245
+ /** IVTR phase at plan time — informational only per R-316. */
1246
+ ivtrPhaseAtPlan: z4.string().optional(),
1247
+ /** Epic this task rolls up to, locked at plan time per R-303. */
1248
+ epicAncestor: NonEmptyString
1249
+ });
1250
+ ReleaseGateSchema = z4.object({
1251
+ /** Canonical gate name. */
1252
+ name: GateNameSchema,
1253
+ /** ADR-051 atom string identifying the resolved tool (e.g. `tool:test`). */
1254
+ atom: NonEmptyString,
1255
+ /** Gate execution status at plan time. */
1256
+ status: GateStatusSchema,
1257
+ /** ISO-8601 timestamp the gate was last verified. */
1258
+ lastVerifiedAt: Iso8601,
1259
+ /** Resolved shell command (e.g. `pnpm run test`). Optional for unresolved gates. */
1260
+ resolvedCommand: z4.string().optional(),
1261
+ /** Provenance of the resolved command. Optional for unresolved gates. */
1262
+ resolvedSource: ResolvedSourceSchema.optional()
1263
+ });
1264
+ ReleasePlatformMatrixEntrySchema = z4.object({
1265
+ /** Target platform tuple. */
1266
+ platform: PlatformTupleSchema,
1267
+ /** Distribution backend. */
1268
+ publisher: PublisherSchema,
1269
+ /** Package identifier on the target backend (e.g. `@cleocode/cleo`). */
1270
+ package: NonEmptyString,
1271
+ /** Whether to run the GHA smoke job for this matrix entry. */
1272
+ smoke: z4.boolean().default(true).optional()
1273
+ });
1274
+ ReleasePreflightSummarySchema = z4.object({
1275
+ /** True if esbuild externals are out of sync with package.json. */
1276
+ esbuildExternalsDrift: z4.boolean(),
1277
+ /** True if `pnpm-lock.yaml` diverges from the workspace manifest. */
1278
+ lockfileDrift: z4.boolean(),
1279
+ /** True if all epic children are in terminal lifecycle states. */
1280
+ epicCompletenessClean: z4.boolean(),
1281
+ /** True if no task appears in multiple in-flight release plans. */
1282
+ doubleListingClean: z4.boolean(),
1283
+ /** Non-fatal preflight warnings (e.g. unresolved tools per R-024). */
1284
+ preflightWarnings: z4.array(z4.string()).default([]).optional()
1285
+ });
1286
+ ReleasePlanChangelogSchema = z4.object({
1287
+ /** `kind=feat` tasks. */
1288
+ features: z4.array(NonEmptyString).default([]),
1289
+ /** `kind=fix` or `kind=hotfix` tasks. */
1290
+ fixes: z4.array(NonEmptyString).default([]),
1291
+ /** `kind=chore`, `docs`, `refactor`, `test`, `perf` tasks. */
1292
+ chores: z4.array(NonEmptyString).default([]),
1293
+ /** `kind=breaking` or `kind=revert` tasks. */
1294
+ breaking: z4.array(NonEmptyString).default([])
1295
+ });
1296
+ ReleasePlanMetaSchema = z4.object({
1297
+ /** True if this is the project's first ever release. */
1298
+ firstEverRelease: z4.boolean().optional(),
1299
+ /** Canonical tool names that could not be resolved at plan time. */
1300
+ unresolvedTools: z4.array(z4.string()).optional(),
1301
+ /** Project archetype detected at plan time. */
1302
+ archetype: z4.string().optional()
1303
+ }).catchall(z4.unknown());
1304
+ ReleasePlanSchema = z4.object({
1305
+ /** Schema URL for this plan version. */
1306
+ $schema: z4.string().optional(),
1307
+ /** Requested version string (e.g. "v2026.6.0"). Includes the leading `v`. */
1308
+ version: NonEmptyString,
1309
+ /** Resolved version string after suffix application (e.g. "v2026.6.0.2"). */
1310
+ resolvedVersion: NonEmptyString,
1311
+ /** True if a `calver-suffix` was applied to disambiguate a same-day hotfix. */
1312
+ suffixApplied: z4.boolean(),
1313
+ /** Versioning scheme governing `version` / `resolvedVersion`. */
1314
+ scheme: ReleaseSchemeSchema,
1315
+ /** npm dist-tag channel for this release. */
1316
+ channel: ReleaseChannelSchema,
1317
+ /** Epic ID this release ships. */
1318
+ epicId: NonEmptyString,
1319
+ /** Release-kind classification. */
1320
+ releaseKind: ReleaseKindSchema,
1321
+ /** ISO-8601 timestamp the plan was written. */
1322
+ createdAt: Iso8601,
1323
+ /** Identifier of the actor that wrote the plan (agent name or operator). */
1324
+ createdBy: NonEmptyString,
1325
+ /**
1326
+ * Version of the previous release on the same channel. MUST be `null` only
1327
+ * for first-ever releases (R-300, enforced at the verb layer).
1328
+ */
1329
+ previousVersion: z4.string().nullable(),
1330
+ /** Git tag of the previous release (typically `previousVersion` prefixed). */
1331
+ previousTag: z4.string().nullable(),
1332
+ /** ISO-8601 timestamp the previous release was published. */
1333
+ previousShippedAt: Iso8601.nullable(),
1334
+ /** Tasks rolled into this release. */
1335
+ tasks: z4.array(ReleasePlanTaskSchema),
1336
+ /** Bucketed changelog. */
1337
+ changelog: ReleasePlanChangelogSchema,
1338
+ /** Per-gate verification status. */
1339
+ gates: z4.array(ReleaseGateSchema),
1340
+ /** Platform / publisher matrix. */
1341
+ platformMatrix: z4.array(ReleasePlatformMatrixEntrySchema),
1342
+ /** Preflight summary from `cleo release plan`. */
1343
+ preflightSummary: ReleasePreflightSummarySchema,
1344
+ /** URL of the GHA workflow run (populated by `release-prepare.yml`). */
1345
+ workflowRunUrl: z4.string().nullable(),
1346
+ /** URL of the bump PR (populated by `cleo release open`). */
1347
+ prUrl: z4.string().nullable(),
1348
+ /** Merge commit SHA on `main` (populated by `release-publish.yml`). */
1349
+ mergeCommitSha: z4.string().nullable(),
1350
+ /** Current FSM state per R-302. */
1351
+ status: ReleaseStatusSchema,
1352
+ /** Informational / forward-compat metadata. */
1353
+ meta: ReleasePlanMetaSchema.optional()
1354
+ });
1355
+ }
1356
+ });
1357
+
1169
1358
  // packages/contracts/src/session.ts
1170
1359
  var init_session2 = __esm({
1171
1360
  "packages/contracts/src/session.ts"() {
@@ -1174,52 +1363,52 @@ var init_session2 = __esm({
1174
1363
  });
1175
1364
 
1176
1365
  // packages/contracts/src/session-journal.ts
1177
- import { z as z4 } from "zod";
1366
+ import { z as z5 } from "zod";
1178
1367
  var SESSION_JOURNAL_SCHEMA_VERSION, sessionJournalDoctorSummarySchema, sessionJournalDebriefSummarySchema, sessionJournalEntrySchema;
1179
1368
  var init_session_journal = __esm({
1180
1369
  "packages/contracts/src/session-journal.ts"() {
1181
1370
  "use strict";
1182
1371
  SESSION_JOURNAL_SCHEMA_VERSION = "1.0";
1183
- sessionJournalDoctorSummarySchema = z4.object({
1372
+ sessionJournalDoctorSummarySchema = z5.object({
1184
1373
  /** `true` when zero noise patterns were detected. */
1185
- isClean: z4.boolean(),
1374
+ isClean: z5.boolean(),
1186
1375
  /** Total number of noise findings across all patterns. */
1187
- findingsCount: z4.number().int().nonnegative(),
1376
+ findingsCount: z5.number().int().nonnegative(),
1188
1377
  /** Pattern names that were detected (empty when isClean). */
1189
- patterns: z4.array(z4.string()),
1378
+ patterns: z5.array(z5.string()),
1190
1379
  /** Total brain entries scanned. `0` = empty or unavailable. */
1191
- totalScanned: z4.number().int().nonnegative()
1380
+ totalScanned: z5.number().int().nonnegative()
1192
1381
  });
1193
- sessionJournalDebriefSummarySchema = z4.object({
1382
+ sessionJournalDebriefSummarySchema = z5.object({
1194
1383
  /** First 200 characters of the session end note (if provided). */
1195
- noteExcerpt: z4.string().max(200).optional(),
1384
+ noteExcerpt: z5.string().max(200).optional(),
1196
1385
  /** Number of tasks completed during the session. */
1197
- tasksCompletedCount: z4.number().int().nonnegative(),
1386
+ tasksCompletedCount: z5.number().int().nonnegative(),
1198
1387
  /** Up to 5 task IDs (not titles) that were the focus of the session. */
1199
- tasksFocused: z4.array(z4.string()).max(5).optional()
1388
+ tasksFocused: z5.array(z5.string()).max(5).optional()
1200
1389
  });
1201
- sessionJournalEntrySchema = z4.object({
1390
+ sessionJournalEntrySchema = z5.object({
1202
1391
  // Identity
1203
1392
  /** Schema version for forward-compatibility. Always `'1.0'` in this release. */
1204
- schemaVersion: z4.literal(SESSION_JOURNAL_SCHEMA_VERSION),
1393
+ schemaVersion: z5.literal(SESSION_JOURNAL_SCHEMA_VERSION),
1205
1394
  /** ISO 8601 timestamp when the entry was written. */
1206
- timestamp: z4.string(),
1395
+ timestamp: z5.string(),
1207
1396
  /** CLEO session ID (e.g. `ses_20260424055456_ede571`). */
1208
- sessionId: z4.string(),
1397
+ sessionId: z5.string(),
1209
1398
  /** Event type that triggered this journal entry. */
1210
- eventType: z4.enum(["session_start", "session_end", "observation", "decision", "error"]),
1399
+ eventType: z5.enum(["session_start", "session_end", "observation", "decision", "error"]),
1211
1400
  // Session metadata (set on session_start / session_end)
1212
1401
  /** Agent identifier (e.g. `cleo-prime`, `claude-code`). */
1213
- agentIdentifier: z4.string().optional(),
1402
+ agentIdentifier: z5.string().optional(),
1214
1403
  /** Provider adapter ID active for this session. */
1215
- providerId: z4.string().optional(),
1404
+ providerId: z5.string().optional(),
1216
1405
  /** Session scope string (e.g. `'global'` or `'epic:T1263'`). */
1217
- scope: z4.string().optional(),
1406
+ scope: z5.string().optional(),
1218
1407
  // Session-end fields
1219
1408
  /** Duration of the session in seconds (session_end only). */
1220
- duration: z4.number().int().nonnegative().optional(),
1409
+ duration: z5.number().int().nonnegative().optional(),
1221
1410
  /** Task IDs (not titles) completed during the session. */
1222
- tasksCompleted: z4.array(z4.string()).optional(),
1411
+ tasksCompleted: z5.array(z5.string()).optional(),
1223
1412
  // Doctor summary (T1262 absorbed)
1224
1413
  /** Compact result of `scanBrainNoise` run at session-end. */
1225
1414
  doctorSummary: sessionJournalDoctorSummarySchema.optional(),
@@ -1228,7 +1417,7 @@ var init_session_journal = __esm({
1228
1417
  debriefSummary: sessionJournalDebriefSummarySchema.optional(),
1229
1418
  // Optional hash chain
1230
1419
  /** SHA-256 hex of the previous entry's raw JSON string (for integrity chain). */
1231
- prevEntryHash: z4.string().optional()
1420
+ prevEntryHash: z5.string().optional()
1232
1421
  });
1233
1422
  }
1234
1423
  });
@@ -1248,52 +1437,52 @@ var init_task = __esm({
1248
1437
  });
1249
1438
 
1250
1439
  // packages/contracts/src/task-evidence.ts
1251
- import { z as z5 } from "zod";
1440
+ import { z as z6 } from "zod";
1252
1441
  var fileEvidenceSchema, logEvidenceSchema, screenshotEvidenceSchema, testOutputEvidenceSchema, commandOutputEvidenceSchema, taskEvidenceSchema;
1253
1442
  var init_task_evidence = __esm({
1254
1443
  "packages/contracts/src/task-evidence.ts"() {
1255
1444
  "use strict";
1256
- fileEvidenceSchema = z5.object({
1257
- kind: z5.literal("file"),
1258
- sha256: z5.string().length(64),
1259
- timestamp: z5.string().datetime(),
1260
- path: z5.string().min(1),
1261
- mime: z5.string().optional(),
1262
- description: z5.string().optional()
1263
- });
1264
- logEvidenceSchema = z5.object({
1265
- kind: z5.literal("log"),
1266
- sha256: z5.string().length(64),
1267
- timestamp: z5.string().datetime(),
1268
- source: z5.string().min(1),
1269
- description: z5.string().optional()
1270
- });
1271
- screenshotEvidenceSchema = z5.object({
1272
- kind: z5.literal("screenshot"),
1273
- sha256: z5.string().length(64),
1274
- timestamp: z5.string().datetime(),
1275
- mime: z5.enum(["image/png", "image/jpeg", "image/webp"]).optional(),
1276
- description: z5.string().optional()
1277
- });
1278
- testOutputEvidenceSchema = z5.object({
1279
- kind: z5.literal("test-output"),
1280
- sha256: z5.string().length(64),
1281
- timestamp: z5.string().datetime(),
1282
- passed: z5.number().int().nonnegative(),
1283
- failed: z5.number().int().nonnegative(),
1284
- skipped: z5.number().int().nonnegative(),
1285
- exitCode: z5.number().int(),
1286
- description: z5.string().optional()
1287
- });
1288
- commandOutputEvidenceSchema = z5.object({
1289
- kind: z5.literal("command-output"),
1290
- sha256: z5.string().length(64),
1291
- timestamp: z5.string().datetime(),
1292
- cmd: z5.string().min(1),
1293
- exitCode: z5.number().int(),
1294
- description: z5.string().optional()
1295
- });
1296
- taskEvidenceSchema = z5.discriminatedUnion("kind", [
1445
+ fileEvidenceSchema = z6.object({
1446
+ kind: z6.literal("file"),
1447
+ sha256: z6.string().length(64),
1448
+ timestamp: z6.string().datetime(),
1449
+ path: z6.string().min(1),
1450
+ mime: z6.string().optional(),
1451
+ description: z6.string().optional()
1452
+ });
1453
+ logEvidenceSchema = z6.object({
1454
+ kind: z6.literal("log"),
1455
+ sha256: z6.string().length(64),
1456
+ timestamp: z6.string().datetime(),
1457
+ source: z6.string().min(1),
1458
+ description: z6.string().optional()
1459
+ });
1460
+ screenshotEvidenceSchema = z6.object({
1461
+ kind: z6.literal("screenshot"),
1462
+ sha256: z6.string().length(64),
1463
+ timestamp: z6.string().datetime(),
1464
+ mime: z6.enum(["image/png", "image/jpeg", "image/webp"]).optional(),
1465
+ description: z6.string().optional()
1466
+ });
1467
+ testOutputEvidenceSchema = z6.object({
1468
+ kind: z6.literal("test-output"),
1469
+ sha256: z6.string().length(64),
1470
+ timestamp: z6.string().datetime(),
1471
+ passed: z6.number().int().nonnegative(),
1472
+ failed: z6.number().int().nonnegative(),
1473
+ skipped: z6.number().int().nonnegative(),
1474
+ exitCode: z6.number().int(),
1475
+ description: z6.string().optional()
1476
+ });
1477
+ commandOutputEvidenceSchema = z6.object({
1478
+ kind: z6.literal("command-output"),
1479
+ sha256: z6.string().length(64),
1480
+ timestamp: z6.string().datetime(),
1481
+ cmd: z6.string().min(1),
1482
+ exitCode: z6.number().int(),
1483
+ description: z6.string().optional()
1484
+ });
1485
+ taskEvidenceSchema = z6.discriminatedUnion("kind", [
1297
1486
  fileEvidenceSchema,
1298
1487
  logEvidenceSchema,
1299
1488
  screenshotEvidenceSchema,
@@ -1304,12 +1493,12 @@ var init_task_evidence = __esm({
1304
1493
  });
1305
1494
 
1306
1495
  // packages/contracts/src/tasks/archive.ts
1307
- import { z as z6 } from "zod";
1496
+ import { z as z7 } from "zod";
1308
1497
  var ArchiveReason, ARCHIVE_REASON_VALUES;
1309
1498
  var init_archive = __esm({
1310
1499
  "packages/contracts/src/tasks/archive.ts"() {
1311
1500
  "use strict";
1312
- ArchiveReason = z6.enum([
1501
+ ArchiveReason = z7.enum([
1313
1502
  "verified",
1314
1503
  "reconciled",
1315
1504
  "superseded",
@@ -1340,6 +1529,7 @@ var init_src = __esm({
1340
1529
  init_nexus_scope_map();
1341
1530
  init_params();
1342
1531
  init_peer();
1532
+ init_plan();
1343
1533
  init_session2();
1344
1534
  init_session_journal();
1345
1535
  init_status_registry();
@@ -15365,7 +15555,7 @@ function resolveRef(ref, ctx) {
15365
15555
  function convertBaseSchema(schema, ctx) {
15366
15556
  if (schema.not !== void 0) {
15367
15557
  if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
15368
- return z7.never();
15558
+ return z8.never();
15369
15559
  }
15370
15560
  throw new Error("not is not supported in Zod (except { not: {} } for never)");
15371
15561
  }
@@ -15387,7 +15577,7 @@ function convertBaseSchema(schema, ctx) {
15387
15577
  return ctx.refs.get(refPath);
15388
15578
  }
15389
15579
  if (ctx.processing.has(refPath)) {
15390
- return z7.lazy(() => {
15580
+ return z8.lazy(() => {
15391
15581
  if (!ctx.refs.has(refPath)) {
15392
15582
  throw new Error(`Circular reference not resolved: ${refPath}`);
15393
15583
  }
@@ -15404,25 +15594,25 @@ function convertBaseSchema(schema, ctx) {
15404
15594
  if (schema.enum !== void 0) {
15405
15595
  const enumValues = schema.enum;
15406
15596
  if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
15407
- return z7.null();
15597
+ return z8.null();
15408
15598
  }
15409
15599
  if (enumValues.length === 0) {
15410
- return z7.never();
15600
+ return z8.never();
15411
15601
  }
15412
15602
  if (enumValues.length === 1) {
15413
- return z7.literal(enumValues[0]);
15603
+ return z8.literal(enumValues[0]);
15414
15604
  }
15415
15605
  if (enumValues.every((v) => typeof v === "string")) {
15416
- return z7.enum(enumValues);
15606
+ return z8.enum(enumValues);
15417
15607
  }
15418
- const literalSchemas = enumValues.map((v) => z7.literal(v));
15608
+ const literalSchemas = enumValues.map((v) => z8.literal(v));
15419
15609
  if (literalSchemas.length < 2) {
15420
15610
  return literalSchemas[0];
15421
15611
  }
15422
- return z7.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
15612
+ return z8.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
15423
15613
  }
15424
15614
  if (schema.const !== void 0) {
15425
- return z7.literal(schema.const);
15615
+ return z8.literal(schema.const);
15426
15616
  }
15427
15617
  const type = schema.type;
15428
15618
  if (Array.isArray(type)) {
@@ -15431,68 +15621,68 @@ function convertBaseSchema(schema, ctx) {
15431
15621
  return convertBaseSchema(typeSchema, ctx);
15432
15622
  });
15433
15623
  if (typeSchemas.length === 0) {
15434
- return z7.never();
15624
+ return z8.never();
15435
15625
  }
15436
15626
  if (typeSchemas.length === 1) {
15437
15627
  return typeSchemas[0];
15438
15628
  }
15439
- return z7.union(typeSchemas);
15629
+ return z8.union(typeSchemas);
15440
15630
  }
15441
15631
  if (!type) {
15442
- return z7.any();
15632
+ return z8.any();
15443
15633
  }
15444
15634
  let zodSchema2;
15445
15635
  switch (type) {
15446
15636
  case "string": {
15447
- let stringSchema = z7.string();
15637
+ let stringSchema = z8.string();
15448
15638
  if (schema.format) {
15449
15639
  const format = schema.format;
15450
15640
  if (format === "email") {
15451
- stringSchema = stringSchema.check(z7.email());
15641
+ stringSchema = stringSchema.check(z8.email());
15452
15642
  } else if (format === "uri" || format === "uri-reference") {
15453
- stringSchema = stringSchema.check(z7.url());
15643
+ stringSchema = stringSchema.check(z8.url());
15454
15644
  } else if (format === "uuid" || format === "guid") {
15455
- stringSchema = stringSchema.check(z7.uuid());
15645
+ stringSchema = stringSchema.check(z8.uuid());
15456
15646
  } else if (format === "date-time") {
15457
- stringSchema = stringSchema.check(z7.iso.datetime());
15647
+ stringSchema = stringSchema.check(z8.iso.datetime());
15458
15648
  } else if (format === "date") {
15459
- stringSchema = stringSchema.check(z7.iso.date());
15649
+ stringSchema = stringSchema.check(z8.iso.date());
15460
15650
  } else if (format === "time") {
15461
- stringSchema = stringSchema.check(z7.iso.time());
15651
+ stringSchema = stringSchema.check(z8.iso.time());
15462
15652
  } else if (format === "duration") {
15463
- stringSchema = stringSchema.check(z7.iso.duration());
15653
+ stringSchema = stringSchema.check(z8.iso.duration());
15464
15654
  } else if (format === "ipv4") {
15465
- stringSchema = stringSchema.check(z7.ipv4());
15655
+ stringSchema = stringSchema.check(z8.ipv4());
15466
15656
  } else if (format === "ipv6") {
15467
- stringSchema = stringSchema.check(z7.ipv6());
15657
+ stringSchema = stringSchema.check(z8.ipv6());
15468
15658
  } else if (format === "mac") {
15469
- stringSchema = stringSchema.check(z7.mac());
15659
+ stringSchema = stringSchema.check(z8.mac());
15470
15660
  } else if (format === "cidr") {
15471
- stringSchema = stringSchema.check(z7.cidrv4());
15661
+ stringSchema = stringSchema.check(z8.cidrv4());
15472
15662
  } else if (format === "cidr-v6") {
15473
- stringSchema = stringSchema.check(z7.cidrv6());
15663
+ stringSchema = stringSchema.check(z8.cidrv6());
15474
15664
  } else if (format === "base64") {
15475
- stringSchema = stringSchema.check(z7.base64());
15665
+ stringSchema = stringSchema.check(z8.base64());
15476
15666
  } else if (format === "base64url") {
15477
- stringSchema = stringSchema.check(z7.base64url());
15667
+ stringSchema = stringSchema.check(z8.base64url());
15478
15668
  } else if (format === "e164") {
15479
- stringSchema = stringSchema.check(z7.e164());
15669
+ stringSchema = stringSchema.check(z8.e164());
15480
15670
  } else if (format === "jwt") {
15481
- stringSchema = stringSchema.check(z7.jwt());
15671
+ stringSchema = stringSchema.check(z8.jwt());
15482
15672
  } else if (format === "emoji") {
15483
- stringSchema = stringSchema.check(z7.emoji());
15673
+ stringSchema = stringSchema.check(z8.emoji());
15484
15674
  } else if (format === "nanoid") {
15485
- stringSchema = stringSchema.check(z7.nanoid());
15675
+ stringSchema = stringSchema.check(z8.nanoid());
15486
15676
  } else if (format === "cuid") {
15487
- stringSchema = stringSchema.check(z7.cuid());
15677
+ stringSchema = stringSchema.check(z8.cuid());
15488
15678
  } else if (format === "cuid2") {
15489
- stringSchema = stringSchema.check(z7.cuid2());
15679
+ stringSchema = stringSchema.check(z8.cuid2());
15490
15680
  } else if (format === "ulid") {
15491
- stringSchema = stringSchema.check(z7.ulid());
15681
+ stringSchema = stringSchema.check(z8.ulid());
15492
15682
  } else if (format === "xid") {
15493
- stringSchema = stringSchema.check(z7.xid());
15683
+ stringSchema = stringSchema.check(z8.xid());
15494
15684
  } else if (format === "ksuid") {
15495
- stringSchema = stringSchema.check(z7.ksuid());
15685
+ stringSchema = stringSchema.check(z8.ksuid());
15496
15686
  }
15497
15687
  }
15498
15688
  if (typeof schema.minLength === "number") {
@@ -15509,7 +15699,7 @@ function convertBaseSchema(schema, ctx) {
15509
15699
  }
15510
15700
  case "number":
15511
15701
  case "integer": {
15512
- let numberSchema = type === "integer" ? z7.number().int() : z7.number();
15702
+ let numberSchema = type === "integer" ? z8.number().int() : z8.number();
15513
15703
  if (typeof schema.minimum === "number") {
15514
15704
  numberSchema = numberSchema.min(schema.minimum);
15515
15705
  }
@@ -15533,11 +15723,11 @@ function convertBaseSchema(schema, ctx) {
15533
15723
  break;
15534
15724
  }
15535
15725
  case "boolean": {
15536
- zodSchema2 = z7.boolean();
15726
+ zodSchema2 = z8.boolean();
15537
15727
  break;
15538
15728
  }
15539
15729
  case "null": {
15540
- zodSchema2 = z7.null();
15730
+ zodSchema2 = z8.null();
15541
15731
  break;
15542
15732
  }
15543
15733
  case "object": {
@@ -15550,14 +15740,14 @@ function convertBaseSchema(schema, ctx) {
15550
15740
  }
15551
15741
  if (schema.propertyNames) {
15552
15742
  const keySchema = convertSchema(schema.propertyNames, ctx);
15553
- const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z7.any();
15743
+ const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z8.any();
15554
15744
  if (Object.keys(shape).length === 0) {
15555
- zodSchema2 = z7.record(keySchema, valueSchema);
15745
+ zodSchema2 = z8.record(keySchema, valueSchema);
15556
15746
  break;
15557
15747
  }
15558
- const objectSchema2 = z7.object(shape).passthrough();
15559
- const recordSchema = z7.looseRecord(keySchema, valueSchema);
15560
- zodSchema2 = z7.intersection(objectSchema2, recordSchema);
15748
+ const objectSchema2 = z8.object(shape).passthrough();
15749
+ const recordSchema = z8.looseRecord(keySchema, valueSchema);
15750
+ zodSchema2 = z8.intersection(objectSchema2, recordSchema);
15561
15751
  break;
15562
15752
  }
15563
15753
  if (schema.patternProperties) {
@@ -15566,28 +15756,28 @@ function convertBaseSchema(schema, ctx) {
15566
15756
  const looseRecords = [];
15567
15757
  for (const pattern of patternKeys) {
15568
15758
  const patternValue = convertSchema(patternProps[pattern], ctx);
15569
- const keySchema = z7.string().regex(new RegExp(pattern));
15570
- looseRecords.push(z7.looseRecord(keySchema, patternValue));
15759
+ const keySchema = z8.string().regex(new RegExp(pattern));
15760
+ looseRecords.push(z8.looseRecord(keySchema, patternValue));
15571
15761
  }
15572
15762
  const schemasToIntersect = [];
15573
15763
  if (Object.keys(shape).length > 0) {
15574
- schemasToIntersect.push(z7.object(shape).passthrough());
15764
+ schemasToIntersect.push(z8.object(shape).passthrough());
15575
15765
  }
15576
15766
  schemasToIntersect.push(...looseRecords);
15577
15767
  if (schemasToIntersect.length === 0) {
15578
- zodSchema2 = z7.object({}).passthrough();
15768
+ zodSchema2 = z8.object({}).passthrough();
15579
15769
  } else if (schemasToIntersect.length === 1) {
15580
15770
  zodSchema2 = schemasToIntersect[0];
15581
15771
  } else {
15582
- let result = z7.intersection(schemasToIntersect[0], schemasToIntersect[1]);
15772
+ let result = z8.intersection(schemasToIntersect[0], schemasToIntersect[1]);
15583
15773
  for (let i = 2; i < schemasToIntersect.length; i++) {
15584
- result = z7.intersection(result, schemasToIntersect[i]);
15774
+ result = z8.intersection(result, schemasToIntersect[i]);
15585
15775
  }
15586
15776
  zodSchema2 = result;
15587
15777
  }
15588
15778
  break;
15589
15779
  }
15590
- const objectSchema = z7.object(shape);
15780
+ const objectSchema = z8.object(shape);
15591
15781
  if (schema.additionalProperties === false) {
15592
15782
  zodSchema2 = objectSchema.strict();
15593
15783
  } else if (typeof schema.additionalProperties === "object") {
@@ -15604,33 +15794,33 @@ function convertBaseSchema(schema, ctx) {
15604
15794
  const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
15605
15795
  const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
15606
15796
  if (rest) {
15607
- zodSchema2 = z7.tuple(tupleItems).rest(rest);
15797
+ zodSchema2 = z8.tuple(tupleItems).rest(rest);
15608
15798
  } else {
15609
- zodSchema2 = z7.tuple(tupleItems);
15799
+ zodSchema2 = z8.tuple(tupleItems);
15610
15800
  }
15611
15801
  if (typeof schema.minItems === "number") {
15612
- zodSchema2 = zodSchema2.check(z7.minLength(schema.minItems));
15802
+ zodSchema2 = zodSchema2.check(z8.minLength(schema.minItems));
15613
15803
  }
15614
15804
  if (typeof schema.maxItems === "number") {
15615
- zodSchema2 = zodSchema2.check(z7.maxLength(schema.maxItems));
15805
+ zodSchema2 = zodSchema2.check(z8.maxLength(schema.maxItems));
15616
15806
  }
15617
15807
  } else if (Array.isArray(items)) {
15618
15808
  const tupleItems = items.map((item) => convertSchema(item, ctx));
15619
15809
  const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
15620
15810
  if (rest) {
15621
- zodSchema2 = z7.tuple(tupleItems).rest(rest);
15811
+ zodSchema2 = z8.tuple(tupleItems).rest(rest);
15622
15812
  } else {
15623
- zodSchema2 = z7.tuple(tupleItems);
15813
+ zodSchema2 = z8.tuple(tupleItems);
15624
15814
  }
15625
15815
  if (typeof schema.minItems === "number") {
15626
- zodSchema2 = zodSchema2.check(z7.minLength(schema.minItems));
15816
+ zodSchema2 = zodSchema2.check(z8.minLength(schema.minItems));
15627
15817
  }
15628
15818
  if (typeof schema.maxItems === "number") {
15629
- zodSchema2 = zodSchema2.check(z7.maxLength(schema.maxItems));
15819
+ zodSchema2 = zodSchema2.check(z8.maxLength(schema.maxItems));
15630
15820
  }
15631
15821
  } else if (items !== void 0) {
15632
15822
  const element = convertSchema(items, ctx);
15633
- let arraySchema = z7.array(element);
15823
+ let arraySchema = z8.array(element);
15634
15824
  if (typeof schema.minItems === "number") {
15635
15825
  arraySchema = arraySchema.min(schema.minItems);
15636
15826
  }
@@ -15639,7 +15829,7 @@ function convertBaseSchema(schema, ctx) {
15639
15829
  }
15640
15830
  zodSchema2 = arraySchema;
15641
15831
  } else {
15642
- zodSchema2 = z7.array(z7.any());
15832
+ zodSchema2 = z8.array(z8.any());
15643
15833
  }
15644
15834
  break;
15645
15835
  }
@@ -15656,37 +15846,37 @@ function convertBaseSchema(schema, ctx) {
15656
15846
  }
15657
15847
  function convertSchema(schema, ctx) {
15658
15848
  if (typeof schema === "boolean") {
15659
- return schema ? z7.any() : z7.never();
15849
+ return schema ? z8.any() : z8.never();
15660
15850
  }
15661
15851
  let baseSchema = convertBaseSchema(schema, ctx);
15662
15852
  const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
15663
15853
  if (schema.anyOf && Array.isArray(schema.anyOf)) {
15664
15854
  const options = schema.anyOf.map((s) => convertSchema(s, ctx));
15665
- const anyOfUnion = z7.union(options);
15666
- baseSchema = hasExplicitType ? z7.intersection(baseSchema, anyOfUnion) : anyOfUnion;
15855
+ const anyOfUnion = z8.union(options);
15856
+ baseSchema = hasExplicitType ? z8.intersection(baseSchema, anyOfUnion) : anyOfUnion;
15667
15857
  }
15668
15858
  if (schema.oneOf && Array.isArray(schema.oneOf)) {
15669
15859
  const options = schema.oneOf.map((s) => convertSchema(s, ctx));
15670
- const oneOfUnion = z7.xor(options);
15671
- baseSchema = hasExplicitType ? z7.intersection(baseSchema, oneOfUnion) : oneOfUnion;
15860
+ const oneOfUnion = z8.xor(options);
15861
+ baseSchema = hasExplicitType ? z8.intersection(baseSchema, oneOfUnion) : oneOfUnion;
15672
15862
  }
15673
15863
  if (schema.allOf && Array.isArray(schema.allOf)) {
15674
15864
  if (schema.allOf.length === 0) {
15675
- baseSchema = hasExplicitType ? baseSchema : z7.any();
15865
+ baseSchema = hasExplicitType ? baseSchema : z8.any();
15676
15866
  } else {
15677
15867
  let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
15678
15868
  const startIdx = hasExplicitType ? 0 : 1;
15679
15869
  for (let i = startIdx; i < schema.allOf.length; i++) {
15680
- result = z7.intersection(result, convertSchema(schema.allOf[i], ctx));
15870
+ result = z8.intersection(result, convertSchema(schema.allOf[i], ctx));
15681
15871
  }
15682
15872
  baseSchema = result;
15683
15873
  }
15684
15874
  }
15685
15875
  if (schema.nullable === true && ctx.version === "openapi-3.0") {
15686
- baseSchema = z7.nullable(baseSchema);
15876
+ baseSchema = z8.nullable(baseSchema);
15687
15877
  }
15688
15878
  if (schema.readOnly === true) {
15689
- baseSchema = z7.readonly(baseSchema);
15879
+ baseSchema = z8.readonly(baseSchema);
15690
15880
  }
15691
15881
  const extraMeta = {};
15692
15882
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
@@ -15713,7 +15903,7 @@ function convertSchema(schema, ctx) {
15713
15903
  }
15714
15904
  function fromJSONSchema(schema, params) {
15715
15905
  if (typeof schema === "boolean") {
15716
- return schema ? z7.any() : z7.never();
15906
+ return schema ? z8.any() : z8.never();
15717
15907
  }
15718
15908
  const version2 = detectVersion(schema, params?.defaultTarget);
15719
15909
  const defs = schema.$defs || schema.definitions || {};
@@ -15727,14 +15917,14 @@ function fromJSONSchema(schema, params) {
15727
15917
  };
15728
15918
  return convertSchema(schema, ctx);
15729
15919
  }
15730
- var z7, RECOGNIZED_KEYS;
15920
+ var z8, RECOGNIZED_KEYS;
15731
15921
  var init_from_json_schema = __esm({
15732
15922
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js"() {
15733
15923
  init_registries();
15734
15924
  init_checks2();
15735
15925
  init_iso();
15736
15926
  init_schemas2();
15737
- z7 = {
15927
+ z8 = {
15738
15928
  ...schemas_exports2,
15739
15929
  ...checks_exports2,
15740
15930
  iso: iso_exports