cadrumo.entrypoints.tui.search module¶
Command-palette projections over admitted workbench search and navigation.
The application search service owns the safe snapshot, matching, ranking, and stable result identity. The navigation catalogue owns destination and action admission. This module only adapts those already-authoritative answers to Textual command-palette hits; selecting a hit asks the injected root host to navigate and cannot invoke a business action.
- class WorkbenchSearchDoorV1(*args, **kwargs)[source]¶
Bases:
ProtocolThe application-owned search door consumed by the palette.
- search(request, /)[source]¶
Return the authoritative bounded result page for a transient query.
- Return type:
- Parameters:
request (WorkbenchSearchRequest)
- class TuiSearchHostV1(*args, **kwargs)[source]¶
Bases:
ProtocolThe root seam through which palette hits request navigation.
- property workbench_search_service: WorkbenchSearchDoorV1¶
Return the already-composed application search service.
- property workbench_search_refusal_code: str | None¶
Return why search is unavailable, or
Nonewhen it is composed.
- property destination_catalogue: TuiDestinationCatalogueV1¶
Return the already-admitted destination catalogue.
Navigate to an already-admitted semantic target.
- Return type:
- Parameters:
target (TuiNavigationTargetV1)
- exception TuiSearchHostError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
CadrumoErrorRaised when a palette provider is mounted outside the workbench root.
- Parameters:
- Return type:
None
- code¶
- workbench_action_label(action_id, *, locale=None)[source]¶
Render one catalogue action without exposing its internal identifier.
This is the single naming authority for an operator action across the workbench: the palette and Home resolve the same identifier to the same words, so a suggested task and the command that performs it cannot be described differently.
An identifier this build has no wording for renders as explicitly unknown rather than as a plausible label: it still renders, because a table row is not the place to raise, but it never claims to be a named action.
- class WorkbenchSearchProviderV1(screen, match_style=None)[source]¶
Bases:
ProviderExpose application-ranked workbench results in the command palette.
- Parameters:
screen (Screen[Any])
match_style (Style | None)
- class WorkbenchCommandProviderV1(screen, match_style=None)[source]¶
Bases:
ProviderExpose admitted destinations and registered action identities as commands.
- Parameters:
screen (Screen[Any])
match_style (Style | None)
- async search(query)[source]¶
Fuzzy-match the current catalogue’s admitted routes and actions.
- Return type:
- Parameters:
query (str)