@brainervirus/workit-claude-code 8.29.2 → 8.31.0

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "workit",
3
3
  "displayName": "Workit",
4
- "version": "8.29.2",
4
+ "version": "8.31.0",
5
5
  "description": "Workflow rails for agentic coding: task context on every session, branch policy on shell commands, and the workit method skills",
6
6
  "author": {
7
7
  "name": "BrainerVirus"
@@ -301,9 +301,20 @@ const fastAllow = (() => {
301
301
  return true;
302
302
  return !implementer && !RAW_TOOLS.test(command) && !hasTaskStore(String(value.cwd ?? "."));
303
303
  }
304
- // A subagent spawn that names its model has no default to fill (hooks/agent-model.ts).
305
- if (value.tool_name === "Agent" || value.tool_name === "Task")
306
- return typeof value.tool_input?.model === "string" && value.tool_input.model.trim() !== "";
304
+ // A subagent spawn that names its model has no default to fill (hooks/agent-model.ts);
305
+ // an implementer spawn with isolation or without a brief meets the spawn gate
306
+ // (hooks/spawn-gate.ts, the same WORKTREE test).
307
+ if (value.tool_name === "Agent" || value.tool_name === "Task") {
308
+ const spawn = value.tool_input ?? {};
309
+ if (
310
+ spawn.subagent_type === "workit:implementer" &&
311
+ (spawn.isolation !== undefined ||
312
+ typeof spawn.prompt !== "string" ||
313
+ !/^WORKTREE:[ \t]*(?!not made yet)\S(?![^\n]*not made yet)/mu.test(spawn.prompt))
314
+ )
315
+ return false;
316
+ return typeof spawn.model === "string" && spawn.model.trim() !== "";
317
+ }
307
318
  return EDITS.has(value.tool_name) && !implementer && !hasTaskStore(String(value.cwd ?? "."));
308
319
  } catch {
309
320
  return false;