@sylphx/flow 2.1.8 → 2.1.10

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @sylphx/flow
2
2
 
3
+ ## 2.1.10 (2025-11-28)
4
+
5
+ ### šŸ› Bug Fixes
6
+
7
+ - **upgrade:** prevent recursive self-upgrade with env flag ([43416fa](https://github.com/SylphxAI/flow/commit/43416faabf18a6ba93c4c739a7fe1300aa63cb60))
8
+ - **upgrade:** re-exec process after self-upgrade ([d2111f8](https://github.com/SylphxAI/flow/commit/d2111f800eb91e0b377d4e434ccdb214d71a1d27))
9
+
10
+ ## 2.1.9 (2025-11-28)
11
+
12
+ ### šŸ› Bug Fixes
13
+
14
+ - **mcp:** use process.cwd() instead of undefined cwd variable ([aa99db0](https://github.com/SylphxAI/flow/commit/aa99db0a96bb333c38da3c73c325fddf124948d8))
15
+
3
16
  ## 2.1.8 (2025-11-28)
4
17
 
5
18
  ### šŸ› Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/flow",
3
- "version": "2.1.8",
3
+ "version": "2.1.10",
4
4
  "description": "One CLI to rule them all. Unified orchestration layer for Claude Code, OpenCode, Cursor and all AI development tools. Auto-detection, auto-installation, auto-upgrade.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -232,8 +232,19 @@ export class AutoUpgrade {
232
232
  if (status.flowNeedsUpgrade || status.targetNeedsUpgrade) {
233
233
  console.log(chalk.cyan('\nšŸ“¦ Installing updates...\n'));
234
234
 
235
- if (status.flowNeedsUpgrade) {
236
- await this.upgradeFlow();
235
+ if (status.flowNeedsUpgrade && !process.env.SYLPHX_FLOW_UPGRADED) {
236
+ const upgraded = await this.upgradeFlow();
237
+ if (upgraded) {
238
+ // Re-exec the process to use the new version
239
+ console.log(chalk.cyan('\nšŸ”„ Restarting with updated version...\n'));
240
+ const { spawn } = await import('node:child_process');
241
+ const child = spawn(process.argv[0], process.argv.slice(1), {
242
+ stdio: 'inherit',
243
+ env: { ...process.env, SYLPHX_FLOW_UPGRADED: '1' },
244
+ });
245
+ child.on('exit', (code) => process.exit(code ?? 0));
246
+ return; // Don't continue with old code
247
+ }
237
248
  }
238
249
 
239
250
  if (status.targetNeedsUpgrade && targetId) {
@@ -208,7 +208,7 @@ Please begin your response with a comprehensive summary of all the instructions
208
208
  const args = ['--dangerously-skip-permissions'];
209
209
 
210
210
  // Add MCP config flag to explicitly load project MCP servers
211
- const mcpConfigPath = path.join(cwd, this.config.configFile);
211
+ const mcpConfigPath = path.join(process.cwd(), this.config.configFile);
212
212
  args.push('--mcp-config', mcpConfigPath);
213
213
 
214
214
  // Add print and continue flags