@hydranium/client-theia 1.0.0-next.9 → 1.0.0-next.90

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.
Files changed (55) hide show
  1. package/README.md +2 -2
  2. package/lib/browser/connection-diagnostics-contribution.d.ts +69 -0
  3. package/lib/browser/connection-diagnostics-contribution.d.ts.map +1 -0
  4. package/lib/browser/connection-diagnostics-contribution.js +153 -0
  5. package/lib/browser/connection-diagnostics-contribution.js.map +1 -0
  6. package/lib/browser/index.d.ts +2 -0
  7. package/lib/browser/index.d.ts.map +1 -1
  8. package/lib/browser/index.js +2 -0
  9. package/lib/browser/index.js.map +1 -1
  10. package/lib/browser/log-level-preference.d.ts.map +1 -1
  11. package/lib/browser/log-level-preference.js +11 -0
  12. package/lib/browser/log-level-preference.js.map +1 -1
  13. package/lib/browser/memory-diagnostics-contribution.d.ts +40 -4
  14. package/lib/browser/memory-diagnostics-contribution.d.ts.map +1 -1
  15. package/lib/browser/memory-diagnostics-contribution.js +161 -31
  16. package/lib/browser/memory-diagnostics-contribution.js.map +1 -1
  17. package/lib/browser/session-aware-connection-source.d.ts +98 -0
  18. package/lib/browser/session-aware-connection-source.d.ts.map +1 -0
  19. package/lib/browser/session-aware-connection-source.js +167 -0
  20. package/lib/browser/session-aware-connection-source.js.map +1 -0
  21. package/lib/common/connection-resilience-options.d.ts +24 -0
  22. package/lib/common/connection-resilience-options.d.ts.map +1 -0
  23. package/lib/common/connection-resilience-options.js +11 -0
  24. package/lib/common/connection-resilience-options.js.map +1 -0
  25. package/lib/common/framed-socket-write-buffer.d.ts +121 -0
  26. package/lib/common/framed-socket-write-buffer.d.ts.map +1 -0
  27. package/lib/common/framed-socket-write-buffer.js +190 -0
  28. package/lib/common/framed-socket-write-buffer.js.map +1 -0
  29. package/lib/common/index.d.ts +11 -0
  30. package/lib/common/index.d.ts.map +1 -0
  31. package/lib/common/index.js +30 -0
  32. package/lib/common/index.js.map +1 -0
  33. package/lib/node/abstract-socket-forwarding-connection-handler.d.ts.map +1 -1
  34. package/lib/node/abstract-socket-forwarding-connection-handler.js +6 -1
  35. package/lib/node/abstract-socket-forwarding-connection-handler.js.map +1 -1
  36. package/lib/node/index.d.ts +1 -0
  37. package/lib/node/index.d.ts.map +1 -1
  38. package/lib/node/index.js +1 -0
  39. package/lib/node/index.js.map +1 -1
  40. package/lib/node/session-bound-frontend-connection-service.d.ts +77 -0
  41. package/lib/node/session-bound-frontend-connection-service.d.ts.map +1 -0
  42. package/lib/node/session-bound-frontend-connection-service.js +128 -0
  43. package/lib/node/session-bound-frontend-connection-service.js.map +1 -0
  44. package/package.json +16 -7
  45. package/src/browser/connection-diagnostics-contribution.ts +142 -0
  46. package/src/browser/index.ts +2 -0
  47. package/src/browser/log-level-preference.ts +11 -0
  48. package/src/browser/memory-diagnostics-contribution.ts +268 -45
  49. package/src/browser/session-aware-connection-source.ts +179 -0
  50. package/src/common/connection-resilience-options.ts +24 -0
  51. package/src/common/framed-socket-write-buffer.ts +227 -0
  52. package/src/common/index.ts +14 -0
  53. package/src/node/abstract-socket-forwarding-connection-handler.ts +6 -1
  54. package/src/node/index.ts +1 -0
  55. package/src/node/session-bound-frontend-connection-service.ts +155 -0
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ //# sourceMappingURL=connection-resilience-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-resilience-options.js","sourceRoot":"","sources":["../../src/common/connection-resilience-options.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF"}
@@ -0,0 +1,121 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import { Emitter, type Event } from '@theia/core/lib/common/event';
10
+ import { SocketWriteBuffer } from '@theia/core/lib/common/messaging/socket-write-buffer';
11
+ /**
12
+ * Prefix on every connection log line, deliberately shared by the browser and the
13
+ * server so one pattern greps a console and a pod log at once.
14
+ */
15
+ export declare const CONNECTION_LOG_PREFIX = "[connection]";
16
+ /**
17
+ * The part of a socket this buffer uses. Narrower than the socket type Theia
18
+ * declares, which keeps the dependency honest and lets the class be tested
19
+ * without a connection.
20
+ */
21
+ export interface MessageSink {
22
+ send(data: Uint8Array): void;
23
+ }
24
+ /**
25
+ * Reported when the buffer runs out of room. The message that did not fit is
26
+ * rejected, and so is every further one for as long as the buffer stays full.
27
+ * Reconnecting drains it and sending resumes, but whatever was rejected
28
+ * meanwhile is gone, so the two sides no longer agree about the session.
29
+ */
30
+ export interface ConnectionBufferOverflow {
31
+ /** Messages held when the limit was reached. */
32
+ readonly messages: number;
33
+ /** Bytes held when the limit was reached. */
34
+ readonly bytes: number;
35
+ /** The limit in force, so a reader can tell what to raise it to. */
36
+ readonly maxBytes: number;
37
+ }
38
+ /**
39
+ * Holds messages while the peer is away and re-sends them when it returns.
40
+ *
41
+ * Theia copies them into one growing byte array and flushes that with a single
42
+ * `send`. A websocket delivers whole messages rather than a byte stream, so
43
+ * Theia's encoding adds no length prefix and every reader assumes one delivery
44
+ * is one message. The concatenated flush breaks that assumption: the reader
45
+ * decodes the first message and throws away the bytes behind it.
46
+ *
47
+ * Changed here: one entry per message, sent one at a time, so each arrives as
48
+ * its own delivery. The buffer also decides whether a message may go out
49
+ * directly — see {@link sendOrQueue} — because a caller that decides for itself
50
+ * is how messages end up overtaking a backlog.
51
+ *
52
+ * Unchanged from Theia: exceeding the limit rejects the message rather than
53
+ * dropping something silently. The limit is settable, since the right value
54
+ * depends on how long an outage has to survive.
55
+ *
56
+ * Logging goes to `console` rather than through a `Logger`. On the browser side
57
+ * Theia's preloader builds this before any Output channel exists, so there is
58
+ * nothing else to write to; the {@link CONNECTION_LOG_PREFIX} keeps the lines
59
+ * findable on both sides.
60
+ */
61
+ export declare class FramedSocketWriteBuffer extends SocketWriteBuffer {
62
+ /** Theia's fixed limit, kept as the default. */
63
+ static readonly DEFAULT_MAX_BYTES: number;
64
+ /**
65
+ * Settable so a deployment can trade memory for longer outages.
66
+ *
67
+ * Consulted directly rather than through the base class's `maxBufferSize`,
68
+ * which does not exist before Theia 1.71 — an `override` of it would not
69
+ * compile against the oldest release this package supports. Nothing is lost:
70
+ * `buffer`, `flush` and `drain` are all replaced here, so the base's own
71
+ * limit is never reached.
72
+ */
73
+ maxBytes: number;
74
+ protected pending: Uint8Array[];
75
+ protected pendingBytes: number;
76
+ protected overflowReported: boolean;
77
+ protected readonly onOverflowEmitter: Emitter<ConnectionBufferOverflow>;
78
+ /** Fires once per outage when the limit is reached. */
79
+ get onOverflow(): Event<ConnectionBufferOverflow>;
80
+ /**
81
+ * Sends `data` now only if nothing is waiting, and queues it otherwise.
82
+ *
83
+ * Callers say whether the peer is ready for a message; the buffer decides
84
+ * whether it may go ahead of one already waiting. Splitting it this way is
85
+ * the point: a caller that answers both questions from one flag is how a
86
+ * fresh message ends up overtaking a backlog.
87
+ */
88
+ sendOrQueue(socket: MessageSink | undefined, data: Uint8Array): void;
89
+ buffer(data: Uint8Array): void;
90
+ flush(socket: MessageSink): void;
91
+ drain(): void;
92
+ /** Whether messages are still waiting to go out. */
93
+ get hasBacklog(): boolean;
94
+ protected reportOverflow(): void;
95
+ protected reset(): void;
96
+ }
97
+ /** Named in the warning a skipped install emits, so the reader is told what to upgrade to. */
98
+ export declare const REQUIRED_THEIA_HINT = "@theia/core 1.71 or newer";
99
+ /**
100
+ * Whether this Theia exposes the seam the reconnect hardening replaces.
101
+ *
102
+ * Theia only began binding {@link SocketWriteBuffer} in 1.71; before that each
103
+ * connection built one privately, so there is no binding to rebind and no way
104
+ * in. Every other API involved has been there throughout, which makes this one
105
+ * probe the whole compatibility question — and it is a binding check rather
106
+ * than a version parse, so it answers about the container actually in front of
107
+ * us instead of a number that may have been overridden or vendored.
108
+ *
109
+ * Callers that get `false` must leave Theia's own wiring alone: rebinding half
110
+ * of it would be worse than not rebinding at all.
111
+ */
112
+ export declare function supportsConnectionResilience(isBound: (identifier: typeof SocketWriteBuffer) => boolean): boolean;
113
+ /**
114
+ * The warning a skipped install emits. Says what is lost rather than only what
115
+ * is missing: the failures this guards against are silent, so an adopter who
116
+ * never sees this line has no other way to learn the guard is absent.
117
+ */
118
+ export declare function warnConnectionResilienceUnavailable(tier: 'frontend' | 'backend'): void;
119
+ /** Builds a buffer with the given limit, or Theia's default when none is configured. */
120
+ export declare function createFramedSocketWriteBuffer(maxBytes?: number): FramedSocketWriteBuffer;
121
+ //# sourceMappingURL=framed-socket-write-buffer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framed-socket-write-buffer.d.ts","sourceRoot":"","sources":["../../src/common/framed-socket-write-buffer.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,iBAAiB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACzB,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;CAC/B;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACtC,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,uBAAwB,SAAQ,iBAAiB;IAC3D,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,iBAAiB,SAAc;IAE/C;;;;;;;;OAQG;IACH,QAAQ,SAA6C;IAErD,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAM;IACrC,SAAS,CAAC,YAAY,SAAK;IAC3B,SAAS,CAAC,gBAAgB,UAAS;IACnC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,oCAA2C;IAE/E,uDAAuD;IACvD,IAAI,UAAU,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAEhD;IAED;;;;;;;OAOG;IACH,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI;IAQ3D,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAa9B,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAmChC,KAAK,IAAI,IAAI;IAOtB,oDAAoD;IACpD,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,SAAS,CAAC,cAAc,IAAI,IAAI;IAahC,SAAS,CAAC,KAAK,IAAI,IAAI;CAKzB;AAED,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAE/D;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,CAAC,UAAU,EAAE,OAAO,iBAAiB,KAAK,OAAO,GAAG,OAAO,CAEhH;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,CAMtF;AAED,wFAAwF;AACxF,wBAAgB,6BAA6B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,uBAAuB,CAMxF"}
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.REQUIRED_THEIA_HINT = exports.FramedSocketWriteBuffer = exports.CONNECTION_LOG_PREFIX = void 0;
12
+ exports.supportsConnectionResilience = supportsConnectionResilience;
13
+ exports.warnConnectionResilienceUnavailable = warnConnectionResilienceUnavailable;
14
+ exports.createFramedSocketWriteBuffer = createFramedSocketWriteBuffer;
15
+ const event_1 = require("@theia/core/lib/common/event");
16
+ const socket_write_buffer_1 = require("@theia/core/lib/common/messaging/socket-write-buffer");
17
+ /**
18
+ * Prefix on every connection log line, deliberately shared by the browser and the
19
+ * server so one pattern greps a console and a pod log at once.
20
+ */
21
+ exports.CONNECTION_LOG_PREFIX = '[connection]';
22
+ /**
23
+ * Holds messages while the peer is away and re-sends them when it returns.
24
+ *
25
+ * Theia copies them into one growing byte array and flushes that with a single
26
+ * `send`. A websocket delivers whole messages rather than a byte stream, so
27
+ * Theia's encoding adds no length prefix and every reader assumes one delivery
28
+ * is one message. The concatenated flush breaks that assumption: the reader
29
+ * decodes the first message and throws away the bytes behind it.
30
+ *
31
+ * Changed here: one entry per message, sent one at a time, so each arrives as
32
+ * its own delivery. The buffer also decides whether a message may go out
33
+ * directly — see {@link sendOrQueue} — because a caller that decides for itself
34
+ * is how messages end up overtaking a backlog.
35
+ *
36
+ * Unchanged from Theia: exceeding the limit rejects the message rather than
37
+ * dropping something silently. The limit is settable, since the right value
38
+ * depends on how long an outage has to survive.
39
+ *
40
+ * Logging goes to `console` rather than through a `Logger`. On the browser side
41
+ * Theia's preloader builds this before any Output channel exists, so there is
42
+ * nothing else to write to; the {@link CONNECTION_LOG_PREFIX} keeps the lines
43
+ * findable on both sides.
44
+ */
45
+ class FramedSocketWriteBuffer extends socket_write_buffer_1.SocketWriteBuffer {
46
+ /** Theia's fixed limit, kept as the default. */
47
+ static DEFAULT_MAX_BYTES = 100 * 1024;
48
+ /**
49
+ * Settable so a deployment can trade memory for longer outages.
50
+ *
51
+ * Consulted directly rather than through the base class's `maxBufferSize`,
52
+ * which does not exist before Theia 1.71 — an `override` of it would not
53
+ * compile against the oldest release this package supports. Nothing is lost:
54
+ * `buffer`, `flush` and `drain` are all replaced here, so the base's own
55
+ * limit is never reached.
56
+ */
57
+ maxBytes = FramedSocketWriteBuffer.DEFAULT_MAX_BYTES;
58
+ pending = [];
59
+ pendingBytes = 0;
60
+ overflowReported = false;
61
+ onOverflowEmitter = new event_1.Emitter();
62
+ /** Fires once per outage when the limit is reached. */
63
+ get onOverflow() {
64
+ return this.onOverflowEmitter.event;
65
+ }
66
+ /**
67
+ * Sends `data` now only if nothing is waiting, and queues it otherwise.
68
+ *
69
+ * Callers say whether the peer is ready for a message; the buffer decides
70
+ * whether it may go ahead of one already waiting. Splitting it this way is
71
+ * the point: a caller that answers both questions from one flag is how a
72
+ * fresh message ends up overtaking a backlog.
73
+ */
74
+ sendOrQueue(socket, data) {
75
+ if (socket && !this.hasBacklog) {
76
+ socket.send(data);
77
+ }
78
+ else {
79
+ this.buffer(data);
80
+ }
81
+ }
82
+ buffer(data) {
83
+ if (this.pendingBytes + data.byteLength > this.maxBytes) {
84
+ this.reportOverflow();
85
+ throw new Error(`Max disconnected buffer size exceeded by adding ${data.byteLength} bytes`);
86
+ }
87
+ // Copied for the same reason the base class copies: the caller owns `data`.
88
+ this.pending.push(data.slice());
89
+ this.pendingBytes += data.byteLength;
90
+ if (this.pending.length === 1) {
91
+ console.info(`${exports.CONNECTION_LOG_PREFIX} buffering messages, the peer is disconnected`);
92
+ }
93
+ }
94
+ flush(socket) {
95
+ if (this.pending.length === 0) {
96
+ return;
97
+ }
98
+ const count = this.pending.length;
99
+ const bytes = this.pendingBytes;
100
+ // Walked with an index and dropped in one slice, not shifted per message: a shift re-indexes
101
+ // the whole array, so the drain would cost the square of a backlog `bufferBytes` invites an
102
+ // adopter to enlarge. Leaving the queue in place is what keeps `hasBacklog` true until the
103
+ // last message is out, and re-reading the length is what drains one appended by a nested send.
104
+ let index = 0;
105
+ try {
106
+ while (index < this.pending.length) {
107
+ const message = this.pending[index];
108
+ socket.send(message);
109
+ index++;
110
+ this.pendingBytes -= message.byteLength;
111
+ }
112
+ }
113
+ catch (error) {
114
+ // Said here because nothing retries: Theia flushes once, from a reconnect handler that has
115
+ // deregistered by now, so the stall would otherwise surface much later as an overflow —
116
+ // which names the wrong cause, the socket being up rather than absent.
117
+ console.error(`${exports.CONNECTION_LOG_PREFIX} send failed ${index} message(s) into a ${count}-message backlog; ` +
118
+ `${this.pending.length - index} still queued and nothing will retry them`, error);
119
+ throw error;
120
+ }
121
+ finally {
122
+ this.pending = this.pending.slice(index);
123
+ }
124
+ this.overflowReported = false;
125
+ console.info(`${exports.CONNECTION_LOG_PREFIX} sent ${count} buffered message(s), ${bytes} bytes`);
126
+ }
127
+ drain() {
128
+ if (this.pending.length > 0) {
129
+ console.warn(`${exports.CONNECTION_LOG_PREFIX} discarded ${this.pending.length} buffered message(s), ${this.pendingBytes} bytes`);
130
+ }
131
+ this.reset();
132
+ }
133
+ /** Whether messages are still waiting to go out. */
134
+ get hasBacklog() {
135
+ return this.pending.length > 0;
136
+ }
137
+ reportOverflow() {
138
+ if (this.overflowReported) {
139
+ return;
140
+ }
141
+ this.overflowReported = true;
142
+ const overflow = { messages: this.pending.length, bytes: this.pendingBytes, maxBytes: this.maxBytes };
143
+ console.error(`${exports.CONNECTION_LOG_PREFIX} buffer full at ${overflow.maxBytes} bytes after ${overflow.messages} message(s); ` +
144
+ 'this message is rejected, and so is every further one until the peer returns');
145
+ this.onOverflowEmitter.fire(overflow);
146
+ }
147
+ reset() {
148
+ this.pending = [];
149
+ this.pendingBytes = 0;
150
+ this.overflowReported = false;
151
+ }
152
+ }
153
+ exports.FramedSocketWriteBuffer = FramedSocketWriteBuffer;
154
+ /** Named in the warning a skipped install emits, so the reader is told what to upgrade to. */
155
+ exports.REQUIRED_THEIA_HINT = '@theia/core 1.71 or newer';
156
+ /**
157
+ * Whether this Theia exposes the seam the reconnect hardening replaces.
158
+ *
159
+ * Theia only began binding {@link SocketWriteBuffer} in 1.71; before that each
160
+ * connection built one privately, so there is no binding to rebind and no way
161
+ * in. Every other API involved has been there throughout, which makes this one
162
+ * probe the whole compatibility question — and it is a binding check rather
163
+ * than a version parse, so it answers about the container actually in front of
164
+ * us instead of a number that may have been overridden or vendored.
165
+ *
166
+ * Callers that get `false` must leave Theia's own wiring alone: rebinding half
167
+ * of it would be worse than not rebinding at all.
168
+ */
169
+ function supportsConnectionResilience(isBound) {
170
+ return isBound(socket_write_buffer_1.SocketWriteBuffer);
171
+ }
172
+ /**
173
+ * The warning a skipped install emits. Says what is lost rather than only what
174
+ * is missing: the failures this guards against are silent, so an adopter who
175
+ * never sees this line has no other way to learn the guard is absent.
176
+ */
177
+ function warnConnectionResilienceUnavailable(tier) {
178
+ console.warn(`${exports.CONNECTION_LOG_PREFIX} ${tier} reconnect hardening NOT installed: this Theia does not expose an injectable ` +
179
+ `socket write buffer (needs ${exports.REQUIRED_THEIA_HINT}). Theia's own behaviour is left in place, which can lose or ` +
180
+ 'reorder messages when a socket drops and reconnects.');
181
+ }
182
+ /** Builds a buffer with the given limit, or Theia's default when none is configured. */
183
+ function createFramedSocketWriteBuffer(maxBytes) {
184
+ const buffer = new FramedSocketWriteBuffer();
185
+ if (typeof maxBytes === 'number' && maxBytes > 0) {
186
+ buffer.maxBytes = maxBytes;
187
+ }
188
+ return buffer;
189
+ }
190
+ //# sourceMappingURL=framed-socket-write-buffer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framed-socket-write-buffer.js","sourceRoot":"","sources":["../../src/common/framed-socket-write-buffer.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAmMlF,oEAEC;AAOD,kFAMC;AAGD,sEAMC;AAzND,wDAAmE;AACnE,8FAAyF;AAEzF;;;GAGG;AACU,QAAA,qBAAqB,GAAG,cAAc,CA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IAAI,CACT,GAAG,6BAAqB,IAAI,IAAI,+EAA+E;QAC5G,8BAA8B,2BAAmB,+DAA+D;QAChH,sDAAsD,CAC3D,CAAC;AACL,CAAC;AAED,wFAAwF;AACxF,SAAgB,6BAA6B,CAAC,QAAiB;IAC5D,MAAM,MAAM,GAAG,IAAI,uBAAuB,EAAE,CAAC;IAC7C,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QAChD,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC9B,CAAC;IACD,OAAO,MAAM,CAAC;AACjB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ export * from './framed-socket-write-buffer';
10
+ export * from './connection-resilience-options';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAKlF,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ // Environment-neutral connection primitives, shared by the browser connection
26
+ // source and the server connection service. Kept out of both tier barrels
27
+ // because each side binds the same buffer for its own half of the socket.
28
+ __exportStar(require("./framed-socket-write-buffer"), exports);
29
+ __exportStar(require("./connection-resilience-options"), exports);
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,8EAA8E;AAC9E,0EAA0E;AAC1E,0EAA0E;AAC1E,+DAA6C;AAC7C,kEAAgD"}
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-socket-forwarding-connection-handler.d.ts","sourceRoot":"","sources":["../../src/node/abstract-socket-forwarding-connection-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,OAAO,EACZ,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,OAAO,EACP,KAAK,eAAe,EACpB,cAAc,EAChB,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC;;uCAEuC;AACvC,MAAM,WAAW,wCAAwC;IACtD,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;iEAC6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;gCAC4B;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;0BACsB;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC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gBAAgB,CAAC,EAAE;QAAE,SAAS,EAAE,UAAU,CAAC;QAAC,QAAQ,EAAE,eAAe,EAAE,CAAA;KAAE,GACzE,OAAO,CAAC,IAAI,CAAC;IAyBhB;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,UAAU;IAEpG;;;;;;;;;;OAUG;IACH,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,IAAI;CAiBvF"}
1
+ {"version":3,"file":"abstract-socket-forwarding-connection-handler.d.ts","sourceRoot":"","sources":["../../src/node/abstract-socket-forwarding-connection-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,OAAO,EACZ,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,OAAO,EACP,KAAK,eAAe,EACpB,cAAc,EAChB,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC;;uCAEuC;AACvC,MAAM,WAAW,wCAAwC;IACtD,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;iEAC6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;gCAC4B;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;0BACsB;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,KAAK,IAAI,CA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;;;;;;;;;OAUG;IACH,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,IAAI;CAiBvF"}
@@ -173,7 +173,12 @@ let AbstractSocketForwardingConnectionHandler = class AbstractSocketForwardingCo
173
173
  if (channel instanceof channel_1.ForwardingChannel) {
174
174
  socket.on('error', error => channel.onErrorEmitter.fire(error));
175
175
  }
176
- socket.connect({ port });
176
+ // `127.0.0.1`, not the `localhost` Node dials when no host is given, and it
177
+ // has to match the head: the socket launchers bind `127.0.0.1` by default,
178
+ // so on a dual-stack machine where `localhost` resolves to `::1` first the
179
+ // dial fails as ECONNREFUSED with nothing in the message naming the address
180
+ // family as the cause.
181
+ socket.connect({ port, host: '127.0.0.1' });
177
182
  setTimeout(() => connected.reject('Timeout reached.'), this.connectTimeoutMs);
178
183
  return connected.promise;
179
184
  }
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-socket-forwarding-connection-handler.js","sourceRoot":"","sources":["../../src/node/abstract-socket-forwarding-connection-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElF,sCAQqB;AACrB,wEAA+E;AAC/E,sEAA+D;AAC/D,4DAAkE;AAClE,8CAAgC;AA8BhC;;;;;;;;;;;;;;;;;;GAkBG;AAEI,IAAe,yCAAyC,GAAxD,MAAe,yCAAyC;IAC1B,cAAc,CAAkB;IAChC,cAAc,CAAkB;IAClE,4EAA4E;IAC5E,wEAAwE;IACxE,sEAAsE;IAClC,MAAM,CAAW;IAE5C,IAAI,CAAS;IAEH,WAAW,CAAS;IACpB,YAAY,CAAS;IACrB,UAAU,CAAS;IACnB,eAAe,CAAS;IACxB,gBAAgB,CAAS;IACzB,gBAAgB,CAAS;IACzB,eAAe,CAAgC;IAElE,YAAY,OAAiD;QAC1D,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB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FAA2C;AAI9B;IAAnC,IAAA,kBAAM,EAAC,cAAO,CAAC;;yEAAqC;oDANlC,yCAAyC;IAD9D,IAAA,sBAAU,GAAE;;GACS,yCAAyC,CAkJ9D"}
1
+ {"version":3,"file":"abstract-socket-forwarding-connection-handler.js","sourceRoot":"","sources":["../../src/node/abstract-socket-forwarding-connection-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElF,sCAQqB;AACrB,wEAA+E;AAC/E,sEAA+D;AAC/D,4DAAkE;AAClE,8CAAgC;AA8BhC;;;;;;;;;;;;;;;;;;GAkBG;AAEI,IAAe,yCAAyC,GAAxD,MAAe,yCAAyC;IAC1B,cAAc,CAAkB;IAChC,cAAc,CAAkB;IAClE,4EAA4E;IAC5E,wEAAwE;IACxE,sEAAsE;IAClC,MAAM,CAAW;IAE5C,IAAI,CAAS;IAEH,WAAW,CAAS;IACpB,YAAY,CAAS;IACrB,UAAU,CAAS;IACnB,eAAe,CAAS;IACxB,gBAAgB,CAAS;IACzB,gBAAgB,CAAS;IACzB,eAAe,CAAgC;IAElE,YAAY,OAAiD;QAC1D,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,IAAI,GAAG,CAAC;QACtD,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,IAAI,CAAC,CAAC,CAAC;QACvD,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,IAAI,KAAK,CAAC;QAC1D,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAClD,CAA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AAC;IAC5B,CAAC;IASD;;;;;;;;;;OAUG;IACO,sBAAsB,CAAC,OAAgB,EAAE,QAA2B;QAC3E,IAAI,CAAC,CAAC,OAAO,YAAY,2BAAiB,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY,cAAc,QAAQ,CAAC,MAAM,8DAA8D,CAAC,CAAC;YACnI,OAAO;QACV,CAAC;QACD,MAAM,SAAS,GAAG,OAAsF,CAAC;QACzG,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CACb,IAAI,IAAI,CAAC,YAAY,cAAc,QAAQ,CAAC,MAAM,6EAA6E,CACjI,CAAC;YACF,OAAO;QACV,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY,eAAe,QAAQ,CAAC,MAAM,yDAAyD,CAAC,CAAC;QAC/H,KAAK,MAAM,QAAQ,IAAI,QAAQ,EAAE,CAAC;YAC/B,SAAS,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,CAAC;IACJ,CAAC;CACH,CAAA;AAvJqB,8FAAyC;AAC1B;IAAjC,IAAA,kBAAM,EAAC,qBAAc,CAAC;8BAA4B,qBAAc;iFAAC;AAChC;IAAjC,IAAA,kBAAM,EAAC,qBAAc,CAAC;;iFAA2C;AAI9B;IAAnC,IAAA,kBAAM,EAAC,cAAO,CAAC;;yEAAqC;oDANlC,yCAAyC;IAD9D,IAAA,sBAAU,GAAE;;GACS,yCAAyC,CAuJ9D"}
@@ -7,4 +7,5 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  export * from './abstract-socket-forwarding-connection-handler';
10
+ export * from './session-bound-frontend-connection-service';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,iDAAiD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC"}
package/lib/node/index.js CHANGED
@@ -23,4 +23,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  __exportStar(require("./abstract-socket-forwarding-connection-handler"), exports);
26
+ __exportStar(require("./session-bound-frontend-connection-service"), exports);
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,kFAAgE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,kFAAgE;AAChE,8EAA4D"}
@@ -0,0 +1,77 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import { WebsocketFrontendConnectionService } from '@theia/core/lib/node/messaging/websocket-frontend-connection-service';
10
+ import { type interfaces } from '@theia/core/shared/inversify';
11
+ import { type ConnectionResilienceOptions } from '../common/connection-resilience-options';
12
+ /**
13
+ * Socket Theia hands the disconnect handler, read off the base signature rather
14
+ * than imported, which spares a direct `socket.io` dependency carried purely
15
+ * for a parameter type.
16
+ */
17
+ export type FrontendSocket = Parameters<WebsocketFrontendConnectionService['handleSocketDisconnect']>[0];
18
+ /**
19
+ * Channel Theia hands the disconnect handler, read off the base signature so
20
+ * this package's emitted declarations name only
21
+ * `WebsocketFrontendConnectionService`.
22
+ *
23
+ * `ReconnectableSocketChannel` is not exported by every Theia release in the
24
+ * supported range, so importing it would make those declarations unresolvable
25
+ * for an adopter on one of them — a compile error for a feature they may not
26
+ * even be using.
27
+ */
28
+ export type FrontendChannel = Parameters<WebsocketFrontendConnectionService['handleSocketDisconnect']>[1];
29
+ /**
30
+ * Ignores a disconnect from a socket that no longer belongs to the frontend.
31
+ *
32
+ * A frontend that loses its network reconnects on a new socket within seconds;
33
+ * the server only notices the old one is gone when its next heartbeat write
34
+ * fails, which is a whole ping interval later. For that stretch both sockets are
35
+ * registered against the same session, and Theia's disconnect handler tears the
36
+ * session off its socket without checking which one just died. The late
37
+ * notification from the abandoned socket therefore cuts the healthy one loose.
38
+ * The frontend sees a connected socket and never retries, so the session is dead
39
+ * until the page is reloaded.
40
+ *
41
+ * Changed here: only the socket the session is currently using may act on a
42
+ * disconnect. The handler is rewritten rather than wrapped because the problem
43
+ * sits inside the listener Theia installs; the rest of the body is Theia's.
44
+ *
45
+ * Re-diff against Theia when the supported range moves: `override` catches a changed signature,
46
+ * not a changed body, so this copy can go stale in silence.
47
+ */
48
+ export declare class SessionBoundFrontendConnectionService extends WebsocketFrontendConnectionService {
49
+ /** Socket each frontend's channel is currently bound to, with the time it was bound. */
50
+ protected readonly bindings: Map<string, {
51
+ socketId: string;
52
+ boundAt: number;
53
+ }>;
54
+ /** When a frontend's live socket went away, so the reconnect gap can be reported. */
55
+ protected readonly offlineSince: Map<string, number>;
56
+ handleSocketDisconnect(socket: FrontendSocket, channel: FrontendChannel, frontEndId: string): void;
57
+ protected closeConnection(frontEndId: string, reason: string): void;
58
+ /** Mirrors Theia's private `frontendConnectionTimeout`, including `Number('')` resolving to 0.
59
+ * Private there, so the copy is forced; re-diff it with the handler above. */
60
+ protected connectionTimeout(): number;
61
+ }
62
+ /**
63
+ * Replaces the server pieces that decide how a session survives a reconnect.
64
+ *
65
+ * `FrontendConnectionService` is bound `toService(WebsocketFrontendConnectionService)`,
66
+ * so rebinding the concrete class is enough. The buffer stays transient (one per
67
+ * connection), matching Theia's `bind(SocketWriteBuffer).toSelf()`; the frontend
68
+ * counterpart is bound by `bindConnectionResilience` in a `frontendPreload`
69
+ * module, which is the only point early enough on that side.
70
+ *
71
+ * Does nothing but warn on a Theia too old to expose the buffer binding, so the
72
+ * package keeps one supported range rather than splitting its floor for this
73
+ * feature. Returns whether the hardening was installed, for an adopter that
74
+ * wants to branch on it.
75
+ */
76
+ export declare function bindConnectionResilience(bind: interfaces.Bind, isBound: interfaces.IsBound, rebind: interfaces.Rebind, options?: ConnectionResilienceOptions): boolean;
77
+ //# sourceMappingURL=session-bound-frontend-connection-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-bound-frontend-connection-service.d.ts","sourceRoot":"","sources":["../../src/node/session-bound-frontend-connection-service.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAIlF,OAAO,EAAE,kCAAkC,EAAE,MAAM,sEAAsE,CAAC;AAC1H,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAQ3F;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,kCAAkC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzG;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,kCAAkC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1G;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,qCAAsC,SAAQ,kCAAkC;IAC1F,wFAAwF;IACxF,SAAS,CAAC,QAAQ,CAAC,QAAQ;kBAA+B,MAAM;iBAAW,MAAM;OAAM;IACvF,qFAAqF;IACrF,SAAS,CAAC,QAAQ,CAAC,YAAY,sBAA6B;IAEnD,sBAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;cA0CxF,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAO5E;mFAC+E;IAC/E,SAAS,CAAC,iBAAiB,IAAI,MAAM;CAOvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACrC,IAAI,EAAE,UAAU,CAAC,IAAI,EACrB,OAAO,EAAE,UAAU,CAAC,OAAO,EAC3B,MAAM,EAAE,UAAU,CAAC,MAAM,EACzB,OAAO,GAAE,2BAAgC,GACzC,OAAO,CAST"}