instar 1.3.110 → 1.3.111
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 +20 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/core/types.d.ts +7 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/monitoring/SessionWatchdog.d.ts +27 -4
- package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
- package/dist/monitoring/SessionWatchdog.js +52 -30
- package/dist/monitoring/SessionWatchdog.js.map +1 -1
- package/dist/monitoring/rateLimitDetection.d.ts +51 -3
- package/dist/monitoring/rateLimitDetection.d.ts.map +1 -1
- package/dist/monitoring/rateLimitDetection.js +61 -4
- package/dist/monitoring/rateLimitDetection.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/1.3.111.md +129 -0
- package/upgrades/NEXT.eli16.md +69 -60
- package/upgrades/side-effects/real-world-state-fixture-framework.md +137 -0
- package/upgrades/side-effects/throttle-settled-detection.md +70 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmSH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwvDD,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;AAmSH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwvDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA49OtE;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
|
@@ -5325,6 +5325,26 @@ export async function startServer(options) {
|
|
|
5325
5325
|
sessionManager.on('apiErrorAtIdle', (sessionName) => {
|
|
5326
5326
|
rateLimitSentinel.report(sessionName, 'idle-error', { errorClass: 'transient-api' });
|
|
5327
5327
|
});
|
|
5328
|
+
// Observability: every RateLimitSentinel lifecycle transition → the shared
|
|
5329
|
+
// sentinel-events.jsonl audit trail, so a throttle recovery is never
|
|
5330
|
+
// invisible (the 2026-05-30 ask: "instrument so we can SEE it working").
|
|
5331
|
+
// Complements the recovery-reached/unreachable notify-outcome events above;
|
|
5332
|
+
// together they trace detect → backoff/resume(attempt N) → recovered/escalated.
|
|
5333
|
+
{
|
|
5334
|
+
const rlMaxAttempts = rlsCfg.maxAttempts ?? 6;
|
|
5335
|
+
const rlEvent = (kind, sessionName, detail) => {
|
|
5336
|
+
const entry = { timestamp: new Date().toISOString(), kind, sentinel: 'rate-limit', sessionName, detail };
|
|
5337
|
+
console.log(`[sentinel:${kind}] rate-limit/${sessionName} — ${detail}`);
|
|
5338
|
+
try {
|
|
5339
|
+
fs.appendFileSync(rlReachLogPath, JSON.stringify(entry) + '\n');
|
|
5340
|
+
}
|
|
5341
|
+
catch { /* @silent-fallback-ok best-effort audit; never crash the monitor path */ }
|
|
5342
|
+
};
|
|
5343
|
+
rateLimitSentinel.on('rate-limit:detected', (s) => rlEvent('throttle-detected', s.sessionName, `trigger=${s.trigger}`));
|
|
5344
|
+
rateLimitSentinel.on('rate-limit:resuming', (s) => rlEvent('throttle-resuming', s.sessionName, `attempt ${s.attempts}/${rlMaxAttempts} after ${Math.round((s.backoffMs ?? 0) / 1000)}s backoff`));
|
|
5345
|
+
rateLimitSentinel.on('rate-limit:recovered', (s) => rlEvent('throttle-recovered', s.sessionName, `jsonl grew ${s.jsonlDelta ?? 0}b after ${s.attempts} attempt(s)`));
|
|
5346
|
+
rateLimitSentinel.on('rate-limit:escalated', (s) => rlEvent('throttle-escalated', s.sessionName, s.reason ?? 'unknown'));
|
|
5347
|
+
}
|
|
5328
5348
|
if (rlsCfg.enabled !== false) {
|
|
5329
5349
|
console.log(pc.green(' RateLimitSentinel enabled (server-throttle backoff + check-ins)'));
|
|
5330
5350
|
}
|