instar 1.3.181 → 1.3.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +18 -22
- package/dist/commands/server.js.map +1 -1
- package/dist/core/TelegramRelay.d.ts +52 -0
- package/dist/core/TelegramRelay.d.ts.map +1 -0
- package/dist/core/TelegramRelay.js +80 -0
- package/dist/core/TelegramRelay.js.map +1 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +8 -2
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +46 -46
- package/upgrades/1.3.180.md +58 -45
- package/upgrades/1.3.183.md +81 -0
- package/upgrades/side-effects/telegram-relay-timeout-observability.md +37 -0
- package/upgrades/side-effects/updates-status-restart-immediately.md +55 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAwSH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA+wDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA60PtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -63,6 +63,7 @@ import { MultiMachineCoordinator } from '../core/MultiMachineCoordinator.js';
|
|
|
63
63
|
import { isRemotelyHandled } from '../core/SessionRouter.js';
|
|
64
64
|
import { formatForwardedTopicContext } from '../core/ForwardedTopicContext.js';
|
|
65
65
|
import { resolveAdvertisedMeshUrl, advertiseSelfMeshUrl } from '../core/MeshUrlAdvertiser.js';
|
|
66
|
+
import { relayOutbound } from '../core/TelegramRelay.js';
|
|
66
67
|
import { GitSyncManager } from '../core/GitSync.js';
|
|
67
68
|
import { RegistrySyncDebouncer } from '../core/RegistrySyncDebouncer.js';
|
|
68
69
|
import { wireRegistrySync } from '../core/wireRegistrySync.js';
|
|
@@ -8918,28 +8919,23 @@ export async function startServer(options) {
|
|
|
8918
8919
|
// replies reach the user without the standby ever sending on the shared bot
|
|
8919
8920
|
// (preserving the single-Telegram-owner invariant — the 409-conflict guard).
|
|
8920
8921
|
if (telegram) {
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
}
|
|
8939
|
-
catch {
|
|
8940
|
-
return null; // relay unreachable → sendToTopic surfaces the failure
|
|
8941
|
-
}
|
|
8942
|
-
};
|
|
8922
|
+
// Bounded + observable relay (see src/core/TelegramRelay.ts). The
|
|
8923
|
+
// original inline fetch had NO timeout (a stalled holder tunnel hung
|
|
8924
|
+
// the moved session's reply >70s) and logged NOTHING on failure (a
|
|
8925
|
+
// dropped reply was invisible). Timeout tunable via
|
|
8926
|
+
// config.multiMachine.relayTimeoutMs (default 15s).
|
|
8927
|
+
const relayTimeoutMs = (() => {
|
|
8928
|
+
const v = config.multiMachine?.relayTimeoutMs;
|
|
8929
|
+
return typeof v === 'number' && v > 0 ? v : 15_000;
|
|
8930
|
+
})();
|
|
8931
|
+
telegram.outboundRelay = (topicId, text, opts) => relayOutbound(topicId, text, opts, {
|
|
8932
|
+
leaseHolder: () => coordinator.getSyncStatus().leaseHolder,
|
|
8933
|
+
selfMachineId: meshSelfId,
|
|
8934
|
+
peerUrl,
|
|
8935
|
+
authToken: config.authToken,
|
|
8936
|
+
timeoutMs: relayTimeoutMs,
|
|
8937
|
+
log: (line) => console.warn(pc.yellow(` ${line}`)),
|
|
8938
|
+
});
|
|
8943
8939
|
}
|
|
8944
8940
|
// ── L4 transfer-by-nickname activation: the "move/run this on <nickname>"
|
|
8945
8941
|
// trigger. The recognizer + planner are pure units; this wires them to the
|