Skip to content

Adopt unified ToolInfo and contract 0.9 - #47

Merged
vinniefalco merged 3 commits into
cppalliance:masterfrom
vinniefalco:master
Dec 2, 2026
Merged

vinniefalco merged 3 commits into
cppalliance:masterfrom
vinniefalco:master

Conversation

@vinniefalco

@vinniefalco vinniefalco commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Moves Workshop to unified ToolInfo and contract 0.9 across three commits:

  1. Add plan/2026-12-02-2-unified-tool-info.plan.md.
  2. Pin runvil, harness-gateway-client, and plugin-mcp at 64b085369f9432073f0baa9e40d9cbdbe0a720cd, runvil-plugin-sdk 0.9.0 at 4c10a7d4d26c11e6a3055c6f6c4b5657f1bf2faa, std-plugin at d45fa9e1746ed1afa099dee9392925d819c475d6, bashkit-plugin at f41b5002ae5a1412b04443236483ea6350197199, and web-plugin at 0f2189478645a9d5ae892a13ab9b6879438ca794, and switch WorkshopBroker::chat to Vec<Arc<ToolInfo>>.
  3. Flatten Prompt::tool_info onto ContractResponse for POST /prompts/contract (input_schema plus optional title and behavior hints, keeping explicit null for absent runvil and max_tool_iterations) and narrow the new fields in RunContract with server and UI tests.

Summary by CodeRabbit

  • New Features
    • Run contracts now include a structured input schema, an optional title, and hints describing tool behavior.
    • The run interface uses the input schema to display required arguments and their properties.
  • Bug Fixes
    • Contract parsing now handles missing or null metadata and rejects invalid input schemas or metadata values.

Record the plan for moving Workshop's pins to contract 0.9, updating `WorkshopBroker::chat` to `ToolInfo`, and flattening `ToolInfo` onto `ContractResponse` for `/prompts/contract`.

Plan: /plan/2026-12-02-2-unified-tool-info.plan.md
Move Workshop's pins of the Harness, `runvil-plugin-sdk`, and the three library Plugins to contract 0.9 and unified `ToolInfo`. The root `Cargo.toml` pins each dependency at its merged commit, `Cargo.lock` updates to match, and `InferenceBroker` on `WorkshopBroker` switches `tools` from `Vec<ToolSchema>` to `Vec<Arc<ToolInfo>>`.

- `runvil`, `harness-gateway-client`, and `plugin-mcp` move to `64b085369f9432073f0baa9e40d9cbdbe0a720cd`, and `runvil-plugin-sdk` moves to version `0.9.0` at `4c10a7d4d26c11e6a3055c6f6c4b5657f1bf2faa`.
- `std-plugin` moves to `d45fa9e1746ed1afa099dee9392925d819c475d6`, `bashkit-plugin` to `f41b5002ae5a1412b04443236483ea6350197199`, and `web-plugin` to `0f2189478645a9d5ae892a13ab9b6879438ca794`.
- The prompt contract route and the Run window client remain unchanged in this commit.

Plan: /plan/2026-12-02-2-unified-tool-info.plan.md
Expose a prompt's callable tool metadata directly in the Run window's contract wire shape. `ContractResponse` flattens `Prompt::tool_info` via `#[serde(flatten)]` in `crates/workshop/server/src/routes/prompts.rs`, and `parseContract` in `crates/workshop/ui/src/services/run-api.ts` narrows `input_schema`, `title`, and the four hint keys onto `RunContract`.

- `ContractResponse` replaces `args` with `input_schema` from `ToolInfo`, emits `title`, `read_only_hint`, `destructive_hint`, `idempotent_hint`, and `open_world_hint` only when set, and preserves `null` for absent `runvil` and `max_tool_iterations`.
- `parseContract` maps missing or `null` `title` and hint keys to `null` on `RunContract` and rejects non-string or non-boolean values.
- `renderContractRows` in `crates/workshop/ui/src/parts/run/run-rows.ts` reads `contract.inputSchema` and renders no rows for `title` or behavior hints.

Plan: /plan/2026-12-02-2-unified-tool-info.plan.md
@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR updates dependency pins and the broker tool type, changes the prompt contract response to expose flattened tool metadata and input_schema, and updates UI parsing, rendering, and tests for the revised contract.

Changes: Tool metadata contract

Layer / File(s) Summary
Dependency pins and broker tool type
Cargo.toml, crates/workshop/server/src/agents/broker.rs, plan/2026-12-02-2-unified-tool-info.plan.md
The workspace updates several dependency pins, including runvil-plugin-sdk to version 0.9.0. WorkshopBroker::chat now accepts Vec<Arc<ToolInfo>>. The plan records the broader migration stages.
Prompt contract response
crates/workshop/server/src/routes/prompts.rs, crates/workshop/server/src/routes/prompts-tests.rs
The prompt contract response uses flattened ToolInfo metadata and retains execution declarations. Tests check input_schema, omitted unset metadata, and returned prompt annotations.
UI contract parsing and rendering
crates/workshop/ui/src/services/run-api.ts, crates/workshop/ui/src/parts/run/run-rows.ts, crates/workshop/ui/test/*
The UI parser reads input_schema, validates optional title and hint fields, and exposes the schema as inputSchema. Argument rows and tests use the updated contract fields.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: Minimal · up to 66f01 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two main changes: adoption of the unified ToolInfo type and the move to contract 0.9. The raw summary confirms both: the broker takes Vec<Arc>, the plugin SDK moves to 0.…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two main changes: adoption of the unified ToolInfo type and the move to contract 0.9. The raw summary confirms both: the broker takes Vec<Arc<ToolInfo>>, the plugin SDK moves to 0.9.0, and the contract response is flattened from ToolInfo with input_schema replacing args. The title is short and specific, and it uses the project's own terms.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: d1678fe9-a4a9-4cbc-9866-e71f3c769079
Commits

Reviewing files that changed from the base of the PR and between 0381a77 and 66f01ce.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 9

  • Cargo.toml
  • crates/workshop/server/src/agents/broker.rs
  • crates/workshop/server/src/routes/prompts-tests.rs
  • crates/workshop/server/src/routes/prompts.rs
  • crates/workshop/ui/src/parts/run/run-rows.ts
  • crates/workshop/ui/src/services/run-api.ts
  • crates/workshop/ui/test/run-api.mjs
  • crates/workshop/ui/test/run-panel.mjs
  • plan/2026-12-02-2-unified-tool-info.plan.md

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

@vinniefalco
vinniefalco merged commit 6f8ed26 into cppalliance:master Dec 2, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant