/// import * as _sinclair_typebox from '@sinclair/typebox'; import { Static } from '@sinclair/typebox'; declare const PLAY_RUNTIME_BACKENDS: { readonly localProcess: "local_process"; readonly daytona: "daytona"; readonly modal: "modal"; }; type PlayRuntimeBackendId = (typeof PLAY_RUNTIME_BACKENDS)[keyof typeof PLAY_RUNTIME_BACKENDS]; /** * The one executable Play artifact contract. Daytona and local-process both * load CommonJS under Node 20. */ declare const PLAY_ARTIFACT_KINDS: { readonly cjsNode20: "cjs_node20"; }; type PlayArtifactKind = (typeof PLAY_ARTIFACT_KINDS)[keyof typeof PLAY_ARTIFACT_KINDS]; type PlayDocflowNodeKind = 'action' | 'decision' | 'dataset' | 'play' | 'conceptual'; type PlayDocflowNode = { id: string; label: string; kind: PlayDocflowNodeKind; /** * No statement in this play runs this box — the author said so with * `class sketch`. See {@link SKETCH_CLASS}. * * Deliberately NOT a `kind`. What a box IS (an action, a decision, a dataset) * and whether code binds it are two different questions, and folding the * second into the first was wrong in a way the tests caught immediately: a * sketched diamond stopped being a decision, so it lost its shape on the * canvas and the branch-label lint stopped checking its arms. Absent rather * than `false` when bound, so the JSON a bound diagram hashes to is byte for * byte what it was before sketches existed. */ sketch?: true; }; /** * Which arm of a conditional a drawn decision edge IS. * * The runtime's own two-valued vocabulary for a `runIf` (ADR 0019): the cell * record says `branch: 'run' | 'else'`, and this is the same token on the * diagram's side of the join. Deliberately NOT the arm's label — a label is the * author's prose ("fit 65 or better", "nicht gefunden") and says nothing about * polarity in any language. */ type PlayDocflowArm = 'run' | 'else'; type PlayDocflowEdge = { from: string; to: string; label?: string; /** * The conditional arm this edge is, when the author recorded it. * * ABSENT — never `null` — when unrecorded, and that is load-bearing rather * than stylistic. `docflow` is whole-object serialized into * `playStaticPipelineContractHash` (`src/lib/plays/artifact-storage.ts`), * which is part of the immutable artifact storage key, and the canonicalizer * there drops `undefined` but HASHES `null`. Emitting `arm: null` on an * unannotated edge would change the contract hash of every diagrammed play * ever published and force a republish. Omission is what keeps this additive. */ arm?: PlayDocflowArm; }; /** * A Mermaid `subgraph … end` region. When an edge connects it to a dataset * node, it models that dataset's per-row loop; its members represent the * per-row column work. See `docs/play-syntax-spec.md`. `memberIds` records the * innermost subgraph for nested regions. */ type PlayDocflowSubgraph = { id: string; label: string; memberIds: string[]; }; type PlayDocflowBinding = { nodeId: string; line: number; label?: string; kind?: PlayDocflowNodeKind; /** Symbolic values read by this business node. Never an arbitrary JS expression. */ inputs?: string[]; /** Symbolic values produced or changed by this business node. */ outputs?: string[]; /** Whether the contract was authored, safely inferred, or still needs help. */ ioConfidence?: 'explicit' | 'inferred' | 'ambiguous'; /** * `arm:"run"` / `arm:"else"` — this node is that arm of the decision above it. * * Recorded on the annotation because the annotation is the only place the two * halves of the join meet: a `@mermaid-node` binds a DIAGRAM id to the SOURCE * statement directly beneath it, so the author writing it is the one person * who knows both which drawn arm this is and which side of the `runIf` the * code under it implements. Projected onto the incoming decision edge by * {@link attachBindingsToBlocks}; the edge is what readers resolve against. */ arm?: PlayDocflowArm; }; type PlayDocflow = { direction: 'LR' | 'RL' | 'TB' | 'TD' | 'BT'; nodes: PlayDocflowNode[]; edges: PlayDocflowEdge[]; bindings: PlayDocflowBinding[]; /** Authoring syntax used by the source file. */ syntax?: 'mermaid'; /** Normalized Mermaid text, ready to pass directly to a Mermaid renderer. */ mermaidSource?: string; /** * Mermaid `subgraph` loop regions. Optional for persisted graphs that have * no authored regions. */ subgraphs?: PlayDocflowSubgraph[]; /** Mermaid directives accepted by the parser but not applied by React Flow. */ ignoredDirectives?: string[]; }; /** * A top-level key the play's function literally `return`s. Derived from the * `return { ... }` object literal — NOT from dataset `.withColumn(...)` names — * so the "Returns" graph node mirrors the function's real output shape. * `isDataset` is true when the key's value is a `PlayDataset` handle (a table). */ interface PlayStaticReturnField { name: string; isDataset: boolean; /** * For a dataset-valued field, the `ctx.dataset(KEY, ...)` key backing it * (e.g. `job_change_checks`) — so the UI can label the return by the dataset * it actually produces instead of the bland object key (`rows`). Undefined * for non-dataset fields, `ctx.csv(...)` (no durable name), or when the key * isn't a static string literal. */ datasetName?: string; } interface PlayStaticPipeline { /** Authored business flow. Static analysis is used only when this is absent. */ docflow?: PlayDocflow; tableNamespace?: string; inputFields?: string[]; rowKeyFields?: string[]; csvArg?: string; hasInlineData?: boolean; csvDescription?: string; datasetDescription?: string; fields: string[]; /** * Top-level keys of the play's `return { ... }` object literal, in source * order. Undefined when the terminal return isn't a statically-known object * literal (bare value, dataset handle, conditional returns, etc.). */ returnFields?: PlayStaticReturnField[]; stages?: PlayStaticSubstep[]; substeps: PlayStaticSubstep[]; sheetContract?: PlaySheetContract | null; sheetContractErrors?: string[]; } type PlaySheetColumnSource = 'input' | 'datasetColumn' | 'waterfallStep' | 'childPlayColumn'; interface PlaySheetColumnContract { id: string; sqlName: string; source: PlaySheetColumnSource; field?: string; parentField?: string; playId?: string; waterfallId?: string; outputField?: string; outputSqlName?: string; stepId?: string; toolId?: string; isRowKey?: boolean; } interface PlaySheetContract { tableNamespace: string; columns: PlaySheetColumnContract[]; } type PlayStaticColumnProducerKind = 'tool' | 'waterfall' | 'stepProgram' | 'playCall' | 'controlFlow' | 'transform'; interface PlayStaticColumnProducer { id: string; kind: PlayStaticColumnProducerKind; field: string; toolId?: string; playId?: string; conditional?: boolean; sourceRange?: PlayStaticSourceRange; steps?: PlayStaticColumnProducer[]; substep: PlayStaticSubstep; } interface PlayStaticDatasetColumn { id: string; source: PlaySheetColumnSource; sqlName?: string; producers: PlayStaticColumnProducer[]; } interface PlayStaticSourceRange { sourcePath?: string; startLine: number; endLine: number; startColumn: number; endColumn: number; } type PlayStaticSubstepMetadata = { conditional?: boolean; disabled?: boolean; }; /** * One arm of a conditional `control_flow` substep — an `if`/`else if`/`else` * leg, a `switch` case, or a ternary branch. Carries its own steps so the graph * can render the conditional as a real fork instead of a flat strip. */ type PlayStaticControlFlowBranch = { /** Short arm label, e.g. `if`, `else if`, `else`, `case 'x'`, `default`. */ label: string; /** The arm's condition source text, when it has one (omitted for `else`). */ condition?: string; /** Static work in this arm. Empty for log/throw/return-only arms. */ steps: PlayStaticSubstep[]; }; type PlayStaticSubstep = PlayStaticSubstepMetadata & ({ type: 'csv'; field: string; path?: string; description?: string; sourceRange?: PlayStaticSourceRange; callDepth?: number; callPath?: string[]; } | { type: 'dataset'; field: string; name?: string; tableNamespace?: string; inputFields?: string[]; rowKeyFields?: string[]; outputFields?: string[]; columns?: PlayStaticDatasetColumn[]; waterfallIds?: string[]; steps?: PlayStaticSubstep[]; sheetContract?: PlaySheetContract | null; /** * Columns the author declared as deliberately absent from the `@mermaid` * diagram via `.run({ undrawnColumns: [...] })`. The docflow column * coverage gate reads this; nothing about execution does. */ undrawnColumns?: string[]; description?: string; sourceRange?: PlayStaticSourceRange; callDepth?: number; callPath?: string[]; } | { type: 'tool'; toolId: string; field: string; paramsSource?: string; sourceText?: string; description?: string; inLoop?: boolean; isEventWait?: boolean; sourceRange?: PlayStaticSourceRange; callDepth?: number; callPath?: string[]; } | { type: 'waterfall'; tool?: string; field: string; inLoop?: boolean; id?: string; output?: string; minResults?: number; sourceText?: string; steps?: Array<{ id: string; kind?: 'tool' | 'code'; toolId?: string; paramsSource?: string; }>; description?: string; sourceRange?: PlayStaticSourceRange; callDepth?: number; callPath?: string[]; } | { type: 'step_suite'; field: string; steps: PlayStaticSubstep[]; returnSource?: string; description?: string; sourceRange?: PlayStaticSourceRange; callDepth?: number; callPath?: string[]; } | { type: 'play_call'; playId: string; execution?: 'inline' | 'child-workflow'; timeoutMs?: number; hasExplicitTimeout?: boolean; field: string; inLoop?: boolean; pipeline?: PlayStaticPipeline | null; cycleDetected?: boolean; resolutionError?: string; description?: string; sourceRange?: PlayStaticSourceRange; callDepth?: number; callPath?: string[]; } | { type: 'control_flow'; kind: 'conditional' | 'loop'; field: string; /** Flattened steps across every arm, in source order (back-compat). */ steps: PlayStaticSubstep[]; /** Discriminant source text (the `if`/ternary test, `switch` subject). */ condition?: string; /** Per-arm breakdown for conditionals; omitted for loops. */ branches?: PlayStaticControlFlowBranch[]; description?: string; sourceRange?: PlayStaticSourceRange; callDepth?: number; callPath?: string[]; } | { type: 'run_javascript'; alias: string; sourceText?: string; description?: string; sourceRange?: PlayStaticSourceRange; callDepth?: number; callPath?: string[]; } | { type: 'code'; field: string; sourceText?: string; description?: string; sourceRange?: PlayStaticSourceRange; callDepth?: number; callPath?: string[]; }); /** * Previous durable cell value passed to object-column resolvers. * * The runtime supplies this when a row+column is being recomputed after a * previous value existed. `value` has the same type that the column returns; * freshness metadata lives beside it. * * @sdkReference runtime 120 */ type PreviousCell = { /** Previous completed value for this row+column. */ value: Value; /** Millisecond timestamp when the previous value completed. */ completedAt?: number; /** Millisecond timestamp when the previous value becomes stale; `null` means no expiry. */ staleAt?: number | null; /** Resolved numeric TTL in seconds for the previous value, when present. */ staleAfterSeconds?: number; }; type PlaySandboxRuntimeLimits = { timeoutSeconds: number; memoryGiB: number; cpu: number; diskGiB: number; }; type PlaySandboxSize = 'standard'; type PlaySandboxRuntimeDeclaration = { timeout?: string; size?: PlaySandboxSize; }; type EmailStatusVerdict = 'send' | 'send_with_caution' | 'verify_next' | 'hold' | 'drop'; type EmailStatusValue = 'valid' | 'invalid' | 'catch_all' | 'valid_catch_all' | 'unknown' | 'do_not_mail' | 'spamtrap' | 'abuse' | 'disposable'; type EmailDeliverability = 'high' | 'medium' | 'low' | 'unknown'; type EmailMxClass = 'consumer_mailbox' | 'workspace_mailbox' | 'security_gateway' | 'on_prem' | 'unknown'; type EmailStatus = { verdict: EmailStatusVerdict; status: EmailStatusValue; verified: boolean; confidence: number | null; reasons: string[]; signals: { catch_all: boolean | null; deliverability: EmailDeliverability; mx_class: EmailMxClass; mx_provider: string | null; mx_record: string | null; fraud_score: number | null; disposable: boolean | null; role_based: boolean | null; free_email: boolean | null; abuse: boolean | null; spamtrap: boolean | null; suspect: boolean | null; valid: boolean | null; }; provider: { name: string; raw_status: string | boolean | number | null; raw_score: number | null; }; }; type EmailStatusMapEntry = { status: EmailStatusValue; verdict?: EmailStatusVerdict; verified?: boolean; reason?: string; }; type EmailStatusRule = EmailStatusMapEntry & { when: Record; }; type EmailStatusExtractorConfig = { provider: string; rawStatus?: string[]; rawScore?: string[]; valid?: string[]; deliverability?: string[]; catchAll?: string[]; mxProvider?: string[]; mxRecord?: string[]; fraudScore?: string[]; disposable?: string[]; roleBased?: string[]; freeEmail?: string[]; abuse?: string[]; spamtrap?: string[]; suspect?: string[]; statusMap?: Record; rules?: EmailStatusRule[]; }; declare const JOB_CHANGE_STATUS_VALUES: readonly ["moved", "no_change", "left_company", "unknown", "profile_unavailable", "no_new_company"]; type JobChangeStatus = (typeof JOB_CHANGE_STATUS_VALUES)[number]; type JobChangeGetterValue = { status: JobChangeStatus; date: string | null; new_company: string | null; new_title: string | null; }; declare const PHONE_STATUS_VALUES: readonly ["valid", "invalid", "unknown"]; type PhoneStatus = (typeof PHONE_STATUS_VALUES)[number]; declare const DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS: { readonly id: { readonly identity: true; readonly valueKind: "string"; }; readonly name: { readonly identity: true; readonly valueKind: "string"; }; readonly email: { readonly identity: true; readonly valueKind: "string"; }; readonly personal_email: { readonly identity: true; readonly valueKind: "string"; }; readonly phone: { readonly identity: true; readonly valueKind: "string"; }; readonly linkedin: { readonly identity: true; readonly valueKind: "string"; }; readonly linkedin_url: { readonly identity: true; readonly valueKind: "string"; }; readonly domain: { readonly identity: true; readonly valueKind: "string"; }; readonly website: { readonly identity: true; readonly valueKind: "string"; }; readonly first_name: { readonly identity: true; readonly valueKind: "string"; }; readonly last_name: { readonly identity: true; readonly valueKind: "string"; }; readonly full_name: { readonly identity: true; readonly valueKind: "string"; }; readonly company: { readonly identity: true; readonly valueKind: "string"; }; readonly company_name: { readonly identity: true; readonly valueKind: "string"; }; readonly organization_name: { readonly identity: true; readonly valueKind: "string"; }; readonly company_domain: { readonly identity: true; readonly valueKind: "string"; }; readonly company_website: { readonly identity: true; readonly valueKind: "string"; }; readonly company_linkedin_url: { readonly identity: true; readonly valueKind: "string"; }; readonly title: { readonly identity: false; readonly valueKind: "string"; }; readonly industry: { readonly identity: false; readonly valueKind: "string"; }; readonly status: { readonly identity: false; readonly valueKind: "string"; }; readonly job_change: { readonly identity: false; readonly valueKind: "job_change"; }; readonly job_change_status: { readonly identity: false; readonly valueKind: "job_change_status"; readonly enum: readonly ["moved", "no_change", "left_company", "unknown", "profile_unavailable", "no_new_company"]; }; readonly email_status: { readonly identity: false; readonly valueKind: "email_status"; }; readonly phone_status: { readonly identity: false; readonly valueKind: "phone_status"; readonly enum: readonly ["valid", "invalid", "unknown"]; }; }; type DeeplineExtractorTarget = keyof typeof DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS; declare const DEEPLINE_EXTRACTOR_TARGETS: DeeplineExtractorTarget[]; type DeeplineEmailStatusGetterValue = EmailStatus; type DeeplineGetterValueMap = { id: string; name: string; email: string; personal_email: string; phone: string; linkedin: string; linkedin_url: string; domain: string; website: string; first_name: string; last_name: string; full_name: string; company: string; company_name: string; organization_name: string; company_domain: string; company_website: string; company_linkedin_url: string; title: string; industry: string; status: string; job_change: JobChangeGetterValue; job_change_status: JobChangeStatus; email_status: EmailStatus; phone_status: PhoneStatus; }; type DeeplineGetterValue = DeeplineGetterValueMap[TTarget]; declare function isDeeplineExtractorTarget(value: string): value is DeeplineExtractorTarget; interface PlayR2FileRef { storageKind: 'r2'; storageKey: string; logicalPath: string; fileName: string; contentHash: string; contentType: string; bytes: number; } type PlayExecutionFileRef = PlayR2FileRef; declare const PLAY_DATASET_BRAND: unique symbol; type PlayDatasetKind = 'csv' | 'map'; type PlayDatasetBacking = { storage: 'neon_sheet'; sheet: { playName: string; tableNamespace: string; }; } | { storage: 'r2_file'; file: PlayExecutionFileRef; }; type PlayDatasetWorkProgressSummary = { total: number; executed: number; reused: number; skipped: number; pending: number; failed: number; degraded?: boolean; duplicates?: { exact?: number; semantic?: number; rejected?: number; }; }; type PlayDatasetInput = ReadonlyArray | Iterable | AsyncIterable | PlayDataset; type PlayDatasetRow = TInput extends PlayDataset ? Row : TInput extends ReadonlyArray ? Row : TInput extends Iterable ? Row : TInput extends AsyncIterable ? Row : never; type PlayDatasetTransformOptions = { key?: string; sourceLabel?: string | null; }; /** * Durable handle for rows produced by `ctx.csv(...)` or `ctx.dataset(...).run()`. * * A `PlayDataset` is not a normal in-memory array. It points at runtime-managed * rows, usually backed by persisted sheet storage, and carries metadata such as * dataset kind, dataset id, table namespace, count, and preview rows. * * Pass dataset handles directly into later `ctx.dataset(...)` stages by default so * Deepline keeps row progress, retries, memory use, and table output under * runtime control. Use `count()` and `peek()` for bounded inspection. Use * `materialize(limit)` or async iteration only when the dataset is intentionally * small and bounded. `PlayDataset` intentionally does not expose `.rows`, * `.toArray()`, `.length`, numeric indexing, spread, or synchronous iteration; * those hide the runtime cost of loading persisted rows into memory or make * behavior depend on whether rows happen to be resident. * * @sdkReference runtime 190 */ interface PlayDataset extends AsyncIterable { readonly [PLAY_DATASET_BRAND]: true; /** Dataset kind. */ readonly datasetKind: PlayDatasetKind; /** Dataset id. */ readonly datasetId: string; /** Backing store info. */ readonly backing?: PlayDatasetBacking; /** Display label. */ readonly sourceLabel?: string | null; /** Runtime table name. */ readonly tableNamespace?: string | null; /** Row count. */ count(): Promise; /** Preview rows. */ peek(limit?: number): Promise; /** First row, loading it asynchronously when necessary. */ first(): Promise; /** Row at an array-style index, loading it asynchronously when necessary. */ at(index: number): Promise; map(mapper: (row: T, index: number) => U | Promise, options?: PlayDatasetTransformOptions): PlayDataset; filter(predicate: (row: T, index: number) => boolean | Promise, options?: PlayDatasetTransformOptions): PlayDataset; slice(start?: number, end?: number, options?: PlayDatasetTransformOptions): PlayDataset; take(limit: number, options?: PlayDatasetTransformOptions): PlayDataset; /** * Explicit escape hatch for bounded result sets. * Large datasets should flow by handle through Neon-backed storage, not * through worker memory as giant arrays. */ materialize(options?: number | PlayDatasetMaterializeOptions): Promise; toJSON(): { kind: 'dataset'; datasetKind: PlayDatasetKind; datasetId: string; count: number; backing?: PlayDatasetBacking; sourceLabel?: string | null; tableNamespace?: string | null; columns?: string[]; _metadata?: { workProgress?: PlayDatasetWorkProgressSummary; }; preview: T[]; }; } type PlayDatasetMaterializeScope = 'result' | 'full_persisted_dataset'; type PlayDatasetMaterializeOptions = { /** Rows returned by this operation, or every current row in its persisted dataset. */ scope?: PlayDatasetMaterializeScope; /** Maximum number of rows to load into memory. */ limit?: number; }; type ToolResultExecutionMetadata = { idempotent: true; cached: boolean; source: 'live' | 'checkpoint' | 'cache' | 'in_flight'; cacheKey?: string; receiptRole?: 'owner' | 'follower'; receiptKey?: string; attachedToReceiptKey?: string; }; type ToolResultTargetMetadata = { value: unknown; path: string; }; type ToolResultListMetadata = { path: string; count: number | null; keys: Record; }; type ToolResultExtractorDescriptor = { paths: readonly string[]; transforms?: readonly string[]; enum?: readonly string[]; overrides?: readonly ToolResultExtractorOverride[]; emailStatus?: EmailStatusExtractorConfig; }; type ToolResultExtractorOverride = { paths: readonly string[]; equals?: string | number | boolean | null; value: string | number | boolean | null; }; type ToolResultTargetAccessor = ToolResultTargetMetadata & { get(): T | null; }; type ToolResultListAccessor, TKey extends string = string> = Omit & { keys: Partial> & Record; get(): PlayDataset; }; type ToolResponseEnvelope> = { raw: TData; /** Complete parsed and scrubbed provider response, materialized from raw-v2. */ rawV2?: unknown; /** Durable descriptor for deriving the legacy raw view from `rawV2`. */ view?: 'data' | 'rawV2'; meta?: TMeta; }; type ToolExecuteResultBase> = { status: string; job_id?: string; /** Deepline-owned execution/result metadata. */ meta?: Record; toolResponse: ToolResponseEnvelope; extractedValues: Record; extractedLists: Record; /** Convenience alias for play code. Serialized output uses toolResponse. */ toolOutput: ToolResponseEnvelope; _metadata: { toolId: string; execution: ToolResultExecutionMetadata; targets: Record; extractors?: Record; lists: Record; }>; /** Original declarations preserve semantic accessor names across replay. */ listExtractorPaths?: readonly string[]; }; }; type ToolExecuteResultAccessors = Partial, TLists extends Record> = Record>> = { extractedValues: { [K in keyof TExtracted]: ToolResultTargetAccessor; }; extractedLists: { [K in keyof TLists]: ToolResultListAccessor; }; }; /** * Canonical result returned by Deepline tool execution. * * The top-level object is Deepline-owned execution metadata and semantic * extraction state. The canonical provider response lives under * `toolResponse.rawV2`; `toolResponse.raw` remains the legacy compatibility * projection. Response metadata lives under `toolResponse.meta`. Semantic single-value * getters live under `extractedValues..get()`, and list getters live * under `extractedLists..get()`. * * Use extractors first when a tool contract exposes them. Use list getters for * row-shaped data. Drop to `toolResponse.raw` only for provider-specific scalar * fields or bounded debugging context; persisted rows may clip declared lists to * previews. * * @sdkReference runtime 200 */ type ToolExecuteResult, TExtracted extends Record = Partial, TLists extends Record> = Record>> = ToolExecuteResultBase & ToolExecuteResultAccessors; declare const TOOL_EXECUTION_ERROR_SCHEMA_VERSION: 1; declare const SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS: readonly [0, 1]; type ToolExecutionErrorSchemaVersion = (typeof SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS)[number]; /** * The boundary responsible for a failed tool call. * * Use `provider` to distinguish a provider answer from caller input and * Deepline infrastructure. `unknown` fails closed and must not trigger a * waterfall fallback. * * @sdkReference errors 020 */ type ToolExecutionErrorOrigin = 'caller' | 'provider' | 'deepline' | 'unknown'; /** * The stable reason family for a failed tool call. * * Branch on this field only after narrowing to `ToolExecutionError`. Catch * `ProviderTransientError` when the policy is simply “try the next read * provider”; it is the safer and shorter waterfall contract. * * @sdkReference errors 030 */ type ToolExecutionErrorCategory = 'validation' | 'authentication' | 'authorization' | 'rate_limit' | 'network' | 'upstream' | 'billing' | 'conflict' | 'internal' | 'unknown'; /** * The transport failure observed when `category` is `network`. * * This is `null` for failures that are not network failures. * * @sdkReference errors 040 */ type ToolExecutionNetworkKind = 'timeout' | 'dns' | 'connect' | 'reset' | 'unavailable' | 'unknown'; /** * The request boundary on which a network failure occurred. * * `deepline_to_provider` is provider-side. Client and runtime scopes are * Deepline transport failures and never qualify as provider fallthrough. * * @sdkReference errors 050 */ type ToolExecutionNetworkScope = 'client_to_deepline' | 'runtime_to_deepline' | 'deepline_to_provider'; /** * Portable version-1 `tool_error` payload. * * This allowlisted shape crosses the API, runtime, and SDK boundaries. * `message` remains on the Error object and is deliberately not a policy * field. * * @sdkReference errors 064 */ type ToolExecutionFailureV1 = { /** Payload version. */ schemaVersion: typeof TOOL_EXECUTION_ERROR_SCHEMA_VERSION; /** Public tool id passed to `tools.execute`. */ toolId: string; /** Provider responsible for the operation, or `null`. */ provider: string | null; /** Provider operation name, or `null`. */ operation: string | null; /** Stable machine-readable failure code, or `null`. */ code: string | null; /** Boundary responsible for the failure. */ origin: ToolExecutionErrorOrigin; /** Stable reason family. */ category: ToolExecutionErrorCategory; /** Whether repeating the same semantic call is delivery-safe. */ retryable: boolean; /** HTTP status when one exists, or `null`. */ statusCode: number | null; /** Provider or Deepline request id, or `null`. */ requestId: string | null; /** Suggested same-call retry delay in milliseconds, or `null`. */ retryAfterMs: number | null; /** Network failure kind, or `null`. */ networkKind: ToolExecutionNetworkKind | null; /** Network boundary that failed, or `null`. */ networkScope: ToolExecutionNetworkScope | null; }; /** * Constructor input for a structured tool failure. * * Deepline creates these values while decoding the versioned wire payload. * Customer code normally reads `ToolExecutionError` fields instead of * constructing an error. * * @sdkReference errors 065 */ type ToolExecutionErrorOptions = Omit & { /** * Local diagnostic context inherited from DeeplineError. This is not part of * the portable failure payload and is intentionally omitted by serialization. */ details?: Record; }; /** * Provider-owned failure categories that may fall through to another read * provider. * * @sdkReference errors 060 */ type ProviderTransientErrorCategory = 'rate_limit' | 'network' | 'upstream'; /** * Base error class shared by the SDK and play runtime. * * The global brand preserves `instanceof DeeplineError` when a bundled play * and the runtime load separate physical copies of this module. * * @sdkReference errors 010 */ declare class DeeplineError extends Error { /** HTTP status when the failure crossed an HTTP boundary. */ statusCode?: number; /** Stable machine-readable error code when one exists. */ code?: string; /** Local diagnostic context; not a portable error contract. */ details?: Record; /** * Construct a Deepline error. * * SDK and runtime code construct these errors. Application and Play code * normally catches the public subclasses instead. * * @param message Human-readable failure summary. * @param statusCode HTTP status when one exists. * @param code Stable machine-readable code when one exists. * @param details Local diagnostic context; never a portable error contract. */ constructor(message: string, statusCode?: number, code?: string, details?: Record); static [Symbol.hasInstance](value: unknown): boolean; } /** * A failed `tools.execute` call with stable, allowlisted provenance. * * `retryable` means Deepline's delivery/idempotency contract says it is safe * to repeat the same semantic call. It does not describe durable receipt * repairability and does not make arbitrary side-effecting fallbacks safe. * * In a Play, catch `ProviderTransientError` to continue a read waterfall and * let every other `ToolExecutionError` remain loud. In an SDK client, catch * this base class when you need structured diagnostics for every tool failure. * * @sdkReference errors 070 */ declare class ToolExecutionError extends DeeplineError { /** Public tool id passed to `tools.execute`. */ readonly toolId: string; /** Provider responsible for the operation, or `null` when unattributed. */ readonly provider: string | null; /** Provider operation name, or `null` when unavailable. */ readonly operation: string | null; /** Boundary responsible for the failure. */ readonly origin: ToolExecutionErrorOrigin; /** Stable reason family for policy and diagnostics. */ readonly category: ToolExecutionErrorCategory; /** * Whether repeating the same semantic call is delivery-safe. * * This does not mean the error may be ignored. Waterfall fallthrough is * represented by `ProviderTransientError`. */ readonly retryable: boolean; /** Provider or Deepline request id, or `null` when unavailable. */ readonly requestId: string | null; /** Suggested same-call retry delay in milliseconds, or `null`. */ readonly retryAfterMs: number | null; /** Network failure kind, or `null` for non-network failures. */ readonly networkKind: ToolExecutionNetworkKind | null; /** Network boundary that failed, or `null` for non-network failures. */ readonly networkScope: ToolExecutionNetworkScope | null; /** * Construct a structured tool error. * * Deepline constructs this from the versioned `tool_error` payload. * Application and Play code should catch it rather than create it. */ constructor(message: string, options: ToolExecutionErrorOptions); static [Symbol.hasInstance](value: unknown): boolean; } /** * A provider-owned transient failure that is safe to handle as an empty * waterfall leg. Validation, auth, billing, Deepline, and unknown failures * never satisfy this type. * * `retryable` remains independent: it says whether the same semantic call may * be repeated safely. Falling through to a different read provider depends on * this class, not on `retryable`. * * @sdkReference errors 080 */ declare class ProviderTransientError extends ToolExecutionError { /** Provider attribution is guaranteed for this subtype. */ readonly origin: "provider"; /** Provider failure category that made this error eligible for fallthrough. */ readonly category: ProviderTransientErrorCategory; /** Constructed by Deepline when a provider-owned transient failure arrives. */ constructor(message: string, options: Omit & { category: ProviderTransientErrorCategory; }); static [Symbol.hasInstance](value: unknown): boolean; } /** Why a provider cannot serve the current read request. */ type ProviderUnavailableReason = ProviderTransientErrorCategory | 'account_capacity' | 'credentials_missing'; /** * A provider failure that permits a read waterfall to try its next provider. * A missing provider connection is included because another provider may still * serve the read. Invalid credentials, caller input, and Deepline billing * failures remain loud. */ type ProviderUnavailableError = ProviderTransientError | (ToolExecutionError & { readonly origin: 'provider'; readonly code: 'PROVIDER_ACCOUNT_CAPACITY'; }) | (ToolExecutionError & { readonly origin: 'caller'; readonly code: 'INTEGRATION_CREDENTIALS_MISSING'; }); /** * Return the provider-specific reason a read cannot run right now. * * `null` means this error must stay loud: it is caller input, an invalid * customer credential, Deepline billing, or an internal failure. A missing * provider connection is different: an explicit read waterfall may continue * to a configured fallback and record the unavailable leg. */ declare function getProviderUnavailableReason(error: unknown): ProviderUnavailableReason | null; /** * Whether a provider cannot serve this read right now. * * Use this in an explicit `catch` to advance a read-only waterfall. For * diagnostics, use `getProviderUnavailableReason(error)`. */ declare function isProviderUnavailable(error: unknown): error is ProviderUnavailableError; /** @deprecated Use isProviderUnavailable. */ declare const isProviderWaterfallUnavailableError: typeof isProviderUnavailable; declare const SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS: readonly [1, 2, 3, 4]; type PlayAuthoringContractEdition = (typeof SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS)[number]; type PlaySqlListenerOperation = 'INSERT' | 'UPDATE' | 'DELETE'; type PlayStandardWebhookHeaderFamily = 'standard' | 'svix'; type PlayStandardWebhookAuth = { type: 'standard-webhooks'; /** `webhook-*` for Standard Webhooks, `svix-*` for Svix senders. */ headerFamily: PlayStandardWebhookHeaderFamily; /** Deepline Secret names used for ordinary operation and rotation overlap. */ signingSecrets: string[]; /** Replay-protection window. Omitted means the Standard Webhooks 5-minute default. */ toleranceSeconds?: number; }; type PlaySqlListenerFilterScalar = string | number | boolean | null; type PlaySqlListenerFilterOperator = { eq?: PlaySqlListenerFilterScalar; neq?: PlaySqlListenerFilterScalar; in?: PlaySqlListenerFilterScalar[]; notIn?: PlaySqlListenerFilterScalar[]; isNull?: true; isNotNull?: true; ilike?: string; }; type PlaySqlListenerWhere = { before?: Record; after?: Record; }; type PlaySqlListenerDeclaration = { id: string; tool: string; stream: string; operations?: PlaySqlListenerOperation[]; where?: PlaySqlListenerWhere; }; type PlaySqlListenerEvent> = { tool: string; stream: string; operation: PlaySqlListenerOperation; before: T | null; after: T | null; changedAt: string; metadata: { outboxId: string; listenerId: string; table: string; }; }; /** Internal AST Adapter shape. Invalid legacy fields exist only until admission rejects them. */ type PlayAuthoringAstSqlListenerDeclaration = { id: string; tool?: string; stream?: string; where?: unknown; monitor?: string; output?: string; table?: `${string}.${string}` | string; operations: string[]; }; type PlayAuthoringAstBindings = { webhook?: { hmac?: { algorithm?: 'sha256'; header?: string; secretEnv: string; }; auth?: PlayStandardWebhookAuth; }; cron?: { schedule: string; timezone?: string; }; sqlListeners?: PlayAuthoringAstSqlListenerDeclaration[]; invalidSqlListenerSingular?: boolean; invalidSqlListenerShape?: boolean; secrets?: string[]; }; /** The one public type for options accepted by definePlay. */ type PlayAuthoringBindings = { description?: string; compatibility?: { toolErrorSchemaVersion?: ToolExecutionErrorSchemaVersion; /** * Bump only when a Play's response transformation changes serialized tool * output and requires fresh durable tool receipts. */ toolResponseReceiptRevision?: string; }; inline?: boolean; billing?: { maxCreditsPerRun?: number; }; /** * Play-level sandbox settings. The default deadline is 30 minutes; set a * static `timeout` such as `"90m"` or `"2h"` for a bounded batch, up to 4h. * This is distinct from `ctx.tools.execute({ timeoutMs })`, which limits one * provider-call transport rather than the whole Play. */ runtime?: { timeout?: string; size?: 'standard'; }; webhook?: { hmac?: { algorithm?: 'sha256'; header?: string; secretEnv: string; }; auth?: PlayStandardWebhookAuth; }; cron?: { schedule: string; timezone?: string; }; sqlListeners?: PlaySqlListenerDeclaration[]; secrets?: readonly string[]; }; /** The one public type for durable managed-tool calls. */ type PlayToolExecutionRequest = { id: string; tool: string; input: Record; description?: string; force?: boolean; staleAfterSeconds?: DurableCallStaleAfterSeconds; timeoutMs?: PlayRuntimeTimeoutMs; receiptWaitMs?: PlayReceiptWaitMs; }; /** @deprecated Pass a SQL string directly to ctx.customerDb.query. */ type PlaySqlQuery = { readonly kind: 'sql.query'; readonly text: string; readonly values: readonly unknown[]; }; declare const PLAY_SECRET_HANDLE_BRAND: unique symbol; declare const PLAY_SECRET_PROMISE_BRAND: unique symbol; /** * An opaque reference to a workspace secret used by legacy authoring-contract * editions. New Plays receive plaintext strings from `ctx.secrets.get`. * * @sdkReference runtime 176 SecretHandle */ type PlaySecretHandle = { readonly [PLAY_SECRET_HANDLE_BRAND]: never; /** Name of the workspace secret, uppercased. Never its value. */ readonly name: string; /** Renders `[secret:NAME]`, so an interpolated handle leaks nothing. */ toString(): string; /** Always throws. A secret handle is deliberately not serializable. */ toJSON(): never; }; /** A secret-reading promise returned only by `ctx.secrets.get`. */ type PlaySecretPromise = Promise & { readonly [PLAY_SECRET_PROMISE_BRAND]: never; }; /** An opaque legacy secret handle retained for earlier Play artifacts. */ type PlaySecretValue = PlaySecretHandle; /** * One resolved authentication scheme, built by `ctx.secrets.bearer` or `ctx.secrets.header` and attached to a request through `init.auth`. * * @sdkReference runtime 177 SecretAuth */ type PlaySecretAuth = { /** `bearer` sends `Authorization: Bearer `; `header` sends a named header. */ readonly kind: 'bearer' | 'header'; /** The value whose bytes the runtime attaches. */ readonly secret: string | PlaySecretPromise | PlaySecretValue; /** Header name, set only when `kind` is `header`. */ readonly header?: string; }; /** One or more resolved authentication schemes for an outbound request. */ type PlaySecretAuthInput = PlaySecretAuth | readonly PlaySecretAuth[]; /** * The `init` accepted by `ctx.fetch`. Same shape as `RequestInit` plus `auth`. * * @sdkReference runtime 174 SecretAwareRequestInit */ type PlaySecretAwareRequestInit = Omit & { /** Ordinary request headers, recorded in the durable receipt with any resolved Play secret value redacted. Prefer `auth` for credentials: it enforces HTTPS and keeps the auth header out of the receipt. */ headers?: HeadersInit; /** * One or more credentialed headers for this request. Pass a single `ctx.secrets` auth for the common case, or an array when an API requires multiple credentialed headers — for example, Supabase with both `apikey` and `Authorization`. Auth-helper requests require HTTPS and omit the credential from the durable receipt. Each auth entry must target a distinct header. */ auth?: PlaySecretAuthInput; }; type PlayLooseObject = { [key: string]: PlayLooseObject; }; /** The one public return-object constraint for authored Plays. */ type PlayReturnObject = Record & { readonly _metadata?: never; }; /** The one public input-contract carrier for object-form Play definitions. */ type PlayAuthoringInputContract = { readonly schema: Record; readonly __inputType?: TInput; }; /** Shared object-form `definePlay(config)` contract. */ type PlayAuthoringDefineConfig = { id: string; description?: string; input: PlayAuthoringInputContract; run: (ctx: TContext, input: TInput) => Promise; bindings?: PlayAuthoringBindings; billing?: PlayAuthoringBindings['billing']; runtime?: PlayAuthoringBindings['runtime']; compatibility?: PlayAuthoringBindings['compatibility']; }; /** Shared callable-plus-handle shape returned by `definePlay`. */ type PlayAuthoringDefinedPlay = ((ctx: TContext, input: TInput) => Promise) & THandle & { readonly bindings?: PlayAuthoringBindings; readonly runtime?: PlayAuthoringBindings['runtime']; readonly compatibility?: PlayAuthoringBindings['compatibility']; readonly playName: string; }; /** Canonical resolver shape for a customer-authored durable step. */ type PlayAuthoringStepResolver = (row: Row, ctx: TContext, index: number, previousCell?: PreviousCell) => Value | Promise; type PlayAuthoringDatasetColumnRunInput = { /** Current row, including previously computed columns. */ readonly row: Row; /** Runtime context for tool, Play, fetch, and log calls. */ readonly ctx: TContext; /** Zero-based row index for this dataset run. */ readonly index: number; /** Prior stored cell value and freshness metadata when this cell reruns. */ readonly previousCell?: PreviousCell; }; type PlayAuthoringDatasetColumnDefinition = { /** Compute one cell value. Receives the previous stored value when rerunning. */ readonly run: (input: PlayAuthoringDatasetColumnRunInput) => Value | Promise; /** Optional row-level gate. Skipped rows produce `null` for this column. */ readonly runIf?: (row: Row, index: number) => boolean | Promise; }; type PlayAuthoringConditionalStepResolver = { readonly kind: 'conditional'; readonly when: (row: Row, index: number) => boolean | Promise; readonly run: PlayAuthoringStepResolver; readonly elseValue: Else; else(value: ValueElse): PlayAuthoringConditionalStepResolver; }; type PlayAuthoringStepOptions = { /** Optional row-level gate. Skipped rows produce `null` for this column. */ readonly runIf?: (row: Row, index: number) => boolean | Promise; /** Legacy dataset-column flag. Prefer freshness on the reusable call. */ readonly recompute?: boolean; /** Legacy error-recompute flag accepted for older authored Plays. */ readonly recomputeOnError?: boolean; /** Legacy cell staleness metadata accepted for older authored Plays. */ readonly staleAfterSeconds?: number; }; /** Explicitly mark a step program as a provider fallback waterfall. */ type PlayAuthoringStepProgramOptions = { readonly continueOnProviderUnavailable?: boolean; }; type PlayAuthoringStepProgram = { readonly kind: 'steps'; readonly steps: readonly PlayAuthoringStepProgramStep[]; readonly returnResolver?: PlayAuthoringStepResolver; readonly continueOnProviderUnavailable?: boolean; readonly __inputType?: (input: Input) => void; step(name: Name, resolver: PlayAuthoringStepResolver | PlayAuthoringConditionalStepResolver | PlayAuthoringStepProgramResolver): PlayAuthoringStepProgram, TContext, Return>; step(name: Name, resolver: PlayAuthoringStepResolver | PlayAuthoringStepProgramResolver, options: PlayAuthoringStepOptions): PlayAuthoringStepProgram, TContext, Return>; return(resolver: PlayAuthoringStepResolver): PlayAuthoringStepProgram; }; type PlayAuthoringStepProgramResolver = { readonly kind: 'steps'; readonly steps: readonly PlayAuthoringStepProgramStep[]; readonly returnResolver?: PlayAuthoringStepResolver; readonly __inputType?: (input: Input) => void; }; type PlayAuthoringRunnableStepProgram = Pick, 'kind' | 'steps' | 'returnResolver'>; type PlayAuthoringStepProgramStep = { readonly name: string; readonly recompute?: boolean; readonly recomputeOnError?: boolean; readonly staleAfterSeconds?: number; readonly resolver: PlayAuthoringStepResolver, unknown, TContext> | PlayAuthoringConditionalStepResolver, unknown, TContext> | PlayAuthoringStepProgramResolver, unknown, TContext>; }; type PlayAuthoringColumnResolver = PlayAuthoringStepResolver | PlayAuthoringConditionalStepResolver | PlayAuthoringRunnableStepProgram; type PlayAuthoringStepProgramOutput = TProgram extends PlayAuthoringStepProgram ? Output : never; type PlayAuthoringDatasetRowKey = (keyof InputRow & string) | readonly (keyof InputRow & string)[] | ((row: InputRow, index: number) => string | number | readonly unknown[]); type PlayAuthoringDatasetDefinitionOptions = { key?: PlayAuthoringDatasetRowKey; }; type PlayAuthoringDatasetRunOptions = { description?: string; key?: PlayAuthoringDatasetRowKey; onRowError?: 'isolate' | 'fail'; mode?: 'upsert' | 'net_new'; /** * Computed columns this dataset produces that the authored `@mermaid` * diagram deliberately does not draw. A diagrammed Play must account for * every column it computes: draw it inside the dataset's `subgraph` loop * region, or name it here. Nothing else opts a column out. */ undrawnColumns?: readonly string[]; }; type PlayAuthoringDatasetBuilder = { /** Define one output column for every row in this dataset. */ withColumn(name: Name, resolver: PlayAuthoringColumnResolver): PlayAuthoringDatasetBuilder, TContext>; /** Define a nullable output column with object-form authoring and a row gate. */ withColumn(name: Name, definition: PlayAuthoringDatasetColumnDefinition & { readonly runIf: (row: OutputRow, index: number) => boolean | Promise; }): PlayAuthoringDatasetBuilder, TContext>; /** Define an output column with object-form authoring and typed previous-cell access. */ withColumn(name: Name, definition: PlayAuthoringDatasetColumnDefinition): PlayAuthoringDatasetBuilder, TContext>; /** Define a nullable output column with a resolver and row-level options. */ withColumn(name: Name, resolver: PlayAuthoringStepResolver | PlayAuthoringRunnableStepProgram, options: PlayAuthoringStepOptions): PlayAuthoringDatasetBuilder, TContext>; /** Add all columns declared by one reusable step program. */ withColumns>(program: Program): PlayAuthoringDatasetBuilder, TContext>; /** @deprecated Dataset `.step(...)` was replaced by `.withColumn(...)`. */ step(name: Name, resolver: PlayAuthoringColumnResolver): never; /** * Execute the row-column program and return a durable dataset handle. * `upsert` preserves row-by-row enrichment. `net_new` admits and returns only * unseen stable keys. `isolate` records failed rows while siblings continue; * `fail` opts into fail-fast behavior. */ run(options?: PlayAuthoringDatasetRunOptions): Promise>; }; type PlayAuthoringReferenceLike = { readonly playName: string; readonly name?: string; } | { readonly name: string; readonly playName?: string; }; type PlayAuthoringCsvRenameMap = Record; type PlayAuthoringFileInput = string & { readonly __deeplineFileInputMetadata?: TMetadata; }; type PlayAuthoringCsvInput> = PlayAuthoringFileInput<{ readonly kind: 'csv'; readonly row: TRow; }>; type PlayAuthoringColumnMap = Partial, string | readonly string[]>>; type PlayAuthoringCsvOptions = { /** Human-readable description for runtime logs and inspection. */ description?: string; /** Canonical field-to-header aliases. */ columns?: PlayAuthoringCsvRenameMap; /** Header rename map; use `columns` for new code. */ rename?: PlayAuthoringCsvRenameMap; /** Canonical fields required after header normalization. */ required?: readonly string[]; }; type PlayAuthoringCallExecution = 'inline'; type PlayAuthoringCallOptions = { description: string; execution?: PlayAuthoringCallExecution; timeoutMs?: never; }; type PlayAuthoringRuntimeStepOptions = { semanticKey?: string; staleAfterSeconds?: DurableCallStaleAfterSeconds; }; type PlayAuthoringFetchOptions = { staleAfterSeconds?: DurableCallStaleAfterSeconds; }; /** * The value `ctx.fetch(...)` resolves to: a plain durable record, not a WHATWG `Response`. The body is read once at request time so the call can be checkpointed and replayed, so `bodyText` and `json` are already-materialized properties. There is no `.json()`, `.text()`, or `.body` to await — `await res.json()` is a type error, not a typing problem. * * @sdkReference runtime 175 PlayFetchResponse */ type PlayAuthoringFetchResponse = { /** True when the response status is in the 2xx range. */ ok: boolean; /** HTTP status code as returned by the upstream server. */ status: number; /** HTTP status text as returned by the upstream server. */ statusText: string; /** Final response URL after any redirects. */ url: string; /** Response headers, lowercased, with any known secret values redacted. */ headers: Record; /** Full response body as text, with any known secret values redacted. */ bodyText: string; /** * The parsed body, eagerly decoded at request time. Read it as a property — `const body = res.json`, never `await res.json()`. Null when the body is empty AND when it is not valid JSON: a malformed payload is reported as null rather than thrown, so check `res.ok` and fall back to `res.bodyText` before treating null as an empty result. */ json: unknown | null; }; type PlayAuthoringCustomerDbQueryOptions = { maxRows?: number; timeoutMs?: number; }; type PlayAuthoringRunStepsOptions = { description?: string; }; /** * Stable identity of the currently executing Play invocation. * * The id is unchanged while Deepline resumes or retries the same durable run. * A separately submitted run intentionally receives a new id. */ type PlayAuthoringRunScope = { readonly id: string; }; /** The complete customer-authored `ctx` Interface shared by every Adapter. */ interface PlayAuthoringRuntimeContext { /** * Load a staged CSV file as a durable dataset handle. * @sdkReference runtime 040 ctx.csv(path, options) */ csv>(path: string | PlayAuthoringCsvInput, options?: PlayAuthoringCsvOptions): Promise>; /** * Create a persisted row dataset and define durable output columns. * @sdkReference runtime 060 ctx.dataset(key, items) */ dataset>(key: string, items: TSource): PlayAuthoringDatasetBuilder & object, PlayDatasetRow & object, PlayAuthoringRuntimeContext>; /** @deprecated `ctx.map(...)` was replaced by `ctx.dataset(...)`. */ map>(key: string, items: TSource, options?: PlayAuthoringDatasetDefinitionOptions & object>): never; /** * Identity for this durable run. Use this to build a replay-stable external * idempotency key, for example when posting a sequence of batches. */ readonly run: PlayAuthoringRunScope; tools: { /** * Execute a provider tool through the durable receipt contract. * @sdkReference runtime 150 ctx.tools.execute(request) */ execute(request: PlayToolExecutionRequest): Promise>; }; customerDb: { query>(statement: PlaySqlQuery | string, options?: PlayAuthoringCustomerDbQueryOptions): Promise; }; /** Shorthand for one managed tool call. */ tool(key: string, toolId: string, input: Record, options?: { description?: string; }): Promise>; /** * Execute one reusable step program against a scalar input. * @sdkReference runtime 180 ctx.runSteps(program, input, options) */ runSteps, TOutput>(program: PlayAuthoringRunnableStepProgram & { readonly __inputType?: (input: TInput) => void; }, input: TInput, options?: PlayAuthoringRunStepsOptions): Promise; /** * Create one scalar durable checkpoint. * @sdkReference runtime 130 ctx.step(id, fn) */ step(id: string, run: () => T | Promise, options?: PlayAuthoringRuntimeStepOptions): Promise; /** * Execute a durable, replay-safe HTTP request. * @sdkReference runtime 170 ctx.fetch(key, url, init) */ fetch(key: string, url: string | URL, init?: PlaySecretAwareRequestInit, options?: PlayAuthoringFetchOptions): Promise; secrets: { /** * Read an allowed workspace secret inside the running Play; do not log or return it. Declare uppercase names in top-level `secrets`. * * @sdkReference runtime 171 ctx.secrets.get(name) */ get(name: string): PlaySecretPromise; /** * Send a credential as `Authorization: Bearer `. Await `get` first; * its direct promise remains accepted for source compatibility, while other * promises are rejected. * * @sdkReference runtime 172 ctx.secrets.bearer(secret) */ bearer(secret: string | PlaySecretPromise | PlaySecretHandle): PlaySecretAuth; /** * Send a credential as a named header, for APIs that do not use bearer * tokens — `x-api-key`, `apikey`, `private-token`, and similar. * * @sdkReference runtime 173 ctx.secrets.header(header, secret) */ header(header: string, secret: string | PlaySecretPromise | PlaySecretHandle): PlaySecretAuth; }; /** * Compose another Play inline under a stable call key. * @sdkReference runtime 140 ctx.runPlay(key, playRef, input, options) */ runPlay(key: string, playRef: string | PlayAuthoringReferenceLike, input: Record, options: PlayAuthoringCallOptions): Promise; log(message: string): void; sleep(ms: number): Promise; } declare const PLAY_AUTHORING_FIELD_REGISTRY: { readonly description: { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "Enrich a company."; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "description"; }; readonly edition1: "Legacy play."; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_binding_invalid"; readonly description: "Optional non-empty human-readable summary of the Play."; readonly errorMessage: "description must be a non-empty static string."; }; readonly 'compatibility.toolErrorSchemaVersion': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<0>, _sinclair_typebox.TLiteral<1>]>; readonly fixtures: { readonly valid: 1; readonly invalid: 2; readonly absent: undefined; readonly unresolved: { readonly expression: "version"; }; readonly edition1: 0; }; readonly referenceType: "0 | 1"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_binding_invalid"; readonly description: "Artifact-pinned tool error behavior, either 0 or 1."; readonly errorMessage: "compatibility.toolErrorSchemaVersion must be the static literal 0 or 1."; }; readonly 'compatibility.toolResponseReceiptRevision': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "raw-v2-receipt-v1"; readonly invalid: "has spaces"; readonly absent: undefined; readonly unresolved: { readonly expression: "revision"; }; readonly edition1: undefined; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_binding_invalid"; readonly description: "Explicit durable-receipt revision for a response transformation; bump only when serialized tool output changes."; readonly errorMessage: "compatibility.toolResponseReceiptRevision must be a non-empty static identifier using letters, numbers, dots, underscores, or hyphens."; }; readonly inline: { readonly schema: _sinclair_typebox.TBoolean; readonly fixtures: { readonly valid: true; readonly invalid: "true"; readonly absent: undefined; readonly unresolved: { readonly expression: "inline"; }; readonly edition1: false; }; readonly referenceType: "boolean"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_binding_invalid"; readonly description: "Compiler hint for an inline named Play handler."; readonly errorMessage: "inline must be a static boolean."; }; readonly 'billing.maxCreditsPerRun': { readonly schema: _sinclair_typebox.TNumber; readonly fixtures: { readonly valid: 1; readonly invalid: 0; readonly absent: undefined; readonly unresolved: { readonly expression: "cap"; }; readonly edition1: 1; }; readonly referenceType: "number"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_billing_limit_invalid"; readonly description: "Maximum Deepline credits permitted for one Play Run."; readonly errorMessage: "billing.maxCreditsPerRun must be a static number greater than 0. Remove it for no run cap."; }; readonly 'bindings.webhook.hmac.secretEnv': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "WEBHOOK_SECRET"; readonly invalid: "webhook_secret"; readonly absent: undefined; readonly unresolved: { readonly expression: "secretEnv"; }; readonly edition1: "WEBHOOK_SECRET"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "static-required"; readonly issueCode: "play_authoring_webhook_hmac_invalid"; readonly description: "Environment variable containing the webhook HMAC secret."; readonly errorMessage: "bindings.webhook.hmac.secretEnv must be an uppercase environment variable name beginning with a letter."; }; readonly 'bindings.webhook.hmac.algorithm': { readonly schema: _sinclair_typebox.TLiteral<"sha256">; readonly fixtures: { readonly valid: "sha256"; readonly invalid: "sha1"; readonly absent: undefined; readonly unresolved: { readonly expression: "algorithm"; }; readonly edition1: "sha256"; }; readonly referenceType: "'sha256'"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_webhook_hmac_invalid"; readonly description: "Webhook signature hash algorithm. Only sha256 is supported."; readonly errorMessage: "bindings.webhook.hmac.algorithm must be the static literal \"sha256\"."; }; readonly 'bindings.webhook.hmac.header': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "x-signature"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "header"; }; readonly edition1: "x-signature"; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_webhook_hmac_invalid"; readonly description: "HTTP header containing the webhook signature."; readonly errorMessage: "bindings.webhook.hmac.header must be a non-empty static string."; }; readonly 'bindings.webhook.auth.type': { readonly schema: _sinclair_typebox.TLiteral<"standard-webhooks">; readonly fixtures: { readonly valid: "standard-webhooks"; readonly invalid: "svix"; readonly absent: undefined; readonly unresolved: { readonly expression: "type"; }; readonly edition1: undefined; }; readonly referenceType: "'standard-webhooks'"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_standard_webhooks_invalid"; readonly description: "Uses the Standard Webhooks v1 symmetric signing scheme."; readonly errorMessage: "bindings.webhook.auth.type must be the static literal \"standard-webhooks\"."; }; readonly 'bindings.webhook.auth.headerFamily': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"standard">, _sinclair_typebox.TLiteral<"svix">]>; readonly fixtures: { readonly valid: "svix"; readonly invalid: "webhook"; readonly absent: undefined; readonly unresolved: { readonly expression: "headerFamily"; }; readonly edition1: undefined; }; readonly referenceType: "'standard' | 'svix'"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_standard_webhooks_invalid"; readonly description: "Header namespace expected from the webhook provider."; readonly errorMessage: "bindings.webhook.auth.headerFamily must be the static literal \"standard\" or \"svix\"."; }; readonly 'bindings.webhook.auth.signingSecrets[]': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "VECTOR_WEBHOOK_SECRET"; readonly invalid: "vector_webhook_secret"; readonly absent: undefined; readonly unresolved: { readonly expression: "secret"; }; readonly edition1: undefined; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_standard_webhooks_invalid"; readonly description: "Deepline Secret name used to verify Standard Webhooks."; readonly errorMessage: "bindings.webhook.auth.signingSecrets entries must be uppercase Deepline Secret names beginning with a letter."; }; readonly 'bindings.webhook.auth.toleranceSeconds': { readonly schema: _sinclair_typebox.TInteger; readonly fixtures: { readonly valid: 300; readonly invalid: 0; readonly absent: undefined; readonly unresolved: { readonly expression: "toleranceSeconds"; }; readonly edition1: undefined; }; readonly referenceType: "number"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_standard_webhooks_invalid"; readonly description: "Accepted delivery timestamp skew in seconds, from 1 through 3600."; readonly errorMessage: "bindings.webhook.auth.toleranceSeconds must be a static whole number from 1 through 3600."; }; readonly 'bindings.cron.schedule': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "0 9 * * *"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "schedule"; }; readonly edition1: "0 9 * * *"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "static-required"; readonly issueCode: "play_authoring_binding_invalid"; readonly description: "Five-field cron expression."; readonly errorMessage: "bindings.cron.schedule must be a non-empty static string."; }; readonly 'bindings.cron.timezone': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "UTC"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "timezone"; }; readonly edition1: "UTC"; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_cron_timezone_invalid"; readonly description: "IANA timezone. Omitted means UTC."; readonly errorMessage: "bindings.cron.timezone must be a valid non-empty IANA timezone string."; }; readonly 'bindings.sqlListeners': { readonly schema: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{}>>; readonly fixtures: { readonly valid: readonly []; readonly invalid: "listeners"; readonly absent: undefined; readonly unresolved: { readonly expression: "listeners"; }; readonly edition1: readonly []; }; readonly referenceType: "SqlListener[]"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_binding_invalid"; readonly description: "Static provider-monitor listener declarations."; readonly errorMessage: "bindings.sqlListeners must be a static array of objects."; }; readonly 'bindings.sqlListeners[].id': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "job-openings"; readonly invalid: "1-job-openings"; readonly absent: undefined; readonly unresolved: { readonly expression: "listenerId"; }; readonly edition1: "job-openings"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Unique static listener identifier within one Play."; readonly errorMessage: "bindings.sqlListeners[].id must begin with a letter and contain only letters, numbers, underscores, or hyphens."; }; readonly 'bindings.sqlListeners[].tool': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "deepline_native.company_radar"; readonly invalid: "company_radar"; readonly absent: undefined; readonly unresolved: { readonly expression: "toolId"; }; readonly edition1: "deepline_native.company_radar"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Modeled provider monitor tool id in provider.tool form."; readonly errorMessage: "bindings.sqlListeners[].tool must use static provider.tool syntax."; }; readonly 'bindings.sqlListeners[].stream': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "company_job_openings"; readonly invalid: "1-company-job-openings"; readonly absent: undefined; readonly unresolved: { readonly expression: "stream"; }; readonly edition1: "company_job_openings"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Static output stream key exposed by the monitor tool."; readonly errorMessage: "bindings.sqlListeners[].stream must be a static stream identifier."; }; readonly 'bindings.sqlListeners[].operations[]': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"INSERT">, _sinclair_typebox.TLiteral<"UPDATE">, _sinclair_typebox.TLiteral<"DELETE">]>; readonly fixtures: { readonly valid: "INSERT"; readonly invalid: "UPSERT"; readonly absent: undefined; readonly unresolved: { readonly expression: "operation"; }; readonly edition1: "UPDATE"; }; readonly referenceType: "'INSERT' | 'UPDATE' | 'DELETE'"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Database operation that wakes the listener."; readonly errorMessage: "bindings.sqlListeners[].operations entries must be INSERT, UPDATE, or DELETE."; }; readonly 'bindings.sqlListeners[].where.before': { readonly schema: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnknown>; readonly fixtures: { readonly valid: { readonly status: { readonly eq: "open"; }; }; readonly invalid: "status=open"; readonly absent: undefined; readonly unresolved: "beforeFilter"; readonly edition1: { readonly status: { readonly eq: "open"; }; }; }; readonly referenceType: "Record"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Column filters evaluated against the row before mutation."; readonly errorMessage: "bindings.sqlListeners[].where.before must be a static object keyed by column."; }; readonly 'bindings.sqlListeners[].where.after': { readonly schema: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnknown>; readonly fixtures: { readonly valid: { readonly status: { readonly eq: "open"; }; }; readonly invalid: "status=open"; readonly absent: undefined; readonly unresolved: "afterFilter"; readonly edition1: { readonly status: { readonly eq: "open"; }; }; }; readonly referenceType: "Record"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Column filters evaluated against the row after mutation."; readonly errorMessage: "bindings.sqlListeners[].where.after must be a static object keyed by column."; }; readonly 'bindings.sqlListeners[].where.*.*.eq': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean, _sinclair_typebox.TNull]>; readonly fixtures: { readonly valid: "open"; readonly invalid: { readonly nested: true; }; readonly absent: undefined; readonly unresolved: { readonly expression: "equalsValue"; }; readonly edition1: "open"; }; readonly referenceType: "SqlListenerFilterScalar"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Scalar equality condition."; readonly errorMessage: "SQL listener eq must compare a scalar value."; }; readonly 'bindings.sqlListeners[].where.*.*.neq': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean, _sinclair_typebox.TNull]>; readonly fixtures: { readonly valid: "closed"; readonly invalid: { readonly nested: true; }; readonly absent: undefined; readonly unresolved: { readonly expression: "notEqualsValue"; }; readonly edition1: "closed"; }; readonly referenceType: "SqlListenerFilterScalar"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Scalar inequality condition."; readonly errorMessage: "SQL listener neq must compare a scalar value."; }; readonly 'bindings.sqlListeners[].where.*.*.in': { readonly schema: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean, _sinclair_typebox.TNull]>>; readonly fixtures: { readonly valid: readonly ["open", "pending"]; readonly invalid: readonly []; readonly absent: undefined; readonly unresolved: { readonly expression: "acceptedValues"; }; readonly edition1: readonly ["open"]; }; readonly referenceType: "readonly SqlListenerFilterScalar[]"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Non-empty scalar membership condition."; readonly errorMessage: "SQL listener in must contain at least one scalar value."; }; readonly 'bindings.sqlListeners[].where.*.*.notIn': { readonly schema: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean, _sinclair_typebox.TNull]>>; readonly fixtures: { readonly valid: readonly ["closed"]; readonly invalid: readonly []; readonly absent: undefined; readonly unresolved: { readonly expression: "rejectedValues"; }; readonly edition1: readonly ["closed"]; }; readonly referenceType: "readonly SqlListenerFilterScalar[]"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Non-empty scalar exclusion condition."; readonly errorMessage: "SQL listener notIn must contain at least one scalar value."; }; readonly 'bindings.sqlListeners[].where.*.*.isNull': { readonly schema: _sinclair_typebox.TLiteral; readonly fixtures: { readonly valid: true; readonly invalid: false; readonly absent: undefined; readonly unresolved: { readonly expression: "isNull"; }; readonly edition1: true; }; readonly referenceType: "true"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Matches null values when set to true."; readonly errorMessage: "SQL listener isNull must be the static literal true."; }; readonly 'bindings.sqlListeners[].where.*.*.isNotNull': { readonly schema: _sinclair_typebox.TLiteral; readonly fixtures: { readonly valid: true; readonly invalid: false; readonly absent: undefined; readonly unresolved: { readonly expression: "isNotNull"; }; readonly edition1: true; }; readonly referenceType: "true"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Matches non-null values when set to true."; readonly errorMessage: "SQL listener isNotNull must be the static literal true."; }; readonly 'bindings.sqlListeners[].where.*.*.ilike': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "%software%"; readonly invalid: 1; readonly absent: undefined; readonly unresolved: { readonly expression: "pattern"; }; readonly edition1: "%software%"; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "sql_listener_binding_shape"; readonly description: "Case-insensitive SQL pattern condition."; readonly errorMessage: "SQL listener ilike must be a string pattern."; }; readonly 'bindings.secrets[]': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "API_TOKEN"; readonly invalid: "api_token"; readonly absent: undefined; readonly unresolved: { readonly expression: "secret"; }; readonly edition1: "API_TOKEN"; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_secret_invalid"; readonly description: "Environment variable made available to the Play."; readonly errorMessage: "bindings.secrets entries must be uppercase environment variable names beginning with a letter."; }; readonly 'ctx.tools.execute.staleAfterSeconds': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TNull, _sinclair_typebox.TInteger]>; readonly fixtures: { readonly valid: 0; readonly invalid: -1; readonly absent: undefined; readonly unresolved: { readonly expression: "ttl"; }; readonly edition1: null; }; readonly referenceType: "number | null"; readonly required: false; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_durable_policy_invalid"; readonly description: "`0` always executes; `null`/omitted never expires; a positive integer is a TTL in seconds."; readonly errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."; }; readonly 'ctx.tools.execute.id': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "company-enrichment"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "receiptId"; }; readonly edition1: "company-enrichment"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "Stable durable receipt identity within one execution scope."; readonly errorMessage: "ctx.tools.execute id must be a non-empty string."; }; readonly 'ctx.tools.execute.tool': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "openmart_enrich_company"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "toolId"; }; readonly edition1: "openmart_enrich_company"; }; readonly referenceType: "K"; readonly required: true; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "Integration tool id resolved against the generated ToolMap."; readonly errorMessage: "ctx.tools.execute tool must be a non-empty tool id."; }; readonly 'ctx.tools.execute.input': { readonly schema: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnknown>; readonly fixtures: { readonly valid: { readonly domain: "example.com"; }; readonly invalid: "example.com"; readonly absent: undefined; readonly unresolved: "toolInput"; readonly edition1: {}; }; readonly referenceType: "K extends keyof ToolMap ? ToolMap[K]['input'] : Record"; readonly required: true; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "Tool-specific input object."; readonly errorMessage: "ctx.tools.execute input must be an object."; }; readonly 'ctx.tools.execute.description': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "Enrich the company."; readonly invalid: 1; readonly absent: undefined; readonly unresolved: { readonly expression: "description"; }; readonly edition1: "Enrich the company."; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "Human-readable purpose of the durable tool call."; readonly errorMessage: "ctx.tools.execute description must be a string."; }; readonly 'ctx.tools.execute.force': { readonly schema: _sinclair_typebox.TBoolean; readonly fixtures: { readonly valid: true; readonly invalid: "true"; readonly absent: undefined; readonly unresolved: { readonly expression: "force"; }; readonly edition1: false; }; readonly referenceType: "boolean"; readonly required: false; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "Explicitly bypasses a completed durable tool receipt."; readonly errorMessage: "ctx.tools.execute force must be a boolean."; }; readonly 'ctx.tools.execute.timeoutMs': { readonly schema: _sinclair_typebox.TInteger; readonly fixtures: { readonly valid: 1; readonly invalid: 0; readonly absent: undefined; readonly unresolved: { readonly expression: "timeout"; }; readonly edition1: 1; }; readonly referenceType: "number"; readonly required: false; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_durable_policy_invalid"; readonly description: "Positive whole-number runtime transport timeout in milliseconds."; readonly errorMessage: "timeoutMs must be a positive whole number of milliseconds."; }; readonly 'ctx.tools.execute.receiptWaitMs': { readonly schema: _sinclair_typebox.TInteger; readonly fixtures: { readonly valid: 1; readonly invalid: 0; readonly absent: undefined; readonly unresolved: { readonly expression: "receiptWait"; }; readonly edition1: 1; }; readonly referenceType: "number"; readonly required: false; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_durable_policy_invalid"; readonly description: "Positive whole-number durable receipt wait budget in milliseconds."; readonly errorMessage: "receiptWaitMs must be a positive whole number of milliseconds."; }; readonly 'ctx.csv.options.description': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "Load account rows."; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "description"; }; readonly edition1: "Load rows."; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "static-when-present"; readonly issueCode: "play_authoring_csv_option_invalid"; readonly description: "Non-empty description for a staged CSV load."; readonly errorMessage: "ctx.csv options.description must be non-empty."; }; readonly 'ctx.csv.options.columns': { readonly schema: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TArray<_sinclair_typebox.TString>]>>; readonly fixtures: { readonly valid: { readonly domain: readonly ["domain", "Company Domain"]; }; readonly invalid: { readonly domain: readonly []; }; readonly absent: undefined; readonly unresolved: { readonly expression: { readonly dynamic: true; }; }; readonly edition1: { readonly domain: "domain"; }; }; readonly referenceType: "CsvRenameMap"; readonly required: false; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_csv_option_invalid"; readonly description: "Canonical field-to-header aliases for a staged CSV."; readonly errorMessage: "ctx.csv options.columns values must be a non-empty header or alias list."; }; readonly 'ctx.csv.options.rename': { readonly schema: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TArray<_sinclair_typebox.TString>]>>; readonly fixtures: { readonly valid: { readonly domain: "Company Domain"; }; readonly invalid: { readonly domain: ""; }; readonly absent: undefined; readonly unresolved: { readonly expression: { readonly dynamic: true; }; }; readonly edition1: { readonly domain: "domain"; }; }; readonly referenceType: "CsvRenameMap"; readonly required: false; readonly resolution: "static-when-present"; readonly issueCode: "play_authoring_csv_option_invalid"; readonly description: "Legacy header rename aliases for a staged CSV."; readonly errorMessage: "ctx.csv options.rename values must be a non-empty header or alias list."; }; readonly 'ctx.csv.options.required': { readonly schema: _sinclair_typebox.TArray<_sinclair_typebox.TString>; readonly fixtures: { readonly valid: readonly ["domain"]; readonly invalid: readonly [""]; readonly absent: undefined; readonly unresolved: { readonly expression: "requiredColumns"; }; readonly edition1: readonly []; }; readonly referenceType: "readonly string[]"; readonly required: false; readonly resolution: "static-when-present"; readonly issueCode: "play_authoring_csv_option_invalid"; readonly description: "Canonical columns required after CSV normalization."; readonly errorMessage: "ctx.csv options.required entries must be non-empty column names."; }; readonly 'ctx.dataset.key': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "accounts"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "datasetKey"; }; readonly edition1: "rows"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "static-required"; readonly issueCode: "play_authoring_dataset_option_invalid"; readonly description: "Stable durable identity for one dataset."; readonly errorMessage: "ctx.dataset key must be a non-empty static string."; }; readonly 'ctx.dataset.run.description': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "Enrich account rows."; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "description"; }; readonly edition1: "Process rows."; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "static-when-present"; readonly issueCode: "play_authoring_dataset_option_invalid"; readonly description: "Non-empty description for one dataset execution."; readonly errorMessage: "ctx.dataset run description must be non-empty."; }; readonly 'ctx.dataset.run.key': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TArray<_sinclair_typebox.TString>, _sinclair_typebox.TFunction<[_sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnknown>, _sinclair_typebox.TInteger], _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TReadonly<_sinclair_typebox.TArray<_sinclair_typebox.TUnknown>>]>>]>; readonly fixtures: { readonly valid: (row: Record) => string; readonly invalid: readonly []; readonly absent: undefined; readonly unresolved: { readonly expression: "rowKey"; }; readonly edition1: readonly ["domain"]; }; readonly referenceType: "DatasetRowKey"; readonly required: false; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_dataset_option_invalid"; readonly description: "Stable field or fields used for durable row identity."; readonly errorMessage: "ctx.dataset run key must be a non-empty field, field list, or key function."; }; readonly 'ctx.dataset.run.onRowError': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"isolate">, _sinclair_typebox.TLiteral<"fail">]>; readonly fixtures: { readonly valid: "isolate"; readonly invalid: "continue"; readonly absent: undefined; readonly unresolved: { readonly expression: "rowErrorPolicy"; }; readonly edition1: "fail"; }; readonly referenceType: "'isolate' | 'fail'"; readonly required: false; readonly resolution: "static-when-present"; readonly issueCode: "play_authoring_dataset_option_invalid"; readonly description: "Whether row failures isolate or fail the whole dataset."; readonly errorMessage: "ctx.dataset run onRowError must be \"isolate\" or \"fail\"."; }; readonly 'ctx.dataset.run.mode': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"upsert">, _sinclair_typebox.TLiteral<"net_new">]>; readonly fixtures: { readonly valid: "upsert"; readonly invalid: "append"; readonly absent: undefined; readonly unresolved: { readonly expression: "datasetMode"; }; readonly edition1: "upsert"; }; readonly referenceType: "'upsert' | 'net_new'"; readonly required: false; readonly resolution: "static-when-present"; readonly issueCode: "play_authoring_dataset_option_invalid"; readonly description: "Whether the dataset returns all rows or only newly admitted rows."; readonly errorMessage: "ctx.dataset run mode must be \"upsert\" or \"net_new\"."; }; readonly 'ctx.dataset.run.undrawnColumns': { readonly schema: _sinclair_typebox.TArray<_sinclair_typebox.TString>; readonly fixtures: { readonly valid: readonly ["miss_reason"]; readonly invalid: readonly []; readonly absent: undefined; readonly unresolved: { readonly expression: "undrawnColumns"; }; readonly edition1: readonly ["miss_reason"]; }; readonly referenceType: "readonly string[]"; readonly required: false; readonly resolution: "static-when-present"; readonly issueCode: "play_authoring_dataset_option_invalid"; readonly description: "Computed columns deliberately left out of the authored @mermaid diagram."; readonly errorMessage: "ctx.dataset run undrawnColumns must be a non-empty array of static column-name strings."; }; readonly 'ctx.step.id': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "load-settings"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "stepId"; }; readonly edition1: "step"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "static-required"; readonly issueCode: "play_authoring_step_option_invalid"; readonly description: "Stable durable identity for one scalar checkpoint."; readonly errorMessage: "ctx.step id must be a non-empty static string."; }; readonly 'ctx.step.semanticKey': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "account:stripe.com"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "semanticKey"; }; readonly edition1: "account"; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_step_option_invalid"; readonly description: "Optional semantic receipt identity for a scalar checkpoint."; readonly errorMessage: "ctx.step semanticKey must be a non-empty string."; }; readonly 'ctx.step.staleAfterSeconds': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TNull, _sinclair_typebox.TInteger]>; readonly fixtures: { readonly valid: 0; readonly invalid: -1; readonly absent: undefined; readonly unresolved: { readonly expression: "ttl"; }; readonly edition1: null; }; readonly referenceType: "number | null"; readonly required: false; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_durable_policy_invalid"; readonly description: "Checkpoint freshness: null/omitted never expires, 0 always executes."; readonly errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."; }; readonly 'ctx.fetch.key': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "notify-crm"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "fetchKey"; }; readonly edition1: "fetch"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "static-required"; readonly issueCode: "play_authoring_durable_policy_invalid"; readonly description: "Stable durable identity for one external HTTP request."; readonly errorMessage: "ctx.fetch key must be a non-empty static string."; readonly unresolvedHint: "Push the aggregation server-side and call it once: a SQL function, a view, or a provider endpoint that returns the whole result. Keep unrolled literal keys only for a handful of genuinely distinct calls. To fan out over rows, use ctx.dataset with a static key — the per-row receipt identity comes from the row, not from the key. Do not compute the key."; }; readonly 'ctx.fetch.staleAfterSeconds': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TNull, _sinclair_typebox.TInteger]>; readonly fixtures: { readonly valid: null; readonly invalid: 1.5; readonly absent: undefined; readonly unresolved: { readonly expression: "ttl"; }; readonly edition1: 0; }; readonly referenceType: "number | null"; readonly required: false; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_durable_policy_invalid"; readonly description: "Fetch freshness: null/omitted never expires, 0 always executes."; readonly errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."; }; readonly 'ctx.runPlay.key': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "enrich-company"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "callKey"; }; readonly edition1: "child"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_run_play_option_invalid"; readonly description: "Stable identity for one inline child Play call."; readonly errorMessage: "ctx.runPlay key must be a non-empty string."; }; readonly 'ctx.runPlay.playRef': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{ playName: _sinclair_typebox.TString; }>, _sinclair_typebox.TObject<{ name: _sinclair_typebox.TString; }>]>]>; readonly fixtures: { readonly valid: "prebuilt/company-lookup"; readonly invalid: {}; readonly absent: undefined; readonly unresolved: { readonly expression: "playRef"; }; readonly edition1: { readonly name: "company-lookup"; }; }; readonly referenceType: "string | PlayReferenceLike"; readonly required: true; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_run_play_option_invalid"; readonly description: "Child Play name or typed Play definition handle."; readonly errorMessage: "ctx.runPlay playRef must be a non-empty Play name or definition handle."; }; readonly 'ctx.runPlay.input': { readonly schema: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnknown>; readonly fixtures: { readonly valid: { readonly domain: "example.com"; }; readonly invalid: "example.com"; readonly absent: undefined; readonly unresolved: "childInput"; readonly edition1: {}; }; readonly referenceType: "Record"; readonly required: true; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_run_play_option_invalid"; readonly description: "Scalar input object submitted to the child Play."; readonly errorMessage: "ctx.runPlay input must be an object."; }; readonly 'ctx.runPlay.options.description': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "Enrich the company."; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "description"; }; readonly edition1: "Run child."; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_run_play_option_invalid"; readonly description: "Non-empty purpose for one inline child Play call."; readonly errorMessage: "ctx.runPlay options.description must be non-empty."; }; readonly 'ctx.runPlay.options.execution': { readonly schema: _sinclair_typebox.TLiteral<"inline">; readonly fixtures: { readonly valid: "inline"; readonly invalid: "child-workflow"; readonly absent: undefined; readonly unresolved: { readonly expression: "execution"; }; readonly edition1: "inline"; }; readonly referenceType: "'inline'"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_run_play_option_invalid"; readonly description: "Child composition strategy. Only inline is supported."; readonly errorMessage: "ctx.runPlay execution must be \"inline\"."; }; readonly 'ctx.runPlay.options.timeoutMs': { readonly schema: _sinclair_typebox.TUndefined; readonly fixtures: { readonly valid: undefined; readonly invalid: 1000; readonly absent: undefined; readonly unresolved: { readonly expression: "timeoutMs"; }; readonly edition1: undefined; }; readonly referenceType: "never"; readonly required: false; readonly resolution: "unsupported"; readonly issueCode: "play_authoring_run_play_option_invalid"; readonly description: "Unsupported legacy child-workflow timeout."; readonly errorMessage: "ctx.runPlay timeoutMs is unsupported because child Plays execute inline."; }; readonly 'runtime.timeout': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "90m"; readonly invalid: "90s"; readonly absent: undefined; readonly unresolved: { readonly expression: "timeout"; }; readonly edition1: "90m"; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_binding_invalid"; readonly description: "Play-level sandbox deadline. The default is 30m; use a static duration such as 90m or 2h, up to 4h."; readonly errorMessage: "runtime.timeout must be a static duration such as \"90m\" or \"2h\"."; }; readonly 'runtime.size': { readonly schema: _sinclair_typebox.TLiteral<"standard">; readonly fixtures: { readonly valid: "standard"; readonly invalid: "large"; readonly absent: undefined; readonly unresolved: { readonly expression: "size"; }; readonly edition1: "standard"; }; readonly referenceType: "'standard'"; readonly required: false; readonly resolution: "static-required"; readonly issueCode: "play_authoring_binding_invalid"; readonly description: "Deepline-managed sandbox size. Only standard is supported."; readonly errorMessage: "runtime.size must be the static literal \"standard\"."; }; readonly 'ctx.customerDb.query.statement': { readonly schema: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TObject<{ kind: _sinclair_typebox.TOptional<_sinclair_typebox.TLiteral<"sql.query">>; text: _sinclair_typebox.TString; values: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TUnknown>>; }>]>; readonly fixtures: { readonly valid: { readonly kind: "sql.query"; readonly text: "select 1"; readonly values: readonly []; }; readonly invalid: { readonly kind: "sql.query"; readonly text: "select $1"; readonly values: readonly [1]; }; readonly absent: undefined; readonly unresolved: { readonly expression: "statement"; }; readonly edition1: "select 1"; }; readonly referenceType: "SqlQuery"; readonly required: true; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "One non-empty Customer DB SQL string; the deprecated SqlQuery object is accepted only without parameter values."; readonly errorMessage: "ctx.customerDb.query statement must be a non-empty SQL string. Deprecated SqlQuery objects cannot contain parameter values."; }; readonly 'ctx.customerDb.query.options.maxRows': { readonly schema: _sinclair_typebox.TInteger; readonly fixtures: { readonly valid: 100; readonly invalid: 0; readonly absent: undefined; readonly unresolved: { readonly expression: "maxRows"; }; readonly edition1: 100; }; readonly referenceType: "number"; readonly required: false; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "Positive whole-number Customer DB response row limit."; readonly errorMessage: "ctx.customerDb.query options.maxRows must be a positive whole number."; }; readonly 'ctx.customerDb.query.options.timeoutMs': { readonly schema: _sinclair_typebox.TInteger; readonly fixtures: { readonly valid: 1000; readonly invalid: 0; readonly absent: undefined; readonly unresolved: { readonly expression: "timeoutMs"; }; readonly edition1: 1000; }; readonly referenceType: "number"; readonly required: false; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_durable_policy_invalid"; readonly description: "Positive whole-number Customer DB timeout in milliseconds."; readonly errorMessage: "ctx.customerDb.query options.timeoutMs must be a positive whole number of milliseconds."; }; readonly 'ctx.tool.key': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "company"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "key"; }; readonly edition1: "tool"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "Stable receipt identity for the tool shorthand."; readonly errorMessage: "ctx.tool key must be a non-empty string."; }; readonly 'ctx.tool.tool': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "openmart_enrich_company"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "tool"; }; readonly edition1: "openmart_enrich_company"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "Integration tool id for the tool shorthand."; readonly errorMessage: "ctx.tool tool must be a non-empty tool id."; }; readonly 'ctx.tool.input': { readonly schema: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnknown>; readonly fixtures: { readonly valid: { readonly domain: "example.com"; }; readonly invalid: "example.com"; readonly absent: undefined; readonly unresolved: "toolInput"; readonly edition1: {}; }; readonly referenceType: "Record"; readonly required: true; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "Tool-specific input object for the shorthand."; readonly errorMessage: "ctx.tool input must be an object."; }; readonly 'ctx.tool.options.description': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "Enrich the company."; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "description"; }; readonly edition1: "Run tool."; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_tool_request_invalid"; readonly description: "Non-empty purpose for the tool shorthand."; readonly errorMessage: "ctx.tool options.description must be non-empty."; }; readonly 'ctx.runSteps.options.description': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "Score the account."; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "description"; }; readonly edition1: "Run steps."; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_step_option_invalid"; readonly description: "Non-empty purpose for a reusable step program."; readonly errorMessage: "ctx.runSteps options.description must be non-empty."; }; readonly 'ctx.sleep.ms': { readonly schema: _sinclair_typebox.TInteger; readonly fixtures: { readonly valid: 0; readonly invalid: -1; readonly absent: undefined; readonly unresolved: { readonly expression: "delayMs"; }; readonly edition1: 1000; }; readonly referenceType: "number"; readonly required: true; readonly resolution: "runtime-dynamic"; readonly issueCode: "play_authoring_step_option_invalid"; readonly description: "Non-negative whole-number sleep duration in milliseconds."; readonly errorMessage: "ctx.sleep ms must be a non-negative whole number."; }; readonly 'ctx.fetch.url': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "https://example.com"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "url"; }; readonly edition1: "https://example.com"; }; readonly referenceType: "string"; readonly required: true; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_fetch_secret_requires_tls"; readonly description: "HTTP request URL. Secret authentication requires HTTPS."; readonly errorMessage: "ctx.fetch URL must be a non-empty URL string."; }; readonly 'ctx.fetch.init.method': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "GET"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "method"; }; readonly edition1: "GET"; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_fetch_idempotency_required"; readonly description: "HTTP method. Mutating methods require an Idempotency-Key."; readonly errorMessage: "ctx.fetch method must be a non-empty string."; }; readonly 'ctx.fetch.init.headers.Idempotency-Key': { readonly schema: _sinclair_typebox.TString; readonly fixtures: { readonly valid: "contact-123-update"; readonly invalid: ""; readonly absent: undefined; readonly unresolved: { readonly expression: "idempotencyKey"; }; readonly edition1: "contact-123-update"; }; readonly referenceType: "string"; readonly required: false; readonly resolution: "runtime-allowed"; readonly issueCode: "play_authoring_fetch_idempotency_required"; readonly description: "Required for mutating HTTP methods to make replay safe."; readonly errorMessage: "Idempotency-Key must be a non-empty string when provided."; }; }; type PlayAuthoringBindingsSnapshot = PlayAuthoringAstBindings; type AdmittedPlayAuthoringContract = { edition: PlayAuthoringContractEdition; staticPipeline: unknown; /** Input schema materialized at admission; launch must never reparse source. */ inputSchema: Record | null; bindings: PlayAuthoringBindingsSnapshot | null; billingLimit: { maxCreditsPerRun: number; } | null; runtimeLimit: PlaySandboxRuntimeLimits; allowedSecrets: string[]; }; type DurableCallStaleAfterSeconds = Static<(typeof PLAY_AUTHORING_FIELD_REGISTRY)['ctx.tools.execute.staleAfterSeconds']['schema']>; /** Runtime validation, not TypeScript, enforces positive whole milliseconds. */ type PlayRuntimeTimeoutMs = number; type PlayReceiptWaitMs = number; type PlayCompilerDependencyManifest = { playName: string; /** Original source path for direct imported definePlay dependencies. */ filePath?: string; sourceHash: string; graphHash: string; artifactHash: string; staticPipeline: PlayStaticPipeline; /** Compact transitive dependency closure from the child manifest. */ importedPlayDependencies?: PlayCompilerDependencyManifest[]; }; /** * A unique named ctx.runPlay target resolved while compiling the root Play. * Keeping this separate from source imports lets artifact registration reuse a * freshly resolved child shape without embedding it at every call site. */ type PlayCompilerNamedPlayDependency = { playName: string; staticPipeline: PlayStaticPipeline; }; type PlayCompilerManifest = { compilerVersion: number; playName: string; sourceHash: string; graphHash: string; artifactHash: string; artifactKind?: PlayArtifactKind; staticPipeline: PlayStaticPipeline; importedPlayDependencies: PlayCompilerDependencyManifest[]; namedPlayDependencies?: PlayCompilerNamedPlayDependency[]; authoringContract?: AdmittedPlayAuthoringContract; }; export { type PlayDataset as $, type PlayAuthoringFetchResponse as A, type PlayAuthoringInputContract as B, type PlayAuthoringStepProgramStep as C, DeeplineError as D, type PlayAuthoringRuntimeStepOptions as E, type PlaySqlListenerDeclaration as F, type PlaySqlListenerEvent as G, type PlaySqlListenerOperation as H, type PlaySqlQuery as I, type PlayAuthoringStepOptions as J, type PlayAuthoringStepProgram as K, type PlayAuthoringStepProgramResolver as L, type PlayAuthoringStepResolver as M, type PlayToolExecutionRequest as N, type PlayAuthoringStepProgramOptions as O, type PlayAuthoringContractEdition as P, DEEPLINE_EXTRACTOR_TARGETS as Q, DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS as R, type DeeplineEmailStatusGetterValue as S, type ToolExecutionErrorSchemaVersion as T, type DeeplineExtractorTarget as U, type DeeplineGetterValue as V, type DeeplineGetterValueMap as W, JOB_CHANGE_STATUS_VALUES as X, type JobChangeStatus as Y, PHONE_STATUS_VALUES as Z, type PhoneStatus as _, type PlayArtifactKind as a, type PlayDatasetInput as a0, type PreviousCell as a1, ProviderTransientError as a2, type ProviderTransientErrorCategory as a3, type ProviderUnavailableError as a4, type ProviderUnavailableReason as a5, type ToolExecutionErrorCategory as a6, type ToolExecutionErrorOrigin as a7, type ToolExecutionFailureV1 as a8, type ToolExecutionNetworkKind as a9, type ToolExecutionNetworkScope as aa, getProviderUnavailableReason as ab, isDeeplineExtractorTarget as ac, isProviderUnavailable as ad, isProviderWaterfallUnavailableError as ae, type PlaySandboxRuntimeDeclaration as b, type PlayCompilerManifest as c, PLAY_ARTIFACT_KINDS as d, type PlayRuntimeBackendId as e, ToolExecutionError as f, type ToolExecutionErrorOptions as g, type PlayAuthoringColumnMap as h, type PlayAuthoringColumnResolver as i, type PlayAuthoringRuntimeContext as j, type PlayAuthoringConditionalStepResolver as k, type PlayAuthoringCsvInput as l, type PlayAuthoringCsvOptions as m, type PlayAuthoringDatasetBuilder as n, type PlayAuthoringDatasetColumnDefinition as o, type PlayAuthoringDatasetColumnRunInput as p, type ToolExecuteResult as q, type PlayAuthoringReferenceLike as r, type PlayReturnObject as s, type PlayAuthoringDefineConfig as t, type PlayAuthoringDefinedPlay as u, type PlayAuthoringFetchOptions as v, type PlayAuthoringFileInput as w, type PlayAuthoringBindings as x, type PlayAuthoringCallExecution as y, type PlayAuthoringCallOptions as z };