@brainervirus/workit-claude-code 8.4.1 → 8.5.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.4.1",
4
+ "version": "8.5.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"
@@ -36,10 +36,13 @@ const failOpen = (reason) => {
36
36
  // answer `{}` before the runtime loads: a shell command with no git/gh/glab,
37
37
  // no redirect and no writing verb can need none of them; with no Workit task
38
38
  // store for the checkout there is no task to gate a non-git edit on; and a
39
- // PostToolUse only matters after a `git commit`.
39
+ // PostToolUse only matters after a `git commit`. A workit delivery verb
40
+ // (`workit pr create`, `workit ci wait`) may get the workit-ship nudge.
40
41
  let payload = "";
41
42
  for await (const chunk of process.stdin) payload += String(chunk);
42
43
  const RAW_TOOLS = /\b(?:git|gh|glab)\b/;
44
+ const WORKIT_DELIVERY =
45
+ /(?:^|[\s;&|(])(?:\S*[\\/])?workit(?:-cli)?\s+(?:pr (?:create|merge)|ci wait|git push)\b/;
43
46
  const MAYBE_GATED =
44
47
  /\b(?:git|gh|glab)\b|>|\b(?:tee|touch|mkdir|rm|rmdir|mv|cp|truncate|install|ln|patch|dd|sed|perl|set-content|add-content|out-file|new-item|ni|remove-item|del|copy-item|move-item)\b/i;
45
48
  const SHELLS = new Set(["Bash", "PowerShell"]);
@@ -81,6 +84,7 @@ const fastAllow = (() => {
81
84
  return typeof command === "string" && !/\bcommit\b/.test(command);
82
85
  if (value?.hook_event_name !== "PreToolUse") return false;
83
86
  if (SHELLS.has(value.tool_name) && typeof command === "string") {
87
+ if (WORKIT_DELIVERY.test(command)) return false;
84
88
  if (!MAYBE_GATED.test(command)) return true;
85
89
  return !RAW_TOOLS.test(command) && !hasTaskStore(String(value.cwd ?? "."));
86
90
  }