mimvo 0.2.0__tar.gz

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.
Files changed (92) hide show
  1. mimvo-0.2.0/.gitignore +50 -0
  2. mimvo-0.2.0/CHANGELOG.md +258 -0
  3. mimvo-0.2.0/LICENSE +201 -0
  4. mimvo-0.2.0/PKG-INFO +684 -0
  5. mimvo-0.2.0/README.md +606 -0
  6. mimvo-0.2.0/benchmarks/README.md +70 -0
  7. mimvo-0.2.0/mimvo/__init__.py +53 -0
  8. mimvo-0.2.0/mimvo/_coerce.py +72 -0
  9. mimvo-0.2.0/mimvo/_version.py +11 -0
  10. mimvo-0.2.0/mimvo/checks/__init__.py +54 -0
  11. mimvo-0.2.0/mimvo/checks/base.py +149 -0
  12. mimvo-0.2.0/mimvo/checks/security/__init__.py +43 -0
  13. mimvo-0.2.0/mimvo/checks/security/_hf.py +439 -0
  14. mimvo-0.2.0/mimvo/checks/security/_http.py +62 -0
  15. mimvo-0.2.0/mimvo/checks/security/_phrases.py +180 -0
  16. mimvo-0.2.0/mimvo/checks/security/base.py +780 -0
  17. mimvo-0.2.0/mimvo/checks/security/injection/__init__.py +48 -0
  18. mimvo-0.2.0/mimvo/checks/security/injection/check.py +45 -0
  19. mimvo-0.2.0/mimvo/checks/security/injection/datasentinel.py +81 -0
  20. mimvo-0.2.0/mimvo/checks/security/injection/deepset_deberta.py +31 -0
  21. mimvo-0.2.0/mimvo/checks/security/injection/embedding_clf.py +76 -0
  22. mimvo-0.2.0/mimvo/checks/security/injection/heuristic.py +429 -0
  23. mimvo-0.2.0/mimvo/checks/security/injection/known_answer.py +76 -0
  24. mimvo-0.2.0/mimvo/checks/security/injection/lakera_guard.py +129 -0
  25. mimvo-0.2.0/mimvo/checks/security/injection/probes.py +80 -0
  26. mimvo-0.2.0/mimvo/checks/security/injection/prompt_guard.py +37 -0
  27. mimvo-0.2.0/mimvo/checks/security/injection/prompt_shield.py +127 -0
  28. mimvo-0.2.0/mimvo/checks/security/injection/protectai_deberta.py +31 -0
  29. mimvo-0.2.0/mimvo/checks/security/injection/sentinel.py +44 -0
  30. mimvo-0.2.0/mimvo/checks/security/poisoning/__init__.py +50 -0
  31. mimvo-0.2.0/mimvo/checks/security/poisoning/_corpus.py +28 -0
  32. mimvo-0.2.0/mimvo/checks/security/poisoning/check.py +48 -0
  33. mimvo-0.2.0/mimvo/checks/security/poisoning/consistency.py +101 -0
  34. mimvo-0.2.0/mimvo/checks/security/poisoning/heuristic.py +453 -0
  35. mimvo-0.2.0/mimvo/checks/security/poisoning/hubness.py +109 -0
  36. mimvo-0.2.0/mimvo/checks/security/poisoning/nli.py +127 -0
  37. mimvo-0.2.0/mimvo/checks/security/poisoning/perplexity.py +140 -0
  38. mimvo-0.2.0/mimvo/checks/security/poisoning/probe.py +115 -0
  39. mimvo-0.2.0/mimvo/checks/security/poisoning/raguard.py +149 -0
  40. mimvo-0.2.0/mimvo/checks/security/poisoning/revprag.py +51 -0
  41. mimvo-0.2.0/mimvo/checks/security/poisoning/trustrag.py +192 -0
  42. mimvo-0.2.0/mimvo/checks/security/secrets/__init__.py +86 -0
  43. mimvo-0.2.0/mimvo/checks/security/secrets/check.py +51 -0
  44. mimvo-0.2.0/mimvo/checks/security/secrets/detect_secrets.py +118 -0
  45. mimvo-0.2.0/mimvo/checks/security/secrets/entropy.py +156 -0
  46. mimvo-0.2.0/mimvo/checks/security/secrets/gitleaks.py +79 -0
  47. mimvo-0.2.0/mimvo/checks/security/secrets/gliner2_pii.py +184 -0
  48. mimvo-0.2.0/mimvo/checks/security/secrets/gliner_pii.py +150 -0
  49. mimvo-0.2.0/mimvo/checks/security/secrets/heuristic.py +151 -0
  50. mimvo-0.2.0/mimvo/checks/security/secrets/piiranha.py +77 -0
  51. mimvo-0.2.0/mimvo/checks/security/secrets/presidio.py +161 -0
  52. mimvo-0.2.0/mimvo/checks/security/secrets/starpii.py +54 -0
  53. mimvo-0.2.0/mimvo/checks/security/secrets/verify.py +62 -0
  54. mimvo-0.2.0/mimvo/cli.py +556 -0
  55. mimvo-0.2.0/mimvo/client.py +205 -0
  56. mimvo-0.2.0/mimvo/config.py +45 -0
  57. mimvo-0.2.0/mimvo/context.py +107 -0
  58. mimvo-0.2.0/mimvo/corpus.py +708 -0
  59. mimvo-0.2.0/mimvo/engine.py +350 -0
  60. mimvo-0.2.0/mimvo/exceptions.py +56 -0
  61. mimvo-0.2.0/mimvo/integrations/__init__.py +16 -0
  62. mimvo-0.2.0/mimvo/integrations/hook.py +216 -0
  63. mimvo-0.2.0/mimvo/mask.py +87 -0
  64. mimvo-0.2.0/mimvo/models/__init__.py +36 -0
  65. mimvo-0.2.0/mimvo/models/enums.py +171 -0
  66. mimvo-0.2.0/mimvo/models/finding.py +76 -0
  67. mimvo-0.2.0/mimvo/models/memory.py +79 -0
  68. mimvo-0.2.0/mimvo/models/results.py +366 -0
  69. mimvo-0.2.0/mimvo/owasp.py +39 -0
  70. mimvo-0.2.0/mimvo/plugins.py +142 -0
  71. mimvo-0.2.0/mimvo/py.typed +0 -0
  72. mimvo-0.2.0/mimvo/reporters/__init__.py +17 -0
  73. mimvo-0.2.0/mimvo/reporters/html.py +900 -0
  74. mimvo-0.2.0/mimvo/reporters/markdown.py +267 -0
  75. mimvo-0.2.0/mimvo/reporters/sarif.py +222 -0
  76. mimvo-0.2.0/mimvo/reporters/terminal.py +177 -0
  77. mimvo-0.2.0/mimvo/rules.py +486 -0
  78. mimvo-0.2.0/mimvo/sources/__init__.py +33 -0
  79. mimvo-0.2.0/mimvo/sources/base.py +261 -0
  80. mimvo-0.2.0/mimvo/sources/chroma.py +141 -0
  81. mimvo-0.2.0/mimvo/sources/jsonl.py +85 -0
  82. mimvo-0.2.0/mimvo/sources/langchain.py +251 -0
  83. mimvo-0.2.0/mimvo/sources/langgraph.py +137 -0
  84. mimvo-0.2.0/mimvo/sources/mem0.py +238 -0
  85. mimvo-0.2.0/mimvo/sources/pgvector.py +160 -0
  86. mimvo-0.2.0/mimvo/sources/pinecone.py +154 -0
  87. mimvo-0.2.0/mimvo/sources/qdrant.py +140 -0
  88. mimvo-0.2.0/mimvo/telemetry/__init__.py +116 -0
  89. mimvo-0.2.0/mimvo/telemetry/otel.py +79 -0
  90. mimvo-0.2.0/mimvo/text.py +469 -0
  91. mimvo-0.2.0/mimvo/vectors.py +155 -0
  92. mimvo-0.2.0/pyproject.toml +175 -0
