@openclaw/signal 0.0.0 → 2026.6.11
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/README.md +12 -2
- package/dist/accounts-hOCHbEhX.js +40 -0
- package/dist/api.js +16 -0
- package/dist/approval-handler.runtime-CeJI1wow.js +158 -0
- package/dist/approval-resolver-BR0MioAA.js +15 -0
- package/dist/channel-LmY2UpOt.js +619 -0
- package/dist/channel-config-api.js +2 -0
- package/dist/channel-entry.js +18 -0
- package/dist/channel-plugin-api.js +2 -0
- package/dist/channel.runtime-B0-YpkC4.js +65 -0
- package/dist/config-api-KS-qhQvD.js +2 -0
- package/dist/config-schema-BiojLEsX.js +27 -0
- package/dist/contract-api.js +3 -0
- package/dist/identity-B6O4k8xg.js +130 -0
- package/dist/index.js +18 -0
- package/dist/install-signal-cli-CXgTF3de.js +243 -0
- package/dist/message-actions-Bue0g2Kc.js +548 -0
- package/dist/monitor-CUhIKHJo.js +1404 -0
- package/dist/probe-BQ_Izoya.js +48 -0
- package/dist/reaction-runtime-api-C_PQ45D9.js +1074 -0
- package/dist/reaction-runtime-api.js +2 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/runtime-api.js +18 -0
- package/dist/secret-contract-api.js +5 -0
- package/dist/send-CBlFUkY_.js +599 -0
- package/dist/send.runtime-CfaZd8X4.js +2 -0
- package/dist/setup-entry.js +11 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/ws/lib/receiver.js +760 -0
- package/node_modules/ws/lib/sender.js +607 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +562 -0
- package/node_modules/ws/lib/websocket.js +1407 -0
- package/node_modules/ws/package.json +70 -0
- package/node_modules/ws/wrapper.mjs +21 -0
- package/npm-shrinkwrap.json +36 -0
- package/openclaw.plugin.json +771 -0
- package/package.json +77 -7
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { a as signalRpcRequest, i as signalCheck } from "./reaction-runtime-api-C_PQ45D9.js";
|
|
3
|
+
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
4
|
+
//#region extensions/signal/src/probe.ts
|
|
5
|
+
var probe_exports = /* @__PURE__ */ __exportAll({ probeSignal: () => probeSignal });
|
|
6
|
+
function parseSignalVersion(value) {
|
|
7
|
+
if (typeof value === "string" && value.trim()) return value.trim();
|
|
8
|
+
if (typeof value === "object" && value !== null) {
|
|
9
|
+
const version = value.version;
|
|
10
|
+
if (typeof version === "string" && version.trim()) return version.trim();
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
async function probeSignal(baseUrl, timeoutMs, options = {}) {
|
|
15
|
+
const started = Date.now();
|
|
16
|
+
const result = {
|
|
17
|
+
ok: false,
|
|
18
|
+
status: null,
|
|
19
|
+
error: null,
|
|
20
|
+
elapsedMs: 0,
|
|
21
|
+
version: null
|
|
22
|
+
};
|
|
23
|
+
const apiMode = options.apiMode ?? "native";
|
|
24
|
+
const check = await signalCheck(baseUrl, timeoutMs, { apiMode });
|
|
25
|
+
if (!check.ok) return {
|
|
26
|
+
...result,
|
|
27
|
+
status: check.status ?? null,
|
|
28
|
+
error: check.error ?? "unreachable",
|
|
29
|
+
elapsedMs: Date.now() - started
|
|
30
|
+
};
|
|
31
|
+
try {
|
|
32
|
+
result.version = parseSignalVersion(await signalRpcRequest("version", void 0, {
|
|
33
|
+
baseUrl,
|
|
34
|
+
timeoutMs,
|
|
35
|
+
apiMode
|
|
36
|
+
}));
|
|
37
|
+
} catch (err) {
|
|
38
|
+
result.error = formatErrorMessage(err);
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
...result,
|
|
42
|
+
ok: true,
|
|
43
|
+
status: check.status ?? null,
|
|
44
|
+
elapsedMs: Date.now() - started
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { probe_exports as n, probeSignal as t };
|