{"_id":"@async23/pi-context-control","_rev":"3-7559d024d11a423d5c57ecbebd570d64","name":"@async23/pi-context-control","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@async23/pi-context-control","version":"0.1.0","keywords":["pi-package","pi-coding-agent","context","agents-md"],"license":"MIT","_id":"@async23/pi-context-control@0.1.0","maintainers":[{"name":"async23","email":"gearrr005@gmail.com"}],"homepage":"https://github.com/Async23/pi-packages/tree/main/packages/context-control#readme","bugs":{"url":"https://github.com/Async23/pi-packages/issues"},"pi":{"extensions":["./extensions/context-control.ts"]},"dist":{"shasum":"233528e028232fb2fc4af0b287acea4f431866d5","tarball":"https://registry.npmjs.org/@async23/pi-context-control/-/pi-context-control-0.1.0.tgz","fileCount":4,"integrity":"sha512-tazVzrTzjBKJI/NmUQsToVwTyNW3ee86ezbJwfrW0q0KrGRO7d5aLWTEfusdq6DWCSe8tRj0vuXtKWlAbuMhBA==","signatures":[{"sig":"MEQCIHcu83GH/Rp7QDPXOc6jpAKN+f2XimRYctCMDJGmL5TaAiA+WgiFArVfuBvBE9bOBkdJoo4BY/fwjA/sT4PuRwivBg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33866},"type":"module","gitHead":"577793ae2e6b1516d39f54681401148b32ff2ae1","_npmUser":{"name":"async23","email":"gearrr005@gmail.com"},"repository":{"url":"git+https://github.com/Async23/pi-packages.git","type":"git","directory":"packages/context-control"},"_npmVersion":"11.17.0","description":"Interactively enable or disable Pi Context instruction files","directories":{},"_nodeVersion":"26.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-context-control_0.1.0_1784491833054_0.3020806144211463","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@async23/pi-context-control","version":"0.1.1","keywords":["pi-package","pi-coding-agent","context","agents-md"],"license":"MIT","_id":"@async23/pi-context-control@0.1.1","maintainers":[{"name":"async23","email":"gearrr005@gmail.com"}],"homepage":"https://github.com/Async23/pi-packages/tree/main/packages/context-control#readme","bugs":{"url":"https://github.com/Async23/pi-packages/issues"},"pi":{"extensions":["./extensions/index.ts"]},"dist":{"shasum":"50a16be0008c8e5835f2d0768c72baa238d98775","tarball":"https://registry.npmjs.org/@async23/pi-context-control/-/pi-context-control-0.1.1.tgz","fileCount":4,"integrity":"sha512-fURJkqzrGR6WK8zLSyiPq/SFHYFbcPSxAzpqy2kiNM2+mj74dDiGQiLs3CqwWv4zRfmBUvraXwzmCJaJtSfVgA==","signatures":[{"sig":"MEUCIHiSYw/iMOvAPSUlWUcpFre9q87MxID5LiwL1Sqb9yHzAiEA9ZVhDdKxFWy/8SZswE3wtC3RG6giG4Gv4dwdr3gOGms=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33856},"type":"module","gitHead":"f8b7556f2fafea99c41ae0c73d0ff4d2ec8116a9","_npmUser":{"name":"async23","email":"gearrr005@gmail.com"},"repository":{"url":"git+https://github.com/Async23/pi-packages.git","type":"git","directory":"packages/context-control"},"_npmVersion":"11.17.0","description":"Interactively enable or disable Pi Context instruction files","directories":{},"_nodeVersion":"26.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-context-control_0.1.1_1784513386349_0.5867883004630996","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@async23/pi-context-control","version":"0.2.0","description":"Interactively enable or disable Pi Context instruction files","type":"module","license":"MIT","keywords":["pi-package","pi-coding-agent","context","agents-md"],"repository":{"type":"git","url":"git+https://github.com/Async23/pi-packages.git","directory":"packages/context-control"},"homepage":"https://github.com/Async23/pi-packages/tree/main/packages/context-control#readme","bugs":{"url":"https://github.com/Async23/pi-packages/issues"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*","@earendil-works/pi-tui":"*"},"publishConfig":{"access":"public"},"pi":{"extensions":["./extensions/index.ts"]},"gitHead":"7979ac80af73d7a5832e022c975aa83ed5de3c5d","_id":"@async23/pi-context-control@0.2.0","_nodeVersion":"24.18.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-+Idv1rk9MB+RLb3+j7iIlL4Yj/bsmHH/OZMw97dbgsvReeJeE1rIdkLgfGU1y458lv1ouRxnX/ICcZ94tCJ2iQ==","shasum":"430f8c6e90c48ef25ebf8e95b3c6189f1134b291","tarball":"https://registry.npmjs.org/@async23/pi-context-control/-/pi-context-control-0.2.0.tgz","fileCount":4,"unpackedSize":56397,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@async23%2fpi-context-control@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG8+tSHj2DpBIgaurlPe0XT2ufMG10q/ZnvVP3z7k1apAiAbb0Rk9BHO8Zzqeir1XrobmtUTFpsq2ozpimNT1FP8Kg=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1474c090-d708-4760-8331-5db078b7fa45"}},"directories":{},"maintainers":[{"name":"async23","email":"gearrr005@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-context-control_0.2.0_1785661694261_0.2042187971720033"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-19T20:10:32.938Z","modified":"2026-08-02T09:08:14.784Z","0.1.0":"2026-07-19T20:10:33.259Z","0.1.1":"2026-07-20T02:09:46.478Z","0.2.0":"2026-08-02T09:08:14.438Z"},"bugs":{"url":"https://github.com/Async23/pi-packages/issues"},"license":"MIT","homepage":"https://github.com/Async23/pi-packages/tree/main/packages/context-control#readme","keywords":["pi-package","pi-coding-agent","context","agents-md"],"repository":{"type":"git","url":"git+https://github.com/Async23/pi-packages.git","directory":"packages/context-control"},"description":"Interactively enable or disable Pi Context instruction files","maintainers":[{"name":"async23","email":"gearrr005@gmail.com"}],"readme":"# @async23/pi-context-control\n\nA Pi extension for interactively enabling or disabling loaded Context instruction files such as `AGENTS.md` and `CLAUDE.md`.\n\n## Install\n\n```bash\npi install npm:@async23/pi-context-control\n```\n\nRestart Pi after installation, or run `/reload` in an existing session.\n\nFor local development from this repository:\n\n```bash\npi --no-extensions -e ./packages/context-control\n```\n\n## Usage\n\nRun:\n\n```text\n/context\n```\n\nThe Context inspector lists the instruction files Pi discovered for the current working directory, groups them by configuration scope, and previews each file's complete contents. Groups start expanded and can be folded for the lifetime of the inspector. Filtering temporarily expands matching groups without changing their saved fold state.\n\n- Up/Down or `j`/`k` selects a group heading or file while Files is focused and scrolls while Preview is focused.\n- Space or Enter folds or unfolds a selected group heading. On narrow terminals, Enter opens Preview for a selected file.\n- On a selected group heading, Left or `h` collapses the group and Right or `l` expands it. On a selected file, Left/Right or `h`/`l` cycles focus between Files and Preview. Moving past either end wraps to the other pane; Tab remains an alternative on wide terminals.\n- `/` enters path-filter input from either pane; the slash is a trigger and is not part of the displayed query. Matching is case-insensitive and supports non-contiguous path characters.\n- Filter input uses Pi's native single-line editor, including Unicode/IME cursor positioning, paste, Left/Right, Home/End, and customized keybindings. Enter keeps the filter, while Escape cancels the edit and restores the previous filter.\n- Outside filter input, Escape returns from the narrow Preview first, then clears a kept filter before closing the inspector. Pending changes require explicit discard confirmation.\n- On a selected file, Space or Shift+Space stages an include/exclude change, `r` restores the default **Included** state, and `u` undoes the latest state change. These shortcuts do nothing while Preview is focused.\n- `?` opens a read-only guide to the two Context states.\n- Ctrl+S writes and applies all pending changes without closing the inspector. The saved state becomes the new editing baseline, so more files can be adjusted immediately. No Pi reload is needed.\n\nEvery Context file is **Included** by default. An excluded file is a saved override; returning it to Included removes that override. Rows show `Included`, `Excluded`, or `Pending`, and the selected file shows its current state and whether it is using the default, a saved exclusion, a pending exclusion, or a pending reset.\n\nApplied changes affect the next submitted prompt and persist across Pi sessions. State is stored in:\n\n```text\n~/.pi/agent/context-control.json\n```\n\nFiles are identified by their canonical absolute paths, so instruction files with the same basename in different directories can be controlled independently.\n\n## Limitations\n\nPi still discovers disabled files during startup, so its startup `[Context]` resource list may include them. This extension removes disabled files from the system prompt before each agent run; it does not change Pi's built-in resource discovery display.\n\nIf another extension rewrites Pi's generated `<project_context>` section before this extension runs, context filtering may not be applied and Pi shows a warning.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}