@cleocode/adapters 2026.10.12 → 2026.10.13
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 +120 -30
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -7646,6 +7646,34 @@ var init_operations_registry = __esm({
|
|
|
7646
7646
|
}
|
|
7647
7647
|
]
|
|
7648
7648
|
},
|
|
7649
|
+
{
|
|
7650
|
+
gateway: "mutate",
|
|
7651
|
+
domain: "pipeline",
|
|
7652
|
+
operation: "manifest.update",
|
|
7653
|
+
description: "pipeline.manifest.update (mutate) \u2014 change only the given fields of a manifest entry; linkTask adds a linked task (T13678)",
|
|
7654
|
+
tier: 1,
|
|
7655
|
+
idempotent: true,
|
|
7656
|
+
sessionRequired: false,
|
|
7657
|
+
requiredParams: ["id"],
|
|
7658
|
+
params: [
|
|
7659
|
+
{ name: "id", type: "string", required: true, description: "Manifest entry id" },
|
|
7660
|
+
{
|
|
7661
|
+
name: "linkTask",
|
|
7662
|
+
type: "string",
|
|
7663
|
+
required: false,
|
|
7664
|
+
description: "Task id to add to linked_tasks"
|
|
7665
|
+
},
|
|
7666
|
+
{ name: "title", type: "string", required: false, description: "New title" },
|
|
7667
|
+
{ name: "topics", type: "array", required: false, description: "Replacement topics" },
|
|
7668
|
+
{
|
|
7669
|
+
name: "key_findings",
|
|
7670
|
+
type: "array",
|
|
7671
|
+
required: false,
|
|
7672
|
+
description: "Replacement key findings"
|
|
7673
|
+
},
|
|
7674
|
+
{ name: "status", type: "string", required: false, description: "New status" }
|
|
7675
|
+
]
|
|
7676
|
+
},
|
|
7649
7677
|
{
|
|
7650
7678
|
gateway: "mutate",
|
|
7651
7679
|
domain: "pipeline",
|
|
@@ -11172,11 +11200,23 @@ var init_operations_registry = __esm({
|
|
|
11172
11200
|
}
|
|
11173
11201
|
]
|
|
11174
11202
|
},
|
|
11203
|
+
// ── docs.stats (T13363 — Epic T13340 / Saga T13339) ───────────────────────
|
|
11204
|
+
{
|
|
11205
|
+
gateway: "query",
|
|
11206
|
+
domain: "docs",
|
|
11207
|
+
operation: "stats",
|
|
11208
|
+
description: "docs.stats (query) \u2014 per-project CleoDocs adoption metrics (read-only): add:update ratio from the docs audit log, loose-markdown count with scanned/excluded dirs, docs_wikilinks edge count, and live decision_adr_links count. Emitted for the Council pilot baseline comparisons.",
|
|
11209
|
+
tier: 1,
|
|
11210
|
+
idempotent: true,
|
|
11211
|
+
sessionRequired: false,
|
|
11212
|
+
requiredParams: [],
|
|
11213
|
+
params: []
|
|
11214
|
+
},
|
|
11175
11215
|
{
|
|
11176
11216
|
gateway: "mutate",
|
|
11177
11217
|
domain: "docs",
|
|
11178
11218
|
operation: "doctor",
|
|
11179
|
-
description: "docs.doctor (mutate) \u2014 apply the docs doctor repairs: set docVersion from the audit log, backfill topics/related_tasks from content, archive dangling local-file rows, rebuild docs_wikilinks. The dispatch layer creates a fresh backup (cleo backup add path) and requires its receipt before any write.",
|
|
11219
|
+
description: "docs.doctor (mutate) \u2014 apply the docs doctor repairs: set docVersion from the audit log, backfill topics/related_tasks from content, archive dangling local-file rows, rebuild docs_wikilinks, and backfill hash-verified legacy bytes into the blob store. The dispatch layer creates a fresh backup (cleo backup add path) and requires its receipt before any write. repair:true restricts the run to the legacy-blob-coverage backfill only (T13653).",
|
|
11180
11220
|
tier: 1,
|
|
11181
11221
|
idempotent: false,
|
|
11182
11222
|
sessionRequired: false,
|
|
@@ -11188,6 +11228,12 @@ var init_operations_registry = __esm({
|
|
|
11188
11228
|
required: false,
|
|
11189
11229
|
description: "Execute repairs (default false \u2014 dry-run plan only)"
|
|
11190
11230
|
},
|
|
11231
|
+
{
|
|
11232
|
+
name: "repair",
|
|
11233
|
+
type: "boolean",
|
|
11234
|
+
required: false,
|
|
11235
|
+
description: "Execute ONLY the legacy-blob-coverage backfill: mirror hash-verified legacy bytes into the blob store so unmigrated docs become readable (T13653)"
|
|
11236
|
+
},
|
|
11191
11237
|
{
|
|
11192
11238
|
name: "olderThanDays",
|
|
11193
11239
|
type: "number",
|
|
@@ -11196,6 +11242,18 @@ var init_operations_registry = __esm({
|
|
|
11196
11242
|
}
|
|
11197
11243
|
]
|
|
11198
11244
|
},
|
|
11245
|
+
// ── docs.migrate (T13360 — Epic T13340 / Saga T13339) ─────────────────────
|
|
11246
|
+
{
|
|
11247
|
+
gateway: "mutate",
|
|
11248
|
+
domain: "docs",
|
|
11249
|
+
operation: "migrate",
|
|
11250
|
+
description: "docs.migrate (mutate) \u2014 the T13360 legacy docs migration (spec \xA75): import legacy docs + history into the re-keyed conduit store inside the T13448 safety harness (pre-step VACUUM INTO backup, before/after fingerprints, COMMIT only on full verification). Imported rows are labeled origin:migrated; dangling-pointer docs are content-captured or recorded dangling in conduit_doc_migration_ledger. Idempotent \u2014 a re-run is a verified no-op.",
|
|
11251
|
+
tier: 1,
|
|
11252
|
+
idempotent: true,
|
|
11253
|
+
sessionRequired: false,
|
|
11254
|
+
requiredParams: [],
|
|
11255
|
+
params: []
|
|
11256
|
+
},
|
|
11199
11257
|
// ── docs.generate (T798) ─────────────────────────────────────────────────
|
|
11200
11258
|
{
|
|
11201
11259
|
gateway: "query",
|
|
@@ -11297,6 +11355,13 @@ var init_operations_registry = __esm({
|
|
|
11297
11355
|
required: false,
|
|
11298
11356
|
description: "Inline UTF-8 content (mutually exclusive with file)"
|
|
11299
11357
|
},
|
|
11358
|
+
{
|
|
11359
|
+
name: "baseVersionUid",
|
|
11360
|
+
type: "string",
|
|
11361
|
+
required: false,
|
|
11362
|
+
description: "Expected base version uid \u2014 the metadata.headVersionUid from the `cleo docs fetch <slug>` envelope the edit was authored against (T13674). When the stored head has moved past it: append-shaped section edits are three-way merged through the section CRDT (both writers survive); a non-mergeable section edit is recorded as a named section conflict \u2014 nothing is silently dropped. A base that does not resolve to this doc's version history is refused with E_DOC_BASE_UNKNOWN before any write. Works with --content and with a UTF-8 text --file; a non-text --file with a base is refused with E_DOC_BASE_UNSUPPORTED. The update result carries the new headVersionUid, so edits can chain without a re-fetch. Omit only when the edit was not based on an earlier fetch (the current head is then assumed).",
|
|
11363
|
+
cli: { flag: "base-version-uid" }
|
|
11364
|
+
},
|
|
11300
11365
|
{
|
|
11301
11366
|
name: "message",
|
|
11302
11367
|
type: "string",
|
|
@@ -14709,21 +14774,25 @@ var init_sync_write_invariants = __esm({
|
|
|
14709
14774
|
["tasks_audit_log", "audit_log"]
|
|
14710
14775
|
)
|
|
14711
14776
|
),
|
|
14712
|
-
|
|
14713
|
-
|
|
14714
|
-
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
|
|
14777
|
+
implemented(
|
|
14778
|
+
rule(
|
|
14779
|
+
"sticky.status.one-way",
|
|
14780
|
+
"T12942",
|
|
14781
|
+
"brain_sticky_notes",
|
|
14782
|
+
["status", "converted_to_json"],
|
|
14783
|
+
["SK2", "SK3", "B24"],
|
|
14784
|
+
"active\u2192{converted, archived} is one-way; converted_to_json is write-once"
|
|
14785
|
+
)
|
|
14719
14786
|
),
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
|
|
14787
|
+
implemented(
|
|
14788
|
+
rule(
|
|
14789
|
+
"release.status.absorbing",
|
|
14790
|
+
"T12943",
|
|
14791
|
+
"tasks_releases",
|
|
14792
|
+
["status"],
|
|
14793
|
+
["REL-2", "REL-3", "REL-4", "REL-5", "REL-6", "REL-7", "REL-8"],
|
|
14794
|
+
"shipped release statuses are absorbing"
|
|
14795
|
+
)
|
|
14727
14796
|
),
|
|
14728
14797
|
implemented(
|
|
14729
14798
|
rule(
|
|
@@ -14736,13 +14805,15 @@ var init_sync_write_invariants = __esm({
|
|
|
14736
14805
|
["tasks_playbook_approvals", "playbook_approvals"]
|
|
14737
14806
|
)
|
|
14738
14807
|
),
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
|
|
14744
|
-
|
|
14745
|
-
|
|
14808
|
+
implemented(
|
|
14809
|
+
rule(
|
|
14810
|
+
"docs.lifecycle.transitions",
|
|
14811
|
+
"T12945",
|
|
14812
|
+
"docs_attachments",
|
|
14813
|
+
["lifecycle_status"],
|
|
14814
|
+
["D04", "D05", "D31", "D32", "D39", "D50"],
|
|
14815
|
+
"superseded is sticky; lifecycle transitions follow a matrix"
|
|
14816
|
+
)
|
|
14746
14817
|
),
|
|
14747
14818
|
// T13354 (D11165) — CleoDocs re-keyed history family; the typed merge rules
|
|
14748
14819
|
// land with the write path (T13355).
|
|
@@ -14770,14 +14841,33 @@ var init_sync_write_invariants = __esm({
|
|
|
14770
14841
|
[],
|
|
14771
14842
|
"alias rows carry natural identity over (slug, doc_uid); identical aliases merge to one row"
|
|
14772
14843
|
),
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
14777
|
-
|
|
14778
|
-
|
|
14779
|
-
"
|
|
14780
|
-
|
|
14844
|
+
// T13355 (D11165): the write-path behavior is implemented at the writer
|
|
14845
|
+
// chokepoint (`upsertConduitDocHead`, now reachable from the docs update
|
|
14846
|
+
// write path); cross-device convergence rides the Stage C journal merge
|
|
14847
|
+
// engine (T12344) and needs no second rule.
|
|
14848
|
+
{
|
|
14849
|
+
id: "docs.head.max-hlc",
|
|
14850
|
+
class: "monotonic-merge-rule",
|
|
14851
|
+
tables: ["conduit_doc_heads"],
|
|
14852
|
+
sites: [],
|
|
14853
|
+
mergeRule: { table: "conduit_doc_heads", columns: ["*"] },
|
|
14854
|
+
inventory: [],
|
|
14855
|
+
runtimeGate: {
|
|
14856
|
+
module: "packages/core/src/store/conduit-doc-history.ts",
|
|
14857
|
+
functionName: "upsertConduitDocHead"
|
|
14858
|
+
},
|
|
14859
|
+
reason: "the projection keeps the max-HLC head; a losing concurrent head is recorded (conflict_count/last_conflict_json), never silently shadowed"
|
|
14860
|
+
},
|
|
14861
|
+
// T13355 — the docs write path adopts a legacy doc into the conduit family
|
|
14862
|
+
// once (identity shell keyed by the immutable uid); the read-back guard is
|
|
14863
|
+
// a local write-confirmation, not a merge rule.
|
|
14864
|
+
{
|
|
14865
|
+
id: "docs.doc.adopt-once",
|
|
14866
|
+
class: "not-sync-relevant",
|
|
14867
|
+
tables: ["conduit_attachments"],
|
|
14868
|
+
sites: [],
|
|
14869
|
+
reason: "adopting a legacy doc inserts one immutable-uid identity shell; losing the write is refused loudly at the writer, not merged"
|
|
14870
|
+
},
|
|
14781
14871
|
// T13359 (D11165) — decisions-vs-ADRs link table; the natural composite key
|
|
14782
14872
|
// makes identical links merge to one row, and the revoke is a one-way latch.
|
|
14783
14873
|
// T13597: enforced at merge, not just by the local accessor — 'revoked' is an
|