feat(sdk): v2 general-prediction surface + financial & typed-attributes resources - #3
Merged
Merged
Conversation
…observations, query) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…file, predict, calibration) + end-to-end demo Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ention, provenance Adds PredictionTarget (event_occurrence/numeric/event_time/anomaly) on PredictRequest, TargetPrediction + first-class abstained/abstentionReason on PredictResult, and an ergonomic tf.lattice.predictTarget() helper. Mirrors the engine v2 contract the product API already serves. Includes a predict-anything example and README section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…financial/typed types Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 #2 (health). Base will retarget to
mainonce #2 merges.Brings the SDK up to par with the engine across three resource areas, as four logical commits:
feat(typed)— typed-attributes resource: register attribute schemas, ingest typed observations, query them.feat(financial)— financial resource: ingest prices/news/holdings, read profile + calibrated predict, reconcile; plus an end-to-end demo pulling real public data.feat(predict)— the headline (v2 general prediction). Declare what to predict and the engine predicts it from the subject's history:PredictionTarget(event_occurrence|numeric|event_time|anomaly) onPredictRequestTargetPrediction(calibrated interval +explanation+evidenceMemoryIds) and first-classabstained/abstentionReasononPredictResulttf.lattice.predictTarget(subject, target, opts)that surfaces abstention safelyexamples/predict-anything.ts(all four kinds) + README "Predict anything (v2)" sectionchore(client)— wire the new resources into the client and export the new types.Why
The whole v2 target-prediction path was already wired engine → product API → camelCase HTTP and consumed by the admin UI; the public SDK was the only layer that couldn't express it. This closes that gap so the SDK tells the v2 story (predict anything, calibrated, abstains) instead of the v1 pattern-projection story.
Verification
tsc --noEmitclean at the branch tiptsupbuild emits ESM/CJS/DTS;predictTarget,PredictionTarget,TargetPrediction,TargetKindare public indist/index.d.tsNot included (deliberately)
behaviors.discover()— blocked on the engine'sDiscoverBehaviorsendpoint (v2.2), in progress separately.financial/healthinto general-predict examples — that's a breaking change; deferred for a separate decision.🤖 Generated with Claude Code