Skip to content

API Reference parrot.knowledge.wiki.roblox.references

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.knowledge.wiki.roblox.references

View source

Bounded static code-to-API candidate resolution (FEAT-532 TASK-2906).

Extracts candidate Roblox API references from Luau source, resolved against the offline :class:~parrot.knowledge.wiki.roblox.models.RobloxApiCatalog (TASK-2901's render output) — never against a network dump. Per the spec's final §8 owner decision (overriding an earlier proposal that excluded them), the scope is deliberately wide:

  1. Literal game:GetService("X") calls.
  2. Explicit API type annotations (local p: Player, function f(p: Player)) — a plain identifier type, never a builtin_type primitive.
  3. Chained instance access on a known, unshadowed root (game/workspace), at every level of the chain — e.g. workspace.Terrain, and both Workspace/Terrain out of game.Workspace.Terrain.

Excluded, deliberately: local type aliases' own right-hand side (type MyAlias = Player never produces a reference — the owner's decision), any root shadowed by a local declaration/parameter anywhere in the file (a coarse, file-wide, false-negative-leaning check — see :func:_collect_shadowed_roots), and anything inside a comment or string literal (tree-sitter already tokenizes those separately, so a node-type walk never descends into them).

Only candidates that resolve against catalog are returned — an unresolved chain (recognized root, valid syntax, but no matching class/ enum) is never guessed into a fabricated page; it is reported as a diagnostic only.

Alias RobloxApiCatalog

Re-exported from parrot.knowledge.wiki.roblox.models.RobloxApiCatalog.

Alias RobloxApiReferenceCandidate

Re-exported from parrot.knowledge.wiki.roblox.models.RobloxApiReferenceCandidate.

Alias RobloxReferenceExtractionKind

Re-exported from parrot.knowledge.wiki.roblox.models.RobloxReferenceExtractionKind.

Function extract_api_reference_candidates

Extract, deduplicate and resolve API reference candidates.

extract_api_reference_candidates(source: str, catalog: RobloxApiCatalog | None) -> tuple[list[RobloxApiReferenceCandidate], list[str]]

Parameter Type Default Description
source str Raw Luau/Lua source text.
catalog RobloxApiCatalog | None The active generation's :class:RobloxApiCatalog, or None/empty when no API plane has been ingested.

Returns: tuple[list[RobloxApiReferenceCandidate], list[str]] — (candidates, diagnostics). candidates contains only entries whose target_name resolves to a known class or enum in catalog — deduplicated by (recognized_root, extraction_kind, target_name); an unresolved name is never returned as a candidate at all, only as a diagnostic. diagnostics explains skips: no catalog, grammar unavailable, oversized/timed-out source, or an unresolved chain.

Attribute logger

Alias luau_guard

Re-exported from parrot.knowledge.wiki.languages.luau_guard.

Alias treesitter

Re-exported from parrot.knowledge.wiki.languages.treesitter.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally