@cleocode/cleo 2026.9.20 → 2026.9.21

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 (66) hide show
  1. package/dist/cli/index.js +2444 -817
  2. package/package.json +13 -13
  3. package/scripts/install-daemon-service.mjs +14 -151
  4. package/studio-dist/client/_app/immutable/chunks/B0moCQFp.js +1 -0
  5. package/studio-dist/client/_app/immutable/chunks/{C7l6b60w.js → BAm68yLM.js} +1 -1
  6. package/studio-dist/client/_app/immutable/chunks/{iIuV8bZP.js → Dm-Z-HM3.js} +1 -1
  7. package/studio-dist/client/_app/immutable/chunks/{C5tndi5t.js → VBlPNtFM.js} +1 -1
  8. package/studio-dist/client/_app/immutable/entry/{app.CDb9xSXB.js → app.CAn3fZgZ.js} +2 -2
  9. package/studio-dist/client/_app/immutable/entry/start.DxHadWyO.js +1 -0
  10. package/studio-dist/client/_app/immutable/nodes/{0.DmwZ4MH6.js → 0.DPKG0nUt.js} +1 -1
  11. package/studio-dist/client/_app/immutable/nodes/{1.CbZAgmHf.js → 1.C5hwmzhS.js} +1 -1
  12. package/studio-dist/client/_app/immutable/nodes/{15.wBuo5iNk.js → 15.CkAQwL0m.js} +1 -1
  13. package/studio-dist/client/_app/immutable/nodes/{16.C47JCimD.js → 16.Bd_23uIv.js} +1 -1
  14. package/studio-dist/client/_app/immutable/nodes/{17.BjhF9KAx.js → 17.CtZyGphA.js} +1 -1
  15. package/studio-dist/client/_app/immutable/nodes/{18.Djh3lhY9.js → 18.CIOnp98T.js} +1 -1
  16. package/studio-dist/client/_app/immutable/nodes/{20.CwnrczxV.js → 20.Ba5DRAxg.js} +2 -2
  17. package/studio-dist/client/_app/immutable/nodes/{24.BQKbb5WT.js → 24.8bVX9Vmh.js} +1 -1
  18. package/studio-dist/client/_app/immutable/nodes/25.bGZTIjlV.js +39 -0
  19. package/studio-dist/client/_app/immutable/nodes/{26.nFuHqxaJ.js → 26.fZumF6nO.js} +1 -1
  20. package/studio-dist/client/_app/immutable/nodes/{3.D_6aBKvc.js → 3.pmT0DBeN.js} +1 -1
  21. package/studio-dist/client/_app/version.json +1 -1
  22. package/studio-dist/server/chunks/{0-vjch56-n.js → 0-BM8t6VtI.js} +3 -3
  23. package/studio-dist/server/chunks/1-CdIGyFBZ.js +9 -0
  24. package/studio-dist/server/chunks/{15-C9HwOcSa.js → 15-CFHLKUmW.js} +3 -3
  25. package/studio-dist/server/chunks/{16-DQqoCUqK.js → 16-tfoYc0dp.js} +3 -3
  26. package/studio-dist/server/chunks/{17-3LCRxDqM.js → 17-C_IrYgVa.js} +3 -3
  27. package/studio-dist/server/chunks/{18-ZUaS_hBx.js → 18-BN7k6H6T.js} +3 -3
  28. package/studio-dist/server/chunks/{20-D931egaz.js → 20-zMbfOrDH.js} +3 -3
  29. package/studio-dist/server/chunks/{24-BG9eedp9.js → 24-CeL43Zy5.js} +3 -3
  30. package/studio-dist/server/chunks/{25-DOoUJSYV.js → 25-x4Xarpc5.js} +4 -4
  31. package/studio-dist/server/chunks/{26-DSSiAKpr.js → 26-BtHN2PS0.js} +3 -3
  32. package/studio-dist/server/chunks/{3-hSo_-ZkG.js → 3-CtS2Tb9q.js} +5 -6
  33. package/studio-dist/server/chunks/{_layout.svelte-B32IA7ZX.js → _layout.svelte-CvTfh8wi.js} +4 -4
  34. package/studio-dist/server/chunks/{_page.svelte-DHsY_ctP.js → _page.svelte-B5rNNTgb.js} +6 -6
  35. package/studio-dist/server/chunks/{_page.svelte-DWZBiox6.js → _page.svelte-BXtuVcSb.js} +3 -3
  36. package/studio-dist/server/chunks/{_page.svelte-Ba1a1usk.js → _page.svelte-BmmYIPYK.js} +3 -3
  37. package/studio-dist/server/chunks/{_page.svelte-Chmz6zsT.js → _page.svelte-C9sPd8Bb.js} +5 -5
  38. package/studio-dist/server/chunks/{_page.svelte-CZjAFH27.js → _page.svelte-CCvfJcoQ.js} +4 -4
  39. package/studio-dist/server/chunks/{_page.svelte-DBJJCQo7.js → _page.svelte-C_tWaWK8.js} +3 -3
  40. package/studio-dist/server/chunks/{_page.svelte-mzmRYONT.js → _page.svelte-D6Dzqvn1.js} +3 -3
  41. package/studio-dist/server/chunks/{_page.svelte-Bm0f41-_.js → _page.svelte-DRNt1JOo.js} +3 -3
  42. package/studio-dist/server/chunks/{_page.svelte-C22zXmaw.js → _page.svelte-DdSAHPFQ.js} +3 -3
  43. package/studio-dist/server/chunks/{_server.ts-857DZpFq.js → _server.ts-BfTazvMM.js} +3 -3
  44. package/studio-dist/server/chunks/{_server.ts-DY7BwZCv.js → _server.ts-BhoAYR43.js} +3 -4
  45. package/studio-dist/server/chunks/{_server.ts-Dznqw6Dg.js → _server.ts-CyXruf03.js} +2 -3
  46. package/studio-dist/server/chunks/{_server.ts-B0uoay97.js → _server.ts-D64WqH4h.js} +3 -4
  47. package/studio-dist/server/chunks/{_server.ts-DbCTW2zU.js → _server.ts-DTjKmh4V.js} +2 -2
  48. package/studio-dist/server/chunks/{_server.ts-B8dTbPHd.js → _server.ts-DUgUi5r_.js} +2 -3
  49. package/studio-dist/server/chunks/{_server.ts-NTIieN0a.js → _server.ts-DUl6nxe3.js} +3 -3
  50. package/studio-dist/server/chunks/{_server.ts-C0NSDBLN.js → _server.ts-Js54BBh9.js} +3 -3
  51. package/studio-dist/server/chunks/{_server.ts-BRiXaP9H.js → _server.ts-eLwAnREE.js} +3 -3
  52. package/studio-dist/server/chunks/{brain-xt_NeshR.js → brain-DLXOLooR.js} +2 -2
  53. package/studio-dist/server/chunks/{client-gY0nReMr.js → client-LLdiye3o.js} +2 -2
  54. package/studio-dist/server/chunks/{dist-COXvVhUI.js → dist-BvU7NTCZ.js} +273 -4
  55. package/studio-dist/server/chunks/{error.svelte-Cxqdej2M.js → error.svelte-Vdi9HF4O.js} +3 -3
  56. package/studio-dist/server/chunks/{http-DppxZNjA.js → http-j9xEUElI.js} +2 -2
  57. package/studio-dist/server/chunks/{internal-B37hM6pZ.js → internal-D5m7h-oY.js} +2 -2
  58. package/studio-dist/server/chunks/{src-D2rW9bIF.js → src-RK_h29uK.js} +246 -118
  59. package/studio-dist/server/chunks/{stores-CcPrpDAd.js → stores-rkKr99O6.js} +2 -2
  60. package/studio-dist/server/index.js +1 -1
  61. package/studio-dist/server/manifest.js +21 -21
  62. package/templates/cleoos-hub/pi-extensions/cant-bridge.ts +19 -5
  63. package/studio-dist/client/_app/immutable/chunks/VFZdBmKC.js +0 -1
  64. package/studio-dist/client/_app/immutable/entry/start.D8N5rFEm.js +0 -1
  65. package/studio-dist/client/_app/immutable/nodes/25.BGh7sgtH.js +0 -39
  66. package/studio-dist/server/chunks/1-CvAHWFP_.js +0 -9
