@phantomagent/adapter-paperclip-cursor 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/README.md +61 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +18 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/ui-parser.d.ts +1 -0
- package/dist/ui-parser.js +1 -0
- package/package.json +55 -0
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Cursor (Phantom Agent) — Paperclip facade adapter
|
|
2
|
+
|
|
3
|
+
**Adapter type:** `phantom_cursor`
|
|
4
|
+
**UI label:** **Cursor (Phantom Agent)**
|
|
5
|
+
**Runtime:** fixed `cursor-agent` on Phantom workers (not local Cursor)
|
|
6
|
+
|
|
7
|
+
## Install in Paperclip
|
|
8
|
+
|
|
9
|
+
Use npm from **Settings → Plugins** / **Settings → Adapters**:
|
|
10
|
+
|
|
11
|
+
| Step | Package |
|
|
12
|
+
|------|---------|
|
|
13
|
+
| 1. Plugin | `@phantomagent/plugin-paperclip` |
|
|
14
|
+
| 2. Facade adapter | `@phantomagent/adapter-paperclip-cursor` |
|
|
15
|
+
|
|
16
|
+
Configure credentials in the plugin settings, **Sync capabilities**, restart CP after adapter install, then pick **Cursor (Phantom Agent)** on agents.
|
|
17
|
+
|
|
18
|
+
### Local path (development)
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
cd integrations
|
|
22
|
+
npm install
|
|
23
|
+
npm run build -w @phantomagent/plugin-paperclip
|
|
24
|
+
paperclipai plugin install /path/to/integrations/packages/plugin-paperclip
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Configure Phantom API URL + ApplicationClient credentials in **Settings → Plugins → Phantom Agent**, then **Sync capabilities**.
|
|
28
|
+
|
|
29
|
+
### Facade adapter
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm run build -w @phantomagent/adapter-paperclip-cursor
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Paperclip → **Settings → Adapters → Install External Adapter** — npm: `@phantomagent/adapter-paperclip-cursor` (or local path for dev).
|
|
36
|
+
|
|
37
|
+
Adapter config (same ApplicationClient credentials as the plugin):
|
|
38
|
+
|
|
39
|
+
| Field | Value |
|
|
40
|
+
|-------|-------|
|
|
41
|
+
| Phantom API URL | `https://api.phantomagent.io` |
|
|
42
|
+
| Application client ID | e.g. `paperclip-staging` |
|
|
43
|
+
| Application client secret | from Phantom Applications → Credentials |
|
|
44
|
+
|
|
45
|
+
## Do not use
|
|
46
|
+
|
|
47
|
+
| Adapter | Why |
|
|
48
|
+
|---------|-----|
|
|
49
|
+
| **Cursor** (built-in) | Local Cursor on Paperclip host — not Phantom |
|
|
50
|
+
| **`phantom_runner`** (built-in) | Legacy smoke — being retired after RVA migration |
|
|
51
|
+
| **`phantom_agent`** (deprecated) | Opaque slug field, no runtime picker — use facades |
|
|
52
|
+
|
|
53
|
+
## Verify
|
|
54
|
+
|
|
55
|
+
One wake → Phantom Executions shows new `run_id`, log contains:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
[phantom-agent] delegating heartbeat to Phantom (runtime=cursor-agent, auth=application_jwt, no local agent spawn)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
See [TASK_PHANTOM_RUNTIME_FACADE_V1.md](../../paperclip/TASK_PHANTOM_RUNTIME_FACADE_V1.md).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const CURSOR_RUNTIME_SLUG = "cursor-agent";
|
|
2
|
+
export declare const type: string, label: string, agentRuntimeSlug: string, models: import("@paperclipai/adapter-utils").AdapterModel[], agentConfigurationDoc: string, createServerAdapter: () => import("@paperclipai/adapter-utils").ServerAdapterModule;
|
|
3
|
+
export { CURSOR_RUNTIME_SLUG };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createPhantomFacadeExports } from "@phantomagent/adapter-core";
|
|
2
|
+
const CURSOR_RUNTIME_SLUG = "cursor-agent";
|
|
3
|
+
export const { type, label, agentRuntimeSlug, models, agentConfigurationDoc, createServerAdapter } = createPhantomFacadeExports({
|
|
4
|
+
type: "phantom_cursor",
|
|
5
|
+
label: "Cursor (Phantom Agent)",
|
|
6
|
+
agentRuntimeSlug: CURSOR_RUNTIME_SLUG,
|
|
7
|
+
});
|
|
8
|
+
export { CURSOR_RUNTIME_SLUG };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { createServerAdapter, label, type, agentRuntimeSlug } from "./index.js";
|
|
3
|
+
describe("@phantomagent/adapter-paperclip-cursor", () => {
|
|
4
|
+
it("exports phantom_cursor facade metadata", () => {
|
|
5
|
+
expect(type).toBe("phantom_cursor");
|
|
6
|
+
expect(label).toBe("Cursor (Phantom Agent)");
|
|
7
|
+
expect(agentRuntimeSlug).toBe("cursor-agent");
|
|
8
|
+
});
|
|
9
|
+
it("creates a valid server adapter module", async () => {
|
|
10
|
+
const adapter = createServerAdapter();
|
|
11
|
+
expect(adapter.type).toBe("phantom_cursor");
|
|
12
|
+
expect(typeof adapter.execute).toBe("function");
|
|
13
|
+
expect(typeof adapter.testEnvironment).toBe("function");
|
|
14
|
+
expect(typeof adapter.getConfigSchema).toBe("function");
|
|
15
|
+
const schema = await Promise.resolve(adapter.getConfigSchema?.());
|
|
16
|
+
expect(schema?.fields.some((field) => field.key === "agentRuntimeSlug")).toBe(false);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createServerAdapter } from "../index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createServerAdapter } from "../index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { parseStdoutLine } from "@phantomagent/adapter-core/ui-parser";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { parseStdoutLine } from "@phantomagent/adapter-core/ui-parser";
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@phantomagent/adapter-paperclip-cursor",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Paperclip facade adapter — Cursor (Phantom Agent) with fixed cursor-agent runtime",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Phantom Organization",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/PhantomOrganization/integrations",
|
|
10
|
+
"directory": "packages/adapter-paperclip-cursor"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"paperclip": {
|
|
14
|
+
"adapterUiParser": "1.0.0"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./server": {
|
|
22
|
+
"types": "./dist/server/index.d.ts",
|
|
23
|
+
"import": "./dist/server/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./ui-parser": {
|
|
26
|
+
"types": "./dist/ui-parser.d.ts",
|
|
27
|
+
"import": "./dist/ui-parser.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"main": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"README.md"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc",
|
|
41
|
+
"prepublishOnly": "npm run build",
|
|
42
|
+
"clean": "rm -rf dist",
|
|
43
|
+
"typecheck": "tsc --noEmit",
|
|
44
|
+
"test": "vitest run"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@paperclipai/adapter-utils": "^2026.626.0",
|
|
48
|
+
"@phantomagent/adapter-core": "0.1.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^22.19.21",
|
|
52
|
+
"typescript": "^5.7.3",
|
|
53
|
+
"vitest": "^3.2.4"
|
|
54
|
+
}
|
|
55
|
+
}
|