openzoo 0.20.0 → 0.20.1
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/lib/cursorcfg.js +17 -1
- package/package.json +1 -1
package/lib/cursorcfg.js
CHANGED
|
@@ -204,6 +204,20 @@ export function pinEditorProviderConfig(which, { baseUrl, models }) {
|
|
|
204
204
|
if (!fs.existsSync(db)) return null;
|
|
205
205
|
const esc = (v) => String(v).replace(/'/g, "''");
|
|
206
206
|
const modelJson = esc(JSON.stringify(models.map((m) => ({ name: m, defaultOn: true, supportsAgent: true }))));
|
|
207
|
+
// The UI list must be pinned TOO. Pinning only availableAPIKeyModels meant
|
|
208
|
+
// the editor could wipe availableDefaultModels2 — the list the Models pane
|
|
209
|
+
// actually renders — and nothing put it back: measured, 413 entries in the
|
|
210
|
+
// API list and 0 in the UI, i.e. the models vanished from the picker in real
|
|
211
|
+
// time while the config still claimed they were there.
|
|
212
|
+
const uiJson = esc(JSON.stringify(models.map((m) => ({
|
|
213
|
+
name: m, defaultOn: true, supportsAgent: true, degradationStatus: 0,
|
|
214
|
+
supportsThinking: true, supportsImages: true, supportsMaxMode: true,
|
|
215
|
+
supportsNonMaxMode: true, serverModelName: m,
|
|
216
|
+
isRecommendedForBackgroundComposer: false, supportsPlanMode: true,
|
|
217
|
+
supportsSandboxing: true, isUserAdded: true, inputboxShortModelName: m,
|
|
218
|
+
parameterDefinitions: [], variants: [], legacySlugs: [], idAliases: [],
|
|
219
|
+
namedModelSectionIndex: 1, cloudAgentEffortModes: [], modelPickerBadges: [],
|
|
220
|
+
}))));
|
|
207
221
|
const primary = esc(models[0]);
|
|
208
222
|
const base = esc(baseUrl);
|
|
209
223
|
const sql = `
|
|
@@ -211,13 +225,15 @@ DROP TRIGGER IF EXISTS openzoo_pin;
|
|
|
211
225
|
CREATE TRIGGER openzoo_pin AFTER UPDATE ON ItemTable
|
|
212
226
|
WHEN NEW.key = '${KEY}'
|
|
213
227
|
AND (json_extract(NEW.value,'$.openAIBaseUrl') IS NOT '${base}'
|
|
214
|
-
OR json_extract(NEW.value,'$.featureModelConfigs.composer.defaultModel') IS NOT '${primary}'
|
|
228
|
+
OR json_extract(NEW.value,'$.featureModelConfigs.composer.defaultModel') IS NOT '${primary}'
|
|
229
|
+
OR json_array_length(json_extract(NEW.value,'$.availableDefaultModels2')) IS NOT ${models.length})
|
|
215
230
|
BEGIN
|
|
216
231
|
UPDATE ItemTable SET value = json_set(
|
|
217
232
|
NEW.value,
|
|
218
233
|
'$.openAIBaseUrl', '${base}',
|
|
219
234
|
'$.useOpenAIKey', json('true'),
|
|
220
235
|
'$.availableAPIKeyModels', json('${modelJson}'),
|
|
236
|
+
'$.availableDefaultModels2', json('${uiJson}'),
|
|
221
237
|
'$.featureModelConfigs.composer.defaultModel', '${primary}',
|
|
222
238
|
'$.featureModelConfigs.cmdK.defaultModel', '${primary}'
|
|
223
239
|
) WHERE key = NEW.key;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "Local x402-paying proxy + MCP server for openzoo.fun — point any OpenAI-compatible harness (Cursor, Claude Code, aider, SDKs) at localhost and it pays per call from a local burner wallet. Solana and Base rails live; Robinhood experimental.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|