deepline 0.3.49 → 0.3.51
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/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/play.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +106 -89
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +0 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +52 -21
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +45 -5
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +11 -3
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +0 -2
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +11 -0
- package/dist/bundling-sources/shared_libs/play-runtime/secret-capability.ts +5 -1
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +1 -14
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/contract.ts +17 -7
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/index.ts +0 -1
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +112 -5
- package/dist/bundling-sources/shared_libs/security/safe-fetch.ts +6 -1
- package/dist/cli/index.js +837 -3147
- package/dist/cli/index.mjs +704 -3010
- package/dist/{compiler-manifest-CbzdZrJj.d.mts → compiler-manifest-B47AA7As.d.mts} +46 -4
- package/dist/{compiler-manifest-CbzdZrJj.d.ts → compiler-manifest-B47AA7As.d.ts} +46 -4
- package/dist/index.d.mts +151 -149
- package/dist/index.d.ts +151 -149
- package/dist/index.js +1515 -117
- package/dist/index.mjs +1514 -117
- package/dist/install-integrity.json +2 -2
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/dist/plays/bundle-play-file.mjs +5 -2614
- package/package.json +2 -1
|
@@ -711,7 +711,7 @@ type ToolExecuteResultAccessors<TExtracted extends Record<string, unknown> = Par
|
|
|
711
711
|
*/
|
|
712
712
|
type ToolExecuteResult<TResult = unknown, TMeta = Record<string, unknown>, TExtracted extends Record<string, unknown> = Partial<DeeplineGetterValueMap>, TLists extends Record<string, Record<string, unknown>> = Record<string, Record<string, unknown>>> = ToolExecuteResultBase<TResult, TMeta> & ToolExecuteResultAccessors<TExtracted, TLists>;
|
|
713
713
|
|
|
714
|
-
declare const SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS: readonly [1, 2, 3, 4];
|
|
714
|
+
declare const SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS: readonly [1, 2, 3, 4, 5];
|
|
715
715
|
type PlayAuthoringContractEdition = (typeof SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS)[number];
|
|
716
716
|
type PlaySqlListenerOperation = 'INSERT' | 'UPDATE' | 'DELETE';
|
|
717
717
|
type PlayStandardWebhookHeaderFamily = 'standard' | 'svix';
|
|
@@ -1066,11 +1066,23 @@ type PlayAuthoringRuntimeStepOptions = {
|
|
|
1066
1066
|
semanticKey?: string;
|
|
1067
1067
|
staleAfterSeconds?: DurableCallStaleAfterSeconds;
|
|
1068
1068
|
};
|
|
1069
|
+
/**
|
|
1070
|
+
* Durable freshness for one `ctx.fetch` call. The key identifies the request;
|
|
1071
|
+
* `staleAfterSeconds` controls when that completed request may be reused across
|
|
1072
|
+
* Play runs. Omit it (or pass `null`) to reuse indefinitely, pass `0` to
|
|
1073
|
+
* execute on every new run, or pass a positive number of seconds for a TTL.
|
|
1074
|
+
*
|
|
1075
|
+
* Use this for polling or periodically refreshing one external resource. It
|
|
1076
|
+
* does not change dataset row identity.
|
|
1077
|
+
*
|
|
1078
|
+
*/
|
|
1069
1079
|
type PlayAuthoringFetchOptions = {
|
|
1070
1080
|
staleAfterSeconds?: DurableCallStaleAfterSeconds;
|
|
1081
|
+
/** Run through Deepline's guarded outbound path without retaining a response receipt or checkpoint. Use this for short-lived credential exchanges or other response data that should stay in the running Play only. */
|
|
1082
|
+
transient?: boolean;
|
|
1071
1083
|
};
|
|
1072
1084
|
/**
|
|
1073
|
-
*
|
|
1085
|
+
* A durable response record, not a WHATWG `Response`: read the already-materialized `bodyText` and `json` properties; do not call `.json()`, `.text()`, or `.body`.
|
|
1074
1086
|
*
|
|
1075
1087
|
* @sdkReference runtime 175 PlayFetchResponse
|
|
1076
1088
|
*/
|
|
@@ -1092,6 +1104,35 @@ type PlayAuthoringFetchResponse = {
|
|
|
1092
1104
|
*/
|
|
1093
1105
|
json: unknown | null;
|
|
1094
1106
|
};
|
|
1107
|
+
/**
|
|
1108
|
+
* Edition 5+ `ctx.fetch` error for a non-2xx response. Its full readable body is secret-redacted; editions 1–4 retain `PlayFetchResponse { ok: false }`.
|
|
1109
|
+
*
|
|
1110
|
+
* @sdkReference runtime 178 CtxFetchHttpError
|
|
1111
|
+
*/
|
|
1112
|
+
declare class CtxFetchHttpError extends Error {
|
|
1113
|
+
readonly response: PlayAuthoringFetchResponse;
|
|
1114
|
+
/**
|
|
1115
|
+
* Play source and the runtime are separately bundled. Recognize the stable
|
|
1116
|
+
* public error code so `instanceof` works across that boundary as well.
|
|
1117
|
+
*/
|
|
1118
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
1119
|
+
/** Stable machine-readable HTTP-failure code. */
|
|
1120
|
+
readonly code: "CTX_FETCH_HTTP_ERROR";
|
|
1121
|
+
/** Upstream HTTP status. */
|
|
1122
|
+
readonly status: number;
|
|
1123
|
+
/** Upstream HTTP status text. */
|
|
1124
|
+
readonly statusText: string;
|
|
1125
|
+
/** Final response URL after redirects. */
|
|
1126
|
+
readonly url: string;
|
|
1127
|
+
/** Secret-redacted response headers. */
|
|
1128
|
+
readonly headers: Record<string, string>;
|
|
1129
|
+
/** Complete secret-redacted response body. */
|
|
1130
|
+
readonly bodyText: string;
|
|
1131
|
+
/** Eagerly parsed secret-redacted JSON, or null. */
|
|
1132
|
+
readonly json: unknown | null;
|
|
1133
|
+
/** Build the error from the durable response record. */
|
|
1134
|
+
constructor(response: PlayAuthoringFetchResponse);
|
|
1135
|
+
}
|
|
1095
1136
|
type PlayAuthoringCustomerDbQueryOptions = {
|
|
1096
1137
|
maxRows?: number;
|
|
1097
1138
|
timeoutMs?: number;
|
|
@@ -1154,7 +1195,8 @@ interface PlayAuthoringRuntimeContext {
|
|
|
1154
1195
|
*/
|
|
1155
1196
|
step<T>(id: string, run: () => T | Promise<T>, options?: PlayAuthoringRuntimeStepOptions): Promise<T>;
|
|
1156
1197
|
/**
|
|
1157
|
-
* Execute a durable
|
|
1198
|
+
* Execute a guarded HTTP request. By default it is durable and replay-safe; `staleAfterSeconds` governs only that completed call receipt, never dataset/request identity. Pass `{ transient: true }` for short-lived credential exchanges or other response data that must not be retained in a receipt or checkpoint. Edition 5+ throws `CtxFetchHttpError` for non-2xx; catch it only when the Play intentionally recovers, otherwise let it fail the Play. Editions 1–4 retain their previous response projections.
|
|
1199
|
+
*
|
|
1158
1200
|
* @sdkReference runtime 170 ctx.fetch(key, url, init)
|
|
1159
1201
|
*/
|
|
1160
1202
|
fetch(key: string, url: string | URL, init?: PlaySecretAwareRequestInit, options?: PlayAuthoringFetchOptions): Promise<PlayAuthoringFetchResponse>;
|
|
@@ -2953,4 +2995,4 @@ type PlayCompilerManifest = {
|
|
|
2953
2995
|
authoringContract?: AdmittedPlayAuthoringContract;
|
|
2954
2996
|
};
|
|
2955
2997
|
|
|
2956
|
-
export {
|
|
2998
|
+
export { type JobChangeStatus as $, type PlayAuthoringFetchResponse as A, type PlayAuthoringInputContract as B, type PlayAuthoringStepProgramStep as C, type PlayAuthoringRuntimeStepOptions as D, type PlaySqlListenerDeclaration as E, type PlaySqlListenerEvent as F, type PlaySqlListenerOperation as G, type PlaySqlQuery as H, type PlayAuthoringStepOptions as I, type PlayAuthoringStepProgram as J, type PlayAuthoringStepProgramResolver as K, type PlayAuthoringStepResolver as L, type PlayToolExecutionRequest as M, type PlayAuthoringStepProgramOptions as N, DeeplineError as O, type PlayArtifactKind as P, ToolExecutionError as Q, type ToolExecutionErrorOptions as R, CtxFetchHttpError as S, type ToolExecuteResult as T, DEEPLINE_EXTRACTOR_TARGETS as U, DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS as V, type DeeplineEmailStatusGetterValue as W, type DeeplineExtractorTarget as X, type DeeplineGetterValue as Y, type DeeplineGetterValueMap as Z, JOB_CHANGE_STATUS_VALUES as _, type PlayBundleArtifact as a, PHONE_STATUS_VALUES as a0, type PhoneStatus as a1, type PlayDataset as a2, type PlayDatasetInput as a3, type PreviousCell as a4, ProviderTransientError as a5, type ProviderTransientErrorCategory as a6, type ProviderUnavailableError as a7, type ProviderUnavailableReason as a8, type ToolExecutionErrorCategory as a9, type ToolExecutionErrorOrigin as aa, type ToolExecutionFailureV1 as ab, type ToolExecutionNetworkKind as ac, type ToolExecutionNetworkScope as ad, type ToolExecutionPublicDetails as ae, getProviderUnavailableReason as af, isDeeplineExtractorTarget as ag, isProviderUnavailable as ah, isProviderWaterfallUnavailableError as ai, type PlaySandboxRuntimeDeclaration as b, type PlayCompilerManifest as c, PLAY_ARTIFACT_KINDS as d, type PlayArtifactCompatibility as e, type PlayImportPolicy as f, type PlayPackageImport as g, type PlayRuntimeFeature as h, type PlayAuthoringColumnMap as i, type PlayAuthoringColumnResolver as j, type PlayAuthoringRuntimeContext as k, type PlayAuthoringConditionalStepResolver as l, type PlayAuthoringCsvInput as m, type PlayAuthoringCsvOptions as n, type PlayAuthoringDatasetBuilder as o, type PlayAuthoringDatasetColumnDefinition as p, type PlayAuthoringDatasetColumnRunInput 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 };
|
|
@@ -711,7 +711,7 @@ type ToolExecuteResultAccessors<TExtracted extends Record<string, unknown> = Par
|
|
|
711
711
|
*/
|
|
712
712
|
type ToolExecuteResult<TResult = unknown, TMeta = Record<string, unknown>, TExtracted extends Record<string, unknown> = Partial<DeeplineGetterValueMap>, TLists extends Record<string, Record<string, unknown>> = Record<string, Record<string, unknown>>> = ToolExecuteResultBase<TResult, TMeta> & ToolExecuteResultAccessors<TExtracted, TLists>;
|
|
713
713
|
|
|
714
|
-
declare const SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS: readonly [1, 2, 3, 4];
|
|
714
|
+
declare const SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS: readonly [1, 2, 3, 4, 5];
|
|
715
715
|
type PlayAuthoringContractEdition = (typeof SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS)[number];
|
|
716
716
|
type PlaySqlListenerOperation = 'INSERT' | 'UPDATE' | 'DELETE';
|
|
717
717
|
type PlayStandardWebhookHeaderFamily = 'standard' | 'svix';
|
|
@@ -1066,11 +1066,23 @@ type PlayAuthoringRuntimeStepOptions = {
|
|
|
1066
1066
|
semanticKey?: string;
|
|
1067
1067
|
staleAfterSeconds?: DurableCallStaleAfterSeconds;
|
|
1068
1068
|
};
|
|
1069
|
+
/**
|
|
1070
|
+
* Durable freshness for one `ctx.fetch` call. The key identifies the request;
|
|
1071
|
+
* `staleAfterSeconds` controls when that completed request may be reused across
|
|
1072
|
+
* Play runs. Omit it (or pass `null`) to reuse indefinitely, pass `0` to
|
|
1073
|
+
* execute on every new run, or pass a positive number of seconds for a TTL.
|
|
1074
|
+
*
|
|
1075
|
+
* Use this for polling or periodically refreshing one external resource. It
|
|
1076
|
+
* does not change dataset row identity.
|
|
1077
|
+
*
|
|
1078
|
+
*/
|
|
1069
1079
|
type PlayAuthoringFetchOptions = {
|
|
1070
1080
|
staleAfterSeconds?: DurableCallStaleAfterSeconds;
|
|
1081
|
+
/** Run through Deepline's guarded outbound path without retaining a response receipt or checkpoint. Use this for short-lived credential exchanges or other response data that should stay in the running Play only. */
|
|
1082
|
+
transient?: boolean;
|
|
1071
1083
|
};
|
|
1072
1084
|
/**
|
|
1073
|
-
*
|
|
1085
|
+
* A durable response record, not a WHATWG `Response`: read the already-materialized `bodyText` and `json` properties; do not call `.json()`, `.text()`, or `.body`.
|
|
1074
1086
|
*
|
|
1075
1087
|
* @sdkReference runtime 175 PlayFetchResponse
|
|
1076
1088
|
*/
|
|
@@ -1092,6 +1104,35 @@ type PlayAuthoringFetchResponse = {
|
|
|
1092
1104
|
*/
|
|
1093
1105
|
json: unknown | null;
|
|
1094
1106
|
};
|
|
1107
|
+
/**
|
|
1108
|
+
* Edition 5+ `ctx.fetch` error for a non-2xx response. Its full readable body is secret-redacted; editions 1–4 retain `PlayFetchResponse { ok: false }`.
|
|
1109
|
+
*
|
|
1110
|
+
* @sdkReference runtime 178 CtxFetchHttpError
|
|
1111
|
+
*/
|
|
1112
|
+
declare class CtxFetchHttpError extends Error {
|
|
1113
|
+
readonly response: PlayAuthoringFetchResponse;
|
|
1114
|
+
/**
|
|
1115
|
+
* Play source and the runtime are separately bundled. Recognize the stable
|
|
1116
|
+
* public error code so `instanceof` works across that boundary as well.
|
|
1117
|
+
*/
|
|
1118
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
1119
|
+
/** Stable machine-readable HTTP-failure code. */
|
|
1120
|
+
readonly code: "CTX_FETCH_HTTP_ERROR";
|
|
1121
|
+
/** Upstream HTTP status. */
|
|
1122
|
+
readonly status: number;
|
|
1123
|
+
/** Upstream HTTP status text. */
|
|
1124
|
+
readonly statusText: string;
|
|
1125
|
+
/** Final response URL after redirects. */
|
|
1126
|
+
readonly url: string;
|
|
1127
|
+
/** Secret-redacted response headers. */
|
|
1128
|
+
readonly headers: Record<string, string>;
|
|
1129
|
+
/** Complete secret-redacted response body. */
|
|
1130
|
+
readonly bodyText: string;
|
|
1131
|
+
/** Eagerly parsed secret-redacted JSON, or null. */
|
|
1132
|
+
readonly json: unknown | null;
|
|
1133
|
+
/** Build the error from the durable response record. */
|
|
1134
|
+
constructor(response: PlayAuthoringFetchResponse);
|
|
1135
|
+
}
|
|
1095
1136
|
type PlayAuthoringCustomerDbQueryOptions = {
|
|
1096
1137
|
maxRows?: number;
|
|
1097
1138
|
timeoutMs?: number;
|
|
@@ -1154,7 +1195,8 @@ interface PlayAuthoringRuntimeContext {
|
|
|
1154
1195
|
*/
|
|
1155
1196
|
step<T>(id: string, run: () => T | Promise<T>, options?: PlayAuthoringRuntimeStepOptions): Promise<T>;
|
|
1156
1197
|
/**
|
|
1157
|
-
* Execute a durable
|
|
1198
|
+
* Execute a guarded HTTP request. By default it is durable and replay-safe; `staleAfterSeconds` governs only that completed call receipt, never dataset/request identity. Pass `{ transient: true }` for short-lived credential exchanges or other response data that must not be retained in a receipt or checkpoint. Edition 5+ throws `CtxFetchHttpError` for non-2xx; catch it only when the Play intentionally recovers, otherwise let it fail the Play. Editions 1–4 retain their previous response projections.
|
|
1199
|
+
*
|
|
1158
1200
|
* @sdkReference runtime 170 ctx.fetch(key, url, init)
|
|
1159
1201
|
*/
|
|
1160
1202
|
fetch(key: string, url: string | URL, init?: PlaySecretAwareRequestInit, options?: PlayAuthoringFetchOptions): Promise<PlayAuthoringFetchResponse>;
|
|
@@ -2953,4 +2995,4 @@ type PlayCompilerManifest = {
|
|
|
2953
2995
|
authoringContract?: AdmittedPlayAuthoringContract;
|
|
2954
2996
|
};
|
|
2955
2997
|
|
|
2956
|
-
export {
|
|
2998
|
+
export { type JobChangeStatus as $, type PlayAuthoringFetchResponse as A, type PlayAuthoringInputContract as B, type PlayAuthoringStepProgramStep as C, type PlayAuthoringRuntimeStepOptions as D, type PlaySqlListenerDeclaration as E, type PlaySqlListenerEvent as F, type PlaySqlListenerOperation as G, type PlaySqlQuery as H, type PlayAuthoringStepOptions as I, type PlayAuthoringStepProgram as J, type PlayAuthoringStepProgramResolver as K, type PlayAuthoringStepResolver as L, type PlayToolExecutionRequest as M, type PlayAuthoringStepProgramOptions as N, DeeplineError as O, type PlayArtifactKind as P, ToolExecutionError as Q, type ToolExecutionErrorOptions as R, CtxFetchHttpError as S, type ToolExecuteResult as T, DEEPLINE_EXTRACTOR_TARGETS as U, DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS as V, type DeeplineEmailStatusGetterValue as W, type DeeplineExtractorTarget as X, type DeeplineGetterValue as Y, type DeeplineGetterValueMap as Z, JOB_CHANGE_STATUS_VALUES as _, type PlayBundleArtifact as a, PHONE_STATUS_VALUES as a0, type PhoneStatus as a1, type PlayDataset as a2, type PlayDatasetInput as a3, type PreviousCell as a4, ProviderTransientError as a5, type ProviderTransientErrorCategory as a6, type ProviderUnavailableError as a7, type ProviderUnavailableReason as a8, type ToolExecutionErrorCategory as a9, type ToolExecutionErrorOrigin as aa, type ToolExecutionFailureV1 as ab, type ToolExecutionNetworkKind as ac, type ToolExecutionNetworkScope as ad, type ToolExecutionPublicDetails as ae, getProviderUnavailableReason as af, isDeeplineExtractorTarget as ag, isProviderUnavailable as ah, isProviderWaterfallUnavailableError as ai, type PlaySandboxRuntimeDeclaration as b, type PlayCompilerManifest as c, PLAY_ARTIFACT_KINDS as d, type PlayArtifactCompatibility as e, type PlayImportPolicy as f, type PlayPackageImport as g, type PlayRuntimeFeature as h, type PlayAuthoringColumnMap as i, type PlayAuthoringColumnResolver as j, type PlayAuthoringRuntimeContext as k, type PlayAuthoringConditionalStepResolver as l, type PlayAuthoringCsvInput as m, type PlayAuthoringCsvOptions as n, type PlayAuthoringDatasetBuilder as o, type PlayAuthoringDatasetColumnDefinition as p, type PlayAuthoringDatasetColumnRunInput 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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./text-imports.d.ts" />
|
|
2
|
-
import { c as PlayCompilerManifest,
|
|
3
|
-
export { S as
|
|
2
|
+
import { c as PlayCompilerManifest, i as PlayAuthoringColumnMap, j as PlayAuthoringColumnResolver, k as PlayAuthoringRuntimeContext, l as PlayAuthoringConditionalStepResolver, m as PlayAuthoringCsvInput, n as PlayAuthoringCsvOptions, o as PlayAuthoringDatasetBuilder, p as PlayAuthoringDatasetColumnDefinition, q as PlayAuthoringDatasetColumnRunInput, T as ToolExecuteResult, r as PlayAuthoringReferenceLike, s as PlayReturnObject$1, t as PlayAuthoringDefineConfig, u as PlayAuthoringDefinedPlay, v as PlayAuthoringFetchOptions, w as PlayAuthoringFileInput, x as PlayAuthoringBindings, y as PlayAuthoringCallExecution, z as PlayAuthoringCallOptions, A as PlayAuthoringFetchResponse, B as PlayAuthoringInputContract, C as PlayAuthoringStepProgramStep, D as PlayAuthoringRuntimeStepOptions, E as PlaySqlListenerDeclaration, F as PlaySqlListenerEvent, G as PlaySqlListenerOperation, H as PlaySqlQuery, I as PlayAuthoringStepOptions, J as PlayAuthoringStepProgram, K as PlayAuthoringStepProgramResolver, L as PlayAuthoringStepResolver, M as PlayToolExecutionRequest, N as PlayAuthoringStepProgramOptions, O as DeeplineError, Q as ToolExecutionError, R as ToolExecutionErrorOptions } from './compiler-manifest-B47AA7As.mjs';
|
|
3
|
+
export { S as CtxFetchHttpError, U as DEEPLINE_EXTRACTOR_TARGETS, V as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, W as DeeplineEmailStatusGetterValue, X as DeeplineExtractorTarget, Y as DeeplineGetterValue, Z as DeeplineGetterValueMap, _ as JOB_CHANGE_STATUS_VALUES, $ as JobChangeStatus, a0 as PHONE_STATUS_VALUES, a1 as PhoneStatus, a2 as PlayDataset, a3 as PlayDatasetInput, a4 as PreviousCell, a5 as ProviderTransientError, a6 as ProviderTransientErrorCategory, a7 as ProviderUnavailableError, a8 as ProviderUnavailableReason, a9 as ToolExecutionErrorCategory, aa as ToolExecutionErrorOrigin, ab as ToolExecutionFailureV1, ac as ToolExecutionNetworkKind, ad as ToolExecutionNetworkScope, ae as ToolExecutionPublicDetails, af as getProviderUnavailableReason, ag as isDeeplineExtractorTarget, ah as isProviderUnavailable, ai as isProviderWaterfallUnavailableError } from './compiler-manifest-B47AA7As.mjs';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
|
|
6
6
|
declare const FIXTURE_BEHAVIOR_VERSION: 1;
|
|
@@ -779,6 +779,8 @@ interface PlayRunPackage {
|
|
|
779
779
|
playName: string;
|
|
780
780
|
status: string;
|
|
781
781
|
dashboardUrl?: string;
|
|
782
|
+
/** Durable acceptance time: the run record was created. */
|
|
783
|
+
acceptedAt?: number | null;
|
|
782
784
|
updatedAt?: number | null;
|
|
783
785
|
startedAt?: number | null;
|
|
784
786
|
finishedAt?: number | null;
|
|
@@ -3840,153 +3842,6 @@ declare class DeeplineClient {
|
|
|
3840
3842
|
}>;
|
|
3841
3843
|
}
|
|
3842
3844
|
|
|
3843
|
-
/**
|
|
3844
|
-
* Bootstrap failure: this server/deployment cannot serve the subscription
|
|
3845
|
-
* transport. Callers fall back to the support-window SSE stream (ADR-0008).
|
|
3846
|
-
*/
|
|
3847
|
-
declare class RunObserveTransportUnavailableError extends Error {
|
|
3848
|
-
readonly reason: string;
|
|
3849
|
-
constructor(message: string, reason: string);
|
|
3850
|
-
}
|
|
3851
|
-
|
|
3852
|
-
declare const SDK_VERSION: string;
|
|
3853
|
-
/** @deprecated Transitional wire id for pre-major-header SDKs only. */
|
|
3854
|
-
declare const SDK_API_CONTRACT: string;
|
|
3855
|
-
|
|
3856
|
-
/**
|
|
3857
|
-
* Thrown when the API rejects the request due to an invalid or missing API key.
|
|
3858
|
-
*
|
|
3859
|
-
* This maps to HTTP 401 responses. HTTP 403 means the caller was authenticated
|
|
3860
|
-
* but lacks permission, so the SDK preserves the server's API error instead.
|
|
3861
|
-
* The SDK never retries auth errors —
|
|
3862
|
-
* they fail immediately.
|
|
3863
|
-
*
|
|
3864
|
-
* Fix: run `deepline auth register` to obtain a valid key, or pass one via
|
|
3865
|
-
* the `apiKey` option or `DEEPLINE_API_KEY` environment variable.
|
|
3866
|
-
*
|
|
3867
|
-
* @example
|
|
3868
|
-
* ```typescript
|
|
3869
|
-
* import { AuthError } from 'deepline';
|
|
3870
|
-
*
|
|
3871
|
-
* try {
|
|
3872
|
-
* await client.listTools();
|
|
3873
|
-
* } catch (err) {
|
|
3874
|
-
* if (err instanceof AuthError) {
|
|
3875
|
-
* // Redirect user to auth flow
|
|
3876
|
-
* }
|
|
3877
|
-
* }
|
|
3878
|
-
* ```
|
|
3879
|
-
*
|
|
3880
|
-
* @sdkReference errors 090
|
|
3881
|
-
*/
|
|
3882
|
-
declare class AuthError extends DeeplineError {
|
|
3883
|
-
/** Constructed by the SDK when Deepline rejects the caller's credentials. */
|
|
3884
|
-
constructor(message?: string);
|
|
3885
|
-
}
|
|
3886
|
-
/**
|
|
3887
|
-
* Thrown when the API returns HTTP 429 (Too Many Requests).
|
|
3888
|
-
*
|
|
3889
|
-
* The SDK retries rate-limited requests automatically up to `maxRetries` times
|
|
3890
|
-
* with exponential backoff. This error is only thrown when all retries are exhausted.
|
|
3891
|
-
*
|
|
3892
|
-
* Use {@link RateLimitError.retryAfterMs} to implement your own backoff if needed.
|
|
3893
|
-
*
|
|
3894
|
-
* @example
|
|
3895
|
-
* ```typescript
|
|
3896
|
-
* import { RateLimitError } from 'deepline';
|
|
3897
|
-
*
|
|
3898
|
-
* try {
|
|
3899
|
-
* await client.executeTool('dropleads_search_people', { query: 'cto' });
|
|
3900
|
-
* } catch (err) {
|
|
3901
|
-
* if (err instanceof RateLimitError) {
|
|
3902
|
-
* console.log(`Retry after ${err.retryAfterMs}ms`);
|
|
3903
|
-
* await sleep(err.retryAfterMs);
|
|
3904
|
-
* // retry...
|
|
3905
|
-
* }
|
|
3906
|
-
* }
|
|
3907
|
-
* ```
|
|
3908
|
-
*
|
|
3909
|
-
* @sdkReference errors 100
|
|
3910
|
-
*/
|
|
3911
|
-
declare class RateLimitError extends DeeplineError {
|
|
3912
|
-
/** Milliseconds to wait before retrying, from the `Retry-After` response header. Defaults to 5000. */
|
|
3913
|
-
retryAfterMs: number;
|
|
3914
|
-
/** Constructed by the SDK after exhausting HTTP-level rate-limit retries. */
|
|
3915
|
-
constructor(retryAfterMs?: number, message?: string);
|
|
3916
|
-
}
|
|
3917
|
-
/**
|
|
3918
|
-
* Tool-specific 429 preserving both historical RateLimitError catches and the
|
|
3919
|
-
* structured ToolExecutionError ontology. JavaScript has one prototype chain,
|
|
3920
|
-
* so this class extends RateLimitError and carries ToolExecutionError's stable
|
|
3921
|
-
* cross-bundle brand.
|
|
3922
|
-
*
|
|
3923
|
-
* This class appears in external SDK calls after HTTP 429 retries are
|
|
3924
|
-
* exhausted. It also satisfies `instanceof ToolExecutionError` and, for a
|
|
3925
|
-
* provider-owned rate limit, `instanceof ProviderTransientError`. Authored
|
|
3926
|
-
* Plays should use `ProviderTransientError`; they do not need this
|
|
3927
|
-
* compatibility class.
|
|
3928
|
-
*
|
|
3929
|
-
* @sdkReference errors 110
|
|
3930
|
-
*/
|
|
3931
|
-
declare class ToolRateLimitError extends RateLimitError {
|
|
3932
|
-
/** Public tool id passed to `tools.execute`. */
|
|
3933
|
-
readonly toolId: string;
|
|
3934
|
-
/** Provider responsible for the operation, or `null`. */
|
|
3935
|
-
readonly provider: string | null;
|
|
3936
|
-
/** Provider operation name, or `null`. */
|
|
3937
|
-
readonly operation: string | null;
|
|
3938
|
-
/** Stable machine-readable failure code when one exists. */
|
|
3939
|
-
readonly code: string | undefined;
|
|
3940
|
-
/** Boundary responsible for the failure. */
|
|
3941
|
-
readonly origin: ToolExecutionError['origin'];
|
|
3942
|
-
/** Stable reason family for policy and diagnostics. */
|
|
3943
|
-
readonly category: ToolExecutionError['category'];
|
|
3944
|
-
/** Whether repeating the same semantic call is delivery-safe. */
|
|
3945
|
-
readonly retryable: boolean;
|
|
3946
|
-
/** Provider or Deepline request id, or `null`. */
|
|
3947
|
-
readonly requestId: string | null;
|
|
3948
|
-
/** Network failure kind, or `null` for non-network failures. */
|
|
3949
|
-
readonly networkKind: ToolExecutionError['networkKind'];
|
|
3950
|
-
/** Network boundary that failed, or `null` for non-network failures. */
|
|
3951
|
-
readonly networkScope: ToolExecutionError['networkScope'];
|
|
3952
|
-
/** Explicitly allowlisted diagnostics safe for SDK callers. */
|
|
3953
|
-
readonly publicDetails: ToolExecutionError['publicDetails'];
|
|
3954
|
-
/** Constructed by the SDK after a structured tool HTTP 429. */
|
|
3955
|
-
constructor(message: string, options: ToolExecutionErrorOptions);
|
|
3956
|
-
}
|
|
3957
|
-
/**
|
|
3958
|
-
* Thrown when the SDK cannot resolve a valid configuration.
|
|
3959
|
-
*
|
|
3960
|
-
* Most commonly: no API key found in any of the resolution sources
|
|
3961
|
-
* (explicit option, environment variable, CLI env files).
|
|
3962
|
-
*
|
|
3963
|
-
* @example
|
|
3964
|
-
* ```typescript
|
|
3965
|
-
* import { ConfigError } from 'deepline';
|
|
3966
|
-
*
|
|
3967
|
-
* try {
|
|
3968
|
-
* const client = new DeeplineClient();
|
|
3969
|
-
* } catch (err) {
|
|
3970
|
-
* if (err instanceof ConfigError) {
|
|
3971
|
-
* console.error('Run: deepline auth register');
|
|
3972
|
-
* }
|
|
3973
|
-
* }
|
|
3974
|
-
* ```
|
|
3975
|
-
*
|
|
3976
|
-
* @sdkReference errors 120
|
|
3977
|
-
*/
|
|
3978
|
-
declare class ConfigError extends DeeplineError {
|
|
3979
|
-
/** Construct a local SDK configuration failure. */
|
|
3980
|
-
constructor(message: string);
|
|
3981
|
-
}
|
|
3982
|
-
|
|
3983
|
-
/** Production API base URL. */
|
|
3984
|
-
declare const PROD_URL = "https://code.deepline.com";
|
|
3985
|
-
/**
|
|
3986
|
-
* Resolve SDK configuration from the public SDK CLI env contract.
|
|
3987
|
-
*/
|
|
3988
|
-
declare function resolveConfig(options?: DeeplineClientOptions): ResolvedConfig;
|
|
3989
|
-
|
|
3990
3845
|
type PlayCallExecution = PlayAuthoringCallExecution;
|
|
3991
3846
|
type PlayCallOptions = PlayAuthoringCallOptions;
|
|
3992
3847
|
type RuntimeStepOptions = PlayAuthoringRuntimeStepOptions;
|
|
@@ -4678,6 +4533,153 @@ declare const defineWorkflow: typeof definePlay;
|
|
|
4678
4533
|
*/
|
|
4679
4534
|
declare function getDefinedPlayMetadata(value: unknown): PlayMetadata | null;
|
|
4680
4535
|
|
|
4536
|
+
/**
|
|
4537
|
+
* Bootstrap failure: this server/deployment cannot serve the subscription
|
|
4538
|
+
* transport. Callers fall back to the support-window SSE stream (ADR-0008).
|
|
4539
|
+
*/
|
|
4540
|
+
declare class RunObserveTransportUnavailableError extends Error {
|
|
4541
|
+
readonly reason: string;
|
|
4542
|
+
constructor(message: string, reason: string);
|
|
4543
|
+
}
|
|
4544
|
+
|
|
4545
|
+
declare const SDK_VERSION: string;
|
|
4546
|
+
/** @deprecated Transitional wire id for pre-major-header SDKs only. */
|
|
4547
|
+
declare const SDK_API_CONTRACT: string;
|
|
4548
|
+
|
|
4549
|
+
/**
|
|
4550
|
+
* Thrown when the API rejects the request due to an invalid or missing API key.
|
|
4551
|
+
*
|
|
4552
|
+
* This maps to HTTP 401 responses. HTTP 403 means the caller was authenticated
|
|
4553
|
+
* but lacks permission, so the SDK preserves the server's API error instead.
|
|
4554
|
+
* The SDK never retries auth errors —
|
|
4555
|
+
* they fail immediately.
|
|
4556
|
+
*
|
|
4557
|
+
* Fix: run `deepline auth register` to obtain a valid key, or pass one via
|
|
4558
|
+
* the `apiKey` option or `DEEPLINE_API_KEY` environment variable.
|
|
4559
|
+
*
|
|
4560
|
+
* @example
|
|
4561
|
+
* ```typescript
|
|
4562
|
+
* import { AuthError } from 'deepline';
|
|
4563
|
+
*
|
|
4564
|
+
* try {
|
|
4565
|
+
* await client.listTools();
|
|
4566
|
+
* } catch (err) {
|
|
4567
|
+
* if (err instanceof AuthError) {
|
|
4568
|
+
* // Redirect user to auth flow
|
|
4569
|
+
* }
|
|
4570
|
+
* }
|
|
4571
|
+
* ```
|
|
4572
|
+
*
|
|
4573
|
+
* @sdkReference errors 090
|
|
4574
|
+
*/
|
|
4575
|
+
declare class AuthError extends DeeplineError {
|
|
4576
|
+
/** Constructed by the SDK when Deepline rejects the caller's credentials. */
|
|
4577
|
+
constructor(message?: string);
|
|
4578
|
+
}
|
|
4579
|
+
/**
|
|
4580
|
+
* Thrown when the API returns HTTP 429 (Too Many Requests).
|
|
4581
|
+
*
|
|
4582
|
+
* The SDK retries rate-limited requests automatically up to `maxRetries` times
|
|
4583
|
+
* with exponential backoff. This error is only thrown when all retries are exhausted.
|
|
4584
|
+
*
|
|
4585
|
+
* Use {@link RateLimitError.retryAfterMs} to implement your own backoff if needed.
|
|
4586
|
+
*
|
|
4587
|
+
* @example
|
|
4588
|
+
* ```typescript
|
|
4589
|
+
* import { RateLimitError } from 'deepline';
|
|
4590
|
+
*
|
|
4591
|
+
* try {
|
|
4592
|
+
* await client.executeTool('dropleads_search_people', { query: 'cto' });
|
|
4593
|
+
* } catch (err) {
|
|
4594
|
+
* if (err instanceof RateLimitError) {
|
|
4595
|
+
* console.log(`Retry after ${err.retryAfterMs}ms`);
|
|
4596
|
+
* await sleep(err.retryAfterMs);
|
|
4597
|
+
* // retry...
|
|
4598
|
+
* }
|
|
4599
|
+
* }
|
|
4600
|
+
* ```
|
|
4601
|
+
*
|
|
4602
|
+
* @sdkReference errors 100
|
|
4603
|
+
*/
|
|
4604
|
+
declare class RateLimitError extends DeeplineError {
|
|
4605
|
+
/** Milliseconds to wait before retrying, from the `Retry-After` response header. Defaults to 5000. */
|
|
4606
|
+
retryAfterMs: number;
|
|
4607
|
+
/** Constructed by the SDK after exhausting HTTP-level rate-limit retries. */
|
|
4608
|
+
constructor(retryAfterMs?: number, message?: string);
|
|
4609
|
+
}
|
|
4610
|
+
/**
|
|
4611
|
+
* Tool-specific 429 preserving both historical RateLimitError catches and the
|
|
4612
|
+
* structured ToolExecutionError ontology. JavaScript has one prototype chain,
|
|
4613
|
+
* so this class extends RateLimitError and carries ToolExecutionError's stable
|
|
4614
|
+
* cross-bundle brand.
|
|
4615
|
+
*
|
|
4616
|
+
* This class appears in external SDK calls after HTTP 429 retries are
|
|
4617
|
+
* exhausted. It also satisfies `instanceof ToolExecutionError` and, for a
|
|
4618
|
+
* provider-owned rate limit, `instanceof ProviderTransientError`. Authored
|
|
4619
|
+
* Plays should use `ProviderTransientError`; they do not need this
|
|
4620
|
+
* compatibility class.
|
|
4621
|
+
*
|
|
4622
|
+
* @sdkReference errors 110
|
|
4623
|
+
*/
|
|
4624
|
+
declare class ToolRateLimitError extends RateLimitError {
|
|
4625
|
+
/** Public tool id passed to `tools.execute`. */
|
|
4626
|
+
readonly toolId: string;
|
|
4627
|
+
/** Provider responsible for the operation, or `null`. */
|
|
4628
|
+
readonly provider: string | null;
|
|
4629
|
+
/** Provider operation name, or `null`. */
|
|
4630
|
+
readonly operation: string | null;
|
|
4631
|
+
/** Stable machine-readable failure code when one exists. */
|
|
4632
|
+
readonly code: string | undefined;
|
|
4633
|
+
/** Boundary responsible for the failure. */
|
|
4634
|
+
readonly origin: ToolExecutionError['origin'];
|
|
4635
|
+
/** Stable reason family for policy and diagnostics. */
|
|
4636
|
+
readonly category: ToolExecutionError['category'];
|
|
4637
|
+
/** Whether repeating the same semantic call is delivery-safe. */
|
|
4638
|
+
readonly retryable: boolean;
|
|
4639
|
+
/** Provider or Deepline request id, or `null`. */
|
|
4640
|
+
readonly requestId: string | null;
|
|
4641
|
+
/** Network failure kind, or `null` for non-network failures. */
|
|
4642
|
+
readonly networkKind: ToolExecutionError['networkKind'];
|
|
4643
|
+
/** Network boundary that failed, or `null` for non-network failures. */
|
|
4644
|
+
readonly networkScope: ToolExecutionError['networkScope'];
|
|
4645
|
+
/** Explicitly allowlisted diagnostics safe for SDK callers. */
|
|
4646
|
+
readonly publicDetails: ToolExecutionError['publicDetails'];
|
|
4647
|
+
/** Constructed by the SDK after a structured tool HTTP 429. */
|
|
4648
|
+
constructor(message: string, options: ToolExecutionErrorOptions);
|
|
4649
|
+
}
|
|
4650
|
+
/**
|
|
4651
|
+
* Thrown when the SDK cannot resolve a valid configuration.
|
|
4652
|
+
*
|
|
4653
|
+
* Most commonly: no API key found in any of the resolution sources
|
|
4654
|
+
* (explicit option, environment variable, CLI env files).
|
|
4655
|
+
*
|
|
4656
|
+
* @example
|
|
4657
|
+
* ```typescript
|
|
4658
|
+
* import { ConfigError } from 'deepline';
|
|
4659
|
+
*
|
|
4660
|
+
* try {
|
|
4661
|
+
* const client = new DeeplineClient();
|
|
4662
|
+
* } catch (err) {
|
|
4663
|
+
* if (err instanceof ConfigError) {
|
|
4664
|
+
* console.error('Run: deepline auth register');
|
|
4665
|
+
* }
|
|
4666
|
+
* }
|
|
4667
|
+
* ```
|
|
4668
|
+
*
|
|
4669
|
+
* @sdkReference errors 120
|
|
4670
|
+
*/
|
|
4671
|
+
declare class ConfigError extends DeeplineError {
|
|
4672
|
+
/** Construct a local SDK configuration failure. */
|
|
4673
|
+
constructor(message: string);
|
|
4674
|
+
}
|
|
4675
|
+
|
|
4676
|
+
/** Production API base URL. */
|
|
4677
|
+
declare const PROD_URL = "https://code.deepline.com";
|
|
4678
|
+
/**
|
|
4679
|
+
* Resolve SDK configuration from the public SDK CLI env contract.
|
|
4680
|
+
*/
|
|
4681
|
+
declare function resolveConfig(options?: DeeplineClientOptions): ResolvedConfig;
|
|
4682
|
+
|
|
4681
4683
|
/**
|
|
4682
4684
|
* Result of converting a tool response to a list of records.
|
|
4683
4685
|
*
|