mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 08:27:39 +00:00
feat(agents): add nodes notifications_list action
This commit is contained in:
@@ -40,6 +40,7 @@ const NODES_TOOL_ACTIONS = [
|
||||
"camera_clip",
|
||||
"screen_record",
|
||||
"location_get",
|
||||
"notifications_list",
|
||||
"run",
|
||||
"invoke",
|
||||
] as const;
|
||||
@@ -122,7 +123,7 @@ export function createNodesTool(options?: {
|
||||
label: "Nodes",
|
||||
name: "nodes",
|
||||
description:
|
||||
"Discover and control paired nodes (status/describe/pairing/notify/camera/screen/location/run/invoke).",
|
||||
"Discover and control paired nodes (status/describe/pairing/notify/camera/screen/location/notifications/run/invoke).",
|
||||
parameters: NodesToolSchema,
|
||||
execute: async (_toolCallId, args) => {
|
||||
const params = args as Record<string, unknown>;
|
||||
@@ -406,6 +407,17 @@ export function createNodesTool(options?: {
|
||||
});
|
||||
return jsonResult(raw?.payload ?? {});
|
||||
}
|
||||
case "notifications_list": {
|
||||
const node = readStringParam(params, "node", { required: true });
|
||||
const nodeId = await resolveNodeId(gatewayOpts, node);
|
||||
const raw = await callGatewayTool<{ payload: unknown }>("node.invoke", gatewayOpts, {
|
||||
nodeId,
|
||||
command: "notifications.list",
|
||||
params: {},
|
||||
idempotencyKey: crypto.randomUUID(),
|
||||
});
|
||||
return jsonResult(raw?.payload ?? {});
|
||||
}
|
||||
case "run": {
|
||||
const node = readStringParam(params, "node", { required: true });
|
||||
const nodes = await listNodes(gatewayOpts);
|
||||
|
||||
Reference in New Issue
Block a user