Git Workflows In The Workspace
Explorer should not run raw Git commands directly from the browser or spread credential handling across user interface (UI) code. The workspace needs one boundary that understands repository roots, remote operations, and authentication state while keeping command execution on the agent side.
Workspace Boundary For Git Operations
gitAgent provides that boundary. Explorer and related workflows call a finite Model Context Protocol (MCP) surface declared in gitAgent/mcp-config.json, while the agent validates repository scope, resolves credentials, and keeps command execution inside approved workspace paths.
The same contract also absorbs GitHub and token-based authentication flows so remote push, pull, and missing remote repository creation behavior stays in one place instead of leaking into plugin presenters.
Runtime Behavior
At runtime, Git requests enter through MCP and are executed through gitAgent/tools/git_tool.sh and the modules behind git_tool.mjs. Explorer plugins stay thin: they collect intent, call the tool surface, and render status. The agent remains responsible for repository discovery, command dispatch, remote-auth persistence, canonical GitHub remote URLs, and creating missing GitHub repositories under the owner encoded in the remote URL.
Validation rule: run the Git agent test suite for code changes, together with docs and specification updates.