fidelis-memory 0.0.93__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 (214) hide show
  1. fidelis_memory-0.0.93/.cogito.example.json +25 -0
  2. fidelis_memory-0.0.93/.github/workflows/ci.yml +105 -0
  3. fidelis_memory-0.0.93/.github/workflows/release.yml +102 -0
  4. fidelis_memory-0.0.93/.gitignore +23 -0
  5. fidelis_memory-0.0.93/.zenodo.json +25 -0
  6. fidelis_memory-0.0.93/CHANGELOG.md +143 -0
  7. fidelis_memory-0.0.93/CODE_OF_CONDUCT.md +11 -0
  8. fidelis_memory-0.0.93/COMPLIANCE-DRAFT.md +95 -0
  9. fidelis_memory-0.0.93/CONTRIBUTING.md +53 -0
  10. fidelis_memory-0.0.93/Dockerfile +43 -0
  11. fidelis_memory-0.0.93/Formula/fidelis.rb +48 -0
  12. fidelis_memory-0.0.93/LICENSE +21 -0
  13. fidelis_memory-0.0.93/PKG-INFO +316 -0
  14. fidelis_memory-0.0.93/README.md +280 -0
  15. fidelis_memory-0.0.93/STATUS.md +117 -0
  16. fidelis_memory-0.0.93/WRITEUP-LONGMEMEVAL-20260423.md +150 -0
  17. fidelis_memory-0.0.93/agents.md +208 -0
  18. fidelis_memory-0.0.93/bench/BENCHMARK_INTEGRITY_AUDIT.md +202 -0
  19. fidelis_memory-0.0.93/bench/IMPROVEMENT-COMPARISON.md +58 -0
  20. fidelis_memory-0.0.93/bench/LAUNCH-FRAMING.md +39 -0
  21. fidelis_memory-0.0.93/bench/METHODOLOGY.md +175 -0
  22. fidelis_memory-0.0.93/bench/MULTIQUERY-ANALYSIS.md +132 -0
  23. fidelis_memory-0.0.93/bench/R&D-PLAN-2026-04-15.md +46 -0
  24. fidelis_memory-0.0.93/bench/REGRADE_README.md +68 -0
  25. fidelis_memory-0.0.93/bench/RESULTS-SUMMARY.md +159 -0
  26. fidelis_memory-0.0.93/bench/REVIEW-QUEUE.md +12 -0
  27. fidelis_memory-0.0.93/bench/ROADMAP-95-v2.md +127 -0
  28. fidelis_memory-0.0.93/bench/ROADMAP-95.md +106 -0
  29. fidelis_memory-0.0.93/bench/VALIDATION_PACK.md +139 -0
  30. fidelis_memory-0.0.93/bench/analysis-pipeline-2026-04-15.json +7964 -0
  31. fidelis_memory-0.0.93/bench/analyze_pipeline.py +147 -0
  32. fidelis_memory-0.0.93/bench/analyze_thresholds.py +36 -0
  33. fidelis_memory-0.0.93/bench/benchmark.py +293 -0
  34. fidelis_memory-0.0.93/bench/cases.json +62 -0
  35. fidelis_memory-0.0.93/bench/claude_code_session_eval.py +145 -0
  36. fidelis_memory-0.0.93/bench/claude_code_user_eval.py +111 -0
  37. fidelis_memory-0.0.93/bench/diff_runs.py +144 -0
  38. fidelis_memory-0.0.93/bench/eval.py +606 -0
  39. fidelis_memory-0.0.93/bench/eval_cases.json +62 -0
  40. fidelis_memory-0.0.93/bench/hardset.json +1060 -0
  41. fidelis_memory-0.0.93/bench/longmemeval_combined.py +465 -0
  42. fidelis_memory-0.0.93/bench/longmemeval_combined_pipeline.py +803 -0
  43. fidelis_memory-0.0.93/bench/longmemeval_combined_pipeline_dates.py +791 -0
  44. fidelis_memory-0.0.93/bench/longmemeval_combined_pipeline_flagship.py +840 -0
  45. fidelis_memory-0.0.93/bench/longmemeval_combined_pipeline_guard.py +937 -0
  46. fidelis_memory-0.0.93/bench/longmemeval_combined_pipeline_v31.py +1257 -0
  47. fidelis_memory-0.0.93/bench/longmemeval_combined_pipeline_v32.py +1273 -0
  48. fidelis_memory-0.0.93/bench/longmemeval_combined_pipeline_v33.py +1162 -0
  49. fidelis_memory-0.0.93/bench/longmemeval_combined_pipeline_v33_ablate.py +1066 -0
  50. fidelis_memory-0.0.93/bench/longmemeval_combined_pipeline_v34.py +1215 -0
  51. fidelis_memory-0.0.93/bench/longmemeval_combined_pipeline_v35.py +1222 -0
  52. fidelis_memory-0.0.93/bench/longmemeval_combined_verify.py +664 -0
  53. fidelis_memory-0.0.93/bench/longmemeval_full_pipeline.py +693 -0
  54. fidelis_memory-0.0.93/bench/longmemeval_hybrid.py +355 -0
  55. fidelis_memory-0.0.93/bench/longmemeval_multiquery.py +370 -0
  56. fidelis_memory-0.0.93/bench/longmemeval_prefix.py +324 -0
  57. fidelis_memory-0.0.93/bench/longmemeval_queryexp.py +928 -0
  58. fidelis_memory-0.0.93/bench/longmemeval_rerank.py +0 -0
  59. fidelis_memory-0.0.93/bench/longmemeval_retrieval.py +315 -0
  60. fidelis_memory-0.0.93/bench/longmemeval_scaffold_pref.py +894 -0
  61. fidelis_memory-0.0.93/bench/longmemeval_scaffold_temporal.py +890 -0
  62. fidelis_memory-0.0.93/bench/longmemeval_tuned.py +340 -0
  63. fidelis_memory-0.0.93/bench/longmemeval_turnlevel.py +448 -0
  64. fidelis_memory-0.0.93/bench/phase-0/LEARNINGS.md +48 -0
  65. fidelis_memory-0.0.93/bench/phase-2/build_hardset.py +77 -0
  66. fidelis_memory-0.0.93/bench/phase-2/learned_router.pkl +0 -0
  67. fidelis_memory-0.0.93/bench/phase-2/learned_router.py +179 -0
  68. fidelis_memory-0.0.93/bench/phase-2/retriever_contribution.json +52 -0
  69. fidelis_memory-0.0.93/bench/phase-2/retriever_contribution.md +21 -0
  70. fidelis_memory-0.0.93/bench/phase-2/retriever_contribution.py +120 -0
  71. fidelis_memory-0.0.93/bench/phase-2/retriever_contribution_logged.py +279 -0
  72. fidelis_memory-0.0.93/bench/phase-2/run_learned_router.sh +6 -0
  73. fidelis_memory-0.0.93/bench/phase-4/TEMPORAL_SCAFFOLD_DESIGN.md +44 -0
  74. fidelis_memory-0.0.93/bench/phase-4/temporal_scaffold.py +126 -0
  75. fidelis_memory-0.0.93/bench/phase-6/FLAGSHIP_DESIGN.md +32 -0
  76. fidelis_memory-0.0.93/bench/phase-6/flagship_escalation.py +154 -0
  77. fidelis_memory-0.0.93/bench/qa_eval.py +462 -0
  78. fidelis_memory-0.0.93/bench/qa_eval_runJ-v33.json +5161 -0
  79. fidelis_memory-0.0.93/bench/qa_eval_v2_runP-v35_qwen-max_top5_regraded.json +1822 -0
  80. fidelis_memory-0.0.93/bench/qa_eval_v3_routing.py +982 -0
  81. fidelis_memory-0.0.93/bench/qwen_native_arena.py +1101 -0
  82. fidelis_memory-0.0.93/bench/qwen_native_arena_results.md +171 -0
  83. fidelis_memory-0.0.93/bench/r5_ceiling_diagnostic.md +82 -0
  84. fidelis_memory-0.0.93/bench/regrade_qa.py +215 -0
  85. fidelis_memory-0.0.93/bench/results-2026-04-15.json +33 -0
  86. fidelis_memory-0.0.93/bench/results-combined-2026-04-15.json +32 -0
  87. fidelis_memory-0.0.93/bench/results-combined-pipeline-2026-04-15.json +48 -0
  88. fidelis_memory-0.0.93/bench/results-fixed-2026-04-15.json +35 -0
  89. fidelis_memory-0.0.93/bench/results-flagship-2026-04-15.json +49 -0
  90. fidelis_memory-0.0.93/bench/results-guard-2026-04-17.json +50 -0
  91. fidelis_memory-0.0.93/bench/results-hybrid-2026-04-15.json +32 -0
  92. fidelis_memory-0.0.93/bench/results-multiquery-2026-04-15.json +32 -0
  93. fidelis_memory-0.0.93/bench/results-prefix-2026-04-15.json +32 -0
  94. fidelis_memory-0.0.93/bench/results-rerank-2026-04-15.json +33 -0
  95. fidelis_memory-0.0.93/bench/results-tuned-2026-04-15.json +5682 -0
  96. fidelis_memory-0.0.93/bench/results-turnlevel-2026-04-15.json +32 -0
  97. fidelis_memory-0.0.93/bench/results-v31-2026-04-17.json +69 -0
  98. fidelis_memory-0.0.93/bench/results-v32-2026-04-17.json +74 -0
  99. fidelis_memory-0.0.93/bench/results-v33-2026-04-18.json +95 -0
  100. fidelis_memory-0.0.93/bench/run_ablations.py +461 -0
  101. fidelis_memory-0.0.93/bench/run_all.sh +17 -0
  102. fidelis_memory-0.0.93/bench/run_all_experiments.sh +36 -0
  103. fidelis_memory-0.0.93/bench/run_chunked.py +81 -0
  104. fidelis_memory-0.0.93/bench/run_improvements.sh +19 -0
  105. fidelis_memory-0.0.93/bench/scaffold_arena.py +795 -0
  106. fidelis_memory-0.0.93/bench/scaffold_arena_results.md +462 -0
  107. fidelis_memory-0.0.93/bench/scaffold_arena_round2.py +874 -0
  108. fidelis_memory-0.0.93/bench/scaffold_arena_round2_results.md +355 -0
  109. fidelis_memory-0.0.93/bench/scaffold_transfer_validation.md +153 -0
  110. fidelis_memory-0.0.93/bench/scaffold_transfer_validation.py +830 -0
  111. fidelis_memory-0.0.93/bench/scaffold_transfer_validation_raw.json +1201 -0
  112. fidelis_memory-0.0.93/bench/sweep_underperformance_diagnosis.md +297 -0
  113. fidelis_memory-0.0.93/docker-compose.yml +55 -0
  114. fidelis_memory-0.0.93/docs/DISPATCHER_DESIGN.md +262 -0
  115. fidelis_memory-0.0.93/docs/GENERALIZABILITY_SKEPTIC.md +238 -0
  116. fidelis_memory-0.0.93/docs/LAUNCH_DEFENSE.md +283 -0
  117. fidelis_memory-0.0.93/docs/RELEASE-SCOPE.md +94 -0
  118. fidelis_memory-0.0.93/docs/ROADMAP_CODEX.md +78 -0
  119. fidelis_memory-0.0.93/docs/SCAFFOLD_DISPATCHER_V031.md +100 -0
  120. fidelis_memory-0.0.93/docs/THRESHOLD-AUDIT.md +69 -0
  121. fidelis_memory-0.0.93/docs/claude-code-memory-demo.md +111 -0
  122. fidelis_memory-0.0.93/docs/full-reference.md +918 -0
  123. fidelis_memory-0.0.93/docs/internal/FLAGSHIP-PAPER-DRAFT.md +244 -0
  124. fidelis_memory-0.0.93/docs/internal/HANDOFF.md +64 -0
  125. fidelis_memory-0.0.93/docs/internal/PUBLISH-PLAN-20260425.md +141 -0
  126. fidelis_memory-0.0.93/docs/scaffold.md +96 -0
  127. fidelis_memory-0.0.93/experiments/DECISIONS.md +129 -0
  128. fidelis_memory-0.0.93/experiments/E0-baseline/compute_baseline.py +141 -0
  129. fidelis_memory-0.0.93/experiments/E0-baseline/receipt.json +79 -0
  130. fidelis_memory-0.0.93/experiments/E0-baseline/receipt.md +54 -0
  131. fidelis_memory-0.0.93/experiments/E1-decisions.md +15 -0
  132. fidelis_memory-0.0.93/experiments/E1-synthesis/adversarial-review.md +72 -0
  133. fidelis_memory-0.0.93/experiments/E1-synthesis/qa_eval_v3_E1_runP-v35.json +1419 -0
  134. fidelis_memory-0.0.93/experiments/E1-synthesis/qa_eval_v3_E1_runP-v35_receipt.json +36 -0
  135. fidelis_memory-0.0.93/experiments/E1-synthesis/qa_eval_v3_E1_runP-v35_summary.json +49 -0
  136. fidelis_memory-0.0.93/experiments/E1-synthesis/receipt.md +62 -0
  137. fidelis_memory-0.0.93/experiments/E2-gpt4o/adversarial-review.md +60 -0
  138. fidelis_memory-0.0.93/experiments/E2-gpt4o/qa_eval_v3_E2_runP-v35.json +6112 -0
  139. fidelis_memory-0.0.93/experiments/E2-gpt4o/qa_eval_v3_E2_runP-v35_receipt.json +67 -0
  140. fidelis_memory-0.0.93/experiments/E2-gpt4o/qa_eval_v3_E2_runP-v35_summary.json +84 -0
  141. fidelis_memory-0.0.93/experiments/E2-gpt4o/receipt.md +54 -0
  142. fidelis_memory-0.0.93/experiments/E2-gpt4o/write_receipt_md.py +102 -0
  143. fidelis_memory-0.0.93/experiments/E2a-tr-ablation/qa_eval_v3_E2a_runP-v35.json +1653 -0
  144. fidelis_memory-0.0.93/experiments/E2a-tr-ablation/qa_eval_v3_E2a_runP-v35_receipt.json +36 -0
  145. fidelis_memory-0.0.93/experiments/E2a-tr-ablation/qa_eval_v3_E2a_runP-v35_summary.json +49 -0
  146. fidelis_memory-0.0.93/experiments/E2a-tr-ablation/receipt.md +58 -0
  147. fidelis_memory-0.0.93/experiments/E3-langstate/PLAN.md +34 -0
  148. fidelis_memory-0.0.93/experiments/E3-temporal-fix/PLAN.md +85 -0
  149. fidelis_memory-0.0.93/experiments/E4-qtypes/PLAN.md +26 -0
  150. fidelis_memory-0.0.93/experiments/E5-final/PLAN.md +38 -0
  151. fidelis_memory-0.0.93/experiments/FINAL-REPORT-TEMPLATE.md +97 -0
  152. fidelis_memory-0.0.93/experiments/zeroLLM-FLAGSHIP-evidence/F1-smoke-scaffold.json +782 -0
  153. fidelis_memory-0.0.93/experiments/zeroLLM-FLAGSHIP-evidence/F1B-smoke-baseline-TR-only.json +132 -0
  154. fidelis_memory-0.0.93/experiments/zeroLLM-FLAGSHIP-evidence/F1B-smoke-baseline-partial.json +535 -0
  155. fidelis_memory-0.0.93/experiments/zeroLLM-FLAGSHIP-evidence/F2-FULL-scaffold.json +5644 -0
  156. fidelis_memory-0.0.93/experiments/zeroLLM-FLAGSHIP-evidence/SUMMARY.json +151 -0
  157. fidelis_memory-0.0.93/llms.txt +179 -0
  158. fidelis_memory-0.0.93/pyproject.toml +67 -0
  159. fidelis_memory-0.0.93/src/fidelis/__init__.py +22 -0
  160. fidelis_memory-0.0.93/src/fidelis/augment.py +111 -0
  161. fidelis_memory-0.0.93/src/fidelis/calibrate.py +214 -0
  162. fidelis_memory-0.0.93/src/fidelis/cli.py +353 -0
  163. fidelis_memory-0.0.93/src/fidelis/config.py +187 -0
  164. fidelis_memory-0.0.93/src/fidelis/degrade.py +263 -0
  165. fidelis_memory-0.0.93/src/fidelis/ingest_claude_sessions.py +355 -0
  166. fidelis_memory-0.0.93/src/fidelis/init_cmd.py +365 -0
  167. fidelis_memory-0.0.93/src/fidelis/lpci.py +252 -0
  168. fidelis_memory-0.0.93/src/fidelis/mcp_cmd.py +122 -0
  169. fidelis_memory-0.0.93/src/fidelis/mcp_server.py +204 -0
  170. fidelis_memory-0.0.93/src/fidelis/recall.py +296 -0
  171. fidelis_memory-0.0.93/src/fidelis/recall_b.py +346 -0
  172. fidelis_memory-0.0.93/src/fidelis/recall_hybrid.py +653 -0
  173. fidelis_memory-0.0.93/src/fidelis/recall_sessions.py +266 -0
  174. fidelis_memory-0.0.93/src/fidelis/scaffold/__init__.py +45 -0
  175. fidelis_memory-0.0.93/src/fidelis/scaffold/_core.py +156 -0
  176. fidelis_memory-0.0.93/src/fidelis/scaffold/preflight.py +153 -0
  177. fidelis_memory-0.0.93/src/fidelis/scaffold_server.py +193 -0
  178. fidelis_memory-0.0.93/src/fidelis/seed.py +373 -0
  179. fidelis_memory-0.0.93/src/fidelis/server.py +440 -0
  180. fidelis_memory-0.0.93/src/fidelis/snapshot.py +225 -0
  181. fidelis_memory-0.0.93/src/fidelis/telemetry.py +86 -0
  182. fidelis_memory-0.0.93/src/fidelis/watch_cmd.py +257 -0
  183. fidelis_memory-0.0.93/tests/__init__.py +0 -0
  184. fidelis_memory-0.0.93/tests/scaffold/test_anthropic_cache_wire.py +264 -0
  185. fidelis_memory-0.0.93/tests/scaffold/test_backend_portability.py +420 -0
  186. fidelis_memory-0.0.93/tests/scaffold/test_caching_properties.py +217 -0
  187. fidelis_memory-0.0.93/tests/scaffold/test_chat_history_compatibility.py +222 -0
  188. fidelis_memory-0.0.93/tests/scaffold/test_consumer_surface.py +315 -0
  189. fidelis_memory-0.0.93/tests/scaffold/test_e2e_store_query.py +140 -0
  190. fidelis_memory-0.0.93/tests/scaffold/test_openai_format_compatibility.py +362 -0
  191. fidelis_memory-0.0.93/tests/scaffold/test_real_tokenizer.py +187 -0
  192. fidelis_memory-0.0.93/tests/scaffold/test_retrieval_compatibility.py +238 -0
  193. fidelis_memory-0.0.93/tests/scaffold/test_runtime_compatibility.py +237 -0
  194. fidelis_memory-0.0.93/tests/scaffold/test_scaffold_core.py +122 -0
  195. fidelis_memory-0.0.93/tests/scaffold/test_scaffold_graceful_degrade.py +186 -0
  196. fidelis_memory-0.0.93/tests/scaffold/test_streaming_marker_integrity.py +385 -0
  197. fidelis_memory-0.0.93/tests/scaffold/test_top_score_contract.py +156 -0
  198. fidelis_memory-0.0.93/tests/test_broken_pipe_recovery.py +418 -0
  199. fidelis_memory-0.0.93/tests/test_dead_letter.py +131 -0
  200. fidelis_memory-0.0.93/tests/test_graceful_degrade.py +218 -0
  201. fidelis_memory-0.0.93/tests/test_graceful_degrade_corruption.py +57 -0
  202. fidelis_memory-0.0.93/tests/test_graceful_shutdown.py +149 -0
  203. fidelis_memory-0.0.93/tests/test_init_plist_contents.py +168 -0
  204. fidelis_memory-0.0.93/tests/test_p0_score_bypass.py +146 -0
  205. fidelis_memory-0.0.93/tests/test_public_install_truth.py +50 -0
  206. fidelis_memory-0.0.93/tests/test_recall_hybrid.py +215 -0
  207. fidelis_memory-0.0.93/tests/test_session_memory.py +328 -0
  208. fidelis_memory-0.0.93/tests/test_smoke.py +261 -0
  209. fidelis_memory-0.0.93/tests/test_telemetry.py +64 -0
  210. fidelis_memory-0.0.93/tests/test_telemetry_kill_actually_kills.py +152 -0
  211. fidelis_memory-0.0.93/tests/test_verify_guard.py +79 -0
  212. fidelis_memory-0.0.93/tests/test_watch_backpressure.py +117 -0
  213. fidelis_memory-0.0.93/tests/test_write_fallback_contract.py +139 -0
  214. fidelis_memory-0.0.93/tests/test_zero_llm_regression.py +109 -0
@@ -0,0 +1,25 @@
1
+ {
2
+ "_comment": "Copy to .cogito.json and edit. All fields optional — env vars override everything.",
3
+
4
+ "port": 19420,
5
+ "user_id": "agent",
6
+
7
+ "store_path": "~/.cogito/store",
8
+ "collection": "cogito_memory",
9
+
10
+ "ollama_url": "http://localhost:11434",
11
+ "llm_model": "mistral:7b",
12
+ "embed_model": "nomic-embed-text",
13
+
14
+ "filter_endpoint": "http://127.0.0.1:19051",
15
+ "filter_token": "your-gateway-or-api-token",
16
+ "filter_model": "anthropic/claude-haiku-4-5",
17
+ "filter_timeout_ms": 12000,
18
+
19
+ "recall_limit": 50,
20
+ "recall_threshold": 400.0,
21
+ "query_threshold": 250.0,
22
+
23
+ "_note_filter": "filter_endpoint accepts any OpenAI-compatible URL. Set ANTHROPIC_API_KEY instead to call Anthropic directly.",
24
+ "_note_extraction": "Add custom_fact_extraction_prompt here to override mem0's default extraction prompt (recommended for technical domains — see zer0lint)."
25
+ }
@@ -0,0 +1,105 @@
1
+ name: CI
2
+
3
+ # Hermetic CI for the current Fidelis Memory release: runs on fresh Ubuntu and macOS runners. Proves the
4
+ # fidelis package installs cleanly from source on a box that has never seen it
5
+ # before — the equivalent of a beta tester installing the tagged source. Tests
6
+ # that require a live Ollama or LLM endpoint are excluded by directory; the
7
+ # rest (~370) must pass on every commit.
8
+ #
9
+ # What this catches:
10
+ # - missing dependencies (e.g. the `ollama` python lib that crashed our
11
+ # fresh-venv smoke test before we added it to pyproject)
12
+ # - macOS-only or Linux-only path bugs
13
+ # - Python-version regressions across 3.10 through 3.14
14
+ # - lint regressions
15
+ # - silent test-collection failures
16
+ #
17
+ # What this does NOT catch (intentionally — handled by manual smoke):
18
+ # - live Ollama embedding behaviour (tests/scaffold/test_e2e_store_query.py)
19
+ # - LLM backend portability (tests/scaffold/test_backend_portability.py)
20
+ # - Anthropic / OpenAI streaming wire format
21
+
22
+ on:
23
+ push:
24
+ branches: [main]
25
+ tags: ["v*"]
26
+ pull_request:
27
+ branches: [main]
28
+
29
+ concurrency:
30
+ group: ci-${{ github.ref }}
31
+ cancel-in-progress: true
32
+
33
+ jobs:
34
+ test:
35
+ name: pytest ${{ matrix.os }} / py${{ matrix.python-version }}
36
+ runs-on: ${{ matrix.os }}
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ os: [ubuntu-latest, macos-latest]
41
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
42
+
43
+ steps:
44
+ - name: Checkout
45
+ uses: actions/checkout@v4
46
+
47
+ - name: Set up Python ${{ matrix.python-version }}
48
+ uses: actions/setup-python@v5
49
+ with:
50
+ python-version: ${{ matrix.python-version }}
51
+ cache: pip
52
+
53
+ - name: Install fidelis (proves clean install)
54
+ run: |
55
+ python -m pip install --upgrade pip
56
+ pip install -e ".[dev]"
57
+
58
+ - name: Verify console scripts are wired
59
+ run: |
60
+ fidelis --help
61
+
62
+ - name: Ruff lint
63
+ run: ruff check src/ tests/
64
+
65
+ - name: Pytest (CI-runnable suite)
66
+ env:
67
+ FIDELIS_QUEUE_DIR: ${{ runner.temp }}/fidelis-ci-queue
68
+ run: |
69
+ pytest tests/ \
70
+ --ignore=tests/scaffold/test_e2e_store_query.py \
71
+ --ignore=tests/scaffold/test_backend_portability.py \
72
+ --ignore=tests/scaffold/test_anthropic_cache_wire.py \
73
+ --ignore=tests/scaffold/test_openai_format_compatibility.py \
74
+ --ignore=tests/scaffold/test_streaming_marker_integrity.py \
75
+ -q --no-header --tb=line
76
+
77
+ - name: Smoke — package metadata sanity
78
+ run: |
79
+ python -c "import fidelis; assert fidelis.__version__, 'no version'; print('version:', fidelis.__version__)"
80
+ python -c "from fidelis import degrade, server, init_cmd, watch_cmd, mcp_server; print('imports OK')"
81
+
82
+ - name: Smoke — plist contents test (macOS-only behaviour)
83
+ if: runner.os == 'macOS'
84
+ run: |
85
+ pytest tests/test_init_plist_contents.py -v --no-header
86
+
87
+ build:
88
+ name: build sdist + wheel
89
+ runs-on: ubuntu-latest
90
+ needs: test
91
+ steps:
92
+ - uses: actions/checkout@v4
93
+ - uses: actions/setup-python@v5
94
+ with:
95
+ python-version: "3.12"
96
+ - name: Build distributions
97
+ run: |
98
+ pip install --upgrade pip build
99
+ python -m build
100
+ - name: Upload dist artifacts
101
+ uses: actions/upload-artifact@v4
102
+ with:
103
+ name: fidelis-dist
104
+ path: dist/
105
+ retention-days: 14
@@ -0,0 +1,102 @@
1
+ name: Release
2
+
3
+ # Manual, tag-driven PyPI release for the `fidelis-memory` distribution
4
+ # (import name and CLI commands stay `fidelis`; only the PyPI listing name
5
+ # differs, because the plain `fidelis` name is squatted by an unrelated
6
+ # project). Triggered by hand via `workflow_dispatch` against an existing
7
+ # `vX.Y.Z` tag — never runs automatically on push, so a release always
8
+ # requires a deliberate dispatch.
9
+ #
10
+ # Flow: checkout the given tag -> verify the tag matches
11
+ # `[project].version` in pyproject.toml -> lint + test (same gate as CI) ->
12
+ # build sdist/wheel -> twine check -> publish to PyPI via Trusted
13
+ # Publishing (OIDC, no stored API token).
14
+
15
+ on:
16
+ workflow_dispatch:
17
+ inputs:
18
+ tag:
19
+ description: "Git tag to release (e.g. v0.0.92) — must already exist and match pyproject.toml's version"
20
+ required: true
21
+ type: string
22
+
23
+ jobs:
24
+ build-and-test:
25
+ name: verify + build
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - name: Checkout tag
29
+ uses: actions/checkout@v4
30
+ with:
31
+ ref: ${{ inputs.tag }}
32
+
33
+ - name: Set up Python
34
+ uses: actions/setup-python@v5
35
+ with:
36
+ python-version: "3.12"
37
+ cache: pip
38
+
39
+ - name: Verify tag matches package version
40
+ run: |
41
+ PKG_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
42
+ TAG="${{ inputs.tag }}"
43
+ TAG_VERSION="${TAG#v}"
44
+ echo "pyproject.toml version: $PKG_VERSION"
45
+ echo "tag version: $TAG_VERSION"
46
+ if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
47
+ echo "::error::Tag $TAG does not match pyproject.toml version $PKG_VERSION"
48
+ exit 1
49
+ fi
50
+
51
+ - name: Install fidelis (dev extras — pinned ruff)
52
+ run: |
53
+ python -m pip install --upgrade pip
54
+ pip install ".[dev]"
55
+
56
+ - name: Ruff lint
57
+ run: ruff check src/ tests/
58
+
59
+ - name: Pytest (CI-runnable suite)
60
+ env:
61
+ FIDELIS_QUEUE_DIR: ${{ runner.temp }}/fidelis-release-queue
62
+ run: |
63
+ pytest tests/ \
64
+ --ignore=tests/scaffold/test_e2e_store_query.py \
65
+ --ignore=tests/scaffold/test_backend_portability.py \
66
+ --ignore=tests/scaffold/test_anthropic_cache_wire.py \
67
+ --ignore=tests/scaffold/test_openai_format_compatibility.py \
68
+ --ignore=tests/scaffold/test_streaming_marker_integrity.py \
69
+ -q --no-header --tb=line
70
+
71
+ - name: Build sdist + wheel
72
+ run: |
73
+ pip install --upgrade build twine
74
+ python -m build
75
+
76
+ - name: Twine check
77
+ run: twine check dist/*
78
+
79
+ - name: Upload dist artifact
80
+ uses: actions/upload-artifact@v4
81
+ with:
82
+ name: fidelis-memory-dist
83
+ path: dist/
84
+
85
+ publish-pypi:
86
+ name: publish to PyPI
87
+ runs-on: ubuntu-latest
88
+ needs: build-and-test
89
+ environment: pypi
90
+ permissions:
91
+ id-token: write
92
+ steps:
93
+ - name: Download dist artifact
94
+ uses: actions/download-artifact@v4
95
+ with:
96
+ name: fidelis-memory-dist
97
+ path: dist/
98
+
99
+ - name: Publish to PyPI (Trusted Publishing / OIDC)
100
+ uses: pypa/gh-action-pypi-publish@release/v1
101
+ with:
102
+ packages-dir: dist/
@@ -0,0 +1,23 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.pyc
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+ .venv/
9
+ venv/
10
+ node_modules/
11
+ .env
12
+ .cogito.json
13
+ snapshot.md
14
+ *.sqlite3
15
+ *.chroma/
16
+ .cogito/store/
17
+ .pytest_cache/
18
+ PENDING-PAPER*.md
19
+ TODO.md
20
+
21
+ # Benchmark run-log artifacts (outputs, not source)
22
+ *.log
23
+ bench/runs/
@@ -0,0 +1,25 @@
1
+ {
2
+ "title": "fidelis: zero-LLM agent memory for Claude Code and AI agents",
3
+ "description": "fidelis is zero-LLM agent memory for Claude Code and AI agents: a local-first memory layer whose default retrieval path uses BM25, dense vectors, and reciprocal rank fusion with no LLM call. It returns your original passages verbatim instead of paraphrasing and runs fully local. Benchmarked on LongMemEval-S.",
4
+ "upload_type": "software",
5
+ "access_right": "open",
6
+ "license": "MIT",
7
+ "creators": [
8
+ {
9
+ "name": "Bosch, Rolando",
10
+ "orcid": "0009-0005-4896-1112",
11
+ "affiliation": "Hermes Labs"
12
+ }
13
+ ],
14
+ "keywords": [
15
+ "agent memory",
16
+ "retrieval-augmented generation",
17
+ "BM25",
18
+ "reciprocal rank fusion",
19
+ "LLM agents",
20
+ "Claude Code",
21
+ "local-first",
22
+ "zero-LLM",
23
+ "LongMemEval"
24
+ ]
25
+ }
@@ -0,0 +1,143 @@
1
+ # Changelog
2
+
3
+ # Unreleased
4
+
5
+ ## v0.0.93 — 2026-08-05
6
+
7
+ - Publish the Hermes Labs distribution to PyPI as `fidelis-memory`.
8
+ - Make **Fidelis Memory** the user-facing product name across package metadata
9
+ and primary documentation, while preserving the `fidelis` repository, import,
10
+ and CLI names for compatibility.
11
+ - Replace the GitHub-source install path in primary documentation with the
12
+ version-pinned PyPI installation command.
13
+
14
+ ## v0.0.92 — 2026-08-04
15
+
16
+ - Preserve `/add` input verbatim when the extraction model returns no facts,
17
+ expose the degraded fallback through HTTP and CLI, and apply the same
18
+ no-silent-loss rule during queued-write replay.
19
+ - Correct every current install surface to use tagged GitHub source; the PyPI
20
+ project named `fidelis` is unrelated to Hermes Labs Fidelis.
21
+ - Align public package status with v0.0.91 and remove a dead benchmark link.
22
+ - Narrow local-data and compliance wording to the demonstrated boundary.
23
+ - Default mem0 telemetry off for direct server launches so SIGTERM completes
24
+ cleanly, while preserving explicit opt-in; document the remaining Chroma
25
+ settings and extend CI coverage through Python 3.14.
26
+ - Remove cross-project proof language from current Fidelis presentation.
27
+ - Add a regression test for the public installation contract.
28
+
29
+ # fidelis era
30
+ ## v0.0.91 — 2026-06-18 (public release)
31
+ - Public open-source release on GitHub + Zenodo DOI.
32
+ - Repo hygiene only: relativized benchmark paths, removed run-log artifacts, refreshed module naming, added Zenodo metadata. No API changes vs v0.0.9.
33
+
34
+
35
+ ## v0.0.5 — 2026-04-24 (first release as `fidelis`, renamed from `cogito-ergo`)
36
+
37
+ **Package rename: `cogito-ergo` → `fidelis`.** Version reset for the new
38
+ PyPI package. The old `cogito-ergo` PyPI entries (0.0.8 and 0.3.0) remain
39
+ published but are now deprecated pointers to this package. Note: a prior
40
+ `cogito-ergo` v0.0.5 also exists in the changelog below — these are
41
+ **different packages**; the version numbers do not collide on PyPI.
42
+
43
+ **Headline: zero-LLM is the default retrieval tier.** The repositioning
44
+ reflects what the benchmark numbers actually show — the zero-LLM path is
45
+ the production moat (83.2% R@1 at $0, fully local); the LLM tiers are
46
+ benchmark-tuned and held as experimental until calibration is fixed.
47
+
48
+ ### Rename details
49
+
50
+ - PyPI package: `cogito-ergo` → `fidelis`
51
+ - Import name: `from cogito` → `from fidelis`
52
+ - CLI: `cogito ...` → `fidelis ...`, `cogito-server` → `fidelis-server`
53
+ - Data paths kept as `~/.cogito/` for backward-compat with existing deployments
54
+ - Env vars kept as `COGITO_*` for backward-compat
55
+ - ChromaDB collection names kept as `cogito_memory` to avoid data loss
56
+
57
+ ### Default change (breaking for callers relying on default tier)
58
+
59
+ - `recall_hybrid()` default tier flipped from `filter` to `zero_llm`.
60
+ Callers that relied on the filter default must pass `tier="filter"`
61
+ explicitly. Affects: `fidelis recall-hybrid` CLI, `POST /recall_hybrid`,
62
+ `recall_hybrid(...)` Python API.
63
+
64
+ ### Features
65
+
66
+ - New `since` parameter on `/recall` and `fidelis recall --since` —
67
+ ISO-8601 timestamp filter applied after Stage 2.
68
+
69
+ ### Observability & reliability
70
+
71
+ - New `fidelis.telemetry` module: escalation-rate log + `rate()` summariser.
72
+ Makes the 80%-vs-10% calibration miss measurable at runtime. Crash-safe.
73
+ - `degrade.replay_queue` corrupt-file branch now covered by tests.
74
+
75
+ ### Tests
76
+
77
+ - `tests/test_zero_llm_regression.py` — 4 tests pin zero-LLM default:
78
+ no filter/flagship invocation, works without LLM config, matches
79
+ explicit-tier output, handles empty corpus.
80
+ - `tests/test_telemetry.py` — 5 tests for the new observability module.
81
+ - `tests/test_verify_guard.py` — regression pin for the documented
82
+ verify-guard-inactive bug; xfail until fixed.
83
+ - `tests/test_graceful_degrade_corruption.py` — replay_queue corruption.
84
+ - Test baseline: 61 → 72 passing + 2 defensive skips.
85
+
86
+ ### Benchmarks (for reference, not default-path claims)
87
+
88
+ - `recall_hybrid` at `tier="flagship"` hits 96.4% R@1 on LongMemEval_S
89
+ (470 questions, runP-v35, 2026-04-18). Escalates on ~80% of queries
90
+ under current calibration vs 10% intended — known limitation
91
+ documented in STATUS.md and `docs/RELEASE-SCOPE.md`. Do not use the
92
+ 96.4% number as a cost-model baseline.
93
+ - Zero-LLM per-category R@1 (now the default): single-session-assistant
94
+ 100%, knowledge-update 96%, single-session-user 95%, multi-session 83%,
95
+ single-session-preference 67%, temporal-reasoning 66%.
96
+
97
+ ### Docs
98
+
99
+ - README repositioned: zero-LLM leads, LLM tiers labeled experimental,
100
+ per-category table published.
101
+ - `docs/THRESHOLD-AUDIT.md` — pins prod vs bench escalation constants.
102
+ - `docs/RELEASE-SCOPE.md` — in-scope / held-for-later with unlock criteria.
103
+
104
+ ---
105
+
106
+ # cogito-ergo era (predecessor package, retained for history)
107
+
108
+ ## v0.3.0 — 2026-04-16
109
+
110
+ - New `recall_hybrid` path: BM25 + dense + RRF with tiered LLM escalation.
111
+ Port of the architecture that reached **93.4% R@1 on LongMemEval_S** (up
112
+ from the 56% mem0 baseline). Superseded by v0.3.1 (96.4%).
113
+ - New `POST /recall_hybrid` HTTP endpoint and `fidelis recall-hybrid` CLI.
114
+ - New tiers: `zero_llm` (no LLM, fastest), `filter` (cheap rerank, default),
115
+ `flagship` (stronger model, 4x larger snippets).
116
+ - New env vars: `COGITO_FLAGSHIP_ENDPOINT`, `COGITO_FLAGSHIP_TOKEN`,
117
+ `COGITO_FLAGSHIP_MODEL`, `COGITO_FLAGSHIP_TIMEOUT_MS`,
118
+ `COGITO_HYBRID_COSINE_WEIGHT`. Optional `[hybrid]` extra for `bm25s`.
119
+ - Existing `/recall` and `/recall_b` behavior is unchanged. The hybrid path
120
+ is strictly opt-in.
121
+
122
+ ## v0.2.0 — 2026-03-28
123
+
124
+ - Dual-pipeline recall: zero-LLM `recall_b` (RRF multi-query) feeds `recall` (integer-pointer LLM filter)
125
+ - Snapshot layer for high-fidelity context injection
126
+ - Combined eval harness (`bench/`)
127
+ - Technical extraction prompt baked into default config (no external prompt file needed)
128
+ - Qwen3/qwen3.5 support via native Ollama `/api/chat` with `think:false`
129
+
130
+ ## v0.0.5 — 2026-03-28
131
+
132
+ - Fixed benchmark attribution: qwen3.5:2b filter model (not claude-haiku-4-5)
133
+ - Added Hermes Labs PyPI metadata (author, homepage, keywords)
134
+ - Added agents.md for AI agent discoverability
135
+ - Updated llms.txt with full API shapes and integration notes
136
+ - Added "Built by Hermes Labs" ecosystem section to README
137
+
138
+ ## v0.1.0 — 2026-03
139
+
140
+ - Initial two-stage integer-pointer recall pipeline
141
+ - mem0 + ChromaDB vector store backend
142
+ - HTTP server with `/recall`, `/add`, `/snapshot` endpoints
143
+ - `fidelis calibrate` for vocab map generation
@@ -0,0 +1,11 @@
1
+ # Code of Conduct
2
+
3
+ This project follows the [Contributor Covenant v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
4
+
5
+ All participants in this project are expected to abide by its terms.
6
+
7
+ ## Enforcement
8
+
9
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainer at roli@hermes-labs.ai.
10
+
11
+ All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
@@ -0,0 +1,95 @@
1
+ # COMPLIANCE-DRAFT.md — cogito-ergo
2
+
3
+ **Status:** DRAFT. Internal self-audit artifact generated 2026-04-17 by
4
+ `hermes_deliverable`. Not a conformity declaration; not a legal attestation.
5
+ Review and sign off before distribution.
6
+
7
+ **System:** cogito-ergo — semantic memory retrieval for AI agents. Retrieves
8
+ prior conversations via integer-pointer filter (LLM returns only integers,
9
+ structurally cannot corrupt returned content). Hybrid R@1 = 96.4% on
10
+ LongMemEval_S.
11
+
12
+ **Risk classification under EU AI Act:** Not a high-risk AI system per Annex III
13
+ on its own. Becomes high-risk when used as a retrieval layer inside a
14
+ high-risk downstream system (clinical decision, hiring, credit, law enforcement,
15
+ emergency triage). Compliance posture below assumes the downstream context may
16
+ be high-risk — compliance documentation written to meet the strictest case.
17
+
18
+ ---
19
+
20
+ ## Article 9 — Risk management & data provenance
21
+
22
+ **Data sources used by cogito-ergo:**
23
+
24
+ - Caller-provided conversation logs (not owned or stored by the library itself
25
+ beyond the session the caller passes in).
26
+ - No training data. cogito-ergo is a retrieval library, not a trained model.
27
+ - Embedding model: `nomic-embed-text` via Ollama (local, open-weights).
28
+ - Filter LLM: caller-supplied. Default recommendation: small local model
29
+ (qwen3.5:2b / 4b). See `README.md` for the full calibration.
30
+
31
+ **Risk identified:**
32
+ 1. Retrieval may miss critical context (false negative). R@1 = 96.4%; 3.6%
33
+ failure mode is a missed retrieval.
34
+ 2. Retrieval may surface stale or contradicted content (staleness). Mitigation:
35
+ caller must version memories or pass a freshness filter.
36
+ 3. Embedding model drift if Ollama updates the nomic-embed-text pointer.
37
+ Mitigation: pin model version in caller deployment.
38
+
39
+ **Residual risk:** acceptable for non-safety-critical uses. NOT acceptable as
40
+ sole source of truth for high-risk decisions; always combine with authoritative
41
+ retrieval.
42
+
43
+ ## Article 10 — Data governance
44
+
45
+ - No PII stored by the library.
46
+ - Caller is responsible for the lawful basis of the memories they pass in.
47
+ - No bias metrics computed by cogito-ergo itself (retrieval is content-agnostic).
48
+ - Bias in retrieved content is a function of bias in the caller's memory store;
49
+ cogito-ergo does not filter for bias.
50
+
51
+ ## Article 14 — Human oversight & override
52
+
53
+ - **Override mechanism:** caller controls all inputs and outputs. cogito-ergo
54
+ does not act; it returns ranked memory pointers. The caller's agent is where
55
+ oversight is enforced.
56
+ - **Kill-switch:** library is a Python function call. Stopping it is `raise`.
57
+ - **Audit trail:** caller is responsible for logging retrieval events. See
58
+ `examples/audit_logging.py` (TODO, not yet implemented — flagged as gap).
59
+
60
+ ## Article 15 — Accuracy, robustness, cybersecurity
61
+
62
+ - **Accuracy:** benchmarked at R@1 = 96.4% on LongMemEval_S (runP-v35, 2026-04-18). Measurement
63
+ methodology in `bench/`.
64
+ - **Robustness:** TODO — adversarial inputs (prompt injection in memory content)
65
+ have not been systematically fuzzed. Flagged as gap. See `little-canary` tool
66
+ for integration candidate.
67
+ - **Cybersecurity:** the integer-pointer filter is a structural mitigation —
68
+ the filter LLM cannot hallucinate content; it can only pick or mis-pick an
69
+ index. Worst case is mis-retrieval, not fabricated content.
70
+
71
+ ## Article 86 — Right to explanation
72
+
73
+ For any retrieved memory, the caller receives:
74
+ - The integer index chosen by the filter LLM
75
+ - The similarity score of each candidate
76
+ - The full candidate list considered
77
+
78
+ This is enough for a downstream system to explain *why this memory and not
79
+ others*. cogito-ergo itself does not produce natural-language explanations.
80
+
81
+ ## Known limitations (disclosure)
82
+
83
+ 1. No bias testing (no test suite; flagged).
84
+ 2. No behavioral robustness harness against memory-content injection (flagged).
85
+ 3. No model registry; depends on caller pinning their embedding and filter
86
+ model versions.
87
+ 4. No incident-response runbook; failures are exceptions the caller must handle.
88
+ 5. English-optimized; performance on non-English queries not measured.
89
+
90
+ ## Remediation plan (next 90 days)
91
+
92
+ - Add adversarial memory-injection test suite (sprint 1)
93
+ - Add example audit-logging integration (sprint 1)
94
+ - Add calibration bench for non-English queries (sprint 2)
95
+ - Publish incident-response runbook for common failure modes (sprint 2)
@@ -0,0 +1,53 @@
1
+ # Contributing
2
+
3
+ ## Running tests
4
+
5
+ ```bash
6
+ pip install -e ".[dev]"
7
+ python -m pytest tests/ -v
8
+ ```
9
+
10
+ Tests in `tests/` are server-free — no Ollama or ChromaDB required. Mark any test that needs a live server with `pytest.mark.skip(reason="requires server")`.
11
+
12
+ ## Adding bench cases
13
+
14
+ Bench cases live in `bench/`. Each case is a JSON file with `query`, `expected_ids`, and optional `notes`. Run the combined eval with:
15
+
16
+ ```bash
17
+ python bench/eval.py
18
+ ```
19
+
20
+ Add cases that cover real retrieval failures or regressions. Include the memory seed data in `bench/seeds/` if needed.
21
+
22
+ ## Code style
23
+
24
+ - Line length: 100
25
+ - Formatter/linter: `ruff` (`pip install ruff`, then `ruff check .` and `ruff format .`)
26
+ - Target: Python 3.10+
27
+
28
+ ## `top_score` input contract
29
+
30
+ `wrap_system_prompt(qtype, top_score=...)` accepts any numeric value for `top_score`:
31
+
32
+ | Input | Behaviour |
33
+ |---|---|
34
+ | `None` | Treated as unknown → `[retrieval-quality: unknown]` |
35
+ | `float` in `[0, 1]` | Used as-is for confidence band selection |
36
+ | `float` outside `[0, 1]` (e.g. `-0.5`, `1.5`) | **Clamped** silently to `[0, 1]` — no exception raised |
37
+ | `nan` / `inf` / `-inf` | Treated as `None` → `[retrieval-quality: unknown]` |
38
+ | `int` `0` / `1` | Coerced to `float 0.0` / `1.0` |
39
+ | `bool` `True` / `False` | Coerced to `1.0` / `0.0` (Python bool subclasses int) |
40
+
41
+ Rationale: retrieval backends may return cosine values fractionally outside `[0, 1]` due to float
42
+ arithmetic, or `nan`/`inf` on degenerate inputs. The scaffold uses `top_score` only for a
43
+ cosmetic confidence label, so clamping is the principle-of-least-surprise choice — it never
44
+ raises and never breaks the caller's pipeline.
45
+
46
+ See `tests/scaffold/test_top_score_contract.py` for the full contract test suite.
47
+
48
+ ## Pull requests
49
+
50
+ 1. Fork and branch from `main`.
51
+ 2. Keep changes focused — one feature or fix per PR.
52
+ 3. Add a test if the change touches retrieval logic.
53
+ 4. Update `CHANGELOG.md` under an `Unreleased` section.
@@ -0,0 +1,43 @@
1
+ # Fidelis Dockerfile — runs fidelis-server in a container.
2
+ # Build: docker build -t fidelis:0.1.0 .
3
+ # Run: docker run -p 19420:19420 -v fidelis-data:/data fidelis:0.1.0
4
+ #
5
+ # This image runs the fidelis-server only. For embedding/Ollama you point at
6
+ # a separate ollama container (see docker-compose.yml) or your host's Ollama.
7
+
8
+ FROM python:3.12-slim
9
+
10
+ LABEL org.opencontainers.image.title="fidelis"
11
+ LABEL org.opencontainers.image.description="Agent memory with zero-LLM retrieval and a $0-incremental QA scaffold"
12
+ LABEL org.opencontainers.image.source="https://github.com/hermes-labs-ai/fidelis"
13
+ LABEL org.opencontainers.image.licenses="MIT"
14
+ LABEL org.opencontainers.image.version="0.1.0"
15
+
16
+ # System deps for chromadb + sqlite
17
+ RUN apt-get update \
18
+ && apt-get install -y --no-install-recommends \
19
+ curl \
20
+ && rm -rf /var/lib/apt/lists/*
21
+
22
+ WORKDIR /app
23
+
24
+ # Install fidelis from source (alternative: COPY pyproject.toml + pip install .)
25
+ COPY pyproject.toml README.md LICENSE ./
26
+ COPY src/ ./src/
27
+ RUN pip install --no-cache-dir -e .
28
+
29
+ # Persist memory store outside the container
30
+ VOLUME ["/data"]
31
+ ENV FIDELIS_HOME=/data
32
+ ENV FIDELIS_PORT=19420
33
+
34
+ # Default Ollama URL points at host (override via env)
35
+ ENV OLLAMA_URL=http://host.docker.internal:11434
36
+
37
+ EXPOSE 19420
38
+
39
+ # Health check: GET /health
40
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
41
+ CMD curl -fs http://localhost:19420/health || exit 1
42
+
43
+ CMD ["fidelis-server"]
@@ -0,0 +1,48 @@
1
+ # Homebrew formula for fidelis.
2
+ #
3
+ # Tap install (after the formula is in a tap):
4
+ # brew tap hermes-labs-ai/tap
5
+ # brew install fidelis
6
+ #
7
+ # Local install (testing):
8
+ # brew install --build-from-source ./Formula/fidelis.rb
9
+ #
10
+ # This formula installs fidelis as a standalone Python tool via uv (or pip),
11
+ # wraps the entry points, and registers a launchd service via `brew services`.
12
+
13
+ class Fidelis < Formula
14
+ include Language::Python::Virtualenv
15
+
16
+ desc "Agent memory with zero-LLM retrieval and a $0-incremental QA scaffold"
17
+ homepage "https://github.com/hermes-labs-ai/fidelis"
18
+ url "https://github.com/hermes-labs-ai/fidelis/archive/refs/tags/v0.1.0.tar.gz"
19
+ # SHA256 placeholder — populated when the v0.1.0 tag tarball is published.
20
+ # `brew create` and `brew bump-formula-pr` will fill this in automatically
21
+ # once the GitHub release tarball is available.
22
+ sha256 "TBD-fill-when-v0.1.0-tag-tarball-is-published"
23
+ license "MIT"
24
+ version "0.1.0"
25
+
26
+ depends_on "python@3.12"
27
+
28
+ # Resource declarations are managed by `brew update-python-resources Formula/fidelis.rb`
29
+ # once mem0ai and chromadb pin a stable version line.
30
+
31
+ def install
32
+ virtualenv_install_with_resources
33
+ end
34
+
35
+ service do
36
+ run [opt_bin/"fidelis-server"]
37
+ keep_alive true
38
+ log_path var/"log/fidelis-server.log"
39
+ error_log_path var/"log/fidelis-server.log"
40
+ working_dir HOMEBREW_PREFIX
41
+ end
42
+
43
+ test do
44
+ # Confirm the entry points install and respond to --help
45
+ system bin/"fidelis", "--help"
46
+ system bin/"fidelis-server", "--help"
47
+ end
48
+ end