@nexrall/code-core 1.4.76 → 1.4.77
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/agent/goal.d.ts +55 -0
- package/dist/agent/goal.d.ts.map +1 -0
- package/dist/agent/goal.js +120 -0
- package/dist/agent/handoffBrief.d.ts +82 -0
- package/dist/agent/handoffBrief.d.ts.map +1 -0
- package/dist/agent/handoffBrief.js +121 -0
- package/dist/agent/modelCatalogue.d.ts +23 -0
- package/dist/agent/modelCatalogue.d.ts.map +1 -1
- package/dist/agent/modelCatalogue.js +28 -0
- package/dist/agent/outputStyles.d.ts +27 -0
- package/dist/agent/outputStyles.d.ts.map +1 -0
- package/dist/agent/outputStyles.js +174 -0
- package/dist/agent/skills.d.ts.map +1 -1
- package/dist/agent/skills.js +7 -0
- package/dist/api/billingLines.d.ts +11 -0
- package/dist/api/billingLines.d.ts.map +1 -0
- package/dist/api/billingLines.js +56 -0
- package/dist/api/client.d.ts +2 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/scheduleLines.d.ts +53 -0
- package/dist/api/scheduleLines.d.ts.map +1 -0
- package/dist/api/scheduleLines.js +150 -0
- package/dist/context/contextFiles.d.ts +81 -0
- package/dist/context/contextFiles.d.ts.map +1 -0
- package/dist/context/contextFiles.js +310 -0
- package/dist/diff/collect.d.ts +25 -0
- package/dist/diff/collect.d.ts.map +1 -0
- package/dist/diff/collect.js +169 -0
- package/dist/diff/diffView.d.ts +57 -0
- package/dist/diff/diffView.d.ts.map +1 -0
- package/dist/diff/diffView.js +231 -0
- package/dist/diff/reviewQueue.d.ts +53 -0
- package/dist/diff/reviewQueue.d.ts.map +1 -0
- package/dist/diff/reviewQueue.js +349 -0
- package/dist/events/recap.d.ts +54 -0
- package/dist/events/recap.d.ts.map +1 -0
- package/dist/events/recap.js +161 -0
- package/dist/events/sessionEvents.d.ts +54 -0
- package/dist/events/sessionEvents.d.ts.map +1 -0
- package/dist/events/sessionEvents.js +324 -0
- package/dist/events/sessionStats.d.ts +89 -0
- package/dist/events/sessionStats.d.ts.map +1 -0
- package/dist/events/sessionStats.js +264 -0
- package/dist/import/claudeImport.d.ts +44 -0
- package/dist/import/claudeImport.d.ts.map +1 -0
- package/dist/import/claudeImport.js +337 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -0
- package/dist/project/projectCommands.d.ts +33 -0
- package/dist/project/projectCommands.d.ts.map +1 -0
- package/dist/project/projectCommands.js +246 -0
- package/dist/search/conversationTurns.d.ts +53 -0
- package/dist/search/conversationTurns.d.ts.map +1 -0
- package/dist/search/conversationTurns.js +170 -0
- package/dist/search/globalSearch.d.ts +144 -0
- package/dist/search/globalSearch.d.ts.map +1 -0
- package/dist/search/globalSearch.js +350 -0
- package/dist/share/sessionChannel.d.ts +136 -0
- package/dist/share/sessionChannel.d.ts.map +1 -0
- package/dist/share/sessionChannel.js +373 -0
- package/dist/share/sessionShare.d.ts +104 -0
- package/dist/share/sessionShare.d.ts.map +1 -0
- package/dist/share/sessionShare.js +336 -0
- package/dist/ui/configCmd.d.ts +48 -0
- package/dist/ui/configCmd.d.ts.map +1 -0
- package/dist/ui/configCmd.js +146 -0
- package/dist/ui/deployPanel.d.ts +91 -0
- package/dist/ui/deployPanel.d.ts.map +1 -0
- package/dist/ui/deployPanel.js +442 -0
- package/dist/ui/mergeAssistant.d.ts +120 -0
- package/dist/ui/mergeAssistant.d.ts.map +1 -0
- package/dist/ui/mergeAssistant.js +391 -0
- package/dist/ui/notify.d.ts +114 -0
- package/dist/ui/notify.d.ts.map +1 -0
- package/dist/ui/notify.js +235 -0
- package/dist/ui/promptSuggest.d.ts +56 -0
- package/dist/ui/promptSuggest.d.ts.map +1 -0
- package/dist/ui/promptSuggest.js +160 -0
- package/dist/ui/taskGraph.d.ts +44 -0
- package/dist/ui/taskGraph.d.ts.map +1 -0
- package/dist/ui/taskGraph.js +289 -0
- package/dist/util/addDir.d.ts +31 -0
- package/dist/util/addDir.d.ts.map +1 -0
- package/dist/util/addDir.js +124 -0
- package/dist/util/batch.d.ts +16 -0
- package/dist/util/batch.d.ts.map +1 -0
- package/dist/util/batch.js +92 -0
- package/dist/util/cellWidth.d.ts +12 -0
- package/dist/util/cellWidth.d.ts.map +1 -0
- package/dist/util/cellWidth.js +161 -0
- package/dist/util/duration.d.ts +8 -0
- package/dist/util/duration.d.ts.map +1 -0
- package/dist/util/duration.js +50 -0
- package/dist/util/loopJobs.d.ts +67 -0
- package/dist/util/loopJobs.d.ts.map +1 -0
- package/dist/util/loopJobs.js +169 -0
- package/dist/util/settingsFile.d.ts +14 -0
- package/dist/util/settingsFile.d.ts.map +1 -0
- package/dist/util/settingsFile.js +99 -0
- package/dist/util/toolLabel.d.ts +2 -0
- package/dist/util/toolLabel.d.ts.map +1 -0
- package/dist/util/toolLabel.js +17 -0
- package/dist/verify/failureTimeline.d.ts +100 -0
- package/dist/verify/failureTimeline.d.ts.map +1 -0
- package/dist/verify/failureTimeline.js +253 -0
- package/dist/verify/verification.d.ts +75 -0
- package/dist/verify/verification.d.ts.map +1 -0
- package/dist/verify/verification.js +315 -0
- package/package.json +5 -4
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Verification ledger + panel (§82/§83). Moved from the CLI's
|
|
3
|
+
// ui/verification.ts (2026-10-04) so the VS Code panel records and shows
|
|
4
|
+
// the SAME checks; the CLI module is a re-export shim.
|
|
5
|
+
// Acceptance criteria (spec §82) and the verification panel (spec §83).
|
|
6
|
+
//
|
|
7
|
+
// WHY: the turn summary says "✓ 3 files changed · 12 tool calls" — it counts work, not
|
|
8
|
+
// confidence. A user who asked for a change wants to know whether the TYPE CHECK ran, the
|
|
9
|
+
// TESTS ran, the BUILD ran, and whether they saw the diff — and especially whether anything
|
|
10
|
+
// they declared as a completion criterion is still unproven. The panel answers that from
|
|
11
|
+
// OBSERVED tool results only: every ✓ is a command that actually exited 0 this session.
|
|
12
|
+
//
|
|
13
|
+
// "Not run" is a first-class answer. The panel never rounds a missing check up to a pass,
|
|
14
|
+
// and a criterion that no check ever covered stays `·` until a real run covers it.
|
|
15
|
+
//
|
|
16
|
+
// Pure (no console, no chalk, no fs) — see test/verification.test.ts.
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.VerificationLedger = exports.CRITERION_LABELS = exports.CHECK_KINDS = void 0;
|
|
19
|
+
exports.classifyCheck = classifyCheck;
|
|
20
|
+
exports.parseTestsPassed = parseTestsPassed;
|
|
21
|
+
exports.parseCriteria = parseCriteria;
|
|
22
|
+
exports.canonicalOrder = canonicalOrder;
|
|
23
|
+
exports.criterionStatus = criterionStatus;
|
|
24
|
+
exports.unmetCriteria = unmetCriteria;
|
|
25
|
+
exports.formatVerificationPanel = formatVerificationPanel;
|
|
26
|
+
exports.criteriaLine = criteriaLine;
|
|
27
|
+
exports.formatCriteriaList = formatCriteriaList;
|
|
28
|
+
const failureTimeline_1 = require("./failureTimeline");
|
|
29
|
+
/** Canonical order — the panel, the criteria list and the summary all use it. */
|
|
30
|
+
exports.CHECK_KINDS = ['typecheck', 'unit', 'integration', 'lint', 'build'];
|
|
31
|
+
exports.CRITERION_LABELS = {
|
|
32
|
+
typecheck: 'typecheck',
|
|
33
|
+
unit: 'unit tests',
|
|
34
|
+
integration: 'integration tests',
|
|
35
|
+
lint: 'lint',
|
|
36
|
+
build: 'build',
|
|
37
|
+
diff: 'git diff reviewed',
|
|
38
|
+
};
|
|
39
|
+
// ─── classification ──────────────────────────────────────────────────────────
|
|
40
|
+
/** `npm run typecheck:ci` → the script is `typecheck:ci`; `npm t` → `t`. */
|
|
41
|
+
const RUNNER_RE = /\b(?:npm|yarn|pnpm|bun)(?:\s+run)?\s+([^\s;&|]+)/i;
|
|
42
|
+
/** Word that is exactly a script-name part, e.g. `build` in `build:css`. */
|
|
43
|
+
const scriptWord = (word, s) => new RegExp(`(^|[:.-])${word}([:.-]|$)`, 'i').test(s);
|
|
44
|
+
const INTEGRATION_TOOLS = /\b(e2e|integration|cypress|playwright|selenium|nightwatch|testcafe|newman)\b/;
|
|
45
|
+
const TYPECHECK_TOOLS = /\b(tsc|vue-tsc|svelte-check|mypy|pyright|pyre|typecheck|type-check|types)\b/;
|
|
46
|
+
const LINT_TOOLS = /\b(eslint|oxlint|stylelint|ruff|flake8|pylint|biome|clippy|golangci|staticcheck|phpcs|phpstan|psalm|rubocop|swiftlint|ktlint|detekt|shellcheck|hadolint|cppcheck|clang-tidy|luacheck|jshint|standard)\b/;
|
|
47
|
+
const BUILD_TOOLS = /\b(build|compile|webpack|rollup|esbuild|parcel|vite)\b/;
|
|
48
|
+
const UNIT_TOOLS = /\b(jest|vitest|mocha|jasmine|ava|pytest|unittest|nose2|tox|rspec|minitest|phpunit|xunit|nunit|mstest)\b/;
|
|
49
|
+
const words = (s) => s
|
|
50
|
+
.trim()
|
|
51
|
+
.split(/[\s;&|()]+/)
|
|
52
|
+
.filter((t) => t && !t.startsWith('-'));
|
|
53
|
+
/**
|
|
54
|
+
* The kind of verification a check command performs, or undefined when it is a check
|
|
55
|
+
* (`npm run verify`, a bare `make ci`) whose kind cannot honestly be told apart.
|
|
56
|
+
*
|
|
57
|
+
* Scanned segment by segment so `cd app && npm test` classifies as `unit`, and the first
|
|
58
|
+
* segment that classifies wins (`npm run build && npm test` is a build run that also
|
|
59
|
+
* tested — calling it `unit` would hide the build, which is what the user is waiting on).
|
|
60
|
+
*/
|
|
61
|
+
function classifyCheck(command) {
|
|
62
|
+
if (!(0, failureTimeline_1.isCheckCommand)(command))
|
|
63
|
+
return undefined;
|
|
64
|
+
for (const seg of command.split(/&&|\|\||;/)) {
|
|
65
|
+
const kind = classifySegment(seg);
|
|
66
|
+
if (kind)
|
|
67
|
+
return kind;
|
|
68
|
+
}
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
function classifySegment(raw) {
|
|
72
|
+
const seg = raw.trim();
|
|
73
|
+
if (!seg)
|
|
74
|
+
return undefined;
|
|
75
|
+
const lower = seg.toLowerCase();
|
|
76
|
+
const ws = words(lower);
|
|
77
|
+
if (!ws.length)
|
|
78
|
+
return undefined;
|
|
79
|
+
const has = (t) => ws.includes(t);
|
|
80
|
+
const script = RUNNER_RE.exec(seg)?.[1] ?? '';
|
|
81
|
+
// A word that is exactly the script name or one of its `[:.-]` parts: `test:unit`,
|
|
82
|
+
// `build:prod`, and the plain `test`/`t` shorthands.
|
|
83
|
+
const scriptish = (t) => scriptWord(t, script) || ws.some((w) => w === t || scriptWord(t, w));
|
|
84
|
+
// Integration wins over unit: `npm run test:e2e` is the e2e run, `playwright test` too.
|
|
85
|
+
if (INTEGRATION_TOOLS.test(lower) || scriptish('e2e') || scriptish('integration'))
|
|
86
|
+
return 'integration';
|
|
87
|
+
if (TYPECHECK_TOOLS.test(lower) ||
|
|
88
|
+
scriptish('typecheck') ||
|
|
89
|
+
scriptish('type-check') ||
|
|
90
|
+
(has('cargo') && has('check')))
|
|
91
|
+
return 'typecheck';
|
|
92
|
+
if (LINT_TOOLS.test(lower) || scriptish('lint') || (has('go') && has('vet')))
|
|
93
|
+
return 'lint';
|
|
94
|
+
if (has('test') ||
|
|
95
|
+
has('tests') ||
|
|
96
|
+
has('spec') ||
|
|
97
|
+
has('coverage') ||
|
|
98
|
+
UNIT_TOOLS.test(lower) ||
|
|
99
|
+
/\bnode\s+--test\b/.test(lower) ||
|
|
100
|
+
scriptish('test') ||
|
|
101
|
+
scriptish('t') ||
|
|
102
|
+
scriptish('unit')) {
|
|
103
|
+
return 'unit';
|
|
104
|
+
}
|
|
105
|
+
if (BUILD_TOOLS.test(lower) ||
|
|
106
|
+
scriptish('build') ||
|
|
107
|
+
has('make') ||
|
|
108
|
+
has('gradle') ||
|
|
109
|
+
has('xcodebuild') ||
|
|
110
|
+
has('mvn')) {
|
|
111
|
+
return 'build';
|
|
112
|
+
}
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
class VerificationLedger {
|
|
116
|
+
constructor() {
|
|
117
|
+
this.runs = new Map();
|
|
118
|
+
this.diff = false;
|
|
119
|
+
}
|
|
120
|
+
/** Record one check result. The LATEST run of a kind wins — the panel is "as of now". */
|
|
121
|
+
note(kind, ok, command, at, testsPassed) {
|
|
122
|
+
const cmd = command.replace(/\s+/g, ' ').trim();
|
|
123
|
+
if (!cmd)
|
|
124
|
+
return;
|
|
125
|
+
const clipped = cmd.length > failureTimeline_1.MAX_CMD_CHARS ? cmd.slice(0, failureTimeline_1.MAX_CMD_CHARS - 1) + '…' : cmd;
|
|
126
|
+
this.runs.set(kind, { kind, ok, command: clipped, at, testsPassed });
|
|
127
|
+
}
|
|
128
|
+
/** `/diff` printed the changeset: the "reviewed the diff" box is now honestly tickable. */
|
|
129
|
+
noteDiffReviewed() {
|
|
130
|
+
this.diff = true;
|
|
131
|
+
}
|
|
132
|
+
get(kind) {
|
|
133
|
+
return this.runs.get(kind);
|
|
134
|
+
}
|
|
135
|
+
/** Runs recorded at or after `at` — "what this TURN verified", for the §84 block. */
|
|
136
|
+
runsSince(at) {
|
|
137
|
+
return [...this.runs.values()]
|
|
138
|
+
.filter((r) => r.at >= at)
|
|
139
|
+
.sort((a, b) => exports.CHECK_KINDS.indexOf(a.kind) - exports.CHECK_KINDS.indexOf(b.kind));
|
|
140
|
+
}
|
|
141
|
+
reviewedDiff() {
|
|
142
|
+
return this.diff;
|
|
143
|
+
}
|
|
144
|
+
reset() {
|
|
145
|
+
this.runs.clear();
|
|
146
|
+
this.diff = false;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.VerificationLedger = VerificationLedger;
|
|
150
|
+
/** The most recent `N passed` a test runner printed, e.g. "12 passed", "2,341 tests passed". */
|
|
151
|
+
function parseTestsPassed(output) {
|
|
152
|
+
const m = /(\d[\d,]*)\s+(?:tests?\s+)?passed\b/i.exec(output);
|
|
153
|
+
if (!m)
|
|
154
|
+
return undefined;
|
|
155
|
+
const n = Number(m[1].replace(/,/g, ''));
|
|
156
|
+
return Number.isFinite(n) ? n : undefined;
|
|
157
|
+
}
|
|
158
|
+
// ─── criteria ────────────────────────────────────────────────────────────────
|
|
159
|
+
const CRITERION_WORDS = {
|
|
160
|
+
typecheck: 'typecheck',
|
|
161
|
+
type: 'typecheck',
|
|
162
|
+
types: 'typecheck',
|
|
163
|
+
tsc: 'typecheck',
|
|
164
|
+
test: 'unit',
|
|
165
|
+
tests: 'unit',
|
|
166
|
+
unittests: 'unit',
|
|
167
|
+
unit: 'unit',
|
|
168
|
+
jest: 'unit',
|
|
169
|
+
vitest: 'unit',
|
|
170
|
+
pytest: 'unit',
|
|
171
|
+
integration: 'integration',
|
|
172
|
+
e2e: 'integration',
|
|
173
|
+
it: 'integration',
|
|
174
|
+
cypress: 'integration',
|
|
175
|
+
playwright: 'integration',
|
|
176
|
+
lint: 'lint',
|
|
177
|
+
eslint: 'lint',
|
|
178
|
+
ruff: 'lint',
|
|
179
|
+
clippy: 'lint',
|
|
180
|
+
build: 'build',
|
|
181
|
+
compile: 'build',
|
|
182
|
+
diff: 'diff',
|
|
183
|
+
review: 'diff',
|
|
184
|
+
git: 'diff',
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* `/accept unittests typecheck` — the words a user would naturally type. Anything not
|
|
188
|
+
* understood is reported instead of silently dropped: a criterion the user thinks is
|
|
189
|
+
* armed but is not would make the panel lie by omission.
|
|
190
|
+
*/
|
|
191
|
+
function parseCriteria(arg) {
|
|
192
|
+
const ws = arg.trim().split(/\s+/).filter(Boolean);
|
|
193
|
+
if (!ws.length)
|
|
194
|
+
return { unknown: [] };
|
|
195
|
+
if (ws.length === 1 && ws[0].toLowerCase() === 'clear')
|
|
196
|
+
return { clear: true, unknown: [] };
|
|
197
|
+
const seen = new Set();
|
|
198
|
+
const unknown = [];
|
|
199
|
+
for (const w of ws) {
|
|
200
|
+
// `type-check`, `unit_tests`, `unit-tests` — separators are noise to a human.
|
|
201
|
+
const id = CRITERION_WORDS[w.toLowerCase().replace(/[-_]/g, '')];
|
|
202
|
+
if (id)
|
|
203
|
+
seen.add(id);
|
|
204
|
+
else
|
|
205
|
+
unknown.push(w);
|
|
206
|
+
}
|
|
207
|
+
return { criteria: canonicalOrder([...seen]), unknown };
|
|
208
|
+
}
|
|
209
|
+
const order = (id) => (id === 'diff' ? exports.CHECK_KINDS.length : exports.CHECK_KINDS.indexOf(id));
|
|
210
|
+
function canonicalOrder(ids) {
|
|
211
|
+
return [...new Set(ids)].sort((a, b) => order(a) - order(b));
|
|
212
|
+
}
|
|
213
|
+
function criterionStatus(ledger, id) {
|
|
214
|
+
if (id === 'diff')
|
|
215
|
+
return ledger.reviewedDiff() ? 'pass' : 'pending';
|
|
216
|
+
const run = ledger.get(id);
|
|
217
|
+
if (!run)
|
|
218
|
+
return 'pending';
|
|
219
|
+
return run.ok ? 'pass' : 'fail';
|
|
220
|
+
}
|
|
221
|
+
function unmetCriteria(ledger, criteria) {
|
|
222
|
+
return criteria.filter((id) => criterionStatus(ledger, id) !== 'pass');
|
|
223
|
+
}
|
|
224
|
+
// ─── rendering ───────────────────────────────────────────────────────────────
|
|
225
|
+
const clip = (s, cols) => (cols > 8 && s.length > cols ? s.slice(0, cols - 1) + '…' : s);
|
|
226
|
+
/**
|
|
227
|
+
* §83. With criteria declared, every criterion gets a line — the point of declaring them is
|
|
228
|
+
* to see the ones that have NOT passed. Without criteria, only what actually ran is shown:
|
|
229
|
+
* a fixed list of five partly-empty rows would train the user to ignore it.
|
|
230
|
+
*/
|
|
231
|
+
function formatVerificationPanel(ledger, criteria, opts) {
|
|
232
|
+
const cols = opts.cols;
|
|
233
|
+
const lines = [clip('Verification', cols)];
|
|
234
|
+
const row = (id) => {
|
|
235
|
+
const status = criterionStatus(ledger, id);
|
|
236
|
+
const glyph = status === 'pass' ? '✓' : status === 'fail' ? '✗' : '·';
|
|
237
|
+
const label = exports.CRITERION_LABELS[id];
|
|
238
|
+
const run = id === 'diff' ? undefined : ledger.get(id);
|
|
239
|
+
const why = id === 'diff'
|
|
240
|
+
? ledger.reviewedDiff()
|
|
241
|
+
? '/diff was opened'
|
|
242
|
+
: 'not reviewed'
|
|
243
|
+
: run
|
|
244
|
+
? `${run.command}${status === 'fail' ? ' (failed)' : ''}`
|
|
245
|
+
: 'not run';
|
|
246
|
+
return clip(` ${glyph} ${label} — ${why}`, cols);
|
|
247
|
+
};
|
|
248
|
+
if (criteria.length) {
|
|
249
|
+
for (const id of criteria)
|
|
250
|
+
lines.push(row(id));
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
let shown = 0;
|
|
254
|
+
for (const kind of exports.CHECK_KINDS)
|
|
255
|
+
if (ledger.get(kind)) {
|
|
256
|
+
lines.push(row(kind));
|
|
257
|
+
shown++;
|
|
258
|
+
}
|
|
259
|
+
if (ledger.reviewedDiff()) {
|
|
260
|
+
lines.push(row('diff'));
|
|
261
|
+
shown++;
|
|
262
|
+
}
|
|
263
|
+
if (!shown)
|
|
264
|
+
lines.push(clip(' · nothing verified yet — run a check, or /accept to declare criteria', cols));
|
|
265
|
+
}
|
|
266
|
+
if (opts.filesChanged !== undefined && opts.filesChanged > 0) {
|
|
267
|
+
lines.push(clip(` ${opts.filesChanged} file${opts.filesChanged === 1 ? '' : 's'} changed`, cols));
|
|
268
|
+
}
|
|
269
|
+
if (criteria.length) {
|
|
270
|
+
const wins = ledger.get('unit');
|
|
271
|
+
if (wins?.ok && wins.testsPassed !== undefined) {
|
|
272
|
+
lines.push(clip(` ${wins.testsPassed.toLocaleString('en-US')} tests passed`, cols));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return lines;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* §82, one line for the END OF A TURN: "the agent should not claim completion until the
|
|
279
|
+
* configured checks pass". The CLI cannot police the model's prose, but it can make the
|
|
280
|
+
* unmet criteria impossible to miss — and say nothing at all when everything passed.
|
|
281
|
+
*
|
|
282
|
+
* Returns undefined when there is nothing worth saying (no criteria, all met, or — for
|
|
283
|
+
* the met case — `announce` is false because the panel already showed it).
|
|
284
|
+
*/
|
|
285
|
+
function criteriaLine(ledger, criteria, cols, announceMet = false) {
|
|
286
|
+
if (!criteria.length)
|
|
287
|
+
return undefined;
|
|
288
|
+
const unmet = unmetCriteria(ledger, criteria);
|
|
289
|
+
if (unmet.length) {
|
|
290
|
+
const names = unmet.map((id) => exports.CRITERION_LABELS[id]).join(', ');
|
|
291
|
+
return clip(`⚠ Acceptance criteria not verified: ${names} — /verify to see the panel`, cols);
|
|
292
|
+
}
|
|
293
|
+
if (!announceMet)
|
|
294
|
+
return undefined;
|
|
295
|
+
const names = criteria.map((id) => exports.CRITERION_LABELS[id]).join(', ');
|
|
296
|
+
return clip(`✓ Acceptance criteria all verified: ${names}`, cols);
|
|
297
|
+
}
|
|
298
|
+
/** `/accept` with no argument: what is declared, and where each one stands. */
|
|
299
|
+
function formatCriteriaList(ledger, criteria, cols) {
|
|
300
|
+
if (!criteria.length) {
|
|
301
|
+
return [clip(' No acceptance criteria set. `/accept test build` arms them; /verify shows the panel.', cols)];
|
|
302
|
+
}
|
|
303
|
+
const out = [clip(' Acceptance criteria:', cols)];
|
|
304
|
+
for (const id of criteria) {
|
|
305
|
+
const status = criterionStatus(ledger, id);
|
|
306
|
+
const glyph = status === 'pass' ? '✓' : status === 'fail' ? '✗' : '·';
|
|
307
|
+
out.push(clip(` ${glyph} ${exports.CRITERION_LABELS[id]}`, cols));
|
|
308
|
+
}
|
|
309
|
+
const unmet = unmetCriteria(ledger, criteria);
|
|
310
|
+
out.push(clip(unmet.length
|
|
311
|
+
? ' The agent has not finished until these pass. /verify for the panel.'
|
|
312
|
+
: ' All verified this session.', cols));
|
|
313
|
+
return out;
|
|
314
|
+
}
|
|
315
|
+
//# sourceMappingURL=verification.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexrall/code-core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.77",
|
|
4
4
|
"description": "Core agent loop, tools, and extension primitives for Nexrall Code — embed an AI coding agent in any Node.js application.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nexrall <support@nexrall.com> (https://nexrall.com)",
|
|
@@ -86,11 +86,12 @@
|
|
|
86
86
|
"prepublishOnly": "npm run build && npm test"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"eventsource-parser": "^1.1.2",
|
|
90
|
-
"node-fetch": "^3.3.2",
|
|
91
89
|
"docx": "^9.7.1",
|
|
90
|
+
"eventsource-parser": "^1.1.2",
|
|
92
91
|
"exceljs": "^4.4.0",
|
|
93
|
-
"
|
|
92
|
+
"node-fetch": "^3.3.2",
|
|
93
|
+
"pptxgenjs": "^4.0.1",
|
|
94
|
+
"socket.io-client": "^4.8.4"
|
|
94
95
|
},
|
|
95
96
|
"devDependencies": {
|
|
96
97
|
"@types/node": "^26.0.1",
|