Repository navigation
GH-164: plugin mcp remove envelope - #167
Closed
jasonbrazeal wants to merge 3 commits into
Closed
jasonbrazeal wants to merge 3 commits into
jasonbrazeal wants to merge 3 commits into
Conversation
Plugin tests can now build a direct tool call that appears to come from a model round instead of the section's script. A call still comes from the script by default, so existing tests keep their behavior. This lets a Pack test output that depends on who made the call. - `TestCall::with_caller` rebuilds the origin with `ToolCallOrigin::new`, keeping execution `plugin-test` and section `Test`. It is public within the `test-support` module and returns the call by value like `with_services`. - `a_test_call_with_a_caller_lends_that_caller` asserts that a call built with `ToolCaller::Model` lends that caller, section `Test`, and the given tool. Design: new surface-growth @ crates/runvil-plugin/src/testing.rs::TestCall::with_caller boundary: pub Plan: vibe/2026-10-21-1-mcp-script-raw-text.md
Both MCP tools now decide output trust from who made the call. A call from the section's own script gets the server's text marked trusted, so the script receives it without the untrusted envelope, while a model round or any other caller still gets untrusted text. The rendering path below the dispatch now returns plain text, so trust is decided in one place. - `marked` maps `ToolCaller::Script` to `ToolOutput::trusted` and every other caller, through a `_` arm, to `ToolOutput::untrusted`; `Mcp::call` reads `cx.origin().caller` once and applies it to both tools. - `render`, `output`, `send`, `call`, `call_tool`, and the `AbortOnDrop` join handle now carry `Result<String, ToolError>` instead of `ToolOutput`, so the result module no longer sets trust. - `invoke` now calls as `ToolCaller::Model` and still asserts untrusted output, so the existing tests keep pinning the model path; `invoke_as_script` returns the whole output for the new script-path tests. - `a_script_calls_is_error_result_is_the_same_backend_error_as_a_models` pins that a script call's `isError` result stays the same `Backend` error with the message `it failed`. - `lib.rs` replaces the invariant that every output is untrusted with the per-caller rule and states the same rule beside the two tool descriptions. Design: new pure-function @ crates/plugin-mcp/src/dynamic.rs::marked deps: String,ToolCaller Design: new surface-growth @ crates/plugin-mcp/src/dynamic.rs::Mcp::call Design: new pure-function @ crates/plugin-mcp/tests/it/support.rs::tool_call deps: str Plan: vibe/2026-10-21-1-mcp-script-raw-text.md
Plan: vibe/2026-10-21-1-mcp-script-raw-text.md
vinniefalco
pushed a commit
to vinniefalco/runvil
that referenced
this pull request
Oct 24, 2026
close cppalliance#167 Plan: vibe/2026-10-21-1-mcp-script-raw-text.md
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.
#164