Repository navigation
Add the std Pack with Cursor's six file tools - #178
Open
vinniefalco wants to merge 2 commits into
Open
vinniefalco wants to merge 2 commits into
vinniefalco wants to merge 2 commits into
Conversation
Run vibelight from the repo root with cargo vibelight. The alias runs the sibling vibelight crate in release mode, so cargo builds it on first use and rebuilds it when its source changes. - The path ../vibelight/Cargo.toml is relative to the cwd. The alias works only from the repo root, and only with vibelight checked out next to this repo. - Nothing is tested. The alias was not run.
Every tool answers a stub that says the implementation is missing, and a call whose arguments miss the schema fails with the parameter named. - `crates/plugin-std` offers `std/read`, `std/write`, `std/replace`, `std/rm`, `std/glob`, and `std/grep` under the wire names `Read`, `Write`, `StrReplace`, `Delete`, `Glob`, and `Grep`. - Each tool's description and parameter schema are checked in under `schemas/` and embedded with `include_str!`, so the model-facing text is Cursor's own; `schemas/EDITS.md` records every line changed from it. - The stub answer is a successful `ToolOutput::trusted` rather than a `ToolError`, so a well-formed call and a malformed one exercise different paths. - `crates/workshop/server/src/agents.rs` installs the Pack in every agent run's Host beside `web`, `user-input`, and `mcp`. - No operation touches the filesystem yet, so the VFS Mode policy gates nothing until the tools are real.
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
This adds
plugin-std, the Pack that gives a Runvil agent the file tools every coding agent has, and it copies Cursor's surface rather than inventing one. A model already trained on Cursor's tools then needs no new instructions: it callsRead,Write,StrReplace,Delete,Glob, andGrep, with Cursor's parameter names and Cursor's own descriptions.Every tool is a stub in this commit. A well-formed call answers a text saying the implementation is missing; a call whose arguments miss the schema fails with the parameter named. The stubs exist so the crate, the definitions, the ids, the wire names, and the Lua path are all proven before any file logic lands.
The series is two commits.
7357dd23eadds thevibelightcargo alias and came before this work;08801150fis the Pack.The Pack
crates/plugin-stdinstallsrunvil/std, so its Pack id isstdand every tool id sits under it:std/read,std/write,std/replace,std/rm,std/glob,std/grep.tools.call("std/read", { path = "/notes.md" }), and offers the Pack withtools.offer("std"). The model calls the same tool by its wire name,Read, whichToolInfo::wire_namesets. The two layers are deliberately separate: the Lua ids stay short and prefixed, and the wire names copy Cursor exactly.crates/plugin-std/schemas/and embedded withinclude_str!.schemas/EDITS.mdrecords every line changed from Cursor's text, as old line then new line, so the difference is auditable rather than folklore.Readno longer promises images and PDFs, because it is text only.Grepno longer points atrgor at theShelltool, because this Pack offers no shell. Two defaults that said "Cursor workspace root" now say the run's filesystem root.nullor{}and needs no per-run service, matchingplugin-user-input.Argument checking
src/check.rsvalidates a call against the stored schema, honoringtype,properties,required,enum, anditems. It runs before anything else, so a malformed call cannot reach an operation.InvalidArgumentsToolErrorthat names the parameter and, where it helps, the value it received:std_Grep:patternis required, and the call left it out.The stub answer
A well-formed call returns
ToolOutput::trusted, never aToolError, with this text and the tool's wire name in both slots:The <name> tool is not implemented in this build. The implementation is missing and nothing in this session will change that. Calling <name> again is safe, but it will return this same result every time, whatever the arguments. Carry on without it.It is a success on purpose. A valid call has to succeed for the success path and the failure path to both be exercised end to end, which they could not be if every call failed.
The text names the tool twice and says a repeat call is safe but identical, because a model that reads only "not implemented" may retry and conclude its arguments were wrong.
Wiring
crates/workshop/server/src/agents.rsinstalls the Pack in every agent run's Host, besideweb,user-input, andmcp. The existing test that lists every installed Pack now expectsstdtoo.crates/workshop/ui/test/docs-claims.mjsgains the crate to its Plugin doc list, so the wording scan reads its comments for the defined terms and the Pack-activation ban.Cargo.lockgains the crate and itsserdeedge. No new outside dependency:serdeandserde_jsonare already in the workspace.The plan
vibe/2026-10-27-2-plugin-std-file-tools.mdcomes with the change and uses the same contract format as the other plans invibe/. It records the shipped work as its first step, then specifies what is left: one schema correction, the six real operations over the call's VFS access, approval, and the shell.What is deliberately not here
Readis text only.ListDir. Cursor gates it behindenableDeprecatedLsTool, which defaults to false, and its replacement exists only as proto, so there is no model-facing definition worth copying.Breaking changes
None.
crates/runvil/public-api.txtis unchanged, because a Plugin crate is not part of the Engine's facade. The Engine, the Harness, and the gateway are untouched.Test plan
cargo nextest run -p plugin-stdpasses, 32 tests. They cover each layer: the definitions parse and carry the expected wire names, the check accepts a matching call and refuses each kind of mismatch, thePackInfoandinstallbehave as the Plugin contract requires, and every tool answers the stub text naming itself while each kind of bad call fails with the parameter named.The full set ran over the whole change and passed: workspace nextest (5597 tests),
workshop-servernextest (217 tests), both clippy runs with warnings denied,cargo fmt --all --check, the workspace rustdoc gate with warnings denied,cargo test -p build-xtask(264 tests), and the docs-claims scan. The pre-push hook then ran the docs-claims scan, the headless gateway check, workspace clippy, andcargo deny checkagain on the way out.Nothing here touches the filesystem, so the VFS Mode policy gates nothing yet. Exercising Ask and Plan mode against these tools is part of the real-operation work, not this change.