Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Changelog

## v0.5.0

### Upgrade notes

- **The Bash hook is retired.** Claude Code checks permission rules against the command a
PreToolUse hook returns, and the hook rewrote every Bash command to `secondwind exec -c '...'`
while answering "allow", so Bash deny rules stopped matching and prompts were skipped. `secondwind
hook` now passes every command through unchanged, `setup --hook` installs nothing, plain
`secondwind setup` removes a hook an earlier version installed, and `secondwind check` warns while
one is still there. Use the Claude Code mod instead (below).
- **Offloading depends on where a block came from.** When a caller names the tool and command (MCP
`optimize` takes optional `tool` and `command`; `exec` uses its own), output that is usually read
in full, such as a large `cat` or `Read`, stays in view and only inline codecs apply. Callers that
name nothing behave as before.
- **Figures read from recorded sessions drop.** The trace reader counted images and PDFs as base64
text and wrapped every tool result in JSON the model never saw. On the author's sessions that
made tool output look seven times larger than it is, so `cache-savings` and the audit report less.

### Security

- The retired Bash hook let Bash commands run without the user's deny rules or prompts (above).

### Added

- `secondwind eval` replays your recorded sessions through the optimizer and reports, per tool and
command, what was offloaded, how often the model later needed it, net tokens, and whether every
block came back intact. `--learn` fits reopen rates on half your sessions, replays the other half
with and without the gate, and writes `~/.secondwind/policy.json`; `--gate` and `--query` replay
with the gate or with your latest message as the query; `--blocks` writes one line per result.
- A reopen policy per command class and size decides whether a block may be offloaded. The
built-in table comes from 1,491 real sessions; a learned `policy.json` replaces it. On held-out
sessions the learned gate cut reopens per session from 23.6 to 4.8, and no block of 138,209 came
back different from the original.
- Claude Code mod 0.2.0: sends the command with each block, so a large `cat` stays in view, and
compresses from 512 bytes instead of 6 KB. For Bash on held-out sessions it saves 9.7% of all
tool output instead of 6.6%, with fewer extra turns. Tests now pin the pane's off, empty, win and
loss states.

### Fixed

- `optimize`'s `query` description no longer claims it helps text; it applies to JSON record
arrays.

## v0.4.0

### Upgrade notes
Expand Down
20 changes: 10 additions & 10 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ members = [
]

[workspace.package]
version = "0.4.0"
version = "0.5.0"
edition = "2024"
license = "Apache-2.0"
repository = "https://github.com/orchetron/secondwind"
Expand Down
12 changes: 6 additions & 6 deletions bindings/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "secondwind",
"version": "0.4.0",
"version": "0.5.0",
"description": "Lossless, provable, composable LLM context compression",
"type": "module",
"exports": {
Expand Down Expand Up @@ -32,11 +32,11 @@
"koffi": "^3.1.1"
},
"optionalDependencies": {
"@orchetron/secondwind-darwin-arm64": "0.4.0",
"@orchetron/secondwind-darwin-x64": "0.4.0",
"@orchetron/secondwind-linux-x64": "0.4.0",
"@orchetron/secondwind-linux-arm64": "0.4.0",
"@orchetron/secondwind-win32-x64": "0.4.0"
"@orchetron/secondwind-darwin-arm64": "0.5.0",
"@orchetron/secondwind-darwin-x64": "0.5.0",
"@orchetron/secondwind-linux-x64": "0.5.0",
"@orchetron/secondwind-linux-arm64": "0.5.0",
"@orchetron/secondwind-win32-x64": "0.5.0"
},
"devDependencies": {
"@ai-sdk/provider": "^4.0.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@orchetron/secondwind-darwin-arm64",
"version": "0.4.0",
"version": "0.5.0",
"description": "secondwind native library for darwin-arm64",
"license": "Apache-2.0",
"os": [
Expand Down
2 changes: 1 addition & 1 deletion bindings/node/platforms/secondwind-darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@orchetron/secondwind-darwin-x64",
"version": "0.4.0",
"version": "0.5.0",
"description": "secondwind native library for darwin-x64",
"license": "Apache-2.0",
"os": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@orchetron/secondwind-linux-arm64",
"version": "0.4.0",
"version": "0.5.0",
"description": "secondwind native library for linux-arm64",
"license": "Apache-2.0",
"os": [
Expand Down
2 changes: 1 addition & 1 deletion bindings/node/platforms/secondwind-linux-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@orchetron/secondwind-linux-x64",
"version": "0.4.0",
"version": "0.5.0",
"description": "secondwind native library for linux-x64",
"license": "Apache-2.0",
"os": [
Expand Down
2 changes: 1 addition & 1 deletion bindings/node/platforms/secondwind-win32-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@orchetron/secondwind-win32-x64",
"version": "0.4.0",
"version": "0.5.0",
"description": "secondwind native library for win32-x64",
"license": "Apache-2.0",
"os": [
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "secondwind"
version = "0.4.0"
version = "0.5.0"
description = "Lossless, provable, composable LLM context compression"
readme = "README.md"
requires-python = ">=3.9"
Expand Down
2 changes: 1 addition & 1 deletion integrations/claude-code/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "secondwind",
"version": "0.1.0",
"version": "0.2.0",
"description": "Compress Bash output through secondwind, recover offloaded blocks, and watch net savings in a pane",
"types": "./types/index.d.ts"
}
Loading