ToolRuntime class
Constructors
-
ToolRuntime({required void onMessage(ToolStatus status), required Future<
bool> requestApproval(ToolApprovalRequest request), required Future<Map< askQuestions(List<String, String> >ToolQuestion> questions), required String workspaceRoot, String? currentWorkingDirectory, McpResourceAdapter? mcpResourceAdapter})
Properties
-
askQuestions
→ Future<
Map< Function(List<String, String> >ToolQuestion> questions) -
final
- currentWorkingDirectory ↔ String
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- mcpResourceAdapter → McpResourceAdapter?
-
final
- onMessage → void Function(ToolStatus status)
-
final
-
requestApproval
→ Future<
bool> Function(ToolApprovalRequest request) -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- workspaceRoot → String
-
final
Methods
-
createTask(
{required String subject, required String description, String? activeForm, Map< String, dynamic> ? metadata}) → SessionTask -
endTool(
String name, String message) → void -
fileMatchesTrackedState(
String path) → Future< bool> -
isWithinWorkspace(
String path) → bool -
listTasks(
) → List< SessionTask> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readTrackedCurrentContent(
String path) → Future< String> -
recordFileRead(
String path, String content, FileStat stat) → void -
resolveDirectory(
String path, {String? fromDirectory}) → String -
resolvePath(
String path, {String? fromDirectory}) → String -
setCurrentWorkingDirectory(
String path) → void -
startTool(
String name, String message) → void -
taskById(
String id) → SessionTask? -
toString(
) → String -
A string representation of this object.
inherited
-
trackedFile(
String path) → TrackedFileState? -
validateTaskTransition(
{required String taskId, SessionTaskStatus? newStatus}) → String?
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited