@rex_koh/subagent-budget-guard 0.5.4 → 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.4",
5
+ "version": "0.5.6",
6
6
  "author": {
7
7
  "name": "ClaudeSubAgentSuppressor"
8
8
  },
package/README.md CHANGED
@@ -50,7 +50,7 @@ The plugin is strict before setup: `max_concurrent_subagents` defaults to `0`, s
50
50
 
51
51
  ```text
52
52
  max_concurrent_subagents=1
53
- max_subagent_tokens_per_session=100000
53
+ max_subagent_tokens_per_session=500000
54
54
  subagent_token_warning_threshold_percent=95
55
55
  session_five_hour_budget_percent=25
56
56
  absolute_five_hour_ceiling_percent=95
package/lib/guard.js CHANGED
@@ -33,7 +33,7 @@ export const DEFAULT_CONFIG = Object.freeze({
33
33
  export const SETUP_CONFIG = Object.freeze({
34
34
  ...DEFAULT_CONFIG,
35
35
  max_concurrent_subagents: 1,
36
- max_subagent_tokens_per_session: 100000
36
+ max_subagent_tokens_per_session: 500000
37
37
  });
38
38
 
39
39
  export const CONFIG_KEYS = Object.freeze(Object.keys(DEFAULT_CONFIG));
@@ -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.4', '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.4",
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",
@@ -10,7 +10,7 @@ Recommended defaults:
10
10
 
11
11
  ```text
12
12
  max_concurrent_subagents=1
13
- max_subagent_tokens_per_session=100000
13
+ max_subagent_tokens_per_session=500000
14
14
  subagent_token_warning_threshold_percent=95
15
15
  session_five_hour_budget_percent=25
16
16
  absolute_five_hour_ceiling_percent=95