deepline 0.3.13 → 0.3.14

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.
@@ -878,13 +878,10 @@ export type MonitorsNamespace = {
878
878
  key: string,
879
879
  patch: Record<string, unknown>,
880
880
  ) => Promise<MonitorUpdateResult>;
881
- /**
882
- * Delete a deployed monitor by public key. Deprovisions the upstream provider
883
- * resource unless `localOnly` is set. `dryRun` returns the delete plan.
884
- */
881
+ /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. */
885
882
  delete: (
886
883
  key: string,
887
- options?: { localOnly?: boolean; dryRun?: boolean },
884
+ options?: { dryRun?: boolean },
888
885
  ) => Promise<MonitorDeleteResult>;
889
886
  /** Reactivate a disabled monitor. `dryRun` returns the reactivation cost. */
890
887
  reactivate: (
@@ -2838,8 +2835,7 @@ export class DeeplineClient {
2838
2835
  }
2839
2836
 
2840
2837
  type DirectStageResult =
2841
- | { ref: PlayStagedFileRef }
2842
- | { fallbackFile: (typeof files)[number] };
2838
+ { ref: PlayStagedFileRef } | { fallbackFile: (typeof files)[number] };
2843
2839
  const directResults: DirectStageResult[] = await Promise.all(
2844
2840
  files.map(async (file) => {
2845
2841
  const upload = uploadByIdentity.get(
@@ -4788,17 +4784,23 @@ export class DeeplineClient {
4788
4784
  );
4789
4785
  }
4790
4786
 
4791
- /**
4792
- * Delete a deployed monitor by public key. Deprovisions the upstream provider
4793
- * resource unless `localOnly`; `dryRun` returns the delete plan. Prefer
4794
- * `client.monitors.delete(...)`.
4795
- */
4787
+ /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
4796
4788
  async deleteMonitor(
4797
4789
  key: string,
4798
- options?: { localOnly?: boolean; dryRun?: boolean },
4790
+ options?: { dryRun?: boolean },
4799
4791
  ): Promise<MonitorDeleteResult> {
4792
+ // The public type intentionally excludes `localOnly`, but JavaScript
4793
+ // callers (and compiled older SDK clients) can still pass it at runtime.
4794
+ // Never silently reinterpret an old local-only request as an upstream
4795
+ // deletion. The server applies the same guard for direct API callers.
4796
+ if ((options as { localOnly?: unknown } | undefined)?.localOnly === true) {
4797
+ throw new DeeplineError(
4798
+ 'localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.',
4799
+ undefined,
4800
+ 'MONITOR_LOCAL_ONLY_DELETE_NOT_SUPPORTED',
4801
+ );
4802
+ }
4800
4803
  const params = new URLSearchParams();
4801
- if (options?.localOnly) params.set('local_only', 'true');
4802
4804
  if (options?.dryRun) params.set('dry_run', 'true');
4803
4805
  const query = params.toString();
4804
4806
  return this.http.request<MonitorDeleteResult>(
@@ -192,7 +192,7 @@ export const SDK_RELEASE = {
192
192
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
193
193
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
194
194
  // getters keep their established compatibility behavior.
195
- version: '0.3.13',
195
+ version: '0.3.14',
196
196
  updateSummary:
197
197
  'New raw-v2 tool responses preserve complete scrubbed provider envelopes at toolResponse.rawV2, including JSON:API included resources, links, cursors, and totals. Existing toolResponse.raw and declared getters keep working unchanged.',
198
198
  contracts: {
package/dist/cli/index.js CHANGED
@@ -1047,7 +1047,7 @@ var SDK_RELEASE = {
1047
1047
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
1048
1048
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1049
1049
  // getters keep their established compatibility behavior.
1050
- version: "0.3.13",
1050
+ version: "0.3.14",
1051
1051
  updateSummary: "New raw-v2 tool responses preserve complete scrubbed provider envelopes at toolResponse.rawV2, including JSON:API included resources, links, cursors, and totals. Existing toolResponse.raw and declared getters keep working unchanged.",
1052
1052
  contracts: {
1053
1053
  api: {
@@ -6627,14 +6627,16 @@ var DeeplineClient = class {
6627
6627
  { method: "PATCH", body: patch }
6628
6628
  );
6629
6629
  }
6630
- /**
6631
- * Delete a deployed monitor by public key. Deprovisions the upstream provider
6632
- * resource unless `localOnly`; `dryRun` returns the delete plan. Prefer
6633
- * `client.monitors.delete(...)`.
6634
- */
6630
+ /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6635
6631
  async deleteMonitor(key, options) {
6632
+ if (options?.localOnly === true) {
6633
+ throw new DeeplineError(
6634
+ "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6635
+ void 0,
6636
+ "MONITOR_LOCAL_ONLY_DELETE_NOT_SUPPORTED"
6637
+ );
6638
+ }
6636
6639
  const params = new URLSearchParams();
6637
- if (options?.localOnly) params.set("local_only", "true");
6638
6640
  if (options?.dryRun) params.set("dry_run", "true");
6639
6641
  const query = params.toString();
6640
6642
  return this.http.request(
@@ -32984,13 +32986,12 @@ function assertMonitorDryRunAcknowledged(payload, context) {
32984
32986
  `${context.command} --dry-run: the server response did not acknowledge dry-run mode (missing "dry_run": true). This Deepline server may not support --dry-run for ${context.mutation}, so the response cannot be trusted as a plan. Nothing was rendered as a plan. Verify current state with \`deepline monitors get <key> --json\`, and re-run without --dry-run only when you intend the real ${context.mutation}.`
32985
32987
  );
32986
32988
  }
32987
- function monitorDeleteRequiresYesError(key, options = {}) {
32988
- const flags = options.localOnly ? " --local-only" : "";
32989
+ function monitorDeleteRequiresYesError(key) {
32989
32990
  return new MonitorsUsageError(
32990
- `monitors delete is destructive: it deletes monitor "${key}"${options.localOnly ? " (Deepline record only)" : " and deprovisions its upstream provider resource"}. Non-interactive runs must confirm with --yes:
32991
- deepline monitors delete ${key}${flags} --yes
32991
+ `monitors delete is destructive: it deletes monitor "${key}" and deprovisions its upstream provider resource. Non-interactive runs must confirm with --yes:
32992
+ deepline monitors delete ${key} --yes
32992
32993
  Preview the plan first with:
32993
- deepline monitors delete ${key}${flags} --dry-run`
32994
+ deepline monitors delete ${key} --dry-run`
32994
32995
  );
32995
32996
  }
32996
32997
  async function handleMonitorsStatus(options) {
@@ -33097,17 +33098,19 @@ function renderDeployedListText(payload, requestedStatus) {
33097
33098
  const name = asString(entry.name);
33098
33099
  const outputTable = asString(entry.output_table);
33099
33100
  const webhookState = asString(entry.webhook_state);
33101
+ const executionType = asString(entry.execution_type);
33100
33102
  const hasLastReceivedEvent = "last_received_event" in entry;
33101
33103
  const lastReceivedEvent = asString(entry.last_received_event);
33102
33104
  const boundPlays = Array.isArray(entry.bound_plays) ? entry.bound_plays.length : void 0;
33103
33105
  lines.push(
33104
33106
  ` ${key}${status ? ` ${status}` : ""}${tool ? ` ${tool}` : ""}${name ? ` (${name})` : ""}`
33105
33107
  );
33106
- if (outputTable || webhookState || boundPlays !== void 0) {
33108
+ if (outputTable || webhookState || executionType || boundPlays !== void 0) {
33107
33109
  lines.push(
33108
33110
  ` ${[
33109
33111
  outputTable ? `table: ${outputTable}` : null,
33110
33112
  webhookState ? `webhook: ${webhookState}` : null,
33113
+ executionType ? `execution: ${executionType}` : null,
33111
33114
  boundPlays !== void 0 ? `bound Plays: ${boundPlays}` : null
33112
33115
  ].filter(Boolean).join(" ")}`
33113
33116
  );
@@ -33370,15 +33373,14 @@ async function handleMonitorsValidate(key, options) {
33370
33373
  printCommandEnvelope(result, { json: options.json });
33371
33374
  if (result.valid === false) process.exitCode = 7;
33372
33375
  }
33373
- async function confirmMonitorDelete(key, options) {
33376
+ async function confirmMonitorDelete(key) {
33374
33377
  const rl = (0, import_promises8.createInterface)({
33375
33378
  input: process.stdin,
33376
33379
  output: process.stderr
33377
33380
  });
33378
33381
  try {
33379
- const consequence = options.localOnly ? "This removes the Deepline record only (the upstream provider resource is left in place)." : "This deprovisions the upstream provider resource.";
33380
33382
  const answer = await rl.question(
33381
- `Delete monitor "${key}"? ${consequence} [y/N] `
33383
+ `Delete monitor "${key}"? This deprovisions the upstream provider resource. [y/N] `
33382
33384
  );
33383
33385
  return /^y(es)?$/i.test(answer.trim());
33384
33386
  } finally {
@@ -33388,10 +33390,7 @@ async function confirmMonitorDelete(key, options) {
33388
33390
  async function handleMonitorsDelete(key, options) {
33389
33391
  const client2 = new DeeplineClient();
33390
33392
  if (options.dryRun) {
33391
- const payload2 = await client2.monitors.delete(key, {
33392
- ...options.localOnly ? { localOnly: true } : {},
33393
- dryRun: true
33394
- });
33393
+ const payload2 = await client2.monitors.delete(key, { dryRun: true });
33395
33394
  assertMonitorDryRunAcknowledged(payload2, {
33396
33395
  command: "deepline monitors delete",
33397
33396
  mutation: "delete"
@@ -33405,13 +33404,9 @@ async function handleMonitorsDelete(key, options) {
33405
33404
  if (!options.yes) {
33406
33405
  const interactive = process.stdout.isTTY === true && process.stdin.isTTY === true;
33407
33406
  if (!interactive) {
33408
- throw monitorDeleteRequiresYesError(key, {
33409
- localOnly: options.localOnly
33410
- });
33407
+ throw monitorDeleteRequiresYesError(key);
33411
33408
  }
33412
- const confirmed = await confirmMonitorDelete(key, {
33413
- localOnly: options.localOnly
33414
- });
33409
+ const confirmed = await confirmMonitorDelete(key);
33415
33410
  if (!confirmed) {
33416
33411
  process.stderr.write(`Aborted. Monitor "${key}" was not deleted.
33417
33412
  `);
@@ -33419,9 +33414,7 @@ async function handleMonitorsDelete(key, options) {
33419
33414
  return;
33420
33415
  }
33421
33416
  }
33422
- const payload = await client2.monitors.delete(key, {
33423
- ...options.localOnly ? { localOnly: true } : {}
33424
- });
33417
+ const payload = await client2.monitors.delete(key);
33425
33418
  printCommandEnvelope(payload, { json: options.json });
33426
33419
  }
33427
33420
  async function handleMonitorsUpdate(key, patch, options) {
@@ -33622,8 +33615,10 @@ Notes:
33622
33615
  \`deepline monitors available deepline_native.company_radar --json\`.
33623
33616
  For a bounded urgent Deepline Native preview, use
33624
33617
  controls.execution_type="priority". Deepline injects the upstream marker;
33625
- do not author custom_fields yourself. Priority is capped at ten active or
33626
- in-flight radars per org and is not for regular or bulk-scale monitoring.
33618
+ do not author custom_fields yourself. Priority is capped at ten upstream or
33619
+ reserved recovery, replacement, or reactivation slots per org. Use
33620
+ \`monitors list --status all\` to find priority holders; it is not for regular
33621
+ or bulk-scale monitoring.
33627
33622
 
33628
33623
  Examples:
33629
33624
  deepline monitors check '{"key":"job-openings","tool":"deepline_native.company_radar","payload":{"domain":"stripe.com","radar_type":"company_job_openings"}}'
@@ -33651,7 +33646,7 @@ Notes:
33651
33646
  for a patch-style change.
33652
33647
  For a bounded urgent Deepline Native preview, set
33653
33648
  controls.execution_type="priority". Deepline injects the provider custom
33654
- field and enforces a ten-radar per-org cap; do not use it for regular or bulk
33649
+ field and enforces a ten-slot per-org cap; do not use it for regular or bulk
33655
33650
  monitoring, and do not delete another radar automatically to make room.
33656
33651
 
33657
33652
  Examples:
@@ -33698,20 +33693,17 @@ Examples:
33698
33693
  "after",
33699
33694
  `
33700
33695
  Notes:
33701
- DESTRUCTIVE. By default deprovisions the upstream provider resource; pass
33702
- --local-only to remove only the Deepline-managed record.
33703
- --dry-run shows the delete plan without deleting anything.
33696
+ DESTRUCTIVE. Deprovisions the upstream provider resource and removes its
33697
+ Deepline-managed monitor. Retries are safe: a delete that already reached its requested terminal state
33698
+ returns already_deleted without making another upstream call.
33699
+ --dry-run shows the delete plan without deleting anything.
33704
33700
  Interactive terminals get a y/N confirmation; non-interactive runs (agents,
33705
33701
  scripts, pipes) must pass --yes.
33706
33702
 
33707
33703
  Examples:
33708
33704
  deepline monitors delete my-monitor --dry-run
33709
33705
  deepline monitors delete my-monitor --yes --json
33710
- deepline monitors delete my-monitor --local-only --yes --json
33711
33706
  `
33712
- ).option(
33713
- "--local-only",
33714
- "Remove only the Deepline-managed record, leaving the upstream resource"
33715
33707
  ).option("--dry-run", "Show the delete plan without deleting anything").option(
33716
33708
  "--yes",
33717
33709
  "Skip the confirmation prompt (required non-interactively)"
@@ -33754,10 +33746,7 @@ Examples:
33754
33746
  )
33755
33747
  ).action(monitorsAction(handleMonitorsUpdate));
33756
33748
  withJsonOption(
33757
- deployed.command("delete <key>").description("Alias of `monitors delete <key>`.").option(
33758
- "--local-only",
33759
- "Remove only the Deepline-managed record, leaving the upstream resource"
33760
- ).option("--dry-run", "Show the delete plan without deleting anything").option(
33749
+ deployed.command("delete <key>").description("Alias of `monitors delete <key>`.").option("--dry-run", "Show the delete plan without deleting anything").option(
33761
33750
  "--yes",
33762
33751
  "Skip the confirmation prompt (required non-interactively)"
33763
33752
  )
@@ -1033,7 +1033,7 @@ var SDK_RELEASE = {
1033
1033
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
1034
1034
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1035
1035
  // getters keep their established compatibility behavior.
1036
- version: "0.3.13",
1036
+ version: "0.3.14",
1037
1037
  updateSummary: "New raw-v2 tool responses preserve complete scrubbed provider envelopes at toolResponse.rawV2, including JSON:API included resources, links, cursors, and totals. Existing toolResponse.raw and declared getters keep working unchanged.",
1038
1038
  contracts: {
1039
1039
  api: {
@@ -6613,14 +6613,16 @@ var DeeplineClient = class {
6613
6613
  { method: "PATCH", body: patch }
6614
6614
  );
6615
6615
  }
6616
- /**
6617
- * Delete a deployed monitor by public key. Deprovisions the upstream provider
6618
- * resource unless `localOnly`; `dryRun` returns the delete plan. Prefer
6619
- * `client.monitors.delete(...)`.
6620
- */
6616
+ /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6621
6617
  async deleteMonitor(key, options) {
6618
+ if (options?.localOnly === true) {
6619
+ throw new DeeplineError(
6620
+ "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6621
+ void 0,
6622
+ "MONITOR_LOCAL_ONLY_DELETE_NOT_SUPPORTED"
6623
+ );
6624
+ }
6622
6625
  const params = new URLSearchParams();
6623
- if (options?.localOnly) params.set("local_only", "true");
6624
6626
  if (options?.dryRun) params.set("dry_run", "true");
6625
6627
  const query = params.toString();
6626
6628
  return this.http.request(
@@ -33054,13 +33056,12 @@ function assertMonitorDryRunAcknowledged(payload, context) {
33054
33056
  `${context.command} --dry-run: the server response did not acknowledge dry-run mode (missing "dry_run": true). This Deepline server may not support --dry-run for ${context.mutation}, so the response cannot be trusted as a plan. Nothing was rendered as a plan. Verify current state with \`deepline monitors get <key> --json\`, and re-run without --dry-run only when you intend the real ${context.mutation}.`
33055
33057
  );
33056
33058
  }
33057
- function monitorDeleteRequiresYesError(key, options = {}) {
33058
- const flags = options.localOnly ? " --local-only" : "";
33059
+ function monitorDeleteRequiresYesError(key) {
33059
33060
  return new MonitorsUsageError(
33060
- `monitors delete is destructive: it deletes monitor "${key}"${options.localOnly ? " (Deepline record only)" : " and deprovisions its upstream provider resource"}. Non-interactive runs must confirm with --yes:
33061
- deepline monitors delete ${key}${flags} --yes
33061
+ `monitors delete is destructive: it deletes monitor "${key}" and deprovisions its upstream provider resource. Non-interactive runs must confirm with --yes:
33062
+ deepline monitors delete ${key} --yes
33062
33063
  Preview the plan first with:
33063
- deepline monitors delete ${key}${flags} --dry-run`
33064
+ deepline monitors delete ${key} --dry-run`
33064
33065
  );
33065
33066
  }
33066
33067
  async function handleMonitorsStatus(options) {
@@ -33167,17 +33168,19 @@ function renderDeployedListText(payload, requestedStatus) {
33167
33168
  const name = asString(entry.name);
33168
33169
  const outputTable = asString(entry.output_table);
33169
33170
  const webhookState = asString(entry.webhook_state);
33171
+ const executionType = asString(entry.execution_type);
33170
33172
  const hasLastReceivedEvent = "last_received_event" in entry;
33171
33173
  const lastReceivedEvent = asString(entry.last_received_event);
33172
33174
  const boundPlays = Array.isArray(entry.bound_plays) ? entry.bound_plays.length : void 0;
33173
33175
  lines.push(
33174
33176
  ` ${key}${status ? ` ${status}` : ""}${tool ? ` ${tool}` : ""}${name ? ` (${name})` : ""}`
33175
33177
  );
33176
- if (outputTable || webhookState || boundPlays !== void 0) {
33178
+ if (outputTable || webhookState || executionType || boundPlays !== void 0) {
33177
33179
  lines.push(
33178
33180
  ` ${[
33179
33181
  outputTable ? `table: ${outputTable}` : null,
33180
33182
  webhookState ? `webhook: ${webhookState}` : null,
33183
+ executionType ? `execution: ${executionType}` : null,
33181
33184
  boundPlays !== void 0 ? `bound Plays: ${boundPlays}` : null
33182
33185
  ].filter(Boolean).join(" ")}`
33183
33186
  );
@@ -33440,15 +33443,14 @@ async function handleMonitorsValidate(key, options) {
33440
33443
  printCommandEnvelope(result, { json: options.json });
33441
33444
  if (result.valid === false) process.exitCode = 7;
33442
33445
  }
33443
- async function confirmMonitorDelete(key, options) {
33446
+ async function confirmMonitorDelete(key) {
33444
33447
  const rl = createInterface({
33445
33448
  input: process.stdin,
33446
33449
  output: process.stderr
33447
33450
  });
33448
33451
  try {
33449
- const consequence = options.localOnly ? "This removes the Deepline record only (the upstream provider resource is left in place)." : "This deprovisions the upstream provider resource.";
33450
33452
  const answer = await rl.question(
33451
- `Delete monitor "${key}"? ${consequence} [y/N] `
33453
+ `Delete monitor "${key}"? This deprovisions the upstream provider resource. [y/N] `
33452
33454
  );
33453
33455
  return /^y(es)?$/i.test(answer.trim());
33454
33456
  } finally {
@@ -33458,10 +33460,7 @@ async function confirmMonitorDelete(key, options) {
33458
33460
  async function handleMonitorsDelete(key, options) {
33459
33461
  const client2 = new DeeplineClient();
33460
33462
  if (options.dryRun) {
33461
- const payload2 = await client2.monitors.delete(key, {
33462
- ...options.localOnly ? { localOnly: true } : {},
33463
- dryRun: true
33464
- });
33463
+ const payload2 = await client2.monitors.delete(key, { dryRun: true });
33465
33464
  assertMonitorDryRunAcknowledged(payload2, {
33466
33465
  command: "deepline monitors delete",
33467
33466
  mutation: "delete"
@@ -33475,13 +33474,9 @@ async function handleMonitorsDelete(key, options) {
33475
33474
  if (!options.yes) {
33476
33475
  const interactive = process.stdout.isTTY === true && process.stdin.isTTY === true;
33477
33476
  if (!interactive) {
33478
- throw monitorDeleteRequiresYesError(key, {
33479
- localOnly: options.localOnly
33480
- });
33477
+ throw monitorDeleteRequiresYesError(key);
33481
33478
  }
33482
- const confirmed = await confirmMonitorDelete(key, {
33483
- localOnly: options.localOnly
33484
- });
33479
+ const confirmed = await confirmMonitorDelete(key);
33485
33480
  if (!confirmed) {
33486
33481
  process.stderr.write(`Aborted. Monitor "${key}" was not deleted.
33487
33482
  `);
@@ -33489,9 +33484,7 @@ async function handleMonitorsDelete(key, options) {
33489
33484
  return;
33490
33485
  }
33491
33486
  }
33492
- const payload = await client2.monitors.delete(key, {
33493
- ...options.localOnly ? { localOnly: true } : {}
33494
- });
33487
+ const payload = await client2.monitors.delete(key);
33495
33488
  printCommandEnvelope(payload, { json: options.json });
33496
33489
  }
33497
33490
  async function handleMonitorsUpdate(key, patch, options) {
@@ -33692,8 +33685,10 @@ Notes:
33692
33685
  \`deepline monitors available deepline_native.company_radar --json\`.
33693
33686
  For a bounded urgent Deepline Native preview, use
33694
33687
  controls.execution_type="priority". Deepline injects the upstream marker;
33695
- do not author custom_fields yourself. Priority is capped at ten active or
33696
- in-flight radars per org and is not for regular or bulk-scale monitoring.
33688
+ do not author custom_fields yourself. Priority is capped at ten upstream or
33689
+ reserved recovery, replacement, or reactivation slots per org. Use
33690
+ \`monitors list --status all\` to find priority holders; it is not for regular
33691
+ or bulk-scale monitoring.
33697
33692
 
33698
33693
  Examples:
33699
33694
  deepline monitors check '{"key":"job-openings","tool":"deepline_native.company_radar","payload":{"domain":"stripe.com","radar_type":"company_job_openings"}}'
@@ -33721,7 +33716,7 @@ Notes:
33721
33716
  for a patch-style change.
33722
33717
  For a bounded urgent Deepline Native preview, set
33723
33718
  controls.execution_type="priority". Deepline injects the provider custom
33724
- field and enforces a ten-radar per-org cap; do not use it for regular or bulk
33719
+ field and enforces a ten-slot per-org cap; do not use it for regular or bulk
33725
33720
  monitoring, and do not delete another radar automatically to make room.
33726
33721
 
33727
33722
  Examples:
@@ -33768,20 +33763,17 @@ Examples:
33768
33763
  "after",
33769
33764
  `
33770
33765
  Notes:
33771
- DESTRUCTIVE. By default deprovisions the upstream provider resource; pass
33772
- --local-only to remove only the Deepline-managed record.
33773
- --dry-run shows the delete plan without deleting anything.
33766
+ DESTRUCTIVE. Deprovisions the upstream provider resource and removes its
33767
+ Deepline-managed monitor. Retries are safe: a delete that already reached its requested terminal state
33768
+ returns already_deleted without making another upstream call.
33769
+ --dry-run shows the delete plan without deleting anything.
33774
33770
  Interactive terminals get a y/N confirmation; non-interactive runs (agents,
33775
33771
  scripts, pipes) must pass --yes.
33776
33772
 
33777
33773
  Examples:
33778
33774
  deepline monitors delete my-monitor --dry-run
33779
33775
  deepline monitors delete my-monitor --yes --json
33780
- deepline monitors delete my-monitor --local-only --yes --json
33781
33776
  `
33782
- ).option(
33783
- "--local-only",
33784
- "Remove only the Deepline-managed record, leaving the upstream resource"
33785
33777
  ).option("--dry-run", "Show the delete plan without deleting anything").option(
33786
33778
  "--yes",
33787
33779
  "Skip the confirmation prompt (required non-interactively)"
@@ -33824,10 +33816,7 @@ Examples:
33824
33816
  )
33825
33817
  ).action(monitorsAction(handleMonitorsUpdate));
33826
33818
  withJsonOption(
33827
- deployed.command("delete <key>").description("Alias of `monitors delete <key>`.").option(
33828
- "--local-only",
33829
- "Remove only the Deepline-managed record, leaving the upstream resource"
33830
- ).option("--dry-run", "Show the delete plan without deleting anything").option(
33819
+ deployed.command("delete <key>").description("Alias of `monitors delete <key>`.").option("--dry-run", "Show the delete plan without deleting anything").option(
33831
33820
  "--yes",
33832
33821
  "Skip the confirmation prompt (required non-interactively)"
33833
33822
  )
package/dist/index.d.mts CHANGED
@@ -2358,12 +2358,8 @@ type MonitorsNamespace = {
2358
2358
  dependents: (key: string) => Promise<MonitorDependents>;
2359
2359
  /** Update a deployed monitor by public key. */
2360
2360
  update: (key: string, patch: Record<string, unknown>) => Promise<MonitorUpdateResult>;
2361
- /**
2362
- * Delete a deployed monitor by public key. Deprovisions the upstream provider
2363
- * resource unless `localOnly` is set. `dryRun` returns the delete plan.
2364
- */
2361
+ /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. */
2365
2362
  delete: (key: string, options?: {
2366
- localOnly?: boolean;
2367
2363
  dryRun?: boolean;
2368
2364
  }) => Promise<MonitorDeleteResult>;
2369
2365
  /** Reactivate a disabled monitor. `dryRun` returns the reactivation cost. */
@@ -3711,13 +3707,8 @@ declare class DeeplineClient {
3711
3707
  getMonitorDependents(key: string): Promise<MonitorDependents>;
3712
3708
  /** Update a deployed monitor by public key. Prefer `client.monitors.update(...)`. */
3713
3709
  updateMonitor(key: string, patch: Record<string, unknown>): Promise<MonitorUpdateResult>;
3714
- /**
3715
- * Delete a deployed monitor by public key. Deprovisions the upstream provider
3716
- * resource unless `localOnly`; `dryRun` returns the delete plan. Prefer
3717
- * `client.monitors.delete(...)`.
3718
- */
3710
+ /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
3719
3711
  deleteMonitor(key: string, options?: {
3720
- localOnly?: boolean;
3721
3712
  dryRun?: boolean;
3722
3713
  }): Promise<MonitorDeleteResult>;
3723
3714
  /**
package/dist/index.d.ts CHANGED
@@ -2358,12 +2358,8 @@ type MonitorsNamespace = {
2358
2358
  dependents: (key: string) => Promise<MonitorDependents>;
2359
2359
  /** Update a deployed monitor by public key. */
2360
2360
  update: (key: string, patch: Record<string, unknown>) => Promise<MonitorUpdateResult>;
2361
- /**
2362
- * Delete a deployed monitor by public key. Deprovisions the upstream provider
2363
- * resource unless `localOnly` is set. `dryRun` returns the delete plan.
2364
- */
2361
+ /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. */
2365
2362
  delete: (key: string, options?: {
2366
- localOnly?: boolean;
2367
2363
  dryRun?: boolean;
2368
2364
  }) => Promise<MonitorDeleteResult>;
2369
2365
  /** Reactivate a disabled monitor. `dryRun` returns the reactivation cost. */
@@ -3711,13 +3707,8 @@ declare class DeeplineClient {
3711
3707
  getMonitorDependents(key: string): Promise<MonitorDependents>;
3712
3708
  /** Update a deployed monitor by public key. Prefer `client.monitors.update(...)`. */
3713
3709
  updateMonitor(key: string, patch: Record<string, unknown>): Promise<MonitorUpdateResult>;
3714
- /**
3715
- * Delete a deployed monitor by public key. Deprovisions the upstream provider
3716
- * resource unless `localOnly`; `dryRun` returns the delete plan. Prefer
3717
- * `client.monitors.delete(...)`.
3718
- */
3710
+ /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
3719
3711
  deleteMonitor(key: string, options?: {
3720
- localOnly?: boolean;
3721
3712
  dryRun?: boolean;
3722
3713
  }): Promise<MonitorDeleteResult>;
3723
3714
  /**
package/dist/index.js CHANGED
@@ -783,7 +783,7 @@ var SDK_RELEASE = {
783
783
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
784
784
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
785
785
  // getters keep their established compatibility behavior.
786
- version: "0.3.13",
786
+ version: "0.3.14",
787
787
  updateSummary: "New raw-v2 tool responses preserve complete scrubbed provider envelopes at toolResponse.rawV2, including JSON:API included resources, links, cursors, and totals. Existing toolResponse.raw and declared getters keep working unchanged.",
788
788
  contracts: {
789
789
  api: {
@@ -6363,14 +6363,16 @@ var DeeplineClient = class {
6363
6363
  { method: "PATCH", body: patch }
6364
6364
  );
6365
6365
  }
6366
- /**
6367
- * Delete a deployed monitor by public key. Deprovisions the upstream provider
6368
- * resource unless `localOnly`; `dryRun` returns the delete plan. Prefer
6369
- * `client.monitors.delete(...)`.
6370
- */
6366
+ /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6371
6367
  async deleteMonitor(key, options) {
6368
+ if (options?.localOnly === true) {
6369
+ throw new DeeplineError(
6370
+ "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6371
+ void 0,
6372
+ "MONITOR_LOCAL_ONLY_DELETE_NOT_SUPPORTED"
6373
+ );
6374
+ }
6372
6375
  const params = new URLSearchParams();
6373
- if (options?.localOnly) params.set("local_only", "true");
6374
6376
  if (options?.dryRun) params.set("dry_run", "true");
6375
6377
  const query = params.toString();
6376
6378
  return this.http.request(
package/dist/index.mjs CHANGED
@@ -706,7 +706,7 @@ var SDK_RELEASE = {
706
706
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
707
707
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
708
708
  // getters keep their established compatibility behavior.
709
- version: "0.3.13",
709
+ version: "0.3.14",
710
710
  updateSummary: "New raw-v2 tool responses preserve complete scrubbed provider envelopes at toolResponse.rawV2, including JSON:API included resources, links, cursors, and totals. Existing toolResponse.raw and declared getters keep working unchanged.",
711
711
  contracts: {
712
712
  api: {
@@ -6286,14 +6286,16 @@ var DeeplineClient = class {
6286
6286
  { method: "PATCH", body: patch }
6287
6287
  );
6288
6288
  }
6289
- /**
6290
- * Delete a deployed monitor by public key. Deprovisions the upstream provider
6291
- * resource unless `localOnly`; `dryRun` returns the delete plan. Prefer
6292
- * `client.monitors.delete(...)`.
6293
- */
6289
+ /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6294
6290
  async deleteMonitor(key, options) {
6291
+ if (options?.localOnly === true) {
6292
+ throw new DeeplineError(
6293
+ "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6294
+ void 0,
6295
+ "MONITOR_LOCAL_ONLY_DELETE_NOT_SUPPORTED"
6296
+ );
6297
+ }
6295
6298
  const params = new URLSearchParams();
6296
- if (options?.localOnly) params.set("local_only", "true");
6297
6299
  if (options?.dryRun) params.set("dry_run", "true");
6298
6300
  const query = params.toString();
6299
6301
  return this.http.request(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",