fastgrc-openclaw 1.0.18 → 1.0.19
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/bin.js +5 -4
- package/dist/bin.mjs +5 -4
- package/dist/plugin.js +1 -7
- package/dist/plugin.mjs +1 -7
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -152,8 +152,9 @@ if (cmd === "unset-policy") {
|
|
|
152
152
|
if (cmd === "install-hook") {
|
|
153
153
|
const targetDir = arg || process.cwd();
|
|
154
154
|
const hookMdPath = path.join(targetDir, "HOOK.md");
|
|
155
|
+
const binPath = process.argv[1];
|
|
155
156
|
const homeDir = os.homedir();
|
|
156
|
-
const handlerStr = `HOME=${homeDir}
|
|
157
|
+
const handlerStr = `HOME=${homeDir} node ${binPath}`;
|
|
157
158
|
const HOOK_ENTRY = ` - matcher: PreToolUse
|
|
158
159
|
handler: "${handlerStr}"
|
|
159
160
|
`;
|
|
@@ -176,13 +177,13 @@ Restart OpenClaw \u2014 FastGRC will evaluate every tool call.
|
|
|
176
177
|
`);
|
|
177
178
|
process.exit(0);
|
|
178
179
|
}
|
|
179
|
-
if (existing.includes("fastgrc-hook")) {
|
|
180
|
+
if (existing.includes("fastgrc-hook") || existing.includes("fastgrc-openclaw")) {
|
|
180
181
|
const patched = existing.replace(
|
|
181
|
-
/handler:\s*"[^"]*fastgrc-hook[^"]*"/,
|
|
182
|
+
/handler:\s*"[^"]*(?:fastgrc-hook|fastgrc-openclaw)[^"]*"/,
|
|
182
183
|
`handler: "${handlerStr}"`
|
|
183
184
|
);
|
|
184
185
|
fs.writeFileSync(hookMdPath, patched, "utf8");
|
|
185
|
-
process.stdout.write(`\u2713 Updated handler in ${hookMdPath} \u2014
|
|
186
|
+
process.stdout.write(`\u2713 Updated handler in ${hookMdPath} \u2014 now uses absolute path.
|
|
186
187
|
|
|
187
188
|
Restart OpenClaw to activate.
|
|
188
189
|
`);
|
package/dist/bin.mjs
CHANGED
|
@@ -129,8 +129,9 @@ if (cmd === "unset-policy") {
|
|
|
129
129
|
if (cmd === "install-hook") {
|
|
130
130
|
const targetDir = arg || process.cwd();
|
|
131
131
|
const hookMdPath = path.join(targetDir, "HOOK.md");
|
|
132
|
+
const binPath = process.argv[1];
|
|
132
133
|
const homeDir = os.homedir();
|
|
133
|
-
const handlerStr = `HOME=${homeDir}
|
|
134
|
+
const handlerStr = `HOME=${homeDir} node ${binPath}`;
|
|
134
135
|
const HOOK_ENTRY = ` - matcher: PreToolUse
|
|
135
136
|
handler: "${handlerStr}"
|
|
136
137
|
`;
|
|
@@ -153,13 +154,13 @@ Restart OpenClaw \u2014 FastGRC will evaluate every tool call.
|
|
|
153
154
|
`);
|
|
154
155
|
process.exit(0);
|
|
155
156
|
}
|
|
156
|
-
if (existing.includes("fastgrc-hook")) {
|
|
157
|
+
if (existing.includes("fastgrc-hook") || existing.includes("fastgrc-openclaw")) {
|
|
157
158
|
const patched = existing.replace(
|
|
158
|
-
/handler:\s*"[^"]*fastgrc-hook[^"]*"/,
|
|
159
|
+
/handler:\s*"[^"]*(?:fastgrc-hook|fastgrc-openclaw)[^"]*"/,
|
|
159
160
|
`handler: "${handlerStr}"`
|
|
160
161
|
);
|
|
161
162
|
fs.writeFileSync(hookMdPath, patched, "utf8");
|
|
162
|
-
process.stdout.write(`\u2713 Updated handler in ${hookMdPath} \u2014
|
|
163
|
+
process.stdout.write(`\u2713 Updated handler in ${hookMdPath} \u2014 now uses absolute path.
|
|
163
164
|
|
|
164
165
|
Restart OpenClaw to activate.
|
|
165
166
|
`);
|
package/dist/plugin.js
CHANGED
|
@@ -111,11 +111,10 @@ args: ${JSON.stringify(args)}`;
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
// src/plugin.ts
|
|
114
|
-
process.stderr.write("[fastgrc] plugin.js module loaded\n");
|
|
115
114
|
var DEFAULT_BASE_URL2 = "https://app.fastgrc.ai";
|
|
116
115
|
var DEFAULT_TIMEOUT_MS2 = 3e3;
|
|
117
116
|
var pluginEntry = {
|
|
118
|
-
id: "fastgrc",
|
|
117
|
+
id: "fastgrc-openclaw",
|
|
119
118
|
name: "FastGRC Policy Router",
|
|
120
119
|
description: "Evaluate every tool call against your FastGRC compliance policy before it executes. Blocks violations, flags drift, builds an audit trail.",
|
|
121
120
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -127,11 +126,7 @@ var pluginEntry = {
|
|
|
127
126
|
);
|
|
128
127
|
return;
|
|
129
128
|
}
|
|
130
|
-
process.stderr.write(`[fastgrc] register called \u2014 policyId: ${policyId ?? "none"}
|
|
131
|
-
`);
|
|
132
129
|
api.on("before_tool_call", async (event, ctx) => {
|
|
133
|
-
process.stderr.write(`[fastgrc] before_tool_call fired \u2014 tool: ${event.toolName}
|
|
134
|
-
`);
|
|
135
130
|
const result = await evaluate({
|
|
136
131
|
toolName: event.toolName,
|
|
137
132
|
args: event.params,
|
|
@@ -163,6 +158,5 @@ var pluginEntry = {
|
|
|
163
158
|
});
|
|
164
159
|
}
|
|
165
160
|
};
|
|
166
|
-
process.stderr.write("[fastgrc] plugin export shape: " + JSON.stringify({ type: typeof pluginEntry, registerType: typeof pluginEntry.register }) + "\n");
|
|
167
161
|
var plugin_default = pluginEntry;
|
|
168
162
|
module.exports = module.exports.default ?? module.exports;
|
package/dist/plugin.mjs
CHANGED
|
@@ -75,11 +75,10 @@ args: ${JSON.stringify(args)}`;
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// src/plugin.ts
|
|
78
|
-
process.stderr.write("[fastgrc] plugin.js module loaded\n");
|
|
79
78
|
var DEFAULT_BASE_URL2 = "https://app.fastgrc.ai";
|
|
80
79
|
var DEFAULT_TIMEOUT_MS2 = 3e3;
|
|
81
80
|
var pluginEntry = {
|
|
82
|
-
id: "fastgrc",
|
|
81
|
+
id: "fastgrc-openclaw",
|
|
83
82
|
name: "FastGRC Policy Router",
|
|
84
83
|
description: "Evaluate every tool call against your FastGRC compliance policy before it executes. Blocks violations, flags drift, builds an audit trail.",
|
|
85
84
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -91,11 +90,7 @@ var pluginEntry = {
|
|
|
91
90
|
);
|
|
92
91
|
return;
|
|
93
92
|
}
|
|
94
|
-
process.stderr.write(`[fastgrc] register called \u2014 policyId: ${policyId ?? "none"}
|
|
95
|
-
`);
|
|
96
93
|
api.on("before_tool_call", async (event, ctx) => {
|
|
97
|
-
process.stderr.write(`[fastgrc] before_tool_call fired \u2014 tool: ${event.toolName}
|
|
98
|
-
`);
|
|
99
94
|
const result = await evaluate({
|
|
100
95
|
toolName: event.toolName,
|
|
101
96
|
args: event.params,
|
|
@@ -127,7 +122,6 @@ var pluginEntry = {
|
|
|
127
122
|
});
|
|
128
123
|
}
|
|
129
124
|
};
|
|
130
|
-
process.stderr.write("[fastgrc] plugin export shape: " + JSON.stringify({ type: typeof pluginEntry, registerType: typeof pluginEntry.register }) + "\n");
|
|
131
125
|
var plugin_default = pluginEntry;
|
|
132
126
|
export {
|
|
133
127
|
plugin_default as default
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "fastgrc",
|
|
2
|
+
"id": "fastgrc-openclaw",
|
|
3
3
|
"name": "FastGRC Policy Router",
|
|
4
4
|
"description": "Evaluate every tool call against your FastGRC compliance policy before it executes. Blocks violations, flags drift, builds an audit trail.",
|
|
5
5
|
"extensions": ["./dist/plugin.js"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fastgrc-openclaw",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
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",
|