Persistent artifacts: FileArtifactStore, artifact_list, tool-aware saves - #53
Merged
Conversation
Two-tier store: memory keeps everything for the session (unchanged behavior); a disk tier under a caller-chosen directory persists the subset approved by persistFilter(toolName) with an oldest-first byte budget, so tool history survives restarts — retrieved strictly on demand. ArtifactStore.save now requires the tool-aware signature (legacy 3-arg lives in a protocol extension forwarding dynamically); ContextManager passes the producing tool's name. artifact_list (new) enumerates both tiers for discovery and auto-registers when the store is listable. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
SAK half of the persistent-artifacts spec (Naseem repo: docs/superpowers/specs/2026-08-24-persistent-artifacts-design.md):
persistFilter(toolName)-approved subset (content-first, sidecar-last atomic writes; corrupt entries self-heal; oldest-first eviction overmaxBytes, default 25 MB).toolName:(protocol requirement for dynamic dispatch — a protocol-extension default was being selected over the actor's implementation, silently dropping the name; legacy 3-arg is the extension convenience). Only in-repo conformers existed.ContextManager.artifactToolswhen the store conforms toListableArtifactStore.Tests: 5 new (restart round-trip, filter, eviction, both-tier listing, ContextManager toolName pass-through); full suite 267/267.
🤖 Generated with Claude Code