PluginContext class final
Context passed to FahPlugin.register. Plugins use it to contribute capabilities to the running agent session.
Constructors
-
PluginContext({required ExecutionEnv env, required PluginIO io, Map<
String, dynamic> config = const {}, PluginPickOption? pickOption, PluginAskLine? askLine}) - Creates a plugin context.
Properties
- askLine → PluginAskLine?
-
Interactive free-form questions (masked for secrets), or null on
non-interactive hosts.
final
-
config
→ Map<
String, dynamic> -
Plugin-specific configuration from
.fah/packages.yaml.final - env → ExecutionEnv
-
The execution environment backing the current CLI session.
final
-
externalInboxes
→ List<
ExternalInbox> -
External inboxes collected from plugins (unmodifiable).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- io → PluginIO
-
Output channel for the plugin.
final
- pickOption → PluginPickOption?
-
Interactive multiple-choice questions, or null on hosts without an
interactive UI (headless runs, the app): guided flows must fall back
to plain text then.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slashCommandDescriptions
→ Map<
String, String> -
Slash-menu hints collected from plugins (only commands registered
with a
description).no setter -
slashCommands
→ Map<
String, SlashCommand> -
Slash commands collected from plugins.
no setter
-
tools
→ List<
AgentTool> -
Tools collected from plugins.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerExternalInbox(
ExternalInbox inbox) → void - Registers an external inbox (e.g. a network hub mailbox) whose mail is drained into the agent loop as steering messages at every turn boundary.
-
registerSlashCommand(
String name, SlashCommand handler, {String? description}) → void -
Registers a
/nameslash command.descriptionis the one-line hint the slash menu shows next to the command. -
registerTool(
AgentTool tool) → void - Registers an AgentTool that will be available to the agent.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited