Expand description
One outcome per ambient call, logged and counted.
The module used to be silent: its failure paths logged at debug, so a rejected,
empty or failed title left no trace, and diagnosing the (none yet) swarm row
took a database copy (docs/specs/SPEC_AMBIENT_SWARM_SUMMARY_HARDENING_2026_10_02.md
section 2.1 defect 6, section 5.8). Every call now ends in exactly one
Outcome, written as one structured info line and counted per purpose, and
the counts are readable over the ambient.outcomes RPC (the token popover’s AgentMux internal row).
The rejected text is logged, truncated, because rejected values are the corpus
the title predicate is tuned with.
Structs§
- Timing
- How long a call waited and ran, for the outcome line. Both in milliseconds.
Enums§
- Outcome
- How an ambient call ended.
- Reject
Reason
Constants§
- CHILD_
OUTPUT_ MARK - Separates an error’s own words from the end of the child’s stderr that follows it.
Functions§
- classify_
error - Classify a failed CLI call.
cancelledis whether the gateway cancelled it because a newer request superseded it. - record
- Record one outcome without timings: count it, and log it at info with the
purpose and entity. See
record_timed. - record_
timed - Record one outcome: count it, and log it at info with the purpose, the entity
and, when the call ran, how long it queued and ran.
text(the reply, or the reason a call failed) is logged by its length only: it is model output about a conversation, and no log level carries that (docs/specs/SPEC_HISTORY_COMPACT_FORM_ONLY_2026_11_23.mdsection 3 row 10). - snapshot
- Every count since this srv started, by purpose then outcome label.