Repository navigation
Update SDK for Content Telemetry v1 and SPUR stewardship - #3
Merged
Merged
Conversation
Move the SDK to the v1.0 wire format per the standard's migration notes (spec 12.1). Wire documents declare schema_version "1.0". - content_displayed -> content_presented, with required presentation_kind/presentation_type and new Presentation* types. - content_cited carries id, output_id and required data.citation_type; CitationData gains excerpt_chars, excerpt_hash, media_type, url_verified. - content_engaged binds to presentation_id; TelemetryEvent gains outputId, outputElementId, citationId, presentationId, ctxToken. - Edge/origin profiles: bot_category -> purpose (open AccessPurpose enum, adds advertising); ip_hash withdrawn. - recordEvent accepts the full event field set and returns the event id it assigned, so citation and presentation ids can be chained. - New recordStandaloneEvent for the spec 7.1 standalone envelope (session-less origin/edge retrievals, ctx_token click-outs). - MCPSessionTracker: trackCited always emits citation_type/output_id and returns url->id; new trackPresented; trackEngaged takes presentationIds. - TelemetrySession.data extension container (spec 5.1.3). Wire output for all three delivery formats validates against the standard repository's v1 JSON Schemas and application-layer reference validator. 46 tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019pcWWZA7Z4L34kG4dSw4Rf
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.
The published SDK emits the older 0.1 wire format. This update prepares 1.0.0 for Content Telemetry v1, including citation/presentation/engagement correlation, governing
terms_refpreservation and agent/session envelope context.Adds transport-independent document builders so applications can report to their agreed service. The existing OpenAttribution HTTP client remains available as an optional adapter. Examples await required reporting, distinguish local event ids from receipts, and explain the application's remaining duties. Repository metadata reflects SPUR stewardship while preserving the npm name and original attribution; no npm release is published by this PR.
SPUR is described as a technical standards organisation and convener of content market interoperability pilots. Independent participants operate services and agree commercial terms; installing this SDK does not confer accreditation.
Validation: 52 tests, TypeScript checks, ESM/CJS builds, and 10 generated wire documents checked against the pinned standard schemas and application rules. Existing CI runs unit tests, typecheck and build on Node 20 and 22; the standalone wire validation command is documented for local use. Development dependencies refreshed; npm audit reports no known vulnerabilities.