deepline 0.3.407 → 0.3.408

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.
Files changed (127) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +2 -0
  2. package/dist/bundling-sources/sdk/src/play.ts +13 -0
  3. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  4. package/dist/bundling-sources/sdk/src/types.ts +23 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/admission-timings.ts +64 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +11 -1
  7. package/dist/bundling-sources/shared_libs/play-runtime/modal-runtime-config.ts +1 -4
  8. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +2 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/local-process.ts +15 -6
  10. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +188 -45
  11. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +22 -4
  12. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +10 -4
  13. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +72 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/webhook-receipt-source-commit-retry.ts +90 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/worker-api-types.ts +5 -0
  16. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +6 -0
  17. package/dist/cli/auth-3GB2K636.js +40 -0
  18. package/dist/cli/{auth-WURWNNLE.mjs → auth-UVD3CUBB.mjs} +4 -4
  19. package/dist/cli/{billing-BP3E6WIM.mjs → billing-BZVTXXLM.mjs} +23 -16
  20. package/dist/cli/{billing-2QJGXGJX.js → billing-BZVYAF6T.js} +92 -85
  21. package/dist/cli/{chunk-Y6CX4QPR.js → chunk-2XXXFPTD.js} +67 -67
  22. package/dist/cli/{chunk-RZLXVHNO.js → chunk-3ZB6IIA7.js} +26 -26
  23. package/dist/cli/{chunk-BKC6VMYZ.mjs → chunk-4CFULMRB.mjs} +73 -4
  24. package/dist/cli/{chunk-6JZZNP5G.mjs → chunk-4QFT5LGV.mjs} +2 -2
  25. package/dist/cli/{chunk-H6EWQFPQ.js → chunk-4RNDKFNQ.js} +2 -2
  26. package/dist/cli/{chunk-GAMFK2ZP.mjs → chunk-67RWR34T.mjs} +10 -3
  27. package/dist/cli/{chunk-KUQAU5MG.js → chunk-AUMD2VXP.js} +6 -6
  28. package/dist/cli/{chunk-IY6GKJ4O.js → chunk-BRJUESQV.js} +50 -50
  29. package/dist/cli/{chunk-7LKYHZVB.js → chunk-D6FFBSM5.js} +1 -1
  30. package/dist/cli/{chunk-AYHLUHE5.js → chunk-E3PJF6YP.js} +6 -2
  31. package/dist/cli/{chunk-G6U74WNM.js → chunk-ECVLPS67.js} +15 -15
  32. package/dist/cli/{chunk-QJBJZVG6.js → chunk-HQY2SG3K.js} +15 -8
  33. package/dist/cli/{chunk-P7HOTKOK.mjs → chunk-I3DHIXVJ.mjs} +4 -4
  34. package/dist/cli/{chunk-L25GBGQU.mjs → chunk-IOHRWLQE.mjs} +6 -6
  35. package/dist/cli/{chunk-UFFSOV6I.mjs → chunk-IWBXJDZA.mjs} +2 -2
  36. package/dist/cli/{chunk-URWF7NGQ.js → chunk-J5PTX66Y.js} +28 -14
  37. package/dist/cli/{chunk-J67NU4MQ.mjs → chunk-LOYISF7S.mjs} +1 -1
  38. package/dist/cli/{chunk-4TV43THC.mjs → chunk-MJELBQBU.mjs} +4 -4
  39. package/dist/cli/{chunk-WJYPBHTE.js → chunk-OSFWFV72.js} +11 -4
  40. package/dist/cli/{chunk-ZI2ZNDJK.mjs → chunk-PYZZMAJQ.mjs} +28 -14
  41. package/dist/cli/{chunk-G4LJS2RE.js → chunk-Q3LFI3VH.js} +8 -8
  42. package/dist/cli/{chunk-D2ZRMZKF.js → chunk-Q3PUHXOY.js} +99 -30
  43. package/dist/cli/{chunk-THHM4DPE.js → chunk-QUAQX3FQ.js} +4 -4
  44. package/dist/cli/{chunk-RMZAOYDN.js → chunk-RWCY6YI2.js} +53 -53
  45. package/dist/cli/{chunk-ZBCTXQ3P.mjs → chunk-SD7MXAJA.mjs} +1 -1
  46. package/dist/cli/{chunk-UFS752TU.mjs → chunk-SJVVBWRL.mjs} +5 -1
  47. package/dist/cli/{chunk-QJAX7QN7.mjs → chunk-URACNNLO.mjs} +2 -2
  48. package/dist/cli/{chunk-WXLOW623.mjs → chunk-WPAB4DCU.mjs} +14 -7
  49. package/dist/cli/{chunk-UPEOEYZ3.mjs → chunk-WTT6CLED.mjs} +1 -1
  50. package/dist/cli/{chunk-N6OAMAO5.mjs → chunk-XXLXOUUU.mjs} +1 -1
  51. package/dist/cli/{chunk-XT6GG3QO.mjs → chunk-YMOFWHGO.mjs} +3 -3
  52. package/dist/cli/{chunk-SOQIPKF2.js → chunk-ZBABPK6Y.js} +8 -8
  53. package/dist/cli/command-docs.js +2 -2
  54. package/dist/cli/command-docs.mjs +1 -1
  55. package/dist/cli/{csv-N6KYTG7L.mjs → csv-WPSXG6ZZ.mjs} +3 -3
  56. package/dist/cli/{csv-7E5BE23B.js → csv-XLGLHJ6P.js} +12 -12
  57. package/dist/cli/{db-4VLZP33O.js → db-5PTNJG4X.js} +25 -25
  58. package/dist/cli/{db-XMBJNVBD.mjs → db-ABS57ABJ.mjs} +4 -4
  59. package/dist/cli/{describe-4I6EIVXD.js → describe-EZS6PQXA.js} +11 -11
  60. package/dist/cli/{describe-WERH4TD2.mjs → describe-PVWQJ2PB.mjs} +7 -7
  61. package/dist/cli/describe-core.d.mts +2 -2
  62. package/dist/cli/describe-core.d.ts +2 -2
  63. package/dist/cli/{executions-W7TWJRBK.js → executions-FNTAFQ7Y.js} +6 -6
  64. package/dist/cli/{executions-JWQXE7G6.mjs → executions-OKJGATQZ.mjs} +4 -4
  65. package/dist/cli/{feedback-FMGRC6KO.js → feedback-6YBOMSUA.js} +7 -7
  66. package/dist/cli/{feedback-OEJFX4F7.mjs → feedback-W27HDMRR.mjs} +3 -3
  67. package/dist/cli/git-YKUXXJOR.js +24 -0
  68. package/dist/cli/{git-IVC4KHXX.mjs → git-YOOUEL6M.mjs} +4 -4
  69. package/dist/cli/index.js +204 -127
  70. package/dist/cli/index.mjs +124 -47
  71. package/dist/cli/{legacy-noops-X3BQ7MUK.js → legacy-noops-2VZ7XT6C.js} +7 -7
  72. package/dist/cli/{legacy-noops-LT36CLWZ.mjs → legacy-noops-V6OKW7VR.mjs} +4 -4
  73. package/dist/cli/{monitors-DLIIAVLW.js → monitors-FBWGVIUS.js} +84 -84
  74. package/dist/cli/{monitors-MNLCELF7.mjs → monitors-P2YYWTWT.mjs} +4 -4
  75. package/dist/cli/{org-CYHDEW7P.js → org-3XUSVX5T.js} +64 -64
  76. package/dist/cli/{org-QV5LMUPT.mjs → org-DVMG6H3C.mjs} +4 -4
  77. package/dist/cli/{play-5Z4ROZ3P.mjs → play-GNC5CQAS.mjs} +70 -18
  78. package/dist/cli/{play-MEFXC2QA.js → play-YG5L4BWQ.js} +345 -293
  79. package/dist/cli/{providers-2MKUNFBQ.js → providers-7PSWG2OV.js} +7 -7
  80. package/dist/cli/{providers-FJLYSHB3.mjs → providers-JR33SLWL.mjs} +4 -4
  81. package/dist/cli/{quickstart-ULWXKAOT.js → quickstart-FDVZ5BL3.js} +5 -5
  82. package/dist/cli/{quickstart-PQO3OQRT.mjs → quickstart-VUOBQYIQ.mjs} +3 -3
  83. package/dist/cli/{search-KGAAXMDG.mjs → search-JZYLO33K.mjs} +5 -5
  84. package/dist/cli/search-PPPYC5OZ.js +30 -0
  85. package/dist/cli/{secrets-PD5I3KAF.mjs → secrets-3MCYBT4I.mjs} +4 -4
  86. package/dist/cli/{secrets-X2VGG2PO.js → secrets-VS266FVA.js} +13 -13
  87. package/dist/cli/{sessions-3WVEU4PE.mjs → sessions-ELLLT23E.mjs} +4 -4
  88. package/dist/cli/{sessions-R3XAKTBQ.js → sessions-TEHEWW7O.js} +5 -5
  89. package/dist/cli/{settings-ZIDO3IP6.js → settings-7364NMMA.js} +75 -75
  90. package/dist/cli/{settings-645RSFQX.mjs → settings-PZCKAFII.mjs} +8 -8
  91. package/dist/cli/{setup-LISKIJKP.mjs → setup-A7GQ4KIA.mjs} +7 -7
  92. package/dist/cli/{setup-LH5HOZ3D.js → setup-PMWYLCT6.js} +42 -42
  93. package/dist/cli/skills-SYS7VRRK.js +29 -0
  94. package/dist/cli/{skills-VVQJHLSF.mjs → skills-WS6BIFPQ.mjs} +5 -5
  95. package/dist/cli/{tools-Y3LOMXFT.mjs → tools-BR4DOZA2.mjs} +7 -7
  96. package/dist/cli/{tools-FTPJCNAM.js → tools-KK4BKVQR.js} +8 -8
  97. package/dist/cli/update-2IV5JTX2.js +29 -0
  98. package/dist/cli/{update-DOBNQNJI.mjs → update-D2B7UNFT.mjs} +7 -7
  99. package/dist/cli/{workflow-LGENKZBV.js → workflow-6ODTCYXU.js} +15 -15
  100. package/dist/cli/{workflow-ZMAA5VCN.mjs → workflow-PQXC2R47.mjs} +5 -5
  101. package/dist/{client-IrPHUE5J.d.ts → client-BcvhDfJJ.d.ts} +26 -2
  102. package/dist/{client-6rEB46Lv.d.mts → client-Z9Pye1Wm.d.mts} +26 -2
  103. package/dist/{compiler-manifest-BHnXE43X.d.ts → compiler-manifest-Ycx-hoAr.d.mts} +2 -0
  104. package/dist/{compiler-manifest-BHnXE43X.d.mts → compiler-manifest-Ycx-hoAr.d.ts} +2 -0
  105. package/dist/{index-Da_Y8z5e.d.mts → index-CZXgiN3E.d.mts} +1 -1
  106. package/dist/{index-SODb2ROS.d.ts → index-NPG5pqxQ.d.ts} +1 -1
  107. package/dist/index.d.mts +5 -5
  108. package/dist/index.d.ts +5 -5
  109. package/dist/index.js +26 -9
  110. package/dist/index.mjs +23 -6
  111. package/dist/install-integrity.json +86 -84
  112. package/dist/plays/bundle-play-file.d.mts +3 -3
  113. package/dist/plays/bundle-play-file.d.ts +3 -3
  114. package/dist/plays/play-description.d.mts +2 -2
  115. package/dist/plays/play-description.d.ts +2 -2
  116. package/dist/plays/run-request.d.mts +2 -2
  117. package/dist/plays/run-request.d.ts +2 -2
  118. package/dist/release.d.mts +1 -1
  119. package/dist/release.d.ts +1 -1
  120. package/dist/release.js +2 -2
  121. package/dist/release.mjs +1 -1
  122. package/package.json +1 -1
  123. package/dist/cli/auth-4JTX6AGM.js +0 -40
  124. package/dist/cli/git-OFXE7G4X.js +0 -24
  125. package/dist/cli/search-ANKSJ224.js +0 -30
  126. package/dist/cli/skills-WLHYSVQA.js +0 -29
  127. package/dist/cli/update-A622H2DZ.js +0 -29
