@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.
- package/dist/docs/display-alias.d.ts +97 -0
- package/dist/docs/display-alias.d.ts.map +1 -0
- package/dist/docs/display-alias.js +136 -0
- package/dist/docs/display-alias.js.map +1 -0
- package/dist/docs/docs-read-model.d.ts +7 -0
- package/dist/docs/docs-read-model.d.ts.map +1 -1
- package/dist/docs/docs-read-model.js +11 -2
- package/dist/docs/docs-read-model.js.map +1 -1
- package/dist/docs/export-document.js +32 -2
- package/dist/docs/export-document.js.map +1 -1
- package/dist/docs/index.d.ts +2 -0
- package/dist/docs/index.d.ts.map +1 -1
- package/dist/docs/index.js +1 -0
- package/dist/docs/index.js.map +1 -1
- package/dist/docs/numbering.d.ts +29 -0
- package/dist/docs/numbering.d.ts.map +1 -1
- package/dist/docs/numbering.js +41 -0
- package/dist/docs/numbering.js.map +1 -1
- package/dist/internal.d.ts +3 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +2 -1
- package/dist/internal.js.map +1 -1
- package/dist/llm/plugin-facade.js +32 -2
- package/dist/llm/plugin-facade.js.map +1 -1
- package/dist/store/attachment-store.d.ts +5 -0
- package/dist/store/attachment-store.d.ts.map +1 -1
- package/dist/store/attachment-store.js +7 -1
- package/dist/store/attachment-store.js.map +1 -1
- package/dist/store/schema/attachments.d.ts +16 -0
- package/dist/store/schema/attachments.d.ts.map +1 -1
- package/dist/store/schema/attachments.js +30 -0
- package/dist/store/schema/attachments.js.map +1 -1
- package/migrations/drizzle-tasks/20260606000001_t11875-attachments-display-alias/migration.sql +46 -0
- 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(
|