feat(archive): full-file path in pointer + env-configurable knock-in/knock-out#68
Conversation
…knock-out - archive replacement message now includes the on-disk file path (and expand id), so the full result is directly retrievable, not only via `expand <key>` - _ARCHIVE_THRESHOLD (knock-in X) / _ARCHIVE_PREVIEW_SIZE (knock-out Y) are now env-tunable: TOKEN_OPTIMIZER_ARCHIVE_THRESHOLD / TOKEN_OPTIMIZER_ARCHIVE_PREVIEW_SIZE - enforce X > Y: clamp Y below X on misconfig (never crashes the hot-path hook) - replace the literal 1500 preview-size with the named constant - build_archive_pointer gains an optional, backward-compatible archive_path arg Defaults unchanged (4096/1500). Both mirrored copies updated.
|
Thank you for your contribution! Before we can merge this PR, you need to sign our Contributor License Agreement. This project uses dual licensing (PolyForm Noncommercial + Commercial). The CLA ensures we can continue offering both licenses. To sign, please post a comment with exactly: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
Thanks for digging into the archive path, @niemst — appreciate the careful defensive coding (the Env-configurable thresholds — declining. The File path in the archived message — good idea, but I'd land it differently. Surfacing a raw path as a fallback for harnesses where Heads-up separately: the CLA check is still red because the sign-off comment hasn't been posted — unrelated to the review above, just flagging so it's not a mystery. Thanks again for the contribution and the clear write-up. |
What
expandid), so a full result is directly retrievable — not only viaexpand <key>.TOKEN_OPTIMIZER_ARCHIVE_THRESHOLD— knock-in X (min size to archive)TOKEN_OPTIMIZER_ARCHIVE_PREVIEW_SIZE— knock-out Y (inline preview cap)1500preview size into the named constant;build_archive_pointergains an optional, backward-compatiblearchive_patharg.Notes
skills/…andplugins/token-optimizer/skills/…) updated identically.py_compileclean; verified default / override / clamp / invalid-fallback at import time.