limbo-ai 1.24.0 → 1.24.2
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/cli.js +9 -10
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -1667,23 +1667,20 @@ async function cmdStart() {
|
|
|
1667
1667
|
return startContainerWithConfig(cfg, existingEnv, alreadyHasEnv);
|
|
1668
1668
|
}
|
|
1669
1669
|
|
|
1670
|
-
// ── Route: Wizard reconfigure
|
|
1671
|
-
|
|
1670
|
+
// ── Route: Wizard reconfigure or fresh install ─────────────────────────────
|
|
1671
|
+
// For --reconfigure: always write FORCE_SETUP_MODE so the entrypoint clears
|
|
1672
|
+
// internal config. The host .env may not have MODEL_PROVIDER (wizard-configured
|
|
1673
|
+
// users store config only inside the Docker volume), so we can't gate on
|
|
1674
|
+
// hasProviderConfig — the user explicitly asked to reconfigure.
|
|
1675
|
+
if (reconfig) {
|
|
1672
1676
|
log('Resetting configuration for setup wizard...');
|
|
1673
|
-
// Write minimal .env with FORCE_SETUP_MODE — the entrypoint will handle
|
|
1674
|
-
// clearing internal config files. This is more reliable than running
|
|
1675
|
-
// `docker compose run` to delete files inside the volume, which can fail
|
|
1676
|
-
// silently due to permissions or Docker state issues.
|
|
1677
1677
|
const minimalContent = `CLI_LANGUAGE=${existingEnv.CLI_LANGUAGE || 'en'}\nLIMBO_PORT=${PORT}\nFORCE_SETUP_MODE=true\n`;
|
|
1678
1678
|
fs.writeFileSync(ENV_FILE, minimalContent, { mode: 0o600 });
|
|
1679
|
-
// Keep gateway token secret intact
|
|
1680
1679
|
ensureGatewayToken(existingEnv);
|
|
1681
1680
|
}
|
|
1682
1681
|
|
|
1683
|
-
// ── Route: Wizard (default for fresh install or wizard reconfigure) ───────
|
|
1684
1682
|
log('Starting Limbo with setup wizard...');
|
|
1685
1683
|
if (!alreadyHasEnv && !reconfig) {
|
|
1686
|
-
// Fresh install only — reconfigure already wrote its own .env above
|
|
1687
1684
|
writeMinimalEnv();
|
|
1688
1685
|
}
|
|
1689
1686
|
|
|
@@ -1788,6 +1785,8 @@ function selfUpdateCli() {
|
|
|
1788
1785
|
log(`Updating CLI: ${pkg.version} → ${latest}...`);
|
|
1789
1786
|
execSync('npm install -g limbo-ai@latest', { stdio: 'inherit', timeout: 60000 });
|
|
1790
1787
|
ok(`CLI updated to ${latest}.`);
|
|
1788
|
+
// Clear update-check cache so notifyUpdate() won't show a stale banner
|
|
1789
|
+
try { fs.unlinkSync(UPDATE_CHECK_FILE); } catch {}
|
|
1791
1790
|
} else {
|
|
1792
1791
|
// npx served a stale cached version — clear it
|
|
1793
1792
|
warn(`CLI is outdated (${pkg.version} → ${latest}). npx served a cached version.`);
|
|
@@ -2068,7 +2067,7 @@ if (require.main === module) {
|
|
|
2068
2067
|
const [,, cmd = 'start'] = process.argv;
|
|
2069
2068
|
|
|
2070
2069
|
(async () => {
|
|
2071
|
-
checkForUpdateInBackground();
|
|
2070
|
+
if (cmd !== 'update') checkForUpdateInBackground();
|
|
2072
2071
|
|
|
2073
2072
|
switch (cmd) {
|
|
2074
2073
|
case 'start':
|