deepline 0.1.155 → 0.1.157

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.
@@ -642,10 +642,10 @@ var SDK_RELEASE = {
642
642
  // 0.1.111 ships dataset-native tool list getters and result row datasets.
643
643
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
644
644
  // fields shipped in 0.1.153.
645
- version: "0.1.155",
645
+ version: "0.1.157",
646
646
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
647
647
  supportPolicy: {
648
- latest: "0.1.155",
648
+ latest: "0.1.157",
649
649
  minimumSupported: "0.1.53",
650
650
  deprecatedBelow: "0.1.53",
651
651
  commandMinimumSupported: [
@@ -7636,15 +7636,19 @@ Examples:
7636
7636
 
7637
7637
  // src/cli/commands/enrich.ts
7638
7638
  import {
7639
+ copyFile,
7640
+ lstat,
7639
7641
  mkdir as mkdir3,
7640
7642
  mkdtemp,
7641
7643
  readFile,
7644
+ realpath,
7645
+ rename,
7642
7646
  rm,
7643
7647
  stat,
7644
7648
  writeFile as writeFile3
7645
7649
  } from "fs/promises";
7646
7650
  import { homedir as homedir7, tmpdir as tmpdir2 } from "os";
7647
- import { join as join7, resolve as resolve9 } from "path";
7651
+ import { dirname as dirname7, join as join7, resolve as resolve9 } from "path";
7648
7652
 
7649
7653
  // src/cli/commands/play.ts
7650
7654
  import { createHash as createHash2 } from "crypto";
@@ -9388,7 +9392,7 @@ async function traceCliSpan(phase, fields, run) {
9388
9392
  var EXTRACTED_GETTER_ERROR_HINT = "Deepline hint: extractedValues/extractedLists .get() only works for declared Deepline getters listed by `deepline tools describe <tool> --json`. Use `toolExecutionResult.toolResponse.raw` for provider/tool-specific fields.";
9389
9393
  var DATASET_API_HINT = "Deepline hint: PlayDataset is lazy and durable. Use `.peek(n)` for a small preview or `.materialize()` when you intentionally need rows in memory; do not use `.rows`, `.toArray()`, or array methods directly on the dataset handle.";
9390
9394
  var ROW_PROPERTY_HINT = "Deepline hint: this row type only contains fields produced by the CSV/schema and previous map steps. Check source column casing and the exact output field names from earlier steps before scaling.";
9391
- var TOOLS_EXECUTE_SIGNATURE_HINT = "Deepline hint: ctx.tools.execute requires a request object: `ctx.tools.execute({ id, tool, input, description })`. The stable `id` is required for replay-safe receipts.";
9395
+ var TOOLS_EXECUTE_SIGNATURE_HINT = "Deepline hint: ctx.tools.execute requires a request object: `ctx.tools.execute({ id, tool, input, description })`. The stable `id` is required for logs, metadata, and receipt attachment; provider-call reuse is based on play, tool, semantic input, auth scope, provider action version, and cache policy.";
9392
9396
  var RUN_PLAY_SIGNATURE_HINT = "Deepline hint: ctx.runPlay uses a stable key plus a composable child play reference. Direct-run-only or map-backed batch plays must be run directly, exported, then consumed by a separate play.";
9393
9397
  var MAP_BACKED_CHILD_HINT = "Deepline hint: map-backed child plays own durable table state and cannot be called from another play. Run that play directly, export its dataset, then pass the CSV to the next play.";
9394
9398
  function sourceLineForError(sourceCode, error) {
@@ -12863,7 +12867,7 @@ function writeStartedPlayRun(input2) {
12863
12867
  );
12864
12868
  }
12865
12869
  function parsePlayRunOptions(args) {
12866
- const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--full] [--<input> value]\n --profile defaults to workers_edge; pass hatchet explicitly for Hatchet runtime comparison.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotency, tool call id, and ctx.dataset guidance.";
12870
+ const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--full] [--<input> value]\n --profile defaults to workers_edge; pass hatchet explicitly for Hatchet runtime comparison.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and ctx.dataset guidance.";
12867
12871
  let filePath = null;
12868
12872
  let playName = null;
12869
12873
  let input2 = null;
@@ -14719,10 +14723,15 @@ Notes:
14719
14723
  This command starts cloud work and may spend Deepline credits through tool calls.
14720
14724
 
14721
14725
  Idempotent execution:
14722
- Stable tool call ids are the reuse key:
14726
+ Durable tool-call reuse is based on the actual external call identity:
14727
+ same play, tool, semantic input, auth scope, provider action version, and
14728
+ cache policy.
14723
14729
 
14724
14730
  await ctx.tools.execute({ id: 'company_lookup', tool, input });
14725
14731
 
14732
+ The authored id is still required for readable logs, metadata, and receipt
14733
+ attachment, but renaming it alone does not rebuy the same provider request.
14734
+
14726
14735
  For rows, use ctx.dataset plus a stable row key:
14727
14736
 
14728
14737
  const rows = await ctx
@@ -14734,8 +14743,7 @@ Idempotent execution:
14734
14743
  }))
