@cleocode/contracts 2026.10.9 → 2026.10.10-canary.2
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/dispatch/operations-registry.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.js +34 -0
- package/dist/dispatch/operations-registry.js.map +1 -1
- package/dist/invariants/sync-write-invariants.d.ts.map +1 -1
- package/dist/invariants/sync-write-invariants.js +6 -0
- package/dist/invariants/sync-write-invariants.js.map +1 -1
- package/dist/operations/worktree.d.ts +6 -0
- package/dist/operations/worktree.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
- package/src/dispatch/operations-registry.ts +35 -0
- package/src/invariants/sync-write-invariants.ts +34 -0
- package/src/operations/worktree.ts +6 -0
|
@@ -8600,6 +8600,41 @@ export const OPERATIONS: OperationDef[] = [
|
|
|
8600
8600
|
},
|
|
8601
8601
|
],
|
|
8602
8602
|
},
|
|
8603
|
+
// ── docs.triage (T13446 — Epic T13340 / Saga T13339) ──────────────────────
|
|
8604
|
+
{
|
|
8605
|
+
gateway: 'query',
|
|
8606
|
+
domain: 'docs',
|
|
8607
|
+
operation: 'triage',
|
|
8608
|
+
description:
|
|
8609
|
+
'docs.triage (query) — batch-triage docs through the docs.triage decision site: ' +
|
|
8610
|
+
'proposed keep/update/supersede/archive verdicts plus staleness scores, oldest first ' +
|
|
8611
|
+
'(default: drafts). Proposals only — never mutates a doc; --record persists each ' +
|
|
8612
|
+
'verdict as a proposed D#### decision.',
|
|
8613
|
+
tier: 1,
|
|
8614
|
+
idempotent: true,
|
|
8615
|
+
sessionRequired: false,
|
|
8616
|
+
requiredParams: [],
|
|
8617
|
+
params: [
|
|
8618
|
+
{
|
|
8619
|
+
name: 'limit',
|
|
8620
|
+
type: 'number' as const,
|
|
8621
|
+
required: false,
|
|
8622
|
+
description: 'Maximum docs to scan, oldest first (default 25)',
|
|
8623
|
+
},
|
|
8624
|
+
{
|
|
8625
|
+
name: 'status',
|
|
8626
|
+
type: 'string' as const,
|
|
8627
|
+
required: false,
|
|
8628
|
+
description: 'Lifecycle status to scan (default draft)',
|
|
8629
|
+
},
|
|
8630
|
+
{
|
|
8631
|
+
name: 'record',
|
|
8632
|
+
type: 'boolean' as const,
|
|
8633
|
+
required: false,
|
|
8634
|
+
description: 'Persist every verdict as a proposed D#### decision (default false)',
|
|
8635
|
+
},
|
|
8636
|
+
],
|
|
8637
|
+
},
|
|
8603
8638
|
{
|
|
8604
8639
|
gateway: 'mutate',
|
|
8605
8640
|
domain: 'docs',
|
|
@@ -485,6 +485,40 @@ export const SYNC_WRITE_INVARIANTS: readonly SyncWriteInvariant[] = Object.freez
|
|
|
485
485
|
['D04', 'D05', 'D31', 'D32', 'D39', 'D50'],
|
|
486
486
|
'superseded is sticky; lifecycle transitions follow a matrix',
|
|
487
487
|
),
|
|
488
|
+
// T13354 (D11165) — CleoDocs re-keyed history family; the typed merge rules
|
|
489
|
+
// land with the write path (T13355).
|
|
490
|
+
rule(
|
|
491
|
+
'docs.versions.append-only',
|
|
492
|
+
'T13355',
|
|
493
|
+
'conduit_attachment_versions',
|
|
494
|
+
['*'],
|
|
495
|
+
[],
|
|
496
|
+
'version rows are append-only and unique by uid; inserts never conflict, so no merge rule fires',
|
|
497
|
+
),
|
|
498
|
+
rule(
|
|
499
|
+
'docs.approvals.append-only',
|
|
500
|
+
'T13355',
|
|
501
|
+
'conduit_attachment_approvals',
|
|
502
|
+
['*'],
|
|
503
|
+
[],
|
|
504
|
+
'approval rows are append-only; a revoke is a tombstone row, never an UPDATE/DELETE',
|
|
505
|
+
),
|
|
506
|
+
rule(
|
|
507
|
+
'docs.doc-alias.append-only',
|
|
508
|
+
'T13355',
|
|
509
|
+
'conduit_doc_slug_aliases',
|
|
510
|
+
['*'],
|
|
511
|
+
[],
|
|
512
|
+
'alias rows carry natural identity over (slug, doc_uid); identical aliases merge to one row',
|
|
513
|
+
),
|
|
514
|
+
rule(
|
|
515
|
+
'docs.head.max-hlc',
|
|
516
|
+
'T13355',
|
|
517
|
+
'conduit_doc_heads',
|
|
518
|
+
['*'],
|
|
519
|
+
[],
|
|
520
|
+
'the projection keeps the max-HLC head; a losing concurrent head is recorded (conflict_count/last_conflict_json), never silently shadowed',
|
|
521
|
+
),
|
|
488
522
|
|
|
489
523
|
// §3.6.0 identity-layer rows.
|
|
490
524
|
{
|
|
@@ -1034,4 +1034,10 @@ export interface AdoptWorktreeResult {
|
|
|
1034
1034
|
isNew: boolean;
|
|
1035
1035
|
/** ISO-8601 timestamp when the sentinel entry was written. */
|
|
1036
1036
|
adoptedAt: string;
|
|
1037
|
+
/**
|
|
1038
|
+
* The worktree's `.cleo/project-info.json` (T13568): `seeded` from the
|
|
1039
|
+
* adopting project, already `present` with a matching projectId, or
|
|
1040
|
+
* `skipped` when the adopting project has none to copy.
|
|
1041
|
+
*/
|
|
1042
|
+
projectInfo: 'seeded' | 'present' | 'skipped';
|
|
1037
1043
|
}
|