@chorded/cursor-cloud-acp 0.0.0-stage → 0.1.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,89 @@
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. Version 0.1.0 is not published yet; the
9
+ commands below require that release.
10
+
11
+ ## Signing in
12
+
13
+ ```sh
14
+ npx -y @chorded/cursor-cloud-acp@0.1.0 login # Cursor's browser login, the key kept in the OS keychain
15
+ npx -y @chorded/cursor-cloud-acp@0.1.0 status # whether the keychain holds a login
16
+ npx -y @chorded/cursor-cloud-acp@0.1.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
+
24
+ What each prints, on stdout (the SDK's own lines, the login URL among
25
+ them, go to stderr):
26
+
27
+ | Command | Says |
28
+ | --- | --- |
29
+ | `login` | `Signed in to Cursor as <email>; the key expires <YYYY-MM-DD>.`, each part only when the SDK gives it |
30
+ | `login` without a keychain | `No keychain to keep the key in: <the keychain's error>. Set CURSOR_API_KEY instead.` on stderr, status 1 |
31
+ | `logout` | `Signed out of Cursor: the key is removed from this machine's keychain.` |
32
+ | `status` | as `login`, or `Not signed in to Cursor.`; then `CURSOR_API_KEY is set; it is used instead.` when it is |
33
+ | any other word | `Usage: cursor-cloud-acp [login \| logout \| status]` on stderr, status 2 |
34
+
35
+ ## Running
36
+
37
+ ```sh
38
+ chord cursor-cloud
39
+ # Or serve ACP v1 to another client in the current directory:
40
+ npx -y @chorded/cursor-cloud-acp@0.1.0
41
+ ```
42
+
43
+ Start in a git work tree on a pushed branch with a push remote. The check
44
+ uses the local remote-tracking ref, without fetching. A refusal tells you
45
+ what to fix. Cursor starts from the remote branch; local changes are not
46
+ uploaded. The first message names the repository, branch and agent link.
47
+ Work runs in Cursor's cloud, pushes a branch of its own and keeps running
48
+ when the client closes. Results name branches, PR links and artifact paths;
49
+ nothing is downloaded.
50
+
51
+ Creating a session is refused while the Cursor account's prepaid balance
52
+ is empty: top up or enable auto top-up. `usage_limit_exceeded` appears as
53
+ one plain line with Cursor's message.
54
+
55
+ Agent and Plan modes apply from the next prompt. Models have one entry
56
+ each, with separate parameter options; choosing a model starts outside
57
+ max mode when possible. Cursor's default is offered until a model is set.
58
+ Text, thinking, tool results and plans arrive as ACP updates. Cursor
59
+ requests for input or approval are text only; the adapter cannot answer
60
+ them. Cancel stops the run, with a warning if Cursor has not confirmed it
61
+ within 10 seconds. A lost connection ends the turn with the agent link.
62
+
63
+ In chord, `/resume` lists chord's records;
64
+ `chord cursor-cloud --resume bc-…` also reopens an agent started elsewhere.
65
+ The adapter replays the history Cursor provides. A run still going is
66
+ reported, not followed live; prompts are refused until it ends.
67
+ ACP `session/list` lists the account's cloud agents for the repository.
68
+ MCP servers are not forwarded: chord holds them back by default; servers
69
+ sent by another client are named unreachable in the first message.
70
+
71
+ ## Development
72
+
73
+ From the repository root, `bun install` installs the workspace.
74
+ `bun dev quality cursor-cloud-acp` checks types, tooling types, coverage,
75
+ lint and format, then runs tests, the build and a packed Node smoke.
76
+ `--static` leaves out tests, build and smoke. Tests use a fake Cursor and
77
+ keychain; the smoke installs dependencies but reaches neither Cursor nor
78
+ the keychain. The [guide](../../docs/guide.md#development) gives the offline
79
+ window fixture command.
80
+
81
+ The owner's `bun dev release cursor-cloud-acp` runs install, quality,
82
+ build, pack and publish, tags `cursor-cloud-acp-v<version>` and creates no
83
+ GitHub release. `@cursor/sdk` 1.3.1 is an external dependency, as are the
84
+ ACP SDK and keyring. The package bundles none of them; chord's binary
85
+ contains neither the Cursor SDK nor the keyring.
86
+
87
+ ## License
88
+
89
+ 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
+ });