holomime 1.5.1 → 1.7.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/README.md +82 -0
- package/dist/cli.js +2222 -136
- package/dist/index.d.ts +688 -3
- package/dist/index.js +2389 -109
- package/dist/mcp-server.js +261 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,10 +31,47 @@ npx holomime brain
|
|
|
31
31
|
|
|
32
32
|
Auto-detects Claude Code, Cline, OpenClaw, Cursor, and Codex. Opens a 3D NeuralSpace brain in your browser at `localhost:3838`. Watch behavioral patterns fire across 9 brain regions as your agent generates responses.
|
|
33
33
|
|
|
34
|
+
```bash
|
|
35
|
+
# Share a snapshot — generates a short URL and copies to clipboard
|
|
36
|
+
holomime brain --share
|
|
37
|
+
# → https://holomime.dev/brain/uniqueid
|
|
38
|
+
```
|
|
39
|
+
|
|
34
40
|
[Learn more at holomime.dev/brain](https://holomime.dev/brain)
|
|
35
41
|
|
|
36
42
|
---
|
|
37
43
|
|
|
44
|
+
## Runtime Guard Middleware
|
|
45
|
+
|
|
46
|
+
Intercept every LLM call and enforce behavioral alignment **before** the response reaches your users. Not post-hoc filtering — real-time correction at the API boundary.
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { createGuardMiddleware } from "holomime";
|
|
50
|
+
import { readFileSync } from "fs";
|
|
51
|
+
|
|
52
|
+
const spec = JSON.parse(readFileSync(".personality.json", "utf-8"));
|
|
53
|
+
const guard = createGuardMiddleware(spec, { mode: "enforce" });
|
|
54
|
+
|
|
55
|
+
// Wrap any OpenAI or Anthropic call — sycophancy, hedging, over-apologizing
|
|
56
|
+
// get corrected before they leave your server
|
|
57
|
+
const response = await guard.wrap(
|
|
58
|
+
openai.chat.completions.create({
|
|
59
|
+
model: "gpt-4o",
|
|
60
|
+
messages: [{ role: "user", content: "Help me with..." }],
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
// Or filter an existing response
|
|
65
|
+
const result = guard.filter(conversationHistory, rawResponse);
|
|
66
|
+
if (result.violations.length > 0) {
|
|
67
|
+
console.log("Corrected:", result.correctedContent);
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Three modes: `monitor` (log violations), `enforce` (auto-correct), `strict` (block on violation). Auto-detects OpenAI and Anthropic response shapes.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
38
75
|
## Quick Start
|
|
39
76
|
|
|
40
77
|
```bash
|
|
@@ -193,6 +230,8 @@ Seven rule-based detectors that analyze real conversations without any LLM calls
|
|
|
193
230
|
6. **Sentiment skew** -- Unnaturally positive or negative tone
|
|
194
231
|
7. **Formality drift** -- Register inconsistency over time
|
|
195
232
|
|
|
233
|
+
Plus support for **custom detectors** in JSON or Markdown format — drop `.json` or `.md` files in `.holomime/detectors/` and they're automatically loaded.
|
|
234
|
+
|
|
196
235
|
<details>
|
|
197
236
|
<summary><strong>All Commands</strong></summary>
|
|
198
237
|
|
|
@@ -244,8 +283,13 @@ holomime daemon --dir ./logs --personality agent.personality.json
|
|
|
244
283
|
|
|
245
284
|
# Fleet mode -- monitor multiple agents simultaneously
|
|
246
285
|
holomime fleet --dir ./agents
|
|
286
|
+
|
|
287
|
+
# Fleet with concurrency control (default: 5)
|
|
288
|
+
holomime fleet --dir ./agents --concurrency 10
|
|
247
289
|
```
|
|
248
290
|
|
|
291
|
+
Confidence-scored behavioral memory tracks pattern trends across sessions. Patterns detected once carry lower weight than patterns seen across 20 sessions. Confidence decays when patterns aren't observed, so resolved issues fade naturally.
|
|
292
|
+
|
|
249
293
|
## Training Pipeline
|
|
250
294
|
|
|
251
295
|
Every alignment session produces structured training data:
|
|
@@ -309,6 +353,44 @@ cd agent && python agent.py dev
|
|
|
309
353
|
|
|
310
354
|
See [agent/](agent/) for setup instructions.
|
|
311
355
|
|
|
356
|
+
## Compliance & Audit Trail
|
|
357
|
+
|
|
358
|
+
Tamper-evident audit logging for EU AI Act, NIST AI RMF, and enterprise compliance requirements.
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
# Generate a compliance report for a time period
|
|
362
|
+
holomime certify --agent my-agent --from 2026-01-01 --to 2026-03-15
|
|
363
|
+
|
|
364
|
+
# Continuous monitoring certificate
|
|
365
|
+
holomime certify --certificate --agent my-agent --from 2026-01-01 --to 2026-03-15
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Every diagnosis, session, and evolution is recorded in a chained-hash audit log. Reports reference EU AI Act Articles 9 & 12 and NIST AI RMF 1.0. Monitoring certificates attest that an agent maintained a behavioral grade over a period.
|
|
369
|
+
|
|
370
|
+
```typescript
|
|
371
|
+
import { appendAuditEntry, verifyAuditChain, generateComplianceReport } from "holomime";
|
|
372
|
+
|
|
373
|
+
// Append to tamper-evident log
|
|
374
|
+
appendAuditEntry("diagnosis", "my-agent", { patterns: ["sycophancy"], grade: "B" });
|
|
375
|
+
|
|
376
|
+
// Verify chain integrity
|
|
377
|
+
const entries = loadAuditLog("my-agent");
|
|
378
|
+
const intact = verifyAuditChain(entries); // true if no tampering
|
|
379
|
+
|
|
380
|
+
// Generate compliance report
|
|
381
|
+
const report = generateComplianceReport("my-agent", "2026-01-01", "2026-03-15");
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
## Behavioral Leaderboard
|
|
385
|
+
|
|
386
|
+
Publish benchmark results to the public leaderboard at [holomime.dev/leaderboard](https://holomime.dev/leaderboard):
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
holomime benchmark --personality .personality.json --publish
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Compare your agent's behavioral alignment against others across providers and models.
|
|
393
|
+
|
|
312
394
|
## Research
|
|
313
395
|
|
|
314
396
|
See [Behavioral Alignment for Autonomous AI Agents](paper/behavioral-alignment.md) -- the research paper behind holomime's approach.
|