Class AgentAnswerJournal
- Namespace
- MailFathom.Application.Agent.Answering
- Assembly
- MailFathom.Application.dll
Writes one running answer into its conversation as it is composed, and tells the person's screens each time.
public sealed class AgentAnswerJournal : IDisposable
- Inheritance
-
AgentAnswerJournal
- Implements
- Inherited Members
Remarks
Every part is written where it is produced. A status line, a declared source, a block, and a proposal each reach the conversation the moment the composition has them, so what a person sees survives the connection that asked, a second screen, and the replica composing it going away — the condition ADR 0035 rests on. Nothing here buffers.
A stop reaches the run as the first write the store refuses. The store admits an entry into an answer only while that answer is the one being composed, so a stop recorded from any replica turns the next write here into a refusal; Stopping is cancelled on it, and the composition sees its token end. Reading the person's further instructions reads the conversation's standing too, so a stop is also met between two model calls that wrote nothing.
Constructors
- AgentAnswerJournal(AgentConversationId, UserId, AgentMessageId, long, IAgentConversationStore, ClientSignals, IUserLanguages, TimeProvider)
Initializes the journal of one answer the conversation has already opened.
Properties
- HasEnded
Gets whether this journal wrote the answer's ending.
- Stopping
Gets a token cancelled once the answer is no longer the one being composed.
Methods
- CompleteAsync(IReadOnlyList<PresentationText>, CancellationToken)
Ends the answer as completed, with the questions the agent suggests asking next.
- ComposeAsync(PresentationBlock, CancellationToken)
Writes a block of the answer, every source of which has to be declared already.
- DeclareAsync(PresentationCitation, CancellationToken)
Declares a source the answer's blocks may name, once however often it is declared.
- Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- EndAsync(AgentAnswerOutcome, CancellationToken)
Ends the answer, after which nothing further is written into it.
- ProposeAsync(PresentationBlock, AgentProposedAct, CancellationToken)
Offers the person something to do, which nothing does until they accept it.
- ReadInstructionsAsync(CancellationToken)
Reads what the person added to the answer since the last read, and meets a stop recorded meanwhile.
- RecordChargeAsync(long, long, CancellationToken)
Records what the run's first call sent and was charged, which the next turn's budget is measured by.
- RecordCompactionAsync(AgentConversationCompacted, CancellationToken)
Records a compaction taken for this answer's turn, which every later turn is composed from until the next one.
- RecordToolCallAsync(string, string, string, CancellationToken)
Records a tool the model asked for, so the input its next call is composed from can be rebuilt from the record.
- RecordToolResultAsync(string, string, CancellationToken)
Records what a tool handed back to the model.
- ReportAsync(AgentActivity, CancellationToken)
Replaces the status line with what the run is doing now.