@sylphx/flow 1.4.4 → 1.4.6

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,17 @@
1
1
  # @sylphx/flow
2
2
 
3
+ ## 1.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 4de084e: Add comprehensive debug logging to trace sync file operations:
8
+
9
+ - **Deletion verification**: Check file exists before/after unlink to verify actual deletion
10
+ - **Installation logging**: Show force flag status, file paths, and write verification
11
+ - **Force flag propagation**: Log when force mode is activated for agents and slash commands
12
+
13
+ This diagnostic release helps identify why sync appears successful but git shows no changes.
14
+
3
15
  ## 1.4.3
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/flow",
3
- "version": "1.4.4",
3
+ "version": "1.4.6",
4
4
  "description": "AI-powered development workflow automation with autonomous loop mode and smart configuration",
5
5
  "type": "module",
6
6
  "bin": {
@@ -124,8 +124,8 @@ export async function installToDirectory(
124
124
  let content = fs.readFileSync(sourcePath, 'utf8');
125
125
  content = await transform(content, file);
126
126
 
127
- // DEBUG: Log installation details
128
- if (options.force && !options.quiet) {
127
+ // DEBUG: Log installation details (always show in force mode)
128
+ if (options.force) {
129
129
  console.log(
130
130
  `[DEBUG] Installing ${file} - force=${options.force}, exists=${!!localInfo}, path=${targetPath}`
131
131
  );
@@ -133,13 +133,24 @@ export async function installToDirectory(
133
133
 
134
134
  // Force mode: always overwrite without checking
135
135
  if (options.force) {
136
+ const contentPreview = content.substring(0, 100).replace(/\n/g, ' ');
137
+ console.log(`[DEBUG] Writing content (first 100 chars): ${contentPreview}...`);
138
+
136
139
  fs.writeFileSync(targetPath, content, 'utf8');
137
140
 
138
- // DEBUG: Verify write
139
- if (!options.quiet) {
140
- const written = fs.existsSync(targetPath);
141
- if (!written) {
142
- console.warn(`[DEBUG] Failed to write: ${targetPath}`);
141
+ // DEBUG: Verify write and read back
142
+ const written = fs.existsSync(targetPath);
143
+ if (!written) {
144
+ console.warn(`[DEBUG] ⚠ Failed to write: ${targetPath}`);
145
+ } else {
146
+ const readBack = fs.readFileSync(targetPath, 'utf8');
147
+ const readBackPreview = readBack.substring(0, 100).replace(/\n/g, ' ');
148
+ console.log(`[DEBUG] Read back (first 100 chars): ${readBackPreview}...`);
149
+
150
+ if (readBack !== content) {
151
+ console.warn(`[DEBUG] ⚠ Content mismatch! Written ${content.length} bytes, read ${readBack.length} bytes`);
152
+ } else {
153
+ console.log(`[DEBUG] ✓ Verified write: ${targetPath}`);
143
154
  }
144
155
  }
145
156