@chorded/cursor-cloud-acp 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Igor Katsuba
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,100 @@
1
- # Temporary Holding Version
1
+ # @chorded/cursor-cloud-acp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Cursor's cloud agents as an [Agent Client Protocol](https://agentclientprotocol.com)
4
+ v1 agent on stdin and stdout, written on Cursor's TypeScript SDK,
5
+ `@cursor/sdk`. [chord](https://github.com/IKatsuba/chord) starts it as its
6
+ `cursor-cloud` agent.
7
+
8
+ Requires Node 22.13 or newer. The commands below require 0.2.0
9
+ to be published; the owner publishes it before chord's next release.
10
+
11
+ ## Signing in
12
+
13
+ ```sh
14
+ npx -y @chorded/cursor-cloud-acp@0.2.0 login # Cursor's browser login, the key kept in the OS keychain
15
+ npx -y @chorded/cursor-cloud-acp@0.2.0 status # whether the keychain holds a login
16
+ npx -y @chorded/cursor-cloud-acp@0.2.0 logout # the key removed from the keychain
17
+ ```
18
+
19
+ `CURSOR_API_KEY`, when set, is used instead of the keychain's key. Where no
20
+ keychain is there (Linux without a Secret Service), `login` refuses and
21
+ points to `CURSOR_API_KEY`; no key is written to a file. The SDK's own
22
+ login file is not used. Keychain calls time out after 10 seconds.
23
+ ACP `auth/status` reports the account's name and email when given, with
24
+ the key's source and keychain expiry when known; chord shows them in
25
+ `/status`. Changes push at the next status request, session start, list,
26
+ resume or load, without polling.
27
+
28
+ What each prints, on stdout (the SDK's own lines, the login URL among
29
+ them, go to stderr):
30
+
31
+ | Command | Says |
32
+ | --- | --- |
33
+ | `login` | `Signed in to Cursor as <email>; the key expires <YYYY-MM-DD>.`, each part only when the SDK gives it |
34
+ | `login` without a keychain | `No keychain to keep the key in: <the keychain's error>. Set CURSOR_API_KEY instead.` on stderr, status 1 |
35
+ | `logout` | `Signed out of Cursor: the key is removed from this machine's keychain.` |
36
+ | `status` | as `login`, or `Not signed in to Cursor.`; then `CURSOR_API_KEY is set; it is used instead.` when it is |
37
+ | any other word | `Usage: cursor-cloud-acp [login \| logout \| status]` on stderr, status 2 |
38
+
39
+ ## Running
40
+
41
+ ```sh
42
+ chord cursor-cloud
43
+ # Or serve ACP v1 to another client in the current directory:
44
+ npx -y @chorded/cursor-cloud-acp@0.2.0
45
+ ```
46
+
47
+ Start in a git work tree on a pushed branch with a push remote. The check
48
+ uses the local remote-tracking ref, without fetching. A refusal tells you
49
+ what to fix. Cursor starts from the remote branch; local changes are not
50
+ uploaded. The first message names the repository, branch and agent link.
51
+ Work runs in Cursor's cloud, pushes a branch of its own and keeps running
52
+ when the client closes. Results name branches, PR links and artifact paths;
53
+ nothing is downloaded.
54
+
55
+ Creating a session is refused while the Cursor account's prepaid balance
56
+ is empty: top up or enable auto top-up. `usage_limit_exceeded` appears as
57
+ one plain line with Cursor's message. After each run, ACP `usage_update`
58
+ reports the whole agent's undiscounted token cost in USD when available.
59
+ Cost may lag until a later run. chord's `/cost` counts it per session, so
60
+ resuming does not count earlier runs again. No context meter is shown:
61
+ the SDK gives no context window.
62
+
63
+ Agent and Plan modes apply from the next prompt. Models have one entry
64
+ each, with separate parameter options; choosing a model starts outside
65
+ max mode when possible. Cursor's default is offered until a model is set.
66
+ Text, thinking, tool results and plans arrive as ACP updates. Cursor
67
+ requests for input or approval are text only; the adapter cannot answer
68
+ them. Cancel stops the run, with a warning if Cursor has not confirmed it
69
+ within 10 seconds. A lost connection ends the turn with the agent link.
70
+
71
+ In chord, `/resume` lists chord's records;
72
+ `chord cursor-cloud --resume bc-…` also reopens an agent started elsewhere.
73
+ The adapter replays the history Cursor provides. A run still going is
74
+ reported, not followed live; prompts are refused until it ends.
75
+ ACP `session/list` lists the account's cloud agents for the repository.
76
+ Cursor's agent name becomes the title only when it changes after a run,
77
+ never on new, resume or load. `/rename` changes chord's title alone; a later
78
+ change to Cursor's name replaces it.
79
+ MCP servers are not forwarded: chord holds them back by default; servers
80
+ sent by another client are named unreachable in the first message.
81
+
82
+ ## Development
83
+
84
+ From the repository root, `bun install` installs the workspace.
85
+ `bun dev quality cursor-cloud-acp` checks types, tooling types, coverage,
86
+ lint and format, then runs tests, the build and a packed Node smoke.
87
+ `--static` leaves out tests, build and smoke. Tests use a fake Cursor and
88
+ keychain; the smoke installs dependencies but reaches neither Cursor nor
89
+ the keychain. The [guide](../../docs/guide.md#development) gives the offline
90
+ window fixture command.
91
+
92
+ The owner's `bun dev release cursor-cloud-acp` runs install, quality,
93
+ build, pack and publish, tags `cursor-cloud-acp-v<version>` and creates no
94
+ GitHub release. `@cursor/sdk` 1.3.1 is an external dependency, as are the
95
+ ACP SDK and keyring. The package bundles none of them; chord's binary
96
+ contains neither the Cursor SDK nor the keyring.
97
+
98
+ ## License
99
+
100
+ MIT
package/dist/bin.js ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+
3
+ // packages/cursor-cloud-acp/src/bin.ts
4
+ var [major = 0, minor = 0] = process.versions.node.split(".").map(Number);
5
+ if (major < 22 || major === 22 && minor < 13) {
6
+ process.stderr.write(`cursor-cloud-acp needs Node 22.13 or newer; this is Node ${process.versions.node}.
7
+ `);
8
+ process.exit(1);
9
+ }
10
+ import("./main.js").then(({ main }) => main(process.argv.slice(2))).then((status) => {
11
+ process.stdout.write("", () => process.exit(status));
12
+ }, (error) => {
13
+ process.stderr.write(`cursor-cloud-acp: ${error instanceof Error ? error.message : String(error)}
14
+ `);
15
+ process.exitCode = 1;
16
+ });