@cleocode/core 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.
Files changed (81) hide show
  1. package/dist/build-provenance.json +2 -2
  2. package/dist/decide/sites/registry.d.ts +26 -0
  3. package/dist/decide/sites/registry.d.ts.map +1 -1
  4. package/dist/decide/sites/registry.js +25 -0
  5. package/dist/decide/sites/registry.js.map +1 -1
  6. package/dist/docs/doctor.d.ts +15 -5
  7. package/dist/docs/doctor.d.ts.map +1 -1
  8. package/dist/docs/doctor.js +182 -83
  9. package/dist/docs/doctor.js.map +1 -1
  10. package/dist/docs/triage.d.ts +211 -0
  11. package/dist/docs/triage.d.ts.map +1 -0
  12. package/dist/docs/triage.js +473 -0
  13. package/dist/docs/triage.js.map +1 -0
  14. package/dist/doctor/system-health.d.ts.map +1 -1
  15. package/dist/doctor/system-health.js +54 -8
  16. package/dist/doctor/system-health.js.map +1 -1
  17. package/dist/hooks/release-gate.d.ts +10 -0
  18. package/dist/hooks/release-gate.d.ts.map +1 -1
  19. package/dist/hooks/release-gate.js +9 -3
  20. package/dist/hooks/release-gate.js.map +1 -1
  21. package/dist/project-scope.d.ts +1 -0
  22. package/dist/project-scope.d.ts.map +1 -1
  23. package/dist/project-scope.js +69 -6
  24. package/dist/project-scope.js.map +1 -1
  25. package/dist/resources/run-admission.d.ts +96 -0
  26. package/dist/resources/run-admission.d.ts.map +1 -1
  27. package/dist/resources/run-admission.js +155 -0
  28. package/dist/resources/run-admission.js.map +1 -1
  29. package/dist/resources/run-governed.d.ts +5 -1
  30. package/dist/resources/run-governed.d.ts.map +1 -1
  31. package/dist/resources/run-governed.js +34 -1
  32. package/dist/resources/run-governed.js.map +1 -1
  33. package/dist/spawn/agent-identity.d.ts +2 -0
  34. package/dist/spawn/agent-identity.d.ts.map +1 -1
  35. package/dist/spawn/agent-identity.js +72 -4
  36. package/dist/spawn/agent-identity.js.map +1 -1
  37. package/dist/store/blob-keep.d.ts +15 -0
  38. package/dist/store/blob-keep.d.ts.map +1 -1
  39. package/dist/store/blob-keep.js +20 -0
  40. package/dist/store/blob-keep.js.map +1 -1
  41. package/dist/store/conduit-doc-history.d.ts +265 -0
  42. package/dist/store/conduit-doc-history.d.ts.map +1 -0
  43. package/dist/store/conduit-doc-history.js +468 -0
  44. package/dist/store/conduit-doc-history.js.map +1 -0
  45. package/dist/store/row-identity-registry.d.ts +6 -4
  46. package/dist/store/row-identity-registry.d.ts.map +1 -1
  47. package/dist/store/row-identity-registry.js +59 -10
  48. package/dist/store/row-identity-registry.js.map +1 -1
  49. package/dist/store/schema/cleo-project/conduit.d.ts +554 -7
  50. package/dist/store/schema/cleo-project/conduit.d.ts.map +1 -1
  51. package/dist/store/schema/cleo-project/conduit.js +223 -30
  52. package/dist/store/schema/cleo-project/conduit.js.map +1 -1
  53. package/dist/store/schema/conduit-schema.d.ts +211 -3
  54. package/dist/store/schema/conduit-schema.d.ts.map +1 -1
  55. package/dist/store/schema/conduit-schema.js +53 -14
  56. package/dist/store/schema/conduit-schema.js.map +1 -1
  57. package/dist/store/sync/apply/parent-delete.d.ts.map +1 -1
  58. package/dist/store/sync/apply/parent-delete.js +6 -0
  59. package/dist/store/sync/apply/parent-delete.js.map +1 -1
  60. package/dist/store/sync/timestamp-canon.d.ts.map +1 -1
  61. package/dist/store/sync/timestamp-canon.js +7 -0
  62. package/dist/store/sync/timestamp-canon.js.map +1 -1
  63. package/dist/store/table-classification.d.ts.map +1 -1
  64. package/dist/store/table-classification.js +31 -13
  65. package/dist/store/table-classification.js.map +1 -1
  66. package/dist/tasks/gate-runner.d.ts.map +1 -1
  67. package/dist/tasks/gate-runner.js +44 -5
  68. package/dist/tasks/gate-runner.js.map +1 -1
  69. package/dist/tasks/test-run-binding.d.ts +4 -1
  70. package/dist/tasks/test-run-binding.d.ts.map +1 -1
  71. package/dist/tasks/test-run-binding.js +38 -2
  72. package/dist/tasks/test-run-binding.js.map +1 -1
  73. package/dist/worktree/worktree-adopt.d.ts.map +1 -1
  74. package/dist/worktree/worktree-adopt.js +45 -1
  75. package/dist/worktree/worktree-adopt.js.map +1 -1
  76. package/migrations/drizzle-cleo-project/20261011000000_t13354-conduit-history-rekey/migration.sql +274 -0
  77. package/package.json +13 -13
  78. package/schemas/project-info.schema.json +2 -2
  79. package/templates/git-hooks/commit-msg +2 -0
  80. package/templates/git-hooks/legacy-hashes.json +1 -0
  81. package/templates/git-hooks/pre-push +3 -0
