@cleocode/core 2026.10.8 → 2026.10.9-rc.ci.676

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 (266) hide show
  1. package/dist/build-provenance.json +2 -2
  2. package/dist/cloud/auto-sync-command-entry.d.ts +13 -0
  3. package/dist/cloud/auto-sync-command-entry.d.ts.map +1 -0
  4. package/dist/cloud/auto-sync-command-entry.js +18 -0
  5. package/dist/cloud/auto-sync-command-entry.js.map +1 -0
  6. package/dist/cloud/auto-sync-command.d.ts +64 -0
  7. package/dist/cloud/auto-sync-command.d.ts.map +1 -0
  8. package/dist/cloud/auto-sync-command.js +109 -0
  9. package/dist/cloud/auto-sync-command.js.map +1 -0
  10. package/dist/cloud/auto-sync.d.ts +111 -0
  11. package/dist/cloud/auto-sync.d.ts.map +1 -0
  12. package/dist/cloud/auto-sync.js +275 -0
  13. package/dist/cloud/auto-sync.js.map +1 -0
  14. package/dist/cloud/nexus-cloud-device-overview.d.ts +52 -0
  15. package/dist/cloud/nexus-cloud-device-overview.d.ts.map +1 -0
  16. package/dist/cloud/nexus-cloud-device-overview.js +105 -0
  17. package/dist/cloud/nexus-cloud-device-overview.js.map +1 -0
  18. package/dist/cloud/nexus-cloud-journal-activity.d.ts +56 -0
  19. package/dist/cloud/nexus-cloud-journal-activity.d.ts.map +1 -0
  20. package/dist/cloud/nexus-cloud-journal-activity.js +98 -0
  21. package/dist/cloud/nexus-cloud-journal-activity.js.map +1 -0
  22. package/dist/cloud/nexus-cloud-status.d.ts.map +1 -1
  23. package/dist/cloud/nexus-cloud-status.js +88 -5
  24. package/dist/cloud/nexus-cloud-status.js.map +1 -1
  25. package/dist/cloud/nexus-vault.d.ts +19 -5
  26. package/dist/cloud/nexus-vault.d.ts.map +1 -1
  27. package/dist/cloud/nexus-vault.js +376 -71
  28. package/dist/cloud/nexus-vault.js.map +1 -1
  29. package/dist/cloud/replica-rebind.d.ts +14 -0
  30. package/dist/cloud/replica-rebind.d.ts.map +1 -1
  31. package/dist/cloud/replica-rebind.js +20 -1
  32. package/dist/cloud/replica-rebind.js.map +1 -1
  33. package/dist/config.d.ts +10 -0
  34. package/dist/config.d.ts.map +1 -1
  35. package/dist/config.js +19 -0
  36. package/dist/config.js.map +1 -1
  37. package/dist/docs/docs-ops.d.ts +4 -2
  38. package/dist/docs/docs-ops.d.ts.map +1 -1
  39. package/dist/docs/docs-ops.js +107 -15
  40. package/dist/docs/docs-ops.js.map +1 -1
  41. package/dist/doctor/system-health.d.ts +76 -2
  42. package/dist/doctor/system-health.d.ts.map +1 -1
  43. package/dist/doctor/system-health.js +264 -41
  44. package/dist/doctor/system-health.js.map +1 -1
  45. package/dist/hooks/project-runner.d.ts +10 -0
  46. package/dist/hooks/project-runner.d.ts.map +1 -0
  47. package/dist/hooks/project-runner.js +328 -0
  48. package/dist/hooks/project-runner.js.map +1 -0
  49. package/dist/hooks/project-state.d.ts +41 -0
  50. package/dist/hooks/project-state.d.ts.map +1 -0
  51. package/dist/hooks/project-state.js +331 -0
  52. package/dist/hooks/project-state.js.map +1 -0
  53. package/dist/hooks/release-gate.d.ts +61 -0
  54. package/dist/hooks/release-gate.d.ts.map +1 -0
  55. package/dist/hooks/release-gate.js +70 -0
  56. package/dist/hooks/release-gate.js.map +1 -0
  57. package/dist/nexus/analyze-orchestrator.d.ts +2 -0
  58. package/dist/nexus/analyze-orchestrator.d.ts.map +1 -1
  59. package/dist/nexus/analyze-orchestrator.js +1 -0
  60. package/dist/nexus/analyze-orchestrator.js.map +1 -1
  61. package/dist/nexus/freshness.d.ts +67 -3
  62. package/dist/nexus/freshness.d.ts.map +1 -1
  63. package/dist/nexus/freshness.js +130 -9
  64. package/dist/nexus/freshness.js.map +1 -1
  65. package/dist/nexus/refresh-child.d.ts +14 -0
  66. package/dist/nexus/refresh-child.d.ts.map +1 -0
  67. package/dist/nexus/refresh-child.js +24 -0
  68. package/dist/nexus/refresh-child.js.map +1 -0
  69. package/dist/orchestrate/spawn-ops.d.ts +8 -1
  70. package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
  71. package/dist/orchestrate/spawn-ops.js +42 -12
  72. package/dist/orchestrate/spawn-ops.js.map +1 -1
  73. package/dist/orchestration/spawn.d.ts +5 -0
  74. package/dist/orchestration/spawn.d.ts.map +1 -1
  75. package/dist/orchestration/spawn.js +4 -1
  76. package/dist/orchestration/spawn.js.map +1 -1
  77. package/dist/release/channel.d.ts.map +1 -1
  78. package/dist/release/channel.js +10 -0
  79. package/dist/release/channel.js.map +1 -1
  80. package/dist/release/github-pr.d.ts.map +1 -1
  81. package/dist/release/github-pr.js +1 -0
  82. package/dist/release/github-pr.js.map +1 -1
  83. package/dist/release/plan.d.ts +8 -3
  84. package/dist/release/plan.d.ts.map +1 -1
  85. package/dist/release/plan.js +72 -15
  86. package/dist/release/plan.js.map +1 -1
  87. package/dist/release/reconcile.d.ts.map +1 -1
  88. package/dist/release/reconcile.js +6 -15
  89. package/dist/release/reconcile.js.map +1 -1
  90. package/dist/sentient/daemon-entry.d.ts +6 -0
  91. package/dist/sentient/daemon-entry.d.ts.map +1 -1
  92. package/dist/sentient/daemon-entry.js +12 -0
  93. package/dist/sentient/daemon-entry.js.map +1 -1
  94. package/dist/sentient/worktree-dispatch.d.ts +7 -0
  95. package/dist/sentient/worktree-dispatch.d.ts.map +1 -1
  96. package/dist/sentient/worktree-dispatch.js +37 -1
  97. package/dist/sentient/worktree-dispatch.js.map +1 -1
  98. package/dist/sessions/session-end-snapshot-entry.d.ts +4 -1
  99. package/dist/sessions/session-end-snapshot-entry.d.ts.map +1 -1
  100. package/dist/sessions/session-end-snapshot-entry.js +9 -1
  101. package/dist/sessions/session-end-snapshot-entry.js.map +1 -1
  102. package/dist/spawn/agent-identity.d.ts.map +1 -1
  103. package/dist/spawn/agent-identity.js +96 -1
  104. package/dist/spawn/agent-identity.js.map +1 -1
  105. package/dist/spawn/branch-lock.d.ts +27 -8
  106. package/dist/spawn/branch-lock.d.ts.map +1 -1
  107. package/dist/spawn/branch-lock.js +57 -73
  108. package/dist/spawn/branch-lock.js.map +1 -1
  109. package/dist/store/agent-resolver.d.ts +6 -0
  110. package/dist/store/agent-resolver.d.ts.map +1 -1
  111. package/dist/store/agent-resolver.js +2 -0
  112. package/dist/store/agent-resolver.js.map +1 -1
  113. package/dist/store/dual-scope-db.d.ts +20 -0
  114. package/dist/store/dual-scope-db.d.ts.map +1 -1
  115. package/dist/store/dual-scope-db.js +81 -8
  116. package/dist/store/dual-scope-db.js.map +1 -1
  117. package/dist/store/exodus/bare-family.d.ts.map +1 -1
  118. package/dist/store/exodus/bare-family.js +4 -1
  119. package/dist/store/exodus/bare-family.js.map +1 -1
  120. package/dist/store/exodus/migrate.d.ts.map +1 -1
  121. package/dist/store/exodus/migrate.js +2 -0
  122. package/dist/store/exodus/migrate.js.map +1 -1
  123. package/dist/store/exodus/on-open.d.ts.map +1 -1
  124. package/dist/store/exodus/on-open.js +16 -4
  125. package/dist/store/exodus/on-open.js.map +1 -1
  126. package/dist/store/exodus/reconcile.d.ts.map +1 -1
  127. package/dist/store/exodus/reconcile.js +2 -0
  128. package/dist/store/exodus/reconcile.js.map +1 -1
  129. package/dist/store/portable-bundle-import.d.ts +17 -0
  130. package/dist/store/portable-bundle-import.d.ts.map +1 -1
  131. package/dist/store/portable-bundle-import.js +46 -31
  132. package/dist/store/portable-bundle-import.js.map +1 -1
  133. package/dist/store/portable-bundle-scan.d.ts.map +1 -1
  134. package/dist/store/portable-bundle-scan.js +5 -0
  135. package/dist/store/portable-bundle-scan.js.map +1 -1
  136. package/dist/store/row-identity-registry.d.ts +4 -3
  137. package/dist/store/row-identity-registry.d.ts.map +1 -1
  138. package/dist/store/row-identity-registry.js +37 -35
  139. package/dist/store/row-identity-registry.js.map +1 -1
  140. package/dist/store/row-identity.d.ts.map +1 -1
  141. package/dist/store/row-identity.js +6 -1
  142. package/dist/store/row-identity.js.map +1 -1
  143. package/dist/store/schema/cleo-global/agent-registry.d.ts +16 -0
  144. package/dist/store/schema/cleo-global/agent-registry.d.ts.map +1 -1
  145. package/dist/store/schema/cleo-global/agent-registry.js +4 -1
  146. package/dist/store/schema/cleo-global/agent-registry.js.map +1 -1
  147. package/dist/store/schema/cleo-project/provenance-orphans.d.ts +126 -1
  148. package/dist/store/schema/cleo-project/provenance-orphans.d.ts.map +1 -1
  149. package/dist/store/schema/cleo-project/provenance-orphans.js +41 -1
  150. package/dist/store/schema/cleo-project/provenance-orphans.js.map +1 -1
  151. package/dist/store/sqlite-data-accessor.d.ts +40 -0
  152. package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
  153. package/dist/store/sqlite-data-accessor.js +122 -0
  154. package/dist/store/sqlite-data-accessor.js.map +1 -1
  155. package/dist/store/sync/activity.d.ts +64 -0
  156. package/dist/store/sync/activity.d.ts.map +1 -0
  157. package/dist/store/sync/activity.js +220 -0
  158. package/dist/store/sync/activity.js.map +1 -0
  159. package/dist/store/sync/apply/applier.d.ts.map +1 -1
  160. package/dist/store/sync/apply/applier.js +58 -2
  161. package/dist/store/sync/apply/applier.js.map +1 -1
  162. package/dist/store/sync/apply/write-api.d.ts.map +1 -1
  163. package/dist/store/sync/apply/write-api.js +45 -3
  164. package/dist/store/sync/apply/write-api.js.map +1 -1
  165. package/dist/store/sync/capture.d.ts +6 -4
  166. package/dist/store/sync/capture.d.ts.map +1 -1
  167. package/dist/store/sync/capture.js +16 -4
  168. package/dist/store/sync/capture.js.map +1 -1
  169. package/dist/store/sync/collision-settle.d.ts +120 -0
  170. package/dist/store/sync/collision-settle.d.ts.map +1 -1
  171. package/dist/store/sync/collision-settle.js +342 -5
  172. package/dist/store/sync/collision-settle.js.map +1 -1
  173. package/dist/store/sync/flags.d.ts +34 -0
  174. package/dist/store/sync/flags.d.ts.map +1 -1
  175. package/dist/store/sync/flags.js +46 -0
  176. package/dist/store/sync/flags.js.map +1 -1
  177. package/dist/store/sync/genesis.d.ts +8 -0
  178. package/dist/store/sync/genesis.d.ts.map +1 -1
  179. package/dist/store/sync/genesis.js +18 -5
  180. package/dist/store/sync/genesis.js.map +1 -1
  181. package/dist/store/sync/push.d.ts +4 -2
  182. package/dist/store/sync/push.d.ts.map +1 -1
  183. package/dist/store/sync/push.js +10 -1
  184. package/dist/store/sync/push.js.map +1 -1
  185. package/dist/store/sync/rebind.d.ts +20 -0
  186. package/dist/store/sync/rebind.d.ts.map +1 -1
  187. package/dist/store/sync/rebind.js +86 -4
  188. package/dist/store/sync/rebind.js.map +1 -1
  189. package/dist/store/sync/reconcile-copy.d.ts +152 -0
  190. package/dist/store/sync/reconcile-copy.d.ts.map +1 -0
  191. package/dist/store/sync/reconcile-copy.js +428 -0
  192. package/dist/store/sync/reconcile-copy.js.map +1 -0
  193. package/dist/store/sync/reconcile.d.ts +80 -0
  194. package/dist/store/sync/reconcile.d.ts.map +1 -1
  195. package/dist/store/sync/reconcile.js +97 -5
  196. package/dist/store/sync/reconcile.js.map +1 -1
  197. package/dist/store/sync/repair.d.ts +11 -0
  198. package/dist/store/sync/repair.d.ts.map +1 -1
  199. package/dist/store/sync/repair.js +14 -3
  200. package/dist/store/sync/repair.js.map +1 -1
  201. package/dist/store/sync/replica.d.ts +74 -1
  202. package/dist/store/sync/replica.d.ts.map +1 -1
  203. package/dist/store/sync/replica.js +104 -6
  204. package/dist/store/sync/replica.js.map +1 -1
  205. package/dist/store/sync/row-meta.d.ts +4 -2
  206. package/dist/store/sync/row-meta.d.ts.map +1 -1
  207. package/dist/store/sync/row-meta.js +6 -4
  208. package/dist/store/sync/row-meta.js.map +1 -1
  209. package/dist/store/sync/sealer.d.ts +2 -0
  210. package/dist/store/sync/sealer.d.ts.map +1 -1
  211. package/dist/store/sync/sealer.js +33 -4
  212. package/dist/store/sync/sealer.js.map +1 -1
  213. package/dist/store/sync/structural.d.ts.map +1 -1
  214. package/dist/store/sync/structural.js +3 -1
  215. package/dist/store/sync/structural.js.map +1 -1
  216. package/dist/store/sync/timestamp-canon.d.ts.map +1 -1
  217. package/dist/store/sync/timestamp-canon.js +2 -0
  218. package/dist/store/sync/timestamp-canon.js.map +1 -1
  219. package/dist/store/table-classification.d.ts +29 -0
  220. package/dist/store/table-classification.d.ts.map +1 -1
  221. package/dist/store/table-classification.js +85 -19
  222. package/dist/store/table-classification.js.map +1 -1
  223. package/dist/store/twin-collapse.d.ts.map +1 -1
  224. package/dist/store/twin-collapse.js +28 -10
  225. package/dist/store/twin-collapse.js.map +1 -1
  226. package/dist/store/vault-manifest.d.ts +5 -0
  227. package/dist/store/vault-manifest.d.ts.map +1 -1
  228. package/dist/store/vault-manifest.js +14 -1
  229. package/dist/store/vault-manifest.js.map +1 -1
  230. package/dist/tasks/affected-packages.d.ts +15 -5
  231. package/dist/tasks/affected-packages.d.ts.map +1 -1
  232. package/dist/tasks/affected-packages.js +20 -8
  233. package/dist/tasks/affected-packages.js.map +1 -1
  234. package/dist/tasks/done-record.d.ts +14 -4
  235. package/dist/tasks/done-record.d.ts.map +1 -1
  236. package/dist/tasks/done-record.js +21 -9
  237. package/dist/tasks/done-record.js.map +1 -1
  238. package/dist/tasks/evidence.d.ts.map +1 -1
  239. package/dist/tasks/evidence.js +45 -4
  240. package/dist/tasks/evidence.js.map +1 -1
  241. package/dist/tasks/gate-runner.d.ts +5 -4
  242. package/dist/tasks/gate-runner.d.ts.map +1 -1
  243. package/dist/tasks/gate-runner.js +18 -11
  244. package/dist/tasks/gate-runner.js.map +1 -1
  245. package/dist/tasks/tool-cache.d.ts +27 -1
  246. package/dist/tasks/tool-cache.d.ts.map +1 -1
  247. package/dist/tasks/tool-cache.js +110 -6
  248. package/dist/tasks/tool-cache.js.map +1 -1
  249. package/dist/tools/fs.d.ts +3 -1
  250. package/dist/tools/fs.d.ts.map +1 -1
  251. package/dist/tools/fs.js +35 -2
  252. package/dist/tools/fs.js.map +1 -1
  253. package/dist/validation/engine-ops.d.ts +10 -3
  254. package/dist/validation/engine-ops.d.ts.map +1 -1
  255. package/dist/validation/engine-ops.js +17 -8
  256. package/dist/validation/engine-ops.js.map +1 -1
  257. package/migrations/drizzle-cleo-global/20261010180000_t12915-agent-registry-uids/migration.sql +18 -0
  258. package/migrations/drizzle-cleo-project/20261010170000_t12896b-brain-task-observations/migration.sql +37 -0
  259. package/migrations/sync-journal/20261009150000_t13335-capture-pin/migration.sql +13 -0
  260. package/package.json +18 -13
  261. package/schemas/config.schema.json +12 -0
  262. package/schemas/project-context.schema.json +5 -0
  263. package/templates/CLEO-INJECTION.md +2 -2
  264. package/templates/CLEO-REFERENCE.md +6 -4
  265. package/templates/git-hooks/pre-push +29 -1
  266. package/templates/workflows/release-prepare.yml.tmpl +1 -0
@@ -0,0 +1,37 @@
1
+ -- T12896 — brain_task_observations joins the consolidated project schema.
2
+ --
3
+ -- The table (T1615, the observation/task join `cleo memory find` reads) was
4
+ -- created only by the standalone drizzle-brain migration
5
+ -- 20260601000001_t11522-brain-task-observations, which the consolidated store's
6
+ -- brain reconcile runs AFTER the open-time row-identity heal. A fresh store
7
+ -- therefore lacked it during the heal, so it could not be declared in
8
+ -- ROW_IDENTITY. This migration creates it with the same shape (every statement
9
+ -- IF NOT EXISTS, so a store the reconcile already gave the table keeps its rows
10
+ -- and the reconcile stays a no-op) and adds its row uid column and unique uid
11
+ -- index (natural identity on observation id + task uid, store/row-identity-registry.ts).
12
+ --
13
+ -- The uid column is ADD COLUMN (not part of the CREATE) so a store whose table
14
+ -- predates this migration gains it the same way a fresh one does; the column is
15
+ -- filled by TypeScript at open and by the per-connection TEMP trigger. No row is
16
+ -- touched here, so the gate 36 DML rules do not apply.
17
+ --
18
+ -- @task T12896
19
+ -- @epic T12323
20
+
21
+ CREATE TABLE IF NOT EXISTS `brain_task_observations` (
22
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
23
+ `observation_id` text NOT NULL,
24
+ `task_id` text NOT NULL,
25
+ `link_type` text DEFAULT 'session-completed' NOT NULL,
26
+ `created_at` text DEFAULT (datetime('now')) NOT NULL
27
+ );
28
+ --> statement-breakpoint
29
+ CREATE UNIQUE INDEX IF NOT EXISTS `idx_brain_task_obs_unique` ON `brain_task_observations` (`observation_id`, `task_id`);
30
+ --> statement-breakpoint
31
+ CREATE INDEX IF NOT EXISTS `idx_brain_task_obs_observation` ON `brain_task_observations` (`observation_id`);
32
+ --> statement-breakpoint
33
+ CREATE INDEX IF NOT EXISTS `idx_brain_task_obs_task` ON `brain_task_observations` (`task_id`);
34
+ --> statement-breakpoint
35
+ ALTER TABLE `brain_task_observations` ADD COLUMN `uid` text;
36
+ --> statement-breakpoint
37
+ CREATE UNIQUE INDEX IF NOT EXISTS `uq_brain_task_observations_uid` ON `brain_task_observations` (`uid`);
@@ -0,0 +1,13 @@
1
+ -- T13335 (journal spec §1.5 N7 rule 3) — the copy reconcile's pinned HLCs.
2
+ --
3
+ -- _sync_capture.pin_json: for a capture of a `rebind` frame the copy
4
+ -- reconcile wrote under rule 3 (a value the original replica sealed but the
5
+ -- stream never saw), the HLCs the sealer must publish unchanged instead of
6
+ -- ticking: `{"h"?: hlc, "fh"?: {column: hlc}}`. `h` is the op's own HLC (a
7
+ -- delete), `fh` the per-field HLCs (an insert or update). NULL for every
8
+ -- other capture. The pin dies with its capture when the capture is sealed.
9
+ --
10
+ -- Local-only.
11
+ --
12
+ -- Do not edit this file once applied: its hash is recorded per store.
13
+ ALTER TABLE _sync_capture ADD COLUMN pin_json TEXT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/core",
3
- "version": "2026.10.8",
3
+ "version": "2026.10.9-rc.ci.676",
4
4
  "description": "CLEO core business logic kernel — tasks, sessions, memory, orchestration, lifecycle, with bundled SQLite store",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -296,6 +296,11 @@
