deepline 0.3.525 → 0.3.526

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 (135) hide show
  1. package/dist/bundling-sources/sdk/src/agent-runtime.ts +98 -0
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/observability/dlq.ts +14 -5
  4. package/dist/bundling-sources/shared_libs/play-runtime/run-failure-class.ts +98 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-inventory.ts +2 -2
  6. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +39 -0
  7. package/dist/cli/{auth-TH3VGYBK.mjs → auth-JATW5XZE.mjs} +5 -5
  8. package/dist/cli/auth-L2POG3LL.js +43 -0
  9. package/dist/cli/{billing-TWKVUFU2.js → billing-TSHBJIJS.js} +82 -82
  10. package/dist/cli/{billing-CMHFI2LN.mjs → billing-UT5LIESH.mjs} +7 -7
  11. package/dist/cli/{chunk-ZWFTHEPT.mjs → chunk-26ULNPQ7.mjs} +2 -2
  12. package/dist/cli/{chunk-OWQF6WVH.mjs → chunk-2GJW4RAQ.mjs} +61 -1
  13. package/dist/cli/{chunk-CZNEQMJR.mjs → chunk-2JNX3MDG.mjs} +1 -1
  14. package/dist/cli/{chunk-QR7VYYNM.js → chunk-3MYI3IXW.js} +7 -7
  15. package/dist/cli/{chunk-5JFAQUZS.js → chunk-3ZEV5BS5.js} +26 -26
  16. package/dist/cli/{chunk-NB2ECLQE.js → chunk-46HEYGLY.js} +9 -9
  17. package/dist/cli/{chunk-CKTRQSRA.js → chunk-477PXM65.js} +22 -22
  18. package/dist/cli/{chunk-WGRDOPAK.mjs → chunk-6COGHW7B.mjs} +2 -2
  19. package/dist/cli/{chunk-ESWM2JW4.js → chunk-6DHEV6IA.js} +2 -2
  20. package/dist/cli/{chunk-TO72GW5I.js → chunk-6H56LKJB.js} +16 -16
  21. package/dist/cli/{chunk-NO4URKKT.mjs → chunk-6JMWATX5.mjs} +5 -5
  22. package/dist/cli/{chunk-5BSGWIQD.mjs → chunk-77RAGJIZ.mjs} +2 -2
  23. package/dist/cli/{chunk-LE537GBC.js → chunk-7COEN3IR.js} +138 -78
  24. package/dist/cli/{chunk-WEYFSBAD.mjs → chunk-7FCD34YS.mjs} +18 -11
  25. package/dist/cli/{chunk-4UWXFXQF.js → chunk-B33J4YCC.js} +3 -3
  26. package/dist/cli/{chunk-7OF3A4KJ.mjs → chunk-BFH3DJYV.mjs} +84 -57
  27. package/dist/cli/{chunk-EP6YH6QJ.mjs → chunk-BVITYMBK.mjs} +2 -2
  28. package/dist/cli/{chunk-DYS3KWYF.js → chunk-BYEF4RBX.js} +11 -11
  29. package/dist/cli/{chunk-UXF3ODJJ.mjs → chunk-C3EW6I65.mjs} +1 -1
  30. package/dist/cli/{chunk-LXKH4MKH.js → chunk-CDP3LMDT.js} +6 -6
  31. package/dist/cli/{chunk-KBOSALBI.js → chunk-CYN2AHR6.js} +6 -6
  32. package/dist/cli/{chunk-OXFIJYN3.mjs → chunk-D2XMFXFM.mjs} +6 -6
  33. package/dist/cli/{chunk-AVDEYOVP.js → chunk-D5OEUPPM.js} +98 -98
  34. package/dist/cli/{chunk-YC7FKAJ4.mjs → chunk-DY2AT3JQ.mjs} +10 -10
  35. package/dist/cli/{chunk-N4MMU3QF.js → chunk-ED2N4NRI.js} +16 -16
  36. package/dist/cli/{chunk-7C4F4TLR.mjs → chunk-EEYZLTXX.mjs} +1 -1
  37. package/dist/cli/{chunk-CQSANB3V.js → chunk-F5KFGF45.js} +5 -5
  38. package/dist/cli/{chunk-2WFVLOB7.js → chunk-FMPGWAIR.js} +1 -1
  39. package/dist/cli/{chunk-KPINGHIF.mjs → chunk-HPACLONQ.mjs} +2 -2
  40. package/dist/cli/{chunk-TXSBPBHB.mjs → chunk-IMP7WR22.mjs} +5 -5
  41. package/dist/cli/{chunk-RMZ6CISE.mjs → chunk-IWLDJQGV.mjs} +3 -3
  42. package/dist/cli/{chunk-P62LON53.js → chunk-J5OXJ4JI.js} +2 -2
  43. package/dist/cli/{chunk-UQYKSOGO.mjs → chunk-MQB25LMV.mjs} +5 -5
  44. package/dist/cli/{chunk-KEZ3KBWW.js → chunk-O7WUATQC.js} +97 -70
  45. package/dist/cli/{chunk-V2GN4PLK.js → chunk-RZJWHL7L.js} +5 -5
  46. package/dist/cli/{chunk-NRBCETWL.js → chunk-SCLRGDF4.js} +44 -44
  47. package/dist/cli/{chunk-V65J64FL.js → chunk-SJ6KUCGM.js} +53 -53
  48. package/dist/cli/{chunk-MHBSRNI7.js → chunk-TBQC2XS3.js} +41 -41
  49. package/dist/cli/{chunk-JVWSIA2V.mjs → chunk-TCLJXJAG.mjs} +4 -4
  50. package/dist/cli/{chunk-ETHVJ2ZE.mjs → chunk-TVHDWS5U.mjs} +1 -1
  51. package/dist/cli/{chunk-U4M32NFS.mjs → chunk-TXJW6RIM.mjs} +1 -1
  52. package/dist/cli/{chunk-LAMGJQDY.mjs → chunk-U6OUX47C.mjs} +2 -2
  53. package/dist/cli/{chunk-S5LUY3KJ.js → chunk-UTCGCES2.js} +7 -7
  54. package/dist/cli/{chunk-VYIAWAKJ.mjs → chunk-UUIC2JFZ.mjs} +1 -1
  55. package/dist/cli/{chunk-WA3FG7DH.js → chunk-UWCEBS7F.js} +14 -14
  56. package/dist/cli/{chunk-MRUFGOJR.js → chunk-WBY3R55B.js} +2 -2
  57. package/dist/cli/{chunk-TFEGJEYO.js → chunk-WITNIMLE.js} +3 -3
  58. package/dist/cli/{chunk-CWRL6IQP.js → chunk-WL6GAZBD.js} +18 -11
  59. package/dist/cli/{chunk-CLTL7ZJI.mjs → chunk-WOLY6SU4.mjs} +1 -1
  60. package/dist/cli/{chunk-GCLNX72G.mjs → chunk-XVIMOB2U.mjs} +2 -2
  61. package/dist/cli/{chunk-IMO3HXWZ.mjs → chunk-Y47OCS5V.mjs} +1 -1
  62. package/dist/cli/{chunk-M43ZYNDA.mjs → chunk-YNFPZVII.mjs} +5 -5
  63. package/dist/cli/command-docs.js +2 -2
  64. package/dist/cli/command-docs.mjs +1 -1
  65. package/dist/cli/{csv-OO554TPX.mjs → csv-4BLFRED6.mjs} +4 -4
  66. package/dist/cli/{csv-5JHWVJ5N.js → csv-KSJB5Z3M.js} +13 -13
  67. package/dist/cli/{db-CYQJ4OXF.js → db-G7Z5CKO2.js} +27 -27
  68. package/dist/cli/{db-SQKJ6RKU.mjs → db-OVW6C3DV.mjs} +6 -6
  69. package/dist/cli/describe-KMYR2JBC.js +50 -0
  70. package/dist/cli/{describe-N7AKTUQV.mjs → describe-OEFTD7WQ.mjs} +18 -18
  71. package/dist/cli/{executions-F34DORW6.mjs → executions-7ZKQ4ZU3.mjs} +6 -6
  72. package/dist/cli/{executions-K7EGCRKX.js → executions-O7USCBCW.js} +8 -8
  73. package/dist/cli/{feedback-GQHKCS66.mjs → feedback-KUBL5E3I.mjs} +61 -13
  74. package/dist/cli/{feedback-NOQVCA3Q.js → feedback-Y55WCRIQ.js} +65 -17
  75. package/dist/cli/{git-2EEITXDB.mjs → git-C6ZAU5JA.mjs} +5 -5
  76. package/dist/cli/git-NBVQ3VGW.js +25 -0
  77. package/dist/cli/index.js +145 -145
  78. package/dist/cli/index.mjs +44 -44
  79. package/dist/cli/{legacy-noops-JHMY5XRB.mjs → legacy-noops-MUXD4HRC.mjs} +6 -6
  80. package/dist/cli/{legacy-noops-RFNHQ7RG.js → legacy-noops-OVWX4KB3.js} +9 -9
  81. package/dist/cli/{monitors-RDMP6SPZ.mjs → monitors-2ZSGBY52.mjs} +7 -7
  82. package/dist/cli/{monitors-UKRZ4BDK.js → monitors-3QVYGYWA.js} +100 -100
  83. package/dist/cli/{org-RF3G4KMB.mjs → org-RDSPE5FB.mjs} +6 -6
  84. package/dist/cli/{org-OX7TYTHV.js → org-S6Z3SDLI.js} +86 -86
  85. package/dist/cli/{pages-FBM3MGSP.mjs → pages-K5DSMHLJ.mjs} +6 -6
  86. package/dist/cli/{pages-MKQT5LFV.js → pages-VUWF2OR7.js} +18 -18
  87. package/dist/cli/{play-YWC2UORM.mjs → play-PZLXOYEX.mjs} +18 -18
  88. package/dist/cli/{play-OOVX2DMV.js → play-SQOJTUFC.js} +317 -317
  89. package/dist/cli/{providers-3PEQESIU.mjs → providers-AMIGP3D4.mjs} +6 -6
  90. package/dist/cli/{providers-2CGZYLER.js → providers-FZBEPUOI.js} +9 -9
  91. package/dist/cli/{quickstart-KVB36SOW.mjs → quickstart-HNOQKGOF.mjs} +4 -4
  92. package/dist/cli/{quickstart-6AANHKQZ.js → quickstart-QIHZDBGM.js} +6 -6
  93. package/dist/cli/{run-NJ7WV5TK.js → run-IQGM3TO2.js} +41 -41
  94. package/dist/cli/{run-QC23NRKO.mjs → run-JDW6BDNT.mjs} +23 -23
  95. package/dist/cli/search-BNWRL3YY.js +33 -0
  96. package/dist/cli/{search-7BMFFZI2.mjs → search-DMVUKJ23.mjs} +8 -8
  97. package/dist/cli/{search-output-CALZ4ZI2.mjs → search-output-5UAPUUHH.mjs} +4 -4
  98. package/dist/cli/{search-output-XC2AVBFX.js → search-output-UUW6UNHF.js} +6 -6
  99. package/dist/cli/{secrets-7ZHA57DI.mjs → secrets-46KSTPFN.mjs} +6 -6
  100. package/dist/cli/{secrets-VHU4B2D4.js → secrets-U532KN24.js} +15 -15
  101. package/dist/cli/sessions-JZUONXH4.js +22 -0
  102. package/dist/cli/sessions-RUNWYHYX.mjs +22 -0
  103. package/dist/cli/{settings-AVY4NNHI.mjs → settings-56L3WHCY.mjs} +13 -13
  104. package/dist/cli/{settings-WV77QJGD.js → settings-O2A37FFA.js} +86 -86
  105. package/dist/cli/{setup-GE5TLTC4.js → setup-ETFSMSCH.js} +50 -50
  106. package/dist/cli/{setup-AOUJ3RMU.mjs → setup-Q27X6JZY.mjs} +10 -10
  107. package/dist/cli/skills-IKDJ5JDN.js +37 -0
  108. package/dist/cli/{skills-FVWO2G66.mjs → skills-WFQRZL4D.mjs} +8 -8
  109. package/dist/cli/tools-B735AA67.js +57 -0
  110. package/dist/cli/{tools-URE655B4.mjs → tools-EV6CKJOX.mjs} +17 -17
  111. package/dist/cli/update-CNNURAM3.js +35 -0
  112. package/dist/cli/{update-5B4G4345.mjs → update-KIPPFVCH.mjs} +10 -10
  113. package/dist/cli/{views-IC762HEQ.js → views-DNZ2HFTA.js} +18 -18
  114. package/dist/cli/{views-GSECJ5IK.mjs → views-LMJXWD4N.mjs} +6 -6
  115. package/dist/cli/{workflow-6UQM565I.mjs → workflow-3XKUQ73U.mjs} +7 -7
  116. package/dist/cli/{workflow-EME7ZEOV.js → workflow-ZUDTIOK6.js} +17 -17
  117. package/dist/index.js +9 -9
  118. package/dist/index.mjs +6 -6
  119. package/dist/install-integrity.json +107 -106
  120. package/dist/release.d.mts +1 -1
  121. package/dist/release.d.ts +1 -1
  122. package/dist/release.js +2 -2
  123. package/dist/release.mjs +1 -1
  124. package/dist/server.js +5 -5
  125. package/dist/server.mjs +3 -3
  126. package/package.json +1 -1
  127. package/dist/cli/auth-K7PMRXNG.js +0 -43
  128. package/dist/cli/describe-PASXOL3R.js +0 -50
  129. package/dist/cli/git-UU4YFJ2Q.js +0 -25
  130. package/dist/cli/search-NH4DTXUK.js +0 -33
  131. package/dist/cli/sessions-2TE5JWVP.js +0 -18
  132. package/dist/cli/sessions-YYULWFZE.mjs +0 -18
  133. package/dist/cli/skills-OL7LD6QX.js +0 -37
  134. package/dist/cli/tools-VQ5JO6DI.js +0 -57
  135. package/dist/cli/update-7ZOIOTZN.js +0 -35
