genkit_middleware library
Common Genkit Dart middleware: filesystem access, skills, and tool approval.
The sub-agent delegation middleware builds on Genkit's experimental agent
surface and is intentionally not exported here; import
package:genkit_middleware/agents.dart for it.
Classes
- $FilesystemOptions
- $ListFileOutputItem
- $ListFilesInput
- $ReadFileInput
- $SearchAndReplaceInput
- $SkillsPluginOptions
- $ToolApprovalOptions
- $UseSkillInput
- $WriteFileInput
- FilesystemMiddleware
- FilesystemOptions
- FilesystemPlugin
- ListFileOutputItem
- ListFilesInput
- ReadFileInput
- SearchAndReplaceInput
- SkillsMiddleware
- SkillsPlugin
- SkillsPluginOptions
- ToolApprovalMiddleware
- ToolApprovalOptions
- ToolApprovalPlugin
-
Registers the
toolApprovalmiddleware. - UseSkillInput
- WriteFileInput
Functions
-
filesystem(
{required String rootDirectory}) → GenerateMiddlewareRef< FilesystemOptions> -
skills(
{List< String> ? skillPaths}) → GenerateMiddlewareRef<SkillsPluginOptions> -
toolApproval(
{List< String> ? approved}) → GenerateMiddlewareRef<ToolApprovalOptions> -
Interrupts any tool call whose name is not in the allow-list, so a human
can approve it (by restarting with
{'tool-approved': true}).