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§
- Kind
Group - One contiguous run of same-kind results, as
group_by_kindarranges them. - Query
- Registry
- Registration order survives equal-strength ties. Borrowed registrations also support query-scoped native adapters without transferring retained provider ownership.
- Search
Budget - 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.
- Search
Cursor - 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.
- Search
Page - One bounded answer from a
Provider.stale_cursoris 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§
- Resource
Kind - 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. - Search
Scope - Seeded by which chord opened the palette:
Ctrl+K→SearchScope::ActiveApp;Super+K/Super+Space/Alt+Space→SearchScope::All(Alt+Spacebecause a nested Wayland client can’t claim Super from the host DE). Degrades rather than empties: no provider claiming the focused tab widensActiveAppto every provider; nothing focused widens the palette toAll.
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
Traits§
- Provider
- Typed fanout boundary. The host supplies retained providers and activation payloads.
- Search
Row - 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-editortyped forso.tilo.hex-editoris the app’s identity and must outrank an incidental substring. Category ranks below the id because it’s a bucket, not an identity. - application_
intent_ boost - How much more an application hit is worth at the merge than its field rank says, because a person who types what an app is called, or a word it is known by, wants to open it: a perfect name match is launch intent; an exact alias or keyword (“youtube” for a video app) is the same intent reached by another word and must still lead the notes and files that merely contain it; a keyword or name that only begins or contains the query is weaker and ranks by its score alone.
- application_
ranks - What a tier earns in an app’s fields: the usual ranks, except that a keyword typed whole is the app’s other name, and ranks like a name’s start. “apps” is the Store’s, whatever other app has the word in its name.
- application_
search_ fields - An app’s
application_fieldsplus what else people call it: each of itskeywords(aliases, synonyms, the products it stands in for, in every language its manifest gives), its names in other languages as the name itself, and the initials of its name (wpforWord Processor). - command_
entries - group
group_by_kindoverSearchRows.- group_
by_ kind - Ranked hits arranged into contiguous per-kind groups and trimmed to a
row_budgetshared 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 an application match
(
application_intent_boost), and the caller’s contextualproximityboost. - 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_strengthstill 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
fieldsforneedle, on the provider scale. - scope_
allows - starting_
point_ group - The empty Applications palette group
package_idis listed under, in the desktop’s language. - starting_
point_ rank - Where
package_idsits in the empty Applications palette; higher first.
Type Aliases§
- Rank
Field - One searchable field and its weight, as the shared ranker takes it.