instar 1.3.497 → 1.3.499
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 +68 -2
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +8 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +2 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +147 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/monitoring/CommitmentTracker.d.ts.map +1 -1
- package/dist/monitoring/CommitmentTracker.js +7 -1
- package/dist/monitoring/CommitmentTracker.js.map +1 -1
- package/dist/monitoring/PresenceProxy.d.ts +10 -0
- package/dist/monitoring/PresenceProxy.d.ts.map +1 -1
- package/dist/monitoring/PresenceProxy.js +11 -0
- package/dist/monitoring/PresenceProxy.js.map +1 -1
- package/dist/monitoring/PromiseBeacon.d.ts +8 -0
- package/dist/monitoring/PromiseBeacon.d.ts.map +1 -1
- package/dist/monitoring/PromiseBeacon.js +13 -2
- package/dist/monitoring/PromiseBeacon.js.map +1 -1
- package/dist/monitoring/SpeakerElection.d.ts +75 -0
- package/dist/monitoring/SpeakerElection.d.ts.map +1 -0
- package/dist/monitoring/SpeakerElection.js +132 -0
- package/dist/monitoring/SpeakerElection.js.map +1 -0
- package/package.json +1 -1
- package/skills/instar-dev/SKILL.md +2 -1
- package/skills/instar-dev/templates/side-effects-artifact.md +30 -1
- package/skills/spec-converge/SKILL.md +1 -1
- package/src/data/builtin-manifest.json +19 -19
- package/upgrades/1.3.498.md +51 -0
- package/upgrades/1.3.499.md +58 -0
- package/upgrades/side-effects/multi-machine-posture-review-dimension.md +76 -0
- package/upgrades/side-effects/multi-machine-seamlessness-ws3.md +125 -0
|
@@ -1 +1 @@
|
|
|
1
|
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,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAyyWtE;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
|
@@ -6060,7 +6060,7 @@ export async function startServer(options) {
|
|
|
6060
6060
|
return /^\d+$/.test(pid) ? parseInt(pid, 10) : null;
|
|
6061
6061
|
}
|
|
6062
6062
|
catch {
|
|
6063
|
-
return null;
|
|
6063
|
+
return null; /* @silent-fallback-ok — unknown ownership falls to the election's lease-holder/tiebreak path, never silence */
|
|
6064
6064
|
}
|
|
6065
6065
|
},
|
|
6066
6066
|
// UNIFIED-SESSION-LIFECYCLE §P0 #8: route the kill-to-respawn through
|
|
@@ -7495,6 +7495,40 @@ export async function startServer(options) {
|
|
|
7495
7495
|
});
|
|
7496
7496
|
// sharedLlmQueue is wired into both PromiseBeacon (background lane) and
|
|
7497
7497
|
// PresenceProxy (interactive lane) below.
|
|
7498
|
+
// ── WS3 one-voice speaker election (MULTI-MACHINE-SEAMLESSNESS-SPEC) ──
|
|
7499
|
+
// Constructed EARLY (both sentinels capture it at their construction below),
|
|
7500
|
+
// with the pool deps LATE-BOUND via ws3PoolDeps — the machine-pool and
|
|
7501
|
+
// session-ownership registries initialize later in boot. Until they bind,
|
|
7502
|
+
// poolMachineIds() returns [] and every verdict is the single-machine
|
|
7503
|
+
// no-op "speak" (exactly today's behavior). Dark flag:
|
|
7504
|
+
// multiMachine.seamlessness.ws3OneVoice (default false → legacy verdicts).
|
|
7505
|
+
let ws3PoolDeps;
|
|
7506
|
+
const { SpeakerElection } = await import('../monitoring/SpeakerElection.js');
|
|
7507
|
+
const ws3Cfg = () => (config.multiMachine?.seamlessness ?? {});
|
|
7508
|
+
const speakerElection = new SpeakerElection({
|
|
7509
|
+
enabled: () => ws3Cfg().ws3OneVoice === true,
|
|
7510
|
+
currentMachineId: (() => {
|
|
7511
|
+
// @silent-fallback-ok — no machine identity = the election's legacy-no-machine-id
|
|
7512
|
+
// verdict (always speak): the designed single-machine degradation, not a loss.
|
|
7513
|
+
try {
|
|
7514
|
+
return coordinator.managers.identityManager.loadIdentity().machineId;
|
|
7515
|
+
}
|
|
7516
|
+
catch {
|
|
7517
|
+
return undefined;
|
|
7518
|
+
}
|
|
7519
|
+
})(),
|
|
7520
|
+
poolMachineIds: () => ws3PoolDeps?.poolMachineIds() ?? [],
|
|
7521
|
+
resolveTopicOwner: (topicId) => ws3PoolDeps?.resolveTopicOwner(topicId) ?? null,
|
|
7522
|
+
leaseHolderId: () => coordinator?.getSyncStatus().leaseHolder ?? null,
|
|
7523
|
+
leaseStable: () => (coordinator?.getSyncStatus().splitBrainState ?? 'clear') === 'clear',
|
|
7524
|
+
dwellMs: typeof ws3Cfg().ws3DwellMs === 'number' ? ws3Cfg().ws3DwellMs : undefined,
|
|
7525
|
+
onVerdict: (topicId, v) => {
|
|
7526
|
+
// P7 Observable Intelligence: every non-legacy verdict is auditable.
|
|
7527
|
+
if (v.reason !== 'legacy-disabled' && v.reason !== 'legacy-no-machine-id' && v.reason !== 'single-machine') {
|
|
7528
|
+
console.log(`[SpeakerElection] topic ${topicId}: speak=${v.speak} (${v.reason})`);
|
|
7529
|
+
}
|
|
7530
|
+
},
|
|
7531
|
+
});
|
|
7498
7532
|
let presenceProxy;
|
|
7499
7533
|
if (sharedIntelligence && telegram) {
|
|
7500
7534
|
try {
|
|
@@ -7545,6 +7579,8 @@ export async function startServer(options) {
|
|
|
7545
7579
|
presenceProxy = new PresenceProxy({
|
|
7546
7580
|
stateDir: config.stateDir,
|
|
7547
7581
|
intelligence: sharedIntelligence,
|
|
7582
|
+
// WS3 one-voice gate: only this topic's owner machine speaks 🔭.
|
|
7583
|
+
speakerElection,
|
|
7548
7584
|
agentName: config.projectName ?? 'the agent',
|
|
7549
7585
|
// Resolved default framework so idle/stall detection uses the right
|
|
7550
7586
|
// pane signals (Codex panes don't match Claude prompt patterns).
|
|
@@ -8005,6 +8041,9 @@ export async function startServer(options) {
|
|
|
8005
8041
|
commitmentTracker,
|
|
8006
8042
|
llmQueue: sharedLlmQueue,
|
|
8007
8043
|
proxyCoordinator,
|
|
8044
|
+
// WS3 one-voice gate: live owner re-resolution at speak time; the
|
|
8045
|
+
// commitment's ownerMachineId stamp is only the fallback.
|
|
8046
|
+
speakerElection,
|
|
8008
8047
|
captureSessionOutput: (name, lines) => sessionManager.captureOutput(name, lines),
|
|
8009
8048
|
getSessionForTopic: (topicId) => telegram.getSessionForTopic(topicId),
|
|
8010
8049
|
isSessionAlive: (name) => sessionManager.isSessionAlive(name),
|
|
@@ -9496,7 +9535,7 @@ export async function startServer(options) {
|
|
|
9496
9535
|
return null;
|
|
9497
9536
|
}
|
|
9498
9537
|
catch {
|
|
9499
|
-
return null;
|
|
9538
|
+
return null; /* @silent-fallback-ok — unknown ownership falls to the election's lease-holder/tiebreak path, never silence */
|
|
9500
9539
|
}
|
|
9501
9540
|
})();
|
|
9502
9541
|
if (resolvedName)
|
|
@@ -11245,6 +11284,33 @@ export async function startServer(options) {
|
|
|
11245
11284
|
logger: (m) => console.log(pc.dim(` ${m}`)),
|
|
11246
11285
|
});
|
|
11247
11286
|
const ownReg = sessionOwnershipRegistry;
|
|
11287
|
+
// ── WS3 one-voice: bind the election's late pool deps ──
|
|
11288
|
+
// From here on the SpeakerElection sees the real pool: online machine
|
|
11289
|
+
// ids from the capacity registry and live topic ownership from the
|
|
11290
|
+
// ownership registry. Before this point it returned the single-machine
|
|
11291
|
+
// no-op verdict. (resolveTopicOwner reads ONLY local replicated state —
|
|
11292
|
+
// never a mesh call — per the spec's hot-path rule.)
|
|
11293
|
+
ws3PoolDeps = {
|
|
11294
|
+
poolMachineIds: () => {
|
|
11295
|
+
try {
|
|
11296
|
+
return (machinePoolRegistry?.getCapacities() ?? [])
|
|
11297
|
+
.filter((c) => c.online)
|
|
11298
|
+
.map((c) => c.machineId);
|
|
11299
|
+
}
|
|
11300
|
+
catch {
|
|
11301
|
+
return []; /* @silent-fallback-ok — empty pool = single-machine no-op verdict (speak), the fail-toward-speech design */
|
|
11302
|
+
}
|
|
11303
|
+
},
|
|
11304
|
+
resolveTopicOwner: (topicId) => {
|
|
11305
|
+
try {
|
|
11306
|
+
const rec = ownReg.read(String(topicId));
|
|
11307
|
+
return rec && rec.status === 'active' ? (rec.ownerMachineId ?? null) : null;
|
|
11308
|
+
}
|
|
11309
|
+
catch {
|
|
11310
|
+
return null; /* @silent-fallback-ok — unknown ownership falls to the election's lease-holder/tiebreak path, never silence */
|
|
11311
|
+
}
|
|
11312
|
+
},
|
|
11313
|
+
};
|
|
11248
11314
|
// Coherence journal §3.3: the emit is a thin wrapper at every CAS call
|
|
11249
11315
|
// site — `reason` is caller knowledge (cas() is a storage primitive and
|
|
11250
11316
|
// cannot know WHY). A mesh-applied action records the coarse reason;
|