feat: add Git repository session resources - #171
Merged
Conversation
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
Mango Sessions can stage Files and Skills, but they cannot reproducibly start from a Git repository across Docker and remote sandbox providers. Cloning independently inside each sandbox would make checkout identity, network behavior, and recovery provider-dependent.
The public Claude Managed Agents GitHub repository resource was reviewed as a design reference. Mango needs the underlying workflow, but not its GitHub-only naming, hosted authentication, token, or post-create update semantics.
Solution
Add a Mango-owned
git_repositorySession Resource:.git, and freezeresolved_commit;/workspace/<repository-name>while allowing validated child paths under/workspace;This also removes the obsolete GitHub-specific resource update/token route rather than retaining a compatibility shim. The model adapter and
/v1/messagesinference path are unchanged.API and migration impact
git_repository,repository_url,checkout,resolved_commit, andmount_path.00035_git_repository_resources.sqlfor repository metadata and internal File ownership.Mango is pre-release, so the old vendor-shaped development surface is changed directly on
/v1.Durability, retry, and security
-, credentials, submodule fetching, and LFS fetching are rejected.Verification
make verifymake docs-checkmake securitymake local-configmake image-smokemake test-serviceagainst a fresh temporary PostgreSQL database, plus Temporal, NATS, MinIO, and real Dockergit diff --checkNon-goals