deepline 0.1.230 → 0.1.231

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.
@@ -108,10 +108,10 @@ export const SDK_RELEASE = {
108
108
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
109
109
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
110
110
  // automatically without blocking their current command.
111
- version: '0.1.230',
111
+ version: '0.1.231',
112
112
  apiContract: '2026-06-dataset-handle-results-hard-cutover',
113
113
  supportPolicy: {
114
- latest: '0.1.230',
114
+ latest: '0.1.231',
115
115
  minimumSupported: '0.1.53',
116
116
  deprecatedBelow: '0.1.219',
117
117
  commandMinimumSupported: [
package/dist/cli/index.js CHANGED
@@ -625,10 +625,10 @@ var SDK_RELEASE = {
625
625
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
626
626
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
627
627
  // automatically without blocking their current command.
628
- version: "0.1.230",
628
+ version: "0.1.231",
629
629
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
630
630
  supportPolicy: {
631
- latest: "0.1.230",
631
+ latest: "0.1.231",
632
632
  minimumSupported: "0.1.53",
633
633
  deprecatedBelow: "0.1.219",
634
634
  commandMinimumSupported: [
@@ -23722,9 +23722,17 @@ function monitorsErrorExitCode(error) {
23722
23722
  return 5;
23723
23723
  }
23724
23724
  function monitorsFailureNextCommand(error, exitCode) {
23725
+ if (error instanceof DeeplineError) {
23726
+ const response = asRecord(asRecord(error.details)?.response);
23727
+ const serverNextAction = asString(response?.next_action);
23728
+ if (serverNextAction) return serverNextAction;
23729
+ }
23725
23730
  if (error instanceof DeeplineError && error.code === "monitor_access_required") {
23726
23731
  return "deepline monitors status";
23727
23732
  }
23733
+ if (error instanceof DeeplineError && error.code === "monitor_tool_not_found") {
23734
+ return "deepline monitors available --json";
23735
+ }
23728
23736
  if (exitCode === 3) return "deepline auth status --json";
23729
23737
  if (exitCode === 4) return "deepline monitors list --status all --json";
23730
23738
  return void 0;
@@ -23839,6 +23847,16 @@ function asString(value) {
23839
23847
  function asFiniteNumber(value) {
23840
23848
  return typeof value === "number" && Number.isFinite(value) ? value : void 0;
23841
23849
  }
23850
+ function monitorPricingLine(rawPricing) {
23851
+ const pricing = asRecord(rawPricing);
23852
+ if (!pricing) return void 0;
23853
+ const display = asString(pricing.display);
23854
+ if (display) return display;
23855
+ const credits = asFiniteNumber(pricing.deepline_credits);
23856
+ const basis = asString(pricing.billing_basis);
23857
+ if (credits === void 0 || !basis) return void 0;
23858
+ return `${credits} Deepline credits (${basis.replaceAll("_", " ")})`;
23859
+ }
23842
23860
  function yesNo(value) {
23843
23861
  if (value === true) return "yes";
23844
23862
  if (value === false) return "no";
@@ -23878,6 +23896,7 @@ function renderMonitorDeployCompletion(payload) {
23878
23896
  const toolId = tool ?? (monitor ? asString(monitor.tool) : void 0) ?? "<tool>";
23879
23897
  const name = monitor ? asString(monitor.name) : void 0;
23880
23898
  const status = monitor ? asString(monitor.status) : void 0;
23899
+ const pricingLine = monitorPricingLine(monitor?.pricing ?? payload.pricing);
23881
23900
  const eventStreams = streams.filter((stream) => stream.isEvent);
23882
23901
  const matched = eventStreams.filter((stream) => stream.matchesPayload);
23883
23902
  const shown = matched.length ? matched : eventStreams.length ? eventStreams : streams;
@@ -23893,6 +23912,9 @@ function renderMonitorDeployCompletion(payload) {
23893
23912
  ` columns: ${stream.columns.length ? stream.columns.join(", ") : "(promoted dynamically as events arrive)"}`
23894
23913
  );
23895
23914
  }
23915
+ if (pricingLine) {
23916
+ lines.push("", `Pricing: ${pricingLine}`);
23917
+ }
23896
23918
  lines.push(
23897
23919
  "",
23898
23920
  "This monitor streams new rows into your Customer DB \u2014 there is no manual run.",
@@ -23936,6 +23958,10 @@ function renderMonitorDeployPlan(payload) {
23936
23958
  "Deploy cost: estimate unavailable from this server (validation only)."
23937
23959
  );
23938
23960
  }
23961
+ const pricingLine = monitorPricingLine(payload.pricing);
23962
+ if (pricingLine) {
23963
+ lines.push(`Selected pricing: ${pricingLine}`);
23964
+ }
23939
23965
  const candidates = Array.isArray(payload.reuse_candidates) ? payload.reuse_candidates : [];
23940
23966
  const candidateLines = candidates.flatMap((raw) => {
23941
23967
  const candidate = asRecord(raw);
@@ -24171,13 +24197,63 @@ async function handleMonitorsDeploy(definition, options) {
24171
24197
  text: renderMonitorDeployCompletion(payload)
24172
24198
  });
24173
24199
  }
24200
+ function renderMonitorGet(payload) {
24201
+ const key = asString(payload.key);
24202
+ const tool = asString(payload.tool);
24203
+ if (!key || !tool) return void 0;
24204
+ const status = asString(payload.status);
24205
+ const definition = asRecord(payload.definition);
24206
+ const pricingLine = monitorPricingLine(payload.pricing);
24207
+ const billing = asRecord(payload.billing);
24208
+ const nextRenewalAt = billing ? asString(billing.next_renewal_at) : void 0;
24209
+ const dependents = asRecord(payload.dependents);
24210
+ const plays = dependents && Array.isArray(dependents.plays) ? dependents.plays : [];
24211
+ const lines = [
24212
+ `Monitor: ${key}`,
24213
+ `Tool: ${tool}`,
24214
+ ...status ? [`Status: ${status}`] : [],
24215
+ ...pricingLine ? [`Pricing: ${pricingLine}`] : [],
24216
+ ...nextRenewalAt ? [`Next renewal: ${nextRenewalAt}`] : []
24217
+ ];
24218
+ if (definition) {
24219
+ lines.push("", "Current definition:", ` ${JSON.stringify(definition)}`);
24220
+ }
24221
+ lines.push("", `Dependent published plays (${plays.length}):`);
24222
+ if (plays.length === 0) {
24223
+ lines.push(" none");
24224
+ } else {
24225
+ for (const raw of plays) {
24226
+ const play = asRecord(raw);
24227
+ const name = play ? asString(play.name) : void 0;
24228
+ if (!play || !name) continue;
24229
+ const listener = asString(play.listener_key);
24230
+ const output2 = asString(play.output_key);
24231
+ lines.push(
24232
+ ` ${name}${listener ? ` (listener: ${listener})` : ""}${output2 ? ` \u2014 stream: ${output2}` : ""}`
24233
+ );
24234
+ }
24235
+ }
24236
+ if (dependents?.truncated === true) {
24237
+ lines.push(" Results are truncated; use --json for the returned detail.");
24238
+ }
24239
+ return `${lines.join("\n")}
24240
+ `;
24241
+ }
24174
24242
  async function handleMonitorsGet(key, options) {
24175
24243
  const http2 = buildHttpClient();
24176
24244
  const payload = await http2.request(
24177
24245
  `/api/v2/monitors/deployed/${encodeKey(key)}`,
24178
24246
  { method: "GET", ...FORBIDDEN_AS_API_ERROR }
24179
24247
  );
24180
- printCommandEnvelope(payload, { json: options.json });
24248
+ const dependents = await http2.request(
24249
+ `/api/v2/monitors/deployed/${encodeKey(key)}/dependents`,
24250
+ { method: "GET", ...FORBIDDEN_AS_API_ERROR }
24251
+ );
24252
+ const detail = { ...payload, dependents };
24253
+ printCommandEnvelope(detail, {
24254
+ json: options.json,
24255
+ text: renderMonitorGet(detail)
24256
+ });
24181
24257
  }
24182
24258
  async function confirmMonitorDelete(key, options) {
24183
24259
  const rl = (0, import_promises4.createInterface)({
@@ -24376,7 +24452,9 @@ Examples:
24376
24452
  "after",
24377
24453
  `
24378
24454
  Notes:
24379
- Read-only.
24455
+ Read-only. Returns the exact editable definition, selected Deepline pricing,
24456
+ billing state, output streams, and dependent published plays. Inspect this
24457
+ before proposing an update so scope and downstream effects are visible.
24380
24458
 
24381
24459
  Examples:
24382
24460
  deepline monitors get my-monitor --json
@@ -610,10 +610,10 @@ var SDK_RELEASE = {
610
610
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
611
611
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
612
612
  // automatically without blocking their current command.
613
- version: "0.1.230",
613
+ version: "0.1.231",
614
614
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
615
615
  supportPolicy: {
616
- latest: "0.1.230",
616
+ latest: "0.1.231",
617
617
  minimumSupported: "0.1.53",
618
618
  deprecatedBelow: "0.1.219",
619
619
  commandMinimumSupported: [
@@ -23758,9 +23758,17 @@ function monitorsErrorExitCode(error) {
23758
23758
  return 5;
23759
23759
  }
23760
23760
  function monitorsFailureNextCommand(error, exitCode) {
23761
+ if (error instanceof DeeplineError) {
23762
+ const response = asRecord(asRecord(error.details)?.response);
23763
+ const serverNextAction = asString(response?.next_action);
23764
+ if (serverNextAction) return serverNextAction;
23765
+ }
23761
23766
  if (error instanceof DeeplineError && error.code === "monitor_access_required") {
23762
23767
  return "deepline monitors status";
23763
23768
  }
23769
+ if (error instanceof DeeplineError && error.code === "monitor_tool_not_found") {
23770
+ return "deepline monitors available --json";
23771
+ }
23764
23772
  if (exitCode === 3) return "deepline auth status --json";
23765
23773
  if (exitCode === 4) return "deepline monitors list --status all --json";
23766
23774
  return void 0;
@@ -23875,6 +23883,16 @@ function asString(value) {
23875
23883
  function asFiniteNumber(value) {
23876
23884
  return typeof value === "number" && Number.isFinite(value) ? value : void 0;
23877
23885
  }
23886
+ function monitorPricingLine(rawPricing) {
23887
+ const pricing = asRecord(rawPricing);
23888
+ if (!pricing) return void 0;
23889
+ const display = asString(pricing.display);
23890
+ if (display) return display;
23891
+ const credits = asFiniteNumber(pricing.deepline_credits);
23892
+ const basis = asString(pricing.billing_basis);
23893
+ if (credits === void 0 || !basis) return void 0;
23894
+ return `${credits} Deepline credits (${basis.replaceAll("_", " ")})`;
23895
+ }
23878
23896
  function yesNo(value) {
23879
23897
  if (value === true) return "yes";
23880
23898
  if (value === false) return "no";
@@ -23914,6 +23932,7 @@ function renderMonitorDeployCompletion(payload) {
23914
23932
  const toolId = tool ?? (monitor ? asString(monitor.tool) : void 0) ?? "<tool>";
23915
23933
  const name = monitor ? asString(monitor.name) : void 0;
23916
23934
  const status = monitor ? asString(monitor.status) : void 0;
23935
+ const pricingLine = monitorPricingLine(monitor?.pricing ?? payload.pricing);
23917
23936
  const eventStreams = streams.filter((stream) => stream.isEvent);
23918
23937
  const matched = eventStreams.filter((stream) => stream.matchesPayload);
23919
23938
  const shown = matched.length ? matched : eventStreams.length ? eventStreams : streams;
@@ -23929,6 +23948,9 @@ function renderMonitorDeployCompletion(payload) {
23929
23948
  ` columns: ${stream.columns.length ? stream.columns.join(", ") : "(promoted dynamically as events arrive)"}`
23930
23949
  );
23931
23950
  }
23951
+ if (pricingLine) {
23952
+ lines.push("", `Pricing: ${pricingLine}`);
23953
+ }
23932
23954
  lines.push(
23933
23955
  "",
23934
23956
  "This monitor streams new rows into your Customer DB \u2014 there is no manual run.",
@@ -23972,6 +23994,10 @@ function renderMonitorDeployPlan(payload) {
23972
23994
  "Deploy cost: estimate unavailable from this server (validation only)."
23973
23995
  );
23974
23996
  }
23997
+ const pricingLine = monitorPricingLine(payload.pricing);
23998
+ if (pricingLine) {
23999
+ lines.push(`Selected pricing: ${pricingLine}`);
24000
+ }
23975
24001
  const candidates = Array.isArray(payload.reuse_candidates) ? payload.reuse_candidates : [];
23976
24002
  const candidateLines = candidates.flatMap((raw) => {
23977
24003
  const candidate = asRecord(raw);
@@ -24207,13 +24233,63 @@ async function handleMonitorsDeploy(definition, options) {
24207
24233
  text: renderMonitorDeployCompletion(payload)
24208
24234
  });
24209
24235
  }
24236
+ function renderMonitorGet(payload) {
24237
+ const key = asString(payload.key);
24238
+ const tool = asString(payload.tool);
24239
+ if (!key || !tool) return void 0;
24240
+ const status = asString(payload.status);
24241
+ const definition = asRecord(payload.definition);
24242
+ const pricingLine = monitorPricingLine(payload.pricing);
24243
+ const billing = asRecord(payload.billing);
24244
+ const nextRenewalAt = billing ? asString(billing.next_renewal_at) : void 0;
24245
+ const dependents = asRecord(payload.dependents);
24246
+ const plays = dependents && Array.isArray(dependents.plays) ? dependents.plays : [];
24247
+ const lines = [
24248
+ `Monitor: ${key}`,
24249
+ `Tool: ${tool}`,
24250
+ ...status ? [`Status: ${status}`] : [],
24251
+ ...pricingLine ? [`Pricing: ${pricingLine}`] : [],
24252
+ ...nextRenewalAt ? [`Next renewal: ${nextRenewalAt}`] : []
24253
+ ];
24254
+ if (definition) {
24255
+ lines.push("", "Current definition:", ` ${JSON.stringify(definition)}`);
24256
+ }
24257
+ lines.push("", `Dependent published plays (${plays.length}):`);
24258
+ if (plays.length === 0) {
24259
+ lines.push(" none");
24260
+ } else {
24261
+ for (const raw of plays) {
24262
+ const play = asRecord(raw);
24263
+ const name = play ? asString(play.name) : void 0;
24264
+ if (!play || !name) continue;
24265
+ const listener = asString(play.listener_key);
24266
+ const output2 = asString(play.output_key);
24267
+ lines.push(
24268
+ ` ${name}${listener ? ` (listener: ${listener})` : ""}${output2 ? ` \u2014 stream: ${output2}` : ""}`
24269
+ );
24270
+ }
24271
+ }
24272
+ if (dependents?.truncated === true) {
24273
+ lines.push(" Results are truncated; use --json for the returned detail.");
24274
+ }
24275
+ return `${lines.join("\n")}
24276
+ `;
24277
+ }
24210
24278
  async function handleMonitorsGet(key, options) {
24211
24279
  const http2 = buildHttpClient();
24212
24280
  const payload = await http2.request(
24213
24281
  `/api/v2/monitors/deployed/${encodeKey(key)}`,
24214
24282
  { method: "GET", ...FORBIDDEN_AS_API_ERROR }
24215
24283
  );
24216
- printCommandEnvelope(payload, { json: options.json });
24284
+ const dependents = await http2.request(
24285
+ `/api/v2/monitors/deployed/${encodeKey(key)}/dependents`,
24286
+ { method: "GET", ...FORBIDDEN_AS_API_ERROR }
24287
+ );
24288
+ const detail = { ...payload, dependents };
24289
+ printCommandEnvelope(detail, {
24290
+ json: options.json,
24291
+ text: renderMonitorGet(detail)
24292
+ });
24217
24293
  }
24218
24294
  async function confirmMonitorDelete(key, options) {
24219
24295
  const rl = createInterface({
@@ -24412,7 +24488,9 @@ Examples:
24412
24488
  "after",
24413
24489
  `
24414
24490
  Notes:
24415
- Read-only.
24491
+ Read-only. Returns the exact editable definition, selected Deepline pricing,
24492
+ billing state, output streams, and dependent published plays. Inspect this
24493
+ before proposing an update so scope and downstream effects are visible.
24416
24494
 
24417
24495
  Examples:
24418
24496
  deepline monitors get my-monitor --json
package/dist/index.js CHANGED
@@ -424,10 +424,10 @@ var SDK_RELEASE = {
424
424
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
425
425
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
426
426
  // automatically without blocking their current command.
427
- version: "0.1.230",
427
+ version: "0.1.231",
428
428
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
429
429
  supportPolicy: {
430
- latest: "0.1.230",
430
+ latest: "0.1.231",
431
431
  minimumSupported: "0.1.53",
432
432
  deprecatedBelow: "0.1.219",
433
433
  commandMinimumSupported: [
package/dist/index.mjs CHANGED
@@ -354,10 +354,10 @@ var SDK_RELEASE = {
354
354
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
355
355
  // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
356
356
  // automatically without blocking their current command.
357
- version: "0.1.230",
357
+ version: "0.1.231",
358
358
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
359
359
  supportPolicy: {
360
- latest: "0.1.230",
360
+ latest: "0.1.231",
361
361
  minimumSupported: "0.1.53",
362
362
  deprecatedBelow: "0.1.219",
363
363
  commandMinimumSupported: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.230",
3
+ "version": "0.1.231",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {