@sylphx/flow 3.17.0 → 3.17.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/CHANGELOG.md +21 -0
- package/assets/agents/builder.md +38 -1
- package/package.json +80 -80
- package/src/commands/flow/execute-v2.ts +18 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @sylphx/flow
|
|
2
2
|
|
|
3
|
+
## 3.17.2 (2026-02-05)
|
|
4
|
+
|
|
5
|
+
Fix target selection persistence and optimize startup flow
|
|
6
|
+
|
|
7
|
+
### 🐛 Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **flow:** persist target selection on first run ([923f48d](https://github.com/SylphxAI/flow/commit/923f48d6a8472ffe4197705ba078c246b76fea5b))
|
|
10
|
+
|
|
11
|
+
### ⚡️ Performance
|
|
12
|
+
|
|
13
|
+
- **flow:** optimize startup flow ([cc012bd](https://github.com/SylphxAI/flow/commit/cc012bd003c577f121b134241a0cd05a1324bf35))
|
|
14
|
+
|
|
15
|
+
## 3.17.1 (2026-02-05)
|
|
16
|
+
|
|
17
|
+
Add Hono RPC patterns and declarative engineering principles
|
|
18
|
+
|
|
19
|
+
### 📚 Documentation
|
|
20
|
+
|
|
21
|
+
- **builder:** prioritize declarative style in engineering principles ([f2e5bc4](https://github.com/SylphxAI/flow/commit/f2e5bc482ce554097e2bc90943c22f3d497f0925))
|
|
22
|
+
- **builder:** add Hono RPC patterns for split clients ([c848796](https://github.com/SylphxAI/flow/commit/c8487965a8341aac1f9644d5de75c1dd36b1c661))
|
|
23
|
+
|
|
3
24
|
## 3.17.0 (2026-02-05)
|
|
4
25
|
|
|
5
26
|
### ♻️ Refactoring
|
package/assets/agents/builder.md
CHANGED
|
@@ -123,9 +123,10 @@ State-of-the-art industrial standard. Every time. Would you stake your reputatio
|
|
|
123
123
|
|
|
124
124
|
## Engineering
|
|
125
125
|
|
|
126
|
+
- **Declarative over imperative** — describe WHAT, not HOW; prefer expressions over statements, data over control flow
|
|
127
|
+
- **Pure functions** — no side effects, deterministic output; isolate impure code at boundaries
|
|
126
128
|
- **Single Source of Truth** — one authoritative source for every state, behavior, and decision
|
|
127
129
|
- **Type safety** — end-to-end across all boundaries (Hono RPC, Zod, strict TypeScript)
|
|
128
|
-
- **Pure functions** — no side effects, deterministic output; isolate impure code at boundaries
|
|
129
130
|
- **Decoupling** — minimize dependencies, use interfaces and dependency injection
|
|
130
131
|
- **Modularisation** — single responsibility, clear boundaries, independent deployability
|
|
131
132
|
- **Composition over inheritance** — build primitives that compose
|
|
@@ -185,6 +186,42 @@ drizzle-kit migrate && drizzle-kit push --dry-run
|
|
|
185
186
|
```
|
|
186
187
|
If there's any diff, migration is incomplete — fail the build.
|
|
187
188
|
|
|
189
|
+
## Hono RPC
|
|
190
|
+
|
|
191
|
+
**Split clients by entity** — monolithic `hc<AppType>` kills IDE performance at 100+ routes.
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
// ✅ Split: one Hono app + one client per entity
|
|
195
|
+
const booksApp = new Hono()
|
|
196
|
+
.get('/', (c) => c.json([]))
|
|
197
|
+
.post('/', (c) => c.json({ id: 1 }))
|
|
198
|
+
.get('/:id', (c) => c.json({ id: c.req.param('id') }))
|
|
199
|
+
|
|
200
|
+
const authorsApp = new Hono()
|
|
201
|
+
.get('/', (c) => c.json([]))
|
|
202
|
+
.post('/', (c) => c.json({ id: 1 }))
|
|
203
|
+
|
|
204
|
+
// Main app — chain with .route()
|
|
205
|
+
const app = new Hono()
|
|
206
|
+
.route('/books', booksApp)
|
|
207
|
+
.route('/authors', authorsApp)
|
|
208
|
+
|
|
209
|
+
// Clients — split by entity, <100 routes each
|
|
210
|
+
export const booksClient = hc<typeof booksApp>('/api/books')
|
|
211
|
+
export const authorsClient = hc<typeof authorsApp>('/api/authors')
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Chain routes** — separate `app.get()` calls break type inference:
|
|
215
|
+
```typescript
|
|
216
|
+
// ✅ Chained — types work
|
|
217
|
+
const app = new Hono().get('/', h1).post('/', h2)
|
|
218
|
+
|
|
219
|
+
// ❌ Separate — types broken
|
|
220
|
+
const app = new Hono()
|
|
221
|
+
app.get('/', h1)
|
|
222
|
+
app.post('/', h2)
|
|
223
|
+
```
|
|
224
|
+
|
|
188
225
|
## Frontend
|
|
189
226
|
|
|
190
227
|
- **Semantic HTML** — correct elements (nav, main, article, section, aside, header, footer)
|
package/package.json
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
2
|
+
"name": "@sylphx/flow",
|
|
3
|
+
"version": "3.17.2",
|
|
4
|
+
"description": "One CLI to rule them all. Unified orchestration layer for AI coding assistants. Auto-detection, auto-installation, auto-upgrade.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"sylphx-flow": "./src/index.ts",
|
|
8
|
+
"flow": "./src/index.ts"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./src/index.ts",
|
|
13
|
+
"types": "./src/index.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18.0.0"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "bun src/index.ts",
|
|
21
|
+
"start": "bun src/index.ts",
|
|
22
|
+
"test": "bun test",
|
|
23
|
+
"test:watch": "bun test --watch",
|
|
24
|
+
"type-check": "tsc --noEmit",
|
|
25
|
+
"prepublishOnly": "echo 'Using assets from packages/flow/assets'"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@clack/prompts": "^0.9.0",
|
|
29
|
+
"boxen": "^8.0.1",
|
|
30
|
+
"chalk": "^5.6.2",
|
|
31
|
+
"commander": "^14.0.2",
|
|
32
|
+
"debug": "^4.4.3",
|
|
33
|
+
"gradient-string": "^3.0.0",
|
|
34
|
+
"gray-matter": "^4.0.3",
|
|
35
|
+
"pino": "^9.0.0",
|
|
36
|
+
"pino-pretty": "^11.0.0",
|
|
37
|
+
"yaml": "^2.8.1",
|
|
38
|
+
"zod": "^4.1.12"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^24.9.2",
|
|
42
|
+
"typescript": "^5.9.3"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"src",
|
|
49
|
+
"assets",
|
|
50
|
+
"README.md",
|
|
51
|
+
"CHANGELOG.md",
|
|
52
|
+
"LOOP_MODE.md",
|
|
53
|
+
"UPGRADE.md",
|
|
54
|
+
"package.json"
|
|
55
|
+
],
|
|
56
|
+
"keywords": [
|
|
57
|
+
"ai",
|
|
58
|
+
"automation",
|
|
59
|
+
"workflow",
|
|
60
|
+
"claude-code",
|
|
61
|
+
"opencode",
|
|
62
|
+
"cursor",
|
|
63
|
+
"cli",
|
|
64
|
+
"orchestration",
|
|
65
|
+
"unified",
|
|
66
|
+
"meta-layer",
|
|
67
|
+
"developer-tools",
|
|
68
|
+
"auto-install",
|
|
69
|
+
"auto-upgrade"
|
|
70
|
+
],
|
|
71
|
+
"repository": {
|
|
72
|
+
"type": "git",
|
|
73
|
+
"url": "https://github.com/sylphxltd/flow.git",
|
|
74
|
+
"directory": "packages/flow"
|
|
75
|
+
},
|
|
76
|
+
"bugs": {
|
|
77
|
+
"url": "https://github.com/sylphxltd/flow/issues"
|
|
78
|
+
},
|
|
79
|
+
"homepage": "https://github.com/sylphxltd/flow#readme",
|
|
80
|
+
"license": "MIT",
|
|
81
|
+
"author": "sylphxltd"
|
|
82
82
|
}
|
|
@@ -151,10 +151,11 @@ export async function executeFlowV2(
|
|
|
151
151
|
const configService = new GlobalConfigService();
|
|
152
152
|
const targetInstaller = new TargetInstaller(projectPath);
|
|
153
153
|
|
|
154
|
-
const [, installedTargets, settings] = await Promise.all([
|
|
154
|
+
const [, installedTargets, settings, version] = await Promise.all([
|
|
155
155
|
configService.initialize(),
|
|
156
156
|
targetInstaller.detectInstalledTargets(),
|
|
157
157
|
configService.loadSettings(),
|
|
158
|
+
getFlowVersion(),
|
|
158
159
|
]);
|
|
159
160
|
|
|
160
161
|
let selectedTargetId: string | null = null;
|
|
@@ -181,10 +182,14 @@ export async function executeFlowV2(
|
|
|
181
182
|
process.exit(1);
|
|
182
183
|
}
|
|
183
184
|
} else if (hasNoSetting) {
|
|
184
|
-
// No setting - use auto-detection
|
|
185
|
+
// No setting - use auto-detection or prompt
|
|
185
186
|
if (installedTargets.length === 1) {
|
|
187
|
+
// Single target: auto-select and save silently
|
|
186
188
|
selectedTargetId = installedTargets[0];
|
|
189
|
+
settings.defaultTarget = selectedTargetId as 'claude-code' | 'opencode';
|
|
190
|
+
await configService.saveSettings(settings);
|
|
187
191
|
} else {
|
|
192
|
+
// Multiple targets: prompt and ask to remember
|
|
188
193
|
selectedTargetId = await promptForTargetSelection(
|
|
189
194
|
installedTargets,
|
|
190
195
|
'Select AI CLI:',
|
|
@@ -200,6 +205,16 @@ export async function executeFlowV2(
|
|
|
200
205
|
if (!installed) {
|
|
201
206
|
process.exit(1);
|
|
202
207
|
}
|
|
208
|
+
|
|
209
|
+
const rememberChoice = await promptConfirm({
|
|
210
|
+
message: 'Remember this choice?',
|
|
211
|
+
initialValue: true,
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
if (rememberChoice) {
|
|
215
|
+
settings.defaultTarget = selectedTargetId as 'claude-code' | 'opencode';
|
|
216
|
+
await configService.saveSettings(settings);
|
|
217
|
+
}
|
|
203
218
|
}
|
|
204
219
|
} else if (hasSpecificTarget) {
|
|
205
220
|
// User has a specific target preference
|
|
@@ -217,8 +232,7 @@ export async function executeFlowV2(
|
|
|
217
232
|
}
|
|
218
233
|
}
|
|
219
234
|
|
|
220
|
-
// Get
|
|
221
|
-
const version = await getFlowVersion();
|
|
235
|
+
// Get target name for header
|
|
222
236
|
const targetInstallation = targetInstaller.getInstallationInfo(selectedTargetId);
|
|
223
237
|
const targetName = targetInstallation?.name || selectedTargetId;
|
|
224
238
|
|