@code-yeongyu/senpi 2026.9.23-3 → 2026.9.23-4
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 +21 -0
- package/dist/bundle/chunks/{app-server-command-U5Y46LHO.js → app-server-command-QRBQLEXY.js} +1 -1
- package/dist/bundle/chunks/{chunk-UCTYTLP3.js → chunk-3RN6BFG2.js} +2 -2
- package/dist/bundle/chunks/{chunk-XTXBPXZZ.js → chunk-EN6KDFY2.js} +1 -1
- package/dist/bundle/chunks/{chunk-2NFHX2FJ.js → chunk-J3QXPP4T.js} +1 -1
- package/dist/bundle/chunks/chunk-KBG7BJIL.js +8 -0
- package/dist/bundle/chunks/{chunk-TH4PERSI.js → chunk-N46LNXHU.js} +35 -53
- package/dist/bundle/chunks/{chunk-67Z5WNA4.js → chunk-PSMTQDII.js} +1 -1
- package/dist/bundle/chunks/{chunk-Y4AJLTFT.js → chunk-WUYBEF7C.js} +1 -1
- package/dist/bundle/chunks/{chunk-IDSOMHWS.js → chunk-WXIRFRXY.js} +1 -1
- package/dist/bundle/chunks/{chunk-R6F525XB.js → chunk-XDSQYM4F.js} +1 -1
- package/dist/bundle/chunks/{chunk-TUVSARCZ.js → chunk-ZEFQYQOU.js} +1 -1
- package/dist/bundle/chunks/{cli-main-65WMMIRT.js → cli-main-ROBDBYAB.js} +1 -1
- package/dist/bundle/chunks/cursor-agent.js +1 -1
- package/dist/bundle/chunks/{help-fast-path-VXAZDQ3Z.js → help-fast-path-QXVCHTP3.js} +1 -1
- package/dist/bundle/chunks/{host-command-5PEFD4N6.js → host-command-3PUZYQOK.js} +1 -1
- package/dist/bundle/chunks/{host-lifecycle-BXW5C4JT.js → host-lifecycle-OHPSU5VU.js} +1 -1
- package/dist/bundle/chunks/{interactive-host-runtime-DUNYT24Q.js → interactive-host-runtime-57LEAJPU.js} +1 -1
- package/dist/bundle/chunks/{interactive-mode-SCG5PQZ6.js → interactive-mode-SLPAGRHH.js} +1 -1
- package/dist/bundle/chunks/{multi-session-host-QC6BZZNH.js → multi-session-host-3PACMEHC.js} +1 -1
- package/dist/bundle/chunks/{package-manager-cli-23GULCVL.js → package-manager-cli-6UIUSRQO.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-B6RSUQKL.js → pi-messages-CAS467IY.js} +1 -1
- package/dist/bundle/chunks/{rotation-stream-ZIYWOB2N.js → rotation-stream-CZT4TRPD.js} +1 -1
- package/dist/bundle/chunks/{rpc-mode-ZQ4E6FFA.js → rpc-mode-47EVLL6X.js} +1 -1
- package/dist/bundle/chunks/{session-picker-CO2ZK3EC.js → session-picker-ZIBANFBQ.js} +1 -1
- package/dist/bundle/chunks/session-worker.js +40 -58
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +43 -26
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -1
- package/dist/core/extensions/builtin/nested-agents-md/index.js +1 -1
- package/dist/core/extensions/builtin/nested-agents-md/index.js.map +1 -1
- package/dist/core/extensions/builtin/rule-activation/types.d.ts +2 -0
- package/dist/core/extensions/builtin/rule-activation/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/rule-activation/types.js +7 -1
- package/dist/core/extensions/builtin/rule-activation/types.js.map +1 -1
- package/dist/core/extensions/builtin/rules/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/rules/index.js +2 -1
- package/dist/core/extensions/builtin/rules/index.js.map +1 -1
- package/dist/core/extensions/builtin/webfetch/webfetch/tool.d.ts +3 -1
- package/dist/core/extensions/builtin/webfetch/webfetch/tool.d.ts.map +1 -1
- package/dist/core/extensions/builtin/webfetch/webfetch/tool.js +9 -3
- package/dist/core/extensions/builtin/webfetch/webfetch/tool.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +87 -14
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +12 -7
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +9 -6
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep/format.d.ts +3 -2
- package/dist/core/tools/grep/format.d.ts.map +1 -1
- package/dist/core/tools/grep/format.js +5 -3
- package/dist/core/tools/grep/format.js.map +1 -1
- package/dist/core/tools/grep/index.js +2 -2
- package/dist/core/tools/grep/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +5 -3
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/model-only-text.d.ts +4 -0
- package/dist/core/tools/model-only-text.d.ts.map +1 -0
- package/dist/core/tools/model-only-text.js +12 -0
- package/dist/core/tools/model-only-text.js.map +1 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +15 -5
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +2 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts.map +1 -1
- package/dist/core/tools/renderers/bash.js +1 -25
- package/dist/core/tools/renderers/bash.js.map +1 -1
- package/dist/core/tools/renderers/grep.d.ts.map +1 -1
- package/dist/core/tools/renderers/grep.js +0 -25
- package/dist/core/tools/renderers/grep.js.map +1 -1
- package/dist/core/tools/renderers/read.d.ts +8 -0
- package/dist/core/tools/renderers/read.d.ts.map +1 -1
- package/dist/core/tools/renderers/read.js +2 -14
- package/dist/core/tools/renderers/read.js.map +1 -1
- package/dist/modes/interactive/components/exploration-call.d.ts +4 -1
- package/dist/modes/interactive/components/exploration-call.d.ts.map +1 -1
- package/dist/modes/interactive/components/exploration-call.js +17 -2
- package/dist/modes/interactive/components/exploration-call.js.map +1 -1
- package/dist/modes/interactive/components/exploration-group.d.ts +3 -1
- package/dist/modes/interactive/components/exploration-group.d.ts.map +1 -1
- package/dist/modes/interactive/components/exploration-group.js +7 -1
- package/dist/modes/interactive/components/exploration-group.js.map +1 -1
- package/dist/modes/interactive/components/exploration-rules.d.ts +5 -0
- package/dist/modes/interactive/components/exploration-rules.d.ts.map +1 -0
- package/dist/modes/interactive/components/exploration-rules.js +15 -0
- package/dist/modes/interactive/components/exploration-rules.js.map +1 -0
- package/dist/modes/interactive/components/exploration-transcript-container.d.ts.map +1 -1
- package/dist/modes/interactive/components/exploration-transcript-container.js +10 -1
- package/dist/modes/interactive/components/exploration-transcript-container.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +4 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/render.ts +4 -19
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +17 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/catalog-grouping.d.ts +18 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/catalog-grouping.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/catalog-grouping.js +103 -3
- package/node_modules/@earendil-works/pi-ai/dist/cursor/catalog-grouping.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.d.ts +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.js +15 -3
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.d.ts +7 -2
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js +92 -20
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +9 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +7 -7
- package/dist/bundle/chunks/chunk-XPDV6SIX.js +0 -8
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { normalizeCursorCatalog } from "./catalog-grouping.js";
|
|
1
|
+
import { deriveCursorVariantAliases, normalizeCursorCatalog } from "./catalog-grouping.js";
|
|
2
2
|
import { resolveCursorContextWindow } from "./context-limit-store.js";
|
|
3
|
-
import { getCursorVariantAlias } from "./model-capabilities.js";
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { getCursorVariantAlias, parseCursorVariantId } from "./model-capabilities.js";
|
|
4
|
+
/**
|
|
5
|
+
* Fill levels a stored static group lacks from flat alias rows regrouped beside it;
|
|
6
|
+
* the group's own levels, representative, and compat metadata are never replaced.
|
|
7
|
+
*/
|
|
8
|
+
function absorbStaticLevels(current, flatGroup) {
|
|
9
|
+
const additions = Object.entries(flatGroup?.thinkingLevelMap ?? {}).filter(([level, value]) => value != null && current.thinkingLevelMap?.[level] == null);
|
|
10
|
+
if (additions.length === 0)
|
|
11
|
+
return current;
|
|
12
|
+
return { ...current, thinkingLevelMap: { ...current.thinkingLevelMap, ...Object.fromEntries(additions) } };
|
|
6
13
|
}
|
|
7
14
|
function entryToModel(entry, maxTokensById) {
|
|
8
15
|
const representative = entry.representativeVariantId ?? entry.legacyAliases[0] ?? entry.id;
|
|
@@ -30,6 +37,7 @@ function entryToModel(entry, maxTokensById) {
|
|
|
30
37
|
capabilityId: entry.capabilityId,
|
|
31
38
|
...(entry.thinkingMode !== undefined ? { thinkingMode: entry.thinkingMode } : {}),
|
|
32
39
|
representativeVariantId: entry.representativeVariantId,
|
|
40
|
+
...(entry.variantIds !== undefined ? { variantIds: entry.variantIds } : {}),
|
|
33
41
|
},
|
|
34
42
|
}
|
|
35
43
|
: {}),
|
|
@@ -38,13 +46,36 @@ function entryToModel(entry, maxTokensById) {
|
|
|
38
46
|
}
|
|
39
47
|
/**
|
|
40
48
|
* Idempotent stored-catalog transform: pre-grouping 204-variant cursor entries
|
|
41
|
-
* are regrouped into selectable identities
|
|
42
|
-
*
|
|
49
|
+
* are regrouped into selectable identities, including families the static
|
|
50
|
+
* alias table does not list yet, which are derived over the stored batch
|
|
51
|
+
* (senpi#2038). An already-grouped identity (static or derived) always wins
|
|
52
|
+
* over flat rows aliasing it, regardless of input order, and absorbs their
|
|
53
|
+
* levels without losing its own metadata; conflicting derived variants stay
|
|
54
|
+
* flat, and duplicate identities coalesce at their first position in stable
|
|
55
|
+
* input order.
|
|
43
56
|
*/
|
|
44
57
|
export function regroupStoredCursorModels(models) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
58
|
+
const existingGroups = new Map();
|
|
59
|
+
const existingDerived = new Map();
|
|
60
|
+
const representedTargetById = new Map();
|
|
61
|
+
for (const model of models) {
|
|
62
|
+
const reasoning = model.compat?.cursorReasoning;
|
|
63
|
+
if (reasoning === undefined || existingGroups.has(model.id))
|
|
64
|
+
continue;
|
|
65
|
+
existingGroups.set(model.id, model);
|
|
66
|
+
if (reasoning.variantIds === undefined)
|
|
67
|
+
continue;
|
|
68
|
+
existingDerived.set(model.id, model);
|
|
69
|
+
for (const id of Object.values(reasoning.variantIds))
|
|
70
|
+
representedTargetById.set(id, model.id);
|
|
71
|
+
}
|
|
72
|
+
const derived = deriveCursorVariantAliases([
|
|
73
|
+
...models.filter((model) => model.compat?.cursorReasoning === undefined).map((model) => model.id),
|
|
74
|
+
...[...existingDerived.values()].flatMap((model) => Object.values(model.compat?.cursorReasoning?.variantIds ?? {})),
|
|
75
|
+
]);
|
|
76
|
+
const isLegacy = (model) => model.compat?.cursorReasoning === undefined &&
|
|
77
|
+
(getCursorVariantAlias(model.id) !== undefined || derived.has(model.id) || representedTargetById.has(model.id));
|
|
78
|
+
const legacy = models.filter(isLegacy);
|
|
48
79
|
const maxTokensById = new Map(models.map((model) => [model.id, model.maxTokens]));
|
|
49
80
|
const regrouped = new Map(normalizeCursorCatalog(legacy.map((model) => ({
|
|
50
81
|
id: model.id,
|
|
@@ -52,25 +83,66 @@ export function regroupStoredCursorModels(models) {
|
|
|
52
83
|
input: model.input.filter((modality) => modality !== "video"),
|
|
53
84
|
cursorMaxMode: model.compat?.cursorMaxMode === true,
|
|
54
85
|
}))).map((entry) => [entry.id, entryToModel(entry, maxTokensById)]));
|
|
86
|
+
const merged = new Map();
|
|
87
|
+
for (const [targetId, current] of existingGroups) {
|
|
88
|
+
const kept = current.compat?.cursorReasoning;
|
|
89
|
+
if (kept?.variantIds === undefined) {
|
|
90
|
+
merged.set(targetId, absorbStaticLevels(current, regrouped.get(targetId)));
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const variantIds = { ...kept.variantIds };
|
|
94
|
+
const thinkingLevelMap = { ...current.thinkingLevelMap };
|
|
95
|
+
let changed = false;
|
|
96
|
+
for (const model of legacy) {
|
|
97
|
+
const alias = derived.get(model.id);
|
|
98
|
+
if (alias?.targetId !== targetId || alias.level === undefined)
|
|
99
|
+
continue;
|
|
100
|
+
if (variantIds[alias.level] !== undefined && variantIds[alias.level] !== model.id)
|
|
101
|
+
continue;
|
|
102
|
+
variantIds[alias.level] = model.id;
|
|
103
|
+
thinkingLevelMap[alias.level] = parseCursorVariantId(model.id).level;
|
|
104
|
+
changed = true;
|
|
105
|
+
}
|
|
106
|
+
merged.set(targetId, changed
|
|
107
|
+
? {
|
|
108
|
+
...current,
|
|
109
|
+
thinkingLevelMap,
|
|
110
|
+
compat: { ...current.compat, cursorReasoning: { ...kept, variantIds } },
|
|
111
|
+
}
|
|
112
|
+
: current);
|
|
113
|
+
}
|
|
55
114
|
const seen = new Set();
|
|
56
115
|
const out = [];
|
|
57
116
|
for (const model of models) {
|
|
58
|
-
|
|
59
|
-
|
|
117
|
+
const alias = isLegacy(model) ? (getCursorVariantAlias(model.id) ?? derived.get(model.id)) : undefined;
|
|
118
|
+
const targetId = alias?.targetId ?? (isLegacy(model) ? representedTargetById.get(model.id) : undefined) ?? model.id;
|
|
119
|
+
const coalesced = merged.get(targetId);
|
|
120
|
+
if (coalesced !== undefined) {
|
|
121
|
+
const retainedIds = coalesced.compat?.cursorReasoning?.variantIds;
|
|
122
|
+
// Static groups absorb every flat alias row; derived groups keep conflicting variants flat.
|
|
123
|
+
const absorbed = model.id === targetId ||
|
|
124
|
+
(retainedIds === undefined ? isLegacy(model) : Object.values(retainedIds).includes(model.id));
|
|
125
|
+
if (!absorbed) {
|
|
126
|
+
if (!seen.has(model.id))
|
|
127
|
+
out.push(model);
|
|
128
|
+
seen.add(model.id);
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
if (!seen.has(targetId))
|
|
132
|
+
out.push(coalesced);
|
|
133
|
+
seen.add(targetId);
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (!isLegacy(model)) {
|
|
137
|
+
if (!seen.has(model.id))
|
|
138
|
+
out.push(model);
|
|
139
|
+
seen.add(model.id);
|
|
60
140
|
continue;
|
|
61
141
|
}
|
|
62
|
-
const alias = getCursorVariantAlias(model.id);
|
|
63
|
-
const targetId = alias?.targetId ?? model.id;
|
|
64
142
|
if (seen.has(targetId))
|
|
65
143
|
continue;
|
|
66
144
|
seen.add(targetId);
|
|
67
|
-
|
|
68
|
-
if (transformed !== undefined) {
|
|
69
|
-
out.push(transformed);
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
out.push(model);
|
|
73
|
-
}
|
|
145
|
+
out.push(regrouped.get(targetId) ?? model);
|
|
74
146
|
}
|
|
75
147
|
return out;
|
|
76
148
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-migration.js","sourceRoot":"","sources":["../../src/cursor/store-migration.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,SAAS,cAAc,CAAC,KAA4B;IACnD,OAAO,KAAK,CAAC,MAAM,EAAE,eAAe,KAAK,SAAS,IAAI,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,SAAS,CAAC;AACrG,CAAC;AAED,SAAS,YAAY,CAAC,KAAyB,EAAE,aAA0C;IAC1F,MAAM,cAAc,GAAG,KAAK,CAAC,uBAAuB,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE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,MAAM,GAAG,GAA4B,EAAE,CAAC;IACxC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChB,SAAS;QACV,CAAC;QACD,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC9C,MAAM,QAAQ,GAAG,KAAK,EAAE,QAAQ,IAAI,KAAK,CAAC,EAAE,CAAC;QAC7C,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,SAAS;QACjC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACnB,MAAM,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC/B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACvB,CAAC;aAAM,CAAC;YACP,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;IACF,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC","sourcesContent":["import type { Model } from \"../types.ts\";\nimport { type CursorCatalogEntry, normalizeCursorCatalog } from \"./catalog-grouping.ts\";\nimport { resolveCursorContextWindow } from \"./context-limit-store.ts\";\nimport { getCursorVariantAlias } from \"./model-capabilities.ts\";\n\nfunction isGroupedShape(model: Model<\"cursor-agent\">): boolean {\n\treturn model.compat?.cursorReasoning !== undefined || getCursorVariantAlias(model.id) === undefined;\n}\n\nfunction entryToModel(entry: CursorCatalogEntry, maxTokensById: ReadonlyMap<string, number>): Model<\"cursor-agent\"> {\n\tconst representative = entry.representativeVariantId ?? entry.legacyAliases[0] ?? entry.id;\n\tconst maxTokens = maxTokensById.get(representative) ?? maxTokensById.get(entry.id) ?? 64000;\n\treturn {\n\t\tid: entry.id,\n\t\tname: entry.name,\n\t\tapi: \"cursor-agent\",\n\t\tprovider: \"cursor\",\n\t\tbaseUrl: \"https://api2.cursor.sh\",\n\t\treasoning: entry.reasoning,\n\t\t...(entry.thinkingLevelMap ? { thinkingLevelMap: entry.thinkingLevelMap } : {}),\n\t\tinput: entry.input,\n\t\tcost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },\n\t\tcontextWindow: resolveCursorContextWindow(entry.id, entry.window),\n\t\tmaxTokens,\n\t\t...(entry.representativeVariantId !== undefined && entry.representativeVariantId !== entry.id\n\t\t\t? { upstreamModelId: entry.representativeVariantId }\n\t\t\t: {}),\n\t\tcompat: {\n\t\t\t...(entry.cursorMaxMode ? { cursorMaxMode: true } : {}),\n\t\t\t...(entry.capabilityId !== undefined && entry.representativeVariantId !== undefined\n\t\t\t\t? {\n\t\t\t\t\t\tcursorReasoning: {\n\t\t\t\t\t\t\tcapabilityId: entry.capabilityId,\n\t\t\t\t\t\t\t...(entry.thinkingMode !== undefined ? { thinkingMode: entry.thinkingMode } : {}),\n\t\t\t\t\t\t\trepresentativeVariantId: entry.representativeVariantId,\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t: {}),\n\t\t},\n\t};\n}\n\n/**\n * Idempotent stored-catalog transform: pre-grouping 204-variant cursor entries\n * are regrouped into selectable identities; already-grouped, unknown, and\n * malformed entries pass through unchanged in stable input order.\n */\nexport function regroupStoredCursorModels(models: readonly Model<\"cursor-agent\">[]): Model<\"cursor-agent\">[] {\n\tconst legacy = models.filter((model) => !isGroupedShape(model));\n\tif (legacy.length === 0) return [...models];\n\tconst maxTokensById = new Map(models.map((model) => [model.id, model.maxTokens]));\n\tconst regrouped = new Map(\n\t\tnormalizeCursorCatalog(\n\t\t\tlegacy.map((model) => ({\n\t\t\t\tid: model.id,\n\t\t\t\tname: model.name,\n\t\t\t\tinput: model.input.filter((modality): modality is \"text\" | \"image\" => modality !== \"video\"),\n\t\t\t\tcursorMaxMode: model.compat?.cursorMaxMode === true,\n\t\t\t})),\n\t\t).map((entry) => [entry.id, entryToModel(entry, maxTokensById)] as const),\n\t);\n\tconst seen = new Set<string>();\n\tconst out: Model<\"cursor-agent\">[] = [];\n\tfor (const model of models) {\n\t\tif (isGroupedShape(model)) {\n\t\t\tout.push(model);\n\t\t\tcontinue;\n\t\t}\n\t\tconst alias = getCursorVariantAlias(model.id);\n\t\tconst targetId = alias?.targetId ?? model.id;\n\t\tif (seen.has(targetId)) continue;\n\t\tseen.add(targetId);\n\t\tconst transformed = regrouped.get(targetId);\n\t\tif (transformed !== undefined) {\n\t\t\tout.push(transformed);\n\t\t} else {\n\t\t\tout.push(model);\n\t\t}\n\t}\n\treturn out;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"store-migration.js","sourceRoot":"","sources":["../../src/cursor/store-migration.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpH,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEtF;;;GAGG;AACH,SAAS,kBAAkB,CAC1B,OAA8B,EAC9B,SAA4C;IAE5C,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAAC,MAAM,CACzE,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,KAA2B,CAAC,IAAI,IAAI,CACpG,CAAC;IACF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC;IAC3C,OAAO,EAAE,GAAG,OAAO,EAAE,gBAAgB,EAAE,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;AAC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orVariantAliases, normalizeCursorCatalog } from \"./catalog-grouping.ts\";\nimport { resolveCursorContextWindow } from \"./context-limit-store.ts\";\nimport { getCursorVariantAlias, parseCursorVariantId } from \"./model-capabilities.ts\";\n\n/**\n * Fill levels a stored static group lacks from flat alias rows regrouped beside it;\n * the group's own levels, representative, and compat metadata are never replaced.\n */\nfunction absorbStaticLevels(\n\tcurrent: Model<\"cursor-agent\">,\n\tflatGroup: Model<\"cursor-agent\"> | undefined,\n): Model<\"cursor-agent\"> {\n\tconst additions = Object.entries(flatGroup?.thinkingLevelMap ?? {}).filter(\n\t\t([level, value]) => value != null && current.thinkingLevelMap?.[level as ModelThinkingLevel] == null,\n\t);\n\tif (additions.length === 0) return current;\n\treturn { ...current, thinkingLevelMap: { ...current.thinkingLevelMap, ...Object.fromEntries(additions) } };\n}\n\nfunction entryToModel(entry: CursorCatalogEntry, maxTokensById: ReadonlyMap<string, number>): Model<\"cursor-agent\"> {\n\tconst representative = entry.representativeVariantId ?? entry.legacyAliases[0] ?? entry.id;\n\tconst maxTokens = maxTokensById.get(representative) ?? maxTokensById.get(entry.id) ?? 64000;\n\treturn {\n\t\tid: entry.id,\n\t\tname: entry.name,\n\t\tapi: \"cursor-agent\",\n\t\tprovider: \"cursor\",\n\t\tbaseUrl: \"https://api2.cursor.sh\",\n\t\treasoning: entry.reasoning,\n\t\t...(entry.thinkingLevelMap ? { thinkingLevelMap: entry.thinkingLevelMap } : {}),\n\t\tinput: entry.input,\n\t\tcost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },\n\t\tcontextWindow: resolveCursorContextWindow(entry.id, entry.window),\n\t\tmaxTokens,\n\t\t...(entry.representativeVariantId !== undefined && entry.representativeVariantId !== entry.id\n\t\t\t? { upstreamModelId: entry.representativeVariantId }\n\t\t\t: {}),\n\t\tcompat: {\n\t\t\t...(entry.cursorMaxMode ? { cursorMaxMode: true } : {}),\n\t\t\t...(entry.capabilityId !== undefined && entry.representativeVariantId !== undefined\n\t\t\t\t? {\n\t\t\t\t\t\tcursorReasoning: {\n\t\t\t\t\t\t\tcapabilityId: entry.capabilityId,\n\t\t\t\t\t\t\t...(entry.thinkingMode !== undefined ? { thinkingMode: entry.thinkingMode } : {}),\n\t\t\t\t\t\t\trepresentativeVariantId: entry.representativeVariantId,\n\t\t\t\t\t\t\t...(entry.variantIds !== undefined ? { variantIds: entry.variantIds } : {}),\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t: {}),\n\t\t},\n\t};\n}\n\n/**\n * Idempotent stored-catalog transform: pre-grouping 204-variant cursor entries\n * are regrouped into selectable identities, including families the static\n * alias table does not list yet, which are derived over the stored batch\n * (senpi#2038). An already-grouped identity (static or derived) always wins\n * over flat rows aliasing it, regardless of input order, and absorbs their\n * levels without losing its own metadata; conflicting derived variants stay\n * flat, and duplicate identities coalesce at their first position in stable\n * input order.\n */\nexport function regroupStoredCursorModels(models: readonly Model<\"cursor-agent\">[]): Model<\"cursor-agent\">[] {\n\tconst existingGroups = new Map<string, Model<\"cursor-agent\">>();\n\tconst existingDerived = new Map<string, Model<\"cursor-agent\">>();\n\tconst representedTargetById = new Map<string, string>();\n\tfor (const model of models) {\n\t\tconst reasoning = model.compat?.cursorReasoning;\n\t\tif (reasoning === undefined || existingGroups.has(model.id)) continue;\n\t\texistingGroups.set(model.id, model);\n\t\tif (reasoning.variantIds === undefined) continue;\n\t\texistingDerived.set(model.id, model);\n\t\tfor (const id of Object.values(reasoning.variantIds)) representedTargetById.set(id, model.id);\n\t}\n\tconst derived = deriveCursorVariantAliases([\n\t\t...models.filter((model) => model.compat?.cursorReasoning === undefined).map((model) => model.id),\n\t\t...[...existingDerived.values()].flatMap((model) =>\n\t\t\tObject.values(model.compat?.cursorReasoning?.variantIds ?? {}),\n\t\t),\n\t]);\n\tconst isLegacy = (model: Model<\"cursor-agent\">): boolean =>\n\t\tmodel.compat?.cursorReasoning === undefined &&\n\t\t(getCursorVariantAlias(model.id) !== undefined || derived.has(model.id) || representedTargetById.has(model.id));\n\tconst legacy = models.filter(isLegacy);\n\tconst maxTokensById = new Map(models.map((model) => [model.id, model.maxTokens]));\n\tconst regrouped = new Map(\n\t\tnormalizeCursorCatalog(\n\t\t\tlegacy.map((model) => ({\n\t\t\t\tid: model.id,\n\t\t\t\tname: model.name,\n\t\t\t\tinput: model.input.filter((modality): modality is \"text\" | \"image\" => modality !== \"video\"),\n\t\t\t\tcursorMaxMode: model.compat?.cursorMaxMode === true,\n\t\t\t})),\n\t\t).map((entry) => [entry.id, entryToModel(entry, maxTokensById)] as const),\n\t);\n\tconst merged = new Map<string, Model<\"cursor-agent\">>();\n\tfor (const [targetId, current] of existingGroups) {\n\t\tconst kept = current.compat?.cursorReasoning;\n\t\tif (kept?.variantIds === undefined) {\n\t\t\tmerged.set(targetId, absorbStaticLevels(current, regrouped.get(targetId)));\n\t\t\tcontinue;\n\t\t}\n\t\tconst variantIds = { ...kept.variantIds };\n\t\tconst thinkingLevelMap = { ...current.thinkingLevelMap };\n\t\tlet changed = false;\n\t\tfor (const model of legacy) {\n\t\t\tconst alias = derived.get(model.id);\n\t\t\tif (alias?.targetId !== targetId || alias.level === undefined) continue;\n\t\t\tif (variantIds[alias.level] !== undefined && variantIds[alias.level] !== model.id) continue;\n\t\t\tvariantIds[alias.level] = model.id;\n\t\t\tthinkingLevelMap[alias.level] = parseCursorVariantId(model.id).level;\n\t\t\tchanged = true;\n\t\t}\n\t\tmerged.set(\n\t\t\ttargetId,\n\t\t\tchanged\n\t\t\t\t? {\n\t\t\t\t\t\t...current,\n\t\t\t\t\t\tthinkingLevelMap,\n\t\t\t\t\t\tcompat: { ...current.compat, cursorReasoning: { ...kept, variantIds } },\n\t\t\t\t\t}\n\t\t\t\t: current,\n\t\t);\n\t}\n\tconst seen = new Set<string>();\n\tconst out: Model<\"cursor-agent\">[] = [];\n\tfor (const model of models) {\n\t\tconst alias = isLegacy(model) ? (getCursorVariantAlias(model.id) ?? derived.get(model.id)) : undefined;\n\t\tconst targetId =\n\t\t\talias?.targetId ?? (isLegacy(model) ? representedTargetById.get(model.id) : undefined) ?? model.id;\n\t\tconst coalesced = merged.get(targetId);\n\t\tif (coalesced !== undefined) {\n\t\t\tconst retainedIds = coalesced.compat?.cursorReasoning?.variantIds;\n\t\t\t// Static groups absorb every flat alias row; derived groups keep conflicting variants flat.\n\t\t\tconst absorbed =\n\t\t\t\tmodel.id === targetId ||\n\t\t\t\t(retainedIds === undefined ? isLegacy(model) : Object.values(retainedIds).includes(model.id));\n\t\t\tif (!absorbed) {\n\t\t\t\tif (!seen.has(model.id)) out.push(model);\n\t\t\t\tseen.add(model.id);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!seen.has(targetId)) out.push(coalesced);\n\t\t\tseen.add(targetId);\n\t\t\tcontinue;\n\t\t}\n\t\tif (!isLegacy(model)) {\n\t\t\tif (!seen.has(model.id)) out.push(model);\n\t\t\tseen.add(model.id);\n\t\t\tcontinue;\n\t\t}\n\t\tif (seen.has(targetId)) continue;\n\t\tseen.add(targetId);\n\t\tout.push(regrouped.get(targetId) ?? model);\n\t}\n\treturn out;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnthropicMessagesCompat, Api, BedrockCompat, CacheRetention, ModelCost, OpenAICompletionsCompat, OpenAIResponsesCompat, ProviderId, ThinkingLevelMap } from "./types.ts";
|
|
1
|
+
import type { AnthropicMessagesCompat, Api, BedrockCompat, CacheRetention, ModelCost, ModelThinkingLevel, OpenAICompletionsCompat, OpenAIResponsesCompat, ProviderId, ThinkingLevelMap } from "./types.ts";
|
|
2
2
|
/** Model interface for the unified model system. */
|
|
3
3
|
export interface Model<TApi extends Api> {
|
|
4
4
|
id: string;
|
|
@@ -60,6 +60,14 @@ export interface CursorAgentCompat {
|
|
|
60
60
|
thinkingMode?: boolean;
|
|
61
61
|
/** Exact catalog variant sent when no explicit selection exists. */
|
|
62
62
|
representativeVariantId: string;
|
|
63
|
+
/**
|
|
64
|
+
* Derived-group variant ids: normalized thinking level -> the exact
|
|
65
|
+
* server-listed variant id observed in the live catalog. Present only on
|
|
66
|
+
* identities derived at runtime from ids the static alias table does not
|
|
67
|
+
* list; explicit selections resolve through it before any capability
|
|
68
|
+
* lookup (senpi#2038).
|
|
69
|
+
*/
|
|
70
|
+
variantIds?: Readonly<Partial<Record<ModelThinkingLevel, string>>>;
|
|
63
71
|
};
|
|
64
72
|
}
|
|
65
73
|
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,uBAAuB,EACvB,GAAG,EACH,aAAa,EACb,cAAc,EACd,SAAS,EACT,uBAAuB,EACvB,qBAAqB,EACrB,UAAU,EACV,gBAAgB,EAChB,MAAM,YAAY,CAAC;AAEpB,oDAAoD;AACpD,MAAM,WAAW,KAAK,CAAC,IAAI,SAAS,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,IAAI,CAAC;IACV,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,KAAK,EAAE,CAAC,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC;IACtC,IAAI,EAAE,SAAS,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;OAGG;IACH,eAAe,CAAC,EAAE,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W,iBAAiB;IACjC,mEAAmE;IACnE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,eAAe,CAAC,EAAE;QACjB,uDAAuD;QACvD,YAAY,EAAE,MAAM,CAAC;QACrB,kEAAkE;QAClE,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,oEAAoE;QACpE,uBAAuB,EAAE,MAAM,CAAC;QAChC;;;;;;WAMG;QACH,UAAU,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;KACnE,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n\tAnthropicMessagesCompat,\n\tApi,\n\tBedrockCompat,\n\tCacheRetention,\n\tModelCost,\n\tOpenAICompletionsCompat,\n\tOpenAIResponsesCompat,\n\tProviderId,\n\tThinkingLevelMap,\n} from \"./types.ts\";\n\n/** Model interface for the unified model system. */\nexport interface Model<TApi extends Api> {\n\tid: string;\n\tname: string;\n\tapi: TApi;\n\tprovider: ProviderId;\n\tbaseUrl: string;\n\treasoning: boolean;\n\t/**\n\t * Maps pi thinking levels to provider/model-specific values.\n\t * In a present map, omitting `xhigh` or `max` disables that extended tier; ordinary missing levels\n\t * use provider defaults. null marks any level as unsupported.\n\t */\n\tthinkingLevelMap?: ThinkingLevelMap;\n\tinput: (\"text\" | \"image\" | \"video\")[];\n\tcost: ModelCost;\n\tcontextWindow: number;\n\tmaxTokens: number;\n\t/** Default sampling parameters; per-request values override these by key. */\n\tsamplingParams?: Record<string, unknown>;\n\theaders?: Record<string, string>;\n\t/** Default prompt-cache retention preference when the request omits one. */\n\tcacheRetention?: CacheRetention;\n\t/**\n\t * Upstream model id sent on the wire when it differs from the catalog id\n\t * (for example `-fast` priority-tier variants aliasing their base model).\n\t */\n\tupstreamModelId?: string;\n\t/** Service tier requested by default for this model (for example `-fast` variants). */\n\tserviceTier?: \"auto\" | \"flex\" | \"priority\";\n\t/** Whether to recover supported text-encoded tool calls from assistant text. */\n\trecoverTextToolCalls?: boolean;\n\t/** Compatibility overrides for OpenAI-compatible APIs. If not set, auto-detected from baseUrl. */\n\tcompat?: TApi extends \"openai-completions\"\n\t\t? OpenAICompletionsCompat\n\t\t: TApi extends \"openai-responses\" | \"openai-codex-responses\" | \"azure-openai-responses\"\n\t\t\t? OpenAIResponsesCompat\n\t\t\t: TApi extends \"anthropic-messages\"\n\t\t\t\t? AnthropicMessagesCompat\n\t\t\t\t: TApi extends \"bedrock-converse-stream\"\n\t\t\t\t\t? BedrockCompat\n\t\t\t\t\t: TApi extends \"cursor-agent\"\n\t\t\t\t\t\t? CursorAgentCompat\n\t\t\t\t\t\t: TApi extends \"devin-agent\"\n\t\t\t\t\t\t\t? DevinAgentCompat\n\t\t\t\t\t\t\t: never;\n}\n\n/** Devin (Cascade) model metadata the transport branches on. */\nexport interface DevinAgentCompat {\n\t/**\n\t * Server-side router (`adaptive`): its uid is never a legal chat model uid, so\n\t * the transport resolves it through `AssignModel` before every turn.\n\t */\n\tmodelRouter?: boolean;\n\t/** The lane accepts several tool calls per turn; absent means one at a time. */\n\tsupportsParallelToolCalls?: boolean;\n}\n\n/** Cursor agent protocol model metadata. */\nexport interface CursorAgentCompat {\n\t/** Request Cursor's max-mode (1M-context) variant of the model. */\n\tcursorMaxMode?: boolean;\n\t/**\n\t * Wire-reasoning capability for grouped Cursor catalog identities.\n\t * Presence is the capability gate: models without it never emit reasoning\n\t * parameters on the wire.\n\t */\n\tcursorReasoning?: {\n\t\t/** Base id into the static cursor capability table. */\n\t\tcapabilityId: string;\n\t\t/** Fixed Claude thinking boolean for this selectable identity. */\n\t\tthinkingMode?: boolean;\n\t\t/** Exact catalog variant sent when no explicit selection exists. */\n\t\trepresentativeVariantId: string;\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n\tAnthropicMessagesCompat,\n\tApi,\n\tBedrockCompat,\n\tCacheRetention,\n\tModelCost,\n\tModelThinkingLevel,\n\tOpenAICompletionsCompat,\n\tOpenAIResponsesCompat,\n\tProviderId,\n\tThinkingLevelMap,\n} from \"./types.ts\";\n\n/** Model interface for the unified model system. */\nexport interface Model<TApi extends Api> {\n\tid: string;\n\tname: string;\n\tapi: TApi;\n\tprovider: ProviderId;\n\tbaseUrl: string;\n\treasoning: boolean;\n\t/**\n\t * Maps pi thinking levels to provider/model-specific values.\n\t * In a present map, omitting `xhigh` or `max` disables that extended tier; ordinary missing levels\n\t * use provider defaults. null marks any level as unsupported.\n\t */\n\tthinkingLevelMap?: ThinkingLevelMap;\n\tinput: (\"text\" | \"image\" | \"video\")[];\n\tcost: ModelCost;\n\tcontextWindow: number;\n\tmaxTokens: number;\n\t/** Default sampling parameters; per-request values override these by key. */\n\tsamplingParams?: Record<string, unknown>;\n\theaders?: Record<string, string>;\n\t/** Default prompt-cache retention preference when the request omits one. */\n\tcacheRetention?: CacheRetention;\n\t/**\n\t * Upstream model id sent on the wire when it differs from the catalog id\n\t * (for example `-fast` priority-tier variants aliasing their base model).\n\t */\n\tupstreamModelId?: string;\n\t/** Service tier requested by default for this model (for example `-fast` variants). */\n\tserviceTier?: \"auto\" | \"flex\" | \"priority\";\n\t/** Whether to recover supported text-encoded tool calls from assistant text. */\n\trecoverTextToolCalls?: boolean;\n\t/** Compatibility overrides for OpenAI-compatible APIs. If not set, auto-detected from baseUrl. */\n\tcompat?: TApi extends \"openai-completions\"\n\t\t? OpenAICompletionsCompat\n\t\t: TApi extends \"openai-responses\" | \"openai-codex-responses\" | \"azure-openai-responses\"\n\t\t\t? OpenAIResponsesCompat\n\t\t\t: TApi extends \"anthropic-messages\"\n\t\t\t\t? AnthropicMessagesCompat\n\t\t\t\t: TApi extends \"bedrock-converse-stream\"\n\t\t\t\t\t? BedrockCompat\n\t\t\t\t\t: TApi extends \"cursor-agent\"\n\t\t\t\t\t\t? CursorAgentCompat\n\t\t\t\t\t\t: TApi extends \"devin-agent\"\n\t\t\t\t\t\t\t? DevinAgentCompat\n\t\t\t\t\t\t\t: never;\n}\n\n/** Devin (Cascade) model metadata the transport branches on. */\nexport interface DevinAgentCompat {\n\t/**\n\t * Server-side router (`adaptive`): its uid is never a legal chat model uid, so\n\t * the transport resolves it through `AssignModel` before every turn.\n\t */\n\tmodelRouter?: boolean;\n\t/** The lane accepts several tool calls per turn; absent means one at a time. */\n\tsupportsParallelToolCalls?: boolean;\n}\n\n/** Cursor agent protocol model metadata. */\nexport interface CursorAgentCompat {\n\t/** Request Cursor's max-mode (1M-context) variant of the model. */\n\tcursorMaxMode?: boolean;\n\t/**\n\t * Wire-reasoning capability for grouped Cursor catalog identities.\n\t * Presence is the capability gate: models without it never emit reasoning\n\t * parameters on the wire.\n\t */\n\tcursorReasoning?: {\n\t\t/** Base id into the static cursor capability table. */\n\t\tcapabilityId: string;\n\t\t/** Fixed Claude thinking boolean for this selectable identity. */\n\t\tthinkingMode?: boolean;\n\t\t/** Exact catalog variant sent when no explicit selection exists. */\n\t\trepresentativeVariantId: string;\n\t\t/**\n\t\t * Derived-group variant ids: normalized thinking level -> the exact\n\t\t * server-listed variant id observed in the live catalog. Present only on\n\t\t * identities derived at runtime from ids the static alias table does not\n\t\t * list; explicit selections resolve through it before any capability\n\t\t * lookup (senpi#2038).\n\t\t */\n\t\tvariantIds?: Readonly<Partial<Record<ModelThinkingLevel, string>>>;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/providers/cursor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAkB,KAAK,QAAQ,EAA6B,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/providers/cursor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAkB,KAAK,QAAQ,EAA6B,MAAM,cAAc,CAAC;AAkExF;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,QAAQ,CAAC,cAAc,CAAC,CAkBzD"}
|
|
@@ -57,6 +57,7 @@ async function fetchCursorModels(context) {
|
|
|
57
57
|
capabilityId: entry.capabilityId,
|
|
58
58
|
...(entry.thinkingMode !== undefined ? { thinkingMode: entry.thinkingMode } : {}),
|
|
59
59
|
representativeVariantId: entry.representativeVariantId,
|
|
60
|
+
...(entry.variantIds !== undefined ? { variantIds: entry.variantIds } : {}),
|
|
60
61
|
},
|
|
61
62
|
}
|
|
62
63
|
: {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/providers/cursor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,cAAc,EAA4C,MAAM,cAAc,CAAC;AAGxF,MAAM,eAAe,GAAG,wBAAwB,CAAC;AAEjD;;;;;;GAMG;AACH,KAAK,UAAU,iBAAiB,CAAC,OAA6B;IAC7D,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,MAAM,WAAW,GAAG,UAAU,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,GAAG,CAAC;IACvF,IAAI,CAAC,WAAW;QAAE,OAAO,EAAE,CAAC;IAC5B,MAAM,EAAE,uBAAuB,EAAE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../api/cursor-agent.lazy.ts\";\nimport { lazyOAuth } from \"../auth/helpers.ts\";\nimport { loadCursorOAuth } from \"../auth/oauth/load.ts\";\nimport { normalizeCursorCatalog } from \"../cursor/catalog-grouping.ts\";\nimport { resolveCursorContextWindow } from \"../cursor/context-limit-store.ts\";\nimport { regroupStoredCursorModels } from \"../cursor/store-migration.ts\";\nimport { createProvider, type Provider, type RefreshModelsContext } from \"../models.ts\";\nimport type { Model } from \"../types.ts\";\n\nconst CURSOR_BASE_URL = \"https://api2.cursor.sh\";\n\n/**\n * Cursor's catalog is fully dynamic: `GetUsableModels` requires an\n * authenticated access token and reports the account's usable models, so the\n * provider ships no static baseline. The discovery call lives in the\n * Node-only `cursor-agent` API module, loaded through the bundler-opaque\n * lazy boundary so the provider factory stays browser-safe.\n */\nasync function fetchCursorModels(context: RefreshModelsContext): Promise<Model<\"cursor-agent\">[]> {\n\tconst credential = context.credential;\n\tconst accessToken = credential?.type === \"oauth\" ? credential.access : credential?.key;\n\tif (!accessToken) return [];\n\tconst { fetchCursorUsableModels } = await loadCursorAgentModule();\n\tconst discovered = await fetchCursorUsableModels({ apiKey: accessToken, signal: context.signal });\n\tif (discovered === null) {\n\t\tthrow new Error(\"Could not load Cursor model catalog from GetUsableModels\");\n\t}\n\tconst normalized = normalizeCursorCatalog(\n\t\tdiscovered.map((model) => ({\n\t\t\tid: model.id,\n\t\t\tname: model.name,\n\t\t\tinput: model.input,\n\t\t\tcursorMaxMode: model.cursorMaxMode,\n\t\t})),\n\t);\n\tconst maxTokensByVariant = new Map(discovered.map((model) => [model.id, model.maxTokens]));\n\treturn normalized.map((entry): Model<\"cursor-agent\"> => {\n\t\tconst representative = entry.representativeVariantId ?? entry.legacyAliases[0] ?? entry.id;\n\t\tconst maxTokens = maxTokensByVariant.get(representative) ?? maxTokensByVariant.get(entry.id) ?? 64000;\n\t\treturn {\n\t\t\tid: entry.id,\n\t\t\tname: entry.name,\n\t\t\tapi: \"cursor-agent\",\n\t\t\tprovider: \"cursor\",\n\t\t\tbaseUrl: CURSOR_BASE_URL,\n\t\t\treasoning: entry.reasoning,\n\t\t\t...(entry.thinkingLevelMap ? { thinkingLevelMap: entry.thinkingLevelMap } : {}),\n\t\t\tinput: entry.input,\n\t\t\t// Subscription-billed: Cursor reports no per-token pricing here.\n\t\t\tcost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },\n\t\t\tcontextWindow: resolveCursorContextWindow(entry.id, entry.window),\n\t\t\tmaxTokens,\n\t\t\t...(entry.representativeVariantId !== undefined && entry.representativeVariantId !== entry.id\n\t\t\t\t? { upstreamModelId: entry.representativeVariantId }\n\t\t\t\t: {}),\n\t\t\tcompat: {\n\t\t\t\t...(entry.cursorMaxMode ? { cursorMaxMode: true } : {}),\n\t\t\t\t...(entry.capabilityId !== undefined && entry.representativeVariantId !== undefined\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tcursorReasoning: {\n\t\t\t\t\t\t\t\tcapabilityId: entry.capabilityId,\n\t\t\t\t\t\t\t\t...(entry.thinkingMode !== undefined ? { thinkingMode: entry.thinkingMode } : {}),\n\t\t\t\t\t\t\t\trepresentativeVariantId: entry.representativeVariantId,\n\t\t\t\t\t\t\t\t...(entry.variantIds !== undefined ? { variantIds: entry.variantIds } : {}),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: {}),\n\t\t\t},\n\t\t};\n\t});\n}\n\n/**\n * Cursor subscription provider (OAuth only).\n *\n * Chat runs on Cursor's protobuf Connect-RPC agent protocol\n * (`agent.v1.AgentService/Run` on `api2.cursor.sh`), implemented by the\n * `cursor-agent` API. The model catalog is discovered per account through\n * `GetUsableModels` after login (`Models.refresh` runs automatically after a\n * successful `/login cursor`).\n */\nexport function cursorProvider(): Provider<\"cursor-agent\"> {\n\treturn createProvider({\n\t\tid: \"cursor\",\n\t\tname: \"Cursor\",\n\t\tbaseUrl: CURSOR_BASE_URL,\n\t\trestoreModels: (models) => regroupStoredCursorModels(models),\n\t\tauth: {\n\t\t\toauth: lazyOAuth({\n\t\t\t\tname: \"Cursor (Pro/Ultra/Teams)\",\n\t\t\t\tisSubscription: true,\n\t\t\t\tloginLabel: \"Sign in with Cursor\",\n\t\t\t\tload: loadCursorOAuth,\n\t\t\t}),\n\t\t},\n\t\tmodels: [],\n\t\tfetchModels: fetchCursorModels,\n\t\tapi: cursorAgentApi(),\n\t});\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":3,"generatedAt":"2026-09-
|
|
1
|
+
{"schemaVersion":3,"generatedAt":"2026-09-23T10:04:49.117Z","structureHash":"08c36e7cab8b6a38f3baae6c7d97294e83c7fb660bcad404a164544e0ebdab22","files":{"alibaba-token-plan.json":"3a9c1be76d47459371e9fa2feeffc31e7edbbfec65fa9cc41236988efc4cf6d9","amazon-bedrock.json":"576881d1e56bec98f8a608bab9e654718dedaaa07bcd60d36afc4b65cc028aba","ant-ling.json":"4979fe79d99ed97382d7ce40170c6132e932e77906de1eb54464c042e7d63633","anthropic.json":"f9db437d92449fb860a2d457a6019cdfd51c11180c08df2b5f14d75ade773953","azure-openai-responses.json":"d70ff10410e6dd8eacb4a53b9fe887be836562cbb4b74eaee4f28bdbc4ac0732","bai.json":"2b12b15bd43462e60711944dd7283db8676611d9d76c82c2a01f64913e16a67e","baseten.json":"d155c434294b5167244cffb6dea6793f9669e91e8ab65b564f9510d81b330e37","cerebras.json":"9eaa554e1b02f3665f8f63e6432d253bf81351af7c72001054dd8108aa528a52","chatgpt-subscription.json":"57d1c9c6e1394549ad2e7c2170770463bb13009c060acddf23b65e41b6ba251b","cloudflare-ai-gateway.json":"a2b9fa9b7bc78df3459a9c53282a9c2f715b7ce703ae0d09c59bec0a6841af49","cloudflare-workers-ai.json":"8ee15540a01cf79d0e4063c493ae3c436af2fc1d456f9faf1b066418247183e9","deepseek.json":"b5f9693ec641e9a957dc5f7a22042b3bb928bac3d7268406619b6f18e21c4b83","fireworks.json":"6283651d25a8861e7d42fe2bdb1cb7dd80802811dfaf61e40c11cc813408c294","github-copilot.json":"5c9fc5b1b553a26aa7bc843a3e36fa14cf220d528ecd89528c601c5090c88a2d","google-vertex.json":"e1631109172dc1f7d7977570420a5bb86258bdd1088427e244a2c51545c4f24d","google.json":"7619bf03edd2a7acb06a2274a14b13c3a61354288abe029a758401d4de36a8fd","groq.json":"e4728fd72e358cd8f25e9a518e9b49a521ef44523d3debe38a7db9e0663c4077","huggingface.json":"2f93082144a7b2a1cbf79148244ce7559e0428d6310c5eb0648bca89b15a8b4b","minimax-cn.json":"65d37e55a6d9585855f94b3fb7739308d107fe248ebd9e1001d1c5d4606ad2c4","minimax.json":"c7dc5765995ae77242916430929c7cc9a782589f7e483e13f7e01663190d028e","mistral.json":"be522597b22bceeb0bb9a0ba1781647649ffd19637d0c8e67b056d7b0ec33d52","moonshotai-cn.json":"c4e1801b5dfd61bebcaa33cbfc5ed0c69df14a3bee37da218a558668d817864e","moonshotai.json":"3dab637e7e2648792c786157f85f29026b93393f7098b77593c1180928d371c9","nvidia.json":"6493e09b5db8b8fe9c8fae5bc15dc287645f37f83a4ed3a1ad1181e5830b5ff7","openai.json":"c53d456ff9e0dfd17c936e11b6fe8b86ecad12bc47430596b381ada9be0a3cdb","opencode-go.json":"64ea73012b153ef5d618663b6b542d527e43383e63b6b49f5961b310508c41cd","opencode.json":"56af2b79a8fdf7f911737c2d3426c17c6ae84f40873c54a30a00530d30bbb740","opengateway.json":"0c36520bba5118b12aafa0fb367c8c57a57d1a2c859f4b4c39f1ef051c0648c3","openrouter.json":"f02fdcfa0d18156bf768157623bfedcd5294d056522808af6e7c5e14822b8288","qwen-token-plan-cn.json":"4bf520ed38e5c3045680d2ec2816fa8a69079dbe97f7b929767a63172288da6b","qwen-token-plan-individual.json":"eb040e78595853e980011308b1bf9caacae6dc8a91abbac5ffebd402515dd2a6","qwen-token-plan.json":"a5c67213745329ec3ba79f712f31c1c32a781d7ffb8c04f9819f36c27672531f","together.json":"927c707d06f2236cdab13f14c870fb58bce0614ba7287bbcd57cc9fd66d191ed","venice.json":"b58d7e9dca552c1df17f8c2b0da71fd81e0bc5abdccde1393dcf37c4909076fb","vercel-ai-gateway.json":"5caa8135a9a4da65265729ff3a9f33ef2ea17cf4f8e33d7ce43f3ba03c10de96","xai.json":"9b23faa5218e966a17108c05d2498a617ade1eae9b0d0684284c77d67949a3f1","xiaomi-token-plan-ams.json":"7df74a255259fc1d5be8e682c3ffb0908eaaf0af711f6433dedcf345ce3e8393","xiaomi-token-plan-cn.json":"7dc672723d5b37e5b92605752f74f46f44eba10be2b0cb959790260b9e0c2a4e","xiaomi-token-plan-sgp.json":"69b333b158be038459a511a673f4536a5b03d4931c3119339f1ac741bc03d502","xiaomi.json":"333299657f211ad9edac0f3d4298b7e5776626914c9c80e22305a87533f23966","zai-coding-cn.json":"69c572aa75104f16ccbddbaace60c267f4bcc74f86d34891ca43110d312fb1ad","zai.json":"15c8182a88e58bdc1b1c3eb0603c690475342c8a826ceddfe9af1b36b28345ee"}}
|