mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-22 10:51:11 +00:00
* feat(linux): add node device capabilities * fix(linux-node): actionable pending-approval error + node-host advertise integration test * fix(linux-node): map geoclue access-denied to LOCATION_DISABLED; floor camera maxWidth to avoid zero-height scale * fix(linux-node): clamp small camera maxWidth to 2 instead of default * docs(linux-node): clarify where-am-i -t is a process timeout, not update throttle * refactor(gateway): extract legacy-node filter + rejection hint to fit LOC ratchet; docs-map + deadcode baseline * fix(gateway): drop now-unused DEFAULT_DANGEROUS_NODE_COMMANDS import after hint extraction * test(node-host): drop imports orphaned by removed error-code test
28 lines
1008 B
TypeScript
28 lines
1008 B
TypeScript
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
import { createLinuxNodeCommands } from "./src/commands.js";
|
|
import { createLinuxNodePluginConfigSchema, resolveLinuxNodePluginConfig } from "./src/config.js";
|
|
|
|
export default definePluginEntry({
|
|
id: "linux-node",
|
|
name: "Linux Node",
|
|
description: "Desktop notifications, camera capture, and location for Linux node hosts.",
|
|
configSchema: createLinuxNodePluginConfigSchema,
|
|
register(api) {
|
|
const config = resolveLinuxNodePluginConfig(api.pluginConfig);
|
|
for (const command of createLinuxNodeCommands({ config })) {
|
|
api.registerNodeHostCommand(command);
|
|
}
|
|
|
|
api.registerNodeInvokePolicy({
|
|
commands: ["camera.list", "location.get"],
|
|
defaultPlatforms: ["linux"],
|
|
handle: async (ctx) => await ctx.invokeNode(),
|
|
});
|
|
api.registerNodeInvokePolicy({
|
|
commands: ["camera.snap", "camera.clip"],
|
|
dangerous: true,
|
|
handle: async (ctx) => await ctx.invokeNode(),
|
|
});
|
|
},
|
|
});
|