@popovych.co/witness 0.28.2 → 0.28.3
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/README.md +1 -1
- package/dist/abandon.d.ts +67 -0
- package/dist/act.d.ts +16 -0
- package/dist/act.js +61 -0
- package/dist/adopt.d.ts +21 -0
- package/dist/allowlist.d.ts +48 -0
- package/dist/allowlist.js +79 -5
- package/dist/arbiter.d.ts +37 -0
- package/dist/arbiter.js +7 -5
- package/dist/ask.d.ts +29 -0
- package/dist/ask.js +11 -5
- package/dist/autonomy.d.ts +46 -0
- package/dist/autonomy.js +24 -12
- package/dist/awake.d.ts +15 -0
- package/dist/basis.d.ts +9 -0
- package/dist/battery.d.ts +23 -0
- package/dist/bin.d.ts +2 -0
- package/dist/caps.d.ts +20 -0
- package/dist/cli.d.ts +18 -0
- package/dist/config-file.d.ts +12 -0
- package/dist/config.d.ts +96 -0
- package/dist/config.js +2 -1
- package/dist/contain.d.ts +16 -0
- package/dist/context.d.ts +25 -0
- package/dist/criteria.d.ts +27 -0
- package/dist/criteria.js +2 -1
- package/dist/decide-view.d.ts +46 -0
- package/dist/decide-view.js +137 -0
- package/dist/decisions.d.ts +23 -0
- package/dist/deferral.d.ts +26 -0
- package/dist/delta.d.ts +58 -0
- package/dist/departure.d.ts +66 -0
- package/dist/design.d.ts +34 -0
- package/dist/drafts.d.ts +31 -0
- package/dist/drafts.js +5 -3
- package/dist/drift.d.ts +23 -0
- package/dist/drive-presence.d.ts +27 -0
- package/dist/drive-presence.js +15 -4
- package/dist/drive-report.d.ts +24 -0
- package/dist/drive-report.js +4 -4
- package/dist/drive.d.ts +97 -0
- package/dist/drive.js +68 -71
- package/dist/dsl.d.ts +23 -0
- package/dist/dsl.js +8 -3
- package/dist/evidence.d.ts +65 -0
- package/dist/floor.d.ts +6 -0
- package/dist/fm.d.ts +9 -0
- package/dist/gate-run-view.d.ts +57 -0
- package/dist/gate-run-view.js +100 -0
- package/dist/gate.d.ts +91 -0
- package/dist/gate.js +14 -67
- package/dist/gates/decompose.d.ts +1 -0
- package/dist/gates/decompose.js +3 -1
- package/dist/gates/design.d.ts +1 -0
- package/dist/gates/design.js +6 -2
- package/dist/gates/implement.d.ts +1 -0
- package/dist/gates/implement.js +9 -2
- package/dist/gates/index.d.ts +5 -0
- package/dist/gates/plan.d.ts +1 -0
- package/dist/gates/plan.js +10 -4
- package/dist/gates/ship.d.ts +1 -0
- package/dist/gates/ship.js +4 -2
- package/dist/gitio.d.ts +30 -0
- package/dist/gitio.js +4 -1
- package/dist/glob.d.ts +2 -0
- package/dist/harness.d.ts +73 -0
- package/dist/harness.js +36 -15
- package/dist/history.d.ts +10 -0
- package/dist/idlists.d.ts +2 -0
- package/dist/install.d.ts +29 -0
- package/dist/journal.d.ts +74 -0
- package/dist/journal.js +5 -1
- package/dist/junit.d.ts +9 -0
- package/dist/live.d.ts +24 -0
- package/dist/lock.d.ts +9 -0
- package/dist/matcher.d.ts +8 -0
- package/dist/migration.d.ts +25 -0
- package/dist/model.d.ts +8 -0
- package/dist/models.d.ts +9 -0
- package/dist/models.js +10 -0
- package/dist/needs-you.d.ts +75 -0
- package/dist/needs-you.js +104 -40
- package/dist/needs.d.ts +44 -0
- package/dist/needs.js +37 -7
- package/dist/notify.d.ts +12 -0
- package/dist/opener.d.ts +15 -0
- package/dist/pin.d.ts +12 -0
- package/dist/pin.js +9 -2
- package/dist/principles.d.ts +3 -0
- package/dist/probe.d.ts +1 -0
- package/dist/progress.d.ts +3 -0
- package/dist/recommend.d.ts +31 -0
- package/dist/recommend.js +51 -42
- package/dist/refusal.d.ts +20 -0
- package/dist/refusal.js +12 -4
- package/dist/registry.d.ts +1 -0
- package/dist/released-comments.d.ts +1 -0
- package/dist/review.d.ts +27 -0
- package/dist/reviewed.d.ts +23 -0
- package/dist/reviewer.d.ts +47 -0
- package/dist/rounds.d.ts +135 -0
- package/dist/rounds.js +38 -21
- package/dist/runner-lock.d.ts +5 -0
- package/dist/runner.d.ts +30 -0
- package/dist/scan.d.ts +27 -0
- package/dist/schemas.d.ts +11 -0
- package/dist/schemas.js +7 -3
- package/dist/session-clock.d.ts +16 -0
- package/dist/settings.d.ts +73 -0
- package/dist/settings.js +12 -2
- package/dist/settle.d.ts +39 -0
- package/dist/settle.js +59 -30
- package/dist/sha.d.ts +5 -0
- package/dist/ship.d.ts +20 -0
- package/dist/ship.js +21 -12
- package/dist/slice.d.ts +45 -0
- package/dist/slice.js +2 -2
- package/dist/snapshot.d.ts +10 -0
- package/dist/spawn.d.ts +22 -0
- package/dist/stamp.d.ts +27 -0
- package/dist/stamp.js +3 -1
- package/dist/steps.d.ts +30 -0
- package/dist/steps.js +8 -3
- package/dist/toon.d.ts +17 -0
- package/dist/toon.js +150 -14
- package/dist/txn.d.ts +28 -0
- package/dist/usage.d.ts +25 -0
- package/dist/verbs/abandon.d.ts +2 -0
- package/dist/verbs/adopt.d.ts +2 -0
- package/dist/verbs/adopt.js +9 -4
- package/dist/verbs/ask.d.ts +2 -0
- package/dist/verbs/check.d.ts +2 -0
- package/dist/verbs/check.js +29 -10
- package/dist/verbs/clean.d.ts +2 -0
- package/dist/verbs/dashboard.d.ts +59 -0
- package/dist/verbs/dashboard.js +4 -2
- package/dist/verbs/decide.d.ts +34 -0
- package/dist/verbs/decide.js +95 -130
- package/dist/verbs/design.d.ts +2 -0
- package/dist/verbs/design.js +8 -5
- package/dist/verbs/diff.d.ts +2 -0
- package/dist/verbs/diff.js +4 -2
- package/dist/verbs/dismiss.d.ts +2 -0
- package/dist/verbs/dispatch.d.ts +2 -0
- package/dist/verbs/dispatch.js +2 -2
- package/dist/verbs/draft.d.ts +2 -0
- package/dist/verbs/draft.js +6 -3
- package/dist/verbs/drive.d.ts +2 -0
- package/dist/verbs/evidence.d.ts +5 -0
- package/dist/verbs/floor.d.ts +2 -0
- package/dist/verbs/gate.d.ts +3 -0
- package/dist/verbs/index-verb.d.ts +2 -0
- package/dist/verbs/init.d.ts +2 -0
- package/dist/verbs/log.d.ts +9 -0
- package/dist/verbs/migrate.d.ts +13 -0
- package/dist/verbs/next.d.ts +61 -0
- package/dist/verbs/next.js +112 -84
- package/dist/verbs/read.d.ts +2 -0
- package/dist/verbs/read.js +3 -1
- package/dist/verbs/recap.d.ts +28 -0
- package/dist/verbs/recap.js +3 -3
- package/dist/verbs/recover.d.ts +5 -0
- package/dist/verbs/recover.js +14 -9
- package/dist/verbs/rename.d.ts +2 -0
- package/dist/verbs/rename.js +1 -1
- package/dist/verbs/retry.d.ts +2 -0
- package/dist/verbs/review.d.ts +2 -0
- package/dist/verbs/review.js +1 -1
- package/dist/verbs/satisfy.d.ts +2 -0
- package/dist/verbs/ship.d.ts +3 -0
- package/dist/verbs/start.d.ts +2 -0
- package/dist/verbs/start.js +12 -7
- package/dist/verbs/step-close.d.ts +2 -0
- package/dist/verbs/sync.d.ts +15 -0
- package/dist/verbs/trust.d.ts +4 -0
- package/dist/verbs/trust.js +34 -32
- package/dist/verbs/turn.d.ts +2 -0
- package/dist/verbs/wait.d.ts +9 -0
- package/dist/verbs/wait.js +3 -3
- package/dist/verbs/write.d.ts +18 -0
- package/dist/verbs/write.js +11 -5
- package/dist/verdict.d.ts +60 -0
- package/dist/version.d.ts +4 -0
- package/dist/worker-stream.d.ts +22 -0
- package/dist/worktree.d.ts +22 -0
- package/dist/worktree.js +1 -1
- package/package.json +7 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/commands/witness.md +10 -10
- package/plugin/hooks/canon-guard.mjs +71 -10
- package/plugin/hooks/session-dashboard.sh +1 -1
- package/plugin/skills/witness-brainstorm/SKILL.md +3 -3
- package/plugin/skills/witness-decompose/SKILL.md +3 -3
- package/plugin/skills/witness-design/SKILL.md +2 -2
- package/plugin/skills/witness-implement/SKILL.md +2 -2
- package/plugin/skills/witness-plan/SKILL.md +2 -2
- package/plugin/skills/witness-ship/SKILL.md +2 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Ctx } from './cli.js';
|
|
2
|
+
import type { Harness } from './harness.js';
|
|
3
|
+
import { type Result, type Violation } from './refusal.js';
|
|
4
|
+
import { type InvokeExtras } from './reviewer.js';
|
|
5
|
+
import type { ReviewerVerdict } from './rounds.js';
|
|
6
|
+
import { type Reviewed } from './verdict.js';
|
|
7
|
+
export interface BatteryLens {
|
|
8
|
+
name: string;
|
|
9
|
+
prompt: string;
|
|
10
|
+
reviewed: Reviewed;
|
|
11
|
+
}
|
|
12
|
+
export interface BatteryRun {
|
|
13
|
+
verdicts: ReviewerVerdict[];
|
|
14
|
+
malformed: Array<{
|
|
15
|
+
reviewer: string;
|
|
16
|
+
violations: Violation[];
|
|
17
|
+
}>;
|
|
18
|
+
rerolled: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function runBattery(ctx: Ctx, harness: Harness, model: string, lenses: readonly BatteryLens[], opts: {
|
|
21
|
+
cwd: string;
|
|
22
|
+
pinField?: string;
|
|
23
|
+
} & InvokeExtras): Promise<Result<BatteryRun>>;
|
package/dist/bin.d.ts
ADDED
package/dist/caps.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Ctx } from './cli.js';
|
|
2
|
+
import type { DriveCaps } from './config.js';
|
|
3
|
+
import type { Entry } from './journal.js';
|
|
4
|
+
export type CapName = 'rounds' | 'upstream' | 'spawns' | 'wall-clock';
|
|
5
|
+
export interface TargetUse {
|
|
6
|
+
spawns: number;
|
|
7
|
+
ms: number;
|
|
8
|
+
}
|
|
9
|
+
export interface CapHit {
|
|
10
|
+
cap: CapName;
|
|
11
|
+
gate?: string;
|
|
12
|
+
note: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function capHit(entries: Entry[], use: TargetUse, caps: DriveCaps): CapHit | undefined;
|
|
15
|
+
export declare function parkAtCap(ctx: Ctx, root: string, target: string, hit: CapHit): Promise<{
|
|
16
|
+
parked: true;
|
|
17
|
+
} | {
|
|
18
|
+
parked: false;
|
|
19
|
+
why: string;
|
|
20
|
+
}>;
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { version } from './version.js';
|
|
2
|
+
export interface Ctx {
|
|
3
|
+
cwd: string;
|
|
4
|
+
env: Record<string, string | undefined>;
|
|
5
|
+
isTTY: boolean;
|
|
6
|
+
out: (line: string) => void;
|
|
7
|
+
err: (line: string) => void;
|
|
8
|
+
ask: (question: string) => Promise<string>;
|
|
9
|
+
}
|
|
10
|
+
export declare const EXIT: {
|
|
11
|
+
readonly OK: 0;
|
|
12
|
+
readonly FINDINGS: 1;
|
|
13
|
+
readonly REFUSED: 2;
|
|
14
|
+
readonly BLOCKED: 3;
|
|
15
|
+
};
|
|
16
|
+
export { version };
|
|
17
|
+
export declare function usage(): string;
|
|
18
|
+
export declare function main(ctx: Ctx, argv: string[]): Promise<number>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface HumanComments {
|
|
2
|
+
top: string[];
|
|
3
|
+
above: Map<string, string[]>;
|
|
4
|
+
end: string[];
|
|
5
|
+
}
|
|
6
|
+
export { inlineValue } from './settings.js';
|
|
7
|
+
export declare function renderConfig(values: Record<string, unknown>, comments?: HumanComments): string;
|
|
8
|
+
export declare function readComments(text: string): {
|
|
9
|
+
human: HumanComments;
|
|
10
|
+
legacy: number;
|
|
11
|
+
moved: number;
|
|
12
|
+
};
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { type Result, type Violation } from './refusal.js';
|
|
2
|
+
import { type Battery, type GateName, type Setting } from './settings.js';
|
|
3
|
+
export declare const SCHEMA_VERSION = 2;
|
|
4
|
+
export interface CanonPaths {
|
|
5
|
+
specs: string;
|
|
6
|
+
plans: string;
|
|
7
|
+
designs: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const DEFAULT_PATHS: CanonPaths;
|
|
10
|
+
export declare const DOC_KEYS: readonly ["conventions", "design"];
|
|
11
|
+
export type DocKey = (typeof DOC_KEYS)[number];
|
|
12
|
+
export type DocsRegistry = Partial<Record<DocKey, string[]>>;
|
|
13
|
+
export declare const DEFAULT_STEPS_PER_DISPATCH: number;
|
|
14
|
+
export interface ImplementConfig {
|
|
15
|
+
stepsPerDispatch: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const DEFAULT_CONTEXT_LIMIT: number;
|
|
18
|
+
export interface SessionConfig {
|
|
19
|
+
contextLimit: number;
|
|
20
|
+
}
|
|
21
|
+
export declare const DEFAULT_SESSION_TIMEOUT_MS: number;
|
|
22
|
+
export declare const DEFAULT_PARALLEL: number;
|
|
23
|
+
export interface DriveCaps {
|
|
24
|
+
rounds: number;
|
|
25
|
+
upstream: number;
|
|
26
|
+
spawns: number;
|
|
27
|
+
wallClockMs: number;
|
|
28
|
+
}
|
|
29
|
+
export declare const DEFAULT_CAPS: DriveCaps;
|
|
30
|
+
export interface DriveConfig {
|
|
31
|
+
sessionTimeoutMs: number;
|
|
32
|
+
parallel: number;
|
|
33
|
+
parallelSuites: boolean;
|
|
34
|
+
caps: DriveCaps;
|
|
35
|
+
}
|
|
36
|
+
export declare const DEFAULT_REVIEWER_TIMEOUT_MS: number;
|
|
37
|
+
export interface GateSettings {
|
|
38
|
+
model?: string;
|
|
39
|
+
reviewers: Battery;
|
|
40
|
+
}
|
|
41
|
+
export type GatesConfig = {
|
|
42
|
+
reviewerTimeoutMs: number;
|
|
43
|
+
} & Record<GateName, GateSettings>;
|
|
44
|
+
export interface CriteriaConfig {
|
|
45
|
+
runner?: string;
|
|
46
|
+
report?: string;
|
|
47
|
+
exclude: string[];
|
|
48
|
+
}
|
|
49
|
+
export type MergeStyle = 'merge' | 'squash' | 'rebase';
|
|
50
|
+
export interface ShipConfig {
|
|
51
|
+
test?: string;
|
|
52
|
+
lint?: string;
|
|
53
|
+
branch: string;
|
|
54
|
+
merge: MergeStyle;
|
|
55
|
+
ciSettleMs: number;
|
|
56
|
+
}
|
|
57
|
+
export declare const DEFAULT_CI_SETTLE_MS: number;
|
|
58
|
+
export declare const MAX_CI_SETTLE_MS = 1800000;
|
|
59
|
+
export interface Config {
|
|
60
|
+
schema: number;
|
|
61
|
+
paths: CanonPaths;
|
|
62
|
+
docs: DocsRegistry;
|
|
63
|
+
criteria: CriteriaConfig;
|
|
64
|
+
ship: ShipConfig;
|
|
65
|
+
harness?: string;
|
|
66
|
+
autonomy: boolean;
|
|
67
|
+
arbiter: {
|
|
68
|
+
model?: string;
|
|
69
|
+
};
|
|
70
|
+
session: SessionConfig;
|
|
71
|
+
implement: ImplementConfig;
|
|
72
|
+
gates: GatesConfig;
|
|
73
|
+
drive: DriveConfig;
|
|
74
|
+
warning?: string;
|
|
75
|
+
}
|
|
76
|
+
export type Resolved = Omit<Config, 'schema' | 'warning'>;
|
|
77
|
+
type Raw = Record<string, unknown>;
|
|
78
|
+
export declare function checkValue(s: Setting, val: unknown): Result<unknown>;
|
|
79
|
+
export declare function suggestionFor(path: string, known: ReadonlySet<string>): string | undefined;
|
|
80
|
+
export declare function unknownKey(path: string, known: ReadonlySet<string>): Violation;
|
|
81
|
+
export declare function keyViolations(raw: Raw, schema: number): Violation[];
|
|
82
|
+
export declare function resolveSettings(raw: Raw, mode: 'strict' | 'lenient'): Result<Resolved>;
|
|
83
|
+
export declare function resolvePaths(raw: Raw): Result<CanonPaths>;
|
|
84
|
+
export declare function resolveSession(raw: Raw): Result<SessionConfig>;
|
|
85
|
+
export declare function autonomyAt(root: string, rev: string): boolean;
|
|
86
|
+
export interface LocalConfig {
|
|
87
|
+
reviewerExtensions: string[];
|
|
88
|
+
opener?: string;
|
|
89
|
+
notify?: string;
|
|
90
|
+
}
|
|
91
|
+
export declare const localConfigPath: (root: string) => string;
|
|
92
|
+
export declare function loadLocalConfig(root: string): Result<LocalConfig>;
|
|
93
|
+
export declare function canonPaths(root: string): CanonPaths;
|
|
94
|
+
export declare const configPath: (root: string) => string;
|
|
95
|
+
export declare function loadConfig(root: string): Result<Config>;
|
|
96
|
+
export {};
|
package/dist/config.js
CHANGED
|
@@ -69,8 +69,9 @@ export function checkValue(s, val) {
|
|
|
69
69
|
return typeof val === 'boolean' ? ok(val) : invalid();
|
|
70
70
|
case 'enum':
|
|
71
71
|
return typeof val === 'string' && shape.values.includes(val) ? ok(val) : invalid();
|
|
72
|
+
// Row 239. A setting with a `pattern` holds only what it admits.
|
|
72
73
|
case 'text':
|
|
73
|
-
return typeof val === 'string' && val !== '' ? ok(val) : invalid();
|
|
74
|
+
return typeof val === 'string' && val !== '' && (s.pattern?.test(val) ?? true) ? ok(val) : invalid();
|
|
74
75
|
case 'dir':
|
|
75
76
|
return typeof val === 'string' && val !== '' ? relPath(field, val, 'directory') : invalid();
|
|
76
77
|
case 'files': {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ResolvedSpawn } from './spawn.js';
|
|
2
|
+
export declare const JOB_HOST_ENV = "WITNESS_JOB_HOST";
|
|
3
|
+
export declare const JOB_PROBE_EXIT = 86;
|
|
4
|
+
export type JobHost = {
|
|
5
|
+
ok: true;
|
|
6
|
+
file: string;
|
|
7
|
+
} | {
|
|
8
|
+
ok: false;
|
|
9
|
+
why: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const JOB_SCRIPT: string;
|
|
12
|
+
export declare function winArg(arg: string): string;
|
|
13
|
+
export declare function jobTail(run: ResolvedSpawn): string;
|
|
14
|
+
export declare function contained(run: ResolvedSpawn, host: JobHost): ResolvedSpawn;
|
|
15
|
+
export declare function jobHost(env: Record<string, string | undefined>, platform?: NodeJS.Platform): JobHost;
|
|
16
|
+
export declare function containmentLine(host: JobHost, platform?: NodeJS.Platform): string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { JournalCtx } from './journal.js';
|
|
2
|
+
type Env = Record<string, string | undefined>;
|
|
3
|
+
export declare const CONTEXT_ENV = "WITNESS_CONTEXT";
|
|
4
|
+
export interface Reading {
|
|
5
|
+
session: string;
|
|
6
|
+
tokens: number;
|
|
7
|
+
window: number;
|
|
8
|
+
}
|
|
9
|
+
export type Unmeasured = 'no adapter' | 'stale' | 'malformed' | 'no reading yet';
|
|
10
|
+
export type Fill = {
|
|
11
|
+
measured: true;
|
|
12
|
+
reading: Reading;
|
|
13
|
+
} | {
|
|
14
|
+
measured: false;
|
|
15
|
+
reason: Unmeasured;
|
|
16
|
+
};
|
|
17
|
+
export declare function sessionIdOf(env: Env): string | undefined;
|
|
18
|
+
export declare function sessionHash(id: string): string;
|
|
19
|
+
export declare function readFill(env: Env): Fill;
|
|
20
|
+
export declare function journalStamp(env: Env): JournalCtx | undefined;
|
|
21
|
+
export declare function withoutSession(env: Env): Env;
|
|
22
|
+
export declare function pctOf(tokens: number, window: number): number;
|
|
23
|
+
export declare function reached(tokens: number, window: number, limit: number): boolean;
|
|
24
|
+
export declare function windowLabel(window: number): string;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Ctx } from './cli.js';
|
|
2
|
+
import type { TestOutcome } from './junit.js';
|
|
3
|
+
import { type Result } from './refusal.js';
|
|
4
|
+
import type { GateCheck } from './rounds.js';
|
|
5
|
+
import type { CanonDoc } from './scan.js';
|
|
6
|
+
export interface CriterionOutcome {
|
|
7
|
+
id: string;
|
|
8
|
+
kind: 'test' | 'cmd';
|
|
9
|
+
ok: boolean;
|
|
10
|
+
detail: string;
|
|
11
|
+
untrusted?: string;
|
|
12
|
+
held?: string[];
|
|
13
|
+
}
|
|
14
|
+
export declare function criterionMark(c: CriterionOutcome): string;
|
|
15
|
+
export interface CriteriaResult {
|
|
16
|
+
spec: string;
|
|
17
|
+
sha: string;
|
|
18
|
+
ok: boolean;
|
|
19
|
+
mode: 'filtered' | 'full-suite';
|
|
20
|
+
tagCount: number;
|
|
21
|
+
criteria: CriterionOutcome[];
|
|
22
|
+
}
|
|
23
|
+
export declare function runCriteria(runRoot: string, ctx: Ctx, doc: CanonDoc, opts?: {
|
|
24
|
+
trustRoot?: string;
|
|
25
|
+
suite?: TestOutcome[];
|
|
26
|
+
}): Promise<Result<CriteriaResult>>;
|
|
27
|
+
export declare function laneCheck(lane: Result<CriteriaResult>): GateCheck;
|
package/dist/criteria.js
CHANGED
|
@@ -126,8 +126,9 @@ export function laneCheck(lane) {
|
|
|
126
126
|
: [];
|
|
127
127
|
// Row 179: a lane that passed with held criteria says so in its own record, so no reader
|
|
128
128
|
// of the gate-run can take the green for a verification of what was not run.
|
|
129
|
+
// Row 239 (B13): with the spec, so a surface rebuilds the command from the ids (`heldSatisfy`).
|
|
129
130
|
const held = lane.ok
|
|
130
|
-
? lane.value.criteria.flatMap((c) => (c.held ?? []).map((need) => ({ criterion: c.id, need, satisfy: satisfyCommand(lane.value.spec, need) })))
|
|
131
|
+
? lane.value.criteria.flatMap((c) => (c.held ?? []).map((need) => ({ criterion: c.id, need, satisfy: satisfyCommand(lane.value.spec, need), spec: lane.value.spec })))
|
|
131
132
|
: [];
|
|
132
133
|
return {
|
|
133
134
|
name: 'drift-lane',
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type Act } from './act.js';
|
|
2
|
+
import type { Config } from './config.js';
|
|
3
|
+
import { type GateRunView } from './gate-run-view.js';
|
|
4
|
+
import './gates/index.js';
|
|
5
|
+
import { type PolicyPin } from './journal.js';
|
|
6
|
+
import { type Decision } from './recommend.js';
|
|
7
|
+
import { type DecisionEntry } from './rounds.js';
|
|
8
|
+
import { type Canon } from './scan.js';
|
|
9
|
+
import type { GateName } from './settings.js';
|
|
10
|
+
export interface LastRun {
|
|
11
|
+
round: number;
|
|
12
|
+
sha: string;
|
|
13
|
+
outcome: string;
|
|
14
|
+
}
|
|
15
|
+
export type Disposition = Pick<DecisionEntry, 'decision' | 'selected' | 'arbiter' | 'reason' | 'note'>;
|
|
16
|
+
export type DecideView = {
|
|
17
|
+
gate: string;
|
|
18
|
+
target: string;
|
|
19
|
+
autonomy: boolean;
|
|
20
|
+
} & ({
|
|
21
|
+
state: 'no-runs';
|
|
22
|
+
} | {
|
|
23
|
+
state: 'reopened';
|
|
24
|
+
by: {
|
|
25
|
+
gate: string;
|
|
26
|
+
artifact: string;
|
|
27
|
+
round: number;
|
|
28
|
+
};
|
|
29
|
+
note?: string;
|
|
30
|
+
last: LastRun;
|
|
31
|
+
disposition?: Disposition;
|
|
32
|
+
exits: Act[];
|
|
33
|
+
} | {
|
|
34
|
+
state: 'settled';
|
|
35
|
+
disposition: Disposition;
|
|
36
|
+
last: LastRun;
|
|
37
|
+
} | {
|
|
38
|
+
state: 'actionable';
|
|
39
|
+
run: GateRunView;
|
|
40
|
+
pins: PolicyPin[];
|
|
41
|
+
disposition?: Disposition;
|
|
42
|
+
block?: Decision;
|
|
43
|
+
exits: Act[];
|
|
44
|
+
});
|
|
45
|
+
export declare function decideView(root: string, cfg: Config, canon: Canon, gate: GateName, target: string): DecideView;
|
|
46
|
+
export declare function decideViewLines(view: DecideView): string[];
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { cliAct, exitsLine } from './act.js';
|
|
2
|
+
import { untrustedCmdsFor } from './allowlist.js';
|
|
3
|
+
import { autonomyLines, decidedBy } from './autonomy.js';
|
|
4
|
+
import { gateSpec } from './gate.js';
|
|
5
|
+
import { gateRunLines, gateRunView } from './gate-run-view.js';
|
|
6
|
+
// The gate specs `decideView` reads (`currentSha`, `upstreamOf`): registered by loading this
|
|
7
|
+
// module, so a reader with no CLI around it (the UI) gets them as the decide verb does.
|
|
8
|
+
import './gates/index.js';
|
|
9
|
+
import { policyPins, readStream } from './journal.js';
|
|
10
|
+
import { liftedHolds } from './needs.js';
|
|
11
|
+
import { recommend, renderDecision } from './recommend.js';
|
|
12
|
+
import { exitActs, lastGateRun, openReopen } from './rounds.js';
|
|
13
|
+
import { criteriaOwner } from './scan.js';
|
|
14
|
+
import { short } from './sha.js';
|
|
15
|
+
import { cmd, kv, rows } from './toon.js';
|
|
16
|
+
// The record's fields the screen reads, each present only when the record carries it.
|
|
17
|
+
function dispositionOf(d) {
|
|
18
|
+
return {
|
|
19
|
+
decision: d.decision,
|
|
20
|
+
...(d.selected !== undefined ? { selected: d.selected } : {}),
|
|
21
|
+
...(d.arbiter !== undefined ? { arbiter: d.arbiter } : {}),
|
|
22
|
+
...(d.reason !== undefined ? { reason: d.reason } : {}),
|
|
23
|
+
...(d.note !== undefined ? { note: d.note } : {}),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export function decideView(root, cfg, canon, gate, target) {
|
|
27
|
+
const spec = gateSpec(gate);
|
|
28
|
+
if (spec === undefined)
|
|
29
|
+
throw new Error(`gate ${gate} is not registered`);
|
|
30
|
+
const entries = readStream(root, target);
|
|
31
|
+
const last = lastGateRun(entries, gate);
|
|
32
|
+
const upstream = spec.upstreamOf?.(root, canon, target);
|
|
33
|
+
const head = { gate, target, autonomy: cfg.autonomy };
|
|
34
|
+
if (!last)
|
|
35
|
+
return { ...head, state: 'no-runs' };
|
|
36
|
+
const reopen = openReopen(entries, gate);
|
|
37
|
+
const decisionsAfter = entries
|
|
38
|
+
.slice(entries.lastIndexOf(last) + 1)
|
|
39
|
+
.filter((e) => e.t === 'human-decision' && e.gate === gate)
|
|
40
|
+
.map((e) => e);
|
|
41
|
+
// A caused_by decision is a REOPEN, not a disposition — it can never settle the run
|
|
42
|
+
// above it, and pairing the two is what presented 15 settled findings as current.
|
|
43
|
+
// The LAST disposition is the state (D94): `find` returned the first, so a
|
|
44
|
+
// revise→approve reported `decision: revise` on a gate that is settled.
|
|
45
|
+
const decided = decisionsAfter.filter((d) => d.caused_by === undefined).at(-1);
|
|
46
|
+
const disposition = decided === undefined ? undefined : dispositionOf(decided);
|
|
47
|
+
// Staleness is a fact about content, not about being reopened. Hardcoding it printed
|
|
48
|
+
// `witness gate …` in the one state where the gate answers changed-nothing. An
|
|
49
|
+
// uncomputable sha is NOT staleness — same doctrine as the approve-time check.
|
|
50
|
+
const shownSha = spec.currentSha?.(root, canon, cfg, target);
|
|
51
|
+
const stale = (shownSha !== undefined && shownSha !== last.reviewed_sha) ||
|
|
52
|
+
liftedHolds(criteriaOwner(canon, target), last).length > 0;
|
|
53
|
+
const lastRun = { round: last.round, sha: short(last.reviewed_sha), outcome: last.outcome };
|
|
54
|
+
if (reopen) {
|
|
55
|
+
const by = reopen.caused_by;
|
|
56
|
+
return {
|
|
57
|
+
...head, state: 'reopened', by: { gate: by.gate, artifact: by.artifact, round: by.round },
|
|
58
|
+
...(reopen.note !== undefined ? { note: reopen.note } : {}),
|
|
59
|
+
last: lastRun, ...(disposition ? { disposition } : {}),
|
|
60
|
+
exits: exitActs(gate, target, entries, stale, upstream),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (disposition && disposition.decision !== 'revise' && disposition.decision !== 'revise-upstream') {
|
|
64
|
+
return { ...head, state: 'settled', disposition, last: lastRun };
|
|
65
|
+
}
|
|
66
|
+
// pending (no disposition) or revise (the author's input): the verdict is actionable
|
|
67
|
+
// The surface a human actually reads while deciding, so it is the one that most owes a
|
|
68
|
+
// ranking rather than a menu. `undefined` is stale with no decision pending, where no
|
|
69
|
+
// act but the re-gate is legal and the exits line already says exactly that (D131).
|
|
70
|
+
// D154: the block's trusting twins name the artifact's `cmd:` criteria this repo does not
|
|
71
|
+
// trust yet.
|
|
72
|
+
const block = recommend({
|
|
73
|
+
gate, target, entries, upstream, stale, untrustedCmds: untrustedCmdsFor(root, criteriaOwner(canon, target)),
|
|
74
|
+
});
|
|
75
|
+
return {
|
|
76
|
+
...head, state: 'actionable', run: gateRunView(last, 'ran', entries), pins: policyPins(entries),
|
|
77
|
+
...(disposition ? { disposition } : {}), ...(block ? { block } : {}),
|
|
78
|
+
exits: exitActs(gate, target, entries, stale, upstream),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
// Rows 139/203. The screen `decide --show` prints, from its view, in the verb's order: the
|
|
82
|
+
// autonomy setting, then the state. A table is one element, its rows joined, as the verb has
|
|
83
|
+
// always printed it (`gateRunLines`).
|
|
84
|
+
export function decideViewLines(view) {
|
|
85
|
+
const out = [...autonomyLines(view)];
|
|
86
|
+
const { gate, target } = view;
|
|
87
|
+
if (view.state === 'no-runs') {
|
|
88
|
+
out.push(kv('decide', `no gate-runs for ${gate} ${target}`));
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
if (view.state === 'reopened') {
|
|
92
|
+
out.push(kv('gate', gate));
|
|
93
|
+
out.push(kv('target', target));
|
|
94
|
+
out.push(kv('state', 'reopened — the gate must run again'));
|
|
95
|
+
out.push(kv('reopened-by', `${view.by.gate} ${view.by.artifact} (round ${view.by.round})`));
|
|
96
|
+
if (view.note)
|
|
97
|
+
out.push(kv('note', view.note));
|
|
98
|
+
// Row 239. The log it names is an act's line, here and on the settled screen below.
|
|
99
|
+
out.push(kv('last-run', `round ${view.last.round} @${view.last.sha} — ${view.last.outcome}${view.disposition ? `, ${view.disposition.decision}` : ''} · ${cliAct('log', target).line}`));
|
|
100
|
+
out.push(cmd('exits', exitsLine(view.exits)));
|
|
101
|
+
return out;
|
|
102
|
+
}
|
|
103
|
+
if (view.state === 'settled') {
|
|
104
|
+
const d = view.disposition;
|
|
105
|
+
out.push(kv('gate', gate));
|
|
106
|
+
out.push(kv('target', target));
|
|
107
|
+
out.push(kv('state', `settled — ${d.decision}`));
|
|
108
|
+
out.push(kv('decided-by', decidedBy(d)));
|
|
109
|
+
if (d.reason)
|
|
110
|
+
out.push(kv('reason', d.reason));
|
|
111
|
+
if (d.note)
|
|
112
|
+
out.push(kv('note', d.note));
|
|
113
|
+
out.push(kv('last-run', `round ${view.last.round} @${view.last.sha} — ${view.last.outcome} · ${cliAct('log', target).line}`));
|
|
114
|
+
// no exits: the gate is genuinely terminal here. Point at the one verb that owns
|
|
115
|
+
// what comes next rather than re-deriving routing in a second place (D101).
|
|
116
|
+
out.push('help: witness next');
|
|
117
|
+
return out;
|
|
118
|
+
}
|
|
119
|
+
out.push(...gateRunLines(view.run));
|
|
120
|
+
if (view.pins.length > 0) {
|
|
121
|
+
out.push(rows('pins', ['ordinal', 'text'], view.pins.map((p) => ({ ordinal: p.ordinal, text: p.text }))).join('\n'));
|
|
122
|
+
}
|
|
123
|
+
if (view.disposition) {
|
|
124
|
+
const d = view.disposition;
|
|
125
|
+
out.push(kv('decision', d.decision));
|
|
126
|
+
out.push(kv('decided-by', decidedBy(d)));
|
|
127
|
+
if (d.reason)
|
|
128
|
+
out.push(kv('reason', d.reason));
|
|
129
|
+
if (d.note)
|
|
130
|
+
out.push(kv('note', d.note));
|
|
131
|
+
}
|
|
132
|
+
if (view.block)
|
|
133
|
+
out.push(...renderDecision(view.block));
|
|
134
|
+
else
|
|
135
|
+
out.push(cmd('exits', exitsLine(view.exits)));
|
|
136
|
+
return out;
|
|
137
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type RecapEntry } from './journal.js';
|
|
2
|
+
import type { CanonDoc } from './scan.js';
|
|
3
|
+
export type RecapDecision = {
|
|
4
|
+
id: string;
|
|
5
|
+
text: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function carriedDecisions(root: string, doc: CanonDoc): {
|
|
8
|
+
effort: string;
|
|
9
|
+
decisions: RecapDecision[];
|
|
10
|
+
} | undefined;
|
|
11
|
+
export declare function canonicalDecisions(decisions: readonly RecapDecision[]): RecapDecision[];
|
|
12
|
+
export declare function decisionsSha(decisions: readonly RecapDecision[]): string | undefined;
|
|
13
|
+
export type DecisionChange = {
|
|
14
|
+
id: string;
|
|
15
|
+
change: 'added' | 'changed' | 'removed';
|
|
16
|
+
text: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function decisionDelta(root: string, base: {
|
|
19
|
+
planId?: string;
|
|
20
|
+
decisions?: string;
|
|
21
|
+
}, spec: CanonDoc): DecisionChange[] | undefined;
|
|
22
|
+
export declare function decisionLines(root: string, doc: CanonDoc): string[];
|
|
23
|
+
export declare function recapLines(recap: RecapEntry): string[];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Entry, EntryType } from './journal.js';
|
|
2
|
+
export type DeferralKind = 'artifact-debt' | 'lens-suspicion';
|
|
3
|
+
export type DismissCause = 'superseded' | 'lens-retired' | 'judged-wrong';
|
|
4
|
+
export declare const DISMISS_CAUSES: readonly DismissCause[];
|
|
5
|
+
export interface DeferralEntry {
|
|
6
|
+
v: 1;
|
|
7
|
+
t: 'deferral';
|
|
8
|
+
id: string;
|
|
9
|
+
artifact: string;
|
|
10
|
+
gate: string;
|
|
11
|
+
round: number;
|
|
12
|
+
anchor: string;
|
|
13
|
+
kind: DeferralKind;
|
|
14
|
+
caused_by_run: string;
|
|
15
|
+
moved_from?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const newDeferralId: () => string;
|
|
18
|
+
export declare function openDeferrals(entries: Entry[]): DeferralEntry[];
|
|
19
|
+
export declare function deferralsBlock(open: DeferralEntry[]): string;
|
|
20
|
+
export declare function deferralMoves(entries: Entry[], from: string, to: string, which?: (d: DeferralEntry) => boolean): Array<{
|
|
21
|
+
stream: string;
|
|
22
|
+
entry: {
|
|
23
|
+
t: EntryType;
|
|
24
|
+
[k: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
}>;
|
package/dist/delta.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Entry } from './journal.js';
|
|
2
|
+
import { type Lens } from './reviewer.js';
|
|
3
|
+
import { type GateRunEntry, type ReviewerVerdict } from './rounds.js';
|
|
4
|
+
import { type AnchorInput, type Reviewed } from './verdict.js';
|
|
5
|
+
export type UnitState = 'changed' | 'unchanged' | 'context';
|
|
6
|
+
export interface DeltaView {
|
|
7
|
+
state(anchor: AnchorInput): UnitState;
|
|
8
|
+
}
|
|
9
|
+
export declare function deltaView(root: string, reviewed: Reviewed, from: string, to: string): DeltaView;
|
|
10
|
+
export interface PriorFinding {
|
|
11
|
+
reviewer: string;
|
|
12
|
+
anchor: AnchorInput;
|
|
13
|
+
claim: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function reportedBy(prior: readonly AnchorInput[], paths: boolean): (a: AnchorInput) => boolean;
|
|
16
|
+
export interface DeltaPlan {
|
|
17
|
+
base: GateRunEntry;
|
|
18
|
+
baseRound: number;
|
|
19
|
+
prior: PriorFinding[];
|
|
20
|
+
reported: (a: AnchorInput) => boolean;
|
|
21
|
+
view: DeltaView;
|
|
22
|
+
diff: string;
|
|
23
|
+
sections?: string[];
|
|
24
|
+
paths?: string[];
|
|
25
|
+
}
|
|
26
|
+
export declare function planDelta(root: string, entries: Entry[], gate: string, cur: {
|
|
27
|
+
reviewedSha: string;
|
|
28
|
+
snapshot?: {
|
|
29
|
+
tree: string;
|
|
30
|
+
context: string;
|
|
31
|
+
};
|
|
32
|
+
basis: string;
|
|
33
|
+
reviewed: Reviewed;
|
|
34
|
+
inDelta: (lens: string) => boolean;
|
|
35
|
+
}): DeltaPlan | undefined;
|
|
36
|
+
export declare function deltaBlock(d: {
|
|
37
|
+
baseRound: number;
|
|
38
|
+
prior: readonly PriorFinding[];
|
|
39
|
+
diff: string;
|
|
40
|
+
sections?: readonly string[];
|
|
41
|
+
paths?: readonly string[];
|
|
42
|
+
}): string;
|
|
43
|
+
export declare function contextDigest(...parts: string[]): string;
|
|
44
|
+
export declare function basisSha(lenses: readonly Lens[], context: string, pin: string, harness: string): string;
|
|
45
|
+
export declare function demote(verdicts: ReviewerVerdict[], d: {
|
|
46
|
+
baseRound: number;
|
|
47
|
+
reported: (a: AnchorInput) => boolean;
|
|
48
|
+
view: DeltaView;
|
|
49
|
+
}, inDelta: (lens: string) => boolean): ReviewerVerdict[];
|
|
50
|
+
export interface OutstandingDemotion {
|
|
51
|
+
reviewer: string;
|
|
52
|
+
anchor: AnchorInput;
|
|
53
|
+
claim: string;
|
|
54
|
+
round: number;
|
|
55
|
+
since: number;
|
|
56
|
+
}
|
|
57
|
+
export declare function outstandingDemotions(entries: Entry[], gate: string): OutstandingDemotion[];
|
|
58
|
+
export declare function demotionsBlock(gate: string, list: readonly OutstandingDemotion[]): string;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { CanonPaths } from './config.js';
|
|
2
|
+
import { type RawDoc } from './fm.js';
|
|
3
|
+
import { type Entry, type EntryType, type StatusEntry } from './journal.js';
|
|
4
|
+
import { type Violation } from './refusal.js';
|
|
5
|
+
import { type Canon, type CanonDoc } from './scan.js';
|
|
6
|
+
export declare function canonExit(entries: Entry[]): StatusEntry | undefined;
|
|
7
|
+
export declare function departedStreams(root: string, canon: Canon): string[];
|
|
8
|
+
export interface Departure {
|
|
9
|
+
entry: StatusEntry;
|
|
10
|
+
files: string[];
|
|
11
|
+
remove: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function prepareDeparture(root: string, paths: CanonPaths, spec: CanonDoc, entry: StatusEntry): Departure;
|
|
14
|
+
export interface Return {
|
|
15
|
+
entry: StatusEntry;
|
|
16
|
+
files: string[];
|
|
17
|
+
restore: () => void;
|
|
18
|
+
moves: Array<{
|
|
19
|
+
stream: string;
|
|
20
|
+
entry: {
|
|
21
|
+
t: EntryType;
|
|
22
|
+
[k: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
rel: string;
|
|
26
|
+
by: string;
|
|
27
|
+
depends: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface Way {
|
|
30
|
+
returns: Return[];
|
|
31
|
+
unwound: StatusEntry[];
|
|
32
|
+
}
|
|
33
|
+
export interface WriteAct {
|
|
34
|
+
effort: string;
|
|
35
|
+
commit: string;
|
|
36
|
+
created: boolean;
|
|
37
|
+
}
|
|
38
|
+
export type TakenBack = (id: string, sha: string, rel: string, at: string) => WriteAct | undefined;
|
|
39
|
+
export interface At {
|
|
40
|
+
src: string;
|
|
41
|
+
blob: Buffer;
|
|
42
|
+
doc: RawDoc;
|
|
43
|
+
}
|
|
44
|
+
export type Walked = ({
|
|
45
|
+
end: 'content';
|
|
46
|
+
passed: WriteAct[];
|
|
47
|
+
} & At) | {
|
|
48
|
+
end: 'create';
|
|
49
|
+
act: WriteAct;
|
|
50
|
+
passed: WriteAct[];
|
|
51
|
+
} | {
|
|
52
|
+
end: 'lost';
|
|
53
|
+
act: WriteAct;
|
|
54
|
+
passed: WriteAct[];
|
|
55
|
+
at?: At;
|
|
56
|
+
};
|
|
57
|
+
export declare function walkBack(root: string, rel: string, id: string, at: At, takenBack: TakenBack, seen: Set<string>): Walked;
|
|
58
|
+
export declare function takeBack(root: string, rel: string, id: string, act: WriteAct, takenBack: TakenBack): Walked | {
|
|
59
|
+
end: 'unreadable';
|
|
60
|
+
src: string;
|
|
61
|
+
blob: Buffer;
|
|
62
|
+
passed: WriteAct[];
|
|
63
|
+
};
|
|
64
|
+
export declare function prepareReturns(root: string, paths: CanonPaths, commit: string, successor: string, takenBack?: TakenBack): Way;
|
|
65
|
+
export declare function idRetired(root: string, id: string, type: string): Violation | undefined;
|
|
66
|
+
export declare function pathRetired(root: string, canon: Canon, rel: string, id: string): Violation | undefined;
|
package/dist/design.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CanonPaths } from './config.js';
|
|
2
|
+
import { type Entry } from './journal.js';
|
|
3
|
+
import { type Violation } from './refusal.js';
|
|
4
|
+
import type { CanonDoc } from './scan.js';
|
|
5
|
+
import type { Reviewed } from './verdict.js';
|
|
6
|
+
export declare function elementIds(html: string): string[];
|
|
7
|
+
export type ControlKind = 'select' | 'details' | 'dialog' | 'popover' | 'menu' | 'listbox' | 'tooltip' | 'tabpanel' | 'alertdialog' | 'collapsed' | 'hidden' | 'template';
|
|
8
|
+
export type LookControl = {
|
|
9
|
+
anchor: string;
|
|
10
|
+
line: number;
|
|
11
|
+
kind: ControlKind;
|
|
12
|
+
holds: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const CONTROLS_NOTE = "from markup only \u2014 states a CSS class or a script draws, :hover and :focus styles, and content past a scrolling pane are not listed; read the source for those";
|
|
15
|
+
export declare function lookControls(html: string): LookControl[];
|
|
16
|
+
export declare function controlsBlock(html: string): string[];
|
|
17
|
+
export declare function designReviewed(html: string | undefined, spec: CanonDoc): {
|
|
18
|
+
reviewed: Reviewed;
|
|
19
|
+
promptBody: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function validateDesignArtifact(html: string): Violation[];
|
|
22
|
+
export declare function htmlSha(html: string): string;
|
|
23
|
+
export declare function designPairSha(html: string, spec: CanonDoc): string;
|
|
24
|
+
export declare function designGateSha(html: string | undefined, spec: CanonDoc): string;
|
|
25
|
+
export declare function designCurrentSha(root: string, paths: CanonPaths, spec: CanonDoc): string;
|
|
26
|
+
export declare function designRel(paths: CanonPaths, specId: string): string;
|
|
27
|
+
export declare function designStamp(spec: CanonDoc): {
|
|
28
|
+
sha: string;
|
|
29
|
+
spec: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
export declare function designPending(root: string, spec: CanonDoc): boolean;
|
|
32
|
+
export declare function designArtifactCurrent(root: string, spec: CanonDoc): boolean;
|
|
33
|
+
export declare function designShown(entries: Entry[], sha: string): boolean;
|
|
34
|
+
export declare function designUnseen(root: string, paths: CanonPaths, specId: string): string | undefined;
|