Repository navigation
Document data flows and add per-stage cloud controls (#21) - #34
Open
1aifanatic wants to merge 2 commits into
Open
1aifanatic wants to merge 2 commits into
1aifanatic wants to merge 2 commits into
Conversation
PostToolUse now emits replacements as hookSpecificOutput.updatedToolOutput in the tool's own shape (Bash stdout with stderr/interrupted kept, Read file.content with metadata kept) instead of a top-level tool_response that Claude Code ignores. Bash and Read results now actually reach the filter and compression path. Savings are booked only after a replacement is emitted. UserPromptSubmit cannot replace the prompt, so it now emits only the intent hint as hookSpecificOutput.additionalContext and no longer calls compress or books prompt-compression savings that never reached the model. Adds subprocess contract tests for the built hooks (temporary HOME, stub Scaledown API) and updates README/setup/AGENTS.md claims. Refs scaledown-team#15 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SCALEDOWN_CLASSIFY_DISABLE: skip per-prompt classification (prompts are never sent) without affecting tool-output compression or the proxy. - SCALEDOWN_POST_TOOL_LOCAL_ONLY: keep only the local ls/grep/git structural filter; tool output is never sent. - SCALEDOWN_LOCAL_ONLY: no Scaledown requests from hooks or the proxy and no API key required (implies the above plus SCALEDOWN_PROXY_DISABLE). - `dietcode clear-cache` removes ~/.scaledown/proxy and proxy-cache only. README gains a "Data flows & privacy" section: what each stage sends, when, to which endpoint, the switch for each, what is persisted locally and its retention, and a note that no service privacy/retention terms were found. Tests assert disabled stages make no requests (built hooks against a stub API with a temporary HOME; proxy with a counting client) and that local-only forwards proxy requests unchanged. Refs scaledown-team#21 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #21
Controls
Each one is independent, and the defaults are unchanged:
SCALEDOWN_CLASSIFY_DISABLE=trueUserPromptSubmitskips classification, so the prompt is never sent. Tool-output compression and the proxy keep working.SCALEDOWN_POST_TOOL_LOCAL_ONLY=truePostToolUsekeeps the zero-latencyls/grep/gitstructural filter and never sends tool output.SCALEDOWN_LOCAL_ONLY=trueSCALEDOWN_PROXY_DISABLE, and no API key is required.SCALEDOWN_POST_TOOL_DISABLE,SCALEDOWN_PROXY_DISABLEPlus
dietcode clear-cache, which deletes~/.scaledown/proxy(running summaries) and~/.scaledown/proxy-cache(stashed originals forsd_retrieve). It leaves the config and stats alone.uninstallnow mentions it.Docs: new README section "Data flows & privacy"
testclassify call during setup.sd_retrieve), the proxy's upstream, and the status line's npm registry update check./privacyand/termsreturn 404, and neither site links to any). The README says that plainly and asks maintainers to add the links. I didn't invent any policy text.SCALEDOWN_BASE_URLand the three new variables.Tests (the acceptance checks)
hooks/hook-contract.test.ts(built hooks; temporaryHOME; stub Scaledown API that records every request):/compress/raw/;lsoutput is still filtered;SCALEDOWN_LOCAL_ONLYwith no API key: zero requests from either hook, and local filtering still applied.src/local-only.test.ts(os.homedirmocked to a temp dir):summarizecalls;clearProxyStoreremoves only the proxy files.npm run test:unit.tsc --noEmitis clean. The 87 tests across the hook, local-only and niah suites pass.src/client.test.tsstill fails with the pre-existingjest is not definederror that fix: restore ESM test execution and cover proxy tests in CI #26 fixes.HOME=<tmp> node dist/bin/setup.js clear-cacheremoved both proxy dirs and keptstats.json.Not done
clear-cacheis the manual option for now.🤖 Generated with Claude Code