deepline 0.3.552 → 0.3.554
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 +107 -12
- package/dist/bundling-sources/sdk/src/compat.ts +239 -87
- package/dist/bundling-sources/sdk/src/config.ts +113 -2
- package/dist/bundling-sources/sdk/src/errors.ts +2 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +118 -8
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
- package/dist/bundling-sources/sdk/src/play.ts +3 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +8 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
- package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
- package/dist/bundling-sources/sdk/src/types.ts +9 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
- package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
- package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
- package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +9 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +168 -41
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
- package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
- package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +444 -39
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
- package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +254 -44
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +259 -52
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
- package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
- package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
- package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
- package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
- package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
- package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
- package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
- package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
- package/dist/cli/{auth-KVSBJZOX.mjs → auth-HJUNW7T2.mjs} +8 -7
- package/dist/cli/auth-SP6SKZJZ.js +44 -0
- package/dist/cli/{billing-FQREA7UA.js → billing-4TSA5HEC.js} +297 -161
- package/dist/cli/{billing-54RHFEBI.mjs → billing-SJYRJAQ2.mjs} +197 -61
- package/dist/cli/{chunk-4MK42735.js → chunk-2HMN5H54.js} +215 -130
- package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
- package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-2ORPFQUA.mjs} +18 -18
- package/dist/cli/{chunk-RQZQVFCJ.js → chunk-2OVHNHCF.js} +2 -2
- package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-33WRQSQ2.mjs} +1874 -91
- package/dist/cli/{chunk-UPMRIVZB.js → chunk-3IKGZ4CG.js} +74 -13
- package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-3Z4VFCXO.mjs} +8 -8
- package/dist/cli/{chunk-GKYAYLRI.js → chunk-4DOFGIEJ.js} +27 -31
- package/dist/cli/{chunk-4TALT2M3.mjs → chunk-52Q5KETX.mjs} +69 -3
- package/dist/cli/{chunk-RBEUVDZF.js → chunk-5CYZHOKI.js} +249 -107
- package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
- package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-62AUAWQV.mjs} +4 -4
- package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-62HWJXST.mjs} +17 -21
- package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-6EXOAT6T.mjs} +2 -2
- package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
- package/dist/cli/{chunk-ADRC5I3R.js → chunk-7OWI736E.js} +30 -30
- package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
- package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-B6HO2XWH.mjs} +13 -13
- package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-BOZAP2EM.mjs} +141 -56
- package/dist/cli/chunk-BVXIGOBZ.js +32 -0
- package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
- package/dist/cli/{chunk-WE5HES3H.mjs → chunk-D6Z6POKE.mjs} +151 -43
- package/dist/cli/{chunk-AZQ264ID.mjs → chunk-DSKSFFK2.mjs} +1 -1
- package/dist/cli/{chunk-SHLFOPD6.js → chunk-DUBXUAAO.js} +5 -5
- package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
- package/dist/cli/{chunk-HO3XK3R7.js → chunk-E74KGKFZ.js} +8 -8
- package/dist/cli/{chunk-77AAAGVB.js → chunk-ECHKAC7M.js} +2 -2
- package/dist/cli/{chunk-KWSH5T7K.js → chunk-EN5NHCCQ.js} +21 -21
- package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-F7CMRKSK.mjs} +1 -1
- package/dist/cli/{chunk-JWUAX6OP.js → chunk-FBAFX43W.js} +11 -11
- package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-FXQ3JKE3.mjs} +1 -1
- package/dist/cli/{chunk-QPKH23EC.mjs → chunk-GA2M3G3Y.mjs} +5 -5
- package/dist/cli/{chunk-G4O75EXF.js → chunk-GHT2NDL7.js} +18 -18
- package/dist/cli/{chunk-MF2GHZDO.js → chunk-GRZENGNE.js} +2 -2
- package/dist/cli/{chunk-4UUR4TCH.js → chunk-IVZKMJUK.js} +1875 -92
- package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-KVBQY4ST.mjs} +3 -3
- package/dist/cli/{chunk-S5S355UY.mjs → chunk-KZHBDMGF.mjs} +12 -12
- package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
- package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
- package/dist/cli/{chunk-2WFPHBR4.js → chunk-LY5MMXFF.js} +47 -29
- package/dist/cli/{chunk-BAIST2BR.js → chunk-M7STM3MZ.js} +36 -36
- package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
- package/dist/cli/{chunk-45PVGZST.js → chunk-OPTV7D2V.js} +508 -361
- package/dist/cli/{chunk-PFO3ISXA.js → chunk-OVEYWO4H.js} +174 -129
- package/dist/cli/{chunk-BGBJV26E.mjs → chunk-PC2FTUCP.mjs} +4 -4
- package/dist/cli/{chunk-WLN3SUIA.js → chunk-PQQMPUCZ.js} +3 -3
- package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-Q7ACILL2.mjs} +5 -5
- package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
- package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RBBTCYQB.mjs} +3 -3
- package/dist/cli/{chunk-F2LH7TGF.js → chunk-RTHMGSZX.js} +21 -21
- package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-S6W6SJ6E.mjs} +158 -16
- package/dist/cli/chunk-STXDSVQZ.mjs +32 -0
- package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-TGUQET3O.mjs} +67 -6
- package/dist/cli/{chunk-IHRKLXZN.js → chunk-TJ6HLN56.js} +5 -5
- package/dist/cli/{chunk-3FD5EQ62.js → chunk-TOO3YM5N.js} +6 -7
- package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UBBYHB2B.mjs} +2 -2
- package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-UC4BDZKI.mjs} +299 -69
- package/dist/cli/{chunk-634ZDA3F.js → chunk-UNNOZKRT.js} +1 -1
- package/dist/cli/{chunk-IDVVIXPJ.js → chunk-UOT7HPBH.js} +41 -41
- package/dist/cli/{chunk-6YCA5NKJ.js → chunk-UYCZFQYQ.js} +12 -12
- package/dist/cli/{chunk-7IKQKKNX.js → chunk-VIUUTEHY.js} +90 -24
- package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-VLO5NFH2.mjs} +63 -18
- package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-VQ75KX7G.mjs} +5 -5
- package/dist/cli/{chunk-4NQF6KJ3.js → chunk-VV4XGZ24.js} +13 -13
- package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
- package/dist/cli/{chunk-S46HWQKO.js → chunk-W6CZDTIR.js} +69 -69
- package/dist/cli/{chunk-XVB7V4N7.js → chunk-WL7P32PI.js} +161 -53
- package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-XD3MFTHA.mjs} +1 -1
- package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-XFZX6FNM.mjs} +40 -22
- package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-XU6QNM4D.mjs} +1 -1
- package/dist/cli/{chunk-QAORXEY3.mjs → chunk-YCOGPOUX.mjs} +6 -7
- package/dist/cli/{chunk-VQALXEXO.js → chunk-YQKCH4R7.js} +348 -118
- package/dist/cli/{chunk-6O5HOODW.mjs → chunk-YY55NYAH.mjs} +207 -60
- package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
- package/dist/cli/command-docs.js +3 -3
- package/dist/cli/command-docs.mjs +2 -2
- package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-O3Q5IPLF.mjs} +9 -8
- package/dist/cli/concurrent-runs-help-ZFRZWX5V.js +22 -0
- package/dist/cli/{csv-F5VAGX4K.js → csv-4ZQ2RATI.js} +16 -15
- package/dist/cli/{csv-2PTVDNO6.mjs → csv-Y3BFPEM6.mjs} +7 -6
- package/dist/cli/{db-IEDXAUF7.mjs → db-3JYY4JNN.mjs} +17 -17
- package/dist/cli/{db-Z3OIUFMM.js → db-VEIFS4M7.js} +45 -45
- package/dist/cli/describe-EVJ4MFVU.mjs +50 -0
- package/dist/cli/describe-FG625QPF.js +50 -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 +7 -7
- package/dist/cli/describe-core.mjs +6 -6
- package/dist/cli/{executions-H6H5655J.js → executions-HPZXOOVX.js} +12 -12
- package/dist/cli/{executions-R3LP74QN.mjs → executions-PCXZKEHM.mjs} +10 -10
- package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-Y6VKZNY6.mjs} +9 -8
- package/dist/cli/{feedback-VFOUR66B.js → feedback-ZKFHFVL6.js} +17 -16
- package/dist/cli/git-RUBMALLH.js +26 -0
- package/dist/cli/{git-YX2J4GCI.mjs → git-UMPR2QYC.mjs} +8 -7
- package/dist/cli/index.js +170 -158
- package/dist/cli/index.mjs +60 -48
- package/dist/cli/{integrations-E2JZYKHS.js → integrations-3GQCTRTF.js} +23 -27
- package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-V3TM6XAB.mjs} +15 -19
- package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-JZBUD7ZE.mjs} +9 -8
- package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-VYCO7NGW.js} +12 -11
- package/dist/cli/{mcp-UQV2K4EW.js → mcp-4OIWTCE6.js} +121 -48
- package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-PH4KZ76P.mjs} +100 -27
- package/dist/cli/{monitors-R3BBDCRC.js → monitors-E2A6VPBY.js} +221 -186
- package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-SSMGIDGX.mjs} +58 -23
- package/dist/cli/org-SFDKSK5D.mjs +2289 -0
- package/dist/cli/org-WUDZGWBT.js +2289 -0
- package/dist/cli/outcomes-QT7LQBPK.mjs +2865 -0
- package/dist/cli/outcomes-Y7SZTLSL.js +2865 -0
- package/dist/cli/{play-MDWPR4XG.mjs → play-EK7KSFPL.mjs} +376 -106
- package/dist/cli/{play-2MVO27VO.js → play-GDNHCRRR.js} +1150 -880
- package/dist/cli/{providers-AKDYFZJZ.mjs → providers-FVZLRXAU.mjs} +10 -10
- package/dist/cli/{providers-2AACRUZH.js → providers-ZKOSECLV.js} +13 -13
- package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-KSDKIXYD.js} +9 -8
- package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-UJZ6PIQV.mjs} +7 -6
- package/dist/cli/{run-RTSQNGRD.mjs → run-E7MZ7P35.mjs} +35 -33
- package/dist/cli/{run-2634REDK.js → run-PD2BBG6S.js} +55 -53
- package/dist/cli/run-identity-LMLFMACS.js +31 -0
- package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
- package/dist/cli/search-TKSPTPHA.js +32 -0
- package/dist/cli/{search-6AOJ4XPP.mjs → search-VTFUFTOY.mjs} +11 -11
- package/dist/cli/{search-output-S5ODBL5E.js → search-output-G2AGDCOY.js} +13 -12
- package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PFVXQCWA.mjs} +10 -9
- package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-7CIMEMX7.mjs} +11 -11
- package/dist/cli/{secrets-LHCIIHMT.js → secrets-BCOQ4U7U.js} +20 -20
- package/dist/cli/sessions-4CO556VD.js +23 -0
- package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-IUCQZEF7.mjs} +9 -8
- package/dist/cli/{settings-EBONWL5C.mjs → settings-KZN62UQK.mjs} +16 -16
- package/dist/cli/{settings-CP4FVK2W.js → settings-REL4736M.js} +89 -89
- package/dist/cli/{setup-I5AZE3IU.mjs → setup-2P7OG3OU.mjs} +22 -24
- package/dist/cli/{setup-LFGHTNLQ.js → setup-2XIVBBCS.js} +62 -64
- package/dist/cli/skills-JYT5DEY6.js +37 -0
- package/dist/cli/{skills-W76AO5XE.mjs → skills-VIGNDJKI.mjs} +10 -9
- package/dist/cli/tools-NTVUQ2TG.js +57 -0
- package/dist/cli/{tools-7IJHGF6W.mjs → tools-W3QT5EJY.mjs} +24 -24
- package/dist/cli/{update-GFOPZTHY.mjs → update-GZVBVMY3.mjs} +14 -11
- package/dist/cli/update-TWJZPUZM.js +37 -0
- package/dist/cli/{views-D4NX4SBG.mjs → views-BOGEH424.mjs} +47 -49
- package/dist/cli/{views-BPL2TQJ4.js → views-TOLJNLSV.js} +62 -64
- package/dist/cli/{workflow-ZYNAUCKC.js → workflow-ENWFRK5M.js} +23 -23
- package/dist/cli/{workflow-YXP42FUI.mjs → workflow-VDG2FDQV.mjs} +13 -13
- package/dist/{client-CyXGrO4D.d.mts → client-B8f7RNF8.d.mts} +1 -1
- package/dist/{client-Bf3IpUKN.d.ts → client-C5TgXmJQ.d.ts} +1 -1
- package/dist/{client-core-BxsLnXlm.d.mts → client-core-SLLGBTht.d.mts} +268 -23
- package/dist/{client-core-BWd0lX0Z.d.ts → client-core-p0sOxnkl.d.ts} +268 -23
- package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
- package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
- package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
- package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
- package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
- package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +66 -55
- package/dist/index.mjs +25 -14
- package/dist/install-integrity.json +163 -144
- 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 +23 -4
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +4 -4
- package/dist/plays/run-request.mjs +3 -3
- 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 +15 -13
- package/dist/server.mjs +9 -7
- package/package.json +1 -1
- package/dist/cli/auth-MMNVWATX.js +0 -43
- package/dist/cli/chunk-AID3OYVJ.js +0 -8
- package/dist/cli/chunk-OVDNJAJN.mjs +0 -8
- package/dist/cli/concurrent-runs-help-FQAIHKKC.js +0 -21
- package/dist/cli/describe-QDANCTS3.mjs +0 -50
- package/dist/cli/describe-VUTT5ZKU.js +0 -50
- package/dist/cli/git-ETB3GH3K.js +0 -25
- package/dist/cli/org-GRYVMNSW.js +0 -1282
- package/dist/cli/org-Z37NGJV4.mjs +0 -1282
- package/dist/cli/run-identity-G257GQED.js +0 -25
- package/dist/cli/search-VTW2YNBS.js +0 -32
- package/dist/cli/sessions-CJ4FJ2WB.js +0 -22
- package/dist/cli/skills-R7EBXREW.js +0 -36
- package/dist/cli/tools-V7U2BDXM.js +0 -57
- package/dist/cli/update-4COPZETK.js +0 -34
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
concurrentRunsLine
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Q7ACILL2.mjs";
|
|
4
|
+
import "./chunk-2ORPFQUA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
DeeplineClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6EXOAT6T.mjs";
|
|
8
8
|
import {
|
|
9
|
+
PUBLIC_PLAN_SKUS,
|
|
9
10
|
iterateCursorPages,
|
|
10
11
|
requireBillingIdempotencyKey
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VLO5NFH2.mjs";
|
|
12
13
|
import "./chunk-FZHMNK6F.mjs";
|
|
13
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-5TYLSS4Q.mjs";
|
|
14
15
|
import "./chunk-PSX3WHIH.mjs";
|
|
15
|
-
import "./chunk-UBKA33KY.mjs";
|
|
16
16
|
import {
|
|
17
17
|
PLAY_RUNTIME_PRICING_NOTE
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-33WRQSQ2.mjs";
|
|
19
19
|
import {
|
|
20
20
|
PRICING_PAGE_NOTE
|
|
21
21
|
} from "./chunk-2RIKOPIM.mjs";
|
|
22
|
-
import
|
|
22
|
+
import {
|
|
23
|
+
DEFAULT_PROVIDER_MARKUP_MULTIPLIER,
|
|
24
|
+
DEFAULT_USD_PER_CUSTOMER_CREDIT
|
|
25
|
+
} from "./chunk-LRZGS6RZ.mjs";
|
|
23
26
|
import {
|
|
24
27
|
PLAY_SANDBOX_SIZE_INPUTS
|
|
25
28
|
} from "./chunk-7I4B6V2S.mjs";
|
|
@@ -29,18 +32,19 @@ import {
|
|
|
29
32
|
openInBrowser,
|
|
30
33
|
printCommandEnvelope,
|
|
31
34
|
shouldEmitJson
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-UC4BDZKI.mjs";
|
|
36
|
+
import "./chunk-52Q5KETX.mjs";
|
|
37
|
+
import "./chunk-S6W6SJ6E.mjs";
|
|
35
38
|
import {
|
|
36
39
|
AuthError,
|
|
37
40
|
ConfigError
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-ASB47RXJ.mjs";
|
|
39
42
|
import "./chunk-DLIRSHV6.mjs";
|
|
40
43
|
import {
|
|
41
44
|
DeeplineError
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import "./chunk-
|
|
45
|
+
} from "./chunk-Z3A2S3QM.mjs";
|
|
46
|
+
import "./chunk-2MGZAI54.mjs";
|
|
47
|
+
import "./chunk-FXQ3JKE3.mjs";
|
|
44
48
|
import "./chunk-WZYKRD7T.mjs";
|
|
45
49
|
import "./chunk-KRD6H754.mjs";
|
|
46
50
|
|
|
@@ -50,10 +54,57 @@ import { randomUUID } from "crypto";
|
|
|
50
54
|
import { appendFile, mkdir, writeFile } from "fs/promises";
|
|
51
55
|
import { dirname, resolve } from "path";
|
|
52
56
|
import { stringify } from "csv-stringify/sync";
|
|
57
|
+
|
|
58
|
+
// ../billing/credit-pricing.ts
|
|
59
|
+
var DEFAULT_CUSTOMER_CREDITS_PER_USD = 1 / DEFAULT_USD_PER_CUSTOMER_CREDIT;
|
|
60
|
+
var CREDIT_PURCHASE_MIN_USD = 10;
|
|
61
|
+
var DEFAULT_CREDIT_PURCHASE_BANDS = [
|
|
62
|
+
{
|
|
63
|
+
minCredits: CREDIT_PURCHASE_MIN_USD * DEFAULT_CUSTOMER_CREDITS_PER_USD,
|
|
64
|
+
maxCredits: null,
|
|
65
|
+
priceUsdPerCredit: 0.1
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
var DEFAULT_CREDIT_PRICING = {
|
|
69
|
+
usdPerCredit: DEFAULT_USD_PER_CUSTOMER_CREDIT,
|
|
70
|
+
providerMarkupMultiplier: DEFAULT_PROVIDER_MARKUP_MULTIPLIER,
|
|
71
|
+
purchaseBands: DEFAULT_CREDIT_PURCHASE_BANDS.map((band) => ({
|
|
72
|
+
minCredits: band.minCredits,
|
|
73
|
+
maxCredits: band.maxCredits,
|
|
74
|
+
usdPerCredit: band.priceUsdPerCredit
|
|
75
|
+
}))
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// ../billing/precision.ts
|
|
79
|
+
var MICROCHARGE_CREDIT_DECIMAL_PLACES = 3;
|
|
80
|
+
var BILLING_CREDIT_DISPLAY_ZERO_THRESHOLD = 1 / (10 ** MICROCHARGE_CREDIT_DECIMAL_PLACES * 2);
|
|
81
|
+
|
|
82
|
+
// ../billing/balance-presentation.ts
|
|
83
|
+
var USD_DECIMAL_PLACES = 4;
|
|
84
|
+
var USD_PRECISION_FACTOR = 10 ** USD_DECIMAL_PLACES;
|
|
85
|
+
var FINALIZING_USAGE_DESCRIPTION = "usage incurred, final price pending";
|
|
86
|
+
function formatFinalizingCallCount(count, truncated) {
|
|
87
|
+
if (typeof count !== "number" || !Number.isFinite(count) || count < 0) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
const n = count.toLocaleString("en-US");
|
|
91
|
+
return `${n}${truncated ? "+" : ""} ${count === 1 && !truncated ? "call" : "calls"}`;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// src/cli/commands/billing.ts
|
|
53
95
|
var SUBSCRIPTION_STATUS_NEXT_COMMAND = "deepline billing subscription status";
|
|
54
96
|
var SUBSCRIPTION_CANCEL_PATH = "/api/v2/billing/subscription/cancel";
|
|
55
97
|
var BILLING_TOP_UP_PATH = "/api/v2/billing/top-up";
|
|
56
98
|
var DEFAULT_BALANCE_RECOVERY_CREDITS = 100;
|
|
99
|
+
var COMPATIBLE_PLAN_SKUS = [
|
|
100
|
+
"payg-v1",
|
|
101
|
+
"builder-v1",
|
|
102
|
+
"growth-v1",
|
|
103
|
+
"team-v1",
|
|
104
|
+
"team-v2",
|
|
105
|
+
"legacy-growth-v1",
|
|
106
|
+
"enterprise-v1"
|
|
107
|
+
];
|
|
57
108
|
function billingFailureFromError(error, options) {
|
|
58
109
|
if (error instanceof AuthError) {
|
|
59
110
|
return {
|
|
@@ -236,7 +287,7 @@ function recentUsageLines(entries) {
|
|
|
236
287
|
}
|
|
237
288
|
const lines = ["Recent activity:"];
|
|
238
289
|
for (const entry of entries) {
|
|
239
|
-
const op = `${humanize(entry.provider)} ${usageOperationLabel(entry.operation)}`.trim();
|
|
290
|
+
const op = entry.provider === "compute" && entry.operation === "database" ? "Compute - Database" : `${humanize(entry.provider)} ${usageOperationLabel(entry.operation)}`.trim();
|
|
240
291
|
const roughUsd = Number(entry.rough_usd_cost);
|
|
241
292
|
const credits = entry.credits !== null && entry.credits !== void 0 && String(entry.credits).trim().length > 0 && Number.isFinite(Number(entry.credits)) ? Number(entry.credits) : null;
|
|
242
293
|
const temporaryHold = entry.charge_state === "temporary_hold";
|
|
@@ -344,8 +395,14 @@ async function handleBalance(options) {
|
|
|
344
395
|
}
|
|
345
396
|
lines.push(`Spendable: ${spendable} credits.`);
|
|
346
397
|
if (typeof payload.pending_spend_credits === "number") {
|
|
398
|
+
const callCount = payload.finalizing_call_count;
|
|
399
|
+
const callLabel = payload.pending_spend_credits > 0 && typeof callCount === "number" && callCount > 0 ? formatFinalizingCallCount(
|
|
400
|
+
callCount,
|
|
401
|
+
payload.finalizing_call_count_truncated === true
|
|
402
|
+
) : null;
|
|
403
|
+
const calls = callLabel ? ` across ${callLabel}` : "";
|
|
347
404
|
lines.push(
|
|
348
|
-
`
|
|
405
|
+
`Finalizing: ${payload.pending_spend_credits} credits${calls} \u2014 ${FINALIZING_USAGE_DESCRIPTION}.`
|
|
349
406
|
);
|
|
350
407
|
}
|
|
351
408
|
} else if (payload.spendable_balance_status !== void 0 || payload.exposure_status === "partial" || options.verbose) {
|
|
@@ -394,13 +451,13 @@ async function handleBalance(options) {
|
|
|
394
451
|
}
|
|
395
452
|
if (status === "no_billing") {
|
|
396
453
|
lines.push(
|
|
397
|
-
"Billing: No billing account or payment method set up for this
|
|
454
|
+
"Billing: No billing account or payment method set up for this org."
|
|
398
455
|
);
|
|
399
456
|
} else if (status === "zero_balance") {
|
|
400
|
-
lines.push("Billing: This
|
|
457
|
+
lines.push("Billing: This org has no Deepline credits available.");
|
|
401
458
|
} else if (status === "payment_method_only") {
|
|
402
459
|
lines.push(
|
|
403
|
-
"Billing: A payment method is saved, but this
|
|
460
|
+
"Billing: A payment method is saved, but this org has no Deepline credits available."
|
|
404
461
|
);
|
|
405
462
|
}
|
|
406
463
|
if (recovery) {
|
|
@@ -548,7 +605,7 @@ async function handleUsage(options) {
|
|
|
548
605
|
{
|
|
549
606
|
exitCode: 4,
|
|
550
607
|
code: "USAGE_REQUEST_NOT_FOUND",
|
|
551
|
-
message: `No billing record for request_id ${options.requestId} in the active
|
|
608
|
+
message: `No billing record for request_id ${options.requestId} in the active org.`,
|
|
552
609
|
next: "deepline billing usage"
|
|
553
610
|
},
|
|
554
611
|
options
|
|
@@ -778,7 +835,7 @@ async function handleLedgerExportAll(options) {
|
|
|
778
835
|
title: "billing ledger",
|
|
779
836
|
lines: [
|
|
780
837
|
`Billing ledger written to ${outputPath}`,
|
|
781
|
-
`${summary.row_count} row(s) exported for the active
|
|
838
|
+
`${summary.row_count} row(s) exported for the active org${options.runId ? ` and run ${options.runId}` : ""}${options.operation ? ` and operation ${options.operation}` : ""}${sinceAt !== null ? ` since ${new Date(sinceAt).toISOString()}` : ""}.`,
|
|
782
839
|
`Net ledger delta: ${summary.net_delta_credits} Deepline Credits`
|
|
783
840
|
]
|
|
784
841
|
}
|
|
@@ -799,7 +856,7 @@ function targetPlanLine(plan) {
|
|
|
799
856
|
const firstMonth = plan.first_month_price_usd != null ? ` (first month $${plan.first_month_price_usd})` : "";
|
|
800
857
|
const bonus = plan.bonus_credits != null ? ` (+${plan.bonus_credits} bonus credits once paid)` : "";
|
|
801
858
|
const annual = plan.annual_price_usd != null ? ` (or $${plan.annual_price_usd}/year with --annual${plan.annual_offer_label ? `, ${plan.annual_offer_label}` : ""})` : "";
|
|
802
|
-
return `${plan.display_name ?? plan.name} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)}${firstMonth}${bonus}${annual} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
859
|
+
return `${plan.display_name ?? plan.name} (${plan.public_sku ?? plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)}${firstMonth}${bonus}${annual} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
803
860
|
}
|
|
804
861
|
async function handlePlans(options) {
|
|
805
862
|
const client = new DeeplineClient();
|
|
@@ -807,19 +864,25 @@ async function handlePlans(options) {
|
|
|
807
864
|
options.promoCode ? { promoCode: options.promoCode } : void 0
|
|
808
865
|
);
|
|
809
866
|
const promo = payload.promo_code;
|
|
867
|
+
const promoPlanSkus = (promo?.plan_skus ?? []).map(
|
|
868
|
+
(sku) => payload.plans.find((plan) => plan.sku === sku)?.public_sku ?? sku
|
|
869
|
+
);
|
|
810
870
|
const listedCurrentPlan = payload.plans.find(
|
|
811
871
|
(plan) => plan.sku === payload.current_plan_sku
|
|
812
872
|
);
|
|
813
873
|
const currentPlan = listedCurrentPlan ?? (await client.billing.targetStatus()).plan;
|
|
814
|
-
const
|
|
874
|
+
const pendingSku = payload.pending_plan_public_sku ?? payload.pending_plan_sku;
|
|
875
|
+
const pendingPlan = payload.pending_plan_display_name && pendingSku ? `${payload.pending_plan_display_name} (${pendingSku})` : pendingSku ?? "none";
|
|
876
|
+
const plans = payload.enterprise_plan ? [...payload.plans, payload.enterprise_plan] : payload.plans;
|
|
877
|
+
const changesEnabled = payload.acquisition_enabled || payload.enterprise_plan?.acquisition_enabled;
|
|
815
878
|
const lines = [
|
|
816
|
-
`Current plan: ${currentPlan.display_name ?? currentPlan.name} (${currentPlan.sku}) | ${planPriceText(currentPlan.recurring_price_usd, currentPlan.interval)} | ${currentPlan.included_credits ?? "(unknown)"} included credits/month`,
|
|
879
|
+
`Current plan: ${currentPlan.display_name ?? currentPlan.name} (${currentPlan.public_sku ?? currentPlan.sku}) | ${planPriceText(currentPlan.recurring_price_usd, currentPlan.interval)} | ${currentPlan.included_credits ?? "(unknown)"} included credits/month`,
|
|
817
880
|
`Pending plan: ${pendingPlan}`,
|
|
818
|
-
`Plan changes: ${
|
|
881
|
+
`Plan changes: ${changesEnabled ? "enabled" : "disabled"}`,
|
|
819
882
|
...promo ? [
|
|
820
|
-
promo.status === "applied" ? `Promo code ${promo.code}: applied to ${
|
|
883
|
+
promo.status === "applied" ? `Promo code ${promo.code}: applied to ${promoPlanSkus.join(", ")}${promo.expires_at ? ` (until ${promo.expires_at})` : ""}` : `Promo code ${promo.code}: ${promo.status.replaceAll("_", " ")}`
|
|
821
884
|
] : [],
|
|
822
|
-
...
|
|
885
|
+
...plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...plans.map(targetPlanLine)],
|
|
823
886
|
promo?.status === "applied" ? `Change plan: deepline billing change-plan <plan_sku> --promo-code ${promo.code}` : "Change plan: deepline billing change-plan <plan_sku>"
|
|
824
887
|
];
|
|
825
888
|
const legacyPayload = shouldEmitJson(options.json) ? await client.billing.plans() : null;
|
|
@@ -897,7 +960,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
897
960
|
{
|
|
898
961
|
exitCode: 4,
|
|
899
962
|
code: "NO_ACTIVE_SUBSCRIPTION",
|
|
900
|
-
message: "This
|
|
963
|
+
message: "This org has no active subscription to cancel.",
|
|
901
964
|
next: SUBSCRIPTION_STATUS_NEXT_COMMAND
|
|
902
965
|
},
|
|
903
966
|
options
|
|
@@ -1244,7 +1307,7 @@ async function handleTargetStatus(options) {
|
|
|
1244
1307
|
{
|
|
1245
1308
|
title: "billing status",
|
|
1246
1309
|
lines: [
|
|
1247
|
-
`Plan: ${payload.plan.display_name ?? payload.plan.name} (${payload.plan.sku})`,
|
|
1310
|
+
`Plan: ${payload.plan.display_name ?? payload.plan.name} (${payload.plan.public_sku ?? payload.plan.sku})`,
|
|
1248
1311
|
`State: ${payload.state}`,
|
|
1249
1312
|
`Payment: ${payload.payment_state}`,
|
|
1250
1313
|
`Automatic recharge: ${payload.recharge_state}`,
|
|
@@ -1283,6 +1346,9 @@ async function handleIncludedCompute(options) {
|
|
|
1283
1346
|
{
|
|
1284
1347
|
title: payload.status === "unavailable" ? "billing compute" : "billing compute (standard-equivalent minutes)",
|
|
1285
1348
|
lines: payload.status === "on" ? [
|
|
1349
|
+
...payload.database?.enabled ? [
|
|
1350
|
+
`Database compute: ${payload.database.credits_per_cu_hour} credits/CU-hour; shares the allowance by dollar value.`
|
|
1351
|
+
] : [],
|
|
1286
1352
|
`Allowance used: ${formatComputeAmount(includedMinutes, includedCredits)} of ${formatComputeAmount(payload.included_minutes, payload.included_minutes * rate)}`,
|
|
1287
1353
|
...overage === void 0 || rate <= 0 ? ["Overage: unavailable"] : overage > 0 ? [
|
|
1288
1354
|
`Overage: ${formatComputeAmount(overage / rate, overage)} charged`
|
|
@@ -1292,15 +1358,16 @@ async function handleIncludedCompute(options) {
|
|
|
1292
1358
|
PLAY_RUNTIME_PRICING_NOTE,
|
|
1293
1359
|
PRICING_PAGE_NOTE
|
|
1294
1360
|
] : payload.status === "off" ? [
|
|
1361
|
+
...payload.database?.enabled ? [
|
|
1362
|
+
`Database compute: ${payload.database.credits_per_cu_hour} credits/CU-hour; no included allowance until enabled.`
|
|
1363
|
+
] : [],
|
|
1295
1364
|
"Included compute: off; Play compute is billed at provider cost.",
|
|
1296
1365
|
`Allowance if enabled: ${formatComputeAmount(payload.plan.included_minutes, payload.plan.included_minutes * payload.plan.credits_per_minute)} per month`,
|
|
1297
1366
|
`Standard sandbox price if enabled: ${formatComputeAmount(60, Math.round(payload.plan.credits_per_minute * 60))}`,
|
|
1298
1367
|
PLAY_RUNTIME_PRICING_NOTE,
|
|
1299
1368
|
"Run deepline billing compute --enable to turn on included compute. It cannot be turned off again.",
|
|
1300
1369
|
PRICING_PAGE_NOTE
|
|
1301
|
-
] : [
|
|
1302
|
-
"Included compute is not available for this workspace yet."
|
|
1303
|
-
]
|
|
1370
|
+
] : ["Included compute is not available for this org yet."]
|
|
1304
1371
|
}
|
|
1305
1372
|
]
|
|
1306
1373
|
}
|
|
@@ -1616,7 +1683,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1616
1683
|
}
|
|
1617
1684
|
const failure = !options.orgId?.trim() || options.orgId !== options.orgId.trim() ? {
|
|
1618
1685
|
code: "INVALID_ORG_ID",
|
|
1619
|
-
message: "--org-id must be the original
|
|
1686
|
+
message: "--org-id must be the original org ID without surrounding whitespace."
|
|
1620
1687
|
} : !options.idempotencyKey || options.idempotencyKey.length > 200 || options.idempotencyKey !== options.idempotencyKey.trim() ? {
|
|
1621
1688
|
code: "INVALID_BILLING_IDEMPOTENCY_KEY",
|
|
1622
1689
|
message: "--idempotency-key must be the original key (1\u2013200 characters without surrounding whitespace)."
|
|
@@ -1656,14 +1723,28 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1656
1723
|
);
|
|
1657
1724
|
}
|
|
1658
1725
|
async function handleTargetPlan(planSku, options) {
|
|
1659
|
-
if (
|
|
1726
|
+
if (options.invoice && !options.billingEmail) {
|
|
1727
|
+
reportBillingFailure(
|
|
1728
|
+
{
|
|
1729
|
+
exitCode: 2,
|
|
1730
|
+
code: "INVALID_REQUEST",
|
|
1731
|
+
message: "--invoice needs --billing-email <email>."
|
|
1732
|
+
},
|
|
1733
|
+
options
|
|
1734
|
+
);
|
|
1735
|
+
return;
|
|
1736
|
+
}
|
|
1737
|
+
const targetPlanSku = [...PUBLIC_PLAN_SKUS, ...COMPATIBLE_PLAN_SKUS].find(
|
|
1738
|
+
(sku) => sku === planSku
|
|
1739
|
+
) ?? // Retained Canary requests may replay their original operation. The API
|
|
1660
1740
|
// rejects new acquisition even when a caller supplies an idempotency key.
|
|
1661
|
-
|
|
1741
|
+
(planSku === "growth-canary-v1" && options.idempotencyKey ? planSku : void 0);
|
|
1742
|
+
if (!targetPlanSku) {
|
|
1662
1743
|
reportBillingFailure(
|
|
1663
1744
|
{
|
|
1664
1745
|
exitCode: 2,
|
|
1665
1746
|
code: "INVALID_PLAN",
|
|
1666
|
-
message:
|
|
1747
|
+
message: `Plan must be one of ${PUBLIC_PLAN_SKUS.join(", ")}. Run deepline billing plans to see workspace availability.`
|
|
1667
1748
|
},
|
|
1668
1749
|
options
|
|
1669
1750
|
);
|
|
@@ -1672,10 +1753,11 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1672
1753
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1673
1754
|
const payload = await new DeeplineClient().billing.transitionPlan({
|
|
1674
1755
|
action: "start_or_change",
|
|
1675
|
-
targetPlanSku
|
|
1756
|
+
targetPlanSku,
|
|
1676
1757
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1677
1758
|
...options.promoCode ? { promoCode: options.promoCode } : {},
|
|
1678
1759
|
...options.annual ? { billingInterval: "year" } : {},
|
|
1760
|
+
...options.invoice ? { paymentMethod: "invoice" } : {},
|
|
1679
1761
|
idempotencyKey
|
|
1680
1762
|
});
|
|
1681
1763
|
printCommandEnvelope(
|
|
@@ -1683,6 +1765,46 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1683
1765
|
{ json: options.json }
|
|
1684
1766
|
);
|
|
1685
1767
|
}
|
|
1768
|
+
async function handleBillingDetailsShow(options) {
|
|
1769
|
+
const payload = await new DeeplineClient().billing.getDetails();
|
|
1770
|
+
printCommandEnvelope({ ok: true, ...payload }, { json: options.json });
|
|
1771
|
+
}
|
|
1772
|
+
async function handleBillingDetailsSet(options) {
|
|
1773
|
+
const separator = options.taxId?.indexOf(":") ?? -1;
|
|
1774
|
+
if (options.taxId !== void 0 && separator <= 0 || options.line1 === void 0 !== (options.country === void 0) || options.line1 === void 0 && [options.line2, options.city, options.state, options.postalCode].some(
|
|
1775
|
+
(value) => value !== void 0
|
|
1776
|
+
) || options.name === void 0 && options.line1 === void 0 && options.taxId === void 0) {
|
|
1777
|
+
reportBillingFailure(
|
|
1778
|
+
{
|
|
1779
|
+
exitCode: 2,
|
|
1780
|
+
code: "INVALID_REQUEST",
|
|
1781
|
+
message: "Pass --name, an address (--line1 with --country), and/or --tax-id type:value."
|
|
1782
|
+
},
|
|
1783
|
+
options
|
|
1784
|
+
);
|
|
1785
|
+
return;
|
|
1786
|
+
}
|
|
1787
|
+
const payload = await new DeeplineClient().billing.setDetails({
|
|
1788
|
+
...options.name !== void 0 ? { name: options.name } : {},
|
|
1789
|
+
...options.line1 !== void 0 ? {
|
|
1790
|
+
address: {
|
|
1791
|
+
line1: options.line1,
|
|
1792
|
+
line2: options.line2 ?? null,
|
|
1793
|
+
city: options.city ?? null,
|
|
1794
|
+
state: options.state ?? null,
|
|
1795
|
+
postal_code: options.postalCode ?? null,
|
|
1796
|
+
country: options.country
|
|
1797
|
+
}
|
|
1798
|
+
} : {},
|
|
1799
|
+
...options.taxId !== void 0 ? {
|
|
1800
|
+
tax_id: {
|
|
1801
|
+
type: options.taxId.slice(0, separator),
|
|
1802
|
+
value: options.taxId.slice(separator + 1)
|
|
1803
|
+
}
|
|
1804
|
+
} : {}
|
|
1805
|
+
});
|
|
1806
|
+
printCommandEnvelope({ ok: true, ...payload }, { json: options.json });
|
|
1807
|
+
}
|
|
1686
1808
|
async function handleTargetPlanCancellation(options) {
|
|
1687
1809
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1688
1810
|
const payload = await new DeeplineClient().billing.transitionPlan({
|
|
@@ -1727,7 +1849,7 @@ function registerBillingCommands(program) {
|
|
|
1727
1849
|
`
|
|
1728
1850
|
Concepts:
|
|
1729
1851
|
Billing commands show Deepline credits, not raw provider spend.
|
|
1730
|
-
Balance is shared by the
|
|
1852
|
+
Balance is shared by the org; concurrent work changes it. Use a job_id
|
|
1731
1853
|
charge lookup to attribute one tool command instead of comparing balances.
|
|
1732
1854
|
checkout/subscribe/redeem-code can open a browser unless --no-open is set.
|
|
1733
1855
|
|
|
@@ -1791,12 +1913,12 @@ ${quote.explanation}
|
|
|
1791
1913
|
"after",
|
|
1792
1914
|
`
|
|
1793
1915
|
Notes:
|
|
1794
|
-
Read-only. Shows the current Deepline credit balance for the active
|
|
1795
|
-
The balance includes concurrent
|
|
1916
|
+
Read-only. Shows the current Deepline credit balance for the active org.
|
|
1917
|
+
The balance includes concurrent org activity, so a before/after difference
|
|
1796
1918
|
cannot isolate one command. Use billing usage --request-id <job_id>.
|
|
1797
1919
|
|
|
1798
1920
|
Prints one line, "Balance: N credits", plus what to do when
|
|
1799
|
-
the
|
|
1921
|
+
the org has no credits. --verbose adds reservations and usage awaiting
|
|
1800
1922
|
settlement. --json returns the full record.
|
|
1801
1923
|
|
|
1802
1924
|
Examples:
|
|
@@ -1806,8 +1928,8 @@ Examples:
|
|
|
1806
1928
|
`
|
|
1807
1929
|
).option("--json", "Emit the full balance record as JSON").option("--verbose", "Add reservations and usage awaiting settlement").action(handleBalance);
|
|
1808
1930
|
billing.command("reuse").description(
|
|
1809
|
-
"Show recorded reused tool results for this
|
|
1810
|
-
).option("--json", "Return the
|
|
1931
|
+
"Show recorded reused tool results for this org; no credit estimate."
|
|
1932
|
+
).option("--json", "Return the org reuse summary as JSON").action(async (options) => {
|
|
1811
1933
|
const { http } = getAuthedHttpClient();
|
|
1812
1934
|
const payload = await http.get("/api/v2/usage/reuse");
|
|
1813
1935
|
printCommandEnvelope(
|
|
@@ -1837,7 +1959,7 @@ Notes:
|
|
|
1837
1959
|
page. Use --limit/--cursor to paginate the recent-call section.
|
|
1838
1960
|
For one tool call, use the billing command in the receipt deepline run printed, or its next.billing
|
|
1839
1961
|
command. Pending charges and temporary holds are not final spend; unknown means
|
|
1840
|
-
final charge evidence is unavailable.
|
|
1962
|
+
final charge evidence is unavailable. Org balance changes include other work.
|
|
1841
1963
|
|
|
1842
1964
|
Examples:
|
|
1843
1965
|
deepline billing usage
|
|
@@ -1868,7 +1990,7 @@ Examples:
|
|
|
1868
1990
|
"after",
|
|
1869
1991
|
`
|
|
1870
1992
|
Notes:
|
|
1871
|
-
Read-only. Shows whether monthly
|
|
1993
|
+
Read-only. Shows whether monthly org usage cap is enabled.
|
|
1872
1994
|
New calls are checked against this usage cap, separately from wallet funding.
|
|
1873
1995
|
|
|
1874
1996
|
Examples:
|
|
@@ -1880,7 +2002,7 @@ Examples:
|
|
|
1880
2002
|
"after",
|
|
1881
2003
|
`
|
|
1882
2004
|
Notes:
|
|
1883
|
-
Mutates
|
|
2005
|
+
Mutates org billing settings. The argument is a Deepline credit amount,
|
|
1884
2006
|
not dollars and not provider credits. New calls are checked against the cap;
|
|
1885
2007
|
in-flight work can still finish and exceed it. Buying credits does not reset it.
|
|
1886
2008
|
|
|
@@ -1893,7 +2015,7 @@ Examples:
|
|
|
1893
2015
|
"after",
|
|
1894
2016
|
`
|
|
1895
2017
|
Notes:
|
|
1896
|
-
Mutates
|
|
2018
|
+
Mutates org billing settings by removing monthly Deepline usage cap.
|
|
1897
2019
|
|
|
1898
2020
|
Examples:
|
|
1899
2021
|
deepline billing off
|
|
@@ -1904,7 +2026,7 @@ Examples:
|
|
|
1904
2026
|
"after",
|
|
1905
2027
|
`
|
|
1906
2028
|
Notes:
|
|
1907
|
-
Read-only. Exports every ledger row for the active
|
|
2029
|
+
Read-only. Exports every ledger row for the active org, including rows
|
|
1908
2030
|
created without an API key.
|
|
1909
2031
|
|
|
1910
2032
|
Examples:
|
|
@@ -1926,7 +2048,7 @@ Examples:
|
|
|
1926
2048
|
"after",
|
|
1927
2049
|
`
|
|
1928
2050
|
Notes:
|
|
1929
|
-
Pages through the
|
|
2051
|
+
Pages through the org ledger, writes CSV locally,
|
|
1930
2052
|
then reports the row count and the net delta computed from delta_credits.
|
|
1931
2053
|
|
|
1932
2054
|
Examples:
|
|
@@ -1972,7 +2094,7 @@ Examples:
|
|
|
1972
2094
|
"after",
|
|
1973
2095
|
`
|
|
1974
2096
|
Notes:
|
|
1975
|
-
Mutates
|
|
2097
|
+
Mutates org billing by charging the saved payment method for the active
|
|
1976
2098
|
workspace, then adding purchased Deepline credits. If no saved payment method
|
|
1977
2099
|
is available, use the checkout command printed in the error response.
|
|
1978
2100
|
--dry-run prints the planned request and idempotency key without charging.
|
|
@@ -1995,25 +2117,25 @@ Examples:
|
|
|
1995
2117
|
"Inspect or retire an original top-up intent without starting a payment."
|
|
1996
2118
|
).argument("<credits>", "Original positive integer Deepline credit amount").requiredOption(
|
|
1997
2119
|
"--org-id <original-org>",
|
|
1998
|
-
"Original
|
|
2120
|
+
"Original org ID (must match the authenticated org)"
|
|
1999
2121
|
).requiredOption(
|
|
2000
2122
|
"--idempotency-key <original-key>",
|
|
2001
2123
|
"Original purchase key; never generates a new key"
|
|
2002
2124
|
).option("--dry-run", "Print the recovery request without changing state").option("--json", "Emit JSON output").addHelpText(
|
|
2003
2125
|
"after",
|
|
2004
|
-
"\nAn absent intent is durably retired; an existing operation is returned unchanged.\nThis command never starts a payment. Use the original amount,
|
|
2126
|
+
"\nAn absent intent is durably retired; an existing operation is returned unchanged.\nThis command never starts a payment. Use the original amount, org, and key.\nExample:\n deepline billing top-up-recover 1000 --org-id org_original --idempotency-key original-purchase-key\n"
|
|
2005
2127
|
).action(handleTopUpRecover);
|
|
2006
2128
|
billing.command("status").description(
|
|
2007
2129
|
"Show plan, payment, and recharge state; use usage for charges."
|
|
2008
2130
|
).option("--json", "Emit JSON output").action(handleTargetStatus);
|
|
2009
2131
|
billing.command("entitlements").description(
|
|
2010
|
-
"Show
|
|
2132
|
+
"Show org benefits, remaining people search profiles, and effective rate limits."
|
|
2011
2133
|
).option("--json", "Emit JSON output").action(handleEntitlements);
|
|
2012
2134
|
billing.command("compute").description(
|
|
2013
2135
|
"Show Play runtime pricing, included compute, and minutes used."
|
|
2014
2136
|
).option(
|
|
2015
2137
|
"--enable",
|
|
2016
|
-
"Turn on included compute for this
|
|
2138
|
+
"Turn on included compute for this org (cannot be undone)"
|
|
2017
2139
|
).option("--json", "Emit JSON output").action(handleIncludedCompute);
|
|
2018
2140
|
billing.command("auto-recharge").description("Inspect and manage automatic Deepline credit recharge.").addHelpText(
|
|
2019
2141
|
"after",
|
|
@@ -2086,17 +2208,29 @@ Examples:
|
|
|
2086
2208
|
);
|
|
2087
2209
|
billing.command("change-plan").description("Start or change the target billing plan.").argument(
|
|
2088
2210
|
"<plan_sku>",
|
|
2089
|
-
"
|
|
2211
|
+
`${PUBLIC_PLAN_SKUS.join(", ")}. Run deepline billing plans to see workspace availability.`
|
|
2090
2212
|
).option(
|
|
2091
2213
|
"--billing-email <email>",
|
|
2092
|
-
"Invoice recipient when the account has no billing email"
|
|
2214
|
+
"Invoice recipient: required with --invoice, otherwise used when the account has no billing email"
|
|
2093
2215
|
).option(
|
|
2094
2216
|
"--promo-code <code>",
|
|
2095
2217
|
"Plan promo code; an unknown, expired, or used code refuses the change"
|
|
2096
2218
|
).option(
|
|
2097
2219
|
"--annual",
|
|
2098
2220
|
"Pay for a year up front where `billing plans` shows an annual price; credits stay monthly and a cancellation takes effect at the end of the paid year"
|
|
2221
|
+
).option(
|
|
2222
|
+
"--invoice",
|
|
2223
|
+
"Email an invoice to --billing-email instead of charging a card (monthly or with --annual, starting from Solo); the plan starts once it is paid (due in 27 days). Set company name, address and tax ID first with `billing details set`"
|
|
2099
2224
|
).option("--idempotency-key <key>", "Stable retry key").option("--json", "Emit JSON output").action(handleTargetPlan);
|
|
2225
|
+
const details = billing.command("details").description(
|
|
2226
|
+
"Show the company name, billing address and tax ID printed on invoices."
|
|
2227
|
+
).option("--json", "Emit JSON output").action(handleBillingDetailsShow);
|
|
2228
|
+
details.command("set").description(
|
|
2229
|
+
"Set invoice billing details. Omitted fields are unchanged; set them before an invoice is sent, since a sent invoice keeps the details it was issued with."
|
|
2230
|
+
).option("--name <name>", "Company or legal name on the invoice").option("--line1 <line1>", "Address line 1 (needs --country)").option("--line2 <line2>", "Address line 2").option("--city <city>", "City").option("--state <state>", "State, province or region").option("--postal-code <code>", "Postal code").option("--country <code>", "Two-letter country code, such as US or DE").option(
|
|
2231
|
+
"--tax-id <type:value>",
|
|
2232
|
+
"Tax ID as type:value, such as eu_vat:DE123456789 or us_ein:12-3456789; replaces the current one"
|
|
2233
|
+
).option("--json", "Emit JSON output").action(handleBillingDetailsSet);
|
|
2100
2234
|
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);
|
|
2101
2235
|
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);
|
|
2102
2236
|
billing.command("plans").description("Show published plans and the plan you are on.").addHelpText(
|
|
@@ -2108,9 +2242,11 @@ Notes:
|
|
|
2108
2242
|
and current acquisition availability. All amounts are Deepline credits and
|
|
2109
2243
|
Deepline-facing USD, never raw provider spend. Change to an available plan
|
|
2110
2244
|
with: deepline billing change-plan <plan_sku>. A first-month price or bonus
|
|
2111
|
-
credits appear on a plan when the
|
|
2112
|
-
price appears when the
|
|
2113
|
-
change-plan <plan_sku> --annual.
|
|
2245
|
+
credits appear on a plan when the org is offered them. An annual
|
|
2246
|
+
price appears when the org may pay for a year up front; buy it with
|
|
2247
|
+
change-plan <plan_sku> --annual. Where offered, any plan can be invoiced
|
|
2248
|
+
instead of charged: add --invoice --billing-email <email> (billing details set adds the company
|
|
2249
|
+
name, address and tax ID). With
|
|
2114
2250
|
--promo-code, prices are quoted with that code and its outcome is shown;
|
|
2115
2251
|
pass the same code to change-plan.
|
|
2116
2252
|
|
|
@@ -2135,7 +2271,7 @@ Examples:
|
|
|
2135
2271
|
deepline billing subscribe runtime-395-2026-07-v1 --no-open
|
|
2136
2272
|
`
|
|
2137
2273
|
).argument("<plan_version_id>", "Legacy billing plan version id").option("--no-open", "Print the checkout URL without opening a browser").option("--json", "Emit JSON output").action(handleSubscribe);
|
|
2138
|
-
billing.command("subscription").description("Inspect and manage subscription state for the
|
|
2274
|
+
billing.command("subscription").description("Inspect and manage subscription state for the org.").addHelpText(
|
|
2139
2275
|
"after",
|
|
2140
2276
|
`
|
|
2141
2277
|
Examples:
|
|
@@ -2206,7 +2342,7 @@ Examples:
|
|
|
2206
2342
|
"after",
|
|
2207
2343
|
`
|
|
2208
2344
|
Notes:
|
|
2209
|
-
Redeems
|
|
2345
|
+
Redeems an org billing code and may open a browser for completion unless
|
|
2210
2346
|
--no-open is set.
|
|
2211
2347
|
|
|
2212
2348
|
Examples:
|