deepline 0.3.205 → 0.3.207

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.
@@ -63,6 +63,7 @@ import type {
63
63
  ResolvedConfig,
64
64
  PlayRevisionSummary,
65
65
  PlayRunListItem,
66
+ PlaysActivityResponse,
66
67
  PlayDetail,
67
68
  PlayCheckResult,
68
69
  PlayRunResult,
@@ -5466,6 +5467,18 @@ export class DeeplineClient {
5466
5467
  return this.requestPlaysPage(options);
5467
5468
  }
5468
5469
 
5470
+ /** Count durable Play runs and Monitor deliveries in local calendar days. */
5471
+ async getPlaysActivity(
5472
+ options: {
5473
+ timeZone?: string;
5474
+ days?: number;
5475
+ endDate?: string;
5476
+ groupBy?: 'kind' | 'trigger_source';
5477
+ } = {},
5478
+ ): Promise<PlaysActivityResponse> {
5479
+ return this.http.post('/api/v2/plays/activity', options);
5480
+ }
5481
+
5469
5482
  private async requestPlaysPage(
5470
5483
  options?: PlaysListOptions & {
5471
5484
  limit?: number;
@@ -273,6 +273,7 @@ export type {
273
273
  StartPlayRunRequest,
274
274
  PlayCostEstimate,
275
275
  PlayListItem,
276
+ PlaysActivityResponse,
276
277
  CustomerDbQueryResult,
277
278
  DeeplineToolCategory,
278
279
  PlayBootstrapFinderKind,
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
202
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
203
- version: '0.3.205',
203
+ version: '0.3.207',
204
204
  updateSummary:
205
205
  'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
206
206
  packageCapabilities: {
@@ -1134,6 +1134,42 @@ export function isStopAllPlayRunsDryRunResult(
1134
1134
  return 'dryRun' in result && result.dryRun === true;
1135
1135
  }
1136
1136
 
1137
+ /** Bounded daily counts from durable Play runs and Monitor delivery receipts. */
1138
+ export interface PlaysActivityResponse {
1139
+ timeZone: string;
1140
+ groupBy: 'kind' | 'trigger_source';
1141
+ endDate: string;
1142
+ /** Current-day query cutoff, when the window ends today. */
1143
+ asOfAt?: number;
1144
+ buckets: Array<{
1145
+ key: string;
1146
+ label: string;
1147
+ startAt: number;
1148
+ endAt: number;
1149
+ groups: Array<{
1150
+ group:
1151
+ | 'play_run'
1152
+ | 'monitor_delivery'
1153
+ | 'manual'
1154
+ | 'api'
1155
+ | 'cron'
1156
+ | 'webhook'
1157
+ | 'sql_listener'
1158
+ | 'async_child';
1159
+ count: number;
1160
+ }>;
1161
+ failedPlayRuns: number;
1162
+ complete: { playRuns: boolean; monitorDeliveries: boolean };
1163
+ }>;
1164
+ coverage: {
1165
+ playRunsEarliestCompleteAt: number | null;
1166
+ monitorDeliveriesEarliestCompleteAt: number | null;
1167
+ monitorDeliveriesCompleteThroughAt: number | null;
1168
+ projectionPending: boolean;
1169
+ earliestPendingAt: number | null;
1170
+ };
1171
+ }
1172
+
1137
1173
  /**
1138
1174
  * Summary of a single play run, returned by {@link DeeplineClient.listPlayRuns}.
1139
1175
  */
@@ -748,7 +748,8 @@ export type AbsurdRuntimeWorkerDeps = {
748
748
  inspectDetachedRunner?: (suspension: DetachedRunnerSuspension) => Promise<{
749
749
  exitCode: number | null;
750
750
  result: PlayRunnerResult | null;
751
- diagnosis: { stage: string; detail: string | null };
751
+ // Written by the runner, possibly an older build: readers default it.
752
+ diagnosis?: { stage: string; detail: string | null };
752
753
  } | null>;
753
754
  readSandboxCrashDiagnostic?: (
754
755
  request: PostgresSchedulerSandboxCrashDiagnosticRequest,
@@ -4356,7 +4357,7 @@ async function resolveDetachedRunnerOutcome(input: {
4356
4357
  let inspection: {
4357
4358
  exitCode: number | null;
4358
4359
  result: PlayRunnerResult | null;
4359
- diagnosis: { stage: string; detail: string | null };
4360
+ diagnosis?: { stage: string; detail: string | null };
4360
4361
  } | null = null;
4361
4362
  let inspectionFailed = false;
4362
4363
  if (input.inspectDetachedRunner) {
@@ -4370,7 +4371,7 @@ async function resolveDetachedRunnerOutcome(input: {
4370
4371
  runnerAttempt: suspension.runnerAttempt,
4371
4372
  sandboxId: suspension.sandboxId,
4372
4373
  exitCode: inspection.exitCode,
4373
- diagnosis: inspection.diagnosis.stage,
4374
+ diagnosis: inspection.diagnosis?.stage,
4374
4375
  resultStatus: inspection.result.status,
4375
4376
  }),
4376
4377
  );
@@ -4384,7 +4385,7 @@ async function resolveDetachedRunnerOutcome(input: {
4384
4385
  runnerAttempt: suspension.runnerAttempt,
4385
4386
  sandboxId: suspension.sandboxId,
4386
4387
  exitCode: inspection.exitCode,
4387
- diagnosis: inspection.diagnosis.stage,
4388
+ diagnosis: inspection.diagnosis?.stage,
4388
4389
  resultStatus: inspection.result?.status ?? null,
4389
4390
  }),
4390
4391
  );
@@ -4421,7 +4422,7 @@ async function resolveDetachedRunnerOutcome(input: {
4421
4422
  terminalResultFound: false,
4422
4423
  inspectionAttempted: Boolean(input.inspectDetachedRunner),
4423
4424
  inspectionStage: inspection
4424
- ? safeDiagnosticLabel(inspection.diagnosis.stage)
4425
+ ? safeDiagnosticLabel(inspection.diagnosis?.stage)
4425
4426
  : inspectionFailed
4426
4427
  ? 'inspection_failed'
4427
4428
  : input.inspectDetachedRunner
@@ -1,6 +1,7 @@
1
1
  const ALWAYS_FRESH_INTEGRATION_TOOL_IDS = new Set([
2
2
  'google_workspace_request',
3
3
  'google_workspace_export_dataset',
4
+ 'google_workspace_update_cells',
4
5
  // Unique public operation alias for google_workspace_export_dataset.
5
6
  'export_dataset',
6
7
  ]);
@@ -157,6 +157,11 @@ export type PlayDeployOutcome = {
157
157
  * the deployment into `succeeded_with_warnings`.
158
158
  */
159
159
  warning?: string;
160
+ /**
161
+ * The new version exists only because a newer Deepline SDK rebuilt the play:
162
+ * its code and everything it imports match what is live.
163
+ */
164
+ sdkUpdated?: true;
160
165
  error?: string;
161
166
  };
162
167
 
@@ -294,6 +299,26 @@ function carriesArtifact(
294
299
  );
295
300
  }
296
301
 
302
+ /**
303
+ * Same code as what is live, different build output. `sourceHash` covers only
304
+ * the entry file and `graphHash` covers every local import, package version,
305
+ * and imported play, so both must match — an edited helper is a real change.
306
+ */
307
+ export function isSdkUpdated(
308
+ live: DeploymentPlayState['liveRevision'],
309
+ artifact: Pick<
310
+ PlayBundleArtifact,
311
+ 'sourceHash' | 'graphHash' | 'artifactHash'
312
+ >,
313
+ ): boolean {
314
+ return Boolean(
315
+ live &&
316
+ live.sourceHash === artifact.sourceHash &&
317
+ live.graphHash === artifact.graphHash &&
318
+ live.artifactHash !== artifact.artifactHash,
319
+ );
320
+ }
321
+
297
322
  function annotationForFailure(input: {
298
323
  file: string;
299
324
  message: string;
@@ -978,6 +1003,17 @@ export async function runDeployment(
978
1003
  }
979
1004
 
980
1005
  const playByName = new Map(ordered.map((play) => [play.name, play]));
1006
+ // Against what was live when this build started, so a PR build and the
1007
+ // merge that promotes its revision describe the play the same way.
1008
+ const sdkUpdated = (
1009
+ name: string,
1010
+ ): Pick<PlayDeployOutcome, 'sdkUpdated'> => {
1011
+ const artifact = playByName.get(name)?.result.artifact;
1012
+ const live = stateByName.get(name)?.liveRevision ?? null;
1013
+ return artifact && isSdkUpdated(live, artifact)
1014
+ ? { sdkUpdated: true }
1015
+ : {};
1016
+ };
981
1017
  const outcomes: PlayDeployOutcome[] = [];
982
1018
  const toRegister: Array<{
983
1019
  play: (typeof ordered)[number];
@@ -1068,6 +1104,7 @@ export async function runDeployment(
1068
1104
  file: play.file,
1069
1105
  status: 'registered',
1070
1106
  version: playState?.workingRevision?.version ?? undefined,
1107
+ ...sdkUpdated(play.name),
1071
1108
  ...(warning ? { warning } : {}),
1072
1109
  });
1073
1110
  }
@@ -1115,6 +1152,7 @@ export async function runDeployment(
1115
1152
  typeof artifact.version === 'number'
1116
1153
  ? artifact.version
1117
1154
  : undefined,
1155
+ ...sdkUpdated(item.play.name),
1118
1156
  ...(warning ? { warning } : {}),
1119
1157
  });
1120
1158
  }
@@ -1137,7 +1175,7 @@ export async function runDeployment(
1137
1175
  summary: outcomes
1138
1176
  .map(
1139
1177
  (outcome) =>
1140
- `- \`${outcome.name}\`: ${outcome.status}${outcome.version !== undefined ? ` (v${outcome.version})` : ''}${outcome.warning ? `\n - :warning: ${outcome.warning}` : ''}`,
1178
+ `- \`${outcome.name}\`: ${outcome.status}${outcome.version !== undefined ? ` (v${outcome.version})` : ''}${outcome.sdkUpdated ? ' — SDK updated' : ''}${outcome.warning ? `\n - :warning: ${outcome.warning}` : ''}`,
1141
1179
  )
1142
1180
  .join('\n'),
1143
1181
  });
@@ -1180,6 +1218,7 @@ export async function runDeployment(
1180
1218
  previousVersion !== outcome.version
1181
1219
  ? { previousVersion }
1182
1220
  : {}),
1221
+ ...(outcome.status === 'promoted' ? sdkUpdated(outcome.name) : {}),
1183
1222
  ...(outcome.status === 'promoted' && warning ? { warning } : {}),
1184
1223
  ...(outcome.error ? { error: outcome.error } : {}),
1185
1224
  });
@@ -1246,7 +1285,7 @@ export async function runDeployment(
1246
1285
  summary: outcomes
1247
1286
  .map(
1248
1287
  (outcome) =>
1249
- `- \`${outcome.name}\`: ${outcome.status}${outcome.warning ? `\n - :warning: ${outcome.warning}` : ''}`,
1288
+ `- \`${outcome.name}\`: ${outcome.status}${outcome.sdkUpdated ? ' — SDK updated' : ''}${outcome.warning ? `\n - :warning: ${outcome.warning}` : ''}`,
1250
1289
  )
1251
1290
  .join('\n'),
1252
1291
  });
package/dist/cli/index.js CHANGED
@@ -3051,7 +3051,7 @@ var SDK_RELEASE = {
3051
3051
  // getters keep their established compatibility behavior.
3052
3052
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3053
3053
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3054
- version: "0.3.205",
3054
+ version: "0.3.207",
3055
3055
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
3056
3056
  packageCapabilities: {
3057
3057
  updatePreferences: 1
@@ -9174,6 +9174,10 @@ var DeeplineClient = class _DeeplineClient {
9174
9174
  async listPlaysPage(options) {
9175
9175
  return this.requestPlaysPage(options);
9176
9176
  }
9177
+ /** Count durable Play runs and Monitor deliveries in local calendar days. */
9178
+ async getPlaysActivity(options = {}) {
9179
+ return this.http.post("/api/v2/plays/activity", options);
9180
+ }
9177
9181
  async requestPlaysPage(options, paginateInventory = true) {
9178
9182
  const params = new URLSearchParams();
9179
9183
  if (paginateInventory && !options?.grep?.trim())
@@ -21532,6 +21536,11 @@ function carriesArtifact(revision, artifact) {
21532
21536
  revision && revision.sourceHash === artifact.sourceHash && revision.artifactHash === artifact.artifactHash && revision.graphHash === artifact.graphHash && revision.artifactKind === artifact.artifactKind
21533
21537
  );
21534
21538
  }
21539
+ function isSdkUpdated(live, artifact) {
21540
+ return Boolean(
21541
+ live && live.sourceHash === artifact.sourceHash && live.graphHash === artifact.graphHash && live.artifactHash !== artifact.artifactHash
21542
+ );
21543
+ }
21535
21544
  function annotationForFailure(input2) {
21536
21545
  return {
21537
21546
  path: input2.file,
@@ -21966,6 +21975,11 @@ async function runDeployment(params, hooks) {
21966
21975
  });
21967
21976
  }
21968
21977
  const playByName = new Map(ordered.map((play) => [play.name, play]));
21978
+ const sdkUpdated = (name) => {
21979
+ const artifact = playByName.get(name)?.result.artifact;
21980
+ const live = stateByName.get(name)?.liveRevision ?? null;
21981
+ return artifact && isSdkUpdated(live, artifact) ? { sdkUpdated: true } : {};
21982
+ };
21969
21983
  const outcomes = [];
21970
21984
  const toRegister = [];
21971
21985
  const toPromote = [];
@@ -22012,6 +22026,7 @@ async function runDeployment(params, hooks) {
22012
22026
  file: play.file,
22013
22027
  status: "registered",
22014
22028
  version: playState?.workingRevision?.version ?? void 0,
22029
+ ...sdkUpdated(play.name),
22015
22030
  ...warning ? { warning } : {}
22016
22031
  });
22017
22032
  }
@@ -22053,6 +22068,7 @@ async function runDeployment(params, hooks) {
22053
22068
  file: item.play.file,
22054
22069
  status: "registered",
22055
22070
  version: typeof artifact.version === "number" ? artifact.version : void 0,
22071
+ ...sdkUpdated(item.play.name),
22056
22072
  ...warning ? { warning } : {}
22057
22073
  });
22058
22074
  }
@@ -22067,7 +22083,7 @@ async function runDeployment(params, hooks) {
22067
22083
  title: `${ordered.length} play${ordered.length === 1 ? "" : "s"} validated and registered (not deployed)`,
22068
22084
  ...annotations.length > 0 ? { annotations } : {},
22069
22085
  summary: outcomes.map(
22070
- (outcome) => `- \`${outcome.name}\`: ${outcome.status}${outcome.version !== void 0 ? ` (v${outcome.version})` : ""}${outcome.warning ? `
22086
+ (outcome) => `- \`${outcome.name}\`: ${outcome.status}${outcome.version !== void 0 ? ` (v${outcome.version})` : ""}${outcome.sdkUpdated ? " \u2014 SDK updated" : ""}${outcome.warning ? `
22071
22087
  - :warning: ${outcome.warning}` : ""}`
22072
22088
  ).join("\n")
22073
22089
  });
@@ -22096,6 +22112,7 @@ async function runDeployment(params, hooks) {
22096
22112
  status: outcome.status === "promoted" ? "promoted" : "failed",
22097
22113
  version: outcome.version,
22098
22114
  ...outcome.status === "promoted" && typeof previousVersion === "number" && previousVersion !== outcome.version ? { previousVersion } : {},
22115
+ ...outcome.status === "promoted" ? sdkUpdated(outcome.name) : {},
22099
22116
  ...outcome.status === "promoted" && warning ? { warning } : {},
22100
22117
  ...outcome.error ? { error: outcome.error } : {}
22101
22118
  });
@@ -22142,7 +22159,7 @@ async function runDeployment(params, hooks) {
22142
22159
  title: `Deployed ${outcomes.filter((o) => o.status === "promoted").length} play(s) (${outcomes.filter((o) => o.status === "unchanged").length} unchanged)`,
22143
22160
  ...annotations.length > 0 ? { annotations } : {},
22144
22161
  summary: outcomes.map(
22145
- (outcome) => `- \`${outcome.name}\`: ${outcome.status}${outcome.warning ? `
22162
+ (outcome) => `- \`${outcome.name}\`: ${outcome.status}${outcome.sdkUpdated ? " \u2014 SDK updated" : ""}${outcome.warning ? `
22146
22163
  - :warning: ${outcome.warning}` : ""}`
22147
22164
  ).join("\n")
22148
22165
  });
