@sideboard-ai/core 0.1.233 → 0.1.234
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/dist/agents/cursor-runner.cjs +43 -3
- package/dist/agents/cursor-runner.js +9 -2
- package/dist/{agents-LDYMFW6N.js → agents-BTXL6R5I.js} +2 -2
- package/dist/{agents-J2CUJHPC.js → agents-WMN7C322.js} +1 -1
- package/dist/{chunk-PZQNE5X4.js → chunk-2UBVFL2X.js} +1 -1
- package/dist/{chunk-BGHDWCAV.js → chunk-LEYY54BN.js} +5 -5
- package/dist/{chunk-TXMFBL3X.js → chunk-NOIWXANG.js} +32 -3
- package/dist/{chunk-NLETJP7Z.js → chunk-RKKTCKVX.js} +3 -3
- package/dist/{chunk-26T43LBM.js → chunk-WPD7BR6C.js} +41 -3
- package/dist/index.cjs +32 -3
- package/dist/index.js +3 -3
- package/dist/mcp/run-stdio.cjs +32 -3
- package/dist/mcp/run-stdio.js +2 -2
- package/dist/{orchestrator-NLZMHTLX.js → orchestrator-7ZEGFPK4.js} +2 -2
- package/dist/{orchestrator-BXALNM4M.js → orchestrator-R2WCTNJI.js} +3 -3
- package/package.json +1 -1
|
@@ -125,13 +125,49 @@ function resolveCursorSdkRoot(opts) {
|
|
|
125
125
|
const cwdPkg = (0, import_node_path2.join)(process.cwd(), "package.json");
|
|
126
126
|
return resolvedPackageRoot(thisModuleFile()) ?? resolvedPackageRoot(cwdPkg);
|
|
127
127
|
}
|
|
128
|
+
function exportTarget(value) {
|
|
129
|
+
if (typeof value === "string") return value;
|
|
130
|
+
if (value && typeof value === "object") {
|
|
131
|
+
const v = value;
|
|
132
|
+
return exportTarget(v.import) ?? exportTarget(v.default);
|
|
133
|
+
}
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
function cursorSdkEsmEntry(root) {
|
|
137
|
+
try {
|
|
138
|
+
const pkg = JSON.parse((0, import_node_fs2.readFileSync)((0, import_node_path2.join)(root, "package.json"), "utf8"));
|
|
139
|
+
const exp = pkg.exports;
|
|
140
|
+
const dot = exp && typeof exp === "object" && !Array.isArray(exp) && "." in exp ? exp["."] : exp;
|
|
141
|
+
const rel = exportTarget(dot) ?? (typeof pkg.module === "string" ? pkg.module : null);
|
|
142
|
+
if (!rel) return null;
|
|
143
|
+
const entry = (0, import_node_path2.join)(root, rel);
|
|
144
|
+
return (0, import_node_fs2.existsSync)(entry) ? entry : null;
|
|
145
|
+
} catch {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function unwrapCursorSdkModule(mod) {
|
|
150
|
+
const m = mod;
|
|
151
|
+
if (m && !m.Agent && m.default?.Agent) return m.default;
|
|
152
|
+
return m;
|
|
153
|
+
}
|
|
154
|
+
function cursorSdkHasExpectedExports(mod) {
|
|
155
|
+
const m = mod;
|
|
156
|
+
return typeof m?.Agent === "function" && typeof m?.JsonlLocalAgentStore === "function";
|
|
157
|
+
}
|
|
158
|
+
function cursorSdkMissingExportsMessage(root) {
|
|
159
|
+
return `Cursor SDK at ${root ?? "(unknown)"} is missing expected exports (Agent, JsonlLocalAgentStore) \u2014 reinstall with \`npm i -g @cursor/sdk\`.`;
|
|
160
|
+
}
|
|
128
161
|
async function importCursorSdk(opts) {
|
|
129
162
|
const root = resolveCursorSdkRoot(opts);
|
|
130
163
|
if (!root) return null;
|
|
131
164
|
try {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
165
|
+
let entry = cursorSdkEsmEntry(root);
|
|
166
|
+
if (!entry) {
|
|
167
|
+
const req = (0, import_node_module.createRequire)((0, import_node_path2.join)(root, "package.json"));
|
|
168
|
+
entry = req.resolve("@cursor/sdk");
|
|
169
|
+
}
|
|
170
|
+
return unwrapCursorSdkModule(await import((0, import_node_url.pathToFileURL)(entry).href));
|
|
135
171
|
} catch {
|
|
136
172
|
return null;
|
|
137
173
|
}
|
|
@@ -900,6 +936,10 @@ async function main() {
|
|
|
900
936
|
emit({ type: "stderr", data: CURSOR_SDK_INSTALL_HINT });
|
|
901
937
|
return 1;
|
|
902
938
|
}
|
|
939
|
+
if (!cursorSdkHasExpectedExports(sdk)) {
|
|
940
|
+
emit({ type: "stderr", data: cursorSdkMissingExportsMessage(resolveCursorSdkRoot()) });
|
|
941
|
+
return 1;
|
|
942
|
+
}
|
|
903
943
|
const { Agent, CursorAgentError, JsonlLocalAgentStore } = sdk;
|
|
904
944
|
ensureCursorRipgrepPath();
|
|
905
945
|
const apiKey = (req.apiKey || process.env.CURSOR_API_KEY || "").trim() || void 0;
|
|
@@ -6,13 +6,16 @@ import {
|
|
|
6
6
|
CURSOR_SDK_INSTALL_HINT,
|
|
7
7
|
cursorCostOnlyUsageEvent,
|
|
8
8
|
cursorDeltaToEvents,
|
|
9
|
+
cursorSdkHasExpectedExports,
|
|
9
10
|
cursorSdkMessageToEvents,
|
|
11
|
+
cursorSdkMissingExportsMessage,
|
|
10
12
|
ensureCursorRipgrepPath,
|
|
11
13
|
fetchCursorTurnCostUsd,
|
|
12
14
|
formatUnknownDetail,
|
|
13
15
|
importCursorSdk,
|
|
14
|
-
looksLikeCursorHttp2StreamClose
|
|
15
|
-
|
|
16
|
+
looksLikeCursorHttp2StreamClose,
|
|
17
|
+
resolveCursorSdkRoot
|
|
18
|
+
} from "../chunk-WPD7BR6C.js";
|
|
16
19
|
import {
|
|
17
20
|
cursorSdkStoreDir
|
|
18
21
|
} from "../chunk-7J72QJOM.js";
|
|
@@ -210,6 +213,10 @@ async function main() {
|
|
|
210
213
|
emit({ type: "stderr", data: CURSOR_SDK_INSTALL_HINT });
|
|
211
214
|
return 1;
|
|
212
215
|
}
|
|
216
|
+
if (!cursorSdkHasExpectedExports(sdk)) {
|
|
217
|
+
emit({ type: "stderr", data: cursorSdkMissingExportsMessage(resolveCursorSdkRoot()) });
|
|
218
|
+
return 1;
|
|
219
|
+
}
|
|
213
220
|
const { Agent, CursorAgentError, JsonlLocalAgentStore } = sdk;
|
|
214
221
|
ensureCursorRipgrepPath();
|
|
215
222
|
const apiKey = (req.apiKey || process.env.CURSOR_API_KEY || "").trim() || void 0;
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
resolveLoginCommand,
|
|
45
45
|
resolveQuotaFallbackAgent,
|
|
46
46
|
whichOnPath
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-2UBVFL2X.js";
|
|
48
48
|
import "./chunk-S2OEFXST.js";
|
|
49
49
|
import "./chunk-7H2CVVLF.js";
|
|
50
50
|
import "./chunk-6K64FJDD.js";
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
preferredCursorCostCents,
|
|
61
61
|
resolveCursorSdkRoot,
|
|
62
62
|
turnCostUsdFromCursorUsage
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-WPD7BR6C.js";
|
|
64
64
|
import {
|
|
65
65
|
ORCHESTRATOR_AGENT_KINDS,
|
|
66
66
|
assertOrchestratorCapableAgent,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
resolveQuotaFallbackAgent,
|
|
25
25
|
stripBrightsyNdjsonNoise,
|
|
26
26
|
toolDescription
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-2UBVFL2X.js";
|
|
28
28
|
import {
|
|
29
29
|
SLACK_REPLY_FORMATTING,
|
|
30
30
|
addWorkspace,
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
shouldRetryFailedAgentTurn,
|
|
129
129
|
summarizeTurnStderr,
|
|
130
130
|
turnFailChatText
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-WPD7BR6C.js";
|
|
132
132
|
import {
|
|
133
133
|
HISTORY_CLEANUP_INTERVAL_HOURS_DEFAULT,
|
|
134
134
|
applyTurnUsage,
|
|
@@ -482,7 +482,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
482
482
|
await continueOnReply(threadId, prompt);
|
|
483
483
|
return;
|
|
484
484
|
}
|
|
485
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
485
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-R2WCTNJI.js");
|
|
486
486
|
await getOrchestrator2().send(threadId, prompt);
|
|
487
487
|
} catch {
|
|
488
488
|
}
|
|
@@ -4266,7 +4266,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
4266
4266
|
return readThread(thread.id) ?? thread;
|
|
4267
4267
|
}
|
|
4268
4268
|
async function listLinearIssues(agent, repoPath) {
|
|
4269
|
-
const { getAdapter: getAdapter2 } = await import("./agents-
|
|
4269
|
+
const { getAdapter: getAdapter2 } = await import("./agents-BTXL6R5I.js");
|
|
4270
4270
|
await requireAgent(agent, { requireLinear: true });
|
|
4271
4271
|
const adapter = getAdapter2(agent);
|
|
4272
4272
|
if (!adapter.listLinearIssues) {
|
|
@@ -7421,7 +7421,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
7421
7421
|
${prompt}`;
|
|
7422
7422
|
}
|
|
7423
7423
|
async function defaultDeps() {
|
|
7424
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
7424
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-R2WCTNJI.js");
|
|
7425
7425
|
const orch = getOrchestrator2();
|
|
7426
7426
|
return {
|
|
7427
7427
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -3218,13 +3218,42 @@ function resolveCursorSdkRoot(opts) {
|
|
|
3218
3218
|
function isCursorSdkInstalled(opts) {
|
|
3219
3219
|
return Boolean(resolveCursorSdkRoot(opts));
|
|
3220
3220
|
}
|
|
3221
|
+
function exportTarget(value) {
|
|
3222
|
+
if (typeof value === "string") return value;
|
|
3223
|
+
if (value && typeof value === "object") {
|
|
3224
|
+
const v = value;
|
|
3225
|
+
return exportTarget(v.import) ?? exportTarget(v.default);
|
|
3226
|
+
}
|
|
3227
|
+
return null;
|
|
3228
|
+
}
|
|
3229
|
+
function cursorSdkEsmEntry(root) {
|
|
3230
|
+
try {
|
|
3231
|
+
const pkg = JSON.parse(readFileSync5(join8(root, "package.json"), "utf8"));
|
|
3232
|
+
const exp = pkg.exports;
|
|
3233
|
+
const dot = exp && typeof exp === "object" && !Array.isArray(exp) && "." in exp ? exp["."] : exp;
|
|
3234
|
+
const rel = exportTarget(dot) ?? (typeof pkg.module === "string" ? pkg.module : null);
|
|
3235
|
+
if (!rel) return null;
|
|
3236
|
+
const entry = join8(root, rel);
|
|
3237
|
+
return existsSync10(entry) ? entry : null;
|
|
3238
|
+
} catch {
|
|
3239
|
+
return null;
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
function unwrapCursorSdkModule(mod) {
|
|
3243
|
+
const m = mod;
|
|
3244
|
+
if (m && !m.Agent && m.default?.Agent) return m.default;
|
|
3245
|
+
return m;
|
|
3246
|
+
}
|
|
3221
3247
|
async function importCursorSdk(opts) {
|
|
3222
3248
|
const root = resolveCursorSdkRoot(opts);
|
|
3223
3249
|
if (!root) return null;
|
|
3224
3250
|
try {
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3251
|
+
let entry = cursorSdkEsmEntry(root);
|
|
3252
|
+
if (!entry) {
|
|
3253
|
+
const req = createRequire2(join8(root, "package.json"));
|
|
3254
|
+
entry = req.resolve("@cursor/sdk");
|
|
3255
|
+
}
|
|
3256
|
+
return unwrapCursorSdkModule(await import(pathToFileURL(entry).href));
|
|
3228
3257
|
} catch {
|
|
3229
3258
|
return null;
|
|
3230
3259
|
}
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
summarizeTurnStderr,
|
|
43
43
|
toolDescription,
|
|
44
44
|
turnFailChatText
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-NOIWXANG.js";
|
|
46
46
|
import {
|
|
47
47
|
SLACK_REPLY_FORMATTING,
|
|
48
48
|
addWorkspace,
|
|
@@ -418,7 +418,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
418
418
|
await continueOnReply(threadId, prompt);
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
421
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-7ZEGFPK4.js");
|
|
422
422
|
await getOrchestrator2().send(threadId, prompt);
|
|
423
423
|
} catch {
|
|
424
424
|
}
|
|
@@ -7032,7 +7032,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
7032
7032
|
${prompt}`;
|
|
7033
7033
|
}
|
|
7034
7034
|
async function defaultDeps() {
|
|
7035
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
7035
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-7ZEGFPK4.js");
|
|
7036
7036
|
const orch = getOrchestrator2();
|
|
7037
7037
|
return {
|
|
7038
7038
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -802,13 +802,49 @@ function resolveCursorSdkRoot(opts) {
|
|
|
802
802
|
function isCursorSdkInstalled(opts) {
|
|
803
803
|
return Boolean(resolveCursorSdkRoot(opts));
|
|
804
804
|
}
|
|
805
|
+
function exportTarget(value) {
|
|
806
|
+
if (typeof value === "string") return value;
|
|
807
|
+
if (value && typeof value === "object") {
|
|
808
|
+
const v = value;
|
|
809
|
+
return exportTarget(v.import) ?? exportTarget(v.default);
|
|
810
|
+
}
|
|
811
|
+
return null;
|
|
812
|
+
}
|
|
813
|
+
function cursorSdkEsmEntry(root) {
|
|
814
|
+
try {
|
|
815
|
+
const pkg = JSON.parse(readFileSync2(join4(root, "package.json"), "utf8"));
|
|
816
|
+
const exp = pkg.exports;
|
|
817
|
+
const dot = exp && typeof exp === "object" && !Array.isArray(exp) && "." in exp ? exp["."] : exp;
|
|
818
|
+
const rel = exportTarget(dot) ?? (typeof pkg.module === "string" ? pkg.module : null);
|
|
819
|
+
if (!rel) return null;
|
|
820
|
+
const entry = join4(root, rel);
|
|
821
|
+
return existsSync4(entry) ? entry : null;
|
|
822
|
+
} catch {
|
|
823
|
+
return null;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
function unwrapCursorSdkModule(mod) {
|
|
827
|
+
const m = mod;
|
|
828
|
+
if (m && !m.Agent && m.default?.Agent) return m.default;
|
|
829
|
+
return m;
|
|
830
|
+
}
|
|
831
|
+
function cursorSdkHasExpectedExports(mod) {
|
|
832
|
+
const m = mod;
|
|
833
|
+
return typeof m?.Agent === "function" && typeof m?.JsonlLocalAgentStore === "function";
|
|
834
|
+
}
|
|
835
|
+
function cursorSdkMissingExportsMessage(root) {
|
|
836
|
+
return `Cursor SDK at ${root ?? "(unknown)"} is missing expected exports (Agent, JsonlLocalAgentStore) \u2014 reinstall with \`npm i -g @cursor/sdk\`.`;
|
|
837
|
+
}
|
|
805
838
|
async function importCursorSdk(opts) {
|
|
806
839
|
const root = resolveCursorSdkRoot(opts);
|
|
807
840
|
if (!root) return null;
|
|
808
841
|
try {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
842
|
+
let entry = cursorSdkEsmEntry(root);
|
|
843
|
+
if (!entry) {
|
|
844
|
+
const req = createRequire(join4(root, "package.json"));
|
|
845
|
+
entry = req.resolve("@cursor/sdk");
|
|
846
|
+
}
|
|
847
|
+
return unwrapCursorSdkModule(await import(pathToFileURL(entry).href));
|
|
812
848
|
} catch {
|
|
813
849
|
return null;
|
|
814
850
|
}
|
|
@@ -1239,6 +1275,8 @@ export {
|
|
|
1239
1275
|
CURSOR_SDK_INSTALL_HINT,
|
|
1240
1276
|
resolveCursorSdkRoot,
|
|
1241
1277
|
isCursorSdkInstalled,
|
|
1278
|
+
cursorSdkHasExpectedExports,
|
|
1279
|
+
cursorSdkMissingExportsMessage,
|
|
1242
1280
|
importCursorSdk,
|
|
1243
1281
|
preferredCursorCostCents,
|
|
1244
1282
|
turnCostUsdFromCursorUsage,
|
package/dist/index.cjs
CHANGED
|
@@ -13971,13 +13971,42 @@ function resolveCursorSdkRoot(opts) {
|
|
|
13971
13971
|
function isCursorSdkInstalled(opts) {
|
|
13972
13972
|
return Boolean(resolveCursorSdkRoot(opts));
|
|
13973
13973
|
}
|
|
13974
|
+
function exportTarget(value) {
|
|
13975
|
+
if (typeof value === "string") return value;
|
|
13976
|
+
if (value && typeof value === "object") {
|
|
13977
|
+
const v = value;
|
|
13978
|
+
return exportTarget(v.import) ?? exportTarget(v.default);
|
|
13979
|
+
}
|
|
13980
|
+
return null;
|
|
13981
|
+
}
|
|
13982
|
+
function cursorSdkEsmEntry(root) {
|
|
13983
|
+
try {
|
|
13984
|
+
const pkg = JSON.parse((0, import_node_fs36.readFileSync)((0, import_node_path38.join)(root, "package.json"), "utf8"));
|
|
13985
|
+
const exp = pkg.exports;
|
|
13986
|
+
const dot = exp && typeof exp === "object" && !Array.isArray(exp) && "." in exp ? exp["."] : exp;
|
|
13987
|
+
const rel = exportTarget(dot) ?? (typeof pkg.module === "string" ? pkg.module : null);
|
|
13988
|
+
if (!rel) return null;
|
|
13989
|
+
const entry = (0, import_node_path38.join)(root, rel);
|
|
13990
|
+
return (0, import_node_fs36.existsSync)(entry) ? entry : null;
|
|
13991
|
+
} catch {
|
|
13992
|
+
return null;
|
|
13993
|
+
}
|
|
13994
|
+
}
|
|
13995
|
+
function unwrapCursorSdkModule(mod) {
|
|
13996
|
+
const m = mod;
|
|
13997
|
+
if (m && !m.Agent && m.default?.Agent) return m.default;
|
|
13998
|
+
return m;
|
|
13999
|
+
}
|
|
13974
14000
|
async function importCursorSdk(opts) {
|
|
13975
14001
|
const root = resolveCursorSdkRoot(opts);
|
|
13976
14002
|
if (!root) return null;
|
|
13977
14003
|
try {
|
|
13978
|
-
|
|
13979
|
-
|
|
13980
|
-
|
|
14004
|
+
let entry = cursorSdkEsmEntry(root);
|
|
14005
|
+
if (!entry) {
|
|
14006
|
+
const req = (0, import_node_module2.createRequire)((0, import_node_path38.join)(root, "package.json"));
|
|
14007
|
+
entry = req.resolve("@cursor/sdk");
|
|
14008
|
+
}
|
|
14009
|
+
return unwrapCursorSdkModule(await import((0, import_node_url2.pathToFileURL)(entry).href));
|
|
13981
14010
|
} catch {
|
|
13982
14011
|
return null;
|
|
13983
14012
|
}
|
package/dist/index.js
CHANGED
|
@@ -325,7 +325,7 @@ import {
|
|
|
325
325
|
worktreeCleanupSettings,
|
|
326
326
|
wrapReviewSkillMarkdown,
|
|
327
327
|
writeWorktreeFile
|
|
328
|
-
} from "./chunk-
|
|
328
|
+
} from "./chunk-LEYY54BN.js";
|
|
329
329
|
import {
|
|
330
330
|
LEGACY_PLAN_FILE_REL,
|
|
331
331
|
PLAN_FILE_NAME,
|
|
@@ -442,7 +442,7 @@ import {
|
|
|
442
442
|
withEventParentId,
|
|
443
443
|
withEventsParentId,
|
|
444
444
|
writeInjectedMcpConfig
|
|
445
|
-
} from "./chunk-
|
|
445
|
+
} from "./chunk-2UBVFL2X.js";
|
|
446
446
|
import {
|
|
447
447
|
CLOUD_COORDINATOR_BUSY_REPLY,
|
|
448
448
|
CLOUD_COORDINATOR_STOPPED_REPLY,
|
|
@@ -638,7 +638,7 @@ import {
|
|
|
638
638
|
trustSystemCertificates,
|
|
639
639
|
turnCostUsdFromCursorUsage,
|
|
640
640
|
withMaxOldSpaceSize
|
|
641
|
-
} from "./chunk-
|
|
641
|
+
} from "./chunk-WPD7BR6C.js";
|
|
642
642
|
import {
|
|
643
643
|
AGENT_DONE_SOUNDS,
|
|
644
644
|
FOLLOW_UP_BEHAVIORS,
|
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -12062,13 +12062,42 @@ function resolveCursorSdkRoot(opts) {
|
|
|
12062
12062
|
function isCursorSdkInstalled(opts) {
|
|
12063
12063
|
return Boolean(resolveCursorSdkRoot(opts));
|
|
12064
12064
|
}
|
|
12065
|
+
function exportTarget(value) {
|
|
12066
|
+
if (typeof value === "string") return value;
|
|
12067
|
+
if (value && typeof value === "object") {
|
|
12068
|
+
const v = value;
|
|
12069
|
+
return exportTarget(v.import) ?? exportTarget(v.default);
|
|
12070
|
+
}
|
|
12071
|
+
return null;
|
|
12072
|
+
}
|
|
12073
|
+
function cursorSdkEsmEntry(root) {
|
|
12074
|
+
try {
|
|
12075
|
+
const pkg = JSON.parse((0, import_node_fs31.readFileSync)((0, import_node_path33.join)(root, "package.json"), "utf8"));
|
|
12076
|
+
const exp = pkg.exports;
|
|
12077
|
+
const dot = exp && typeof exp === "object" && !Array.isArray(exp) && "." in exp ? exp["."] : exp;
|
|
12078
|
+
const rel = exportTarget(dot) ?? (typeof pkg.module === "string" ? pkg.module : null);
|
|
12079
|
+
if (!rel) return null;
|
|
12080
|
+
const entry = (0, import_node_path33.join)(root, rel);
|
|
12081
|
+
return (0, import_node_fs31.existsSync)(entry) ? entry : null;
|
|
12082
|
+
} catch {
|
|
12083
|
+
return null;
|
|
12084
|
+
}
|
|
12085
|
+
}
|
|
12086
|
+
function unwrapCursorSdkModule(mod) {
|
|
12087
|
+
const m = mod;
|
|
12088
|
+
if (m && !m.Agent && m.default?.Agent) return m.default;
|
|
12089
|
+
return m;
|
|
12090
|
+
}
|
|
12065
12091
|
async function importCursorSdk(opts) {
|
|
12066
12092
|
const root = resolveCursorSdkRoot(opts);
|
|
12067
12093
|
if (!root) return null;
|
|
12068
12094
|
try {
|
|
12069
|
-
|
|
12070
|
-
|
|
12071
|
-
|
|
12095
|
+
let entry = cursorSdkEsmEntry(root);
|
|
12096
|
+
if (!entry) {
|
|
12097
|
+
const req = (0, import_node_module2.createRequire)((0, import_node_path33.join)(root, "package.json"));
|
|
12098
|
+
entry = req.resolve("@cursor/sdk");
|
|
12099
|
+
}
|
|
12100
|
+
return unwrapCursorSdkModule(await import((0, import_node_url2.pathToFileURL)(entry).href));
|
|
12072
12101
|
} catch {
|
|
12073
12102
|
return null;
|
|
12074
12103
|
}
|
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
threadsSharingWorktree,
|
|
52
52
|
updateSchedule,
|
|
53
53
|
waitForDetachedJob
|
|
54
|
-
} from "../chunk-
|
|
54
|
+
} from "../chunk-RKKTCKVX.js";
|
|
55
55
|
import "../chunk-JFOPOMK7.js";
|
|
56
56
|
import "../chunk-YWI3IBP2.js";
|
|
57
57
|
import {
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
materializeSystemCaBundle,
|
|
63
63
|
sideboardMcpProfile,
|
|
64
64
|
trustSystemCertificates
|
|
65
|
-
} from "../chunk-
|
|
65
|
+
} from "../chunk-NOIWXANG.js";
|
|
66
66
|
import {
|
|
67
67
|
GLOBAL_WORKSPACE_ID,
|
|
68
68
|
isCloudCoordinatorThread,
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
resolveSendFollowUp,
|
|
12
12
|
startOrchestration,
|
|
13
13
|
waitForPidExit
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RKKTCKVX.js";
|
|
15
15
|
import "./chunk-JFOPOMK7.js";
|
|
16
16
|
import "./chunk-YWI3IBP2.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-NOIWXANG.js";
|
|
18
18
|
import "./chunk-TWXSZYR2.js";
|
|
19
19
|
import "./chunk-SPAMHHJH.js";
|
|
20
20
|
import "./chunk-P2BSMNHB.js";
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
resolveSendFollowUp,
|
|
10
10
|
startOrchestration,
|
|
11
11
|
waitForPidExit
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LEYY54BN.js";
|
|
13
13
|
import "./chunk-DJU54RYW.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-2UBVFL2X.js";
|
|
15
15
|
import "./chunk-S2OEFXST.js";
|
|
16
16
|
import "./chunk-7H2CVVLF.js";
|
|
17
17
|
import "./chunk-6K64FJDD.js";
|
|
@@ -20,7 +20,7 @@ import "./chunk-TNVJPFHM.js";
|
|
|
20
20
|
import "./chunk-ROPGQRPU.js";
|
|
21
21
|
import "./chunk-N7WZ6NIN.js";
|
|
22
22
|
import "./chunk-AXQ4ZWHK.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-WPD7BR6C.js";
|
|
24
24
|
import "./chunk-I5NC7DWO.js";
|
|
25
25
|
import "./chunk-WDRMZKVB.js";
|
|
26
26
|
import "./chunk-4TYXWPAJ.js";
|