deepline 0.3.535 → 0.3.537
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +232 -147
- package/dist/bundling-sources/sdk/src/index.ts +4 -0
- package/dist/bundling-sources/sdk/src/plays/local-file-discovery.ts +27 -1
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +16 -5
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +2 -23
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +26 -14
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts +33 -8
- package/dist/bundling-sources/shared_libs/monitors/fleets/count-drift-alert.ts +121 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +14 -82
- package/dist/bundling-sources/shared_libs/monitors/package.json +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +22 -4
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +0 -26
- package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +21 -31
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +88 -96
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +12 -10
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +71 -2
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +127 -9
- package/dist/bundling-sources/shared_libs/play-runtime/memory-ledger.ts +15 -2
- package/dist/bundling-sources/shared_libs/play-runtime/prebuilt-result-quality.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/fixture-capacity-simulator.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/gradient2-concurrency-controller.ts +41 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-capacity-policy.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-concurrency-policy.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +5 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +8 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +31 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +11 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +73 -18
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +169 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +26 -4
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +84 -49
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -32
- package/dist/bundling-sources/shared_libs/plays/launch/input-contract.ts +13 -1
- package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +68 -1
- package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +57 -1
- package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +22 -9
- package/dist/cli/{auth-ZCTMB5RA.mjs → auth-4SUPGDIM.mjs} +7 -7
- package/dist/cli/auth-Y2K2ZYYA.js +43 -0
- package/dist/cli/{billing-OU2ZHL72.mjs → billing-5JUA3ZM3.mjs} +185 -24
- package/dist/cli/{billing-GVFKZQH3.js → billing-SQU726P7.js} +273 -112
- package/dist/cli/{chunk-T2N3B7IQ.js → chunk-2GJZLIKW.js} +8 -8
- package/dist/cli/{chunk-ZUVE63Y7.js → chunk-2Q7VXTMS.js} +2 -2
- package/dist/cli/{chunk-WAIBM6KX.mjs → chunk-37AZHCTP.mjs} +5 -5
- package/dist/cli/{chunk-D4MHCCIR.js → chunk-3PMCQ3LK.js} +33 -33
- package/dist/cli/{chunk-R4RG4FV5.mjs → chunk-4KWD3MX2.mjs} +13 -10
- package/dist/cli/{chunk-PI5R65OQ.js → chunk-5EOEJKSV.js} +1 -1
- package/dist/cli/{chunk-XSOTEVOB.js → chunk-6BBGUQJJ.js} +50 -141
- package/dist/cli/{chunk-OM732MGV.js → chunk-ALHKB3AE.js} +17 -17
- package/dist/cli/{chunk-6LHX33VN.js → chunk-AVQET3NR.js} +9 -6
- package/dist/cli/{chunk-W6T23EUC.mjs → chunk-AX2OAXDL.mjs} +1 -1
- package/dist/cli/{chunk-SQWET4SL.js → chunk-BBTKAASQ.js} +2 -1
- package/dist/cli/{chunk-G2DLG32W.mjs → chunk-BFHR7IC2.mjs} +40 -27
- package/dist/cli/{chunk-KWGXHPHL.js → chunk-BGXEMTIG.js} +523 -59
- package/dist/cli/{chunk-AUEUAPVS.mjs → chunk-BRRCWUOW.mjs} +1 -1
- package/dist/cli/{chunk-QYBAHYP4.mjs → chunk-C37VELBR.mjs} +7 -9
- package/dist/cli/{chunk-H6SWS5CG.mjs → chunk-C3XD2WHM.mjs} +2 -2
- package/dist/cli/{chunk-NRO3NTVO.js → chunk-CBV7AKWM.js} +5 -5
- package/dist/cli/{chunk-CIDATNTY.js → chunk-CFND2ACL.js} +16 -16
- package/dist/cli/{chunk-J75DANZY.mjs → chunk-CGDW2CRR.mjs} +2 -2
- package/dist/cli/{chunk-RFQWSH6I.js → chunk-CHIGEDAE.js} +3 -3
- package/dist/cli/{chunk-QNHHZ63P.mjs → chunk-CQBIO6HW.mjs} +1 -1
- package/dist/cli/{chunk-2KHUFWTK.js → chunk-CQDQNZGH.js} +42 -37
- package/dist/cli/{chunk-E3CLOVG5.mjs → chunk-CXTW7SRW.mjs} +50 -141
- package/dist/cli/{chunk-4NLRWKZB.js → chunk-D77W6Q67.js} +26 -26
- package/dist/cli/{chunk-JWWYLGUT.mjs → chunk-EEFSUCYP.mjs} +475 -11
- package/dist/cli/{chunk-STR5LXK4.mjs → chunk-FSIVF2SI.mjs} +1 -1
- package/dist/cli/{chunk-6TYRRNXY.mjs → chunk-GI3V4D7K.mjs} +2 -2
- package/dist/cli/{chunk-DFJODFMC.mjs → chunk-GPMS6OPX.mjs} +5 -5
- package/dist/cli/{chunk-5YAJGRWB.js → chunk-IPVRMYWT.js} +7 -7
- package/dist/cli/{chunk-DAPKLYST.js → chunk-IQOIT6E3.js} +41 -41
- package/dist/cli/{chunk-ZPGGW27Q.mjs → chunk-JL2OTMSG.mjs} +1 -0
- package/dist/cli/{chunk-FGN75ZN6.js → chunk-JMHYDDBQ.js} +390 -382
- package/dist/cli/{chunk-KA6ZERJL.js → chunk-JS2SBCWD.js} +6 -6
- package/dist/cli/{chunk-W5YJYU4G.mjs → chunk-K4WJ4BYO.mjs} +2 -2
- package/dist/cli/{chunk-LVISZFYO.mjs → chunk-KH27B2HJ.mjs} +2 -2
- package/dist/cli/{chunk-UUQ2OXMH.js → chunk-KULT6O5K.js} +18 -20
- package/dist/cli/{chunk-YFZLZNTH.mjs → chunk-L3JVGNAT.mjs} +4 -4
- package/dist/cli/{chunk-HYBZWSSH.js → chunk-L6QAIZNZ.js} +44 -44
- package/dist/cli/{chunk-TCVCFZP6.mjs → chunk-NU7B5X6J.mjs} +4 -1
- package/dist/cli/{chunk-7PXP2FQK.js → chunk-NXGLJGPB.js} +2 -2
- package/dist/cli/{chunk-BNH4Y35W.mjs → chunk-OLH2PHMC.mjs} +2 -2
- package/dist/cli/{chunk-GESIFFQX.mjs → chunk-OVX3Q5Q3.mjs} +1 -1
- package/dist/cli/{chunk-2D6SWQTK.js → chunk-PJ4ZGZAN.js} +13 -13
- package/dist/cli/{chunk-HWPOXCCK.js → chunk-PU42VOBI.js} +8 -8
- package/dist/cli/{chunk-RKY4LBX3.mjs → chunk-QDBGPRR2.mjs} +3 -3
- package/dist/cli/{chunk-KOZBZPRM.js → chunk-QPDLG7DQ.js} +55 -55
- package/dist/cli/{chunk-DWPY6ZID.mjs → chunk-R7JYG6XO.mjs} +1 -1
- package/dist/cli/{chunk-K76AEBFY.mjs → chunk-RMVZTBI5.mjs} +4 -4
- package/dist/cli/{chunk-IF75RD6U.js → chunk-U2LVWCTD.js} +18 -6
- package/dist/cli/{chunk-WNNA4L6Z.js → chunk-UGA5KI4A.js} +22 -22
- package/dist/cli/{chunk-ZS2WHWWL.js → chunk-UNDLNT3V.js} +1 -1
- package/dist/cli/{chunk-7CWSAEYS.mjs → chunk-V5IIBG2E.mjs} +1 -1
- package/dist/cli/{chunk-BF65LB7X.mjs → chunk-VP2K5B3R.mjs} +4 -4
- package/dist/cli/{chunk-DYIWDUY4.js → chunk-VRYX2BR4.js} +316 -303
- package/dist/cli/{chunk-R2KKEHJN.mjs → chunk-W3J3LT22.mjs} +5 -5
- package/dist/cli/{chunk-PHLNYBAA.js → chunk-WBFOV5HT.js} +5 -5
- package/dist/cli/{chunk-5EKNDNFQ.js → chunk-WBTYWJLN.js} +2 -2
- package/dist/cli/{chunk-C374C22Y.js → chunk-WOQO3GV4.js} +14 -11
- package/dist/cli/{chunk-K3IPGMGP.js → chunk-XDS26J7Z.js} +17 -19
- package/dist/cli/{chunk-JQQG4QL4.mjs → chunk-Y6AMMXWS.mjs} +3 -3
- package/dist/cli/{chunk-7R5DAANG.mjs → chunk-Z2PPB3IO.mjs} +1 -1
- package/dist/cli/{chunk-FKD3KL5Q.mjs → chunk-Z2XA6YU4.mjs} +10 -5
- package/dist/cli/{chunk-243O3FH5.js → chunk-ZFSB7GXF.js} +5 -5
- package/dist/cli/{chunk-MI6ZP7XI.mjs → chunk-ZG7BOECV.mjs} +18 -6
- package/dist/cli/{chunk-FZKPPB5P.mjs → chunk-ZHPSJ3LJ.mjs} +85 -77
- package/dist/cli/{chunk-K53NKWZO.mjs → chunk-ZUAMXZXC.mjs} +13 -15
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-CLPVMIRF.mjs → csv-HZP6QMG7.mjs} +6 -6
- package/dist/cli/{csv-CD55KEIO.js → csv-JITYN27L.js} +15 -15
- package/dist/cli/{db-MQKLDAEO.js → db-FYSRB7O4.js} +36 -36
- package/dist/cli/{db-AU4SMWUN.mjs → db-QRIRTOMM.mjs} +9 -9
- package/dist/cli/describe-LSOHOLFI.js +49 -0
- package/dist/cli/describe-REXJVJC3.mjs +49 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +5 -5
- package/dist/cli/describe-core.mjs +4 -4
- package/dist/cli/{executions-TFIJPUX7.mjs → executions-53KJAFOW.mjs} +9 -9
- package/dist/cli/{executions-77GOLWRM.js → executions-BSTF4DDS.js} +11 -11
- package/dist/cli/{feedback-OV5YAL3A.js → feedback-6MW3QOXX.js} +16 -16
- package/dist/cli/{feedback-2WRSZ5WL.mjs → feedback-CWUJJF3J.mjs} +8 -8
- package/dist/cli/{git-VNS4ATLZ.mjs → git-CKVZTJFS.mjs} +7 -7
- package/dist/cli/git-S7SWUZ3T.js +25 -0
- package/dist/cli/index.js +151 -157
- package/dist/cli/index.mjs +51 -57
- package/dist/cli/{legacy-noops-HDOB5C6F.js → legacy-noops-QBL4PNGB.js} +11 -11
- package/dist/cli/{legacy-noops-C732QDCY.mjs → legacy-noops-USTBRFRX.mjs} +8 -8
- package/dist/cli/{monitors-2LYEFXOU.mjs → monitors-6UCG5D7W.mjs} +19 -16
- package/dist/cli/{monitors-5IUMHH3E.js → monitors-VCR6SUZD.js} +125 -122
- package/dist/cli/{org-G4YGZPHS.mjs → org-GSRBOJVO.mjs} +9 -9
- package/dist/cli/{org-ADW2EVAC.js → org-HPILTEG4.js} +89 -89
- package/dist/cli/{play-7GQ56C2D.mjs → play-QRTYQNG4.mjs} +123 -76
- package/dist/cli/{play-EHSOSSHT.js → play-TK7WOP5H.js} +641 -594
- package/dist/cli/{providers-PWCF6OOO.js → providers-HEXNJ5QC.js} +12 -12
- package/dist/cli/{providers-WL3YTCSV.mjs → providers-OAQJWVBS.mjs} +9 -9
- package/dist/cli/{quickstart-323XOPGI.mjs → quickstart-FFVHTPSP.mjs} +6 -6
- package/dist/cli/{quickstart-ZKI5MURA.js → quickstart-PYZTFXZX.js} +8 -8
- package/dist/cli/{run-XZPWA6JS.js → run-4DWJXJRO.js} +50 -53
- package/dist/cli/{run-ZCNZU3K2.mjs → run-HLN6YYZH.mjs} +31 -34
- package/dist/cli/search-WERQBC6V.js +32 -0
- package/dist/cli/{search-CVLVSFMJ.mjs → search-ZHRCXGEL.mjs} +10 -11
- package/dist/cli/{search-output-7HRSSRBS.js → search-output-2KY6PFDH.js} +8 -8
- package/dist/cli/{search-output-6PY6RN2R.mjs → search-output-N7QXACVK.mjs} +6 -6
- package/dist/cli/{secrets-6S2ZWDIM.mjs → secrets-FKMWBLHU.mjs} +9 -9
- package/dist/cli/{secrets-IYD5VKY4.js → secrets-WXQ7XO5C.js} +18 -18
- package/dist/cli/{sessions-GVEX5TUJ.mjs → sessions-3YDTEDA5.mjs} +8 -8
- package/dist/cli/sessions-LXQ4Q6BS.js +22 -0
- package/dist/cli/{settings-CANK4HJQ.js → settings-67TWLQ6E.js} +88 -89
- package/dist/cli/{settings-BN5MJZ3C.mjs → settings-JTPASUZN.mjs} +15 -16
- package/dist/cli/{setup-YSGKGLSJ.js → setup-KUERQJUX.js} +51 -52
- package/dist/cli/{setup-JNMSCCU4.mjs → setup-VYNGXUJ6.mjs} +11 -12
- package/dist/cli/skills-EFRLHY3F.js +36 -0
- package/dist/cli/{skills-QCQN2UM2.mjs → skills-KI4KYHH6.mjs} +9 -10
- package/dist/cli/tools-C3EIGFFP.js +56 -0
- package/dist/cli/{tools-CDPOID7V.mjs → tools-UQDJS2RS.mjs} +20 -21
- package/dist/cli/{update-D3ZERUQ3.mjs → update-7FQQUBOD.mjs} +11 -12
- package/dist/cli/update-KCY72RXH.js +34 -0
- package/dist/cli/{views-RDZRWQBQ.mjs → views-JAM4MNNV.mjs} +54 -10
- package/dist/cli/{views-4NV2KQKA.js → views-MJK7JGZG.js} +66 -22
- package/dist/cli/{workflow-RABJCAZC.js → workflow-AQPRIWQX.js} +20 -20
- package/dist/cli/{workflow-2CG3TVCG.mjs → workflow-TQRV5FGO.mjs} +10 -10
- package/dist/{client-DhSvMO3A.d.mts → client-BlLYQDNo.d.mts} +1 -1
- package/dist/{client-oGNJMQFd.d.ts → client-DSQlkIDO.d.ts} +1 -1
- package/dist/{client-core-CdWH6Sii.d.ts → client-core-CDwapXy5.d.ts} +159 -108
- package/dist/{client-core-CVG1Et-4.d.mts → client-core-rX7n2H8U.d.mts} +159 -108
- package/dist/{compiler-manifest-D2ZlBGxj.d.ts → compiler-manifest-BHNC4RL-.d.mts} +15 -22
- package/dist/{compiler-manifest-D2ZlBGxj.d.mts → compiler-manifest-BHNC4RL-.d.ts} +15 -22
- package/dist/{errors-B-gOQdj-.d.mts → errors-D7sPXrvB.d.mts} +1 -1
- package/dist/{errors-CB0KAmmV.d.ts → errors-lhtIWG5Z.d.ts} +1 -1
- package/dist/{index-c3nvUGCS.d.ts → index-CQTBHXHr.d.ts} +1 -1
- package/dist/{index-BbJADro4.d.mts → index-NaDZq2xf.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +15 -15
- package/dist/index.mjs +11 -11
- package/dist/install-integrity.json +129 -132
- package/dist/monitor-fleet-contract.d.mts +17 -11
- package/dist/monitor-fleet-contract.d.ts +17 -11
- package/dist/monitor-fleet-contract.js +3 -3
- package/dist/monitor-fleet-contract.mjs +2 -2
- package/dist/monitor-input-contract.js +2 -2
- package/dist/monitor-input-contract.mjs +1 -1
- 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 +17 -5
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +3 -3
- package/dist/plays/run-request.mjs +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +12 -12
- package/dist/server.mjs +6 -6
- package/package.json +1 -1
- package/dist/cli/auth-VDCU3T6A.js +0 -43
- package/dist/cli/chunk-4QELPWUW.mjs +0 -405
- package/dist/cli/chunk-T7RBM2WX.js +0 -405
- package/dist/cli/describe-5BFNHT5V.js +0 -50
- package/dist/cli/describe-AWJUXE2U.mjs +0 -50
- package/dist/cli/git-HGMX52XU.js +0 -25
- package/dist/cli/pages-KXKWSCEV.mjs +0 -266
- package/dist/cli/pages-VTJGAI2D.js +0 -266
- package/dist/cli/search-J6EY7DQN.js +0 -33
- package/dist/cli/sessions-7HPIVSQ4.js +0 -22
- package/dist/cli/skills-WDGSSKJZ.js +0 -37
- package/dist/cli/tools-URNVXSTZ.js +0 -57
- package/dist/cli/update-Q6JW32IA.js +0 -35
|
@@ -1,15 +1,15 @@
|
|
|
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
|
-
var
|
|
3
|
+
var _chunk2Q7VXTMSjs = require('./chunk-2Q7VXTMS.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkBGXEMTIGjs = require('./chunk-BGXEMTIG.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk3PMCQ3LKjs = require('./chunk-3PMCQ3LK.js');
|
|
13
13
|
|
|
14
14
|
// src/cli/commands/sessions.ts
|
|
15
15
|
|
|
@@ -55,7 +55,7 @@ function codexSessionsRoot() {
|
|
|
55
55
|
}
|
|
56
56
|
function listClaudeSessionFiles() {
|
|
57
57
|
const files = [];
|
|
58
|
-
for (const root of
|
|
58
|
+
for (const root of _chunk3PMCQ3LKjs.claudeProjectsRoots.call(void 0, )) {
|
|
59
59
|
files.push(...listClaudeSessionFilesIn(root));
|
|
60
60
|
}
|
|
61
61
|
return files;
|
|
@@ -147,7 +147,7 @@ function currentSessionFile(agent) {
|
|
|
147
147
|
const newestFirst = listSessionFiles(agent).sort(
|
|
148
148
|
(a, b) => b.mtimeMs - a.mtimeMs
|
|
149
149
|
);
|
|
150
|
-
const sessionId =
|
|
150
|
+
const sessionId = _chunk3PMCQ3LKjs.agentSessionIdFromEnvironment.call(void 0,
|
|
151
151
|
process.env,
|
|
152
152
|
agent === "auto" ? void 0 : agent === "claude" ? "claude_code" : "codex"
|
|
153
153
|
);
|
|
@@ -156,7 +156,7 @@ function currentSessionFile(agent) {
|
|
|
156
156
|
(candidate) => candidate.sessionId === sessionId
|
|
157
157
|
);
|
|
158
158
|
if (named) return named;
|
|
159
|
-
const cowork = agent === "codex" ? null :
|
|
159
|
+
const cowork = agent === "codex" ? null : _chunk3PMCQ3LKjs.coworkTranscriptFromEnvironment.call(void 0, );
|
|
160
160
|
const coworkStat = cowork ? statIfReadable(cowork.filePath) : null;
|
|
161
161
|
if (cowork && coworkStat) {
|
|
162
162
|
return { agent: "claude", ...cowork, mtimeMs: coworkStat.mtimeMs };
|
|
@@ -166,7 +166,7 @@ function currentSessionFile(agent) {
|
|
|
166
166
|
), () => ( newestFirst[0])), () => ( null));
|
|
167
167
|
}
|
|
168
168
|
function feedbackAgentSessionId(agentRuntime) {
|
|
169
|
-
return _nullishCoalesce(
|
|
169
|
+
return _nullishCoalesce(_chunk3PMCQ3LKjs.agentSessionIdFromEnvironment.call(void 0, process.env, agentRuntime), () => ( (agentRuntime === "claude_cowork" || agentRuntime === "claude_code" ? _nullishCoalesce(_optionalChain([_chunk3PMCQ3LKjs.coworkTranscriptFromEnvironment.call(void 0, ), 'optionalAccess', _17 => _17.sessionId]), () => ( null)) : null)));
|
|
170
170
|
}
|
|
171
171
|
function sessionStartedInDirectory(candidate, cwd) {
|
|
172
172
|
if (candidate.agent === "claude") {
|
|
@@ -215,7 +215,7 @@ function readCodexSessionId(filePath) {
|
|
|
215
215
|
return null;
|
|
216
216
|
}
|
|
217
217
|
function sessionSearchDescription(agent) {
|
|
218
|
-
const claude =
|
|
218
|
+
const claude = _chunk3PMCQ3LKjs.claudeProjectsRoots.call(void 0, ).map((root) => _path.join.call(void 0, root, "*", "<session-id>.jsonl")).join(", ");
|
|
219
219
|
if (agent === "claude") return claude;
|
|
220
220
|
if (agent === "codex") return "~/.codex/sessions/**/*.jsonl";
|
|
221
221
|
return `${claude} or ~/.codex/sessions/**/*.jsonl`;
|
|
@@ -472,7 +472,7 @@ function buildSessionUploadContent(raw) {
|
|
|
472
472
|
return { encodedContent: encoded, needsChunking: true };
|
|
473
473
|
}
|
|
474
474
|
async function uploadPayload(path, payload) {
|
|
475
|
-
const { http } =
|
|
475
|
+
const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
|
|
476
476
|
return await http.post(path, payload);
|
|
477
477
|
}
|
|
478
478
|
async function uploadChunkedSessions(sessions, options) {
|
|
@@ -550,7 +550,7 @@ async function uploadAgentSession(agentRuntime) {
|
|
|
550
550
|
return target.sessionId;
|
|
551
551
|
}
|
|
552
552
|
async function handleSessionsSend(options) {
|
|
553
|
-
if (
|
|
553
|
+
if (_chunk2Q7VXTMSjs.rejectRestrictedFeedback.call(void 0, options)) return;
|
|
554
554
|
const rating = parseSessionRating(options.rating);
|
|
555
555
|
if (options.file) {
|
|
556
556
|
const filePath = _path.resolve.call(void 0, options.file);
|
|
@@ -562,7 +562,7 @@ async function handleSessionsSend(options) {
|
|
|
562
562
|
filename: _path.basename.call(void 0, filePath),
|
|
563
563
|
...rating ? { rating } : {}
|
|
564
564
|
});
|
|
565
|
-
|
|
565
|
+
_chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
|
|
566
566
|
{
|
|
567
567
|
...response2,
|
|
568
568
|
ok: true,
|
|
@@ -594,7 +594,7 @@ async function handleSessionsSend(options) {
|
|
|
594
594
|
labeled: Boolean(_optionalChain([options, 'access', _27 => _27.label, 'optionalAccess', _28 => _28.length]))
|
|
595
595
|
});
|
|
596
596
|
const sessionIds = built.map((session) => session.sessionId);
|
|
597
|
-
|
|
597
|
+
_chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
|
|
598
598
|
{
|
|
599
599
|
...response,
|
|
600
600
|
ok: true,
|
|
@@ -702,7 +702,7 @@ ${refreshMeta}
|
|
|
702
702
|
</body>
|
|
703
703
|
</html>`;
|
|
704
704
|
_fs.writeFileSync.call(void 0, outputPath, html, "utf8");
|
|
705
|
-
|
|
705
|
+
_chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
|
|
706
706
|
{
|
|
707
707
|
ok: true,
|
|
708
708
|
file: outputPath,
|
|
@@ -1,10 +1,10 @@
|
|
|
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 _chunk3PMCQ3LKjs = require('./chunk-3PMCQ3LK.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk2GJZLIKWjs = require('./chunk-2GJZLIKW.js');
|
|
8
8
|
|
|
9
9
|
// src/config.ts
|
|
10
10
|
|
|
@@ -382,7 +382,7 @@ function resolveBaseUrlOnly(options) {
|
|
|
382
382
|
_optionalChain([options, 'optionalAccess', _36 => _36.baseUrl, 'optionalAccess', _37 => _37.trim, 'call', _38 => _38()]) || autoDetectBaseUrl()
|
|
383
383
|
);
|
|
384
384
|
if (!baseUrl) {
|
|
385
|
-
throw new (0,
|
|
385
|
+
throw new (0, _chunk2GJZLIKWjs.ConfigError)(
|
|
386
386
|
`Invalid ${HOST_URL_ENV}. Expected an http(s) URL such as https://code.deepline.com.`
|
|
387
387
|
);
|
|
388
388
|
}
|
|
@@ -393,13 +393,13 @@ function resolveConfig(options) {
|
|
|
393
393
|
_optionalChain([options, 'optionalAccess', _39 => _39.baseUrl, 'optionalAccess', _40 => _40.trim, 'call', _41 => _41()]) || autoDetectBaseUrl()
|
|
394
394
|
);
|
|
395
395
|
if (!baseUrl) {
|
|
396
|
-
throw new (0,
|
|
396
|
+
throw new (0, _chunk2GJZLIKWjs.ConfigError)(
|
|
397
397
|
`Invalid ${HOST_URL_ENV}. Expected an http(s) URL such as https://code.deepline.com.`
|
|
398
398
|
);
|
|
399
399
|
}
|
|
400
400
|
const apiKey = resolveApiKeyForBaseUrl(baseUrl, _optionalChain([options, 'optionalAccess', _42 => _42.apiKey]));
|
|
401
401
|
if (!apiKey) {
|
|
402
|
-
throw new (0,
|
|
402
|
+
throw new (0, _chunk2GJZLIKWjs.ConfigError)(
|
|
403
403
|
`No API key found. Set ${API_KEY_ENV}, add it to .env.deepline, or run: deepline auth register`
|
|
404
404
|
);
|
|
405
405
|
}
|
|
@@ -502,7 +502,7 @@ function findNearestGitCommonDir(startDir) {
|
|
|
502
502
|
function saveProjectDeeplineEnvValues(values, startDir = process.cwd()) {
|
|
503
503
|
const target = resolveProjectPinTarget(startDir);
|
|
504
504
|
if (!target.ok) {
|
|
505
|
-
throw new (0,
|
|
505
|
+
throw new (0, _chunk2GJZLIKWjs.ConfigError)(
|
|
506
506
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
507
507
|
", "
|
|
508
508
|
)}. Set CLAUDE_PROJECT_DIR or cd into the intended project folder before running this command.`
|
|
@@ -711,7 +711,7 @@ function readSkillsVersionFile(path) {
|
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
function resolveAutoSyncSkillAgents() {
|
|
714
|
-
switch (
|
|
714
|
+
switch (_chunk3PMCQ3LKjs.detectAgentRuntime.call(void 0, )) {
|
|
715
715
|
case "codex":
|
|
716
716
|
return ["codex"];
|
|
717
717
|
case "claude_code":
|
|
@@ -781,7 +781,7 @@ function writeSdkSkillsLocalVersion(baseUrl, version, agents) {
|
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
// src/http.ts
|
|
784
|
-
var HttpClient2 = class extends
|
|
784
|
+
var HttpClient2 = class extends _chunk3PMCQ3LKjs.HttpClient {
|
|
785
785
|
constructor(config) {
|
|
786
786
|
super(config, readSdkSkillsLocalVersion);
|
|
787
787
|
}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
AuthError,
|
|
3
3
|
RateLimitError,
|
|
4
4
|
ToolRateLimitError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CQBIO6HW.mjs";
|
|
6
6
|
import {
|
|
7
7
|
apiErrorCodeFromResponse,
|
|
8
8
|
apiErrorMessage
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
attachToolUpstreamResponse,
|
|
15
15
|
deserializeToolExecutionFailure,
|
|
16
16
|
serializeToolExecutionFailure
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JL2OTMSG.mjs";
|
|
18
18
|
import {
|
|
19
19
|
SDK_RELEASE
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-V5IIBG2E.mjs";
|
|
21
21
|
|
|
22
22
|
// src/version.ts
|
|
23
23
|
var SDK_VERSION = SDK_RELEASE.version;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkBGXEMTIGjs = require('./chunk-BGXEMTIG.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -22,17 +22,17 @@ var _chunkKWGXHPHLjs = require('./chunk-KWGXHPHL.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkPU42VOBIjs = require('./chunk-PU42VOBI.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunk3PMCQ3LKjs = require('./chunk-3PMCQ3LK.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
|
|
36
36
|
|
|
37
37
|
// src/cli/commands/auth.ts
|
|
38
38
|
|
|
@@ -60,7 +60,7 @@ function statusBannerLine(value) {
|
|
|
60
60
|
return `Service notice: ${banner.message}`;
|
|
61
61
|
}
|
|
62
62
|
function envFilePath(baseUrl) {
|
|
63
|
-
return
|
|
63
|
+
return _chunkPU42VOBIjs.hostEnvFilePath.call(void 0, baseUrl);
|
|
64
64
|
}
|
|
65
65
|
function normalizeAuthScope(value) {
|
|
66
66
|
if (!value || value === "global") return "global";
|
|
@@ -73,7 +73,7 @@ function parseAuthScope(args) {
|
|
|
73
73
|
}
|
|
74
74
|
function pendingClaimPath(baseUrl, scope) {
|
|
75
75
|
if (scope === "folder") {
|
|
76
|
-
const target =
|
|
76
|
+
const target = _chunkPU42VOBIjs.resolveProjectPinTarget.call(void 0, );
|
|
77
77
|
if (!target.ok) {
|
|
78
78
|
throw new Error(
|
|
79
79
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -83,10 +83,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
83
83
|
}
|
|
84
84
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
85
85
|
}
|
|
86
|
-
return `${
|
|
86
|
+
return `${_chunkPU42VOBIjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
87
87
|
}
|
|
88
88
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
89
|
-
return `${
|
|
89
|
+
return `${_chunkPU42VOBIjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
90
90
|
}
|
|
91
91
|
function savePendingClaim(baseUrl, claim) {
|
|
92
92
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -191,21 +191,21 @@ function parseRegisterWaitMode(args) {
|
|
|
191
191
|
function shouldWaitForRegisterClaim(mode) {
|
|
192
192
|
if (mode === "yes") return true;
|
|
193
193
|
if (mode === "no") return false;
|
|
194
|
-
return
|
|
194
|
+
return _chunk3PMCQ3LKjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
195
195
|
}
|
|
196
196
|
function saveEnvValues(values, baseUrl, scope) {
|
|
197
197
|
const filtered = {
|
|
198
|
-
...values[
|
|
199
|
-
...values[
|
|
200
|
-
...values[
|
|
201
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
198
|
+
...values[_chunkPU42VOBIjs.HOST_URL_ENV] ? { [_chunkPU42VOBIjs.HOST_URL_ENV]: values[_chunkPU42VOBIjs.HOST_URL_ENV] } : {},
|
|
199
|
+
...values[_chunkPU42VOBIjs.API_KEY_ENV] ? { [_chunkPU42VOBIjs.API_KEY_ENV]: values[_chunkPU42VOBIjs.API_KEY_ENV] } : {},
|
|
200
|
+
...values[_chunkPU42VOBIjs.ACTIVE_ORG_ID_ENV] ? { [_chunkPU42VOBIjs.ACTIVE_ORG_ID_ENV]: values[_chunkPU42VOBIjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
201
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkPU42VOBIjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkPU42VOBIjs.ACTIVE_ORG_NAME_ENV]: values[_chunkPU42VOBIjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
202
202
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
203
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
203
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkPU42VOBIjs.FEATURES_ENV) ? { [_chunkPU42VOBIjs.FEATURES_ENV]: values[_chunkPU42VOBIjs.FEATURES_ENV] } : {}
|
|
204
204
|
};
|
|
205
205
|
if (scope === "folder") {
|
|
206
|
-
|
|
206
|
+
_chunkPU42VOBIjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
207
207
|
} else {
|
|
208
|
-
|
|
208
|
+
_chunkPU42VOBIjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
function activeOrgEnvValues(data) {
|
|
@@ -213,21 +213,21 @@ function activeOrgEnvValues(data) {
|
|
|
213
213
|
if (!orgId) return {};
|
|
214
214
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
215
215
|
return {
|
|
216
|
-
[
|
|
217
|
-
[
|
|
218
|
-
...
|
|
216
|
+
[_chunkPU42VOBIjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
217
|
+
[_chunkPU42VOBIjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
218
|
+
..._chunkPU42VOBIjs.featureEnvValues.call(void 0, data)
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
222
222
|
const headers = {
|
|
223
223
|
"Content-Type": "application/json",
|
|
224
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
224
|
+
"User-Agent": `deepline-ts-sdk/${_chunk3PMCQ3LKjs.SDK_VERSION}`,
|
|
225
225
|
"X-Deepline-Client-Family": "sdk",
|
|
226
226
|
"X-Deepline-CLI-Family": "sdk",
|
|
227
|
-
"X-Deepline-Agent-Runtime":
|
|
228
|
-
"X-Deepline-CLI-Version":
|
|
229
|
-
"X-Deepline-SDK-Version":
|
|
230
|
-
"X-Deepline-API-Contract":
|
|
227
|
+
"X-Deepline-Agent-Runtime": _chunk3PMCQ3LKjs.detectAgentRuntime.call(void 0, ),
|
|
228
|
+
"X-Deepline-CLI-Version": _chunk3PMCQ3LKjs.SDK_VERSION,
|
|
229
|
+
"X-Deepline-SDK-Version": _chunk3PMCQ3LKjs.SDK_VERSION,
|
|
230
|
+
"X-Deepline-API-Contract": _chunk3PMCQ3LKjs.SDK_API_CONTRACT
|
|
231
231
|
};
|
|
232
232
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
233
233
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -266,10 +266,10 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
266
266
|
if (failure.name === "AbortError" || failure.name === "TimeoutError") {
|
|
267
267
|
throw failure;
|
|
268
268
|
}
|
|
269
|
-
const causeCode =
|
|
269
|
+
const causeCode = _chunk3PMCQ3LKjs.networkCauseCode.call(void 0, failure);
|
|
270
270
|
throw Object.assign(
|
|
271
|
-
new (0,
|
|
272
|
-
|
|
271
|
+
new (0, _chunkBBTKAASQjs.DeeplineError)(
|
|
272
|
+
_chunk3PMCQ3LKjs.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
|
|
273
273
|
void 0,
|
|
274
274
|
"NETWORK_ERROR",
|
|
275
275
|
causeCode ? { causeCode } : void 0
|
|
@@ -286,7 +286,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
286
286
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
287
287
|
}
|
|
288
288
|
async function reportSetupCompleted(input) {
|
|
289
|
-
const apiKey = input.authScope === "folder" ?
|
|
289
|
+
const apiKey = input.authScope === "folder" ? _chunkPU42VOBIjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkPU42VOBIjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
290
290
|
if (!apiKey) return;
|
|
291
291
|
try {
|
|
292
292
|
await httpJson(
|
|
@@ -415,7 +415,7 @@ function endClaimPollOnRefusal(status, data, baseUrl, authScope) {
|
|
|
415
415
|
return EXIT_SERVER;
|
|
416
416
|
}
|
|
417
417
|
async function handleRegister(args, options) {
|
|
418
|
-
const baseUrl =
|
|
418
|
+
const baseUrl = _chunkPU42VOBIjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
419
419
|
let orgName = "";
|
|
420
420
|
let orgId = "";
|
|
421
421
|
let agentName = "";
|
|
@@ -486,14 +486,14 @@ async function handleRegister(args, options) {
|
|
|
486
486
|
savePendingClaim(baseUrl, pendingClaim);
|
|
487
487
|
saveEnvValues(
|
|
488
488
|
{
|
|
489
|
-
[
|
|
489
|
+
[_chunkPU42VOBIjs.HOST_URL_ENV]: baseUrl
|
|
490
490
|
},
|
|
491
491
|
baseUrl,
|
|
492
492
|
authScope
|
|
493
493
|
);
|
|
494
494
|
}
|
|
495
495
|
if (claimUrl && !_optionalChain([options, 'optionalAccess', _16 => _16.delegatedApproval])) {
|
|
496
|
-
const shouldOpen = waitMode !== "no" &&
|
|
496
|
+
const shouldOpen = waitMode !== "no" && _chunk3PMCQ3LKjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
497
497
|
console.log(" Open this approval page in your browser:");
|
|
498
498
|
console.log(` ${claimUrl}`);
|
|
499
499
|
if (pendingClaim.device) {
|
|
@@ -501,7 +501,7 @@ async function handleRegister(args, options) {
|
|
|
501
501
|
` Click Approve if the page shows ${pendingClaim.device.userCode}.`
|
|
502
502
|
);
|
|
503
503
|
}
|
|
504
|
-
const opened = shouldOpen &&
|
|
504
|
+
const opened = shouldOpen && _chunkBGXEMTIGjs.openInBrowser.call(void 0, claimUrl) === "opened";
|
|
505
505
|
if (claimToken && pendingClaim.approvalLinkReporting) {
|
|
506
506
|
await reportApprovalLinkShown(
|
|
507
507
|
baseUrl,
|
|
@@ -554,8 +554,8 @@ async function handleRegister(args, options) {
|
|
|
554
554
|
if (apiKey) {
|
|
555
555
|
saveEnvValues(
|
|
556
556
|
{
|
|
557
|
-
[
|
|
558
|
-
[
|
|
557
|
+
[_chunkPU42VOBIjs.HOST_URL_ENV]: baseUrl,
|
|
558
|
+
[_chunkPU42VOBIjs.API_KEY_ENV]: apiKey,
|
|
559
559
|
...activeOrgEnvValues(statusData)
|
|
560
560
|
},
|
|
561
561
|
baseUrl,
|
|
@@ -577,7 +577,7 @@ async function handleRegister(args, options) {
|
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
async function handleWait(args, options) {
|
|
580
|
-
const baseUrl =
|
|
580
|
+
const baseUrl = _chunkPU42VOBIjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
581
581
|
let timeoutSeconds = 300;
|
|
582
582
|
let requestedScope;
|
|
583
583
|
if (args.includes("--auth-scope")) {
|
|
@@ -601,7 +601,7 @@ async function handleWait(args, options) {
|
|
|
601
601
|
const authScope = resumed.scope;
|
|
602
602
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _18 => _18.claimToken]), () => ( ""));
|
|
603
603
|
if (!pendingClaim) {
|
|
604
|
-
const scopedApiKey = authScope === "folder" ?
|
|
604
|
+
const scopedApiKey = authScope === "folder" ? _chunkPU42VOBIjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkPU42VOBIjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
605
605
|
if (scopedApiKey) {
|
|
606
606
|
if (!_optionalChain([options, 'optionalAccess', _19 => _19.quiet])) console.log("Already connected.");
|
|
607
607
|
return EXIT_OK;
|
|
@@ -664,8 +664,8 @@ async function handleWait(args, options) {
|
|
|
664
664
|
if (apiKey) {
|
|
665
665
|
saveEnvValues(
|
|
666
666
|
{
|
|
667
|
-
[
|
|
668
|
-
[
|
|
667
|
+
[_chunkPU42VOBIjs.HOST_URL_ENV]: baseUrl,
|
|
668
|
+
[_chunkPU42VOBIjs.API_KEY_ENV]: apiKey,
|
|
669
669
|
...activeOrgEnvValues(data)
|
|
670
670
|
},
|
|
671
671
|
baseUrl,
|
|
@@ -695,8 +695,8 @@ async function handleWait(args, options) {
|
|
|
695
695
|
return EXIT_AUTH;
|
|
696
696
|
}
|
|
697
697
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
698
|
-
const baseUrl =
|
|
699
|
-
const apiKey =
|
|
698
|
+
const baseUrl = _chunkPU42VOBIjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
699
|
+
const apiKey = _chunkPU42VOBIjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
700
700
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
701
701
|
try {
|
|
702
702
|
const { status, data } = await httpJson(
|
|
@@ -719,9 +719,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
721
|
async function handleStatus(args) {
|
|
722
|
-
const baseUrl =
|
|
722
|
+
const baseUrl = _chunkPU42VOBIjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
723
723
|
const reveal = args.includes("--reveal");
|
|
724
|
-
const jsonOutput =
|
|
724
|
+
const jsonOutput = _chunkBGXEMTIGjs.argsWantJson.call(void 0, args);
|
|
725
725
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
726
726
|
let authScope = null;
|
|
727
727
|
if (hasExplicitAuthScope) {
|
|
@@ -762,14 +762,14 @@ async function handleStatus(args) {
|
|
|
762
762
|
};
|
|
763
763
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
764
764
|
}
|
|
765
|
-
const apiKey = authScope === "folder" ?
|
|
765
|
+
const apiKey = authScope === "folder" ? _chunkPU42VOBIjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkPU42VOBIjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkPU42VOBIjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
766
766
|
if (!apiKey) {
|
|
767
767
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
768
768
|
baseUrl,
|
|
769
769
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
770
770
|
);
|
|
771
771
|
if (pendingClaim) {
|
|
772
|
-
|
|
772
|
+
_chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
|
|
773
773
|
{
|
|
774
774
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
775
775
|
status: "pending",
|
|
@@ -799,7 +799,7 @@ async function handleStatus(args) {
|
|
|
799
799
|
);
|
|
800
800
|
return EXIT_OK;
|
|
801
801
|
}
|
|
802
|
-
|
|
802
|
+
_chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
|
|
803
803
|
{
|
|
804
804
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
805
805
|
status: "not connected",
|
|
@@ -832,7 +832,7 @@ async function handleStatus(args) {
|
|
|
832
832
|
}
|
|
833
833
|
);
|
|
834
834
|
if (status === 401 || status === 403) {
|
|
835
|
-
|
|
835
|
+
_chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
|
|
836
836
|
{
|
|
837
837
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
838
838
|
status: "unauthorized",
|
|
@@ -859,7 +859,7 @@ async function handleStatus(args) {
|
|
|
859
859
|
console.error(`Auth status error (status ${status}).`);
|
|
860
860
|
return EXIT_SERVER;
|
|
861
861
|
}
|
|
862
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
862
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkPU42VOBIjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
863
863
|
clearSatisfiedPendingClaim(
|
|
864
864
|
baseUrl,
|
|
865
865
|
resolvedAuthScope,
|
|
@@ -887,28 +887,28 @@ async function handleStatus(args) {
|
|
|
887
887
|
if (apiKeyResp) {
|
|
888
888
|
saveEnvValues(
|
|
889
889
|
{
|
|
890
|
-
[
|
|
891
|
-
[
|
|
890
|
+
[_chunkPU42VOBIjs.HOST_URL_ENV]: baseUrl,
|
|
891
|
+
[_chunkPU42VOBIjs.API_KEY_ENV]: apiKeyResp,
|
|
892
892
|
...activeOrgEnvValues(data)
|
|
893
893
|
},
|
|
894
894
|
baseUrl,
|
|
895
895
|
resolvedAuthScope
|
|
896
896
|
);
|
|
897
897
|
if (resolvedAuthScope === "folder") {
|
|
898
|
-
const target =
|
|
898
|
+
const target = _chunkPU42VOBIjs.resolveProjectPinTarget.call(void 0, );
|
|
899
899
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
900
900
|
} else {
|
|
901
901
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
905
|
-
saveEnvValues(
|
|
904
|
+
} else if (resolvedAuthScope === "folder" || _chunkPU42VOBIjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
905
|
+
saveEnvValues(_chunkPU42VOBIjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
906
906
|
}
|
|
907
|
-
|
|
907
|
+
_chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
|
|
908
908
|
{
|
|
909
909
|
...payload,
|
|
910
|
-
...
|
|
911
|
-
command_context:
|
|
910
|
+
..._chunk3PMCQ3LKjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
911
|
+
command_context: _chunkPU42VOBIjs.resolveCliCommandContext.call(void 0,
|
|
912
912
|
{ baseUrl, apiKey },
|
|
913
913
|
resolvedAuthScope
|
|
914
914
|
)
|
|
@@ -11,20 +11,20 @@ import {
|
|
|
11
11
|
skillsInstallLeasePath,
|
|
12
12
|
skillsSourceUrl,
|
|
13
13
|
syncSdkSkillsIfNeeded
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GPMS6OPX.mjs";
|
|
15
15
|
import {
|
|
16
16
|
printCommandEnvelope
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-EEFSUCYP.mjs";
|
|
18
18
|
import {
|
|
19
19
|
autoDetectBaseUrl,
|
|
20
20
|
ensureProjectPrivatePathsIgnored,
|
|
21
21
|
resolveProjectPinTarget,
|
|
22
22
|
sdkCliStateDirPath
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-K4WJ4BYO.mjs";
|
|
24
24
|
import {
|
|
25
25
|
SDK_VERSION,
|
|
26
26
|
detectAgentRuntime
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QDBGPRR2.mjs";
|
|
28
28
|
import {
|
|
29
29
|
DEEPLINE_GTM_GLOBAL_SKILL_ROOTS
|
|
30
30
|
} from "./chunk-5JPKRDFC.mjs";
|
|
@@ -303,15 +303,27 @@ function lintMonitorSpecTemplate(value, path = "monitor") {
|
|
|
303
303
|
const ordered = issues.sort(issueOrder);
|
|
304
304
|
return ordered.some((issue) => issue.severity === "error") ? { issues: ordered } : { normalized, issues: ordered };
|
|
305
305
|
}
|
|
306
|
+
var COMPILED_TEMPLATES = /* @__PURE__ */ new Map();
|
|
307
|
+
var COMPILED_TEMPLATES_MAX = 1e3;
|
|
308
|
+
function compiledTemplate(source) {
|
|
309
|
+
const cached = COMPILED_TEMPLATES.get(source);
|
|
310
|
+
if (cached) return cached;
|
|
311
|
+
if (COMPILED_TEMPLATES.size >= COMPILED_TEMPLATES_MAX) {
|
|
312
|
+
COMPILED_TEMPLATES.clear();
|
|
313
|
+
}
|
|
314
|
+
const compiled = _handlebars2.default.compile(source, {
|
|
315
|
+
noEscape: true,
|
|
316
|
+
strict: true,
|
|
317
|
+
knownHelpersOnly: true,
|
|
318
|
+
preventIndent: true
|
|
319
|
+
});
|
|
320
|
+
COMPILED_TEMPLATES.set(source, compiled);
|
|
321
|
+
return compiled;
|
|
322
|
+
}
|
|
306
323
|
function renderValue(value, row) {
|
|
307
324
|
if (typeof value === "string" && value.includes("{{")) {
|
|
308
325
|
const context = Object.assign(/* @__PURE__ */ Object.create(null), row);
|
|
309
|
-
return
|
|
310
|
-
noEscape: true,
|
|
311
|
-
strict: true,
|
|
312
|
-
knownHelpersOnly: true,
|
|
313
|
-
preventIndent: true
|
|
314
|
-
})(context, {
|
|
326
|
+
return compiledTemplate(value)(context, {
|
|
315
327
|
allowProtoMethodsByDefault: false,
|
|
316
328
|
allowProtoPropertiesByDefault: false,
|
|
317
329
|
helpers: /* @__PURE__ */ Object.create(null),
|