bookclerk_plugin_abi::methods

Development These docs follow the development version and change with every merge.

Last updated View as Markdown

Role capability method names (camelCase on the wire).

Each submodule exposes a single NAME constant equal to the corresponding ContentSource / RemoteLibrary / Oidc / MetadataProvider / CoverFetcher / MetadataFiles / Notifier / NotificationRaiser / AiModels / AiRunner / Cli / EventConsumer / EventPublisher / QueueConsumer / QueueProducer / PluginWorker method in schema/plugin.capnp. Prefer these constants over string literals when dispatching or documenting capabilities.

METHOD_NAMES enumerates every known method for discovery / schema drift tests. Flat UPPER_SNAKE aliases live under names.

Modules

  • shutdown: Graceful guest teardown before the host closes the transport.
  • health: Connectivity / configuration probe.
  • diagnose: Human-readable diagnostic lines for bookclerk plugins diagnose.
  • start: Start background watchers (Cap'n Proto RemoteLibrary.start).
  • stop: Stop background watchers started by start (Cap'n Proto RemoteLibrary.stop).
  • event: Deliver one ordered batch of domain events (Cap'n Proto EventConsumer.event).
  • publish: Append one guest event to the host outbox (Cap'n Proto EventPublisher.publish).
  • read: Read one page of past outbox events (Cap'n Proto EventPublisher.read).
  • queue: Deliver one ordered batch of queue messages (Cap'n Proto QueueConsumer.queue).
  • scheduled: Run one cron fire (Cap'n Proto ScheduledHandler.scheduled).
  • send: Send one message into a granted queue (Cap'n Proto QueueProducer.send), or deliver one notification to one destination (Cap'n Proto Notifier.send).
  • send_batch: Send a batch of messages into a granted queue (Cap'n Proto QueueProducer.sendBatch).
  • poll_events: Poll for plugin-observed external users after start.
  • scan_library: Trigger an integration library scan against a remote server (e.g. ABS).
  • sync_listening: Pull listening-progress snapshots; host upserts tagged with the plugin id.
  • authenticate_user: Validate a username/password against a remote IdP (Cap'n Proto Oidc.authenticateUser) and return an external user.
  • lookup: Edition records for a set of identifiers (Cap'n Proto MetadataProvider.lookup).
  • search: Edition records matching a title and author (Cap'n Proto MetadataProvider.search).
  • chapters: Chapter layout of one edition (Cap'n Proto MetadataProvider.chapters).
  • fetch_covers: Cover image bodies streamed into a host sink (Cap'n Proto CoverFetcher.fetchCovers).
  • parse: What one metadata file says (Cap'n Proto MetadataFiles.parse).
  • render: A metadata file's bytes with chosen fields rewritten (Cap'n Proto MetadataFiles.render).
  • validate_destination: Normalise and check a patron's address on a notifier (Cap'n Proto Notifier.validateDestination).
  • raise: Raise a notification type the plugin declared (Cap'n Proto NotificationRaiser.raise).
  • models: List the models a plugin serves (Cap'n Proto AiModels.models).
  • run: Run one model on one input (Cap'n Proto AiModels.run on a model plugin, AiRunner.run on the AI binding).
  • clients: Plugin-provided OIDC client templates (Cap'n Proto Oidc.clients).
  • describe: Return the guest's declared CLI schema (crate::CliSchema; Cap'n Proto PluginCli.describe). Also the root PluginWorker.describe identity call.
  • invoke: Invoke a declared plugin CLI command (Cap'n Proto PluginCli.invoke).
  • login: Password-style source login; host seals returned credentials.
  • login_start: Begin interactive OAuth (returns browser URL + session id).
  • login_complete: Finish interactive OAuth after the operator completes the browser flow.
  • scan: Scan a source storefront library; host upserts returned crate::ScanBook rows.
  • fetch_title: Download/decrypt one title into the host cache directory.
  • search_catalog: Search a storefront catalog for purchase / discovery UIs.
  • expand_candidates: Expand related catalog candidates from a seed title.
  • purchase_hint: Resolve a purchase URL / price hint for a catalog product.
  • purchase_hints: Resolve purchase URLs / price hints for several catalog products at once.
  • quality_offers: Report the audio quality one account would download for several titles.
  • list_deals: List current storefront deals / promotions.
  • list_accounts: List source accounts known to the guest (host usually prefers DB rows).
  • catalog_detail: Fetch rich catalog detail for one product id.
  • revoke_account: Undo store-side state for one account before the host deletes its stored credentials (for example, deregister the login device).
  • put: Put a small object (cover/sidecar) into an output destination.
  • get: Read a small object from an output destination.
  • exists: Test whether an object key exists in an output destination.
  • list: List object keys under a prefix in an output destination.
  • copy: Copy an object within an output destination.
  • delete: Delete an object key from an output destination.
  • names: Flat UPPER_SNAKE aliases matching historical protocol::methods usage.

Constants

METHOD_NAMES

pub const METHOD_NAMES: &[&str] = _;

All known capability method names for discovery, docs, and schema checks.

Order is stable for readability; scripts/gen-plugin-abi.py --check verifies this list against schema/plugin.capnp.

Generated from crates/bookclerk-plugin-abi at main · View as Markdown