deepline 0.3.546 → 0.3.547
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 +13 -0
- package/dist/bundling-sources/sdk/src/index.ts +7 -1
- package/dist/bundling-sources/sdk/src/integrations.ts +17 -7
- package/dist/bundling-sources/sdk/src/play.ts +71 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +13 -4
- package/dist/bundling-sources/sdk/src/types.ts +33 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/calendar-delegation.ts +7 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +19 -1
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +17 -2
- package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +57 -5
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +295 -52
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +10 -1
- package/dist/bundling-sources/shared_libs/play-runtime/docflow-decision-tracker.ts +135 -0
- package/dist/bundling-sources/shared_libs/play-runtime/docflow-fail-open.ts +177 -0
- package/dist/bundling-sources/shared_libs/play-runtime/docflow-node-io.ts +99 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +16 -10
- package/dist/bundling-sources/shared_libs/play-runtime/fenced-call-diagnostics.ts +211 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-capacity-policy.ts +52 -14
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +21 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +11 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +48 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +6 -1
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +716 -51
- package/dist/bundling-sources/shared_libs/plays/docflow-decision-arms.ts +146 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-flow-order.ts +94 -0
- package/dist/bundling-sources/shared_libs/plays/docflow-unreached-reason.ts +10 -1
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +787 -117
- package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +8 -2
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +6 -0
- package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +13 -0
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +25 -0
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +56 -0
- package/dist/cli/auth-AC5277PI.js +43 -0
- package/dist/cli/{auth-KFWG72AZ.mjs → auth-WJEY4IDX.mjs} +5 -5
- package/dist/cli/{billing-OQVOAZ4S.js → billing-IJITDDRQ.js} +96 -96
- package/dist/cli/{billing-MMZ336HO.mjs → billing-PHJUDYF3.mjs} +10 -10
- package/dist/cli/{chunk-TBWYZOSV.js → chunk-2AHY47SI.js} +3 -3
- package/dist/cli/{chunk-MXQP7CXZ.js → chunk-2HPTLBNB.js} +3 -3
- package/dist/cli/{chunk-TI6DTURF.js → chunk-4WAM6TLD.js} +7 -1
- package/dist/cli/{chunk-JARZ47OP.mjs → chunk-56MEAGWA.mjs} +2 -2
- package/dist/cli/{chunk-GYTSDSQD.mjs → chunk-5SFHPMBY.mjs} +11 -11
- package/dist/cli/{chunk-Z3UEBFIN.js → chunk-ABLTVG3J.js} +41 -41
- package/dist/cli/{chunk-LX2TC3HO.mjs → chunk-AEQ5VWZ5.mjs} +4 -4
- package/dist/cli/{chunk-MI7X6V6V.mjs → chunk-CKIRKYW7.mjs} +3 -3
- package/dist/cli/{chunk-2JHYYB3F.js → chunk-CSPHSNBW.js} +3 -3
- package/dist/cli/{chunk-IVWU7SJC.js → chunk-D6OIEH47.js} +5 -5
- package/dist/cli/{chunk-KUK7ARXA.mjs → chunk-DIUNDLSX.mjs} +2 -2
- package/dist/cli/{chunk-RO66FPTS.mjs → chunk-DJI5CLLW.mjs} +1 -1
- package/dist/cli/{chunk-LIJKRDDG.js → chunk-DZC7LMYM.js} +6 -6
- package/dist/cli/{chunk-UQJBV5PM.js → chunk-E2OIYPB4.js} +10 -10
- package/dist/cli/{chunk-JA633HRV.mjs → chunk-ECUD4QPD.mjs} +3 -3
- package/dist/cli/{chunk-VPERQ3U6.mjs → chunk-ESCVHDNY.mjs} +5 -5
- package/dist/cli/{chunk-JVOUQFHT.js → chunk-FFBXLFKV.js} +1 -1
- package/dist/cli/{chunk-3DUNNZB6.mjs → chunk-FMQXAOVE.mjs} +4 -4
- package/dist/cli/{chunk-HXIR3VQL.mjs → chunk-FZHMNK6F.mjs} +7 -1
- package/dist/cli/{chunk-PU3ZAG6V.mjs → chunk-G6KW764N.mjs} +1 -1
- package/dist/cli/{chunk-EEG46QZY.mjs → chunk-G6XTCG3J.mjs} +2 -2
- package/dist/cli/{chunk-EEJHB76U.js → chunk-GIGAYLY6.js} +12 -12
- package/dist/cli/{chunk-BLYW6FFB.js → chunk-GJA2PRHJ.js} +2 -2
- package/dist/cli/{chunk-H7Q5IDO3.js → chunk-GJOGFWX3.js} +20 -20
- package/dist/cli/{chunk-6Y5TU3R7.mjs → chunk-GPAWLXW3.mjs} +1 -1
- package/dist/cli/{chunk-5W4ENHWM.js → chunk-GZFZZQL4.js} +285 -264
- package/dist/cli/{chunk-P7A3H6G5.mjs → chunk-HARZ4AAX.mjs} +1 -1
- package/dist/cli/{chunk-MEGHIX4M.js → chunk-HFIFKP3A.js} +5 -5
- package/dist/cli/{chunk-LHE2TSV6.mjs → chunk-IGAK22XO.mjs} +1 -1
- package/dist/cli/{chunk-VTK3HGMN.mjs → chunk-IKYN6PLO.mjs} +5 -5
- package/dist/cli/{chunk-UREAIHUU.mjs → chunk-ITLZBDSR.mjs} +3 -3
- package/dist/cli/{chunk-6LG7MLJ2.js → chunk-IVFFCAV2.js} +44 -44
- package/dist/cli/{chunk-SYTWWVIQ.js → chunk-K3GMDSUX.js} +5 -5
- package/dist/cli/{chunk-WKHPLBJK.js → chunk-L5J6UJ2X.js} +15 -15
- package/dist/cli/{chunk-X5KOHDJN.mjs → chunk-L6QE2XVM.mjs} +1 -1
- package/dist/cli/{chunk-SH32HL7I.js → chunk-LMLSOHTU.js} +53 -53
- package/dist/cli/{chunk-JCWNF44W.js → chunk-MBQELFL7.js} +22 -22
- package/dist/cli/{chunk-Z7SXGOIQ.mjs → chunk-MF7PCM6C.mjs} +1 -1
- package/dist/cli/{chunk-F2VEFMU5.js → chunk-MO7TGNXB.js} +13 -13
- package/dist/cli/{chunk-7ZW67ME6.mjs → chunk-MOZEAGSR.mjs} +1 -1
- package/dist/cli/{chunk-5VNQMVCU.js → chunk-N63U5CRG.js} +26 -26
- package/dist/cli/{chunk-JCH4UNNS.js → chunk-NBYFQZ6O.js} +2 -2
- package/dist/cli/{chunk-BTFUAGHC.js → chunk-OVYXYTEP.js} +16 -16
- package/dist/cli/{chunk-J65HJCJO.mjs → chunk-PBMO36BP.mjs} +2 -2
- package/dist/cli/{chunk-F5YQXCP3.js → chunk-PVQCX6KQ.js} +50 -7
- package/dist/cli/{chunk-K2XELBPF.mjs → chunk-QLE3QKJ2.mjs} +5 -5
- package/dist/cli/{chunk-VAT2SXFF.js → chunk-QU3K3IY6.js} +12 -12
- package/dist/cli/{chunk-JYG4XZLT.js → chunk-REAFIEV5.js} +99 -99
- package/dist/cli/{chunk-5OEFXAKP.mjs → chunk-RMCCB3XY.mjs} +50 -7
- package/dist/cli/{chunk-HJR2DDJS.mjs → chunk-RXRC2COC.mjs} +2 -2
- package/dist/cli/{chunk-4AZLGNXV.js → chunk-SAJWYN4B.js} +4 -4
- package/dist/cli/{chunk-VXTTAYOT.mjs → chunk-TNJG4ZPN.mjs} +3 -3
- package/dist/cli/{chunk-PMDHY2YK.js → chunk-VNOQEDVC.js} +7 -7
- package/dist/cli/{chunk-GOOF7E2B.mjs → chunk-VPF54TXQ.mjs} +5 -5
- package/dist/cli/{chunk-2HSZCQMT.mjs → chunk-WYT3H6JD.mjs} +1 -1
- package/dist/cli/{chunk-OAKWSLKS.mjs → chunk-XMBVHJPR.mjs} +28 -7
- package/dist/cli/{chunk-7MY7KWJS.mjs → chunk-XNTDTAKC.mjs} +1 -1
- package/dist/cli/{chunk-5V7NZKGG.js → chunk-YURGAKI3.js} +2 -2
- package/dist/cli/{chunk-ND7SFRQL.js → chunk-YVKLF7RW.js} +2 -2
- package/dist/cli/{chunk-6FBDTYR2.mjs → chunk-Z2YGQZWV.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{concurrent-runs-help-C2O5YKQA.mjs → concurrent-runs-help-ZNGP563R.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-ZYISYOQA.js +21 -0
- package/dist/cli/{csv-Z4DNGR54.mjs → csv-VAHQHYYV.mjs} +4 -4
- package/dist/cli/{csv-MJDNOIQJ.js → csv-X6D4ZELE.js} +13 -13
- package/dist/cli/{db-4RL2BNOF.mjs → db-4G4S2VOV.mjs} +7 -7
- package/dist/cli/{db-S5QVPK5E.js → db-YA5ZGVEX.js} +28 -28
- package/dist/cli/{describe-L4P5SZLQ.mjs → describe-EVXEM2S6.mjs} +19 -19
- package/dist/cli/describe-GYYSLZLV.js +50 -0
- package/dist/cli/describe-core.d.mts +4 -4
- package/dist/cli/describe-core.d.ts +4 -4
- package/dist/cli/{executions-MFZ2Z36O.js → executions-5YC7ABF6.js} +9 -9
- package/dist/cli/{executions-RR6O3XK5.mjs → executions-HR6CTN5M.mjs} +7 -7
- package/dist/cli/{feedback-EQBQ3ABB.mjs → feedback-GEU5SPLR.mjs} +6 -6
- package/dist/cli/{feedback-YDAG7VH2.js → feedback-MJHSYLFF.js} +14 -14
- package/dist/cli/git-FZIQZNI4.js +25 -0
- package/dist/cli/{git-YGLCCU35.mjs → git-NPFF6QUS.mjs} +5 -5
- package/dist/cli/index.js +146 -146
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{integrations-IQXYMRMW.js → integrations-YPHFI77G.js} +19 -17
- package/dist/cli/{integrations-FWYXSBHK.mjs → integrations-Z7EGVBHF.mjs} +11 -9
- package/dist/cli/{legacy-noops-U7LI7UXC.js → legacy-noops-246E3KKG.js} +9 -9
- package/dist/cli/{legacy-noops-I4YRIX5F.mjs → legacy-noops-5IYCFWWX.mjs} +6 -6
- package/dist/cli/{mcp-QJBMB6VS.mjs → mcp-WUYGZXPI.mjs} +4 -4
- package/dist/cli/{mcp-GX2UKKWU.js → mcp-YTYTW67G.js} +24 -24
- package/dist/cli/{monitors-Z6EGKYJP.mjs → monitors-73DQKCU7.mjs} +26 -8
- package/dist/cli/{monitors-WCJYINGX.js → monitors-SA6ILD6Z.js} +119 -101
- package/dist/cli/{org-NNHICBR2.mjs → org-WVQRB2KX.mjs} +7 -7
- package/dist/cli/{org-7SKG423N.js → org-X7ELDV7B.js} +89 -89
- package/dist/cli/{play-CXDFPJ7Z.mjs → play-QI6V2EUQ.mjs} +295 -67
- package/dist/cli/{play-4P4DTG3Q.js → play-QTYOAJPE.js} +897 -669
- package/dist/cli/{providers-VQLQ7DTR.mjs → providers-DPVMVDS4.mjs} +7 -7
- package/dist/cli/{providers-EE4TUE3O.js → providers-XXFLVREV.js} +10 -10
- package/dist/cli/{quickstart-RVXHK4WA.js → quickstart-33ISXQJU.js} +6 -6
- package/dist/cli/{quickstart-IYNJRB5G.mjs → quickstart-YWGNHULM.mjs} +4 -4
- package/dist/cli/{run-R3F34KU3.js → run-BWHZXLTD.js} +45 -45
- package/dist/cli/{run-VBQPPMEX.mjs → run-J6FCAKQC.mjs} +25 -25
- package/dist/cli/search-JCWJX2XD.js +32 -0
- package/dist/cli/{search-B7R62HX5.mjs → search-Z3UU3WBB.mjs} +8 -8
- package/dist/cli/{search-output-LNQQXIGZ.mjs → search-output-OJYY4J7E.mjs} +4 -4
- package/dist/cli/{search-output-LWHWEPOT.js → search-output-YIPV74ME.js} +6 -6
- package/dist/cli/{secrets-QBOZ7WTD.js → secrets-UXRJCEN4.js} +16 -16
- package/dist/cli/{secrets-NM3VAJLO.mjs → secrets-YZZN2WST.mjs} +7 -7
- package/dist/cli/{sessions-R5BSIJ4I.mjs → sessions-ITCGPD7Z.mjs} +6 -6
- package/dist/cli/sessions-NA4SJH6Q.js +22 -0
- package/dist/cli/{settings-POYWKNRD.js → settings-LAFYMILP.js} +86 -86
- package/dist/cli/{settings-S4PN7WLY.mjs → settings-ZP2LSVNM.mjs} +13 -13
- package/dist/cli/{setup-VHB4Z654.js → setup-4AL3XYM5.js} +49 -49
- package/dist/cli/{setup-PFLXVBTL.mjs → setup-WEQAQSYC.mjs} +9 -9
- package/dist/cli/{skills-W2TELEU7.mjs → skills-NQH4HFW2.mjs} +7 -7
- package/dist/cli/skills-XZ4Y6SZ7.js +36 -0
- package/dist/cli/{tools-M4FA6N3Y.mjs → tools-CXK2GSI4.mjs} +18 -18
- package/dist/cli/tools-WJQ6Y7E4.js +57 -0
- package/dist/cli/{update-W7LIHEA7.mjs → update-3ROF3Z75.mjs} +9 -9
- package/dist/cli/update-ZLRLTBRD.js +34 -0
- package/dist/cli/{views-KTVPV6UP.mjs → views-AOUHVGV2.mjs} +7 -7
- package/dist/cli/{views-DJXAGD7V.js → views-XJFO5CEH.js} +22 -22
- package/dist/cli/{workflow-NVZDJKH2.js → workflow-GY3DBHXX.js} +18 -18
- package/dist/cli/{workflow-LGKCRODX.mjs → workflow-KBS2QJK6.mjs} +8 -8
- package/dist/{client-Tp1LSULB.d.mts → client-D1uWA2Vc.d.mts} +1 -1
- package/dist/{client-CCyWJqAI.d.ts → client-Hz7SsBXs.d.ts} +1 -1
- package/dist/{client-core-BpYiYEfu.d.ts → client-core-D3Ad7Flt.d.ts} +554 -504
- package/dist/{client-core-D8eCZz3O.d.mts → client-core-Db_e63Hb.d.mts} +554 -504
- package/dist/{compiler-manifest-EBWEUj0b.d.ts → compiler-manifest-BqwVrOri.d.mts} +38 -18
- package/dist/{compiler-manifest-EBWEUj0b.d.mts → compiler-manifest-BqwVrOri.d.ts} +38 -18
- package/dist/{errors-CParKUQR.d.mts → errors-BU8FB99X.d.mts} +1 -1
- package/dist/{errors-Qt0OTA7_.d.ts → errors-DfVN_FUG.d.ts} +1 -1
- package/dist/{index-CoqDkIw0.d.ts → index-BGnvtYGc.d.ts} +6 -1
- package/dist/{index-BMUVCNp7.d.mts → index-DjZgwpGw.d.mts} +6 -1
- package/dist/index.d.mts +28 -8
- package/dist/index.d.ts +28 -8
- package/dist/index.js +64 -39
- package/dist/index.mjs +32 -7
- package/dist/install-integrity.json +133 -128
- 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 +620 -124
- package/dist/plays/play-description.d.mts +3 -3
- package/dist/plays/play-description.d.ts +3 -3
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +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 +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-W32GMYND.js +0 -43
- package/dist/cli/concurrent-runs-help-6QT7ZR4W.js +0 -21
- package/dist/cli/describe-VLU2LUDJ.js +0 -50
- package/dist/cli/git-E6W44F5M.js +0 -25
- package/dist/cli/search-UUVFXZRA.js +0 -32
- package/dist/cli/sessions-K3PD73Q2.js +0 -22
- package/dist/cli/skills-QNE2EYT3.js +0 -36
- package/dist/cli/tools-3RLI4HGF.js +0 -57
- package/dist/cli/update-UT6KIW2W.js +0 -34
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
var _chunk4WAM6TLDjs = require('./chunk-4WAM6TLD.js');
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
|
|
@@ -36,7 +37,7 @@ var _chunkPMH4GLMDjs = require('./chunk-PMH4GLMD.js');
|
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
|
|
39
|
-
var
|
|
40
|
+
var _chunkSAJWYN4Bjs = require('./chunk-SAJWYN4B.js');
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
var _chunkEITMD3A5js = require('./chunk-EITMD3A5.js');
|
|
@@ -463,7 +464,7 @@ function validateCliInvocationId(value) {
|
|
|
463
464
|
var INCLUDE_TOOL_METADATA_HEADER = "x-deepline-include-tool-metadata";
|
|
464
465
|
var EXECUTE_RESPONSE_CONTRACT_HEADER = "x-deepline-execute-response-contract";
|
|
465
466
|
var EXECUTE_RESPONSE_INTENT_HEADER = "x-deepline-execute-response-intent";
|
|
466
|
-
var RAW_V2_EXECUTE_RESPONSE_CONTRACT =
|
|
467
|
+
var RAW_V2_EXECUTE_RESPONSE_CONTRACT = _chunk4WAM6TLDjs.RAW_V2_TOOL_RESPONSE_CONTRACT;
|
|
467
468
|
var DEFAULT_EXECUTION_RECOVERY_TIMEOUT_MS = 15 * 60 * 1e3;
|
|
468
469
|
function validateExecutionIdempotencyKey(key) {
|
|
469
470
|
if (typeof key !== "string" || key.length < 1 || key.length > 200 || !/^[A-Za-z0-9._:-]+$/.test(key)) {
|
|
@@ -561,7 +562,7 @@ function materializeToolExecutionResponse(response) {
|
|
|
561
562
|
}
|
|
562
563
|
const rawV2 = toolResponse.rawV2;
|
|
563
564
|
const view = toolResponse.view;
|
|
564
|
-
const providerMeta =
|
|
565
|
+
const providerMeta = _chunk4WAM6TLDjs.providerMetaFromToolResponseRawV2.call(void 0,
|
|
565
566
|
rawV2,
|
|
566
567
|
_nullishCoalesce(view, () => ( "rawV2"))
|
|
567
568
|
);
|
|
@@ -570,7 +571,7 @@ function materializeToolExecutionResponse(response) {
|
|
|
570
571
|
...response,
|
|
571
572
|
toolResponse: {
|
|
572
573
|
...toolResponse,
|
|
573
|
-
raw:
|
|
574
|
+
raw: _chunk4WAM6TLDjs.legacyRawFromToolResponseRawV2.call(void 0,
|
|
574
575
|
rawV2,
|
|
575
576
|
_nullishCoalesce(view, () => ( "rawV2")),
|
|
576
577
|
responseMeta
|
|
@@ -593,7 +594,7 @@ var ToolCalls = class {
|
|
|
593
594
|
}
|
|
594
595
|
async call(toolId, input, options) {
|
|
595
596
|
const connection = _optionalChain([options, 'optionalAccess', _12 => _12.connection]);
|
|
596
|
-
if (connection !== void 0 && (!
|
|
597
|
+
if (connection !== void 0 && (!_chunk4WAM6TLDjs.isToolConnectionName.call(void 0, connection) || _optionalChain([options, 'optionalAccess', _13 => _13.idempotencyKey]) !== void 0 || _optionalChain([options, 'optionalAccess', _14 => _14.recover]))) {
|
|
597
598
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
598
599
|
"Use a valid workspace connection name without execution recovery.",
|
|
599
600
|
400,
|
|
@@ -688,7 +689,7 @@ var ToolCalls = class {
|
|
|
688
689
|
idempotencyKey,
|
|
689
690
|
onResponse: (response2) => {
|
|
690
691
|
lastResponse = null;
|
|
691
|
-
atomicToolsSupported = response2.headers.get(
|
|
692
|
+
atomicToolsSupported = response2.headers.get(_chunkSAJWYN4Bjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
692
693
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
693
694
|
if (_optionalChain([options, 'optionalAccess', _33 => _33.onServerTiming])) {
|
|
694
695
|
try {
|
|
@@ -911,7 +912,7 @@ function normalizePlayRuntimeSelection(value) {
|
|
|
911
912
|
if (record.sandboxPlacementPolicy !== void 0 && sandboxPlacementPolicy === null) {
|
|
912
913
|
return null;
|
|
913
914
|
}
|
|
914
|
-
if (record.backend !== void 0 && record.backend !==
|
|
915
|
+
if (record.backend !== void 0 && record.backend !== _chunk4WAM6TLDjs.PLAY_RUNTIME_BACKENDS.daytona && record.backend !== _chunk4WAM6TLDjs.PLAY_RUNTIME_BACKENDS.modal) {
|
|
915
916
|
return null;
|
|
916
917
|
}
|
|
917
918
|
return {
|
|
@@ -1075,15 +1076,15 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1075
1076
|
}
|
|
1076
1077
|
const receivers = _optionalChain([env, 'access', _58 => _58.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _59 => _59.trim, 'call', _60 => _60()]);
|
|
1077
1078
|
return {
|
|
1078
|
-
[
|
|
1079
|
-
...receivers ? { [
|
|
1079
|
+
[_chunkSAJWYN4Bjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1080
|
+
...receivers ? { [_chunkSAJWYN4Bjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1080
1081
|
};
|
|
1081
1082
|
}
|
|
1082
1083
|
function playRunStartHeaders(runtime, env) {
|
|
1083
1084
|
const headers = runtimeSelectionHeaders(runtime, env);
|
|
1084
1085
|
const experimentSwitches = _optionalChain([env, 'access', _61 => _61.DEEPLINE_EXPERIMENT_SWITCHES, 'optionalAccess', _62 => _62.trim, 'call', _63 => _63()]);
|
|
1085
1086
|
if (!experimentSwitches) return headers;
|
|
1086
|
-
return { ...headers, [
|
|
1087
|
+
return { ...headers, [_chunkSAJWYN4Bjs.EXPERIMENT_SWITCHES_HEADER]: experimentSwitches };
|
|
1087
1088
|
}
|
|
1088
1089
|
function normalizeTestPolicyOverrides(value, source) {
|
|
1089
1090
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -1153,7 +1154,7 @@ var PlayClient = class {
|
|
|
1153
1154
|
return _chunkSL6MYJYMjs.startPlayRun.call(void 0,
|
|
1154
1155
|
this.http,
|
|
1155
1156
|
resolved.request,
|
|
1156
|
-
_optionalChain([options, 'optionalAccess', _71 => _71.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1157
|
+
_optionalChain([options, 'optionalAccess', _71 => _71.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkSAJWYN4Bjs.SDK_API_MAJOR) } : headers,
|
|
1157
1158
|
options
|
|
1158
1159
|
);
|
|
1159
1160
|
}
|
|
@@ -2444,6 +2445,8 @@ async function changeConnection(client, action, name, options) {
|
|
|
2444
2445
|
const row = await findConnection(client, name, options.provider);
|
|
2445
2446
|
if (options.booking && (action !== "reconnect" || row.type !== "workspace_delegation"))
|
|
2446
2447
|
invalid("Use --booking with Google Workspace verify or reconnect.");
|
|
2448
|
+
if (options.listCalendars && (action !== "reconnect" || row.type !== "workspace_delegation"))
|
|
2449
|
+
invalid("Use --list-calendars with Google Workspace verify or reconnect.");
|
|
2447
2450
|
if (row.type === "workspace_delegation") {
|
|
2448
2451
|
if (row.provider !== CALENDAR_PROVIDER || !row.domain)
|
|
2449
2452
|
invalid("The workspace approval is missing its provider or domain.");
|
|
@@ -2490,7 +2493,7 @@ async function changeConnection(client, action, name, options) {
|
|
|
2490
2493
|
}
|
|
2491
2494
|
async function verifyWorkspace(client, domain, options, existing) {
|
|
2492
2495
|
domain = domain.trim().toLowerCase();
|
|
2493
|
-
if (!
|
|
2496
|
+
if (!_chunk4WAM6TLDjs.GOOGLE_WORKSPACE_DOMAIN_PATTERN.test(domain))
|
|
2494
2497
|
invalid("Enter a Google Workspace domain, such as example.com.");
|
|
2495
2498
|
const email = _optionalChain([options, 'access', _85 => _85.verificationEmail, 'optionalAccess', _86 => _86.trim, 'call', _87 => _87(), 'access', _88 => _88.toLowerCase, 'call', _89 => _89()]);
|
|
2496
2499
|
if (!email || email.length > 254 || !/^[^\s@]+@[^\s@]+$/.test(email) || email.split("@")[1] !== domain)
|
|
@@ -2502,14 +2505,21 @@ async function verifyWorkspace(client, domain, options, existing) {
|
|
|
2502
2505
|
} : await client.getCalendarDelegation(void 0, void 0, domain);
|
|
2503
2506
|
if (settings.grantRevision === void 0)
|
|
2504
2507
|
invalid("The API did not return a workspace approval revision.");
|
|
2505
|
-
const requestedScopes =
|
|
2508
|
+
const requestedScopes = [
|
|
2509
|
+
.../* @__PURE__ */ new Set([
|
|
2510
|
+
_chunk4WAM6TLDjs.GOOGLE_WORKSPACE_AVAILABILITY_SCOPE,
|
|
2511
|
+
..._nullishCoalesce(settings.grantedScopes, () => ( [])),
|
|
2512
|
+
...options.booking ? [_chunk4WAM6TLDjs.GOOGLE_WORKSPACE_BOOKING_SCOPE] : [],
|
|
2513
|
+
...options.listCalendars ? [_chunk4WAM6TLDjs.GOOGLE_WORKSPACE_CALENDAR_LIST_SCOPE] : []
|
|
2514
|
+
])
|
|
2515
|
+
];
|
|
2506
2516
|
const change = {
|
|
2507
2517
|
action: "enable_workspace",
|
|
2508
2518
|
domain,
|
|
2509
2519
|
grantRevision: settings.grantRevision,
|
|
2510
2520
|
...settings.connectionId ? { connectionId: settings.connectionId } : {},
|
|
2511
2521
|
verificationEmail: email,
|
|
2512
|
-
...
|
|
2522
|
+
...requestedScopes.length > 1 ? { requestedScopes } : {}
|
|
2513
2523
|
};
|
|
2514
2524
|
if (options.dryRun) return change;
|
|
2515
2525
|
return client.changeCalendarDelegation(change);
|
|
@@ -2861,10 +2871,10 @@ function getStepStatusSignature(snapshot) {
|
|
|
2861
2871
|
_nullishCoalesce(state.artifactTableNamespace, () => ( "")),
|
|
2862
2872
|
_nullishCoalesce(state.startedAt, () => ( "")),
|
|
2863
2873
|
_nullishCoalesce(state.completedAt, () => ( "")),
|
|
2864
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2865
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2874
|
+
_nullishCoalesce(_optionalChain([state, 'access', _90 => _90.progress, 'optionalAccess', _91 => _91.startedAt]), () => ( "")),
|
|
2875
|
+
_nullishCoalesce(_optionalChain([state, 'access', _92 => _92.progress, 'optionalAccess', _93 => _93.completedAt]), () => ( "")),
|
|
2866
2876
|
_nullishCoalesce(state.updatedAt, () => ( "")),
|
|
2867
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2877
|
+
_nullishCoalesce(_optionalChain([state, 'access', _94 => _94.progress, 'optionalAccess', _95 => _95.updatedAt]), () => ( ""))
|
|
2868
2878
|
].join(":")
|
|
2869
2879
|
).join("|");
|
|
2870
2880
|
}
|
|
@@ -2873,11 +2883,11 @@ function getStepProgressSignature(snapshot) {
|
|
|
2873
2883
|
snapshot.nodeStates.map((state) => [
|
|
2874
2884
|
state.nodeId,
|
|
2875
2885
|
projectPlayStepProgressCounters(_nullishCoalesce(state.progress, () => ( {}))),
|
|
2876
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2877
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2878
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2879
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2880
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2886
|
+
_nullishCoalesce(_optionalChain([state, 'access', _96 => _96.progress, 'optionalAccess', _97 => _97.artifactTableNamespace]), () => ( "")),
|
|
2887
|
+
_nullishCoalesce(_optionalChain([state, 'access', _98 => _98.progress, 'optionalAccess', _99 => _99.startedAt]), () => ( "")),
|
|
2888
|
+
_nullishCoalesce(_optionalChain([state, 'access', _100 => _100.progress, 'optionalAccess', _101 => _101.completedAt]), () => ( "")),
|
|
2889
|
+
_nullishCoalesce(_optionalChain([state, 'access', _102 => _102.progress, 'optionalAccess', _103 => _103.updatedAt]), () => ( "")),
|
|
2890
|
+
_nullishCoalesce(_optionalChain([state, 'access', _104 => _104.progress, 'optionalAccess', _105 => _105.message]), () => ( ""))
|
|
2881
2891
|
])
|
|
2882
2892
|
);
|
|
2883
2893
|
}
|
|
@@ -2947,8 +2957,8 @@ function diffPlayRunStreamEvents(input) {
|
|
|
2947
2957
|
if (state.status === "idle") {
|
|
2948
2958
|
continue;
|
|
2949
2959
|
}
|
|
2950
|
-
const persistedStartedAt = _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access',
|
|
2951
|
-
const persistedCompletedAt = _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access',
|
|
2960
|
+
const persistedStartedAt = _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access', _106 => _106.progress, 'optionalAccess', _107 => _107.startedAt]))), () => ( null));
|
|
2961
|
+
const persistedCompletedAt = _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access', _108 => _108.progress, 'optionalAccess', _109 => _109.completedAt]))), () => ( null));
|
|
2952
2962
|
events.push(
|
|
2953
2963
|
makeRunStreamEvent({
|
|
2954
2964
|
cursor,
|
|
@@ -2962,7 +2972,7 @@ function diffPlayRunStreamEvents(input) {
|
|
|
2962
2972
|
...resolveTimingWindow({
|
|
2963
2973
|
startedAt: persistedStartedAt,
|
|
2964
2974
|
completedAt: persistedCompletedAt,
|
|
2965
|
-
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access',
|
|
2975
|
+
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access', _110 => _110.progress, 'optionalAccess', _111 => _111.updatedAt]))), () => ( snapshot.updatedAt)), () => ( null))
|
|
2966
2976
|
})
|
|
2967
2977
|
}
|
|
2968
2978
|
})
|
|
@@ -3016,9 +3026,9 @@ function diffPlayRunStreamEvents(input) {
|
|
|
3016
3026
|
if (next.snapshotSignature !== previous.snapshotSignature) {
|
|
3017
3027
|
const enrichedNodeStates = snapshot.nodeStates.map((state) => {
|
|
3018
3028
|
const timing = resolveTimingWindow({
|
|
3019
|
-
startedAt: _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access',
|
|
3020
|
-
completedAt: _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access',
|
|
3021
|
-
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access',
|
|
3029
|
+
startedAt: _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access', _112 => _112.progress, 'optionalAccess', _113 => _113.startedAt]))), () => ( null)),
|
|
3030
|
+
completedAt: _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access', _114 => _114.progress, 'optionalAccess', _115 => _115.completedAt]))), () => ( null)),
|
|
3031
|
+
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access', _116 => _116.progress, 'optionalAccess', _117 => _117.updatedAt]))), () => ( snapshot.updatedAt)), () => ( null))
|
|
3022
3032
|
});
|
|
3023
3033
|
return {
|
|
3024
3034
|
...state,
|
|
@@ -3064,22 +3074,24 @@ function diffPlayRunStreamEvents(input) {
|
|
|
3064
3074
|
var RUN_WATCH_POLL_INTERVAL_MS = 2e3;
|
|
3065
3075
|
var RUN_WATCH_STARTUP_POLL_INTERVAL_MS = 300;
|
|
3066
3076
|
var RUN_WATCH_STARTUP_WINDOW_MS = 6e3;
|
|
3077
|
+
var RUN_WATCH_INTERACTIVE_POLL_INTERVAL_MS = 500;
|
|
3078
|
+
var RUN_WATCH_INTERACTIVE_WINDOW_MS = 3e4;
|
|
3067
3079
|
var RUN_WATCH_SERVER_WAIT_MS = 0;
|
|
3068
3080
|
var RUN_WATCH_SERVER_WAIT_FROM_START = false;
|
|
3069
3081
|
var TERMINAL_LOG_PROJECTION_RETRY_LIMIT = 3;
|
|
3070
3082
|
function waitForNextPoll(ms, signal) {
|
|
3071
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
3083
|
+
if (_optionalChain([signal, 'optionalAccess', _118 => _118.aborted])) {
|
|
3072
3084
|
return Promise.resolve(false);
|
|
3073
3085
|
}
|
|
3074
3086
|
return new Promise((resolve) => {
|
|
3075
3087
|
const finish = (elapsed) => {
|
|
3076
3088
|
clearTimeout(timeout);
|
|
3077
|
-
_optionalChain([signal, 'optionalAccess',
|
|
3089
|
+
_optionalChain([signal, 'optionalAccess', _119 => _119.removeEventListener, 'call', _120 => _120("abort", onAbort)]);
|
|
3078
3090
|
resolve(elapsed);
|
|
3079
3091
|
};
|
|
3080
3092
|
const onAbort = () => finish(false);
|
|
3081
3093
|
const timeout = setTimeout(() => finish(true), ms);
|
|
3082
|
-
_optionalChain([signal, 'optionalAccess',
|
|
3094
|
+
_optionalChain([signal, 'optionalAccess', _121 => _121.addEventListener, 'call', _122 => _122("abort", onAbort, { once: true })]);
|
|
3083
3095
|
});
|
|
3084
3096
|
}
|
|
3085
3097
|
function readSnapshotResponse(response, runId) {
|
|
@@ -3160,12 +3172,14 @@ async function* watchRunEvents(options) {
|
|
|
3160
3172
|
let outageNoticeSent = false;
|
|
3161
3173
|
let pollCount = 0;
|
|
3162
3174
|
let terminalLogProjectionRetries = 0;
|
|
3163
|
-
while (!_optionalChain([signal, 'optionalAccess',
|
|
3175
|
+
while (!_optionalChain([signal, 'optionalAccess', _123 => _123.aborted])) {
|
|
3164
3176
|
const pollStartedAt = Date.now();
|
|
3165
3177
|
const poll = ++pollCount;
|
|
3166
|
-
const
|
|
3178
|
+
const watchedMs = pollStartedAt - watchStartedAt;
|
|
3179
|
+
const pastStartup = watchedMs >= RUN_WATCH_STARTUP_WINDOW_MS;
|
|
3180
|
+
const pastInteractive = watchedMs >= RUN_WATCH_INTERACTIVE_WINDOW_MS;
|
|
3167
3181
|
const serverWaitMs = options.pollIntervalMs === void 0 && options.deferLogs && (pastStartup || RUN_WATCH_SERVER_WAIT_FROM_START) && RUN_WATCH_SERVER_WAIT_MS > 0 ? RUN_WATCH_SERVER_WAIT_MS : 0;
|
|
3168
|
-
const pollIntervalMs = _nullishCoalesce(options.pollIntervalMs, () => ( (serverWaitMs > 0 ? 0 :
|
|
3182
|
+
const pollIntervalMs = _nullishCoalesce(options.pollIntervalMs, () => ( (serverWaitMs > 0 ? 0 : pastInteractive ? RUN_WATCH_POLL_INTERVAL_MS : pastStartup ? RUN_WATCH_INTERACTIVE_POLL_INTERVAL_MS : RUN_WATCH_STARTUP_POLL_INTERVAL_MS)));
|
|
3169
3183
|
let snapshot;
|
|
3170
3184
|
let terminalStatus;
|
|
3171
3185
|
let responseStatus;
|
|
@@ -3209,7 +3223,7 @@ async function* watchRunEvents(options) {
|
|
|
3209
3223
|
reportPoll();
|
|
3210
3224
|
} catch (error) {
|
|
3211
3225
|
reportPoll();
|
|
3212
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
3226
|
+
if (_optionalChain([signal, 'optionalAccess', _124 => _124.aborted])) {
|
|
3213
3227
|
return;
|
|
3214
3228
|
}
|
|
3215
3229
|
if (!isTransientPlayRunReadError(error)) {
|
|
@@ -3218,12 +3232,12 @@ async function* watchRunEvents(options) {
|
|
|
3218
3232
|
consecutiveFailures += 1;
|
|
3219
3233
|
const reason = error instanceof Error ? error.message : String(error);
|
|
3220
3234
|
if (!outageNoticeSent) {
|
|
3221
|
-
_optionalChain([options, 'access',
|
|
3235
|
+
_optionalChain([options, 'access', _125 => _125.onRetry, 'optionalCall', _126 => _126({
|
|
3222
3236
|
attempt: consecutiveFailures,
|
|
3223
3237
|
delayMs: pollIntervalMs,
|
|
3224
3238
|
reason
|
|
3225
3239
|
})]);
|
|
3226
|
-
_optionalChain([options, 'access',
|
|
3240
|
+
_optionalChain([options, 'access', _127 => _127.onNotice, 'optionalCall', _128 => _128(
|
|
3227
3241
|
`[watch] run snapshot request failed; retrying snapshot polling (${reason})`
|
|
3228
3242
|
)]);
|
|
3229
3243
|
outageNoticeSent = true;
|
|
@@ -3238,7 +3252,7 @@ async function* watchRunEvents(options) {
|
|
|
3238
3252
|
continue;
|
|
3239
3253
|
}
|
|
3240
3254
|
if (outageNoticeSent) {
|
|
3241
|
-
_optionalChain([options, 'access',
|
|
3255
|
+
_optionalChain([options, 'access', _129 => _129.onNotice, 'optionalCall', _130 => _130("[watch] run snapshot polling recovered")]);
|
|
3242
3256
|
outageNoticeSent = false;
|
|
3243
3257
|
}
|
|
3244
3258
|
consecutiveFailures = 0;
|
|
@@ -3253,14 +3267,14 @@ async function* watchRunEvents(options) {
|
|
|
3253
3267
|
if (!await waitForNextPoll(remaining2, signal)) return;
|
|
3254
3268
|
continue;
|
|
3255
3269
|
}
|
|
3256
|
-
_optionalChain([options, 'access',
|
|
3270
|
+
_optionalChain([options, 'access', _131 => _131.onNotice, 'optionalCall', _132 => _132(
|
|
3257
3271
|
`[watch] terminal status is complete, but final logs are unavailable in this watch; fetch retained logs with deepline runs logs ${runId}`
|
|
3258
3272
|
)]);
|
|
3259
3273
|
} else {
|
|
3260
3274
|
terminalLogProjectionRetries = 0;
|
|
3261
3275
|
}
|
|
3262
3276
|
if (terminalStatus) {
|
|
3263
|
-
await _optionalChain([options, 'access',
|
|
3277
|
+
await _optionalChain([options, 'access', _133 => _133.terminalStatus, 'optionalAccess', _134 => _134.onStatus, 'call', _135 => _135(terminalStatus, snapshot.status)]);
|
|
3264
3278
|
}
|
|
3265
3279
|
const diff = diffPlayRunStreamEvents({
|
|
3266
3280
|
streamId,
|
|
@@ -3324,7 +3338,7 @@ function parseNotificationGroupTarget(value) {
|
|
|
3324
3338
|
}
|
|
3325
3339
|
return { kind: "email", email };
|
|
3326
3340
|
}
|
|
3327
|
-
const slack = _optionalChain([/^slack:(.+)$/i, 'access',
|
|
3341
|
+
const slack = _optionalChain([/^slack:(.+)$/i, 'access', _136 => _136.exec, 'call', _137 => _137(normalized), 'optionalAccess', _138 => _138[1], 'optionalAccess', _139 => _139.trim, 'call', _140 => _140()]);
|
|
3328
3342
|
if (!slack) {
|
|
3329
3343
|
const provider = normalized.split(":", 1)[0] || normalized;
|
|
3330
3344
|
throw new Error(
|
|
@@ -3332,7 +3346,7 @@ function parseNotificationGroupTarget(value) {
|
|
|
3332
3346
|
);
|
|
3333
3347
|
}
|
|
3334
3348
|
const member = /^member:([UW][A-Z0-9]{8,})$/i.exec(slack);
|
|
3335
|
-
if (_optionalChain([member, 'optionalAccess',
|
|
3349
|
+
if (_optionalChain([member, 'optionalAccess', _141 => _141[1]])) {
|
|
3336
3350
|
return { kind: "slack", memberId: member[1].toUpperCase() };
|
|
3337
3351
|
}
|
|
3338
3352
|
if (slack.toLowerCase().startsWith("member:")) {
|
|
@@ -3357,11 +3371,11 @@ var REGISTER_PLAY_ARTIFACTS_COMPILE_CONCURRENCY = 3;
|
|
|
3357
3371
|
var REGISTER_PLAY_ARTIFACTS_MAX_BATCH_COUNT = 3;
|
|
3358
3372
|
var REGISTER_PLAY_ARTIFACTS_MAX_BATCH_BYTES = 25e5;
|
|
3359
3373
|
function isolatedCiRuntimeEventReadHeaders(env) {
|
|
3360
|
-
const schema = _optionalChain([env, 'access',
|
|
3361
|
-
if (_optionalChain([env, 'access',
|
|
3374
|
+
const schema = _optionalChain([env, 'access', _142 => _142.DEEPLINE_RUNTIME_SCHEDULER_SCHEMA, 'optionalAccess', _143 => _143.trim, 'call', _144 => _144()]);
|
|
3375
|
+
if (_optionalChain([env, 'access', _145 => _145.DEEPLINE_SYNTHETIC_RUN, 'optionalAccess', _146 => _146.trim, 'call', _147 => _147()]) !== "1" || !schema || !/^fly_absurd_pr_\d+_\d+(?:_\d+)?$/.test(schema)) {
|
|
3362
3376
|
return void 0;
|
|
3363
3377
|
}
|
|
3364
|
-
const token = _optionalChain([env, 'access',
|
|
3378
|
+
const token = _optionalChain([env, 'access', _148 => _148.DEEPLINE_INTERNAL_TOKEN, 'optionalAccess', _149 => _149.trim, 'call', _150 => _150()]);
|
|
3365
3379
|
if (!token) {
|
|
3366
3380
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
3367
3381
|
"DEEPLINE_INTERNAL_TOKEN is required for isolated CI runtime event reads.",
|
|
@@ -3369,7 +3383,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3369
3383
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3370
3384
|
);
|
|
3371
3385
|
}
|
|
3372
|
-
return { [
|
|
3386
|
+
return { [_chunkSAJWYN4Bjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3373
3387
|
}
|
|
3374
3388
|
function sleep(ms) {
|
|
3375
3389
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -3384,7 +3398,7 @@ function isTransientCompileManifestError(error) {
|
|
|
3384
3398
|
);
|
|
3385
3399
|
}
|
|
3386
3400
|
function requireCompileManifestResponse(response, playName) {
|
|
3387
|
-
const compilerManifest = _optionalChain([response, 'optionalAccess',
|
|
3401
|
+
const compilerManifest = _optionalChain([response, 'optionalAccess', _151 => _151.compilerManifest]);
|
|
3388
3402
|
if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
|
|
3389
3403
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
3390
3404
|
`Compile manifest response did not include compilerManifest for ${playName}.`,
|
|
@@ -3436,7 +3450,7 @@ function chunkRegisterPlayArtifacts(artifacts) {
|
|
|
3436
3450
|
}
|
|
3437
3451
|
function searchParams(options) {
|
|
3438
3452
|
const params = new URLSearchParams();
|
|
3439
|
-
params.set("q", _nullishCoalesce(_optionalChain([options, 'access',
|
|
3453
|
+
params.set("q", _nullishCoalesce(_optionalChain([options, 'access', _152 => _152.query, 'optionalAccess', _153 => _153.trim, 'call', _154 => _154()]), () => ( "")));
|
|
3440
3454
|
params.set(
|
|
3441
3455
|
"include_search_debug",
|
|
3442
3456
|
options.includeSearchDebug ? "true" : "false"
|
|
@@ -3446,13 +3460,13 @@ function searchParams(options) {
|
|
|
3446
3460
|
if (options.offset !== void 0) {
|
|
3447
3461
|
params.set("offset", String(options.offset));
|
|
3448
3462
|
}
|
|
3449
|
-
if (_optionalChain([options, 'access',
|
|
3463
|
+
if (_optionalChain([options, 'access', _155 => _155.categories, 'optionalAccess', _156 => _156.trim, 'call', _157 => _157()])) {
|
|
3450
3464
|
params.set("categories", options.categories.trim());
|
|
3451
3465
|
}
|
|
3452
|
-
if (_optionalChain([options, 'access',
|
|
3466
|
+
if (_optionalChain([options, 'access', _158 => _158.searchTerms, 'optionalAccess', _159 => _159.trim, 'call', _160 => _160()])) {
|
|
3453
3467
|
params.set("search_terms", options.searchTerms.trim());
|
|
3454
3468
|
}
|
|
3455
|
-
if (_optionalChain([options, 'access',
|
|
3469
|
+
if (_optionalChain([options, 'access', _161 => _161.task, 'optionalAccess', _162 => _162.trim, 'call', _163 => _163()])) params.set("task", options.task.trim());
|
|
3456
3470
|
return params;
|
|
3457
3471
|
}
|
|
3458
3472
|
var RUNS_FAILED_LOG_LIMIT = 20;
|
|
@@ -3576,9 +3590,9 @@ function playRunResultFromStatus(status, startedAt, fallbackRunId) {
|
|
|
3576
3590
|
runId: status.runId || fallbackRunId,
|
|
3577
3591
|
result: _nullishCoalesce(status.package, () => ( status.result)),
|
|
3578
3592
|
...status.package ? { package: status.package } : {},
|
|
3579
|
-
logs: _nullishCoalesce(_optionalChain([status, 'access',
|
|
3593
|
+
logs: _nullishCoalesce(_optionalChain([status, 'access', _164 => _164.progress, 'optionalAccess', _165 => _165.logs]), () => ( [])),
|
|
3580
3594
|
durationMs: Date.now() - startedAt,
|
|
3581
|
-
error: _nullishCoalesce(_optionalChain([status, 'access',
|
|
3595
|
+
error: _nullishCoalesce(_optionalChain([status, 'access', _166 => _166.progress, 'optionalAccess', _167 => _167.error]), () => ( (status.status !== "completed" ? status.status : void 0)))
|
|
3582
3596
|
};
|
|
3583
3597
|
}
|
|
3584
3598
|
var DeeplineClient = (_class = class _DeeplineClient {
|
|
@@ -3690,7 +3704,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3690
3704
|
{},
|
|
3691
3705
|
{
|
|
3692
3706
|
"Idempotency-Key": requireBillingIdempotencyKey(
|
|
3693
|
-
_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3707
|
+
_nullishCoalesce(_optionalChain([options, 'optionalAccess', _168 => _168.idempotencyKey]), () => ( globalThis.crypto.randomUUID()))
|
|
3694
3708
|
)
|
|
3695
3709
|
}
|
|
3696
3710
|
),
|
|
@@ -3699,10 +3713,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3699
3713
|
cards: {
|
|
3700
3714
|
list: (options) => {
|
|
3701
3715
|
const query = new URLSearchParams();
|
|
3702
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3716
|
+
if (_optionalChain([options, 'optionalAccess', _169 => _169.limit]) !== void 0) {
|
|
3703
3717
|
query.set("limit", String(options.limit));
|
|
3704
3718
|
}
|
|
3705
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3719
|
+
if (_optionalChain([options, 'optionalAccess', _170 => _170.cursor])) query.set("cursor", options.cursor);
|
|
3706
3720
|
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
3707
3721
|
return this.http.get(
|
|
3708
3722
|
`/api/v2/billing/payment-methods${suffix}`
|
|
@@ -3710,7 +3724,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3710
3724
|
},
|
|
3711
3725
|
add: (options) => this.http.post(
|
|
3712
3726
|
"/api/v2/billing/payment-method/setup",
|
|
3713
|
-
{ make_default: _optionalChain([options, 'optionalAccess',
|
|
3727
|
+
{ make_default: _optionalChain([options, 'optionalAccess', _171 => _171.makeDefault]) === true }
|
|
3714
3728
|
),
|
|
3715
3729
|
setDefault: (options) => this.http.post(
|
|
3716
3730
|
"/api/v2/billing/payment-methods/default",
|
|
@@ -3734,7 +3748,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3734
3748
|
};
|
|
3735
3749
|
this.workspaces = {
|
|
3736
3750
|
members: (options) => {
|
|
3737
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
3751
|
+
const query = _optionalChain([options, 'optionalAccess', _172 => _172.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
3738
3752
|
return this.http.get(`/api/v2/auth/workspace/members${query}`);
|
|
3739
3753
|
},
|
|
3740
3754
|
setMemberGrants: (memberId, grants) => this.http.patch(
|
|
@@ -3786,7 +3800,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3786
3800
|
check: (definition) => this.checkMonitor(definition),
|
|
3787
3801
|
preview: (definition, options) => this.previewMonitor(definition, options),
|
|
3788
3802
|
deploy: (definition, options) => this.deployMonitor(definition, options),
|
|
3789
|
-
sync: (definition, options) => _optionalChain([options, 'optionalAccess',
|
|
3803
|
+
sync: (definition, options) => _optionalChain([options, 'optionalAccess', _173 => _173.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options),
|
|
3790
3804
|
list: (options) => this.listMonitors(options),
|
|
3791
3805
|
ledger: (options) => this.listMonitorLedger(options),
|
|
3792
3806
|
ledgerGet: (key) => this.getMonitorLedgerEntry(key),
|
|
@@ -3798,13 +3812,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3798
3812
|
update: (key, patch) => this.updateMonitor(key, patch),
|
|
3799
3813
|
delete: (key, options) => this.deleteMonitor(key, options),
|
|
3800
3814
|
reactivate: (key, options) => this.reactivateMonitor(key, options),
|
|
3801
|
-
start: (key, options) => _optionalChain([options, 'optionalAccess',
|
|
3815
|
+
start: (key, options) => _optionalChain([options, 'optionalAccess', _174 => _174.dryRun]) ? this.submitMonitorBatch({
|
|
3802
3816
|
kind: "reactivate",
|
|
3803
3817
|
scope: { kind: "keys", monitorKeys: [key] },
|
|
3804
3818
|
dryRun: true,
|
|
3805
3819
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( this.monitorJobIdempotencyKey(`start-${key}`)))
|
|
3806
3820
|
}) : this.submitScalarMonitorLifecycle(key, "start", options),
|
|
3807
|
-
stop: (key, options) => _optionalChain([options, 'optionalAccess',
|
|
3821
|
+
stop: (key, options) => _optionalChain([options, 'optionalAccess', _175 => _175.dryRun]) ? this.submitMonitorBatch({
|
|
3808
3822
|
kind: "deactivate",
|
|
3809
3823
|
scope: { kind: "keys", monitorKeys: [key] },
|
|
3810
3824
|
dryRun: true,
|
|
@@ -3858,8 +3872,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3858
3872
|
/** List this workspace's views, most recently changed first. */
|
|
3859
3873
|
async listViews(input) {
|
|
3860
3874
|
const params = new URLSearchParams();
|
|
3861
|
-
if (_optionalChain([input, 'optionalAccess',
|
|
3862
|
-
if (_optionalChain([input, 'optionalAccess',
|
|
3875
|
+
if (_optionalChain([input, 'optionalAccess', _176 => _176.cursor])) params.set("cursor", input.cursor);
|
|
3876
|
+
if (_optionalChain([input, 'optionalAccess', _177 => _177.limit])) params.set("limit", String(input.limit));
|
|
3863
3877
|
const query = params.size > 0 ? `?${params}` : "";
|
|
3864
3878
|
return await this.http.get(`/api/v2/views${query}`);
|
|
3865
3879
|
}
|
|
@@ -3914,8 +3928,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3914
3928
|
/** Every run of the view's Play, newest first. */
|
|
3915
3929
|
async listViewRuns(id, input) {
|
|
3916
3930
|
const params = new URLSearchParams();
|
|
3917
|
-
if (_optionalChain([input, 'optionalAccess',
|
|
3918
|
-
if (_optionalChain([input, 'optionalAccess',
|
|
3931
|
+
if (_optionalChain([input, 'optionalAccess', _178 => _178.limit])) params.set("limit", String(input.limit));
|
|
3932
|
+
if (_optionalChain([input, 'optionalAccess', _179 => _179.offset])) params.set("offset", String(input.offset));
|
|
3919
3933
|
const query = params.size > 0 ? `?${params}` : "";
|
|
3920
3934
|
return await this.http.get(
|
|
3921
3935
|
`/api/v2/views/${encodeURIComponent(id)}/runs${query}`
|
|
@@ -4003,17 +4017,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4003
4017
|
*/
|
|
4004
4018
|
async listTools(options) {
|
|
4005
4019
|
const params = new URLSearchParams();
|
|
4006
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4020
|
+
if (_optionalChain([options, 'optionalAccess', _180 => _180.categories, 'optionalAccess', _181 => _181.trim, 'call', _182 => _182()])) {
|
|
4007
4021
|
params.set("categories", options.categories.trim());
|
|
4008
4022
|
}
|
|
4009
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4023
|
+
if (_optionalChain([options, 'optionalAccess', _183 => _183.tags, 'optionalAccess', _184 => _184.trim, 'call', _185 => _185()])) {
|
|
4010
4024
|
params.set("tags", options.tags.trim());
|
|
4011
4025
|
}
|
|
4012
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4026
|
+
if (_optionalChain([options, 'optionalAccess', _186 => _186.grep, 'optionalAccess', _187 => _187.trim, 'call', _188 => _188()])) {
|
|
4013
4027
|
params.set("grep", options.grep.trim());
|
|
4014
4028
|
params.set("grep_mode", _nullishCoalesce(options.grepMode, () => ( "all")));
|
|
4015
4029
|
}
|
|
4016
|
-
params.set("compact", _optionalChain([options, 'optionalAccess',
|
|
4030
|
+
params.set("compact", _optionalChain([options, 'optionalAccess', _189 => _189.compact]) === true ? "true" : "false");
|
|
4017
4031
|
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
4018
4032
|
const res = await this.http.get(
|
|
4019
4033
|
`/api/v2/tools${suffix}`
|
|
@@ -4046,7 +4060,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4046
4060
|
const params = new URLSearchParams({
|
|
4047
4061
|
view: "category",
|
|
4048
4062
|
categories: normalizedCategory,
|
|
4049
|
-
compact: _optionalChain([options, 'optionalAccess',
|
|
4063
|
+
compact: _optionalChain([options, 'optionalAccess', _190 => _190.compact]) === true ? "true" : "false"
|
|
4050
4064
|
});
|
|
4051
4065
|
const response = await this.http.get(
|
|
4052
4066
|
`/api/v2/tools?${params}`
|
|
@@ -4061,7 +4075,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4061
4075
|
}
|
|
4062
4076
|
/** List discoverable providers without requiring a local plugin catalog. */
|
|
4063
4077
|
async listProviders(options) {
|
|
4064
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
4078
|
+
const suffix = _optionalChain([options, 'optionalAccess', _191 => _191.changed]) ? "?changed=true" : "";
|
|
4065
4079
|
const res = await this.http.get(
|
|
4066
4080
|
`/api/v2/tools/providers${suffix}`
|
|
4067
4081
|
);
|
|
@@ -4092,8 +4106,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4092
4106
|
*/
|
|
4093
4107
|
async search(options = {}) {
|
|
4094
4108
|
const params = searchParams(options);
|
|
4095
|
-
if (_optionalChain([options, 'access',
|
|
4096
|
-
if (_optionalChain([options, 'access',
|
|
4109
|
+
if (_optionalChain([options, 'access', _192 => _192.types, 'optionalAccess', _193 => _193.length])) params.set("types", options.types.join(","));
|
|
4110
|
+
if (_optionalChain([options, 'access', _194 => _194.exclude, 'optionalAccess', _195 => _195.length])) {
|
|
4097
4111
|
params.set("exclude", options.exclude.join(","));
|
|
4098
4112
|
}
|
|
4099
4113
|
return this.http.get(`/api/v2/search?${params.toString()}`);
|
|
@@ -4115,7 +4129,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4115
4129
|
* ```
|
|
4116
4130
|
*/
|
|
4117
4131
|
async getTool(toolId, options) {
|
|
4118
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4132
|
+
if (_optionalChain([options, 'optionalAccess', _196 => _196.cliInvocationId]) !== void 0) {
|
|
4119
4133
|
validateCliInvocationId(options.cliInvocationId);
|
|
4120
4134
|
}
|
|
4121
4135
|
return this.http.request(
|
|
@@ -4128,7 +4142,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4128
4142
|
retryApiErrors: true,
|
|
4129
4143
|
headers: {
|
|
4130
4144
|
"x-deepline-tool-meta-only": "1",
|
|
4131
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4145
|
+
..._optionalChain([options, 'optionalAccess', _197 => _197.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
|
|
4132
4146
|
}
|
|
4133
4147
|
}
|
|
4134
4148
|
);
|
|
@@ -4219,7 +4233,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4219
4233
|
return this.http.post(
|
|
4220
4234
|
"/api/v2/ingestion/repair",
|
|
4221
4235
|
{
|
|
4222
|
-
..._optionalChain([input, 'optionalAccess',
|
|
4236
|
+
..._optionalChain([input, 'optionalAccess', _198 => _198.provider]) ? { provider: input.provider } : {}
|
|
4223
4237
|
}
|
|
4224
4238
|
);
|
|
4225
4239
|
}
|
|
@@ -4274,7 +4288,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4274
4288
|
const prepared = await _chunkSL6MYJYMjs.preparePlayRunAdmission.call(void 0,
|
|
4275
4289
|
this.http,
|
|
4276
4290
|
resolved.request,
|
|
4277
|
-
_optionalChain([options, 'optionalAccess',
|
|
4291
|
+
_optionalChain([options, 'optionalAccess', _199 => _199.onSubmission]),
|
|
4278
4292
|
options
|
|
4279
4293
|
);
|
|
4280
4294
|
const bodyJson = JSON.stringify(prepared.body);
|
|
@@ -4282,9 +4296,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4282
4296
|
resolved.runtime,
|
|
4283
4297
|
this.environment
|
|
4284
4298
|
);
|
|
4285
|
-
const headers = _optionalChain([options, 'optionalAccess',
|
|
4299
|
+
const headers = _optionalChain([options, 'optionalAccess', _200 => _200.cliAdmission]) ? {
|
|
4286
4300
|
...runtimeHeaders,
|
|
4287
|
-
"X-Deepline-API-Major": String(
|
|
4301
|
+
"X-Deepline-API-Major": String(_chunkSAJWYN4Bjs.SDK_API_MAJOR)
|
|
4288
4302
|
} : runtimeHeaders;
|
|
4289
4303
|
const http = this.http;
|
|
4290
4304
|
let submitted = false;
|
|
@@ -4299,12 +4313,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4299
4313
|
);
|
|
4300
4314
|
}
|
|
4301
4315
|
if (submitted) {
|
|
4302
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
4316
|
+
if (!_optionalChain([options, 'optionalAccess', _201 => _201.callerIntentV2])) {
|
|
4303
4317
|
await _chunkSL6MYJYMjs.preparePlayRunAdmission.call(void 0,
|
|
4304
4318
|
http,
|
|
4305
4319
|
JSON.parse(bodyJson),
|
|
4306
4320
|
void 0,
|
|
4307
|
-
{ signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4321
|
+
{ signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _202 => _202.signal]), () => ( _optionalChain([options, 'optionalAccess', _203 => _203.signal]))) }
|
|
4308
4322
|
);
|
|
4309
4323
|
}
|
|
4310
4324
|
}
|
|
@@ -4317,9 +4331,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4317
4331
|
prepared.supportsCallerIntent,
|
|
4318
4332
|
headers,
|
|
4319
4333
|
{
|
|
4320
|
-
cliAdmission: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4321
|
-
callerIntentV2: _optionalChain([options, 'optionalAccess',
|
|
4322
|
-
signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4334
|
+
cliAdmission: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _204 => _204.cliAdmission]), () => ( _optionalChain([options, 'optionalAccess', _205 => _205.cliAdmission]))),
|
|
4335
|
+
callerIntentV2: _optionalChain([options, 'optionalAccess', _206 => _206.callerIntentV2]),
|
|
4336
|
+
signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _207 => _207.signal]), () => ( _optionalChain([options, 'optionalAccess', _208 => _208.signal])))
|
|
4323
4337
|
}
|
|
4324
4338
|
);
|
|
4325
4339
|
} catch (error) {
|
|
@@ -4338,26 +4352,26 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4338
4352
|
);
|
|
4339
4353
|
}
|
|
4340
4354
|
if (submitted) {
|
|
4341
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
4355
|
+
if (!_optionalChain([options, 'optionalAccess', _209 => _209.callerIntentV2])) {
|
|
4342
4356
|
await _chunkSL6MYJYMjs.preparePlayRunAdmission.call(void 0,
|
|
4343
4357
|
http,
|
|
4344
4358
|
JSON.parse(bodyJson),
|
|
4345
4359
|
void 0,
|
|
4346
|
-
{ signal: _optionalChain([streamOptions, 'optionalAccess',
|
|
4360
|
+
{ signal: _optionalChain([streamOptions, 'optionalAccess', _210 => _210.signal]) }
|
|
4347
4361
|
);
|
|
4348
4362
|
}
|
|
4349
4363
|
}
|
|
4350
4364
|
submitted = true;
|
|
4351
|
-
const streamPath = _optionalChain([options, 'optionalAccess',
|
|
4365
|
+
const streamPath = _optionalChain([options, 'optionalAccess', _211 => _211.callerIntentV2]) ? _chunkSL6MYJYMjs.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH : _optionalChain([options, 'optionalAccess', _212 => _212.cliAdmission]) ? _chunkSL6MYJYMjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkSL6MYJYMjs.PLAY_RUN_START_STREAM_PATH;
|
|
4352
4366
|
let cliAdmissionSupported = false;
|
|
4353
4367
|
try {
|
|
4354
4368
|
for await (const event of http.streamSse(streamPath, {
|
|
4355
4369
|
method: "POST",
|
|
4356
4370
|
body: JSON.parse(bodyJson),
|
|
4357
4371
|
headers,
|
|
4358
|
-
signal: _optionalChain([streamOptions, 'optionalAccess',
|
|
4372
|
+
signal: _optionalChain([streamOptions, 'optionalAccess', _213 => _213.signal]),
|
|
4359
4373
|
exactUrlOnly: true,
|
|
4360
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4374
|
+
..._optionalChain([options, 'optionalAccess', _214 => _214.cliAdmission]) ? {
|
|
4361
4375
|
onResponse: (response) => {
|
|
4362
4376
|
cliAdmissionSupported = response.headers.get(_chunkSL6MYJYMjs.CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
|
|
4363
4377
|
}
|
|
@@ -4366,7 +4380,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4366
4380
|
if (event.scope === "play") yield event;
|
|
4367
4381
|
}
|
|
4368
4382
|
} catch (error) {
|
|
4369
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4383
|
+
if (_optionalChain([options, 'optionalAccess', _215 => _215.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkBBTKAASQjs.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
4370
4384
|
if (options.callerIntentV2) {
|
|
4371
4385
|
submitted = false;
|
|
4372
4386
|
throw new (0, _chunkSL6MYJYMjs.CliPlayAdmissionCallerIntentV2UnsupportedError)(
|
|
@@ -4404,7 +4418,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4404
4418
|
*/
|
|
4405
4419
|
async *startPlayRunStream(request, options) {
|
|
4406
4420
|
const prepared = await this.preparePlayRunAdmission(request, options);
|
|
4407
|
-
yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess',
|
|
4421
|
+
yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess', _216 => _216.signal]) });
|
|
4408
4422
|
}
|
|
4409
4423
|
/**
|
|
4410
4424
|
* Register a bundled play artifact.
|
|
@@ -4557,7 +4571,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4557
4571
|
compilerManifest,
|
|
4558
4572
|
...input.input ? { input: input.input } : {},
|
|
4559
4573
|
...input.inputFile ? { inputFile: input.inputFile } : {},
|
|
4560
|
-
..._optionalChain([input, 'access',
|
|
4574
|
+
..._optionalChain([input, 'access', _217 => _217.packagedFiles, 'optionalAccess', _218 => _218.length]) ? { packagedFiles: input.packagedFiles } : {},
|
|
4561
4575
|
...input.force ? { force: true } : {},
|
|
4562
4576
|
...input.forceToolRefresh ? { forceToolRefresh: true } : {}
|
|
4563
4577
|
});
|
|
@@ -4587,29 +4601,29 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4587
4601
|
* ```
|
|
4588
4602
|
*/
|
|
4589
4603
|
async submitPlay(code, csvPath, name, options) {
|
|
4590
|
-
const runtimeInput = _optionalChain([options, 'optionalAccess',
|
|
4604
|
+
const runtimeInput = _optionalChain([options, 'optionalAccess', _219 => _219.input]) ? { ...options.input } : {};
|
|
4591
4605
|
if (csvPath) {
|
|
4592
4606
|
runtimeInput.file = csvPath;
|
|
4593
4607
|
}
|
|
4594
|
-
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4595
|
-
const artifact = _optionalChain([options, 'optionalAccess',
|
|
4596
|
-
if (!_optionalChain([name, 'optionalAccess',
|
|
4608
|
+
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _220 => _220.sourceCode]), () => ( code));
|
|
4609
|
+
const artifact = _optionalChain([options, 'optionalAccess', _221 => _221.artifact]);
|
|
4610
|
+
if (!_optionalChain([name, 'optionalAccess', _222 => _222.trim, 'call', _223 => _223()])) {
|
|
4597
4611
|
throw new Error("submitPlay requires a play name.");
|
|
4598
4612
|
}
|
|
4599
4613
|
if (!artifact) {
|
|
4600
4614
|
throw new Error("submitPlay requires a bundled play artifact.");
|
|
4601
4615
|
}
|
|
4602
|
-
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async
|
|
4616
|
+
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _224 => _224.compilerManifest]), async () => ( await this.compilePlayManifest({
|
|
4603
4617
|
name,
|
|
4604
4618
|
sourceCode,
|
|
4605
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
4619
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _225 => _225.sourceFiles]),
|
|
4606
4620
|
artifact
|
|
4607
4621
|
})));
|
|
4608
4622
|
const registeredArtifact = await this.registerPlayArtifact({
|
|
4609
4623
|
name,
|
|
4610
4624
|
sourceCode,
|
|
4611
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
4612
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
4625
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _226 => _226.sourceFiles]),
|
|
4626
|
+
description: _optionalChain([options, 'optionalAccess', _227 => _227.description]),
|
|
4613
4627
|
artifact,
|
|
4614
4628
|
compilerManifest,
|
|
4615
4629
|
publish: false
|
|
@@ -4623,17 +4637,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4623
4637
|
name,
|
|
4624
4638
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
4625
4639
|
sourceCode,
|
|
4626
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
4640
|
+
description: _optionalChain([options, 'optionalAccess', _228 => _228.description]),
|
|
4627
4641
|
staticPipeline: _nullishCoalesce(registeredArtifact.staticPipeline, () => ( null)),
|
|
4628
4642
|
artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
|
|
4629
4643
|
graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
|
|
4630
4644
|
runtimeArtifact: artifact,
|
|
4631
4645
|
compilerManifest,
|
|
4632
4646
|
...Object.keys(runtimeInput).length > 0 ? { input: runtimeInput } : {},
|
|
4633
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4634
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4635
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4636
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4647
|
+
..._optionalChain([options, 'optionalAccess', _229 => _229.inputFile]) ? { inputFile: options.inputFile } : {},
|
|
4648
|
+
..._optionalChain([options, 'optionalAccess', _230 => _230.packagedFiles, 'optionalAccess', _231 => _231.length]) ? { packagedFiles: options.packagedFiles } : {},
|
|
4649
|
+
..._optionalChain([options, 'optionalAccess', _232 => _232.force]) ? { force: true } : {},
|
|
4650
|
+
..._optionalChain([options, 'optionalAccess', _233 => _233.forceToolRefresh]) ? { forceToolRefresh: true } : {}
|
|
4637
4651
|
});
|
|
4638
4652
|
}
|
|
4639
4653
|
/**
|
|
@@ -4709,13 +4723,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4709
4723
|
for await (const event of watchRunEvents({
|
|
4710
4724
|
http: this.http,
|
|
4711
4725
|
runId: workflowId,
|
|
4712
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4713
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4714
|
-
onRetry: _optionalChain([options, 'optionalAccess',
|
|
4715
|
-
deferLogs: _optionalChain([options, 'optionalAccess',
|
|
4716
|
-
omitTerminalLogs: _optionalChain([options, 'optionalAccess',
|
|
4717
|
-
onPoll: _optionalChain([options, 'optionalAccess',
|
|
4718
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4726
|
+
signal: _optionalChain([options, 'optionalAccess', _234 => _234.signal]),
|
|
4727
|
+
onNotice: _optionalChain([options, 'optionalAccess', _235 => _235.onNotice]),
|
|
4728
|
+
onRetry: _optionalChain([options, 'optionalAccess', _236 => _236.onRetry]),
|
|
4729
|
+
deferLogs: _optionalChain([options, 'optionalAccess', _237 => _237.deferLogs]),
|
|
4730
|
+
omitTerminalLogs: _optionalChain([options, 'optionalAccess', _238 => _238.omitTerminalLogs]),
|
|
4731
|
+
onPoll: _optionalChain([options, 'optionalAccess', _239 => _239.onPoll]),
|
|
4732
|
+
..._optionalChain([options, 'optionalAccess', _240 => _240.terminalStatus]) ? {
|
|
4719
4733
|
terminalStatus: {
|
|
4720
4734
|
...options.terminalStatus,
|
|
4721
4735
|
onStatus: async (raw, expectedStatus) => {
|
|
@@ -4725,7 +4739,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4725
4739
|
`Run watch returned a mismatched terminal status for ${workflowId}.`
|
|
4726
4740
|
);
|
|
4727
4741
|
}
|
|
4728
|
-
await _optionalChain([options, 'access',
|
|
4742
|
+
await _optionalChain([options, 'access', _241 => _241.terminalStatus, 'optionalAccess', _242 => _242.onStatus, 'call', _243 => _243(status)]);
|
|
4729
4743
|
}
|
|
4730
4744
|
}
|
|
4731
4745
|
} : {}
|
|
@@ -4740,12 +4754,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4740
4754
|
* @deprecated Use `watchRunEvents` for ordinary run watching.
|
|
4741
4755
|
*/
|
|
4742
4756
|
async *streamPlayRunEvents(workflowId, options) {
|
|
4743
|
-
const headers = _optionalChain([options, 'optionalAccess',
|
|
4757
|
+
const headers = _optionalChain([options, 'optionalAccess', _244 => _244.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
4744
4758
|
const params = new URLSearchParams();
|
|
4745
|
-
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4759
|
+
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _245 => _245.mode]), () => ( "cli")));
|
|
4746
4760
|
for await (const event of this.http.streamSse(
|
|
4747
4761
|
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
4748
|
-
{ signal: _optionalChain([options, 'optionalAccess',
|
|
4762
|
+
{ signal: _optionalChain([options, 'optionalAccess', _246 => _246.signal]), headers }
|
|
4749
4763
|
)) {
|
|
4750
4764
|
if (event.scope === "play") {
|
|
4751
4765
|
yield event;
|
|
@@ -4761,8 +4775,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4761
4775
|
*/
|
|
4762
4776
|
async *observeRunEvents(runId, options) {
|
|
4763
4777
|
yield* this.watchRunEvents(runId, {
|
|
4764
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4765
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4778
|
+
signal: _optionalChain([options, 'optionalAccess', _247 => _247.signal]),
|
|
4779
|
+
onNotice: _optionalChain([options, 'optionalAccess', _248 => _248.onNotice])
|
|
4766
4780
|
});
|
|
4767
4781
|
}
|
|
4768
4782
|
/** Poll snapshots to terminal status and return the durable package. */
|
|
@@ -4770,9 +4784,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4770
4784
|
let terminalObserved = false;
|
|
4771
4785
|
let terminalStatus = null;
|
|
4772
4786
|
for await (const event of this.watchRunEvents(runId, {
|
|
4773
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4774
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4775
|
-
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4787
|
+
signal: _optionalChain([options, 'optionalAccess', _249 => _249.signal]),
|
|
4788
|
+
onNotice: _optionalChain([options, 'optionalAccess', _250 => _250.onNotice]),
|
|
4789
|
+
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _251 => _251.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _252 => _252.onReconnect]))),
|
|
4776
4790
|
terminalStatus: {
|
|
4777
4791
|
runStatus: true,
|
|
4778
4792
|
onStatus: (status) => {
|
|
@@ -4780,12 +4794,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4780
4794
|
}
|
|
4781
4795
|
}
|
|
4782
4796
|
})) {
|
|
4783
|
-
_optionalChain([options, 'optionalAccess',
|
|
4797
|
+
_optionalChain([options, 'optionalAccess', _253 => _253.onEvent, 'optionalCall', _254 => _254(event)]);
|
|
4784
4798
|
if (_chunkSL6MYJYMjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
|
|
4785
4799
|
terminalObserved = true;
|
|
4786
4800
|
}
|
|
4787
4801
|
}
|
|
4788
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4802
|
+
if (_optionalChain([options, 'optionalAccess', _255 => _255.signal, 'optionalAccess', _256 => _256.aborted])) {
|
|
4789
4803
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
|
|
4790
4804
|
}
|
|
4791
4805
|
const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
|
|
@@ -4865,7 +4879,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4865
4879
|
/** List the org's workflows. `GET /api/v2/workflows`. */
|
|
4866
4880
|
async listWorkflows(options) {
|
|
4867
4881
|
const params = new URLSearchParams();
|
|
4868
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
4882
|
+
if (typeof _optionalChain([options, 'optionalAccess', _257 => _257.limit]) === "number") {
|
|
4869
4883
|
params.set("limit", String(options.limit));
|
|
4870
4884
|
}
|
|
4871
4885
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4918,7 +4932,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4918
4932
|
/** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
|
|
4919
4933
|
async listWorkflowRuns(id, options) {
|
|
4920
4934
|
const params = new URLSearchParams();
|
|
4921
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
4935
|
+
if (typeof _optionalChain([options, 'optionalAccess', _258 => _258.limit]) === "number") {
|
|
4922
4936
|
params.set("limit", String(options.limit));
|
|
4923
4937
|
}
|
|
4924
4938
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4954,16 +4968,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4954
4968
|
*/
|
|
4955
4969
|
async getRunStatus(runId, options) {
|
|
4956
4970
|
const params = new URLSearchParams();
|
|
4957
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4971
|
+
if (_optionalChain([options, 'optionalAccess', _259 => _259.full]) === true) {
|
|
4958
4972
|
params.set("full", "true");
|
|
4959
4973
|
}
|
|
4960
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4974
|
+
if (_optionalChain([options, 'optionalAccess', _260 => _260.configuration]) === true) {
|
|
4961
4975
|
params.append("include", "configuration");
|
|
4962
4976
|
}
|
|
4963
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4977
|
+
if (_optionalChain([options, 'optionalAccess', _261 => _261.performance]) === true) {
|
|
4964
4978
|
params.append("include", "performance");
|
|
4965
4979
|
}
|
|
4966
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4980
|
+
if (_optionalChain([options, 'optionalAccess', _262 => _262.retries]) === true) {
|
|
4967
4981
|
params.append("include", "retries");
|
|
4968
4982
|
}
|
|
4969
4983
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4971,7 +4985,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4971
4985
|
`/api/v2/runs/${encodeURIComponent(runId)}${query}`,
|
|
4972
4986
|
{ headers: { "x-deepline-run-status": "1" } }
|
|
4973
4987
|
);
|
|
4974
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4988
|
+
if (_optionalChain([options, 'optionalAccess', _263 => _263.configuration]) === true && !Object.hasOwn(response, "contract")) {
|
|
4975
4989
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
4976
4990
|
"This server does not support recorded configuration reads.",
|
|
4977
4991
|
void 0,
|
|
@@ -4979,7 +4993,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4979
4993
|
);
|
|
4980
4994
|
}
|
|
4981
4995
|
const status = normalizePlayStatus(response);
|
|
4982
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4996
|
+
if (_optionalChain([options, 'optionalAccess', _264 => _264.failedLogs]) !== true || status.status !== "failed") {
|
|
4983
4997
|
return status;
|
|
4984
4998
|
}
|
|
4985
4999
|
const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
|
|
@@ -5068,7 +5082,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5068
5082
|
/** The same tenant-scoped run history searched by the dashboard and CLI. */
|
|
5069
5083
|
async getRunsHistory(options = {}) {
|
|
5070
5084
|
const params = new URLSearchParams();
|
|
5071
|
-
const search = _optionalChain([options, 'access',
|
|
5085
|
+
const search = _optionalChain([options, 'access', _265 => _265.search, 'optionalAccess', _266 => _266.trim, 'call', _267 => _267()]);
|
|
5072
5086
|
if (search && search.length > 200) {
|
|
5073
5087
|
throw new Error("Run search must be at most 200 characters.");
|
|
5074
5088
|
}
|
|
@@ -5094,16 +5108,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5094
5108
|
}
|
|
5095
5109
|
/** Read one run page without discarding server pagination metadata. */
|
|
5096
5110
|
async listRunsPage(options) {
|
|
5097
|
-
const playName = _optionalChain([options, 'access',
|
|
5111
|
+
const playName = _optionalChain([options, 'access', _268 => _268.play, 'optionalAccess', _269 => _269.trim, 'call', _270 => _270()]);
|
|
5098
5112
|
const params = new URLSearchParams();
|
|
5099
5113
|
if (playName) {
|
|
5100
5114
|
params.set("play", playName);
|
|
5101
5115
|
}
|
|
5102
|
-
const status = _optionalChain([options, 'access',
|
|
5116
|
+
const status = _optionalChain([options, 'access', _271 => _271.status, 'optionalAccess', _272 => _272.trim, 'call', _273 => _273()]);
|
|
5103
5117
|
if (status) {
|
|
5104
5118
|
params.set("status", status);
|
|
5105
5119
|
}
|
|
5106
|
-
const node = _optionalChain([options, 'access',
|
|
5120
|
+
const node = _optionalChain([options, 'access', _274 => _274.node, 'optionalAccess', _275 => _275.trim, 'call', _276 => _276()]);
|
|
5107
5121
|
if (node) {
|
|
5108
5122
|
if (!playName)
|
|
5109
5123
|
throw new Error("runs.list options.node requires options.play.");
|
|
@@ -5113,6 +5127,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5113
5127
|
);
|
|
5114
5128
|
params.set("node", node);
|
|
5115
5129
|
}
|
|
5130
|
+
if (options.steps) {
|
|
5131
|
+
if (!playName)
|
|
5132
|
+
throw new Error("runs.list options.steps requires options.play.");
|
|
5133
|
+
if (node)
|
|
5134
|
+
throw new Error("runs.list options.steps cannot be combined with node.");
|
|
5135
|
+
params.set("steps", "true");
|
|
5136
|
+
}
|
|
5116
5137
|
if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
|
|
5117
5138
|
params.set("limit", String(Math.max(1, Math.floor(options.limit))));
|
|
5118
5139
|
}
|
|
@@ -5177,8 +5198,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5177
5198
|
* A different key starts another rerun.
|
|
5178
5199
|
*/
|
|
5179
5200
|
async rerun(runId, options) {
|
|
5180
|
-
const idempotencyKey = _optionalChain([options, 'optionalAccess',
|
|
5181
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5201
|
+
const idempotencyKey = _optionalChain([options, 'optionalAccess', _277 => _277.idempotencyKey, 'optionalAccess', _278 => _278.trim, 'call', _279 => _279()]);
|
|
5202
|
+
if (_optionalChain([options, 'optionalAccess', _280 => _280.idempotencyKey]) !== void 0 && !idempotencyKey) {
|
|
5182
5203
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
5183
5204
|
"runs.rerun idempotencyKey must not be empty.",
|
|
5184
5205
|
void 0,
|
|
@@ -5187,7 +5208,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5187
5208
|
}
|
|
5188
5209
|
return this.http.post(
|
|
5189
5210
|
`/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
|
|
5190
|
-
_optionalChain([options, 'optionalAccess',
|
|
5211
|
+
_optionalChain([options, 'optionalAccess', _281 => _281.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
|
|
5191
5212
|
{ "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
|
|
5192
5213
|
);
|
|
5193
5214
|
}
|
|
@@ -5214,21 +5235,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5214
5235
|
* ```
|
|
5215
5236
|
*/
|
|
5216
5237
|
async getRunLogs(runId, options) {
|
|
5217
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5238
|
+
if (_optionalChain([options, 'optionalAccess', _282 => _282.all]) === true && options.failed === true) {
|
|
5218
5239
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
5219
5240
|
"runs.logs cannot combine all and failed views.",
|
|
5220
5241
|
void 0,
|
|
5221
5242
|
"INVALID_RUN_LOG_VIEW"
|
|
5222
5243
|
);
|
|
5223
5244
|
}
|
|
5224
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5245
|
+
if (_optionalChain([options, 'optionalAccess', _283 => _283.cursor]) !== void 0 && options.failed === true) {
|
|
5225
5246
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
5226
5247
|
"runs.logs cannot combine failed with cursor.",
|
|
5227
5248
|
void 0,
|
|
5228
5249
|
"INVALID_RUN_LOG_VIEW"
|
|
5229
5250
|
);
|
|
5230
5251
|
}
|
|
5231
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5252
|
+
if (_optionalChain([options, 'optionalAccess', _284 => _284.failed]) === true) {
|
|
5232
5253
|
const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
|
|
5233
5254
|
const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
|
|
5234
5255
|
const page = await this.http.get(
|
|
@@ -5253,18 +5274,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5253
5274
|
...page.logsTruncated ? { logsTruncated: true } : {}
|
|
5254
5275
|
};
|
|
5255
5276
|
}
|
|
5256
|
-
const beforeSequence = _optionalChain([options, 'optionalAccess',
|
|
5257
|
-
const limit = _optionalChain([options, 'optionalAccess',
|
|
5277
|
+
const beforeSequence = _optionalChain([options, 'optionalAccess', _285 => _285.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
|
|
5278
|
+
const limit = _optionalChain([options, 'optionalAccess', _286 => _286.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _287 => _287.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
|
|
5258
5279
|
const fetchPage = (afterSeq2, pageLimit) => this.http.get(
|
|
5259
5280
|
`/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
|
|
5260
5281
|
{ retryApiErrors: true }
|
|
5261
5282
|
);
|
|
5262
5283
|
const probe = await fetchPage(0, 1);
|
|
5263
5284
|
const lastStoredSeq = probe.lastStoredSeq;
|
|
5264
|
-
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access',
|
|
5285
|
+
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _288 => _288.entries, 'access', _289 => _289[0], 'optionalAccess', _290 => _290.seq]), () => ( null));
|
|
5265
5286
|
const upperSeq = beforeSequence === null ? lastStoredSeq : Math.min(beforeSequence - 1, lastStoredSeq);
|
|
5266
5287
|
const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
|
|
5267
|
-
let afterSeq = _optionalChain([options, 'optionalAccess',
|
|
5288
|
+
let afterSeq = _optionalChain([options, 'optionalAccess', _291 => _291.all]) ? 0 : Math.max(0, windowEndSeq - limit);
|
|
5268
5289
|
const entries = [];
|
|
5269
5290
|
while (entries.length < limit && afterSeq < upperSeq) {
|
|
5270
5291
|
const page = await fetchPage(
|
|
@@ -5298,7 +5319,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5298
5319
|
hasMore: olderLinesExist,
|
|
5299
5320
|
nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
|
|
5300
5321
|
entries: entries.map((entry) => entry.line),
|
|
5301
|
-
view: _optionalChain([options, 'optionalAccess',
|
|
5322
|
+
view: _optionalChain([options, 'optionalAccess', _292 => _292.all]) ? "all" : "tail",
|
|
5302
5323
|
...probe.logsTruncated ? { logsTruncated: true } : {}
|
|
5303
5324
|
};
|
|
5304
5325
|
}
|
|
@@ -5474,7 +5495,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5474
5495
|
limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
|
|
5475
5496
|
offset: String(_nullishCoalesce(input.offset, () => ( 0)))
|
|
5476
5497
|
});
|
|
5477
|
-
if (_optionalChain([input, 'access',
|
|
5498
|
+
if (_optionalChain([input, 'access', _293 => _293.runId, 'optionalAccess', _294 => _294.trim, 'call', _295 => _295()])) {
|
|
5478
5499
|
params.set("runId", input.runId.trim());
|
|
5479
5500
|
}
|
|
5480
5501
|
if (input.rowMode === "all" || input.rowMode === "live") {
|
|
@@ -5487,9 +5508,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5487
5508
|
`/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
|
|
5488
5509
|
{ signal: input.signal }
|
|
5489
5510
|
);
|
|
5490
|
-
const requestedRunId = _optionalChain([input, 'access',
|
|
5511
|
+
const requestedRunId = _optionalChain([input, 'access', _296 => _296.runId, 'optionalAccess', _297 => _297.trim, 'call', _298 => _298()]) || "";
|
|
5491
5512
|
if (requestedRunId) {
|
|
5492
|
-
const confirmedRunId = _optionalChain([result, 'access',
|
|
5513
|
+
const confirmedRunId = _optionalChain([result, 'access', _299 => _299.scope, 'optionalAccess', _300 => _300.kind]) === "run" ? result.scope.runId.trim() : "";
|
|
5493
5514
|
const foreignRowRunIds = [
|
|
5494
5515
|
...new Set(
|
|
5495
5516
|
result.rows.map(
|
|
@@ -5497,7 +5518,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5497
5518
|
).filter((runId) => runId && runId !== requestedRunId)
|
|
5498
5519
|
)
|
|
5499
5520
|
];
|
|
5500
|
-
if (_optionalChain([result, 'access',
|
|
5521
|
+
if (_optionalChain([result, 'access', _301 => _301.scope, 'optionalAccess', _302 => _302.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
|
|
5501
5522
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
5502
5523
|
`Run-scoped dataset export was not confirmed for ${requestedRunId}; no rows were returned to the caller. Update Deepline, then retry the same export command. Do not rerun the play.`,
|
|
5503
5524
|
void 0,
|
|
@@ -5526,7 +5547,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5526
5547
|
async stopRun(runId, options) {
|
|
5527
5548
|
return this.http.post(
|
|
5528
5549
|
`/api/v2/runs/${encodeURIComponent(runId)}/stop`,
|
|
5529
|
-
_optionalChain([options, 'optionalAccess',
|
|
5550
|
+
_optionalChain([options, 'optionalAccess', _303 => _303.reason]) ? { reason: options.reason } : {}
|
|
5530
5551
|
);
|
|
5531
5552
|
}
|
|
5532
5553
|
/**
|
|
@@ -5544,11 +5565,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5544
5565
|
* The method clears workspace run-slot state without requiring each run ID.
|
|
5545
5566
|
*/
|
|
5546
5567
|
async stopAllRuns(options) {
|
|
5547
|
-
const dryRun = _optionalChain([options, 'optionalAccess',
|
|
5568
|
+
const dryRun = _optionalChain([options, 'optionalAccess', _304 => _304.dryRun]) === true;
|
|
5548
5569
|
const result = await this.http.post(
|
|
5549
5570
|
"/api/v2/runs/stop-all",
|
|
5550
5571
|
{
|
|
5551
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5572
|
+
..._optionalChain([options, 'optionalAccess', _305 => _305.reason]) ? { reason: options.reason } : {},
|
|
5552
5573
|
...dryRun ? { dryRun: true } : {}
|
|
5553
5574
|
}
|
|
5554
5575
|
);
|
|
@@ -5569,7 +5590,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5569
5590
|
* `origin: "owned"` for org-owned plays.
|
|
5570
5591
|
*/
|
|
5571
5592
|
async listPlays(options) {
|
|
5572
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
5593
|
+
if (!_optionalChain([options, 'optionalAccess', _306 => _306.grep, 'optionalAccess', _307 => _307.trim, 'call', _308 => _308()])) {
|
|
5573
5594
|
return (await this.requestPlaysPage(options, false)).plays;
|
|
5574
5595
|
}
|
|
5575
5596
|
const plays = [];
|
|
@@ -5591,46 +5612,46 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5591
5612
|
}
|
|
5592
5613
|
async requestPlaysPage(options, paginateInventory = true) {
|
|
5593
5614
|
const params = new URLSearchParams();
|
|
5594
|
-
if (paginateInventory && !_optionalChain([options, 'optionalAccess',
|
|
5615
|
+
if (paginateInventory && !_optionalChain([options, 'optionalAccess', _309 => _309.grep, 'optionalAccess', _310 => _310.trim, 'call', _311 => _311()]))
|
|
5595
5616
|
params.set("inventory_paginated", "1");
|
|
5596
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5597
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5598
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5617
|
+
if (_optionalChain([options, 'optionalAccess', _312 => _312.origin])) params.set("origin", options.origin);
|
|
5618
|
+
if (_optionalChain([options, 'optionalAccess', _313 => _313.summaryOnly])) params.set("summary_only", "1");
|
|
5619
|
+
if (_optionalChain([options, 'optionalAccess', _314 => _314.categories])) {
|
|
5599
5620
|
params.set(
|
|
5600
5621
|
"categories",
|
|
5601
5622
|
Array.isArray(options.categories) ? options.categories.join(",") : options.categories
|
|
5602
5623
|
);
|
|
5603
5624
|
}
|
|
5604
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5625
|
+
if (_optionalChain([options, 'optionalAccess', _315 => _315.categories]) || _optionalChain([options, 'optionalAccess', _316 => _316.includeToolCategories])) {
|
|
5605
5626
|
params.set("include_tool_categories", "1");
|
|
5606
5627
|
}
|
|
5607
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5628
|
+
if (_optionalChain([options, 'optionalAccess', _317 => _317.tags])) {
|
|
5608
5629
|
params.set(
|
|
5609
5630
|
"tags",
|
|
5610
5631
|
Array.isArray(options.tags) ? options.tags.join(",") : options.tags
|
|
5611
5632
|
);
|
|
5612
5633
|
}
|
|
5613
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5614
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5634
|
+
if (_optionalChain([options, 'optionalAccess', _318 => _318.includeArchived])) params.set("include_archived", "1");
|
|
5635
|
+
if (_optionalChain([options, 'optionalAccess', _319 => _319.includeCostEstimates])) {
|
|
5615
5636
|
params.set("include_cost_estimates", "1");
|
|
5616
5637
|
}
|
|
5617
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5638
|
+
if (_optionalChain([options, 'optionalAccess', _320 => _320.grep, 'optionalAccess', _321 => _321.trim, 'call', _322 => _322()])) {
|
|
5618
5639
|
params.set("grep", options.grep.trim());
|
|
5619
5640
|
params.set("limit", "60");
|
|
5620
5641
|
}
|
|
5621
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5642
|
+
if (_optionalChain([options, 'optionalAccess', _323 => _323.limit]) !== void 0) {
|
|
5622
5643
|
if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
|
|
5623
5644
|
throw new Error("Play page limit must be a positive integer");
|
|
5624
5645
|
}
|
|
5625
5646
|
params.set("limit", String(options.limit));
|
|
5626
5647
|
}
|
|
5627
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5648
|
+
if (_optionalChain([options, 'optionalAccess', _324 => _324.cursor])) params.set("cursor", options.cursor);
|
|
5628
5649
|
const suffix = params.size ? `?${params.toString()}` : "";
|
|
5629
5650
|
const response = await this.http.get(`/api/v2/plays${suffix}`);
|
|
5630
5651
|
return {
|
|
5631
5652
|
plays: _nullishCoalesce(response.plays, () => ( [])),
|
|
5632
|
-
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5633
|
-
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5653
|
+
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _325 => _325.pagination, 'optionalAccess', _326 => _326.cursor]), () => ( response.cursor)), () => ( null)),
|
|
5654
|
+
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _327 => _327.pagination, 'optionalAccess', _328 => _328.hasMore]), () => ( response.hasMore)))
|
|
5634
5655
|
};
|
|
5635
5656
|
}
|
|
5636
5657
|
/** Read definition-level settings, independently of code revisions. */
|
|
@@ -5702,7 +5723,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5702
5723
|
}
|
|
5703
5724
|
async listWorkspaceConnectionInventory(provider, options) {
|
|
5704
5725
|
const params = new URLSearchParams({
|
|
5705
|
-
view: _optionalChain([options, 'optionalAccess',
|
|
5726
|
+
view: _optionalChain([options, 'optionalAccess', _329 => _329.authorizationsOnly]) ? "authorizations" : "inventory"
|
|
5706
5727
|
});
|
|
5707
5728
|
if (provider) params.set("provider", provider);
|
|
5708
5729
|
return this.http.get(`/api/v2/integrations/connections?${params}`);
|
|
@@ -5764,7 +5785,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5764
5785
|
return this.http.post("/api/v2/integrations/connect", {
|
|
5765
5786
|
provider,
|
|
5766
5787
|
credentials,
|
|
5767
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5788
|
+
..._optionalChain([options, 'optionalAccess', _330 => _330.expectedConnectionId]) ? { expected_connection_id: options.expectedConnectionId } : {}
|
|
5768
5789
|
});
|
|
5769
5790
|
}
|
|
5770
5791
|
/** Calendar discovery compatibility method. The managed pilot requires calendar IDs in tool and Play inputs. */
|
|
@@ -5777,7 +5798,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5777
5798
|
}
|
|
5778
5799
|
/** Start provider OAuth and return the URL to open in a browser. */
|
|
5779
5800
|
async startIntegrationOAuth(provider, options = {}) {
|
|
5780
|
-
const scopes = _optionalChain([options, 'access',
|
|
5801
|
+
const scopes = _optionalChain([options, 'access', _331 => _331.scopes, 'optionalAccess', _332 => _332.map, 'call', _333 => _333((scope) => scope.trim()), 'access', _334 => _334.filter, 'call', _335 => _335(Boolean)]);
|
|
5781
5802
|
if (scopes !== void 0 && scopes.length === 0) {
|
|
5782
5803
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
5783
5804
|
}
|
|
@@ -5793,8 +5814,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5793
5814
|
return this.http.post("/api/v2/integrations/connect", {
|
|
5794
5815
|
provider: "slack",
|
|
5795
5816
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
5796
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5797
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5817
|
+
..._optionalChain([options, 'optionalAccess', _336 => _336.successUrl]) ? { success_url: options.successUrl } : {},
|
|
5818
|
+
..._optionalChain([options, 'optionalAccess', _337 => _337.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
5798
5819
|
});
|
|
5799
5820
|
}
|
|
5800
5821
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -5869,7 +5890,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5869
5890
|
}
|
|
5870
5891
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
5871
5892
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
5872
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
5893
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _338 => _338[0], 'optionalAccess', _339 => _339.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
5873
5894
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
5874
5895
|
throw new Error(
|
|
5875
5896
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -5905,7 +5926,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5905
5926
|
const existingGroup = current.configuration.groups.find(
|
|
5906
5927
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
5907
5928
|
);
|
|
5908
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
5929
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _340 => _340.groupKey]), () => ( notificationObjectKey("group")));
|
|
5909
5930
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
5910
5931
|
groupKey,
|
|
5911
5932
|
name,
|
|
@@ -6133,7 +6154,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6133
6154
|
/** Read one trigger inventory page without loading run histories. */
|
|
6134
6155
|
async listPlayTriggerInventory(options) {
|
|
6135
6156
|
const params = new URLSearchParams({ view: "inventory" });
|
|
6136
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6157
|
+
if (_optionalChain([options, 'optionalAccess', _341 => _341.cursor])) params.set("cursor", options.cursor);
|
|
6137
6158
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
6138
6159
|
}
|
|
6139
6160
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -6142,7 +6163,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6142
6163
|
view: "history",
|
|
6143
6164
|
binding_id: bindingId
|
|
6144
6165
|
});
|
|
6145
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6166
|
+
if (_optionalChain([options, 'optionalAccess', _342 => _342.limit]) !== void 0)
|
|
6146
6167
|
params.set("history_limit", String(options.limit));
|
|
6147
6168
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
6148
6169
|
}
|
|
@@ -6330,14 +6351,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6330
6351
|
*/
|
|
6331
6352
|
async runPlay(code, csvPath, name, options) {
|
|
6332
6353
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
6333
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
6334
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
6335
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
6336
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
6337
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
6338
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
6339
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
6340
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
6354
|
+
input: _optionalChain([options, 'optionalAccess', _343 => _343.input]),
|
|
6355
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _344 => _344.sourceCode]),
|
|
6356
|
+
artifact: _optionalChain([options, 'optionalAccess', _345 => _345.artifact]),
|
|
6357
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _346 => _346.compilerManifest]),
|
|
6358
|
+
inputFile: _optionalChain([options, 'optionalAccess', _347 => _347.inputFile]),
|
|
6359
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _348 => _348.packagedFiles]),
|
|
6360
|
+
force: _optionalChain([options, 'optionalAccess', _349 => _349.force]),
|
|
6361
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _350 => _350.forceToolRefresh])
|
|
6341
6362
|
});
|
|
6342
6363
|
const start = Date.now();
|
|
6343
6364
|
const state = {
|
|
@@ -6348,7 +6369,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6348
6369
|
latest: null
|
|
6349
6370
|
};
|
|
6350
6371
|
let terminalObserved = null;
|
|
6351
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6372
|
+
if (_optionalChain([options, 'optionalAccess', _351 => _351.signal, 'optionalAccess', _352 => _352.aborted])) {
|
|
6352
6373
|
await this.cancelPlay(workflowId);
|
|
6353
6374
|
return {
|
|
6354
6375
|
success: false,
|
|
@@ -6359,9 +6380,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6359
6380
|
};
|
|
6360
6381
|
}
|
|
6361
6382
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
6362
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
6383
|
+
signal: _optionalChain([options, 'optionalAccess', _353 => _353.signal])
|
|
6363
6384
|
})) {
|
|
6364
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6385
|
+
if (_optionalChain([options, 'optionalAccess', _354 => _354.signal, 'optionalAccess', _355 => _355.aborted])) {
|
|
6365
6386
|
await this.cancelPlay(workflowId);
|
|
6366
6387
|
return {
|
|
6367
6388
|
success: false,
|
|
@@ -6371,19 +6392,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6371
6392
|
error: "Cancelled by user"
|
|
6372
6393
|
};
|
|
6373
6394
|
}
|
|
6374
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
6395
|
+
const previousStatus = _optionalChain([state, 'access', _356 => _356.latest, 'optionalAccess', _357 => _357.status]);
|
|
6375
6396
|
const status = updatePlayLiveStatusState(state, event);
|
|
6376
6397
|
if (!status) {
|
|
6377
6398
|
continue;
|
|
6378
6399
|
}
|
|
6379
6400
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
6380
|
-
_optionalChain([options, 'optionalAccess',
|
|
6401
|
+
_optionalChain([options, 'optionalAccess', _358 => _358.onProgress, 'optionalCall', _359 => _359(status)]);
|
|
6381
6402
|
}
|
|
6382
6403
|
if (_chunkSL6MYJYMjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
6383
6404
|
terminalObserved = status;
|
|
6384
6405
|
}
|
|
6385
6406
|
}
|
|
6386
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6407
|
+
if (_optionalChain([options, 'optionalAccess', _360 => _360.signal, 'optionalAccess', _361 => _361.aborted])) {
|
|
6387
6408
|
await this.cancelPlay(workflowId);
|
|
6388
6409
|
return {
|
|
6389
6410
|
success: false,
|
|
@@ -6436,7 +6457,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6436
6457
|
const response = await this.http.get(
|
|
6437
6458
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
6438
6459
|
);
|
|
6439
|
-
const event = _optionalChain([response, 'access',
|
|
6460
|
+
const event = _optionalChain([response, 'access', _362 => _362.entries, 'optionalAccess', _363 => _363[0]]);
|
|
6440
6461
|
if (!event) {
|
|
6441
6462
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
6442
6463
|
"No usage event was found for this request_id.",
|
|
@@ -6611,7 +6632,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6611
6632
|
async cancelBillingSubscription(options) {
|
|
6612
6633
|
return this.http.post(
|
|
6613
6634
|
"/api/v2/billing/subscription/cancel",
|
|
6614
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
6635
|
+
{ action: _optionalChain([options, 'optionalAccess', _364 => _364.undo]) ? "undo_cancel" : "cancel" }
|
|
6615
6636
|
);
|
|
6616
6637
|
}
|
|
6617
6638
|
/**
|
|
@@ -6623,7 +6644,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6623
6644
|
*/
|
|
6624
6645
|
async listBillingInvoices(options) {
|
|
6625
6646
|
const params = new URLSearchParams();
|
|
6626
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6647
|
+
if (_optionalChain([options, 'optionalAccess', _365 => _365.limit]) !== void 0) {
|
|
6627
6648
|
params.set("limit", String(options.limit));
|
|
6628
6649
|
}
|
|
6629
6650
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -6634,7 +6655,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6634
6655
|
/** List the reviewed target plans and whether new acquisition is enabled. */
|
|
6635
6656
|
async getTargetBillingPlans(options) {
|
|
6636
6657
|
return this.http.get(
|
|
6637
|
-
_optionalChain([options, 'optionalAccess',
|
|
6658
|
+
_optionalChain([options, 'optionalAccess', _366 => _366.promoCode]) ? `/api/v2/billing/plans?promo_code=${encodeURIComponent(options.promoCode)}` : "/api/v2/billing/plans"
|
|
6638
6659
|
);
|
|
6639
6660
|
}
|
|
6640
6661
|
/** Read the workspace's normalized target plan, payment, and balance state. */
|
|
@@ -6736,7 +6757,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6736
6757
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
6737
6758
|
async createTargetBillingPortalSession(options) {
|
|
6738
6759
|
const response = await this.http.post(
|
|
6739
|
-
_optionalChain([options, 'optionalAccess',
|
|
6760
|
+
_optionalChain([options, 'optionalAccess', _367 => _367.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
6740
6761
|
{}
|
|
6741
6762
|
);
|
|
6742
6763
|
return response.data;
|
|
@@ -6786,8 +6807,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6786
6807
|
return this.http.request("/api/v2/monitors/audit", {
|
|
6787
6808
|
method: "POST",
|
|
6788
6809
|
body: {
|
|
6789
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6790
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6810
|
+
..._optionalChain([options, 'optionalAccess', _368 => _368.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6811
|
+
..._optionalChain([options, 'optionalAccess', _369 => _369.cursor]) ? { cursor: options.cursor } : {}
|
|
6791
6812
|
},
|
|
6792
6813
|
maxRetries: 0
|
|
6793
6814
|
});
|
|
@@ -6797,8 +6818,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6797
6818
|
return this.http.request("/api/v2/monitors/repair", {
|
|
6798
6819
|
method: "POST",
|
|
6799
6820
|
body: {
|
|
6800
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6801
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6821
|
+
..._optionalChain([options, 'optionalAccess', _370 => _370.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6822
|
+
..._optionalChain([options, 'optionalAccess', _371 => _371.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
6802
6823
|
},
|
|
6803
6824
|
maxRetries: 0
|
|
6804
6825
|
});
|
|
@@ -6806,7 +6827,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6806
6827
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
6807
6828
|
async readMonitorsHealth(options) {
|
|
6808
6829
|
const params = new URLSearchParams();
|
|
6809
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6830
|
+
if (_optionalChain([options, 'optionalAccess', _372 => _372.fleetId])) params.set("fleet_id", options.fleetId);
|
|
6810
6831
|
const query = params.toString();
|
|
6811
6832
|
const suffix = query ? `?${query}` : "";
|
|
6812
6833
|
return this.http.request(
|
|
@@ -6879,7 +6900,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6879
6900
|
);
|
|
6880
6901
|
}
|
|
6881
6902
|
const params = new URLSearchParams();
|
|
6882
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6903
|
+
if (_optionalChain([options, 'optionalAccess', _373 => _373.cursor])) params.set("cursor", options.cursor);
|
|
6883
6904
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
6884
6905
|
return this.http.request(
|
|
6885
6906
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -6926,7 +6947,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6926
6947
|
* a second charge. The submission is never replayed automatically.
|
|
6927
6948
|
*/
|
|
6928
6949
|
async previewMonitor(definition, options) {
|
|
6929
|
-
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6950
|
+
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _374 => _374.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _375 => _375.crypto, 'optionalAccess', _376 => _376.randomUUID, 'optionalCall', _377 => _377()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
|
|
6930
6951
|
try {
|
|
6931
6952
|
const result = await this.http.request(
|
|
6932
6953
|
"/api/v2/monitors/preview",
|
|
@@ -6934,7 +6955,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6934
6955
|
method: "POST",
|
|
6935
6956
|
body: {
|
|
6936
6957
|
...definition,
|
|
6937
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6958
|
+
..._optionalChain([options, 'optionalAccess', _378 => _378.limit]) === void 0 ? {} : { limit: options.limit }
|
|
6938
6959
|
},
|
|
6939
6960
|
headers: { "Idempotency-Key": idempotencyKey },
|
|
6940
6961
|
maxRetries: 0,
|
|
@@ -6956,7 +6977,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6956
6977
|
* `client.monitors.deploy(...)`.
|
|
6957
6978
|
*/
|
|
6958
6979
|
async deployMonitor(definition, options) {
|
|
6959
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6980
|
+
if (_optionalChain([options, 'optionalAccess', _379 => _379.dryRun])) {
|
|
6960
6981
|
return this.http.request("/api/v2/monitors/check", {
|
|
6961
6982
|
method: "POST",
|
|
6962
6983
|
body: definition
|
|
@@ -6992,12 +7013,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6992
7013
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
6993
7014
|
async listMonitors(options) {
|
|
6994
7015
|
const params = new URLSearchParams();
|
|
6995
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6996
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
6997
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7016
|
+
if (_optionalChain([options, 'optionalAccess', _380 => _380.state])) params.set("state", options.state);
|
|
7017
|
+
else if (_optionalChain([options, 'optionalAccess', _381 => _381.status])) params.set("status", options.status);
|
|
7018
|
+
if (_optionalChain([options, 'optionalAccess', _382 => _382.limit]) !== void 0)
|
|
6998
7019
|
params.set("limit", String(options.limit));
|
|
6999
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7000
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7020
|
+
if (_optionalChain([options, 'optionalAccess', _383 => _383.cursor])) params.set("cursor", options.cursor);
|
|
7021
|
+
if (_optionalChain([options, 'optionalAccess', _384 => _384.includeConsumers])) params.set("include_consumers", "true");
|
|
7001
7022
|
const query = params.toString();
|
|
7002
7023
|
const suffix = query ? `?${query}` : "";
|
|
7003
7024
|
return this.http.request(
|
|
@@ -7008,17 +7029,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7008
7029
|
/** The Monitors list. Prefer `client.monitors.ledger(...)`. */
|
|
7009
7030
|
async listMonitorLedger(options) {
|
|
7010
7031
|
const params = new URLSearchParams();
|
|
7011
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7012
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7013
|
-
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7032
|
+
if (_optionalChain([options, 'optionalAccess', _385 => _385.search])) params.set("q", options.search);
|
|
7033
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _386 => _386.states]), () => ( []))) params.append("state", state);
|
|
7034
|
+
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _387 => _387.signals]), () => ( [])))
|
|
7014
7035
|
params.append("signal", signal);
|
|
7015
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7016
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7017
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7018
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7019
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7036
|
+
if (_optionalChain([options, 'optionalAccess', _388 => _388.play])) params.set("play", options.play);
|
|
7037
|
+
if (_optionalChain([options, 'optionalAccess', _389 => _389.fleet])) params.set("fleet", options.fleet);
|
|
7038
|
+
if (_optionalChain([options, 'optionalAccess', _390 => _390.sort])) params.set("sort", options.sort);
|
|
7039
|
+
if (_optionalChain([options, 'optionalAccess', _391 => _391.window])) params.set("window", options.window);
|
|
7040
|
+
if (_optionalChain([options, 'optionalAccess', _392 => _392.limit]) !== void 0)
|
|
7020
7041
|
params.set("limit", String(options.limit));
|
|
7021
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7042
|
+
if (_optionalChain([options, 'optionalAccess', _393 => _393.cursor])) params.set("cursor", options.cursor);
|
|
7022
7043
|
const query = params.toString();
|
|
7023
7044
|
const suffix = query ? `?${query}` : "";
|
|
7024
7045
|
return this.http.request(
|
|
@@ -7035,7 +7056,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7035
7056
|
}
|
|
7036
7057
|
/** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
|
|
7037
7058
|
async listMonitorLedgerFindings(key, options) {
|
|
7038
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
7059
|
+
const suffix = _optionalChain([options, 'optionalAccess', _394 => _394.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
7039
7060
|
return this.http.request(
|
|
7040
7061
|
`/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
|
|
7041
7062
|
{ method: "GET" }
|
|
@@ -7049,7 +7070,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7049
7070
|
);
|
|
7050
7071
|
}
|
|
7051
7072
|
async testMonitorWebhook(key, payload, options) {
|
|
7052
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7073
|
+
if (_optionalChain([options, 'optionalAccess', _395 => _395.dispatch]) === true || _optionalChain([options, 'optionalAccess', _396 => _396.validationOnly]) === false) {
|
|
7053
7074
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
7054
7075
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
7055
7076
|
void 0,
|
|
@@ -7104,7 +7125,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7104
7125
|
}
|
|
7105
7126
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
7106
7127
|
async deleteMonitor(key, options) {
|
|
7107
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7128
|
+
if (_optionalChain([options, 'optionalAccess', _397 => _397.localOnly]) === true) {
|
|
7108
7129
|
throw new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
7109
7130
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
7110
7131
|
void 0,
|
|
@@ -7112,11 +7133,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7112
7133
|
);
|
|
7113
7134
|
}
|
|
7114
7135
|
const params = new URLSearchParams();
|
|
7115
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7136
|
+
if (_optionalChain([options, 'optionalAccess', _398 => _398.dryRun])) params.set("dry_run", "true");
|
|
7116
7137
|
const query = params.toString();
|
|
7117
7138
|
return this.http.request(
|
|
7118
7139
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
7119
|
-
_optionalChain([options, 'optionalAccess',
|
|
7140
|
+
_optionalChain([options, 'optionalAccess', _399 => _399.dryRun]) ? { method: "DELETE" } : {
|
|
7120
7141
|
method: "DELETE",
|
|
7121
7142
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
7122
7143
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -7129,10 +7150,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7129
7150
|
* Prefer `client.monitors.reactivate(...)`.
|
|
7130
7151
|
*/
|
|
7131
7152
|
async reactivateMonitor(key, options) {
|
|
7132
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
7153
|
+
const query = _optionalChain([options, 'optionalAccess', _400 => _400.dryRun]) ? "?dry_run=true" : "";
|
|
7133
7154
|
return this.http.request(
|
|
7134
7155
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
7135
|
-
_optionalChain([options, 'optionalAccess',
|
|
7156
|
+
_optionalChain([options, 'optionalAccess', _401 => _401.dryRun]) ? { method: "POST", body: {} } : {
|
|
7136
7157
|
method: "POST",
|
|
7137
7158
|
body: {},
|
|
7138
7159
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -7146,7 +7167,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7146
7167
|
// ——————————————————————————————————————————————————————————
|
|
7147
7168
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
7148
7169
|
monitorJobIdempotencyKey(operation) {
|
|
7149
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
7170
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _402 => _402.crypto, 'optionalAccess', _403 => _403.randomUUID, 'optionalCall', _404 => _404()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
7150
7171
|
const prefix = "monitor-job-";
|
|
7151
7172
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
7152
7173
|
const maxOperationLength = Math.max(
|
|
@@ -7157,7 +7178,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7157
7178
|
}
|
|
7158
7179
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
7159
7180
|
return {
|
|
7160
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7181
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _405 => _405.trim, 'call', _406 => _406()]) || this.monitorJobIdempotencyKey(operation)
|
|
7161
7182
|
};
|
|
7162
7183
|
}
|
|
7163
7184
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -7168,7 +7189,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7168
7189
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
7169
7190
|
headers: this.monitorJobHeaders(
|
|
7170
7191
|
"batch-deploy",
|
|
7171
|
-
_optionalChain([options, 'optionalAccess',
|
|
7192
|
+
_optionalChain([options, 'optionalAccess', _407 => _407.idempotencyKey])
|
|
7172
7193
|
),
|
|
7173
7194
|
maxRetries: 0,
|
|
7174
7195
|
exactUrlOnly: true
|
|
@@ -7187,11 +7208,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7187
7208
|
version: 1,
|
|
7188
7209
|
kind: "batch",
|
|
7189
7210
|
monitors: definitions,
|
|
7190
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7211
|
+
..._optionalChain([options, 'optionalAccess', _408 => _408.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
7191
7212
|
},
|
|
7192
7213
|
headers: this.monitorJobHeaders(
|
|
7193
7214
|
`batch-sync-${batchId}`,
|
|
7194
|
-
_optionalChain([options, 'optionalAccess',
|
|
7215
|
+
_optionalChain([options, 'optionalAccess', _409 => _409.idempotencyKey])
|
|
7195
7216
|
),
|
|
7196
7217
|
maxRetries: 0,
|
|
7197
7218
|
exactUrlOnly: true
|
|
@@ -7206,7 +7227,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7206
7227
|
body: {},
|
|
7207
7228
|
headers: this.monitorJobHeaders(
|
|
7208
7229
|
`batch-start-${batchId}`,
|
|
7209
|
-
_optionalChain([options, 'optionalAccess',
|
|
7230
|
+
_optionalChain([options, 'optionalAccess', _410 => _410.idempotencyKey])
|
|
7210
7231
|
),
|
|
7211
7232
|
maxRetries: 0,
|
|
7212
7233
|
exactUrlOnly: true
|
|
@@ -7221,7 +7242,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7221
7242
|
body: {},
|
|
7222
7243
|
headers: this.monitorJobHeaders(
|
|
7223
7244
|
`batch-stop-${batchId}`,
|
|
7224
|
-
_optionalChain([options, 'optionalAccess',
|
|
7245
|
+
_optionalChain([options, 'optionalAccess', _411 => _411.idempotencyKey])
|
|
7225
7246
|
),
|
|
7226
7247
|
maxRetries: 0,
|
|
7227
7248
|
exactUrlOnly: true
|
|
@@ -7242,7 +7263,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7242
7263
|
body: {},
|
|
7243
7264
|
headers: this.monitorJobHeaders(
|
|
7244
7265
|
`${action}-${monitorKey}`,
|
|
7245
|
-
_optionalChain([options, 'optionalAccess',
|
|
7266
|
+
_optionalChain([options, 'optionalAccess', _412 => _412.idempotencyKey])
|
|
7246
7267
|
),
|
|
7247
7268
|
maxRetries: 0,
|
|
7248
7269
|
exactUrlOnly: true
|
|
@@ -7255,7 +7276,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7255
7276
|
body: definition,
|
|
7256
7277
|
headers: this.monitorJobHeaders(
|
|
7257
7278
|
`sync-${definition.key}`,
|
|
7258
|
-
_optionalChain([options, 'optionalAccess',
|
|
7279
|
+
_optionalChain([options, 'optionalAccess', _413 => _413.idempotencyKey])
|
|
7259
7280
|
),
|
|
7260
7281
|
maxRetries: 0,
|
|
7261
7282
|
exactUrlOnly: true
|
|
@@ -7268,7 +7289,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7268
7289
|
);
|
|
7269
7290
|
}
|
|
7270
7291
|
async getMonitorJobLogs(jobId, options) {
|
|
7271
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
7292
|
+
const query = _optionalChain([options, 'optionalAccess', _414 => _414.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
7272
7293
|
return this.http.request(
|
|
7273
7294
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
7274
7295
|
{ method: "GET" }
|
|
@@ -7281,15 +7302,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7281
7302
|
);
|
|
7282
7303
|
}
|
|
7283
7304
|
async waitForMonitorJob(jobId, options) {
|
|
7284
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7285
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7305
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _415 => _415.timeoutMs]), () => ( 10 * 6e4)));
|
|
7306
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _416 => _416.pollIntervalMs]), () => ( 2e3)));
|
|
7286
7307
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
7287
7308
|
const startedAt = Date.now();
|
|
7288
7309
|
let latest = await this.getMonitorJob(jobId);
|
|
7289
7310
|
while (true) {
|
|
7290
|
-
_optionalChain([options, 'optionalAccess',
|
|
7311
|
+
_optionalChain([options, 'optionalAccess', _417 => _417.onProgress, 'optionalCall', _418 => _418(latest)]);
|
|
7291
7312
|
const job = latest.job;
|
|
7292
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
7313
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _419 => _419.state]) === "string" ? job.state : void 0;
|
|
7293
7314
|
if (state && terminal.has(state)) return latest;
|
|
7294
7315
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
7295
7316
|
await sleep(pollIntervalMs);
|
|
@@ -7300,12 +7321,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7300
7321
|
// Monitor Fleets
|
|
7301
7322
|
// ——————————————————————————————————————————————————————————
|
|
7302
7323
|
monitorFleetIdempotencyKey(operation) {
|
|
7303
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
7324
|
+
const uuid = _optionalChain([globalThis, 'access', _420 => _420.crypto, 'optionalAccess', _421 => _421.randomUUID, 'optionalCall', _422 => _422()]);
|
|
7304
7325
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
7305
7326
|
}
|
|
7306
7327
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
7307
7328
|
return {
|
|
7308
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7329
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _423 => _423.trim, 'call', _424 => _424()]) || this.monitorFleetIdempotencyKey(operation)
|
|
7309
7330
|
};
|
|
7310
7331
|
}
|
|
7311
7332
|
/**
|
|
@@ -7332,9 +7353,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7332
7353
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
7333
7354
|
const body = {
|
|
7334
7355
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
7335
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7336
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7337
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7356
|
+
..._optionalChain([options, 'optionalAccess', _425 => _425.dryRun]) ? { dry_run: true } : {},
|
|
7357
|
+
..._optionalChain([options, 'optionalAccess', _426 => _426.adoptExisting]) ? { adopt_existing: true } : {},
|
|
7358
|
+
..._optionalChain([options, 'optionalAccess', _427 => _427.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
7338
7359
|
};
|
|
7339
7360
|
return this.http.request(
|
|
7340
7361
|
this.monitorFleetPath(fleetId),
|
|
@@ -7342,7 +7363,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7342
7363
|
method: "PUT",
|
|
7343
7364
|
body,
|
|
7344
7365
|
timeout: _DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
|
|
7345
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
7366
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _428 => _428.idempotencyKey])),
|
|
7346
7367
|
maxRetries: 0,
|
|
7347
7368
|
exactUrlOnly: true
|
|
7348
7369
|
}
|
|
@@ -7356,10 +7377,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7356
7377
|
/** The Fleets list. Prefer `client.monitors.fleets.overview()`. */
|
|
7357
7378
|
async listMonitorFleetOverviews(options) {
|
|
7358
7379
|
const params = new URLSearchParams({ view: "overview" });
|
|
7359
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7360
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7361
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7362
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7380
|
+
if (_optionalChain([options, 'optionalAccess', _429 => _429.q])) params.set("q", options.q);
|
|
7381
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _430 => _430.states]), () => ( []))) params.append("state", state);
|
|
7382
|
+
if (_optionalChain([options, 'optionalAccess', _431 => _431.sort])) params.set("sort", options.sort);
|
|
7383
|
+
if (_optionalChain([options, 'optionalAccess', _432 => _432.window])) params.set("window", options.window);
|
|
7363
7384
|
return this.http.request(
|
|
7364
7385
|
`/api/v2/monitors/fleets?${params.toString()}`,
|
|
7365
7386
|
{ method: "GET" }
|
|
@@ -7368,7 +7389,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7368
7389
|
/** One fleet's overview. Prefer `client.monitors.fleets.overview(fleetId)`. */
|
|
7369
7390
|
async getMonitorFleetOverview(fleetId, options) {
|
|
7370
7391
|
const params = new URLSearchParams({ view: "overview" });
|
|
7371
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7392
|
+
if (_optionalChain([options, 'optionalAccess', _433 => _433.window])) params.set("window", options.window);
|
|
7372
7393
|
return this.http.request(
|
|
7373
7394
|
`${this.monitorFleetPath(fleetId)}?${params.toString()}`,
|
|
7374
7395
|
{ method: "GET" }
|
|
@@ -7377,10 +7398,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7377
7398
|
/** A fleet's problem members. Prefer `client.monitors.fleets.issues(...)`. */
|
|
7378
7399
|
async listMonitorFleetIssues(fleetId, options) {
|
|
7379
7400
|
const params = new URLSearchParams();
|
|
7380
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7381
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7382
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7383
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7401
|
+
if (_optionalChain([options, 'optionalAccess', _434 => _434.group])) params.set("group", options.group);
|
|
7402
|
+
if (_optionalChain([options, 'optionalAccess', _435 => _435.cause])) params.set("cause", options.cause);
|
|
7403
|
+
if (_optionalChain([options, 'optionalAccess', _436 => _436.cursor])) params.set("cursor", options.cursor);
|
|
7404
|
+
if (_optionalChain([options, 'optionalAccess', _437 => _437.limit]) !== void 0)
|
|
7384
7405
|
params.set("limit", String(options.limit));
|
|
7385
7406
|
const query = params.toString();
|
|
7386
7407
|
return this.http.request(
|
|
@@ -7390,8 +7411,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7390
7411
|
}
|
|
7391
7412
|
async getMonitorFleet(fleetId, options) {
|
|
7392
7413
|
const params = new URLSearchParams();
|
|
7393
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7394
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7414
|
+
if (_optionalChain([options, 'optionalAccess', _438 => _438.drift])) params.set("drift", "1");
|
|
7415
|
+
if (_optionalChain([options, 'optionalAccess', _439 => _439.limit]) !== void 0)
|
|
7395
7416
|
params.set("limit", String(options.limit));
|
|
7396
7417
|
const query = params.toString();
|
|
7397
7418
|
return this.http.request(
|
|
@@ -7404,11 +7425,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7404
7425
|
this.monitorFleetPath(fleetId),
|
|
7405
7426
|
{
|
|
7406
7427
|
method: "DELETE",
|
|
7407
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
7428
|
+
body: _optionalChain([options, 'optionalAccess', _440 => _440.dryRun]) ? { dry_run: true } : {},
|
|
7408
7429
|
timeout: _DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
|
|
7409
7430
|
headers: this.monitorFleetHeaders(
|
|
7410
7431
|
"deactivate",
|
|
7411
|
-
_optionalChain([options, 'optionalAccess',
|
|
7432
|
+
_optionalChain([options, 'optionalAccess', _441 => _441.idempotencyKey])
|
|
7412
7433
|
),
|
|
7413
7434
|
maxRetries: 0,
|
|
7414
7435
|
exactUrlOnly: true
|
|
@@ -7424,7 +7445,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7424
7445
|
timeout: _DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
|
|
7425
7446
|
headers: this.monitorFleetHeaders(
|
|
7426
7447
|
"reactivate",
|
|
7427
|
-
_optionalChain([options, 'optionalAccess',
|
|
7448
|
+
_optionalChain([options, 'optionalAccess', _442 => _442.idempotencyKey])
|
|
7428
7449
|
),
|
|
7429
7450
|
maxRetries: 0,
|
|
7430
7451
|
exactUrlOnly: true
|
|
@@ -7441,9 +7462,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7441
7462
|
* identical to "the request failed".
|
|
7442
7463
|
*/
|
|
7443
7464
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
7444
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7445
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7446
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
7465
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _443 => _443.timeoutMs]), () => ( 10 * 6e4)));
|
|
7466
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _444 => _444.pollIntervalMs]), () => ( 2e3)));
|
|
7467
|
+
const terminal = _optionalChain([options, 'optionalAccess', _445 => _445.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
|
|
7447
7468
|
"converged",
|
|
7448
7469
|
"degraded",
|
|
7449
7470
|
"deactivated",
|
|
@@ -7452,7 +7473,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7452
7473
|
const startedAt = Date.now();
|
|
7453
7474
|
let latest = await this.getMonitorFleet(fleetId);
|
|
7454
7475
|
while (true) {
|
|
7455
|
-
_optionalChain([options, 'optionalAccess',
|
|
7476
|
+
_optionalChain([options, 'optionalAccess', _446 => _446.onProgress, 'optionalCall', _447 => _447(latest)]);
|
|
7456
7477
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
7457
7478
|
if (status && terminal.has(status)) return latest;
|
|
7458
7479
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|