deepline 0.3.479 → 0.3.481

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 (152) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +35 -1
  2. package/dist/bundling-sources/sdk/src/http-core.ts +2 -0
  3. package/dist/bundling-sources/sdk/src/plays/run-request.ts +54 -31
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/shared_libs/monitors/legacy-radar-forward-routes.ts +569 -0
  6. package/dist/bundling-sources/shared_libs/monitors/legacy-radar-retirement.ts +451 -0
  7. package/dist/bundling-sources/shared_libs/monitors/package.json +5 -1
  8. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/runtime-array-input-receipts.ts +13 -6
  10. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +2 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +125 -22
  12. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +16 -53
  13. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +34 -48
  14. package/dist/bundling-sources/shared_libs/security/receipt-admission-token.ts +44 -0
  15. package/dist/cli/auth-EQWYBNIE.js +43 -0
  16. package/dist/cli/{auth-D7DYB57R.mjs → auth-FYY65LYD.mjs} +7 -5
  17. package/dist/cli/{billing-DT4JT4QN.mjs → billing-3MELYUTI.mjs} +7 -7
  18. package/dist/cli/{billing-DHGSNM6E.js → billing-TROHWBSE.js} +80 -80
  19. package/dist/cli/{chunk-GQCH6Y7W.js → chunk-27BYXQU4.js} +1 -1
  20. package/dist/cli/{chunk-CK2Q6AWR.js → chunk-4CIVXXSU.js} +26 -26
  21. package/dist/cli/{chunk-G6V34EQ5.js → chunk-5ONCPLWC.js} +16 -16
  22. package/dist/cli/{chunk-27GSBTWD.js → chunk-6VKDKATO.js} +96 -65
  23. package/dist/cli/{chunk-LXYDN5FE.js → chunk-6WWBVWFQ.js} +7 -7
  24. package/dist/cli/{chunk-JNFNNJ75.mjs → chunk-6ZMUAASO.mjs} +4 -4
  25. package/dist/cli/{chunk-6C3QY5JS.mjs → chunk-75LUK4E5.mjs} +1 -1
  26. package/dist/cli/{chunk-JKUFOP7M.mjs → chunk-7VVC4RZX.mjs} +1 -1
  27. package/dist/cli/{chunk-N7E25EU2.mjs → chunk-ASQJUUGB.mjs} +5 -5
  28. package/dist/cli/{chunk-FKEZ5DIJ.mjs → chunk-BJ5UFTWL.mjs} +28 -7
  29. package/dist/cli/{chunk-W4HIOBQQ.js → chunk-BJMEXKZY.js} +2 -2
  30. package/dist/cli/{chunk-YC2QBF2W.mjs → chunk-C7UIUKW6.mjs} +2 -2
  31. package/dist/cli/{chunk-AKVNUNL7.js → chunk-CM3KC74A.js} +3 -3
  32. package/dist/cli/{chunk-JFGOMQW6.mjs → chunk-CS2P3EQS.mjs} +2 -2
  33. package/dist/cli/{chunk-VKBLXJCK.js → chunk-CUSWZTS7.js} +8 -8
  34. package/dist/cli/{chunk-GSULE54L.js → chunk-D3UHG54V.js} +199 -178
  35. package/dist/cli/{chunk-3PHOAUU4.mjs → chunk-EJTU6X6C.mjs} +41 -10
  36. package/dist/cli/{chunk-AFHFZU5V.js → chunk-EPEAQA6O.js} +37 -37
  37. package/dist/cli/{chunk-K5RRY7DJ.mjs → chunk-EPZSX7FZ.mjs} +4 -4
  38. package/dist/cli/{chunk-27PXHD2P.mjs → chunk-FXLMDAAY.mjs} +1 -1
  39. package/dist/cli/chunk-GBAT5NMI.mjs +789 -0
  40. package/dist/cli/{chunk-Y2MVDYV6.js → chunk-GJOKFJ2Y.js} +10 -10
  41. package/dist/cli/{chunk-JDMR33HS.js → chunk-GVAENVIG.js} +28 -19
  42. package/dist/cli/{chunk-NELMCOWK.mjs → chunk-HNRELVCS.mjs} +27 -18
  43. package/dist/cli/{chunk-GICSDK72.mjs → chunk-HXG7TYRS.mjs} +2 -2
  44. package/dist/cli/{chunk-EMVWC5LP.js → chunk-J4D3PCQ2.js} +5 -5
  45. package/dist/cli/{chunk-6QIXWFPO.mjs → chunk-JE27DTQM.mjs} +3 -3
  46. package/dist/cli/{chunk-3GIM7XRH.js → chunk-KDU6TSGE.js} +2 -2
  47. package/dist/cli/{chunk-JMCTNS6S.js → chunk-KPXP2DIY.js} +7 -9
  48. package/dist/cli/chunk-KQSTV4MW.js +789 -0
  49. package/dist/cli/{chunk-RJVUILW4.mjs → chunk-LISZBUA7.mjs} +2 -2
  50. package/dist/cli/{chunk-D6MLXRMQ.mjs → chunk-LTOY2GUJ.mjs} +10 -10
  51. package/dist/cli/{chunk-FBEXJVQL.js → chunk-MKDWU3ZI.js} +93 -93
  52. package/dist/cli/{chunk-UOYA35OT.mjs → chunk-N5267HEH.mjs} +1 -1
  53. package/dist/cli/{chunk-XDFARN7U.mjs → chunk-PDJS6LFI.mjs} +2 -1
  54. package/dist/cli/{chunk-J5VDE42G.js → chunk-R4EFW2I2.js} +3 -3
  55. package/dist/cli/{chunk-GONL4EFT.mjs → chunk-RV2GB7KW.mjs} +2 -2
  56. package/dist/cli/{chunk-GZ43YXHT.mjs → chunk-S5BM6NPJ.mjs} +3 -5
  57. package/dist/cli/{chunk-PUOKABQF.mjs → chunk-S5WXSC3P.mjs} +5 -5
  58. package/dist/cli/{chunk-ZJRVHQSZ.mjs → chunk-SOGLBLMH.mjs} +4 -4
  59. package/dist/cli/{chunk-FV7WGK5X.js → chunk-SVPM2E2U.js} +5 -5
  60. package/dist/cli/{chunk-XBYW5EHY.mjs → chunk-UUGSZZZH.mjs} +1 -1
  61. package/dist/cli/{chunk-3SGA53DX.js → chunk-VBDR2DP6.js} +3 -3
  62. package/dist/cli/{chunk-O5BUFQ2P.mjs → chunk-VRAOWHXJ.mjs} +1 -1
  63. package/dist/cli/{chunk-TZCHXF4R.mjs → chunk-VTKAIGW6.mjs} +3 -3
  64. package/dist/cli/{chunk-33O2JGHE.js → chunk-WF5QE2IW.js} +17 -16
  65. package/dist/cli/{chunk-OVFCPV24.js → chunk-WICQQ7GY.js} +53 -53
  66. package/dist/cli/{chunk-W6N2S5N7.js → chunk-WTWRZ5ZI.js} +8 -8
  67. package/dist/cli/{chunk-N4M6CO5H.js → chunk-X4XZFIK6.js} +14 -14
  68. package/dist/cli/{chunk-VRZXGJXH.js → chunk-X6MEQBAT.js} +21 -21
  69. package/dist/cli/{csv-JXFOD7DJ.mjs → csv-2EG7JW7V.mjs} +4 -4
  70. package/dist/cli/{csv-DQWOZ2BL.js → csv-OUALOZBF.js} +13 -13
  71. package/dist/cli/{db-Q2OAAXRX.js → db-7BTOI6YB.js} +28 -28
  72. package/dist/cli/{db-NOGMZAQE.mjs → db-ECDQWI2Y.mjs} +7 -7
  73. package/dist/cli/describe-EXSH6OZD.js +48 -0
  74. package/dist/cli/{describe-VKZTZLX6.mjs → describe-KO6WKQIB.mjs} +18 -18
  75. package/dist/cli/describe-core.d.mts +2 -2
  76. package/dist/cli/describe-core.d.ts +2 -2
  77. package/dist/cli/{executions-XU3JMNI3.mjs → executions-3VMFBZT4.mjs} +7 -7
  78. package/dist/cli/{executions-B3GDZ4GQ.js → executions-VZSG3F3E.js} +9 -9
  79. package/dist/cli/{feedback-5IW3ZKRP.js → feedback-ASKBWRXR.js} +8 -8
  80. package/dist/cli/{feedback-R5UQXINE.mjs → feedback-SN7AVALN.mjs} +4 -4
  81. package/dist/cli/{git-7B4H7VEL.mjs → git-W2DZXEAY.mjs} +5 -5
  82. package/dist/cli/git-X2XUKYYX.js +25 -0
  83. package/dist/cli/index.js +167 -144
  84. package/dist/cli/index.mjs +73 -50
  85. package/dist/cli/{legacy-noops-AVT6T5QI.js → legacy-noops-6KOC6LV7.js} +8 -8
  86. package/dist/cli/{legacy-noops-KY7JAALE.mjs → legacy-noops-R2SML7ED.mjs} +5 -5
  87. package/dist/cli/{monitors-G7L7AFXR.mjs → monitors-4VGZGJBT.mjs} +8 -8
  88. package/dist/cli/{monitors-GZB6CWK2.js → monitors-OJXDYU4G.js} +92 -92
  89. package/dist/cli/{org-ZHHKAPCE.js → org-AELMZFUT.js} +73 -73
  90. package/dist/cli/{org-QDUBOQTH.mjs → org-UGN5ZG2Y.mjs} +7 -7
  91. package/dist/cli/{pages-5P3SPMN5.js → pages-L26N7MK3.js} +18 -18
  92. package/dist/cli/{pages-Q4WGQCST.mjs → pages-ZYPAAYSS.mjs} +7 -7
  93. package/dist/cli/{play-WRSHD4RE.mjs → play-ENYB7X4S.mjs} +125 -53
  94. package/dist/cli/{play-IRLKESZB.js → play-VTZWB3N5.js} +620 -548
  95. package/dist/cli/{providers-7CQUHS57.mjs → providers-BZQTVAQG.mjs} +7 -7
  96. package/dist/cli/{providers-LKEYLN6D.js → providers-HWBY6MGQ.js} +10 -10
  97. package/dist/cli/{quickstart-KS45M5SR.js → quickstart-D54IJ3PX.js} +6 -6
  98. package/dist/cli/{quickstart-I6NYGMEE.mjs → quickstart-SSQJDWPB.mjs} +4 -4
  99. package/dist/cli/{run-BLMOBNAN.js → run-45NKE7UY.js} +37 -37
  100. package/dist/cli/{run-AZETCL7R.mjs → run-FR3TPYT3.mjs} +23 -23
  101. package/dist/cli/{search-EEKEP67Y.mjs → search-CZCWSR5L.mjs} +8 -8
  102. package/dist/cli/search-V2GJKQQQ.js +32 -0
  103. package/dist/cli/{secrets-M6NU3TD2.js → secrets-KJ5ZEDWT.js} +16 -16
  104. package/dist/cli/{secrets-HAULG2EW.mjs → secrets-KKK55B4Y.mjs} +7 -7
  105. package/dist/cli/{sessions-5MB4XKOK.mjs → sessions-2YKA54PH.mjs} +5 -5
  106. package/dist/cli/{sessions-DSR5AHIA.js → sessions-QCNPUTDZ.js} +6 -6
  107. package/dist/cli/{settings-JUQP4HYQ.mjs → settings-4NI2AS5V.mjs} +12 -12
  108. package/dist/cli/{settings-6US327NQ.js → settings-KM3LCPWD.js} +79 -79
  109. package/dist/cli/{setup-JRH4UC47.mjs → setup-BZF3M54I.mjs} +33 -18
  110. package/dist/cli/{setup-5ZRSEQUD.js → setup-V5MTS2AA.js} +67 -52
  111. package/dist/cli/skills-CRFYW767.js +33 -0
  112. package/dist/cli/{skills-HFOZ5WDH.mjs → skills-NXYNB3LP.mjs} +7 -7
  113. package/dist/cli/{tools-CJEBZNPB.mjs → tools-57MWFRIZ.mjs} +17 -17
  114. package/dist/cli/tools-Q662HPVJ.js +55 -0
  115. package/dist/cli/{update-VQJEPAAK.mjs → update-QM6H677U.mjs} +9 -9
  116. package/dist/cli/update-TYHKF7F5.js +33 -0
  117. package/dist/cli/{workflow-EYWE3T75.mjs → workflow-NHYDIUWY.mjs} +8 -8
  118. package/dist/cli/{workflow-NKPDRZOP.js → workflow-TGEC4ITO.js} +18 -18
  119. package/dist/{client-B9N1bcGc.d.mts → client-DJ3r8VQJ.d.mts} +1 -1
  120. package/dist/{client-Btw075Hq.d.ts → client-JPSNljtj.d.ts} +1 -1
  121. package/dist/{client-core-TulbIeRB.d.mts → client-core-3SJlNsKU.d.mts} +21 -2
  122. package/dist/{client-core-DvGWlwtX.d.ts → client-core-rCoQ5Xz3.d.ts} +21 -2
  123. package/dist/index.d.mts +3 -3
  124. package/dist/index.d.ts +3 -3
  125. package/dist/index.js +10 -10
  126. package/dist/index.mjs +7 -7
  127. package/dist/install-integrity.json +106 -104
  128. package/dist/plays/bundle-play-file.mjs +5426 -12
  129. package/dist/plays/play-description.d.mts +1 -1
  130. package/dist/plays/play-description.d.ts +1 -1
  131. package/dist/plays/run-request.d.mts +1 -1
  132. package/dist/plays/run-request.d.ts +1 -1
  133. package/dist/plays/run-request.js +4 -2
  134. package/dist/plays/run-request.mjs +3 -1
  135. package/dist/release.d.mts +1 -1
  136. package/dist/release.d.ts +1 -1
  137. package/dist/release.js +2 -2
  138. package/dist/release.mjs +1 -1
  139. package/dist/server.d.mts +2 -2
  140. package/dist/server.d.ts +2 -2
  141. package/dist/server.js +6 -6
  142. package/dist/server.mjs +4 -4
  143. package/package.json +1 -1
  144. package/dist/cli/auth-MZDFNRPG.js +0 -41
  145. package/dist/cli/chunk-7UFFWPQ2.js +0 -6188
  146. package/dist/cli/chunk-ZBSUXXZS.mjs +0 -6188
  147. package/dist/cli/describe-THHHNUEA.js +0 -48
  148. package/dist/cli/git-BX27JAW4.js +0 -25
  149. package/dist/cli/search-PEQXXY2B.js +0 -32
  150. package/dist/cli/skills-P67KCVDR.js +0 -33
  151. package/dist/cli/tools-PDBEAI22.js +0 -55
  152. package/dist/cli/update-G6DI3BQW.js +0 -33
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkLXYDN5FEjs = require('./chunk-LXYDN5FE.js');
5
+ var _chunk6WWBVWFQjs = require('./chunk-6WWBVWFQ.js');
6
6
 
