FakeAgentInterface class final
The agent interface state of one FakeWorld; FakeAgentInterface.of gives the one of a world.
Properties
-
autocompleteRequests
→ List<
({String commandId, String option, String value})> -
Every
autocompleteCommandrequest in order: command ID, option and value.final -
commands
→ Map<
String, JsonMap> -
The registered commands by ID (API
Command).final - hashCode → int
-
The hash code for this object.
no setterinherited
-
interactions
→ Map<
String, JsonMap> -
The interactions by
principal|client_interaction_id(APIInteraction).final -
invocations
→ List<
JsonMap> -
Every accepted
invokeCommandin order (APICommandInvokewith the command and the person).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sessions
→ Map<
String, List< JsonMap> > -
The agent sessions per thread (API
AgentSession), oldest first.final -
suggestions
→ Map<
String, FakeAutocomplete> -
The option suggestions by command ID.
final
- world → FakeWorld
-
The world.
final
Methods
-
addEarlierSession(
String threadId, String agentId, String externalRef) → JsonMap -
Adds an earlier session of
agentIdinthreadIdwithexternalRef(/resumechooses it). -
commandsOf(
String channelId) → List< JsonMap> -
The commands offered in
channelId(listChannelCommands): those of agents that see the channel, on the instance, the channel's space or the channel; the operator's first, then by lower-case name, owner and ID. The fake has no guest rule and no app commands. -
componentById(
String componentId) → ({JsonMap component, JsonMap message})? -
The component
componentIdwith its message, or null. -
currentSession(
String threadId, String agentId) → JsonMap -
The current agent session of
agentIdinthreadId, created on first use (09 9). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postAnchor(
String agentId, String runId) → String -
Writes the live box anchor of
runId(kind = run, 09 5.4): an agent message without text behind the triggering message, then itsrun_idasmessage.updated. -
postCard(
String agentId, String threadId, String text, List< JsonMap> components, {String? runId}) → String -
Posts a card of
agentIdintothreadId(kind = card, 09 11): the message withtext, then itscomponents(ComponentCreate-like maps withcustom_id,type,definitionand optionalsingle_use,required_capability,restricted_to,expires_at) bound torunId; the components follow asmessage.updated, as the server writes the card row before its components (09 11.4). Returns the message ID. -
registerCommand(
String ownerId, String name, {String description = '', List< JsonMap> options = const [], bool control = false, String scopeKind = 'instance', String? scopeId, FakeAutocomplete? autocomplete}) → String -
Registers the command
nameofownerIdon the instance (orscopeKindandscopeId) and appendscommand.changed; returns its ID. -
replaceSession(
String threadId, String agentId, {required String reason, String? externalRef}) → JsonMap -
Ends the current session of
threadIdwithreasonand starts a new one, bound toexternalRefwhen given (resetAgentSession,bindAgentSession). -
toString(
) → String -
A string representation of this object.
inherited
-
used(
String componentId) → bool -
Whether
componentIdwas used (a card's script waits for it).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
FakeWorld world) → FakeAgentInterface -
The agent interface of
world, created on first use.