mimry 0.1.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 (125) hide show
  1. mimry-0.1.0/.gitignore +14 -0
  2. mimry-0.1.0/CHANGELOG.md +44 -0
  3. mimry-0.1.0/LICENSE +7 -0
  4. mimry-0.1.0/PKG-INFO +637 -0
  5. mimry-0.1.0/README.md +621 -0
  6. mimry-0.1.0/RELEASING.md +90 -0
  7. mimry-0.1.0/THIRD_PARTY.md +26 -0
  8. mimry-0.1.0/assets/banner.svg +115 -0
  9. mimry-0.1.0/benchmarks/README.md +19 -0
  10. mimry-0.1.0/benchmarks/baseline.nograph.json +229 -0
  11. mimry-0.1.0/benchmarks/cases.v1.json +114 -0
  12. mimry-0.1.0/benchmarks/fixtures/agent_repo/.gitattributes +2 -0
  13. mimry-0.1.0/benchmarks/fixtures/agent_repo/archive/checkout-old.ts +1 -0
  14. mimry-0.1.0/benchmarks/fixtures/agent_repo/backend/api/auth.py +5 -0
  15. mimry-0.1.0/benchmarks/fixtures/agent_repo/backend/middleware/auth.py +2 -0
  16. mimry-0.1.0/benchmarks/fixtures/agent_repo/backend/repositories/session_repository.py +4 -0
  17. mimry-0.1.0/benchmarks/fixtures/agent_repo/backend/services/session_service.py +5 -0
  18. mimry-0.1.0/benchmarks/fixtures/agent_repo/backend/tests/test_auth.py +5 -0
  19. mimry-0.1.0/benchmarks/fixtures/agent_repo/db/migrations/20260701_add_session_expiry.sql +1 -0
  20. mimry-0.1.0/benchmarks/fixtures/agent_repo/db/schema.sql +1 -0
  21. mimry-0.1.0/benchmarks/fixtures/agent_repo/docs/auth-design.md +2 -0
  22. mimry-0.1.0/benchmarks/fixtures/agent_repo/docs/checkout-plan.md +2 -0
  23. mimry-0.1.0/benchmarks/fixtures/agent_repo/examples/auth_demo.py +2 -0
  24. mimry-0.1.0/benchmarks/fixtures/agent_repo/pyproject.toml +3 -0
  25. mimry-0.1.0/benchmarks/fixtures/agent_repo/web/src/app/checkout/page.tsx +2 -0
  26. mimry-0.1.0/benchmarks/fixtures/agent_repo/web/src/features/checkout/useCheckout.ts +2 -0
  27. mimry-0.1.0/benchmarks/fixtures/agent_repo/web/src/lib/payments.ts +1 -0
  28. mimry-0.1.0/benchmarks/fixtures/agent_repo/web/tests/checkout.test.tsx +2 -0
  29. mimry-0.1.0/benchmarks/result.core.json +234 -0
  30. mimry-0.1.0/docs/adapters.md +89 -0
  31. mimry-0.1.0/docs/context-packs.md +26 -0
  32. mimry-0.1.0/docs/determinism.md +242 -0
  33. mimry-0.1.0/pyproject.toml +91 -0
  34. mimry-0.1.0/scripts/agent_integration_smoke.py +8 -0
  35. mimry-0.1.0/scripts/agent_usefulness_benchmark.py +5 -0
  36. mimry-0.1.0/scripts/cross_platform_check.py +192 -0
  37. mimry-0.1.0/scripts/determinism_aggregate.py +136 -0
  38. mimry-0.1.0/scripts/determinism_matrix.py +325 -0
  39. mimry-0.1.0/src/mimry/__init__.py +1 -0
  40. mimry-0.1.0/src/mimry/adapters.py +189 -0
  41. mimry-0.1.0/src/mimry/agent_integration.py +231 -0
  42. mimry-0.1.0/src/mimry/benchmark.py +577 -0
  43. mimry-0.1.0/src/mimry/cache_safety.py +77 -0
  44. mimry-0.1.0/src/mimry/cli.py +240 -0
  45. mimry-0.1.0/src/mimry/commands.py +1258 -0
  46. mimry-0.1.0/src/mimry/config_manifest_adapter.py +285 -0
  47. mimry-0.1.0/src/mimry/constants.py +102 -0
  48. mimry-0.1.0/src/mimry/core/__init__.py +3 -0
  49. mimry-0.1.0/src/mimry/core/artifacts.py +614 -0
  50. mimry-0.1.0/src/mimry/core/build.py +313 -0
  51. mimry-0.1.0/src/mimry/core/cluster.py +85 -0
  52. mimry-0.1.0/src/mimry/core/documents.py +225 -0
  53. mimry-0.1.0/src/mimry/core/languages.py +525 -0
  54. mimry-0.1.0/src/mimry/core/report.py +269 -0
  55. mimry-0.1.0/src/mimry/core/resolve.py +671 -0
  56. mimry-0.1.0/src/mimry/digest.py +204 -0
  57. mimry-0.1.0/src/mimry/feedback.py +386 -0
  58. mimry-0.1.0/src/mimry/framework_adapters.py +474 -0
  59. mimry-0.1.0/src/mimry/freshness.py +187 -0
  60. mimry-0.1.0/src/mimry/indexer.py +521 -0
  61. mimry-0.1.0/src/mimry/installer.py +750 -0
  62. mimry-0.1.0/src/mimry/intent.py +240 -0
  63. mimry-0.1.0/src/mimry/mcp_server.py +645 -0
  64. mimry-0.1.0/src/mimry/paths.py +130 -0
  65. mimry-0.1.0/src/mimry/plan.py +487 -0
  66. mimry-0.1.0/src/mimry/routing.py +361 -0
  67. mimry-0.1.0/src/mimry/scanner.py +372 -0
  68. mimry-0.1.0/src/mimry/search.py +213 -0
  69. mimry-0.1.0/src/mimry/security.py +604 -0
  70. mimry-0.1.0/src/mimry/semantic.py +373 -0
  71. mimry-0.1.0/src/mimry/state.py +497 -0
  72. mimry-0.1.0/src/mimry/storage.py +256 -0
  73. mimry-0.1.0/src/mimry/ts_ast_adapter.py +165 -0
  74. mimry-0.1.0/tests/fixtures/determinism_golden.json +232 -0
  75. mimry-0.1.0/tests/fixtures/determinism_repo/.gitattributes +4 -0
  76. mimry-0.1.0/tests/fixtures/determinism_repo/README.md +1 -0
  77. mimry-0.1.0/tests/fixtures/determinism_repo/backend/api/auth.py +19 -0
  78. mimry-0.1.0/tests/fixtures/determinism_repo/backend/services/session_service.py +10 -0
  79. mimry-0.1.0/tests/fixtures/determinism_repo/db/schema.sql +8 -0
  80. mimry-0.1.0/tests/fixtures/determinism_repo/docs/auth-design.md +8 -0
  81. mimry-0.1.0/tests/fixtures/determinism_repo/package.json +8 -0
  82. mimry-0.1.0/tests/fixtures/determinism_repo/svc/go/store.go +9 -0
  83. mimry-0.1.0/tests/fixtures/determinism_repo/svc/java/com/app/User.java +13 -0
  84. mimry-0.1.0/tests/fixtures/determinism_repo/svc/php/Session.php +16 -0
  85. mimry-0.1.0/tests/fixtures/determinism_repo/web/src/app/checkout.tsx +5 -0
  86. mimry-0.1.0/tests/fixtures/determinism_repo/web/src/lib/payments.ts +7 -0
  87. mimry-0.1.0/tests/fixtures/simple_repo/README.md +3 -0
  88. mimry-0.1.0/tests/fixtures/simple_repo/src/app.ts +2 -0
  89. mimry-0.1.0/tests/fixtures/simple_repo/src/auth/middleware.py +5 -0
  90. mimry-0.1.0/tests/fixtures/simple_repo/src/auth/session.py +7 -0
  91. mimry-0.1.0/tests/test_acceptance_isolation.py +213 -0
  92. mimry-0.1.0/tests/test_adapters.py +61 -0
  93. mimry-0.1.0/tests/test_agent_integration.py +64 -0
  94. mimry-0.1.0/tests/test_agent_usefulness_benchmark.py +103 -0
  95. mimry-0.1.0/tests/test_benchmark_quality_gate.py +153 -0
  96. mimry-0.1.0/tests/test_context_normalization.py +85 -0
  97. mimry-0.1.0/tests/test_context_pack_contract.py +134 -0
  98. mimry-0.1.0/tests/test_core_selfchecks.py +449 -0
  99. mimry-0.1.0/tests/test_cross_platform.py +53 -0
  100. mimry-0.1.0/tests/test_determinism_graph.py +304 -0
  101. mimry-0.1.0/tests/test_determinism_identity.py +400 -0
  102. mimry-0.1.0/tests/test_determinism_retrieval.py +773 -0
  103. mimry-0.1.0/tests/test_documents_selfchecks.py +199 -0
  104. mimry-0.1.0/tests/test_edge_identity.py +246 -0
  105. mimry-0.1.0/tests/test_encoding.py +42 -0
  106. mimry-0.1.0/tests/test_exception_serialization.py +73 -0
  107. mimry-0.1.0/tests/test_graph_correctness_regressions.py +127 -0
  108. mimry-0.1.0/tests/test_graph_init.py +83 -0
  109. mimry-0.1.0/tests/test_inheritance_edges.py +115 -0
  110. mimry-0.1.0/tests/test_intent_ranking.py +359 -0
  111. mimry-0.1.0/tests/test_languages_selfchecks.py +359 -0
  112. mimry-0.1.0/tests/test_mcp_server.py +618 -0
  113. mimry-0.1.0/tests/test_mimry_cli.py +1712 -0
  114. mimry-0.1.0/tests/test_packaging.py +79 -0
  115. mimry-0.1.0/tests/test_plan_tree.py +490 -0
  116. mimry-0.1.0/tests/test_privacy_hardening.py +588 -0
  117. mimry-0.1.0/tests/test_report_output_security.py +61 -0
  118. mimry-0.1.0/tests/test_report_selfchecks.py +362 -0
  119. mimry-0.1.0/tests/test_search_exclusion_boundary.py +82 -0
  120. mimry-0.1.0/tests/test_snapshot_integrity.py +311 -0
  121. mimry-0.1.0/tests/test_state_recovery.py +849 -0
  122. mimry-0.1.0/tests/test_symbol_text_offsets.py +98 -0
  123. mimry-0.1.0/tests/test_ts_call_graph.py +85 -0
  124. mimry-0.1.0/tests/test_unicode_canonical.py +139 -0
  125. mimry-0.1.0/tests/test_unindexable_freshness.py +326 -0
mimry-0.1.0/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ .mypy_cache/
7
+ .coverage
8
+ dist/
9
+ build/
10
+ *.egg-info/
11
+ .mimry/
12
+ mimry-out/
13
+ # Transient subagent git worktrees.
14
+ .claude/
@@ -0,0 +1,44 @@
1
+ # Changelog
2
+
3
+ Notable user-facing changes are recorded here. MIMRY is pre-1.0; compatibility changes may still occur, but the supported release floor is tested before a release is tagged.
4
+
5
+ ## Unreleased
6
+
7
+ ### Determinism
8
+
9
+ - Add the narrow `mimry plan` recursive decomposer: deterministic leaf-only splits, canonical repo-local JSON storage, terminal/JSON/Markdown projections, structural validation, semantic SHA-256, deterministic inventory, and read-only MCP parity. It stores explicit tree structure only and does not execute, schedule, refine, or track work.
10
+ - Establish an explicit determinism contract splitting canonical semantic state (file/symbol/edge/community/chunk identities, parser facts, ranking and tie-breaking, context-pack evidence ordering) from the operational envelope (timestamps, generation UUIDs, absolute paths, mtimes, feedback event IDs, SQLite byte layout). Documented in `docs/determinism.md`.
11
+ - Derive canonical IDs from the schema version and the repository-relative path instead of the absolute checkout path. Two clones of the same repository at different locations now produce identical file, symbol, edge, community, and semantic-chunk identities. Semantic `chunk_id` no longer carries the machine-local root UUID either.
12
+ - Refuse index generations built under the old path-dependent identity scheme (`GENERATION_SCHEMA_VERSION` 1-3) with an actionable rebuild message, rather than partially reusing identities nothing else in the build produces.
13
+ - Sort filesystem traversal and every persisted collection by a single normalization rule (`canonical_rel_path`: POSIX separators, NFC, case preserved, codepoint-ordered and therefore locale-independent), and reject same-root native paths that collide after NFC normalization before publication.
14
+ - Reject duplicate node, symbol, and edge IDs whose records conflict, instead of resolving them by last write. Records identical in every field are deduplicated under a documented policy.
15
+ - Give edges a total order over every canonical field and a documented EXTRACTED-over-INFERRED conflict rule, applied at every graph assembly site rather than only inside `build_graph`.
16
+ - Give symbol resolution a total, documented selection order (kind priority, relative path, line start, line end, symbol ID). Genuinely ambiguous inheritance and import targets are still declined rather than resolved by picking the first candidate.
17
+ - Add deterministic secondary ordering before every SQL cutoff. A tied BM25 rank no longer lets physical row order decide which rows survive `LIMIT`, and semantic chunk reads are ordered so explanation previews and reason labels are stable.
18
+ - Acquire each file through bounded matching reads, derive its hash, size, mtime, and parser input from that snapshot, then verify post-acquisition freshness after adapters finish. A file changed mid-index is marked unindexable; mixed-version evidence is never persisted.
19
+ - Add `mimry digest`, which hashes normalized semantic state rather than raw SQLite bytes or the generation manifest.
20
+ - Add a real end-to-end determinism gate over a frozen multi-language fixture (`scripts/determinism_matrix.py`) covering scanner, Python/TS/Java/PHP/Go/SQL/Markdown parsing, graph and communities, SQLite/FTS, local semantic retrieval, and context-pack generation, across creation order, checkout root, `PYTHONHASHSEED`, clean-cache repeats, and locale/timezone. CI runs it on Linux, macOS, and Windows and a dedicated job compares every platform's digest against a committed golden value.
21
+ - Convert the `__main__` self-checks in the graph core into committed pytest tests.
22
+
23
+ ### Graph engine
24
+
25
+ - Replace the Graphify dependency with MIMRY's own graph engine in `src/mimry/core/`. Indexing parses each file once and derives `defines`, `imports`, and `calls` edges from what it already read, instead of copying the tree to a temporary directory and re-parsing it in a subprocess.
26
+ - Resolve import statements and call sites to real files and symbols. MIMRY previously collected import strings but never resolved them, so its graph had no file-to-file edges at all. Unresolvable or ambiguous references are dropped rather than guessed.
27
+ - Extend language coverage to Go, Rust, and C# alongside Python, JavaScript, TypeScript, JSX, and TSX, at no new dependency cost.
28
+ - Rank by following relationships, not only by matching text: query relevance now propagates two hops along edges.
29
+ - Stop demoting full-text evidence whenever the graph has an opinion. A content-only result was previously multiplied by 0.75 if the graph returned anything, and a file found by both signals had its content score discarded; corroborating evidence now adds.
30
+ - Measured against the recorded baselines on nine cases: ndcg@5 0.6300 -> 0.6907, recall@5 0.8542 -> 0.8958, primary-hit@3 0.5000 -> 0.7500, decoy rate 0.1351 -> 0.1081, and time to a queryable indexed graph roughly halved.
31
+ - Rename public graph terminology for the native engine: `--skip-graph`, `mimry status`, the MCP `skip_graph` argument, and the status payload key `graph` are canonical. A compatibility window keeps `--skip-graphify`, `mimry graphify status`, MCP `skip_graphify`, and the `graphify` status key functional for existing clients. The graph engine identifier is `mimry-core`.
32
+
33
+ ### Cross-platform
34
+
35
+ - Fix Windows portability defects in home-directory sandboxing (including `APPDATA`, `LOCALAPPDATA`, and `XDG_DATA_HOME` isolation), descriptor syncing, timestamp identity checks, capability-guarded file operations, and cp1252-safe CLI output. UTF-8 artifacts preserve original Unicode.
36
+ - Test Windows, Linux, and macOS across Python 3.11-3.13 in the committed CI matrix.
37
+
38
+ ### Packaging and support floor
39
+
40
+ - Restrict source distributions to reviewed source, tests, documentation, and license files; exclude vendored, generated, cache, build, and local-work bulk.
41
+ - Add artifact contract tests and Windows/Linux/macOS CI for Python 3.11, 3.12, and 3.13; the unlocked sdist lane invokes only extracted artifact source/scripts.
42
+ - Package `determinism_aggregate.py`, support standards-valid XLSX inline strings, reject empty explicit edge IDs, and fail closed on unknown future generation schemas while preserving the old-schema upgrade classification.
43
+ - Pin the proven `tree-sitter-language-pack` 1.12.2 compatibility floor after 1.13.5 broke TSX symbol extraction, and test unlocked extracted artifacts in CI.
44
+ - Define 0.1.x as an internal checkout/direct-wheel release rather than claiming compatibility with PyPI-style indexes.
mimry-0.1.0/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Judison / Otterium
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files to deal in the Software without restriction, subject to preserving this notice.
6
+
7
+ THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND.