Repository navigation
feat(pi): add Memory Changes and Stats tools - #1633
Merged
Teingi merged 2 commits intoSep 17, 2026
Merged
Conversation
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.
Summary
Add two native read-only Pi tools to expose existing PowerContext operations:
pc_memory_changes→list_memory_changes, with an optional non-negative exclusivesince_revisioncursor.pc_stats→get_stats, with an optionaltoday,7d, or30dperiod (default30d).Design: plan and final implementation
The plan was to expose the existing generated operations without adding a second transport or state layer, while keeping Scope resolution authoritative in the shared Pi invoke path. The final implementation follows that plan:
list_memory_changesreceives the resolved current Scope throughscopeMode: current.get_statsaccepts only the period at the Pi boundary; itsscopeMode: selectionmetadata causes the shared invoke layer to replace any selection with the resolved exact Scope. This keeps the native tool current-Scope-only and prevents caller-supplied cross-Scope selection.WRITE_OPERATIONS, require no confirmation, create no durable state, and do not alter profile capabilities.Non-goals
/pc statsalready exists.Verification
integration_manifest.py --checkpassed.ty checkpassed.git diff --checkpassed.Implementation and verification used Codex with GPT-5.6 Sol; the separate Luna review was read-only.
Refs #1338