instar 1.3.985 → 1.3.987

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.
@@ -0,0 +1,137 @@
1
+ /**
2
+ * Readiness classification for a framework TUI pane tail.
3
+ *
4
+ * WHY THIS EXISTS AS ITS OWN MODULE
5
+ * ---------------------------------
6
+ * On 2026-07-26 a user's message was injected into a freshly-spawned Claude Code
7
+ * pane 15 seconds before that pane could accept input. The paste was swallowed by
8
+ * the TUI still painting itself, and the delivery was logged as a SUCCESS
9
+ * (`Injected initial message into "…" (915 chars, after stabilization delay)`).
10
+ * The message reached the agent only because an unrelated start-hook backstop
11
+ * re-read recent history.
12
+ *
13
+ * The cause was the readiness probe, not the injector. It accepted a bare
14
+ * slash-command mention anywhere in the captured tail:
15
+ *
16
+ * if (/\/(effort|model|fast)/.test(tail)) return true;
17
+ *
18
+ * Claude Code's startup banner advertises slash commands IN PROSE — the pane that
19
+ * fooled it carried "…Run /model and select Fable to use it." So the probe matched
20
+ * a promotional line and declared a still-booting pane ready. A string matcher
21
+ * fooled by its own subject: the banner that proves the app is NOT yet accepting
22
+ * input was read as proof that it is.
23
+ *
24
+ * THOSE CLAUSES ARE DELETED, NOT TUNED. The first fix attempt kept them and
25
+ * required "status-bar shape" (line-start, or directly after an interpunct).
26
+ * Second-pass review falsified that:
27
+ * - The banner uses the same shape. `⚠ CLAUDE.md is over the … limit · /memory
28
+ * to free up context` and `+1 more · /status` are BANNER lines in interpunct
29
+ * shape. The only thing separating them from a status bar was that `memory`
30
+ * and `status` fall outside the three-word set — i.e. still vocabulary, and a
31
+ * plausible `· /model to opt in` promo line matched outright.
32
+ * - The line-start branch reinstated the Anthropic-copy dependency it claimed to
33
+ * remove: at a fixed pane width an edit shifting the wrap by ~14 characters
34
+ * puts `/model` at column 0 and the original defect returns.
35
+ * A signal that cannot separate an ADVERT for a command from a STATUS BAR showing
36
+ * one carries no information about readiness. Widening the genuinely structural
37
+ * markers below costs nothing and covers the same panes.
38
+ *
39
+ * WHY THE ANSWER IS NOT A BOOLEAN
40
+ * -------------------------------
41
+ * There are three consumers and they want OPPOSITE responses to the two ways a
42
+ * pane can fail to be ready:
43
+ * - the spawn/inject path — must not type into a pane that is still painting,
44
+ * and must not type into a MENU (see below);
45
+ * - `waitForClaudeReadyWithRetry` — waits, then falls back;
46
+ * - the Slack stuck-session path (`server.ts`) — calls this on an ALREADY-LIVE
47
+ * session and KILLS it when the answer is not-ready.
48
+ * A bare `false` tells that third caller "kill this" for a pane that is merely
49
+ * mid-boot or politely waiting on a question. So the probe reports WHICH state it
50
+ * saw and each caller applies its own policy. `isReadyPromptTail` is retained as
51
+ * the boolean façade for callers that genuinely only want "can I type now".
52
+ *
53
+ * THE MENU CASE (found by the operator, 2026-07-26)
54
+ * -------------------------------------------------
55
+ * Claude Code paints the SAME `❯` glyph on a menu's focused option as it uses for
56
+ * the input box (`PermissionPromptAutoResolver.SELECTOR_GLYPH`). So a session
57
+ * sitting on a startup question read as READY. This is strictly worse than the
58
+ * banner case: text typed at a banner is lost, but text typed at a menu is not —
59
+ * Enter SELECTS AN OPTION, so an arriving message can answer a permission question
60
+ * on the operator's behalf. A menu is therefore classified as its own state, never
61
+ * as ready, no matter which glyphs it carries.
62
+ *
63
+ * Kept pure (text in, verdict out) so it is testable without tmux, and so the
64
+ * regression fixtures are the literal pane text that caused each finding.
65
+ *
66
+ * RULE 3.1 RATIONALE (state-detection; registry:
67
+ * `specs/provider-portability/06-state-detector-registry.md`)
68
+ * ------------------------------------------------------------------------------
69
+ * - **Criticality:** silent-corruption-if-wrong — the worst class, demonstrated
70
+ * twice. A false `ready` on a painting pane loses a user message AND writes a
71
+ * success line for it; a false `ready` on a menu is worse still, because Enter
72
+ * SELECTS an option, so an arriving message can answer a permission question on
73
+ * the operator's behalf.
74
+ * - **Frequency:** per-spawn and per-inject, plus per-stuck-check on the Slack
75
+ * path.
76
+ * - **Stability:** UNSTABLE. Claude Code's TUI is a private surface. This is not a
77
+ * theoretical rating — the 2026-07-26 incident WAS an upstream copy change (a
78
+ * Fable-5 promo line) turning a passing detector into a failing one, and the
79
+ * menu case is an upstream glyph reuse.
80
+ * - **Fallback:** partial and asymmetric. The spawn path has an extended wait and
81
+ * a blind-inject-if-alive fallback; the loss on 2026-07-26 was caught only by
82
+ * the start hook's unanswered-message backstop, which is an unrelated path and
83
+ * cannot be relied on as this detector's safety net. The Slack path's not-ready
84
+ * branch is DESTRUCTIVE (kill + respawn), so a wrong answer there costs a live
85
+ * session, not a delay.
86
+ * - **→ Verdict: deterministic + canary REQUIRED.** This module ships the
87
+ * deterministic half plus regression fixtures carrying the literal pane text of
88
+ * both known failures. It does NOT ship a canary, so it detects the two shapes
89
+ * that already bit us and not the next drift. Canary tracked as CMT-1044.
90
+ * <!-- tracked: CMT-1044 -->
91
+ */
92
+ /**
93
+ * What a captured pane tail shows.
94
+ *
95
+ * - `ready` — an input surface is drawn and accepting input.
96
+ * - `menu` — a numbered selection menu is focused. NOT ready, and NOT a
97
+ * stuck session: something is waiting on an answer. A caller
98
+ * that kills on not-ready must not kill on this.
99
+ * - `not-ready` — no input surface found (typically still painting).
100
+ */
101
+ export type PaneReadiness = 'ready' | 'menu' | 'not-ready';
102
+ /**
103
+ * True when the tail shows a FOCUSED selection menu.
104
+ *
105
+ * Requires the selector glyph to sit ON a numbered option line, AND at least two
106
+ * numbered option lines overall. Both halves are load-bearing:
107
+ *
108
+ * - "glyph on the option line" separates a menu from the input box. The box
109
+ * renders `❯` alone on its own line; a menu renders `❯ 1. Yes`. Testing only
110
+ * "the tail contains ❯ somewhere" would classify ordinary assistant output
111
+ * that happens to list `1.` and `2.` above the prompt as a menu, stalling a
112
+ * genuinely ready session — an over-block on the inject path.
113
+ * - "at least two options" separates a menu from a single numbered line of
114
+ * ordinary output.
115
+ *
116
+ * This mirrors `PermissionPromptAutoResolver`'s requirement (a line whose lead
117
+ * glyphs contain ❯ whose text is `N.` + a label) rather than inventing a second,
118
+ * divergent notion of what a menu looks like.
119
+ */
120
+ export declare function tailShowsMenu(tail: string): boolean;
121
+ /**
122
+ * Classify a captured pane tail.
123
+ *
124
+ * `tail` is the joined last-N non-blank lines of a `capture-pane` read. Never pass
125
+ * the whole scrollback: a banner that has scrolled far above the prompt is not
126
+ * evidence either way, and older content only adds false-positive surface.
127
+ */
128
+ export declare function classifyPaneReadiness(tail: string): PaneReadiness;
129
+ /**
130
+ * Boolean façade: can text be typed into this pane right now?
131
+ *
132
+ * A menu answers `false` — correct for every caller that is about to type. A
133
+ * caller whose not-ready branch is DESTRUCTIVE (kill/respawn) must use
134
+ * `classifyPaneReadiness` instead and leave a `menu` pane alone.
135
+ */
136
+ export declare function isReadyPromptTail(tail: string): boolean;
137
+ //# sourceMappingURL=claudeReadinessProbe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claudeReadinessProbe.d.ts","sourceRoot":"","sources":["../../src/core/claudeReadinessProbe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC;AA6B3D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAUnD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAejE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD"}
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Readiness classification for a framework TUI pane tail.
3
+ *
4
+ * WHY THIS EXISTS AS ITS OWN MODULE
5
+ * ---------------------------------
6
+ * On 2026-07-26 a user's message was injected into a freshly-spawned Claude Code
7
+ * pane 15 seconds before that pane could accept input. The paste was swallowed by
8
+ * the TUI still painting itself, and the delivery was logged as a SUCCESS
9
+ * (`Injected initial message into "…" (915 chars, after stabilization delay)`).
10
+ * The message reached the agent only because an unrelated start-hook backstop
11
+ * re-read recent history.
12
+ *
13
+ * The cause was the readiness probe, not the injector. It accepted a bare
14
+ * slash-command mention anywhere in the captured tail:
15
+ *
16
+ * if (/\/(effort|model|fast)/.test(tail)) return true;
17
+ *
18
+ * Claude Code's startup banner advertises slash commands IN PROSE — the pane that
19
+ * fooled it carried "…Run /model and select Fable to use it." So the probe matched
20
+ * a promotional line and declared a still-booting pane ready. A string matcher
21
+ * fooled by its own subject: the banner that proves the app is NOT yet accepting
22
+ * input was read as proof that it is.
23
+ *
24
+ * THOSE CLAUSES ARE DELETED, NOT TUNED. The first fix attempt kept them and
25
+ * required "status-bar shape" (line-start, or directly after an interpunct).
26
+ * Second-pass review falsified that:
27
+ * - The banner uses the same shape. `⚠ CLAUDE.md is over the … limit · /memory
28
+ * to free up context` and `+1 more · /status` are BANNER lines in interpunct
29
+ * shape. The only thing separating them from a status bar was that `memory`
30
+ * and `status` fall outside the three-word set — i.e. still vocabulary, and a
31
+ * plausible `· /model to opt in` promo line matched outright.
32
+ * - The line-start branch reinstated the Anthropic-copy dependency it claimed to
33
+ * remove: at a fixed pane width an edit shifting the wrap by ~14 characters
34
+ * puts `/model` at column 0 and the original defect returns.
35
+ * A signal that cannot separate an ADVERT for a command from a STATUS BAR showing
36
+ * one carries no information about readiness. Widening the genuinely structural
37
+ * markers below costs nothing and covers the same panes.
38
+ *
39
+ * WHY THE ANSWER IS NOT A BOOLEAN
40
+ * -------------------------------
41
+ * There are three consumers and they want OPPOSITE responses to the two ways a
42
+ * pane can fail to be ready:
43
+ * - the spawn/inject path — must not type into a pane that is still painting,
44
+ * and must not type into a MENU (see below);
45
+ * - `waitForClaudeReadyWithRetry` — waits, then falls back;
46
+ * - the Slack stuck-session path (`server.ts`) — calls this on an ALREADY-LIVE
47
+ * session and KILLS it when the answer is not-ready.
48
+ * A bare `false` tells that third caller "kill this" for a pane that is merely
49
+ * mid-boot or politely waiting on a question. So the probe reports WHICH state it
50
+ * saw and each caller applies its own policy. `isReadyPromptTail` is retained as
51
+ * the boolean façade for callers that genuinely only want "can I type now".
52
+ *
53
+ * THE MENU CASE (found by the operator, 2026-07-26)
54
+ * -------------------------------------------------
55
+ * Claude Code paints the SAME `❯` glyph on a menu's focused option as it uses for
56
+ * the input box (`PermissionPromptAutoResolver.SELECTOR_GLYPH`). So a session
57
+ * sitting on a startup question read as READY. This is strictly worse than the
58
+ * banner case: text typed at a banner is lost, but text typed at a menu is not —
59
+ * Enter SELECTS AN OPTION, so an arriving message can answer a permission question
60
+ * on the operator's behalf. A menu is therefore classified as its own state, never
61
+ * as ready, no matter which glyphs it carries.
62
+ *
63
+ * Kept pure (text in, verdict out) so it is testable without tmux, and so the
64
+ * regression fixtures are the literal pane text that caused each finding.
65
+ *
66
+ * RULE 3.1 RATIONALE (state-detection; registry:
67
+ * `specs/provider-portability/06-state-detector-registry.md`)
68
+ * ------------------------------------------------------------------------------
69
+ * - **Criticality:** silent-corruption-if-wrong — the worst class, demonstrated
70
+ * twice. A false `ready` on a painting pane loses a user message AND writes a
71
+ * success line for it; a false `ready` on a menu is worse still, because Enter
72
+ * SELECTS an option, so an arriving message can answer a permission question on
73
+ * the operator's behalf.
74
+ * - **Frequency:** per-spawn and per-inject, plus per-stuck-check on the Slack
75
+ * path.
76
+ * - **Stability:** UNSTABLE. Claude Code's TUI is a private surface. This is not a
77
+ * theoretical rating — the 2026-07-26 incident WAS an upstream copy change (a
78
+ * Fable-5 promo line) turning a passing detector into a failing one, and the
79
+ * menu case is an upstream glyph reuse.
80
+ * - **Fallback:** partial and asymmetric. The spawn path has an extended wait and
81
+ * a blind-inject-if-alive fallback; the loss on 2026-07-26 was caught only by
82
+ * the start hook's unanswered-message backstop, which is an unrelated path and
83
+ * cannot be relied on as this detector's safety net. The Slack path's not-ready
84
+ * branch is DESTRUCTIVE (kill + respawn), so a wrong answer there costs a live
85
+ * session, not a delay.
86
+ * - **→ Verdict: deterministic + canary REQUIRED.** This module ships the
87
+ * deterministic half plus regression fixtures carrying the literal pane text of
88
+ * both known failures. It does NOT ship a canary, so it detects the two shapes
89
+ * that already bit us and not the next drift. Canary tracked as CMT-1044.
90
+ * <!-- tracked: CMT-1044 -->
91
+ */
92
+ /**
93
+ * Status-bar / footer strings that only exist once the TUI has finished starting.
94
+ *
95
+ * Sourced from the probes already trusted for this elsewhere in the tree
96
+ * (`SessionReaper`, the interactive-pool adapter config) rather than invented
97
+ * here, so the readiness question gets one vocabulary instead of four. Verified
98
+ * absent from the boot banner. `bypass permissions` alone covered only ONE of
99
+ * Claude Code's permission-mode footers — a session in auto-accept mode shows
100
+ * none of it — which is why the `❯`-is-always-present assumption was load-bearing
101
+ * before and is not now.
102
+ */
103
+ const AT_PROMPT_FOOTERS = [
104
+ 'bypass permissions',
105
+ '? for shortcuts',
106
+ 'shift+tab to cycle',
107
+ 'auto-accept edits',
108
+ ];
109
+ /**
110
+ * A menu option line: an optional glyph run, then `N.` or `N)` and a label.
111
+ * Matches the shape Claude Code uses for approval / consent / trust prompts.
112
+ */
113
+ const MENU_OPTION_RE = /^[^\w\n]{0,4}\s*\d+[.)]\s+\S/;
114
+ /** The selector cursor Claude Code paints on the focused option — and on nothing else. */
115
+ const SELECTOR_GLYPH = '❯';
116
+ /**
117
+ * True when the tail shows a FOCUSED selection menu.
118
+ *
119
+ * Requires the selector glyph to sit ON a numbered option line, AND at least two
120
+ * numbered option lines overall. Both halves are load-bearing:
121
+ *
122
+ * - "glyph on the option line" separates a menu from the input box. The box
123
+ * renders `❯` alone on its own line; a menu renders `❯ 1. Yes`. Testing only
124
+ * "the tail contains ❯ somewhere" would classify ordinary assistant output
125
+ * that happens to list `1.` and `2.` above the prompt as a menu, stalling a
126
+ * genuinely ready session — an over-block on the inject path.
127
+ * - "at least two options" separates a menu from a single numbered line of
128
+ * ordinary output.
129
+ *
130
+ * This mirrors `PermissionPromptAutoResolver`'s requirement (a line whose lead
131
+ * glyphs contain ❯ whose text is `N.` + a label) rather than inventing a second,
132
+ * divergent notion of what a menu looks like.
133
+ */
134
+ export function tailShowsMenu(tail) {
135
+ if (!tail || !tail.includes(SELECTOR_GLYPH))
136
+ return false;
137
+ let options = 0;
138
+ let glyphOnOption = false;
139
+ for (const line of tail.split('\n')) {
140
+ if (!MENU_OPTION_RE.test(line))
141
+ continue;
142
+ options++;
143
+ if (line.includes(SELECTOR_GLYPH))
144
+ glyphOnOption = true;
145
+ }
146
+ return glyphOnOption && options >= 2;
147
+ }
148
+ /**
149
+ * Classify a captured pane tail.
150
+ *
151
+ * `tail` is the joined last-N non-blank lines of a `capture-pane` read. Never pass
152
+ * the whole scrollback: a banner that has scrolled far above the prompt is not
153
+ * evidence either way, and older content only adds false-positive surface.
154
+ */
155
+ export function classifyPaneReadiness(tail) {
156
+ if (!tail)
157
+ return 'not-ready';
158
+ // A menu is checked FIRST and wins over every positive marker below, because it
159
+ // carries the same `❯` the input box does. Typing here selects an option.
160
+ if (tailShowsMenu(tail))
161
+ return 'menu';
162
+ // The framework prompt character. Codex uses ›; keeping this probe Claude-only
163
+ // previously delayed continuation bootstraps to the full timeout.
164
+ if (tail.includes(SELECTOR_GLYPH) || tail.includes('›'))
165
+ return 'ready';
166
+ // Footer/status-bar strings that only render once the TUI is up.
167
+ if (AT_PROMPT_FOOTERS.some(marker => tail.includes(marker)))
168
+ return 'ready';
169
+ return 'not-ready';
170
+ }
171
+ /**
172
+ * Boolean façade: can text be typed into this pane right now?
173
+ *
174
+ * A menu answers `false` — correct for every caller that is about to type. A
175
+ * caller whose not-ready branch is DESTRUCTIVE (kill/respawn) must use
176
+ * `classifyPaneReadiness` instead and leave a `menu` pane alone.
177
+ */
178
+ export function isReadyPromptTail(tail) {
179
+ return classifyPaneReadiness(tail) === 'ready';
180
+ }
181
+ //# sourceMappingURL=claudeReadinessProbe.js.map
@@ -0,0 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,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IAExE,iEAAiE;IACjE,IAAI,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAAE,OAAO,OAAO,CAAC;IAE5E,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,qBAAqB,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC;AACjD,CAAC"}
@@ -17,6 +17,7 @@ import { HandshakeManager } from './HandshakeManager.js';
17
17
  import { AgentDiscovery } from './AgentDiscovery.js';
