instar 1.3.271 → 1.3.273
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/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +43 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +14 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +7 -3
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/types.d.ts +10 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/feedback-factory/cutoverReadiness.d.ts +103 -0
- package/dist/feedback-factory/cutoverReadiness.d.ts.map +1 -0
- package/dist/feedback-factory/cutoverReadiness.js +118 -0
- package/dist/feedback-factory/cutoverReadiness.js.map +1 -0
- package/dist/monitoring/SessionReaper.d.ts +19 -0
- package/dist/monitoring/SessionReaper.d.ts.map +1 -1
- package/dist/monitoring/SessionReaper.js +57 -0
- package/dist/monitoring/SessionReaper.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +6 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/AgentServer.d.ts +1 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +45 -5
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +12 -0
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/routes.d.ts +4 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +28 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +65 -65
- package/src/scaffold/templates.ts +6 -0
- package/upgrades/1.3.272.md +40 -0
- package/upgrades/1.3.273.md +52 -0
- package/upgrades/side-effects/cutover-readiness.md +63 -0
- package/upgrades/side-effects/post-transfer-session-closeout.md +116 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAqxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAqxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0hRtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -8640,6 +8640,27 @@ export async function startServer(options) {
|
|
|
8640
8640
|
// child (CPU-flat) from a working one, so an idle MCP child no longer
|
|
8641
8641
|
// holds an otherwise-reapable session hostage under host load.
|
|
8642
8642
|
descendantCpuSeconds: (s) => sessionManager.descendantCpuSeconds(s),
|
|
8643
|
+
// Post-transfer closeout (2026-06-05): the OTHER machine that owns this
|
|
8644
|
+
// topic per the session-pool ownership registry, as a display identifier
|
|
8645
|
+
// (nickname when resolvable). Late-binds the pool objects — they are
|
|
8646
|
+
// constructed AFTER the reaper in this function; until the mesh block
|
|
8647
|
+
// wires them (and on single-machine installs forever) this returns null
|
|
8648
|
+
// and the rule is inert. try/catch also absorbs the TDZ window.
|
|
8649
|
+
topicOwnerElsewhere: (topicId) => {
|
|
8650
|
+
try {
|
|
8651
|
+
const reg = sessionOwnershipRegistry;
|
|
8652
|
+
const self = _meshSelfId;
|
|
8653
|
+
if (!reg || !self)
|
|
8654
|
+
return null;
|
|
8655
|
+
const owner = reg.ownerOf(String(topicId));
|
|
8656
|
+
if (!owner || owner === self)
|
|
8657
|
+
return null;
|
|
8658
|
+
return machinePoolRegistry?.getCapacity(owner)?.nickname ?? owner;
|
|
8659
|
+
}
|
|
8660
|
+
catch {
|
|
8661
|
+
return null; /* @silent-fallback-ok — pool not wired yet → rule inert */
|
|
8662
|
+
}
|
|
8663
|
+
},
|
|
8643
8664
|
audit: reaperAuditSink(config.stateDir),
|
|
8644
8665
|
},
|
|
8645
8666
|
// developmentAgent gate (standard_development_agent_dark_feature_gate):
|
|
@@ -9626,6 +9647,28 @@ export async function startServer(options) {
|
|
|
9626
9647
|
}
|
|
9627
9648
|
}
|
|
9628
9649
|
catch { /* best-effort; route() re-places regardless once the owner is cleared */ }
|
|
9650
|
+
// ── Post-transfer closeout, immediate half (2026-06-05) ───────
|
|
9651
|
+
// The user's explicit move means this machine's topic session is
|
|
9652
|
+
// now a leftover — left running it does duplicate work alongside
|
|
9653
|
+
// the target machine's session. Close it NOW (origin 'operator':
|
|
9654
|
+
// this executes the user's direct command, arrived through the
|
|
9655
|
+
// authed Telegram pipeline; disposition 'recovery-bounce' keeps
|
|
9656
|
+
// the §P3 notifier silent — the user already got the "Moving…"
|
|
9657
|
+
// reply, and the conversation continues on the target). Protected
|
|
9658
|
+
// sessions are never auto-closed (skipped here AND vetoed in the
|
|
9659
|
+
// reaper sweeper that backstops non-explicit move paths).
|
|
9660
|
+
if (plan.action === 'transfer' && target !== meshSelfId) {
|
|
9661
|
+
try {
|
|
9662
|
+
const tmuxName = telegram?.getSessionForTopic(topicId);
|
|
9663
|
+
const rec = tmuxName ? sessionManager.listRunningSessions().find((s) => s.tmuxSession === tmuxName) : undefined;
|
|
9664
|
+
if (rec && !sessionManager.getProtectedSessions().includes(rec.tmuxSession)) {
|
|
9665
|
+
void sessionManager.terminateSession(rec.id, `topic ${topicId} moved to ${cmd.nickname} (user-commanded transfer) — closing the leftover local session`, { origin: 'operator', disposition: 'recovery-bounce' }).then((r) => {
|
|
9666
|
+
console.log(pc.dim(` [session-pool] post-transfer closeout: ${rec.tmuxSession} → ${r.terminated ? 'closed' : `skipped (${r.skipped})`}`));
|
|
9667
|
+
});
|
|
9668
|
+
}
|
|
9669
|
+
}
|
|
9670
|
+
catch { /* @silent-fallback-ok — the reaper's topic-moved sweeper backstops this */ }
|
|
9671
|
+
}
|
|
9629
9672
|
await telegram?.sendToTopic(topicId, plan.action === 'noop'
|
|
9630
9673
|
? (plan.detail === 'already-on-target'
|
|
9631
9674
|
? `This conversation is already running on ${cmd.nickname} — nothing to move.`
|