@rama_nigg/open-cursor 2.4.4 → 2.4.6
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 +2 -0
- package/dist/cli/discover.js +9 -0
- package/dist/cli/opencode-cursor.js +9 -0
- package/dist/index.js +335 -301
- package/dist/plugin-entry.js +318 -264
- package/package.json +1 -1
- package/src/auth.ts +2 -2
- package/src/client/simple.ts +3 -3
- package/src/mcp/tool-bridge.ts +4 -2
- package/src/plugin.ts +118 -181
- package/src/provider/runtime-interception.ts +40 -5
- package/src/provider/tool-schema-compat.ts +180 -2
- package/src/proxy/prompt-builder.ts +4 -35
- package/src/streaming/ai-sdk-parts.ts +8 -30
- package/src/streaming/delta-tracker.ts +42 -0
- package/src/streaming/openai-sse.ts +8 -33
- package/src/tools/defaults.ts +0 -4
- package/src/utils/binary.ts +17 -3
package/README.md
CHANGED
|
@@ -147,6 +147,8 @@ opencode run "your prompt" --model cursor-acp/sonnet-4.5
|
|
|
147
147
|
|
|
148
148
|
Any MCP servers already configured in your `opencode.json` work automatically with cursor-acp models — no extra setup needed. The plugin discovers them at startup and injects usage instructions into the system prompt so the model calls them via cursor-agent's Shell tool.
|
|
149
149
|
|
|
150
|
+
`mcptool` is a shell CLI, so opencode applies your `bash` permission rules to `mcptool call ...`. If you rely on MCP tools asking for confirmation, keep `bash` as `ask` or add explicit `ask`/`deny` rules for `mcptool call *`.
|
|
151
|
+
|
|
150
152
|
```bash
|
|
151
153
|
mcptool servers # list discovered servers
|
|
152
154
|
mcptool tools [server] # list available tools
|
package/dist/cli/discover.js
CHANGED
|
@@ -298,6 +298,15 @@ function resolveCursorAgentBinary(deps = {}) {
|
|
|
298
298
|
log.warn("cursor-agent not found at known paths, falling back to PATH", { checkedPaths: knownPaths });
|
|
299
299
|
return "cursor-agent";
|
|
300
300
|
}
|
|
301
|
+
function formatShellCommandForPlatform(command, platform = process.platform) {
|
|
302
|
+
if (platform !== "win32") {
|
|
303
|
+
return command;
|
|
304
|
+
}
|
|
305
|
+
if (command.startsWith('"') && command.endsWith('"')) {
|
|
306
|
+
return command;
|
|
307
|
+
}
|
|
308
|
+
return `"${command}"`;
|
|
309
|
+
}
|
|
301
310
|
var log;
|
|
302
311
|
var init_binary = __esm(() => {
|
|
303
312
|
init_logger();
|
|
@@ -298,6 +298,15 @@ function resolveCursorAgentBinary(deps = {}) {
|
|
|
298
298
|
log.warn("cursor-agent not found at known paths, falling back to PATH", { checkedPaths: knownPaths });
|
|
299
299
|
return "cursor-agent";
|
|
300
300
|
}
|
|
301
|
+
function formatShellCommandForPlatform(command, platform = process.platform) {
|
|
302
|
+
if (platform !== "win32") {
|
|
303
|
+
return command;
|
|
304
|
+
}
|
|
305
|
+
if (command.startsWith('"') && command.endsWith('"')) {
|
|
306
|
+
return command;
|
|
307
|
+
}
|
|
308
|
+
return `"${command}"`;
|
|
309
|
+
}
|
|
301
310
|
var log;
|
|
302
311
|
var init_binary = __esm(() => {
|
|
303
312
|
init_logger();
|