Log inGet started
What it does

doc_discovery

The user-scope driver for semantic content discovery. Forwards a free-text query to the trusted discovery.start / discovery.poll async job (the authenticated GET to ZeroMind /v1/discover lives in the trusted VM) and returns the raw ranked hit list. Merging with the engine's local lexical results happens Rust-side, behind the guides and search_tools MCP tools — this module only drives the async fetch across frames.

local discovery = require("@builtin::modules.doc_discovery")
local res = discovery.fetch("render an outline", {}, "guide", 10)
-- res = { ok = true, hits = { … }, elapsedMs = 8944 }
--      | { ok = false, reason = "unavailable" | "timeout" | "invalid", error = "…" }

fetch(query, worlds, kind, limit, budgetMs) — worlds is the optional scope set (world guids), kind filters by asset kind, limit caps results, and budgetMs is the wall clock to wait for the answer, defaulting to DEFAULT_BUDGET_MS. It returns ok = false (never throws), with reason saying which class of failure it was:

reasonWhat happened
invalidThe call itself was wrong — an empty query. Nothing was sent.
unavailableThe query did not reach ZeroMind, or ZeroMind answered with an error. error names the cause.
timeoutZeroMind was still working when budgetMs ran out. budgetMs says how long that was.

A caller reading zero hits needs reason to know what to do next: a timeout means the ranking exists and was not waited for, while unavailable means there is nothing to wait for. guides and search_tools carry it into their responses as semantic_status.

awaitJob(poll, budgetMs) is the wait itself, exposed so the budget can be tested without a backend: it polls until a terminal status lands or budgetMs of wall clock has passed, returning the terminal table and how long it took, or nil and the time spent.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

This asset doesn't declare a schema or structured payload.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

0items
This part has no composite children. See the Files segment for its leaf payloads.
This part has no leaf payloads.

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.