@@ -2613,6 +2613,8 @@ export type BillingQuoteResult = {
2613
2613
  cpu: number;
2614
2614
  diskGiB: number;
2615
2615
  };
2616
+ maximum_backend?: 'daytona' | 'modal';
2617
+ priced_backends?: Array<'daytona' | 'modal'>;
2616
2618
  maximum_credits: number;
2617
2619
  maximum_billing_seconds: number;
2618
2620
  total_play_credits: null;
@@ -1313,6 +1313,16 @@ function stringArray(value: unknown): string[] {
1313
1313
  return Array.isArray(value) ? value.map(String) : [];
1314
1314
  }
1315
1315
 
1316
+ function listAliasRecord(value: unknown): Record<string, string> | undefined {
1317
+ if (!isRecord(value)) return undefined;
1318
+ return Object.fromEntries(
1319
+ Object.entries(value).filter(
1320
+ (entry): entry is [string, string] =>
1321
+ typeof entry[1] === 'string' && entry[1].length > 0,
1322
+ ),
1323
+ );
1324
+ }
1325
+
1316
1326
  function emailStatusExtractorConfig(
1317
1327
  value: unknown,
1318
1328
  ): EmailStatusExtractorConfig | undefined {
@@ -1590,6 +1600,9 @@ function toolExecutionEnvelopeToResult(
1590
1600
  extractors: extractorDescriptorRecord(toolMetadata.extractors),
1591
1601
  targetGetters: stringArrayRecord(toolMetadata.targetGetters),
1592
1602
  listExtractorPaths: stringArray(toolMetadata.listExtractorPaths),
1603
+ listExtractorAliases: listAliasRecord(
1604
+ toolMetadata.listExtractorAliases,
1605
+ ),
1593
1606
  listIdentityGetters: stringArrayRecord(
1594
1607
  toolMetadata.listIdentityGetters,
1595
1608
  ),
@@ -202,7 +202,7 @@ export const SDK_RELEASE = {
202
202
  // getters keep their established compatibility behavior.
203
203
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
204
204
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
205
- version: '0.3.407',
205
+ version: '0.3.408',
206
206
  updateSummary:
207
207
  'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
208
208
  packageCapabilities: {
@@ -1581,6 +1581,17 @@ export type PlayCostEstimate =
1581
1581
  sampleRunCount: number;
1582
1582
  basedOnRunId: string | null;
1583
1583
  modelVersion: string;
1584
+ compute?: {
1585
+ scope: 'sandbox_session';
1586
+ maximumCredits: number;
1587
+ maximumBillingSeconds: number;
1588
+ maximumBackend: 'daytona' | 'modal';
1589
+ pricedBackends: Array<'daytona' | 'modal'>;
1590
+ totalPlayCredits: null;
1591
+ totalPlayCreditsSupported: false;
1592
+ actualUsageBased: true;
1593
+ totalSandboxSessions: 'unbounded';
1594
+ };
1584
1595
  }
1585
1596
  | {
1586
1597
  status: 'unavailable';
@@ -1588,9 +1599,21 @@ export type PlayCostEstimate =
1588
1599
  | 'ambiguous_output_unit'
1589
1600
  | 'unbounded_loop'
1590
1601
  | 'unresolved_tool'
1602
+ | 'unresolved_call_graph'
1591
1603
  | 'mixed_run_and_row_costs';
1592
1604
  message: string;
1593
1605
  modelVersion: string;
1606
+ compute?: {
1607
+ scope: 'sandbox_session';
1608
+ maximumCredits: number;
1609
+ maximumBillingSeconds: number;
1610
+ maximumBackend: 'daytona' | 'modal';
1611
+ pricedBackends: Array<'daytona' | 'modal'>;
1612
+ totalPlayCredits: null;
1613
+ totalPlayCreditsSupported: false;
1614
+ actualUsageBased: true;
1615
+ totalSandboxSessions: 'unbounded';
1616
+ };
1594
1617
  };
1595
1618
 
1596
1619
  export interface PlayListItem {
@@ -0,0 +1,64 @@
1
+ export function createPlayAdmissionBatchTimings() {
2
+ return {
3
+ payloadReadMs: 0,
4
+ sourceAdmissionMs: 0,
5
+ validationMs: 0,
6
+ dataPlaneProbeMs: 0,
7
+ dataPlaneReadyMs: 0,
8
+ authorityMs: 0,
9
+ preloadWaitMs: 0,
10
+ canonicalInputMs: 0,
11
+ canonicalInputWaitMs: 0,
12
+ launchPlanMs: 0,
13
+ schedulerImportMs: 0,
14
+ schedulerResolveMs: 0,
15
+ schedulerCapacityWaitMs: 0,
16
+ schedulerSubmitMs: 0,
17
+ };
18
+ }
19
+
20
+ export type PlayAdmissionBatchTimings = ReturnType<
21
+ typeof createPlayAdmissionBatchTimings
22
+ >;
23
+
24
+ export type PlayAdmissionResponseTimings = Partial<
25
+ { admissionHandlerStartedAt: number } & Record<
26
+ `admission_${'preflightMs' | keyof PlayAdmissionBatchTimings}`,
27
+ number
28
+ >
29
+ >;
30
+
31
+ const ADMISSION_RESPONSE_TIMING_KEYS: readonly (
32
+ | 'preflightMs'
33
+ | keyof PlayAdmissionBatchTimings
34
+ )[] = [
35
+ 'preflightMs',
36
+ ...(Object.keys(
37
+ createPlayAdmissionBatchTimings(),
38
+ ) as (keyof PlayAdmissionBatchTimings)[]),
39
+ ];
40
+
41
+ /** Accept only this endpoint's fixed numeric diagnostics, never raw headers. */
42
+ export function readPlayAdmissionResponseTimings(
43
+ response: Pick<Response, 'headers'>,
44
+ ) {
45
+ const timings: PlayAdmissionResponseTimings = {};
46
+ const startedAt = response.headers.get(
47
+ 'x-deepline-admission-handler-started-at',
48
+ );
49
+ if (startedAt !== null && /^\d+$/.test(startedAt)) {
50
+ const value = Number(startedAt);
51
+ if (Number.isSafeInteger(value)) timings.admissionHandlerStartedAt = value;
52
+ }
53
+ const serverTiming = response.headers.get('server-timing') ?? '';
54
+ for (const key of ADMISSION_RESPONSE_TIMING_KEYS) {
55
+ const match = serverTiming.match(
56
+ new RegExp(`(?:^|,\\s*)${key};dur=(\\d+(?:\\.\\d+)?)(?=,|$)`),
57
+ );
58
+ if (match) {
59
+ const value = Number(match[1]);
60
+ if (Number.isFinite(value)) timings[`admission_${key}`] = value;
61
+ }
62
+ }
63
+ return timings;
64
+ }
@@ -191,6 +191,7 @@ import {
191
191
  relayPublishedToolResultReference,
192
192
  serializeToolExecuteResult,
193
193
  deserializeToolExecuteResult,
194
+ mergeToolExecuteResultListGetterMetadata,
194
195
  type ParsedToolExecuteResponse,
195
196
  type ToolExecuteResult,
196
197
  type ToolResultExecutionMetadata,
@@ -7670,6 +7671,7 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
7670
7671
  extractors: metadata?.extractors ?? {},
7671
7672
  targetGetters: metadata?.targetGetters ?? {},
7672
7673
  listExtractorPaths: metadata?.listExtractorPaths ?? [],
7674
+ listExtractorAliases: metadata?.listExtractorAliases,
7673
7675
  listIdentityGetters: metadata?.listIdentityGetters ?? {},
7674
7676
  };
7675
7677
  }
@@ -7694,10 +7696,18 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
7694
7696
  requestInput?: Record<string, unknown>;
7695
7697
  }): Promise<ToolExecuteResult> {
7696
7698
  if (isToolExecuteResult(input.result)) {
7699
+ const result =
7700
+ input.toolId === 'hunter_discover'
7701
+ ? mergeToolExecuteResultListGetterMetadata(
7702
+ input.result,
7703
+ input.metadata ??
7704
+ (await this.resolveToolResultMetadata(input.toolId)),
7705
+ )
7706
+ : input.result;
7697
7707
  const wrapped = await this.attachCustomerDbDatasetResult(
7698
7708
  input.toolId,
7699
7709
  input.requestInput,
7700
- cloneToolExecuteResultWithExecution(input.result, input.execution),
7710
+ cloneToolExecuteResultWithExecution(result, input.execution),
7701
7711
  );
7702
7712
  return input.receiptOutputRef
7703
7713
  ? attachRelayPublishedToolResultReference(
@@ -9,10 +9,7 @@ import {
9
9
  export const MODAL_RUNNER_APP_NAME = 'deepline-play-runner';
10
10
  export const MODAL_RUNNER_IMAGE = 'node:20-bookworm-slim';
11
11
  export const MODAL_RUNNER_WORKDIR = '/root/deepline';
12
-
13
- // Modal bills one physical core as two vCPUs. This matches the standard
14
- // Deepline one-vCPU / one-GiB sandbox.
15
- export const MODAL_SANDBOX_CPU_CORES = 0.5;
12
+ export { MODAL_SANDBOX_CPU_CORES } from './worker-api-types';
16
13
  export const MODAL_SANDBOX_MEMORY_MIB = 1024;
17
14
 
18
15
  export type ModalRequiredConfig = {
@@ -371,6 +371,7 @@ type RuntimeToolMetadata = {
371
371
  };
372
372
  targetGetters?: Record<string, string[]>;
373
373
  listExtractorPaths?: string[];
374
+ listExtractorAliases?: ToolResultMetadataInput['listExtractorAliases'];
374
375
  listIdentityGetters?: Record<string, string[]>;
375
376
  eventWait?: boolean;
376
377
  asyncOperation?:
@@ -2564,6 +2565,7 @@ async function run(
2564
2565
  extractors: metadata.extractors ?? {},
2565
2566
  targetGetters: metadata.targetGetters ?? {},
2566
2567
  listExtractorPaths: metadata.listExtractorPaths ?? [],
2568
+ listExtractorAliases: metadata.listExtractorAliases,
2567
2569
  listIdentityGetters: metadata.listIdentityGetters ?? {},
2568
2570
  };
2569
2571
  },
@@ -59,6 +59,13 @@ const LOCAL_PROCESS_COMPUTE_DISK_GIB = 3;
59
59
  export const LOCAL_PROCESS_CANCEL_GRACE_MS = 2_000;
60
60
  const LOCAL_PROCESS_CANCELLED_ERROR = 'Local play runner cancelled';
61
61
 
62
+ function localProcessCancellationMessage(signal?: AbortSignal): string {
63
+ const reason = signal?.reason;
64
+ return typeof reason === 'string' && reason.trim()
65
+ ? reason.trim()
66
+ : LOCAL_PROCESS_CANCELLED_ERROR;
67
+ }
68
+
62
69
  export const LOCAL_PROCESS_COMPUTE_PROFILE = {
63
70
  source: LOCAL_PROCESS_COMPUTE_SOURCE,
64
71
  cpu: LOCAL_PROCESS_COMPUTE_CPU,
@@ -88,7 +95,11 @@ async function runCommand(
88
95
  ): Promise<CommandExecutionResult> {
89
96
  return await new Promise((resolve, reject) => {
90
97
  if (callbacks?.cancellationSignal?.aborted) {
91
- reject(new Error(LOCAL_PROCESS_CANCELLED_ERROR));
98
+ reject(
99
+ new Error(
100
+ localProcessCancellationMessage(callbacks.cancellationSignal),
101
+ ),
102
+ );
92
103
  return;
93
104
  }
94
105
 
@@ -156,11 +167,9 @@ async function runCommand(
156
167
  return;
157
168
  }
158
169
  cancellationRequested = true;
159
- const reason = callbacks?.cancellationSignal?.reason;
160
- cancellationErrorMessage =
161
- typeof reason === 'string' && reason.trim()
162
- ? reason.trim()
163
- : LOCAL_PROCESS_CANCELLED_ERROR;
170
+ cancellationErrorMessage = localProcessCancellationMessage(
171
+ callbacks?.cancellationSignal,
172
+ );
164
173
  killTree('SIGTERM');
165
174
  cancelKillTimer = setTimeout(() => {
166
175
  // Kill the whole group even if the direct child already exited: a