instar 1.3.657 → 1.3.659
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 +56 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +14 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/SessionManager.d.ts +12 -0
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +45 -2
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/SessionOwnershipRegistry.d.ts +14 -0
- package/dist/core/SessionOwnershipRegistry.d.ts.map +1 -1
- package/dist/core/SessionOwnershipRegistry.js +9 -0
- package/dist/core/SessionOwnershipRegistry.js.map +1 -1
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +12 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/core/types.d.ts +32 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/monitoring/StrandedTopicSentinel.d.ts +102 -0
- package/dist/monitoring/StrandedTopicSentinel.d.ts.map +1 -0
- package/dist/monitoring/StrandedTopicSentinel.js +216 -0
- package/dist/monitoring/StrandedTopicSentinel.js.map +1 -0
- package/dist/monitoring/guardManifest.d.ts.map +1 -1
- package/dist/monitoring/guardManifest.js +17 -0
- package/dist/monitoring/guardManifest.js.map +1 -1
- package/dist/monitoring/rateLimitDetection.d.ts +29 -0
- package/dist/monitoring/rateLimitDetection.d.ts.map +1 -1
- package/dist/monitoring/rateLimitDetection.js +29 -0
- package/dist/monitoring/rateLimitDetection.js.map +1 -1
- package/dist/monitoring/strandedTopicDecision.d.ts +96 -0
- package/dist/monitoring/strandedTopicDecision.d.ts.map +1 -0
- package/dist/monitoring/strandedTopicDecision.js +160 -0
- package/dist/monitoring/strandedTopicDecision.js.map +1 -0
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +3 -3
- package/upgrades/1.3.658.md +24 -0
- package/upgrades/1.3.659.md +29 -0
- package/upgrades/side-effects/idle-throttle-settle-gate.md +37 -0
- package/upgrades/side-effects/stranded-inbound-self-heal.md +80 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2CH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAU3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAwBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAwH7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA+EtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAUT;AAyID,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAy4CD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,cAAc,EAAE,cAAc,EAC9B,YAAY,CAAC,EAAE,YAAY,EAC3B,WAAW,CAAC,EAAE,WAAW,EACzB,WAAW,CAAC,EAAE,WAAW,EACzB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAGvE,UAAU,CAAC,EAAE,MAAM,OAAO,8BAA8B,EAAE,WAAW,GAAG,IAAI,EAK5E,qBAAq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AAG,IAAI,EAK5E,qBAAqB,CAAC,EAAE,MAAM,OAAO,gCAAgC,EAAE,kBAAkB,GAAG,IAAI,EAKhG,mBAAmB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,GACpD,IAAI,CA8eN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA67gBtE;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
|
@@ -4384,6 +4384,10 @@ export async function startServer(options) {
|
|
|
4384
4384
|
degradedTmuxGuard,
|
|
4385
4385
|
tmuxCallTimeoutMs: config.monitoring?.tmuxResilience?.asyncHotPath?.timeoutMs,
|
|
4386
4386
|
tmuxMaxInFlight: config.monitoring?.tmuxResilience?.asyncHotPath?.maxInFlight,
|
|
4387
|
+
// DARK-FLAGGED (DEV_GATED_FEATURES idleThrottleSettleGate): settle-gate the
|
|
4388
|
+
// idle-monitor's rateLimitedAtIdle hand-off. `enabled` OMITTED from defaults ⇒
|
|
4389
|
+
// dev-agent live / dark-fleet.
|
|
4390
|
+
idleThrottleSettleGate: resolveDevAgentGate(config.monitoring?.idleThrottleSettleGate?.enabled, config),
|
|
4387
4391
|
});
|
|
4388
4392
|
// Wire the SAME TTL-cached SDK-credit reader PR1's routing policy uses, so
|
|
4389
4393
|
// the reroute 'auto' decision and the intelligence-funnel routing share one
|
|
@@ -18030,6 +18034,58 @@ export async function startServer(options) {
|
|
|
18030
18034
|
carrier: _topicProfileCarrier,
|
|
18031
18035
|
}
|
|
18032
18036
|
: null;
|
|
18037
|
+
// ── StrandedTopicSentinel (stranded-inbound-self-heal) — PURE SIGNAL ──────
|
|
18038
|
+
// Detects a topic whose owner machine is online-by-heartbeat but unable to
|
|
18039
|
+
// serve (quota-walled or adapter-disconnected) while a healthy machine holds
|
|
18040
|
+
// the lease, so inbound is silently dead for that topic. Raises ONE
|
|
18041
|
+
// aggregated agent-health attention item per (owner-machine, stranding
|
|
18042
|
+
// window); MUTATES NOTHING (no ownership CAS, no pin write, no session kill).
|
|
18043
|
+
// developmentAgent dark-feature gate: LIVE on a dev agent, DARK on the fleet.
|
|
18044
|
+
// Lease-holder is the sole actor; single-machine = strict no-op. GET /guards.
|
|
18045
|
+
// Wired here (late) because it depends on machinePoolRegistry +
|
|
18046
|
+
// sessionOwnershipRegistry + _meshSelfId, all assigned during pool boot.
|
|
18047
|
+
const _strandedEnabled = resolveDevAgentGate(config.monitoring?.strandedTopicSentinel?.enabled, config);
|
|
18048
|
+
if (_strandedEnabled && machinePoolRegistry && sessionOwnershipRegistry) {
|
|
18049
|
+
try {
|
|
18050
|
+
const { StrandedTopicSentinel } = await import('../monitoring/StrandedTopicSentinel.js');
|
|
18051
|
+
const _ownReg = sessionOwnershipRegistry;
|
|
18052
|
+
const _poolReg = machinePoolRegistry;
|
|
18053
|
+
const _nickById = (id) => (_listPoolMachines?.() ?? []).find((m) => m.machineId === id)?.nickname ?? id;
|
|
18054
|
+
const strandedSentinel = new StrandedTopicSentinel({
|
|
18055
|
+
listOwnershipRecords: () => _ownReg.all(),
|
|
18056
|
+
listCapacities: () => _poolReg.getCapacities(),
|
|
18057
|
+
selfMachineId: () => _meshSelfId,
|
|
18058
|
+
holdsLease: () => (leaseCoordinatorRef ? leaseCoordinatorRef.holdsLease() : coordinator.holdsLease()),
|
|
18059
|
+
raiseAttention: (item) => {
|
|
18060
|
+
if (!telegram)
|
|
18061
|
+
return;
|
|
18062
|
+
void telegram.createAttentionItem({
|
|
18063
|
+
id: item.id,
|
|
18064
|
+
title: item.title,
|
|
18065
|
+
summary: item.summary,
|
|
18066
|
+
description: item.description,
|
|
18067
|
+
category: item.category,
|
|
18068
|
+
priority: item.priority,
|
|
18069
|
+
sourceContext: item.sourceContext,
|
|
18070
|
+
lane: item.lane,
|
|
18071
|
+
healthKey: item.healthKey,
|
|
18072
|
+
});
|
|
18073
|
+
},
|
|
18074
|
+
nicknameOf: _nickById,
|
|
18075
|
+
now: () => Date.now(),
|
|
18076
|
+
}, { ...config.monitoring?.strandedTopicSentinel, enabled: _strandedEnabled });
|
|
18077
|
+
strandedSentinel.start();
|
|
18078
|
+
guardRegistry.register('monitoring.strandedTopicSentinel.enabled', () => strandedSentinel.guardStatus());
|
|
18079
|
+
console.log(pc.green(' StrandedTopicSentinel enabled (online-but-unable-to-serve detector — pure signal)'));
|
|
18080
|
+
}
|
|
18081
|
+
catch (e) {
|
|
18082
|
+
// @silent-fallback-ok — optional dev-gated, pure-signal feature: a wiring
|
|
18083
|
+
// failure is logged (console.error, NOT silent) and is non-fatal BY DESIGN
|
|
18084
|
+
// — the monitoring sentinel must never crash server boot. Nothing to
|
|
18085
|
+
// degrade-report or fall back to; the server runs without the detector.
|
|
18086
|
+
console.error(' StrandedTopicSentinel wiring failed (non-fatal):', e instanceof Error ? e.message : String(e));
|
|
18087
|
+
}
|
|
18088
|
+
}
|
|
18033
18089
|
const server = new AgentServer({ config, sessionManager, state, scheduler, telegram, relationships, feedback, feedbackAnomalyDetector, dispatches, updateChecker, autoUpdater, autoDispatcher, quotaTracker, quotaManager, publisher, viewer, tunnel, evolution, watchdog, topicMemory, triageNurse, projectMapper, cartographer: cartographer ?? undefined, coherenceGate: scopeVerifier, contextHierarchy, canonicalState, operationGate, sentinel, adaptiveTrust, memoryMonitor, orphanReaper, coherenceMonitor, commitmentTracker, subscriptionPool, accountFollowMePeerViews: async () => { const nickById = new Map((_listPoolMachines?.() ?? []).map((m) => [m.machineId, m.nickname ?? m.machineId])); let peers = (_resolvePeerUrls?.() ?? []).map((p) => ({ machineId: p.machineId, nickname: nickById.get(p.machineId) ?? p.machineId, url: p.url })); if (peers.length === 0) {
|
|
18034
18090
|
peers = (_listPoolMachines?.() ?? []).filter((m) => m.machineId !== _meshSelfId && !!m.lastKnownUrl).map((m) => ({ machineId: m.machineId, nickname: m.nickname ?? m.machineId, url: m.lastKnownUrl }));
|
|
18035
18091
|
} if (peers.length === 0)
|