deepline 0.3.236 → 0.3.238

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -3454,27 +3454,33 @@ type RunGetStatus = {
3454
3454
  };
3455
3455
  } | null;
3456
3456
  };
3457
- /** Streaming options for `client.runs.tail(...)`. */
3458
- type RunsTailOptions = {
3457
+ /** Options for `client.runs.watch(...)`. */
3458
+ type RunsWatchOptions = {
3459
3459
  signal?: AbortSignal;
3460
- /** Observe each canonical live event while `tail` waits for terminal state. */
3460
+ /** Observe each canonical event while `watch` waits for terminal state. */
3461
3461
  onEvent?: (event: PlayLiveEvent) => void;
3462
3462
  /**
3463
- * Called before each stream reconnect. Server stream windows are finite, so
3464
- * long runs reconnect with backoff until a terminal status is observed.
3463
+ * Called once when a transient REST polling outage begins. Polling retries
3464
+ * on its normal fixed interval.
3465
3465
  */
3466
+ onRetry?: (info: {
3467
+ attempt: number;
3468
+ delayMs: number;
3469
+ reason: string;
3470
+ }) => void;
3471
+ /** @deprecated Use `onRetry`. */
3466
3472
  onReconnect?: (info: {
3467
3473
  attempt: number;
3468
3474
  delayMs: number;
3469
3475
  reason: string;
3470
3476
  }) => void;
3471
3477
  /**
3472
- * Display-only transport notices: subscription-transport reconnects,
3473
- * staleness warnings, and the one-time fallback notice when the server
3474
- * cannot serve the Convex subscription transport (ADR-0008).
3478
+ * Display-only notices for a transient snapshot polling outage or recovery.
3475
3479
  */
3476
3480
  onNotice?: (message: string) => void;
3477
3481
  };
3482
+ /** @deprecated Use `RunsWatchOptions`. */
3483
+ type RunsTailOptions = RunsWatchOptions;
3478
3484
  /** Log fetch options for `client.runs.logs(...)`. */
3479
3485
  type RunsLogsOptions = {
3480
3486
  /** Return the LAST `limit` stored log lines (default 200). */
@@ -3562,7 +3568,7 @@ type PlaySecretCheck = {
3562
3568
  secret: PlaySecretMetadata | null;
3563
3569
  };
3564
3570
  /**
3565
- * Use `client.runs` (`/api/v2/runs`) to poll, stream, stop, read logs, and export durable dataset rows.
3571
+ * Use `client.runs` (`/api/v2/runs`) to watch, stop, read logs, and export durable dataset rows.
3566
3572
  *
3567
3573
  * @sdkReference client 020 client.runs
3568
3574
  */
@@ -3588,7 +3594,9 @@ type RunsNamespace = {
3588
3594
  list: (options: RunsListOptions) => Promise<PlayRunListItem[]>;
3589
3595
  /** Read one run page with total, offset, limit and completeness metadata. */
3590
3596
  listPage: (options: RunsListOptions) => Promise<RunsListPage>;
3591
- /** Stream run events and return the latest/terminal run status. */
3597
+ /** Poll run snapshots every two seconds until terminal status. */
3598
+ watch: (runId: string, options?: RunsWatchOptions) => Promise<PlayStatus>;
3599
+ /** @deprecated Use `watch`; retained as a source-compatible alias. */
3592
3600
  tail: (runId: string, options?: RunsTailOptions) => Promise<PlayStatus>;
3593
3601
  /** Fetch persisted log lines for a run. */
3594
3602
  logs: (runId: string, options?: RunsLogsOptions) => Promise<RunsLogsResult>;
@@ -4738,6 +4746,8 @@ type BillingRecentUsageEntry = {
4738
4746
  outcome: string | null;
4739
4747
  billing_note: string | null;
4740
4748
  charge_state: 'posted' | 'temporary_hold' | 'hold_release' | 'pending' | 'free' | 'failed';
4749
+ /** Final billing truth may be unknown even after execution completes. */
4750
+ charge_finality?: 'final' | 'pending' | 'unknown';
4741
4751
  rough_usd_cost: number | null;
4742
4752
  created_at: string;
4743
4753
  };
@@ -4767,6 +4777,10 @@ type BillingUsageResult = {
4767
4777
  run_id: string | null;
4768
4778
  request_id?: string;
4769
4779
  total: number;
4780
+ /** Only true when total covers the complete matching history. */
4781
+ total_is_exact?: boolean;
4782
+ /** Proven matching entries, without assuming unscanned rows match. */
4783
+ total_lower_bound?: number;
4770
4784
  offset: number;
4771
4785
  limit: number;
4772
4786
  next_offset: number;
@@ -5089,15 +5103,17 @@ declare class DeeplineClient {
5089
5103
  */
5090
5104
  startPlayRun(request: StartPlayRunRequest): Promise<PlayRunStart>;
5091
5105
  /**
5092
- * Start a play run and stream live runtime events from the same request.
5106
+ * Submit a play run through the legacy event response.
5107
+ *
5108
+ * This reports admission from the start request; it does not watch an
5109
+ * existing run. Use `startPlayRun()` and `watchRunEvents(runId)` separately.
5093
5110
  *
5094
- * Use this when a caller wants low-level event handling instead of submitting
5095
- * first and then connecting to `streamPlayRunEvents(runId)`.
5111
+ * @deprecated Use the separate start and watch methods.
5096
5112
  *
5097
5113
  * @param request - Play run configuration.
5098
- * @param options - Optional streaming options.
5099
- * @param options.signal - Optional abort signal for the streaming request.
5100
- * @returns Async stream of play-scoped live events.
5114
+ * @param options - Optional compatibility response options.
5115
+ * @param options.signal - Abort the start response.
5116
+ * @returns Async generator of play-scoped live events.
5101
5117
  */
5102
5118
  startPlayRunStream(request: StartPlayRunRequest, options?: {
5103
5119
  signal?: AbortSignal;
@@ -5358,17 +5374,50 @@ declare class DeeplineClient {
5358
5374
  billing?: boolean;
5359
5375
  full?: boolean;
5360
5376
  }): Promise<PlayStatus>;
5377
+ /** Poll authenticated run snapshots every two seconds and emit changed events. */
5378
+ watchRunEvents(workflowId: string, options?: {
5379
+ signal?: AbortSignal;
5380
+ onNotice?: (message: string) => void;
5381
+ onRetry?: RunsWatchOptions['onRetry'];
5382
+ }): AsyncGenerator<PlayLiveEvent>;
5361
5383
  /**
5362
- * Stream semantic play-run events using the same SSE feed as the dashboard.
5384
+ * Read raw legacy SSE events for callers that explicitly require that
5385
+ * compatibility endpoint. Ordinary run watching uses REST snapshot polling.
5363
5386
  *
5364
- * The server emits a canonical `play.run.snapshot` event first for every
5365
- * connection, then incremental live events until terminal state or reconnect.
5387
+ * @deprecated Use `watchRunEvents` for ordinary run watching.
5366
5388
  */
5367
5389
  streamPlayRunEvents(workflowId: string, options?: {
5368
5390
  signal?: AbortSignal;
5369
5391
  lastEventId?: string;
5370
5392
  mode?: 'cli' | 'ui';
5371
5393
  }): AsyncGenerator<PlayLiveEvent>;
5394
+ /**
5395
+ * Compatibility alias for polling canonical run snapshots and emitting
5396
+ * their changed events.
5397
+ *
5398
+ * @deprecated Use `watchRunEvents`; kept as a source-compatible alias.
5399
+ * The `fallback` option is ignored because watching uses REST polling.
5400
+ */
5401
+ observeRunEvents(runId: string, options?: {
5402
+ signal?: AbortSignal;
5403
+ onNotice?: (message: string) => void;
5404
+ /** @deprecated Ignored; watching always uses REST snapshot polling. */
5405
+ fallback?: 'sse' | 'none';
5406
+ }): AsyncGenerator<PlayLiveEvent>;
5407
+ /** Poll snapshots to terminal status and return the durable package. */
5408
+ private watchRunToTerminal;
5409
+ /**
5410
+ * Wait for a run and return its terminal status.
5411
+ *
5412
+ * This source-compatible alias uses the same authenticated two-second REST
5413
+ * snapshot polling as `client.runs.watch`.
5414
+ *
5415
+ * @deprecated Use `client.runs.watch`; retained for SDK compatibility.
5416
+ * @param runId - Public Deepline play-run id.
5417
+ * @param options - Optional callbacks and cancellation signal.
5418
+ * @returns The final durable run status.
5419
+ */
5420
+ tailRun(runId: string, options?: RunsTailOptions): Promise<PlayStatus>;
5372
5421
  /**
5373
5422
  * Cancel a running play execution.
5374
5423
  *
@@ -5486,39 +5535,6 @@ declare class DeeplineClient {
5486
5535
  listRuns(options: RunsListOptions): Promise<PlayRunListItem[]>;
5487
5536
  /** Read one run page without discarding server pagination metadata. */
5488
5537
  listRunsPage(options: RunsListOptions): Promise<RunsListPage>;
5489
- /**
5490
- * Observe one run's live events. Uses the Convex Run Snapshot subscription
5491
- * transport first (ADR-0008), then falls back to the canonical SSE stream
5492
- * when the subscription transport or its optional client modules are not
5493
- * available. Pass `fallback: 'none'` to receive
5494
- * {@link RunObserveTransportUnavailableError} instead.
5495
- */
5496
- observeRunEvents(runId: string, options?: {
5497
- signal?: AbortSignal;
5498
- onNotice?: (message: string) => void;
5499
- fallback?: 'sse' | 'none';
5500
- }): AsyncGenerator<PlayLiveEvent>;
5501
- private streamPlayRunEventsUntilTerminal;
5502
- /**
5503
- * Tail one run through the subscription transport until terminal, then
5504
- * return one durable REST status read (the final Run Response Package).
5505
- */
5506
- private tailRunViaObserveTransport;
5507
- /**
5508
- * Read the canonical run stream until a terminal run status is observed.
5509
- *
5510
- * Tries the Convex Run Snapshot subscription transport first (ADR-0008);
5511
- * when the server cannot serve it (grant endpoint missing/unconfigured or
5512
- * Convex unreachable) it falls back — with one `onNotice` message — to the
5513
- * support-window SSE stream below.
5514
- *
5515
- * Server stream windows are finite: they end cleanly at the function
5516
- * ceiling even while the run keeps executing. A window that ends (cleanly
5517
- * or via transient network error) without a terminal event triggers one
5518
- * durable-status re-check followed by a backed-off reconnect, so long runs
5519
- * tail to completion. Abort via `options.signal` to stop waiting.
5520
- */
5521
- tailRun(runId: string, options?: RunsTailOptions): Promise<PlayStatus>;
5522
5538
  /** Get the exact original input retained for a run. This is intentionally separate from status. */
5523
5539
  getRunInput(runId: string): Promise<{
5524
5540
  runId: string;
@@ -5848,10 +5864,10 @@ declare class DeeplineClient {
5848
5864
  revisionId?: string;
5849
5865
  }): Promise<SharePageStatus>;
5850
5866
  /**
5851
- * Run a play end-to-end: submit, stream until terminal, return result.
5867
+ * Run a play end-to-end: submit, poll progress until terminal, return result.
5852
5868
  *
5853
5869
  * This is the highest-level play execution method. It submits the play,
5854
- * reads the canonical run stream for status updates, and returns a structured
5870
+ * reads the canonical run snapshot for status updates, and returns a structured
5855
5871
  * result with logs and timing. Supports cancellation via `AbortSignal`.
5856
5872
  *
5857
5873
  * @param code - Source string fallback; pass the bundled artifact in `options.artifact`
@@ -6873,8 +6889,12 @@ declare const defineWorkflow: typeof definePlay;
6873
6889
  declare function getDefinedPlayMetadata(value: unknown): PlayMetadata | null;
6874
6890
 
6875
6891
  /**
6876
- * Bootstrap failure: this server/deployment cannot serve the subscription
6877
- * transport. Callers fall back to the support-window SSE stream (ADR-0008).
6892
+ * Compatibility export retained for SDK callers that imported the old error.
6893
+ * Run watching now uses authenticated REST snapshot polling and does not throw
6894
+ * this error.
6895
+ *
6896
+ * @deprecated The subscription transport has been removed. Use
6897
+ * `client.watchRunEvents()` or `client.runs.watch()`.
6878
6898
  */
6879
6899
  declare class RunObserveTransportUnavailableError extends Error {
6880
6900
  readonly reason: string;
@@ -7160,4 +7180,4 @@ declare function writeCsvOutputFile(rows: Array<Record<string, unknown>>, stem:
7160
7180
  */
7161
7181
  declare function extractSummaryFields(payload: unknown): Record<string, Scalar>;
7162
7182
 
7163
- export { type AsyncPlayRunRef, AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingPaymentMethodSummary, type BillingRecentUsageEntry, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type BillingTopUpReceipt, type BillingTopUpResult, type BillingUsageEvent, type BillingUsageOptions, type BillingUsageResult, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CreateNotificationGroupInput, type CreateNotificationGroupResult, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, type DbNamespace, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, DeeplineError, type DeeplineExecutionsNamespace, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolExecuteResult, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type ExecutionByKeyResult, type ExecutionRecovery, type FetchOptions, type FileInput, type IngestionStorageRepairResult, type LegacyMonitorStatusFilter, type LiveEventEnvelope, MONITOR_JOB_PHASES, MONITOR_JOB_RECONCILIATION_STATES, MONITOR_JOB_STATES, type MonitorBatchNamespace, type MonitorCheckResult, type MonitorDefinition, type MonitorDeleteResult, type MonitorDependents, type MonitorDeployResult, type MonitorDetail, type MonitorFleetDeactivateOptions, MonitorFleetDefinition, type MonitorFleetGetOptions, type MonitorFleetReactivateOptions, type MonitorFleetResult, type MonitorFleetStatus, type MonitorFleetSyncOptions, type MonitorFleetWaitOptions, type MonitorFleetsNamespace, type MonitorJobDeployOptions, type MonitorJobLogsOptions, type MonitorJobPhase, type MonitorJobReconciliationState, type MonitorJobResult, type MonitorJobState, type MonitorJobWaitOptions, type MonitorJobsNamespace, type MonitorListEntry, type MonitorPayload, type MonitorReactivateResult, type MonitorSpec, type MonitorState, type MonitorStateFilter, type MonitorUpdateChangeSummary, type MonitorUpdateResult, type MonitorsAccessStatus, type MonitorsAvailableOptions, type MonitorsAvailableResult, type MonitorsListOptions, type MonitorsListResult, type MonitorsNamespace, PLAY_BOOTSTRAP_COMPANY_FIELDS, PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_CONTACT_FIELDS, PLAY_BOOTSTRAP_FINDER_KINDS, PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER, PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER, PLAY_BOOTSTRAP_SOURCE_KINDS, PLAY_BOOTSTRAP_STAGE_KINDS, PLAY_BOOTSTRAP_TEMPLATES, PROD_URL, type PlayActivityObservation, type PlayActivityState, type PlayActivityTarget, type PlayAsyncCallOptions, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayCallExecution, type PlayCallOptions, type PlayCostEstimate, type PlayFetchResponse, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayPath, type PlayReferenceLike, type PlayRevisionSummary, type PlayRunActionPackage, type PlayRunActivityProjection, type PlayRunDatasetActions, type PlayRunId, type PlayRunPackage, type PlayRunResult, type PlayRunStart, type PlaySettings, type PlaySettingsPatch, type PlaySettingsPathsPage, type PlaySettingsResult, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PlaysActivityResponse, type PlaysListOptions, type PlaysListPage, type PrebuiltPlayRef, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type RerunOptions, type RerunPlayRunResult, type ResolvedConfig, type RunLifecycleStatus, RunObserveTransportUnavailableError, type RunsListOptions, type RunsListPage, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, type RuntimeStepOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type StartPlayRunRequest, type StepOptions, type StepProgram, type StepProgramResolver, type StepResolver, type StopAllCandidate, type StopAllPlayRunsDryRunResult, type StopAllPlayRunsResult, type StopAllPlayRunsStopResult, type StopAllRunsOptions, type StopPlayRunResult, type ToolDefinition, ToolExecuteResult, type ToolExecution, ToolExecutionError, ToolExecutionErrorOptions, type ToolExecutionRequest, type ToolMetadata, ToolRateLimitError, ToolResultBilling, type ToolSearchOptions, type ToolSearchResult, type WorkspaceCreateResult, type WorkspacesNamespace, defineInput, defineMonitor, definePlay, defineWorkflow, extractSummaryFields, formatPlayBootstrapFinderKinds, formatPlayBootstrapFinderKindsForSentence, formatPlayBootstrapTemplates, getDefinedPlayMetadata, isPlayBootstrapFinderKind, isPlayBootstrapTemplate, isStopAllPlayRunsDryRunResult, resolveConfig, runIf, steps, tryConvertToList, writeCsvOutputFile, writeJsonOutputFile };
7183
+ export { type AsyncPlayRunRef, AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingPaymentMethodSummary, type BillingRecentUsageEntry, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type BillingTopUpReceipt, type BillingTopUpResult, type BillingUsageEvent, type BillingUsageOptions, type BillingUsageResult, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CreateNotificationGroupInput, type CreateNotificationGroupResult, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, type DbNamespace, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, DeeplineError, type DeeplineExecutionsNamespace, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolExecuteResult, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type ExecutionByKeyResult, type ExecutionRecovery, type FetchOptions, type FileInput, type IngestionStorageRepairResult, type LegacyMonitorStatusFilter, type LiveEventEnvelope, MONITOR_JOB_PHASES, MONITOR_JOB_RECONCILIATION_STATES, MONITOR_JOB_STATES, type MonitorBatchNamespace, type MonitorCheckResult, type MonitorDefinition, type MonitorDeleteResult, type MonitorDependents, type MonitorDeployResult, type MonitorDetail, type MonitorFleetDeactivateOptions, MonitorFleetDefinition, type MonitorFleetGetOptions, type MonitorFleetReactivateOptions, type MonitorFleetResult, type MonitorFleetStatus, type MonitorFleetSyncOptions, type MonitorFleetWaitOptions, type MonitorFleetsNamespace, type MonitorJobDeployOptions, type MonitorJobLogsOptions, type MonitorJobPhase, type MonitorJobReconciliationState, type MonitorJobResult, type MonitorJobState, type MonitorJobWaitOptions, type MonitorJobsNamespace, type MonitorListEntry, type MonitorPayload, type MonitorReactivateResult, type MonitorSpec, type MonitorState, type MonitorStateFilter, type MonitorUpdateChangeSummary, type MonitorUpdateResult, type MonitorsAccessStatus, type MonitorsAvailableOptions, type MonitorsAvailableResult, type MonitorsListOptions, type MonitorsListResult, type MonitorsNamespace, PLAY_BOOTSTRAP_COMPANY_FIELDS, PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_CONTACT_FIELDS, PLAY_BOOTSTRAP_FINDER_KINDS, PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER, PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER, PLAY_BOOTSTRAP_SOURCE_KINDS, PLAY_BOOTSTRAP_STAGE_KINDS, PLAY_BOOTSTRAP_TEMPLATES, PROD_URL, type PlayActivityObservation, type PlayActivityState, type PlayActivityTarget, type PlayAsyncCallOptions, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayCallExecution, type PlayCallOptions, type PlayCostEstimate, type PlayFetchResponse, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayPath, type PlayReferenceLike, type PlayRevisionSummary, type PlayRunActionPackage, type PlayRunActivityProjection, type PlayRunDatasetActions, type PlayRunId, type PlayRunPackage, type PlayRunResult, type PlayRunStart, type PlaySettings, type PlaySettingsPatch, type PlaySettingsPathsPage, type PlaySettingsResult, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PlaysActivityResponse, type PlaysListOptions, type PlaysListPage, type PrebuiltPlayRef, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type RerunOptions, type RerunPlayRunResult, type ResolvedConfig, type RunLifecycleStatus, RunObserveTransportUnavailableError, type RunsListOptions, type RunsListPage, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, type RunsWatchOptions, type RuntimeStepOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type StartPlayRunRequest, type StepOptions, type StepProgram, type StepProgramResolver, type StepResolver, type StopAllCandidate, type StopAllPlayRunsDryRunResult, type StopAllPlayRunsResult, type StopAllPlayRunsStopResult, type StopAllRunsOptions, type StopPlayRunResult, type ToolDefinition, ToolExecuteResult, type ToolExecution, ToolExecutionError, ToolExecutionErrorOptions, type ToolExecutionRequest, type ToolMetadata, ToolRateLimitError, ToolResultBilling, type ToolSearchOptions, type ToolSearchResult, type WorkspaceCreateResult, type WorkspacesNamespace, defineInput, defineMonitor, definePlay, defineWorkflow, extractSummaryFields, formatPlayBootstrapFinderKinds, formatPlayBootstrapFinderKindsForSentence, formatPlayBootstrapTemplates, getDefinedPlayMetadata, isPlayBootstrapFinderKind, isPlayBootstrapTemplate, isStopAllPlayRunsDryRunResult, resolveConfig, runIf, steps, tryConvertToList, writeCsvOutputFile, writeJsonOutputFile };
package/dist/index.d.ts CHANGED
@@ -3454,27 +3454,33 @@ type RunGetStatus = {
3454
3454
  };
3455
3455
  } | null;
3456
3456
  };
3457
- /** Streaming options for `client.runs.tail(...)`. */
3458
- type RunsTailOptions = {
3457
+ /** Options for `client.runs.watch(...)`. */
3458
+ type RunsWatchOptions = {
3459
3459
  signal?: AbortSignal;
3460
- /** Observe each canonical live event while `tail` waits for terminal state. */
3460
+ /** Observe each canonical event while `watch` waits for terminal state. */
3461
3461
  onEvent?: (event: PlayLiveEvent) => void;
3462
3462
  /**
3463
- * Called before each stream reconnect. Server stream windows are finite, so
3464
- * long runs reconnect with backoff until a terminal status is observed.
3463
+ * Called once when a transient REST polling outage begins. Polling retries
3464
+ * on its normal fixed interval.
3465
3465
  */
3466
+ onRetry?: (info: {
3467
+ attempt: number;
3468
+ delayMs: number;
3469
+ reason: string;
3470
+ }) => void;
3471
+ /** @deprecated Use `onRetry`. */
3466
3472
  onReconnect?: (info: {
3467
3473
  attempt: number;
3468
3474
  delayMs: number;
3469
3475
  reason: string;
3470
3476
  }) => void;
3471
3477
  /**
3472
- * Display-only transport notices: subscription-transport reconnects,
3473
- * staleness warnings, and the one-time fallback notice when the server
3474
- * cannot serve the Convex subscription transport (ADR-0008).
3478
+ * Display-only notices for a transient snapshot polling outage or recovery.
3475
3479
  */
3476
3480
  onNotice?: (message: string) => void;
3477
3481
  };
3482
+ /** @deprecated Use `RunsWatchOptions`. */
3483
+ type RunsTailOptions = RunsWatchOptions;
3478
3484
  /** Log fetch options for `client.runs.logs(...)`. */
3479
3485
  type RunsLogsOptions = {
3480
3486
  /** Return the LAST `limit` stored log lines (default 200). */
@@ -3562,7 +3568,7 @@ type PlaySecretCheck = {
3562
3568
  secret: PlaySecretMetadata | null;
3563
3569
  };
3564
3570
  /**
3565
- * Use `client.runs` (`/api/v2/runs`) to poll, stream, stop, read logs, and export durable dataset rows.
3571
+ * Use `client.runs` (`/api/v2/runs`) to watch, stop, read logs, and export durable dataset rows.
3566
3572
  *
3567
3573
  * @sdkReference client 020 client.runs
3568
3574
  */
@@ -3588,7 +3594,9 @@ type RunsNamespace = {
3588
3594
  list: (options: RunsListOptions) => Promise<PlayRunListItem[]>;
3589
3595
  /** Read one run page with total, offset, limit and completeness metadata. */
3590
3596
  listPage: (options: RunsListOptions) => Promise<RunsListPage>;
3591
- /** Stream run events and return the latest/terminal run status. */
3597
+ /** Poll run snapshots every two seconds until terminal status. */
3598
+ watch: (runId: string, options?: RunsWatchOptions) => Promise<PlayStatus>;
3599
+ /** @deprecated Use `watch`; retained as a source-compatible alias. */
3592
3600
  tail: (runId: string, options?: RunsTailOptions) => Promise<PlayStatus>;
3593
3601
  /** Fetch persisted log lines for a run. */
3594
3602
  logs: (runId: string, options?: RunsLogsOptions) => Promise<RunsLogsResult>;
@@ -4738,6 +4746,8 @@ type BillingRecentUsageEntry = {
4738
4746
  outcome: string | null;
4739
4747
  billing_note: string | null;
4740
4748
  charge_state: 'posted' | 'temporary_hold' | 'hold_release' | 'pending' | 'free' | 'failed';
4749
+ /** Final billing truth may be unknown even after execution completes. */
4750
+ charge_finality?: 'final' | 'pending' | 'unknown';
4741
4751
  rough_usd_cost: number | null;
4742
4752
  created_at: string;
4743
4753
  };
@@ -4767,6 +4777,10 @@ type BillingUsageResult = {
4767
4777
  run_id: string | null;
4768
4778
  request_id?: string;
4769
4779
  total: number;
4780
+ /** Only true when total covers the complete matching history. */
4781
+ total_is_exact?: boolean;
4782
+ /** Proven matching entries, without assuming unscanned rows match. */
4783
+ total_lower_bound?: number;
4770
4784
  offset: number;
4771
4785
  limit: number;
4772
4786
  next_offset: number;
@@ -5089,15 +5103,17 @@ declare class DeeplineClient {
5089
5103
  */
5090
5104
  startPlayRun(request: StartPlayRunRequest): Promise<PlayRunStart>;
5091
5105
  /**
5092
- * Start a play run and stream live runtime events from the same request.
5106
+ * Submit a play run through the legacy event response.
5107
+ *
5108
+ * This reports admission from the start request; it does not watch an
5109
+ * existing run. Use `startPlayRun()` and `watchRunEvents(runId)` separately.
5093
5110
  *
5094
- * Use this when a caller wants low-level event handling instead of submitting
5095
- * first and then connecting to `streamPlayRunEvents(runId)`.
5111
+ * @deprecated Use the separate start and watch methods.
5096
5112
  *
5097
5113
  * @param request - Play run configuration.
5098
- * @param options - Optional streaming options.
5099
- * @param options.signal - Optional abort signal for the streaming request.
5100
- * @returns Async stream of play-scoped live events.
5114
+ * @param options - Optional compatibility response options.
5115
+ * @param options.signal - Abort the start response.
5116
+ * @returns Async generator of play-scoped live events.
5101
5117
  */
5102
5118
  startPlayRunStream(request: StartPlayRunRequest, options?: {
5103
5119
  signal?: AbortSignal;
@@ -5358,17 +5374,50 @@ declare class DeeplineClient {
5358
5374
  billing?: boolean;
5359
5375
  full?: boolean;
5360
5376
  }): Promise<PlayStatus>;
5377
+ /** Poll authenticated run snapshots every two seconds and emit changed events. */
5378
+ watchRunEvents(workflowId: string, options?: {
5379
+ signal?: AbortSignal;
5380
+ onNotice?: (message: string) => void;
5381
+ onRetry?: RunsWatchOptions['onRetry'];
5382
+ }): AsyncGenerator<PlayLiveEvent>;
5361
5383
  /**
5362
- * Stream semantic play-run events using the same SSE feed as the dashboard.
5384
+ * Read raw legacy SSE events for callers that explicitly require that
5385
+ * compatibility endpoint. Ordinary run watching uses REST snapshot polling.
5363
5386
  *
5364
- * The server emits a canonical `play.run.snapshot` event first for every
5365
- * connection, then incremental live events until terminal state or reconnect.
5387
+ * @deprecated Use `watchRunEvents` for ordinary run watching.
5366
5388
  */
5367
5389
  streamPlayRunEvents(workflowId: string, options?: {
5368
5390
  signal?: AbortSignal;
5369
5391
  lastEventId?: string;
5370
5392
  mode?: 'cli' | 'ui';
5371
5393
  }): AsyncGenerator<PlayLiveEvent>;
5394
+ /**
5395
+ * Compatibility alias for polling canonical run snapshots and emitting
5396
+ * their changed events.
5397
+ *
5398
+ * @deprecated Use `watchRunEvents`; kept as a source-compatible alias.
5399
+ * The `fallback` option is ignored because watching uses REST polling.
5400
+ */
5401
+ observeRunEvents(runId: string, options?: {
5402
+ signal?: AbortSignal;
5403
+ onNotice?: (message: string) => void;
5404
+ /** @deprecated Ignored; watching always uses REST snapshot polling. */
5405
+ fallback?: 'sse' | 'none';
5406
+ }): AsyncGenerator<PlayLiveEvent>;
5407
+ /** Poll snapshots to terminal status and return the durable package. */
5408
+ private watchRunToTerminal;
5409
+ /**
5410
+ * Wait for a run and return its terminal status.
5411
+ *
5412
+ * This source-compatible alias uses the same authenticated two-second REST
5413
+ * snapshot polling as `client.runs.watch`.
5414
+ *
5415
+ * @deprecated Use `client.runs.watch`; retained for SDK compatibility.
5416
+ * @param runId - Public Deepline play-run id.
5417
+ * @param options - Optional callbacks and cancellation signal.
5418
+ * @returns The final durable run status.
5419
+ */
5420
+ tailRun(runId: string, options?: RunsTailOptions): Promise<PlayStatus>;
5372
5421
  /**
5373
5422
  * Cancel a running play execution.
5374
5423
  *
@@ -5486,39 +5535,6 @@ declare class DeeplineClient {
5486
5535
  listRuns(options: RunsListOptions): Promise<PlayRunListItem[]>;
5487
5536
  /** Read one run page without discarding server pagination metadata. */
5488
5537
  listRunsPage(options: RunsListOptions): Promise<RunsListPage>;
5489
- /**
5490
- * Observe one run's live events. Uses the Convex Run Snapshot subscription
5491
- * transport first (ADR-0008), then falls back to the canonical SSE stream
5492
- * when the subscription transport or its optional client modules are not
5493
- * available. Pass `fallback: 'none'` to receive
5494
- * {@link RunObserveTransportUnavailableError} instead.
5495
- */
5496
- observeRunEvents(runId: string, options?: {
5497
- signal?: AbortSignal;
5498
- onNotice?: (message: string) => void;
5499
- fallback?: 'sse' | 'none';
5500
- }): AsyncGenerator<PlayLiveEvent>;
5501
- private streamPlayRunEventsUntilTerminal;
5502
- /**
5503
- * Tail one run through the subscription transport until terminal, then
5504
- * return one durable REST status read (the final Run Response Package).
5505
- */
5506
- private tailRunViaObserveTransport;
5507
- /**
5508
- * Read the canonical run stream until a terminal run status is observed.
5509
- *
5510
- * Tries the Convex Run Snapshot subscription transport first (ADR-0008);
5511
- * when the server cannot serve it (grant endpoint missing/unconfigured or
5512
- * Convex unreachable) it falls back — with one `onNotice` message — to the
5513
- * support-window SSE stream below.
5514
- *
5515
- * Server stream windows are finite: they end cleanly at the function
5516
- * ceiling even while the run keeps executing. A window that ends (cleanly
5517
- * or via transient network error) without a terminal event triggers one
5518
- * durable-status re-check followed by a backed-off reconnect, so long runs
5519
- * tail to completion. Abort via `options.signal` to stop waiting.
5520
- */
5521
- tailRun(runId: string, options?: RunsTailOptions): Promise<PlayStatus>;
5522
5538
  /** Get the exact original input retained for a run. This is intentionally separate from status. */
5523
5539
  getRunInput(runId: string): Promise<{
5524
5540
  runId: string;
@@ -5848,10 +5864,10 @@ declare class DeeplineClient {
5848
5864
  revisionId?: string;
5849
5865
  }): Promise<SharePageStatus>;
5850
5866
  /**
5851
- * Run a play end-to-end: submit, stream until terminal, return result.
5867
+ * Run a play end-to-end: submit, poll progress until terminal, return result.
5852
5868
  *
5853
5869
  * This is the highest-level play execution method. It submits the play,
5854
- * reads the canonical run stream for status updates, and returns a structured
5870
+ * reads the canonical run snapshot for status updates, and returns a structured
5855
5871
  * result with logs and timing. Supports cancellation via `AbortSignal`.
5856
5872
  *
5857
5873
  * @param code - Source string fallback; pass the bundled artifact in `options.artifact`
@@ -6873,8 +6889,12 @@ declare const defineWorkflow: typeof definePlay;
6873
6889
  declare function getDefinedPlayMetadata(value: unknown): PlayMetadata | null;
6874
6890
 
6875
6891
  /**
6876
- * Bootstrap failure: this server/deployment cannot serve the subscription
6877
- * transport. Callers fall back to the support-window SSE stream (ADR-0008).
6892
+ * Compatibility export retained for SDK callers that imported the old error.
6893
+ * Run watching now uses authenticated REST snapshot polling and does not throw
6894
+ * this error.
6895
+ *
6896
+ * @deprecated The subscription transport has been removed. Use
6897
+ * `client.watchRunEvents()` or `client.runs.watch()`.
6878
6898
  */
6879
6899
  declare class RunObserveTransportUnavailableError extends Error {
6880
6900
  readonly reason: string;
@@ -7160,4 +7180,4 @@ declare function writeCsvOutputFile(rows: Array<Record<string, unknown>>, stem:
7160
7180
  */
7161
7181
  declare function extractSummaryFields(payload: unknown): Record<string, Scalar>;
7162
7182
 
7163
- export { type AsyncPlayRunRef, AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingPaymentMethodSummary, type BillingRecentUsageEntry, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type BillingTopUpReceipt, type BillingTopUpResult, type BillingUsageEvent, type BillingUsageOptions, type BillingUsageResult, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CreateNotificationGroupInput, type CreateNotificationGroupResult, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, type DbNamespace, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, DeeplineError, type DeeplineExecutionsNamespace, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolExecuteResult, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type ExecutionByKeyResult, type ExecutionRecovery, type FetchOptions, type FileInput, type IngestionStorageRepairResult, type LegacyMonitorStatusFilter, type LiveEventEnvelope, MONITOR_JOB_PHASES, MONITOR_JOB_RECONCILIATION_STATES, MONITOR_JOB_STATES, type MonitorBatchNamespace, type MonitorCheckResult, type MonitorDefinition, type MonitorDeleteResult, type MonitorDependents, type MonitorDeployResult, type MonitorDetail, type MonitorFleetDeactivateOptions, MonitorFleetDefinition, type MonitorFleetGetOptions, type MonitorFleetReactivateOptions, type MonitorFleetResult, type MonitorFleetStatus, type MonitorFleetSyncOptions, type MonitorFleetWaitOptions, type MonitorFleetsNamespace, type MonitorJobDeployOptions, type MonitorJobLogsOptions, type MonitorJobPhase, type MonitorJobReconciliationState, type MonitorJobResult, type MonitorJobState, type MonitorJobWaitOptions, type MonitorJobsNamespace, type MonitorListEntry, type MonitorPayload, type MonitorReactivateResult, type MonitorSpec, type MonitorState, type MonitorStateFilter, type MonitorUpdateChangeSummary, type MonitorUpdateResult, type MonitorsAccessStatus, type MonitorsAvailableOptions, type MonitorsAvailableResult, type MonitorsListOptions, type MonitorsListResult, type MonitorsNamespace, PLAY_BOOTSTRAP_COMPANY_FIELDS, PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_CONTACT_FIELDS, PLAY_BOOTSTRAP_FINDER_KINDS, PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER, PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER, PLAY_BOOTSTRAP_SOURCE_KINDS, PLAY_BOOTSTRAP_STAGE_KINDS, PLAY_BOOTSTRAP_TEMPLATES, PROD_URL, type PlayActivityObservation, type PlayActivityState, type PlayActivityTarget, type PlayAsyncCallOptions, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayCallExecution, type PlayCallOptions, type PlayCostEstimate, type PlayFetchResponse, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayPath, type PlayReferenceLike, type PlayRevisionSummary, type PlayRunActionPackage, type PlayRunActivityProjection, type PlayRunDatasetActions, type PlayRunId, type PlayRunPackage, type PlayRunResult, type PlayRunStart, type PlaySettings, type PlaySettingsPatch, type PlaySettingsPathsPage, type PlaySettingsResult, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PlaysActivityResponse, type PlaysListOptions, type PlaysListPage, type PrebuiltPlayRef, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type RerunOptions, type RerunPlayRunResult, type ResolvedConfig, type RunLifecycleStatus, RunObserveTransportUnavailableError, type RunsListOptions, type RunsListPage, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, type RuntimeStepOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type StartPlayRunRequest, type StepOptions, type StepProgram, type StepProgramResolver, type StepResolver, type StopAllCandidate, type StopAllPlayRunsDryRunResult, type StopAllPlayRunsResult, type StopAllPlayRunsStopResult, type StopAllRunsOptions, type StopPlayRunResult, type ToolDefinition, ToolExecuteResult, type ToolExecution, ToolExecutionError, ToolExecutionErrorOptions, type ToolExecutionRequest, type ToolMetadata, ToolRateLimitError, ToolResultBilling, type ToolSearchOptions, type ToolSearchResult, type WorkspaceCreateResult, type WorkspacesNamespace, defineInput, defineMonitor, definePlay, defineWorkflow, extractSummaryFields, formatPlayBootstrapFinderKinds, formatPlayBootstrapFinderKindsForSentence, formatPlayBootstrapTemplates, getDefinedPlayMetadata, isPlayBootstrapFinderKind, isPlayBootstrapTemplate, isStopAllPlayRunsDryRunResult, resolveConfig, runIf, steps, tryConvertToList, writeCsvOutputFile, writeJsonOutputFile };
7183
+ export { type AsyncPlayRunRef, AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingPaymentMethodSummary, type BillingRecentUsageEntry, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type BillingTopUpReceipt, type BillingTopUpResult, type BillingUsageEvent, type BillingUsageOptions, type BillingUsageResult, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CreateNotificationGroupInput, type CreateNotificationGroupResult, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, type DbNamespace, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, DeeplineError, type DeeplineExecutionsNamespace, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolExecuteResult, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type ExecutionByKeyResult, type ExecutionRecovery, type FetchOptions, type FileInput, type IngestionStorageRepairResult, type LegacyMonitorStatusFilter, type LiveEventEnvelope, MONITOR_JOB_PHASES, MONITOR_JOB_RECONCILIATION_STATES, MONITOR_JOB_STATES, type MonitorBatchNamespace, type MonitorCheckResult, type MonitorDefinition, type MonitorDeleteResult, type MonitorDependents, type MonitorDeployResult, type MonitorDetail, type MonitorFleetDeactivateOptions, MonitorFleetDefinition, type MonitorFleetGetOptions, type MonitorFleetReactivateOptions, type MonitorFleetResult, type MonitorFleetStatus, type MonitorFleetSyncOptions, type MonitorFleetWaitOptions, type MonitorFleetsNamespace, type MonitorJobDeployOptions, type MonitorJobLogsOptions, type MonitorJobPhase, type MonitorJobReconciliationState, type MonitorJobResult, type MonitorJobState, type MonitorJobWaitOptions, type MonitorJobsNamespace, type MonitorListEntry, type MonitorPayload, type MonitorReactivateResult, type MonitorSpec, type MonitorState, type MonitorStateFilter, type MonitorUpdateChangeSummary, type MonitorUpdateResult, type MonitorsAccessStatus, type MonitorsAvailableOptions, type MonitorsAvailableResult, type MonitorsListOptions, type MonitorsListResult, type MonitorsNamespace, PLAY_BOOTSTRAP_COMPANY_FIELDS, PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_CONTACT_FIELDS, PLAY_BOOTSTRAP_FINDER_KINDS, PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER, PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER, PLAY_BOOTSTRAP_SOURCE_KINDS, PLAY_BOOTSTRAP_STAGE_KINDS, PLAY_BOOTSTRAP_TEMPLATES, PROD_URL, type PlayActivityObservation, type PlayActivityState, type PlayActivityTarget, type PlayAsyncCallOptions, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayCallExecution, type PlayCallOptions, type PlayCostEstimate, type PlayFetchResponse, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayPath, type PlayReferenceLike, type PlayRevisionSummary, type PlayRunActionPackage, type PlayRunActivityProjection, type PlayRunDatasetActions, type PlayRunId, type PlayRunPackage, type PlayRunResult, type PlayRunStart, type PlaySettings, type PlaySettingsPatch, type PlaySettingsPathsPage, type PlaySettingsResult, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PlaysActivityResponse, type PlaysListOptions, type PlaysListPage, type PrebuiltPlayRef, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type RerunOptions, type RerunPlayRunResult, type ResolvedConfig, type RunLifecycleStatus, RunObserveTransportUnavailableError, type RunsListOptions, type RunsListPage, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, type RunsWatchOptions, type RuntimeStepOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type StartPlayRunRequest, type StepOptions, type StepProgram, type StepProgramResolver, type StepResolver, type StopAllCandidate, type StopAllPlayRunsDryRunResult, type StopAllPlayRunsResult, type StopAllPlayRunsStopResult, type StopAllRunsOptions, type StopPlayRunResult, type ToolDefinition, ToolExecuteResult, type ToolExecution, ToolExecutionError, ToolExecutionErrorOptions, type ToolExecutionRequest, type ToolMetadata, ToolRateLimitError, ToolResultBilling, type ToolSearchOptions, type ToolSearchResult, type WorkspaceCreateResult, type WorkspacesNamespace, defineInput, defineMonitor, definePlay, defineWorkflow, extractSummaryFields, formatPlayBootstrapFinderKinds, formatPlayBootstrapFinderKindsForSentence, formatPlayBootstrapTemplates, getDefinedPlayMetadata, isPlayBootstrapFinderKind, isPlayBootstrapTemplate, isStopAllPlayRunsDryRunResult, resolveConfig, runIf, steps, tryConvertToList, writeCsvOutputFile, writeJsonOutputFile };