14735
14744
  .run({ key: 'domain' });
14736
14745
 
14737
- Reuse needs the same play, call id, semantic input, auth scope, and cache
14738
- policy. Dataset cells are storage; put freshness on the actual call:
14746
+ Dataset cells are storage; put freshness on the actual call:
14739
14747
 
14740
14748
  await ctx.tools.execute({
14741
14749
  id: 'find_cto',
@@ -17656,7 +17664,7 @@ async function buildEnrichFailureReport(input2) {
17656
17664
  rows: input2.rows,
17657
17665
  rowRange: input2.rowRange,
17658
17666
  client: input2.client,
17659
- outputPath: input2.exportResult?.path ?? input2.outputPath ?? null,
17667
+ outputPath: input2.reportOutputPath ?? input2.exportResult?.path ?? input2.outputPath ?? null,
17660
17668
  status: input2.status
17661
17669
  });
17662
17670
  }
@@ -18945,7 +18953,7 @@ function registerEnrichCommand(program) {
18945
18953
  return;
18946
18954
  }
18947
18955
  const rows = parseRows(options.rows, options.all);
18948
- const outputPath = options.inPlace ? inputCsv : options.output;
18956
+ let outputPath = options.inPlace ? inputCsv : options.output;
18949
18957
  const sourceCsvPath = !options.inPlace && outputPath && await regularFileExists(outputPath) ? outputPath : inputCsv;
18950
18958
  const forceAliases = resolveForceAliases(config, options);