@@ -22230,8 +22247,9 @@ function topoSortByPlayDependencies(plays) {
22230
22247
  var MAX_DEPLOY_ATTEMPTS = 3;
22231
22248
  function renderOutcome(outcome) {
22232
22249
  const version = outcome.version === void 0 ? "" : outcome.previousVersion === void 0 ? ` v${outcome.version}` : ` v${outcome.previousVersion} -> v${outcome.version}`;
22250
+ const sdkUpdated = outcome.sdkUpdated ? " (SDK updated)" : "";
22233
22251
  const note = outcome.error ?? outcome.warning;
22234
- return `${outcome.name} (${outcome.file}): ${outcome.status}${version}${note ? ` - ${note}` : ""}`;
22252
+ return `${outcome.name} (${outcome.file}): ${outcome.status}${version}${sdkUpdated}${note ? ` - ${note}` : ""}`;
22235
22253
  }
22236
22254
  function printResult(input2) {
22237
22255
  const failed = input2.status === "failed" || input2.status === "cancelled";
@@ -22663,8 +22681,9 @@ function renderDeploymentPlayLines(results) {
22663
22681
  return plays.flatMap((play) => {
22664
22682
  const version = play.version === void 0 ? "" : play.previousVersion === void 0 ? ` v${play.version}` : ` v${play.previousVersion} -> v${play.version}`;
22665
22683
  const file = play.file ? ` (${play.file})` : "";
22684
+ const sdkUpdated = play.sdkUpdated ? " (SDK updated)" : "";
22666
22685
  return [
22667
- `${play.name ?? "?"}${file} - ${play.status ?? "?"}${version}`,
22686
+ `${play.name ?? "?"}${file} - ${play.status ?? "?"}${version}${sdkUpdated}`,
22668
22687
  ...play.error ? [` error: ${play.error}`] : [],
22669
22688
  ...play.warning ? [` warning: ${play.warning}`] : []
22670
22689
  ];
@@ -30935,6 +30954,37 @@ Examples:
30935
30954
  ...options.json ? ["--json"] : []
30936
30955
  ]);
30937
30956
  });
30957
+ play.command("activity").description("Count Play runs and delivered Monitor findings by day.").option("--time-zone <iana>", "Calendar timezone (default: UTC)", "UTC").option("--days <count>", "Trailing calendar days, 1\u201345", "30").option("--end-date <yyyy-mm-dd>", "Last local calendar day").option("--group-by <kind>", "kind or trigger_source", "kind").option("--json", "Emit exact counts and coverage as JSON").action(async (options) => {
30958
+ const days = Number(options.days);
30959
+ if (!Number.isSafeInteger(days) || days < 1 || days > 45) {
30960
+ throw new Error("--days must be an integer from 1 to 45.");
30961
+ }
30962
+ if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
30963
+ throw new Error("--group-by must be kind or trigger_source.");
30964
+ }
30965
+ const result = await new DeeplineClient().getPlaysActivity({
30966
+ timeZone: options.timeZone,
30967
+ days,
30968
+ ...options.endDate ? { endDate: options.endDate } : {},
30969
+ groupBy: options.groupBy
30970
+ });
30971
+ const lines = [`Plays activity \xB7 ${result.timeZone}`];
30972
+ for (const bucket of result.buckets) {
30973
+ const groups = bucket.groups.map((group) => `${group.group}=${group.count}`).join(" ");
30974
+ const coverage = bucket.complete.playRuns && bucket.complete.monitorDeliveries ? "complete" : "incomplete history";
30975
+ lines.push(
30976
+ `${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
30977
+ );
30978
+ }
30979
+ printCommandEnvelope(
30980
+ { ...result },
30981
+ {
30982
+ json: options.json || !process.stdout.isTTY,
30983
+ text: `${lines.join("\n")}
30984
+ `
30985
+ }
30986
+ );
30987
+ });
30938
30988
  play.command("pin <target>").description("Pin an org-owned play to the top of play listings.").option("--dry-run", "Print the planned change without saving it").option("--json", "Emit JSON output").action(async (target, options) => {
30939
30989
  process.exitCode = await handlePlayPin(
30940
30990
  [
@@ -3046,7 +3046,7 @@ var SDK_RELEASE = {
3046
3046
  // getters keep their established compatibility behavior.
3047
3047
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3048
3048
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3049
- version: "0.3.205",
3049
+ version: "0.3.207",
3050
3050
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
3051
3051
  packageCapabilities: {
3052
3052
  updatePreferences: 1
@@ -9169,6 +9169,10 @@ var DeeplineClient = class _DeeplineClient {
9169
9169
  async listPlaysPage(options) {
9170
9170
  return this.requestPlaysPage(options);
9171
9171
  }
9172
+ /** Count durable Play runs and Monitor deliveries in local calendar days. */
9173
+ async getPlaysActivity(options = {}) {
9174
+ return this.http.post("/api/v2/plays/activity", options);
9175
+ }
9172
9176
  async requestPlaysPage(options, paginateInventory = true) {
9173
9177
  const params = new URLSearchParams();
9174
9178
  if (paginateInventory && !options?.grep?.trim())
@@ -21605,6 +21609,11 @@ function carriesArtifact(revision, artifact) {
21605
21609
  revision && revision.sourceHash === artifact.sourceHash && revision.artifactHash === artifact.artifactHash && revision.graphHash === artifact.graphHash && revision.artifactKind === artifact.artifactKind
21606
21610
  );
21607
21611
  }
21612
+ function isSdkUpdated(live, artifact) {
21613
+ return Boolean(
21614
+ live && live.sourceHash === artifact.sourceHash && live.graphHash === artifact.graphHash && live.artifactHash !== artifact.artifactHash
21615
+ );
21616
+ }
21608
21617
  function annotationForFailure(input2) {
21609
21618
  return {
21610
21619
  path: input2.file,
@@ -22039,6 +22048,11 @@ async function runDeployment(params, hooks) {
22039
22048
  });
22040
22049
  }
22041
22050
  const playByName = new Map(ordered.map((play) => [play.name, play]));
22051
+ const sdkUpdated = (name) => {
22052
+ const artifact = playByName.get(name)?.result.artifact;
22053
+ const live = stateByName.get(name)?.liveRevision ?? null;
22054
+ return artifact && isSdkUpdated(live, artifact) ? { sdkUpdated: true } : {};
22055
+ };
22042
22056
  const outcomes = [];
22043
22057
  const toRegister = [];
22044
22058
  const toPromote = [];
@@ -22085,6 +22099,7 @@ async function runDeployment(params, hooks) {
22085
22099
  file: play.file,
22086
22100
  status: "registered",
22087
22101
  version: playState?.workingRevision?.version ?? void 0,
22102
+ ...sdkUpdated(play.name),
22088
22103
  ...warning ? { warning } : {}
22089
22104
  });
22090
22105
  }
@@ -22126,6 +22141,7 @@ async function runDeployment(params, hooks) {
22126
22141
  file: item.play.file,
22127
22142
  status: "registered",
22128
22143
  version: typeof artifact.version === "number" ? artifact.version : void 0,
22144
+ ...sdkUpdated(item.play.name),
22129
22145
  ...warning ? { warning } : {}
22130
22146
  });
22131
22147
  }
@@ -22140,7 +22156,7 @@ async function runDeployment(params, hooks) {
22140
22156
  title: `${ordered.length} play${ordered.length === 1 ? "" : "s"} validated and registered (not deployed)`,
22141
22157
  ...annotations.length > 0 ? { annotations } : {},
22142
22158
  summary: outcomes.map(
22143
- (outcome) => `- \`${outcome.name}\`: ${outcome.status}${outcome.version !== void 0 ? ` (v${outcome.version})` : ""}${outcome.warning ? `
22159
+ (outcome) => `- \`${outcome.name}\`: ${outcome.status}${outcome.version !== void 0 ? ` (v${outcome.version})` : ""}${outcome.sdkUpdated ? " \u2014 SDK updated" : ""}${outcome.warning ? `
22144
22160
  - :warning: ${outcome.warning}` : ""}`
22145
22161
  ).join("\n")
22146
22162
  });
@@ -22169,6 +22185,7 @@ async function runDeployment(params, hooks) {
22169
22185
  status: outcome.status === "promoted" ? "promoted" : "failed",
22170
22186
  version: outcome.version,
22171
22187
  ...outcome.status === "promoted" && typeof previousVersion === "number" && previousVersion !== outcome.version ? { previousVersion } : {},
22188
+ ...outcome.status === "promoted" ? sdkUpdated(outcome.name) : {},
22172
22189
  ...outcome.status === "promoted" && warning ? { warning } : {},
22173
22190
  ...outcome.error ? { error: outcome.error } : {}
22174
22191
  });
