Skip to main content

chp-adapter-jobs

Run any CHP capability as a polled background job. Built for heavy or long-running capabilities — e.g. huggingface.generate_image (minutes on MPS) — that outlive HTTP request timeouts.

How it works

submit runs the target capability via host.ainvoke inside a ThreadPoolExecutor and returns a job_id immediately. The target runs to completion server-side regardless of client timeouts, and — because the SQLite evidence store is thread-safe — keeps its own full evidence chain. This adapter emits only lightweight job-lifecycle events, never the target's payload or result.

Capabilities

Capability Description
chp.adapters.jobs.submit Submit {capability_id, payload}; returns a job_id.
chp.adapters.jobs.status Poll lifecycle state: submitted / running / completed / failed + duration.
chp.adapters.jobs.result Fetch a completed job's result data (ready: false while running).
chp.adapters.jobs.list List all jobs and their state.

Example: async image generation

// 1. submit — returns immediately
POST chp.adapters.jobs.submit
{ "capability_id": "chp.adapters.huggingface.generate_image",
  "payload": { "prompt": "a serene mountain lake", "output_path": "/tmp/out.png" } }
// → { "job_id": "job_ab12…", "status": "submitted" }

// 2. poll
POST chp.adapters.jobs.status   { "job_id": "job_ab12…" }   // → running … completed

// 3. fetch result
POST chp.adapters.jobs.result   { "job_id": "job_ab12…" }
// → { "ready": true, "success": true, "result": { "output_path": "/tmp/out.png", … } }

Config

Field Default Meaning
max_workers 2 Thread pool size.
allowed_capabilities None Allowlist of submittable capability ids (None = any).

Metadata

Release files for chp-adapter-jobs 0.53.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chp-adapter-jobs 0.53.1
File Size Uploaded
chp_adapter_jobs-0.53.1.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chp-adapter-jobs 0.53.1
File Interpreter ABI Platform
chp_adapter_jobs-0.53.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.5 kB

Release files / chp_adapter_jobs-0.53.1.tar.gz

Download URL chp_adapter_jobs-0.53.1.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a0cb0e749bad0d2ca481a670113adbb3f2279ff45dc67b0190413ea6ac6667df
BLAKE2b-256 checksum
How to use checksums
6562ec405495e60ad8cb1a846418522d06360b6dff9db53adf03e4dca77c03d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release files / chp_adapter_jobs-0.53.1-py3-none-any.whl

Download URL chp_adapter_jobs-0.53.1-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5df578fd5c4cc0b4f8b7822b99c6b594948831c43b0e2dc366edb995b047047
BLAKE2b-256 checksum
How to use checksums
963bd0389e2c3d5f4638b0470f146df1e0ad31f34d5008819b2c48db20e0ea98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.53.1 This release

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.26.0

2 release files

0.25.0

2 release files

0.24.0

2 release files

0.23.0

1 release file

0.22.0

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page