18
18
  import { ThreadlineClient } from './client/ThreadlineClient.js';
19
19
  import { InboundMessageGate } from './InboundMessageGate.js';
20
+ import { type RelayConnectionEvent } from './relayConnectionObserver.js';
20
21
  import { AgentTrustManager } from './AgentTrustManager.js';
21
22
  export interface ThreadlineBootstrapConfig {
22
23
  /** Agent name */
@@ -64,6 +65,14 @@ export interface ThreadlineBootstrapResult {
64
65
  inboundGate?: InboundMessageGate;
65
66
  /** Trust manager */
66
67
  trustManager?: AgentTrustManager;
68
+ /**
69
+ * Most recent relay connection-LOSS event, or null if the relay has never
70
+ * dropped. Exists so a status surface can report WHY the relay is down rather
71
+ * than only that it is — the distinction the 2026-07-26 incident turned on,
72
+ * when the only record available said "connected" for a connection that was
73
+ * gone. See relayConnectionObserver.ts.
74
+ */
75
+ getLastRelayEvent?: () => RelayConnectionEvent | null;
67
76
  }
68
77
  /**
69
78
  * Bootstrap the Threadline protocol stack.
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadlineBootstrap.d.ts","sourceRoot":"","sources":["../../src/threadline/ThreadlineBootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,gBAAgB,EAAE,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OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC;QAAC,uBAAuB,EAAE,OAAO,CAAA;KAAE,CAAC;CAC1G;AAED,MAAM,WAAW,yBAAyB;IACxC,8CAA8C;IAC9C,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,8BAA8B;IAC9B,SAAS,EAAE,cAAc,CAAC;IAC1B,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,+CAA+C;IAC/C,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,iDAAiD;IACjD,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,oBAAoB;IACpB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,oBAAoB,GAAG,IAAI,CAAC;CACvD;AAID;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,yBAAyB,CAAC,CAqRpC"}
@@ -24,6 +24,7 @@ import { DEFAULT_RELAY_URL } from './constants.js';
24
24
  import { resolveThreadlineMcpEntry } from './mcpEntry.js';
25
25
  import { ThreadlineClient } from './client/ThreadlineClient.js';
26
26
  import { InboundMessageGate } from './InboundMessageGate.js';
27
+ import { attachRelayObservability } from './relayConnectionObserver.js';
27
28
  import { AgentTrustManager } from './AgentTrustManager.js';
28
29
  import { SafeFsExecutor } from '../core/SafeFsExecutor.js';
29
30
  import { IdentityManager } from './client/IdentityManager.js';
@@ -147,6 +148,7 @@ export async function bootstrapThreadline(config) {
147
148
  }
148
149
  }
149
150
  let relayClient;
151
+ let relayObservability;
150
152
  let inboundGate;
151
153
  let trustManager;
152
154
  // Always create trust manager when relay is enabled — needed for processing
@@ -249,6 +251,14 @@ export async function bootstrapThreadline(config) {
249
251
  relayClient.on('auto-discovered', (info) => {
250
252
  console.log(`Threadline: auto-discovered ${info.count} agent(s) on relay`);
251
253
  });
254
+ // Record connection LOSS, not just connection. Without this the successful
255
+ // connect line below is the last word the record can ever contain, so a relay
256
+ // that drops afterwards — including the terminal `displaced` case, which
257
+ // disarms reconnect permanently — is invisible. See relayConnectionObserver.ts
258
+ // for the incident this closes.
259
+ relayObservability = attachRelayObservability(relayClient, {
260
+ logDir: path.join(config.stateDir, '..', 'logs'),
261
+ });
252
262
  try {
253
263
  await relayClient.connect();
254
264
  console.log(`Threadline: relay connected (fingerprint: ${relayClient.fingerprint})`);
@@ -273,6 +283,10 @@ export async function bootstrapThreadline(config) {
273
283
  discovery,
274
284
  trustManager,
275
285
  relayClient,
286
+ /** Most recent relay connection-loss event, or null if it has never dropped.
287
+ * Lets a status surface report WHY the relay is down instead of only that it
288
+ * is — the distinction the 2026-07-26 incident turned on. */
289
+ getLastRelayEvent: () => relayObservability?.getLastEvent() ?? null,
276
290
  inboundGate,
277
291
  shutdown: async () => {
278
292
  stopHeartbeat();
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadlineBootstrap.js","sourceRoot":"","sources":["../../src/threadline/ThreadlineBootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM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C,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9D,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,YAAY;IACd,CAAC;IAED,6EAA6E;IAC7E,uEAAuE;IACvE,yEAAyE;IACzE,0EAA0E;IAC1E,yEAAyE;IACzE,6BAA6B;IAC7B,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;QACjF,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7B,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAC5C,mEAAmE,CACpE,CAAC;YACF,MAAM,qBAAqB,EAAE,CAAC,QAAQ,CACpC;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,IAAI,EAAE,QAAQ,CAAC,IAAI;aACpB,EACD,EAAE,KAAK,EAAE,MAAM,EAAE,CAClB,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,uDAAuD;IACzD,CAAC;AACH,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Observability for the server's relay connection.
3
+ *
4
+ * WHY THIS EXISTS
5
+ * ---------------
6
+ * On 2026-07-26 the agent could not send to a peer. The peer was healthy and
7
+ * listening; this agent's relay was down. Diagnosing it was impossible from the
8
+ * record, because the record could only ever say one thing:
9
+ *
10
+ * Threadline: relay connected (fingerprint: …)
11
+ *
12
+ * `RelayClient` emits BOTH `disconnected` (socket close) and `displaced` (another
13
+ * connection claimed the same identity). `ThreadlineBootstrap` subscribed to
14
+ * `message`, `unknown-sender` and `auto-discovered` — and to NEITHER of those two.
15
+ * So a connection that dropped after startup left the successful connect line as
16
+ * the last word forever.
17
+ *
18
+ * THE PART THAT MAKES IT WORTH A MODULE. `displaced` sets `shouldReconnect = false`
19
+ * permanently — deliberately, so two processes do not fight over one identity. That
20
+ * is a *terminal* state: the exponential backoff that would otherwise recover the
21
+ * connection is switched off and never re-armed for the life of the process. A
22
+ * terminal state that is never recorded is the worst combination available: the
23
+ * channel is gone for good and nothing says so.
24
+ *
25
+ * The bootstrap itself documents a known "displacement race" between the server's
26
+ * client and the standalone listener daemon. Whether that race is what fired here
27
+ * is UNKNOWN — and unknowable from the existing record, which is precisely the
28
+ * defect. This module does not diagnose the cause; it makes the next occurrence
29
+ * diagnosable.
30
+ *
31
+ * SCOPE — deliberately narrow. This RECORDS transitions. It does not reconnect,
32
+ * does not re-arm anything, and never changes the client's behaviour. Any recovery
33
+ * fix belongs after this, and would be unverifiable before it.
34
+ */
35
+ /** One recorded relay-connection transition. */
36
+ export interface RelayConnectionEvent {
37
+ ts: string;
38
+ /**
39
+ * `disconnected` — socket closed; the client's backoff will retry.
40
+ * `displaced` — another connection took this identity. TERMINAL: retry is
41
+ * disarmed permanently and this process will not reconnect.
42
+ */
43
+ event: 'disconnected' | 'displaced';
44
+ /** Reason string from the client, clamped. Never trusted as structured data. */
45
+ reason: string;
46
+ fingerprint: string;
47
+ /**
48
+ * True only for `displaced`. Recorded explicitly rather than left implicit,
49
+ * because "will retry" and "will never retry" are the two states a reader
50
+ * actually needs to tell apart, and they are otherwise indistinguishable.
51
+ */
52
+ terminal: boolean;
53
+ }
54
+ /** Minimal shape this module needs — keeps it testable without a real socket. */
55
+ export interface RelayEventSource {
56
+ on(event: string, listener: (...args: unknown[]) => void): unknown;
57
+ readonly fingerprint?: string | null;
58
+ }
59
+ /**
60
+ * Subscribe to the relay client's connection-loss events and record each one.
61
+ *
62
+ * Returns a getter for the most recent event so a status surface can report WHY
63
+ * the connection is down rather than only that it is. Returns null until one
64
+ * fires — which correctly distinguishes "never dropped" from "dropped, cause X".
65
+ */
66
+ export declare function attachRelayObservability(client: RelayEventSource, opts: {
67
+ /** Directory for the durable record. Created if absent. */
68
+ logDir: string;
69
+ /** Injected so tests capture output instead of writing to the console. */
70
+ log?: (line: string) => void;
71
+ /** Injected for the same reason. */
72
+ logError?: (line: string) => void;
73
+ }): {
74
+ getLastEvent: () => RelayConnectionEvent | null;
75
+ };
76
+ //# sourceMappingURL=relayConnectionObserver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relayConnectionObserver.d.ts","sourceRoot":"","sources":["../../src/threadline/relayConnectionObserver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAKH,gDAAgD;AAChD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,KAAK,EAAE,cAAc,GAAG,WAAW,CAAC;IACpC,gFAAgF;IAChF,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,iFAAiF;AACjF,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC;IACnE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AASD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE;IACJ,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,GACA;IAAE,YAAY,EAAE,MAAM,oBAAoB,GAAG,IAAI,CAAA;CAAE,CA6CrD"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Observability for the server's relay connection.
3
+ *
4
+ * WHY THIS EXISTS
5
+ * ---------------
6
+ * On 2026-07-26 the agent could not send to a peer. The peer was healthy and
7
+ * listening; this agent's relay was down. Diagnosing it was impossible from the
8
+ * record, because the record could only ever say one thing:
9
+ *
10
+ * Threadline: relay connected (fingerprint: …)
11
+ *
12
+ * `RelayClient` emits BOTH `disconnected` (socket close) and `displaced` (another
13
+ * connection claimed the same identity). `ThreadlineBootstrap` subscribed to
14
+ * `message`, `unknown-sender` and `auto-discovered` — and to NEITHER of those two.
15
+ * So a connection that dropped after startup left the successful connect line as
16
+ * the last word forever.
17
+ *
18
+ * THE PART THAT MAKES IT WORTH A MODULE. `displaced` sets `shouldReconnect = false`
19
+ * permanently — deliberately, so two processes do not fight over one identity. That
20
+ * is a *terminal* state: the exponential backoff that would otherwise recover the
21
+ * connection is switched off and never re-armed for the life of the process. A
22
+ * terminal state that is never recorded is the worst combination available: the
23
+ * channel is gone for good and nothing says so.
24
+ *
25
+ * The bootstrap itself documents a known "displacement race" between the server's
26
+ * client and the standalone listener daemon. Whether that race is what fired here
27
+ * is UNKNOWN — and unknowable from the existing record, which is precisely the
28
+ * defect. This module does not diagnose the cause; it makes the next occurrence
29
+ * diagnosable.
30
+ *
31
+ * SCOPE — deliberately narrow. This RECORDS transitions. It does not reconnect,
32
+ * does not re-arm anything, and never changes the client's behaviour. Any recovery
33
+ * fix belongs after this, and would be unverifiable before it.
34
+ */
35
+ import fs from 'node:fs';
36
+ import path from 'node:path';
37
+ const MAX_REASON_CHARS = 300;
38
+ function clampReason(reason) {
39
+ const s = typeof reason === 'string' ? reason : String(reason ?? '');
40
+ return s.length > MAX_REASON_CHARS ? `${s.slice(0, MAX_REASON_CHARS)}…` : s;
41
+ }
42
+ /**
43
+ * Subscribe to the relay client's connection-loss events and record each one.
44
+ *
45
+ * Returns a getter for the most recent event so a status surface can report WHY
46
+ * the connection is down rather than only that it is. Returns null until one
47
+ * fires — which correctly distinguishes "never dropped" from "dropped, cause X".
48
+ */
49
+ export function attachRelayObservability(client, opts) {
50
+ const log = opts.log ?? ((line) => console.log(line));
51
+ const logError = opts.logError ?? ((line) => console.error(line));
52
+ let lastEvent = null;
53
+ const record = (event, reason, terminal) => {
54
+ const entry = {
55
+ ts: new Date().toISOString(),
56
+ event,
57
+ reason: clampReason(reason),
58
+ fingerprint: client.fingerprint ?? 'unknown',
59
+ terminal,
60
+ };
61
+ lastEvent = entry;
62
+ // Loud on the console FIRST. If the durable write fails, the operator still
63
+ // sees the transition — the whole point is that this must not be silent.
64
+ if (terminal) {
65
+ logError(`Threadline: relay DISPLACED by another connection using this identity — ${entry.reason}. `
66
+ + 'Reconnect is now disarmed for the life of this process; this agent cannot send or '
67
+ + 'receive until it restarts.');
68
+ }
69
+ else {
70
+ log(`Threadline: relay disconnected — ${entry.reason}. Client will retry with backoff.`);
71
+ }
72
+ try {
73
+ fs.mkdirSync(opts.logDir, { recursive: true });
74
+ fs.appendFileSync(path.join(opts.logDir, 'threadline-relay-events.jsonl'), `${JSON.stringify(entry)}\n`, 'utf-8');
75
+ }
76
+ catch (err) {
77
+ // Never throw out of an event handler — a failed audit write must not take
78
+ // down the connection path it is observing.
79
+ logError(`Threadline: failed to record relay ${event} — ${err instanceof Error ? err.message : err}`);
80
+ }
81
+ };
82
+ client.on('disconnected', (reason) => record('disconnected', reason, false));
83
+ client.on('displaced', (reason) => record('displaced', reason, true));
84
+ return { getLastEvent: () => lastEvent };
85
+ }
86
+ //# sourceMappingURL=relayConnectionObserver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relayConnectionObserver.js","sourceRoot":"","sources":["../../src/threadline/relayConnectionObserver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAA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AC;QACJ,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,oCAAoC,KAAK,CAAC,MAAM,mCAAmC,CAAC,CAAC;QAC3F,CAAC;QAED,IAAI,CAAC;YACH,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC/C,EAAE,CAAC,cAAc,CACf,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,+BAA+B,CAAC,EACvD,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAC5B,OAAO,CACR,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,2EAA2E;YAC3E,4CAA4C;YAC5C,QAAQ,CAAC,sCAAsC,KAAK,MAAM,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;QACxG,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC,MAAe,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IACtF,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,MAAe,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAE/E,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC;AAC3C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.985",
3
+ "version": "1.3.987",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",