pi-cursor-bridge 0.1.13 → 0.1.15
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/.codex-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/dist/cursor-bridge.mjs +39 -9
- package/extensions/index.ts +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cursor-bridge",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.1+codex.20260905095629",
|
|
4
4
|
"description": "Evidence-backed Cursor Context Engine search and bounded Cursor Agent execution, including a UI-suppressed minimal runtime.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Vanyangyang"
|
package/README.md
CHANGED
|
@@ -10,6 +10,6 @@ pi install npm:pi-cursor-bridge
|
|
|
10
10
|
|
|
11
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.
|
|
12
12
|
|
|
13
|
-
This Pi package embeds Cursor Bridge 5.9.
|
|
13
|
+
This Pi package embeds Cursor Bridge 5.9.1. 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
|
@@ -22604,7 +22604,7 @@ function updateCursorSessionRegistry(filePath, mutator, options = {}) {
|
|
|
22604
22604
|
// server.mjs
|
|
22605
22605
|
init_cursor_ensure_core();
|
|
22606
22606
|
init_lifecycle_paths();
|
|
22607
|
-
var PLUGIN_VERSION = "5.9.
|
|
22607
|
+
var PLUGIN_VERSION = "5.9.1";
|
|
22608
22608
|
var CDP_PORT2 = Number(process.env.CURSOR_BRIDGE_CDP_PORT || 9223);
|
|
22609
22609
|
var ORIGIN = `http://localhost:${CDP_PORT2}`;
|
|
22610
22610
|
var QUERY_TIMEOUT = Number(process.env.CURSOR_BRIDGE_TIMEOUT || 3e5);
|
|
@@ -23116,8 +23116,22 @@ var EXPR_MODEL_PICKER_TRIGGER = `(function(){
|
|
|
23116
23116
|
const detail=String(trigger.querySelector('.ui-model-picker__trigger-variant-suffix,.vscode-model-picker__trigger-variant-suffix')?.innerText||'').replace(/\\s+/g,' ').trim();
|
|
23117
23117
|
return JSON.stringify({found:true,state:'ready',text,detail,x:Math.round(rect.x+rect.width/2),y:Math.round(rect.y+rect.height/2)});
|
|
23118
23118
|
})()`;
|
|
23119
|
+
function classifyModelPickerRowKind(text, hasItemName, menuTestId, submenuTestId, ariaHaspopup, hasParamCheck, inSubmenu) {
|
|
23120
|
+
const menu = String(menuTestId || "").toLowerCase();
|
|
23121
|
+
const submenu = String(submenuTestId || "").toLowerCase();
|
|
23122
|
+
const haystack = menu + " " + submenu;
|
|
23123
|
+
if (hasItemName) return "model";
|
|
23124
|
+
if (/^model(?:\s|$)/i.test(String(text || "")) && ariaHaspopup === "menu") return "model_control";
|
|
23125
|
+
if (/^effort(?:\s|$)/i.test(String(text || "")) && ariaHaspopup === "menu") return "effort_control";
|
|
23126
|
+
if (haystack.includes("parameter-submenu") || hasParamCheck) return "parameter";
|
|
23127
|
+
if (/^add models$/i.test(String(text || "").trim())) return "control";
|
|
23128
|
+
if (haystack.includes("model-list") || haystack.includes("model-picker-menu") || haystack.includes("model-selection")) return "model";
|
|
23129
|
+
if (inSubmenu) return "parameter";
|
|
23130
|
+
return "control";
|
|
23131
|
+
}
|
|
23119
23132
|
var EXPR_MODEL_PICKER_ROWS = `(function(){
|
|
23120
23133
|
${MODEL_PICKER_VISIBLE_BODY}
|
|
23134
|
+
${classifyModelPickerRowKind.toString()}
|
|
23121
23135
|
const menus=[...document.querySelectorAll('[data-testid="model-picker-menu"],[data-testid*="model-parameters"],[data-testid*="parameter-submenu"],[data-component="menu-popup"][data-submenu]')].filter(visible);
|
|
23122
23136
|
const rows=[];
|
|
23123
23137
|
const seen=new Set();
|
|
@@ -23128,13 +23142,18 @@ var EXPR_MODEL_PICKER_ROWS = `(function(){
|
|
|
23128
23142
|
const rect=row.getBoundingClientRect();
|
|
23129
23143
|
const text=String(row.innerText||row.textContent||'').replace(/\\s+/g,' ').trim();
|
|
23130
23144
|
if(!text)continue;
|
|
23131
|
-
const menuTestId=String(menu.getAttribute('data-testid')||'')
|
|
23132
|
-
|
|
23133
|
-
|
|
23134
|
-
|
|
23135
|
-
|
|
23136
|
-
|
|
23137
|
-
|
|
23145
|
+
const menuTestId=String(menu.getAttribute('data-testid')||'');
|
|
23146
|
+
const submenuRoot=row.closest('[data-submenu],[data-testid*="parameter-submenu"],[data-testid*="model-list"]');
|
|
23147
|
+
const submenuTestId=String((submenuRoot&&submenuRoot.getAttribute('data-testid'))||'');
|
|
23148
|
+
const kind=classifyModelPickerRowKind(
|
|
23149
|
+
text,
|
|
23150
|
+
!!row.querySelector('.ui-model-picker__item-content-name,.vscode-model-picker__item-content-name'),
|
|
23151
|
+
menuTestId,
|
|
23152
|
+
submenuTestId,
|
|
23153
|
+
row.getAttribute('aria-haspopup'),
|
|
23154
|
+
!!row.querySelector('.ui-model-picker__param-check,.vscode-model-picker__param-check'),
|
|
23155
|
+
!!row.closest('[data-submenu]')
|
|
23156
|
+
);
|
|
23138
23157
|
rows.push({
|
|
23139
23158
|
text,
|
|
23140
23159
|
kind,
|
|
@@ -23152,6 +23171,14 @@ var EXPR_MODEL_PICKER_ROWS = `(function(){
|
|
|
23152
23171
|
function normalizeModelPickerText(value) {
|
|
23153
23172
|
return String(value || "").trim().toLowerCase().replace(/extra[\s_-]*high/g, "xhigh").replace(/[^a-z0-9]+/g, "");
|
|
23154
23173
|
}
|
|
23174
|
+
function isCursorEffortOptionText(text) {
|
|
23175
|
+
return CURSOR_MODEL_EFFORTS.includes(normalizeModelPickerText(text));
|
|
23176
|
+
}
|
|
23177
|
+
function modelPickerAvailableIsDecisive(kind, available) {
|
|
23178
|
+
if (!Array.isArray(available) || available.length === 0) return false;
|
|
23179
|
+
if (kind !== "parameter") return true;
|
|
23180
|
+
return available.some((text) => isCursorEffortOptionText(text));
|
|
23181
|
+
}
|
|
23155
23182
|
function selectModelPickerRow(rows, requested, kind = "model") {
|
|
23156
23183
|
const wanted = normalizeModelPickerText(requested);
|
|
23157
23184
|
if (!wanted) return null;
|
|
@@ -25063,7 +25090,7 @@ var CursorBridge = class {
|
|
|
25063
25090
|
last = this._inspectModelPickerRows(await this._readModelPickerRows(c), requested, kind);
|
|
25064
25091
|
if (last.row) return { ...last, state: "matched" };
|
|
25065
25092
|
const signature = JSON.stringify(last.available);
|
|
25066
|
-
if (last.available
|
|
25093
|
+
if (modelPickerAvailableIsDecisive(kind, last.available)) {
|
|
25067
25094
|
if (signature !== stableSignature) {
|
|
25068
25095
|
stableSignature = signature;
|
|
25069
25096
|
stableSince = Date.now();
|
|
@@ -26967,6 +26994,7 @@ export {
|
|
|
26967
26994
|
buildContextEnginePrompt,
|
|
26968
26995
|
buildToolDefinitions,
|
|
26969
26996
|
classifyChatPanelDiagnostic,
|
|
26997
|
+
classifyModelPickerRowKind,
|
|
26970
26998
|
classifyParallelTerminalIcon,
|
|
26971
26999
|
createChatPanelUnavailableError,
|
|
26972
27000
|
createProviderError,
|
|
@@ -26977,10 +27005,12 @@ export {
|
|
|
26977
27005
|
exprInspectWorkspaceRepository,
|
|
26978
27006
|
exprOpenAgent,
|
|
26979
27007
|
isConfirmedCompletedReply,
|
|
27008
|
+
isCursorEffortOptionText,
|
|
26980
27009
|
isDurablyRegisteredParallelEntry,
|
|
26981
27010
|
isSessionTurnReplyReady,
|
|
26982
27011
|
isTargetedStopConfirmed,
|
|
26983
27012
|
lifecycleFailureSummary,
|
|
27013
|
+
modelPickerAvailableIsDecisive,
|
|
26984
27014
|
normalizeAllowedPath,
|
|
26985
27015
|
normalizeCceSearchResult,
|
|
26986
27016
|
normalizeCursorModelEffort,
|
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.1.
|
|
13
|
+
packageVersion: "0.1.15",
|
|
14
14
|
serverName: "cursor-bridge",
|
|
15
15
|
serverScript: join(packageRoot, "dist", "cursor-bridge.mjs"),
|
|
16
16
|
cwd: hostCwd,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-cursor-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "Use Cursor Context Engine and bounded, explicitly continuous Cursor Agent execution from the Pi coding agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
},
|
|
48
48
|
"piPackage": {
|
|
49
49
|
"embeddedProduct": "Cursor Bridge",
|
|
50
|
-
"embeddedProductVersion": "5.9.
|
|
50
|
+
"embeddedProductVersion": "5.9.1"
|
|
51
51
|
}
|
|
52
52
|
}
|