@livx.cc/agentx 0.99.159 → 0.99.160
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/cli.d.ts +1 -0
- package/dist/cli.js +33 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3955,7 +3955,7 @@ var PermissionPolicy = class {
|
|
|
3955
3955
|
if (this.options.default !== "deny") return void 0;
|
|
3956
3956
|
const gate = async (input) => {
|
|
3957
3957
|
const t = input?.tool_input ?? {}, path = t.file_path ?? t.notebook_path ?? t.path;
|
|
3958
|
-
const d = this.decide({ name: String(input?.tool_name ?? ""), args: { ...t, ...typeof path === "string" ? { path } : {} } });
|
|
3958
|
+
const d = this.decide({ name: String(input?.tool_name ?? "").replace(/^mcp__agentx__/, ""), args: { ...t, ...typeof path === "string" ? { path } : {} } });
|
|
3959
3959
|
return d === "allow" ? {} : { hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision: "deny", permissionDecisionReason: `not on this run's tool allow-list (${input?.tool_name})` } };
|
|
3960
3960
|
};
|
|
3961
3961
|
return { PreToolUse: [{ hooks: [gate] }] };
|