@vibecodr/cli 0.2.7 → 0.2.8

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.
@@ -29,11 +29,20 @@ const SENSITIVE_STRING_PATTERNS = [
29
29
  function isSensitiveKey(key) {
30
30
  return SENSITIVE_KEY_PATTERNS.some((pattern) => pattern.test(key));
31
31
  }
32
- export function redactForOutput(value, keyHint) {
33
- if (keyHint && isSensitiveKey(keyHint))
32
+ function isCanonicalOperationDiagnosticsCode(path) {
33
+ if (path.length < 4)
34
+ return false;
35
+ const tail = path.slice(-4);
36
+ return tail[0] === "structuredContent"
37
+ && tail[1] === "operation"
38
+ && tail[2] === "diagnostics"
39
+ && /^code$/i.test(tail[3] ?? "");
40
+ }
41
+ export function redactForOutput(value, keyHint, path = []) {
42
+ if (keyHint && isSensitiveKey(keyHint) && !isCanonicalOperationDiagnosticsCode(path))
34
43
  return REDACTED;
35
44
  if (Array.isArray(value))
36
- return value.map((item) => redactForOutput(item));
45
+ return value.map((item) => redactForOutput(item, undefined, path));
37
46
  if (typeof value === "string" && SENSITIVE_STRING_PATTERNS.some((pattern) => pattern.test(value))) {
38
47
  return REDACTED;
39
48
  }
@@ -41,7 +50,7 @@ export function redactForOutput(value, keyHint) {
41
50
  return value;
42
51
  const output = {};
43
52
  for (const [key, nested] of Object.entries(value)) {
44
- output[key] = redactForOutput(nested, key);
53
+ output[key] = redactForOutput(nested, key, [...path, key]);
45
54
  }
46
55
  return output;
47
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecodr/cli",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Vibecodr CLI for login, live MCP tool discovery, and live tool invocation.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",