Taskbox
Schemas

API

Every export is a Zod schema (suffixed Schema) paired with a type alias inferred via z.infer<...>. The package also re-exports z for callers who want to keep a single zod instance.

Task lifecycle

ExportKindSummary
TaskSpecSchema / TaskSpecobjectInput contract: tool, input, network, optional runtime/resources/output/id.
RuntimeConfigSchema / RuntimeConfigobjectOptional backend ("podman") and image ref override.
ResourceConfigSchema / ResourceConfigobjectOptional cpus, memoryMb, timeoutMs.
OutputConfigSchema / OutputConfigobjectdir (where to materialize artifacts) and materialize flag.
TaskResultSchema / TaskResultobjectOutput: ok, taskId, tool, image, timestamps, artifacts, warnings, optional error.
TaskEventSchema / TaskEventdiscriminated union on typetask.started, task.completed, task.failed, image.prepare.*, process.*.

Errors

ExportKindSummary
TaskboxErrorSchema / TaskboxErrorobjectSerialized error shape with code, category, message, retryable, suggestions.
TaskboxErrorCodeSchema / TaskboxErrorCodeenumStable error codes (e.g. E_TIMEOUT, E_TOOL_EXIT_NONZERO, E_SCHEMA_INVALID).
TaskboxErrorCategorySchema / TaskboxErrorCategoryenumCoarse buckets (runtime, image, tool, timeout, validation, artifact, network).

Network and proxy

ExportKindSummary
NetworkConfigSchema / NetworkConfigdiscriminated union on modenone, direct, or proxy (with a ProxyConfig).
ProxyConfigSchema / ProxyConfigobjecttype, url, optional username/password, noProxy[].
redactProxyUrl(url)functionReturns the URL with userinfo stripped, for safe logging.
proxyConfigToSafeJson(p)functionSerializes a ProxyConfig with credentials redacted.

Artifacts

ExportKindSummary
ArtifactSchema / Artifactobjectkind, path, optional mediaType, bytes, meta.
ArtifactKindSchema / ArtifactKindenumfile, dir, subtitles, audio, video, etc.

Tool inputs

ExportKindSummary
MediaDownloadSubtitlesInputSchema / MediaDownloadSubtitlesInputobjectInput for the media.downloadSubtitles tool.

Misc

ExportKindSummary
zre-exportThe zod instance every schema in this package was built with.

See the generated JSDoc reference for the full surface.

On this page