deepline 0.3.50 → 0.3.52
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/shared_libs/play-runtime/context.ts +81 -20
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +52 -21
- package/dist/bundling-sources/shared_libs/play-runtime/secret-capability.ts +5 -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 +144 -2745
- package/dist/cli/index.mjs +41 -2643
- 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 +149 -149
- package/dist/index.d.ts +149 -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
package/dist/index.d.ts
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.js';
|
|
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.js';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
|
|
6
6
|
declare const FIXTURE_BEHAVIOR_VERSION: 1;
|
|
@@ -3842,153 +3842,6 @@ declare class DeeplineClient {
|
|
|
3842
3842
|
}>;
|
|
3843
3843
|
}
|
|
3844
3844
|
|
|
3845
|
-
/**
|
|
3846
|
-
* Bootstrap failure: this server/deployment cannot serve the subscription
|
|
3847
|
-
* transport. Callers fall back to the support-window SSE stream (ADR-0008).
|
|
3848
|
-
*/
|
|
3849
|
-
declare class RunObserveTransportUnavailableError extends Error {
|
|
3850
|
-
readonly reason: string;
|
|
3851
|
-
constructor(message: string, reason: string);
|
|
3852
|
-
}
|
|
3853
|
-
|
|
3854
|
-
declare const SDK_VERSION: string;
|
|
3855
|
-
/** @deprecated Transitional wire id for pre-major-header SDKs only. */
|
|
3856
|
-
declare const SDK_API_CONTRACT: string;
|
|
3857
|
-
|
|
3858
|
-
/**
|
|
3859
|
-
* Thrown when the API rejects the request due to an invalid or missing API key.
|
|
3860
|
-
*
|
|
3861
|
-
* This maps to HTTP 401 responses. HTTP 403 means the caller was authenticated
|
|
3862
|
-
* but lacks permission, so the SDK preserves the server's API error instead.
|
|
3863
|
-
* The SDK never retries auth errors —
|
|
3864
|
-
* they fail immediately.
|
|
3865
|
-
*
|
|
3866
|
-
* Fix: run `deepline auth register` to obtain a valid key, or pass one via
|
|
3867
|
-
* the `apiKey` option or `DEEPLINE_API_KEY` environment variable.
|
|
3868
|
-
*
|
|
3869
|
-
* @example
|
|
3870
|
-
* ```typescript
|
|
3871
|
-
* import { AuthError } from 'deepline';
|
|
3872
|
-
*
|
|
3873
|
-
* try {
|
|
3874
|
-
* await client.listTools();
|
|
3875
|
-
* } catch (err) {
|
|
3876
|
-
* if (err instanceof AuthError) {
|
|
3877
|
-
* // Redirect user to auth flow
|
|
3878
|
-
* }
|
|
3879
|
-
* }
|
|
3880
|
-
* ```
|
|
3881
|
-
*
|
|
3882
|
-
* @sdkReference errors 090
|
|
3883
|
-
*/
|
|
3884
|
-
declare class AuthError extends DeeplineError {
|
|
3885
|
-
/** Constructed by the SDK when Deepline rejects the caller's credentials. */
|
|
3886
|
-
constructor(message?: string);
|
|
3887
|
-
}
|
|
3888
|
-
/**
|
|
3889
|
-
* Thrown when the API returns HTTP 429 (Too Many Requests).
|
|
3890
|
-
*
|
|
3891
|
-
* The SDK retries rate-limited requests automatically up to `maxRetries` times
|
|
3892
|
-
* with exponential backoff. This error is only thrown when all retries are exhausted.
|
|
3893
|
-
*
|
|
3894
|
-
* Use {@link RateLimitError.retryAfterMs} to implement your own backoff if needed.
|
|
3895
|
-
*
|
|
3896
|
-
* @example
|
|
3897
|
-
* ```typescript
|
|
3898
|
-
* import { RateLimitError } from 'deepline';
|
|
3899
|
-
*
|
|
3900
|
-
* try {
|
|
3901
|
-
* await client.executeTool('dropleads_search_people', { query: 'cto' });
|
|
3902
|
-
* } catch (err) {
|
|
3903
|
-
* if (err instanceof RateLimitError) {
|
|
3904
|
-
* console.log(`Retry after ${err.retryAfterMs}ms`);
|
|
3905
|
-
* await sleep(err.retryAfterMs);
|
|
3906
|
-
* // retry...
|
|
3907
|
-
* }
|
|
3908
|
-
* }
|
|
3909
|
-
* ```
|
|
3910
|
-
*
|
|
3911
|
-
* @sdkReference errors 100
|
|
3912
|
-
*/
|
|
3913
|
-
declare class RateLimitError extends DeeplineError {
|
|
3914
|
-
/** Milliseconds to wait before retrying, from the `Retry-After` response header. Defaults to 5000. */
|
|
3915
|
-
retryAfterMs: number;
|
|
3916
|
-
/** Constructed by the SDK after exhausting HTTP-level rate-limit retries. */
|
|
3917
|
-
constructor(retryAfterMs?: number, message?: string);
|
|
3918
|
-
}
|
|
3919
|
-
/**
|
|
3920
|
-
* Tool-specific 429 preserving both historical RateLimitError catches and the
|
|
3921
|
-
* structured ToolExecutionError ontology. JavaScript has one prototype chain,
|
|
3922
|
-
* so this class extends RateLimitError and carries ToolExecutionError's stable
|
|
3923
|
-
* cross-bundle brand.
|
|
3924
|
-
*
|
|
3925
|
-
* This class appears in external SDK calls after HTTP 429 retries are
|
|
3926
|
-
* exhausted. It also satisfies `instanceof ToolExecutionError` and, for a
|
|
3927
|
-
* provider-owned rate limit, `instanceof ProviderTransientError`. Authored
|
|
3928
|
-
* Plays should use `ProviderTransientError`; they do not need this
|
|
3929
|
-
* compatibility class.
|
|
3930
|
-
*
|
|
3931
|
-
* @sdkReference errors 110
|
|
3932
|
-
*/
|
|
3933
|
-
declare class ToolRateLimitError extends RateLimitError {
|
|
3934
|
-
/** Public tool id passed to `tools.execute`. */
|
|
3935
|
-
readonly toolId: string;
|
|
3936
|
-
/** Provider responsible for the operation, or `null`. */
|
|
3937
|
-
readonly provider: string | null;
|
|
3938
|
-
/** Provider operation name, or `null`. */
|
|
3939
|
-
readonly operation: string | null;
|
|
3940
|
-
/** Stable machine-readable failure code when one exists. */
|
|
3941
|
-
readonly code: string | undefined;
|
|
3942
|
-
/** Boundary responsible for the failure. */
|
|
3943
|
-
readonly origin: ToolExecutionError['origin'];
|
|
3944
|
-
/** Stable reason family for policy and diagnostics. */
|
|
3945
|
-
readonly category: ToolExecutionError['category'];
|
|
3946
|
-
/** Whether repeating the same semantic call is delivery-safe. */
|
|
3947
|
-
readonly retryable: boolean;
|
|
3948
|
-
/** Provider or Deepline request id, or `null`. */
|
|
3949
|
-
readonly requestId: string | null;
|
|
3950
|
-
/** Network failure kind, or `null` for non-network failures. */
|
|
3951
|
-
readonly networkKind: ToolExecutionError['networkKind'];
|
|
3952
|
-
/** Network boundary that failed, or `null` for non-network failures. */
|
|
3953
|
-
readonly networkScope: ToolExecutionError['networkScope'];
|
|
3954
|
-
/** Explicitly allowlisted diagnostics safe for SDK callers. */
|
|
3955
|
-
readonly publicDetails: ToolExecutionError['publicDetails'];
|
|
3956
|
-
/** Constructed by the SDK after a structured tool HTTP 429. */
|
|
3957
|
-
constructor(message: string, options: ToolExecutionErrorOptions);
|
|
3958
|
-
}
|
|
3959
|
-
/**
|
|
3960
|
-
* Thrown when the SDK cannot resolve a valid configuration.
|
|
3961
|
-
*
|
|
3962
|
-
* Most commonly: no API key found in any of the resolution sources
|
|
3963
|
-
* (explicit option, environment variable, CLI env files).
|
|
3964
|
-
*
|
|
3965
|
-
* @example
|
|
3966
|
-
* ```typescript
|
|
3967
|
-
* import { ConfigError } from 'deepline';
|
|
3968
|
-
*
|
|
3969
|
-
* try {
|
|
3970
|
-
* const client = new DeeplineClient();
|
|
3971
|
-
* } catch (err) {
|
|
3972
|
-
* if (err instanceof ConfigError) {
|
|
3973
|
-
* console.error('Run: deepline auth register');
|
|
3974
|
-
* }
|
|
3975
|
-
* }
|
|
3976
|
-
* ```
|
|
3977
|
-
*
|
|
3978
|
-
* @sdkReference errors 120
|
|
3979
|
-
*/
|
|
3980
|
-
declare class ConfigError extends DeeplineError {
|
|
3981
|
-
/** Construct a local SDK configuration failure. */
|
|
3982
|
-
constructor(message: string);
|
|
3983
|
-
}
|
|
3984
|
-
|
|
3985
|
-
/** Production API base URL. */
|
|
3986
|
-
declare const PROD_URL = "https://code.deepline.com";
|
|
3987
|
-
/**
|
|
3988
|
-
* Resolve SDK configuration from the public SDK CLI env contract.
|
|
3989
|
-
*/
|
|
3990
|
-
declare function resolveConfig(options?: DeeplineClientOptions): ResolvedConfig;
|
|
3991
|
-
|
|
3992
3845
|
type PlayCallExecution = PlayAuthoringCallExecution;
|
|
3993
3846
|
type PlayCallOptions = PlayAuthoringCallOptions;
|
|
3994
3847
|
type RuntimeStepOptions = PlayAuthoringRuntimeStepOptions;
|
|
@@ -4680,6 +4533,153 @@ declare const defineWorkflow: typeof definePlay;
|
|
|
4680
4533
|
*/
|
|
4681
4534
|
declare function getDefinedPlayMetadata(value: unknown): PlayMetadata | null;
|
|
4682
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
|
+
|
|
4683
4683
|
/**
|
|
4684
4684
|
* Result of converting a tool response to a list of records.
|
|
4685
4685
|
*
|