Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
3c6ea52
test(guards): run the npm audit guard without the allow-scripts value…
Zelys-DFKH Oct 13, 2026
c310520
test(guards): drop the wall-clock bounds from the markup guard's crit…
Zelys-DFKH Oct 13, 2026
bffc77d
fix(config): give the git hint calls a 500 ms budget so they finish o…
Zelys-DFKH Oct 13, 2026
721fc24
test(matrix): accept the PNG the image engine returns for a text-heav…
Zelys-DFKH Oct 13, 2026
52e2445
fix(indexer): keep Playwright snapshot directories out of the index
Zelys-DFKH Oct 13, 2026
53520e3
fix(pdf): say a scanned PDF has no text layer instead of printing an …
Zelys-DFKH Oct 13, 2026
1441c53
fix(read): repeat a miss's suggestions on stdout so 2>/dev/null canno…
Zelys-DFKH Oct 13, 2026
05221b0
feat(section): read every spec passed, not only the first
Zelys-DFKH Oct 13, 2026
709f7e6
fix(skills): print a heading tree from skill-body --compact when ther…
Zelys-DFKH Oct 13, 2026
8753334
fix(output): keep section, skill and recall answers under the harness…
Zelys-DFKH Oct 13, 2026
3872e24
fix(hooks): let cat of a small file run, and name a command that runs…
Zelys-DFKH Oct 13, 2026
750e04b
fix(hooks): read a compound Python command one simple command at a ti…
Zelys-DFKH Oct 13, 2026
25b4d8f
fix(hooks): say a file was partially read when only a window of it wa…
Zelys-DFKH Oct 13, 2026
b41f83f
fix(hooks): offer no map hint for a directory listing that asks for s…
Zelys-DFKH Oct 13, 2026
609487b
feat(hooks): move a long Bash command's quoted heredoc bodies into fi…
Zelys-DFKH Oct 14, 2026
1d7dc9a
fix(image): shrink an image outside the working directory in bypassPe…
Zelys-DFKH Oct 13, 2026
98cd624
test(image): pin that a host-materialized shrink reaches Copilot as a…
Zelys-DFKH Oct 13, 2026
46674ae
fix(read): let a Grep search a large Claude Code tool-results file
Zelys-DFKH Oct 13, 2026
581582d
fix(read): name the slice and a limit that fits when a ranged Read is…
Zelys-DFKH Oct 13, 2026
e5bd1ed
fix(read): give the PDF refusal its real reason, and leave a missing …
Zelys-DFKH Oct 13, 2026
61dcc8c
fix(read): suggest skeleton for sequential paging of source files only
Zelys-DFKH Oct 13, 2026
ab1ba13
fix(read): read Claude Code notes and short documents back whole
Zelys-DFKH Oct 14, 2026
28ba79b
fix(hooks): rewrite a WebSearch result in its own shape so the fence …
Zelys-DFKH Oct 13, 2026
ea31961
fix(hints): offer the post-edit section re-read hint only after an Ed…
Zelys-DFKH Oct 13, 2026
4225ab5
fix(agent): keep the general-purpose spawn advisory to once per sessi…
Zelys-DFKH Oct 14, 2026
0286072
fix(agent): leave the project map out of a spawn briefing for a near-…
Zelys-DFKH Oct 13, 2026
6c64c35
fix(agent): stop caching a background subagent's launch receipt as it…
Zelys-DFKH Oct 13, 2026
c8b1e46
feat(mcp): drop Playwright's echo of the model's own script and a rep…
Zelys-DFKH Oct 14, 2026
1254088
fix(hooks): start PreToolUse only for the MCP tools a PreToolUse hand…
Zelys-DFKH Oct 13, 2026
fe340e6
fix(filters): keep every entry of a CR-separated list instead of the …
Zelys-DFKH Oct 13, 2026
71e1ac5
fix(filters): ship grep match lines instead of trading them for per-f…
Zelys-DFKH Oct 14, 2026
01b9074
fix(filters): lay a one-line JSON document out by member before the p…
Zelys-DFKH Oct 13, 2026
d8358e8
fix(compress): price the recall line into the net-benefit gate
Zelys-DFKH Oct 13, 2026
d023334
fix(hooks): take the compress heartbeat back out of the finished Bash…
Zelys-DFKH Oct 14, 2026
7ad3b01
fix(hooks): give the large-output recall pointer only for output the …
Zelys-DFKH Oct 13, 2026
1b9804b
feat(hooks): give Claude Code's PowerShell tool the Bash output handling
Zelys-DFKH Oct 14, 2026
ea7aeb2
fix(git): kill the real git on a Windows timeout, not Git for Windows…
Zelys-DFKH Oct 13, 2026
273ca87
chore(deps): hold tesseract.js at 6 so it accepts the pinned core
Zelys-DFKH Oct 13, 2026
1e351ad
fix(compress): fence a wrapped command's compressed view by provenance
Zelys-DFKH Oct 13, 2026
e0a768d
perf(hooks): load the Playwright pass lazily and move CLI paging off …
Zelys-DFKH Oct 14, 2026
bf4759b
fix(security): escape fence tags spelled with invisible characters an…
Zelys-DFKH Oct 14, 2026
1fcffa6
fix(security): close escape, look-alike, redaction and truncation gap…
Zelys-DFKH Oct 14, 2026
95ee78c
test(guards): give each process its own vitest probe file
Zelys-DFKH Oct 13, 2026
4a77a2e
test(setup): run the suite's spawned index at normal priority, not th…
Zelys-DFKH Oct 13, 2026
d2a6108
perf(readers): read the config once per --json envelope in the databa…
Zelys-DFKH Oct 13, 2026
b5e2e4f
chore(deps): move tesseract.js and tesseract.js-core to 7 together
Zelys-DFKH Oct 13, 2026
bed3ced
perf(fence): read the config once per --json envelope in every per-fi…
Zelys-DFKH Oct 13, 2026
49a4a16
fix(stats): book injection_detected once for the render a capped --js…
Zelys-DFKH Oct 13, 2026
38f054e
fix(bench): count the fence and recall line a compressed result carries
Zelys-DFKH Oct 13, 2026
676080e
fix(hooks): give Claude Code's PowerShell tool the Bash hooks' checks…
Zelys-DFKH Oct 13, 2026
d01f364
fix(image-shrink): stop sending a generic harness the shrunk image as…
Zelys-DFKH Oct 13, 2026
6b0109e
fix(mcp): shrink browser screenshots on the MCP post path instead of …
Zelys-DFKH Oct 14, 2026
3cb02fb
fix(redact): check the redacted escape-stripped view in the Read fold…
Zelys-DFKH Oct 13, 2026
24e80a5
fix(recall): drop recall rows indexed before the escape-strip redacti…
Zelys-DFKH Oct 13, 2026
13723ae
fix(read): show spoken markers that source code spells inside a line …
Zelys-DFKH Oct 13, 2026
fec6eb2
fix(delivery-cap): cut inside a line when a whole-line cut wastes the…
Zelys-DFKH Oct 13, 2026
fd73be7
fix(bash): stop the delivery-cap clip note promising a recall of the …
Zelys-DFKH Oct 13, 2026
9af6ad8
fix(websearch): strip escapes from hit strings before neutralizing them
Zelys-DFKH Oct 13, 2026
8dc37f2
fix(transcript): redact and fence transcript-outline speaker names an…
Zelys-DFKH Oct 13, 2026
8e176f2
fix(copilot): keep an MCP result's images in the fenced modifiedResult
Zelys-DFKH Oct 13, 2026
f9382f0
docs(guidance): add the sequential paging failure shape to this repo'…
Zelys-DFKH Oct 13, 2026
ce9ee68
fix(fence): read look-alikes through Unicode's confusables data inste…
Zelys-DFKH Oct 14, 2026
bbd1509
fix(fence): pass over a space inside the word a fence tag or voice sp…
Zelys-DFKH Oct 13, 2026
372f9d1
fix(fence): give every fence's tags a per-fence random nonce
Zelys-DFKH Oct 13, 2026
504f8b3
fix(ansi): strip a control string whose payload holds an ESC up to it…
Zelys-DFKH Oct 13, 2026
cb23d83
fix(fence): treat every C1 control as an escape byte in a file that h…
Zelys-DFKH Oct 13, 2026
28ec8ba
fix(fence): keep complete character-set designations in a file fence
Zelys-DFKH Oct 13, 2026
1a5c43d
perf(fence): skip the marker scan past a size ceiling and escape ever…
Zelys-DFKH Oct 13, 2026
f0385ef
fix(compress): kill the whole process tree when a wrapped command tim…
Zelys-DFKH Oct 13, 2026
08031c0
fix(filters): read a single-file grep's lines as that file's, so grep…
Zelys-DFKH Oct 14, 2026
2d5bedb
fix(hints): name a part the file holds, or no part, instead of a stan…
Zelys-DFKH Oct 13, 2026
bce3cb2
fix(delivery): measure Claude Code's inline Bash limit once and deriv…
Zelys-DFKH Oct 13, 2026
f8b0bf5
fix(opencode): fence and redact MCP tool results before the model see…
Zelys-DFKH Oct 13, 2026
0855062
docs(hooks): record that Qwen Code drops a rewritten PostToolUse result
Zelys-DFKH Oct 13, 2026
6af5c7f
fix(redact): find a credential split by a colour code inside a termin…
Zelys-DFKH Oct 13, 2026
ca1d1e7
fix(fence): show a file's inline spoken markers only behind an ASCII …
Zelys-DFKH Oct 14, 2026
0a6598b
fix(mcp): drop textual blocks from an image-only browser rewrite inst…
Zelys-DFKH Oct 13, 2026
bea76ee
fix(copilot): hand back only image and audio binaries beside a fenced…
Zelys-DFKH Oct 13, 2026
ec04652
fix(opencode): fence an MCP result's text in both fields when it also…
Zelys-DFKH Oct 13, 2026
eb005fd
docs(matrix): mark Qwen's post-tool context as reaching the model
Zelys-DFKH Oct 13, 2026
1690119
fix(compress): kill the shell's descendants on POSIX timeout or captu…
Zelys-DFKH Oct 13, 2026
a828032
test(matrix): run the built-bundle image shrink cases as OpenClaw, wh…
Zelys-DFKH Oct 13, 2026
0d0ce93
test(copilot): check startup deadline inheritance from recorded value…
Zelys-DFKH Oct 13, 2026
d5fd3a4
test(copilot): wait for killed owned processes to release the fixture…
Zelys-DFKH Oct 13, 2026
e7ab6f9
docs(changelog): record the series' fixes, hardening and new PowerShe…
Zelys-DFKH Oct 13, 2026
c11a64f
test(teardown): wait for stopped processes to release their directori…
Zelys-DFKH Oct 13, 2026
24d5c49
test(read): expect the circuit breaker's advisory on the retry after …
Zelys-DFKH Oct 13, 2026
9e1b0bb
test(powershell): skip the cases that spawn PowerShell on a Linux or …
Zelys-DFKH Oct 13, 2026
56a213d
test(workers): run the worker-count cases without an inherited TOKEN_…
Zelys-DFKH Oct 13, 2026
38db033
test(workers): size the Linux worker count to memory plus swap so a s…
Zelys-DFKH Oct 13, 2026
cafb56d
test(bootstrap-audit): plant the broken link as a junction on Windows…
Zelys-DFKH Oct 14, 2026
7b1a911
test(read): keep the overlapping re-read after an outside edit clear …
Zelys-DFKH Oct 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Failure shapes to catch yourself in, and the command that replaces each:
- not knowing which command answers a question you can already state in words → answer "<question>", which resolves the subject in the index, runs the right command, prints via: <command>, and refuses rather than guess
- a shell text search with context flags to find a function body → read "file::symbol"
- paging one function with view/view_range → read "file::symbol"
- issuing sequential or overlapping line-range reads across a file (paging) → read "file::symbol" / outline file / skeleton file / rg <pattern> <file>
- a read refused by a [tg] deny, retried with a shifted range, different lines, or another read tool → never retry reading the file at different lines; run the command the deny names or use bash-output / token-goat read
- reading a symbol plus chasing its callers and containing doc section as separate reads → brief "file::symbol"
- reading one heading of a large doc → section "file::Heading"
Expand Down
73 changes: 73 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

19 changes: 11 additions & 8 deletions CLAUDE.arch.md

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/architecture-qa.html
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ <h1>Token-Goat Architecture & Engineering Q&A</h1>
</p>
<div style="font-size:12px; color:var(--text-dim); line-height:1.5;">
<strong>Step 1: Verify Command Compression &amp; Fidelity (Automated Suite):</strong><br>
Run <code>node dist/token-goat.mjs bench</code> in your terminal. This replays a corpus of captured command output through the compressors and prints the byte-savings ratio plus a fidelity check (it exits 1 if a must-keep line is dropped). At the time of writing this ran at 96.1% saved with 6/6 fidelity checks kept; the ratio is not a fixed guarantee, only a floor the corpus must clear on every run.<br><br>
Run <code>node dist/token-goat.mjs bench</code> in your terminal. This replays a corpus of captured command output through the compressors and prints the byte-savings ratio plus a fidelity check (it exits 1 if a must-keep line is dropped). At the time of writing this ran at 87.2% saved, counting the fence and recall line a compressed result carries, with 6/6 fidelity checks kept; the ratio is not a fixed guarantee, only a floor the corpus must clear on every run.<br><br>

<strong>Step 2: Verify Polyglot Surgical-Read Savings (Unit Benchmark):</strong><br>
Run <code>npx vitest run <a href="https://github.com/DFKHelper/token-goat/blob/main/tests/token_savings_benchmark.test.ts" target="_blank" class="github-inline-ref">tests/token_savings_benchmark.test.ts</a></code>. This measures real TypeScript, Python, Go, and Markdown fixtures and enforces a floor (60% average, with a documented per-case exception at 50% for Go's doc-comment-preserving outline) below the 85-97% range <code>docs/architecture.md</code> quotes; the measured average at the time of writing was 80.2%, and the test prints the actual per-case numbers rather than asserting a fixed figure.<br><br>
Expand Down
35 changes: 19 additions & 16 deletions docs/cli.md

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions docs/hook-channel-matrix.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The hooks were checked loading and running under agy 1.2.11 on Windows, and the
token-goat install --opencode
```

The `--opencode` flag drops a TypeScript bridge plugin into opencode's plugins directory. Post-edit indexing, compact assist, and rewritten tool results (prompt-injection fencing, secret redaction, and output compression replace the raw result, the same protection Claude Code sessions get) work. So do repeat-search denial for `websearch`, repeat-load denial for `skill`, and the subagent prompt briefing for `task` — all three tool ids and their argument keys were verified against opencode's own source at the installed release's tag. Session hints don't — opencode's plugin API has no way to inject context before a tool read. Neither does image shrinking: the only way to hand opencode a smaller image is to point its `read` at a copy, and opencode checks its `read` and outside-directory permissions against that copy's path instead of the image's, so a rule you set on the image would stop applying. Shell commands are not wrapped for compression either, since opencode's permission rules can come from an organization account or a well-known URL no hook reads; their output is still compressed after they run.
The `--opencode` flag drops a TypeScript bridge plugin into opencode's plugins directory. Post-edit indexing, compact assist, and rewritten tool results (prompt-injection fencing, secret redaction, and output compression replace the raw result, the same protection Claude Code sessions get) work, MCP tool results included, except an MCP result the server marks as an error, which opencode raises as an error before any plugin hook sees it. So do repeat-search denial for `websearch`, repeat-load denial for `skill`, and the subagent prompt briefing for `task` — all three tool ids and their argument keys were verified against opencode's own source at the installed release's tag. Session hints don't — opencode's plugin API has no way to inject context before a tool read. Neither does image shrinking: the only way to hand opencode a smaller image is to point its `read` at a copy, and opencode checks its `read` and outside-directory permissions against that copy's path instead of the image's, so a rule you set on the image would stop applying. Shell commands are not wrapped for compression either, since opencode's permission rules can come from an organization account or a well-known URL no hook reads; their output is still compressed after they run.

### openclaw users

Expand Down
14 changes: 8 additions & 6 deletions docs/security.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eslint-suppressions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"src/bash_extractors.ts": {
"regexp/no-super-linear-backtracking": {
"count": 19
"count": 17
}
},
"src/cli_bootstrap_audit.ts": {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
"unzipper": "^0.12.5",
"adm-zip": "^0.6.1",
"fast-uri": "^3.1.6",
"qs": "^6.16.0",
"tesseract.js-core": "6.1.2"
"qs": "^6.16.0"
}
}
Loading