pi-cursor-bridge 0.2.3 → 0.2.4-macos.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 +4 -4
- package/dist/cursor-bridge.mjs +9 -3
- package/dist/cursor-lifecycle-supervisor.mjs +10 -3
- package/extensions/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Use Cursor's project index and Agent search from Pi, with compact `path:line` evidence and optional bounded Cursor task execution.
|
|
4
4
|
|
|
5
|
-
⭐ If Cursor Bridge helps you, please consider giving it a
|
|
5
|
+
⭐ If Cursor Bridge helps you, please consider giving it a Star on GitHub—it helps others discover the project.
|
|
6
6
|
|
|
7
7
|
```powershell
|
|
8
|
-
pi install npm:pi-cursor-bridge
|
|
8
|
+
pi install npm:pi-cursor-bridge@0.2.4-macos.0
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Restart Pi after installation. Initialize the current project by asking Pi to initialize Cursor Bridge for the absolute project path, then use it normally. The package includes the `cce-routing` and `cursor-delegate` Skills and registers the native Cursor Bridge MCP tools directly in Pi.
|
|
11
|
+
This is a macOS CDP identity trial. It does not replace the stable `pi-cursor-bridge@0.2.3` release. Restart Pi after installation. Initialize the current project by asking Pi to initialize Cursor Bridge for the absolute project path, then use it normally. The package includes the `cce-routing` and `cursor-delegate` Skills and registers the native Cursor Bridge MCP tools directly in Pi.
|
|
12
12
|
|
|
13
|
-
Pi wrapper 0.2.
|
|
13
|
+
Pi wrapper 0.2.4-macos.0 embeds Cursor Bridge 6.0.3 plus the macOS `Cursor.app` CDP identity matcher. `cursor_status.pluginVersion` may still report `6.0.3`. Confirm the installed wrapper is `0.2.4-macos.0`. Its result contract returns a compact receipt for background `cursor_do` work: poll `cursor_status(task_id)` normally, retrieve the terminal raw reply with `cursor_status(task_id, detail="result")`, check `isError` before using its content, and use `detail="full"` only when diagnostics are needed. Cursor must be installed and signed in. Current end-to-end compatibility claims remain scoped to the environments documented in the main repository.
|
|
14
14
|
|
|
15
15
|
Full documentation: [English](https://github.com/Vanyangyang/cursor-bridge#readme) · [简体中文](https://github.com/Vanyangyang/cursor-bridge/blob/main/README.zh-CN.md)
|
package/dist/cursor-bridge.mjs
CHANGED
|
@@ -11618,6 +11618,11 @@ function cdpUp(timeoutMs = 1500) {
|
|
|
11618
11618
|
});
|
|
11619
11619
|
});
|
|
11620
11620
|
}
|
|
11621
|
+
function cdpListIsCursor(payload) {
|
|
11622
|
+
const d = typeof payload === "string" ? payload : payload == null ? "" : JSON.stringify(payload);
|
|
11623
|
+
if (WINDSURF_CDP_PATH.test(d)) return false;
|
|
11624
|
+
return CURSOR_CDP_PATH.test(d);
|
|
11625
|
+
}
|
|
11621
11626
|
function cdpIsCursor(timeoutMs = 1500) {
|
|
11622
11627
|
return new Promise((resolve9) => {
|
|
11623
11628
|
const req = http.get({ host: CDP_HOST, port: CDP_PORT, path: "/json/list" }, (res) => {
|
|
@@ -11625,8 +11630,7 @@ function cdpIsCursor(timeoutMs = 1500) {
|
|
|
11625
11630
|
res.on("data", (c) => d += c);
|
|
11626
11631
|
res.on("end", () => {
|
|
11627
11632
|
try {
|
|
11628
|
-
|
|
11629
|
-
resolve9(/[\/\\]cursor[\/\\](resources|app)|cursor\.exe|vscode-app[^"]*[\/\\]cursor[\/\\]/i.test(d));
|
|
11633
|
+
resolve9(cdpListIsCursor(d));
|
|
11630
11634
|
} catch {
|
|
11631
11635
|
resolve9(false);
|
|
11632
11636
|
}
|
|
@@ -12115,7 +12119,7 @@ async function waitForProjectCdpTarget(maxMs, projectPath, listImpl = listCdpPag
|
|
|
12115
12119
|
}
|
|
12116
12120
|
return null;
|
|
12117
12121
|
}
|
|
12118
|
-
var CDP_PORT, CDP_ORIGIN, CDP_HOST, PROJECT_TARGETS, CODEX_THREAD_PROJECTS, loadModule;
|
|
12122
|
+
var CDP_PORT, CDP_ORIGIN, CDP_HOST, PROJECT_TARGETS, CODEX_THREAD_PROJECTS, loadModule, WINDSURF_CDP_PATH, CURSOR_CDP_PATH;
|
|
12119
12123
|
var init_cursor_ensure_core = __esm({
|
|
12120
12124
|
"cursor-ensure-core.mjs"() {
|
|
12121
12125
|
init_cursor_startup_window();
|
|
@@ -12126,6 +12130,8 @@ var init_cursor_ensure_core = __esm({
|
|
|
12126
12130
|
PROJECT_TARGETS = /* @__PURE__ */ new Map();
|
|
12127
12131
|
CODEX_THREAD_PROJECTS = /* @__PURE__ */ new Map();
|
|
12128
12132
|
loadModule = createNodeRequire(import.meta.url);
|
|
12133
|
+
WINDSURF_CDP_PATH = /[\/\\](windsurf)[\/\\]/i;
|
|
12134
|
+
CURSOR_CDP_PATH = /[\/\\]cursor[\/\\](resources|app)|cursor\.exe|vscode-app[^"]*[\/\\]cursor[\/\\]|[\/\\]cursor\.app[\/\\]contents[\/\\]resources[\/\\]app[\/\\]/i;
|
|
12129
12135
|
}
|
|
12130
12136
|
});
|
|
12131
12137
|
|
|
@@ -4104,6 +4104,7 @@ __export(cursor_ensure_core_exports, {
|
|
|
4104
4104
|
CDP_ORIGIN: () => CDP_ORIGIN,
|
|
4105
4105
|
CDP_PORT: () => CDP_PORT,
|
|
4106
4106
|
cdpIsCursor: () => cdpIsCursor,
|
|
4107
|
+
cdpListIsCursor: () => cdpListIsCursor,
|
|
4107
4108
|
cdpUp: () => cdpUp,
|
|
4108
4109
|
cursorRunning: () => cursorRunning,
|
|
4109
4110
|
ensureCursorRunningLocal: () => ensureCursorRunningLocal,
|
|
@@ -4298,6 +4299,11 @@ function cdpUp(timeoutMs = 1500) {
|
|
|
4298
4299
|
});
|
|
4299
4300
|
});
|
|
4300
4301
|
}
|
|
4302
|
+
function cdpListIsCursor(payload) {
|
|
4303
|
+
const d = typeof payload === "string" ? payload : payload == null ? "" : JSON.stringify(payload);
|
|
4304
|
+
if (WINDSURF_CDP_PATH.test(d)) return false;
|
|
4305
|
+
return CURSOR_CDP_PATH.test(d);
|
|
4306
|
+
}
|
|
4301
4307
|
function cdpIsCursor(timeoutMs = 1500) {
|
|
4302
4308
|
return new Promise((resolve4) => {
|
|
4303
4309
|
const req = http.get({ host: CDP_HOST, port: CDP_PORT, path: "/json/list" }, (res) => {
|
|
@@ -4305,8 +4311,7 @@ function cdpIsCursor(timeoutMs = 1500) {
|
|
|
4305
4311
|
res.on("data", (c) => d += c);
|
|
4306
4312
|
res.on("end", () => {
|
|
4307
4313
|
try {
|
|
4308
|
-
|
|
4309
|
-
resolve4(/[\/\\]cursor[\/\\](resources|app)|cursor\.exe|vscode-app[^"]*[\/\\]cursor[\/\\]/i.test(d));
|
|
4314
|
+
resolve4(cdpListIsCursor(d));
|
|
4310
4315
|
} catch {
|
|
4311
4316
|
resolve4(false);
|
|
4312
4317
|
}
|
|
@@ -4795,7 +4800,7 @@ async function waitForProjectCdpTarget(maxMs, projectPath, listImpl = listCdpPag
|
|
|
4795
4800
|
}
|
|
4796
4801
|
return null;
|
|
4797
4802
|
}
|
|
4798
|
-
var CDP_PORT, CDP_ORIGIN, CDP_HOST, PROJECT_TARGETS, CODEX_THREAD_PROJECTS, loadModule;
|
|
4803
|
+
var CDP_PORT, CDP_ORIGIN, CDP_HOST, PROJECT_TARGETS, CODEX_THREAD_PROJECTS, loadModule, WINDSURF_CDP_PATH, CURSOR_CDP_PATH;
|
|
4799
4804
|
var init_cursor_ensure_core = __esm({
|
|
4800
4805
|
"cursor-ensure-core.mjs"() {
|
|
4801
4806
|
init_cursor_startup_window();
|
|
@@ -4806,6 +4811,8 @@ var init_cursor_ensure_core = __esm({
|
|
|
4806
4811
|
PROJECT_TARGETS = /* @__PURE__ */ new Map();
|
|
4807
4812
|
CODEX_THREAD_PROJECTS = /* @__PURE__ */ new Map();
|
|
4808
4813
|
loadModule = createNodeRequire(import.meta.url);
|
|
4814
|
+
WINDSURF_CDP_PATH = /[\/\\](windsurf)[\/\\]/i;
|
|
4815
|
+
CURSOR_CDP_PATH = /[\/\\]cursor[\/\\](resources|app)|cursor\.exe|vscode-app[^"]*[\/\\]cursor[\/\\]|[\/\\]cursor\.app[\/\\]contents[\/\\]resources[\/\\]app[\/\\]/i;
|
|
4809
4816
|
}
|
|
4810
4817
|
});
|
|
4811
4818
|
|
package/extensions/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ const hostWorkspaceId = hostCwd.replace(/\\/g, "/").toLowerCase();
|
|
|
10
10
|
export default createStdioMcpExtension({
|
|
11
11
|
label: "Cursor Bridge",
|
|
12
12
|
clientName: "pi-cursor-bridge",
|
|
13
|
-
packageVersion: "0.2.
|
|
13
|
+
packageVersion: "0.2.4-macos.0",
|
|
14
14
|
serverName: "cursor-bridge",
|
|
15
15
|
serverScript: join(packageRoot, "dist", "cursor-bridge.mjs"),
|
|
16
16
|
cwd: hostCwd,
|
package/package.json
CHANGED