@brainervirus/workit-core 8.26.0 → 8.26.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-core",
3
- "version": "8.26.0",
3
+ "version": "8.26.1",
4
4
  "private": false,
5
5
  "description": "Workit shared core — task, policy, evidence, review, decision, worker, and writer state for agentic coding workflows",
6
6
  "keywords": [
@@ -75,12 +75,11 @@ export const isAllowedWorkitCall = (
75
75
 
76
76
  const bypassReason = (flag: string) =>
77
77
  `Workit: \`${flag}\` overrides a Workit gate, so the user decides this call (no allow rule covers it).`;
78
- const EXPANSION_REASON =
79
- "Workit: an expansion before `--` could become a bypass flag, so the user decides this call (no allow rule covers it).";
80
78
 
81
79
  /**
82
80
  * The ask reason for a Workit call in `command` that carries a bypass flag
83
- * before its `--` or a word the shell expands there, or null. Words are read after shell quoting, so `"--unverified"`,
81
+ * before its `--`, or null. A word the shell expands (`$F`, `${F:---unverified}`) is not read: its text is not what runs, and the
82
+ * merge grant and `--reason` stay the gate. Words are read after shell quoting, so `"--unverified"`,
84
83
  * `--unverif''ied` or a tab-separated flag are found where a host's string
85
84
  * rule could miss them. A command the tokenizer cannot analyze is judged on
86
85
  * its text with quotes and backslashes removed.
@@ -102,8 +101,6 @@ export const workitBypassFlag = (
102
101
  const end = words.indexOf("--");
103
102
  const flag = (end < 0 ? words : words.slice(0, end)).find(isBypass);
104
103
  if (flag) return bypassReason(flag.split("=")[0] ?? flag);
105
- const limit = start + 1 + (end < 0 ? words.length : end);
106
- if (segment.expands?.some((index) => index > start && index < limit)) return EXPANSION_REASON;
107
104
  }
108
105
  return null;
109
106
  };