@cccarv82/freya 3.7.0 → 3.7.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.
Files changed (2) hide show
  1. package/cli/auto-update.js +15 -8
  2. package/package.json +1 -1
@@ -44,14 +44,17 @@ function setWorkspaceVersion(workspaceDir, version) {
44
44
  }
45
45
 
46
46
  function needsNpmInstall(workspaceDir) {
47
- // Check if sql.js is installed in the workspace's node_modules
48
- const sqlJsPath = path.join(workspaceDir, 'node_modules', 'sql.js');
49
- try {
50
- fs.accessSync(sqlJsPath);
51
- return false;
52
- } catch {
53
- return true;
47
+ // Check if ALL required dependencies are installed in the workspace's node_modules
48
+ const requiredDeps = ['sql.js', '@huggingface/transformers'];
49
+ for (const dep of requiredDeps) {
50
+ const depPath = path.join(workspaceDir, 'node_modules', dep);
51
+ try {
52
+ fs.accessSync(depPath);
53
+ } catch {
54
+ return true; // At least one dependency missing
55
+ }
54
56
  }
57
+ return false;
55
58
  }
56
59
 
57
60
  function runNpmInstall(workspaceDir) {
@@ -85,8 +88,12 @@ async function autoUpdate(workspaceDir) {
85
88
  const installedVersion = getInstalledVersion();
86
89
  const workspaceVersion = getWorkspaceVersion(workspaceDir);
87
90
 
88
- // Already in sync
91
+ // Already in sync — but still check if deps are missing (e.g. new dep added in same version)
89
92
  if (workspaceVersion === installedVersion) {
93
+ if (needsNpmInstall(workspaceDir)) {
94
+ console.log('[FREYA] Missing workspace dependencies detected, installing...');
95
+ runNpmInstall(workspaceDir);
96
+ }
90
97
  return { updated: false, version: installedVersion };
91
98
  }
92
99
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cccarv82/freya",
3
- "version": "3.7.0",
3
+ "version": "3.7.2",
4
4
  "description": "Personal AI Assistant with local-first persistence",
5
5
  "scripts": {
6
6
  "health": "node scripts/validate-data.js && node scripts/validate-structure.js",