fullcourtdefense-cli 1.26.8 → 1.26.9

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.
@@ -37,9 +37,12 @@ export interface SpoolEvent {
37
37
  */
38
38
  export type VerdictPath = 'ipc' | 'local' | 'fail_open' | 'gateway';
39
39
  /**
40
- * Compact JSON of the command/path/query the agent attempted. The console
41
- * Details column renders this as the labeled Command / Query / URL / File
42
- * row. Truncated to 500 chars so it survives backend sanitize().
40
+ * Compact JSON of the command/path/query/args the agent attempted. The console
41
+ * Details column renders this as labeled Command / Query / URL / File / Args
42
+ * rows. Truncated to 500 chars so it survives backend sanitize().
43
+ *
44
+ * Known keys are preferred. Other primitive args (action, selector, prompt, …)
45
+ * are included so MCP tools that are not a shell/file still show what ran.
43
46
  */
44
47
  export declare function evidenceFromToolArgs(toolArgs: Record<string, unknown> | undefined): string | undefined;
45
48
  interface VerdictTiming {
package/dist/telemetry.js CHANGED
@@ -73,21 +73,53 @@ const SPOOL_TRIM_BYTES = 2 * 1024 * 1024;
73
73
  const ACTION_EVIDENCE_KEYS = [
74
74
  'command', 'cmd', 'commandLine', 'script', 'query', 'sql', 'url',
75
75
  'path', 'file_path', 'filePath', 'file', 'target',
76
+ 'pattern', 'glob', 'search', 'q',
76
77
  ];
78
+ /** Noise / secrets — never stamp these as activity evidence. */
79
+ const EVIDENCE_SKIP_KEYS = /^(cwd|pwd|env|environment|headers|cookie|cookies|authorization|password|passwd|secret|token|api[_-]?key|private[_-]?key|session|retryCount|timeoutMs|timeout)$/i;
80
+ function stringifyEvidenceValue(value) {
81
+ if (typeof value === 'string' && value.trim())
82
+ return value.trim().slice(0, 480);
83
+ if (typeof value === 'number' && Number.isFinite(value))
84
+ return String(value);
85
+ if (typeof value === 'boolean')
86
+ return value ? 'true' : 'false';
87
+ if (Array.isArray(value) || (value && typeof value === 'object')) {
88
+ try {
89
+ const json = JSON.stringify(value);
90
+ return json && json !== '{}' && json !== '[]' ? json.slice(0, 240) : undefined;
91
+ }
92
+ catch {
93
+ return undefined;
94
+ }
95
+ }
96
+ return undefined;
97
+ }
77
98
  /**
78
- * Compact JSON of the command/path/query the agent attempted. The console
79
- * Details column renders this as the labeled Command / Query / URL / File
80
- * row. Truncated to 500 chars so it survives backend sanitize().
99
+ * Compact JSON of the command/path/query/args the agent attempted. The console
100
+ * Details column renders this as labeled Command / Query / URL / File / Args
101
+ * rows. Truncated to 500 chars so it survives backend sanitize().
102
+ *
103
+ * Known keys are preferred. Other primitive args (action, selector, prompt, …)
104
+ * are included so MCP tools that are not a shell/file still show what ran.
81
105
  */
82
106
  function evidenceFromToolArgs(toolArgs) {
83
107
  if (!toolArgs)
84
108
  return undefined;
85
109
  const picked = {};
86
110
  for (const key of ACTION_EVIDENCE_KEYS) {
87
- const value = toolArgs[key];
88
- if (typeof value === 'string' && value.trim()) {
89
- picked[key] = value.trim().slice(0, 480);
90
- }
111
+ const text = stringifyEvidenceValue(toolArgs[key]);
112
+ if (text)
113
+ picked[key] = text;
114
+ }
115
+ for (const [key, value] of Object.entries(toolArgs)) {
116
+ if (picked[key] || EVIDENCE_SKIP_KEYS.test(key))
117
+ continue;
118
+ if (Object.keys(picked).length >= 8)
119
+ break;
120
+ const text = stringifyEvidenceValue(value);
121
+ if (text)
122
+ picked[key] = text;
91
123
  }
92
124
  if (Object.keys(picked).length === 0)
93
125
  return undefined;
package/dist/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "1.26.8"
2
+ "version": "1.26.9"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fullcourtdefense-cli",
3
- "version": "1.26.8",
3
+ "version": "1.26.9",
4
4
  "description": "Full Court Defense CLI — security scanning for AI agents from your terminal",
5
5
  "main": "dist/index.js",
6
6
  "bin": {