@@ -17,15 +17,17 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
17
17
  var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
18
18
 
19
19
 
20
- var _chunk2WFVLOB7js = require('./chunk-2WFVLOB7.js');
20
+ var _chunkFMPGWAIRjs = require('./chunk-FMPGWAIR.js');
21
21
 
22
22
  // src/version.ts
23
- var SDK_VERSION = _chunk2WFVLOB7js.SDK_RELEASE.version;
24
- var SDK_API_MAJOR = _chunk2WFVLOB7js.SDK_RELEASE.contracts.api.currentMajor;
25
- var SDK_API_CONTRACT = _nullishCoalesce(_chunk2WFVLOB7js.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
23
+ var SDK_VERSION = _chunkFMPGWAIRjs.SDK_RELEASE.version;
24
+ var SDK_API_MAJOR = _chunkFMPGWAIRjs.SDK_RELEASE.contracts.api.currentMajor;
25
+ var SDK_API_CONTRACT = _nullishCoalesce(_chunkFMPGWAIRjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
26
26
 
27
27
  // src/agent-runtime.ts
28
+ var _fs = require('fs');
28
29
  var _os = require('os');
30
+ var _path = require('path');
29
31
  var EXPLICIT_AGENT_RUNTIMES = /* @__PURE__ */ new Set([
30
32
  "claude_code",
31
33
  "claude_cowork",
@@ -65,12 +67,67 @@ function agentSessionIdFromEnvironment(env = process.env, agentRuntime) {
65
67
  }
66
68
  return null;
67
69
  }
70
+ var SESSION_UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
71
+ function isAgentSessionId(value) {
72
+ return SESSION_UUID_RE.test(value);
73
+ }
74
+ function coworkSessionHome(env = process.env, cwd = process.cwd()) {
75
+ const home = _optionalChain([env, 'access', _16 => _16.HOME, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]) || _os.homedir.call(void 0, );
76
+ const path = home === "/sessions" ? cwd : home;
77
+ return _nullishCoalesce(_optionalChain([path, 'access', _19 => _19.match, 'call', _20 => _20(/^\/sessions\/(?!\.\.?(?:\/|$))[^/]+/), 'optionalAccess', _21 => _21[0]]), () => ( null));
78
+ }
79
+ function claudeProjectsRoots(env = process.env, cwd = process.cwd()) {
80
+ const roots = [];
81
+ const configDir = _optionalChain([env, 'access', _22 => _22.CLAUDE_CONFIG_DIR, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]);
82
+ if (configDir) roots.push(_path.join.call(void 0, configDir, "projects"));
83
+ const coworkHome = coworkSessionHome(env, cwd);
84
+ if (coworkHome) roots.push(coworkProjectsRoot(coworkHome));
85
+ roots.push(_path.join.call(void 0, _optionalChain([env, 'access', _25 => _25.HOME, 'optionalAccess', _26 => _26.trim, 'call', _27 => _27()]) || _os.homedir.call(void 0, ), ".claude", "projects"));
86
+ return [...new Set(roots)];
87
+ }
88
+ function coworkProjectsRoot(coworkHome) {
89
+ return _path.join.call(void 0, coworkHome, "mnt", ".claude", "projects");
90
+ }
91
+ function coworkTranscriptFromEnvironment(env = process.env, cwd = process.cwd()) {
92
+ const coworkHome = coworkSessionHome(env, cwd);
93
+ if (!coworkHome) return null;
94
+ const root = coworkProjectsRoot(coworkHome);
95
+ let newest = null;
96
+ for (const project of readDirectoryNames(root)) {
97
+ for (const fileName of readDirectoryNames(_path.join.call(void 0, root, project))) {
98
+ const sessionId = _path.basename.call(void 0, fileName, ".jsonl");
99
+ if (!fileName.endsWith(".jsonl") || !SESSION_UUID_RE.test(sessionId)) {
100
+ continue;
101
+ }
102
+ const filePath = _path.join.call(void 0, root, project, fileName);
103
+ let mtimeMs;
104
+ try {
105
+ const stat = _fs.statSync.call(void 0, filePath);
106
+ if (!stat.isFile()) continue;
107
+ mtimeMs = stat.mtimeMs;
108
+ } catch (e) {
109
+ continue;
110
+ }
111
+ if (!newest || mtimeMs > newest.mtimeMs) {
112
+ newest = { sessionId, filePath, mtimeMs };
113
+ }
114
+ }
115
+ }
116
+ return newest ? { sessionId: newest.sessionId, filePath: newest.filePath } : null;
117
+ }
118
+ function readDirectoryNames(dir) {
119
+ try {
120
+ return _fs.readdirSync.call(void 0, dir);
121
+ } catch (e2) {
122
+ return [];
123
+ }
124
+ }
68
125
  function isCoworkLikeSandbox() {
69
126
  const pluginMode = truthyEnv("DEEPLINE_PLUGIN_MODE");
70
127
  const claudeRemote = truthyEnv("CLAUDE_CODE_REMOTE");
71
- const projectDir = Boolean(_optionalChain([process, 'access', _16 => _16.env, 'access', _17 => _17.CLAUDE_PROJECT_DIR, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]));
72
- const pluginRoot = Boolean(_optionalChain([process, 'access', _20 => _20.env, 'access', _21 => _21.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _22 => _22.trim, 'call', _23 => _23()]));
73
- const home = _optionalChain([process, 'access', _24 => _24.env, 'access', _25 => _25.HOME, 'optionalAccess', _26 => _26.trim, 'call', _27 => _27()]) || _os.homedir.call(void 0, );
128
+ const projectDir = Boolean(_optionalChain([process, 'access', _28 => _28.env, 'access', _29 => _29.CLAUDE_PROJECT_DIR, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]));
129
+ const pluginRoot = Boolean(_optionalChain([process, 'access', _32 => _32.env, 'access', _33 => _33.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _34 => _34.trim, 'call', _35 => _35()]));
130
+ const home = _optionalChain([process, 'access', _36 => _36.env, 'access', _37 => _37.HOME, 'optionalAccess', _38 => _38.trim, 'call', _39 => _39()]) || _os.homedir.call(void 0, );
74
131
  const sessionHome = home === "/sessions" || home.startsWith("/sessions/");
75
132
  return claudeRemote || sessionHome || (pluginMode || pluginRoot) && projectDir;
76
133
  }
@@ -78,22 +135,22 @@ function detectAgentRuntime(options = {}) {
78
135
  const env = _nullishCoalesce(options.env, () => ( process.env));
79
136
  const explicit = normalizeAgentRuntime(env.DEEPLINE_AGENT_RUNTIME);
80
137
  if (explicit) return explicit;
81
- if (_optionalChain([env, 'access', _28 => _28.CODEX_THREAD_ID, 'optionalAccess', _29 => _29.trim, 'call', _30 => _30()])) return "codex";
138
+ if (_optionalChain([env, 'access', _40 => _40.CODEX_THREAD_ID, 'optionalAccess', _41 => _41.trim, 'call', _42 => _42()])) return "codex";
82
139
  if (options.detectCowork !== false && isCoworkLikeSandbox()) {
83
140
  return "claude_cowork";
84
141
  }
85
- if (_optionalChain([env, 'access', _31 => _31.CLAUDECODE, 'optionalAccess', _32 => _32.trim, 'call', _33 => _33()]) === "1") return "claude_code";
86
- if (_optionalChain([env, 'access', _34 => _34.CLINE_ACTIVE, 'optionalAccess', _35 => _35.trim, 'call', _36 => _36(), 'access', _37 => _37.toLowerCase, 'call', _38 => _38()]) === "true") return "cline";
87
- if (_optionalChain([env, 'access', _39 => _39.CURSOR_TRACE_ID, 'optionalAccess', _40 => _40.trim, 'call', _41 => _41()]) || _optionalChain([env, 'access', _42 => _42.CURSOR_AGENT, 'optionalAccess', _43 => _43.trim, 'call', _44 => _44()])) {
142
+ if (_optionalChain([env, 'access', _43 => _43.CLAUDECODE, 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]) === "1") return "claude_code";
143
+ if (_optionalChain([env, 'access', _46 => _46.CLINE_ACTIVE, 'optionalAccess', _47 => _47.trim, 'call', _48 => _48(), 'access', _49 => _49.toLowerCase, 'call', _50 => _50()]) === "true") return "cline";
144
+ if (_optionalChain([env, 'access', _51 => _51.CURSOR_TRACE_ID, 'optionalAccess', _52 => _52.trim, 'call', _53 => _53()]) || _optionalChain([env, 'access', _54 => _54.CURSOR_AGENT, 'optionalAccess', _55 => _55.trim, 'call', _56 => _56()])) {
88
145
  return "cursor";
89
146
  }
90
- if (_optionalChain([env, 'access', _45 => _45.WINDSURF, 'optionalAccess', _46 => _46.trim, 'call', _47 => _47()]) || _optionalChain([env, 'access', _48 => _48.CASCADE, 'optionalAccess', _49 => _49.trim, 'call', _50 => _50()])) {
147
+ if (_optionalChain([env, 'access', _57 => _57.WINDSURF, 'optionalAccess', _58 => _58.trim, 'call', _59 => _59()]) || _optionalChain([env, 'access', _60 => _60.CASCADE, 'optionalAccess', _61 => _61.trim, 'call', _62 => _62()])) {
91
148
  return "windsurf";
92
149
  }
93
- if (_optionalChain([env, 'access', _51 => _51.ANTIGRAVITY, 'optionalAccess', _52 => _52.trim, 'call', _53 => _53()]) || _optionalChain([env, 'access', _54 => _54.ANTIGRAVITY_CLI, 'optionalAccess', _55 => _55.trim, 'call', _56 => _56()]) || _optionalChain([env, 'access', _57 => _57.ANTIGRAVITY_AGENT, 'optionalAccess', _58 => _58.trim, 'call', _59 => _59()]) || _optionalChain([env, 'access', _60 => _60.ANTIGRAVITY_WORKSPACE, 'optionalAccess', _61 => _61.trim, 'call', _62 => _62()])) {
150
+ if (_optionalChain([env, 'access', _63 => _63.ANTIGRAVITY, 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()]) || _optionalChain([env, 'access', _66 => _66.ANTIGRAVITY_CLI, 'optionalAccess', _67 => _67.trim, 'call', _68 => _68()]) || _optionalChain([env, 'access', _69 => _69.ANTIGRAVITY_AGENT, 'optionalAccess', _70 => _70.trim, 'call', _71 => _71()]) || _optionalChain([env, 'access', _72 => _72.ANTIGRAVITY_WORKSPACE, 'optionalAccess', _73 => _73.trim, 'call', _74 => _74()])) {
94
151
  return "antigravity";
95
152
  }
96
- if (_optionalChain([env, 'access', _63 => _63.GEMINI_CLI, 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()]) || _optionalChain([env, 'access', _66 => _66.GEMINI_CLI_VERSION, 'optionalAccess', _67 => _67.trim, 'call', _68 => _68()]) || _optionalChain([env, 'access', _69 => _69.GEMINI_SANDBOX, 'optionalAccess', _70 => _70.trim, 'call', _71 => _71()]) || _optionalChain([env, 'access', _72 => _72.GEMINI_CONFIG_DIR, 'optionalAccess', _73 => _73.trim, 'call', _74 => _74()])) {
153
+ if (_optionalChain([env, 'access', _75 => _75.GEMINI_CLI, 'optionalAccess', _76 => _76.trim, 'call', _77 => _77()]) || _optionalChain([env, 'access', _78 => _78.GEMINI_CLI_VERSION, 'optionalAccess', _79 => _79.trim, 'call', _80 => _80()]) || _optionalChain([env, 'access', _81 => _81.GEMINI_SANDBOX, 'optionalAccess', _82 => _82.trim, 'call', _83 => _83()]) || _optionalChain([env, 'access', _84 => _84.GEMINI_CONFIG_DIR, 'optionalAccess', _85 => _85.trim, 'call', _86 => _86()])) {
97
154
  return "gemini";
98
155
  }
99
156
  return _nullishCoalesce(options.defaultRuntime, () => ( "unknown"));
@@ -108,7 +165,7 @@ var fetchWithDeploymentProtection = (input, init) => {
108
165
  const headers = new Headers(
109
166
  input instanceof Request ? input.headers : void 0
110
167
  );
111
- new Headers(_optionalChain([init, 'optionalAccess', _75 => _75.headers])).forEach((value, name) => headers.set(name, value));
168
+ new Headers(_optionalChain([init, 'optionalAccess', _87 => _87.headers])).forEach((value, name) => headers.set(name, value));
112
169
  for (const [name, value] of Object.entries(deploymentProtectionHeaders())) {
113
170
  headers.set(name, value);
114
171
  }
@@ -202,7 +259,7 @@ function withErrorCause(error, cause) {
202
259
  }
203
260
  function mapNetworkError(baseUrl, error, targetLabel) {
204
261
  const tagged = error;
205
- const timeoutMs = _optionalChain([tagged, 'optionalAccess', _76 => _76[REQUEST_TIMEOUT_MARKER]]);
262
+ const timeoutMs = _optionalChain([tagged, 'optionalAccess', _88 => _88[REQUEST_TIMEOUT_MARKER]]);
206
263
  if (typeof timeoutMs === "number") {
207
264
  return {
208
265
  message: `Request to ${targetLabel} timed out after ${timeoutMs}ms while waiting for a response.`,
@@ -210,7 +267,7 @@ function mapNetworkError(baseUrl, error, targetLabel) {
210
267
  details: { timeoutMs, target: targetLabel }
211
268
  };
212
269
  }
213
- if (_optionalChain([tagged, 'optionalAccess', _77 => _77[REQUEST_ABORT_MARKER]])) {
270
+ if (_optionalChain([tagged, 'optionalAccess', _89 => _89[REQUEST_ABORT_MARKER]])) {
214
271
  return {
215
272
  message: `Request to ${targetLabel} was aborted before it completed.`,
216
273
  code: "NETWORK_ABORTED"
@@ -252,14 +309,14 @@ function isLoopbackHost(hostname) {
252
309
  return hostname === "localhost" || hostname === "[::1]" || hostname.startsWith("127.") || hostname.endsWith(".localhost");
253
310
  }
254
311
  function connectionFailureMessage(baseUrl, error) {
255
- if (!_optionalChain([error, 'optionalAccess', _78 => _78.message])) {
312
+ if (!_optionalChain([error, 'optionalAccess', _90 => _90.message])) {
256
313
  return `Unable to connect to ${baseUrl}. Is the computer able to access the url?`;
257
314
  }
258
315
  const causeCode = networkCauseCode(error);
259
316
  let hostname = "";
260
317
  try {
261
318
  hostname = new URL(baseUrl).hostname;
262
- } catch (e) {
319
+ } catch (e3) {
263
320
  }
264
321
  const blocked = hostname !== "" && !isLoopbackHost(hostname) && causeCode !== void 0 && (BLOCKED_EGRESS_CAUSE_CODES.has(causeCode) || causeCode === "ECONNREFUSED");
265
322
  const causeMessage = error.cause instanceof Error ? error.cause.message.slice(0, 200) : "";
@@ -285,7 +342,7 @@ function networkDiagnosticUrl(value) {
285
342
  const url = new URL(value);
286
343
  if (url.protocol !== "https:" && url.protocol !== "http:") return void 0;
287
344
  return `${url.origin}${url.pathname}`;
288
- } catch (e2) {
345
+ } catch (e4) {
289
346
  return void 0;
290
347
  }
291
348
  }
@@ -316,9 +373,9 @@ var HttpClient = class {
316
373
  if (explicit) return explicit;
317
374
  try {
318
375
  return this.cleanDiagnosticHeader(
319
- _optionalChain([this, 'access', _79 => _79.readLocalSkillsVersion, 'optionalCall', _80 => _80(this.config.baseUrl)])
376
+ _optionalChain([this, 'access', _91 => _91.readLocalSkillsVersion, 'optionalCall', _92 => _92(this.config.baseUrl)])
320
377
  );
321
- } catch (e3) {
378
+ } catch (e5) {
322
379
  return null;
323
380
  }
324
381
  }
@@ -354,15 +411,15 @@ var HttpClient = class {
354
411
  const coordinatorInternalToken = env.DEEPLINE_INTERNAL_TOKEN;
355
412
  const absurdReleaseOverride = env.DEEPLINE_ABSURD_RELEASE;
356
413
  const preferredReceiptGatewayMachineId = env.DEEPLINE_PREFERRED_RECEIPT_GATEWAY_MACHINE_ID;
357
- if (_optionalChain([coordinatorUrl, 'optionalAccess', _81 => _81.trim, 'call', _82 => _82()])) {
414
+ if (_optionalChain([coordinatorUrl, 'optionalAccess', _93 => _93.trim, 'call', _94 => _94()])) {
358
415
  headers[COORDINATOR_URL_OVERRIDE_HEADER] = coordinatorUrl.trim();
359
416
  }
360
417
  const workerCallbackUrl = env.DEEPLINE_WORKER_CALLBACK_URL;
361
- if (_optionalChain([workerCallbackUrl, 'optionalAccess', _83 => _83.trim, 'call', _84 => _84()])) {
418
+ if (_optionalChain([workerCallbackUrl, 'optionalAccess', _95 => _95.trim, 'call', _96 => _96()])) {
362
419
  headers[WORKER_CALLBACK_URL_OVERRIDE_HEADER] = workerCallbackUrl.trim();
363
420
  }
364
421
  const runtimeSchedulerSchema = env.DEEPLINE_RUNTIME_SCHEDULER_SCHEMA;
365
- if (_optionalChain([runtimeSchedulerSchema, 'optionalAccess', _85 => _85.trim, 'call', _86 => _86()])) {
422
+ if (_optionalChain([runtimeSchedulerSchema, 'optionalAccess', _97 => _97.trim, 'call', _98 => _98()])) {
366
423
  headers[RUNTIME_SCHEDULER_SCHEMA_OVERRIDE_HEADER] = runtimeSchedulerSchema.trim();
367
424
  }
368
425
  const syntheticRun = env.DEEPLINE_SYNTHETIC_RUN;
@@ -370,21 +427,21 @@ var HttpClient = class {
370
427
  headers[SYNTHETIC_RUN_HEADER] = "1";
371
428
  }
372
429
  const runtimeTestFault = env.DEEPLINE_TEST_RUNTIME_FAULT;
373
- if (_optionalChain([runtimeTestFault, 'optionalAccess', _87 => _87.trim, 'call', _88 => _88()])) {
430
+ if (_optionalChain([runtimeTestFault, 'optionalAccess', _99 => _99.trim, 'call', _100 => _100()])) {
374
431
  headers[PLAY_RUNTIME_TEST_FAULT_HEADER] = runtimeTestFault.trim();
375
432
  }
376
- const retainedReceivers = _optionalChain([env, 'access', _89 => _89.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _90 => _90.trim, 'call', _91 => _91()]);
377
- if (retainedReceivers && _optionalChain([coordinatorInternalToken, 'optionalAccess', _92 => _92.trim, 'call', _93 => _93()])) {
433
+ const retainedReceivers = _optionalChain([env, 'access', _101 => _101.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _102 => _102.trim, 'call', _103 => _103()]);
434
+ if (retainedReceivers && _optionalChain([coordinatorInternalToken, 'optionalAccess', _104 => _104.trim, 'call', _105 => _105()])) {
378
435
  headers[RETAINED_PIPELINE_RECEIVERS_HEADER] = retainedReceivers;
379
436
  headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
380
437
  }
381
- if (_optionalChain([absurdReleaseOverride, 'optionalAccess', _94 => _94.trim, 'call', _95 => _95()]) && _optionalChain([coordinatorInternalToken, 'optionalAccess', _96 => _96.trim, 'call', _97 => _97()])) {
438
+ if (_optionalChain([absurdReleaseOverride, 'optionalAccess', _106 => _106.trim, 'call', _107 => _107()]) && _optionalChain([coordinatorInternalToken, 'optionalAccess', _108 => _108.trim, 'call', _109 => _109()])) {
382
439
  headers[ABSURD_RELEASE_OVERRIDE_HEADER] = absurdReleaseOverride.trim();
383
440
  }
384
- if (_optionalChain([preferredReceiptGatewayMachineId, 'optionalAccess', _98 => _98.trim, 'call', _99 => _99()]) && _optionalChain([coordinatorInternalToken, 'optionalAccess', _100 => _100.trim, 'call', _101 => _101()])) {
441
+ if (_optionalChain([preferredReceiptGatewayMachineId, 'optionalAccess', _110 => _110.trim, 'call', _111 => _111()]) && _optionalChain([coordinatorInternalToken, 'optionalAccess', _112 => _112.trim, 'call', _113 => _113()])) {
385
442
  headers[PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER] = preferredReceiptGatewayMachineId.trim();
386
443
  }
387
- if (_optionalChain([coordinatorInternalToken, 'optionalAccess', _102 => _102.trim, 'call', _103 => _103()]) && (_optionalChain([coordinatorUrl, 'optionalAccess', _104 => _104.trim, 'call', _105 => _105()]) || _optionalChain([workerCallbackUrl, 'optionalAccess', _106 => _106.trim, 'call', _107 => _107()]) || _optionalChain([runtimeTestFault, 'optionalAccess', _108 => _108.trim, 'call', _109 => _109()]) || _optionalChain([absurdReleaseOverride, 'optionalAccess', _110 => _110.trim, 'call', _111 => _111()]) || _optionalChain([preferredReceiptGatewayMachineId, 'optionalAccess', _112 => _112.trim, 'call', _113 => _113()]))) {
444
+ if (_optionalChain([coordinatorInternalToken, 'optionalAccess', _114 => _114.trim, 'call', _115 => _115()]) && (_optionalChain([coordinatorUrl, 'optionalAccess', _116 => _116.trim, 'call', _117 => _117()]) || _optionalChain([workerCallbackUrl, 'optionalAccess', _118 => _118.trim, 'call', _119 => _119()]) || _optionalChain([runtimeTestFault, 'optionalAccess', _120 => _120.trim, 'call', _121 => _121()]) || _optionalChain([absurdReleaseOverride, 'optionalAccess', _122 => _122.trim, 'call', _123 => _123()]) || _optionalChain([preferredReceiptGatewayMachineId, 'optionalAccess', _124 => _124.trim, 'call', _125 => _125()]))) {
388
445
  headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
389
446
  }
390
447
  return applyExplicitHeaders(
@@ -409,23 +466,23 @@ var HttpClient = class {
409
466
  async request(path, options) {
410
467
  const baseUrl = this.config.baseUrl;
411
468
  const url = `${baseUrl}${path}`;
412
- const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _114 => _114.method]), () => ( "GET"));
469
+ const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _126 => _126.method]), () => ( "GET"));
413
470
  const requestStartedAt = Date.now();
414
471
  let fetchAttempts = 0;
415
472
  let lastRequestUrl = url;
416
473
  let networkFailedAt;
417
474
  let networkPhase = "before_request";
418
- const headers = this.authHeaders(_optionalChain([options, 'optionalAccess', _115 => _115.headers]));
419
- if (_optionalChain([options, 'optionalAccess', _116 => _116.body]) !== void 0) {
475
+ const headers = this.authHeaders(_optionalChain([options, 'optionalAccess', _127 => _127.headers]));
476
+ if (_optionalChain([options, 'optionalAccess', _128 => _128.body]) !== void 0) {
420
477
  applyExplicitHeaders(headers, { "Content-Type": "application/json" });
421
478
  }
422
479
  let lastError = null;
423
- const candidateUrls = _optionalChain([options, 'optionalAccess', _117 => _117.exactUrlOnly]) ? [url] : buildCandidateUrls(url);
480
+ const candidateUrls = _optionalChain([options, 'optionalAccess', _129 => _129.exactUrlOnly]) ? [url] : buildCandidateUrls(url);
424
481
  let retryAfterDelayMs = null;
425
482
  let totalRetryWaitMs = 0;
426
- let maxRetries = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _118 => _118.maxRetries]), () => ( this.config.maxRetries));
483
+ let maxRetries = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _130 => _130.maxRetries]), () => ( this.config.maxRetries));
427
484
  requestAttempts: for (let attempt = 0; attempt <= maxRetries; attempt++) {
428
- if (_optionalChain([options, 'optionalAccess', _119 => _119.signal, 'optionalAccess', _120 => _120.aborted])) {
485
+ if (_optionalChain([options, 'optionalAccess', _131 => _131.signal, 'optionalAccess', _132 => _132.aborted])) {
429
486
  lastError = requestCancelledError(options.signal);
430
487
  networkFailedAt = Date.now();
431
488
  break;
@@ -440,7 +497,7 @@ var HttpClient = class {
440
497
  totalRetryWaitMs += delayMs;
441
498
  networkPhase = "retry_wait";
442
499
  try {
443
- await sleep(delayMs, _optionalChain([options, 'optionalAccess', _121 => _121.signal]));
500
+ await sleep(delayMs, _optionalChain([options, 'optionalAccess', _133 => _133.signal]));
444
501
  } catch (error) {
445
502
  lastError = error instanceof Error ? error : new Error(String(error));
446
503
  networkFailedAt = Date.now();
@@ -448,25 +505,25 @@ var HttpClient = class {
448
505
  }
449
506
  }
450
507
  for (const candidateUrl of candidateUrls) {
451
- if (_optionalChain([options, 'optionalAccess', _122 => _122.signal, 'optionalAccess', _123 => _123.aborted])) {
508
+ if (_optionalChain([options, 'optionalAccess', _134 => _134.signal, 'optionalAccess', _135 => _135.aborted])) {
452
509
  lastError = requestCancelledError(options.signal);
453
510
  networkFailedAt = Date.now();
454
511
  break requestAttempts;
455
512
  }
456
513
  const controller = new AbortController();
457
- const timeoutMs = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _124 => _124.timeout]), () => ( this.config.timeout));
514
+ const timeoutMs = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _136 => _136.timeout]), () => ( this.config.timeout));
458
515
  let requestTimedOut = false;
459
516
  const timeoutId = setTimeout(() => {
460
517
  requestTimedOut = true;
461
518
  controller.abort();
462
519
  }, timeoutMs);
463
520
  const abortRequest = () => controller.abort();
464
- _optionalChain([options, 'optionalAccess', _125 => _125.signal, 'optionalAccess', _126 => _126.addEventListener, 'call', _127 => _127("abort", abortRequest, {
521
+ _optionalChain([options, 'optionalAccess', _137 => _137.signal, 'optionalAccess', _138 => _138.addEventListener, 'call', _139 => _139("abort", abortRequest, {
465
522
  once: true
466
523
  })]);
467
524
  networkPhase = "before_request";
468
525
  try {
469
- const requestBody = _optionalChain([options, 'optionalAccess', _128 => _128.formData]) !== void 0 ? typeof options.formData === "function" ? options.formData() : options.formData : _optionalChain([options, 'optionalAccess', _129 => _129.body]) !== void 0 ? JSON.stringify(options.body) : void 0;
526
+ const requestBody = _optionalChain([options, 'optionalAccess', _140 => _140.formData]) !== void 0 ? typeof options.formData === "function" ? options.formData() : options.formData : _optionalChain([options, 'optionalAccess', _141 => _141.body]) !== void 0 ? JSON.stringify(options.body) : void 0;
470
527
  fetchAttempts += 1;
471
528
  lastRequestUrl = candidateUrl;
472
529
  networkPhase = "awaiting_headers";
@@ -478,8 +535,8 @@ var HttpClient = class {
478
535
  redirect: deploymentProtectionRedirect(headers)
479
536
  });
480
537
  networkPhase = "reading_body";
481
- _optionalChain([options, 'optionalAccess', _130 => _130.onResponse, 'optionalCall', _131 => _131(response)]);
482
- if (response.status === 404 && _optionalChain([options, 'optionalAccess', _132 => _132.allowNotFound])) {
538
+ _optionalChain([options, 'optionalAccess', _142 => _142.onResponse, 'optionalCall', _143 => _143(response)]);
539
+ if (response.status === 404 && _optionalChain([options, 'optionalAccess', _144 => _144.allowNotFound])) {
483
540
  clearTimeout(timeoutId);
484
541
  return null;
485
542
  }
@@ -487,18 +544,18 @@ var HttpClient = class {
487
544
  const receivedAtMs = Date.now();
488
545
  clearTimeout(timeoutId);
489
546
  const parsed = parseResponseBody(body);
490
- _optionalChain([options, 'optionalAccess', _133 => _133.onResponseBody, 'optionalCall', _134 => _134({
547
+ _optionalChain([options, 'optionalAccess', _145 => _145.onResponseBody, 'optionalCall', _146 => _146({
491
548
  receivedAtMs,
492
549
  httpStatus: response.status,
493
550
  body: parsed
494
551
  })]);
495
- const responseRetryAllowed = _optionalChain([options, 'optionalAccess', _135 => _135.retryFromExecutePolicy]) !== true || parseExecuteRetryPolicy(
552
+ const responseRetryAllowed = _optionalChain([options, 'optionalAccess', _147 => _147.retryFromExecutePolicy]) !== true || parseExecuteRetryPolicy(
496
553
  response.headers.get(EXECUTE_RETRY_POLICY_HEADER)
497
554
  ) === "transient-http-safe";
498
- if (_optionalChain([options, 'optionalAccess', _136 => _136.retryFromExecutePolicy]) === true && responseRetryAllowed && options.executePolicyMaxRetries !== void 0) {
555
+ if (_optionalChain([options, 'optionalAccess', _148 => _148.retryFromExecutePolicy]) === true && responseRetryAllowed && options.executePolicyMaxRetries !== void 0) {
499
556
  maxRetries = options.executePolicyMaxRetries;
500
557
  }
501
- const structuredToolError = _optionalChain([options, 'optionalAccess', _137 => _137.toolId]) && !response.ok ? _chunkSQWET4SLjs.deserializeToolExecutionFailure.call(void 0,
558
+ const structuredToolError = _optionalChain([options, 'optionalAccess', _149 => _149.toolId]) && !response.ok ? _chunkSQWET4SLjs.deserializeToolExecutionFailure.call(void 0,
502
559
  _chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
503
560
  isRecord(parsed) ? parsed.tool_error : null,
504
561
  _chunkSQWET4SLjs.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
@@ -520,7 +577,7 @@ var HttpClient = class {
520
577
  throw _chunkSQWET4SLjs.attachToolUpstreamResponse.call(void 0, structuredToolError, parsed);
521
578
  }
522
579
  if (response.status === 429) {
523
- if (_optionalChain([options, 'optionalAccess', _138 => _138.preserveRateLimitResponse]) && isMonitorRateLimitEnvelope(parsed)) {
580
+ if (_optionalChain([options, 'optionalAccess', _150 => _150.preserveRateLimitResponse]) && isMonitorRateLimitEnvelope(parsed)) {
524
581
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
525
582
  _chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
526
583
  response.status,
@@ -534,13 +591,13 @@ var HttpClient = class {
534
591
  retryAfterDelayMs = retryAfter;
535
592
  break;
536
593
  }
537
- throw _optionalChain([options, 'optionalAccess', _139 => _139.toolId]) ? _chunkSQWET4SLjs.attachToolUpstreamResponse.call(void 0, lastError, parsed) : lastError;
594
+ throw _optionalChain([options, 'optionalAccess', _151 => _151.toolId]) ? _chunkSQWET4SLjs.attachToolUpstreamResponse.call(void 0, lastError, parsed) : lastError;
538
595
  }
539
596
  if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
540
597
  throw new (0, _chunkT2N3B7IQjs.AuthError)(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
541
598
  }
542
599
  if (!response.ok) {
543
- const retryableApiError = _optionalChain([options, 'optionalAccess', _140 => _140.retryApiErrors]) === true && responseRetryAllowed && isRetryableApiErrorResponse(response.status);
600
+ const retryableApiError = _optionalChain([options, 'optionalAccess', _152 => _152.retryApiErrors]) === true && responseRetryAllowed && isRetryableApiErrorResponse(response.status);
544
601
  const htmlError = detectHtmlErrorBody(
545
602
  body,
546
603
  response.headers.get("content-type")
@@ -572,7 +629,7 @@ var HttpClient = class {
572
629
  retryAfterDelayMs = parseOptionalRetryAfter(response);
573
630
  break;
574
631
  }
575
- throw _optionalChain([options, 'optionalAccess', _141 => _141.toolId]) ? _chunkSQWET4SLjs.attachToolUpstreamResponse.call(void 0, lastError, parsed) : lastError;
632
+ throw _optionalChain([options, 'optionalAccess', _153 => _153.toolId]) ? _chunkSQWET4SLjs.attachToolUpstreamResponse.call(void 0, lastError, parsed) : lastError;
576
633
  }
577
634
  if (typeof parsed === "string") {
578
635
  const interstitial = detectHtmlErrorBody(
@@ -592,7 +649,7 @@ var HttpClient = class {
592
649
  } catch (error) {
593
650
  clearTimeout(timeoutId);
594
651
  networkFailedAt = Date.now();
595
- if (_optionalChain([options, 'optionalAccess', _142 => _142.signal, 'optionalAccess', _143 => _143.aborted])) {
652
+ if (_optionalChain([options, 'optionalAccess', _154 => _154.signal, 'optionalAccess', _155 => _155.aborted])) {
596
653
  lastError = requestCancelledError(options.signal);
597
654
  break requestAttempts;
598
655
  }
@@ -607,12 +664,12 @@ var HttpClient = class {
607
664
  timeoutMs,
608
665
  timedOut: requestTimedOut
609
666
  });
610
- if (_optionalChain([options, 'optionalAccess', _144 => _144.retryFromExecutePolicy]) && options.retryAmbiguousDelivery !== true) {
667
+ if (_optionalChain([options, 'optionalAccess', _156 => _156.retryFromExecutePolicy]) && options.retryAmbiguousDelivery !== true) {
611
668
  break requestAttempts;
612
669
  }
613
670
  } finally {
614
671
  clearTimeout(timeoutId);
615
- _optionalChain([options, 'optionalAccess', _145 => _145.signal, 'optionalAccess', _146 => _146.removeEventListener, 'call', _147 => _147("abort", abortRequest)]);
672
+ _optionalChain([options, 'optionalAccess', _157 => _157.signal, 'optionalAccess', _158 => _158.removeEventListener, 'call', _159 => _159("abort", abortRequest)]);
616
673
  }
617
674
  }
618
675
  if (attempt < maxRetries) continue;
@@ -639,7 +696,7 @@ var HttpClient = class {
639
696
  phase: networkPhase
640
697
  }
641
698
  };
642
- if (_optionalChain([options, 'optionalAccess', _148 => _148.toolId])) {
699
+ if (_optionalChain([options, 'optionalAccess', _160 => _160.toolId])) {
643
700
  const code = mappedNetworkError.code;
644
701
  throw withErrorCause(
645
702
  new (0, _chunkSQWET4SLjs.ToolExecutionError)(
@@ -691,26 +748,26 @@ var HttpClient = class {
691
748
  }
692
749
  async *streamSse(path, options) {
693
750
  const url = `${this.config.baseUrl}${path}`;
694
- const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _149 => _149.method]), () => ( "GET"));
751
+ const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _161 => _161.method]), () => ( "GET"));
695
752
  const headers = this.authHeaders({
696
753
  Accept: "text/event-stream",
697
- ..._optionalChain([options, 'optionalAccess', _150 => _150.headers])
754
+ ..._optionalChain([options, 'optionalAccess', _162 => _162.headers])
698
755
  });
699
- if (_optionalChain([options, 'optionalAccess', _151 => _151.body]) !== void 0) {
756
+ if (_optionalChain([options, 'optionalAccess', _163 => _163.body]) !== void 0) {
700
757
  applyExplicitHeaders(headers, { "Content-Type": "application/json" });
701
758
  }
702
759
  let lastError = null;
703
- const candidateUrls = _optionalChain([options, 'optionalAccess', _152 => _152.exactUrlOnly]) ? [url] : buildCandidateUrls(url);
760
+ const candidateUrls = _optionalChain([options, 'optionalAccess', _164 => _164.exactUrlOnly]) ? [url] : buildCandidateUrls(url);
704
761
  for (const candidateUrl of candidateUrls) {
705
762
  try {
706
763
  const response = await fetch(candidateUrl, {
707
764
  method,
708
765
  headers,
709
- body: _optionalChain([options, 'optionalAccess', _153 => _153.body]) !== void 0 ? JSON.stringify(options.body) : void 0,
710
- signal: _optionalChain([options, 'optionalAccess', _154 => _154.signal]),
766
+ body: _optionalChain([options, 'optionalAccess', _165 => _165.body]) !== void 0 ? JSON.stringify(options.body) : void 0,
767
+ signal: _optionalChain([options, 'optionalAccess', _166 => _166.signal]),
711
768
  redirect: deploymentProtectionRedirect(headers)
712
769
  });
713
- _optionalChain([options, 'optionalAccess', _155 => _155.onResponse, 'optionalCall', _156 => _156(response)]);
770
+ _optionalChain([options, 'optionalAccess', _167 => _167.onResponse, 'optionalCall', _168 => _168(response)]);
714
771
  if (!response.ok) {
715
772
  const body = await response.text();
716
773
  const parsed = parseResponseBody(body);
@@ -750,7 +807,7 @@ var HttpClient = class {
750
807
  throw error;
751
808
  }
752
809
  const normalized = error instanceof Error ? error : new Error(String(error));
753
- if (isAbortLikeError(normalized) && _optionalChain([options, 'optionalAccess', _157 => _157.signal, 'optionalAccess', _158 => _158.aborted])) {
810
+ if (isAbortLikeError(normalized) && _optionalChain([options, 'optionalAccess', _169 => _169.signal, 'optionalAccess', _170 => _170.aborted])) {
754
811
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
755
812
  `Stream from ${this.config.baseUrl} was aborted by the caller.`,
756
813
  void 0,
@@ -771,7 +828,7 @@ var HttpClient = class {
771
828
  }
772
829
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
773
830
  withCoworkNetworkHint(
774
- _optionalChain([lastError, 'optionalAccess', _159 => _159.message]) ? `Unable to stream from ${this.config.baseUrl}. ${lastError.message}` : `Unable to stream from ${this.config.baseUrl}.`
831
+ _optionalChain([lastError, 'optionalAccess', _171 => _171.message]) ? `Unable to stream from ${this.config.baseUrl}. ${lastError.message}` : `Unable to stream from ${this.config.baseUrl}.`
775
832
  )
776
833
  );
777
834
  }
@@ -827,21 +884,21 @@ var HttpClient = class {
827
884
  function parseResponseBody(body) {
828
885
  try {
829
886
  return JSON.parse(body);
830
- } catch (e4) {
887
+ } catch (e6) {
831
888
  return body;
832
889
  }
833
890
  }
834
891
  function isProviderOriginatedHttpError(parsed) {
835
892
  const response = asRecord(parsed);
836
- const error = asRecord(_optionalChain([response, 'optionalAccess', _160 => _160.error]));
837
- const failureOrigin = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _161 => _161.failure_origin]), () => ( _optionalChain([response, 'optionalAccess', _162 => _162.failure_origin])));
838
- const code = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _163 => _163.code]), () => ( _optionalChain([response, 'optionalAccess', _164 => _164.code])));
893
+ const error = asRecord(_optionalChain([response, 'optionalAccess', _172 => _172.error]));
894
+ const failureOrigin = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _173 => _173.failure_origin]), () => ( _optionalChain([response, 'optionalAccess', _174 => _174.failure_origin])));
895
+ const code = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _175 => _175.code]), () => ( _optionalChain([response, 'optionalAccess', _176 => _176.code])));
839
896
  return failureOrigin === "provider" || code === "UPSTREAM_BLOCKED";
840
897
  }
841
898
  function isMonitorRateLimitEnvelope(parsed) {
842
899
  const response = asRecord(parsed);
843
- const error = asRecord(_optionalChain([response, 'optionalAccess', _165 => _165.error]));
844
- return (_optionalChain([error, 'optionalAccess', _166 => _166.code]) === "monitor_upstream_rate_limited" || _optionalChain([error, 'optionalAccess', _167 => _167.code]) === "monitor_preview_rate_limited") && typeof error.message === "string";
900
+ const error = asRecord(_optionalChain([response, 'optionalAccess', _177 => _177.error]));
901
+ return (_optionalChain([error, 'optionalAccess', _178 => _178.code]) === "monitor_upstream_rate_limited" || _optionalChain([error, 'optionalAccess', _179 => _179.code]) === "monitor_preview_rate_limited") && typeof error.message === "string";
845
902
  }
846
903
  function asRecord(value) {
847
904
  return typeof value === "object" && value !== null ? value : null;
@@ -857,7 +914,7 @@ function detectHtmlErrorBody(body, contentType) {
857
914
  return null;
858
915
  }
859
916
  const titleMatch = trimmed.match(/<title[^>]*>([\s\S]*?)<\/title>/i);
860
- const title = _optionalChain([titleMatch, 'optionalAccess', _168 => _168[1], 'optionalAccess', _169 => _169.replace, 'call', _170 => _170(/\s+/g, " "), 'access', _171 => _171.trim, 'call', _172 => _172()]) || void 0;
917
+ const title = _optionalChain([titleMatch, 'optionalAccess', _180 => _180[1], 'optionalAccess', _181 => _181.replace, 'call', _182 => _182(/\s+/g, " "), 'access', _183 => _183.trim, 'call', _184 => _184()]) || void 0;
861
918
  const workerThrewException = /worker threw exception/i.test(trimmed);
862
919
  return {
863
920
  title,
@@ -897,7 +954,7 @@ function buildCandidateUrls(url) {
897
954
  candidates.push(loopback.toString());
898
955
  }
899
956
  return [...new Set(candidates)];
900
- } catch (e5) {
957
+ } catch (e7) {
901
958
  return [url];
902
959
  }
903
960
  }
@@ -941,20 +998,20 @@ function decodeSseFrame(frame) {
941
998
  }
942
999
  function sleep(ms, signal) {
943
1000
  return new Promise((resolve, reject) => {
944
- if (_optionalChain([signal, 'optionalAccess', _173 => _173.aborted])) {
1001
+ if (_optionalChain([signal, 'optionalAccess', _185 => _185.aborted])) {
945
1002
  reject(requestCancelledError(signal));
946
1003
  return;
947
1004
  }
948
1005
  const timeoutId = setTimeout(() => {
949
- _optionalChain([signal, 'optionalAccess', _174 => _174.removeEventListener, 'call', _175 => _175("abort", abort)]);
1006
+ _optionalChain([signal, 'optionalAccess', _186 => _186.removeEventListener, 'call', _187 => _187("abort", abort)]);
950
1007
  resolve();
951
1008
  }, ms);
952
1009
  const abort = () => {
953
1010
  clearTimeout(timeoutId);
954
- _optionalChain([signal, 'optionalAccess', _176 => _176.removeEventListener, 'call', _177 => _177("abort", abort)]);
1011
+ _optionalChain([signal, 'optionalAccess', _188 => _188.removeEventListener, 'call', _189 => _189("abort", abort)]);
955
1012
  reject(requestCancelledError(signal));
956
1013
  };
957
- _optionalChain([signal, 'optionalAccess', _178 => _178.addEventListener, 'call', _179 => _179("abort", abort, { once: true })]);
1014
+ _optionalChain([signal, 'optionalAccess', _190 => _190.addEventListener, 'call', _191 => _191("abort", abort, { once: true })]);
958
1015
  });
959
1016
  }
960
1017
  function withCoworkNetworkHint(message) {
@@ -980,4 +1037,7 @@ ${COWORK_NETWORK_HINT}`;
980
1037
 
981
1038
 
982
1039
 
983
- exports.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER = ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER; exports.SDK_VERSION = SDK_VERSION; exports.SDK_API_MAJOR = SDK_API_MAJOR; exports.SDK_API_CONTRACT = SDK_API_CONTRACT; exports.COORDINATOR_INTERNAL_TOKEN_HEADER = COORDINATOR_INTERNAL_TOKEN_HEADER; exports.RUNTIME_ENVIRONMENT_TOKEN_HEADER = RUNTIME_ENVIRONMENT_TOKEN_HEADER; exports.RETAINED_PIPELINE_RECEIVERS_HEADER = RETAINED_PIPELINE_RECEIVERS_HEADER; exports.agentSessionIdFromEnvironment = agentSessionIdFromEnvironment; exports.detectAgentRuntime = detectAgentRuntime; exports.deploymentProtectionHeaders = deploymentProtectionHeaders; exports.fetchWithDeploymentProtection = fetchWithDeploymentProtection; exports.networkCauseCode = networkCauseCode; exports.connectionFailureMessage = connectionFailureMessage; exports.HttpClient = HttpClient;
1040
+
1041
+
1042
+
1043
+ exports.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER = ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER; exports.SDK_VERSION = SDK_VERSION; exports.SDK_API_MAJOR = SDK_API_MAJOR; exports.SDK_API_CONTRACT = SDK_API_CONTRACT; exports.COORDINATOR_INTERNAL_TOKEN_HEADER = COORDINATOR_INTERNAL_TOKEN_HEADER; exports.RUNTIME_ENVIRONMENT_TOKEN_HEADER = RUNTIME_ENVIRONMENT_TOKEN_HEADER; exports.RETAINED_PIPELINE_RECEIVERS_HEADER = RETAINED_PIPELINE_RECEIVERS_HEADER; exports.agentSessionIdFromEnvironment = agentSessionIdFromEnvironment; exports.isAgentSessionId = isAgentSessionId; exports.claudeProjectsRoots = claudeProjectsRoots; exports.coworkTranscriptFromEnvironment = coworkTranscriptFromEnvironment; exports.detectAgentRuntime = detectAgentRuntime; exports.deploymentProtectionHeaders = deploymentProtectionHeaders; exports.fetchWithDeploymentProtection = fetchWithDeploymentProtection; exports.networkCauseCode = networkCauseCode; exports.connectionFailureMessage = connectionFailureMessage; exports.HttpClient = HttpClient;
@@ -2117,10 +2117,13 @@ When:
2117
2117
  succeeds, tell the user: "Session sent to Deepline. Rating: <rating>".
2118
2118
  [[cli:
2119
2119
  Input:
2120
- --current-session (the calling agent's session, else the newest one started
2121
- in this directory), or --session-id <uuid> (repeatable, each with an
2122
- optional --label), or --file <path> for a raw file. --agent
2123
- auto|claude|codex limits where transcripts are looked for.
2120
+ --current-session (the calling agent's session, else the Claude Cowork
2121
+ session this runs in, else the newest one started in this directory), or
2122
+ --session-id <uuid> (repeatable, each with an optional --label), or --file
2123
+ <path> for a raw file. Claude transcripts are found under
2124
+ $CLAUDE_CONFIG_DIR/projects, a Cowork session's ~/mnt/.claude/projects,
2125
+ and ~/.claude/projects. --agent auto|claude|codex limits where transcripts
2126
+ are looked for.
2124
2127
  --rating good|poor|neutral, judged by outcome and not tone: good when the
2125
2128
  user's goal was met without product problems; poor when it was missed, or
2126
2129
  a product failure, bug, or avoidable friction (including a substantial
@@ -2135,10 +2138,6 @@ Cost:
2135
2138
  Free.
2136
2139
  Avoid:
2137
2140
  The command is sessions, plural; the singular session form is the old one.
2138
- In a Cowork sandbox the transcripts are mounted under
2139
- ~/mnt/.claude/projects: when no session files are found and that directory
2140
- exists, link it to ~/.claude/projects and retry, or pass the newest
2141
- transcript there with [[--file]].
2142
2141
  `
2143
2142
  },
2144
2143
  "settings feedback": {
@@ -2160,7 +2159,9 @@ Cost:
2160
2159
  core: `
2161
2160
  Purpose:
2162
2161
  Send a bug report or product feedback to the Deepline team. The calling
2163
- agent's session id is attached, so a report can be matched to a transcript.
2162
+ agent's session id is attached, so a report can be matched to a transcript,
2163
+ but the transcript itself is uploaded only with [[--attach-session]] or
2164
+ [[sessions send]]. Never tell the user a transcript is attached otherwise.
2164
2165
  When:
2165
2166
  Confirm the report text with the user before sending with [[--requested]].
2166
2167
  When the feedback setting is off, send only if the user explicitly requests
@@ -2183,14 +2184,20 @@ Input:
2183
2184
  --error-outcome terminal when an error stopped the task, continued when
2184
2185
  work went on, including through a workaround; omit it when no error
2185
2186
  occurred. Pass --requested when the user requested or approved the report.
2186
- --json.
2187
+ --attach-session also uploads the calling agent's own session transcript
2188
+ (the session it names, or the Claude Cowork session) and links it; when
2189
+ none is found, nothing is sent. Pass it only when the user agreed to share
2190
+ the session. --json.
2187
2191
  Put the evidence in the text. A slow run: the goal, the play and run id,
2188
2192
  input size, observed duration, status changes or polling count, and what
2189
2193
  you expected. Extra steps: the goal, the command path you took, the
2190
2194
  detours, and the direct path you expected.
2191
2195
  ]]
2192
2196
  Output (JSON):
2193
- A confirmation envelope for the report.
2197
+ A confirmation envelope for the report, with session_id (null when none
2198
+ was found), transcript_uploaded, and warnings. When an agent's session
2199
+ can't be found, a warning on stderr names the sessions send command that
2200
+ uploads the transcript.
2194
2201
  Cost:
2195
2202
  Free. A report does not authorize a paid reproduction or a session upload.
2196
2203
  `