fastgrc-openclaw 1.0.26 → 1.0.27
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/plugin.js +11 -0
- package/dist/plugin.mjs +11 -0
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -127,7 +127,18 @@ var pluginEntry = {
|
|
|
127
127
|
);
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
+
console.log("[fastgrc] Plugin registered \u2014 before_tool_call hook active");
|
|
131
|
+
const _origOn = api.on.bind(api);
|
|
132
|
+
api.on = (event, handler) => {
|
|
133
|
+
_origOn(event, handler);
|
|
134
|
+
};
|
|
135
|
+
if (typeof api.onAny === "function") {
|
|
136
|
+
api.onAny((event, ...args) => {
|
|
137
|
+
console.log(`[fastgrc:event] ${event}`, JSON.stringify(args[0])?.slice(0, 120));
|
|
138
|
+
});
|
|
139
|
+
}
|
|
130
140
|
api.on("before_tool_call", async (event, ctx) => {
|
|
141
|
+
console.log(`[fastgrc] before_tool_call fired: ${event.toolName}`);
|
|
131
142
|
const result = await evaluate({
|
|
132
143
|
toolName: event.toolName,
|
|
133
144
|
args: event.params,
|
package/dist/plugin.mjs
CHANGED
|
@@ -91,7 +91,18 @@ var pluginEntry = {
|
|
|
91
91
|
);
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
+
console.log("[fastgrc] Plugin registered \u2014 before_tool_call hook active");
|
|
95
|
+
const _origOn = api.on.bind(api);
|
|
96
|
+
api.on = (event, handler) => {
|
|
97
|
+
_origOn(event, handler);
|
|
98
|
+
};
|
|
99
|
+
if (typeof api.onAny === "function") {
|
|
100
|
+
api.onAny((event, ...args) => {
|
|
101
|
+
console.log(`[fastgrc:event] ${event}`, JSON.stringify(args[0])?.slice(0, 120));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
94
104
|
api.on("before_tool_call", async (event, ctx) => {
|
|
105
|
+
console.log(`[fastgrc] before_tool_call fired: ${event.toolName}`);
|
|
95
106
|
const result = await evaluate({
|
|
96
107
|
toolName: event.toolName,
|
|
97
108
|
args: event.params,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fastgrc-openclaw",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"description": "FastGRC agent compliance plugin for OpenClaw — evaluates every tool call against your policy before it executes",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|