deepline 0.3.484 → 0.3.486
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 +91 -30
- package/dist/bundling-sources/sdk/src/compat.ts +13 -0
- package/dist/bundling-sources/sdk/src/plays/client-core.ts +4 -1
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +143 -9
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +31 -4
- package/dist/bundling-sources/sdk/src/tool-calls.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-data-plane/sheet-column-storage.ts +32 -3
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +126 -41
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +231 -25
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-runtime-config.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +130 -19
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +105 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +4 -2
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +194 -56
- package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +8 -4
- package/dist/bundling-sources/shared_libs/play-runtime/log-provenance.ts +11 -6
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/ports.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/postgres-adapter.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +195 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +20 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +139 -67
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/progress-sidecar.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-control-transport.ts +25 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +133 -82
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +58 -16
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-sandbox-absence.ts +171 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +69 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +100 -40
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +67 -9
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +5 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +6 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-errors.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-writer.ts +87 -31
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/index.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +206 -7
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +39 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +28 -9
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +44 -15
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +60 -11
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +656 -64
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +25 -33
- package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +21 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +1 -1
- package/dist/cli/auth-ARKH3OAU.js +43 -0
- package/dist/cli/{auth-EBFOTF7X.mjs → auth-B4DJO4FB.mjs} +5 -5
- package/dist/cli/{billing-G2G3EF3I.js → billing-GDWAMARK.js} +80 -80
- package/dist/cli/{billing-2ZOIMW5V.mjs → billing-IIQ3VNXU.mjs} +7 -7
- package/dist/cli/{chunk-YWC5AN26.mjs → chunk-2DVFQYPG.mjs} +62 -34
- package/dist/cli/{chunk-UWOY74RU.js → chunk-5DUP4ZUE.js} +21 -21
- package/dist/cli/{chunk-EACX7QXO.mjs → chunk-5QYZ4MEW.mjs} +2 -2
- package/dist/cli/{chunk-HEI3BWIV.mjs → chunk-5RLVCOKH.mjs} +1 -1
- package/dist/cli/{chunk-TIRSKEZH.mjs → chunk-5Y7LLRWO.mjs} +1 -1
- package/dist/cli/{chunk-IXWQOVNW.js → chunk-5YILTBF7.js} +87 -76
- package/dist/cli/{chunk-OHKKDPA5.js → chunk-7FTQKEZ6.js} +13 -13
- package/dist/cli/{chunk-TN2GW57M.mjs → chunk-A456YVDE.mjs} +1 -1
- package/dist/cli/{chunk-GVAENVIG.js → chunk-AUQQVDAB.js} +110 -21
- package/dist/cli/{chunk-3XQIVEAT.js → chunk-BJL7RYQN.js} +3 -3
- package/dist/cli/{chunk-2AWYJXBX.js → chunk-BNB2RK4L.js} +5 -5
- package/dist/cli/{chunk-U7IJAGWB.js → chunk-BYEDI5PM.js} +7 -7
- package/dist/cli/{chunk-RLLEH2SP.js → chunk-C4GFBB52.js} +26 -26
- package/dist/cli/{chunk-AK7UKQ5R.js → chunk-CSBMKHTV.js} +5 -5
- package/dist/cli/{chunk-UT4YMA2N.js → chunk-DFHS5XVZ.js} +5 -4
- package/dist/cli/{chunk-XZXIWPT3.mjs → chunk-F3G2HAUQ.mjs} +1 -1
- package/dist/cli/{chunk-C62NI2X6.js → chunk-FCAKAW6S.js} +5 -5
- package/dist/cli/{chunk-AF7MOUZP.mjs → chunk-FGPJXQEJ.mjs} +2 -2
- package/dist/cli/chunk-FSCOYTRV.js +42 -0
- package/dist/cli/{chunk-6GRZEYSG.js → chunk-GCEUOHJW.js} +7 -7
- package/dist/cli/{chunk-SD7QWZTV.mjs → chunk-INW22YP7.mjs} +1 -1
- package/dist/cli/{chunk-OWUZKXE7.mjs → chunk-J7EENGKJ.mjs} +1 -1
- package/dist/cli/{chunk-QIDDTIVZ.js → chunk-KPIVQFXZ.js} +322 -294
- package/dist/cli/{chunk-4IOY2SCQ.js → chunk-LOX3BISD.js} +4 -4
- package/dist/cli/{chunk-WYUCDLVR.mjs → chunk-MJ56FCYU.mjs} +2 -1
- package/dist/cli/{chunk-DBJ62RAO.js → chunk-NSPMJLYA.js} +3 -3
- package/dist/cli/{chunk-HNRELVCS.mjs → chunk-ONONSV2Q.mjs} +96 -7
- package/dist/cli/{chunk-PU52JXKA.mjs → chunk-P6KGYOCM.mjs} +13 -4
- package/dist/cli/{chunk-VEVGM6B5.js → chunk-PCYZDTDC.js} +14 -14
- package/dist/cli/{chunk-NW4QJE54.js → chunk-PHWFY26F.js} +2 -2
- package/dist/cli/{chunk-LTZXLYKE.mjs → chunk-PKOFEHZL.mjs} +93 -17
- package/dist/cli/{chunk-7K5CWKKZ.mjs → chunk-PQHDZHZG.mjs} +2 -2
- package/dist/cli/{chunk-UKM74PAA.js → chunk-PTM3QRAT.js} +37 -37
- package/dist/cli/{chunk-YGN77QA5.mjs → chunk-PV7AYBKQ.mjs} +3 -3
- package/dist/cli/{chunk-4OEOM6GP.mjs → chunk-PYDHVRAF.mjs} +5 -5
- package/dist/cli/{chunk-FRD5WFT4.js → chunk-QD22TY33.js} +323 -247
- package/dist/cli/{chunk-5KNRQWHE.js → chunk-QEQ3KHVY.js} +3 -3
- package/dist/cli/{chunk-KGOC6HGI.js → chunk-S5EYODEG.js} +53 -53
- package/dist/cli/{chunk-FQK7BULS.js → chunk-S7OILDJH.js} +1 -1
- package/dist/cli/{chunk-TRLDJNVE.mjs → chunk-T3Q6BMVH.mjs} +1 -1
- package/dist/cli/{chunk-5K5CAND4.mjs → chunk-TBE2K5W4.mjs} +4 -4
- package/dist/cli/{chunk-YHA3EV3I.mjs → chunk-TE2QT2MX.mjs} +15 -4
- package/dist/cli/{chunk-ZOKM7DVA.js → chunk-TNHY3ATN.js} +8 -8
- package/dist/cli/{chunk-4OVHIWE7.mjs → chunk-U23L57VU.mjs} +2 -2
- package/dist/cli/{chunk-5GOG5ZGC.mjs → chunk-UEJLWUJ3.mjs} +2 -2
- package/dist/cli/{chunk-6NPWXE32.mjs → chunk-VJLL5XIP.mjs} +1 -1
- package/dist/cli/{chunk-WXRM3UC6.mjs → chunk-WCOJH4W4.mjs} +3 -3
- package/dist/cli/{chunk-4SFC2XUF.mjs → chunk-XAZWUW6I.mjs} +5 -5
- package/dist/cli/{chunk-ZM2YPJQJ.js → chunk-XK5DMLZE.js} +5 -1
- package/dist/cli/{chunk-LJ5747UC.mjs → chunk-XRDXNAAY.mjs} +5 -1
- package/dist/cli/{chunk-V7JCMBLU.mjs → chunk-YIKHNZ6B.mjs} +4 -4
- package/dist/cli/{chunk-M4PG7FGC.js → chunk-YS6JOYYS.js} +2 -2
- package/dist/cli/{chunk-DEXSQGXB.mjs → chunk-ZMRZ3BXG.mjs} +5 -5
- package/dist/cli/{chunk-CYWBAV5H.js → chunk-ZQI26KE4.js} +16 -16
- package/dist/cli/{csv-S3CHUKI6.js → csv-3PSMPZM5.js} +13 -13
- package/dist/cli/{csv-NLWVWD3H.mjs → csv-LFCT3WQ4.mjs} +4 -4
- package/dist/cli/{db-OGRPAEEM.mjs → db-HULKVAMU.mjs} +7 -7
- package/dist/cli/{db-WBSKMMOH.js → db-R7I2PPTV.js} +28 -28
- package/dist/cli/{describe-FAD3Z7LN.mjs → describe-D55V42LH.mjs} +21 -21
- package/dist/cli/describe-H47BLOEP.js +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 +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-LYCL344R.mjs → executions-ICVVOYVG.mjs} +7 -7
- package/dist/cli/{executions-SOAZHCY4.js → executions-O37FN2SK.js} +9 -9
- package/dist/cli/{feedback-AVF6V7SV.mjs → feedback-3K3QPGCQ.mjs} +4 -4
- package/dist/cli/{feedback-OROUPUNJ.js → feedback-MAZQ7C6S.js} +8 -8
- package/dist/cli/{git-J5N5M57H.mjs → git-2MMD5KJS.mjs} +5 -5
- package/dist/cli/git-RQ2XLFYZ.js +25 -0
- package/dist/cli/index.js +142 -139
- package/dist/cli/index.mjs +45 -42
- package/dist/cli/{legacy-noops-QAQMZMEG.js → legacy-noops-2OX2Y3Y2.js} +8 -8
- package/dist/cli/{legacy-noops-ENRRM7BL.mjs → legacy-noops-VLSWJ6VE.mjs} +5 -5
- package/dist/cli/{monitors-CKQ65WRL.mjs → monitors-2NODQQWG.mjs} +8 -8
- package/dist/cli/{monitors-SFMQ5LFR.js → monitors-UCSV5FOR.js} +92 -92
- package/dist/cli/{org-3UNTDLT2.js → org-4YY73VTW.js} +73 -73
- package/dist/cli/{org-K4UIEU5P.mjs → org-W7AUQCDE.mjs} +7 -7
- package/dist/cli/{pages-NKZTGB4C.js → pages-FBZEUMXK.js} +18 -18
- package/dist/cli/{pages-6GPGBIAH.mjs → pages-ZRP7U5PO.mjs} +7 -7
- package/dist/cli/{play-BDEADESI.js → play-LFCTQJXA.js} +858 -632
- package/dist/cli/{play-62BEE7IX.mjs → play-XF2BSGTP.mjs} +372 -146
- package/dist/cli/{providers-SXGP44GH.js → providers-5456JNHP.js} +10 -10
- package/dist/cli/{providers-X3CUWMFP.mjs → providers-SICAPKGI.mjs} +7 -7
- package/dist/cli/{quickstart-XQ4426M4.js → quickstart-2KLLIPIU.js} +6 -6
- package/dist/cli/{quickstart-7LN22BKX.mjs → quickstart-IBVG6GX6.mjs} +4 -4
- package/dist/cli/{run-PBJ4ZJ4W.js → run-DNLDGJRC.js} +41 -41
- package/dist/cli/{run-XXSN3B5A.mjs → run-XPIZIQ7H.mjs} +26 -26
- package/dist/cli/search-2KQA65LH.js +32 -0
- package/dist/cli/{search-M75VMADD.mjs → search-PW22AEAL.mjs} +8 -8
- package/dist/cli/{search-output-F6HCFYEI.js → search-output-H6F6QMRF.js} +22 -16
- package/dist/cli/{search-output-NUQAKWDM.mjs → search-output-JFD53H2N.mjs} +14 -8
- package/dist/cli/{secrets-J2H6V33R.mjs → secrets-542CTZRZ.mjs} +7 -7
- package/dist/cli/{secrets-LRYY4QPE.js → secrets-LCCRRAN7.js} +16 -16
- package/dist/cli/{sessions-YPF62CZE.js → sessions-5FYDQE3N.js} +6 -6
- package/dist/cli/{sessions-IMT336UV.mjs → sessions-CALLS2XD.mjs} +5 -5
- package/dist/cli/{settings-PDWVQIGH.mjs → settings-GSKPHUEC.mjs} +12 -12
- package/dist/cli/{settings-35YYC5WA.js → settings-ORGKOBP6.js} +79 -79
- package/dist/cli/{setup-UR7GOR7H.js → setup-4BUWJKB6.js} +47 -47
- package/dist/cli/{setup-DG5DISSE.mjs → setup-V57GHVAF.mjs} +9 -9
- package/dist/cli/skills-KYZPPGSN.js +33 -0
- package/dist/cli/{skills-U6NJD5J7.mjs → skills-NGLCFQFT.mjs} +7 -7
- package/dist/cli/tools-AFYXUEMD.js +56 -0
- package/dist/cli/{tools-2HGEOELR.mjs → tools-G2YNCFNX.mjs} +19 -19
- package/dist/cli/{update-FRAYBAHK.mjs → update-IZ3Z5T5C.mjs} +9 -9
- package/dist/cli/update-T6JJ7A3K.js +33 -0
- package/dist/cli/{workflow-JKKLOMBX.js → workflow-7AHST2XV.js} +18 -18
- package/dist/cli/{workflow-DDKVTF36.mjs → workflow-L7ROQIM7.mjs} +8 -8
- package/dist/{client-DJ3r8VQJ.d.mts → client-BkbDHRIg.d.mts} +1 -1
- package/dist/{client-JPSNljtj.d.ts → client-D3hVHXjK.d.ts} +1 -1
- package/dist/{client-core-3SJlNsKU.d.mts → client-core-BZoSMKcY.d.mts} +30 -15
- package/dist/{client-core-rCoQ5Xz3.d.ts → client-core-DUdVqO_m.d.ts} +30 -15
- package/dist/{compiler-manifest-gkO9ZkVg.d.mts → compiler-manifest-BFTwq1HI.d.mts} +1 -1
- package/dist/{compiler-manifest-gkO9ZkVg.d.ts → compiler-manifest-BFTwq1HI.d.ts} +1 -1
- package/dist/{errors-Cc92LKH-.d.ts → errors-c3pMsylw.d.ts} +1 -1
- package/dist/{errors-CeCCOKSA.d.mts → errors-w31ybrQM.d.mts} +1 -1
- package/dist/{index-DJQKdV76.d.ts → index-CQ-15-QL.d.ts} +1 -1
- package/dist/{index-DsqWJL3Q.d.mts → index-DvNtxucX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +117 -116
- 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 +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 +12 -2
- package/dist/plays/run-request.mjs +11 -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/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-L5CSV3UO.js +0 -43
- package/dist/cli/chunk-KA2LNIUP.js +0 -33
- package/dist/cli/describe-UIAYCHWW.js +0 -49
- package/dist/cli/git-ATMWC27D.js +0 -25
- package/dist/cli/search-IGHLRLBD.js +0 -32
- package/dist/cli/skills-4U5WC4MJ.js +0 -33
- package/dist/cli/tools-PYJTQVVS.js +0 -56
- package/dist/cli/update-344OTRFM.js +0 -33
|
@@ -74,11 +74,37 @@ function decodePlayRunPublicStatus(value) {
|
|
|
74
74
|
// src/plays/run-request.ts
|
|
75
75
|
var PLAY_RUN_START_PATH = "/api/v2/plays/run";
|
|
76
76
|
var CLI_PLAY_RUN_START_PATH = `${PLAY_RUN_START_PATH}/cli`;
|
|
77
|
+
var CLI_PLAY_RUN_CALLER_INTENT_V2_PATH = `${CLI_PLAY_RUN_START_PATH}/caller-intent-v2`;
|
|
77
78
|
var CLI_PLAY_RUN_SUPPORTED_HEADER = "x-deepline-cli-play-admission";
|
|
79
|
+
var CLI_PLAY_RUN_CALLER_INTENT_V2_SUPPORTED_HEADER = "x-deepline-cli-play-caller-intent-v2";
|
|
78
80
|
var PLAY_RUN_START_STREAM_PATH = `${PLAY_RUN_START_PATH}?stream=true`;
|
|
79
81
|
var CLI_PLAY_RUN_START_STREAM_PATH = `${CLI_PLAY_RUN_START_PATH}?stream=true`;
|
|
82
|
+
var CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH = `${CLI_PLAY_RUN_CALLER_INTENT_V2_PATH}?stream=true`;
|
|
80
83
|
var PLAY_FILES_STAGE_PATH = "/api/v2/plays/files/stage";
|
|
81
84
|
var PLAY_FILES_STAGE_MINT_PATH = `${PLAY_FILES_STAGE_PATH}/mint`;
|
|
85
|
+
async function awaitWithAbort(value, signal) {
|
|
86
|
+
if (!signal) return await value;
|
|
87
|
+
signal.throwIfAborted();
|
|
88
|
+
let removeAbortListener = () => {
|
|
89
|
+
};
|
|
90
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
91
|
+
const onAbort = () => {
|
|
92
|
+
reject(
|
|
93
|
+
_nullishCoalesce(signal.reason, () => ( Object.assign(new Error("Play admission was aborted."), {
|
|
94
|
+
name: "AbortError"
|
|
95
|
+
})))
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
99
|
+
removeAbortListener = () => signal.removeEventListener("abort", onAbort);
|
|
100
|
+
if (signal.aborted) onAbort();
|
|
101
|
+
});
|
|
102
|
+
try {
|
|
103
|
+
return await Promise.race([Promise.resolve(value), aborted]);
|
|
104
|
+
} finally {
|
|
105
|
+
removeAbortListener();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
82
108
|
var CliPlayAdmissionUnsupportedError = class extends _chunkDIAWYWT5js.DeeplineError {
|
|
83
109
|
constructor(status) {
|
|
84
110
|
super(
|
|
@@ -88,6 +114,15 @@ var CliPlayAdmissionUnsupportedError = class extends _chunkDIAWYWT5js.DeeplineEr
|
|
|
88
114
|
);
|
|
89
115
|
}
|
|
90
116
|
};
|
|
117
|
+
var CliPlayAdmissionCallerIntentV2UnsupportedError = class extends _chunkDIAWYWT5js.DeeplineError {
|
|
118
|
+
constructor(status) {
|
|
119
|
+
super(
|
|
120
|
+
"This server does not support versioned CLI Play admission.",
|
|
121
|
+
status,
|
|
122
|
+
"CLI_PLAY_CALLER_INTENT_V2_UNSUPPORTED"
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
91
126
|
function buildPlayRunStartBody(request) {
|
|
92
127
|
return {
|
|
93
128
|
...request.admissionOrgId ? { admissionOrgId: request.admissionOrgId } : {},
|
|
@@ -126,10 +161,27 @@ function buildPlayRunStartBody(request) {
|
|
|
126
161
|
};
|
|
127
162
|
}
|
|
128
163
|
async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
164
|
+
const assertAdmissionActive = () => {
|
|
165
|
+
_optionalChain([options, 'optionalAccess', _5 => _5.signal, 'optionalAccess', _6 => _6.throwIfAborted, 'call', _7 => _7()]);
|
|
166
|
+
if (_optionalChain([options, 'optionalAccess', _8 => _8.deadlineAt]) !== void 0 && Date.now() >= options.deadlineAt) {
|
|
167
|
+
const error = new Error("Play admission exceeded its wait deadline.");
|
|
168
|
+
error.name = "AbortError";
|
|
169
|
+
throw error;
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
const callerIntentV2 = _optionalChain([options, 'optionalAccess', _9 => _9.callerIntentV2]) === true;
|
|
173
|
+
if (callerIntentV2 && (onSubmission || request.maxTotalCredits !== void 0)) {
|
|
174
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
175
|
+
"Versioned CLI Play admission requires a new, unjournaled run without a strict total budget.",
|
|
176
|
+
409,
|
|
177
|
+
"CLI_PLAY_CALLER_INTENT_V2_INELIGIBLE"
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
assertAdmissionActive();
|
|
181
|
+
const capability = callerIntentV2 ? null : options && Object.hasOwn(options, "admissionCapability") ? await awaitWithAbort(options.admissionCapability, options.signal) : await readPlayRunAdmissionCapability(http, options);
|
|
182
|
+
const supportsCallerIntent = callerIntentV2 || _optionalChain([capability, 'optionalAccess', _10 => _10.admissionContract]) === "caller-intent-v1";
|
|
183
|
+
assertAdmissionActive();
|
|
184
|
+
if (supportsCallerIntent && !callerIntentV2 && (!_optionalChain([capability, 'optionalAccess', _11 => _11.orgId]) || request.admissionOrgId && request.admissionOrgId !== capability.orgId)) {
|
|
133
185
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
134
186
|
"The admission workspace could not be pinned to this request; execution was not submitted.",
|
|
135
187
|
409,
|
|
@@ -143,7 +195,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
143
195
|
"PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
|
|
144
196
|
);
|
|
145
197
|
}
|
|
146
|
-
if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess',
|
|
198
|
+
if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _12 => _12.strictTotalBudget]) === "unbounded-v1") {
|
|
147
199
|
if (request.maxTotalCredits === 0) {
|
|
148
200
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
149
201
|
"A zero-credit total budget cannot admit a Play: sandbox compute is billed even when provider tools are free.",
|
|
@@ -157,7 +209,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
157
209
|
"PLAY_TOTAL_BUDGET_UNBOUNDED"
|
|
158
210
|
);
|
|
159
211
|
}
|
|
160
|
-
if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess',
|
|
212
|
+
if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _13 => _13.strictTotalBudget]) !== "fail-closed-v1") {
|
|
161
213
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
162
214
|
"This server cannot honor a strict total Play budget. Execution was not submitted.",
|
|
163
215
|
409,
|
|
@@ -168,7 +220,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
168
220
|
JSON.stringify(
|
|
169
221
|
buildPlayRunStartBody({
|
|
170
222
|
...request,
|
|
171
|
-
...supportsCallerIntent ? { admissionOrgId: capability.orgId } : {}
|
|
223
|
+
...supportsCallerIntent && !callerIntentV2 ? { admissionOrgId: capability.orgId } : {}
|
|
172
224
|
})
|
|
173
225
|
)
|
|
174
226
|
);
|
|
@@ -182,13 +234,14 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
182
234
|
);
|
|
183
235
|
}
|
|
184
236
|
if (onSubmission) {
|
|
185
|
-
if (!workflowId || !_optionalChain([capability, 'optionalAccess',
|
|
237
|
+
if (!workflowId || !_optionalChain([capability, 'optionalAccess', _14 => _14.orgId])) {
|
|
186
238
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
187
239
|
"This server cannot persist a recoverable submission intent. Execution was not submitted.",
|
|
188
240
|
409,
|
|
189
241
|
"PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
|
|
190
242
|
);
|
|
191
243
|
}
|
|
244
|
+
assertAdmissionActive();
|
|
192
245
|
await onSubmission({
|
|
193
246
|
workflowId,
|
|
194
247
|
orgId: capability.orgId,
|
|
@@ -230,29 +283,48 @@ async function startPlayRun(http, request, headers, options) {
|
|
|
230
283
|
} = await preparePlayRunAdmission(
|
|
231
284
|
http,
|
|
232
285
|
request,
|
|
233
|
-
_optionalChain([options, 'optionalAccess',
|
|
286
|
+
_optionalChain([options, 'optionalAccess', _15 => _15.onSubmission]),
|
|
234
287
|
options
|
|
235
288
|
);
|
|
289
|
+
return submitPreparedPlayRunAdmission(
|
|
290
|
+
http,
|
|
291
|
+
submittedBody,
|
|
292
|
+
workflowId,
|
|
293
|
+
supportsCallerIntent,
|
|
294
|
+
headers,
|
|
295
|
+
options
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
async function submitPreparedPlayRunAdmission(http, submittedBody, workflowId, supportsCallerIntent, headers, options) {
|
|
236
299
|
let cliAdmissionSupported = false;
|
|
300
|
+
let callerIntentV2Supported = false;
|
|
237
301
|
let response;
|
|
238
302
|
try {
|
|
239
303
|
response = await http.post(
|
|
240
|
-
_optionalChain([options, 'optionalAccess',
|
|
304
|
+
_optionalChain([options, 'optionalAccess', _16 => _16.callerIntentV2]) ? CLI_PLAY_RUN_CALLER_INTENT_V2_PATH : _optionalChain([options, 'optionalAccess', _17 => _17.cliAdmission]) ? CLI_PLAY_RUN_START_PATH : PLAY_RUN_START_PATH,
|
|
241
305
|
submittedBody,
|
|
242
306
|
headers,
|
|
243
307
|
{
|
|
244
308
|
maxRetries: 0,
|
|
245
309
|
exactUrlOnly: true,
|
|
246
|
-
..._optionalChain([options, 'optionalAccess',
|
|
247
|
-
..._optionalChain([options, 'optionalAccess',
|
|
310
|
+
..._optionalChain([options, 'optionalAccess', _18 => _18.signal]) ? { signal: options.signal } : {},
|
|
311
|
+
..._optionalChain([options, 'optionalAccess', _19 => _19.cliAdmission]) || _optionalChain([options, 'optionalAccess', _20 => _20.callerIntentV2]) ? {
|
|
248
312
|
onResponse: (response2) => {
|
|
249
313
|
cliAdmissionSupported = response2.headers.get(CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
|
|
314
|
+
callerIntentV2Supported = response2.headers.get(
|
|
315
|
+
CLI_PLAY_RUN_CALLER_INTENT_V2_SUPPORTED_HEADER
|
|
316
|
+
) === "true";
|
|
250
317
|
}
|
|
251
318
|
} : {}
|
|
252
319
|
}
|
|
253
320
|
);
|
|
254
321
|
} catch (error) {
|
|
255
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
322
|
+
if (_optionalChain([options, 'optionalAccess', _21 => _21.callerIntentV2]) && !callerIntentV2Supported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
323
|
+
throw new CliPlayAdmissionCallerIntentV2UnsupportedError(
|
|
324
|
+
error.statusCode
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
if (_optionalChain([options, 'optionalAccess', _22 => _22.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
256
328
|
throw new CliPlayAdmissionUnsupportedError(error.statusCode);
|
|
257
329
|
}
|
|
258
330
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && ["NETWORK_TIMEOUT", "NETWORK_ERROR", "FETCH_FAILED"].includes(
|
|
@@ -277,8 +349,20 @@ async function startPlayRun(http, request, headers, options) {
|
|
|
277
349
|
}
|
|
278
350
|
throw error;
|
|
279
351
|
}
|
|
352
|
+
if (_optionalChain([options, 'optionalAccess', _23 => _23.callerIntentV2]) && !callerIntentV2Supported) {
|
|
353
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
354
|
+
"The versioned CLI Play admission response did not prove its contract. Inspect this run before submitting again.",
|
|
355
|
+
void 0,
|
|
356
|
+
"PLAY_RUN_ADMISSION_CONTRACT_UNKNOWN",
|
|
357
|
+
{
|
|
358
|
+
...workflowId ? { runId: workflowId, workflowId } : {},
|
|
359
|
+
admissionState: "unknown",
|
|
360
|
+
recoverySupported: supportsCallerIntent
|
|
361
|
+
}
|
|
362
|
+
);
|
|
363
|
+
}
|
|
280
364
|
const started = normalizePlayRunStart(response);
|
|
281
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
365
|
+
if (_optionalChain([options, 'optionalAccess', _24 => _24.cliAdmission]) && (!started.workflowId || started.workflowId === "pending")) {
|
|
282
366
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
283
367
|
"Play admission returned no run id. Check recent runs before submitting again.",
|
|
284
368
|
void 0,
|
|
@@ -289,7 +373,7 @@ async function startPlayRun(http, request, headers, options) {
|
|
|
289
373
|
}
|
|
290
374
|
function isPlayRunPackage(value) {
|
|
291
375
|
return Boolean(
|
|
292
|
-
value && typeof value === "object" && !Array.isArray(value) && value.kind === "play_run" && value.run && typeof _optionalChain([value, 'access',
|
|
376
|
+
value && typeof value === "object" && !Array.isArray(value) && value.kind === "play_run" && value.run && typeof _optionalChain([value, 'access', _25 => _25.run, 'optionalAccess', _26 => _26.id]) === "string"
|
|
293
377
|
);
|
|
294
378
|
}
|
|
295
379
|
function normalizePlayRunStart(raw) {
|
|
@@ -330,7 +414,7 @@ function schemaMetadata(schema, key) {
|
|
|
330
414
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
331
415
|
}
|
|
332
416
|
function stringMetadata(metadata, key) {
|
|
333
|
-
const value = _optionalChain([metadata, 'optionalAccess',
|
|
417
|
+
const value = _optionalChain([metadata, 'optionalAccess', _27 => _27[key]]);
|
|
334
418
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
335
419
|
}
|
|
336
420
|
function inputFieldFromCsvArg(csvArg) {
|
|
@@ -338,7 +422,7 @@ function inputFieldFromCsvArg(csvArg) {
|
|
|
338
422
|
const match = /^\(?\s*input\.([A-Za-z_$][\w$]*)\s*\)?(?:\s*\?\?[\s\S]+)?$/.exec(
|
|
339
423
|
csvArg.trim()
|
|
340
424
|
);
|
|
341
|
-
return _nullishCoalesce(_optionalChain([match, 'optionalAccess',
|
|
425
|
+
return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _28 => _28[1]]), () => ( null));
|
|
342
426
|
}
|
|
343
427
|
function fileInputBindingsFromPlaySchema(inputSchema) {
|
|
344
428
|
const csvInput = schemaMetadata(inputSchema, "csvInput");
|
|
@@ -469,7 +553,7 @@ async function uploadStagedFileToPresignedUrl(input) {
|
|
|
469
553
|
return;
|
|
470
554
|
}
|
|
471
555
|
const text = await response.text().catch(() => "");
|
|
472
|
-
const egressDenied = response.status === 403 && _optionalChain([response, 'access',
|
|
556
|
+
const egressDenied = response.status === 403 && _optionalChain([response, 'access', _29 => _29.headers, 'access', _30 => _30.get, 'call', _31 => _31("x-deny-reason"), 'optionalAccess', _32 => _32.trim, 'call', _33 => _33(), 'access', _34 => _34.toLowerCase, 'call', _35 => _35()]) === "host_not_allowed";
|
|
473
557
|
lastError = new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
474
558
|
`Direct storage upload of ${input.logicalPath} failed: ${response.status} ${text.slice(0, 200)}`,
|
|
475
559
|
response.status,
|
|
@@ -644,7 +728,7 @@ async function stageFileInputs(input) {
|
|
|
644
728
|
if (localFiles.length === 0) {
|
|
645
729
|
return { inputFile: null, packagedFiles: [] };
|
|
646
730
|
}
|
|
647
|
-
_optionalChain([input, 'access',
|
|
731
|
+
_optionalChain([input, 'access', _36 => _36.onStaging, 'optionalCall', _37 => _37(localFiles.length)]);
|
|
648
732
|
const uploads = await Promise.all(
|
|
649
733
|
localFiles.map(
|
|
650
734
|
async ({ file }) => createStagedFileUpload(file.logicalPath, await file.read(), input.codec)
|
|
@@ -699,7 +783,7 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
|
|
|
699
783
|
method: "POST",
|
|
700
784
|
headers: { "content-type": "application/json", ...headers },
|
|
701
785
|
body: JSON.stringify(body),
|
|
702
|
-
..._optionalChain([options, 'optionalAccess',
|
|
786
|
+
..._optionalChain([options, 'optionalAccess', _38 => _38.signal]) ? { signal: options.signal } : {}
|
|
703
787
|
}),
|
|
704
788
|
postFormData: (path, formData) => send(path, {
|
|
705
789
|
method: "POST",
|
|
@@ -740,4 +824,9 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
|
|
|
740
824
|
|
|
741
825
|
|
|
742
826
|
|
|
743
|
-
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
exports.isTerminalPlayRunLifecycleStatus = isTerminalPlayRunLifecycleStatus; exports.decodePlayRunPublicStatus = decodePlayRunPublicStatus; exports.PLAY_RUN_START_PATH = PLAY_RUN_START_PATH; exports.CLI_PLAY_RUN_START_PATH = CLI_PLAY_RUN_START_PATH; exports.CLI_PLAY_RUN_CALLER_INTENT_V2_PATH = CLI_PLAY_RUN_CALLER_INTENT_V2_PATH; exports.CLI_PLAY_RUN_SUPPORTED_HEADER = CLI_PLAY_RUN_SUPPORTED_HEADER; exports.CLI_PLAY_RUN_CALLER_INTENT_V2_SUPPORTED_HEADER = CLI_PLAY_RUN_CALLER_INTENT_V2_SUPPORTED_HEADER; exports.PLAY_RUN_START_STREAM_PATH = PLAY_RUN_START_STREAM_PATH; exports.CLI_PLAY_RUN_START_STREAM_PATH = CLI_PLAY_RUN_START_STREAM_PATH; exports.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH = CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH; exports.PLAY_FILES_STAGE_PATH = PLAY_FILES_STAGE_PATH; exports.PLAY_FILES_STAGE_MINT_PATH = PLAY_FILES_STAGE_MINT_PATH; exports.CliPlayAdmissionUnsupportedError = CliPlayAdmissionUnsupportedError; exports.CliPlayAdmissionCallerIntentV2UnsupportedError = CliPlayAdmissionCallerIntentV2UnsupportedError; exports.buildPlayRunStartBody = buildPlayRunStartBody; exports.preparePlayRunAdmission = preparePlayRunAdmission; exports.readPlayRunAdmissionCapability = readPlayRunAdmissionCapability; exports.startPlayRun = startPlayRun; exports.submitPreparedPlayRunAdmission = submitPreparedPlayRunAdmission; exports.isPlayRunPackage = isPlayRunPackage; exports.normalizePlayRunStart = normalizePlayRunStart; exports.buildNamedPlayRunRequest = buildNamedPlayRunRequest; exports.CSV_DATA_INPUT_KEY = CSV_DATA_INPUT_KEY; exports.fileInputBindingsFromPlaySchema = fileInputBindingsFromPlaySchema; exports.fileInputBindingsFromStaticPipeline = fileInputBindingsFromStaticPipeline; exports.playRunFileInputBindings = playRunFileInputBindings; exports.getDottedInputValue = getDottedInputValue; exports.setDottedInputValue = setDottedInputValue; exports.webStagedFileCodec = webStagedFileCodec; exports.stagedFileContentType = stagedFileContentType; exports.createStagedFileUpload = createStagedFileUpload; exports.STAGE_LEGACY_MULTIPART_MAX_BYTES = STAGE_LEGACY_MULTIPART_MAX_BYTES; exports.mintStagedPlayFileUploads = mintStagedPlayFileUploads; exports.stagePlayFiles = stagePlayFiles; exports.stageFileInputs = stageFileInputs; exports.createSessionPlayRunHttp = createSessionPlayRunHttp;
|
|
@@ -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 _chunkDFHS5XVZjs = require('./chunk-DFHS5XVZ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
@@ -711,7 +711,7 @@ function readSkillsVersionFile(path) {
|
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
function resolveAutoSyncSkillAgents() {
|
|
714
|
-
switch (
|
|
714
|
+
switch (_chunkDFHS5XVZjs.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 _chunkDFHS5XVZjs.HttpClient {
|
|
785
785
|
constructor(config) {
|
|
786
786
|
super(config, readSdkSkillsLocalVersion);
|
|
787
787
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkQD22TY33js = require('./chunk-QD22TY33.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkBJL7RYQNjs = require('./chunk-BJL7RYQN.js');
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
|
-
var DeeplineClient2 = class extends
|
|
10
|
+
var DeeplineClient2 = class extends _chunkQD22TY33js.DeeplineClient {
|
|
11
11
|
constructor(options) {
|
|
12
|
-
const config =
|
|
13
|
-
super(config, new (0,
|
|
12
|
+
const config = _chunkBJL7RYQNjs.resolveConfig.call(void 0, options);
|
|
13
|
+
super(config, new (0, _chunkBJL7RYQNjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkBJL7RYQNjs = require('./chunk-BJL7RYQN.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkDFHS5XVZjs = require('./chunk-DFHS5XVZ.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -290,8 +290,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
290
290
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
291
291
|
var defaultBrowserCommandRunner = childProcess;
|
|
292
292
|
function getAuthedHttpClient() {
|
|
293
|
-
const config =
|
|
294
|
-
return { config, http: new (0,
|
|
293
|
+
const config = _chunkBJL7RYQNjs.resolveConfig.call(void 0, );
|
|
294
|
+
return { config, http: new (0, _chunkBJL7RYQNjs.HttpClient)(config) };
|
|
295
295
|
}
|
|
296
296
|
function stableOsUserId() {
|
|
297
297
|
try {
|
|
@@ -631,7 +631,7 @@ function collectLocalEnvInfo() {
|
|
|
631
631
|
os: `${process.platform} ${process.arch}`,
|
|
632
632
|
node_version: process.version,
|
|
633
633
|
home_dir: homeDir,
|
|
634
|
-
agent_runtime:
|
|
634
|
+
agent_runtime: _chunkDFHS5XVZjs.detectAgentRuntime.call(void 0, )
|
|
635
635
|
};
|
|
636
636
|
const env = process.env;
|
|
637
637
|
const optional = {
|
|
@@ -878,9 +878,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
878
878
|
}
|
|
879
879
|
function withAgentCommandContext(value) {
|
|
880
880
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
881
|
-
return
|
|
881
|
+
return _chunkDFHS5XVZjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
882
882
|
...valueRecord,
|
|
883
|
-
command_context:
|
|
883
|
+
command_context: _chunkBJL7RYQNjs.resolveCliCommandContext.call(void 0, )
|
|
884
884
|
} : value;
|
|
885
885
|
}
|
|
886
886
|
function printJson(value, fields) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkBYEDI5PMjs = require('./chunk-BYEDI5PM.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkBJL7RYQNjs = require('./chunk-BJL7RYQN.js');
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
|
|
|
32
32
|
return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
|
|
33
33
|
}
|
|
34
34
|
async function handleList(options) {
|
|
35
|
-
const { http } =
|
|
35
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
36
36
|
const payload = await http.get(
|
|
37
37
|
`/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
|
|
38
38
|
);
|
|
39
|
-
|
|
39
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
40
40
|
{
|
|
41
41
|
projects: payload.projects,
|
|
42
42
|
count: payload.projects.length,
|
|
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
async function handleStatus(options) {
|
|
76
|
-
const { http } =
|
|
76
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
77
77
|
const payload = await http.get("/api/v2/github/installation");
|
|
78
78
|
const installation = payload.installation;
|
|
79
79
|
const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
|
|
@@ -136,7 +136,7 @@ async function handleStatus(options) {
|
|
|
136
136
|
)
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
140
140
|
{
|
|
141
141
|
installation,
|
|
142
142
|
installations: _nullishCoalesce(payload.installations, () => ( [])),
|
|
@@ -147,10 +147,10 @@ async function handleStatus(options) {
|
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
async function handleRepos(options) {
|
|
150
|
-
const { http } =
|
|
150
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
151
151
|
const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
|
|
152
152
|
const payload = await http.get(`/api/v2/github/repos${query}`);
|
|
153
|
-
|
|
153
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
154
154
|
{
|
|
155
155
|
installation: payload.installation,
|
|
156
156
|
repositories: payload.repositories,
|
|
@@ -171,7 +171,7 @@ async function handleRepos(options) {
|
|
|
171
171
|
}
|
|
172
172
|
async function resolveRepoId(repo, installation) {
|
|
173
173
|
if (/^\d+$/.test(repo)) return Number(repo);
|
|
174
|
-
const { http } =
|
|
174
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
175
175
|
const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
|
|
176
176
|
const payload = await http.get(
|
|
177
177
|
`/api/v2/github/repos${query}`
|
|
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
|
|
|
188
188
|
}
|
|
189
189
|
async function handleLink(repo, options) {
|
|
190
190
|
const repoId = await resolveRepoId(repo, options.installation);
|
|
191
|
-
const { http } =
|
|
191
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
192
192
|
const payload = await http.post("/api/v2/play-projects", {
|
|
193
193
|
repoId,
|
|
194
194
|
...options.installation !== void 0 ? { installationId: options.installation } : {},
|
|
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
|
|
|
197
197
|
...options.branch !== void 0 ? { productionBranch: options.branch } : {},
|
|
198
198
|
...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
|
|
199
199
|
});
|
|
200
|
-
|
|
200
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
201
201
|
{
|
|
202
202
|
project: payload.project,
|
|
203
203
|
render: {
|
|
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
|
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
async function handleGet(id, options) {
|
|
223
|
-
const { http } =
|
|
223
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
224
224
|
const payload = await http.get(
|
|
225
225
|
`/api/v2/play-projects/${encodeURIComponent(id)}`
|
|
226
226
|
);
|
|
227
|
-
|
|
227
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
228
228
|
{
|
|
229
229
|
project: payload.project,
|
|
230
230
|
render: {
|
|
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
|
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
242
|
async function handleSet(id, options) {
|
|
243
|
-
const { http } =
|
|
243
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
244
244
|
const payload = await http.patch(
|
|
245
245
|
`/api/v2/play-projects/${encodeURIComponent(id)}`,
|
|
246
246
|
{
|
|
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
|
|
|
251
251
|
...options.disabled !== void 0 ? { disabled: options.disabled } : {}
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
|
-
|
|
254
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
255
255
|
{
|
|
256
256
|
project: payload.project,
|
|
257
257
|
render: {
|
|
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
|
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
async function handleUnlink(id, options) {
|
|
267
|
-
const { http } =
|
|
267
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
268
268
|
await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
|
|
269
|
-
|
|
269
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
270
270
|
{
|
|
271
271
|
ok: true,
|
|
272
272
|
id,
|
|
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
|
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
288
|
async function handleConnect(options) {
|
|
289
|
-
const baseUrl =
|
|
289
|
+
const baseUrl = _chunkBJL7RYQNjs.resolveBaseUrlOnly.call(void 0, );
|
|
290
290
|
const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
|
|
291
|
-
const opened =
|
|
292
|
-
|
|
291
|
+
const opened = _chunkBYEDI5PMjs.openInBrowser.call(void 0, connectUrl);
|
|
292
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
293
293
|
{
|
|
294
294
|
connectUrl,
|
|
295
295
|
browser: opened,
|
|
@@ -311,7 +311,7 @@ async function handleConnect(options) {
|
|
|
311
311
|
);
|
|
312
312
|
}
|
|
313
313
|
async function handleDeploymentsList(options) {
|
|
314
|
-
const { http } =
|
|
314
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
315
315
|
const query = new URLSearchParams();
|
|
316
316
|
if (options.repo) query.set("projectId", options.repo);
|
|
317
317
|
if (options.limit) query.set("limit", options.limit);
|
|
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
|
|
|
319
319
|
const payload = await http.get(
|
|
320
320
|
`/api/v2/deployments${suffix}`
|
|
321
321
|
);
|
|
322
|
-
|
|
322
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
323
323
|
{
|
|
324
324
|
deployments: payload.deployments,
|
|
325
325
|
count: payload.deployments.length,
|
|
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
|
|
|
363
363
|
]);
|
|
364
364
|
}
|
|
365
365
|
async function handleDeploymentGet(id, options) {
|
|
366
|
-
const { http } =
|
|
366
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
367
367
|
const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
|
|
368
368
|
const playLines = renderDeploymentPlayLines(payload.deployment.results);
|
|
369
369
|
const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
|
|
370
370
|
const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
|
|
371
|
-
|
|
371
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
372
372
|
{
|
|
373
373
|
deployment: payload.deployment,
|
|
374
374
|
project: payload.project,
|
|
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
|
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
async function handleDeploymentCancel(id, options) {
|
|
390
|
-
const { http } =
|
|
390
|
+
const { http } = _chunkBYEDI5PMjs.getAuthedHttpClient.call(void 0, );
|
|
391
391
|
const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
|
|
392
|
-
|
|
392
|
+
_chunkBYEDI5PMjs.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
cancelled: payload.cancelled,
|
|
395
395
|
deployment: payload.deployment,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkLOX3BISDjs = require('./chunk-LOX3BISD.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -31,7 +31,7 @@ var VIEWS = {
|
|
|
31
31
|
details: model,
|
|
32
32
|
lines: [
|
|
33
33
|
...unlisted,
|
|
34
|
-
...
|
|
34
|
+
..._chunkLOX3BISDjs.formatModelDescription.call(void 0, model).trimEnd().split("\n")
|
|
35
35
|
]
|
|
36
36
|
};
|
|
37
37
|
},
|
|
@@ -131,18 +131,18 @@ async function findNamed(reference, options, lookups) {
|
|
|
131
131
|
const features = toolFeatures(record);
|
|
132
132
|
return {
|
|
133
133
|
described: {
|
|
134
|
-
...
|
|
134
|
+
..._chunkLOX3BISDjs.describedTool.call(void 0, record, name),
|
|
135
135
|
// Shown when the tool runs only on your own credentials; otherwise
|
|
136
136
|
// it is a feature, described with --feature byok.
|
|
137
137
|
..._optionalChain([byok, 'optionalAccess', _3 => _3.required]) === true ? { byok } : {},
|
|
138
138
|
...features.length ? { features: features.map(({ view: _view, ...feature }) => feature) } : {}
|
|
139
139
|
},
|
|
140
|
-
record:
|
|
140
|
+
record: _chunkLOX3BISDjs.toolMetadataJsonForDescribe.call(void 0,
|
|
141
141
|
record,
|
|
142
142
|
name,
|
|
143
143
|
lookups.seedStarterScript
|
|
144
144
|
),
|
|
145
|
-
schemas:
|
|
145
|
+
schemas: _chunkLOX3BISDjs.publicToolSchemas.call(void 0, record),
|
|
146
146
|
feature: (featureName, value) => {
|
|
147
147
|
const feature = features.find(({ name: name2 }) => name2 === featureName);
|
|
148
148
|
return feature ? describeFeature(record, feature, value, {
|
|
@@ -16,12 +16,12 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
16
16
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkS7OILDJHjs = require('./chunk-S7OILDJH.js');
|
|
20
20
|
|
|
21
21
|
// src/version.ts
|
|
22
|
-
var SDK_VERSION =
|
|
23
|
-
var SDK_API_MAJOR =
|
|
24
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
22
|
+
var SDK_VERSION = _chunkS7OILDJHjs.SDK_RELEASE.version;
|
|
23
|
+
var SDK_API_MAJOR = _chunkS7OILDJHjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
24
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkS7OILDJHjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
25
25
|
|
|
26
26
|
// src/agent-runtime.ts
|
|
27
27
|
var _os = require('os');
|
|
@@ -126,6 +126,7 @@ var PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER = "x-deepline-preferred-receipt-
|
|
|
126
126
|
var SYNTHETIC_RUN_HEADER = "x-deepline-synthetic-run";
|
|
127
127
|
|
|
128
128
|
// ../play-runtime/test-runtime-seams.ts
|
|
129
|
+
var _crypto = require('crypto');
|
|
129
130
|
var PLAY_RUNTIME_TEST_FAULT_HEADER = "x-deepline-test-fault";
|
|
130
131
|
var MAX_RUNTIME_TEST_POLICY_MS = 10 * 6e4;
|
|
131
132
|
var MAX_RUNNER_HEARTBEAT_SILENCE_MS = 10 * 6e4;
|
|
@@ -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(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQD22TY33js = require('./chunk-QD22TY33.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkBJL7RYQNjs = require('./chunk-BJL7RYQN.js');
|
|
8
8
|
|
|
9
9
|
// src/plays/local-play-execution.ts
|
|
10
10
|
function importedNodes(graph) {
|
|
@@ -137,9 +137,9 @@ async function pinLocalPlayImports(client, graph) {
|
|
|
137
137
|
|
|
138
138
|
// src/plays/client.ts
|
|
139
139
|
function createPlayClient(options) {
|
|
140
|
-
const config =
|
|
141
|
-
return new (0,
|
|
142
|
-
new (0,
|
|
140
|
+
const config = _chunkBJL7RYQNjs.resolveConfig.call(void 0, options);
|
|
141
|
+
return new (0, _chunkQD22TY33js.PlayClient)(
|
|
142
|
+
new (0, _chunkBJL7RYQNjs.HttpClient)(config),
|
|
143
143
|
_nullishCoalesce(config.environment, () => ( process.env))
|
|
144
144
|
);
|
|
145
145
|
}
|