fastgrc-openclaw 1.0.26 → 1.0.28
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 +25 -0
- package/dist/plugin.mjs +25 -0
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -127,7 +127,32 @@ var pluginEntry = {
|
|
|
127
127
|
);
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
+
console.log("[fastgrc] Plugin registered \u2014 before_tool_call hook active");
|
|
131
|
+
const probeEvents = [
|
|
132
|
+
"exec",
|
|
133
|
+
"before_exec",
|
|
134
|
+
"shell",
|
|
135
|
+
"before_shell",
|
|
136
|
+
"command",
|
|
137
|
+
"before_command",
|
|
138
|
+
"run",
|
|
139
|
+
"before_run",
|
|
140
|
+
"tool_call",
|
|
141
|
+
"before_tool",
|
|
142
|
+
"action",
|
|
143
|
+
"before_action",
|
|
144
|
+
"request",
|
|
145
|
+
"before_request",
|
|
146
|
+
"call",
|
|
147
|
+
"before_call"
|
|
148
|
+
];
|
|
149
|
+
for (const evt of probeEvents) {
|
|
150
|
+
api.on(evt, (...args) => {
|
|
151
|
+
console.log(`[fastgrc:hit] ${evt}`, JSON.stringify(args[0])?.slice(0, 120));
|
|
152
|
+
});
|
|
153
|
+
}
|
|
130
154
|
api.on("before_tool_call", async (event, ctx) => {
|
|
155
|
+
console.log(`[fastgrc] before_tool_call fired: ${event.toolName}`);
|
|
131
156
|
const result = await evaluate({
|
|
132
157
|
toolName: event.toolName,
|
|
133
158
|
args: event.params,
|
package/dist/plugin.mjs
CHANGED
|
@@ -91,7 +91,32 @@ var pluginEntry = {
|
|
|
91
91
|
);
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
+
console.log("[fastgrc] Plugin registered \u2014 before_tool_call hook active");
|
|
95
|
+
const probeEvents = [
|
|
96
|
+
"exec",
|
|
97
|
+
"before_exec",
|
|
98
|
+
"shell",
|
|
99
|
+
"before_shell",
|
|
100
|
+
"command",
|
|
101
|
+
"before_command",
|
|
102
|
+
"run",
|
|
103
|
+
"before_run",
|
|
104
|
+
"tool_call",
|
|
105
|
+
"before_tool",
|
|
106
|
+
"action",
|
|
107
|
+
"before_action",
|
|
108
|
+
"request",
|
|
109
|
+
"before_request",
|
|
110
|
+
"call",
|
|
111
|
+
"before_call"
|
|
112
|
+
];
|
|
113
|
+
for (const evt of probeEvents) {
|
|
114
|
+
api.on(evt, (...args) => {
|
|
115
|
+
console.log(`[fastgrc:hit] ${evt}`, JSON.stringify(args[0])?.slice(0, 120));
|
|
116
|
+
});
|
|
117
|
+
}
|
|
94
118
|
api.on("before_tool_call", async (event, ctx) => {
|
|
119
|
+
console.log(`[fastgrc] before_tool_call fired: ${event.toolName}`);
|
|
95
120
|
const result = await evaluate({
|
|
96
121
|
toolName: event.toolName,
|
|
97
122
|
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.28",
|
|
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",
|