Tap output parse
tap-output-parse · version 1.0.0 · Developer tools · free, no key needed
Parse TAP version 13 text into ordered assertions, plan validity, diagnostics, directives, and bailout state.
Use when you need to: parse TAP output · summarize TAP version 13 · extract TAP assertions.
Decide before calling
Read the versioned contract and the supported scope below. Reuse tap-output-parse@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use tap-output-parse@1.0.0 for parse TAP output. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- parse TAP output
- summarize TAP version 13
- extract TAP assertions
- inspect TAP test plans
- read TAP TODO and SKIP directives
- capture TAP YAML diagnostics
- detect TAP bailouts
Not supported
- execute tests or embedded diagnostic content
- parse non-TAP test reporter formats
- interpret YAML diagnostic values
Behavior
- Recognizes TAP version 13, plans, ok/not ok assertions, TODO/SKIP directives, YAML diagnostic blocks, and Bail out! lines; assertion order is preserved.
- YAML diagnostic blocks are returned verbatim and never parsed or executed.
- A TAP 13 plan is optional; when absent plan is null and plan_valid is true. A plan before assertions is a valid leading plan; only assertions after an end plan set trailing_tests.
- Assertion keywords are case-sensitive, while TODO/SKIP and skip-all plan directives are case-insensitive; plan and assertion numbers are bounded at 2000.
- Semantic parsing stops at the first Bail out! line; later content is not counted as assertions.
- Line endings are normalized to LF; unrelated comment and harness lines are ignored.
- More than 65536 UTF-8 input bytes, 2000 lines, or 8192 cumulative YAML diagnostic bytes returns limit_exceeded.
Input
text(string, required): min length 1; max length 65536
Output
tap_version(one of 13, null, required)plan(object or null, required)plan_valid(boolean, required)assertions(array of object, required): max items 2000counts(object, required)bailout(object, required)trailing_tests(boolean, required)valid(boolean, required)errors(array of one of "missing_version", "duplicate_version", "unsupported_version", "missing_plan", "duplicate_plan", "invalid_plan", "plan_count_mismatch", "assertion_number_mismatch", "malformed_diagnostic", required): max items 2000
Limits
- max input bytes: 65536
- max lines: 2000
- max yaml diagnostic bytes: 8192
Example
Request input:
{
"text": "TAP version 13\n1..2\nok 1 - input accepted\nnot ok 2 - output matches # TODO pending fixture"
}
Response:
{
"result": {
"tap_version": 13,
"plan": {
"start": 1,
"end": 2,
"skip": false,
"reason": null,
"line": 2
},
"plan_valid": true,
"assertions": [
{
"ok": true,
"number": 1,
"name": "input accepted",
"directive": null,
"reason": null,
"diagnostic": null,
"line": 3
},
{
"ok": false,
"number": 2,
"name": "output matches",
"directive": "TODO",
"reason": "pending fixture",
"diagnostic": null,
"line": 4
}
],
"counts": {
"total": 2,
"passed": 1,
"failed": 1,
"todo": 1,
"skipped": 0
},
"bailout": {
"occurred": false,
"reason": null,
"line": null
},
"trailing_tests": false,
"valid": true,
"errors": []
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "tap-output-parse",
"version": "1.0.0",
"input": {
"text": "TAP version 13\n1..2\nok 1 - input accepted\nnot ok 2 - output matches # TODO pending fixture"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/tap-output-parse/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"text":"TAP version 13\n1..2\nok 1 - input accepted\nnot ok 2 - output matches # TODO pending fixture"}'
The machine-readable contract is at /v1/tools/tap-output-parse/versions/1.0.0.
CLI
node cli.mjs run tap-output-parse 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Commit conventional parse: Parse one Conventional Commits 1.0.0 message into its header, body, footers, and breaking-change status.
- Openapi operation extract: Extract one OpenAPI operation, merge inherited parameters, and return its local component-reference closure.
- Sql statements split: Split SQL text into exact statement spans with explicit PostgreSQL, MySQL, or SQLite lexical rules.
- Chmod mode convert: Convert a Unix permission mode and apply explicit chmod symbolic clauses, returning canonical octal and symbolic forms.
- Editorconfig resolve: Resolve EditorConfig properties for one normalized relative POSIX path from caller-supplied file contents.
- Shell argv quote: Quote inert argv strings for POSIX sh or PowerShell 7, returning a command and its per-argument fragments.