Clone, pull, commit, and push git repositories that live inside CharmIQ Folders.
|
|
charmiq://folder/<id> URI; everything inside that Folder lives in CharmIQ but stays in sync with the remote git repository.https://api.charmiq.ai/mcp/gitclone | |
pull | |
check_remote | |
status | |
diff | |
commit | |
push | |
revert | |
log | |
reclone | |
delete | |
update_auth |
clone takes a root Folder URI — charmiq://folder/<id> — to identify which repository to act on.status(folderUri) — find dirty files. Returns charmiq://source/… URIs.diff(folderUri, fileUris) — see what changed against the last commit's blob.commit(folderUri, fileUris, message) — commit locally.push(folderUri) — push to the remote.check_remote(folderUri) — has anything moved upstream? (fast, no network fetch.)pull(folderUri) — pull the latest if so.status returns are interchangeable with the rest of the MCP surface — pass them to VFS server tools (read_file, replace_string, write_file) to actually make edits before committing.clone(remoteUrl, parentFolderUri, name?) creates a new git-backed Folder under the parent and pulls the remote down. The result is a charmiq://folder/<id> URI that you'll pass to every subsequent git tool.charmiq://source/<id> documents inside the cloned Folder.charmiq://folder/<id> sub-Folders.charmiq://file/<id> assets.list_dir, read_file, grep_search, semantic_search — work on cloned repos exactly the same way they work on Workspaces and Charms.error with a lastError describing what happened. Error is not terminal: every operation (including pull, commit, push, revert, reclone, delete) can run from error. A successful operation clears the error automatically.update_auth(folderUri, integrationId) to bind a fresh integration, then retry the operation that failed.pull(folderUri) first to integrate the remote commits, then push again.revert(folderUri) to drop the local changes that conflicted, then pull again. Or reclone to start fresh from the remote.reclone(folderUri, confirmRepositoryName) — revert-then-pull cannot help because there's no shared base to merge from.reclone(folderUri, confirmRepositoryName) rebuilds the local state from the remote in place. Discards all local work — dirty edits AND unpushed commits.delete and reclonedelete and reclone are the two tools that discard committed history. Both require confirmRepositoryName matching the repository's displayed identity (the org/repo form derived from the remote URL, with any trailing .git stripped). The server validates the match before executing. This protects against accidental data loss when an agent acts on a stale plan.update_auth is metadata-only — it rebinds the OAuth integration without touching the archive or entity tree. It does not clear an error status; the next successful pull / push / commit proves the new credentials and clears the error.status before commit. Always read what's actually dirty before staging anything. The user may have edits you didn't make.check_remote before pull. It's a fast metadata check — saves a network round-trip if there's nothing to do.delete and reclone are permanent. Both discard local work — delete also removes the Folder. The confirmRepositoryName requirement is the safety; pass the repo's displayed identity exactly as it appears.