2026-01-14 09:11:21 +00:00
|
|
|
import { listChannelPlugins } from "../channels/plugins/index.js";
|
2026-02-19 10:00:27 +01:00
|
|
|
import { GATEWAY_EVENT_UPDATE_AVAILABLE } from "./events.js";
|
2026-01-14 09:11:21 +00:00
|
|
|
|
|
|
|
|
const BASE_METHODS = [
|
|
|
|
|
"health",
|
2026-02-23 14:07:16 -05:00
|
|
|
"doctor.memory.status",
|
2026-01-14 09:11:21 +00:00
|
|
|
"logs.tail",
|
|
|
|
|
"channels.status",
|
|
|
|
|
"channels.logout",
|
|
|
|
|
"status",
|
|
|
|
|
"usage.status",
|
2026-01-19 00:04:58 +00:00
|
|
|
"usage.cost",
|
2026-01-24 07:57:46 +00:00
|
|
|
"tts.status",
|
|
|
|
|
"tts.providers",
|
|
|
|
|
"tts.enable",
|
|
|
|
|
"tts.disable",
|
|
|
|
|
"tts.convert",
|
|
|
|
|
"tts.setProvider",
|
2026-01-14 09:11:21 +00:00
|
|
|
"config.get",
|
|
|
|
|
"config.set",
|
|
|
|
|
"config.apply",
|
2026-01-15 04:05:01 +00:00
|
|
|
"config.patch",
|
2026-01-14 09:11:21 +00:00
|
|
|
"config.schema",
|
2026-03-06 02:50:48 -05:00
|
|
|
"config.schema.lookup",
|
2026-01-18 08:54:34 +00:00
|
|
|
"exec.approvals.get",
|
|
|
|
|
"exec.approvals.set",
|
2026-01-18 15:23:36 +00:00
|
|
|
"exec.approvals.node.get",
|
|
|
|
|
"exec.approvals.node.set",
|
2026-01-19 02:31:18 +00:00
|
|
|
"exec.approval.request",
|
2026-02-13 19:57:02 +01:00
|
|
|
"exec.approval.waitDecision",
|
2026-01-19 02:31:18 +00:00
|
|
|
"exec.approval.resolve",
|
2026-01-14 09:11:21 +00:00
|
|
|
"wizard.start",
|
|
|
|
|
"wizard.next",
|
|
|
|
|
"wizard.cancel",
|
|
|
|
|
"wizard.status",
|
2026-02-13 21:37:49 +05:30
|
|
|
"talk.config",
|
2026-01-14 09:11:21 +00:00
|
|
|
"talk.mode",
|
|
|
|
|
"models.list",
|
2026-02-22 23:55:59 -06:00
|
|
|
"tools.catalog",
|
2026-01-14 09:11:21 +00:00
|
|
|
"agents.list",
|
2026-02-07 16:47:58 -08:00
|
|
|
"agents.create",
|
|
|
|
|
"agents.update",
|
|
|
|
|
"agents.delete",
|
2026-02-02 21:31:17 -05:00
|
|
|
"agents.files.list",
|
|
|
|
|
"agents.files.get",
|
|
|
|
|
"agents.files.set",
|
2026-01-14 09:11:21 +00:00
|
|
|
"skills.status",
|
2026-01-20 09:23:56 +00:00
|
|
|
"skills.bins",
|
2026-01-14 09:11:21 +00:00
|
|
|
"skills.install",
|
|
|
|
|
"skills.update",
|
|
|
|
|
"update.run",
|
|
|
|
|
"voicewake.get",
|
|
|
|
|
"voicewake.set",
|
2026-02-21 13:57:49 -08:00
|
|
|
"secrets.reload",
|
2026-03-02 20:58:20 -06:00
|
|
|
"secrets.resolve",
|
2026-01-14 09:11:21 +00:00
|
|
|
"sessions.list",
|
2026-01-22 10:21:50 +00:00
|
|
|
"sessions.preview",
|
2026-01-14 09:11:21 +00:00
|
|
|
"sessions.patch",
|
|
|
|
|
"sessions.reset",
|
|
|
|
|
"sessions.delete",
|
|
|
|
|
"sessions.compact",
|
|
|
|
|
"last-heartbeat",
|
|
|
|
|
"set-heartbeats",
|
|
|
|
|
"wake",
|
|
|
|
|
"node.pair.request",
|
|
|
|
|
"node.pair.list",
|
|
|
|
|
"node.pair.approve",
|
|
|
|
|
"node.pair.reject",
|
|
|
|
|
"node.pair.verify",
|
2026-01-19 02:31:18 +00:00
|
|
|
"device.pair.list",
|
|
|
|
|
"device.pair.approve",
|
|
|
|
|
"device.pair.reject",
|
2026-02-18 13:27:31 +00:00
|
|
|
"device.pair.remove",
|
2026-01-20 10:29:13 +00:00
|
|
|
"device.token.rotate",
|
|
|
|
|
"device.token.revoke",
|
2026-01-14 09:11:21 +00:00
|
|
|
"node.rename",
|
|
|
|
|
"node.list",
|
|
|
|
|
"node.describe",
|
2026-03-09 21:42:57 +01:00
|
|
|
"node.pending.drain",
|
|
|
|
|
"node.pending.enqueue",
|
2026-01-14 09:11:21 +00:00
|
|
|
"node.invoke",
|
2026-03-08 22:46:54 +01:00
|
|
|
"node.pending.pull",
|
|
|
|
|
"node.pending.ack",
|
2026-01-19 04:50:07 +00:00
|
|
|
"node.invoke.result",
|
|
|
|
|
"node.event",
|
2026-02-27 11:47:06 +05:30
|
|
|
"node.canvas.capability.refresh",
|
2026-01-14 09:11:21 +00:00
|
|
|
"cron.list",
|
|
|
|
|
"cron.status",
|
|
|
|
|
"cron.add",
|
|
|
|
|
"cron.update",
|
|
|
|
|
"cron.remove",
|
|
|
|
|
"cron.run",
|
|
|
|
|
"cron.runs",
|
2026-03-12 18:15:35 +02:00
|
|
|
"gateway.identity.get",
|
2026-01-14 09:11:21 +00:00
|
|
|
"system-presence",
|
|
|
|
|
"system-event",
|
|
|
|
|
"send",
|
|
|
|
|
"agent",
|
2026-01-22 06:47:37 +00:00
|
|
|
"agent.identity.get",
|
2026-01-14 09:11:21 +00:00
|
|
|
"agent.wait",
|
2026-01-27 03:23:42 +00:00
|
|
|
"browser.request",
|
2026-01-14 09:11:21 +00:00
|
|
|
// WebChat WebSocket-native chat methods
|
|
|
|
|
"chat.history",
|
|
|
|
|
"chat.abort",
|
|
|
|
|
"chat.send",
|
|
|
|
|
];
|
|
|
|
|
|
2026-01-15 02:42:41 +00:00
|
|
|
export function listGatewayMethods(): string[] {
|
|
|
|
|
const channelMethods = listChannelPlugins().flatMap((plugin) => plugin.gatewayMethods ?? []);
|
|
|
|
|
return Array.from(new Set([...BASE_METHODS, ...channelMethods]));
|
|
|
|
|
}
|
2026-01-14 09:11:21 +00:00
|
|
|
|
|
|
|
|
export const GATEWAY_EVENTS = [
|
2026-01-20 11:15:10 +00:00
|
|
|
"connect.challenge",
|
2026-01-14 09:11:21 +00:00
|
|
|
"agent",
|
|
|
|
|
"chat",
|
|
|
|
|
"presence",
|
|
|
|
|
"tick",
|
|
|
|
|
"talk.mode",
|
|
|
|
|
"shutdown",
|
|
|
|
|
"health",
|
|
|
|
|
"heartbeat",
|
|
|
|
|
"cron",
|
|
|
|
|
"node.pair.requested",
|
|
|
|
|
"node.pair.resolved",
|
2026-01-19 04:50:07 +00:00
|
|
|
"node.invoke.request",
|
2026-01-19 02:31:18 +00:00
|
|
|
"device.pair.requested",
|
|
|
|
|
"device.pair.resolved",
|
2026-01-14 09:11:21 +00:00
|
|
|
"voicewake.changed",
|
2026-01-19 02:31:18 +00:00
|
|
|
"exec.approval.requested",
|
|
|
|
|
"exec.approval.resolved",
|
2026-02-19 10:00:27 +01:00
|
|
|
GATEWAY_EVENT_UPDATE_AVAILABLE,
|
2026-01-14 09:11:21 +00:00
|
|
|
];
|