@cleocode/core 2026.9.17 → 2026.9.18
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.
- package/dist/internal.d.ts +1 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/nexus/analyze-orchestrator.d.ts.map +1 -1
- package/dist/nexus/analyze-orchestrator.js +53 -8
- package/dist/nexus/analyze-orchestrator.js.map +1 -1
- package/dist/nexus/assessment-store.d.ts +30 -1
- package/dist/nexus/assessment-store.d.ts.map +1 -1
- package/dist/nexus/assessment-store.js +41 -1
- package/dist/nexus/assessment-store.js.map +1 -1
- package/dist/nexus/knowledge.d.ts.map +1 -1
- package/dist/nexus/knowledge.js +2 -4
- package/dist/nexus/knowledge.js.map +1 -1
- package/dist/release/index.d.ts +1 -1
- package/dist/release/index.d.ts.map +1 -1
- package/dist/release/index.js.map +1 -1
- package/dist/release/plan.d.ts +84 -2
- package/dist/release/plan.d.ts.map +1 -1
- package/dist/release/plan.js +61 -14
- package/dist/release/plan.js.map +1 -1
- package/dist/release/pr-evidence.d.ts +81 -1
- package/dist/release/pr-evidence.d.ts.map +1 -1
- package/dist/release/pr-evidence.js +149 -9
- package/dist/release/pr-evidence.js.map +1 -1
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +5 -27
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/evidence.js +1 -1
- package/dist/tasks/evidence.js.map +1 -1
- package/dist/tasks/verification-policy.d.ts +55 -0
- package/dist/tasks/verification-policy.d.ts.map +1 -0
- package/dist/tasks/verification-policy.js +75 -0
- package/dist/tasks/verification-policy.js.map +1 -0
- package/package.json +13 -13
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification-gate policy — the single resolver for WHICH verification gates
|
|
3
|
+
* a task must have set to `true`, and whether that requirement is enforced.
|
|
4
|
+
*
|
|
5
|
+
* `cleo complete` and `cleo release plan` both consume this so the two can
|
|
6
|
+
* never disagree about what "verified" means. Before T12359 the release plan
|
|
7
|
+
* checked only that evidence atoms were PRESENT, and shipped fifteen tasks
|
|
8
|
+
* whose `implemented` gate was `false`.
|
|
9
|
+
*
|
|
10
|
+
* @task T12359
|
|
11
|
+
*/
|
|
12
|
+
import { getRawConfigValue, loadConfig } from '../config.js';
|
|
13
|
+
/**
|
|
14
|
+
* Fallback gate list used only when the resolved config names no valid gate.
|
|
15
|
+
* The normal cascade supplies `verification.requiredGates` from config
|
|
16
|
+
* defaults, so this is reached only when a project config sets an empty or
|
|
17
|
+
* wholly-invalid list.
|
|
18
|
+
*/
|
|
19
|
+
const DEFAULT_VERIFICATION_REQUIRED_GATES = [
|
|
20
|
+
'implemented',
|
|
21
|
+
'testsPassed',
|
|
22
|
+
'qaPassed',
|
|
23
|
+
'securityPassed',
|
|
24
|
+
'documented',
|
|
25
|
+
];
|
|
26
|
+
const VERIFICATION_GATES = new Set([
|
|
27
|
+
'implemented',
|
|
28
|
+
'testsPassed',
|
|
29
|
+
'qaPassed',
|
|
30
|
+
'cleanupDone',
|
|
31
|
+
'securityPassed',
|
|
32
|
+
'documented',
|
|
33
|
+
]);
|
|
34
|
+
/**
|
|
35
|
+
* Type guard: `true` when `value` names a canonical {@link VerificationGate}.
|
|
36
|
+
*
|
|
37
|
+
* @param value - Candidate gate name (typically from project config).
|
|
38
|
+
* @returns Whether `value` is a known verification gate.
|
|
39
|
+
*/
|
|
40
|
+
export function isVerificationGate(value) {
|
|
41
|
+
return VERIFICATION_GATES.has(value);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolve the project's verification-gate policy — the same policy
|
|
45
|
+
* `cleo complete` enforces.
|
|
46
|
+
*
|
|
47
|
+
* @param cwd - Project root (defaults to the resolved project root).
|
|
48
|
+
* @returns The enforcement flag and the required gate list.
|
|
49
|
+
*
|
|
50
|
+
* @task T12359
|
|
51
|
+
*/
|
|
52
|
+
export async function loadVerificationGatePolicy(cwd) {
|
|
53
|
+
const isTest = !!process.env.VITEST;
|
|
54
|
+
const config = await loadConfig(cwd);
|
|
55
|
+
// Read only the project-level value (no DEFAULTS cascade) so the isTest
|
|
56
|
+
// fallback activates when `verification.enabled` is not explicitly set.
|
|
57
|
+
const rawEnabled = await getRawConfigValue('verification.enabled', cwd);
|
|
58
|
+
const enabled = rawEnabled !== undefined ? Boolean(rawEnabled) : !isTest;
|
|
59
|
+
const configured = (config.verification?.requiredGates ?? []).filter(isVerificationGate);
|
|
60
|
+
const requiredGates = configured.length > 0 ? configured : [...DEFAULT_VERIFICATION_REQUIRED_GATES];
|
|
61
|
+
return { enabled, requiredGates };
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Return the required gates that are not `true` on a verification record.
|
|
65
|
+
*
|
|
66
|
+
* @param gates - The task's `verification.gates` map (may be absent).
|
|
67
|
+
* @param requiredGates - Gates the policy requires.
|
|
68
|
+
* @returns Required gates whose value is anything other than `true`.
|
|
69
|
+
*
|
|
70
|
+
* @task T12359
|
|
71
|
+
*/
|
|
72
|
+
export function missingRequiredGates(gates, requiredGates) {
|
|
73
|
+
return requiredGates.filter((gate) => gates?.[gate] !== true);
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=verification-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification-policy.js","sourceRoot":"","sources":["../../src/tasks/verification-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,mCAAmC,GAAgC;IACvE,aAAa;IACb,aAAa;IACb,UAAU;IACV,gBAAgB;IAChB,YAAY;CACb,CAAC;AAEF,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAmB;IACxE,aAAa;IACb,aAAa;IACb,UAAU;IACV,aAAa;IACb,gBAAgB;IAChB,YAAY;CACb,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AAkBD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,GAAY;IAC3D,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,CAAC;IACrC,wEAAwE;IACxE,wEAAwE;IACxE,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;IACxE,MAAM,OAAO,GAAG,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACzE,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,YAAY,EAAE,aAAa,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACzF,MAAM,aAAa,GACjB,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,mCAAmC,CAAC,CAAC;IAChF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;AACpC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAA2E,EAC3E,aAA0C;IAE1C,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;AAChE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleocode/core",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.18",
|
|
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",
|
|
@@ -471,16 +471,16 @@
|
|
|
471
471
|
"write-file-atomic": "^7.0.1",
|
|
472
472
|
"yaml": "^2.8.3",
|
|
473
473
|
"zod": "^4.3.6",
|
|
474
|
-
"@cleocode/adapters": "2026.9.
|
|
475
|
-
"@cleocode/
|
|
476
|
-
"@cleocode/
|
|
477
|
-
"@cleocode/
|
|
478
|
-
"@cleocode/
|
|
479
|
-
"@cleocode/lafs": "2026.9.
|
|
480
|
-
"@cleocode/
|
|
481
|
-
"@cleocode/
|
|
482
|
-
"@cleocode/worktree": "2026.9.
|
|
483
|
-
"@cleocode/skills": "2026.9.
|
|
474
|
+
"@cleocode/adapters": "2026.9.18",
|
|
475
|
+
"@cleocode/caamp": "2026.9.18",
|
|
476
|
+
"@cleocode/contracts": "2026.9.18",
|
|
477
|
+
"@cleocode/agents": "2026.9.18",
|
|
478
|
+
"@cleocode/git-shim": "2026.9.18",
|
|
479
|
+
"@cleocode/lafs": "2026.9.18",
|
|
480
|
+
"@cleocode/nexus": "2026.9.18",
|
|
481
|
+
"@cleocode/paths": "2026.9.18",
|
|
482
|
+
"@cleocode/worktree": "2026.9.18",
|
|
483
|
+
"@cleocode/skills": "2026.9.18"
|
|
484
484
|
},
|
|
485
485
|
"engines": {
|
|
486
486
|
"node": ">=24.16.0"
|
|
@@ -506,7 +506,7 @@
|
|
|
506
506
|
"@types/proper-lockfile": "^4.1.4",
|
|
507
507
|
"@types/tar": "^6.1.13",
|
|
508
508
|
"@types/write-file-atomic": "^4.0.3",
|
|
509
|
-
"@cleocode/utils": "2026.9.
|
|
509
|
+
"@cleocode/utils": "2026.9.18"
|
|
510
510
|
},
|
|
511
511
|
"repository": {
|
|
512
512
|
"type": "git",
|
|
@@ -515,7 +515,7 @@
|
|
|
515
515
|
},
|
|
516
516
|
"optionalDependencies": {
|
|
517
517
|
"llmtxt": "^2026.5.15",
|
|
518
|
-
"@cleocode/studio": "^2026.9.
|
|
518
|
+
"@cleocode/studio": "^2026.9.18"
|
|
519
519
|
},
|
|
520
520
|
"scripts": {
|
|
521
521
|
"build": "tsc && node scripts/copy-selfimprove-fixtures.mjs",
|