Probe the data planes zot can reach
zotStatus.RdReports, one row per plane, whether the installed package, the API
credentials, the Web API, the local database and the semantic sidecar are
available from this process, with the observation behind each verdict.
The API probe is one limit = 1 read of the personal library; the local
probe opens the database read-only and counts its items; the semantic probe
checks the interpreter and index paths without launching Python.
Usage
zotStatus(
config = NULL,
path = file.path(Sys.getenv("HOME"), "Zotero", "zotero.sqlite"),
pythonPath = file.path(Sys.getenv("HOME"), ".local", "share", "uv", "tools",
"zotero-mcp-server", "bin", "python3"),
dbPath = file.path(Sys.getenv("HOME"), ".config", "zotero-mcp", "chroma_db")
)Arguments
- config
A
zotConfig()object, orNULLto read the credentials from the environment.- path
Local database file, as in
zotLocalQuery().- pythonPath, dbPath
Semantic sidecar paths, as in
ztSemantic().
Details
The credentials row never contains a credential: when a variable is
missing, detail names it and the file where it is defined, as
zotConfig() does. The local and semantic planes are advisory; the Web API
is the plane that writes are verified against.
Examples
Performer <- function(config, method, path, query, body, version) {
list(status = 200L, headers = list(`last-modified-version` = "9"),
body = list())
}
Config <- structure(
list(userID = "42", key = "example", apiBase = "https://example.invalid",
performer = Performer),
class = "zotConfig"
)
zotStatus(Config, path = tempfile(), pythonPath = tempfile(),
dbPath = tempfile())
#> plane available
#> <char> <lgcl>
#> 1: package TRUE
#> 2: credentials TRUE
#> 3: api TRUE
#> 4: local FALSE
#> 5: semantic FALSE
#> detail
#> <char>
#> 1: zot 0.3.0 at /tmp/RtmpqvZvoR/temp_libpath3fb9605d30b6/zot
#> 2: configuration supplied
#> 3: HTTP 200; library version 9
#> 4: local database not found: /tmp/RtmpqvZvoR/file3fb97f0c2ae8
#> 5: missing python: /tmp/RtmpqvZvoR/file3fb9cbe1951; missing chroma: /tmp/RtmpqvZvoR/file3fb95b613ed7