flurryx-code-memory 0.4.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 (167) hide show
  1. flurryx_code_memory-0.4.0/.claude-plugin/marketplace.json +30 -0
  2. flurryx_code_memory-0.4.0/.env.example +53 -0
  3. flurryx_code_memory-0.4.0/.gitignore +26 -0
  4. flurryx_code_memory-0.4.0/CHANGELOG.md +902 -0
  5. flurryx_code_memory-0.4.0/PKG-INFO +26 -0
  6. flurryx_code_memory-0.4.0/README.md +1708 -0
  7. flurryx_code_memory-0.4.0/docker/docker-compose.yml +50 -0
  8. flurryx_code_memory-0.4.0/docs/BENCHMARK.md +502 -0
  9. flurryx_code_memory-0.4.0/docs/BENCHMARK_VS_BASELINE.json +1669 -0
  10. flurryx_code_memory-0.4.0/docs/BENCHMARK_VS_BASELINE.md +335 -0
  11. flurryx_code_memory-0.4.0/docs/architecture.png +0 -0
  12. flurryx_code_memory-0.4.0/docs/benchmark-raw.json +3350 -0
  13. flurryx_code_memory-0.4.0/docs/hero.png +0 -0
  14. flurryx_code_memory-0.4.0/install.ps1 +217 -0
  15. flurryx_code_memory-0.4.0/install.sh +181 -0
  16. flurryx_code_memory-0.4.0/plugins/claude-code/.claude-plugin/plugin.json +10 -0
  17. flurryx_code_memory-0.4.0/plugins/claude-code/README.md +269 -0
  18. flurryx_code_memory-0.4.0/plugins/claude-code/commands/code-memory.md +24 -0
  19. flurryx_code_memory-0.4.0/plugins/claude-code/hooks/hooks.json +71 -0
  20. flurryx_code_memory-0.4.0/plugins/claude-code/install.sh +185 -0
  21. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/lib/claim-intent.js +158 -0
  22. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/lib/claim-intent.test.js +159 -0
  23. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/lib/format.js +79 -0
  24. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/lib/intent.js +53 -0
  25. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/lib/io.js +42 -0
  26. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/lib/memory.js +155 -0
  27. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/lib/state.js +185 -0
  28. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/on-post-tool.js +84 -0
  29. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/on-pre-tool.js +72 -0
  30. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/on-retrieve-seen.js +20 -0
  31. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/on-session-start.js +34 -0
  32. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/on-stop.js +73 -0
  33. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/on-user-prompt.js +110 -0
  34. flurryx_code_memory-0.4.0/plugins/claude-code/scripts/resolver-debounce.js +44 -0
  35. flurryx_code_memory-0.4.0/plugins/claude-code/skills/code-memory/SKILL.md +430 -0
  36. flurryx_code_memory-0.4.0/plugins/opencode/README.md +204 -0
  37. flurryx_code_memory-0.4.0/plugins/opencode/install.sh +202 -0
  38. flurryx_code_memory-0.4.0/plugins/opencode/package-lock.json +452 -0
  39. flurryx_code_memory-0.4.0/plugins/opencode/package.json +47 -0
  40. flurryx_code_memory-0.4.0/plugins/opencode/scripts/add-mcp.py +90 -0
  41. flurryx_code_memory-0.4.0/plugins/opencode/scripts/install.mjs +138 -0
  42. flurryx_code_memory-0.4.0/plugins/opencode/scripts/uninstall.mjs +65 -0
  43. flurryx_code_memory-0.4.0/plugins/opencode/skills/code-memory/SKILL.md +325 -0
  44. flurryx_code_memory-0.4.0/plugins/opencode/src/code-memory-lib/claim-intent.test.mts +139 -0
  45. flurryx_code_memory-0.4.0/plugins/opencode/src/code-memory-lib/claim-intent.ts +129 -0
  46. flurryx_code_memory-0.4.0/plugins/opencode/src/code-memory-lib/intent.ts +74 -0
  47. flurryx_code_memory-0.4.0/plugins/opencode/src/code-memory-lib/memory-client.ts +282 -0
  48. flurryx_code_memory-0.4.0/plugins/opencode/src/code-memory.ts +551 -0
  49. flurryx_code_memory-0.4.0/plugins/opencode/tsconfig.json +22 -0
  50. flurryx_code_memory-0.4.0/pyproject.toml +67 -0
  51. flurryx_code_memory-0.4.0/scripts/benchmark.py +360 -0
  52. flurryx_code_memory-0.4.0/scripts/benchmark_queries.json +126 -0
  53. flurryx_code_memory-0.4.0/scripts/benchmark_vs_baseline.py +553 -0
  54. flurryx_code_memory-0.4.0/scripts/benchmark_vs_grep.sh +96 -0
  55. flurryx_code_memory-0.4.0/scripts/ingest.py +22 -0
  56. flurryx_code_memory-0.4.0/scripts/install.ps1 +360 -0
  57. flurryx_code_memory-0.4.0/scripts/install.sh +422 -0
  58. flurryx_code_memory-0.4.0/src/code_memory/__init__.py +1 -0
  59. flurryx_code_memory-0.4.0/src/code_memory/claims/__init__.py +32 -0
  60. flurryx_code_memory-0.4.0/src/code_memory/claims/extractor.py +325 -0
  61. flurryx_code_memory-0.4.0/src/code_memory/claims/indexer.py +258 -0
  62. flurryx_code_memory-0.4.0/src/code_memory/claims/resolver.py +186 -0
  63. flurryx_code_memory-0.4.0/src/code_memory/claims/store.py +424 -0
  64. flurryx_code_memory-0.4.0/src/code_memory/cli.py +1192 -0
  65. flurryx_code_memory-0.4.0/src/code_memory/config.py +268 -0
  66. flurryx_code_memory-0.4.0/src/code_memory/embed/__init__.py +224 -0
  67. flurryx_code_memory-0.4.0/src/code_memory/embed/cache.py +204 -0
  68. flurryx_code_memory-0.4.0/src/code_memory/embed/m3.py +174 -0
  69. flurryx_code_memory-0.4.0/src/code_memory/embed/ollama.py +92 -0
  70. flurryx_code_memory-0.4.0/src/code_memory/embed/tei.py +106 -0
  71. flurryx_code_memory-0.4.0/src/code_memory/episodic/__init__.py +3 -0
  72. flurryx_code_memory-0.4.0/src/code_memory/episodic/sqlite_store.py +278 -0
  73. flurryx_code_memory-0.4.0/src/code_memory/extractor/__init__.py +3 -0
  74. flurryx_code_memory-0.4.0/src/code_memory/extractor/csproj.py +166 -0
  75. flurryx_code_memory-0.4.0/src/code_memory/extractor/dll.py +385 -0
  76. flurryx_code_memory-0.4.0/src/code_memory/extractor/gitignore.py +162 -0
  77. flurryx_code_memory-0.4.0/src/code_memory/extractor/nuget.py +275 -0
  78. flurryx_code_memory-0.4.0/src/code_memory/extractor/sanity.py +124 -0
  79. flurryx_code_memory-0.4.0/src/code_memory/extractor/sln.py +108 -0
  80. flurryx_code_memory-0.4.0/src/code_memory/extractor/treesitter.py +1172 -0
  81. flurryx_code_memory-0.4.0/src/code_memory/graph/__init__.py +3 -0
  82. flurryx_code_memory-0.4.0/src/code_memory/graph/falkor_store.py +740 -0
  83. flurryx_code_memory-0.4.0/src/code_memory/mcp_server.py +1816 -0
  84. flurryx_code_memory-0.4.0/src/code_memory/metrics.py +260 -0
  85. flurryx_code_memory-0.4.0/src/code_memory/orchestrator/__init__.py +13 -0
  86. flurryx_code_memory-0.4.0/src/code_memory/orchestrator/git_delta.py +211 -0
  87. flurryx_code_memory-0.4.0/src/code_memory/orchestrator/ingest_state.py +71 -0
  88. flurryx_code_memory-0.4.0/src/code_memory/orchestrator/pipeline.py +1478 -0
  89. flurryx_code_memory-0.4.0/src/code_memory/orchestrator/reset.py +130 -0
  90. flurryx_code_memory-0.4.0/src/code_memory/orchestrator/resolver.py +825 -0
  91. flurryx_code_memory-0.4.0/src/code_memory/orchestrator/retrieve.py +505 -0
  92. flurryx_code_memory-0.4.0/src/code_memory/resilience.py +73 -0
  93. flurryx_code_memory-0.4.0/src/code_memory/sync/__init__.py +20 -0
  94. flurryx_code_memory-0.4.0/src/code_memory/sync/autostart/__init__.py +42 -0
  95. flurryx_code_memory-0.4.0/src/code_memory/sync/autostart/base.py +106 -0
  96. flurryx_code_memory-0.4.0/src/code_memory/sync/autostart/launchd.py +115 -0
  97. flurryx_code_memory-0.4.0/src/code_memory/sync/autostart/schtasks.py +155 -0
  98. flurryx_code_memory-0.4.0/src/code_memory/sync/autostart/systemd.py +113 -0
  99. flurryx_code_memory-0.4.0/src/code_memory/sync/hooks.py +164 -0
  100. flurryx_code_memory-0.4.0/src/code_memory/sync/safety.py +65 -0
  101. flurryx_code_memory-0.4.0/src/code_memory/sync/snapshot.py +461 -0
  102. flurryx_code_memory-0.4.0/src/code_memory/sync/store.py +399 -0
  103. flurryx_code_memory-0.4.0/src/code_memory/sync/sync.py +405 -0
  104. flurryx_code_memory-0.4.0/src/code_memory/sync/watcher.py +320 -0
  105. flurryx_code_memory-0.4.0/src/code_memory/vector/__init__.py +3 -0
  106. flurryx_code_memory-0.4.0/src/code_memory/vector/qdrant_store.py +302 -0
  107. flurryx_code_memory-0.4.0/tests/test_autostart_adapters.py +66 -0
  108. flurryx_code_memory-0.4.0/tests/test_chunk_text.py +47 -0
  109. flurryx_code_memory-0.4.0/tests/test_claim_extractor.py +293 -0
  110. flurryx_code_memory-0.4.0/tests/test_claim_indexer.py +328 -0
  111. flurryx_code_memory-0.4.0/tests/test_claim_resolver.py +271 -0
  112. flurryx_code_memory-0.4.0/tests/test_claim_store.py +274 -0
  113. flurryx_code_memory-0.4.0/tests/test_config_embed_dim.py +58 -0
  114. flurryx_code_memory-0.4.0/tests/test_config_sentinel.py +51 -0
  115. flurryx_code_memory-0.4.0/tests/test_csproj.py +168 -0
  116. flurryx_code_memory-0.4.0/tests/test_dll_members.py +154 -0
  117. flurryx_code_memory-0.4.0/tests/test_dll_parser.py +174 -0
  118. flurryx_code_memory-0.4.0/tests/test_embed_backend.py +157 -0
  119. flurryx_code_memory-0.4.0/tests/test_embed_cache.py +150 -0
  120. flurryx_code_memory-0.4.0/tests/test_embed_m3.py +32 -0
  121. flurryx_code_memory-0.4.0/tests/test_embed_tei.py +137 -0
  122. flurryx_code_memory-0.4.0/tests/test_episode_dedup.py +127 -0
  123. flurryx_code_memory-0.4.0/tests/test_episode_head_sha.py +59 -0
  124. flurryx_code_memory-0.4.0/tests/test_extractor_csharp.py +211 -0
  125. flurryx_code_memory-0.4.0/tests/test_extractor_filters.py +120 -0
  126. flurryx_code_memory-0.4.0/tests/test_extractor_php.py +230 -0
  127. flurryx_code_memory-0.4.0/tests/test_extractor_python_imports.py +53 -0
  128. flurryx_code_memory-0.4.0/tests/test_extractor_receiver_type.py +98 -0
  129. flurryx_code_memory-0.4.0/tests/test_extractor_references.py +159 -0
  130. flurryx_code_memory-0.4.0/tests/test_extractor_sanity.py +127 -0
  131. flurryx_code_memory-0.4.0/tests/test_extractor_ts_abstract.py +54 -0
  132. flurryx_code_memory-0.4.0/tests/test_extractor_ts_inject.py +107 -0
  133. flurryx_code_memory-0.4.0/tests/test_extractor_utf8.py +124 -0
  134. flurryx_code_memory-0.4.0/tests/test_file_containment.py +65 -0
  135. flurryx_code_memory-0.4.0/tests/test_git_delta.py +187 -0
  136. flurryx_code_memory-0.4.0/tests/test_graph_queries.py +284 -0
  137. flurryx_code_memory-0.4.0/tests/test_graph_temporal.py +177 -0
  138. flurryx_code_memory-0.4.0/tests/test_graph_vacuum_at_sha.py +229 -0
  139. flurryx_code_memory-0.4.0/tests/test_hooks_installer.py +88 -0
  140. flurryx_code_memory-0.4.0/tests/test_ingest_state.py +62 -0
  141. flurryx_code_memory-0.4.0/tests/test_mcp_assert_claim.py +236 -0
  142. flurryx_code_memory-0.4.0/tests/test_mcp_server_descriptions.py +44 -0
  143. flurryx_code_memory-0.4.0/tests/test_mcp_strict_project.py +65 -0
  144. flurryx_code_memory-0.4.0/tests/test_metrics.py +133 -0
  145. flurryx_code_memory-0.4.0/tests/test_nuget_resolver.py +220 -0
  146. flurryx_code_memory-0.4.0/tests/test_overload_resolution.py +194 -0
  147. flurryx_code_memory-0.4.0/tests/test_partial_class.py +139 -0
  148. flurryx_code_memory-0.4.0/tests/test_pipeline_references.py +157 -0
  149. flurryx_code_memory-0.4.0/tests/test_pipeline_temporal_wiring.py +215 -0
  150. flurryx_code_memory-0.4.0/tests/test_qdrant_legacy_guard.py +157 -0
  151. flurryx_code_memory-0.4.0/tests/test_razor_inject.py +144 -0
  152. flurryx_code_memory-0.4.0/tests/test_resilience.py +111 -0
  153. flurryx_code_memory-0.4.0/tests/test_resolver.py +444 -0
  154. flurryx_code_memory-0.4.0/tests/test_resolver_assembly.py +146 -0
  155. flurryx_code_memory-0.4.0/tests/test_retrieve_claims_surfacing.py +147 -0
  156. flurryx_code_memory-0.4.0/tests/test_retrieve_rerank.py +172 -0
  157. flurryx_code_memory-0.4.0/tests/test_sln.py +101 -0
  158. flurryx_code_memory-0.4.0/tests/test_smoke.py +56 -0
  159. flurryx_code_memory-0.4.0/tests/test_snapshot_e2e.py +186 -0
  160. flurryx_code_memory-0.4.0/tests/test_snapshot_format.py +155 -0
  161. flurryx_code_memory-0.4.0/tests/test_snapshot_store.py +87 -0
  162. flurryx_code_memory-0.4.0/tests/test_sync_decision_tree.py +178 -0
  163. flurryx_code_memory-0.4.0/tests/test_watch_safety.py +69 -0
  164. flurryx_code_memory-0.4.0/tests/test_watcher_debouncer.py +37 -0
  165. flurryx_code_memory-0.4.0/tests/test_watcher_exclude.py +94 -0
  166. flurryx_code_memory-0.4.0/tests/test_watcher_ref_events.py +97 -0
  167. flurryx_code_memory-0.4.0/uv.lock +3810 -0
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
+ "name": "code-memory",
4
+ "description": "Local marketplace exposing the code-memory Claude Code plugin from this repo so `claude plugin install` can register its hooks.",
5
+ "owner": {
6
+ "name": "fmflurry"
7
+ },
8
+ "plugins": [
9
+ {
10
+ "name": "code-memory",
11
+ "source": "./plugins/claude-code",
12
+ "description": "Auto-injects a code-memory Context Pack on each user prompt, re-indexes files after Write/Edit, runs a debounced cross-file resolver, records sessions as episodes, and detects durable user assertions to nudge codememory_assert_claim.",
13
+ "version": "0.3.0",
14
+ "author": {
15
+ "name": "fmflurry"
16
+ },
17
+ "homepage": "https://github.com/fmflurry/code-memory",
18
+ "repository": "https://github.com/fmflurry/code-memory",
19
+ "license": "MIT",
20
+ "keywords": [
21
+ "code-memory",
22
+ "context-pack",
23
+ "mcp",
24
+ "hooks",
25
+ "claim-extraction"
26
+ ],
27
+ "category": "knowledge"
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,53 @@
1
+ OLLAMA_URL=http://localhost:11434
2
+ EMBED_MODEL=bge-m3
3
+ EMBED_DIM=1024
4
+
5
+ QDRANT_URL=http://localhost:6333
6
+ QDRANT_COLLECTION_CODE=code_chunks
7
+ QDRANT_COLLECTION_EPISODES=episodes
8
+
9
+ FALKOR_HOST=localhost
10
+ FALKOR_PORT=6379
11
+ FALKOR_GRAPH=code_graph
12
+
13
+ EPISODIC_DB=./data/episodic.db
14
+ CLAIMS_DB=./data/claims.db
15
+ DATA_DIR=./data
16
+
17
+ # Optional: force a project slug instead of auto-detecting from git/cwd.
18
+ # CODE_MEMORY_PROJECT=opencode
19
+
20
+ # --- Embedding backend ---------------------------------------------------
21
+ # `ollama` (default) — dense-only via the Ollama daemon. Stays warm
22
+ # across short-lived CLI processes (per-save hooks, git hooks).
23
+ # `flagembed` — in-process BGE-M3 via FlagEmbedding. Emits dense + sparse
24
+ # from one forward pass; enables hybrid search but pays a
25
+ # ~5-15s cold load per Python process. Requires the `hybrid`
26
+ # extra (`uv sync --extra hybrid`).
27
+ # EMBED_BACKEND=ollama
28
+
29
+ # Opt-in hybrid (dense + sparse RRF) retrieval. Only effective when
30
+ # EMBED_BACKEND=flagembed AND chunks have been re-ingested under that
31
+ # backend so the sparse slot is populated.
32
+ # CODEMEMORY_HYBRID=1
33
+
34
+ # Cross-encoder rerank. `auto` (default) enables only on Metal/CUDA;
35
+ # CPU-only hosts stay on bi-encoder. Requires the `rerank` extra.
36
+ # CODEMEMORY_RERANK=auto
37
+ # CODEMEMORY_RERANK_ALPHA=0.5
38
+ # CODEMEMORY_RERANK_MODEL=BAAI/bge-reranker-v2-m3
39
+
40
+ # --- User-claim extraction (Graphiti-style) ------------------------------
41
+ # Off by default. Enabling pulls structured (subject, predicate, object)
42
+ # claims from substantive user prompts via a local LLM (gemma2:9b by
43
+ # default). Extraction runs in the on-stop hook so it never blocks a
44
+ # turn. Pull the model once with: `ollama pull gemma2:9b` (or
45
+ # `./scripts/install.sh --with-claims`).
46
+ # CLAIMS_EXTRACTION=true
47
+ # CLAIMS_LLM_MODEL=gemma2:9b
48
+ # CLAIMS_LLM_TIMEOUT=30
49
+ # CLAIMS_MIN_CONFIDENCE=0.6
50
+ # Cosine threshold for the entity resolver to reuse an existing entity
51
+ # instead of creating a new one. Lower → more merging (risk of
52
+ # false-merge); higher → more entities (risk of duplication).
53
+ # CLAIMS_ENTITY_THRESHOLD=0.85
@@ -0,0 +1,26 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ venv/
5
+ .env
6
+
7
+ # code-memory per-machine config (written by scripts/install.sh).
8
+ # Project-local toggles like CLAIMS_EXTRACTION belong here, not in git.
9
+ .code-memoryrc
10
+
11
+ dist/
12
+ build/
13
+ *.egg-info/
14
+ .pytest_cache/
15
+ .mypy_cache/
16
+ .ruff_cache/
17
+ data/
18
+ *.db
19
+ *.sqlite
20
+ .idea/
21
+ .vscode/
22
+ .DS_Store
23
+
24
+ # Node / OpenCode plugin
25
+ node_modules/
26
+ *.tsbuildinfo