veryfront/runs

Import

ts
import {
  CancelRunResponseSchema,
  CreateRunResponseSchema,
  createRunsClient,
  RunEventListSchema,
  RunEventSchema,
  RunListSchema,
} from "veryfront/runs";

Examples

ts
import { VeryfrontRunsClient } from "veryfront/runs";

const runs = new VeryfrontRunsClient({
  authToken: process.env.VERYFRONT_API_TOKEN,
  projectReference: "my-project",
});

const accepted = await runs.createTaskRun({
  projectId: "00000000-0000-4000-8000-000000000000",
  target: "task:sync-data",
  config: { batchSize: 100 },
});

const events = await runs.events(accepted.run.run_id);

Exports

Components

NameDescriptionSource
CancelRunResponseSchemaZod schema for a cancel-run response.source
CreateRunResponseSchemaZod schema for a create-run response.source
RunEventListSchemaZod schema for a paginated run-event response.source
RunEventSchemaZod schema for a run event whose event_id is a non-negative integer.source
RunListSchemaZod schema for a paginated project-run response.source
RunSchemaZod schema for a canonical durable run whose duration_ms and backoff_limit are non-negative integers and whose timeout_seconds is a positive integer when present.source
ScheduleRunCreateResponseSchemaZod schema for a schedule-triggered create-run response.source

Functions

NameDescriptionSource
createRunsClientCreate a runs client.source

Classes

NameDescriptionSource
VeryfrontRunsClientPublic client for canonical durable runs.source

Types

NameDescriptionSource
CancelRunResponseResponse returned when a run is cancelled.source
CreateEvalRunInputInput payload for creating an eval run.source
CreateRunResponseAn accepted run with either a full Run or a compact receipt containing only run_id and status. Use run_id and status in either variant. Narrow with "output" in response.run before reading full-run fields, or read the grouped resource with runs.getRun(response.run.run_id).source
CreateScheduleRunFromSourceInputInput for resolving and triggering one pushed source-defined schedule.source
CreateScheduleRunFromSourceResultCloud schedule metadata returned with an accepted source-triggered run.source
CreateScheduleRunInputInput for triggering one persisted schedule by its canonical UUID.source
CreateTaskRunInputsource
CreateWorkflowRunInputsource
KnowledgeIngestByUploadIdsInputInput payload for knowledge ingest by upload IDs.source
KnowledgeIngestByUploadPathsInputInput payload for knowledge ingest by upload paths.source
KnowledgeIngestByUploadPrefixInputInput payload for knowledge ingest by upload prefix.source
ListRunEventsOptionssource
ListRunsOptionssource
ProjectScopedOptionsOptions accepted by project-scoped run requests.source
RunCanonical durable run.source
RunEventEvent emitted by a run.source
RunExecutionErrorError payload recorded for failed task and workflow runs.source
RunKindCanonical durable run kind.source
RunListPaginated project run response.source
RunOwnerCanonical durable run owner.source
RunRuntimeTargetKindRuntime target for a task, workflow, or eval run.source
RunRuntimeTargetOptionsRuntime target fields accepted by run creation APIs.source
RunStatusCanonical durable run status.source
RunTriggerKindTrigger kind recorded on scheduled or externally-started runs.source
ScheduleRunCreateResponseResponse returned when a schedule-triggered run is accepted.source
VeryfrontRunsClientConfigConfiguration used by the Veryfront runs client.source

Deep imports

These import paths group focused functionality under this module. Each is a separate barrel; import only what you need.

veryfront/runs/target

Typed SDK for the Runs target contract, with the pinned contract's operation, input and output types, and the canonical Veryfront API transport it sends requests through. The legacy client stays at veryfront/runs until the cutover removes it.

ts
import {
  createCanonicalEventsV1Facade,
  createRunsApiTransport,
  createRunsSdk,
} from "veryfront/runs/target";

Components

NameDescriptionSource
RUNS_OPERATIONSMethod and path for each Runs target operation, keyed by the contract's operation ID. client.test.ts checks every entry against the pinned paths at compile time.source

Functions

NameDescriptionSource
createCanonicalEventsV1Facadesource
createRunsApiTransportCreate the canonical Veryfront API transport for createRunsSdk. It owns the origin, credentials, retries, response body limits and telemetry of every SDK request.source
createRunsSdkCreate a typed Runs SDK over the given transport.source
decodeDescendantCursorV1Validate a bounded descendant token without replacing server scope authorization.source
parseDescendantRunReadPageV1Validate an explicit cross-store descendant history page.source
parseEventDiscoveryV1Validate the canonical event discovery contract.source
parseEventErrorV1Validate a content-free canonical protocol error.source
parseRunReadMemberV1Validate one canonical or authorized legacy history member.source
parseRunReadPageV1Validate a canonical history page without dropping legacy members.source
parseStreamMemberV1Validate a durable or transient canonical stream member.source
runsProblemOfThe problem body of an error thrown by the SDK, or undefined for any other error.source

Classes

NameDescriptionSource
CanonicalEventsV1ErrorA failed canonical-v1 HTTP operation, retaining its content-free error code.source
CanonicalEventsV1StreamErrorTransport error frames throw instead of looking like a successful end of history.source

Types

NameDescriptionSource
CanonicalEventsV1Facadesource
CanonicalEventsV1ListOptionssource
CanonicalEventV1source
CanonicalMemberV1source
CanonicalRunStreamFrameCanonical JSON carried by the data field of the Runs event stream.source
DescendantCursorV1source
DescendantRunReadPageV1Additive cross-store descendant history profile; single-run pages remain unchanged.source
EventDiscoveryV1source
EventViewV1Caller-authorized canonical-v1 read values. Legacy payloads remain opaque JSON.source
LegacyMemberV1source
LegacyReasonV1source
RunReadMemberV1source
RunReadMetadataV1source
RunReadPageV1source
RunsApiTransportOptionsOptions for createRunsApiTransport.source
RunsArgsMethod arguments; the input is optional when it has no required field.source
RunsArtifactInputInput of readRunArtifact: the canonical run UUID and an artifact_id from run.artifacts.source
RunsCallOptionsPer-call options.source
RunsContractComponentsSchemas of the pinned Runs contract, for example RunsContractComponents["schemas"]["Run"].source
RunsContractOperationsOperations of the pinned Runs contract, keyed by operation ID.source
RunsContractPathsPaths of the pinned Runs contract, keyed by URL template.source
RunsDeleteAcknowledgementAcknowledgement body of a DELETE answered with 200 instead of an empty 204.source
RunsInputRequest of one operation: path, query and header parameters plus the JSON body.source
RunsOperationIdContract operation ID.source
RunsOperationRouteHTTP route of one Runs operation.source
RunsOutputSuccess body of one operation: the JSON body of each success response, undefined for a 204 response. A DELETE may answer 200 with RunsDeleteAcknowledgement or an empty 204. Distributes over a union of operations, so each member keeps its own success body.source
RunsPaginatedOperationIdOperations whose responses page with page_info.next and a cursor query parameter.source
RunsProblemRFC 9457 Runs error body. Optional cause identifies schedule_concurrency_forbidden (overlapping fires forbidden) or schedule_fire_in_progress (the same fire is being processed).source
RunsResultWhat an SDK method returns: the parsed body, or the frames of an event stream.source
RunsSdkTyped client for every Runs target operation.source
RunsSdkConfigConfiguration for createRunsSdk.source
RunStreamFrameOne server-sent frame of streamRunEvents.source
StreamMemberV1source
TransientMemberV1source
TransportRequestInitOptions for one transport request.source
TransportRetryConfigRetries after a failed attempt, with exponential backoff between initialDelay and maxDelay ms.source
VeryfrontApiTransportSends requests to the Veryfront API with the transport's origin, credentials and retries.source