Repository navigation
Land Depot agents CLI 4/6: agent pull and push (DEP-7264) - #617
Closed
robstolarz wants to merge 4 commits into
Closed
robstolarz wants to merge 4 commits into
robstolarz wants to merge 4 commits into
Conversation
pull writes a session's instructions, skills and plugin refs to a directory; push stores the directory as the next version, or --version N stores an earlier version again to roll back. session create takes --definition <dir>. Part of DEP-7248. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
A directory has no order, so skills go up sorted by name, and SKILL.md files checked out with CRLF line endings now parse. Part of DEP-7248. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
Refs DEP-7264 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
This was referenced Oct 3, 2026
A pull whose skill names were invalid deleted the existing definition and then failed partway through writing, leaving a partial directory. Validate every name before anything on disk changes. Refs DEP-7264 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
Contributor
Author
|
Superseded by #613 (single cli landing PR) |
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.


Adds
depot agent pull/pushto keep an agent definition (prompt and skills) in a local directory, andsession create --definition. This PR lands approved #610 (head 4cfa7ed) as a--no-ffmerge ontorob/depot-agents-cli-land-03-files, as part of the per-feature landing stack for DEP-7264. Review:git show --remerge-diff daee81eshows only what the merge changed beyond #610's approved diff.Stack
Test plan
go build ./...andgo test ./...pass at this tip, includingTestDefinitionRoundTripsThroughADirectory,TestDefinitionDirectoryHoldsSkillsInNameOrder,TestReadDefinitionAcceptsCRLFSkills,TestReadDefinitionRejectsBadSkills,TestPullRefusesToMixIntoADefinitionAlreadyThere,TestPullRefusesASkillNameThatEscapesTheDirectory,TestPushStoresADirectoryAndRollsBackToAVersion, andTestForcedPullWithABadSkillNameKeepsTheExistingDefinition(from the fix commit below)Merge resolutions
Clean merge; no conflicts.
Fix on top: Bugbot found that
pull --forcedeleted the existing definition before it rejected an invalid skill name. Names are now checked before anything is removed. This fix is merged forward into the later PRs.🤖 Generated with Claude Code
https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
Note
Medium Risk
Changes how agent sessions are configured (instructions, skills, plugins) via new API RPCs and local filesystem I/O; pull includes path-safety checks but mis-pushed definitions affect live agent behavior on the next turn.
Overview
Adds versioned agent definitions to the Depot agents CLI:
depot agent pullwrites a session’s current (or--version) definition to a local directory (default./depot-agent), anddepot agent pushuploads a directory as the next definition version or re-publishes an older version with--versionfor rollback.The on-disk layout is
AGENTS.md,skills/<name>/SKILL.md(YAML front matter + body), and optionalplugins.json. Pull refuses to overwrite an existing tree unless--force, validates skill directory names before any destructive replace, and blocks path-escape skill names.depot agent session create --definitionreads that same directory and sends it onCreateSessionas the session’s initial definition (API version 1).Proto/connect clients gain
GetAgentDefinition/PutAgentDefinitionand related messages (DepotAgentDefinitionContent, skills, plugin refs). Tests cover directory round-trips, CRLF skills, pull safety, and push/rollback against a fake service.Reviewed by Cursor Bugbot for commit 2afc1dd. Bugbot is set up for automated code reviews on this repo. Configure here.