deepline 0.2.49 → 0.2.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/client.ts +15 -5
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +6 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +61 -0
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +35 -7
- package/dist/bundling-sources/shared_libs/plays/enrich-compat-adapter.ts +21 -0
- package/dist/bundling-sources/shared_libs/plays/enrich-play-compiler.ts +1555 -0
- package/dist/bundling-sources/shared_libs/plays/user-code-safety.ts +61 -0
- package/dist/cli/index.js +111 -15
- package/dist/cli/index.mjs +114 -16
- package/dist/{compiler-manifest-BPA3r-VG.d.mts → compiler-manifest-Cj3--4ZJ.d.mts} +14 -0
- package/dist/{compiler-manifest-BPA3r-VG.d.ts → compiler-manifest-Cj3--4ZJ.d.ts} +14 -0
- package/dist/index.d.mts +24 -4
- package/dist/index.d.ts +24 -4
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/dist/install-integrity.json +5 -2
- package/dist/plays/bundle-play-file.d.mts +4 -2
- package/dist/plays/bundle-play-file.d.ts +4 -2
- package/dist/plays/bundle-play-file.mjs +32 -6
- package/package.json +1 -1
|
@@ -1189,6 +1189,15 @@ type PlayAuthoringCustomerDbQueryOptions = {
|
|
|
1189
1189
|
type PlayAuthoringRunStepsOptions = {
|
|
1190
1190
|
description?: string;
|
|
1191
1191
|
};
|
|
1192
|
+
/**
|
|
1193
|
+
* Stable identity of the currently executing Play invocation.
|
|
1194
|
+
*
|
|
1195
|
+
* The id is unchanged while Deepline resumes or retries the same durable run.
|
|
1196
|
+
* A separately submitted run intentionally receives a new id.
|
|
1197
|
+
*/
|
|
1198
|
+
type PlayAuthoringRunScope = {
|
|
1199
|
+
readonly id: string;
|
|
1200
|
+
};
|
|
1192
1201
|
/** The complete customer-authored `ctx` Interface shared by every Adapter. */
|
|
1193
1202
|
interface PlayAuthoringRuntimeContext {
|
|
1194
1203
|
/**
|
|
@@ -1203,6 +1212,11 @@ interface PlayAuthoringRuntimeContext {
|
|
|
1203
1212
|
dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): PlayAuthoringDatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object, PlayAuthoringRuntimeContext>;
|
|
1204
1213
|
/** @deprecated `ctx.map(...)` was replaced by `ctx.dataset(...)`. */
|
|
1205
1214
|
map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: PlayAuthoringDatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;
|
|
1215
|
+
/**
|
|
1216
|
+
* Identity for this durable run. Use this to build a replay-stable external
|
|
1217
|
+
* idempotency key, for example when posting a sequence of batches.
|
|
1218
|
+
*/
|
|
1219
|
+
readonly run: PlayAuthoringRunScope;
|
|
1206
1220
|
tools: {
|
|
1207
1221
|
/**
|
|
1208
1222
|
* Execute a provider tool through the durable receipt contract.
|
|
@@ -1189,6 +1189,15 @@ type PlayAuthoringCustomerDbQueryOptions = {
|
|
|
1189
1189
|
type PlayAuthoringRunStepsOptions = {
|
|
1190
1190
|
description?: string;
|
|
1191
1191
|
};
|
|
1192
|
+
/**
|
|
1193
|
+
* Stable identity of the currently executing Play invocation.
|
|
1194
|
+
*
|
|
1195
|
+
* The id is unchanged while Deepline resumes or retries the same durable run.
|
|
1196
|
+
* A separately submitted run intentionally receives a new id.
|
|
1197
|
+
*/
|
|
1198
|
+
type PlayAuthoringRunScope = {
|
|
1199
|
+
readonly id: string;
|
|
1200
|
+
};
|
|
1192
1201
|
/** The complete customer-authored `ctx` Interface shared by every Adapter. */
|
|
1193
1202
|
interface PlayAuthoringRuntimeContext {
|
|
1194
1203
|
/**
|
|
@@ -1203,6 +1212,11 @@ interface PlayAuthoringRuntimeContext {
|
|
|
1203
1212
|
dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): PlayAuthoringDatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object, PlayAuthoringRuntimeContext>;
|
|
1204
1213
|
/** @deprecated `ctx.map(...)` was replaced by `ctx.dataset(...)`. */
|
|
1205
1214
|
map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: PlayAuthoringDatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;
|
|
1215
|
+
/**
|
|
1216
|
+
* Identity for this durable run. Use this to build a replay-stable external
|
|
1217
|
+
* idempotency key, for example when posting a sequence of batches.
|
|
1218
|
+
*/
|
|
1219
|
+
readonly run: PlayAuthoringRunScope;
|
|
1206
1220
|
tools: {
|
|
1207
1221
|
/**
|
|
1208
1222
|
* Execute a provider tool through the durable receipt contract.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q 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, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest } from './compiler-manifest-
|
|
2
|
-
export { O as DEEPLINE_EXTRACTOR_TARGETS, Q as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, R as DeeplineEmailStatusGetterValue, S as DeeplineExtractorTarget, U as DeeplineGetterValue, V as DeeplineGetterValueMap, W as JOB_CHANGE_STATUS_VALUES, X as JobChangeStatus, Y as PHONE_STATUS_VALUES, Z as PhoneStatus, _ as PlayDataset, $ as PlayDatasetInput, a0 as PreviousCell, a1 as ProviderTransientError, a2 as ProviderTransientErrorCategory, a3 as ToolExecutionErrorCategory, a4 as ToolExecutionErrorOrigin, a5 as ToolExecutionFailureV1, a6 as ToolExecutionNetworkKind, a7 as ToolExecutionNetworkScope, a8 as isDeeplineExtractorTarget } from './compiler-manifest-
|
|
1
|
+
import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q 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, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest } from './compiler-manifest-Cj3--4ZJ.mjs';
|
|
2
|
+
export { O as DEEPLINE_EXTRACTOR_TARGETS, Q as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, R as DeeplineEmailStatusGetterValue, S as DeeplineExtractorTarget, U as DeeplineGetterValue, V as DeeplineGetterValueMap, W as JOB_CHANGE_STATUS_VALUES, X as JobChangeStatus, Y as PHONE_STATUS_VALUES, Z as PhoneStatus, _ as PlayDataset, $ as PlayDatasetInput, a0 as PreviousCell, a1 as ProviderTransientError, a2 as ProviderTransientErrorCategory, a3 as ToolExecutionErrorCategory, a4 as ToolExecutionErrorOrigin, a5 as ToolExecutionFailureV1, a6 as ToolExecutionNetworkKind, a7 as ToolExecutionNetworkScope, a8 as isDeeplineExtractorTarget } from './compiler-manifest-Cj3--4ZJ.mjs';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
4
|
|
|
5
5
|
declare const FIXTURE_BEHAVIOR_VERSION: 1;
|
|
@@ -1430,12 +1430,22 @@ interface PlayCheckSqlListenerTrigger {
|
|
|
1430
1430
|
after?: Record<string, Record<string, unknown>>;
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
1433
|
+
/**
|
|
1434
|
+
* The input delivered to a SQL-listener Play invocation. One changed Customer
|
|
1435
|
+
* DB row starts one run with this top-level event object; it is not an events
|
|
1436
|
+
* array or a polling batch.
|
|
1437
|
+
*/
|
|
1438
|
+
interface PlayCheckSqlListenerEventSummary {
|
|
1439
|
+
delivery: 'one_event_per_matched_row';
|
|
1440
|
+
fields: Array<'tool' | 'stream' | 'operation' | 'before' | 'after' | 'changedAt' | 'metadata'>;
|
|
1441
|
+
}
|
|
1433
1442
|
/**
|
|
1434
1443
|
* Concise summary of the trigger bindings the server recognized for a play.
|
|
1435
1444
|
* Only present triggers are populated.
|
|
1436
1445
|
*/
|
|
1437
1446
|
interface PlayCheckTriggersSummary {
|
|
1438
1447
|
sqlListeners?: PlayCheckSqlListenerTrigger[];
|
|
1448
|
+
sqlListenerEvent?: PlayCheckSqlListenerEventSummary;
|
|
1439
1449
|
cron?: {
|
|
1440
1450
|
schedule: string;
|
|
1441
1451
|
timezone?: string;
|
|
@@ -2082,6 +2092,7 @@ type MonitorListEntry = {
|
|
|
2082
2092
|
webhook_state?: string;
|
|
2083
2093
|
last_received_event?: string | null;
|
|
2084
2094
|
bound_plays?: Array<Record<string, unknown>>;
|
|
2095
|
+
consumer_health_truncated?: boolean;
|
|
2085
2096
|
[key: string]: unknown;
|
|
2086
2097
|
};
|
|
2087
2098
|
/**
|
|
@@ -2096,6 +2107,11 @@ type MonitorsListResult = {
|
|
|
2096
2107
|
is_truncated?: boolean;
|
|
2097
2108
|
next_cursor?: string | null;
|
|
2098
2109
|
status_filter_applied?: string;
|
|
2110
|
+
status_summary?: Array<{
|
|
2111
|
+
status: string;
|
|
2112
|
+
count: number;
|
|
2113
|
+
}>;
|
|
2114
|
+
include_consumers?: boolean;
|
|
2099
2115
|
[key: string]: unknown;
|
|
2100
2116
|
};
|
|
2101
2117
|
/** Options for `client.monitors.list(...)`. */
|
|
@@ -2106,6 +2122,8 @@ type MonitorsListOptions = {
|
|
|
2106
2122
|
/** Page past a truncated result using a prior response's `next_cursor`. */
|
|
2107
2123
|
cursor?: string;
|
|
2108
2124
|
compact?: boolean;
|
|
2125
|
+
/** Include bounded current SQL-listener delivery/run health (requires limit <= 20). */
|
|
2126
|
+
includeConsumers?: boolean;
|
|
2109
2127
|
};
|
|
2110
2128
|
/**
|
|
2111
2129
|
* Server-owned monitor payload shapes returned by the deploy/check/get/mutation
|
|
@@ -2183,9 +2201,9 @@ type MonitorsNamespace = {
|
|
|
2183
2201
|
deploy: (definition: MonitorDefinition, options?: {
|
|
2184
2202
|
dryRun?: boolean;
|
|
2185
2203
|
}) => Promise<MonitorDeployResult>;
|
|
2186
|
-
/** List deployed monitors (active by default). */
|
|
2204
|
+
/** List deployed monitors (active by default). `includeConsumers` requires limit <= 20. */
|
|
2187
2205
|
list: (options?: MonitorsListOptions) => Promise<MonitorsListResult>;
|
|
2188
|
-
/** Fetch one deployed monitor by public key
|
|
2206
|
+
/** Fetch one deployed monitor by public key with bounded current listener health. */
|
|
2189
2207
|
get: (key: string) => Promise<MonitorDetail>;
|
|
2190
2208
|
/**
|
|
2191
2209
|
* Test a deployed monitor. `validationOnly` safely verifies the callback
|
|
@@ -2193,6 +2211,7 @@ type MonitorsNamespace = {
|
|
|
2193
2211
|
*/
|
|
2194
2212
|
test: (key: string, payload: Record<string, unknown>, options?: {
|
|
2195
2213
|
validationOnly?: boolean;
|
|
2214
|
+
dispatch?: boolean;
|
|
2196
2215
|
}) => Promise<MonitorTestResult>;
|
|
2197
2216
|
validate: (key: string) => Promise<MonitorValidateResult>;
|
|
2198
2217
|
/** List the published plays depending on one monitor's output streams. */
|
|
@@ -3527,6 +3546,7 @@ declare class DeeplineClient {
|
|
|
3527
3546
|
getMonitor(key: string): Promise<MonitorDetail>;
|
|
3528
3547
|
testMonitorWebhook(key: string, payload: Record<string, unknown>, options?: {
|
|
3529
3548
|
validationOnly?: boolean;
|
|
3549
|
+
dispatch?: boolean;
|
|
3530
3550
|
}): Promise<MonitorTestResult>;
|
|
3531
3551
|
setupMonitor(tool: string, payload: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3532
3552
|
validateMonitor(key: string): Promise<MonitorValidateResult>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q 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, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest } from './compiler-manifest-
|
|
2
|
-
export { O as DEEPLINE_EXTRACTOR_TARGETS, Q as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, R as DeeplineEmailStatusGetterValue, S as DeeplineExtractorTarget, U as DeeplineGetterValue, V as DeeplineGetterValueMap, W as JOB_CHANGE_STATUS_VALUES, X as JobChangeStatus, Y as PHONE_STATUS_VALUES, Z as PhoneStatus, _ as PlayDataset, $ as PlayDatasetInput, a0 as PreviousCell, a1 as ProviderTransientError, a2 as ProviderTransientErrorCategory, a3 as ToolExecutionErrorCategory, a4 as ToolExecutionErrorOrigin, a5 as ToolExecutionFailureV1, a6 as ToolExecutionNetworkKind, a7 as ToolExecutionNetworkScope, a8 as isDeeplineExtractorTarget } from './compiler-manifest-
|
|
1
|
+
import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q 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, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest } from './compiler-manifest-Cj3--4ZJ.js';
|
|
2
|
+
export { O as DEEPLINE_EXTRACTOR_TARGETS, Q as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, R as DeeplineEmailStatusGetterValue, S as DeeplineExtractorTarget, U as DeeplineGetterValue, V as DeeplineGetterValueMap, W as JOB_CHANGE_STATUS_VALUES, X as JobChangeStatus, Y as PHONE_STATUS_VALUES, Z as PhoneStatus, _ as PlayDataset, $ as PlayDatasetInput, a0 as PreviousCell, a1 as ProviderTransientError, a2 as ProviderTransientErrorCategory, a3 as ToolExecutionErrorCategory, a4 as ToolExecutionErrorOrigin, a5 as ToolExecutionFailureV1, a6 as ToolExecutionNetworkKind, a7 as ToolExecutionNetworkScope, a8 as isDeeplineExtractorTarget } from './compiler-manifest-Cj3--4ZJ.js';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
4
|
|
|
5
5
|
declare const FIXTURE_BEHAVIOR_VERSION: 1;
|
|
@@ -1430,12 +1430,22 @@ interface PlayCheckSqlListenerTrigger {
|
|
|
1430
1430
|
after?: Record<string, Record<string, unknown>>;
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
1433
|
+
/**
|
|
1434
|
+
* The input delivered to a SQL-listener Play invocation. One changed Customer
|
|
1435
|
+
* DB row starts one run with this top-level event object; it is not an events
|
|
1436
|
+
* array or a polling batch.
|
|
1437
|
+
*/
|
|
1438
|
+
interface PlayCheckSqlListenerEventSummary {
|
|
1439
|
+
delivery: 'one_event_per_matched_row';
|
|
1440
|
+
fields: Array<'tool' | 'stream' | 'operation' | 'before' | 'after' | 'changedAt' | 'metadata'>;
|
|
1441
|
+
}
|
|
1433
1442
|
/**
|
|
1434
1443
|
* Concise summary of the trigger bindings the server recognized for a play.
|
|
1435
1444
|
* Only present triggers are populated.
|
|
1436
1445
|
*/
|
|
1437
1446
|
interface PlayCheckTriggersSummary {
|
|
1438
1447
|
sqlListeners?: PlayCheckSqlListenerTrigger[];
|
|
1448
|
+
sqlListenerEvent?: PlayCheckSqlListenerEventSummary;
|
|
1439
1449
|
cron?: {
|
|
1440
1450
|
schedule: string;
|
|
1441
1451
|
timezone?: string;
|
|
@@ -2082,6 +2092,7 @@ type MonitorListEntry = {
|
|
|
2082
2092
|
webhook_state?: string;
|
|
2083
2093
|
last_received_event?: string | null;
|
|
2084
2094
|
bound_plays?: Array<Record<string, unknown>>;
|
|
2095
|
+
consumer_health_truncated?: boolean;
|
|
2085
2096
|
[key: string]: unknown;
|
|
2086
2097
|
};
|
|
2087
2098
|
/**
|
|
@@ -2096,6 +2107,11 @@ type MonitorsListResult = {
|
|
|
2096
2107
|
is_truncated?: boolean;
|
|
2097
2108
|
next_cursor?: string | null;
|
|
2098
2109
|
status_filter_applied?: string;
|
|
2110
|
+
status_summary?: Array<{
|
|
2111
|
+
status: string;
|
|
2112
|
+
count: number;
|
|
2113
|
+
}>;
|
|
2114
|
+
include_consumers?: boolean;
|
|
2099
2115
|
[key: string]: unknown;
|
|
2100
2116
|
};
|
|
2101
2117
|
/** Options for `client.monitors.list(...)`. */
|
|
@@ -2106,6 +2122,8 @@ type MonitorsListOptions = {
|
|
|
2106
2122
|
/** Page past a truncated result using a prior response's `next_cursor`. */
|
|
2107
2123
|
cursor?: string;
|
|
2108
2124
|
compact?: boolean;
|
|
2125
|
+
/** Include bounded current SQL-listener delivery/run health (requires limit <= 20). */
|
|
2126
|
+
includeConsumers?: boolean;
|
|
2109
2127
|
};
|
|
2110
2128
|
/**
|
|
2111
2129
|
* Server-owned monitor payload shapes returned by the deploy/check/get/mutation
|
|
@@ -2183,9 +2201,9 @@ type MonitorsNamespace = {
|
|
|
2183
2201
|
deploy: (definition: MonitorDefinition, options?: {
|
|
2184
2202
|
dryRun?: boolean;
|
|
2185
2203
|
}) => Promise<MonitorDeployResult>;
|
|
2186
|
-
/** List deployed monitors (active by default). */
|
|
2204
|
+
/** List deployed monitors (active by default). `includeConsumers` requires limit <= 20. */
|
|
2187
2205
|
list: (options?: MonitorsListOptions) => Promise<MonitorsListResult>;
|
|
2188
|
-
/** Fetch one deployed monitor by public key
|
|
2206
|
+
/** Fetch one deployed monitor by public key with bounded current listener health. */
|
|
2189
2207
|
get: (key: string) => Promise<MonitorDetail>;
|
|
2190
2208
|
/**
|
|
2191
2209
|
* Test a deployed monitor. `validationOnly` safely verifies the callback
|
|
@@ -2193,6 +2211,7 @@ type MonitorsNamespace = {
|
|
|
2193
2211
|
*/
|
|
2194
2212
|
test: (key: string, payload: Record<string, unknown>, options?: {
|
|
2195
2213
|
validationOnly?: boolean;
|
|
2214
|
+
dispatch?: boolean;
|
|
2196
2215
|
}) => Promise<MonitorTestResult>;
|
|
2197
2216
|
validate: (key: string) => Promise<MonitorValidateResult>;
|
|
2198
2217
|
/** List the published plays depending on one monitor's output streams. */
|
|
@@ -3527,6 +3546,7 @@ declare class DeeplineClient {
|
|
|
3527
3546
|
getMonitor(key: string): Promise<MonitorDetail>;
|
|
3528
3547
|
testMonitorWebhook(key: string, payload: Record<string, unknown>, options?: {
|
|
3529
3548
|
validationOnly?: boolean;
|
|
3549
|
+
dispatch?: boolean;
|
|
3530
3550
|
}): Promise<MonitorTestResult>;
|
|
3531
3551
|
setupMonitor(tool: string, payload: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3532
3552
|
validateMonitor(key: string): Promise<MonitorValidateResult>;
|
package/dist/index.js
CHANGED
|
@@ -763,7 +763,7 @@ var SDK_RELEASE = {
|
|
|
763
763
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
764
764
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
765
765
|
// release keeps lazy paging semantics independent of row residency.
|
|
766
|
-
version: "0.2.
|
|
766
|
+
version: "0.2.51",
|
|
767
767
|
contracts: {
|
|
768
768
|
api: {
|
|
769
769
|
name: "sdk-http-api",
|
|
@@ -5753,6 +5753,7 @@ var DeeplineClient = class {
|
|
|
5753
5753
|
params.set("limit", String(options.limit));
|
|
5754
5754
|
if (options?.cursor) params.set("cursor", options.cursor);
|
|
5755
5755
|
if (options?.compact) params.set("compact", "true");
|
|
5756
|
+
if (options?.includeConsumers) params.set("include_consumers", "true");
|
|
5756
5757
|
const query = params.toString();
|
|
5757
5758
|
const suffix = query ? `?${query}` : "";
|
|
5758
5759
|
return this.http.request(
|
|
@@ -5774,7 +5775,7 @@ var DeeplineClient = class {
|
|
|
5774
5775
|
method: "POST",
|
|
5775
5776
|
body: {
|
|
5776
5777
|
payload,
|
|
5777
|
-
...options?.validationOnly ? { mode: "validation_only" } : {}
|
|
5778
|
+
...options?.validationOnly ? { mode: "validation_only" } : options?.dispatch ? { mode: "dispatch" } : {}
|
|
5778
5779
|
}
|
|
5779
5780
|
}
|
|
5780
5781
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -689,7 +689,7 @@ var SDK_RELEASE = {
|
|
|
689
689
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
690
690
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
691
691
|
// release keeps lazy paging semantics independent of row residency.
|
|
692
|
-
version: "0.2.
|
|
692
|
+
version: "0.2.51",
|
|
693
693
|
contracts: {
|
|
694
694
|
api: {
|
|
695
695
|
name: "sdk-http-api",
|
|
@@ -5679,6 +5679,7 @@ var DeeplineClient = class {
|
|
|
5679
5679
|
params.set("limit", String(options.limit));
|
|
5680
5680
|
if (options?.cursor) params.set("cursor", options.cursor);
|
|
5681
5681
|
if (options?.compact) params.set("compact", "true");
|
|
5682
|
+
if (options?.includeConsumers) params.set("include_consumers", "true");
|
|
5682
5683
|
const query = params.toString();
|
|
5683
5684
|
const suffix = query ? `?${query}` : "";
|
|
5684
5685
|
return this.http.request(
|
|
@@ -5700,7 +5701,7 @@ var DeeplineClient = class {
|
|
|
5700
5701
|
method: "POST",
|
|
5701
5702
|
body: {
|
|
5702
5703
|
payload,
|
|
5703
|
-
...options?.validationOnly ? { mode: "validation_only" } : {}
|
|
5704
|
+
...options?.validationOnly ? { mode: "validation_only" } : options?.dispatch ? { mode: "dispatch" } : {}
|
|
5704
5705
|
}
|
|
5705
5706
|
}
|
|
5706
5707
|
);
|
|
@@ -191,6 +191,8 @@
|
|
|
191
191
|
"dist/bundling-sources/shared_libs/plays/dataset-summary.ts",
|
|
192
192
|
"dist/bundling-sources/shared_libs/plays/dataset.ts",
|
|
193
193
|
"dist/bundling-sources/shared_libs/plays/definition.ts",
|
|
194
|
+
"dist/bundling-sources/shared_libs/plays/enrich-compat-adapter.ts",
|
|
195
|
+
"dist/bundling-sources/shared_libs/plays/enrich-play-compiler.ts",
|
|
194
196
|
"dist/bundling-sources/shared_libs/plays/file-refs.ts",
|
|
195
197
|
"dist/bundling-sources/shared_libs/plays/input-contract-definition.ts",
|
|
196
198
|
"dist/bundling-sources/shared_libs/plays/input-contract.ts",
|
|
@@ -202,6 +204,7 @@
|
|
|
202
204
|
"dist/bundling-sources/shared_libs/plays/static-pipeline.ts",
|
|
203
205
|
"dist/bundling-sources/shared_libs/plays/tool-category-descriptions.ts",
|
|
204
206
|
"dist/bundling-sources/shared_libs/plays/tool-codegen.ts",
|
|
207
|
+
"dist/bundling-sources/shared_libs/plays/user-code-safety.ts",
|
|
205
208
|
"dist/bundling-sources/shared_libs/product-notifications/contract.ts",
|
|
206
209
|
"dist/bundling-sources/shared_libs/runtime-env.ts",
|
|
207
210
|
"dist/bundling-sources/shared_libs/security/outbound-url-policy.ts",
|
|
@@ -212,8 +215,8 @@
|
|
|
212
215
|
"dist/cli/index.d.ts",
|
|
213
216
|
"dist/cli/index.js",
|
|
214
217
|
"dist/cli/index.mjs",
|
|
215
|
-
"dist/compiler-manifest-
|
|
216
|
-
"dist/compiler-manifest-
|
|
218
|
+
"dist/compiler-manifest-Cj3--4ZJ.d.mts",
|
|
219
|
+
"dist/compiler-manifest-Cj3--4ZJ.d.ts",
|
|
217
220
|
"dist/helpers.d.mts",
|
|
218
221
|
"dist/helpers.d.ts",
|
|
219
222
|
"dist/helpers.js",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-
|
|
2
|
-
export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-
|
|
1
|
+
import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-Cj3--4ZJ.mjs';
|
|
2
|
+
export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-Cj3--4ZJ.mjs';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
4
|
|
|
5
5
|
type PlayPackageImport = {
|
|
@@ -65,6 +65,8 @@ type PlayLocalFileDiscoveryResult = {
|
|
|
65
65
|
};
|
|
66
66
|
type PlayBundlingAdapter = {
|
|
67
67
|
projectRoot: string;
|
|
68
|
+
/** Optional root used only to make source-graph identity independent of temporary absolute paths. */
|
|
69
|
+
sourceIdentityRoot?: string;
|
|
68
70
|
nodeModulesDir: string;
|
|
69
71
|
cacheDir?: string;
|
|
70
72
|
sdkSourceRoot: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-
|
|
2
|
-
export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-
|
|
1
|
+
import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-Cj3--4ZJ.js';
|
|
2
|
+
export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-Cj3--4ZJ.js';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
4
|
|
|
5
5
|
type PlayPackageImport = {
|
|
@@ -65,6 +65,8 @@ type PlayLocalFileDiscoveryResult = {
|
|
|
65
65
|
};
|
|
66
66
|
type PlayBundlingAdapter = {
|
|
67
67
|
projectRoot: string;
|
|
68
|
+
/** Optional root used only to make source-graph identity independent of temporary absolute paths. */
|
|
69
|
+
sourceIdentityRoot?: string;
|
|
68
70
|
nodeModulesDir: string;
|
|
69
71
|
cacheDir?: string;
|
|
70
72
|
sdkSourceRoot: string;
|
|
@@ -21,7 +21,9 @@ import {
|
|
|
21
21
|
extname,
|
|
22
22
|
isAbsolute,
|
|
23
23
|
join,
|
|
24
|
-
|
|
24
|
+
relative,
|
|
25
|
+
resolve,
|
|
26
|
+
sep
|
|
25
27
|
} from "path";
|
|
26
28
|
import { builtinModules } from "module";
|
|
27
29
|
import { Parser } from "acorn";
|
|
@@ -3949,6 +3951,7 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
3949
3951
|
" csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;",
|
|
3950
3952
|
" dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;",
|
|
3951
3953
|
" map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: DatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;",
|
|
3954
|
+
" readonly run: { readonly id: string };",
|
|
3952
3955
|
` runSteps<TInput extends Record<string, unknown>, TOutput>(program: RunnableStepProgram<TInput, TOutput>, input: TInput, options?: { description?: ${cloudReferenceType("ctx.runSteps.options.description")} }): Promise<TOutput>;`,
|
|
3953
3956
|
" tools: { execute<K extends string>(request: ToolExecutionRequest<K>): Promise<ToolExecutionOutput<K>> };",
|
|
3954
3957
|
` customerDb: { query<TRow extends Record<string, unknown> = Record<string, unknown>>(statement: SqlQuery, options?: { maxRows?: ${cloudReferenceType("ctx.customerDb.query.options.maxRows")}; timeoutMs?: ${cloudReferenceType("ctx.customerDb.query.options.timeoutMs")} }): Promise<TRow[]> };`,
|
|
@@ -4060,6 +4063,15 @@ function assertValidExportName(exportName) {
|
|
|
4060
4063
|
function sha256(value) {
|
|
4061
4064
|
return createHash("sha256").update(value).digest("hex");
|
|
4062
4065
|
}
|
|
4066
|
+
function sourceIdentityPath(filePath, adapter) {
|
|
4067
|
+
if (!adapter.sourceIdentityRoot) return filePath;
|
|
4068
|
+
const identityRoot = resolve(adapter.sourceIdentityRoot);
|
|
4069
|
+
const logicalPath = relative(identityRoot, resolve(filePath));
|
|
4070
|
+
if (!logicalPath || logicalPath === ".." || logicalPath.startsWith(`..${sep}`) || isAbsolute(logicalPath)) {
|
|
4071
|
+
return filePath;
|
|
4072
|
+
}
|
|
4073
|
+
return logicalPath.split(/[\\/]+/).join("/");
|
|
4074
|
+
}
|
|
4063
4075
|
function formatEsbuildMessage(message) {
|
|
4064
4076
|
const location = message.location ? `${message.location.file}:${message.location.line}:${message.location.column}` : null;
|
|
4065
4077
|
return location ? `${location} ${message.text}` : message.text;
|
|
@@ -4980,12 +4992,15 @@ async function analyzeSourceGraph(entryFile, adapter, exportName) {
|
|
|
4980
4992
|
const sourceHash = sha256(sourceCode);
|
|
4981
4993
|
const graphHash = sha256(
|
|
4982
4994
|
JSON.stringify({
|
|
4983
|
-
entryFile: absoluteEntryFile,
|
|
4984
|
-
localFiles: [...localFiles.entries()].map(([filePath, contents]) => ({
|
|
4995
|
+
entryFile: sourceIdentityPath(absoluteEntryFile, adapter),
|
|
4996
|
+
localFiles: [...localFiles.entries()].map(([filePath, contents]) => ({
|
|
4997
|
+
filePath: sourceIdentityPath(filePath, adapter),
|
|
4998
|
+
hash: sha256(contents)
|
|
4999
|
+
})).sort((left, right) => left.filePath.localeCompare(right.filePath)),
|
|
4985
5000
|
nodeBuiltins: [...nodeBuiltins].sort(),
|
|
4986
5001
|
packages: [...packages.entries()].map(([name, version]) => ({ name, version })).sort((left, right) => left.name.localeCompare(right.name)),
|
|
4987
5002
|
importedPlayDependencies: [...importedPlayDependencies.values()].map((dependency) => ({
|
|
4988
|
-
filePath: dependency.filePath,
|
|
5003
|
+
filePath: sourceIdentityPath(dependency.filePath, adapter),
|
|
4989
5004
|
playName: dependency.playName
|
|
4990
5005
|
})).sort((left, right) => left.filePath.localeCompare(right.filePath))
|
|
4991
5006
|
})
|
|
@@ -5024,6 +5039,7 @@ async function analyzeSourceGraph(entryFile, adapter, exportName) {
|
|
|
5024
5039
|
}
|
|
5025
5040
|
function artifactCachePath(graphHash, artifactKind, adapter) {
|
|
5026
5041
|
return join(
|
|
5042
|
+
/* turbopackIgnore: true */
|
|
5027
5043
|
adapter.cacheDir ?? PLAY_ARTIFACT_CACHE_DIR,
|
|
5028
5044
|
`${graphHash}.${artifactKind}.json`
|
|
5029
5045
|
);
|
|
@@ -5031,7 +5047,12 @@ function artifactCachePath(graphHash, artifactKind, adapter) {
|
|
|
5031
5047
|
async function readArtifactCache(graphHash, artifactKind, adapter) {
|
|
5032
5048
|
try {
|
|
5033
5049
|
const serialized = await readFile(
|
|
5034
|
-
|
|
5050
|
+
/* turbopackIgnore: true */
|
|
5051
|
+
artifactCachePath(
|
|
5052
|
+
graphHash,
|
|
5053
|
+
artifactKind,
|
|
5054
|
+
adapter
|
|
5055
|
+
),
|
|
5035
5056
|
"utf-8"
|
|
5036
5057
|
);
|
|
5037
5058
|
return JSON.parse(serialized);
|
|
@@ -5041,8 +5062,13 @@ async function readArtifactCache(graphHash, artifactKind, adapter) {
|
|
|
5041
5062
|
}
|
|
5042
5063
|
async function writeArtifactCache(artifact, adapter) {
|
|
5043
5064
|
const cacheDir = adapter.cacheDir ?? PLAY_ARTIFACT_CACHE_DIR;
|
|
5044
|
-
await mkdir(
|
|
5065
|
+
await mkdir(
|
|
5066
|
+
/* turbopackIgnore: true */
|
|
5067
|
+
cacheDir,
|
|
5068
|
+
{ recursive: true }
|
|
5069
|
+
);
|
|
5045
5070
|
await writeFile(
|
|
5071
|
+
/* turbopackIgnore: true */
|
|
5046
5072
|
artifactCachePath(
|
|
5047
5073
|
artifact.graphHash,
|
|
5048
5074
|
artifact.artifactKind ?? PLAY_ARTIFACT_KINDS.cjsNode20,
|