@@ -1,11 +1,11 @@
1
1
  import { x as head, p as escape_html, j as ensure_array_like, w as derived, m as attr_class } from './dev-Br5zieNA.js';
2
- import { g as goto } from './client-gY0nReMr.js';
2
+ import { g as goto } from './client-LLdiye3o.js';
3
3
  import { a as Breadcrumb, C as Card } from './Tabs-DQKDflnT.js';
4
4
  import { E as EmptyState } from './ui-CkQ-pCs3.js';
5
5
  import { C as CosmosRenderer, m as mapNexusRelationToEdgeKind } from './nexus-adapter-D1ryYG1Z.js';
6
6
  import './index-server-BgfA6C0S.js';
7
7
  import 'node:module';
8
- import './internal-B37hM6pZ.js';
8
+ import './internal-D5m7h-oY.js';
9
9
  import './utils-g564cUMV.js';
10
10
  import './cluster-label-layer-CysRMvhi.js';
11
11
  import './no-face-up-B_3h6Hgs.js';
@@ -176,4 +176,4 @@ function _page($$renderer, $$props) {
176
176
  }
177
177
 
178
178
  export { _page as default };
179
- //# sourceMappingURL=_page.svelte-mzmRYONT.js.map
179
+ //# sourceMappingURL=_page.svelte-D6Dzqvn1.js.map
@@ -1,12 +1,12 @@
1
1
  import { x as head, p as escape_html, m as attr_class, j as ensure_array_like, k as attr, t as attr_style, w as derived } from './dev-Br5zieNA.js';
2
- import { g as goto } from './client-gY0nReMr.js';
2
+ import { g as goto } from './client-LLdiye3o.js';
3
3
  import { a as Breadcrumb, C as Card, T as Tabs } from './Tabs-DQKDflnT.js';
4
4
  import { c as TabPanel } from './ui-CkQ-pCs3.js';
5
5
  import { d as describeEdgeKind, E as EDGE_STYLE } from './no-face-up-B_3h6Hgs.js';
6
6
  import { C as CosmosRenderer, m as mapNexusRelationToEdgeKind } from './nexus-adapter-D1ryYG1Z.js';
7
7
  import './index-server-BgfA6C0S.js';
8
8
  import 'node:module';
9
- import './internal-B37hM6pZ.js';
9
+ import './internal-D5m7h-oY.js';
10
10
  import './utils-g564cUMV.js';
11
11
  import './cluster-label-layer-CysRMvhi.js';
12
12
 
@@ -229,4 +229,4 @@ function _page($$renderer, $$props) {
229
229
  }
230
230
 
231
231
  export { _page as default };
232
- //# sourceMappingURL=_page.svelte-Bm0f41-_.js.map
232
+ //# sourceMappingURL=_page.svelte-DRNt1JOo.js.map
@@ -1,11 +1,11 @@
1
1
  import { o as onDestroy } from './index-server-BgfA6C0S.js';
