Async jobs

Long work should outlive the connection.

Pack-scale work survives marketplace timeouts. Payment happens once; polling and collection are free.

The lifecycle

oce_create_pack_job validates the target tool arguments before settlement and returns a job id immediately. The durable state machine is queued → running → delivering → done, with failed and cancelled terminal paths.

create a grounded occasion job

{"tool":"oce_create_pack_job","arguments":{"tool":"oce_plan_occasion","arguments":{"occasion":"Graduation lunch","city":"Lagos","date":"2026-07-25","headcount":18,"vibe":"sunlit and intimate"}}}

Follow, collect, cancel

oce_job_status is free and returns state plus artifact progress. oce_job_result is free and returns the completed pack and its public /k link. oce_cancel_job is free; queued jobs cancel immediately and running jobs stop at the next safe boundary.

Retries cannot double-charge

Send an Idempotency-Key on a paid call. The same key with the same arguments within 24 hours returns the original result. Reusing it with different arguments is rejected. When the header is absent, the payment nonce is the fallback key.

Jobs live in SQLite and survive restarts. A process restart recovers queued work and safely requeues interrupted work; tests exercise restart-mid-job.