Skip to content
Open
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
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,40 @@

All notable changes to the Toolpath workspace are documented here.

## `path p redact` - plan-then-apply credential redaction - 2026-07-30

Adds `path p redact`, a plumbing command that removes credentials from an
already-generated toolpath document in place, via a reviewable plan-then-apply
flow with detection behind a swappable trait.

- **`toolpath-redact`** (0.1.0):
- Pure function engine with no env vars, no filesystem, no clock, no
process globals. Takes a document, plan, and config; returns redacted
document and audit report.
- Plan-then-apply workflow: `surfaces()` enumerates every string field a
credential could hide in; `plan::generate()` runs detectors and produces a
reviewable `Plan` with stable ids and elided context; `apply()` rewrites
the document. Plans can be decided by predicate, picker, or hand-edited
JSON.
- Detector trait (`Detector`) lets implementations be pluggable: built-in
rule-based detector via vendored gitleaks ruleset, `FixedDetector` for
tests, future hook paths for harness-time redaction.
- Five transform choices: `marker` (default, survives diffs), `remove`, `hash`,
`mask` (length-preserving), `partial` (4 leading/trailing chars,
length-leaking). Global and per-rule overrides.
- Field map surfaces `Prose`, `ToolInput`, `ToolOutput`, `UnifiedDiff`,
`FileContent`, `Uri`, `OpaqueJson`. RFC 6901 pointers to reach any value.
- **`path-cli`** (0.16.2):
- `path p redact --input <ref> [--dry-run|--plan <file>] [--accept|--reject <predicate>]…`
redacts cache ids or file paths. Dry run lists every surface (including
zero-finding ones) and exits 1 if findings exist. `--plan` lets you
review before applying. Predicates on `rule`, `shape`, `step`, `detector`,
`at`, `score`. Key storage in `~/.toolpath/redact-keys/<cache-id>` (0600).
- Sync integration: `path p cache sync` replays stored `RedactionPolicy` on
re-derive, so resuming a redacted session and syncing applies redaction
to new turns too. Missing key is a hard error, never a silent new key.
- Validation always runs; output validates against base schema and
`agent-coding-session` kind schema v1.1.0.
## Projected Claude sessions are resumable again — 2026-07-30

Two fixes found by live-resuming a projected session against the real
Expand Down
20 changes: 18 additions & 2 deletions CLAUDE.md

Large diffs are not rendered by default.

107 changes: 106 additions & 1 deletion Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ members = [
"crates/toolpath-dot",
"crates/toolpath-md",
"crates/toolpath-pi",
"crates/toolpath-redact",
"crates/pathbase-client",
"crates/path-cli",
]
Expand All @@ -37,7 +38,8 @@ toolpath-github = { version = "0.6.0", path = "crates/toolpath-github" }
toolpath-dot = { version = "0.5.0", path = "crates/toolpath-dot" }
toolpath-md = { version = "0.7.0", path = "crates/toolpath-md" }
toolpath-pi = { version = "0.6.1", path = "crates/toolpath-pi" }
path-cli = { version = "0.16.1", path = "crates/path-cli" }
toolpath-redact = { version = "0.1.0", path = "crates/toolpath-redact" }
path-cli = { version = "0.16.2", path = "crates/path-cli" }
pathbase-client = { version = "0.2.0", path = "crates/pathbase-client" }

reqwest = { version = "0.13", default-features = false, features = ["blocking", "json", "rustls"] }
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ crates/
toolpath-opencode/ Derive from opencode SQLite databases
toolpath-cursor/ Derive from Cursor (IDE) state.vscdb bubble store
toolpath-pi/ Derive from Pi (pi.dev) agent sessions
toolpath-redact/ Detect and redact credentials in Toolpath documents
toolpath-dot/ Graphviz DOT visualization
toolpath-md/ Markdown rendering for LLM consumption
pathbase-client/ Progenitor-derived typed client for the Pathbase HTTP API
Expand Down Expand Up @@ -199,6 +200,8 @@ path
md [--input FILE] [--output FILE] [--detail summary|full] [--front-matter]
merge FILE... [--title TEXT]
validate --input FILE
redact --input REF [--dry-run | --plan FILE] [--accept PRED]... [--reject PRED]...
[--mode marker|remove|hash|mask|partial] [--threshold N] [--reveal] [--output FILE]
derive # stdout-JSON sibling of import (same sources, --no-cache implied)
project # narrower file-shaped sibling of export
incept # file/stdin-shaped sibling of `export <provider> --project` (claude, cursor)
Expand Down
3 changes: 2 additions & 1 deletion crates/path-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "path-cli"
version = "0.16.1"
version = "0.16.2"
edition.workspace = true
license.workspace = true
repository = "https://github.com/empathic/toolpath"
Expand All @@ -26,6 +26,7 @@ toolpath = { workspace = true }
toolpath-git = { workspace = true }
toolpath-dot = { workspace = true }
toolpath-md = { workspace = true }
toolpath-redact = { workspace = true }
clap = { workspace = true }
anyhow = { workspace = true }
serde = { workspace = true }
Expand Down
Loading