deepline 0.3.346 → 0.3.347
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/http.ts +14 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +78 -17
- package/dist/cli/auth-PSMCNXBC.js +31 -0
- package/dist/cli/{auth-HTWHQNMY.mjs → auth-RWP45MJX.mjs} +4 -4
- package/dist/cli/{billing-4DCHVGO5.js → billing-F6RNSQWW.js} +71 -71
- package/dist/cli/{billing-X56CVZWC.mjs → billing-XPKHI4LF.mjs} +4 -4
- package/dist/cli/{chunk-NVNHV73C.mjs → chunk-3JJLQQLW.mjs} +2 -2
- package/dist/cli/{chunk-ZEUFYRUR.js → chunk-3PRBUTJK.js} +240 -231
- package/dist/cli/{chunk-22GXXUTB.js → chunk-5UJOJKPW.js} +33 -27
- package/dist/cli/{chunk-5NNSJTJ3.js → chunk-723POEH5.js} +279 -244
- package/dist/cli/{chunk-SGBSQHXS.js → chunk-AGV2VS4U.js} +55 -53
- package/dist/cli/{chunk-MOVEHSNM.mjs → chunk-AOKWJJLP.mjs} +1 -1
- package/dist/cli/{chunk-KQCTQGUU.mjs → chunk-AYR45POY.mjs} +51 -16
- package/dist/cli/{chunk-YUKZHAFW.js → chunk-BUXJSW26.js} +26 -26
- package/dist/cli/{chunk-L2R72RQJ.js → chunk-EOS73ZCP.js} +8 -8
- package/dist/cli/{chunk-5QG2UAYH.js → chunk-GS2ZSOAQ.js} +2 -2
- package/dist/cli/{chunk-EJ2NVO5K.js → chunk-GT7OCAWV.js} +48 -48
- package/dist/cli/{chunk-4Q572AVS.js → chunk-JB4UKD3B.js} +6 -6
- package/dist/cli/{chunk-GGSLHWTB.js → chunk-L4TXOCCC.js} +1 -1
- package/dist/cli/{chunk-WKZTHHJI.mjs → chunk-LH4VHCN5.mjs} +9 -7
- package/dist/cli/{chunk-2RJ7RMRM.js → chunk-LPKV6IBM.js} +8 -8
- package/dist/cli/{chunk-GCBLVWDQ.mjs → chunk-LTJOC47W.mjs} +16 -7
- package/dist/cli/{chunk-AFNEQ43J.js → chunk-MX53GIOB.js} +40 -1
- package/dist/cli/{chunk-P4IKGWYF.mjs → chunk-NU5EU2SH.mjs} +4 -4
- package/dist/cli/{chunk-62TKYGY6.mjs → chunk-OS6CZRJE.mjs} +3 -3
- package/dist/cli/{chunk-VC7M2QR7.mjs → chunk-PQGDU7B5.mjs} +7 -1
- package/dist/cli/{chunk-YEKAGC52.js → chunk-ROEN4NXY.js} +60 -60
- package/dist/cli/{chunk-2GRMXCLZ.mjs → chunk-SFJEAK54.mjs} +1 -1
- package/dist/cli/{chunk-3GLIYDIF.mjs → chunk-U2GPF4SB.mjs} +2 -2
- package/dist/cli/{chunk-O4SXVVNQ.mjs → chunk-VRYRVD3F.mjs} +1 -1
- package/dist/cli/{chunk-T7EVEXHS.js → chunk-WX7W76U7.js} +15 -15
- package/dist/cli/{chunk-ZR4EHO62.mjs → chunk-X32ZLEUU.mjs} +2 -2
- package/dist/cli/{chunk-XAM3XOUA.mjs → chunk-Y6D2JYBR.mjs} +2 -2
- package/dist/cli/{chunk-JOA6IKDE.mjs → chunk-Z6B4UPM4.mjs} +39 -0
- package/dist/cli/{client-C2KUT452.mjs → client-FZJ3RSO3.mjs} +3 -3
- package/dist/cli/client-J4QGSQ6Y.js +20 -0
- package/dist/cli/{csv-SLACAH4F.mjs → csv-HPBPBU3I.mjs} +3 -3
- package/dist/cli/{csv-3TAA2MTR.js → csv-QSMT5HZS.js} +12 -12
- package/dist/cli/{db-IN4I6KJ5.mjs → db-2KAUAVVC.mjs} +4 -4
- package/dist/cli/{db-BT6Q3FE6.js → db-IKZKICP3.js} +29 -29
- package/dist/cli/{describe-EDXTYMOF.mjs → describe-EW4GZMUK.mjs} +9 -9
- package/dist/cli/{describe-FJZXYKFH.js → describe-QM7Q5Y2H.js} +25 -25
- package/dist/cli/{executions-YYQC2TVR.js → executions-5ICONLFX.js} +6 -6
- package/dist/cli/{executions-X36QA5NY.mjs → executions-U5WWUFEZ.mjs} +4 -4
- package/dist/cli/{feedback-BS3S46O3.js → feedback-N2KGAK4V.js} +7 -7
- package/dist/cli/{feedback-KTEPHZ4S.mjs → feedback-ZBQPQPFG.mjs} +3 -3
- package/dist/cli/git-2N5LS25H.js +23 -0
- package/dist/cli/{git-3ZVYB63W.mjs → git-M5YEP57H.mjs} +4 -4
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-VVBJXM2K.mjs → legacy-noops-GJUYBH2F.mjs} +4 -4
- package/dist/cli/{legacy-noops-V5R7ITER.js → legacy-noops-IQIPPJF7.js} +7 -7
- package/dist/cli/{monitors-J6XDE76B.js → monitors-DQUCHISX.js} +85 -85
- package/dist/cli/{monitors-KYTMBNUQ.mjs → monitors-XJAJNMG4.mjs} +4 -4
- package/dist/cli/{org-RGABGQKP.mjs → org-DFWDN4EJ.mjs} +4 -4
- package/dist/cli/{org-MHF2NGDV.js → org-G45CXUJV.js} +60 -60
- package/dist/cli/{play-UII4SSA7.mjs → play-URTZW2Q4.mjs} +8 -8
- package/dist/cli/play-WWMUYKWS.js +153 -0
- package/dist/cli/{providers-LQOSKPUH.mjs → providers-CCKMRCXU.mjs} +4 -4
- package/dist/cli/{providers-3GDMD7T6.js → providers-IVUWWGFP.js} +7 -7
- package/dist/cli/{quickstart-GAMYLCLJ.mjs → quickstart-CRHIA3PZ.mjs} +3 -3
- package/dist/cli/{quickstart-R34Z7EMU.js → quickstart-MMIVNRV4.js} +5 -5
- package/dist/cli/{search-AOOMDVF5.mjs → search-NDRDOINX.mjs} +5 -5
- package/dist/cli/search-YZL2QRIF.js +26 -0
- package/dist/cli/{secrets-T4XXIASK.js → secrets-GQUBMJGM.js} +13 -13
- package/dist/cli/{secrets-U7YGLUSX.mjs → secrets-SUC3KLLH.mjs} +4 -4
- package/dist/cli/{sessions-VPXR4DSZ.mjs → sessions-7CAU6JL5.mjs} +4 -4
- package/dist/cli/{sessions-JQGKWKJS.js → sessions-AQCRVLHW.js} +5 -5
- package/dist/cli/{settings-LXF45R7X.js → settings-4SDI73XW.js} +74 -74
- package/dist/cli/{settings-LP55G43L.mjs → settings-LFFOFAU6.mjs} +7 -7
- package/dist/cli/{setup-36QA4JI3.mjs → setup-BKCQOJBD.mjs} +6 -6
- package/dist/cli/{setup-MA2GLU4N.js → setup-FQ3E7U7G.js} +41 -41
- package/dist/cli/skills-7BPEGDIA.js +28 -0
- package/dist/cli/{skills-HB6PARLZ.mjs → skills-USGJ5MF7.mjs} +4 -4
- package/dist/cli/{tools-E7K7R4AO.mjs → tools-5HTXLDZ4.mjs} +7 -7
- package/dist/cli/tools-5VEZ4QR4.js +40 -0
- package/dist/cli/{update-IT63P3NV.mjs → update-F7TIJEIV.mjs} +6 -6
- package/dist/cli/update-YFPMWKI4.js +28 -0
- package/dist/cli/{workflow-UO3PMX7R.mjs → workflow-FXJ2D2MG.mjs} +5 -5
- package/dist/cli/{workflow-SJHASZ5C.js → workflow-J5JVOUIL.js} +15 -15
- package/dist/{client-BHReRdWK.d.mts → client-D20uyRYB.d.mts} +6 -0
- package/dist/{client-DW3zASj8.d.ts → client-rHyf5s_Y.d.ts} +6 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +78 -78
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +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-5YTC2XH2.js +0 -31
- package/dist/cli/client-4RKYHB7Z.js +0 -20
- package/dist/cli/git-ZHAD5TJN.js +0 -23
- package/dist/cli/play-ZWAH3U44.js +0 -153
- package/dist/cli/search-FVB7ZNCO.js +0 -26
- package/dist/cli/skills-GUWC4FV7.js +0 -28
- package/dist/cli/tools-T5WIAD5Z.js +0 -40
- package/dist/cli/update-QY6RY3A6.js +0 -28
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkL4TXOCCCjs = require('./chunk-L4TXOCCC.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 = _chunkL4TXOCCCjs.SDK_RELEASE.version;
|
|
747
|
+
var SDK_API_MAJOR = _chunkL4TXOCCCjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
748
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkL4TXOCCCjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
749
749
|
|
|
750
750
|
// src/agent-runtime.ts
|
|
751
751
|
|
|
@@ -1524,9 +1524,15 @@ var HttpClient = class {
|
|
|
1524
1524
|
return null;
|
|
1525
1525
|
}
|
|
1526
1526
|
const body = await response.text();
|
|
1527
|
+
const receivedAtMs = Date.now();
|
|
1527
1528
|
clearTimeout(timeoutId);
|
|
1528
1529
|
const parsed = parseResponseBody(body);
|
|
1529
|
-
|
|
1530
|
+
_optionalChain([options, 'optionalAccess', _230 => _230.onResponseBody, 'optionalCall', _231 => _231({
|
|
1531
|
+
receivedAtMs,
|
|
1532
|
+
httpStatus: response.status,
|
|
1533
|
+
body: parsed
|
|
1534
|
+
})]);
|
|
1535
|
+
const structuredToolError = _optionalChain([options, 'optionalAccess', _232 => _232.toolId]) && !response.ok ? _chunk7P5AA3SNjs.deserializeToolExecutionFailure.call(void 0,
|
|
1530
1536
|
_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
|
|
1531
1537
|
isRecord(parsed) ? parsed.tool_error : null,
|
|
1532
1538
|
_chunk7P5AA3SNjs.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
|
|
@@ -1548,7 +1554,7 @@ var HttpClient = class {
|
|
|
1548
1554
|
throw structuredToolError;
|
|
1549
1555
|
}
|
|
1550
1556
|
if (response.status === 429) {
|
|
1551
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1557
|
+
if (_optionalChain([options, 'optionalAccess', _233 => _233.preserveRateLimitResponse]) && isMonitorRateLimitEnvelope(parsed)) {
|
|
1552
1558
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
1553
1559
|
_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
|
|
1554
1560
|
response.status,
|
|
@@ -1568,7 +1574,7 @@ var HttpClient = class {
|
|
|
1568
1574
|
throw new AuthError(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
|
|
1569
1575
|
}
|
|
1570
1576
|
if (!response.ok) {
|
|
1571
|
-
const retryableApiError = _optionalChain([options, 'optionalAccess',
|
|
1577
|
+
const retryableApiError = _optionalChain([options, 'optionalAccess', _234 => _234.retryApiErrors]) === true && isRetryableApiErrorResponse(response.status);
|
|
1572
1578
|
const htmlError = detectHtmlErrorBody(
|
|
1573
1579
|
body,
|
|
1574
1580
|
response.headers.get("content-type")
|
|
@@ -1620,7 +1626,7 @@ var HttpClient = class {
|
|
|
1620
1626
|
} catch (error) {
|
|
1621
1627
|
clearTimeout(timeoutId);
|
|
1622
1628
|
networkFailedAt = Date.now();
|
|
1623
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1629
|
+
if (_optionalChain([options, 'optionalAccess', _235 => _235.signal, 'optionalAccess', _236 => _236.aborted])) {
|
|
1624
1630
|
lastError = requestCancelledError(options.signal);
|
|
1625
1631
|
break requestAttempts;
|
|
1626
1632
|
}
|
|
@@ -1637,7 +1643,7 @@ var HttpClient = class {
|
|
|
1637
1643
|
});
|
|
1638
1644
|
} finally {
|
|
1639
1645
|
clearTimeout(timeoutId);
|
|
1640
|
-
_optionalChain([options, 'optionalAccess',
|
|
1646
|
+
_optionalChain([options, 'optionalAccess', _237 => _237.signal, 'optionalAccess', _238 => _238.removeEventListener, 'call', _239 => _239("abort", abortRequest)]);
|
|
1641
1647
|
}
|
|
1642
1648
|
}
|
|
1643
1649
|
if (attempt < maxRetries) continue;
|
|
@@ -1664,7 +1670,7 @@ var HttpClient = class {
|
|
|
1664
1670
|
phase: networkPhase
|
|
1665
1671
|
}
|
|
1666
1672
|
};
|
|
1667
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1673
|
+
if (_optionalChain([options, 'optionalAccess', _240 => _240.toolId])) {
|
|
1668
1674
|
const code = mappedNetworkError.code;
|
|
1669
1675
|
throw withErrorCause(
|
|
1670
1676
|
new (0, _chunk7P5AA3SNjs.ToolExecutionError)(
|
|
@@ -1716,12 +1722,12 @@ var HttpClient = class {
|
|
|
1716
1722
|
}
|
|
1717
1723
|
async *streamSse(path, options) {
|
|
1718
1724
|
const url = `${this.config.baseUrl}${path}`;
|
|
1719
|
-
const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
1725
|
+
const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _241 => _241.method]), () => ( "GET"));
|
|
1720
1726
|
const headers = this.authHeaders({
|
|
1721
1727
|
Accept: "text/event-stream",
|
|
1722
|
-
..._optionalChain([options, 'optionalAccess',
|
|
1728
|
+
..._optionalChain([options, 'optionalAccess', _242 => _242.headers])
|
|
1723
1729
|
});
|
|
1724
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1730
|
+
if (_optionalChain([options, 'optionalAccess', _243 => _243.body]) !== void 0) {
|
|
1725
1731
|
applyExplicitHeaders(headers, { "Content-Type": "application/json" });
|
|
1726
1732
|
}
|
|
1727
1733
|
let lastError = null;
|
|
@@ -1730,8 +1736,8 @@ var HttpClient = class {
|
|
|
1730
1736
|
const response = await fetch(candidateUrl, {
|
|
1731
1737
|
method,
|
|
1732
1738
|
headers,
|
|
1733
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
1734
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
1739
|
+
body: _optionalChain([options, 'optionalAccess', _244 => _244.body]) !== void 0 ? JSON.stringify(options.body) : void 0,
|
|
1740
|
+
signal: _optionalChain([options, 'optionalAccess', _245 => _245.signal])
|
|
1735
1741
|
});
|
|
1736
1742
|
if (!response.ok) {
|
|
1737
1743
|
const body = await response.text();
|
|
@@ -1772,7 +1778,7 @@ var HttpClient = class {
|
|
|
1772
1778
|
throw error;
|
|
1773
1779
|
}
|
|
1774
1780
|
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
1775
|
-
if (isAbortLikeError(normalized) && _optionalChain([options, 'optionalAccess',
|
|
1781
|
+
if (isAbortLikeError(normalized) && _optionalChain([options, 'optionalAccess', _246 => _246.signal, 'optionalAccess', _247 => _247.aborted])) {
|
|
1776
1782
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
1777
1783
|
`Stream from ${this.config.baseUrl} was aborted by the caller.`,
|
|
1778
1784
|
void 0,
|
|
@@ -1793,7 +1799,7 @@ var HttpClient = class {
|
|
|
1793
1799
|
}
|
|
1794
1800
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
1795
1801
|
withCoworkNetworkHint(
|
|
1796
|
-
_optionalChain([lastError, 'optionalAccess',
|
|
1802
|
+
_optionalChain([lastError, 'optionalAccess', _248 => _248.message]) ? `Unable to stream from ${this.config.baseUrl}. ${lastError.message}` : `Unable to stream from ${this.config.baseUrl}.`
|
|
1797
1803
|
)
|
|
1798
1804
|
);
|
|
1799
1805
|
}
|
|
@@ -1855,15 +1861,15 @@ function parseResponseBody(body) {
|
|
|
1855
1861
|
}
|
|
1856
1862
|
function isProviderOriginatedHttpError(parsed) {
|
|
1857
1863
|
const response = asRecord(parsed);
|
|
1858
|
-
const error = asRecord(_optionalChain([response, 'optionalAccess',
|
|
1859
|
-
const failureOrigin = _nullishCoalesce(_optionalChain([error, 'optionalAccess',
|
|
1860
|
-
const code = _nullishCoalesce(_optionalChain([error, 'optionalAccess',
|
|
1864
|
+
const error = asRecord(_optionalChain([response, 'optionalAccess', _249 => _249.error]));
|
|
1865
|
+
const failureOrigin = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _250 => _250.failure_origin]), () => ( _optionalChain([response, 'optionalAccess', _251 => _251.failure_origin])));
|
|
1866
|
+
const code = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _252 => _252.code]), () => ( _optionalChain([response, 'optionalAccess', _253 => _253.code])));
|
|
1861
1867
|
return failureOrigin === "provider" || code === "UPSTREAM_BLOCKED";
|
|
1862
1868
|
}
|
|
1863
1869
|
function isMonitorRateLimitEnvelope(parsed) {
|
|
1864
1870
|
const response = asRecord(parsed);
|
|
1865
|
-
const error = asRecord(_optionalChain([response, 'optionalAccess',
|
|
1866
|
-
return _optionalChain([error, 'optionalAccess',
|
|
1871
|
+
const error = asRecord(_optionalChain([response, 'optionalAccess', _254 => _254.error]));
|
|
1872
|
+
return _optionalChain([error, 'optionalAccess', _255 => _255.code]) === "monitor_upstream_rate_limited" && typeof error.message === "string";
|
|
1867
1873
|
}
|
|
1868
1874
|
function asRecord(value) {
|
|
1869
1875
|
return typeof value === "object" && value !== null ? value : null;
|
|
@@ -1879,7 +1885,7 @@ function detectHtmlErrorBody(body, contentType) {
|
|
|
1879
1885
|
return null;
|
|
1880
1886
|
}
|
|
1881
1887
|
const titleMatch = trimmed.match(/<title[^>]*>([\s\S]*?)<\/title>/i);
|
|
1882
|
-
const title = _optionalChain([titleMatch, 'optionalAccess',
|
|
1888
|
+
const title = _optionalChain([titleMatch, 'optionalAccess', _256 => _256[1], 'optionalAccess', _257 => _257.replace, 'call', _258 => _258(/\s+/g, " "), 'access', _259 => _259.trim, 'call', _260 => _260()]) || void 0;
|
|
1883
1889
|
const workerThrewException = /worker threw exception/i.test(trimmed);
|
|
1884
1890
|
return {
|
|
1885
1891
|
title,
|
|
@@ -1963,20 +1969,20 @@ function decodeSseFrame(frame) {
|
|
|
1963
1969
|
}
|
|
1964
1970
|
function sleep(ms, signal) {
|
|
1965
1971
|
return new Promise((resolve2, reject) => {
|
|
1966
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
1972
|
+
if (_optionalChain([signal, 'optionalAccess', _261 => _261.aborted])) {
|
|
1967
1973
|
reject(requestCancelledError(signal));
|
|
1968
1974
|
return;
|
|
1969
1975
|
}
|
|
1970
1976
|
const timeoutId = setTimeout(() => {
|
|
1971
|
-
_optionalChain([signal, 'optionalAccess',
|
|
1977
|
+
_optionalChain([signal, 'optionalAccess', _262 => _262.removeEventListener, 'call', _263 => _263("abort", abort)]);
|
|
1972
1978
|
resolve2();
|
|
1973
1979
|
}, ms);
|
|
1974
1980
|
const abort = () => {
|
|
1975
1981
|
clearTimeout(timeoutId);
|
|
1976
|
-
_optionalChain([signal, 'optionalAccess',
|
|
1982
|
+
_optionalChain([signal, 'optionalAccess', _264 => _264.removeEventListener, 'call', _265 => _265("abort", abort)]);
|
|
1977
1983
|
reject(requestCancelledError(signal));
|
|
1978
1984
|
};
|
|
1979
|
-
_optionalChain([signal, 'optionalAccess',
|
|
1985
|
+
_optionalChain([signal, 'optionalAccess', _266 => _266.addEventListener, 'call', _267 => _267("abort", abort, { once: true })]);
|
|
1980
1986
|
});
|
|
1981
1987
|
}
|
|
1982
1988
|
function withCoworkNetworkHint(message) {
|