From cc479c88fb3bd8bf03b3612c66eec7552a92a48c Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 2 Dec 2026 12:28:31 -0800 Subject: [PATCH 1/2] Add `plan/2026-12-02-2-unified-tool-info.plan.md` Add `plan/2026-12-02-2-unified-tool-info.plan.md` to record the update to `runvil-plugin-sdk` version `0.9.0` and `ToolInfo`. Plan: /plan/2026-12-02-2-unified-tool-info.plan.md --- plan/2026-12-02-2-unified-tool-info.plan.md | 153 ++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 plan/2026-12-02-2-unified-tool-info.plan.md diff --git a/plan/2026-12-02-2-unified-tool-info.plan.md b/plan/2026-12-02-2-unified-tool-info.plan.md new file mode 100644 index 0000000..5b5c855 --- /dev/null +++ b/plan/2026-12-02-2-unified-tool-info.plan.md @@ -0,0 +1,153 @@ +--- +name: Unified ToolInfo +overview: Consolidate all tool, MCP function, and prompt callable metadata into a single plain pub struct ToolInfo in gateway-types (using explicit Arc at shared catalog/binding/chat sites), sync its source verbatim into runvil-plugin-sdk over a JSON RvToolInfo C ABI (v0.9.0), and roll it out in small testable commits across Waves 1-4 (pushing to origin, opening PRs, waiting on CI, and merging to upstream at each wave). +todos: + - id: wave1-gateway-client + content: "Wave 1a (gateway-client): 3 testable commits (plan copy, add gateway_types::ToolInfo, replace ToolSchema with concrete Arc); verify all CI gates, push to origin, open PR to upstream, wait for green CI/reviews, and merge to upstream (SHA G)" + status: completed + - id: wave1-plugin-api + content: "Wave 1b (runvil-plugin-api, parallel with 1a once tool.rs is written): 3 testable commits (plan copy, sync tool_info.rs + xtask check + serde deps, bump contract to 0.9.0 with 24-byte JSON RvToolInfo); verify 1.85 MSRV + c-layout, push to origin, open PR, merge to upstream (SHA P)" + status: completed + - id: wave2-three-plugins + content: "Wave 2a (runvil-plugin-std, bashkit, web in parallel): 2 testable commits per repo (plan copy, pin SDK 0.9.0 at SHA P + Value/with_* updates); verify, push to origin, open PRs, and merge to upstream (SHAs S, B, W)" + status: in_progress + - id: wave2-harness + content: "Wave 2b (runvil-harness, parallel with 2a): 4 testable commits (plan copy, pin G + adopt ToolInfo across engine/harness/mcp on 0.8 loader, embed Arc in Frontmatter & drop Annotations, pin contract 0.9.0 at P + JSON RvToolInfo in loader/test-plugin + decisions); verify, push to origin, open PR, merge to upstream (SHA H)" + status: pending + - id: wave3-workshop-and-runvil + content: "Wave 3 (runvil-workshop, then runvil): 3 testable commits in workshop (plan copy, pin H/P/S/B/W + WorkshopBroker::chat, flatten prompt.tool_info() into /prompts/contract + UI tests), PR & merge to upstream (SHA K); then pin Workshop SHA K in runvil, PR & merge to upstream" + status: pending +isProject: false +--- + +# Unify Tool, Prompt, and MCP Metadata into `gateway_types::ToolInfo` + +## Goal and Design Summary + +Replace the separate tool, prompt-annotation, MCP-listing, and wire-schema structs across the fleet with one plain `pub struct ToolInfo` defined in `gateway-types` and copied verbatim into `runvil-plugin-sdk`: + +- **Plain struct + explicit `Arc` for \(O(1)\) sharing (zero `serde/rc` needed)**: `ToolInfo` is a plain Rust struct with `pub` fields matching `ModelInfo`, `Message`, and `Error` in `gateway-types`. Single-owner boundaries (`Pack::tools() -> Vec`, `Pack::render(...) -> Result>`, `PackToolSets` in `EffectAnswer::Render`) move `ToolInfo` by value in \(O(1)\) so `Pack::render` mutates fields naturally and `EffectAnswer::Render` serializes without enabling `serde/rc`. Shared multi-owner lifetimes (`ToolCatalog`, `OfferedTool`, `ToolBinding`, `LuaToolHandle`, `Prompt`, `Effect::Chat`, `InferenceBroker::chat`) hold `Arc` explicitly so schemas and descriptions are never deep-copied across runs, Lua VMs, or model rounds. +- **100% self-describing flat struct (zero helper structs)**: `ToolInfo` holds `name`, `pack` (losslessly splitting 2+ segment `ToolId`s at the first `/`, e.g. `pack = Some("fixtures")`, `name = "tools/inspect"`), `wire_name` (plus `effective_wire_name` and `qualified_name` helpers), `title`, `description`, `input_schema`, optional `output_schema`, the 4 closed MCP hints (`read_only_hint`, `destructive_hint`, `idempotent_hint`, `open_world_hint`), and the 5 Engine execution flags (`structured_output`, `survives_stop`, `describes_tools`, `model_only_call`, `changes_files`). +- **Third-party safe & Engine-stage validated**: `ToolInfo::new` is infallible (preserving Engine tests that place unvalidated schemas into `ToolCatalog` and reject them at `scope` freeze), `output_schema: Option` is descriptive and optional, and `structured_output: bool` remains the explicit opt-in switch for Lua `tools.call` JSON decoding. +- **Standalone plugin repo**: `tool.rs` uses only `std`, `serde`, and `serde_json` (Rust 1.85 syntax, functions `<= 100` lines and `<= 7` args, no `#[non_exhaustive]`) and is copied into `runvil-plugin-sdk` and committed to Git, passing JSON text across `RvToolInfo` in C ABI v0.9.0. + +## Git, Commit, PR, and Upstream Merge Protocol + +Every downstream `Cargo.toml` pins `https://github.com/cppalliance/` (`upstream`) by exact commit SHA, while local `master` pushes to `git@github.com:vinniefalco/.git` (`origin`). Therefore each wave completes its `origin` push -> PR -> green CI -> `upstream` merge cycle before the next wave pins its merged `upstream` SHA: + +1. **Stay on `master`** (no topical branches; `origin` is the fork, `upstream` is `cppalliance/*`). Sync `master` with `upstream/master` before starting each repo. +2. **Plan copy commit first**: Commit 1 in every touched repo adds `plan/2026-12-02-2-unified-tool-info.plan.md` so every commit message follows `.cursor/rules/commit.mdc` (`Plan: /plan/2026-12-02-2-unified-tool-info.plan.md`). +3. **Every commit is independently green**: Before each `git commit`, run `cargo fmt`, `cargo clippy` (warnings denied), and the workspace test suite (+ `xtask` / `public-api` / MSRV checks where applicable) so `git bisect` passes at every single commit. +4. **PR & merge per wave**: Push `master` to `origin`, open a PR against `cppalliance/:master` via `gh pr create`, monitor GitHub Actions checks and review comments until green, address any findings in follow-up testable commits, merge the PR to `upstream` via `gh pr merge`, and `git fetch upstream && git merge --ff-only upstream/master` locally to capture the exact merged `upstream` SHA for the next wave. + +```mermaid +flowchart TD + GatewayTypes["gateway-types"] -->|"copy tool.rs"| PluginApi["plugin-api 0.9"] + GatewayTypes -->|"upstream SHA G"| Harness["runvil-harness"] + PluginApi -->|"upstream SHA P"| PluginStd["plugin-std"] + PluginApi -->|"upstream SHA P"| PluginBash["plugin-bashkit"] + PluginApi -->|"upstream SHA P"| PluginWeb["plugin-web"] + PluginApi -->|"upstream SHA P"| Harness + PluginStd -->|"upstream SHA S"| Workshop["runvil-workshop"] + PluginBash -->|"upstream SHA B"| Workshop + PluginWeb -->|"upstream SHA W"| Workshop + Harness -->|"upstream SHA H"| Workshop + Workshop -->|"upstream SHA K"| Runvil["runvil"] +``` + +## Wave 1: `gateway-client` and `runvil-plugin-api` (Parallel PRs once `tool.rs` is written) + +### Wave 1a: `gateway-client` (3 Testable Commits -> Merged Upstream SHA `G`) + +- **Commit 1**: Add `plan/2026-12-02-2-unified-tool-info.plan.md`. +- **Commit 2 (additive, keeps `ToolSchema` compiling)**: Add `[gateway-client/crates/gateway-types/src/tool.rs](c:/Users/Vinnie/cursor/gateway-client/crates/gateway-types/src/tool.rs)` + unit tests, re-export `ToolInfo` from `[gateway-client/crates/gateway-types/src/lib.rs](c:/Users/Vinnie/cursor/gateway-client/crates/gateway-types/src/lib.rs)` and `[gateway-client/crates/gateway-client/src/lib.rs](c:/Users/Vinnie/cursor/gateway-client/crates/gateway-client/src/lib.rs)`, and update both `public-api.txt` snapshots: + - Rust 1.85 syntax (no `let` chains), no `#[non_exhaustive]`, `<= 100` lines and `<= 7` args per function, `use std::fmt;`, text-only doc fences, and intra-doc links scoped strictly to `ToolInfo`: + +```rust +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[expect( + clippy::struct_excessive_bools, + reason = "the five execution flags are independent properties of one tool" +)] +pub struct ToolInfo { + pub name: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub pack: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub wire_name: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub title: Option, + pub description: String, + pub input_schema: Value, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub output_schema: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub read_only_hint: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub destructive_hint: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub idempotent_hint: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub open_world_hint: Option, + #[serde(default, skip_serializing_if = "std::ops::Not::not")] + pub structured_output: bool, + #[serde(default, skip_serializing_if = "std::ops::Not::not")] + pub survives_stop: bool, + #[serde(default, skip_serializing_if = "std::ops::Not::not")] + pub describes_tools: bool, + #[serde(default, skip_serializing_if = "std::ops::Not::not")] + pub model_only_call: bool, + #[serde(default, skip_serializing_if = "std::ops::Not::not")] + pub changes_files: bool, +} +``` + + - Provide infallible `ToolInfo::new(name, description, input_schema)`, `with_*` builders, `effective_wire_name(&self) -> Cow<'_, str>`, `qualified_name(&self) -> Cow<'_, str>`, and field getters. +- **Commit 3 (replace `ToolSchema` with concrete `Arc`)**: Update `[gateway-client/crates/gateway-types/src/request.rs](c:/Users/Vinnie/cursor/gateway-client/crates/gateway-types/src/request.rs)`, `request-tests.rs`, `[gateway-client/crates/gateway-types/src/broker.rs](c:/Users/Vinnie/cursor/gateway-client/crates/gateway-types/src/broker.rs)`, and `[gateway-client/crates/gateway-client/src/transport.rs](c:/Users/Vinnie/cursor/gateway-client/crates/gateway-client/src/transport.rs)`. Keep `tools` concrete (`Option<&[Arc]>` on `build_request_body` and `GatewayClient::complete`; `Vec>` on `InferenceBroker::chat`) so all 22 bare `None` / `Some(&[])` call sites infer cleanly without `E0282`. Validate `(tool.effective_wire_name(), &tool.input_schema)` via `validate_tool_schema` (retaining `ErrorCode::ToolSchemaInvalid = 509`), refresh both `public-api.txt` files, verify all CI gates (`+1.88`, `dylint`, `deny`, `nextest`), push to `origin`, open PR, and merge to `upstream` -> SHA `G`. + +### Wave 1b: `runvil-plugin-api` v0.9.0 (3 Testable Commits -> Merged Upstream SHA `P`) + +- **Commit 1**: Add `plan/2026-12-02-2-unified-tool-info.plan.md`. +- **Commit 2 (sync `tool_info.rs` + `xtask` check, keeping 0.8 ABI intact)**: Add `serde` and `serde_json` to `[runvil-plugin-api/Cargo.toml](c:/Users/Vinnie/cursor/runvil-plugin-api/Cargo.toml)` and `[runvil-plugin-api/crates/runvil-plugin-sdk/Cargo.toml](c:/Users/Vinnie/cursor/runvil-plugin-api/crates/runvil-plugin-sdk/Cargo.toml)` (`runvil-plugin-sys` stays `#![no_std]` with zero dependencies), copy `tool.rs` verbatim to `[runvil-plugin-api/crates/runvil-plugin-sdk/src/tool_info.rs](c:/Users/Vinnie/cursor/runvil-plugin-api/crates/runvil-plugin-sdk/src/tool_info.rs)`, and add `sync-tool-info` check in `[runvil-plugin-api/crates/build-xtask/src/main.rs](c:/Users/Vinnie/cursor/runvil-plugin-api/crates/build-xtask/src/main.rs)`. Verify `+1.85 check` and `cargo test` pass. +- **Commit 3 (bump C contract & SDK to `0.9.0` with JSON `RvToolInfo`)**: + - Update `[runvil-plugin-api/crates/runvil-plugin-sys/src/lib.rs](c:/Users/Vinnie/cursor/runvil-plugin-api/crates/runvil-plugin-sys/src/lib.rs)` (`RV_API_MINOR = 9`, `RvToolInfo { size: u32, reserved: u32, json: RvStr }` size 24, `RV_MAX_TOOL_JSON = 262_144`, keeping `RV_MAX_TOOL_TEXT = 65_536` for `description`), regenerate `[runvil-plugin-api/crates/runvil-plugin-sys/include/runvil_plugin.h](c:/Users/Vinnie/cursor/runvil-plugin-api/crates/runvil-plugin-sys/include/runvil_plugin.h)`, and update `[runvil-plugin-api/tests/c-layout/src/lib.rs](c:/Users/Vinnie/cursor/runvil-plugin-api/tests/c-layout/src/lib.rs)` + `layout.c`. + - Switch `runvil-plugin-sdk` (`src/tool.rs`, `src/entry/{pack,tool,file}.rs`, `src/testing.rs`, `src/testing/{pack,render,fixture}.rs`, `examples/hello-plugin/src/lib.rs`, `AGENTS.md`, `README.md`) to re-export `tool_info::ToolInfo`, keeping `let jsons: Vec` alive across `extern "C"` render calls and updating `Mode::Respaced` in `testing/render.rs` for semantic JSON `Value` comparison. + - Verify all CI checks (`+1.85`, `c-layout`, `clippy`, `doc`), push to `origin`, open PR, and merge to `upstream` -> SHA `P`. + +## Wave 2: Three Plugin Repos + `runvil-harness` (4 Parallel PRs once `G` and `P` Merge) + +### Wave 2a: `runvil-plugin-std`, `runvil-plugin-bashkit`, and `runvil-plugin-web` (2 Testable Commits Each -> Merged SHAs `S`, `B`, `W`) + +In each of `[runvil-plugin-std](c:/Users/Vinnie/cursor/runvil-plugin-std)`, `[runvil-plugin-bashkit](c:/Users/Vinnie/cursor/runvil-plugin-bashkit)`, and `[runvil-plugin-web](c:/Users/Vinnie/cursor/runvil-plugin-web)` independently in parallel: +- **Commit 1**: Add `plan/2026-12-02-2-unified-tool-info.plan.md`. +- **Commit 2**: Pin `runvil-plugin-sdk = "0.9.0"` at `P`, pass `serde_json::Value` directly to `ToolInfo::new` using `.with_wire_name(...)` and `.with_changes_files(true)`, update `[ToolInfo::with_changes_files]` doc link in `[runvil-plugin-std/crates/plugin-std/src/lib.rs](c:/Users/Vinnie/cursor/runvil-plugin-std/crates/plugin-std/src/lib.rs)`, and update `tool.input_schema` assertions in `pack-tests.rs` and `web-tests.rs`. +- Verify all checks (`build-checks`, `clippy`, `test`, `doc`), push to `origin`, open PRs, and merge to `upstream` -> SHAs `S`, `B`, `W`. + +### Wave 2b: `runvil-harness` (4 Testable Commits -> Merged Upstream SHA `H`) + +- **Commit 1**: Add `plan/2026-12-02-2-unified-tool-info.plan.md`. +- **Commit 2 (pin `gateway-types` at `G` and unify `ToolInfo` across Engine, Harness, and `plugin-mcp` while keeping loader on 0.8)**: + - Update `[runvil-harness/Cargo.toml](c:/Users/Vinnie/cursor/runvil-harness/Cargo.toml)` to pin `gateway-client` / `gateway-types` at `G`. + - Delete `runvil_types::tools::ToolInfo` in `[runvil-harness/crates/runvil-internal/types/src/tools.rs](c:/Users/Vinnie/cursor/runvil-harness/crates/runvil-internal/types/src/tools.rs)` and re-export `gateway_types::ToolInfo`. Split 2+ segment `ToolId`s at the first `/` (`pack` + `name`) and index `(ToolId, Arc)` inside `ToolCatalog`, `OfferedTool::Catalog`, `ToolBinding`, and `LuaToolHandle` (keeping `.id() -> &ToolId` borrowed at all 30+ Engine sites and `.parameters` userdata reading `input_schema`). + - Update `Effect::Chat` (`tools: Vec>`), `scope.rs`, `RunPacks`, `plugin-mcp` (`rmcp::model::Tool` -> `Arc` preserving `title`, `output_schema`, and hints while keeping `mcp/get_dynamic_tools` output unchanged), `harness-plugin-loader` (adapting 0.8 `RvToolInfo` into new `ToolInfo`), `harness-gateway-client`, and facades (`runvil-engine`, `runvil`, dropping `ToolSchema` re-exports and blessing `public-api.txt`). Every workspace test and `xtask` check passes at this commit. +- **Commit 3 (embed `Arc` in `Frontmatter` / `Prompt` and drop `pub struct Annotations`)**: + - In `[runvil-harness/crates/runvil-internal/prompt/src/frontmatter.rs](c:/Users/Vinnie/cursor/runvil-harness/crates/runvil-internal/prompt/src/frontmatter.rs)` and `prompt.rs`, keep private `RawAnnotations` so every YAML error message and span test in `frontmatter-tests-annotations.rs` stays identical, build `tool: Arc` on `Frontmatter` (keeping `.name()`, `.description()`, `.title()`, `.args()` delegating on `Frontmatter` and adding `Frontmatter::tool_info` + `Prompt::tool_info`), remove `Annotations` from `runvil-engine` and `runvil`, and bless `public-api.txt`. +- **Commit 4 (pin `runvil-plugin-sys = "0.9.0"` at `P` and switch loader + `test-plugin` to JSON `RvToolInfo`)**: + - Pin `runvil-plugin-sys = "0.9.0"` at `P` in `Cargo.toml`. + - Delete `AddedTool`, `Offered`, and `raw_parameters` in `[runvil-harness/crates/harness-internal/plugin-loader/src/pack.rs](c:/Users/Vinnie/cursor/runvil-harness/crates/harness-internal/plugin-loader/src/pack.rs)` and `session.rs`, deserializing `RvToolInfo.json` straight into `ToolInfo` (keeping `Vec` alive across `send_render`). + - Update zero-dep `[runvil-harness/crates/harness-internal/test-plugin/src/lib.rs](c:/Users/Vinnie/cursor/runvil-harness/crates/harness-internal/test-plugin/src/lib.rs)` + `lib-tests.rs` to contract `0.9` (`size == 24`, balanced-brace `object_of` helper for `"shape"`), add a `build-xtask` sync check when sibling repos are present, and update `decisions/tools-and-packs.md` and `decisions/prompt-language.md`. +- Run full pre-push + CI suite (`docs-claims.mjs`, `clippy`, `nextest`, `xtask tidy`, `+nightly-2026-09-05 xtask api`, `dylint`, `deny`), push to `origin`, open PR, and merge to `upstream` -> SHA `H`. + +## Wave 3: `runvil-workshop` and `runvil` (Sequential Final Wave) + +### Wave 3a: `runvil-workshop` (3 Testable Commits -> Merged Upstream SHA `K`) + +- **Commit 1**: Add `plan/2026-12-02-2-unified-tool-info.plan.md`. +- **Commit 2 (pins + broker)**: Update `[runvil-workshop/Cargo.toml](c:/Users/Vinnie/cursor/runvil-workshop/Cargo.toml)` to pin `runvil-harness` (`H`), `runvil-plugin-sdk` `0.9.0` (`P`), and `std-plugin` (`S`), `bashkit-plugin` (`B`), `web-plugin` (`W`), and switch `WorkshopBroker::chat` in `[runvil-workshop/crates/workshop/server/src/agents/broker.rs](c:/Users/Vinnie/cursor/runvil-workshop/crates/workshop/server/src/agents/broker.rs)` to `Vec>`. Verify `cargo test` and `xtask tidy`. +- **Commit 3 (`/prompts/contract` + UI)**: Flatten `&**prompt.tool_info()` onto `ContractResponse` in `[runvil-workshop/crates/workshop/server/src/routes/prompts.rs](c:/Users/Vinnie/cursor/runvil-workshop/crates/workshop/server/src/routes/prompts.rs)` (keeping explicit `null` for absent `runvil` and `max_tool_iterations`), and update `prompts-tests.rs`, `[runvil-workshop/crates/workshop/ui/src/services/run-api.ts](c:/Users/Vinnie/cursor/runvil-workshop/crates/workshop/ui/src/services/run-api.ts)`, `run-rows.ts`, `test/run-api.mjs`, and `test/run-panel.mjs`. +- Verify Rust + UI tests + `xtask tidy`, push to `origin`, open PR, and merge to `upstream` -> SHA `K`. + +### Wave 3b: `runvil` (2 Testable Commits -> Merged Upstream) + +- **Commit 1**: Add `plan/2026-12-02-2-unified-tool-info.plan.md`. +- **Commit 2**: Pin `[workspace.metadata.workshop]` in `[runvil/Cargo.toml](c:/Users/Vinnie/cursor/runvil/Cargo.toml)` to SHA `K`, verify `xtask`, push to `origin`, open PR, and merge to `upstream`. From c0af3144a9bce244aacfc41777e59ce083eebbcc Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 2 Dec 2026 12:34:35 -0800 Subject: [PATCH 2/2] Pin `runvil-plugin-sdk` `0.9.0` and update `ToolInfo` Pin `runvil-plugin-sdk` to version `0.9.0` at `4c10a7d4d26c11e6a3055c6f6c4b5657f1bf2faa` in `Cargo.toml` and `Cargo.lock` for contract `0.9`. Pass `parameters_schema` values directly to `ToolInfo::new` in `WebPack` in `crates/plugin-web/src/web.rs` without string conversion. Read `listed.input_schema` directly in `schema` in `crates/plugin-web/src/web-tests.rs`. Plan: /plan/2026-12-02-2-unified-tool-info.plan.md --- Cargo.lock | 10 ++++++---- Cargo.toml | 4 ++-- crates/plugin-web/src/web-tests.rs | 2 +- crates/plugin-web/src/web.rs | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b764924..9620049 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1347,16 +1347,18 @@ dependencies = [ [[package]] name = "runvil-plugin-sdk" -version = "0.8.0" -source = "git+https://github.com/cppalliance/runvil-plugin-api?rev=f2d42cc41b0f28f81ac73193f21c2eacfafc11d9#f2d42cc41b0f28f81ac73193f21c2eacfafc11d9" +version = "0.9.0" +source = "git+https://github.com/cppalliance/runvil-plugin-api?rev=4c10a7d4d26c11e6a3055c6f6c4b5657f1bf2faa#4c10a7d4d26c11e6a3055c6f6c4b5657f1bf2faa" dependencies = [ "runvil-plugin-sys", + "serde", + "serde_json", ] [[package]] name = "runvil-plugin-sys" -version = "0.8.0" -source = "git+https://github.com/cppalliance/runvil-plugin-api?rev=f2d42cc41b0f28f81ac73193f21c2eacfafc11d9#f2d42cc41b0f28f81ac73193f21c2eacfafc11d9" +version = "0.9.0" +source = "git+https://github.com/cppalliance/runvil-plugin-api?rev=4c10a7d4d26c11e6a3055c6f6c4b5657f1bf2faa#4c10a7d4d26c11e6a3055c6f6c4b5657f1bf2faa" [[package]] name = "rustc-hash" diff --git a/Cargo.toml b/Cargo.toml index 75103f6..8e21ffa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,9 +7,9 @@ edition = "2024" license = "BSL-1.0" [workspace.dependencies] -# The Plugin SDK at contract 0.8, pinned to a commit. A Host loads this +# The Plugin SDK at contract 0.9, pinned to a commit. A Host loads this # Plugin only when its Harness speaks the same contract version. -runvil-plugin-sdk = { version = "0.8.0", git = "https://github.com/cppalliance/runvil-plugin-api", rev = "f2d42cc41b0f28f81ac73193f21c2eacfafc11d9" } +runvil-plugin-sdk = { version = "0.9.0", git = "https://github.com/cppalliance/runvil-plugin-api", rev = "4c10a7d4d26c11e6a3055c6f6c4b5657f1bf2faa" } # The HTTP client, over rustls with one crypto backend, aws-lc-rs. reqwest # 0.13 has no feature that picks `ring`, and CI checks that `ring` stays # out of the workspace's normal dependency graph. Root certificates come diff --git a/crates/plugin-web/src/web-tests.rs b/crates/plugin-web/src/web-tests.rs index 01b4404..bfefdc7 100644 --- a/crates/plugin-web/src/web-tests.rs +++ b/crates/plugin-web/src/web-tests.rs @@ -114,7 +114,7 @@ fn schema(pack: &PackRun<'_>, tool: &str) -> Value { .iter() .find(|listed| listed.name == tool) .unwrap_or_else(|| panic!("the Pack lists a tool named {tool}")); - serde_json::from_str(&listed.parameters).expect("the schema is JSON") + listed.input_schema.clone() } /// What a served connection does once the request has arrived. diff --git a/crates/plugin-web/src/web.rs b/crates/plugin-web/src/web.rs index 8f654bc..44fc8c7 100644 --- a/crates/plugin-web/src/web.rs +++ b/crates/plugin-web/src/web.rs @@ -131,12 +131,12 @@ impl Pack for WebPack { ToolInfo::new( FETCH, self.fetch.description(), - self.fetch.parameters_schema().to_string(), + self.fetch.parameters_schema(), ), ToolInfo::new( SEARCH, self.search.description(), - self.search.parameters_schema().to_string(), + self.search.parameters_schema(), ), ] }