@sylphx/flow 2.2.0 → 2.3.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @sylphx/flow
|
|
2
2
|
|
|
3
|
+
## 2.3.1 (2025-12-02)
|
|
4
|
+
|
|
5
|
+
### 🐛 Bug Fixes
|
|
6
|
+
|
|
7
|
+
- **upgrade:** fix auto-upgrade using wrong package manager ([a8a2b92](https://github.com/SylphxAI/flow/commit/a8a2b927534b7f92de48c77df25ee1e11d345380))
|
|
8
|
+
|
|
9
|
+
### 🔧 Chores
|
|
10
|
+
|
|
11
|
+
- migrate from vitest to bun test and fix doctor issues ([af35a27](https://github.com/SylphxAI/flow/commit/af35a27546786a99cbd475dae3f5cfb874ee8ab8))
|
|
12
|
+
|
|
13
|
+
## 2.3.0 (2025-12-02)
|
|
14
|
+
|
|
15
|
+
### ✨ Features
|
|
16
|
+
|
|
17
|
+
- **prompts:** add doc update requirements to coder modes ([c489f71](https://github.com/SylphxAI/flow/commit/c489f716d7415f1f077c9318f9cc5fc72fd097ed))
|
|
18
|
+
- **prompts:** add mode transition announcement to core rules ([19b18b0](https://github.com/SylphxAI/flow/commit/19b18b0adc49c6eb9da80e61ccdb2a8ce04ac425))
|
|
19
|
+
|
|
20
|
+
### 🐛 Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **cli:** save provider selection to prevent repeated prompts ([757a6c9](https://github.com/SylphxAI/flow/commit/757a6c90620cc475f381d0c0a37bf20f1be32438))
|
|
23
|
+
|
|
24
|
+
### ♻️ Refactoring
|
|
25
|
+
|
|
26
|
+
- **prompts:** remove silent execution constraint from output style ([6fe64d3](https://github.com/SylphxAI/flow/commit/6fe64d322ac1f670f7fbb3a4d80d5b5ed2186267))
|
|
27
|
+
|
|
3
28
|
## 2.2.0 (2025-12-01)
|
|
4
29
|
|
|
5
30
|
### ✨ Features
|
package/assets/agents/coder.md
CHANGED
|
@@ -43,7 +43,7 @@ You write and modify code. You execute, test, fix, and deliver working solutions
|
|
|
43
43
|
- [ ] Know all files to modify
|
|
44
44
|
- [ ] Understand why current code is structured this way
|
|
45
45
|
|
|
46
|
-
**Exit when:** Full context gathered + clear implementation plan (solution describable in <3 sentences)
|
|
46
|
+
**Exit when:** Full context gathered + clear implementation plan (solution describable in <3 sentences) + relevant docs updated
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
@@ -67,10 +67,11 @@ You write and modify code. You execute, test, fix, and deliver working solutions
|
|
|
67
67
|
- Run tests → verify pass
|
|
68
68
|
- Commit immediately (don't wait)
|
|
69
69
|
- Refactor NOW (not later)
|
|
70
|
+
- **Track progress**: Update progress-related docs as you complete each step
|
|
70
71
|
- Update documentation
|
|
71
72
|
- Commit docs if separate change
|
|
72
73
|
|
|
73
|
-
**Exit when:** Tests pass + docs updated + all changes committed + no TODOs
|
|
74
|
+
**Exit when:** Tests pass + docs updated + progress tracked + all changes committed + no TODOs
|
|
74
75
|
|
|
75
76
|
---
|
|
76
77
|
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Silent
|
|
3
|
-
description:
|
|
3
|
+
description: Structured completion reports
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Silent Execution Style
|
|
7
7
|
|
|
8
|
-
## During Execution
|
|
9
|
-
|
|
10
|
-
Use tool calls only. No text responses.
|
|
11
|
-
|
|
12
|
-
User sees work through:
|
|
13
|
-
- Tool call executions
|
|
14
|
-
- File modifications
|
|
15
|
-
- Test results
|
|
16
|
-
- Commits
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
8
|
## At Completion
|
|
21
9
|
|
|
22
10
|
Report what was accomplished. Structured, comprehensive, reviewable.
|
|
@@ -162,13 +150,6 @@ Users need to:
|
|
|
162
150
|
|
|
163
151
|
## Never
|
|
164
152
|
|
|
165
|
-
Don't narrate during execution.
|
|
166
|
-
|
|
167
|
-
<example>
|
|
168
|
-
❌ "Now I'm going to search for the authentication logic..."
|
|
169
|
-
✅ [Uses Grep tool silently]
|
|
170
|
-
</example>
|
|
171
|
-
|
|
172
153
|
Don't create report files (ANALYSIS.md, FINDINGS.md, REPORT.md).
|
|
173
154
|
|
|
174
155
|
Report directly to user at completion.
|
package/assets/rules/core.md
CHANGED
|
@@ -213,6 +213,14 @@ When stuck:
|
|
|
213
213
|
|
|
214
214
|
## Communication
|
|
215
215
|
|
|
216
|
+
**Mode Transition**: When entering a new working mode, briefly state the mode and its key focus. Aligns expectations for user and yourself.
|
|
217
|
+
|
|
218
|
+
<example>
|
|
219
|
+
"Entering Design Mode - investigating existing patterns before implementation."
|
|
220
|
+
"Switching to Debug Mode - reproducing issue first, then tracing root cause."
|
|
221
|
+
"Implementation Mode - design complete, writing code with TDD approach."
|
|
222
|
+
</example>
|
|
223
|
+
|
|
216
224
|
**Output Style**: Concise and direct. No fluff, no apologies, no hedging. Show, don't tell. Code examples over explanations. One clear statement over three cautious ones.
|
|
217
225
|
|
|
218
226
|
**Task Completion**: Report accomplishments using structured format.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sylphx/flow",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
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": {
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"scripts": {
|
|
20
20
|
"dev": "bun src/index.ts",
|
|
21
21
|
"start": "bun src/index.ts",
|
|
22
|
-
"test": "
|
|
23
|
-
"test:watch": "
|
|
22
|
+
"test": "bun test",
|
|
23
|
+
"test:watch": "bun test --watch",
|
|
24
24
|
"type-check": "tsc --noEmit",
|
|
25
25
|
"prepublishOnly": "echo 'Using assets from packages/flow/assets'"
|
|
26
26
|
},
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^24.9.2",
|
|
41
|
-
"typescript": "^5.9.3"
|
|
42
|
-
"vitest": "^4.0.6"
|
|
41
|
+
"typescript": "^5.9.3"
|
|
43
42
|
},
|
|
44
43
|
"publishConfig": {
|
|
45
44
|
"access": "public"
|
|
@@ -59,7 +59,7 @@ async function selectProvider(configService: GlobalConfigService): Promise<void>
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// Ask user which provider to use for this session
|
|
62
|
-
const { selectedProvider } = await inquirer.prompt([
|
|
62
|
+
const { selectedProvider, rememberChoice } = await inquirer.prompt([
|
|
63
63
|
{
|
|
64
64
|
type: 'list',
|
|
65
65
|
name: 'selectedProvider',
|
|
@@ -71,8 +71,21 @@ async function selectProvider(configService: GlobalConfigService): Promise<void>
|
|
|
71
71
|
],
|
|
72
72
|
default: 'default',
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
type: 'confirm',
|
|
76
|
+
name: 'rememberChoice',
|
|
77
|
+
message: 'Remember this choice?',
|
|
78
|
+
default: true,
|
|
79
|
+
},
|
|
74
80
|
]);
|
|
75
81
|
|
|
82
|
+
// Save choice if user wants to remember
|
|
83
|
+
if (rememberChoice) {
|
|
84
|
+
providerConfig.claudeCode.defaultProvider = selectedProvider;
|
|
85
|
+
await configService.saveProviderConfig(providerConfig);
|
|
86
|
+
console.log(chalk.dim(' (Saved to settings)\n'));
|
|
87
|
+
}
|
|
88
|
+
|
|
76
89
|
// Configure environment variables based on selection
|
|
77
90
|
if (selectedProvider === 'kimi' || selectedProvider === 'zai') {
|
|
78
91
|
const provider = providerConfig.claudeCode.providers[selectedProvider];
|
|
@@ -6,12 +6,16 @@
|
|
|
6
6
|
import { exec } from 'node:child_process';
|
|
7
7
|
import fs from 'node:fs/promises';
|
|
8
8
|
import path from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
9
10
|
import { promisify } from 'node:util';
|
|
10
11
|
import chalk from 'chalk';
|
|
11
12
|
import ora from 'ora';
|
|
12
13
|
import { detectPackageManager, getUpgradeCommand } from '../utils/package-manager-detector.js';
|
|
13
14
|
import { TargetInstaller } from './target-installer.js';
|
|
14
15
|
|
|
16
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
17
|
+
const __dirname = path.dirname(__filename);
|
|
18
|
+
|
|
15
19
|
const execAsync = promisify(exec);
|
|
16
20
|
|
|
17
21
|
export interface UpgradeStatus {
|
|
@@ -116,15 +120,47 @@ export class AutoUpgrade {
|
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
/**
|
|
119
|
-
*
|
|
123
|
+
* Detect which package manager was used to install Flow globally
|
|
124
|
+
* by checking the executable path
|
|
125
|
+
*/
|
|
126
|
+
private async detectFlowPackageManager(): Promise<'bun' | 'npm' | 'pnpm' | 'yarn'> {
|
|
127
|
+
try {
|
|
128
|
+
const { stdout } = await execAsync('which flow || where flow');
|
|
129
|
+
const flowPath = stdout.trim().toLowerCase();
|
|
130
|
+
|
|
131
|
+
if (flowPath.includes('bun')) {
|
|
132
|
+
return 'bun';
|
|
133
|
+
}
|
|
134
|
+
if (flowPath.includes('pnpm')) {
|
|
135
|
+
return 'pnpm';
|
|
136
|
+
}
|
|
137
|
+
if (flowPath.includes('yarn')) {
|
|
138
|
+
return 'yarn';
|
|
139
|
+
}
|
|
140
|
+
} catch {
|
|
141
|
+
// Fall through to default
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Default to bun as it's the recommended install method
|
|
145
|
+
return 'bun';
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Upgrade Flow to latest version using the package manager that installed it
|
|
120
150
|
* @returns True if upgrade successful, false otherwise
|
|
121
151
|
*/
|
|
122
152
|
async upgradeFlow(): Promise<boolean> {
|
|
123
|
-
const packageManager = detectPackageManager(this.projectPath);
|
|
124
153
|
const spinner = ora('Upgrading Flow...').start();
|
|
125
154
|
|
|
126
155
|
try {
|
|
127
|
-
|
|
156
|
+
// Detect which package manager was used to install Flow
|
|
157
|
+
const flowPm = await this.detectFlowPackageManager();
|
|
158
|
+
const upgradeCmd = getUpgradeCommand('@sylphx/flow', flowPm);
|
|
159
|
+
|
|
160
|
+
if (this.options.verbose) {
|
|
161
|
+
console.log(chalk.dim(` Using ${flowPm}: ${upgradeCmd}`));
|
|
162
|
+
}
|
|
163
|
+
|
|
128
164
|
await execAsync(upgradeCmd);
|
|
129
165
|
|
|
130
166
|
spinner.succeed(chalk.green('✓ Flow upgraded to latest version'));
|