7
7
 
8
8
 
@@ -22,14 +22,14 @@ var _chunkLXYDN5FEjs = require('./chunk-LXYDN5FE.js');
22
22
 
23
23
 
24
24
 
25
- var _chunk3SGA53DXjs = require('./chunk-3SGA53DX.js');
25
+ var _chunkVBDR2DP6js = require('./chunk-VBDR2DP6.js');
26
26
 
27
27
 
28
28
 
29
29
 
30
30
 
31
31
 
32
- var _chunk33O2JGHEjs = require('./chunk-33O2JGHE.js');
32
+ var _chunkWF5QE2IWjs = require('./chunk-WF5QE2IW.js');
33
33
 
34
34
 
35
35
  var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
@@ -50,6 +50,7 @@ var EXIT_SERVER = 5;
50
50
  var EXIT_WORKSPACE_MISMATCH = 6;
51
51
  var AUTH_HTTP_TIMEOUT_MS = 1e4;
52
52
  var AUTH_REGISTER_HTTP_TIMEOUT_MS = 3e4;
53
+ var APPROVAL_LINK_REPORT_TIMEOUT_MS = 750;
53
54
  function statusBannerLine(value) {
54
55
  if (!value || typeof value !== "object" || Array.isArray(value)) return null;
55
56
  const banner = value;
@@ -59,7 +60,7 @@ function statusBannerLine(value) {
59
60
  return `Service notice: ${banner.message}`;
60
61
  }
61
62
  function envFilePath(baseUrl) {
62
- return _chunk3SGA53DXjs.hostEnvFilePath.call(void 0, baseUrl);
63
+ return _chunkVBDR2DP6js.hostEnvFilePath.call(void 0, baseUrl);
63
64
  }
64
65
  function normalizeAuthScope(value) {
65
66
  if (!value || value === "global") return "global";
@@ -72,7 +73,7 @@ function parseAuthScope(args) {
72
73
  }
73
74
  function pendingClaimPath(baseUrl, scope) {
74
75
  if (scope === "folder") {
75
- const target = _chunk3SGA53DXjs.resolveProjectPinTarget.call(void 0, );
76
+ const target = _chunkVBDR2DP6js.resolveProjectPinTarget.call(void 0, );
76
77
  if (!target.ok) {
77
78
  throw new Error(
78
79
  `Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
@@ -82,10 +83,10 @@ function pendingClaimPath(baseUrl, scope) {
82
83
  }
83
84
  return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
84
85
  }
85
- return `${_chunk3SGA53DXjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
86
+ return `${_chunkVBDR2DP6js.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
86
87
  }
87
88
  function legacyPendingClaimTokenPath(baseUrl) {
88
- return `${_chunk3SGA53DXjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
89
+ return `${_chunkVBDR2DP6js.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
89
90
  }
90
91
  function savePendingClaim(baseUrl, claim) {
91
92
  const filePath = pendingClaimPath(baseUrl, claim.scope);
@@ -140,6 +141,8 @@ function readPendingAuthClaim(baseUrl, scope) {
140
141
  claimToken,
141
142
  claimUrl: typeof parsed.claimUrl === "string" && parsed.claimUrl.trim() ? parsed.claimUrl.trim() : `${baseUrl}/api/v2/auth/cli/claim/${encodeURIComponent(claimToken)}`,
142
143
  orgName: typeof parsed.orgName === "string" ? parsed.orgName.trim() : void 0,
144
+ ...parsed.approvalLinkReporting === true ? { approvalLinkReporting: true } : {},
145
+ ...typeof parsed.signupWorkspaceId === "string" ? { signupWorkspaceId: parsed.signupWorkspaceId } : {},
143
146
  // The record's own scope, when it has one. `register` writes this field
144
147
  // precisely so a resume can learn where the credential belongs; reading
145
148
  // back the caller's argument instead made it decorative, and a record
@@ -187,21 +190,21 @@ function parseRegisterWaitMode(args) {
187
190
  function shouldWaitForRegisterClaim(mode) {
188
191
  if (mode === "yes") return true;
189
192
  if (mode === "no") return false;
190
- return _chunk33O2JGHEjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
193
+ return _chunkWF5QE2IWjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
191
194
  }
192
195
  function saveEnvValues(values, baseUrl, scope) {
193
196
  const filtered = {
194
- ...values[_chunk3SGA53DXjs.HOST_URL_ENV] ? { [_chunk3SGA53DXjs.HOST_URL_ENV]: values[_chunk3SGA53DXjs.HOST_URL_ENV] } : {},
195
- ...values[_chunk3SGA53DXjs.API_KEY_ENV] ? { [_chunk3SGA53DXjs.API_KEY_ENV]: values[_chunk3SGA53DXjs.API_KEY_ENV] } : {},
196
- ...values[_chunk3SGA53DXjs.ACTIVE_ORG_ID_ENV] ? { [_chunk3SGA53DXjs.ACTIVE_ORG_ID_ENV]: values[_chunk3SGA53DXjs.ACTIVE_ORG_ID_ENV] } : {},
197
- ...Object.prototype.hasOwnProperty.call(values, _chunk3SGA53DXjs.ACTIVE_ORG_NAME_ENV) ? { [_chunk3SGA53DXjs.ACTIVE_ORG_NAME_ENV]: values[_chunk3SGA53DXjs.ACTIVE_ORG_NAME_ENV] } : {},
197
+ ...values[_chunkVBDR2DP6js.HOST_URL_ENV] ? { [_chunkVBDR2DP6js.HOST_URL_ENV]: values[_chunkVBDR2DP6js.HOST_URL_ENV] } : {},
198
+ ...values[_chunkVBDR2DP6js.API_KEY_ENV] ? { [_chunkVBDR2DP6js.API_KEY_ENV]: values[_chunkVBDR2DP6js.API_KEY_ENV] } : {},
199
+ ...values[_chunkVBDR2DP6js.ACTIVE_ORG_ID_ENV] ? { [_chunkVBDR2DP6js.ACTIVE_ORG_ID_ENV]: values[_chunkVBDR2DP6js.ACTIVE_ORG_ID_ENV] } : {},
200
+ ...Object.prototype.hasOwnProperty.call(values, _chunkVBDR2DP6js.ACTIVE_ORG_NAME_ENV) ? { [_chunkVBDR2DP6js.ACTIVE_ORG_NAME_ENV]: values[_chunkVBDR2DP6js.ACTIVE_ORG_NAME_ENV] } : {},
198
201
  // An explicit empty list must reach the store: it clears a stale line.
199
- ...Object.prototype.hasOwnProperty.call(values, _chunk3SGA53DXjs.FEATURES_ENV) ? { [_chunk3SGA53DXjs.FEATURES_ENV]: values[_chunk3SGA53DXjs.FEATURES_ENV] } : {}
202
+ ...Object.prototype.hasOwnProperty.call(values, _chunkVBDR2DP6js.FEATURES_ENV) ? { [_chunkVBDR2DP6js.FEATURES_ENV]: values[_chunkVBDR2DP6js.FEATURES_ENV] } : {}
200
203
  };
201
204
  if (scope === "folder") {
202
- _chunk3SGA53DXjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
205
+ _chunkVBDR2DP6js.saveProjectDeeplineEnvValues.call(void 0, filtered);
203
206
  } else {
204
- _chunk3SGA53DXjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
207
+ _chunkVBDR2DP6js.saveHostEnvValues.call(void 0, baseUrl, filtered);
205
208
  }
206
209
  }
207
210
  function activeOrgEnvValues(data) {
@@ -209,21 +212,21 @@ function activeOrgEnvValues(data) {
209
212
  if (!orgId) return {};
210
213
  const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
211
214
  return {
212
- [_chunk3SGA53DXjs.ACTIVE_ORG_ID_ENV]: orgId,
213
- [_chunk3SGA53DXjs.ACTIVE_ORG_NAME_ENV]: orgName,
214
- ..._chunk3SGA53DXjs.featureEnvValues.call(void 0, data)
215
+ [_chunkVBDR2DP6js.ACTIVE_ORG_ID_ENV]: orgId,
216
+ [_chunkVBDR2DP6js.ACTIVE_ORG_NAME_ENV]: orgName,
217
+ ..._chunkVBDR2DP6js.featureEnvValues.call(void 0, data)
215
218
  };
216
219
  }
217
220
  async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
218
221
  const headers = {
219
222
  "Content-Type": "application/json",
220
- "User-Agent": `deepline-ts-sdk/${_chunk33O2JGHEjs.SDK_VERSION}`,
223
+ "User-Agent": `deepline-ts-sdk/${_chunkWF5QE2IWjs.SDK_VERSION}`,
221
224
  "X-Deepline-Client-Family": "sdk",
222
225
  "X-Deepline-CLI-Family": "sdk",
223
- "X-Deepline-Agent-Runtime": _chunk33O2JGHEjs.detectAgentRuntime.call(void 0, ),
224
- "X-Deepline-CLI-Version": _chunk33O2JGHEjs.SDK_VERSION,
225
- "X-Deepline-SDK-Version": _chunk33O2JGHEjs.SDK_VERSION,
226
- "X-Deepline-API-Contract": _chunk33O2JGHEjs.SDK_API_CONTRACT
226
+ "X-Deepline-Agent-Runtime": _chunkWF5QE2IWjs.detectAgentRuntime.call(void 0, ),
227
+ "X-Deepline-CLI-Version": _chunkWF5QE2IWjs.SDK_VERSION,
228
+ "X-Deepline-SDK-Version": _chunkWF5QE2IWjs.SDK_VERSION,
229
+ "X-Deepline-API-Contract": _chunkWF5QE2IWjs.SDK_API_CONTRACT
227
230
  };
228
231
  if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
229
232
  const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
@@ -262,10 +265,10 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
262
265
  if (failure.name === "AbortError" || failure.name === "TimeoutError") {
263
266
  throw failure;
264
267
  }
265
- const causeCode = _chunk33O2JGHEjs.networkCauseCode.call(void 0, failure);
268
+ const causeCode = _chunkWF5QE2IWjs.networkCauseCode.call(void 0, failure);
266
269
  throw Object.assign(
267
270
  new (0, _chunkDIAWYWT5js.DeeplineError)(
268
- _chunk33O2JGHEjs.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
271
+ _chunkWF5QE2IWjs.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
269
272
  void 0,
270
273
  "NETWORK_ERROR",
271
274
  causeCode ? { causeCode } : void 0
@@ -282,7 +285,7 @@ async function readStatusBanner(baseUrl) {
282
285
  return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
283
286
  }
284
287
  async function reportSetupCompleted(input) {
285
- const apiKey = input.authScope === "folder" ? _chunk3SGA53DXjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunk3SGA53DXjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
288
+ const apiKey = input.authScope === "folder" ? _chunkVBDR2DP6js.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkVBDR2DP6js.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
286
289
  if (!apiKey) return;
287
290
  try {
288
291
  await httpJson(
@@ -378,8 +381,24 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
378
381
  console.log(` \u2022 Signed in with organization: ${statusData.org_name}`);
379
382
  }
380
383
  }
381
- async function handleRegister(args) {
382
- const baseUrl = _chunk3SGA53DXjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
384
+ async function reportApprovalLinkShown(baseUrl, claim, mode) {
385
+ try {
386
+ await httpJson(
387
+ "POST",
388
+ `${baseUrl}/api/v2/auth/cli/status`,
389
+ null,
390
+ {
391
+ claim_token: claim.claimToken,
392
+ approval_link_shown: mode,
393
+ ...claim.signupWorkspaceId ? { signup_workspace_id: claim.signupWorkspaceId } : {}
394
+ },
395
+ APPROVAL_LINK_REPORT_TIMEOUT_MS
396
+ );
397
+ } catch (e8) {
398
+ }
399
+ }
400
+ async function handleRegister(args, options) {
401
+ const baseUrl = _chunkVBDR2DP6js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
383
402
  let orgName = "";
384
403
  let orgId = "";
385
404
  let agentName = "";
@@ -403,7 +422,7 @@ async function handleRegister(args) {
403
422
  if (!agentName) {
404
423
  try {
405
424
  agentName = _os.hostname.call(void 0, ) || "Deepline CLI (TS)";
406
- } catch (e8) {
425
+ } catch (e9) {
407
426
  agentName = "Deepline CLI (TS)";
408
427
  }
409
428
  }
@@ -425,28 +444,39 @@ async function handleRegister(args) {
425
444
  }
426
445
  const claimUrl = String(data.claim_url || "");
427
446
  const claimToken = String(data.claim_token || "");
447
+ const signupWorkspaceId = _optionalChain([process, 'access', _12 => _12.env, 'access', _13 => _13.DEEPLINE_SIGNUP_WORKSPACE_ID, 'optionalAccess', _14 => _14.trim, 'call', _15 => _15()]);
448
+ const pendingClaim = {
449
+ claimToken,
450
+ claimUrl,
451
+ scope: authScope,
452
+ ...orgName ? { orgName } : {},
453
+ ...data.approval_link_reporting === true ? { approvalLinkReporting: true } : {},
454
+ ...signupWorkspaceId ? { signupWorkspaceId } : {}
455
+ };
428
456
  if (claimToken) {
429
- savePendingClaim(baseUrl, {
430
- claimToken,
431
- claimUrl,
432
- scope: authScope,
433
- ...orgName ? { orgName } : {}
434
- });
457
+ savePendingClaim(baseUrl, pendingClaim);
435
458
  saveEnvValues(
436
459
  {
437
- [_chunk3SGA53DXjs.HOST_URL_ENV]: baseUrl
460
+ [_chunkVBDR2DP6js.HOST_URL_ENV]: baseUrl
438
461
  },
439
462
  baseUrl,
440
463
  authScope
441
464
  );
442
465
  }
443
466
  if (claimUrl) {
444
- const shouldOpen = waitMode !== "no" && _chunk33O2JGHEjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
467
+ const shouldOpen = waitMode !== "no" && _chunkWF5QE2IWjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
445
468
  console.log(
446
469
  shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
447
470
  );
448
471
  console.log(` ${claimUrl}`);
449
- if (shouldOpen) _chunkLXYDN5FEjs.openInBrowser.call(void 0, claimUrl);
472
+ if (shouldOpen) _chunk6WWBVWFQjs.openInBrowser.call(void 0, claimUrl);
473
+ if (claimToken && pendingClaim.approvalLinkReporting && !_optionalChain([options, 'optionalAccess', _16 => _16.deferApprovalLinkReport])) {
474
+ await reportApprovalLinkShown(
475
+ baseUrl,
476
+ pendingClaim,
477
+ shouldOpen ? "auto" : "manual"
478
+ );
479
+ }
450
480
  }
451
481
  if (data.cli_message) {
452
482
  console.log(String(data.cli_message));
@@ -489,8 +519,8 @@ async function handleRegister(args) {
489
519
  if (apiKey) {
490
520
  saveEnvValues(
491
521
  {
492
- [_chunk3SGA53DXjs.HOST_URL_ENV]: baseUrl,
493
- [_chunk3SGA53DXjs.API_KEY_ENV]: apiKey,
522
+ [_chunkVBDR2DP6js.HOST_URL_ENV]: baseUrl,
523
+ [_chunkVBDR2DP6js.API_KEY_ENV]: apiKey,
494
524
  ...activeOrgEnvValues(statusData)
495
525
  },
496
526
  baseUrl,
@@ -512,7 +542,7 @@ async function handleRegister(args) {
512
542
  }
513
543
  }
514
544
  async function handleWait(args) {
515
- const baseUrl = _chunk3SGA53DXjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
545
+ const baseUrl = _chunkVBDR2DP6js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
516
546
  let timeoutSeconds = 300;
517
547
  let requestedScope;
518
548
  if (args.includes("--auth-scope")) {
@@ -534,9 +564,9 @@ async function handleWait(args) {
534
564
  const resumed = resolvePendingAuthClaimForResume(baseUrl, requestedScope);
535
565
  const pendingClaim = resumed.claim;
536
566
  const authScope = resumed.scope;
537
- const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _12 => _12.claimToken]), () => ( ""));
567
+ const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _17 => _17.claimToken]), () => ( ""));
538
568
  if (!pendingClaim) {
539
- const scopedApiKey = authScope === "folder" ? _chunk3SGA53DXjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunk3SGA53DXjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
569
+ const scopedApiKey = authScope === "folder" ? _chunkVBDR2DP6js.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkVBDR2DP6js.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
540
570
  if (scopedApiKey) {
541
571
  console.log("Already connected.");
542
572
  return EXIT_OK;
@@ -579,8 +609,8 @@ async function handleWait(args) {
579
609
  if (apiKey) {
580
610
  saveEnvValues(
581
611
  {
582
- [_chunk3SGA53DXjs.HOST_URL_ENV]: baseUrl,
583
- [_chunk3SGA53DXjs.API_KEY_ENV]: apiKey,
612
+ [_chunkVBDR2DP6js.HOST_URL_ENV]: baseUrl,
613
+ [_chunkVBDR2DP6js.API_KEY_ENV]: apiKey,
584
614
  ...activeOrgEnvValues(data)
585
615
  },
586
616
  baseUrl,
@@ -604,8 +634,8 @@ async function handleWait(args) {
604
634
  return EXIT_AUTH;
605
635
  }
606
636
  async function authStatusLine(timeoutMs = 3e3) {
607
- const baseUrl = _chunk3SGA53DXjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
608
- const apiKey = _chunk3SGA53DXjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
637
+ const baseUrl = _chunkVBDR2DP6js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
638
+ const apiKey = _chunkVBDR2DP6js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
609
639
  if (!apiKey) return `Auth: not connected (${baseUrl})`;
610
640
  try {
611
641
  const { status, data } = await httpJson(
@@ -623,14 +653,14 @@ async function authStatusLine(timeoutMs = 3e3) {
623
653
  }
624
654
  const workspace = typeof data.org_name === "string" && data.org_name.trim() ? data.org_name.trim() : "(unnamed)";
625
655
  return `Auth: connected to workspace ${workspace} (${baseUrl})`;
626
- } catch (e9) {
656
+ } catch (e10) {
627
657
  return `Auth: API key found, not verified (${baseUrl} unreachable)`;
628
658
  }
629
659
  }
630
660
  async function handleStatus(args) {
631
- const baseUrl = _chunk3SGA53DXjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
661
+ const baseUrl = _chunkVBDR2DP6js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
632
662
  const reveal = args.includes("--reveal");
633
- const jsonOutput = _chunkLXYDN5FEjs.argsWantJson.call(void 0, args);
663
+ const jsonOutput = _chunk6WWBVWFQjs.argsWantJson.call(void 0, args);
634
664
  const hasExplicitAuthScope = args.includes("--auth-scope");
635
665
  let authScope = null;
636
666
  if (hasExplicitAuthScope) {
@@ -663,7 +693,7 @@ async function handleStatus(args) {
663
693
  const bannerLine = statusBannerLine(hostStatusPayload.status_banner);
664
694
  if (bannerLine) hostLines.push(bannerLine);
665
695
  }
666
- } catch (e10) {
696
+ } catch (e11) {
667
697
  hostStatusPayload = {
668
698
  host: baseUrl,
669
699
  hostStatus: "unreachable",
@@ -671,14 +701,14 @@ async function handleStatus(args) {
671
701
  };
672
702
  hostLines.push(`Host: ${baseUrl} (unreachable)`);
673
703
  }
674
- const apiKey = authScope === "folder" ? _chunk3SGA53DXjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunk3SGA53DXjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunk3SGA53DXjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
704
+ const apiKey = authScope === "folder" ? _chunkVBDR2DP6js.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkVBDR2DP6js.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkVBDR2DP6js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
675
705
  if (!apiKey) {
676
706
  const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
677
707
  baseUrl,
678
708
  _nullishCoalesce(authScope, () => ( void 0))
679
709
  );
680
710
  if (pendingClaim) {
681
- _chunkLXYDN5FEjs.printCommandEnvelope.call(void 0,
711
+ _chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
682
712
  {
683
713
  ..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
684
714
  status: "pending",
@@ -699,7 +729,7 @@ async function handleStatus(args) {
699
729
  );
700
730
  return EXIT_OK;
701
731
  }
702
- _chunkLXYDN5FEjs.printCommandEnvelope.call(void 0,
732
+ _chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
703
733
  {
704
734
  ..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
705
735
  status: "not connected",
@@ -732,7 +762,7 @@ async function handleStatus(args) {
732
762
  }
733
763
  );
734
764
  if (status === 401 || status === 403) {
735
- _chunkLXYDN5FEjs.printCommandEnvelope.call(void 0,
765
+ _chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
736
766
  {
737
767
  ..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
738
768
  status: "unauthorized",
@@ -759,7 +789,7 @@ async function handleStatus(args) {
759
789
  console.error(`Auth status error (status ${status}).`);
760
790
  return EXIT_SERVER;
761
791
  }
762
- const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunk3SGA53DXjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
792
+ const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkVBDR2DP6js.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
763
793
  clearSatisfiedPendingClaim(
764
794
  baseUrl,
765
795
  resolvedAuthScope,
@@ -787,28 +817,28 @@ async function handleStatus(args) {
787
817
  if (apiKeyResp) {
788
818
  saveEnvValues(
789
819
  {
790
- [_chunk3SGA53DXjs.HOST_URL_ENV]: baseUrl,
791
- [_chunk3SGA53DXjs.API_KEY_ENV]: apiKeyResp,
820
+ [_chunkVBDR2DP6js.HOST_URL_ENV]: baseUrl,
821
+ [_chunkVBDR2DP6js.API_KEY_ENV]: apiKeyResp,
792
822
  ...activeOrgEnvValues(data)
793
823
  },
794
824
  baseUrl,
795
825
  resolvedAuthScope
796
826
  );
797
827
  if (resolvedAuthScope === "folder") {
798
- const target = _chunk3SGA53DXjs.resolveProjectPinTarget.call(void 0, );
828
+ const target = _chunkVBDR2DP6js.resolveProjectPinTarget.call(void 0, );
799
829
  savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
800
830
  } else {
801
831
  savedApiKeyPath = envFilePath(baseUrl);
802
832
  }
803
833
  }
804
- } else if (resolvedAuthScope === "folder" || _chunk3SGA53DXjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
805
- saveEnvValues(_chunk3SGA53DXjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
834
+ } else if (resolvedAuthScope === "folder" || _chunkVBDR2DP6js.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
835
+ saveEnvValues(_chunkVBDR2DP6js.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
806
836
  }
807
- _chunkLXYDN5FEjs.printCommandEnvelope.call(void 0,
837
+ _chunk6WWBVWFQjs.printCommandEnvelope.call(void 0,
808
838
  {
809
839
  ...payload,
810
- ..._chunk33O2JGHEjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
811
- command_context: _chunk3SGA53DXjs.resolveCliCommandContext.call(void 0,
840
+ ..._chunkWF5QE2IWjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
841
+ command_context: _chunkVBDR2DP6js.resolveCliCommandContext.call(void 0,
812
842
  { baseUrl, apiKey },
813
843
  resolvedAuthScope
814
844
  )
@@ -967,4 +997,5 @@ Examples:
967
997
 
968
998
 
969
999
 
970
- exports.EXIT_WORKSPACE_MISMATCH = EXIT_WORKSPACE_MISMATCH; exports.statusBannerLine = statusBannerLine; exports.resolvePendingAuthClaimForResume = resolvePendingAuthClaimForResume; exports.readPendingAuthClaim = readPendingAuthClaim; exports.clearPendingClaim = clearPendingClaim; exports.clearSatisfiedPendingClaim = clearSatisfiedPendingClaim; exports.httpJson = httpJson; exports.readStatusBanner = readStatusBanner; exports.reportSetupCompleted = reportSetupCompleted; exports.handleRegister = handleRegister; exports.handleWait = handleWait; exports.authStatusLine = authStatusLine; exports.handleStatus = handleStatus; exports.registerAuthCommands = registerAuthCommands;
1000
+
1001
+ exports.EXIT_WORKSPACE_MISMATCH = EXIT_WORKSPACE_MISMATCH; exports.statusBannerLine = statusBannerLine; exports.resolvePendingAuthClaimForResume = resolvePendingAuthClaimForResume; exports.readPendingAuthClaim = readPendingAuthClaim; exports.clearPendingClaim = clearPendingClaim; exports.clearSatisfiedPendingClaim = clearSatisfiedPendingClaim; exports.httpJson = httpJson; exports.readStatusBanner = readStatusBanner; exports.reportSetupCompleted = reportSetupCompleted; exports.reportApprovalLinkShown = reportApprovalLinkShown; exports.handleRegister = handleRegister; exports.handleWait = handleWait; exports.authStatusLine = authStatusLine; exports.handleStatus = handleStatus; exports.registerAuthCommands = registerAuthCommands;
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk3SGA53DXjs = require('./chunk-3SGA53DX.js');
5
+ var _chunkVBDR2DP6js = require('./chunk-VBDR2DP6.js');
6
6
 
7
7
 
8
- var _chunk33O2JGHEjs = require('./chunk-33O2JGHE.js');
8
+ var _chunkWF5QE2IWjs = require('./chunk-WF5QE2IW.js');
9
9
 
10
10
 
11
11
 
@@ -290,8 +290,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
290
290
  var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
291
291
  var defaultBrowserCommandRunner = childProcess;
292
292
  function getAuthedHttpClient() {
293
- const config = _chunk3SGA53DXjs.resolveConfig.call(void 0, );
294
- return { config, http: new (0, _chunk3SGA53DXjs.HttpClient)(config) };
293
+ const config = _chunkVBDR2DP6js.resolveConfig.call(void 0, );
294
+ return { config, http: new (0, _chunkVBDR2DP6js.HttpClient)(config) };
295
295
  }
296
296
  function stableOsUserId() {
297
297
  try {
@@ -631,7 +631,7 @@ function collectLocalEnvInfo() {
631
631
  os: `${process.platform} ${process.arch}`,
632
632
  node_version: process.version,
633
633
  home_dir: homeDir,
634
- agent_runtime: _chunk33O2JGHEjs.detectAgentRuntime.call(void 0, )
634
+ agent_runtime: _chunkWF5QE2IWjs.detectAgentRuntime.call(void 0, )
635
635
  };
636
636
  const env = process.env;
637
637
  const optional = {
@@ -878,9 +878,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
878
878
  }
879
879
  function withAgentCommandContext(value) {
880
880
  const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
881
- return _chunk33O2JGHEjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
881
+ return _chunkWF5QE2IWjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
882
882
  ...valueRecord,
883
- command_context: _chunk3SGA53DXjs.resolveCliCommandContext.call(void 0, )
883
+ command_context: _chunkVBDR2DP6js.resolveCliCommandContext.call(void 0, )
884
884
  } : value;
885
885
  }
886
886
  function printJson(value, fields) {
@@ -11,20 +11,20 @@ import {
11
11
  skillsInstallLeasePath,
12
12
  skillsSourceUrl,
13
13
  syncSdkSkillsIfNeeded
14
- } from "./chunk-K5RRY7DJ.mjs";
14
+ } from "./chunk-EPZSX7FZ.mjs";
15
15
  import {
16
16
  printCommandEnvelope
17
- } from "./chunk-YC2QBF2W.mjs";
17
+ } from "./chunk-C7UIUKW6.mjs";
18
18
  import {
19
19
  autoDetectBaseUrl,
20
20
  ensureProjectPrivatePathsIgnored,
21
21
  resolveProjectPinTarget,
22
22
  sdkCliStateDirPath
23
- } from "./chunk-O5BUFQ2P.mjs";
23
+ } from "./chunk-VRAOWHXJ.mjs";
24
24
  import {
25
25
  SDK_VERSION,
26
26
  detectAgentRuntime
27
- } from "./chunk-XDFARN7U.mjs";
27
+ } from "./chunk-PDJS6LFI.mjs";
28
28
 
29
29
  // src/cli/commands/skills.ts
30
30
  import { spawn } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveShellSpawn
3
- } from "./chunk-K5RRY7DJ.mjs";
3
+ } from "./chunk-EPZSX7FZ.mjs";
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  import { spawnSync } from "child_process";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  csvSafeJsonString,
8
8
  csvStringFromRows
9
- } from "./chunk-YC2QBF2W.mjs";
9
+ } from "./chunk-C7UIUKW6.mjs";
10
10
 
11
11
  // src/cli/describe-options.ts
12
12
  function addDescribeOptions(command, options = {}) {
@@ -4,20 +4,20 @@ import {
4
4
  resolveUpdatePlan,
5
5
  runAutomaticUpdatePlan,
6
6
  shouldRunCliAutoUpdate
7
- } from "./chunk-PUOKABQF.mjs";
7
+ } from "./chunk-S5WXSC3P.mjs";
8
8
  import {
9
9
  isCiEnvironment
10
- } from "./chunk-K5RRY7DJ.mjs";
10
+ } from "./chunk-EPZSX7FZ.mjs";
11
11
  import {
12
12
  addJsonNotice,
13
13
  isJsonOutputMode
14
- } from "./chunk-YC2QBF2W.mjs";
14
+ } from "./chunk-C7UIUKW6.mjs";
15
15
  import {
16
16
  resolveApiKeyForBaseUrl
17
- } from "./chunk-O5BUFQ2P.mjs";
17
+ } from "./chunk-VRAOWHXJ.mjs";
18
18
  import {
19
19
  SDK_VERSION
20
- } from "./chunk-XDFARN7U.mjs";
20
+ } from "./chunk-PDJS6LFI.mjs";
21
21
 
22
22
  // src/cli/compatibility-catalog.ts
23
23
  var readers = /* @__PURE__ */ new WeakMap();
@@ -6,6 +6,7 @@ import {
6
6
  } from "./chunk-L2VKAASU.mjs";
7
7
  import {
8
8
  CLI_PLAY_RUN_START_STREAM_PATH,
9
+ CLI_PLAY_RUN_SUPPORTED_HEADER,
9
10
  CliPlayAdmissionUnsupportedError,
10
11
  PLAY_RUN_START_STREAM_PATH,
11
12
  decodePlayRunPublicStatus,
@@ -13,9 +14,10 @@ import {
13
14
  isTerminalPlayRunLifecycleStatus,
14
15
  mintStagedPlayFileUploads,
15
16
  preparePlayRunAdmission,
17
+ readPlayRunAdmissionCapability,
16
18
  stagePlayFiles,
17
19
  startPlayRun
18
- } from "./chunk-NELMCOWK.mjs";
20
+ } from "./chunk-HNRELVCS.mjs";
19
21
  import {
20
22
  describePlayDetail,
21
23
  describePlayListItem
@@ -26,7 +28,7 @@ import {
26
28
  RETAINED_PIPELINE_RECEIVERS_HEADER,
27
29
  RUNTIME_ENVIRONMENT_TOKEN_HEADER,
28
30
  SDK_API_MAJOR
29
- } from "./chunk-XDFARN7U.mjs";
31
+ } from "./chunk-PDJS6LFI.mjs";
30
32
  import {
31
33
  CustomerDbQueryOutcomeUnknownError
32
34
  } from "./chunk-4QF2K7TM.mjs";
@@ -3905,7 +3907,7 @@ var DeeplineClient = class _DeeplineClient {
3905
3907
  /**
3906
3908
  * Re-establish this workspace's tenant storage contract: role/DB connect
3907
3909
  * grants plus materialized table grants. Org-admin only. Use when a run fails
3908
- * with WORKSPACE_STORAGE_NOT_READY.
3910
+ * with `WORKSPACE_STORAGE_NOT_READY`.
3909
3911
  */
3910
3912
  async repairIngestionStorage(input) {
3911
3913
  return this.http.post(
@@ -3966,7 +3968,10 @@ var DeeplineClient = class _DeeplineClient {
3966
3968
  const prepared = await preparePlayRunAdmission(
3967
3969
  this.http,
3968
3970
  resolved.request,
3969
- options?.onSubmission
3971
+ options?.onSubmission,
3972
+ {
3973
+ ...options && Object.hasOwn(options, "admissionCapability") ? { admissionCapability: options.admissionCapability } : {}
3974
+ }
3970
3975
  );
3971
3976
  const bodyJson = JSON.stringify(prepared.body);
3972
3977
  const headers = runtimeSelectionHeaders(resolved.runtime, this.environment);
@@ -3985,23 +3990,31 @@ var DeeplineClient = class _DeeplineClient {
3985
3990
  if (submitted) {
3986
3991
  await preparePlayRunAdmission(
3987
3992
  http,
3988
- JSON.parse(bodyJson)
3993
+ JSON.parse(bodyJson),
3994
+ void 0,
3995
+ { signal: streamOptions?.signal }
3989
3996
  );
3990
3997
  }
3991
3998
  submitted = true;
3992
3999
  const streamPath = options?.cliAdmission ? CLI_PLAY_RUN_START_STREAM_PATH : PLAY_RUN_START_STREAM_PATH;
4000
+ let cliAdmissionSupported = false;
3993
4001
  try {
3994
4002
  for await (const event of http.streamSse(streamPath, {
3995
4003
  method: "POST",
3996
4004
  body: JSON.parse(bodyJson),
3997
4005
  headers,
3998
4006
  signal: streamOptions?.signal,
3999
- exactUrlOnly: true
4007
+ exactUrlOnly: true,
4008
+ ...options?.cliAdmission ? {
4009
+ onResponse: (response) => {
4010
+ cliAdmissionSupported = response.headers.get(CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
4011
+ }
4012
+ } : {}
4000
4013
  })) {
4001
4014
  if (event.scope === "play") yield event;
4002
4015
  }
4003
4016
  } catch (error) {
4004
- if (options?.cliAdmission && error instanceof DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
4017
+ if (options?.cliAdmission && !cliAdmissionSupported && error instanceof DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
4005
4018
  throw new CliPlayAdmissionUnsupportedError(error.statusCode);
4006
4019
  }
4007
4020
  throw error;
@@ -4009,6 +4022,14 @@ var DeeplineClient = class _DeeplineClient {
4009
4022
  }
4010
4023
  };
4011
4024
  }
4025
+ /**
4026
+ * Internal CLI helper. Reads the server's admission contract before local
4027
+ * preparation so the network round trip can overlap with compilation.
4028
+ * @internal
4029
+ */
4030
+ async prefetchPlayRunAdmissionCapability() {
4031
+ return readPlayRunAdmissionCapability(this.http);
4032
+ }
4012
4033
  /**
4013
4034
  * Submit a play run through the legacy event response.
4014
4035
  *
@@ -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(); } }
2
2
 
3
- var _chunkLXYDN5FEjs = require('./chunk-LXYDN5FE.js');
3
+ var _chunk6WWBVWFQjs = require('./chunk-6WWBVWFQ.js');
4
4
 
5
5
  // src/cli/maintenance-policy.ts
6
6
  var _commander = require('commander');
@@ -33,7 +33,7 @@ function recordCliTrace(event) {
33
33
  sinceStartMs: now - cliTraceStartedAt,
34
34
  ...event
35
35
  };
36
- _chunkLXYDN5FEjs.writeRawStderr.call(void 0, `[cli-trace] ${JSON.stringify(payload)}
36
+ _chunk6WWBVWFQjs.writeRawStderr.call(void 0, `[cli-trace] ${JSON.stringify(payload)}
37
37
  `);
38
38
  }
39
39
  async function traceCliSpan(phase, fields, run) {
@@ -2,10 +2,10 @@ import {
2
2
  HttpClient,
3
3
  resolveCliCommandContext,
4
4
  resolveConfig
5
- } from "./chunk-O5BUFQ2P.mjs";
5
+ } from "./chunk-VRAOWHXJ.mjs";
6
6
  import {
7
7
  detectAgentRuntime
8
- } from "./chunk-XDFARN7U.mjs";
8
+ } from "./chunk-PDJS6LFI.mjs";
9
9
  import {
10
10
  DeeplineError,
11
11
  serializeToolExecutionFailure