2
2
  import { t as attr_style, v as stringify, x as head, p as escape_html, k as attr, m as attr_class, j as ensure_array_like, y as bind_props, w as derived } from './dev-Br5zieNA.js';
3
- import './client-gY0nReMr.js';
3
+ import './client-LLdiye3o.js';
4
4
  import { a as Breadcrumb, B as Badge, T as Tabs, C as Card, I as IconButton } from './Tabs-DQKDflnT.js';
5
5
  import './cluster-label-layer-CysRMvhi.js';
6
6
  import { H as Hover_label, r as resolveEdgeStyleForWebGL, A as ALL_EDGE_KINDS, d as describeEdgeKind, E as EDGE_STYLE } from './no-face-up-B_3h6Hgs.js';
7
7
  import 'node:module';
8
- import './internal-B37hM6pZ.js';
8
+ import './internal-D5m7h-oY.js';
9
9
  import './utils-g564cUMV.js';
10
10
 
11
11
  //#region src/lib/graph/types.ts
@@ -1159,4 +1159,4 @@ function _page($$renderer, $$props) {
1159
1159
  }
1160
1160
 
1161
1161
  export { _page as default };
1162
- //# sourceMappingURL=_page.svelte-C22zXmaw.js.map
1162
+ //# sourceMappingURL=_page.svelte-DdSAHPFQ.js.map
@@ -1,7 +1,7 @@
1
- import { c as createSseStream, S as SSE_HEADERS } from './http-DppxZNjA.js';
1
+ import { c as createSseStream, S as SSE_HEADERS } from './http-j9xEUElI.js';
2
2
  import { metrics } from '@cleocode/core';
3
3
  import { listSessions } from '@cleocode/core/sessions';
4
- import './dist-COXvVhUI.js';
4
+ import './dist-BvU7NTCZ.js';
5
5
  import 'node:fs';
6
6
  import 'node:path';
7
7
  import 'path';
@@ -139,4 +139,4 @@ var GET = ({ locals, params, request }) => {
139
139
  };
140
140
 
141
141
  export { GET };
142
- //# sourceMappingURL=_server.ts-857DZpFq.js.map
142
+ //# sourceMappingURL=_server.ts-BfTazvMM.js.map
@@ -1,12 +1,11 @@
1
1
  import { j as json } from './exports-Dg-gdPPq.js';
2
- import { g as getAllSubstrates } from './src-D2rW9bIF.js';
3
- import { g as getCachedGraph, b as buildCacheKey, r as recordBrainLoadDuration, a as getBrainCacheMetrics, s as setCachedGraph } from './brain-xt_NeshR.js';
2
+ import { g as getAllSubstrates } from './src-RK_h29uK.js';
3
+ import { g as getCachedGraph, b as buildCacheKey, r as recordBrainLoadDuration, a as getBrainCacheMetrics, s as setCachedGraph } from './brain-DLXOLooR.js';
4
4
  import './utils-g564cUMV.js';
5
5
  import 'node:module';
6
6
  import 'node:fs';
7
7
  import 'node:path';
8
8
  import '@cleocode/core/store/sqlite-pragmas.js';
9
- import 'node:child_process';
10
9
  import 'node:crypto';
11
10
  import 'node:os';
12
11
  import 'node:process';
@@ -108,4 +107,4 @@ var GET = ({ locals, url }) => {
108
107
  };
109
108
 
110
109
  export { GET };
111
- //# sourceMappingURL=_server.ts-DY7BwZCv.js.map
110
+ //# sourceMappingURL=_server.ts-BhoAYR43.js.map
@@ -1,11 +1,10 @@
1
1
  import { j as json } from './exports-Dg-gdPPq.js';
2
- import { g as getAllSubstrates } from './src-D2rW9bIF.js';
2
+ import { g as getAllSubstrates } from './src-RK_h29uK.js';
3
3
  import './utils-g564cUMV.js';
4
4
  import 'node:module';
5
5
  import 'node:fs';
6
6
  import 'node:path';
7
7
  import '@cleocode/core/store/sqlite-pragmas.js';
8
- import 'node:child_process';
9
8
  import 'node:crypto';
10
9
  import 'node:os';
11
10
  import 'node:process';
@@ -56,4 +55,4 @@ var GET = ({ locals, params }) => {
56
55
  };
57
56
 
58
57
  export { GET };
59
- //# sourceMappingURL=_server.ts-Dznqw6Dg.js.map
58
+ //# sourceMappingURL=_server.ts-CyXruf03.js.map
@@ -1,10 +1,9 @@
1
- import { g as getAllSubstrates } from './src-D2rW9bIF.js';
2
- import { r as recordBrainLoadDuration } from './brain-xt_NeshR.js';
1
+ import { g as getAllSubstrates } from './src-RK_h29uK.js';
2
+ import { r as recordBrainLoadDuration } from './brain-DLXOLooR.js';
3
3
  import 'node:module';
4
4
  import 'node:fs';
5
5
  import 'node:path';
6
6
  import '@cleocode/core/store/sqlite-pragmas.js';
7
- import 'node:child_process';
8
7
  import 'node:crypto';
9
8
  import 'node:os';
10
9
  import 'node:process';
@@ -114,4 +113,4 @@ var GET = ({ locals, url }) => {
114
113
  };
115
114
 
116
115
  export { GET };
117
- //# sourceMappingURL=_server.ts-B0uoay97.js.map
116
+ //# sourceMappingURL=_server.ts-D64WqH4h.js.map
@@ -12,7 +12,7 @@ import '@cleocode/core';
12
12
  import '@cleocode/core/store/open-cleo-db';
