deepline 0.1.158 → 0.1.160

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.
@@ -1,11 +1,14 @@
1
1
  import {
2
2
  chooseMapChunkSize,
3
+ EXECUTION_PLAN_DEFAULTS,
3
4
  type ExecutionPlan,
4
5
  } from '../../../../shared_libs/play-runtime/execution-plan';
5
6
  import { TOOL_CALLING_MAP_CHUNK_SIZE } from '../../../../shared_libs/play-runtime/map-chunk-limits';
6
7
 
7
8
  export const CACHE_ENABLED_SIMPLE_MAP_CHUNK_SIZE = 10_000;
8
9
  export { TOOL_CALLING_MAP_CHUNK_SIZE };
10
+ export const WORKER_SUBREQUEST_SAFE_TOOL_CALLS_PER_CHUNK =
11
+ TOOL_CALLING_MAP_CHUNK_SIZE;
9
12
 
10
13
  export type WorkerMapChunkPlanInput = {
11
14
  mapName: string;
@@ -29,11 +32,52 @@ export function chooseWorkerMapRowsPerChunk(
29
32
  preferredChunkSize: planMap?.defaultChunkSize,
30
33
  softWorkflowStepBudget: plan?.chunkPlan.softWorkflowStepBudget,
31
34
  });
35
+ const estimatedSubrequestProducingSteps =
36
+ estimateSubrequestProducingStepsForMap(plan, planMap);
37
+ if (estimatedSubrequestProducingSteps > 0) {
38
+ const subrequestSafeRows = Math.max(
39
+ 1,
40
+ Math.floor(
41
+ WORKER_SUBREQUEST_SAFE_TOOL_CALLS_PER_CHUNK /
42
+ estimatedSubrequestProducingSteps,
43
+ ),
44
+ );
45
+ if (subrequestSafeRows < rowsPerChunk) {
46
+ if (input.rowCountHint === null || !Number.isFinite(input.rowCountHint)) {
47
+ return subrequestSafeRows;
48
+ }
49
+ const totalRows = Math.max(0, Math.floor(input.rowCountHint));
50
+ const mapCount = Math.max(1, plan?.maps.length ?? 1);
51
+ const softBudget =
52
+ plan?.chunkPlan.softWorkflowStepBudget ??
53
+ EXECUTION_PLAN_DEFAULTS.workflowSoftStepBudget;
54
+ const maxChunksPerMap = Math.max(
55
+ 1,
56
+ Math.floor(
57
+ Math.max(
58
+ mapCount,
59
+ Math.floor(
60
+ (softBudget -
61
+ EXECUTION_PLAN_DEFAULTS.ingestStepCount -
62
+ EXECUTION_PLAN_DEFAULTS.finalizationStepCount) /
63
+ estimatedSubrequestProducingSteps,
64
+ ),
65
+ ) / mapCount,
66
+ ),
67
+ );
68
+ const requiredChunks = Math.ceil(totalRows / subrequestSafeRows);
69
+ if (requiredChunks <= maxChunksPerMap) return subrequestSafeRows;
70
+ throw new Error(
71
+ `Worker budget exceeded for map "${input.mapName}": ${requiredChunks}/${maxChunksPerMap} chunks.`,
72
+ );
73
+ }
74
+ return rowsPerChunk;
75
+ }
32
76
 
33
77
  const toolFreeSimpleMap =
34
78
  !!planMap &&
35
79
  planMap.stepsPerChunk === 1 &&
