Skip to main content

Module system

Module system 

Expand description

Native and browser system-search policy. Activation payloads remain host-owned.

Modules§

filters
The native system-search filter strip: paint, hit targets and accessibility.

Structs§

KindGroup
One contiguous run of same-kind results, as group_by_kind arranges them.
Query
Registry
Registration order survives equal-strength ties. Borrowed registrations also support query-scoped native adapters without transferring retained provider ownership.
SearchBudget
Hard ceilings for one provider page. These are deliberately expressed in the protocol rather than as palette constants: the same limits protect the visual palette, headless agents, and a future remote directory source. A provider may stop sooner, but must never exceed any non-zero ceiling.
SearchCursor
An opaque provider-owned continuation. The revision is carried alongside the provider-local payload, so a result page can never silently advance across a changed ordering.
SearchPage
One bounded answer from a Provider. stale_cursor is a protocol outcome rather than an empty page: callers restart explicitly, preserving the distinction between “there are no more hits” and “the source changed while you were paging”.

Enums§

ResourceKind
One well-known category a result can belong to — the domain vocabulary the chip strip and grouping use. Providers pick from it or, via ResourceKind::Custom, mint a new one.
SearchScope
Seeded by which chord opened the palette: Ctrl+K → SearchScope::ActiveApp; Super+K / Super+Space / Alt+Space → SearchScope::All (Alt+Space because a nested Wayland client can’t claim Super from the host DE). Degrades rather than empties: no provider claiming the focused tab widens ActiveApp to every provider; nothing focused widens the palette to All.

Constants§

ACTIVE_APP_PROXIMITY_BOOST
A deliberately small contextual preference: proximity should settle close matches, never make a weak metadata hit beat an exact visible title.
MAX_PROVIDER_SCORE
Top of every provider’s ranker-derived score.
PACKAGE_ID_WEIGHT
The package id in full names exactly one app, so an exact id is as strong as the name; a shared id prefix names a publisher and stays below an exact name.
PALETTE_ROW_BUDGET
PERFECT_APPLICATION_INTENT_BOOST
A provider-perfect application-name match represents launch intent, not a coincidental lexical occurrence. It must beat an exact filename/note with the same word, while an exact action (strength 5.0) still beats an unrelated app that merely received a weak provider score.

Traits§

Provider
Typed fanout boundary. The host supplies retained providers and activation payloads.
SearchRow
Portable display metadata; implement on a host row without moving its callbacks.

Functions§

application_fields
An app’s searchable fields. The package id in full, or its last segment, identifies exactly one app and weighs as its name — hex-editor typed for so.tilo.hex-editor is the app’s identity and must outrank an incidental substring. Category ranks below the id because it’s a bucket, not an identity.
command_entries
group
group_by_kind over SearchRows.
group_by_kind
Ranked hits arranged into contiguous per-kind groups and trimmed to a row_budget shared round-robin: a palette paints ~10 rows, and an outscoring kind (forty file hits) can otherwise push a correctly-ranked app off the bottom. A lone group is exempt — narrowing to one kind means “show me all of these”. A zero budget keeps everything.
icon_for_kind
lexical_strength
Provider-independent lexical fit used at the global merge boundary. A provider still contributes domain knowledge through its normalized score, but an exact visible title must beat a weak metadata/fuzzy match from a different source.
merged_strength
One hit’s strength against every other provider’s: its lexical fit, its provider’s normalized score, launch intent for a perfect application match, and the caller’s contextual proximity boost.
order_by_kind
Order merged hits: groups by how well their best member matched, then the fixed kind order, then strength within a group. Enter activates the top row, so an app’s name must not open an action that merely mentions the word. The sort is stable: equally strong hits keep their provider’s own order rather than being re-alphabetised by title.
provider_score
A field rank on the provider scale. A title prefix is already a perfect hit for a provider — it is what a person types to launch or open something — so the scale tops out there; lexical_strength still separates an exact title from a prefix across providers.
query_input_is_bounded
rank
Rows from providers with their declared top score, ordered by their normalized score on order_by_kind.
rank_fields
The shared ranker’s rank of fields for needle, on the provider scale.
scope_allows
starting_point_group
The empty Applications palette group package_id is listed under, in the desktop’s language.
starting_point_rank
Where package_id sits in the empty Applications palette; higher first.

Type Aliases§

RankField
One searchable field and its weight, as the shared ranker takes it.