deepline 0.3.408 → 0.3.410
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/agent-runtime.ts +18 -1
- package/dist/bundling-sources/sdk/src/client.ts +212 -334
- package/dist/bundling-sources/sdk/src/compat.ts +45 -2
- package/dist/bundling-sources/sdk/src/db/query.ts +9 -10
- package/dist/bundling-sources/sdk/src/http.ts +38 -20
- package/dist/bundling-sources/sdk/src/index.ts +4 -5
- package/dist/bundling-sources/sdk/src/play.ts +10 -10
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +6 -4
- package/dist/bundling-sources/sdk/src/plays/check-local-play-graph.ts +114 -0
- package/dist/bundling-sources/sdk/src/plays/client.ts +431 -0
- package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +2 -2
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +106 -16
- package/dist/bundling-sources/sdk/src/release.ts +13 -7
- package/dist/bundling-sources/sdk/src/runs/read-errors.ts +8 -0
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +124 -13
- package/dist/bundling-sources/sdk/src/tool-calls.ts +108 -19
- package/dist/bundling-sources/sdk/src/types.ts +18 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/execute-retry-contract.ts +37 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/package.json +3 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +277 -76
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/dataset-row-input.ts +124 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +6 -62
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +67 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +64 -6
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +1 -5
- package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/egress-probe.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +26 -16
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +36 -11
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +35 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +21 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +11 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +85 -20
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +71 -13
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-execution-queries.ts +100 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +9 -5
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +337 -146
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +26 -12
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +425 -102
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +181 -124
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +152 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +5 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +31 -0
- package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +10 -0
- package/dist/bundling-sources/shared_libs/plays/ambiguous-write-error.ts +25 -0
- package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +4 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +63 -68
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +129 -63
- package/dist/bundling-sources/shared_libs/plays/contracts.ts +14 -0
- package/dist/bundling-sources/shared_libs/plays/enrich-play-compiler.ts +58 -16
- package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +50 -0
- package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +351 -0
- package/dist/bundling-sources/shared_libs/plays/tool-list-getter-mode.ts +9 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
- package/dist/cli/{auth-UVD3CUBB.mjs → auth-LLXLIILR.mjs} +6 -6
- package/dist/cli/auth-UG4WOYGL.js +40 -0
- package/dist/cli/{billing-BZVTXXLM.mjs → billing-5FVXZYAC.mjs} +8 -8
- package/dist/cli/{billing-BZVYAF6T.js → billing-NFPK7GYP.js} +84 -84
- package/dist/cli/{chunk-ZAAKSJAS.js → chunk-27GJKC5Q.js} +17 -10
- package/dist/cli/{chunk-UHNDVD3P.js → chunk-2H4EY7KH.js} +100 -41
- package/dist/cli/{chunk-WTT6CLED.mjs → chunk-2YR7BIIC.mjs} +5 -2
- package/dist/cli/{chunk-3ZB6IIA7.js → chunk-36AHOWVS.js} +26 -26
- package/dist/cli/{chunk-OSDXE27V.mjs → chunk-4PG4ARL2.mjs} +17 -10
- package/dist/cli/{chunk-LOYISF7S.mjs → chunk-4XQLVUC7.mjs} +738 -512
- package/dist/cli/{chunk-J5PTX66Y.js → chunk-5MLCBXXU.js} +8 -1
- package/dist/cli/chunk-5TUGWDEB.js +313 -0
- package/dist/cli/{chunk-D6FFBSM5.js → chunk-5UUQAGJS.js} +5 -2
- package/dist/cli/{chunk-4CFULMRB.mjs → chunk-5V5Y37BC.mjs} +2 -2
- package/dist/cli/{chunk-PMVFAYL7.mjs → chunk-63ILLN5H.mjs} +2 -2
- package/dist/cli/{chunk-AUMD2VXP.js → chunk-63S7X326.js} +1032 -806
- package/dist/cli/{chunk-4QFT5LGV.mjs → chunk-6PGATQ6L.mjs} +6 -3
- package/dist/cli/{chunk-6BJK4EJ3.mjs → chunk-AARWVK4C.mjs} +2132 -65
- package/dist/cli/{chunk-FERRDNMO.js → chunk-AD47BXN2.js} +5 -5
- package/dist/cli/{chunk-4RNDKFNQ.js → chunk-D37FEBES.js} +2 -2
- package/dist/cli/{chunk-S6R3OX7B.js → chunk-E4CABWXL.js} +25 -2
- package/dist/cli/{chunk-NXGCO4JB.mjs → chunk-E4IXDAZI.mjs} +5 -0
- package/dist/cli/chunk-EQ4Z7RJW.mjs +35 -0
- package/dist/cli/chunk-FR2ILQ4G.mjs +8 -0
- package/dist/cli/{chunk-QUAQX3FQ.js → chunk-FVLNYDI4.js} +128 -376
- package/dist/cli/{chunk-BRJUESQV.js → chunk-FZJAM576.js} +50 -50
- package/dist/cli/{chunk-BZAMOCPA.mjs → chunk-IMZ56EOH.mjs} +3 -3
- package/dist/cli/{chunk-IOHRWLQE.mjs → chunk-IPG42SD2.mjs} +452 -138
- package/dist/cli/chunk-J33TSWO5.js +8 -0
- package/dist/cli/{chunk-XXLXOUUU.mjs → chunk-JNXJZ577.mjs} +1 -1
- package/dist/cli/{chunk-JI2B4RZP.mjs → chunk-KCC3FKIW.mjs} +71 -12
- package/dist/cli/{chunk-6IKARAYD.mjs → chunk-L2VKAASU.mjs} +23 -0
- package/dist/cli/{chunk-PYZZMAJQ.mjs → chunk-LFSHGNT2.mjs} +8 -1
- package/dist/cli/{chunk-2XXXFPTD.js → chunk-LTFL4JRN.js} +426 -721
- package/dist/cli/{chunk-YHPYUZZX.mjs → chunk-MAMVGOSC.mjs} +1 -1
- package/dist/cli/{chunk-URACNNLO.mjs → chunk-MN2OWLFA.mjs} +2 -2
- package/dist/cli/{chunk-Q3PUHXOY.js → chunk-NF4V5DTY.js} +12 -12
- package/dist/cli/{chunk-Q2E4E4FJ.js → chunk-NPBJI7RE.js} +8 -8
- package/dist/cli/chunk-NTVLGHFM.js +501 -0
- package/dist/cli/{chunk-HQXL5526.mjs → chunk-NUX2QHNC.mjs} +1 -1
- package/dist/cli/{chunk-E3PJF6YP.js → chunk-OBB4QXHA.js} +19 -4
- package/dist/cli/{chunk-SEFMGO3Z.js → chunk-OQQOXSYA.js} +2184 -117
- package/dist/cli/chunk-OZ6E3IRZ.js +6084 -0
- package/dist/cli/{chunk-7P5AA3SN.js → chunk-PPDBRJRW.js} +6 -1
- package/dist/cli/{chunk-IWBXJDZA.mjs → chunk-PZSLPBDA.mjs} +2 -2
- package/dist/cli/{chunk-ILHRA7AD.js → chunk-QADCFSGH.js} +7 -7
- package/dist/cli/{chunk-ECVLPS67.js → chunk-QJI5FIOW.js} +170 -49
- package/dist/cli/{chunk-I3DHIXVJ.mjs → chunk-QL22Y56M.mjs} +149 -28
- package/dist/cli/{chunk-SD7MXAJA.mjs → chunk-RFB25DSQ.mjs} +36 -284
- package/dist/cli/chunk-T44IIOT6.mjs +501 -0
- package/dist/cli/chunk-VK2LZ5IP.js +35 -0
- package/dist/cli/chunk-VKKVSFRD.js +62 -0
- package/dist/cli/{chunk-RWCY6YI2.js → chunk-VYKV5XHL.js} +644 -330
- package/dist/cli/{chunk-GSK6NHVM.js → chunk-WU4U6VSB.js} +5 -5
- package/dist/cli/chunk-XHLKJOTN.mjs +313 -0
- package/dist/cli/{chunk-MJELBQBU.mjs → chunk-XIHWSXSV.mjs} +330 -625
- package/dist/cli/chunk-XNZJKRJA.mjs +6084 -0
- package/dist/cli/chunk-ZCALLYF6.mjs +62 -0
- package/dist/cli/{chunk-ZBABPK6Y.js → chunk-ZFZ427HN.js} +11 -8
- package/dist/cli/{chunk-SJVVBWRL.mjs → chunk-ZKYEW55U.mjs} +16 -1
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-XLGLHJ6P.js → csv-7U3FJYKZ.js} +14 -14
- package/dist/cli/{csv-WPSXG6ZZ.mjs → csv-ZWLDMM4A.mjs} +5 -5
- package/dist/cli/{db-5PTNJG4X.js → db-DNCGV5PC.js} +42 -47
- package/dist/cli/{db-ABS57ABJ.mjs → db-IMYXVMGI.mjs} +15 -20
- package/dist/cli/{describe-PVWQJ2PB.mjs → describe-Q23DWJUK.mjs} +20 -15
- package/dist/cli/{describe-EZS6PQXA.js → describe-S34JUX5W.js} +27 -22
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/describe-core.js +6 -6
- package/dist/cli/describe-core.mjs +5 -5
- package/dist/cli/{executions-OKJGATQZ.mjs → executions-A73EUGSI.mjs} +8 -8
- package/dist/cli/{executions-FNTAFQ7Y.js → executions-XOMPX2YJ.js} +10 -10
- package/dist/cli/{feedback-W27HDMRR.mjs → feedback-N4GJ2POI.mjs} +11 -7
- package/dist/cli/{feedback-6YBOMSUA.js → feedback-QTCHNJJH.js} +13 -9
- package/dist/cli/{git-YOOUEL6M.mjs → git-4Q3JIQYZ.mjs} +6 -6
- package/dist/cli/git-I6CPBEVG.js +24 -0
- package/dist/cli/index.js +240 -352
- package/dist/cli/index.mjs +163 -275
- package/dist/cli/{legacy-noops-V6OKW7VR.mjs → legacy-noops-3SOVGFF7.mjs} +6 -6
- package/dist/cli/{legacy-noops-2VZ7XT6C.js → legacy-noops-4OSHZM34.js} +9 -9
- package/dist/cli/{monitors-FBWGVIUS.js → monitors-LVE2KZNG.js} +94 -94
- package/dist/cli/{monitors-P2YYWTWT.mjs → monitors-QP2XID2B.mjs} +8 -8
- package/dist/cli/{org-DVMG6H3C.mjs → org-IVRETVQA.mjs} +8 -8
- package/dist/cli/{org-3XUSVX5T.js → org-XFLK5IAP.js} +68 -68
- package/dist/cli/{play-GNC5CQAS.mjs → play-DE7VH6NU.mjs} +533 -98
- package/dist/cli/{play-YG5L4BWQ.js → play-XXTPPP23.js} +1067 -632
- package/dist/cli/{providers-7PSWG2OV.js → providers-DLD3I4JF.js} +11 -11
- package/dist/cli/{providers-JR33SLWL.mjs → providers-GX2NIZQQ.mjs} +8 -8
- package/dist/cli/{quickstart-VUOBQYIQ.mjs → quickstart-72B4L4PK.mjs} +5 -5
- package/dist/cli/{quickstart-FDVZ5BL3.js → quickstart-XNS3HSWC.js} +7 -7
- package/dist/cli/search-6NCH4HB5.js +30 -0
- package/dist/cli/{search-JZYLO33K.mjs → search-SUTRANJI.mjs} +9 -9
- package/dist/cli/{secrets-VS266FVA.js → secrets-6OBLOVEV.js} +17 -17
- package/dist/cli/{secrets-3MCYBT4I.mjs → secrets-FPFXXNUH.mjs} +8 -8
- package/dist/cli/sessions-235532DR.js +16 -0
- package/dist/cli/{sessions-ELLLT23E.mjs → sessions-R25I4QKN.mjs} +6 -6
- package/dist/cli/{settings-PZCKAFII.mjs → settings-AOP6F5PZ.mjs} +12 -12
- package/dist/cli/{settings-7364NMMA.js → settings-VL5FOFPN.js} +79 -79
- package/dist/cli/{setup-PMWYLCT6.js → setup-BSC67YT3.js} +45 -44
- package/dist/cli/{setup-A7GQ4KIA.mjs → setup-ZMPHBHVJ.mjs} +11 -10
- package/dist/cli/skills-3IWLYYRL.js +29 -0
- package/dist/cli/{skills-WS6BIFPQ.mjs → skills-KF65TVFO.mjs} +7 -7
- package/dist/cli/tools-LR66SPYU.js +44 -0
- package/dist/cli/{tools-BR4DOZA2.mjs → tools-SX4XIPM7.mjs} +19 -14
- package/dist/cli/{update-D2B7UNFT.mjs → update-QRMFRAQQ.mjs} +11 -9
- package/dist/cli/update-SP7UEO53.js +31 -0
- package/dist/cli/{workflow-PQXC2R47.mjs → workflow-FOEEEB7G.mjs} +44 -20
- package/dist/cli/{workflow-6ODTCYXU.js → workflow-KOCK2FLW.js} +54 -30
- package/dist/{client-Z9Pye1Wm.d.mts → client-74k4IPh6.d.mts} +137 -54
- package/dist/{client-BcvhDfJJ.d.ts → client-C1IK1f8c.d.ts} +137 -54
- package/dist/{compiler-manifest-Ycx-hoAr.d.mts → compiler-manifest-lzWpbV3w.d.mts} +83 -66
- package/dist/{compiler-manifest-Ycx-hoAr.d.ts → compiler-manifest-lzWpbV3w.d.ts} +83 -66
- package/dist/{index-CZXgiN3E.d.mts → index-C8Cy-YTm.d.ts} +5 -1
- package/dist/{index-NPG5pqxQ.d.ts → index-CtNK-0nI.d.mts} +5 -1
- package/dist/index.d.mts +47 -9
- package/dist/index.d.ts +47 -9
- package/dist/index.js +17 -14
- package/dist/index.mjs +13 -10
- package/dist/install-integrity.json +120 -104
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +5 -4
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +11 -3
- package/dist/plays/run-request.mjs +10 -2
- package/dist/release.d.mts +15 -6
- package/dist/release.d.ts +15 -6
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +2 -2
- package/dist/cli/auth-3GB2K636.js +0 -40
- package/dist/cli/chunk-67RWR34T.mjs +0 -155
- package/dist/cli/chunk-CLJGSOVM.mjs +0 -1716
- package/dist/cli/chunk-HQY2SG3K.js +0 -83
- package/dist/cli/chunk-OSFWFV72.js +0 -155
- package/dist/cli/chunk-Q3LFI3VH.js +0 -392
- package/dist/cli/chunk-WPAB4DCU.mjs +0 -83
- package/dist/cli/chunk-YMOFWHGO.mjs +0 -392
- package/dist/cli/chunk-Z4VNJOF7.js +0 -1716
- package/dist/cli/git-YKUXXJOR.js +0 -24
- package/dist/cli/search-PPPYC5OZ.js +0 -30
- package/dist/cli/sessions-TEHEWW7O.js +0 -16
- package/dist/cli/skills-SYS7VRRK.js +0 -29
- package/dist/cli/tools-KK4BKVQR.js +0 -39
- package/dist/cli/update-2IV5JTX2.js +0 -29
|
@@ -8,6 +8,10 @@ var PROVIDER_TRANSIENT_ERROR_BRAND = Symbol.for(
|
|
|
8
8
|
);
|
|
9
9
|
var LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION = 0;
|
|
10
10
|
var TOOL_EXECUTION_ERROR_SCHEMA_VERSION = 1;
|
|
11
|
+
var SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS = [
|
|
12
|
+
LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
13
|
+
TOOL_EXECUTION_ERROR_SCHEMA_VERSION
|
|
14
|
+
];
|
|
11
15
|
var TOOL_EXECUTION_ERROR_SCHEMA_HEADER = "x-deepline-tool-error-schema";
|
|
12
16
|
var MAX_IDENTIFIER_LENGTH = 200;
|
|
13
17
|
var MAX_CODE_LENGTH = 160;
|
|
@@ -341,4 +345,5 @@ function deserializeToolExecutionFailure(message, value, acceptedSchemaVersion)
|
|
|
341
345
|
|
|
342
346
|
|
|
343
347
|
|
|
344
|
-
|
|
348
|
+
|
|
349
|
+
exports.TOOL_EXECUTION_ERROR_SCHEMA_VERSION = TOOL_EXECUTION_ERROR_SCHEMA_VERSION; exports.SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS = SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS; exports.TOOL_EXECUTION_ERROR_SCHEMA_HEADER = TOOL_EXECUTION_ERROR_SCHEMA_HEADER; exports.DeeplineError = DeeplineError; exports.ToolExecutionError = ToolExecutionError; exports.brandAsToolExecutionError = brandAsToolExecutionError; exports.isProviderTransientFailure = isProviderTransientFailure; exports.ProviderTransientError = ProviderTransientError; exports.getProviderUnavailableReason = getProviderUnavailableReason; exports.isProviderUnavailable = isProviderUnavailable; exports.isProviderWaterfallUnavailableError = isProviderWaterfallUnavailableError; exports.brandAsProviderTransientError = brandAsProviderTransientError; exports.serializeToolExecutionFailure = serializeToolExecutionFailure; exports.deserializeToolExecutionFailure = deserializeToolExecutionFailure;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5V5Y37BC.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-RFB25DSQ.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
import {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkAD47BXN2js = require('./chunk-AD47BXN2.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -16,7 +16,7 @@ var _chunkFERRDNMOjs = require('./chunk-FERRDNMO.js');
|
|
|
16
16
|
var _chunkBQR6UN3Cjs = require('./chunk-BQR6UN3C.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
20
20
|
|
|
21
21
|
// src/cli/tool-features.ts
|
|
22
22
|
var VIEWS = {
|
|
@@ -31,7 +31,7 @@ var VIEWS = {
|
|
|
31
31
|
details: model,
|
|
32
32
|
lines: [
|
|
33
33
|
...unlisted,
|
|
34
|
-
...
|
|
34
|
+
..._chunkAD47BXN2js.formatModelDescription.call(void 0, model).trimEnd().split("\n")
|
|
35
35
|
]
|
|
36
36
|
};
|
|
37
37
|
},
|
|
@@ -92,7 +92,7 @@ async function found(lookup) {
|
|
|
92
92
|
try {
|
|
93
93
|
return await lookup;
|
|
94
94
|
} catch (error) {
|
|
95
|
-
if (error instanceof
|
|
95
|
+
if (error instanceof _chunkPPDBRJRWjs.DeeplineError && (error.statusCode === 404 || error.code === "PLAY_NOT_FOUND" || error.code === "NOT_FOUND")) {
|
|
96
96
|
return null;
|
|
97
97
|
}
|
|
98
98
|
throw error;
|
|
@@ -128,18 +128,18 @@ async function describeName(name, options, lookups) {
|
|
|
128
128
|
const features = toolFeatures(record2);
|
|
129
129
|
return {
|
|
130
130
|
described: {
|
|
131
|
-
...
|
|
131
|
+
..._chunkAD47BXN2js.describedTool.call(void 0, record2, name),
|
|
132
132
|
// Shown when the tool runs only on your own credentials; otherwise
|
|
133
133
|
// it is a feature, described with --feature byok.
|
|
134
134
|
..._optionalChain([byok, 'optionalAccess', _3 => _3.required]) === true ? { byok } : {},
|
|
135
135
|
...features.length ? { features: features.map(({ view: _view, ...feature }) => feature) } : {}
|
|
136
136
|
},
|
|
137
|
-
record:
|
|
137
|
+
record: _chunkAD47BXN2js.toolMetadataJsonForDescribe.call(void 0,
|
|
138
138
|
record2,
|
|
139
139
|
name,
|
|
140
140
|
lookups.seedStarterScript
|
|
141
141
|
),
|
|
142
|
-
schemas:
|
|
142
|
+
schemas: _chunkAD47BXN2js.publicToolSchemas.call(void 0, record2),
|
|
143
143
|
feature: (featureName, value) => {
|
|
144
144
|
const feature = features.find(({ name: name2 }) => name2 === featureName);
|
|
145
145
|
return feature ? describeFeature(record2, feature, value, {
|
|
@@ -1,17 +1,19 @@
|
|
|
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 _chunkD37FEBESjs = require('./chunk-D37FEBES.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
var _chunkNTVLGHFMjs = require('./chunk-NTVLGHFM.js');
|
|
7
8
|
|
|
8
|
-
var _chunk2XXXFPTDjs = require('./chunk-2XXXFPTD.js');
|
|
9
9
|
|
|
10
|
+
var _chunkLTFL4JRNjs = require('./chunk-LTFL4JRN.js');
|
|
10
11
|
|
|
11
|
-
var _chunkQ3PUHXOYjs = require('./chunk-Q3PUHXOY.js');
|
|
12
12
|
|
|
13
|
+
var _chunkNF4V5DTYjs = require('./chunk-NF4V5DTY.js');
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
|
|
16
|
+
var _chunkFVLNYDI4js = require('./chunk-FVLNYDI4.js');
|
|
15
17
|
|
|
16
18
|
// src/cli/commands/update.ts
|
|
17
19
|
var _child_process = require('child_process');
|
|
@@ -26,6 +28,7 @@ var _child_process = require('child_process');
|
|
|
26
28
|
|
|
27
29
|
var _fs = require('fs');
|
|
28
30
|
var _os = require('os');
|
|
31
|
+
var _promises = require('timers/promises');
|
|
29
32
|
|
|
30
33
|
|
|
31
34
|
|
|
@@ -210,6 +213,9 @@ function probeSdkSidecarEsbuild(versionDir) {
|
|
|
210
213
|
|
|
211
214
|
|
|
212
215
|
var UPDATE_PREFERENCES_SCHEMA_VERSION = 1;
|
|
216
|
+
function defaultHomeDir() {
|
|
217
|
+
return _optionalChain([process, 'access', _4 => _4.env, 'access', _5 => _5.HOME, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _os.homedir.call(void 0, );
|
|
218
|
+
}
|
|
213
219
|
var CLI_UPDATE_MESSAGES = [
|
|
214
220
|
{
|
|
215
221
|
id: "auto-update-default-v1",
|
|
@@ -236,7 +242,7 @@ function unreadablePreferences(path, error) {
|
|
|
236
242
|
acknowledgedMessages: CLI_UPDATE_MESSAGES.map(({ id }) => id)
|
|
237
243
|
};
|
|
238
244
|
}
|
|
239
|
-
function cliUpdatePreferencesPath(homeDir =
|
|
245
|
+
function cliUpdatePreferencesPath(homeDir = defaultHomeDir()) {
|
|
240
246
|
return _path.join.call(void 0,
|
|
241
247
|
homeDir,
|
|
242
248
|
".local",
|
|
@@ -245,7 +251,7 @@ function cliUpdatePreferencesPath(homeDir = _os.homedir.call(void 0, )) {
|
|
|
245
251
|
"update-preferences.json"
|
|
246
252
|
);
|
|
247
253
|
}
|
|
248
|
-
function readCliUpdatePreferences(homeDir =
|
|
254
|
+
function readCliUpdatePreferences(homeDir = defaultHomeDir()) {
|
|
249
255
|
const path = cliUpdatePreferencesPath(homeDir);
|
|
250
256
|
if (!_fs.existsSync.call(void 0, path)) return defaultPreferences();
|
|
251
257
|
try {
|
|
@@ -262,7 +268,7 @@ function readCliUpdatePreferences(homeDir = _os.homedir.call(void 0, )) {
|
|
|
262
268
|
return unreadablePreferences(path, error);
|
|
263
269
|
}
|
|
264
270
|
}
|
|
265
|
-
function writeCliUpdatePreferences(preferences, homeDir =
|
|
271
|
+
function writeCliUpdatePreferences(preferences, homeDir = defaultHomeDir()) {
|
|
266
272
|
const path = cliUpdatePreferencesPath(homeDir);
|
|
267
273
|
const tempPath = `${path}.${process.pid}.tmp`;
|
|
268
274
|
_fs.mkdirSync.call(void 0, _path.dirname.call(void 0, path), { recursive: true });
|
|
@@ -277,7 +283,7 @@ function writeCliUpdatePreferences(preferences, homeDir = _os.homedir.call(void
|
|
|
277
283
|
_fs.rmSync.call(void 0, tempPath, { force: true });
|
|
278
284
|
}
|
|
279
285
|
}
|
|
280
|
-
function setCliAutoUpdateEnabled(enabled, homeDir =
|
|
286
|
+
function setCliAutoUpdateEnabled(enabled, homeDir = defaultHomeDir()) {
|
|
281
287
|
const current = readCliUpdatePreferences(homeDir);
|
|
282
288
|
const next = {
|
|
283
289
|
...current,
|
|
@@ -287,7 +293,7 @@ function setCliAutoUpdateEnabled(enabled, homeDir = _os.homedir.call(void 0, ))
|
|
|
287
293
|
writeCliUpdatePreferences(next, homeDir);
|
|
288
294
|
return next;
|
|
289
295
|
}
|
|
290
|
-
function setCliPinnedVersion(version, homeDir =
|
|
296
|
+
function setCliPinnedVersion(version, homeDir = defaultHomeDir()) {
|
|
291
297
|
const next = {
|
|
292
298
|
...readCliUpdatePreferences(homeDir),
|
|
293
299
|
pinnedVersion: version
|
|
@@ -295,14 +301,14 @@ function setCliPinnedVersion(version, homeDir = _os.homedir.call(void 0, )) {
|
|
|
295
301
|
writeCliUpdatePreferences(next, homeDir);
|
|
296
302
|
return next;
|
|
297
303
|
}
|
|
298
|
-
function clearCliPinnedVersion(homeDir =
|
|
304
|
+
function clearCliPinnedVersion(homeDir = defaultHomeDir()) {
|
|
299
305
|
const current = readCliUpdatePreferences(homeDir);
|
|
300
306
|
if (current.pinnedVersion === null) return current;
|
|
301
307
|
const next = { ...current, pinnedVersion: null };
|
|
302
308
|
writeCliUpdatePreferences(next, homeDir);
|
|
303
309
|
return next;
|
|
304
310
|
}
|
|
305
|
-
function shouldRunCliAutoUpdate(homeDir =
|
|
311
|
+
function shouldRunCliAutoUpdate(homeDir = defaultHomeDir()) {
|
|
306
312
|
const preferences = readCliUpdatePreferences(homeDir);
|
|
307
313
|
return preferences.autoUpdateEnabled && preferences.pinnedVersion === null;
|
|
308
314
|
}
|
|
@@ -355,7 +361,7 @@ function buildSidecarProjectConfigCommand(versionDir, nodeBin) {
|
|
|
355
361
|
return `${shellQuote(nodeBin)} -e ${shellQuote(script)} ${shellQuote(versionDir)}`;
|
|
356
362
|
}
|
|
357
363
|
function sidecarStateDir(input) {
|
|
358
|
-
const scope = _optionalChain([input, 'access',
|
|
364
|
+
const scope = _optionalChain([input, 'access', _8 => _8.env, 'access', _9 => _9.DEEPLINE_CONFIG_SCOPE, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]);
|
|
359
365
|
if (!scope || scope.includes("/") || scope.includes("\\")) {
|
|
360
366
|
return null;
|
|
361
367
|
}
|
|
@@ -403,8 +409,8 @@ function resolvePythonSidecarUpdatePlan(options) {
|
|
|
403
409
|
}
|
|
404
410
|
const installMethod = readOptionalText(_path.join.call(void 0, stateDir, ".install-method"));
|
|
405
411
|
if (installMethod !== "python-sidecar") return null;
|
|
406
|
-
const scope = _optionalChain([options, 'access',
|
|
407
|
-
const hostUrl = _optionalChain([options, 'access',
|
|
412
|
+
const scope = _optionalChain([options, 'access', _12 => _12.env, 'access', _13 => _13.DEEPLINE_CONFIG_SCOPE, 'optionalAccess', _14 => _14.trim, 'call', _15 => _15()]) || "";
|
|
413
|
+
const hostUrl = _optionalChain([options, 'access', _16 => _16.env, 'access', _17 => _17.DEEPLINE_HOST_URL, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]) || "";
|
|
408
414
|
const nodeBin = readOptionalText(_path.join.call(void 0, stateDir, ".node-bin")) || process.execPath;
|
|
409
415
|
const sidecarPath = readOptionalText(_path.join.call(void 0, stateDir, ".command-path")) || _path.join.call(void 0,
|
|
410
416
|
stateDir,
|
|
@@ -476,7 +482,7 @@ function inferNpmGlobalPrefixFromEntrypoint(entrypoint, env) {
|
|
|
476
482
|
return prefix || null;
|
|
477
483
|
}
|
|
478
484
|
function normalizedNpmPrefix(value) {
|
|
479
|
-
const trimmed = _optionalChain([value, 'optionalAccess',
|
|
485
|
+
const trimmed = _optionalChain([value, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()]);
|
|
480
486
|
if (!trimmed) return null;
|
|
481
487
|
const normalized = (() => {
|
|
482
488
|
try {
|
|
@@ -489,7 +495,12 @@ function normalizedNpmPrefix(value) {
|
|
|
489
495
|
}
|
|
490
496
|
function resolveNpmGlobalPrefix(env) {
|
|
491
497
|
try {
|
|
492
|
-
const plan =
|
|
498
|
+
const plan = _chunkLTFL4JRNjs.resolveShellSpawn.call(void 0,
|
|
499
|
+
"npm",
|
|
500
|
+
["prefix", "-g"],
|
|
501
|
+
process.platform,
|
|
502
|
+
env
|
|
503
|
+
);
|
|
493
504
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
494
505
|
encoding: "utf8",
|
|
495
506
|
env,
|
|
@@ -545,8 +556,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
545
556
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
546
557
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
547
558
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
548
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
549
|
-
const npmGlobalInstallFlags =
|
|
559
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkD37FEBESjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
560
|
+
const npmGlobalInstallFlags = _chunkD37FEBESjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
550
561
|
const args = installPrefix ? [
|
|
551
562
|
"install",
|
|
552
563
|
"-g",
|
|
@@ -556,7 +567,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
556
567
|
packageSpec
|
|
557
568
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
558
569
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
559
|
-
_optionalChain([env, 'access',
|
|
570
|
+
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunkFVLNYDI4js.autoDetectBaseUrl.call(void 0, )
|
|
560
571
|
);
|
|
561
572
|
return {
|
|
562
573
|
kind: "npm-global",
|
|
@@ -636,24 +647,126 @@ function matchingAutoUpdateFailure(plan) {
|
|
|
636
647
|
return marker;
|
|
637
648
|
}
|
|
638
649
|
async function runAutomaticUpdatePlan(plan) {
|
|
639
|
-
|
|
640
|
-
|
|
650
|
+
try {
|
|
651
|
+
const installation = resolveUpdateInstallation(plan);
|
|
652
|
+
return await withUpdateLock(_nullishCoalesce(_optionalChain([installation, 'optionalAccess', _25 => _25.directory]), () => ( null)), async () => {
|
|
653
|
+
const previousFailure = matchingAutoUpdateFailure(plan);
|
|
654
|
+
if (previousFailure) {
|
|
655
|
+
process.stderr.write(
|
|
656
|
+
[
|
|
657
|
+
"Skipping Deepline SDK/CLI auto-update because this same update already failed on this machine.",
|
|
658
|
+
`Fix Node/npm native package installation issues, then run: ${previousFailure.manualCommand}`,
|
|
659
|
+
"Common causes include broken esbuild installs, node-gyp build toolchain errors, npm cache corruption, or registry/network failures.",
|
|
660
|
+
""
|
|
661
|
+
].join("\n")
|
|
662
|
+
);
|
|
663
|
+
return {
|
|
664
|
+
status: "skipped_previous_failure",
|
|
665
|
+
exitCode: previousFailure.exitCode || 1,
|
|
666
|
+
previousFailure
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
const targetVersion = _optionalChain([autoUpdatePackageSpec, 'call', _26 => _26(plan), 'access', _27 => _27.match, 'call', _28 => _28(
|
|
670
|
+
/^deepline@(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)$/
|
|
671
|
+
), 'optionalAccess', _29 => _29[1]]);
|
|
672
|
+
const installedVersion = installedUpdateVersion(installation);
|
|
673
|
+
if (targetVersion && parseSemver(installedVersion) && compareUpdateVersions(installedVersion, targetVersion) >= 0) {
|
|
674
|
+
return { status: "updated", exitCode: 0 };
|
|
675
|
+
}
|
|
676
|
+
const exitCode = await applyUpdatePlan(plan);
|
|
677
|
+
return exitCode === 0 ? { status: "updated", exitCode: 0 } : { status: "failed", exitCode };
|
|
678
|
+
});
|
|
679
|
+
} catch (error) {
|
|
641
680
|
process.stderr.write(
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
`Fix Node/npm native package installation issues, then run: ${previousFailure.manualCommand}`,
|
|
645
|
-
"Common causes include broken esbuild installs, node-gyp build toolchain errors, npm cache corruption, or registry/network failures.",
|
|
646
|
-
""
|
|
647
|
-
].join("\n")
|
|
681
|
+
`Could not complete the automatic Deepline CLI update: ${error instanceof Error ? error.message : String(error)}
|
|
682
|
+
`
|
|
648
683
|
);
|
|
649
|
-
return {
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
684
|
+
return { status: "failed", exitCode: 1 };
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
function parseSemver(version) {
|
|
688
|
+
const match = /^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/.exec(
|
|
689
|
+
version.trim()
|
|
690
|
+
);
|
|
691
|
+
if (!match) return null;
|
|
692
|
+
return {
|
|
693
|
+
major: Number(match[1]),
|
|
694
|
+
minor: Number(match[2]),
|
|
695
|
+
patch: Number(match[3]),
|
|
696
|
+
prerelease: _nullishCoalesce(match[4], () => ( ""))
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
function compareUpdateVersions(left, right) {
|
|
700
|
+
const a = parseSemver(left);
|
|
701
|
+
const b = parseSemver(right);
|
|
702
|
+
if (!a || !b) return left.localeCompare(right);
|
|
703
|
+
for (const key of ["major", "minor", "patch"]) {
|
|
704
|
+
if (a[key] !== b[key]) return a[key] > b[key] ? 1 : -1;
|
|
705
|
+
}
|
|
706
|
+
if (a.prerelease === b.prerelease) return 0;
|
|
707
|
+
if (!a.prerelease) return 1;
|
|
708
|
+
if (!b.prerelease) return -1;
|
|
709
|
+
return a.prerelease.localeCompare(b.prerelease);
|
|
710
|
+
}
|
|
711
|
+
function resolveUpdateInstallation(plan) {
|
|
712
|
+
if (plan.kind === "source" || plan.kind === "homebrew") return null;
|
|
713
|
+
const prefixIndex = plan.kind === "npm-global" ? plan.args.indexOf("--prefix") : -1;
|
|
714
|
+
const directory = plan.kind === "python-sidecar" ? plan.stateDir : _nullishCoalesce(_nullishCoalesce(plan.installPrefix, () => ( (prefixIndex >= 0 ? plan.args[prefixIndex + 1] : void 0))), () => ( resolveNpmGlobalPrefix(process.env)));
|
|
715
|
+
if (!directory)
|
|
716
|
+
throw new Error("Cannot determine the npm global installation to lock.");
|
|
717
|
+
return {
|
|
718
|
+
kind: plan.kind,
|
|
719
|
+
directory: _nullishCoalesce(normalizedNpmPrefix(directory), () => ( _path.resolve.call(void 0, directory)))
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
function installedUpdateVersion(installation) {
|
|
723
|
+
if (!installation) return "";
|
|
724
|
+
const { kind, directory } = installation;
|
|
725
|
+
if (kind === "python-sidecar") {
|
|
726
|
+
try {
|
|
727
|
+
const version = safeVersionSegment(
|
|
728
|
+
_fs.readFileSync.call(void 0, _path.join.call(void 0, directory, ".version"), "utf8")
|
|
729
|
+
);
|
|
730
|
+
return !version || sidecarStructureFailure(_path.join.call(void 0, directory, "versions", version)) ? "" : version;
|
|
731
|
+
} catch (e12) {
|
|
732
|
+
return "";
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
return installedPackageVersion(
|
|
736
|
+
process.platform === "win32" ? directory : _path.join.call(void 0, directory, "lib")
|
|
737
|
+
);
|
|
738
|
+
}
|
|
739
|
+
async function withUpdateLock(installationDirectory, action) {
|
|
740
|
+
if (!installationDirectory) return action();
|
|
741
|
+
_fs.mkdirSync.call(void 0, installationDirectory, { recursive: true });
|
|
742
|
+
const lockPath = _path.join.call(void 0, installationDirectory, ".deepline-update.lock");
|
|
743
|
+
const deadline = Date.now() + 12e4;
|
|
744
|
+
let waiting = false;
|
|
745
|
+
for (; ; ) {
|
|
746
|
+
try {
|
|
747
|
+
_fs.mkdirSync.call(void 0, lockPath, { mode: 448 });
|
|
748
|
+
break;
|
|
749
|
+
} catch (error) {
|
|
750
|
+
if (error.code !== "EEXIST") throw error;
|
|
751
|
+
if (Date.now() >= deadline) {
|
|
752
|
+
throw new Error(
|
|
753
|
+
`Timed out waiting for the Deepline CLI update lock at ${lockPath}. Check for an active installer before removing a lock left by an interrupted update.`
|
|
754
|
+
);
|
|
755
|
+
}
|
|
756
|
+
if (!waiting) {
|
|
757
|
+
process.stderr.write(
|
|
758
|
+
"Another Deepline CLI update is in progress; waiting for it to finish.\n"
|
|
759
|
+
);
|
|
760
|
+
waiting = true;
|
|
761
|
+
}
|
|
762
|
+
await _promises.setTimeout.call(void 0, 100);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
try {
|
|
766
|
+
return await action();
|
|
767
|
+
} finally {
|
|
768
|
+
_fs.rmSync.call(void 0, lockPath, { recursive: true });
|
|
654
769
|
}
|
|
655
|
-
const exitCode = await runUpdatePlan(plan);
|
|
656
|
-
return exitCode === 0 ? { status: "updated", exitCode: 0 } : { status: "failed", exitCode };
|
|
657
770
|
}
|
|
658
771
|
function safeVersionSegment(value) {
|
|
659
772
|
const normalized = value.trim();
|
|
@@ -679,7 +792,7 @@ function installedPackageVersion(versionDir) {
|
|
|
679
792
|
try {
|
|
680
793
|
const parsed = JSON.parse(_fs.readFileSync.call(void 0, packageJsonPath, "utf8"));
|
|
681
794
|
return typeof parsed.version === "string" ? safeVersionSegment(parsed.version) : "";
|
|
682
|
-
} catch (
|
|
795
|
+
} catch (e13) {
|
|
683
796
|
return "";
|
|
684
797
|
}
|
|
685
798
|
}
|
|
@@ -703,17 +816,17 @@ function sidecarInstallFailure(versionDir) {
|
|
|
703
816
|
function runCommand(command, args, env = process.env) {
|
|
704
817
|
return new Promise((resolveResult) => {
|
|
705
818
|
let output = "";
|
|
706
|
-
const plan =
|
|
819
|
+
const plan = _chunkLTFL4JRNjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
707
820
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
708
821
|
stdio: ["inherit", "pipe", "pipe"],
|
|
709
822
|
shell: plan.shell,
|
|
710
823
|
env
|
|
711
824
|
});
|
|
712
|
-
_optionalChain([child, 'access',
|
|
825
|
+
_optionalChain([child, 'access', _30 => _30.stdout, 'optionalAccess', _31 => _31.on, 'call', _32 => _32("data", (chunk) => {
|
|
713
826
|
output += chunk.toString();
|
|
714
827
|
process.stderr.write(chunk);
|
|
715
828
|
})]);
|
|
716
|
-
_optionalChain([child, 'access',
|
|
829
|
+
_optionalChain([child, 'access', _33 => _33.stderr, 'optionalAccess', _34 => _34.on, 'call', _35 => _35("data", (chunk) => {
|
|
717
830
|
output += chunk.toString();
|
|
718
831
|
process.stderr.write(chunk);
|
|
719
832
|
})]);
|
|
@@ -733,7 +846,7 @@ function isRegistryAccessFailure(output, registryUrl) {
|
|
|
733
846
|
let registryHost = "";
|
|
734
847
|
try {
|
|
735
848
|
registryHost = new URL(registryUrl).hostname;
|
|
736
|
-
} catch (
|
|
849
|
+
} catch (e14) {
|
|
737
850
|
return false;
|
|
738
851
|
}
|
|
739
852
|
if (!registryHost || !output.toLowerCase().includes(registryHost.toLowerCase())) {
|
|
@@ -968,7 +1081,7 @@ async function runPythonSidecarUpdatePlan(plan) {
|
|
|
968
1081
|
try {
|
|
969
1082
|
_fs.renameSync.call(void 0, backupDir, finalDir);
|
|
970
1083
|
backupDir = null;
|
|
971
|
-
} catch (
|
|
1084
|
+
} catch (e15) {
|
|
972
1085
|
}
|
|
973
1086
|
}
|
|
974
1087
|
process.stderr.write(
|
|
@@ -1014,6 +1127,13 @@ async function runPythonSidecarUpdatePlan(plan) {
|
|
|
1014
1127
|
return 0;
|
|
1015
1128
|
}
|
|
1016
1129
|
async function runUpdatePlan(plan) {
|
|
1130
|
+
const installation = resolveUpdateInstallation(plan);
|
|
1131
|
+
return withUpdateLock(
|
|
1132
|
+
_nullishCoalesce(_optionalChain([installation, 'optionalAccess', _36 => _36.directory]), () => ( null)),
|
|
1133
|
+
() => applyUpdatePlan(plan)
|
|
1134
|
+
);
|
|
1135
|
+
}
|
|
1136
|
+
async function applyUpdatePlan(plan) {
|
|
1017
1137
|
let exitCode = 1;
|
|
1018
1138
|
if (plan.kind === "npm-global") {
|
|
1019
1139
|
exitCode = await runNpmInstallWithRegistryFallback({
|
|
@@ -1038,7 +1158,7 @@ function normalizeBaseUrl(value) {
|
|
|
1038
1158
|
return value.replace(/\/$/, "");
|
|
1039
1159
|
}
|
|
1040
1160
|
function normalizePinnedVersion(value) {
|
|
1041
|
-
const normalized = _nullishCoalesce(_optionalChain([value, 'optionalAccess',
|
|
1161
|
+
const normalized = _nullishCoalesce(_optionalChain([value, 'optionalAccess', _37 => _37.trim, 'call', _38 => _38(), 'access', _39 => _39.replace, 'call', _40 => _40(/^v/, "")]), () => ( ""));
|
|
1042
1162
|
return /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(normalized) ? normalized : null;
|
|
1043
1163
|
}
|
|
1044
1164
|
async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
@@ -1069,7 +1189,7 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1069
1189
|
continue;
|
|
1070
1190
|
}
|
|
1071
1191
|
const metadata = await response.json();
|
|
1072
|
-
return _optionalChain([metadata, 'access',
|
|
1192
|
+
return _optionalChain([metadata, 'access', _41 => _41.deepline, 'optionalAccess', _42 => _42.updatePreferences]) === 1;
|
|
1073
1193
|
} catch (error) {
|
|
1074
1194
|
lastError = error instanceof Error ? error : new Error(String(error));
|
|
1075
1195
|
} finally {
|
|
@@ -1079,14 +1199,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1079
1199
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1080
1200
|
}
|
|
1081
1201
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1082
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1202
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkFVLNYDI4js.autoDetectBaseUrl));
|
|
1083
1203
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1084
1204
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1085
1205
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1086
1206
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1087
1207
|
process.stdout.write = (() => true);
|
|
1088
1208
|
try {
|
|
1089
|
-
const exitCode = await
|
|
1209
|
+
const exitCode = await _chunkNTVLGHFMjs.runSkillsCommand.call(void 0, { json: true });
|
|
1090
1210
|
if (exitCode !== 0) {
|
|
1091
1211
|
throw new Error(
|
|
1092
1212
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1157,11 +1277,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1157
1277
|
]
|
|
1158
1278
|
};
|
|
1159
1279
|
if (options.json && !options.executeWithJson) {
|
|
1160
|
-
|
|
1280
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1161
1281
|
return 0;
|
|
1162
1282
|
}
|
|
1163
1283
|
if (options.printCommand) {
|
|
1164
|
-
|
|
1284
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
1165
1285
|
{
|
|
1166
1286
|
...plan,
|
|
1167
1287
|
render: {
|
|
@@ -1174,7 +1294,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1174
1294
|
return 0;
|
|
1175
1295
|
}
|
|
1176
1296
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1177
|
-
|
|
1297
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1178
1298
|
return 0;
|
|
1179
1299
|
}
|
|
1180
1300
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1204,7 +1324,7 @@ To retry with full installer output, run: deepline skills
|
|
|
1204
1324
|
);
|
|
1205
1325
|
}
|
|
1206
1326
|
if (options.executeWithJson && options.json) {
|
|
1207
|
-
|
|
1327
|
+
_chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
|
|
1208
1328
|
{
|
|
1209
1329
|
ok: true,
|
|
1210
1330
|
pinnedVersion
|
|
@@ -1250,4 +1370,5 @@ Examples:
|
|
|
1250
1370
|
|
|
1251
1371
|
|
|
1252
1372
|
|
|
1253
|
-
|
|
1373
|
+
|
|
1374
|
+
exports.readCliUpdatePreferences = readCliUpdatePreferences; exports.setCliAutoUpdateEnabled = setCliAutoUpdateEnabled; exports.shouldRunCliAutoUpdate = shouldRunCliAutoUpdate; exports.canAutomaticallyApplyUpdatePlan = canAutomaticallyApplyUpdatePlan; exports.resolveUpdatePlan = resolveUpdatePlan; exports.runAutomaticUpdatePlan = runAutomaticUpdatePlan; exports.compareUpdateVersions = compareUpdateVersions; exports.runUpdatePlan = runUpdatePlan; exports.publishedVersionSupportsPin = publishedVersionSupportsPin; exports.runUpdateCommand = runUpdateCommand; exports.registerUpdateCommand = registerUpdateCommand;
|