dsh-triage 0.2.0 → 0.3.0
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/audit-data.d.ts.map +1 -1
- package/dist/audit-data.js +5 -2
- package/dist/audit-data.js.map +1 -1
- package/dist/cli.js +352 -27
- package/dist/cli.js.map +1 -1
- package/dist/fix.d.ts +115 -0
- package/dist/fix.d.ts.map +1 -0
- package/dist/fix.js +267 -0
- package/dist/fix.js.map +1 -0
- package/dist/serve.d.ts +49 -14
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +1023 -141
- package/dist/serve.js.map +1 -1
- package/dist/summary.d.ts +78 -0
- package/dist/summary.d.ts.map +1 -0
- package/dist/summary.js +235 -0
- package/dist/summary.js.map +1 -0
- package/package.json +7 -4
package/dist/fix.js
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autofix (M7).
|
|
3
|
+
*
|
|
4
|
+
* The product's job used to stop at "here is what is wrong". This module is the part that
|
|
5
|
+
* actually changes the profile — so it is written the way a tool that edits someone's install
|
|
6
|
+
* has to be:
|
|
7
|
+
*
|
|
8
|
+
* - **plan first, always**: `planFixes()` is pure (no disk, no network) and returns data, so the
|
|
9
|
+
* CLI, the panel and the tests all read the same plan;
|
|
10
|
+
* - **only one write exists today**: an exact-version exemption in the profile's
|
|
11
|
+
* `compatibility.json`, in the *same format upstream writes* (2-space JSON, sorted keys, one
|
|
12
|
+
* trailing newline, `0600`), and only when the installed runtime actually reads that file —
|
|
13
|
+
* `runtimeSupportsExemptions()` proves it by finding the implementation, not by hoping;
|
|
14
|
+
* - **every write is undoable**: the previous bytes are copied next to the journal before the
|
|
15
|
+
* atomic replace, and `undoFix()` restores them byte-for-byte;
|
|
16
|
+
* - **it refuses more than it does**: a version that is not canonical SemVer, a package whose
|
|
17
|
+
* install shape we do not know, a compatibility file we did not write and cannot parse — all
|
|
18
|
+
* refused with a reason. Widening a plugin's own `engines.dsh` (the fastest "fix" and a lie to
|
|
19
|
+
* the loader) is deliberately absent; see `docs/specs/M7-autofix.md` §1 C.
|
|
20
|
+
*/
|
|
21
|
+
import { isExactExemptionVersion as coreIsExactVersion } from '@dsh-triage/core';
|
|
22
|
+
import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from 'node:fs';
|
|
23
|
+
import { dirname, join } from 'node:path';
|
|
24
|
+
import { readProfileExemptions as readCompatibilityFile } from '@dsh-triage/core';
|
|
25
|
+
/* ------------------------------- detection -------------------------------- */
|
|
26
|
+
/**
|
|
27
|
+
* Does this profile's runtime read `compatibility.json`?
|
|
28
|
+
*
|
|
29
|
+
* Proven by the implementation being present, not by the version number: 0.2.x ships
|
|
30
|
+
* `@deepseek-ai/dsh-app-boot` with `setProfileVersionExemption`, 0.1.0-rc.6 ships nothing of the
|
|
31
|
+
* kind (checked by searching every installed `@deepseek-ai` package). A version comparison would
|
|
32
|
+
* be a guess; a missing implementation is a fact.
|
|
33
|
+
*/
|
|
34
|
+
export function runtimeSupportsExemptions(profileDir) {
|
|
35
|
+
const roots = [join(profileDir, 'node_modules'), join(dirname(profileDir), 'node_modules')];
|
|
36
|
+
for (const root of roots) {
|
|
37
|
+
const boot = join(root, '@deepseek-ai', 'dsh-app-boot', 'lib', 'index.js');
|
|
38
|
+
if (!existsSync(boot))
|
|
39
|
+
continue;
|
|
40
|
+
try {
|
|
41
|
+
const text = readFileSync(boot, 'utf8');
|
|
42
|
+
if (text.includes('compatibility.json') && text.includes('setProfileVersionExemption'))
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// An unreadable runtime is treated as "does not support", never as "supports".
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
/* --------------------------------- plan ----------------------------------- */
|
|
52
|
+
/**
|
|
53
|
+
* Build the plan. Pure: the same `AuditData` yields the same plan, with no clock and no I/O.
|
|
54
|
+
*
|
|
55
|
+
* `installable` is the set of package names the profile lists in `dependencies` — the only
|
|
56
|
+
* packages whose install shape we can honestly claim to know. Everything else is planned as
|
|
57
|
+
* "you have to do this by hand", with the reason stated.
|
|
58
|
+
*/
|
|
59
|
+
export function planFixes(data, options) {
|
|
60
|
+
const runtime = data.env.dsh;
|
|
61
|
+
const installable = options.installable === undefined || options.installable === null ? [] : options.installable;
|
|
62
|
+
const items = [];
|
|
63
|
+
for (const verdict of data.rowVerdicts) {
|
|
64
|
+
if (verdict.conclusion !== 'blocked' && verdict.conclusion !== 'risky')
|
|
65
|
+
continue;
|
|
66
|
+
const name = verdict.subject.name;
|
|
67
|
+
const version = verdict.subject.version;
|
|
68
|
+
const packageVersion = version === null ? null : `${name}@${version}`;
|
|
69
|
+
const allowCommand = verdict.remediation.find((entry) => entry.kind === 'allow-version')?.command ??
|
|
70
|
+
(runtime === null ? null : `dsh plugin --profile ${data.env.profile} allow-version ${packageVersion ?? name} --dsh-version ${runtime} --accept-risk`);
|
|
71
|
+
if (options.exemptionSupport) {
|
|
72
|
+
items.push({
|
|
73
|
+
id: name,
|
|
74
|
+
action: 'exemption',
|
|
75
|
+
status: version === null ? 'unknown-version' : runtime === null ? 'unknown-version' : 'ready',
|
|
76
|
+
detail: version === null || runtime === null
|
|
77
|
+
? 'The exact package version or the runtime version is unknown, so an exemption cannot name it.'
|
|
78
|
+
: `Record an exemption for ${packageVersion} on dsh ${runtime}. This bypasses the declaration only — behaviour is still unproven.`,
|
|
79
|
+
packageVersion: version === null ? null : packageVersion,
|
|
80
|
+
command: allowCommand,
|
|
81
|
+
});
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const canInstall = installable.includes(name);
|
|
85
|
+
items.push({
|
|
86
|
+
id: name,
|
|
87
|
+
action: 'pin',
|
|
88
|
+
status: version === null ? 'unknown-version' : canInstall ? 'no-compatible-version' : 'unknown-install-shape',
|
|
89
|
+
detail: version === null
|
|
90
|
+
? 'The installed version could not be read, so there is nothing to pin.'
|
|
91
|
+
: canInstall
|
|
92
|
+
? 'This runtime does not read exemptions, so the only real fix is a plugin version that declares support for it. No such version was resolved.'
|
|
93
|
+
: `${name} is not in the profile's dependencies, so this tool does not know how it was installed.`,
|
|
94
|
+
packageVersion: version === null ? null : packageVersion,
|
|
95
|
+
command: allowCommand,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
profileDir: data.env.profileDir,
|
|
100
|
+
runtime,
|
|
101
|
+
exemptionSupport: options.exemptionSupport,
|
|
102
|
+
items,
|
|
103
|
+
applicable: items.filter((item) => item.status === 'ready').length,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
const COMPAT_FILE = 'compatibility.json';
|
|
107
|
+
/** A filesystem-safe form of an ISO stamp: Windows cannot create a directory named "10:30". */
|
|
108
|
+
export function safeStamp(stamp) {
|
|
109
|
+
return stamp.replace(/:/g, '-');
|
|
110
|
+
}
|
|
111
|
+
/** Refuse anything that is not a canonical exact SemVer — the rule lives in core, not here. */
|
|
112
|
+
export const isExactVersion = coreIsExactVersion;
|
|
113
|
+
/** `name@version` where the version is exact. Throws otherwise; never guesses. */
|
|
114
|
+
export function parsePackageVersion(value) {
|
|
115
|
+
const at = value.lastIndexOf('@');
|
|
116
|
+
if (at <= 0)
|
|
117
|
+
throw new Error(`exemption keys are name@version; got "${value}"`);
|
|
118
|
+
const name = value.slice(0, at);
|
|
119
|
+
const version = value.slice(at + 1);
|
|
120
|
+
if (!/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/.test(name))
|
|
121
|
+
throw new Error(`not an npm package name: "${name}"`);
|
|
122
|
+
if (!isExactVersion(version))
|
|
123
|
+
throw new Error(`not an exact version: "${version}"`);
|
|
124
|
+
return { name, version };
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Write the exemption and prove it: backup → atomic replace → read back.
|
|
128
|
+
*
|
|
129
|
+
* `dryRun` is the default at the CLI, and it writes **nothing at all** (not even a backup), so a
|
|
130
|
+
* preview can never leave a trace.
|
|
131
|
+
*/
|
|
132
|
+
export function applyExemptionFixes(plan, options) {
|
|
133
|
+
const ready = plan.items.filter((item) => item.status === 'ready' && item.packageVersion !== null);
|
|
134
|
+
const skipped = plan.items
|
|
135
|
+
.filter((item) => item.status !== 'ready')
|
|
136
|
+
.map((item) => ({ id: item.id, reason: item.status }));
|
|
137
|
+
if (options.dryRun || ready.length === 0) {
|
|
138
|
+
return { journal: '', changes: [], skipped, dryRun: true };
|
|
139
|
+
}
|
|
140
|
+
if (plan.runtime === null)
|
|
141
|
+
throw new Error('the runtime version is unknown; an exemption must name an exact runtime');
|
|
142
|
+
const file = join(plan.profileDir, COMPAT_FILE);
|
|
143
|
+
const current = readCompatibilityFile(plan.profileDir);
|
|
144
|
+
if (!current.rewritable) {
|
|
145
|
+
throw new Error(`${file} was not written by this tool and cannot be parsed; refusing to rewrite it (fix it by hand first)`);
|
|
146
|
+
}
|
|
147
|
+
const journalDir = join(plan.profileDir, '.dsh-triage', 'journal');
|
|
148
|
+
mkdirSync(journalDir, { recursive: true });
|
|
149
|
+
const base = safeStamp(options.stamp);
|
|
150
|
+
let runName = base;
|
|
151
|
+
for (let n = 2; existsSync(join(journalDir, `${runName}.json`)); n += 1)
|
|
152
|
+
runName = `${base}-${n}`;
|
|
153
|
+
const dir = join(plan.profileDir, '.dsh-triage', 'backups', runName);
|
|
154
|
+
mkdirSync(dir, { recursive: true });
|
|
155
|
+
const changes = [];
|
|
156
|
+
const next = {};
|
|
157
|
+
for (const [key, value] of Object.entries(current.exemptions))
|
|
158
|
+
next[key] = [...value];
|
|
159
|
+
for (const item of ready) {
|
|
160
|
+
const packageVersion = item.packageVersion;
|
|
161
|
+
parsePackageVersion(packageVersion);
|
|
162
|
+
const versions = next[packageVersion] ?? [];
|
|
163
|
+
const merged = [...new Set([...versions, plan.runtime])].sort();
|
|
164
|
+
next[packageVersion] = merged;
|
|
165
|
+
changes.push({
|
|
166
|
+
action: 'exemption',
|
|
167
|
+
packageVersion,
|
|
168
|
+
runtime: plan.runtime,
|
|
169
|
+
file,
|
|
170
|
+
before: existsSync(file) ? readFileSync(file, 'utf8') : null,
|
|
171
|
+
after: serialize(next),
|
|
172
|
+
backup: '',
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
const before = existsSync(file) ? readFileSync(file, 'utf8') : null;
|
|
176
|
+
const backupPath = join(dir, COMPAT_FILE);
|
|
177
|
+
if (before !== null)
|
|
178
|
+
copyFileSync(file, backupPath);
|
|
179
|
+
atomicWrite(file, serialize(next));
|
|
180
|
+
const after = readFileSync(file, 'utf8');
|
|
181
|
+
const verified = readCompatibilityFile(plan.profileDir);
|
|
182
|
+
if (!verified.rewritable)
|
|
183
|
+
throw new Error(`${file} could not be read back after writing; the profile may need manual repair`);
|
|
184
|
+
const journalPath = join(journalDir, `${runName}.json`);
|
|
185
|
+
const journal = {
|
|
186
|
+
schema_version: 1,
|
|
187
|
+
produced_by: 'packages/plugin/src/fix.ts',
|
|
188
|
+
generated_at: options.stamp,
|
|
189
|
+
profile_dir: plan.profileDir,
|
|
190
|
+
backup_dir: dir,
|
|
191
|
+
changes: changes.map((change) => ({
|
|
192
|
+
file: change.file,
|
|
193
|
+
backup: join(dir, COMPAT_FILE),
|
|
194
|
+
before: change.before,
|
|
195
|
+
after: change.after,
|
|
196
|
+
})),
|
|
197
|
+
};
|
|
198
|
+
writeFileSync(journalPath, `${JSON.stringify(journal, null, 2)}\n`, 'utf8');
|
|
199
|
+
return {
|
|
200
|
+
journal: journalPath,
|
|
201
|
+
changes: changes.map((change) => ({ ...change, after, backup: join(dir, COMPAT_FILE) })),
|
|
202
|
+
skipped,
|
|
203
|
+
dryRun: false,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
/** Put every file back exactly as it was. Unknown/edited files are refused, not overwritten. */
|
|
207
|
+
export function undoFix(journalPath) {
|
|
208
|
+
const journal = JSON.parse(readFileSync(journalPath, 'utf8'));
|
|
209
|
+
if (journal.schema_version !== 1)
|
|
210
|
+
throw new Error(`unsupported journal schema: ${String(journal.schema_version)}`);
|
|
211
|
+
const restored = [];
|
|
212
|
+
for (const change of journal.changes) {
|
|
213
|
+
if (change.before === null) {
|
|
214
|
+
if (existsSync(change.file))
|
|
215
|
+
rmSync(change.file, { force: true });
|
|
216
|
+
restored.push(change.file);
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
if (!existsSync(change.backup))
|
|
220
|
+
throw new Error(`backup is missing: ${change.backup}`);
|
|
221
|
+
const current = existsSync(change.file) ? readFileSync(change.file, 'utf8') : null;
|
|
222
|
+
if (current !== change.after) {
|
|
223
|
+
throw new Error(`${change.file} changed after this journal was written; refusing to overwrite it`);
|
|
224
|
+
}
|
|
225
|
+
copyFileSync(change.backup, change.file);
|
|
226
|
+
restored.push(change.file);
|
|
227
|
+
}
|
|
228
|
+
return { restored };
|
|
229
|
+
}
|
|
230
|
+
/** Kept for callers and tests: the parser itself lives in core (`readProfileExemptions`). */
|
|
231
|
+
export function readCompatibility(profileDir) {
|
|
232
|
+
const reading = readCompatibilityFile(profileDir);
|
|
233
|
+
return { exemptions: reading.exemptions, rewritable: reading.rewritable };
|
|
234
|
+
}
|
|
235
|
+
/* -------------------------------- helpers --------------------------------- */
|
|
236
|
+
function serialize(exemptions) {
|
|
237
|
+
const sorted = {};
|
|
238
|
+
for (const key of Object.keys(exemptions).sort())
|
|
239
|
+
sorted[key] = [...(exemptions[key] ?? [])];
|
|
240
|
+
return `${JSON.stringify(sorted, undefined, 2)}\n`;
|
|
241
|
+
}
|
|
242
|
+
/** Temp file in the same directory, then rename: a crash never leaves a half-written file. */
|
|
243
|
+
function atomicWrite(file, text) {
|
|
244
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
245
|
+
const temp = `${file}.tmp-${process.pid}-${Date.now()}`;
|
|
246
|
+
writeFileSync(temp, text, { encoding: 'utf8', mode: 0o600 });
|
|
247
|
+
try {
|
|
248
|
+
if (existsSync(file))
|
|
249
|
+
statSync(file);
|
|
250
|
+
renameSync(temp, file);
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
rmSync(temp, { force: true });
|
|
254
|
+
throw error;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/** Package names the profile lists as its own dependencies — the only install shapes we know. */
|
|
258
|
+
export function readProfileDependencies(profileDir) {
|
|
259
|
+
try {
|
|
260
|
+
const manifest = JSON.parse(readFileSync(join(profileDir, 'package.json'), 'utf8'));
|
|
261
|
+
return [...Object.keys(manifest.dependencies ?? {}), ...Object.keys(manifest.devDependencies ?? {})];
|
|
262
|
+
}
|
|
263
|
+
catch {
|
|
264
|
+
return [];
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
//# sourceMappingURL=fix.js.map
|
package/dist/fix.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix.js","sourceRoot":"","sources":["../src/fix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,uBAAuB,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACxH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,qBAAqB,IAAI,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAkCjF,gFAAgF;AAEhF;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CAAC,UAAkB;IAC1D,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,CAAC,CAAA;IAC3F,KAAK,MAAM,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local
|
|
2
|
+
* `dsh-triage serve` — the local panel (M4 / `docs/specs/M4-surface.md` §2).
|
|
3
3
|
*
|
|
4
|
-
* WHAT IT IS:
|
|
5
|
-
* `
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* WHAT IT IS (R49): the first screen is the answer — is this profile broken, which row, what
|
|
5
|
+
* do I type. `GET /api/summary` carries that projection; the ledger and the `data/results`
|
|
6
|
+
* artifacts live behind two tabs. Before R49 the first screen was a table of artifact names,
|
|
7
|
+
* which is the repo's evidence discipline, not the user's question.
|
|
8
|
+
*
|
|
9
|
+
* It deliberately does NOT re-judge anything: `summary` is built by the same module the CLI
|
|
10
|
+
* uses, from the same `loadAuditData()` object. A panel that invented conclusions would be a
|
|
11
|
+
* second engine with its own drift.
|
|
8
12
|
*
|
|
9
13
|
* WHY ZERO DEPENDENCIES: same discipline as the gates (`docs/adr/0003`). A panel that
|
|
10
14
|
* needs a build step or a framework is a panel that breaks when someone reinstalls.
|
|
@@ -15,9 +19,11 @@
|
|
|
15
19
|
* - `POST` is refused unless the caller started the process with `--allow-execute`, and
|
|
16
20
|
* even then this version only answers 501 — running a probe from a browser is a later
|
|
17
21
|
* step, not a happy accident;
|
|
18
|
-
* - artifact names are validated and served from a listing (no path traversal)
|
|
22
|
+
* - artifact names are validated and served from a listing (no path traversal);
|
|
23
|
+
* - every value the page renders is escaped; the page ships no remote assets (CSP below).
|
|
19
24
|
*/
|
|
20
25
|
import { type Server } from 'node:http';
|
|
26
|
+
import type { ProfileSummary } from './summary.js';
|
|
21
27
|
export interface ServeOptions {
|
|
22
28
|
/** Directory holding `*.json` + `.sha256` evidence files. */
|
|
23
29
|
readonly resultsDir: string;
|
|
@@ -34,20 +40,23 @@ export interface ServeOptions {
|
|
|
34
40
|
*
|
|
35
41
|
* Injected rather than imported on purpose: the panel stays a *display* layer, and
|
|
36
42
|
* "which home, which profile, which stamp" is the CLI's decision, not the server's.
|
|
37
|
-
* `null`/absent means `/api/audit`
|
|
38
|
-
* because "not enabled" and "nothing to report" must not look alike.
|
|
43
|
+
* `null`/absent means `/api/summary` and `/api/audit` answer **501** — never a 200 with an
|
|
44
|
+
* empty list, because "not enabled" and "nothing to report" must not look alike.
|
|
39
45
|
*/
|
|
40
46
|
readonly audit?: (() => Promise<AuditSnapshot>) | null;
|
|
41
47
|
}
|
|
42
48
|
/**
|
|
43
|
-
* One `audit` run, in the
|
|
49
|
+
* One `audit` run, in the shapes the panel displays.
|
|
44
50
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
51
|
+
* `payload` is the exact object `dsh-triage audit --json` prints. `summary` is the projection
|
|
52
|
+
* the CLI's first screen prints. Both come from the *same* `loadAuditData()` call — a caller
|
|
53
|
+
* that supplies only one of them would let the panel and the CLI disagree, so both are
|
|
54
|
+
* required (T-406's acceptance rule, R49).
|
|
47
55
|
*/
|
|
48
56
|
export type AuditSnapshot = {
|
|
49
57
|
readonly ok: true;
|
|
50
58
|
readonly payload: Record<string, unknown>;
|
|
59
|
+
readonly summary: ProfileSummary;
|
|
51
60
|
} | {
|
|
52
61
|
readonly ok: false;
|
|
53
62
|
readonly message: string;
|
|
@@ -79,13 +88,39 @@ export declare function artifactKind(name: string): string;
|
|
|
79
88
|
export declare function summarizeArtifact(resultsDir: string, name: string): ArtifactSummary;
|
|
80
89
|
/** Every `*.json` in the results directory, newest first. Read-only by construction. */
|
|
81
90
|
export declare function listArtifacts(resultsDir: string): ArtifactSummary[];
|
|
91
|
+
/**
|
|
92
|
+
* Resolve an artifact name to a real path inside `resultsDir`, or `null`.
|
|
93
|
+
*
|
|
94
|
+
* The name regex already refuses separators and `..`; this is the second lock. A symlink or
|
|
95
|
+
* NTFS junction planted inside the results directory must not become a read anywhere else on
|
|
96
|
+
* disk, and a file over the 2MB ceiling is refused before it is opened.
|
|
97
|
+
*/
|
|
98
|
+
export declare function resolveArtifact(resultsDir: string, name: string): string | null;
|
|
99
|
+
/** The four fields the first screen prints above the verdict. Never the profile directory. */
|
|
100
|
+
export interface EnvHeadline {
|
|
101
|
+
readonly dsh: string | null;
|
|
102
|
+
readonly profile: string | null;
|
|
103
|
+
readonly platform: string | null;
|
|
104
|
+
readonly arch: string | null;
|
|
105
|
+
}
|
|
82
106
|
export declare function createPanelServer(options: ServeOptions): PanelServer;
|
|
83
107
|
export declare function startPanel(options: ServeOptions): Promise<PanelServer>;
|
|
84
108
|
/** Deterministic digest helper used by the smoke recorder. */
|
|
85
109
|
export declare function sha256OfText(text: string): string;
|
|
86
110
|
/**
|
|
87
|
-
* The page
|
|
88
|
-
*
|
|
111
|
+
* The page (R50): three layers, nothing else.
|
|
112
|
+
*
|
|
113
|
+
* status — one sentence and one number, the width of the text, no boxes;
|
|
114
|
+
* issues — the rows that need a decision, one line each;
|
|
115
|
+
* commands — the exact strings to type, one click each.
|
|
116
|
+
*
|
|
117
|
+
* Everything the answer rests on (the artifact ledger and the raw `audit --json`
|
|
118
|
+
* payload) stays one Tab away instead of competing with it. The detail level is a real
|
|
119
|
+
* switch, not a matter of taste: `simple` hides the ledger entirely and says every issue
|
|
120
|
+
* in everyday words; `advanced` keeps the ledger, the six counters and audit's own wording.
|
|
121
|
+
*
|
|
122
|
+
* No framework, no remote assets, no inline event handlers: everything is built from the two
|
|
123
|
+
* JSON routes and escaped on the way in (see `esc` below). `data-copy` buttons carry the exact
|
|
124
|
+
* command text, so "what do I type" is one click instead of a transcription.
|
|
89
125
|
*/
|
|
90
126
|
export declare function renderPanelHtml(locale: 'en' | 'zh'): string;
|
|
91
|
-
//# sourceMappingURL=serve.d.ts.map
|
package/dist/serve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAsC,KAAK,MAAM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