@am_shork/attest 0.2.1 → 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/CHANGELOG.md +655 -79
- package/README.md +132 -18
- package/dist/cli/index.js +91 -21
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/json.d.ts +52 -5
- package/dist/cli/json.d.ts.map +1 -1
- package/dist/cli/json.js +50 -2
- package/dist/cli/json.js.map +1 -1
- package/dist/cli/report.d.ts +28 -1
- package/dist/cli/report.d.ts.map +1 -1
- package/dist/cli/report.js +100 -1
- package/dist/cli/report.js.map +1 -1
- package/dist/core/apply.d.ts +8 -0
- package/dist/core/apply.d.ts.map +1 -1
- package/dist/core/apply.js +10 -0
- package/dist/core/apply.js.map +1 -1
- package/dist/core/gate.d.ts +36 -10
- package/dist/core/gate.d.ts.map +1 -1
- package/dist/core/gate.js +59 -12
- package/dist/core/gate.js.map +1 -1
- package/dist/core/loader.d.ts +8 -0
- package/dist/core/loader.d.ts.map +1 -1
- package/dist/core/loader.js +1 -0
- package/dist/core/loader.js.map +1 -1
- package/dist/core/locate.d.ts +4 -0
- package/dist/core/locate.d.ts.map +1 -1
- package/dist/core/locate.js +8 -3
- package/dist/core/locate.js.map +1 -1
- package/dist/core/paths.d.ts +15 -0
- package/dist/core/paths.d.ts.map +1 -0
- package/dist/core/paths.js +36 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/pipeline.d.ts +63 -2
- package/dist/core/pipeline.d.ts.map +1 -1
- package/dist/core/pipeline.js +190 -34
- package/dist/core/pipeline.js.map +1 -1
- package/dist/core/red-record.d.ts +50 -0
- package/dist/core/red-record.d.ts.map +1 -0
- package/dist/core/red-record.js +148 -0
- package/dist/core/red-record.js.map +1 -0
- package/dist/core/render.d.ts +1 -1
- package/dist/core/render.d.ts.map +1 -1
- package/dist/core/render.js +16 -2
- package/dist/core/render.js.map +1 -1
- package/dist/core/runner.d.ts.map +1 -1
- package/dist/core/runner.js +16 -6
- package/dist/core/runner.js.map +1 -1
- package/dist/core/skill.d.ts +23 -0
- package/dist/core/skill.d.ts.map +1 -0
- package/dist/core/skill.js +276 -0
- package/dist/core/skill.js.map +1 -0
- package/dist/core/static-registry.d.ts +28 -0
- package/dist/core/static-registry.d.ts.map +1 -1
- package/dist/core/static-registry.js +86 -25
- package/dist/core/static-registry.js.map +1 -1
- package/dist/core/status.d.ts +39 -0
- package/dist/core/status.d.ts.map +1 -0
- package/dist/core/status.js +64 -0
- package/dist/core/status.js.map +1 -0
- package/dist/core/targets.d.ts +52 -0
- package/dist/core/targets.d.ts.map +1 -0
- package/dist/core/targets.js +141 -0
- package/dist/core/targets.js.map +1 -0
- package/dist/core/types.d.ts +13 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/validator.d.ts +11 -0
- package/dist/core/validator.d.ts.map +1 -1
- package/dist/core/validator.js +28 -12
- package/dist/core/validator.js.map +1 -1
- package/dist/core/write.d.ts +2 -0
- package/dist/core/write.d.ts.map +1 -0
- package/dist/core/write.js +21 -0
- package/dist/core/write.js.map +1 -0
- package/dist/runtime.d.ts +9 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +10 -2
- package/dist/runtime.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,6 +72,12 @@ requirement('AUTH-3', () => {
|
|
|
72
72
|
});
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
+
`scenario` takes an optional third argument, a timeout in milliseconds, forwarded
|
|
76
|
+
to Vitest's `it`. The run is isolated (see [What a run actually
|
|
77
|
+
runs](#what-a-run-actually-runs)), so Vitest's default applies unless a scenario
|
|
78
|
+
says otherwise — worth setting on anything that drives a subprocess, a container
|
|
79
|
+
or a build.
|
|
80
|
+
|
|
75
81
|
**3. Run the engine:**
|
|
76
82
|
|
|
77
83
|
```bash
|
|
@@ -82,19 +88,87 @@ attest verify # run tests + coverage + drift, graded report
|
|
|
82
88
|
attest cover # which requirements lack a scenario
|
|
83
89
|
attest render # the requirements as Markdown, for people who don't read TS
|
|
84
90
|
attest archive <change> # gate a proposed change: green + covered + no drift
|
|
91
|
+
attest status <change> # what that gate still wants, without running anything
|
|
85
92
|
```
|
|
86
93
|
|
|
87
94
|
`<change>` names one directory inside `changes/` — it cannot be empty, `.`,
|
|
88
|
-
`..`, or contain a path separator, since the
|
|
89
|
-
|
|
95
|
+
`..`, or contain a path separator, since the name is interpolated into a path
|
|
96
|
+
whose module the gate then loads and runs. Both commands check it before
|
|
97
|
+
resolving anything on its behalf. Any other directory name is fine.
|
|
98
|
+
|
|
99
|
+
`status` is the mid-flight view `archive` cannot give you: it reports each
|
|
100
|
+
requirement the change adds as `no-scenario`, `unproven` (a scenario exists but
|
|
101
|
+
has never been seen failing) or `proven`, reading the delta, the specs and
|
|
102
|
+
`first-run.json` — no suite run, no project code. Every state is named after the
|
|
103
|
+
issue the gate will raise, and it uses the gate's own predicate, so the two
|
|
104
|
+
cannot disagree. What it deliberately cannot tell you is whether the tests pass:
|
|
105
|
+
|
|
106
|
+
```console
|
|
107
|
+
$ attest status add-2fa
|
|
108
|
+
Change: add-2fa
|
|
109
|
+
✓ AUTH-7 2 scenarios, seen red
|
|
110
|
+
● AUTH-8 1 never run
|
|
111
|
+
✗ AUTH-9 no scenario yet
|
|
112
|
+
— 3 added requirements, 1 ready to archive
|
|
113
|
+
Not a verdict: run `attest archive add-2fa` to run the suite.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
It exits 0 there. Unmet obligations are the normal state of a change in flight,
|
|
117
|
+
so they are rows, never a failing verdict — only a delta it could not read makes
|
|
118
|
+
`status` fail. `archive` remains the one command that says "done".
|
|
119
|
+
|
|
120
|
+
### Working with an agent
|
|
121
|
+
|
|
122
|
+
The engine above is only half the framework. The other half is the workflow —
|
|
123
|
+
agree on intent, write the delta, drive the scenarios red, then implement to
|
|
124
|
+
green — and it is written for an agent to follow:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
attest init # .claude/skills/attest/SKILL.md
|
|
128
|
+
attest init --target cursor # .cursor/rules/attest.mdc
|
|
129
|
+
attest init --target copilot # .github/instructions/attest.instructions.md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Each target gets the same document; only the frontmatter differs, because that
|
|
133
|
+
is the part the tool parses rather than the part the agent follows.
|
|
134
|
+
|
|
135
|
+
That document carries the workflow: how to write a `changes/<name>/` delta, why
|
|
136
|
+
its scenarios have to be red before you implement, what `attest archive` blocks
|
|
137
|
+
on, and the three shortcuts that turn the gate green without changing anything.
|
|
138
|
+
"Red before you implement" is enforced rather than advised: `archive` records how
|
|
139
|
+
each of a change's scenarios ended on its first run, into
|
|
140
|
+
`changes/<name>/first-run.json`, and blocks with `never-red` on any requirement
|
|
141
|
+
the delta adds whose scenarios were never seen to fail. Commit `first-run.json`
|
|
142
|
+
with the change — it is the evidence, and CI has to reach the same verdict as
|
|
143
|
+
you do.
|
|
144
|
+
An agent loads it on its own — its description is already in the agent's
|
|
145
|
+
context, or its path matches what you have open — so nothing has to be found or
|
|
146
|
+
pasted, and nothing is resident when you are working on something else.
|
|
147
|
+
|
|
148
|
+
`--target` is repeatable, and a name that is not a known target writes nothing
|
|
149
|
+
at all — an `unknown-target` error naming the ones that would have worked. An
|
|
150
|
+
agent whose instructions live in a file your *project* owns — `AGENTS.md`,
|
|
151
|
+
`CLAUDE.md` — is deliberately not a target: Attest writes whole files at paths it
|
|
152
|
+
names and never edits a document you maintain, so what covers those is one line
|
|
153
|
+
you add there yourself, pointing at the file above. It is cheaper than a
|
|
154
|
+
generated block and it cannot go stale.
|
|
155
|
+
|
|
156
|
+
There is deliberately **no `--check`**. The file is a function of the version you
|
|
157
|
+
installed, so gating it would turn CI red on upgrades you did nothing to cause,
|
|
158
|
+
and the remedy would be a commit containing no decision. `init` is idempotent
|
|
159
|
+
instead: re-run it after upgrading, and that is the whole update mechanism.
|
|
160
|
+
|
|
161
|
+
It also writes nothing else — no registry, no `package.json` scripts, no
|
|
162
|
+
`changes/` skeleton. A generated registry is either empty (an `empty-spec` error
|
|
163
|
+
on day one) or invented, and invented requirements are worse than none.
|
|
90
164
|
|
|
91
165
|
### A registry is a literal
|
|
92
166
|
|
|
93
|
-
`check`, `cover` and `
|
|
94
|
-
with the TypeScript compiler API. They never execute them. That is
|
|
95
|
-
`attest check` safe to run where its description implies you can —
|
|
96
|
-
pipeline, on an untrusted fork MR, outside whatever sandbox you give
|
|
97
|
-
(`verify` and `archive` do run your suite, so they read the registry by
|
|
167
|
+
`check`, `cover`, `render` and `status` read your `*.reqs.ts` files from their
|
|
168
|
+
**source**, with the TypeScript compiler API. They never execute them. That is
|
|
169
|
+
what makes `attest check` safe to run where its description implies you can —
|
|
170
|
+
first in the pipeline, on an untrusted fork MR, outside whatever sandbox you give
|
|
171
|
+
the tests. (`verify` and `archive` do run your suite, so they read the registry by
|
|
98
172
|
evaluating it: there is nothing left to protect at that point.)
|
|
99
173
|
|
|
100
174
|
The cost is a contract: every value in a registry must be written in the
|
|
@@ -116,12 +190,20 @@ This is reported as a `registry-not-static` ERROR pointing at the line. It is
|
|
|
116
190
|
not only a tooling limit: the single-source rule says the requirement owns that
|
|
117
191
|
number, and importing it says the application owns it. Inline the value and read
|
|
118
192
|
it from the registry in your code — that is the fix. If you need the old
|
|
119
|
-
behaviour instead, `--eval` restores it on
|
|
193
|
+
behaviour instead, `--eval` restores it on every one of those commands:
|
|
120
194
|
|
|
121
195
|
```bash
|
|
122
196
|
attest check --eval # reads the registry by executing every *.reqs.ts
|
|
123
197
|
```
|
|
124
198
|
|
|
199
|
+
**The same rule covers a change's `requirements.delta.ts`**, because `status`
|
|
200
|
+
reads that file the same way — a delta built from an imported constant is the
|
|
201
|
+
same `registry-not-static` ERROR, with the same `--eval` way out. The reason is
|
|
202
|
+
sharper there than it is for a registry: `changes/` holds a proposal nobody has
|
|
203
|
+
agreed to yet, so a command whose only job is to report on it is the last thing
|
|
204
|
+
that should execute it. `archive` evaluates the delta regardless — it is about to
|
|
205
|
+
run your suite anyway.
|
|
206
|
+
|
|
125
207
|
One more thing to know about literals: write registry prose as **one long
|
|
126
208
|
single-line string**. A template literal with no substitution reads statically and
|
|
127
209
|
is accepted — but it keeps every newline and every space of indentation inside it,
|
|
@@ -155,9 +237,11 @@ Three properties this deliberately keeps:
|
|
|
155
237
|
if intent changes: one readable hunk per registry edit, and never a rewrite
|
|
156
238
|
because a line moved in a test file.
|
|
157
239
|
- **Gated.** A generated file you commit is a new place for drift to hide, so
|
|
158
|
-
`--check` regenerates and compares
|
|
159
|
-
|
|
160
|
-
|
|
240
|
+
`--check` regenerates and compares, failing with `stale-spec-doc` if the
|
|
241
|
+
committed document no longer matches the registry, or `missing-spec-doc` if it
|
|
242
|
+
was never generated. It compares the document, not the bytes: line endings are
|
|
243
|
+
a property of your checkout (`core.autocrlf` is on by default on Windows), and
|
|
244
|
+
a gate that calls a fresh clone stale is worse than no gate.
|
|
161
245
|
Put it in CI next to `attest check`. (Attest does this to itself:
|
|
162
246
|
[`self/requirements/SPEC.md`](https://gitlab.com/Pseudorca/attest/-/blob/main/self/requirements/SPEC.md)
|
|
163
247
|
is generated, and the pipeline fails if it goes stale.)
|
|
@@ -185,6 +269,17 @@ The gap between the two numbers is worth watching: a spec file whose
|
|
|
185
269
|
`requirement()` call Attest cannot see statically is skipped rather than failed,
|
|
186
270
|
and that is where it shows. The same four numbers are in `--json` under `counts`.
|
|
187
271
|
|
|
272
|
+
When three or more issues in one report share a level and a code, one line above
|
|
273
|
+
the counts says so, because a wall of identical codes is one rule and many sites:
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
Repeated: 6 × ERROR registry-not-static, 4 × WARNING rationale-placeholder
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Every per-issue line stays exactly as it is — they are what makes a diagnostic
|
|
280
|
+
clickable — and the summary is terminal output only: it is not an issue, so it
|
|
281
|
+
appears nowhere in `--json`, changes no count, and never moves a verdict.
|
|
282
|
+
|
|
188
283
|
A run with **no requirements** under the root is an `empty-spec` ERROR, not a
|
|
189
284
|
pass. "No failing tests" is not the same claim as "the requirements hold", and
|
|
190
285
|
the case that matters is not the empty directory — it is the repo whose registry
|
|
@@ -207,11 +302,12 @@ flag the run stays isolated and deterministic.
|
|
|
207
302
|
|
|
208
303
|
### Machine-readable output
|
|
209
304
|
|
|
210
|
-
Every command takes `--json` and then writes exactly one
|
|
211
|
-
stdout — same work, same exit code. Branch on `ok`,
|
|
212
|
-
`issues[].reqId`; never parse `message`, which is prose and
|
|
213
|
-
(`render` is the one exception, because its own output is a
|
|
214
|
-
`--json` needs `--out` or `--check`, so stdout still carries
|
|
305
|
+
Every command that produces a verdict takes `--json` and then writes exactly one
|
|
306
|
+
JSON document to stdout — same work, same exit code. Branch on `ok`,
|
|
307
|
+
`issues[].code` and `issues[].reqId`; never parse `message`, which is prose and
|
|
308
|
+
may be reworded. (`render` is the one exception, because its own output is a
|
|
309
|
+
document: there, `--json` needs `--out` or `--check`, so stdout still carries
|
|
310
|
+
exactly one thing.)
|
|
215
311
|
|
|
216
312
|
```bash
|
|
217
313
|
attest check --json
|
|
@@ -221,7 +317,7 @@ attest check --json
|
|
|
221
317
|
{
|
|
222
318
|
"tool": "attest",
|
|
223
319
|
"schemaVersion": 1,
|
|
224
|
-
"version": "0.
|
|
320
|
+
"version": "0.3.0",
|
|
225
321
|
"command": "check",
|
|
226
322
|
"ok": false,
|
|
227
323
|
"summary": { "error": 1, "warning": 0, "info": 0 },
|
|
@@ -242,10 +338,28 @@ attest check --json
|
|
|
242
338
|
overall verdict) and `counts` (`requirements`, `scenarios`, `specFiles`,
|
|
243
339
|
`attesting`); `cover` adds `coverage[]` — one `{ reqId, covered,
|
|
244
340
|
scenarioCount }` row per requirement — plus a `requirements` roll-up;
|
|
245
|
-
`archive` adds `change`; `
|
|
341
|
+
`archive` adds `change`; `status` adds `change`, `progress[]` — one
|
|
342
|
+
`{ reqId, state, scenarios[] }` row per added requirement, each scenario
|
|
343
|
+
carrying its recorded `firstRun` (`"fail"`, `"pass"`, or `null` for never
|
|
344
|
+
observed) — plus an `added` roll-up; `render` and `init` add `outFile` — the
|
|
345
|
+
file the command wrote, and never its contents — and `init` adds `outFiles`,
|
|
346
|
+
every file it wrote, since it can be asked for more than one agent target at
|
|
347
|
+
once (`outFile` is still there whenever exactly one was written).
|
|
246
348
|
`schemaVersion` is bumped on any breaking change to
|
|
247
349
|
the shape. The TypeScript type is exported as `JsonReport`.
|
|
248
350
|
|
|
351
|
+
`ok` means the same thing everywhere: the report carries no `ERROR`. So an
|
|
352
|
+
uncovered requirement reaches a `cover` report twice — as a `covered: false`
|
|
353
|
+
row and as an `uncovered-requirement` issue — because the rule above is to
|
|
354
|
+
branch on `issues[].code`, and a command that answered `ok: false` with an
|
|
355
|
+
empty `issues` array would make you read `coverage[]` to find out why.
|
|
356
|
+
|
|
357
|
+
`status` is the one report whose rows are deliberately *not* issues. Its rows
|
|
358
|
+
describe a change in progress, and a change in progress has unmet obligations by
|
|
359
|
+
definition; carrying them as errors would make `status` exit 1 for the whole life
|
|
360
|
+
of every change, and put a second verdict beside `archive`'s. Its `issues` carry
|
|
361
|
+
only the reasons the report could not be produced.
|
|
362
|
+
|
|
249
363
|
Even when a command crashes, `--json` still writes one parseable envelope
|
|
250
364
|
(`ok: false` with an `internal-error` issue) rather than an empty stdout — so a
|
|
251
365
|
consumer can always parse stdout and branch on `ok`.
|
package/dist/cli/index.js
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
// where the report is an `internal-error` envelope instead of a bare stack.
|
|
10
10
|
import { Command } from 'commander';
|
|
11
11
|
import chalk from 'chalk';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { runCheck, runVerify, runCover, runArchive, runRender, runRenderCheck, } from '../core/pipeline.js';
|
|
12
|
+
import { resolve } from 'node:path';
|
|
13
|
+
import { writeAtomic } from '../core/write.js';
|
|
14
|
+
import { runCheck, runVerify, runCover, runArchive, runInit, runRender, runRenderCheck, runStatus, DEFAULT_TARGET, TARGET_NAMES, } from '../core/pipeline.js';
|
|
15
15
|
import { hasError } from '../core/types.js';
|
|
16
|
-
import { formatIssues, formatScope, summarize, formatCoverage } from './report.js';
|
|
17
|
-
import { archiveReport, checkReport, coverReport, errorReport, renderJson, renderReport, verifyReport, } from './json.js';
|
|
16
|
+
import { formatIssues, formatScope, summarize, formatCoverage, formatStatus, } from './report.js';
|
|
17
|
+
import { archiveReport, checkReport, coverReport, errorReport, initReport, renderJson, renderReport, statusReport, verifyReport, } from './json.js';
|
|
18
18
|
import { packageVersion } from './version.js';
|
|
19
19
|
const VERSION = packageVersion();
|
|
20
20
|
const program = new Command();
|
|
@@ -32,26 +32,16 @@ const JSON_FLAG = '--json';
|
|
|
32
32
|
const JSON_HELP = 'emit one machine-readable JSON report on stdout';
|
|
33
33
|
const EVAL_FLAG = '--eval';
|
|
34
34
|
const EVAL_HELP = 'read the registry by executing every *.reqs.ts (runs project code); default: read it from the source';
|
|
35
|
+
// Same flag, same meaning — execute the file instead of reading it — over the
|
|
36
|
+
// one file this command reads.
|
|
37
|
+
const EVAL_DELTA_HELP = 'read the change delta by executing requirements.delta.ts (runs project code); default: read it from the source';
|
|
38
|
+
const TARGET_FLAG = '--target <name>';
|
|
35
39
|
const VITEST_CONFIG_FLAG = '--vitest-config <path>';
|
|
36
40
|
const VITEST_CONFIG_HELP = 'load this Vitest config in the child run (transforms, aliases, environment); default: isolated';
|
|
37
41
|
/** Resolve a user-supplied config path against cwd, so Vitest gets an absolute one. */
|
|
38
42
|
function vitestConfig(opts) {
|
|
39
43
|
return opts.vitestConfig ? resolve(process.cwd(), opts.vitestConfig) : undefined;
|
|
40
44
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Write via a temporary file in the same directory, then rename.
|
|
43
|
-
*
|
|
44
|
-
* The rendering is a *committed* file guarded by `--check`. A plain write that
|
|
45
|
-
* is interrupted leaves a truncated document on disk — which `--check` would
|
|
46
|
-
* then correctly call stale, but only after someone commits the wreckage.
|
|
47
|
-
* `rename` within a directory is atomic, so the file is either the old one or
|
|
48
|
-
* the new one, never half of either.
|
|
49
|
-
*/
|
|
50
|
-
async function writeAtomic(dest, content) {
|
|
51
|
-
const tmp = join(dirname(dest), `.${VERSION}.${process.pid}.attest.tmp`);
|
|
52
|
-
await writeFile(tmp, content, 'utf8');
|
|
53
|
-
await rename(tmp, dest);
|
|
54
|
-
}
|
|
55
45
|
/**
|
|
56
46
|
* Run one command's work with a single output + exit-code contract:
|
|
57
47
|
* - success: print the JSON report (`--json`) or the human rendering, and set
|
|
@@ -120,11 +110,22 @@ program
|
|
|
120
110
|
.option(JSON_FLAG, JSON_HELP)
|
|
121
111
|
.option(EVAL_FLAG, EVAL_HELP)
|
|
122
112
|
.action((dir, opts) => runAction('cover', opts, async () => {
|
|
123
|
-
const rows = await runCover(root(dir), { evaluate: opts.eval });
|
|
113
|
+
const { rows, issues } = await runCover(root(dir), { evaluate: opts.eval });
|
|
124
114
|
const uncovered = rows.filter((r) => !r.covered).length;
|
|
125
115
|
return {
|
|
126
|
-
report: coverReport(VERSION, rows),
|
|
116
|
+
report: coverReport(VERSION, rows, issues),
|
|
127
117
|
human: () => {
|
|
118
|
+
// No rows with issues present means the pipeline refused to compute a
|
|
119
|
+
// table it could not trust. Printing the empty-registry line there
|
|
120
|
+
// would state, as a fact, the very thing that failed to be read.
|
|
121
|
+
// Otherwise the table is the rendering: every uncovered requirement
|
|
122
|
+
// is already a red row, so repeating each as an issue line beneath it
|
|
123
|
+
// would be a wall saying what the reader just saw.
|
|
124
|
+
if (rows.length === 0 && issues.length > 0) {
|
|
125
|
+
console.log(formatIssues(issues));
|
|
126
|
+
console.log(summarize(issues));
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
128
129
|
console.log(formatCoverage(rows));
|
|
129
130
|
console.log(chalk.dim(`— ${rows.length} requirement(s), ${uncovered} uncovered`));
|
|
130
131
|
},
|
|
@@ -189,6 +190,75 @@ program
|
|
|
189
190
|
};
|
|
190
191
|
});
|
|
191
192
|
});
|
|
193
|
+
// The workflow half's entry point (design §9): the engine has been reachable
|
|
194
|
+
// from the CLI since 0.1.0, the workflow was a document to find and paste.
|
|
195
|
+
//
|
|
196
|
+
// One file per agent target named, and the default is the one target rather
|
|
197
|
+
// than all of them: the others are files in a repository whose owner did not ask
|
|
198
|
+
// for them. Which paths may be a target is a design rule, not a list of tools —
|
|
199
|
+
// see core/targets.ts.
|
|
200
|
+
//
|
|
201
|
+
// Deliberately scaffolds nothing else — no registry, no package.json scripts, no
|
|
202
|
+
// changes/ skeleton. A generated registry can only be empty (an `empty-spec`
|
|
203
|
+
// ERROR handed to the user on day one) or invented, and invented intent is worse
|
|
204
|
+
// than none in the one layer whose value is that it is real. What to write there
|
|
205
|
+
// is the agent's job, with the project in front of it.
|
|
206
|
+
program
|
|
207
|
+
.command('init')
|
|
208
|
+
.description('Write the Attest change workflow where an agent will read it.')
|
|
209
|
+
.argument('[dir]', 'project root', undefined)
|
|
210
|
+
.option(JSON_FLAG, JSON_HELP)
|
|
211
|
+
.option(TARGET_FLAG, `agent to write the workflow for, repeatable: ${TARGET_NAMES.join(', ')} (default: ${DEFAULT_TARGET})`, (value, previous) => [...previous, value], [])
|
|
212
|
+
.action((dir, opts) => runAction('init', opts, async () => {
|
|
213
|
+
// Idempotent: each file is a pure function of nothing, so re-running after
|
|
214
|
+
// an upgrade is the whole update mechanism and is always safe.
|
|
215
|
+
const { files, issues } = await runInit(root(dir), opts.target ?? []);
|
|
216
|
+
return {
|
|
217
|
+
report: initReport(VERSION, issues, files),
|
|
218
|
+
human: () => {
|
|
219
|
+
if (issues.length > 0) {
|
|
220
|
+
console.log(formatIssues(issues));
|
|
221
|
+
console.log(summarize(issues));
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
for (const file of files)
|
|
225
|
+
console.log(chalk.green(`✓ Wrote ${file}`));
|
|
226
|
+
console.log(chalk.dim('Re-run `attest init` after upgrading @am_shork/attest.'));
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
}));
|
|
230
|
+
// A change's progress, between "not started" and "archivable". `archive` answers
|
|
231
|
+
// one question — does the gate pass — so a change in flight had no reportable
|
|
232
|
+
// state at all, and the only way to ask what remained was to read the delta and
|
|
233
|
+
// infer. This reports the gate's obligations without running the suite; the one
|
|
234
|
+
// it cannot report is `tests-red`, which is why the rendering closes by saying
|
|
235
|
+
// so rather than presenting a column of ticks as a verdict.
|
|
236
|
+
program
|
|
237
|
+
.command('status')
|
|
238
|
+
.argument('<change>', 'change name to report on')
|
|
239
|
+
.argument('[dir]', 'project root', undefined)
|
|
240
|
+
.option(JSON_FLAG, JSON_HELP)
|
|
241
|
+
.option(EVAL_FLAG, EVAL_DELTA_HELP)
|
|
242
|
+
.description('Per-change progress: what the archive gate still wants, without running the suite.')
|
|
243
|
+
.action((change, dir, opts) => runAction('status', opts, async () => {
|
|
244
|
+
const result = await runStatus(root(dir), change, { evaluate: opts.eval });
|
|
245
|
+
return {
|
|
246
|
+
report: statusReport(VERSION, result),
|
|
247
|
+
human: () => {
|
|
248
|
+
// A change whose delta could not be read has no progress to show, and
|
|
249
|
+
// printing an empty table under it would state as a fact the very
|
|
250
|
+
// thing that failed to be read (the call `cover` makes for the same
|
|
251
|
+
// reason).
|
|
252
|
+
if (hasError(result.issues)) {
|
|
253
|
+
console.log(formatIssues(result.issues));
|
|
254
|
+
console.log(summarize(result.issues));
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
console.log(chalk.bold(`Change: ${result.change}`));
|
|
258
|
+
console.log(formatStatus(result));
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
}));
|
|
192
262
|
program
|
|
193
263
|
.command('archive')
|
|
194
264
|
.argument('<change>', 'change name to archive')
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AA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
|
+
import type { CoverageRow, StatusResult, VerifyCounts } from '../core/pipeline.js';
|
|
2
|
+
import type { ObligationState, StatusRow } from '../core/status.js';
|
|
2
3
|
import type { Issue } from '../core/types.js';
|
|
3
4
|
/** Bumped whenever the emitted shape changes incompatibly. */
|
|
4
5
|
export declare const SCHEMA_VERSION = 1;
|
|
5
|
-
export type JsonCommand = 'check' | 'verify' | 'cover' | 'archive' | 'render';
|
|
6
|
+
export type JsonCommand = 'check' | 'verify' | 'cover' | 'archive' | 'render' | 'init' | 'status';
|
|
6
7
|
export interface JsonSummary {
|
|
7
8
|
error: number;
|
|
8
9
|
warning: number;
|
|
@@ -30,21 +31,67 @@ export interface JsonReport {
|
|
|
30
31
|
covered: number;
|
|
31
32
|
uncovered: number;
|
|
32
33
|
};
|
|
33
|
-
/** `archive`
|
|
34
|
+
/** `archive` and `status`: the change being gated or reported on. */
|
|
34
35
|
change?: string;
|
|
35
|
-
/** `
|
|
36
|
+
/** `status` only: one row per requirement the change adds. */
|
|
37
|
+
progress?: StatusRow[];
|
|
38
|
+
/** `status` only: roll-up of the rows by obligation state. */
|
|
39
|
+
added?: {
|
|
40
|
+
total: number;
|
|
41
|
+
} & Record<ObligationState, number>;
|
|
42
|
+
/**
|
|
43
|
+
* The file the command wrote: `render`'s document when `--out` was given,
|
|
44
|
+
* `init`'s instructions when it wrote exactly one file. One field rather than
|
|
45
|
+
* two because it is one concept — where the command put its output.
|
|
46
|
+
*/
|
|
36
47
|
outFile?: string;
|
|
48
|
+
/**
|
|
49
|
+
* `init` only: every file written, in target order. Additive — see
|
|
50
|
+
* SCHEMA_VERSION. `init` can now write one file per agent target, and a
|
|
51
|
+
* consumer reading `outFile` alone would silently see the first of several.
|
|
52
|
+
* The single-target run — the default — still carries both.
|
|
53
|
+
*/
|
|
54
|
+
outFiles?: string[];
|
|
37
55
|
}
|
|
38
56
|
export declare function countLevels(issues: Issue[]): JsonSummary;
|
|
39
57
|
export declare function checkReport(version: string, issues: Issue[]): JsonReport;
|
|
40
58
|
export declare function verifyReport(version: string, issues: Issue[], passed: boolean, ok: boolean, counts: VerifyCounts): JsonReport;
|
|
41
|
-
|
|
59
|
+
/**
|
|
60
|
+
* `cover`. The uncovered requirements are carried as `issues` as well as rows:
|
|
61
|
+
* `ok` was computed from the rows alone, so this was the one command that could
|
|
62
|
+
* answer `ok: false` with an empty `issues` array — against the rule this file,
|
|
63
|
+
* the README and the CHANGELOG all state ("branch on `ok` / `issues[].code`").
|
|
64
|
+
* The verdict is now the same `hasError` predicate every other command uses;
|
|
65
|
+
* for identical input it is the identical boolean, since an uncovered
|
|
66
|
+
* requirement is the only issue this command produces.
|
|
67
|
+
*/
|
|
68
|
+
export declare function coverReport(version: string, rows: CoverageRow[], issues: Issue[]): JsonReport;
|
|
42
69
|
/**
|
|
43
70
|
* `render` only. The Markdown document itself is never part of the envelope:
|
|
44
71
|
* it is prose for humans, and the machine surface stays `ok` + issue codes.
|
|
45
72
|
*/
|
|
46
73
|
export declare function renderReport(version: string, issues: Issue[], outFile?: string): JsonReport;
|
|
74
|
+
/**
|
|
75
|
+
* `init`. Carries the paths written so a consumer learns where the instructions
|
|
76
|
+
* went without hardcoding the convention. `issues` is empty on the success path
|
|
77
|
+
* — `init` writes or throws — apart from an `unknown-target` ERROR, which is
|
|
78
|
+
* refused before anything is written and so reports no files at all.
|
|
79
|
+
*
|
|
80
|
+
* `outFile` survives beside `outFiles` for the one-file run, which is what the
|
|
81
|
+
* default invocation still is: dropping it would break the consumer the field
|
|
82
|
+
* was added for, to say something the array already says.
|
|
83
|
+
*/
|
|
84
|
+
export declare function initReport(version: string, issues: Issue[], outFiles: string[]): JsonReport;
|
|
47
85
|
export declare function archiveReport(version: string, change: string, blocking: Issue[]): JsonReport;
|
|
86
|
+
/**
|
|
87
|
+
* `status`. The progress rows never touch the verdict: `ok` comes from the same
|
|
88
|
+
* `hasError` predicate as everywhere else, over an `issues` array that carries
|
|
89
|
+
* only the reasons the report could not be computed. A change with unmet
|
|
90
|
+
* obligations is the normal state of every change in flight, so reporting it as
|
|
91
|
+
* `ok: false` would make a CI step wrapping `status` red for the entire life of
|
|
92
|
+
* every change — and would put a second, weaker verdict beside `archive`'s.
|
|
93
|
+
*/
|
|
94
|
+
export declare function statusReport(version: string, result: StatusResult): JsonReport;
|
|
48
95
|
/**
|
|
49
96
|
* The envelope for a command that threw before it could produce a report. Keeps
|
|
50
97
|
* the `--json` contract intact on the crash path: a consumer still parses one
|
package/dist/cli/json.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,kBAAkB,CAAC;AAErD,8DAA8D;AAC9D,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,QAAQ,GACR,MAAM,GACN,QAAQ,CAAC;AAEb,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,WAAW,CAAC;IACrB,uEAAuE;IACvE,EAAE,EAAE,O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OAAO,EAAE,MAAM,EACf,MAAM,EAAE,KAAK,EAAE,EACf,OAAO,CAAC,EAAE,MAAM,GACf,UAAU,CAGZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,UAAU,CAO3F;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,KAAK,EAAE,GAChB,UAAU,CAUZ;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,UAAU,CAY9E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,OAAO,GACX,UAAU,CAIZ;AAED,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAErD"}
|
package/dist/cli/json.js
CHANGED
|
@@ -36,10 +36,19 @@ export function checkReport(version, issues) {
|
|
|
36
36
|
export function verifyReport(version, issues, passed, ok, counts) {
|
|
37
37
|
return { ...envelope({ version, command: 'verify', ok, issues }), passed, counts };
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
/**
|
|
40
|
+
* `cover`. The uncovered requirements are carried as `issues` as well as rows:
|
|
41
|
+
* `ok` was computed from the rows alone, so this was the one command that could
|
|
42
|
+
* answer `ok: false` with an empty `issues` array — against the rule this file,
|
|
43
|
+
* the README and the CHANGELOG all state ("branch on `ok` / `issues[].code`").
|
|
44
|
+
* The verdict is now the same `hasError` predicate every other command uses;
|
|
45
|
+
* for identical input it is the identical boolean, since an uncovered
|
|
46
|
+
* requirement is the only issue this command produces.
|
|
47
|
+
*/
|
|
48
|
+
export function coverReport(version, rows, issues) {
|
|
40
49
|
const covered = rows.filter((r) => r.covered).length;
|
|
41
50
|
return {
|
|
42
|
-
...envelope({ version, command: 'cover', ok:
|
|
51
|
+
...envelope({ version, command: 'cover', ok: !hasError(issues), issues }),
|
|
43
52
|
coverage: rows,
|
|
44
53
|
requirements: {
|
|
45
54
|
total: rows.length,
|
|
@@ -56,6 +65,24 @@ export function renderReport(version, issues, outFile) {
|
|
|
56
65
|
const report = envelope({ version, command: 'render', ok: !hasError(issues), issues });
|
|
57
66
|
return outFile === undefined ? report : { ...report, outFile };
|
|
58
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* `init`. Carries the paths written so a consumer learns where the instructions
|
|
70
|
+
* went without hardcoding the convention. `issues` is empty on the success path
|
|
71
|
+
* — `init` writes or throws — apart from an `unknown-target` ERROR, which is
|
|
72
|
+
* refused before anything is written and so reports no files at all.
|
|
73
|
+
*
|
|
74
|
+
* `outFile` survives beside `outFiles` for the one-file run, which is what the
|
|
75
|
+
* default invocation still is: dropping it would break the consumer the field
|
|
76
|
+
* was added for, to say something the array already says.
|
|
77
|
+
*/
|
|
78
|
+
export function initReport(version, issues, outFiles) {
|
|
79
|
+
const report = {
|
|
80
|
+
...envelope({ version, command: 'init', ok: !hasError(issues), issues }),
|
|
81
|
+
outFiles,
|
|
82
|
+
};
|
|
83
|
+
const [only] = outFiles;
|
|
84
|
+
return outFiles.length === 1 && only !== undefined ? { ...report, outFile: only } : report;
|
|
85
|
+
}
|
|
59
86
|
export function archiveReport(version, change, blocking) {
|
|
60
87
|
return {
|
|
61
88
|
...envelope({
|
|
@@ -67,6 +94,27 @@ export function archiveReport(version, change, blocking) {
|
|
|
67
94
|
change,
|
|
68
95
|
};
|
|
69
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* `status`. The progress rows never touch the verdict: `ok` comes from the same
|
|
99
|
+
* `hasError` predicate as everywhere else, over an `issues` array that carries
|
|
100
|
+
* only the reasons the report could not be computed. A change with unmet
|
|
101
|
+
* obligations is the normal state of every change in flight, so reporting it as
|
|
102
|
+
* `ok: false` would make a CI step wrapping `status` red for the entire life of
|
|
103
|
+
* every change — and would put a second, weaker verdict beside `archive`'s.
|
|
104
|
+
*/
|
|
105
|
+
export function statusReport(version, result) {
|
|
106
|
+
return {
|
|
107
|
+
...envelope({
|
|
108
|
+
version,
|
|
109
|
+
command: 'status',
|
|
110
|
+
ok: !hasError(result.issues),
|
|
111
|
+
issues: result.issues,
|
|
112
|
+
}),
|
|
113
|
+
change: result.change,
|
|
114
|
+
progress: result.rows,
|
|
115
|
+
added: { total: result.rows.length, ...result.counts },
|
|
116
|
+
};
|
|
117
|
+
}
|
|
70
118
|
/**
|
|
71
119
|
* The envelope for a command that threw before it could produce a report. Keeps
|
|
72
120
|
* the `--json` contract intact on the crash path: a consumer still parses one
|
package/dist/cli/json.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,yEAAyE;AACzE,8EAA8E;AAC9E,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,wCAAwC;
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,yEAAyE;AACzE,8EAA8E;AAC9E,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,wCAAwC;AAIxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAwDhC,MAAM,SAAS,GAAqC;IAClD,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,MAAe;IACzC,MAAM,OAAO,GAAgB,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC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AACH,MAAM,UAAU,YAAY,CAAC,OAAe,EAAE,MAAoB;IAChE,OAAO;QACL,GAAG,QAAQ,CAAC;YACV,OAAO;YACP,OAAO,EAAE,QAAQ;YACjB,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;YAC5B,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAC;QACF,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,QAAQ,EAAE,MAAM,CAAC,IAAI;QACrB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE;KACvD,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,OAAe,EACf,OAAoB,EACpB,GAAY;IAEZ,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,MAAM,KAAK,GAAU,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;IACzE,OAAO,QAAQ,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACpE,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,UAAU,CAAC,MAAkB;IAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACzC,CAAC"}
|
package/dist/cli/report.d.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
import type { CoverageRow, VerifyCounts } from '../core/pipeline.js';
|
|
1
|
+
import type { CoverageRow, StatusResult, VerifyCounts } from '../core/pipeline.js';
|
|
2
2
|
import type { Issue } from '../core/types.js';
|
|
3
3
|
export declare function formatIssues(issues: Issue[]): string;
|
|
4
|
+
/**
|
|
5
|
+
* A code repeating across files is one rule and many sites, and a reader looking
|
|
6
|
+
* at the wall has to diff the lines to learn that. This says it once.
|
|
7
|
+
*
|
|
8
|
+
* There is deliberately no code → prose table naming the "cause": the `code`
|
|
9
|
+
* already *is* the name of the shared rule, and each site's `message` states the
|
|
10
|
+
* rule in full. A table would also have to be extended with every new code, and
|
|
11
|
+
* forgetting to would degrade this line in silence. So the line states structure
|
|
12
|
+
* only — how many issues carry the same code — and leaves the explaining to the
|
|
13
|
+
* per-site lines above it, which are what makes a diagnostic clickable.
|
|
14
|
+
*
|
|
15
|
+
* Grouped by level *and* code, not code alone: a count that silently spanned two
|
|
16
|
+
* levels would name one number for two different dispositions. Every issue site
|
|
17
|
+
* writes a literal level, so in practice the two groupings agree — the composite
|
|
18
|
+
* key is what makes that not need to be true.
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatRepeats(issues: Issue[]): string;
|
|
4
21
|
export declare function summarize(issues: Issue[], scope?: VerifyCounts): string;
|
|
5
22
|
/**
|
|
6
23
|
* The pre-run line for `verify`: how many spec files were located, and how many
|
|
@@ -10,5 +27,15 @@ export declare function summarize(issues: Issue[], scope?: VerifyCounts): string
|
|
|
10
27
|
* parse would show up here as a widening gap rather than as silence.
|
|
11
28
|
*/
|
|
12
29
|
export declare function formatScope(scope: VerifyCounts): string;
|
|
30
|
+
/**
|
|
31
|
+
* The progress table for one change.
|
|
32
|
+
*
|
|
33
|
+
* The closing line says what this report is *not*. Every state here is read
|
|
34
|
+
* without running a single test, so a table of green ticks means the readable
|
|
35
|
+
* obligations are met and nothing at all about whether the suite passes — and a
|
|
36
|
+
* report that can be mistaken for a verdict is worse than no report, which is
|
|
37
|
+
* the argument that keeps `render --check` comparing documents rather than bytes.
|
|
38
|
+
*/
|
|
39
|
+
export declare function formatStatus(result: StatusResult): string;
|
|
13
40
|
export declare function formatCoverage(rows: CoverageRow[]): string;
|
|
14
41
|
//# sourceMappingURL=report.d.ts.map
|