@contextableai/clawg-ui 0.3.0 → 0.3.2

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/index.js CHANGED
@@ -91,8 +91,10 @@ const plugin = {
91
91
  register(api) {
92
92
  api.registerChannel({ plugin: aguiChannelPlugin });
93
93
  api.registerTool(clawgUiToolFactory);
94
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- auth not yet in SDK typings but required at runtime
94
95
  api.registerHttpRoute({
95
96
  path: "/v1/clawg-ui",
97
+ auth: "plugin",
96
98
  handler: createAguiHttpHandler(api),
97
99
  });
98
100
  api.on("before_tool_call", handleBeforeToolCall);
@@ -106,7 +108,8 @@ const plugin = {
106
108
  .command("devices")
107
109
  .description("List approved devices")
108
110
  .action(async () => {
109
- const devices = await api.runtime.channel.pairing.readAllowFromStore("clawg-ui");
111
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- SDK types lag behind runtime
112
+ const devices = await api.runtime.channel.pairing.readAllowFromStore({ channel: "clawg-ui" });
110
113
  if (devices.length === 0) {
111
114
  console.log("No approved devices.");
112
115
  return;
@@ -226,8 +226,8 @@ export function createAguiHttpHandler(api) {
226
226
  // ---------------------------------------------------------------------------
227
227
  // Pairing check: verify device is approved
228
228
  // ---------------------------------------------------------------------------
229
- const storeAllowFrom = await runtime.channel.pairing
230
- .readAllowFromStore("clawg-ui")
229
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- SDK types lag behind runtime; object form required in 2026.3.7+
230
+ const storeAllowFrom = await runtime.channel.pairing.readAllowFromStore({ channel: "clawg-ui" })
231
231
  .catch(() => []);
232
232
  const normalizedAllowFrom = storeAllowFrom.map((e) => e.replace(/^clawg-ui:/i, "").toLowerCase());
233
233
  const allowed = normalizedAllowFrom.includes(deviceId.toLowerCase());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextableai/clawg-ui",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "AG-UI protocol channel plugin for OpenClaw — connect CopilotKit and AG-UI clients to your OpenClaw gateway",
5
5
  "type": "module",
6
6
  "license": "MIT",