18951
18959
  for (const alias of collectFailedInputAliases(
@@ -18963,8 +18971,39 @@ function registerEnrichCommand(program) {
18963
18971
  });
18964
18972
  const tempDir = await mkdtemp(join7(tmpdir2(), "deepline-enrich-play-"));
18965
18973
  const tempPlay = join7(tempDir, "deepline-enrich.play.ts");
18974
+ let inPlaceTempDir = null;
18975
+ let inPlaceTempOutputPath = null;
18976
+ const inPlaceFinalOutputPath = options.inPlace ? resolve9(inputCsv) : null;
18977
+ const inPlaceCommitOutputPath = options.inPlace ? (await lstat(inputCsv)).isSymbolicLink() ? await realpath(inputCsv) : inPlaceFinalOutputPath : null;
18978
+ const failureReportOutputPath = options.inPlace ? inPlaceFinalOutputPath : null;
18979
+ let inPlaceCommitted = false;
18980
+ const commitInPlaceOutput = async (exportResult) => {
18981
+ if (!inPlaceTempOutputPath || !inPlaceCommitOutputPath || !inPlaceFinalOutputPath) {
18982
+ return exportResult;
18983
+ }
18984
+ await rename(inPlaceTempOutputPath, inPlaceCommitOutputPath);
18985
+ inPlaceCommitted = true;
18986
+ if (!exportResult) {
18987
+ return null;
18988
+ }
18989
+ return {
18990
+ ...exportResult,
18991
+ path: inPlaceFinalOutputPath
18992
+ };
18993
+ };
18966
18994
  try {
18967
18995
  await writeFile3(tempPlay, playSource, "utf8");
18996
+ if (options.inPlace) {
18997
+ inPlaceTempDir = await mkdtemp(
18998
+ join7(
18999
+ dirname7(inPlaceCommitOutputPath ?? resolve9(inputCsv)),
19000
+ ".deepline-enrich-in-place-"
19001
+ )
19002
+ );
19003
+ inPlaceTempOutputPath = join7(inPlaceTempDir, "output.csv");
19004
+ await copyFile(resolve9(inputCsv), inPlaceTempOutputPath);
19005
+ outputPath = inPlaceTempOutputPath;
19006
+ }
18968
19007
  const runOne = async (input2) => {
18969
19008
  const runtimeInput = {
18970
19009
  file: resolve9(input2.sourceCsvPath),
@@ -19061,10 +19100,10 @@ function registerEnrichCommand(program) {
19061
19100
  rows: chunkRows
19062
19101
  },
19063
19102
  result: chunk.status,
19064
- output: enrichOutputJson(chunk.exportResult)
19103
+ output: options.inPlace ? null : enrichOutputJson(chunk.exportResult)
19065
19104
  });
19066
19105
  } else {
19067
- if (chunk.exportResult) {
19106
+ if (chunk.exportResult && !options.inPlace) {
19068
19107
  process.stderr.write(
19069
19108
  `Wrote ${chunk.exportResult.rows} row(s) to ${chunk.exportResult.path}${chunk.exportResult.partial ? " (partial run output)" : ""}
19070
19109
  `
@@ -19096,15 +19135,18 @@ function registerEnrichCommand(program) {
19096
19135
  rowEnd: selectedRange.end
19097
19136
  },
19098
19137
  client: client2,
19099
- outputPath,
19138
+ outputPath: failureReportOutputPath ?? finalExportResult?.path ?? outputPath,
19100
19139
  status: lastStatus
19101
19140
  });
19141
+ if (!failureReport2) {
19142
+ finalExportResult = await commitInPlaceOutput(finalExportResult);
19143
+ }
19102
19144
  if (options.json) {
19103
19145
  const run = rewriteEnrichJsonStatus({
19104
19146
  status: lastStatus,
19105
19147
  config,
19106
19148
  forceAliases,
19107
- output: finalExportResult ? {
19149
+ output: finalExportResult && (!failureReport2 || !options.inPlace) ? {
19108
19150
  ...finalExportResult,
19109
19151
  sourceCsvRows: selectedRange.sourceRows,
19110
19152
  selectedRows: selectedRange.count,
@@ -19122,7 +19164,7 @@ function registerEnrichCommand(program) {
19122
19164
  chunkRows: ENRICH_AUTO_BATCH_ROWS,
19123
19165
  selectedRows: selectedRange.count
19124
19166
  },
19125
- output: finalExportResult ? {
19167
+ output: finalExportResult && (!failureReport2 || !options.inPlace) ? {
19126
19168
  sourceCsvRows: selectedRange.sourceRows,
19127
19169
  selectedRows: selectedRange.count,
19128
19170
  enrichedRows: totalEnrichedRows,
@@ -19149,7 +19191,7 @@ function registerEnrichCommand(program) {
19149
19191
  });
19150
19192
  const rowsForFailureReport = exportResult?.enrichedDataRows ?? extractCanonicalRowsInfo(status)?.rows ?? [];
19151
19193
  if (captured.result !== 0) {
19152
- if (exportResult) {
19194
+ if (exportResult && !options.inPlace) {
19153
19195
  process.stderr.write(
19154
19196
  `Wrote ${exportResult.rows} row(s) to ${exportResult.path}${exportResult.partial ? " (partial run output)" : ""}
19155
19197
  `
@@ -19162,13 +19204,14 @@ function registerEnrichCommand(program) {
19162
19204
  client: client2,
19163
19205
  exportResult,
19164
19206
  outputPath,
19207
+ reportOutputPath: failureReportOutputPath,
19165
19208
  status
19166
19209
  });
19167
19210
  if (options.json) {
19168
19211
  printJson({
19169
19212
  ok: false,
19170
19213
  run: status,
19171
- output: enrichOutputJson(exportResult),
19214
+ output: options.inPlace ? null : enrichOutputJson(exportResult),
19172
19215
  ...failureReport2 ? {
19173
19216
  failure_report: {
19174
19217
  path: failureReport2.path,
@@ -19188,19 +19231,21 @@ function registerEnrichCommand(program) {
19188
19231
  client: client2,
19189
19232
  exportResult,
19190
19233
  outputPath,
19234
+ reportOutputPath: failureReportOutputPath,
19191
19235
  status
19192
19236
  });
19237
+ const committedExportResult2 = failureReport2 ? exportResult : await commitInPlaceOutput(exportResult);
19193
19238
  const run = rewriteEnrichJsonStatus({
19194
19239
  status,
19195
19240
  config,
19196
19241
  forceAliases,
19197
- output: exportResult,
19242
+ output: failureReport2 && options.inPlace ? null : committedExportResult2,
19198
19243
  failureReport: failureReport2
19199
19244
  });
19200
19245
  printJson({
19201
19246
  ok: !failureReport2,
19202
19247
  run,
19203
- output: enrichOutputJson(exportResult),
19248
+ output: failureReport2 && options.inPlace ? null : enrichOutputJson(committedExportResult2),
19204
19249
  ...failureReport2 ? {
19205
19250
  failure_report: {
19206
19251
  path: failureReport2.path,
@@ -19213,32 +19258,38 @@ function registerEnrichCommand(program) {
19213
19258
  }
19214
19259
  return;
19215
19260
  }
19216
- if (exportResult) {
19261
+ const failureReport = await maybeEmitEnrichFailureReport({
19262
+ config,
19263
+ rows: rowsForFailureReport,
19264
+ rowRange: rows,
19265
+ client: client2,
19266
+ outputPath: failureReportOutputPath ?? exportResult?.path ?? null,
19267
+ status
19268
+ });
19269
+ const committedExportResult = failureReport ? options.inPlace ? null : exportResult : await commitInPlaceOutput(exportResult);
19270
+ if (committedExportResult) {
19217
19271
  process.stderr.write(
19218
- `Wrote ${exportResult.rows} row(s) to ${exportResult.path}
19272
+ `Wrote ${committedExportResult.rows} row(s) to ${committedExportResult.path}
19219
19273
  `
19220
19274
  );
19221
19275
  const waterfallSummaryLines = buildEnrichWaterfallSummaryLines(
19222
19276
  config,
19223
- exportResult.enrichedDataRows
19277
+ committedExportResult.enrichedDataRows
19224
19278
  );
19225
19279
  if (waterfallSummaryLines.length > 0) {
19226
19280
  process.stdout.write(`${waterfallSummaryLines.join("\n")}
19227
19281
  `);
19228
19282
  }
19229
19283
  }
19230
- const failureReport = await maybeEmitEnrichFailureReport({
19231
- config,
19232
- rows: rowsForFailureReport,
19233
- rowRange: rows,
19234
- client: client2,
19235
- outputPath: exportResult?.path ?? outputPath ?? null,
19236
- status
19237
- });
19238
19284
  if (failureReport) {
19239
19285
  process.exitCode = EXIT_SERVER2;
19240
19286
  }
19241
19287
  } finally {
19288
+ if (inPlaceTempDir) {
19289
+ await rm(inPlaceTempDir, { recursive: true, force: true });
19290
+ } else if (inPlaceTempOutputPath && !inPlaceCommitted) {
19291
+ await rm(inPlaceTempOutputPath, { force: true });
19292
+ }
19242
19293
  await rm(tempDir, { recursive: true, force: true });
19243
19294
  }
19244
19295
  });
@@ -19298,7 +19349,7 @@ import {
19298
19349
  writeFileSync as writeFileSync10
19299
19350
  } from "fs";
19300
19351
  import { homedir as homedir8, platform } from "os";
19301
- import { basename as basename2, dirname as dirname7, join as join8, resolve as resolve10 } from "path";
19352
+ import { basename as basename2, dirname as dirname8, join as join8, resolve as resolve10 } from "path";
19302
19353
  import { gzipSync } from "zlib";
19303
19354
  import { randomUUID as randomUUID2 } from "crypto";
19304
19355
  var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -19810,9 +19861,9 @@ function loadViewerAssets() {
19810
19861
  const cliEntry = process.argv[1]?.trim() ? resolve10(process.argv[1]) : null;
19811
19862
  const candidateRoots2 = [
19812
19863
  ...cliEntry ? [
19813
- join8(dirname7(dirname7(cliEntry)), "viewer"),
19864
+ join8(dirname8(dirname8(cliEntry)), "viewer"),
19814
19865
  join8(
19815
- dirname7(dirname7(dirname7(cliEntry))),
19866
+ dirname8(dirname8(dirname8(cliEntry))),
19816
19867
  "src",
19817
19868
  "lib",
19818
19869
  "cli",
@@ -19861,7 +19912,7 @@ async function handleSessionsRender(options) {
19861
19912
  targets.length > 1 ? "session-viewer.html" : `session-${targets[0]?.sessionId}.html`
19862
19913
  );
19863
19914
  } else {
19864
- mkdirSync6(dirname7(outputPath), { recursive: true });
19915
+ mkdirSync6(dirname8(outputPath), { recursive: true });
19865
19916
  }
19866
19917
  const sessions = targets.map((target) => ({
19867
19918
  label: target.label,
@@ -21336,7 +21387,7 @@ Examples:
21336
21387
  // src/cli/commands/switch.ts
21337
21388
  import { existsSync as existsSync9, mkdirSync as mkdirSync7, readFileSync as readFileSync9, writeFileSync as writeFileSync11 } from "fs";
21338
21389
  import { homedir as homedir9 } from "os";
21339
- import { dirname as dirname8, join as join9 } from "path";
21390
+ import { dirname as dirname9, join as join9 } from "path";
21340
21391
  function hostSlugFromBaseUrl(baseUrl) {
21341
21392
  try {
21342
21393
  const url = new URL(baseUrl);
@@ -21376,7 +21427,7 @@ function readActiveFamily() {
21376
21427
  }
21377
21428
  function writeActiveFamily(family) {
21378
21429
  const path = activeFamilyPath();
21379
- mkdirSync7(dirname8(path), { recursive: true });
21430
+ mkdirSync7(dirname9(path), { recursive: true });
21380
21431
  writeFileSync11(path, `${family}
21381
21432
  `, "utf-8");
21382
21433
  return path;
@@ -21513,7 +21564,7 @@ import {
21513
21564
  writeSync
21514
21565
  } from "fs";
21515
21566
  import { homedir as homedir10 } from "os";
21516
- import { dirname as dirname9, join as join10 } from "path";
21567
+ import { dirname as dirname10, join as join10 } from "path";
21517
21568
  function isPlainObject(value) {
21518
21569
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
21519
21570
  }
@@ -21652,7 +21703,7 @@ function writeJsonOutputFile(payload, stem) {
21652
21703
  }
21653
21704
  function writeCsvOutputFile(rows, stem, options) {
21654
21705
  const outputPath = options?.outPath ? options.outPath : join10(ensureOutputDir(), `${stem}_${Date.now()}.csv`);
21655
- mkdirSync8(dirname9(outputPath), { recursive: true });
21706
+ mkdirSync8(dirname10(outputPath), { recursive: true });
21656
21707
  const columns = columnsForRows(rows);
21657
21708
  const escapeCell = (value) => {
21658
21709
  const normalized = value == null ? "" : typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value) : JSON.stringify(value);
@@ -23316,7 +23367,7 @@ async function executeTool(args) {
23316
23367
 
23317
23368
  // src/cli/commands/workflow.ts
23318
23369
  import { mkdir as mkdir4, readFile as readFile2, writeFile as writeFile4 } from "fs/promises";
23319
- import { dirname as dirname10, join as join12, resolve as resolve12 } from "path";
23370
+ import { dirname as dirname11, join as join12, resolve as resolve12 } from "path";
23320
23371
 
23321
23372
  // src/cli/workflow-to-play.ts
23322
23373
  import { createHash as createHash3 } from "crypto";
@@ -23595,7 +23646,7 @@ async function transformOne(api, workflowId, outDir, publish) {
23595
23646
  { workflowName: workflow.name, version: revision.version }
23596
23647
  );
23597
23648
  const file = join12(resolve12(outDir), `${compiled.playName}.play.ts`);
23598
- await mkdir4(dirname10(file), { recursive: true });
23649
+ await mkdir4(dirname11(file), { recursive: true });
23599
23650
  await writeFile4(file, compiled.sourceCode, "utf8");
23600
23651
  let published = false;
23601
23652
  if (publish) {
@@ -23853,12 +23904,12 @@ import {
23853
23904
  writeFileSync as writeFileSync15
23854
23905
  } from "fs";
23855
23906
  import { homedir as homedir11 } from "os";
23856
- import { dirname as dirname12, isAbsolute as isAbsolute2, join as join14, relative as relative2, resolve as resolve13 } from "path";
23907
+ import { dirname as dirname13, isAbsolute as isAbsolute2, join as join14, relative as relative2, resolve as resolve13 } from "path";
23857
23908
 
23858
23909
  // src/cli/skills-sync.ts
23859
23910
  import { spawn as spawn3, spawnSync as spawnSync2 } from "child_process";
23860
23911
  import { existsSync as existsSync11, mkdirSync as mkdirSync9, readFileSync as readFileSync11, writeFileSync as writeFileSync14 } from "fs";
23861
- import { dirname as dirname11, join as join13 } from "path";
23912
+ import { dirname as dirname12, join as join13 } from "path";
23862
23913
 
23863
23914
  // ../shared_libs/cli/install-commands.json
23864
23915
  var install_commands_default = {
@@ -23992,7 +24043,7 @@ function sdkSkillsVersionPath(baseUrl) {
23992
24043
  return join13(sdkCliStateDirPath(baseUrl), "skills-version");
23993
24044
  }
23994
24045
  function legacySdkSkillsVersionPath(baseUrl) {
23995
- return join13(dirname11(sdkCliStateDirPath(baseUrl)), "sdk-skills", ".version");
24046
+ return join13(dirname12(sdkCliStateDirPath(baseUrl)), "sdk-skills", ".version");
23996
24047
  }
23997
24048
  function readSdkSkillsLocalVersion(baseUrl) {
23998
24049
  const pluginVersion = readPluginSkillsVersion();
@@ -24007,7 +24058,7 @@ function readSdkSkillsLocalVersion(baseUrl) {
24007
24058
  }
24008
24059
  function writeLocalSkillsVersion(baseUrl, version) {
24009
24060
  const path = sdkSkillsVersionPath(baseUrl);
24010
- mkdirSync9(dirname11(path), { recursive: true });
24061
+ mkdirSync9(dirname12(path), { recursive: true });
24011
24062
  writeFileSync14(path, `${version}
24012
24063
  `, "utf-8");
24013
24064
  }
@@ -24336,7 +24387,7 @@ function findRepoBackedSdkRoot(startPath) {
24336
24387
  if (existsSync12(join14(current, "sdk", "package.json")) && existsSync12(join14(current, "sdk", "bin", "deepline-dev.ts"))) {
24337
24388
  return current;
24338
24389
  }
24339
- const parent = dirname12(current);
24390
+ const parent = dirname13(current);
24340
24391
  if (parent === current) return null;
24341
24392
  current = parent;
24342
24393
  }
@@ -24366,7 +24417,7 @@ function resolveUpdatePlan(options = {}) {
24366
24417
  const env = options.env ?? process.env;
24367
24418
  const homeDir2 = options.homeDir ?? homedir11();
24368
24419
  const entrypoint = options.entrypoint ?? (process.argv[1] ? resolve13(process.argv[1]) : "");
24369
- const sourceRoot = entrypoint ? findRepoBackedSdkRoot(dirname12(entrypoint)) : null;
24420
+ const sourceRoot = entrypoint ? findRepoBackedSdkRoot(dirname13(entrypoint)) : null;
24370
24421
  if (sourceRoot) {
24371
24422
  return {
24372
24423
  kind: "source",
@@ -24445,7 +24496,7 @@ function writeAutoUpdateFailure(plan, exitCode) {
24445
24496
  manualCommand: plan.manualCommand
24446
24497
  };
24447
24498
  try {
24448
- mkdirSync10(dirname12(path), { recursive: true });
24499
+ mkdirSync10(dirname13(path), { recursive: true });
24449
24500
  writeFileSync15(path, `${JSON.stringify(marker, null, 2)}
24450
24501
  `, "utf8");
24451
24502
  } catch {
@@ -24540,7 +24591,7 @@ function runCommand(command, args, env = process.env, options = {}) {
24540
24591
  });
24541
24592
  }
24542
24593
  function writeSidecarLauncher(input2) {
24543
- mkdirSync10(dirname12(input2.path), { recursive: true });
24594
+ mkdirSync10(dirname13(input2.path), { recursive: true });
24544
24595
  if (process.platform === "win32") {
24545
24596
  writeFileSync15(
24546
24597
  input2.path,
@@ -24577,7 +24628,7 @@ async function runPythonSidecarUpdatePlan(plan, options = {}) {
24577
24628
  writeFileSync15(join14(tempDir, "package.json"), NPM_SDK_SIDECAR_PACKAGE_JSON);
24578
24629
  const env = {
24579
24630
  ...process.env,
24580
- PATH: `${dirname12(plan.nodeBin)}${process.platform === "win32" ? ";" : ":"}${process.env.PATH ?? ""}`
24631
+ PATH: `${dirname13(plan.nodeBin)}${process.platform === "win32" ? ";" : ":"}${process.env.PATH ?? ""}`
24581
24632
  };
24582
24633
  const installExitCode = await runCommand(
24583
24634
  plan.npmCommand,
package/dist/index.d.mts CHANGED
@@ -2914,12 +2914,14 @@ type LoosePlayObject = {
2914
2914
  * Keyword-style request object for `ctx.tools.execute(...)`.
2915
2915
  *
2916
2916
  * The `tool` value comes from live tool discovery. The `id` is the stable
2917
- * logical call name inside this play and participates in replay/idempotency.
2917
+ * logical call name used for logs, metadata, and receipt attachment. Provider
2918
+ * call reuse is keyed by play, tool, semantic input, auth scope, provider action
2919
+ * version, and cache policy.
2918
2920
  *
2919
2921
  * @sdkReference runtime 160
2920
2922
  */
2921
2923
  type ToolExecutionRequest = {
2922
- /** Stable logical id for this tool call within the play. */
2924
+ /** Stable logical id for logs, metadata, and receipt attachment. */
2923
2925
  id: string;
2924
2926
  /** Current tool id from `deepline tools search` / `deepline tools describe`. */
2925
2927
  tool: string;
package/dist/index.d.ts CHANGED
@@ -2914,12 +2914,14 @@ type LoosePlayObject = {
2914
2914
  * Keyword-style request object for `ctx.tools.execute(...)`.
2915
2915
  *
2916
2916
  * The `tool` value comes from live tool discovery. The `id` is the stable
2917
- * logical call name inside this play and participates in replay/idempotency.
2917
+ * logical call name used for logs, metadata, and receipt attachment. Provider
2918
+ * call reuse is keyed by play, tool, semantic input, auth scope, provider action
2919
+ * version, and cache policy.
2918
2920
  *
2919
2921
  * @sdkReference runtime 160
2920
2922
  */
2921
2923
  type ToolExecutionRequest = {
2922
- /** Stable logical id for this tool call within the play. */
2924
+ /** Stable logical id for logs, metadata, and receipt attachment. */
2923
2925
  id: string;
2924
2926
  /** Current tool id from `deepline tools search` / `deepline tools describe`. */
2925
2927
  tool: string;
package/dist/index.js CHANGED
@@ -421,10 +421,10 @@ var SDK_RELEASE = {
421
421
  // 0.1.111 ships dataset-native tool list getters and result row datasets.
422
422
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
423
423
  // fields shipped in 0.1.153.
424
- version: "0.1.155",
424
+ version: "0.1.157",
425
425
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
426
426
  supportPolicy: {
427
- latest: "0.1.155",
427
+ latest: "0.1.157",
428
428
  minimumSupported: "0.1.53",
429
429
  deprecatedBelow: "0.1.53",
430
430
  commandMinimumSupported: [
package/dist/index.mjs CHANGED
@@ -351,10 +351,10 @@ var SDK_RELEASE = {
351
351
  // 0.1.111 ships dataset-native tool list getters and result row datasets.
352
352
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
353
353
  // fields shipped in 0.1.153.
354
- version: "0.1.155",
354
+ version: "0.1.157",
355
355
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
356
356
  supportPolicy: {
357
- latest: "0.1.155",
357
+ latest: "0.1.157",
358
358
  minimumSupported: "0.1.53",
359
359
  deprecatedBelow: "0.1.53",
360
360
  commandMinimumSupported: [