deepline 0.1.153 → 0.1.155
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/apps/play-runner-workers/src/coordinator-entry.ts +15 -0
- package/dist/bundling-sources/apps/play-runner-workers/src/entry.ts +1180 -825
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/batching.ts +34 -18
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/harness-receipt-store.ts +41 -0
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/receipts.ts +143 -8
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/tool-receipts.ts +104 -0
- package/dist/bundling-sources/sdk/src/index.ts +0 -1
- package/dist/bundling-sources/sdk/src/play.ts +3 -48
- package/dist/bundling-sources/sdk/src/plays/harness-stub.ts +27 -2
- package/dist/bundling-sources/sdk/src/release.ts +6 -4
- package/dist/bundling-sources/sdk/src/worker-play-entry.ts +0 -10
- package/dist/bundling-sources/shared_libs/play-data-plane/index.ts +0 -1
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +87 -0
- package/dist/bundling-sources/shared_libs/play-runtime/batch-runtime.ts +0 -59
- package/dist/bundling-sources/shared_libs/play-runtime/cell-staleness.ts +0 -253
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +805 -1570
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +47 -74
- package/dist/bundling-sources/shared_libs/play-runtime/default-batch-strategies.ts +36 -14
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +145 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +284 -0
- package/dist/bundling-sources/shared_libs/play-runtime/postgres-json.ts +12 -5
- package/dist/bundling-sources/shared_libs/play-runtime/run-lifecycle-policy.ts +78 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +10 -45
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-actions.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +923 -535
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-pg-driver-neon-serverless.ts +45 -76
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-pg-driver.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/step-program-dataset-builder.ts +1 -14
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execution-outcome.ts +159 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result-types.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipts.ts +32 -0
- package/dist/bundling-sources/shared_libs/plays/definition.ts +4 -2
- package/dist/bundling-sources/shared_libs/plays/runtime-validation.ts +3 -14
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +1 -43
- package/dist/cli/index.js +1305 -401
- package/dist/cli/index.mjs +1273 -363
- package/dist/{compiler-manifest-BjoRENv9.d.ts → compiler-manifest-DW1flrHk.d.mts} +0 -9
- package/dist/{compiler-manifest-BjoRENv9.d.mts → compiler-manifest-DW1flrHk.d.ts} +0 -9
- package/dist/index.d.mts +9 -38
- package/dist/index.d.ts +9 -38
- package/dist/index.js +26 -13
- package/dist/index.mjs +26 -13
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/package.json +1 -1
- package/dist/bundling-sources/shared_libs/play-data-plane/cell-policy.ts +0 -76
- package/dist/bundling-sources/shared_libs/play-runtime/progress-emitter.ts +0 -197
- package/dist/bundling-sources/shared_libs/play-runtime/waterfall-replay.ts +0 -79
|
@@ -70,9 +70,6 @@ interface PlayStaticColumnProducer {
|
|
|
70
70
|
toolId?: string;
|
|
71
71
|
playId?: string;
|
|
72
72
|
dependsOnFields?: string[];
|
|
73
|
-
recompute?: boolean;
|
|
74
|
-
recomputeOnError?: boolean;
|
|
75
|
-
staleAfterSeconds?: number;
|
|
76
73
|
conditional?: boolean;
|
|
77
74
|
sourceRange?: PlayStaticSourceRange;
|
|
78
75
|
steps?: PlayStaticColumnProducer[];
|
|
@@ -82,9 +79,6 @@ interface PlayStaticDatasetColumn {
|
|
|
82
79
|
id: string;
|
|
83
80
|
source: PlaySheetColumnSource;
|
|
84
81
|
sqlName?: string;
|
|
85
|
-
recompute?: boolean;
|
|
86
|
-
recomputeOnError?: boolean;
|
|
87
|
-
staleAfterSeconds?: number;
|
|
88
82
|
producers: PlayStaticColumnProducer[];
|
|
89
83
|
}
|
|
90
84
|
interface PlayStaticSourceRange {
|
|
@@ -97,9 +91,6 @@ interface PlayStaticSourceRange {
|
|
|
97
91
|
type PlayStaticSubstepMetadata = {
|
|
98
92
|
conditional?: boolean;
|
|
99
93
|
dependsOnFields?: string[];
|
|
100
|
-
recompute?: boolean;
|
|
101
|
-
recomputeOnError?: boolean;
|
|
102
|
-
staleAfterSeconds?: number;
|
|
103
94
|
};
|
|
104
95
|
type PlayStaticSubstep = PlayStaticSubstepMetadata & ({
|
|
105
96
|
type: 'csv';
|
|
@@ -70,9 +70,6 @@ interface PlayStaticColumnProducer {
|
|
|
70
70
|
toolId?: string;
|
|
71
71
|
playId?: string;
|
|
72
72
|
dependsOnFields?: string[];
|
|
73
|
-
recompute?: boolean;
|
|
74
|
-
recomputeOnError?: boolean;
|
|
75
|
-
staleAfterSeconds?: number;
|
|
76
73
|
conditional?: boolean;
|
|
77
74
|
sourceRange?: PlayStaticSourceRange;
|
|
78
75
|
steps?: PlayStaticColumnProducer[];
|
|
@@ -82,9 +79,6 @@ interface PlayStaticDatasetColumn {
|
|
|
82
79
|
id: string;
|
|
83
80
|
source: PlaySheetColumnSource;
|
|
84
81
|
sqlName?: string;
|
|
85
|
-
recompute?: boolean;
|
|
86
|
-
recomputeOnError?: boolean;
|
|
87
|
-
staleAfterSeconds?: number;
|
|
88
82
|
producers: PlayStaticColumnProducer[];
|
|
89
83
|
}
|
|
90
84
|
interface PlayStaticSourceRange {
|
|
@@ -97,9 +91,6 @@ interface PlayStaticSourceRange {
|
|
|
97
91
|
type PlayStaticSubstepMetadata = {
|
|
98
92
|
conditional?: boolean;
|
|
99
93
|
dependsOnFields?: string[];
|
|
100
|
-
recompute?: boolean;
|
|
101
|
-
recomputeOnError?: boolean;
|
|
102
|
-
staleAfterSeconds?: number;
|
|
103
94
|
};
|
|
104
95
|
type PlayStaticSubstep = PlayStaticSubstepMetadata & ({
|
|
105
96
|
type: 'csv';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as PlayCompilerManifest } from './compiler-manifest-
|
|
1
|
+
import { a as PlayCompilerManifest } from './compiler-manifest-DW1flrHk.mjs';
|
|
2
2
|
|
|
3
3
|
declare const DEEPLINE_TOOL_CATEGORIES: readonly ["company_search", "people_search", "people_enrich", "email_finder", "email_verify", "phone_finder", "phone_verify", "identity_resolution", "reverse_lookup", "enrichment", "batch", "premium", "free"];
|
|
4
4
|
type DeeplineToolCategory = (typeof DEEPLINE_TOOL_CATEGORIES)[number] | (string & {});
|
|
@@ -2663,8 +2663,11 @@ interface PlayDataset<T> extends AsyncIterable<T> {
|
|
|
2663
2663
|
type ToolResultExecutionMetadata = {
|
|
2664
2664
|
idempotent: true;
|
|
2665
2665
|
cached: boolean;
|
|
2666
|
-
source: 'live' | 'checkpoint' | 'cache';
|
|
2666
|
+
source: 'live' | 'checkpoint' | 'cache' | 'in_flight';
|
|
2667
2667
|
cacheKey?: string;
|
|
2668
|
+
receiptRole?: 'owner' | 'follower';
|
|
2669
|
+
receiptKey?: string;
|
|
2670
|
+
attachedToReceiptKey?: string;
|
|
2668
2671
|
};
|
|
2669
2672
|
type ToolResultTargetMetadata = {
|
|
2670
2673
|
value: unknown;
|
|
@@ -2929,21 +2932,6 @@ type ToolExecutionRequest = {
|
|
|
2929
2932
|
/** Numeric TTL in seconds for this tool checkpoint. */
|
|
2930
2933
|
staleAfterSeconds?: number;
|
|
2931
2934
|
};
|
|
2932
|
-
/**
|
|
2933
|
-
* Freshness policy for dataset cells and step-program columns.
|
|
2934
|
-
*
|
|
2935
|
-
* Use a positive whole number of seconds for a fixed TTL. Use a function when
|
|
2936
|
-
* the next expiry depends on the value that was just produced. The function
|
|
2937
|
-
* receives the completed cell value; return a positive whole number of seconds
|
|
2938
|
-
* to set the next expiry, or `null` to keep that value indefinitely.
|
|
2939
|
-
*
|
|
2940
|
-
* Result-based policies are evaluated only for dataset/step-program cells. The
|
|
2941
|
-
* scalar `ctx.step`, `ctx.fetch`, `ctx.runPlay`, and `ctx.tools.execute` APIs
|
|
2942
|
-
* accept numeric TTLs.
|
|
2943
|
-
*
|
|
2944
|
-
* @sdkReference runtime 080
|
|
2945
|
-
*/
|
|
2946
|
-
type StaleAfterSeconds<Value = unknown> = number | ((value: Value) => number | null);
|
|
2947
2935
|
type StepResolver<Row, Value> = (row: Row, ctx: DeeplinePlayRuntimeContext, index: number, previousCell?: PreviousCell<Value>) => Value | Promise<Value>;
|
|
2948
2936
|
/**
|
|
2949
2937
|
* Input object passed to an object-column `run` resolver.
|
|
@@ -2968,8 +2956,7 @@ type DatasetColumnRunInput<Row, Value> = {
|
|
|
2968
2956
|
/**
|
|
2969
2957
|
* Object-column form for `.withColumn(...)`.
|
|
2970
2958
|
*
|
|
2971
|
-
* Use this when a column needs `runIf
|
|
2972
|
-
* result-based `staleAfterSeconds(value)` policy.
|
|
2959
|
+
* Use this when a column needs `runIf` or typed `previousCell`.
|
|
2973
2960
|
*
|
|
2974
2961
|
* @sdkReference runtime 100
|
|
2975
2962
|
*/
|
|
@@ -2978,12 +2965,6 @@ type DatasetColumnDefinition<Row, Value> = {
|
|
|
2978
2965
|
run: (input: DatasetColumnRunInput<Row, Value>) => Value | Promise<Value>;
|
|
2979
2966
|
/** Optional row-level gate. Skipped rows produce `null` for this column. */
|
|
2980
2967
|
readonly runIf?: (row: Row, index: number) => boolean | Promise<boolean>;
|
|
2981
|
-
/** Recompute this cell on each run instead of reusing its durable value. */
|
|
2982
|
-
readonly recompute?: boolean;
|
|
2983
|
-
/** Recompute this cell when its durable value is an error-shaped object. */
|
|
2984
|
-
readonly recomputeOnError?: boolean;
|
|
2985
|
-
/** Fixed or value-dependent freshness policy for this cell. */
|
|
2986
|
-
readonly staleAfterSeconds?: StaleAfterSeconds<Value>;
|
|
2987
2968
|
};
|
|
2988
2969
|
type ConditionalStepResolver<Row, Value, Else = null> = {
|
|
2989
2970
|
readonly kind: 'conditional';
|
|
@@ -3000,12 +2981,6 @@ type ConditionalStepResolver<Row, Value, Else = null> = {
|
|
|
3000
2981
|
type StepOptions<Row, Value = unknown> = {
|
|
3001
2982
|
/** Optional row-level gate. Skipped rows produce `null` for this column. */
|
|
3002
2983
|
readonly runIf?: (row: Row, index: number) => boolean | Promise<boolean>;
|
|
3003
|
-
/** Recompute this cell on each run instead of reusing its durable value. */
|
|
3004
|
-
readonly recompute?: boolean;
|
|
3005
|
-
/** Recompute this cell when its durable value is an error-shaped object. */
|
|
3006
|
-
readonly recomputeOnError?: boolean;
|
|
3007
|
-
/** Fixed or value-dependent freshness policy for this cell. */
|
|
3008
|
-
readonly staleAfterSeconds?: StaleAfterSeconds<Value>;
|
|
3009
2984
|
};
|
|
3010
2985
|
type StepProgram<Input, Output, Return = Output> = {
|
|
3011
2986
|
readonly kind: 'steps';
|
|
@@ -3024,9 +2999,6 @@ type StepProgramResolver<Input, Return> = {
|
|
|
3024
2999
|
};
|
|
3025
3000
|
type PlayStepProgramStep = {
|
|
3026
3001
|
readonly name: string;
|
|
3027
|
-
readonly recompute?: boolean;
|
|
3028
|
-
readonly recomputeOnError?: boolean;
|
|
3029
|
-
readonly staleAfterSeconds?: StaleAfterSeconds;
|
|
3030
3002
|
readonly resolver: StepResolver<Record<string, unknown>, unknown> | ConditionalStepResolver<Record<string, unknown>, unknown> | StepProgramResolver<Record<string, unknown>, unknown>;
|
|
3031
3003
|
};
|
|
3032
3004
|
type ColumnResolver<Row, Value> = StepResolver<Row, Value> | ConditionalStepResolver<Row, Value> | StepProgramResolver<Row, Value>;
|
|
@@ -3065,8 +3037,7 @@ type DatasetBuilder<InputRow extends object, OutputRow extends object> = {
|
|
|
3065
3037
|
/**
|
|
3066
3038
|
* Define one output column with object-column authoring.
|
|
3067
3039
|
*
|
|
3068
|
-
* Use this form for typed `previousCell` access
|
|
3069
|
-
* `staleAfterSeconds(value)` policies.
|
|
3040
|
+
* Use this form for typed `previousCell` access.
|
|
3070
3041
|
*
|
|
3071
3042
|
* @param name - Output column name.
|
|
3072
3043
|
* @param definition - Object-column definition.
|
|
@@ -3078,7 +3049,7 @@ type DatasetBuilder<InputRow extends object, OutputRow extends object> = {
|
|
|
3078
3049
|
*
|
|
3079
3050
|
* @param name - Output column name.
|
|
3080
3051
|
* @param resolver - Computes the value for one row.
|
|
3081
|
-
* @param options - Row gate
|
|
3052
|
+
* @param options - Row gate options.
|
|
3082
3053
|
* @returns The same dataset builder with a nullable column type for skipped rows.
|
|
3083
3054
|
*/
|
|
3084
3055
|
withColumn<Name extends string, Value>(name: Name, resolver: StepResolver<OutputRow, Value> | StepProgramResolver<OutputRow, Value>, options: StepOptions<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value | null>>;
|
|
@@ -4071,4 +4042,4 @@ declare function writeCsvOutputFile(rows: Array<Record<string, unknown>>, stem:
|
|
|
4071
4042
|
*/
|
|
4072
4043
|
declare function extractSummaryFields(payload: unknown): Record<string, Scalar>;
|
|
4073
4044
|
|
|
4074
|
-
export { AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_EXTRACTOR_TARGETS, DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, type DeeplineEmailStatusGetterValue, DeeplineError, type DeeplineExtractorTarget, type DeeplineGetterValue, type DeeplineGetterValueMap, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type FileInput, JOB_CHANGE_STATUS_VALUES, type JobChangeStatus, type LiveEventEnvelope, PHONE_STATUS_VALUES, 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 PhoneStatus, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayDataset, type PlayDatasetInput, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayRevisionSummary, type PlayRunResult, type PlayRunStart, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PrebuiltPlayRef, type PreviousCell, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type ResolvedConfig, RunObserveTransportUnavailableError, type RunsListOptions, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type
|
|
4045
|
+
export { AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_EXTRACTOR_TARGETS, DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, type DeeplineEmailStatusGetterValue, DeeplineError, type DeeplineExtractorTarget, type DeeplineGetterValue, type DeeplineGetterValueMap, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type FileInput, JOB_CHANGE_STATUS_VALUES, type JobChangeStatus, type LiveEventEnvelope, PHONE_STATUS_VALUES, 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 PhoneStatus, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayDataset, type PlayDatasetInput, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayRevisionSummary, type PlayRunResult, type PlayRunStart, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PrebuiltPlayRef, type PreviousCell, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type ResolvedConfig, RunObserveTransportUnavailableError, type RunsListOptions, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type StartPlayRunRequest, type StepOptions, type StepProgram, type StepProgramResolver, type StepResolver, type StopPlayRunResult, type ToolDefinition, type ToolExecuteResult, type ToolExecution, type ToolExecutionRequest, type ToolMetadata, type ToolSearchOptions, type ToolSearchResult, defineInput, definePlay, defineWorkflow, extractSummaryFields, formatPlayBootstrapFinderKinds, formatPlayBootstrapFinderKindsForSentence, formatPlayBootstrapTemplates, getDefinedPlayMetadata, isDeeplineExtractorTarget, isPlayBootstrapFinderKind, isPlayBootstrapTemplate, resolveConfig, runIf, steps, tryConvertToList, writeCsvOutputFile, writeJsonOutputFile };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as PlayCompilerManifest } from './compiler-manifest-
|
|
1
|
+
import { a as PlayCompilerManifest } from './compiler-manifest-DW1flrHk.js';
|
|
2
2
|
|
|
3
3
|
declare const DEEPLINE_TOOL_CATEGORIES: readonly ["company_search", "people_search", "people_enrich", "email_finder", "email_verify", "phone_finder", "phone_verify", "identity_resolution", "reverse_lookup", "enrichment", "batch", "premium", "free"];
|
|
4
4
|
type DeeplineToolCategory = (typeof DEEPLINE_TOOL_CATEGORIES)[number] | (string & {});
|
|
@@ -2663,8 +2663,11 @@ interface PlayDataset<T> extends AsyncIterable<T> {
|
|
|
2663
2663
|
type ToolResultExecutionMetadata = {
|
|
2664
2664
|
idempotent: true;
|
|
2665
2665
|
cached: boolean;
|
|
2666
|
-
source: 'live' | 'checkpoint' | 'cache';
|
|
2666
|
+
source: 'live' | 'checkpoint' | 'cache' | 'in_flight';
|
|
2667
2667
|
cacheKey?: string;
|
|
2668
|
+
receiptRole?: 'owner' | 'follower';
|
|
2669
|
+
receiptKey?: string;
|
|
2670
|
+
attachedToReceiptKey?: string;
|
|
2668
2671
|
};
|
|
2669
2672
|
type ToolResultTargetMetadata = {
|
|
2670
2673
|
value: unknown;
|
|
@@ -2929,21 +2932,6 @@ type ToolExecutionRequest = {
|
|
|
2929
2932
|
/** Numeric TTL in seconds for this tool checkpoint. */
|
|
2930
2933
|
staleAfterSeconds?: number;
|
|
2931
2934
|
};
|
|
2932
|
-
/**
|
|
2933
|
-
* Freshness policy for dataset cells and step-program columns.
|
|
2934
|
-
*
|
|
2935
|
-
* Use a positive whole number of seconds for a fixed TTL. Use a function when
|
|
2936
|
-
* the next expiry depends on the value that was just produced. The function
|
|
2937
|
-
* receives the completed cell value; return a positive whole number of seconds
|
|
2938
|
-
* to set the next expiry, or `null` to keep that value indefinitely.
|
|
2939
|
-
*
|
|
2940
|
-
* Result-based policies are evaluated only for dataset/step-program cells. The
|
|
2941
|
-
* scalar `ctx.step`, `ctx.fetch`, `ctx.runPlay`, and `ctx.tools.execute` APIs
|
|
2942
|
-
* accept numeric TTLs.
|
|
2943
|
-
*
|
|
2944
|
-
* @sdkReference runtime 080
|
|
2945
|
-
*/
|
|
2946
|
-
type StaleAfterSeconds<Value = unknown> = number | ((value: Value) => number | null);
|
|
2947
2935
|
type StepResolver<Row, Value> = (row: Row, ctx: DeeplinePlayRuntimeContext, index: number, previousCell?: PreviousCell<Value>) => Value | Promise<Value>;
|
|
2948
2936
|
/**
|
|
2949
2937
|
* Input object passed to an object-column `run` resolver.
|
|
@@ -2968,8 +2956,7 @@ type DatasetColumnRunInput<Row, Value> = {
|
|
|
2968
2956
|
/**
|
|
2969
2957
|
* Object-column form for `.withColumn(...)`.
|
|
2970
2958
|
*
|
|
2971
|
-
* Use this when a column needs `runIf
|
|
2972
|
-
* result-based `staleAfterSeconds(value)` policy.
|
|
2959
|
+
* Use this when a column needs `runIf` or typed `previousCell`.
|
|
2973
2960
|
*
|
|
2974
2961
|
* @sdkReference runtime 100
|
|
2975
2962
|
*/
|
|
@@ -2978,12 +2965,6 @@ type DatasetColumnDefinition<Row, Value> = {
|
|
|
2978
2965
|
run: (input: DatasetColumnRunInput<Row, Value>) => Value | Promise<Value>;
|
|
2979
2966
|
/** Optional row-level gate. Skipped rows produce `null` for this column. */
|
|
2980
2967
|
readonly runIf?: (row: Row, index: number) => boolean | Promise<boolean>;
|
|
2981
|
-
/** Recompute this cell on each run instead of reusing its durable value. */
|
|
2982
|
-
readonly recompute?: boolean;
|
|
2983
|
-
/** Recompute this cell when its durable value is an error-shaped object. */
|
|
2984
|
-
readonly recomputeOnError?: boolean;
|
|
2985
|
-
/** Fixed or value-dependent freshness policy for this cell. */
|
|
2986
|
-
readonly staleAfterSeconds?: StaleAfterSeconds<Value>;
|
|
2987
2968
|
};
|
|
2988
2969
|
type ConditionalStepResolver<Row, Value, Else = null> = {
|
|
2989
2970
|
readonly kind: 'conditional';
|
|
@@ -3000,12 +2981,6 @@ type ConditionalStepResolver<Row, Value, Else = null> = {
|
|
|
3000
2981
|
type StepOptions<Row, Value = unknown> = {
|
|
3001
2982
|
/** Optional row-level gate. Skipped rows produce `null` for this column. */
|
|
3002
2983
|
readonly runIf?: (row: Row, index: number) => boolean | Promise<boolean>;
|
|
3003
|
-
/** Recompute this cell on each run instead of reusing its durable value. */
|
|
3004
|
-
readonly recompute?: boolean;
|
|
3005
|
-
/** Recompute this cell when its durable value is an error-shaped object. */
|
|
3006
|
-
readonly recomputeOnError?: boolean;
|
|
3007
|
-
/** Fixed or value-dependent freshness policy for this cell. */
|
|
3008
|
-
readonly staleAfterSeconds?: StaleAfterSeconds<Value>;
|
|
3009
2984
|
};
|
|
3010
2985
|
type StepProgram<Input, Output, Return = Output> = {
|
|
3011
2986
|
readonly kind: 'steps';
|
|
@@ -3024,9 +2999,6 @@ type StepProgramResolver<Input, Return> = {
|
|
|
3024
2999
|
};
|
|
3025
3000
|
type PlayStepProgramStep = {
|
|
3026
3001
|
readonly name: string;
|
|
3027
|
-
readonly recompute?: boolean;
|
|
3028
|
-
readonly recomputeOnError?: boolean;
|
|
3029
|
-
readonly staleAfterSeconds?: StaleAfterSeconds;
|
|
3030
3002
|
readonly resolver: StepResolver<Record<string, unknown>, unknown> | ConditionalStepResolver<Record<string, unknown>, unknown> | StepProgramResolver<Record<string, unknown>, unknown>;
|
|
3031
3003
|
};
|
|
3032
3004
|
type ColumnResolver<Row, Value> = StepResolver<Row, Value> | ConditionalStepResolver<Row, Value> | StepProgramResolver<Row, Value>;
|
|
@@ -3065,8 +3037,7 @@ type DatasetBuilder<InputRow extends object, OutputRow extends object> = {
|
|
|
3065
3037
|
/**
|
|
3066
3038
|
* Define one output column with object-column authoring.
|
|
3067
3039
|
*
|
|
3068
|
-
* Use this form for typed `previousCell` access
|
|
3069
|
-
* `staleAfterSeconds(value)` policies.
|
|
3040
|
+
* Use this form for typed `previousCell` access.
|
|
3070
3041
|
*
|
|
3071
3042
|
* @param name - Output column name.
|
|
3072
3043
|
* @param definition - Object-column definition.
|
|
@@ -3078,7 +3049,7 @@ type DatasetBuilder<InputRow extends object, OutputRow extends object> = {
|
|
|
3078
3049
|
*
|
|
3079
3050
|
* @param name - Output column name.
|
|
3080
3051
|
* @param resolver - Computes the value for one row.
|
|
3081
|
-
* @param options - Row gate
|
|
3052
|
+
* @param options - Row gate options.
|
|
3082
3053
|
* @returns The same dataset builder with a nullable column type for skipped rows.
|
|
3083
3054
|
*/
|
|
3084
3055
|
withColumn<Name extends string, Value>(name: Name, resolver: StepResolver<OutputRow, Value> | StepProgramResolver<OutputRow, Value>, options: StepOptions<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value | null>>;
|
|
@@ -4071,4 +4042,4 @@ declare function writeCsvOutputFile(rows: Array<Record<string, unknown>>, stem:
|
|
|
4071
4042
|
*/
|
|
4072
4043
|
declare function extractSummaryFields(payload: unknown): Record<string, Scalar>;
|
|
4073
4044
|
|
|
4074
|
-
export { AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_EXTRACTOR_TARGETS, DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, type DeeplineEmailStatusGetterValue, DeeplineError, type DeeplineExtractorTarget, type DeeplineGetterValue, type DeeplineGetterValueMap, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type FileInput, JOB_CHANGE_STATUS_VALUES, type JobChangeStatus, type LiveEventEnvelope, PHONE_STATUS_VALUES, 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 PhoneStatus, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayDataset, type PlayDatasetInput, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayRevisionSummary, type PlayRunResult, type PlayRunStart, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PrebuiltPlayRef, type PreviousCell, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type ResolvedConfig, RunObserveTransportUnavailableError, type RunsListOptions, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type
|
|
4045
|
+
export { AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_EXTRACTOR_TARGETS, DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, type DeeplineEmailStatusGetterValue, DeeplineError, type DeeplineExtractorTarget, type DeeplineGetterValue, type DeeplineGetterValueMap, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type FileInput, JOB_CHANGE_STATUS_VALUES, type JobChangeStatus, type LiveEventEnvelope, PHONE_STATUS_VALUES, 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 PhoneStatus, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayDataset, type PlayDatasetInput, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayRevisionSummary, type PlayRunResult, type PlayRunStart, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PrebuiltPlayRef, type PreviousCell, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type ResolvedConfig, RunObserveTransportUnavailableError, type RunsListOptions, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type StartPlayRunRequest, type StepOptions, type StepProgram, type StepProgramResolver, type StepResolver, type StopPlayRunResult, type ToolDefinition, type ToolExecuteResult, type ToolExecution, type ToolExecutionRequest, type ToolMetadata, type ToolSearchOptions, type ToolSearchResult, defineInput, definePlay, defineWorkflow, extractSummaryFields, formatPlayBootstrapFinderKinds, formatPlayBootstrapFinderKindsForSentence, formatPlayBootstrapTemplates, getDefinedPlayMetadata, isDeeplineExtractorTarget, isPlayBootstrapFinderKind, isPlayBootstrapTemplate, resolveConfig, runIf, steps, tryConvertToList, writeCsvOutputFile, writeJsonOutputFile };
|
package/dist/index.js
CHANGED
|
@@ -419,17 +419,19 @@ var SDK_RELEASE = {
|
|
|
419
419
|
// the SDK enrich generator's one-second stale policy.
|
|
420
420
|
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
421
421
|
// 0.1.111 ships dataset-native tool list getters and result row datasets.
|
|
422
|
-
|
|
422
|
+
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
423
|
+
// fields shipped in 0.1.153.
|
|
424
|
+
version: "0.1.155",
|
|
423
425
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
424
426
|
supportPolicy: {
|
|
425
|
-
latest: "0.1.
|
|
427
|
+
latest: "0.1.155",
|
|
426
428
|
minimumSupported: "0.1.53",
|
|
427
429
|
deprecatedBelow: "0.1.53",
|
|
428
430
|
commandMinimumSupported: [
|
|
429
431
|
{
|
|
430
432
|
command: "enrich",
|
|
431
|
-
minimumSupported: "0.1.
|
|
432
|
-
reason: "Older SDK CLI enrich generated stale play source
|
|
433
|
+
minimumSupported: "0.1.154",
|
|
434
|
+
reason: "Older SDK CLI enrich generated stale play source; SDK CLI enrich 0.1.153 generated removed StepOptions fields in play source."
|
|
433
435
|
},
|
|
434
436
|
{
|
|
435
437
|
command: "plays",
|
|
@@ -1226,8 +1228,15 @@ function normalizeStepProgress(value) {
|
|
|
1226
1228
|
};
|
|
1227
1229
|
}
|
|
1228
1230
|
|
|
1229
|
-
// ../shared_libs/play-runtime/run-
|
|
1230
|
-
|
|
1231
|
+
// ../shared_libs/play-runtime/run-lifecycle-policy.ts
|
|
1232
|
+
var TERMINAL_PLAY_RUN_STATUSES = /* @__PURE__ */ new Set([
|
|
1233
|
+
"completed",
|
|
1234
|
+
"failed",
|
|
1235
|
+
"cancelled",
|
|
1236
|
+
"terminated",
|
|
1237
|
+
"timed_out"
|
|
1238
|
+
]);
|
|
1239
|
+
function normalizePlayRunLifecycleStatus(value) {
|
|
1231
1240
|
const normalized = String(value ?? "").trim().toLowerCase();
|
|
1232
1241
|
switch (normalized) {
|
|
1233
1242
|
case "queued":
|
|
@@ -1235,6 +1244,7 @@ function normalizePlayRunLiveStatus(value) {
|
|
|
1235
1244
|
return "running";
|
|
1236
1245
|
case "running":
|
|
1237
1246
|
case "started":
|
|
1247
|
+
case "waiting":
|
|
1238
1248
|
return "running";
|
|
1239
1249
|
case "completed":
|
|
1240
1250
|
case "complete":
|
|
@@ -1255,8 +1265,16 @@ function normalizePlayRunLiveStatus(value) {
|
|
|
1255
1265
|
return "unknown";
|
|
1256
1266
|
}
|
|
1257
1267
|
}
|
|
1268
|
+
function isTerminalPlayRunLifecycleStatus(status) {
|
|
1269
|
+
return TERMINAL_PLAY_RUN_STATUSES.has(normalizePlayRunLifecycleStatus(status));
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
// ../shared_libs/play-runtime/run-snapshot-stream.ts
|
|
1273
|
+
function normalizePlayRunLiveStatus(value) {
|
|
1274
|
+
return normalizePlayRunLifecycleStatus(value);
|
|
1275
|
+
}
|
|
1258
1276
|
function isTerminalPlayRunLiveStatus(status) {
|
|
1259
|
-
return status
|
|
1277
|
+
return isTerminalPlayRunLifecycleStatus(status);
|
|
1260
1278
|
}
|
|
1261
1279
|
function isRecord2(value) {
|
|
1262
1280
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
@@ -5096,12 +5114,7 @@ var DeeplineStepProgram = class _DeeplineStepProgram {
|
|
|
5096
5114
|
...this.steps,
|
|
5097
5115
|
{
|
|
5098
5116
|
name,
|
|
5099
|
-
resolver: stepResolver
|
|
5100
|
-
...options?.staleAfterSeconds !== void 0 ? {
|
|
5101
|
-
staleAfterSeconds: options.staleAfterSeconds
|
|
5102
|
-
} : {},
|
|
5103
|
-
...options?.recompute === true ? { recompute: true } : {},
|
|
5104
|
-
...options?.recomputeOnError === true ? { recomputeOnError: true } : {}
|
|
5117
|
+
resolver: stepResolver
|
|
5105
5118
|
}
|
|
5106
5119
|
],
|
|
5107
5120
|
this.returnResolver
|
package/dist/index.mjs
CHANGED
|
@@ -349,17 +349,19 @@ var SDK_RELEASE = {
|
|
|
349
349
|
// the SDK enrich generator's one-second stale policy.
|
|
350
350
|
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
351
351
|
// 0.1.111 ships dataset-native tool list getters and result row datasets.
|
|
352
|
-
|
|
352
|
+
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
353
|
+
// fields shipped in 0.1.153.
|
|
354
|
+
version: "0.1.155",
|
|
353
355
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
354
356
|
supportPolicy: {
|
|
355
|
-
latest: "0.1.
|
|
357
|
+
latest: "0.1.155",
|
|
356
358
|
minimumSupported: "0.1.53",
|
|
357
359
|
deprecatedBelow: "0.1.53",
|
|
358
360
|
commandMinimumSupported: [
|
|
359
361
|
{
|
|
360
362
|
command: "enrich",
|
|
361
|
-
minimumSupported: "0.1.
|
|
362
|
-
reason: "Older SDK CLI enrich generated stale play source
|
|
363
|
+
minimumSupported: "0.1.154",
|
|
364
|
+
reason: "Older SDK CLI enrich generated stale play source; SDK CLI enrich 0.1.153 generated removed StepOptions fields in play source."
|
|
363
365
|
},
|
|
364
366
|
{
|
|
365
367
|
command: "plays",
|
|
@@ -1156,8 +1158,15 @@ function normalizeStepProgress(value) {
|
|
|
1156
1158
|
};
|
|
1157
1159
|
}
|
|
1158
1160
|
|
|
1159
|
-
// ../shared_libs/play-runtime/run-
|
|
1160
|
-
|
|
1161
|
+
// ../shared_libs/play-runtime/run-lifecycle-policy.ts
|
|
1162
|
+
var TERMINAL_PLAY_RUN_STATUSES = /* @__PURE__ */ new Set([
|
|
1163
|
+
"completed",
|
|
1164
|
+
"failed",
|
|
1165
|
+
"cancelled",
|
|
1166
|
+
"terminated",
|
|
1167
|
+
"timed_out"
|
|
1168
|
+
]);
|
|
1169
|
+
function normalizePlayRunLifecycleStatus(value) {
|
|
1161
1170
|
const normalized = String(value ?? "").trim().toLowerCase();
|
|
1162
1171
|
switch (normalized) {
|
|
1163
1172
|
case "queued":
|
|
@@ -1165,6 +1174,7 @@ function normalizePlayRunLiveStatus(value) {
|
|
|
1165
1174
|
return "running";
|
|
1166
1175
|
case "running":
|
|
1167
1176
|
case "started":
|
|
1177
|
+
case "waiting":
|
|
1168
1178
|
return "running";
|
|
1169
1179
|
case "completed":
|
|
1170
1180
|
case "complete":
|
|
@@ -1185,8 +1195,16 @@ function normalizePlayRunLiveStatus(value) {
|
|
|
1185
1195
|
return "unknown";
|
|
1186
1196
|
}
|
|
1187
1197
|
}
|
|
1198
|
+
function isTerminalPlayRunLifecycleStatus(status) {
|
|
1199
|
+
return TERMINAL_PLAY_RUN_STATUSES.has(normalizePlayRunLifecycleStatus(status));
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
// ../shared_libs/play-runtime/run-snapshot-stream.ts
|
|
1203
|
+
function normalizePlayRunLiveStatus(value) {
|
|
1204
|
+
return normalizePlayRunLifecycleStatus(value);
|
|
1205
|
+
}
|
|
1188
1206
|
function isTerminalPlayRunLiveStatus(status) {
|
|
1189
|
-
return status
|
|
1207
|
+
return isTerminalPlayRunLifecycleStatus(status);
|
|
1190
1208
|
}
|
|
1191
1209
|
function isRecord2(value) {
|
|
1192
1210
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
@@ -5026,12 +5044,7 @@ var DeeplineStepProgram = class _DeeplineStepProgram {
|
|
|
5026
5044
|
...this.steps,
|
|
5027
5045
|
{
|
|
5028
5046
|
name,
|
|
5029
|
-
resolver: stepResolver
|
|
5030
|
-
...options?.staleAfterSeconds !== void 0 ? {
|
|
5031
|
-
staleAfterSeconds: options.staleAfterSeconds
|
|
5032
|
-
} : {},
|
|
5033
|
-
...options?.recompute === true ? { recompute: true } : {},
|
|
5034
|
-
...options?.recomputeOnError === true ? { recomputeOnError: true } : {}
|
|
5047
|
+
resolver: stepResolver
|
|
5035
5048
|
}
|
|
5036
5049
|
],
|
|
5037
5050
|
this.returnResolver
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PlayArtifactKind$1, a as PlayCompilerManifest } from '../compiler-manifest-
|
|
2
|
-
export { b as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-
|
|
1
|
+
import { P as PlayArtifactKind$1, a as PlayCompilerManifest } from '../compiler-manifest-DW1flrHk.mjs';
|
|
2
|
+
export { b as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-DW1flrHk.mjs';
|
|
3
3
|
|
|
4
4
|
type PlayPackageImport = {
|
|
5
5
|
name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PlayArtifactKind$1, a as PlayCompilerManifest } from '../compiler-manifest-
|
|
2
|
-
export { b as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-
|
|
1
|
+
import { P as PlayArtifactKind$1, a as PlayCompilerManifest } from '../compiler-manifest-DW1flrHk.js';
|
|
2
|
+
export { b as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-DW1flrHk.js';
|
|
3
3
|
|
|
4
4
|
type PlayPackageImport = {
|
|
5
5
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
normalizeCellStalenessPolicy,
|
|
3
|
-
type AuthoredCellStalenessPolicy,
|
|
4
|
-
type AuthoredCellStalenessPolicyByField,
|
|
5
|
-
type AuthoredStaleAfterSeconds,
|
|
6
|
-
type CellStalenessPolicyByField,
|
|
7
|
-
} from '../play-runtime/cell-staleness';
|
|
8
|
-
|
|
9
|
-
export type DatasetCellPolicyStep = {
|
|
10
|
-
name: string;
|
|
11
|
-
recompute?: boolean;
|
|
12
|
-
recomputeOnError?: boolean;
|
|
13
|
-
staleAfterSeconds?: AuthoredStaleAfterSeconds;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export function authoredCellPolicyForDatasetStep(
|
|
17
|
-
step: DatasetCellPolicyStep,
|
|
18
|
-
): AuthoredCellStalenessPolicy | null {
|
|
19
|
-
const policy = {
|
|
20
|
-
...(step.recompute === true ? { recompute: true as const } : {}),
|
|
21
|
-
...(step.recomputeOnError === true
|
|
22
|
-
? { recomputeOnError: true as const }
|
|
23
|
-
: {}),
|
|
24
|
-
...(step.staleAfterSeconds !== undefined
|
|
25
|
-
? { staleAfterSeconds: step.staleAfterSeconds }
|
|
26
|
-
: {}),
|
|
27
|
-
};
|
|
28
|
-
return Object.keys(policy).length > 0 ? policy : null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function cellPoliciesFromDatasetSteps(
|
|
32
|
-
steps: readonly DatasetCellPolicyStep[],
|
|
33
|
-
): CellStalenessPolicyByField {
|
|
34
|
-
return Object.fromEntries(
|
|
35
|
-
steps.flatMap((step) => {
|
|
36
|
-
const policy = authoredCellPolicyForDatasetStep(step);
|
|
37
|
-
return policy ? [[step.name, normalizeCellStalenessPolicy(policy)]] : [];
|
|
38
|
-
}),
|
|
39
|
-
) as CellStalenessPolicyByField;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function authoredCellPoliciesFromDatasetSteps(
|
|
43
|
-
steps: readonly DatasetCellPolicyStep[],
|
|
44
|
-
): AuthoredCellStalenessPolicyByField {
|
|
45
|
-
return Object.fromEntries(
|
|
46
|
-
steps.flatMap((step) => {
|
|
47
|
-
const policy = authoredCellPolicyForDatasetStep(step);
|
|
48
|
-
return policy ? [[step.name, policy]] : [];
|
|
49
|
-
}),
|
|
50
|
-
) as AuthoredCellStalenessPolicyByField;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function normalizeAuthoredCellPolicyMap(
|
|
54
|
-
raw: unknown,
|
|
55
|
-
): CellStalenessPolicyByField {
|
|
56
|
-
if (!raw || typeof raw !== 'object') {
|
|
57
|
-
return {};
|
|
58
|
-
}
|
|
59
|
-
return Object.fromEntries(
|
|
60
|
-
Object.entries(raw as AuthoredCellStalenessPolicyByField).map(
|
|
61
|
-
([fieldName, policy]) => [
|
|
62
|
-
fieldName,
|
|
63
|
-
normalizeCellStalenessPolicy(policy),
|
|
64
|
-
],
|
|
65
|
-
),
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function authoredCellPolicyMap(
|
|
70
|
-
raw: unknown,
|
|
71
|
-
): AuthoredCellStalenessPolicyByField {
|
|
72
|
-
if (!raw || typeof raw !== 'object') {
|
|
73
|
-
return {};
|
|
74
|
-
}
|
|
75
|
-
return raw as AuthoredCellStalenessPolicyByField;
|
|
76
|
-
}
|