@andorra-labs/code 0.1.8 → 0.1.10
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/THIRD_PARTY_NOTICES.md +2 -1
- package/dist/src/account-presentation.d.ts +11 -0
- package/dist/src/account-presentation.js +29 -2
- package/dist/src/agent-execution.js +57 -4
- package/dist/src/agent-mcp.d.ts +12 -0
- package/dist/src/agent-mcp.js +81 -2
- package/dist/src/app-server/protocol.d.ts +120 -1
- package/dist/src/app-server/protocol.js +8 -1
- package/dist/src/app-server/reasoning.d.ts +0 -8
- package/dist/src/app-server/reasoning.js +15 -28
- package/dist/src/app-server.d.ts +32 -0
- package/dist/src/app-server.js +214 -21
- package/dist/src/auth/AuthManager.d.ts +15 -0
- package/dist/src/auth/AuthManager.js +66 -7
- package/dist/src/auth/index.d.ts +1 -1
- package/dist/src/auth/index.js +1 -1
- package/dist/src/auth/store.d.ts +17 -1
- package/dist/src/auth/store.js +25 -2
- package/dist/src/browser-runner.js +1 -2
- package/dist/src/browser-server.js +10 -2
- package/dist/src/browser-session.js +6 -2
- package/dist/src/browser-stealth.d.ts +29 -0
- package/dist/src/browser-stealth.js +166 -0
- package/dist/src/browser-ui/app.js +123 -28
- package/dist/src/browser-ui/icons/chevron-right.svg +8 -0
- package/dist/src/browser-ui/index.html +8 -8
- package/dist/src/browser-ui/style.css +199 -171
- package/dist/src/browser-ui/tokens.css +198 -0
- package/dist/src/browser-view.d.ts +57 -9
- package/dist/src/browser-view.js +187 -36
- package/dist/src/cli.js +31 -9
- package/dist/src/coding-tools.js +9 -5
- package/dist/src/command-screens.js +4 -4
- package/dist/src/commands.d.ts +1 -1
- package/dist/src/commands.js +3 -2
- package/dist/src/completion-gates.d.ts +35 -0
- package/dist/src/completion-gates.js +25 -0
- package/dist/src/completion.d.ts +7 -1
- package/dist/src/completion.js +37 -4
- package/dist/src/config.d.ts +1 -1
- package/dist/src/config.js +2 -2
- package/dist/src/context-budget.d.ts +11 -0
- package/dist/src/context-budget.js +13 -0
- package/dist/src/decision/DecisionEngine.d.ts +5 -1
- package/dist/src/decision/DecisionManager.d.ts +1 -0
- package/dist/src/decision/DecisionManager.js +14 -3
- package/dist/src/decision/FactContinuations.d.ts +6 -0
- package/dist/src/decision/FactContinuations.js +9 -1
- package/dist/src/decision/FactServiceGate.js +1 -1
- package/dist/src/decision/checks.js +1 -1
- package/dist/src/decision/hostedSkills.d.ts +37 -0
- package/dist/src/decision/hostedSkills.js +64 -0
- package/dist/src/decision/providers/AndorraDecisionProvider.d.ts +10 -2
- package/dist/src/decision/providers/AndorraDecisionProvider.js +121 -10
- package/dist/src/default-graph.d.ts +11 -0
- package/dist/src/default-graph.js +20 -0
- package/dist/src/duration.d.ts +13 -2
- package/dist/src/duration.js +27 -3
- package/dist/src/file-diff.d.ts +105 -0
- package/dist/src/file-diff.js +244 -0
- package/dist/src/graph-manager-chat.d.ts +302 -0
- package/dist/src/graph-manager-chat.js +940 -0
- package/dist/src/graph-runner.js +6 -0
- package/dist/src/graph-server.d.ts +9 -0
- package/dist/src/graph-server.js +171 -20
- package/dist/src/graph-studio-features.js +2 -2
- package/dist/src/graph-sync.js +5 -2
- package/dist/src/graph-ui/app.js +369 -183
- package/dist/src/graph-ui/controls.css +55 -32
- package/dist/src/graph-ui/controls.js +85 -9
- package/dist/src/graph-ui/edge-router.js +114 -13
- package/dist/src/graph-ui/embed.js +32 -17
- package/dist/src/graph-ui/icons.js +1 -0
- package/dist/src/graph-ui/index.html +4 -4
- package/dist/src/graph-ui/library.css +4 -10
- package/dist/src/graph-ui/manager-markdown.js +155 -0
- package/dist/src/graph-ui/manager-state.js +191 -0
- package/dist/src/graph-ui/manager.css +161 -0
- package/dist/src/graph-ui/manager.js +700 -0
- package/dist/src/graph-ui/skill-picker.js +6 -6
- package/dist/src/graph-ui/studio-canvas.js +17 -15
- package/dist/src/graph-ui/studio.css +24 -23
- package/dist/src/graph-ui/studio.js +69 -48
- package/dist/src/graph-ui/style.css +128 -93
- package/dist/src/graph-ui/theme.js +2 -2
- package/dist/src/graph-ui/tokens.css +217 -151
- package/dist/src/graphs.d.ts +76 -2
- package/dist/src/graphs.js +172 -9
- package/dist/src/hardened-runtime.js +8 -2
- package/dist/src/mcp.d.ts +75 -0
- package/dist/src/mcp.js +240 -8
- package/dist/src/membership-errors.d.ts +14 -0
- package/dist/src/membership-errors.js +24 -1
- package/dist/src/membership.d.ts +20 -0
- package/dist/src/membership.js +45 -16
- package/dist/src/palette.d.ts +25 -8
- package/dist/src/palette.js +26 -8
- package/dist/src/provider-engine.d.ts +4 -4
- package/dist/src/provider-engine.js +39 -22
- package/dist/src/provider-keys.d.ts +5 -1
- package/dist/src/provider-keys.js +7 -3
- package/dist/src/provider-settings.d.ts +4 -1
- package/dist/src/provider-settings.js +46 -5
- package/dist/src/providers.d.ts +24 -0
- package/dist/src/providers.js +47 -2
- package/dist/src/qa/guidance.d.ts +26 -0
- package/dist/src/qa/guidance.js +46 -0
- package/dist/src/qa/index.d.ts +1 -8
- package/dist/src/qa/index.js +1 -16
- package/dist/src/qa/profile/QaProfile.d.ts +5 -1
- package/dist/src/qa/profile/QaProfile.js +6 -2
- package/dist/src/qa/runtime/ProcessManager.d.ts +20 -2
- package/dist/src/qa/runtime/ProcessManager.js +69 -13
- package/dist/src/qa/tools.d.ts +19 -1
- package/dist/src/qa/tools.js +20 -145
- package/dist/src/react-runtime.d.ts +11 -0
- package/dist/src/react-runtime.js +203 -53
- package/dist/src/remote/engine-pool.js +21 -6
- package/dist/src/run-progress.d.ts +6 -0
- package/dist/src/run-progress.js +7 -0
- package/dist/src/runtime.d.ts +8 -0
- package/dist/src/screen-selection.d.ts +38 -0
- package/dist/src/screen-selection.js +103 -0
- package/dist/src/session-changes.d.ts +117 -0
- package/dist/src/session-changes.js +796 -0
- package/dist/src/session-skills.d.ts +75 -0
- package/dist/src/session-skills.js +151 -0
- package/dist/src/side-panel.d.ts +1 -1
- package/dist/src/side-panel.js +6 -12
- package/dist/src/skill-commands.js +1 -1
- package/dist/src/skills/bundled/control-browser/SKILL.md +9 -1
- package/dist/src/skills/bundled/graph-manager/SKILL.md +8 -0
- package/dist/src/skills/bundled/provenance.json +3 -3
- package/dist/src/skills/bundled/web-gui-tester/SKILL.md +1 -1
- package/dist/src/stall-recovery.d.ts +33 -0
- package/dist/src/stall-recovery.js +83 -0
- package/dist/src/subagent-run.js +1 -2
- package/dist/src/telemetry/schema.d.ts +1 -1
- package/dist/src/telemetry/schema.js +1 -2
- package/dist/src/terminal-ui.d.ts +66 -22
- package/dist/src/terminal-ui.js +327 -92
- package/dist/src/tool-diff-stats.d.ts +9 -0
- package/dist/src/tool-diff-stats.js +20 -0
- package/dist/src/tool-names.d.ts +1 -1
- package/dist/src/tool-result-filter.js +1 -1
- package/dist/src/tools.js +26 -2
- package/dist/src/transcript.d.ts +11 -0
- package/dist/src/transcript.js +23 -3
- package/dist/src/types.d.ts +24 -4
- package/dist/src/usage-analytics.d.ts +7 -0
- package/dist/src/usage-analytics.js +55 -15
- package/docs/concepts/README.md +1 -1
- package/docs/concepts/limits.md +9 -0
- package/docs/guides/desktop-app.md +1 -1
- package/docs/guides/graph-builder.md +16 -1
- package/docs/guides/tui.md +9 -9
- package/docs/reference/slash-commands.md +2 -1
- package/docs/superpowers/plans/2026-11-13-graph-manager-chat.md +203 -0
- package/docs/superpowers/plans/2026-11-14-jev-fair-use-pricing.md +79 -0
- package/docs/superpowers/specs/2026-11-13-graph-manager-chat-design.md +182 -0
- package/docs/superpowers/specs/2026-11-14-jev-fair-use-pricing-design.md +156 -0
- package/package.json +1 -1
- package/tests/chat-side-panel-test-plan.md +1 -1
- package/dist/src/qa/api/http-runner.d.ts +0 -3
- package/dist/src/qa/api/http-runner.js +0 -47
- package/dist/src/qa/git/ChangeDetector.d.ts +0 -26
- package/dist/src/qa/git/ChangeDetector.js +0 -177
- package/dist/src/qa/git/DiffReviewer.d.ts +0 -28
- package/dist/src/qa/git/DiffReviewer.js +0 -115
- package/dist/src/qa/orchestrator/ChangeClassifier.d.ts +0 -14
- package/dist/src/qa/orchestrator/ChangeClassifier.js +0 -28
- package/dist/src/qa/orchestrator/MergeGate.d.ts +0 -14
- package/dist/src/qa/orchestrator/MergeGate.js +0 -40
- package/dist/src/qa/orchestrator/QaOrchestrator.d.ts +0 -79
- package/dist/src/qa/orchestrator/QaOrchestrator.js +0 -373
- package/dist/src/qa/runners/CommandRunner.d.ts +0 -22
- package/dist/src/qa/runners/CommandRunner.js +0 -96
- package/dist/src/qa/runners/TestRunner.d.ts +0 -21
- package/dist/src/qa/runners/TestRunner.js +0 -66
- package/dist/src/qa/runtime/RuntimeSmoke.d.ts +0 -11
- package/dist/src/qa/runtime/RuntimeSmoke.js +0 -78
- package/dist/src/qa/runtime-detect.d.ts +0 -10
- package/dist/src/qa/runtime-detect.js +0 -72
- package/dist/src/qa/security/DependencyScanner.d.ts +0 -19
- package/dist/src/qa/security/DependencyScanner.js +0 -167
- package/dist/src/qa/security/SecretScanner.d.ts +0 -3
- package/dist/src/qa/security/SecretScanner.js +0 -55
package/package.json
CHANGED
|
@@ -201,7 +201,7 @@ would keep reporting an untracked entry.
|
|
|
201
201
|
an unreadable tree while the user's own git worked. The check is POSIX's execute bit; on Windows a
|
|
202
202
|
`.exe` is executable by name, which is what the check reports there too.
|
|
203
203
|
- **A stopped run keeps its position.** `graph.stopped` names the node execution stopped on;
|
|
204
|
-
that node becomes the zoom's focus (
|
|
204
|
+
that node becomes the zoom's focus (bold `●`, no hue) without joining the visited count, because it
|
|
205
205
|
never completed.
|
|
206
206
|
- **Node with several active nodes.** A parallel run names the followed node and lists the others
|
|
207
207
|
on one line (`+N more running: …`). The Node section's height is fixed, so the panel cannot grow
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const DEFAULT_REQUEST_TIMEOUT_MS = 10_000;
|
|
2
|
-
/** Execute configured HTTP smoke expectations; every request failure is an error issue. */
|
|
3
|
-
export async function runApiSmokeTests(tests, signal) {
|
|
4
|
-
if (!tests.length) {
|
|
5
|
-
return { id: 'api_smoke', category: 'runtime', status: 'skipped', durationMs: 0, summary: 'no api_smoke_tests configured (.andorra/qa.yaml)' };
|
|
6
|
-
}
|
|
7
|
-
const startedAt = Date.now();
|
|
8
|
-
const issues = [];
|
|
9
|
-
const summaries = [];
|
|
10
|
-
for (const test of tests) {
|
|
11
|
-
signal.throwIfAborted();
|
|
12
|
-
const timeout = test.expect?.timeoutMs ?? DEFAULT_REQUEST_TIMEOUT_MS;
|
|
13
|
-
try {
|
|
14
|
-
const response = await fetch(test.request.url, {
|
|
15
|
-
method: test.request.method,
|
|
16
|
-
headers: test.request.headers,
|
|
17
|
-
body: test.request.body,
|
|
18
|
-
signal: AbortSignal.any([signal, AbortSignal.timeout(timeout)]),
|
|
19
|
-
});
|
|
20
|
-
const text = await response.text().catch(() => '');
|
|
21
|
-
if (test.expect?.status !== undefined && response.status !== test.expect.status) {
|
|
22
|
-
issues.push({ severity: 'error', message: `${test.name}: ${test.request.method} ${test.request.url} returned ${response.status}, expected ${test.expect.status}`, code: 'api-smoke-status' });
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
if (test.expect?.bodyContains && !text.includes(test.expect.bodyContains)) {
|
|
26
|
-
issues.push({ severity: 'error', message: `${test.name}: ${test.request.method} ${test.request.url} body missing "${test.expect.bodyContains}"`, code: 'api-smoke-body' });
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
summaries.push(`${test.name}: ${response.status}`);
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
if (signal.aborted)
|
|
33
|
-
throw error;
|
|
34
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
35
|
-
issues.push({ severity: 'error', message: `${test.name}: ${test.request.method} ${test.request.url} failed: ${message.slice(0, 200)}`, code: 'api-smoke-error' });
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
const durationMs = Date.now() - startedAt;
|
|
39
|
-
return {
|
|
40
|
-
id: 'api_smoke', category: 'runtime',
|
|
41
|
-
status: issues.length ? 'failed' : 'passed',
|
|
42
|
-
durationMs,
|
|
43
|
-
summary: issues.length ? `${issues.length}/${tests.length} API smoke tests failed` : `all ${tests.length} API smoke tests passed`,
|
|
44
|
-
errors: issues.length ? issues : undefined,
|
|
45
|
-
importantOutput: summaries.length ? summaries : undefined,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export interface ChangeSet {
|
|
2
|
-
isGit: boolean;
|
|
3
|
-
/** HEAD commit when available; undefined before the first commit or without Git. */
|
|
4
|
-
head?: string;
|
|
5
|
-
/** Modified, staged, renamed and untracked workspace-relative paths, QA dirs excluded. */
|
|
6
|
-
changedFiles: string[];
|
|
7
|
-
untrackedFiles: string[];
|
|
8
|
-
insertions: number;
|
|
9
|
-
deletions: number;
|
|
10
|
-
/** Working-tree diff (tracked via `git diff HEAD`, untracked synthesized as added lines). */
|
|
11
|
-
diff?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface GitRunnerOptions {
|
|
14
|
-
cwd: string;
|
|
15
|
-
signal?: AbortSignal;
|
|
16
|
-
timeoutMs?: number;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Collect the workspace's current change set and a fingerprint of its state.
|
|
20
|
-
* The fingerprint mixes HEAD, the porcelain status, diff bytes and untracked
|
|
21
|
-
* identity so any later edit invalidates QA results recorded against it.
|
|
22
|
-
* Non-git workspaces report `isGit: false` with a stat-based fallback fingerprint.
|
|
23
|
-
*/
|
|
24
|
-
export declare function detectChanges(options: GitRunnerOptions): Promise<ChangeSet & {
|
|
25
|
-
fingerprint: string;
|
|
26
|
-
}>;
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { execFile } from 'node:child_process';
|
|
2
|
-
import { createHash } from 'node:crypto';
|
|
3
|
-
import { promisify } from 'node:util';
|
|
4
|
-
import { opendir, readFile, stat } from 'node:fs/promises';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { QA_EXCLUDED_DIRS } from '../profile/QaProfile.js';
|
|
7
|
-
const executeFile = promisify(execFile);
|
|
8
|
-
const GIT_TIMEOUT_MS = 10_000;
|
|
9
|
-
async function git(args, options) {
|
|
10
|
-
try {
|
|
11
|
-
const { stdout } = await executeFile('git', ['--no-pager', '-c', 'core.fsmonitor=false', '-c', 'core.hooksPath=', '-c', 'core.quotePath=false', ...args], {
|
|
12
|
-
cwd: options.cwd, signal: options.signal, windowsHide: true,
|
|
13
|
-
timeout: options.timeoutMs ?? GIT_TIMEOUT_MS, maxBuffer: 8 * 1024 * 1024, encoding: 'utf8',
|
|
14
|
-
});
|
|
15
|
-
return { stdout, code: 0 };
|
|
16
|
-
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
const failure = error;
|
|
19
|
-
if (failure.code === 'ENOENT')
|
|
20
|
-
throw new Error('git executable is unavailable');
|
|
21
|
-
// Nonzero exits (empty diff, no HEAD yet) still carry usable stdout.
|
|
22
|
-
const code = typeof failure.status === 'number' ? failure.status : typeof failure.code === 'number' ? failure.code : 1;
|
|
23
|
-
if (typeof failure.stdout === 'string')
|
|
24
|
-
return { stdout: failure.stdout, code };
|
|
25
|
-
throw error;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function relevant(file) {
|
|
29
|
-
const parts = file.split('/');
|
|
30
|
-
return !parts.some(part => QA_EXCLUDED_DIRS.has(part)) && !file.startsWith('.andorra/');
|
|
31
|
-
}
|
|
32
|
-
/** Parse `--porcelain=1` entries; rename lines carry `old -> new`. */
|
|
33
|
-
function parsePorcelain(output) {
|
|
34
|
-
const changed = [], untracked = [];
|
|
35
|
-
for (const rawLine of output.split('\n')) {
|
|
36
|
-
if (rawLine.length < 4)
|
|
37
|
-
continue;
|
|
38
|
-
// Porcelain format is fixed: two status columns, a space, then the path.
|
|
39
|
-
const status = rawLine.slice(0, 2);
|
|
40
|
-
let file = rawLine.slice(3);
|
|
41
|
-
if (file.startsWith('"')) {
|
|
42
|
-
try {
|
|
43
|
-
file = JSON.parse(file);
|
|
44
|
-
}
|
|
45
|
-
catch {
|
|
46
|
-
file = file.slice(1, -1);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const rename = file.indexOf(' -> ');
|
|
50
|
-
if (rename >= 0) {
|
|
51
|
-
changed.push(file.slice(rename + 4));
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
if (status === '??')
|
|
55
|
-
untracked.push(file);
|
|
56
|
-
else
|
|
57
|
-
changed.push(file);
|
|
58
|
-
}
|
|
59
|
-
return { changed, untracked };
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Render untracked text files as `+` diff lines. `git diff HEAD` never shows
|
|
63
|
-
* them, yet brand-new files are exactly where regressions and leaked secrets
|
|
64
|
-
* appear first, so reviewers and scanners must see their content as added lines.
|
|
65
|
-
*/
|
|
66
|
-
async function synthesizeUntrackedDiff(cwd, files, signal) {
|
|
67
|
-
const sections = [];
|
|
68
|
-
let total = 0;
|
|
69
|
-
for (const file of files) {
|
|
70
|
-
if (sections.length >= 50 || total >= 1_048_576)
|
|
71
|
-
break;
|
|
72
|
-
signal?.throwIfAborted();
|
|
73
|
-
let content;
|
|
74
|
-
try {
|
|
75
|
-
const buffer = await readFile(path.join(cwd, file));
|
|
76
|
-
if (buffer.length > 262_144 || buffer.includes(0))
|
|
77
|
-
continue;
|
|
78
|
-
content = buffer.toString('utf8');
|
|
79
|
-
if (content.includes('�'))
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
catch {
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
const body = content.split('\n');
|
|
86
|
-
if (body.length && body[body.length - 1] === '')
|
|
87
|
-
body.pop();
|
|
88
|
-
const section = `diff --git a/${file} b/${file}\nnew file mode 100644\n--- /dev/null\n+++ b/${file}\n@@ -0,0 +1,${body.length} @@\n${body.map(line => `+${line}`).join('\n')}\n`;
|
|
89
|
-
sections.push(section);
|
|
90
|
-
total += section.length;
|
|
91
|
-
}
|
|
92
|
-
return sections.join('');
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Collect the workspace's current change set and a fingerprint of its state.
|
|
96
|
-
* The fingerprint mixes HEAD, the porcelain status, diff bytes and untracked
|
|
97
|
-
* identity so any later edit invalidates QA results recorded against it.
|
|
98
|
-
* Non-git workspaces report `isGit: false` with a stat-based fallback fingerprint.
|
|
99
|
-
*/
|
|
100
|
-
export async function detectChanges(options) {
|
|
101
|
-
options.signal?.throwIfAborted();
|
|
102
|
-
const inside = await git(['rev-parse', '--is-inside-work-tree'], options)
|
|
103
|
-
.then(result => result.code === 0 && result.stdout.trim() === 'true').catch(() => false);
|
|
104
|
-
if (!inside) {
|
|
105
|
-
return { isGit: false, changedFiles: [], untrackedFiles: [], insertions: 0, deletions: 0, fingerprint: await statFingerprint(options.cwd) };
|
|
106
|
-
}
|
|
107
|
-
const headResult = await git(['rev-parse', 'HEAD'], options).catch(() => ({ stdout: '', code: 1 }));
|
|
108
|
-
const head = headResult.code === 0 ? headResult.stdout.trim() : undefined;
|
|
109
|
-
const status = await git(['status', '--porcelain=1', '--untracked-files=all'], options).then(result => result.stdout).catch(() => '');
|
|
110
|
-
const { changed, untracked } = parsePorcelain(status);
|
|
111
|
-
const changedFiles = [...new Set([...changed, ...untracked])].filter(relevant).sort();
|
|
112
|
-
const untrackedFiles = untracked.filter(relevant).sort();
|
|
113
|
-
const realDiff = await git(['diff', 'HEAD'], options).then(result => result.stdout || '').catch(() => '');
|
|
114
|
-
const synthesized = await synthesizeUntrackedDiff(options.cwd, untrackedFiles, options.signal);
|
|
115
|
-
const diff = realDiff + synthesized;
|
|
116
|
-
const numstat = await git(['diff', 'HEAD', '--numstat'], options).then(result => result.stdout).catch(() => '');
|
|
117
|
-
let insertions = 0, deletions = 0;
|
|
118
|
-
for (const line of numstat.split('\n')) {
|
|
119
|
-
const [added, removed] = line.split('\t');
|
|
120
|
-
if (/^\d+$/.test(added))
|
|
121
|
-
insertions += Number(added);
|
|
122
|
-
if (/^\d+$/.test(removed))
|
|
123
|
-
deletions += Number(removed);
|
|
124
|
-
}
|
|
125
|
-
// New files reach the diff only through the synthesized sections; count their lines.
|
|
126
|
-
for (const line of synthesized.split('\n')) {
|
|
127
|
-
if (line.startsWith('+') && !line.startsWith('+++'))
|
|
128
|
-
insertions++;
|
|
129
|
-
}
|
|
130
|
-
const hash = createHash('sha1');
|
|
131
|
-
hash.update(JSON.stringify([head ?? '', changedFiles, diff]));
|
|
132
|
-
for (const file of untrackedFiles) {
|
|
133
|
-
try {
|
|
134
|
-
const info = await stat(path.join(options.cwd, file));
|
|
135
|
-
hash.update(JSON.stringify([file, info.size, Math.round(info.mtimeMs)]));
|
|
136
|
-
}
|
|
137
|
-
catch {
|
|
138
|
-
hash.update(JSON.stringify([file, 'gone']));
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return { isGit: true, head, changedFiles, untrackedFiles, insertions, deletions, diff, fingerprint: hash.digest('hex') };
|
|
142
|
-
}
|
|
143
|
-
/** Best-effort tree fingerprint for non-git workspaces: relative paths, sizes and mtimes. */
|
|
144
|
-
async function statFingerprint(workspace) {
|
|
145
|
-
const entries = [];
|
|
146
|
-
const walk = async (directory, depth, budget) => {
|
|
147
|
-
if (depth > 4 || budget.count > 2_000)
|
|
148
|
-
return;
|
|
149
|
-
let handle;
|
|
150
|
-
try {
|
|
151
|
-
handle = await opendir(path.join(workspace, directory));
|
|
152
|
-
}
|
|
153
|
-
catch {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
for await (const entry of handle) {
|
|
157
|
-
if (++budget.count > 2_000)
|
|
158
|
-
return;
|
|
159
|
-
if (entry.isSymbolicLink() || QA_EXCLUDED_DIRS.has(entry.name))
|
|
160
|
-
continue;
|
|
161
|
-
const rel = directory === '.' ? entry.name : `${directory}/${entry.name}`;
|
|
162
|
-
if (entry.isDirectory())
|
|
163
|
-
await walk(rel, depth + 1, budget);
|
|
164
|
-
else {
|
|
165
|
-
try {
|
|
166
|
-
const info = await stat(path.join(workspace, rel));
|
|
167
|
-
entries.push(`${rel}:${info.size}:${Math.round(info.mtimeMs)}`);
|
|
168
|
-
}
|
|
169
|
-
catch {
|
|
170
|
-
entries.push(`${rel}:gone`);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
await walk('.', 0, { count: 0 });
|
|
176
|
-
return `nogit:${createHash('sha1').update(JSON.stringify([...entries].sort())).digest('hex')}`;
|
|
177
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { QaIssue } from '../types.js';
|
|
2
|
-
export interface DiffReviewResult {
|
|
3
|
-
passed: boolean;
|
|
4
|
-
issues: QaIssue[];
|
|
5
|
-
stats: {
|
|
6
|
-
filesChanged: number;
|
|
7
|
-
insertions: number;
|
|
8
|
-
deletions: number;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export interface AddedLine {
|
|
12
|
-
file: string;
|
|
13
|
-
line: number;
|
|
14
|
-
text: string;
|
|
15
|
-
}
|
|
16
|
-
/** Extract added working-tree lines from a `git diff HEAD` capture. */
|
|
17
|
-
export declare function addedLines(diff: string): AddedLine[];
|
|
18
|
-
/**
|
|
19
|
-
* Heuristic review of the working-tree diff: debug leftovers, conflict markers,
|
|
20
|
-
* secrets, stale TODOs, generated files, dependency churn and missing test updates.
|
|
21
|
-
* `error` findings fail the review; `warning`/`info` findings are reported for judgment.
|
|
22
|
-
*/
|
|
23
|
-
export declare function reviewDiff(changeSet: {
|
|
24
|
-
diff?: string;
|
|
25
|
-
changedFiles: string[];
|
|
26
|
-
insertions: number;
|
|
27
|
-
deletions: number;
|
|
28
|
-
}, secretHits?: QaIssue[]): DiffReviewResult;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
const DEBUG_LOGGING = [
|
|
2
|
-
{ pattern: /\bconsole\.(log|debug|dir|trace)\(/, severity: 'warning', message: 'debug logging (console.*) added to the diff' },
|
|
3
|
-
{ pattern: /\bdebugger\b/, severity: 'error', message: '`debugger` statement left in the diff' },
|
|
4
|
-
{ pattern: /\bfmt\.(Println|Printf|Print)\(/, severity: 'warning', message: 'debug printing (fmt.Print*) added to the diff' },
|
|
5
|
-
{ pattern: /^\s*print\(/, severity: 'info', message: 'print() call added to the diff' },
|
|
6
|
-
{ pattern: /\bpdb\.set_trace\(/, severity: 'error', message: 'Python debugger breakpoint left in the diff' },
|
|
7
|
-
{ pattern: /\bbreakpoint\(\)/, severity: 'warning', message: 'breakpoint() left in the diff' },
|
|
8
|
-
];
|
|
9
|
-
const STALE_MARKERS = /\b(TODO|FIXME|HACK|XXX)\b/;
|
|
10
|
-
const CONFLICT_MARKER = /^(<{7}|={7}|>{7})(\s|$)/;
|
|
11
|
-
const GENERATED = /(^|\/)(dist|build|out|coverage|__generated__)\//;
|
|
12
|
-
const MINIFIED = /\.min\.(js|css)$/;
|
|
13
|
-
const DEPENDENCY_FILE = /(^|\/)(package(-lock)?\.json|yarn\.lock|pnpm-lock\.yaml|bun\.lockb?|Cargo\.lock|go\.sum|poetry\.lock|composer\.lock)$/;
|
|
14
|
-
const TEST_FILE = /(\.|_)(test|spec)\.[a-z]+$|(^|\/)(tests?|__tests__|spec)\//;
|
|
15
|
-
/** Extract added working-tree lines from a `git diff HEAD` capture. */
|
|
16
|
-
export function addedLines(diff) {
|
|
17
|
-
const lines = [];
|
|
18
|
-
let file = '';
|
|
19
|
-
let oldLine = 0, newLine = 0;
|
|
20
|
-
let inHunk = false;
|
|
21
|
-
for (const raw of diff.split('\n')) {
|
|
22
|
-
const header = /^(\+\+\+|---|diff --git|index |old mode|new mode|similarity|rename|new file|deleted file|Binary)/.exec(raw);
|
|
23
|
-
if (raw.startsWith('diff --git ')) {
|
|
24
|
-
inHunk = false;
|
|
25
|
-
file = raw.replace(/^diff --git a\/\S+ b\//, '').trim();
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
if (raw.startsWith('+++ ')) {
|
|
29
|
-
const target = raw.slice(4).trim();
|
|
30
|
-
file = target === '/dev/null' ? file : target.replace(/^b\//, '');
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
if (header && !raw.startsWith('+++'))
|
|
34
|
-
continue;
|
|
35
|
-
const hunk = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(raw);
|
|
36
|
-
if (hunk) {
|
|
37
|
-
oldLine = Number(hunk[1]);
|
|
38
|
-
newLine = Number(hunk[2]);
|
|
39
|
-
inHunk = true;
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
if (!inHunk)
|
|
43
|
-
continue;
|
|
44
|
-
if (raw.startsWith('+')) {
|
|
45
|
-
lines.push({ file, line: newLine, text: raw.slice(1) });
|
|
46
|
-
newLine++;
|
|
47
|
-
}
|
|
48
|
-
else if (raw.startsWith('-'))
|
|
49
|
-
oldLine++;
|
|
50
|
-
else if (!raw.startsWith('\\')) {
|
|
51
|
-
newLine++;
|
|
52
|
-
oldLine++;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return lines;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Heuristic review of the working-tree diff: debug leftovers, conflict markers,
|
|
59
|
-
* secrets, stale TODOs, generated files, dependency churn and missing test updates.
|
|
60
|
-
* `error` findings fail the review; `warning`/`info` findings are reported for judgment.
|
|
61
|
-
*/
|
|
62
|
-
export function reviewDiff(changeSet, secretHits = []) {
|
|
63
|
-
const issues = [...secretHits];
|
|
64
|
-
const added = changeSet.diff ? addedLines(changeSet.diff) : [];
|
|
65
|
-
const commentedRuns = new Map();
|
|
66
|
-
for (const line of added) {
|
|
67
|
-
const text = line.text;
|
|
68
|
-
if (!text.trim())
|
|
69
|
-
continue;
|
|
70
|
-
if (CONFLICT_MARKER.test(text)) {
|
|
71
|
-
issues.push({ file: line.file, line: line.line, severity: 'error', message: 'merge conflict marker added', code: 'conflict-marker' });
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
for (const rule of DEBUG_LOGGING) {
|
|
75
|
-
if (rule.pattern.test(text)) {
|
|
76
|
-
issues.push({ file: line.file, line: line.line, severity: rule.severity, message: rule.message, code: 'debug-leftover' });
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
if (STALE_MARKERS.test(text)) {
|
|
81
|
-
issues.push({ file: line.file, line: line.line, severity: 'warning', message: 'new TODO/FIXME/HACK marker added', code: 'stale-todo' });
|
|
82
|
-
}
|
|
83
|
-
const commented = /^\s*(\/\/|#)\s*(if\s*\(|if\s+|for\s*\(|for\s+|while\s*\(|while\s+|const |let |var |def |class |function |return |import |from )/.exec(text);
|
|
84
|
-
if (commented)
|
|
85
|
-
commentedRuns.set(line.file, (commentedRuns.get(line.file) ?? 0) + 1);
|
|
86
|
-
}
|
|
87
|
-
for (const [file, count] of commentedRuns) {
|
|
88
|
-
if (count >= 3)
|
|
89
|
-
issues.push({ file, severity: 'warning', message: `${count} commented-out code lines added`, code: 'commented-out-code' });
|
|
90
|
-
}
|
|
91
|
-
for (const file of changeSet.changedFiles) {
|
|
92
|
-
if (GENERATED.test(file))
|
|
93
|
-
issues.push({ file, severity: 'error', message: 'generated output committed; build artifacts should not be checked in', code: 'generated-file' });
|
|
94
|
-
else if (MINIFIED.test(file))
|
|
95
|
-
issues.push({ file, severity: 'error', message: 'minified bundle committed', code: 'generated-file' });
|
|
96
|
-
else if (DEPENDENCY_FILE.test(file))
|
|
97
|
-
issues.push({ file, severity: 'info', message: 'dependency/lockfile changed; verify the dependency change is intended', code: 'dependency-change' });
|
|
98
|
-
}
|
|
99
|
-
if (changeSet.changedFiles.length) {
|
|
100
|
-
const testsChanged = changeSet.changedFiles.some(file => TEST_FILE.test(file));
|
|
101
|
-
const sourceChanged = changeSet.changedFiles.some(file => !TEST_FILE.test(file) && /\.(ts|tsx|js|jsx|mjs|cjs|py|rs|go|java|cs|rb|php|vue|svelte)$/.test(file));
|
|
102
|
-
if (sourceChanged && !testsChanged) {
|
|
103
|
-
issues.push({ severity: 'info', message: 'no test file changed alongside source changes', code: 'missing-test-update' });
|
|
104
|
-
}
|
|
105
|
-
if (changeSet.insertions > 2_000) {
|
|
106
|
-
issues.push({ severity: 'warning', message: `very large diff: ${changeSet.insertions} inserted lines`, code: 'oversized-diff' });
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
const failed = issues.some(issue => issue.severity === 'error');
|
|
110
|
-
return {
|
|
111
|
-
passed: !failed,
|
|
112
|
-
issues: issues.slice(0, 50),
|
|
113
|
-
stats: { filesChanged: changeSet.changedFiles.length, insertions: changeSet.insertions, deletions: changeSet.deletions },
|
|
114
|
-
};
|
|
115
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface ChangeClassification {
|
|
2
|
-
frontend: boolean;
|
|
3
|
-
backend: boolean;
|
|
4
|
-
api: boolean;
|
|
5
|
-
database: boolean;
|
|
6
|
-
buildConfig: boolean;
|
|
7
|
-
documentation: boolean;
|
|
8
|
-
securitySensitive: boolean;
|
|
9
|
-
dependency: boolean;
|
|
10
|
-
testOnly: boolean;
|
|
11
|
-
sourceChanged: boolean;
|
|
12
|
-
}
|
|
13
|
-
/** Classify changed paths into the buckets that drive the dynamic merge gate. */
|
|
14
|
-
export declare function classifyChanges(files: string[]): ChangeClassification;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const FRONTEND_EXT = /\.(tsx|jsx|vue|svelte|astro|css|scss|sass|less|html)$/i;
|
|
2
|
-
const FRONTEND_PATH = /(^|\/)(pages|components|views|styles|app|public)\//i;
|
|
3
|
-
const API_PATH = /(^|\/)(api|routes|controllers|handlers|graphql)\//i;
|
|
4
|
-
const API_FILE = /(^|\/)(openapi|swagger)\.(ya?ml|json)$|\.proto$/i;
|
|
5
|
-
const DATABASE = /(^|\/)(migrations?|schema|db|database|prisma|alembic)\//i;
|
|
6
|
-
const DATABASE_FILE = /\.sql$/i;
|
|
7
|
-
const BUILD_CONFIG = /(^|\/)(package\.json|package-lock\.json|pnpm-lock\.yaml|yarn\.lock|bun\.lockb?|tsconfig[^/]*\.json|jsconfig[^/]*\.json|vite\.config\.[cm]?[jt]s|webpack[^/]*\.[cm]?[jt]s|rollup\.config\.[cm]?[jt]s|babel\.config\.[cm]?[jt]s|jest\.config\.[cm]?[jt]s|vitest\.config\.[cm]?[jt]s|playwright\.config\.[cm]?[jt]s|pyproject\.toml|setup\.py|setup\.cfg|requirements[^/]*\.txt|poetry\.lock|Cargo\.toml|Cargo\.lock|go\.mod|go\.sum|pom\.xml|build\.gradle\.kts?|settings\.gradle\.kts?|Dockerfile[^/]*|docker-compose[^/]*\.ya?ml|Makefile|meson\.build|\.semgrep[^/]*|eslint\.config\.[cm]?[jt]s|biome\.jsonc?|ruff\.toml|\.golangci\.[my]?a?ml?|\.github\/workflows\/)/i;
|
|
8
|
-
const DOCUMENTATION = /\.(md|mdx|rst|adoc|txt)$/i;
|
|
9
|
-
const SECURITY_SENSITIVE = /(auth|oauth|token|secret|credential|crypto|permission|acl|session|security|rbac|jwt)/i;
|
|
10
|
-
const LOCKFILE = /(^|\/)(package-lock\.json|pnpm-lock\.yaml|yarn\.lock|bun\.lockb?|Cargo\.lock|go\.sum|poetry\.lock|composer\.lock)$/i;
|
|
11
|
-
const TEST_FILE = /(\.|_)(test|spec)\.[a-z]+$|(^|\/)(tests?|__tests__|spec)\//i;
|
|
12
|
-
const SOURCE_EXT = /\.(ts|tsx|js|jsx|mjs|cjs|py|rs|go|java|cs|rb|php|vue|svelte)$/i;
|
|
13
|
-
/** Classify changed paths into the buckets that drive the dynamic merge gate. */
|
|
14
|
-
export function classifyChanges(files) {
|
|
15
|
-
const relevant = files.filter(file => !file.startsWith('.andorra/'));
|
|
16
|
-
return {
|
|
17
|
-
frontend: relevant.some(file => FRONTEND_EXT.test(file) || FRONTEND_PATH.test(file)),
|
|
18
|
-
backend: relevant.some(file => SOURCE_EXT.test(file) && !FRONTEND_EXT.test(file) && !TEST_FILE.test(file) && !SECURITY_SENSITIVE.test(file)),
|
|
19
|
-
api: relevant.some(file => API_PATH.test(file) || API_FILE.test(file)),
|
|
20
|
-
database: relevant.some(file => DATABASE.test(file) || DATABASE_FILE.test(file)),
|
|
21
|
-
buildConfig: relevant.some(file => BUILD_CONFIG.test(file)),
|
|
22
|
-
documentation: relevant.length > 0 && relevant.every(file => DOCUMENTATION.test(file)),
|
|
23
|
-
securitySensitive: relevant.some(file => SECURITY_SENSITIVE.test(file)),
|
|
24
|
-
dependency: relevant.some(file => LOCKFILE.test(file)),
|
|
25
|
-
testOnly: relevant.length > 0 && relevant.every(file => TEST_FILE.test(file)),
|
|
26
|
-
sourceChanged: relevant.some(file => SOURCE_EXT.test(file)),
|
|
27
|
-
};
|
|
28
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { QaProfile } from '../types.js';
|
|
2
|
-
import type { ChangeClassification } from './ChangeClassifier.js';
|
|
3
|
-
/**
|
|
4
|
-
* Required gate steps for a change set: the configured baseline plus checks
|
|
5
|
-
* the classification adds (browser trio for frontend changes, runtime smoke
|
|
6
|
-
* when a startup exists, API smoke for API changes, dependency audit for
|
|
7
|
-
* lockfile/security-sensitive edits, semgrep only when explicitly enabled).
|
|
8
|
-
*/
|
|
9
|
-
export declare function computeMergeGate(profile: QaProfile, classification: ChangeClassification): string[];
|
|
10
|
-
export interface GateVerdictInput {
|
|
11
|
-
status: 'passed' | 'failed' | 'skipped' | 'blocked';
|
|
12
|
-
}
|
|
13
|
-
/** BLOCKED when any required step could not run; FAILED on any real failure. */
|
|
14
|
-
export declare function gateVerdict(results: GateVerdictInput[]): 'ready' | 'failed' | 'blocked';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Required gate steps for a change set: the configured baseline plus checks
|
|
3
|
-
* the classification adds (browser trio for frontend changes, runtime smoke
|
|
4
|
-
* when a startup exists, API smoke for API changes, dependency audit for
|
|
5
|
-
* lockfile/security-sensitive edits, semgrep only when explicitly enabled).
|
|
6
|
-
*/
|
|
7
|
-
export function computeMergeGate(profile, classification) {
|
|
8
|
-
const steps = [];
|
|
9
|
-
const add = (...ids) => { for (const id of ids)
|
|
10
|
-
if (!steps.includes(id))
|
|
11
|
-
steps.push(id); };
|
|
12
|
-
add(...profile.mergeGate);
|
|
13
|
-
if (classification.frontend && profile.browser.enabled) {
|
|
14
|
-
add('browser_smoke', 'console_errors', 'network_errors');
|
|
15
|
-
if (profile.browser.accessibility)
|
|
16
|
-
add('accessibility');
|
|
17
|
-
}
|
|
18
|
-
if (profile.startup && (classification.frontend || classification.backend || classification.api || classification.buildConfig)) {
|
|
19
|
-
add('runtime_smoke');
|
|
20
|
-
}
|
|
21
|
-
if (profile.apiSmokeTests.length && (classification.api || classification.frontend))
|
|
22
|
-
add('api_smoke');
|
|
23
|
-
if (classification.database)
|
|
24
|
-
add('migration_validation');
|
|
25
|
-
if (classification.securitySensitive || classification.dependency || profile.security.dependencyScan)
|
|
26
|
-
add('dependency_audit');
|
|
27
|
-
if (classification.securitySensitive)
|
|
28
|
-
add('secret_scan');
|
|
29
|
-
if (profile.security.semgrep)
|
|
30
|
-
add('semgrep');
|
|
31
|
-
return steps;
|
|
32
|
-
}
|
|
33
|
-
/** BLOCKED when any required step could not run; FAILED on any real failure. */
|
|
34
|
-
export function gateVerdict(results) {
|
|
35
|
-
if (results.some(result => result.status === 'failed'))
|
|
36
|
-
return 'failed';
|
|
37
|
-
if (results.some(result => result.status === 'blocked'))
|
|
38
|
-
return 'blocked';
|
|
39
|
-
return 'ready';
|
|
40
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { QaCheckResult, QaProfile, QaSessionState } from '../types.js';
|
|
2
|
-
import { type TestCommandRequest } from '../runners/TestRunner.js';
|
|
3
|
-
import { type ChangeClassification } from './ChangeClassifier.js';
|
|
4
|
-
export interface QaRunReport {
|
|
5
|
-
runId: string;
|
|
6
|
-
fingerprint: string;
|
|
7
|
-
results: QaCheckResult[];
|
|
8
|
-
verdict: 'clean' | 'issues' | 'blocked';
|
|
9
|
-
changedFiles: string[];
|
|
10
|
-
gate?: {
|
|
11
|
-
steps: string[];
|
|
12
|
-
verdict: 'ready' | 'failed' | 'blocked';
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Per-workspace QA session: derives/caches the project profile, runs check
|
|
17
|
-
* pipelines, records normalized results with a working-tree fingerprint for
|
|
18
|
-
* staleness, bounds the repair loop, and prunes run logs to a retention set.
|
|
19
|
-
*/
|
|
20
|
-
export declare class QaOrchestrator {
|
|
21
|
-
readonly workspace: string;
|
|
22
|
-
readonly state: QaSessionState;
|
|
23
|
-
private profileEntry;
|
|
24
|
-
private lastRunFingerprint;
|
|
25
|
-
private readonly qaRoot;
|
|
26
|
-
constructor(workspace: string);
|
|
27
|
-
getProfile(signal: AbortSignal): Promise<QaProfile>;
|
|
28
|
-
/** Every command this session could execute under the current profile, for pre-flight policy checks. */
|
|
29
|
-
plannedCommands(profile: QaProfile): string[];
|
|
30
|
-
profileSummary(signal: AbortSignal): Promise<string>;
|
|
31
|
-
private newRun;
|
|
32
|
-
private pruneLogs;
|
|
33
|
-
private audit;
|
|
34
|
-
private record;
|
|
35
|
-
private verdictFor;
|
|
36
|
-
/** qa.fast: lint, typecheck, related tests, optional build, diff review and secret scan. */
|
|
37
|
-
fast(options: {
|
|
38
|
-
includeBuild: boolean;
|
|
39
|
-
signal: AbortSignal;
|
|
40
|
-
authorize?: (command: string) => Promise<void>;
|
|
41
|
-
}): Promise<QaRunReport>;
|
|
42
|
-
/** qa.test: run the unit suite scoped by mode. */
|
|
43
|
-
test(request: TestCommandRequest, options: {
|
|
44
|
-
signal: AbortSignal;
|
|
45
|
-
authorize?: (command: string) => Promise<void>;
|
|
46
|
-
}): Promise<QaCheckResult>;
|
|
47
|
-
/** qa.security: built-in secret scan, dependency audit, and semgrep when enabled. */
|
|
48
|
-
security(options: {
|
|
49
|
-
signal: AbortSignal;
|
|
50
|
-
authorize?: (command: string) => Promise<void>;
|
|
51
|
-
}): Promise<QaCheckResult[]>;
|
|
52
|
-
private semgrepCheck;
|
|
53
|
-
/** qa.browser: load a URL in Playwright and report smoke/console/network(/a11y). */
|
|
54
|
-
browser(options: {
|
|
55
|
-
url?: string;
|
|
56
|
-
accessibility?: boolean;
|
|
57
|
-
signal: AbortSignal;
|
|
58
|
-
}): Promise<QaCheckResult[]>;
|
|
59
|
-
/** qa.deep: the full dynamic merge gate over the current change set. */
|
|
60
|
-
deep(options: {
|
|
61
|
-
signal: AbortSignal;
|
|
62
|
-
authorize?: (command: string) => Promise<void>;
|
|
63
|
-
checks?: string[];
|
|
64
|
-
}): Promise<QaRunReport>;
|
|
65
|
-
private gateStep;
|
|
66
|
-
/** qa.status: session view — profile summary, last results, staleness, gate verdict. */
|
|
67
|
-
status(signal: AbortSignal): Promise<{
|
|
68
|
-
summary: string;
|
|
69
|
-
state: QaSessionState;
|
|
70
|
-
}>;
|
|
71
|
-
/** True when results recorded at the last run no longer reflect the tree. */
|
|
72
|
-
isStale(currentFingerprint: string): boolean;
|
|
73
|
-
changeSnapshot(signal: AbortSignal): Promise<{
|
|
74
|
-
changedFiles: string[];
|
|
75
|
-
classification: ChangeClassification;
|
|
76
|
-
fingerprint: string;
|
|
77
|
-
}>;
|
|
78
|
-
}
|
|
79
|
-
export declare function getQaOrchestrator(workspace: string): QaOrchestrator;
|