@rex_koh/subagent-budget-guard 0.5.5 → 0.5.6

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.
@@ -2,7 +2,7 @@
2
2
  "name": "subagent-cap",
3
3
  "displayName": "Subagent Cap",
4
4
  "description": "Hard-deny subagent launches, record verified subagent usage, and enforce a session budget against Claude Code's 5-hour rate-limit percentage.",
5
- "version": "0.5.5",
5
+ "version": "0.5.6",
6
6
  "author": {
7
7
  "name": "ClaudeSubAgentSuppressor"
8
8
  },
package/lib/guard.js CHANGED
@@ -764,6 +764,7 @@ export async function handlePostToolUseAgent(input, env = process.env) {
764
764
  usage: response.usage || null,
765
765
  outputFile: response.outputFile || null
766
766
  };
767
+ const resolvedQueuedItem = removeMatchingQueuedAgent(state, input);
767
768
 
768
769
  state.subagents.runs.push(run);
769
770
  if (state.subagents.runs.length > 100) {
@@ -791,6 +792,7 @@ export async function handlePostToolUseAgent(input, env = process.env) {
791
792
  type: 'agent-result',
792
793
  status,
793
794
  agentId: run.agentId,
795
+ queueId: resolvedQueuedItem?.queueId || null,
794
796
  verified,
795
797
  totalTokens: run.totalTokens
796
798
  });
package/lib/verifier.js CHANGED
@@ -111,7 +111,7 @@ export async function runOfflineVerification({
111
111
  entry.source?.package === '@rex_koh/subagent-budget-guard',
112
112
  'marketplace npm package mismatch'
113
113
  );
114
- assert(entry.source?.version === '0.5.5', 'marketplace npm version mismatch');
114
+ assert(entry.source?.version === '0.5.6', 'marketplace npm version mismatch');
115
115
  return marketplacePath;
116
116
  });
117
117
  } else {
@@ -229,7 +229,7 @@ export async function runOfflineVerification({
229
229
  });
230
230
  });
231
231
 
232
- await withCheck(result, 'statusline-budget-blocks', async () => {
232
+ await withCheck(result, 'simulated-statusline-budget-blocks', async () => {
233
233
  return withIsolatedPluginEnv(env, root, async (baseEnv) => {
234
234
  const checkEnv = {
235
235
  ...baseEnv,
@@ -258,7 +258,7 @@ export async function runOfflineVerification({
258
258
  checkEnv
259
259
  );
260
260
  assert(output.stdout?.decision === 'block', 'prompt was not blocked');
261
- return output.stdout.reason;
261
+ return `simulated check only: ${output.stdout.reason}`;
262
262
  });
263
263
  });
264
264
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rex_koh/subagent-budget-guard",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "Claude Code plugin that blocks subagents by default, records verified subagent usage, and enforces 5-hour usage budgets.",
5
5
  "license": "MIT",
6
6
  "author": "ClaudeSubAgentSuppressor",