Repository navigation
Added
get_performance_metricsreports which annotation shapesinspectdegrades to a raw type string (Callable,Literal,Annotatedand so on), counted by shape: atyperef_degradedsection in its report, and apyeye_typeref_degraded_totalcounter, labelled bykind, 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 underPYEYE_ARTIFACT_CACHE_MAX_ENTRIESorPYEYE_SCRIPT_CACHE_MAX_ENTRIES, the sign that the caps are too small) andstale_evictions(entries dropped because their file changed or was invalidated).get_performance_metricsreports both, in its report'sartifact_cachesection and as the Prometheus counterspyeye_artifact_cache_cap_evictionsandpyeye_artifact_cache_stale_evictions.evictionsandpyeye_artifact_cache_evictionskeep their meaning, the total of the two (#401). - Config entries the path check refuses (a
.pyeye.jsonpackage, namespace or standalone directory that resolves to a restricted location) are now reported to the caller.rejected_pathslists each one as{scope, path, reason: "rejected_path", detail}. It appears in the plugin tools'envelope(betweenunsearched_scopesandresults) and inconfigure_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 inunsearched_scopes, so a result can no longer silently leave out a package you configured (#898). find_pydantic_models' envelope (envelope=true) gainsunplaced_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 newmax_unplacedparameter (default 50,Nonefor all). When the cap cuts, the envelope carriestruncated,truncation_reasons: ["max_unplaced"]andtotal, which refer tounplaced_classesonly.resultsis never capped. The bare-list form is unchanged.PYEYE_RESOLVE_CACHE_MAX_ENTRIEScaps a new per-project cache of theimportsedge's resolutions of targets outside the project.traceoverimportsinto 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_viewsreports Django REST framework views, and every record has a newframeworkkey,"django"or"rest_framework". A DRF class view has a base imported fromrest_framework, such asAPIView, a generic view or aViewSetclass; a DRF function view is decorated withrest_framework.decorators.api_view. A subclass of a DRF view isrest_framework. The tool now also readsviewsets.pyandapi.pyand the modules ofviewsetsandapipackages, and a views file that imports onlyrest_framework(#947).find_flask_routesrecords gainurls, the URLs each route is served at.find_flask_blueprintsrecords gainurl_prefixes, each blueprint's served prefixes. Both are composed as Flask does: aregister_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.pathandurl_prefixare unchanged.configure_packages' result has a newunsavedkey,{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 ownpackages,namespacesandstandalone. It is always present, and empty when everything is saved (#953).- A new config key,
environment: the path to the project's virtualenv, orfalsefor none. It overrides discovery (#993). configure_packages' result has a new, always-presentenvironmentkey,{path, source}. It says where third-party packages are read from, andsourceisconfig,project,VIRTUAL_ENV,CONDA_PREFIXornone. When no environment is found, pyeye logs a warning once per project, andresolveandinspectadd 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'smrois 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, usetrace(follow=["superclasses"]).pyeye.unified_metrics.get_unified_collector()is deprecated: it emits aDeprecationWarningand returns a collector that accepts the old calls and records nothing.scripts/unified_metrics.pyprints a deprecation notice and exits. The environment variablesPYEYE_ISSUEandPYEYE_PARENT_SESSIONare 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 underdocs/(see Changed). The architecture pages that were still correct moved todocs/architecture/(resolution.md,plugin-system.md,caching.md), checked against the code, and thepython-exploreskill 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.jsonand their.lockfiles) 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 byprometheus_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 thepyeye_operation_duration_ms_sumand_countseries a summary requires. They were declared ahistogram. pyeye_operation_countis its owncounterfamily. It was interleaved with the durations, with noHELPorTYPE.- the memory gauge has no space before its labels.
- label values are escaped.
- the output ends with a newline.
- operation durations are declared as a
-
A package added with
configure_packagesunder a directory whose name isn't a Python identifier (.hidden/,my-dir/) now resolves: its classes, functions, methods and attributes are found byresolve,inspect,outlineandexpand. 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:
tracenow listssubmodulesandre_exportsas edges it follows, and each edge's ceiling.expandnow documents itssubmodulesedge, lists every deferred reference edge, and states which kinds every edge applies to. Each edge entry states its own ceiling.outlinegives the meaning of its two ceilings.- The plugin tools document every scope form (
packages,standaloneandpackage:<path>were missing) and theirenvelopeparameter. resolvedocumentsmax_candidatesin its Args.
-
SECURITY.mdnow 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_packageswrites.pyeye.jsonin itsproject_path, withsavedefaulting 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'sload_unsafe_extensionssetting (#830). -
Four history pages no longer state figures nothing backs, and now publish on the docs site (#830):
docs/migration-guide.mdsays it covers 0.1.x to 0.2.0. It drops its unsourced benchmark and memory figures, the removedinvalidate_scopeand 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 invalidpip installcommand.docs/api-redesign.mdnotes that it records the redesign's design, with current shapes indocs/reference/and thepython-exploreskill. Its examples no longer use the deletedGranularCacheor relative paths.docs/METRICS_BASELINE.mdandbenchmarks/BASELINE_RESULTS.mdkeep 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.mddrops claims nothing backs:- the "performance baselines" table, for operations (
symbol_search,goto_definition) that no longer exist; - the stale architecture tree;
- the
find_patternsplugin example (plugins are built in); - the unrecorded cache-sizing measurements;
- the claim that
.pyeye.override.jsonis git-ignored automatically (add it to your.gitignore).
- the "performance baselines" table, for operations (
-
README.md's GitHub Copilot setup, which used asettings.jsonkey, an@mcp listcommand 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 theenvelopewrapper are documented once, indocs/api/README.md. -
docs/api/README.mdno longer says a framework in a newly added package needs a server restart:configure_packagesactivates it and names it inactivated_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 reportunparseable_files(#830). -
examples/configurations/enterprise.jsonandmonorepo.jsonno longer use scopes that search nothing:namespace:companyandnamespace:company.sdkmatched no configured namespace, and./packages/app-*/./tools/*aren't scope forms. Their default, aliases andpackagesnow resolve, the ignoredperformanceblock is gone, and a test checks every example's scopes. -
DOCUMENTATION.mdno longer describes behaviour pyeye doesn't have: a../path rejection, input sanitisation, a file-size limit, an on-disk.pyeye_cache, a--debugflag, environment variables as a package-config source, user-loaded plugins, and unbacked memory figures. Its security section linksSECURITY.md. Its tool lists and the required Python version come from the code, and the rest links the generated reference. -
CONTRIBUTING.mdsays to install pre-commit beforepre-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/anddocs/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.mddescribes the suite that exists, not an invented one.docs/testing/FIXTURES.mdpoints at the real fixtures instead of fixtures that don't exist.- The log samples in
docs/debugging-connection-drops.mdand the advice indocs/TROUBLESHOOTING.mdmatch current behaviour. - The migration guide's rollback step works.
- Unbacked numbers, targets and projections are removed.
-
docs/architecture/caching.mdno longer says the scoped cache holds lookup results; it holds each scope's file list. -
The
inspecttool description no longer says edge counts "come in later phases" or showsedge_counts={}. It says which edges are counted and that an unmeasured one is absent, never0. It also documents the deprecated re-export list and whensuperclassesis omitted. -
The
resolvedescription's success shape includeslocation. Theexpandshape addstransitive_hint, themax_stubstruncation fields andbindingson re-export stubs. -
The
get_connection_diagnosticsdescription lists the fields the tool actually returns. -
The plugin tool descriptions say each record carries
scope,location, andhandleorunresolved.get_model_schemaandtrace_model_inheritancesaymodel_nametakes a class name or a handle, and describe the not-found and ambiguous answers. -
The
outlinedescription and thepython-exploreskill name theunparseabletruncation reason. -
The
architecture-reviewskill describes the decision-log flow as writing a file, and points auditors atunresolved_importsrather than warning thatimportssilently drops imports. It no longer says a file-path handle "returns junk": it getsfound: false. -
python-exploreno longer says conditional imports are invisible toimports(guarded imports are listed). It binds the deferred edges and theimportsceiling 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-reviewbinds its seed-axis table to the axes fact, defers todecision-logfor that skill's rules instead of copying them, and tells the auditor to emit oneno_signalfinding per axis when it finds nothing, instead of[], which contradicted the rule before it. -
duplication-reviewsays 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-exploreskill's ceiling definitions are the generated ceilings table, not a hand copy. Its plugin-envelope shape and itsresolveexamples are executed and checked against a fixture project, and its plugin tool list links the tool reference. -
The
architecture-reviewskill shows the ranker's default bucket order from a newreview.bucketsfact, rather than a hard-coded order, and says to show the re-tiered map when a project changed it. -
The
duplication-reviewskill 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
uvflags CI and the hooks use, inCONTRIBUTING.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.
- the pre-commit hooks named in
-
Pages that repeated another page's explanation now link to it (#830):
CONTRIBUTING.md's changelog-fragment and decision steps link tochanges/README.mdand 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.mdno 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-emptysynccommand and in-process metrics read are removed. - The
grep/rgwrappers thatscripts/setup_dogfooding.shinstalls 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.shmerges pyeye's hooks into~/.claude/settings.jsoninstead 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-auditpre-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.shandbash scripts/claude_hooks/setup_mcp_monitoring.sh. - The dogfooding scripts and aliases run through
-
A relative path passed to a tool now resolves against
project_path, not the server's working directory (#842, #843). This coversresolve_at'sfile,resolve'spath/to/file.py:42andpath/to/file.pyforms, and a plugin tool'spackage:<path>scope. Before, a multi-project server looked in the wrong place, andresolve_atcontradicted 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 asC:fooon a drive other than the project's is now rejected with a clear error. Absolute paths are unchanged. -
A plugin tool's
envelopenow lists apackage:<path>scope whose directory doesn't exist inunsearched_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.serverraisedFileNotFoundErrorfortests/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")answeredpkg.Xat the import line, thoughinspect("pkg.thing.X")listedpkg.Xamong itsre_exports(#857). A name that the package also defines locally (from .src import Aand thenclass A) still resolves to the local definition, as at runtime, and anif/elsere-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.jsonreached it, so for a session-only package: imports of it were unresolved,resolve_atfound 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_configwritten asConfigDict(...)orSettingsConfigDict(...), bare or module-qualified, and with a type annotation (model_config: ConfigDict = ...), not only as a dict literal.find_model_config'ssettingsand the models'configwere empty for these forms. -
get_model_schema'scomputed_fieldslists the model's own@computed_fieldmembers (name, line and return type). It was always empty. A plain@propertyisn'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) andfind_model_config'ssettingswhen itsmodel_configcan'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_inheritancefillsmro(the static C3 order) andfields_inherited, which were always empty. Each inherited field carriesdefined_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 ownBaseModelandRootModel. 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 (forfields_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 includemodel_config,ClassVarattributes or private_xnames, which pydantic doesn't treat as fields. -
A glob in a
namespacesconfig entry (e.g."company": ["~/repos/company-*"]) now expands to its matching directories. Before, the namespace mapped to the literal pattern, sonamespace:companysearched 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 inunsearched_scopesrather 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_handlersandfind_cli_commandsnow reportasync defhandlers.find_flask_blueprintsnow findsflask.Blueprint(...)(or any<module>.Blueprint(...)), and annotated assignments such asbp: Blueprint = Blueprint(...).find_flask_confignow looks forconfig.pyandsettings.pyin the scope you ask for, instead of always the main project: at each scope root or one directory below it. Results undermainare unchanged. (#873)
-
The
expandandtracedescriptions, the operation docstrings, thepython-exploreskill and the resolution architecture page now agree on which edges reportunparseable_files. Several said onlysubclassesandimported_by, butre_exportsreports it too. The set is stated once, asUNPARSEABLE_FILE_EDGESin the edge registry, and the docs and descriptions show it through the newedges.unparseablefact. A test checks the constant against whatexpandreturns 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 suggestsresolvewith that path, with forward slashes and a.pyistub pointed at its.pysource. A dotted handle keeps its usual hint.resolvegiven a.pyipath now points at the source too, instead ofresolve('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.
dismissexits 1 after the scan when--familynames no family, and exits 2 for bad arguments before it (#882). -
resolveaccepts a.pyistub path. A stub beside its.pysource resolves exactly as the source does, with the same handle and location;pkg/mod.pyi:3andresolve_aton a stub already did. A baremod.pyiis now read as a file path, likemod.py. A stub with no.pybeside it staysunresolved, and its detail now says why instead of suggesting a.pypath that doesn't exist (#885). Support for stub-only modules is #933. -
find_flask_routesnow reports routes declared with Flask 2.0's shortcut decorators:@app.get(...),.post,.put,.deleteand.patch, on an app or a blueprint. Each is arouterecord whosemethodsis 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(...)orBlueprint(...), including an app factory's localapp, 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 asblueprints.bp). An import is placed through pyeye's resolver, and the definition it lands on must itself be aFlask(...)orBlueprint(...)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 shortcut counts only when its receiver is a Flask app or blueprint: a name the same file binds to
-
A Pydantic model's fields now follow its own API, taken from the root it descends from: v1 rules for a
pydantic.v1model 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 notypebecause it has no annotation. It isn't a field when its value is a lambda, aproperty/classmethod/staticmethod/PrivateAttrcall, a class or a function.fields_ownwas a partial list for v1 models.fields(and the schema'sfields,requiredandoptional) is omitted when the rules can't be known. -
A class whose base is subscripted, such as
class IntBox(Box[int])orclass Ids(RootModel[list[int]]), is now found as that class's subclass, by thesubclassesedge,traceandfind_pydantic_modelsalike. 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
superclassesedge resolves a module-qualified subscripted base (typing.Generic[T]) to the class. It used to report the module (typing). -
The
superclassesedge andinspect'ssuperclassesno 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 inunresolved_superclasseswith its source text. The edge used to report, for example,make_baseitself, or django'sBaseManagerforManager. -
find_pydantic_modelsfinds models built onpydantic.v1, the v1 API that pydantic 2 ships (from pydantic.v1 import BaseModel,BaseSettings,GenericModel), and v1'spydantic.generics.GenericModel. It returned none of them, which read as "no models". -
A project under a directory named
dev,etc,sys,procorroot, in any case, now works. Before, a path check refused any path containing one of those names anywhere, so a project under~/devor~/Dev,/srv/etc/lib, or a project's ownetc/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 fromproject_path="/", a symlink, and/ETCon 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 generatedmanage.pyimports Django, so real projects are still found. A requirements file or Pipfile now has to namedjangoas a requirement; a mention such asdjango-environor a comment no longer counts (#940). -
find_django_viewsfinds the views it used to miss:- class views with an attribute base such as
generic.ListView, or an aliased import; async deffunction views;- the modules of a
viewspackage; - files that import Django with
import django…rather thanfrom 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
Viewis no longer reported (#941). - class views with an attribute base such as
-
find_django_viewsreports project classes that subclass a Django class view, at any depth and in any module, such asclass Page(BaseListView)whereBaseListView(ListView). It follows the same shared class graph asfind_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_templatesfinds every Flaskrender_templatecall by the module's own imports: bare, aliased (render_template as rt), module-qualified (flask.render_template) and with the keywordtemplate_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 importsrender_templatefrom Flask (the same rule asfind_django_views, #941), so a local function that merely shares the name isn't Flask's. Each template file is listed once. Files underapp/templateswere listed twice. -
find_flask_viewsfinds MethodView subclasses by the module's Flask imports (an alias orviews.MethodViewtoo) 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_configreportsapp.configandcurrent_app.configreached through an attribute (self.app.config,flask.current_app.config), not only the bare names. -
The Flask tools page says a route's
pathis its own, without a blueprint'surl_prefix, and states where config files are looked for. The resolution page showsresolve_handle'sanalyzerparameter. -
find_flask_routeslists 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_packagescalls withsave=falsenow 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 asave=truecall writes them to.pyeye.jsonwith its own entries; asave=truecall with no entries of its own now writes pending unsaved entries too (#953). -
On Windows,
configure_packages'packagesandstandalone_dirsreached the tool, the response and the saved.pyeye.jsonwith 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_commandsfinds 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_codeisnull, which filesfind_django_modelsandfind_django_templatesread, and thatTEMPLATESDIRSisn'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 shellexportthe server never sees. -
Documentation fixes (#983):
- The README's project-specific install now points
.mcp.json'scommandat the project venv's Python. A barepythonruns whichever Python is first on the client'sPATH. - 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 asrc/layout and virtualenv site-packages, and whenpyproject.tomlbuild-backend detection runs. PYEYE_ENABLE_PERFORMANCE_METRICSis described as registering both admin tools.SECURITY.mdlists a config file'spackagesentries among the path-checked inputs.DOCUMENTATION.mdno longer says every tool takesproject_path.docs/architecture/caching.mdlinks the environment-variable reference.
- The README's project-specific install now points
-
The
configure_packagesreference 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 underif TYPE_CHECKING:and intry/exceptshims are followed by theimportsedge, 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 toolor an install into the project). Before, asrc/-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, soconfigure_packagesno longer lists its site-packages, and plugin scans withscope="all"no longer walk it (#993). -
pyeye uses the first of: the
environmentsetting, a.venv,venvorenvin the project (or, for a project that is itself a package, in its parent directory unless that directory is shared), and the activatedVIRTUAL_ENVorCONDA_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-mcpand/plugin install pyeye@pyeye-marketplacesteps, and what it brings: the server, four skills and a dependency hook),claude mcp add … -- uvx pyeye-mcp,uvx pyeye-mcpfor other MCP clients,uv tool installor 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 addexamples useuvx pyeye-mcp(a barepython -m pyeye.mcpbroke installs where that Python lacks pyeye), and the debugging page's Claude Desktop config no longer usesuv --directory, which made pyeye analyse its own checkout. - CONTRIBUTING shows how to run your checkout as the server alongside the plugin.
- Routes: the Claude Code plugin (with its
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 pluginscope="package:<path>",configure_packages'namespacespaths andstandalone_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 inrejected_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 thatproject_path="/"implies, so scopemainfrom/is refused with an error.project_pathitself and single-file inputs are unchanged. Every directory walk also skips restricted directories it reaches through a symlink (#856). - Config entries (
.pyeye.jsonpackages, 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 inrejected_paths(#898). - The path check now also refuses
/boot,/run/secrets,/var/run/secretsand macOS root's home (/var/root)./run,/var,/var/runand/private/varare 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-credentialsand.npmrc. Directory scans skip these stores, while scanning~,/homeor/Usersstill works. A project placed inside one of them is refused. A config entry that names one is skipped with a warning and listed inrejected_paths(#909). - A symlinked home (for example an NFS
/home/uthat 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. Withl_tmp->/tmp, the pathl_tmp/../etcis/etcon disk, because the operating system follows the symlink first; such a path is now refused. v2.1.0 acceptedproject_path="proj/l_tmp/../etc"(afiletoo), 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_ENVorCONDA_PREFIXwas 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 (itssite-packagesand the plain-path lines of its.pthfiles), and its interpreter is never run. A.pthline 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
/etcor~/.ssh) is skipped with a warning, whether it was configured, found in the project, or named byVIRTUAL_ENVorCONDA_PREFIX. So is eachsite-packagesdirectory and.pthpath it adds. - Reading
.pthfiles is bounded in bytes and paths per file, and per environment in import roots and in paths looked up. A huge.pthset 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).
- An environment that is, is inside, or contains a restricted directory or a credential store (such as
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