instar 1.3.61 → 1.3.62
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 +44 -2
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +16 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +23 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/SessionRefresh.d.ts +10 -0
- package/dist/core/SessionRefresh.d.ts.map +1 -1
- package/dist/core/SessionRefresh.js +12 -2
- package/dist/core/SessionRefresh.js.map +1 -1
- package/dist/core/types.d.ts +40 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/monitoring/ContextWedgeSentinel.d.ts +118 -0
- package/dist/monitoring/ContextWedgeSentinel.d.ts.map +1 -0
- package/dist/monitoring/ContextWedgeSentinel.js +238 -0
- package/dist/monitoring/ContextWedgeSentinel.js.map +1 -0
- package/dist/monitoring/SentinelNotifier.d.ts +1 -1
- package/dist/monitoring/SentinelNotifier.d.ts.map +1 -1
- package/dist/monitoring/SentinelNotifier.js.map +1 -1
- package/dist/monitoring/sentinelWiring.d.ts +23 -0
- package/dist/monitoring/sentinelWiring.d.ts.map +1 -1
- package/dist/monitoring/sentinelWiring.js +36 -0
- package/dist/monitoring/sentinelWiring.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +18 -18
- package/upgrades/1.3.62.md +89 -0
- package/upgrades/side-effects/context-wedge-sentinel.md +69 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ContextWedgeSentinel — detects Claude Code's "thinking/redacted_thinking
|
|
3
|
+
* blocks in the latest assistant message cannot be modified" 400 wedge and
|
|
4
|
+
* recovers via a FRESH respawn.
|
|
5
|
+
*
|
|
6
|
+
* The failure (diagnosed 2026-05-28): a tool call is cancelled inside a
|
|
7
|
+
* parallel tool batch while extended thinking is on. Claude Code cancels every
|
|
8
|
+
* sibling call, and that cancellation corrupts the thinking block on the latest
|
|
9
|
+
* assistant turn. The Anthropic API then rejects EVERY resume of that session
|
|
10
|
+
* with `400 ... thinking blocks in the latest assistant message cannot be
|
|
11
|
+
* modified`. The session fast-fails instantly on every inbound message ("Cooked
|
|
12
|
+
* for 0s"); it is permanently dead yet still emitting output, so neither the
|
|
13
|
+
* silence sentinel (output never goes quiet) nor the socket sentinel (no
|
|
14
|
+
* disconnect string) catches it.
|
|
15
|
+
*
|
|
16
|
+
* Critical difference from the other silently-stopped sentinels: a send-keys
|
|
17
|
+
* nudge CANNOT recover this — re-engaging just re-sends the corrupted turn and
|
|
18
|
+
* hits the same 400. The only recovery is a clean respawn that does NOT
|
|
19
|
+
* `--resume` the corrupted transcript. That is the injected `recoverFn`
|
|
20
|
+
* (wired to SessionRefresh fresh-mode, which clears the topic's resume UUID
|
|
21
|
+
* before respawning).
|
|
22
|
+
*
|
|
23
|
+
* Because recovery is destructive (kills + respawns a session), detection is
|
|
24
|
+
* gated by a CONFIRM WINDOW: the signature must still be the non-progressing
|
|
25
|
+
* session tail after `confirmWindowMs` before a wedge is confirmed. This is the
|
|
26
|
+
* defense against false-positives — most importantly a session merely
|
|
27
|
+
* *discussing* this very error (its tail keeps changing as it works, so the
|
|
28
|
+
* signature does not persist as the tail). And the destructive recovery itself
|
|
29
|
+
* is opt-in (autoRecovery, default off) and rides the Graduated Feature Rollout
|
|
30
|
+
* track; in the default detect-only mode the sentinel only audits + escalates.
|
|
31
|
+
*
|
|
32
|
+
* Spec: docs/specs/context-wedge-sentinel.md (companion to silently-stopped-trio.md)
|
|
33
|
+
*
|
|
34
|
+
* Signal-vs-authority: the regex + confirm-window are detectors. The recoverFn
|
|
35
|
+
* is a bounded recovery primitive (SessionRefresh rate-guards respawns). User-
|
|
36
|
+
* facing escalation routes through the existing MessagingToneGate via the
|
|
37
|
+
* SentinelNotifier path. No new blocking authority.
|
|
38
|
+
*/
|
|
39
|
+
import { EventEmitter } from 'node:events';
|
|
40
|
+
const DEFAULT_CONFIG = {
|
|
41
|
+
enabled: true,
|
|
42
|
+
tickIntervalMs: 20_000,
|
|
43
|
+
confirmWindowMs: 45_000,
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Patterns for the thinking-block 400. Intentionally anchored on the unusual,
|
|
47
|
+
* API-specific phrase — natural prose almost never contains it, and the
|
|
48
|
+
* confirm-window + opt-in recovery cover the one case that does (a session
|
|
49
|
+
* discussing this very bug).
|
|
50
|
+
*/
|
|
51
|
+
export const CONTEXT_WEDGE_PATTERNS = [
|
|
52
|
+
/blocks in the latest assistant message cannot be modified/i,
|
|
53
|
+
/`?(?:thinking|redacted_thinking)`?\s+blocks.{0,80}cannot be modified/i,
|
|
54
|
+
];
|
|
55
|
+
/** Detector — true if `text` contains the thinking-block-400 signature. */
|
|
56
|
+
export function detectContextWedge(text) {
|
|
57
|
+
if (!text)
|
|
58
|
+
return false;
|
|
59
|
+
for (const pat of CONTEXT_WEDGE_PATTERNS) {
|
|
60
|
+
if (pat.test(text))
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Tail detector — is the signature present within the last `tailLines`
|
|
67
|
+
* non-empty lines of the capture? A genuinely wedged session shows the error as
|
|
68
|
+
* its live tail; a session that merely mentioned the error earlier and then
|
|
69
|
+
* kept working has scrolled it out of the tail.
|
|
70
|
+
*/
|
|
71
|
+
export function signatureIsTail(text, tailLines = 10) {
|
|
72
|
+
if (!text)
|
|
73
|
+
return false;
|
|
74
|
+
const lines = text.split('\n').map(l => l.trim()).filter(Boolean);
|
|
75
|
+
const tail = lines.slice(-tailLines).join('\n');
|
|
76
|
+
return detectContextWedge(tail);
|
|
77
|
+
}
|
|
78
|
+
export class ContextWedgeSentinel extends EventEmitter {
|
|
79
|
+
deps;
|
|
80
|
+
cfg;
|
|
81
|
+
states = new Map();
|
|
82
|
+
timers = new Map();
|
|
83
|
+
tickHandle = null;
|
|
84
|
+
constructor(deps, cfg = {}) {
|
|
85
|
+
super();
|
|
86
|
+
this.deps = deps;
|
|
87
|
+
this.cfg = { ...DEFAULT_CONFIG, ...cfg };
|
|
88
|
+
}
|
|
89
|
+
/** Begin the self-driving scan loop. No-op without listSessionNames. */
|
|
90
|
+
start() {
|
|
91
|
+
if (!this.cfg.enabled || this.tickHandle)
|
|
92
|
+
return;
|
|
93
|
+
if (!this.deps.listSessionNames)
|
|
94
|
+
return;
|
|
95
|
+
this.tickHandle = setInterval(() => this.tick(), this.cfg.tickIntervalMs);
|
|
96
|
+
if (typeof this.tickHandle.unref === 'function')
|
|
97
|
+
this.tickHandle.unref();
|
|
98
|
+
}
|
|
99
|
+
stop() {
|
|
100
|
+
if (this.tickHandle) {
|
|
101
|
+
clearInterval(this.tickHandle);
|
|
102
|
+
this.tickHandle = null;
|
|
103
|
+
}
|
|
104
|
+
this.shutdown();
|
|
105
|
+
}
|
|
106
|
+
/** One scan pass over every tracked session. */
|
|
107
|
+
tick() {
|
|
108
|
+
if (!this.cfg.enabled)
|
|
109
|
+
return;
|
|
110
|
+
const names = this.deps.listSessionNames?.() ?? [];
|
|
111
|
+
for (const name of names)
|
|
112
|
+
this.scanSession(name);
|
|
113
|
+
}
|
|
114
|
+
/** Scan one session for the wedge signature. */
|
|
115
|
+
scanSession(sessionName) {
|
|
116
|
+
if (!this.cfg.enabled)
|
|
117
|
+
return;
|
|
118
|
+
if (this.states.has(sessionName))
|
|
119
|
+
return; // already handling
|
|
120
|
+
const output = this.deps.getRecentOutput(sessionName);
|
|
121
|
+
// Require the signature to be the live TAIL, not merely present somewhere in
|
|
122
|
+
// the scrollback — the discriminator against a session discussing the bug.
|
|
123
|
+
if (!signatureIsTail(output))
|
|
124
|
+
return;
|
|
125
|
+
this.report(sessionName);
|
|
126
|
+
}
|
|
127
|
+
/** Public entry: report a detected (not yet confirmed) wedge. Idempotent. */
|
|
128
|
+
report(sessionName) {
|
|
129
|
+
if (!this.cfg.enabled)
|
|
130
|
+
return;
|
|
131
|
+
if (this.states.has(sessionName))
|
|
132
|
+
return;
|
|
133
|
+
const now = (this.deps.now ?? Date.now)();
|
|
134
|
+
const state = {
|
|
135
|
+
sessionName,
|
|
136
|
+
detectedAt: now,
|
|
137
|
+
status: 'detected',
|
|
138
|
+
};
|
|
139
|
+
this.states.set(sessionName, state);
|
|
140
|
+
this.emit('detected', { sessionName });
|
|
141
|
+
// Enter the confirm window before any destructive action.
|
|
142
|
+
state.status = 'confirming';
|
|
143
|
+
const handle = this.setTimer(() => void this.confirm(sessionName), this.cfg.confirmWindowMs);
|
|
144
|
+
this.timers.set(sessionName, handle);
|
|
145
|
+
}
|
|
146
|
+
isRecoveryActive(sessionName) {
|
|
147
|
+
const s = this.states.get(sessionName);
|
|
148
|
+
return !!s && s.status !== 'recovered' && s.status !== 'escalated';
|
|
149
|
+
}
|
|
150
|
+
listActive() {
|
|
151
|
+
return Array.from(this.states.values());
|
|
152
|
+
}
|
|
153
|
+
clear(sessionName) {
|
|
154
|
+
const t = this.timers.get(sessionName);
|
|
155
|
+
if (t)
|
|
156
|
+
this.clearTimer(t);
|
|
157
|
+
this.timers.delete(sessionName);
|
|
158
|
+
this.states.delete(sessionName);
|
|
159
|
+
}
|
|
160
|
+
shutdown() {
|
|
161
|
+
for (const t of this.timers.values())
|
|
162
|
+
this.clearTimer(t);
|
|
163
|
+
this.timers.clear();
|
|
164
|
+
this.states.clear();
|
|
165
|
+
}
|
|
166
|
+
// ── Confirm + recover ────────────────────────────────────────────────
|
|
167
|
+
async confirm(sessionName) {
|
|
168
|
+
const state = this.states.get(sessionName);
|
|
169
|
+
if (!state)
|
|
170
|
+
return;
|
|
171
|
+
const output = this.deps.getRecentOutput(sessionName);
|
|
172
|
+
// Confirmation gate: the signature must STILL be the tail. If it scrolled
|
|
173
|
+
// out (the session progressed past the error), this was not a wedge — a
|
|
174
|
+
// false alarm (e.g. a session that quoted the error then kept working).
|
|
175
|
+
if (!signatureIsTail(output)) {
|
|
176
|
+
this.emit('false-alarm', { sessionName });
|
|
177
|
+
this.clear(sessionName);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
// Confirmed wedge → hand to the recovery policy.
|
|
181
|
+
let outcome = 'failed';
|
|
182
|
+
try {
|
|
183
|
+
outcome = await this.deps.recoverFn(sessionName);
|
|
184
|
+
}
|
|
185
|
+
catch (err) {
|
|
186
|
+
this.emit('recovery-error', { sessionName, err });
|
|
187
|
+
outcome = 'failed';
|
|
188
|
+
}
|
|
189
|
+
switch (outcome) {
|
|
190
|
+
case 'respawned':
|
|
191
|
+
state.status = 'recovered';
|
|
192
|
+
this.emit('recovered', { sessionName });
|
|
193
|
+
this.clear(sessionName);
|
|
194
|
+
return;
|
|
195
|
+
case 'dry-run':
|
|
196
|
+
// Housekeeping only — would-have-respawned. Keep state so we don't
|
|
197
|
+
// re-confirm the same wedge every tick; the dry-run log is the signal.
|
|
198
|
+
state.status = 'escalated';
|
|
199
|
+
this.emit('dry-run', { sessionName });
|
|
200
|
+
return;
|
|
201
|
+
case 'detect-only':
|
|
202
|
+
case 'failed':
|
|
203
|
+
default:
|
|
204
|
+
this.escalate(sessionName, outcome);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
escalate(sessionName, outcome) {
|
|
209
|
+
const state = this.states.get(sessionName);
|
|
210
|
+
if (!state)
|
|
211
|
+
return;
|
|
212
|
+
state.status = 'escalated';
|
|
213
|
+
const detail = outcome === 'failed'
|
|
214
|
+
? `${friendlyName(sessionName)} is wedged on a stuck-context error and my respawn attempt did not clear it. Want me to dig in?`
|
|
215
|
+
: `${friendlyName(sessionName)} is wedged on a stuck-context error (it can only be fixed by a fresh restart, which is currently off). Want me to restart it?`;
|
|
216
|
+
void this.notify(sessionName, detail);
|
|
217
|
+
this.emit('escalated', { sessionName, outcome });
|
|
218
|
+
// Keep state so a subsequent scan doesn't re-report the same wedge.
|
|
219
|
+
}
|
|
220
|
+
async notify(sessionName, text) {
|
|
221
|
+
try {
|
|
222
|
+
await this.deps.notifyFn(sessionName, text);
|
|
223
|
+
}
|
|
224
|
+
catch (err) {
|
|
225
|
+
this.emit('notify-error', { sessionName, err });
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
setTimer(fn, ms) {
|
|
229
|
+
return (this.deps.setTimer ?? setTimeout)(fn, ms);
|
|
230
|
+
}
|
|
231
|
+
clearTimer(handle) {
|
|
232
|
+
(this.deps.clearTimer ?? clearTimeout)(handle);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function friendlyName(sessionName) {
|
|
236
|
+
return sessionName.replace(/^ai\.instar\./, '').replace(/-server$/, '').replace(/-lifeline$/, '');
|
|
237
|
+
}
|
|
238
|
+
//# sourceMappingURL=ContextWedgeSentinel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextWedgeSentinel.js","sourceRoot":"","sources":["../../src/monitoring/ContextWedgeSentinel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAmD3C,MAAM,cAAc,GAAyC;IAC3D,OAAO,EAAE,IAAI;IACb,cAAc,EAAE,MAAM;IACtB,eAAe,EAAE,MAAM;CACxB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,4DAA4D;IAC5D,uEAAuE;CACxE,CAAC;AAEF,2EAA2E;AAC3E,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACxB,KAAK,MAAM,GAAG,IAAI,sBAAsB,EAAE,CAAC;QACzC,IAAI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E,EAAU;QACzC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACpD,CAAC;IAEO,UAAU,CAAC,MAAqC;QACtD,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;CACF;AAED,SAAS,YAAY,CAAC,WAAmB;IACvC,OAAO,WAAW,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AACpG,CAAC"}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
*
|
|
29
29
|
* Spec: docs/specs/silently-stopped-trio.md
|
|
30
30
|
*/
|
|
31
|
-
export type SentinelEventKind = 'detected' | 'nudged' | 'recovered' | 'escalated' | 'escalation-sent' | 'escalation-suppressed' | 'nudge-error' | 'recovery-error' | 'notify-error';
|
|
31
|
+
export type SentinelEventKind = 'detected' | 'nudged' | 'recovered' | 'escalated' | 'escalation-sent' | 'escalation-suppressed' | 'nudge-error' | 'recovery-error' | 'notify-error' | 'dry-run' | 'false-alarm';
|
|
32
32
|
export interface SentinelLogEntry {
|
|
33
33
|
ts: string;
|
|
34
34
|
kind: SentinelEventKind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SentinelNotifier.d.ts","sourceRoot":"","sources":["../../src/monitoring/SentinelNotifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,QAAQ,GACR,WAAW,GACX,WAAW,GACX,iBAAiB,GACjB,uBAAuB,GACvB,aAAa,GACb,gBAAgB,GAChB,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"SentinelNotifier.d.ts","sourceRoot":"","sources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BAG9C,IAAI,EAAE,oBAAoB,EAC3C,GAAG,GAAE,sBAA2B;IAKlC,wDAAwD;IACxD,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAI7F;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAUnE,yDAAyD;IACnD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAK/B,oDAAoD;IACpD,IAAI,IAAI,IAAI;IAKZ,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,UAAU;YAOJ,KAAK;IA2BnB,+EAA+E;IAC/E,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,KAAK;CAcd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SentinelNotifier.js","sourceRoot":"","sources":["../../src/monitoring/SentinelNotifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;
|
|
1
|
+
{"version":3,"file":"SentinelNotifier.js","sourceRoot":"","sources":["../../src/monitoring/SentinelNotifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAwDH,MAAM,cAAc,GAAqC;IACvD,kBAAkB,EAAE,KAAK;IACzB,gBAAgB,EAAE,KAAK;CACxB,CAAC;AAEF,MAAM,OAAO,gBAAgB;IAMR;IALF,GAAG,CAAmC;IACtC,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC7C,WAAW,GAAyC,IAAI,CAAC;IAEjE,YACmB,IAA0B,EAC3C,MAA8B,EAAE;QADf,SAAI,GAAJ,IAAI,CAAsB;QAG3C,IAAI,CAAC,GAAG,GAAG,EAAE,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QAAQ;YACR,WAAW;YACX,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9B,CAAC;QACF,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QAAC,MAAM,CAAC;YACP,+DAA+D;QACjE,CAAC;IACH,CAAC;CACF;AAED,SAAS,QAAQ,CAAC,WAAmB;IACnC,OAAO,WAAW,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AACpG,CAAC"}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import type { SocketDisconnectSentinelDeps } from './SocketDisconnectSentinel.js';
|
|
23
23
|
import type { ActiveWorkSilenceSentinelDeps, SessionRegistryEntry } from './ActiveWorkSilenceSentinel.js';
|
|
24
|
+
import type { ContextWedgeSentinelDeps } from './ContextWedgeSentinel.js';
|
|
24
25
|
import type { IntelligenceFramework } from '../core/intelligenceProviderFactory.js';
|
|
25
26
|
/** Minimal SessionManager surface the wiring depends on. */
|
|
26
27
|
export interface SentinelSessionSurface {
|
|
@@ -61,6 +62,28 @@ export declare function buildSocketDisconnectDeps(opts: {
|
|
|
61
62
|
sessions: SentinelSessionSurface;
|
|
62
63
|
escalate: EscalateFn;
|
|
63
64
|
}): SocketDisconnectSentinelDeps;
|
|
65
|
+
/**
|
|
66
|
+
* Builds the ContextWedgeSentinel deps. The `recoverFn` encodes the
|
|
67
|
+
* detect-only / dry-run / live recovery policy from autoRecovery config and
|
|
68
|
+
* delegates the actual fresh respawn to the injected `freshRespawn` callback
|
|
69
|
+
* (server bootstrap wires it to SessionRefresh.refreshSession({ fresh: true }),
|
|
70
|
+
* which clears the topic's resume UUID so the new session never --resume-s the
|
|
71
|
+
* corrupted transcript). Keeping policy here — not in the sentinel — means the
|
|
72
|
+
* sentinel stays a pure detector + lifecycle and the rollout-staged flag is
|
|
73
|
+
* observed in exactly one place.
|
|
74
|
+
*/
|
|
75
|
+
export declare function buildContextWedgeDeps(opts: {
|
|
76
|
+
sessions: SentinelSessionSurface;
|
|
77
|
+
escalate: EscalateFn;
|
|
78
|
+
/** autoRecovery config (the Graduated-Feature-Rollout staged flag). */
|
|
79
|
+
autoRecovery: {
|
|
80
|
+
enabled: boolean;
|
|
81
|
+
dryRun?: boolean;
|
|
82
|
+
};
|
|
83
|
+
/** Performs the destructive fresh respawn. Returns true if the session was
|
|
84
|
+
* actually killed + respawned. Wired to SessionRefresh fresh-mode. */
|
|
85
|
+
freshRespawn: (sessionName: string) => Promise<boolean>;
|
|
86
|
+
}): ContextWedgeSentinelDeps;
|
|
64
87
|
/**
|
|
65
88
|
* Detector: does this captured frame show the framework actively working
|
|
66
89
|
* (spinner, tool call, "esc to interrupt", "(running)") rather than sitting
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentinelWiring.d.ts","sourceRoot":"","sources":["../../src/monitoring/sentinelWiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,KAAK,EACV,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"sentinelWiring.d.ts","sourceRoot":"","sources":["../../src/monitoring/sentinelWiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,KAAK,EACV,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,2BAA2B,CAAC;AAEnC,OAAO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EAAE,MAAM,GAAG,OAAO,CAAC;IAChE,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnE,oEAAoE;IACpE,kBAAkB,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,8EAA8E;IAC9E,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D,oEAAoE;IACpE,cAAc,CACZ,IAAI,EAAE,iBAAiB,EACvB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EAAE,GACtB,IAAI,CAAC;CACT;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,wBAAwB,GAAG;IACvE,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE,CA8DA"}
|
|
@@ -44,6 +44,7 @@ export function makeAttentionPoster(opts) {
|
|
|
44
44
|
}
|
|
45
45
|
const SOCKET_CAPTURE_LINES = 40;
|
|
46
46
|
const SILENCE_CAPTURE_LINES = 40;
|
|
47
|
+
const WEDGE_CAPTURE_LINES = 30;
|
|
47
48
|
export function buildSocketDisconnectDeps(opts) {
|
|
48
49
|
return {
|
|
49
50
|
getRecentOutput: (sessionName) => opts.sessions.captureOutput(sessionName, SOCKET_CAPTURE_LINES) ?? '',
|
|
@@ -61,6 +62,41 @@ export function buildSocketDisconnectDeps(opts) {
|
|
|
61
62
|
listSessionNames: () => opts.sessions.listRunningSessions().map((s) => s.tmuxSession),
|
|
62
63
|
};
|
|
63
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Builds the ContextWedgeSentinel deps. The `recoverFn` encodes the
|
|
67
|
+
* detect-only / dry-run / live recovery policy from autoRecovery config and
|
|
68
|
+
* delegates the actual fresh respawn to the injected `freshRespawn` callback
|
|
69
|
+
* (server bootstrap wires it to SessionRefresh.refreshSession({ fresh: true }),
|
|
70
|
+
* which clears the topic's resume UUID so the new session never --resume-s the
|
|
71
|
+
* corrupted transcript). Keeping policy here — not in the sentinel — means the
|
|
72
|
+
* sentinel stays a pure detector + lifecycle and the rollout-staged flag is
|
|
73
|
+
* observed in exactly one place.
|
|
74
|
+
*/
|
|
75
|
+
export function buildContextWedgeDeps(opts) {
|
|
76
|
+
return {
|
|
77
|
+
getRecentOutput: (sessionName) => opts.sessions.captureOutput(sessionName, WEDGE_CAPTURE_LINES) ?? '',
|
|
78
|
+
recoverFn: async (sessionName) => {
|
|
79
|
+
// dark: detection + audit only, no destructive action.
|
|
80
|
+
if (!opts.autoRecovery.enabled)
|
|
81
|
+
return 'detect-only';
|
|
82
|
+
// dry-run: log the would-respawn decision, kill nothing.
|
|
83
|
+
if (opts.autoRecovery.dryRun)
|
|
84
|
+
return 'dry-run';
|
|
85
|
+
// live: actually kill + fresh-respawn.
|
|
86
|
+
try {
|
|
87
|
+
const ok = await opts.freshRespawn(sessionName);
|
|
88
|
+
return ok ? 'respawned' : 'failed';
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return 'failed';
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
notifyFn: async (sessionName, text) => {
|
|
95
|
+
await opts.escalate(sessionName, text);
|
|
96
|
+
},
|
|
97
|
+
listSessionNames: () => opts.sessions.listRunningSessions().map((s) => s.tmuxSession),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
64
100
|
/**
|
|
65
101
|
* Detector: does this captured frame show the framework actively working
|
|
66
102
|
* (spinner, tool call, "esc to interrupt", "(running)") rather than sitting
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentinelWiring.js","sourceRoot":"","sources":["../../src/monitoring/sentinelWiring.ts"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|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-05-28T17:
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-05-28T17:46:31.741Z",
|
|
5
|
+
"instarVersion": "1.3.62",
|
|
6
6
|
"entryCount": 193,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"domain": "identity",
|
|
12
12
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
13
13
|
"installedPath": ".instar/hooks/instar/session-start.sh",
|
|
14
|
-
"contentHash": "
|
|
14
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
15
15
|
"since": "2025-01-01"
|
|
16
16
|
},
|
|
17
17
|
"hook:dangerous-command-guard": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"domain": "safety",
|
|
21
21
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
22
22
|
"installedPath": ".instar/hooks/instar/dangerous-command-guard.sh",
|
|
23
|
-
"contentHash": "
|
|
23
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
24
24
|
"since": "2025-01-01"
|
|
25
25
|
},
|
|
26
26
|
"hook:grounding-before-messaging": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"domain": "safety",
|
|
30
30
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
31
31
|
"installedPath": ".instar/hooks/instar/grounding-before-messaging.sh",
|
|
32
|
-
"contentHash": "
|
|
32
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
33
33
|
"since": "2025-01-01"
|
|
34
34
|
},
|
|
35
35
|
"hook:compaction-recovery": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"domain": "identity",
|
|
39
39
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
40
40
|
"installedPath": ".instar/hooks/instar/compaction-recovery.sh",
|
|
41
|
-
"contentHash": "
|
|
41
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
42
42
|
"since": "2025-01-01"
|
|
43
43
|
},
|
|
44
44
|
"hook:external-operation-gate": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"domain": "safety",
|
|
48
48
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
49
49
|
"installedPath": ".instar/hooks/instar/external-operation-gate.js",
|
|
50
|
-
"contentHash": "
|
|
50
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
51
51
|
"since": "2025-01-01"
|
|
52
52
|
},
|
|
53
53
|
"hook:deferral-detector": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"domain": "safety",
|
|
57
57
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
58
58
|
"installedPath": ".instar/hooks/instar/deferral-detector.js",
|
|
59
|
-
"contentHash": "
|
|
59
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
60
60
|
"since": "2025-01-01"
|
|
61
61
|
},
|
|
62
62
|
"hook:post-action-reflection": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"domain": "evolution",
|
|
66
66
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
67
67
|
"installedPath": ".instar/hooks/instar/post-action-reflection.js",
|
|
68
|
-
"contentHash": "
|
|
68
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
69
69
|
"since": "2025-01-01"
|
|
70
70
|
},
|
|
71
71
|
"hook:external-communication-guard": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"domain": "safety",
|
|
75
75
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
76
76
|
"installedPath": ".instar/hooks/instar/external-communication-guard.js",
|
|
77
|
-
"contentHash": "
|
|
77
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
78
78
|
"since": "2025-01-01"
|
|
79
79
|
},
|
|
80
80
|
"hook:scope-coherence-collector": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"domain": "coherence",
|
|
84
84
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
85
85
|
"installedPath": ".instar/hooks/instar/scope-coherence-collector.js",
|
|
86
|
-
"contentHash": "
|
|
86
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
87
87
|
"since": "2025-01-01"
|
|
88
88
|
},
|
|
89
89
|
"hook:scope-coherence-checkpoint": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"domain": "coherence",
|
|
93
93
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
94
94
|
"installedPath": ".instar/hooks/instar/scope-coherence-checkpoint.js",
|
|
95
|
-
"contentHash": "
|
|
95
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
96
96
|
"since": "2025-01-01"
|
|
97
97
|
},
|
|
98
98
|
"hook:free-text-guard": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"domain": "safety",
|
|
102
102
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
103
103
|
"installedPath": ".instar/hooks/instar/free-text-guard.sh",
|
|
104
|
-
"contentHash": "
|
|
104
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
105
105
|
"since": "2025-01-01"
|
|
106
106
|
},
|
|
107
107
|
"hook:claim-intercept": {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"domain": "coherence",
|
|
111
111
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
112
112
|
"installedPath": ".instar/hooks/instar/claim-intercept.js",
|
|
113
|
-
"contentHash": "
|
|
113
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
114
114
|
"since": "2025-01-01"
|
|
115
115
|
},
|
|
116
116
|
"hook:claim-intercept-response": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"domain": "coherence",
|
|
120
120
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
121
121
|
"installedPath": ".instar/hooks/instar/claim-intercept-response.js",
|
|
122
|
-
"contentHash": "
|
|
122
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
123
123
|
"since": "2025-01-01"
|
|
124
124
|
},
|
|
125
125
|
"hook:stop-gate-router": {
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"domain": "safety",
|
|
129
129
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
130
130
|
"installedPath": ".instar/hooks/instar/stop-gate-router.js",
|
|
131
|
-
"contentHash": "
|
|
131
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
132
132
|
"since": "2025-01-01"
|
|
133
133
|
},
|
|
134
134
|
"hook:auto-approve-permissions": {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"domain": "safety",
|
|
138
138
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
139
139
|
"installedPath": ".instar/hooks/instar/auto-approve-permissions.js",
|
|
140
|
-
"contentHash": "
|
|
140
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
141
141
|
"since": "2025-01-01"
|
|
142
142
|
},
|
|
143
143
|
"job:health-check": {
|
|
@@ -1489,7 +1489,7 @@
|
|
|
1489
1489
|
"type": "subsystem",
|
|
1490
1490
|
"domain": "updates",
|
|
1491
1491
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
1492
|
-
"contentHash": "
|
|
1492
|
+
"contentHash": "174263f9ace866687dd5780d8a912d64889239921245bac492de2cbe4824c8e4",
|
|
1493
1493
|
"since": "2025-01-01"
|
|
1494
1494
|
},
|
|
1495
1495
|
"subsystem:scheduler": {
|