deepline 0.3.392 → 0.3.394

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 (153) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +156 -24
  2. package/dist/bundling-sources/sdk/src/compat.ts +9 -0
  3. package/dist/bundling-sources/sdk/src/http.ts +5 -1
  4. package/dist/bundling-sources/sdk/src/index.ts +5 -0
  5. package/dist/bundling-sources/sdk/src/plays/run-request.ts +182 -6
  6. package/dist/bundling-sources/sdk/src/release.ts +4 -1
  7. package/dist/bundling-sources/sdk/src/types.ts +13 -0
  8. package/dist/bundling-sources/shared_libs/integration-contracts/request-warnings.ts +64 -0
  9. package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +315 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +41 -8
  11. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +895 -54
  12. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +41 -4
  13. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-policy.ts +28 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/durable-invocation-fence.ts +36 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +251 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +11 -3
  17. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +1 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +30 -1
  19. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +26 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +168 -10
  21. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +252 -10
  22. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +92 -58
  23. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +7 -1
  24. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +30 -7
  25. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1161 -316
  26. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +28 -15
  27. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +24 -3
  28. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +32 -0
  29. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +103 -23
  30. package/dist/bundling-sources/shared_libs/plays/core.ts +1 -1
  31. package/dist/bundling-sources/shared_libs/plays/dataset.ts +172 -79
  32. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +173 -1
  33. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +18 -0
  34. package/dist/cli/auth-IHKISLJQ.js +39 -0
  35. package/dist/cli/{auth-6JSA2ZCW.mjs → auth-OSXDAVCF.mjs} +4 -4
  36. package/dist/cli/{billing-Q5BLQHIU.js → billing-EKLYOXUY.js} +101 -74
  37. package/dist/cli/{billing-MRRO643H.mjs → billing-ZNNKX3UR.mjs} +32 -5
  38. package/dist/cli/{chunk-4SFPVW7A.js → chunk-2MDDA7A4.js} +26 -26
  39. package/dist/cli/{chunk-JOFPQGXW.js → chunk-354JCXA2.js} +50 -50
  40. package/dist/cli/{chunk-7E66A24V.mjs → chunk-3HU47EGZ.mjs} +71 -9
  41. package/dist/cli/{chunk-DSWSEHRX.mjs → chunk-3HWALOL2.mjs} +1 -1
  42. package/dist/cli/{chunk-T7OKJ2T6.js → chunk-4P27AXEA.js} +73 -63
  43. package/dist/cli/{chunk-24VEN5PQ.mjs → chunk-5BB2RGAX.mjs} +190 -18
  44. package/dist/cli/{chunk-JSLPHFP7.js → chunk-6YAUMG27.js} +3 -2
  45. package/dist/cli/{chunk-MU6M3URX.mjs → chunk-BP33SIZF.mjs} +1 -1
  46. package/dist/cli/{chunk-WMS5U6YB.js → chunk-CS6RAIVY.js} +20 -19
  47. package/dist/cli/{chunk-CVLM3WMJ.js → chunk-E23BQ5SC.js} +242 -183
  48. package/dist/cli/{chunk-2GAHHSLB.mjs → chunk-FJGW5GXU.mjs} +3 -2
  49. package/dist/cli/{chunk-YN6YA7ZZ.mjs → chunk-JHIJIHFB.mjs} +79 -20
  50. package/dist/cli/{chunk-Q6EOHNRH.mjs → chunk-JI2B4RZP.mjs} +119 -6
  51. package/dist/cli/{chunk-5O4B6AUN.js → chunk-KB4SDX5S.js} +71 -9
  52. package/dist/cli/{chunk-RV6ALZIX.js → chunk-KGNTKMRG.js} +32 -7
  53. package/dist/cli/{chunk-6DBOU7UH.js → chunk-KI635JN4.js} +176 -87
  54. package/dist/cli/{chunk-2FQG2HU4.js → chunk-KIUMEOM5.js} +8 -8
  55. package/dist/cli/{chunk-Y6VOGHF2.mjs → chunk-KZZC33PY.mjs} +0 -181
  56. package/dist/cli/{chunk-2Q3GEFL4.mjs → chunk-M57J2SK4.mjs} +2 -2
  57. package/dist/cli/{chunk-R3O2CZ4H.mjs → chunk-MFB2VKBO.mjs} +2 -2
  58. package/dist/cli/{chunk-QGKPTBRR.js → chunk-MH73HMPV.js} +3 -3
  59. package/dist/cli/{chunk-BB3FNYFY.js → chunk-MLPU5SMZ.js} +2 -2
  60. package/dist/cli/{chunk-2G7DXFHI.mjs → chunk-NR3DFKNF.mjs} +27 -2
  61. package/dist/cli/{chunk-EY7RFC6A.js → chunk-QIQBYKLB.js} +15 -15
  62. package/dist/cli/{chunk-RIV2GS5E.js → chunk-RBJYWRCF.js} +638 -466
  63. package/dist/cli/{chunk-3VN4FTE3.js → chunk-RDXFGPJU.js} +1 -182
  64. package/dist/cli/{chunk-YAZCDBXX.mjs → chunk-TJI2EN6K.mjs} +3 -2
  65. package/dist/cli/chunk-UBKA33KY.mjs +310 -0
  66. package/dist/cli/{chunk-PAIMOGCM.js → chunk-UHNDVD3P.js} +125 -12
  67. package/dist/cli/{chunk-4TCT77UF.js → chunk-URWF7NGQ.js} +6 -1
  68. package/dist/cli/{chunk-2QLML6G4.mjs → chunk-UXFSWG3Q.mjs} +4 -4
  69. package/dist/cli/{chunk-UCKJQG25.js → chunk-VK6FYZLP.js} +8 -8
  70. package/dist/cli/{chunk-ZTACINO5.mjs → chunk-X63FDZJZ.mjs} +13 -3
  71. package/dist/cli/chunk-XDVT3GOM.js +310 -0
  72. package/dist/cli/{chunk-A3APGZFP.mjs → chunk-XRQ2AQL7.mjs} +2 -2
  73. package/dist/cli/{chunk-3FV4GBRK.mjs → chunk-XXUDVEXK.mjs} +97 -8
  74. package/dist/cli/{chunk-PQSA443V.mjs → chunk-ZI2ZNDJK.mjs} +6 -1
  75. package/dist/cli/{chunk-HGYBEAQP.mjs → chunk-ZYBGA4AR.mjs} +3 -3
  76. package/dist/cli/command-docs.js +2 -2
  77. package/dist/cli/command-docs.mjs +1 -1
  78. package/dist/cli/{csv-E4QGUIGI.mjs → csv-5AXRB35H.mjs} +3 -3
  79. package/dist/cli/{csv-26U5T24Z.js → csv-LU7O75WE.js} +12 -12
  80. package/dist/cli/{db-JTRJIAQW.mjs → db-7XP5UWEW.mjs} +6 -5
  81. package/dist/cli/{db-QHBFLMVL.js → db-F7YTFKVM.js} +31 -30
  82. package/dist/cli/{describe-FDV2V74F.js → describe-FRH32RDV.js} +24 -23
  83. package/dist/cli/{describe-E3DE3ZK3.mjs → describe-K4ES5LIL.mjs} +17 -16
  84. package/dist/cli/{executions-B3GTNPRE.mjs → executions-IEHEHJUO.mjs} +6 -5
  85. package/dist/cli/{executions-VZYOGVQY.js → executions-RZV5XPT2.js} +8 -7
  86. package/dist/cli/{feedback-CR55FJA2.js → feedback-3P65QTX3.js} +7 -7
  87. package/dist/cli/{feedback-4CEBR3OV.mjs → feedback-FPUVZBAN.mjs} +3 -3
  88. package/dist/cli/{git-NM2PHHZ4.mjs → git-GLVVP7TY.mjs} +4 -4
  89. package/dist/cli/git-MFFAWVVX.js +23 -0
  90. package/dist/cli/index.js +100 -96
  91. package/dist/cli/index.mjs +47 -43
  92. package/dist/cli/{legacy-noops-A7MSW5ND.mjs → legacy-noops-3MOI6NBM.mjs} +4 -4
  93. package/dist/cli/{legacy-noops-ZUA4YFIH.js → legacy-noops-XKSGZR7Q.js} +7 -7
  94. package/dist/cli/{monitors-NVPRQYP3.mjs → monitors-FTBGNEFG.mjs} +6 -5
  95. package/dist/cli/{monitors-ZE3TLZ4H.js → monitors-NZ2DYNST.js} +87 -86
  96. package/dist/cli/{org-U7A6DV5D.js → org-MCKDQXIV.js} +66 -65
  97. package/dist/cli/{org-KUBILNQV.mjs → org-V2J5RBCN.mjs} +6 -5
  98. package/dist/cli/{play-HRDXQ4QE.mjs → play-AJFGME3B.mjs} +11 -10
  99. package/dist/cli/play-WLSN2EO2.js +158 -0
  100. package/dist/cli/{providers-VD6YTVQZ.js → providers-2JEZ2264.js} +9 -8
  101. package/dist/cli/{providers-OHIWI453.mjs → providers-I6RQJZFZ.mjs} +6 -5
  102. package/dist/cli/{quickstart-UBV2FONF.mjs → quickstart-BIDQDMO4.mjs} +3 -3
  103. package/dist/cli/{quickstart-ETTCWPA4.js → quickstart-GJ2RPDU3.js} +5 -5
  104. package/dist/cli/run-identity-G257GQED.js +25 -0
  105. package/dist/cli/run-identity-MRNCEGV2.mjs +25 -0
  106. package/dist/cli/search-5VN4YD4I.js +27 -0
  107. package/dist/cli/{search-F44IZRT7.mjs → search-ELRXFWG5.mjs} +7 -6
  108. package/dist/cli/{secrets-CAEMRORF.js → secrets-53IT6VXD.js} +15 -14
  109. package/dist/cli/{secrets-R6XOJZKU.mjs → secrets-SQXGZXIC.mjs} +6 -5
  110. package/dist/cli/{sessions-RLN6UQS3.mjs → sessions-2X5QF7SL.mjs} +4 -4
  111. package/dist/cli/{sessions-6GC7OFTT.js → sessions-CAV5M77Y.js} +5 -5
  112. package/dist/cli/{settings-DPNVUAV2.js → settings-532WNAZO.js} +76 -75
  113. package/dist/cli/{settings-KIPAMRPP.mjs → settings-7P67VGCJ.mjs} +9 -8
  114. package/dist/cli/{setup-DTL3L5SG.js → setup-6L2VSUWJ.js} +41 -41
  115. package/dist/cli/{setup-TU2F7PU5.mjs → setup-QGGBV2LE.mjs} +6 -6
  116. package/dist/cli/{skills-UV5MYJ46.mjs → skills-3FE62WBG.mjs} +4 -4
  117. package/dist/cli/skills-S6NPZAN7.js +28 -0
  118. package/dist/cli/tools-647RLXQS.js +41 -0
  119. package/dist/cli/{tools-QRRNDCQ7.mjs → tools-DMR25DEF.mjs} +10 -9
  120. package/dist/cli/{update-4426TF35.mjs → update-6RZMHJZP.mjs} +6 -6
  121. package/dist/cli/update-WVTSC3EM.js +28 -0
  122. package/dist/cli/{workflow-N4U5VLZ3.mjs → workflow-L2DQRE6R.mjs} +7 -6
  123. package/dist/cli/{workflow-HNLOVISB.js → workflow-TX4F2PIX.js} +17 -16
  124. package/dist/{client-e6Qh5ZIg.d.mts → client-BktIPdIj.d.mts} +153 -4
  125. package/dist/{client-Uxuy-xQ2.d.ts → client-C3O1Ipf3.d.ts} +153 -4
  126. package/dist/{compiler-manifest-CY2v8ab0.d.ts → compiler-manifest-DLxUY5kI.d.mts} +124 -10
  127. package/dist/{compiler-manifest-CY2v8ab0.d.mts → compiler-manifest-DLxUY5kI.d.ts} +124 -10
  128. package/dist/{index-BZ6uzZJl.d.ts → index-B_GM9E3q.d.ts} +1 -1
  129. package/dist/{index-B9fBZH1g.d.mts → index-SCb0NvDb.d.mts} +1 -1
  130. package/dist/index.d.mts +5 -5
  131. package/dist/index.d.ts +5 -5
  132. package/dist/index.js +120 -29
  133. package/dist/index.mjs +111 -20
  134. package/dist/install-integrity.json +94 -88
  135. package/dist/plays/bundle-play-file.d.mts +3 -3
  136. package/dist/plays/bundle-play-file.d.ts +3 -3
  137. package/dist/plays/bundle-play-file.mjs +2 -2
  138. package/dist/plays/run-request.d.mts +2 -2
  139. package/dist/plays/run-request.d.ts +2 -2
  140. package/dist/plays/run-request.js +5 -2
  141. package/dist/plays/run-request.mjs +4 -1
  142. package/dist/release.d.mts +4 -1
  143. package/dist/release.d.ts +4 -1
  144. package/dist/release.js +2 -2
  145. package/dist/release.mjs +1 -1
  146. package/package.json +1 -1
  147. package/dist/cli/auth-67TAELQL.js +0 -39
  148. package/dist/cli/git-I5JTK6YU.js +0 -23
  149. package/dist/cli/play-A2V7YDU7.js +0 -157
  150. package/dist/cli/search-WWXMBVPH.js +0 -26
  151. package/dist/cli/skills-SWOSEZLB.js +0 -28
  152. package/dist/cli/tools-IL2YCDQ6.js +0 -40
  153. package/dist/cli/update-BERDPEYR.js +0 -28
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkRV6ALZIXjs = require('./chunk-RV6ALZIX.js');
4
+ var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
5
5
 
6
6
 
7
- var _chunkWMS5U6YBjs = require('./chunk-WMS5U6YB.js');
7
+ var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
 
@@ -139,7 +139,7 @@ function currentSessionFile(agent) {
139
139
  const newestFirst = listSessionFiles(agent).sort(
140
140
  (a, b) => b.mtimeMs - a.mtimeMs
141
141
  );
142
- const sessionId = _chunkWMS5U6YBjs.agentSessionIdFromEnvironment.call(void 0, );
142
+ const sessionId = _chunkCS6RAIVYjs.agentSessionIdFromEnvironment.call(void 0, );
143
143
  const cwd = process.cwd();
144
144
  return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(newestFirst.find((candidate) => candidate.sessionId === sessionId), () => ( newestFirst.find(
145
145
  (candidate) => sessionStartedInDirectory(candidate, cwd)
@@ -448,7 +448,7 @@ function buildSessionUploadContent(raw) {
448
448
  return { encodedContent: encoded, needsChunking: true };
449
449
  }
450
450
  async function uploadPayload(path, payload) {
451
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
451
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
452
452
  return await http.post(path, payload);
453
453
  }
454
454
  async function uploadChunkedSessions(sessions, options) {
@@ -481,7 +481,7 @@ async function uploadChunkedSessions(sessions, options) {
481
481
  ...options.rating ? { rating: options.rating } : {}
482
482
  });
483
483
  const sessionIds = sessions.map((session) => session.sessionId);
484
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
484
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
485
485
  {
486
486
  ...response,
487
487
  ok: true,
@@ -513,7 +513,7 @@ async function handleSessionsSend(options) {
513
513
  filename: _path.basename.call(void 0, filePath),
514
514
  ...rating ? { rating } : {}
515
515
  });
516
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
516
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
517
517
  {
518
518
  ...response2,
519
519
  ok: true,
@@ -563,7 +563,7 @@ async function handleSessionsSend(options) {
563
563
  ...rating ? { rating } : {}
564
564
  });
565
565
  const sessionIds = built.map((session) => session.sessionId);
566
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
566
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
567
567
  {
568
568
  ...response,
569
569
  ok: true,
@@ -671,7 +671,7 @@ ${refreshMeta}
671
671
  </body>
672
672
  </html>`;
673
673
  _fs.writeFileSync.call(void 0, outputPath, html, "utf8");
674
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
674
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
675
675
  {
676
676
  ok: true,
677
677
  file: outputPath,
@@ -477,184 +477,6 @@ function extractSummaryFields(payload) {
477
477
  return {};
478
478
  }
479
479
 
480
- // ../plays/row-identity.ts
481
- var POSTGRES_IDENTIFIER_MAX_LENGTH = 63;
482
- var MAP_KEY_NAMESPACE_MAX_LENGTH = POSTGRES_IDENTIFIER_MAX_LENGTH;
483
- var SHA256_INITIAL_HASH = [
484
- 1779033703,
485
- 3144134277,
486
- 1013904242,
487
- 2773480762,
488
- 1359893119,
489
- 2600822924,
490
- 528734635,
491
- 1541459225
492
- ];
493
- var SHA256_ROUND_CONSTANTS = [
494
- 1116352408,
495
- 1899447441,
496
- 3049323471,
497
- 3921009573,
498
- 961987163,
499
- 1508970993,
500
- 2453635748,
501
- 2870763221,
502
- 3624381080,
503
- 310598401,
504
- 607225278,
505
- 1426881987,
506
- 1925078388,
507
- 2162078206,
508
- 2614888103,
509
- 3248222580,
510
- 3835390401,
511
- 4022224774,
512
- 264347078,
513
- 604807628,
514
- 770255983,
515
- 1249150122,
516
- 1555081692,
517
- 1996064986,
518
- 2554220882,
519
- 2821834349,
520
- 2952996808,
521
- 3210313671,
522
- 3336571891,
523
- 3584528711,
524
- 113926993,
525
- 338241895,
526
- 666307205,
527
- 773529912,
528
- 1294757372,
529
- 1396182291,
530
- 1695183700,
531
- 1986661051,
532
- 2177026350,
533
- 2456956037,
534
- 2730485921,
535
- 2820302411,
536
- 3259730800,
537
- 3345764771,
538
- 3516065817,
539
- 3600352804,
540
- 4094571909,
541
- 275423344,
542
- 430227734,
543
- 506948616,
544
- 659060556,
545
- 883997877,
546
- 958139571,
547
- 1322822218,
548
- 1537002063,
549
- 1747873779,
550
- 1955562222,
551
- 2024104815,
552
- 2227730452,
553
- 2361852424,
554
- 2428436474,
555
- 2756734187,
556
- 3204031479,
557
- 3329325298
558
- ];
559
- function stableValue(value) {
560
- if (Array.isArray(value)) {
561
- return value.map((entry) => stableValue(entry));
562
- }
563
- if (value && typeof value === "object") {
564
- return Object.fromEntries(
565
- Object.entries(value).filter(([, entry]) => entry !== void 0).sort(([left], [right]) => left.localeCompare(right)).map(([key, entry]) => [key, stableValue(entry)])
566
- );
567
- }
568
- return value;
569
- }
570
- function stableStringify(value) {
571
- return JSON.stringify(stableValue(value));
572
- }
573
- function rightRotate32(value, bits) {
574
- return value >>> bits | value << 32 - bits;
575
- }
576
- function sha256Hex(input) {
577
- const bytes = Array.from(new TextEncoder().encode(input));
578
- const bitLength = bytes.length * 8;
579
- bytes.push(128);
580
- while (bytes.length % 64 !== 56) {
581
- bytes.push(0);
582
- }
583
- const highBits = Math.floor(bitLength / 4294967296);
584
- const lowBits = bitLength >>> 0;
585
- bytes.push(
586
- highBits >>> 24 & 255,
587
- highBits >>> 16 & 255,
588
- highBits >>> 8 & 255,
589
- highBits & 255,
590
- lowBits >>> 24 & 255,
591
- lowBits >>> 16 & 255,
592
- lowBits >>> 8 & 255,
593
- lowBits & 255
594
- );
595
- const hash = [...SHA256_INITIAL_HASH];
596
- const words = new Array(64).fill(0);
597
- for (let offset = 0; offset < bytes.length; offset += 64) {
598
- for (let index = 0; index < 16; index += 1) {
599
- const wordOffset = offset + index * 4;
600
- words[index] = (bytes[wordOffset] ?? 0) << 24 | (bytes[wordOffset + 1] ?? 0) << 16 | (bytes[wordOffset + 2] ?? 0) << 8 | (bytes[wordOffset + 3] ?? 0);
601
- }
602
- for (let index = 16; index < 64; index += 1) {
603
- const s0 = rightRotate32(words[index - 15], 7) ^ rightRotate32(words[index - 15], 18) ^ words[index - 15] >>> 3;
604
- const s1 = rightRotate32(words[index - 2], 17) ^ rightRotate32(words[index - 2], 19) ^ words[index - 2] >>> 10;
605
- words[index] = words[index - 16] + s0 + words[index - 7] + s1 >>> 0;
606
- }
607
- let [a, b, c, d, e, f, g, h] = hash;
608
- for (let index = 0; index < 64; index += 1) {
609
- const s1 = rightRotate32(e, 6) ^ rightRotate32(e, 11) ^ rightRotate32(e, 25);
610
- const ch = e & f ^ ~e & g;
611
- const temp1 = h + s1 + ch + SHA256_ROUND_CONSTANTS[index] + words[index] >>> 0;
612
- const s0 = rightRotate32(a, 2) ^ rightRotate32(a, 13) ^ rightRotate32(a, 22);
613
- const maj = a & b ^ a & c ^ b & c;
614
- const temp2 = s0 + maj >>> 0;
615
- h = g;
616
- g = f;
617
- f = e;
618
- e = d + temp1 >>> 0;
619
- d = c;
620
- c = b;
621
- b = a;
622
- a = temp1 + temp2 >>> 0;
623
- }
624
- hash[0] = hash[0] + a >>> 0;
625
- hash[1] = hash[1] + b >>> 0;
626
- hash[2] = hash[2] + c >>> 0;
627
- hash[3] = hash[3] + d >>> 0;
628
- hash[4] = hash[4] + e >>> 0;
629
- hash[5] = hash[5] + f >>> 0;
630
- hash[6] = hash[6] + g >>> 0;
631
- hash[7] = hash[7] + h >>> 0;
632
- }
633
- return hash.map((word) => word.toString(16).padStart(8, "0")).join("");
634
- }
635
- function sanitizeIdentifierPart(value) {
636
- return value.trim().replace(/[^a-z0-9]+/gi, "_").replace(/_+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
637
- }
638
- function validateIdentifierPart(rawValue, label, maxLength) {
639
- const sanitized = sanitizeIdentifierPart(rawValue);
640
- if (!sanitized) {
641
- throw new Error(`${label} must contain a letter or number.`);
642
- }
643
- if (sanitized.length > maxLength) {
644
- throw new Error(
645
- `${label} is too long after normalization (${sanitized.length}/${maxLength}): "${sanitized}".`
646
- );
647
- }
648
- return sanitized;
649
- }
650
- function normalizeTableNamespace(value) {
651
- return validateIdentifierPart(
652
- value,
653
- "ctx.dataset() key",
654
- MAP_KEY_NAMESPACE_MAX_LENGTH
655
- );
656
- }
657
-
658
480
  export {
659
481
  EMAIL_STATUS_JSON_SCHEMA,
660
482
  buildEmailStatus,
@@ -664,9 +486,6 @@ export {
664
486
  DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS,
665
487
  DEEPLINE_EXTRACTOR_TARGETS,
666
488
  isDeeplineExtractorTarget,
667
- stableStringify,
668
- sha256Hex,
669
- normalizeTableNamespace,
670
489
  tryConvertToList,
671
490
  projectRowOutput,
672
491
  writeJsonOutputFile,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getAuthedHttpClient,
3
3
  printCommandEnvelope
4
- } from "./chunk-2G7DXFHI.mjs";
4
+ } from "./chunk-NR3DFKNF.mjs";
5
5
  import {
6
6
  agentSessionIdFromEnvironment
7
- } from "./chunk-2GAHHSLB.mjs";
7
+ } from "./chunk-FJGW5GXU.mjs";
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
  import {
@@ -2,7 +2,7 @@ import {
2
2
  argsWantJson,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-2G7DXFHI.mjs";
5
+ } from "./chunk-NR3DFKNF.mjs";
6
6
  import {
7
7
  ACTIVE_ORG_ID_ENV,
8
8
  ACTIVE_ORG_NAME_ENV,
@@ -25,7 +25,7 @@ import {
25
25
  saveHostEnvValues,
26
26
  saveProjectDeeplineEnvValues,
27
27
  storedHostApiKey
28
- } from "./chunk-2GAHHSLB.mjs";
28
+ } from "./chunk-FJGW5GXU.mjs";
29
29
 
30
30
  // src/cli/commands/auth.ts
31
31
  import {
@@ -3,7 +3,7 @@
3
3
  var _chunk3KC45UVFjs = require('./chunk-3KC45UVF.js');
4
4
 
5
5
 
6
- var _chunk5O4B6AUNjs = require('./chunk-5O4B6AUN.js');
6
+ var _chunkKB4SDX5Sjs = require('./chunk-KB4SDX5S.js');
7
7
 
8
8
 
9
9
 
@@ -54,7 +54,7 @@ function buildPlayContractCompatibility(input) {
54
54
  artifactVersion: PLAY_ARTIFACT_VERSION,
55
55
  runtimeBackend: _nullishCoalesce(_optionalChain([input, 'optionalAccess', _ => _.runtimeBackend]), () => ( null)),
56
56
  toolErrorSchemaVersion: _nullishCoalesce(_optionalChain([input, 'optionalAccess', _2 => _2.toolErrorSchemaVersion]), () => ( _chunk7P5AA3SNjs.TOOL_EXECUTION_ERROR_SCHEMA_VERSION)),
57
- authoringContractEdition: _nullishCoalesce(_optionalChain([input, 'optionalAccess', _3 => _3.authoringContractEdition]), () => ( _chunk5O4B6AUNjs.PLAY_AUTHORING_CONTRACT_EDITION)),
57
+ authoringContractEdition: _nullishCoalesce(_optionalChain([input, 'optionalAccess', _3 => _3.authoringContractEdition]), () => ( _chunkKB4SDX5Sjs.PLAY_AUTHORING_CONTRACT_EDITION)),
58
58
  toolResponseContract: _nullishCoalesce(_optionalChain([input, 'optionalAccess', _4 => _4.toolResponseContract]), () => ( _chunkS6R3OX7Bjs.RAW_V2_TOOL_RESPONSE_CONTRACT)),
59
59
  toolResponseReceiptRevision: _chunkS6R3OX7Bjs.normalizeToolResponseReceiptRevision.call(void 0,
60
60
  _nullishCoalesce(_optionalChain([input, 'optionalAccess', _5 => _5.toolResponseReceiptRevision]), () => ( _chunkS6R3OX7Bjs.RAW_V2_TOOL_RESPONSE_RECEIPT_REVISION))
@@ -2733,7 +2733,7 @@ async function bundlePlayFile(filePath, options) {
2733
2733
  analysis.graphHash = sha256(
2734
2734
  `${analysis.graphHash}
2735
2735
  entry-export:${exportName}
2736
- authoring-contract-edition:${_chunk5O4B6AUNjs.PLAY_AUTHORING_CONTRACT_EDITION}`
2736
+ authoring-contract-edition:${_chunkKB4SDX5Sjs.PLAY_AUTHORING_CONTRACT_EDITION}`
2737
2737
  );
2738
2738
  const sourceFiles = Object.fromEntries(
2739
2739
  Object.entries(analysis.sourceFiles).map(([sourcePath, sourceCode]) => [
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkT7OKJ2T6js = require('./chunk-T7OKJ2T6.js');
3
+ var _chunk4P27AXEAjs = require('./chunk-4P27AXEA.js');
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  var _child_process = require('child_process');
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
13
13
  }
14
14
  function readNpmVersion(env) {
15
15
  try {
16
- const plan = _chunkT7OKJ2T6js.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
16
+ const plan = _chunk4P27AXEAjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
17
17
  const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
18
18
  encoding: "utf8",
19
19
  env,
@@ -3,9 +3,10 @@ import {
3
3
  detectAgentRuntime,
4
4
  resolveCliCommandContext,
5
5
  resolveConfig
6
- } from "./chunk-2GAHHSLB.mjs";
6
+ } from "./chunk-FJGW5GXU.mjs";
7
7
  import {
8
- DeeplineError
8
+ DeeplineError,
9
+ serializeToolExecutionFailure
9
10
  } from "./chunk-NXGCO4JB.mjs";
10
11
 
11
12
  // src/cli/json-fields.ts
@@ -828,8 +829,30 @@ function printCompactJson(value) {
828
829
  process.stdout.write(`${JSON.stringify(withAgentCommandContext(value))}
829
830
  `);
830
831
  }
832
+ function cliToolExecutionFailure(error) {
833
+ const failure = serializeToolExecutionFailure(error);
834
+ if (!failure) return null;
835
+ const { publicDetails: _publicDetails, ...facts } = failure;
836
+ return facts;
837
+ }
838
+ function formatToolExecutionErrorDiagnostic(error) {
839
+ const failure = cliToolExecutionFailure(error);
840
+ if (!failure) return null;
841
+ const lines = [
842
+ `Tool: ${failure.toolId}${failure.provider ? `; provider: ${failure.provider}` : ""}${failure.operation ? `; operation: ${failure.operation}` : ""}.`,
843
+ `Failure: ${failure.origin} / ${failure.category}. Same-call retry: ${failure.retryable ? `safe${failure.retryAfterMs === null ? "" : ` after ${failure.retryAfterMs}ms`}` : "unsafe"}.`
844
+ ];
845
+ if (failure.networkKind || failure.networkScope) {
846
+ lines.push(
847
+ `Network: ${failure.networkKind ?? "unknown"}${failure.networkScope ? ` (${failure.networkScope})` : ""}.`
848
+ );
849
+ }
850
+ if (failure.requestId) lines.push(`Request: ${failure.requestId}.`);
851
+ return lines.join("\n");
852
+ }
831
853
  function errorToJsonPayload(error) {
832
854
  const message = error instanceof Error ? error.message : String(error);
855
+ const toolFailure = cliToolExecutionFailure(error);
833
856
  const maybeRecord = error && typeof error === "object" ? error : null;
834
857
  const code = typeof maybeRecord?.code === "string" ? maybeRecord.code : error instanceof SyntaxError ? "INVALID_JSON" : "CLI_ERROR";
835
858
  const details = {};
@@ -868,6 +891,7 @@ function errorToJsonPayload(error) {
868
891
  error: {
869
892
  message,
870
893
  code,
894
+ ...toolFailure ? { tool_error: toolFailure } : {},
871
895
  ...Object.keys(details).length > 0 ? { details } : {}
872
896
  }
873
897
  };
@@ -966,6 +990,7 @@ export {
966
990
  markdownTableFromRows,
967
991
  printJson,
968
992
  printCompactJson,
993
+ formatToolExecutionErrorDiagnostic,
969
994
  errorToJsonPayload,
970
995
  formatProviderConcurrencyDiagnostic,
971
996
  printJsonError,
@@ -1,17 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkBB3FNYFYjs = require('./chunk-BB3FNYFY.js');
4
+ var _chunkMLPU5SMZjs = require('./chunk-MLPU5SMZ.js');
5
5
 
6
6
 
7
7
 
8
- var _chunkT7OKJ2T6js = require('./chunk-T7OKJ2T6.js');
8
+ var _chunk4P27AXEAjs = require('./chunk-4P27AXEA.js');
9
9
 
10
10
 
11
- var _chunkRV6ALZIXjs = require('./chunk-RV6ALZIX.js');
11
+ var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
12
12
 
13
13
 
14
- var _chunkWMS5U6YBjs = require('./chunk-WMS5U6YB.js');
14
+ var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
15
15
 
16
16
  // src/cli/commands/update.ts
17
17
  var _child_process = require('child_process');
@@ -489,7 +489,7 @@ function normalizedNpmPrefix(value) {
489
489
  }
490
490
  function resolveNpmGlobalPrefix(env) {
491
491
  try {
492
- const plan = _chunkT7OKJ2T6js.resolveShellSpawn.call(void 0, "npm", ["prefix", "-g"], process.platform, env);
492
+ const plan = _chunk4P27AXEAjs.resolveShellSpawn.call(void 0, "npm", ["prefix", "-g"], process.platform, env);
493
493
  const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
494
494
  encoding: "utf8",
495
495
  env,
@@ -545,8 +545,8 @@ function resolveUpdatePlan(options = {}) {
545
545
  const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
546
546
  const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
547
547
  const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
548
- const npmVersion = options.npmVersion === void 0 ? _chunkBB3FNYFYjs.readNpmVersion.call(void 0, env) : options.npmVersion;
549
- const npmGlobalInstallFlags = _chunkBB3FNYFYjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
548
+ const npmVersion = options.npmVersion === void 0 ? _chunkMLPU5SMZjs.readNpmVersion.call(void 0, env) : options.npmVersion;
549
+ const npmGlobalInstallFlags = _chunkMLPU5SMZjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
550
550
  const args = installPrefix ? [
551
551
  "install",
552
552
  "-g",
@@ -556,7 +556,7 @@ function resolveUpdatePlan(options = {}) {
556
556
  packageSpec
557
557
  ] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
558
558
  const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
559
- _optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || _chunkWMS5U6YBjs.autoDetectBaseUrl.call(void 0, )
559
+ _optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || _chunkCS6RAIVYjs.autoDetectBaseUrl.call(void 0, )
560
560
  );
561
561
  return {
562
562
  kind: "npm-global",
@@ -703,7 +703,7 @@ function sidecarInstallFailure(versionDir) {
703
703
  function runCommand(command, args, env = process.env) {
704
704
  return new Promise((resolveResult) => {
705
705
  let output = "";
706
- const plan = _chunkT7OKJ2T6js.resolveShellSpawn.call(void 0, command, args, process.platform, env);
706
+ const plan = _chunk4P27AXEAjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
707
707
  const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
708
708
  stdio: ["inherit", "pipe", "pipe"],
709
709
  shell: plan.shell,
@@ -1079,14 +1079,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
1079
1079
  throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
1080
1080
  }
1081
1081
  async function runUpdateCommand(options, dependencies = {}) {
1082
- const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkWMS5U6YBjs.autoDetectBaseUrl));
1082
+ const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkCS6RAIVYjs.autoDetectBaseUrl));
1083
1083
  const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
1084
1084
  const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
1085
1085
  const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
1086
1086
  const originalWrite = process.stdout.write.bind(process.stdout);
1087
1087
  process.stdout.write = (() => true);
1088
1088
  try {
1089
- const exitCode = await _chunkT7OKJ2T6js.runSkillsCommand.call(void 0, { json: true });
1089
+ const exitCode = await _chunk4P27AXEAjs.runSkillsCommand.call(void 0, { json: true });
1090
1090
  if (exitCode !== 0) {
1091
1091
  throw new Error(
1092
1092
  `Deepline skills update failed with exit ${exitCode}.`
@@ -1157,11 +1157,11 @@ async function runUpdateCommand(options, dependencies = {}) {
1157
1157
  ]
1158
1158
  };
1159
1159
  if (options.json && !options.executeWithJson) {
1160
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
1160
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
1161
1161
  return 0;
1162
1162
  }
1163
1163
  if (options.printCommand) {
1164
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1164
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1165
1165
  {
1166
1166
  ...plan,
1167
1167
  render: {
@@ -1174,7 +1174,7 @@ async function runUpdateCommand(options, dependencies = {}) {
1174
1174
  return 0;
1175
1175
  }
1176
1176
  if (plan.kind === "source" || plan.kind === "homebrew") {
1177
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
1177
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
1178
1178
  return 0;
1179
1179
  }
1180
1180
  stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
@@ -1204,7 +1204,7 @@ To retry with full installer output, run: deepline skills
1204
1204
  );
1205
1205
  }
1206
1206
  if (options.executeWithJson && options.json) {
1207
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1207
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1208
1208
  {
1209
1209
  ok: true,
1210
1210
  pinnedVersion