@yemi33/minions 0.1.2325 → 0.1.2326
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.
|
@@ -299,11 +299,24 @@ function _mirrorJsonFromSql(scope, filePath) {
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
+
// Drop every SQL row for `scope` and forget its mirror-hash. Called by
|
|
303
|
+
// removeProject after the JSON file is archived so safeJson shim reads no
|
|
304
|
+
// longer surface the removed project's records.
|
|
305
|
+
//
|
|
306
|
+
// Per CLAUDE.md's mutator contract, every mutator wrapper must call
|
|
307
|
+
// emitStateEvent() so the dashboard's MAX(events.id) cache-version
|
|
308
|
+
// advances — otherwise the dashboard keeps serving stale cached
|
|
309
|
+
// pull-requests data for other still-active projects. Emit only when rows
|
|
310
|
+
// were actually deleted, matching the wrote-gated emit convention used by
|
|
311
|
+
// applyPullRequestsMutation's callers (see shared.js mutatePullRequests).
|
|
302
312
|
function dropScope(scope) {
|
|
303
313
|
try {
|
|
304
314
|
const { getDb } = require('./db');
|
|
305
|
-
getDb().prepare('DELETE FROM pull_requests WHERE scope = ?').run(scope);
|
|
315
|
+
const result = getDb().prepare('DELETE FROM pull_requests WHERE scope = ?').run(scope);
|
|
306
316
|
_lastMirrorHashByScope.delete(scope);
|
|
317
|
+
if (result && result.changes > 0) {
|
|
318
|
+
try { require('./db-events').emitStateEvent('pull_requests'); } catch { /* optional */ }
|
|
319
|
+
}
|
|
307
320
|
} catch { /* db unavailable */ }
|
|
308
321
|
}
|
|
309
322
|
|
|
@@ -379,11 +379,22 @@ function _mirrorJsonFromSql(scope, filePath) {
|
|
|
379
379
|
// Drop every SQL row for `scope` and forget its mirror-hash. Called by
|
|
380
380
|
// removeProject after the JSON file is archived so safeJson shim reads no
|
|
381
381
|
// longer surface the removed project's records.
|
|
382
|
+
//
|
|
383
|
+
// Per CLAUDE.md's mutator contract, every mutator wrapper must call
|
|
384
|
+
// emitStateEvent() so the dashboard's MAX(events.id) cache-version
|
|
385
|
+
// advances — otherwise the dashboard keeps serving stale cached
|
|
386
|
+
// work-items data for other still-active projects. Emit only when rows
|
|
387
|
+
// were actually deleted, matching the wrote-gated emit convention used by
|
|
388
|
+
// applyWorkItemsMutation's callers (see shared.js mutateWorkItems).
|
|
382
389
|
function dropScope(scope) {
|
|
383
390
|
try {
|
|
384
391
|
const { getDb } = require('./db');
|
|
385
|
-
getDb().prepare('DELETE FROM work_items WHERE scope = ?').run(scope);
|
|
392
|
+
const result = getDb().prepare('DELETE FROM work_items WHERE scope = ?').run(scope);
|
|
386
393
|
_lastMirrorHashByScope.delete(scope);
|
|
394
|
+
if (result && result.changes > 0) {
|
|
395
|
+
try { require('./db-events').emitStateEvent('work_items'); } catch { /* optional */ }
|
|
396
|
+
try { require('./queries').invalidateWorkItemsCache(); } catch { /* queries not loaded */ }
|
|
397
|
+
}
|
|
387
398
|
} catch { /* db unavailable */ }
|
|
388
399
|
}
|
|
389
400
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2326",
|
|
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"
|