@cccarv82/freya 2.17.0 → 2.17.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.
@@ -90,12 +90,10 @@ async function autoUpdate(workspaceDir) {
90
90
  return { updated: false, version: installedVersion };
91
91
  }
92
92
 
93
- // Workspace doesn't look like a Freya workspace (no scripts/ dir)
94
- const scriptsDir = path.join(workspaceDir, 'scripts');
93
+ // If workspace dir doesn't exist at all, skip (will be handled by auto-init in cmdWeb)
95
94
  try {
96
- fs.accessSync(scriptsDir);
95
+ fs.accessSync(workspaceDir);
97
96
  } catch {
98
- // Not a workspace, skip
99
97
  return { updated: false, version: installedVersion };
100
98
  }
101
99
 
package/cli/init.js CHANGED
@@ -64,9 +64,9 @@ function copyDirRecursive(srcDir, destDir, force, summary, options = {}) {
64
64
  continue;
65
65
  }
66
66
 
67
- // Always force-update scripts (app code, not user data)
68
- const isScriptsDir = ent.name === 'scripts';
69
- copyDirRecursive(src, dest, force || isScriptsDir, summary, options);
67
+ // Always force-update app code directories (scripts, .agent) — not user data
68
+ const isAppCode = ent.name === 'scripts' || ent.name === '.agent';
69
+ copyDirRecursive(src, dest, force || isAppCode, summary, options);
70
70
  continue;
71
71
  }
72
72
 
@@ -85,8 +85,7 @@ function ensurePackageJson(targetDir, force, summary) {
85
85
  const scriptsToEnsure = {
86
86
  health: 'node scripts/validate-data.js && node scripts/validate-structure.js',
87
87
  migrate: 'node scripts/migrate-data.js',
88
- report: 'node scripts/generate-weekly-report.js',
89
- 'sm-weekly': 'node scripts/generate-sm-weekly-report.js',
88
+ 'sm-weekly': 'node scripts/generate-sm-weekly-report.js',
90
89
  daily: 'node scripts/generate-daily-summary.js',
91
90
  status: 'node scripts/generate-executive-report.js',
92
91
  blockers: 'node scripts/generate-blockers-report.js'
package/cli/web-ui.js CHANGED
@@ -1823,7 +1823,7 @@
1823
1823
  if (!el) return;
1824
1824
  const anomalies = (r && r.anomalies) ? r.anomalies : {};
1825
1825
  const tasksMissing = anomalies.tasksMissingProject || { count: 0, samples: [] };
1826
- const statusMissing = anomalies.statusMissingHistory || { count: 0, samples: [] };
1826
+ const statusMissing = anomalies.projectsMissingHistory || anomalies.statusMissingHistory || { count: 0, samples: [] };
1827
1827
 
1828
1828
  const rows = [];
1829
1829
  const pushRow = (label, data) => {
package/cli/web.js CHANGED
@@ -2270,6 +2270,16 @@ async function cmdWeb({ port, dir, open, dev }) {
2270
2270
  await ready;
2271
2271
  }
2272
2272
 
2273
+ // Auto-init workspace if not yet initialized (first run)
2274
+ if (!looksLikeFreyaWorkspace(wsDir)) {
2275
+ try {
2276
+ await initWorkspace({ targetDir: wsDir, force: false, forceData: false, forceLogs: false });
2277
+ console.log('[FREYA] Workspace initialized at', wsDir);
2278
+ } catch (e) {
2279
+ console.error('[FREYA] Warning: auto-init failed:', e.message || String(e));
2280
+ }
2281
+ }
2282
+
2273
2283
  // Auto-update workspace scripts/deps if Freya version changed
2274
2284
  try {
2275
2285
  const { autoUpdate } = require('./auto-update');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cccarv82/freya",
3
- "version": "2.17.0",
3
+ "version": "2.17.1",
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",