@cleocode/core 2026.6.8 → 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.
Files changed (34) hide show
  1. package/dist/docs/display-alias.d.ts +97 -0
  2. package/dist/docs/display-alias.d.ts.map +1 -0
  3. package/dist/docs/display-alias.js +136 -0
  4. package/dist/docs/display-alias.js.map +1 -0
  5. package/dist/docs/docs-read-model.d.ts +7 -0
  6. package/dist/docs/docs-read-model.d.ts.map +1 -1
  7. package/dist/docs/docs-read-model.js +11 -2
  8. package/dist/docs/docs-read-model.js.map +1 -1
  9. package/dist/docs/export-document.js +32 -2
  10. package/dist/docs/export-document.js.map +1 -1
  11. package/dist/docs/index.d.ts +2 -0
  12. package/dist/docs/index.d.ts.map +1 -1
  13. package/dist/docs/index.js +1 -0
  14. package/dist/docs/index.js.map +1 -1
  15. package/dist/docs/numbering.d.ts +29 -0
  16. package/dist/docs/numbering.d.ts.map +1 -1
  17. package/dist/docs/numbering.js +41 -0
  18. package/dist/docs/numbering.js.map +1 -1
  19. package/dist/internal.d.ts +3 -1
  20. package/dist/internal.d.ts.map +1 -1
  21. package/dist/internal.js +2 -1
  22. package/dist/internal.js.map +1 -1
  23. package/dist/llm/plugin-facade.js +32 -2
  24. package/dist/llm/plugin-facade.js.map +1 -1
  25. package/dist/store/attachment-store.d.ts +5 -0
  26. package/dist/store/attachment-store.d.ts.map +1 -1
  27. package/dist/store/attachment-store.js +7 -1
  28. package/dist/store/attachment-store.js.map +1 -1
  29. package/dist/store/schema/attachments.d.ts +16 -0
  30. package/dist/store/schema/attachments.d.ts.map +1 -1
  31. package/dist/store/schema/attachments.js +30 -0
  32. package/dist/store/schema/attachments.js.map +1 -1
  33. package/migrations/drizzle-tasks/20260606000001_t11875-attachments-display-alias/migration.sql +46 -0
  34. package/package.json +12 -12
@@ -27326,12 +27326,42 @@ var init_attachments = __esm({
27326
27326
  *
27327
27327
  * @task T11181 (Epic T10518 / Saga T10516)
27328
27328
  */
27329
- docVersion: integer("doc_version").notNull().default(1)
27329
+ docVersion: integer("doc_version").notNull().default(1),
27330
+ /**
27331
+ * Optional explicit display-alias NUMBER for the doc, DECOUPLED from the
27332
+ * slug string.
27333
+ *
27334
+ * Background (T11875 · ADR reconcile T11676): under the ratified
27335
+ * slug-primary model the kebab `slug` is the canonical handle and the
27336
+ * displayed number (e.g. ADR "051") is a DISPLAY ALIAS only. Previously
27337
+ * that number was DERIVED by parsing the digits out of the slug
27338
+ * (`adr-051-*` → 051), so three distinct ADRs that all slug as `adr-051-*`
27339
+ * collided on the rendered number with no way to disambiguate.
27340
+ *
27341
+ * When non-null, this column is the authoritative display number and is
27342
+ * PREFERRED over the slug-derived number by
27343
+ * {@link import('../../docs/numbering.js').resolveDisplayNumber}. When null,
27344
+ * rendering falls back to the slug-derived number unchanged — so docs that
27345
+ * never had an alias assigned keep their historical behaviour.
27346
+ *
27347
+ * Uniqueness among `type='adr'` docs is enforced at the dispatch layer (not
27348
+ * via a SQL UNIQUE constraint) by
27349
+ * {@link import('../../docs/display-alias.js').setDisplayAlias}, mirroring
27350
+ * the dispatch-validated discipline used for `lifecycle_status` /
27351
+ * `relation` so future taxonomy changes never require a schema migration.
27352
+ *
27353
+ * @task T11875 (Epic T11781 / Saga T11778)
27354
+ */
27355
+ displayAlias: integer("display_alias")
27330
27356
  },
27331
27357
  (table) => [
27332
27358
  index("idx_attachments_sha256").on(table.sha256),
27333
27359
  index("idx_attachments_lifecycle_status").on(table.lifecycleStatus),
27334
- index("idx_attachments_supersedes").on(table.supersedes)
27360
+ index("idx_attachments_supersedes").on(table.supersedes),
27361
+ // Speeds the per-type uniqueness scan in `setDisplayAlias` (T11875). Not a
27362
+ // UNIQUE index — uniqueness is scoped to `type='adr'` and enforced at the
27363
+ // dispatch layer so non-adr kinds may reuse numbers freely.
27364
+ index("idx_attachments_display_alias").on(table.displayAlias)
27335
27365
  ]
27336
27366
  );
27337
27367
  attachmentRefs = sqliteTable(