deepline 0.3.450 → 0.3.451

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 (96) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +133 -2
  3. package/dist/cli/auth-WPQBEOES.js +40 -0
  4. package/dist/cli/{auth-CHYW6BU3.mjs → auth-YLBWEMRW.mjs} +4 -4
  5. package/dist/cli/{billing-YADYH5P7.mjs → billing-DUFOEOPT.mjs} +4 -4
  6. package/dist/cli/{billing-NCV2CBLH.js → billing-GWG5D3P6.js} +73 -73
  7. package/dist/cli/{chunk-2UNTSLTR.mjs → chunk-33EM4SMH.mjs} +3 -3
  8. package/dist/cli/{chunk-3SRJO6H4.mjs → chunk-37CPEQBE.mjs} +3 -3
  9. package/dist/cli/{chunk-ZEVUPOF6.mjs → chunk-3HT47QPJ.mjs} +2 -2
  10. package/dist/cli/{chunk-3JEMYGIR.mjs → chunk-4C7HPD57.mjs} +1 -1
  11. package/dist/cli/{chunk-7IUG4STX.js → chunk-5DUMNKQG.js} +50 -50
  12. package/dist/cli/{chunk-47GRLLV2.js → chunk-6G6KX7I7.js} +6 -6
  13. package/dist/cli/{chunk-UMA7425N.js → chunk-6TFACCXN.js} +2 -2
  14. package/dist/cli/{chunk-JWZIZH2C.js → chunk-7VRWERTM.js} +10 -10
  15. package/dist/cli/{chunk-N42KCXPD.mjs → chunk-BJOVX7EB.mjs} +2 -2
  16. package/dist/cli/{chunk-B4T7EFBZ.mjs → chunk-BQQLTSGC.mjs} +4 -4
  17. package/dist/cli/{chunk-NSIOVSNZ.js → chunk-C4NPWUZY.js} +52 -52
  18. package/dist/cli/{chunk-CBM27PDJ.js → chunk-CH2WDSBC.js} +8 -8
  19. package/dist/cli/{chunk-HRRVDDFH.mjs → chunk-E7V5CRA2.mjs} +8 -8
  20. package/dist/cli/{chunk-OZ5ME7BP.js → chunk-EJ6YI46S.js} +2 -2
  21. package/dist/cli/{chunk-IESQOIOE.js → chunk-F2DW7DFE.js} +8 -8
  22. package/dist/cli/{chunk-IGMBTEF7.js → chunk-HSKLAPMD.js} +26 -26
  23. package/dist/cli/{chunk-XUD5AOQY.js → chunk-JRPNCMMN.js} +35 -35
  24. package/dist/cli/{chunk-QROZFMGC.mjs → chunk-JUCEEIEC.mjs} +1 -1
  25. package/dist/cli/{chunk-IYBC6WON.js → chunk-L2IUGWV5.js} +1 -1
  26. package/dist/cli/{chunk-B2V2F3KV.mjs → chunk-LPPAJJJN.mjs} +1 -1
  27. package/dist/cli/{chunk-LTQCEQOZ.js → chunk-O3KVUHCG.js} +20 -20
  28. package/dist/cli/{chunk-EKVOSR3S.mjs → chunk-OKTCLFKM.mjs} +5 -5
  29. package/dist/cli/{chunk-5R7YPB5X.mjs → chunk-PJYTV24I.mjs} +1 -1
  30. package/dist/cli/{chunk-CA3NM3W4.mjs → chunk-RFPP4Q66.mjs} +3 -3
  31. package/dist/cli/{chunk-2SASGLVN.js → chunk-TFCLUWDQ.js} +6 -6
  32. package/dist/cli/{chunk-6TABNDCB.js → chunk-WDOWAOYB.js} +4 -4
  33. package/dist/cli/{chunk-ZYORWYLP.mjs → chunk-WLVGRU5A.mjs} +2 -2
  34. package/dist/cli/{chunk-4Z356NPN.mjs → chunk-XLOXUW5Y.mjs} +1 -1
  35. package/dist/cli/{chunk-UJHJXWM4.mjs → chunk-YXXIFMXI.mjs} +2 -2
  36. package/dist/cli/{chunk-2VKDHJU3.js → chunk-Z3DBS4IB.js} +81 -81
  37. package/dist/cli/{chunk-VYMLYV2K.js → chunk-ZNDE2BTH.js} +16 -16
  38. package/dist/cli/{chunk-AJUNUE32.mjs → chunk-ZPV7DMAA.mjs} +1 -1
  39. package/dist/cli/{csv-VQLS5D7H.js → csv-4CHXZQXO.js} +12 -12
  40. package/dist/cli/{csv-7PXCJKYS.mjs → csv-RL7WQD6Y.mjs} +3 -3
  41. package/dist/cli/{db-XDUC3MFP.js → db-MRI5IM2A.js} +25 -25
  42. package/dist/cli/{db-JYLMLQQO.mjs → db-ZDBAWV7B.mjs} +4 -4
  43. package/dist/cli/{describe-G6SRQQHS.js → describe-2FYKXM5B.js} +16 -16
  44. package/dist/cli/{describe-LDHY5HTB.mjs → describe-RRQUUJQ3.mjs} +12 -12
  45. package/dist/cli/{executions-HPI65XBL.js → executions-KDBD47A5.js} +6 -6
  46. package/dist/cli/{executions-M7MDBFHA.mjs → executions-RJL76TJS.mjs} +4 -4
  47. package/dist/cli/{feedback-Y66JKRPN.js → feedback-2CE24NHD.js} +7 -7
  48. package/dist/cli/{feedback-6V4DDJVD.mjs → feedback-KOYLXHYE.mjs} +3 -3
  49. package/dist/cli/git-DZ5GROPH.js +24 -0
  50. package/dist/cli/{git-BTKGTTGF.mjs → git-RDUHU6L6.mjs} +4 -4
  51. package/dist/cli/index.js +131 -131
  52. package/dist/cli/index.mjs +36 -36
  53. package/dist/cli/{legacy-noops-MUBHYOEG.mjs → legacy-noops-4HS2LYP6.mjs} +4 -4
  54. package/dist/cli/{legacy-noops-DEVCEE64.js → legacy-noops-7FOMGBMN.js} +7 -7
  55. package/dist/cli/{monitors-2DJFA7XX.js → monitors-IJXNK5BL.js} +87 -85
  56. package/dist/cli/{monitors-SOGDSYPL.mjs → monitors-JLBTNBVU.mjs} +7 -5
  57. package/dist/cli/{org-UWMWVV73.js → org-JL7SW6VY.js} +66 -66
  58. package/dist/cli/{org-D6ZFFG4D.mjs → org-OWP6K4AA.mjs} +4 -4
  59. package/dist/cli/{play-TIR2S6IA.mjs → play-FNOVKU74.mjs} +10 -10
  60. package/dist/cli/{play-P423OXCU.js → play-LLNZWHT6.js} +283 -283
  61. package/dist/cli/{providers-6F5F6D4O.js → providers-E4XIEUC7.js} +7 -7
  62. package/dist/cli/{providers-HRDAG3UX.mjs → providers-WBOEOKE7.mjs} +4 -4
  63. package/dist/cli/{quickstart-SOWZOPAS.js → quickstart-3FUHKGEY.js} +5 -5
  64. package/dist/cli/{quickstart-UMZS7HBY.mjs → quickstart-6G5G3BVA.mjs} +3 -3
  65. package/dist/cli/search-4ECC773X.js +30 -0
  66. package/dist/cli/{search-5FGZVQSP.mjs → search-CNMB4Z6M.mjs} +5 -5
  67. package/dist/cli/{secrets-SACNVEWL.mjs → secrets-5FY5APVK.mjs} +4 -4
  68. package/dist/cli/{secrets-7E2TOVYP.js → secrets-BDSWOYAT.js} +13 -13
  69. package/dist/cli/{sessions-FNON33JD.js → sessions-B7T2CHYK.js} +5 -5
  70. package/dist/cli/{sessions-5VCX7MYU.mjs → sessions-PMIKVPQN.mjs} +4 -4
  71. package/dist/cli/{settings-EJACNJR4.mjs → settings-4TAYLTPR.mjs} +8 -8
  72. package/dist/cli/{settings-6MYQGDQX.js → settings-RXQJRRLR.js} +75 -75
  73. package/dist/cli/{setup-KJ7IADVC.mjs → setup-LVUISLVO.mjs} +7 -7
  74. package/dist/cli/{setup-QVEIV4R4.js → setup-ZTMETGSO.js} +42 -42
  75. package/dist/cli/skills-MIENPTOD.js +29 -0
  76. package/dist/cli/{skills-SUV3DJEU.mjs → skills-NSJ43Z5Q.mjs} +5 -5
  77. package/dist/cli/{tools-H4ZL5QDZ.mjs → tools-CFCKIGDY.mjs} +12 -12
  78. package/dist/cli/tools-CXJO5XSH.js +44 -0
  79. package/dist/cli/update-B2LQGEXF.js +31 -0
  80. package/dist/cli/{update-5UGF4334.mjs → update-HYOCBXJO.mjs} +7 -7
  81. package/dist/cli/{workflow-RABLQNGO.mjs → workflow-RKX45RJ4.mjs} +5 -5
  82. package/dist/cli/{workflow-THIBJ3VE.js → workflow-U6S4SWTF.js} +15 -15
  83. package/dist/index.js +6 -6
  84. package/dist/index.mjs +3 -3
  85. package/dist/install-integrity.json +78 -78
  86. package/dist/release.d.mts +1 -1
  87. package/dist/release.d.ts +1 -1
  88. package/dist/release.js +2 -2
  89. package/dist/release.mjs +1 -1
  90. package/package.json +1 -1
  91. package/dist/cli/auth-3LOZKBPO.js +0 -40
  92. package/dist/cli/git-VVC5BRCG.js +0 -24
  93. package/dist/cli/search-BDIO4BBH.js +0 -30
  94. package/dist/cli/skills-YPH2KNH6.js +0 -29
  95. package/dist/cli/tools-X23MQMNE.js +0 -44
  96. package/dist/cli/update-GZOPNTGJ.js +0 -31
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
205
205
  // getters keep their established compatibility behavior.
