Repository navigation
Conversation
Restish started every command plugin with --rsh-plugin-commands on each invocation, to list its commands: a subprocess before anything else, even for `restish --version` or a shell completion. With restish-mcp installed it cost ~13 ms per invocation (39 ms -> 26 ms for --version). A plugin whose command list does not change between runs can now also declare it in its manifest (Manifest.Commands). Manifests are already cached per plugin binary (path, mtime, size), so the host uses these commands without starting the plugin. Plugins that leave it empty keep the discovery call, and older hosts ignore the field, so plugins keep answering --rsh-plugin-commands with the same list. restish-mcp and restish-bulk declare their commands in their manifest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
Restish started every command plugin with
--rsh-plugin-commandson each invocation, to list its commands. That is a subprocess before anything else, even forrestish --versionor a shell completion.addCommandPlugins + if the (cached) manifest declares Commands -> use them, no subprocess else run the plugin with --rsh-plugin-commands (unchanged)Manifest.Commands. Manifests are already cached per plugin binary (path, mtime, size), so the host builds the commands without starting the plugin.--rsh-plugin-commandswith the same list.plugin.RunandHandleStartupFlagsalready do.restish-mcpandrestish-bulkdeclare their commands in their manifest.docs/plugin-quickstart.mdand design doc 020 are updated.Evidence
restish --versionwithrestish-mcpinstalled: 39 ms before, 26 ms after; 24 ms without any plugin.TestCommandPluginManifestCommandsSkipDiscovery. Its test plugin exits with an error when asked for--rsh-plugin-commands. Without the host change, the test fails with that discovery error; with it,greetis listed and runs.go test ./...andgo test -tags integration ./...pass.Merge Danger
Door: two-way
The field is additive and optional.
Blast Radius: command plugins
A plugin declaring manifest commands that differ from its discovery answer would show the manifest ones.