feat: room file tools behind Capability.FILES - #525
Draft
eric-descourtis-thenvoi wants to merge 1 commit into
Draft
feat: room file tools behind Capability.FILES#525eric-descourtis-thenvoi wants to merge 1 commit into
eric-descourtis-thenvoi wants to merge 1 commit into
Conversation
Adds three built-in agent tools for the platform's file-transfer surface: band_list_room_files, band_read_room_file, band_send_room_file. They speak to the agent file endpoints through the REST client's own transport (the generated client does not expose them yet) and are gated behind the new Capability.FILES, default off, because the endpoints require a deployment with file storage configured. read_room_file returns images as MCP-shaped content so runtimes that forward MCP blocks give the model real vision input; the Claude SDK bridge now passes such results through instead of json-dumping them into a text block, and stops stripping a custom tool's room_id argument when the input model declares that field as part of its own contract. CrewAI and PydanticAI get concrete wrappers; the tool-family registries, prompts drift checks, protocol, and testing fake are extended accordingly. Tool-name sets treat files like memory: excluded from BASE/CHAT, included in ALL. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
Dogfooding note: while live-testing this branch, agent turns went silent-empty (~1s, $0.00, no tool calls) and the adapter logged nothing. A probe with
|
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.
What
Three built-in room file tools behind a new opt-in
Capability.FILES:band_list_room_filesband_read_room_fileband_send_room_filePlus two Claude SDK bridge fixes the vision path needs:
_make_resultpasses through results that are already MCP-shaped ({"content": [...]}) instead of json-dumping an image block into base64 prose.room_idas a real input field keeps it; the strip now applies only to the schema-injected extra.How
band-client-rest==0.0.10) doesn't expose the agent file endpoints yet, so the tools use the client's own transport (same base URL/auth/pool) with a comment marking the migration point once Fern regen lands.BASE/CHAT, present inALL, ownFILE_TOOL_NAMESset and"files"category.band_send_room_filecounts as a room-posting tool for reply suppression; the two readers joinREAD_ONLY_TOOL_NAMES.claude_sdk(definition-driven, vision capable),pydantic_aiandcrewai/crewai_flow(concrete wrappers). Other adapters keep their current capability set — enabling them is a follow-up per adapter.processing/processed/pending/unfiltered) because the message that triggered the current turn is stillprocessing— skip that view and "the file you were just sent" doesn't exist yet.Platform dependency
The endpoints ship in thenvoi-platform PLT-1209/1210/1211 (in review). The capability defaults off everywhere, so this is safe to merge ahead of them; agents opt in with
AdapterFeatures(capabilities={Capability.FILES}).Proven end-to-end on a dev platform node: an agent read a text file word-for-word, described a webp book cover from pixels, and authored+attached its own file — the same flows now covered by 18 unit tests (
tests/runtime/test_file_tools.py,tests/integrations/claude_sdk/test_mcp_content_passthrough.py).Tests
uv run pytest tests/ --ignore=tests/integration/ --ignore=tests/e2e/: 4559 passed; the only residue is the pre-existingdesktop_appfull-run flake, identical on cleanmain(passes in isolation both there and here).ruff check/ruff format/pyrefly check: clean.🤖 Generated with Claude Code