klypix-mcp 1.57.0 → 1.58.0
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/package.json +1 -1
- package/src/brain-doctor.mjs +22 -0
- package/src/finding-routing.mjs +8 -2
package/package.json
CHANGED
package/src/brain-doctor.mjs
CHANGED
|
@@ -211,12 +211,23 @@ function inspectSupervisors(brainDir, baked) {
|
|
|
211
211
|
hotReloads: Number(state.hotReloads || 0),
|
|
212
212
|
lastSwapAt: state.lastSwapAt || null,
|
|
213
213
|
lastError: state.lastError || null,
|
|
214
|
+
// A worker hot-swaps behind a live connection; the SUPERVISOR cannot
|
|
215
|
+
// replace its own process under the host's stdio, so supervisor-level
|
|
216
|
+
// features arrive only on the next reconnect. Without this the doctor
|
|
217
|
+
// reported "aligned" (true of workers) while a shipped supervisor
|
|
218
|
+
// feature was silently inactive — the same class as rendering a
|
|
219
|
+
// truncated list as a complete one.
|
|
220
|
+
supervisorGeneration: state.hibernation ? 'current' : 'pre-1.57',
|
|
221
|
+
hibernation: state.hibernation || null,
|
|
214
222
|
});
|
|
215
223
|
}
|
|
224
|
+
const pendingReconnect = live.filter(state => state.supervisorGeneration !== 'current');
|
|
216
225
|
return {
|
|
217
226
|
active: live.length > 0,
|
|
218
227
|
count: live.length,
|
|
219
228
|
live,
|
|
229
|
+
pendingReconnect,
|
|
230
|
+
hibernated: live.filter(state => state.status === 'hibernated'),
|
|
220
231
|
impaired: live.filter(state => state.impaired),
|
|
221
232
|
matchesInstalled: live.length && baked
|
|
222
233
|
? live.every(state => state.activeVersion && cmpSemver(state.activeVersion, baked) === 0)
|
|
@@ -514,6 +525,17 @@ export function render(r, opts = {}) {
|
|
|
514
525
|
if (state.impaired) L.push(` ${c.red}· pid ${state.pid} ${state.status}${state.lastError ? `: ${state.lastError}` : ''} — /mcp reconnect${c.rst}`);
|
|
515
526
|
else if (state.lastError) L.push(` ${c.yel}· pid ${state.pid} ${state.status}: ${state.lastError}${c.rst}`);
|
|
516
527
|
}
|
|
528
|
+
// Workers hot-swap; a SUPERVISOR cannot replace its own process under the
|
|
529
|
+
// host's stdio. Say so explicitly — otherwise "aligned" reads as "every
|
|
530
|
+
// shipped improvement is live", and a supervisor-level feature (today:
|
|
531
|
+
// idle-worker hibernation and its RAM saving) is silently inactive.
|
|
532
|
+
const pending = r.supervisors.pendingReconnect || [];
|
|
533
|
+
const sleeping = r.supervisors.hibernated || [];
|
|
534
|
+
if (pending.length) {
|
|
535
|
+
L.push(` ${c.yel}· ${pending.length} of ${r.supervisors.count} connection(s) still run a PRE-1.57 supervisor — their workers are current, but supervisor-level features (idle-worker hibernation / RAM release) start at each one's next reconnect${c.rst}`);
|
|
536
|
+
} else if (r.supervisors.count) {
|
|
537
|
+
L.push(` ${c.dim}· all supervisors current${sleeping.length ? ` · ${sleeping.length} hibernated (worker released, presence held, wakes on the next request)` : ''}${c.rst}`);
|
|
538
|
+
}
|
|
517
539
|
} else if (r.version.supervisorCapable) {
|
|
518
540
|
L.push(`${warn} ${c.bold}SUPERVISOR${c.rst} installed but this is a legacy direct-worker session · reconnect once to activate`);
|
|
519
541
|
} else {
|
package/src/finding-routing.mjs
CHANGED
|
@@ -319,7 +319,12 @@ export function findingKey({ path, text, claim, line = null, root = null } = {})
|
|
|
319
319
|
// ("…names a GENERATED file" vs "…points at a generated file") must bump the
|
|
320
320
|
// existing draft, not mint a second note for the peer.
|
|
321
321
|
const t = String(claim ?? findingClaim(text)).toLowerCase().replace(/[^a-z0-9]+/g, ' ').trim();
|
|
322
|
-
|
|
322
|
+
// The LINE NUMBER is deliberately excluded from identity. The same defect
|
|
323
|
+
// cited once as `file.ts` and once as `file.ts:135` is one finding for the
|
|
324
|
+
// peer who must act on it; including the line minted two drafts telling the
|
|
325
|
+
// same story twice — the exact duplication the claim-hash above prevents for
|
|
326
|
+
// re-wordings. Line still rides the draft as evidence, it just is not identity.
|
|
327
|
+
return sha16(`${p}|${t}`);
|
|
323
328
|
}
|
|
324
329
|
|
|
325
330
|
// ── Draft construction ──────────────────────────────────────────────────────
|
|
@@ -455,7 +460,8 @@ export function renderFindingDrafts(drafts, { limit = 3, total = null } = {}) {
|
|
|
455
460
|
'## 📬 Finding(s) you verified that belong to SOMEONE ELSE\'S lane — approve to send',
|
|
456
461
|
'You verified something about a file outside your declared scope. The lane knows who declared it; nothing has been sent. '
|
|
457
462
|
+ 'Check the “why this session” line — if it is not theirs, skip it (a wrong note costs a peer their whole turn). '
|
|
458
|
-
+ 'This is a DRAFT: nothing was written to the brain and no message exists yet.'
|
|
463
|
+
+ 'This is a DRAFT: nothing was written to the brain and no message exists yet.',
|
|
464
|
+
'To send, emit the marker on ITS OWN line WITHOUT the surrounding backticks — a backticked marker is read as a documentation example and is deliberately never sent, so a verbatim paste of the line below does nothing.'];
|
|
459
465
|
for (const draft of list) {
|
|
460
466
|
const where = draft.line ? `${draft.path}:${draft.line}` : draft.path;
|
|
461
467
|
const rec = (draft.seenCount || 1) >= 2 ? ` ⭐ seen ${draft.seenCount}× — still unsent` : '';
|