Repository navigation
feat(gasp): record plugin logs on their run (opt-in) - #269
Merged
Merged
Conversation
GaspRecorder::extension() learns each run's yoagent run id;
GaspRecorder::plugin_log_layer() forwards tracing events of target
yoagent_rutis::plugin (the bridge's log) whose run_id is one of the
recorder's runs; the recorder writes each as observation.created on the
GASP run, through the summarizer, with {source: plugin, level}. Lines of
other runs or none are never recorded. The gasp feature enables optional
tracing-subscriber (registry). Test: tests/gasp_plugin_log_test.rs.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
…s plugin logs Review: consume cleared the route unconditionally at its end, so a recording opened before the previous handle finished lost all its plugin log lines silently. The route is now cleared only while it is still the recording's own (same_channel). Lines queued when AgentEnd arrives are recorded before it, inside the run. Docs: tracing-subscriber 0.3 is the host's dependency; record every run of an agent with the extension. Test: two recordings back to back, the first held open while the second starts (fails without the fix). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A rutis plugin's diagnostics (the yoagent-rutis bridge's
log, #268) can now be part of a GASP run's record — a plugin's "your policy did not apply" belongs in the audit trail next to the tool calls it affected.Opt-in, two pieces from the recorder:
recorder.extension()— install on the agent; at each run's start it learns yoagent's run id (GASP generates its own run id andAgentStartcarries none, so this is the link).recorder.plugin_log_layer()— add to thetracingsubscriber; it forwards events of targetyoagent_rutis::plugin(gasp::PLUGIN_LOG_TARGET) whoserun_idis one of this recorder's runs.The recorder writes each line as
observation.createdlinked to the run (record_observation;failure.observedhas no run link), through the summarizer like tool output (so redaction applies), with{source: "plugin", level}metadata. Lines arriving beforeAgentStartare buffered; queued lines are drained at the stream's end. Another agent's lines, or lines without a run, are never recorded.gaspnow also enables optionaltracing-subscriber(registry only). Zero loop changes.Test
tests/gasp_plugin_log_test.rs(own binary, global subscriber): a stand-in plugin logs its run's line, another run's line and a run-less line; exactly the first is recorded, on the right run. Mutation-checked (no run link → fails; no run filter → fails).cargo test --all-features, clippy (all / no-default / gasp-only), docs-Dwarningspass.🤖 Generated with Claude Code
https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG