deepline 0.2.50 → 0.2.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/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/cli/index.js +105 -11
- package/dist/cli/index.mjs +105 -11
- 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 +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 +1 -0
- package/package.json +1 -1
|
@@ -711,6 +711,7 @@ export type MonitorListEntry = {
|
|
|
711
711
|
webhook_state?: string;
|
|
712
712
|
last_received_event?: string | null;
|
|
713
713
|
bound_plays?: Array<Record<string, unknown>>;
|
|
714
|
+
consumer_health_truncated?: boolean;
|
|
714
715
|
[key: string]: unknown;
|
|
715
716
|
};
|
|
716
717
|
|
|
@@ -726,6 +727,8 @@ export type MonitorsListResult = {
|
|
|
726
727
|
is_truncated?: boolean;
|
|
727
728
|
next_cursor?: string | null;
|
|
728
729
|
status_filter_applied?: string;
|
|
730
|
+
status_summary?: Array<{ status: string; count: number }>;
|
|
731
|
+
include_consumers?: boolean;
|
|
729
732
|
[key: string]: unknown;
|
|
730
733
|
};
|
|
731
734
|
|
|
@@ -737,6 +740,8 @@ export type MonitorsListOptions = {
|
|
|
737
740
|
/** Page past a truncated result using a prior response's `next_cursor`. */
|
|
738
741
|
cursor?: string;
|
|
739
742
|
compact?: boolean;
|
|
743
|
+
/** Include bounded current SQL-listener delivery/run health (requires limit <= 20). */
|
|
744
|
+
includeConsumers?: boolean;
|
|
740
745
|
};
|
|
741
746
|
|
|
742
747
|
/**
|
|
@@ -814,9 +819,9 @@ export type MonitorsNamespace = {
|
|
|
814
819
|
definition: MonitorDefinition,
|
|
815
820
|
options?: { dryRun?: boolean },
|
|
816
821
|
) => Promise<MonitorDeployResult>;
|
|
817
|
-
/** List deployed monitors (active by default). */
|
|
822
|
+
/** List deployed monitors (active by default). `includeConsumers` requires a limit of 20 or fewer. */
|
|
818
823
|
list: (options?: MonitorsListOptions) => Promise<MonitorsListResult>;
|
|
819
|
-
/** Fetch one deployed monitor by public key
|
|
824
|
+
/** Fetch one deployed monitor by public key with bounded current listener health. */
|
|
820
825
|
get: (key: string) => Promise<MonitorDetail>;
|
|
821
826
|
/**
|
|
822
827
|
* Test a deployed monitor. `validationOnly` safely verifies the callback
|
|
@@ -825,7 +830,7 @@ export type MonitorsNamespace = {
|
|
|
825
830
|
test: (
|
|
826
831
|
key: string,
|
|
827
832
|
payload: Record<string, unknown>,
|
|
828
|
-
options?: { validationOnly?: boolean },
|
|
833
|
+
options?: { validationOnly?: boolean; dispatch?: boolean },
|
|
829
834
|
) => Promise<MonitorTestResult>;
|
|
830
835
|
validate: (key: string) => Promise<MonitorValidateResult>;
|
|
831
836
|
/** List the published plays depending on one monitor's output streams. */
|
|
@@ -4531,6 +4536,7 @@ export class DeeplineClient {
|
|
|
4531
4536
|
params.set('limit', String(options.limit));
|
|
4532
4537
|
if (options?.cursor) params.set('cursor', options.cursor);
|
|
4533
4538
|
if (options?.compact) params.set('compact', 'true');
|
|
4539
|
+
if (options?.includeConsumers) params.set('include_consumers', 'true');
|
|
4534
4540
|
const query = params.toString();
|
|
4535
4541
|
// Single interpolation only — see availableMonitors: a nested template in
|
|
4536
4542
|
// the path confuses the SDK/API contract path extractor.
|
|
@@ -4552,7 +4558,7 @@ export class DeeplineClient {
|
|
|
4552
4558
|
async testMonitorWebhook(
|
|
4553
4559
|
key: string,
|
|
4554
4560
|
payload: Record<string, unknown>,
|
|
4555
|
-
options?: { validationOnly?: boolean },
|
|
4561
|
+
options?: { validationOnly?: boolean; dispatch?: boolean },
|
|
4556
4562
|
): Promise<MonitorTestResult> {
|
|
4557
4563
|
return this.http.request<MonitorTestResult>(
|
|
4558
4564
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/test`,
|
|
@@ -4560,7 +4566,11 @@ export class DeeplineClient {
|
|
|
4560
4566
|
method: 'POST',
|
|
4561
4567
|
body: {
|
|
4562
4568
|
payload,
|
|
4563
|
-
...(options?.validationOnly
|
|
4569
|
+
...(options?.validationOnly
|
|
4570
|
+
? { mode: 'validation_only' }
|
|
4571
|
+
: options?.dispatch
|
|
4572
|
+
? { mode: 'dispatch' }
|
|
4573
|
+
: {}),
|
|
4564
4574
|
},
|
|
4565
4575
|
},
|
|
4566
4576
|
);
|
|
@@ -160,7 +160,7 @@ export const SDK_RELEASE = {
|
|
|
160
160
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
161
161
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
162
162
|
// release keeps lazy paging semantics independent of row residency.
|
|
163
|
-
version: '0.2.
|
|
163
|
+
version: '0.2.52',
|
|
164
164
|
contracts: {
|
|
165
165
|
api: {
|
|
166
166
|
name: 'sdk-http-api',
|
|
@@ -1343,12 +1343,31 @@ export interface PlayCheckSqlListenerTrigger {
|
|
|
1343
1343
|
};
|
|
1344
1344
|
}
|
|
1345
1345
|
|
|
1346
|
+
/**
|
|
1347
|
+
* The input delivered to a SQL-listener Play invocation. One changed Customer
|
|
1348
|
+
* DB row starts one run with this top-level event object; it is not an events
|
|
1349
|
+
* array or a polling batch.
|
|
1350
|
+
*/
|
|
1351
|
+
export interface PlayCheckSqlListenerEventSummary {
|
|
1352
|
+
delivery: 'one_event_per_matched_row';
|
|
1353
|
+
fields: Array<
|
|
1354
|
+
| 'tool'
|
|
1355
|
+
| 'stream'
|
|
1356
|
+
| 'operation'
|
|
1357
|
+
| 'before'
|
|
1358
|
+
| 'after'
|
|
1359
|
+
| 'changedAt'
|
|
1360
|
+
| 'metadata'
|
|
1361
|
+
>;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1346
1364
|
/**
|
|
1347
1365
|
* Concise summary of the trigger bindings the server recognized for a play.
|
|
1348
1366
|
* Only present triggers are populated.
|
|
1349
1367
|
*/
|
|
1350
1368
|
export interface PlayCheckTriggersSummary {
|
|
1351
1369
|
sqlListeners?: PlayCheckSqlListenerTrigger[];
|
|
1370
|
+
sqlListenerEvent?: PlayCheckSqlListenerEventSummary;
|
|
1352
1371
|
cron?: { schedule: string; timezone?: string };
|
|
1353
1372
|
webhook?: true;
|
|
1354
1373
|
}
|
|
@@ -157,6 +157,7 @@ import {
|
|
|
157
157
|
validatePlayAuthoringField,
|
|
158
158
|
type PlayAuthoringContractEdition,
|
|
159
159
|
type PlaySqlQuery,
|
|
160
|
+
type PlayAuthoringRunScope,
|
|
160
161
|
type PlayAuthoringRuntimeContext,
|
|
161
162
|
} from '../plays/authoring-contract';
|
|
162
163
|
import {
|
|
@@ -1338,6 +1339,7 @@ type ScalarPlayAuthoringRuntimeContext = Pick<
|
|
|
1338
1339
|
PlayAuthoringRuntimeContext,
|
|
1339
1340
|
| 'tools'
|
|
1340
1341
|
| 'customerDb'
|
|
1342
|
+
| 'run'
|
|
1341
1343
|
| 'tool'
|
|
1342
1344
|
| 'step'
|
|
1343
1345
|
| 'fetch'
|
|
@@ -3332,6 +3334,10 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
3332
3334
|
return this.currentExecutionScope.logical.runId;
|
|
3333
3335
|
}
|
|
3334
3336
|
|
|
3337
|
+
get run(): PlayAuthoringRunScope {
|
|
3338
|
+
return { id: this.currentRunId };
|
|
3339
|
+
}
|
|
3340
|
+
|
|
3335
3341
|
private get currentReceiptOwnerRunId(): string {
|
|
3336
3342
|
return this.currentExecutionScope.receipt.ownerRunId;
|
|
3337
3343
|
}
|
|
@@ -68,6 +68,7 @@ export const PLAY_AUTHORING_CONTRACT_ISSUE_CODES = [
|
|
|
68
68
|
'play_authoring_dynamic_identity_unvalidated',
|
|
69
69
|
'play_authoring_fetch_secret_requires_tls',
|
|
70
70
|
'play_authoring_fetch_idempotency_required',
|
|
71
|
+
'play_authoring_fetch_key_reused_in_loop',
|
|
71
72
|
'play_authoring_binding_invalid',
|
|
72
73
|
'play_authoring_input_schema_unresolved',
|
|
73
74
|
] as const;
|
|
@@ -215,8 +216,23 @@ export type PlayTriggerSqlListenerSummary = {
|
|
|
215
216
|
operations: string[];
|
|
216
217
|
where?: PlaySqlListenerWhere;
|
|
217
218
|
};
|
|
219
|
+
/** Author-facing shape of one SQL-listener invocation. */
|
|
220
|
+
export type PlayTriggerSqlListenerEventSummary = {
|
|
221
|
+
delivery: 'one_event_per_matched_row';
|
|
222
|
+
fields: Array<
|
|
223
|
+
| 'tool'
|
|
224
|
+
| 'stream'
|
|
225
|
+
| 'operation'
|
|
226
|
+
| 'before'
|
|
227
|
+
| 'after'
|
|
228
|
+
| 'changedAt'
|
|
229
|
+
| 'metadata'
|
|
230
|
+
>;
|
|
231
|
+
};
|
|
218
232
|
export type PlayTriggersSummary = {
|
|
219
233
|
sqlListeners?: PlayTriggerSqlListenerSummary[];
|
|
234
|
+
/** Present when the play has at least one sqlListener trigger. */
|
|
235
|
+
sqlListenerEvent?: PlayTriggerSqlListenerEventSummary;
|
|
220
236
|
cron?: { schedule: string; timezone?: string };
|
|
221
237
|
webhook?: true;
|
|
222
238
|
};
|
|
@@ -237,6 +253,18 @@ export function derivePlayTriggersSummary(
|
|
|
237
253
|
? { where: listener.where as PlaySqlListenerWhere }
|
|
238
254
|
: {}),
|
|
239
255
|
}));
|
|
256
|
+
summary.sqlListenerEvent = {
|
|
257
|
+
delivery: 'one_event_per_matched_row',
|
|
258
|
+
fields: [
|
|
259
|
+
'tool',
|
|
260
|
+
'stream',
|
|
261
|
+
'operation',
|
|
262
|
+
'before',
|
|
263
|
+
'after',
|
|
264
|
+
'changedAt',
|
|
265
|
+
'metadata',
|
|
266
|
+
],
|
|
267
|
+
};
|
|
240
268
|
}
|
|
241
269
|
if (bindings.cron?.schedule) {
|
|
242
270
|
summary.cron = bindings.cron.timezone
|
|
@@ -652,6 +680,7 @@ export const PLAY_AUTHORING_RUNTIME_CONTEXT_MEMBERS = [
|
|
|
652
680
|
'dataset',
|
|
653
681
|
'fetch',
|
|
654
682
|
'log',
|
|
683
|
+
'run',
|
|
655
684
|
'runPlay',
|
|
656
685
|
'runSteps',
|
|
657
686
|
'secrets',
|
|
@@ -743,6 +772,31 @@ export type PlayAuthoringRunStepsOptions = {
|
|
|
743
772
|
description?: string;
|
|
744
773
|
};
|
|
745
774
|
|
|
775
|
+
/**
|
|
776
|
+
* Stable identity of the currently executing Play invocation.
|
|
777
|
+
*
|
|
778
|
+
* The id is unchanged while Deepline resumes or retries the same durable run.
|
|
779
|
+
* A separately submitted run intentionally receives a new id.
|
|
780
|
+
*/
|
|
781
|
+
export type PlayAuthoringRunScope = {
|
|
782
|
+
readonly id: string;
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
/** Factual authoring guidance rendered into SDK and offline-agent references. */
|
|
786
|
+
export const PLAY_AUTHORING_DOCUMENTATION = {
|
|
787
|
+
fetchBatching: {
|
|
788
|
+
warning:
|
|
789
|
+
'A static ctx.fetch key inside a loop is a warning because every iteration must still have distinct method, URL, body, or safe headers. One durable receipt must never stand in for every request.',
|
|
790
|
+
guidance:
|
|
791
|
+
'Keep the static fetch label. For a mutating batch, make the body distinct and use a replay-stable external Idempotency-Key such as `${ctx.run.id}:signals:${batchIndex}`.',
|
|
792
|
+
},
|
|
793
|
+
runId: {
|
|
794
|
+
semantics:
|
|
795
|
+
'ctx.run.id is stable while Deepline retries or resumes one durable run. A separately submitted run receives a new id.',
|
|
796
|
+
use: 'Use it when deriving an external idempotency key for a sequence of batches.',
|
|
797
|
+
},
|
|
798
|
+
} as const;
|
|
799
|
+
|
|
746
800
|
/** The complete customer-authored `ctx` Interface shared by every Adapter. */
|
|
747
801
|
export interface PlayAuthoringRuntimeContext {
|
|
748
802
|
/**
|
|
@@ -776,6 +830,12 @@ export interface PlayAuthoringRuntimeContext {
|
|
|
776
830
|
>,
|
|
777
831
|
): never;
|
|
778
832
|
|
|
833
|
+
/**
|
|
834
|
+
* Identity for this durable run. Use this to build a replay-stable external
|
|
835
|
+
* idempotency key, for example when posting a sequence of batches.
|
|
836
|
+
*/
|
|
837
|
+
readonly run: PlayAuthoringRunScope;
|
|
838
|
+
|
|
779
839
|
tools: {
|
|
780
840
|
/**
|
|
781
841
|
* Execute a provider tool through the durable receipt contract.
|
|
@@ -2294,6 +2354,7 @@ export const PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
2294
2354
|
' csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;',
|
|
2295
2355
|
' dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;',
|
|
2296
2356
|
' map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: DatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;',
|
|
2357
|
+
' readonly run: { readonly id: string };',
|
|
2297
2358
|
` runSteps<TInput extends Record<string, unknown>, TOutput>(program: RunnableStepProgram<TInput, TOutput>, input: TInput, options?: { description?: ${cloudReferenceType('ctx.runSteps.options.description')} }): Promise<TOutput>;`,
|
|
2298
2359
|
' tools: { execute<K extends string>(request: ToolExecutionRequest<K>): Promise<ToolExecutionOutput<K>> };',
|
|
2299
2360
|
` 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[]> };`,
|
package/dist/cli/index.js
CHANGED
|
@@ -1044,7 +1044,7 @@ var SDK_RELEASE = {
|
|
|
1044
1044
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
1045
1045
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
1046
1046
|
// release keeps lazy paging semantics independent of row residency.
|
|
1047
|
-
version: "0.2.
|
|
1047
|
+
version: "0.2.52",
|
|
1048
1048
|
contracts: {
|
|
1049
1049
|
api: {
|
|
1050
1050
|
name: "sdk-http-api",
|
|
@@ -6034,6 +6034,7 @@ var DeeplineClient = class {
|
|
|
6034
6034
|
params.set("limit", String(options.limit));
|
|
6035
6035
|
if (options?.cursor) params.set("cursor", options.cursor);
|
|
6036
6036
|
if (options?.compact) params.set("compact", "true");
|
|
6037
|
+
if (options?.includeConsumers) params.set("include_consumers", "true");
|
|
6037
6038
|
const query = params.toString();
|
|
6038
6039
|
const suffix = query ? `?${query}` : "";
|
|
6039
6040
|
return this.http.request(
|
|
@@ -6055,7 +6056,7 @@ var DeeplineClient = class {
|
|
|
6055
6056
|
method: "POST",
|
|
6056
6057
|
body: {
|
|
6057
6058
|
payload,
|
|
6058
|
-
...options?.validationOnly ? { mode: "validation_only" } : {}
|
|
6059
|
+
...options?.validationOnly ? { mode: "validation_only" } : options?.dispatch ? { mode: "dispatch" } : {}
|
|
6059
6060
|
}
|
|
6060
6061
|
}
|
|
6061
6062
|
);
|
|
@@ -16170,6 +16171,7 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
16170
16171
|
" csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;",
|
|
16171
16172
|
" dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;",
|
|
16172
16173
|
" map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: DatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;",
|
|
16174
|
+
" readonly run: { readonly id: string };",
|
|
16173
16175
|
` runSteps<TInput extends Record<string, unknown>, TOutput>(program: RunnableStepProgram<TInput, TOutput>, input: TInput, options?: { description?: ${cloudReferenceType("ctx.runSteps.options.description")} }): Promise<TOutput>;`,
|
|
16174
16176
|
" tools: { execute<K extends string>(request: ToolExecutionRequest<K>): Promise<ToolExecutionOutput<K>> };",
|
|
16175
16177
|
` 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[]> };`,
|
|
@@ -21669,6 +21671,11 @@ function printPlayTriggers(triggers) {
|
|
|
21669
21671
|
const whereNote = listener.where ? " (with where filter)" : "";
|
|
21670
21672
|
console.log(` sqlListeners \u2192 ${target} on ${operations}${whereNote}`);
|
|
21671
21673
|
}
|
|
21674
|
+
if (triggers.sqlListenerEvent) {
|
|
21675
|
+
console.log(
|
|
21676
|
+
` sqlListener input \u2192 one top-level event per matched row: ${triggers.sqlListenerEvent.fields.join(", ")}`
|
|
21677
|
+
);
|
|
21678
|
+
}
|
|
21672
21679
|
if (triggers.cron) {
|
|
21673
21680
|
const timezone = triggers.cron.timezone ? ` (${triggers.cron.timezone})` : "";
|
|
21674
21681
|
console.log(` cron \u2192 ${triggers.cron.schedule}${timezone}`);
|
|
@@ -23630,6 +23637,8 @@ Notes:
|
|
|
23630
23637
|
without starting a run or spending Deepline credits.
|
|
23631
23638
|
Local .play.ts checks bundle the play, validate its artifact, and stop before
|
|
23632
23639
|
any cloud run is created.
|
|
23640
|
+
SQL-listener checks echo one top-level changed-row input event under
|
|
23641
|
+
recognized.triggers.sqlListenerEvent; listeners do not receive an events batch.
|
|
23633
23642
|
|
|
23634
23643
|
Examples:
|
|
23635
23644
|
deepline plays check prebuilt/name-and-domain-to-email-waterfall-batch
|
|
@@ -30860,6 +30869,20 @@ function renderDeployReplacementWarning(input2) {
|
|
|
30860
30869
|
);
|
|
30861
30870
|
return lines;
|
|
30862
30871
|
}
|
|
30872
|
+
function renderDeployFilterRemovalWarning(payload) {
|
|
30873
|
+
const summary = asRecord2(payload.change_summary);
|
|
30874
|
+
const definition = summary ? asRecord2(summary.definition) : void 0;
|
|
30875
|
+
const changed = definition && Array.isArray(definition.changed) ? definition.changed : [];
|
|
30876
|
+
const removed = changed.some((raw) => {
|
|
30877
|
+
const item = asRecord2(raw);
|
|
30878
|
+
return asString(item?.path) === "payload.job_titles" && item?.before != null && item.after == null;
|
|
30879
|
+
});
|
|
30880
|
+
return removed ? [
|
|
30881
|
+
"WARNING: this full deploy removes the job_titles filter.",
|
|
30882
|
+
"Future findings will be unfiltered. Existing Customer DB rows are preserved.",
|
|
30883
|
+
'Use `deepline monitors update <key> {"payload":{"job_titles":"..."}}` to change only the filter.'
|
|
30884
|
+
] : [];
|
|
30885
|
+
}
|
|
30863
30886
|
function renderMonitorDeployCompletion(payload) {
|
|
30864
30887
|
const monitor = asRecord2(payload.monitor);
|
|
30865
30888
|
const key = monitor ? asString(monitor.key) : void 0;
|
|
@@ -30893,6 +30916,8 @@ function renderMonitorDeployCompletion(payload) {
|
|
|
30893
30916
|
monitorKey: key
|
|
30894
30917
|
});
|
|
30895
30918
|
if (replacementWarning.length) lines.push("", ...replacementWarning);
|
|
30919
|
+
const filterRemovalWarning = renderDeployFilterRemovalWarning(payload);
|
|
30920
|
+
if (filterRemovalWarning.length) lines.push("", ...filterRemovalWarning);
|
|
30896
30921
|
const guidance = asRecord2(payload.setup_guidance);
|
|
30897
30922
|
if (guidance) {
|
|
30898
30923
|
const callbackUrl = asString(guidance.callback_url);
|
|
@@ -30949,6 +30974,8 @@ function renderMonitorDeployPlan(payload) {
|
|
|
30949
30974
|
completed: false
|
|
30950
30975
|
});
|
|
30951
30976
|
if (replacementWarning.length) lines.push("", ...replacementWarning);
|
|
30977
|
+
const filterRemovalWarning = renderDeployFilterRemovalWarning(payload);
|
|
30978
|
+
if (filterRemovalWarning.length) lines.push("", ...filterRemovalWarning);
|
|
30952
30979
|
const estimate = asRecord2(payload.deploy_cost_estimate);
|
|
30953
30980
|
const credits = estimate ? asFiniteNumber(estimate.credits) : void 0;
|
|
30954
30981
|
if (credits !== void 0) {
|
|
@@ -31155,11 +31182,31 @@ function renderDeployedListText(payload, requestedStatus) {
|
|
|
31155
31182
|
if (hasLastReceivedEvent) {
|
|
31156
31183
|
lines.push(` last received: ${lastReceivedEvent ?? "never"}`);
|
|
31157
31184
|
}
|
|
31185
|
+
if (Array.isArray(entry.bound_plays)) {
|
|
31186
|
+
for (const rawPlay of entry.bound_plays) {
|
|
31187
|
+
const play = asRecord2(rawPlay);
|
|
31188
|
+
const playName = asString(play?.name) ?? "unnamed Play";
|
|
31189
|
+
const health = asRecord2(play?.consumer_health);
|
|
31190
|
+
const healthRequested = Boolean(play && "consumer_health" in play);
|
|
31191
|
+
const state = healthRequested ? asString(health?.last_run_status) ?? "no delivery yet" : "health not requested";
|
|
31192
|
+
const lastError = asString(health?.last_error);
|
|
31193
|
+
lines.push(
|
|
31194
|
+
` consumer: ${playName} \u2014 ${state}${lastError ? ` (${lastError})` : ""}`
|
|
31195
|
+
);
|
|
31196
|
+
}
|
|
31197
|
+
}
|
|
31158
31198
|
}
|
|
31159
31199
|
const applied = asString(payload.status_filter_applied) ?? requestedStatus ?? "active";
|
|
31160
31200
|
lines.push(
|
|
31161
31201
|
`Status filter: ${applied}${requestedStatus === void 0 && applied === "active" ? " (default)" : ""} \u2014 use --status all to include disabled monitors.`
|
|
31162
31202
|
);
|
|
31203
|
+
const summary = Array.isArray(payload.status_summary) ? payload.status_summary.flatMap((raw) => {
|
|
31204
|
+
const item = asRecord2(raw);
|
|
31205
|
+
const status = item ? asString(item.status) : void 0;
|
|
31206
|
+
const count = item ? asFiniteNumber(item.count) : void 0;
|
|
31207
|
+
return status && count !== void 0 ? [`${status}: ${count}`] : [];
|
|
31208
|
+
}).join(" ") : "";
|
|
31209
|
+
if (summary) lines.push(`All lifecycle states: ${summary}`);
|
|
31163
31210
|
if (payload.is_truncated === true) {
|
|
31164
31211
|
const nextCursor = asString(payload.next_cursor);
|
|
31165
31212
|
lines.push(
|
|
@@ -31178,7 +31225,8 @@ async function handleMonitorsList(options) {
|
|
|
31178
31225
|
...options.status ? { status: options.status } : {},
|
|
31179
31226
|
...options.limit ? { limit: options.limit } : {},
|
|
31180
31227
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
31181
|
-
...options.compact ? { compact: true } : {}
|
|
31228
|
+
...options.compact ? { compact: true } : {},
|
|
31229
|
+
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
31182
31230
|
});
|
|
31183
31231
|
printCommandEnvelope(payload, {
|
|
31184
31232
|
json: options.json,
|
|
@@ -31241,6 +31289,10 @@ function renderMonitorGet(payload) {
|
|
|
31241
31289
|
const webhook = asRecord2(payload.webhook);
|
|
31242
31290
|
const guidance = asRecord2(payload.setup_guidance);
|
|
31243
31291
|
const plays = dependents && Array.isArray(dependents.plays) ? dependents.plays : [];
|
|
31292
|
+
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays.flatMap((value) => {
|
|
31293
|
+
const play = asRecord2(value);
|
|
31294
|
+
return play ? [play] : [];
|
|
31295
|
+
}) : [];
|
|
31244
31296
|
const lines = [
|
|
31245
31297
|
`Monitor: ${key}`,
|
|
31246
31298
|
`Tool: ${tool}`,
|
|
@@ -31282,6 +31334,31 @@ function renderMonitorGet(payload) {
|
|
|
31282
31334
|
` deepline monitors test ${key} '${JSON.stringify(samplePayload2)}' --json`
|
|
31283
31335
|
);
|
|
31284
31336
|
}
|
|
31337
|
+
lines.push("", `Current SQL listener consumers (${boundPlays.length}):`);
|
|
31338
|
+
if (boundPlays.length === 0) {
|
|
31339
|
+
lines.push(" none");
|
|
31340
|
+
} else {
|
|
31341
|
+
for (const play of boundPlays) {
|
|
31342
|
+
const name = asString(play.name) ?? "unnamed Play";
|
|
31343
|
+
const listener = asString(play.listener_key);
|
|
31344
|
+
const health = asRecord2(play.consumer_health);
|
|
31345
|
+
const status2 = asString(health?.last_run_status) ?? "no delivery yet";
|
|
31346
|
+
const lastDelivery = asFiniteNumber(health?.last_delivery_at);
|
|
31347
|
+
const error = asString(health?.last_error);
|
|
31348
|
+
lines.push(
|
|
31349
|
+
` ${name}${listener ? ` (listener: ${listener})` : ""}: ${status2}`
|
|
31350
|
+
);
|
|
31351
|
+
if (lastDelivery !== void 0) {
|
|
31352
|
+
lines.push(
|
|
31353
|
+
` last delivery: ${new Date(lastDelivery).toISOString()}`
|
|
31354
|
+
);
|
|
31355
|
+
}
|
|
31356
|
+
if (error) lines.push(` error: ${error}`);
|
|
31357
|
+
}
|
|
31358
|
+
}
|
|
31359
|
+
if (payload.consumer_health_truncated === true) {
|
|
31360
|
+
lines.push(" Results are truncated; use --json for the returned detail.");
|
|
31361
|
+
}
|
|
31285
31362
|
lines.push("", `Dependent published plays (${plays.length}):`);
|
|
31286
31363
|
if (plays.length === 0) {
|
|
31287
31364
|
lines.push(" none");
|
|
@@ -31306,7 +31383,11 @@ function renderMonitorGet(payload) {
|
|
|
31306
31383
|
async function handleMonitorsGet(key, options) {
|
|
31307
31384
|
const client2 = new DeeplineClient();
|
|
31308
31385
|
const payload = await client2.monitors.get(key);
|
|
31309
|
-
const
|
|
31386
|
+
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
31387
|
+
const dependents = boundPlays ? {
|
|
31388
|
+
plays: boundPlays,
|
|
31389
|
+
truncated: payload.consumer_health_truncated === true
|
|
31390
|
+
} : await client2.monitors.dependents(key);
|
|
31310
31391
|
const detail = { ...payload, dependents };
|
|
31311
31392
|
printCommandEnvelope(detail, {
|
|
31312
31393
|
json: options.json,
|
|
@@ -31319,7 +31400,8 @@ async function handleMonitorsTest(key, payload, options) {
|
|
|
31319
31400
|
key,
|
|
31320
31401
|
explicitPayload,
|
|
31321
31402
|
{
|
|
31322
|
-
validationOnly: options.dispatch !== true
|
|
31403
|
+
validationOnly: options.dispatch !== true,
|
|
31404
|
+
dispatch: options.dispatch === true
|
|
31323
31405
|
}
|
|
31324
31406
|
);
|
|
31325
31407
|
const dispatch = options.dispatch === true;
|
|
@@ -31505,12 +31587,17 @@ Notes:
|
|
|
31505
31587
|
not the page size), returned, is_truncated, and next_cursor. When is_truncated
|
|
31506
31588
|
is true, page with --cursor <next_cursor> until it is false \u2014 a "no matching
|
|
31507
31589
|
monitor" reuse conclusion off a truncated page deploys a duplicate paid feed.
|
|
31590
|
+
The default list stays cheap: it includes the current downstream Play binding
|
|
31591
|
+
metadata but does not resolve per-monitor delivery/run health. Pass
|
|
31592
|
+
--include-consumers with --limit 20 or fewer to include the current
|
|
31593
|
+
SQL-listener delivery/run health for each returned monitor.
|
|
31508
31594
|
|
|
31509
31595
|
Examples:
|
|
31510
31596
|
deepline monitors list
|
|
31511
31597
|
deepline monitors list --status all --json
|
|
31512
31598
|
deepline monitors list --status all --cursor <next_cursor> --json
|
|
31513
31599
|
deepline monitors list --compact --json
|
|
31600
|
+
deepline monitors list --include-consumers --limit 20 --json
|
|
31514
31601
|
`
|
|
31515
31602
|
).option(
|
|
31516
31603
|
"--status <status>",
|
|
@@ -31518,7 +31605,10 @@ Examples:
|
|
|
31518
31605
|
).option("--limit <n>", "Limit the number of deployed monitors returned").option(
|
|
31519
31606
|
"--cursor <cursor>",
|
|
31520
31607
|
"Page past a truncated result using the next_cursor from a prior list response"
|
|
31521
|
-
).option("--compact", COMPACT_OPTION_DESCRIPTION)
|
|
31608
|
+
).option("--compact", COMPACT_OPTION_DESCRIPTION).option(
|
|
31609
|
+
"--include-consumers",
|
|
31610
|
+
"Include current SQL-listener consumer health (requires --limit 20 or fewer)"
|
|
31611
|
+
)
|
|
31522
31612
|
).action(monitorsAction(handleMonitorsList));
|
|
31523
31613
|
withJsonOption(
|
|
31524
31614
|
monitors.command("get <key>").description("Show a single deployed monitor by its public key.").addHelpText(
|
|
@@ -31568,10 +31658,11 @@ Notes:
|
|
|
31568
31658
|
and optional controls (Deepline lifecycle metadata). Pass it positionally,
|
|
31569
31659
|
via --file <path>, or
|
|
31570
31660
|
from stdin with --file -. Does not deploy or spend credits.
|
|
31571
|
-
|
|
31572
|
-
|
|
31573
|
-
|
|
31574
|
-
|
|
31661
|
+
Check validates the local definition only. It does not contact an existing
|
|
31662
|
+
upstream resource, prove that future events will arrive, or verify downstream
|
|
31663
|
+
Play delivery. The JSON response reports this validation scope explicitly.
|
|
31664
|
+
Provider-specific grammar, precedence, enum applicability, examples, and
|
|
31665
|
+
update semantics are returned by the live monitor contract. Inspect it with
|
|
31575
31666
|
\`deepline monitors available deepline_native.company_radar --json\`.
|
|
31576
31667
|
|
|
31577
31668
|
Examples:
|
|
@@ -31680,7 +31771,10 @@ Examples:
|
|
|
31680
31771
|
).option("--limit <n>", "Limit the number of deployed monitors returned").option(
|
|
31681
31772
|
"--cursor <cursor>",
|
|
31682
31773
|
"Page past a truncated result using the next_cursor from a prior list response"
|
|
31683
|
-
).option("--compact", COMPACT_OPTION_DESCRIPTION)
|
|
31774
|
+
).option("--compact", COMPACT_OPTION_DESCRIPTION).option(
|
|
31775
|
+
"--include-consumers",
|
|
31776
|
+
"Include current SQL-listener consumer health (requires --limit 20 or fewer)"
|
|
31777
|
+
)
|
|
31684
31778
|
).action(monitorsAction(handleMonitorsList));
|
|
31685
31779
|
withJsonOption(
|
|
31686
31780
|
deployed.command("get <key>").description("Alias of `monitors get <key>`.")
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1030,7 +1030,7 @@ var SDK_RELEASE = {
|
|
|
1030
1030
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
1031
1031
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
1032
1032
|
// release keeps lazy paging semantics independent of row residency.
|
|
1033
|
-
version: "0.2.
|
|
1033
|
+
version: "0.2.52",
|
|
1034
1034
|
contracts: {
|
|
1035
1035
|
api: {
|
|
1036
1036
|
name: "sdk-http-api",
|
|
@@ -6020,6 +6020,7 @@ var DeeplineClient = class {
|
|
|
6020
6020
|
params.set("limit", String(options.limit));
|
|
6021
6021
|
if (options?.cursor) params.set("cursor", options.cursor);
|
|
6022
6022
|
if (options?.compact) params.set("compact", "true");
|
|
6023
|
+
if (options?.includeConsumers) params.set("include_consumers", "true");
|
|
6023
6024
|
const query = params.toString();
|
|
6024
6025
|
const suffix = query ? `?${query}` : "";
|
|
6025
6026
|
return this.http.request(
|
|
@@ -6041,7 +6042,7 @@ var DeeplineClient = class {
|
|
|
6041
6042
|
method: "POST",
|
|
6042
6043
|
body: {
|
|
6043
6044
|
payload,
|
|
6044
|
-
...options?.validationOnly ? { mode: "validation_only" } : {}
|
|
6045
|
+
...options?.validationOnly ? { mode: "validation_only" } : options?.dispatch ? { mode: "dispatch" } : {}
|
|
6045
6046
|
}
|
|
6046
6047
|
}
|
|
6047
6048
|
);
|
|
@@ -16209,6 +16210,7 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
16209
16210
|
" csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;",
|
|
16210
16211
|
" dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;",
|
|
16211
16212
|
" map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: DatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;",
|
|
16213
|
+
" readonly run: { readonly id: string };",
|
|
16212
16214
|
` runSteps<TInput extends Record<string, unknown>, TOutput>(program: RunnableStepProgram<TInput, TOutput>, input: TInput, options?: { description?: ${cloudReferenceType("ctx.runSteps.options.description")} }): Promise<TOutput>;`,
|
|
16213
16215
|
" tools: { execute<K extends string>(request: ToolExecutionRequest<K>): Promise<ToolExecutionOutput<K>> };",
|
|
16214
16216
|
` 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[]> };`,
|
|
@@ -21715,6 +21717,11 @@ function printPlayTriggers(triggers) {
|
|
|
21715
21717
|
const whereNote = listener.where ? " (with where filter)" : "";
|
|
21716
21718
|
console.log(` sqlListeners \u2192 ${target} on ${operations}${whereNote}`);
|
|
21717
21719
|
}
|
|
21720
|
+
if (triggers.sqlListenerEvent) {
|
|
21721
|
+
console.log(
|
|
21722
|
+
` sqlListener input \u2192 one top-level event per matched row: ${triggers.sqlListenerEvent.fields.join(", ")}`
|
|
21723
|
+
);
|
|
21724
|
+
}
|
|
21718
21725
|
if (triggers.cron) {
|
|
21719
21726
|
const timezone = triggers.cron.timezone ? ` (${triggers.cron.timezone})` : "";
|
|
21720
21727
|
console.log(` cron \u2192 ${triggers.cron.schedule}${timezone}`);
|
|
@@ -23676,6 +23683,8 @@ Notes:
|
|
|
23676
23683
|
without starting a run or spending Deepline credits.
|
|
23677
23684
|
Local .play.ts checks bundle the play, validate its artifact, and stop before
|
|
23678
23685
|
any cloud run is created.
|
|
23686
|
+
SQL-listener checks echo one top-level changed-row input event under
|
|
23687
|
+
recognized.triggers.sqlListenerEvent; listeners do not receive an events batch.
|
|
23679
23688
|
|
|
23680
23689
|
Examples:
|
|
23681
23690
|
deepline plays check prebuilt/name-and-domain-to-email-waterfall-batch
|
|
@@ -30913,6 +30922,20 @@ function renderDeployReplacementWarning(input2) {
|
|
|
30913
30922
|
);
|
|
30914
30923
|
return lines;
|
|
30915
30924
|
}
|
|
30925
|
+
function renderDeployFilterRemovalWarning(payload) {
|
|
30926
|
+
const summary = asRecord2(payload.change_summary);
|
|
30927
|
+
const definition = summary ? asRecord2(summary.definition) : void 0;
|
|
30928
|
+
const changed = definition && Array.isArray(definition.changed) ? definition.changed : [];
|
|
30929
|
+
const removed = changed.some((raw) => {
|
|
30930
|
+
const item = asRecord2(raw);
|
|
30931
|
+
return asString(item?.path) === "payload.job_titles" && item?.before != null && item.after == null;
|
|
30932
|
+
});
|
|
30933
|
+
return removed ? [
|
|
30934
|
+
"WARNING: this full deploy removes the job_titles filter.",
|
|
30935
|
+
"Future findings will be unfiltered. Existing Customer DB rows are preserved.",
|
|
30936
|
+
'Use `deepline monitors update <key> {"payload":{"job_titles":"..."}}` to change only the filter.'
|
|
30937
|
+
] : [];
|
|
30938
|
+
}
|
|
30916
30939
|
function renderMonitorDeployCompletion(payload) {
|
|
30917
30940
|
const monitor = asRecord2(payload.monitor);
|
|
30918
30941
|
const key = monitor ? asString(monitor.key) : void 0;
|
|
@@ -30946,6 +30969,8 @@ function renderMonitorDeployCompletion(payload) {
|
|
|
30946
30969
|
monitorKey: key
|
|
30947
30970
|
});
|
|
30948
30971
|
if (replacementWarning.length) lines.push("", ...replacementWarning);
|
|
30972
|
+
const filterRemovalWarning = renderDeployFilterRemovalWarning(payload);
|
|
30973
|
+
if (filterRemovalWarning.length) lines.push("", ...filterRemovalWarning);
|
|
30949
30974
|
const guidance = asRecord2(payload.setup_guidance);
|
|
30950
30975
|
if (guidance) {
|
|
30951
30976
|
const callbackUrl = asString(guidance.callback_url);
|
|
@@ -31002,6 +31027,8 @@ function renderMonitorDeployPlan(payload) {
|
|
|
31002
31027
|
completed: false
|
|
31003
31028
|
});
|
|
31004
31029
|
if (replacementWarning.length) lines.push("", ...replacementWarning);
|
|
31030
|
+
const filterRemovalWarning = renderDeployFilterRemovalWarning(payload);
|
|
31031
|
+
if (filterRemovalWarning.length) lines.push("", ...filterRemovalWarning);
|
|
31005
31032
|
const estimate = asRecord2(payload.deploy_cost_estimate);
|
|
31006
31033
|
const credits = estimate ? asFiniteNumber(estimate.credits) : void 0;
|
|
31007
31034
|
if (credits !== void 0) {
|
|
@@ -31208,11 +31235,31 @@ function renderDeployedListText(payload, requestedStatus) {
|
|
|
31208
31235
|
if (hasLastReceivedEvent) {
|
|
31209
31236
|
lines.push(` last received: ${lastReceivedEvent ?? "never"}`);
|
|
31210
31237
|
}
|
|
31238
|
+
if (Array.isArray(entry.bound_plays)) {
|
|
31239
|
+
for (const rawPlay of entry.bound_plays) {
|
|
31240
|
+
const play = asRecord2(rawPlay);
|
|
31241
|
+
const playName = asString(play?.name) ?? "unnamed Play";
|
|
31242
|
+
const health = asRecord2(play?.consumer_health);
|
|
31243
|
+
const healthRequested = Boolean(play && "consumer_health" in play);
|
|
31244
|
+
const state = healthRequested ? asString(health?.last_run_status) ?? "no delivery yet" : "health not requested";
|
|
31245
|
+
const lastError = asString(health?.last_error);
|
|
31246
|
+
lines.push(
|
|
31247
|
+
` consumer: ${playName} \u2014 ${state}${lastError ? ` (${lastError})` : ""}`
|
|
31248
|
+
);
|
|
31249
|
+
}
|
|
31250
|
+
}
|
|
31211
31251
|
}
|
|
31212
31252
|
const applied = asString(payload.status_filter_applied) ?? requestedStatus ?? "active";
|
|
31213
31253
|
lines.push(
|
|
31214
31254
|
`Status filter: ${applied}${requestedStatus === void 0 && applied === "active" ? " (default)" : ""} \u2014 use --status all to include disabled monitors.`
|
|
31215
31255
|
);
|
|
31256
|
+
const summary = Array.isArray(payload.status_summary) ? payload.status_summary.flatMap((raw) => {
|
|
31257
|
+
const item = asRecord2(raw);
|
|
31258
|
+
const status = item ? asString(item.status) : void 0;
|
|
31259
|
+
const count = item ? asFiniteNumber(item.count) : void 0;
|
|
31260
|
+
return status && count !== void 0 ? [`${status}: ${count}`] : [];
|
|
31261
|
+
}).join(" ") : "";
|
|
31262
|
+
if (summary) lines.push(`All lifecycle states: ${summary}`);
|
|
31216
31263
|
if (payload.is_truncated === true) {
|
|
31217
31264
|
const nextCursor = asString(payload.next_cursor);
|
|
31218
31265
|
lines.push(
|
|
@@ -31231,7 +31278,8 @@ async function handleMonitorsList(options) {
|
|
|
31231
31278
|
...options.status ? { status: options.status } : {},
|
|
31232
31279
|
...options.limit ? { limit: options.limit } : {},
|
|
31233
31280
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
31234
|
-
...options.compact ? { compact: true } : {}
|
|
31281
|
+
...options.compact ? { compact: true } : {},
|
|
31282
|
+
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
31235
31283
|
});
|
|
31236
31284
|
printCommandEnvelope(payload, {
|
|
31237
31285
|
json: options.json,
|
|
@@ -31294,6 +31342,10 @@ function renderMonitorGet(payload) {
|
|
|
31294
31342
|
const webhook = asRecord2(payload.webhook);
|
|
31295
31343
|
const guidance = asRecord2(payload.setup_guidance);
|
|
31296
31344
|
const plays = dependents && Array.isArray(dependents.plays) ? dependents.plays : [];
|
|
31345
|
+
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays.flatMap((value) => {
|
|
31346
|
+
const play = asRecord2(value);
|
|
31347
|
+
return play ? [play] : [];
|
|
31348
|
+
}) : [];
|
|
31297
31349
|
const lines = [
|
|
31298
31350
|
`Monitor: ${key}`,
|
|
31299
31351
|
`Tool: ${tool}`,
|
|
@@ -31335,6 +31387,31 @@ function renderMonitorGet(payload) {
|
|
|
31335
31387
|
` deepline monitors test ${key} '${JSON.stringify(samplePayload2)}' --json`
|
|
31336
31388
|
);
|
|
31337
31389
|
}
|
|
31390
|
+
lines.push("", `Current SQL listener consumers (${boundPlays.length}):`);
|
|
31391
|
+
if (boundPlays.length === 0) {
|
|
31392
|
+
lines.push(" none");
|
|
31393
|
+
} else {
|
|
31394
|
+
for (const play of boundPlays) {
|
|
31395
|
+
const name = asString(play.name) ?? "unnamed Play";
|
|
31396
|
+
const listener = asString(play.listener_key);
|
|
31397
|
+
const health = asRecord2(play.consumer_health);
|
|
31398
|
+
const status2 = asString(health?.last_run_status) ?? "no delivery yet";
|
|
31399
|
+
const lastDelivery = asFiniteNumber(health?.last_delivery_at);
|
|
31400
|
+
const error = asString(health?.last_error);
|
|
31401
|
+
lines.push(
|
|
31402
|
+
` ${name}${listener ? ` (listener: ${listener})` : ""}: ${status2}`
|
|
31403
|
+
);
|
|
31404
|
+
if (lastDelivery !== void 0) {
|
|
31405
|
+
lines.push(
|
|
31406
|
+
` last delivery: ${new Date(lastDelivery).toISOString()}`
|
|
31407
|
+
);
|
|
31408
|
+
}
|
|
31409
|
+
if (error) lines.push(` error: ${error}`);
|
|
31410
|
+
}
|
|
31411
|
+
}
|
|
31412
|
+
if (payload.consumer_health_truncated === true) {
|
|
31413
|
+
lines.push(" Results are truncated; use --json for the returned detail.");
|
|
31414
|
+
}
|
|
31338
31415
|
lines.push("", `Dependent published plays (${plays.length}):`);
|
|
31339
31416
|
if (plays.length === 0) {
|
|
31340
31417
|
lines.push(" none");
|
|
@@ -31359,7 +31436,11 @@ function renderMonitorGet(payload) {
|
|
|
31359
31436
|
async function handleMonitorsGet(key, options) {
|
|
31360
31437
|
const client2 = new DeeplineClient();
|
|
31361
31438
|
const payload = await client2.monitors.get(key);
|
|
31362
|
-
const
|
|
31439
|
+
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
31440
|
+
const dependents = boundPlays ? {
|
|
31441
|
+
plays: boundPlays,
|
|
31442
|
+
truncated: payload.consumer_health_truncated === true
|
|
31443
|
+
} : await client2.monitors.dependents(key);
|
|
31363
31444
|
const detail = { ...payload, dependents };
|
|
31364
31445
|
printCommandEnvelope(detail, {
|
|
31365
31446
|
json: options.json,
|
|
@@ -31372,7 +31453,8 @@ async function handleMonitorsTest(key, payload, options) {
|
|
|
31372
31453
|
key,
|
|
31373
31454
|
explicitPayload,
|
|
31374
31455
|
{
|
|
31375
|
-
validationOnly: options.dispatch !== true
|
|
31456
|
+
validationOnly: options.dispatch !== true,
|
|
31457
|
+
dispatch: options.dispatch === true
|
|
31376
31458
|
}
|
|
31377
31459
|
);
|
|
31378
31460
|
const dispatch = options.dispatch === true;
|
|
@@ -31558,12 +31640,17 @@ Notes:
|
|
|
31558
31640
|
not the page size), returned, is_truncated, and next_cursor. When is_truncated
|
|
31559
31641
|
is true, page with --cursor <next_cursor> until it is false \u2014 a "no matching
|
|
31560
31642
|
monitor" reuse conclusion off a truncated page deploys a duplicate paid feed.
|
|
31643
|
+
The default list stays cheap: it includes the current downstream Play binding
|
|
31644
|
+
metadata but does not resolve per-monitor delivery/run health. Pass
|
|
31645
|
+
--include-consumers with --limit 20 or fewer to include the current
|
|
31646
|
+
SQL-listener delivery/run health for each returned monitor.
|
|
31561
31647
|
|
|
31562
31648
|
Examples:
|
|
31563
31649
|
deepline monitors list
|
|
31564
31650
|
deepline monitors list --status all --json
|
|
31565
31651
|
deepline monitors list --status all --cursor <next_cursor> --json
|
|
31566
31652
|
deepline monitors list --compact --json
|
|
31653
|
+
deepline monitors list --include-consumers --limit 20 --json
|
|
31567
31654
|
`
|
|
31568
31655
|
).option(
|
|
31569
31656
|
"--status <status>",
|
|
@@ -31571,7 +31658,10 @@ Examples:
|
|
|
31571
31658
|
).option("--limit <n>", "Limit the number of deployed monitors returned").option(
|
|
31572
31659
|
"--cursor <cursor>",
|
|
31573
31660
|
"Page past a truncated result using the next_cursor from a prior list response"
|
|
31574
|
-
).option("--compact", COMPACT_OPTION_DESCRIPTION)
|
|
31661
|
+
).option("--compact", COMPACT_OPTION_DESCRIPTION).option(
|
|
31662
|
+
"--include-consumers",
|
|
31663
|
+
"Include current SQL-listener consumer health (requires --limit 20 or fewer)"
|
|
31664
|
+
)
|
|
31575
31665
|
).action(monitorsAction(handleMonitorsList));
|
|
31576
31666
|
withJsonOption(
|
|
31577
31667
|
monitors.command("get <key>").description("Show a single deployed monitor by its public key.").addHelpText(
|
|
@@ -31621,10 +31711,11 @@ Notes:
|
|
|
31621
31711
|
and optional controls (Deepline lifecycle metadata). Pass it positionally,
|
|
31622
31712
|
via --file <path>, or
|
|
31623
31713
|
from stdin with --file -. Does not deploy or spend credits.
|
|
31624
|
-
|
|
31625
|
-
|
|
31626
|
-
|
|
31627
|
-
|
|
31714
|
+
Check validates the local definition only. It does not contact an existing
|
|
31715
|
+
upstream resource, prove that future events will arrive, or verify downstream
|
|
31716
|
+
Play delivery. The JSON response reports this validation scope explicitly.
|
|
31717
|
+
Provider-specific grammar, precedence, enum applicability, examples, and
|
|
31718
|
+
update semantics are returned by the live monitor contract. Inspect it with
|
|
31628
31719
|
\`deepline monitors available deepline_native.company_radar --json\`.
|
|
31629
31720
|
|
|
31630
31721
|
Examples:
|
|
@@ -31733,7 +31824,10 @@ Examples:
|
|
|
31733
31824
|
).option("--limit <n>", "Limit the number of deployed monitors returned").option(
|
|
31734
31825
|
"--cursor <cursor>",
|
|
31735
31826
|
"Page past a truncated result using the next_cursor from a prior list response"
|
|
31736
|
-
).option("--compact", COMPACT_OPTION_DESCRIPTION)
|
|
31827
|
+
).option("--compact", COMPACT_OPTION_DESCRIPTION).option(
|
|
31828
|
+
"--include-consumers",
|
|
31829
|
+
"Include current SQL-listener consumer health (requires --limit 20 or fewer)"
|
|
31830
|
+
)
|
|
31737
31831
|
).action(monitorsAction(handleMonitorsList));
|
|
31738
31832
|
withJsonOption(
|
|
31739
31833
|
deployed.command("get <key>").description("Alias of `monitors get <key>`.")
|
|
@@ -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 a limit of 20 or fewer. */
|
|
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 a limit of 20 or fewer. */
|
|
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.52",
|
|
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.52",
|
|
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
|
);
|
|
@@ -215,8 +215,8 @@
|
|
|
215
215
|
"dist/cli/index.d.ts",
|
|
216
216
|
"dist/cli/index.js",
|
|
217
217
|
"dist/cli/index.mjs",
|
|
218
|
-
"dist/compiler-manifest-
|
|
219
|
-
"dist/compiler-manifest-
|
|
218
|
+
"dist/compiler-manifest-Cj3--4ZJ.d.mts",
|
|
219
|
+
"dist/compiler-manifest-Cj3--4ZJ.d.ts",
|
|
220
220
|
"dist/helpers.d.mts",
|
|
221
221
|
"dist/helpers.d.ts",
|
|
222
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 = {
|
|
@@ -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 = {
|
|
@@ -3951,6 +3951,7 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
3951
3951
|
" csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;",
|
|
3952
3952
|
" dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;",
|
|
3953
3953
|
" map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: DatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;",
|
|
3954
|
+
" readonly run: { readonly id: string };",
|
|
3954
3955
|
` runSteps<TInput extends Record<string, unknown>, TOutput>(program: RunnableStepProgram<TInput, TOutput>, input: TInput, options?: { description?: ${cloudReferenceType("ctx.runSteps.options.description")} }): Promise<TOutput>;`,
|
|
3955
3956
|
" tools: { execute<K extends string>(request: ToolExecutionRequest<K>): Promise<ToolExecutionOutput<K>> };",
|
|
3956
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[]> };`,
|