pi-cursor-sdk 0.5.2 → 0.5.3
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/CHANGELOG.md +26 -0
- package/README.md +38 -17
- package/dist/context.js +2 -2
- package/dist/cursor-custom-subagent-definitions.js +1 -1
- package/dist/cursor-fallback-models.generated.js +402 -1
- package/dist/cursor-local-agent-ownership.js +17 -0
- package/dist/cursor-mcp-timeout-override.js +1 -1
- package/dist/cursor-pi-tool-bridge-diagnostics.js +4 -0
- package/dist/cursor-pi-tool-bridge-run.js +10 -3
- package/dist/cursor-provider-errors.js +2 -2
- package/dist/cursor-provider-turn-summary.js +1 -1
- package/dist/cursor-session-agent-cleanup.js +10 -1
- package/dist/cursor-session-agent-lifecycle.js +2 -2
- package/dist/cursor-session-agent-lineage.js +11 -7
- package/dist/cursor-session-agent-resume.js +15 -9
- package/dist/cursor-session-agent.js +22 -7
- package/dist/cursor-session-scope.js +27 -14
- package/dist/cursor-session-settings.js +3 -3
- package/dist/cursor-session-store.js +1 -1
- package/dist/cursor-state.js +17 -6
- package/dist/model-discovery.js +8 -9
- package/docs/cursor-live-smoke-checklist.md +2 -2
- package/docs/cursor-model-ux-spec.md +23 -14
- package/docs/cursor-native-tool-replay.md +6 -3
- package/docs/cursor-native-tool-visual-audit.md +1 -1
- package/docs/cursor-testing-lessons.md +24 -6
- package/docs/cursor-tool-surfaces.md +16 -1
- package/package.json +8 -8
- package/src/context.ts +2 -2
- package/src/cursor-custom-subagent-definitions.ts +1 -1
- package/src/cursor-fallback-models.generated.ts +402 -1
- package/src/cursor-local-agent-ownership.ts +18 -0
- package/src/cursor-mcp-timeout-override.ts +1 -1
- package/src/cursor-pi-tool-bridge-diagnostics.ts +17 -0
- package/src/cursor-pi-tool-bridge-run.ts +10 -3
- package/src/cursor-provider-errors.ts +2 -2
- package/src/cursor-provider-turn-summary.ts +1 -1
- package/src/cursor-session-agent-cleanup.ts +6 -1
- package/src/cursor-session-agent-lifecycle.ts +2 -2
- package/src/cursor-session-agent-lineage.ts +10 -5
- package/src/cursor-session-agent-resume.ts +14 -7
- package/src/cursor-session-agent.ts +23 -7
- package/src/cursor-session-scope.ts +33 -11
- package/src/cursor-session-settings.ts +3 -3
- package/src/cursor-session-store.ts +1 -1
- package/src/cursor-state.ts +25 -5
- package/src/model-discovery.ts +7 -8
package/src/model-discovery.ts
CHANGED
|
@@ -115,9 +115,9 @@ function mapComparableLevel(
|
|
|
115
115
|
|
|
116
116
|
function getThinkingLevelMap(item: ModelListItem): ThinkingLevelMap | undefined {
|
|
117
117
|
const reasoningParameter = getParameter(item, "reasoning");
|
|
118
|
-
const effortParameter = getParameter(item, "effort");
|
|
118
|
+
const effortParameter = getParameter(item, "effort") ?? getParameter(item, "reasoning_effort");
|
|
119
119
|
const thinkingParameter = getParameter(item, "thinking");
|
|
120
|
-
const valueParameter = effortParameter ?? reasoningParameter ?? thinkingParameter
|
|
120
|
+
const valueParameter = effortParameter ?? reasoningParameter ?? thinkingParameter;
|
|
121
121
|
if (!valueParameter) return undefined;
|
|
122
122
|
|
|
123
123
|
if (valueParameter.id === "thinking" && hasBooleanValues(valueParameter)) {
|
|
@@ -306,11 +306,12 @@ function applyThinkingLevel(
|
|
|
306
306
|
): void {
|
|
307
307
|
const mapped = metadata.thinkingLevelMap?.[level];
|
|
308
308
|
if (mapped === undefined || mapped === null) return;
|
|
309
|
+
const effortId = metadata.parameterIds.effort ? "effort" : metadata.parameterIds.reasoning_effort ? "reasoning_effort" : undefined;
|
|
309
310
|
|
|
310
311
|
if (level === "off") {
|
|
311
312
|
if (metadata.parameterIds.thinking && mapped === "false") {
|
|
312
313
|
setParam(params, "thinking", mapped);
|
|
313
|
-
deleteParam(params,
|
|
314
|
+
if (effortId) deleteParam(params, effortId);
|
|
314
315
|
return;
|
|
315
316
|
}
|
|
316
317
|
if (metadata.parameterIds.reasoning) {
|
|
@@ -319,9 +320,9 @@ function applyThinkingLevel(
|
|
|
319
320
|
return;
|
|
320
321
|
}
|
|
321
322
|
|
|
322
|
-
if (
|
|
323
|
+
if (effortId) {
|
|
323
324
|
if (metadata.parameterIds.thinking) setParam(params, "thinking", "true");
|
|
324
|
-
setParam(params,
|
|
325
|
+
setParam(params, effortId, mapped);
|
|
325
326
|
return;
|
|
326
327
|
}
|
|
327
328
|
|
|
@@ -332,8 +333,6 @@ function applyThinkingLevel(
|
|
|
332
333
|
|
|
333
334
|
if (metadata.parameterIds.thinking) {
|
|
334
335
|
setParam(params, "thinking", mapped);
|
|
335
|
-
} else if (metadata.parameterIds.reasoning_effort) {
|
|
336
|
-
setParam(params, "reasoning_effort", mapped);
|
|
337
336
|
}
|
|
338
337
|
}
|
|
339
338
|
|
|
@@ -418,7 +417,7 @@ export async function discoverModels(options: DiscoverModelsOptions = {}): Promi
|
|
|
418
417
|
try {
|
|
419
418
|
const { Cursor } = await loadCursorSdk();
|
|
420
419
|
options.signal?.throwIfAborted();
|
|
421
|
-
// SDK 1.0.
|
|
420
|
+
// SDK 1.0.37 CursorRequestOptions has no caller signal. A late response
|
|
422
421
|
// still cannot publish outside the native generation that requested it.
|
|
423
422
|
const models = await Cursor.models.list({ apiKey });
|
|
424
423
|
options.signal?.throwIfAborted();
|