mimvo-0.2.0/.gitignore ADDED
@@ -0,0 +1,50 @@
1
+ # Byte-compiled / optimized
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+
7
+ # Distribution / packaging
8
+ .Python
9
+ build/
10
+ dist/
11
+ downloads/
12
+ eggs/
13
+ .eggs/
14
+ *.egg-info/
15
+ *.egg
16
+ wheels/
17
+ share/python-wheels/
18
+
19
+ # Virtual environments
20
+ .venv/
21
+ venv/
22
+ env/
23
+ ENV/
24
+
25
+ # Tooling caches
26
+ .mypy_cache/
27
+ .ruff_cache/
28
+ .pytest_cache/
29
+ .hypothesis/
30
+ .coverage
31
+ htmlcov/
32
+ coverage.xml
33
+
34
+ # Editors / OS
35
+ .idea/
36
+ .vscode/
37
+ *.swp
38
+ .DS_Store
39
+
40
+ # Mimvo local artifacts (example and CLI outputs)
41
+ report.html
42
+ results.sarif
43
+ summary.md
44
+ findings.json
45
+ *.jsonl
46
+ !examples/**/*.jsonl
47
+ .benchmark-cache/
48
+
49
+ # Local script that deletes and republishes the GitHub repo
50
+ repush-single-commit.sh
@@ -0,0 +1,258 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format is based on
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
5
+ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.2.0] - 2026-10-11
10
+
11
+ First release published to PyPI (`pip install mimvo`). 0.1.0 was never
12
+ published; the notes below describe the changes since that version.
13
+
14
+ ### Release
15
+
16
+ - Releases are published to PyPI from a `v*` tag by
17
+ `.github/workflows/release.yml`, using PyPI Trusted Publishing.
18
+ - The `mem0` extra now installs PyYAML, which `mimvo scan mem0 --config
19
+ file.yaml` needs.
20
+
21
+ ### Changed: one engine contract, one rule catalogue, one finding model
22
+
23
+ A design pass to match how mature scanners are built. The scan logic and
24
+ the findings it produces are unchanged (same codes, severities, actions,
25
+ and fingerprints), but several public names moved. To upgrade:
26
+
27
+ | Before | After |
28
+ |---|---|
29
+ | `from mimvo.scan import ChromaScanSource, ...` | `from mimvo.sources import ChromaScanSource, ...` |
30
+ | `from mimvo.scan import render_html, render_markdown, render_sarif` | `from mimvo.reporters import ...` |
31
+ | `mimvo.scan.source` (helpers such as `to_record`) | `mimvo.sources.base` |
32
+ | `mimvo.scan.mask` | `mimvo.mask` |
33
+ | `mimvo.models.results.format_scan_summary` | `mimvo.reporters.format_scan_summary` (`str(report)` still works) |
34
+ | `mimvo.scan.owasp` | `mimvo.owasp` |
35
+ | `ScanFinding.id` / `.type` / `.action` (and the JSON keys) | `.record_id` / `.code` / `.recommended_action` |
36
+ | JSON `schema_version` `2.0` | `3.0` (the three renames above) |
37
+ | `SecurityCheck.specs` of `FindingSpec` | `SecurityCheck.rules` of `mimvo.rules.Rule` |
38
+ | `WriteGuard.allow(content, **kwargs)` | `allow(content, *, metadata=, memory_id=, neighbours=)` |
39
+ | A `BaseDetector` overriding `detect` without `needs_corpus` ran in the corpus pass | Raises `ConfigurationError`; set `needs_corpus = True` or `False` |
40
+ | Missing optional extra raised `ConfigurationError` | Raises `IntegrationError` |
41
+ | A failing store or hosted-API call raised `ConfigurationError` | Raises `BackendError` |
42
+
43
+ Both `IntegrationError` and `BackendError` subclass `MimvoError`, so code
44
+ catching `MimvoError` is unaffected.
45
+
46
+ #### Added
47
+
48
+ - **Batch detection.** Records reach checks in batches of
49
+ `Config(batch_size=64)`. Hugging Face detectors classify every chunk of a
50
+ batch in one pipeline call; `LakeraGuardDetector` and
51
+ `PromptShieldDetector` keep `concurrency=8` requests in flight. Custom
52
+ detectors can override `detect_batch` or set `concurrency`. A failure on
53
+ one record stays on that record (`BatchError`).
54
+ - **Plugins.** Packages can register checks (`mimvo.checks`) and scan
55
+ sources (`mimvo.sources`) as entry points. `mimvo scan ... --check NAME`,
56
+ `mimvo scan plugin NAME --option key=value`, and `mimvo plugins`.
57
+ - **Custom rules render properly.** Defining a `SecurityCheck` registers its
58
+ rules, so its findings show their own title and remediation in HTML,
59
+ Markdown, and SARIF instead of a generic "custom" entry.
60
+ - **Two-pass custom checks.** Any `MemoryCheck` can split work across the
61
+ stream and corpus passes with `phases()`, `observe()`, and `conclude()`;
62
+ the engine no longer special-cases `SecurityCheck`.
63
+ - `WriteGuard.inspect(..., neighbours=[...])` compares a new memory with
64
+ nearby stored ones (clusters, contradictions) without letting their own
65
+ findings affect the decision.
66
+ - `ScanReport.raise_for_errors()` raises `CheckError` for an incomplete scan.
67
+ - `WriteDecision.findings` are the scan findings themselves, so they keep
68
+ the checks' evidence.
69
+
70
+ ### Renamed: MemorySec is now Mimvo
71
+
72
+ The project, the PyPI distribution, the import package, and the CLI are now
73
+ called **Mimvo** ([mimvo.dev](https://mimvo.dev)). Nothing else about
74
+ scanning behaviour changed. To upgrade:
75
+
76
+ | Before | After |
77
+ |---|---|
78
+ | `pip install memorysec` | `pip install mimvo` |
79
+ | `memorysec scan ...` | `mimvo scan ...` |
80
+ | `import memorysec` / `from memorysec import ...` | `import mimvo` / `from mimvo import ...` |
81
+ | `MemorySec`, `AsyncMemorySec` | `Mimvo`, `AsyncMimvo` |
82
+ | `MemorySecError` | `MimvoError` |
83
+ | `ScanReport.memorysec_version` (JSON `memorysec_version`) | `ScanReport.mimvo_version` (JSON `mimvo_version`) |
84
+ | JSON `schema_version` `1.2` | `2.0` (only the field rename above) |
85
+ | SARIF `partialFingerprints.memorysecFingerprint`, tool name `MemorySec` | `mimvoFingerprint`, tool name `Mimvo` |
86
+ | OpenTelemetry span `memorysec.scan` | `mimvo.scan` |
87
+
88
+ Fingerprint values are unchanged (they hash the rule id and record id only),
89
+ so existing tickets and suppression lists still match. GitHub code scanning
90
+ will treat the renamed SARIF fingerprint key as new alerts once.
91
+
92
+ ### Since 0.1.0
93
+
94
+ Version 0.1.0 was an SDK that sat between an agent and its memory backend
95
+ (the project was called MemTrust then). Since then it has become a scanner:
96
+ it reads a memory store, reports poisoned facts, hidden instructions, and
97
+ leaked secrets, and recommends what to do with each record. It never writes
98
+ to the store. Everything below is relative to 0.1.0.
99
+
100
+ ### Added
101
+
102
+ - **Store scanning.** `Mimvo().scan(source)` and `mimvo scan
103
+ chroma|qdrant|pgvector|pinecone|jsonl|langchain|mem0`. Sources are
104
+ read-only and stream records in batches; `--sample N` caps a scan.
105
+ - **LangChain, LangGraph, and mem0 sources.** `LangChainScanSource` reads
106
+ LangChain vector stores (InMemoryVectorStore, Chroma, Qdrant, Pinecone,
107
+ FAISS, PGVector, or any store by id with `get_by_ids`);
108
+ `LangGraphStoreScanSource` reads a LangGraph `BaseStore` (LangGraph and
109
+ LangMem long-term memory); `Mem0ScanSource` reads mem0's open-source
110
+ `Memory` (whole store or one user/agent/run) and the hosted
111
+ `MemoryClient`. CLI: `scan langchain --factory module:attr`,
112
+ `scan mem0 --config FILE | --api-key KEY`. Extras: `langchain`,
113
+ `langgraph`, `mem0`.
114
+ - **Reports.** A self-contained HTML report (verdict, triage plan,
115
+ findings with masked excerpts, fix steps, OWASP and CWE links), JSON
116
+ (`--json`, schema `2.0`), SARIF 2.1.0 (`--sarif`) for GitHub code
117
+ scanning, and Markdown (`--markdown`) for job summaries and PR comments.
118
+ Every format uses the rule catalogue in `mimvo.rules` and stable
119
+ per-finding `fingerprint`s.
120
+ - **CI gates.** `--fail-on SEVERITY` exits `1` when a finding reaches that
121
+ severity; `--min-confidence SCORE` ignores weaker findings for that gate;
122
+ `-q` prints counts only.
123
+ - **Confidence.** Every finding has a `confidence` from 0 to 1: the
124
+ combined score of the detectors that agreed on it (`1 - Π(1 - score)`).
125
+ A finding below 0.6 is reported one severity step lower.
126
+ - **Detectors.** Each check runs a list of detectors and can require
127
+ several to agree (`min_detectors`). Opt-in detectors: Hugging Face
128
+ classifiers (Prompt Guard 2, Protect AI and deepset DeBERTa, Sentinel,
129
+ Piiranha, StarPII), GLiNER, Presidio, detect-secrets, Azure Prompt
130
+ Shields, Lakera Guard, entropy, known-answer and DataSentinel, embedding
131
+ classifiers, perplexity and RAGuard, TrustRAG, hubness, embedding
132
+ consistency, temporal NLI, probe queries, and live secret verification.
133
+ - **Scan errors.** `ScanReport.errors`, `complete`, and
134
+ `records_with_errors` say which checks or detectors failed and on how
135
+ many records.
136
+ - **`WriteGuard` and `RetrieveGuard`** (`mimvo.integrations`): run the
137
+ scan on a memory before it is written, or on records just retrieved for a
138
+ query. They replace 0.1.0's `check_write` / `check_read`.
139
+ - **Accuracy benchmark** (`benchmarks/`): the default detectors measured on
140
+ public datasets they were not written against (GitHub's help articles,
141
+ AgentDojo, BIPIA, InjecAgent, PoisonedRAG), with a held-out test split.
142
+ Results are in `benchmarks/RESULTS.md`.
143
+ - **`mimvo.corpus`**: the packed record store and shared
144
+ nearest-neighbour table corpus detectors use, with a pluggable
145
+ `NeighbourIndex`. The `fast` extra installs numpy for the exact index.
146
+ - OpenTelemetry tracing (`mimvo[otel]`) and loguru logging; Mimvo
147
+ never adds or removes log sinks.
148
+
149
+ ### Changed
150
+
151
+ - **Default detectors are scored and read context.** The injection and
152
+ poisoning heuristics judge each match by its sentence: help-text framing
153
+ ("To disable 2FA, go to Settings"), conditionals, questions, limited
154
+ scope ("guest Wi-Fi", "when on VPN"), advice, and quotations lower the
155
+ score; sensitive assets, change markers, and directives aimed at the agent
156
+ raise it; a prohibition ("never disable MFA") drops the match. Bare
157
+ "review", "login", and "password" count only weakly. New coverage:
158
+ paraphrased overrides, typos in trigger words, base64/hex/URL/HTML/
159
+ reversed payloads, fake role tokens, task hijacking, authority spoofing,
160
+ limit removal, data exfiltration, secrets pushed into channels, and links
161
+ or falsehoods pushed into the agent's replies.
162
+ - **Severities follow one rule.** Explicit attack text is high
163
+ (`persistent_instruction`, `memory_poisoning`, `destination_redirect`);
164
+ model or behavioural evidence is medium (`known_answer`,
165
+ `embedding_injection`, `adversarial_text`, `embedding_mismatch`,
166
+ `temporal_contradiction`, `retrieval_flip`, `pii_detected`); corpus
167
+ statistics are low (`poisoning_cluster`, `hub_record`); a leaked secret
168
+ is critical.
169
+ - **A failing detector marks the scan incomplete.** It used to become a
170
+ critical `check_error` finding with action `delete` on every record. Now
171
+ the healthy detectors' results are kept, the failure is listed in
172
+ `report.errors`, no finding is created, and the CLI exits `2` (unless
173
+ `--allow-incomplete`). SARIF sets `executionSuccessful: false`; the HTML
174
+ and Markdown reports say the scan is incomplete. With `fail_closed=True`
175
+ (the default) `WriteGuard` refuses and `RetrieveGuard` drops records that
176
+ were not fully checked.
177
+ - **Scans stream.** Records are no longer collected into one list. Text
178
+ detectors run as records arrive; corpus detectors (TrustRAG, hubness,
179
+ NLI) run afterwards against packed float32 vectors and one shared k-NN
180
+ table. 50,000 records with 1,536-dimension vectors scan in about 90
181
+ seconds and 1.1 GB. TrustRAG's `embed=` path embeds each text once per
182
+ scan, and its lexical fallback compares records that share rare word
183
+ pairs instead of every pair.
184
+ - `AsyncMimvo.scan` runs in a worker thread so it no longer blocks the
185
+ event loop, and accepts async iterables.
186
+ - `Mimvo(checks=[...])` replaces a default check with the same name.
187
+
188
+ ### Removed
189
+
190
+ - The write/read SDK: `check_write`, `check_read`, `protect`,
191
+ `ProtectedMemory`, `AsyncProtectedMemory`, `revoke_source`, `Decision`,
192
+ `ReadResult`, `SafeMemory`, `FilteredMemory`, `RevocationReport`, gate
193
+ actions (`allow`, `allow_with_warning`, `block`), modes (`observe`,
194
+ `warn`, `enforce`), and the `mimvo check` and `mimvo audit`
195
+ commands. Use `Mimvo.scan`, or `WriteGuard` / `RetrieveGuard` on the
196
+ write and read paths.
197
+ - Backends and adapters: `MemoryBackend`, `InMemoryBackend`,
198
+ `FunctionBackend`, the Mem0 and LangGraph adapters, and the `zep`
199
+ extra. Scan sources are the only store integrations.
200
+ - Correctness checks (contradiction, duplication, freshness,
201
+ generalization), source/scope/tenant/authority models and checks,
202
+ policies, the audit trail, secret redaction, the injectable clock, the
203
+ provenance model, and the semantic analyzer.
204
+ - The `check_error` finding code.
205
+
206
+ ### Fixed
207
+
208
+ - `mimvo scan chroma` failed on any collection with stored vectors:
209
+ chromadb returns embeddings as a numpy array, which the source tested
210
+ with `or`.
211
+ - pgvector vectors returned as text (`"[0.1,0.2]"`, without the pgvector
212
+ adapter) were dropped, which silently turned the vector detectors off.
213
+ - `HubnessDetector` cached its table without its `k`, so two hubness
214
+ detectors with different `k` shared one result.
215
+ - `WriteGuard` put a detector name in `Finding.check`.
216
+ - A reset link after "password:" was reported as a leaked password.
217
+
218
+ ## [0.1.0] - 2026-09-12
219
+
220
+ Not published to PyPI. Initial version. Mimvo v0.1 is an SDK/MVP: a vendor-neutral trust
221
+ boundary between an AI agent and its memory backend.
222
+
223
+ ### Added
224
+
225
+ - **Facade**: `Mimvo` and `AsyncMimvo` with `check_write`, `check_read`,
226
+ `protect`, and `revoke_source`.
227
+ - **Domain models** (Pydantic v2): `Source`, `Scope`, `MemoryCandidate`,
228
+ `MemoryRecord`, `Finding`, `Decision`, `Provenance`, `Policy`, plus enums for
229
+ trust, severity, risk, action, status, and memory relationships.
230
+ - **Authority vs. confidence**: modeled as distinct fields, with authority
231
+ derived from source trust by default.
232
+ - **Security checks**: persistent-instruction/injection detection, secret
233
+ detection with redaction, tenant isolation, scope-promotion detection, and a
234
+ low-authority policy-write check (`untrusted_policy_write`).
235
+ - **Correctness checks**: freshness/expiry, local duplicate detection,
236
+ contradiction vs. supersession, and a generalization extension point.
237
+ - **Core enforcement** that cannot be bypassed by customizing the check list:
238
+ cross-tenant/cross-user read isolation, tenant-match on write, and filtering
239
+ of revoked/expired/quarantined/superseded records.
240
+ - **Policies**: declarative `Policy` (`when`/`require`) plus plain callables.
241
+ - **Semantic strategy**: deterministic `HeuristicSemanticAnalyzer` (default,
242
+ offline) and an optional provider-agnostic `LLMSemanticAnalyzer` with
243
+ timeouts and fail-open/closed behavior.
244
+ - **Backends**: `MemoryBackend`/`AsyncMemoryBackend` Protocols and in-memory
245
+ reference implementations; adapters for Mem0 and LangGraph `BaseStore`; a
246
+ generic `FunctionBackend`.
247
+ - **Audit**: JSON-serializable `AuditEvent`, `InMemoryAuditStore`, and
248
+ `JSONLAuditStore`. Secrets are redacted from audit content.
249
+ - **Telemetry**: stdlib `logging` (no `basicConfig`) and optional OpenTelemetry
250
+ tracing (injected, never global).
251
+ - **Modes**: `observe`, `warn`, `enforce` (default).
252
+ - **CLI**: `mimvo check` and `mimvo audit`.
253
+ - Test suite (unit, integration, security-invariant, property-based) and six
254
+ runnable examples.
255
+
256
+ [Unreleased]: https://github.com/jawadhussein462/mimvo/compare/v0.2.0...HEAD
257
+ [0.2.0]: https://github.com/jawadhussein462/mimvo/releases/tag/v0.2.0
258
+ [0.1.0]: https://github.com/jawadhussein462/mimvo/releases/tag/v0.1.0
mimvo-0.2.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or Derivative
95
+ Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work, excluding
103
+ those notices that do not pertain to any part of the Derivative
104
+ Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and do
117
+ not modify the License. You may add Your own attribution notices
118
+ within Derivative Works that You distribute, alongside or as an
119
+ addendum to the NOTICE text from the Work, provided that such
120
+ additional attribution notices cannot be construed as modifying
121
+ the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.