A pluggable backend for the workspace/repository MCP tools.
All path arguments are workspace-relative (POSIX / separators). Concrete
adapters resolve and confine them to their root and throw a RepoException
(or RepoPermissionException) on any invalid or forbidden access.
Properties
- capabilities → RepoCapabilities
-
What this adapter can/may do, so tools can report unsupported operations
cleanly.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delete(
String path) → Future< void> -
Deletes the file or directory
path. -
edit(
String path, String oldString, String newString, {bool replaceAll = false, int? atLine}) → Future< RepoEdit> -
Replaces
oldStringwithnewStringinpath. WhenreplaceAllis false exactly one occurrence must match. WhenatLineis given, the match must occur on that 1-based line or the edit is rejected. -
find(
{String? glob, int? limit}) → Future< List< String> > -
Finds files whose workspace-relative path matches
glob(returns up tolimitpaths). -
gitAdd(
List< String> paths) → Future<GitResult> -
gitBlame(
String path) → Future< List< GitBlameLine> > -
gitCheckout(
String rev) → Future< GitResult> -
gitCommit(
String message, {List< String> ? paths}) → Future<GitResult> -
gitDiff(
{String? rev, bool staged = false, String? path}) → Future< String> -
gitLog(
{int? limit, String? path}) → Future< List< GitCommit> > -
gitRestore(
List< String> paths, {bool staged = false}) → Future<GitResult> -
gitShow(
{required String rev, String? path}) → Future< String> -
gitStatus(
) → Future< List< GitStatusEntry> > -
list(
String path, {bool recursive = false, int? maxDepth, String? glob}) → Future< List< RepoEntry> > -
Lists the directory at
path. Whenrecursive, descends up tomaxDepthlevels;globfilters entries by name/path pattern. -
mkdir(
String path) → Future< void> -
Creates the directory
path(and any missing parents). -
move(
String from, String to) → Future< void> -
Moves/renames
fromtoto. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String path, {LineRange? range}) → Future< RepoFile> -
Reads
path, optionally only the lines inrange. -
searchText(
String pattern, {String? glob, bool ignoreCase = false, int context = 0, int? limit}) → Future< List< TextMatch> > -
Searches file contents for
pattern(a regular expression).globlimits which files are searched;contextlines of surrounding text are attached. -
stat(
String path) → Future< RepoStat> -
Metadata for
path(never throws for a missing path — returnsexists: false). -
toString(
) → String -
A string representation of this object.
inherited
-
write(
String path, String content) → Future< RepoEdit> -
Creates or overwrites
pathwithcontent.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited