@cleocode/adapters 2026.6.7 → 2026.6.9

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
@@ -8396,7 +8396,7 @@ var init_operations_registry = __esm({
8396
8396
  gateway: "mutate",
8397
8397
  domain: "docs",
8398
8398
  operation: "add",
8399
- description: "docs.add (mutate) \u2014 attach a local file or URL to a CLEO owner entity (task, session, observation)",
8399
+ description: "docs.add (mutate) \u2014 attach a local file, URL, or inline content to a CLEO owner entity (task, session, observation)",
8400
8400
  tier: 1,
8401
8401
  idempotent: false,
8402
8402
  sessionRequired: false,
@@ -8420,6 +8420,12 @@ var init_operations_registry = __esm({
8420
8420
  required: false,
8421
8421
  description: "Remote URL to attach"
8422
8422
  },
8423
+ {
8424
+ name: "content",
8425
+ type: "string",
8426
+ required: false,
8427
+ description: "Inline document body (T10965); mutually exclusive with file/url"
8428
+ },
8423
8429
  {
8424
8430
  name: "desc",
8425
8431
  type: "string",
@@ -10126,7 +10132,8 @@ var init_provenance = __esm({
10126
10132
  "superseded-by",
10127
10133
  "related-task",
10128
10134
  "linked-decision",
10129
- "derived-from"
10135
+ "derived-from",
10136
+ "shares-topic"
10130
10137
  ];
10131
10138
  DOC_LIFECYCLE_STATUSES = [
10132
10139
  "active",
@@ -10201,6 +10208,41 @@ var init_provenance = __esm({
10201
10208
  }
10202
10209
  });
10203
10210
 
10211
+ // packages/contracts/src/docs/read.ts
10212
+ import { z as z8 } from "zod";
10213
+ var docFrontmatterSchema, docBodySchema, docReadResponseSchema;
10214
+ var init_read = __esm({
10215
+ "packages/contracts/src/docs/read.ts"() {
10216
+ "use strict";
10217
+ docFrontmatterSchema = z8.object({
10218
+ slug: z8.string(),
10219
+ kind: z8.string().nullable(),
10220
+ title: z8.string().nullable(),
10221
+ summary: z8.string().nullable(),
10222
+ lifecycleStatus: z8.string(),
10223
+ docVersion: z8.number().int(),
10224
+ ownerVersion: z8.string().nullable(),
10225
+ supersedes: z8.string().nullable(),
10226
+ supersededBy: z8.string().nullable(),
10227
+ topics: z8.array(z8.string()).readonly(),
10228
+ relatedTasks: z8.array(z8.string()).readonly(),
10229
+ sha256: z8.string(),
10230
+ createdAt: z8.string()
10231
+ });
10232
+ docBodySchema = z8.object({
10233
+ encoding: z8.enum(["utf-8", "base64"]),
10234
+ text: z8.string().optional(),
10235
+ base64: z8.string().optional(),
10236
+ sizeBytes: z8.number().int().nonnegative(),
10237
+ mimeType: z8.string().nullable()
10238
+ });
10239
+ docReadResponseSchema = z8.object({
10240
+ frontmatter: docFrontmatterSchema,
10241
+ body: docBodySchema
10242
+ });
10243
+ }
10244
+ });
10245
+
10204
10246
  // packages/contracts/src/engine-result.ts
10205
10247
  var init_engine_result = __esm({
10206
10248
  "packages/contracts/src/engine-result.ts"() {
@@ -10254,72 +10296,72 @@ var init_errors = __esm({
10254
10296
  });
10255
10297
 
10256
10298
  // packages/contracts/src/evidence-atom-schema.ts
10257
- import { z as z8 } from "zod";
10299
+ import { z as z9 } from "zod";
10258
10300
  var commitAtomSchema, filesAtomSchema, testRunAtomSchema, toolAtomSchema, urlAtomSchema, noteAtomSchema, decisionAtomSchema, prAtomSchema, locDropAtomSchema, callsiteCoverageAtomSchema, AC_UUID_REGEX, AC_ALIAS_REGEX, SATISFIES_TASK_ID_REGEX, SATISFIES_VERSION_PIN_REGEX, satisfiesAtomSchema, EvidenceAtomSchema, GATE_EVIDENCE_REQUIREMENTS, ATOM_EXAMPLES;
10259
10301
  var init_evidence_atom_schema = __esm({
10260
10302
  "packages/contracts/src/evidence-atom-schema.ts"() {
10261
10303
  "use strict";
10262
- commitAtomSchema = z8.object({
10263
- kind: z8.literal("commit"),
10264
- sha: z8.string().regex(/^[0-9a-f]{7,40}$/i, "commit sha must be 7-40 hex characters")
10304
+ commitAtomSchema = z9.object({
10305
+ kind: z9.literal("commit"),
10306
+ sha: z9.string().regex(/^[0-9a-f]{7,40}$/i, "commit sha must be 7-40 hex characters")
10265
10307
  });
10266
- filesAtomSchema = z8.object({
10267
- kind: z8.literal("files"),
10268
- paths: z8.array(z8.string().min(1)).min(1, "files atom requires at least one path")
10308
+ filesAtomSchema = z9.object({
10309
+ kind: z9.literal("files"),
10310
+ paths: z9.array(z9.string().min(1)).min(1, "files atom requires at least one path")
10269
10311
  });
10270
- testRunAtomSchema = z8.object({
10271
- kind: z8.literal("test-run"),
10272
- path: z8.string().min(1, "test-run atom requires a non-empty path")
10312
+ testRunAtomSchema = z9.object({
10313
+ kind: z9.literal("test-run"),
10314
+ path: z9.string().min(1, "test-run atom requires a non-empty path")
10273
10315
  });
10274
- toolAtomSchema = z8.object({
10275
- kind: z8.literal("tool"),
10276
- tool: z8.string().min(1, "tool atom requires a non-empty tool name")
10316
+ toolAtomSchema = z9.object({
10317
+ kind: z9.literal("tool"),
10318
+ tool: z9.string().min(1, "tool atom requires a non-empty tool name")
10277
10319
  });
10278
- urlAtomSchema = z8.object({
10279
- kind: z8.literal("url"),
10280
- url: z8.string().min(1).regex(/^https?:\/\//, "url atom must start with http:// or https://")
10320
+ urlAtomSchema = z9.object({
10321
+ kind: z9.literal("url"),
10322
+ url: z9.string().min(1).regex(/^https?:\/\//, "url atom must start with http:// or https://")
10281
10323
  });
10282
- noteAtomSchema = z8.object({
10283
- kind: z8.literal("note"),
10284
- note: z8.string().min(1, "note atom must be non-empty").max(512, "note atom is too long (max 512 chars)")
10324
+ noteAtomSchema = z9.object({
10325
+ kind: z9.literal("note"),
10326
+ note: z9.string().min(1, "note atom must be non-empty").max(512, "note atom is too long (max 512 chars)")
10285
10327
  });
10286
- decisionAtomSchema = z8.object({
10287
- kind: z8.literal("decision"),
10288
- decisionId: z8.string().min(1, "decision atom requires a non-empty decision ID")
10328
+ decisionAtomSchema = z9.object({
10329
+ kind: z9.literal("decision"),
10330
+ decisionId: z9.string().min(1, "decision atom requires a non-empty decision ID")
10289
10331
  });
10290
- prAtomSchema = z8.object({
10291
- kind: z8.literal("pr"),
10292
- prNumber: z8.number().int().positive("pr atom requires a positive integer PR number")
10332
+ prAtomSchema = z9.object({
10333
+ kind: z9.literal("pr"),
10334
+ prNumber: z9.number().int().positive("pr atom requires a positive integer PR number")
10293
10335
  });
10294
- locDropAtomSchema = z8.object({
10295
- kind: z8.literal("loc-drop"),
10296
- fromLines: z8.number().int().nonnegative("loc-drop fromLines must be \u2265 0"),
10297
- toLines: z8.number().int().nonnegative("loc-drop toLines must be \u2265 0")
10336
+ locDropAtomSchema = z9.object({
10337
+ kind: z9.literal("loc-drop"),
10338
+ fromLines: z9.number().int().nonnegative("loc-drop fromLines must be \u2265 0"),
10339
+ toLines: z9.number().int().nonnegative("loc-drop toLines must be \u2265 0")
10298
10340
  });
10299
- callsiteCoverageAtomSchema = z8.object({
10300
- kind: z8.literal("callsite-coverage"),
10301
- symbolName: z8.string().min(1, "callsite-coverage atom requires a non-empty symbolName"),
10302
- relativeSourcePath: z8.string().min(1, "callsite-coverage atom requires a non-empty relativeSourcePath")
10341
+ callsiteCoverageAtomSchema = z9.object({
10342
+ kind: z9.literal("callsite-coverage"),
10343
+ symbolName: z9.string().min(1, "callsite-coverage atom requires a non-empty symbolName"),
10344
+ relativeSourcePath: z9.string().min(1, "callsite-coverage atom requires a non-empty relativeSourcePath")
10303
10345
  });
10304
10346
  AC_UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[45][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
10305
10347
  AC_ALIAS_REGEX = /^AC[0-9]{1,4}$/;
10306
10348
  SATISFIES_TASK_ID_REGEX = /^T[0-9]{1,7}$/;
10307
10349
  SATISFIES_VERSION_PIN_REGEX = /^[0-9]{14}$/;
10308
- satisfiesAtomSchema = z8.object({
10309
- kind: z8.literal("satisfies"),
10350
+ satisfiesAtomSchema = z9.object({
10351
+ kind: z9.literal("satisfies"),
10310
10352
  /** Target task ID — `T<1-7 digits>` per ADR-079-r2 §2.1. */
10311
- targetTaskId: z8.string().regex(SATISFIES_TASK_ID_REGEX, "satisfies atom targetTaskId must match /^T[0-9]{1,7}$/"),
10353
+ targetTaskId: z9.string().regex(SATISFIES_TASK_ID_REGEX, "satisfies atom targetTaskId must match /^T[0-9]{1,7}$/"),
10312
10354
  /** Lowercase UUIDv4/v5 — populated for the canonical form; undefined for alias form. */
10313
- targetAcId: z8.string().regex(AC_UUID_REGEX, "satisfies atom targetAcId must be a lowercase UUIDv4/v5").optional(),
10355
+ targetAcId: z9.string().regex(AC_UUID_REGEX, "satisfies atom targetAcId must be a lowercase UUIDv4/v5").optional(),
10314
10356
  /** Positional alias `AC<1-4 digits>` — populated for alias form; undefined for UUID form. */
10315
- targetAcAlias: z8.string().regex(AC_ALIAS_REGEX, "satisfies atom targetAcAlias must match /^AC[0-9]{1,4}$/").optional(),
10357
+ targetAcAlias: z9.string().regex(AC_ALIAS_REGEX, "satisfies atom targetAcAlias must match /^AC[0-9]{1,4}$/").optional(),
10316
10358
  /** Optional `@<14-digit YYYYMMDDhhmmss>` pin captured at mint time. */
10317
- versionPin: z8.string().regex(
10359
+ versionPin: z9.string().regex(
10318
10360
  SATISFIES_VERSION_PIN_REGEX,
10319
10361
  "satisfies atom versionPin must be 14 digits (YYYYMMDDhhmmss)"
10320
10362
  ).optional()
10321
10363
  });
10322
- EvidenceAtomSchema = z8.discriminatedUnion("kind", [
10364
+ EvidenceAtomSchema = z9.discriminatedUnion("kind", [
10323
10365
  commitAtomSchema,
10324
10366
  filesAtomSchema,
10325
10367
  testRunAtomSchema,
@@ -10366,58 +10408,58 @@ var init_evidence_atom_schema = __esm({
10366
10408
  });
10367
10409
 
10368
10410
  // packages/contracts/src/evidence-record-schema.ts
10369
- import { z as z9 } from "zod";
10411
+ import { z as z10 } from "zod";
10370
10412
  var evidenceBaseSchema, implDiffRecordSchema, validateSpecCheckRecordSchema, testOutputRecordSchema, lintReportRecordSchema, commandOutputRecordSchema, evidenceRecordSchema;
10371
10413
  var init_evidence_record_schema = __esm({
10372
10414
  "packages/contracts/src/evidence-record-schema.ts"() {
10373
10415
  "use strict";
10374
- evidenceBaseSchema = z9.object({
10416
+ evidenceBaseSchema = z10.object({
10375
10417
  /** Identity string of the agent that produced this record. */
10376
- agentIdentity: z9.string().min(1),
10418
+ agentIdentity: z10.string().min(1),
10377
10419
  /** SHA-256 hex digest (64 chars) of the attached artifact. */
10378
- attachmentSha256: z9.string().length(64),
10420
+ attachmentSha256: z10.string().length(64),
10379
10421
  /** ISO 8601 timestamp at which the action ran. */
10380
- ranAt: z9.string().datetime(),
10422
+ ranAt: z10.string().datetime(),
10381
10423
  /** Wall-clock duration of the action in milliseconds. */
10382
- durationMs: z9.number().nonnegative()
10424
+ durationMs: z10.number().nonnegative()
10383
10425
  });
10384
10426
  implDiffRecordSchema = evidenceBaseSchema.extend({
10385
- kind: z9.literal("impl-diff"),
10386
- phase: z9.literal("implement"),
10387
- filesChanged: z9.array(z9.string().min(1)).min(1),
10388
- linesAdded: z9.number().int().nonnegative(),
10389
- linesRemoved: z9.number().int().nonnegative()
10427
+ kind: z10.literal("impl-diff"),
10428
+ phase: z10.literal("implement"),
10429
+ filesChanged: z10.array(z10.string().min(1)).min(1),
10430
+ linesAdded: z10.number().int().nonnegative(),
10431
+ linesRemoved: z10.number().int().nonnegative()
10390
10432
  });
10391
10433
  validateSpecCheckRecordSchema = evidenceBaseSchema.extend({
10392
- kind: z9.literal("validate-spec-check"),
10393
- phase: z9.literal("validate"),
10394
- reqIdsChecked: z9.array(z9.string().min(1)).min(1),
10395
- passed: z9.boolean(),
10396
- details: z9.string().min(1)
10434
+ kind: z10.literal("validate-spec-check"),
10435
+ phase: z10.literal("validate"),
10436
+ reqIdsChecked: z10.array(z10.string().min(1)).min(1),
10437
+ passed: z10.boolean(),
10438
+ details: z10.string().min(1)
10397
10439
  });
10398
10440
  testOutputRecordSchema = evidenceBaseSchema.extend({
10399
- kind: z9.literal("test-output"),
10400
- phase: z9.literal("test"),
10401
- command: z9.string().min(1),
10402
- exitCode: z9.number().int(),
10403
- testsPassed: z9.number().int().nonnegative(),
10404
- testsFailed: z9.number().int().nonnegative()
10441
+ kind: z10.literal("test-output"),
10442
+ phase: z10.literal("test"),
10443
+ command: z10.string().min(1),
10444
+ exitCode: z10.number().int(),
10445
+ testsPassed: z10.number().int().nonnegative(),
10446
+ testsFailed: z10.number().int().nonnegative()
10405
10447
  });
10406
10448
  lintReportRecordSchema = evidenceBaseSchema.extend({
10407
- kind: z9.literal("lint-report"),
10408
- phase: z9.enum(["implement", "test"]),
10409
- tool: z9.string().min(1),
10410
- passed: z9.boolean(),
10411
- warnings: z9.number().int().nonnegative(),
10412
- errors: z9.number().int().nonnegative()
10449
+ kind: z10.literal("lint-report"),
10450
+ phase: z10.enum(["implement", "test"]),
10451
+ tool: z10.string().min(1),
10452
+ passed: z10.boolean(),
10453
+ warnings: z10.number().int().nonnegative(),
10454
+ errors: z10.number().int().nonnegative()
10413
10455
  });
10414
10456
  commandOutputRecordSchema = evidenceBaseSchema.extend({
10415
- kind: z9.literal("command-output"),
10416
- phase: z9.enum(["implement", "validate", "test"]),
10417
- cmd: z9.string().min(1),
10418
- exitCode: z9.number().int()
10457
+ kind: z10.literal("command-output"),
10458
+ phase: z10.enum(["implement", "validate", "test"]),
10459
+ cmd: z10.string().min(1),
10460
+ exitCode: z10.number().int()
10419
10461
  });
10420
- evidenceRecordSchema = z9.discriminatedUnion("kind", [
10462
+ evidenceRecordSchema = z10.discriminatedUnion("kind", [
10421
10463
  implDiffRecordSchema,
10422
10464
  validateSpecCheckRecordSchema,
10423
10465
  testOutputRecordSchema,
@@ -10973,7 +11015,7 @@ var init_status_registry = __esm({
10973
11015
  });
10974
11016
 
10975
11017
  // packages/contracts/src/workgraph.ts
10976
- import { z as z10 } from "zod";
11018
+ import { z as z11 } from "zod";
10977
11019
  var E_WORKGRAPH_PARENT_TYPE_MATRIX, taskTypeSchema, taskPrioritySchema, taskStatusSchema, verificationGateSchema, workGraphRelationKindSchema, workGraphTraversalDirectionSchema, workGraphEdgeDirectionSchema, paginationParamsSchema, workGraphNodeSchema, workGraphEdgeSchema, workGraphHierarchyEdgeSchema, workGraphPageInfoSchema, workGraphRollupCountsSchema, workGraphSubtreePercentagesSchema, workGraphProjectionMismatchSchema, workGraphReadyFrontierTaskSchema, workGraphRelationEdgeSchema, workGraphDependencyEdgeSchema, workGraphOmissionReasonSchema, workGraphContextBudgetSchema, workGraphOmissionSchema, workGraphDirectEdgeSchema, workGraphContextPackParamsSchema, workGraphSliceParamsSchema, workGraphSliceSchema, workGraphReadinessParamsSchema, workGraphReadinessResultSchema, workGraphContextPackSchema, workGraphScaffoldValidateParamsSchema, workGraphScaffoldValidationIssueSchema, workGraphScaffoldValidateResultSchema, workGraphScaffoldApplyParamsSchema, workGraphScaffoldApplyResultSchema, workGraphPlanningDocParamsSchema, workGraphPlanningDocSchema, tasksTraverseParamsSchema, tasksTraverseResultSchema, tasksTreeParamsSchema, tasksTreeResultSchema, tasksRollupParamsSchema, tasksRollupResultSchema, tasksFrontierParamsSchema, tasksFrontierResultSchema, tasksWorkGraphAuditParamsSchema, tasksWorkGraphAuditResultSchema;
10978
11020
  var init_workgraph = __esm({
10979
11021
  "packages/contracts/src/workgraph.ts"() {
@@ -10981,10 +11023,10 @@ var init_workgraph = __esm({
10981
11023
  init_enums();
10982
11024
  init_status_registry();
10983
11025
  E_WORKGRAPH_PARENT_TYPE_MATRIX = "E_WORKGRAPH_PARENT_TYPE_MATRIX";
10984
- taskTypeSchema = z10.enum(["saga", "epic", "task", "subtask"]);
10985
- taskPrioritySchema = z10.enum(["critical", "high", "medium", "low"]);
10986
- taskStatusSchema = z10.enum(TASK_STATUSES);
10987
- verificationGateSchema = z10.enum([
11026
+ taskTypeSchema = z11.enum(["saga", "epic", "task", "subtask"]);
11027
+ taskPrioritySchema = z11.enum(["critical", "high", "medium", "low"]);
11028
+ taskStatusSchema = z11.enum(TASK_STATUSES);
11029
+ verificationGateSchema = z11.enum([
10988
11030
  "implemented",
10989
11031
  "testsPassed",
10990
11032
  "qaPassed",
@@ -10993,7 +11035,7 @@ var init_workgraph = __esm({
10993
11035
  "documented",
10994
11036
  "nexusImpact"
10995
11037
  ]);
10996
- workGraphRelationKindSchema = z10.enum([
11038
+ workGraphRelationKindSchema = z11.enum([
10997
11039
  "contains",
10998
11040
  "depends_on",
10999
11041
  "blocks",
@@ -11001,317 +11043,317 @@ var init_workgraph = __esm({
11001
11043
  "groups",
11002
11044
  "satisfies"
11003
11045
  ]);
11004
- workGraphTraversalDirectionSchema = z10.enum([
11046
+ workGraphTraversalDirectionSchema = z11.enum([
11005
11047
  "ancestors",
11006
11048
  "descendants",
11007
11049
  "upstream",
11008
11050
  "downstream"
11009
11051
  ]);
11010
- workGraphEdgeDirectionSchema = z10.enum(["out", "in", "both"]);
11011
- paginationParamsSchema = z10.object({
11012
- cursor: z10.string().min(1).optional(),
11013
- limit: z10.number().int().positive().max(500).optional()
11052
+ workGraphEdgeDirectionSchema = z11.enum(["out", "in", "both"]);
11053
+ paginationParamsSchema = z11.object({
11054
+ cursor: z11.string().min(1).optional(),
11055
+ limit: z11.number().int().positive().max(500).optional()
11014
11056
  });
11015
- workGraphNodeSchema = z10.object({
11016
- id: z10.string().min(1),
11057
+ workGraphNodeSchema = z11.object({
11058
+ id: z11.string().min(1),
11017
11059
  type: taskTypeSchema,
11018
- title: z10.string(),
11060
+ title: z11.string(),
11019
11061
  status: taskStatusSchema,
11020
11062
  priority: taskPrioritySchema,
11021
- parentId: z10.string().min(1).optional()
11063
+ parentId: z11.string().min(1).optional()
11022
11064
  });
11023
- workGraphEdgeSchema = z10.object({
11024
- fromId: z10.string().min(1),
11025
- toId: z10.string().min(1),
11065
+ workGraphEdgeSchema = z11.object({
11066
+ fromId: z11.string().min(1),
11067
+ toId: z11.string().min(1),
11026
11068
  kind: workGraphRelationKindSchema
11027
11069
  });
11028
- workGraphHierarchyEdgeSchema = z10.object({
11029
- fromId: z10.string().min(1),
11030
- toId: z10.string().min(1),
11031
- kind: z10.literal("contains")
11070
+ workGraphHierarchyEdgeSchema = z11.object({
11071
+ fromId: z11.string().min(1),
11072
+ toId: z11.string().min(1),
11073
+ kind: z11.literal("contains")
11032
11074
  }).strict();
11033
- workGraphPageInfoSchema = z10.object({
11034
- nextCursor: z10.string().min(1).optional(),
11035
- hasMore: z10.boolean()
11036
- });
11037
- workGraphRollupCountsSchema = z10.object({
11038
- total: z10.number().int().nonnegative(),
11039
- byStatus: z10.partialRecord(taskStatusSchema, z10.number().int().nonnegative()),
11040
- byType: z10.partialRecord(taskTypeSchema, z10.number().int().nonnegative())
11041
- });
11042
- workGraphSubtreePercentagesSchema = z10.object({
11043
- done: z10.number().nonnegative(),
11044
- active: z10.number().nonnegative(),
11045
- blocked: z10.number().nonnegative(),
11046
- pending: z10.number().nonnegative(),
11047
- cancelled: z10.number().nonnegative()
11048
- });
11049
- workGraphProjectionMismatchSchema = z10.object({
11050
- field: z10.string().min(1),
11051
- expected: z10.number().int().nonnegative(),
11052
- actual: z10.number().int().nonnegative()
11075
+ workGraphPageInfoSchema = z11.object({
11076
+ nextCursor: z11.string().min(1).optional(),
11077
+ hasMore: z11.boolean()
11078
+ });
11079
+ workGraphRollupCountsSchema = z11.object({
11080
+ total: z11.number().int().nonnegative(),
11081
+ byStatus: z11.partialRecord(taskStatusSchema, z11.number().int().nonnegative()),
11082
+ byType: z11.partialRecord(taskTypeSchema, z11.number().int().nonnegative())
11083
+ });
11084
+ workGraphSubtreePercentagesSchema = z11.object({
11085
+ done: z11.number().nonnegative(),
11086
+ active: z11.number().nonnegative(),
11087
+ blocked: z11.number().nonnegative(),
11088
+ pending: z11.number().nonnegative(),
11089
+ cancelled: z11.number().nonnegative()
11090
+ });
11091
+ workGraphProjectionMismatchSchema = z11.object({
11092
+ field: z11.string().min(1),
11093
+ expected: z11.number().int().nonnegative(),
11094
+ actual: z11.number().int().nonnegative()
11053
11095
  });
11054
11096
  workGraphReadyFrontierTaskSchema = workGraphNodeSchema.extend({
11055
- role: z10.string().min(1).optional(),
11056
- dependencyBlockers: z10.array(z10.object({ taskId: z10.string().min(1), status: taskStatusSchema })),
11057
- gateBlockers: z10.array(z10.object({ gate: verificationGateSchema }))
11097
+ role: z11.string().min(1).optional(),
11098
+ dependencyBlockers: z11.array(z11.object({ taskId: z11.string().min(1), status: taskStatusSchema })),
11099
+ gateBlockers: z11.array(z11.object({ gate: verificationGateSchema }))
11058
11100
  });
11059
11101
  workGraphRelationEdgeSchema = workGraphEdgeSchema.extend({
11060
- source: z10.literal("relation"),
11061
- relationType: z10.enum(TASK_RELATION_TYPES),
11062
- reason: z10.string().min(1).optional()
11102
+ source: z11.literal("relation"),
11103
+ relationType: z11.enum(TASK_RELATION_TYPES),
11104
+ reason: z11.string().min(1).optional()
11063
11105
  });
11064
11106
  workGraphDependencyEdgeSchema = workGraphEdgeSchema.extend({
11065
- source: z10.literal("dependency"),
11066
- kind: z10.literal("depends_on")
11107
+ source: z11.literal("dependency"),
11108
+ kind: z11.literal("depends_on")
11067
11109
  });
11068
- workGraphOmissionReasonSchema = z10.enum([
11110
+ workGraphOmissionReasonSchema = z11.enum([
11069
11111
  "budget_exceeded",
11070
11112
  "not_requested",
11071
11113
  "not_available",
11072
11114
  "redacted",
11073
11115
  "truncated"
11074
11116
  ]);
11075
- workGraphContextBudgetSchema = z10.object({
11076
- tokenBudget: z10.number().int().nonnegative(),
11077
- estimatedTokens: z10.number().int().nonnegative(),
11078
- remainingTokens: z10.number().int().nonnegative(),
11079
- truncated: z10.boolean()
11080
- });
11081
- workGraphOmissionSchema = z10.object({
11082
- path: z10.string().min(1),
11117
+ workGraphContextBudgetSchema = z11.object({
11118
+ tokenBudget: z11.number().int().nonnegative(),
11119
+ estimatedTokens: z11.number().int().nonnegative(),
11120
+ remainingTokens: z11.number().int().nonnegative(),
11121
+ truncated: z11.boolean()
11122
+ });
11123
+ workGraphOmissionSchema = z11.object({
11124
+ path: z11.string().min(1),
11083
11125
  reason: workGraphOmissionReasonSchema,
11084
- message: z10.string().min(1),
11085
- estimatedTokens: z10.number().int().nonnegative().optional()
11126
+ message: z11.string().min(1),
11127
+ estimatedTokens: z11.number().int().nonnegative().optional()
11086
11128
  });
11087
- workGraphDirectEdgeSchema = z10.discriminatedUnion("source", [
11129
+ workGraphDirectEdgeSchema = z11.discriminatedUnion("source", [
11088
11130
  workGraphRelationEdgeSchema,
11089
11131
  workGraphDependencyEdgeSchema
11090
11132
  ]);
11091
11133
  workGraphContextPackParamsSchema = paginationParamsSchema.extend({
11092
- rootId: z10.string().min(1),
11093
- tokenBudget: z10.number().int().positive().optional(),
11094
- includeRelations: z10.boolean().optional(),
11095
- includeReadiness: z10.boolean().optional(),
11096
- includeRollup: z10.boolean().optional()
11134
+ rootId: z11.string().min(1),
11135
+ tokenBudget: z11.number().int().positive().optional(),
11136
+ includeRelations: z11.boolean().optional(),
11137
+ includeReadiness: z11.boolean().optional(),
11138
+ includeRollup: z11.boolean().optional()
11097
11139
  });
11098
11140
  workGraphSliceParamsSchema = paginationParamsSchema.extend({
11099
- rootId: z10.string().min(1),
11141
+ rootId: z11.string().min(1),
11100
11142
  direction: workGraphTraversalDirectionSchema.optional(),
11101
- maxDepth: z10.number().int().nonnegative().optional(),
11102
- includeRelations: z10.boolean().optional()
11143
+ maxDepth: z11.number().int().nonnegative().optional(),
11144
+ includeRelations: z11.boolean().optional()
11103
11145
  });
11104
- workGraphSliceSchema = z10.object({
11105
- rootId: z10.string().min(1),
11146
+ workGraphSliceSchema = z11.object({
11147
+ rootId: z11.string().min(1),
11106
11148
  direction: workGraphTraversalDirectionSchema,
11107
- nodes: z10.array(workGraphNodeSchema),
11108
- edges: z10.array(workGraphEdgeSchema),
11149
+ nodes: z11.array(workGraphNodeSchema),
11150
+ edges: z11.array(workGraphEdgeSchema),
11109
11151
  pageInfo: workGraphPageInfoSchema,
11110
- omissions: z10.array(workGraphOmissionSchema).optional()
11111
- });
11112
- workGraphReadinessParamsSchema = z10.object({
11113
- rootId: z10.string().min(1),
11114
- role: z10.string().min(1).optional(),
11115
- includeGateBlockers: z10.boolean().optional()
11116
- });
11117
- workGraphReadinessResultSchema = z10.object({
11118
- rootId: z10.string().min(1),
11119
- role: z10.string().min(1).optional(),
11120
- ready: z10.boolean(),
11121
- warnings: z10.array(z10.string()),
11122
- groups: z10.object({
11123
- ready: z10.array(workGraphReadyFrontierTaskSchema),
11124
- blocked: z10.array(workGraphReadyFrontierTaskSchema),
11125
- blockedBy: z10.array(
11126
- z10.discriminatedUnion("kind", [
11127
- z10.object({
11128
- kind: z10.literal("dependency"),
11129
- blockerId: z10.string().min(1),
11130
- blocks: z10.array(z10.string().min(1))
11152
+ omissions: z11.array(workGraphOmissionSchema).optional()
11153
+ });
11154
+ workGraphReadinessParamsSchema = z11.object({
11155
+ rootId: z11.string().min(1),
11156
+ role: z11.string().min(1).optional(),
11157
+ includeGateBlockers: z11.boolean().optional()
11158
+ });
11159
+ workGraphReadinessResultSchema = z11.object({
11160
+ rootId: z11.string().min(1),
11161
+ role: z11.string().min(1).optional(),
11162
+ ready: z11.boolean(),
11163
+ warnings: z11.array(z11.string()),
11164
+ groups: z11.object({
11165
+ ready: z11.array(workGraphReadyFrontierTaskSchema),
11166
+ blocked: z11.array(workGraphReadyFrontierTaskSchema),
11167
+ blockedBy: z11.array(
11168
+ z11.discriminatedUnion("kind", [
11169
+ z11.object({
11170
+ kind: z11.literal("dependency"),
11171
+ blockerId: z11.string().min(1),
11172
+ blocks: z11.array(z11.string().min(1))
11131
11173
  }),
11132
- z10.object({
11133
- kind: z10.literal("gate"),
11174
+ z11.object({
11175
+ kind: z11.literal("gate"),
11134
11176
  gate: verificationGateSchema,
11135
- blocks: z10.array(z10.string().min(1))
11177
+ blocks: z11.array(z11.string().min(1))
11136
11178
  })
11137
11179
  ])
11138
11180
  )
11139
11181
  })
11140
11182
  });
11141
- workGraphContextPackSchema = z10.object({
11142
- rootId: z10.string().min(1),
11143
- generatedAt: z10.string().min(1),
11183
+ workGraphContextPackSchema = z11.object({
11184
+ rootId: z11.string().min(1),
11185
+ generatedAt: z11.string().min(1),
11144
11186
  budget: workGraphContextBudgetSchema,
11145
11187
  slice: workGraphSliceSchema,
11146
- relationEdges: z10.object({
11147
- rootId: z10.string().min(1),
11188
+ relationEdges: z11.object({
11189
+ rootId: z11.string().min(1),
11148
11190
  direction: workGraphEdgeDirectionSchema,
11149
- edges: z10.array(workGraphDirectEdgeSchema)
11191
+ edges: z11.array(workGraphDirectEdgeSchema)
11150
11192
  }).optional(),
11151
11193
  readiness: workGraphReadinessResultSchema.optional(),
11152
- rollup: z10.lazy(() => tasksRollupResultSchema).optional(),
11153
- omissions: z10.array(workGraphOmissionSchema)
11154
- });
11155
- workGraphScaffoldValidateParamsSchema = z10.object({
11156
- rootId: z10.string().min(1),
11157
- nodes: z10.array(
11158
- z10.object({
11159
- id: z10.string().min(1),
11194
+ rollup: z11.lazy(() => tasksRollupResultSchema).optional(),
11195
+ omissions: z11.array(workGraphOmissionSchema)
11196
+ });
11197
+ workGraphScaffoldValidateParamsSchema = z11.object({
11198
+ rootId: z11.string().min(1),
11199
+ nodes: z11.array(
11200
+ z11.object({
11201
+ id: z11.string().min(1),
11160
11202
  type: taskTypeSchema,
11161
- parentId: z10.string().min(1).nullable().optional()
11203
+ parentId: z11.string().min(1).nullable().optional()
11162
11204
  })
11163
11205
  ),
11164
- edges: z10.array(workGraphDirectEdgeSchema).optional(),
11165
- dryRun: z10.boolean().optional()
11166
- });
11167
- workGraphScaffoldValidationIssueSchema = z10.object({
11168
- code: z10.string().min(1),
11169
- message: z10.string().min(1),
11170
- taskId: z10.string().min(1).optional(),
11171
- severity: z10.enum(["error", "warning"])
11172
- });
11173
- workGraphScaffoldValidateResultSchema = z10.object({
11174
- rootId: z10.string().min(1),
11175
- valid: z10.boolean(),
11176
- dryRun: z10.boolean(),
11177
- issues: z10.array(workGraphScaffoldValidationIssueSchema),
11178
- hierarchy: z10.object({
11179
- valid: z10.boolean(),
11180
- violations: z10.array(
11181
- z10.object({
11182
- code: z10.literal(E_WORKGRAPH_PARENT_TYPE_MATRIX),
11183
- taskId: z10.string().min(1),
11206
+ edges: z11.array(workGraphDirectEdgeSchema).optional(),
11207
+ dryRun: z11.boolean().optional()
11208
+ });
11209
+ workGraphScaffoldValidationIssueSchema = z11.object({
11210
+ code: z11.string().min(1),
11211
+ message: z11.string().min(1),
11212
+ taskId: z11.string().min(1).optional(),
11213
+ severity: z11.enum(["error", "warning"])
11214
+ });
11215
+ workGraphScaffoldValidateResultSchema = z11.object({
11216
+ rootId: z11.string().min(1),
11217
+ valid: z11.boolean(),
11218
+ dryRun: z11.boolean(),
11219
+ issues: z11.array(workGraphScaffoldValidationIssueSchema),
11220
+ hierarchy: z11.object({
11221
+ valid: z11.boolean(),
11222
+ violations: z11.array(
11223
+ z11.object({
11224
+ code: z11.literal(E_WORKGRAPH_PARENT_TYPE_MATRIX),
11225
+ taskId: z11.string().min(1),
11184
11226
  taskType: taskTypeSchema,
11185
- parentId: z10.string().min(1).nullable(),
11227
+ parentId: z11.string().min(1).nullable(),
11186
11228
  parentType: taskTypeSchema.optional(),
11187
- message: z10.string().min(1)
11229
+ message: z11.string().min(1)
11188
11230
  })
11189
11231
  )
11190
11232
  })
11191
11233
  });
11192
11234
  workGraphScaffoldApplyParamsSchema = workGraphScaffoldValidateParamsSchema.extend({
11193
- apply: z10.boolean().optional()
11235
+ apply: z11.boolean().optional()
11194
11236
  });
11195
11237
  workGraphScaffoldApplyResultSchema = workGraphScaffoldValidateResultSchema.extend({
11196
- applied: z10.boolean(),
11197
- nodesChanged: z10.number().int().nonnegative(),
11198
- edgesChanged: z10.number().int().nonnegative()
11199
- });
11200
- workGraphPlanningDocParamsSchema = z10.object({
11201
- rootId: z10.string().min(1),
11202
- audience: z10.enum(["agent", "maintainer"]),
11203
- tokenBudget: z10.number().int().positive().optional(),
11204
- includeRelations: z10.boolean().optional(),
11205
- includeReadiness: z10.boolean().optional(),
11206
- includeRollup: z10.boolean().optional()
11207
- });
11208
- workGraphPlanningDocSchema = z10.object({
11209
- rootId: z10.string().min(1),
11210
- generatedAt: z10.string().min(1),
11211
- audience: z10.enum(["agent", "maintainer"]),
11212
- title: z10.string().min(1),
11213
- content: z10.string(),
11214
- sections: z10.array(z10.string().min(1)),
11215
- estimatedTokens: z10.number().int().nonnegative(),
11216
- budget: z10.object({
11217
- tokenBudget: z10.number().int().positive(),
11218
- truncated: z10.boolean()
11238
+ applied: z11.boolean(),
11239
+ nodesChanged: z11.number().int().nonnegative(),
11240
+ edgesChanged: z11.number().int().nonnegative()
11241
+ });
11242
+ workGraphPlanningDocParamsSchema = z11.object({
11243
+ rootId: z11.string().min(1),
11244
+ audience: z11.enum(["agent", "maintainer"]),
11245
+ tokenBudget: z11.number().int().positive().optional(),
11246
+ includeRelations: z11.boolean().optional(),
11247
+ includeReadiness: z11.boolean().optional(),
11248
+ includeRollup: z11.boolean().optional()
11249
+ });
11250
+ workGraphPlanningDocSchema = z11.object({
11251
+ rootId: z11.string().min(1),
11252
+ generatedAt: z11.string().min(1),
11253
+ audience: z11.enum(["agent", "maintainer"]),
11254
+ title: z11.string().min(1),
11255
+ content: z11.string(),
11256
+ sections: z11.array(z11.string().min(1)),
11257
+ estimatedTokens: z11.number().int().nonnegative(),
11258
+ budget: z11.object({
11259
+ tokenBudget: z11.number().int().positive(),
11260
+ truncated: z11.boolean()
11219
11261
  }).optional()
11220
11262
  });
11221
11263
  tasksTraverseParamsSchema = paginationParamsSchema.extend({
11222
- rootId: z10.string().min(1),
11264
+ rootId: z11.string().min(1),
11223
11265
  direction: workGraphTraversalDirectionSchema,
11224
- maxDepth: z10.number().int().nonnegative().optional(),
11225
- includeRelations: z10.boolean().optional()
11266
+ maxDepth: z11.number().int().nonnegative().optional(),
11267
+ includeRelations: z11.boolean().optional()
11226
11268
  });
11227
- tasksTraverseResultSchema = z10.object({
11228
- rootId: z10.string().min(1),
11269
+ tasksTraverseResultSchema = z11.object({
11270
+ rootId: z11.string().min(1),
11229
11271
  direction: workGraphTraversalDirectionSchema,
11230
- nodes: z10.array(workGraphNodeSchema),
11231
- edges: z10.array(workGraphEdgeSchema),
11272
+ nodes: z11.array(workGraphNodeSchema),
11273
+ edges: z11.array(workGraphEdgeSchema),
11232
11274
  pageInfo: workGraphPageInfoSchema
11233
11275
  });
11234
11276
  tasksTreeParamsSchema = paginationParamsSchema.extend({
11235
- rootId: z10.string().min(1),
11236
- maxDepth: z10.number().int().nonnegative().optional()
11277
+ rootId: z11.string().min(1),
11278
+ maxDepth: z11.number().int().nonnegative().optional()
11237
11279
  });
11238
- tasksTreeResultSchema = z10.object({
11239
- rootId: z10.string().min(1),
11240
- nodes: z10.array(workGraphNodeSchema.extend({ depth: z10.number().int().positive() })),
11241
- edges: z10.array(workGraphHierarchyEdgeSchema),
11280
+ tasksTreeResultSchema = z11.object({
11281
+ rootId: z11.string().min(1),
11282
+ nodes: z11.array(workGraphNodeSchema.extend({ depth: z11.number().int().positive() })),
11283
+ edges: z11.array(workGraphHierarchyEdgeSchema),
11242
11284
  pageInfo: workGraphPageInfoSchema
11243
11285
  });
11244
- tasksRollupParamsSchema = z10.object({
11245
- rootId: z10.string().min(1),
11286
+ tasksRollupParamsSchema = z11.object({
11287
+ rootId: z11.string().min(1),
11246
11288
  expectedDirectRollup: workGraphRollupCountsSchema.optional()
11247
11289
  });
11248
- tasksRollupResultSchema = z10.object({
11249
- rootId: z10.string().min(1),
11290
+ tasksRollupResultSchema = z11.object({
11291
+ rootId: z11.string().min(1),
11250
11292
  direct: workGraphRollupCountsSchema,
11251
11293
  subtree: workGraphRollupCountsSchema,
11252
- percentDenominator: z10.object({
11253
- basis: z10.literal("subtree-total"),
11254
- total: z10.number().int().nonnegative(),
11255
- description: z10.string().min(1)
11294
+ percentDenominator: z11.object({
11295
+ basis: z11.literal("subtree-total"),
11296
+ total: z11.number().int().nonnegative(),
11297
+ description: z11.string().min(1)
11256
11298
  }),
11257
11299
  percentages: workGraphSubtreePercentagesSchema,
11258
- staleProjection: z10.boolean(),
11259
- projectionMismatches: z10.array(workGraphProjectionMismatchSchema)
11260
- });
11261
- tasksFrontierParamsSchema = z10.object({
11262
- rootId: z10.string().min(1),
11263
- role: z10.string().min(1).optional()
11264
- });
11265
- tasksFrontierResultSchema = z10.object({
11266
- rootId: z10.string().min(1),
11267
- role: z10.string().min(1).optional(),
11268
- groups: z10.object({
11269
- ready: z10.array(workGraphReadyFrontierTaskSchema),
11270
- blocked: z10.array(workGraphReadyFrontierTaskSchema),
11271
- blockedBy: z10.array(
11272
- z10.discriminatedUnion("kind", [
11273
- z10.object({
11274
- kind: z10.literal("dependency"),
11275
- blockerId: z10.string().min(1),
11276
- blocks: z10.array(z10.string().min(1))
11300
+ staleProjection: z11.boolean(),
11301
+ projectionMismatches: z11.array(workGraphProjectionMismatchSchema)
11302
+ });
11303
+ tasksFrontierParamsSchema = z11.object({
11304
+ rootId: z11.string().min(1),
11305
+ role: z11.string().min(1).optional()
11306
+ });
11307
+ tasksFrontierResultSchema = z11.object({
11308
+ rootId: z11.string().min(1),
11309
+ role: z11.string().min(1).optional(),
11310
+ groups: z11.object({
11311
+ ready: z11.array(workGraphReadyFrontierTaskSchema),
11312
+ blocked: z11.array(workGraphReadyFrontierTaskSchema),
11313
+ blockedBy: z11.array(
11314
+ z11.discriminatedUnion("kind", [
11315
+ z11.object({
11316
+ kind: z11.literal("dependency"),
11317
+ blockerId: z11.string().min(1),
11318
+ blocks: z11.array(z11.string().min(1))
11277
11319
  }),
11278
- z10.object({
11279
- kind: z10.literal("gate"),
11320
+ z11.object({
11321
+ kind: z11.literal("gate"),
11280
11322
  gate: verificationGateSchema,
11281
- blocks: z10.array(z10.string().min(1))
11323
+ blocks: z11.array(z11.string().min(1))
11282
11324
  })
11283
11325
  ])
11284
11326
  )
11285
11327
  })
11286
11328
  });
11287
11329
  tasksWorkGraphAuditParamsSchema = paginationParamsSchema.extend({
11288
- rootId: z10.string().min(1),
11289
- maxDepth: z10.number().int().nonnegative().optional(),
11290
- includeRelations: z10.boolean().optional()
11291
- });
11292
- tasksWorkGraphAuditResultSchema = z10.object({
11293
- rootId: z10.string().min(1),
11294
- hierarchy: z10.object({
11295
- valid: z10.boolean(),
11296
- violations: z10.array(
11297
- z10.object({
11298
- code: z10.literal(E_WORKGRAPH_PARENT_TYPE_MATRIX),
11299
- taskId: z10.string().min(1),
11330
+ rootId: z11.string().min(1),
11331
+ maxDepth: z11.number().int().nonnegative().optional(),
11332
+ includeRelations: z11.boolean().optional()
11333
+ });
11334
+ tasksWorkGraphAuditResultSchema = z11.object({
11335
+ rootId: z11.string().min(1),
11336
+ hierarchy: z11.object({
11337
+ valid: z11.boolean(),
11338
+ violations: z11.array(
11339
+ z11.object({
11340
+ code: z11.literal(E_WORKGRAPH_PARENT_TYPE_MATRIX),
11341
+ taskId: z11.string().min(1),
11300
11342
  taskType: taskTypeSchema,
11301
- parentId: z10.string().min(1).nullable(),
11343
+ parentId: z11.string().min(1).nullable(),
11302
11344
  parentType: taskTypeSchema.optional(),
11303
- message: z10.string().min(1)
11345
+ message: z11.string().min(1)
11304
11346
  })
11305
11347
  )
11306
11348
  }),
11307
11349
  traversal: tasksTraverseResultSchema,
11308
11350
  frontier: tasksFrontierResultSchema,
11309
11351
  rollup: tasksRollupResultSchema,
11310
- relationEdges: z10.object({
11311
- rootId: z10.string().min(1),
11352
+ relationEdges: z11.object({
11353
+ rootId: z11.string().min(1),
11312
11354
  direction: workGraphEdgeDirectionSchema,
11313
- edges: z10.array(
11314
- z10.discriminatedUnion("source", [
11355
+ edges: z11.array(
11356
+ z11.discriminatedUnion("source", [
11315
11357
  workGraphRelationEdgeSchema,
11316
11358
  workGraphDependencyEdgeSchema
11317
11359
  ])
@@ -11666,31 +11708,31 @@ var init_peer = __esm({
11666
11708
  });
11667
11709
 
11668
11710
  // packages/contracts/src/release/evidence-atoms.ts
11669
- import { z as z11 } from "zod";
11711
+ import { z as z12 } from "zod";
11670
11712
  var parsedPrEvidenceAtomSchema, prEvidenceStateModifierSchema, ghPrViewSchema, PR_REQUIRED_WORKFLOWS;
11671
11713
  var init_evidence_atoms = __esm({
11672
11714
  "packages/contracts/src/release/evidence-atoms.ts"() {
11673
11715
  "use strict";
11674
- parsedPrEvidenceAtomSchema = z11.object({
11675
- kind: z11.literal("pr"),
11676
- prNumber: z11.number().int().positive()
11677
- });
11678
- prEvidenceStateModifierSchema = z11.object({
11679
- kind: z11.literal("state"),
11680
- value: z11.literal("MERGED")
11681
- });
11682
- ghPrViewSchema = z11.object({
11683
- state: z11.enum(["OPEN", "CLOSED", "MERGED"]),
11684
- mergedAt: z11.string().nullable(),
11685
- headRefOid: z11.string().optional(),
11686
- mergeable: z11.string().optional(),
11687
- statusCheckRollup: z11.array(
11688
- z11.object({
11689
- __typename: z11.string().optional(),
11690
- name: z11.string().optional(),
11691
- workflowName: z11.string().optional(),
11692
- conclusion: z11.string().nullable().optional(),
11693
- status: z11.string().optional()
11716
+ parsedPrEvidenceAtomSchema = z12.object({
11717
+ kind: z12.literal("pr"),
11718
+ prNumber: z12.number().int().positive()
11719
+ });
11720
+ prEvidenceStateModifierSchema = z12.object({
11721
+ kind: z12.literal("state"),
11722
+ value: z12.literal("MERGED")
11723
+ });
11724
+ ghPrViewSchema = z12.object({
11725
+ state: z12.enum(["OPEN", "CLOSED", "MERGED"]),
11726
+ mergedAt: z12.string().nullable(),
11727
+ headRefOid: z12.string().optional(),
11728
+ mergeable: z12.string().optional(),
11729
+ statusCheckRollup: z12.array(
11730
+ z12.object({
11731
+ __typename: z12.string().optional(),
11732
+ name: z12.string().optional(),
11733
+ workflowName: z12.string().optional(),
11734
+ conclusion: z12.string().nullable().optional(),
11735
+ status: z12.string().optional()
11694
11736
  }).passthrough()
11695
11737
  ).optional().default([])
11696
11738
  }).passthrough();
@@ -11703,7 +11745,7 @@ var init_evidence_atoms = __esm({
11703
11745
  });
11704
11746
 
11705
11747
  // packages/contracts/src/release/plan.ts
11706
- import { z as z12 } from "zod";
11748
+ import { z as z13 } from "zod";
11707
11749
  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;
11708
11750
  var init_plan = __esm({
11709
11751
  "packages/contracts/src/release/plan.ts"() {
@@ -11746,20 +11788,20 @@ var init_plan = __esm({
11746
11788
  ];
11747
11789
  IMPACT = ["major", "minor", "patch"];
11748
11790
  RESOLVED_SOURCE = ["project-context", "language-default", "legacy-alias"];
11749
- ReleaseChannelSchema = z12.enum(RELEASE_CHANNEL);
11750
- ReleaseSchemeSchema = z12.enum(RELEASE_SCHEME);
11751
- ReleaseKindSchema = z12.enum(RELEASE_KIND);
11752
- ReleaseStatusSchema = z12.enum(RELEASE_STATUS);
11753
- GateStatusSchema = z12.enum(GATE_STATUS);
11754
- GateNameSchema = z12.enum(GATE_NAME);
11755
- PlatformTupleSchema = z12.enum(PLATFORM_TUPLE);
11756
- PublisherSchema = z12.enum(PUBLISHER);
11757
- TaskKindSchema = z12.enum(TASK_KIND);
11758
- ImpactSchema = z12.enum(IMPACT);
11759
- ResolvedSourceSchema = z12.enum(RESOLVED_SOURCE);
11760
- Iso8601 = z12.iso.datetime({ offset: true });
11761
- NonEmptyString = z12.string().min(1);
11762
- ReleasePlanTaskSchema = z12.object({
11791
+ ReleaseChannelSchema = z13.enum(RELEASE_CHANNEL);
11792
+ ReleaseSchemeSchema = z13.enum(RELEASE_SCHEME);
11793
+ ReleaseKindSchema = z13.enum(RELEASE_KIND);
11794
+ ReleaseStatusSchema = z13.enum(RELEASE_STATUS);
11795
+ GateStatusSchema = z13.enum(GATE_STATUS);
11796
+ GateNameSchema = z13.enum(GATE_NAME);
11797
+ PlatformTupleSchema = z13.enum(PLATFORM_TUPLE);
11798
+ PublisherSchema = z13.enum(PUBLISHER);
11799
+ TaskKindSchema = z13.enum(TASK_KIND);
11800
+ ImpactSchema = z13.enum(IMPACT);
11801
+ ResolvedSourceSchema = z13.enum(RESOLVED_SOURCE);
11802
+ Iso8601 = z13.iso.datetime({ offset: true });
11803
+ NonEmptyString = z13.string().min(1);
11804
+ ReleasePlanTaskSchema = z13.object({
11763
11805
  /** Task ID (e.g. "T10001"). Format intentionally loose so historical IDs validate. */
11764
11806
  id: NonEmptyString,
11765
11807
  /** Conventional-commit-aligned task classification. */
@@ -11767,20 +11809,20 @@ var init_plan = __esm({
11767
11809
  /** SemVer impact classification. */
11768
11810
  impact: ImpactSchema,
11769
11811
  /** Human-readable changelog line for this task. */
11770
- userFacingSummary: z12.string(),
11812
+ userFacingSummary: z13.string(),
11771
11813
  /**
11772
11814
  * ADR-051 evidence atoms attesting the task's gate results. Format is
11773
11815
  * `kind:value` (e.g. `commit:abc123`, `test-run:vitest.json`). The contract
11774
11816
  * accepts empty arrays so legacy plans validate; `cleo release plan`
11775
11817
  * enforces non-empty via R-301.
11776
11818
  */
11777
- evidenceAtoms: z12.array(NonEmptyString),
11819
+ evidenceAtoms: z13.array(NonEmptyString),
11778
11820
  /** IVTR phase at plan time — informational only per R-316. */
11779
- ivtrPhaseAtPlan: z12.string().optional(),
11821
+ ivtrPhaseAtPlan: z13.string().optional(),
11780
11822
  /** Epic this task rolls up to, locked at plan time per R-303. */
11781
11823
  epicAncestor: NonEmptyString
11782
11824
  });
11783
- ReleaseGateSchema = z12.object({
11825
+ ReleaseGateSchema = z13.object({
11784
11826
  /** Canonical gate name. */
11785
11827
  name: GateNameSchema,
11786
11828
  /** ADR-051 atom string identifying the resolved tool (e.g. `tool:test`). */
@@ -11790,11 +11832,11 @@ var init_plan = __esm({
11790
11832
  /** ISO-8601 timestamp the gate was last verified. */
11791
11833
  lastVerifiedAt: Iso8601,
11792
11834
  /** Resolved shell command (e.g. `pnpm run test`). Optional for unresolved gates. */
11793
- resolvedCommand: z12.string().optional(),
11835
+ resolvedCommand: z13.string().optional(),
11794
11836
  /** Provenance of the resolved command. Optional for unresolved gates. */
11795
11837
  resolvedSource: ResolvedSourceSchema.optional()
11796
11838
  });
11797
- ReleasePlatformMatrixEntrySchema = z12.object({
11839
+ ReleasePlatformMatrixEntrySchema = z13.object({
11798
11840
  /** Target platform tuple. */
11799
11841
  platform: PlatformTupleSchema,
11800
11842
  /** Distribution backend. */
@@ -11802,47 +11844,47 @@ var init_plan = __esm({
11802
11844
  /** Package identifier on the target backend (e.g. `@cleocode/cleo`). */
11803
11845
  package: NonEmptyString,
11804
11846
  /** Whether to run the GHA smoke job for this matrix entry. */
11805
- smoke: z12.boolean().default(true).optional()
11847
+ smoke: z13.boolean().default(true).optional()
11806
11848
  });
11807
- ReleasePreflightSummarySchema = z12.object({
11849
+ ReleasePreflightSummarySchema = z13.object({
11808
11850
  /** True if esbuild externals are out of sync with package.json. */
11809
- esbuildExternalsDrift: z12.boolean(),
11851
+ esbuildExternalsDrift: z13.boolean(),
11810
11852
  /** True if `pnpm-lock.yaml` diverges from the workspace manifest. */
11811
- lockfileDrift: z12.boolean(),
11853
+ lockfileDrift: z13.boolean(),
11812
11854
  /** True if all epic children are in terminal lifecycle states. */
11813
- epicCompletenessClean: z12.boolean(),
11855
+ epicCompletenessClean: z13.boolean(),
11814
11856
  /** True if no task appears in multiple in-flight release plans. */
11815
- doubleListingClean: z12.boolean(),
11857
+ doubleListingClean: z13.boolean(),
11816
11858
  /** Non-fatal preflight warnings (e.g. unresolved tools per R-024). */
11817
- preflightWarnings: z12.array(z12.string()).default([]).optional()
11859
+ preflightWarnings: z13.array(z13.string()).default([]).optional()
11818
11860
  });
11819
- ReleasePlanChangelogSchema = z12.object({
11861
+ ReleasePlanChangelogSchema = z13.object({
11820
11862
  /** `kind=feat` tasks. */
11821
- features: z12.array(NonEmptyString).default([]),
11863
+ features: z13.array(NonEmptyString).default([]),
11822
11864
  /** `kind=fix` or `kind=hotfix` tasks. */
11823
- fixes: z12.array(NonEmptyString).default([]),
11865
+ fixes: z13.array(NonEmptyString).default([]),
11824
11866
  /** `kind=chore`, `docs`, `refactor`, `test`, `perf` tasks. */
11825
- chores: z12.array(NonEmptyString).default([]),
11867
+ chores: z13.array(NonEmptyString).default([]),
11826
11868
  /** `kind=breaking` or `kind=revert` tasks. */
11827
- breaking: z12.array(NonEmptyString).default([])
11869
+ breaking: z13.array(NonEmptyString).default([])
11828
11870
  });
11829
- ReleasePlanMetaSchema = z12.object({
11871
+ ReleasePlanMetaSchema = z13.object({
11830
11872
  /** True if this is the project's first ever release. */
11831
- firstEverRelease: z12.boolean().optional(),
11873
+ firstEverRelease: z13.boolean().optional(),
11832
11874
  /** Canonical tool names that could not be resolved at plan time. */
11833
- unresolvedTools: z12.array(z12.string()).optional(),
11875
+ unresolvedTools: z13.array(z13.string()).optional(),
11834
11876
  /** Project archetype detected at plan time. */
11835
- archetype: z12.string().optional()
11836
- }).catchall(z12.unknown());
11837
- ReleasePlanSchema = z12.object({
11877
+ archetype: z13.string().optional()
11878
+ }).catchall(z13.unknown());
11879
+ ReleasePlanSchema = z13.object({
11838
11880
  /** Schema URL for this plan version. */
11839
- $schema: z12.string().optional(),
11881
+ $schema: z13.string().optional(),
11840
11882
  /** Requested version string (e.g. "v2026.6.0"). Includes the leading `v`. */
11841
11883
  version: NonEmptyString,
11842
11884
  /** Resolved version string after suffix application (e.g. "v2026.6.0.2"). */
11843
11885
  resolvedVersion: NonEmptyString,
11844
11886
  /** True if a `calver-suffix` was applied to disambiguate a same-day hotfix. */
11845
- suffixApplied: z12.boolean(),
11887
+ suffixApplied: z13.boolean(),
11846
11888
  /** Versioning scheme governing `version` / `resolvedVersion`. */
11847
11889
  scheme: ReleaseSchemeSchema,
11848
11890
  /** npm dist-tag channel for this release. */
@@ -11859,27 +11901,27 @@ var init_plan = __esm({
11859
11901
  * Version of the previous release on the same channel. MUST be `null` only
11860
11902
  * for first-ever releases (R-300, enforced at the verb layer).
11861
11903
  */
11862
- previousVersion: z12.string().nullable(),
11904
+ previousVersion: z13.string().nullable(),
11863
11905
  /** Git tag of the previous release (typically `previousVersion` prefixed). */
11864
- previousTag: z12.string().nullable(),
11906
+ previousTag: z13.string().nullable(),
11865
11907
  /** ISO-8601 timestamp the previous release was published. */
11866
11908
  previousShippedAt: Iso8601.nullable(),
11867
11909
  /** Tasks rolled into this release. */
11868
- tasks: z12.array(ReleasePlanTaskSchema),
11910
+ tasks: z13.array(ReleasePlanTaskSchema),
11869
11911
  /** Bucketed changelog. */
11870
11912
  changelog: ReleasePlanChangelogSchema,
11871
11913
  /** Per-gate verification status. */
11872
- gates: z12.array(ReleaseGateSchema),
11914
+ gates: z13.array(ReleaseGateSchema),
11873
11915
  /** Platform / publisher matrix. */
11874
- platformMatrix: z12.array(ReleasePlatformMatrixEntrySchema),
11916
+ platformMatrix: z13.array(ReleasePlatformMatrixEntrySchema),
11875
11917
  /** Preflight summary from `cleo release plan`. */
11876
11918
  preflightSummary: ReleasePreflightSummarySchema,
11877
11919
  /** URL of the GHA workflow run (populated by `release-prepare.yml`). */
11878
- workflowRunUrl: z12.string().nullable(),
11920
+ workflowRunUrl: z13.string().nullable(),
11879
11921
  /** URL of the bump PR (populated by `cleo release open`). */
11880
- prUrl: z12.string().nullable(),
11922
+ prUrl: z13.string().nullable(),
11881
11923
  /** Merge commit SHA on `main` (populated by `release-publish.yml`). */
11882
- mergeCommitSha: z12.string().nullable(),
11924
+ mergeCommitSha: z13.string().nullable(),
11883
11925
  /** Current FSM state per R-302. */
11884
11926
  status: ReleaseStatusSchema,
11885
11927
  /** Informational / forward-compat metadata. */
@@ -11935,52 +11977,52 @@ var init_session2 = __esm({
11935
11977
  });
11936
11978
 
11937
11979
  // packages/contracts/src/session-journal.ts
11938
- import { z as z13 } from "zod";
11980
+ import { z as z14 } from "zod";
11939
11981
  var SESSION_JOURNAL_SCHEMA_VERSION, sessionJournalDoctorSummarySchema, sessionJournalDebriefSummarySchema, sessionJournalEntrySchema;
11940
11982
  var init_session_journal = __esm({
11941
11983
  "packages/contracts/src/session-journal.ts"() {
11942
11984
  "use strict";
11943
11985
  SESSION_JOURNAL_SCHEMA_VERSION = "1.0";
11944
- sessionJournalDoctorSummarySchema = z13.object({
11986
+ sessionJournalDoctorSummarySchema = z14.object({
11945
11987
  /** `true` when zero noise patterns were detected. */
11946
- isClean: z13.boolean(),
11988
+ isClean: z14.boolean(),
11947
11989
  /** Total number of noise findings across all patterns. */
11948
- findingsCount: z13.number().int().nonnegative(),
11990
+ findingsCount: z14.number().int().nonnegative(),
11949
11991
  /** Pattern names that were detected (empty when isClean). */
11950
- patterns: z13.array(z13.string()),
11992
+ patterns: z14.array(z14.string()),
11951
11993
  /** Total brain entries scanned. `0` = empty or unavailable. */
11952
- totalScanned: z13.number().int().nonnegative()
11994
+ totalScanned: z14.number().int().nonnegative()
11953
11995
  });
11954
- sessionJournalDebriefSummarySchema = z13.object({
11996
+ sessionJournalDebriefSummarySchema = z14.object({
11955
11997
  /** First 200 characters of the session end note (if provided). */
11956
- noteExcerpt: z13.string().max(200).optional(),
11998
+ noteExcerpt: z14.string().max(200).optional(),
11957
11999
  /** Number of tasks completed during the session. */
11958
- tasksCompletedCount: z13.number().int().nonnegative(),
12000
+ tasksCompletedCount: z14.number().int().nonnegative(),
11959
12001
  /** Up to 5 task IDs (not titles) that were the focus of the session. */
11960
- tasksFocused: z13.array(z13.string()).max(5).optional()
12002
+ tasksFocused: z14.array(z14.string()).max(5).optional()
11961
12003
  });
11962
- sessionJournalEntrySchema = z13.object({
12004
+ sessionJournalEntrySchema = z14.object({
11963
12005
  // Identity
11964
12006
  /** Schema version for forward-compatibility. Always `'1.0'` in this release. */
11965
- schemaVersion: z13.literal(SESSION_JOURNAL_SCHEMA_VERSION),
12007
+ schemaVersion: z14.literal(SESSION_JOURNAL_SCHEMA_VERSION),
11966
12008
  /** ISO 8601 timestamp when the entry was written. */
11967
- timestamp: z13.string(),
12009
+ timestamp: z14.string(),
11968
12010
  /** CLEO session ID (e.g. `ses_20260424055456_ede571`). */
11969
- sessionId: z13.string(),
12011
+ sessionId: z14.string(),
11970
12012
  /** Event type that triggered this journal entry. */
11971
- eventType: z13.enum(["session_start", "session_end", "observation", "decision", "error"]),
12013
+ eventType: z14.enum(["session_start", "session_end", "observation", "decision", "error"]),
11972
12014
  // Session metadata (set on session_start / session_end)
11973
12015
  /** Agent identifier (e.g. `cleo-prime`, `claude-code`). */
11974
- agentIdentifier: z13.string().optional(),
12016
+ agentIdentifier: z14.string().optional(),
11975
12017
  /** Provider adapter ID active for this session. */
11976
- providerId: z13.string().optional(),
12018
+ providerId: z14.string().optional(),
11977
12019
  /** Session scope string (e.g. `'global'` or `'epic:T1263'`). */
11978
- scope: z13.string().optional(),
12020
+ scope: z14.string().optional(),
11979
12021
  // Session-end fields
11980
12022
  /** Duration of the session in seconds (session_end only). */
11981
- duration: z13.number().int().nonnegative().optional(),
12023
+ duration: z14.number().int().nonnegative().optional(),
11982
12024
  /** Task IDs (not titles) completed during the session. */
11983
- tasksCompleted: z13.array(z13.string()).optional(),
12025
+ tasksCompleted: z14.array(z14.string()).optional(),
11984
12026
  // Doctor summary (T1262 absorbed)
11985
12027
  /** Compact result of `scanBrainNoise` run at session-end. */
11986
12028
  doctorSummary: sessionJournalDoctorSummarySchema.optional(),
@@ -11989,7 +12031,7 @@ var init_session_journal = __esm({
11989
12031
  debriefSummary: sessionJournalDebriefSummarySchema.optional(),
11990
12032
  // Optional hash chain
11991
12033
  /** SHA-256 hex of the previous entry's raw JSON string (for integrity chain). */
11992
- prevEntryHash: z13.string().optional()
12034
+ prevEntryHash: z14.string().optional()
11993
12035
  });
11994
12036
  }
11995
12037
  });
@@ -12002,52 +12044,52 @@ var init_task = __esm({
12002
12044
  });
12003
12045
 
12004
12046
  // packages/contracts/src/task-evidence.ts
12005
- import { z as z14 } from "zod";
12047
+ import { z as z15 } from "zod";
12006
12048
  var fileEvidenceSchema, logEvidenceSchema, screenshotEvidenceSchema, testOutputEvidenceSchema, commandOutputEvidenceSchema, taskEvidenceSchema;
12007
12049
  var init_task_evidence = __esm({
12008
12050
  "packages/contracts/src/task-evidence.ts"() {
12009
12051
  "use strict";
12010
- fileEvidenceSchema = z14.object({
12011
- kind: z14.literal("file"),
12012
- sha256: z14.string().length(64),
12013
- timestamp: z14.string().datetime(),
12014
- path: z14.string().min(1),
12015
- mime: z14.string().optional(),
12016
- description: z14.string().optional()
12017
- });
12018
- logEvidenceSchema = z14.object({
12019
- kind: z14.literal("log"),
12020
- sha256: z14.string().length(64),
12021
- timestamp: z14.string().datetime(),
12022
- source: z14.string().min(1),
12023
- description: z14.string().optional()
12024
- });
12025
- screenshotEvidenceSchema = z14.object({
12026
- kind: z14.literal("screenshot"),
12027
- sha256: z14.string().length(64),
12028
- timestamp: z14.string().datetime(),
12029
- mime: z14.enum(["image/png", "image/jpeg", "image/webp"]).optional(),
12030
- description: z14.string().optional()
12031
- });
12032
- testOutputEvidenceSchema = z14.object({
12033
- kind: z14.literal("test-output"),
12034
- sha256: z14.string().length(64),
12035
- timestamp: z14.string().datetime(),
12036
- passed: z14.number().int().nonnegative(),
12037
- failed: z14.number().int().nonnegative(),
12038
- skipped: z14.number().int().nonnegative(),
12039
- exitCode: z14.number().int(),
12040
- description: z14.string().optional()
12041
- });
12042
- commandOutputEvidenceSchema = z14.object({
12043
- kind: z14.literal("command-output"),
12044
- sha256: z14.string().length(64),
12045
- timestamp: z14.string().datetime(),
12046
- cmd: z14.string().min(1),
12047
- exitCode: z14.number().int(),
12048
- description: z14.string().optional()
12049
- });
12050
- taskEvidenceSchema = z14.discriminatedUnion("kind", [
12052
+ fileEvidenceSchema = z15.object({
12053
+ kind: z15.literal("file"),
12054
+ sha256: z15.string().length(64),
12055
+ timestamp: z15.string().datetime(),
12056
+ path: z15.string().min(1),
12057
+ mime: z15.string().optional(),
12058
+ description: z15.string().optional()
12059
+ });
12060
+ logEvidenceSchema = z15.object({
12061
+ kind: z15.literal("log"),
12062
+ sha256: z15.string().length(64),
12063
+ timestamp: z15.string().datetime(),
12064
+ source: z15.string().min(1),
12065
+ description: z15.string().optional()
12066
+ });
12067
+ screenshotEvidenceSchema = z15.object({
12068
+ kind: z15.literal("screenshot"),
12069
+ sha256: z15.string().length(64),
12070
+ timestamp: z15.string().datetime(),
12071
+ mime: z15.enum(["image/png", "image/jpeg", "image/webp"]).optional(),
12072
+ description: z15.string().optional()
12073
+ });
12074
+ testOutputEvidenceSchema = z15.object({
12075
+ kind: z15.literal("test-output"),
12076
+ sha256: z15.string().length(64),
12077
+ timestamp: z15.string().datetime(),
12078
+ passed: z15.number().int().nonnegative(),
12079
+ failed: z15.number().int().nonnegative(),
12080
+ skipped: z15.number().int().nonnegative(),
12081
+ exitCode: z15.number().int(),
12082
+ description: z15.string().optional()
12083
+ });
12084
+ commandOutputEvidenceSchema = z15.object({
12085
+ kind: z15.literal("command-output"),
12086
+ sha256: z15.string().length(64),
12087
+ timestamp: z15.string().datetime(),
12088
+ cmd: z15.string().min(1),
12089
+ exitCode: z15.number().int(),
12090
+ description: z15.string().optional()
12091
+ });
12092
+ taskEvidenceSchema = z15.discriminatedUnion("kind", [
12051
12093
  fileEvidenceSchema,
12052
12094
  logEvidenceSchema,
12053
12095
  screenshotEvidenceSchema,
@@ -12058,12 +12100,12 @@ var init_task_evidence = __esm({
12058
12100
  });
12059
12101
 
12060
12102
  // packages/contracts/src/tasks/archive.ts
12061
- import { z as z15 } from "zod";
12103
+ import { z as z16 } from "zod";
12062
12104
  var ArchiveReason, ARCHIVE_REASON_VALUES;
12063
12105
  var init_archive = __esm({
12064
12106
  "packages/contracts/src/tasks/archive.ts"() {
12065
12107
  "use strict";
12066
- ArchiveReason = z15.enum([
12108
+ ArchiveReason = z16.enum([
12067
12109
  "verified",
12068
12110
  "reconciled",
12069
12111
  "superseded",
@@ -12076,47 +12118,47 @@ var init_archive = __esm({
12076
12118
  });
12077
12119
 
12078
12120
  // packages/contracts/src/tasks.ts
12079
- import { z as z16 } from "zod";
12121
+ import { z as z17 } from "zod";
12080
12122
  var taskMutationWarningSeveritySchema, taskMutationWarningSchema, taskMutationDryRunSummarySchema, taskMutationTaskRecordSchema, taskMutationEnvelopeSchema, completionTaskStatusSchema, completionCriterionKindSchema, completionCriterionStatusSchema, completionBlockerReasonSchema, completionStaleReasonSchema, completionProjectionRepairErrorCodeSchema, completionCriterionWaiverSchema, completionCriterionReplacementSchema, completionCriterionEvaluationSchema, unsatisfiedCompletionCriterionSchema, completionTotalsSchema, completionContextPackSchema, completionEvaluationSchema, completionExplanationSchema, completionListParamsSchema, completionListResultSchema, completionEvaluateParamsSchema, completionProjectionRepairErrorSchema, completionProjectionRepairParamsSchema, completionProjectionRepairResultSchema;
12081
12123
  var init_tasks2 = __esm({
12082
12124
  "packages/contracts/src/tasks.ts"() {
12083
12125
  "use strict";
12084
12126
  init_status_registry();
12085
- taskMutationWarningSeveritySchema = z16.enum(["info", "warning"]);
12086
- taskMutationWarningSchema = z16.object({
12087
- code: z16.string().min(1),
12088
- message: z16.string().min(1),
12127
+ taskMutationWarningSeveritySchema = z17.enum(["info", "warning"]);
12128
+ taskMutationWarningSchema = z17.object({
12129
+ code: z17.string().min(1),
12130
+ message: z17.string().min(1),
12089
12131
  severity: taskMutationWarningSeveritySchema.optional(),
12090
- taskId: z16.string().min(1).optional(),
12091
- field: z16.string().min(1).optional(),
12092
- index: z16.number().int().nonnegative().optional()
12093
- });
12094
- taskMutationDryRunSummarySchema = z16.object({
12095
- dryRun: z16.literal(true),
12096
- wouldCreate: z16.number().int().nonnegative(),
12097
- wouldUpdate: z16.number().int().nonnegative(),
12098
- wouldDelete: z16.number().int().nonnegative(),
12099
- wouldAffect: z16.number().int().nonnegative(),
12100
- validatedCount: z16.number().int().nonnegative(),
12101
- insertedCount: z16.literal(0),
12102
- updatedCount: z16.literal(0),
12103
- deletedCount: z16.literal(0),
12104
- warnings: z16.array(taskMutationWarningSchema)
12105
- });
12106
- taskMutationTaskRecordSchema = z16.object({ id: z16.string().min(1) }).passthrough();
12107
- taskMutationEnvelopeSchema = z16.object({
12108
- dryRun: z16.boolean().optional(),
12109
- created: z16.array(taskMutationTaskRecordSchema),
12110
- updated: z16.array(taskMutationTaskRecordSchema),
12111
- deleted: z16.array(taskMutationTaskRecordSchema),
12112
- affectedCount: z16.number().int().nonnegative(),
12113
- mutationWarnings: z16.array(taskMutationWarningSchema),
12132
+ taskId: z17.string().min(1).optional(),
12133
+ field: z17.string().min(1).optional(),
12134
+ index: z17.number().int().nonnegative().optional()
12135
+ });
12136
+ taskMutationDryRunSummarySchema = z17.object({
12137
+ dryRun: z17.literal(true),
12138
+ wouldCreate: z17.number().int().nonnegative(),
12139
+ wouldUpdate: z17.number().int().nonnegative(),
12140
+ wouldDelete: z17.number().int().nonnegative(),
12141
+ wouldAffect: z17.number().int().nonnegative(),
12142
+ validatedCount: z17.number().int().nonnegative(),
12143
+ insertedCount: z17.literal(0),
12144
+ updatedCount: z17.literal(0),
12145
+ deletedCount: z17.literal(0),
12146
+ warnings: z17.array(taskMutationWarningSchema)
12147
+ });
12148
+ taskMutationTaskRecordSchema = z17.object({ id: z17.string().min(1) }).passthrough();
12149
+ taskMutationEnvelopeSchema = z17.object({
12150
+ dryRun: z17.boolean().optional(),
12151
+ created: z17.array(taskMutationTaskRecordSchema),
12152
+ updated: z17.array(taskMutationTaskRecordSchema),
12153
+ deleted: z17.array(taskMutationTaskRecordSchema),
12154
+ affectedCount: z17.number().int().nonnegative(),
12155
+ mutationWarnings: z17.array(taskMutationWarningSchema),
12114
12156
  dryRunSummary: taskMutationDryRunSummarySchema.optional()
12115
12157
  });
12116
- completionTaskStatusSchema = z16.enum(TASK_STATUSES);
12117
- completionCriterionKindSchema = z16.enum(["text", "evidence_bound", "child_task"]);
12118
- completionCriterionStatusSchema = z16.enum(["satisfied", "unsatisfied", "waived", "replaced"]);
12119
- completionBlockerReasonSchema = z16.enum([
12158
+ completionTaskStatusSchema = z17.enum(TASK_STATUSES);
12159
+ completionCriterionKindSchema = z17.enum(["text", "evidence_bound", "child_task"]);
12160
+ completionCriterionStatusSchema = z17.enum(["satisfied", "unsatisfied", "waived", "replaced"]);
12161
+ completionBlockerReasonSchema = z17.enum([
12120
12162
  "missing_evidence_binding",
12121
12163
  "child_not_done",
12122
12164
  "child_cancelled_requires_waiver",
@@ -12124,68 +12166,68 @@ var init_tasks2 = __esm({
12124
12166
  "child_missing",
12125
12167
  "done_parent_stale"
12126
12168
  ]);
12127
- completionStaleReasonSchema = z16.enum(["done_parent_has_unsatisfied_criteria"]);
12128
- completionProjectionRepairErrorCodeSchema = z16.enum([
12169
+ completionStaleReasonSchema = z17.enum(["done_parent_has_unsatisfied_criteria"]);
12170
+ completionProjectionRepairErrorCodeSchema = z17.enum([
12129
12171
  "projection_not_stale",
12130
12172
  "criteria_missing",
12131
12173
  "binding_target_missing",
12132
12174
  "repair_conflict"
12133
12175
  ]);
12134
- completionCriterionWaiverSchema = z16.object({
12135
- criterionAcId: z16.string().min(1),
12136
- childTaskId: z16.string().min(1),
12137
- reason: z16.string().min(1),
12138
- actor: z16.string().min(1),
12139
- waivedAt: z16.string().min(1)
12140
- });
12141
- completionCriterionReplacementSchema = z16.object({
12142
- criterionAcId: z16.string().min(1),
12143
- originalChildTaskId: z16.string().min(1),
12144
- replacementChildTaskId: z16.string().min(1),
12145
- reason: z16.string().min(1),
12146
- actor: z16.string().min(1),
12147
- replacedAt: z16.string().min(1)
12148
- });
12149
- completionCriterionEvaluationSchema = z16.object({
12150
- acId: z16.string().min(1),
12151
- alias: z16.string().min(1),
12152
- text: z16.string(),
12176
+ completionCriterionWaiverSchema = z17.object({
12177
+ criterionAcId: z17.string().min(1),
12178
+ childTaskId: z17.string().min(1),
12179
+ reason: z17.string().min(1),
12180
+ actor: z17.string().min(1),
12181
+ waivedAt: z17.string().min(1)
12182
+ });
12183
+ completionCriterionReplacementSchema = z17.object({
12184
+ criterionAcId: z17.string().min(1),
12185
+ originalChildTaskId: z17.string().min(1),
12186
+ replacementChildTaskId: z17.string().min(1),
12187
+ reason: z17.string().min(1),
12188
+ actor: z17.string().min(1),
12189
+ replacedAt: z17.string().min(1)
12190
+ });
12191
+ completionCriterionEvaluationSchema = z17.object({
12192
+ acId: z17.string().min(1),
12193
+ alias: z17.string().min(1),
12194
+ text: z17.string(),
12153
12195
  kind: completionCriterionKindSchema,
12154
12196
  status: completionCriterionStatusSchema,
12155
12197
  reason: completionBlockerReasonSchema.optional(),
12156
- targetTaskId: z16.string().min(1).optional(),
12198
+ targetTaskId: z17.string().min(1).optional(),
12157
12199
  targetTaskStatus: completionTaskStatusSchema.optional(),
12158
12200
  waiver: completionCriterionWaiverSchema.optional(),
12159
12201
  replacement: completionCriterionReplacementSchema.optional(),
12160
12202
  replacementTaskStatus: completionTaskStatusSchema.optional(),
12161
- evidenceBindings: z16.number().int().nonnegative()
12203
+ evidenceBindings: z17.number().int().nonnegative()
12162
12204
  });
12163
12205
  unsatisfiedCompletionCriterionSchema = completionCriterionEvaluationSchema.extend({
12164
- status: z16.literal("unsatisfied"),
12206
+ status: z17.literal("unsatisfied"),
12165
12207
  reason: completionBlockerReasonSchema
12166
12208
  });
12167
- completionTotalsSchema = z16.object({
12168
- criteria: z16.number().int().nonnegative(),
12169
- satisfied: z16.number().int().nonnegative(),
12170
- unsatisfied: z16.number().int().nonnegative(),
12171
- waived: z16.number().int().nonnegative(),
12172
- replaced: z16.number().int().nonnegative()
12173
- });
12174
- completionContextPackSchema = z16.object({
12175
- taskId: z16.string().min(1),
12176
- generatedAt: z16.string().min(1),
12177
- source: z16.literal("audit_log"),
12178
- window: z16.object({
12179
- limit: z16.number().int().positive(),
12180
- since: z16.string().min(1).optional(),
12181
- relationDepth: z16.number().int().nonnegative(),
12182
- relatedTaskIds: z16.array(z16.string().min(1))
12209
+ completionTotalsSchema = z17.object({
12210
+ criteria: z17.number().int().nonnegative(),
12211
+ satisfied: z17.number().int().nonnegative(),
12212
+ unsatisfied: z17.number().int().nonnegative(),
12213
+ waived: z17.number().int().nonnegative(),
12214
+ replaced: z17.number().int().nonnegative()
12215
+ });
12216
+ completionContextPackSchema = z17.object({
12217
+ taskId: z17.string().min(1),
12218
+ generatedAt: z17.string().min(1),
12219
+ source: z17.literal("audit_log"),
12220
+ window: z17.object({
12221
+ limit: z17.number().int().positive(),
12222
+ since: z17.string().min(1).optional(),
12223
+ relationDepth: z17.number().int().nonnegative(),
12224
+ relatedTaskIds: z17.array(z17.string().min(1))
12183
12225
  }),
12184
- events: z16.array(
12185
- z16.object({
12186
- id: z16.string().min(1),
12187
- timestamp: z16.string().min(1),
12188
- action: z16.enum([
12226
+ events: z17.array(
12227
+ z17.object({
12228
+ id: z17.string().min(1),
12229
+ timestamp: z17.string().min(1),
12230
+ action: z17.enum([
12189
12231
  "task_completed",
12190
12232
  "task_reopened",
12191
12233
  "task_cancelled",
@@ -12193,77 +12235,77 @@ var init_tasks2 = __esm({
12193
12235
  "task_reparented",
12194
12236
  "ac_projection_rebuilt"
12195
12237
  ]),
12196
- taskId: z16.string().min(1),
12197
- relation: z16.enum(["self", "parent", "child", "sibling", "related"]),
12198
- actor: z16.string().min(1),
12199
- details: z16.record(z16.string(), z16.unknown()).optional(),
12200
- before: z16.record(z16.string(), z16.unknown()).optional(),
12201
- after: z16.record(z16.string(), z16.unknown()).optional()
12238
+ taskId: z17.string().min(1),
12239
+ relation: z17.enum(["self", "parent", "child", "sibling", "related"]),
12240
+ actor: z17.string().min(1),
12241
+ details: z17.record(z17.string(), z17.unknown()).optional(),
12242
+ before: z17.record(z17.string(), z17.unknown()).optional(),
12243
+ after: z17.record(z17.string(), z17.unknown()).optional()
12202
12244
  })
12203
12245
  ),
12204
- summary: z16.object({
12205
- totalEvents: z16.number().int().nonnegative(),
12206
- byAction: z16.record(z16.string(), z16.number().int().nonnegative()),
12207
- byRelation: z16.record(z16.string(), z16.number().int().nonnegative()),
12208
- latestEventAt: z16.string().nullable()
12246
+ summary: z17.object({
12247
+ totalEvents: z17.number().int().nonnegative(),
12248
+ byAction: z17.record(z17.string(), z17.number().int().nonnegative()),
12249
+ byRelation: z17.record(z17.string(), z17.number().int().nonnegative()),
12250
+ latestEventAt: z17.string().nullable()
12209
12251
  })
12210
12252
  });
12211
- completionEvaluationSchema = z16.object({
12212
- taskId: z16.string().min(1),
12253
+ completionEvaluationSchema = z17.object({
12254
+ taskId: z17.string().min(1),
12213
12255
  taskStatus: completionTaskStatusSchema,
12214
- ready: z16.boolean(),
12215
- stale: z16.boolean(),
12216
- staleReasons: z16.array(completionStaleReasonSchema),
12256
+ ready: z17.boolean(),
12257
+ stale: z17.boolean(),
12258
+ staleReasons: z17.array(completionStaleReasonSchema),
12217
12259
  contextPack: completionContextPackSchema.optional(),
12218
- satisfied: z16.array(completionCriterionEvaluationSchema),
12219
- unsatisfied: z16.array(unsatisfiedCompletionCriterionSchema),
12220
- waived: z16.array(completionCriterionEvaluationSchema),
12221
- replaced: z16.array(completionCriterionEvaluationSchema),
12260
+ satisfied: z17.array(completionCriterionEvaluationSchema),
12261
+ unsatisfied: z17.array(unsatisfiedCompletionCriterionSchema),
12262
+ waived: z17.array(completionCriterionEvaluationSchema),
12263
+ replaced: z17.array(completionCriterionEvaluationSchema),
12222
12264
  totals: completionTotalsSchema
12223
12265
  });
12224
- completionExplanationSchema = z16.object({
12225
- taskId: z16.string().min(1),
12226
- ready: z16.boolean(),
12227
- stale: z16.boolean(),
12228
- summary: z16.string(),
12266
+ completionExplanationSchema = z17.object({
12267
+ taskId: z17.string().min(1),
12268
+ ready: z17.boolean(),
12269
+ stale: z17.boolean(),
12270
+ summary: z17.string(),
12229
12271
  contextPack: completionContextPackSchema.optional(),
12230
- blockers: z16.array(completionCriterionEvaluationSchema)
12272
+ blockers: z17.array(completionCriterionEvaluationSchema)
12231
12273
  });
12232
- completionListParamsSchema = z16.object({
12233
- taskId: z16.string().min(1),
12274
+ completionListParamsSchema = z17.object({
12275
+ taskId: z17.string().min(1),
12234
12276
  status: completionCriterionStatusSchema.optional(),
12235
12277
  kind: completionCriterionKindSchema.optional()
12236
12278
  });
12237
- completionListResultSchema = z16.object({
12238
- taskId: z16.string().min(1),
12239
- criteria: z16.array(completionCriterionEvaluationSchema),
12279
+ completionListResultSchema = z17.object({
12280
+ taskId: z17.string().min(1),
12281
+ criteria: z17.array(completionCriterionEvaluationSchema),
12240
12282
  totals: completionTotalsSchema
12241
12283
  });
12242
- completionEvaluateParamsSchema = z16.object({
12243
- taskId: z16.string().min(1),
12244
- includeContext: z16.boolean().optional(),
12245
- limit: z16.number().int().positive().optional(),
12246
- since: z16.string().min(1).optional(),
12247
- relationDepth: z16.number().int().nonnegative().optional()
12284
+ completionEvaluateParamsSchema = z17.object({
12285
+ taskId: z17.string().min(1),
12286
+ includeContext: z17.boolean().optional(),
12287
+ limit: z17.number().int().positive().optional(),
12288
+ since: z17.string().min(1).optional(),
12289
+ relationDepth: z17.number().int().nonnegative().optional()
12248
12290
  });
12249
- completionProjectionRepairErrorSchema = z16.object({
12291
+ completionProjectionRepairErrorSchema = z17.object({
12250
12292
  code: completionProjectionRepairErrorCodeSchema,
12251
- message: z16.string().min(1),
12252
- taskId: z16.string().min(1),
12253
- acId: z16.string().min(1).optional(),
12254
- evidenceAtomId: z16.string().min(1).optional()
12293
+ message: z17.string().min(1),
12294
+ taskId: z17.string().min(1),
12295
+ acId: z17.string().min(1).optional(),
12296
+ evidenceAtomId: z17.string().min(1).optional()
12255
12297
  });
12256
- completionProjectionRepairParamsSchema = z16.object({
12257
- taskId: z16.string().min(1),
12258
- dryRun: z16.boolean().optional()
12298
+ completionProjectionRepairParamsSchema = z17.object({
12299
+ taskId: z17.string().min(1),
12300
+ dryRun: z17.boolean().optional()
12259
12301
  });
12260
- completionProjectionRepairResultSchema = z16.object({
12261
- taskId: z16.string().min(1),
12262
- repaired: z16.boolean(),
12263
- dryRun: z16.boolean(),
12264
- staleBefore: z16.boolean(),
12265
- staleAfter: z16.boolean(),
12266
- errors: z16.array(completionProjectionRepairErrorSchema)
12302
+ completionProjectionRepairResultSchema = z17.object({
12303
+ taskId: z17.string().min(1),
12304
+ repaired: z17.boolean(),
12305
+ dryRun: z17.boolean(),
12306
+ staleBefore: z17.boolean(),
12307
+ staleAfter: z17.boolean(),
12308
+ errors: z17.array(completionProjectionRepairErrorSchema)
12267
12309
  });
12268
12310
  }
12269
12311
  });
@@ -12774,7 +12816,7 @@ var init_taxonomy = __esm({
12774
12816
  });
12775
12817
 
12776
12818
  // packages/contracts/src/templates/manifest.ts
12777
- import { z as z17 } from "zod";
12819
+ import { z as z18 } from "zod";
12778
12820
  var TEMPLATE_KINDS, TEMPLATE_SUBSTITUTIONS, TEMPLATE_UPDATE_STRATEGIES, PLACEHOLDER_SOURCES, PlaceholderSpecSchema, TemplateManifestEntrySchema;
12779
12821
  var init_manifest2 = __esm({
12780
12822
  "packages/contracts/src/templates/manifest.ts"() {
@@ -12795,85 +12837,85 @@ var init_manifest2 = __esm({
12795
12837
  "tool-resolver",
12796
12838
  "literal"
12797
12839
  ];
12798
- PlaceholderSpecSchema = z17.object({
12840
+ PlaceholderSpecSchema = z18.object({
12799
12841
  /**
12800
12842
  * Placeholder identifier as it appears in the template body
12801
12843
  * (e.g. `NODE_VERSION` matches `{{NODE_VERSION}}`).
12802
12844
  */
12803
- name: z17.string().min(1, "placeholder name must be non-empty"),
12845
+ name: z18.string().min(1, "placeholder name must be non-empty"),
12804
12846
  /** Resolver source the installer consults for this placeholder. */
12805
- source: z17.enum(PLACEHOLDER_SOURCES),
12847
+ source: z18.enum(PLACEHOLDER_SOURCES),
12806
12848
  /**
12807
12849
  * Path expression evaluated against `source` (e.g. `engines.node` against
12808
12850
  * `project-context`, `defaults.branchModel` against `.cleo/config`).
12809
12851
  * For `literal` source, this MAY be the literal value's identifier.
12810
12852
  */
12811
- sourcePath: z17.string().min(1, "placeholder sourcePath must be non-empty"),
12853
+ sourcePath: z18.string().min(1, "placeholder sourcePath must be non-empty"),
12812
12854
  /**
12813
12855
  * Fallback value used when `source[sourcePath]` resolves to `undefined`.
12814
12856
  * `null` is permitted to explicitly mark "no default — failure required".
12815
12857
  */
12816
- defaultValue: z17.union([z17.string(), z17.number(), z17.boolean(), z17.null()]).optional()
12858
+ defaultValue: z18.union([z18.string(), z18.number(), z18.boolean(), z18.null()]).optional()
12817
12859
  });
12818
- TemplateManifestEntrySchema = z17.object({
12860
+ TemplateManifestEntrySchema = z18.object({
12819
12861
  /** Stable identifier for this template entry. */
12820
- id: z17.string().min(1, "id must be non-empty"),
12862
+ id: z18.string().min(1, "id must be non-empty"),
12821
12863
  /** Category of file this template represents. */
12822
- kind: z17.enum(TEMPLATE_KINDS),
12864
+ kind: z18.enum(TEMPLATE_KINDS),
12823
12865
  /** Repo-relative path of the template source file. */
12824
- sourcePath: z17.string().min(1, "sourcePath must be non-empty"),
12866
+ sourcePath: z18.string().min(1, "sourcePath must be non-empty"),
12825
12867
  /** Project-relative path where the rendered template installs. */
12826
- installPath: z17.string().min(1, "installPath must be non-empty"),
12868
+ installPath: z18.string().min(1, "installPath must be non-empty"),
12827
12869
  /** Substitution strategy the installer applies to `sourcePath`. */
12828
- substitution: z17.enum(TEMPLATE_SUBSTITUTIONS),
12870
+ substitution: z18.enum(TEMPLATE_SUBSTITUTIONS),
12829
12871
  /** Declared placeholders this template requires. May be empty. */
12830
- placeholders: z17.array(PlaceholderSpecSchema),
12872
+ placeholders: z18.array(PlaceholderSpecSchema),
12831
12873
  /** Reconciliation policy on upgrade. */
12832
- updateStrategy: z17.enum(TEMPLATE_UPDATE_STRATEGIES)
12874
+ updateStrategy: z18.enum(TEMPLATE_UPDATE_STRATEGIES)
12833
12875
  });
12834
12876
  }
12835
12877
  });
12836
12878
 
12837
12879
  // packages/contracts/src/validator/index.ts
12838
- import { z as z18 } from "zod";
12880
+ import { z as z19 } from "zod";
12839
12881
  var VALIDATOR_ID_REGEX, validatorFindingSchema, validatorAttestationSchema, validatorRejectionSchema, validatorVerdictSchema;
12840
12882
  var init_validator = __esm({
12841
12883
  "packages/contracts/src/validator/index.ts"() {
12842
12884
  "use strict";
12843
12885
  VALIDATOR_ID_REGEX = /^validator-[a-z0-9][a-z0-9-]*$/;
12844
- validatorFindingSchema = z18.object({
12845
- acId: z18.string().min(1, "acId must be non-empty"),
12846
- status: z18.enum(["pass", "fail", "inconclusive"]),
12847
- reasoning: z18.string().min(1, "reasoning must be non-empty"),
12848
- evidenceRefs: z18.array(z18.string()).optional(),
12849
- checkedAt: z18.string().min(1, "checkedAt must be a non-empty ISO-8601 string")
12850
- });
12851
- validatorAttestationSchema = z18.object({
12852
- verdict: z18.literal("attest"),
12853
- taskId: z18.string().min(1),
12854
- validatorId: z18.string().regex(VALIDATOR_ID_REGEX, "validatorId must match the pattern validator-<discriminator>"),
12855
- findings: z18.array(validatorFindingSchema).min(1, "attestation must contain at least one finding").refine(
12886
+ validatorFindingSchema = z19.object({
12887
+ acId: z19.string().min(1, "acId must be non-empty"),
12888
+ status: z19.enum(["pass", "fail", "inconclusive"]),
12889
+ reasoning: z19.string().min(1, "reasoning must be non-empty"),
12890
+ evidenceRefs: z19.array(z19.string()).optional(),
12891
+ checkedAt: z19.string().min(1, "checkedAt must be a non-empty ISO-8601 string")
12892
+ });
12893
+ validatorAttestationSchema = z19.object({
12894
+ verdict: z19.literal("attest"),
12895
+ taskId: z19.string().min(1),
12896
+ validatorId: z19.string().regex(VALIDATOR_ID_REGEX, "validatorId must match the pattern validator-<discriminator>"),
12897
+ findings: z19.array(validatorFindingSchema).min(1, "attestation must contain at least one finding").refine(
12856
12898
  (findings) => findings.every((f) => f.status === "pass"),
12857
12899
  'attestation requires every finding to have status="pass"'
12858
12900
  ),
12859
- summary: z18.string().optional(),
12860
- attestedAt: z18.string().min(1),
12861
- schemaVersion: z18.literal("1")
12862
- });
12863
- validatorRejectionSchema = z18.object({
12864
- verdict: z18.literal("reject"),
12865
- taskId: z18.string().min(1),
12866
- validatorId: z18.string().regex(VALIDATOR_ID_REGEX, "validatorId must match the pattern validator-<discriminator>"),
12867
- findings: z18.array(validatorFindingSchema).min(1, "rejection must contain at least one finding").refine(
12901
+ summary: z19.string().optional(),
12902
+ attestedAt: z19.string().min(1),
12903
+ schemaVersion: z19.literal("1")
12904
+ });
12905
+ validatorRejectionSchema = z19.object({
12906
+ verdict: z19.literal("reject"),
12907
+ taskId: z19.string().min(1),
12908
+ validatorId: z19.string().regex(VALIDATOR_ID_REGEX, "validatorId must match the pattern validator-<discriminator>"),
12909
+ findings: z19.array(validatorFindingSchema).min(1, "rejection must contain at least one finding").refine(
12868
12910
  (findings) => findings.some((f) => f.status !== "pass"),
12869
12911
  'rejection requires at least one finding with status "fail" or "inconclusive"'
12870
12912
  ),
12871
- summary: z18.string().min(1, "rejection summary must be non-empty"),
12872
- remediationHints: z18.array(z18.string()).optional(),
12873
- rejectedAt: z18.string().min(1),
12874
- schemaVersion: z18.literal("1")
12913
+ summary: z19.string().min(1, "rejection summary must be non-empty"),
12914
+ remediationHints: z19.array(z19.string()).optional(),
12915
+ rejectedAt: z19.string().min(1),
12916
+ schemaVersion: z19.literal("1")
12875
12917
  });
12876
- validatorVerdictSchema = z18.discriminatedUnion("verdict", [
12918
+ validatorVerdictSchema = z19.discriminatedUnion("verdict", [
12877
12919
  validatorAttestationSchema,
12878
12920
  validatorRejectionSchema
12879
12921
  ]);
@@ -12897,6 +12939,7 @@ var init_src = __esm({
12897
12939
  init_identity();
12898
12940
  init_operations_registry();
12899
12941
  init_provenance();
12942
+ init_read();
12900
12943
  init_docs_taxonomy();
12901
12944
  init_engine_result();
12902
12945
  init_enums();
@@ -26956,7 +26999,7 @@ function resolveRef(ref, ctx) {
26956
26999
  function convertBaseSchema(schema, ctx) {
26957
27000
  if (schema.not !== void 0) {
26958
27001
  if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
26959
- return z19.never();
27002
+ return z20.never();
26960
27003
  }
26961
27004
  throw new Error("not is not supported in Zod (except { not: {} } for never)");
26962
27005
  }
@@ -26978,7 +27021,7 @@ function convertBaseSchema(schema, ctx) {
26978
27021
  return ctx.refs.get(refPath);
26979
27022
  }
26980
27023
  if (ctx.processing.has(refPath)) {
26981
- return z19.lazy(() => {
27024
+ return z20.lazy(() => {
26982
27025
  if (!ctx.refs.has(refPath)) {
26983
27026
  throw new Error(`Circular reference not resolved: ${refPath}`);
26984
27027
  }
@@ -26995,25 +27038,25 @@ function convertBaseSchema(schema, ctx) {
26995
27038
  if (schema.enum !== void 0) {
26996
27039
  const enumValues = schema.enum;
26997
27040
  if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
26998
- return z19.null();
27041
+ return z20.null();
26999
27042
  }
27000
27043
  if (enumValues.length === 0) {
27001
- return z19.never();
27044
+ return z20.never();
27002
27045
  }
27003
27046
  if (enumValues.length === 1) {
27004
- return z19.literal(enumValues[0]);
27047
+ return z20.literal(enumValues[0]);
27005
27048
  }
27006
27049
  if (enumValues.every((v) => typeof v === "string")) {
27007
- return z19.enum(enumValues);
27050
+ return z20.enum(enumValues);
27008
27051
  }
27009
- const literalSchemas = enumValues.map((v) => z19.literal(v));
27052
+ const literalSchemas = enumValues.map((v) => z20.literal(v));
27010
27053
  if (literalSchemas.length < 2) {
27011
27054
  return literalSchemas[0];
27012
27055
  }
27013
- return z19.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
27056
+ return z20.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
27014
27057
  }
27015
27058
  if (schema.const !== void 0) {
27016
- return z19.literal(schema.const);
27059
+ return z20.literal(schema.const);
27017
27060
  }
27018
27061
  const type = schema.type;
27019
27062
  if (Array.isArray(type)) {
@@ -27022,68 +27065,68 @@ function convertBaseSchema(schema, ctx) {
27022
27065
  return convertBaseSchema(typeSchema, ctx);
27023
27066
  });
27024
27067
  if (typeSchemas.length === 0) {
27025
- return z19.never();
27068
+ return z20.never();
27026
27069
  }
27027
27070
  if (typeSchemas.length === 1) {
27028
27071
  return typeSchemas[0];
27029
27072
  }
27030
- return z19.union(typeSchemas);
27073
+ return z20.union(typeSchemas);
27031
27074
  }
27032
27075
  if (!type) {
27033
- return z19.any();
27076
+ return z20.any();
27034
27077
  }
27035
27078
  let zodSchema2;
27036
27079
  switch (type) {
27037
27080
  case "string": {
27038
- let stringSchema = z19.string();
27081
+ let stringSchema = z20.string();
27039
27082
  if (schema.format) {
27040
27083
  const format = schema.format;
27041
27084
  if (format === "email") {
27042
- stringSchema = stringSchema.check(z19.email());
27085
+ stringSchema = stringSchema.check(z20.email());
27043
27086
  } else if (format === "uri" || format === "uri-reference") {
27044
- stringSchema = stringSchema.check(z19.url());
27087
+ stringSchema = stringSchema.check(z20.url());
27045
27088
  } else if (format === "uuid" || format === "guid") {
27046
- stringSchema = stringSchema.check(z19.uuid());
27089
+ stringSchema = stringSchema.check(z20.uuid());
27047
27090
  } else if (format === "date-time") {
27048
- stringSchema = stringSchema.check(z19.iso.datetime());
27091
+ stringSchema = stringSchema.check(z20.iso.datetime());
27049
27092
  } else if (format === "date") {
27050
- stringSchema = stringSchema.check(z19.iso.date());
27093
+ stringSchema = stringSchema.check(z20.iso.date());
27051
27094
  } else if (format === "time") {
27052
- stringSchema = stringSchema.check(z19.iso.time());
27095
+ stringSchema = stringSchema.check(z20.iso.time());
27053
27096
  } else if (format === "duration") {
27054
- stringSchema = stringSchema.check(z19.iso.duration());
27097
+ stringSchema = stringSchema.check(z20.iso.duration());
27055
27098
  } else if (format === "ipv4") {
27056
- stringSchema = stringSchema.check(z19.ipv4());
27099
+ stringSchema = stringSchema.check(z20.ipv4());
27057
27100
  } else if (format === "ipv6") {
27058
- stringSchema = stringSchema.check(z19.ipv6());
27101
+ stringSchema = stringSchema.check(z20.ipv6());
27059
27102
  } else if (format === "mac") {
27060
- stringSchema = stringSchema.check(z19.mac());
27103
+ stringSchema = stringSchema.check(z20.mac());
27061
27104
  } else if (format === "cidr") {
27062
- stringSchema = stringSchema.check(z19.cidrv4());
27105
+ stringSchema = stringSchema.check(z20.cidrv4());
27063
27106
  } else if (format === "cidr-v6") {
27064
- stringSchema = stringSchema.check(z19.cidrv6());
27107
+ stringSchema = stringSchema.check(z20.cidrv6());
27065
27108
  } else if (format === "base64") {
27066
- stringSchema = stringSchema.check(z19.base64());
27109
+ stringSchema = stringSchema.check(z20.base64());
27067
27110
  } else if (format === "base64url") {
27068
- stringSchema = stringSchema.check(z19.base64url());
27111
+ stringSchema = stringSchema.check(z20.base64url());
27069
27112
  } else if (format === "e164") {
27070
- stringSchema = stringSchema.check(z19.e164());
27113
+ stringSchema = stringSchema.check(z20.e164());
27071
27114
  } else if (format === "jwt") {
27072
- stringSchema = stringSchema.check(z19.jwt());
27115
+ stringSchema = stringSchema.check(z20.jwt());
27073
27116
  } else if (format === "emoji") {
27074
- stringSchema = stringSchema.check(z19.emoji());
27117
+ stringSchema = stringSchema.check(z20.emoji());
27075
27118
  } else if (format === "nanoid") {
27076
- stringSchema = stringSchema.check(z19.nanoid());
27119
+ stringSchema = stringSchema.check(z20.nanoid());
27077
27120
  } else if (format === "cuid") {
27078
- stringSchema = stringSchema.check(z19.cuid());
27121
+ stringSchema = stringSchema.check(z20.cuid());
27079
27122
  } else if (format === "cuid2") {
27080
- stringSchema = stringSchema.check(z19.cuid2());
27123
+ stringSchema = stringSchema.check(z20.cuid2());
27081
27124
  } else if (format === "ulid") {
27082
- stringSchema = stringSchema.check(z19.ulid());
27125
+ stringSchema = stringSchema.check(z20.ulid());
27083
27126
  } else if (format === "xid") {
27084
- stringSchema = stringSchema.check(z19.xid());
27127
+ stringSchema = stringSchema.check(z20.xid());
27085
27128
  } else if (format === "ksuid") {
27086
- stringSchema = stringSchema.check(z19.ksuid());
27129
+ stringSchema = stringSchema.check(z20.ksuid());
27087
27130
  }
27088
27131
  }
27089
27132
  if (typeof schema.minLength === "number") {
@@ -27100,7 +27143,7 @@ function convertBaseSchema(schema, ctx) {
27100
27143
  }
27101
27144
  case "number":
27102
27145
  case "integer": {
27103
- let numberSchema = type === "integer" ? z19.number().int() : z19.number();
27146
+ let numberSchema = type === "integer" ? z20.number().int() : z20.number();
27104
27147
  if (typeof schema.minimum === "number") {
27105
27148
  numberSchema = numberSchema.min(schema.minimum);
27106
27149
  }
@@ -27124,11 +27167,11 @@ function convertBaseSchema(schema, ctx) {
27124
27167
  break;
27125
27168
  }
27126
27169
  case "boolean": {
27127
- zodSchema2 = z19.boolean();
27170
+ zodSchema2 = z20.boolean();
27128
27171
  break;
27129
27172
  }
27130
27173
  case "null": {
27131
- zodSchema2 = z19.null();
27174
+ zodSchema2 = z20.null();
27132
27175
  break;
27133
27176
  }
27134
27177
  case "object": {
@@ -27141,14 +27184,14 @@ function convertBaseSchema(schema, ctx) {
27141
27184
  }
27142
27185
  if (schema.propertyNames) {
27143
27186
  const keySchema = convertSchema(schema.propertyNames, ctx);
27144
- const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z19.any();
27187
+ const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z20.any();
27145
27188
  if (Object.keys(shape).length === 0) {
27146
- zodSchema2 = z19.record(keySchema, valueSchema);
27189
+ zodSchema2 = z20.record(keySchema, valueSchema);
27147
27190
  break;
27148
27191
  }
27149
- const objectSchema2 = z19.object(shape).passthrough();
27150
- const recordSchema = z19.looseRecord(keySchema, valueSchema);
27151
- zodSchema2 = z19.intersection(objectSchema2, recordSchema);
27192
+ const objectSchema2 = z20.object(shape).passthrough();
27193
+ const recordSchema = z20.looseRecord(keySchema, valueSchema);
27194
+ zodSchema2 = z20.intersection(objectSchema2, recordSchema);
27152
27195
  break;
27153
27196
  }
27154
27197
  if (schema.patternProperties) {
@@ -27157,28 +27200,28 @@ function convertBaseSchema(schema, ctx) {
27157
27200
  const looseRecords = [];
27158
27201
  for (const pattern of patternKeys) {
27159
27202
  const patternValue = convertSchema(patternProps[pattern], ctx);
27160
- const keySchema = z19.string().regex(new RegExp(pattern));
27161
- looseRecords.push(z19.looseRecord(keySchema, patternValue));
27203
+ const keySchema = z20.string().regex(new RegExp(pattern));
27204
+ looseRecords.push(z20.looseRecord(keySchema, patternValue));
27162
27205
  }
27163
27206
  const schemasToIntersect = [];
27164
27207
  if (Object.keys(shape).length > 0) {
27165
- schemasToIntersect.push(z19.object(shape).passthrough());
27208
+ schemasToIntersect.push(z20.object(shape).passthrough());
27166
27209
  }
27167
27210
  schemasToIntersect.push(...looseRecords);
27168
27211
  if (schemasToIntersect.length === 0) {
27169
- zodSchema2 = z19.object({}).passthrough();
27212
+ zodSchema2 = z20.object({}).passthrough();
27170
27213
  } else if (schemasToIntersect.length === 1) {
27171
27214
  zodSchema2 = schemasToIntersect[0];
27172
27215
  } else {
27173
- let result = z19.intersection(schemasToIntersect[0], schemasToIntersect[1]);
27216
+ let result = z20.intersection(schemasToIntersect[0], schemasToIntersect[1]);
27174
27217
  for (let i = 2; i < schemasToIntersect.length; i++) {
27175
- result = z19.intersection(result, schemasToIntersect[i]);
27218
+ result = z20.intersection(result, schemasToIntersect[i]);
27176
27219
  }
27177
27220
  zodSchema2 = result;
27178
27221
  }
27179
27222
  break;
27180
27223
  }
27181
- const objectSchema = z19.object(shape);
27224
+ const objectSchema = z20.object(shape);
27182
27225
  if (schema.additionalProperties === false) {
27183
27226
  zodSchema2 = objectSchema.strict();
27184
27227
  } else if (typeof schema.additionalProperties === "object") {
@@ -27195,33 +27238,33 @@ function convertBaseSchema(schema, ctx) {
27195
27238
  const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
27196
27239
  const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
27197
27240
  if (rest) {
27198
- zodSchema2 = z19.tuple(tupleItems).rest(rest);
27241
+ zodSchema2 = z20.tuple(tupleItems).rest(rest);
27199
27242
  } else {
27200
- zodSchema2 = z19.tuple(tupleItems);
27243
+ zodSchema2 = z20.tuple(tupleItems);
27201
27244
  }
27202
27245
  if (typeof schema.minItems === "number") {
27203
- zodSchema2 = zodSchema2.check(z19.minLength(schema.minItems));
27246
+ zodSchema2 = zodSchema2.check(z20.minLength(schema.minItems));
27204
27247
  }
27205
27248
  if (typeof schema.maxItems === "number") {
27206
- zodSchema2 = zodSchema2.check(z19.maxLength(schema.maxItems));
27249
+ zodSchema2 = zodSchema2.check(z20.maxLength(schema.maxItems));
27207
27250
  }
27208
27251
  } else if (Array.isArray(items)) {
27209
27252
  const tupleItems = items.map((item) => convertSchema(item, ctx));
27210
27253
  const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
27211
27254
  if (rest) {
27212
- zodSchema2 = z19.tuple(tupleItems).rest(rest);
27255
+ zodSchema2 = z20.tuple(tupleItems).rest(rest);
27213
27256
  } else {
27214
- zodSchema2 = z19.tuple(tupleItems);
27257
+ zodSchema2 = z20.tuple(tupleItems);
27215
27258
  }
27216
27259
  if (typeof schema.minItems === "number") {
27217
- zodSchema2 = zodSchema2.check(z19.minLength(schema.minItems));
27260
+ zodSchema2 = zodSchema2.check(z20.minLength(schema.minItems));
27218
27261
  }
27219
27262
  if (typeof schema.maxItems === "number") {
27220
- zodSchema2 = zodSchema2.check(z19.maxLength(schema.maxItems));
27263
+ zodSchema2 = zodSchema2.check(z20.maxLength(schema.maxItems));
27221
27264
  }
27222
27265
  } else if (items !== void 0) {
27223
27266
  const element = convertSchema(items, ctx);
27224
- let arraySchema = z19.array(element);
27267
+ let arraySchema = z20.array(element);
27225
27268
  if (typeof schema.minItems === "number") {
27226
27269
  arraySchema = arraySchema.min(schema.minItems);
27227
27270
  }
@@ -27230,7 +27273,7 @@ function convertBaseSchema(schema, ctx) {
27230
27273
  }
27231
27274
  zodSchema2 = arraySchema;
27232
27275
  } else {
27233
- zodSchema2 = z19.array(z19.any());
27276
+ zodSchema2 = z20.array(z20.any());
27234
27277
  }
27235
27278
  break;
27236
27279
  }
@@ -27247,37 +27290,37 @@ function convertBaseSchema(schema, ctx) {
27247
27290
  }
27248
27291
  function convertSchema(schema, ctx) {
27249
27292
  if (typeof schema === "boolean") {
27250
- return schema ? z19.any() : z19.never();
27293
+ return schema ? z20.any() : z20.never();
27251
27294
  }
27252
27295
  let baseSchema = convertBaseSchema(schema, ctx);
27253
27296
  const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
27254
27297
  if (schema.anyOf && Array.isArray(schema.anyOf)) {
27255
27298
  const options = schema.anyOf.map((s) => convertSchema(s, ctx));
27256
- const anyOfUnion = z19.union(options);
27257
- baseSchema = hasExplicitType ? z19.intersection(baseSchema, anyOfUnion) : anyOfUnion;
27299
+ const anyOfUnion = z20.union(options);
27300
+ baseSchema = hasExplicitType ? z20.intersection(baseSchema, anyOfUnion) : anyOfUnion;
27258
27301
  }
27259
27302
  if (schema.oneOf && Array.isArray(schema.oneOf)) {
27260
27303
  const options = schema.oneOf.map((s) => convertSchema(s, ctx));
27261
- const oneOfUnion = z19.xor(options);
27262
- baseSchema = hasExplicitType ? z19.intersection(baseSchema, oneOfUnion) : oneOfUnion;
27304
+ const oneOfUnion = z20.xor(options);
27305
+ baseSchema = hasExplicitType ? z20.intersection(baseSchema, oneOfUnion) : oneOfUnion;
27263
27306
  }
27264
27307
  if (schema.allOf && Array.isArray(schema.allOf)) {
27265
27308
  if (schema.allOf.length === 0) {
27266
- baseSchema = hasExplicitType ? baseSchema : z19.any();
27309
+ baseSchema = hasExplicitType ? baseSchema : z20.any();
27267
27310
  } else {
27268
27311
  let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
27269
27312
  const startIdx = hasExplicitType ? 0 : 1;
27270
27313
  for (let i = startIdx; i < schema.allOf.length; i++) {
27271
- result = z19.intersection(result, convertSchema(schema.allOf[i], ctx));
27314
+ result = z20.intersection(result, convertSchema(schema.allOf[i], ctx));
27272
27315
  }
27273
27316
  baseSchema = result;
27274
27317
  }
27275
27318
  }
27276
27319
  if (schema.nullable === true && ctx.version === "openapi-3.0") {
27277
- baseSchema = z19.nullable(baseSchema);
27320
+ baseSchema = z20.nullable(baseSchema);
27278
27321
  }
27279
27322
  if (schema.readOnly === true) {
27280
- baseSchema = z19.readonly(baseSchema);
27323
+ baseSchema = z20.readonly(baseSchema);
27281
27324
  }
27282
27325
  const extraMeta = {};
27283
27326
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
@@ -27304,7 +27347,7 @@ function convertSchema(schema, ctx) {
27304
27347
  }
27305
27348
  function fromJSONSchema(schema, params) {
27306
27349
  if (typeof schema === "boolean") {
27307
- return schema ? z19.any() : z19.never();
27350
+ return schema ? z20.any() : z20.never();
27308
27351
  }
27309
27352
  const version2 = detectVersion(schema, params?.defaultTarget);
27310
27353
  const defs = schema.$defs || schema.definitions || {};
@@ -27318,14 +27361,14 @@ function fromJSONSchema(schema, params) {
27318
27361
  };
27319
27362
  return convertSchema(schema, ctx);
27320
27363
  }
27321
- var z19, RECOGNIZED_KEYS;
27364
+ var z20, RECOGNIZED_KEYS;
27322
27365
  var init_from_json_schema = __esm({
27323
27366
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js"() {
27324
27367
  init_registries();
27325
27368
  init_checks2();
27326
27369
  init_iso();
27327
27370
  init_schemas2();
27328
- z19 = {
27371
+ z20 = {
27329
27372
  ...schemas_exports2,
27330
27373
  ...checks_exports2,
27331
27374
  iso: iso_exports