@cavuno/board 1.35.1 → 1.37.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/{board-t_WltBBa.d.mts → board-D0guOBYy.d.mts} +1 -1
- package/dist/{board-Z7hjKDp8.d.ts → board-D_BRa2zC.d.ts} +1 -1
- package/dist/doctor.d.mts +59 -0
- package/dist/doctor.d.ts +59 -0
- package/dist/doctor.js +672 -0
- package/dist/doctor.mjs +641 -0
- package/dist/filters.d.mts +1 -1
- package/dist/filters.d.ts +1 -1
- package/dist/format.d.mts +26 -3
- package/dist/format.d.ts +26 -3
- package/dist/format.js +277 -0
- package/dist/format.mjs +277 -0
- package/dist/index.d.mts +21 -7
- package/dist/index.d.ts +21 -7
- package/dist/index.js +15 -1
- package/dist/index.mjs +15 -1
- package/dist/{jobs-Dq2a9oPj.d.mts → jobs-CMCADU_-.d.mts} +222 -1
- package/dist/{jobs-Dq2a9oPj.d.ts → jobs-CMCADU_-.d.ts} +222 -1
- package/dist/{salaries-CWg82dOz.d.mts → salaries-9U42CM5A.d.mts} +1 -1
- package/dist/{salaries-CTin-18R.d.ts → salaries-C3w9kvPJ.d.ts} +1 -1
- package/dist/seo.d.mts +3 -3
- package/dist/seo.d.ts +3 -3
- package/dist/server.d.mts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/sitemap.d.mts +3 -3
- package/dist/sitemap.d.ts +3 -3
- package/package.json +12 -1
- package/skills/manifest.json +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor check primitives (ADR-0058 Wave B): the pure logic behind
|
|
3
|
+
* `npx @cavuno/board doctor` — env validation, JSON-LD extraction,
|
|
4
|
+
* sitemap parsing, and the pass/fail/skip summary. Everything here is
|
|
5
|
+
* synchronous and I/O-free so it unit-tests without a network; the
|
|
6
|
+
* orchestrator in run.ts owns the fetches.
|
|
7
|
+
*/
|
|
8
|
+
type CheckStatus = 'pass' | 'fail' | 'skip';
|
|
9
|
+
interface CheckResult {
|
|
10
|
+
id: string;
|
|
11
|
+
/** 1 static · 2 read probes · 3 write probes (sandbox-only). */
|
|
12
|
+
tier: 1 | 2 | 3;
|
|
13
|
+
status: CheckStatus;
|
|
14
|
+
detail: string;
|
|
15
|
+
}
|
|
16
|
+
interface DoctorEnv {
|
|
17
|
+
apiUrl?: string;
|
|
18
|
+
boardKey?: string;
|
|
19
|
+
}
|
|
20
|
+
interface DoctorSummary {
|
|
21
|
+
exitCode: 0 | 1;
|
|
22
|
+
passed: string[];
|
|
23
|
+
failed: string[];
|
|
24
|
+
skipped: string[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Doctor orchestrator (ADR-0058 Wave B): tier-1 static checks (this
|
|
29
|
+
* file), tier-2 read probes (read.ts), and opt-in tier-3 write probes
|
|
30
|
+
* (writes.ts — sandbox-only, gated on the board context's `sandbox`
|
|
31
|
+
* flag). Each tier is a run/skip module pair dispatched the same way, so
|
|
32
|
+
* every check always appears in the results — unrun checks SKIP loudly,
|
|
33
|
+
* nothing silently vanishes. Fetch is injected for tests; the CLI passes
|
|
34
|
+
* global fetch.
|
|
35
|
+
*/
|
|
36
|
+
interface RunDoctorOptions {
|
|
37
|
+
env: DoctorEnv;
|
|
38
|
+
/** The tenant's frontend base URL (`--frontend`). Read tier skips loudly without it. */
|
|
39
|
+
frontendUrl?: string;
|
|
40
|
+
/** Consumer project root for the skills-freshness check. Default: cwd. */
|
|
41
|
+
projectRoot?: string;
|
|
42
|
+
fetchImpl?: typeof fetch;
|
|
43
|
+
/**
|
|
44
|
+
* Enable tier-3 write probes (`--sandbox`). The probes themselves gate
|
|
45
|
+
* on the resolved board's `sandbox` flag; this option only opts in.
|
|
46
|
+
*/
|
|
47
|
+
sandbox?: boolean;
|
|
48
|
+
/** Platform-operator Resend credential for the email-boundary check. */
|
|
49
|
+
resendApiKey?: string;
|
|
50
|
+
/** Test override for the per-run probe identity. */
|
|
51
|
+
writeProbeNonce?: string;
|
|
52
|
+
}
|
|
53
|
+
interface DoctorRun {
|
|
54
|
+
results: CheckResult[];
|
|
55
|
+
summary: DoctorSummary;
|
|
56
|
+
}
|
|
57
|
+
declare function runDoctor(options: RunDoctorOptions): Promise<DoctorRun>;
|
|
58
|
+
|
|
59
|
+
export { type CheckResult, type CheckStatus, type DoctorEnv, type DoctorRun, type DoctorSummary, type RunDoctorOptions, runDoctor };
|
package/dist/doctor.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor check primitives (ADR-0058 Wave B): the pure logic behind
|
|
3
|
+
* `npx @cavuno/board doctor` — env validation, JSON-LD extraction,
|
|
4
|
+
* sitemap parsing, and the pass/fail/skip summary. Everything here is
|
|
5
|
+
* synchronous and I/O-free so it unit-tests without a network; the
|
|
6
|
+
* orchestrator in run.ts owns the fetches.
|
|
7
|
+
*/
|
|
8
|
+
type CheckStatus = 'pass' | 'fail' | 'skip';
|
|
9
|
+
interface CheckResult {
|
|
10
|
+
id: string;
|
|
11
|
+
/** 1 static · 2 read probes · 3 write probes (sandbox-only). */
|
|
12
|
+
tier: 1 | 2 | 3;
|
|
13
|
+
status: CheckStatus;
|
|
14
|
+
detail: string;
|
|
15
|
+
}
|
|
16
|
+
interface DoctorEnv {
|
|
17
|
+
apiUrl?: string;
|
|
18
|
+
boardKey?: string;
|
|
19
|
+
}
|
|
20
|
+
interface DoctorSummary {
|
|
21
|
+
exitCode: 0 | 1;
|
|
22
|
+
passed: string[];
|
|
23
|
+
failed: string[];
|
|
24
|
+
skipped: string[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Doctor orchestrator (ADR-0058 Wave B): tier-1 static checks (this
|
|
29
|
+
* file), tier-2 read probes (read.ts), and opt-in tier-3 write probes
|
|
30
|
+
* (writes.ts — sandbox-only, gated on the board context's `sandbox`
|
|
31
|
+
* flag). Each tier is a run/skip module pair dispatched the same way, so
|
|
32
|
+
* every check always appears in the results — unrun checks SKIP loudly,
|
|
33
|
+
* nothing silently vanishes. Fetch is injected for tests; the CLI passes
|
|
34
|
+
* global fetch.
|
|
35
|
+
*/
|
|
36
|
+
interface RunDoctorOptions {
|
|
37
|
+
env: DoctorEnv;
|
|
38
|
+
/** The tenant's frontend base URL (`--frontend`). Read tier skips loudly without it. */
|
|
39
|
+
frontendUrl?: string;
|
|
40
|
+
/** Consumer project root for the skills-freshness check. Default: cwd. */
|
|
41
|
+
projectRoot?: string;
|
|
42
|
+
fetchImpl?: typeof fetch;
|
|
43
|
+
/**
|
|
44
|
+
* Enable tier-3 write probes (`--sandbox`). The probes themselves gate
|
|
45
|
+
* on the resolved board's `sandbox` flag; this option only opts in.
|
|
46
|
+
*/
|
|
47
|
+
sandbox?: boolean;
|
|
48
|
+
/** Platform-operator Resend credential for the email-boundary check. */
|
|
49
|
+
resendApiKey?: string;
|
|
50
|
+
/** Test override for the per-run probe identity. */
|
|
51
|
+
writeProbeNonce?: string;
|
|
52
|
+
}
|
|
53
|
+
interface DoctorRun {
|
|
54
|
+
results: CheckResult[];
|
|
55
|
+
summary: DoctorSummary;
|
|
56
|
+
}
|
|
57
|
+
declare function runDoctor(options: RunDoctorOptions): Promise<DoctorRun>;
|
|
58
|
+
|
|
59
|
+
export { type CheckResult, type CheckStatus, type DoctorEnv, type DoctorRun, type DoctorSummary, type RunDoctorOptions, runDoctor };
|