@pushpalsdev/cli 1.0.75 → 1.0.77
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/pushpals-cli.js +27 -2
- package/package.json +1 -1
package/dist/pushpals-cli.js
CHANGED
|
@@ -2273,6 +2273,26 @@ function writeTextFileIfMissing(pathValue, text) {
|
|
|
2273
2273
|
mkdirSync(dirname(pathValue), { recursive: true });
|
|
2274
2274
|
writeFileSync(pathValue, text, "utf8");
|
|
2275
2275
|
}
|
|
2276
|
+
function escapeRegExp(value) {
|
|
2277
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2278
|
+
}
|
|
2279
|
+
function migrateEmbeddedRuntimeTomlSection(text, sectionName, transform) {
|
|
2280
|
+
const sectionPattern = new RegExp(`(^\\[${escapeRegExp(sectionName)}\\]\\r?\\n)([\\s\\S]*?)(?=\\r?\\n\\[|(?![\\s\\S]))`, "m");
|
|
2281
|
+
return text.replace(sectionPattern, (_match, header, body) => {
|
|
2282
|
+
return `${header}${transform(body)}`;
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
function migrateLegacyOpenAICodexDefaults(sectionBody, opts) {
|
|
2286
|
+
const backendIsOpenAICodex = /^\s*backend\s*=\s*"openai_codex"\s*$/m.test(sectionBody);
|
|
2287
|
+
if (!backendIsOpenAICodex && opts.includeModel)
|
|
2288
|
+
return sectionBody;
|
|
2289
|
+
let updated = sectionBody;
|
|
2290
|
+
if (opts.includeModel) {
|
|
2291
|
+
updated = updated.replace(/^(\s*model\s*=\s*)"gpt-5\.4"\s*$/m, '$1"gpt-5.5"');
|
|
2292
|
+
}
|
|
2293
|
+
updated = updated.replace(/^(\s*reasoning_effort\s*=\s*)"high"\s*$/m, '$1"xhigh"');
|
|
2294
|
+
return updated;
|
|
2295
|
+
}
|
|
2276
2296
|
function migrateEmbeddedRuntimeLocalToml(localTomlPath) {
|
|
2277
2297
|
if (!existsSync5(localTomlPath))
|
|
2278
2298
|
return;
|
|
@@ -2284,8 +2304,13 @@ function migrateEmbeddedRuntimeLocalToml(localTomlPath) {
|
|
|
2284
2304
|
}
|
|
2285
2305
|
const updated = original.replace(/^(\[remotebuddy\.autonomy\]\r?\n)(enabled\s*=\s*false\s*\r?\n)/m, `$1enabled = true
|
|
2286
2306
|
`);
|
|
2287
|
-
|
|
2288
|
-
|
|
2307
|
+
let migrated = updated;
|
|
2308
|
+
for (const sectionName of ["localbuddy.llm", "remotebuddy.llm", "workerpals.llm"]) {
|
|
2309
|
+
migrated = migrateEmbeddedRuntimeTomlSection(migrated, sectionName, (sectionBody) => migrateLegacyOpenAICodexDefaults(sectionBody, { includeModel: true }));
|
|
2310
|
+
}
|
|
2311
|
+
migrated = migrateEmbeddedRuntimeTomlSection(migrated, "workerpals.openai_codex", (sectionBody) => migrateLegacyOpenAICodexDefaults(sectionBody, { includeModel: false }));
|
|
2312
|
+
if (migrated !== original) {
|
|
2313
|
+
writeFileSync(localTomlPath, migrated, "utf8");
|
|
2289
2314
|
}
|
|
2290
2315
|
}
|
|
2291
2316
|
function copyRuntimeAssetBundle(source, runtimeRoot, force) {
|