@rama_nigg/open-cursor 2.4.1 → 2.4.2
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.
|
@@ -377,6 +377,7 @@ import {
|
|
|
377
377
|
existsSync as existsSync2,
|
|
378
378
|
lstatSync,
|
|
379
379
|
mkdirSync as mkdirSync2,
|
|
380
|
+
realpathSync,
|
|
380
381
|
readFileSync,
|
|
381
382
|
rmSync,
|
|
382
383
|
symlinkSync,
|
|
@@ -1634,13 +1635,33 @@ function main() {
|
|
|
1634
1635
|
process.exit(1);
|
|
1635
1636
|
}
|
|
1636
1637
|
}
|
|
1637
|
-
|
|
1638
|
+
function resolveEntrypointArg(argvPath) {
|
|
1639
|
+
if (!argvPath)
|
|
1640
|
+
return "";
|
|
1641
|
+
return resolve(argvPath);
|
|
1642
|
+
}
|
|
1643
|
+
function toRealPath(path2) {
|
|
1644
|
+
try {
|
|
1645
|
+
return realpathSync(path2);
|
|
1646
|
+
} catch {
|
|
1647
|
+
return path2;
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
function isCliEntrypoint(metaUrl, argvPath) {
|
|
1651
|
+
const currentPath = fileURLToPath(metaUrl);
|
|
1652
|
+
const argvResolved = resolveEntrypointArg(argvPath);
|
|
1653
|
+
if (!argvResolved)
|
|
1654
|
+
return false;
|
|
1655
|
+
return currentPath === argvResolved || toRealPath(currentPath) === toRealPath(argvResolved);
|
|
1656
|
+
}
|
|
1657
|
+
if (isCliEntrypoint(import.meta.url, process.argv[1])) {
|
|
1638
1658
|
main();
|
|
1639
1659
|
}
|
|
1640
1660
|
export {
|
|
1641
1661
|
summarizeModelSync,
|
|
1642
1662
|
runDoctorChecks,
|
|
1643
1663
|
runDeepDoctorChecks,
|
|
1664
|
+
isCliEntrypoint,
|
|
1644
1665
|
getStatusResult,
|
|
1645
1666
|
getBrandingHeader,
|
|
1646
1667
|
explainCursorModels,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rama_nigg/open-cursor",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "No prompt limits. No broken streams. Full thinking + tool support. Your Cursor subscription, properly integrated.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/plugin-entry.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"test": "bun test",
|
|
12
12
|
"test:unit": "bun test tests/unit",
|
|
13
13
|
"test:integration": "bun test tests/integration",
|
|
14
|
-
"test:ci:unit": "bun test tests/tools/defaults.test.ts tests/tools/executor-chain.test.ts tests/tools/sdk-executor.test.ts tests/tools/mcp-executor.test.ts tests/tools/skills.test.ts tests/tools/registry.test.ts tests/unit/cli/model-discovery.test.ts tests/unit/proxy/prompt-builder.test.ts tests/unit/proxy/tool-loop.test.ts tests/unit/provider-boundary.test.ts tests/unit/provider-runtime-interception.test.ts tests/unit/provider-tool-schema-compat.test.ts tests/unit/provider-tool-loop-guard.test.ts tests/unit/plugin.test.ts tests/unit/plugin-tools-hook.test.ts tests/unit/plugin-tool-resolution.test.ts tests/unit/plugin-config.test.ts tests/unit/plugin-stream-extraction.test.ts tests/unit/auth.test.ts tests/unit/streaming/line-buffer.test.ts tests/unit/streaming/parser.test.ts tests/unit/streaming/types.test.ts tests/unit/streaming/delta-tracker.test.ts tests/unit/streaming/openai-sse.test.ts tests/unit/streaming/ai-sdk-parts.test.ts tests/competitive/edge.test.ts",
|
|
14
|
+
"test:ci:unit": "bun test tests/tools/defaults.test.ts tests/tools/executor-chain.test.ts tests/tools/sdk-executor.test.ts tests/tools/mcp-executor.test.ts tests/tools/skills.test.ts tests/tools/registry.test.ts tests/unit/cli/opencode-cursor.test.ts tests/unit/cli/model-discovery.test.ts tests/unit/proxy/prompt-builder.test.ts tests/unit/proxy/tool-loop.test.ts tests/unit/provider-boundary.test.ts tests/unit/provider-runtime-interception.test.ts tests/unit/provider-tool-schema-compat.test.ts tests/unit/provider-tool-loop-guard.test.ts tests/unit/plugin.test.ts tests/unit/plugin-tools-hook.test.ts tests/unit/plugin-tool-resolution.test.ts tests/unit/plugin-config.test.ts tests/unit/plugin-stream-extraction.test.ts tests/unit/auth.test.ts tests/unit/streaming/line-buffer.test.ts tests/unit/streaming/parser.test.ts tests/unit/streaming/types.test.ts tests/unit/streaming/delta-tracker.test.ts tests/unit/streaming/openai-sse.test.ts tests/unit/streaming/ai-sdk-parts.test.ts tests/competitive/edge.test.ts",
|
|
15
15
|
"test:ci:integration": "bun test tests/integration/comprehensive.test.ts tests/integration/tools-router.integration.test.ts tests/integration/stream-router.integration.test.ts tests/integration/opencode-loop.integration.test.ts",
|
|
16
16
|
"check:pricing": "bun run scripts/check-cursor-pricing-coverage.ts",
|
|
17
17
|
"check:pricing:fixture": "bun run scripts/check-cursor-pricing-coverage.ts --models-file tests/fixtures/cursor-pricing-models.txt --skip-doc-fetch",
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
existsSync,
|
|
7
7
|
lstatSync,
|
|
8
8
|
mkdirSync,
|
|
9
|
+
realpathSync,
|
|
9
10
|
readFileSync,
|
|
10
11
|
rmSync,
|
|
11
12
|
symlinkSync,
|
|
@@ -1035,6 +1036,26 @@ function main() {
|
|
|
1035
1036
|
}
|
|
1036
1037
|
}
|
|
1037
1038
|
|
|
1038
|
-
|
|
1039
|
+
function resolveEntrypointArg(argvPath: string | undefined): string {
|
|
1040
|
+
if (!argvPath) return "";
|
|
1041
|
+
return resolve(argvPath);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
function toRealPath(path: string): string {
|
|
1045
|
+
try {
|
|
1046
|
+
return realpathSync(path);
|
|
1047
|
+
} catch {
|
|
1048
|
+
return path;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
export function isCliEntrypoint(metaUrl: string, argvPath: string | undefined): boolean {
|
|
1053
|
+
const currentPath = fileURLToPath(metaUrl);
|
|
1054
|
+
const argvResolved = resolveEntrypointArg(argvPath);
|
|
1055
|
+
if (!argvResolved) return false;
|
|
1056
|
+
return currentPath === argvResolved || toRealPath(currentPath) === toRealPath(argvResolved);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
if (process.env.NODE_ENV !== "test" && isCliEntrypoint(import.meta.url, process.argv[1])) {
|
|
1039
1060
|
main();
|
|
1040
1061
|
}
|