deepflow 0.1.13 → 0.1.15

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/bin/install.js CHANGED
@@ -74,9 +74,7 @@ async function main() {
74
74
  ];
75
75
 
76
76
  if (level === 'global') {
77
- dirs.push('hooks', 'deepflow');
78
- } else {
79
- dirs.push('deepflow');
77
+ dirs.push('hooks');
80
78
  }
81
79
 
82
80
  for (const dir of dirs) {
@@ -120,33 +118,28 @@ async function main() {
120
118
  }
121
119
  }
122
120
 
123
- // Copy VERSION file (for update checking)
124
- const versionFile = path.join(PACKAGE_DIR, 'VERSION');
125
- if (fs.existsSync(versionFile)) {
126
- fs.copyFileSync(versionFile, path.join(CLAUDE_DIR, 'deepflow', 'VERSION'));
127
- log('Version file installed');
128
- }
129
-
130
- // Clear stale update cache
131
- const cacheFile = path.join(GLOBAL_DIR, 'cache', 'df-update-check.json');
132
- if (fs.existsSync(cacheFile)) {
121
+ // Get version from package.json (single source of truth)
122
+ const packageJson = require(path.join(PACKAGE_DIR, 'package.json'));
123
+ const installedVersion = packageJson.version;
124
+
125
+ // Update cache to reflect installed version (prevents stale "update available" message)
126
+ const cacheDir = path.join(GLOBAL_DIR, 'cache');
127
+ const cacheFile = path.join(cacheDir, 'df-update-check.json');
128
+ if (installedVersion) {
129
+ fs.mkdirSync(cacheDir, { recursive: true });
130
+ fs.writeFileSync(cacheFile, JSON.stringify({
131
+ updateAvailable: false,
132
+ currentVersion: installedVersion,
133
+ latestVersion: installedVersion,
134
+ timestamp: Date.now()
135
+ }, null, 2));
136
+ } else if (fs.existsSync(cacheFile)) {
133
137
  fs.unlinkSync(cacheFile);
134
138
  }
135
139
 
136
140
  // Configure statusline (global only)
137
141
  if (level === 'global') {
138
142
  await configureStatusline(CLAUDE_DIR);
139
-
140
- // Trigger background update check
141
- const updateChecker = path.join(CLAUDE_DIR, 'hooks', 'df-check-update.js');
142
- if (fs.existsSync(updateChecker)) {
143
- const { spawn } = require('child_process');
144
- const child = spawn(process.execPath, [updateChecker], {
145
- detached: true,
146
- stdio: 'ignore'
147
- });
148
- child.unref();
149
- }
150
143
  }
151
144
 
152
145
  console.log('');
@@ -309,8 +302,7 @@ async function uninstall() {
309
302
  'skills/atomic-commits',
310
303
  'skills/code-completeness',
311
304
  'skills/gap-discovery',
312
- 'agents/reasoner.md',
313
- 'deepflow'
305
+ 'agents/reasoner.md'
314
306
  ];
315
307
 
316
308
  if (level === 'global') {
@@ -73,16 +73,17 @@ async function checkForUpdate() {
73
73
  }
74
74
 
75
75
  function getCurrentVersion() {
76
- // Check deepflow VERSION file
77
- const dfLocalPath = path.join(process.cwd(), '.claude', 'deepflow', 'VERSION');
78
- const dfGlobalPath = path.join(os.homedir(), '.claude', 'deepflow', 'VERSION');
79
-
80
- for (const versionPath of [dfLocalPath, dfGlobalPath]) {
81
- if (fs.existsSync(versionPath)) {
82
- return fs.readFileSync(versionPath, 'utf8').trim();
76
+ // Read current version from cache (written by installer)
77
+ if (fs.existsSync(CACHE_FILE)) {
78
+ try {
79
+ const cache = JSON.parse(fs.readFileSync(CACHE_FILE, 'utf8'));
80
+ if (cache.currentVersion) {
81
+ return cache.currentVersion;
82
+ }
83
+ } catch (e) {
84
+ // Fall through
83
85
  }
84
86
  }
85
-
86
87
  return null;
87
88
  }
88
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepflow",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Stay in flow state - lightweight spec-driven task orchestration for Claude Code",
5
5
  "keywords": [
6
6
  "claude",
@@ -31,8 +31,7 @@
31
31
  "bin/",
32
32
  "src/",
33
33
  "hooks/",
34
- "templates/",
35
- "VERSION"
34
+ "templates/"
36
35
  ],
37
36
  "engines": {
38
37
  "node": ">=16.0.0"
package/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.5