agent-trace-plugin: Switch agent-trace plugin from session.diff to message.updated event capture#42
Draft
ivke995 wants to merge 6 commits into
Draft
agent-trace-plugin: Switch agent-trace plugin from session.diff to message.updated event capture#42ivke995 wants to merge 6 commits into
ivke995 wants to merge 6 commits into
Conversation
….updated The agent-trace plugin previously captured session.diff events, but the upstream OpenCode API no longer emits this event reliably. Switch to message.updated events, which carry the same diff information per user message. Key changes: - Listen for message.updated instead of session.diff - Extract diffs from properties.info.summary?.diffs[].patch instead of properties.diff[] - Filter to user messages only (info.role === user) - Fall back sessionID to unknown when info.sessionID is absent - Use patch-only extraction (no diff field fallback needed for FileDiff) - Bump @opencode-ai/plugin from 1.3.0 to 1.14.28 for message.updated support Generated plugin outputs regenerated via Pkl; context documentation updated to reflect the new event contract. Plan: agent-trace-plugin-message-updated (T01, T02, T03) Co-authored-by: SCE <sce@crocoder.dev>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Capture the OpenCode model identifier in emitted diff-trace payloads and add the nullable diff_traces.model_id migration so later Rust hook wiring can persist it without changing recent-patch reads. Plan: add-diff-traces-model-id Updated tasks: T01, T02 Co-authored-by: SCE <sce@crocoder.dev>
Register the model_id migration and extend DiffTraceInsert plus the diff_traces INSERT statement so AgentTraceDb writes nullable model identifiers with captured diff traces. This is the DB-layer slice; hook payload parsing remains in the next task. Plan: add-diff-traces-model-id Task: T03 Co-authored-by: SCE <sce@crocoder.dev>
Parse the OpenCode-provided model_id from diff-trace payloads and pass it through to AgentTraceDb inserts so stored diff_traces retain model attribution. Plan: add-diff-traces-model-id Task: T04 Co-authored-by: SCE <sce@crocoder.dev>
…plan - Mark T05 (Validation and cleanup) as done with evidence - Add execution record: pkl-check-generated passed, nix flake check passed - Append validation report confirming all 6 success criteria met - Clean stale context/tmp/ artifacts (157 files removed) - Confirm no new test files remain from this plan Plan: add-diff-traces-model-id Task: T05 Co-authored-by: SCE <sce@crocoder.dev>
Co-authored-by: SCE <sce@crocoder.dev>
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.
No description provided.