A2aRequestHandler class final
A transport-agnostic A2A request handler. Each incoming JSON-RPC request
is dispatched to runner; the task state is tracked in-memory keyed by
task id. When mailSink is set, message/send requests carrying the
faMailMetadataKey metadata are fabric mail (issue #27 phase 3): the
envelope is deposited via the sink and the task completes with the ack —
the runner is never invoked.
Constructors
-
A2aRequestHandler({required A2aAgentRunner runner, required String agentName, required String agentDescription, List<
AgentSkill> skills = const [], String? token, A2aMailSink? mailSink})
Properties
- agentDescription → String
-
final
- agentName → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- mailSink → A2aMailSink?
-
Inbound fabric-mail deposit (issue #27 phase 3). Null = the endpoint
does not accept fabric mail; envelope-carrying sends then fail the
task honestly.
final
- runner → A2aAgentRunner
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
skills
→ List<
AgentSkill> -
final
- token → String?
-
final
Methods
-
agentCardJson(
) → String -
Serves the Agent Card at
/.well-known/agent.json. -
handle(
String requestBody, {String? authHeader}) → Future< String> - Handles a raw JSON-RPC request body, returns the JSON-RPC response body.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited