Declare a handler
A job must appear in the matching manifest, request supported capabilities and be included in the installation’s approved project grant. Permission to enqueue a job is separate from the handler’s own host-service capabilities. The current host supports immediate jobs using document and named HTTP capabilities. Interval scheduling is rejected; declaringintervalSeconds does not start a scheduler. Dependencies, tables and migrations have separate installer restrictions.
Enqueue and retry
The native enqueue input containsname, payload, idempotencyKey and optional attempts:
Use the matching SDK’s private host-service transport for one authenticated invocation. The host derives plugin, customer and project scope; a request body cannot choose another tenant. Keep the same idempotency key for unchanged intent. Changed input with a reused key fails instead of creating another job.
Execution and cancellation
Core rechecks current identity, stored browser/OAuth authority, installation generation, configuration and grants when claiming and running work. Leases fence stale workers; retries preserve durable state. Cancellation and revocation cannot undo a provider effect already accepted. Handlers must retain operation identities and reconcile uncertain remote writes before attempting another effect. Installation disablement waits for durable jobs and provider continuations to drain. An unavailable blocker check does not mean there are no blockers.Verification boundary
Use owned disposable PostgreSQL and runtime fixtures. The repository command targets the native integration suite:crates/plugin-host/src/jobs.rs), runtime dispatcher (crates/control-plane/src/plugin_jobs.rs) and job integration tests (crates/plugin-host/tests/jobs.rs).