apollovm_repository_io library
Native (dart:io) repository extras for ApolloVM.
Re-exports the web-safe apollovm_repository
surface and adds LocalRepositoryAdapter — a RepositoryAdapter backed by a
checkout on disk (filesystem via dart:io, git via the git binary).
Import this on the Dart VM / native. For the web, import
package:apollovm/apollovm_repository.dart and use an
InMemoryRepositoryAdapter (or a remote adapter) instead.
import 'package:apollovm/apollovm_repository_io.dart';
final repo = RepositoryService(
LocalRepositoryAdapter('.'),
config: const RepoConfig(allowWrite: true),
);
print(await repo.gitStatus());
Classes
- GitBlameLine
-
One line of
git blame. - GitCommit
-
One commit from
git log. - GitResult
- The result of a mutating git command.
- GitStatusEntry
-
One entry of
git status(porcelain). - InMemoryRepositoryAdapter
- A web-safe, in-memory RepositoryAdapter backing tests and browser demos.
- LineRange
- A 1-based, inclusive line range for partial file reads.
- LocalRepositoryAdapter
- A RepositoryAdapter backed by a local checkout on disk.
- Op
-
The op names shared by RepositoryRpc (server) and
RemoteRepositoryAdapter(client) — one source of truth for the wire contract. - PermissionGuard
- A RepositoryAdapter decorator that enforces a RepoConfig over any inner adapter, so the security policy holds regardless of the backend.
- RemoteRepositoryAdapter
- A RepositoryAdapter that talks to a remote repository server over HTTP.
- RepoCapabilities
- What a concrete RepositoryAdapter (as configured) is able and permitted to do. Tools consult this to fail cleanly ("not supported / not permitted") instead of throwing when an operation is unavailable.
- RepoConfig
-
Policy for the repository surface (the
RepositoryAdapteroperations and theapollovm.fs.*/search.*/code.*/git.*MCP tools built on it). - RepoEdit
- The outcome of an RepositoryAdapter.edit (or write).
- RepoEntry
- A directory entry produced by RepositoryAdapter.list.
- RepoFile
- The content of a file (or a line slice of it).
- RepositoryAdapter
- A pluggable backend for the workspace/repository MCP tools.
- RepositoryRpc
- A tiny, transport-agnostic JSON layer over a RepositoryService.
- RepositoryService
- A high-level, typed façade over a RepositoryAdapter — the entry point for using ApolloVM's repository features from any Dart host (a web IDE, a desktop editor, an agent, a test), independently of MCP.
- RepoStat
- File/directory metadata produced by RepositoryAdapter.stat.
- TextMatch
- A content-search hit produced by RepositoryAdapter.searchText.
Exceptions / Errors
- RepoException
-
Raised by a RepositoryAdapter for an expected, reportable failure — a
missing file, a path that escapes the workspace root, a rejected line anchor,
or a git error. RepoRuntime turns these into
{isError: true}tool results rather than letting them crash the server. - RepoPermissionException
- Raised when an operation is not permitted by the adapter's capabilities / RepoConfig (e.g. a write while read-only). A subtype of RepoException so callers can distinguish "forbidden" from "failed".