summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2026-10-22 20:51:39 +0000
committerJesse Vincent <jesse@fsck.com>2026-10-22 20:51:39 +0000
commit7455441f77de6c33b3f2f25159fa9dc6d2cc1305 (patch)
treefb8a53c8b10848531768d2563ae90b3227e89ec5 /docs
parent0f9581f6c1525b51dc1600b14d24f3db1f601446 (diff)
fix(pi): stop resources_discover from bypassing package skill filtersfix/2394-pi-skill-filters
The pi extension registered a resources_discover handler that returned the whole skills/ directory. pi applies a package's `skills` filter (the one `pi config` writes) only to manifest-declared resources; paths an extension contributes are merged afterwards, unfiltered. So with `"skills": []` or an allowlist on the superpowers package entry, pi 0.85.1 still loaded all 15 skills, every one attributed to extension:superpowers. package.json already declares `pi.skills: ["./skills"]`, and pi loads that with the user's filter applied, so the handler was redundant for package installs, including the README's `pi -e /path/to/superpowers`. Remove it. The bootstrap handlers are unchanged. The porting guide now names the manifest as pi's discovery mechanism. Verified against the real pi 0.85.1 CLI (RPC get_commands, no model call): skills [] loads 0 (was 15), an allowlist of using-superpowers loads 1 (was 15), no filter loads 15, `pi -e <checkout>` loads 15. Fixes #2394 Co-authored-by: m2dumpling <224757904+m2dumpling@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
Diffstat (limited to 'docs')
-rw-r--r--docs/porting-to-a-new-harness.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/porting-to-a-new-harness.md b/docs/porting-to-a-new-harness.md
index f52cd70..4964ff0 100644
--- a/docs/porting-to-a-new-harness.md
+++ b/docs/porting-to-a-new-harness.md
@@ -519,8 +519,8 @@ honors the rule rather than breaking it. Distinguish three cases:
`activate_skill`): point the mapping at that tool.
2. **Native skill *discovery* but no `Skill` tool** (pi, Antigravity): the harness
can find and list skills, but the model can't call a tool to load one. Get the
- skills installed where the harness scans (pi registers via `resources_discover`
- → `skillPaths`; OpenCode via its `config` hook; `agy plugin install` copies
+ skills installed where the harness scans (pi declares them in the package
+ manifest's `pi.skills`; OpenCode via its `config` hook; `agy plugin install` copies
them in), and tell the model to load a skill by **reading its `SKILL.md` with
the file-read tool when the skill applies** — the sanctioned mechanism here,
the way `references/pi-tools.md` states it.
@@ -811,7 +811,7 @@ Use this as the live index; when in doubt, read the files, not this table.
| Gemini CLI | `gemini-extension.json` + `GEMINI.md` | instructions file `@`-includes bootstrap + mapping | `references/gemini-tools.md` | — | `gemini extensions install` |
| Kimi Code | `.kimi-plugin/plugin.json` | manifest `sessionStart.skill` loads `using-superpowers` | inline `skillInstructions` in manifest | `tests/kimi/` | marketplace or `/plugins install` GitHub URL |
| OpenCode | `.opencode/plugins/superpowers.js` (root `package.json` `main` for package installs; root `index.js` re-export for the V2 directory form) | in-process: `config` hook registers skills dir; `experimental.chat.messages.transform` (V1) / `session.hook("context")` (V2) injects user message | inline in `superpowers.js` | `tests/opencode/` | `opencode.json` `plugin` (V1) / `plugins` (V2) git URL |
-| pi | `.pi/extensions/superpowers.ts` | in-process: `resources_discover` registers skills; `context` event injects user message; lifecycle-flag + compaction-aware | `piToolMapping()` inline **and** `references/pi-tools.md` | `tests/pi/` | repo-root `package.json` fields |
+| pi | `.pi/extensions/superpowers.ts` | in-process: package manifest registers skills; `context` event injects user message; lifecycle-flag + compaction-aware | `piToolMapping()` inline **and** `references/pi-tools.md` | `tests/pi/` | repo-root `package.json` fields |
## Appendix B — Gotchas that have bitten porters