Skip to content

feat(sdk): v2 general-prediction surface + financial & typed-attributes resources - #3

Merged
rrader26 merged 4 commits into
feat/health-resourcefrom
feat/sdk-catchup
Jun 29, 2026
Merged

feat(sdk): v2 general-prediction surface + financial & typed-attributes resources#3
rrader26 merged 4 commits into
feat/health-resourcefrom
feat/sdk-catchup

Conversation

@rrader26

Copy link
Copy Markdown
Contributor

Stacked on #2 (health). Base will retarget to main once #2 merges.

Brings the SDK up to par with the engine across three resource areas, as four logical commits:

  1. feat(typed) — typed-attributes resource: register attribute schemas, ingest typed observations, query them.
  2. feat(financial) — financial resource: ingest prices/news/holdings, read profile + calibrated predict, reconcile; plus an end-to-end demo pulling real public data.
  3. 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) on PredictRequest
    • TargetPrediction (calibrated interval + explanation + evidenceMemoryIds) and first-class abstained / abstentionReason on PredictResult
    • ergonomic tf.lattice.predictTarget(subject, target, opts) that surfaces abstention safely
    • examples/predict-anything.ts (all four kinds) + README "Predict anything (v2)" section
  4. chore(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 --noEmit clean at the branch tip
  • tsup build emits ESM/CJS/DTS; predictTarget, PredictionTarget, TargetPrediction, TargetKind are public in dist/index.d.ts

Not included (deliberately)

  • behaviors.discover() — blocked on the engine's DiscoverBehaviors endpoint (v2.2), in progress separately.
  • Deprecating financial/health into general-predict examples — that's a breaking change; deferred for a separate decision.

🤖 Generated with Claude Code

rrader2890 and others added 4 commits June 29, 2026 14:16
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants