~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Preventive hardening: the _generate_report_path helper (which has no production caller; saved reports are named by research ID) now appends a random segment, so the same query in the same second can no longer yield identical filenames in the install-wide reports directory. Two new pre-commit syntax checks, which fence accidental and idiomatic code; deliberate evasion by a contributor is out of scope and left to code review: check-per-user-isolation is a fast smoke check that constructions of user-data services/sessions (NoteService, LibraryService, DownloadService, get_user_db_session, the three library deletion services, NoteAIService and FollowUpResearchService) under web/routers/, research_library/ and web/services/ pass a username explicitly, as a username-named positional argument or a *username* keyword, with any such keyword bound to a literal such as None flagged (where that username comes from is enforced for router call sites by the cross-user isolation census tests), and check-reports-dir-not-served flags, under web/, any FileResponse, StaticFiles or StreamingResponse reference or star import outside a per-file allowlist (all of web/fastapi_app.py, web/dependencies/threadpool.py and web/static_files.py), any call to LDR's streaming-response wrapper whose body is not a direct call to an undecorated function defined in the same module (not inside a class) that itself yields, where a non-generator or decorated definition, any other binding, of that name anywhere in the module, or a from x import * anywhere in the module (which can rebind any name without the scanner being able to tell which) disqualifies it (so open(path), a helper returning open(path), iter(...), a decorated generator or a path is flagged; the arguments of the generator call are not inspected, so W(passthru(open(path))) is accepted), and any serving call, including a call to the static_file_response helper, that references the outputs directory inline (also under an import alias), allowlisted files included. Within its scanned tree, neither check lets a fenced callable leave a module under a name it does not recognise: an import alias that drops the role (WorkerCleanupStreamingResponse as CleanupStream, static_file_response as serve, get_user_db_session as open_session; a leading underscore is fine) and any non-call reference (Download = WorkerCleanupStreamingResponse, also in an allowlisted file, where only type-only annotations and subclasses named ...StreamingResponse/...FileResponse are exempt) are flagged, so a re-export cannot be imported and called unchecked elsewhere; an attribute read off a fenced callable (NoteService.__call__, get_user_db_session.__wrapped__, WorkerCleanupStreamingResponse.__call__) is such a non-call reference, whether bound or called, and the isolation check exempts only type-only annotations, ALL_CAPS constant reads (NoteAIService.MAX_CLAIMS_PER_NOTE) and one pinned staticmethod read (NoteService._rollback_quietly); an annotation is not type-only, so a fenced name in it (or quoted in a string in it) is flagged, when it is evaluated into more than a type: a parameter or class-field annotation with a non-constant default (svc: NoteService = Depends(), where FastAPI itself constructs the class with username taken from the request; a class field counts wherever it sits in the class body, including under if/try, and takes as its default any binding of its name there, such as svc: NoteService followed by svc = Depends()), an Annotated[...] with non-constant metadata (Annotated[T, Depends(get_user_db_session)]), a starred element (Annotated[*(NoteService, dep)]) or a non-tuple slice, a call, walrus or lambda inside it, a class field with no binding in its own class body on a class with a base other than object/Generic/Protocol (it may inherit a Depends() default), or a string, other than an exempt one (below), that does not parse; every string in such an annotation is parsed and checked like unquoted code, recursively, because FastAPI evaluates it, so a wholly quoted "Annotated[NoteService, Depends()]" is caught too, except exempt strings, which are an allowlist of shapes, so anything it does not name fails closed: a string is exempt only if its whole path from the annotation's root runs through subscripts of a proven generic head (such as Optional, Union or list) and the first element of a proven Annotated whose metadata elements are each a constant, a call of a proven listed callee or a dict display (pydantic hands that first element to any other metadata object's __get_pydantic_core_schema__, so Annotated[Literal["NoteService"], G] is checked), and ends as a string member of a proven Literal, as metadata of such an Annotated (an element after the first, none of them starred), as a string passed directly to an argument listed for a proven callee from FastAPI, pydantic or typing (such as Query(description=...), NewType("Name", ...) and ForwardRef(..., module=...)), or as a string key or value of a dict without ** unpacking in that metadata; any other node on the path, such as an attribute read, a subscript of another head, an operator or comparison, an unlisted call, a conditional, a lambda, a walrus, unpacking or an f-string, ends it, so a string that such an expression could read back out into a type position (Literal["NoteService"].__args__[0], G | Literal["NoteService"], G[Literal["NoteService"]], Query(description="NoteService").description, Annotated[*(), "NoteService", Depends()]) is checked; Literal and Annotated are proven only when imported from typing or typing_extensions, a listed callee only when imported from its own module, and a generic head only from typing, typing_extensions or collections.abc or as an unbound builtin, each under a name nothing else in the file binds (so after from typing import Annotated as Literal, Literal["NoteService", Depends()] is checked as the Annotated it is), and nothing in a file is proven if the file could change what a proven name denotes: a star import, a reference to a name that can look up or rewrite a namespace dynamically (such as setattr, vars, globals, locals, __dict__, sys.modules, importlib, exec or eval), an attribute or item store or delete rooted in an imported name (typing.Literal = typing.Annotated), in an unbound name or in an expression, a store or delete on any object whose target attribute is named like something a proof rests on (mod.Literal = ...) or whose target goes through a dunder or a private attribute of anything but self or cls, a proven module, or one a proof rests on reached as an attribute, used other than to read an attribute off it (mod = typing, mod = typing_extensions.typing), a private name of one (typing._GenericAlias), or a proven form, listed callee or subscripted generic head used outside a type position (L = Literal, type(typing.List)); the arguments of any other call are checked as well, so an unknown call that can hand a string on to a type position (typing.cast(object, "NoteService")) is caught; a string is parsed both as written, as ForwardRef compiles it (so one ending in a line continuation is checked), and stripped of surrounding whitespace; a string in a type position that parses neither way (such as "*[NoteService]", a valid forward reference but not an expression), or any checked string nested too deep, is itself reported as an annotation string that cannot be checked, while a string elsewhere is also read the way ForwardRef reads a starred string; a symlink inside a scanned directory is scanned even if its target lies elsewhere. The cross-user isolation census additionally flags any router Depends(...)/Security(...) target (for a bare Depends(), the annotated class; qualified fastapi.Depends, dependency=, __wrapped__-style reads, wholly quoted annotations and starred Annotated elements included) that takes a username/user_id/owner and is not itself an auth dependency. Both checks report a file they cannot read or parse (including nesting too deep for the parser) instead of skipping it or crashing. It does not cover responses built from file content already read into memory (Response(content=path.read_bytes()), PlainTextResponse(path.read_text())), a same-module generator that itself reads a file or is handed an open file as an argument, serving helpers defined outside web/, renames, re-exports, wrappers or dependency factories in modules outside the scanned directories, Annotated reached through an assignment alias (A = Annotated) with non-call metadata, constant-valued non-literal username= expressions such as username=str(None), dynamic lookups (getattr, importlib, __import__, module.__dict__[...], eval), or deliberate evasion such as a default set after the class body or signature (Cls.attr = Depends(), f.__defaults__ = ...) or by a metaclass, decorator or __init_subclass__, walrus bindings in subscript targets or in other annotations, module-level string or type aliases of a fenced name (Svc = "NoteService"), a fenced name assembled from pieces in an annotation ("Note" + "Service", an f-string), a listed callee, Literal, Annotated or generic subscript head changed from another module, through a dynamic lookup that uses none of the names above (getattr(m, "Lit" + "eral")), through a name used only inside a quoted annotation, or through an object derived from it at runtime (type(Literal["x"])), and code that rewrites __annotations__ after the fact, such as a decorator; these examples are not exhaustive.