Repository navigation
feat(drive): agents can move, archive and promote documents; CLI push refuses stale overwrites - #99
Merged
Merged
Conversation
Laurin-Notemann
enabled auto-merge (squash)
October 16, 2026 18:53
… refuses stale overwrites MCP gains drive_move_document, drive_archive_document, drive_restore_document, drive_promote_version and drive_create_folder, calling the same Drive /api/v1 endpoints the CLI uses. otterdrive artifacts push now needs --if-version (the version the files are based on) or --force once a document has a version, and pull pins and reports the version it downloaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Laurin-Notemann
force-pushed
the
fix/drive-mcp-cli-parity
branch
from
October 20, 2026 10:36
e337494 to
d55941d
Compare
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.
Problem
Drive's API, CLI and MCP tools work on the same documents through the same
/api/v1endpoints, but they didn't offer the same operations or the same safety:drive_update_documentrequires the version you inspected and refuses if someone published since.otterdrive artifacts pushonly checked that with--if-version, so by default it silently published over a newer version.Fix
MCP: five new tools, each a thin adapter over a new
DriveServicemethod andDriveApicall:drive_move_documentconflict.drive_archive_documentdrive_restore_documentdrive_promote_versiondrive_create_folderAll five refresh the snapshots of thread links that name the document. Creating a folder clears the folder cache. The agent instructions say to move or archive only when the user asks.
CLI:
pushneeds either--if-version <n>(the version your files are based on) or--force.pullpins the current version, downloads exactly that, and reports the number to pass back.Behavior change: scripts that ran
pushwithout--if-versionnow fail until they add it, or--force.No server, Cloud, Accounts or CLI auth changes. Shared-account's PR owns the Drive CLI login and Drive settings; this PR doesn't touch them. Nothing needs to be deployed.
Validation
vp run check:changedpasses: format, lint, typecheck forotterdrive,@otterware/drive-contractsand@otterware/drive-engine.conflict;Implemented with Claude Opus 5.5 through the Claude Code harness (T3 Code).
🤖 Generated with Claude Code