@staff0rd/assist 0.485.4 → 0.486.1
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/commands/sessions/web/bundle.js +421 -421
- package/dist/index.js +10 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.486.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -15740,16 +15740,14 @@ function parseInput(raw) {
|
|
|
15740
15740
|
}
|
|
15741
15741
|
}
|
|
15742
15742
|
function preToolUseOutput(decision) {
|
|
15743
|
-
if (decision.permissionDecision === "allow")
|
|
15744
|
-
|
|
15745
|
-
|
|
15746
|
-
|
|
15747
|
-
|
|
15748
|
-
|
|
15749
|
-
|
|
15750
|
-
|
|
15751
|
-
}
|
|
15752
|
-
return { decision: "block", reason: decision.permissionDecisionReason };
|
|
15743
|
+
if (decision.permissionDecision === "allow") return void 0;
|
|
15744
|
+
return {
|
|
15745
|
+
hookSpecificOutput: {
|
|
15746
|
+
hookEventName: "PreToolUse",
|
|
15747
|
+
permissionDecision: "deny",
|
|
15748
|
+
permissionDecisionReason: decision.permissionDecisionReason
|
|
15749
|
+
}
|
|
15750
|
+
};
|
|
15753
15751
|
}
|
|
15754
15752
|
function permissionRequestOutput(decision) {
|
|
15755
15753
|
return {
|
|
@@ -15768,7 +15766,7 @@ async function codexHook() {
|
|
|
15768
15766
|
const decision = decideCommand(input.toolName, input.command);
|
|
15769
15767
|
if (!decision) return;
|
|
15770
15768
|
const output = input.event === "PermissionRequest" ? permissionRequestOutput(decision) : preToolUseOutput(decision);
|
|
15771
|
-
console.log(JSON.stringify(output));
|
|
15769
|
+
if (output) console.log(JSON.stringify(output));
|
|
15772
15770
|
}
|
|
15773
15771
|
|
|
15774
15772
|
// src/commands/registerCodexHook.ts
|