@wonderwhy-er/desktop-commander 0.3.4 → 0.3.5-alpha.1
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/bootstrap.js.map +1 -0
- package/dist/command-manager.js.map +1 -0
- package/dist/config-field-definitions.js.map +1 -0
- package/dist/config-manager.js.map +1 -0
- package/dist/config-recovery.js.map +1 -0
- package/dist/config.js.map +1 -0
- package/dist/custom-stdio.js.map +1 -0
- package/dist/error-handlers.js.map +1 -0
- package/dist/handlers/edit-search-handlers.js.map +1 -0
- package/dist/handlers/filesystem-handlers.js.map +1 -0
- package/dist/handlers/history-handlers.js.map +1 -0
- package/dist/handlers/index.js.map +1 -0
- package/dist/handlers/process-handlers.js.map +1 -0
- package/dist/handlers/search-answers.js.map +1 -0
- package/dist/handlers/search-handlers.js.map +1 -0
- package/dist/handlers/terminal-handlers.js.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/npm-scripts/remote.js.map +1 -0
- package/dist/npm-scripts/setup.js.map +1 -0
- package/dist/npm-scripts/uninstall.js.map +1 -0
- package/dist/npm-scripts/verify-ripgrep.js.map +1 -0
- package/dist/remote-device/desktop-commander-integration.js.map +1 -0
- package/dist/remote-device/device-authenticator.js.map +1 -0
- package/dist/remote-device/device.js +4 -13
- package/dist/remote-device/device.js.map +1 -0
- package/dist/remote-device/diagnostics/device-log.js.map +1 -0
- package/dist/remote-device/diagnostics/redact.js.map +1 -0
- package/dist/remote-device/diagnostics/report.js.map +1 -0
- package/dist/remote-device/diagnostics/upload.js.map +1 -0
- package/dist/remote-device/mqtt/config.js.map +1 -0
- package/dist/remote-device/mqtt/mqtt-enrollment.js.map +1 -0
- package/dist/remote-device/mqtt/mqtt-transport.d.ts +6 -5
- package/dist/remote-device/mqtt/mqtt-transport.js +35 -37
- package/dist/remote-device/mqtt/mqtt-transport.js.map +1 -0
- package/dist/remote-device/realtime-health-telemetry.js.map +1 -0
- package/dist/remote-device/remote-channel.d.ts +17 -1
- package/dist/remote-device/remote-channel.js +136 -24
- package/dist/remote-device/remote-channel.js.map +1 -0
- package/dist/remote-device/remote-utils.js.map +1 -0
- package/dist/remote-device/rollouts.js.map +1 -0
- package/dist/remote-device/transport-telemetry.d.ts +11 -8
- package/dist/remote-device/transport-telemetry.js +10 -14
- package/dist/remote-device/transport-telemetry.js.map +1 -0
- package/dist/search-manager.js.map +1 -0
- package/dist/server.js.map +1 -0
- package/dist/terminal-manager.js.map +1 -0
- package/dist/tools/config.js.map +1 -0
- package/dist/tools/edit.js.map +1 -0
- package/dist/tools/feedback.js.map +1 -0
- package/dist/tools/filesystem.js.map +1 -0
- package/dist/tools/fuzzySearch.js.map +1 -0
- package/dist/tools/fuzzySearchCore.js.map +1 -0
- package/dist/tools/improved-process-tools.js.map +1 -0
- package/dist/tools/mime-types.js.map +1 -0
- package/dist/tools/pdf/extract-images.js.map +1 -0
- package/dist/tools/pdf/index.js.map +1 -0
- package/dist/tools/pdf/lib/pdf2md.js.map +1 -0
- package/dist/tools/pdf/manipulations.js.map +1 -0
- package/dist/tools/pdf/markdown.js.map +1 -0
- package/dist/tools/pdf/utils.js.map +1 -0
- package/dist/tools/process.js.map +1 -0
- package/dist/tools/prompts.js.map +1 -0
- package/dist/tools/schemas.js.map +1 -0
- package/dist/tools/usage.js.map +1 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/config-editor/config-editor-runtime.js +61 -80
- package/dist/ui/config-editor/src/app.js.map +1 -0
- package/dist/ui/config-editor/src/array-modal.js.map +1 -0
- package/dist/ui/config-editor/src/main.js.map +1 -0
- package/dist/ui/contracts.js.map +1 -0
- package/dist/ui/file-preview/preview-runtime.js +215 -226
- package/dist/ui/file-preview/shared/preview-file-types.js.map +1 -0
- package/dist/ui/file-preview/src/app.js.map +1 -0
- package/dist/ui/file-preview/src/components/code-viewer.js.map +1 -0
- package/dist/ui/file-preview/src/components/highlighting.js.map +1 -0
- package/dist/ui/file-preview/src/components/html-renderer.js.map +1 -0
- package/dist/ui/file-preview/src/components/markdown-renderer.js.map +1 -0
- package/dist/ui/file-preview/src/directory-controller.js.map +1 -0
- package/dist/ui/file-preview/src/document-layout.js.map +1 -0
- package/dist/ui/file-preview/src/document-outline.js.map +1 -0
- package/dist/ui/file-preview/src/document-workspace.js.map +1 -0
- package/dist/ui/file-preview/src/file-type-handlers.js.map +1 -0
- package/dist/ui/file-preview/src/host/external-actions.js.map +1 -0
- package/dist/ui/file-preview/src/host/selection-context.js.map +1 -0
- package/dist/ui/file-preview/src/image-preview.js.map +1 -0
- package/dist/ui/file-preview/src/main.js.map +1 -0
- package/dist/ui/file-preview/src/markdown/conflict-dialog.js.map +1 -0
- package/dist/ui/file-preview/src/markdown/controller.js.map +1 -0
- package/dist/ui/file-preview/src/markdown/editor.js.map +1 -0
- package/dist/ui/file-preview/src/markdown/linking.js.map +1 -0
- package/dist/ui/file-preview/src/markdown/outline.js.map +1 -0
- package/dist/ui/file-preview/src/markdown/parser.js.map +1 -0
- package/dist/ui/file-preview/src/markdown/preview.js.map +1 -0
- package/dist/ui/file-preview/src/markdown/slugify.js.map +1 -0
- package/dist/ui/file-preview/src/markdown/utils.js.map +1 -0
- package/dist/ui/file-preview/src/model.js.map +1 -0
- package/dist/ui/file-preview/src/panel-actions.js.map +1 -0
- package/dist/ui/file-preview/src/path-utils.js.map +1 -0
- package/dist/ui/file-preview/src/payload-utils.js.map +1 -0
- package/dist/ui/file-preview/src/types.js.map +1 -0
- package/dist/ui/resources.js.map +1 -0
- package/dist/ui/shared/compact-row.js.map +1 -0
- package/dist/ui/shared/escape-html.js.map +1 -0
- package/dist/ui/shared/host-context.js.map +1 -0
- package/dist/ui/shared/tool-bridge.js.map +1 -0
- package/dist/ui/shared/tool-shell.js.map +1 -0
- package/dist/ui/shared/ui-event-tracker.js.map +1 -0
- package/dist/ui/shared/widget-state.js.map +1 -0
- package/dist/utils/ab-test.js.map +1 -0
- package/dist/utils/atomic-write.js.map +1 -0
- package/dist/utils/capture.js.map +1 -0
- package/dist/utils/dockerPrompt.js.map +1 -0
- package/dist/utils/exit-process.js.map +1 -0
- package/dist/utils/feature-flags.js.map +1 -0
- package/dist/utils/files/base.js.map +1 -0
- package/dist/utils/files/binary.js.map +1 -0
- package/dist/utils/files/docx.js.map +1 -0
- package/dist/utils/files/excel.js.map +1 -0
- package/dist/utils/files/factory.js.map +1 -0
- package/dist/utils/files/image.js.map +1 -0
- package/dist/utils/files/index.js.map +1 -0
- package/dist/utils/files/pdf.js.map +1 -0
- package/dist/utils/files/text.js.map +1 -0
- package/dist/utils/fuzzySearchLogger.js.map +1 -0
- package/dist/utils/internal-facts.js.map +1 -0
- package/dist/utils/lazy-package.js.map +1 -0
- package/dist/utils/lineEndingHandler.js.map +1 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/mcp-ui-ab-test.js.map +1 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/dist/utils/process-detection.js.map +1 -0
- package/dist/utils/process-tree.js.map +1 -0
- package/dist/utils/rename.js.map +1 -0
- package/dist/utils/ripgrep-resolver.js.map +1 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/system-info.js.map +1 -0
- package/dist/utils/terminal-timestamps.js.map +1 -0
- package/dist/utils/toolHistory.js.map +1 -0
- package/dist/utils/trackTools.js.map +1 -0
- package/dist/utils/unsupportedParams.js.map +1 -0
- package/dist/utils/usageTracker.js.map +1 -0
- package/dist/utils/welcome-onboarding.js.map +1 -0
- package/dist/utils/withTimeout.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -0
- package/package.json +36 -33
|
@@ -30,8 +30,6 @@ export function createMqttConfig(credentials) {
|
|
|
30
30
|
clean: true,
|
|
31
31
|
keepalive: 30,
|
|
32
32
|
connectTimeout: CONNECT_TIMEOUT_MS,
|
|
33
|
-
// Spread reconnects between connector processes after a shared network outage.
|
|
34
|
-
reconnectPeriod: 1000 + Math.floor(Math.random() * 1500),
|
|
35
33
|
resubscribe: false,
|
|
36
34
|
queueQoSZero: false,
|
|
37
35
|
cert: credentials.cert,
|
|
@@ -49,23 +47,23 @@ export function mqttDoorbellTopic(userId, deviceId) {
|
|
|
49
47
|
/** A per-device subscription that validates and observes shadow notifications. */
|
|
50
48
|
export class MqttTransport {
|
|
51
49
|
/** Bind verified registration identity and RemoteChannel's delivery/readiness callbacks once. */
|
|
52
|
-
constructor(config, userId, deviceId, onDoorbell, onReady, onMalformed = () => { }
|
|
50
|
+
constructor(config, userId, deviceId, onDoorbell, onReady, onMalformed = () => { },
|
|
51
|
+
/** Called when the receiver stops itself after start() resolved, so RemoteChannel can restart MQTT. */
|
|
52
|
+
onFailed = () => { }) {
|
|
53
53
|
this.config = config;
|
|
54
54
|
this.userId = userId;
|
|
55
55
|
this.deviceId = deviceId;
|
|
56
56
|
this.onDoorbell = onDoorbell;
|
|
57
57
|
this.onReady = onReady;
|
|
58
58
|
this.onMalformed = onMalformed;
|
|
59
|
+
this.onFailed = onFailed;
|
|
59
60
|
this.client = null;
|
|
60
61
|
this.stopped = false;
|
|
61
62
|
this.ready = false;
|
|
62
63
|
this.cancelStart = null;
|
|
63
64
|
this.topic = mqttDoorbellTopic(userId, deviceId);
|
|
64
65
|
}
|
|
65
|
-
/**
|
|
66
|
-
* Connect once and resolve after QoS 1 SUBACK plus the readiness callback.
|
|
67
|
-
* MQTT.js owns socket reconnects; this receiver owns resubscription and admission.
|
|
68
|
-
*/
|
|
66
|
+
/** Make one connection attempt and resolve after QoS 1 SUBACK and the readiness update. */
|
|
69
67
|
async start() {
|
|
70
68
|
if (this.client || this.stopped) {
|
|
71
69
|
throw new Error("MQTT receiver already started or stopped");
|
|
@@ -74,12 +72,13 @@ export class MqttTransport {
|
|
|
74
72
|
console.debug("[MQTT] Connecting to broker:", new URL(this.config.url).hostname);
|
|
75
73
|
const client = connect(this.config.url, {
|
|
76
74
|
...this.config.options,
|
|
75
|
+
reconnectPeriod: 0, // MQTT.js IClientOptions.reconnectPeriod: 0 ms disables automatic retries. RemoteChannel schedules them.
|
|
77
76
|
// Stable identity also lets an AWS policy restrict this certificate's Connect permission.
|
|
78
77
|
clientId: `dc-device-${this.deviceId}`,
|
|
79
78
|
});
|
|
80
79
|
this.client = client;
|
|
81
|
-
//
|
|
82
|
-
//
|
|
80
|
+
// Each result publish in flight adds a "close" and a "packetsend" listener, so 140 allows about
|
|
81
|
+
// 70 at once. Passing it only prints Node's MaxListeners warning; no message is dropped.
|
|
83
82
|
client.setMaxListeners(140);
|
|
84
83
|
await new Promise((resolve, reject) => {
|
|
85
84
|
let settled = false;
|
|
@@ -98,17 +97,24 @@ export class MqttTransport {
|
|
|
98
97
|
resolve();
|
|
99
98
|
}
|
|
100
99
|
};
|
|
101
|
-
//
|
|
102
|
-
const
|
|
103
|
-
|
|
100
|
+
// Report a startup failure through start(), and a later disconnect through onFailed().
|
|
101
|
+
const stopWithError = (error) => {
|
|
102
|
+
if (this.stopped)
|
|
103
|
+
return;
|
|
104
|
+
const alreadyStarted = settled;
|
|
105
|
+
finish(error);
|
|
104
106
|
void this.stop().catch(() => { });
|
|
105
|
-
|
|
107
|
+
if (alreadyStarted)
|
|
108
|
+
this.onFailed();
|
|
109
|
+
};
|
|
110
|
+
// A connected socket without a granted subscription must not hang device startup.
|
|
111
|
+
const timer = setTimeout(() => stopWithError(new Error("MQTT connection/subscription timed out")), this.config.options.connectTimeout ?? CONNECT_TIMEOUT_MS);
|
|
106
112
|
this.cancelStart = () => finish(new Error("MQTT receiver stopped"));
|
|
107
|
-
client.
|
|
113
|
+
client.once("connect", () => {
|
|
108
114
|
if (this.stopped) {
|
|
109
115
|
return;
|
|
110
116
|
}
|
|
111
|
-
//
|
|
117
|
+
// A TCP connection alone cannot receive commands.
|
|
112
118
|
client.subscribe(this.topic, { qos: 1 }, (error, granted) => {
|
|
113
119
|
if (this.stopped || !client.connected) {
|
|
114
120
|
return;
|
|
@@ -117,8 +123,7 @@ export class MqttTransport {
|
|
|
117
123
|
granted?.length !== 1 ||
|
|
118
124
|
granted[0].topic !== this.topic ||
|
|
119
125
|
granted[0].qos !== 1) {
|
|
120
|
-
|
|
121
|
-
void this.stop().catch(() => { });
|
|
126
|
+
stopWithError(new Error("MQTT device subscription refused"));
|
|
122
127
|
return;
|
|
123
128
|
}
|
|
124
129
|
// Reject downgraded/foreign grants above, then let RemoteChannel persist capability.
|
|
@@ -128,27 +133,15 @@ export class MqttTransport {
|
|
|
128
133
|
.then(() => {
|
|
129
134
|
if (!this.stopped && this.ready) {
|
|
130
135
|
// Report usable command delivery only after the broker grants the subscription.
|
|
131
|
-
console.debug("[MQTT] Connected and subscribed;
|
|
136
|
+
console.debug("[MQTT] Connected and subscribed; receiving doorbells");
|
|
132
137
|
finish();
|
|
133
138
|
}
|
|
134
139
|
})
|
|
135
|
-
.catch(() =>
|
|
136
|
-
finish(new Error("MQTT readiness update failed"));
|
|
137
|
-
// should we stop??? we should restart connection
|
|
138
|
-
void this.stop().catch(() => { });
|
|
139
|
-
});
|
|
140
|
+
.catch(() => stopWithError(new Error("MQTT readiness update failed")));
|
|
140
141
|
});
|
|
141
142
|
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
if (this.ready && !this.stopped) {
|
|
145
|
-
console.debug("[MQTT] Disconnected; waiting for reconnection");
|
|
146
|
-
}
|
|
147
|
-
this.ready = false;
|
|
148
|
-
void this.onReady(this.ready).catch(() => { });
|
|
149
|
-
});
|
|
150
|
-
// MQTT.js reconnects after network faults. Never print TLS/broker errors,
|
|
151
|
-
// which can include certificate paths or broker-provided sensitive text.
|
|
143
|
+
client.once("close", () => stopWithError(new Error("MQTT connection closed")));
|
|
144
|
+
// Raw TLS/broker errors can include certificate paths or broker-provided sensitive text.
|
|
152
145
|
client.on("error", () => { });
|
|
153
146
|
// Treat broker input as untrusted before RemoteChannel performs any database read.
|
|
154
147
|
// Reject retained backlog and oversized data before parsing, then enforce exact identity.
|
|
@@ -170,7 +163,7 @@ export class MqttTransport {
|
|
|
170
163
|
}
|
|
171
164
|
let payload;
|
|
172
165
|
try {
|
|
173
|
-
//
|
|
166
|
+
// MQTT over TLS hands over whole packets, so a payload can't arrive in part; its shape is checked below.
|
|
174
167
|
payload = JSON.parse(bytes.toString("utf8"));
|
|
175
168
|
}
|
|
176
169
|
catch {
|
|
@@ -244,14 +237,19 @@ export class MqttTransport {
|
|
|
244
237
|
packet.payload === payload)
|
|
245
238
|
messageId = packet.messageId;
|
|
246
239
|
};
|
|
247
|
-
//
|
|
248
|
-
//
|
|
240
|
+
// A timeout settles only this publish: finish() removes its own listeners and outgoing
|
|
241
|
+
// message, and the connection stays up for the others.
|
|
249
242
|
const timer = setTimeout(() => finish(new Error("MQTT result acknowledgement timed out")), 5000);
|
|
250
243
|
client.once("close", onClose);
|
|
251
244
|
client.on("packetsend", onPacket);
|
|
252
245
|
try {
|
|
253
246
|
observeTransport({ stage: 'publish_from_device', callId, deviceId: this.deviceId, userId: this.userId, transport: 'mqtt' });
|
|
254
|
-
client.publish(topic, payload, { qos: 1, retain: false }, (error) =>
|
|
247
|
+
client.publish(topic, payload, { qos: 1, retain: false }, (error) => {
|
|
248
|
+
// MQTT.js can fail pending publishes during shutdown before their close listeners run.
|
|
249
|
+
if (error && (this.stopped || !client.connected))
|
|
250
|
+
return onClose();
|
|
251
|
+
finish(error ? new Error("MQTT result publish failed") : undefined);
|
|
252
|
+
});
|
|
255
253
|
}
|
|
256
254
|
catch {
|
|
257
255
|
finish(new Error("MQTT result publish failed"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mqtt-transport.js","sourceRoot":"","sources":["../../../src/remote-device/mqtt/mqtt-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwC,MAAM,MAAM,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,2EAA2E;AAC3E,MAAM,EAAE,GAAG,wBAAwB,CAAC;AACpC,MAAM,kBAAkB,GAAG,KAAM,CAAC;AAgBl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E,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CACnE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CACnE,CAAC;gBACH,CAAC;gBAAC,MAAM,CAAC;oBACR,MAAM,CAAC,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC,CAAC;gBACjD,CAAC;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;gBAAS,CAAC;QACX,CAAC;IACF,CAAC;IAED,2FAA2F;IAC3F,KAAK,CAAC,IAAI;QACT,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO;QACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACrB,4EAA4E;QAC5E,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime-health-telemetry.js","sourceRoot":"","sources":["../../src/remote-device/realtime-health-telemetry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAmBxC,MAAM,QAAQ,GAA+B;IACzC,0BAA0B,EAAE,gBAAgB,EAAE,aAAa;IAC3D,eAAe,EAAE,eAAe,EAAE,oBAAoB;IACtD,oBAAoB,EAAE,mBAAmB,EAAE,oBAAoB;IAC/D,mBAAmB,EAAE,0BAA0B;CAClD,CAAC;AACF,MAAM,QAAQ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AC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,2CAA2C,CAAC,CAAC;QAChF,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,IAAI;QACA,IAAI,IAAI,CAAC,KAAK;YAAE,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;CACJ"}
|
|
@@ -20,6 +20,11 @@ export interface AuthSession {
|
|
|
20
20
|
export declare class ChannelUnreachableError extends Error {
|
|
21
21
|
constructor(message: string);
|
|
22
22
|
}
|
|
23
|
+
export type BroadcastDoorbell = {
|
|
24
|
+
call_id: string;
|
|
25
|
+
device_id: string;
|
|
26
|
+
user_id?: string;
|
|
27
|
+
};
|
|
23
28
|
interface DeviceData {
|
|
24
29
|
user_id: string;
|
|
25
30
|
device_name: string;
|
|
@@ -67,6 +72,8 @@ export declare class RemoteChannel {
|
|
|
67
72
|
private mqttLifecycle;
|
|
68
73
|
private removeMqttRolloutListener;
|
|
69
74
|
private authGeneration;
|
|
75
|
+
private mqttRestartTimer;
|
|
76
|
+
private mqttRestartFailures;
|
|
70
77
|
private deviceId;
|
|
71
78
|
private deviceName;
|
|
72
79
|
private onToolCall;
|
|
@@ -164,13 +171,20 @@ export declare class RemoteChannel {
|
|
|
164
171
|
}>;
|
|
165
172
|
registerDevice(capabilities: any, currentDeviceId: string | undefined, deviceName: string, onToolCall: (payload: any) => void): Promise<void>;
|
|
166
173
|
private updateMqttTransport;
|
|
174
|
+
/** Schedule the next connection attempt after a startup failure or a disconnected receiver. */
|
|
175
|
+
private scheduleMqttRestart;
|
|
167
176
|
private startMqtt;
|
|
168
177
|
private prepareMqttConfig;
|
|
169
178
|
private startMqttTransport;
|
|
179
|
+
/** The receiver has already stopped itself and withdrawn readiness before reporting the disconnect. */
|
|
180
|
+
private onMqttReceiverFailed;
|
|
181
|
+
private cancelMqttRestart;
|
|
170
182
|
private stopMqttTransport;
|
|
171
183
|
private setMqttReady;
|
|
172
|
-
/**
|
|
184
|
+
/** Transport and execution on: MQTT runs calls and Broadcast only observes. */
|
|
185
|
+
private isMqttExecutionEnabled;
|
|
173
186
|
private onMqttDoorbell;
|
|
187
|
+
private recoverAfterMqttChange;
|
|
174
188
|
private onBroadcastDoorbell;
|
|
175
189
|
/**
|
|
176
190
|
* Mark this join dispatchable by writing `status`. The write has to land —
|
|
@@ -265,6 +279,8 @@ export declare class RemoteChannel {
|
|
|
265
279
|
* and `status`.
|
|
266
280
|
*/
|
|
267
281
|
private isReachable;
|
|
282
|
+
/** Recovery requires the selected execution transport and the local executor to be ready. */
|
|
283
|
+
private canRunCalls;
|
|
268
284
|
/**
|
|
269
285
|
* Set `status` from actual reachability. `status` is transport-agnostic (the
|
|
270
286
|
* server filters on it), so it must not follow one channel's health — the
|
|
@@ -102,6 +102,9 @@ const SOCKET_SETTLE_POLL_MS = 20;
|
|
|
102
102
|
// scan so a pathological backlog cannot turn one reconnect into an unbounded
|
|
103
103
|
// burst of REST claims/tool executions.
|
|
104
104
|
const PENDING_RECOVERY_BATCH_SIZE = 100;
|
|
105
|
+
const MQTT_FAST_RETRY_LIMIT = 10; // Device retry policy counts retries after the initial connection attempt.
|
|
106
|
+
const MQTT_FAST_RETRY_DELAY_MS = 10000; // Wait 10 seconds after each failure during the first ten retries.
|
|
107
|
+
const MQTT_SLOW_RETRY_DELAY_MS = 5 * 60000; // After ten failed retries, wait five minutes between attempts.
|
|
105
108
|
function jitterAround(baseMs, random) {
|
|
106
109
|
const sample = Math.max(0, Math.min(1, random()));
|
|
107
110
|
return Math.max(1, Math.round(baseMs * (0.5 + sample)));
|
|
@@ -218,6 +221,8 @@ export class RemoteChannel {
|
|
|
218
221
|
this.mqttLifecycle = Promise.resolve();
|
|
219
222
|
this.removeMqttRolloutListener = null;
|
|
220
223
|
this.authGeneration = 0;
|
|
224
|
+
this.mqttRestartTimer = null;
|
|
225
|
+
this.mqttRestartFailures = 0;
|
|
221
226
|
// Store subscription parameters for channel recreation
|
|
222
227
|
this.deviceId = null;
|
|
223
228
|
this.deviceName = null;
|
|
@@ -384,6 +389,8 @@ export class RemoteChannel {
|
|
|
384
389
|
return;
|
|
385
390
|
this.handlingSignedOut = true;
|
|
386
391
|
this.authGeneration++;
|
|
392
|
+
// A retry for the old session must not block MQTT startup if session recovery succeeds.
|
|
393
|
+
this.cancelMqttRestart();
|
|
387
394
|
try {
|
|
388
395
|
const cached = this.lastKnownSession;
|
|
389
396
|
if (cached?.refresh_token && this.client) {
|
|
@@ -606,15 +613,47 @@ export class RemoteChannel {
|
|
|
606
613
|
this.mqttLifecycle = this.mqttLifecycle
|
|
607
614
|
.then(async () => {
|
|
608
615
|
if (enabled) {
|
|
616
|
+
// Registration or a session refresh can request a start while a retry is pending.
|
|
617
|
+
if (this.mqttRestartTimer)
|
|
618
|
+
return;
|
|
609
619
|
await this.startMqtt();
|
|
620
|
+
if (this.mqttReceiver && this.mqttRestartFailures > 0) {
|
|
621
|
+
captureRemote('remote_channel_mqtt_restart_succeeded', { attempts: this.mqttRestartFailures }).catch(() => { });
|
|
622
|
+
this.mqttRestartFailures = 0;
|
|
623
|
+
}
|
|
610
624
|
}
|
|
611
625
|
else {
|
|
626
|
+
this.mqttRestartFailures = 0;
|
|
612
627
|
await this.stopMqttTransport();
|
|
613
628
|
}
|
|
614
629
|
})
|
|
615
|
-
.catch(() =>
|
|
630
|
+
.catch((error) => {
|
|
631
|
+
console.debug('[MQTT] Transport unavailable; will try again:', error?.message);
|
|
632
|
+
this.scheduleMqttRestart();
|
|
633
|
+
});
|
|
616
634
|
return this.mqttLifecycle;
|
|
617
635
|
}
|
|
636
|
+
/** Schedule the next connection attempt after a startup failure or a disconnected receiver. */
|
|
637
|
+
scheduleMqttRestart() {
|
|
638
|
+
if (this.mqttRestartTimer || this.shuttingDown || this.sessionLost || this.handlingSignedOut)
|
|
639
|
+
return;
|
|
640
|
+
if (!rolloutManager.get('MQTT_TRANSPORT_ENABLED'))
|
|
641
|
+
return;
|
|
642
|
+
const generation = this.authGeneration;
|
|
643
|
+
this.mqttRestartFailures++;
|
|
644
|
+
const delayMs = this.mqttRestartFailures <= MQTT_FAST_RETRY_LIMIT
|
|
645
|
+
? MQTT_FAST_RETRY_DELAY_MS
|
|
646
|
+
: MQTT_SLOW_RETRY_DELAY_MS;
|
|
647
|
+
captureRemote('remote_channel_mqtt_restart_scheduled', { failures: this.mqttRestartFailures, delay_ms: delayMs }).catch(() => { });
|
|
648
|
+
this.mqttRestartTimer = setTimeout(() => {
|
|
649
|
+
this.mqttRestartTimer = null;
|
|
650
|
+
// The user signed out or in during the wait: skip, the new sign-in starts MQTT itself.
|
|
651
|
+
if (generation !== this.authGeneration)
|
|
652
|
+
return;
|
|
653
|
+
void this.updateMqttTransport(rolloutManager.get('MQTT_TRANSPORT_ENABLED'));
|
|
654
|
+
}, delayMs);
|
|
655
|
+
this.mqttRestartTimer.unref();
|
|
656
|
+
}
|
|
618
657
|
async startMqtt() {
|
|
619
658
|
if (!rolloutManager.get('MQTT_TRANSPORT_ENABLED')) {
|
|
620
659
|
console.debug('[DEBUG] MQTT transport DISABLED');
|
|
@@ -671,12 +710,33 @@ export class RemoteChannel {
|
|
|
671
710
|
return;
|
|
672
711
|
}
|
|
673
712
|
await this.setMqttReady(ready);
|
|
674
|
-
|
|
713
|
+
// Doorbells sent while MQTT was down are not delivered later, so look in the
|
|
714
|
+
// database for calls that are still waiting and run them.
|
|
715
|
+
if (ready)
|
|
716
|
+
this.recoverAfterMqttChange('after MQTT connected');
|
|
717
|
+
},
|
|
718
|
+
// A message was thrown away because it isn't a valid doorbell for this device.
|
|
719
|
+
// Log it so a rejected doorbell is visible in the device log.
|
|
720
|
+
() => console.debug('[MQTT] Doorbell rejected: not a valid doorbell for this device'), () => this.onMqttReceiverFailed(receiver));
|
|
675
721
|
this.mqttReceiver = receiver;
|
|
676
722
|
await receiver.start();
|
|
677
723
|
}
|
|
724
|
+
/** The receiver has already stopped itself and withdrawn readiness before reporting the disconnect. */
|
|
725
|
+
onMqttReceiverFailed(receiver) {
|
|
726
|
+
if (this.mqttReceiver !== receiver)
|
|
727
|
+
return;
|
|
728
|
+
console.debug('[MQTT] Receiver disconnected; scheduling a retry');
|
|
729
|
+
this.mqttReceiver = null;
|
|
730
|
+
this.scheduleMqttRestart();
|
|
731
|
+
}
|
|
732
|
+
cancelMqttRestart() {
|
|
733
|
+
if (this.mqttRestartTimer)
|
|
734
|
+
clearTimeout(this.mqttRestartTimer);
|
|
735
|
+
this.mqttRestartTimer = null;
|
|
736
|
+
}
|
|
678
737
|
async stopMqttTransport() {
|
|
679
738
|
console.debug('[DEBUG] stopping MQTT transport');
|
|
739
|
+
this.cancelMqttRestart();
|
|
680
740
|
const receiver = this.mqttReceiver;
|
|
681
741
|
this.mqttReceiver = null;
|
|
682
742
|
if (receiver) {
|
|
@@ -722,19 +782,42 @@ export class RemoteChannel {
|
|
|
722
782
|
throw new Error('MQTT capability could not be saved');
|
|
723
783
|
}
|
|
724
784
|
}
|
|
725
|
-
/**
|
|
785
|
+
/** Transport and execution on: MQTT runs calls and Broadcast only observes. */
|
|
786
|
+
isMqttExecutionEnabled() {
|
|
787
|
+
return rolloutManager.get('MQTT_TRANSPORT_ENABLED') && rolloutManager.get('MQTT_ON_DEVICE_EXECUTION_ENABLED');
|
|
788
|
+
}
|
|
726
789
|
async onMqttDoorbell(payload) {
|
|
727
790
|
if (this.shuttingDown || this.sessionLost || this.handlingSignedOut) {
|
|
728
791
|
return;
|
|
729
792
|
}
|
|
793
|
+
if (!this.isMqttExecutionEnabled()) {
|
|
794
|
+
console.debug(`[MQTT] Doorbell for call ${payload.call_id} observed only; execution is off`);
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
await this.onDoorbell(payload, 'mqtt');
|
|
798
|
+
}
|
|
799
|
+
recoverAfterMqttChange(reason) {
|
|
800
|
+
this.recoverPendingCalls(reason).catch((error) => {
|
|
801
|
+
console.error(`[DEBUG] Pending call recovery failed (${reason}):`, error?.message);
|
|
802
|
+
});
|
|
730
803
|
}
|
|
731
804
|
async onBroadcastDoorbell(payload) {
|
|
732
805
|
if (this.shuttingDown || this.sessionLost || this.handlingSignedOut) {
|
|
733
806
|
return;
|
|
734
807
|
}
|
|
735
|
-
observeTransport({
|
|
736
|
-
|
|
737
|
-
|
|
808
|
+
observeTransport({
|
|
809
|
+
stage: 'received_from_backend',
|
|
810
|
+
callId: payload?.call_id,
|
|
811
|
+
payload,
|
|
812
|
+
deviceId: this.deviceId,
|
|
813
|
+
userId: this.user?.id,
|
|
814
|
+
transport: 'broadcast',
|
|
815
|
+
});
|
|
816
|
+
if (this.isMqttExecutionEnabled()) {
|
|
817
|
+
console.debug(`[DEBUG] Broadcast doorbell for call ${payload?.call_id} observed only; MQTT runs calls`);
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
await this.onDoorbell(payload, 'broadcast');
|
|
738
821
|
}
|
|
739
822
|
/**
|
|
740
823
|
* Mark this join dispatchable by writing `status`. The write has to land —
|
|
@@ -889,7 +972,9 @@ export class RemoteChannel {
|
|
|
889
972
|
}
|
|
890
973
|
})
|
|
891
974
|
.on('broadcast', { event: 'new_call' }, ({ payload }) => {
|
|
892
|
-
|
|
975
|
+
console.debug(`[DEBUG] Received broadcast doorbell for call ${payload?.call_id}`);
|
|
976
|
+
this.onBroadcastDoorbell(payload)
|
|
977
|
+
.catch((e) => {
|
|
893
978
|
console.error('[DEBUG] Doorbell handling failed:', e?.message);
|
|
894
979
|
});
|
|
895
980
|
})
|
|
@@ -962,9 +1047,10 @@ export class RemoteChannel {
|
|
|
962
1047
|
* The follow-up onDoorbell() call performs the existing conditional claim,
|
|
963
1048
|
* which makes this safe against a doorbell arriving at the same time.
|
|
964
1049
|
*/
|
|
965
|
-
async recoverPendingCalls() {
|
|
966
|
-
if (!this.client || !this.deviceId || !this.
|
|
1050
|
+
async recoverPendingCalls(reason = 'after reconnect') {
|
|
1051
|
+
if (!this.client || !this.deviceId || !this.canRunCalls()) {
|
|
967
1052
|
return;
|
|
1053
|
+
}
|
|
968
1054
|
const { data: pending, error } = await this.client
|
|
969
1055
|
.from('mcp_remote_calls')
|
|
970
1056
|
.select('id,device_id')
|
|
@@ -980,7 +1066,7 @@ export class RemoteChannel {
|
|
|
980
1066
|
}
|
|
981
1067
|
if (!pending?.length)
|
|
982
1068
|
return;
|
|
983
|
-
console.log(`♻️ Recovering ${pending.length} pending remote call${pending.length === 1 ? '' : 's'}
|
|
1069
|
+
console.log(`♻️ Recovering ${pending.length} pending remote call${pending.length === 1 ? '' : 's'} ${reason}`);
|
|
984
1070
|
captureRemote('remote_channel_pending_recovery', {
|
|
985
1071
|
pending_count: pending.length,
|
|
986
1072
|
batch_capped: pending.length === PENDING_RECOVERY_BATCH_SIZE,
|
|
@@ -988,12 +1074,13 @@ export class RemoteChannel {
|
|
|
988
1074
|
// Claim quickly; dispatchToolCall() does not await tool execution, so
|
|
989
1075
|
// this loop serializes only the small REST claim operations.
|
|
990
1076
|
for (const row of pending) {
|
|
991
|
-
if (!this.
|
|
1077
|
+
if (!this.canRunCalls()) {
|
|
992
1078
|
break;
|
|
1079
|
+
}
|
|
993
1080
|
await this.onDoorbell({
|
|
994
1081
|
call_id: row.id,
|
|
995
1082
|
device_id: row.device_id,
|
|
996
|
-
});
|
|
1083
|
+
}, 'recovery');
|
|
997
1084
|
}
|
|
998
1085
|
}
|
|
999
1086
|
/** Hand a call to device.ts, observing the rejection — the handler is async
|
|
@@ -1016,22 +1103,25 @@ export class RemoteChannel {
|
|
|
1016
1103
|
* claims the row (pending -> executing) and returns it, and it is handed to
|
|
1017
1104
|
* device.ts marked as claimed.
|
|
1018
1105
|
*/
|
|
1019
|
-
async onDoorbell(payload) {
|
|
1020
|
-
if (this.shuttingDown || this.sessionLost || this.handlingSignedOut)
|
|
1106
|
+
async onDoorbell(payload, source = 'broadcast') {
|
|
1107
|
+
if (this.shuttingDown || this.sessionLost || this.handlingSignedOut) {
|
|
1021
1108
|
return;
|
|
1109
|
+
}
|
|
1022
1110
|
const generation = this.authGeneration;
|
|
1023
1111
|
const callId = payload?.call_id;
|
|
1024
|
-
if (!callId)
|
|
1112
|
+
if (!callId) {
|
|
1025
1113
|
return;
|
|
1114
|
+
}
|
|
1026
1115
|
if (payload?.device_id !== this.deviceId) {
|
|
1027
1116
|
console.debug('[DEBUG] Ignoring doorbell for different device');
|
|
1028
1117
|
return;
|
|
1029
1118
|
}
|
|
1030
1119
|
// Not a telemetry event on purpose: ~126k/day in prod. Transport usage
|
|
1031
1120
|
// is already segmentable server-side via metadata.transport.
|
|
1032
|
-
console.debug(
|
|
1033
|
-
if (!this.client)
|
|
1121
|
+
console.debug(`[DEBUG] Doorbell received for call: ${callId} (from ${source})`);
|
|
1122
|
+
if (!this.client) {
|
|
1034
1123
|
return;
|
|
1124
|
+
}
|
|
1035
1125
|
// Retry on transient failures (a REST blip while the socket stays
|
|
1036
1126
|
// healthy). This claim is the only way we learn about a call,
|
|
1037
1127
|
// so a hiccup must not cost a timeout. PostgREST interprets the
|
|
@@ -1064,6 +1154,8 @@ export class RemoteChannel {
|
|
|
1064
1154
|
if (generation !== this.authGeneration || this.shuttingDown || this.sessionLost || this.handlingSignedOut)
|
|
1065
1155
|
return;
|
|
1066
1156
|
if (row) {
|
|
1157
|
+
// Who ran the call: MQTT, Broadcast, or the scan for waiting calls.
|
|
1158
|
+
observeTransport({ stage: 'call_claimed', callId, deviceId: this.deviceId, userId: this.user?.id, claimedBy: source });
|
|
1067
1159
|
// The server writes the user's rollouts into every call row; a row
|
|
1068
1160
|
// without them (an older server) keeps what the device has.
|
|
1069
1161
|
rolloutManager.update(row.metadata?.rollouts);
|
|
@@ -1075,7 +1167,7 @@ export class RemoteChannel {
|
|
|
1075
1167
|
}
|
|
1076
1168
|
if (!claimError) {
|
|
1077
1169
|
// Claimed by a duplicate doorbell or another process, or cleaned up.
|
|
1078
|
-
console.debug('[DEBUG] Doorbell call already claimed or gone:', callId);
|
|
1170
|
+
console.debug('[DEBUG] Doorbell call already claimed or gone. No row found:', callId);
|
|
1079
1171
|
await captureRemote('remote_channel_doorbell_claim_no_row', { call_id: callId });
|
|
1080
1172
|
return;
|
|
1081
1173
|
}
|
|
@@ -1109,7 +1201,7 @@ export class RemoteChannel {
|
|
|
1109
1201
|
// the row carries no claimant. Running it on that guess executes a
|
|
1110
1202
|
// side-effecting tool twice; skipping costs one call its timeout, which
|
|
1111
1203
|
// is what a failed doorbell read already cost before the claim path.
|
|
1112
|
-
console.debug('[DEBUG] Doorbell call already claimed or gone:', callId);
|
|
1204
|
+
console.debug('[DEBUG] Doorbell call already claimed or gone. not executing:', callId);
|
|
1113
1205
|
await captureRemote('remote_channel_doorbell_claim_unresolved', {
|
|
1114
1206
|
call_id: callId,
|
|
1115
1207
|
status: current?.status ?? null,
|
|
@@ -1365,8 +1457,9 @@ export class RemoteChannel {
|
|
|
1365
1457
|
return claimed;
|
|
1366
1458
|
}
|
|
1367
1459
|
async updateCallResult(callId, status, result = null, errorMessage = null, originInstance) {
|
|
1368
|
-
if (!this.client)
|
|
1460
|
+
if (!this.client) {
|
|
1369
1461
|
throw new Error('Client not initialized');
|
|
1462
|
+
}
|
|
1370
1463
|
// The DB terminal-status trigger stamps completed_at using PostgreSQL
|
|
1371
1464
|
// time. Do not send a device-generated timestamp.
|
|
1372
1465
|
const updateData = { status };
|
|
@@ -1389,6 +1482,13 @@ export class RemoteChannel {
|
|
|
1389
1482
|
console.debug(`[DEBUG] Updating call result: ${callId} status=${status}` +
|
|
1390
1483
|
(result !== null ? ` resultBytes=~${JSON.stringify(updateData.result)?.length ?? 0}` : ''));
|
|
1391
1484
|
}
|
|
1485
|
+
// The write triggers Broadcast, and the channel identity can change before it returns.
|
|
1486
|
+
const broadcastObservation = {
|
|
1487
|
+
callId,
|
|
1488
|
+
deviceId: this.deviceId,
|
|
1489
|
+
userId: this.user?.id,
|
|
1490
|
+
timestampUtc: new Date().toISOString(),
|
|
1491
|
+
};
|
|
1392
1492
|
const { error } = await this.client
|
|
1393
1493
|
.from('mcp_remote_calls')
|
|
1394
1494
|
.update(updateData)
|
|
@@ -1406,9 +1506,13 @@ export class RemoteChannel {
|
|
|
1406
1506
|
}
|
|
1407
1507
|
}
|
|
1408
1508
|
else {
|
|
1409
|
-
|
|
1509
|
+
const hasResultDoorbell = originInstance && (status === 'completed' || status === 'failed');
|
|
1510
|
+
const mqttEnabled = rolloutManager.get('MQTT_TRANSPORT_ENABLED');
|
|
1410
1511
|
console.debug('[DEBUG] Call result updated successfully:', callId);
|
|
1411
|
-
if (
|
|
1512
|
+
if (hasResultDoorbell && !mqttEnabled) {
|
|
1513
|
+
observeTransport({ ...broadcastObservation, stage: 'publish_from_device', transport: 'broadcast' });
|
|
1514
|
+
}
|
|
1515
|
+
else if (hasResultDoorbell && mqttEnabled) {
|
|
1412
1516
|
// The write already triggers Broadcast in shadow mode; MQTT must never delay it.
|
|
1413
1517
|
void this.publishMqttResult(callId, originInstance).catch(() => { });
|
|
1414
1518
|
}
|
|
@@ -1416,12 +1520,14 @@ export class RemoteChannel {
|
|
|
1416
1520
|
}
|
|
1417
1521
|
async publishMqttResult(callId, originInstance) {
|
|
1418
1522
|
const receiver = this.mqttReceiver;
|
|
1419
|
-
if (!receiver)
|
|
1523
|
+
if (!receiver) {
|
|
1420
1524
|
return;
|
|
1525
|
+
}
|
|
1421
1526
|
const generation = this.authGeneration;
|
|
1422
1527
|
for (let attempt = 1; attempt <= 3; attempt++) {
|
|
1423
|
-
if (generation !== this.authGeneration || receiver !== this.mqttReceiver || this.shuttingDown || this.sessionLost)
|
|
1528
|
+
if (generation !== this.authGeneration || receiver !== this.mqttReceiver || this.shuttingDown || this.sessionLost) {
|
|
1424
1529
|
return;
|
|
1530
|
+
}
|
|
1425
1531
|
const observation = { callId, deviceId: this.deviceId, userId: this.user?.id, transport: 'mqtt' };
|
|
1426
1532
|
try {
|
|
1427
1533
|
await receiver.publishResult(callId, originInstance);
|
|
@@ -1447,6 +1553,12 @@ export class RemoteChannel {
|
|
|
1447
1553
|
&& this.channelReady
|
|
1448
1554
|
&& this.localExecutorProbe();
|
|
1449
1555
|
}
|
|
1556
|
+
/** Recovery requires the selected execution transport and the local executor to be ready. */
|
|
1557
|
+
canRunCalls() {
|
|
1558
|
+
return this.isMqttExecutionEnabled()
|
|
1559
|
+
? this.mqttReady && this.localExecutorProbe()
|
|
1560
|
+
: this.isReachable();
|
|
1561
|
+
}
|
|
1450
1562
|
/**
|
|
1451
1563
|
* Set `status` from actual reachability. `status` is transport-agnostic (the
|
|
1452
1564
|
* server filters on it), so it must not follow one channel's health — the
|