deepline 0.3.552 → 0.3.553
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-I3QAU4RV.mjs} +8 -7
- package/dist/cli/auth-MQCN7WGZ.js +44 -0
- package/dist/cli/{billing-54RHFEBI.mjs → billing-3IC54OQQ.mjs} +197 -61
- package/dist/cli/{billing-FQREA7UA.js → billing-YGFFVAIC.js} +297 -161
- package/dist/cli/{chunk-4MK42735.js → chunk-2B5B5KAW.js} +210 -128
- package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
- package/dist/cli/{chunk-4NQF6KJ3.js → chunk-3NTP2OSG.js} +13 -13
- package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-45OAVGU6.mjs} +5 -5
- package/dist/cli/{chunk-WLN3SUIA.js → chunk-4747TPLV.js} +3 -3
- package/dist/cli/{chunk-AZQ264ID.mjs → chunk-4BFTDNHU.mjs} +1 -1
- package/dist/cli/{chunk-BGBJV26E.mjs → chunk-4HYNMXXF.mjs} +4 -4
- package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-4SMCFQ23.mjs} +1 -1
- package/dist/cli/{chunk-QPKH23EC.mjs → chunk-55F6HNOY.mjs} +5 -5
- package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
- package/dist/cli/{chunk-634ZDA3F.js → chunk-6NE3RRRY.js} +1 -1
- package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
- package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-72V4PDH5.mjs} +18 -18
- package/dist/cli/{chunk-IHRKLXZN.js → chunk-74RES4DS.js} +5 -5
- package/dist/cli/{chunk-45PVGZST.js → chunk-7GEMELKI.js} +366 -320
- package/dist/cli/{chunk-4UUR4TCH.js → chunk-7O6J6A7P.js} +1871 -92
- package/dist/cli/{chunk-XVB7V4N7.js → chunk-7SERLBNR.js} +161 -53
- package/dist/cli/{chunk-F2LH7TGF.js → chunk-7YRJ5UC4.js} +21 -21
- package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-A7DLBE5K.mjs} +136 -54
- package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-AGICYWGN.mjs} +299 -69
- package/dist/cli/{chunk-S5S355UY.mjs → chunk-AGIQDA2T.mjs} +12 -12
- package/dist/cli/{chunk-RBEUVDZF.js → chunk-AGLR6QVN.js} +249 -107
- package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
- package/dist/cli/{chunk-RQZQVFCJ.js → chunk-BVDKFS2T.js} +2 -2
- package/dist/cli/{chunk-PFO3ISXA.js → chunk-CACFJODG.js} +174 -129
- package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-CAEBJOYU.mjs} +1 -1
- package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
- package/dist/cli/{chunk-6YCA5NKJ.js → chunk-DP2VH7CO.js} +12 -12
- package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-DP64MD6U.mjs} +1 -1
- package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-DZA7RFGL.mjs} +5 -5
- package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
- package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-E7WZOX2A.mjs} +22 -18
- package/dist/cli/{chunk-IDVVIXPJ.js → chunk-FM7LPUPA.js} +41 -41
- package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-GAVZ4EOD.mjs} +1 -1
- package/dist/cli/{chunk-GKYAYLRI.js → chunk-HEBO3XNZ.js} +27 -31
- package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-HSJ6X2AQ.mjs} +4 -4
- package/dist/cli/{chunk-UPMRIVZB.js → chunk-HVI55MTK.js} +61 -10
- package/dist/cli/{chunk-KWSH5T7K.js → chunk-IH6GDNKW.js} +21 -21
- package/dist/cli/{chunk-HO3XK3R7.js → chunk-IMX7J4DU.js} +8 -8
- package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-INEMTYMT.mjs} +8 -8
- package/dist/cli/{chunk-3FD5EQ62.js → chunk-IUOGII7D.js} +6 -7
- package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-JJGWHITQ.mjs} +5 -5
- package/dist/cli/{chunk-SHLFOPD6.js → chunk-JLGP5XAJ.js} +5 -5
- package/dist/cli/{chunk-4TALT2M3.mjs → chunk-LFOERUQY.mjs} +69 -3
- package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
- package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-LH5PZKER.mjs} +63 -18
- package/dist/cli/{chunk-S46HWQKO.js → chunk-LRDHPOZW.js} +69 -69
- package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
- package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
- package/dist/cli/{chunk-7IKQKKNX.js → chunk-MLABYI4M.js} +90 -24
- package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-NDNHYONK.mjs} +17 -21
- package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-OTV2UUKW.mjs} +158 -16
- package/dist/cli/{chunk-G4O75EXF.js → chunk-Q6Z6N3A7.js} +18 -18
- package/dist/cli/{chunk-WE5HES3H.mjs → chunk-QG6JIWUL.mjs} +151 -43
- package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-QI5S5HWB.mjs} +2 -2
- package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
- package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RMNOZKRI.mjs} +3 -3
- package/dist/cli/{chunk-BAIST2BR.js → chunk-RTV4RF7N.js} +36 -36
- package/dist/cli/{chunk-JWUAX6OP.js → chunk-SBH4CKPN.js} +11 -11
- package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-SG3LUONJ.mjs} +3 -3
- package/dist/cli/{chunk-2WFPHBR4.js → chunk-TFEXSHPM.js} +22 -18
- package/dist/cli/{chunk-QAORXEY3.mjs → chunk-TN4TY6TT.mjs} +6 -7
- package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-UEVKMZLR.mjs} +54 -3
- package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UVQJYV76.mjs} +2 -2
- package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
- package/dist/cli/{chunk-MF2GHZDO.js → chunk-WOCHZCUJ.js} +2 -2
- package/dist/cli/{chunk-VQALXEXO.js → chunk-XLIHTJVM.js} +348 -118
- package/dist/cli/{chunk-ADRC5I3R.js → chunk-Y6SP3JMI.js} +22 -22
- package/dist/cli/{chunk-77AAAGVB.js → chunk-YUA6HA6D.js} +2 -2
- package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
- package/dist/cli/{chunk-6O5HOODW.mjs → chunk-Z6XPSHKM.mjs} +87 -41
- package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-Z7AOIHFE.mjs} +1870 -91
- package/dist/cli/command-docs.js +3 -3
- package/dist/cli/command-docs.mjs +2 -2
- package/dist/cli/concurrent-runs-help-CFJH4KXV.js +22 -0
- package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-DNV2X5AZ.mjs} +9 -8
- package/dist/cli/{csv-F5VAGX4K.js → csv-SA6ELJY6.js} +16 -15
- package/dist/cli/{csv-2PTVDNO6.mjs → csv-ZXZGHWOM.mjs} +7 -6
- package/dist/cli/{db-IEDXAUF7.mjs → db-A54SP6AD.mjs} +16 -16
- package/dist/cli/{db-Z3OIUFMM.js → db-JHFEIQBU.js} +43 -43
- package/dist/cli/describe-PHQ33AGS.mjs +50 -0
- package/dist/cli/describe-RHJ4XRFI.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 +6 -6
- package/dist/cli/describe-core.mjs +5 -5
- package/dist/cli/{executions-R3LP74QN.mjs → executions-HL2M2DFU.mjs} +10 -10
- package/dist/cli/{executions-H6H5655J.js → executions-TLFZRHBJ.js} +12 -12
- package/dist/cli/{feedback-VFOUR66B.js → feedback-5UEX5UZK.js} +17 -16
- package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-QMBTNXVG.mjs} +9 -8
- package/dist/cli/git-4JWOOHBG.js +26 -0
- package/dist/cli/{git-YX2J4GCI.mjs → git-LKGXVIVC.mjs} +8 -7
- package/dist/cli/index.js +170 -158
- package/dist/cli/index.mjs +60 -48
- package/dist/cli/{integrations-E2JZYKHS.js → integrations-6RUTLMN7.js} +23 -27
- package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-FGGRVUJ7.mjs} +15 -19
- package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-J3Z7QRWZ.js} +12 -11
- package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-YIPRMVXZ.mjs} +9 -8
- package/dist/cli/{mcp-UQV2K4EW.js → mcp-6LWFP7RW.js} +121 -48
- package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-CHDYFO7F.mjs} +100 -27
- package/dist/cli/{monitors-R3BBDCRC.js → monitors-STM6A7OU.js} +221 -186
- package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-UGRY2BXI.mjs} +58 -23
- package/dist/cli/org-3SYOUQCX.mjs +2289 -0
- package/dist/cli/org-ZOBSNSIB.js +2289 -0
- package/dist/cli/outcomes-H4YYAT5X.js +2865 -0
- package/dist/cli/outcomes-Z3P2JE67.mjs +2865 -0
- package/dist/cli/{play-2MVO27VO.js → play-SM4CW2GS.js} +1116 -846
- package/dist/cli/{play-MDWPR4XG.mjs → play-SN5YWLS7.mjs} +375 -105
- package/dist/cli/{providers-AKDYFZJZ.mjs → providers-WZ4YBR5Y.mjs} +10 -10
- package/dist/cli/{providers-2AACRUZH.js → providers-WZARYMCF.js} +13 -13
- package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-2575BNKA.mjs} +7 -6
- package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-PS4YHQJ6.js} +9 -8
- package/dist/cli/{run-2634REDK.js → run-FLZ6OTM7.js} +51 -51
- package/dist/cli/{run-RTSQNGRD.mjs → run-ZUHCZOJS.mjs} +31 -31
- 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-6AOJ4XPP.mjs → search-HLPPKQEO.mjs} +11 -11
- package/dist/cli/search-JJWVHR3N.js +32 -0
- package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PDAXNOGP.mjs} +9 -8
- package/dist/cli/{search-output-S5ODBL5E.js → search-output-RXJLU36B.js} +12 -11
- package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-CGELYQ3H.mjs} +11 -11
- package/dist/cli/{secrets-LHCIIHMT.js → secrets-QJNG7G2Y.js} +20 -20
- package/dist/cli/sessions-DHTBT2GN.js +23 -0
- package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-ELMWVR4M.mjs} +9 -8
- package/dist/cli/{settings-CP4FVK2W.js → settings-44I44P5F.js} +89 -89
- package/dist/cli/{settings-EBONWL5C.mjs → settings-RR3LZXL7.mjs} +16 -16
- package/dist/cli/{setup-I5AZE3IU.mjs → setup-KGWRWH4B.mjs} +20 -19
- package/dist/cli/{setup-LFGHTNLQ.js → setup-KTEYOCJO.js} +60 -59
- package/dist/cli/skills-EPZPEXI2.js +37 -0
- package/dist/cli/{skills-W76AO5XE.mjs → skills-FPRID2I5.mjs} +10 -9
- package/dist/cli/tools-IGQQ5TML.js +57 -0
- package/dist/cli/{tools-7IJHGF6W.mjs → tools-PI4WMDLY.mjs} +23 -23
- package/dist/cli/update-4RNCVYGE.js +37 -0
- package/dist/cli/{update-GFOPZTHY.mjs → update-VJOJAZ7B.mjs} +14 -11
- package/dist/cli/{views-BPL2TQJ4.js → views-NTUOLNQU.js} +62 -64
- package/dist/cli/{views-D4NX4SBG.mjs → views-OVPSINZO.mjs} +47 -49
- package/dist/cli/{workflow-ZYNAUCKC.js → workflow-2UDYDM6F.js} +23 -23
- package/dist/cli/{workflow-YXP42FUI.mjs → workflow-7OEFNXZC.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 +161 -142
- 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/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
|
@@ -25,7 +25,7 @@ var _chunk4WAM6TLDjs = require('./chunk-4WAM6TLD.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkMJTVX4QKjs = require('./chunk-MJTVX4QK.js');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
@@ -37,16 +37,32 @@ var _chunkPMH4GLMDjs = require('./chunk-PMH4GLMD.js');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkAGLR6QVNjs = require('./chunk-AGLR6QVN.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunk6VLFQZK6js = require('./chunk-6VLFQZK6.js');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
|
|
50
|
+
|
|
51
|
+
// ../integration-contracts/billing-plan-skus.ts
|
|
52
|
+
var PLAN_OFFER_SKUS = {
|
|
53
|
+
solo: "payg-v1",
|
|
54
|
+
builder: "builder-v1",
|
|
55
|
+
team: "growth-v1",
|
|
56
|
+
scale: "team-v2",
|
|
57
|
+
founding: "legacy-growth-v1",
|
|
58
|
+
enterprise: "enterprise-v1"
|
|
59
|
+
};
|
|
60
|
+
var PUBLIC_PLAN_SKUS = Object.keys(
|
|
61
|
+
PLAN_OFFER_SKUS
|
|
62
|
+
);
|
|
63
|
+
function resolvePublicPlanSku(sku) {
|
|
64
|
+
return Object.hasOwn(PLAN_OFFER_SKUS, sku) ? PLAN_OFFER_SKUS[sku] : sku;
|
|
65
|
+
}
|
|
50
66
|
|
|
51
67
|
// src/pagination.ts
|
|
52
68
|
async function* iterateCursorPages(fetchPage) {
|
|
@@ -80,7 +96,7 @@ function requireBillingIdempotencyKey(value) {
|
|
|
80
96
|
}
|
|
81
97
|
}
|
|
82
98
|
if (!valid) {
|
|
83
|
-
throw new (0,
|
|
99
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
84
100
|
"Billing idempotencyKey must contain 1\u2013200 characters with no leading or trailing whitespace and be valid HTTP header text.",
|
|
85
101
|
void 0,
|
|
86
102
|
"INVALID_BILLING_IDEMPOTENCY_KEY"
|
|
@@ -92,23 +108,23 @@ function requireBillingIdempotencyKey(value) {
|
|
|
92
108
|
// src/db/query.ts
|
|
93
109
|
function planCustomerDbQuery(input, maxRetries = 3) {
|
|
94
110
|
if (typeof input.sql !== "string" || !input.sql.trim())
|
|
95
|
-
throw new (0,
|
|
111
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)("sql must not be empty.", 400, "INVALID_SQL");
|
|
96
112
|
if (input.operationKey !== void 0 && typeof input.operationKey !== "string")
|
|
97
|
-
throw new (0,
|
|
113
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
98
114
|
"operationKey must be a string containing 1\u2013512 characters.",
|
|
99
115
|
400,
|
|
100
116
|
"INVALID_OPERATION_KEY"
|
|
101
117
|
);
|
|
102
118
|
const operationKey = input.operationKey;
|
|
103
119
|
if (operationKey !== void 0 && (!operationKey.trim() || operationKey.length > 512)) {
|
|
104
|
-
throw new (0,
|
|
120
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
105
121
|
"operationKey must contain 1\u2013512 characters.",
|
|
106
122
|
400,
|
|
107
123
|
"INVALID_OPERATION_KEY"
|
|
108
124
|
);
|
|
109
125
|
}
|
|
110
126
|
if (input.maxRows !== void 0 && (!Number.isSafeInteger(input.maxRows) || input.maxRows < 1 || input.maxRows > 1e3)) {
|
|
111
|
-
throw new (0,
|
|
127
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
112
128
|
"maxRows must be a whole number from 1 to 1000.",
|
|
113
129
|
400,
|
|
114
130
|
"INVALID_MAX_ROWS"
|
|
@@ -150,10 +166,10 @@ async function queryCustomerDatabase(http, input, maxRetries) {
|
|
|
150
166
|
}
|
|
151
167
|
);
|
|
152
168
|
} catch (error) {
|
|
153
|
-
if (error instanceof
|
|
169
|
+
if (error instanceof _chunkLFQJW4S2js.DeeplineError && (_optionalChain([error, 'access', _ => _.code, 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
|
|
154
170
|
// lost connections and explicitly unknown transaction resolution.
|
|
155
171
|
/^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
|
|
156
|
-
throw new (0,
|
|
172
|
+
throw new (0, _chunk6VLFQZK6js.CustomerDbQueryOutcomeUnknownError)(
|
|
157
173
|
error,
|
|
158
174
|
plan.request.body.operation_key
|
|
159
175
|
);
|
|
@@ -161,8 +177,8 @@ async function queryCustomerDatabase(http, input, maxRetries) {
|
|
|
161
177
|
throw error;
|
|
162
178
|
}
|
|
163
179
|
if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
|
|
164
|
-
throw new (0,
|
|
165
|
-
new (0,
|
|
180
|
+
throw new (0, _chunk6VLFQZK6js.CustomerDbQueryOutcomeUnknownError)(
|
|
181
|
+
new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
166
182
|
"The SQL response did not contain a valid result.",
|
|
167
183
|
200,
|
|
168
184
|
"CUSTOMER_DB_QUERY_RESPONSE_INVALID"
|
|
@@ -172,8 +188,8 @@ async function queryCustomerDatabase(http, input, maxRetries) {
|
|
|
172
188
|
}
|
|
173
189
|
const operation = result.operation;
|
|
174
190
|
if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
|
|
175
|
-
throw new (0,
|
|
176
|
-
new (0,
|
|
191
|
+
throw new (0, _chunk6VLFQZK6js.CustomerDbQueryOutcomeUnknownError)(
|
|
192
|
+
new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
177
193
|
"The server did not confirm the original atomic SQL operation.",
|
|
178
194
|
200,
|
|
179
195
|
"CUSTOMER_DB_OPERATION_ACK_INVALID"
|
|
@@ -452,7 +468,7 @@ function usesExtendedBetterContactLauncherBudget(toolId) {
|
|
|
452
468
|
var CLI_INVOCATION_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
453
469
|
function validateCliInvocationId(value) {
|
|
454
470
|
if (!CLI_INVOCATION_ID_PATTERN.test(value)) {
|
|
455
|
-
throw new (0,
|
|
471
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
456
472
|
"CLI invocation IDs must be UUID v4 values.",
|
|
457
473
|
void 0,
|
|
458
474
|
"CLI_INVOCATION_ID_INVALID"
|
|
@@ -468,7 +484,7 @@ var RAW_V2_EXECUTE_RESPONSE_CONTRACT = _chunk4WAM6TLDjs.RAW_V2_TOOL_RESPONSE_CON
|
|
|
468
484
|
var DEFAULT_EXECUTION_RECOVERY_TIMEOUT_MS = 15 * 60 * 1e3;
|
|
469
485
|
function validateExecutionIdempotencyKey(key) {
|
|
470
486
|
if (typeof key !== "string" || key.length < 1 || key.length > 200 || !/^[A-Za-z0-9._:-]+$/.test(key)) {
|
|
471
|
-
throw new (0,
|
|
487
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
472
488
|
"Execution idempotency keys must be 1\u2013200 ASCII letters, digits, dots, underscores, colons, or hyphens.",
|
|
473
489
|
void 0,
|
|
474
490
|
"IDEMPOTENCY_KEY_INVALID"
|
|
@@ -481,20 +497,20 @@ function getExecutionRecoveryState(value) {
|
|
|
481
497
|
return state === "running" || state === "completed" || state === "outcome_unknown" ? state : null;
|
|
482
498
|
}
|
|
483
499
|
function isRecoverableExecutionAttemptError(error) {
|
|
484
|
-
if (error instanceof
|
|
500
|
+
if (error instanceof _chunkLFQJW4S2js.ToolExecutionError) {
|
|
485
501
|
return error.code === "EXECUTION_IN_PROGRESS" || error.origin === "deepline" && error.category === "network" && error.networkScope === "client_to_deepline";
|
|
486
502
|
}
|
|
487
|
-
return error instanceof
|
|
503
|
+
return error instanceof _chunkLFQJW4S2js.DeeplineError && (error.code === "EXECUTION_IN_PROGRESS" || _optionalChain([error, 'access', _9 => _9.code, 'optionalAccess', _10 => _10.startsWith, 'call', _11 => _11("NETWORK_")]) === true && error.statusCode === void 0);
|
|
488
504
|
}
|
|
489
505
|
function isRecoverableExecutionLookupError(error) {
|
|
490
506
|
if (isRecoverableExecutionAttemptError(error)) return true;
|
|
491
|
-
return error instanceof
|
|
507
|
+
return error instanceof _chunkLFQJW4S2js.DeeplineError && (error.statusCode === 429 || error.statusCode !== void 0 && error.statusCode >= 500);
|
|
492
508
|
}
|
|
493
509
|
function timeoutWithinRecoveryBudget(requestTimeoutMs, defaultRequestTimeoutMs, remainingMs) {
|
|
494
510
|
return Math.min(_nullishCoalesce(requestTimeoutMs, () => ( defaultRequestTimeoutMs)), remainingMs);
|
|
495
511
|
}
|
|
496
512
|
function executionRecoveryError(input) {
|
|
497
|
-
return new (0,
|
|
513
|
+
return new (0, _chunkLFQJW4S2js.ToolExecutionError)(input.message, {
|
|
498
514
|
toolId: input.toolId,
|
|
499
515
|
provider: null,
|
|
500
516
|
operation: input.toolId,
|
|
@@ -537,7 +553,7 @@ function resolveToolExecuteTimeoutMs(toolId, input, configuredRequestTimeoutMs)
|
|
|
537
553
|
if (usesExtendedBetterContactLauncherBudget(normalized)) {
|
|
538
554
|
return BETTERCONTACT_LAUNCHER_CLIENT_TIMEOUT_MS;
|
|
539
555
|
}
|
|
540
|
-
return normalized === "deeplineagent" || normalized === "deeplineagent_deeplineagent" || normalized === "ai_inference" || normalized === "deeplineagent_ai_inference" || normalized === "ai_evaluate" || normalized === "deeplineagent_ai_evaluate" || normalized === "aiinference" ? DEEPLINEAGENT_EXECUTE_TIMEOUT_MS : void 0;
|
|
556
|
+
return normalized === "deeplineagent" || normalized === "deeplineagent_deeplineagent" || normalized === "ai_inference" || normalized === "deeplineagent_ai_inference" || normalized === "ai_evaluate" || normalized === "deeplineagent_ai_evaluate" || normalized === "ai_decision" || normalized === "aiinference" ? DEEPLINEAGENT_EXECUTE_TIMEOUT_MS : void 0;
|
|
541
557
|
}
|
|
542
558
|
function isRecord(value) {
|
|
543
559
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
@@ -595,8 +611,8 @@ var ToolCalls = class {
|
|
|
595
611
|
async call(toolId, input, options) {
|
|
596
612
|
const connection = _optionalChain([options, 'optionalAccess', _12 => _12.connection]);
|
|
597
613
|
if (connection !== void 0 && (!_chunk4WAM6TLDjs.isToolConnectionName.call(void 0, connection) || _optionalChain([options, 'optionalAccess', _13 => _13.idempotencyKey]) !== void 0 || _optionalChain([options, 'optionalAccess', _14 => _14.recover]))) {
|
|
598
|
-
throw new (0,
|
|
599
|
-
"Use a valid
|
|
614
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
615
|
+
"Use a valid org connection name without execution recovery.",
|
|
600
616
|
400,
|
|
601
617
|
"NAMED_CONNECTION_INVALID"
|
|
602
618
|
);
|
|
@@ -610,7 +626,7 @@ var ToolCalls = class {
|
|
|
610
626
|
if (idempotencyKey !== void 0) {
|
|
611
627
|
validateExecutionIdempotencyKey(idempotencyKey);
|
|
612
628
|
if (_optionalChain([options, 'optionalAccess', _19 => _19.recoveryTimeoutMs]) !== void 0 && (!Number.isFinite(options.recoveryTimeoutMs) || options.recoveryTimeoutMs < 0)) {
|
|
613
|
-
throw new (0,
|
|
629
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
614
630
|
"recoveryTimeoutMs must be a finite, non-negative number.",
|
|
615
631
|
void 0,
|
|
616
632
|
"IDEMPOTENCY_KEY_INVALID"
|
|
@@ -627,8 +643,8 @@ var ToolCalls = class {
|
|
|
627
643
|
const headers = {
|
|
628
644
|
[EXECUTE_RESPONSE_CONTRACT_HEADER]: RAW_V2_EXECUTE_RESPONSE_CONTRACT,
|
|
629
645
|
...isApifySync ? { "X-Deepline-Apify-Sync-Response-Budget": "extended-v1" } : {},
|
|
630
|
-
[
|
|
631
|
-
|
|
646
|
+
[_chunkLFQJW4S2js.TOOL_EXECUTION_ERROR_SCHEMA_HEADER]: String(
|
|
647
|
+
_chunkLFQJW4S2js.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
|
|
632
648
|
),
|
|
633
649
|
..._optionalChain([options, 'optionalAccess', _23 => _23.includeToolMetadata]) ? { [INCLUDE_TOOL_METADATA_HEADER]: "true" } : {},
|
|
634
650
|
[EXECUTE_RESPONSE_INTENT_HEADER]: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _24 => _24.responseIntent]), () => ( "raw")),
|
|
@@ -641,7 +657,7 @@ var ToolCalls = class {
|
|
|
641
657
|
if (!lastResponse) return;
|
|
642
658
|
if (failure) {
|
|
643
659
|
const { error } = failure;
|
|
644
|
-
if (isRecoverableExecutionAttemptError(error) || !(error instanceof
|
|
660
|
+
if (isRecoverableExecutionAttemptError(error) || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.statusCode === void 0 || error.statusCode !== lastResponse.httpStatus || error.code === "EXECUTION_OUTCOME_UNKNOWN")
|
|
645
661
|
return;
|
|
646
662
|
}
|
|
647
663
|
const body = lastResponse.body;
|
|
@@ -689,7 +705,7 @@ var ToolCalls = class {
|
|
|
689
705
|
idempotencyKey,
|
|
690
706
|
onResponse: (response2) => {
|
|
691
707
|
lastResponse = null;
|
|
692
|
-
atomicToolsSupported = response2.headers.get(
|
|
708
|
+
atomicToolsSupported = response2.headers.get(_chunkAGLR6QVNjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
693
709
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
694
710
|
if (_optionalChain([options, 'optionalAccess', _33 => _33.onServerTiming])) {
|
|
695
711
|
try {
|
|
@@ -713,8 +729,8 @@ var ToolCalls = class {
|
|
|
713
729
|
} catch (error) {
|
|
714
730
|
if (connection !== void 0) throw error;
|
|
715
731
|
if (atomicToolOnly) {
|
|
716
|
-
if (!atomicToolsSupported && !recoverySupported && !(error instanceof
|
|
717
|
-
throw new (0,
|
|
732
|
+
if (!atomicToolsSupported && !recoverySupported && !(error instanceof _chunkLFQJW4S2js.ToolExecutionError) && error instanceof _chunkLFQJW4S2js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
733
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
718
734
|
"This server does not support atomic tool execution.",
|
|
719
735
|
error.statusCode,
|
|
720
736
|
"ATOMIC_TOOL_EXECUTE_UNSUPPORTED"
|
|
@@ -722,7 +738,7 @@ var ToolCalls = class {
|
|
|
722
738
|
}
|
|
723
739
|
throw error;
|
|
724
740
|
}
|
|
725
|
-
if (useLegacyEndpoint || recoverySupported || !(error instanceof
|
|
741
|
+
if (useLegacyEndpoint || recoverySupported || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.statusCode !== 404 && error.statusCode !== 405)
|
|
726
742
|
throw error;
|
|
727
743
|
lastResponse = null;
|
|
728
744
|
await this.lookupExecutionByKey(
|
|
@@ -811,7 +827,7 @@ var ToolCalls = class {
|
|
|
811
827
|
recoveryDeadline = Date.now() + recoveryTimeoutMs;
|
|
812
828
|
}
|
|
813
829
|
} catch (error) {
|
|
814
|
-
if (idempotencyKey && error instanceof
|
|
830
|
+
if (idempotencyKey && error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "EXECUTION_OUTCOME_UNKNOWN") {
|
|
815
831
|
throw executionRecoveryError({
|
|
816
832
|
toolId,
|
|
817
833
|
idempotencyKey,
|
|
@@ -846,7 +862,7 @@ var ToolCalls = class {
|
|
|
846
862
|
validateExecutionIdempotencyKey(idempotencyKey);
|
|
847
863
|
const result = await this.lookupExecutionByKey(idempotencyKey);
|
|
848
864
|
if (!result) {
|
|
849
|
-
throw new (0,
|
|
865
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
850
866
|
`No execution exists for idempotency key ${idempotencyKey}.`,
|
|
851
867
|
404,
|
|
852
868
|
"EXECUTION_NOT_FOUND"
|
|
@@ -872,7 +888,7 @@ var ToolCalls = class {
|
|
|
872
888
|
}
|
|
873
889
|
);
|
|
874
890
|
if (!supported) {
|
|
875
|
-
throw new (0,
|
|
891
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
876
892
|
"This Deepline server does not support recoverable tool executions; no tool was dispatched.",
|
|
877
893
|
422,
|
|
878
894
|
"IDEMPOTENCY_NOT_SUPPORTED"
|
|
@@ -958,7 +974,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
958
974
|
if (request.runtime !== void 0) {
|
|
959
975
|
const runtime = normalizePlayRunRuntimeSelection(request.runtime);
|
|
960
976
|
if (!runtime) {
|
|
961
|
-
throw new (0,
|
|
977
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
962
978
|
'runtime must be { environment: "preview", namespace, backend?: "daytona" | "modal", sandboxPlacementPolicy?: "policy_name@1" } with namespace matching ^[a-z][a-z0-9-]{0,30}$, or { environment: "native", sandboxPlacementPolicy: "policy_name@1" }.',
|
|
963
979
|
void 0,
|
|
964
980
|
"INVALID_RUNTIME_SELECTION"
|
|
@@ -971,7 +987,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
971
987
|
const configuredToken = _optionalChain([env, 'access', _43 => _43.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]);
|
|
972
988
|
const configuredPlacementPolicy = _optionalChain([env, 'access', _46 => _46.DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY, 'optionalAccess', _47 => _47.trim, 'call', _48 => _48()]);
|
|
973
989
|
if (_optionalChain([env, 'access', _49 => _49.DEEPLINE_RUNTIME_GATEWAY_PROFILE, 'optionalAccess', _50 => _50.trim, 'call', _51 => _51()])) {
|
|
974
|
-
throw new (0,
|
|
990
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
975
991
|
"DEEPLINE_RUNTIME_GATEWAY_PROFILE was removed: Runtime gateway profiles (vercel_app@1) are no longer available. Unset it to run on the default gateways.",
|
|
976
992
|
void 0,
|
|
977
993
|
"RUNTIME_GATEWAY_PROFILE_REMOVED"
|
|
@@ -986,7 +1002,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
986
1002
|
present.push("DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY");
|
|
987
1003
|
}
|
|
988
1004
|
const isPlural = present.length > 1;
|
|
989
|
-
throw new (0,
|
|
1005
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
990
1006
|
[
|
|
991
1007
|
`Incomplete play runtime selection: ${present.join(" and ")} ${isPlural ? "are" : "is"} set but DEEPLINE_RUNTIME_ENVIRONMENT is not.`,
|
|
992
1008
|
"Preview routing requires DEEPLINE_RUNTIME_ENVIRONMENT=preview together with DEEPLINE_RUNTIME_NAMESPACE; the token alone authorizes nothing.",
|
|
@@ -1004,7 +1020,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
1004
1020
|
configuredPlacementPolicy
|
|
1005
1021
|
);
|
|
1006
1022
|
if (configuredNamespace || !sandboxPlacementPolicy) {
|
|
1007
|
-
throw new (0,
|
|
1023
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
1008
1024
|
"DEEPLINE_RUNTIME_ENVIRONMENT=native requires DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY (such as modal_only@1) and no DEEPLINE_RUNTIME_NAMESPACE.",
|
|
1009
1025
|
void 0,
|
|
1010
1026
|
"INVALID_RUNTIME_ENVIRONMENT"
|
|
@@ -1014,7 +1030,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
1014
1030
|
}
|
|
1015
1031
|
const environment = normalizePlayRuntimeEnvironment(configured);
|
|
1016
1032
|
if (!environment) {
|
|
1017
|
-
throw new (0,
|
|
1033
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
1018
1034
|
`DEEPLINE_RUNTIME_ENVIRONMENT must be preview or native. Received "${configured}". Omit it to use the app-native runtime.`,
|
|
1019
1035
|
void 0,
|
|
1020
1036
|
"INVALID_RUNTIME_ENVIRONMENT"
|
|
@@ -1022,7 +1038,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
1022
1038
|
}
|
|
1023
1039
|
const namespace = normalizePlayRuntimeNamespace(configuredNamespace);
|
|
1024
1040
|
if (!namespace) {
|
|
1025
|
-
throw new (0,
|
|
1041
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
1026
1042
|
"DEEPLINE_RUNTIME_NAMESPACE is required for preview and must match ^[a-z][a-z0-9-]{0,30}$.",
|
|
1027
1043
|
void 0,
|
|
1028
1044
|
"INVALID_RUNTIME_NAMESPACE"
|
|
@@ -1031,14 +1047,14 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
1031
1047
|
const configuredBackendValue = _optionalChain([env, 'access', _52 => _52.DEEPLINE_PLAY_RUNNER_BACKEND, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
|
|
1032
1048
|
const configuredBackend = configuredBackendValue === "daytona" || configuredBackendValue === "modal" ? configuredBackendValue : void 0;
|
|
1033
1049
|
if (configuredBackendValue && !configuredBackend) {
|
|
1034
|
-
throw new (0,
|
|
1050
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
1035
1051
|
`DEEPLINE_PLAY_RUNNER_BACKEND must be daytona or modal for preview runtime selection. Received "${configuredBackendValue}".`,
|
|
1036
1052
|
void 0,
|
|
1037
1053
|
"INVALID_RUNTIME_BACKEND"
|
|
1038
1054
|
);
|
|
1039
1055
|
}
|
|
1040
1056
|
if (configuredPlacementPolicy && !normalizePlayRuntimeSandboxPlacementPolicy(configuredPlacementPolicy)) {
|
|
1041
|
-
throw new (0,
|
|
1057
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
1042
1058
|
`DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY must be a versioned placement policy id such as daytona_only@1. Received "${configuredPlacementPolicy}".`,
|
|
1043
1059
|
void 0,
|
|
1044
1060
|
"INVALID_RUNTIME_SANDBOX_PLACEMENT_POLICY"
|
|
@@ -1068,7 +1084,7 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1068
1084
|
if (!runtime || runtime.environment === "native") return void 0;
|
|
1069
1085
|
const token = _optionalChain([env, 'access', _55 => _55.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]);
|
|
1070
1086
|
if (!token) {
|
|
1071
|
-
throw new (0,
|
|
1087
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
1072
1088
|
"DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN is required for explicit preview runtime selection.",
|
|
1073
1089
|
void 0,
|
|
1074
1090
|
"RUNTIME_ENVIRONMENT_TOKEN_REQUIRED"
|
|
@@ -1076,21 +1092,21 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1076
1092
|
}
|
|
1077
1093
|
const receivers = _optionalChain([env, 'access', _58 => _58.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _59 => _59.trim, 'call', _60 => _60()]);
|
|
1078
1094
|
return {
|
|
1079
|
-
[
|
|
1080
|
-
...receivers ? { [
|
|
1095
|
+
[_chunkAGLR6QVNjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1096
|
+
...receivers ? { [_chunkAGLR6QVNjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1081
1097
|
};
|
|
1082
1098
|
}
|
|
1083
1099
|
function playRunStartHeaders(runtime, env) {
|
|
1084
1100
|
const headers = runtimeSelectionHeaders(runtime, env);
|
|
1085
1101
|
const experimentSwitches = _optionalChain([env, 'access', _61 => _61.DEEPLINE_EXPERIMENT_SWITCHES, 'optionalAccess', _62 => _62.trim, 'call', _63 => _63()]);
|
|
1086
1102
|
if (!experimentSwitches) return headers;
|
|
1087
|
-
return { ...headers, [
|
|
1103
|
+
return { ...headers, [_chunkAGLR6QVNjs.EXPERIMENT_SWITCHES_HEADER]: experimentSwitches };
|
|
1088
1104
|
}
|
|
1089
1105
|
function normalizeTestPolicyOverrides(value, source) {
|
|
1090
1106
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
1091
1107
|
return value;
|
|
1092
1108
|
}
|
|
1093
|
-
throw new (0,
|
|
1109
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
1094
1110
|
`${source} must be a JSON object.`,
|
|
1095
1111
|
void 0,
|
|
1096
1112
|
"INVALID_TEST_POLICY_OVERRIDES"
|
|
@@ -1105,7 +1121,7 @@ function parseEnvTestPolicyOverrides(env) {
|
|
|
1105
1121
|
parsed = JSON.parse(trimmed);
|
|
1106
1122
|
} catch (error) {
|
|
1107
1123
|
const detail = error instanceof Error ? ` ${error.message}` : "";
|
|
1108
|
-
throw new (0,
|
|
1124
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
1109
1125
|
`DEEPLINE_TEST_POLICY_OVERRIDES must be valid JSON.${detail}`,
|
|
1110
1126
|
void 0,
|
|
1111
1127
|
"INVALID_TEST_POLICY_OVERRIDES"
|
|
@@ -1117,10 +1133,10 @@ function isRecord2(value) {
|
|
|
1117
1133
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
1118
1134
|
}
|
|
1119
1135
|
function normalizePlayStatus(raw) {
|
|
1120
|
-
const runPackage =
|
|
1136
|
+
const runPackage = _chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, raw) ? raw : _chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
|
|
1121
1137
|
const packageRun = _optionalChain([runPackage, 'optionalAccess', _66 => _66.run]);
|
|
1122
1138
|
const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess', _67 => _67.status]) === "string" ? packageRun.status : null;
|
|
1123
|
-
const status =
|
|
1139
|
+
const status = _chunkMJTVX4QKjs.decodePlayRunPublicStatus.call(void 0, rawStatus);
|
|
1124
1140
|
if (!status) {
|
|
1125
1141
|
throw new Error(
|
|
1126
1142
|
`Invalid play run lifecycle status in API response: ${JSON.stringify(rawStatus)}.`
|
|
@@ -1151,10 +1167,10 @@ var PlayClient = class {
|
|
|
1151
1167
|
async startPlayRun(request, options) {
|
|
1152
1168
|
const resolved = resolveStartPlayRunRequest(request, this.environment);
|
|
1153
1169
|
const headers = playRunStartHeaders(resolved.runtime, this.environment);
|
|
1154
|
-
return
|
|
1170
|
+
return _chunkMJTVX4QKjs.startPlayRun.call(void 0,
|
|
1155
1171
|
this.http,
|
|
1156
1172
|
resolved.request,
|
|
1157
|
-
_optionalChain([options, 'optionalAccess', _71 => _71.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1173
|
+
_optionalChain([options, 'optionalAccess', _71 => _71.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkAGLR6QVNjs.SDK_API_MAJOR) } : headers,
|
|
1158
1174
|
options
|
|
1159
1175
|
);
|
|
1160
1176
|
}
|
|
@@ -1428,13 +1444,13 @@ function stripLeadingTimestamp(line) {
|
|
|
1428
1444
|
|
|
1429
1445
|
// src/runs/read-errors.ts
|
|
1430
1446
|
function isTransientPlayRunReadError(error) {
|
|
1431
|
-
if (error instanceof
|
|
1447
|
+
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_START_OUTCOME_UNKNOWN") {
|
|
1432
1448
|
return false;
|
|
1433
1449
|
}
|
|
1434
|
-
if (error instanceof
|
|
1450
|
+
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_STREAM_NETWORK_ABORTED") {
|
|
1435
1451
|
return true;
|
|
1436
1452
|
}
|
|
1437
|
-
if (error instanceof
|
|
1453
|
+
if (error instanceof _chunkLFQJW4S2js.DeeplineError && typeof error.statusCode === "number") {
|
|
1438
1454
|
return error.statusCode >= 500 && error.statusCode < 600;
|
|
1439
1455
|
}
|
|
1440
1456
|
const text = error instanceof Error ? error.message : String(error);
|
|
@@ -2421,7 +2437,7 @@ function isStopAllPlayRunsDryRunResult(result) {
|
|
|
2421
2437
|
// src/integrations.ts
|
|
2422
2438
|
var CALENDAR_PROVIDER = "google_calendar_availability";
|
|
2423
2439
|
function invalid(message) {
|
|
2424
|
-
throw new (0,
|
|
2440
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(message, 400, "INVALID_ARGUMENT");
|
|
2425
2441
|
}
|
|
2426
2442
|
async function findConnection(client, name, provider) {
|
|
2427
2443
|
const { connections } = await client.listWorkspaceConnectionInventory(
|
|
@@ -2432,8 +2448,8 @@ async function findConnection(client, name, provider) {
|
|
|
2432
2448
|
(row) => row.name === name && (!provider || row.provider === provider)
|
|
2433
2449
|
);
|
|
2434
2450
|
if (matches.length === 0)
|
|
2435
|
-
throw new (0,
|
|
2436
|
-
`No
|
|
2451
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
2452
|
+
`No org connection named ${JSON.stringify(name)}. Run deepline integrations list --json.`,
|
|
2437
2453
|
404,
|
|
2438
2454
|
"NOT_FOUND"
|
|
2439
2455
|
);
|
|
@@ -2449,9 +2465,11 @@ async function changeConnection(client, action, name, options) {
|
|
|
2449
2465
|
invalid("Use --list-calendars with Google Workspace verify or reconnect.");
|
|
2450
2466
|
if (row.type === "workspace_delegation") {
|
|
2451
2467
|
if (row.provider !== CALENDAR_PROVIDER || !row.domain)
|
|
2452
|
-
invalid(
|
|
2468
|
+
invalid(
|
|
2469
|
+
"The Google Workspace approval is missing its provider or domain."
|
|
2470
|
+
);
|
|
2453
2471
|
if (row.authorizationVersion === void 0)
|
|
2454
|
-
invalid("The API did not return a
|
|
2472
|
+
invalid("The API did not return a Google Workspace approval revision.");
|
|
2455
2473
|
if (action === "reconnect") {
|
|
2456
2474
|
return verifyWorkspace(client, row.domain, options, row);
|
|
2457
2475
|
}
|
|
@@ -2504,7 +2522,7 @@ async function verifyWorkspace(client, domain, options, existing) {
|
|
|
2504
2522
|
grantedScopes: existing.scopes
|
|
2505
2523
|
} : await client.getCalendarDelegation(void 0, void 0, domain);
|
|
2506
2524
|
if (settings.grantRevision === void 0)
|
|
2507
|
-
invalid("The API did not return a
|
|
2525
|
+
invalid("The API did not return a Google Workspace approval revision.");
|
|
2508
2526
|
const requestedScopes = [
|
|
2509
2527
|
.../* @__PURE__ */ new Set([
|
|
2510
2528
|
_chunk4WAM6TLDjs.GOOGLE_WORKSPACE_AVAILABILITY_SCOPE,
|
|
@@ -2646,6 +2664,7 @@ var RUNTIME_RECEIPT_COMPLETION_BUFFER_MAX_BYTES = 32 * 1024 * 1024;
|
|
|
2646
2664
|
var RUNTIME_RECEIPT_CONTROL_BUFFER_MAX_BYTES = 2 * 1024 * 1024;
|
|
2647
2665
|
var RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES = 16 * 1024 * 1024;
|
|
2648
2666
|
var RUNTIME_SHEET_START_TARGET_BODY_BYTES = 12 * 1024 * 1024;
|
|
2667
|
+
var RUNTIME_SHEET_START_TARGET_RESPONSE_BYTES = 1024 * 1024;
|
|
2649
2668
|
var RUNTIME_RECEIPT_GATEWAY_BATCH_MAX_BYTES = 12 * 1024 * 1024;
|
|
2650
2669
|
var RUNTIME_RECEIPT_WRITER_TARGET_BATCH_BYTES = 8 * 1024 * 1024;
|
|
2651
2670
|
var RUNNER_POST_TERMINAL_DIAGNOSTIC_MAX_BYTES = 64 * 1024;
|
|
@@ -2841,7 +2860,7 @@ var TERMINAL_STATUS_BY_EVENT_TYPE = {
|
|
|
2841
2860
|
|
|
2842
2861
|
// ../play-runtime/run-snapshot-stream.ts
|
|
2843
2862
|
function isTerminalPlayRunLiveStatus(status) {
|
|
2844
|
-
return
|
|
2863
|
+
return _chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, status);
|
|
2845
2864
|
}
|
|
2846
2865
|
function makeRunStreamEvent(input) {
|
|
2847
2866
|
return {
|
|
@@ -3080,6 +3099,7 @@ var RUN_WATCH_SERVER_WAIT_MS = 2e4;
|
|
|
3080
3099
|
var RUN_WATCH_SERVER_WAIT_FROM_START = true;
|
|
3081
3100
|
var RUN_WATCH_HOLD_HEADER = "x-deepline-run-watch-hold";
|
|
3082
3101
|
var TERMINAL_LOG_PROJECTION_RETRY_LIMIT = 3;
|
|
3102
|
+
var TERMINAL_LOG_PROJECTION_RETRY_INTERVAL_MS = 250;
|
|
3083
3103
|
function waitForNextPoll(ms, signal) {
|
|
3084
3104
|
if (_optionalChain([signal, 'optionalAccess', _118 => _118.aborted])) {
|
|
3085
3105
|
return Promise.resolve(false);
|
|
@@ -3232,7 +3252,7 @@ async function* watchRunEvents(options) {
|
|
|
3232
3252
|
if (_optionalChain([signal, 'optionalAccess', _124 => _124.aborted])) {
|
|
3233
3253
|
return;
|
|
3234
3254
|
}
|
|
3235
|
-
const heldTimeout = serverWaitMs > 0 && error instanceof
|
|
3255
|
+
const heldTimeout = serverWaitMs > 0 && error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "NETWORK_TIMEOUT";
|
|
3236
3256
|
if (heldTimeout) serverHoldDeclined = true;
|
|
3237
3257
|
if (!heldTimeout && !isTransientPlayRunReadError(error)) {
|
|
3238
3258
|
throw error;
|
|
@@ -3270,7 +3290,7 @@ async function* watchRunEvents(options) {
|
|
|
3270
3290
|
terminalLogProjectionRetries += 1;
|
|
3271
3291
|
const remaining2 = Math.max(
|
|
3272
3292
|
0,
|
|
3273
|
-
pollIntervalMs - (Date.now() - pollStartedAt)
|
|
3293
|
+
Math.min(pollIntervalMs, TERMINAL_LOG_PROJECTION_RETRY_INTERVAL_MS) - (Date.now() - pollStartedAt)
|
|
3274
3294
|
);
|
|
3275
3295
|
if (!await waitForNextPoll(remaining2, signal)) return;
|
|
3276
3296
|
continue;
|
|
@@ -3308,7 +3328,7 @@ async function* watchRunEvents(options) {
|
|
|
3308
3328
|
|
|
3309
3329
|
// src/client-core.ts
|
|
3310
3330
|
function invalidToolDiscoveryResponse() {
|
|
3311
|
-
return new (0,
|
|
3331
|
+
return new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
3312
3332
|
"The server returned an invalid tool discovery response.",
|
|
3313
3333
|
502,
|
|
3314
3334
|
"INVALID_TOOL_DISCOVERY_RESPONSE"
|
|
@@ -3385,19 +3405,19 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3385
3405
|
}
|
|
3386
3406
|
const token = _optionalChain([env, 'access', _148 => _148.DEEPLINE_INTERNAL_TOKEN, 'optionalAccess', _149 => _149.trim, 'call', _150 => _150()]);
|
|
3387
3407
|
if (!token) {
|
|
3388
|
-
throw new (0,
|
|
3408
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
3389
3409
|
"DEEPLINE_INTERNAL_TOKEN is required for isolated CI runtime event reads.",
|
|
3390
3410
|
void 0,
|
|
3391
3411
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3392
3412
|
);
|
|
3393
3413
|
}
|
|
3394
|
-
return { [
|
|
3414
|
+
return { [_chunkAGLR6QVNjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3395
3415
|
}
|
|
3396
3416
|
function sleep(ms) {
|
|
3397
3417
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
3398
3418
|
}
|
|
3399
3419
|
function isTransientCompileManifestError(error) {
|
|
3400
|
-
if (error instanceof
|
|
3420
|
+
if (error instanceof _chunkLFQJW4S2js.DeeplineError && typeof error.statusCode === "number") {
|
|
3401
3421
|
return error.statusCode === 408 || error.statusCode === 425 || error.statusCode === 499 || error.statusCode >= 500 && error.statusCode < 600;
|
|
3402
3422
|
}
|
|
3403
3423
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -3408,7 +3428,7 @@ function isTransientCompileManifestError(error) {
|
|
|
3408
3428
|
function requireCompileManifestResponse(response, playName) {
|
|
3409
3429
|
const compilerManifest = _optionalChain([response, 'optionalAccess', _151 => _151.compilerManifest]);
|
|
3410
3430
|
if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
|
|
3411
|
-
throw new (0,
|
|
3431
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
3412
3432
|
`Compile manifest response did not include compilerManifest for ${playName}.`,
|
|
3413
3433
|
502,
|
|
3414
3434
|
"API_RESPONSE_INVALID",
|
|
@@ -3522,7 +3542,7 @@ function playLiveRunStatus(event) {
|
|
|
3522
3542
|
return null;
|
|
3523
3543
|
}
|
|
3524
3544
|
const payload = getPlayLiveEventPayload(event);
|
|
3525
|
-
return _nullishCoalesce(
|
|
3545
|
+
return _nullishCoalesce(_chunkMJTVX4QKjs.decodePlayRunPublicStatus.call(void 0, payload.status), () => ( (_chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, payload) ? _chunkMJTVX4QKjs.decodePlayRunPublicStatus.call(void 0, payload.run.status) : null)));
|
|
3526
3546
|
}
|
|
3527
3547
|
function appendPlayLiveLogLines(state, payload) {
|
|
3528
3548
|
const lines = readStringArray(payload.lines);
|
|
@@ -3554,7 +3574,7 @@ function updatePlayLiveStatusState(state, event) {
|
|
|
3554
3574
|
if (event.type !== "play.run.snapshot" && event.type !== "play.run.status" && event.type !== "play.run.final_status") {
|
|
3555
3575
|
return null;
|
|
3556
3576
|
}
|
|
3557
|
-
const runId = typeof payload.runId === "string" && payload.runId ? payload.runId :
|
|
3577
|
+
const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : _chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, payload) ? payload.run.id : state.runId;
|
|
3558
3578
|
const status = _nullishCoalesce(playLiveRunStatus(event), () => ( state.status));
|
|
3559
3579
|
const progressPayload = isRecord3(payload.progress) ? payload.progress : {};
|
|
3560
3580
|
if (event.type === "play.run.final_status" && state.logs.length === 0 && state.lastLogSeq === 0) {
|
|
@@ -3567,7 +3587,7 @@ function updatePlayLiveStatusState(state, event) {
|
|
|
3567
3587
|
}
|
|
3568
3588
|
if ("result" in payload) {
|
|
3569
3589
|
state.result = payload.result;
|
|
3570
|
-
} else if (
|
|
3590
|
+
} else if (_chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, payload)) {
|
|
3571
3591
|
state.result = payload;
|
|
3572
3592
|
}
|
|
3573
3593
|
if (typeof payload.error === "string" && payload.error.trim()) {
|
|
@@ -3580,7 +3600,7 @@ function updatePlayLiveStatusState(state, event) {
|
|
|
3580
3600
|
...payload,
|
|
3581
3601
|
runId,
|
|
3582
3602
|
status,
|
|
3583
|
-
...
|
|
3603
|
+
..._chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, payload) ? { package: payload, outputs: payload.outputs } : {},
|
|
3584
3604
|
progress: {
|
|
3585
3605
|
...progressRecord,
|
|
3586
3606
|
status: typeof progressRecord.status === "string" ? progressRecord.status : status,
|
|
@@ -3752,7 +3772,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3752
3772
|
purchaseCredits: (options) => this.purchaseTargetBillingCredits(options),
|
|
3753
3773
|
recoverCreditPurchase: (options) => this.recoverTargetBillingCreditPurchase(options),
|
|
3754
3774
|
transitionPlan: (options) => this.transitionTargetBillingPlan(options),
|
|
3755
|
-
portalSession: (options) => this.createTargetBillingPortalSession(options)
|
|
3775
|
+
portalSession: (options) => this.createTargetBillingPortalSession(options),
|
|
3776
|
+
getDetails: () => this.http.get("/api/v2/billing/details"),
|
|
3777
|
+
setDetails: (details) => this.http.put("/api/v2/billing/details", details)
|
|
3756
3778
|
};
|
|
3757
3779
|
this.workspaces = {
|
|
3758
3780
|
members: (options) => {
|
|
@@ -3877,6 +3899,25 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3877
3899
|
// ——————————————————————————————————————————————————————————
|
|
3878
3900
|
// Views
|
|
3879
3901
|
// ——————————————————————————————————————————————————————————
|
|
3902
|
+
/**
|
|
3903
|
+
* Call the outcomes API. Outcomes are roles handed
|
|
3904
|
+
* to agents and people: a versioned spec, a feed of entries, tasks and asks
|
|
3905
|
+
* with states, and stakeholders. `deepline outcomes` renders these calls;
|
|
3906
|
+
* `deepline outcomes --help` documents each one.
|
|
3907
|
+
*
|
|
3908
|
+
* @param path - Path below `/api/v2/outcomes`, starting with `/` or empty.
|
|
3909
|
+
* @param options.timeout - Raise this for held requests (`wait`, `claim --wait`).
|
|
3910
|
+
* @param options.maxRetries - Automatic retries of a failed request. The
|
|
3911
|
+
* client default applies when it is left out.
|
|
3912
|
+
* @internal Out of the public reference while Outcomes is behind its rollout.
|
|
3913
|
+
*/
|
|
3914
|
+
async outcomesApi(method, path, body, options) {
|
|
3915
|
+
return await this.http.request(`/api/v2/outcomes${path}`, {
|
|
3916
|
+
method,
|
|
3917
|
+
...method === "GET" ? {} : { body: _nullishCoalesce(body, () => ( {})) },
|
|
3918
|
+
...options
|
|
3919
|
+
});
|
|
3920
|
+
}
|
|
3880
3921
|
/** List this workspace's views, most recently changed first. */
|
|
3881
3922
|
async listViews(input) {
|
|
3882
3923
|
const params = new URLSearchParams();
|
|
@@ -3902,7 +3943,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3902
3943
|
input
|
|
3903
3944
|
);
|
|
3904
3945
|
}
|
|
3905
|
-
/** Who can open a view: workspace
|
|
3946
|
+
/** Who can open a view: its workspace, every org member, or anyone with its URL. */
|
|
3906
3947
|
async setViewAccess(id, access) {
|
|
3907
3948
|
return await this.http.post(
|
|
3908
3949
|
`/api/v2/views/${encodeURIComponent(id)}/access`,
|
|
@@ -4059,7 +4100,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4059
4100
|
async listToolsInCategory(category, options) {
|
|
4060
4101
|
const normalizedCategory = category.trim();
|
|
4061
4102
|
if (!normalizedCategory || category.includes(",")) {
|
|
4062
|
-
throw new (0,
|
|
4103
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
4063
4104
|
"Provide one non-empty tool category.",
|
|
4064
4105
|
400,
|
|
4065
4106
|
"INVALID_TOOL_CATEGORY"
|
|
@@ -4293,7 +4334,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4293
4334
|
*/
|
|
4294
4335
|
async preparePlayRunAdmission(request, options) {
|
|
4295
4336
|
const resolved = resolveStartPlayRunRequest(request, this.environment);
|
|
4296
|
-
const prepared = await
|
|
4337
|
+
const prepared = await _chunkMJTVX4QKjs.preparePlayRunAdmission.call(void 0,
|
|
4297
4338
|
this.http,
|
|
4298
4339
|
resolved.request,
|
|
4299
4340
|
_optionalChain([options, 'optionalAccess', _199 => _199.onSubmission]),
|
|
@@ -4306,7 +4347,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4306
4347
|
);
|
|
4307
4348
|
const headers = _optionalChain([options, 'optionalAccess', _200 => _200.cliAdmission]) ? {
|
|
4308
4349
|
...runtimeHeaders,
|
|
4309
|
-
"X-Deepline-API-Major": String(
|
|
4350
|
+
"X-Deepline-API-Major": String(_chunkAGLR6QVNjs.SDK_API_MAJOR)
|
|
4310
4351
|
} : runtimeHeaders;
|
|
4311
4352
|
const http = this.http;
|
|
4312
4353
|
let submitted = false;
|
|
@@ -4314,7 +4355,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4314
4355
|
...prepared,
|
|
4315
4356
|
async start(startOptions) {
|
|
4316
4357
|
if (submitted && !prepared.supportsCallerIntent) {
|
|
4317
|
-
throw new (0,
|
|
4358
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
4318
4359
|
"This server has not enabled caller-owned admission recovery. Do not retry an ambiguous start.",
|
|
4319
4360
|
409,
|
|
4320
4361
|
"PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
|
|
@@ -4322,7 +4363,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4322
4363
|
}
|
|
4323
4364
|
if (submitted) {
|
|
4324
4365
|
if (!_optionalChain([options, 'optionalAccess', _201 => _201.callerIntentV2])) {
|
|
4325
|
-
await
|
|
4366
|
+
await _chunkMJTVX4QKjs.preparePlayRunAdmission.call(void 0,
|
|
4326
4367
|
http,
|
|
4327
4368
|
JSON.parse(bodyJson),
|
|
4328
4369
|
void 0,
|
|
@@ -4332,7 +4373,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4332
4373
|
}
|
|
4333
4374
|
submitted = true;
|
|
4334
4375
|
try {
|
|
4335
|
-
return await
|
|
4376
|
+
return await _chunkMJTVX4QKjs.submitPreparedPlayRunAdmission.call(void 0,
|
|
4336
4377
|
http,
|
|
4337
4378
|
JSON.parse(bodyJson),
|
|
4338
4379
|
prepared.workflowId,
|
|
@@ -4345,7 +4386,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4345
4386
|
}
|
|
4346
4387
|
);
|
|
4347
4388
|
} catch (error) {
|
|
4348
|
-
if (error instanceof
|
|
4389
|
+
if (error instanceof _chunkMJTVX4QKjs.CliPlayAdmissionUnsupportedError || error instanceof _chunkMJTVX4QKjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
|
|
4349
4390
|
submitted = false;
|
|
4350
4391
|
}
|
|
4351
4392
|
throw error;
|
|
@@ -4353,7 +4394,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4353
4394
|
},
|
|
4354
4395
|
async *startStream(streamOptions) {
|
|
4355
4396
|
if (submitted && !prepared.supportsCallerIntent) {
|
|
4356
|
-
throw new (0,
|
|
4397
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
4357
4398
|
"This server has not enabled caller-owned admission recovery. Do not retry an ambiguous start.",
|
|
4358
4399
|
409,
|
|
4359
4400
|
"PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
|
|
@@ -4361,7 +4402,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4361
4402
|
}
|
|
4362
4403
|
if (submitted) {
|
|
4363
4404
|
if (!_optionalChain([options, 'optionalAccess', _209 => _209.callerIntentV2])) {
|
|
4364
|
-
await
|
|
4405
|
+
await _chunkMJTVX4QKjs.preparePlayRunAdmission.call(void 0,
|
|
4365
4406
|
http,
|
|
4366
4407
|
JSON.parse(bodyJson),
|
|
4367
4408
|
void 0,
|
|
@@ -4370,7 +4411,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4370
4411
|
}
|
|
4371
4412
|
}
|
|
4372
4413
|
submitted = true;
|
|
4373
|
-
const streamPath = _optionalChain([options, 'optionalAccess', _211 => _211.callerIntentV2]) ?
|
|
4414
|
+
const streamPath = _optionalChain([options, 'optionalAccess', _211 => _211.callerIntentV2]) ? _chunkMJTVX4QKjs.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH : _optionalChain([options, 'optionalAccess', _212 => _212.cliAdmission]) ? _chunkMJTVX4QKjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkMJTVX4QKjs.PLAY_RUN_START_STREAM_PATH;
|
|
4374
4415
|
let cliAdmissionSupported = false;
|
|
4375
4416
|
try {
|
|
4376
4417
|
for await (const event of http.streamSse(streamPath, {
|
|
@@ -4381,22 +4422,22 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4381
4422
|
exactUrlOnly: true,
|
|
4382
4423
|
..._optionalChain([options, 'optionalAccess', _214 => _214.cliAdmission]) ? {
|
|
4383
4424
|
onResponse: (response) => {
|
|
4384
|
-
cliAdmissionSupported = response.headers.get(
|
|
4425
|
+
cliAdmissionSupported = response.headers.get(_chunkMJTVX4QKjs.CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
|
|
4385
4426
|
}
|
|
4386
4427
|
} : {}
|
|
4387
4428
|
})) {
|
|
4388
4429
|
if (event.scope === "play") yield event;
|
|
4389
4430
|
}
|
|
4390
4431
|
} catch (error) {
|
|
4391
|
-
if (_optionalChain([options, 'optionalAccess', _215 => _215.cliAdmission]) && !cliAdmissionSupported && error instanceof
|
|
4432
|
+
if (_optionalChain([options, 'optionalAccess', _215 => _215.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkLFQJW4S2js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
4392
4433
|
if (options.callerIntentV2) {
|
|
4393
4434
|
submitted = false;
|
|
4394
|
-
throw new (0,
|
|
4435
|
+
throw new (0, _chunkMJTVX4QKjs.CliPlayAdmissionCallerIntentV2UnsupportedError)(
|
|
4395
4436
|
error.statusCode
|
|
4396
4437
|
);
|
|
4397
4438
|
}
|
|
4398
4439
|
submitted = false;
|
|
4399
|
-
throw new (0,
|
|
4440
|
+
throw new (0, _chunkMJTVX4QKjs.CliPlayAdmissionUnsupportedError)(error.statusCode);
|
|
4400
4441
|
}
|
|
4401
4442
|
throw error;
|
|
4402
4443
|
}
|
|
@@ -4409,7 +4450,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4409
4450
|
* @internal
|
|
4410
4451
|
*/
|
|
4411
4452
|
async prefetchPlayRunAdmissionCapability(options) {
|
|
4412
|
-
return
|
|
4453
|
+
return _chunkMJTVX4QKjs.readPlayRunAdmissionCapability.call(void 0, this.http, options);
|
|
4413
4454
|
}
|
|
4414
4455
|
/**
|
|
4415
4456
|
* Submit a play run through the legacy event response.
|
|
@@ -4683,7 +4724,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4683
4724
|
* ```
|
|
4684
4725
|
*/
|
|
4685
4726
|
async stagePlayFiles(files) {
|
|
4686
|
-
return
|
|
4727
|
+
return _chunkMJTVX4QKjs.stagePlayFiles.call(void 0, this.http, files);
|
|
4687
4728
|
}
|
|
4688
4729
|
/**
|
|
4689
4730
|
* Mint short-lived presigned upload targets for staged play files.
|
|
@@ -4692,7 +4733,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4692
4733
|
* For other files, the server returns a presigned PUT URL. Upload the file body to that URL.
|
|
4693
4734
|
*/
|
|
4694
4735
|
async mintStagedPlayFileUploads(files) {
|
|
4695
|
-
return
|
|
4736
|
+
return _chunkMJTVX4QKjs.mintStagedPlayFileUploads.call(void 0, this.http, files);
|
|
4696
4737
|
}
|
|
4697
4738
|
/**
|
|
4698
4739
|
* Resolve staged play files by content hash without uploading bytes.
|
|
@@ -4803,18 +4844,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4803
4844
|
}
|
|
4804
4845
|
})) {
|
|
4805
4846
|
_optionalChain([options, 'optionalAccess', _253 => _253.onEvent, 'optionalCall', _254 => _254(event)]);
|
|
4806
|
-
if (
|
|
4847
|
+
if (_chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
|
|
4807
4848
|
terminalObserved = true;
|
|
4808
4849
|
}
|
|
4809
4850
|
}
|
|
4810
4851
|
if (_optionalChain([options, 'optionalAccess', _255 => _255.signal, 'optionalAccess', _256 => _256.aborted])) {
|
|
4811
|
-
throw new (0,
|
|
4852
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
|
|
4812
4853
|
}
|
|
4813
4854
|
const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
|
|
4814
|
-
if (terminalObserved ||
|
|
4855
|
+
if (terminalObserved || _chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, refreshed.status)) {
|
|
4815
4856
|
return refreshed;
|
|
4816
4857
|
}
|
|
4817
|
-
throw new (0,
|
|
4858
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
4818
4859
|
`Run watch for ${runId} ended before a terminal status.`,
|
|
4819
4860
|
void 0,
|
|
4820
4861
|
"PLAY_WATCH_ENDED"
|
|
@@ -4994,7 +5035,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4994
5035
|
{ headers: { "x-deepline-run-status": "1" } }
|
|
4995
5036
|
);
|
|
4996
5037
|
if (_optionalChain([options, 'optionalAccess', _263 => _263.configuration]) === true && !Object.hasOwn(response, "contract")) {
|
|
4997
|
-
throw new (0,
|
|
5038
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
4998
5039
|
"This server does not support recorded configuration reads.",
|
|
4999
5040
|
void 0,
|
|
5000
5041
|
"RUN_CONFIGURATION_UNAVAILABLE"
|
|
@@ -5045,14 +5086,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5045
5086
|
async getRunChildren(parentRunId, options) {
|
|
5046
5087
|
const launchKey = options.launchKey.trim();
|
|
5047
5088
|
if (!launchKey) {
|
|
5048
|
-
throw new (0,
|
|
5089
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5049
5090
|
"runs.children requires a nonempty launchKey.",
|
|
5050
5091
|
void 0,
|
|
5051
5092
|
"INVALID_CHILD_RUN_LAUNCH_KEY"
|
|
5052
5093
|
);
|
|
5053
5094
|
}
|
|
5054
5095
|
if (options.limit !== void 0 && (!Number.isInteger(options.limit) || options.limit < 1 || options.limit > 50)) {
|
|
5055
|
-
throw new (0,
|
|
5096
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5056
5097
|
"runs.children limit must be an integer from 1 to 50.",
|
|
5057
5098
|
void 0,
|
|
5058
5099
|
"INVALID_CHILD_RUN_PAGE_LIMIT"
|
|
@@ -5139,7 +5180,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5139
5180
|
if (!playName)
|
|
5140
5181
|
throw new Error("runs.list options.steps requires options.play.");
|
|
5141
5182
|
if (node)
|
|
5142
|
-
throw new Error(
|
|
5183
|
+
throw new Error(
|
|
5184
|
+
"runs.list options.steps cannot be combined with node."
|
|
5185
|
+
);
|
|
5143
5186
|
params.set("steps", "true");
|
|
5144
5187
|
}
|
|
5145
5188
|
if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
|
|
@@ -5208,7 +5251,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5208
5251
|
async rerun(runId, options) {
|
|
5209
5252
|
const idempotencyKey = _optionalChain([options, 'optionalAccess', _277 => _277.idempotencyKey, 'optionalAccess', _278 => _278.trim, 'call', _279 => _279()]);
|
|
5210
5253
|
if (_optionalChain([options, 'optionalAccess', _280 => _280.idempotencyKey]) !== void 0 && !idempotencyKey) {
|
|
5211
|
-
throw new (0,
|
|
5254
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5212
5255
|
"runs.rerun idempotencyKey must not be empty.",
|
|
5213
5256
|
void 0,
|
|
5214
5257
|
"INVALID_IDEMPOTENCY_KEY"
|
|
@@ -5244,14 +5287,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5244
5287
|
*/
|
|
5245
5288
|
async getRunLogs(runId, options) {
|
|
5246
5289
|
if (_optionalChain([options, 'optionalAccess', _282 => _282.all]) === true && options.failed === true) {
|
|
5247
|
-
throw new (0,
|
|
5290
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5248
5291
|
"runs.logs cannot combine all and failed views.",
|
|
5249
5292
|
void 0,
|
|
5250
5293
|
"INVALID_RUN_LOG_VIEW"
|
|
5251
5294
|
);
|
|
5252
5295
|
}
|
|
5253
5296
|
if (_optionalChain([options, 'optionalAccess', _283 => _283.cursor]) !== void 0 && options.failed === true) {
|
|
5254
|
-
throw new (0,
|
|
5297
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5255
5298
|
"runs.logs cannot combine failed with cursor.",
|
|
5256
5299
|
void 0,
|
|
5257
5300
|
"INVALID_RUN_LOG_VIEW"
|
|
@@ -5401,7 +5444,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5401
5444
|
if (selection !== void 0) {
|
|
5402
5445
|
const runtime = normalizePlayRuntimeSelection(selection);
|
|
5403
5446
|
if (!runtime) {
|
|
5404
|
-
throw new (0,
|
|
5447
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5405
5448
|
"Run event queries require a valid Preview runtime selection.",
|
|
5406
5449
|
void 0,
|
|
5407
5450
|
"INVALID_RUNTIME_SELECTION"
|
|
@@ -5458,7 +5501,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5458
5501
|
if (options.runtime !== void 0) {
|
|
5459
5502
|
const runtime = normalizePlayRuntimeSelection(options.runtime);
|
|
5460
5503
|
if (!runtime) {
|
|
5461
|
-
throw new (0,
|
|
5504
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5462
5505
|
"runs.searchEvents runtime must be a valid Preview selection.",
|
|
5463
5506
|
void 0,
|
|
5464
5507
|
"INVALID_RUNTIME_SELECTION"
|
|
@@ -5527,7 +5570,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5527
5570
|
)
|
|
5528
5571
|
];
|
|
5529
5572
|
if (_optionalChain([result, 'access', _301 => _301.scope, 'optionalAccess', _302 => _302.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
|
|
5530
|
-
throw new (0,
|
|
5573
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5531
5574
|
`Run-scoped dataset export was not confirmed for ${requestedRunId}; no rows were returned to the caller. Update Deepline, then retry the same export command. Do not rerun the play.`,
|
|
5532
5575
|
void 0,
|
|
5533
5576
|
"RUN_EXPORT_SCOPE_MISMATCH",
|
|
@@ -5582,7 +5625,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5582
5625
|
}
|
|
5583
5626
|
);
|
|
5584
5627
|
if (dryRun && !isStopAllPlayRunsDryRunResult(result)) {
|
|
5585
|
-
throw new (0,
|
|
5628
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
5586
5629
|
"This Deepline server does not support runs stop-all --dry-run and performed a real stop-all. Update the server before using --dry-run.",
|
|
5587
5630
|
void 0,
|
|
5588
5631
|
"STOP_ALL_DRY_RUN_UNSUPPORTED"
|
|
@@ -5906,7 +5949,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5906
5949
|
}
|
|
5907
5950
|
if (!legacyTarget && name.toLowerCase() === "default") {
|
|
5908
5951
|
throw new Error(
|
|
5909
|
-
"Default is reserved for the
|
|
5952
|
+
"Default is reserved for the org default notification group."
|
|
5910
5953
|
);
|
|
5911
5954
|
}
|
|
5912
5955
|
const normalizedTargets = targets.map(
|
|
@@ -5982,7 +6025,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5982
6025
|
const connectionId = current.slackConnection.connectionId;
|
|
5983
6026
|
if (slackTargets.size > 0 && !connectionId) {
|
|
5984
6027
|
throw new Error(
|
|
5985
|
-
"Slack is not connected to this
|
|
6028
|
+
"Slack is not connected to this org. Connect it in Dashboard \u2192 Integrations, then retry."
|
|
5986
6029
|
);
|
|
5987
6030
|
}
|
|
5988
6031
|
const resolvedSlackTargets = await Promise.all(
|
|
@@ -6408,7 +6451,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6408
6451
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
6409
6452
|
_optionalChain([options, 'optionalAccess', _358 => _358.onProgress, 'optionalCall', _359 => _359(status)]);
|
|
6410
6453
|
}
|
|
6411
|
-
if (
|
|
6454
|
+
if (_chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
6412
6455
|
terminalObserved = status;
|
|
6413
6456
|
}
|
|
6414
6457
|
}
|
|
@@ -6428,7 +6471,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6428
6471
|
).catch(() => terminalObserved);
|
|
6429
6472
|
return playRunResultFromStatus(finalStatus, start, workflowId);
|
|
6430
6473
|
}
|
|
6431
|
-
throw new (0,
|
|
6474
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6432
6475
|
`Run watch for ${workflowId} ended before the run reached a terminal state.`,
|
|
6433
6476
|
void 0,
|
|
6434
6477
|
"PLAY_RUN_STREAM_ENDED",
|
|
@@ -6456,7 +6499,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6456
6499
|
async getBillingUsageEvent(requestId) {
|
|
6457
6500
|
const normalizedRequestId = requestId.trim();
|
|
6458
6501
|
if (normalizedRequestId.length === 0 || normalizedRequestId.length > 200 || normalizedRequestId !== requestId) {
|
|
6459
|
-
throw new (0,
|
|
6502
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6460
6503
|
"Usage request_id must contain 1\u2013200 characters with no leading or trailing whitespace.",
|
|
6461
6504
|
void 0,
|
|
6462
6505
|
"INVALID_USAGE_REQUEST_ID"
|
|
@@ -6467,7 +6510,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6467
6510
|
);
|
|
6468
6511
|
const event = _optionalChain([response, 'access', _362 => _362.entries, 'optionalAccess', _363 => _363[0]]);
|
|
6469
6512
|
if (!event) {
|
|
6470
|
-
throw new (0,
|
|
6513
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6471
6514
|
"No usage event was found for this request_id.",
|
|
6472
6515
|
void 0,
|
|
6473
6516
|
"USAGE_EVENT_NOT_FOUND"
|
|
@@ -6481,7 +6524,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6481
6524
|
*/
|
|
6482
6525
|
async getBillingUsageEvents(options = {}) {
|
|
6483
6526
|
const invalid2 = (message) => {
|
|
6484
|
-
throw new (0,
|
|
6527
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6485
6528
|
message,
|
|
6486
6529
|
void 0,
|
|
6487
6530
|
"INVALID_USAGE_EVENTS_OPTIONS"
|
|
@@ -6539,14 +6582,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6539
6582
|
if (options.requestId !== void 0) {
|
|
6540
6583
|
const requestId = options.requestId.trim();
|
|
6541
6584
|
if (requestId.length === 0 || requestId.length > 200 || requestId !== options.requestId) {
|
|
6542
|
-
throw new (0,
|
|
6585
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6543
6586
|
"Usage request_id must contain 1\u2013200 characters with no leading or trailing whitespace.",
|
|
6544
6587
|
void 0,
|
|
6545
6588
|
"INVALID_USAGE_REQUEST_ID"
|
|
6546
6589
|
);
|
|
6547
6590
|
}
|
|
6548
6591
|
if (options.runId !== void 0 || options.cursor !== void 0 || options.offset !== void 0) {
|
|
6549
|
-
throw new (0,
|
|
6592
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6550
6593
|
"requestId cannot be combined with runId, cursor, or offset.",
|
|
6551
6594
|
void 0,
|
|
6552
6595
|
"INVALID_USAGE_FILTERS"
|
|
@@ -6712,7 +6755,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6712
6755
|
/** Recover only the original workspace, credit amount, and purchase key; never charge. */
|
|
6713
6756
|
async recoverTargetBillingCreditPurchase(options) {
|
|
6714
6757
|
if (typeof options.idempotencyKey !== "string") {
|
|
6715
|
-
throw new (0,
|
|
6758
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6716
6759
|
"The original billing idempotencyKey is required.",
|
|
6717
6760
|
void 0,
|
|
6718
6761
|
"INVALID_BILLING_IDEMPOTENCY_KEY"
|
|
@@ -6722,14 +6765,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6722
6765
|
options.idempotencyKey
|
|
6723
6766
|
);
|
|
6724
6767
|
if (!Number.isSafeInteger(options.credits) || options.credits <= 0) {
|
|
6725
|
-
throw new (0,
|
|
6768
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6726
6769
|
"credits must be a positive safe integer.",
|
|
6727
6770
|
void 0,
|
|
6728
6771
|
"INVALID_CREDITS"
|
|
6729
6772
|
);
|
|
6730
6773
|
}
|
|
6731
6774
|
if (typeof options.orgId !== "string" || !options.orgId.trim() || options.orgId !== options.orgId.trim()) {
|
|
6732
|
-
throw new (0,
|
|
6775
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6733
6776
|
"The original orgId is required without surrounding whitespace.",
|
|
6734
6777
|
void 0,
|
|
6735
6778
|
"INVALID_ORG_ID"
|
|
@@ -6755,11 +6798,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6755
6798
|
{
|
|
6756
6799
|
action: options.action,
|
|
6757
6800
|
...options.action === "start_or_change" && options.billingEmail ? { billing_email: options.billingEmail } : {},
|
|
6758
|
-
...options.targetPlanSku ? { target_plan_sku: options.targetPlanSku } : {},
|
|
6801
|
+
...options.targetPlanSku ? { target_plan_sku: resolvePublicPlanSku(options.targetPlanSku) } : {},
|
|
6759
6802
|
...options.action === "start_or_change" && options.promoCode ? { promo_code: options.promoCode } : {},
|
|
6760
6803
|
// Sent only for an annual purchase, so a monthly request's body (and
|
|
6761
6804
|
// its idempotency hash) is unchanged.
|
|
6762
|
-
...options.action === "start_or_change" && options.billingInterval === "year" ? { billing_interval: "year" } : {}
|
|
6805
|
+
...options.action === "start_or_change" && options.billingInterval === "year" ? { billing_interval: "year" } : {},
|
|
6806
|
+
...options.action === "start_or_change" && options.paymentMethod === "invoice" ? { payment_method: "invoice" } : {}
|
|
6763
6807
|
},
|
|
6764
6808
|
{ "Idempotency-Key": idempotencyKey },
|
|
6765
6809
|
{ maxRetries: 0, exactUrlOnly: true }
|
|
@@ -6850,7 +6894,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6850
6894
|
async submitMonitorBatch(options) {
|
|
6851
6895
|
const idempotencyKey = options.idempotencyKey.trim();
|
|
6852
6896
|
if (!idempotencyKey) {
|
|
6853
|
-
throw new (0,
|
|
6897
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6854
6898
|
"Monitor batch idempotencyKey is required.",
|
|
6855
6899
|
void 0,
|
|
6856
6900
|
"INVALID_MONITOR_BATCH_IDEMPOTENCY_KEY"
|
|
@@ -6858,7 +6902,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6858
6902
|
}
|
|
6859
6903
|
if (options.kind === "deploy") {
|
|
6860
6904
|
if (!options.manifestNdjson.trim()) {
|
|
6861
|
-
throw new (0,
|
|
6905
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6862
6906
|
"Monitor batch deploy requires a non-empty NDJSON manifest.",
|
|
6863
6907
|
void 0,
|
|
6864
6908
|
"INVALID_MONITOR_BATCH_MANIFEST"
|
|
@@ -6904,7 +6948,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6904
6948
|
async getMonitorBatch(operationId, options) {
|
|
6905
6949
|
const runId = operationId.trim();
|
|
6906
6950
|
if (!runId) {
|
|
6907
|
-
throw new (0,
|
|
6951
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
6908
6952
|
"Monitor batch operation id is required.",
|
|
6909
6953
|
void 0,
|
|
6910
6954
|
"INVALID_MONITOR_BATCH_OPERATION_ID"
|
|
@@ -7082,7 +7126,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7082
7126
|
}
|
|
7083
7127
|
async testMonitorWebhook(key, payload, options) {
|
|
7084
7128
|
if (_optionalChain([options, 'optionalAccess', _395 => _395.dispatch]) === true || _optionalChain([options, 'optionalAccess', _396 => _396.validationOnly]) === false) {
|
|
7085
|
-
throw new (0,
|
|
7129
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
7086
7130
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
7087
7131
|
void 0,
|
|
7088
7132
|
"MONITOR_TEST_DISPATCH_NOT_SUPPORTED"
|
|
@@ -7137,7 +7181,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7137
7181
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
7138
7182
|
async deleteMonitor(key, options) {
|
|
7139
7183
|
if (_optionalChain([options, 'optionalAccess', _397 => _397.localOnly]) === true) {
|
|
7140
|
-
throw new (0,
|
|
7184
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
7141
7185
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
7142
7186
|
void 0,
|
|
7143
7187
|
"MONITOR_LOCAL_ONLY_DELETE_NOT_SUPPORTED"
|
|
@@ -7402,7 +7446,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7402
7446
|
stalledRequests = remaining < remainingBefore ? 0 : stalledRequests + 1;
|
|
7403
7447
|
remainingBefore = remaining;
|
|
7404
7448
|
if (!(thisRequest > 0) || stalledRequests >= 2) {
|
|
7405
|
-
throw new (0,
|
|
7449
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
7406
7450
|
`Monitor Fleet '${fleetId}' commit made no progress in request ${attempt}. Re-run the same command to continue from where it stopped.`,
|
|
7407
7451
|
202,
|
|
7408
7452
|
"MONITOR_FLEET_COMMIT_STALLED",
|
|
@@ -7584,4 +7628,5 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7584
7628
|
|
|
7585
7629
|
|
|
7586
7630
|
|
|
7587
|
-
|
|
7631
|
+
|
|
7632
|
+
exports.PUBLIC_PLAN_SKUS = PUBLIC_PLAN_SKUS; exports.iterateCursorPages = iterateCursorPages; exports.requireBillingIdempotencyKey = requireBillingIdempotencyKey; exports.planCustomerDbQuery = planCustomerDbQuery; exports.validateExecutionIdempotencyKey = validateExecutionIdempotencyKey; exports.normalizePlayStatus = normalizePlayStatus; exports.PlayClient = PlayClient; exports.PRODUCT_NOTIFICATION_EVENT_CATALOG = PRODUCT_NOTIFICATION_EVENT_CATALOG; exports.resolveLegacySlackNotification = resolveLegacySlackNotification; exports.RUN_EVENT_SEARCH_KIND_VALUES = RUN_EVENT_SEARCH_KIND_VALUES; exports.logProvenanceReaches = logProvenanceReaches; exports.logLevelReaches = logLevelReaches; exports.parseLogLevel = parseLogLevel; exports.classifyLogLine = classifyLogLine; exports.isTransientPlayRunReadError = isTransientPlayRunReadError; exports.encodeRunLogsCursor = encodeRunLogsCursor; exports.isRunLogsCursor = isRunLogsCursor; exports.RunEventQueryInputError = RunEventQueryInputError; exports.normalizeRunEventOperationRequest = normalizeRunEventOperationRequest; exports.isStopAllPlayRunsDryRunResult = isStopAllPlayRunsDryRunResult; exports.MONITOR_JOB_STATES = MONITOR_JOB_STATES; exports.MONITOR_JOB_PHASES = MONITOR_JOB_PHASES; exports.MONITOR_JOB_RECONCILIATION_STATES = MONITOR_JOB_RECONCILIATION_STATES; exports.DeeplineClient = DeeplineClient;
|