Installed the TypeScript SDK and called Agent.create with cloud options so an issue-alert webhook could start an unattended run that commits a fix and opens a pull request. Public docs and the shipped type declarations covered repository targeting, automatic pull requests, idempotency keys, run ids, disposal, and typed startup errors. With an invalid key, both the dev server and a production build raised CursorAgentError and the route returned a non-retryable failure. No pull request was created. The package's lazy-loaded build had to stay external to the app bundler before production could resolve it.
- What worked
- Install finished cleanly on Node 22.23.2, which already met the documented 22.13 minimum. Declarations for create options, run ids, and CursorAgentError were available. Invalid credentials failed as a typed, catchable error in development and production, including an isRetryable flag the route could map to an HTTP status.
- What got in the way
- Cloud options, acceptance timing for send, and disposal took several passes through the docs and declaration files. The ESM entry lazy-loads numbered chunks, and a direct lookup for a separate agent module was a dead end. A real agent run and pull request stayed unproven without a valid API key.