@@ -100,6 +100,26 @@ export function blobFileForRow(cleoDir, sha256, attachmentJson) {
100
100
  function keepPath(cleoDir, sha256) {
101
101
  return join(cleoDir, 'attachments', 'keep', sha256.slice(0, 2), sha256.slice(2));
102
102
  }
103
+ /**
104
+ * Read-only probe: whether a blob's bytes are retrievable right now.
105
+ *
106
+ * True when the primary file exists or a live (non-tombstoned) keep-link
107
+ * holds the bytes. Unlike {@link restoreBlob} this never writes — the primary
108
+ * file is NOT re-created from the keep-link — so callers running in a
109
+ * dry-run/planning pass can use it without side effects.
110
+ *
111
+ * @param cleoDir - The project's `.cleo` directory.
112
+ * @param sha256 - The content hash.
113
+ * @param mime - The blob's MIME type (gives the primary file's extension).
114
+ * @returns Whether the content is on disk (primary or keep-link).
115
+ * @task T13562
116
+ */
117
+ export function blobContentExists(cleoDir, sha256, mime) {
118
+ if (existsSync(blobFilePath(cleoDir, sha256, mime)))
119
+ return true;
120
+ const keep = keepPath(cleoDir, sha256);
121
+ return existsSync(keep) && !existsSync(`${keep}.tomb`);
122
+ }
103
123
  /**
104
124
  * Hard-link (or copy) a blob's primary file to its keep-link. Idempotent and
105
125
  * best effort: a missing primary file or an unwritable keep directory is not
@@ -1 +1 @@
1
- {"version":3,"file":"blob-keep.js","sourceRoot":"","sources":["../../src/store/blob-keep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EACL,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW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,MAAc;IACvD,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,MAAM,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,265 @@
1
+ /**
2
+ * Canonical accessors for the re-keyed CleoDocs conduit history family
3
+ * (T13354 · spec `cleodocs-rearch-design` §3/§10 · D11165).
4
+ *
5
+ * Every write to `conduit_attachment_versions` / `conduit_attachment_approvals`
6
+ * / `conduit_doc_slug_aliases` / `conduit_doc_heads` /
7
+ * `conduit_attachment_contributors` / `section_crdt_states` goes through the
8
+ * functions here, on the `openDualScopeDb` chokepoint's drizzle handle
9
+ * ({@link getDb}) — gate 3 (no raw opens) and gate 28 (no raw writes to
10
+ * syncing tables; the derived contributors rebuild is raw SQL by design and
11
+ * exempt per (file, table) in `scripts/lint-no-raw-table-writes.mjs`).
12
+ *
13
+ * Semantics implemented here:
14
+ *
15
+ * - Version identity is the row uid + `parent_version_uid` DAG;
16
+ * `version_number` is minted as a LOCAL display ordinal (max + 1 within
17
+ * the doc on this device) and is never a key.
18
+ * - Approvals are append-only; {@link revokeConduitAttachmentApproval}
19
+ * writes a tombstone row (`status: 'revoked'`).
20
+ * - The doc head projection keeps the max-HLC head; a losing concurrent
21
+ * head increments `conflict_count` and is recorded in
22
+ * `last_conflict_json` (typed merge rule `docs.head.max-hlc`).
23
+ * - `section_crdt_states` is local-only; nothing here syncs it, and an
24
+ * apply that lands a version rebases it via
25
+ * {@link rebaseSectionCrdtStates}.
26
+ *
27
+ * @module
28
+ * @task T13354
29
+ * @epic T13340
30
+ * @saga T13339
31
+ */
32
+ import { conduitAttachmentApprovals, conduitAttachmentVersions, conduitDocHeads, sectionCrdtStates } from './schema/cleo-project/conduit.js';
33
+ /** Row shape of `conduit_attachment_versions` as read back. */
34
+ export type ConduitAttachmentVersionRow = typeof conduitAttachmentVersions.$inferSelect;
35
+ /** Row shape of `conduit_attachment_approvals` as read back. */
36
+ export type ConduitAttachmentApprovalRow = typeof conduitAttachmentApprovals.$inferSelect;
37
+ /** Row shape of `conduit_doc_heads` as read back. */
38
+ export type ConduitDocHeadRow = typeof conduitDocHeads.$inferSelect;
39
+ /** Row shape of `section_crdt_states` as read back. */
40
+ export type SectionCrdtStateRow = typeof sectionCrdtStates.$inferSelect;
41
+ /** One recorded head conflict (the losing concurrent head). */
42
+ export interface ConduitDocHeadConflict {
43
+ /** The losing head's version uid. */
44
+ readonly versionUid: string;
45
+ /** The losing head's HLC. */
46
+ readonly hlc: string;
47
+ /** ISO-8601 instant the conflict was recorded. */
48
+ readonly recordedAt: string;
49
+ }
50
+ /**
51
+ * Resolve a document slug to its immutable row uid.
52
+ *
53
+ * Lookup order: the live slug on `conduit_attachments` first (a live id
54
+ * always wins), then the newest alias in `conduit_doc_slug_aliases` (the
55
+ * old-slug lookup, T13354 AC2).
56
+ *
57
+ * @param projectRoot - Absolute path to the CLEO project root.
58
+ * @param slug - The slug to resolve.
59
+ * @returns The doc's `conduit_attachments.uid`, or `null` when unknown.
60
+ */
61
+ export declare function resolveConduitDocUid(projectRoot: string, slug: string): Promise<string | null>;
62
+ /**
63
+ * Record an old-slug → doc-uid alias (append-only).
64
+ *
65
+ * The row's uid is the NATURAL identity over (slug, docUid), so two devices
66
+ * recording the same alias merge to one row; a repeat insert is a no-op.
67
+ *
68
+ * @param projectRoot - Absolute path to the CLEO project root.
69
+ * @param alias - Slug, target doc uid and an optional reason.
70
+ * @returns The alias row's uid.
71
+ */
72
+ export declare function recordConduitDocAlias(projectRoot: string, alias: {
73
+ slug: string;
74
+ docUid: string;
75
+ reason?: string;
76
+ }): Promise<string>;
77
+ /** Input for {@link appendConduitAttachmentVersion}. */
78
+ export interface AppendConduitAttachmentVersionInput {
79
+ /** Immutable doc id (`conduit_attachments.uid`). */
80
+ readonly attachmentUid: string;
81
+ /** Parent version uid in the DAG; null for the root version. */
82
+ readonly parentVersionUid: string | null;
83
+ /** Revision author agent id. */
84
+ readonly authorAgentId: string;
85
+ /** Content-addressed blob ref (never inline bytes for large bodies). */
86
+ readonly storageKey: string;
87
+ /** SHA content hash of the body the blob ref points at. */
88
+ readonly contentHash: string;
89
+ /** Uncompressed size in bytes. */
90
+ readonly originalSize: number;
91
+ /** Compressed size in bytes. */
92
+ readonly compressedSize: number;
93
+ /** Token count of this version. */
94
+ readonly tokens: number;
95
+ /** Change type (default 'patch'). */
96
+ readonly changeType?: string;
97
+ /** Optional patch text for small edits. */
98
+ readonly patchText?: string;
99
+ /** Optional change summary. */
100
+ readonly changeSummary?: string;
101
+ /** Section ids this version modified. */
102
+ readonly sectionsModified?: readonly string[];
103
+ /** Tokens added / removed by this version. */
104
+ readonly tokensAdded?: number;
105
+ readonly tokensRemoved?: number;
106
+ }
107
+ /**
108
+ * Append a version row to a document's history DAG.
109
+ *
110
+ * `version_number` is minted as (current local max within the doc) + 1 — a
111
+ * display ordinal only; another device minting the same number is NOT a
112
+ * conflict, because version identity is the row uid + parent linkage. The
113
+ * `uid` itself comes from the schema's `defaultRowUid` (a random UUIDv7 at
114
+ * insert), matching the T12341 minted-table pattern.
115
+ *
116
+ * @param projectRoot - Absolute path to the CLEO project root.
117
+ * @param input - The version facts.
118
+ * @returns The inserted row.
119
+ */
120
+ export declare function appendConduitAttachmentVersion(projectRoot: string, input: AppendConduitAttachmentVersionInput): Promise<ConduitAttachmentVersionRow>;
121
+ /**
122
+ * List a document's versions, newest display ordinal first.
123
+ *
124
+ * @param projectRoot - Absolute path to the CLEO project root.
125
+ * @param attachmentUid - The doc's immutable uid.
126
+ * @returns The version rows.
127
+ */
128
+ export declare function listConduitAttachmentVersions(projectRoot: string, attachmentUid: string): Promise<ConduitAttachmentVersionRow[]>;
129
+ /** Input for {@link recordConduitAttachmentApproval}. */
130
+ export interface RecordConduitAttachmentApprovalInput {
131
+ /** Immutable doc id. */
132
+ readonly attachmentUid: string;
133
+ /** The reviewed version's uid. */
134
+ readonly versionUid: string;
135
+ /** Section the verdict covers; omit for a whole-document verdict. */
136
+ readonly sectionId?: string;
137
+ /** Reviewer agent id. */
138
+ readonly reviewerAgentId: string;
139
+ /** Verdict (default 'approved'; a revoke is written as 'revoked'). */
140
+ readonly status?: string;
141
+ /** Optional reviewer comment. */
142
+ readonly comment?: string;
143
+ /** The version's display ordinal (display only). */
144
+ readonly versionReviewed: number;
145
+ }
146
+ /**
147
+ * Record an approval verdict as an append-only row.
148
+ *
149
+ * @param projectRoot - Absolute path to the CLEO project root.
150
+ * @param input - The verdict facts.
151
+ * @returns The inserted row.
152
+ */
153
+ export declare function recordConduitAttachmentApproval(projectRoot: string, input: RecordConduitAttachmentApprovalInput): Promise<ConduitAttachmentApprovalRow>;
154
+ /**
155
+ * Revoke an approval as a TOMBSTONE row (never an UPDATE or DELETE).
156
+ *
157
+ * @param projectRoot - Absolute path to the CLEO project root.
158
+ * @param input - The revoke facts (same shape as the original verdict).
159
+ * @returns The tombstone row.
160
+ */
161
+ export declare function revokeConduitAttachmentApproval(projectRoot: string, input: Omit<RecordConduitAttachmentApprovalInput, 'status'>): Promise<ConduitAttachmentApprovalRow>;
162
+ /**
163
+ * The effective verdicts for one version: the latest row per (reviewer,
164
+ * section) wins, and 'revoked' tombstones cancel the earlier verdict.
165
+ *
166
+ * @param projectRoot - Absolute path to the CLEO project root.
167
+ * @param versionUid - The version uid.
168
+ * @param sectionId - Restrict to one section when given (plus whole-doc rows).
169
+ * @returns The approval rows in creation order.
170
+ */
171
+ export declare function listConduitAttachmentApprovals(projectRoot: string, versionUid: string, sectionId?: string): Promise<ConduitAttachmentApprovalRow[]>;
172
+ /**
173
+ * Rebuild the DERIVED contributors rollup from the versions table.
174
+ *
175
+ * `conduit_attachment_contributors` is not synced (spec §10): every device
176
+ * recomputes it after apply. Raw set-SQL (DELETE + INSERT … SELECT … GROUP
177
+ * BY) because the rebuild is a pure aggregate — the two statements are the
178
+ * gate-28 exempt sites for this (file, table).
179
+ *
180
+ * @param projectRoot - Absolute path to the CLEO project root.
181
+ * @param attachmentUid - Rebuild one doc only when given, else every doc.
182
+ * @returns The number of rollup rows written.
183
+ */
184
+ export declare function rebuildConduitAttachmentContributors(projectRoot: string, attachmentUid?: string): Promise<number>;
185
+ /** Input for {@link upsertConduitDocHead}. */
186
+ export interface UpsertConduitDocHeadInput {
187
+ /** Immutable doc id. */
188
+ readonly attachmentUid: string;
189
+ /** The candidate head version's uid. */
190
+ readonly headVersionUid: string;
191
+ /**
192
+ * The candidate head's HLC (journal wire form). Its lexical order IS the
193
+ * (phys, ctr, replica) tuple order (`store/sync/hlc.ts`), so plain string
194
+ * comparison is the max-HLC rule.
195
+ */
196
+ readonly headHlc: string;
197
+ }
198
+ /** Outcome of a {@link upsertConduitDocHead} call. */
199
+ export interface UpsertConduitDocHeadResult {
200
+ /** Whether the candidate became the head. */
201
+ readonly advanced: boolean;
202
+ /** Whether a losing concurrent head was recorded as a conflict. */
203
+ readonly conflictRecorded: boolean;
204
+ /** The head row after the call. */
205
+ readonly head: ConduitDocHeadRow;
206
+ }
207
+ /**
208
+ * Move a document's current-version projection (typed rule
209
+ * `docs.head.max-hlc`).
210
+ *
211
+ * The row keeps the MAX-HLC head. A candidate that loses to a concurrent
212
+ * head is never silently shadowed: `conflict_count` increments and
213
+ * `last_conflict_json` records the loser (the losing version itself survives
214
+ * in `conduit_attachment_versions`). A repeat of the same head is a no-op.
215
+ *
216
+ * @param projectRoot - Absolute path to the CLEO project root.
217
+ * @param input - The candidate head.
218
+ * @returns Whether the head advanced or a conflict was recorded.
219
+ */
220
+ export declare function upsertConduitDocHead(projectRoot: string, input: UpsertConduitDocHeadInput): Promise<UpsertConduitDocHeadResult>;
221
+ /**
222
+ * Read a document's current-version projection row.
223
+ *
224
+ * @param projectRoot - Absolute path to the CLEO project root.
225
+ * @param attachmentUid - The doc's immutable uid.
226
+ * @returns The head row, or `null` when the doc has no projection yet.
227
+ */
228
+ export declare function getConduitDocHead(projectRoot: string, attachmentUid: string): Promise<ConduitDocHeadRow | null>;
229
+ /**
230
+ * Read the local Loro state of one document section.
231
+ *
232
+ * @param projectRoot - Absolute path to the CLEO project root.
233
+ * @param attachmentUid - The doc's immutable uid.
234
+ * @param sectionId - The section id.
235
+ * @returns The state row, or `null` when this device has none.
236
+ */
237
+ export declare function readSectionCrdtState(projectRoot: string, attachmentUid: string, sectionId: string): Promise<SectionCrdtStateRow | null>;
238
+ /**
239
+ * Write the local Loro state of one document section (upsert).
240
+ *
241
+ * LOCAL-ONLY: this state never syncs; content moves cross-device only
242
+ * through landed versions (spec §2 option b).
243
+ *
244
+ * @param projectRoot - Absolute path to the CLEO project root.
245
+ * @param input - The section's snapshot bytes and optional base version.
246
+ */
247
+ export declare function writeSectionCrdtState(projectRoot: string, input: {
248
+ attachmentUid: string;
249
+ sectionId: string;
250
+ snapshot: Buffer;
251
+ baseVersionUid?: string | null;
252
+ }): Promise<void>;
253
+ /**
254
+ * Rebase every local CRDT state of a document onto a landed version.
255
+ *
256
+ * Called when an apply lands a new version: the local Loro state is reset
257
+ * onto the landed base (`base_version_uid`) so stale local edits do not
258
+ * silently diverge from the synced history (spec §10).
259
+ *
260
+ * @param projectRoot - Absolute path to the CLEO project root.
261
+ * @param attachmentUid - The doc's immutable uid.
262
+ * @param baseVersionUid - The landed version's uid.
263
+ */
264
+ export declare function rebaseSectionCrdtStates(projectRoot: string, attachmentUid: string, baseVersionUid: string): Promise<void>;
265
+ //# sourceMappingURL=conduit-doc-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conduit-doc-history.d.ts","sourceRoot":"","sources":["../../src/store/conduit-doc-history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAOH,OAAO,EACL,0BAA0B,EAE1B,yBAAyB,EACzB,eAAe,EAEf,iBAAiB,EAClB,MAAM,kCAAkC,CAAC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