Repository navigation
plugins: a project's plugin is used only once approved, as its files are - #33
Merged
Merged
Conversation
A plugin in <workspace>/.incode/plugins/ arrives with whatever was cloned, and its hooks ran commands, its servers started programs and its skills and commands were told to the agent, with no approval: a repository could run a command on the first tool call. Now none of a project's plugin is used until the operator approves it: - src/plugin_approvals.rs: a fingerprint of the plugin folder (every entry's path and bytes, sorted and length-framed; .git left out) and the store <data dir>/plugin-approvals.json. An approval is the plugin's name and that fingerprint, so any change to the plugin leaves it out again until approved again, the rule a project's .mcp.json servers follow. A symbolic link anywhere in the plugin makes it unapprovable: its target could change without the plugin changing. A store that cannot be read is said, never read as approved. - plugins::discover_usable is the one gate. session_hooks, session_servers, session_skills and custom_commands::Registry::load all take their plugins through it; the plugins left out are said once, with Registry::load's warnings (REPL, --acp and -t), with how to approve each. - `incode plugin approve <name>` approves a project's plugin as it is now; `incode plugin list` shows each one's state; the completion table offers `approve`. The operator's own plugins (~/.incode/plugins/) need no approval. plugins::discover_here lost its last caller to the gate and is removed. Tests: through discover_usable with the data dir pointed at a temp folder, a project plugin is left out and said, used once approved, and left out again when its hooks change, while the operator's is used as is; the fingerprint follows content and ignores .git; a plugin holding a symlink cannot be approved; a broken store is reported and trusts nothing. Controls: with the gate passing every plugin, or with links fingerprinted, the tests fail. Follow-up: an interactive "approve now?" question in the REPL, as .mcp.json servers have.
This was referenced Oct 22, 2026
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.
Approved by the owner. A plugin in
<workspace>/.incode/plugins/arrives with whatever was cloned, and its hooks, MCP servers, skills and commands were used with no approval: a repository could run a command on the first tool call..gitleft out). Any change leaves it out again until re-approved, the same rule as a project's.mcp.jsonservers. A plugin with a symbolic link cannot be approved (its target could change unseen). A broken store is reported and trusts nothing.plugins::discover_usable) for hooks, servers, skills and custom commands; plugins left out are said once (REPL,--acp,-t), with how to approve.incode plugin approve <name>;incode plugin listshows the state. Your own~/.incode/plugins/need no approval.Tests go through the real gate with the data folder pointed at a temp dir; controls (gate passing everything, links fingerprinted) fail them.
Local (Windows): fmt clean; clippy only the existing
with_tool_serverwarning; bin 59 passed; lib 2197 passed, 1 failed: the desktop UIA live test that walks whatever window has focus here (passes in CI).Follow-up: an interactive "approve now?" question in the REPL.