@sylphx/flow 3.21.0 → 3.21.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 +6 -0
- package/package.json +1 -1
- package/src/targets/claude-code.ts +6 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @sylphx/flow
|
|
2
2
|
|
|
3
|
+
## 3.21.1 (2026-02-08)
|
|
4
|
+
|
|
5
|
+
### 🐛 Bug Fixes
|
|
6
|
+
|
|
7
|
+
- resolve broken SessionStart hook — dead import silently killed applySettings ([5c9fb60](https://github.com/SylphxAI/flow/commit/5c9fb604894df7c3392ab6cc8caf4a1fc6f09c7e))
|
|
8
|
+
|
|
3
9
|
## 3.21.0 (2026-02-08)
|
|
4
10
|
|
|
5
11
|
Add SessionStart memory hook and use stdin for notifications
|
package/package.json
CHANGED
|
@@ -381,30 +381,19 @@ Please begin your response with a comprehensive summary of all the instructions
|
|
|
381
381
|
const { processSettings, generateHookCommands } = await import(
|
|
382
382
|
'./functional/claude-code-logic.js'
|
|
383
383
|
);
|
|
384
|
-
const { pathExists, createDirectory, readFile, writeFile } = await import(
|
|
385
|
-
'../composables/functional/useFileSystem.js'
|
|
386
|
-
);
|
|
387
384
|
|
|
388
385
|
const claudeConfigDir = path.join(cwd, '.claude');
|
|
389
386
|
const settingsPath = path.join(claudeConfigDir, 'settings.json');
|
|
390
387
|
|
|
391
388
|
// Ensure .claude directory exists
|
|
392
|
-
|
|
393
|
-
if (dirExistsResult._tag === 'Success' && !dirExistsResult.value) {
|
|
394
|
-
const createResult = await createDirectory(claudeConfigDir, { recursive: true });
|
|
395
|
-
if (createResult._tag === 'Failure') {
|
|
396
|
-
throw new Error(`Failed to create .claude directory: ${createResult.error.message}`);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
389
|
+
await fsPromises.mkdir(claudeConfigDir, { recursive: true });
|
|
399
390
|
|
|
400
391
|
// Read existing settings or null if doesn't exist
|
|
401
392
|
let existingContent: string | null = null;
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
existingContent = readResult.value;
|
|
407
|
-
}
|
|
393
|
+
try {
|
|
394
|
+
existingContent = await fsPromises.readFile(settingsPath, 'utf-8');
|
|
395
|
+
} catch {
|
|
396
|
+
// File doesn't exist yet — will create fresh settings
|
|
408
397
|
}
|
|
409
398
|
|
|
410
399
|
// Generate hooks based on how CLI was invoked
|
|
@@ -418,10 +407,7 @@ Please begin your response with a comprehensive summary of all the instructions
|
|
|
418
407
|
}
|
|
419
408
|
|
|
420
409
|
// Write updated settings
|
|
421
|
-
|
|
422
|
-
if (writeResult._tag === 'Failure') {
|
|
423
|
-
throw new Error(`Failed to write settings: ${writeResult.error.message}`);
|
|
424
|
-
}
|
|
410
|
+
await fsPromises.writeFile(settingsPath, settingsResult.value, 'utf-8');
|
|
425
411
|
|
|
426
412
|
return {
|
|
427
413
|
count: 2,
|