@cleocode/adapters 2026.5.90 → 2026.5.93

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
@@ -847,6 +847,103 @@ var init_credentials = __esm({
847
847
  }
848
848
  });
849
849
 
850
+ // packages/contracts/src/docs-taxonomy.ts
851
+ var BUILTIN_DOC_KINDS, BUILTIN_DOC_KIND_VALUES;
852
+ var init_docs_taxonomy = __esm({
853
+ "packages/contracts/src/docs-taxonomy.ts"() {
854
+ "use strict";
855
+ BUILTIN_DOC_KINDS = [
856
+ {
857
+ kind: "adr",
858
+ label: "ADR",
859
+ description: "Architectural decision record",
860
+ defaultOwnerKind: "task",
861
+ publishDir: "docs/adr",
862
+ requiresEntityId: true,
863
+ entityIdPattern: /^adr-\d{3,4}-[a-z0-9-]+$/
864
+ },
865
+ {
866
+ kind: "spec",
867
+ label: "Spec",
868
+ description: "Technical specification",
869
+ defaultOwnerKind: "task",
870
+ publishDir: "docs/spec",
871
+ requiresEntityId: false
872
+ },
873
+ {
874
+ kind: "research",
875
+ label: "Research",
876
+ description: "Investigation / research note",
877
+ defaultOwnerKind: "task",
878
+ publishDir: "docs/research",
879
+ requiresEntityId: false
880
+ },
881
+ {
882
+ kind: "handoff",
883
+ label: "Handoff",
884
+ description: "Session / agent handoff",
885
+ defaultOwnerKind: "session",
886
+ publishDir: "docs/handoff",
887
+ requiresEntityId: false
888
+ },
889
+ {
890
+ kind: "note",
891
+ label: "Note",
892
+ description: "Agent observation / informal note",
893
+ defaultOwnerKind: "observation",
894
+ publishDir: "docs/note",
895
+ requiresEntityId: false
896
+ },
897
+ {
898
+ kind: "llm-readme",
899
+ label: "LLM README",
900
+ description: "Machine-readable README (llms.txt)",
901
+ defaultOwnerKind: "project",
902
+ publishDir: ".",
903
+ requiresEntityId: false
904
+ },
905
+ {
906
+ kind: "changeset",
907
+ label: "Changeset",
908
+ description: "Atomic change entry (release-note input)",
909
+ defaultOwnerKind: "task",
910
+ publishDir: ".changeset",
911
+ requiresEntityId: true,
912
+ entityIdPattern: /^t\d+-[a-z0-9-]+$/
913
+ },
914
+ {
915
+ kind: "release-note",
916
+ label: "Release Note",
917
+ description: "Composed release notes",
918
+ defaultOwnerKind: "project",
919
+ publishDir: "docs/release",
920
+ requiresEntityId: true,
921
+ entityIdPattern: /^v\d{4}\.\d+\.\d+(-[a-z0-9-]+)?$/
922
+ },
923
+ {
924
+ kind: "plan",
925
+ label: "Plan",
926
+ description: "Epic / saga decomposition plan",
927
+ defaultOwnerKind: "task",
928
+ publishDir: "docs/plan",
929
+ requiresEntityId: false
930
+ },
931
+ {
932
+ kind: "rcasd",
933
+ label: "RCASD",
934
+ description: "Root-cause analysis + scoped delivery",
935
+ defaultOwnerKind: "task",
936
+ publishDir: ".cleo/rcasd",
937
+ requiresEntityId: true,
938
+ entityIdPattern: /^t\d+(-.+)?$/
939
+ }
940
+ ];
941
+ BUILTIN_DOC_KIND_VALUES = Object.freeze(
942
+ BUILTIN_DOC_KINDS.map((d) => d.kind)
943
+ );
944
+ }
945
+ });
946
+
850
947
  // packages/contracts/src/engine-result.ts
851
948
  var init_engine_result = __esm({
852
949
  "packages/contracts/src/engine-result.ts"() {
@@ -1003,6 +1100,7 @@ var init_dialectic = __esm({
1003
1100
  var init_docs = __esm({
1004
1101
  "packages/contracts/src/operations/docs.ts"() {
1005
1102
  "use strict";
1103
+ init_docs_taxonomy();
1006
1104
  }
1007
1105
  });
1008
1106
 
@@ -1208,8 +1306,41 @@ var init_peer = __esm({
1208
1306
  }
1209
1307
  });
1210
1308
 
1211
- // packages/contracts/src/release/plan.ts
1309
+ // packages/contracts/src/release/evidence-atoms.ts
1212
1310
  import { z as z5 } from "zod";
1311
+ var parsedPrEvidenceAtomSchema, ghPrViewSchema, PR_REQUIRED_WORKFLOWS;
1312
+ var init_evidence_atoms = __esm({
1313
+ "packages/contracts/src/release/evidence-atoms.ts"() {
1314
+ "use strict";
1315
+ parsedPrEvidenceAtomSchema = z5.object({
1316
+ kind: z5.literal("pr"),
1317
+ prNumber: z5.number().int().positive()
1318
+ });
1319
+ ghPrViewSchema = z5.object({
1320
+ state: z5.enum(["OPEN", "CLOSED", "MERGED"]),
1321
+ mergedAt: z5.string().nullable(),
1322
+ headRefOid: z5.string().optional(),
1323
+ mergeable: z5.string().optional(),
1324
+ statusCheckRollup: z5.array(
1325
+ z5.object({
1326
+ __typename: z5.string().optional(),
1327
+ name: z5.string().optional(),
1328
+ workflowName: z5.string().optional(),
1329
+ conclusion: z5.string().nullable().optional(),
1330
+ status: z5.string().optional()
1331
+ }).passthrough()
1332
+ ).optional().default([])
1333
+ }).passthrough();
1334
+ PR_REQUIRED_WORKFLOWS = Object.freeze([
1335
+ "CI",
1336
+ "Lockfile Check",
1337
+ "Contracts Dep Lint"
1338
+ ]);
1339
+ }
1340
+ });
1341
+
1342
+ // packages/contracts/src/release/plan.ts
1343
+ import { z as z6 } from "zod";
1213
1344
  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;
1214
1345
  var init_plan = __esm({
1215
1346
  "packages/contracts/src/release/plan.ts"() {
@@ -1252,20 +1383,20 @@ var init_plan = __esm({
1252
1383
  ];
1253
1384
  IMPACT = ["major", "minor", "patch"];
1254
1385
  RESOLVED_SOURCE = ["project-context", "language-default", "legacy-alias"];
1255
- ReleaseChannelSchema = z5.enum(RELEASE_CHANNEL);
1256
- ReleaseSchemeSchema = z5.enum(RELEASE_SCHEME);
1257
- ReleaseKindSchema = z5.enum(RELEASE_KIND);
1258
- ReleaseStatusSchema = z5.enum(RELEASE_STATUS);
1259
- GateStatusSchema = z5.enum(GATE_STATUS);
1260
- GateNameSchema = z5.enum(GATE_NAME);
1261
- PlatformTupleSchema = z5.enum(PLATFORM_TUPLE);
1262
- PublisherSchema = z5.enum(PUBLISHER);
1263
- TaskKindSchema = z5.enum(TASK_KIND);
1264
- ImpactSchema = z5.enum(IMPACT);
1265
- ResolvedSourceSchema = z5.enum(RESOLVED_SOURCE);
1266
- Iso8601 = z5.iso.datetime({ offset: true });
1267
- NonEmptyString = z5.string().min(1);
1268
- ReleasePlanTaskSchema = z5.object({
1386
+ ReleaseChannelSchema = z6.enum(RELEASE_CHANNEL);
1387
+ ReleaseSchemeSchema = z6.enum(RELEASE_SCHEME);
1388
+ ReleaseKindSchema = z6.enum(RELEASE_KIND);
1389
+ ReleaseStatusSchema = z6.enum(RELEASE_STATUS);
1390
+ GateStatusSchema = z6.enum(GATE_STATUS);
1391
+ GateNameSchema = z6.enum(GATE_NAME);
1392
+ PlatformTupleSchema = z6.enum(PLATFORM_TUPLE);
1393
+ PublisherSchema = z6.enum(PUBLISHER);
1394
+ TaskKindSchema = z6.enum(TASK_KIND);
1395
+ ImpactSchema = z6.enum(IMPACT);
1396
+ ResolvedSourceSchema = z6.enum(RESOLVED_SOURCE);
1397
+ Iso8601 = z6.iso.datetime({ offset: true });
1398
+ NonEmptyString = z6.string().min(1);
1399
+ ReleasePlanTaskSchema = z6.object({
1269
1400
  /** Task ID (e.g. "T10001"). Format intentionally loose so historical IDs validate. */
1270
1401
  id: NonEmptyString,
1271
1402
  /** Conventional-commit-aligned task classification. */
@@ -1273,20 +1404,20 @@ var init_plan = __esm({
1273
1404
  /** SemVer impact classification. */
1274
1405
  impact: ImpactSchema,
1275
1406
  /** Human-readable changelog line for this task. */
1276
- userFacingSummary: z5.string(),
1407
+ userFacingSummary: z6.string(),
1277
1408
  /**
1278
1409
  * ADR-051 evidence atoms attesting the task's gate results. Format is
1279
1410
  * `kind:value` (e.g. `commit:abc123`, `test-run:vitest.json`). The contract
1280
1411
  * accepts empty arrays so legacy plans validate; `cleo release plan`
1281
1412
  * enforces non-empty via R-301.
1282
1413
  */
1283
- evidenceAtoms: z5.array(NonEmptyString),
1414
+ evidenceAtoms: z6.array(NonEmptyString),
1284
1415
  /** IVTR phase at plan time — informational only per R-316. */
1285
- ivtrPhaseAtPlan: z5.string().optional(),
1416
+ ivtrPhaseAtPlan: z6.string().optional(),
1286
1417
  /** Epic this task rolls up to, locked at plan time per R-303. */
1287
1418
  epicAncestor: NonEmptyString
1288
1419
  });
1289
- ReleaseGateSchema = z5.object({
1420
+ ReleaseGateSchema = z6.object({
1290
1421
  /** Canonical gate name. */
1291
1422
  name: GateNameSchema,
1292
1423
  /** ADR-051 atom string identifying the resolved tool (e.g. `tool:test`). */
@@ -1296,11 +1427,11 @@ var init_plan = __esm({
1296
1427
  /** ISO-8601 timestamp the gate was last verified. */
1297
1428
  lastVerifiedAt: Iso8601,
1298
1429
  /** Resolved shell command (e.g. `pnpm run test`). Optional for unresolved gates. */
1299
- resolvedCommand: z5.string().optional(),
1430
+ resolvedCommand: z6.string().optional(),
1300
1431
  /** Provenance of the resolved command. Optional for unresolved gates. */
1301
1432
  resolvedSource: ResolvedSourceSchema.optional()
1302
1433
  });
1303
- ReleasePlatformMatrixEntrySchema = z5.object({
1434
+ ReleasePlatformMatrixEntrySchema = z6.object({
1304
1435
  /** Target platform tuple. */
1305
1436
  platform: PlatformTupleSchema,
1306
1437
  /** Distribution backend. */
@@ -1308,47 +1439,47 @@ var init_plan = __esm({
1308
1439
  /** Package identifier on the target backend (e.g. `@cleocode/cleo`). */
1309
1440
  package: NonEmptyString,
1310
1441
  /** Whether to run the GHA smoke job for this matrix entry. */
1311
- smoke: z5.boolean().default(true).optional()
1442
+ smoke: z6.boolean().default(true).optional()
1312
1443
  });
1313
- ReleasePreflightSummarySchema = z5.object({
1444
+ ReleasePreflightSummarySchema = z6.object({
1314
1445
  /** True if esbuild externals are out of sync with package.json. */
1315
- esbuildExternalsDrift: z5.boolean(),
1446
+ esbuildExternalsDrift: z6.boolean(),
1316
1447
  /** True if `pnpm-lock.yaml` diverges from the workspace manifest. */
1317
- lockfileDrift: z5.boolean(),
1448
+ lockfileDrift: z6.boolean(),
1318
1449
  /** True if all epic children are in terminal lifecycle states. */
1319
- epicCompletenessClean: z5.boolean(),
1450
+ epicCompletenessClean: z6.boolean(),
1320
1451
  /** True if no task appears in multiple in-flight release plans. */
1321
- doubleListingClean: z5.boolean(),
1452
+ doubleListingClean: z6.boolean(),
1322
1453
  /** Non-fatal preflight warnings (e.g. unresolved tools per R-024). */
1323
- preflightWarnings: z5.array(z5.string()).default([]).optional()
1454
+ preflightWarnings: z6.array(z6.string()).default([]).optional()
1324
1455
  });
1325
- ReleasePlanChangelogSchema = z5.object({
1456
+ ReleasePlanChangelogSchema = z6.object({
1326
1457
  /** `kind=feat` tasks. */
1327
- features: z5.array(NonEmptyString).default([]),
1458
+ features: z6.array(NonEmptyString).default([]),
1328
1459
  /** `kind=fix` or `kind=hotfix` tasks. */
1329
- fixes: z5.array(NonEmptyString).default([]),
1460
+ fixes: z6.array(NonEmptyString).default([]),
1330
1461
  /** `kind=chore`, `docs`, `refactor`, `test`, `perf` tasks. */
1331
- chores: z5.array(NonEmptyString).default([]),
1462
+ chores: z6.array(NonEmptyString).default([]),
1332
1463
  /** `kind=breaking` or `kind=revert` tasks. */
1333
- breaking: z5.array(NonEmptyString).default([])
1464
+ breaking: z6.array(NonEmptyString).default([])
1334
1465
  });
1335
- ReleasePlanMetaSchema = z5.object({
1466
+ ReleasePlanMetaSchema = z6.object({
1336
1467
  /** True if this is the project's first ever release. */
1337
- firstEverRelease: z5.boolean().optional(),
1468
+ firstEverRelease: z6.boolean().optional(),
1338
1469
  /** Canonical tool names that could not be resolved at plan time. */
1339
- unresolvedTools: z5.array(z5.string()).optional(),
1470
+ unresolvedTools: z6.array(z6.string()).optional(),
1340
1471
  /** Project archetype detected at plan time. */
1341
- archetype: z5.string().optional()
1342
- }).catchall(z5.unknown());
1343
- ReleasePlanSchema = z5.object({
1472
+ archetype: z6.string().optional()
1473
+ }).catchall(z6.unknown());
1474
+ ReleasePlanSchema = z6.object({
1344
1475
  /** Schema URL for this plan version. */
1345
- $schema: z5.string().optional(),
1476
+ $schema: z6.string().optional(),
1346
1477
  /** Requested version string (e.g. "v2026.6.0"). Includes the leading `v`. */
1347
1478
  version: NonEmptyString,
1348
1479
  /** Resolved version string after suffix application (e.g. "v2026.6.0.2"). */
1349
1480
  resolvedVersion: NonEmptyString,
1350
1481
  /** True if a `calver-suffix` was applied to disambiguate a same-day hotfix. */
1351
- suffixApplied: z5.boolean(),
1482
+ suffixApplied: z6.boolean(),
1352
1483
  /** Versioning scheme governing `version` / `resolvedVersion`. */
1353
1484
  scheme: ReleaseSchemeSchema,
1354
1485
  /** npm dist-tag channel for this release. */
@@ -1365,27 +1496,27 @@ var init_plan = __esm({
1365
1496
  * Version of the previous release on the same channel. MUST be `null` only
1366
1497
  * for first-ever releases (R-300, enforced at the verb layer).
1367
1498
  */
1368
- previousVersion: z5.string().nullable(),
1499
+ previousVersion: z6.string().nullable(),
1369
1500
  /** Git tag of the previous release (typically `previousVersion` prefixed). */
1370
- previousTag: z5.string().nullable(),
1501
+ previousTag: z6.string().nullable(),
1371
1502
  /** ISO-8601 timestamp the previous release was published. */
1372
1503
  previousShippedAt: Iso8601.nullable(),
1373
1504
  /** Tasks rolled into this release. */
1374
- tasks: z5.array(ReleasePlanTaskSchema),
1505
+ tasks: z6.array(ReleasePlanTaskSchema),
1375
1506
  /** Bucketed changelog. */
1376
1507
  changelog: ReleasePlanChangelogSchema,
1377
1508
  /** Per-gate verification status. */
1378
- gates: z5.array(ReleaseGateSchema),
1509
+ gates: z6.array(ReleaseGateSchema),
1379
1510
  /** Platform / publisher matrix. */
1380
- platformMatrix: z5.array(ReleasePlatformMatrixEntrySchema),
1511
+ platformMatrix: z6.array(ReleasePlatformMatrixEntrySchema),
1381
1512
  /** Preflight summary from `cleo release plan`. */
1382
1513
  preflightSummary: ReleasePreflightSummarySchema,
1383
1514
  /** URL of the GHA workflow run (populated by `release-prepare.yml`). */
1384
- workflowRunUrl: z5.string().nullable(),
1515
+ workflowRunUrl: z6.string().nullable(),
1385
1516
  /** URL of the bump PR (populated by `cleo release open`). */
1386
- prUrl: z5.string().nullable(),
1517
+ prUrl: z6.string().nullable(),
1387
1518
  /** Merge commit SHA on `main` (populated by `release-publish.yml`). */
1388
- mergeCommitSha: z5.string().nullable(),
1519
+ mergeCommitSha: z6.string().nullable(),
1389
1520
  /** Current FSM state per R-302. */
1390
1521
  status: ReleaseStatusSchema,
1391
1522
  /** Informational / forward-compat metadata. */
@@ -1402,52 +1533,52 @@ var init_session2 = __esm({
1402
1533
  });
1403
1534
 
1404
1535
  // packages/contracts/src/session-journal.ts
1405
- import { z as z6 } from "zod";
1536
+ import { z as z7 } from "zod";
1406
1537
  var SESSION_JOURNAL_SCHEMA_VERSION, sessionJournalDoctorSummarySchema, sessionJournalDebriefSummarySchema, sessionJournalEntrySchema;
1407
1538
  var init_session_journal = __esm({
1408
1539
  "packages/contracts/src/session-journal.ts"() {
1409
1540
  "use strict";
1410
1541
  SESSION_JOURNAL_SCHEMA_VERSION = "1.0";
1411
- sessionJournalDoctorSummarySchema = z6.object({
1542
+ sessionJournalDoctorSummarySchema = z7.object({
1412
1543
  /** `true` when zero noise patterns were detected. */
1413
- isClean: z6.boolean(),
1544
+ isClean: z7.boolean(),
1414
1545
  /** Total number of noise findings across all patterns. */
1415
- findingsCount: z6.number().int().nonnegative(),
1546
+ findingsCount: z7.number().int().nonnegative(),
1416
1547
  /** Pattern names that were detected (empty when isClean). */
1417
- patterns: z6.array(z6.string()),
1548
+ patterns: z7.array(z7.string()),
1418
1549
  /** Total brain entries scanned. `0` = empty or unavailable. */
1419
- totalScanned: z6.number().int().nonnegative()
1550
+ totalScanned: z7.number().int().nonnegative()
1420
1551
  });
1421
- sessionJournalDebriefSummarySchema = z6.object({
1552
+ sessionJournalDebriefSummarySchema = z7.object({
1422
1553
  /** First 200 characters of the session end note (if provided). */
1423
- noteExcerpt: z6.string().max(200).optional(),
1554
+ noteExcerpt: z7.string().max(200).optional(),
1424
1555
  /** Number of tasks completed during the session. */
1425
- tasksCompletedCount: z6.number().int().nonnegative(),
1556
+ tasksCompletedCount: z7.number().int().nonnegative(),
1426
1557
  /** Up to 5 task IDs (not titles) that were the focus of the session. */
1427
- tasksFocused: z6.array(z6.string()).max(5).optional()
1558
+ tasksFocused: z7.array(z7.string()).max(5).optional()
1428
1559
  });
1429
- sessionJournalEntrySchema = z6.object({
1560
+ sessionJournalEntrySchema = z7.object({
1430
1561
  // Identity
1431
1562
  /** Schema version for forward-compatibility. Always `'1.0'` in this release. */
1432
- schemaVersion: z6.literal(SESSION_JOURNAL_SCHEMA_VERSION),
1563
+ schemaVersion: z7.literal(SESSION_JOURNAL_SCHEMA_VERSION),
1433
1564
  /** ISO 8601 timestamp when the entry was written. */
1434
- timestamp: z6.string(),
1565
+ timestamp: z7.string(),
1435
1566
  /** CLEO session ID (e.g. `ses_20260424055456_ede571`). */
1436
- sessionId: z6.string(),
1567
+ sessionId: z7.string(),
1437
1568
  /** Event type that triggered this journal entry. */
1438
- eventType: z6.enum(["session_start", "session_end", "observation", "decision", "error"]),
1569
+ eventType: z7.enum(["session_start", "session_end", "observation", "decision", "error"]),
1439
1570
  // Session metadata (set on session_start / session_end)
1440
1571
  /** Agent identifier (e.g. `cleo-prime`, `claude-code`). */
1441
- agentIdentifier: z6.string().optional(),
1572
+ agentIdentifier: z7.string().optional(),
1442
1573
  /** Provider adapter ID active for this session. */
1443
- providerId: z6.string().optional(),
1574
+ providerId: z7.string().optional(),
1444
1575
  /** Session scope string (e.g. `'global'` or `'epic:T1263'`). */
1445
- scope: z6.string().optional(),
1576
+ scope: z7.string().optional(),
1446
1577
  // Session-end fields
1447
1578
  /** Duration of the session in seconds (session_end only). */
1448
- duration: z6.number().int().nonnegative().optional(),
1579
+ duration: z7.number().int().nonnegative().optional(),
1449
1580
  /** Task IDs (not titles) completed during the session. */
1450
- tasksCompleted: z6.array(z6.string()).optional(),
1581
+ tasksCompleted: z7.array(z7.string()).optional(),
1451
1582
  // Doctor summary (T1262 absorbed)
1452
1583
  /** Compact result of `scanBrainNoise` run at session-end. */
1453
1584
  doctorSummary: sessionJournalDoctorSummarySchema.optional(),
@@ -1456,7 +1587,7 @@ var init_session_journal = __esm({
1456
1587
  debriefSummary: sessionJournalDebriefSummarySchema.optional(),
1457
1588
  // Optional hash chain
1458
1589
  /** SHA-256 hex of the previous entry's raw JSON string (for integrity chain). */
1459
- prevEntryHash: z6.string().optional()
1590
+ prevEntryHash: z7.string().optional()
1460
1591
  });
1461
1592
  }
1462
1593
  });
@@ -1476,52 +1607,52 @@ var init_task = __esm({
1476
1607
  });
1477
1608
 
1478
1609
  // packages/contracts/src/task-evidence.ts
1479
- import { z as z7 } from "zod";
1610
+ import { z as z8 } from "zod";
1480
1611
  var fileEvidenceSchema, logEvidenceSchema, screenshotEvidenceSchema, testOutputEvidenceSchema, commandOutputEvidenceSchema, taskEvidenceSchema;
1481
1612
  var init_task_evidence = __esm({
1482
1613
  "packages/contracts/src/task-evidence.ts"() {
1483
1614
  "use strict";
1484
- fileEvidenceSchema = z7.object({
1485
- kind: z7.literal("file"),
1486
- sha256: z7.string().length(64),
1487
- timestamp: z7.string().datetime(),
1488
- path: z7.string().min(1),
1489
- mime: z7.string().optional(),
1490
- description: z7.string().optional()
1491
- });
1492
- logEvidenceSchema = z7.object({
1493
- kind: z7.literal("log"),
1494
- sha256: z7.string().length(64),
1495
- timestamp: z7.string().datetime(),
1496
- source: z7.string().min(1),
1497
- description: z7.string().optional()
1498
- });
1499
- screenshotEvidenceSchema = z7.object({
1500
- kind: z7.literal("screenshot"),
1501
- sha256: z7.string().length(64),
1502
- timestamp: z7.string().datetime(),
1503
- mime: z7.enum(["image/png", "image/jpeg", "image/webp"]).optional(),
1504
- description: z7.string().optional()
1505
- });
1506
- testOutputEvidenceSchema = z7.object({
1507
- kind: z7.literal("test-output"),
1508
- sha256: z7.string().length(64),
1509
- timestamp: z7.string().datetime(),
1510
- passed: z7.number().int().nonnegative(),
1511
- failed: z7.number().int().nonnegative(),
1512
- skipped: z7.number().int().nonnegative(),
1513
- exitCode: z7.number().int(),
1514
- description: z7.string().optional()
1515
- });
1516
- commandOutputEvidenceSchema = z7.object({
1517
- kind: z7.literal("command-output"),
1518
- sha256: z7.string().length(64),
1519
- timestamp: z7.string().datetime(),
1520
- cmd: z7.string().min(1),
1521
- exitCode: z7.number().int(),
1522
- description: z7.string().optional()
1523
- });
1524
- taskEvidenceSchema = z7.discriminatedUnion("kind", [
1615
+ fileEvidenceSchema = z8.object({
1616
+ kind: z8.literal("file"),
1617
+ sha256: z8.string().length(64),
1618
+ timestamp: z8.string().datetime(),
1619
+ path: z8.string().min(1),
1620
+ mime: z8.string().optional(),
1621
+ description: z8.string().optional()
1622
+ });
1623
+ logEvidenceSchema = z8.object({
1624
+ kind: z8.literal("log"),
1625
+ sha256: z8.string().length(64),
1626
+ timestamp: z8.string().datetime(),
1627
+ source: z8.string().min(1),
1628
+ description: z8.string().optional()
1629
+ });
1630
+ screenshotEvidenceSchema = z8.object({
1631
+ kind: z8.literal("screenshot"),
1632
+ sha256: z8.string().length(64),
1633
+ timestamp: z8.string().datetime(),
1634
+ mime: z8.enum(["image/png", "image/jpeg", "image/webp"]).optional(),
1635
+ description: z8.string().optional()
1636
+ });
1637
+ testOutputEvidenceSchema = z8.object({
1638
+ kind: z8.literal("test-output"),
1639
+ sha256: z8.string().length(64),
1640
+ timestamp: z8.string().datetime(),
1641
+ passed: z8.number().int().nonnegative(),
1642
+ failed: z8.number().int().nonnegative(),
1643
+ skipped: z8.number().int().nonnegative(),
1644
+ exitCode: z8.number().int(),
1645
+ description: z8.string().optional()
1646
+ });
1647
+ commandOutputEvidenceSchema = z8.object({
1648
+ kind: z8.literal("command-output"),
1649
+ sha256: z8.string().length(64),
1650
+ timestamp: z8.string().datetime(),
1651
+ cmd: z8.string().min(1),
1652
+ exitCode: z8.number().int(),
1653
+ description: z8.string().optional()
1654
+ });
1655
+ taskEvidenceSchema = z8.discriminatedUnion("kind", [
1525
1656
  fileEvidenceSchema,
1526
1657
  logEvidenceSchema,
1527
1658
  screenshotEvidenceSchema,
@@ -1532,12 +1663,12 @@ var init_task_evidence = __esm({
1532
1663
  });
1533
1664
 
1534
1665
  // packages/contracts/src/tasks/archive.ts
1535
- import { z as z8 } from "zod";
1666
+ import { z as z9 } from "zod";
1536
1667
  var ArchiveReason, ARCHIVE_REASON_VALUES;
1537
1668
  var init_archive = __esm({
1538
1669
  "packages/contracts/src/tasks/archive.ts"() {
1539
1670
  "use strict";
1540
- ArchiveReason = z8.enum([
1671
+ ArchiveReason = z9.enum([
1541
1672
  "verified",
1542
1673
  "reconciled",
1543
1674
  "superseded",
@@ -1557,6 +1688,7 @@ var init_src = __esm({
1557
1688
  init_branch_lock();
1558
1689
  init_changesets();
1559
1690
  init_credentials();
1691
+ init_docs_taxonomy();
1560
1692
  init_engine_result();
1561
1693
  init_errors();
1562
1694
  init_evidence_record_schema();
@@ -1569,6 +1701,7 @@ var init_src = __esm({
1569
1701
  init_nexus_scope_map();
1570
1702
  init_params();
1571
1703
  init_peer();
1704
+ init_evidence_atoms();
1572
1705
  init_plan();
1573
1706
  init_session2();
1574
1707
  init_session_journal();
@@ -15595,7 +15728,7 @@ function resolveRef(ref, ctx) {
15595
15728
  function convertBaseSchema(schema, ctx) {
15596
15729
  if (schema.not !== void 0) {
15597
15730
  if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
15598
- return z9.never();
15731
+ return z10.never();
15599
15732
  }
15600
15733
  throw new Error("not is not supported in Zod (except { not: {} } for never)");
15601
15734
  }
@@ -15617,7 +15750,7 @@ function convertBaseSchema(schema, ctx) {
15617
15750
  return ctx.refs.get(refPath);
15618
15751
  }
15619
15752
  if (ctx.processing.has(refPath)) {
15620
- return z9.lazy(() => {
15753
+ return z10.lazy(() => {
15621
15754
  if (!ctx.refs.has(refPath)) {
15622
15755
  throw new Error(`Circular reference not resolved: ${refPath}`);
15623
15756
  }
@@ -15634,25 +15767,25 @@ function convertBaseSchema(schema, ctx) {
15634
15767
  if (schema.enum !== void 0) {
15635
15768
  const enumValues = schema.enum;
15636
15769
  if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
15637
- return z9.null();
15770
+ return z10.null();
15638
15771
  }
15639
15772
  if (enumValues.length === 0) {
15640
- return z9.never();
15773
+ return z10.never();
15641
15774
  }
15642
15775
  if (enumValues.length === 1) {
15643
- return z9.literal(enumValues[0]);
15776
+ return z10.literal(enumValues[0]);
15644
15777
  }
15645
15778
  if (enumValues.every((v) => typeof v === "string")) {
15646
- return z9.enum(enumValues);
15779
+ return z10.enum(enumValues);
15647
15780
  }
15648
- const literalSchemas = enumValues.map((v) => z9.literal(v));
15781
+ const literalSchemas = enumValues.map((v) => z10.literal(v));
15649
15782
  if (literalSchemas.length < 2) {
15650
15783
  return literalSchemas[0];
15651
15784
  }
15652
- return z9.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
15785
+ return z10.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
15653
15786
  }
15654
15787
  if (schema.const !== void 0) {
15655
- return z9.literal(schema.const);
15788
+ return z10.literal(schema.const);
15656
15789
  }
15657
15790
  const type = schema.type;
15658
15791
  if (Array.isArray(type)) {
@@ -15661,68 +15794,68 @@ function convertBaseSchema(schema, ctx) {
15661
15794
  return convertBaseSchema(typeSchema, ctx);
15662
15795
  });
15663
15796
  if (typeSchemas.length === 0) {
15664
- return z9.never();
15797
+ return z10.never();
15665
15798
  }
15666
15799
  if (typeSchemas.length === 1) {
15667
15800
  return typeSchemas[0];
15668
15801
  }
15669
- return z9.union(typeSchemas);
15802
+ return z10.union(typeSchemas);
15670
15803
  }
15671
15804
  if (!type) {
15672
- return z9.any();
15805
+ return z10.any();
15673
15806
  }
15674
15807
  let zodSchema2;
15675
15808
  switch (type) {
15676
15809
  case "string": {
15677
- let stringSchema = z9.string();
15810
+ let stringSchema = z10.string();
15678
15811
  if (schema.format) {
15679
15812
  const format = schema.format;
15680
15813
  if (format === "email") {
15681
- stringSchema = stringSchema.check(z9.email());
15814
+ stringSchema = stringSchema.check(z10.email());
15682
15815
  } else if (format === "uri" || format === "uri-reference") {
15683
- stringSchema = stringSchema.check(z9.url());
15816
+ stringSchema = stringSchema.check(z10.url());
15684
15817
  } else if (format === "uuid" || format === "guid") {
15685
- stringSchema = stringSchema.check(z9.uuid());
15818
+ stringSchema = stringSchema.check(z10.uuid());
15686
15819
  } else if (format === "date-time") {
15687
- stringSchema = stringSchema.check(z9.iso.datetime());
15820
+ stringSchema = stringSchema.check(z10.iso.datetime());
15688
15821
  } else if (format === "date") {
15689
- stringSchema = stringSchema.check(z9.iso.date());
15822
+ stringSchema = stringSchema.check(z10.iso.date());
15690
15823
  } else if (format === "time") {
15691
- stringSchema = stringSchema.check(z9.iso.time());
15824
+ stringSchema = stringSchema.check(z10.iso.time());
15692
15825
  } else if (format === "duration") {
15693
- stringSchema = stringSchema.check(z9.iso.duration());
15826
+ stringSchema = stringSchema.check(z10.iso.duration());
15694
15827
  } else if (format === "ipv4") {
15695
- stringSchema = stringSchema.check(z9.ipv4());
15828
+ stringSchema = stringSchema.check(z10.ipv4());
15696
15829
  } else if (format === "ipv6") {
15697
- stringSchema = stringSchema.check(z9.ipv6());
15830
+ stringSchema = stringSchema.check(z10.ipv6());
15698
15831
  } else if (format === "mac") {
15699
- stringSchema = stringSchema.check(z9.mac());
15832
+ stringSchema = stringSchema.check(z10.mac());
15700
15833
  } else if (format === "cidr") {
15701
- stringSchema = stringSchema.check(z9.cidrv4());
15834
+ stringSchema = stringSchema.check(z10.cidrv4());
15702
15835
  } else if (format === "cidr-v6") {
15703
- stringSchema = stringSchema.check(z9.cidrv6());
15836
+ stringSchema = stringSchema.check(z10.cidrv6());
15704
15837
  } else if (format === "base64") {
15705
- stringSchema = stringSchema.check(z9.base64());
15838
+ stringSchema = stringSchema.check(z10.base64());
15706
15839
  } else if (format === "base64url") {
15707
- stringSchema = stringSchema.check(z9.base64url());
15840
+ stringSchema = stringSchema.check(z10.base64url());
15708
15841
  } else if (format === "e164") {
15709
- stringSchema = stringSchema.check(z9.e164());
15842
+ stringSchema = stringSchema.check(z10.e164());
15710
15843
  } else if (format === "jwt") {
15711
- stringSchema = stringSchema.check(z9.jwt());
15844
+ stringSchema = stringSchema.check(z10.jwt());
15712
15845
  } else if (format === "emoji") {
15713
- stringSchema = stringSchema.check(z9.emoji());
15846
+ stringSchema = stringSchema.check(z10.emoji());
15714
15847
  } else if (format === "nanoid") {
15715
- stringSchema = stringSchema.check(z9.nanoid());
15848
+ stringSchema = stringSchema.check(z10.nanoid());
15716
15849
  } else if (format === "cuid") {
15717
- stringSchema = stringSchema.check(z9.cuid());
15850
+ stringSchema = stringSchema.check(z10.cuid());
15718
15851
  } else if (format === "cuid2") {
15719
- stringSchema = stringSchema.check(z9.cuid2());
15852
+ stringSchema = stringSchema.check(z10.cuid2());
15720
15853
  } else if (format === "ulid") {
15721
- stringSchema = stringSchema.check(z9.ulid());
15854
+ stringSchema = stringSchema.check(z10.ulid());
15722
15855
  } else if (format === "xid") {
15723
- stringSchema = stringSchema.check(z9.xid());
15856
+ stringSchema = stringSchema.check(z10.xid());
15724
15857
  } else if (format === "ksuid") {
15725
- stringSchema = stringSchema.check(z9.ksuid());
15858
+ stringSchema = stringSchema.check(z10.ksuid());
15726
15859
  }
15727
15860
  }
15728
15861
  if (typeof schema.minLength === "number") {
@@ -15739,7 +15872,7 @@ function convertBaseSchema(schema, ctx) {
15739
15872
  }
15740
15873
  case "number":
15741
15874
  case "integer": {
15742
- let numberSchema = type === "integer" ? z9.number().int() : z9.number();
15875
+ let numberSchema = type === "integer" ? z10.number().int() : z10.number();
15743
15876
  if (typeof schema.minimum === "number") {
15744
15877
  numberSchema = numberSchema.min(schema.minimum);
15745
15878
  }
@@ -15763,11 +15896,11 @@ function convertBaseSchema(schema, ctx) {
15763
15896
  break;
15764
15897
  }
15765
15898
  case "boolean": {
15766
- zodSchema2 = z9.boolean();
15899
+ zodSchema2 = z10.boolean();
15767
15900
  break;
15768
15901
  }
15769
15902
  case "null": {
15770
- zodSchema2 = z9.null();
15903
+ zodSchema2 = z10.null();
15771
15904
  break;
15772
15905
  }
15773
15906
  case "object": {
@@ -15780,14 +15913,14 @@ function convertBaseSchema(schema, ctx) {
15780
15913
  }
15781
15914
  if (schema.propertyNames) {
15782
15915
  const keySchema = convertSchema(schema.propertyNames, ctx);
15783
- const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z9.any();
15916
+ const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z10.any();
15784
15917
  if (Object.keys(shape).length === 0) {
15785
- zodSchema2 = z9.record(keySchema, valueSchema);
15918
+ zodSchema2 = z10.record(keySchema, valueSchema);
15786
15919
  break;
15787
15920
  }
15788
- const objectSchema2 = z9.object(shape).passthrough();
15789
- const recordSchema = z9.looseRecord(keySchema, valueSchema);
15790
- zodSchema2 = z9.intersection(objectSchema2, recordSchema);
15921
+ const objectSchema2 = z10.object(shape).passthrough();
15922
+ const recordSchema = z10.looseRecord(keySchema, valueSchema);
15923
+ zodSchema2 = z10.intersection(objectSchema2, recordSchema);
15791
15924
  break;
15792
15925
  }
15793
15926
  if (schema.patternProperties) {
@@ -15796,28 +15929,28 @@ function convertBaseSchema(schema, ctx) {
15796
15929
  const looseRecords = [];
15797
15930
  for (const pattern of patternKeys) {
15798
15931
  const patternValue = convertSchema(patternProps[pattern], ctx);
15799
- const keySchema = z9.string().regex(new RegExp(pattern));
15800
- looseRecords.push(z9.looseRecord(keySchema, patternValue));
15932
+ const keySchema = z10.string().regex(new RegExp(pattern));
15933
+ looseRecords.push(z10.looseRecord(keySchema, patternValue));
15801
15934
  }
15802
15935
  const schemasToIntersect = [];
15803
15936
  if (Object.keys(shape).length > 0) {
15804
- schemasToIntersect.push(z9.object(shape).passthrough());
15937
+ schemasToIntersect.push(z10.object(shape).passthrough());
15805
15938
  }
15806
15939
  schemasToIntersect.push(...looseRecords);
15807
15940
  if (schemasToIntersect.length === 0) {
15808
- zodSchema2 = z9.object({}).passthrough();
15941
+ zodSchema2 = z10.object({}).passthrough();
15809
15942
  } else if (schemasToIntersect.length === 1) {
15810
15943
  zodSchema2 = schemasToIntersect[0];
15811
15944
  } else {
15812
- let result = z9.intersection(schemasToIntersect[0], schemasToIntersect[1]);
15945
+ let result = z10.intersection(schemasToIntersect[0], schemasToIntersect[1]);
15813
15946
  for (let i = 2; i < schemasToIntersect.length; i++) {
15814
- result = z9.intersection(result, schemasToIntersect[i]);
15947
+ result = z10.intersection(result, schemasToIntersect[i]);
15815
15948
  }
15816
15949
  zodSchema2 = result;
15817
15950
  }
15818
15951
  break;
15819
15952
  }
15820
- const objectSchema = z9.object(shape);
15953
+ const objectSchema = z10.object(shape);
15821
15954
  if (schema.additionalProperties === false) {
15822
15955
  zodSchema2 = objectSchema.strict();
15823
15956
  } else if (typeof schema.additionalProperties === "object") {
@@ -15834,33 +15967,33 @@ function convertBaseSchema(schema, ctx) {
15834
15967
  const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
15835
15968
  const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
15836
15969
  if (rest) {
15837
- zodSchema2 = z9.tuple(tupleItems).rest(rest);
15970
+ zodSchema2 = z10.tuple(tupleItems).rest(rest);
15838
15971
  } else {
15839
- zodSchema2 = z9.tuple(tupleItems);
15972
+ zodSchema2 = z10.tuple(tupleItems);
15840
15973
  }
15841
15974
  if (typeof schema.minItems === "number") {
15842
- zodSchema2 = zodSchema2.check(z9.minLength(schema.minItems));
15975
+ zodSchema2 = zodSchema2.check(z10.minLength(schema.minItems));
15843
15976
  }
15844
15977
  if (typeof schema.maxItems === "number") {
15845
- zodSchema2 = zodSchema2.check(z9.maxLength(schema.maxItems));
15978
+ zodSchema2 = zodSchema2.check(z10.maxLength(schema.maxItems));
15846
15979
  }
15847
15980
  } else if (Array.isArray(items)) {
15848
15981
  const tupleItems = items.map((item) => convertSchema(item, ctx));
15849
15982
  const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
15850
15983
  if (rest) {
15851
- zodSchema2 = z9.tuple(tupleItems).rest(rest);
15984
+ zodSchema2 = z10.tuple(tupleItems).rest(rest);
15852
15985
  } else {
15853
- zodSchema2 = z9.tuple(tupleItems);
15986
+ zodSchema2 = z10.tuple(tupleItems);
15854
15987
  }
15855
15988
  if (typeof schema.minItems === "number") {
15856
- zodSchema2 = zodSchema2.check(z9.minLength(schema.minItems));
15989
+ zodSchema2 = zodSchema2.check(z10.minLength(schema.minItems));
15857
15990
  }
15858
15991
  if (typeof schema.maxItems === "number") {
15859
- zodSchema2 = zodSchema2.check(z9.maxLength(schema.maxItems));
15992
+ zodSchema2 = zodSchema2.check(z10.maxLength(schema.maxItems));
15860
15993
  }
15861
15994
  } else if (items !== void 0) {
15862
15995
  const element = convertSchema(items, ctx);
15863
- let arraySchema = z9.array(element);
15996
+ let arraySchema = z10.array(element);
15864
15997
  if (typeof schema.minItems === "number") {
15865
15998
  arraySchema = arraySchema.min(schema.minItems);
15866
15999
  }
@@ -15869,7 +16002,7 @@ function convertBaseSchema(schema, ctx) {
15869
16002
  }
15870
16003
  zodSchema2 = arraySchema;
15871
16004
  } else {
15872
- zodSchema2 = z9.array(z9.any());
16005
+ zodSchema2 = z10.array(z10.any());
15873
16006
  }
15874
16007
  break;
15875
16008
  }
@@ -15886,37 +16019,37 @@ function convertBaseSchema(schema, ctx) {
15886
16019
  }
15887
16020
  function convertSchema(schema, ctx) {
15888
16021
  if (typeof schema === "boolean") {
15889
- return schema ? z9.any() : z9.never();
16022
+ return schema ? z10.any() : z10.never();
15890
16023
  }
15891
16024
  let baseSchema = convertBaseSchema(schema, ctx);
15892
16025
  const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
15893
16026
  if (schema.anyOf && Array.isArray(schema.anyOf)) {
15894
16027
  const options = schema.anyOf.map((s) => convertSchema(s, ctx));
15895
- const anyOfUnion = z9.union(options);
15896
- baseSchema = hasExplicitType ? z9.intersection(baseSchema, anyOfUnion) : anyOfUnion;
16028
+ const anyOfUnion = z10.union(options);
16029
+ baseSchema = hasExplicitType ? z10.intersection(baseSchema, anyOfUnion) : anyOfUnion;
15897
16030
  }
15898
16031
  if (schema.oneOf && Array.isArray(schema.oneOf)) {
15899
16032
  const options = schema.oneOf.map((s) => convertSchema(s, ctx));
15900
- const oneOfUnion = z9.xor(options);
15901
- baseSchema = hasExplicitType ? z9.intersection(baseSchema, oneOfUnion) : oneOfUnion;
16033
+ const oneOfUnion = z10.xor(options);
16034
+ baseSchema = hasExplicitType ? z10.intersection(baseSchema, oneOfUnion) : oneOfUnion;
15902
16035
  }
15903
16036
  if (schema.allOf && Array.isArray(schema.allOf)) {
15904
16037
  if (schema.allOf.length === 0) {
15905
- baseSchema = hasExplicitType ? baseSchema : z9.any();
16038
+ baseSchema = hasExplicitType ? baseSchema : z10.any();
15906
16039
  } else {
15907
16040
  let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
15908
16041
  const startIdx = hasExplicitType ? 0 : 1;
15909
16042
  for (let i = startIdx; i < schema.allOf.length; i++) {
15910
- result = z9.intersection(result, convertSchema(schema.allOf[i], ctx));
16043
+ result = z10.intersection(result, convertSchema(schema.allOf[i], ctx));
15911
16044
  }
15912
16045
  baseSchema = result;
15913
16046
  }
15914
16047
  }
15915
16048
  if (schema.nullable === true && ctx.version === "openapi-3.0") {
15916
- baseSchema = z9.nullable(baseSchema);
16049
+ baseSchema = z10.nullable(baseSchema);
15917
16050
  }
15918
16051
  if (schema.readOnly === true) {
15919
- baseSchema = z9.readonly(baseSchema);
16052
+ baseSchema = z10.readonly(baseSchema);
15920
16053
  }
15921
16054
  const extraMeta = {};
15922
16055
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
@@ -15943,7 +16076,7 @@ function convertSchema(schema, ctx) {
15943
16076
  }
15944
16077
  function fromJSONSchema(schema, params) {
15945
16078
  if (typeof schema === "boolean") {
15946
- return schema ? z9.any() : z9.never();
16079
+ return schema ? z10.any() : z10.never();
15947
16080
  }
15948
16081
  const version2 = detectVersion(schema, params?.defaultTarget);
15949
16082
  const defs = schema.$defs || schema.definitions || {};
@@ -15957,14 +16090,14 @@ function fromJSONSchema(schema, params) {
15957
16090
  };
15958
16091
  return convertSchema(schema, ctx);
15959
16092
  }
15960
- var z9, RECOGNIZED_KEYS;
16093
+ var z10, RECOGNIZED_KEYS;
15961
16094
  var init_from_json_schema = __esm({
15962
16095
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js"() {
15963
16096
  init_registries();
15964
16097
  init_checks2();
15965
16098
  init_iso();
15966
16099
  init_schemas2();
15967
- z9 = {
16100
+ z10 = {
15968
16101
  ...schemas_exports2,
15969
16102
  ...checks_exports2,
15970
16103
  iso: iso_exports