@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/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.485.4",
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
- return {
15745
- hookSpecificOutput: {
15746
- hookEventName: "PreToolUse",
15747
- permissionDecision: "allow",
15748
- permissionDecisionReason: decision.permissionDecisionReason
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.485.4",
3
+ "version": "0.486.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {