[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80278":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},80278,"composer-api","standardagents\u002Fcomposer-api","standardagents","OpenAI-compatible API proxy for Cursor Composer",null,"Swift",180,26,82,9,0,3,18,95,15,4.29,"MIT License",false,"main",true,[],"2026-06-12 02:04:00","# API for Cursor\n\nLocal OpenAI-compatible `chat.completions` and `responses` endpoints backed by Cursor Composer.\n\nDownload site: https:\u002F\u002Fapi-for-composer.standardagents.ai\n\n## What this is\n\nCursor does not expose Composer as a raw OpenAI-compatible model endpoint. API for Cursor now ships as a local macOS app that starts a localhost `\u002Fv1` server, stores the Cursor API key locally, and configures local agent tools.\n\nThe hosted Worker routes remain in the repository for temporary compatibility while the local app rollout is verified. Cursor has asked us to take down the hosted API path, so the production release path is the signed macOS app.\n\n## Supported endpoints\n\n- `POST \u002Fv1\u002Fchat\u002Fcompletions`\n- `POST \u002Fv1\u002Fresponses`\n- `GET \u002Fv1\u002Fmodels`\n\n## Usage\n\nInstall the macOS app from the DMG and start the local API. The default base URL is:\n\n```txt\nhttp:\u002F\u002F127.0.0.1:8787\u002Fv1\n```\n\nPoint any OpenAI-compatible client at the local base URL and authenticate with any Bearer token your client requires. The app uses the Cursor API key stored locally in the app UI.\n\n```ts\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  apiKey: \"local\",\n  baseURL: \"http:\u002F\u002F127.0.0.1:8787\u002Fv1\"\n});\n\nconst completion = await client.chat.completions.create({\n  model: \"composer-2.5\",\n  messages: [{ role: \"user\", content: \"Write a TypeScript debounce.\" }]\n});\n```\n\n```bash\ncurl http:\u002F\u002F127.0.0.1:8787\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer local\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"model\":\"composer-2.5\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}]}'\n```\n\nA Cursor user API key comes from the Cursor Dashboard under Integrations. Enter it in the app; do not commit it to source control.\n\n## macOS production release\n\nRelease details live in [docs\u002Fproduction.md](docs\u002Fproduction.md).\n\n- Builds are packaged as a signed DMG.\n- DMGs are notarized by Apple.\n- Sparkle is embedded for auto-updates.\n- Versioned DMGs, the latest DMG alias, and `appcast.xml` are uploaded to Cloudflare R2.\n- The Worker serves `\u002Fdownload`, `\u002Freleases\u002F...`, and `\u002Fappcast.xml`.\n\n## Legacy hosted-key flow (optional)\n\nThe Worker also keeps a backward-compatible hosted-key flow: `POST \u002Fapi\u002Fsignup`\nverifies a Cursor API key, stores it encrypted in D1, and mints a separate\n`cmp_...` proxy key usable against per-account endpoints at\n`\u002Fu\u002F{account_id}\u002Fv1\u002F...`. This flow is optional; the direct Bearer usage above\nis the recommended path. A `cmp_...` token is always resolved against D1 and is\nnever forwarded to Cursor as a Cursor key.\n\n## Compatibility notes\n\nThis project supports text and image input, non-streaming and streaming output, JSON-output prompt constraints, and the common SDK response shapes. Image inputs can be sent as Chat Completions `image_url` parts or Responses `input_image` parts; each resolved image must be 1MB or smaller.\n\nThese OpenAI features are intentionally rejected because Cursor does not expose equivalent OpenAI controls through this path:\n\n- `n` greater than `1`\n- `logprobs` and `top_logprobs`\n- audio output\n- OpenAI function\u002Ftool calls on the Responses API\n- background Responses API jobs\n\nToken usage is estimated from character counts because Cursor's stream does not return OpenAI token accounting on this path. For Composer 2.5 and Composer 2.5 Fast, `usage.cost` is estimated from Cursor's published per-million-token pricing.\n\n## OpenCode\n\n![Composer 2.5 in OpenCode](public\u002Fopencode-composer-2-5.webp)\n\nUse the app's **Agent Setup** pane to install the local OpenCode provider. The configured provider points at the local base URL, not the hosted Worker.\n\n## Local development\n\n```bash\nnpm install\nnpm run db:migrate:local\nnpm run dev\n```\n\nCreate a local `.dev.vars` file:\n\n```bash\nENCRYPTION_KEY=\"replace-with-a-long-random-secret\"\nWAITLIST_API_TOKEN=\"optional-standard-agents-waitlist-token\"\nCURSOR_SDK_BRIDGE_URL=\"optional-external-node-sdk-bridge-url\"\nCURSOR_SDK_BRIDGE_TOKEN=\"optional-external-shared-bridge-token\"\nCURSOR_SDK_BRIDGE_TIMEOUT_MS=\"180000\"\nCURSOR_CLIENT_VERSION=\"2.6.22\"\nCURSOR_SDK_CLIENT_VERSION=\"sdk-1.0.13\"\n```\n\nRun the optional SDK local-agent bridge in a local Bun or Node environment:\n\n```bash\nnpm run sdk:opencode-bridge\n```\n\nThe bridge process also accepts `CURSOR_SDK_BRIDGE_RUN_TIMEOUT_MS`; the default is\n`180000`.\n\nRelease packages prefer a bundled Bun runtime for the local SDK bridge and fall\nback to Node when Bun is unavailable.\n\n## Cloudflare\n\nThe Worker uses Cloudflare Vite and D1.\n\nRemote migration and deploy commands require a valid `CLOUDFLARE_API_TOKEN` in\nthe shell environment.\n\n```bash\nnpm run build\nnpm run test\nnpm run typecheck\nnpm run db:migrate:remote\nnpm run deploy\n```\n\nRequired secrets:\n\n```bash\nwrangler secret put ENCRYPTION_KEY\nwrangler secret put CURSOR_BACKEND_BASE_URL\nwrangler secret put CURSOR_CHAT_ENDPOINT\n```\n\nThe OpenCode SDK harness also requires the `0002_sdk_sessions.sql` migration so\nlocal SDK agent ids can be resumed across Worker isolates.\n\nThe Cloudflare deployment uses the container-backed bridge by default. Do not set\n`CURSOR_SDK_BRIDGE_URL` for that path. Only set it when intentionally routing the\nSDK harness to an external Node or Bun bridge instead of the\n`CURSOR_SDK_BRIDGE_CONTAINER` Durable Object binding.\n\nOptional SDK harness overrides:\n\n```bash\nwrangler secret put CURSOR_SDK_CLIENT_VERSION\nwrangler secret put CURSOR_SDK_BRIDGE_URL\nwrangler secret put CURSOR_SDK_BRIDGE_TOKEN\n```\n\nOptional secret for direct waitlist writes. If omitted, the Worker falls back to the deployed token-cost early-access endpoint.\n\n```bash\nwrangler secret put WAITLIST_API_TOKEN\n```\n\n## Research sources\n\n- Cursor SDK package: `@cursor\u002Fsdk@1.0.13`\n- Cursor SDK TypeScript docs: https:\u002F\u002Fcursor.com\u002Fdocs\u002Fapi\u002Fsdk\u002Ftypescript\n- Cursor Composer 2.5 changelog: https:\u002F\u002Fcursor.com\u002Fchangelog\u002Fcomposer-2-5\n- OpenAI Chat Completions reference: https:\u002F\u002Fdevelopers.openai.com\u002Fapi\u002Fdocs\u002Fapi-reference\u002Fchat\n- OpenAI Responses reference: https:\u002F\u002Fdevelopers.openai.com\u002Fapi\u002Fdocs\u002Fapi-reference\u002Fresponses\n- OpenAI migration guide: https:\u002F\u002Fdevelopers.openai.com\u002Fapi\u002Fdocs\u002Fguides\u002Fmigrate-to-responses\n- Cloudflare Containers getting started: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fcontainers\u002Fget-started\u002F\n- Cloudflare Containers container class: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fcontainers\u002Fcontainer-class\u002F\n","standardagents\u002Fcomposer-api 是一个与 OpenAI 兼容的 API 代理，用于 Cursor Composer。该项目使用 TypeScript 编写，提供了本地 `chat.completions` 和 `responses` 端点，支持文本和图像输入以及非流式和流式输出。核心功能包括通过 macOS 应用程序启动本地服务器，并存储 Cursor API 密钥以配置本地代理工具。适用于需要将现有 OpenAI 兼容客户端连接到 Cursor Composer 的场景，如开发人员希望在本地环境中测试或部署 AI 驱动的应用程序时。项目遵循 MIT 许可证，目前已有 85 个星标和 17 个分叉，表明其在开发者社区中受到一定关注。",2,"2026-06-11 04:00:08","CREATED_QUERY"]