deepline 0.3.325 → 0.3.326
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.ts +23 -25
- package/dist/bundling-sources/sdk/src/compat.ts +11 -6
- package/dist/bundling-sources/sdk/src/db/query.ts +172 -0
- package/dist/bundling-sources/sdk/src/errors.ts +35 -0
- package/dist/bundling-sources/sdk/src/index.ts +13 -0
- package/dist/bundling-sources/sdk/src/play.ts +34 -31
- package/dist/bundling-sources/sdk/src/plays/authoring-graph-path.ts +13 -0
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +2 -1
- package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +189 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +84 -10
- package/dist/cli/auth-6STWK6UK.js +31 -0
- package/dist/cli/{auth-PIZESRPC.mjs → auth-VON5FFUK.mjs} +4 -4
- package/dist/cli/{billing-HSL6VTCM.mjs → billing-X6JUEFRE.mjs} +4 -4
- package/dist/cli/{billing-DQKFCQV5.js → billing-YI4RZI2O.js} +70 -70
- package/dist/cli/{chunk-UYFWTIKF.js → chunk-3NGWGFVL.js} +26 -26
- package/dist/cli/{chunk-PWV2M4LW.mjs → chunk-4AB4Y6FF.mjs} +1 -1
- package/dist/cli/{chunk-DLW7X2UK.js → chunk-4LNBSQM4.js} +5928 -5730
- package/dist/cli/{chunk-OOPSX57I.js → chunk-5NXHSRRE.js} +6 -6
- package/dist/cli/{chunk-XNL3SEMC.js → chunk-AFNEQ43J.js} +8 -3
- package/dist/cli/{chunk-XSEMQ4II.js → chunk-AGH6YP2T.js} +2 -1
- package/dist/cli/chunk-AID3OYVJ.js +8 -0
- package/dist/cli/{chunk-NWBARG3F.mjs → chunk-BQJVMKWL.mjs} +1 -1
- package/dist/cli/{chunk-YE3O2UHM.mjs → chunk-BR7GGTAE.mjs} +24 -1
- package/dist/cli/{chunk-K7FC5IUU.js → chunk-BUYZEUY4.js} +1 -1
- package/dist/cli/{chunk-QQ2FG5W3.js → chunk-CUUHQ3AO.js} +6 -6
- package/dist/cli/{chunk-H5TJBRSC.mjs → chunk-DFDXKOLR.mjs} +98 -113
- package/dist/cli/{chunk-HPTQEWCF.js → chunk-EMZ7Y5SW.js} +70 -67
- package/dist/cli/chunk-GVESPYSY.mjs +234 -0
- package/dist/cli/{chunk-MNKDSR2J.js → chunk-GVYKY6T6.js} +344 -254
- package/dist/cli/{chunk-6RMKHN7S.mjs → chunk-IQCCGOQH.mjs} +4 -20
- package/dist/cli/{chunk-76VKBPOC.mjs → chunk-JOA6IKDE.mjs} +7 -2
- package/dist/cli/{chunk-XIVUB36F.mjs → chunk-KLWBAQ5A.mjs} +104 -14
- package/dist/cli/{chunk-CV5GDCKN.js → chunk-KZ4PCK4O.js} +29 -45
- package/dist/cli/chunk-LVEDPCLJ.js +234 -0
- package/dist/cli/{chunk-AQUNQJ5Y.mjs → chunk-M7CPVMDB.mjs} +1 -1
- package/dist/cli/{chunk-HUKWYHBG.js → chunk-MDQZQ3NY.js} +2 -2
- package/dist/cli/{chunk-PBNZXZCW.js → chunk-MKHSZA2X.js} +48 -48
- package/dist/cli/{chunk-5TYU3UIS.mjs → chunk-MOBZS4F3.mjs} +1 -1
- package/dist/cli/chunk-OVDNJAJN.mjs +8 -0
- package/dist/cli/{chunk-KZNFYOHX.js → chunk-T33W6JUJ.js} +6 -6
- package/dist/cli/{chunk-6VZDSBK6.mjs → chunk-TDSNAC3C.mjs} +2 -2
- package/dist/cli/{chunk-PVDQ55PS.js → chunk-TXVOB5J2.js} +29 -6
- package/dist/cli/{chunk-YXRPWMGN.js → chunk-TZQMFWLF.js} +147 -162
- package/dist/cli/{chunk-OPERWJR6.mjs → chunk-VGKVLADU.mjs} +3 -3
- package/dist/cli/{chunk-7MD453WV.mjs → chunk-VKXGOQG5.mjs} +5674 -5476
- package/dist/cli/{chunk-WW4XZIVM.mjs → chunk-W74E5ETE.mjs} +12 -9
- package/dist/cli/{chunk-7PZFGB7L.mjs → chunk-YIY74KUF.mjs} +2 -1
- package/dist/cli/{chunk-5FHU7TV4.mjs → chunk-ZRN6YOF2.mjs} +2 -2
- package/dist/cli/client-TEBW2P24.js +20 -0
- package/dist/cli/{client-57SR4KVM.mjs → client-ZMOKUNL2.mjs} +3 -3
- package/dist/cli/{csv-5DJSC6BD.js → csv-HZRKEI7J.js} +12 -12
- package/dist/cli/{csv-G2FRMOXL.mjs → csv-IICJHJZ4.mjs} +3 -3
- package/dist/cli/{db-NVO7P4VO.js → db-TM5NZF73.js} +226 -149
- package/dist/cli/{db-WWZEXM3N.mjs → db-X4B7YFNY.mjs} +214 -137
- package/dist/cli/{describe-M26LHDBQ.js → describe-BDBARWZJ.js} +28 -27
- package/dist/cli/{describe-26OMF3A4.mjs → describe-GMVS3LFC.mjs} +12 -11
- package/dist/cli/{executions-2LLHY3IL.mjs → executions-447ZJMN4.mjs} +4 -4
- package/dist/cli/{executions-KI47LPKE.js → executions-QX25UOQM.js} +6 -6
- package/dist/cli/{feedback-2Y26C2BZ.js → feedback-4IXUTBX7.js} +6 -6
- package/dist/cli/{feedback-O26VL2OF.mjs → feedback-JB7HHIC6.mjs} +3 -3
- package/dist/cli/git-C7C7DTEH.js +23 -0
- package/dist/cli/{git-UVPGZN3K.mjs → git-VID6KGAA.mjs} +4 -4
- package/dist/cli/index.js +105 -87
- package/dist/cli/index.mjs +65 -47
- package/dist/cli/{legacy-noops-H6Y3SEVB.js → legacy-noops-3FYTCOZO.js} +7 -7
- package/dist/cli/{legacy-noops-IK5CH72U.mjs → legacy-noops-SGR3G5WS.mjs} +4 -4
- package/dist/cli/{monitors-SFVVMAJT.mjs → monitors-SH4FOMBM.mjs} +4 -4
- package/dist/cli/{monitors-JL6TTQCI.js → monitors-SP52UHS4.js} +85 -85
- package/dist/cli/{org-SSDONL57.mjs → org-B32MMIQT.mjs} +4 -4
- package/dist/cli/{org-OVMAZCQS.js → org-UQMX7JOR.js} +60 -60
- package/dist/cli/play-UCIWBN7U.js +153 -0
- package/dist/cli/{play-X6NPACUO.mjs → play-XTE4LUP7.mjs} +11 -10
- package/dist/cli/{providers-E24JDWSR.js → providers-JNMJJ2OH.js} +7 -7
- package/dist/cli/{providers-ONUBYYY4.mjs → providers-RWLN6FUR.mjs} +4 -4
- package/dist/cli/{quickstart-TB7C3DLG.js → quickstart-HK6WZ342.js} +5 -5
- package/dist/cli/{quickstart-B7NIXACV.mjs → quickstart-IDB3Y375.mjs} +3 -3
- package/dist/cli/{search-N3QUIATW.mjs → search-6D3IFNPT.mjs} +5 -5
- package/dist/cli/search-LUZ2S7DH.js +26 -0
- package/dist/cli/{secrets-CPCVFDYB.js → secrets-JOQB57IE.js} +13 -13
- package/dist/cli/{secrets-V7Z4M67T.mjs → secrets-TZ53CQ3D.mjs} +4 -4
- package/dist/cli/{sessions-PDOBKAKO.mjs → sessions-4MBDC4EK.mjs} +4 -4
- package/dist/cli/{sessions-E4FIZLQP.js → sessions-QSAICDXX.js} +5 -5
- package/dist/cli/{settings-UVM2WDE4.js → settings-OTOCW7L7.js} +74 -74
- package/dist/cli/{settings-QYHYHZDI.mjs → settings-RKQFMLDU.mjs} +7 -7
- package/dist/cli/{setup-4RLAETDW.mjs → setup-2S5TNTUB.mjs} +6 -6
- package/dist/cli/{setup-3JFAXQLJ.js → setup-AKZUDVYY.js} +41 -41
- package/dist/cli/skills-26LASHZF.js +28 -0
- package/dist/cli/{skills-ZX2JSWOZ.mjs → skills-AGZXDLSA.mjs} +4 -4
- package/dist/cli/{tools-EGXCVIPJ.mjs → tools-7Y6RD6FY.mjs} +8 -7
- package/dist/cli/tools-L5VIJQWX.js +39 -0
- package/dist/cli/{update-7FEKRQFE.mjs → update-M7YGF67I.mjs} +6 -6
- package/dist/cli/update-MNHF6M2F.js +28 -0
- package/dist/cli/{workflow-7V7TTTKK.mjs → workflow-CTVE7S7W.mjs} +5 -5
- package/dist/cli/{workflow-54VCKIG2.js → workflow-NGMY425T.js} +15 -15
- package/dist/{client-Bb4Jjzmj.d.ts → client-DHq8dJ56.d.ts} +39 -11
- package/dist/{client-COa-3GHK.d.mts → client-wiWPZhnI.d.mts} +39 -11
- package/dist/{compiler-manifest-CsnWj-AK.d.mts → compiler-manifest-9TkZ_ykI.d.mts} +711 -711
- package/dist/{compiler-manifest-CsnWj-AK.d.ts → compiler-manifest-9TkZ_ykI.d.ts} +711 -711
- package/dist/index-B-5_Xhud.d.mts +75 -0
- package/dist/index-ykksoEyR.d.ts +75 -0
- package/dist/index.d.mts +52 -13
- package/dist/index.d.ts +52 -13
- package/dist/index.js +92 -28
- package/dist/index.mjs +91 -27
- package/dist/install-integrity.json +91 -84
- package/dist/plays/bundle-play-file.d.mts +7 -75
- package/dist/plays/bundle-play-file.d.ts +7 -75
- package/dist/plays/bundle-play-file.mjs +1 -1
- 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/package.json +1 -1
- package/dist/cli/auth-RXCD4GOV.js +0 -31
- package/dist/cli/chunk-OWJZUE3Y.mjs +0 -103
- package/dist/cli/chunk-SDK3ZA2C.js +0 -103
- package/dist/cli/client-562MULXK.js +0 -20
- package/dist/cli/git-KGPX5YPD.js +0 -23
- package/dist/cli/play-3DB4MSHN.js +0 -152
- package/dist/cli/search-NJ637YGQ.js +0 -26
- package/dist/cli/skills-BYRYG64R.js +0 -28
- package/dist/cli/tools-TAWOAY5X.js +0 -38
- package/dist/cli/update-H24GEBXM.js +0 -28
|
@@ -14,7 +14,8 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
var _chunkTXVOB5J2js = require('./chunk-TXVOB5J2.js');
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
|
|
@@ -81,6 +82,102 @@ function playInputExampleArgs(schema) {
|
|
|
81
82
|
return " --input '@<input.json>'";
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
// src/db/query.ts
|
|
86
|
+
function planCustomerDbQuery(input) {
|
|
87
|
+
if (typeof input.sql !== "string" || !input.sql.trim())
|
|
88
|
+
throw new (0, _chunk7P5AA3SNjs.DeeplineError)("sql must not be empty.", 400, "INVALID_SQL");
|
|
89
|
+
if (input.operationKey !== void 0 && typeof input.operationKey !== "string")
|
|
90
|
+
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
91
|
+
"operationKey must be a string containing 1\u2013512 characters.",
|
|
92
|
+
400,
|
|
93
|
+
"INVALID_OPERATION_KEY"
|
|
94
|
+
);
|
|
95
|
+
const operationKey = input.operationKey;
|
|
96
|
+
if (operationKey !== void 0 && (!operationKey.trim() || operationKey.length > 512)) {
|
|
97
|
+
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
98
|
+
"operationKey must contain 1\u2013512 characters.",
|
|
99
|
+
400,
|
|
100
|
+
"INVALID_OPERATION_KEY"
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
if (input.maxRows !== void 0 && (!Number.isSafeInteger(input.maxRows) || input.maxRows < 1 || input.maxRows > 1e3)) {
|
|
104
|
+
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
105
|
+
"maxRows must be a whole number from 1 to 1000.",
|
|
106
|
+
400,
|
|
107
|
+
"INVALID_MAX_ROWS"
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
request: {
|
|
112
|
+
method: "POST",
|
|
113
|
+
path: "/api/v2/db/query",
|
|
114
|
+
body: {
|
|
115
|
+
sql: input.sql,
|
|
116
|
+
...input.maxRows !== void 0 ? { max_rows: input.maxRows } : {},
|
|
117
|
+
...operationKey !== void 0 ? { operation_key: operationKey } : {}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
effects: {
|
|
121
|
+
cloudMutations: "statement_dependent",
|
|
122
|
+
localWrites: "none",
|
|
123
|
+
creditSpending: "none",
|
|
124
|
+
recovery: operationKey === void 0 ? "unkeyed_unknown_outcome" : "original_operation_key"
|
|
125
|
+
},
|
|
126
|
+
transport: {
|
|
127
|
+
maxRetries: 0,
|
|
128
|
+
urlFailover: "disabled"
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
async function queryCustomerDatabase(http, input) {
|
|
133
|
+
const plan = planCustomerDbQuery(input);
|
|
134
|
+
let result;
|
|
135
|
+
try {
|
|
136
|
+
result = await http.post(
|
|
137
|
+
plan.request.path,
|
|
138
|
+
plan.request.body,
|
|
139
|
+
void 0,
|
|
140
|
+
{
|
|
141
|
+
maxRetries: plan.transport.maxRetries,
|
|
142
|
+
exactUrlOnly: plan.transport.urlFailover === "disabled"
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
} catch (error) {
|
|
146
|
+
if (error instanceof _chunk7P5AA3SNjs.DeeplineError && (_optionalChain([error, 'access', _2 => _2.code, 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
|
|
147
|
+
// lost connections and explicitly unknown transaction resolution.
|
|
148
|
+
/^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
|
|
149
|
+
throw new (0, _chunkTXVOB5J2js.CustomerDbQueryOutcomeUnknownError)(
|
|
150
|
+
error,
|
|
151
|
+
plan.request.body.operation_key
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
throw error;
|
|
155
|
+
}
|
|
156
|
+
if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
|
|
157
|
+
throw new (0, _chunkTXVOB5J2js.CustomerDbQueryOutcomeUnknownError)(
|
|
158
|
+
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
159
|
+
"The SQL response did not contain a valid result.",
|
|
160
|
+
200,
|
|
161
|
+
"CUSTOMER_DB_QUERY_RESPONSE_INVALID"
|
|
162
|
+
),
|
|
163
|
+
plan.request.body.operation_key
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
const operation = result.operation;
|
|
167
|
+
if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
|
|
168
|
+
throw new (0, _chunkTXVOB5J2js.CustomerDbQueryOutcomeUnknownError)(
|
|
169
|
+
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
170
|
+
"The server did not confirm the original atomic SQL operation.",
|
|
171
|
+
200,
|
|
172
|
+
"CUSTOMER_DB_OPERATION_ACK_INVALID"
|
|
173
|
+
),
|
|
174
|
+
input.operationKey,
|
|
175
|
+
{ recoveryAvailable: false }
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
return { ...result, scope: { kind: "database", mutability: "current" } };
|
|
179
|
+
}
|
|
180
|
+
|
|
84
181
|
// ../integration-contracts/opensosdata/execution-policy.ts
|
|
85
182
|
var OPENSOSDATA_LOOKUP_REQUEST_TIMEOUT_MS = 12e4;
|
|
86
183
|
var OPENSOSDATA_POLL_INTERVAL_MS = 3e3;
|
|
@@ -208,7 +305,7 @@ function isRecoverableExecutionAttemptError(error) {
|
|
|
208
305
|
if (error instanceof _chunk7P5AA3SNjs.ToolExecutionError) {
|
|
209
306
|
return error.code === "EXECUTION_IN_PROGRESS" || error.origin === "deepline" && error.category === "network" && error.networkScope === "client_to_deepline";
|
|
210
307
|
}
|
|
211
|
-
return error instanceof _chunk7P5AA3SNjs.DeeplineError && (error.code === "EXECUTION_IN_PROGRESS" || _optionalChain([error, 'access',
|
|
308
|
+
return error instanceof _chunk7P5AA3SNjs.DeeplineError && (error.code === "EXECUTION_IN_PROGRESS" || _optionalChain([error, 'access', _5 => _5.code, 'optionalAccess', _6 => _6.startsWith, 'call', _7 => _7("NETWORK_")]) === true && error.statusCode === void 0);
|
|
212
309
|
}
|
|
213
310
|
function isRecoverableExecutionLookupError(error) {
|
|
214
311
|
if (isRecoverableExecutionAttemptError(error)) return true;
|
|
@@ -317,24 +414,24 @@ var ToolCalls = class {
|
|
|
317
414
|
this.configuredRequestTimeoutMs = configuredRequestTimeoutMs;
|
|
318
415
|
}
|
|
319
416
|
async call(toolId, input, options) {
|
|
320
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
417
|
+
if (_optionalChain([options, 'optionalAccess', _8 => _8.cliInvocationId]) !== void 0) {
|
|
321
418
|
validateCliInvocationId(options.cliInvocationId);
|
|
322
419
|
}
|
|
323
420
|
const inputSnapshot = JSON.parse(JSON.stringify(input));
|
|
324
|
-
const metadataSnapshot = _optionalChain([options, 'optionalAccess',
|
|
325
|
-
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
421
|
+
const metadataSnapshot = _optionalChain([options, 'optionalAccess', _9 => _9.metadata]) ? JSON.parse(JSON.stringify(options.metadata)) : void 0;
|
|
422
|
+
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _10 => _10.idempotencyKey]), () => ( (_optionalChain([options, 'optionalAccess', _11 => _11.recover]) ? crypto.randomUUID() : void 0)));
|
|
326
423
|
if (idempotencyKey !== void 0) {
|
|
327
424
|
validateExecutionIdempotencyKey(idempotencyKey);
|
|
328
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
425
|
+
if (_optionalChain([options, 'optionalAccess', _12 => _12.recoveryTimeoutMs]) !== void 0 && (!Number.isFinite(options.recoveryTimeoutMs) || options.recoveryTimeoutMs < 0)) {
|
|
329
426
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
330
427
|
"recoveryTimeoutMs must be a finite, non-negative number.",
|
|
331
428
|
void 0,
|
|
332
429
|
"IDEMPOTENCY_KEY_INVALID"
|
|
333
430
|
);
|
|
334
431
|
}
|
|
335
|
-
await _optionalChain([options, 'optionalAccess',
|
|
432
|
+
await _optionalChain([options, 'optionalAccess', _13 => _13.onExecution, 'optionalCall', _14 => _14({ idempotencyKey })]);
|
|
336
433
|
}
|
|
337
|
-
const timeoutMs = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
434
|
+
const timeoutMs = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _15 => _15.timeout]), () => ( resolveToolExecuteTimeoutMs(
|
|
338
435
|
toolId,
|
|
339
436
|
inputSnapshot,
|
|
340
437
|
this.configuredRequestTimeoutMs
|
|
@@ -343,7 +440,7 @@ var ToolCalls = class {
|
|
|
343
440
|
await this.lookupExecutionByKey(
|
|
344
441
|
idempotencyKey,
|
|
345
442
|
timeoutMs,
|
|
346
|
-
_optionalChain([options, 'optionalAccess',
|
|
443
|
+
_optionalChain([options, 'optionalAccess', _16 => _16.cliInvocationId])
|
|
347
444
|
);
|
|
348
445
|
}
|
|
349
446
|
const isApifySync = toolId.trim().toLowerCase() === "apify_run_actor_sync";
|
|
@@ -353,11 +450,11 @@ var ToolCalls = class {
|
|
|
353
450
|
[_chunk7P5AA3SNjs.TOOL_EXECUTION_ERROR_SCHEMA_HEADER]: String(
|
|
354
451
|
_chunk7P5AA3SNjs.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
|
|
355
452
|
),
|
|
356
|
-
..._optionalChain([options, 'optionalAccess',
|
|
357
|
-
[EXECUTE_RESPONSE_INTENT_HEADER]: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
453
|
+
..._optionalChain([options, 'optionalAccess', _17 => _17.includeToolMetadata]) ? { [INCLUDE_TOOL_METADATA_HEADER]: "true" } : {},
|
|
454
|
+
[EXECUTE_RESPONSE_INTENT_HEADER]: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _18 => _18.responseIntent]), () => ( "raw")),
|
|
358
455
|
...idempotencyKey ? { "Idempotency-Key": idempotencyKey } : {},
|
|
359
|
-
..._optionalChain([options, 'optionalAccess',
|
|
360
|
-
..._optionalChain([options, 'optionalAccess',
|
|
456
|
+
..._optionalChain([options, 'optionalAccess', _19 => _19.searchRef]) ? { "x-deepline-search-ref": options.searchRef } : {},
|
|
457
|
+
..._optionalChain([options, 'optionalAccess', _20 => _20.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
|
|
361
458
|
};
|
|
362
459
|
const request = (requestTimeoutMs) => this.http.post(
|
|
363
460
|
`/api/v2/integrations/${encodeURIComponent(toolId)}/execute`,
|
|
@@ -368,8 +465,8 @@ var ToolCalls = class {
|
|
|
368
465
|
headers,
|
|
369
466
|
{
|
|
370
467
|
timeout: requestTimeoutMs,
|
|
371
|
-
maxRetries: idempotencyKey ? 0 : _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
372
|
-
retryApiErrors: _optionalChain([options, 'optionalAccess',
|
|
468
|
+
maxRetries: idempotencyKey ? 0 : _nullishCoalesce(_optionalChain([options, 'optionalAccess', _21 => _21.maxRetries]), () => ( 0)),
|
|
469
|
+
retryApiErrors: _optionalChain([options, 'optionalAccess', _22 => _22.retryApiErrors]) === true,
|
|
373
470
|
exactUrlOnly: true,
|
|
374
471
|
toolId,
|
|
375
472
|
idempotencyKey
|
|
@@ -377,7 +474,7 @@ var ToolCalls = class {
|
|
|
377
474
|
);
|
|
378
475
|
let response;
|
|
379
476
|
let recoveryDeadline = null;
|
|
380
|
-
const recoveryTimeoutMs = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
477
|
+
const recoveryTimeoutMs = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _23 => _23.recoveryTimeoutMs]), () => ( DEFAULT_EXECUTION_RECOVERY_TIMEOUT_MS));
|
|
381
478
|
let retryDelayMs = 1e3;
|
|
382
479
|
const recoveryTimeoutError = () => executionRecoveryError({
|
|
383
480
|
toolId,
|
|
@@ -405,7 +502,7 @@ var ToolCalls = class {
|
|
|
405
502
|
this.defaultRequestTimeoutMs,
|
|
406
503
|
remainingMs
|
|
407
504
|
),
|
|
408
|
-
_optionalChain([options, 'optionalAccess',
|
|
505
|
+
_optionalChain([options, 'optionalAccess', _24 => _24.cliInvocationId])
|
|
409
506
|
);
|
|
410
507
|
} catch (error) {
|
|
411
508
|
if (!isRecoverableExecutionLookupError(error)) throw error;
|
|
@@ -1644,10 +1741,10 @@ function getStepStatusSignature(snapshot) {
|
|
|
1644
1741
|
_nullishCoalesce(state.artifactTableNamespace, () => ( "")),
|
|
1645
1742
|
_nullishCoalesce(state.startedAt, () => ( "")),
|
|
1646
1743
|
_nullishCoalesce(state.completedAt, () => ( "")),
|
|
1647
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
1648
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
1744
|
+
_nullishCoalesce(_optionalChain([state, 'access', _25 => _25.progress, 'optionalAccess', _26 => _26.startedAt]), () => ( "")),
|
|
1745
|
+
_nullishCoalesce(_optionalChain([state, 'access', _27 => _27.progress, 'optionalAccess', _28 => _28.completedAt]), () => ( "")),
|
|
1649
1746
|
_nullishCoalesce(state.updatedAt, () => ( "")),
|
|
1650
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
1747
|
+
_nullishCoalesce(_optionalChain([state, 'access', _29 => _29.progress, 'optionalAccess', _30 => _30.updatedAt]), () => ( ""))
|
|
1651
1748
|
].join(":")
|
|
1652
1749
|
).join("|");
|
|
1653
1750
|
}
|
|
@@ -1656,11 +1753,11 @@ function getStepProgressSignature(snapshot) {
|
|
|
1656
1753
|
snapshot.nodeStates.map((state) => [
|
|
1657
1754
|
state.nodeId,
|
|
1658
1755
|
projectPlayStepProgressCounters(_nullishCoalesce(state.progress, () => ( {}))),
|
|
1659
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
1660
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
1661
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
1662
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
1663
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
1756
|
+
_nullishCoalesce(_optionalChain([state, 'access', _31 => _31.progress, 'optionalAccess', _32 => _32.artifactTableNamespace]), () => ( "")),
|
|
1757
|
+
_nullishCoalesce(_optionalChain([state, 'access', _33 => _33.progress, 'optionalAccess', _34 => _34.startedAt]), () => ( "")),
|
|
1758
|
+
_nullishCoalesce(_optionalChain([state, 'access', _35 => _35.progress, 'optionalAccess', _36 => _36.completedAt]), () => ( "")),
|
|
1759
|
+
_nullishCoalesce(_optionalChain([state, 'access', _37 => _37.progress, 'optionalAccess', _38 => _38.updatedAt]), () => ( "")),
|
|
1760
|
+
_nullishCoalesce(_optionalChain([state, 'access', _39 => _39.progress, 'optionalAccess', _40 => _40.message]), () => ( ""))
|
|
1664
1761
|
])
|
|
1665
1762
|
);
|
|
1666
1763
|
}
|
|
@@ -1730,8 +1827,8 @@ function diffPlayRunStreamEvents(input) {
|
|
|
1730
1827
|
if (state.status === "idle") {
|
|
1731
1828
|
continue;
|
|
1732
1829
|
}
|
|
1733
|
-
const persistedStartedAt = _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access',
|
|
1734
|
-
const persistedCompletedAt = _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access',
|
|
1830
|
+
const persistedStartedAt = _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access', _41 => _41.progress, 'optionalAccess', _42 => _42.startedAt]))), () => ( null));
|
|
1831
|
+
const persistedCompletedAt = _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access', _43 => _43.progress, 'optionalAccess', _44 => _44.completedAt]))), () => ( null));
|
|
1735
1832
|
events.push(
|
|
1736
1833
|
makeRunStreamEvent({
|
|
1737
1834
|
cursor,
|
|
@@ -1745,7 +1842,7 @@ function diffPlayRunStreamEvents(input) {
|
|
|
1745
1842
|
...resolveTimingWindow({
|
|
1746
1843
|
startedAt: persistedStartedAt,
|
|
1747
1844
|
completedAt: persistedCompletedAt,
|
|
1748
|
-
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access',
|
|
1845
|
+
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access', _45 => _45.progress, 'optionalAccess', _46 => _46.updatedAt]))), () => ( snapshot.updatedAt)), () => ( null))
|
|
1749
1846
|
})
|
|
1750
1847
|
}
|
|
1751
1848
|
})
|
|
@@ -1799,9 +1896,9 @@ function diffPlayRunStreamEvents(input) {
|
|
|
1799
1896
|
if (next.snapshotSignature !== previous.snapshotSignature) {
|
|
1800
1897
|
const enrichedNodeStates = snapshot.nodeStates.map((state) => {
|
|
1801
1898
|
const timing = resolveTimingWindow({
|
|
1802
|
-
startedAt: _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access',
|
|
1803
|
-
completedAt: _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access',
|
|
1804
|
-
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access',
|
|
1899
|
+
startedAt: _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access', _47 => _47.progress, 'optionalAccess', _48 => _48.startedAt]))), () => ( null)),
|
|
1900
|
+
completedAt: _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access', _49 => _49.progress, 'optionalAccess', _50 => _50.completedAt]))), () => ( null)),
|
|
1901
|
+
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access', _51 => _51.progress, 'optionalAccess', _52 => _52.updatedAt]))), () => ( snapshot.updatedAt)), () => ( null))
|
|
1805
1902
|
});
|
|
1806
1903
|
return {
|
|
1807
1904
|
...state,
|
|
@@ -1860,18 +1957,18 @@ function isTransientPlayRunReadError(error) {
|
|
|
1860
1957
|
// src/runs/watch-polling.ts
|
|
1861
1958
|
var RUN_WATCH_POLL_INTERVAL_MS = 2e3;
|
|
1862
1959
|
function waitForNextPoll(ms, signal) {
|
|
1863
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
1960
|
+
if (_optionalChain([signal, 'optionalAccess', _53 => _53.aborted])) {
|
|
1864
1961
|
return Promise.resolve(false);
|
|
1865
1962
|
}
|
|
1866
1963
|
return new Promise((resolve) => {
|
|
1867
1964
|
const finish = (elapsed) => {
|
|
1868
1965
|
clearTimeout(timeout);
|
|
1869
|
-
_optionalChain([signal, 'optionalAccess',
|
|
1966
|
+
_optionalChain([signal, 'optionalAccess', _54 => _54.removeEventListener, 'call', _55 => _55("abort", onAbort)]);
|
|
1870
1967
|
resolve(elapsed);
|
|
1871
1968
|
};
|
|
1872
1969
|
const onAbort = () => finish(false);
|
|
1873
1970
|
const timeout = setTimeout(() => finish(true), ms);
|
|
1874
|
-
_optionalChain([signal, 'optionalAccess',
|
|
1971
|
+
_optionalChain([signal, 'optionalAccess', _56 => _56.addEventListener, 'call', _57 => _57("abort", onAbort, { once: true })]);
|
|
1875
1972
|
});
|
|
1876
1973
|
}
|
|
1877
1974
|
function readSnapshotResponse(response, runId) {
|
|
@@ -1928,7 +2025,7 @@ async function* watchRunEvents(options) {
|
|
|
1928
2025
|
let previous = EMPTY_PLAY_RUN_STREAM_DIFF_STATE;
|
|
1929
2026
|
let consecutiveFailures = 0;
|
|
1930
2027
|
let outageNoticeSent = false;
|
|
1931
|
-
while (!_optionalChain([signal, 'optionalAccess',
|
|
2028
|
+
while (!_optionalChain([signal, 'optionalAccess', _58 => _58.aborted])) {
|
|
1932
2029
|
const pollStartedAt = Date.now();
|
|
1933
2030
|
let snapshot;
|
|
1934
2031
|
try {
|
|
@@ -1941,7 +2038,7 @@ async function* watchRunEvents(options) {
|
|
|
1941
2038
|
signal
|
|
1942
2039
|
});
|
|
1943
2040
|
} catch (error) {
|
|
1944
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
2041
|
+
if (_optionalChain([signal, 'optionalAccess', _59 => _59.aborted])) {
|
|
1945
2042
|
return;
|
|
1946
2043
|
}
|
|
1947
2044
|
if (!isTransientPlayRunReadError(error)) {
|
|
@@ -1950,12 +2047,12 @@ async function* watchRunEvents(options) {
|
|
|
1950
2047
|
consecutiveFailures += 1;
|
|
1951
2048
|
const reason = error instanceof Error ? error.message : String(error);
|
|
1952
2049
|
if (!outageNoticeSent) {
|
|
1953
|
-
_optionalChain([options, 'access',
|
|
2050
|
+
_optionalChain([options, 'access', _60 => _60.onRetry, 'optionalCall', _61 => _61({
|
|
1954
2051
|
attempt: consecutiveFailures,
|
|
1955
2052
|
delayMs: pollIntervalMs,
|
|
1956
2053
|
reason
|
|
1957
2054
|
})]);
|
|
1958
|
-
_optionalChain([options, 'access',
|
|
2055
|
+
_optionalChain([options, 'access', _62 => _62.onNotice, 'optionalCall', _63 => _63(
|
|
1959
2056
|
`[watch] run snapshot request failed; retrying every ${pollIntervalMs / 1e3}s (${reason})`
|
|
1960
2057
|
)]);
|
|
1961
2058
|
outageNoticeSent = true;
|
|
@@ -1970,7 +2067,7 @@ async function* watchRunEvents(options) {
|
|
|
1970
2067
|
continue;
|
|
1971
2068
|
}
|
|
1972
2069
|
if (outageNoticeSent) {
|
|
1973
|
-
_optionalChain([options, 'access',
|
|
2070
|
+
_optionalChain([options, 'access', _64 => _64.onNotice, 'optionalCall', _65 => _65("[watch] run snapshot polling recovered")]);
|
|
1974
2071
|
outageNoticeSent = false;
|
|
1975
2072
|
}
|
|
1976
2073
|
consecutiveFailures = 0;
|
|
@@ -2300,7 +2397,7 @@ function parseDsl(input) {
|
|
|
2300
2397
|
input.slice(position)
|
|
2301
2398
|
);
|
|
2302
2399
|
if (!operation) {
|
|
2303
|
-
const token = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^(?:[=!<>~]+|[A-Za-z_]+)/, 'access',
|
|
2400
|
+
const token = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^(?:[=!<>~]+|[A-Za-z_]+)/, 'access', _66 => _66.exec, 'call', _67 => _67(input.slice(position)), 'optionalAccess', _68 => _68[0]]), () => ( input[position])), () => ( "<end>"));
|
|
2304
2401
|
if (token === "=") {
|
|
2305
2402
|
const corrected = `${input.slice(0, position)}==${input.slice(position + 1)}`;
|
|
2306
2403
|
fail(
|
|
@@ -2379,7 +2476,7 @@ function normalizeRunEventQueryTimestamp(value) {
|
|
|
2379
2476
|
return /[1-9]/.test(extraMicros) ? canonical2.replace(/Z$/, `${extraMicros}Z`) : canonical2;
|
|
2380
2477
|
}
|
|
2381
2478
|
function timestampMicros(value) {
|
|
2382
|
-
const fraction = _nullishCoalesce(_optionalChain([/\.(\d+)Z$/, 'access',
|
|
2479
|
+
const fraction = _nullishCoalesce(_optionalChain([/\.(\d+)Z$/, 'access', _69 => _69.exec, 'call', _70 => _70(value), 'optionalAccess', _71 => _71[1]]), () => ( ""));
|
|
2383
2480
|
return BigInt(Date.parse(value)) * BigInt(1e3) + BigInt(fraction.padEnd(6, "0").slice(3));
|
|
2384
2481
|
}
|
|
2385
2482
|
function time(value, nowMs, fallback) {
|
|
@@ -2612,7 +2709,7 @@ function parseNotificationGroupTarget(value) {
|
|
|
2612
2709
|
}
|
|
2613
2710
|
return { kind: "email", email };
|
|
2614
2711
|
}
|
|
2615
|
-
const slack = _optionalChain([/^slack:(.+)$/i, 'access',
|
|
2712
|
+
const slack = _optionalChain([/^slack:(.+)$/i, 'access', _72 => _72.exec, 'call', _73 => _73(normalized), 'optionalAccess', _74 => _74[1], 'optionalAccess', _75 => _75.trim, 'call', _76 => _76()]);
|
|
2616
2713
|
if (!slack) {
|
|
2617
2714
|
const provider = normalized.split(":", 1)[0] || normalized;
|
|
2618
2715
|
throw new Error(
|
|
@@ -2620,7 +2717,7 @@ function parseNotificationGroupTarget(value) {
|
|
|
2620
2717
|
);
|
|
2621
2718
|
}
|
|
2622
2719
|
const member = /^member:([UW][A-Z0-9]{8,})$/i.exec(slack);
|
|
2623
|
-
if (_optionalChain([member, 'optionalAccess',
|
|
2720
|
+
if (_optionalChain([member, 'optionalAccess', _77 => _77[1]])) {
|
|
2624
2721
|
return { kind: "slack", memberId: member[1].toUpperCase() };
|
|
2625
2722
|
}
|
|
2626
2723
|
if (slack.toLowerCase().startsWith("member:")) {
|
|
@@ -2667,10 +2764,10 @@ function resolvePlayRunRuntimeSelection(request) {
|
|
|
2667
2764
|
}
|
|
2668
2765
|
return runtime;
|
|
2669
2766
|
}
|
|
2670
|
-
const configured = _optionalChain([process, 'access',
|
|
2671
|
-
const configuredNamespace = _optionalChain([process, 'access',
|
|
2672
|
-
const configuredToken = _optionalChain([process, 'access',
|
|
2673
|
-
const configuredPlacementPolicy = _optionalChain([process, 'access',
|
|
2767
|
+
const configured = _optionalChain([process, 'access', _78 => _78.env, 'access', _79 => _79.DEEPLINE_RUNTIME_ENVIRONMENT, 'optionalAccess', _80 => _80.trim, 'call', _81 => _81()]);
|
|
2768
|
+
const configuredNamespace = _optionalChain([process, 'access', _82 => _82.env, 'access', _83 => _83.DEEPLINE_RUNTIME_NAMESPACE, 'optionalAccess', _84 => _84.trim, 'call', _85 => _85()]);
|
|
2769
|
+
const configuredToken = _optionalChain([process, 'access', _86 => _86.env, 'access', _87 => _87.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _88 => _88.trim, 'call', _89 => _89()]);
|
|
2770
|
+
const configuredPlacementPolicy = _optionalChain([process, 'access', _90 => _90.env, 'access', _91 => _91.DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY, 'optionalAccess', _92 => _92.trim, 'call', _93 => _93()]);
|
|
2674
2771
|
if (!configured) {
|
|
2675
2772
|
if (configuredNamespace || configuredToken || configuredPlacementPolicy) {
|
|
2676
2773
|
const present = [];
|
|
@@ -2709,7 +2806,7 @@ function resolvePlayRunRuntimeSelection(request) {
|
|
|
2709
2806
|
"INVALID_RUNTIME_NAMESPACE"
|
|
2710
2807
|
);
|
|
2711
2808
|
}
|
|
2712
|
-
const configuredBackendValue = _optionalChain([process, 'access',
|
|
2809
|
+
const configuredBackendValue = _optionalChain([process, 'access', _94 => _94.env, 'access', _95 => _95.DEEPLINE_PLAY_RUNNER_BACKEND, 'optionalAccess', _96 => _96.trim, 'call', _97 => _97()]);
|
|
2713
2810
|
const configuredBackend = configuredBackendValue === "daytona" || configuredBackendValue === "modal" ? configuredBackendValue : void 0;
|
|
2714
2811
|
if (configuredBackendValue && !configuredBackend) {
|
|
2715
2812
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
@@ -2747,7 +2844,7 @@ function resolveStartPlayRunRequest(request) {
|
|
|
2747
2844
|
}
|
|
2748
2845
|
function runtimeSelectionHeaders(runtime) {
|
|
2749
2846
|
if (!runtime) return void 0;
|
|
2750
|
-
const token = _optionalChain([process, 'access',
|
|
2847
|
+
const token = _optionalChain([process, 'access', _98 => _98.env, 'access', _99 => _99.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _100 => _100.trim, 'call', _101 => _101()]);
|
|
2751
2848
|
if (!token) {
|
|
2752
2849
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
2753
2850
|
"DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN is required for explicit preview runtime selection.",
|
|
@@ -2755,18 +2852,18 @@ function runtimeSelectionHeaders(runtime) {
|
|
|
2755
2852
|
"RUNTIME_ENVIRONMENT_TOKEN_REQUIRED"
|
|
2756
2853
|
);
|
|
2757
2854
|
}
|
|
2758
|
-
const receivers = _optionalChain([process, 'access',
|
|
2855
|
+
const receivers = _optionalChain([process, 'access', _102 => _102.env, 'access', _103 => _103.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _104 => _104.trim, 'call', _105 => _105()]);
|
|
2759
2856
|
return {
|
|
2760
|
-
[
|
|
2761
|
-
...receivers ? { [
|
|
2857
|
+
[_chunkTXVOB5J2js.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
2858
|
+
...receivers ? { [_chunkTXVOB5J2js.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
2762
2859
|
};
|
|
2763
2860
|
}
|
|
2764
2861
|
function isolatedCiRuntimeEventReadHeaders() {
|
|
2765
|
-
const schema = _optionalChain([process, 'access',
|
|
2766
|
-
if (_optionalChain([process, 'access',
|
|
2862
|
+
const schema = _optionalChain([process, 'access', _106 => _106.env, 'access', _107 => _107.DEEPLINE_RUNTIME_SCHEDULER_SCHEMA, 'optionalAccess', _108 => _108.trim, 'call', _109 => _109()]);
|
|
2863
|
+
if (_optionalChain([process, 'access', _110 => _110.env, 'access', _111 => _111.DEEPLINE_SYNTHETIC_RUN, 'optionalAccess', _112 => _112.trim, 'call', _113 => _113()]) !== "1" || !schema || !/^fly_absurd_pr_\d+_\d+(?:_\d+)?$/.test(schema)) {
|
|
2767
2864
|
return void 0;
|
|
2768
2865
|
}
|
|
2769
|
-
const token = _optionalChain([process, 'access',
|
|
2866
|
+
const token = _optionalChain([process, 'access', _114 => _114.env, 'access', _115 => _115.DEEPLINE_INTERNAL_TOKEN, 'optionalAccess', _116 => _116.trim, 'call', _117 => _117()]);
|
|
2770
2867
|
if (!token) {
|
|
2771
2868
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
2772
2869
|
"DEEPLINE_INTERNAL_TOKEN is required for isolated CI runtime event reads.",
|
|
@@ -2774,7 +2871,7 @@ function isolatedCiRuntimeEventReadHeaders() {
|
|
|
2774
2871
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
2775
2872
|
);
|
|
2776
2873
|
}
|
|
2777
|
-
return { [
|
|
2874
|
+
return { [_chunkTXVOB5J2js.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
2778
2875
|
}
|
|
2779
2876
|
function normalizeTestPolicyOverrides(value, source) {
|
|
2780
2877
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -2787,8 +2884,8 @@ function normalizeTestPolicyOverrides(value, source) {
|
|
|
2787
2884
|
);
|
|
2788
2885
|
}
|
|
2789
2886
|
function parseEnvTestPolicyOverrides() {
|
|
2790
|
-
const raw = typeof process !== "undefined" ? _optionalChain([process, 'access',
|
|
2791
|
-
const trimmed = _optionalChain([raw, 'optionalAccess',
|
|
2887
|
+
const raw = typeof process !== "undefined" ? _optionalChain([process, 'access', _118 => _118.env, 'optionalAccess', _119 => _119.DEEPLINE_TEST_POLICY_OVERRIDES]) : void 0;
|
|
2888
|
+
const trimmed = _optionalChain([raw, 'optionalAccess', _120 => _120.trim, 'call', _121 => _121()]);
|
|
2792
2889
|
if (!trimmed) return void 0;
|
|
2793
2890
|
let parsed;
|
|
2794
2891
|
try {
|
|
@@ -2816,7 +2913,7 @@ function isTransientCompileManifestError(error) {
|
|
|
2816
2913
|
);
|
|
2817
2914
|
}
|
|
2818
2915
|
function requireCompileManifestResponse(response, playName) {
|
|
2819
|
-
const compilerManifest = _optionalChain([response, 'optionalAccess',
|
|
2916
|
+
const compilerManifest = _optionalChain([response, 'optionalAccess', _122 => _122.compilerManifest]);
|
|
2820
2917
|
if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
|
|
2821
2918
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
2822
2919
|
`Compile manifest response did not include compilerManifest for ${playName}.`,
|
|
@@ -2868,7 +2965,7 @@ function chunkRegisterPlayArtifacts(artifacts) {
|
|
|
2868
2965
|
}
|
|
2869
2966
|
function searchParams(options) {
|
|
2870
2967
|
const params = new URLSearchParams();
|
|
2871
|
-
params.set("q", _nullishCoalesce(_optionalChain([options, 'access',
|
|
2968
|
+
params.set("q", _nullishCoalesce(_optionalChain([options, 'access', _123 => _123.query, 'optionalAccess', _124 => _124.trim, 'call', _125 => _125()]), () => ( "")));
|
|
2872
2969
|
params.set(
|
|
2873
2970
|
"include_search_debug",
|
|
2874
2971
|
options.includeSearchDebug ? "true" : "false"
|
|
@@ -2878,13 +2975,13 @@ function searchParams(options) {
|
|
|
2878
2975
|
if (options.offset !== void 0) {
|
|
2879
2976
|
params.set("offset", String(options.offset));
|
|
2880
2977
|
}
|
|
2881
|
-
if (_optionalChain([options, 'access',
|
|
2978
|
+
if (_optionalChain([options, 'access', _126 => _126.categories, 'optionalAccess', _127 => _127.trim, 'call', _128 => _128()])) {
|
|
2882
2979
|
params.set("categories", options.categories.trim());
|
|
2883
2980
|
}
|
|
2884
|
-
if (_optionalChain([options, 'access',
|
|
2981
|
+
if (_optionalChain([options, 'access', _129 => _129.searchTerms, 'optionalAccess', _130 => _130.trim, 'call', _131 => _131()])) {
|
|
2885
2982
|
params.set("search_terms", options.searchTerms.trim());
|
|
2886
2983
|
}
|
|
2887
|
-
if (_optionalChain([options, 'access',
|
|
2984
|
+
if (_optionalChain([options, 'access', _132 => _132.task, 'optionalAccess', _133 => _133.trim, 'call', _134 => _134()])) params.set("task", options.task.trim());
|
|
2888
2985
|
return params;
|
|
2889
2986
|
}
|
|
2890
2987
|
var RUNS_FAILED_LOG_LIMIT = 20;
|
|
@@ -2934,17 +3031,17 @@ function preferPrebuiltPlayDescriptions(plays) {
|
|
|
2934
3031
|
}
|
|
2935
3032
|
function normalizePlayStatus(raw) {
|
|
2936
3033
|
const runPackage = _chunkLA46MMTLjs.isPlayRunPackage.call(void 0, raw) ? raw : _chunkLA46MMTLjs.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
|
|
2937
|
-
const packageRun = _optionalChain([runPackage, 'optionalAccess',
|
|
2938
|
-
const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess',
|
|
3034
|
+
const packageRun = _optionalChain([runPackage, 'optionalAccess', _135 => _135.run]);
|
|
3035
|
+
const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess', _136 => _136.status]) === "string" ? packageRun.status : null;
|
|
2939
3036
|
const status = _chunkLA46MMTLjs.decodePlayRunPublicStatus.call(void 0, rawStatus);
|
|
2940
3037
|
if (!status) {
|
|
2941
3038
|
throw new Error(
|
|
2942
3039
|
`Invalid play run lifecycle status in API response: ${JSON.stringify(rawStatus)}.`
|
|
2943
3040
|
);
|
|
2944
3041
|
}
|
|
2945
|
-
const runId = typeof raw.runId === "string" ? raw.runId : typeof raw.workflowId === "string" ? raw.workflowId : _nullishCoalesce(_optionalChain([packageRun, 'optionalAccess',
|
|
2946
|
-
const legacyOverview = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess',
|
|
2947
|
-
const runStatus = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess',
|
|
3042
|
+
const runId = typeof raw.runId === "string" ? raw.runId : typeof raw.workflowId === "string" ? raw.workflowId : _nullishCoalesce(_optionalChain([packageRun, 'optionalAccess', _137 => _137.id]), () => ( ""));
|
|
3043
|
+
const legacyOverview = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess', _138 => _138.overview]), () => ( raw.overview));
|
|
3044
|
+
const runStatus = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess', _139 => _139.runStatus]), () => ( raw.runStatus));
|
|
2948
3045
|
return {
|
|
2949
3046
|
...raw,
|
|
2950
3047
|
runId,
|
|
@@ -3046,9 +3143,9 @@ function playRunResultFromStatus(status, startedAt, fallbackRunId) {
|
|
|
3046
3143
|
runId: status.runId || fallbackRunId,
|
|
3047
3144
|
result: _nullishCoalesce(status.package, () => ( status.result)),
|
|
3048
3145
|
...status.package ? { package: status.package } : {},
|
|
3049
|
-
logs: _nullishCoalesce(_optionalChain([status, 'access',
|
|
3146
|
+
logs: _nullishCoalesce(_optionalChain([status, 'access', _140 => _140.progress, 'optionalAccess', _141 => _141.logs]), () => ( [])),
|
|
3050
3147
|
durationMs: Date.now() - startedAt,
|
|
3051
|
-
error: _nullishCoalesce(_optionalChain([status, 'access',
|
|
3148
|
+
error: _nullishCoalesce(_optionalChain([status, 'access', _142 => _142.progress, 'optionalAccess', _143 => _143.error]), () => ( (status.status !== "completed" ? status.status : void 0)))
|
|
3052
3149
|
};
|
|
3053
3150
|
}
|
|
3054
3151
|
var DeeplineClient = (_class = class _DeeplineClient {
|
|
@@ -3075,12 +3172,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3075
3172
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
3076
3173
|
*/
|
|
3077
3174
|
constructor(options) {
|
|
3078
|
-
this.config =
|
|
3079
|
-
this.http = new (0,
|
|
3175
|
+
this.config = _chunkTXVOB5J2js.resolveConfig.call(void 0, options);
|
|
3176
|
+
this.http = new (0, _chunkTXVOB5J2js.HttpClient)(this.config);
|
|
3080
3177
|
this.toolCalls = new ToolCalls(
|
|
3081
3178
|
this.http,
|
|
3082
3179
|
this.config.timeout,
|
|
3083
|
-
_optionalChain([options, 'optionalAccess',
|
|
3180
|
+
_optionalChain([options, 'optionalAccess', _144 => _144.timeout])
|
|
3084
3181
|
);
|
|
3085
3182
|
this.runs = {
|
|
3086
3183
|
getReceipts: (runId, options2) => this.getRunReceipts(runId, options2),
|
|
@@ -3115,7 +3212,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3115
3212
|
stopAll: ((options2) => this.stopAllRuns(options2))
|
|
3116
3213
|
};
|
|
3117
3214
|
this.db = {
|
|
3118
|
-
query: (input) => this.queryDb(input)
|
|
3215
|
+
query: (input) => this.queryDb(input),
|
|
3216
|
+
planQuery: (input) => planCustomerDbQuery(input)
|
|
3119
3217
|
};
|
|
3120
3218
|
this.billing = {
|
|
3121
3219
|
topUp: (options2) => this.topUpBillingBalance(options2),
|
|
@@ -3139,7 +3237,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3139
3237
|
{},
|
|
3140
3238
|
{
|
|
3141
3239
|
"Idempotency-Key": requireTargetBillingIdempotencyKey(
|
|
3142
|
-
_nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
3240
|
+
_nullishCoalesce(_optionalChain([options2, 'optionalAccess', _145 => _145.idempotencyKey]), () => ( globalThis.crypto.randomUUID()))
|
|
3143
3241
|
)
|
|
3144
3242
|
}
|
|
3145
3243
|
),
|
|
@@ -3158,7 +3256,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3158
3256
|
available: (toolIdOrOptions, options2) => this.getMonitorsAvailable(toolIdOrOptions, options2),
|
|
3159
3257
|
check: (definition) => this.checkMonitor(definition),
|
|
3160
3258
|
deploy: (definition, options2) => this.deployMonitor(definition, options2),
|
|
3161
|
-
sync: (definition, options2) => _optionalChain([options2, 'optionalAccess',
|
|
3259
|
+
sync: (definition, options2) => _optionalChain([options2, 'optionalAccess', _146 => _146.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options2),
|
|
3162
3260
|
list: (options2) => this.listMonitors(options2),
|
|
3163
3261
|
get: (key) => this.getMonitor(key),
|
|
3164
3262
|
test: (key, payload, options2) => this.testMonitorWebhook(key, payload, options2),
|
|
@@ -3167,13 +3265,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3167
3265
|
update: (key, patch) => this.updateMonitor(key, patch),
|
|
3168
3266
|
delete: (key, options2) => this.deleteMonitor(key, options2),
|
|
3169
3267
|
reactivate: (key, options2) => this.reactivateMonitor(key, options2),
|
|
3170
|
-
start: (key, options2) => _optionalChain([options2, 'optionalAccess',
|
|
3268
|
+
start: (key, options2) => _optionalChain([options2, 'optionalAccess', _147 => _147.dryRun]) ? this.submitMonitorBatch({
|
|
3171
3269
|
kind: "reactivate",
|
|
3172
3270
|
scope: { kind: "keys", monitorKeys: [key] },
|
|
3173
3271
|
dryRun: true,
|
|
3174
3272
|
idempotencyKey: _nullishCoalesce(options2.idempotencyKey, () => ( this.monitorJobIdempotencyKey(`start-${key}`)))
|
|
3175
3273
|
}) : this.submitScalarMonitorLifecycle(key, "start", options2),
|
|
3176
|
-
stop: (key, options2) => _optionalChain([options2, 'optionalAccess',
|
|
3274
|
+
stop: (key, options2) => _optionalChain([options2, 'optionalAccess', _148 => _148.dryRun]) ? this.submitMonitorBatch({
|
|
3177
3275
|
kind: "deactivate",
|
|
3178
3276
|
scope: { kind: "keys", monitorKeys: [key] },
|
|
3179
3277
|
dryRun: true,
|
|
@@ -3224,7 +3322,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3224
3322
|
type: _nullishCoalesce(field.type, () => ( void 0)),
|
|
3225
3323
|
required: _nullishCoalesce(field.required, () => ( void 0))
|
|
3226
3324
|
} : null
|
|
3227
|
-
).filter((field) => Boolean(_optionalChain([field, 'optionalAccess',
|
|
3325
|
+
).filter((field) => Boolean(_optionalChain([field, 'optionalAccess', _149 => _149.name]))) : [];
|
|
3228
3326
|
return fields.length > 0 ? { fields } : schema;
|
|
3229
3327
|
}
|
|
3230
3328
|
schemaMetadata(schema, key) {
|
|
@@ -3254,13 +3352,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3254
3352
|
};
|
|
3255
3353
|
}
|
|
3256
3354
|
summarizePlayListItem(play, options) {
|
|
3257
|
-
const aliases = _optionalChain([play, 'access',
|
|
3355
|
+
const aliases = _optionalChain([play, 'access', _150 => _150.aliases, 'optionalAccess', _151 => _151.length]) ? play.aliases : [play.name];
|
|
3258
3356
|
const csvInput = this.schemaMetadata(play.inputSchema, "csvInput");
|
|
3259
3357
|
const rowOutputSchema = this.schemaMetadata(
|
|
3260
3358
|
play.outputSchema,
|
|
3261
3359
|
"rowOutputSchema"
|
|
3262
3360
|
);
|
|
3263
|
-
const description = _optionalChain([play, 'access',
|
|
3361
|
+
const description = _optionalChain([play, 'access', _152 => _152.description, 'optionalAccess', _153 => _153.trim, 'call', _154 => _154()]) || _optionalChain([play, 'access', _155 => _155.currentRevision, 'optionalAccess', _156 => _156.description, 'optionalAccess', _157 => _157.trim, 'call', _158 => _158()]) || _optionalChain([play, 'access', _159 => _159.liveRevision, 'optionalAccess', _160 => _160.description, 'optionalAccess', _161 => _161.trim, 'call', _162 => _162()]) || null;
|
|
3264
3362
|
const runCommand = this.playRunCommand(play);
|
|
3265
3363
|
const cloneEditStarter = this.playCloneEditStarter(play);
|
|
3266
3364
|
return {
|
|
@@ -3280,9 +3378,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3280
3378
|
canEdit: play.canEdit,
|
|
3281
3379
|
canClone: play.canClone,
|
|
3282
3380
|
aliases,
|
|
3283
|
-
inputSchema: _optionalChain([options, 'optionalAccess',
|
|
3284
|
-
outputSchema: _optionalChain([options, 'optionalAccess',
|
|
3285
|
-
staticPipeline: isRecord2(play.staticPipeline) ? play.staticPipeline : isRecord2(_optionalChain([play, 'access',
|
|
3381
|
+
inputSchema: _optionalChain([options, 'optionalAccess', _163 => _163.compact]) ? this.compactSchema(play.inputSchema) : _nullishCoalesce(play.inputSchema, () => ( null)),
|
|
3382
|
+
outputSchema: _optionalChain([options, 'optionalAccess', _164 => _164.compact]) ? this.compactSchema(play.outputSchema) : _nullishCoalesce(play.outputSchema, () => ( null)),
|
|
3383
|
+
staticPipeline: isRecord2(play.staticPipeline) ? play.staticPipeline : isRecord2(_optionalChain([play, 'access', _165 => _165.currentRevision, 'optionalAccess', _166 => _166.staticPipeline])) ? play.currentRevision.staticPipeline : isRecord2(_optionalChain([play, 'access', _167 => _167.liveRevision, 'optionalAccess', _168 => _168.staticPipeline])) ? play.liveRevision.staticPipeline : null,
|
|
3286
3384
|
...csvInput ? {
|
|
3287
3385
|
csvInput: { ...csvInput, headerMatching: CSV_HEADER_MATCHING_NOTE }
|
|
3288
3386
|
} : {},
|
|
@@ -3294,7 +3392,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3294
3392
|
// Read the live version off the live revision. It was previously only
|
|
3295
3393
|
// ever written by the publish/live routes, so every list and describe
|
|
3296
3394
|
// payload reported liveVersion: null even for an actively serving play.
|
|
3297
|
-
liveVersion: _nullishCoalesce(_optionalChain([play, 'access',
|
|
3395
|
+
liveVersion: _nullishCoalesce(_optionalChain([play, 'access', _169 => _169.liveRevision, 'optionalAccess', _170 => _170.version]), () => ( null)),
|
|
3298
3396
|
...play.triggerStatus ? { triggerStatus: play.triggerStatus } : {},
|
|
3299
3397
|
isDraftDirty: play.isDraftDirty
|
|
3300
3398
|
};
|
|
@@ -3303,8 +3401,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3303
3401
|
const play = detail.play;
|
|
3304
3402
|
return {
|
|
3305
3403
|
...this.summarizePlayListItem(play, options),
|
|
3306
|
-
currentPublishedVersion: _nullishCoalesce(_nullishCoalesce(play.currentPublishedVersion, () => ( _optionalChain([play, 'access',
|
|
3307
|
-
latestRunId: _nullishCoalesce(_nullishCoalesce(play.latestRunId, () => ( _optionalChain([detail, 'access',
|
|
3404
|
+
currentPublishedVersion: _nullishCoalesce(_nullishCoalesce(play.currentPublishedVersion, () => ( _optionalChain([play, 'access', _171 => _171.liveRevision, 'optionalAccess', _172 => _172.version]))), () => ( null)),
|
|
3405
|
+
latestRunId: _nullishCoalesce(_nullishCoalesce(play.latestRunId, () => ( _optionalChain([detail, 'access', _173 => _173.latestRuns, 'access', _174 => _174[0], 'optionalAccess', _175 => _175.workflowId]))), () => ( null)),
|
|
3308
3406
|
...play.triggerMetadata ? { triggerMetadata: play.triggerMetadata } : {},
|
|
3309
3407
|
...play.runtimeLimit ? { runtimeLimit: play.runtimeLimit } : {},
|
|
3310
3408
|
...play.activeScheduledPlays ? { activeScheduledPlays: play.activeScheduledPlays } : {}
|
|
@@ -3371,17 +3469,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3371
3469
|
*/
|
|
3372
3470
|
async listTools(options) {
|
|
3373
3471
|
const params = new URLSearchParams();
|
|
3374
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3472
|
+
if (_optionalChain([options, 'optionalAccess', _176 => _176.categories, 'optionalAccess', _177 => _177.trim, 'call', _178 => _178()])) {
|
|
3375
3473
|
params.set("categories", options.categories.trim());
|
|
3376
3474
|
}
|
|
3377
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3475
|
+
if (_optionalChain([options, 'optionalAccess', _179 => _179.tags, 'optionalAccess', _180 => _180.trim, 'call', _181 => _181()])) {
|
|
3378
3476
|
params.set("tags", options.tags.trim());
|
|
3379
3477
|
}
|
|
3380
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3478
|
+
if (_optionalChain([options, 'optionalAccess', _182 => _182.grep, 'optionalAccess', _183 => _183.trim, 'call', _184 => _184()])) {
|
|
3381
3479
|
params.set("grep", options.grep.trim());
|
|
3382
3480
|
params.set("grep_mode", _nullishCoalesce(options.grepMode, () => ( "all")));
|
|
3383
3481
|
}
|
|
3384
|
-
params.set("compact", _optionalChain([options, 'optionalAccess',
|
|
3482
|
+
params.set("compact", _optionalChain([options, 'optionalAccess', _185 => _185.compact]) === true ? "true" : "false");
|
|
3385
3483
|
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
3386
3484
|
const res = await this.http.get(
|
|
3387
3485
|
`/api/v2/tools${suffix}`
|
|
@@ -3390,7 +3488,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3390
3488
|
}
|
|
3391
3489
|
/** List discoverable providers without requiring a local plugin catalog. */
|
|
3392
3490
|
async listProviders(options) {
|
|
3393
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
3491
|
+
const suffix = _optionalChain([options, 'optionalAccess', _186 => _186.changed]) ? "?changed=true" : "";
|
|
3394
3492
|
const res = await this.http.get(
|
|
3395
3493
|
`/api/v2/tools/providers${suffix}`
|
|
3396
3494
|
);
|
|
@@ -3421,8 +3519,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3421
3519
|
*/
|
|
3422
3520
|
async search(options = {}) {
|
|
3423
3521
|
const params = searchParams(options);
|
|
3424
|
-
if (_optionalChain([options, 'access',
|
|
3425
|
-
if (_optionalChain([options, 'access',
|
|
3522
|
+
if (_optionalChain([options, 'access', _187 => _187.types, 'optionalAccess', _188 => _188.length])) params.set("types", options.types.join(","));
|
|
3523
|
+
if (_optionalChain([options, 'access', _189 => _189.exclude, 'optionalAccess', _190 => _190.length])) {
|
|
3426
3524
|
params.set("exclude", options.exclude.join(","));
|
|
3427
3525
|
}
|
|
3428
3526
|
return this.http.get(`/api/v2/search?${params.toString()}`);
|
|
@@ -3444,7 +3542,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3444
3542
|
* ```
|
|
3445
3543
|
*/
|
|
3446
3544
|
async getTool(toolId, options) {
|
|
3447
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3545
|
+
if (_optionalChain([options, 'optionalAccess', _191 => _191.cliInvocationId]) !== void 0) {
|
|
3448
3546
|
validateCliInvocationId(options.cliInvocationId);
|
|
3449
3547
|
}
|
|
3450
3548
|
return this.http.request(
|
|
@@ -3457,7 +3555,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3457
3555
|
retryApiErrors: true,
|
|
3458
3556
|
headers: {
|
|
3459
3557
|
"x-deepline-tool-meta-only": "1",
|
|
3460
|
-
..._optionalChain([options, 'optionalAccess',
|
|
3558
|
+
..._optionalChain([options, 'optionalAccess', _192 => _192.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
|
|
3461
3559
|
}
|
|
3462
3560
|
}
|
|
3463
3561
|
);
|
|
@@ -3527,17 +3625,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3527
3625
|
return this.executeTool(toolId, input, options);
|
|
3528
3626
|
}
|
|
3529
3627
|
async queryDb(input) {
|
|
3530
|
-
|
|
3531
|
-
"/api/v2/db/query",
|
|
3532
|
-
{
|
|
3533
|
-
sql: input.sql,
|
|
3534
|
-
...input.maxRows ? { max_rows: input.maxRows } : {}
|
|
3535
|
-
}
|
|
3536
|
-
);
|
|
3537
|
-
return {
|
|
3538
|
-
...result,
|
|
3539
|
-
scope: { kind: "database", mutability: "current" }
|
|
3540
|
-
};
|
|
3628
|
+
return queryCustomerDatabase(this.http, input);
|
|
3541
3629
|
}
|
|
3542
3630
|
/**
|
|
3543
3631
|
* Run a bounded SQL query against the current mutable customer database.
|
|
@@ -3559,7 +3647,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3559
3647
|
return this.http.post(
|
|
3560
3648
|
"/api/v2/ingestion/repair",
|
|
3561
3649
|
{
|
|
3562
|
-
..._optionalChain([input, 'optionalAccess',
|
|
3650
|
+
..._optionalChain([input, 'optionalAccess', _193 => _193.provider]) ? { provider: input.provider } : {}
|
|
3563
3651
|
}
|
|
3564
3652
|
);
|
|
3565
3653
|
}
|
|
@@ -3629,7 +3717,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3629
3717
|
method: "POST",
|
|
3630
3718
|
body,
|
|
3631
3719
|
headers: runtimeSelectionHeaders(resolved.runtime),
|
|
3632
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
3720
|
+
signal: _optionalChain([options, 'optionalAccess', _194 => _194.signal])
|
|
3633
3721
|
}
|
|
3634
3722
|
)) {
|
|
3635
3723
|
if (event.scope === "play") {
|
|
@@ -3651,7 +3739,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3651
3739
|
artifact: input.artifact
|
|
3652
3740
|
})));
|
|
3653
3741
|
return this.http.post(
|
|
3654
|
-
"/api/v2/plays/artifacts",
|
|
3742
|
+
input.artifactOnly === true ? "/api/v2/plays/artifacts/immutable" : "/api/v2/plays/artifacts",
|
|
3655
3743
|
{
|
|
3656
3744
|
...input,
|
|
3657
3745
|
compilerManifest
|
|
@@ -3789,7 +3877,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3789
3877
|
compilerManifest,
|
|
3790
3878
|
...input.input ? { input: input.input } : {},
|
|
3791
3879
|
...input.inputFile ? { inputFile: input.inputFile } : {},
|
|
3792
|
-
..._optionalChain([input, 'access',
|
|
3880
|
+
..._optionalChain([input, 'access', _195 => _195.packagedFiles, 'optionalAccess', _196 => _196.length]) ? { packagedFiles: input.packagedFiles } : {},
|
|
3793
3881
|
...input.force ? { force: true } : {},
|
|
3794
3882
|
...input.forceToolRefresh ? { forceToolRefresh: true } : {}
|
|
3795
3883
|
});
|
|
@@ -3819,29 +3907,29 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3819
3907
|
* ```
|
|
3820
3908
|
*/
|
|
3821
3909
|
async submitPlay(code, csvPath, name, options) {
|
|
3822
|
-
const runtimeInput = _optionalChain([options, 'optionalAccess',
|
|
3910
|
+
const runtimeInput = _optionalChain([options, 'optionalAccess', _197 => _197.input]) ? { ...options.input } : {};
|
|
3823
3911
|
if (csvPath) {
|
|
3824
3912
|
runtimeInput.file = csvPath;
|
|
3825
3913
|
}
|
|
3826
|
-
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3827
|
-
const artifact = _optionalChain([options, 'optionalAccess',
|
|
3828
|
-
if (!_optionalChain([name, 'optionalAccess',
|
|
3914
|
+
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _198 => _198.sourceCode]), () => ( code));
|
|
3915
|
+
const artifact = _optionalChain([options, 'optionalAccess', _199 => _199.artifact]);
|
|
3916
|
+
if (!_optionalChain([name, 'optionalAccess', _200 => _200.trim, 'call', _201 => _201()])) {
|
|
3829
3917
|
throw new Error("submitPlay requires a play name.");
|
|
3830
3918
|
}
|
|
3831
3919
|
if (!artifact) {
|
|
3832
3920
|
throw new Error("submitPlay requires a bundled play artifact.");
|
|
3833
3921
|
}
|
|
3834
|
-
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async
|
|
3922
|
+
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _202 => _202.compilerManifest]), async () => ( await this.compilePlayManifest({
|
|
3835
3923
|
name,
|
|
3836
3924
|
sourceCode,
|
|
3837
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
3925
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _203 => _203.sourceFiles]),
|
|
3838
3926
|
artifact
|
|
3839
3927
|
})));
|
|
3840
3928
|
const registeredArtifact = await this.registerPlayArtifact({
|
|
3841
3929
|
name,
|
|
3842
3930
|
sourceCode,
|
|
3843
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
3844
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
3931
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _204 => _204.sourceFiles]),
|
|
3932
|
+
description: _optionalChain([options, 'optionalAccess', _205 => _205.description]),
|
|
3845
3933
|
artifact,
|
|
3846
3934
|
compilerManifest,
|
|
3847
3935
|
publish: false
|
|
@@ -3855,17 +3943,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3855
3943
|
name,
|
|
3856
3944
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
3857
3945
|
sourceCode,
|
|
3858
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
3946
|
+
description: _optionalChain([options, 'optionalAccess', _206 => _206.description]),
|
|
3859
3947
|
staticPipeline: _nullishCoalesce(registeredArtifact.staticPipeline, () => ( null)),
|
|
3860
3948
|
artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
|
|
3861
3949
|
graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
|
|
3862
3950
|
runtimeArtifact: artifact,
|
|
3863
3951
|
compilerManifest,
|
|
3864
3952
|
...Object.keys(runtimeInput).length > 0 ? { input: runtimeInput } : {},
|
|
3865
|
-
..._optionalChain([options, 'optionalAccess',
|
|
3866
|
-
..._optionalChain([options, 'optionalAccess',
|
|
3867
|
-
..._optionalChain([options, 'optionalAccess',
|
|
3868
|
-
..._optionalChain([options, 'optionalAccess',
|
|
3953
|
+
..._optionalChain([options, 'optionalAccess', _207 => _207.inputFile]) ? { inputFile: options.inputFile } : {},
|
|
3954
|
+
..._optionalChain([options, 'optionalAccess', _208 => _208.packagedFiles, 'optionalAccess', _209 => _209.length]) ? { packagedFiles: options.packagedFiles } : {},
|
|
3955
|
+
..._optionalChain([options, 'optionalAccess', _210 => _210.force]) ? { force: true } : {},
|
|
3956
|
+
..._optionalChain([options, 'optionalAccess', _211 => _211.forceToolRefresh]) ? { forceToolRefresh: true } : {}
|
|
3869
3957
|
});
|
|
3870
3958
|
}
|
|
3871
3959
|
/**
|
|
@@ -3935,10 +4023,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3935
4023
|
*/
|
|
3936
4024
|
async getPlayStatus(workflowId, options) {
|
|
3937
4025
|
const params = new URLSearchParams();
|
|
3938
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4026
|
+
if (_optionalChain([options, 'optionalAccess', _212 => _212.billing]) === false) {
|
|
3939
4027
|
params.set("billing", "false");
|
|
3940
4028
|
}
|
|
3941
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4029
|
+
if (_optionalChain([options, 'optionalAccess', _213 => _213.full]) === true) {
|
|
3942
4030
|
params.set("full", "true");
|
|
3943
4031
|
}
|
|
3944
4032
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -3952,9 +4040,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3952
4040
|
for await (const event of watchRunEvents({
|
|
3953
4041
|
http: this.http,
|
|
3954
4042
|
runId: workflowId,
|
|
3955
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
3956
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
3957
|
-
onRetry: _optionalChain([options, 'optionalAccess',
|
|
4043
|
+
signal: _optionalChain([options, 'optionalAccess', _214 => _214.signal]),
|
|
4044
|
+
onNotice: _optionalChain([options, 'optionalAccess', _215 => _215.onNotice]),
|
|
4045
|
+
onRetry: _optionalChain([options, 'optionalAccess', _216 => _216.onRetry])
|
|
3958
4046
|
})) {
|
|
3959
4047
|
yield event;
|
|
3960
4048
|
}
|
|
@@ -3966,12 +4054,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3966
4054
|
* @deprecated Use `watchRunEvents` for ordinary run watching.
|
|
3967
4055
|
*/
|
|
3968
4056
|
async *streamPlayRunEvents(workflowId, options) {
|
|
3969
|
-
const headers = _optionalChain([options, 'optionalAccess',
|
|
4057
|
+
const headers = _optionalChain([options, 'optionalAccess', _217 => _217.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
3970
4058
|
const params = new URLSearchParams();
|
|
3971
|
-
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4059
|
+
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _218 => _218.mode]), () => ( "cli")));
|
|
3972
4060
|
for await (const event of this.http.streamSse(
|
|
3973
4061
|
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
3974
|
-
{ signal: _optionalChain([options, 'optionalAccess',
|
|
4062
|
+
{ signal: _optionalChain([options, 'optionalAccess', _219 => _219.signal]), headers }
|
|
3975
4063
|
)) {
|
|
3976
4064
|
if (event.scope === "play") {
|
|
3977
4065
|
yield event;
|
|
@@ -3987,24 +4075,24 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3987
4075
|
*/
|
|
3988
4076
|
async *observeRunEvents(runId, options) {
|
|
3989
4077
|
yield* this.watchRunEvents(runId, {
|
|
3990
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
3991
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4078
|
+
signal: _optionalChain([options, 'optionalAccess', _220 => _220.signal]),
|
|
4079
|
+
onNotice: _optionalChain([options, 'optionalAccess', _221 => _221.onNotice])
|
|
3992
4080
|
});
|
|
3993
4081
|
}
|
|
3994
4082
|
/** Poll snapshots to terminal status and return the durable package. */
|
|
3995
4083
|
async watchRunToTerminal(runId, options) {
|
|
3996
4084
|
let terminalObserved = false;
|
|
3997
4085
|
for await (const event of this.watchRunEvents(runId, {
|
|
3998
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
3999
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4000
|
-
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4086
|
+
signal: _optionalChain([options, 'optionalAccess', _222 => _222.signal]),
|
|
4087
|
+
onNotice: _optionalChain([options, 'optionalAccess', _223 => _223.onNotice]),
|
|
4088
|
+
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _224 => _224.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _225 => _225.onReconnect])))
|
|
4001
4089
|
})) {
|
|
4002
|
-
_optionalChain([options, 'optionalAccess',
|
|
4090
|
+
_optionalChain([options, 'optionalAccess', _226 => _226.onEvent, 'optionalCall', _227 => _227(event)]);
|
|
4003
4091
|
if (_chunkLA46MMTLjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
|
|
4004
4092
|
terminalObserved = true;
|
|
4005
4093
|
}
|
|
4006
4094
|
}
|
|
4007
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4095
|
+
if (_optionalChain([options, 'optionalAccess', _228 => _228.signal, 'optionalAccess', _229 => _229.aborted])) {
|
|
4008
4096
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
|
|
4009
4097
|
}
|
|
4010
4098
|
const refreshed = await this.getRunStatus(runId);
|
|
@@ -4058,7 +4146,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4058
4146
|
async stopPlay(workflowId, options) {
|
|
4059
4147
|
return this.http.post(
|
|
4060
4148
|
`/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
|
|
4061
|
-
_optionalChain([options, 'optionalAccess',
|
|
4149
|
+
_optionalChain([options, 'optionalAccess', _230 => _230.reason]) ? { reason: options.reason } : {}
|
|
4062
4150
|
);
|
|
4063
4151
|
}
|
|
4064
4152
|
/**
|
|
@@ -4094,7 +4182,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4094
4182
|
/** List the org's workflows. `GET /api/v2/workflows`. */
|
|
4095
4183
|
async listWorkflows(options) {
|
|
4096
4184
|
const params = new URLSearchParams();
|
|
4097
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
4185
|
+
if (typeof _optionalChain([options, 'optionalAccess', _231 => _231.limit]) === "number") {
|
|
4098
4186
|
params.set("limit", String(options.limit));
|
|
4099
4187
|
}
|
|
4100
4188
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4147,7 +4235,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4147
4235
|
/** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
|
|
4148
4236
|
async listWorkflowRuns(id, options) {
|
|
4149
4237
|
const params = new URLSearchParams();
|
|
4150
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
4238
|
+
if (typeof _optionalChain([options, 'optionalAccess', _232 => _232.limit]) === "number") {
|
|
4151
4239
|
params.set("limit", String(options.limit));
|
|
4152
4240
|
}
|
|
4153
4241
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4183,10 +4271,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4183
4271
|
*/
|
|
4184
4272
|
async getRunStatus(runId, options) {
|
|
4185
4273
|
const params = new URLSearchParams();
|
|
4186
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4274
|
+
if (_optionalChain([options, 'optionalAccess', _233 => _233.full]) === true) {
|
|
4187
4275
|
params.set("full", "true");
|
|
4188
4276
|
}
|
|
4189
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4277
|
+
if (_optionalChain([options, 'optionalAccess', _234 => _234.configuration]) === true) {
|
|
4190
4278
|
params.set("include", "configuration");
|
|
4191
4279
|
}
|
|
4192
4280
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4194,7 +4282,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4194
4282
|
`/api/v2/runs/${encodeURIComponent(runId)}${query}`,
|
|
4195
4283
|
{ headers: { "x-deepline-run-status": "1" } }
|
|
4196
4284
|
);
|
|
4197
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4285
|
+
if (_optionalChain([options, 'optionalAccess', _235 => _235.configuration]) === true && !Object.hasOwn(response, "contract")) {
|
|
4198
4286
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
4199
4287
|
"This server does not support recorded configuration reads.",
|
|
4200
4288
|
void 0,
|
|
@@ -4202,7 +4290,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4202
4290
|
);
|
|
4203
4291
|
}
|
|
4204
4292
|
const status = normalizePlayStatus(response);
|
|
4205
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4293
|
+
if (_optionalChain([options, 'optionalAccess', _236 => _236.failedLogs]) !== true || status.status !== "failed") {
|
|
4206
4294
|
return status;
|
|
4207
4295
|
}
|
|
4208
4296
|
const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
|
|
@@ -4291,7 +4379,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4291
4379
|
/** The same tenant-scoped run history searched by the dashboard and CLI. */
|
|
4292
4380
|
async getRunsHistory(options = {}) {
|
|
4293
4381
|
const params = new URLSearchParams();
|
|
4294
|
-
const search = _optionalChain([options, 'access',
|
|
4382
|
+
const search = _optionalChain([options, 'access', _237 => _237.search, 'optionalAccess', _238 => _238.trim, 'call', _239 => _239()]);
|
|
4295
4383
|
if (search && search.length > 200) {
|
|
4296
4384
|
throw new Error("Run search must be at most 200 characters.");
|
|
4297
4385
|
}
|
|
@@ -4317,16 +4405,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4317
4405
|
}
|
|
4318
4406
|
/** Read one run page without discarding server pagination metadata. */
|
|
4319
4407
|
async listRunsPage(options) {
|
|
4320
|
-
const playName = _optionalChain([options, 'access',
|
|
4408
|
+
const playName = _optionalChain([options, 'access', _240 => _240.play, 'optionalAccess', _241 => _241.trim, 'call', _242 => _242()]);
|
|
4321
4409
|
const params = new URLSearchParams();
|
|
4322
4410
|
if (playName) {
|
|
4323
4411
|
params.set("play", playName);
|
|
4324
4412
|
}
|
|
4325
|
-
const status = _optionalChain([options, 'access',
|
|
4413
|
+
const status = _optionalChain([options, 'access', _243 => _243.status, 'optionalAccess', _244 => _244.trim, 'call', _245 => _245()]);
|
|
4326
4414
|
if (status) {
|
|
4327
4415
|
params.set("status", status);
|
|
4328
4416
|
}
|
|
4329
|
-
const node = _optionalChain([options, 'access',
|
|
4417
|
+
const node = _optionalChain([options, 'access', _246 => _246.node, 'optionalAccess', _247 => _247.trim, 'call', _248 => _248()]);
|
|
4330
4418
|
if (node) {
|
|
4331
4419
|
if (!playName)
|
|
4332
4420
|
throw new Error("runs.list options.node requires options.play.");
|
|
@@ -4400,8 +4488,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4400
4488
|
* different key intentionally starts another rerun.
|
|
4401
4489
|
*/
|
|
4402
4490
|
async rerun(runId, options) {
|
|
4403
|
-
const idempotencyKey = _optionalChain([options, 'optionalAccess',
|
|
4404
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4491
|
+
const idempotencyKey = _optionalChain([options, 'optionalAccess', _249 => _249.idempotencyKey, 'optionalAccess', _250 => _250.trim, 'call', _251 => _251()]);
|
|
4492
|
+
if (_optionalChain([options, 'optionalAccess', _252 => _252.idempotencyKey]) !== void 0 && !idempotencyKey) {
|
|
4405
4493
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
4406
4494
|
"runs.rerun idempotencyKey must not be empty.",
|
|
4407
4495
|
void 0,
|
|
@@ -4410,7 +4498,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4410
4498
|
}
|
|
4411
4499
|
return this.http.post(
|
|
4412
4500
|
`/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
|
|
4413
|
-
_optionalChain([options, 'optionalAccess',
|
|
4501
|
+
_optionalChain([options, 'optionalAccess', _253 => _253.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
|
|
4414
4502
|
{ "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
|
|
4415
4503
|
);
|
|
4416
4504
|
}
|
|
@@ -4424,21 +4512,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4424
4512
|
* ```
|
|
4425
4513
|
*/
|
|
4426
4514
|
async getRunLogs(runId, options) {
|
|
4427
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4515
|
+
if (_optionalChain([options, 'optionalAccess', _254 => _254.all]) === true && options.failed === true) {
|
|
4428
4516
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
4429
4517
|
"runs.logs cannot combine all and failed views.",
|
|
4430
4518
|
void 0,
|
|
4431
4519
|
"INVALID_RUN_LOG_VIEW"
|
|
4432
4520
|
);
|
|
4433
4521
|
}
|
|
4434
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4522
|
+
if (_optionalChain([options, 'optionalAccess', _255 => _255.cursor]) !== void 0 && options.failed === true) {
|
|
4435
4523
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
4436
4524
|
"runs.logs cannot combine failed with cursor.",
|
|
4437
4525
|
void 0,
|
|
4438
4526
|
"INVALID_RUN_LOG_VIEW"
|
|
4439
4527
|
);
|
|
4440
4528
|
}
|
|
4441
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4529
|
+
if (_optionalChain([options, 'optionalAccess', _256 => _256.failed]) === true) {
|
|
4442
4530
|
const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
|
|
4443
4531
|
const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
|
|
4444
4532
|
const page = await this.http.get(
|
|
@@ -4463,18 +4551,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4463
4551
|
...page.logsTruncated ? { logsTruncated: true } : {}
|
|
4464
4552
|
};
|
|
4465
4553
|
}
|
|
4466
|
-
const beforeSequence = _optionalChain([options, 'optionalAccess',
|
|
4467
|
-
const limit = _optionalChain([options, 'optionalAccess',
|
|
4554
|
+
const beforeSequence = _optionalChain([options, 'optionalAccess', _257 => _257.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
|
|
4555
|
+
const limit = _optionalChain([options, 'optionalAccess', _258 => _258.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _259 => _259.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
|
|
4468
4556
|
const fetchPage = (afterSeq2, pageLimit) => this.http.get(
|
|
4469
4557
|
`/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
|
|
4470
4558
|
{ retryApiErrors: true }
|
|
4471
4559
|
);
|
|
4472
4560
|
const probe = await fetchPage(0, 1);
|
|
4473
4561
|
const lastStoredSeq = probe.lastStoredSeq;
|
|
4474
|
-
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access',
|
|
4562
|
+
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _260 => _260.entries, 'access', _261 => _261[0], 'optionalAccess', _262 => _262.seq]), () => ( null));
|
|
4475
4563
|
const upperSeq = beforeSequence === null ? Number.POSITIVE_INFINITY : Math.min(beforeSequence - 1, lastStoredSeq);
|
|
4476
4564
|
const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
|
|
4477
|
-
let afterSeq = _optionalChain([options, 'optionalAccess',
|
|
4565
|
+
let afterSeq = _optionalChain([options, 'optionalAccess', _263 => _263.all]) ? 0 : Math.max(0, windowEndSeq - limit);
|
|
4478
4566
|
const entries = [];
|
|
4479
4567
|
while (entries.length < limit && afterSeq < upperSeq) {
|
|
4480
4568
|
const page = await fetchPage(
|
|
@@ -4508,7 +4596,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4508
4596
|
hasMore: olderLinesExist,
|
|
4509
4597
|
nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
|
|
4510
4598
|
entries: entries.map((entry) => entry.line),
|
|
4511
|
-
view: _optionalChain([options, 'optionalAccess',
|
|
4599
|
+
view: _optionalChain([options, 'optionalAccess', _264 => _264.all]) ? "all" : "tail",
|
|
4512
4600
|
...probe.logsTruncated ? { logsTruncated: true } : {}
|
|
4513
4601
|
};
|
|
4514
4602
|
}
|
|
@@ -4669,7 +4757,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4669
4757
|
limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
|
|
4670
4758
|
offset: String(_nullishCoalesce(input.offset, () => ( 0)))
|
|
4671
4759
|
});
|
|
4672
|
-
if (_optionalChain([input, 'access',
|
|
4760
|
+
if (_optionalChain([input, 'access', _265 => _265.runId, 'optionalAccess', _266 => _266.trim, 'call', _267 => _267()])) {
|
|
4673
4761
|
params.set("runId", input.runId.trim());
|
|
4674
4762
|
}
|
|
4675
4763
|
if (input.rowMode === "all" || input.rowMode === "live") {
|
|
@@ -4679,9 +4767,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4679
4767
|
`/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
|
|
4680
4768
|
{ signal: input.signal }
|
|
4681
4769
|
);
|
|
4682
|
-
const requestedRunId = _optionalChain([input, 'access',
|
|
4770
|
+
const requestedRunId = _optionalChain([input, 'access', _268 => _268.runId, 'optionalAccess', _269 => _269.trim, 'call', _270 => _270()]) || "";
|
|
4683
4771
|
if (requestedRunId) {
|
|
4684
|
-
const confirmedRunId = _optionalChain([result, 'access',
|
|
4772
|
+
const confirmedRunId = _optionalChain([result, 'access', _271 => _271.scope, 'optionalAccess', _272 => _272.kind]) === "run" ? result.scope.runId.trim() : "";
|
|
4685
4773
|
const foreignRowRunIds = [
|
|
4686
4774
|
...new Set(
|
|
4687
4775
|
result.rows.map(
|
|
@@ -4689,7 +4777,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4689
4777
|
).filter((runId) => runId && runId !== requestedRunId)
|
|
4690
4778
|
)
|
|
4691
4779
|
];
|
|
4692
|
-
if (_optionalChain([result, 'access',
|
|
4780
|
+
if (_optionalChain([result, 'access', _273 => _273.scope, 'optionalAccess', _274 => _274.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
|
|
4693
4781
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
4694
4782
|
`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.`,
|
|
4695
4783
|
void 0,
|
|
@@ -4718,7 +4806,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4718
4806
|
async stopRun(runId, options) {
|
|
4719
4807
|
return this.http.post(
|
|
4720
4808
|
`/api/v2/runs/${encodeURIComponent(runId)}/stop`,
|
|
4721
|
-
_optionalChain([options, 'optionalAccess',
|
|
4809
|
+
_optionalChain([options, 'optionalAccess', _275 => _275.reason]) ? { reason: options.reason } : {}
|
|
4722
4810
|
);
|
|
4723
4811
|
}
|
|
4724
4812
|
/**
|
|
@@ -4736,11 +4824,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4736
4824
|
* need to clear the workspace run-slot state without knowing each run id.
|
|
4737
4825
|
*/
|
|
4738
4826
|
async stopAllRuns(options) {
|
|
4739
|
-
const dryRun = _optionalChain([options, 'optionalAccess',
|
|
4827
|
+
const dryRun = _optionalChain([options, 'optionalAccess', _276 => _276.dryRun]) === true;
|
|
4740
4828
|
const result = await this.http.post(
|
|
4741
4829
|
"/api/v2/runs/stop-all",
|
|
4742
4830
|
{
|
|
4743
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4831
|
+
..._optionalChain([options, 'optionalAccess', _277 => _277.reason]) ? { reason: options.reason } : {},
|
|
4744
4832
|
...dryRun ? { dryRun: true } : {}
|
|
4745
4833
|
}
|
|
4746
4834
|
);
|
|
@@ -4761,7 +4849,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4761
4849
|
* `origin: "owned"` for org-owned plays.
|
|
4762
4850
|
*/
|
|
4763
4851
|
async listPlays(options) {
|
|
4764
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
4852
|
+
if (!_optionalChain([options, 'optionalAccess', _278 => _278.grep, 'optionalAccess', _279 => _279.trim, 'call', _280 => _280()])) {
|
|
4765
4853
|
return (await this.requestPlaysPage(options, false)).plays;
|
|
4766
4854
|
}
|
|
4767
4855
|
const plays = [];
|
|
@@ -4783,45 +4871,45 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4783
4871
|
}
|
|
4784
4872
|
async requestPlaysPage(options, paginateInventory = true) {
|
|
4785
4873
|
const params = new URLSearchParams();
|
|
4786
|
-
if (paginateInventory && !_optionalChain([options, 'optionalAccess',
|
|
4874
|
+
if (paginateInventory && !_optionalChain([options, 'optionalAccess', _281 => _281.grep, 'optionalAccess', _282 => _282.trim, 'call', _283 => _283()]))
|
|
4787
4875
|
params.set("inventory_paginated", "1");
|
|
4788
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4789
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4876
|
+
if (_optionalChain([options, 'optionalAccess', _284 => _284.origin])) params.set("origin", options.origin);
|
|
4877
|
+
if (_optionalChain([options, 'optionalAccess', _285 => _285.categories])) {
|
|
4790
4878
|
params.set(
|
|
4791
4879
|
"categories",
|
|
4792
4880
|
Array.isArray(options.categories) ? options.categories.join(",") : options.categories
|
|
4793
4881
|
);
|
|
4794
4882
|
}
|
|
4795
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4883
|
+
if (_optionalChain([options, 'optionalAccess', _286 => _286.categories]) || _optionalChain([options, 'optionalAccess', _287 => _287.includeToolCategories])) {
|
|
4796
4884
|
params.set("include_tool_categories", "1");
|
|
4797
4885
|
}
|
|
4798
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4886
|
+
if (_optionalChain([options, 'optionalAccess', _288 => _288.tags])) {
|
|
4799
4887
|
params.set(
|
|
4800
4888
|
"tags",
|
|
4801
4889
|
Array.isArray(options.tags) ? options.tags.join(",") : options.tags
|
|
4802
4890
|
);
|
|
4803
4891
|
}
|
|
4804
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4805
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4892
|
+
if (_optionalChain([options, 'optionalAccess', _289 => _289.includeArchived])) params.set("include_archived", "1");
|
|
4893
|
+
if (_optionalChain([options, 'optionalAccess', _290 => _290.includeCostEstimates])) {
|
|
4806
4894
|
params.set("include_cost_estimates", "1");
|
|
4807
4895
|
}
|
|
4808
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4896
|
+
if (_optionalChain([options, 'optionalAccess', _291 => _291.grep, 'optionalAccess', _292 => _292.trim, 'call', _293 => _293()])) {
|
|
4809
4897
|
params.set("grep", options.grep.trim());
|
|
4810
4898
|
params.set("limit", "60");
|
|
4811
4899
|
}
|
|
4812
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4900
|
+
if (_optionalChain([options, 'optionalAccess', _294 => _294.limit]) !== void 0) {
|
|
4813
4901
|
if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
|
|
4814
4902
|
throw new Error("Play page limit must be a positive integer");
|
|
4815
4903
|
}
|
|
4816
4904
|
params.set("limit", String(options.limit));
|
|
4817
4905
|
}
|
|
4818
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4906
|
+
if (_optionalChain([options, 'optionalAccess', _295 => _295.cursor])) params.set("cursor", options.cursor);
|
|
4819
4907
|
const suffix = params.size ? `?${params.toString()}` : "";
|
|
4820
4908
|
const response = await this.http.get(`/api/v2/plays${suffix}`);
|
|
4821
4909
|
return {
|
|
4822
4910
|
plays: _nullishCoalesce(response.plays, () => ( [])),
|
|
4823
|
-
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access',
|
|
4824
|
-
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access',
|
|
4911
|
+
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _296 => _296.pagination, 'optionalAccess', _297 => _297.cursor]), () => ( response.cursor)), () => ( null)),
|
|
4912
|
+
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _298 => _298.pagination, 'optionalAccess', _299 => _299.hasMore]), () => ( response.hasMore)))
|
|
4825
4913
|
};
|
|
4826
4914
|
}
|
|
4827
4915
|
/** Read definition-level settings, independently of code revisions. */
|
|
@@ -4871,8 +4959,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4871
4959
|
return this.http.post("/api/v2/integrations/connect", {
|
|
4872
4960
|
provider: "slack",
|
|
4873
4961
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
4874
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4875
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4962
|
+
..._optionalChain([options, 'optionalAccess', _300 => _300.successUrl]) ? { success_url: options.successUrl } : {},
|
|
4963
|
+
..._optionalChain([options, 'optionalAccess', _301 => _301.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
4876
4964
|
});
|
|
4877
4965
|
}
|
|
4878
4966
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -4947,7 +5035,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4947
5035
|
}
|
|
4948
5036
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
4949
5037
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
4950
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
5038
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _302 => _302[0], 'optionalAccess', _303 => _303.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
4951
5039
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
4952
5040
|
throw new Error(
|
|
4953
5041
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -4983,7 +5071,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4983
5071
|
const existingGroup = current.configuration.groups.find(
|
|
4984
5072
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
4985
5073
|
);
|
|
4986
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
5074
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _304 => _304.groupKey]), () => ( notificationObjectKey("group")));
|
|
4987
5075
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
4988
5076
|
groupKey,
|
|
4989
5077
|
name,
|
|
@@ -5201,13 +5289,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5201
5289
|
*/
|
|
5202
5290
|
async getPlay(name, options) {
|
|
5203
5291
|
const encodedName = encodeURIComponent(name);
|
|
5204
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
5292
|
+
const query = _optionalChain([options, 'optionalAccess', _305 => _305.source]) ? `?include=source&revision=${encodeURIComponent(options.source)}` : _optionalChain([options, 'optionalAccess', _306 => _306.guidance]) ? "?include=guidance" : "";
|
|
5205
5293
|
return this.http.get(`/api/v2/plays/${encodedName}${query}`);
|
|
5206
5294
|
}
|
|
5207
5295
|
/** Read one trigger inventory page without loading run histories. */
|
|
5208
5296
|
async listPlayTriggerInventory(options) {
|
|
5209
5297
|
const params = new URLSearchParams({ view: "inventory" });
|
|
5210
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5298
|
+
if (_optionalChain([options, 'optionalAccess', _307 => _307.cursor])) params.set("cursor", options.cursor);
|
|
5211
5299
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5212
5300
|
}
|
|
5213
5301
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -5216,7 +5304,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5216
5304
|
view: "history",
|
|
5217
5305
|
binding_id: bindingId
|
|
5218
5306
|
});
|
|
5219
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5307
|
+
if (_optionalChain([options, 'optionalAccess', _308 => _308.limit]) !== void 0)
|
|
5220
5308
|
params.set("history_limit", String(options.limit));
|
|
5221
5309
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5222
5310
|
}
|
|
@@ -5252,7 +5340,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5252
5340
|
*/
|
|
5253
5341
|
async listPlayVersions(name, options) {
|
|
5254
5342
|
const encodedName = encodeURIComponent(name);
|
|
5255
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
5343
|
+
const suffix = _optionalChain([options, 'optionalAccess', _309 => _309.full]) ? "?full=true" : "";
|
|
5256
5344
|
const response = await this.http.get(
|
|
5257
5345
|
`/api/v2/plays/${encodedName}/versions${suffix}`
|
|
5258
5346
|
);
|
|
@@ -5405,14 +5493,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5405
5493
|
*/
|
|
5406
5494
|
async runPlay(code, csvPath, name, options) {
|
|
5407
5495
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
5408
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
5409
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
5410
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
5411
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
5412
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
5413
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
5414
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
5415
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
5496
|
+
input: _optionalChain([options, 'optionalAccess', _310 => _310.input]),
|
|
5497
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _311 => _311.sourceCode]),
|
|
5498
|
+
artifact: _optionalChain([options, 'optionalAccess', _312 => _312.artifact]),
|
|
5499
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _313 => _313.compilerManifest]),
|
|
5500
|
+
inputFile: _optionalChain([options, 'optionalAccess', _314 => _314.inputFile]),
|
|
5501
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _315 => _315.packagedFiles]),
|
|
5502
|
+
force: _optionalChain([options, 'optionalAccess', _316 => _316.force]),
|
|
5503
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _317 => _317.forceToolRefresh])
|
|
5416
5504
|
});
|
|
5417
5505
|
const start = Date.now();
|
|
5418
5506
|
const state = {
|
|
@@ -5423,7 +5511,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5423
5511
|
latest: null
|
|
5424
5512
|
};
|
|
5425
5513
|
let terminalObserved = null;
|
|
5426
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5514
|
+
if (_optionalChain([options, 'optionalAccess', _318 => _318.signal, 'optionalAccess', _319 => _319.aborted])) {
|
|
5427
5515
|
await this.cancelPlay(workflowId);
|
|
5428
5516
|
return {
|
|
5429
5517
|
success: false,
|
|
@@ -5434,9 +5522,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5434
5522
|
};
|
|
5435
5523
|
}
|
|
5436
5524
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
5437
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
5525
|
+
signal: _optionalChain([options, 'optionalAccess', _320 => _320.signal])
|
|
5438
5526
|
})) {
|
|
5439
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5527
|
+
if (_optionalChain([options, 'optionalAccess', _321 => _321.signal, 'optionalAccess', _322 => _322.aborted])) {
|
|
5440
5528
|
await this.cancelPlay(workflowId);
|
|
5441
5529
|
return {
|
|
5442
5530
|
success: false,
|
|
@@ -5446,19 +5534,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5446
5534
|
error: "Cancelled by user"
|
|
5447
5535
|
};
|
|
5448
5536
|
}
|
|
5449
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
5537
|
+
const previousStatus = _optionalChain([state, 'access', _323 => _323.latest, 'optionalAccess', _324 => _324.status]);
|
|
5450
5538
|
const status = updatePlayLiveStatusState(state, event);
|
|
5451
5539
|
if (!status) {
|
|
5452
5540
|
continue;
|
|
5453
5541
|
}
|
|
5454
5542
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
5455
|
-
_optionalChain([options, 'optionalAccess',
|
|
5543
|
+
_optionalChain([options, 'optionalAccess', _325 => _325.onProgress, 'optionalCall', _326 => _326(status)]);
|
|
5456
5544
|
}
|
|
5457
5545
|
if (_chunkLA46MMTLjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
5458
5546
|
terminalObserved = status;
|
|
5459
5547
|
}
|
|
5460
5548
|
}
|
|
5461
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5549
|
+
if (_optionalChain([options, 'optionalAccess', _327 => _327.signal, 'optionalAccess', _328 => _328.aborted])) {
|
|
5462
5550
|
await this.cancelPlay(workflowId);
|
|
5463
5551
|
return {
|
|
5464
5552
|
success: false,
|
|
@@ -5511,7 +5599,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5511
5599
|
const response = await this.http.get(
|
|
5512
5600
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
5513
5601
|
);
|
|
5514
|
-
const event = _optionalChain([response, 'access',
|
|
5602
|
+
const event = _optionalChain([response, 'access', _329 => _329.entries, 'optionalAccess', _330 => _330[0]]);
|
|
5515
5603
|
if (!event) {
|
|
5516
5604
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
5517
5605
|
"No usage event was found for this request_id.",
|
|
@@ -5637,7 +5725,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5637
5725
|
async cancelBillingSubscription(options) {
|
|
5638
5726
|
return this.http.post(
|
|
5639
5727
|
"/api/v2/billing/subscription/cancel",
|
|
5640
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
5728
|
+
{ action: _optionalChain([options, 'optionalAccess', _331 => _331.undo]) ? "undo_cancel" : "cancel" }
|
|
5641
5729
|
);
|
|
5642
5730
|
}
|
|
5643
5731
|
/**
|
|
@@ -5649,7 +5737,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5649
5737
|
*/
|
|
5650
5738
|
async listBillingInvoices(options) {
|
|
5651
5739
|
const params = new URLSearchParams();
|
|
5652
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5740
|
+
if (_optionalChain([options, 'optionalAccess', _332 => _332.limit]) !== void 0) {
|
|
5653
5741
|
params.set("limit", String(options.limit));
|
|
5654
5742
|
}
|
|
5655
5743
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -5759,7 +5847,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5759
5847
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
5760
5848
|
async createTargetBillingPortalSession(options) {
|
|
5761
5849
|
const response = await this.http.post(
|
|
5762
|
-
_optionalChain([options, 'optionalAccess',
|
|
5850
|
+
_optionalChain([options, 'optionalAccess', _333 => _333.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
5763
5851
|
{}
|
|
5764
5852
|
);
|
|
5765
5853
|
return response.data;
|
|
@@ -5809,8 +5897,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5809
5897
|
return this.http.request("/api/v2/monitors/audit", {
|
|
5810
5898
|
method: "POST",
|
|
5811
5899
|
body: {
|
|
5812
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5813
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5900
|
+
..._optionalChain([options, 'optionalAccess', _334 => _334.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
5901
|
+
..._optionalChain([options, 'optionalAccess', _335 => _335.cursor]) ? { cursor: options.cursor } : {}
|
|
5814
5902
|
},
|
|
5815
5903
|
maxRetries: 0
|
|
5816
5904
|
});
|
|
@@ -5820,8 +5908,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5820
5908
|
return this.http.request("/api/v2/monitors/repair", {
|
|
5821
5909
|
method: "POST",
|
|
5822
5910
|
body: {
|
|
5823
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5824
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5911
|
+
..._optionalChain([options, 'optionalAccess', _336 => _336.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
5912
|
+
..._optionalChain([options, 'optionalAccess', _337 => _337.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
5825
5913
|
},
|
|
5826
5914
|
maxRetries: 0
|
|
5827
5915
|
});
|
|
@@ -5829,7 +5917,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5829
5917
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
5830
5918
|
async readMonitorsHealth(options) {
|
|
5831
5919
|
const params = new URLSearchParams();
|
|
5832
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5920
|
+
if (_optionalChain([options, 'optionalAccess', _338 => _338.fleetId])) params.set("fleet_id", options.fleetId);
|
|
5833
5921
|
const query = params.toString();
|
|
5834
5922
|
const suffix = query ? `?${query}` : "";
|
|
5835
5923
|
return this.http.request(
|
|
@@ -5902,7 +5990,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5902
5990
|
);
|
|
5903
5991
|
}
|
|
5904
5992
|
const params = new URLSearchParams();
|
|
5905
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5993
|
+
if (_optionalChain([options, 'optionalAccess', _339 => _339.cursor])) params.set("cursor", options.cursor);
|
|
5906
5994
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
5907
5995
|
return this.http.request(
|
|
5908
5996
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -5946,7 +6034,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5946
6034
|
* `client.monitors.deploy(...)`.
|
|
5947
6035
|
*/
|
|
5948
6036
|
async deployMonitor(definition, options) {
|
|
5949
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6037
|
+
if (_optionalChain([options, 'optionalAccess', _340 => _340.dryRun])) {
|
|
5950
6038
|
return this.http.request("/api/v2/monitors/check", {
|
|
5951
6039
|
method: "POST",
|
|
5952
6040
|
body: definition
|
|
@@ -5982,12 +6070,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5982
6070
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
5983
6071
|
async listMonitors(options) {
|
|
5984
6072
|
const params = new URLSearchParams();
|
|
5985
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5986
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
5987
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6073
|
+
if (_optionalChain([options, 'optionalAccess', _341 => _341.state])) params.set("state", options.state);
|
|
6074
|
+
else if (_optionalChain([options, 'optionalAccess', _342 => _342.status])) params.set("status", options.status);
|
|
6075
|
+
if (_optionalChain([options, 'optionalAccess', _343 => _343.limit]) !== void 0)
|
|
5988
6076
|
params.set("limit", String(options.limit));
|
|
5989
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5990
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6077
|
+
if (_optionalChain([options, 'optionalAccess', _344 => _344.cursor])) params.set("cursor", options.cursor);
|
|
6078
|
+
if (_optionalChain([options, 'optionalAccess', _345 => _345.includeConsumers])) params.set("include_consumers", "true");
|
|
5991
6079
|
const query = params.toString();
|
|
5992
6080
|
const suffix = query ? `?${query}` : "";
|
|
5993
6081
|
return this.http.request(
|
|
@@ -6003,7 +6091,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6003
6091
|
);
|
|
6004
6092
|
}
|
|
6005
6093
|
async testMonitorWebhook(key, payload, options) {
|
|
6006
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6094
|
+
if (_optionalChain([options, 'optionalAccess', _346 => _346.dispatch]) === true || _optionalChain([options, 'optionalAccess', _347 => _347.validationOnly]) === false) {
|
|
6007
6095
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
6008
6096
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
6009
6097
|
void 0,
|
|
@@ -6058,7 +6146,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6058
6146
|
}
|
|
6059
6147
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6060
6148
|
async deleteMonitor(key, options) {
|
|
6061
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6149
|
+
if (_optionalChain([options, 'optionalAccess', _348 => _348.localOnly]) === true) {
|
|
6062
6150
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
6063
6151
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6064
6152
|
void 0,
|
|
@@ -6066,11 +6154,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6066
6154
|
);
|
|
6067
6155
|
}
|
|
6068
6156
|
const params = new URLSearchParams();
|
|
6069
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6157
|
+
if (_optionalChain([options, 'optionalAccess', _349 => _349.dryRun])) params.set("dry_run", "true");
|
|
6070
6158
|
const query = params.toString();
|
|
6071
6159
|
return this.http.request(
|
|
6072
6160
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6073
|
-
_optionalChain([options, 'optionalAccess',
|
|
6161
|
+
_optionalChain([options, 'optionalAccess', _350 => _350.dryRun]) ? { method: "DELETE" } : {
|
|
6074
6162
|
method: "DELETE",
|
|
6075
6163
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6076
6164
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6083,10 +6171,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6083
6171
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6084
6172
|
*/
|
|
6085
6173
|
async reactivateMonitor(key, options) {
|
|
6086
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6174
|
+
const query = _optionalChain([options, 'optionalAccess', _351 => _351.dryRun]) ? "?dry_run=true" : "";
|
|
6087
6175
|
return this.http.request(
|
|
6088
6176
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6089
|
-
_optionalChain([options, 'optionalAccess',
|
|
6177
|
+
_optionalChain([options, 'optionalAccess', _352 => _352.dryRun]) ? { method: "POST", body: {} } : {
|
|
6090
6178
|
method: "POST",
|
|
6091
6179
|
body: {},
|
|
6092
6180
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6100,7 +6188,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6100
6188
|
// ——————————————————————————————————————————————————————————
|
|
6101
6189
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6102
6190
|
monitorJobIdempotencyKey(operation) {
|
|
6103
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
6191
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _353 => _353.crypto, 'optionalAccess', _354 => _354.randomUUID, 'optionalCall', _355 => _355()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
6104
6192
|
const prefix = "monitor-job-";
|
|
6105
6193
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6106
6194
|
const maxOperationLength = Math.max(
|
|
@@ -6111,7 +6199,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6111
6199
|
}
|
|
6112
6200
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6113
6201
|
return {
|
|
6114
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6202
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _356 => _356.trim, 'call', _357 => _357()]) || this.monitorJobIdempotencyKey(operation)
|
|
6115
6203
|
};
|
|
6116
6204
|
}
|
|
6117
6205
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6122,7 +6210,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6122
6210
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6123
6211
|
headers: this.monitorJobHeaders(
|
|
6124
6212
|
"batch-deploy",
|
|
6125
|
-
_optionalChain([options, 'optionalAccess',
|
|
6213
|
+
_optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey])
|
|
6126
6214
|
),
|
|
6127
6215
|
maxRetries: 0,
|
|
6128
6216
|
exactUrlOnly: true
|
|
@@ -6141,11 +6229,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6141
6229
|
version: 1,
|
|
6142
6230
|
kind: "batch",
|
|
6143
6231
|
monitors: definitions,
|
|
6144
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6232
|
+
..._optionalChain([options, 'optionalAccess', _359 => _359.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6145
6233
|
},
|
|
6146
6234
|
headers: this.monitorJobHeaders(
|
|
6147
6235
|
`batch-sync-${batchId}`,
|
|
6148
|
-
_optionalChain([options, 'optionalAccess',
|
|
6236
|
+
_optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey])
|
|
6149
6237
|
),
|
|
6150
6238
|
maxRetries: 0,
|
|
6151
6239
|
exactUrlOnly: true
|
|
@@ -6160,7 +6248,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6160
6248
|
body: {},
|
|
6161
6249
|
headers: this.monitorJobHeaders(
|
|
6162
6250
|
`batch-start-${batchId}`,
|
|
6163
|
-
_optionalChain([options, 'optionalAccess',
|
|
6251
|
+
_optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
|
|
6164
6252
|
),
|
|
6165
6253
|
maxRetries: 0,
|
|
6166
6254
|
exactUrlOnly: true
|
|
@@ -6175,7 +6263,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6175
6263
|
body: {},
|
|
6176
6264
|
headers: this.monitorJobHeaders(
|
|
6177
6265
|
`batch-stop-${batchId}`,
|
|
6178
|
-
_optionalChain([options, 'optionalAccess',
|
|
6266
|
+
_optionalChain([options, 'optionalAccess', _362 => _362.idempotencyKey])
|
|
6179
6267
|
),
|
|
6180
6268
|
maxRetries: 0,
|
|
6181
6269
|
exactUrlOnly: true
|
|
@@ -6196,7 +6284,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6196
6284
|
body: {},
|
|
6197
6285
|
headers: this.monitorJobHeaders(
|
|
6198
6286
|
`${action}-${monitorKey}`,
|
|
6199
|
-
_optionalChain([options, 'optionalAccess',
|
|
6287
|
+
_optionalChain([options, 'optionalAccess', _363 => _363.idempotencyKey])
|
|
6200
6288
|
),
|
|
6201
6289
|
maxRetries: 0,
|
|
6202
6290
|
exactUrlOnly: true
|
|
@@ -6209,7 +6297,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6209
6297
|
body: definition,
|
|
6210
6298
|
headers: this.monitorJobHeaders(
|
|
6211
6299
|
`sync-${definition.key}`,
|
|
6212
|
-
_optionalChain([options, 'optionalAccess',
|
|
6300
|
+
_optionalChain([options, 'optionalAccess', _364 => _364.idempotencyKey])
|
|
6213
6301
|
),
|
|
6214
6302
|
maxRetries: 0,
|
|
6215
6303
|
exactUrlOnly: true
|
|
@@ -6222,7 +6310,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6222
6310
|
);
|
|
6223
6311
|
}
|
|
6224
6312
|
async getMonitorJobLogs(jobId, options) {
|
|
6225
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6313
|
+
const query = _optionalChain([options, 'optionalAccess', _365 => _365.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
6226
6314
|
return this.http.request(
|
|
6227
6315
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
6228
6316
|
{ method: "GET" }
|
|
@@ -6235,15 +6323,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6235
6323
|
);
|
|
6236
6324
|
}
|
|
6237
6325
|
async waitForMonitorJob(jobId, options) {
|
|
6238
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6239
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6326
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _366 => _366.timeoutMs]), () => ( 10 * 6e4)));
|
|
6327
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _367 => _367.pollIntervalMs]), () => ( 2e3)));
|
|
6240
6328
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
6241
6329
|
const startedAt = Date.now();
|
|
6242
6330
|
let latest = await this.getMonitorJob(jobId);
|
|
6243
6331
|
while (true) {
|
|
6244
|
-
_optionalChain([options, 'optionalAccess',
|
|
6332
|
+
_optionalChain([options, 'optionalAccess', _368 => _368.onProgress, 'optionalCall', _369 => _369(latest)]);
|
|
6245
6333
|
const job = latest.job;
|
|
6246
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
6334
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _370 => _370.state]) === "string" ? job.state : void 0;
|
|
6247
6335
|
if (state && terminal.has(state)) return latest;
|
|
6248
6336
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
6249
6337
|
await sleep(pollIntervalMs);
|
|
@@ -6254,12 +6342,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6254
6342
|
// Monitor Fleets
|
|
6255
6343
|
// ——————————————————————————————————————————————————————————
|
|
6256
6344
|
monitorFleetIdempotencyKey(operation) {
|
|
6257
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
6345
|
+
const uuid = _optionalChain([globalThis, 'access', _371 => _371.crypto, 'optionalAccess', _372 => _372.randomUUID, 'optionalCall', _373 => _373()]);
|
|
6258
6346
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
6259
6347
|
}
|
|
6260
6348
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
6261
6349
|
return {
|
|
6262
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6350
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _374 => _374.trim, 'call', _375 => _375()]) || this.monitorFleetIdempotencyKey(operation)
|
|
6263
6351
|
};
|
|
6264
6352
|
}
|
|
6265
6353
|
monitorFleetPath(fleetId) {
|
|
@@ -6279,15 +6367,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6279
6367
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
6280
6368
|
const body = {
|
|
6281
6369
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
6282
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6283
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6370
|
+
..._optionalChain([options, 'optionalAccess', _376 => _376.dryRun]) ? { dry_run: true } : {},
|
|
6371
|
+
..._optionalChain([options, 'optionalAccess', _377 => _377.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
6284
6372
|
};
|
|
6285
6373
|
return this.http.request(
|
|
6286
6374
|
this.monitorFleetPath(fleetId),
|
|
6287
6375
|
{
|
|
6288
6376
|
method: "PUT",
|
|
6289
6377
|
body,
|
|
6290
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
6378
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _378 => _378.idempotencyKey])),
|
|
6291
6379
|
maxRetries: 0,
|
|
6292
6380
|
exactUrlOnly: true
|
|
6293
6381
|
}
|
|
@@ -6300,8 +6388,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6300
6388
|
}
|
|
6301
6389
|
async getMonitorFleet(fleetId, options) {
|
|
6302
6390
|
const params = new URLSearchParams();
|
|
6303
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6304
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6391
|
+
if (_optionalChain([options, 'optionalAccess', _379 => _379.drift])) params.set("drift", "1");
|
|
6392
|
+
if (_optionalChain([options, 'optionalAccess', _380 => _380.limit]) !== void 0)
|
|
6305
6393
|
params.set("limit", String(options.limit));
|
|
6306
6394
|
const query = params.toString();
|
|
6307
6395
|
return this.http.request(
|
|
@@ -6314,10 +6402,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6314
6402
|
this.monitorFleetPath(fleetId),
|
|
6315
6403
|
{
|
|
6316
6404
|
method: "DELETE",
|
|
6317
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
6405
|
+
body: _optionalChain([options, 'optionalAccess', _381 => _381.dryRun]) ? { dry_run: true } : {},
|
|
6318
6406
|
headers: this.monitorFleetHeaders(
|
|
6319
6407
|
"deactivate",
|
|
6320
|
-
_optionalChain([options, 'optionalAccess',
|
|
6408
|
+
_optionalChain([options, 'optionalAccess', _382 => _382.idempotencyKey])
|
|
6321
6409
|
),
|
|
6322
6410
|
maxRetries: 0,
|
|
6323
6411
|
exactUrlOnly: true
|
|
@@ -6332,7 +6420,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6332
6420
|
body: {},
|
|
6333
6421
|
headers: this.monitorFleetHeaders(
|
|
6334
6422
|
"reactivate",
|
|
6335
|
-
_optionalChain([options, 'optionalAccess',
|
|
6423
|
+
_optionalChain([options, 'optionalAccess', _383 => _383.idempotencyKey])
|
|
6336
6424
|
),
|
|
6337
6425
|
maxRetries: 0,
|
|
6338
6426
|
exactUrlOnly: true
|
|
@@ -6349,13 +6437,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6349
6437
|
* identical to "the request failed".
|
|
6350
6438
|
*/
|
|
6351
6439
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
6352
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6353
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6354
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
6440
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _384 => _384.timeoutMs]), () => ( 10 * 6e4)));
|
|
6441
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _385 => _385.pollIntervalMs]), () => ( 2e3)));
|
|
6442
|
+
const terminal = _optionalChain([options, 'optionalAccess', _386 => _386.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
|
|
6355
6443
|
const startedAt = Date.now();
|
|
6356
6444
|
let latest = await this.getMonitorFleet(fleetId);
|
|
6357
6445
|
while (true) {
|
|
6358
|
-
_optionalChain([options, 'optionalAccess',
|
|
6446
|
+
_optionalChain([options, 'optionalAccess', _387 => _387.onProgress, 'optionalCall', _388 => _388(latest)]);
|
|
6359
6447
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
6360
6448
|
if (status && terminal.has(status)) return latest;
|
|
6361
6449
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
@@ -6401,4 +6489,6 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6401
6489
|
|
|
6402
6490
|
|
|
6403
6491
|
|
|
6404
|
-
|
|
6492
|
+
|
|
6493
|
+
|
|
6494
|
+
exports.CSV_HEADER_MATCHING_NOTE = CSV_HEADER_MATCHING_NOTE; exports.iterateCursorPages = iterateCursorPages; exports.playInputExampleArgs = playInputExampleArgs; exports.planCustomerDbQuery = planCustomerDbQuery; exports.validateExecutionIdempotencyKey = validateExecutionIdempotencyKey; exports.PRODUCT_NOTIFICATION_EVENT_CATALOG = PRODUCT_NOTIFICATION_EVENT_CATALOG; exports.resolveLegacySlackNotification = resolveLegacySlackNotification; exports.RUN_EVENT_SEARCH_KIND_VALUES = RUN_EVENT_SEARCH_KIND_VALUES; exports.logProvenanceReaches = logProvenanceReaches; exports.logLevelReaches = logLevelReaches; exports.parseLogLevel = parseLogLevel; exports.classifyLogLine = classifyLogLine; exports.isTransientPlayRunReadError = isTransientPlayRunReadError; exports.encodeRunLogsCursor = encodeRunLogsCursor; exports.isRunLogsCursor = isRunLogsCursor; exports.RunEventQueryInputError = RunEventQueryInputError; exports.normalizeRunEventOperationRequest = normalizeRunEventOperationRequest; exports.isStopAllPlayRunsDryRunResult = isStopAllPlayRunsDryRunResult; exports.MONITOR_JOB_STATES = MONITOR_JOB_STATES; exports.MONITOR_JOB_PHASES = MONITOR_JOB_PHASES; exports.MONITOR_JOB_RECONCILIATION_STATES = MONITOR_JOB_RECONCILIATION_STATES; exports.DeeplineClient = DeeplineClient;
|