@fourtheorem/tempo-client
v0.0.2
Published
TypeScript client for the public Tempo API, generated from the OpenAPI spec.
Downloads
30
Readme
@fourtheorem/tempo-client
TypeScript client for the Tempo public API, generated from its OpenAPI specification. Tempo is a high-throughput compute platform for massive-scale modelling workloads.
Status: early development. The API surface is small and evolving, and authentication is not implemented yet. Expect breaking changes until 1.0.
Install
npm install @fourtheorem/tempo-clientWorks on any runtime with the standard fetch API: Node.js 18+, Bun, Deno, browsers, and edge runtimes. Ships dual ESM/CJS with full type declarations.
Quickstart
import { createClient } from "@fourtheorem/tempo-client/client";
import { healthCheck, submitWorkload, getWorkloadStatus } from "@fourtheorem/tempo-client";
const client = createClient({ baseUrl: "https://your-tempo-host/api" });
await healthCheck({ client });
const { data: submitted } = await submitWorkload({
client,
body: {
name: "demo",
jobs: [{ id: "j-1", name: "Job 1", work_type: "default", predecessors: [] }],
},
});
const { data: status } = await getWorkloadStatus({
client,
path: { workload_id: submitted!.workload_id },
});
console.log(status?.state);Every operation is a typed function exported from the package root; request and response types are exported alongside them (e.g. WorkloadSubmission, WorkloadStatusResponse).
What's covered
Workload submission (inline or via presigned uploads for large job graphs), workload lifecycle (status, cancel, delete, audit trail), job and attempt inspection, the resource-class catalog, and worker-artifact registry uploads — the full public API surface.
Documentation
The API reference (Scalar, with try-it-out) and narrative guides are served by your Tempo deployment at /docs/. The client is regenerated from the spec on every API change; see the repository for how the SDKs are produced.
