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,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KH27B2HJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
iterateCursorPages,
|
|
6
6
|
requireBillingIdempotencyKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZHPSJ3LJ.mjs";
|
|
8
8
|
import "./chunk-L2VKAASU.mjs";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-Z2XA6YU4.mjs";
|
|
10
10
|
import "./chunk-PSX3WHIH.mjs";
|
|
11
11
|
import "./chunk-UBKA33KY.mjs";
|
|
12
12
|
import {
|
|
13
13
|
PLAY_RUNTIME_PRICING_NOTE
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CXTW7SRW.mjs";
|
|
15
15
|
import "./chunk-5LUF4LAR.mjs";
|
|
16
16
|
import {
|
|
17
17
|
PLAY_SANDBOX_SIZE_INPUTS
|
|
@@ -22,18 +22,18 @@ import {
|
|
|
22
22
|
openInBrowser,
|
|
23
23
|
printCommandEnvelope,
|
|
24
24
|
shouldEmitJson
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-EEFSUCYP.mjs";
|
|
26
|
+
import "./chunk-K4WJ4BYO.mjs";
|
|
27
|
+
import "./chunk-QDBGPRR2.mjs";
|
|
28
28
|
import {
|
|
29
29
|
AuthError,
|
|
30
30
|
ConfigError
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CQBIO6HW.mjs";
|
|
32
32
|
import "./chunk-DLIRSHV6.mjs";
|
|
33
33
|
import {
|
|
34
34
|
DeeplineError
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-JL2OTMSG.mjs";
|
|
36
|
+
import "./chunk-V5IIBG2E.mjs";
|
|
37
37
|
import "./chunk-WZYKRD7T.mjs";
|
|
38
38
|
import "./chunk-KRD6H754.mjs";
|
|
39
39
|
|
|
@@ -790,21 +790,29 @@ function planPriceText(priceUsd, priceInterval) {
|
|
|
790
790
|
}
|
|
791
791
|
function targetPlanLine(plan) {
|
|
792
792
|
const firstMonth = plan.first_month_price_usd != null ? ` (first month $${plan.first_month_price_usd})` : "";
|
|
793
|
-
|
|
793
|
+
const bonus = plan.bonus_credits != null ? ` (+${plan.bonus_credits} bonus credits once paid)` : "";
|
|
794
|
+
return `${plan.display_name ?? plan.name} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)}${firstMonth}${bonus} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
794
795
|
}
|
|
795
796
|
async function handlePlans(options) {
|
|
796
797
|
const client = new DeeplineClient();
|
|
797
|
-
const payload = await client.billing.targetPlans(
|
|
798
|
+
const payload = await client.billing.targetPlans(
|
|
799
|
+
options.promoCode ? { promoCode: options.promoCode } : void 0
|
|
800
|
+
);
|
|
801
|
+
const promo = payload.promo_code;
|
|
798
802
|
const listedCurrentPlan = payload.plans.find(
|
|
799
803
|
(plan) => plan.sku === payload.current_plan_sku
|
|
800
804
|
);
|
|
801
805
|
const currentPlan = listedCurrentPlan ?? (await client.billing.targetStatus()).plan;
|
|
806
|
+
const pendingPlan = payload.pending_plan_display_name && payload.pending_plan_sku ? `${payload.pending_plan_display_name} (${payload.pending_plan_sku})` : payload.pending_plan_sku ?? "none";
|
|
802
807
|
const lines = [
|
|
803
|
-
`Current plan: ${currentPlan.name} (${currentPlan.sku}) | ${planPriceText(currentPlan.recurring_price_usd, currentPlan.interval)} | ${currentPlan.included_credits ?? "(unknown)"} included credits/month`,
|
|
804
|
-
`Pending plan: ${
|
|
808
|
+
`Current plan: ${currentPlan.display_name ?? currentPlan.name} (${currentPlan.sku}) | ${planPriceText(currentPlan.recurring_price_usd, currentPlan.interval)} | ${currentPlan.included_credits ?? "(unknown)"} included credits/month`,
|
|
809
|
+
`Pending plan: ${pendingPlan}`,
|
|
805
810
|
`Plan changes: ${payload.acquisition_enabled ? "enabled" : "disabled"}`,
|
|
811
|
+
...promo ? [
|
|
812
|
+
promo.status === "applied" ? `Promo code ${promo.code}: applied to ${promo.plan_skus.join(", ")}${promo.expires_at ? ` (until ${promo.expires_at})` : ""}` : `Promo code ${promo.code}: ${promo.status.replaceAll("_", " ")}`
|
|
813
|
+
] : [],
|
|
806
814
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
807
|
-
"Change plan: deepline billing change-plan <plan_sku>"
|
|
815
|
+
promo?.status === "applied" ? `Change plan: deepline billing change-plan <plan_sku> --promo-code ${promo.code}` : "Change plan: deepline billing change-plan <plan_sku>"
|
|
808
816
|
];
|
|
809
817
|
const legacyPayload = shouldEmitJson(options.json) ? await client.billing.plans() : null;
|
|
810
818
|
printCommandEnvelope(
|
|
@@ -847,7 +855,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
847
855
|
const payload = await client.billing.subscription.status();
|
|
848
856
|
const pools = payload.credit_pools ?? [];
|
|
849
857
|
const lines = [
|
|
850
|
-
`Plan: ${payload.plan_name ?? "(unknown)"} (${payload.plan_version_id ?? "(unknown)"})`,
|
|
858
|
+
`Plan: ${payload.plan_display_name ?? payload.plan_name ?? "(unknown)"} (${payload.plan_version_id ?? "(unknown)"})`,
|
|
851
859
|
`Subscribed: ${payload.subscribed ? "yes" : "no"}`,
|
|
852
860
|
...payload.cancel_at_period_end ? [
|
|
853
861
|
`Cancellation scheduled: ends ${payload.current_period_end ?? "(unknown)"} at period end (credits are kept)`
|
|
@@ -896,6 +904,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
896
904
|
action,
|
|
897
905
|
plan_version_id: status.plan_version_id,
|
|
898
906
|
plan_name: status.plan_name,
|
|
907
|
+
plan_display_name: status.plan_display_name,
|
|
899
908
|
cancel_at_period_end: status.cancel_at_period_end,
|
|
900
909
|
current_period_end: status.current_period_end,
|
|
901
910
|
consequence,
|
|
@@ -909,7 +918,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
909
918
|
{
|
|
910
919
|
title: "billing subscription cancel (dry run)",
|
|
911
920
|
lines: [
|
|
912
|
-
`Plan: ${status.plan_name} (${status.plan_version_id})`,
|
|
921
|
+
`Plan: ${status.plan_display_name ?? status.plan_name} (${status.plan_version_id})`,
|
|
913
922
|
`Planned request: POST ${SUBSCRIPTION_CANCEL_PATH} {"action":"${action}"}`,
|
|
914
923
|
consequence,
|
|
915
924
|
"No request was sent. Re-run without --dry-run to apply."
|
|
@@ -1227,7 +1236,7 @@ async function handleTargetStatus(options) {
|
|
|
1227
1236
|
{
|
|
1228
1237
|
title: "billing status",
|
|
1229
1238
|
lines: [
|
|
1230
|
-
`Plan: ${payload.plan.name} (${payload.plan.sku})`,
|
|
1239
|
+
`Plan: ${payload.plan.display_name ?? payload.plan.name} (${payload.plan.sku})`,
|
|
1231
1240
|
`State: ${payload.state}`,
|
|
1232
1241
|
`Payment: ${payload.payment_state}`,
|
|
1233
1242
|
`Automatic recharge: ${payload.recharge_state}`,
|
|
@@ -1444,6 +1453,119 @@ async function handleAutoRechargeOff(options) {
|
|
|
1444
1453
|
{ json: options.json }
|
|
1445
1454
|
);
|
|
1446
1455
|
}
|
|
1456
|
+
function savedCardLine(card) {
|
|
1457
|
+
const expiry = card.exp_month !== null && card.exp_year !== null ? ` exp ${String(card.exp_month).padStart(2, "0")}/${card.exp_year}` : "";
|
|
1458
|
+
const marks = [
|
|
1459
|
+
card.is_default ? "default" : null,
|
|
1460
|
+
card.expired ? "expired" : null,
|
|
1461
|
+
card.kind === "legacy_source" ? "cannot be changed here" : null
|
|
1462
|
+
].filter(Boolean);
|
|
1463
|
+
return `${card.id} ${card.label}${expiry}${marks.length > 0 ? ` (${marks.join(", ")})` : ""}`;
|
|
1464
|
+
}
|
|
1465
|
+
function savedCardLines(cards, hasMore) {
|
|
1466
|
+
if (cards.length === 0) {
|
|
1467
|
+
return ["No saved cards. Add one with: deepline billing cards add"];
|
|
1468
|
+
}
|
|
1469
|
+
return [
|
|
1470
|
+
...cards.map(savedCardLine),
|
|
1471
|
+
...hasMore ? ["More cards exist: pass --cursor with next_cursor."] : []
|
|
1472
|
+
];
|
|
1473
|
+
}
|
|
1474
|
+
async function handleCardsList(options) {
|
|
1475
|
+
const limit = options.limit === void 0 ? void 0 : Number(options.limit);
|
|
1476
|
+
if (limit !== void 0 && (!Number.isInteger(limit) || limit < 1 || limit > 100)) {
|
|
1477
|
+
printCommandEnvelope(
|
|
1478
|
+
{ ok: false, error: "--limit must be a whole number from 1 to 100." },
|
|
1479
|
+
{ json: options.json }
|
|
1480
|
+
);
|
|
1481
|
+
process.exitCode = 1;
|
|
1482
|
+
return;
|
|
1483
|
+
}
|
|
1484
|
+
const payload = await new DeeplineClient().billing.cards.list({
|
|
1485
|
+
...limit !== void 0 ? { limit } : {},
|
|
1486
|
+
...options.cursor ? { cursor: options.cursor } : {}
|
|
1487
|
+
});
|
|
1488
|
+
printCommandEnvelope(
|
|
1489
|
+
{
|
|
1490
|
+
ok: true,
|
|
1491
|
+
...payload,
|
|
1492
|
+
render: {
|
|
1493
|
+
sections: [
|
|
1494
|
+
{
|
|
1495
|
+
title: "Saved cards",
|
|
1496
|
+
lines: savedCardLines(payload.cards, payload.has_more)
|
|
1497
|
+
}
|
|
1498
|
+
]
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
{ json: options.json }
|
|
1502
|
+
);
|
|
1503
|
+
}
|
|
1504
|
+
async function handleCardsAdd(options) {
|
|
1505
|
+
const makeDefault = options.makeDefault === true;
|
|
1506
|
+
const payload = await new DeeplineClient().billing.cards.add({ makeDefault });
|
|
1507
|
+
printCommandEnvelope(
|
|
1508
|
+
{
|
|
1509
|
+
ok: true,
|
|
1510
|
+
make_default: makeDefault,
|
|
1511
|
+
...payload,
|
|
1512
|
+
render: {
|
|
1513
|
+
sections: [
|
|
1514
|
+
{
|
|
1515
|
+
title: "Add a card",
|
|
1516
|
+
lines: [
|
|
1517
|
+
`Open this page to enter the card: ${payload.checkout_url}`,
|
|
1518
|
+
makeDefault ? "It will become the default card." : "Your current default card stays the default. With no saved card yet, this one becomes it.",
|
|
1519
|
+
"Then check: deepline billing cards list"
|
|
1520
|
+
]
|
|
1521
|
+
}
|
|
1522
|
+
]
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
{ json: options.json }
|
|
1526
|
+
);
|
|
1527
|
+
}
|
|
1528
|
+
async function handleCardChange(action, cardId, options) {
|
|
1529
|
+
const changeId = options.changeId ?? randomUUID();
|
|
1530
|
+
const path = `/api/v2/billing/payment-methods/${action}`;
|
|
1531
|
+
if (options.dryRun) {
|
|
1532
|
+
printCommandEnvelope(
|
|
1533
|
+
{
|
|
1534
|
+
ok: true,
|
|
1535
|
+
dry_run: true,
|
|
1536
|
+
change_id: changeId,
|
|
1537
|
+
planned_request: {
|
|
1538
|
+
method: "POST",
|
|
1539
|
+
path,
|
|
1540
|
+
body: { card_id: cardId, change_id: changeId }
|
|
1541
|
+
}
|
|
1542
|
+
},
|
|
1543
|
+
{ json: options.json }
|
|
1544
|
+
);
|
|
1545
|
+
return;
|
|
1546
|
+
}
|
|
1547
|
+
const cards = new DeeplineClient().billing.cards;
|
|
1548
|
+
const payload = action === "default" ? await cards.setDefault({ cardId, changeId }) : await cards.remove({ cardId, changeId });
|
|
1549
|
+
printCommandEnvelope(
|
|
1550
|
+
{
|
|
1551
|
+
...payload,
|
|
1552
|
+
render: {
|
|
1553
|
+
sections: [
|
|
1554
|
+
{
|
|
1555
|
+
title: action === "default" ? "Default card changed" : "Card removed",
|
|
1556
|
+
lines: [
|
|
1557
|
+
...action === "default" ? [
|
|
1558
|
+
"Later top-ups, auto top-up and invoices use this card. Charges already made are not moved."
|
|
1559
|
+
] : [],
|
|
1560
|
+
...savedCardLines(payload.cards, payload.has_more)
|
|
1561
|
+
]
|
|
1562
|
+
}
|
|
1563
|
+
]
|
|
1564
|
+
}
|
|
1565
|
+
},
|
|
1566
|
+
{ json: options.json }
|
|
1567
|
+
);
|
|
1568
|
+
}
|
|
1447
1569
|
async function handleBuyCredits(creditsRaw, options) {
|
|
1448
1570
|
const credits = parseTopUpCredits(creditsRaw);
|
|
1449
1571
|
if (credits === null) {
|
|
@@ -1522,14 +1644,14 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1522
1644
|
);
|
|
1523
1645
|
}
|
|
1524
1646
|
async function handleTargetPlan(planSku, options) {
|
|
1525
|
-
if (planSku !== "payg-v1" && planSku !== "builder-v1" && planSku !== "growth-v1" && // Retained Canary requests may replay their original operation. The API
|
|
1647
|
+
if (planSku !== "payg-v1" && planSku !== "builder-v1" && planSku !== "growth-v1" && planSku !== "team-v2" && // Retained Canary requests may replay their original operation. The API
|
|
1526
1648
|
// rejects new acquisition even when a caller supplies an idempotency key.
|
|
1527
1649
|
!(planSku === "growth-canary-v1" && options.idempotencyKey) && planSku !== "team-v1") {
|
|
1528
1650
|
reportBillingFailure(
|
|
1529
1651
|
{
|
|
1530
1652
|
exitCode: 2,
|
|
1531
1653
|
code: "INVALID_PLAN",
|
|
1532
|
-
message: "Plan must be payg-v1, builder-v1, growth-v1, or team-
|
|
1654
|
+
message: "Plan must be payg-v1, builder-v1, growth-v1, team-v1, or team-v2."
|
|
1533
1655
|
},
|
|
1534
1656
|
options
|
|
1535
1657
|
);
|
|
@@ -1540,6 +1662,7 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1540
1662
|
action: "start_or_change",
|
|
1541
1663
|
targetPlanSku: planSku,
|
|
1542
1664
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1665
|
+
...options.promoCode ? { promoCode: options.promoCode } : {},
|
|
1543
1666
|
idempotencyKey
|
|
1544
1667
|
});
|
|
1545
1668
|
printCommandEnvelope(
|
|
@@ -1895,9 +2018,44 @@ Examples:
|
|
|
1895
2018
|
printCommandEnvelope({ ok: true, ...result }, { json: options.json });
|
|
1896
2019
|
})
|
|
1897
2020
|
);
|
|
1898
|
-
billing.command("
|
|
2021
|
+
billing.command("cards").description("List, add, choose the default of, and remove saved cards.").addHelpText(
|
|
2022
|
+
"after",
|
|
2023
|
+
`
|
|
2024
|
+
The default card pays for top-ups, auto top-up and invoices. Changing it does
|
|
2025
|
+
not move a charge already made. To remove the default card, make another card
|
|
2026
|
+
the default first.
|
|
2027
|
+
|
|
2028
|
+
Examples:
|
|
2029
|
+
deepline billing cards list
|
|
2030
|
+
deepline billing cards add
|
|
2031
|
+
deepline billing cards add --make-default
|
|
2032
|
+
deepline billing cards default <card_id> --dry-run
|
|
2033
|
+
deepline billing cards remove <card_id>
|
|
2034
|
+
`
|
|
2035
|
+
).addCommand(
|
|
2036
|
+
new Command("list").description("Show saved cards, default first.").option("--limit <n>", "Cards per page (1-100, default 20)").option("--cursor <cursor>", "next_cursor from the previous page").option("--json", "Emit JSON output").action(handleCardsList)
|
|
2037
|
+
).addCommand(
|
|
2038
|
+
new Command("add").description(
|
|
2039
|
+
"Print a secure page for entering a card. Keeps the current default unless --make-default is set."
|
|
2040
|
+
).option("--make-default", "Make the new card the default").option("--json", "Emit JSON output").action(handleCardsAdd)
|
|
2041
|
+
).addCommand(
|
|
2042
|
+
new Command("default").description("Use a saved card for later top-ups and invoices.").argument("<card_id>", "Card id from: deepline billing cards list").option("--change-id <uuid>", "Reuse to retry the same request").option("--dry-run", "Print the planned request without sending it").option("--json", "Emit JSON output").action(
|
|
2043
|
+
(cardId, options) => handleCardChange("default", cardId, options)
|
|
2044
|
+
)
|
|
2045
|
+
).addCommand(
|
|
2046
|
+
new Command("remove").description("Remove a saved card that is not the default.").argument("<card_id>", "Card id from: deepline billing cards list").option("--change-id <uuid>", "Reuse to retry the same request").option("--dry-run", "Print the planned request without sending it").option("--json", "Emit JSON output").action(
|
|
2047
|
+
(cardId, options) => handleCardChange("remove", cardId, options)
|
|
2048
|
+
)
|
|
2049
|
+
);
|
|
2050
|
+
billing.command("change-plan").description("Start or change the target billing plan.").argument(
|
|
2051
|
+
"<plan_sku>",
|
|
2052
|
+
"payg-v1, builder-v1, growth-v1, team-v1, or team-v2"
|
|
2053
|
+
).option(
|
|
1899
2054
|
"--billing-email <email>",
|
|
1900
2055
|
"Invoice recipient when the account has no billing email"
|
|
2056
|
+
).option(
|
|
2057
|
+
"--promo-code <code>",
|
|
2058
|
+
"Plan promo code; an unknown, expired, or used code refuses the change"
|
|
1901
2059
|
).option("--idempotency-key <key>", "Stable retry key").option("--json", "Emit JSON output").action(handleTargetPlan);
|
|
1902
2060
|
billing.command("cancel-plan").description("Cancel a target subscription at period end, or undo it.").option("--undo", "Undo a pending period-end cancellation").option("--idempotency-key <key>", "Stable retry key").option("--json", "Emit JSON output").action(handleTargetPlanCancellation);
|
|
1903
2061
|
billing.command("portal").description("Open the Stripe-hosted billing recovery portal.").option("--billing-address", "Open the billing address editor directly").option("--no-open", "Print the URL without opening a browser").option("--json", "Emit JSON output").action(handleTargetPortal);
|
|
@@ -1909,13 +2067,16 @@ Notes:
|
|
|
1909
2067
|
visible plan's recurring price, included credits, purchased-credit price,
|
|
1910
2068
|
and current acquisition availability. All amounts are Deepline credits and
|
|
1911
2069
|
Deepline-facing USD, never raw provider spend. Change to an available plan
|
|
1912
|
-
with: deepline billing change-plan <plan_sku
|
|
2070
|
+
with: deepline billing change-plan <plan_sku>. A first-month price or bonus
|
|
2071
|
+
credits appear on a plan when the workspace is offered them. With
|
|
2072
|
+
--promo-code, prices are quoted with that code and its outcome is shown;
|
|
2073
|
+
pass the same code to change-plan.
|
|
1913
2074
|
|
|
1914
2075
|
Examples:
|
|
1915
2076
|
deepline billing plans
|
|
1916
|
-
deepline billing plans
|
|
2077
|
+
deepline billing plans --promo-code <code>
|
|
1917
2078
|
`
|
|
1918
|
-
).option("--json", "Emit JSON output").action(handlePlans);
|
|
2079
|
+
).option("--promo-code <code>", "Quote plan prices with a promo code").option("--json", "Emit JSON output").action(handlePlans);
|
|
1919
2080
|
billing.command("subscribe").description(
|
|
1920
2081
|
"Start a subscription checkout for a plan and optionally open it in your browser."
|
|
1921
2082
|
).addHelpText(
|