intentumdiff-python 0.0.1__py3-none-win_amd64.whl → 0.0.3b1__py3-none-win_amd64.whl

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 (150) hide show
  1. intentumdiff/__init__.py +9 -0
  2. intentumdiff/__main__.py +12 -0
  3. intentumdiff/_differ_gate.py +0 -136
  4. intentumdiff/_differ_presentation.py +17 -735
  5. intentumdiff/_differ_runtime.py +13 -64
  6. intentumdiff/analysis/compile_commands.py +26 -141
  7. intentumdiff/analysis/cross_file.py +23 -25
  8. intentumdiff/analysis/diagnostics.py +1 -164
  9. intentumdiff/analysis/guardrail_reports.py +31 -33
  10. intentumdiff/analysis/guardrails.py +111 -188
  11. intentumdiff/analysis/schema_resolver.py +72 -360
  12. intentumdiff/analysis/user_schemas.py +57 -254
  13. intentumdiff/api.py +21 -0
  14. intentumdiff/cache/sqlite_store.py +5 -23
  15. intentumdiff/cli/__init__.py +59 -0
  16. intentumdiff/cli/_commands.py +243 -137
  17. intentumdiff/cli/_parser.py +51 -56
  18. intentumdiff/cli/_shared.py +151 -116
  19. intentumdiff/content_type.py +13 -30
  20. intentumdiff/core/commit_differ.py +137 -286
  21. intentumdiff/core/diffignore.py +28 -34
  22. intentumdiff/core/index.py +16 -18
  23. intentumdiff/core/indexer.py +148 -169
  24. intentumdiff/core/models.py +279 -83
  25. intentumdiff/differ.py +366 -1000
  26. intentumdiff/github_app.py +40 -27
  27. intentumdiff/intentumdiff_rust_core/intentumdiff_rust_core.dll +0 -0
  28. intentumdiff/live_server.py +197 -34
  29. intentumdiff/lsp/client.py +49 -43
  30. intentumdiff/lsp/enricher.py +19 -119
  31. intentumdiff/lsp/exceptions.py +6 -7
  32. intentumdiff/lsp/servers.py +10 -11
  33. intentumdiff/lsp_server/_codelens.py +24 -57
  34. intentumdiff/lsp_server/_diagnostics.py +23 -51
  35. intentumdiff/lsp_server/_handlers.py +67 -9
  36. intentumdiff/lsp_server/server.py +28 -8
  37. intentumdiff/plugins/adapter.py +5 -0
  38. intentumdiff/plugins/builtins.py +7 -14
  39. intentumdiff/plugins/exceptions.py +28 -0
  40. intentumdiff/plugins/hub.py +39 -43
  41. intentumdiff/plugins/loader.py +229 -215
  42. intentumdiff/plugins/registry.py +259 -207
  43. intentumdiff/plugins/registry.schema.json +156 -15
  44. intentumdiff/plugins/registry_schema.py +47 -140
  45. intentumdiff/rust_core.py +623 -1326
  46. intentumdiff/serve/_app.py +26 -35
  47. intentumdiff/sources/base.py +24 -0
  48. intentumdiff/sources/file_source.py +15 -2
  49. intentumdiff/sources/git_source.py +64 -185
  50. intentumdiff/sources/live_buffer_source.py +45 -5
  51. intentumdiff/sources/patch_source.py +36 -109
  52. intentumdiff/vcs/_safe_path.py +7 -0
  53. intentumdiff/vcs/base.py +6 -0
  54. intentumdiff/vcs/git_backend.py +1 -1
  55. intentumdiff/vcs/git_cli.py +0 -27
  56. intentumdiff/vcs/hg_backend.py +1 -1
  57. intentumdiff/vcs/perforce_backend.py +7 -1
  58. intentumdiff/vcs/svn_backend.py +1 -1
  59. intentumdiff/wasm/abap_parser.wasm +0 -0
  60. intentumdiff/wasm/adf_parser.wasm +0 -0
  61. intentumdiff/wasm/asciidoc_parser.wasm +0 -0
  62. intentumdiff/wasm/asm_parser.wasm +0 -0
  63. intentumdiff/wasm/assemblyscript_parser.wasm +0 -0
  64. intentumdiff/wasm/astro_parser.wasm +0 -0
  65. intentumdiff/wasm/bash_parser.wasm +0 -0
  66. intentumdiff/wasm/clojure_parser.wasm +0 -0
  67. intentumdiff/wasm/cmake_parser.wasm +0 -0
  68. intentumdiff/wasm/cpp_parser.wasm +0 -0
  69. intentumdiff/wasm/csharp_parser.wasm +0 -0
  70. intentumdiff/wasm/css_parser.wasm +0 -0
  71. intentumdiff/wasm/dart_parser.wasm +0 -0
  72. intentumdiff/wasm/databricks_parser.wasm +0 -0
  73. intentumdiff/wasm/dax_parser.wasm +0 -0
  74. intentumdiff/wasm/delphi_parser.wasm +0 -0
  75. intentumdiff/wasm/dockerfile_parser.wasm +0 -0
  76. intentumdiff/wasm/elixir_parser.wasm +0 -0
  77. intentumdiff/wasm/freebasic_parser.wasm +0 -0
  78. intentumdiff/wasm/generic_parser.wasm +0 -0
  79. intentumdiff/wasm/gitignore_parser.wasm +0 -0
  80. intentumdiff/wasm/go_parser.wasm +0 -0
  81. intentumdiff/wasm/gomod_parser.wasm +0 -0
  82. intentumdiff/wasm/graphql_parser.wasm +0 -0
  83. intentumdiff/wasm/groovy_parser.wasm +0 -0
  84. intentumdiff/wasm/haskell_parser.wasm +0 -0
  85. intentumdiff/wasm/html_parser.wasm +0 -0
  86. intentumdiff/wasm/html_renderer.wasm +0 -0
  87. intentumdiff/wasm/ini_parser.wasm +0 -0
  88. intentumdiff/wasm/java_parser.wasm +0 -0
  89. intentumdiff/wasm/js_ts_parser.wasm +0 -0
  90. intentumdiff/wasm/json_parser.wasm +0 -0
  91. intentumdiff/wasm/kotlin_parser.wasm +0 -0
  92. intentumdiff/wasm/latex_parser.wasm +0 -0
  93. intentumdiff/wasm/llm_renderer.wasm +0 -0
  94. intentumdiff/wasm/lua_parser.wasm +0 -0
  95. intentumdiff/wasm/make_parser.wasm +0 -0
  96. intentumdiff/wasm/markdown_parser.wasm +0 -0
  97. intentumdiff/wasm/mdx_parser.wasm +0 -0
  98. intentumdiff/wasm/ocaml_parser.wasm +0 -0
  99. intentumdiff/wasm/odin_parser.wasm +0 -0
  100. intentumdiff/wasm/parser_manifest.json +81 -2
  101. intentumdiff/wasm/patch_renderer.wasm +0 -0
  102. intentumdiff/wasm/perl_parser.wasm +0 -0
  103. intentumdiff/wasm/php_parser.wasm +0 -0
  104. intentumdiff/wasm/plsql_parser.wasm +0 -0
  105. intentumdiff/wasm/po_parser.wasm +0 -0
  106. intentumdiff/wasm/postscript_parser.wasm +0 -0
  107. intentumdiff/wasm/powershell_parser.wasm +0 -0
  108. intentumdiff/wasm/proto_parser.wasm +0 -0
  109. intentumdiff/wasm/puppet_parser.wasm +0 -0
  110. intentumdiff/wasm/python_parser.wasm +0 -0
  111. intentumdiff/wasm/qsharp_parser.wasm +0 -0
  112. intentumdiff/wasm/r_parser.wasm +0 -0
  113. intentumdiff/wasm/reasonml_parser.wasm +0 -0
  114. intentumdiff/wasm/ruby_parser.wasm +0 -0
  115. intentumdiff/wasm/rust_parser.wasm +0 -0
  116. intentumdiff/wasm/sas_parser.wasm +0 -0
  117. intentumdiff/wasm/scala_parser.wasm +0 -0
  118. intentumdiff/wasm/scss_parser.wasm +0 -0
  119. intentumdiff/wasm/sql_parser.wasm +0 -0
  120. intentumdiff/wasm/squirrel_parser.wasm +0 -0
  121. intentumdiff/wasm/svelte_parser.wasm +0 -0
  122. intentumdiff/wasm/swift_parser.wasm +0 -0
  123. intentumdiff/wasm/terminal_renderer.wasm +0 -0
  124. intentumdiff/wasm/terraform_parser.wasm +0 -0
  125. intentumdiff/wasm/toml_parser.wasm +0 -0
  126. intentumdiff/wasm/tsql_parser.wasm +0 -0
  127. intentumdiff/wasm/vbnet_parser.wasm +0 -0
  128. intentumdiff/wasm/vue_parser.wasm +0 -0
  129. intentumdiff/wasm/wasm_provenance.json +884 -0
  130. intentumdiff/wasm/wat_parser.wasm +0 -0
  131. intentumdiff/wasm/xml_parser.wasm +0 -0
  132. intentumdiff/wasm/yaml_parser.wasm +0 -0
  133. intentumdiff/wasm/zig_parser.wasm +0 -0
  134. intentumdiff/watcher.py +15 -17
  135. intentumdiff_python-0.0.3b1.dist-info/METADATA +188 -0
  136. intentumdiff_python-0.0.3b1.dist-info/RECORD +164 -0
  137. {intentumdiff_python-0.0.1.dist-info → intentumdiff_python-0.0.3b1.dist-info}/WHEEL +1 -1
  138. {intentumdiff_python-0.0.1.dist-info → intentumdiff_python-0.0.3b1.dist-info}/sboms/intentumdiff-rust-core.cyclonedx.json +905 -379
  139. intentumdiff/analysis/invariances.py +0 -1207
  140. intentumdiff/analysis/keyed_profiles.py +0 -25
  141. intentumdiff/analysis/resource_profiles.py +0 -14
  142. intentumdiff/analysis/text_review.py +0 -46
  143. intentumdiff/core/cst_serializer.py +0 -101
  144. intentumdiff/invariances/__init__.py +0 -2
  145. intentumdiff/invariances/rules.schema.json +0 -283
  146. intentumdiff/invariances/rules.yaml +0 -349
  147. intentumdiff_python-0.0.1.dist-info/METADATA +0 -112
  148. intentumdiff_python-0.0.1.dist-info/RECORD +0 -165
  149. {intentumdiff_python-0.0.1.dist-info → intentumdiff_python-0.0.3b1.dist-info}/entry_points.txt +0 -0
  150. {intentumdiff_python-0.0.1.dist-info → intentumdiff_python-0.0.3b1.dist-info}/licenses/LICENSE +0 -0
intentumdiff/__init__.py CHANGED
@@ -16,6 +16,7 @@ Quick start::
16
16
  print(change.change_type, change.description)
17
17
  """
18
18
 
19
+ from intentumdiff.api import review_text
19
20
  from intentumdiff.core.models import (
20
21
  Change,
21
22
  ChangeGroup,
@@ -32,6 +33,8 @@ from intentumdiff.core.models import (
32
33
  GuardrailCheckResult,
33
34
  GuardrailSeverity,
34
35
  GuardrailViolation,
36
+ IncompleteReport,
37
+ IncompleteReview,
35
38
  NodePosition,
36
39
  RefactoringKind,
37
40
  ReferenceKind,
@@ -53,9 +56,11 @@ from intentumdiff.sources.string_source import StringSource
53
56
  from intentumdiff.cache.store import CacheStore
54
57
  from intentumdiff.cache.sqlite_store import SqliteCacheStore
55
58
  from intentumdiff.live_server import LiveServer
59
+ from intentumdiff.rust_core import CoreSizeLimitError
56
60
 
57
61
  __all__ = [
58
62
  # Differ
63
+ "review_text",
59
64
  "SemanticDiffer",
60
65
  # Cross-file analysis
61
66
  "CommitDiffer",
@@ -79,6 +84,8 @@ __all__ = [
79
84
  "DetectionResult",
80
85
  "FUEL_UNLIMITED",
81
86
  "SemanticDiff",
87
+ "IncompleteReview",
88
+ "IncompleteReport",
82
89
  "Change",
83
90
  "ChangeGroup",
84
91
  "ChangeGroupKind",
@@ -104,6 +111,8 @@ __all__ = [
104
111
  "Indexer",
105
112
  # Live server
106
113
  "LiveServer",
114
+ # Errors
115
+ "CoreSizeLimitError",
107
116
  # Testing
108
117
  "PluginTestHarness",
109
118
  ]
@@ -0,0 +1,12 @@
1
+ """Enable `python -m intentumdiff`.
2
+
3
+ The console script alone is not enough: `python -m` is what people reach for when the
4
+ script is not on PATH (a venv they have not activated, CI, a container), and READMEs use
5
+ it constantly. 0.0.1 shipped without this module, so the invocation failed with an
6
+ unhelpful "cannot be directly executed".
7
+ """
8
+
9
+ from intentumdiff.cli import main
10
+
11
+ if __name__ == "__main__":
12
+ raise SystemExit(main())
@@ -51,142 +51,6 @@ def _rust_certified_languages() -> frozenset[str]:
51
51
  }
52
52
 
53
53
 
54
- # Languages whose per-stage draft FINALIZATION routes through the Rust core (issue #57 —
55
- # the retirement path for python refinement/presentation). Grows per parity-verified
56
- # language; INTENTUMDIFF_RUST_FINALIZE_LANGS (comma-separated) adds pilots.
57
- RUST_FINALIZE_LANGUAGES: frozenset[str] = frozenset(
58
- {
59
- "go", "kotlin", "ruby", "swift", "java", "c", "cpp", "gitignore",
60
- "csharp", "elixir", "perl", "scala", "xml", "haskell",
61
- # Structured-language batch (issue #57): parity-verified clean under routing —
62
- # no engine change, per-language contracts + cross-cutting infra all green.
63
- "adf", "asciidoc", "assemblyscript", "clojure", "databricks",
64
- "databricks-workflow", "dax", "groovy", "latex", "lua", "ocaml", "odin",
65
- "php", "plsql", "po", "postscript", "qsharp", "reasonml",
66
- "sas", "squirrel", "tsql", "vbnet", "wast", "wat",
67
- "puppet", "hcl",
68
- # Body-reference variable renames corroborated by an anchored callable's param rename
69
- # (promote_corroborated_variable_renames) — the routed analogue of refactoring.py's
70
- # inferred_rename_pairs, which the default path used for dart's single-letter renames.
71
- "dart",
72
- # Structured/markup batch (#57): parity-verified clean under routing (full-suite gated).
73
- # generic was piloted too but breaks the generic-text/markdown/text fallback path
74
- # (#35/#36/#44) — deferred to its own fix.
75
- "svelte", "astro", "vue", "mdx", "scss",
76
- # dockerfile: needs the resource-profile shell-command identity keying (dockerfile_key),
77
- # now ported to Rust so an inserted RUN doesn't cross-pair positionally.
78
- "dockerfile",
79
- # asm (experimental, #57): statement-profile language — instructions key by mnemonic +
80
- # first-operand identity (asm_key) so an operand-value edit is a MODIFICATION, not churn.
81
- "asm",
82
- # css (#57): unblocked by applying semantic invariances in the routed short-circuit —
83
- # the color-canonicalization equivalence (red≡#ff0000, blue≡#0000ff) now fires under
84
- # routing. (yaml/json graceful-xfail shape + python dedent still gap-blocked.)
85
- "css",
86
- # bash (#57): bash_key ported (commands key by NAME) + the cross-key MODIFICATION split —
87
- # `:` -> `echo Hello` unpaires into DELETE+ADD with descendant scaffold folded.
88
- "bash",
89
- # delphi (#57): delphi_key ported (statements keyed by call/assign identity) + statement
90
- # review containers anchor in suppress_parent_modifications — the WriteLn edit presents
91
- # as ONE statement MODIFICATION with descendant mods folded.
92
- "delphi",
93
- # m / Power Query (#57): served by the dax parser (dax routed-green); the step-edit
94
- # contract reformulated to anti-swallowing (routed pairs the predicate edit as ONE
95
- # MODIFICATION carrying both sides — honest, not the default's DELETE+ADD split).
96
- "m",
97
- # powershell (#57/#66): unblocked by the entity-anchored matching port — reordered
98
- # functions pair by identity and surface as MOVEs (31/31 force-routed).
99
- "powershell",
100
- # json/yaml (#57): keyed-data profile port — pairs/items key by ancestor key path; array
101
- # scalars/items by CONTENT identity (not position labels), so an inserted element never
102
- # cross-pairs later unchanged values; identical-content positional churn suppresses with
103
- # evidence; yaml block↔flow representation equivalence (YAML 1.2 §3) is style, not change.
104
- "json", "yaml",
105
- # html (#57/#64): path-profile keying port — elements key by their element PATH with
106
- # identity attributes (id/name/key/…) beating same-tag ordinals, and relocated
107
- # identical-content elements keep their match (stable-same-label escape) — a text edit
108
- # inside an id-bearing or restructured element survives sibling inserts.
109
- "html",
110
- # rust (#57/#60): unlocked by the entity-anchored matching port (augment_entity_matching)
111
- # — match→if-let now surfaces as a statement-rewrite MODIFICATION instead of losing the
112
- # relocated arm bodies to DELETE+ADD churn. Full rust suite 112/112 force-routed.
113
- "rust",
114
- # abap (#57): entity-anchored grouping ported (entity_child_content_groups) — a child
115
- # modification under a same-identity form groups as "GREET changed", not a free leaf edit.
116
- "abap",
117
- # r (#57): unblocked by the any→all truthiness fix in the signature-coverage suppression —
118
- # a NEW function sharing param labels with a rename is no longer erased.
119
- "r",
120
- # zig (#57): parity-verified clean under routing post-anchors (14/14 force-routed) —
121
- # pure routing, no engine change.
122
- "zig",
123
- # sql (#57): query-profile port (sql_key + matching/changes augmentation) — clauses,
124
- # relations, and fields pair by role + normalized identity within their statement, so an
125
- # added JOIN doesn't shift FROM into a bogus MOVE and unchanged SELECT fields never churn.
126
- # The dax half of the profile is deliberately NOT ported (dax routed green without it).
127
- "sql",
128
- # freebasic/terraform (#57): parity-verified clean under routing (dedicated tests +
129
- # the cross-cutting suites in the full gate) — pure routing, no engine change.
130
- "freebasic", "terraform",
131
- # graphql (#57/#67): unblocked by porting surface_changed_in_place_entity — a matched
132
- # named entity (type/query/fragment) whose body changed carries its label into a group.
133
- "graphql",
134
- # javascript/typescript/tsx (#57): three ports close the js-family gap — (1) the
135
- # function-valued-declaration profile (const f = () => … pairs with function f(…) as
136
- # one entity) in the anchors code, (2) the style rule relabelling suppression residue
137
- # as an IGNORED_STYLE group (provenance "suppression"), and (3) moved-pair literal
138
- # update recovery (the #37 leaf score, move-pair scoped): edit-script pruning of
139
- # unmatched leaves under moved subtrees was swallowing md5→sha256 inside a hoisted
140
- # calc_hash. Same-label DELETE+ADD container churn around reported renames suppresses
141
- # under a rename-coverage truthiness guard (tighter than the python pass it ports).
142
- "javascript", "typescript", "tsx",
143
- # generic (#57): the text review and both markdown section passes were already
144
- # Rust-first; the routed short-circuit now mirrors the stage-12 orchestration
145
- # (token churn replaced wholesale by Rust line spans, markdown section passes for
146
- # .md filenames, stage-12 style-only resolution for empty results).
147
- "generic",
148
- # python (#57): the flagship, last. The certified BATCH path (sources->final in
149
- # Rust, semantic_contract rust_finalized_v1) still serves default configs FIRST;
150
- # the tier behind it is the full-Rust 9-fin routing (the stage-11 hybrid and the
151
- # transitional python stages were deleted in the stage-4b payoff).
152
- "python",
153
- # markdown (#44): the tree-sitter markdown parser takes .md off the generic
154
- # fallback — sections/headings/fences are REAL nodes (the corpus "section"
155
- # entity vocabulary and the reorder→MOVE promotion consume them natively).
156
- "markdown",
157
- # toml (#48): keyed config format — tables/pairs are labeled by header/key
158
- # identity in the parser itself, so the routed finalize pairs value edits
159
- # under stable keys natively.
160
- "toml",
161
- # ini (#48): keyed config — sections by header, settings by key, same identity
162
- # model as toml; certified on the same template.
163
- "ini",
164
- # gomod (#48): keyed dependency manifest — specs by module path, versions as
165
- # semantic children; a version bump is ONE modification under stable identity.
166
- "gomod",
167
- # make (#48): rules by target identity, assignments by variable name, recipe
168
- # lines as semantic children — a recipe edit pairs under its target.
169
- "make",
170
- # proto (#48): messages/services/enums/rpcs by name, fields by identifier with
171
- # type + field number as semantic children — the wire-compat review story.
172
- "proto",
173
- # cmake (#48): commands labeled identifier(first-arg) so target identity is
174
- # part of the command; function/macro defs by their defined name.
175
- "cmake",
176
- }
177
- )
178
-
179
-
180
- def _rust_finalize_languages() -> frozenset[str]:
181
- # The set is TOTAL (all 67 supported languages, issue #57 2026-07-15), so it now
182
- # serves as the certified-language allowlist. The INTENTUMDIFF_RUST_FINALIZE_LANGS
183
- # pilot escape hatch is retired with the campaign: it existed to force-route
184
- # candidates during per-language certification, and every candidate is routed.
185
- # New languages certify by joining RUST_FINALIZE_LANGUAGES in code, behind the
186
- # same protocol (force-routed probe -> Rust pin -> full gate -> flip).
187
- return RUST_FINALIZE_LANGUAGES
188
-
189
-
190
54
  def _strict_rust_only_enabled() -> bool:
191
55
  return os.getenv(STRICT_RUST_GATE_ENV, "").strip() == "1"
192
56