@cleocode/adapters 2026.5.114 → 2026.5.121

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
@@ -786,7 +786,7 @@ var init_branch_lock = __esm({
786
786
 
787
787
  // packages/contracts/src/changesets.ts
788
788
  import { z as z3 } from "zod";
789
- var CHANGESET_KINDS, TASK_ID_RE, ChangesetEntrySchema;
789
+ var CHANGESET_KINDS, CHANGESET_RELEASE_NOTE_SECTIONS, CHANGESET_RELEASE_NOTE_AUDIENCES, CHANGESET_RELEASE_NOTE_SCOPES, nonEmptyReleaseNoteText, nonEmptyReleaseNoteList, ChangesetReleaseNotesMetadataSchema, TASK_ID_RE, ChangesetEntrySchema;
790
790
  var init_changesets = __esm({
791
791
  "packages/contracts/src/changesets.ts"() {
792
792
  "use strict";
@@ -800,10 +800,60 @@ var init_changesets = __esm({
800
800
  "chore",
801
801
  "breaking"
802
802
  ];
803
+ CHANGESET_RELEASE_NOTE_SECTIONS = [
804
+ "added",
805
+ "changed",
806
+ "fixed",
807
+ "deprecated",
808
+ "removed",
809
+ "security",
810
+ "breaking"
811
+ ];
812
+ CHANGESET_RELEASE_NOTE_AUDIENCES = [
813
+ "users",
814
+ "operators",
815
+ "developers",
816
+ "maintainers"
817
+ ];
818
+ CHANGESET_RELEASE_NOTE_SCOPES = [
819
+ "project",
820
+ "package",
821
+ "component",
822
+ "docs",
823
+ "ops",
824
+ "security"
825
+ ];
826
+ nonEmptyReleaseNoteText = z3.string().min(1, "release-note metadata text must be non-empty");
827
+ nonEmptyReleaseNoteList = z3.array(nonEmptyReleaseNoteText).min(1, "release-note metadata list must contain at least one item");
828
+ ChangesetReleaseNotesMetadataSchema = z3.object({
829
+ /** Keep-a-Changelog style section/category override. */
830
+ section: z3.enum(CHANGESET_RELEASE_NOTE_SECTIONS).optional(),
831
+ /** Intended readers for the note. */
832
+ audience: z3.array(z3.enum(CHANGESET_RELEASE_NOTE_AUDIENCES)).min(1).optional(),
833
+ /** Release-note scope. */
834
+ scope: z3.enum(CHANGESET_RELEASE_NOTE_SCOPES).optional(),
835
+ /** Package/project/component targets affected by this entry. */
836
+ targets: nonEmptyReleaseNoteList.optional(),
837
+ /** User- or operator-visible impact statement. */
838
+ impact: nonEmptyReleaseNoteText.optional(),
839
+ /** Deterministic migration/action text, separate from breaking changes. */
840
+ migration: nonEmptyReleaseNoteText.optional(),
841
+ /** Deprecation detail for Deprecated sections. */
842
+ deprecation: nonEmptyReleaseNoteText.optional(),
843
+ /** Security detail for Security sections. */
844
+ security: nonEmptyReleaseNoteText.optional(),
845
+ /** Operator-facing rollout/verification note. */
846
+ operatorNotes: nonEmptyReleaseNoteText.optional(),
847
+ /** Explicit inclusion toggle for future release-scope filters. */
848
+ includeInChangelog: z3.boolean().optional()
849
+ }).strict();
803
850
  TASK_ID_RE = /^(T\d+(-[A-Z][A-Za-z0-9]*)?|E-\d+(-[A-Z][A-Za-z0-9]*)?)$/;
804
851
  ChangesetEntrySchema = z3.object({
805
- /** Filename slug (without the `.md` extension). */
806
- id: z3.string().min(1, "id must be non-empty").regex(/^[a-z0-9][a-z0-9-]*$/, "id must be kebab-case (lowercase, digits, hyphens)"),
852
+ /** Filename identifier (without the `.md` extension); lowercase kebab-case for new files, legacy uppercase task IDs accepted. */
853
+ id: z3.string().min(1, "id must be non-empty").regex(
854
+ /^[A-Za-z0-9][A-Za-z0-9-]*$/,
855
+ "id must contain only ASCII letters, digits, and hyphens"
856
+ ),
807
857
  /** One or more CLEO task IDs this change is anchored to. */
808
858
  tasks: z3.array(z3.string().regex(TASK_ID_RE, "task ID must match T#### or E-#### format")).min(1, "tasks must contain at least one task ID"),
809
859
  /** Type of change. */
@@ -815,7 +865,9 @@ var init_changesets = __esm({
815
865
  /** Markdown body — longer-form explanation. */
816
866
  notes: z3.string().optional(),
817
867
  /** Migration note. Required iff `kind === 'breaking'`. */
818
- breaking: z3.string().optional()
868
+ breaking: z3.string().optional(),
869
+ /** Structured author-provided metadata for deterministic release notes. */
870
+ releaseNotes: ChangesetReleaseNotesMetadataSchema.optional()
819
871
  }).refine((entry) => entry.kind !== "breaking" || (entry.breaking?.length ?? 0) > 0, {
820
872
  message: "breaking entries must include a non-empty `breaking` migration note",
821
873
  path: ["breaking"]
@@ -1359,7 +1411,7 @@ var init_errors = __esm({
1359
1411
 
1360
1412
  // packages/contracts/src/evidence-atom-schema.ts
1361
1413
  import { z as z6 } from "zod";
1362
- var commitAtomSchema, filesAtomSchema, testRunAtomSchema, toolAtomSchema, urlAtomSchema, noteAtomSchema, decisionAtomSchema, prAtomSchema, locDropAtomSchema, callsiteCoverageAtomSchema, EvidenceAtomSchema, GATE_EVIDENCE_REQUIREMENTS;
1414
+ var commitAtomSchema, filesAtomSchema, testRunAtomSchema, toolAtomSchema, urlAtomSchema, noteAtomSchema, decisionAtomSchema, prAtomSchema, locDropAtomSchema, callsiteCoverageAtomSchema, EvidenceAtomSchema, GATE_EVIDENCE_REQUIREMENTS, ATOM_EXAMPLES;
1363
1415
  var init_evidence_atom_schema = __esm({
1364
1416
  "packages/contracts/src/evidence-atom-schema.ts"() {
1365
1417
  "use strict";
@@ -1434,6 +1486,18 @@ var init_evidence_atom_schema = __esm({
1434
1486
  cleanupDone: { oneOf: [["note"]] },
1435
1487
  nexusImpact: { oneOf: [["tool"], ["note"]] }
1436
1488
  });
1489
+ ATOM_EXAMPLES = Object.freeze({
1490
+ commit: "commit:<sha>",
1491
+ files: "files:path/a.ts,path/b.ts",
1492
+ "test-run": "test-run:/tmp/vitest-out.json",
1493
+ tool: "tool:test",
1494
+ url: "url:https://example.com/docs",
1495
+ note: "note:<short description>",
1496
+ decision: "decision:D-arch-001",
1497
+ pr: "pr:357",
1498
+ "loc-drop": "loc-drop:<fromLines>:<toLines>",
1499
+ "callsite-coverage": "callsite-coverage:<symbolName>:<relativeSourcePath>"
1500
+ });
1437
1501
  }
1438
1502
  });
1439
1503