deepline 0.1.45 → 0.1.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -216,8 +216,8 @@ function resolveConfig(options) {
216
216
  }
217
217
 
218
218
  // src/version.ts
219
- var SDK_VERSION = "0.1.45";
220
- var SDK_API_CONTRACT = "2026-05-promo-redemption-policy";
219
+ var SDK_VERSION = "0.1.47";
220
+ var SDK_API_CONTRACT = "2026-05-stripe-promo-checkout";
221
221
 
222
222
  // ../shared_libs/play-runtime/coordinator-headers.ts
223
223
  var COORDINATOR_INTERNAL_TOKEN_HEADER = "x-deepline-internal-token";
@@ -9232,11 +9232,16 @@ function extractSummaryFields(payload) {
9232
9232
  }
9233
9233
 
9234
9234
  // src/cli/commands/tools.ts
9235
+ var TOOL_COMMAND_TEMPLATES = {
9236
+ describe: "deepline tools describe <toolId>",
9237
+ execute: "deepline tools execute <toolId> --input '{...}'"
9238
+ };
9235
9239
  function toListedTool(tool) {
9236
9240
  if (isPlayLikeTool(tool)) {
9237
9241
  const playReference = playReferenceForTool(tool);
9238
9242
  return {
9239
9243
  ...tool,
9244
+ description: listedToolDescription(tool),
9240
9245
  id: tool.toolId,
9241
9246
  type: "play",
9242
9247
  executeCommand: `deepline plays run ${playReference} --input '{...}' --watch`
@@ -9244,6 +9249,7 @@ function toListedTool(tool) {
9244
9249
  }
9245
9250
  return {
9246
9251
  ...tool,
9252
+ description: listedToolDescription(tool),
9247
9253
  id: tool.toolId,
9248
9254
  type: "tool",
9249
9255
  executeCommand: `deepline tools execute ${tool.toolId}`
@@ -9256,14 +9262,29 @@ async function listTools(args) {
9256
9262
  sections: [
9257
9263
  {
9258
9264
  title: `${items.length} tools available:`,
9259
- lines: items.flatMap((item) => {
9265
+ lines: items.map((item) => {
9260
9266
  const cats = item.categories.length ? ` [${item.categories.join(", ")}]` : "";
9261
- return [`${item.toolId}${cats}`, ` ${item.description}`];
9267
+ const pricing = formatListedToolCost(item);
9268
+ return `${item.toolId}${cats} - ${item.description}${pricing ? ` - ${pricing}` : ""}`;
9262
9269
  })
9270
+ },
9271
+ {
9272
+ title: "next",
9273
+ lines: [
9274
+ "Run `deepline tools describe <toolId>` before executing a tool."
9275
+ ]
9263
9276
  }
9264
9277
  ]
9265
9278
  };
9266
- printCommandEnvelope({ tools: items, count: items.length, render }, { json: argsWantJson(args) });
9279
+ printCommandEnvelope(
9280
+ {
9281
+ tools: items,
9282
+ count: items.length,
9283
+ commandTemplates: TOOL_COMMAND_TEMPLATES,
9284
+ render
9285
+ },
9286
+ { json: argsWantJson(args) }
9287
+ );
9267
9288
  return 0;
9268
9289
  }
9269
9290
  async function searchTools(queryInput, options = {}) {
@@ -9481,8 +9502,22 @@ async function getTool(args) {
9481
9502
  }
9482
9503
  function toolMetadataJsonForDescribe(tool, requestedToolId) {
9483
9504
  const toolId = String(tool.toolId || requestedToolId);
9505
+ const {
9506
+ cost: _cost,
9507
+ deeplineCreditsPerPricingUnit: _deeplineCreditsPerPricingUnit,
9508
+ deeplineUsdPerPricingUnit: _deeplineUsdPerPricingUnit,
9509
+ deeplineUsdPerCredit: _deeplineUsdPerCredit,
9510
+ deeplinePricingSummary: _deeplinePricingSummary,
9511
+ deeplinePricingDetails: _deeplinePricingDetails,
9512
+ deepline_credits_per_pricing_unit: _snakeDeeplineCreditsPerPricingUnit,
9513
+ deepline_usd_per_pricing_unit: _snakeDeeplineUsdPerPricingUnit,
9514
+ deepline_usd_per_credit: _snakeDeeplineUsdPerCredit,
9515
+ deepline_pricing_summary: _snakeDeeplinePricingSummary,
9516
+ deepline_pricing_details: _snakeDeeplinePricingDetails,
9517
+ ...publicTool
9518
+ } = tool;
9484
9519
  return {
9485
- ...tool,
9520
+ ...publicTool,
9486
9521
  toolId,
9487
9522
  provider: tool.provider,
9488
9523
  displayName: tool.displayName,
@@ -9501,9 +9536,9 @@ function printToolDetails(tool, requestedToolId) {
9501
9536
  const displayBase = operation && operation.startsWith(`${tool.provider}_`) ? operation.slice(String(tool.provider).length + 1) : operation ? `${tool.provider} ${operation}`.trim() : toolId;
9502
9537
  const displayName = titleCase(displayBase || String(tool.displayName || toolId));
9503
9538
  const cost = isRecord4(tool.cost) ? tool.cost : null;
9539
+ const pricing = recordField(tool, "pricing");
9504
9540
  const deeplineCredits = numberField(tool, "deeplineCreditsPerPricingUnit", "deepline_credits_per_pricing_unit");
9505
9541
  const deeplineUsdPerPricingUnit = numberField(tool, "deeplineUsdPerPricingUnit", "deepline_usd_per_pricing_unit");
9506
- const deeplineUsdPerCredit = numberField(tool, "deeplineUsdPerCredit", "deepline_usd_per_credit");
9507
9542
  const billingSource = stringField(tool, "billingSource", "billing_source");
9508
9543
  const billingSourceLabel = stringField(tool, "billingSourceLabel", "billing_source_label");
9509
9544
  const estimatedCreditsRange = stringField(tool, "estimatedCreditsRange", "estimated_credits_range");
@@ -9528,6 +9563,7 @@ function printToolDetails(tool, requestedToolId) {
9528
9563
  console.log(` ${tool.categories.join(", ")}`);
9529
9564
  }
9530
9565
  const printedCost = printToolCost({
9566
+ pricing,
9531
9567
  cost,
9532
9568
  billingSource,
9533
9569
  deeplineCredits,
@@ -9539,9 +9575,6 @@ function printToolDetails(tool, requestedToolId) {
9539
9575
  if (billingSourceLabel) {
9540
9576
  console.log(` Billing source: ${billingSourceLabel}`);
9541
9577
  }
9542
- if (typeof deeplineUsdPerCredit === "number") {
9543
- console.log(` Deepline rate: $${deeplineUsdPerCredit.toFixed(2)} per credit`);
9544
- }
9545
9578
  if (estimatedCreditsRange) {
9546
9579
  const usdSuffix = estimatedUsdRange ? ` (~${estimatedUsdRange})` : "";
9547
9580
  console.log(` Estimated play spend: ${estimatedCreditsRange}${usdSuffix}`);
@@ -9643,29 +9676,54 @@ function printExtractions(label, entries) {
9643
9676
  console.log(` - ${name}: ${expression}${pathSuffix}`);
9644
9677
  }
9645
9678
  }
9679
+ function singleLineText(value, maxLength = 260) {
9680
+ if (typeof value !== "string") return "";
9681
+ const text = value.replace(/\s+/g, " ").trim();
9682
+ if (text.length <= maxLength) return text;
9683
+ return `${text.slice(0, maxLength - 3).trimEnd()}...`;
9684
+ }
9685
+ function listedToolDescription(tool) {
9686
+ const record = tool;
9687
+ return singleLineText(record.bestFor ?? record.best_for ?? tool.description);
9688
+ }
9689
+ function formatListedToolCost(tool) {
9690
+ const record = tool;
9691
+ const pricing = recordField(record, "pricing");
9692
+ const displayText = stringField(pricing, "displayText", "display_text");
9693
+ return displayText ? `Cost: ${displayText}` : "";
9694
+ }
9646
9695
  function printToolCost(input) {
9647
- const { cost, billingSource, deeplineCredits, deeplineUsdPerPricingUnit } = input;
9648
- if (!cost) return false;
9649
- const pricingModel = typeof cost.pricingModel === "string" ? cost.pricingModel : typeof cost.pricing_model === "string" ? cost.pricing_model : "";
9650
- const billingMode = typeof cost.billingMode === "string" ? cost.billingMode : typeof cost.billing_mode === "string" ? cost.billing_mode : "";
9651
- const providerPrice = typeof cost.providerPricePerPricingModel === "number" ? cost.providerPricePerPricingModel : null;
9652
- if (pricingModel === "fixed" && providerPrice === 0) {
9653
- console.log(" Cost: free");
9654
- return true;
9655
- }
9696
+ const { pricing, cost, billingSource, deeplineCredits, deeplineUsdPerPricingUnit } = input;
9656
9697
  if (billingSource === "own_provider_credentials") {
9657
9698
  console.log(" Cost: free through Deepline");
9658
9699
  return true;
9659
9700
  }
9660
- if (pricingModel && billingMode && deeplineCredits !== null) {
9701
+ const displayText = stringField(pricing, "displayText", "display_text");
9702
+ if (displayText) {
9703
+ console.log(` Cost: ${displayText}`);
9704
+ const details = arrayField(pricing, "details").map((item) => String(item).trim()).filter(Boolean);
9705
+ if (details.length) {
9706
+ console.log(" notes:");
9707
+ for (const detail of details) console.log(` - ${detail}`);
9708
+ }
9709
+ return true;
9710
+ }
9711
+ const pricingModel = cost ? typeof cost.pricingModel === "string" ? cost.pricingModel : typeof cost.pricing_model === "string" ? cost.pricing_model : "" : "";
9712
+ const billingMode = cost ? typeof cost.billingMode === "string" ? cost.billingMode : typeof cost.billing_mode === "string" ? cost.billing_mode : "" : "";
9713
+ if (deeplineCredits === 0) {
9714
+ console.log(" Cost: Free");
9715
+ return true;
9716
+ }
9717
+ if (pricingModel && deeplineCredits !== null) {
9661
9718
  const unit = pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : "call";
9662
9719
  const usdText = deeplineUsdPerPricingUnit !== null ? ` / ${formatUsd(deeplineUsdPerPricingUnit)}` : "";
9663
- console.log(` Cost: ${formatDecimal(deeplineCredits)} Deepline credits${usdText} per ${unit} (${billingMode})`);
9720
+ const billingSuffix = billingMode ? ` (${billingMode})` : "";
9721
+ console.log(` Cost: ${formatDecimal(deeplineCredits)} Deepline credits${usdText} per ${unit}${billingSuffix}`);
9664
9722
  return true;
9665
9723
  }
9666
- if (pricingModel && billingMode && providerPrice !== null) {
9667
- const unit = pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : "call";
9668
- console.log(` Cost: ${formatDecimal(providerPrice)} provider credits per ${unit} (${billingMode})`);
9724
+ const summary = stringField(pricing, "summary");
9725
+ if (summary) {
9726
+ console.log(` Cost: ${summary}`);
9669
9727
  return true;
9670
9728
  }
9671
9729
  return false;
@@ -193,8 +193,8 @@ function resolveConfig(options) {
193
193
  }
194
194
 
195
195
  // src/version.ts
196
- var SDK_VERSION = "0.1.45";
197
- var SDK_API_CONTRACT = "2026-05-promo-redemption-policy";
196
+ var SDK_VERSION = "0.1.47";
197
+ var SDK_API_CONTRACT = "2026-05-stripe-promo-checkout";
198
198
 
199
199
  // ../shared_libs/play-runtime/coordinator-headers.ts
200
200
  var COORDINATOR_INTERNAL_TOKEN_HEADER = "x-deepline-internal-token";
@@ -9219,11 +9219,16 @@ function extractSummaryFields(payload) {
9219
9219
  }
9220
9220
 
9221
9221
  // src/cli/commands/tools.ts
9222
+ var TOOL_COMMAND_TEMPLATES = {
9223
+ describe: "deepline tools describe <toolId>",
9224
+ execute: "deepline tools execute <toolId> --input '{...}'"
9225
+ };
9222
9226
  function toListedTool(tool) {
9223
9227
  if (isPlayLikeTool(tool)) {
9224
9228
  const playReference = playReferenceForTool(tool);
9225
9229
  return {
9226
9230
  ...tool,
9231
+ description: listedToolDescription(tool),
9227
9232
  id: tool.toolId,
9228
9233
  type: "play",
9229
9234
  executeCommand: `deepline plays run ${playReference} --input '{...}' --watch`
@@ -9231,6 +9236,7 @@ function toListedTool(tool) {
9231
9236
  }
9232
9237
  return {
9233
9238
  ...tool,
9239
+ description: listedToolDescription(tool),
9234
9240
  id: tool.toolId,
9235
9241
  type: "tool",
9236
9242
  executeCommand: `deepline tools execute ${tool.toolId}`
@@ -9243,14 +9249,29 @@ async function listTools(args) {
9243
9249
  sections: [
9244
9250
  {
9245
9251
  title: `${items.length} tools available:`,
9246
- lines: items.flatMap((item) => {
9252
+ lines: items.map((item) => {
9247
9253
  const cats = item.categories.length ? ` [${item.categories.join(", ")}]` : "";
9248
- return [`${item.toolId}${cats}`, ` ${item.description}`];
9254
+ const pricing = formatListedToolCost(item);
9255
+ return `${item.toolId}${cats} - ${item.description}${pricing ? ` - ${pricing}` : ""}`;
9249
9256
  })
9257
+ },
9258
+ {
9259
+ title: "next",
9260
+ lines: [
9261
+ "Run `deepline tools describe <toolId>` before executing a tool."
9262
+ ]
9250
9263
  }
9251
9264
  ]
9252
9265
  };
9253
- printCommandEnvelope({ tools: items, count: items.length, render }, { json: argsWantJson(args) });
9266
+ printCommandEnvelope(
9267
+ {
9268
+ tools: items,
9269
+ count: items.length,
9270
+ commandTemplates: TOOL_COMMAND_TEMPLATES,
9271
+ render
9272
+ },
9273
+ { json: argsWantJson(args) }
9274
+ );
9254
9275
  return 0;
9255
9276
  }
9256
9277
  async function searchTools(queryInput, options = {}) {
@@ -9468,8 +9489,22 @@ async function getTool(args) {
9468
9489
  }
9469
9490
  function toolMetadataJsonForDescribe(tool, requestedToolId) {
9470
9491
  const toolId = String(tool.toolId || requestedToolId);
9492
+ const {
9493
+ cost: _cost,
9494
+ deeplineCreditsPerPricingUnit: _deeplineCreditsPerPricingUnit,
9495
+ deeplineUsdPerPricingUnit: _deeplineUsdPerPricingUnit,
9496
+ deeplineUsdPerCredit: _deeplineUsdPerCredit,
9497
+ deeplinePricingSummary: _deeplinePricingSummary,
9498
+ deeplinePricingDetails: _deeplinePricingDetails,
9499
+ deepline_credits_per_pricing_unit: _snakeDeeplineCreditsPerPricingUnit,
9500
+ deepline_usd_per_pricing_unit: _snakeDeeplineUsdPerPricingUnit,
9501
+ deepline_usd_per_credit: _snakeDeeplineUsdPerCredit,
9502
+ deepline_pricing_summary: _snakeDeeplinePricingSummary,
9503
+ deepline_pricing_details: _snakeDeeplinePricingDetails,
9504
+ ...publicTool
9505
+ } = tool;
9471
9506
  return {
9472
- ...tool,
9507
+ ...publicTool,
9473
9508
  toolId,
9474
9509
  provider: tool.provider,
9475
9510
  displayName: tool.displayName,
@@ -9488,9 +9523,9 @@ function printToolDetails(tool, requestedToolId) {
9488
9523
  const displayBase = operation && operation.startsWith(`${tool.provider}_`) ? operation.slice(String(tool.provider).length + 1) : operation ? `${tool.provider} ${operation}`.trim() : toolId;
9489
9524
  const displayName = titleCase(displayBase || String(tool.displayName || toolId));
9490
9525
  const cost = isRecord4(tool.cost) ? tool.cost : null;
9526
+ const pricing = recordField(tool, "pricing");
9491
9527
  const deeplineCredits = numberField(tool, "deeplineCreditsPerPricingUnit", "deepline_credits_per_pricing_unit");
9492
9528
  const deeplineUsdPerPricingUnit = numberField(tool, "deeplineUsdPerPricingUnit", "deepline_usd_per_pricing_unit");
9493
- const deeplineUsdPerCredit = numberField(tool, "deeplineUsdPerCredit", "deepline_usd_per_credit");
9494
9529
  const billingSource = stringField(tool, "billingSource", "billing_source");
9495
9530
  const billingSourceLabel = stringField(tool, "billingSourceLabel", "billing_source_label");
9496
9531
  const estimatedCreditsRange = stringField(tool, "estimatedCreditsRange", "estimated_credits_range");
@@ -9515,6 +9550,7 @@ function printToolDetails(tool, requestedToolId) {
9515
9550
  console.log(` ${tool.categories.join(", ")}`);
9516
9551
  }
9517
9552
  const printedCost = printToolCost({
9553
+ pricing,
9518
9554
  cost,
9519
9555
  billingSource,
9520
9556
  deeplineCredits,
@@ -9526,9 +9562,6 @@ function printToolDetails(tool, requestedToolId) {
9526
9562
  if (billingSourceLabel) {
9527
9563
  console.log(` Billing source: ${billingSourceLabel}`);
9528
9564
  }
9529
- if (typeof deeplineUsdPerCredit === "number") {
9530
- console.log(` Deepline rate: $${deeplineUsdPerCredit.toFixed(2)} per credit`);
9531
- }
9532
9565
  if (estimatedCreditsRange) {
9533
9566
  const usdSuffix = estimatedUsdRange ? ` (~${estimatedUsdRange})` : "";
9534
9567
  console.log(` Estimated play spend: ${estimatedCreditsRange}${usdSuffix}`);
@@ -9630,29 +9663,54 @@ function printExtractions(label, entries) {
9630
9663
  console.log(` - ${name}: ${expression}${pathSuffix}`);
9631
9664
  }
9632
9665
  }
9666
+ function singleLineText(value, maxLength = 260) {
9667
+ if (typeof value !== "string") return "";
9668
+ const text = value.replace(/\s+/g, " ").trim();
9669
+ if (text.length <= maxLength) return text;
9670
+ return `${text.slice(0, maxLength - 3).trimEnd()}...`;
9671
+ }
9672
+ function listedToolDescription(tool) {
9673
+ const record = tool;
9674
+ return singleLineText(record.bestFor ?? record.best_for ?? tool.description);
9675
+ }
9676
+ function formatListedToolCost(tool) {
9677
+ const record = tool;
9678
+ const pricing = recordField(record, "pricing");
9679
+ const displayText = stringField(pricing, "displayText", "display_text");
9680
+ return displayText ? `Cost: ${displayText}` : "";
9681
+ }
9633
9682
  function printToolCost(input) {
9634
- const { cost, billingSource, deeplineCredits, deeplineUsdPerPricingUnit } = input;
9635
- if (!cost) return false;
9636
- const pricingModel = typeof cost.pricingModel === "string" ? cost.pricingModel : typeof cost.pricing_model === "string" ? cost.pricing_model : "";
9637
- const billingMode = typeof cost.billingMode === "string" ? cost.billingMode : typeof cost.billing_mode === "string" ? cost.billing_mode : "";
9638
- const providerPrice = typeof cost.providerPricePerPricingModel === "number" ? cost.providerPricePerPricingModel : null;
9639
- if (pricingModel === "fixed" && providerPrice === 0) {
9640
- console.log(" Cost: free");
9641
- return true;
9642
- }
9683
+ const { pricing, cost, billingSource, deeplineCredits, deeplineUsdPerPricingUnit } = input;
9643
9684
  if (billingSource === "own_provider_credentials") {
9644
9685
  console.log(" Cost: free through Deepline");
9645
9686
  return true;
9646
9687
  }
9647
- if (pricingModel && billingMode && deeplineCredits !== null) {
9688
+ const displayText = stringField(pricing, "displayText", "display_text");
9689
+ if (displayText) {
9690
+ console.log(` Cost: ${displayText}`);
9691
+ const details = arrayField(pricing, "details").map((item) => String(item).trim()).filter(Boolean);
9692
+ if (details.length) {
9693
+ console.log(" notes:");
9694
+ for (const detail of details) console.log(` - ${detail}`);
9695
+ }
9696
+ return true;
9697
+ }
9698
+ const pricingModel = cost ? typeof cost.pricingModel === "string" ? cost.pricingModel : typeof cost.pricing_model === "string" ? cost.pricing_model : "" : "";
9699
+ const billingMode = cost ? typeof cost.billingMode === "string" ? cost.billingMode : typeof cost.billing_mode === "string" ? cost.billing_mode : "" : "";
9700
+ if (deeplineCredits === 0) {
9701
+ console.log(" Cost: Free");
9702
+ return true;
9703
+ }
9704
+ if (pricingModel && deeplineCredits !== null) {
9648
9705
  const unit = pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : "call";
9649
9706
  const usdText = deeplineUsdPerPricingUnit !== null ? ` / ${formatUsd(deeplineUsdPerPricingUnit)}` : "";
9650
- console.log(` Cost: ${formatDecimal(deeplineCredits)} Deepline credits${usdText} per ${unit} (${billingMode})`);
9707
+ const billingSuffix = billingMode ? ` (${billingMode})` : "";
9708
+ console.log(` Cost: ${formatDecimal(deeplineCredits)} Deepline credits${usdText} per ${unit}${billingSuffix}`);
9651
9709
  return true;
9652
9710
  }
9653
- if (pricingModel && billingMode && providerPrice !== null) {
9654
- const unit = pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : "call";
9655
- console.log(` Cost: ${formatDecimal(providerPrice)} provider credits per ${unit} (${billingMode})`);
9711
+ const summary = stringField(pricing, "summary");
9712
+ if (summary) {
9713
+ console.log(` Cost: ${summary}`);
9656
9714
  return true;
9657
9715
  }
9658
9716
  return false;
package/dist/index.d.mts CHANGED
@@ -221,6 +221,22 @@ interface CustomerDbQueryResult {
221
221
  columns: CustomerDbColumn[];
222
222
  rows: unknown[];
223
223
  }
224
+ interface ToolPricingSummary {
225
+ /** User-facing pricing text for quick discovery displays. */
226
+ displayText: string | null;
227
+ /** User-facing unit the price applies to. */
228
+ unit: 'call' | 'result' | 'page' | 'usage' | null;
229
+ /** Deepline credits charged per unit, when statically knowable. */
230
+ creditsPerUnit: number | null;
231
+ /** USD equivalent charged per unit, when statically knowable. */
232
+ usdPerUnit: number | null;
233
+ /** Currency for `usdPerUnit`. */
234
+ currency: 'USD';
235
+ /** Short user-facing pricing summary for variable pricing. */
236
+ summary: string | null;
237
+ /** Additional user-facing pricing notes. */
238
+ details: string[];
239
+ }
224
240
  /**
225
241
  * Summary definition of a tool, returned by {@link DeeplineClient.listTools}.
226
242
  *
@@ -255,6 +271,8 @@ interface ToolDefinition {
255
271
  inputSchema?: Record<string, unknown>;
256
272
  /** JSON Schema describing the tool's output shape. */
257
273
  outputSchema?: Record<string, unknown>;
274
+ /** User-facing pricing summary. Internal provider/settlement costs are intentionally omitted. */
275
+ pricing?: ToolPricingSummary | null;
258
276
  /** Copyable play-runtime guidance for V2 tool execution results. */
259
277
  usageGuidance?: {
260
278
  execute?: string;
@@ -327,6 +345,10 @@ interface ToolSearchResult {
327
345
  search_mode?: 'v1' | 'v2';
328
346
  search_fallback_to_category?: boolean;
329
347
  omitted_plays_hint?: string;
348
+ commandTemplates?: {
349
+ describe?: string;
350
+ execute?: string;
351
+ };
330
352
  render?: {
331
353
  sections?: Array<{
332
354
  title: string;
@@ -357,11 +379,11 @@ interface ToolMetadata extends ToolDefinition {
357
379
  asyncGetAction?: string | null;
358
380
  /** Known failure scenarios and their expected handling. */
359
381
  failureMode?: Record<string, unknown> | null;
360
- /** Provider-side pricing structure. */
382
+ /** Sanitized pricing model for describe metadata. Provider internal prices are intentionally omitted. */
361
383
  cost?: Record<string, unknown> | null;
362
- /** How many Deepline credits map to one provider pricing unit. */
384
+ /** Deepline credits charged for one user-visible pricing unit. */
363
385
  deeplineCreditsPerPricingUnit?: number | null;
364
- /** Whether cost is billed by the provider or by Deepline. */
386
+ /** Whether the customer pays with Deepline credits or their own connected account. */
365
387
  billingSource?: string;
366
388
  /** Display label for the billing source. */
367
389
  billingSourceLabel?: string;
@@ -1511,8 +1533,8 @@ declare class DeeplineClient {
1511
1533
  }>;
1512
1534
  }
1513
1535
 
1514
- declare const SDK_VERSION = "0.1.45";
1515
- declare const SDK_API_CONTRACT = "2026-05-promo-redemption-policy";
1536
+ declare const SDK_VERSION = "0.1.47";
1537
+ declare const SDK_API_CONTRACT = "2026-05-stripe-promo-checkout";
1516
1538
 
1517
1539
  /**
1518
1540
  * Base error class for all Deepline SDK errors.
package/dist/index.d.ts CHANGED
@@ -221,6 +221,22 @@ interface CustomerDbQueryResult {
221
221
  columns: CustomerDbColumn[];
222
222
  rows: unknown[];
223
223
  }
224
+ interface ToolPricingSummary {
225
+ /** User-facing pricing text for quick discovery displays. */
226
+ displayText: string | null;
227
+ /** User-facing unit the price applies to. */
228
+ unit: 'call' | 'result' | 'page' | 'usage' | null;
229
+ /** Deepline credits charged per unit, when statically knowable. */
230
+ creditsPerUnit: number | null;
231
+ /** USD equivalent charged per unit, when statically knowable. */
232
+ usdPerUnit: number | null;
233
+ /** Currency for `usdPerUnit`. */
234
+ currency: 'USD';
235
+ /** Short user-facing pricing summary for variable pricing. */
236
+ summary: string | null;
237
+ /** Additional user-facing pricing notes. */
238
+ details: string[];
239
+ }
224
240
  /**
225
241
  * Summary definition of a tool, returned by {@link DeeplineClient.listTools}.
226
242
  *
@@ -255,6 +271,8 @@ interface ToolDefinition {
255
271
  inputSchema?: Record<string, unknown>;
256
272
  /** JSON Schema describing the tool's output shape. */
257
273
  outputSchema?: Record<string, unknown>;
274
+ /** User-facing pricing summary. Internal provider/settlement costs are intentionally omitted. */
275
+ pricing?: ToolPricingSummary | null;
258
276
  /** Copyable play-runtime guidance for V2 tool execution results. */
259
277
  usageGuidance?: {
260
278
  execute?: string;
@@ -327,6 +345,10 @@ interface ToolSearchResult {
327
345
  search_mode?: 'v1' | 'v2';
328
346
  search_fallback_to_category?: boolean;
329
347
  omitted_plays_hint?: string;
348
+ commandTemplates?: {
349
+ describe?: string;
350
+ execute?: string;
351
+ };
330
352
  render?: {
331
353
  sections?: Array<{
332
354
  title: string;
@@ -357,11 +379,11 @@ interface ToolMetadata extends ToolDefinition {
357
379
  asyncGetAction?: string | null;
358
380
  /** Known failure scenarios and their expected handling. */
359
381
  failureMode?: Record<string, unknown> | null;
360
- /** Provider-side pricing structure. */
382
+ /** Sanitized pricing model for describe metadata. Provider internal prices are intentionally omitted. */
361
383
  cost?: Record<string, unknown> | null;
362
- /** How many Deepline credits map to one provider pricing unit. */
384
+ /** Deepline credits charged for one user-visible pricing unit. */
363
385
  deeplineCreditsPerPricingUnit?: number | null;
364
- /** Whether cost is billed by the provider or by Deepline. */
386
+ /** Whether the customer pays with Deepline credits or their own connected account. */
365
387
  billingSource?: string;
366
388
  /** Display label for the billing source. */
367
389
  billingSourceLabel?: string;
@@ -1511,8 +1533,8 @@ declare class DeeplineClient {
1511
1533
  }>;
1512
1534
  }
1513
1535
 
1514
- declare const SDK_VERSION = "0.1.45";
1515
- declare const SDK_API_CONTRACT = "2026-05-promo-redemption-policy";
1536
+ declare const SDK_VERSION = "0.1.47";
1537
+ declare const SDK_API_CONTRACT = "2026-05-stripe-promo-checkout";
1516
1538
 
1517
1539
  /**
1518
1540
  * Base error class for all Deepline SDK errors.
package/dist/index.js CHANGED
@@ -215,8 +215,8 @@ function resolveConfig(options) {
215
215
  }
216
216
 
217
217
  // src/version.ts
218
- var SDK_VERSION = "0.1.45";
219
- var SDK_API_CONTRACT = "2026-05-promo-redemption-policy";
218
+ var SDK_VERSION = "0.1.47";
219
+ var SDK_API_CONTRACT = "2026-05-stripe-promo-checkout";
220
220
 
221
221
  // ../shared_libs/play-runtime/coordinator-headers.ts
222
222
  var COORDINATOR_INTERNAL_TOKEN_HEADER = "x-deepline-internal-token";
package/dist/index.mjs CHANGED
@@ -169,8 +169,8 @@ function resolveConfig(options) {
169
169
  }
170
170
 
171
171
  // src/version.ts
172
- var SDK_VERSION = "0.1.45";
173
- var SDK_API_CONTRACT = "2026-05-promo-redemption-policy";
172
+ var SDK_VERSION = "0.1.47";
173
+ var SDK_API_CONTRACT = "2026-05-stripe-promo-checkout";
174
174
 
175
175
  // ../shared_libs/play-runtime/coordinator-headers.ts
176
176
  var COORDINATOR_INTERNAL_TOKEN_HEADER = "x-deepline-internal-token";
@@ -69,6 +69,23 @@ export interface CustomerDbQueryResult {
69
69
  rows: unknown[];
70
70
  }
71
71
 
72
+ export interface ToolPricingSummary {
73
+ /** User-facing pricing text for quick discovery displays. */
74
+ displayText: string | null;
75
+ /** User-facing unit the price applies to. */
76
+ unit: 'call' | 'result' | 'page' | 'usage' | null;
77
+ /** Deepline credits charged per unit, when statically knowable. */
78
+ creditsPerUnit: number | null;
79
+ /** USD equivalent charged per unit, when statically knowable. */
80
+ usdPerUnit: number | null;
81
+ /** Currency for `usdPerUnit`. */
82
+ currency: 'USD';
83
+ /** Short user-facing pricing summary for variable pricing. */
84
+ summary: string | null;
85
+ /** Additional user-facing pricing notes. */
86
+ details: string[];
87
+ }
88
+
72
89
  /**
73
90
  * Summary definition of a tool, returned by {@link DeeplineClient.listTools}.
74
91
  *
@@ -103,6 +120,8 @@ export interface ToolDefinition {
103
120
  inputSchema?: Record<string, unknown>;
104
121
  /** JSON Schema describing the tool's output shape. */
105
122
  outputSchema?: Record<string, unknown>;
123
+ /** User-facing pricing summary. Internal provider/settlement costs are intentionally omitted. */
124
+ pricing?: ToolPricingSummary | null;
106
125
  /** Copyable play-runtime guidance for V2 tool execution results. */
107
126
  usageGuidance?: {
108
127
  execute?: string;
@@ -177,6 +196,10 @@ export interface ToolSearchResult {
177
196
  search_mode?: 'v1' | 'v2';
178
197
  search_fallback_to_category?: boolean;
179
198
  omitted_plays_hint?: string;
199
+ commandTemplates?: {
200
+ describe?: string;
201
+ execute?: string;
202
+ };
180
203
  render?: {
181
204
  sections?: Array<{
182
205
  title: string;
@@ -208,11 +231,11 @@ export interface ToolMetadata extends ToolDefinition {
208
231
  asyncGetAction?: string | null;
209
232
  /** Known failure scenarios and their expected handling. */
210
233
  failureMode?: Record<string, unknown> | null;
211
- /** Provider-side pricing structure. */
234
+ /** Sanitized pricing model for describe metadata. Provider internal prices are intentionally omitted. */
212
235
  cost?: Record<string, unknown> | null;
213
- /** How many Deepline credits map to one provider pricing unit. */
236
+ /** Deepline credits charged for one user-visible pricing unit. */
214
237
  deeplineCreditsPerPricingUnit?: number | null;
215
- /** Whether cost is billed by the provider or by Deepline. */
238
+ /** Whether the customer pays with Deepline credits or their own connected account. */
216
239
  billingSource?: string;
217
240
  /** Display label for the billing source. */
218
241
  billingSourceLabel?: string;
@@ -1,2 +1,2 @@
1
- export const SDK_VERSION = "0.1.45";
2
- export const SDK_API_CONTRACT = "2026-05-promo-redemption-policy";
1
+ export const SDK_VERSION = "0.1.47";
2
+ export const SDK_API_CONTRACT = "2026-05-stripe-promo-checkout";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.45",
3
+ "version": "0.1.47",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {