Class EventStreamDigestTools
The two tools the digest's analysis agent calls against live event-stream state: find the stream and read that stream.
list_event_streamsenumerates streams asproject / path — STATE, narrowable by project, path substring and state, rendered byEventStreamListRenderer.event_stream_diagnosticsdrills into one named stream: it resolves the stream, handles the not-found case, and hands the rest toEventStreamDiagnosticsRenderer.
The only stateful type in the digest. Everything else renders from arguments it is handed;
this holds the live EventStreamManager because the model decides when to read and
which stream to read, long after the digest was built. Each call re-reads state at the moment
it is asked for, so two calls in one conversation can legitimately disagree.
A stream the model names may not exist — it may have been deleted since the roster was rendered, or the model may have mistyped a path. That returns a plain sentence rather than throwing, because a tool failure surfaces to the model as an error it will usually just retry, whereas a sentence tells it what to do differently. Both tools follow that rule: an unmatched filter and an unknown state name also come back as sentences.
A tool description is the model's only instruction for that tool, so event_stream_diagnostics
names every column the table returns and every cap the renderer applies. It must stay in step
with what EventStreamDiagnosticsRenderer.render(EventStreamDiagnostics) actually emits: a column described here
but not rendered is a column the model will ask questions about and never receive, and a cap the
description omits is a truncation the model will read as the whole picture.
list_event_streams carries the opposite obligation — it must say what it does not return,
or the model will answer from the cheap listing and report streams as checked that it never
read.
maxFrames is the one knob the model gets, mirroring Perspective's thread-dump tool: a small
default, and a hard ceiling clampFrames(Integer) applies no matter what the model asks for. It
exists because this tool's premise is that cost is paid per investigation — a model that has
narrowed the problem to one stream should be able to buy more trace depth on it, without that
depth being available by default on every call.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ToolBundlebundle(EventStreamManager manager) The analysis agent's tool bundle, and the only entry point into this package: the digest agent registers what this returns and never touches the tool or its renderer directly.diagnostics(String project, String path, @Nullable Integer maxFrames) listEventStreams(String project, String pathContains, String state)
-
Method Details
-
bundle
The analysis agent's tool bundle, and the only entry point into this package: the digest agent registers what this returns and never touches the tool or its renderer directly. The bundle is resolved lazily, so it stays valid for as long as the captured manager does — the module's lifetime.- Parameters:
manager- the live event-stream manager the tools read through.- Returns:
- a bundle carrying
list_event_streamsandevent_stream_diagnostics.
-
listEventStreams
-
diagnostics
-