296
296
  "import": "./dist/docs/*.js",
297
297
  "require": "./dist/docs/*.js"
298
298
  },
299
+ "./tools/fs.js": {
300
+ "types": "./dist/tools/fs.d.ts",
301
+ "import": "./dist/tools/fs.js",
302
+ "require": "./dist/tools/fs.js"
303
+ },
299
304
  "./*": {
300
305
  "types": "./dist/*.d.ts",
301
306
  "import": "./dist/*.js",
@@ -491,16 +496,16 @@
491
496
  "write-file-atomic": "^7.0.1",
492
497
  "yaml": "^2.8.3",
493
498
  "zod": "^4.3.6",
494
- "@cleocode/adapters": "2026.10.8",
495
- "@cleocode/agents": "2026.10.8",
496
- "@cleocode/caamp": "2026.10.8",
497
- "@cleocode/contracts": "2026.10.8",
498
- "@cleocode/git-shim": "2026.10.8",
499
- "@cleocode/lafs": "2026.10.8",
500
- "@cleocode/nexus": "2026.10.8",
501
- "@cleocode/paths": "2026.10.8",
502
- "@cleocode/skills": "2026.10.8",
503
- "@cleocode/worktree": "2026.10.8"
499
+ "@cleocode/adapters": "2026.10.9-rc.ci.676",
500
+ "@cleocode/agents": "2026.10.9-rc.ci.676",
501
+ "@cleocode/caamp": "2026.10.9-rc.ci.676",
502
+ "@cleocode/contracts": "2026.10.9-rc.ci.676",
503
+ "@cleocode/git-shim": "2026.10.9-rc.ci.676",
504
+ "@cleocode/lafs": "2026.10.9-rc.ci.676",
505
+ "@cleocode/nexus": "2026.10.9-rc.ci.676",
506
+ "@cleocode/paths": "2026.10.9-rc.ci.676",
507
+ "@cleocode/skills": "2026.10.9-rc.ci.676",
508
+ "@cleocode/worktree": "2026.10.9-rc.ci.676"
504
509
  },
