@tickernelz/paperclip-pro-adapter-cursor-cloud 2026.925.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 +22 -0
- package/dist/cli/format-event.d.ts +2 -0
- package/dist/cli/format-event.d.ts.map +1 -0
- package/dist/cli/format-event.js +42 -0
- package/dist/cli/format-event.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/server/execute.d.ts +3 -0
- package/dist/server/execute.d.ts.map +1 -0
- package/dist/server/execute.js +564 -0
- package/dist/server/execute.js.map +1 -0
- package/dist/server/execute.test.d.ts +2 -0
- package/dist/server/execute.test.d.ts.map +1 -0
- package/dist/server/execute.test.js +426 -0
- package/dist/server/execute.test.js.map +1 -0
- package/dist/server/index.d.ts +6 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +68 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/session.d.ts +3 -0
- package/dist/server/session.d.ts.map +1 -0
- package/dist/server/session.js +61 -0
- package/dist/server/session.js.map +1 -0
- package/dist/server/session.test.d.ts +2 -0
- package/dist/server/session.test.d.ts.map +1 -0
- package/dist/server/session.test.js +28 -0
- package/dist/server/session.test.js.map +1 -0
- package/dist/server/test.d.ts +3 -0
- package/dist/server/test.d.ts.map +1 -0
- package/dist/server/test.js +111 -0
- package/dist/server/test.js.map +1 -0
- package/dist/ui/build-config.d.ts +3 -0
- package/dist/ui/build-config.d.ts.map +1 -0
- package/dist/ui/build-config.js +20 -0
- package/dist/ui/build-config.js.map +1 -0
- package/dist/ui/build-config.test.d.ts +2 -0
- package/dist/ui/build-config.test.d.ts.map +1 -0
- package/dist/ui/build-config.test.js +76 -0
- package/dist/ui/build-config.test.js.map +1 -0
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +3 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/parse-stdout.d.ts +3 -0
- package/dist/ui/parse-stdout.d.ts.map +1 -0
- package/dist/ui/parse-stdout.js +173 -0
- package/dist/ui/parse-stdout.js.map +1 -0
- package/dist/ui/parse-stdout.test.d.ts +2 -0
- package/dist/ui/parse-stdout.test.d.ts.map +1 -0
- package/dist/ui/parse-stdout.test.js +119 -0
- package/dist/ui/parse-stdout.test.js.map +1 -0
- package/package.json +58 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Paperclip AI
|
|
4
|
+
Copyright (c) 2026 Zhafron Adani Kautsar (paperclip-pro fork modifications)
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-event.d.ts","sourceRoot":"","sources":["../../src/cli/format-event.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAsCxE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import pc from "picocolors";
|
|
2
|
+
import { parseCursorCloudStdoutLine } from "../ui/parse-stdout.js";
|
|
3
|
+
export function printCursorCloudEvent(raw, _debug) {
|
|
4
|
+
const entries = parseCursorCloudStdoutLine(raw, new Date().toISOString());
|
|
5
|
+
for (const entry of entries) {
|
|
6
|
+
switch (entry.kind) {
|
|
7
|
+
case "assistant":
|
|
8
|
+
console.log(pc.green(`assistant: ${entry.text}`));
|
|
9
|
+
break;
|
|
10
|
+
case "thinking":
|
|
11
|
+
console.log(pc.gray(`thinking: ${entry.text}`));
|
|
12
|
+
break;
|
|
13
|
+
case "user":
|
|
14
|
+
console.log(pc.gray(`user: ${entry.text}`));
|
|
15
|
+
break;
|
|
16
|
+
case "tool_call":
|
|
17
|
+
console.log(pc.yellow(`tool_call: ${entry.name}`));
|
|
18
|
+
break;
|
|
19
|
+
case "tool_result":
|
|
20
|
+
console.log((entry.isError ? pc.red : pc.cyan)(entry.content || "tool result"));
|
|
21
|
+
break;
|
|
22
|
+
case "result":
|
|
23
|
+
console.log((entry.isError ? pc.red : pc.blue)(`result: ${entry.subtype}${entry.text ? ` - ${entry.text}` : ""}`));
|
|
24
|
+
break;
|
|
25
|
+
case "stderr":
|
|
26
|
+
console.error(pc.red(entry.text));
|
|
27
|
+
break;
|
|
28
|
+
case "system":
|
|
29
|
+
console.log(pc.blue(entry.text));
|
|
30
|
+
break;
|
|
31
|
+
case "init":
|
|
32
|
+
console.log(pc.blue(`Cursor Cloud init (${entry.sessionId})`));
|
|
33
|
+
break;
|
|
34
|
+
case "stdout":
|
|
35
|
+
console.log(entry.text);
|
|
36
|
+
break;
|
|
37
|
+
default:
|
|
38
|
+
console.log("text" in entry ? entry.text : JSON.stringify(entry));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=format-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-event.js","sourceRoot":"","sources":["../../src/cli/format-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,UAAU,qBAAqB,CAAC,GAAW,EAAE,MAAe;IAChE,MAAM,OAAO,GAAG,0BAA0B,CAAC,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1E,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,WAAW;gBACd,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;gBAClD,MAAM;YACR,KAAK,UAAU;gBACb,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;gBAChD,MAAM;YACR,KAAK,MAAM;gBACT,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;gBAC5C,MAAM;YACR,KAAK,WAAW;gBACd,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;gBACnD,MAAM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"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const type = "cursor_cloud";
|
|
2
|
+
export declare const label = "Cursor Cloud";
|
|
3
|
+
export declare const agentConfigurationDoc = "# cursor_cloud agent configuration\n\nAdapter: cursor_cloud\n\nUse when:\n- You want Paperclip to run Cursor Cloud Agents through the official Cursor SDK\n- You want durable remote Cursor agent sessions across Paperclip heartbeats\n- You want Paperclip to keep task state while Cursor handles remote code execution\n\nCore fields:\n- repoUrl (string, required): Git repository URL Cursor should open\n- repoStartingRef (string, optional): starting ref for the repo\n- repoPullRequestUrl (string, optional): PR URL to attach the agent to\n- runtimeEnvType (string, optional): cloud | pool | machine\n- runtimeEnvName (string, optional): named cloud/pool/machine target\n- workOnCurrentBranch (boolean, optional): continue work on current branch\n- autoCreatePR (boolean, optional): let Cursor auto-create a PR\n- skipReviewerRequest (boolean, optional): suppress reviewer request on auto-created PRs\n- instructionsFilePath (string, optional): agent instructions file prepended to the prompt\n- promptTemplate (string, optional): heartbeat prompt template\n- bootstrapPromptTemplate (string, optional): first-run-only bootstrap prompt template\n- model (string, optional): Cursor model id; omit to use the account default\n- env.CURSOR_API_KEY (string, required): Cursor API key\n- env.* (optional): additional env vars injected into the cloud agent shell\n\nNotes:\n- Paperclip reuses the durable Cursor agent across heartbeats when the repo/runtime identity still matches.\n- Each Paperclip heartbeat maps to a Cursor run on that durable agent.\n- Paperclip injects PAPERCLIP_* runtime env vars into the cloud agent shell through Cursor SDK cloud envVars.\n- Paperclip remains the source of truth for issue/task state; Cursor provides the remote execution surface.\n";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,iBAAiB,CAAC;AACnC,eAAO,MAAM,KAAK,iBAAiB,CAAC;AAEpC,eAAO,MAAM,qBAAqB,4uDA8BjC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const type = "cursor_cloud";
|
|
2
|
+
export const label = "Cursor Cloud";
|
|
3
|
+
export const agentConfigurationDoc = `# cursor_cloud agent configuration
|
|
4
|
+
|
|
5
|
+
Adapter: cursor_cloud
|
|
6
|
+
|
|
7
|
+
Use when:
|
|
8
|
+
- You want Paperclip to run Cursor Cloud Agents through the official Cursor SDK
|
|
9
|
+
- You want durable remote Cursor agent sessions across Paperclip heartbeats
|
|
10
|
+
- You want Paperclip to keep task state while Cursor handles remote code execution
|
|
11
|
+
|
|
12
|
+
Core fields:
|
|
13
|
+
- repoUrl (string, required): Git repository URL Cursor should open
|
|
14
|
+
- repoStartingRef (string, optional): starting ref for the repo
|
|
15
|
+
- repoPullRequestUrl (string, optional): PR URL to attach the agent to
|
|
16
|
+
- runtimeEnvType (string, optional): cloud | pool | machine
|
|
17
|
+
- runtimeEnvName (string, optional): named cloud/pool/machine target
|
|
18
|
+
- workOnCurrentBranch (boolean, optional): continue work on current branch
|
|
19
|
+
- autoCreatePR (boolean, optional): let Cursor auto-create a PR
|
|
20
|
+
- skipReviewerRequest (boolean, optional): suppress reviewer request on auto-created PRs
|
|
21
|
+
- instructionsFilePath (string, optional): agent instructions file prepended to the prompt
|
|
22
|
+
- promptTemplate (string, optional): heartbeat prompt template
|
|
23
|
+
- bootstrapPromptTemplate (string, optional): first-run-only bootstrap prompt template
|
|
24
|
+
- model (string, optional): Cursor model id; omit to use the account default
|
|
25
|
+
- env.CURSOR_API_KEY (string, required): Cursor API key
|
|
26
|
+
- env.* (optional): additional env vars injected into the cloud agent shell
|
|
27
|
+
|
|
28
|
+
Notes:
|
|
29
|
+
- Paperclip reuses the durable Cursor agent across heartbeats when the repo/runtime identity still matches.
|
|
30
|
+
- Each Paperclip heartbeat maps to a Cursor run on that durable agent.
|
|
31
|
+
- Paperclip injects PAPERCLIP_* runtime env vars into the cloud agent shell through Cursor SDK cloud envVars.
|
|
32
|
+
- Paperclip remains the source of truth for issue/task state; Cursor provides the remote execution surface.
|
|
33
|
+
`;
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG,cAAc,CAAC;AACnC,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,CAAC;AAEpC,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/server/execute.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAyB,MAAM,yCAAyC,CAAC;AA8UtI,wBAAsB,OAAO,CAAC,GAAG,EAAE,uBAAuB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAmT3F"}
|