Documentation
    Preparing search index...

    Interface CatalogIntentResolverOptions

    Catalog, user-policy, and lifecycle hooks for the reference resolver.

    interface CatalogIntentResolverOptions {
        targets: IntentTargetController;
        authorizeExplicitHandler?(
            sender: string,
            handler: string,
            request: IntentRequest,
            candidate: IntentCandidate,
            context?: IntentResolverContext,
        ): boolean | Promise<boolean>;
        chooseHandler?(
            archetype: string,
            candidates: readonly IntentCandidate[],
            sender: string,
        ): string | Promise<string | undefined> | undefined;
        getDefaultHandler?(archetype: string): string | undefined;
        loadCatalog(): | readonly IntentCatalogEntry[]
        | Promise<readonly IntentCatalogEntry[]>;
        offerUninstalledHandlers?(
            request: IntentRequest,
            context: IntentResolverContext,
        ): string | Promise<string | undefined> | undefined;
        resolveHandlerHint?(
            hint: IntentHandlerHint,
            candidates: readonly IntentCandidate[],
        ): string | Promise<string | undefined> | undefined;
    }
    Index

    Properties

    Methods

    • Offer handlers that are not installed when no installed handler is compatible (NAP-INTENT "Recommended handler resolution", step 4 and the step-3 MAY: "offer installation under its policy"). The host searches and installs through its ordinary verified load, then returns the installed catalog ID, or undefined when the user declined or nothing was found.

      The returned ID is only a lookup key. The resolver reloads the catalog and uses the handler only if its verified catalog entry is compatible. Discovery never changes available() or handlers(). An explicit catalog handler never reaches this hook, because an explicit selection must not fall back. A declined or empty offer keeps the original rejection (no handler, unsupported action, or unsupported convention).

      Parameters

      Returns string | Promise<string | undefined> | undefined

      The newly installed catalog ID, or undefined.