@cleocode/cleo 2026.9.22 → 2026.9.24

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 (91) hide show
  1. package/dist/cli/index.js +2051 -504
  2. package/package.json +13 -13
  3. package/studio-dist/client/_app/immutable/chunks/{BzdFEK5o.js → BeSHW-PI.js} +1 -1
  4. package/studio-dist/client/_app/immutable/chunks/BmmibeAn.js +1 -0
  5. package/studio-dist/client/_app/immutable/chunks/{0tcsbE6D.js → CqxUYDwj.js} +1 -1
  6. package/studio-dist/client/_app/immutable/chunks/{BKjRqkYg.js → iXXfYtUd.js} +1 -1
  7. package/studio-dist/client/_app/immutable/entry/{app.CT-LXuds.js → app.D0MhB1gq.js} +2 -2
  8. package/studio-dist/client/_app/immutable/entry/start.Z2uJ5V0K.js +1 -0
  9. package/studio-dist/client/_app/immutable/nodes/{0.CJNVG-lR.js → 0.CPm_3d_8.js} +1 -1
  10. package/studio-dist/client/_app/immutable/nodes/{1.C7ULqnrP.js → 1.kD8K_ebT.js} +1 -1
  11. package/studio-dist/client/_app/immutable/nodes/{15.BNOT6L5f.js → 15.WEaAYVEy.js} +1 -1
  12. package/studio-dist/client/_app/immutable/nodes/{16.D5aa4hwV.js → 16.SxplBCYx.js} +1 -1
  13. package/studio-dist/client/_app/immutable/nodes/{17.WSqtVr_-.js → 17.HawOwgFr.js} +1 -1
  14. package/studio-dist/client/_app/immutable/nodes/{18.Lyg3PWST.js → 18.CU1uc6aV.js} +1 -1
  15. package/studio-dist/client/_app/immutable/nodes/{20.zTYVKImv.js → 20.Dj3In1mD.js} +1 -1
  16. package/studio-dist/client/_app/immutable/nodes/{24.B2cU3PXS.js → 24.BABzil92.js} +1 -1
  17. package/studio-dist/client/_app/immutable/nodes/25.K9V1t9FS.js +39 -0
  18. package/studio-dist/client/_app/immutable/nodes/{26.eXqGXEyv.js → 26.Ber4zDmK.js} +1 -1
  19. package/studio-dist/client/_app/immutable/nodes/{3.C5vwxSyN.js → 3.CDH1-JKn.js} +1 -1
  20. package/studio-dist/client/_app/version.json +1 -1
  21. package/studio-dist/server/chunks/{0-g-9QBgTv.js → 0-CzucydBz.js} +5 -4
  22. package/studio-dist/server/chunks/1-BgfY0ktP.js +9 -0
  23. package/studio-dist/server/chunks/{15-5CTacdmx.js → 15-B36yiClS.js} +3 -3
  24. package/studio-dist/server/chunks/{16-DIJruZT8.js → 16-TEN2Xs7g.js} +3 -3
  25. package/studio-dist/server/chunks/{17-yv-WCUot.js → 17-CDqPwV0A.js} +5 -4
  26. package/studio-dist/server/chunks/{18-qo45V8TJ.js → 18-C9SojWQi.js} +3 -3
  27. package/studio-dist/server/chunks/{2-DXSVVaej.js → 2-DQaIET_o.js} +3 -2
  28. package/studio-dist/server/chunks/{20-BImtok4E.js → 20-D2rDiJCy.js} +5 -4
  29. package/studio-dist/server/chunks/{23-CZpFrGp4.js → 23-D194DGVi.js} +6 -4
  30. package/studio-dist/server/chunks/{24-JR2XU8Zk.js → 24-DFin4XEU.js} +8 -6
  31. package/studio-dist/server/chunks/{25-FQ-ABq7g.js → 25-byalahiX.js} +7 -6
  32. package/studio-dist/server/chunks/{26-C0EfiL70.js → 26-BctSc53D.js} +5 -4
  33. package/studio-dist/server/chunks/{29-6pjLM0Z1.js → 29-d_lZvJg3.js} +3 -2
  34. package/studio-dist/server/chunks/{3-YulKrPK4.js → 3-u3g5-V70.js} +5 -5
  35. package/studio-dist/server/chunks/{30-Dw317sSW.js → 30-BHsj4oeh.js} +3 -2
  36. package/studio-dist/server/chunks/{_layout.svelte-DFY_t32i.js → _layout.svelte-BkWa8zMq.js} +4 -4
  37. package/studio-dist/server/chunks/{_page.svelte-DbctFR26.js → _page.svelte-Balyz5No.js} +3 -3
  38. package/studio-dist/server/chunks/{_page.svelte-BKGofZjs.js → _page.svelte-CEoJA3np.js} +3 -3
  39. package/studio-dist/server/chunks/{_page.svelte-DLPbtByz.js → _page.svelte-ClYQv-J6.js} +5 -5
  40. package/studio-dist/server/chunks/{_page.svelte-DoMZFgyT.js → _page.svelte-D1GgG_0J.js} +3 -3
  41. package/studio-dist/server/chunks/{_page.svelte-Drj7fNS_.js → _page.svelte-D1ImKwNa.js} +3 -3
  42. package/studio-dist/server/chunks/{_page.svelte-B1-qqkuN.js → _page.svelte-DdRs2eQU.js} +3 -3
  43. package/studio-dist/server/chunks/{_page.svelte-DfLMLIQh.js → _page.svelte-DdieDDqt.js} +4 -4
  44. package/studio-dist/server/chunks/{_page.svelte-BY7VnsnD.js → _page.svelte-Nf_2u2sG.js} +3 -3
  45. package/studio-dist/server/chunks/{_page.svelte-B2iUE3vx.js → _page.svelte-SpNaTPY3.js} +3 -3
  46. package/studio-dist/server/chunks/{_server.ts-BX1KvJuM.js → _server.ts-10Z9UtEP.js} +5 -4
  47. package/studio-dist/server/chunks/{_server.ts-DQiTiY3E.js → _server.ts-6A72NyG7.js} +3 -2
  48. package/studio-dist/server/chunks/{_server.ts-D8P3mren.js → _server.ts-BF8dYynr.js} +3 -3
  49. package/studio-dist/server/chunks/{_server.ts-BlYsd_GD.js → _server.ts-BFAKIrzM.js} +4 -3
  50. package/studio-dist/server/chunks/{_server.ts-C6IDM_3I.js → _server.ts-BKZlM7rp.js} +3 -2
  51. package/studio-dist/server/chunks/{_server.ts-BMYX3KLE.js → _server.ts-BNaQ_u-J.js} +5 -4
  52. package/studio-dist/server/chunks/{_server.ts-J17j25VG.js → _server.ts-BRoSUvbn.js} +3 -2
  53. package/studio-dist/server/chunks/{_server.ts-Bl9tMqwZ.js → _server.ts-Bhp29rqm.js} +4 -1
  54. package/studio-dist/server/chunks/{_server.ts--sGLmBsz.js → _server.ts-Br_GCegg.js} +3 -2
  55. package/studio-dist/server/chunks/{_server.ts-BhoAYR43.js → _server.ts-CFMss8Ec.js} +3 -3
  56. package/studio-dist/server/chunks/{_server.ts-DKFJdXPK.js → _server.ts-CFb-INiV.js} +4 -3
  57. package/studio-dist/server/chunks/{_server.ts-CyXruf03.js → _server.ts-CUDHRtqK.js} +2 -2
  58. package/studio-dist/server/chunks/{_server.ts--2m_U4SL.js → _server.ts-CVQlKiss.js} +5 -3
  59. package/studio-dist/server/chunks/{_server.ts-3LzqLzt0.js → _server.ts-CcQ0AQoo.js} +3 -2
  60. package/studio-dist/server/chunks/{_server.ts-DUgUi5r_.js → _server.ts-CmOf90SL.js} +2 -2
  61. package/studio-dist/server/chunks/{_server.ts-BA8Xdegq.js → _server.ts-CqO357sV.js} +3 -2
  62. package/studio-dist/server/chunks/{_server.ts-CeQolQOK.js → _server.ts-DAJiZh2M.js} +3 -2
  63. package/studio-dist/server/chunks/{_server.ts-C2nYqbd9.js → _server.ts-DJALLGi_.js} +3 -2
  64. package/studio-dist/server/chunks/{_server.ts-C8Z32vuL.js → _server.ts-DQ7VnW5Q.js} +3 -2
  65. package/studio-dist/server/chunks/{_server.ts-D7JwQTun.js → _server.ts-DRFQht0c.js} +3 -2
  66. package/studio-dist/server/chunks/{_server.ts-D64WqH4h.js → _server.ts-DfzvMeMr.js} +3 -3
  67. package/studio-dist/server/chunks/{_server.ts-Ba7uukQ7.js → _server.ts-DrRXPeYo.js} +3 -3
  68. package/studio-dist/server/chunks/{_server.ts-DUyeSXbV.js → _server.ts-O5iKqt5Z.js} +3 -2
  69. package/studio-dist/server/chunks/{_server.ts-D6wP5bCh.js → _server.ts-OPrTc7WI.js} +3 -2
  70. package/studio-dist/server/chunks/{_server.ts-CjJYkLJH.js → _server.ts-YrmdROs2.js} +3 -2
  71. package/studio-dist/server/chunks/{_server.ts-ChoGyX5C.js → _server.ts-ZCA_Uz1x.js} +3 -2
  72. package/studio-dist/server/chunks/{_server.ts-5euivmMj.js → _server.ts-mGj6h26U.js} +3 -2
  73. package/studio-dist/server/chunks/{brain-DLXOLooR.js → brain-4-tWVd6k.js} +2 -2
  74. package/studio-dist/server/chunks/{client-BqWu1TLm.js → client-NfsjQdjU.js} +2 -2
  75. package/studio-dist/server/chunks/{connections-CWLPjwBP.js → connections-CAJ4ZeCq.js} +3 -2
  76. package/studio-dist/server/chunks/{connections2-DHVs5ytW.js → connections2-DyYEcX2h.js} +6 -1
  77. package/studio-dist/server/chunks/{dist-DPV5iK3m.js → dist-b2dqLZbk.js} +250 -27
  78. package/studio-dist/server/chunks/{error.svelte-CvROslRV.js → error.svelte-xf-NkEuU.js} +3 -3
  79. package/studio-dist/server/chunks/{explorer-loader-B_uCSs9_.js → explorer-loader-CP09K03H.js} +2 -2
  80. package/studio-dist/server/chunks/{hooks.server-CWBRp8NI.js → hooks.server-D2qbf3Zp.js} +3 -2
  81. package/studio-dist/server/chunks/{http-BVzADggg.js → http-C8NM9yzE.js} +2 -2
  82. package/studio-dist/server/chunks/{internal-BlXMjztN.js → internal-OCcHamz2.js} +3 -3
  83. package/studio-dist/server/chunks/{project-context-BAXQmgch.js → project-context-CX-nfwL2.js} +7 -5
  84. package/studio-dist/server/chunks/{src-RK_h29uK.js → src-CeLZUrEE.js} +218 -24
  85. package/studio-dist/server/chunks/{stores-C8kmowVZ.js → stores-Dyo9kN1m.js} +2 -2
  86. package/studio-dist/server/index.js +1 -1
  87. package/studio-dist/server/manifest.js +43 -43
  88. package/studio-dist/client/_app/immutable/chunks/D2e9iItv.js +0 -1
  89. package/studio-dist/client/_app/immutable/entry/start.SG-NqdSp.js +0 -1
  90. package/studio-dist/client/_app/immutable/nodes/25.CKddYoS3.js +0 -39
  91. package/studio-dist/server/chunks/1-BkPP00YN.js +0 -9
