README.md
40 lines · 1.6 KB · Markdown@kentcdodds/origin
Intent
Give Kody agents a durable, secret-safe way to call the Cursor Origin REST API (repos, pull requests, installation discovery, and a raw request escape hatch) using an Origin App. Cloud Agents API keys are not Origin credentials.
This package mints short-lived app JWTs through secret_jwt_sign (EdDSA) and
exchanges them for installation tokens. The Ed25519 private key never enters
package or execute code.
What it does
- List Origin App installations and installation-visible repositories
- List pull requests for Origin repos the installation can see
- Mint installation access tokens (token value never returned)
- Raw authenticated requests to any
/v1/originpath - Cheap rate-limit check as a credential smoke test
- Persist
originAppId/originInstallationIdin package storage
Prerequisites / setup
Follow coding_guide_get({ guide: "provider_origin" }). Defaults this package
reads:
- User secret
originAppPrivateKey— PKCS#8 Ed25519 PEM, withsecret_jwt_signand hostapi.cursor.comapproved. - Package storage
originAppId—app_01…. - Package storage
originInstallationId—i_01…(optional; the first installation is used when omitted).
Agents: see AGENTS.md for import paths and smoke checks.
Done when
originAppPrivateKeyis saved; JWT sign andapi.cursor.comare approvedoriginAppId(and optionallyoriginInstallationId) are in package storage./rate-limitreturns limit/remaining (app JWT works)- You can list installations / repos / pulls for an owner the app can see