13
13
 
14
14
  //#region package.json
15
- var version = "2026.9.20";
15
+ var version = "2026.9.21";
16
16
  //#endregion
17
17
  //#region src/routes/api/health/+server.ts
18
18
  /**
@@ -119,4 +119,4 @@ var GET = ({ locals }) => {
119
119
  };
120
120
 
121
121
  export { GET };
122
- //# sourceMappingURL=_server.ts-DbCTW2zU.js.map
122
+ //# sourceMappingURL=_server.ts-DTjKmh4V.js.map
@@ -1,11 +1,10 @@
1
1
  import { j as json } from './exports-Dg-gdPPq.js';
2
- import { g as getAllSubstrates } from './src-D2rW9bIF.js';
2
+ import { g as getAllSubstrates } from './src-RK_h29uK.js';
3
3
  import './utils-g564cUMV.js';
4
4
  import 'node:module';
5
5
  import 'node:fs';
6
6
  import 'node:path';
7
7
  import '@cleocode/core/store/sqlite-pragmas.js';
8
- import 'node:child_process';
9
8
  import 'node:crypto';
10
9
  import 'node:os';
11
10
  import 'node:process';
@@ -55,4 +54,4 @@ var GET = ({ locals, params, url }) => {
55
54
  };
56
55
 
57
56
  export { GET };
58
- //# sourceMappingURL=_server.ts-B8dTbPHd.js.map
57
+ //# sourceMappingURL=_server.ts-DUgUi5r_.js.map
@@ -1,6 +1,6 @@
1
- import { c as createSseStream, S as SSE_HEADERS } from './http-DppxZNjA.js';
1
+ import { c as createSseStream, S as SSE_HEADERS } from './http-j9xEUElI.js';
2
2
  import { g as getTasksDb } from './connections2-DHVs5ytW.js';
3
- import './dist-COXvVhUI.js';
3
+ import './dist-BvU7NTCZ.js';
4
4
  import 'node:fs';
5
5
  import 'node:path';
6
6
  import '@cleocode/core';
@@ -64,4 +64,4 @@ var GET = ({ locals, request }) => {
64
64
  };
65
65
 
66
66
  export { GET };
67
- //# sourceMappingURL=_server.ts-NTIieN0a.js.map
67
+ //# sourceMappingURL=_server.ts-DUl6nxe3.js.map
@@ -1,6 +1,6 @@
1
- import { c as createSseStream, S as SSE_HEADERS, e as encodeSseFrame } from './http-DppxZNjA.js';
1
+ import { c as createSseStream, S as SSE_HEADERS, e as encodeSseFrame } from './http-j9xEUElI.js';
2
2
  import { a as getBrainDb, g as getTasksDb, c as getConduitDb } from './connections2-DHVs5ytW.js';
3
- import './dist-COXvVhUI.js';
3
+ import './dist-BvU7NTCZ.js';
4
4
  import 'node:fs';
5
5
  import 'node:path';
6
6
  import '@cleocode/core';
@@ -274,4 +274,4 @@ var GET = ({ locals, request }) => {
274
274
  };
275
275
 
276
276
  export { GET };
277
- //# sourceMappingURL=_server.ts-C0NSDBLN.js.map
277
+ //# sourceMappingURL=_server.ts-Js54BBh9.js.map
@@ -1,8 +1,8 @@
1
- import { c as createSseStream, S as SSE_HEADERS, a as encodeStreamEvent } from './http-DppxZNjA.js';
1
+ import { c as createSseStream, S as SSE_HEADERS, a as encodeStreamEvent } from './http-j9xEUElI.js';
2
2
  import { c as resolveGatewayBaseUrl } from './_dispatch-DTWViLGL.js';
3
3
  import { getTaskAccessor } from '@cleocode/core/store/data-accessor';
4
4
  import { listTasks } from '@cleocode/core/tasks/list';
5
- import './dist-COXvVhUI.js';
5
+ import './dist-BvU7NTCZ.js';
6
6
  import 'node:fs';
7
7
  import 'node:path';
8
8
  import '@cleocode/core';
@@ -134,4 +134,4 @@ var GET = async ({ locals, url, request }) => {
134
134
  };
135
135
 
136
136
  export { GET };
137
- //# sourceMappingURL=_server.ts-BRiXaP9H.js.map
137
+ //# sourceMappingURL=_server.ts-eLwAnREE.js.map
@@ -1,4 +1,4 @@
1
- import './src-D2rW9bIF.js';
1
+ import './src-RK_h29uK.js';
2
2
 
3
3
  //#region src/lib/server/brain/cache.ts
4
4
  /** Maximum number of cache entries before oldest is evicted. */
@@ -158,4 +158,4 @@ function recordBrainLoadDuration(tier, durationMs) {
158
158
  }
159
159
 
160
160
  export { getBrainCacheMetrics as a, buildCacheKey as b, getCachedGraph as g, recordBrainLoadDuration as r, setCachedGraph as s };
161
- //# sourceMappingURL=brain-xt_NeshR.js.map
161
+ //# sourceMappingURL=brain-DLXOLooR.js.map
@@ -1,5 +1,5 @@
1
1
  import { i as index_server_exports } from './index-server-BgfA6C0S.js';
2
- import './internal-B37hM6pZ.js';
2
+ import './internal-D5m7h-oY.js';
3
3
  import './utils-g564cUMV.js';
4
4
  import { n as noop } from './dev-Br5zieNA.js';
5
5
 
@@ -42,4 +42,4 @@ function goto(url, opts = {}) {
42
42
  }
43
43
 
44
44
  export { goto as g };
45
- //# sourceMappingURL=client-gY0nReMr.js.map
45
+ //# sourceMappingURL=client-LLdiye3o.js.map
@@ -3539,6 +3539,9 @@ var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
3539
3539
  $ZodURL.init(inst, def);
3540
3540
  ZodStringFormat.init(inst, def);
3541
3541
  });
3542
+ function url(params) {
3543
+ return /* @__PURE__ */ _url(ZodURL, params);
3544
+ }
3542
3545
  var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
3543
3546
  $ZodEmoji.init(inst, def);
3544
3547
  ZodStringFormat.init(inst, def);
@@ -4019,6 +4022,19 @@ function refine(fn, _params = {}) {
4019
4022
  function superRefine(fn) {
4020
4023
  return /* @__PURE__ */ _superRefine(fn);
4021
4024
  }
4025
+ function json(params) {
4026
+ const jsonSchema = lazy(() => {
4027
+ return union([
4028
+ string(params),
4029
+ number(),
4030
+ boolean(),
4031
+ _null(),
4032
+ array(jsonSchema),
4033
+ record(string(), jsonSchema)
4034
+ ]);
4035
+ });
4036
+ return jsonSchema;
4037
+ }
4022
4038
  //#endregion
4023
4039
  //#region ../contracts/dist/acceptance-gate-schema.js
4024
4040
  /**
@@ -4348,7 +4364,14 @@ object({
4348
4364
  code: "custom",
4349
4365
  message: "Absent input requires both null digest and size"
4350
4366
  });
4351
- }))
4367
+ })),
4368
+ tree: object({
4369
+ headSha: string().regex(/^[0-9a-f]{40}$/),
4370
+ clean: boolean(),
4371
+ cwd: string().min(1).refine((v) => !/^(?:\/|[A-Za-z]:[\\/]|\\\\)/.test(v) && !v.split(/[\\/]/).includes(".."), "Tree-relative cwd must be relative and stay inside the tree"),
4372
+ inputsHash: string().regex(/^[a-f0-9]{64}$/),
4373
+ baseSha: string().regex(/^[0-9a-f]{40}$/).optional()
4374
+ }).strict().optional()
4352
4375
  }).strict().superRefine((binding, context) => {
4353
4376
  if (new Set(binding.artifacts.map(({ path }) => path)).size !== binding.artifacts.length) context.addIssue({
4354
4377
  code: "custom",
@@ -4384,8 +4407,15 @@ object({
4384
4407
  evidence: string().optional(),
4385
4408
  errorMessage: string().optional(),
4386
4409
  checkedAt: string().datetime(),
4387
- checkedBy: string().min(1)
4410
+ checkedBy: string().min(1),
4411
+ source: _enum(["executed", "cache"]).optional(),
4412
+ cachedAt: string().datetime().optional()
4388
4413
  }).superRefine((result, context) => {
4414
+ if (result.source === "cache" !== (result.cachedAt !== void 0)) context.addIssue({
4415
+ code: "custom",
4416
+ path: ["cachedAt"],
4417
+ message: "A cached result carries its cache time, and only a cached result does"
4418
+ });
4389
4419
  const binding = result.binding;
4390
4420
  if (binding) {
4391
4421
  if (binding.identity.actor !== result.checkedBy) context.addIssue({
@@ -5395,6 +5425,10 @@ var tasksUpdateInputContract = {
5395
5425
  removeRelates: {
5396
5426
  type: "array",
5397
5427
  items: { type: "string" }
5428
+ },
5429
+ expectedUpdatedAt: {
5430
+ type: "string",
5431
+ minLength: 1
5398
5432
  }
5399
5433
  }
5400
5434
  },
@@ -8405,6 +8439,13 @@ var OPERATIONS = [
8405
8439
  required: false,
8406
8440
  description: "Disable automatic parent completion",
8407
8441
  cli: { flag: "no-auto-complete" }
8442
+ },
8443
+ {
8444
+ name: "expectedUpdatedAt",
8445
+ type: "string",
8446
+ required: false,
8447
+ description: "Optimistic-concurrency guard: fail with E_CONFLICT unless the task updatedAt still equals this value",
8448
+ cli: { flag: "expected-updated-at" }
8408
8449
  }
8409
8450
  ],
8410
8451
  inputSchema: tasksUpdateInputContract,
@@ -11998,6 +12039,42 @@ var OPERATIONS = [
11998
12039
  }
11999
12040
  ]
12000
12041
  },
12042
+ {
12043
+ gateway: "mutate",
12044
+ domain: "nexus",
12045
+ operation: "projects.status",
12046
+ description: "nexus.projects.status (mutate) — probe and record git state of every project location on this device (bounded, parallel; no network unless fetch)",
12047
+ tier: 1,
12048
+ idempotent: true,
12049
+ sessionRequired: false,
12050
+ requiredParams: [],
12051
+ params: [
12052
+ {
12053
+ name: "fetch",
12054
+ type: "boolean",
12055
+ required: false,
12056
+ description: "Run git fetch per location first (network; off by default)"
12057
+ },
12058
+ {
12059
+ name: "concurrency",
12060
+ type: "number",
12061
+ required: false,
12062
+ description: "Locations probed at once (default 8, max 64)"
12063
+ },
12064
+ {
12065
+ name: "timeoutMs",
12066
+ type: "number",
12067
+ required: false,
12068
+ description: "Per-location git budget in ms (default 10000; 30000 with fetch)"
12069
+ },
12070
+ {
12071
+ name: "staleAfterMs",
12072
+ type: "number",
12073
+ required: false,
12074
+ description: "A fetch older than this marks remote state stale (default 24h)"
12075
+ }
12076
+ ]
12077
+ },
12001
12078
  {
12002
12079
  gateway: "mutate",
12003
12080
  domain: "nexus",
@@ -13152,6 +13229,12 @@ var OPERATIONS = [
13152
13229
  type: "string",
13153
13230
  required: false,
13154
13231
  description: "PR base branch"
13232
+ },
13233
+ {
13234
+ name: "taskId",
13235
+ type: "string",
13236
+ required: false,
13237
+ description: "Owning task id (T####) for the PR commit subject"
13155
13238
  }
13156
13239
  ]
13157
13240
  },
@@ -13200,6 +13283,12 @@ var OPERATIONS = [
13200
13283
  type: "string",
13201
13284
  required: false,
13202
13285
  description: "PR base branch"
13286
+ },
13287
+ {
13288
+ name: "taskId",
13289
+ type: "string",
13290
+ required: false,
13291
+ description: "Owning task id (T####) for the PR commit subject"
13203
13292
  }
13204
13293
  ]
13205
13294
  },
@@ -15604,6 +15693,13 @@ var ExitCode;
15604
15693
  ExitCode[ExitCode["VALIDATION_ERROR"] = 6] = "VALIDATION_ERROR";
15605
15694
  ExitCode[ExitCode["LOCK_TIMEOUT"] = 7] = "LOCK_TIMEOUT";
15606
15695
  ExitCode[ExitCode["CONFIG_ERROR"] = 8] = "CONFIG_ERROR";
15696
+ /**
15697
+ * The project this directory resolves to was relocated by
15698
+ * `cleo project reroot`; a valid `.cleo-moved.json` tombstone names its new
15699
+ * root. Refused instead of silently creating an empty store at the old root.
15700
+ * LAFS code `E_PROJECT_MOVED`; details carry `movedTo`. @task T12558
15701
+ */
15702
+ ExitCode[ExitCode["PROJECT_MOVED"] = 9] = "PROJECT_MOVED";
15607
15703
  ExitCode[ExitCode["PARENT_NOT_FOUND"] = 10] = "PARENT_NOT_FOUND";
15608
15704
  ExitCode[ExitCode["DEPTH_EXCEEDED"] = 11] = "DEPTH_EXCEEDED";
15609
15705
  ExitCode[ExitCode["SIBLING_LIMIT"] = 12] = "SIBLING_LIMIT";
@@ -15617,6 +15713,29 @@ var ExitCode;
15617
15713
  ExitCode[ExitCode["CHECKSUM_MISMATCH"] = 20] = "CHECKSUM_MISMATCH";
15618
15714
  ExitCode[ExitCode["CONCURRENT_MODIFICATION"] = 21] = "CONCURRENT_MODIFICATION";
15619
15715
  ExitCode[ExitCode["ID_COLLISION"] = 22] = "ID_COLLISION";
15716
+ /**
15717
+ * Optimistic-concurrency version mismatch: the caller's expected task
15718
+ * version (`updatedAt`) no longer matches the stored row. LAFS code
15719
+ * `E_CONFLICT`; the error details carry the current version. @task T12503
15720
+ */
15721
+ ExitCode[ExitCode["VERSION_CONFLICT"] = 23] = "VERSION_CONFLICT";
15722
+ /**
15723
+ * A session MUTATION (end, decision, suspend-on-switch) was asked to act on
15724
+ * "the caller's session" but the caller has no bound identity: no connection
15725
+ * handle, no `CLEO_SESSION_ID` naming a real row, and no terminal binding
15726
+ * from `cleo session start` / `cleo session resume`. Guessing the newest
15727
+ * active row would act on ANOTHER agent's session, so the operation refuses.
15728
+ * LAFS code `E_SESSION_UNBOUND`. @task T12500
15729
+ */
15730
+ ExitCode[ExitCode["SESSION_UNBOUND"] = 24] = "SESSION_UNBOUND";
15731
+ /**
15732
+ * A second spawn asked for a task worktree whose per-task lock is held by a
15733
+ * live holder (session, agent, pid + process start, device, heartbeat).
15734
+ * Re-provisioning would force-remove the holder's live worktree, so the
15735
+ * spawn refuses. LAFS code `E_WORKTREE_LOCKED`; the error details name the
15736
+ * holder. @task T12506
15737
+ */
15738
+ ExitCode[ExitCode["WORKTREE_LOCKED"] = 25] = "WORKTREE_LOCKED";
15620
15739
  ExitCode[ExitCode["SESSION_EXISTS"] = 30] = "SESSION_EXISTS";
15621
15740
  ExitCode[ExitCode["SESSION_NOT_FOUND"] = 31] = "SESSION_NOT_FOUND";
15622
15741
  ExitCode[ExitCode["SCOPE_CONFLICT"] = 32] = "SCOPE_CONFLICT";
@@ -15668,6 +15787,16 @@ var ExitCode;
15668
15787
  ExitCode[ExitCode["CONTEXT_CRITICAL"] = 52] = "CONTEXT_CRITICAL";
15669
15788
  ExitCode[ExitCode["CONTEXT_EMERGENCY"] = 53] = "CONTEXT_EMERGENCY";
15670
15789
  ExitCode[ExitCode["CONTEXT_STALE"] = 54] = "CONTEXT_STALE";
15790
+ /**
15791
+ * A twin collapse (a bare legacy table folded into its prefixed twin in the
15792
+ * project `cleo.db`) could not complete: the pre-migration snapshot could
15793
+ * not be written (backup directory unusable, not enough free space) or the
15794
+ * merge failed and was rolled back. Both tables are unchanged. LAFS code
15795
+ * `E_TWIN_COLLAPSE_FAILED`; details carry the table, the cause, the
15796
+ * snapshot path and the free space needed. `cleo doctor twin-collapse`
15797
+ * reports it and `--retry` re-runs it. @task T12535
15798
+ */
15799
+ ExitCode[ExitCode["TWIN_COLLAPSE_FAILED"] = 55] = "TWIN_COLLAPSE_FAILED";
15671
15800
  ExitCode[ExitCode["PROTOCOL_MISSING"] = 60] = "PROTOCOL_MISSING";
15672
15801
  ExitCode[ExitCode["INVALID_RETURN_MESSAGE"] = 61] = "INVALID_RETURN_MESSAGE";
15673
15802
  ExitCode[ExitCode["MANIFEST_ENTRY_MISSING"] = 62] = "MANIFEST_ENTRY_MISSING";
@@ -15850,6 +15979,10 @@ discriminatedUnion("kind", [
15850
15979
  kind: literal("pr"),
15851
15980
  prNumber: number().int().positive("pr atom requires a positive integer PR number")
15852
15981
  }),
15982
+ object({
15983
+ kind: literal("ci"),
15984
+ prNumber: number().int().positive("ci atom requires a positive integer PR number")
15985
+ }),
15853
15986
  object({
15854
15987
  kind: literal("loc-drop"),
15855
15988
  fromLines: number().int().nonnegative("loc-drop fromLines must be ≥ 0"),
@@ -17531,10 +17664,12 @@ var IMPACT = [
17531
17664
  "patch"
17532
17665
  ];
17533
17666
  /**
17534
- * Source attribution for resolved tool commands. Mirrors ADR-061 §1 surfaces.
17667
+ * Source attribution for resolved tool commands. Mirrors ADR-061 §1 surfaces;
17668
+ * `package-script` is a project `package.json` script (T12633).
17535
17669
  */
17536
17670
  var RESOLVED_SOURCE = [
17537
17671
  "project-context",
17672
+ "package-script",
17538
17673
  "language-default",
17539
17674
  "legacy-alias"
17540
17675
  ];
@@ -18743,6 +18878,140 @@ discriminatedUnion("verdict", [object({
18743
18878
  rejectedAt: string().min(1),
18744
18879
  schemaVersion: literal("1")
18745
18880
  })]);
18881
+ //#endregion
18882
+ //#region ../contracts/dist/decide.js
18883
+ /**
18884
+ * Typed-decision contracts — provider-neutral domain types and zod schemas.
18885
+ *
18886
+ * A *typed decision* asks a decision model a set of named questions about a
18887
+ * piece of state and receives, for every question, a calibrated probability
18888
+ * distribution over the admissible answers plus a confidence score. Three
18889
+ * question shapes exist:
18890
+ *
18891
+ * - `noul` — a yes/no question; the answer is a probability that it holds.
18892
+ * - `choice` — pick one of several named options.
18893
+ * - `score` — place the state on an ordered scale of 2–10 levels.
18894
+ *
18895
+ * These types describe the DOMAIN, not any one vendor's wire format. Provider
18896
+ * adapters (in `packages/core/`) translate between these shapes and their
18897
+ * transport; nothing here names a provider.
18898
+ *
18899
+ * This file is types + zod schemas + const data only (arch gate 10,
18900
+ * `scripts/lint-no-runtime-in-contracts.mjs`). Validation entry points are the
18901
+ * exported `*Schema` values; call `.parse()` / `.safeParse()` on them.
18902
+ *
18903
+ * @task T12489
18904
+ * @epic T12486
18905
+ */
18906
+ /** Every supported decision-question shape, in canonical order. */
18907
+ var DECISION_QUESTION_TYPES = [
18908
+ "noul",
18909
+ "choice",
18910
+ "score"
18911
+ ];
18912
+ /**
18913
+ * Where a {@link DecisionOutcome} came from.
18914
+ *
18915
+ * - `provider` — answered live by a decision provider.
18916
+ * - `cache` — replayed from a previously stored provider answer.
18917
+ * - `fallback` — produced locally because no provider answer was available.
18918
+ */
18919
+ var DECISION_OUTCOME_SOURCES = [
18920
+ "provider",
18921
+ "cache",
18922
+ "fallback"
18923
+ ];
18924
+ /**
18925
+ * Hard limits a {@link DecisionRequest} must respect. Enforced by
18926
+ * {@link decisionRequestSchema}.
18927
+ */
18928
+ var DECISION_REQUEST_LIMITS = {
18929
+ maxStateChars: 32e3,
18930
+ minQuestions: 1,
18931
+ maxQuestions: 32,
18932
+ minChoiceOptions: 2,
18933
+ minScoreLevels: 2,
18934
+ maxScoreLevels: 10
18935
+ };
18936
+ _enum(DECISION_QUESTION_TYPES);
18937
+ /** Zod schema for {@link DecisionOutcomeSource}. */
18938
+ var decisionOutcomeSourceSchema = _enum(DECISION_OUTCOME_SOURCES);
18939
+ /** Zod schema for {@link DecisionInstructions}. */
18940
+ var decisionInstructionsSchema = union([string(), record(string(), json())]);
18941
+ /** A probability or confidence: a finite number in [0, 1]. */
18942
+ var unitIntervalSchema = number().min(0).max(1);
18943
+ /**
18944
+ * Zod schema for {@link DecisionState}. Rejects a state whose size exceeds
18945
+ * {@link DECISION_REQUEST_LIMITS.maxStateChars} (serialized size for
18946
+ * structured state).
18947
+ */
18948
+ var decisionStateSchema = union([
18949
+ string(),
18950
+ array(json()),
18951
+ record(string(), json())
18952
+ ]).superRefine((state, context) => {
18953
+ const size = typeof state === "string" ? state.length : JSON.stringify(state).length;
18954
+ if (size > DECISION_REQUEST_LIMITS.maxStateChars) context.addIssue({
18955
+ code: "custom",
18956
+ message: `state is ${size} characters; the limit is ${DECISION_REQUEST_LIMITS.maxStateChars}`
18957
+ });
18958
+ });
18959
+ /** Zod discriminated-union schema for {@link DecisionQuestion}. */
18960
+ var decisionQuestionSchema = discriminatedUnion("type", [
18961
+ object({
18962
+ type: literal("noul"),
18963
+ instructions: decisionInstructionsSchema.optional(),
18964
+ criteria: string().min(1)
18965
+ }),
18966
+ object({
18967
+ type: literal("choice"),
18968
+ instructions: decisionInstructionsSchema.optional(),
18969
+ criteria: record(string().min(1), string()).refine((options) => Object.keys(options).length >= DECISION_REQUEST_LIMITS.minChoiceOptions, { message: `a choice question needs at least ${DECISION_REQUEST_LIMITS.minChoiceOptions} options` })
18970
+ }),
18971
+ object({
18972
+ type: literal("score"),
18973
+ instructions: decisionInstructionsSchema.optional(),
18974
+ criteria: array(string()).min(DECISION_REQUEST_LIMITS.minScoreLevels).max(DECISION_REQUEST_LIMITS.maxScoreLevels)
18975
+ })
18976
+ ]);
18977
+ object({
18978
+ model: string().min(1).optional(),
18979
+ state: decisionStateSchema,
18980
+ questions: record(string().min(1), decisionQuestionSchema).refine((questions) => {
18981
+ const count = Object.keys(questions).length;
18982
+ return count >= DECISION_REQUEST_LIMITS.minQuestions && count <= DECISION_REQUEST_LIMITS.maxQuestions;
18983
+ }, { message: `a request needs ${DECISION_REQUEST_LIMITS.minQuestions}–${DECISION_REQUEST_LIMITS.maxQuestions} questions` })
18984
+ });
18985
+ /** Zod discriminated-union schema for {@link DecisionAnswer}. */
18986
+ var decisionAnswerSchema = discriminatedUnion("type", [
18987
+ object({
18988
+ type: literal("noul"),
18989
+ value: boolean(),
18990
+ probability: unitIntervalSchema,
18991
+ confidence: unitIntervalSchema
18992
+ }),
18993
+ object({
18994
+ type: literal("choice"),
18995
+ value: string().min(1),
18996
+ probabilities: record(string().min(1), unitIntervalSchema),
18997
+ confidence: unitIntervalSchema
18998
+ }),
18999
+ object({
19000
+ type: literal("score"),
19001
+ value: number().int().nonnegative(),
19002
+ probabilities: array(unitIntervalSchema).min(DECISION_REQUEST_LIMITS.minScoreLevels).max(DECISION_REQUEST_LIMITS.maxScoreLevels),
19003
+ confidence: unitIntervalSchema
19004
+ })
19005
+ ]);
19006
+ object({
19007
+ answers: record(string().min(1), decisionAnswerSchema),
19008
+ source: decisionOutcomeSourceSchema,
19009
+ requestId: string().min(1).optional(),
19010
+ latencyMs: number().nonnegative(),
19011
+ costUsd: number().nonnegative().optional(),
19012
+ inputTokens: number().int().nonnegative().optional()
19013
+ });
19014
+ object({ baseUrl: url() });
18746
19015
 
18747
19016
  export { OPERATIONS as O, TASK_STATUSES as T };
18748
- //# sourceMappingURL=dist-COXvVhUI.js.map
19017
+ //# sourceMappingURL=dist-BvU7NTCZ.js.map
@@ -1,8 +1,8 @@
1
1
  import { g as getContext, p as escape_html } from './dev-Br5zieNA.js';
2
2
  import 'node:module';
3
- import './client-gY0nReMr.js';
3
+ import './client-LLdiye3o.js';
4
4
  import './index-server-BgfA6C0S.js';
5
- import './internal-B37hM6pZ.js';
5
+ import './internal-D5m7h-oY.js';
6
6
  import './utils-g564cUMV.js';
7
7
 
8
8
  //#endregion
@@ -65,4 +65,4 @@ function Error$1($$renderer, $$props) {
65
65
  }
66
66
 
67
67
  export { Error$1 as default };
68
- //# sourceMappingURL=error.svelte-Cxqdej2M.js.map
68
+ //# sourceMappingURL=error.svelte-Vdi9HF4O.js.map
@@ -1,4 +1,4 @@
1
- import { O as OPERATIONS$1 } from './dist-COXvVhUI.js';
1
+ import { O as OPERATIONS$1 } from './dist-BvU7NTCZ.js';
2
2
  import '@cleocode/core';
3
3
  import 'path';
4
4
 
@@ -107,4 +107,4 @@ function createSseStream(source, signal) {
107
107
  }
108
108
 
109
109
  export { SSE_HEADERS as S, encodeStreamEvent as a, createSseStream as c, encodeSseFrame as e };
110
- //# sourceMappingURL=http-DppxZNjA.js.map
110
+ //# sourceMappingURL=http-j9xEUElI.js.map