@@ -1,7 +1,7 @@
1
- import { c as createSseStream, S as SSE_HEADERS } from './http-BVzADggg.js';
1
+ import { c as createSseStream, S as SSE_HEADERS } from './http-C8NM9yzE.js';
2
2
  import { metrics } from '@cleocode/core';
3
3
  import { listSessions } from '@cleocode/core/sessions';
4
- import './dist-DPV5iK3m.js';
4
+ import './dist-b2dqLZbk.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-Ba7uukQ7.js.map
142
+ //# sourceMappingURL=_server.ts-DrRXPeYo.js.map
@@ -1,5 +1,5 @@
1
1
  import { j as json } from './exports-Dg-gdPPq.js';
2
- import { a as getBrainDb } from './connections2-DHVs5ytW.js';
2
+ import { a as getBrainDb } from './connections2-DyYEcX2h.js';
3
3
  import './utils-g564cUMV.js';
4
4
  import './cleo-home-_XIqkZaL.js';
5
5
  import 'node:fs';
@@ -10,6 +10,7 @@ import '@cleocode/core/store/dual-scope-db';
10
10
  import 'node:module';
11
11
  import '@cleocode/core';
12
12
  import '@cleocode/core/store/open-cleo-db';
13
+ import '@cleocode/core/store/worktree-build-guard';
13
14
 
