deepline 0.1.140 → 0.1.141

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.
@@ -390,10 +390,10 @@ var SDK_RELEASE = {
390
390
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
391
391
  // the SDK enrich generator's one-second stale policy.
392
392
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
393
- version: "0.1.140",
393
+ version: "0.1.141",
394
394
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
395
395
  supportPolicy: {
396
- latest: "0.1.140",
396
+ latest: "0.1.141",
397
397
  minimumSupported: "0.1.53",
398
398
  deprecatedBelow: "0.1.53",
399
399
  commandMinimumSupported: [
@@ -1154,6 +1154,10 @@ function normalizeStepProgress(value) {
1154
1154
  ...optionalFiniteNumber(value.completed) !== void 0 ? { completed: optionalFiniteNumber(value.completed) } : {},
1155
1155
  ...optionalFiniteNumber(value.total) !== void 0 ? { total: optionalFiniteNumber(value.total) } : {},
1156
1156
  ...optionalFiniteNumber(value.failed) !== void 0 ? { failed: optionalFiniteNumber(value.failed) } : {},
1157
+ ...optionalFiniteNumber(value.startedRows) !== void 0 ? { startedRows: optionalFiniteNumber(value.startedRows) } : {},
1158
+ ...optionalFiniteNumber(value.activeRows) !== void 0 ? { activeRows: optionalFiniteNumber(value.activeRows) } : {},
1159
+ ...optionalFiniteNumber(value.waitingRows) !== void 0 ? { waitingRows: optionalFiniteNumber(value.waitingRows) } : {},
1160
+ ...optionalFiniteNumber(value.completedRows) !== void 0 ? { completedRows: optionalFiniteNumber(value.completedRows) } : {},
1157
1161
  ...optionalString(value.message) ? { message: optionalString(value.message) } : {},
1158
1162
  ...optionalNullableString(value.artifactTableNamespace) !== void 0 ? {
1159
1163
  artifactTableNamespace: optionalNullableString(
@@ -1236,6 +1240,10 @@ function buildSnapshotFromLedger(snapshot) {
1236
1240
  completed: step.progress.completed,
1237
1241
  total: step.progress.total,
1238
1242
  failed: step.progress.failed,
1243
+ startedRows: step.progress.startedRows,
1244
+ activeRows: step.progress.activeRows,
1245
+ waitingRows: step.progress.waitingRows,
1246
+ completedRows: step.progress.completedRows,
1239
1247
  message: step.progress.message,
1240
1248
  artifactTableNamespace: step.progress.artifactTableNamespace ?? step.artifactTableNamespace ?? null,
1241
1249
  startedAt: step.startedAt ?? null,
@@ -1432,6 +1440,10 @@ function diffPlayRunStreamEvents(input2) {
1432
1440
  completed: state.progress.completed,
1433
1441
  total: state.progress.total,
1434
1442
  failed: state.progress.failed,
1443
+ startedRows: state.progress.startedRows,
1444
+ activeRows: state.progress.activeRows,
1445
+ waitingRows: state.progress.waitingRows,
1446
+ completedRows: state.progress.completedRows,
1435
1447
  message: state.progress.message,
1436
1448
  artifactTableNamespace: state.progress.artifactTableNamespace ?? state.artifactTableNamespace ?? null,
1437
1449
  ...resolveTimingWindow({
@@ -2269,6 +2281,28 @@ var DeeplineClient = class {
2269
2281
  }
2270
2282
  );
2271
2283
  }
2284
+ /**
2285
+ * Describe a Deepline Agent model and its provider-specific option surface.
2286
+ *
2287
+ * Combines live AI Gateway model metadata with Deepline's generated AI SDK
2288
+ * provider option registry so agents can construct `providerOptions`
2289
+ * payloads before executing `deeplineagent`.
2290
+ *
2291
+ * The returned option schemas describe accepted provider option shapes, not
2292
+ * guaranteed support for every model. Runtime AI SDK/Gateway errors remain
2293
+ * authoritative for model-gated values.
2294
+ *
2295
+ * @param model - Gateway model id such as `"openai/gpt-5.5"`
2296
+ * @returns Model metadata, provider option shapes, and runnable examples
2297
+ */
2298
+ async describeModel(model) {
2299
+ return this.http.request(
2300
+ `/api/v2/models/describe?model=${encodeURIComponent(model)}`,
2301
+ {
2302
+ method: "GET"
2303
+ }
2304
+ );
2305
+ }
2272
2306
  /**
2273
2307
  * Execute a tool and return the standard execution envelope.
2274
2308
  *
@@ -19495,6 +19529,66 @@ function extractSummaryFields(payload) {
19495
19529
  return {};
19496
19530
  }
19497
19531
 
19532
+ // src/cli/commands/model-description.ts
19533
+ function formatModelDescription(description) {
19534
+ const lines = [];
19535
+ lines.push(description.model);
19536
+ lines.push(`Provider: ${description.provider}`);
19537
+ const name = stringField(description.modelMetadata, "name");
19538
+ if (name) lines.push(`Name: ${name}`);
19539
+ const contextWindow = numberField(
19540
+ description.modelMetadata,
19541
+ "context_window"
19542
+ );
19543
+ if (contextWindow !== null) lines.push(`Context: ${contextWindow}`);
19544
+ const tags = arrayField(description.modelMetadata, "tags").filter(
19545
+ (value) => typeof value === "string"
19546
+ );
19547
+ if (tags.length) lines.push(`Tags: ${tags.join(", ")}`);
19548
+ lines.push("");
19549
+ lines.push("Provider options:");
19550
+ appendNamespace(lines, description.providerOptions.gateway);
19551
+ if (description.providerOptions.selectedProvider) {
19552
+ appendNamespace(lines, description.providerOptions.selectedProvider);
19553
+ }
19554
+ lines.push("");
19555
+ lines.push("Example input:");
19556
+ lines.push(JSON.stringify(description.exampleInput, null, 2));
19557
+ if (description.caveats.length) {
19558
+ lines.push("");
19559
+ lines.push("Caveats:");
19560
+ for (const caveat of description.caveats) {
19561
+ lines.push(`- ${caveat}`);
19562
+ }
19563
+ }
19564
+ return `${lines.join("\n")}
19565
+ `;
19566
+ }
19567
+ function appendNamespace(lines, namespace) {
19568
+ lines.push(`- ${namespace.provider} (${namespace.sourceSymbol})`);
19569
+ for (const field of namespace.fields) {
19570
+ const values = field.enumValues?.length ? ` (${field.enumValues.map((value) => JSON.stringify(value)).join(" | ")})` : "";
19571
+ lines.push(
19572
+ ` - ${field.name}: ${field.type}${values} - ${field.description}`
19573
+ );
19574
+ }
19575
+ }
19576
+ function stringField(value, key) {
19577
+ if (!value || typeof value !== "object" || Array.isArray(value)) return null;
19578
+ const candidate = value[key];
19579
+ return typeof candidate === "string" && candidate.trim() ? candidate.trim() : null;
19580
+ }
19581
+ function numberField(value, key) {
19582
+ if (!value || typeof value !== "object" || Array.isArray(value)) return null;
19583
+ const candidate = value[key];
19584
+ return typeof candidate === "number" ? candidate : null;
19585
+ }
19586
+ function arrayField(value, key) {
19587
+ if (!value || typeof value !== "object" || Array.isArray(value)) return [];
19588
+ const candidate = value[key];
19589
+ return Array.isArray(candidate) ? candidate : [];
19590
+ }
19591
+
19498
19592
  // src/cli/commands/tools.ts
19499
19593
  var TOOL_COMMAND_TEMPLATES = {
19500
19594
  describe: "deepline tools describe <toolId>",
@@ -19721,7 +19815,7 @@ function isPlayLikeTool(tool) {
19721
19815
  }
19722
19816
  function playReferenceForTool(tool) {
19723
19817
  const record = tool;
19724
- const declared = stringField(record, "playReference", "play_reference");
19818
+ const declared = stringField2(record, "playReference", "play_reference");
19725
19819
  if (declared.startsWith("prebuilt/")) {
19726
19820
  return declared;
19727
19821
  }
@@ -19864,9 +19958,13 @@ Examples:
19864
19958
  deepline tools describe hunter_email_verifier --schema-only
19865
19959
  deepline tools describe hunter_email_verifier --examples-only
19866
19960
  deepline tools describe hunter_email_verifier --json
19961
+ deepline tools describe deeplineagent --model openai/gpt-5.5 --json
19867
19962
  deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
19868
19963
  `
19869
- ).option("--json", "Emit JSON output. Also automatic when stdout is piped").option("--pricing-only", "Only print pricing and billing semantics").option("--schema-only", "Only print input schema fields").option(
19964
+ ).option("--json", "Emit JSON output. Also automatic when stdout is piped").option(
19965
+ "--model <model>",
19966
+ "For deeplineagent, include AI Gateway model/provider option metadata"
19967
+ ).option("--pricing-only", "Only print pricing and billing semantics").option("--schema-only", "Only print input schema fields").option(
19870
19968
  "--examples-only",
19871
19969
  "Only print runnable examples and sample payloads"
19872
19970
  ).option("--getters-only", "Only print extracted list/value getters").addOption(
@@ -19887,7 +19985,8 @@ Examples:
19887
19985
  pricingOnly: Boolean(options.pricingOnly),
19888
19986
  schemaOnly: Boolean(options.schemaOnly),
19889
19987
  examplesOnly: Boolean(options.examplesOnly),
19890
- gettersOnly: Boolean(options.gettersOnly)
19988
+ gettersOnly: Boolean(options.gettersOnly),
19989
+ model: typeof options.model === "string" ? options.model : void 0
19891
19990
  });
19892
19991
  });
19893
19992
  addToolMetadataCommand(tools.command("describe <toolId>").alias("get"));
@@ -19959,9 +20058,19 @@ async function getTool(toolId, options = {}) {
19959
20058
  }
19960
20059
  throw error;
19961
20060
  }
20061
+ const modelDescription = options.model && (toolId === "deeplineagent" || toolId === "ai_inference") ? await client2.describeModel(options.model) : null;
20062
+ if (options.model && !modelDescription) {
20063
+ console.error(
20064
+ "--model is only supported for deeplineagent and ai_inference."
20065
+ );
20066
+ return 2;
20067
+ }
19962
20068
  if (options.contractJson) {
19963
20069
  process.stdout.write(
19964
- `${JSON.stringify(toolContractJsonForDescribe(tool, toolId))}
20070
+ `${JSON.stringify({
20071
+ ...toolContractJsonForDescribe(tool, toolId),
20072
+ ...modelDescription ? { modelOptions: modelDescription } : {}
20073
+ })}
19965
20074
  `
19966
20075
  );
19967
20076
  return 0;
@@ -19969,7 +20078,10 @@ async function getTool(toolId, options = {}) {
19969
20078
  const emitJson = options.json === true;
19970
20079
  if (emitJson) {
19971
20080
  process.stdout.write(
19972
- `${JSON.stringify(toolMetadataJsonForDescribe(tool, toolId))}
20081
+ `${JSON.stringify({
20082
+ ...toolMetadataJsonForDescribe(tool, toolId),
20083
+ ...modelDescription ? { modelOptions: modelDescription } : {}
20084
+ })}
19973
20085
  `
19974
20086
  );
19975
20087
  return 0;
@@ -20004,16 +20116,27 @@ async function getTool(toolId, options = {}) {
20004
20116
  }
20005
20117
  if (options.compact) {
20006
20118
  printCompactToolContract(tool, toolId);
20119
+ if (modelDescription) {
20120
+ process.stdout.write(`
20121
+ ${formatModelDescription(modelDescription)}`);
20122
+ }
20007
20123
  return 0;
20008
20124
  }
20009
20125
  if (shouldEmitJson()) {
20010
20126
  process.stdout.write(
20011
- `${JSON.stringify(toolContractJsonForDescribe(tool, toolId))}
20127
+ `${JSON.stringify({
20128
+ ...toolContractJsonForDescribe(tool, toolId),
20129
+ ...modelDescription ? { modelOptions: modelDescription } : {}
20130
+ })}
20012
20131
  `
20013
20132
  );
20014
20133
  return 0;
20015
20134
  }
20016
20135
  printCompactToolContract(tool, toolId);
20136
+ if (modelDescription) {
20137
+ process.stdout.write(`
20138
+ ${formatModelDescription(modelDescription)}`);
20139
+ }
20017
20140
  return 0;
20018
20141
  }
20019
20142
  function toolContractJsonForDescribe(tool, requestedToolId) {
@@ -20028,18 +20151,18 @@ function toolContractJsonForDescribe(tool, requestedToolId) {
20028
20151
  "tool_execution_result"
20029
20152
  );
20030
20153
  const extractedLists = extractionContractEntries(
20031
- arrayField(toolExecutionResult, "extractedLists", "extracted_lists")
20154
+ arrayField2(toolExecutionResult, "extractedLists", "extracted_lists")
20032
20155
  );
20033
20156
  const extractedValues = extractionContractEntries(
20034
- arrayField(toolExecutionResult, "extractedValues", "extracted_values")
20157
+ arrayField2(toolExecutionResult, "extractedValues", "extracted_values")
20035
20158
  );
20036
20159
  const cost = recordField2(tool, "cost");
20037
- const deeplineCredits = numberField(
20160
+ const deeplineCredits = numberField2(
20038
20161
  tool,
20039
20162
  "deeplineCreditsPerPricingUnit",
20040
20163
  "deepline_credits_per_pricing_unit"
20041
20164
  );
20042
- const deeplineUsdPerPricingUnit = numberField(
20165
+ const deeplineUsdPerPricingUnit = numberField2(
20043
20166
  tool,
20044
20167
  "deeplineUsdPerPricingUnit",
20045
20168
  "deepline_usd_per_pricing_unit"
@@ -20067,8 +20190,8 @@ function toolContractJsonForDescribe(tool, requestedToolId) {
20067
20190
  ...Object.prototype.hasOwnProperty.call(field, "default") ? { default: field.default } : {}
20068
20191
  })),
20069
20192
  cost: {
20070
- pricingModel: stringField(cost, "pricingModel", "pricing_model") || null,
20071
- billingMode: stringField(cost, "billingMode", "billing_mode") || null,
20193
+ pricingModel: stringField2(cost, "pricingModel", "pricing_model") || null,
20194
+ billingMode: stringField2(cost, "billingMode", "billing_mode") || null,
20072
20195
  deeplineCreditsPerPricingUnit: deeplineCredits,
20073
20196
  deeplineUsdPerPricingUnit
20074
20197
  },
@@ -20083,8 +20206,8 @@ function toolContractJsonForDescribe(tool, requestedToolId) {
20083
20206
  function extractionContractEntries(entries) {
20084
20207
  return entries.flatMap((entry) => {
20085
20208
  if (!isRecord8(entry)) return [];
20086
- const name = stringField(entry, "name");
20087
- const expression = stringField(entry, "expression");
20209
+ const name = stringField2(entry, "name");
20210
+ const expression = stringField2(entry, "expression");
20088
20211
  return name && expression ? [{ name, expression }] : [];
20089
20212
  });
20090
20213
  }
@@ -20109,11 +20232,11 @@ function printCompactToolContract(tool, requestedToolId) {
20109
20232
  console.log("Inputs:");
20110
20233
  for (const field of inputFields) {
20111
20234
  if (!isRecord8(field)) continue;
20112
- const name = stringField(field, "name");
20235
+ const name = stringField2(field, "name");
20113
20236
  if (!name) continue;
20114
20237
  const required = field.required ? "*" : "";
20115
- const type = stringField(field, "type") || "unknown";
20116
- const description = stringField(field, "description");
20238
+ const type = stringField2(field, "type") || "unknown";
20239
+ const description = stringField2(field, "description");
20117
20240
  console.log(
20118
20241
  `- ${name}${required}: ${type}${description ? ` - ${description}` : ""}`
20119
20242
  );
@@ -20122,7 +20245,7 @@ function printCompactToolContract(tool, requestedToolId) {
20122
20245
  console.log("");
20123
20246
  printToolExamplesOnly(tool, requestedToolId, { includeSamples: false });
20124
20247
  const starterScript = isRecord8(contract.starterScript) ? contract.starterScript : {};
20125
- const starterPath = stringField(starterScript, "path");
20248
+ const starterPath = stringField2(starterScript, "path");
20126
20249
  if (starterPath) {
20127
20250
  console.log("");
20128
20251
  console.log(`Starter script: ${starterPath}`);
@@ -20137,14 +20260,14 @@ function printCompactToolContract(tool, requestedToolId) {
20137
20260
  for (const entry of listGetters) {
20138
20261
  if (isRecord8(entry))
20139
20262
  console.log(
20140
- `- ${stringField(entry, "name")}: ${playResultExpression(entry)}`
20263
+ `- ${stringField2(entry, "name")}: ${playResultExpression(entry)}`
20141
20264
  );
20142
20265
  }
20143
20266
  if (valueGetters.length) console.log("Values:");
20144
20267
  for (const entry of valueGetters) {
20145
20268
  if (isRecord8(entry))
20146
20269
  console.log(
20147
- `- ${stringField(entry, "name")}: ${playResultExpression(entry)}`
20270
+ `- ${stringField2(entry, "name")}: ${playResultExpression(entry)}`
20148
20271
  );
20149
20272
  }
20150
20273
  }
@@ -20156,11 +20279,11 @@ function printCompactToolContract(tool, requestedToolId) {
20156
20279
  function printToolPricingOnly(tool, requestedToolId, options = {}) {
20157
20280
  const contract = toolContractJsonForDescribe(tool, requestedToolId);
20158
20281
  const cost = isRecord8(contract.cost) ? contract.cost : {};
20159
- const pricingModel = stringField(cost, "pricingModel") || "unknown";
20160
- const billingMode = stringField(cost, "billingMode") || "unknown";
20282
+ const pricingModel = stringField2(cost, "pricingModel") || "unknown";
20283
+ const billingMode = stringField2(cost, "billingMode") || "unknown";
20161
20284
  const unit = pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit";
20162
- const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
20163
- const usd = numberField(cost, "deeplineUsdPerPricingUnit");
20285
+ const credits = numberField2(cost, "deeplineCreditsPerPricingUnit");
20286
+ const usd = numberField2(cost, "deeplineUsdPerPricingUnit");
20164
20287
  const price = credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable";
20165
20288
  console.log(`${options.heading ?? `Pricing: ${contract.toolId}`}: ${price}`);
20166
20289
  console.log(`Billing: ${billingMode}`);
@@ -20176,11 +20299,11 @@ function printToolSchemaOnly(tool, requestedToolId) {
20176
20299
  console.log("Inputs:");
20177
20300
  for (const field of inputFields) {
20178
20301
  if (!isRecord8(field)) continue;
20179
- const name = stringField(field, "name");
20302
+ const name = stringField2(field, "name");
20180
20303
  if (!name) continue;
20181
20304
  const required = field.required ? "*" : "";
20182
- const type = stringField(field, "type") || "unknown";
20183
- const description = stringField(field, "description");
20305
+ const type = stringField2(field, "type") || "unknown";
20306
+ const description = stringField2(field, "description");
20184
20307
  const defaultSuffix = Object.prototype.hasOwnProperty.call(field, "default") ? ` default=${JSON.stringify(field.default)}` : "";
20185
20308
  console.log(
20186
20309
  `- ${name}${required}: ${type}${defaultSuffix}${description ? ` - ${description}` : ""}`
@@ -20210,8 +20333,8 @@ function printToolExamplesOnly(tool, requestedToolId, options = {}) {
20210
20333
  const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
20211
20334
  const firstGetter = [...valueGetters, ...listGetters].find(isRecord8);
20212
20335
  if (firstGetter) {
20213
- const name = stringField(firstGetter, "name") || "value";
20214
- const expression = stringField(firstGetter, "expression");
20336
+ const name = stringField2(firstGetter, "name") || "value";
20337
+ const expression = stringField2(firstGetter, "expression");
20215
20338
  if (expression)
20216
20339
  console.log(
20217
20340
  `const ${safeIdentifier2(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
@@ -20259,7 +20382,7 @@ function printToolGettersOnly(tool, requestedToolId) {
20259
20382
  for (const entry of listGetters) {
20260
20383
  if (isRecord8(entry))
20261
20384
  console.log(
20262
- `- ${stringField(entry, "name")}: ${playResultExpression(entry)}`
20385
+ `- ${stringField2(entry, "name")}: ${playResultExpression(entry)}`
20263
20386
  );
20264
20387
  }
20265
20388
  }
@@ -20268,14 +20391,14 @@ function printToolGettersOnly(tool, requestedToolId) {
20268
20391
  for (const entry of valueGetters) {
20269
20392
  if (isRecord8(entry))
20270
20393
  console.log(
20271
- `- ${stringField(entry, "name")}: ${playResultExpression(entry)}`
20394
+ `- ${stringField2(entry, "name")}: ${playResultExpression(entry)}`
20272
20395
  );
20273
20396
  }
20274
20397
  }
20275
20398
  }
20276
20399
  function sampleValueForField(field) {
20277
- const name = stringField(field, "name").toLowerCase();
20278
- const type = stringField(field, "type").toLowerCase();
20400
+ const name = stringField2(field, "name").toLowerCase();
20401
+ const type = stringField2(field, "type").toLowerCase();
20279
20402
  if (Object.prototype.hasOwnProperty.call(field, "default"))
20280
20403
  return field.default;
20281
20404
  if (name.includes("email")) return "ada@example.com";
@@ -20293,7 +20416,7 @@ function samplePayloadForInputFields(fields) {
20293
20416
  return Object.fromEntries(
20294
20417
  fields.slice(0, 4).flatMap((field) => {
20295
20418
  if (!isRecord8(field)) return [];
20296
- const name = stringField(field, "name");
20419
+ const name = stringField2(field, "name");
20297
20420
  if (!name) return [];
20298
20421
  return [[name, sampleValueForField(field)]];
20299
20422
  })
@@ -20307,7 +20430,7 @@ function safeIdentifier2(name) {
20307
20430
  return cleaned || "value";
20308
20431
  }
20309
20432
  function playResultExpression(entry) {
20310
- return stringField(entry, "expression").replace(
20433
+ return stringField2(entry, "expression").replace(
20311
20434
  /^toolExecutionResult\./,
20312
20435
  "result."
20313
20436
  );
@@ -20326,7 +20449,7 @@ function toolMetadataJsonForDescribe(tool, requestedToolId) {
20326
20449
  "tool_execution_result"
20327
20450
  );
20328
20451
  const extractedLists = extractionContractEntries(
20329
- arrayField(toolExecutionResult, "extractedLists", "extracted_lists")
20452
+ arrayField2(toolExecutionResult, "extractedLists", "extracted_lists")
20330
20453
  );
20331
20454
  const starterScript = !isPlayLikeTool(tool) && extractedLists.length > 0 ? starterScriptJson(
20332
20455
  seedToolListScript({
@@ -20405,7 +20528,7 @@ function listedToolDescription(tool) {
20405
20528
  function formatListedToolCost(tool) {
20406
20529
  const record = tool;
20407
20530
  const pricing = recordField2(record, "pricing");
20408
- const displayText = stringField(pricing, "displayText", "display_text");
20531
+ const displayText = stringField2(pricing, "displayText", "display_text");
20409
20532
  return displayText ? `Cost: ${displayText}` : "";
20410
20533
  }
20411
20534
  function toolInputFieldsForDisplay(inputSchema) {
@@ -20471,21 +20594,21 @@ function formatUsd(value) {
20471
20594
  function isRecord8(value) {
20472
20595
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
20473
20596
  }
20474
- function stringField(source, ...keys) {
20597
+ function stringField2(source, ...keys) {
20475
20598
  for (const key of keys) {
20476
20599
  const value = source[key];
20477
20600
  if (typeof value === "string" && value.trim()) return value.trim();
20478
20601
  }
20479
20602
  return "";
20480
20603
  }
20481
- function numberField(source, ...keys) {
20604
+ function numberField2(source, ...keys) {
20482
20605
  for (const key of keys) {
20483
20606
  const value = source[key];
20484
20607
  if (typeof value === "number" && Number.isFinite(value)) return value;
20485
20608
  }
20486
20609
  return null;
20487
20610
  }
20488
- function arrayField(source, ...keys) {
20611
+ function arrayField2(source, ...keys) {
20489
20612
  for (const key of keys) {
20490
20613
  const value = source[key];
20491
20614
  if (Array.isArray(value)) return value;
package/dist/index.d.mts CHANGED
@@ -227,6 +227,35 @@ interface ToolDefinition {
227
227
  term?: string;
228
228
  }>;
229
229
  }
230
+ interface ModelProviderOptionField {
231
+ name: string;
232
+ type: 'string' | 'number' | 'boolean' | 'object' | 'array';
233
+ enumValues?: string[];
234
+ description: string;
235
+ caveat?: string;
236
+ }
237
+ interface ModelProviderOptionNamespace {
238
+ provider: string;
239
+ sourcePackage: string;
240
+ sourceSymbol: string;
241
+ fields: ModelProviderOptionField[];
242
+ }
243
+ interface DeeplineAgentModelDescription {
244
+ schemaVersion: 1;
245
+ model: string;
246
+ provider: string;
247
+ modelMetadata: Record<string, unknown> | null;
248
+ providerOptions: {
249
+ gateway: ModelProviderOptionNamespace;
250
+ selectedProvider?: ModelProviderOptionNamespace;
251
+ };
252
+ exampleInput: {
253
+ model: string;
254
+ providerOptions: Record<string, unknown>;
255
+ };
256
+ caveats: string[];
257
+ sources: string[];
258
+ }
230
259
  /**
231
260
  * Query options for ranked tool/provider discovery.
232
261
  */
@@ -1434,6 +1463,21 @@ declare class DeeplineClient {
1434
1463
  * ```
1435
1464
  */
1436
1465
  getTool(toolId: string): Promise<ToolMetadata>;
1466
+ /**
1467
+ * Describe a Deepline Agent model and its provider-specific option surface.
1468
+ *
1469
+ * Combines live AI Gateway model metadata with Deepline's generated AI SDK
1470
+ * provider option registry so agents can construct `providerOptions`
1471
+ * payloads before executing `deeplineagent`.
1472
+ *
1473
+ * The returned option schemas describe accepted provider option shapes, not
1474
+ * guaranteed support for every model. Runtime AI SDK/Gateway errors remain
1475
+ * authoritative for model-gated values.
1476
+ *
1477
+ * @param model - Gateway model id such as `"openai/gpt-5.5"`
1478
+ * @returns Model metadata, provider option shapes, and runnable examples
1479
+ */
1480
+ describeModel(model: string): Promise<DeeplineAgentModelDescription>;
1437
1481
  /**
1438
1482
  * Execute a tool and return the standard execution envelope.
1439
1483
  *
package/dist/index.d.ts CHANGED
@@ -227,6 +227,35 @@ interface ToolDefinition {
227
227
  term?: string;
228
228
  }>;
229
229
  }
230
+ interface ModelProviderOptionField {
231
+ name: string;
232
+ type: 'string' | 'number' | 'boolean' | 'object' | 'array';
233
+ enumValues?: string[];
234
+ description: string;
235
+ caveat?: string;
236
+ }
237
+ interface ModelProviderOptionNamespace {
238
+ provider: string;
239
+ sourcePackage: string;
240
+ sourceSymbol: string;
241
+ fields: ModelProviderOptionField[];
242
+ }
243
+ interface DeeplineAgentModelDescription {
244
+ schemaVersion: 1;
245
+ model: string;
246
+ provider: string;
247
+ modelMetadata: Record<string, unknown> | null;
248
+ providerOptions: {
249
+ gateway: ModelProviderOptionNamespace;
250
+ selectedProvider?: ModelProviderOptionNamespace;
251
+ };
252
+ exampleInput: {
253
+ model: string;
254
+ providerOptions: Record<string, unknown>;
255
+ };
256
+ caveats: string[];
257
+ sources: string[];
258
+ }
230
259
  /**
231
260
  * Query options for ranked tool/provider discovery.
232
261
  */
@@ -1434,6 +1463,21 @@ declare class DeeplineClient {
1434
1463
  * ```
1435
1464
  */
1436
1465
  getTool(toolId: string): Promise<ToolMetadata>;
1466
+ /**
1467
+ * Describe a Deepline Agent model and its provider-specific option surface.
1468
+ *
1469
+ * Combines live AI Gateway model metadata with Deepline's generated AI SDK
1470
+ * provider option registry so agents can construct `providerOptions`
1471
+ * payloads before executing `deeplineagent`.
1472
+ *
1473
+ * The returned option schemas describe accepted provider option shapes, not
1474
+ * guaranteed support for every model. Runtime AI SDK/Gateway errors remain
1475
+ * authoritative for model-gated values.
1476
+ *
1477
+ * @param model - Gateway model id such as `"openai/gpt-5.5"`
1478
+ * @returns Model metadata, provider option shapes, and runnable examples
1479
+ */
1480
+ describeModel(model: string): Promise<DeeplineAgentModelDescription>;
1437
1481
  /**
1438
1482
  * Execute a tool and return the standard execution envelope.
1439
1483
  *
package/dist/index.js CHANGED
@@ -284,10 +284,10 @@ var SDK_RELEASE = {
284
284
  // 0.1.108 ships explicit dataset column/tool recompute policy and removes
285
285
  // the SDK enrich generator's one-second stale policy.
286
286
  // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
287
- version: "0.1.140",
287
+ version: "0.1.141",
288
288
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
289
289
  supportPolicy: {
290
- latest: "0.1.140",
290
+ latest: "0.1.141",
291
291
  minimumSupported: "0.1.53",
292
292
  deprecatedBelow: "0.1.53",
293
293
  commandMinimumSupported: [
@@ -1048,6 +1048,10 @@ function normalizeStepProgress(value) {
1048
1048
  ...optionalFiniteNumber(value.completed) !== void 0 ? { completed: optionalFiniteNumber(value.completed) } : {},
1049
1049
  ...optionalFiniteNumber(value.total) !== void 0 ? { total: optionalFiniteNumber(value.total) } : {},
1050
1050
  ...optionalFiniteNumber(value.failed) !== void 0 ? { failed: optionalFiniteNumber(value.failed) } : {},
1051
+ ...optionalFiniteNumber(value.startedRows) !== void 0 ? { startedRows: optionalFiniteNumber(value.startedRows) } : {},
1052
+ ...optionalFiniteNumber(value.activeRows) !== void 0 ? { activeRows: optionalFiniteNumber(value.activeRows) } : {},
1053
+ ...optionalFiniteNumber(value.waitingRows) !== void 0 ? { waitingRows: optionalFiniteNumber(value.waitingRows) } : {},
1054
+ ...optionalFiniteNumber(value.completedRows) !== void 0 ? { completedRows: optionalFiniteNumber(value.completedRows) } : {},
1051
1055
  ...optionalString(value.message) ? { message: optionalString(value.message) } : {},
1052
1056
  ...optionalNullableString(value.artifactTableNamespace) !== void 0 ? {
1053
1057
  artifactTableNamespace: optionalNullableString(
@@ -1130,6 +1134,10 @@ function buildSnapshotFromLedger(snapshot) {
1130
1134
  completed: step.progress.completed,
1131
1135
  total: step.progress.total,
1132
1136
  failed: step.progress.failed,
1137
+ startedRows: step.progress.startedRows,
1138
+ activeRows: step.progress.activeRows,
1139
+ waitingRows: step.progress.waitingRows,
1140
+ completedRows: step.progress.completedRows,
1133
1141
  message: step.progress.message,
1134
1142
  artifactTableNamespace: step.progress.artifactTableNamespace ?? step.artifactTableNamespace ?? null,
1135
1143
  startedAt: step.startedAt ?? null,
@@ -1326,6 +1334,10 @@ function diffPlayRunStreamEvents(input) {
1326
1334
  completed: state.progress.completed,
1327
1335
  total: state.progress.total,
1328
1336
  failed: state.progress.failed,
1337
+ startedRows: state.progress.startedRows,
1338
+ activeRows: state.progress.activeRows,
1339
+ waitingRows: state.progress.waitingRows,
1340
+ completedRows: state.progress.completedRows,
1329
1341
  message: state.progress.message,
1330
1342
  artifactTableNamespace: state.progress.artifactTableNamespace ?? state.artifactTableNamespace ?? null,
1331
1343
  ...resolveTimingWindow({
@@ -2163,6 +2175,28 @@ var DeeplineClient = class {
2163
2175
  }
2164
2176
  );
2165
2177
  }
2178
+ /**
2179
+ * Describe a Deepline Agent model and its provider-specific option surface.
2180
+ *
2181
+ * Combines live AI Gateway model metadata with Deepline's generated AI SDK
2182
+ * provider option registry so agents can construct `providerOptions`
2183
+ * payloads before executing `deeplineagent`.
2184
+ *
2185
+ * The returned option schemas describe accepted provider option shapes, not
2186
+ * guaranteed support for every model. Runtime AI SDK/Gateway errors remain
2187
+ * authoritative for model-gated values.
2188
+ *
2189
+ * @param model - Gateway model id such as `"openai/gpt-5.5"`
2190
+ * @returns Model metadata, provider option shapes, and runnable examples
2191
+ */
2192
+ async describeModel(model) {
2193
+ return this.http.request(
2194
+ `/api/v2/models/describe?model=${encodeURIComponent(model)}`,
2195
+ {
2196
+ method: "GET"
2197
+ }
2198
+ );
2199
+ }
2166
2200
  /**
2167
2201
  * Execute a tool and return the standard execution envelope.
2168
2202
  *