Skip to content

Release v2.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Nov 12:20
· 103 commits to main since this release
Immutable release. Only release title and notes can be modified.
f23f412

Added

  • get_performance_metrics reports which annotation shapes inspect degrades to a raw type string (Callable, Literal, Annotated and so on), counted by shape: a typeref_degraded section in its report, and a pyeye_typeref_degraded_total counter, labelled by kind, in its Prometheus format. Reading them doesn't reset the counts (#331).
  • The AST/Script cache's stats split evictions by cause: cap_evictions (entries dropped to stay under PYEYE_ARTIFACT_CACHE_MAX_ENTRIES or PYEYE_SCRIPT_CACHE_MAX_ENTRIES, the sign that the caps are too small) and stale_evictions (entries dropped because their file changed or was invalidated). get_performance_metrics reports both, in its report's artifact_cache section and as the Prometheus counters pyeye_artifact_cache_cap_evictions and pyeye_artifact_cache_stale_evictions. evictions and pyeye_artifact_cache_evictions keep their meaning, the total of the two (#401).
  • Config entries the path check refuses (a .pyeye.json package, namespace or standalone directory that resolves to a restricted location) are now reported to the caller. rejected_paths lists each one as {scope, path, reason: "rejected_path", detail}. It appears in the plugin tools' envelope (between unsearched_scopes and results) and in configure_packages' result, and is [] when none are refused. It is left out only when the check couldn't run (a config file that failed to load), never reported as []. A scope with a rejected entry is always listed in unsearched_scopes, so a result can no longer silently leave out a package you configured (#898).
  • find_pydantic_models' envelope (envelope=true) gains unplaced_classes: every class in the searched scope whose base is an expression (make_base(), a conditional), as {name, file, line, base}. Such a class can't be placed statically, so it isn't reported as a model, and it used to be dropped silently. The key is always present ([] when none). The list is capped by the new max_unplaced parameter (default 50, None for all). When the cap cuts, the envelope carries truncated, truncation_reasons: ["max_unplaced"] and total, which refer to unplaced_classes only. results is never capped. The bare-list form is unchanged.
  • PYEYE_RESOLVE_CACHE_MAX_ENTRIES caps a new per-project cache of the imports edge's resolutions of targets outside the project. trace over imports into the standard library no longer re-resolves the same targets on every hop and call. Misses and project targets are never cached, and a file-watcher event clears the cache (#925).
  • find_django_views reports Django REST framework views, and every record has a new framework key, "django" or "rest_framework". A DRF class view has a base imported from rest_framework, such as APIView, a generic view or a ViewSet class; a DRF function view is decorated with rest_framework.decorators.api_view. A subclass of a DRF view is rest_framework. The tool now also reads viewsets.py and api.py and the modules of viewsets and api packages, and a views file that imports only rest_framework (#947).
  • find_flask_routes records gain urls, the URLs each route is served at. find_flask_blueprints records gain url_prefixes, each blueprint's served prefixes. Both are composed as Flask does: a register_blueprint(..., url_prefix=...) overrides the blueprint's own prefix, a nested blueprint adds its parent's, and a route's rule is joined to its blueprint's prefix. They are sorted lists, because a blueprint registered twice is served twice, and are present only when every registration's prefix is statically known. They are absent when a prefix isn't a string literal, the blueprint isn't registered in the searched scope, a registration has a subdomain or a ** splat, or there's a cycle. path and url_prefix are unchanged.
  • configure_packages' result has a new unsaved key, {packages, namespaces, standalone: {dirs}}. It lists the configured entries that live only in this session, not in a config file, in the same form as the result's own packages, namespaces and standalone. It is always present, and empty when everything is saved (#953).
  • A new config key, environment: the path to the project's virtualenv, or false for none. It overrides discovery (#993).
  • configure_packages' result has a new, always-present environment key, {path, source}. It says where third-party packages are read from, and source is config, project, VIRTUAL_ENV, CONDA_PREFIX or none. When no environment is found, pyeye logs a warning once per project, and resolve and inspect add a note to a third-party name they can't find, so a missing venv can be told apart from a name that doesn't exist (#993).

Changed

  • The documentation is published at okeefeco.github.io/pyeye-mcp, built with MkDocs from the Markdown under docs/, with its navigation generated from the doc registry. It replaces the Sphinx site removed in #823 (#861).

Deprecated

  • trace_model_inheritance's mro is deprecated and will be removed in v3.0 (#749). It is filled now (#870), so it's correct until then. To walk a class's bases, use trace(follow=["superclasses"]).
  • pyeye.unified_metrics.get_unified_collector() is deprecated: it emits a DeprecationWarning and returns a collector that accepts the old calls and records nothing. scripts/unified_metrics.py prints a deprecation notice and exits. The environment variables PYEYE_ISSUE and PYEYE_PARENT_SESSION are deprecated: accepted and ignored. All of these will be removed in a future major release. (#943)

Removed

  • The Sphinx docs tree (docs/source/), its GitHub Pages workflow, its Sphinx dependencies and Dependabot's Sphinx group are removed. The docs site is now built with MkDocs from the Markdown under docs/ (see Changed). The architecture pages that were still correct moved to docs/architecture/ (resolution.md, plugin-system.md, caching.md), checked against the code, and the python-explore skill links the new resolution page (#823).
  • The MCP server no longer writes usage metrics to ~/.pyeye/metrics/. The unified metrics store recorded every tool call, which cost each call a locked rewrite of a file, and nothing that shipped read it. The server now has fewer places that write files, and the files it wrote there before (active_sessions.json, completed_sessions.jsonl, aggregated_stats.json and their .lock files) can be deleted. Connection diagnostics, the error tracker and the in-process performance metrics (get_performance_metrics) keep working. (#943)

Fixed

  • get_performance_metrics(export_format="prometheus") now emits valid Prometheus text format, checked in tests by prometheus_client's own parser (a new dev-only dependency, never imported at runtime):

    • operation durations are declared as a summary, the type their quantile series have, and gain the pyeye_operation_duration_ms_sum and _count series a summary requires. They were declared a histogram.
    • pyeye_operation_count is its own counter family. It was interleaved with the durations, with no HELP or TYPE.
    • the memory gauge has no space before its labels.
    • label values are escaped.
    • the output ends with a newline.
  • A package added with configure_packages under a directory whose name isn't a Python identifier (.hidden/, my-dir/) now resolves: its classes, functions, methods and attributes are found by resolve, inspect, outline and expand. Before, they were scanned but never resolved, and under an ordinary directory (vendor/) only top-level names resolved, by luck of a fallback (#814).

  • MCP tool descriptions now take their edge, ceiling and scope lists from the code when the server loads, so they can't drift from it, and state the ceiling of each edge they expose: what the edge's answer is complete over. A docs check fails any description that exposes an edge without its ceiling (#827). Corrected along the way:

    • trace now lists submodules and re_exports as edges it follows, and each edge's ceiling.
    • expand now documents its submodules edge, lists every deferred reference edge, and states which kinds every edge applies to. Each edge entry states its own ceiling.
    • outline gives the meaning of its two ceilings.
    • The plugin tools document every scope form (packages, standalone and package:<path> were missing) and their envelope parameter.
    • resolve documents max_candidates in its Args.
  • SECURITY.md now describes pyeye's real behaviour:

    • the server starts no subprocess of its own; the ripgrep subprocess was removed in #628, and Jedi's one helper subprocess loads compiled modules only from the server's environment;
    • configure_packages writes .pyeye.json in its project_path, with save defaulting to true;
    • which path inputs the sanity check covers;
    • when each security check runs.

    The response-time numbers, which no policy backed, are replaced by what the maintainers aim for.

  • SECURITY.md's security model now takes its values from pyeye's code, so they can't drift. That covers the server's process-starting calls, the places it writes, the files it keeps, what the path check rejects and which forms of a path it checks, its networking imports, and Jedi's load_unsafe_extensions setting (#830).

  • Four history pages no longer state figures nothing backs, and now publish on the docs site (#830):

    • docs/migration-guide.md says it covers 0.1.x to 0.2.0. It drops its unsourced benchmark and memory figures, the removed invalidate_scope and the old default-scope block, which now links the live defaults. It fixes a claim that was wrong even then, a wrong signature and an invalid pip install command.
    • docs/api-redesign.md notes that it records the redesign's design, with current shapes in docs/reference/ and the python-explore skill. Its examples no longer use the deleted GranularCache or relative paths.
    • docs/METRICS_BASELINE.md and benchmarks/BASELINE_RESULTS.md keep what happened and drop their unbacked figures, targets and projections.
  • README.md, the docs site's home page, no longer hand-copies code facts. The core, plugin and edge lists and the artifact-cache default are fact blocks, and the env-var table links the generated reference.

  • README.md drops claims nothing backs:

    • the "performance baselines" table, for operations (symbol_search, goto_definition) that no longer exist;
    • the stale architecture tree;
    • the find_patterns plugin example (plugins are built in);
    • the unrecorded cache-sizing measurements;
    • the claim that .pyeye.override.json is git-ignored automatically (add it to your .gitignore).
  • README.md's GitHub Copilot setup, which used a settings.json key, an @mcp list command and plan requirements that current VS Code and GitHub docs don't support, now links those docs.

  • The plugin tool pages (docs/api/) now show each tool's real output through examples CI runs, and link the generated parameter reference. They replace hand-written response shapes and examples that used keys no tool returns (#830). The scope forms and the envelope wrapper are documented once, in docs/api/README.md.

  • docs/api/README.md no longer says a framework in a newly added package needs a server restart: configure_packages activates it and names it in activated_plugins (#659).

  • The architecture pages (docs/architecture/) take the resolver's strategy order, its bare-name policy, the plugins' tool lists and the cache defaults from the code. They correct the strategy chain (it was missing the private-stdlib step), the "every tool reports the definition-site handle" claim, the cache list (the class and import graphs were missing), and which edges report unparseable_files (#830).

  • examples/configurations/enterprise.json and monorepo.json no longer use scopes that search nothing: namespace:company and namespace:company.sdk matched no configured namespace, and ./packages/app-* / ./tools/* aren't scope forms. Their default, aliases and packages now resolve, the ignored performance block is gone, and a test checks every example's scopes.

  • DOCUMENTATION.md no longer describes behaviour pyeye doesn't have: a ../ path rejection, input sanitisation, a file-size limit, an on-disk .pyeye_cache, a --debug flag, environment variables as a package-config source, user-loaded plugins, and unbacked memory figures. Its security section links SECURITY.md. Its tool lists and the required Python version come from the code, and the rest links the generated reference.

  • CONTRIBUTING.md says to install pre-commit before pre-commit install, drops the stale module tree and the GitHub Discussions link (Discussions aren't enabled), and links the architecture pages.

  • The guides under docs/, docs/testing/ and docs/development/ now match the code, and take their facts from it (#830):

    • The coverage threshold, cache and timeout defaults, scope forms and duplicate-code limits come from the code instead of hand-written copies.
    • Commands no longer hard-code the coverage threshold.
    • docs/testing/PERFORMANCE.md describes the suite that exists, not an invented one. docs/testing/FIXTURES.md points at the real fixtures instead of fixtures that don't exist.
    • The log samples in docs/debugging-connection-drops.md and the advice in docs/TROUBLESHOOTING.md match current behaviour.
    • The migration guide's rollback step works.
    • Unbacked numbers, targets and projections are removed.
  • docs/architecture/caching.md no longer says the scoped cache holds lookup results; it holds each scope's file list.

  • The inspect tool description no longer says edge counts "come in later phases" or shows edge_counts={}. It says which edges are counted and that an unmeasured one is absent, never 0. It also documents the deprecated re-export list and when superclasses is omitted.

  • The resolve description's success shape includes location. The expand shape adds transitive_hint, the max_stubs truncation fields and bindings on re-export stubs.

  • The get_connection_diagnostics description lists the fields the tool actually returns.

  • The plugin tool descriptions say each record carries scope, location, and handle or unresolved. get_model_schema and trace_model_inheritance say model_name takes a class name or a handle, and describe the not-found and ambiguous answers.

  • The outline description and the python-explore skill name the unparseable truncation reason.

  • The architecture-review skill describes the decision-log flow as writing a file, and points auditors at unresolved_imports rather than warning that imports silently drops imports. It no longer says a file-path handle "returns junk": it gets found: false.

  • python-explore no longer says conditional imports are invisible to imports (guarded imports are listed). It binds the deferred edges and the imports ceiling to their facts, scopes "stable across edits" to edits that don't rename or move a symbol, and links the reference for the candidate and stub caps.

  • architecture-review binds its seed-axis table to the axes fact, defers to decision-log for that skill's rules instead of copying them, and tells the auditor to emit one no_signal finding per axis when it finds nothing, instead of [], which contradicted the rule before it.

  • duplication-review says normalisation ignores every name (so code of the same shape that calls different functions can match), gives the exception to how a function-to-method copy is grouped, and says a re-surfaced family shows its new sites. It links the record for its measured precision.

  • The python-explore skill's ceiling definitions are the generated ceilings table, not a hand copy. Its plugin-envelope shape and its resolve examples are executed and checked against a fixture project, and its plugin tool list links the tool reference.

  • The architecture-review skill shows the ranker's default bucket order from a new review.buckets fact, rather than a hard-coded order, and says to show the re-tiered map when a project changed it.

  • The duplication-review skill binds each flag it documents to its fact.

  • The docs take repository and pyeye config values from the files that define them (#830):

    • the pre-commit hooks named in SECURITY.md;
    • the uv flags CI and the hooks use, in CONTRIBUTING.md;
    • the config file names and keys, in the README's Configuration Methods;
    • every config key pyeye ignores with a warning, in DOCUMENTATION.md, which had listed 5 of the 9.
  • Pages that repeated another page's explanation now link to it (#830):

    • CONTRIBUTING.md's changelog-fragment and decision steps link to changes/README.md and the decisions log;
    • docs/api/README.md's config-source list links to the README;
    • the plugin tool pages link to the shared plugin tools overview.
  • docs/architecture/resolution.md no longer restates #419's fallback rate; it points to #419's measurement.

  • Contributor tooling, none of it part of the installed package, was corrected (#828, #830, #879, #894, #915, #965, #969, #970, #981):

    • The dogfooding scripts and aliases run through uv run --frozen, and their always-empty sync command and in-process metrics read are removed.
    • The grep/rg wrappers that scripts/setup_dogfooding.sh installs no longer break those commands.
    • The MCP monitoring hooks count the Claude Code plugin's tool names and Claude Code's own Grep tool.
    • scripts/claude_hooks/setup_mcp_monitoring.sh merges pyeye's hooks into ~/.claude/settings.json instead of replacing your Claude Code hooks, and no longer fails on macOS. If an earlier run removed hooks of yours, they're in the ~/.claude/settings.json.backup-* file that run made.
    • The pip-audit pre-commit check retries network errors.
    • Claude's project instructions and the internal skills no longer state stale or unbacked facts.

    If you set up the dogfooding or monitoring scripts before, re-run bash scripts/setup_dogfooding.sh and bash scripts/claude_hooks/setup_mcp_monitoring.sh.

  • A relative path passed to a tool now resolves against project_path, not the server's working directory (#842, #843). This covers resolve_at's file, resolve's path/to/file.py:42 and path/to/file.py forms, and a plugin tool's package:<path> scope. Before, a multi-project server looked in the wrong place, and resolve_at contradicted its own "relative to project_path" message. A relative path containing .. (file, project_path, configure_packages' packages) is no longer made absolute against the working directory by the input validator first; the validator still checks where it really leads, and now also refuses a climb onto a system directory itself (../../etc), not only into one. On Windows, a drive-relative path such as C:foo on a drive other than the project's is now rejected with a clear error. Absolute paths are unchanged.

  • A plugin tool's envelope now lists a package:<path> scope whose directory doesn't exist in unsearched_scopes, spelled as you gave it. Before, such a scope searched nothing and returned [], with only a server log warning (#842).

  • pyeye installed from a wheel, or started from any directory other than its source checkout's root, failed to start: import pyeye.mcp.server raised FileNotFoundError for tests/conformance/response_linter.py. Tool descriptions now take their facts from the installed code only, and CI checks that a built wheel's server imports with no repo around it (#851).

  • A re-export made by a relative import in a package's __init__.py (from .thing import X) now resolves to its definition (pkg.thing.X), like any other re-export. Before, resolve/inspect("pkg.X") answered pkg.X at the import line, though inspect("pkg.thing.X") listed pkg.X among its re_exports (#857). A name that the package also defines locally (from .src import A and then class A) still resolves to the local definition, as at runtime, and an if/else re-export of two different definitions isn't collapsed to either branch.

  • A package added with configure_packages(save=False), the session-only mode, can now be analysed by Jedi too. Before, only a package saved in .pyeye.json reached it, so for a session-only package: imports of it were unresolved, resolve_at found nothing at an imported name, callees into it and types from it had no handle, and a relative import inside one under a dot-directory (.hidden/…) couldn't be followed (#858).

  • The Pydantic tools read model_config written as ConfigDict(...) or SettingsConfigDict(...), bare or module-qualified, and with a type annotation (model_config: ConfigDict = ...), not only as a dict literal. find_model_config's settings and the models' config were empty for these forms.

  • get_model_schema's computed_fields lists the model's own @computed_field members (name, line and return type). It was always empty. A plain @property isn't listed, because pydantic doesn't treat it as a computed field.

  • The Pydantic tools leave out a model's config (on models and schemas) and find_model_config's settings when its model_config can't be fully read from source: a function call, a name, a subscript, a ** splat, a positional argument or a non-literal key. They used to report {} or only some of the keys, which read as "these are all the settings". A model with no configuration still reports {}.

  • trace_model_inheritance fills mro (the static C3 order) and fields_inherited, which were always empty. Each inherited field carries defined_in, the handle of the class that declares it. Both are computed from the model's statically resolved bases, project or installed, so the walk goes through pydantic's own BaseModel and RootModel. Each is omitted when it can't be computed: when a base doesn't resolve to a class, when there's no consistent order, or (for fields_inherited) when an ancestor's class body can't be read, or its fields can't be known under the model's own pydantic API (#913).

  • The Pydantic tools' own field lists (fields, fields_own) no longer include model_config, ClassVar attributes or private _x names, which pydantic doesn't treat as fields.

  • A glob in a namespaces config entry (e.g. "company": ["~/repos/company-*"]) now expands to its matching directories. Before, the namespace mapped to the literal pattern, so namespace:company searched nothing, while the matches were analysed only as plain packages. Namespaces and packages now share one expansion. Matches are sorted, for packages too, so precedence no longer depends on filesystem order: the first repository to define a module wins. Only * makes a glob, so a literal ? or [ in a path keeps its meaning. A glob with any refused match is skipped whole, with a warning. A glob that matches nothing leaves the namespace configured with no repositories, and its scope is reported in unsearched_scopes rather than counted as searched (#872).

  • The Flask tools no longer miss real code where they used to return a confident [] or a partial list:

    • find_flask_routes, find_error_handlers and find_cli_commands now report async def handlers.
    • find_flask_blueprints now finds flask.Blueprint(...) (or any <module>.Blueprint(...)), and annotated assignments such as bp: Blueprint = Blueprint(...).
    • find_flask_config now looks for config.py and settings.py in the scope you ask for, instead of always the main project: at each scope root or one directory below it. Results under main are unchanged. (#873)
  • The expand and trace descriptions, the operation docstrings, the python-explore skill and the resolution architecture page now agree on which edges report unparseable_files. Several said only subclasses and imported_by, but re_exports reports it too. The set is stated once, as UNPARSEABLE_FILE_EDGES in the edge registry, and the docs and descriptions show it through the new edges.unparseable fact. A test checks the constant against what expand returns for every edge.

  • A file path passed where a handle belongs (outline("src/x.py")) no longer gets the hint "Call resolve('py')". It now says the input is a file path and suggests resolve with that path, with forward slashes and a .pyi stub pointed at its .py source. A dotted handle keeps its usual hint. resolve given a .pyi path now points at the source too, instead of resolve('pyi') (#882).

  • The duplication review's docstrings say what it does. A function's copy of a method joins that class's family when the method also has a copy in another class. dismiss exits 1 after the scan when --family names no family, and exits 2 for bad arguments before it (#882).

  • resolve accepts a .pyi stub path. A stub beside its .py source resolves exactly as the source does, with the same handle and location; pkg/mod.pyi:3 and resolve_at on a stub already did. A bare mod.pyi is now read as a file path, like mod.py. A stub with no .py beside it stays unresolved, and its detail now says why instead of suggesting a .py path that doesn't exist (#885). Support for stub-only modules is #933.

  • find_flask_routes now reports routes declared with Flask 2.0's shortcut decorators: @app.get(...), .post, .put, .delete and .patch, on an app or a blueprint. Each is a route record whose methods is the one method the shortcut names. A file that used only the shortcuts used to return a confident [].

    • A shortcut counts only when its receiver is a Flask app or blueprint: a name the same file binds to Flask(...) or Blueprint(...), including an app factory's local app, or one imported from another module (from .blueprints import bp, an alias, a re-export through a package's __init__, or a module attribute such as blueprints.bp). An import is placed through pyeye's resolver, and the definition it lands on must itself be a Flask(...) or Blueprint(...) binding. So FastAPI's @router.get(...) and decorators such as @cache.get("k") are not reported, whether local or imported.
    • A receiver passed in as a function argument can't be placed, so its shortcuts aren't reported. (#905, #910)
  • A Pydantic model's fields now follow its own API, taken from the root it descends from: v1 rules for a pydantic.v1 model or an installed pydantic 1.x, v2 rules otherwise. Under v1, a public un-annotated attribute (x = 1) is a field, and its record has no type because it has no annotation. It isn't a field when its value is a lambda, a property/classmethod/staticmethod/PrivateAttr call, a class or a function. fields_own was a partial list for v1 models. fields (and the schema's fields, required and optional) is omitted when the rules can't be known.

  • A class whose base is subscripted, such as class IntBox(Box[int]) or class Ids(RootModel[list[int]]), is now found as that class's subclass, by the subclasses edge, trace and find_pydantic_models alike. The class graph used to drop every base that wasn't a plain name or attribute. A class named only inside a base's type arguments (Generic[Box[int]]) is still not a subclass of it.

  • The superclasses edge resolves a module-qualified subscripted base (typing.Generic[T]) to the class. It used to report the module (typing).

  • The superclasses edge and inspect's superclasses no longer report a function or variable as a class's base. A base that's a call (make_base(), BaseManager.from_queryset(QuerySet)), a conditional, or a name that resolves to something other than a class is listed in unresolved_superclasses with its source text. The edge used to report, for example, make_base itself, or django's BaseManager for Manager.

  • find_pydantic_models finds models built on pydantic.v1, the v1 API that pydantic 2 ships (from pydantic.v1 import BaseModel, BaseSettings, GenericModel), and v1's pydantic.generics.GenericModel. It returned none of them, which read as "no models".

  • A project under a directory named dev, etc, sys, proc or root, in any case, now works. Before, a path check refused any path containing one of those names anywhere, so a project under ~/dev or ~/Dev, /srv/etc/lib, or a project's own etc/ package was refused ("suspicious component"). The deny-list now judges only where a path leads: its patterns are anchored at the root (^/etc/, ^/private/etc/, ^/root/, ^/proc/, ^/sys/, ^/dev/) and matched ignoring case. Every route to those directories is still refused, including a .. climb, a relative path from project_path="/", a symlink, and /ETC on a case-insensitive volume (#939).

  • The Django plugin no longer switches on for any project with a manage.py: a Flask-Script project has one too. Detection now relies on Django being imported or required. Django's own generated manage.py imports Django, so real projects are still found. A requirements file or Pipfile now has to name django as a requirement; a mention such as django-environ or a comment no longer counts (#940).

  • find_django_views finds the views it used to miss:

    • class views with an attribute base such as generic.ListView, or an aliased import;
    • async def function views;
    • the modules of a views package;
    • files that import Django with import django… rather than from django.

    A class with two view bases is now one record, not two. A base counts only when the module imports it from Django (or from Django REST framework, #947), so a project class whose name merely contains View is no longer reported (#941).

  • find_django_views reports project classes that subclass a Django class view, at any depth and in any module, such as class Page(BaseListView) where BaseListView(ListView). It follows the same shared class graph as find_pydantic_models, so the first call on a project with class views builds that graph; a project without class views never does (#942).

  • find_flask_templates finds every Flask render_template call by the module's own imports: bare, aliased (render_template as rt), module-qualified (flask.render_template) and with the keyword template_name_or_list. It found only the bare positional form, so templates looked unrendered when they weren't. A call no longer counts unless the module imports render_template from Flask (the same rule as find_django_views, #941), so a local function that merely shares the name isn't Flask's. Each template file is listed once. Files under app/templates were listed twice.

  • find_flask_views finds MethodView subclasses by the module's Flask imports (an alias or views.MethodView too) and then through the class graph, so a subclass of a project view is found. A local class that merely shares the name no longer counts.

  • find_flask_config reports app.config and current_app.config reached through an attribute (self.app.config, flask.current_app.config), not only the bare names.

  • The Flask tools page says a route's path is its own, without a blueprint's url_prefix, and states where config files are looked for. The resolution page shows resolve_handle's analyzer parameter.

  • find_flask_routes lists a blueprint route with the empty rule "", which Flask serves at the blueprint's prefix itself. It was skipped as if it had no path.

  • configure_packages calls with save=false now accumulate for the session, as the docs say. Before, each call rebuilt the configuration from disk and kept only its own entries, so a second unsaved call silently dropped the first call's packages, from the analysis too. Unsaved entries last until the server restarts, or until a save=true call writes them to .pyeye.json with its own entries; a save=true call with no entries of its own now writes pending unsaved entries too (#953).

  • On Windows, configure_packages' packages and standalone_dirs reached the tool, the response and the saved .pyeye.json with native backslash separators. They now carry POSIX spellings, like every other path pyeye reports (#953).

  • The order of the import roots that pyeye gives Jedi (configured packages, then additional paths, then namespace repo roots) is now fixed. Before, it could change between runs, and with it which root won when two define the same module (#962).

  • find_cli_commands finds a command registered with a bare @app.cli.command (or @bp.cli.command), without parentheses, which it used to miss silently (#980).

  • The plugin docs now say exactly what each tool covers: when an error handler's error_code is null, which files find_django_models and find_django_templates read, and that TEMPLATES DIRS isn't. The troubleshooting guide's environment-variable examples now set the variables on the MCP client's server entry, as the guide itself says to, instead of with a shell export the server never sees.

  • Documentation fixes (#983):

    • The README's project-specific install now points .mcp.json's command at the project venv's Python. A bare python runs whichever Python is first on the client's PATH.
    • The README's configuration loading order includes this session's unsaved configure_packages(save=false) additions (applied last). It also says how auto-discovery treats a src/ layout and virtualenv site-packages, and when pyproject.toml build-backend detection runs.
    • PYEYE_ENABLE_PERFORMANCE_METRICS is described as registering both admin tools.
    • SECURITY.md lists a config file's packages entries among the path-checked inputs.
    • DOCUMENTATION.md no longer says every tool takes project_path.
    • docs/architecture/caching.md links the environment-variable reference.
  • The configure_packages reference now says that only plugin activation is limited to the startup project; the new paths take effect on any project you configure (#984).

  • The pydantic tools page says that a v1 model's nested class Config: is read, with an executed example (#984).

  • The namespace packages guide no longer says namespace code is searched by default: without scope_defaults, a plugin tool searches only the main project. It also says that imports under if TYPE_CHECKING: and in try/except shims are followed by the imports edge, while imports inside a function are not. An executed example shows the rule (#984).

  • pyeye now finds a project's own Python environment for any project layout, including src/, and reads its third-party packages from it, whichever way pyeye runs (the Claude Code plugin, uvx, uv tool or an install into the project). Before, a src/-layout project under an isolated install resolved none of its third-party packages. A project's imports could also resolve against pyeye's own dependencies, such as pydantic, even when the project didn't install them. pyeye's own packages are no longer visible to the analysed project. In a flat project the virtualenv is no longer treated as a configured package, so configure_packages no longer lists its site-packages, and plugin scans with scope="all" no longer walk it (#993).

  • pyeye uses the first of: the environment setting, a .venv, venv or env in the project (or, for a project that is itself a package, in its parent directory unless that directory is shared), and the activated VIRTUAL_ENV or CONDA_PREFIX (unless that is pyeye's own environment). A project's own venv wins over an activated one, because one pyeye server answers for many projects (#993).

  • The installation docs are rewritten around one place, the README's Installation section (#994):

    • Routes: the Claude Code plugin (with its /plugin marketplace add okeefeco/pyeye-mcp and /plugin install pyeye@pyeye-marketplace steps, and what it brings: the server, four skills and a dependency hook), claude mcp add … -- uvx pyeye-mcp, uvx pyeye-mcp for other MCP clients, uv tool install or pipx, and an install into the project's environment.
    • Warnings and links: it warns not to register pyeye both as the plugin and with claude mcp add, and links Claude Code's, uv's and the clients' own documentation instead of restating them.
    • DOCUMENTATION.md points to the README instead of its own install steps. Their Claude Code and Claude Desktop setup used uv --directory, which made pyeye analyse its own checkout instead of your project.
    • TROUBLESHOOTING and debugging-connection-drops: their claude mcp add examples use uvx pyeye-mcp (a bare python -m pyeye.mcp broke installs where that Python lacks pyeye), and the debugging page's Claude Desktop config no longer uses uv --directory, which made pyeye analyse its own checkout.
    • CONTRIBUTING shows how to run your checkout as the server alongside the plugin.

Security

  • Every caller-supplied path now goes through the input check in the form the tool finally uses: a relative path anchored on project_path, checked as spelled and with symlinks followed. Before, a relative path without .., resolve's file forms (f.py, f.py:42), a plugin scope="package:<path>", configure_packages' namespaces paths and standalone_dirs, and config-file namespace and standalone paths skipped the check. A refused tool argument is now an error, never a "not found". A refused config entry is skipped with a warning (#856) and listed in rejected_paths (#898).
  • A directory that pyeye scans (a plugin scope, or a configured package, namespace or standalone dir) may no longer be /, or any other ancestor of a restricted system directory. This includes the scan that project_path="/" implies, so scope main from / is refused with an error. project_path itself and single-file inputs are unchanged. Every directory walk also skips restricted directories it reaches through a symlink (#856).
  • Config entries (.pyeye.json packages, namespaces and standalone dirs) that resolve to a restricted path, or to an ancestor of one, are now skipped with a warning, and reported to the caller in rejected_paths (#898).
  • The path check now also refuses /boot, /run/secrets, /var/run/secrets and macOS root's home (/var/root). /run, /var, /var/run and /private/var are now refused as directories to scan.
  • It also refuses credential stores directly below any user home (/home/<user>, /Users/<user>, /root, and the server's own home): .ssh, .aws, .gnupg, .config/gcloud, .azure, .kube, .docker, .config/gh, .netrc, .pypirc, .pgpass, .git-credentials and .npmrc. Directory scans skip these stores, while scanning ~, /home or /Users still works. A project placed inside one of them is refused. A config entry that names one is skipped with a warning and listed in rejected_paths (#909).
  • A symlinked home (for example an NFS /home/u that points at /data/u) is protected under both names. Directory scans also skip a file or directory that is a symlink into a restricted location, such as a project file that points at ~/.netrc (#909).
  • A path that goes through a symlink and then .. is now checked where the operating system really puts it. With l_tmp -> /tmp, the path l_tmp/../etc is /etc on disk, because the operating system follows the symlink first; such a path is now refused. v2.1.0 accepted project_path="proj/l_tmp/../etc" (a file too), but used it collapsed to <project>/etc, so it never read /etc (#939).
  • pyeye's Jedi helper process now always runs the server's own Python interpreter. Before, when VIRTUAL_ENV or CONDA_PREFIX was set in the server's environment, Jedi started the interpreter of that environment instead. That could be the interpreter of a virtualenv shipped inside an analysed repository, if the server was started with it activated. The project's environment is now read from disk (its site-packages and the plain-path lines of its .pth files), and its interpreter is never run. A .pth line that would run code is skipped. Because the environment can come from the repository, pyeye also checks it, once symlinks are resolved:
    • An environment that is, is inside, or contains a restricted directory or a credential store (such as /etc or ~/.ssh) is skipped with a warning, whether it was configured, found in the project, or named by VIRTUAL_ENV or CONDA_PREFIX. So is each site-packages directory and .pth path it adds.
    • Reading .pth files is bounded in bytes and paths per file, and per environment in import roots and in paths looked up. A huge .pth set can't stall building the analyser.
    • For a project that is itself a package, its parent directory is searched for a venv only when that directory is neither group- nor world-writable (such as /tmp) nor owned by another user (#993).

What's Changed

  • docs(specs): design for documentation built on facts (#818) by @hangie in #822
  • docs(specs): honest-claims rule D12 for the docs design (#818) by @hangie in #832
  • docs(sphinx): retire the Sphinx tree and port the architecture pages to Markdown (#823) by @hangie in #833
  • feat(docs-facts): fact registry, doc registry and the marker-block binding (#824) by @hangie in #834
  • docs(specs): worker rulings C10 for the docs design (#818) by @hangie in #839
  • fix(docs-facts): container-aware public fence scanner; env name gaps (#828) by @hangie in #838
  • docs(specs): C11 corrections for the docs design (#818) by @hangie in #841
  • refactor(docs-facts): migrate the point checks onto the registry (#825) by @hangie in #837
  • feat(mcp): tool descriptions take their fact parts from the extractors (#827) by @hangie in #840
  • docs(specs): C12 ratchet shape and per-edge ceilings (#818) by @hangie in #848
  • docs(specs): C13 /docs-review rulings and the 827-2 note (#818) by @hangie in #849
  • feat(docs-facts): removed-name rule and the uncovered-fact ledger (#826) by @hangie in #846
  • docs(specs): C14 clarifications for /docs-review (#818) by @hangie in #850
  • fix(docs-facts): load-time facts read code only, so a wheel install starts (#851) by @hangie in #854
  • test(docs-facts): execute documented examples against a fixture project (#828) by @hangie in #845
  • feat(docs-review): /docs-review as an internal skill (#829) by @hangie in #855
  • feat(docs-facts): the honest-claims rule D12 (#844) by @hangie in #847
  • docs(specs): C15 prose must not state code facts (#818) by @hangie in #860
  • docs(specs): C16 dismissal lapse, examples and the published site (#818) by @hangie in #862
  • docs(security): describe pyeye's real subprocess, write and validation behaviour (#830) by @hangie in #859
  • fix(paths): relative caller paths resolve against project_path (#842, #843) by @hangie in #852
  • feat(docs): publish the Markdown docs to GitHub Pages with MkDocs (#861) by @hangie in #863
  • fix(mcp): each exposed edge states its own ceiling (#827) by @hangie in #865
  • feat(docs-review): code contradictions, subject-keyed dismissals and restated examples (#829) by @hangie in #864
  • docs(readme): bind README's code facts and drop its unbacked claims (#830) by @hangie in #866
  • docs(security): SECURITY.md's security model from the code's facts (#830) by @hangie in #867
  • docs(history): clear the honest-claims seeds on four history pages (#830) by @hangie in #869
  • docs(api,architecture): plugin and architecture pages from facts and executed examples (#830) by @hangie in #877
  • docs: fix CONTRIBUTING, DOCUMENTATION and the example configs (#830) by @hangie in #876
  • test(cache): the post-live and burst watcher tests are no longer xfail on macOS (#788) by @hangie in #878
  • feat(docs-review): finding identity, page hash and rule-abiding proposals (#829) by @hangie in #875
  • docs(guides): docs/, docs/testing and docs/development guides from facts (#830) by @hangie in #880
  • docs: correct the shipped skills and the MCP tool descriptions (#830) by @hangie in #881
  • docs(claude): correct Claude's instructions and internal skills (#830) by @hangie in #883
  • fix(resolver): relative re-exports collapse; packages under non-identifier dirs resolve (#857, #814) by @hangie in #871
  • fix(not-found): a file path gets a hint that resolves; duplication docstrings match behaviour (#882) by @hangie in #884
  • docs(specs): C17 rulings from the first /docs-review runs (#818) by @hangie in #887
  • docs(skills): bind the ceilings, bucket order and duplication flags; execute the envelope and resolve examples (#830) by @hangie in #886
  • feat(docs-review): page-level findings, literal anchors and code_bug routes (#829) by @hangie in #891
  • test(resolver): cover annotated-assignment shadowing and the _canonical_of fallback (#857) by @hangie in #890
  • feat(docs-facts): runnable examples on any prose page for humans (#828) by @hangie in #888
  • ci: 25-minute test job timeout; share the review tests' fact registry (#892) by @hangie in #895
  • docs(specs): C18 correction, scenario baselines as records (#818) by @hangie in #899
  • test(perf): cache benchmark runs without coverage; local bases sized for the allowed load (#835) by @hangie in #900
  • docs(claude): point 03 and 11 at their sources; widen 07's example rule (#830) by @hangie in #902
  • ci: Windows 3.11 test legs run without coverage (#892) by @hangie in #904
  • docs(scenarios): move the scenario baselines into dated records (#830) by @hangie in #903
  • fix(flask): async handlers, .Blueprint(...) and scoped config searches (#873) by @hangie in #907
  • fix(pydantic): read ConfigDict model_config and fill get_model_schema's computed_fields (#870) by @hangie in #908
  • docs(facts): repo and pyeye config as facts; pages link instead of restating (#830) by @hangie in #889
  • docs(mcp): state the unparseable_files edges once, from the registry (#874) by @hangie in #911
  • fix(flask): find_flask_routes reports the @app.get/.post/.put/.delete/.patch shortcuts (#905) by @hangie in #912
  • fix(ci): pip-audit retries only a network error to pypi.org, and stays fail-closed (#894) by @hangie in #897
  • fix(pydantic): omit a model_config that can't be fully read (#870) by @hangie in #916
  • fix(dogfooding): run the metrics script through uv run, never bare python (#879) by @hangie in #919
  • fix(validation): check every caller path in its final form (#856) by @hangie in #901
  • test(cache): hold the catch-up sweeps until the start-up test has written (#906) by @hangie in #923
  • fix(docs): bind or delete the last honest-claims seeds (#830) by @hangie in #924
  • fix(metrics): keep the unified metrics store bounded and whole (#914) by @hangie in #918
  • fix(flask): route shortcuts on an imported app or blueprint are found (#910) by @hangie in #920
  • fix(dogfooding): drop sync, which always recorded 0 MCP calls (#879) by @hangie in #926
  • chore(dogfooding): remove the dead in-process MCP metrics read (#915) by @hangie in #929
  • docs(readme): pin the CI badge to main pushes (#932) by @hangie in #934
  • fix(pydantic): fill trace_model_inheritance's mro and fields_inherited from resolved bases (#870) by @hangie in #927
  • fix(edges): a subscripted base names its class; a non-class base is unresolved (#921, #922) by @hangie in #930
  • test(perf): memoise the import-graph oracle's per-file work (#893) by @hangie in #938
  • fix(resolve): a .pyi stub path resolves through its .py source (#885) by @hangie in #937
  • fix(config): namespace globs expand to sorted matches through the package helper (#872) by @hangie in #936
  • fix(django): detect Django by imports and requirements, not manage.py (#940) by @hangie in #944
  • fix(pydantic): find pydantic.v1 models and follow each model's own field rules (#913, #935) by @hangie in #945
  • fix(django): find_django_views finds views by the module's Django imports (#941) by @hangie in #946
  • refactor(metrics): the server stops writing unified metrics; its surfaces become deprecated stubs (#943) by @hangie in #948
  • fix(flask): find every render_template call and MethodView subclass; config access through attributes (#951) by @hangie in #955
  • fix(django): find_django_views follows project subclasses of class views (#942) by @hangie in #954
  • fix(validation): judge only where a path leads; the deny-list is anchored and ignores case (#939) by @hangie in #949
  • fix(metrics): emit valid Prometheus text format (#402) by @hangie in #959
  • feat(validation): refuse boot and secrets dirs, and credential stores below every user home (#909) by @hangie in #956
  • docs(github): add issue forms for bugs, features, docs and questions (#70) by @hangie in #960
  • test(performance): remove unused PERFORMANCE_BASELINES and its checker (#868) by @hangie in #961
  • fix(analyzer): every configured package is on Jedi's sys_path, in one fixed root order (#858, #962) by @hangie in #966
  • test(pre-commit): guard that hooks run under any available Python 3 (#256) by @hangie in #967
  • fix(dogfooding): the monitoring hooks count the plugin's tool names too (#965) by @hangie in #968
  • feat(flask): served urls for routes and url_prefixes for blueprints, composed as Flask does (#952) by @hangie in #957
  • fix(dogfooding): the grep wrappers run the real command and count code searches (#969) by @hangie in #973
  • feat(django): find_django_views reports Django REST framework views (#947) by @hangie in #958
  • fix(dogfooding): count the Grep tool in mcp-report; correct the hooks README (#970) by @hangie in #974
  • perf(resolver): memoise the imports edge's external re-resolutions (#925) by @hangie in #931
  • fix(pydantic): trace_model_inheritance's description states #913's omission rule (#972) by @hangie in #975
  • feat(scope): disclose rejected config entries in an always-present rejected_paths (#898) by @hangie in #928
  • feat(metrics): split artifact-cache evictions into cap pressure and staleness (#401) by @hangie in #963
  • feat(metrics): report typeref degraded-path counts in get_performance_metrics (#331) by @hangie in #964
  • test(invariants): pin the stub-only round-trip gap in the #614 sweep (#933) by @hangie in #979
  • fix(config): unsaved configure_packages calls accumulate in a session overlay (#953) by @hangie in #976
  • feat(pydantic): disclose unplaced classes in find_pydantic_models' envelope (#921) by @hangie in #950
  • docs(changelog): clean up the v2.2.0 release-note fragments (#978) by @hangie in #985
  • docs: pre-release fixes for the README, SECURITY, DOCUMENTATION and caching pages (#983) by @hangie in #986
  • docs: configure_packages errors and scope, pydantic v1 fields and Config, namespace defaults and guarded imports (#984) by @hangie in #989
  • fix(flask): find_cli_commands reads a bare @app.cli.command; plugin docs say what's covered (#980) by @hangie in #987
  • fix(dogfooding): setup_mcp_monitoring.sh merges pyeye's hooks instead of wiping the user's (#981) by @hangie in #988
  • docs(changelog): final v2.2.0 fragment cleanup for the docs-fix PRs (#978) by @hangie in #990
  • docs(changelog): fix v2.2.0 entries superseded within the release (#978) by @hangie in #991
  • docs: one installation guide with a recommended route per audience (#994) by @hangie in #995
  • docs(contributing): run the checkout with the plugin's own command (#994) by @hangie in #996
  • docs(changelog): #994 supersedes #830-6's DOCUMENTATION.md install entry (#978) by @hangie in #997
  • fix(analyzer): find the project's environment by convention and read it statically (#993) by @hangie in #998
  • docs(environment): align the #993 notes and README on environment lookup (#993) by @hangie in #1000
  • chore(release): v2.2.0 by @hangie in #1002

Full Changelog: v2.1.0...v2.2.0