intentumdiff-python 0.0.1__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 (165) hide show
  1. intentumdiff/__init__.py +134 -0
  2. intentumdiff/_differ_gate.py +210 -0
  3. intentumdiff/_differ_presentation.py +786 -0
  4. intentumdiff/_differ_runtime.py +320 -0
  5. intentumdiff/analysis/__init__.py +1 -0
  6. intentumdiff/analysis/compile_commands.py +151 -0
  7. intentumdiff/analysis/cross_file.py +71 -0
  8. intentumdiff/analysis/diagnostics.py +309 -0
  9. intentumdiff/analysis/guardrail_reports.py +254 -0
  10. intentumdiff/analysis/guardrails.py +318 -0
  11. intentumdiff/analysis/invariances.py +1207 -0
  12. intentumdiff/analysis/keyed_profiles.py +25 -0
  13. intentumdiff/analysis/resource_profiles.py +14 -0
  14. intentumdiff/analysis/schema_resolver.py +816 -0
  15. intentumdiff/analysis/text_review.py +46 -0
  16. intentumdiff/analysis/user_schemas.py +430 -0
  17. intentumdiff/assets.py +45 -0
  18. intentumdiff/cache/__init__.py +37 -0
  19. intentumdiff/cache/duckdb_store.py +98 -0
  20. intentumdiff/cache/sqlite_store.py +149 -0
  21. intentumdiff/cache/store.py +190 -0
  22. intentumdiff/cli/__init__.py +199 -0
  23. intentumdiff/cli/_commands.py +2141 -0
  24. intentumdiff/cli/_parser.py +1061 -0
  25. intentumdiff/cli/_shared.py +644 -0
  26. intentumdiff/content_type.py +59 -0
  27. intentumdiff/core/__init__.py +1 -0
  28. intentumdiff/core/commit_differ.py +599 -0
  29. intentumdiff/core/config.py +51 -0
  30. intentumdiff/core/cst_serializer.py +101 -0
  31. intentumdiff/core/diffignore.py +87 -0
  32. intentumdiff/core/index.py +189 -0
  33. intentumdiff/core/indexer.py +792 -0
  34. intentumdiff/core/models.py +837 -0
  35. intentumdiff/differ.py +2195 -0
  36. intentumdiff/github_app.py +287 -0
  37. intentumdiff/intentumdiff_rust_core/__init__.py +7 -0
  38. intentumdiff/intentumdiff_rust_core/ffi.py +8 -0
  39. intentumdiff/intentumdiff_rust_core/intentumdiff_rust_core.dll +0 -0
  40. intentumdiff/invariances/__init__.py +2 -0
  41. intentumdiff/invariances/rules.schema.json +283 -0
  42. intentumdiff/invariances/rules.yaml +349 -0
  43. intentumdiff/live_server.py +1314 -0
  44. intentumdiff/lsp/__init__.py +67 -0
  45. intentumdiff/lsp/client.py +544 -0
  46. intentumdiff/lsp/config.py +96 -0
  47. intentumdiff/lsp/enricher.py +227 -0
  48. intentumdiff/lsp/exceptions.py +27 -0
  49. intentumdiff/lsp/launcher.py +273 -0
  50. intentumdiff/lsp/servers.py +356 -0
  51. intentumdiff/lsp_server/__init__.py +14 -0
  52. intentumdiff/lsp_server/_codelens.py +67 -0
  53. intentumdiff/lsp_server/_diagnostics.py +62 -0
  54. intentumdiff/lsp_server/_handlers.py +175 -0
  55. intentumdiff/lsp_server/server.py +205 -0
  56. intentumdiff/plugins/__init__.py +1 -0
  57. intentumdiff/plugins/adapter.py +397 -0
  58. intentumdiff/plugins/builtins.py +323 -0
  59. intentumdiff/plugins/exceptions.py +93 -0
  60. intentumdiff/plugins/hub.py +1155 -0
  61. intentumdiff/plugins/language_metadata.py +250 -0
  62. intentumdiff/plugins/loader.py +1252 -0
  63. intentumdiff/plugins/registry.py +1079 -0
  64. intentumdiff/plugins/registry.schema.json +99 -0
  65. intentumdiff/plugins/registry_schema.py +280 -0
  66. intentumdiff/plugins/wit/plugin.wit +351 -0
  67. intentumdiff/rust_core.py +2370 -0
  68. intentumdiff/serve/__init__.py +19 -0
  69. intentumdiff/serve/_app.py +485 -0
  70. intentumdiff/serve/_static/index.html +326 -0
  71. intentumdiff/serve/_static/playground.js +567 -0
  72. intentumdiff/sources/__init__.py +1 -0
  73. intentumdiff/sources/base.py +28 -0
  74. intentumdiff/sources/file_source.py +48 -0
  75. intentumdiff/sources/git_source.py +375 -0
  76. intentumdiff/sources/live_buffer_source.py +113 -0
  77. intentumdiff/sources/patch_source.py +126 -0
  78. intentumdiff/sources/string_source.py +44 -0
  79. intentumdiff/testing.py +165 -0
  80. intentumdiff/vcs/__init__.py +37 -0
  81. intentumdiff/vcs/_safe_path.py +50 -0
  82. intentumdiff/vcs/base.py +136 -0
  83. intentumdiff/vcs/git_backend.py +97 -0
  84. intentumdiff/vcs/git_cli.py +100 -0
  85. intentumdiff/vcs/hg_backend.py +94 -0
  86. intentumdiff/vcs/perforce_backend.py +109 -0
  87. intentumdiff/vcs/svn_backend.py +105 -0
  88. intentumdiff/wasm/.gitkeep +2 -0
  89. intentumdiff/wasm/abap_parser.wasm +0 -0
  90. intentumdiff/wasm/adf_parser.wasm +0 -0
  91. intentumdiff/wasm/asciidoc_parser.wasm +0 -0
  92. intentumdiff/wasm/asm_parser.wasm +0 -0
  93. intentumdiff/wasm/assemblyscript_parser.wasm +0 -0
  94. intentumdiff/wasm/astro_parser.wasm +0 -0
  95. intentumdiff/wasm/bash_parser.wasm +0 -0
  96. intentumdiff/wasm/clojure_parser.wasm +0 -0
  97. intentumdiff/wasm/cmake_parser.wasm +0 -0
  98. intentumdiff/wasm/cpp_parser.wasm +0 -0
  99. intentumdiff/wasm/csharp_parser.wasm +0 -0
  100. intentumdiff/wasm/css_parser.wasm +0 -0
  101. intentumdiff/wasm/dart_parser.wasm +0 -0
  102. intentumdiff/wasm/databricks_parser.wasm +0 -0
  103. intentumdiff/wasm/dax_parser.wasm +0 -0
  104. intentumdiff/wasm/delphi_parser.wasm +0 -0
  105. intentumdiff/wasm/dockerfile_parser.wasm +0 -0
  106. intentumdiff/wasm/elixir_parser.wasm +0 -0
  107. intentumdiff/wasm/freebasic_parser.wasm +0 -0
  108. intentumdiff/wasm/generic_parser.wasm +0 -0
  109. intentumdiff/wasm/gitignore_parser.wasm +0 -0
  110. intentumdiff/wasm/go_parser.wasm +0 -0
  111. intentumdiff/wasm/gomod_parser.wasm +0 -0
  112. intentumdiff/wasm/graphql_parser.wasm +0 -0
  113. intentumdiff/wasm/groovy_parser.wasm +0 -0
  114. intentumdiff/wasm/haskell_parser.wasm +0 -0
  115. intentumdiff/wasm/html_parser.wasm +0 -0
  116. intentumdiff/wasm/ini_parser.wasm +0 -0
  117. intentumdiff/wasm/java_parser.wasm +0 -0
  118. intentumdiff/wasm/js_ts_parser.wasm +0 -0
  119. intentumdiff/wasm/json_parser.wasm +0 -0
  120. intentumdiff/wasm/kotlin_parser.wasm +0 -0
  121. intentumdiff/wasm/latex_parser.wasm +0 -0
  122. intentumdiff/wasm/lua_parser.wasm +0 -0
  123. intentumdiff/wasm/make_parser.wasm +0 -0
  124. intentumdiff/wasm/markdown_parser.wasm +0 -0
  125. intentumdiff/wasm/mdx_parser.wasm +0 -0
  126. intentumdiff/wasm/ocaml_parser.wasm +0 -0
  127. intentumdiff/wasm/odin_parser.wasm +0 -0
  128. intentumdiff/wasm/parser_manifest.json +590 -0
  129. intentumdiff/wasm/perl_parser.wasm +0 -0
  130. intentumdiff/wasm/php_parser.wasm +0 -0
  131. intentumdiff/wasm/plsql_parser.wasm +0 -0
  132. intentumdiff/wasm/po_parser.wasm +0 -0
  133. intentumdiff/wasm/postscript_parser.wasm +0 -0
  134. intentumdiff/wasm/powershell_parser.wasm +0 -0
  135. intentumdiff/wasm/proto_parser.wasm +0 -0
  136. intentumdiff/wasm/puppet_parser.wasm +0 -0
  137. intentumdiff/wasm/python_parser.wasm +0 -0
  138. intentumdiff/wasm/qsharp_parser.wasm +0 -0
  139. intentumdiff/wasm/r_parser.wasm +0 -0
  140. intentumdiff/wasm/reasonml_parser.wasm +0 -0
  141. intentumdiff/wasm/ruby_parser.wasm +0 -0
  142. intentumdiff/wasm/rust_parser.wasm +0 -0
  143. intentumdiff/wasm/sas_parser.wasm +0 -0
  144. intentumdiff/wasm/scala_parser.wasm +0 -0
  145. intentumdiff/wasm/scss_parser.wasm +0 -0
  146. intentumdiff/wasm/sql_parser.wasm +0 -0
  147. intentumdiff/wasm/squirrel_parser.wasm +0 -0
  148. intentumdiff/wasm/svelte_parser.wasm +0 -0
  149. intentumdiff/wasm/swift_parser.wasm +0 -0
  150. intentumdiff/wasm/terraform_parser.wasm +0 -0
  151. intentumdiff/wasm/toml_parser.wasm +0 -0
  152. intentumdiff/wasm/tsql_parser.wasm +0 -0
  153. intentumdiff/wasm/vbnet_parser.wasm +0 -0
  154. intentumdiff/wasm/vue_parser.wasm +0 -0
  155. intentumdiff/wasm/wat_parser.wasm +0 -0
  156. intentumdiff/wasm/xml_parser.wasm +0 -0
  157. intentumdiff/wasm/yaml_parser.wasm +0 -0
  158. intentumdiff/wasm/zig_parser.wasm +0 -0
  159. intentumdiff/watcher.py +259 -0
  160. intentumdiff_python-0.0.1.dist-info/METADATA +112 -0
  161. intentumdiff_python-0.0.1.dist-info/RECORD +165 -0
  162. intentumdiff_python-0.0.1.dist-info/WHEEL +4 -0
  163. intentumdiff_python-0.0.1.dist-info/entry_points.txt +80 -0
  164. intentumdiff_python-0.0.1.dist-info/licenses/LICENSE +21 -0
  165. intentumdiff_python-0.0.1.dist-info/sboms/intentumdiff-rust-core.cyclonedx.json +10968 -0
@@ -0,0 +1,326 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>IntentumDiff Playground</title>
7
+ <style>
8
+ * { box-sizing: border-box; margin: 0; padding: 0; }
9
+
10
+ body {
11
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
12
+ background: #0b0f14;
13
+ color: #e6edf3;
14
+ height: 100vh;
15
+ display: flex;
16
+ flex-direction: column;
17
+ overflow: hidden;
18
+ }
19
+
20
+ header {
21
+ padding: 10px 18px;
22
+ background: #121820;
23
+ border-bottom: 1px solid #30363d;
24
+ display: flex;
25
+ align-items: center;
26
+ gap: 16px;
27
+ flex-shrink: 0;
28
+ }
29
+ header h1 { font-size: 15px; font-weight: 600; color: #f0f6fc; }
30
+ header a { font-size: 12px; color: #58a6ff; text-decoration: none; }
31
+ header a:hover { text-decoration: underline; }
32
+
33
+ .editors {
34
+ display: flex;
35
+ flex: 1;
36
+ min-height: 0;
37
+ border-bottom: 1px solid #30363d;
38
+ background: #0d1117;
39
+ }
40
+ .pane {
41
+ flex: 1;
42
+ display: flex;
43
+ flex-direction: column;
44
+ min-width: 0;
45
+ }
46
+ .pane + .pane { border-left: 1px solid #30363d; }
47
+ .pane-label {
48
+ padding: 7px 12px;
49
+ background: #121820;
50
+ font-size: 11px;
51
+ font-weight: 600;
52
+ color: #8b949e;
53
+ text-transform: uppercase;
54
+ letter-spacing: 0.06em;
55
+ flex-shrink: 0;
56
+ border-bottom: 1px solid #30363d;
57
+ }
58
+ .editor-wrap { flex: 1; min-height: 0; position: relative; }
59
+
60
+ .toolbar {
61
+ padding: 8px 14px;
62
+ background: #121820;
63
+ border-bottom: 1px solid #30363d;
64
+ display: flex;
65
+ align-items: center;
66
+ gap: 8px 12px;
67
+ flex-wrap: wrap;
68
+ flex-shrink: 0;
69
+ }
70
+ .toolbar label { font-size: 13px; color: #8b949e; }
71
+ #lang-select,
72
+ #plugin-select {
73
+ background: #21262d;
74
+ border: 1px solid #30363d;
75
+ color: #e6edf3;
76
+ height: 30px;
77
+ padding: 4px 10px;
78
+ border-radius: 6px;
79
+ font-size: 13px;
80
+ cursor: pointer;
81
+ }
82
+ #lang-select {
83
+ min-width: 150px;
84
+ }
85
+ #plugin-select {
86
+ max-width: 320px;
87
+ }
88
+ #compare-btn {
89
+ height: 30px;
90
+ padding: 4px 18px;
91
+ background: #238636;
92
+ color: #fff;
93
+ border: none;
94
+ border-radius: 6px;
95
+ font-size: 13px;
96
+ font-weight: 600;
97
+ cursor: pointer;
98
+ transition: background 0.15s;
99
+ }
100
+ #compare-btn:hover:not(:disabled) { background: #2ea043; }
101
+ #compare-btn:disabled { background: #1a4a25; color: #555; cursor: default; }
102
+ #spinner { display: none; font-size: 12px; color: #8b949e; }
103
+ #detected-lang { font-size: 12px; color: #8b949e; }
104
+ #detected-lang strong { color: #3fb950; }
105
+
106
+ .fallback-editor {
107
+ width: 100%;
108
+ height: 100%;
109
+ resize: none;
110
+ border: 0;
111
+ outline: none;
112
+ padding: 12px;
113
+ background: #0d1117;
114
+ color: #e6edf3;
115
+ font-family: 'SFMono-Regular', Consolas, monospace;
116
+ font-size: 13px;
117
+ line-height: 1.45;
118
+ }
119
+
120
+ /* Results bar */
121
+ .results-bar {
122
+ padding: 6px 14px;
123
+ background: #121820;
124
+ border-bottom: 1px solid #30363d;
125
+ display: flex;
126
+ align-items: center;
127
+ justify-content: space-between;
128
+ flex-shrink: 0;
129
+ }
130
+ #results-toggle {
131
+ font-size: 12px;
132
+ color: #8b949e;
133
+ cursor: pointer;
134
+ user-select: none;
135
+ padding: 2px 6px;
136
+ border-radius: 4px;
137
+ }
138
+ #results-toggle:hover { color: #e6edf3; background: #21262d; }
139
+ .results.collapsed { height: 0 !important; padding: 0 !important; overflow: hidden; border: none; }
140
+
141
+ .results {
142
+ height: min(34vh, 280px);
143
+ min-height: 180px;
144
+ overflow-y: auto;
145
+ padding: 12px 14px 16px;
146
+ flex-shrink: 0;
147
+ background: #0d1117;
148
+ }
149
+
150
+ .results-empty { color: #8b949e; font-size: 13px; font-style: italic; }
151
+
152
+ .summary {
153
+ font-size: 13px;
154
+ color: #8b949e;
155
+ margin-bottom: 10px;
156
+ line-height: 1.35;
157
+ }
158
+ .summary strong { color: #e6edf3; }
159
+
160
+ .change-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
161
+
162
+ .change-item {
163
+ display: grid;
164
+ grid-template-columns: auto 1fr;
165
+ align-items: flex-start;
166
+ gap: 10px;
167
+ padding: 9px 11px;
168
+ background: #141a21;
169
+ border: 1px solid #21262d;
170
+ border-radius: 7px;
171
+ border-left: 3px solid transparent;
172
+ font-size: 13px;
173
+ }
174
+ .change-item[data-idx] { cursor: pointer; }
175
+ .change-item[data-idx]:hover { background: #18212b; border-color: #30363d; }
176
+ .change-item.ci-ADDITION { border-left-color: #3fb950; }
177
+ .change-item.ci-DELETION { border-left-color: #f85149; }
178
+ .change-item.ci-MODIFICATION{ border-left-color: #e3b341; }
179
+ .change-item.ci-MOVE { border-left-color: #58a6ff; }
180
+ .change-item.ci-STYLE_ONLY { border-left-color: #484f58; }
181
+ .change-item.ci-REFACTORING { border-left-color: #bc8cff; }
182
+ .change-item.ci-MOVE_TO_MODULE { border-left-color: #39d353; }
183
+ .change-item.ci-CROSS_FILE_RENAME { border-left-color: #ffa657; }
184
+ .change-item.ci-REORDER { border-left-color: #388bfd; }
185
+
186
+ .badge {
187
+ display: inline-block;
188
+ min-width: 82px;
189
+ padding: 3px 7px;
190
+ border-radius: 5px;
191
+ font-size: 10px;
192
+ font-weight: 700;
193
+ letter-spacing: 0;
194
+ text-align: center;
195
+ flex-shrink: 0;
196
+ margin-top: 1px;
197
+ }
198
+ .badge-ADDITION { background: #1a4a25; color: #3fb950; }
199
+ .badge-DELETION { background: #4a1a1a; color: #f85149; }
200
+ .badge-MODIFICATION{ background: #3a2e00; color: #e3b341; }
201
+ .badge-MOVE { background: #0c2d6b; color: #58a6ff; }
202
+ .badge-STYLE_ONLY { background: #1c1c1c; color: #8b949e; }
203
+ .badge-REFACTORING { background: #2d1a4a; color: #bc8cff; }
204
+ .badge-MOVE_TO_MODULE { background: #0d2e2d; color: #39d353; }
205
+ .badge-CROSS_FILE_RENAME { background: #3a1e00; color: #ffa657; }
206
+ .badge-REORDER { background: #1a2040; color: #79c0ff; }
207
+
208
+ .change-detail { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
209
+ .change-label { font-weight: 600; color: #f0f6fc; word-break: break-word; }
210
+ .change-desc { color: #9aa7b4; font-size: 12px; line-height: 1.35; }
211
+ .change-meta { color: #6e7681; font-size: 11px; line-height: 1.35; }
212
+
213
+ .parse-error {
214
+ padding: 7px 10px;
215
+ background: #3a1a00;
216
+ border-left: 3px solid #d29922;
217
+ border-radius: 6px;
218
+ font-size: 12px;
219
+ color: #e3b341;
220
+ margin-bottom: 6px;
221
+ }
222
+
223
+ .error-msg {
224
+ color: #f85149;
225
+ font-size: 13px;
226
+ padding: 8px 10px;
227
+ background: #2d1010;
228
+ border-radius: 6px;
229
+ border-left: 3px solid #f85149;
230
+ }
231
+
232
+ details.json-toggle {
233
+ margin-top: 8px;
234
+ border: 1px solid #30363d;
235
+ border-radius: 6px;
236
+ overflow: hidden;
237
+ }
238
+ details.json-toggle summary {
239
+ padding: 5px 10px;
240
+ background: #161b22;
241
+ cursor: pointer;
242
+ font-size: 12px;
243
+ color: #8b949e;
244
+ user-select: none;
245
+ list-style: none;
246
+ }
247
+ details.json-toggle summary::before { content: '\25b6 '; font-size: 10px; }
248
+ details.json-toggle[open] summary::before { content: '\25bc '; }
249
+ details.json-toggle pre {
250
+ padding: 10px;
251
+ font-size: 11px;
252
+ color: #8b949e;
253
+ overflow: auto;
254
+ max-height: 280px;
255
+ background: #0d1117;
256
+ font-family: 'SFMono-Regular', Consolas, monospace;
257
+ }
258
+
259
+ /* Monaco decoration overlays */
260
+ .dec-ADDITION { background: rgba(63,185,80,0.15); }
261
+ .dec-DELETION { background: rgba(248,81,73,0.15); }
262
+ .dec-MODIFICATION { background: rgba(227,179,65,0.15); }
263
+ .dec-MOVE { background: rgba(88,166,255,0.15); }
264
+ .dec-STYLE_ONLY { background: rgba(72,79,88,0.15); }
265
+ .dec-REFACTORING { background: rgba(188,140,255,0.15); }
266
+ .dec-MOVE_TO_MODULE { background: rgba(57,211,83,0.15); }
267
+ .dec-CROSS_FILE_RENAME { background: rgba(255,166,87,0.15); }
268
+ .dec-REORDER { background: rgba(56,139,253,0.15); }
269
+ .dec-ADDITION-glyph { border-left: 3px solid #3fb950; }
270
+ .dec-DELETION-glyph { border-left: 3px solid #f85149; }
271
+ .dec-MODIFICATION-glyph{ border-left: 3px solid #e3b341; }
272
+ .dec-MOVE-glyph { border-left: 3px solid #58a6ff; }
273
+ .dec-STYLE_ONLY-glyph { border-left: 3px solid #484f58; }
274
+ .dec-REFACTORING-glyph { border-left: 3px solid #bc8cff; }
275
+ .dec-MOVE_TO_MODULE-glyph { border-left: 3px solid #39d353; }
276
+ .dec-CROSS_FILE_RENAME-glyph { border-left: 3px solid #ffa657; }
277
+ .dec-REORDER-glyph { border-left: 3px solid #388bfd; }
278
+ </style>
279
+ </head>
280
+ <body>
281
+
282
+ <header>
283
+ <h1>IntentumDiff Playground</h1>
284
+ <a href="/api/docs" target="_blank">API docs</a>
285
+ </header>
286
+
287
+ <div class="editors">
288
+ <div class="pane">
289
+ <div class="pane-label">Old code</div>
290
+ <div class="editor-wrap" id="old-wrap"></div>
291
+ </div>
292
+ <div class="pane">
293
+ <div class="pane-label">New code</div>
294
+ <div class="editor-wrap" id="new-wrap"></div>
295
+ </div>
296
+ </div>
297
+
298
+ <div class="toolbar">
299
+ <label for="lang-select">Language</label>
300
+ <select id="lang-select">
301
+ <option value="">Auto-detect</option>
302
+ </select>
303
+ <label id="plugin-label" for="plugin-select" style="display:none">Plugin</label>
304
+ <select id="plugin-select" style="display:none"></select>
305
+ <button id="compare-btn">Compare &#9654;</button>
306
+ <span id="spinner">Computing...</span>
307
+ <span id="detected-lang" style="display:none">Detected: <strong id="detected-lang-name"></strong></span>
308
+ </div>
309
+
310
+ <div class="results-bar">
311
+ <span id="results-toggle">Changes &#9662;</span>
312
+ </div>
313
+
314
+ <div class="results" id="results">
315
+ <p class="results-empty">Paste code into the editors above, then click Compare.</p>
316
+ </div>
317
+
318
+ <!-- Monaco is served from the vendored local copy.
319
+ Run "python scripts/vendor_monaco.py" to populate /static/vendor/.
320
+ For development without vendoring, replace the src below with:
321
+ https://cdn.jsdelivr.net/npm/monaco-editor@0.49.0/min/vs/loader.js
322
+ NOTE: CDN usage violates the Content-Security-Policy in production. -->
323
+ <script src="/static/vendor/min/vs/loader.js"></script>
324
+ <script src="/static/playground.js"></script>
325
+ </body>
326
+ </html>