wire_manifest.py¶
clew/query/wire_manifest.py
The wire-key manifest: every field the dossier and search replies can carry, generated.
wire_manifest
dict[str, Any] clew.query.wire_manifest.wire_manifest()
Every field of every dataclass reachable from the reply roots.
clew/query/wire_manifest.py:105
Source · 36 lines
def wire_manifest() -> dict[str, Any]:
"""BREADTH-FIRST FROM THE ROOTS, so a nested dataclass (a caller row, a gate row) is covered
by being reachable, not by being remembered.
@brief Build the manifest.
@return The manifest dict.
@version 1
"""
from ..guard.impact import (
IMPACT_ENTRY_KEYS,
IMPACT_FUNCTION_KEYS,
IMPACT_REPORT_KEYS,
IMPACT_SCHEMA_VERSION,
)
from ..wiki import flow as flow_module
return {
"wire_version": WIRE_VERSION,
"envelope_keys": sorted(ENVELOPE_KEYS),
"types": _walk(list(_ROOTS), _referenced),
## PS1 (2.0.0, owner Q/A 2026-11-19): `clew wiki flow` JSON, after P5's sequence changes.
"flow": {
"flow_version": flow_module.FLOW_VERSION,
"types": _walk([flow_module.Flow], lambda a: _referenced_in(a, flow_module)),
},
## PS3: impact.json's version and keys.
"impact": {
"schema_version": IMPACT_SCHEMA_VERSION,
"entry_keys": sorted(IMPACT_ENTRY_KEYS),
"function_keys": sorted(IMPACT_FUNCTION_KEYS),
## 2.1 (clew#74): the report's own keys, additive.
"report_keys": sorted(IMPACT_REPORT_KEYS),
},
}