@@ -22215,7 +22232,7 @@ async function runDeployment(params, hooks) {
22215
22232
  title: `Deployed ${outcomes.filter((o) => o.status === "promoted").length} play(s) (${outcomes.filter((o) => o.status === "unchanged").length} unchanged)`,
22216
22233
  ...annotations.length > 0 ? { annotations } : {},
22217
22234
  summary: outcomes.map(
22218
- (outcome) => `- \`${outcome.name}\`: ${outcome.status}${outcome.warning ? `
22235
+ (outcome) => `- \`${outcome.name}\`: ${outcome.status}${outcome.sdkUpdated ? " \u2014 SDK updated" : ""}${outcome.warning ? `
22219
22236
  - :warning: ${outcome.warning}` : ""}`
22220
22237
  ).join("\n")
22221
22238
  });
@@ -22303,8 +22320,9 @@ function topoSortByPlayDependencies(plays) {
22303
22320
  var MAX_DEPLOY_ATTEMPTS = 3;
22304
22321
  function renderOutcome(outcome) {
22305
22322
  const version = outcome.version === void 0 ? "" : outcome.previousVersion === void 0 ? ` v${outcome.version}` : ` v${outcome.previousVersion} -> v${outcome.version}`;
22323
+ const sdkUpdated = outcome.sdkUpdated ? " (SDK updated)" : "";
22306
22324
  const note = outcome.error ?? outcome.warning;
22307
- return `${outcome.name} (${outcome.file}): ${outcome.status}${version}${note ? ` - ${note}` : ""}`;
22325
+ return `${outcome.name} (${outcome.file}): ${outcome.status}${version}${sdkUpdated}${note ? ` - ${note}` : ""}`;
22308
22326
  }
22309
22327
  function printResult(input2) {
22310
22328
  const failed = input2.status === "failed" || input2.status === "cancelled";
@@ -22736,8 +22754,9 @@ function renderDeploymentPlayLines(results) {
22736
22754
  return plays.flatMap((play) => {
22737
22755
  const version = play.version === void 0 ? "" : play.previousVersion === void 0 ? ` v${play.version}` : ` v${play.previousVersion} -> v${play.version}`;
22738
22756
  const file = play.file ? ` (${play.file})` : "";
22757
+ const sdkUpdated = play.sdkUpdated ? " (SDK updated)" : "";
22739
22758
  return [
22740
- `${play.name ?? "?"}${file} - ${play.status ?? "?"}${version}`,
22759
+ `${play.name ?? "?"}${file} - ${play.status ?? "?"}${version}${sdkUpdated}`,
22741
22760
  ...play.error ? [` error: ${play.error}`] : [],
22742
22761
  ...play.warning ? [` warning: ${play.warning}`] : []
22743
22762
  ];
@@ -31008,6 +31027,37 @@ Examples:
31008
31027
  ...options.json ? ["--json"] : []
31009
31028
  ]);
31010
31029
  });
31030
+ play.command("activity").description("Count Play runs and delivered Monitor findings by day.").option("--time-zone <iana>", "Calendar timezone (default: UTC)", "UTC").option("--days <count>", "Trailing calendar days, 1\u201345", "30").option("--end-date <yyyy-mm-dd>", "Last local calendar day").option("--group-by <kind>", "kind or trigger_source", "kind").option("--json", "Emit exact counts and coverage as JSON").action(async (options) => {
31031
+ const days = Number(options.days);
31032
+ if (!Number.isSafeInteger(days) || days < 1 || days > 45) {
31033
+ throw new Error("--days must be an integer from 1 to 45.");
31034
+ }
31035
+ if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
31036
+ throw new Error("--group-by must be kind or trigger_source.");
31037
+ }
31038
+ const result = await new DeeplineClient().getPlaysActivity({
31039
+ timeZone: options.timeZone,
31040
+ days,
31041
+ ...options.endDate ? { endDate: options.endDate } : {},
31042
+ groupBy: options.groupBy
31043
+ });
31044
+ const lines = [`Plays activity \xB7 ${result.timeZone}`];
31045
+ for (const bucket of result.buckets) {
31046
+ const groups = bucket.groups.map((group) => `${group.group}=${group.count}`).join(" ");
31047
+ const coverage = bucket.complete.playRuns && bucket.complete.monitorDeliveries ? "complete" : "incomplete history";
31048
+ lines.push(
31049
+ `${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
31050
+ );
31051
+ }
31052
+ printCommandEnvelope(
31053
+ { ...result },
31054
+ {
31055
+ json: options.json || !process.stdout.isTTY,
31056
+ text: `${lines.join("\n")}
31057
+ `
31058
+ }
31059
+ );
31060
+ });
31011
31061
  play.command("pin <target>").description("Pin an org-owned play to the top of play listings.").option("--dry-run", "Print the planned change without saving it").option("--json", "Emit JSON output").action(async (target, options) => {
31012
31062
  process.exitCode = await handlePlayPin(
31013
31063
  [
package/dist/index.d.mts CHANGED
@@ -2044,6 +2044,36 @@ interface StopAllPlayRunsDryRunResult {
2044
2044
  */
2045
2045
  type StopAllPlayRunsResult = StopAllPlayRunsStopResult | StopAllPlayRunsDryRunResult;
2046
2046
  declare function isStopAllPlayRunsDryRunResult(result: StopAllPlayRunsResult): result is StopAllPlayRunsDryRunResult;
2047
+ /** Bounded daily counts from durable Play runs and Monitor delivery receipts. */
2048
+ interface PlaysActivityResponse {
2049
+ timeZone: string;
2050
+ groupBy: 'kind' | 'trigger_source';
2051
+ endDate: string;
2052
+ /** Current-day query cutoff, when the window ends today. */
2053
+ asOfAt?: number;
2054
+ buckets: Array<{
2055
+ key: string;
2056
+ label: string;
2057
+ startAt: number;
2058
+ endAt: number;
2059
+ groups: Array<{
2060
+ group: 'play_run' | 'monitor_delivery' | 'manual' | 'api' | 'cron' | 'webhook' | 'sql_listener' | 'async_child';
2061
+ count: number;
2062
+ }>;
2063
+ failedPlayRuns: number;
2064
+ complete: {
2065
+ playRuns: boolean;
2066
+ monitorDeliveries: boolean;
2067
+ };
2068
+ }>;
2069
+ coverage: {
2070
+ playRunsEarliestCompleteAt: number | null;
2071
+ monitorDeliveriesEarliestCompleteAt: number | null;
2072
+ monitorDeliveriesCompleteThroughAt: number | null;
2073
+ projectionPending: boolean;
2074
+ earliestPendingAt: number | null;
2075
+ };
2076
+ }
2047
2077
  /**
2048
2078
  * Summary of a single play run, returned by {@link DeeplineClient.listPlayRuns}.
2049
2079
  */
@@ -5383,6 +5413,13 @@ declare class DeeplineClient {
5383
5413
  limit?: number;
5384
5414
  cursor?: string | null;
5385
5415
  }): Promise<PlaysListPage>;
5416
+ /** Count durable Play runs and Monitor deliveries in local calendar days. */
5417
+ getPlaysActivity(options?: {
5418
+ timeZone?: string;
5419
+ days?: number;
5420
+ endDate?: string;
5421
+ groupBy?: 'kind' | 'trigger_source';
5422
+ }): Promise<PlaysActivityResponse>;
5386
5423
  private requestPlaysPage;
5387
5424
  /** Set whether an org-owned Play sorts before unpinned Plays. */
5388
5425
  setPlayPinned(playName: string, pinned: boolean): Promise<{
@@ -6928,4 +6965,4 @@ declare function writeCsvOutputFile(rows: Array<Record<string, unknown>>, stem:
6928
6965
  */
6929
6966
  declare function extractSummaryFields(payload: unknown): Record<string, Scalar>;
6930
6967
 
6931
- export { type AsyncPlayRunRef, AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingPaymentMethodSummary, type BillingRecentUsageEntry, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type BillingTopUpReceipt, type BillingTopUpResult, type BillingUsageEvent, type BillingUsageOptions, type BillingUsageResult, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CreateNotificationGroupInput, type CreateNotificationGroupResult, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, type DbNamespace, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, DeeplineError, type DeeplineExecutionsNamespace, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolExecuteResult, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type ExecutionByKeyResult, type ExecutionRecovery, type FetchOptions, type FileInput, type IngestionStorageRepairResult, type LegacyMonitorStatusFilter, type LiveEventEnvelope, MONITOR_JOB_PHASES, MONITOR_JOB_RECONCILIATION_STATES, MONITOR_JOB_STATES, type MonitorBatchNamespace, type MonitorCheckResult, type MonitorDefinition, type MonitorDeleteResult, type MonitorDependents, type MonitorDeployResult, type MonitorDetail, type MonitorFleetDeactivateOptions, MonitorFleetDefinition, type MonitorFleetGetOptions, type MonitorFleetReactivateOptions, type MonitorFleetResult, type MonitorFleetStatus, type MonitorFleetSyncOptions, type MonitorFleetWaitOptions, type MonitorFleetsNamespace, type MonitorJobDeployOptions, type MonitorJobLogsOptions, type MonitorJobPhase, type MonitorJobReconciliationState, type MonitorJobResult, type MonitorJobState, type MonitorJobWaitOptions, type MonitorJobsNamespace, type MonitorListEntry, type MonitorPayload, type MonitorReactivateResult, type MonitorSpec, type MonitorState, type MonitorStateFilter, type MonitorUpdateChangeSummary, type MonitorUpdateResult, type MonitorsAccessStatus, type MonitorsAvailableOptions, type MonitorsAvailableResult, type MonitorsListOptions, type MonitorsListResult, type MonitorsNamespace, PLAY_BOOTSTRAP_COMPANY_FIELDS, PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_CONTACT_FIELDS, PLAY_BOOTSTRAP_FINDER_KINDS, PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER, PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER, PLAY_BOOTSTRAP_SOURCE_KINDS, PLAY_BOOTSTRAP_STAGE_KINDS, PLAY_BOOTSTRAP_TEMPLATES, PROD_URL, type PlayActivityObservation, type PlayActivityState, type PlayActivityTarget, type PlayAsyncCallOptions, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayCallExecution, type PlayCallOptions, type PlayCostEstimate, type PlayFetchResponse, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayReferenceLike, type PlayRevisionSummary, type PlayRunActionPackage, type PlayRunActivityProjection, type PlayRunDatasetActions, type PlayRunId, type PlayRunPackage, type PlayRunResult, type PlayRunStart, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PlaysListOptions, type PlaysListPage, type PrebuiltPlayRef, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type RerunOptions, type RerunPlayRunResult, type ResolvedConfig, type RunLifecycleStatus, RunObserveTransportUnavailableError, type RunsListOptions, type RunsListPage, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, type RuntimeStepOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type StartPlayRunRequest, type StepOptions, type StepProgram, type StepProgramResolver, type StepResolver, type StopAllCandidate, type StopAllPlayRunsDryRunResult, type StopAllPlayRunsResult, type StopAllPlayRunsStopResult, type StopAllRunsOptions, type StopPlayRunResult, type ToolDefinition, ToolExecuteResult, type ToolExecution, ToolExecutionError, ToolExecutionErrorOptions, type ToolExecutionRequest, type ToolMetadata, ToolRateLimitError, ToolResultBilling, type ToolSearchOptions, type ToolSearchResult, type WorkspaceCreateResult, type WorkspacesNamespace, defineInput, defineMonitor, definePlay, defineWorkflow, extractSummaryFields, formatPlayBootstrapFinderKinds, formatPlayBootstrapFinderKindsForSentence, formatPlayBootstrapTemplates, getDefinedPlayMetadata, isPlayBootstrapFinderKind, isPlayBootstrapTemplate, isStopAllPlayRunsDryRunResult, resolveConfig, runIf, steps, tryConvertToList, writeCsvOutputFile, writeJsonOutputFile };
6968
+ export { type AsyncPlayRunRef, AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingPaymentMethodSummary, type BillingRecentUsageEntry, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type BillingTopUpReceipt, type BillingTopUpResult, type BillingUsageEvent, type BillingUsageOptions, type BillingUsageResult, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CreateNotificationGroupInput, type CreateNotificationGroupResult, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, type DbNamespace, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, DeeplineError, type DeeplineExecutionsNamespace, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolExecuteResult, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type ExecutionByKeyResult, type ExecutionRecovery, type FetchOptions, type FileInput, type IngestionStorageRepairResult, type LegacyMonitorStatusFilter, type LiveEventEnvelope, MONITOR_JOB_PHASES, MONITOR_JOB_RECONCILIATION_STATES, MONITOR_JOB_STATES, type MonitorBatchNamespace, type MonitorCheckResult, type MonitorDefinition, type MonitorDeleteResult, type MonitorDependents, type MonitorDeployResult, type MonitorDetail, type MonitorFleetDeactivateOptions, MonitorFleetDefinition, type MonitorFleetGetOptions, type MonitorFleetReactivateOptions, type MonitorFleetResult, type MonitorFleetStatus, type MonitorFleetSyncOptions, type MonitorFleetWaitOptions, type MonitorFleetsNamespace, type MonitorJobDeployOptions, type MonitorJobLogsOptions, type MonitorJobPhase, type MonitorJobReconciliationState, type MonitorJobResult, type MonitorJobState, type MonitorJobWaitOptions, type MonitorJobsNamespace, type MonitorListEntry, type MonitorPayload, type MonitorReactivateResult, type MonitorSpec, type MonitorState, type MonitorStateFilter, type MonitorUpdateChangeSummary, type MonitorUpdateResult, type MonitorsAccessStatus, type MonitorsAvailableOptions, type MonitorsAvailableResult, type MonitorsListOptions, type MonitorsListResult, type MonitorsNamespace, PLAY_BOOTSTRAP_COMPANY_FIELDS, PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_CONTACT_FIELDS, PLAY_BOOTSTRAP_FINDER_KINDS, PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER, PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER, PLAY_BOOTSTRAP_SOURCE_KINDS, PLAY_BOOTSTRAP_STAGE_KINDS, PLAY_BOOTSTRAP_TEMPLATES, PROD_URL, type PlayActivityObservation, type PlayActivityState, type PlayActivityTarget, type PlayAsyncCallOptions, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayCallExecution, type PlayCallOptions, type PlayCostEstimate, type PlayFetchResponse, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayReferenceLike, type PlayRevisionSummary, type PlayRunActionPackage, type PlayRunActivityProjection, type PlayRunDatasetActions, type PlayRunId, type PlayRunPackage, type PlayRunResult, type PlayRunStart, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PlaysActivityResponse, type PlaysListOptions, type PlaysListPage, type PrebuiltPlayRef, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type RerunOptions, type RerunPlayRunResult, type ResolvedConfig, type RunLifecycleStatus, RunObserveTransportUnavailableError, type RunsListOptions, type RunsListPage, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, type RuntimeStepOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type StartPlayRunRequest, type StepOptions, type StepProgram, type StepProgramResolver, type StepResolver, type StopAllCandidate, type StopAllPlayRunsDryRunResult, type StopAllPlayRunsResult, type StopAllPlayRunsStopResult, type StopAllRunsOptions, type StopPlayRunResult, type ToolDefinition, ToolExecuteResult, type ToolExecution, ToolExecutionError, ToolExecutionErrorOptions, type ToolExecutionRequest, type ToolMetadata, ToolRateLimitError, ToolResultBilling, type ToolSearchOptions, type ToolSearchResult, type WorkspaceCreateResult, type WorkspacesNamespace, defineInput, defineMonitor, definePlay, defineWorkflow, extractSummaryFields, formatPlayBootstrapFinderKinds, formatPlayBootstrapFinderKindsForSentence, formatPlayBootstrapTemplates, getDefinedPlayMetadata, isPlayBootstrapFinderKind, isPlayBootstrapTemplate, isStopAllPlayRunsDryRunResult, resolveConfig, runIf, steps, tryConvertToList, writeCsvOutputFile, writeJsonOutputFile };
package/dist/index.d.ts CHANGED
@@ -2044,6 +2044,36 @@ interface StopAllPlayRunsDryRunResult {
2044
2044
  */
2045
2045
  type StopAllPlayRunsResult = StopAllPlayRunsStopResult | StopAllPlayRunsDryRunResult;
2046
2046
  declare function isStopAllPlayRunsDryRunResult(result: StopAllPlayRunsResult): result is StopAllPlayRunsDryRunResult;
2047
+ /** Bounded daily counts from durable Play runs and Monitor delivery receipts. */
2048
+ interface PlaysActivityResponse {
2049
+ timeZone: string;
2050
+ groupBy: 'kind' | 'trigger_source';
2051
+ endDate: string;
2052
+ /** Current-day query cutoff, when the window ends today. */
2053
+ asOfAt?: number;
2054
+ buckets: Array<{
2055
+ key: string;
2056
+ label: string;
2057
+ startAt: number;
2058
+ endAt: number;
2059
+ groups: Array<{
2060
+ group: 'play_run' | 'monitor_delivery' | 'manual' | 'api' | 'cron' | 'webhook' | 'sql_listener' | 'async_child';
2061
+ count: number;
2062
+ }>;
2063
+ failedPlayRuns: number;
2064
+ complete: {
2065
+ playRuns: boolean;
2066
+ monitorDeliveries: boolean;
2067
+ };
2068
+ }>;
2069
+ coverage: {
2070
+ playRunsEarliestCompleteAt: number | null;
2071
+ monitorDeliveriesEarliestCompleteAt: number | null;
2072
+ monitorDeliveriesCompleteThroughAt: number | null;
2073
+ projectionPending: boolean;
2074
+ earliestPendingAt: number | null;
2075
+ };
2076
+ }
2047
2077
  /**
2048
2078
  * Summary of a single play run, returned by {@link DeeplineClient.listPlayRuns}.
2049
2079
  */
@@ -5383,6 +5413,13 @@ declare class DeeplineClient {
5383
5413
  limit?: number;
5384
5414
  cursor?: string | null;
5385
5415
  }): Promise<PlaysListPage>;
5416
+ /** Count durable Play runs and Monitor deliveries in local calendar days. */
5417
+ getPlaysActivity(options?: {
5418
+ timeZone?: string;
5419
+ days?: number;
5420
+ endDate?: string;
5421
+ groupBy?: 'kind' | 'trigger_source';
5422
+ }): Promise<PlaysActivityResponse>;
5386
5423
  private requestPlaysPage;
5387
5424
  /** Set whether an org-owned Play sorts before unpinned Plays. */
5388
5425
  setPlayPinned(playName: string, pinned: boolean): Promise<{
@@ -6928,4 +6965,4 @@ declare function writeCsvOutputFile(rows: Array<Record<string, unknown>>, stem:
6928
6965
  */
6929
6966
  declare function extractSummaryFields(payload: unknown): Record<string, Scalar>;
6930
6967
 
6931
- export { type AsyncPlayRunRef, AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingPaymentMethodSummary, type BillingRecentUsageEntry, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type BillingTopUpReceipt, type BillingTopUpResult, type BillingUsageEvent, type BillingUsageOptions, type BillingUsageResult, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CreateNotificationGroupInput, type CreateNotificationGroupResult, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, type DbNamespace, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, DeeplineError, type DeeplineExecutionsNamespace, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolExecuteResult, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type ExecutionByKeyResult, type ExecutionRecovery, type FetchOptions, type FileInput, type IngestionStorageRepairResult, type LegacyMonitorStatusFilter, type LiveEventEnvelope, MONITOR_JOB_PHASES, MONITOR_JOB_RECONCILIATION_STATES, MONITOR_JOB_STATES, type MonitorBatchNamespace, type MonitorCheckResult, type MonitorDefinition, type MonitorDeleteResult, type MonitorDependents, type MonitorDeployResult, type MonitorDetail, type MonitorFleetDeactivateOptions, MonitorFleetDefinition, type MonitorFleetGetOptions, type MonitorFleetReactivateOptions, type MonitorFleetResult, type MonitorFleetStatus, type MonitorFleetSyncOptions, type MonitorFleetWaitOptions, type MonitorFleetsNamespace, type MonitorJobDeployOptions, type MonitorJobLogsOptions, type MonitorJobPhase, type MonitorJobReconciliationState, type MonitorJobResult, type MonitorJobState, type MonitorJobWaitOptions, type MonitorJobsNamespace, type MonitorListEntry, type MonitorPayload, type MonitorReactivateResult, type MonitorSpec, type MonitorState, type MonitorStateFilter, type MonitorUpdateChangeSummary, type MonitorUpdateResult, type MonitorsAccessStatus, type MonitorsAvailableOptions, type MonitorsAvailableResult, type MonitorsListOptions, type MonitorsListResult, type MonitorsNamespace, PLAY_BOOTSTRAP_COMPANY_FIELDS, PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_CONTACT_FIELDS, PLAY_BOOTSTRAP_FINDER_KINDS, PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER, PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER, PLAY_BOOTSTRAP_SOURCE_KINDS, PLAY_BOOTSTRAP_STAGE_KINDS, PLAY_BOOTSTRAP_TEMPLATES, PROD_URL, type PlayActivityObservation, type PlayActivityState, type PlayActivityTarget, type PlayAsyncCallOptions, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayCallExecution, type PlayCallOptions, type PlayCostEstimate, type PlayFetchResponse, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayReferenceLike, type PlayRevisionSummary, type PlayRunActionPackage, type PlayRunActivityProjection, type PlayRunDatasetActions, type PlayRunId, type PlayRunPackage, type PlayRunResult, type PlayRunStart, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PlaysListOptions, type PlaysListPage, type PrebuiltPlayRef, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type RerunOptions, type RerunPlayRunResult, type ResolvedConfig, type RunLifecycleStatus, RunObserveTransportUnavailableError, type RunsListOptions, type RunsListPage, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, type RuntimeStepOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type StartPlayRunRequest, type StepOptions, type StepProgram, type StepProgramResolver, type StepResolver, type StopAllCandidate, type StopAllPlayRunsDryRunResult, type StopAllPlayRunsResult, type StopAllPlayRunsStopResult, type StopAllRunsOptions, type StopPlayRunResult, type ToolDefinition, ToolExecuteResult, type ToolExecution, ToolExecutionError, ToolExecutionErrorOptions, type ToolExecutionRequest, type ToolMetadata, ToolRateLimitError, ToolResultBilling, type ToolSearchOptions, type ToolSearchResult, type WorkspaceCreateResult, type WorkspacesNamespace, defineInput, defineMonitor, definePlay, defineWorkflow, extractSummaryFields, formatPlayBootstrapFinderKinds, formatPlayBootstrapFinderKindsForSentence, formatPlayBootstrapTemplates, getDefinedPlayMetadata, isPlayBootstrapFinderKind, isPlayBootstrapTemplate, isStopAllPlayRunsDryRunResult, resolveConfig, runIf, steps, tryConvertToList, writeCsvOutputFile, writeJsonOutputFile };
6968
+ export { type AsyncPlayRunRef, AuthError, type BillingCreditPool, type BillingInvoiceEntry, type BillingInvoicesResult, type BillingNamespace, type BillingPaymentMethodSummary, type BillingRecentUsageEntry, type BillingSubscriptionCancelResult, type BillingSubscriptionStatus, type BillingTopUpReceipt, type BillingTopUpResult, type BillingUsageEvent, type BillingUsageOptions, type BillingUsageResult, type ClearPlayHistoryRequest, type ClearPlayHistoryResult, type ColumnMap, type ColumnResolver, type ConditionalStepResolver, ConfigError, type CreateNotificationGroupInput, type CreateNotificationGroupResult, type CsvInput, type CsvOptions, type CustomerDbQueryResult, DEEPLINE_TOOL_CATEGORIES, type DatasetBuilder, type DatasetColumnDefinition, type DatasetColumnRunInput, type DbNamespace, Deepline, DeeplineClient, type DeeplineClientOptions, DeeplineContext, DeeplineError, type DeeplineExecutionsNamespace, type DeeplineNamedPlay, type DeeplinePlayRuntimeContext, type DeeplinePlaysNamespace, type DeeplineToolCategory, type DeeplineToolExecuteResult, type DeeplineToolsNamespace, type DefinePlayConfig, type DefinedPlay, type ExecutionByKeyResult, type ExecutionRecovery, type FetchOptions, type FileInput, type IngestionStorageRepairResult, type LegacyMonitorStatusFilter, type LiveEventEnvelope, MONITOR_JOB_PHASES, MONITOR_JOB_RECONCILIATION_STATES, MONITOR_JOB_STATES, type MonitorBatchNamespace, type MonitorCheckResult, type MonitorDefinition, type MonitorDeleteResult, type MonitorDependents, type MonitorDeployResult, type MonitorDetail, type MonitorFleetDeactivateOptions, MonitorFleetDefinition, type MonitorFleetGetOptions, type MonitorFleetReactivateOptions, type MonitorFleetResult, type MonitorFleetStatus, type MonitorFleetSyncOptions, type MonitorFleetWaitOptions, type MonitorFleetsNamespace, type MonitorJobDeployOptions, type MonitorJobLogsOptions, type MonitorJobPhase, type MonitorJobReconciliationState, type MonitorJobResult, type MonitorJobState, type MonitorJobWaitOptions, type MonitorJobsNamespace, type MonitorListEntry, type MonitorPayload, type MonitorReactivateResult, type MonitorSpec, type MonitorState, type MonitorStateFilter, type MonitorUpdateChangeSummary, type MonitorUpdateResult, type MonitorsAccessStatus, type MonitorsAvailableOptions, type MonitorsAvailableResult, type MonitorsListOptions, type MonitorsListResult, type MonitorsNamespace, PLAY_BOOTSTRAP_COMPANY_FIELDS, PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_CONTACT_FIELDS, PLAY_BOOTSTRAP_FINDER_KINDS, PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER, PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY, PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER, PLAY_BOOTSTRAP_SOURCE_KINDS, PLAY_BOOTSTRAP_STAGE_KINDS, PLAY_BOOTSTRAP_TEMPLATES, PROD_URL, type PlayActivityObservation, type PlayActivityState, type PlayActivityTarget, type PlayAsyncCallOptions, type PlayBindings, type PlayBootstrapEntityKind, type PlayBootstrapFinderKind, type PlayCallExecution, type PlayCallOptions, type PlayCostEstimate, type PlayFetchResponse, type PlayInputContract, type PlayJob, type PlayListItem, type PlayLiveEvent, type PlayReferenceLike, type PlayRevisionSummary, type PlayRunActionPackage, type PlayRunActivityProjection, type PlayRunDatasetActions, type PlayRunId, type PlayRunPackage, type PlayRunResult, type PlayRunStart, type PlaySheetRow, type PlaySheetRowsResult, type PlayStatus, type PlayStepProgramStep, type PlaysActivityResponse, type PlaysListOptions, type PlaysListPage, type PrebuiltPlayRef, type PublishPlayVersionRequest, type PublishPlayVersionResult, RateLimitError, type RerunOptions, type RerunPlayRunResult, type ResolvedConfig, type RunLifecycleStatus, RunObserveTransportUnavailableError, type RunsListOptions, type RunsListPage, type RunsLogsOptions, type RunsLogsResult, type RunsNamespace, type RunsTailOptions, type RuntimeStepOptions, SDK_API_CONTRACT, SDK_VERSION, type SqlListenerDeclaration, type SqlListenerEvent, type SqlListenerOperation, type SqlQuery, type StartPlayRunRequest, type StepOptions, type StepProgram, type StepProgramResolver, type StepResolver, type StopAllCandidate, type StopAllPlayRunsDryRunResult, type StopAllPlayRunsResult, type StopAllPlayRunsStopResult, type StopAllRunsOptions, type StopPlayRunResult, type ToolDefinition, ToolExecuteResult, type ToolExecution, ToolExecutionError, ToolExecutionErrorOptions, type ToolExecutionRequest, type ToolMetadata, ToolRateLimitError, ToolResultBilling, type ToolSearchOptions, type ToolSearchResult, type WorkspaceCreateResult, type WorkspacesNamespace, defineInput, defineMonitor, definePlay, defineWorkflow, extractSummaryFields, formatPlayBootstrapFinderKinds, formatPlayBootstrapFinderKindsForSentence, formatPlayBootstrapTemplates, getDefinedPlayMetadata, isPlayBootstrapFinderKind, isPlayBootstrapTemplate, isStopAllPlayRunsDryRunResult, resolveConfig, runIf, steps, tryConvertToList, writeCsvOutputFile, writeJsonOutputFile };
package/dist/index.js CHANGED
@@ -864,7 +864,7 @@ var SDK_RELEASE = {
864
864
  // getters keep their established compatibility behavior.
865
865
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
866
866
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
867
- version: "0.3.205",
867
+ version: "0.3.207",
868
868
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
869
869
  packageCapabilities: {
870
870
  updatePreferences: 1
@@ -6856,6 +6856,10 @@ var DeeplineClient = class _DeeplineClient {
6856
6856
  async listPlaysPage(options) {
6857
6857
  return this.requestPlaysPage(options);
6858
6858
  }
6859
+ /** Count durable Play runs and Monitor deliveries in local calendar days. */
6860
+ async getPlaysActivity(options = {}) {
6861
+ return this.http.post("/api/v2/plays/activity", options);
6862
+ }
6859
6863
  async requestPlaysPage(options, paginateInventory = true) {
6860
6864
  const params = new URLSearchParams();
6861
6865
  if (paginateInventory && !options?.grep?.trim())
package/dist/index.mjs CHANGED
@@ -768,7 +768,7 @@ var SDK_RELEASE = {
768
768
  // getters keep their established compatibility behavior.
769
769
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
770
770
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
771
- version: "0.3.205",
771
+ version: "0.3.207",
772
772
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
773
773
  packageCapabilities: {
774
774
  updatePreferences: 1
@@ -6760,6 +6760,10 @@ var DeeplineClient = class _DeeplineClient {
6760
6760
  async listPlaysPage(options) {
6761
6761
  return this.requestPlaysPage(options);
6762
6762
  }
6763
+ /** Count durable Play runs and Monitor deliveries in local calendar days. */
6764
+ async getPlaysActivity(options = {}) {
6765
+ return this.http.post("/api/v2/plays/activity", options);
6766
+ }
6763
6767
  async requestPlaysPage(options, paginateInventory = true) {
6764
6768
  const params = new URLSearchParams();
6765
6769
  if (paginateInventory && !options?.grep?.trim())
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.205";
152
+ readonly version: "0.3.207";
153
153
  readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
154
154
  readonly packageCapabilities: {
155
155
  readonly updatePreferences: 1;
package/dist/release.d.ts CHANGED
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.205";
152
+ readonly version: "0.3.207";
153
153
  readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
154
154
  readonly packageCapabilities: {
155
155
  readonly updatePreferences: 1;
package/dist/release.js CHANGED
@@ -74,7 +74,7 @@ var SDK_RELEASE = {
74
74
  // getters keep their established compatibility behavior.
75
75
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
76
76
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
77
- version: "0.3.205",
77
+ version: "0.3.207",
78
78
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
79
79
  packageCapabilities: {
80
80
  updatePreferences: 1
package/dist/release.mjs CHANGED
@@ -48,7 +48,7 @@ var SDK_RELEASE = {
48
48
  // getters keep their established compatibility behavior.
49
49
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
50
50
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
51
- version: "0.3.205",
51
+ version: "0.3.207",
52
52
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
53
53
  packageCapabilities: {
54
54
  updatePreferences: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.205",
3
+ "version": "0.3.207",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",