Skip to content

Add TypeScript + Python SDKs and their publish workflow - #3

Merged
tacyarg merged 1 commit into
masterfrom
feat/sdks
Sep 29, 2026
Merged

tacyarg merged 1 commit into
masterfrom
feat/sdks

Conversation

@tacyarg

@tacyarg tacyarg commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Adds the official SDKs so they can be published:

  • sdk/typescript → @provableio/sdk 0.1.0 (npm)
  • sdk/python → provableio 0.1.0 (PyPI)
  • sdk/openapi.json: a copy of https://provable.io/openapi.json (byte-identical today). Both SDKs generate their types from it.

They were in the private app repo, but both packages' metadata, the docs "SDK source" link and the license all point at this repo. Nothing changes for @provableio/provable-core; npm pack still ships the same 8 files.

Fixes while moving

  • TS SDK had no rotateServerSeed or getPublicMetrics. Python had no get_public_metrics, and its own coverage test was failing on that. Both are added. A new TS test fails if any spec path has no method (the og.png image route is excluded).
  • The generated types/models were stale against the current spec (missing limit/before on listOutcomes, PublicMetrics). They are regenerated.
  • The TS package shipped a 710-byte license stub; it now has the full Apache-2.0 text.

Release

  • .github/workflows/publish-sdk.yml: tag sdk-vX.Y.Z → npm, pysdk-vX.Y.Z → PyPI. Both use trusted publishing (OIDC, no stored tokens), check the tag against the package version, and fail if generated code doesn't match sdk/openapi.json. PyPI runs in the pypi environment.
  • ci.yml gains an sdk job with the same checks on every PR.

Verified locally: TS build + 6/6 tests; Python 9/9. I installed the packed tarball and the wheel in clean projects and called the live API with each: health 200, floats 200, verifyServerHash true, public-metrics operational, and the 2^32 error path returns 400 as a typed error.

…* and pysdk-v* tags

Moved from the private app repo so the source is public and matches the package
metadata. Both generated from sdk/openapi.json (copy of provable.io/openapi.json).
Adds the missing rotateServerSeed + getPublicMetrics (TS) and get_public_metrics (py)
methods, and a TS test that every spec path has a client method.
@tacyarg
tacyarg merged commit 0c3ce34 into master Sep 29, 2026
6 checks passed
@tacyarg
tacyarg deleted the feat/sdks branch September 29, 2026 15:41
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.

1 participant