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
@@ -30,12 +30,12 @@ except ImportError:
30
30
  from intentumdiff.core.models import DiffConfig
31
31
  from intentumdiff.differ import SemanticDiffer
32
32
  from intentumdiff.lsp_server._codelens import semantic_diff_to_codelens
33
- from intentumdiff.lsp_server._diagnostics import semantic_diff_to_diagnostics
34
33
  from intentumdiff.lsp_server._handlers import (
35
34
  _ServerState,
36
35
  _do_diff,
37
36
  schedule_diff,
38
37
  uri_to_path,
38
+ WorkspaceContainmentError,
39
39
  )
40
40
 
41
41
  log = logging.getLogger(__name__)
@@ -117,6 +117,7 @@ def create_server(
117
117
  def _did_close(params: lsp_types.DidCloseTextDocumentParams) -> None:
118
118
  uri = params.text_document.uri
119
119
  state.diff_cache.pop(uri, None)
120
+ state.source_cache.pop(uri, None)
120
121
  task = state.pending_tasks.pop(uri, None)
121
122
  if task is not None and not task.done():
122
123
  task.cancel()
@@ -134,7 +135,20 @@ def create_server(
134
135
  diff = state.diff_cache.get(uri)
135
136
  if diff is None:
136
137
  return []
137
- return semantic_diff_to_codelens(diff)
138
+ sources = state.source_cache.get(uri)
139
+ if sources is None:
140
+ from intentumdiff.lsp_server._handlers import _invalidate_failed_review
141
+ _invalidate_failed_review(server, state, uri)
142
+ return []
143
+ try:
144
+ return semantic_diff_to_codelens(
145
+ diff, old_source=sources[0], new_source=sources[1],
146
+ )
147
+ except Exception as exc:
148
+ log.warning("intentumdiff: Rust CodeLens mapping failed for %s: %s", uri, exc)
149
+ from intentumdiff.lsp_server._handlers import _invalidate_failed_review
150
+ _invalidate_failed_review(server, state, uri)
151
+ return []
138
152
 
139
153
  # ------------------------------------------------------------------
140
154
  # Custom request: intentumdiff/semanticDiff
@@ -168,7 +182,7 @@ def create_server(
168
182
  diff = _do_diff(state, server, new_uri, content)
169
183
  else:
170
184
  # Different URIs — read both from disk and compare.
171
- from intentumdiff.sources.string_source import StringSource
185
+ from intentumdiff.sources.file_source import FileSource
172
186
 
173
187
  # Derive workspace root for containment check.
174
188
  workspace_root: Path | None = None
@@ -184,11 +198,9 @@ def create_server(
184
198
 
185
199
  old_path = uri_to_path(old_uri, workspace_root=workspace_root)
186
200
  new_path = uri_to_path(new_uri, workspace_root=workspace_root)
187
- old_content = old_path.read_text(encoding="utf-8", errors="replace")
188
- new_content = new_path.read_text(encoding="utf-8", errors="replace")
189
- source = StringSource(
190
- old_content=old_content,
191
- new_content=new_content,
201
+ source = FileSource(
202
+ old_path=old_path,
203
+ new_path=new_path,
192
204
  filename=new_path.name,
193
205
  )
194
206
  diff = state.differ.diff(source)
@@ -198,6 +210,14 @@ def create_server(
198
210
 
199
211
  return json.loads(diff.model_dump_json())
200
212
 
213
+ except WorkspaceContainmentError as exc:
214
+ # A refusal, not a fault. Logged distinctly so an operator can tell "someone asked
215
+ # for a path outside the workspace and we blocked it" from "the engine threw" -
216
+ # previously both produced the same line at the same level, which made the audit
217
+ # trail for a path-traversal attempt indistinguishable from routine noise.
218
+ log.warning("intentumdiff/semanticDiff refused (workspace containment): %s", exc)
219
+ return {"error": str(exc), "code": "workspace_containment"}
220
+
201
221
  except Exception as exc: # noqa: BLE001
202
222
  log.warning("intentumdiff/semanticDiff error: %s", exc)
203
223
  return {"error": str(exc)}
@@ -142,6 +142,11 @@ class ParserAdapter:
142
142
  """Filesystem path of the backing ``.wasm`` file."""
143
143
  return self._plugin.wasm_path
144
144
 
145
+ @property
146
+ def compiled_wasm_sha256(self) -> str | None:
147
+ """Identity of the exact compiled Wasm buffer, supplied by the loader."""
148
+ return self._plugin.compiled_wasm_sha256
149
+
145
150
  @property
146
151
  def is_trusted(self) -> bool:
147
152
  return self._plugin.trusted
@@ -20,13 +20,6 @@ def _wasm(name: str) -> str:
20
20
  return str(_WASM_DIR / name)
21
21
 
22
22
 
23
- def _wasm_or_generic(name: str) -> str:
24
- path = _WASM_DIR / name
25
- if path.exists():
26
- return str(path)
27
- return _wasm("generic_parser.wasm")
28
-
29
-
30
23
  # ── Parser entry points ──────────────────────────────────────────────────────
31
24
 
32
25
  def python_parser_entry() -> str:
@@ -42,31 +35,31 @@ def generic_parser_entry() -> str:
42
35
 
43
36
 
44
37
  def graphql_parser_entry() -> str:
45
- return _wasm_or_generic("graphql_parser.wasm")
38
+ return _wasm("graphql_parser.wasm")
46
39
 
47
40
 
48
41
  def gitignore_parser_entry() -> str:
49
- return _wasm_or_generic("gitignore_parser.wasm")
42
+ return _wasm("gitignore_parser.wasm")
50
43
 
51
44
 
52
45
  def ocaml_parser_entry() -> str:
53
- return _wasm_or_generic("ocaml_parser.wasm")
46
+ return _wasm("ocaml_parser.wasm")
54
47
 
55
48
 
56
49
  def reasonml_parser_entry() -> str:
57
- return _wasm_or_generic("reasonml_parser.wasm")
50
+ return _wasm("reasonml_parser.wasm")
58
51
 
59
52
 
60
53
  def latex_parser_entry() -> str:
61
- return _wasm_or_generic("latex_parser.wasm")
54
+ return _wasm("latex_parser.wasm")
62
55
 
63
56
 
64
57
  def asciidoc_parser_entry() -> str:
65
- return _wasm_or_generic("asciidoc_parser.wasm")
58
+ return _wasm("asciidoc_parser.wasm")
66
59
 
67
60
 
68
61
  def po_parser_entry() -> str:
69
- return _wasm_or_generic("po_parser.wasm")
62
+ return _wasm("po_parser.wasm")
70
63
 
71
64
 
72
65
  def js_ts_parser_entry() -> str:
@@ -91,3 +91,31 @@ class PluginLoadError(PluginError):
91
91
  def __init__(self, wasm_path: str, detail: str) -> None:
92
92
  self.wasm_path = wasm_path
93
93
  super().__init__(f"Failed to load plugin from {wasm_path!r}: {detail}")
94
+
95
+
96
+ class PluginSecurityError(PluginLoadError):
97
+ """A security gate denied loading; parser fallback must not bypass the denial."""
98
+
99
+
100
+ class RegistryManifestError(RuntimeError):
101
+ """The plugin registry manifest is not valid YAML or fails core's validator (#309, #329).
102
+
103
+ A ``RuntimeError``, the error :func:`~intentumdiff.plugins.hub.fetch_official_registry`
104
+ documents for a registry it cannot fetch or parse. The message lists every violation;
105
+ ``errors`` carries core's ``validate_registry_manifest`` errors unchanged, each a
106
+ ``{"path": <RFC 6901 pointer>, "message": str}`` dict (empty for a YAML/JSON error).
107
+ """
108
+
109
+ def __init__(self, message: str, errors: list[dict[str, str]] | None = None) -> None:
110
+ super().__init__(message)
111
+ self.errors: list[dict[str, str]] = list(errors or [])
112
+
113
+
114
+ class RegistryManifestWarning(UserWarning):
115
+ """Core's validator rejected part of the plugin registry manifest; loading continued (#309).
116
+
117
+ Entries core reports under ``/plugins/<name>`` are skipped and every other entry loads; a
118
+ manifest whose top level is unusable (core errors at ``/`` or ``/plugins``) loads none. The
119
+ message lists core's ``"<pointer>: <message>"`` errors and names the entries not loaded.
120
+ Strict tooling uses :func:`~intentumdiff.plugins.registry_schema.check_registry_manifest`.
121
+ """
@@ -20,8 +20,7 @@ Plugins can be installed from two sources:
20
20
 
21
21
  For official plugins (no ``repo``), the short name is expanded to the
22
22
  full package in the ``buchochelliq-labs`` GitHub org:
23
- ``dbt`` -> ``intentumdiff-dbt``
24
- -> ``https://github.com/buchochelliq-labs/intentumdiff-dbt``
23
+ ``dbt`` -> package ``intentumdiff-dbt`` in that org
25
24
 
26
25
  Security model
27
26
  --------------
@@ -77,6 +76,7 @@ from __future__ import annotations
77
76
 
78
77
  import hashlib
79
78
  import importlib.metadata as _meta
79
+ import json
80
80
  import logging
81
81
  import re
82
82
  import ssl
@@ -84,10 +84,14 @@ import subprocess
84
84
  import sys
85
85
  import urllib.error
86
86
  import urllib.request
87
+ import warnings
87
88
  from dataclasses import dataclass, field
88
89
  from pathlib import Path, PurePosixPath, PureWindowsPath
89
90
  from typing import Any
90
91
 
92
+ from intentumdiff.plugins.exceptions import RegistryManifestError, RegistryManifestWarning
93
+ from intentumdiff.plugins.registry_schema import format_manifest_error, registry_manifest_errors
94
+
91
95
  logger = logging.getLogger(__name__)
92
96
 
93
97
  # ---------------------------------------------------------------------------
@@ -387,32 +391,12 @@ def fetch_official_registry(
387
391
  strict: bool = False,
388
392
  timeout: int = 15,
389
393
  ) -> dict[str, RegistryEntry]:
390
- """
391
- Fetch and parse the official plugin registry manifest.
392
-
393
- Parameters
394
- ----------
395
- ref:
396
- Git ref (branch, tag, or commit SHA) of the registry repo to fetch
397
- from. Default ``"main"``. **Pin to a commit SHA in production for
398
- reproducible, tamper-evident installs.**
399
- strict:
400
- When ``True``, *ref* must be a full 40-character commit SHA. This
401
- enforces the production/CI policy: mutable refs (branch names, tags)
402
- are rejected. Pass ``strict=True`` via the ``--strict-registry`` CLI
403
- flag.
404
- timeout:
405
- HTTP timeout in seconds.
406
-
407
- Returns
408
- -------
409
- dict[str, RegistryEntry]
410
- Mapping of short plugin name → registry entry.
394
+ """Fetch the official registry manifest at *ref* and parse it into ``{name -> entry}``.
411
395
 
412
- Raises
413
- ------
414
- RuntimeError
415
- If the registry cannot be fetched or parsed.
396
+ Pin *ref* to a commit SHA in production; ``strict=True`` (``--strict-registry``) requires a
397
+ full 40-character SHA. Raises ``RuntimeError`` when the registry cannot be fetched and
398
+ :class:`RegistryManifestError` when it is not YAML or has no JSON form; core-rejected
399
+ entries are skipped with a :class:`RegistryManifestWarning` (#309).
416
400
  """
417
401
  _validate_registry_ref(ref, strict=strict)
418
402
  url = f"{OFFICIAL_REGISTRY_RAW_URL}/{ref}/registry.yaml"
@@ -424,26 +408,41 @@ def fetch_official_registry(
424
408
  with urllib.request.urlopen(url, timeout=timeout, context=ctx) as resp: # nosemgrep: python.lang.security.audit.dynamic-urllib-use-detected.dynamic-urllib-use-detected -- scheme asserted https above; base is a fixed constant + validated ref. noqa: S310 # nosec B310 - https scheme asserted above
425
409
  content = resp.read().decode("utf-8")
426
410
  except urllib.error.URLError as exc:
427
- raise RuntimeError(
428
- f"Could not fetch the official plugin registry from {url}.\n"
429
- f"Check your internet connection. Detail: {exc}"
430
- ) from exc
431
-
411
+ raise RuntimeError(f"Could not fetch the official plugin registry from {url}.\n"
412
+ f"Check your internet connection. Detail: {exc}") from exc
432
413
  return parse_registry_manifest(content)
433
414
 
434
415
 
435
416
  def parse_registry_manifest(content: str) -> dict[str, RegistryEntry]:
436
417
  """Parse a registry manifest (YAML text) into ``{short name -> RegistryEntry}``.
437
418
 
438
- Split out from :func:`fetch_official_registry` so the parse (including the #94
439
- ``abi_target``) is testable without the network fetch.
419
+ Core's validator judges every entry (#309, #329) without blocking the load: entries it
420
+ rejects are skipped (none load if the top level is) with a :class:`RegistryManifestWarning`.
440
421
  """
441
422
  yaml = _require_yaml()
442
- data: dict[str, Any] = yaml.safe_load(content) or {}
443
-
423
+ try:
424
+ data = yaml.safe_load(content)
425
+ except yaml.YAMLError as exc:
426
+ raise RegistryManifestError(f"plugin registry manifest is not YAML: {exc}") from exc
427
+ errors = registry_manifest_errors(data)
428
+ data = json.loads(json.dumps(data)) # the document core judged (keys are JSON strings)
429
+ tokens = [error["path"].split("/")[1:] for error in errors] # RFC 6901 reference tokens
430
+ skipped = {t[1].replace("~1", "/").replace("~0", "~") for t in tokens if len(t) > 1
431
+ and t[0] == "plugins"}
432
+ plugins = data.get("plugins") if isinstance(data, dict) else None
433
+ unusable = not isinstance(plugins, dict) or any(t in ([], [""], ["plugins"]) for t in tokens)
434
+ if unusable:
435
+ skipped, plugins = set(), {}
436
+ if errors or unusable:
437
+ names = ", ".join(sorted(skipped & set(plugins))) or "none"
438
+ outcome = "no entries were loaded" if unusable else f"skipped entries: {names}"
439
+ problems = "; ".join(map(format_manifest_error, errors)) or "no usable plugins mapping"
440
+ message = f"invalid plugin registry manifest ({problems}); {outcome}"
441
+ logger.warning("%s", message)
442
+ warnings.warn(message, RegistryManifestWarning, stacklevel=2)
444
443
  entries: dict[str, RegistryEntry] = {}
445
- for plugin_name, entry_data in data.get("plugins", {}).items():
446
- if not isinstance(entry_data, dict):
444
+ for plugin_name, entry_data in plugins.items():
445
+ if plugin_name in skipped:
447
446
  continue
448
447
  entries[plugin_name] = RegistryEntry(
449
448
  name=plugin_name,
@@ -471,10 +470,8 @@ def _require_yaml() -> Any:
471
470
  import yaml # type: ignore[import-untyped]
472
471
  return yaml
473
472
  except ImportError as exc:
474
- raise ImportError(
475
- "pyyaml is required to read/write intentumdiff_plugins.yaml. "
476
- "Install it with: pip install pyyaml"
477
- ) from exc
473
+ raise ImportError("pyyaml is required to read/write intentumdiff_plugins.yaml. "
474
+ "Install it with: pip install pyyaml") from exc
478
475
 
479
476
 
480
477
  def load_plugins_file(path: Path) -> list[PluginSpec]:
@@ -987,7 +984,6 @@ def inspect_wasm_in_wheel(
987
984
 
988
985
  The wheel is not installed — no Python code from the plugin is executed.
989
986
  """
990
- import io
991
987
  import zipfile
992
988
 
993
989
  checksums: dict[str, str] = {}