206
206
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
207
207
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
208
- version: '0.3.450',
208
+ version: '0.3.451',
209
209
  updateSummary: {
210
210
  introducedIn: '0.3.90',
211
211
  summary:
@@ -64,6 +64,14 @@ const TERMINAL_TRANSPORT_OUTPUT_WARNINGS_MAX_BYTES = 32 * 1024;
64
64
  const TERMINAL_TRANSPORT_RUNTIME_DIAGNOSTICS_MAX_BYTES = 16 * 1024;
65
65
  const TERMINAL_TRANSPORT_ERROR_MAX_BYTES = 64 * 1024;
66
66
  const TERMINAL_TRANSPORT_TABLE_NAMESPACE_MAX_BYTES = 8 * 1024;
67
+ /**
68
+ * Leaves room in the gateway body for the action, run ID and log offset around
69
+ * the result. `terminalRequestBody` drops progress events to fit on its own.
70
+ */
71
+ const TERMINAL_SUSPENDED_RESULT_MAX_BYTES =
72
+ RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES - 4 * 1024;
73
+ const RUNTIME_SUSPENDED_CHECKPOINT_TOO_LARGE_CODE =
74
+ 'RUNTIME_SUSPENDED_CHECKPOINT_TOO_LARGE';
67
75
 
68
76
  type CompletedRunnerResult = Extract<PlayRunnerResult, { status: 'completed' }>;
69
77
  type SuspendedRunnerResult = Extract<PlayRunnerResult, { status: 'suspended' }>;
@@ -288,6 +296,7 @@ function appendTerminalDiagnosticsMarker(
288
296
  logContexts?: Array<PlayLogContext | null>,
289
297
  logIds?: string[],
290
298
  logMetadata?: Array<PlayLogMetadata | null>,
299
+ completeness = 'the authored play output is complete.',
291
300
  ): {
292
301
  logs: string[];
293
302
  logContexts?: Array<PlayLogContext | null>;
@@ -296,7 +305,7 @@ function appendTerminalDiagnosticsMarker(
296
305
  } {
297
306
  const marker =
298
307
  `[deepline] terminal diagnostic metadata was bounded (${truncatedFields.join(', ')}); ` +
299
- 'the authored play output is complete.';
308
+ completeness;
300
309
  const marked = [marker, ...logs];
301
310
  const markedContexts = logContexts ? [null, ...logContexts] : undefined;
302
311
  const markedMetadata = logMetadata ? [null, ...logMetadata] : undefined;
@@ -495,6 +504,126 @@ function boundSettledTerminalTransportDiagnostics(
495
504
  };
496
505
  }
497
506
 
507
+ /**
508
+ * The gateway rejects a body over its ceiling before reading the action, and
509
+ * that line is also too long for the crash pusher's output tail, so an oversized
510
+ * suspended result surfaces only as an unexplained "exited with code 0". Keep
511
+ * ordinary suspensions byte-identical. When one would not fit, drop runner
512
+ * diagnostics first. The checkpoint is never sliced: without it the run cannot
513
+ * resume, so a checkpoint that alone exceeds the ceiling is an explicit failure.
514
+ */
515
+ function suspendedResultWithinGatewayBody(
516
+ result: SuspendedRunnerResult & IncludedResumeCheckpoint,
517
+ ): PlayRunnerTerminalTransportResult {
518
+ if (fitsJsonByteLimit(result, TERMINAL_SUSPENDED_RESULT_MAX_BYTES)) {
519
+ return result;
520
+ }
521
+ const logProjection = retainTerminalLogTailWithRuntimeDiagnostics(
522
+ result.logs,
523
+ result.logContexts,
524
+ result.logMetadata,
525
+ result.logIds,
526
+ );
527
+ const stats =
528
+ result.stats.runtimeWorkCounterSegment === undefined
529
+ ? result.stats
530
+ : {
531
+ // The worker reads this to number the resumed segment, so it must
532
+ // be the first key retained rather than whichever one fits.
533
+ runtimeWorkCounterSegment: result.stats.runtimeWorkCounterSegment,
534
+ ...result.stats,
535
+ };
536
+ const statsProjection = retainRecordWithinJsonByteLimit(
537
+ stats,
538
+ TERMINAL_TRANSPORT_STATS_MAX_BYTES,
539
+ );
540
+ const stepsProjection = retainArrayWithinJsonByteLimit(
541
+ result.steps,
542
+ TERMINAL_TRANSPORT_STEPS_MAX_BYTES,
543
+ 'head',
544
+ );
545
+ const truncatedFields = [
546
+ ...(logProjection.truncated ? ['logs'] : []),
547
+ ...(statsProjection.truncated ? ['stats'] : []),
548
+ ...(stepsProjection.truncated ? ['steps'] : []),
549
+ ];
550
+ const projectAligned = <T>(values: readonly T[] | undefined) =>
551
+ values?.length
552
+ ? logProjection.indexes.map((index) => values[index]!)
553
+ : undefined;
554
+ const boundedLogs =
555
+ truncatedFields.length > 0
556
+ ? appendTerminalDiagnosticsMarker(
557
+ logProjection.values,
558
+ truncatedFields,
559
+ projectAligned(result.logContexts),
560
+ projectAligned(result.logIds),
561
+ projectAligned(result.logMetadata),
562
+ 'the resume checkpoint is complete.',
563
+ )
564
+ : {
565
+ logs: logProjection.values,
566
+ logContexts: projectAligned(result.logContexts),
567
+ logIds: projectAligned(result.logIds),
568
+ logMetadata: projectAligned(result.logMetadata),
569
+ };
570
+ const bounded = {
571
+ ...result,
572
+ logs: boundedLogs.logs,
573
+ logContexts: boundedLogs.logContexts,
574
+ logMetadata: boundedLogs.logMetadata,
575
+ logIds: boundedLogs.logIds,
576
+ stats: statsProjection.value,
577
+ steps: stepsProjection.values,
578
+ };
579
+ if (fitsJsonByteLimit(bounded, TERMINAL_SUSPENDED_RESULT_MAX_BYTES)) {
580
+ return bounded;
581
+ }
582
+ // A run that can still resume must not fail over diagnostics, so keep only
583
+ // what the worker needs before giving up on the checkpoint.
584
+ const segment = result.stats.runtimeWorkCounterSegment;
585
+ const withoutDiagnostics = {
586
+ ...result,
587
+ logs: [
588
+ '[deepline] terminal diagnostic metadata was dropped (logs, stats, steps); the resume checkpoint is complete.',
589
+ ],
590
+ logContexts: undefined,
591
+ logMetadata: undefined,
592
+ logIds: undefined,
593
+ stats: segment === undefined ? {} : { runtimeWorkCounterSegment: segment },
594
+ steps: [],
595
+ };
596
+ if (
597
+ fitsJsonByteLimit(withoutDiagnostics, TERMINAL_SUSPENDED_RESULT_MAX_BYTES)
598
+ ) {
599
+ return withoutDiagnostics;
600
+ }
601
+ const { checkpoint: _checkpoint, suspension, ...diagnostics } = bounded;
602
+ const checkpointMiB = (result.checkpointBytes / (1024 * 1024)).toFixed(2);
603
+ const limitMiB = RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES / (1024 * 1024);
604
+ const message =
605
+ `The play paused (${suspension.kind}) with a ${checkpointMiB} MiB resume checkpoint, which does not fit the ${limitMiB} MiB limit, so it cannot resume. ` +
606
+ 'Split the work into smaller runs, or finish fewer tool calls before the pause.';
607
+ const error = `${RUNTIME_SUSPENDED_CHECKPOINT_TOO_LARGE_CODE}: ${message}`;
608
+ return {
609
+ ...diagnostics,
610
+ status: 'failed',
611
+ error,
612
+ errors: [
613
+ {
614
+ code: RUNTIME_SUSPENDED_CHECKPOINT_TOO_LARGE_CODE,
615
+ phase: 'runtime',
616
+ message,
617
+ retryable: false,
618
+ cause: error,
619
+ },
620
+ ],
621
+ checkpointDisposition:
622
+ RUNNER_TERMINAL_CHECKPOINT_DISPOSITION.OMITTED_TERMINAL_REPLAY,
623
+ checkpointBytes: result.checkpointBytes,
624
+ };
625
+ }
626
+
498
627
  export function runnerTerminalResultForTransport(
499
628
  result: PlayRunnerResult | PlayRunnerTerminalTransportResult,
500
629
  ): PlayRunnerTerminalTransportResult {
@@ -534,7 +663,9 @@ export function runnerTerminalResultForTransport(
534
663
  if (transportResult.status === 'suspended') {
535
664
  // A suspended result retains its exact checkpoint because it is needed to
536
665
  // resume. Its checkpoint follows the dedicated receipt transport contract.
537
- return transportResult;
666
+ return suspendedResultWithinGatewayBody(
667
+ transportResult as SuspendedRunnerResult & IncludedResumeCheckpoint,
668
+ );
538
669
  }
539
670
  const bounded = boundSettledTerminalTransportDiagnostics(transportResult);
540
671
  if (!fitsJsonByteLimit(bounded, TERMINAL_RUN_RESULT_MAX_BYTES)) {
@@ -0,0 +1,40 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+ var _chunk5DUMNKQGjs = require('./chunk-5DUMNKQG.js');
17
+ require('./chunk-6G6KX7I7.js');
18
+ require('./chunk-WDOWAOYB.js');
19
+ require('./chunk-ALJJRZNJ.js');
20
+ require('./chunk-XNYIZMNQ.js');
21
+ require('./chunk-DIAWYWT5.js');
22
+ require('./chunk-L2IUGWV5.js');
23
+ require('./chunk-OG64RBAC.js');
24
+ require('./chunk-COGTRVWW.js');
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+ exports.EXIT_WORKSPACE_MISMATCH = _chunk5DUMNKQGjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunk5DUMNKQGjs.authStatusLine; exports.clearPendingClaim = _chunk5DUMNKQGjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunk5DUMNKQGjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunk5DUMNKQGjs.handleRegister; exports.handleStatus = _chunk5DUMNKQGjs.handleStatus; exports.handleWait = _chunk5DUMNKQGjs.handleWait; exports.httpJson = _chunk5DUMNKQGjs.httpJson; exports.readPendingAuthClaim = _chunk5DUMNKQGjs.readPendingAuthClaim; exports.readStatusBanner = _chunk5DUMNKQGjs.readStatusBanner; exports.registerAuthCommands = _chunk5DUMNKQGjs.registerAuthCommands; exports.reportSetupCompleted = _chunk5DUMNKQGjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunk5DUMNKQGjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunk5DUMNKQGjs.statusBannerLine;
@@ -13,13 +13,13 @@ import {
13
13
  reportSetupCompleted,
14
14
  resolvePendingAuthClaimForResume,
15
15
  statusBannerLine
16
- } from "./chunk-N42KCXPD.mjs";
17
- import "./chunk-4Z356NPN.mjs";
18
- import "./chunk-5R7YPB5X.mjs";
16
+ } from "./chunk-BJOVX7EB.mjs";
17
+ import "./chunk-XLOXUW5Y.mjs";
18
+ import "./chunk-PJYTV24I.mjs";
19
19
  import "./chunk-4QF2K7TM.mjs";
20
20
  import "./chunk-DLIRSHV6.mjs";
21
21
  import "./chunk-HBL4PM5Q.mjs";
22
- import "./chunk-AJUNUE32.mjs";
22
+ import "./chunk-ZPV7DMAA.mjs";
23
23
  import "./chunk-WZYKRD7T.mjs";
24
24
  import "./chunk-KRD6H754.mjs";
25
25
  export {
@@ -2,7 +2,7 @@ import {
2
2
  DeeplineClient,
3
3
  iterateCursorPages,
4
4
  requireBillingIdempotencyKey
5
- } from "./chunk-B2V2F3KV.mjs";
5
+ } from "./chunk-LPPAJJJN.mjs";
6
6
  import "./chunk-L2VKAASU.mjs";
7
7
  import "./chunk-FAG4DFUC.mjs";
8
8
  import "./chunk-EIMG75BT.mjs";
@@ -13,8 +13,8 @@ import {
13
13
  openInBrowser,
14
14
  printCommandEnvelope,
15
15
  shouldEmitJson
16
- } from "./chunk-4Z356NPN.mjs";
17
- import "./chunk-5R7YPB5X.mjs";
16
+ } from "./chunk-XLOXUW5Y.mjs";
17
+ import "./chunk-PJYTV24I.mjs";
18
18
  import {
19
19
  AuthError,
20
20
  ConfigError
@@ -23,7 +23,7 @@ import "./chunk-DLIRSHV6.mjs";
23
23
  import {
24
24
  DeeplineError
25
25
  } from "./chunk-HBL4PM5Q.mjs";
26
- import "./chunk-AJUNUE32.mjs";
26
+ import "./chunk-ZPV7DMAA.mjs";
27
27
  import "./chunk-WZYKRD7T.mjs";
28
28
  import "./chunk-KRD6H754.mjs";
29
29