@khanhcan148/mk 0.1.31 → 0.1.32
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/README.md +1 -1
- package/package.json +1 -1
- package/scripts/bench-privacy-block.cjs +31 -0
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ cp -r .claude ~/.claude/
|
|
|
91
91
|
```
|
|
92
92
|
├── .claude/
|
|
93
93
|
│ ├── agents/ # 36 agents (5 primary + 31 utility: implementers, quality, docs, specialized, concerns, brainstorm critics)
|
|
94
|
-
│ ├── skills/ #
|
|
94
|
+
│ ├── skills/ # 62 skill packages (SKILL.md + scripts/references/assets)
|
|
95
95
|
│ │ ├── mk-*/ # 20 workflow commands (/mk-audit, /mk-brainstorm, /mk-log-analysis, /mk-overview, /mk-wiki, etc.)
|
|
96
96
|
│ │ └── ... # Domain skills (frontend, backend, testing, browser automation, etc.)
|
|
97
97
|
│ └── workflows/ # Development protocols
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
process.env.NODE_TEST_CONTEXT = '1';
|
|
3
|
+
const { isSensitive } = require('../.claude/hooks/privacy-block.cjs');
|
|
4
|
+
|
|
5
|
+
const cases = [
|
|
6
|
+
['.env', ''],
|
|
7
|
+
['.env.example', ''],
|
|
8
|
+
['server.pem', ''],
|
|
9
|
+
['/home/user/.ssh/id_rsa', ''],
|
|
10
|
+
['token-budget-protocol.md', ''],
|
|
11
|
+
['secrets.json', ''],
|
|
12
|
+
['tokenize.md', ''],
|
|
13
|
+
['api-token-cache.test.ts', ''],
|
|
14
|
+
['../secrets', 'Bash'],
|
|
15
|
+
['access_key', 'Bash'],
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
const ITER = 10_000;
|
|
19
|
+
// Warmup
|
|
20
|
+
for (let i = 0; i < 1000; i++) for (const [f, t] of cases) isSensitive(f, t);
|
|
21
|
+
// Measure
|
|
22
|
+
const t0 = process.hrtime.bigint();
|
|
23
|
+
for (let i = 0; i < ITER; i++) for (const [f, t] of cases) isSensitive(f, t);
|
|
24
|
+
const t1 = process.hrtime.bigint();
|
|
25
|
+
const totalNs = Number(t1 - t0);
|
|
26
|
+
const perCallUs = totalNs / (ITER * cases.length) / 1000;
|
|
27
|
+
console.log(`Calls: ${ITER * cases.length}`);
|
|
28
|
+
console.log(`Total: ${(totalNs / 1e6).toFixed(2)}ms`);
|
|
29
|
+
console.log(`Per call (avg): ${perCallUs.toFixed(3)}μs`);
|
|
30
|
+
console.log(`Budget: <5000μs (5ms) per call`);
|
|
31
|
+
console.log(perCallUs < 5000 ? 'PASS: within latency budget' : 'FAIL: exceeds 5ms budget');
|