tubeless API reference
Generated from the package’s emitted declaration files. Do not edit manually; run bun run api:generate from the package root.
Each symbol links to its source declaration and uses the first sentence of its public doc comment.
Package: tubeless
Public entrypoints
| Entrypoint | Declaration | Surface hash | Exported symbols |
|---|---|---|---|
tubeless/agent/node |
./dist/agent/node.d.ts |
e0558b4bf12753bf66e687621f7c6573605046c77e99f41ec26cd711a7bcf2d7 |
4 |
tubeless/agent |
./dist/agent/agent.d.ts |
5fa21302535eefeea4d86fb8325ce267e793391b3c595ef29402314e4b17d5c6 |
39 |
tubeless |
./dist/core/pipeline.d.ts |
e19783e82012183aef5c87abd1d91cb1cfde70e105204c87abc73670577aace2 |
78 |
tubeless/cli |
./dist/cli/cli.d.ts |
5a027c5810d08524a21e7ab66d43f11553e03e86547d118af85965b7a57deb84 |
31 |
tubeless/batch |
./dist/utilities/batch.d.ts |
a09125c6849bb91b4bbba2f76c4248452d5288cf0c70671461de5846b1d17037 |
7 |
tubeless/node |
./dist/node/node.d.ts |
9c928ce580452f11c6acdc228c2923ef98fa853ffa2e70cd1dacae8164c1dc0f |
14 |
tubeless/rate-limit |
./dist/utilities/rate-limit.d.ts |
01029b2a9f1504a66e396804ccc63a5b43dbcb63c002dd47918e315a90ac2a3a |
1 |
tubeless/retry |
./dist/utilities/retry.d.ts |
52ede846e87e3601426639a7bdc2de0a440c119470dc55324deb26cb312757fd |
6 |
tubeless/project |
./dist/project/project.d.ts |
77b0836e88c61d98d8dd795c92795bbb17a7ddbac9001522c92f2a33feca206b |
8 |
tubeless/testing |
./dist/testing/testing.d.ts |
f1c9d6699246a6f91329d1d23c53d310e4a18d5b136375c109d128126165d038 |
10 |
tubeless/tracing |
./dist/tracing/tracing.d.ts |
9b7b2835a4ffa8bdce42233c0ff22ca28fe2a51de95208d895f6fc1904d2bad0 |
3 |
tubeless/agent/openai |
./dist/agent/openai.d.ts |
8e08fe480b86de80ede5e03d7f30fff3a46f9da7ce9d5261441e961bea6678ac |
2 |
tubeless/agent/mcp |
./dist/agent/mcp.d.ts |
dc3bfb16ef93c725830400845b7389277e3dc16f7906b6b6095f670d54884f36 |
7 |
tubeless/agent/anthropic |
./dist/agent/anthropic.d.ts |
51fc37d127b384327979df8f47e29125977cb2ae0f87fe8676d916d7bf30011f |
2 |
tubeless/cloudflare |
./dist/cloudflare/cloudflare.d.ts |
8424e7173bc9a7e0b5ef203057eb5d4ae61988507ee960a2a0fafdb643ace61d |
12 |
tubeless/cloudflare/cache |
./dist/cloudflare/cloudflare-cache.d.ts |
a9a03a7a9a1b62cd3fe611ef83b864c876f61b8d74ece137761ed2a3ef98bc38 |
4 |
Symbols
tubeless/agent/node
| Symbol | Description |
|---|---|
createNodeAgentEnvironment |
Local workspace capabilities with bounded reads, atomic writes and cancellable bash. |
createNodeCodemodeExecutor |
Run each code-mode script in a fresh Node or Bun worker thread with heap limits, inside a node:vm context without string code generation, WebAssembly, process, require, fetch or timers. |
openSqliteAgentCheckpointStore |
Open durable SQLite checkpoints; process exit automatically releases execution ownership. |
SqliteAgentCheckpointStore |
File-backed checkpoint storage using Node’s built-in SQLite and per-key file locks. |
tubeless/agent
| Symbol | Description |
|---|---|
AgentCall |
One selected default or custom call with raw model arguments; custom names replace defaults. |
AgentCheckpointCodec |
Lossless serialization for persisted state, validated arguments and outcomes. |
AgentCheckpointLease |
Exclusive ownership of one execution’s acknowledged checkpoint bytes. |
AgentCheckpointStore |
Pluggable checkpoint persistence. |
AgentDecision |
A nonempty batch of independent calls, or the raw input to the final-result schema. |
AgentDecisionContext |
Model-facing descriptors and ordinary step services, without executable tools. |
AgentDurability |
Resume the same execution key on subsequent invocations with the same definition and inputs. |
AgentEnvironment |
Filesystem and command capabilities supplied by a local or remote workspace. |
AgentEnvironmentContext |
Workspace and cancellation shared by an agent’s environment operations. |
AgentEnvironmentProvider |
A workspace capability or a factory resolved once per live agent invocation. |
AgentExecutionIdentity |
Stable durable identities for business idempotency and cross-attempt correlation. |
AgentLimits |
Finite limits for this agent and its descendants; child limits may only tighten them. |
AgentModel |
Pluggable model transport; the harness owns and isolates its returned conversation per run. |
AgentModelDescriptors |
The model-facing descriptors one agent sends with every decision request. |
AgentModelRequest |
Per-run provider context and the latest ordered tool outcomes, never executable handlers. |
AgentModelResponse |
An untrusted decision and complete plain-data conversation, including any final answer. |
AgentOutcome |
Input-order result or deliberately recoverable handler failure, including selected defaults. |
AgentProjectInstruction |
One scoped guidance file, loaded by the workspace that owns it. |
AgentSession |
Sequential runs of one model-backed agent that continue a single conversation. |
AgentState |
Deeply read-only view of the owned plain-data state supplied to agent callbacks. |
AgentTool |
Opaque capability created by defineTool or pipelineTool; model decisions contain data only. |
AgentToolContext |
Step services and the workspace capability available to a registered tool. |
CodemodeExecution |
One script for an executor to run, with the JSON-text bridge to its tools. |
CodemodeExecutionResult |
A script’s JSON result text and console lines, or the error that ended it. |
CodemodeExecutor |
Runs code-mode scripts in an isolated sandbox. |
CodemodeOptions |
Code-mode settings; the executor defaults to a Node worker thread. |
CodemodeReply |
The value or failure of one script call, as JSON text crossing into the sandbox. |
CodemodeResult |
A code-mode script’s JSON return value and bounded console lines. |
CodemodeSetting |
true or options enable code mode; false or omission advertises the registry. |
createAgentSession |
Continue one conversation across sequential runs of a defineAgent agent, such as chat prompts. |
createMemoryAgentCheckpointStore |
In-memory checkpoint store with exclusive leases, useful for tests and embedded hosts. |
DefaultAgentToolName |
A standard workspace tool an agent’s setup may select. |
DefaultAgentTools |
The read, write, edit, bash, list and search tools included in every agent. |
defineAgent |
Prompt a model with { task } and finish with the result schema, { answer } by default. |
defineAgentLoop |
Build a bounded in-process agent as an ordinary pipeline with one target, agent. |
defineTool |
Declare a validated handler capability; tools skip live work in dry runs by default. |
pipelineTool |
Reuse a compiled child’s options schema and exact final result. |
plainAgentCheckpointCodec |
Lossless, tagged JSON codec for finite plain data; preserves undefined and sparse arrays. |
ToolError |
A handler may throw this error to return a recoverable observation to its agent. |
tubeless
| Symbol | Description |
|---|---|
ArtifactJsonValue |
JSON values accepted in persisted artifact metadata. |
ArtifactLoader |
Application-owned read boundary. |
ArtifactMetadata |
Identifies an artifact without recording its contents. |
ArtifactRecord |
A completed artifact operation recorded by a step; reuse does not claim a new write. |
ArtifactResult |
Adapter result: the value flows to dependents; only artifact metadata is recorded. |
ArtifactSaver |
Application-owned write boundary returning a typed receipt and separate trace metadata. |
createSteps |
Create typed step constructors for one pipeline definition. |
definePipeline |
Compile a typed step graph into a validated, executable pipeline. |
isPipelineErrorCode |
Return whether an unknown value is a stable package-owned pipeline error code. |
IterationDecision |
Continue with a new state or publish the iteration step’s final output. |
IterationState |
Read-only state supplied to an iteration’s mapping and transition callbacks. |
MappedChildProgressOptions |
Presentation options for opaque forEachPipeline progress. |
Pipeline |
Compiled pipeline that can be planned, executed, and rendered as a graph. |
PIPELINE_ERROR_CODES |
Ordered catalog of every stable package-owned pipeline error code. |
PipelineCacheOptions |
Defaults for opted-in steps; configuring defaults does not make other steps cacheable. |
PipelineContext |
Caller-supplied services and metadata shared by one pipeline execution. |
PipelineDefinition |
Declarative configuration for compiling a typed pipeline. |
PipelineDefinitionError |
Programmer error raised immediately when a pipeline graph is invalid. |
PipelineDefinitionIdentity |
Versioned graph identity, separate from the optional handler implementation version. |
PipelineDefinitionSnapshot |
Immutable snapshot of the compiled pipeline definition recorded for inspection and tracing. |
PipelineError |
Structured, machine-readable error stored in plans, runs, and traces. |
PipelineErrorCause |
Bounded JSON-safe snapshot of a thrown value and its cause chain. |
PipelineErrorCode |
Stable package-owned code for a pipeline error. |
PipelineErrorKind |
Broad category of a structured pipeline error. |
PipelineErrorPhase |
Pipeline lifecycle phase in which an error occurred. |
PipelineExecutionContext |
Resolved execution context provided to pipeline handlers. |
PipelineExecutionError |
Error thrown by runOrThrow when a pipeline run does not complete successfully. |
PipelineFanOutDiagnostics |
Bounded diagnostics collected from a failed or cancelled fan-out step. |
PipelineFanOutFailure |
Bounded diagnostics for a failed or cancelled runtime fan-out. |
PipelineHooks |
Optional lifecycle callbacks, each receiving its own metadata snapshot. |
PipelineInput |
Input accepted by a pipeline run before any options schema transformation. |
PipelineLogger |
Minimal logger used by pipeline execution, reporters, and CLI adapters. |
PipelineMermaidDirection |
Supported Mermaid flowchart direction. |
PipelineMermaidOptions |
Rendering options for a pipeline Mermaid flowchart. |
PipelineMetadata |
Descriptive only. |
PipelineMetadataValue |
Bounded JSON values for descriptive pipeline and step annotations. |
PipelinePlan |
Side-effect-free validation and selection result for a pipeline run. |
PipelinePlanStep |
Planned representation of one declared step and its selection state. |
PipelineResult |
Successful result produced by a pipeline run. |
PipelineRun |
Versioned public record returned for one pipeline execution. |
PipelineRunControls |
Built-in run controls. |
PipelineRunStatus |
Terminal disposition of a completed run record. |
PipelineStepCancelledEvent |
Lifecycle event emitted when a step is cancelled. |
PipelineStepCancelledReport |
Terminal report for a cancelled step. |
PipelineStepCompleteEvent |
Lifecycle event emitted when a step completes successfully. |
PipelineStepCompleteReport |
Terminal report for a successfully completed step. |
PipelineStepContext |
Step execution context with attempt identity and progress reporting helpers. |
PipelineStepFailedEvent |
Lifecycle event emitted when a step fails. |
PipelineStepFailedReport |
Terminal report for a failed step. |
PipelineStepLifecycleStatus |
Any planned, running, or terminal step lifecycle status. |
PipelineStepPlannedEvent |
Lifecycle event emitted when a step is planned. |
PipelineStepProgress |
Latest progress snapshot reported by a running step. |
PipelineStepProgressDetail |
One optional nested row in a step progress snapshot. |
PipelineStepProgressDetailStatus |
Lifecycle status displayed for an optional nested progress row. |
PipelineStepProgressEvent |
Lifecycle event emitted when a running step reports progress. |
PipelineStepQuery |
Discovery filters combine with AND; tags require every exact, case-sensitive tag. |
PipelineStepReport |
Terminal state recorded for one step after a run. |
PipelineStepReportStatus |
Terminal status recorded in a step report. |
PipelineStepSelectionReason |
Machine-readable explanation of why a planned step was included or omitted. |
PipelineStepSkippedEvent |
Lifecycle event emitted when a step is skipped. |
PipelineStepSkippedReport |
Terminal report for a structurally or intentionally skipped step. |
PipelineStepSkipReason |
Why a step did not run. |
PipelineStepStartEvent |
Lifecycle event emitted when a step begins running. |
PipelineStepStatus |
One observable status in a step’s planned → running → terminal lifecycle. |
PipelineValidationIssue |
One dependency-free Standard Schema issue normalized for reports and traces. |
querySteps |
Return matching plan steps in execution order without changing selection or including prerequisites. |
RemoteStepAdapter |
Adapter that invokes one step on an external execution engine. |
requireOutputs |
Build a finalizer that only runs when every listed step published an output. |
RUN_MODEL_VERSION |
Current persisted run-record schema version. |
StandardSchemaV1 |
Dependency-free subset of the Standard Schema V1 protocol. |
Step |
Typed pipeline step carrying its stable ID, output, and option types. |
StepCache |
Opt a deterministic ordinary step into caching, with optional overrides of pipeline defaults. |
StepCacheCodec |
Encode a detached snapshot; decode must produce a fresh handler-result value. |
StepCacheContext |
Cache I/O is cancellable and independent of pipeline scheduling. |
StepCacheEntry |
Encoded raw handler result and its creation time; expiration is enforced by core. |
StepCachePolicy |
Use reads and writes, recompute replaces entries, bypass performs no cache work. |
StepCacheStore |
Store timestamped encoded handler results; only undefined means a cache miss. |
StepSkipDecision |
Decision from an optional skip predicate. |
tubeless/cli
| Symbol | Description |
|---|---|
CliBooleanParam |
Declarative configuration for a boolean command parameter. |
CliCheckpointConfig |
Checkpoint persistence settings for resumable commands. |
CliCommand |
Typed command that can parse, validate, execute, or own a CLI entry point. |
CliCommandConfig |
Declarative configuration consumed by defineCommand. |
CliCommandDescriptor |
Immutable, presentation-neutral command contract shared by CLI and UI adapters. |
CliContext |
Runtime services and environment passed to a command. |
CliHelpRequested |
Control-flow error thrown when command help was requested. |
CliNumberParam |
Declarative configuration for a numeric command parameter. |
CliParam |
Any supported declarative command parameter configuration. |
CliParameterDescriptor |
JSON-safe description of one validated command parameter for non-terminal clients. |
CliParams |
Validated values returned from a command’s parameter schema. |
CliParamsSchema |
Named parameter schema accepted by defineCommand. |
CliParamType |
Supported value kinds for declarative command parameters. |
CliParseResult |
Successful values, help text, or validation errors returned by command parsing. |
CliPathParam |
Declarative configuration for a filesystem path command parameter. |
CliStringParam |
Declarative configuration for a string command parameter. |
CliValidationError |
Error thrown when command-line arguments fail schema validation. |
defineCommand |
Create a typed command from a declarative parameter schema and run handler. |
definePipelineCommand |
Turn a pipeline into a CLI; infer domain flags from its Standard JSON Schema input. |
DefinePipelineCommandConfig |
Configuration for a typed pipeline command. |
PipelineCliParseResult |
Parse result returned by commands created with definePipelineCommand. |
PipelineCliValues |
Validated domain parameters plus the built-in pipeline execution controls. |
PipelineCommand |
Typed CLI facade over a pipeline with planning and graph helpers. |
PipelineCommandHookConfig |
Static or lazily constructed lifecycle hooks for a pipeline command. |
PipelineCommandHookContext |
Parsed values and CLI services passed to a pipeline hook factory. |
PipelineReporterConfig |
Rendering and output settings for automatic, plain, or interactive reporting. |
PipelineReporterMode |
Rendering mode selected for pipeline lifecycle reporting. |
ReporterColorMode |
Policy for ANSI color in terminal reporter output. |
ReporterOutput |
Writable terminal-like destination used by the interactive reporter. |
ReporterSymbolMode |
Symbol set used for step lifecycle markers in reporter output. |
ReporterTerminalCapabilities |
Detected or caller-overridden terminal rendering capabilities. |
tubeless/batch
| Symbol | Description |
|---|---|
ConcurrentPartialResult |
Execution outcome returned by runConcurrentPartial, discriminated by ok. |
ConcurrentWorker |
Asynchronous worker invoked for one input item by the concurrency helpers. |
runBatched |
Run fixed-size input batches with bounded concurrency and input-order results. |
runBatchedPartial |
Run fixed-size input batches with bounded concurrency, returning complete or partial results discriminated by ok instead of throwing. |
runConcurrent |
Run individual items with bounded, lazy scheduling and input-order results. |
RunConcurrentOptions |
Scheduling and cancellation settings for bounded concurrent work. |
runConcurrentPartial |
Return complete or partial results, discriminated by ok. |
tubeless/node
| Symbol | Description |
|---|---|
CheckpointStore |
Mutable set of completed item keys backed by an explicit JSON flush. |
createFileStepCache |
Persist timestamped cache entries with atomic replacement in a dedicated directory. |
createWorkerThreadAdapter |
Run an explicit module export in a lazily created, reusable Node worker pool. |
definePaths |
Create a factory that resolves a named set of workspace-relative paths. |
openCheckpoint |
Open a JSON checkpoint file, falling back to an empty store when it is absent. |
readJson |
Read and parse trusted JSON without runtime schema validation. |
requireEnv |
Read a required non-empty environment variable or throw a contextual error. |
resetDir |
Remove and recreate a directory for generated output. |
v8StepCacheCodec |
Node’s structured serialization, including undefined, Maps, Dates, and BigInts. |
withCheckpointedBatch |
Runs persist(), and only once it resolves without throwing, records every item in batch into checkpoint and flushes it. |
WorkerThreadAdapter |
Invoke cloneable payloads through a reusable pool of Node worker threads. |
WorkerThreadAdapterOptions |
Configure the module export and worker-pool limits for a thread adapter. |
WorkerThreadContext |
Provide cancellation, logging, progress, and run metadata to a worker export. |
writeJson |
Serialize JSON and atomically replace the destination file. |
tubeless/rate-limit
| Symbol | Description |
|---|---|
RateLimiter |
Serialize reservations at a fixed minimum interval with cancellation support. |
tubeless/retry
| Symbol | Description |
|---|---|
DEFAULT_BASE_DELAY_MS |
Default RetryOptions.baseDelayMs when omitted. |
DEFAULT_MAX_ATTEMPTS |
Default RetryOptions.maxAttempts when omitted. |
RetryAttemptContext |
Metadata supplied to each retry operation attempt. |
RetryOperation |
Operation invoked once per retry attempt until it succeeds or the policy stops. |
RetryOptions |
Backoff, cancellation, and retry policy settings for withRetry. |
withRetry |
Retry an asynchronous operation with exponential backoff and optional jitter. |
tubeless/project
| Symbol | Description |
|---|---|
CompiledPipelineDocument |
Immutable compiled pipelines and descriptive metadata from a parsed document. |
compilePipelineDocument |
Compile parsed YAML or JSON into ordinary pipelines. |
defineProject |
Register each pipeline once, directly or through its explicit command. |
PipelineDocumentError |
A document shape or reference error; graph errors remain PipelineDefinitionError. |
PipelineDocumentMetadata |
Optional human-facing document information, never execution policy. |
PipelineProject |
Immutable named pipeline collection, preserving each pipeline’s exact type by id. |
ProjectOptions |
Optional project presentation and execution directory. |
ProjectRegistry |
Only explicitly registered functions and schemas can be referenced by a document. |
tubeless/testing
| Symbol | Description |
|---|---|
createPipelineTestRuntime |
Create a deterministic runtime without installing a test framework or fake-timer package. |
overrideStep |
Supply a resolved handler output, before the step’s outputSchema validation/transformation. |
PipelineTestClock |
Monotonic caller-controlled clock used by a pipeline test runtime. |
PipelineTestLogEntry |
One silent logger call captured by a pipeline test runtime. |
PipelineTestLogLevel |
Log levels captured by a pipeline test runtime. |
PipelineTestOverride |
A typed step/value pair created by overrideStep; only accepted by test runs. |
PipelineTestRunControls |
Test-only controls. |
PipelineTestRuntime |
Framework-neutral runtime, observations, and typed execution helpers for pipeline tests. |
PipelineTestRuntimeOptions |
Clock, directory, and sleep overrides for a pipeline test runtime. |
PipelineTestSleep |
Optional replacement for the default immediate, clock-advancing test sleep. |
tubeless/tracing
| Symbol | Description |
|---|---|
composeTraceExporters |
Fan one trace stream out to multiple exporters. |
PipelineTraceEvent |
A versioned lifecycle record with an event-specific, structured payload. |
PipelineTraceExporter |
Asynchronous boundary for trace destinations. |
tubeless/agent/openai
| Symbol | Description |
|---|---|
openaiModel |
Create a dependency-free OpenAI Responses model with native history and automatic compaction. |
OpenAIModelOptions |
Responses transport settings; credentials are resolved only when a decision executes. |
tubeless/agent/mcp
| Symbol | Description |
|---|---|
connectMcpServers |
Connect MCP servers and expose their tools to an agent, named <server>__<tool>. |
McpHttpOptions |
A remote server reached over Streamable HTTP. |
McpServer |
A Streamable HTTP endpoint (url) or a local stdio command (command). |
McpServers |
Connected servers whose tools are named <server>__<tool>; close them after the agent’s runs. |
McpStdioOptions |
A local server process speaking JSON-RPC over stdin and stdout. |
McpTool |
A tool discovered on an MCP server, called with its validated JSON arguments. |
McpToolResult |
Content and optional structured data returned by an MCP tool call. |
tubeless/agent/anthropic
| Symbol | Description |
|---|---|
anthropicModel |
Create a dependency-free Anthropic Messages model with native history and on-demand compaction. |
AnthropicModelOptions |
Messages API transport settings; credentials are resolved only when a decision executes. |
tubeless/cloudflare
| Symbol | Description |
|---|---|
CloudflareApp |
Worker handler and Durable Object classes that a Worker entry exports. |
CloudflareAppOptions |
Options for createCloudflareApp. |
CloudflareDurableObjectClass |
Durable Object class to export from the Worker entry under its binding’s export name. |
CloudflareWorker |
Worker module handler to use as the Worker entry’s default export. |
createCloudflareApp |
Compose a single-tenant Tubeless deployment for a Worker with two SQLite Durable Objects. |
createR2CacheStore |
Step cache entries in R2. |
createWorkerLoaderCodemodeExecutor |
Run each code-mode script in a fresh Cloudflare Dynamic Worker from a worker_loaders binding. |
jsonCacheCodec |
Lossless JSON codec for Workers, where the default V8 codec is unavailable. |
R2BucketLike |
Structural subset of an R2 bucket binding that the cache store uses. |
R2ObjectLike |
Structural subset of an R2 object body that the cache store reads. |
WorkerLoaderCodemodeOptions |
Options for createWorkerLoaderCodemodeExecutor. |
WorkerLoaderLike |
The worker_loaders binding’s load method, as used by the code-mode executor. |
tubeless/cloudflare/cache
| Symbol | Description |
|---|---|
createR2CacheStore |
Step cache entries in R2. |
jsonCacheCodec |
Lossless JSON codec for Workers, where the default V8 codec is unavailable. |
R2BucketLike |
Structural subset of an R2 bucket binding that the cache store uses. |
R2ObjectLike |
Structural subset of an R2 object body that the cache store reads. |