@sideboard-ai/core 0.1.220 → 0.1.221
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 +15 -15
- package/dist/agents/cursor-runner.js +13 -13
- package/package.json +1 -1
|
@@ -663,6 +663,20 @@ function cursorDeltaToEvents(update) {
|
|
|
663
663
|
return [];
|
|
664
664
|
}
|
|
665
665
|
|
|
666
|
+
// src/agents/cursor-model-selection.ts
|
|
667
|
+
function buildCursorModelSelection(model, opts) {
|
|
668
|
+
const raw = model && model.trim() || "";
|
|
669
|
+
const id = !raw || raw.toLowerCase() === "auto" || raw.toLowerCase() === "default" ? "default" : raw;
|
|
670
|
+
const params = [];
|
|
671
|
+
const effort = (opts.effort ?? "").trim().toLowerCase();
|
|
672
|
+
const normalized = effort === "normal" ? "medium" : effort === "low" || effort === "medium" || effort === "high" || effort === "xhigh" || effort === "max" ? effort : "";
|
|
673
|
+
if (normalized) {
|
|
674
|
+
params.push({ id: "effort", value: normalized });
|
|
675
|
+
}
|
|
676
|
+
params.push({ id: "fast", value: opts.fast ? "true" : "false" });
|
|
677
|
+
return { id, params };
|
|
678
|
+
}
|
|
679
|
+
|
|
666
680
|
// src/agents/cursor-stream-coalesce.ts
|
|
667
681
|
function isTextEvent(event) {
|
|
668
682
|
return event.type === "stdout" || event.type === "thinking";
|
|
@@ -729,20 +743,6 @@ function emit(event) {
|
|
|
729
743
|
process.stdout.write(`${JSON.stringify(event)}
|
|
730
744
|
`);
|
|
731
745
|
}
|
|
732
|
-
function modelSelection(model, opts) {
|
|
733
|
-
const raw = model && model.trim() || "";
|
|
734
|
-
const id = !raw || raw.toLowerCase() === "auto" || raw.toLowerCase() === "default" ? "default" : raw;
|
|
735
|
-
const params = [];
|
|
736
|
-
const effort = (opts.effort ?? "").trim().toLowerCase();
|
|
737
|
-
const normalized = effort === "normal" ? "medium" : effort === "low" || effort === "medium" || effort === "high" || effort === "xhigh" || effort === "max" ? effort : "";
|
|
738
|
-
if (normalized) {
|
|
739
|
-
params.push({ id: "effort", value: normalized });
|
|
740
|
-
}
|
|
741
|
-
if (opts.fast) {
|
|
742
|
-
params.push({ id: "fast", value: "true" });
|
|
743
|
-
}
|
|
744
|
-
return params.length > 0 ? { id, params } : { id };
|
|
745
|
-
}
|
|
746
746
|
function localAgentStore(threadId) {
|
|
747
747
|
const root = cursorSdkStoreDir(threadId);
|
|
748
748
|
(0, import_node_fs12.mkdirSync)(root, { recursive: true });
|
|
@@ -798,7 +798,7 @@ async function main() {
|
|
|
798
798
|
return 1;
|
|
799
799
|
}
|
|
800
800
|
const apiKey = (req.apiKey || process.env.CURSOR_API_KEY || "").trim() || void 0;
|
|
801
|
-
const model =
|
|
801
|
+
const model = buildCursorModelSelection(req.model, {
|
|
802
802
|
effort: req.effort,
|
|
803
803
|
fast: Boolean(req.fast)
|
|
804
804
|
});
|
|
@@ -130,14 +130,8 @@ async function* iterateUntilIdle(iterable, idleMs, onIdle, activity) {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
// src/agents/cursor-
|
|
134
|
-
|
|
135
|
-
ensureCursorRipgrepPath();
|
|
136
|
-
function emit(event) {
|
|
137
|
-
process.stdout.write(`${JSON.stringify(event)}
|
|
138
|
-
`);
|
|
139
|
-
}
|
|
140
|
-
function modelSelection(model, opts) {
|
|
133
|
+
// src/agents/cursor-model-selection.ts
|
|
134
|
+
function buildCursorModelSelection(model, opts) {
|
|
141
135
|
const raw = model && model.trim() || "";
|
|
142
136
|
const id = !raw || raw.toLowerCase() === "auto" || raw.toLowerCase() === "default" ? "default" : raw;
|
|
143
137
|
const params = [];
|
|
@@ -146,10 +140,16 @@ function modelSelection(model, opts) {
|
|
|
146
140
|
if (normalized) {
|
|
147
141
|
params.push({ id: "effort", value: normalized });
|
|
148
142
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
143
|
+
params.push({ id: "fast", value: opts.fast ? "true" : "false" });
|
|
144
|
+
return { id, params };
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// src/agents/cursor-runner.ts
|
|
148
|
+
dropNestedElectronEnvFromProcess();
|
|
149
|
+
ensureCursorRipgrepPath();
|
|
150
|
+
function emit(event) {
|
|
151
|
+
process.stdout.write(`${JSON.stringify(event)}
|
|
152
|
+
`);
|
|
153
153
|
}
|
|
154
154
|
function localAgentStore(threadId) {
|
|
155
155
|
const root = cursorSdkStoreDir(threadId);
|
|
@@ -206,7 +206,7 @@ async function main() {
|
|
|
206
206
|
return 1;
|
|
207
207
|
}
|
|
208
208
|
const apiKey = (req.apiKey || process.env.CURSOR_API_KEY || "").trim() || void 0;
|
|
209
|
-
const model =
|
|
209
|
+
const model = buildCursorModelSelection(req.model, {
|
|
210
210
|
effort: req.effort,
|
|
211
211
|
fast: Boolean(req.fast)
|
|
212
212
|
});
|