vigiles 27.1.2 → 27.1.3

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.
@@ -124,12 +124,35 @@ function salvageField(block, key) {
124
124
  .replace(/["']$/, "")
125
125
  .trim() || undefined);
126
126
  }
127
- /** Salvage a list field from the raw block (single-line key only). */
127
+ /** Salvage a list field from the raw block (single-line key only).
128
+ *
129
+ * THE WRAPPER QUOTES COME OFF HERE, not in `splitList`, so both paths hand the
130
+ * tokenizer the SAME shape. On valid YAML js-yaml has already removed a scalar's
131
+ * surrounding quotes; only this regex salvage hands them through, and leaving
132
+ * that asymmetry in place made `tools: "Bash(git status *), Read"` tokenize as
133
+ * `Bash(git` · `status` · `*)` · `Read` — the opening YAML quote read as a shell
134
+ * quote, so the parens stopped counting as structure and the grant's own spaces
135
+ * split it. That is the phantom-tool failure #217 warned about, in the
136
+ * false-EXPOSED direction (`bashGrantIsUnbounded` answers "unbounded" when it
137
+ * cannot recognise a grant), and it was a REGRESSION: the older comma-only
138
+ * parser recovered this input correctly.
139
+ *
140
+ * Only a MATCHED pair is stripped, and only when it wraps the whole value — an
141
+ * unbalanced leading quote is left alone rather than guessed at. */
128
142
  function salvageList(block, key) {
129
143
  const match = new RegExp(`^${key}:[ \\t]*(.*)$`, "m").exec(block);
130
144
  if (!match)
131
145
  return null;
132
- return splitList(match[1]);
146
+ return splitList(stripWrapperQuotes(match[1]));
147
+ }
148
+ /** Remove ONE matched pair of quotes wrapping an entire scalar. */
149
+ function stripWrapperQuotes(raw) {
150
+ const v = raw.trim();
151
+ const q = v[0];
152
+ if ((q === '"' || q === "'") && v.length >= 2 && v[v.length - 1] === q) {
153
+ return v.slice(1, -1);
154
+ }
155
+ return v;
133
156
  }
134
157
  /**
135
158
  * Split a tool-list string into trimmed, de-quoted tokens.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vigiles",
3
- "version": "27.1.2",
3
+ "version": "27.1.3",
4
4
  "description": "Audit, test and measure the harness your AI agent runs on — grade your CLAUDE.md / AGENTS.md, skills, subagents and hooks, run them against a scripted model, and measure whether they actually fire.",
5
5
  "keywords": [
6
6
  "claude-code",