505
510
  "engines": {
506
511
  "node": ">=24.16.0"
@@ -526,7 +531,7 @@
526
531
  "@types/proper-lockfile": "^4.1.4",
527
532
  "@types/tar": "^6.1.13",
528
533
  "@types/write-file-atomic": "^4.0.3",
529
- "@cleocode/utils": "2026.10.8"
534
+ "@cleocode/utils": "2026.10.9"
530
535
  },
531
536
  "repository": {
532
537
  "type": "git",
@@ -535,7 +540,7 @@
535
540
  },
536
541
  "optionalDependencies": {
537
542
  "llmtxt": "^2026.5.15",
538
- "@cleocode/studio": "^2026.10.8"
543
+ "@cleocode/studio": "^2026.10.9-rc.ci.676"
539
544
  },
540
545
  "scripts": {
541
546
  "build": "tsc && node scripts/copy-selfimprove-fixtures.mjs && node scripts/write-build-provenance.mjs",
@@ -675,6 +675,18 @@
675
675
  }
676
676
  }
677
677
  },
678
+ "cloud": {
679
+ "type": "object",
680
+ "description": "Cleo Nexus cloud sync behaviour on this device.",
681
+ "additionalProperties": false,
682
+ "properties": {
683
+ "autoSync": {
684
+ "type": "boolean",
685
+ "default": true,
686
+ "description": "Start a background push/pull from normal commands in a linked project, at most once per CLEO_AUTO_SYNC_INTERVAL_MIN (T13553). false turns it off; CLEO_DISABLE_AUTO_SYNC=1 does the same per shell."
687
+ }
688
+ }
689
+ },
678
690
  "contextAlerts": {
679
691
  "type": "object",
680
692
  "description": "Context window alert configuration. Controls when and how users are alerted about context window usage approaching thresholds.",
@@ -278,6 +278,11 @@
278
278
  "items": { "type": "string", "minLength": 1 },
279
279
  "description": "Repo-relative paths or globs that never count as part of a change when evidence decides its scope (runtime state, e.g. .opencode/goals/**). CLEO's own installed hook files are always excluded (T13135)."
280
280
  },