14
15
  //#region src/routes/api/v1/graph/+server.ts
15
16
  /**
@@ -131,4 +132,4 @@ var GET = ({ locals, url }) => {
131
132
  };
132
133
 
133
134
  export { GET };
134
- //# sourceMappingURL=_server.ts-DUyeSXbV.js.map
135
+ //# sourceMappingURL=_server.ts-O5iKqt5Z.js.map
@@ -1,5 +1,5 @@
1
1
  import { j as json } from './exports-Dg-gdPPq.js';
2
- import { a as getBrainDb } from './connections2-DHVs5ytW.js';
2
+ import { a as getBrainDb } from './connections2-DyYEcX2h.js';
3
3
  import { p as parseJsonBody, i as isParseError, e as err, r as requireString, a as optionalStringArray, b as optionalString, s as shortId, o as ok } from './_lafs-C3_fBF_X.js';
4
4
  import './utils-g564cUMV.js';
5
5
  import './cleo-home-_XIqkZaL.js';
@@ -11,6 +11,7 @@ import '@cleocode/core/store/dual-scope-db';
11
11
  import 'node:module';
12
12
  import '@cleocode/core';
13
13
  import '@cleocode/core/store/open-cleo-db';
14
+ import '@cleocode/core/store/worktree-build-guard';
14
15
 
15
16
  //#region src/routes/api/memory/decision-store/+server.ts
16
17
  /**
@@ -91,4 +92,4 @@ var POST = async ({ locals, request }) => {
91
92
  };
92
93
 
93
94
  export { POST };
94
- //# sourceMappingURL=_server.ts-D6wP5bCh.js.map
95
+ //# sourceMappingURL=_server.ts-OPrTc7WI.js.map
@@ -1,6 +1,6 @@
1
1
  import { j as json } from './exports-Dg-gdPPq.js';
2
2
  import { e as executeCliAction } from './cli-action-VJPEn1pY.js';
3
- import { l as listRegisteredProjects } from './project-context-BAXQmgch.js';
3
+ import { l as listRegisteredProjects } from './project-context-CX-nfwL2.js';
4
4
  import './utils-g564cUMV.js';
5
5
  import './spawn-cli-wI1lBJhm.js';
6
6
  import 'node:child_process';
@@ -12,6 +12,7 @@ import '@cleocode/core/paths.js';
12
12
  import '@cleocode/core/store/dual-scope-db';
13
13
  import '@cleocode/core';
14
14
  import '@cleocode/core/store/open-cleo-db';
15
+ import '@cleocode/core/nexus/project-activity.js';
15
16
 
16
17
  //#region src/routes/api/project/[id]/index/+server.ts
17
18
  /**
@@ -58,4 +59,4 @@ var POST = async ({ params }) => {
58
59
  };
59
60
 
60
61
  export { POST };
61
- //# sourceMappingURL=_server.ts-CjJYkLJH.js.map
62
+ //# sourceMappingURL=_server.ts-YrmdROs2.js.map
@@ -1,6 +1,6 @@
1
1
  import { j as json } from './exports-Dg-gdPPq.js';
2
2
  import { e as executeCliAction } from './cli-action-VJPEn1pY.js';
3
- import { l as listRegisteredProjects } from './project-context-BAXQmgch.js';
3
+ import { l as listRegisteredProjects } from './project-context-CX-nfwL2.js';
4
4
  import './utils-g564cUMV.js';
5
5
  import './spawn-cli-wI1lBJhm.js';
6
6
  import 'node:child_process';
@@ -12,6 +12,7 @@ import '@cleocode/core/paths.js';
12
12
  import '@cleocode/core/store/dual-scope-db';
13
13
  import '@cleocode/core';
14
14
  import '@cleocode/core/store/open-cleo-db';
15
+ import '@cleocode/core/nexus/project-activity.js';
15
16
 
16
17
  //#region src/routes/api/project/[id]/reindex/+server.ts
17
18
  /**
@@ -58,4 +59,4 @@ var POST = async ({ params }) => {
58
59
  };
59
60
 
60
61
  export { POST };
61
- //# sourceMappingURL=_server.ts-ChoGyX5C.js.map
62
+ //# sourceMappingURL=_server.ts-ZCA_Uz1x.js.map
@@ -1,5 +1,5 @@
1
1
  import { e as error, j as json } from './exports-Dg-gdPPq.js';
2
- import { s as setActiveProjectId } from './project-context-BAXQmgch.js';
2
+ import { s as setActiveProjectId } from './project-context-CX-nfwL2.js';
3
3
  import './utils-g564cUMV.js';
4
4
  import './cleo-home-_XIqkZaL.js';
5
5
  import 'node:fs';
@@ -9,6 +9,7 @@ import '@cleocode/core/paths.js';
9
9
  import '@cleocode/core/store/dual-scope-db';
10
10
  import '@cleocode/core';
11
11
  import '@cleocode/core/store/open-cleo-db';
12
+ import '@cleocode/core/nexus/project-activity.js';
12
13
 
13
14
  //#region src/routes/api/project/switch/+server.ts
14
15
  /**
@@ -35,4 +36,4 @@ var POST = async ({ request, cookies }) => {
35
36
  };
36
37
 
37
38
  export { POST };
38
- //# sourceMappingURL=_server.ts-5euivmMj.js.map
39
+ //# sourceMappingURL=_server.ts-mGj6h26U.js.map
@@ -1,4 +1,4 @@
1
- import './src-RK_h29uK.js';
1
+ import './src-CeLZUrEE.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-DLXOLooR.js.map
161
+ //# sourceMappingURL=brain-4-tWVd6k.js.map
@@ -1,5 +1,5 @@
1
1
  import { i as index_server_exports } from './index-server-BgfA6C0S.js';
2
- import './internal-BlXMjztN.js';
2
+ import './internal-OCcHamz2.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-BqWu1TLm.js.map
45
+ //# sourceMappingURL=client-NfsjQdjU.js.map
@@ -1,4 +1,4 @@
1
- import { g as getTasksDb, a as getBrainDb, b as getNexusDb } from './connections2-DHVs5ytW.js';
1
+ import { g as getTasksDb, a as getBrainDb, b as getNexusDb } from './connections2-DyYEcX2h.js';
2
2
  import './cleo-home-_XIqkZaL.js';
3
3
  import 'node:fs';
4
4
  import 'node:path';
@@ -8,8 +8,9 @@ import '@cleocode/core/store/dual-scope-db';
8
8
  import 'node:module';
9
9
  import '@cleocode/core';
10
10
  import '@cleocode/core/store/open-cleo-db';
11
+ import '@cleocode/core/store/worktree-build-guard';
11
12
 
12
13
 
13
14
 
14
15
  export { getBrainDb, getNexusDb, getTasksDb };
15
- //# sourceMappingURL=connections-CWLPjwBP.js.map
16
+ //# sourceMappingURL=connections-CAJ4ZeCq.js.map
@@ -4,6 +4,7 @@ import { existsSync } from 'node:fs';
4
4
  import { join, dirname } from 'node:path';
5
5
  import { applyPerfPragmas } from '@cleocode/core';
6
6
  import { openCleoDbSnapshot } from '@cleocode/core/store/open-cleo-db';
7
+ import { installSchemaWriteGuard } from '@cleocode/core/store/worktree-build-guard';
7
8
 
8
9
  //#region src/lib/server/db/connections.ts
9
10
  /**
@@ -34,6 +35,7 @@ function getNexusDb() {
34
35
  const path = getNexusDbPath();
35
36
  if (!dbExists(path)) return null;
36
37
  nexusDb = new DatabaseSync(path, { open: true });
38
+ installSchemaWriteGuard(nexusDb);
37
39
  applyPerfPragmas(nexusDb);
38
40
  return nexusDb;
39
41
  }
@@ -52,6 +54,7 @@ function getBrainDb(ctx) {
52
54
  const path = ctx.brainDbPath;
53
55
  if (!existsSync(path)) return null;
54
56
  const __db = new DatabaseSync(path, { open: true });
57
+ installSchemaWriteGuard(__db);
55
58
  applyPerfPragmas(__db);
56
59
  return __db;
57
60
  }
@@ -67,6 +70,7 @@ function getTasksDb(ctx) {
67
70
  const path = ctx.tasksDbPath;
68
71
  if (!existsSync(path)) return null;
69
72
  const __db = new DatabaseSync(path, { open: true });
73
+ installSchemaWriteGuard(__db);
70
74
  applyPerfPragmas(__db);
71
75
  return __db;
72
76
  }
@@ -85,6 +89,7 @@ function getConduitDb(ctx) {
85
89
  const path = join(dirname(ctx.brainDbPath), "conduit.db");
86
90
  if (!existsSync(path)) return null;
87
91
  const __db = new DatabaseSync(path, { open: true });
92
+ installSchemaWriteGuard(__db);
88
93
  applyPerfPragmas(__db);
89
94
  return __db;
90
95
  }
@@ -140,4 +145,4 @@ function withStudioReadSnapshot(dbPath, read) {
140
145
  }
141
146
 
142
147
  export { getBrainDb as a, getNexusDb as b, getConduitDb as c, getDbStatus as d, getTasksDb as g, withStudioReadSnapshot as w };
143
- //# sourceMappingURL=connections2-DHVs5ytW.js.map
148
+ //# sourceMappingURL=connections2-DyYEcX2h.js.map
@@ -4437,7 +4437,7 @@ object({
4437
4437
  "command",
4438
4438
  "lint"
4439
4439
  ].includes(result.kind);
4440
- if (executable && !binding.invocation) context.addIssue({
4440
+ if (executable && !binding.invocation && result.result !== "error") context.addIssue({
4441
4441
  code: "custom",
4442
4442
  path: ["binding", "invocation"],
4443
4443
  message: "Executable gate requires captured invocation"
@@ -6271,12 +6271,31 @@ var OPERATIONS = [
6271
6271
  gateway: "query",
6272
6272
  domain: "tasks",
6273
6273
  operation: "history",
6274
- description: "Show task work history (time tracked per task)",
6274
+ description: "Show task work history; with taskId, the task audit trail; with ranking, who changed its priority/severity/kind/depends and why (T12693)",
6275
6275
  tier: 1,
6276
6276
  idempotent: true,
6277
6277
  sessionRequired: false,
6278
6278
  requiredParams: [],
6279
- params: []
6279
+ params: [
6280
+ {
6281
+ name: "taskId",
6282
+ type: "string",
6283
+ required: false,
6284
+ description: "Task to show history for"
6285
+ },
6286
+ {
6287
+ name: "limit",
6288
+ type: "number",
6289
+ required: false,
6290
+ description: "Maximum entries"
6291
+ },
6292
+ {
6293
+ name: "ranking",
6294
+ type: "boolean",
6295
+ required: false,
6296
+ description: "Only ranking-input changes (actor, session, reason, before/after)"
6297
+ }
6298
+ ]
6280
6299
  },
6281
6300
  {
6282
6301
  gateway: "query",
@@ -8466,6 +8485,12 @@ var OPERATIONS = [
8466
8485
  required: true,
8467
8486
  description: "taskId parameter",
8468
8487
  cli: { positional: true }
8488
+ }, {
8489
+ name: "expectedUpdatedAt",
8490
+ type: "string",
8491
+ required: false,
8492
+ description: "Optimistic-concurrency guard: fail with E_CONFLICT unless the task updatedAt still equals this value",
8493
+ cli: { flag: "if-match" }
8469
8494
  }]
8470
8495
  },
8471
8496
  {
@@ -8738,6 +8763,37 @@ var OPERATIONS = [
8738
8763
  }],
8739
8764
  outputSchema: OUTPUT_CONTRACTS["tasks.assignee"]
8740
8765
  },
8766
+ {
8767
+ gateway: "mutate",
8768
+ domain: "tasks",
8769
+ operation: "ranking.revert",
8770
+ description: "tasks.ranking.revert (mutate) — undo one recorded ranking change (priority/severity/kind/depends) as a new audited change (T12693, D11161)",
8771
+ tier: 1,
8772
+ idempotent: false,
8773
+ sessionRequired: false,
8774
+ requiredParams: ["entryId"],
8775
+ params: [
8776
+ {
8777
+ name: "entryId",
8778
+ type: "string",
8779
+ required: true,
8780
+ description: "ranking_changed audit row id (cleo history ranking <taskId>)",
8781
+ cli: { positional: true }
8782
+ },
8783
+ {
8784
+ name: "reason",
8785
+ type: "string",
8786
+ required: false,
8787
+ description: "Why it is reverted"
8788
+ },
8789
+ {
8790
+ name: "force",
8791
+ type: "boolean",
8792
+ required: false,
8793
+ description: "Revert even though a field changed again since"
8794
+ }
8795
+ ]
8796
+ },
8741
8797
  {
8742
8798
  gateway: "mutate",
8743
8799
  domain: "tasks",
@@ -9037,18 +9093,34 @@ var OPERATIONS = [
9037
9093
  gateway: "mutate",
9038
9094
  domain: "tasks",
9039
9095
  operation: "start",
9040
- description: "tasks.start (mutate)",
9096
+ description: "tasks.start (mutate) — start work and take the caller session's leased claim (E_TASK_CLAIMED when another session holds it)",
9041
9097
  tier: 0,
9042
9098
  idempotent: false,
9043
9099
  sessionRequired: false,
9044
9100
  requiredParams: ["taskId"],
9045
- params: [{
9046
- name: "taskId",
9047
- type: "string",
9048
- required: true,
9049
- description: "taskId parameter",
9050
- cli: { positional: true }
9051
- }]
9101
+ params: [
9102
+ {
9103
+ name: "taskId",
9104
+ type: "string",
9105
+ required: true,
9106
+ description: "taskId parameter",
9107
+ cli: { positional: true }
9108
+ },
9109
+ {
9110
+ name: "takeOver",
9111
+ type: "boolean",
9112
+ required: false,
9113
+ description: "Take over another session's EXPIRED claim lease (audited)",
9114
+ cli: { flag: "take-over" }
9115
+ },
9116
+ {
9117
+ name: "forceClaim",
9118
+ type: "boolean",
9119
+ required: false,
9120
+ description: "Take over another session's LIVE claim lease (audited)",
9121
+ cli: { flag: "force-claim" }
9122
+ }
9123
+ ]
9052
9124
  },
9053
9125
  {
9054
9126
  gateway: "mutate",
@@ -9150,28 +9222,49 @@ var OPERATIONS = [
9150
9222
  gateway: "mutate",
9151
9223
  domain: "tasks",
9152
9224
  operation: "claim",
9153
- description: "tasks.claim (mutate) — claim a task by assigning it to the current session",
9225
+ description: "tasks.claim (mutate) — take, renew or override the caller session's leased claim on a task (never the human assignee)",
9154
9226
  tier: 0,
9155
9227
  idempotent: false,
9156
9228
  sessionRequired: true,
9157
- requiredParams: ["taskId", "agentId"],
9158
- params: [{
9159
- name: "taskId",
9160
- type: "string",
9161
- required: true,
9162
- description: "Task ID to claim"
9163
- }, {
9164
- name: "agentId",
9165
- type: "string",
9166
- required: true,
9167
- description: "Agent ID to assign the task to"
9168
- }]
9229
+ requiredParams: ["taskId"],
9230
+ params: [
9231
+ {
9232
+ name: "taskId",
9233
+ type: "string",
9234
+ required: true,
9235
+ description: "Task ID to claim"
9236
+ },
9237
+ {
9238
+ name: "agentId",
9239
+ type: "string",
9240
+ required: false,
9241
+ description: "Agent ID recorded with the lease (default: the session's agent / CLEO_AGENT_ID)"
9242
+ },
9243
+ {
9244
+ name: "renew",
9245
+ type: "boolean",
9246
+ required: false,
9247
+ description: "Renew the caller's own lease"
9248
+ },
9249
+ {
9250
+ name: "takeOver",
9251
+ type: "boolean",
9252
+ required: false,
9253
+ description: "Take over another session's EXPIRED lease (audited)"
9254
+ },
9255
+ {
9256
+ name: "forceClaim",
9257
+ type: "boolean",
9258
+ required: false,
9259
+ description: "Take over another session's LIVE lease (audited)"
9260
+ }
9261
+ ]
9169
9262
  },
9170
9263
  {
9171
9264
  gateway: "mutate",
9172
9265
  domain: "tasks",
9173
9266
  operation: "unclaim",
9174
- description: "tasks.unclaim (mutate) — unclaim a task by removing the current assignee",
9267
+ description: "tasks.unclaim (mutate) — release the caller session's claim lease (never the human assignee)",
9175
9268
  tier: 0,
9176
9269
  idempotent: false,
9177
9270
  sessionRequired: true,
@@ -9181,6 +9274,11 @@ var OPERATIONS = [
9181
9274
  type: "string",
9182
9275
  required: true,
9183
9276
  description: "Task ID to unclaim"
9277
+ }, {
9278
+ name: "forceClaim",
9279
+ type: "boolean",
9280
+ required: false,
9281
+ description: "Release another session's lease (audited)"
9184
9282
  }]
9185
9283
  },
9186
9284
  {
@@ -9438,6 +9536,20 @@ var OPERATIONS = [
9438
9536
  type: "boolean",
9439
9537
  required: false,
9440
9538
  description: "When true (default), adds toTaskId as a dependency on fromTaskId so it cannot complete before the pivot resolves"
9539
+ },
9540
+ {
9541
+ name: "takeOver",
9542
+ type: "boolean",
9543
+ required: false,
9544
+ description: "Take over another session's EXPIRED claim on toTaskId (audited)",
9545
+ cli: { flag: "take-over" }
9546
+ },
9547
+ {
9548
+ name: "forceClaim",
9549
+ type: "boolean",
9550
+ required: false,
9551
+ description: "Take over another session's LIVE claim on toTaskId (audited)",
9552
+ cli: { flag: "force-claim" }
9441
9553
  }
9442
9554
  ]
9443
9555
  },
@@ -11964,6 +12076,78 @@ var OPERATIONS = [
11964
12076
  requiredParams: [],
11965
12077
  params: []
11966
12078
  },
12079
+ {
12080
+ gateway: "query",
12081
+ domain: "nexus",
12082
+ operation: "projects.fleet",
12083
+ description: "nexus.projects.fleet (query) — fleet view: every project with its location on each device, last recorded git state (local, and remote as of the last fetch) and staleness; paged, counts first, read-only",
12084
+ tier: 1,
12085
+ idempotent: true,
12086
+ sessionRequired: false,
12087
+ requiredParams: [],
12088
+ params: [
12089
+ {
12090
+ name: "device",
12091
+ type: "string",
12092
+ required: false,
12093
+ description: "Only locations on this device (device id, hostname, or current)"
12094
+ },
12095
+ {
12096
+ name: "missing",
12097
+ type: "boolean",
12098
+ required: false,
12099
+ description: "Only projects with a missing location"
12100
+ },
12101
+ {
12102
+ name: "dirty",
12103
+ type: "boolean",
12104
+ required: false,
12105
+ description: "Only projects with a dirty location"
12106
+ },
12107
+ {
12108
+ name: "behind",
12109
+ type: "boolean",
12110
+ required: false,
12111
+ description: "Only projects with a location behind its upstream (as of the last fetch)"
12112
+ },
12113
+ {
12114
+ name: "ahead",
12115
+ type: "boolean",
12116
+ required: false,
12117
+ description: "Only projects with a location ahead of its upstream (as of the last fetch)"
12118
+ },
12119
+ {
12120
+ name: "stale",
12121
+ type: "boolean",
12122
+ required: false,
12123
+ description: "Only projects with a never-probed, old-probe or old-fetch location"
12124
+ },
12125
+ {
12126
+ name: "errored",
12127
+ type: "boolean",
12128
+ required: false,
12129
+ description: "Only projects whose last probe recorded an error"
12130
+ },
12131
+ {
12132
+ name: "staleAfterMs",
12133
+ type: "number",
12134
+ required: false,
12135
+ description: "Staleness window for probes, fetches and heartbeats (default 24h)"
12136
+ },
12137
+ {
12138
+ name: "limit",
12139
+ type: "number",
12140
+ required: false,
12141
+ description: "Page size in projects (default 50, max 500; 0 = all)"
12142
+ },
12143
+ {
12144
+ name: "offset",
12145
+ type: "number",
12146
+ required: false,
12147
+ description: "Projects skipped before the page"
12148
+ }
12149
+ ]
12150
+ },
11967
12151
  {
11968
12152
  gateway: "mutate",
11969
12153
  domain: "nexus",
@@ -15741,6 +15925,13 @@ var ExitCode;
15741
15925
  ExitCode[ExitCode["SCOPE_CONFLICT"] = 32] = "SCOPE_CONFLICT";
15742
15926
  ExitCode[ExitCode["SCOPE_INVALID"] = 33] = "SCOPE_INVALID";
15743
15927
  ExitCode[ExitCode["TASK_NOT_IN_SCOPE"] = 34] = "TASK_NOT_IN_SCOPE";
15928
+ /**
15929
+ * Another session holds the claim lease on the task (`cleo start`,
15930
+ * `cleo claim`, spawn). LAFS code `E_TASK_CLAIMED`; the details
15931
+ * (`TaskClaimedDetails`) name the holder session and agent, the lease
15932
+ * expiry, and the explicit, audited override: `--take-over` for an expired
15933
+ * lease, `--force-claim` for a live one. @task T12502
15934
+ */
15744
15935
  ExitCode[ExitCode["TASK_CLAIMED"] = 35] = "TASK_CLAIMED";
