deepline 0.3.509 → 0.3.511
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/client-core.ts +159 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +7 -2
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +3 -3
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +94 -43
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +111 -27
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/runtime-topology.ts +79 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +80 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-transient-retry.ts +571 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +218 -33
- package/dist/cli/artifacts-G6JHRHY5.mjs +268 -0
- package/dist/cli/artifacts-PLF5ZUS7.js +268 -0
- package/dist/cli/{auth-6IR2QH4N.mjs → auth-2XMJMDWG.mjs} +5 -5
- package/dist/cli/auth-PI2KS2CD.js +43 -0
- package/dist/cli/{billing-WEWHH6ST.mjs → billing-6C5AI42X.mjs} +7 -7
- package/dist/cli/{billing-SYBK3ZYU.js → billing-Z3XFXP3H.js} +82 -82
- package/dist/cli/{chunk-JZJNA57M.js → chunk-2Q4H2Y6N.js} +6 -6
- package/dist/cli/{chunk-VTVZ7EUA.js → chunk-2YVRIXVR.js} +9 -9
- package/dist/cli/{chunk-RSKAPLST.mjs → chunk-5WTLXL6O.mjs} +1 -1
- package/dist/cli/{chunk-YJM3NOME.mjs → chunk-77DPQI6W.mjs} +94 -10
- package/dist/cli/{chunk-FNLGMMJJ.mjs → chunk-ASXOFBF7.mjs} +2 -2
- package/dist/cli/{chunk-AO63MXT6.js → chunk-BHV7JKXQ.js} +1 -1
- package/dist/cli/{chunk-RA2NKHV5.js → chunk-D5VWSR4D.js} +5 -5
- package/dist/cli/{chunk-CMSPA5VX.js → chunk-FAGSSIOY.js} +6 -6
- package/dist/cli/{chunk-J5P4PDRT.js → chunk-FF25PDQ2.js} +94 -10
- package/dist/cli/{chunk-SEQIB5WJ.mjs → chunk-FTT2SBBH.mjs} +5 -5
- package/dist/cli/{chunk-5Y3I5LEQ.js → chunk-FV4PASXH.js} +16 -16
- package/dist/cli/{chunk-GTAU4C44.js → chunk-GD3ES3JU.js} +14 -14
- package/dist/cli/{chunk-HMAETS53.js → chunk-GGQHOLH6.js} +3 -3
- package/dist/cli/{chunk-T67NAGSD.mjs → chunk-GJWL4KTY.mjs} +4 -4
- package/dist/cli/{chunk-6KBVQ76G.mjs → chunk-HLEZQDEZ.mjs} +2 -2
- package/dist/cli/{chunk-WJ6H2W3O.mjs → chunk-ISY7PBIK.mjs} +5 -5
- package/dist/cli/{chunk-AD45WJHN.js → chunk-IYWN7M4I.js} +5 -5
- package/dist/cli/{chunk-3CZHC24N.mjs → chunk-JDDKJIZU.mjs} +1 -1
- package/dist/cli/{chunk-E3HWUGDT.mjs → chunk-JHBZBCU4.mjs} +1 -1
- package/dist/cli/{chunk-7KALZEDZ.js → chunk-JIY25SUX.js} +4 -4
- package/dist/cli/{chunk-726UDAV2.js → chunk-JYFLIQPE.js} +7 -7
- package/dist/cli/{chunk-DGOSW42X.js → chunk-K4JB2BZP.js} +96 -96
- package/dist/cli/{chunk-XEQH65DT.mjs → chunk-KK6NZHAJ.mjs} +1 -1
- package/dist/cli/chunk-KUDNPJ43.js +77 -0
- package/dist/cli/{chunk-IZW7IOD6.mjs → chunk-KXGH4YUQ.mjs} +1 -1
- package/dist/cli/{chunk-Q7G6WORO.js → chunk-KZBKQPSA.js} +2 -2
- package/dist/cli/{chunk-4DVANPBN.js → chunk-LDZYGM7W.js} +41 -41
- package/dist/cli/{chunk-XPKBYMJH.js → chunk-LKSJXTRP.js} +53 -53
- package/dist/cli/{chunk-Q5UO2ENN.js → chunk-NVMNMKZW.js} +3 -3
- package/dist/cli/{chunk-VZ773N7G.js → chunk-O37BQ2CG.js} +21 -10
- package/dist/cli/{chunk-OOD5LGUS.mjs → chunk-OQ4YBPOQ.mjs} +3 -3
- package/dist/cli/{chunk-UART6FGK.mjs → chunk-PCI4MMH7.mjs} +1 -1
- package/dist/cli/{chunk-2ZJRCAHG.js → chunk-PI45LZ5B.js} +11 -11
- package/dist/cli/{chunk-O527H5GY.js → chunk-PUFEARWT.js} +16 -16
- package/dist/cli/{chunk-25MAOMVS.mjs → chunk-QDWNVTTO.mjs} +2 -2
- package/dist/cli/{chunk-WUKNKFB3.mjs → chunk-RPPU3XB3.mjs} +2 -2
- package/dist/cli/{chunk-XIBNY6H6.mjs → chunk-S5C4CWSS.mjs} +5 -5
- package/dist/cli/{chunk-2U7Z4LFG.mjs → chunk-S6KEACD3.mjs} +6 -6
- package/dist/cli/{chunk-Y4M5HPQV.mjs → chunk-SI4QXATV.mjs} +5 -5
- package/dist/cli/{chunk-R2KNJMOY.mjs → chunk-VEOFISLZ.mjs} +1 -1
- package/dist/cli/{chunk-Z2LVZDO5.js → chunk-VHFTN6VY.js} +44 -44
- package/dist/cli/{chunk-54YPOG5W.mjs → chunk-VQ74WMKG.mjs} +15 -4
- package/dist/cli/{chunk-ZXGMWXZW.js → chunk-WDBEWOU6.js} +2 -2
- package/dist/cli/{chunk-6TBRWRJ2.js → chunk-XGXXNT4O.js} +270 -199
- package/dist/cli/chunk-XREZY4FA.mjs +77 -0
- package/dist/cli/{chunk-K2RCVD7S.mjs → chunk-XSBGWMI6.mjs} +72 -1
- package/dist/cli/{chunk-S7JEF2MR.mjs → chunk-XXQZYLLL.mjs} +2 -2
- package/dist/cli/{chunk-EEEWADSR.mjs → chunk-XZ6IZIQJ.mjs} +2 -2
- package/dist/cli/{chunk-WPBTWRKG.js → chunk-YX7E2VQM.js} +26 -26
- package/dist/cli/{chunk-FQCIYGQY.mjs → chunk-ZFJ2U76O.mjs} +2 -2
- package/dist/cli/{chunk-7NMPGX3W.js → chunk-ZWGBQKW7.js} +21 -21
- package/dist/cli/{chunk-VH522HUP.mjs → chunk-ZYVR4A4P.mjs} +10 -10
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-4LAJ2ZKG.mjs → csv-CNK6ZF3T.mjs} +4 -4
- package/dist/cli/{csv-5KNONIAX.js → csv-S44OGG2O.js} +13 -13
- package/dist/cli/{db-BEVCJI66.mjs → db-AVO6QJU6.mjs} +6 -6
- package/dist/cli/{db-5PEXOSN3.js → db-WKZ6EXNG.js} +27 -27
- package/dist/cli/{describe-TDJIUSD6.mjs → describe-2HQRT5MI.mjs} +18 -18
- package/dist/cli/describe-CCK77NER.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-KXCPU6YC.mjs → executions-DKHOR7HD.mjs} +6 -6
- package/dist/cli/{executions-36GV3A27.js → executions-MTAHNARA.js} +8 -8
- package/dist/cli/{feedback-GEUUT4S7.mjs → feedback-K6SJS4LG.mjs} +11 -7
- package/dist/cli/{feedback-SPQABV33.js → feedback-R2UABU3E.js} +15 -11
- package/dist/cli/{git-AE36X2R6.mjs → git-3EPA7433.mjs} +5 -5
- package/dist/cli/git-7L3PY2A4.js +25 -0
- package/dist/cli/index.js +177 -156
- package/dist/cli/index.mjs +80 -59
- package/dist/cli/{legacy-noops-TKPHN7WT.js → legacy-noops-3Q2D2F24.js} +9 -8
- package/dist/cli/{legacy-noops-LUEDAK7J.mjs → legacy-noops-66OPCJJD.mjs} +6 -5
- package/dist/cli/{monitors-JHJZ5XG7.mjs → monitors-2PYPRWT4.mjs} +7 -7
- package/dist/cli/{monitors-B2EAIGZI.js → monitors-KHH4MZDF.js} +100 -100
- package/dist/cli/{org-GUICCEBZ.mjs → org-WAW3OL7B.mjs} +6 -6
- package/dist/cli/{org-PYCPXEAU.js → org-X5G36B2Q.js} +72 -72
- package/dist/cli/{pages-Y2XI36HY.mjs → pages-KABWXDGW.mjs} +6 -6
- package/dist/cli/{pages-CV4TQNFY.js → pages-XDPHCHHU.js} +18 -18
- package/dist/cli/{play-VWCQNGZZ.mjs → play-654B2HQU.mjs} +18 -18
- package/dist/cli/{play-MTVK66JK.js → play-UE5FKQCO.js} +317 -317
- package/dist/cli/{providers-N72BUCXZ.js → providers-QT2BZMJ7.js} +9 -9
- package/dist/cli/{providers-ZOZTST3A.mjs → providers-SKNGX6IT.mjs} +6 -6
- package/dist/cli/{quickstart-DXIC3NHS.mjs → quickstart-BX7XMJIQ.mjs} +4 -4
- package/dist/cli/{quickstart-FK53VZB3.js → quickstart-XWDVAQTT.js} +6 -6
- package/dist/cli/{run-NNAYDCEN.js → run-C6YYD4AK.js} +41 -41
- package/dist/cli/{run-IL2KI33N.mjs → run-JTU4K4MY.mjs} +23 -23
- package/dist/cli/{search-7IPVMQCO.mjs → search-NHV4Y4SX.mjs} +8 -8
- package/dist/cli/search-RIFW5JCK.js +33 -0
- package/dist/cli/{search-output-ZY2GE35S.mjs → search-output-AAOMFK7K.mjs} +4 -4
- package/dist/cli/{search-output-YHTWLSDE.js → search-output-WLFFEGCY.js} +6 -6
- package/dist/cli/{secrets-ZML76SH2.js → secrets-H4WTLQJJ.js} +15 -15
- package/dist/cli/{secrets-BGUMHDZ7.mjs → secrets-S66PZSRO.mjs} +6 -6
- package/dist/cli/sessions-EFWO62XJ.js +18 -0
- package/dist/cli/{sessions-F5XO6HZJ.mjs → sessions-PY6FJX3O.mjs} +6 -5
- package/dist/cli/{settings-73SMIICV.mjs → settings-V7BM42KQ.mjs} +39 -12
- package/dist/cli/{settings-TOX2P5M5.js → settings-YO4FFPN6.js} +109 -82
- package/dist/cli/{setup-DNFHFQ7N.js → setup-IFZYYQ2W.js} +50 -50
- package/dist/cli/{setup-FDJZYBMS.mjs → setup-VUBM2HMH.mjs} +10 -10
- package/dist/cli/{skills-6HJ2IAY6.mjs → skills-EYWRSQQJ.mjs} +8 -8
- package/dist/cli/skills-LFP53SWQ.js +37 -0
- package/dist/cli/tools-SR2Q7KC5.js +57 -0
- package/dist/cli/{tools-4FJIIE4R.mjs → tools-VZOW4MUD.mjs} +17 -17
- package/dist/cli/update-ADZBZZZS.js +35 -0
- package/dist/cli/{update-UMRPPILV.mjs → update-CQDJJYU2.mjs} +10 -10
- package/dist/cli/{workflow-LSFOG5VU.mjs → workflow-2VRDIPF3.mjs} +7 -7
- package/dist/cli/{workflow-SK3BUHB4.js → workflow-XS3JEU6X.js} +17 -17
- package/dist/{client-DMpsMNH9.d.mts → client-By7bUS8h.d.mts} +1 -1
- package/dist/{client-BlwD-G4v.d.ts → client-CmlKSBXd.d.ts} +1 -1
- package/dist/{client-core-DwBLuEkm.d.ts → client-core-BM0mKhgp.d.ts} +93 -1
- package/dist/{client-core-CITtRTbB.d.mts → client-core-BZ3tpY_J.d.mts} +93 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +111 -106
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- 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/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-SUTQ4SZQ.js +0 -43
- package/dist/cli/describe-ZB6G6DOV.js +0 -50
- package/dist/cli/git-UX7L6R32.js +0 -25
- package/dist/cli/search-OZHP5ZE2.js +0 -33
- package/dist/cli/sessions-WDINUUZ3.js +0 -17
- package/dist/cli/skills-NE7WN5PP.js +0 -37
- package/dist/cli/tools-ETX4MNNO.js +0 -57
- package/dist/cli/update-N2DMPSUH.js +0 -35
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkJYFLIQPEjs = require('./chunk-JYFLIQPE.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -22,14 +22,14 @@ var _chunk726UDAV2js = require('./chunk-726UDAV2.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkGGQHOLH6js = require('./chunk-GGQHOLH6.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkJIY25SUXjs = require('./chunk-JIY25SUX.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -60,7 +60,7 @@ function statusBannerLine(value) {
|
|
|
60
60
|
return `Service notice: ${banner.message}`;
|
|
61
61
|
}
|
|
62
62
|
function envFilePath(baseUrl) {
|
|
63
|
-
return
|
|
63
|
+
return _chunkGGQHOLH6js.hostEnvFilePath.call(void 0, baseUrl);
|
|
64
64
|
}
|
|
65
65
|
function normalizeAuthScope(value) {
|
|
66
66
|
if (!value || value === "global") return "global";
|
|
@@ -73,7 +73,7 @@ function parseAuthScope(args) {
|
|
|
73
73
|
}
|
|
74
74
|
function pendingClaimPath(baseUrl, scope) {
|
|
75
75
|
if (scope === "folder") {
|
|
76
|
-
const target =
|
|
76
|
+
const target = _chunkGGQHOLH6js.resolveProjectPinTarget.call(void 0, );
|
|
77
77
|
if (!target.ok) {
|
|
78
78
|
throw new Error(
|
|
79
79
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -83,10 +83,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
83
83
|
}
|
|
84
84
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
85
85
|
}
|
|
86
|
-
return `${
|
|
86
|
+
return `${_chunkGGQHOLH6js.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
87
87
|
}
|
|
88
88
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
89
|
-
return `${
|
|
89
|
+
return `${_chunkGGQHOLH6js.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
90
90
|
}
|
|
91
91
|
function savePendingClaim(baseUrl, claim) {
|
|
92
92
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -190,21 +190,21 @@ function parseRegisterWaitMode(args) {
|
|
|
190
190
|
function shouldWaitForRegisterClaim(mode) {
|
|
191
191
|
if (mode === "yes") return true;
|
|
192
192
|
if (mode === "no") return false;
|
|
193
|
-
return
|
|
193
|
+
return _chunkJIY25SUXjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
194
194
|
}
|
|
195
195
|
function saveEnvValues(values, baseUrl, scope) {
|
|
196
196
|
const filtered = {
|
|
197
|
-
...values[
|
|
198
|
-
...values[
|
|
199
|
-
...values[
|
|
200
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
197
|
+
...values[_chunkGGQHOLH6js.HOST_URL_ENV] ? { [_chunkGGQHOLH6js.HOST_URL_ENV]: values[_chunkGGQHOLH6js.HOST_URL_ENV] } : {},
|
|
198
|
+
...values[_chunkGGQHOLH6js.API_KEY_ENV] ? { [_chunkGGQHOLH6js.API_KEY_ENV]: values[_chunkGGQHOLH6js.API_KEY_ENV] } : {},
|
|
199
|
+
...values[_chunkGGQHOLH6js.ACTIVE_ORG_ID_ENV] ? { [_chunkGGQHOLH6js.ACTIVE_ORG_ID_ENV]: values[_chunkGGQHOLH6js.ACTIVE_ORG_ID_ENV] } : {},
|
|
200
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkGGQHOLH6js.ACTIVE_ORG_NAME_ENV) ? { [_chunkGGQHOLH6js.ACTIVE_ORG_NAME_ENV]: values[_chunkGGQHOLH6js.ACTIVE_ORG_NAME_ENV] } : {},
|
|
201
201
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
202
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
202
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkGGQHOLH6js.FEATURES_ENV) ? { [_chunkGGQHOLH6js.FEATURES_ENV]: values[_chunkGGQHOLH6js.FEATURES_ENV] } : {}
|
|
203
203
|
};
|
|
204
204
|
if (scope === "folder") {
|
|
205
|
-
|
|
205
|
+
_chunkGGQHOLH6js.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
206
206
|
} else {
|
|
207
|
-
|
|
207
|
+
_chunkGGQHOLH6js.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
function activeOrgEnvValues(data) {
|
|
@@ -212,21 +212,21 @@ function activeOrgEnvValues(data) {
|
|
|
212
212
|
if (!orgId) return {};
|
|
213
213
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
214
214
|
return {
|
|
215
|
-
[
|
|
216
|
-
[
|
|
217
|
-
...
|
|
215
|
+
[_chunkGGQHOLH6js.ACTIVE_ORG_ID_ENV]: orgId,
|
|
216
|
+
[_chunkGGQHOLH6js.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
217
|
+
..._chunkGGQHOLH6js.featureEnvValues.call(void 0, data)
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
221
221
|
const headers = {
|
|
222
222
|
"Content-Type": "application/json",
|
|
223
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
223
|
+
"User-Agent": `deepline-ts-sdk/${_chunkJIY25SUXjs.SDK_VERSION}`,
|
|
224
224
|
"X-Deepline-Client-Family": "sdk",
|
|
225
225
|
"X-Deepline-CLI-Family": "sdk",
|
|
226
|
-
"X-Deepline-Agent-Runtime":
|
|
227
|
-
"X-Deepline-CLI-Version":
|
|
228
|
-
"X-Deepline-SDK-Version":
|
|
229
|
-
"X-Deepline-API-Contract":
|
|
226
|
+
"X-Deepline-Agent-Runtime": _chunkJIY25SUXjs.detectAgentRuntime.call(void 0, ),
|
|
227
|
+
"X-Deepline-CLI-Version": _chunkJIY25SUXjs.SDK_VERSION,
|
|
228
|
+
"X-Deepline-SDK-Version": _chunkJIY25SUXjs.SDK_VERSION,
|
|
229
|
+
"X-Deepline-API-Contract": _chunkJIY25SUXjs.SDK_API_CONTRACT
|
|
230
230
|
};
|
|
231
231
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
232
232
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -265,10 +265,10 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
265
265
|
if (failure.name === "AbortError" || failure.name === "TimeoutError") {
|
|
266
266
|
throw failure;
|
|
267
267
|
}
|
|
268
|
-
const causeCode =
|
|
268
|
+
const causeCode = _chunkJIY25SUXjs.networkCauseCode.call(void 0, failure);
|
|
269
269
|
throw Object.assign(
|
|
270
270
|
new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
271
|
-
|
|
271
|
+
_chunkJIY25SUXjs.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
|
|
272
272
|
void 0,
|
|
273
273
|
"NETWORK_ERROR",
|
|
274
274
|
causeCode ? { causeCode } : void 0
|
|
@@ -285,7 +285,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
285
285
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
286
286
|
}
|
|
287
287
|
async function reportSetupCompleted(input) {
|
|
288
|
-
const apiKey = input.authScope === "folder" ?
|
|
288
|
+
const apiKey = input.authScope === "folder" ? _chunkGGQHOLH6js.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkGGQHOLH6js.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
289
289
|
if (!apiKey) return;
|
|
290
290
|
try {
|
|
291
291
|
await httpJson(
|
|
@@ -414,7 +414,7 @@ function endClaimPollOnRefusal(status, data, baseUrl, authScope) {
|
|
|
414
414
|
return EXIT_SERVER;
|
|
415
415
|
}
|
|
416
416
|
async function handleRegister(args, options) {
|
|
417
|
-
const baseUrl =
|
|
417
|
+
const baseUrl = _chunkGGQHOLH6js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
418
418
|
let orgName = "";
|
|
419
419
|
let orgId = "";
|
|
420
420
|
let agentName = "";
|
|
@@ -473,19 +473,19 @@ async function handleRegister(args, options) {
|
|
|
473
473
|
savePendingClaim(baseUrl, pendingClaim);
|
|
474
474
|
saveEnvValues(
|
|
475
475
|
{
|
|
476
|
-
[
|
|
476
|
+
[_chunkGGQHOLH6js.HOST_URL_ENV]: baseUrl
|
|
477
477
|
},
|
|
478
478
|
baseUrl,
|
|
479
479
|
authScope
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
482
|
if (claimUrl) {
|
|
483
|
-
const shouldOpen = waitMode !== "no" &&
|
|
483
|
+
const shouldOpen = waitMode !== "no" && _chunkJIY25SUXjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
484
484
|
console.log(
|
|
485
485
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
486
486
|
);
|
|
487
487
|
console.log(` ${claimUrl}`);
|
|
488
|
-
if (shouldOpen)
|
|
488
|
+
if (shouldOpen) _chunkJYFLIQPEjs.openInBrowser.call(void 0, claimUrl);
|
|
489
489
|
if (claimToken && pendingClaim.approvalLinkReporting && !_optionalChain([options, 'optionalAccess', _16 => _16.deferApprovalLinkReport])) {
|
|
490
490
|
await reportApprovalLinkShown(
|
|
491
491
|
baseUrl,
|
|
@@ -534,8 +534,8 @@ async function handleRegister(args, options) {
|
|
|
534
534
|
if (apiKey) {
|
|
535
535
|
saveEnvValues(
|
|
536
536
|
{
|
|
537
|
-
[
|
|
538
|
-
[
|
|
537
|
+
[_chunkGGQHOLH6js.HOST_URL_ENV]: baseUrl,
|
|
538
|
+
[_chunkGGQHOLH6js.API_KEY_ENV]: apiKey,
|
|
539
539
|
...activeOrgEnvValues(statusData)
|
|
540
540
|
},
|
|
541
541
|
baseUrl,
|
|
@@ -557,7 +557,7 @@ async function handleRegister(args, options) {
|
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
async function handleWait(args) {
|
|
560
|
-
const baseUrl =
|
|
560
|
+
const baseUrl = _chunkGGQHOLH6js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
561
561
|
let timeoutSeconds = 300;
|
|
562
562
|
let requestedScope;
|
|
563
563
|
if (args.includes("--auth-scope")) {
|
|
@@ -581,7 +581,7 @@ async function handleWait(args) {
|
|
|
581
581
|
const authScope = resumed.scope;
|
|
582
582
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _17 => _17.claimToken]), () => ( ""));
|
|
583
583
|
if (!pendingClaim) {
|
|
584
|
-
const scopedApiKey = authScope === "folder" ?
|
|
584
|
+
const scopedApiKey = authScope === "folder" ? _chunkGGQHOLH6js.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkGGQHOLH6js.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
585
585
|
if (scopedApiKey) {
|
|
586
586
|
console.log("Already connected.");
|
|
587
587
|
return EXIT_OK;
|
|
@@ -623,8 +623,8 @@ async function handleWait(args) {
|
|
|
623
623
|
if (apiKey) {
|
|
624
624
|
saveEnvValues(
|
|
625
625
|
{
|
|
626
|
-
[
|
|
627
|
-
[
|
|
626
|
+
[_chunkGGQHOLH6js.HOST_URL_ENV]: baseUrl,
|
|
627
|
+
[_chunkGGQHOLH6js.API_KEY_ENV]: apiKey,
|
|
628
628
|
...activeOrgEnvValues(data)
|
|
629
629
|
},
|
|
630
630
|
baseUrl,
|
|
@@ -648,8 +648,8 @@ async function handleWait(args) {
|
|
|
648
648
|
return EXIT_AUTH;
|
|
649
649
|
}
|
|
650
650
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
651
|
-
const baseUrl =
|
|
652
|
-
const apiKey =
|
|
651
|
+
const baseUrl = _chunkGGQHOLH6js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
652
|
+
const apiKey = _chunkGGQHOLH6js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
653
653
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
654
654
|
try {
|
|
655
655
|
const { status, data } = await httpJson(
|
|
@@ -672,9 +672,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
674
|
async function handleStatus(args) {
|
|
675
|
-
const baseUrl =
|
|
675
|
+
const baseUrl = _chunkGGQHOLH6js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
676
676
|
const reveal = args.includes("--reveal");
|
|
677
|
-
const jsonOutput =
|
|
677
|
+
const jsonOutput = _chunkJYFLIQPEjs.argsWantJson.call(void 0, args);
|
|
678
678
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
679
679
|
let authScope = null;
|
|
680
680
|
if (hasExplicitAuthScope) {
|
|
@@ -715,14 +715,14 @@ async function handleStatus(args) {
|
|
|
715
715
|
};
|
|
716
716
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
717
717
|
}
|
|
718
|
-
const apiKey = authScope === "folder" ?
|
|
718
|
+
const apiKey = authScope === "folder" ? _chunkGGQHOLH6js.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkGGQHOLH6js.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkGGQHOLH6js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
719
719
|
if (!apiKey) {
|
|
720
720
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
721
721
|
baseUrl,
|
|
722
722
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
723
723
|
);
|
|
724
724
|
if (pendingClaim) {
|
|
725
|
-
|
|
725
|
+
_chunkJYFLIQPEjs.printCommandEnvelope.call(void 0,
|
|
726
726
|
{
|
|
727
727
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
728
728
|
status: "pending",
|
|
@@ -743,7 +743,7 @@ async function handleStatus(args) {
|
|
|
743
743
|
);
|
|
744
744
|
return EXIT_OK;
|
|
745
745
|
}
|
|
746
|
-
|
|
746
|
+
_chunkJYFLIQPEjs.printCommandEnvelope.call(void 0,
|
|
747
747
|
{
|
|
748
748
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
749
749
|
status: "not connected",
|
|
@@ -776,7 +776,7 @@ async function handleStatus(args) {
|
|
|
776
776
|
}
|
|
777
777
|
);
|
|
778
778
|
if (status === 401 || status === 403) {
|
|
779
|
-
|
|
779
|
+
_chunkJYFLIQPEjs.printCommandEnvelope.call(void 0,
|
|
780
780
|
{
|
|
781
781
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
782
782
|
status: "unauthorized",
|
|
@@ -803,7 +803,7 @@ async function handleStatus(args) {
|
|
|
803
803
|
console.error(`Auth status error (status ${status}).`);
|
|
804
804
|
return EXIT_SERVER;
|
|
805
805
|
}
|
|
806
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
806
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkGGQHOLH6js.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
807
807
|
clearSatisfiedPendingClaim(
|
|
808
808
|
baseUrl,
|
|
809
809
|
resolvedAuthScope,
|
|
@@ -831,28 +831,28 @@ async function handleStatus(args) {
|
|
|
831
831
|
if (apiKeyResp) {
|
|
832
832
|
saveEnvValues(
|
|
833
833
|
{
|
|
834
|
-
[
|
|
835
|
-
[
|
|
834
|
+
[_chunkGGQHOLH6js.HOST_URL_ENV]: baseUrl,
|
|
835
|
+
[_chunkGGQHOLH6js.API_KEY_ENV]: apiKeyResp,
|
|
836
836
|
...activeOrgEnvValues(data)
|
|
837
837
|
},
|
|
838
838
|
baseUrl,
|
|
839
839
|
resolvedAuthScope
|
|
840
840
|
);
|
|
841
841
|
if (resolvedAuthScope === "folder") {
|
|
842
|
-
const target =
|
|
842
|
+
const target = _chunkGGQHOLH6js.resolveProjectPinTarget.call(void 0, );
|
|
843
843
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
844
844
|
} else {
|
|
845
845
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
849
|
-
saveEnvValues(
|
|
848
|
+
} else if (resolvedAuthScope === "folder" || _chunkGGQHOLH6js.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
849
|
+
saveEnvValues(_chunkGGQHOLH6js.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
850
850
|
}
|
|
851
|
-
|
|
851
|
+
_chunkJYFLIQPEjs.printCommandEnvelope.call(void 0,
|
|
852
852
|
{
|
|
853
853
|
...payload,
|
|
854
|
-
...
|
|
855
|
-
command_context:
|
|
854
|
+
..._chunkJIY25SUXjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
855
|
+
command_context: _chunkGGQHOLH6js.resolveCliCommandContext.call(void 0,
|
|
856
856
|
{ baseUrl, apiKey },
|
|
857
857
|
resolvedAuthScope
|
|
858
858
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJYFLIQPEjs = require('./chunk-JYFLIQPE.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/progress.ts
|
|
6
6
|
var _worker_threads = require('worker_threads');
|
|
@@ -19,7 +19,7 @@ var CliProgress = (_class = class {
|
|
|
19
19
|
__init9() {this.quiet = false}
|
|
20
20
|
// --json output is one JSON document: progress never renders under it.
|
|
21
21
|
constructor(enabled) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);
|
|
22
|
-
this.enabled = enabled && !
|
|
22
|
+
this.enabled = enabled && !_chunkJYFLIQPEjs.isJsonOutputMode.call(void 0, );
|
|
23
23
|
}
|
|
24
24
|
setLogWriter(writer) {
|
|
25
25
|
this.logWriter = writer;
|
|
@@ -59,7 +59,7 @@ var CliProgress = (_class = class {
|
|
|
59
59
|
this.logWriter(line);
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
if (
|
|
62
|
+
if (_chunkJYFLIQPEjs.isJsonOutputMode.call(void 0, )) return;
|
|
63
63
|
if (!this.enabled) {
|
|
64
64
|
process.stderr.write(`${line}
|
|
65
65
|
`);
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
+
var _chunkKUDNPJ43js = require('./chunk-KUDNPJ43.js');
|
|
3
4
|
|
|
4
|
-
var _chunk726UDAV2js = require('./chunk-726UDAV2.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkJYFLIQPEjs = require('./chunk-JYFLIQPE.js');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkJIY25SUXjs = require('./chunk-JIY25SUX.js');
|
|
8
11
|
|
|
9
12
|
// src/cli/commands/sessions.ts
|
|
10
13
|
|
|
@@ -139,7 +142,7 @@ function currentSessionFile(agent) {
|
|
|
139
142
|
const newestFirst = listSessionFiles(agent).sort(
|
|
140
143
|
(a, b) => b.mtimeMs - a.mtimeMs
|
|
141
144
|
);
|
|
142
|
-
const sessionId =
|
|
145
|
+
const sessionId = _chunkJIY25SUXjs.agentSessionIdFromEnvironment.call(void 0,
|
|
143
146
|
process.env,
|
|
144
147
|
agent === "auto" ? void 0 : agent === "claude" ? "claude_code" : "codex"
|
|
145
148
|
);
|
|
@@ -451,7 +454,7 @@ function buildSessionUploadContent(raw) {
|
|
|
451
454
|
return { encodedContent: encoded, needsChunking: true };
|
|
452
455
|
}
|
|
453
456
|
async function uploadPayload(path, payload) {
|
|
454
|
-
const { http } =
|
|
457
|
+
const { http } = _chunkJYFLIQPEjs.getAuthedHttpClient.call(void 0, );
|
|
455
458
|
return await http.post(path, payload);
|
|
456
459
|
}
|
|
457
460
|
async function uploadChunkedSessions(sessions, options) {
|
|
@@ -484,7 +487,7 @@ async function uploadChunkedSessions(sessions, options) {
|
|
|
484
487
|
...options.rating ? { rating: options.rating } : {}
|
|
485
488
|
});
|
|
486
489
|
const sessionIds = sessions.map((session) => session.sessionId);
|
|
487
|
-
|
|
490
|
+
_chunkJYFLIQPEjs.printCommandEnvelope.call(void 0,
|
|
488
491
|
{
|
|
489
492
|
...response,
|
|
490
493
|
ok: true,
|
|
@@ -505,6 +508,7 @@ async function uploadChunkedSessions(sessions, options) {
|
|
|
505
508
|
);
|
|
506
509
|
}
|
|
507
510
|
async function handleSessionsSend(options) {
|
|
511
|
+
if (_chunkKUDNPJ43js.rejectRestrictedFeedback.call(void 0, options)) return;
|
|
508
512
|
const rating = parseSessionRating(options.rating);
|
|
509
513
|
if (options.file) {
|
|
510
514
|
const filePath = _path.resolve.call(void 0, options.file);
|
|
@@ -516,7 +520,7 @@ async function handleSessionsSend(options) {
|
|
|
516
520
|
filename: _path.basename.call(void 0, filePath),
|
|
517
521
|
...rating ? { rating } : {}
|
|
518
522
|
});
|
|
519
|
-
|
|
523
|
+
_chunkJYFLIQPEjs.printCommandEnvelope.call(void 0,
|
|
520
524
|
{
|
|
521
525
|
...response2,
|
|
522
526
|
ok: true,
|
|
@@ -566,7 +570,7 @@ async function handleSessionsSend(options) {
|
|
|
566
570
|
...rating ? { rating } : {}
|
|
567
571
|
});
|
|
568
572
|
const sessionIds = built.map((session) => session.sessionId);
|
|
569
|
-
|
|
573
|
+
_chunkJYFLIQPEjs.printCommandEnvelope.call(void 0,
|
|
570
574
|
{
|
|
571
575
|
...response,
|
|
572
576
|
ok: true,
|
|
@@ -674,7 +678,7 @@ ${refreshMeta}
|
|
|
674
678
|
</body>
|
|
675
679
|
</html>`;
|
|
676
680
|
_fs.writeFileSync.call(void 0, outputPath, html, "utf8");
|
|
677
|
-
|
|
681
|
+
_chunkJYFLIQPEjs.printCommandEnvelope.call(void 0,
|
|
678
682
|
{
|
|
679
683
|
ok: true,
|
|
680
684
|
file: outputPath,
|
|
@@ -717,8 +721,10 @@ function registerSessionSendRenderCommands(parent, familyName) {
|
|
|
717
721
|
parent.command("send").description("Upload session transcript(s) or a local file to Deepline.").addHelpText(
|
|
718
722
|
"after",
|
|
719
723
|
`
|
|
724
|
+
In the default ask mode, ask the user first and pass --requested if they agree.
|
|
725
|
+
|
|
720
726
|
Examples:
|
|
721
|
-
deepline ${familyName} send --current-session
|
|
727
|
+
deepline ${familyName} send --current-session --requested
|
|
722
728
|
deepline ${familyName} send --agent codex --current-session
|
|
723
729
|
deepline ${familyName} send --session-id 5a3bfb97-a2d9-49d9-82c6-52ccc03dadca --label "pilot run"
|
|
724
730
|
deepline ${familyName} send --current-session --rating poor # tag the session as one that went poorly
|
|
@@ -742,9 +748,14 @@ Examples:
|
|
|
742
748
|
"--current-session",
|
|
743
749
|
"Use the calling agent's session, else the newest in this directory"
|
|
744
750
|
).option("--file <path>", "Upload a raw local file instead of a session").option(
|
|
751
|
+
"--requested",
|
|
752
|
+
"Mark the upload as requested or approved by the user"
|
|
753
|
+
).option(
|
|
745
754
|
"--rating <good|poor|neutral>",
|
|
746
755
|
"Tag the upload by outcome, not tone, so Deepline can filter sessions: good = the user's goal was met without product problems; poor = the goal was missed, or a product failure, bug, or avoidable friction (including a substantial workaround) got in the way; neutral = partly met or unclear."
|
|
747
|
-
).option("--json", "Emit JSON output").action(
|
|
756
|
+
).option("--json", "Emit JSON output").action(
|
|
757
|
+
(options, command) => handleSessionsSend({ ...options, json: command.optsWithGlobals().json })
|
|
758
|
+
);
|
|
748
759
|
parent.command("render").description("Render local session transcript(s) to an HTML viewer.").addHelpText(
|
|
749
760
|
"after",
|
|
750
761
|
`
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HLEZQDEZ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
saveHostEnvValues,
|
|
23
23
|
saveProjectDeeplineEnvValues,
|
|
24
24
|
storedHostApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-VEOFISLZ.mjs";
|
|
26
26
|
import {
|
|
27
27
|
SDK_API_CONTRACT,
|
|
28
28
|
SDK_VERSION,
|
|
29
29
|
connectionFailureMessage,
|
|
30
30
|
detectAgentRuntime,
|
|
31
31
|
networkCauseCode
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-JDDKJIZU.mjs";
|
|
33
33
|
import {
|
|
34
34
|
DeeplineError
|
|
35
35
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
var _chunkD3BCSAN7js = require('./chunk-D3BCSAN7.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkD5VWSR4Djs = require('./chunk-D5VWSR4D.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkGD3ES3JUjs = require('./chunk-GD3ES3JU.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkJYFLIQPEjs = require('./chunk-JYFLIQPE.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkGGQHOLH6js = require('./chunk-GGQHOLH6.js');
|
|
18
18
|
|
|
19
19
|
// src/cli/commands/search.ts
|
|
20
20
|
var _commander = require('commander');
|
|
@@ -24,7 +24,7 @@ var _fs = require('fs');
|
|
|
24
24
|
var _path = require('path');
|
|
25
25
|
var SEARCH_REF_TTL_MS = 15 * 6e4;
|
|
26
26
|
function lastSearchPath() {
|
|
27
|
-
return _path.join.call(void 0,
|
|
27
|
+
return _path.join.call(void 0, _chunkGGQHOLH6js.sdkCliStateDirPath.call(void 0, _chunkGGQHOLH6js.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
|
|
28
28
|
}
|
|
29
29
|
function rememberSearchRef(searchRef) {
|
|
30
30
|
writeSearchRefs({ searchRef });
|
|
@@ -134,9 +134,9 @@ async function runSearch(queryInputs, options, types, exclude = []) {
|
|
|
134
134
|
console.error("--summary-width must be an integer of at least 2.");
|
|
135
135
|
return 1;
|
|
136
136
|
}
|
|
137
|
-
const client = new (0,
|
|
137
|
+
const client = new (0, _chunkD5VWSR4Djs.DeeplineClient)();
|
|
138
138
|
const json = options.json === true;
|
|
139
|
-
const renderer = json ? void 0 : await Promise.resolve().then(() => _interopRequireWildcard(require("./search-output-
|
|
139
|
+
const renderer = json ? void 0 : await Promise.resolve().then(() => _interopRequireWildcard(require("./search-output-WLFFEGCY.js")));
|
|
140
140
|
const searches = [];
|
|
141
141
|
const chunks = [];
|
|
142
142
|
const refs = /* @__PURE__ */ new Map();
|
|
@@ -159,7 +159,7 @@ async function runSearch(queryInputs, options, types, exclude = []) {
|
|
|
159
159
|
const text = _optionalChain([renderer, 'optionalAccess', _12 => _12.renderSearchResults, 'call', _13 => _13(result, summaryWidth)]);
|
|
160
160
|
if (!multiple) {
|
|
161
161
|
if (searchRef) rememberSearchRef(searchRef);
|
|
162
|
-
|
|
162
|
+
_chunkJYFLIQPEjs.printCommandEnvelope.call(void 0, result, { json, text });
|
|
163
163
|
return 0;
|
|
164
164
|
}
|
|
165
165
|
searches.push({ ...result, query });
|
|
@@ -173,8 +173,8 @@ ${text}`);
|
|
|
173
173
|
}
|
|
174
174
|
} catch (error) {
|
|
175
175
|
if (!multiple) throw error;
|
|
176
|
-
const payload =
|
|
177
|
-
const queryExitCode = _nullishCoalesce(payload.exitCode, () => (
|
|
176
|
+
const payload = _chunkJYFLIQPEjs.errorToJsonPayload.call(void 0, error);
|
|
177
|
+
const queryExitCode = _nullishCoalesce(payload.exitCode, () => ( _chunkGD3ES3JUjs.resolveSdkCliFailureExitCode.call(void 0, error)));
|
|
178
178
|
searches.push({ ...payload, query, exitCode: queryExitCode });
|
|
179
179
|
if (!json) {
|
|
180
180
|
console.error(`${JSON.stringify(query)}: ${payload.error.message}`);
|
|
@@ -186,7 +186,7 @@ Search failed.
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
rememberSearchRefsByTool(refs);
|
|
189
|
-
|
|
189
|
+
_chunkJYFLIQPEjs.printCommandEnvelope.call(void 0,
|
|
190
190
|
{ searches },
|
|
191
191
|
{
|
|
192
192
|
json,
|