Repository navigation
feat(capture): arm auto-capture by default - #436
Merged
Merged
Conversation
Read the switch as an opt-out: capture runs unless the config sets autoCapture:false. An omitted captureModel still inherits the session's model, then the host default, so a plain install needs no option at all to capture. The plugin_load heartbeat and the memory_status line now name the states against the new default: capture=on is the default, off means an explicit false, and switch_mismatch requires autoCapture:false with captureOnCompact:true. captureOnCompact alone is simply on. The README states what the default means for the user's data: installing the plugin sends a redacted copy of the conversation to the configured model at every turn end and compaction, and autoCapture:false is the one-line opt-out. The honest caveat keeps the fact that quality and cost are still unmeasured, now beside the fact that the pass runs on installs that set nothing. Tests: the five cases that pinned the old default now pin the new one, and each keeps a case for the explicit false. e2e/capture.test.ts adds the shipping path on a real host - no options at all, pass starts on the first turn - which passed on attempt 1. ctx.options is bound to a local at the top of configureAutoCapture: the old === true comparison narrowed the type, !== false does not.
|
🎉 This PR is included in version 0.31.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What changes
Auto-capture is armed unless the config sets
autoCapture: false. Before this, both read sites required an explicittrue:Both now read
!== false.captureModelstays optional: an omitted value inherits the session's model, then the host default, so a plain install needs no option to capture. An explicit value that is notprovider/idstill disables capture rather than substituting a model the user did not type.This also fixes the README sentence that prompted it — "To turn it on you must also name the model it may use" was stale twice over: the model has not been required since the inheritance work, and the default is now on.
What the states mean now
plugin_loadcapture=onautoCapture: true+ valid modeloffautoCapture: falseswitch_mismatchcaptureOnCompact: true,autoCaptureabsentautoCapture: falseandcaptureOnCompact: trueinvalid_modelno_capabilitiescaptureOnCompact: truealone is now simplyon, so the runtime warning fires only on a real contradiction.memory_statussaysoff (autoCapture: false)instead ofoff (default).The cost of this decision, stated plainly
Every install now makes one model call per turn-end and per compaction, and that call carries a redacted copy of the conversation to the configured model over the user's provider. Reasoning content is excluded,
redactSecretsruns first, and candidates face the same write gates as manual writes — but the read leaves the machine. The README says this outright in a "What that default means for your data" paragraph, and the honest caveat keeps the fact that quality and cost are still unmeasured, now beside the fact that the pass runs on installs that set nothing.docs/injection-cost.mdgains the matching clause, because "read from session numbers, the plugin's own cost is exactly zero" is more misleading than it was when capture was opt-in.Test plan — every line run on
d789ad9bun run gategreen: comment policy (41 added comment lines), tsc, biome, 1,482 unit / 21 skip across 132 files, 35 e2e on the real hostdefault options: no key set, and the pass still starts— a realopencode runturn with{}as the options object,plugin_loadreportingcapture=on, pass started on attempt 1,trigger=idle,prompt_chars=[1-9]false:autoCapture false: only the zero-model measured listener subscribesdefault options: capture is armed, so the capture listener subscribesautoCapture false: the compaction hook stays model-freedefault options: capture=on, and the subscribed vocabulary is visible+autoCapture false: capture=off, the one opt-outswitch mismatch: autoCapture false with captureOnCompact true+captureOnCompact alone is plain one2e/capture.test.tscontrol (autoCapture: false→ nothing fires, nothing written) still green, so the new default cannot be confused with an always-on pipelineNotes for review
ctx.optionsis bound to a local at the top ofconfigureAutoCapture. The old=== truecomparison narrowed the type;!== falsedoes not, so two reads becamepossibly undefinedundertsc.README.md(feature bullet, Auto-capture section, options table, "Am I armed?", troubleshooting row),docs/options.md(autoCapture,captureModel,captureOnCompact),docs/injection-cost.md.## What memory is worth, measuredis untouched, sotest/claims.test.tsstill pins the published numbers.Merge order
Base is
main. This branch was stacked ondocs/voice-on-main(#435), whose Auto-capture section it rewrites; #435 merged asc141779, and the base was retargeted tomainby hand because GitHub left it pointing at the closed branch.git log --oneline origin/main..origin/feature/autocapture-default-onis this one commit,d789ad9, and the diff againstmainis the 13 files listed above. GitHub reports BEHIND only because the branch lacksc141779itself, which adds no content beyond the769f001this branch already carries.