@yemi33/minions 0.1.2047 → 0.1.2048

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/engine/cleanup.js +24 -1
  2. package/package.json +1 -1
package/engine/cleanup.js CHANGED
@@ -1075,7 +1075,30 @@ async function runCleanup(config, verbose = false) {
1075
1075
  mutateWorkItems(wiPath, items => {
1076
1076
  for (const item of items) if (_migrateLegacyItem(item)) migrated++;
1077
1077
  });
1078
- if (migrated > 0) log('info', `Migrated ${migrated} legacy status(es) in ${label}`);
1078
+ if (migrated > 0) {
1079
+ log('info', `Migrated ${migrated} legacy status(es) in ${label}`);
1080
+ // P-dcc27d-legacy-status-counter — make the docs/deprecated.json
1081
+ // gate ("legacy-done-aliases" removal after 30 consecutive days zero
1082
+ // migrations) measurable by bumping a rolling-daily counter under
1083
+ // `_engine.legacyStatusMigrations[YYYY-MM-DD]`. Parallel to
1084
+ // `_engine.completionFallbacks` at engine/lifecycle.js:3870-3871.
1085
+ // Inline mutateJsonFileLocked by design — promote to a shared
1086
+ // `mutateMetrics(key, date)` helper if more N-day-silence gates land.
1087
+ try {
1088
+ const metricsPath = path.join(ENGINE_DIR, 'metrics.json');
1089
+ const dateKey = new Date().toISOString().slice(0, 10);
1090
+ mutateJsonFileLocked(metricsPath, (metrics) => {
1091
+ metrics = metrics || {};
1092
+ if (!metrics._engine) metrics._engine = {};
1093
+ if (!metrics._engine.legacyStatusMigrations) metrics._engine.legacyStatusMigrations = {};
1094
+ metrics._engine.legacyStatusMigrations[dateKey] =
1095
+ (metrics._engine.legacyStatusMigrations[dateKey] || 0) + migrated;
1096
+ return metrics;
1097
+ });
1098
+ } catch (err) {
1099
+ log('warn', `telemetry: legacy-status-migration metrics write failed: ${err.message}`);
1100
+ }
1101
+ }
1079
1102
  } catch (e) { log('warn', `migrate legacy statuses (${label}): ${e.message}`); }
1080
1103
  }
1081
1104
  for (const project of projects) _migrateLegacyItemsAt(projectWorkItemsPath(project), `${project.name} work items`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2047",
3
+ "version": "0.1.2048",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"