deepline 0.3.236 → 0.3.237

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.
@@ -3449,7 +3449,7 @@ var SDK_RELEASE = {
3449
3449
  // getters keep their established compatibility behavior.
3450
3450
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3451
3451
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3452
- version: "0.3.236",
3452
+ version: "0.3.237",
3453
3453
  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.",
3454
3454
  packageCapabilities: {
3455
3455
  updatePreferences: 1
@@ -12906,9 +12906,13 @@ function recentUsageLines(entries) {
12906
12906
  for (const entry of entries) {
12907
12907
  const op = `${humanize(entry.provider)} ${humanize(entry.operation)}`.trim();
12908
12908
  const roughUsd = Number(entry.rough_usd_cost);
12909
- const usdText = entry.charge_state !== "pending" && entry.rough_usd_cost !== null && entry.rough_usd_cost !== void 0 && Number.isFinite(roughUsd) ? ` (\u2248$${roughUsd.toFixed(2)})` : "";
12910
- const charge = entry.billing_mode === "no_bill" ? "free" : entry.charge_state === "temporary_hold" ? `${entry.credits ?? 0} cr held${usdText}, not final` : entry.charge_state === "pending" ? "final Deepline charge pending" : `${entry.credits ?? 0} cr${usdText}`;
12911
- const state = entry.charge_state === "temporary_hold" ? "temporary hold, final charge pending" : entry.charge_state === "pending" ? "no final charge recorded yet" : entry.status || "completed";
12909
+ const credits = entry.credits !== null && entry.credits !== void 0 && String(entry.credits).trim().length > 0 && Number.isFinite(Number(entry.credits)) ? Number(entry.credits) : null;
12910
+ const temporaryHold = entry.charge_state === "temporary_hold";
12911
+ const pending = entry.charge_state === "pending" || entry.charge_finality === "pending";
12912
+ const unknown = entry.charge_finality === "unknown" || credits === null;
12913
+ const usdText = !pending && !unknown && entry.rough_usd_cost !== null && entry.rough_usd_cost !== void 0 && Number.isFinite(roughUsd) ? ` (\u2248$${roughUsd.toFixed(2)})` : "";
12914
+ const charge = temporaryHold ? `${credits === null ? "unknown amount" : `${credits} cr`} held${usdText}, not final` : pending ? "final Deepline charge pending" : unknown ? "charge unknown" : entry.billing_mode === "no_bill" ? "free" : credits === 0 && (entry.charge_finality === "final" || entry.charge_state === "hold_release") ? "0 cr, final" : `${credits} cr${usdText}`;
12915
+ const state = temporaryHold ? "temporary hold, final charge pending" : pending ? "no final charge recorded yet" : entry.status || "unknown";
12912
12916
  const auditBits = [
12913
12917
  entry.outcome ? `outcome=${entry.outcome}` : null,
12914
12918
  entry.pricing_basis ? `priced_by=${entry.pricing_basis}` : null,
@@ -13105,6 +13109,7 @@ async function handleUsage(options) {
13105
13109
  const recentLines = recentUsageLines(
13106
13110
  Array.isArray(recent.entries) ? recent.entries : []
13107
13111
  );
13112
+ const matchingActivity = typeof recent.total === "number" && Number.isFinite(recent.total) && recent.total >= 0 && typeof recent.total_is_exact === "boolean" ? recent.total_is_exact ? `Matching activity: ${recent.total}` : typeof recent.total_lower_bound === "number" && Number.isFinite(recent.total_lower_bound) && recent.total_lower_bound >= 0 ? `Matching activity: at least ${recent.total_lower_bound}` : `Matching activity: count not exact (reported ${recent.total})` : null;
13108
13113
  const lines = options.requestId ? [`Charge lookup: ${options.requestId}`, ...recentLines] : [
13109
13114
  `Balance: ${payload.balance ?? "(unknown)"}`,
13110
13115
  `Last 30 days usage: ${last30Usage ?? "(unknown)"}`,
@@ -13113,8 +13118,10 @@ async function handleUsage(options) {
13113
13118
  ...options.runId && recent.run_id ? [
13114
13119
  `Run spend: ${(payload.run ?? {}).spent_credits ?? "(unknown)"} Deepline Credits`
13115
13120
  ] : [],
13121
+ ...matchingActivity ? [matchingActivity] : [],
13116
13122
  ...recentLines,
13117
- ...recent.has_more === true || recent.incomplete === true ? ["List truncated \u2014 more recent calls match this query."] : [],
13123
+ ...recent.has_more === true ? ["More activity pages are available."] : [],
13124
+ ...recent.incomplete === true ? ["Recent activity is incomplete; the matching count may be higher."] : [],
13118
13125
  ...nextPage ? [`Next page: ${nextPage}`] : [],
13119
13126
  ...!nextPage && (recent.has_more === true || recent.incomplete === true) ? [
13120
13127
  "No continuation is available for this view. Use deepline billing ledger export all --json for the full ledger."
@@ -13194,7 +13201,13 @@ async function handleLimitOff(options) {
13194
13201
  async function exportLedger(http, outputPath, options) {
13195
13202
  let summary = { row_count: 0, net_delta_credits: 0 };
13196
13203
  let initialized = false;
13204
+ let pageNumber = 0;
13205
+ console.error(`Exporting billing ledger to ${outputPath}`);
13197
13206
  for await (const entries of iterateCursorPages(async (cursor) => {
13207
+ pageNumber += 1;
13208
+ console.error(
13209
+ `Fetching page ${pageNumber}; ${summary.row_count} rows written.`
13210
+ );
13198
13211
  const params = new URLSearchParams({ limit: "5000" });
13199
13212
  if (cursor) params.set("cursor", cursor);
13200
13213
  if (options.sinceAt !== null)
@@ -13221,7 +13234,11 @@ async function exportLedger(http, outputPath, options) {
13221
13234
  const rows = entries.map(ledgerApiEntryToRow);
13222
13235
  await appendFile(outputPath, ledgerRowsToCsv(rows, false), "utf-8");
13223
13236
  summary = summarizeLedgerRows(summary, rows);
13237
+ console.error(
13238
+ `Wrote page ${pageNumber}; ${summary.row_count} rows written.`
13239
+ );
13224
13240
  }
13241
+ console.error(`Export complete: ${summary.row_count} rows written.`);
13225
13242
  return summary;
13226
13243
  }
13227
13244
  async function handleHistory(options) {
@@ -14021,6 +14038,8 @@ function registerBillingCommands(program) {
14021
14038
  `
14022
14039
  Concepts:
14023
14040
  Billing commands show Deepline credits, not raw provider spend.
14041
+ Balance is shared by the workspace; concurrent work changes it. Use a job_id
14042
+ charge lookup to attribute one tool command instead of comparing balances.
14024
14043
  checkout/subscribe/redeem-code can open a browser unless --no-open is set.
14025
14044
 
14026
14045
  Examples:
@@ -14030,6 +14049,10 @@ Examples:
14030
14049
  deepline billing plans --json
14031
14050
  deepline billing subscription status --json
14032
14051
 
14052
+ # Price a tool before execution; look up its exact charge afterward
14053
+ deepline tools describe <tool-id> --pricing-only
14054
+ deepline billing usage --request-id <job_id> --json
14055
+
14033
14056
  # Buy credits or a plan
14034
14057
  deepline billing top-up 1000 --json
14035
14058
  deepline billing checkout --credits 1000 --no-open --json
@@ -14051,6 +14074,8 @@ Examples:
14051
14074
  `
14052
14075
  Notes:
14053
14076
  Read-only. Shows the current Deepline credit balance for the active workspace.
14077
+ The balance includes concurrent workspace activity, so a before/after difference
14078
+ cannot isolate one command. Use billing usage --request-id <job_id> --json.
14054
14079
 
14055
14080
  Examples:
14056
14081
  deepline billing balance
@@ -14063,6 +14088,9 @@ Examples:
14063
14088
  Notes:
14064
14089
  Read-only. Shows last-30-day Deepline credit usage plus a bounded recent-call
14065
14090
  page. Use --limit/--cursor to paginate the recent-call section.
14091
+ For one tool command, use the job_id returned by tools execute, or its next.billing
14092
+ command. Pending charges and temporary holds are not final spend; unknown means
14093
+ final charge evidence is unavailable. Workspace balance changes include other work.
14066
14094
 
14067
14095
  Examples:
14068
14096
  deepline billing usage
@@ -30014,7 +30042,23 @@ async function handleRunsList(args) {
30014
30042
  }
30015
30043
  }
30016
30044
  if (!playName && !statusFilter) {
30017
- console.error(usage);
30045
+ const message = "runs list requires --play or --status.";
30046
+ const next = {
30047
+ discover: "deepline plays list --json",
30048
+ running: "deepline runs list --status running --json"
30049
+ };
30050
+ console.error(
30051
+ `${message}
30052
+ ${usage}
30053
+ Discover Plays: ${next.discover}
30054
+ Active runs: ${next.running}`
30055
+ );
30056
+ if (argsWantJson(args)) {
30057
+ printCommandEnvelope(
30058
+ { ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
30059
+ { json: true }
30060
+ );
30061
+ }
30018
30062
  return 1;
30019
30063
  }
30020
30064
  if ((offset ?? 0) > 0 && !playName) {
@@ -32447,11 +32491,15 @@ Examples:
32447
32491
  "after",
32448
32492
  `
32449
32493
  Notes:
32494
+ Requires --play or --status. Discover Play references with deepline plays list --json.
32450
32495
  Bounded inventory for a play's recent runs. Use --compact for agent loops.
32496
+ Use the exact qualified Play reference, such as workspace/my-play or prebuilt/my-play.
32497
+ --offset requires --play; narrow status-only lists with a Play reference to paginate.
32451
32498
  Common statuses include running, completed, failed, and stopped.
32452
32499
 
32453
32500
  Examples:
32454
32501
  deepline runs list --play my-play
32502
+ deepline runs list --play workspace/my-play --json
32455
32503
  deepline runs list --play my-play --status failed --compact --json
32456
32504
  deepline runs list --status running --compact --json
32457
32505
  `
@@ -50009,11 +50057,17 @@ var CapabilityDescription = class _CapabilityDescription {
50009
50057
  legacyCost.pricingModel ?? legacyCost.pricing_model
50010
50058
  );
50011
50059
  const pricingModel = unit === "call" ? "fixed" : unit === "result" || unit === "page" ? `per_${unit}` : unit === "usage" ? "provider_usage" : legacyPricingModel;
50012
- const canonicalCredits = numberValue(
50013
- pricing.creditsPerUnit ?? pricing.credits_per_unit
50014
- );
50015
- const canonicalUsd = numberValue(
50016
- pricing.usdPerUnit ?? pricing.usd_per_unit
50060
+ const canonicalCredits = pricingNumber(
50061
+ pricing,
50062
+ "creditsPerUnit",
50063
+ "credits_per_unit",
50064
+ this.#catalogEntry.deeplineCreditsPerPricingUnit ?? this.#catalogEntry.deepline_credits_per_pricing_unit
50065
+ );
50066
+ const canonicalUsd = pricingNumber(
50067
+ pricing,
50068
+ "usdPerUnit",
50069
+ "usd_per_unit",
50070
+ this.#catalogEntry.deeplineUsdPerPricingUnit ?? this.#catalogEntry.deepline_usd_per_pricing_unit
50017
50071
  );
50018
50072
  const billingSource = stringValue4(
50019
50073
  this.#catalogEntry.billingSource ?? this.#catalogEntry.billing_source
@@ -50032,12 +50086,8 @@ var CapabilityDescription = class _CapabilityDescription {
50032
50086
  ),
50033
50087
  billingSource,
50034
50088
  billingSourceLabel,
50035
- deeplineCreditsPerPricingUnit: isFree ? 0 : canonicalCredits ?? numberValue(
50036
- this.#catalogEntry.deeplineCreditsPerPricingUnit ?? this.#catalogEntry.deepline_credits_per_pricing_unit
50037
- ),
50038
- deeplineUsdPerPricingUnit: isFree ? 0 : canonicalUsd ?? numberValue(
50039
- this.#catalogEntry.deeplineUsdPerPricingUnit ?? this.#catalogEntry.deepline_usd_per_pricing_unit
50040
- )
50089
+ deeplineCreditsPerPricingUnit: isFree ? 0 : canonicalCredits,
50090
+ deeplineUsdPerPricingUnit: isFree ? 0 : canonicalUsd
50041
50091
  };
50042
50092
  }
50043
50093
  };
@@ -50050,6 +50100,13 @@ function stringValue4(value) {
50050
50100
  function numberValue(value) {
50051
50101
  return typeof value === "number" && Number.isFinite(value) ? value : null;
50052
50102
  }
50103
+ function pricingNumber(pricing, canonicalKey, aliasKey, legacyValue) {
50104
+ for (const key of [canonicalKey, aliasKey]) {
50105
+ if (Object.prototype.hasOwnProperty.call(pricing, key))
50106
+ return numberValue(pricing[key]);
50107
+ }
50108
+ return numberValue(legacyValue);
50109
+ }
50053
50110
 
50054
50111
  // src/cli/tool-connection-status.ts
50055
50112
  function toolConnectionStatusMessage(input2) {
@@ -50643,11 +50700,15 @@ Concepts:
50643
50700
  Common commands:
50644
50701
  deepline tools search email --json
50645
50702
  deepline tools describe hunter_email_verifier --json
50703
+ deepline tools describe hunter_email_verifier --pricing-only --json
50646
50704
  deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
50705
+ deepline billing usage --request-id <job_id> --json
50647
50706
 
50648
50707
  Output:
50649
50708
  Use describe for tool contracts.
50650
50709
  Use execute to run a tool.
50710
+ Read pricing before execution; use the returned next.billing command for its
50711
+ exact charge. Workspace balance changes also include other callers' activity.
50651
50712
  `
50652
50713
  );
50653
50714
  tools.command("list [category]").description("Browse tool categories, or list every tool in a category.").addHelpText(
@@ -50773,6 +50834,7 @@ Notes:
50773
50834
  Examples:
50774
50835
  deepline tools describe hunter_email_verifier
50775
50836
  deepline tools describe hunter_email_verifier --pricing-only
50837
+ deepline tools describe hunter_email_verifier --pricing-only --json
50776
50838
  deepline tools describe hunter_email_verifier --schema-only
50777
50839
  deepline tools describe hunter_email_verifier --examples-only
50778
50840
  deepline tools describe hunter_email_verifier --json
@@ -50822,10 +50884,15 @@ Notes:
50822
50884
  waterfalls, row maps, checkpoints, and retries.
50823
50885
  Calling a provider-backed tool can spend Deepline credits. Use --json for the
50824
50886
  stable result payload plus output preview and debugging helpers.
50887
+ Read pricing first with tools describe <toolId> --pricing-only --json.
50888
+ Use the returned next.billing command to look up this execution's exact charge;
50889
+ workspace balance changes also include other callers' activity.
50825
50890
  --timeout sets this CLI request's HTTP deadline; it does not cancel provider work.
50826
50891
 
50827
50892
  Examples:
50828
50893
  deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
50894
+ deepline tools describe hunter_email_verifier --pricing-only --json
50895
+ deepline billing usage --request-id <job_id> --json
50829
50896
  deepline tools execute bounceban_verify_bulk --input @batch.json --timeout 10m --json
50830
50897
  deepline tools execute hunter_email_verifier -p email=a@b.com
50831
50898
  deepline tools execute test_rate_limit --input '{"key":"smoke"}' --timeout 90s --json
@@ -50929,6 +50996,38 @@ async function getTool(toolId, options = {}) {
50929
50996
  );
50930
50997
  return 2;
50931
50998
  }
50999
+ const onlyModes = [
51000
+ options.pricingOnly,
51001
+ options.schemaOnly,
51002
+ options.examplesOnly,
51003
+ options.gettersOnly
51004
+ ].filter(Boolean).length;
51005
+ if (onlyModes > 1) {
51006
+ console.error(
51007
+ "Use only one of --pricing-only, --schema-only, --examples-only, or --getters-only."
51008
+ );
51009
+ return 2;
51010
+ }
51011
+ if (options.pricingOnly) {
51012
+ const lines = toolPricingOnlyLines(tool, toolId);
51013
+ if (inferenceQuote)
51014
+ lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
51015
+ printCommandEnvelope(
51016
+ {
51017
+ toolId: String(tool.toolId || toolId),
51018
+ cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
51019
+ ...modelDescription ? { modelOptions: modelDescription } : {},
51020
+ ...isMonitorTypeTool(tool) ? { pricing: recordField2(tool, "pricing") } : {},
51021
+ ...inferenceQuote ? { inferenceQuote } : {}
51022
+ },
51023
+ {
51024
+ json: Boolean(options.json || options.contractJson),
51025
+ text: `${lines.join("\n")}
51026
+ `
51027
+ }
51028
+ );
51029
+ return 0;
51030
+ }
50932
51031
  if (options.contractJson) {
50933
51032
  printCompactJson({
50934
51033
  ...toolContractJsonForDescribe(tool, toolId),
@@ -50946,23 +51045,6 @@ async function getTool(toolId, options = {}) {
50946
51045
  });
50947
51046
  return 0;
50948
51047
  }
50949
- const onlyModes = [
50950
- options.pricingOnly,
50951
- options.schemaOnly,
50952
- options.examplesOnly,
50953
- options.gettersOnly
50954
- ].filter(Boolean).length;
50955
- if (onlyModes > 1) {
50956
- console.error(
50957
- "Use only one of --pricing-only, --schema-only, --examples-only, or --getters-only."
50958
- );
50959
- return 2;
50960
- }
50961
- if (options.pricingOnly) {
50962
- printToolPricingOnly(tool, toolId);
50963
- if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
50964
- return 0;
50965
- }
50966
51048
  if (options.schemaOnly) {
50967
51049
  printToolSchemaOnly(tool, toolId);
50968
51050
  if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
@@ -51003,11 +51085,16 @@ ${formatModelDescription(modelDescription)}`);
51003
51085
  if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
51004
51086
  return 0;
51005
51087
  }
51006
- function printInferenceQuoteSummary(_quote) {
51007
- console.log("");
51008
- console.log("Inference quote:");
51009
- console.log("- Temporary hold: priced estimate (minimum 0.02 credits)");
51010
- console.log("- Final charge: actual usage");
51088
+ function inferenceQuoteSummaryLines(_quote) {
51089
+ return [
51090
+ "",
51091
+ "Inference quote:",
51092
+ "- Temporary hold: priced estimate (minimum 0.02 credits)",
51093
+ "- Final charge: actual usage"
51094
+ ];
51095
+ }
51096
+ function printInferenceQuoteSummary(quote) {
51097
+ for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
51011
51098
  }
51012
51099
  function toolContractJsonForDescribe(tool, requestedToolId) {
51013
51100
  const toolId = String(tool.toolId || requestedToolId);
@@ -51066,6 +51153,7 @@ function toolContractJsonForDescribe(tool, requestedToolId) {
51066
51153
  toolId,
51067
51154
  provider: tool.provider,
51068
51155
  displayName: tool.displayName,
51156
+ cost: pricing,
51069
51157
  description: tool.description,
51070
51158
  categories: tool.categories,
51071
51159
  ...deprecated ? {
@@ -51085,7 +51173,6 @@ function toolContractJsonForDescribe(tool, requestedToolId) {
51085
51173
  } : {},
51086
51174
  ...executionMetadata ? { executionMetadata } : {},
51087
51175
  ...batchCapability ? { batchCapability } : {},
51088
- cost: pricing,
51089
51176
  getters: {
51090
51177
  extractedLists,
51091
51178
  extractedValues
@@ -51161,7 +51248,7 @@ function printMonitorTypeStreams(tool) {
51161
51248
  console.log(`- ${name}: ${cols.join(", ")}`);
51162
51249
  }
51163
51250
  }
51164
- function printMonitorTypePricing(tool) {
51251
+ function monitorTypePricingLines(tool) {
51165
51252
  const pricing = recordField2(tool, "pricing");
51166
51253
  const byType = recordField2(
51167
51254
  pricing,
@@ -51170,17 +51257,20 @@ function printMonitorTypePricing(tool) {
51170
51257
  );
51171
51258
  const keys = Object.keys(byType);
51172
51259
  if (!keys.length) {
51173
- console.log("Pricing: Deepline credits per accepted event (see --json)");
51174
- return;
51260
+ return ["Pricing: Deepline credits per accepted event (see --json)"];
51175
51261
  }
51176
- console.log("Pricing (Deepline credits per accepted event):");
51262
+ const lines = ["Pricing (Deepline credits per accepted event):"];
51177
51263
  for (const key of keys) {
51178
51264
  const entry = isRecord13(byType[key]) ? byType[key] : {};
51179
51265
  const credits = numberField2(entry, "deepline_credits", "deeplineCredits");
51180
51266
  const display = stringField2(entry, "display");
51181
51267
  const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "see --json");
51182
- console.log(`- ${key}: ${shown}`);
51268
+ lines.push(`- ${key}: ${shown}`);
51183
51269
  }
51270
+ return lines;
51271
+ }
51272
+ function printMonitorTypePricing(tool) {
51273
+ for (const line of monitorTypePricingLines(tool)) console.log(line);
51184
51274
  }
51185
51275
  function printMonitorTypeDeploy(tool) {
51186
51276
  const deploy = recordField2(tool, "deploy");
@@ -51318,13 +51408,12 @@ function printCompactToolContract(tool, requestedToolId) {
51318
51408
  `More: deepline tools describe ${contract.toolId} --pricing-only | --schema-only | --examples-only | --getters-only | --json`
51319
51409
  );
51320
51410
  }
51321
- function printToolPricingOnly(tool, requestedToolId, options = {}) {
51411
+ function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
51322
51412
  if (isMonitorTypeTool(tool)) {
51323
- printMonitorTypePricing(tool);
51324
- return;
51413
+ return monitorTypePricingLines(tool);
51325
51414
  }
51326
- const contract = toolContractJsonForDescribe(tool, requestedToolId);
51327
- const cost = isRecord13(contract.cost) ? contract.cost : {};
51415
+ const toolId = String(tool.toolId || requestedToolId);
51416
+ const cost = Capability.fromCatalogEntry(tool).describe().customerCost();
51328
51417
  const pricingModel = stringField2(cost, "pricingModel") || "unknown";
51329
51418
  const billing = stringField2(cost, "billingSourceLabel") || stringField2(cost, "billingSource") || stringField2(cost, "billingMode") || "unknown";
51330
51419
  const explicitUnit = stringField2(cost, "unit");
@@ -51334,8 +51423,14 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
51334
51423
  const displayText = stringField2(cost, "displayText");
51335
51424
  const summary = stringField2(cost, "summary");
51336
51425
  const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
51337
- console.log(`${options.heading ?? `Pricing: ${contract.toolId}`}: ${price}`);
51338
- console.log(`Billing: ${billing}`);
51426
+ return [
51427
+ `${options.heading ?? `Pricing: ${toolId}`}: ${price}`,
51428
+ `Billing: ${billing}`
51429
+ ];
51430
+ }
51431
+ function printToolPricingOnly(tool, requestedToolId, options = {}) {
51432
+ for (const line of toolPricingOnlyLines(tool, requestedToolId, options))
51433
+ console.log(line);
51339
51434
  }
51340
51435
  function printToolSchemaOnly(tool, requestedToolId) {
51341
51436
  if (isMonitorTypeTool(tool)) {
@@ -51548,6 +51643,7 @@ function toolMetadataJsonForDescribe(tool, requestedToolId) {
51548
51643
  } = tool;
51549
51644
  const outputSchemaRecord = recordField2(tool, "outputSchema", "output_schema");
51550
51645
  return {
51646
+ cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
51551
51647
  ...publicTool,
51552
51648
  toolId,
51553
51649
  provider: tool.provider,
@@ -51559,7 +51655,6 @@ function toolMetadataJsonForDescribe(tool, requestedToolId) {
51559
51655
  )
51560
51656
  } : {},
51561
51657
  inputFields: inputFields.map(inputFieldJsonForDescribe),
51562
- cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
51563
51658
  usageGuidance,
51564
51659
  runtimeOutputHelp: {
51565
51660
  contract: "tools describe shows declared schema and Deepline getters; it is not an observed provider response.",
package/dist/index.d.mts CHANGED
@@ -4738,6 +4738,8 @@ type BillingRecentUsageEntry = {
4738
4738
  outcome: string | null;
4739
4739
  billing_note: string | null;
4740
4740
  charge_state: 'posted' | 'temporary_hold' | 'hold_release' | 'pending' | 'free' | 'failed';
4741
+ /** Final billing truth may be unknown even after execution completes. */
4742
+ charge_finality?: 'final' | 'pending' | 'unknown';
4741
4743
  rough_usd_cost: number | null;
4742
4744
  created_at: string;
4743
4745
  };
@@ -4767,6 +4769,10 @@ type BillingUsageResult = {
4767
4769
  run_id: string | null;
4768
4770
  request_id?: string;
4769
4771
  total: number;
4772
+ /** Only true when total covers the complete matching history. */
4773
+ total_is_exact?: boolean;
4774
+ /** Proven matching entries, without assuming unscanned rows match. */
4775
+ total_lower_bound?: number;
4770
4776
  offset: number;
4771
4777
  limit: number;
4772
4778
  next_offset: number;
package/dist/index.d.ts CHANGED
@@ -4738,6 +4738,8 @@ type BillingRecentUsageEntry = {
4738
4738
  outcome: string | null;
4739
4739
  billing_note: string | null;
4740
4740
  charge_state: 'posted' | 'temporary_hold' | 'hold_release' | 'pending' | 'free' | 'failed';
4741
+ /** Final billing truth may be unknown even after execution completes. */
4742
+ charge_finality?: 'final' | 'pending' | 'unknown';
4741
4743
  rough_usd_cost: number | null;
4742
4744
  created_at: string;
4743
4745
  };
@@ -4767,6 +4769,10 @@ type BillingUsageResult = {
4767
4769
  run_id: string | null;
4768
4770
  request_id?: string;
4769
4771
  total: number;
4772
+ /** Only true when total covers the complete matching history. */
4773
+ total_is_exact?: boolean;
4774
+ /** Proven matching entries, without assuming unscanned rows match. */
4775
+ total_lower_bound?: number;
4770
4776
  offset: number;
4771
4777
  limit: number;
4772
4778
  next_offset: number;
package/dist/index.js CHANGED
@@ -1267,7 +1267,7 @@ var SDK_RELEASE = {
1267
1267
  // getters keep their established compatibility behavior.
1268
1268
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1269
1269
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
1270
- version: "0.3.236",
1270
+ version: "0.3.237",
1271
1271
  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.",
1272
1272
  packageCapabilities: {
1273
1273
  updatePreferences: 1
package/dist/index.mjs CHANGED
@@ -1171,7 +1171,7 @@ var SDK_RELEASE = {
1171
1171
  // getters keep their established compatibility behavior.
1172
1172
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1173
1173
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
1174
- version: "0.3.236",
1174
+ version: "0.3.237",
1175
1175
  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.",
1176
1176
  packageCapabilities: {
1177
1177
  updatePreferences: 1
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.236";
152
+ readonly version: "0.3.237";
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.236";
152
+ readonly version: "0.3.237";
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.236",
77
+ version: "0.3.237",
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.236",
51
+ version: "0.3.237",
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.236",
3
+ "version": "0.3.237",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",