@cleocode/core 2026.9.3 → 2026.9.5

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 (63) hide show
  1. package/dist/dispatch/suggested-next.d.ts.map +1 -1
  2. package/dist/dispatch/suggested-next.js +7 -1
  3. package/dist/dispatch/suggested-next.js.map +1 -1
  4. package/dist/docs/export-document.js +84 -0
  5. package/dist/docs/export-document.js.map +2 -2
  6. package/dist/hygiene/validate-spawn-readiness.d.ts +88 -4
  7. package/dist/hygiene/validate-spawn-readiness.d.ts.map +1 -1
  8. package/dist/hygiene/validate-spawn-readiness.js +138 -16
  9. package/dist/hygiene/validate-spawn-readiness.js.map +1 -1
  10. package/dist/injection.d.ts.map +1 -1
  11. package/dist/injection.js +10 -2
  12. package/dist/injection.js.map +1 -1
  13. package/dist/internal.d.ts +1 -1
  14. package/dist/internal.d.ts.map +1 -1
  15. package/dist/internal.js +1 -1
  16. package/dist/internal.js.map +1 -1
  17. package/dist/llm/plugin-facade.js +84 -0
  18. package/dist/llm/plugin-facade.js.map +2 -2
  19. package/dist/release/open.d.ts +11 -18
  20. package/dist/release/open.d.ts.map +1 -1
  21. package/dist/release/open.js +135 -7
  22. package/dist/release/open.js.map +1 -1
  23. package/dist/release/plan.d.ts +1 -6
  24. package/dist/release/plan.d.ts.map +1 -1
  25. package/dist/release/plan.js +1 -8
  26. package/dist/release/plan.js.map +1 -1
  27. package/dist/release/reconcile.d.ts +19 -1
  28. package/dist/release/reconcile.d.ts.map +1 -1
  29. package/dist/release/reconcile.js +110 -6
  30. package/dist/release/reconcile.js.map +1 -1
  31. package/dist/release/release-manifest.d.ts.map +1 -1
  32. package/dist/release/release-manifest.js +1 -3
  33. package/dist/release/release-manifest.js.map +1 -1
  34. package/dist/release/version.d.ts +48 -0
  35. package/dist/release/version.d.ts.map +1 -0
  36. package/dist/release/version.js +50 -0
  37. package/dist/release/version.js.map +1 -0
  38. package/dist/selfimprove/fix-gen.js +84 -0
  39. package/dist/selfimprove/fix-gen.js.map +2 -2
  40. package/dist/setup/sections/brain.d.ts +1 -1
  41. package/dist/setup/sections/brain.js +1 -1
  42. package/dist/system/bridge-mode.d.ts +1 -1
  43. package/dist/system/bridge-mode.js +1 -1
  44. package/dist/tasks/evidence.d.ts.map +1 -1
  45. package/dist/tasks/evidence.js +90 -27
  46. package/dist/tasks/evidence.js.map +1 -1
  47. package/dist/tasks/heavy-tool-limit.d.ts +119 -0
  48. package/dist/tasks/heavy-tool-limit.d.ts.map +1 -1
  49. package/dist/tasks/heavy-tool-limit.js +205 -3
  50. package/dist/tasks/heavy-tool-limit.js.map +1 -1
  51. package/dist/tasks/index.d.ts +1 -1
  52. package/dist/tasks/index.d.ts.map +1 -1
  53. package/dist/tasks/index.js +1 -1
  54. package/dist/tasks/index.js.map +1 -1
  55. package/dist/tasks/tool-cache.d.ts +153 -48
  56. package/dist/tasks/tool-cache.d.ts.map +1 -1
  57. package/dist/tasks/tool-cache.js +333 -97
  58. package/dist/tasks/tool-cache.js.map +1 -1
  59. package/package.json +13 -13
  60. package/templates/CLEO-INJECTION.md +6 -6
  61. package/templates/workflows/release-prepare.yml.tmpl +67 -2
  62. package/templates/workflows/release-publish.yml.tmpl +1 -1
  63. package/templates/workflows/release-rollback.yml.tmpl +18 -2
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Canonical release-version normalisation (gh#1440).
3
+ *
4
+ * ## Why this is a shared module
5
+ *
6
+ * Release versions are accepted from operators in both spellings — `2026.9.4`
7
+ * and `v2026.9.4` — and the pipeline stores, tags and names files with the
8
+ * `v`-prefixed form. Every verb therefore has to normalise, and before this
9
+ * module two verbs did it from private copies while a third did not do it at
10
+ * all:
11
+ *
12
+ * | verb | behaviour before |
13
+ * |---|---|
14
+ * | `release plan` | private copy in `plan.ts` — normalised |
15
+ * | manifest reads | private copy in `release-manifest.ts` — normalised |
16
+ * | `release reconcile` | **took the argument verbatim** |
17
+ *
18
+ * The consequence, measured cutting v2026.9.4: `cleo release plan 2026.9.4`
19
+ * wrote `.cleo/release/v2026.9.4.plan.json` and reported success, then
20
+ * `cleo release reconcile 2026.9.4` — the same string — failed with
21
+ * `E_PLAN_NOT_FOUND` looking for `2026.9.4.plan.json`, and its `fix` told the
22
+ * operator to run `cleo release plan 2026.9.4`: the command that had just
23
+ * succeeded and produced the file it could not see. Following the fix loops
24
+ * forever, and the documented runbook in AGENTS.md uses the bare form for both
25
+ * verbs, so the runbook as written could not work.
26
+ *
27
+ * Two copies of a rule is how the third callsite comes to not have it. One
28
+ * function, one place — the same conclusion `collection-keys.ts` reached after
29
+ * three outages of its own.
30
+ *
31
+ * @task gh#1440
32
+ */
33
+ /**
34
+ * Normalise a release version to its canonical `v`-prefixed form.
35
+ *
36
+ * Idempotent: an already-prefixed version is returned unchanged.
37
+ *
38
+ * @param version - Version as supplied by an operator (`2026.9.4` or `v2026.9.4`).
39
+ * @returns The `v`-prefixed form (`v2026.9.4`).
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * normalizeVersion('2026.9.4'); // 'v2026.9.4'
44
+ * normalizeVersion('v2026.9.4'); // 'v2026.9.4'
45
+ * ```
46
+ */
47
+ export declare function normalizeVersion(version: string): string;
48
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/release/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Canonical release-version normalisation (gh#1440).
3
+ *
4
+ * ## Why this is a shared module
5
+ *
6
+ * Release versions are accepted from operators in both spellings — `2026.9.4`
7
+ * and `v2026.9.4` — and the pipeline stores, tags and names files with the
8
+ * `v`-prefixed form. Every verb therefore has to normalise, and before this
9
+ * module two verbs did it from private copies while a third did not do it at
10
+ * all:
11
+ *
12
+ * | verb | behaviour before |
13
+ * |---|---|
14
+ * | `release plan` | private copy in `plan.ts` — normalised |
15
+ * | manifest reads | private copy in `release-manifest.ts` — normalised |
16
+ * | `release reconcile` | **took the argument verbatim** |
17
+ *
18
+ * The consequence, measured cutting v2026.9.4: `cleo release plan 2026.9.4`
19
+ * wrote `.cleo/release/v2026.9.4.plan.json` and reported success, then
20
+ * `cleo release reconcile 2026.9.4` — the same string — failed with
21
+ * `E_PLAN_NOT_FOUND` looking for `2026.9.4.plan.json`, and its `fix` told the
22
+ * operator to run `cleo release plan 2026.9.4`: the command that had just
23
+ * succeeded and produced the file it could not see. Following the fix loops
24
+ * forever, and the documented runbook in AGENTS.md uses the bare form for both
25
+ * verbs, so the runbook as written could not work.
26
+ *
27
+ * Two copies of a rule is how the third callsite comes to not have it. One
28
+ * function, one place — the same conclusion `collection-keys.ts` reached after
29
+ * three outages of its own.
30
+ *
31
+ * @task gh#1440
32
+ */
33
+ /**
34
+ * Normalise a release version to its canonical `v`-prefixed form.
35
+ *
36
+ * Idempotent: an already-prefixed version is returned unchanged.
37
+ *
38
+ * @param version - Version as supplied by an operator (`2026.9.4` or `v2026.9.4`).
39
+ * @returns The `v`-prefixed form (`v2026.9.4`).
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * normalizeVersion('2026.9.4'); // 'v2026.9.4'
44
+ * normalizeVersion('v2026.9.4'); // 'v2026.9.4'
45
+ * ```
46
+ */
47
+ export function normalizeVersion(version) {
48
+ return version.startsWith('v') ? version : `v${version}`;
49
+ }
50
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/release/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;AAC3D,CAAC"}
@@ -1183,6 +1183,83 @@ var init_docs = __esm({
1183
1183
  }
1184
1184
  });
1185
1185
 
1186
+ // packages/contracts/src/operations/check.ts
1187
+ var VERIFICATION_SCHEMA, GATE_RESULT_SCHEMA, GATE_FIELD_POINTERS, checkGateSetOutputContract, checkGateStatusOutputContract;
1188
+ var init_check = __esm({
1189
+ "packages/contracts/src/operations/check.ts"() {
1190
+ "use strict";
1191
+ VERIFICATION_SCHEMA = {
1192
+ type: "object",
1193
+ additionalProperties: true,
1194
+ properties: {
1195
+ passed: { type: "boolean", description: "True when every required gate is set." },
1196
+ round: { type: "number", description: "IVTR round counter." },
1197
+ gates: {
1198
+ type: "object",
1199
+ additionalProperties: { type: "boolean" },
1200
+ description: "Gate name \u2192 whether it is recorded as passed."
1201
+ },
1202
+ evidence: {
1203
+ type: "object",
1204
+ additionalProperties: true,
1205
+ description: "Gate name \u2192 the evidence atom kinds validated for it."
1206
+ }
1207
+ }
1208
+ };
1209
+ GATE_RESULT_SCHEMA = {
1210
+ type: "object",
1211
+ required: ["taskId", "verification", "verificationStatus", "passed"],
1212
+ additionalProperties: true,
1213
+ properties: {
1214
+ taskId: { type: "string", description: "The task the gates belong to." },
1215
+ title: { type: "string", description: "Task title, for operator display." },
1216
+ status: { type: "string", description: "Task lifecycle status." },
1217
+ type: { type: "string", description: "Task type (epic | task | subtask)." },
1218
+ verification: VERIFICATION_SCHEMA,
1219
+ verificationStatus: {
1220
+ type: "string",
1221
+ enum: ["passed", "pending"],
1222
+ description: "Whether every required gate is now recorded."
1223
+ },
1224
+ passed: { type: "boolean", description: "Mirror of verification.passed." },
1225
+ round: { type: "number", description: "IVTR round counter." },
1226
+ requiredGates: {
1227
+ type: "array",
1228
+ items: { type: "string" },
1229
+ description: "Gates this project requires before complete."
1230
+ },
1231
+ missingGates: {
1232
+ type: "array",
1233
+ items: { type: "string" },
1234
+ description: "Required gates not yet recorded \u2014 empty means ready to complete."
1235
+ }
1236
+ }
1237
+ };
1238
+ GATE_FIELD_POINTERS = [
1239
+ "/data/taskId",
1240
+ "/data/verification",
1241
+ "/data/verification/passed",
1242
+ "/data/verification/gates",
1243
+ "/data/verificationStatus",
1244
+ "/data/passed",
1245
+ "/data/missingGates",
1246
+ "/data/requiredGates"
1247
+ ];
1248
+ checkGateSetOutputContract = {
1249
+ operation: "check.gate.set",
1250
+ shapeNote: "FLAT record, not the nested read shape. The verification object is at /data/verification \u2014 NEVER /data/task/verification, which is how `cleo show` nests a task and does not exist here. The response is self-confirming: it returns the full verification after the write, so there is no need to re-read.",
1251
+ dataSchema: { ...GATE_RESULT_SCHEMA },
1252
+ fieldPointers: [...GATE_FIELD_POINTERS]
1253
+ };
1254
+ checkGateStatusOutputContract = {
1255
+ operation: "check.gate.status",
1256
+ shapeNote: "FLAT record identical in shape to check.gate.set. Read-only: reports which gates are recorded and which are still missing. /data/missingGates being empty is the precondition for `cleo complete`.",
1257
+ dataSchema: { ...GATE_RESULT_SCHEMA },
1258
+ fieldPointers: [...GATE_FIELD_POINTERS]
1259
+ };
1260
+ }
1261
+ });
1262
+
1186
1263
  // packages/contracts/src/operations/entities.ts
1187
1264
  var ACCOUNT_VIEW_SCHEMA, accountAddOutputContract, accountListOutputContract, accountRemoveOutputContract, PROVIDER_VIEW_SCHEMA, providerListOutputContract, providerShowOutputContract, providerConnectOutputContract, MODEL_VIEW_SCHEMA, modelQueryOutputContract, modelShowOutputContract, profileCreateOutputContract, profileListOutputContract, profilePinOutputContract, profileUseOutputContract;
1188
1265
  var init_entities = __esm({
@@ -1630,6 +1707,7 @@ var tasksShowOutputContract, tasksListOutputContract, tasksFindOutputContract, T
1630
1707
  var init_output_contracts_data = __esm({
1631
1708
  "packages/contracts/src/operations/output-contracts-data.ts"() {
1632
1709
  "use strict";
1710
+ init_check();
1633
1711
  init_entities();
1634
1712
  init_service();
1635
1713
  tasksShowOutputContract = {
@@ -1981,6 +2059,11 @@ var init_output_contracts_data = __esm({
1981
2059
  fieldPointers: ["/data/key", "/data/scope", "/data/removed"]
1982
2060
  };
1983
2061
  OUTPUT_CONTRACTS = {
2062
+ // gate verification (T12192 · gh#1420 · gh#1423) — `cleo verify`, the op
2063
+ // every agent is told to run before every `cleo complete`, previously fell
2064
+ // through to the generic contract with an EMPTY pointer list.
2065
+ "check.gate.set": checkGateSetOutputContract,
2066
+ "check.gate.status": checkGateStatusOutputContract,
1984
2067
  "tasks.show": tasksShowOutputContract,
1985
2068
  "tasks.list": tasksListOutputContract,
1986
2069
  "tasks.find": tasksFindOutputContract,
@@ -13818,6 +13901,7 @@ var init_operations = __esm({
13818
13901
  init_agent_operation_contract();
13819
13902
  init_attention();
13820
13903
  init_brain();
13904
+ init_check();
13821
13905
  init_conduit();
13822
13906
  init_dialectic();
13823
13907
  init_docs();