281
+ "runtimePaths": {
282
+ "type": "array",
283
+ "items": { "type": "string", "minLength": 1 },
284
+ "description": "Globs of tracked files a harness rewrites during a run (e.g. .opencode/goals/*/run.json), left out of the evidence tree hash and kept tracked (T13554). Read from the default branch only; a glob matching the project context, a goal.yaml, an oracle or a typed gate input is refused."
285
+ },
281
286
  "ciChecks": {
282
287
  "type": "object",
283
288
  "additionalProperties": false,
@@ -1,6 +1,6 @@
1
1
  # CLEO Protocol
2
2
 
3
- Version: 2.24.10 | CLI-only dispatch | `cleo <command> [args]`
3
+ Version: 2.24.11 | CLI-only dispatch | `cleo <command> [args]`
4
4
 
5
5
  <!-- CLEO-INJECTION:section=session-start -->
6
6
  ## Universal protocol
@@ -133,7 +133,7 @@ Before `cleo complete <id>`, every gate requires programmatic evidence validated
133
133
  | `securityPassed` | `tool:security-scan` |
134
134
  | `cleanupDone` | `note:removed dead branches` |
135
135
 
136
- Name the acceptance criteria each result proves: `cleo verify T1234 --gate implemented --evidence "commit:abc123;files:src/fix.ts;satisfies:T1234#AC1"`. Record `testsPassed` and `qaPassed` separately with actual verification results and explicit criterion links. Documentation-only PRs cannot implement a code-fix task; changed criteria require fresh evidence, and a child waiver does not waive parent criteria. Then `cleo complete T###` re-validates every hard atom (commit reachable, file sha256, test-run hash); tampering → `E_EVIDENCE_STALE`. Typed gates, `pr:` rules, tool timeouts and the audited owner override: `cleo briefing inject --section evidence`.
136
+ Name the acceptance criteria each result proves: `cleo verify T1234 --gate implemented --evidence "commit:abc123;files:src/fix.ts;satisfies:T1234#AC1"`. Record `testsPassed` and `qaPassed` separately with actual verification results and explicit criterion links. Documentation-only PRs cannot implement a code-fix task; changed criteria require fresh evidence, and a child waiver does not waive parent criteria. Then `cleo complete T###` re-validates every hard atom (commit reachable, file sha256, test-run hash); tampering → `E_EVIDENCE_STALE`. Typed gates, `pr:` rules, tool timeouts and the audited owner override: `cleo briefing inject --section evidence`. Typed gates execute only via `cleo verify --run`.
137
137
 
138
138
  Anti-patterns: completing without running tests · self-attesting without programmatic proof · running tests by hand, then again via `tool:test` · modifying files between `cleo verify` and `cleo complete`.
139
139
  <!-- /CLEO-INJECTION:section=pre-complete-gate -->
@@ -1,6 +1,6 @@
1
1
  # CLEO Protocol — on-demand reference
2
2
 
3
- Version: 2.24.10 | Companion to the always-loaded `CLEO-INJECTION.md` core
3
+ Version: 2.24.11 | Companion to the always-loaded `CLEO-INJECTION.md` core
4
4
 
5
5
  Not injected into agent context. Print one section with `cleo briefing inject --section <name>`; tier-2 spawn prompts embed this whole file. Section names are the `CLEO-INJECTION:section` markers below.
6
6
 
@@ -277,13 +277,15 @@ A merged PR and green CI provide provenance. For `implemented`, pair `pr:<number
277
277
 
278
278
  ### Typed acceptance gates — observe before you attest
279
279
 
280
- Typed gates (`cleo req add <id> --gate '<json>'`) EXECUTE during any `cleo verify … --gate … --evidence …` write on a task that carries them. To run them without recording anything:
280
+ Typed gates (`cleo req add <id> --gate '<json>'`) execute ONLY through `cleo verify <id> --run` (owner decision, T13521). Evidence writes (`cleo verify … --gate … --evidence …`), `cleo done`, `cleo verify --auto` and `cleo complete` read cached passes and execute no typed gate command:
281
281
 
282
282
  ```bash
283
- cleo verify T### --run # executes typed gates, records no verification, caches passes
283
+ cleo verify T### --run # executes the typed gates, records no verification, caches passes
284
+ cleo verify T### --run --req REQ-A,REQ-B # executes only the named gates; the others keep their cached passes
285
+ cleo verify T### --gate testsPassed --evidence "<atoms>" # reads the cached passes; executes nothing
284
286
  ```
285
287
 
286
- `--run` records no verification and cannot be combined with `--gate`/`--all`/`--reset`. Passes are cached (HMAC-sealed per machine) by gate + HEAD + dirty tree + inputs, so the next write reuses them, marked `source: cache` on the result and receipt; add `--no-run` to forbid execution. `evidence.allowCachedGates: false` in `.cleo/project-context.json` disables reuse. A `test` gate with `minCount` needs its OWN command to emit a machine-readable report (`--reporter=json` for vitest, `--json` for jest); an exit code carries no count, and a report file from a separate invocation is not bound to this run — record that as `test-run:<path>` evidence instead.
288
+ `--run` records no verification and cannot be combined with `--gate`/`--all`/`--reset`. Passes are cached (HMAC-sealed per machine) by gate + HEAD + dirty tree + inputs; a write reuses them, marked `source: cache` on the result and receipt. A typed gate the write links (`satisfies:`) with no cached pass refuses the write with `E_GATE_NOT_CACHED`, naming the `--run` command; an unlinked one is recorded as not run, and `cleo complete` still requires it. `--run-typed` on a write (or on `cleo done`) opts back into executing uncached typed gates there. `evidence.allowCachedGates: false` in `.cleo/project-context.json` disables reuse, so writes then need `--run-typed`. Replace a gate's command in place with `cleo req replace <id> <REQ-ID> --gate '<json>'`; prefer a repo-relative command and `cwd`. A `test` gate with `minCount` needs its OWN command to emit a machine-readable report (`--reporter=json` for vitest, `--json` for jest); an exit code carries no count, and a report file from a separate invocation is not bound to this run — record that as `test-run:<path>` evidence instead.
287
289
 
288
290
  ### Emergency override (audited)
289
291
 
@@ -19,6 +19,17 @@
19
19
  # POSIX `/bin/sh` only. No node/pnpm dependency.
20
20
  set -e
21
21
 
22
+ # Capture once so task-ID validation and project checks receive identical refs.
23
+ REF_INPUT=$(mktemp "${TMPDIR:-/tmp}/cleo-pre-push.XXXXXX") || {
24
+ printf '%s\n' 'cleo pre-push: cannot capture refs; infrastructure failure, allowing push' >&2
25
+ exit 0
26
+ }
27
+ trap 'rm -f "$REF_INPUT"' EXIT HUP INT TERM
28
+ if ! cat > "$REF_INPUT"; then
29
+ printf '%s\n' 'cleo pre-push: cannot read refs; infrastructure failure, allowing push' >&2
30
+ exit 0
31
+ fi
32
+
22
33
  ZERO_SHA="0000000000000000000000000000000000000000"
23
34
  EMPTY_TREE_SHA=""
24
35
  FAIL=0
@@ -73,7 +84,7 @@ while read -r local_ref local_sha remote_ref remote_sha; do
73
84
  "
74
85
  fi
75
86
  done
76
- done
87
+ done < "$REF_INPUT"
77
88
 
78
89
  if [ "$FAIL" -ne 0 ]; then
79
90
  cat >&2 <<EOF
@@ -89,4 +100,21 @@ EOF
89
100
  exit 1
90
101
  fi
91
102
 
103
+ # Existing projects remain unchanged: the shared runner skips disabled hooks.
104
+ if command -v cleo >/dev/null 2>&1; then
105
+ capability=$(cleo hook run --probe < /dev/null 2>/dev/null) || capability=""
106
+ if [ "$capability" != "CLEO_PROJECT_HOOK_V1" ]; then
107
+ printf '%s\n' 'cleo pre-push: project runner unavailable; allowing push' >&2
108
+ exit 0
109
+ fi
110
+ status=0
111
+ cleo hook run --source git --event pre-push -- "$@" < "$REF_INPUT" || status=$?
112
+ case "$status" in
113
+ 0) ;;
114
+ 1) exit 1 ;; # An explicit project verdict/checker policy blocks.
115
+ *) printf '%s\n' 'cleo pre-push: runner infrastructure failure; allowing push' >&2 ;;
116
+ esac
117
+ else
118
+ printf '%s\n' 'cleo pre-push: project runner missing; allowing push' >&2
119
+ fi
92
120
  exit 0
@@ -54,6 +54,7 @@ on:
54
54
  - beta
55
55
  - alpha
56
56
  - rc
57
+ - canary
57
58
  skip-tests:
58
59
  description: 'Skip the Linux test shards in Preflight (use when main CI is already green for this commit — `cleo release open` sets it after checking). Lint, typecheck and build still run.'
59
60
  type: boolean