deepline 0.3.337 → 0.3.339
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.
- package/dist/bundling-sources/sdk/src/agent-runtime.ts +21 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +2 -2
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +20 -7
- package/dist/cli/{auth-6EREYQBM.mjs → auth-DLHLIJBP.mjs} +4 -4
- package/dist/cli/auth-M5OWKMLF.js +31 -0
- package/dist/cli/{billing-HZBD5KW6.js → billing-7UQXVLH2.js} +71 -71
- package/dist/cli/{billing-VMXYQMW6.mjs → billing-MLOOWHEX.mjs} +4 -4
- package/dist/cli/{chunk-YSR4PFTZ.js → chunk-2HTS4ZMF.js} +1 -1
- package/dist/cli/{chunk-A75J52BM.js → chunk-2OJGKWOX.js} +89 -76
- package/dist/cli/{chunk-NIXE5325.js → chunk-2UGEF3HR.js} +26 -26
- package/dist/cli/{chunk-ZUB3LXOI.mjs → chunk-35IBDQNW.mjs} +5 -5
- package/dist/cli/{chunk-5WTJ73QU.js → chunk-6KKVUVA6.js} +293 -308
- package/dist/cli/{chunk-IYK6XS5X.mjs → chunk-7CQBFUGN.mjs} +59 -74
- package/dist/cli/{chunk-MHWEX6GA.js → chunk-CI6TSINO.js} +8 -8
- package/dist/cli/{chunk-6PGYQ6IG.js → chunk-DOGZHHO5.js} +6 -6
- package/dist/cli/{chunk-FY65AYHZ.mjs → chunk-FC4X6GQI.mjs} +4 -4
- package/dist/cli/{chunk-35JNW43E.mjs → chunk-FTV2LY4S.mjs} +3 -3
- package/dist/cli/{chunk-7MRAPBWB.mjs → chunk-G5KDPFKG.mjs} +1 -1
- package/dist/cli/{chunk-NC5ODEG7.js → chunk-G7DUWWKO.js} +9 -9
- package/dist/cli/{chunk-EV4QJE4J.mjs → chunk-IIOBMOMH.mjs} +18 -7
- package/dist/cli/{chunk-4SRIWSEG.js → chunk-ISV5JQ43.js} +60 -60
- package/dist/cli/{chunk-2LHYWYHM.mjs → chunk-JMKUKFQS.mjs} +54 -12
- package/dist/cli/{chunk-VXCRG4J7.mjs → chunk-KGMWBR5S.mjs} +1 -1
- package/dist/cli/{chunk-NQ42LHHS.mjs → chunk-KSHINNFC.mjs} +14 -1
- package/dist/cli/{chunk-GPN5QAN2.mjs → chunk-MIMOIQXH.mjs} +2 -2
- package/dist/cli/{chunk-HDI6GSRQ.js → chunk-OAQ3JR4F.js} +48 -48
- package/dist/cli/{chunk-UQV5M6HN.js → chunk-OJVAVQLB.js} +18 -7
- package/dist/cli/{chunk-M7IN66XB.js → chunk-OWNN6BDD.js} +15 -15
- package/dist/cli/{chunk-TB6HY4BW.mjs → chunk-RI7LPAUP.mjs} +2 -2
- package/dist/cli/{chunk-XFSDLHGS.js → chunk-RKSYETCE.js} +2 -2
- package/dist/cli/{chunk-3OBY2AGM.js → chunk-RWPA6MGP.js} +45 -45
- package/dist/cli/{chunk-QEBA4KXE.js → chunk-S3WJ6LZJ.js} +70 -28
- package/dist/cli/{chunk-HBM2UKEU.mjs → chunk-TJSLXGQ2.mjs} +1 -1
- package/dist/cli/{chunk-5ERCVX2D.mjs → chunk-TOB6N2QF.mjs} +2 -2
- package/dist/cli/{chunk-YQW2FPKQ.mjs → chunk-YSM3GVSU.mjs} +1 -1
- package/dist/cli/client-7RSITSKJ.js +20 -0
- package/dist/cli/{client-BLGAYJME.mjs → client-NVSE7EBL.mjs} +3 -3
- package/dist/cli/{csv-43QTLWPN.mjs → csv-FC2PSRSE.mjs} +3 -3
- package/dist/cli/{csv-6WIFI6WR.js → csv-L7MQDTXX.js} +12 -12
- package/dist/cli/{db-5XFKB76V.js → db-7WOBHZBZ.js} +29 -29
- package/dist/cli/{db-NCERSUPL.mjs → db-G5HO22EN.mjs} +4 -4
- package/dist/cli/{describe-4DNSNQKM.js → describe-AWFEE2EE.js} +16 -16
- package/dist/cli/{describe-V4BPRUES.mjs → describe-KCUL54J3.mjs} +9 -9
- package/dist/cli/{executions-GQ4C2FGI.js → executions-MXEI32CR.js} +6 -6
- package/dist/cli/{executions-IGXMYAYA.mjs → executions-TSEMNPMJ.mjs} +4 -4
- package/dist/cli/{feedback-UFFCKVNH.js → feedback-EPVGGNT6.js} +11 -6
- package/dist/cli/{feedback-UVDBDHE4.mjs → feedback-R72V4O7H.mjs} +8 -3
- package/dist/cli/git-FZN5IHKS.js +23 -0
- package/dist/cli/{git-XI6XRTIZ.mjs → git-GVFRGXZI.mjs} +4 -4
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-5Z3YLPCN.js → legacy-noops-3Q4O5QJT.js} +7 -7
- package/dist/cli/{legacy-noops-IUJOLPED.mjs → legacy-noops-4QF2EUUO.mjs} +4 -4
- package/dist/cli/{monitors-KUS3ROXZ.mjs → monitors-AWGYR66F.mjs} +4 -4
- package/dist/cli/{monitors-TZAGTEID.js → monitors-RKV3XM5P.js} +85 -85
- package/dist/cli/{org-AHHROX6T.js → org-DTERGBF7.js} +60 -60
- package/dist/cli/{org-SLIG47UE.mjs → org-YMHTIEYB.mjs} +4 -4
- package/dist/cli/play-F7ZUV3HE.js +153 -0
- package/dist/cli/{play-G4AQ2OZ5.mjs → play-VRTGFHNX.mjs} +8 -8
- package/dist/cli/{providers-XQIQO6M3.mjs → providers-VJJSRFOV.mjs} +4 -4
- package/dist/cli/{providers-PBFVQ2EP.js → providers-WIKQGBZQ.js} +7 -7
- package/dist/cli/{quickstart-X6CLGXVG.js → quickstart-BUXTOSWT.js} +5 -5
- package/dist/cli/{quickstart-PCASXB6T.mjs → quickstart-MJUJ3JM2.mjs} +3 -3
- package/dist/cli/search-5MYDHDTY.js +26 -0
- package/dist/cli/{search-ZTYQBKME.mjs → search-LAJ4V4OY.mjs} +5 -5
- package/dist/cli/{secrets-IDF3FB7W.mjs → secrets-JGZRDC7K.mjs} +4 -4
- package/dist/cli/{secrets-N3DWWVAY.js → secrets-UDB4XWHC.js} +13 -13
- package/dist/cli/{sessions-ECDSBB7P.mjs → sessions-5BPLCV4K.mjs} +4 -4
- package/dist/cli/{sessions-SXXMNGUT.js → sessions-YO24QYTQ.js} +5 -5
- package/dist/cli/{settings-FKARLN4C.mjs → settings-RMHY4XMX.mjs} +7 -7
- package/dist/cli/{settings-IXHK6BAK.js → settings-YLWSKW7F.js} +74 -74
- package/dist/cli/{setup-MJXYEE27.js → setup-MVCAZC64.js} +41 -41
- package/dist/cli/{setup-LJG55UUU.mjs → setup-MWD2WOPN.mjs} +6 -6
- package/dist/cli/{skills-3IBFR2ZU.mjs → skills-7XXKMWN3.mjs} +4 -4
- package/dist/cli/skills-D7IDTAKN.js +28 -0
- package/dist/cli/tools-BH4LHBHV.js +40 -0
- package/dist/cli/{tools-ZJTHJHAD.mjs → tools-BM22TL5A.mjs} +6 -6
- package/dist/cli/update-BF2BPMYK.js +28 -0
- package/dist/cli/{update-ZN34FLDH.mjs → update-BLLLZRDG.mjs} +6 -6
- package/dist/cli/{workflow-LPCF7OMO.mjs → workflow-EOMW666N.mjs} +5 -5
- package/dist/cli/{workflow-VLCSTKPW.js → workflow-WG6QFCFL.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +76 -76
- package/dist/plays/bundle-play-file.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-XS3LNSAH.js +0 -31
- package/dist/cli/client-ERDYIAWV.js +0 -20
- package/dist/cli/git-4ORFOHYQ.js +0 -23
- package/dist/cli/play-RRKTT3F2.js +0 -153
- package/dist/cli/search-QGFQSDJI.js +0 -26
- package/dist/cli/skills-RI3IZNWB.js +0 -28
- package/dist/cli/tools-NQJLSI4O.js +0 -40
- package/dist/cli/update-JY7TJJDL.js +0 -28
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk2HTS4ZMFjs = require('./chunk-2HTS4ZMF.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -743,9 +743,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
743
743
|
}
|
|
744
744
|
|
|
745
745
|
// src/version.ts
|
|
746
|
-
var SDK_VERSION =
|
|
747
|
-
var SDK_API_MAJOR =
|
|
748
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
746
|
+
var SDK_VERSION = _chunk2HTS4ZMFjs.SDK_RELEASE.version;
|
|
747
|
+
var SDK_API_MAJOR = _chunk2HTS4ZMFjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
748
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunk2HTS4ZMFjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
749
749
|
|
|
750
750
|
// src/agent-runtime.ts
|
|
751
751
|
|
|
@@ -771,34 +771,46 @@ function normalizeAgentRuntime(value) {
|
|
|
771
771
|
if (explicit === "gemini_cli") return "gemini";
|
|
772
772
|
return EXPLICIT_AGENT_RUNTIMES.has(explicit) ? explicit : null;
|
|
773
773
|
}
|
|
774
|
+
var AGENT_SESSION_ID_VARIABLES = [
|
|
775
|
+
"CLAUDE_CODE_SESSION_ID",
|
|
776
|
+
"CODEX_SESSION_ID",
|
|
777
|
+
"CODEX_THREAD_ID"
|
|
778
|
+
];
|
|
779
|
+
function agentSessionIdFromEnvironment(env = process.env) {
|
|
780
|
+
for (const variable of AGENT_SESSION_ID_VARIABLES) {
|
|
781
|
+
const sessionId = _optionalChain([env, 'access', _66 => _66[variable], 'optionalAccess', _67 => _67.trim, 'call', _68 => _68()]);
|
|
782
|
+
if (sessionId) return sessionId;
|
|
783
|
+
}
|
|
784
|
+
return null;
|
|
785
|
+
}
|
|
774
786
|
function isCoworkLikeSandbox2() {
|
|
775
787
|
const pluginMode = truthyEnv("DEEPLINE_PLUGIN_MODE");
|
|
776
788
|
const claudeRemote = truthyEnv("CLAUDE_CODE_REMOTE");
|
|
777
|
-
const projectDir = Boolean(_optionalChain([process, 'access',
|
|
778
|
-
const pluginRoot = Boolean(_optionalChain([process, 'access',
|
|
779
|
-
const home = _optionalChain([process, 'access',
|
|
789
|
+
const projectDir = Boolean(_optionalChain([process, 'access', _69 => _69.env, 'access', _70 => _70.CLAUDE_PROJECT_DIR, 'optionalAccess', _71 => _71.trim, 'call', _72 => _72()]));
|
|
790
|
+
const pluginRoot = Boolean(_optionalChain([process, 'access', _73 => _73.env, 'access', _74 => _74.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _75 => _75.trim, 'call', _76 => _76()]));
|
|
791
|
+
const home = _optionalChain([process, 'access', _77 => _77.env, 'access', _78 => _78.HOME, 'optionalAccess', _79 => _79.trim, 'call', _80 => _80()]) || _os.homedir.call(void 0, );
|
|
780
792
|
const sessionHome = home === "/sessions" || home.startsWith("/sessions/");
|
|
781
793
|
return claudeRemote || sessionHome || (pluginMode || pluginRoot) && projectDir;
|
|
782
794
|
}
|
|
783
795
|
function detectAgentRuntime(options = {}) {
|
|
784
796
|
const explicit = normalizeAgentRuntime(process.env.DEEPLINE_AGENT_RUNTIME);
|
|
785
797
|
if (explicit) return explicit;
|
|
786
|
-
if (_optionalChain([process, 'access',
|
|
798
|
+
if (_optionalChain([process, 'access', _81 => _81.env, 'access', _82 => _82.CODEX_THREAD_ID, 'optionalAccess', _83 => _83.trim, 'call', _84 => _84()])) return "codex";
|
|
787
799
|
if (options.detectCowork !== false && isCoworkLikeSandbox2()) {
|
|
788
800
|
return "claude_cowork";
|
|
789
801
|
}
|
|
790
|
-
if (_optionalChain([process, 'access',
|
|
791
|
-
if (_optionalChain([process, 'access',
|
|
792
|
-
if (_optionalChain([process, 'access',
|
|
802
|
+
if (_optionalChain([process, 'access', _85 => _85.env, 'access', _86 => _86.CLAUDECODE, 'optionalAccess', _87 => _87.trim, 'call', _88 => _88()]) === "1") return "claude_code";
|
|
803
|
+
if (_optionalChain([process, 'access', _89 => _89.env, 'access', _90 => _90.CLINE_ACTIVE, 'optionalAccess', _91 => _91.trim, 'call', _92 => _92(), 'access', _93 => _93.toLowerCase, 'call', _94 => _94()]) === "true") return "cline";
|
|
804
|
+
if (_optionalChain([process, 'access', _95 => _95.env, 'access', _96 => _96.CURSOR_TRACE_ID, 'optionalAccess', _97 => _97.trim, 'call', _98 => _98()]) || _optionalChain([process, 'access', _99 => _99.env, 'access', _100 => _100.CURSOR_AGENT, 'optionalAccess', _101 => _101.trim, 'call', _102 => _102()])) {
|
|
793
805
|
return "cursor";
|
|
794
806
|
}
|
|
795
|
-
if (_optionalChain([process, 'access',
|
|
807
|
+
if (_optionalChain([process, 'access', _103 => _103.env, 'access', _104 => _104.WINDSURF, 'optionalAccess', _105 => _105.trim, 'call', _106 => _106()]) || _optionalChain([process, 'access', _107 => _107.env, 'access', _108 => _108.CASCADE, 'optionalAccess', _109 => _109.trim, 'call', _110 => _110()])) {
|
|
796
808
|
return "windsurf";
|
|
797
809
|
}
|
|
798
|
-
if (_optionalChain([process, 'access',
|
|
810
|
+
if (_optionalChain([process, 'access', _111 => _111.env, 'access', _112 => _112.ANTIGRAVITY, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]) || _optionalChain([process, 'access', _115 => _115.env, 'access', _116 => _116.ANTIGRAVITY_CLI, 'optionalAccess', _117 => _117.trim, 'call', _118 => _118()]) || _optionalChain([process, 'access', _119 => _119.env, 'access', _120 => _120.ANTIGRAVITY_AGENT, 'optionalAccess', _121 => _121.trim, 'call', _122 => _122()]) || _optionalChain([process, 'access', _123 => _123.env, 'access', _124 => _124.ANTIGRAVITY_WORKSPACE, 'optionalAccess', _125 => _125.trim, 'call', _126 => _126()])) {
|
|
799
811
|
return "antigravity";
|
|
800
812
|
}
|
|
801
|
-
if (_optionalChain([process, 'access',
|
|
813
|
+
if (_optionalChain([process, 'access', _127 => _127.env, 'access', _128 => _128.GEMINI_CLI, 'optionalAccess', _129 => _129.trim, 'call', _130 => _130()]) || _optionalChain([process, 'access', _131 => _131.env, 'access', _132 => _132.GEMINI_CLI_VERSION, 'optionalAccess', _133 => _133.trim, 'call', _134 => _134()]) || _optionalChain([process, 'access', _135 => _135.env, 'access', _136 => _136.GEMINI_SANDBOX, 'optionalAccess', _137 => _137.trim, 'call', _138 => _138()]) || _optionalChain([process, 'access', _139 => _139.env, 'access', _140 => _140.GEMINI_CONFIG_DIR, 'optionalAccess', _141 => _141.trim, 'call', _142 => _142()])) {
|
|
802
814
|
return "gemini";
|
|
803
815
|
}
|
|
804
816
|
return _nullishCoalesce(options.defaultRuntime, () => ( "unknown"));
|
|
@@ -808,11 +820,11 @@ function detectAgentRuntime(options = {}) {
|
|
|
808
820
|
|
|
809
821
|
|
|
810
822
|
function activePluginSkillsDir() {
|
|
811
|
-
const pluginMode = _optionalChain([process, 'access',
|
|
823
|
+
const pluginMode = _optionalChain([process, 'access', _143 => _143.env, 'access', _144 => _144.DEEPLINE_PLUGIN_MODE, 'optionalAccess', _145 => _145.trim, 'call', _146 => _146(), 'access', _147 => _147.toLowerCase, 'call', _148 => _148()]);
|
|
812
824
|
if (pluginMode !== "true" && pluginMode !== "1" && pluginMode !== "yes" && pluginMode !== "on") {
|
|
813
825
|
return "";
|
|
814
826
|
}
|
|
815
|
-
const dir = _nullishCoalesce(_optionalChain([process, 'access',
|
|
827
|
+
const dir = _nullishCoalesce(_optionalChain([process, 'access', _149 => _149.env, 'access', _150 => _150.DEEPLINE_PLUGIN_SKILLS_DIR, 'optionalAccess', _151 => _151.trim, 'call', _152 => _152()]), () => ( ""));
|
|
816
828
|
return dir && _fs.existsSync.call(void 0, dir) ? dir : "";
|
|
817
829
|
}
|
|
818
830
|
function hasActivePluginSkills() {
|
|
@@ -945,14 +957,14 @@ var SYNTHETIC_RUN_HEADER = "x-deepline-synthetic-run";
|
|
|
945
957
|
|
|
946
958
|
// src/deployment-protection.ts
|
|
947
959
|
function deploymentProtectionHeaders() {
|
|
948
|
-
const token = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
960
|
+
const token = typeof process !== "undefined" ? _optionalChain([process, 'access', _153 => _153.env, 'optionalAccess', _154 => _154.VERCEL_PROTECTION_BYPASS_TOKEN]) : void 0;
|
|
949
961
|
return token ? { "x-vercel-protection-bypass": token } : {};
|
|
950
962
|
}
|
|
951
963
|
var fetchWithDeploymentProtection = (input, init) => {
|
|
952
964
|
const headers = new Headers(
|
|
953
965
|
input instanceof Request ? input.headers : void 0
|
|
954
966
|
);
|
|
955
|
-
new Headers(_optionalChain([init, 'optionalAccess',
|
|
967
|
+
new Headers(_optionalChain([init, 'optionalAccess', _155 => _155.headers])).forEach((value, name) => headers.set(name, value));
|
|
956
968
|
for (const [name, value] of Object.entries(deploymentProtectionHeaders())) {
|
|
957
969
|
headers.set(name, value);
|
|
958
970
|
}
|
|
@@ -1288,7 +1300,7 @@ function withErrorCause(error, cause) {
|
|
|
1288
1300
|
}
|
|
1289
1301
|
function mapNetworkError(baseUrl, error, targetLabel) {
|
|
1290
1302
|
const tagged = error;
|
|
1291
|
-
const timeoutMs = _optionalChain([tagged, 'optionalAccess',
|
|
1303
|
+
const timeoutMs = _optionalChain([tagged, 'optionalAccess', _156 => _156[REQUEST_TIMEOUT_MARKER]]);
|
|
1292
1304
|
if (typeof timeoutMs === "number") {
|
|
1293
1305
|
return {
|
|
1294
1306
|
message: `Request to ${targetLabel} timed out after ${timeoutMs}ms while waiting for a response.`,
|
|
@@ -1296,14 +1308,14 @@ function mapNetworkError(baseUrl, error, targetLabel) {
|
|
|
1296
1308
|
details: { timeoutMs, target: targetLabel }
|
|
1297
1309
|
};
|
|
1298
1310
|
}
|
|
1299
|
-
if (_optionalChain([tagged, 'optionalAccess',
|
|
1311
|
+
if (_optionalChain([tagged, 'optionalAccess', _157 => _157[REQUEST_ABORT_MARKER]])) {
|
|
1300
1312
|
return {
|
|
1301
1313
|
message: `Request to ${targetLabel} was aborted before it completed.`,
|
|
1302
1314
|
code: "NETWORK_ABORTED"
|
|
1303
1315
|
};
|
|
1304
1316
|
}
|
|
1305
1317
|
return {
|
|
1306
|
-
message: _optionalChain([error, 'optionalAccess',
|
|
1318
|
+
message: _optionalChain([error, 'optionalAccess', _158 => _158.message]) ? `Unable to connect to ${baseUrl}. ${error.message}` : `Unable to connect to ${baseUrl}. Is the computer able to access the url?`,
|
|
1307
1319
|
code: "NETWORK_ERROR"
|
|
1308
1320
|
};
|
|
1309
1321
|
}
|
|
@@ -1371,45 +1383,45 @@ var HttpClient = class {
|
|
|
1371
1383
|
if (skillsVersion) {
|
|
1372
1384
|
headers["X-Deepline-Skills-Version"] = skillsVersion;
|
|
1373
1385
|
}
|
|
1374
|
-
const playArtifactR2Prefix = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
1386
|
+
const playArtifactR2Prefix = typeof process !== "undefined" ? _optionalChain([process, 'access', _159 => _159.env, 'optionalAccess', _160 => _160.DEEPLINE_PLAY_ARTIFACT_R2_PREFIX]) : void 0;
|
|
1375
1387
|
if (playArtifactR2Prefix) {
|
|
1376
1388
|
headers["x-deepline-play-artifact-r2-prefix"] = playArtifactR2Prefix;
|
|
1377
1389
|
}
|
|
1378
|
-
const coordinatorUrl = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
1379
|
-
const coordinatorInternalToken = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
1380
|
-
const absurdReleaseOverride = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
1381
|
-
const preferredReceiptGatewayMachineId = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
1382
|
-
if (_optionalChain([coordinatorUrl, 'optionalAccess',
|
|
1390
|
+
const coordinatorUrl = typeof process !== "undefined" ? _optionalChain([process, 'access', _161 => _161.env, 'optionalAccess', _162 => _162.DEEPLINE_COORDINATOR_URL]) : void 0;
|
|
1391
|
+
const coordinatorInternalToken = typeof process !== "undefined" ? _optionalChain([process, 'access', _163 => _163.env, 'optionalAccess', _164 => _164.DEEPLINE_INTERNAL_TOKEN]) : void 0;
|
|
1392
|
+
const absurdReleaseOverride = typeof process !== "undefined" ? _optionalChain([process, 'access', _165 => _165.env, 'optionalAccess', _166 => _166.DEEPLINE_ABSURD_RELEASE]) : void 0;
|
|
1393
|
+
const preferredReceiptGatewayMachineId = typeof process !== "undefined" ? _optionalChain([process, 'access', _167 => _167.env, 'optionalAccess', _168 => _168.DEEPLINE_PREFERRED_RECEIPT_GATEWAY_MACHINE_ID]) : void 0;
|
|
1394
|
+
if (_optionalChain([coordinatorUrl, 'optionalAccess', _169 => _169.trim, 'call', _170 => _170()])) {
|
|
1383
1395
|
headers[COORDINATOR_URL_OVERRIDE_HEADER] = coordinatorUrl.trim();
|
|
1384
1396
|
}
|
|
1385
|
-
const workerCallbackUrl = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
1386
|
-
if (_optionalChain([workerCallbackUrl, 'optionalAccess',
|
|
1397
|
+
const workerCallbackUrl = typeof process !== "undefined" ? _optionalChain([process, 'access', _171 => _171.env, 'optionalAccess', _172 => _172.DEEPLINE_WORKER_CALLBACK_URL]) : void 0;
|
|
1398
|
+
if (_optionalChain([workerCallbackUrl, 'optionalAccess', _173 => _173.trim, 'call', _174 => _174()])) {
|
|
1387
1399
|
headers[WORKER_CALLBACK_URL_OVERRIDE_HEADER] = workerCallbackUrl.trim();
|
|
1388
1400
|
}
|
|
1389
|
-
const runtimeSchedulerSchema = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
1390
|
-
if (_optionalChain([runtimeSchedulerSchema, 'optionalAccess',
|
|
1401
|
+
const runtimeSchedulerSchema = typeof process !== "undefined" ? _optionalChain([process, 'access', _175 => _175.env, 'optionalAccess', _176 => _176.DEEPLINE_RUNTIME_SCHEDULER_SCHEMA]) : void 0;
|
|
1402
|
+
if (_optionalChain([runtimeSchedulerSchema, 'optionalAccess', _177 => _177.trim, 'call', _178 => _178()])) {
|
|
1391
1403
|
headers[RUNTIME_SCHEDULER_SCHEMA_OVERRIDE_HEADER] = runtimeSchedulerSchema.trim();
|
|
1392
1404
|
}
|
|
1393
|
-
const syntheticRun = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
1405
|
+
const syntheticRun = typeof process !== "undefined" ? _optionalChain([process, 'access', _179 => _179.env, 'optionalAccess', _180 => _180.DEEPLINE_SYNTHETIC_RUN]) : void 0;
|
|
1394
1406
|
if (syntheticRun && syntheticRun.trim() && syntheticRun.trim() !== "0") {
|
|
1395
1407
|
headers[SYNTHETIC_RUN_HEADER] = "1";
|
|
1396
1408
|
}
|
|
1397
|
-
const runtimeTestFault = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
1398
|
-
if (_optionalChain([runtimeTestFault, 'optionalAccess',
|
|
1409
|
+
const runtimeTestFault = typeof process !== "undefined" ? _optionalChain([process, 'access', _181 => _181.env, 'optionalAccess', _182 => _182.DEEPLINE_TEST_RUNTIME_FAULT]) : void 0;
|
|
1410
|
+
if (_optionalChain([runtimeTestFault, 'optionalAccess', _183 => _183.trim, 'call', _184 => _184()])) {
|
|
1399
1411
|
headers[PLAY_RUNTIME_TEST_FAULT_HEADER] = runtimeTestFault.trim();
|
|
1400
1412
|
}
|
|
1401
|
-
const retainedReceivers = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
1402
|
-
if (retainedReceivers && _optionalChain([coordinatorInternalToken, 'optionalAccess',
|
|
1413
|
+
const retainedReceivers = typeof process !== "undefined" ? _optionalChain([process, 'access', _185 => _185.env, 'optionalAccess', _186 => _186.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _187 => _187.trim, 'call', _188 => _188()]) : void 0;
|
|
1414
|
+
if (retainedReceivers && _optionalChain([coordinatorInternalToken, 'optionalAccess', _189 => _189.trim, 'call', _190 => _190()])) {
|
|
1403
1415
|
headers[RETAINED_PIPELINE_RECEIVERS_HEADER] = retainedReceivers;
|
|
1404
1416
|
headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
|
|
1405
1417
|
}
|
|
1406
|
-
if (_optionalChain([absurdReleaseOverride, 'optionalAccess',
|
|
1418
|
+
if (_optionalChain([absurdReleaseOverride, 'optionalAccess', _191 => _191.trim, 'call', _192 => _192()]) && _optionalChain([coordinatorInternalToken, 'optionalAccess', _193 => _193.trim, 'call', _194 => _194()])) {
|
|
1407
1419
|
headers[ABSURD_RELEASE_OVERRIDE_HEADER] = absurdReleaseOverride.trim();
|
|
1408
1420
|
}
|
|
1409
|
-
if (_optionalChain([preferredReceiptGatewayMachineId, 'optionalAccess',
|
|
1421
|
+
if (_optionalChain([preferredReceiptGatewayMachineId, 'optionalAccess', _195 => _195.trim, 'call', _196 => _196()]) && _optionalChain([coordinatorInternalToken, 'optionalAccess', _197 => _197.trim, 'call', _198 => _198()])) {
|
|
1410
1422
|
headers[PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER] = preferredReceiptGatewayMachineId.trim();
|
|
1411
1423
|
}
|
|
1412
|
-
if (_optionalChain([coordinatorInternalToken, 'optionalAccess',
|
|
1424
|
+
if (_optionalChain([coordinatorInternalToken, 'optionalAccess', _199 => _199.trim, 'call', _200 => _200()]) && (_optionalChain([coordinatorUrl, 'optionalAccess', _201 => _201.trim, 'call', _202 => _202()]) || _optionalChain([workerCallbackUrl, 'optionalAccess', _203 => _203.trim, 'call', _204 => _204()]) || _optionalChain([runtimeTestFault, 'optionalAccess', _205 => _205.trim, 'call', _206 => _206()]) || _optionalChain([absurdReleaseOverride, 'optionalAccess', _207 => _207.trim, 'call', _208 => _208()]) || _optionalChain([preferredReceiptGatewayMachineId, 'optionalAccess', _209 => _209.trim, 'call', _210 => _210()]))) {
|
|
1413
1425
|
headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
|
|
1414
1426
|
}
|
|
1415
1427
|
return applyExplicitHeaders(
|
|
@@ -1434,23 +1446,23 @@ var HttpClient = class {
|
|
|
1434
1446
|
async request(path, options) {
|
|
1435
1447
|
const baseUrl = this.config.baseUrl;
|
|
1436
1448
|
const url = `${baseUrl}${path}`;
|
|
1437
|
-
const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
1449
|
+
const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _211 => _211.method]), () => ( "GET"));
|
|
1438
1450
|
const requestStartedAt = Date.now();
|
|
1439
1451
|
let fetchAttempts = 0;
|
|
1440
1452
|
let lastRequestUrl = url;
|
|
1441
1453
|
let networkFailedAt;
|
|
1442
1454
|
let networkPhase = "before_request";
|
|
1443
|
-
const headers = this.authHeaders(_optionalChain([options, 'optionalAccess',
|
|
1444
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1455
|
+
const headers = this.authHeaders(_optionalChain([options, 'optionalAccess', _212 => _212.headers]));
|
|
1456
|
+
if (_optionalChain([options, 'optionalAccess', _213 => _213.body]) !== void 0) {
|
|
1445
1457
|
applyExplicitHeaders(headers, { "Content-Type": "application/json" });
|
|
1446
1458
|
}
|
|
1447
1459
|
let lastError = null;
|
|
1448
|
-
const candidateUrls = _optionalChain([options, 'optionalAccess',
|
|
1460
|
+
const candidateUrls = _optionalChain([options, 'optionalAccess', _214 => _214.exactUrlOnly]) ? [url] : buildCandidateUrls(url);
|
|
1449
1461
|
let retryAfterDelayMs = null;
|
|
1450
1462
|
let totalRetryWaitMs = 0;
|
|
1451
|
-
const maxRetries = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
1463
|
+
const maxRetries = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _215 => _215.maxRetries]), () => ( this.config.maxRetries));
|
|
1452
1464
|
requestAttempts: for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
1453
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1465
|
+
if (_optionalChain([options, 'optionalAccess', _216 => _216.signal, 'optionalAccess', _217 => _217.aborted])) {
|
|
1454
1466
|
lastError = requestCancelledError(options.signal);
|
|
1455
1467
|
networkFailedAt = Date.now();
|
|
1456
1468
|
break;
|
|
@@ -1465,7 +1477,7 @@ var HttpClient = class {
|
|
|
1465
1477
|
totalRetryWaitMs += delayMs;
|
|
1466
1478
|
networkPhase = "retry_wait";
|
|
1467
1479
|
try {
|
|
1468
|
-
await sleep(delayMs, _optionalChain([options, 'optionalAccess',
|
|
1480
|
+
await sleep(delayMs, _optionalChain([options, 'optionalAccess', _218 => _218.signal]));
|
|
1469
1481
|
} catch (error) {
|
|
1470
1482
|
lastError = error instanceof Error ? error : new Error(String(error));
|
|
1471
1483
|
networkFailedAt = Date.now();
|
|
@@ -1473,25 +1485,25 @@ var HttpClient = class {
|
|
|
1473
1485
|
}
|
|
1474
1486
|
}
|
|
1475
1487
|
for (const candidateUrl of candidateUrls) {
|
|
1476
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1488
|
+
if (_optionalChain([options, 'optionalAccess', _219 => _219.signal, 'optionalAccess', _220 => _220.aborted])) {
|
|
1477
1489
|
lastError = requestCancelledError(options.signal);
|
|
1478
1490
|
networkFailedAt = Date.now();
|
|
1479
1491
|
break requestAttempts;
|
|
1480
1492
|
}
|
|
1481
1493
|
const controller = new AbortController();
|
|
1482
|
-
const timeoutMs = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
1494
|
+
const timeoutMs = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _221 => _221.timeout]), () => ( this.config.timeout));
|
|
1483
1495
|
let requestTimedOut = false;
|
|
1484
1496
|
const timeoutId = setTimeout(() => {
|
|
1485
1497
|
requestTimedOut = true;
|
|
1486
1498
|
controller.abort();
|
|
1487
1499
|
}, timeoutMs);
|
|
1488
1500
|
const abortRequest = () => controller.abort();
|
|
1489
|
-
_optionalChain([options, 'optionalAccess',
|
|
1501
|
+
_optionalChain([options, 'optionalAccess', _222 => _222.signal, 'optionalAccess', _223 => _223.addEventListener, 'call', _224 => _224("abort", abortRequest, {
|
|
1490
1502
|
once: true
|
|
1491
1503
|
})]);
|
|
1492
1504
|
networkPhase = "before_request";
|
|
1493
1505
|
try {
|
|
1494
|
-
const requestBody = _optionalChain([options, 'optionalAccess',
|
|
1506
|
+
const requestBody = _optionalChain([options, 'optionalAccess', _225 => _225.formData]) !== void 0 ? typeof options.formData === "function" ? options.formData() : options.formData : _optionalChain([options, 'optionalAccess', _226 => _226.body]) !== void 0 ? JSON.stringify(options.body) : void 0;
|
|
1495
1507
|
fetchAttempts += 1;
|
|
1496
1508
|
lastRequestUrl = candidateUrl;
|
|
1497
1509
|
networkPhase = "awaiting_headers";
|
|
@@ -1502,15 +1514,15 @@ var HttpClient = class {
|
|
|
1502
1514
|
signal: controller.signal
|
|
1503
1515
|
});
|
|
1504
1516
|
networkPhase = "reading_body";
|
|
1505
|
-
_optionalChain([options, 'optionalAccess',
|
|
1506
|
-
if (response.status === 404 && _optionalChain([options, 'optionalAccess',
|
|
1517
|
+
_optionalChain([options, 'optionalAccess', _227 => _227.onResponse, 'optionalCall', _228 => _228(response)]);
|
|
1518
|
+
if (response.status === 404 && _optionalChain([options, 'optionalAccess', _229 => _229.allowNotFound])) {
|
|
1507
1519
|
clearTimeout(timeoutId);
|
|
1508
1520
|
return null;
|
|
1509
1521
|
}
|
|
1510
1522
|
const body = await response.text();
|
|
1511
1523
|
clearTimeout(timeoutId);
|
|
1512
1524
|
const parsed = parseResponseBody(body);
|
|
1513
|
-
const structuredToolError = _optionalChain([options, 'optionalAccess',
|
|
1525
|
+
const structuredToolError = _optionalChain([options, 'optionalAccess', _230 => _230.toolId]) && !response.ok ? _chunk7P5AA3SNjs.deserializeToolExecutionFailure.call(void 0,
|
|
1514
1526
|
_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
|
|
1515
1527
|
isRecord(parsed) ? parsed.tool_error : null,
|
|
1516
1528
|
_chunk7P5AA3SNjs.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
|
|
@@ -1532,7 +1544,7 @@ var HttpClient = class {
|
|
|
1532
1544
|
throw structuredToolError;
|
|
1533
1545
|
}
|
|
1534
1546
|
if (response.status === 429) {
|
|
1535
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1547
|
+
if (_optionalChain([options, 'optionalAccess', _231 => _231.preserveRateLimitResponse]) && isMonitorRateLimitEnvelope(parsed)) {
|
|
1536
1548
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
1537
1549
|
_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
|
|
1538
1550
|
response.status,
|
|
@@ -1552,7 +1564,7 @@ var HttpClient = class {
|
|
|
1552
1564
|
throw new AuthError(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
|
|
1553
1565
|
}
|
|
1554
1566
|
if (!response.ok) {
|
|
1555
|
-
const retryableApiError = _optionalChain([options, 'optionalAccess',
|
|
1567
|
+
const retryableApiError = _optionalChain([options, 'optionalAccess', _232 => _232.retryApiErrors]) === true && isRetryableApiErrorResponse(response.status);
|
|
1556
1568
|
const htmlError = detectHtmlErrorBody(
|
|
1557
1569
|
body,
|
|
1558
1570
|
response.headers.get("content-type")
|
|
@@ -1604,7 +1616,7 @@ var HttpClient = class {
|
|
|
1604
1616
|
} catch (error) {
|
|
1605
1617
|
clearTimeout(timeoutId);
|
|
1606
1618
|
networkFailedAt = Date.now();
|
|
1607
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1619
|
+
if (_optionalChain([options, 'optionalAccess', _233 => _233.signal, 'optionalAccess', _234 => _234.aborted])) {
|
|
1608
1620
|
lastError = requestCancelledError(options.signal);
|
|
1609
1621
|
break requestAttempts;
|
|
1610
1622
|
}
|
|
@@ -1621,7 +1633,7 @@ var HttpClient = class {
|
|
|
1621
1633
|
});
|
|
1622
1634
|
} finally {
|
|
1623
1635
|
clearTimeout(timeoutId);
|
|
1624
|
-
_optionalChain([options, 'optionalAccess',
|
|
1636
|
+
_optionalChain([options, 'optionalAccess', _235 => _235.signal, 'optionalAccess', _236 => _236.removeEventListener, 'call', _237 => _237("abort", abortRequest)]);
|
|
1625
1637
|
}
|
|
1626
1638
|
}
|
|
1627
1639
|
if (attempt < maxRetries) continue;
|
|
@@ -1648,7 +1660,7 @@ var HttpClient = class {
|
|
|
1648
1660
|
phase: networkPhase
|
|
1649
1661
|
}
|
|
1650
1662
|
};
|
|
1651
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1663
|
+
if (_optionalChain([options, 'optionalAccess', _238 => _238.toolId])) {
|
|
1652
1664
|
const code = mappedNetworkError.code;
|
|
1653
1665
|
throw withErrorCause(
|
|
1654
1666
|
new (0, _chunk7P5AA3SNjs.ToolExecutionError)(
|
|
@@ -1700,12 +1712,12 @@ var HttpClient = class {
|
|
|
1700
1712
|
}
|
|
1701
1713
|
async *streamSse(path, options) {
|
|
1702
1714
|
const url = `${this.config.baseUrl}${path}`;
|
|
1703
|
-
const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
1715
|
+
const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _239 => _239.method]), () => ( "GET"));
|
|
1704
1716
|
const headers = this.authHeaders({
|
|
1705
1717
|
Accept: "text/event-stream",
|
|
1706
|
-
..._optionalChain([options, 'optionalAccess',
|
|
1718
|
+
..._optionalChain([options, 'optionalAccess', _240 => _240.headers])
|
|
1707
1719
|
});
|
|
1708
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1720
|
+
if (_optionalChain([options, 'optionalAccess', _241 => _241.body]) !== void 0) {
|
|
1709
1721
|
applyExplicitHeaders(headers, { "Content-Type": "application/json" });
|
|
1710
1722
|
}
|
|
1711
1723
|
let lastError = null;
|
|
@@ -1714,8 +1726,8 @@ var HttpClient = class {
|
|
|
1714
1726
|
const response = await fetch(candidateUrl, {
|
|
1715
1727
|
method,
|
|
1716
1728
|
headers,
|
|
1717
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
1718
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
1729
|
+
body: _optionalChain([options, 'optionalAccess', _242 => _242.body]) !== void 0 ? JSON.stringify(options.body) : void 0,
|
|
1730
|
+
signal: _optionalChain([options, 'optionalAccess', _243 => _243.signal])
|
|
1719
1731
|
});
|
|
1720
1732
|
if (!response.ok) {
|
|
1721
1733
|
const body = await response.text();
|
|
@@ -1756,7 +1768,7 @@ var HttpClient = class {
|
|
|
1756
1768
|
throw error;
|
|
1757
1769
|
}
|
|
1758
1770
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
1759
|
-
if (isAbortLikeError(normalized) && _optionalChain([options, 'optionalAccess',
|
|
1771
|
+
if (isAbortLikeError(normalized) && _optionalChain([options, 'optionalAccess', _244 => _244.signal, 'optionalAccess', _245 => _245.aborted])) {
|
|
1760
1772
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
1761
1773
|
`Stream from ${this.config.baseUrl} was aborted by the caller.`,
|
|
1762
1774
|
void 0,
|
|
@@ -1777,7 +1789,7 @@ var HttpClient = class {
|
|
|
1777
1789
|
}
|
|
1778
1790
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
1779
1791
|
withCoworkNetworkHint(
|
|
1780
|
-
_optionalChain([lastError, 'optionalAccess',
|
|
1792
|
+
_optionalChain([lastError, 'optionalAccess', _246 => _246.message]) ? `Unable to stream from ${this.config.baseUrl}. ${lastError.message}` : `Unable to stream from ${this.config.baseUrl}.`
|
|
1781
1793
|
)
|
|
1782
1794
|
);
|
|
1783
1795
|
}
|
|
@@ -1839,15 +1851,15 @@ function parseResponseBody(body) {
|
|
|
1839
1851
|
}
|
|
1840
1852
|
function isProviderOriginatedHttpError(parsed) {
|
|
1841
1853
|
const response = asRecord(parsed);
|
|
1842
|
-
const error = asRecord(_optionalChain([response, 'optionalAccess',
|
|
1843
|
-
const failureOrigin = _nullishCoalesce(_optionalChain([error, 'optionalAccess',
|
|
1844
|
-
const code = _nullishCoalesce(_optionalChain([error, 'optionalAccess',
|
|
1854
|
+
const error = asRecord(_optionalChain([response, 'optionalAccess', _247 => _247.error]));
|
|
1855
|
+
const failureOrigin = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _248 => _248.failure_origin]), () => ( _optionalChain([response, 'optionalAccess', _249 => _249.failure_origin])));
|
|
1856
|
+
const code = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _250 => _250.code]), () => ( _optionalChain([response, 'optionalAccess', _251 => _251.code])));
|
|
1845
1857
|
return failureOrigin === "provider" || code === "UPSTREAM_BLOCKED";
|
|
1846
1858
|
}
|
|
1847
1859
|
function isMonitorRateLimitEnvelope(parsed) {
|
|
1848
1860
|
const response = asRecord(parsed);
|
|
1849
|
-
const error = asRecord(_optionalChain([response, 'optionalAccess',
|
|
1850
|
-
return _optionalChain([error, 'optionalAccess',
|
|
1861
|
+
const error = asRecord(_optionalChain([response, 'optionalAccess', _252 => _252.error]));
|
|
1862
|
+
return _optionalChain([error, 'optionalAccess', _253 => _253.code]) === "monitor_upstream_rate_limited" && typeof error.message === "string";
|
|
1851
1863
|
}
|
|
1852
1864
|
function asRecord(value) {
|
|
1853
1865
|
return typeof value === "object" && value !== null ? value : null;
|
|
@@ -1863,7 +1875,7 @@ function detectHtmlErrorBody(body, contentType) {
|
|
|
1863
1875
|
return null;
|
|
1864
1876
|
}
|
|
1865
1877
|
const titleMatch = trimmed.match(/<title[^>]*>([\s\S]*?)<\/title>/i);
|
|
1866
|
-
const title = _optionalChain([titleMatch, 'optionalAccess',
|
|
1878
|
+
const title = _optionalChain([titleMatch, 'optionalAccess', _254 => _254[1], 'optionalAccess', _255 => _255.replace, 'call', _256 => _256(/\s+/g, " "), 'access', _257 => _257.trim, 'call', _258 => _258()]) || void 0;
|
|
1867
1879
|
const workerThrewException = /worker threw exception/i.test(trimmed);
|
|
1868
1880
|
return {
|
|
1869
1881
|
title,
|
|
@@ -1947,20 +1959,20 @@ function decodeSseFrame(frame) {
|
|
|
1947
1959
|
}
|
|
1948
1960
|
function sleep(ms, signal) {
|
|
1949
1961
|
return new Promise((resolve2, reject) => {
|
|
1950
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
1962
|
+
if (_optionalChain([signal, 'optionalAccess', _259 => _259.aborted])) {
|
|
1951
1963
|
reject(requestCancelledError(signal));
|
|
1952
1964
|
return;
|
|
1953
1965
|
}
|
|
1954
1966
|
const timeoutId = setTimeout(() => {
|
|
1955
|
-
_optionalChain([signal, 'optionalAccess',
|
|
1967
|
+
_optionalChain([signal, 'optionalAccess', _260 => _260.removeEventListener, 'call', _261 => _261("abort", abort)]);
|
|
1956
1968
|
resolve2();
|
|
1957
1969
|
}, ms);
|
|
1958
1970
|
const abort = () => {
|
|
1959
1971
|
clearTimeout(timeoutId);
|
|
1960
|
-
_optionalChain([signal, 'optionalAccess',
|
|
1972
|
+
_optionalChain([signal, 'optionalAccess', _262 => _262.removeEventListener, 'call', _263 => _263("abort", abort)]);
|
|
1961
1973
|
reject(requestCancelledError(signal));
|
|
1962
1974
|
};
|
|
1963
|
-
_optionalChain([signal, 'optionalAccess',
|
|
1975
|
+
_optionalChain([signal, 'optionalAccess', _264 => _264.addEventListener, 'call', _265 => _265("abort", abort, { once: true })]);
|
|
1964
1976
|
});
|
|
1965
1977
|
}
|
|
1966
1978
|
function withCoworkNetworkHint(message) {
|
|
@@ -2021,4 +2033,5 @@ ${COWORK_NETWORK_HINT}`;
|
|
|
2021
2033
|
|
|
2022
2034
|
|
|
2023
2035
|
|
|
2024
|
-
|
|
2036
|
+
|
|
2037
|
+
exports.CustomerDbQueryOutcomeUnknownError = CustomerDbQueryOutcomeUnknownError; exports.AuthError = AuthError; exports.RateLimitError = RateLimitError; exports.ToolRateLimitError = ToolRateLimitError; exports.ConfigError = ConfigError; exports.HOST_URL_ENV = HOST_URL_ENV; exports.API_KEY_ENV = API_KEY_ENV; exports.ACTIVE_ORG_ID_ENV = ACTIVE_ORG_ID_ENV; exports.ACTIVE_ORG_NAME_ENV = ACTIVE_ORG_NAME_ENV; exports.FEATURES_ENV = FEATURES_ENV; exports.PROD_URL = PROD_URL; exports.featureEnvValues = featureEnvValues; exports.storedHostApiKey = storedHostApiKey; exports.storedHostFeatures = storedHostFeatures; exports.baseUrlSlug = baseUrlSlug; exports.sdkCliStateDirPath = sdkCliStateDirPath; exports.hostConfigDirPath = hostConfigDirPath; exports.hostEnvFilePath = hostEnvFilePath; exports.saveHostEnvValues = saveHostEnvValues; exports.autoDetectBaseUrl = autoDetectBaseUrl; exports.resolveApiKeyForBaseUrl = resolveApiKeyForBaseUrl; exports.resolveProjectApiKeyForBaseUrl = resolveProjectApiKeyForBaseUrl; exports.resolveGlobalApiKeyForBaseUrl = resolveGlobalApiKeyForBaseUrl; exports.getResolvedProjectAuthSource = getResolvedProjectAuthSource; exports.resolveBaseUrlOnly = resolveBaseUrlOnly; exports.resolveConfig = resolveConfig; exports.ensureProjectPrivatePathsIgnored = ensureProjectPrivatePathsIgnored; exports.saveProjectDeeplineEnvValues = saveProjectDeeplineEnvValues; exports.resolveProjectPinTarget = resolveProjectPinTarget; exports.getActiveProjectAuthSource = getActiveProjectAuthSource; exports.resolveCliAuthProvenance = resolveCliAuthProvenance; exports.resolveCliCommandContext = resolveCliCommandContext; exports.SDK_VERSION = SDK_VERSION; exports.SDK_API_MAJOR = SDK_API_MAJOR; exports.SDK_API_CONTRACT = SDK_API_CONTRACT; exports.agentSessionIdFromEnvironment = agentSessionIdFromEnvironment; exports.detectAgentRuntime = detectAgentRuntime; exports.hasActivePluginSkills = hasActivePluginSkills; exports.KNOWN_SKILL_AGENTS = KNOWN_SKILL_AGENTS; exports.DEFAULT_SKILL_AGENTS = DEFAULT_SKILL_AGENTS; exports.skillsAgentPathSegment = skillsAgentPathSegment; exports.resolveAutoSyncSkillAgents = resolveAutoSyncSkillAgents; exports.readSdkSkillsLocalVersion = readSdkSkillsLocalVersion; exports.writeSdkSkillsLocalVersion = writeSdkSkillsLocalVersion; exports.deploymentProtectionHeaders = deploymentProtectionHeaders; exports.fetchWithDeploymentProtection = fetchWithDeploymentProtection; 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.HttpClient = HttpClient;
|