deepline 0.3.514 → 0.3.516
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/errors.ts +1 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +9 -4
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +30 -15
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +71 -1
- package/dist/bundling-sources/shared_libs/play-runtime/secret-redaction.ts +20 -7
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +3 -1
- package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +45 -0
- package/dist/bundling-sources/shared_libs/tool-execution-error.ts +45 -0
- package/dist/cli/{artifacts-GNFL5LY4.mjs → artifacts-G56FISIE.mjs} +9 -9
- package/dist/cli/{artifacts-OZRO4LHT.js → artifacts-KMWS32R5.js} +21 -21
- package/dist/cli/auth-6EIEZ3UE.js +43 -0
- package/dist/cli/{auth-53EDAX7Y.mjs → auth-RSS7MOBV.mjs} +7 -7
- package/dist/cli/{billing-ZMX2V5X3.mjs → billing-2ALO3XEG.mjs} +10 -10
- package/dist/cli/{billing-B6V3FELL.js → billing-RCC6WBIZ.js} +93 -93
- package/dist/cli/{chunk-753MZFDF.mjs → chunk-2YEFJHAF.mjs} +3 -3
- package/dist/cli/{chunk-BBDWIUJA.js → chunk-4IIK6GIY.js} +17 -17
- package/dist/cli/{chunk-DMBCJFGY.mjs → chunk-5NU37KME.mjs} +2 -2
- package/dist/cli/{chunk-Z5WO6IBV.mjs → chunk-6ADGVZRX.mjs} +21 -6
- package/dist/cli/{chunk-RNSHCJME.js → chunk-6Y3DDRRN.js} +30 -30
- package/dist/cli/{chunk-NXT52SIV.js → chunk-6ZLL5GDN.js} +2 -2
- package/dist/cli/{chunk-QSFAUGFK.js → chunk-72L5HQ3J.js} +5 -5
- package/dist/cli/{chunk-DLYWOHO4.mjs → chunk-72MFP7V4.mjs} +1 -1
- package/dist/cli/{chunk-MF7ZVWJK.js → chunk-7R2V5Z6O.js} +41 -41
- package/dist/cli/{chunk-W3TN352L.mjs → chunk-C2SR3X7Y.mjs} +4 -4
- package/dist/cli/{chunk-76M3DL5G.mjs → chunk-C72J6JE3.mjs} +1 -1
- package/dist/cli/{chunk-RMRZ4BC4.mjs → chunk-CA24C3XL.mjs} +4 -4
- package/dist/cli/{chunk-2RCZCWPO.js → chunk-CKEZXNMV.js} +6 -6
- package/dist/cli/{chunk-C24VEYSP.js → chunk-D4OZSC3C.js} +8 -4
- package/dist/cli/{chunk-EVTD3ELD.mjs → chunk-E7ZM2ZRD.mjs} +5 -5
- package/dist/cli/{chunk-MJIS4XAZ.mjs → chunk-EYWP5JPU.mjs} +4 -4
- package/dist/cli/{chunk-TG4IMWAL.js → chunk-FIIBDWAO.js} +55 -55
- package/dist/cli/{chunk-7MJYZ33I.mjs → chunk-GJYLC4JB.mjs} +1 -1
- package/dist/cli/{chunk-7MBI2OLW.mjs → chunk-H6BSB2YJ.mjs} +1 -1
- package/dist/cli/{chunk-N4TR6QRI.mjs → chunk-HT675XNR.mjs} +1 -1
- package/dist/cli/{chunk-IZJGOMCW.mjs → chunk-HY6KAW5H.mjs} +5 -5
- package/dist/cli/{chunk-ILITNKGM.mjs → chunk-J4VMWSQK.mjs} +7 -7
- package/dist/cli/{chunk-TZS4G7CS.js → chunk-JB6FEEDQ.js} +2 -2
- package/dist/cli/{chunk-6FYGFIXD.mjs → chunk-JPLEDOEW.mjs} +2 -2
- package/dist/cli/{chunk-7ZCXQDOQ.mjs → chunk-LCKAG5RL.mjs} +2 -2
- package/dist/cli/{chunk-RVMV4MXO.mjs → chunk-LWUFEX26.mjs} +3 -3
- package/dist/cli/{chunk-FPWOEK7G.js → chunk-LZROM6VQ.js} +2 -2
- package/dist/cli/{chunk-RLVSWAWB.js → chunk-N6Q5SDGA.js} +62 -51
- package/dist/cli/{chunk-A6QCMBGL.js → chunk-NRO3NTVO.js} +5 -5
- package/dist/cli/{chunk-VLIDBQYL.js → chunk-P6AADORO.js} +3 -3
- package/dist/cli/{chunk-55WBE4UK.js → chunk-PKKSXXZ5.js} +26 -26
- package/dist/cli/{chunk-G6PUQQJP.js → chunk-PMS3LQ6B.js} +5 -5
- package/dist/cli/{chunk-JC3ABOZP.js → chunk-PPYJXP4Z.js} +38 -23
- package/dist/cli/{chunk-6SSISVXD.mjs → chunk-PVVWKOEB.mjs} +8 -7
- package/dist/cli/{chunk-DBBLPDXK.mjs → chunk-Q47MAAHI.mjs} +1 -1
- package/dist/cli/{chunk-2CTTSNFE.js → chunk-QG3MRMU5.js} +58 -57
- package/dist/cli/{chunk-53F6JDQ3.mjs → chunk-QG4LIOGI.mjs} +2 -2
- package/dist/cli/{chunk-4QF2K7TM.mjs → chunk-QNHHZ63P.mjs} +1 -1
- package/dist/cli/{chunk-A253CMOI.js → chunk-QUSYG3VP.js} +8 -8
- package/dist/cli/{chunk-T4NQ2ZOH.js → chunk-QX7WDG4V.js} +11 -11
- package/dist/cli/{chunk-MQK5SY5N.js → chunk-RB3OR32I.js} +16 -16
- package/dist/cli/{chunk-RFN7OKT2.mjs → chunk-RB5EMAWD.mjs} +1 -1
- package/dist/cli/{chunk-WP3ULMRU.js → chunk-RLI6FDQM.js} +6 -6
- package/dist/cli/{chunk-TMQUMILM.js → chunk-RVHUW4TN.js} +2 -2
- package/dist/cli/{chunk-DIAWYWT5.js → chunk-SQWET4SL.js} +18 -1
- package/dist/cli/{chunk-OZDT2CZW.mjs → chunk-STR5LXK4.mjs} +1 -1
- package/dist/cli/{chunk-ALJJRZNJ.js → chunk-T2N3B7IQ.js} +8 -8
- package/dist/cli/{chunk-OQ4JV3IW.js → chunk-TZNQRKDF.js} +1 -1
- package/dist/cli/{chunk-CUMA6DE2.js → chunk-UW5QWTUG.js} +19 -19
- package/dist/cli/{chunk-G6A7CGFV.mjs → chunk-V46UBZBJ.mjs} +6 -3
- package/dist/cli/{chunk-R5PJ6XZI.js → chunk-VIZJIBI4.js} +10 -10
- package/dist/cli/{chunk-Y2RIMVEM.js → chunk-W5I53WQ4.js} +112 -112
- package/dist/cli/{chunk-H7L5MS5E.mjs → chunk-WCQ7JGDV.mjs} +4 -4
- package/dist/cli/{chunk-7KD4IYLA.js → chunk-WE223LFR.js} +19 -19
- package/dist/cli/{chunk-H53YG6QG.mjs → chunk-X2YP36YP.mjs} +1 -1
- package/dist/cli/{chunk-LV2DGEJ3.js → chunk-XEQBYK4B.js} +16 -13
- package/dist/cli/{chunk-5LBXLQRW.js → chunk-YS7AI7R6.js} +108 -108
- package/dist/cli/{chunk-HJ5B67S3.mjs → chunk-YXGTO5XA.mjs} +8 -4
- package/dist/cli/{chunk-54IH5U3I.mjs → chunk-Z3KLCDCB.mjs} +23 -12
- package/dist/cli/{chunk-6OIRN4PC.mjs → chunk-ZFRN3B2R.mjs} +2 -2
- package/dist/cli/{chunk-EO52BKGA.mjs → chunk-ZMCQP4EU.mjs} +11 -11
- package/dist/cli/{chunk-HBL4PM5Q.mjs → chunk-ZPGGW27Q.mjs} +17 -0
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-2BLYUV2G.js → csv-RPR64UBS.js} +15 -15
- package/dist/cli/{csv-ONKAMLL4.mjs → csv-YXK5TB47.mjs} +6 -6
- package/dist/cli/{db-YKT6LEQ3.js → db-KO3JCGRG.js} +36 -36
- package/dist/cli/{db-4GVSGAXL.mjs → db-UQYILAMF.mjs} +9 -9
- package/dist/cli/describe-BPX3U2BF.js +50 -0
- package/dist/cli/describe-P2OK5X2S.mjs +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-VFCU5NGH.js → executions-5Z7H7HV3.js} +11 -11
- package/dist/cli/{executions-7OSL25KJ.mjs → executions-IQCRQXVA.mjs} +9 -9
- package/dist/cli/{feedback-ERTOLEC4.js → feedback-EDZJDARP.js} +12 -12
- package/dist/cli/{feedback-RPZELEA5.mjs → feedback-ZO6A4HTV.mjs} +7 -7
- package/dist/cli/{git-XKRQZ4A6.mjs → git-OBXSILWM.mjs} +7 -7
- package/dist/cli/git-Y34J73QC.js +25 -0
- package/dist/cli/index.js +150 -150
- package/dist/cli/index.mjs +46 -46
- package/dist/cli/{legacy-noops-MZCFS2FQ.mjs → legacy-noops-4UJM3FMN.mjs} +8 -8
- package/dist/cli/{legacy-noops-HG3M5HGZ.js → legacy-noops-HKXU2EU6.js} +11 -11
- package/dist/cli/{monitors-MESMMU5P.js → monitors-7EP3Q2DX.js} +110 -110
- package/dist/cli/{monitors-GBO5XAEZ.mjs → monitors-ZXF2KCW7.mjs} +10 -10
- package/dist/cli/{org-DJRNWIPO.mjs → org-EDHCUR6V.mjs} +9 -9
- package/dist/cli/{org-EZPREEWH.js → org-GFGOTUWP.js} +75 -75
- package/dist/cli/{pages-36BHVOFL.mjs → pages-EGEWMPJN.mjs} +9 -9
- package/dist/cli/{pages-ACI7VV6I.js → pages-TLFQQL5S.js} +21 -21
- package/dist/cli/{play-SUSVQHX5.mjs → play-NBO3MPDL.mjs} +22 -22
- package/dist/cli/{play-KCLLAGWR.js → play-XDHJY5R4.js} +392 -392
- package/dist/cli/{providers-MV2YW3J5.mjs → providers-NXJ7WPNH.mjs} +9 -9
- package/dist/cli/{providers-YFO3EFLK.js → providers-RU6BGEDM.js} +12 -12
- package/dist/cli/{quickstart-MATFTZVQ.js → quickstart-4ZZBMZPF.js} +8 -8
- package/dist/cli/{quickstart-KMXU2T3Z.mjs → quickstart-YBNDPNAR.mjs} +6 -6
- package/dist/cli/{run-UW5FM64G.js → run-374CTJBV.js} +46 -46
- package/dist/cli/{run-YRYVGUCJ.mjs → run-LX52KVZM.mjs} +27 -27
- package/dist/cli/{search-WF3Q3I5X.mjs → search-EH6JPV62.mjs} +11 -11
- package/dist/cli/search-YS4DHSQC.js +33 -0
- package/dist/cli/{search-output-BG743WAM.js → search-output-NATLJOWW.js} +9 -9
- package/dist/cli/{search-output-THOAHTCU.mjs → search-output-XIQERUHF.mjs} +7 -7
- package/dist/cli/{secrets-EOGBWN44.js → secrets-A3UXDE5V.js} +18 -18
- package/dist/cli/{secrets-LM7OTAUE.mjs → secrets-VRJQFUKF.mjs} +9 -9
- package/dist/cli/sessions-5TTH5FGZ.mjs +18 -0
- package/dist/cli/sessions-EXII5VOV.js +18 -0
- package/dist/cli/{settings-OWE3EEG7.js → settings-LX5EGLVT.js} +89 -89
- package/dist/cli/{settings-JXTFX5G2.mjs → settings-VRGFTOTJ.mjs} +16 -16
- package/dist/cli/{setup-FG37SKMB.mjs → setup-FXP5Y3Y6.mjs} +12 -12
- package/dist/cli/{setup-Z5BEQKA7.js → setup-QL4YWKOR.js} +52 -52
- package/dist/cli/skills-5L4CYX3V.js +37 -0
- package/dist/cli/{skills-UGNCBZTJ.mjs → skills-ET4PMBJE.mjs} +10 -10
- package/dist/cli/tools-5V77VIUA.js +57 -0
- package/dist/cli/{tools-J3PKLQSL.mjs → tools-WPL3NZAA.mjs} +20 -20
- package/dist/cli/update-G5RSSWM5.js +35 -0
- package/dist/cli/{update-GGZ2XTMZ.mjs → update-OCAHAKL2.mjs} +12 -12
- package/dist/cli/{workflow-AUZCSCZP.js → workflow-CWO3XL4O.js} +20 -20
- package/dist/cli/{workflow-C66BBXHH.mjs → workflow-NPZ2RLQG.mjs} +10 -10
- package/dist/{client-CmlKSBXd.d.ts → client-CQSPuqxh.d.ts} +1 -1
- package/dist/{client-By7bUS8h.d.mts → client-K1g4ab5Y.d.mts} +1 -1
- package/dist/{client-core-BZ3tpY_J.d.mts → client-core-BksGf5Gd.d.mts} +1 -1
- package/dist/{client-core-BM0mKhgp.d.ts → client-core-BlaqOlQ7.d.ts} +1 -1
- package/dist/{compiler-manifest-BeURaD5Y.d.mts → compiler-manifest-BliMS7ax.d.mts} +14 -1
- package/dist/{compiler-manifest-BeURaD5Y.d.ts → compiler-manifest-BliMS7ax.d.ts} +14 -1
- package/dist/{errors-kBuT4kGK.d.mts → errors-BZ6Zq1cz.d.mts} +1 -1
- package/dist/{errors-BoPXPrSy.d.ts → errors-xfNscfS1.d.ts} +1 -1
- package/dist/{index-DC7oRAAC.d.mts → index-DbvCg4zg.d.mts} +1 -1
- package/dist/{index-D0crdGM1.d.ts → index-FGdQv8J8.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +13 -13
- package/dist/index.mjs +9 -9
- package/dist/install-integrity.json +126 -126
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +1 -1
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +3 -3
- package/dist/plays/run-request.mjs +2 -2
- 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 +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +12 -12
- package/dist/server.mjs +6 -6
- package/package.json +1 -1
- package/dist/cli/auth-SM5GLO45.js +0 -43
- package/dist/cli/describe-KPGQP4LH.js +0 -50
- package/dist/cli/describe-PRT2WQMS.mjs +0 -50
- package/dist/cli/git-U353JURQ.js +0 -25
- package/dist/cli/search-4ZQOFG7G.js +0 -33
- package/dist/cli/sessions-GDSJ72XI.js +0 -18
- package/dist/cli/sessions-SP2JL27H.mjs +0 -18
- package/dist/cli/skills-SIX5OTNX.js +0 -37
- package/dist/cli/tools-EZOV37MQ.js +0 -57
- package/dist/cli/update-ISU7YN34.js +0 -35
|
@@ -719,10 +719,12 @@ Output (JSON):
|
|
|
719
719
|
listSourcePath}, summary, next, render.sections.
|
|
720
720
|
Failures:
|
|
721
721
|
A failed call prints {ok:false, status:"failed", statusCode, error} and
|
|
722
|
-
exits non-zero.
|
|
723
|
-
|
|
722
|
+
exits non-zero. Record the row as failed and check
|
|
723
|
+
error.tool_error.retryable before repeating the call.
|
|
724
724
|
statusCode 429 is a rate or quota refusal; retry after the delay in
|
|
725
725
|
error.tool_error.retryAfterMs.
|
|
726
|
+
When a connected provider returns a failure, error.upstreamResponse
|
|
727
|
+
includes its HTTP status and body, with echoed authentication masked.
|
|
726
728
|
]]
|
|
727
729
|
[[mcp:
|
|
728
730
|
Output:
|
|
@@ -1626,8 +1628,10 @@ Input:
|
|
|
1626
1628
|
row's actual schema before extracting keys.
|
|
1627
1629
|
]]
|
|
1628
1630
|
Output (JSON):
|
|
1629
|
-
One outcome per key, in the order asked, duplicates kept. A
|
|
1630
|
-
entry holds result.toolResponse
|
|
1631
|
+
One outcome per key, in the order asked, duplicates kept. A retained
|
|
1632
|
+
entry holds result.toolResponse. A failed call made with a connected
|
|
1633
|
+
provider can have result.toolResponse.rawV2.upstreamResponse.
|
|
1634
|
+
Read errors stay with their key.
|
|
1631
1635
|
Cost:
|
|
1632
1636
|
Free.
|
|
1633
1637
|
Avoid:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getActiveCliProgress
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X2YP36YP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
maybeReportAutomaticSkillsSyncFailure
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LWUFEX26.mjs";
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_SKILL_AGENTS,
|
|
9
9
|
KNOWN_SKILL_AGENTS,
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
sdkCliStateDirPath,
|
|
15
15
|
skillsAgentPathSegment,
|
|
16
16
|
writeSdkSkillsLocalVersion
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZFRN3B2R.mjs";
|
|
18
18
|
import {
|
|
19
19
|
SDK_API_CONTRACT,
|
|
20
20
|
SDK_API_MAJOR,
|
|
21
21
|
SDK_VERSION,
|
|
22
22
|
deploymentProtectionHeaders,
|
|
23
23
|
detectAgentRuntime
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PVVWKOEB.mjs";
|
|
25
25
|
import {
|
|
26
26
|
SDK_RELEASE
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-C72J6JE3.mjs";
|
|
28
28
|
|
|
29
29
|
// src/compat.ts
|
|
30
30
|
import { randomUUID } from "crypto";
|
|
@@ -816,11 +816,17 @@ function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
|
816
816
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
817
817
|
}
|
|
818
818
|
var SKILLS_AUTO_SYNC_COMMAND = "skills-auto-sync";
|
|
819
|
-
function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
820
|
-
const
|
|
819
|
+
function spawnDetachedSkillsSyncChild(argv, onSpawnError, sidecarPath) {
|
|
820
|
+
const launch = sidecarPath ? resolveShellSpawn(sidecarPath, argv) : {
|
|
821
|
+
command: process.execPath,
|
|
822
|
+
args: [process.argv[1] ?? "", ...argv],
|
|
823
|
+
shell: false
|
|
824
|
+
};
|
|
825
|
+
const child = spawn(launch.command, launch.args, {
|
|
821
826
|
detached: true,
|
|
822
827
|
stdio: "ignore",
|
|
823
|
-
env: process.env
|
|
828
|
+
env: process.env,
|
|
829
|
+
shell: launch.shell
|
|
824
830
|
});
|
|
825
831
|
child.on("error", () => onSpawnError?.());
|
|
826
832
|
child.unref();
|
|
@@ -1383,7 +1389,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1383
1389
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1384
1390
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1385
1391
|
}
|
|
1386
|
-
if (options.mode === "detached" && options.update === void 0 && isDefaultAgentSet(agents)) {
|
|
1392
|
+
if (options.mode === "detached" && options.update === void 0 && (options.afterCliUpdate ? agents.length === 0 : isDefaultAgentSet(agents))) {
|
|
1387
1393
|
return;
|
|
1388
1394
|
}
|
|
1389
1395
|
const ownsInProgressMarker = options.mode !== "detached" && agents.length > 0 && Boolean(options.claim);
|
|
@@ -1397,13 +1403,18 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1397
1403
|
}
|
|
1398
1404
|
if (leases) recordOwnPidOnInProgressSkillsSync(baseUrl, leases);
|
|
1399
1405
|
const claimedVersion = leases ? claimedSkillsVersion(leases) : "";
|
|
1406
|
+
const spawnDetached = options.spawnDetached ?? ((argv, onSpawnError) => spawnDetachedSkillsSyncChild(
|
|
1407
|
+
argv,
|
|
1408
|
+
onSpawnError,
|
|
1409
|
+
options.afterCliUpdate?.sidecarPath
|
|
1410
|
+
));
|
|
1400
1411
|
if (options.mode === "detached" && agents.length > 0 && options.update === void 0 && !claimedVersion) {
|
|
1401
1412
|
if (cachedUnavailableInstallerProbes(baseUrl)) return;
|
|
1402
1413
|
const outcome = claimAndSpawnDetachedSkillsSync(
|
|
1403
1414
|
baseUrl,
|
|
1404
1415
|
agents,
|
|
1405
1416
|
UNRESOLVED_SKILLS_CLAIM_VERSION,
|
|
1406
|
-
|
|
1417
|
+
spawnDetached
|
|
1407
1418
|
);
|
|
1408
1419
|
if (outcome.state === "unavailable") {
|
|
1409
1420
|
writeSkillsStateUnavailableNotice(baseUrl, agents, outcome.error);
|
|
@@ -1416,7 +1427,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1416
1427
|
needsUpdate: options.update.needs_update,
|
|
1417
1428
|
remoteVersion: options.update.remote.version
|
|
1418
1429
|
} : null;
|
|
1419
|
-
if (!update?.needsUpdate || !update.remoteVersion) {
|
|
1430
|
+
if (!update?.needsUpdate || !update.remoteVersion || update.remoteVersion === localVersion) {
|
|
1420
1431
|
return;
|
|
1421
1432
|
}
|
|
1422
1433
|
if (agents.length > 0 && hasFailedSkillsSync(baseUrl, update.remoteVersion, agents)) {
|
|
@@ -1442,7 +1453,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1442
1453
|
baseUrl,
|
|
1443
1454
|
agents,
|
|
1444
1455
|
update.remoteVersion,
|
|
1445
|
-
|
|
1456
|
+
spawnDetached,
|
|
1446
1457
|
isDefaultAgentSet(agents) ? () => {
|
|
1447
1458
|
const probes = dueUnknownInstallerProbes(
|
|
1448
1459
|
baseUrl,
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
addDescribeOptions,
|
|
3
3
|
recordApiResponse,
|
|
4
4
|
writeExecutionOutput
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-72MFP7V4.mjs";
|
|
6
6
|
import {
|
|
7
7
|
recentSearchRef,
|
|
8
8
|
registerDeprecatedSearchCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HY6KAW5H.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Capability,
|
|
12
12
|
arrayField,
|
|
@@ -46,10 +46,10 @@ import {
|
|
|
46
46
|
} from "./chunk-FIVKWNMT.mjs";
|
|
47
47
|
import {
|
|
48
48
|
DeeplineClient
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-LCKAG5RL.mjs";
|
|
50
50
|
import {
|
|
51
51
|
validateExecutionIdempotencyKey
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-WCQ7JGDV.mjs";
|
|
53
53
|
import {
|
|
54
54
|
stableStringify
|
|
55
55
|
} from "./chunk-BMCRTI6Z.mjs";
|
|
@@ -59,18 +59,18 @@ import {
|
|
|
59
59
|
maybeAutoUpdateAndRelaunch,
|
|
60
60
|
registerCompatibilityCatalog,
|
|
61
61
|
runToolExecuteStage
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-6ADGVZRX.mjs";
|
|
63
63
|
import {
|
|
64
64
|
isCliTraceEnabled,
|
|
65
65
|
recordCliTrace,
|
|
66
66
|
resolveCliMaintenancePolicy
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-H6BSB2YJ.mjs";
|
|
68
68
|
import {
|
|
69
69
|
checkSdkCompatibility,
|
|
70
70
|
enforceSdkCompatibilityResponse,
|
|
71
71
|
flushDeferredSkillsSyncNotices,
|
|
72
72
|
syncSdkSkillsIfNeeded
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-Z3KLCDCB.mjs";
|
|
74
74
|
import {
|
|
75
75
|
printCommandEnvelope,
|
|
76
76
|
printCompactJson,
|
|
@@ -78,15 +78,15 @@ import {
|
|
|
78
78
|
printJsonError,
|
|
79
79
|
renderCommandEnvelopeText,
|
|
80
80
|
shouldEmitJson
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-V46UBZBJ.mjs";
|
|
82
82
|
import {
|
|
83
83
|
readSdkSkillsLocalVersion,
|
|
84
84
|
resolveConfig,
|
|
85
85
|
sdkCliStateDirPath
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-ZFRN3B2R.mjs";
|
|
87
87
|
import {
|
|
88
88
|
DeeplineError
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-ZPGGW27Q.mjs";
|
|
90
90
|
|
|
91
91
|
// src/cli/commands/tools.ts
|
|
92
92
|
import { Option } from "commander";
|
|
@@ -1054,7 +1054,7 @@ Examples:
|
|
|
1054
1054
|
process.exitCode = await narrowView();
|
|
1055
1055
|
return;
|
|
1056
1056
|
}
|
|
1057
|
-
const { describeAnything } = await import("./describe-
|
|
1057
|
+
const { describeAnything } = await import("./describe-P2OK5X2S.mjs");
|
|
1058
1058
|
process.exitCode = await describeAnything(
|
|
1059
1059
|
toolId,
|
|
1060
1060
|
{
|
|
@@ -32,6 +32,21 @@ function applyBrand(value, brand) {
|
|
|
32
32
|
value: true
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
+
function readToolUpstreamResponse(value) {
|
|
36
|
+
if (!isRecord(value)) return void 0;
|
|
37
|
+
const raw = isRecord(value.toolResponse) ? value.toolResponse.rawV2 : null;
|
|
38
|
+
const upstream = value.upstreamResponse ?? (isRecord(raw) ? raw.upstreamResponse : null);
|
|
39
|
+
if (!isRecord(upstream) || typeof upstream.status !== "number" || !Number.isInteger(upstream.status) || upstream.status < 100 || upstream.status > 599 || !Object.hasOwn(upstream, "body"))
|
|
40
|
+
return void 0;
|
|
41
|
+
return { status: upstream.status, body: upstream.body };
|
|
42
|
+
}
|
|
43
|
+
function attachToolUpstreamResponse(error, response) {
|
|
44
|
+
const upstream = readToolUpstreamResponse(response);
|
|
45
|
+
if (upstream) {
|
|
46
|
+
Object.defineProperty(error, "upstreamResponse", { value: upstream });
|
|
47
|
+
}
|
|
48
|
+
return error;
|
|
49
|
+
}
|
|
35
50
|
var DeeplineError = class _DeeplineError extends Error {
|
|
36
51
|
/** HTTP status when the failure crossed an HTTP boundary. */
|
|
37
52
|
statusCode;
|
|
@@ -340,6 +355,8 @@ export {
|
|
|
340
355
|
TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
341
356
|
SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS,
|
|
342
357
|
TOOL_EXECUTION_ERROR_SCHEMA_HEADER,
|
|
358
|
+
readToolUpstreamResponse,
|
|
359
|
+
attachToolUpstreamResponse,
|
|
343
360
|
DeeplineError,
|
|
344
361
|
ToolExecutionError,
|
|
345
362
|
brandAsToolExecutionError,
|
package/dist/cli/command-docs.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkD4OZSC3Cjs = require('./chunk-D4OZSC3C.js');
|
|
11
11
|
require('./chunk-R7J7CJPZ.js');
|
|
12
12
|
require('./chunk-YGCKMI5P.js');
|
|
13
13
|
require('./chunk-COGTRVWW.js');
|
|
@@ -20,4 +20,4 @@ require('./chunk-COGTRVWW.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
exports.CLI_DOC_SURFACE =
|
|
23
|
+
exports.CLI_DOC_SURFACE = _chunkD4OZSC3Cjs.CLI_DOC_SURFACE; exports.COMMAND_DOCS = _chunkD4OZSC3Cjs.COMMAND_DOCS; exports.PLAY_RUNTIME_PRICING_NOTE = _chunkD4OZSC3Cjs.PLAY_RUNTIME_PRICING_NOTE; exports.commandDocKey = _chunkD4OZSC3Cjs.commandDocKey; exports.helpDetailFromArgv = _chunkD4OZSC3Cjs.helpDetailFromArgv; exports.renderActionExplanation = _chunkD4OZSC3Cjs.renderActionExplanation; exports.renderCommandExplanation = _chunkD4OZSC3Cjs.renderCommandExplanation; exports.renderDocText = _chunkD4OZSC3Cjs.renderDocText;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
7
|
+
var _chunkXEQBYK4Bjs = require('./chunk-XEQBYK4B.js');
|
|
8
|
+
require('./chunk-QUSYG3VP.js');
|
|
9
|
+
require('./chunk-QG3MRMU5.js');
|
|
10
|
+
require('./chunk-T2N3B7IQ.js');
|
|
11
11
|
require('./chunk-XNYIZMNQ.js');
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-SQWET4SL.js');
|
|
13
|
+
require('./chunk-TZNQRKDF.js');
|
|
14
14
|
require('./chunk-OG64RBAC.js');
|
|
15
15
|
require('./chunk-COGTRVWW.js');
|
|
16
16
|
|
|
@@ -128,7 +128,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
128
128
|
column.length,
|
|
129
129
|
...rows.map((row) => {
|
|
130
130
|
const value = _nullishCoalesce(row[column], () => ( ""));
|
|
131
|
-
return (verbose ? value :
|
|
131
|
+
return (verbose ? value : _chunkXEQBYK4Bjs.clip.call(void 0, value, 42)).length;
|
|
132
132
|
})
|
|
133
133
|
)
|
|
134
134
|
])
|
|
@@ -138,7 +138,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
138
138
|
const body = rows.map(
|
|
139
139
|
(row) => columns.map((column) => {
|
|
140
140
|
const raw = _nullishCoalesce(row[column], () => ( ""));
|
|
141
|
-
const display = verbose ? raw :
|
|
141
|
+
const display = verbose ? raw : _chunkXEQBYK4Bjs.clip.call(void 0, raw, 42);
|
|
142
142
|
return display.padEnd(widths[column]);
|
|
143
143
|
}).join(" | ")
|
|
144
144
|
);
|
|
@@ -158,7 +158,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
158
158
|
{ exitCode: 2 }
|
|
159
159
|
);
|
|
160
160
|
}
|
|
161
|
-
const allRows =
|
|
161
|
+
const allRows = _chunkXEQBYK4Bjs.readCsvRows.call(void 0, csvPath);
|
|
162
162
|
const [rowStart, rowEnd] = parseRowRange(options.rows);
|
|
163
163
|
const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
|
|
164
164
|
const { rows: selected, columns } = selectColumns(
|
|
@@ -171,7 +171,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
171
171
|
if (options.summary) {
|
|
172
172
|
const summaries = summarizeColumns(selected, columns);
|
|
173
173
|
if (format === "json") {
|
|
174
|
-
|
|
174
|
+
_chunkXEQBYK4Bjs.printJson.call(void 0, {
|
|
175
175
|
rows: summaries,
|
|
176
176
|
total_rows: selected.length,
|
|
177
177
|
source_total_rows: allRows.length
|
|
@@ -180,7 +180,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
180
180
|
}
|
|
181
181
|
const displayRows = summaryDisplayRows(summaries);
|
|
182
182
|
if (format === "csv") {
|
|
183
|
-
process.stdout.write(
|
|
183
|
+
process.stdout.write(_chunkXEQBYK4Bjs.csvStringFromRows.call(void 0, displayRows));
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
process.stdout.write(
|
|
@@ -195,7 +195,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
197
|
if (format === "json") {
|
|
198
|
-
|
|
198
|
+
_chunkXEQBYK4Bjs.printJson.call(void 0, {
|
|
199
199
|
rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
|
|
200
200
|
});
|
|
201
201
|
return;
|
|
@@ -438,7 +438,7 @@ async function handleCsvRenderStart(options) {
|
|
|
438
438
|
if (log) {
|
|
439
439
|
detail = `
|
|
440
440
|
CSV render log:
|
|
441
|
-
${
|
|
441
|
+
${_chunkXEQBYK4Bjs.clip.call(void 0, log, 2e3)}`;
|
|
442
442
|
}
|
|
443
443
|
} catch (e7) {
|
|
444
444
|
}
|
|
@@ -489,7 +489,7 @@ async function handleCsvRenderStatus(options) {
|
|
|
489
489
|
if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
|
|
490
490
|
if (payload.url) lines.push(`Render URL: ${payload.url}`);
|
|
491
491
|
lines.push(`Render Health: ${payload.health_status}`);
|
|
492
|
-
|
|
492
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0, payload, {
|
|
493
493
|
json: options.json,
|
|
494
494
|
text: `${lines.join("\n")}
|
|
495
495
|
`
|
|
@@ -525,7 +525,7 @@ async function handleCsvRenderStop(options) {
|
|
|
525
525
|
};
|
|
526
526
|
const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
|
|
527
527
|
` : "No running CSV render process found.\n";
|
|
528
|
-
|
|
528
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
529
529
|
}
|
|
530
530
|
async function handleCsvRender(action, options) {
|
|
531
531
|
const normalized = _nullishCoalesce(action, () => ( "start"));
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
printCommandEnvelope,
|
|
5
5
|
printJson,
|
|
6
6
|
readCsvRows
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-V46UBZBJ.mjs";
|
|
8
|
+
import "./chunk-ZFRN3B2R.mjs";
|
|
9
|
+
import "./chunk-PVVWKOEB.mjs";
|
|
10
|
+
import "./chunk-QNHHZ63P.mjs";
|
|
11
11
|
import "./chunk-DLIRSHV6.mjs";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ZPGGW27Q.mjs";
|
|
13
|
+
import "./chunk-C72J6JE3.mjs";
|
|
14
14
|
import "./chunk-WZYKRD7T.mjs";
|
|
15
15
|
import "./chunk-KRD6H754.mjs";
|
|
16
16
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkPMS3LQ6Bjs = require('./chunk-PMS3LQ6B.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkYS7AI7R6js = require('./chunk-YS7AI7R6.js');
|
|
10
10
|
require('./chunk-E4CABWXL.js');
|
|
11
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-6Y3DDRRN.js');
|
|
12
12
|
require('./chunk-NMU3VR5U.js');
|
|
13
13
|
require('./chunk-WSGXBROE.js');
|
|
14
14
|
|
|
@@ -20,17 +20,17 @@ require('./chunk-WSGXBROE.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
24
|
-
require('./chunk-
|
|
25
|
-
require('./chunk-
|
|
23
|
+
var _chunkXEQBYK4Bjs = require('./chunk-XEQBYK4B.js');
|
|
24
|
+
require('./chunk-QUSYG3VP.js');
|
|
25
|
+
require('./chunk-QG3MRMU5.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkT2N3B7IQjs = require('./chunk-T2N3B7IQ.js');
|
|
29
29
|
require('./chunk-XNYIZMNQ.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
33
|
-
require('./chunk-
|
|
32
|
+
var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
|
|
33
|
+
require('./chunk-TZNQRKDF.js');
|
|
34
34
|
require('./chunk-OG64RBAC.js');
|
|
35
35
|
require('./chunk-COGTRVWW.js');
|
|
36
36
|
|
|
@@ -53,8 +53,8 @@ function formatCell(value) {
|
|
|
53
53
|
return text.length > 80 ? `${text.slice(0, 77)}...` : text;
|
|
54
54
|
}
|
|
55
55
|
function tableLines(result) {
|
|
56
|
-
const rows =
|
|
57
|
-
const responseColumns =
|
|
56
|
+
const rows = _chunkXEQBYK4Bjs.dataExportRows.call(void 0, customerDbRows(result));
|
|
57
|
+
const responseColumns = _chunkXEQBYK4Bjs.dataExportColumns.call(void 0,
|
|
58
58
|
rows,
|
|
59
59
|
customerDbColumnNames(result)
|
|
60
60
|
);
|
|
@@ -100,7 +100,7 @@ function tableLines(result) {
|
|
|
100
100
|
return lines;
|
|
101
101
|
}
|
|
102
102
|
function customerDbRows(result) {
|
|
103
|
-
return
|
|
103
|
+
return _chunkXEQBYK4Bjs.recordRows.call(void 0, result.rows);
|
|
104
104
|
}
|
|
105
105
|
function customerDbColumnNames(result) {
|
|
106
106
|
return result.columns.map((column) => column.name).filter(Boolean);
|
|
@@ -122,15 +122,15 @@ function collectErrorText(value) {
|
|
|
122
122
|
].filter(Boolean).join("\n");
|
|
123
123
|
}
|
|
124
124
|
function formatDbQueryError(sql, error) {
|
|
125
|
-
const text = error instanceof
|
|
125
|
+
const text = error instanceof _chunkT2N3B7IQjs.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
|
|
126
126
|
const lower = text.toLowerCase();
|
|
127
127
|
const referencesStorage = /"storage"\.|storage\./i.test(sql);
|
|
128
128
|
const runIdColumnMissing = /column\s+"?run_id"?\s+does not exist/i.test(text) || /run_id.*does not exist/i.test(lower);
|
|
129
129
|
const relationMissing = /relation\s+["']?[^"']*storage[^"']*["']?\s+does not exist/i.test(text) || /42p01/i.test(text);
|
|
130
130
|
if (referencesStorage && relationMissing) {
|
|
131
131
|
return [
|
|
132
|
-
...error instanceof
|
|
133
|
-
error instanceof
|
|
132
|
+
...error instanceof _chunkT2N3B7IQjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
133
|
+
error instanceof _chunkT2N3B7IQjs.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
|
|
134
134
|
"Play dataset tables are created only when the corresponding deepline.dataset(...).run(...) call executes. Pilot branches, early returns, and runs that fail before the dataset do not create that table.",
|
|
135
135
|
"Use `deepline runs get <run-id> --full --json` to inspect returned dataset handles, then export them with `deepline runs export <run-id> --dataset result.rows --out rows.csv`.",
|
|
136
136
|
`Original error: ${errorMessage(error)}`
|
|
@@ -138,13 +138,13 @@ function formatDbQueryError(sql, error) {
|
|
|
138
138
|
}
|
|
139
139
|
if (referencesStorage && runIdColumnMissing) {
|
|
140
140
|
return [
|
|
141
|
-
...error instanceof
|
|
141
|
+
...error instanceof _chunkT2N3B7IQjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
142
142
|
"Customer DB query failed: storage dataset tables use `_run_id`, not `run_id`.",
|
|
143
143
|
"Prefer `deepline runs export <run-id> --dataset result.rows --out rows.csv` unless you are doing deep table debugging.",
|
|
144
144
|
`Original error: ${errorMessage(error)}`
|
|
145
145
|
].join("\n");
|
|
146
146
|
}
|
|
147
|
-
if (error instanceof
|
|
147
|
+
if (error instanceof _chunkSQWET4SLjs.DeeplineError) {
|
|
148
148
|
return error.message;
|
|
149
149
|
}
|
|
150
150
|
return errorMessage(error);
|
|
@@ -153,7 +153,7 @@ function writeCustomerDbCsv(result, outPath) {
|
|
|
153
153
|
const resolved = _path.resolve.call(void 0, outPath);
|
|
154
154
|
_fs.writeFileSync.call(void 0,
|
|
155
155
|
resolved,
|
|
156
|
-
|
|
156
|
+
_chunkXEQBYK4Bjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
|
|
157
157
|
"utf-8"
|
|
158
158
|
);
|
|
159
159
|
return resolved;
|
|
@@ -194,7 +194,7 @@ function dbQueryExportEnvelope(input) {
|
|
|
194
194
|
function renderDbQueryResult(result, query, options) {
|
|
195
195
|
const { sql, maxRows, operationKey } = query;
|
|
196
196
|
const { format, out: outPath, json: explicitJsonOutput = false } = options;
|
|
197
|
-
const jsonOutput = explicitJsonOutput ||
|
|
197
|
+
const jsonOutput = explicitJsonOutput || _chunkXEQBYK4Bjs.shouldEmitJson.call(void 0, );
|
|
198
198
|
const toolPayload = JSON.stringify({
|
|
199
199
|
sql,
|
|
200
200
|
result_mode: "rows",
|
|
@@ -205,7 +205,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
205
205
|
if (format === "csv") {
|
|
206
206
|
if (outPath) {
|
|
207
207
|
const exportedPath = writeCustomerDbCsv(result, outPath);
|
|
208
|
-
|
|
208
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
209
209
|
dbQueryExportEnvelope({
|
|
210
210
|
result,
|
|
211
211
|
format,
|
|
@@ -221,7 +221,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
221
221
|
);
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
225
225
|
dbQueryExportEnvelope({
|
|
226
226
|
result,
|
|
227
227
|
format,
|
|
@@ -231,7 +231,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
231
231
|
}),
|
|
232
232
|
{
|
|
233
233
|
json: explicitJsonOutput,
|
|
234
|
-
text:
|
|
234
|
+
text: _chunkXEQBYK4Bjs.dataExportCsvString.call(void 0,
|
|
235
235
|
customerDbRows(result),
|
|
236
236
|
customerDbColumnNames(result)
|
|
237
237
|
)
|
|
@@ -240,14 +240,14 @@ function renderDbQueryResult(result, query, options) {
|
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
if (format === "markdown") {
|
|
243
|
-
const content =
|
|
243
|
+
const content = _chunkXEQBYK4Bjs.markdownTableFromRows.call(void 0,
|
|
244
244
|
customerDbRows(result),
|
|
245
245
|
customerDbColumnNames(result)
|
|
246
246
|
);
|
|
247
247
|
if (outPath) {
|
|
248
248
|
const exportedPath = _path.resolve.call(void 0, outPath);
|
|
249
249
|
_fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
|
|
250
|
-
|
|
250
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
251
251
|
dbQueryExportEnvelope({
|
|
252
252
|
result,
|
|
253
253
|
format,
|
|
@@ -263,7 +263,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
263
263
|
);
|
|
264
264
|
return;
|
|
265
265
|
}
|
|
266
|
-
|
|
266
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
267
267
|
dbQueryExportEnvelope({
|
|
268
268
|
result,
|
|
269
269
|
format,
|
|
@@ -278,7 +278,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
278
278
|
);
|
|
279
279
|
return;
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
282
282
|
{
|
|
283
283
|
...result,
|
|
284
284
|
next: {
|
|
@@ -352,9 +352,9 @@ async function runDbQueryCommand(options) {
|
|
|
352
352
|
...maxRows === void 0 ? {} : { maxRows },
|
|
353
353
|
...operationKey === void 0 ? {} : { operationKey }
|
|
354
354
|
};
|
|
355
|
-
const plan =
|
|
355
|
+
const plan = _chunkYS7AI7R6js.planCustomerDbQuery.call(void 0, query);
|
|
356
356
|
if (options.dryRun) {
|
|
357
|
-
|
|
357
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
358
358
|
{
|
|
359
359
|
dryRun: true,
|
|
360
360
|
...plan,
|
|
@@ -367,11 +367,11 @@ async function runDbQueryCommand(options) {
|
|
|
367
367
|
...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
|
|
368
368
|
}
|
|
369
369
|
},
|
|
370
|
-
{ json: options.json ||
|
|
370
|
+
{ json: options.json || _chunkXEQBYK4Bjs.shouldEmitJson.call(void 0, ) }
|
|
371
371
|
);
|
|
372
372
|
return 0;
|
|
373
373
|
}
|
|
374
|
-
const client = new (0,
|
|
374
|
+
const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
|
|
375
375
|
const result = await client.db.query(query);
|
|
376
376
|
renderDbQueryResult(result, query, {
|
|
377
377
|
format,
|
|
@@ -380,8 +380,8 @@ async function runDbQueryCommand(options) {
|
|
|
380
380
|
});
|
|
381
381
|
return 0;
|
|
382
382
|
} catch (error) {
|
|
383
|
-
if (error instanceof
|
|
384
|
-
|
|
383
|
+
if (error instanceof _chunkT2N3B7IQjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkXEQBYK4Bjs.shouldEmitJson.call(void 0, ))) {
|
|
384
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
385
385
|
{
|
|
386
386
|
ok: false,
|
|
387
387
|
error: {
|
|
@@ -429,15 +429,15 @@ function dbRepairPlainText(result) {
|
|
|
429
429
|
async function handleDbRepair(args) {
|
|
430
430
|
const providerIndex = args.indexOf("--provider");
|
|
431
431
|
const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
|
|
432
|
-
const jsonOutput =
|
|
433
|
-
const client = new (0,
|
|
432
|
+
const jsonOutput = _chunkXEQBYK4Bjs.argsWantJson.call(void 0, args);
|
|
433
|
+
const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
|
|
434
434
|
let result;
|
|
435
435
|
try {
|
|
436
436
|
result = await client.repairIngestionStorage(
|
|
437
437
|
provider ? { provider } : void 0
|
|
438
438
|
);
|
|
439
439
|
} catch (error) {
|
|
440
|
-
if (error instanceof
|
|
440
|
+
if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.statusCode === 403) {
|
|
441
441
|
console.error(
|
|
442
442
|
"deepline db repair requires org admin. Ask an organization admin to run it."
|
|
443
443
|
);
|
|
@@ -446,7 +446,7 @@ async function handleDbRepair(args) {
|
|
|
446
446
|
console.error(errorMessage2(error));
|
|
447
447
|
return 1;
|
|
448
448
|
}
|
|
449
|
-
|
|
449
|
+
_chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
|
|
450
450
|
{
|
|
451
451
|
command: "db repair",
|
|
452
452
|
status: result.status,
|