deepline 0.3.305 → 0.3.306
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/cli-invocation-id.ts +14 -0
- package/dist/bundling-sources/sdk/src/client.ts +24 -1
- package/dist/bundling-sources/sdk/src/http.ts +11 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +19 -1
- package/dist/cli/{auth-XMYFUM5L.mjs → auth-WTC7LCQ6.mjs} +4 -4
- package/dist/cli/auth-ZT3UF33R.js +31 -0
- package/dist/cli/{billing-NDUDRJ7T.js → billing-3DYTHO32.js} +70 -70
- package/dist/cli/{billing-RXT6NYAU.mjs → billing-VQM65LVP.mjs} +4 -4
- package/dist/cli/chunk-2IKIG333.js +65 -0
- package/dist/cli/{chunk-E4YSOJ2H.js → chunk-2KR56MPF.js} +2 -2
- package/dist/cli/{chunk-6C4SD4U3.mjs → chunk-4PSSDZQB.mjs} +7 -1
- package/dist/cli/{chunk-TGOAQTY3.mjs → chunk-5HS5EEFE.mjs} +3 -3
- package/dist/cli/{chunk-QFSISXKO.mjs → chunk-5V56XCQN.mjs} +1 -1
- package/dist/cli/{chunk-AEMR2R5H.mjs → chunk-6CRUYVU7.mjs} +4 -4
- package/dist/cli/{chunk-SCX2AZFY.mjs → chunk-7XORS6WQ.mjs} +2 -2
- package/dist/cli/{chunk-44GHROVJ.mjs → chunk-FJ3DANI4.mjs} +1 -1
- package/dist/cli/{chunk-ZQOFBLJN.js → chunk-FZNO6B4W.js} +6 -6
- package/dist/cli/{chunk-S3HPQWZ3.mjs → chunk-LLGF6V6I.mjs} +44 -8
- package/dist/cli/{chunk-B7PAZBJX.js → chunk-M6HCRRV2.js} +10 -4
- package/dist/cli/{chunk-COMHSM6F.js → chunk-MMNZ6GBT.js} +6 -6
- package/dist/cli/{chunk-LUBEGHJC.js → chunk-OF7QP2XX.js} +15 -15
- package/dist/cli/{chunk-DNSTXIU4.js → chunk-OZIFVQRY.js} +1 -1
- package/dist/cli/{chunk-KNHD6J3X.js → chunk-PHNAFCSB.js} +275 -239
- package/dist/cli/{chunk-HELHRPU6.mjs → chunk-QDC4XTO3.mjs} +2 -2
- package/dist/cli/{chunk-5UZQ75HD.js → chunk-RODIZCGU.js} +60 -60
- package/dist/cli/{chunk-DY72E7K2.js → chunk-SZQPJW2L.js} +6 -6
- package/dist/cli/{chunk-XZD3NYOL.js → chunk-U37SW6IK.js} +48 -48
- package/dist/cli/chunk-UABLQKTZ.mjs +65 -0
- package/dist/cli/{chunk-445RPDOQ.mjs → chunk-UT3VLSLM.mjs} +5 -5
- package/dist/cli/{chunk-UWDFJXBQ.js → chunk-W7ELTWDM.js} +26 -26
- package/dist/cli/{chunk-LYPASDJJ.mjs → chunk-WV64SNDV.mjs} +1 -1
- package/dist/cli/{chunk-KNK42P4M.mjs → chunk-WWPI4GJI.mjs} +1 -1
- package/dist/cli/{client-WOHHEX5X.mjs → client-DCEK34D5.mjs} +3 -3
- package/dist/cli/client-UQXVU2T6.js +20 -0
- package/dist/cli/{csv-WZ5BOOT7.js → csv-H42JDJ6G.js} +12 -12
- package/dist/cli/{csv-WNPLDGFR.mjs → csv-LXBF5UIV.mjs} +3 -3
- package/dist/cli/{db-GCQJHGME.mjs → db-3O5CFLNP.mjs} +4 -4
- package/dist/cli/{db-GBK4QSIU.js → db-DP5GU4MU.js} +20 -20
- package/dist/cli/{executions-BAS6T2BN.js → executions-5FFTPHEX.js} +6 -6
- package/dist/cli/{executions-MSB6FRNL.mjs → executions-QC2UZKIP.mjs} +4 -4
- package/dist/cli/{feedback-VREMIXAX.mjs → feedback-JCGE6JFW.mjs} +3 -3
- package/dist/cli/{feedback-UHOHIOPV.js → feedback-XAU3FI5S.js} +6 -6
- package/dist/cli/git-CNO2UFZE.js +23 -0
- package/dist/cli/{git-GQKD556H.mjs → git-S3Y3E2NL.mjs} +4 -4
- package/dist/cli/index.js +155 -121
- package/dist/cli/index.mjs +121 -87
- package/dist/cli/{legacy-noops-RI2ROZ6U.mjs → legacy-noops-FQF2IRVS.mjs} +4 -4
- package/dist/cli/{legacy-noops-PIL4KNVA.js → legacy-noops-TXOUX4FX.js} +7 -7
- package/dist/cli/{monitors-UVQLZDIO.js → monitors-4BQCO6B7.js} +85 -85
- package/dist/cli/{monitors-QHLEULAZ.mjs → monitors-F3PELPSH.mjs} +4 -4
- package/dist/cli/{org-BYWI4VI3.mjs → org-ER5J3ATG.mjs} +4 -4
- package/dist/cli/{org-KXJJZOSK.js → org-VQM6OOLK.js} +60 -60
- package/dist/cli/{play-WF7AJJ7J.mjs → play-B5H2RN4N.mjs} +6 -6
- package/dist/cli/{play-3XR54PQY.js → play-WKZPAOW3.js} +200 -200
- package/dist/cli/{providers-4FYRPS4E.js → providers-5TEA2FJG.js} +7 -7
- package/dist/cli/{providers-FG67H5N5.mjs → providers-6ODEAYC2.mjs} +4 -4
- package/dist/cli/{quickstart-IBWIR4LX.mjs → quickstart-BCYT7BCY.mjs} +3 -3
- package/dist/cli/{quickstart-3YCFHVKY.js → quickstart-GJYCNMFC.js} +5 -5
- package/dist/cli/{search-6PQ4QBMC.js → search-KKJ535OX.js} +6 -6
- package/dist/cli/{search-OZRXENTS.mjs → search-RY547KOT.mjs} +5 -5
- package/dist/cli/{secrets-2JW5HCHH.js → secrets-RFGDXSEW.js} +13 -13
- package/dist/cli/{secrets-S3GIROJA.mjs → secrets-U42ZEYIU.mjs} +4 -4
- package/dist/cli/{sessions-6HNVWH3C.mjs → sessions-YWEFB62D.mjs} +4 -4
- package/dist/cli/{sessions-AQQ6WHMK.js → sessions-ZRTWHMIH.js} +5 -5
- package/dist/cli/{settings-6FINI54L.mjs → settings-AS4U6NVP.mjs} +7 -7
- package/dist/cli/{settings-HSHA2FO5.js → settings-XUWFXIL7.js} +74 -74
- package/dist/cli/{setup-XHIBSXCC.mjs → setup-2GUIV2EW.mjs} +6 -6
- package/dist/cli/{setup-O7FZ5EUD.js → setup-2QPWP2FI.js} +41 -41
- package/dist/cli/skills-4E5KYW2Y.js +28 -0
- package/dist/cli/{skills-ZFIIWR5G.mjs → skills-5QS7ERVF.mjs} +4 -4
- package/dist/cli/{tools-4B4NLVOJ.js → tools-J47LIO2H.js} +120 -87
- package/dist/cli/{tools-WURPIECI.mjs → tools-PVWSGCZD.mjs} +76 -43
- package/dist/cli/update-GZKGOMKD.js +28 -0
- package/dist/cli/{update-2THOPAUS.mjs → update-KS4TRSZI.mjs} +6 -6
- package/dist/cli/{workflow-XS5JSKED.js → workflow-HQRUUTTL.js} +15 -15
- package/dist/cli/{workflow-S2G453ZX.mjs → workflow-QCLR7GVC.mjs} +5 -5
- package/dist/{client-BT11xxG8.d.mts → client-Dj8MAkDc.d.mts} +6 -1
- package/dist/{client-5Nsl0O0v.d.ts → client-DsrFGXJf.d.ts} +6 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +73 -70
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-WRUUITRZ.js +0 -31
- package/dist/cli/client-KBAPBERE.js +0 -20
- package/dist/cli/git-6QYO4FQH.js +0 -23
- package/dist/cli/skills-3ASRSEF2.js +0 -28
- package/dist/cli/update-7ZPTMO6H.js +0 -28
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LLGF6V6I.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5V56XCQN.mjs";
|
|
7
7
|
import {
|
|
8
8
|
resolveConfig,
|
|
9
9
|
sdkCliStateDirPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4PSSDZQB.mjs";
|
|
11
11
|
|
|
12
12
|
// src/cli/search-ref.ts
|
|
13
13
|
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FJ3DANI4.mjs";
|
|
5
5
|
import {
|
|
6
6
|
resolveShellSpawn,
|
|
7
7
|
runSkillsCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UT3VLSLM.mjs";
|
|
9
9
|
import {
|
|
10
10
|
printCommandEnvelope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5V56XCQN.mjs";
|
|
12
12
|
import {
|
|
13
13
|
autoDetectBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4PSSDZQB.mjs";
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/update.ts
|
|
17
17
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5V56XCQN.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
saveHostEnvValues,
|
|
26
26
|
saveProjectDeeplineEnvValues,
|
|
27
27
|
storedHostApiKey
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-4PSSDZQB.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
import {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkMMNZ6GBTjs = require('./chunk-MMNZ6GBT.js');
|
|
5
5
|
|
|
6
6
|
// src/cli/commands/sessions.ts
|
|
7
7
|
|
|
@@ -420,7 +420,7 @@ function buildSessionUploadContent(raw) {
|
|
|
420
420
|
return { encodedContent: encoded, needsChunking: true };
|
|
421
421
|
}
|
|
422
422
|
async function uploadPayload(path, payload) {
|
|
423
|
-
const { http } =
|
|
423
|
+
const { http } = _chunkMMNZ6GBTjs.getAuthedHttpClient.call(void 0, );
|
|
424
424
|
return await http.post(path, payload);
|
|
425
425
|
}
|
|
426
426
|
async function uploadChunkedSessions(sessions, options) {
|
|
@@ -452,7 +452,7 @@ async function uploadChunkedSessions(sessions, options) {
|
|
|
452
452
|
environments: sessions.map(() => detectShellContext()),
|
|
453
453
|
...options.rating ? { rating: options.rating } : {}
|
|
454
454
|
});
|
|
455
|
-
|
|
455
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
456
456
|
{
|
|
457
457
|
...response,
|
|
458
458
|
ok: true,
|
|
@@ -481,7 +481,7 @@ async function handleSessionsSend(options) {
|
|
|
481
481
|
filename: _path.basename.call(void 0, filePath),
|
|
482
482
|
...rating ? { rating } : {}
|
|
483
483
|
});
|
|
484
|
-
|
|
484
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
485
485
|
{
|
|
486
486
|
...response2,
|
|
487
487
|
ok: true,
|
|
@@ -530,7 +530,7 @@ async function handleSessionsSend(options) {
|
|
|
530
530
|
environment: detectShellContext(),
|
|
531
531
|
...rating ? { rating } : {}
|
|
532
532
|
});
|
|
533
|
-
|
|
533
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
534
534
|
{
|
|
535
535
|
...response,
|
|
536
536
|
ok: true,
|
|
@@ -635,7 +635,7 @@ ${refreshMeta}
|
|
|
635
635
|
</body>
|
|
636
636
|
</html>`;
|
|
637
637
|
_fs.writeFileSync.call(void 0, outputPath, html, "utf8");
|
|
638
|
-
|
|
638
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
639
639
|
{
|
|
640
640
|
ok: true,
|
|
641
641
|
file: outputPath,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
RETAINED_PIPELINE_RECEIVERS_HEADER,
|
|
15
15
|
RUNTIME_ENVIRONMENT_TOKEN_HEADER,
|
|
16
16
|
resolveConfig
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4PSSDZQB.mjs";
|
|
18
18
|
import {
|
|
19
19
|
PLAY_RUNTIME_BACKENDS,
|
|
20
20
|
RAW_V2_TOOL_RESPONSE_CONTRACT,
|
|
@@ -172,6 +172,18 @@ function usesExtendedBetterContactLauncherBudget(toolId) {
|
|
|
172
172
|
return BETTERCONTACT_LAUNCHER_TOOL_IDS.has(toolId.trim().toLowerCase());
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
// src/cli-invocation-id.ts
|
|
176
|
+
var CLI_INVOCATION_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
177
|
+
function validateCliInvocationId(value) {
|
|
178
|
+
if (!CLI_INVOCATION_ID_PATTERN.test(value)) {
|
|
179
|
+
throw new DeeplineError(
|
|
180
|
+
"CLI invocation IDs must be UUID v4 values.",
|
|
181
|
+
void 0,
|
|
182
|
+
"CLI_INVOCATION_ID_INVALID"
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
175
187
|
// src/tool-calls.ts
|
|
176
188
|
var INCLUDE_TOOL_METADATA_HEADER = "x-deepline-include-tool-metadata";
|
|
177
189
|
var EXECUTE_RESPONSE_CONTRACT_HEADER = "x-deepline-execute-response-contract";
|
|
@@ -305,6 +317,9 @@ var ToolCalls = class {
|
|
|
305
317
|
this.configuredRequestTimeoutMs = configuredRequestTimeoutMs;
|
|
306
318
|
}
|
|
307
319
|
async call(toolId, input, options) {
|
|
320
|
+
if (options?.cliInvocationId !== void 0) {
|
|
321
|
+
validateCliInvocationId(options.cliInvocationId);
|
|
322
|
+
}
|
|
308
323
|
const inputSnapshot = JSON.parse(JSON.stringify(input));
|
|
309
324
|
const metadataSnapshot = options?.metadata ? JSON.parse(JSON.stringify(options.metadata)) : void 0;
|
|
310
325
|
const idempotencyKey = options?.idempotencyKey ?? (options?.recover ? crypto.randomUUID() : void 0);
|
|
@@ -325,7 +340,11 @@ var ToolCalls = class {
|
|
|
325
340
|
this.configuredRequestTimeoutMs
|
|
326
341
|
);
|
|
327
342
|
if (idempotencyKey !== void 0) {
|
|
328
|
-
await this.lookupExecutionByKey(
|
|
343
|
+
await this.lookupExecutionByKey(
|
|
344
|
+
idempotencyKey,
|
|
345
|
+
timeoutMs,
|
|
346
|
+
options?.cliInvocationId
|
|
347
|
+
);
|
|
329
348
|
}
|
|
330
349
|
const isApifySync = toolId.trim().toLowerCase() === "apify_run_actor_sync";
|
|
331
350
|
const headers = {
|
|
@@ -337,7 +356,8 @@ var ToolCalls = class {
|
|
|
337
356
|
...options?.includeToolMetadata ? { [INCLUDE_TOOL_METADATA_HEADER]: "true" } : {},
|
|
338
357
|
[EXECUTE_RESPONSE_INTENT_HEADER]: options?.responseIntent ?? "raw",
|
|
339
358
|
...idempotencyKey ? { "Idempotency-Key": idempotencyKey } : {},
|
|
340
|
-
...options?.searchRef ? { "x-deepline-search-ref": options.searchRef } : {}
|
|
359
|
+
...options?.searchRef ? { "x-deepline-search-ref": options.searchRef } : {},
|
|
360
|
+
...options?.cliInvocationId !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
|
|
341
361
|
};
|
|
342
362
|
const request = (requestTimeoutMs) => this.http.post(
|
|
343
363
|
`/api/v2/integrations/${encodeURIComponent(toolId)}/execute`,
|
|
@@ -384,7 +404,8 @@ var ToolCalls = class {
|
|
|
384
404
|
timeoutMs,
|
|
385
405
|
this.defaultRequestTimeoutMs,
|
|
386
406
|
remainingMs
|
|
387
|
-
)
|
|
407
|
+
),
|
|
408
|
+
options?.cliInvocationId
|
|
388
409
|
);
|
|
389
410
|
} catch (error) {
|
|
390
411
|
if (!isRecoverableExecutionLookupError(error)) throw error;
|
|
@@ -464,7 +485,7 @@ var ToolCalls = class {
|
|
|
464
485
|
}
|
|
465
486
|
return result;
|
|
466
487
|
}
|
|
467
|
-
async lookupExecutionByKey(idempotencyKey, timeoutMs) {
|
|
488
|
+
async lookupExecutionByKey(idempotencyKey, timeoutMs, cliInvocationId) {
|
|
468
489
|
validateExecutionIdempotencyKey(idempotencyKey);
|
|
469
490
|
let supported = false;
|
|
470
491
|
const result = await this.http.get(
|
|
@@ -475,6 +496,7 @@ var ToolCalls = class {
|
|
|
475
496
|
timeout: timeoutMs,
|
|
476
497
|
idempotencyKey,
|
|
477
498
|
allowNotFound: true,
|
|
499
|
+
...cliInvocationId !== void 0 ? { headers: { "x-deepline-cli-invocation-id": cliInvocationId } } : {},
|
|
478
500
|
onResponse: (response) => {
|
|
479
501
|
supported = response.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
480
502
|
}
|
|
@@ -2870,7 +2892,10 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
2870
2892
|
* console.log(`Input schema:`, meta.inputSchema);
|
|
2871
2893
|
* ```
|
|
2872
2894
|
*/
|
|
2873
|
-
async getTool(toolId) {
|
|
2895
|
+
async getTool(toolId, options) {
|
|
2896
|
+
if (options?.cliInvocationId !== void 0) {
|
|
2897
|
+
validateCliInvocationId(options.cliInvocationId);
|
|
2898
|
+
}
|
|
2874
2899
|
return this.http.request(
|
|
2875
2900
|
`/api/v2/integrations/${encodeURIComponent(toolId)}/get`,
|
|
2876
2901
|
{
|
|
@@ -2880,7 +2905,8 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
2880
2905
|
// other GET catalog methods such as searchTools().
|
|
2881
2906
|
retryApiErrors: true,
|
|
2882
2907
|
headers: {
|
|
2883
|
-
"x-deepline-tool-meta-only": "1"
|
|
2908
|
+
"x-deepline-tool-meta-only": "1",
|
|
2909
|
+
...options?.cliInvocationId !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
|
|
2884
2910
|
}
|
|
2885
2911
|
}
|
|
2886
2912
|
);
|
|
@@ -4456,6 +4482,9 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
4456
4482
|
* contracts and stable run behavior.
|
|
4457
4483
|
*/
|
|
4458
4484
|
async searchPlays(options) {
|
|
4485
|
+
if (options.cliInvocationId !== void 0) {
|
|
4486
|
+
validateCliInvocationId(options.cliInvocationId);
|
|
4487
|
+
}
|
|
4459
4488
|
const params = new URLSearchParams();
|
|
4460
4489
|
params.set("search", options.query.trim());
|
|
4461
4490
|
const scope = options.scope ?? "prebuilt";
|
|
@@ -4463,7 +4492,14 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
4463
4492
|
params.set("origin", scope);
|
|
4464
4493
|
}
|
|
4465
4494
|
const response = await this.http.get(
|
|
4466
|
-
`/api/v2/plays?${params.toString()}
|
|
4495
|
+
`/api/v2/plays?${params.toString()}`,
|
|
4496
|
+
{
|
|
4497
|
+
...options.cliInvocationId !== void 0 ? {
|
|
4498
|
+
headers: {
|
|
4499
|
+
"x-deepline-cli-invocation-id": options.cliInvocationId
|
|
4500
|
+
}
|
|
4501
|
+
} : {}
|
|
4502
|
+
}
|
|
4467
4503
|
);
|
|
4468
4504
|
const plays = (response.plays ?? []).map(
|
|
4469
4505
|
(play) => this.summarizePlayListItem(play, options)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkOZIFVQRYjs = require('./chunk-OZIFVQRY.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -721,9 +721,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
721
721
|
}
|
|
722
722
|
|
|
723
723
|
// src/version.ts
|
|
724
|
-
var SDK_VERSION =
|
|
725
|
-
var SDK_API_MAJOR =
|
|
726
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
724
|
+
var SDK_VERSION = _chunkOZIFVQRYjs.SDK_RELEASE.version;
|
|
725
|
+
var SDK_API_MAJOR = _chunkOZIFVQRYjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
726
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkOZIFVQRYjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
727
727
|
|
|
728
728
|
// src/agent-runtime.ts
|
|
729
729
|
|
|
@@ -1221,6 +1221,7 @@ var MAX_DIAGNOSTIC_HEADER_LENGTH = 120;
|
|
|
1221
1221
|
var COWORK_NETWORK_HINT = "Claude Cowork appears to be running Deepline in a network-restricted sandbox. In Claude Desktop, open Settings > Capabilities, turn on Allow network egress, and set Domain allowlist to All domains for the Cowork session.";
|
|
1222
1222
|
var REQUEST_TIMEOUT_MARKER = Symbol("deeplineRequestTimeout");
|
|
1223
1223
|
var REQUEST_ABORT_MARKER = Symbol("deeplineRequestAbort");
|
|
1224
|
+
var MAX_AUTOMATIC_RETRY_WAIT_MS = 3e4;
|
|
1224
1225
|
function requestCancelledError(signal) {
|
|
1225
1226
|
const error = withErrorCause(new Error("Request aborted"), signal.reason);
|
|
1226
1227
|
error[REQUEST_ABORT_MARKER] = true;
|
|
@@ -1424,6 +1425,7 @@ var HttpClient = class {
|
|
|
1424
1425
|
let lastError = null;
|
|
1425
1426
|
const candidateUrls = _optionalChain([options, 'optionalAccess', _211 => _211.exactUrlOnly]) ? [url] : buildCandidateUrls(url);
|
|
1426
1427
|
let retryAfterDelayMs = null;
|
|
1428
|
+
let totalRetryWaitMs = 0;
|
|
1427
1429
|
const maxRetries = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _212 => _212.maxRetries]), () => ( this.config.maxRetries));
|
|
1428
1430
|
requestAttempts: for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
1429
1431
|
if (_optionalChain([options, 'optionalAccess', _213 => _213.signal, 'optionalAccess', _214 => _214.aborted])) {
|
|
@@ -1435,6 +1437,10 @@ var HttpClient = class {
|
|
|
1435
1437
|
const backoffMs = Math.min(1e3 * Math.pow(2, attempt - 1), 3e4);
|
|
1436
1438
|
const delayMs = retryAfterDelayMs === null ? backoffMs : Math.max(backoffMs, retryAfterDelayMs);
|
|
1437
1439
|
retryAfterDelayMs = null;
|
|
1440
|
+
if (totalRetryWaitMs + delayMs > MAX_AUTOMATIC_RETRY_WAIT_MS) {
|
|
1441
|
+
break requestAttempts;
|
|
1442
|
+
}
|
|
1443
|
+
totalRetryWaitMs += delayMs;
|
|
1438
1444
|
networkPhase = "retry_wait";
|
|
1439
1445
|
try {
|
|
1440
1446
|
await sleep(delayMs, _optionalChain([options, 'optionalAccess', _215 => _215.signal]));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkM6HCRRV2js = require('./chunk-M6HCRRV2.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -136,8 +136,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
136
136
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
137
137
|
var defaultBrowserCommandRunner = childProcess;
|
|
138
138
|
function getAuthedHttpClient() {
|
|
139
|
-
const config =
|
|
140
|
-
return { config, http: new (0,
|
|
139
|
+
const config = _chunkM6HCRRV2js.resolveConfig.call(void 0, );
|
|
140
|
+
return { config, http: new (0, _chunkM6HCRRV2js.HttpClient)(config) };
|
|
141
141
|
}
|
|
142
142
|
function stableOsUserId() {
|
|
143
143
|
try {
|
|
@@ -477,7 +477,7 @@ function collectLocalEnvInfo() {
|
|
|
477
477
|
os: `${process.platform} ${process.arch}`,
|
|
478
478
|
node_version: process.version,
|
|
479
479
|
home_dir: homeDir,
|
|
480
|
-
agent_runtime:
|
|
480
|
+
agent_runtime: _chunkM6HCRRV2js.detectAgentRuntime.call(void 0, )
|
|
481
481
|
};
|
|
482
482
|
const env = process.env;
|
|
483
483
|
const optional = {
|
|
@@ -725,9 +725,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
725
725
|
}
|
|
726
726
|
function withAgentCommandContext(value) {
|
|
727
727
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
728
|
-
return
|
|
728
|
+
return _chunkM6HCRRV2js.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
729
729
|
...valueRecord,
|
|
730
|
-
command_context:
|
|
730
|
+
command_context: _chunkM6HCRRV2js.resolveCliCommandContext.call(void 0, )
|
|
731
731
|
} : value;
|
|
732
732
|
}
|
|
733
733
|
function printJson(value, fields) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk2KR56MPFjs = require('./chunk-2KR56MPF.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkRODIZCGUjs = require('./chunk-RODIZCGU.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkMMNZ6GBTjs = require('./chunk-MMNZ6GBT.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkM6HCRRV2js = require('./chunk-M6HCRRV2.js');
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/update.ts
|
|
17
17
|
var _child_process = require('child_process');
|
|
@@ -504,7 +504,7 @@ function normalizedNpmPrefix(value) {
|
|
|
504
504
|
}
|
|
505
505
|
function resolveNpmGlobalPrefix(env) {
|
|
506
506
|
try {
|
|
507
|
-
const plan =
|
|
507
|
+
const plan = _chunkRODIZCGUjs.resolveShellSpawn.call(void 0, "npm", ["prefix", "-g"]);
|
|
508
508
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
509
509
|
encoding: "utf8",
|
|
510
510
|
env,
|
|
@@ -560,8 +560,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
560
560
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
561
561
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
562
562
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
563
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
564
|
-
const npmGlobalInstallFlags =
|
|
563
|
+
const npmVersion = options.npmVersion === void 0 ? _chunk2KR56MPFjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
564
|
+
const npmGlobalInstallFlags = _chunk2KR56MPFjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
565
565
|
const args = installPrefix ? [
|
|
566
566
|
"install",
|
|
567
567
|
"-g",
|
|
@@ -571,7 +571,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
571
571
|
packageSpec
|
|
572
572
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
573
573
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
574
|
-
_optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) ||
|
|
574
|
+
_optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || _chunkM6HCRRV2js.autoDetectBaseUrl.call(void 0, )
|
|
575
575
|
);
|
|
576
576
|
return {
|
|
577
577
|
kind: "npm-global",
|
|
@@ -718,7 +718,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
718
718
|
function runCommand(command, args, env = process.env) {
|
|
719
719
|
return new Promise((resolveResult) => {
|
|
720
720
|
let output = "";
|
|
721
|
-
const plan =
|
|
721
|
+
const plan = _chunkRODIZCGUjs.resolveShellSpawn.call(void 0, command, args);
|
|
722
722
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
723
723
|
stdio: ["inherit", "pipe", "pipe"],
|
|
724
724
|
shell: plan.shell,
|
|
@@ -1094,14 +1094,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1094
1094
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1095
1095
|
}
|
|
1096
1096
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1097
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1097
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkM6HCRRV2js.autoDetectBaseUrl));
|
|
1098
1098
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1099
1099
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1100
1100
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1101
1101
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1102
1102
|
process.stdout.write = (() => true);
|
|
1103
1103
|
try {
|
|
1104
|
-
const exitCode = await
|
|
1104
|
+
const exitCode = await _chunkRODIZCGUjs.runSkillsCommand.call(void 0, { json: true });
|
|
1105
1105
|
if (exitCode !== 0) {
|
|
1106
1106
|
throw new Error(
|
|
1107
1107
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1172,11 +1172,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1172
1172
|
]
|
|
1173
1173
|
};
|
|
1174
1174
|
if (options.json && !options.executeWithJson) {
|
|
1175
|
-
|
|
1175
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1176
1176
|
return 0;
|
|
1177
1177
|
}
|
|
1178
1178
|
if (options.printCommand) {
|
|
1179
|
-
|
|
1179
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
1180
1180
|
{
|
|
1181
1181
|
...plan,
|
|
1182
1182
|
render: {
|
|
@@ -1189,7 +1189,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1189
1189
|
return 0;
|
|
1190
1190
|
}
|
|
1191
1191
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1192
|
-
|
|
1192
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1193
1193
|
return 0;
|
|
1194
1194
|
}
|
|
1195
1195
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1219,7 +1219,7 @@ To retry with full installer output, run: deepline skills --json
|
|
|
1219
1219
|
);
|
|
1220
1220
|
}
|
|
1221
1221
|
if (options.executeWithJson && options.json) {
|
|
1222
|
-
|
|
1222
|
+
_chunkMMNZ6GBTjs.printCommandEnvelope.call(void 0,
|
|
1223
1223
|
{
|
|
1224
1224
|
ok: true,
|
|
1225
1225
|
pinnedVersion
|
|
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
version: "0.3.
|
|
52
|
+
version: "0.3.306",
|
|
53
53
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
54
54
|
packageCapabilities: {
|
|
55
55
|
updatePreferences: 1
|