Repository navigation
feat(file-library): add AI file and folder management - #1347
Merged
Merged
Conversation
Replace the Pi adapter's hard-coded Skill tool names with a RuntimeTool `deferred` flag, persisted in tool blueprints and the configuration key so restarts and reconfiguration keep the same exposure. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…pproval - Trash files and folders through TrashRuntime, symmetric with restore, so the tools no longer reach into file storage notifications. - Discover the six management tools through tool_search, trimming about 5k characters from every first request. - Library reads are auto and mutations ask, all eligible for the Agent's approval mode instead of always requiring confirmation. - Give the tool cards dedicated translated titles. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ntime FileModule.moveToTrash and folder DELETE now delegate to TrashRuntime, the same owner the Agent tools use, replacing the file-storage trash helper and the folder handler's separate notification path. The screen's contracts and routes are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
No screen has called DELETE /files/versions/:id since version history was hidden, and the route never shipped in a release. Remove it with the `version` trash kind and the branches that only served it: version restore and purge, the trash projection's version rows, and the draft-discard path for files whose older versions were trashed separately. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
zhangjiadi225
marked this pull request as ready for review
October 17, 2026 08:41
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 this PR does
Before this PR, agents could read and write library files but had no tools to move, rename, delete, or restore them, even though the app already supported those operations.
After this PR, agents can find folders, move and rename files or folders, move items to trash, list recently deleted items, and restore them. File-library tools now follow the Agent's approval mode like every other built-in tool: reads (search, read, list folders, list trash) are
auto, and move, rename, trash, and restore areask, all eligible for automatic approval. File search results include the containing folder id to distinguish matching names.Screenshots or videos
Not captured: the new actions reuse the existing tool card. Device acceptance has not been run.
Why we need it and why it was done in this way
FileLibraryServicefor moves and renames, preserving directory-cycle checks, collision handling, file versions, and cache notifications.TrashRuntimeis now the single owner of trashing and restoration for both the library screen and the Agent tools.FileModule.moveToTrashand folderDELETEdelegate to its newtrashFile/trashFolder, replacing the file-storage trash helper and the folder handler's separate notification path; the screen's contracts and routes are unchanged. Permanent deletion and emptying the trash are not exposed to the Agent.tool_search, the same mechanism perf(agent-context): load plugin guides on demand #1260 introduced for Skill installation. That keeps about 5k characters (roughly 1.2k–1.4k tokens) out of every first request. Deferral is now aRuntimeTool.deferredflag, persisted in tool blueprints and the configuration key, replacing the Pi adapter's hard-coded Skill tool names.Breaking changes
Library search and read no longer require confirmation on every call. With the default automatic approval mode, library mutations also run without asking; trashed items remain recoverable for 30 days. No database migration or dependency changes.
Special notes for your reviewer
web_fetch.DELETE /files/versions/:id, theversiontrash kind, and the restore, purge, and draft-discard branches that only served it. No screen called the route since version history was hidden, and none of it reached a release tag, so no stored data needs compatibility.deferred.pnpm lint(0 errors),pnpm format:check,pnpm typecheck,pnpm i18n:check, and the 78 Jest suites related to the branch (1154 tests) pass.Checklist
mainorigin/mainRelease note