15745
15936
  ExitCode[ExitCode["SESSION_REQUIRED"] = 36] = "SESSION_REQUIRED";
15746
15937
  ExitCode[ExitCode["SESSION_CLOSE_BLOCKED"] = 37] = "SESSION_CLOSE_BLOCKED";
@@ -18935,6 +19126,14 @@ var DECISION_REQUEST_LIMITS = {
18935
19126
  minScoreLevels: 2,
18936
19127
  maxScoreLevels: 10
18937
19128
  };
19129
+ /**
19130
+ * Every supported decision-provider kind, recommended first.
19131
+ *
19132
+ * - `layahost` — the hosted provider at {@link LAYAHOST_BASE_URL}; the user
19133
+ * supplies only an API key.
19134
+ * - `jev` — any other Jev-compatible endpoint; the user supplies the URL.
19135
+ */
19136
+ var DECISION_PROVIDER_KINDS = ["layahost", "jev"];
18938
19137
  _enum(DECISION_QUESTION_TYPES);
18939
19138
  /** Zod schema for {@link DecisionOutcomeSource}. */
18940
19139
  var decisionOutcomeSourceSchema = _enum(DECISION_OUTCOME_SOURCES);
@@ -18978,6 +19177,8 @@ var decisionQuestionSchema = discriminatedUnion("type", [
18978
19177
  ]);
18979
19178
  object({
18980
19179
  model: string().min(1).optional(),
19180
+ lang: string().regex(/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$/).optional(),
19181
+ cache: boolean().optional(),
18981
19182
  state: decisionStateSchema,
18982
19183
  questions: record(string().min(1), decisionQuestionSchema).refine((questions) => {
18983
19184
  const count = Object.keys(questions).length;
@@ -19011,9 +19212,31 @@ object({
19011
19212
  requestId: string().min(1).optional(),
19012
19213
  latencyMs: number().nonnegative(),
19013
19214
  costUsd: number().nonnegative().optional(),
19215
+ costMicros: number().int().nonnegative().optional(),
19216
+ balanceMicros: number().int().optional(),
19217
+ checkpoint: string().min(1).optional(),
19014
19218
  inputTokens: number().int().nonnegative().optional()
19015
19219
  });
19016
- object({ baseUrl: url() });
19220
+ /** Zod schema for {@link DecisionProviderKind}. */
19221
+ var decisionProviderKindSchema = _enum(DECISION_PROVIDER_KINDS);
19222
+ object({
19223
+ baseUrl: url(),
19224
+ provider: decisionProviderKindSchema.optional()
19225
+ });
19226
+ object({
19227
+ user: object({
19228
+ id: string(),
19229
+ email: string(),
19230
+ name: string().nullable().optional()
19231
+ }),
19232
+ organizations: array(object({
19233
+ id: string(),
19234
+ name: string(),
19235
+ slug: string().nullable().optional(),
19236
+ role: string().optional(),
19237
+ personal: boolean().optional()
19238
+ })).default([])
19239
+ });
19017
19240
 
19018
19241
  export { OPERATIONS as O, TASK_STATUSES as T };
19019
- //# sourceMappingURL=dist-DPV5iK3m.js.map
19242
+ //# sourceMappingURL=dist-b2dqLZbk.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-BqWu1TLm.js';
3
+ import './client-NfsjQdjU.js';
4
4
  import './index-server-BgfA6C0S.js';
5
- import './internal-BlXMjztN.js';
5
+ import './internal-OCcHamz2.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-CvROslRV.js.map
68
+ //# sourceMappingURL=error.svelte-xf-NkEuU.js.map
@@ -1,4 +1,4 @@
1
- import { g as getTasksDb } from './connections2-DHVs5ytW.js';
1
+ import { g as getTasksDb } from './connections2-DyYEcX2h.js';
2
2
 
3
3
  //#region src/lib/server/tasks/explorer-loader.ts
4
4
  /**
@@ -232,4 +232,4 @@ async function loadExplorerBundle(opts) {
232
232
  }
233
233
 
234
234
  export { loadExplorerBundle as l };
235
- //# sourceMappingURL=explorer-loader-B_uCSs9_.js.map
235
+ //# sourceMappingURL=explorer-loader-CP09K03H.js.map
@@ -1,5 +1,5 @@
1
1
  import { j as json } from './exports-Dg-gdPPq.js';
2
- import { g as getActiveProjectId, r as resolveProjectContext, a as resolveDefaultProjectContext } from './project-context-BAXQmgch.js';
2
+ import { g as getActiveProjectId, r as resolveProjectContext, a as resolveDefaultProjectContext } from './project-context-CX-nfwL2.js';
3
3
  import { createHash } from 'node:crypto';
4
4
  import './utils-g564cUMV.js';
5
5
  import './cleo-home-_XIqkZaL.js';
@@ -10,6 +10,7 @@ import '@cleocode/core/paths.js';
10
10
  import '@cleocode/core/store/dual-scope-db';
11
11
  import '@cleocode/core';
12
12
  import '@cleocode/core/store/open-cleo-db';
13
+ import '@cleocode/core/nexus/project-activity.js';
13
14
 
14
15
  //#region src/lib/server/csrf.ts
15
16
  /**
@@ -154,4 +155,4 @@ var handle = async ({ event, resolve }) => {
154
155
  };
155
156
 
156
157
  export { handle };
157
- //# sourceMappingURL=hooks.server-CWBRp8NI.js.map
158
+ //# sourceMappingURL=hooks.server-D2qbf3Zp.js.map
@@ -1,4 +1,4 @@
1
- import { O as OPERATIONS$1 } from './dist-DPV5iK3m.js';
1
+ import { O as OPERATIONS$1 } from './dist-b2dqLZbk.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-BVzADggg.js.map
110
+ //# sourceMappingURL=http-C8NM9yzE.js.map