Add get_telemetry_event action for uncompacted single-event reads#123
Closed
yummybomb wants to merge 1 commit into
Closed
Add get_telemetry_event action for uncompacted single-event reads#123yummybomb wants to merge 1 commit into
yummybomb wants to merge 1 commit into
Conversation
get_telemetry compacts events to fit an agent context window, which strips exactly the fields sometimes needed as evidence (response bodies carrying error messages, request headers, post data). Add a manage_browsers action that fetches one archived event by seq with its full payload; only screenshot png stays omitted. Event seq values are embedded in record bodies by the instance while the offset param addresses the stream position, so the lookup probes near the target and corrects for the observed drift instead of assuming the two are aligned.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Stacked on #119.
summary
get_telemetry_eventaction tomanage_browsers: fetch one archived telemetry event byseqwith its full payload, so fields thatget_telemetrycompacts away (headers,body,post_data, oversized fields) can be inspected when they are the evidence — e.g. a response body carrying an API error message. Screenshotpngstays omitted: base64 image data is unusable in a text response and can run to hundreds of KB.seqvalues are embedded in record bodies by the instance, while the read endpoint'soffsetaddresses the underlying stream position — the two run at a locally constant drift (observed off-by-one in production). The lookup probes near the target, measures the drift from the returned page, and re-anchors rather than assuming alignment; unresolvable seqs return a clear error pointing back atget_telemetry.compactTelemetryEventso the compact and raw paths format events identically.debug-browser-sessionprompt at the new action for the omitted-field case.live verification (production)
Exercised the handler end-to-end against production: recovered omitted
headerson an archivednetwork_request, fetched the first and last events of the archive, verified past-tail and before-archive seqs return clean errors, missingseqand unknown session ids produce proper tool errors, and confirmed reads work after the session is deleted.No test suite in the repo;
tsc --noEmitand prettier pass.