tauri-agent-tools 0.8.0 → 0.9.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.
- package/.agents/skills/tauri-agent-tools/SKILL.md +12 -4
- package/.agents/skills/tauri-bridge-setup/SKILL.md +6 -2
- package/.agents/skills/tauri-debug-quickstart/SKILL.md +3 -2
- package/README.md +9 -2
- package/dist/bridge/client.d.ts +13 -0
- package/dist/bridge/client.js +18 -2
- package/dist/bridge/client.js.map +1 -1
- package/dist/bridge/tokenDiscovery.js +5 -2
- package/dist/bridge/tokenDiscovery.js.map +1 -1
- package/dist/commands/bundle.js +10 -49
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/capture.d.ts +11 -0
- package/dist/commands/capture.js +161 -156
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/check.js +2 -2
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/consoleMonitor.js +3 -3
- package/dist/commands/consoleMonitor.js.map +1 -1
- package/dist/commands/dom.js +2 -2
- package/dist/commands/dom.js.map +1 -1
- package/dist/commands/interact/click.js +2 -2
- package/dist/commands/interact/click.js.map +1 -1
- package/dist/commands/interact/scroll.js +3 -3
- package/dist/commands/interact/scroll.js.map +1 -1
- package/dist/commands/ipcMonitor.js +4 -4
- package/dist/commands/ipcMonitor.js.map +1 -1
- package/dist/commands/logs.d.ts +28 -0
- package/dist/commands/logs.js +117 -31
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/mutations.js +3 -3
- package/dist/commands/mutations.js.map +1 -1
- package/dist/commands/probe.js +49 -9
- package/dist/commands/probe.js.map +1 -1
- package/dist/commands/rustLogs.js +3 -3
- package/dist/commands/rustLogs.js.map +1 -1
- package/dist/commands/screenshot.js +2 -2
- package/dist/commands/screenshot.js.map +1 -1
- package/dist/commands/shared.d.ts +6 -0
- package/dist/commands/shared.js +10 -2
- package/dist/commands/shared.js.map +1 -1
- package/dist/commands/sidecarReplay.js +46 -1
- package/dist/commands/sidecarReplay.js.map +1 -1
- package/dist/commands/sidecarTap.js +23 -8
- package/dist/commands/sidecarTap.js.map +1 -1
- package/dist/commands/snapshot.js +2 -2
- package/dist/commands/snapshot.js.map +1 -1
- package/dist/commands/storeInspect.js +2 -2
- package/dist/commands/storeInspect.js.map +1 -1
- package/dist/commands/wait.js +3 -3
- package/dist/commands/wait.js.map +1 -1
- package/dist/schemas/bridge.d.ts +14 -0
- package/dist/schemas/bridge.js +3 -0
- package/dist/schemas/bridge.js.map +1 -1
- package/dist/util/redactText.d.ts +23 -0
- package/dist/util/redactText.js +377 -0
- package/dist/util/redactText.js.map +1 -0
- package/examples/tauri-bridge/src/dev_bridge.rs +199 -12
- package/package.json +3 -2
- package/rust-bridge/README.md +2 -2
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import { readdir, readFile, stat, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { Buffer } from 'node:buffer';
|
|
5
|
+
const REDACTED = '[REDACTED]';
|
|
6
|
+
/**
|
|
7
|
+
* Generated-artifact filenames that may legitimately look high-entropy
|
|
8
|
+
* (timestamped report/capture names embedded in logs or markdown). Matches
|
|
9
|
+
* are exempt from the residual-secret entropy gate. App-specific artifact
|
|
10
|
+
* name patterns can be added per call via `scanResidualSecrets` opts.
|
|
11
|
+
*/
|
|
12
|
+
const DEFAULT_ARTIFACT_NAME_ALLOWLIST = [
|
|
13
|
+
/^\d{8}-\d{6}-[a-z0-9][a-z0-9.-]*\.(?:md|html|json|ndjson|jsonl)$/i,
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* Agent-CLI config dirs masked as a pre-pass before the generic home-path
|
|
17
|
+
* pattern (catches them even in contexts the tilde/absolute pattern misses).
|
|
18
|
+
*/
|
|
19
|
+
const AGENT_HOME_DIRS = ['.claude', '.codex'];
|
|
20
|
+
const TEXT_FILE_RE = /\.(json|ndjson|txt|md|log|html)$/i;
|
|
21
|
+
const IMAGE_FILE_RE = /\.(png|jpe?g|webp|gif|bmp|tiff?)$/i;
|
|
22
|
+
const SECRET_KEY_RE = /token|secret|password|api[_-]?key|authorization|cookie|email|credential|(?:_key|_token|_secret|_password|_credential)$/i;
|
|
23
|
+
const TEXT_PATTERNS = [
|
|
24
|
+
{
|
|
25
|
+
re: /\bBearer\s+[A-Za-z0-9._~+/-]+=*/gi,
|
|
26
|
+
replacement: 'Bearer [REDACTED]',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
re: /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,
|
|
30
|
+
replacement: REDACTED,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
re: /([?&](?:token|api[_-]?key|secret|password|authorization)=)[^&\s"'<>]+/gi,
|
|
34
|
+
replacement: '$1[REDACTED]',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
re: /(^|[^A-Za-z0-9])((?:(?:[A-Za-z0-9]+_)*(?:API_KEY|ACCESS_KEY|SECRET_ACCESS_KEY|KEY|TOKEN|SECRET|PASSWORD|CREDENTIAL)|token|api[_-]?key|secret|password|cookie)\s*[:=]\s*)["']?[^"',\s<>&]+["']?/gi,
|
|
38
|
+
replacement: (_match, prefix, key) => `${prefix}${key}${REDACTED}`,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
re: /(["'](?:[^"']*(?:token|api[_-]?key|secret|password|authorization|cookie|credential|email)[^"']*)["']\s*:\s*")[^"]*(")/gi,
|
|
42
|
+
replacement: '$1[REDACTED]$2',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
re: /\b(?:AKIA|ASIA)[A-Z0-9]{16}\b/g,
|
|
46
|
+
replacement: '[REDACTED_AWS_ACCESS_KEY]',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
re: /(?<!\d)(?:\d{1,3}\.){3}\d{1,3}(?!\d)/g,
|
|
50
|
+
replacement: '[REDACTED_IP]',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
// HH:MM:SS clock times (incl. inside ISO-8601 timestamps) share the
|
|
54
|
+
// colon-group shape, so only redact candidates that look like real IPv6:
|
|
55
|
+
// a `::`, a hex letter, or a group longer than 2 digits.
|
|
56
|
+
re: /(?<![A-F0-9:])(?:[A-F0-9]{1,4}:){2,7}:?(?:[A-F0-9]{1,4})?(?![A-F0-9:])/gi,
|
|
57
|
+
replacement: (match) => match.includes('::') || /[a-f]/i.test(match) || match.split(':').some((group) => group.length > 2)
|
|
58
|
+
? '[REDACTED_IP]'
|
|
59
|
+
: match,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
re: /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi,
|
|
63
|
+
replacement: '[REDACTED_EMAIL]',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
re: /(?<!\d)(?:\+?1[-.\s]?)?(?:\(?\d{3}\)?[-.\s]?)\d{3}[-.\s]?\d{4}(?!\d)/g,
|
|
67
|
+
replacement: '[REDACTED_PHONE]',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
// A tilde only counts as a home path when it starts one (`~/...`) —
|
|
71
|
+
// bare `~` is common in prose ("~10s", "~~strikethrough~~").
|
|
72
|
+
re: /(?:~(?=\/)|\/Users\/[^/\s"'<>]+|\/home\/[^/\s"'<>]+)(?:\/[^\s"'<>]*)?/g,
|
|
73
|
+
replacement: '[HOME]',
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
const RESIDUAL_SECRET_PATTERNS = [
|
|
77
|
+
{ prefix: 'sk-ant-', re: /sk-ant-[A-Za-z0-9_-]{12,}/g },
|
|
78
|
+
{ prefix: 'sk-', re: /sk-[A-Za-z0-9_-]{16,}/g },
|
|
79
|
+
{ prefix: 'ghp_', re: /ghp_[A-Za-z0-9_]{16,}/g },
|
|
80
|
+
{ prefix: 'xoxb-', re: /xoxb-[A-Za-z0-9-]{16,}/g },
|
|
81
|
+
{ prefix: 'AKIA', re: /AKIA[A-Z0-9]{16}/g },
|
|
82
|
+
{ prefix: 'ASIA', re: /ASIA[A-Z0-9]{16}/g },
|
|
83
|
+
{ prefix: 'Authorization:', re: /Authorization:\s*(?:Bearer\s+)?[A-Za-z0-9._~+/-]{8,}=*/gi },
|
|
84
|
+
];
|
|
85
|
+
export function redactText(input) {
|
|
86
|
+
return redactTextWithStats(input).value;
|
|
87
|
+
}
|
|
88
|
+
export function redactJson(value) {
|
|
89
|
+
return redactJsonWithStats(value).value;
|
|
90
|
+
}
|
|
91
|
+
export async function redactDir(dir) {
|
|
92
|
+
const result = { redactions: 0, failures: [], warnings: [] };
|
|
93
|
+
const entries = await readdir(dir).catch((error) => {
|
|
94
|
+
result.warnings.push({ path: dir, reason: 'readdir_failed', message: errorMessage(error) });
|
|
95
|
+
return null;
|
|
96
|
+
});
|
|
97
|
+
if (entries == null)
|
|
98
|
+
return result;
|
|
99
|
+
for (const name of entries) {
|
|
100
|
+
const full = join(dir, name);
|
|
101
|
+
const st = await stat(full).catch((error) => {
|
|
102
|
+
result.warnings.push({ path: full, reason: 'stat_failed', message: errorMessage(error) });
|
|
103
|
+
return null;
|
|
104
|
+
});
|
|
105
|
+
if (!st)
|
|
106
|
+
continue;
|
|
107
|
+
if (st.isDirectory()) {
|
|
108
|
+
mergeRedactDirResult(result, await redactDir(full));
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (!TEXT_FILE_RE.test(name)) {
|
|
112
|
+
if (IMAGE_FILE_RE.test(name)) {
|
|
113
|
+
result.warnings.push({ path: full, reason: 'image_unredacted' });
|
|
114
|
+
}
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
const original = await readFile(full, 'utf-8').catch((error) => {
|
|
118
|
+
result.warnings.push({ path: full, reason: 'read_failed', message: errorMessage(error) });
|
|
119
|
+
return null;
|
|
120
|
+
});
|
|
121
|
+
if (original == null)
|
|
122
|
+
continue;
|
|
123
|
+
const structured = redactStructuredText(original, name);
|
|
124
|
+
const redacted = structured.structured
|
|
125
|
+
? { value: structured.value, redactions: 0 }
|
|
126
|
+
: redactTextWithStats(structured.value);
|
|
127
|
+
const next = redacted.value;
|
|
128
|
+
const redactionCount = structured.redactions + redacted.redactions;
|
|
129
|
+
if (next !== original) {
|
|
130
|
+
try {
|
|
131
|
+
await writeFile(full, next, 'utf-8');
|
|
132
|
+
result.redactions += redactionCount;
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
result.failures.push({ path: full, reason: 'write_failed', message: errorMessage(error) });
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
export function scanResidualSecrets(input, path, opts = {}) {
|
|
142
|
+
const allowNames = [...DEFAULT_ARTIFACT_NAME_ALLOWLIST, ...(opts.allowNames ?? [])];
|
|
143
|
+
const hits = [];
|
|
144
|
+
const ranges = [];
|
|
145
|
+
for (const { prefix, re } of RESIDUAL_SECRET_PATTERNS) {
|
|
146
|
+
for (const match of input.matchAll(re)) {
|
|
147
|
+
const value = match[0];
|
|
148
|
+
const offset = match.index ?? 0;
|
|
149
|
+
if (ranges.some((range) => offset < range.end && offset + value.length > range.start))
|
|
150
|
+
continue;
|
|
151
|
+
hits.push({
|
|
152
|
+
path,
|
|
153
|
+
prefix,
|
|
154
|
+
offset,
|
|
155
|
+
sample: sampleSecret(value),
|
|
156
|
+
});
|
|
157
|
+
ranges.push({ start: offset, end: offset + value.length });
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
for (const match of input.matchAll(/[A-Za-z0-9+_=.-]{40,}/g)) {
|
|
161
|
+
const value = match[0];
|
|
162
|
+
const offset = match.index ?? 0;
|
|
163
|
+
if (ranges.some((range) => offset < range.end && offset + value.length > range.start))
|
|
164
|
+
continue;
|
|
165
|
+
if (allowNames.some((re) => re.test(value)))
|
|
166
|
+
continue;
|
|
167
|
+
if (!looksHighEntropy(value))
|
|
168
|
+
continue;
|
|
169
|
+
hits.push({
|
|
170
|
+
path,
|
|
171
|
+
prefix: 'high-entropy',
|
|
172
|
+
offset,
|
|
173
|
+
sample: sampleSecret(value),
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
return hits.sort((a, b) => a.offset - b.offset || a.prefix.localeCompare(b.prefix));
|
|
177
|
+
}
|
|
178
|
+
function redactStructuredText(content, name) {
|
|
179
|
+
if (/\.json$/i.test(name)) {
|
|
180
|
+
try {
|
|
181
|
+
const parsed = JSON.parse(content);
|
|
182
|
+
const redacted = redactJsonWithStats(parsed);
|
|
183
|
+
return {
|
|
184
|
+
value: JSON.stringify(redacted.value),
|
|
185
|
+
redactions: redacted.redactions,
|
|
186
|
+
structured: true,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
catch {
|
|
190
|
+
return { value: content, redactions: 0, structured: false };
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (/\.ndjson$/i.test(name)) {
|
|
194
|
+
let redactions = 0;
|
|
195
|
+
const hadTrailingNewline = content.endsWith('\n');
|
|
196
|
+
const lines = content
|
|
197
|
+
.split(/\r?\n/)
|
|
198
|
+
.filter((line, index, all) => line !== '' || index < all.length - 1)
|
|
199
|
+
.map((line) => {
|
|
200
|
+
if (line.trim() === '')
|
|
201
|
+
return line;
|
|
202
|
+
try {
|
|
203
|
+
const parsed = JSON.parse(line);
|
|
204
|
+
const redacted = redactJsonWithStats(parsed);
|
|
205
|
+
redactions += redacted.redactions;
|
|
206
|
+
return JSON.stringify(redacted.value);
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
const redacted = redactTextWithStats(line);
|
|
210
|
+
redactions += redacted.redactions;
|
|
211
|
+
return redacted.value;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
return {
|
|
215
|
+
value: `${lines.join('\n')}${hadTrailingNewline ? '\n' : ''}`,
|
|
216
|
+
redactions,
|
|
217
|
+
structured: true,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
return { value: content, redactions: 0, structured: false };
|
|
221
|
+
}
|
|
222
|
+
function redactTextWithStats(input) {
|
|
223
|
+
let value = maskKnownHomePath(input);
|
|
224
|
+
let redactions = value === input ? 0 : 1;
|
|
225
|
+
const encoded = maskBase64HomePaths(value);
|
|
226
|
+
value = encoded.value;
|
|
227
|
+
redactions += encoded.redactions;
|
|
228
|
+
for (const { re, replacement } of TEXT_PATTERNS) {
|
|
229
|
+
const result = replaceAndCount(value, re, replacement);
|
|
230
|
+
value = result.value;
|
|
231
|
+
redactions += result.redactions;
|
|
232
|
+
}
|
|
233
|
+
return { value, redactions };
|
|
234
|
+
}
|
|
235
|
+
function replaceAndCount(input, re, replacement) {
|
|
236
|
+
if (typeof replacement === 'string') {
|
|
237
|
+
const matches = Array.from(input.matchAll(re));
|
|
238
|
+
if (matches.length === 0)
|
|
239
|
+
return { value: input, redactions: 0 };
|
|
240
|
+
return { value: input.replace(re, replacement), redactions: matches.length };
|
|
241
|
+
}
|
|
242
|
+
// Function replacements may decline a match (return it unchanged); only
|
|
243
|
+
// count the ones that actually redacted something.
|
|
244
|
+
let redactions = 0;
|
|
245
|
+
const value = input.replace(re, (match, ...groups) => {
|
|
246
|
+
const replaced = replacement(match, ...groups);
|
|
247
|
+
if (replaced !== match)
|
|
248
|
+
redactions += 1;
|
|
249
|
+
return replaced;
|
|
250
|
+
});
|
|
251
|
+
return { value, redactions };
|
|
252
|
+
}
|
|
253
|
+
function mergeRedactDirResult(target, source) {
|
|
254
|
+
target.redactions += source.redactions;
|
|
255
|
+
target.failures.push(...source.failures);
|
|
256
|
+
target.warnings.push(...source.warnings);
|
|
257
|
+
}
|
|
258
|
+
function redactJsonWithStats(value) {
|
|
259
|
+
if (typeof value === 'string') {
|
|
260
|
+
return redactTextWithStats(value);
|
|
261
|
+
}
|
|
262
|
+
if (Array.isArray(value)) {
|
|
263
|
+
let redactions = 0;
|
|
264
|
+
const items = value.map((item) => {
|
|
265
|
+
const redacted = redactJsonWithStats(item);
|
|
266
|
+
redactions += redacted.redactions;
|
|
267
|
+
return redacted.value;
|
|
268
|
+
});
|
|
269
|
+
return { value: items, redactions };
|
|
270
|
+
}
|
|
271
|
+
if (isRecord(value)) {
|
|
272
|
+
let redactions = 0;
|
|
273
|
+
const next = {};
|
|
274
|
+
for (const [key, child] of Object.entries(value)) {
|
|
275
|
+
if (SECRET_KEY_RE.test(key)) {
|
|
276
|
+
const masked = maskJsonValue(child);
|
|
277
|
+
redactions += masked.redactions;
|
|
278
|
+
next[key] = masked.value;
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
const redacted = redactJsonWithStats(child);
|
|
282
|
+
redactions += redacted.redactions;
|
|
283
|
+
next[key] = redacted.value;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return { value: next, redactions };
|
|
287
|
+
}
|
|
288
|
+
return { value, redactions: 0 };
|
|
289
|
+
}
|
|
290
|
+
function maskJsonValue(value) {
|
|
291
|
+
if (Array.isArray(value)) {
|
|
292
|
+
let redactions = 0;
|
|
293
|
+
const items = value.map((item) => {
|
|
294
|
+
const masked = maskJsonValue(item);
|
|
295
|
+
redactions += masked.redactions;
|
|
296
|
+
return masked.value;
|
|
297
|
+
});
|
|
298
|
+
return { value: items, redactions };
|
|
299
|
+
}
|
|
300
|
+
if (isRecord(value)) {
|
|
301
|
+
let redactions = 0;
|
|
302
|
+
const next = {};
|
|
303
|
+
for (const [key, child] of Object.entries(value)) {
|
|
304
|
+
const masked = maskJsonValue(child);
|
|
305
|
+
redactions += masked.redactions;
|
|
306
|
+
next[key] = masked.value;
|
|
307
|
+
}
|
|
308
|
+
return { value: next, redactions };
|
|
309
|
+
}
|
|
310
|
+
return { value: REDACTED, redactions: 1 };
|
|
311
|
+
}
|
|
312
|
+
function maskKnownHomePath(input) {
|
|
313
|
+
const home = homedir();
|
|
314
|
+
if (!home)
|
|
315
|
+
return input;
|
|
316
|
+
let value = input;
|
|
317
|
+
for (const dir of AGENT_HOME_DIRS) {
|
|
318
|
+
value = value.split(`${home}/${dir}`).join('[HOME]');
|
|
319
|
+
}
|
|
320
|
+
return value;
|
|
321
|
+
}
|
|
322
|
+
function maskBase64HomePaths(input) {
|
|
323
|
+
let redactions = 0;
|
|
324
|
+
const value = input.replace(/\b(?:L1VzZXJz|L2hvbWU)[A-Za-z0-9+_=-]{20,}\b/g, (candidate) => {
|
|
325
|
+
const decoded = decodeBase64Candidate(candidate);
|
|
326
|
+
if (decoded == null)
|
|
327
|
+
return candidate;
|
|
328
|
+
if (!/^(?:\/Users\/|\/home\/|~\/)/.test(decoded))
|
|
329
|
+
return candidate;
|
|
330
|
+
redactions += 1;
|
|
331
|
+
return '[REDACTED_BASE64_PATH]';
|
|
332
|
+
});
|
|
333
|
+
return { value, redactions };
|
|
334
|
+
}
|
|
335
|
+
function decodeBase64Candidate(candidate) {
|
|
336
|
+
const normalized = candidate.replace(/-/g, '+').replace(/_/g, '/');
|
|
337
|
+
const padding = normalized.length % 4 === 0 ? '' : '='.repeat(4 - (normalized.length % 4));
|
|
338
|
+
try {
|
|
339
|
+
const decoded = Buffer.from(`${normalized}${padding}`, 'base64').toString('utf-8');
|
|
340
|
+
return decoded.includes('\uFFFD') ? null : decoded;
|
|
341
|
+
}
|
|
342
|
+
catch {
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
function errorMessage(error) {
|
|
347
|
+
return error instanceof Error ? error.message : String(error);
|
|
348
|
+
}
|
|
349
|
+
function sampleSecret(value) {
|
|
350
|
+
return value.length <= 16 ? value : `${value.slice(0, 8)}...${value.slice(-4)}`;
|
|
351
|
+
}
|
|
352
|
+
function looksHighEntropy(value) {
|
|
353
|
+
const classes = [
|
|
354
|
+
/[a-z]/.test(value),
|
|
355
|
+
/[A-Z]/.test(value),
|
|
356
|
+
/\d/.test(value),
|
|
357
|
+
/[+/=_-]/.test(value),
|
|
358
|
+
].filter(Boolean).length;
|
|
359
|
+
if (classes < 3)
|
|
360
|
+
return false;
|
|
361
|
+
return shannonEntropy(value) >= 4.3;
|
|
362
|
+
}
|
|
363
|
+
function shannonEntropy(value) {
|
|
364
|
+
const counts = new Map();
|
|
365
|
+
for (const char of value)
|
|
366
|
+
counts.set(char, (counts.get(char) ?? 0) + 1);
|
|
367
|
+
let entropy = 0;
|
|
368
|
+
for (const count of counts.values()) {
|
|
369
|
+
const probability = count / value.length;
|
|
370
|
+
entropy -= probability * Math.log2(probability);
|
|
371
|
+
}
|
|
372
|
+
return entropy;
|
|
373
|
+
}
|
|
374
|
+
function isRecord(value) {
|
|
375
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
376
|
+
}
|
|
377
|
+
//# sourceMappingURL=redactText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redactText.js","sourceRoot":"","sources":["../../src/util/redactText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,QAAQ,GAAG,YAAY,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,+BAA+B,GAAa;IAChD,mEAAmE;CACpE,CAAC;AAEF;;;GAGG;AACH,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAE9C,MAAM,YAAY,GAAG,mCAAmC,CAAC;AACzD,MAAM,aAAa,GAAG,oCAAoC,CAAC;AAC3D,MAAM,aAAa,GAAG,yHAAyH,CAAC;AA+ChJ,MAAM,aAAa,GAAwD;IACzE;QACE,EAAE,EAAE,mCAAmC;QACvC,WAAW,EAAE,mBAAmB;KACjC;IACD;QACE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