36
- !mapDoesExternalWork(planMap, plan);
80
+ estimateSubrequestProducingStepsForMap(plan, planMap) === 0;
37
81
  if (
38
82
  toolFreeSimpleMap &&
39
83
  (input.rowCountHint === null ||
@@ -42,55 +86,75 @@ export function chooseWorkerMapRowsPerChunk(
42
86
  return Math.max(rowsPerChunk, CACHE_ENABLED_SIMPLE_MAP_CHUNK_SIZE);
43
87
  }
44
88
 
45
- if (
46
- mapDoesExternalWork(planMap, plan) &&
47
- input.rowCountHint !== null &&
48
- input.rowCountHint <= rowsPerChunk
49
- ) {
50
- return Math.min(rowsPerChunk, TOOL_CALLING_MAP_CHUNK_SIZE);
51
- }
52
-
53
89
  return rowsPerChunk;
54
90
  }
55
91
 
56
- function mapDoesExternalWork(
57
- planMap: ExecutionPlan['maps'][number] | undefined,
92
+ function estimateSubrequestProducingStepsForMap(
58
93
  plan: ExecutionPlan | null,
59
- ): boolean {
60
- if (Array.isArray(planMap?.externalStepFields)) {
61
- return planMap.externalStepFields.length > 0;
62
- }
63
- if (!plan?.toolDeclarations.length) {
64
- return false;
65
- }
94
+ planMap: ExecutionPlan['maps'][number] | undefined,
95
+ ): number {
96
+ const toolDeclarations = plan?.toolDeclarations ?? [];
66
97
  if (!planMap) {
67
- return true;
98
+ return toolDeclarations.length;
99
+ }
100
+ const explicitExternalSteps = Array.isArray(planMap.externalStepFields)
101
+ ? planMap.externalStepFields.length
102
+ : 0;
103
+ const mapStepsPerChunk =
104
+ explicitExternalSteps > 0
105
+ ? 0
106
+ : (planMap.stepsPerChunk ?? 1) > 1
107
+ ? (planMap.stepsPerChunk ?? 1)
108
+ : 0;
109
+ if (toolDeclarations.length === 0) {
110
+ return Math.max(mapStepsPerChunk, explicitExternalSteps);
68
111
  }
69
- const outputFields = new Set(planMap.outputFields);
112
+ const outputFields = new Set(
113
+ planMap.outputFields.map((field) => field.trim()).filter(Boolean),
114
+ );
115
+ const explicitExternalStepFields = new Set(
116
+ (planMap.externalStepFields ?? [])
117
+ .map((field) => field.trim())
118
+ .filter(Boolean),
119
+ );
120
+ const hasModernStepMetadata =
121
+ Array.isArray(planMap.stepFields) ||
122
+ Array.isArray(planMap.externalStepFields);
70
123
  const mapFields = new Set([
71
124
  planMap.mapName,
72
125
  planMap.tableNamespace,
73
126
  ...planMap.outputFields,
74
- ...(planMap.stepFields ?? []),
75
127
  ...(planMap.externalStepFields ?? []),
128
+ ...(hasModernStepMetadata ? [] : (planMap.stepFields ?? [])),
76
129
  ...planMap.waterfallStages.flatMap((stage) => [
77
130
  stage.waterfallId,
78
131
  ...stage.stageIds,
79
132
  ]),
80
133
  ]);
81
- return plan.toolDeclarations.some((tool) => {
82
- const field = tool.field?.trim();
83
- if (!field) {
84
- return false;
85
- }
134
+ let scopedToolDeclarations = 0;
135
+ for (const declaration of toolDeclarations) {
136
+ const field = declaration.field?.trim();
137
+ if (!field) continue;
86
138
  if (mapFields.has(field)) {
87
- return true;
139
+ scopedToolDeclarations += 1;
140
+ continue;
88
141
  }
89
142
  if (!field.includes('.')) {
90
- return false;
143
+ continue;
91
144
  }
92
145
  const firstSegment = field.slice(0, field.indexOf('.'));
93
146
  const lastSegment = field.slice(field.lastIndexOf('.') + 1);
94
- return outputFields.has(firstSegment) || outputFields.has(lastSegment);
95
- });
147
+ if (
148
+ outputFields.has(firstSegment) ||
149
+ explicitExternalStepFields.has(lastSegment) ||
150
+ (!hasModernStepMetadata && outputFields.has(lastSegment))
151
+ ) {
152
+ scopedToolDeclarations += 1;
153
+ }
154
+ }
155
+ return Math.max(
156
+ mapStepsPerChunk,
157
+ explicitExternalSteps,
158
+ scopedToolDeclarations,
159
+ );
96
160
  }
@@ -104,10 +104,10 @@ export const SDK_RELEASE = {
104
104
  // 0.1.111 ships dataset-native tool list getters and result row datasets.
105
105
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
106
106
  // fields shipped in 0.1.153.
107
- version: '0.1.158',
107
+ version: '0.1.160',
108
108
  apiContract: '2026-06-dataset-handle-results-hard-cutover',
109
109
  supportPolicy: {
110
- latest: '0.1.158',
110
+ latest: '0.1.160',
111
111
  minimumSupported: '0.1.53',
112
112
  deprecatedBelow: '0.1.53',
113
113
  commandMinimumSupported: [
@@ -1037,15 +1037,17 @@ export interface DeletePlayResult {
1037
1037
  /** Owner-facing view of a play's public share page. */
1038
1038
  export interface SharePageOwnerView {
1039
1039
  shareSlug: string;
1040
+ /** Org URL handle; the public page lives at `/p/{orgSlug}/{playName}`. */
1041
+ orgSlug: string;
1040
1042
  publishedRevisionId: string;
1041
1043
  publishedVersion: number;
1042
1044
  visibility: string;
1043
1045
  seoIndexing: 'index' | 'noindex';
1044
1046
  showAverageDeeplineCost: boolean;
1045
1047
  showAverageLatency: boolean;
1046
- /** Stable public path, e.g. `/p/{shareSlug}`. */
1048
+ /** Stable public path, e.g. `/p/{orgSlug}/{playName}`. */
1047
1049
  publicPath: string;
1048
- /** Version-pinned canonical path, e.g. `/p/{shareSlug}/v/{version}`. */
1050
+ /** Version-pinned canonical path, e.g. `/p/{orgSlug}/{playName}/v/{version}`. */
1049
1051
  canonicalPath: string;
1050
1052
  createdAt: number;
1051
1053
  updatedAt: number;
@@ -1 +1 @@
1
- export const TOOL_CALLING_MAP_CHUNK_SIZE = 25;
1
+ export const TOOL_CALLING_MAP_CHUNK_SIZE = 20;
@@ -612,6 +612,24 @@ function conflictingTerminalSnapshot(
612
612
  );
613
613
  }
614
614
 
615
+ function retryablePlatformDeployFailureSnapshot(
616
+ base: PlayRunLedgerSnapshot,
617
+ eventError?: string | null,
618
+ ): PlayRunLedgerSnapshot | null {
619
+ if (
620
+ isTerminalPlayRunLedgerStatus(base.status) ||
621
+ !eventError ||
622
+ normalizePlayRunFailure(eventError).code !== 'PLATFORM_DEPLOY_INTERRUPTED'
623
+ ) {
624
+ return null;
625
+ }
626
+ return withTiming(
627
+ appendLogLines(base, [
628
+ `[ledger] retryable platform deploy run.failed ignored; status remains ${base.status}`,
629
+ ]),
630
+ );
631
+ }
632
+
615
633
  function settleRunningStepsOnTerminal(
616
634
  snapshot: PlayRunLedgerSnapshot,
617
635
  status: Extract<PlayRunLedgerStepStatus, 'completed' | 'failed'>,
@@ -714,6 +732,7 @@ export function reducePlayRunLedgerEvent(
714
732
  );
715
733
  case 'run.failed':
716
734
  return (
735
+ retryablePlatformDeployFailureSnapshot(base, event.error) ??
717
736
  conflictingTerminalSnapshot(
718
737
  base,
719
738
  event.type,
@@ -610,6 +610,23 @@ async function ensureRuntimeSheetForPreloadedSession(
610
610
  phase: 'ensure_sheet_for_preloaded_session',
611
611
  ms: Date.now() - ensureStartedAt,
612
612
  });
613
+ const recheckStartedAt = Date.now();
614
+ const readyAfterEnsure = await isRuntimeSheetSchemaReady(input.session, {
615
+ sheetContract: input.sheetContract,
616
+ });
617
+ input.timings?.push({
618
+ phase: 'schema_check_after_preloaded_session_ensure',
619
+ ms: Date.now() - recheckStartedAt,
620
+ ready: readyAfterEnsure,
621
+ });
622
+ if (!readyAfterEnsure) {
623
+ if (runtimeSheetEnsureCache.get(cacheKey)?.promise === promise) {
624
+ runtimeSheetEnsureCache.delete(cacheKey);
625
+ }
626
+ throw new Error(
627
+ `Runtime sheet schema for ctx.dataset("${input.tableNamespace}") is still not ready after ensure_sheet.`,
628
+ );
629
+ }
613
630
  } catch (error) {
614
631
  if (runtimeSheetEnsureCache.get(cacheKey)?.promise === promise) {
615
632
  runtimeSheetEnsureCache.delete(cacheKey);
package/dist/cli/index.js CHANGED
@@ -657,10 +657,10 @@ var SDK_RELEASE = {
657
657
  // 0.1.111 ships dataset-native tool list getters and result row datasets.
658
658
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
659
659
  // fields shipped in 0.1.153.
660
- version: "0.1.158",
660
+ version: "0.1.160",
661
661
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
662
662
  supportPolicy: {
663
- latest: "0.1.158",
663
+ latest: "0.1.160",
664
664
  minimumSupported: "0.1.53",
665
665
  deprecatedBelow: "0.1.53",
666
666
  commandMinimumSupported: [
@@ -15261,10 +15261,41 @@ Examples:
15261
15261
  ]);
15262
15262
  });
15263
15263
  }
15264
+ var PUBLIC_PLAY_BASE_URL = "https://deepline.com";
15264
15265
  function shareFlagValue(args, flag) {
15265
15266
  const i = args.indexOf(flag);
15266
15267
  return i >= 0 && i + 1 < args.length ? args[i + 1] : void 0;
15267
15268
  }
15269
+ function absolutePublicPlayUrl(path) {
15270
+ if (!path) {
15271
+ return null;
15272
+ }
15273
+ try {
15274
+ return new URL(path, PUBLIC_PLAY_BASE_URL).toString();
15275
+ } catch {
15276
+ return null;
15277
+ }
15278
+ }
15279
+ function shareUrlFields(status) {
15280
+ return {
15281
+ publicUrl: absolutePublicPlayUrl(status.share?.publicPath),
15282
+ canonicalUrl: absolutePublicPlayUrl(status.share?.canonicalPath)
15283
+ };
15284
+ }
15285
+ function shareStatusForOutput(status) {
15286
+ if (!status.share) {
15287
+ return status;
15288
+ }
15289
+ const urls = shareUrlFields(status);
15290
+ return {
15291
+ ...status,
15292
+ share: {
15293
+ ...status.share,
15294
+ ...urls.publicUrl ? { publicUrl: urls.publicUrl } : {},
15295
+ ...urls.canonicalUrl ? { canonicalUrl: urls.canonicalUrl } : {}
15296
+ }
15297
+ };
15298
+ }
15268
15299
  async function handlePlayShareStatus(args) {
15269
15300
  const target = args[0];
15270
15301
  if (!target) {
@@ -15273,25 +15304,30 @@ async function handlePlayShareStatus(args) {
15273
15304
  }
15274
15305
  const name = parseReferencedPlayTarget2(target).playName;
15275
15306
  const status = await new DeeplineClient().getSharePage(name);
15307
+ const outputStatus = shareStatusForOutput(status);
15276
15308
  if (argsWantJson(args)) {
15277
- process.stdout.write(`${JSON.stringify(status)}
15309
+ process.stdout.write(`${JSON.stringify(outputStatus)}
15278
15310
  `);
15279
15311
  return 0;
15280
15312
  }
15281
- if (!status.share) {
15282
- console.log(`${status.playName}: not published.`);
15313
+ if (!outputStatus.share) {
15314
+ console.log(`${outputStatus.playName}: not published.`);
15283
15315
  console.log(
15284
- ` Publish: deepline plays share publish ${status.playName} --yes`
15316
+ ` Publish: deepline plays share publish ${outputStatus.playName} --yes`
15285
15317
  );
15286
15318
  return 0;
15287
15319
  }
15320
+ const urls = shareUrlFields(outputStatus);
15288
15321
  console.log(
15289
- `${status.playName}: published v${status.share.publishedVersion}`
15322
+ `${outputStatus.playName}: published v${outputStatus.share.publishedVersion}`
15290
15323
  );
15291
- console.log(` url: ${status.share.publicPath}`);
15292
- console.log(` seo: ${status.share.seoIndexing}`);
15324
+ console.log(` url: ${urls.publicUrl ?? outputStatus.share.publicPath}`);
15325
+ if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
15326
+ console.log(` version: ${urls.canonicalUrl}`);
15327
+ }
15328
+ console.log(` seo: ${outputStatus.share.seoIndexing}`);
15293
15329
  console.log(
15294
- ` show: cost=${status.share.showAverageDeeplineCost} latency=${status.share.showAverageLatency}`
15330
+ ` show: cost=${outputStatus.share.showAverageDeeplineCost} latency=${outputStatus.share.showAverageLatency}`
15295
15331
  );
15296
15332
  return 0;
15297
15333
  }
@@ -15375,16 +15411,21 @@ async function handlePlaySharePublish(args) {
15375
15411
  return 0;
15376
15412
  }
15377
15413
  const status = await client2.publishSharePage(name, request);
15414
+ const outputStatus = shareStatusForOutput(status);
15378
15415
  if (argsWantJson(args)) {
15379
- process.stdout.write(`${JSON.stringify(status)}
15416
+ process.stdout.write(`${JSON.stringify(outputStatus)}
15380
15417
  `);
15381
15418
  return 0;
15382
15419
  }
15420
+ const urls = shareUrlFields(outputStatus);
15383
15421
  console.log(
15384
- `Published ${name}${status.share ? ` v${status.share.publishedVersion}` : ""}: ${status.share?.publicPath ?? ""}`
15422
+ `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${urls.publicUrl ?? outputStatus.share?.publicPath ?? ""}`
15385
15423
  );
15386
- if (status.warning) {
15387
- console.error(`warning: ${status.warning}`);
15424
+ if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
15425
+ console.log(`Version URL: ${urls.canonicalUrl}`);
15426
+ }
15427
+ if (outputStatus.warning) {
15428
+ console.error(`warning: ${outputStatus.warning}`);
15388
15429
  }
15389
15430
  return 0;
15390
15431
  }
@@ -15438,12 +15479,17 @@ async function handlePlayShareRegenerate(args) {
15438
15479
  name,
15439
15480
  revisionId ? { revisionId } : {}
15440
15481
  );
15482
+ const outputStatus = shareStatusForOutput(status);
15441
15483
  if (argsWantJson(args)) {
15442
- process.stdout.write(`${JSON.stringify(status)}
15484
+ process.stdout.write(`${JSON.stringify(outputStatus)}
15443
15485
  `);
15444
15486
  return 0;
15445
15487
  }
15446
- console.log(`Regenerated public copy for ${name}.`);
15488
+ const urls = shareUrlFields(outputStatus);
15489
+ const regeneratedPublishedRevision = !revisionId || outputStatus.share?.publishedRevisionId === revisionId;
15490
+ console.log(
15491
+ `Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
15492
+ );
15447
15493
  return 0;
15448
15494
  }
15449
15495
  async function handlePlayShareUnpublish(args) {
@@ -18462,7 +18508,7 @@ function mergeRowsForCsvExport(enrichedRows, options) {
18462
18508
  const canMergeSparseBySourceIndex = rows.length > 0 && rows.every(
18463
18509
  (row) => sourceRowIndexFromEnrichRow(row, start, inclusiveEnd) !== null
18464
18510
  );
18465
- if (rows.length < expectedSelectedRows && !options.allowPartial && !canMergeSparseBySourceIndex) {
18511
+ if (options.inPlace && rows.length < expectedSelectedRows && !options.allowPartial && !canMergeSparseBySourceIndex) {
18466
18512
  throw new Error(
18467
18513
  `Refusing to write a partial in-place CSV export: the run returned ${rows.length} row(s) for ${expectedSelectedRows} selected source row(s).`
18468
18514
  );
@@ -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.158",
645
+ version: "0.1.160",
646
646
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
647
647
  supportPolicy: {
648
- latest: "0.1.158",
648
+ latest: "0.1.160",
649
649
  minimumSupported: "0.1.53",
650
650
  deprecatedBelow: "0.1.53",
651
651
  commandMinimumSupported: [
@@ -15288,10 +15288,41 @@ Examples:
15288
15288
  ]);
15289
15289
  });
15290
15290
  }
15291
+ var PUBLIC_PLAY_BASE_URL = "https://deepline.com";
15291
15292
  function shareFlagValue(args, flag) {
15292
15293
  const i = args.indexOf(flag);
15293
15294
  return i >= 0 && i + 1 < args.length ? args[i + 1] : void 0;
15294
15295
  }
15296
+ function absolutePublicPlayUrl(path) {
15297
+ if (!path) {
15298
+ return null;
15299
+ }
15300
+ try {
15301
+ return new URL(path, PUBLIC_PLAY_BASE_URL).toString();
15302
+ } catch {
15303
+ return null;
15304
+ }
15305
+ }
15306
+ function shareUrlFields(status) {
15307
+ return {
15308
+ publicUrl: absolutePublicPlayUrl(status.share?.publicPath),
15309
+ canonicalUrl: absolutePublicPlayUrl(status.share?.canonicalPath)
15310
+ };
15311
+ }
15312
+ function shareStatusForOutput(status) {
15313
+ if (!status.share) {
15314
+ return status;
15315
+ }
15316
+ const urls = shareUrlFields(status);
15317
+ return {
15318
+ ...status,
15319
+ share: {
15320
+ ...status.share,
15321
+ ...urls.publicUrl ? { publicUrl: urls.publicUrl } : {},
15322
+ ...urls.canonicalUrl ? { canonicalUrl: urls.canonicalUrl } : {}
15323
+ }
15324
+ };
15325
+ }
15295
15326
  async function handlePlayShareStatus(args) {
15296
15327
  const target = args[0];
15297
15328
  if (!target) {
@@ -15300,25 +15331,30 @@ async function handlePlayShareStatus(args) {
15300
15331
  }
15301
15332
  const name = parseReferencedPlayTarget2(target).playName;
15302
15333
  const status = await new DeeplineClient().getSharePage(name);
15334
+ const outputStatus = shareStatusForOutput(status);
15303
15335
  if (argsWantJson(args)) {
15304
- process.stdout.write(`${JSON.stringify(status)}
15336
+ process.stdout.write(`${JSON.stringify(outputStatus)}
15305
15337
  `);
15306
15338
  return 0;
15307
15339
  }
15308
- if (!status.share) {
15309
- console.log(`${status.playName}: not published.`);
15340
+ if (!outputStatus.share) {
15341
+ console.log(`${outputStatus.playName}: not published.`);
15310
15342
  console.log(
15311
- ` Publish: deepline plays share publish ${status.playName} --yes`
15343
+ ` Publish: deepline plays share publish ${outputStatus.playName} --yes`
15312
15344
  );
15313
15345
  return 0;
15314
15346
  }
15347
+ const urls = shareUrlFields(outputStatus);
15315
15348
  console.log(
15316
- `${status.playName}: published v${status.share.publishedVersion}`
15349
+ `${outputStatus.playName}: published v${outputStatus.share.publishedVersion}`
15317
15350
  );
15318
- console.log(` url: ${status.share.publicPath}`);
15319
- console.log(` seo: ${status.share.seoIndexing}`);
15351
+ console.log(` url: ${urls.publicUrl ?? outputStatus.share.publicPath}`);
15352
+ if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
15353
+ console.log(` version: ${urls.canonicalUrl}`);
15354
+ }
15355
+ console.log(` seo: ${outputStatus.share.seoIndexing}`);
15320
15356
  console.log(
15321
- ` show: cost=${status.share.showAverageDeeplineCost} latency=${status.share.showAverageLatency}`
15357
+ ` show: cost=${outputStatus.share.showAverageDeeplineCost} latency=${outputStatus.share.showAverageLatency}`
15322
15358
  );
15323
15359
  return 0;
15324
15360
  }
@@ -15402,16 +15438,21 @@ async function handlePlaySharePublish(args) {
15402
15438
  return 0;
15403
15439
  }
15404
15440
  const status = await client2.publishSharePage(name, request);
15441
+ const outputStatus = shareStatusForOutput(status);
15405
15442
  if (argsWantJson(args)) {
15406
- process.stdout.write(`${JSON.stringify(status)}
15443
+ process.stdout.write(`${JSON.stringify(outputStatus)}
15407
15444
  `);
15408
15445
  return 0;
15409
15446
  }
15447
+ const urls = shareUrlFields(outputStatus);
15410
15448
  console.log(
15411
- `Published ${name}${status.share ? ` v${status.share.publishedVersion}` : ""}: ${status.share?.publicPath ?? ""}`
15449
+ `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${urls.publicUrl ?? outputStatus.share?.publicPath ?? ""}`
15412
15450
  );
15413
- if (status.warning) {
15414
- console.error(`warning: ${status.warning}`);
15451
+ if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
15452
+ console.log(`Version URL: ${urls.canonicalUrl}`);
15453
+ }
15454
+ if (outputStatus.warning) {
15455
+ console.error(`warning: ${outputStatus.warning}`);
15415
15456
  }
15416
15457
  return 0;
15417
15458
  }
@@ -15465,12 +15506,17 @@ async function handlePlayShareRegenerate(args) {
15465
15506
  name,
15466
15507
  revisionId ? { revisionId } : {}
15467
15508
  );
15509
+ const outputStatus = shareStatusForOutput(status);
15468
15510
  if (argsWantJson(args)) {
15469
- process.stdout.write(`${JSON.stringify(status)}
15511
+ process.stdout.write(`${JSON.stringify(outputStatus)}
15470
15512
  `);
15471
15513
  return 0;
15472
15514
  }
15473
- console.log(`Regenerated public copy for ${name}.`);
15515
+ const urls = shareUrlFields(outputStatus);
15516
+ const regeneratedPublishedRevision = !revisionId || outputStatus.share?.publishedRevisionId === revisionId;
15517
+ console.log(
15518
+ `Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
15519
+ );
15474
15520
  return 0;
15475
15521
  }
15476
15522
  async function handlePlayShareUnpublish(args) {
@@ -18489,7 +18535,7 @@ function mergeRowsForCsvExport(enrichedRows, options) {
18489
18535
  const canMergeSparseBySourceIndex = rows.length > 0 && rows.every(
18490
18536
  (row) => sourceRowIndexFromEnrichRow(row, start, inclusiveEnd) !== null
18491
18537
  );
18492
- if (rows.length < expectedSelectedRows && !options.allowPartial && !canMergeSparseBySourceIndex) {
18538
+ if (options.inPlace && rows.length < expectedSelectedRows && !options.allowPartial && !canMergeSparseBySourceIndex) {
18493
18539
  throw new Error(
18494
18540
  `Refusing to write a partial in-place CSV export: the run returned ${rows.length} row(s) for ${expectedSelectedRows} selected source row(s).`
18495
18541
  );
package/dist/index.d.mts CHANGED
@@ -971,15 +971,17 @@ interface DeletePlayResult {
971
971
  /** Owner-facing view of a play's public share page. */
972
972
  interface SharePageOwnerView {
973
973
  shareSlug: string;
974
+ /** Org URL handle; the public page lives at `/p/{orgSlug}/{playName}`. */
975
+ orgSlug: string;
974
976
  publishedRevisionId: string;
975
977
  publishedVersion: number;
976
978
  visibility: string;
977
979
  seoIndexing: 'index' | 'noindex';
978
980
  showAverageDeeplineCost: boolean;
979
981
  showAverageLatency: boolean;
980
- /** Stable public path, e.g. `/p/{shareSlug}`. */
982
+ /** Stable public path, e.g. `/p/{orgSlug}/{playName}`. */
981
983
  publicPath: string;
982
- /** Version-pinned canonical path, e.g. `/p/{shareSlug}/v/{version}`. */
984
+ /** Version-pinned canonical path, e.g. `/p/{orgSlug}/{playName}/v/{version}`. */
983
985
  canonicalPath: string;
984
986
  createdAt: number;
985
987
  updatedAt: number;
package/dist/index.d.ts CHANGED
@@ -971,15 +971,17 @@ interface DeletePlayResult {
971
971
  /** Owner-facing view of a play's public share page. */
972
972
  interface SharePageOwnerView {
973
973
  shareSlug: string;
974
+ /** Org URL handle; the public page lives at `/p/{orgSlug}/{playName}`. */
975
+ orgSlug: string;
974
976
  publishedRevisionId: string;
975
977
  publishedVersion: number;
976
978
  visibility: string;
977
979
  seoIndexing: 'index' | 'noindex';
978
980
  showAverageDeeplineCost: boolean;
979
981
  showAverageLatency: boolean;
980
- /** Stable public path, e.g. `/p/{shareSlug}`. */
982
+ /** Stable public path, e.g. `/p/{orgSlug}/{playName}`. */
981
983
  publicPath: string;
982
- /** Version-pinned canonical path, e.g. `/p/{shareSlug}/v/{version}`. */
984
+ /** Version-pinned canonical path, e.g. `/p/{orgSlug}/{playName}/v/{version}`. */
983
985
  canonicalPath: string;
984
986
  createdAt: number;
985
987
  updatedAt: number;
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.158",
424
+ version: "0.1.160",
425
425
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
426
426
  supportPolicy: {
427
- latest: "0.1.158",
427
+ latest: "0.1.160",
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.158",
354
+ version: "0.1.160",
355
355
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
356
356
  supportPolicy: {
357
- latest: "0.1.158",
357
+ latest: "0.1.160",
358
358
  minimumSupported: "0.1.53",
359
359
  deprecatedBelow: "0.1.53",
360
360
  commandMinimumSupported: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.158",
3
+ "version": "0.1.160",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {