@red-codes/agentguard 1.1.2 → 1.1.3

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/README.md CHANGED
@@ -157,6 +157,17 @@ npm install @red-codes/core # Types, actions, utilities
157
157
  npm install @red-codes/events # Canonical event model
158
158
  ```
159
159
 
160
+ ## RTK Token Optimization
161
+
162
+ AgentGuard integrates with [RTK](https://github.com/rtk-ai/rtk) to reduce token consumption by 60-90%. When RTK is installed, shell commands are automatically rewritten for compact output after governance approval.
163
+
164
+ ```bash
165
+ npm install -g @anthropic-ai/rtk # Install RTK (optional)
166
+ agentguard status # Confirms: ⚡ Token optimization active
167
+ ```
168
+
169
+ Works with git, npm, cargo, tsc, docker, kubectl, and more. No configuration needed — AgentGuard detects RTK automatically.
170
+
160
171
  ## Agent Swarm
161
172
 
162
173
  AgentGuard ships with a 26-agent autonomous development swarm:
@@ -170,7 +181,7 @@ Agents handle implementation, code review, CI triage, security audits, planning,
170
181
  ## Links
171
182
 
172
183
  - [GitHub](https://github.com/AgentGuardHQ/agentguard)
173
- - [Documentation](https://agentguardhq.github.io/agent-guard/)
184
+ - [Documentation](https://agentguardhq.github.io/agentguard/)
174
185
  - [Architecture](https://github.com/AgentGuardHQ/agentguard/blob/main/docs/unified-architecture.md)
175
186
  - [Roadmap](https://github.com/AgentGuardHQ/agentguard/blob/main/ROADMAP.md)
176
187
 
package/dist/bin.js CHANGED
@@ -27540,7 +27540,8 @@ async function claudeHook(hookType, extraArgs = []) {
27540
27540
  if (isPreToolUse) {
27541
27541
  const sessionId = data.session_id || process.env.CLAUDE_SESSION_ID || void 0;
27542
27542
  const payload = { ...data, session_id: sessionId };
27543
- await handlePreToolUse(payload, extraArgs);
27543
+ const denied = await handlePreToolUse(payload, extraArgs);
27544
+ process.exit(denied ? 2 : 0);
27544
27545
  } else {
27545
27546
  handlePostToolUse(data, extraArgs);
27546
27547
  }
@@ -27607,7 +27608,9 @@ async function handlePreToolUse(payload, cliArgs) {
27607
27608
  if (response) {
27608
27609
  process.stdout.write(response);
27609
27610
  }
27611
+ return true;
27610
27612
  }
27613
+ return false;
27611
27614
  }
27612
27615
  function handlePostToolUse(data, cliArgs = []) {
27613
27616
  if (data.tool_name !== "Bash") return;
@@ -29045,7 +29048,7 @@ async function main() {
29045
29048
  }
29046
29049
  case "--version":
29047
29050
  case "-v": {
29048
- console.log(`agentguard v${"1.1.2"}`);
29051
+ console.log(`agentguard v${"1.1.3"}`);
29049
29052
  break;
29050
29053
  }
29051
29054
  case "help":