Repository navigation
Conversation
The resolver recognizes Agent Plugins (agent-plugins.org, spec 1.0.0) directories when ResolveOptions.PluginsEnabled is set and emits them as KindPlugin resources with their skills attributed to the plugin. Resolve, and the Manager until the next change wires the flag, keep plugin discovery off. Discovery: a plugin is an immediate child of plugins/ or .agents/plugins/ under a scan root, or a scan root that itself holds a plugin.json. A plugin.json at a scan root or in plugins/ whose $schema is absent or not an https://agent-plugins.org/schemas/ URL may belong to another tool and is ignored after a debug log. In .agents/plugins/ every plugin.json is taken as an Agent Plugins manifest and every problem is reported as an invalid plugin with the reason. Validation follows spec section 5: name grammar (via workspacesdk.ValidatePluginName), optional string fields, keywords as strings, closed author object, extensions as object. Unknown top-level fields are recorded in Resource.Error while the status stays OK; other violations reject the plugin and load none of its skills. Version and description are stripped of U+0000 and capped at 64 and 1024 runes. The plugin root is canonicalized once and is the containment boundary for plugin.json, skills/, each skill directory, and every SKILL.md; per spec section 4.1 each may be a symlink that resolves inside the root. Symlinked plugin directories and plugin containers are skipped, as are paths longer than workspacesdk.MaxContextSourceBytes or names that are not valid UTF-8. Resources are deduplicated on Source, across kinds, since coderd rejects a push that repeats one. Skills are deduplicated by (PluginName, Name), so a plugin skill and a plain skill of the same name both survive. A plugin name already claimed by an earlier root makes later same-named plugins invalid. The resolver drops excluded rows past workspacesdk.MaxContextResources and drops skills whose plugin is not OK after the caps. The built-in ~/.claude/plugins/cache scan root is removed: Claude's .claude-plugin manifests are not read. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VpiVZBgFqiSdRKrH8dPSPT
Manager.SetPluginsEnabled stores the flag and re-resolves on change; both resolve paths pass it to the resolver through ResolveOptions. The agent sets it from Manifest.AgentPluginsEnabled on every manifest. With it off, the resolver reads no plugin.json, a scan root's skills/ holds plain skills, and no plugin directories are watched. Watcher syncs are serialized and each reads the current scan roots and options, so an older root set never replaces a newer one. With plugins enabled, the fsnotify watcher registers the plugin containers under each scan root (or the existing parent of a missing .agents/plugins), each immediate plugin directory, its skills/ container, and the skill directories the resolver would read, and treats plugin.json events as relevant. Sync publishes each directory's watch role through an atomic pointer, so filtering an event never waits on a Sync blocked in fsnotify Add or Remove on Windows. The watcher re-adds a watched directory that was removed or renamed since the last Sync, and the debounce timer has its own lock. When the manifest has no directory the agent logs, at Info and again only when Manifest.AgentPluginsEnabled changes, the working-directory entries it does not scan, pointing at ~/.coder/.agents/plugins when plugins are on. The extending-agents docs gain an Agent Plugins (experimental) section, and the platform controls experiments list links to it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VpiVZBgFqiSdRKrH8dPSPT
The resolver lists plugin container children with immediateSubdirs, so it lands with discovery rather than with the watcher change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VpiVZBgFqiSdRKrH8dPSPT
…ugins/03-plugin-wiring
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VpiVZBgFqiSdRKrH8dPSPT
…ugins/03-plugin-wiring
Resync and resolveAndBroadcast pass the Manager's ResolveOptions to the resolver. pluginsEnabled stays false until SetPluginsEnabled lands with the manifest wiring, so the next change only adds the setter. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VpiVZBgFqiSdRKrH8dPSPT
…ugins/03-plugin-wiring
Document where a plugin's skills live and the description requirement plugin skills have from discovery on, and say that an invalid plugin appears in the context list with its error. The chat-side plugin skill behavior is added with chatd support. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VpiVZBgFqiSdRKrH8dPSPT
…gent-plugins/03-plugin-wiring
…gent-plugins/03-plugin-wiring
3241be9 to
2b8b73a
Compare
…gent-plugins/03-plugin-wiring
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ccd0b51bb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A removed directory was copied into the new watch set before its re-add, so a failed Add (or one skipped after ENOSPC) left it marked as watched and later Syncs never retried it. Keep removed directories only once the re-add succeeds.
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
kqueue treats Add on an already-watched path as a no-op, so revoking read permission cannot make the re-add fail on macOS.
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Manager.SetPluginsEnabledturns plugin discovery on or off and re-resolves on change; the agent sets it fromManifest.AgentPluginsEnabled. The fsnotify watcher watches plugin containers, plugin directories, and plugin skill directories when enabled, serializes syncs, and re-adds replaced directories. The agent logs which working-directory entries it does not scan when the template sets nodir. Adds the Agent Plugins (experimental) docs section.With this PR the stack matches #29321.
Part 4 of the #29321 split.
Stack (base
main, replaces #29321–#30577):Generated by Claude Code