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
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where one logical ctx.fetch spends its time, and the caller's deadline.
|
|
3
|
+
*
|
|
4
|
+
* A request waits inside Deepline before it reaches its destination: for the
|
|
5
|
+
* run's external-call slot, then for a generic HTTP pacing permit before every
|
|
6
|
+
* physical attempt. A wide map can queue hundreds of requests behind a lane
|
|
7
|
+
* paced at a few dozen per second, so those waits can last longer than the
|
|
8
|
+
* whole budget a caller gave the request with `AbortSignal.timeout(ms)`. The
|
|
9
|
+
* request would then time out without ever being sent.
|
|
10
|
+
*
|
|
11
|
+
* A caller's `init.signal` therefore means one of two things:
|
|
12
|
+
*
|
|
13
|
+
* - A timeout (its reason is named `TimeoutError`, as `AbortSignal.timeout`
|
|
14
|
+
* produces): a budget for the request itself. Its clock pauses while the
|
|
15
|
+
* request is queued inside Deepline. The timeout takes effect `queuedMs`
|
|
16
|
+
* after it fired, and never while the request is still queued.
|
|
17
|
+
* - Any other abort: a cancellation. It takes effect at once, queued or in
|
|
18
|
+
* flight.
|
|
19
|
+
*
|
|
20
|
+
* A signal that has already aborted when ctx.fetch is called takes effect at
|
|
21
|
+
* once, whatever its reason. Platform deadlines are separate and unchanged.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
export type CtxFetchWaitPhase = 'queued' | 'in_flight';
|
|
25
|
+
|
|
26
|
+
export type CtxFetchCallerAbortKind = 'caller_timeout' | 'caller_abort';
|
|
27
|
+
|
|
28
|
+
export type CtxFetchTimeSplit = {
|
|
29
|
+
/** Time spent waiting inside Deepline: slots, pacing permits, setup. */
|
|
30
|
+
queuedMs: number;
|
|
31
|
+
/** Time since the first physical dispatch; 0 if it was never sent. */
|
|
32
|
+
inFlightMs: number;
|
|
33
|
+
/** Where the request was when it ended. */
|
|
34
|
+
phase: CtxFetchWaitPhase;
|
|
35
|
+
/** Physical sends, redirect hops and retries included. */
|
|
36
|
+
sends: number;
|
|
37
|
+
/** Retries after a transport failure or HTTP backpressure; not redirects. */
|
|
38
|
+
retries: number;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
function isTimeoutReason(reason: unknown): boolean {
|
|
42
|
+
return (
|
|
43
|
+
typeof reason === 'object' &&
|
|
44
|
+
reason !== null &&
|
|
45
|
+
(reason as { name?: unknown }).name === 'TimeoutError'
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export class CtxFetchCallerDeadline {
|
|
50
|
+
/** The signal the transport observes in place of the caller's. */
|
|
51
|
+
readonly signal: AbortSignal | undefined;
|
|
52
|
+
readonly #controller: AbortController | null;
|
|
53
|
+
readonly #source: AbortSignal | null;
|
|
54
|
+
readonly #now: () => number;
|
|
55
|
+
readonly #onSourceAbort: (() => void) | null;
|
|
56
|
+
#queuedSince: number | null;
|
|
57
|
+
#queuedMs = 0;
|
|
58
|
+
#firstDispatchAt: number | null = null;
|
|
59
|
+
#queuedMsAtFirstDispatch = 0;
|
|
60
|
+
#sends = 0;
|
|
61
|
+
#retries = 0;
|
|
62
|
+
#timeoutFiredAt: number | null = null;
|
|
63
|
+
#timer: ReturnType<typeof setTimeout> | null = null;
|
|
64
|
+
#abortKind: CtxFetchCallerAbortKind | null = null;
|
|
65
|
+
#disposed = false;
|
|
66
|
+
|
|
67
|
+
constructor(
|
|
68
|
+
source: AbortSignal | null | undefined,
|
|
69
|
+
now: () => number = Date.now,
|
|
70
|
+
) {
|
|
71
|
+
this.#now = now;
|
|
72
|
+
// The request is queued from the moment ctx.fetch is called.
|
|
73
|
+
this.#queuedSince = now();
|
|
74
|
+
this.#source = source ?? null;
|
|
75
|
+
if (!this.#source) {
|
|
76
|
+
this.#controller = null;
|
|
77
|
+
this.#onSourceAbort = null;
|
|
78
|
+
this.signal = undefined;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.#controller = new AbortController();
|
|
82
|
+
this.signal = this.#controller.signal;
|
|
83
|
+
if (this.#source.aborted) {
|
|
84
|
+
this.#abort(
|
|
85
|
+
isTimeoutReason(this.#source.reason)
|
|
86
|
+
? 'caller_timeout'
|
|
87
|
+
: 'caller_abort',
|
|
88
|
+
);
|
|
89
|
+
this.#onSourceAbort = null;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.#onSourceAbort = () => {
|
|
93
|
+
if (!isTimeoutReason(this.#source?.reason)) {
|
|
94
|
+
this.#abort('caller_abort');
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
this.#timeoutFiredAt = this.#now();
|
|
98
|
+
this.#schedule();
|
|
99
|
+
};
|
|
100
|
+
this.#source.addEventListener('abort', this.#onSourceAbort, {
|
|
101
|
+
once: true,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** The request starts waiting inside Deepline (a pacing permit, a slot). */
|
|
106
|
+
enterQueue(): void {
|
|
107
|
+
if (this.#queuedSince !== null) return;
|
|
108
|
+
this.#queuedSince = this.#now();
|
|
109
|
+
this.#clearTimer();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** The request is handed to the network. */
|
|
113
|
+
dispatched(): void {
|
|
114
|
+
const now = this.#now();
|
|
115
|
+
this.#sends += 1;
|
|
116
|
+
if (this.#queuedSince !== null) {
|
|
117
|
+
this.#queuedMs += Math.max(0, now - this.#queuedSince);
|
|
118
|
+
this.#queuedSince = null;
|
|
119
|
+
}
|
|
120
|
+
if (this.#firstDispatchAt === null) {
|
|
121
|
+
this.#firstDispatchAt = now;
|
|
122
|
+
this.#queuedMsAtFirstDispatch = this.#queuedMs;
|
|
123
|
+
}
|
|
124
|
+
this.#schedule();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** The transport will send this logical request again. */
|
|
128
|
+
retried(): void {
|
|
129
|
+
this.#retries += 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** How the caller's signal ended the request, if it did. */
|
|
133
|
+
get abortKind(): CtxFetchCallerAbortKind | null {
|
|
134
|
+
return this.#abortKind;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
timeSplit(): CtxFetchTimeSplit {
|
|
138
|
+
const now = this.#now();
|
|
139
|
+
const queuedMs =
|
|
140
|
+
this.#queuedMs +
|
|
141
|
+
(this.#queuedSince === null ? 0 : Math.max(0, now - this.#queuedSince));
|
|
142
|
+
// Pacing waits before a retry or redirect hop are queue time, not flight.
|
|
143
|
+
const queuedAfterFirstDispatchMs = queuedMs - this.#queuedMsAtFirstDispatch;
|
|
144
|
+
return {
|
|
145
|
+
queuedMs,
|
|
146
|
+
inFlightMs:
|
|
147
|
+
this.#firstDispatchAt === null
|
|
148
|
+
? 0
|
|
149
|
+
: Math.max(
|
|
150
|
+
0,
|
|
151
|
+
now - this.#firstDispatchAt - queuedAfterFirstDispatchMs,
|
|
152
|
+
),
|
|
153
|
+
phase: this.#queuedSince === null ? 'in_flight' : 'queued',
|
|
154
|
+
sends: this.#sends,
|
|
155
|
+
retries: this.#retries,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
dispose(): void {
|
|
160
|
+
if (this.#disposed) return;
|
|
161
|
+
this.#disposed = true;
|
|
162
|
+
this.#clearTimer();
|
|
163
|
+
if (this.#onSourceAbort) {
|
|
164
|
+
this.#source?.removeEventListener('abort', this.#onSourceAbort);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
#schedule(): void {
|
|
169
|
+
this.#clearTimer();
|
|
170
|
+
if (
|
|
171
|
+
this.#disposed ||
|
|
172
|
+
this.#timeoutFiredAt === null ||
|
|
173
|
+
this.#queuedSince !== null ||
|
|
174
|
+
this.signal?.aborted
|
|
175
|
+
) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const delayMs = Math.max(
|
|
179
|
+
0,
|
|
180
|
+
this.#timeoutFiredAt + this.#queuedMs - this.#now(),
|
|
181
|
+
);
|
|
182
|
+
this.#timer = setTimeout(() => {
|
|
183
|
+
this.#timer = null;
|
|
184
|
+
this.#abort('caller_timeout');
|
|
185
|
+
}, delayMs);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
#abort(kind: CtxFetchCallerAbortKind): void {
|
|
189
|
+
if (!this.#controller || this.#controller.signal.aborted) return;
|
|
190
|
+
this.#abortKind = kind;
|
|
191
|
+
this.#clearTimer();
|
|
192
|
+
this.#controller.abort(this.#source?.reason);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
#clearTimer(): void {
|
|
196
|
+
if (this.#timer === null) return;
|
|
197
|
+
clearTimeout(this.#timer);
|
|
198
|
+
this.#timer = null;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -10,6 +10,7 @@ import type { PlayBundleArtifact } from '../plays/artifact-types';
|
|
|
10
10
|
import type { PlayRunContractSnapshot } from '../plays/contracts';
|
|
11
11
|
import type { PlayDatasetColumnTypes } from '../play-data-plane/contracts';
|
|
12
12
|
import type { PlayStructuredDefinition } from '../plays/definition';
|
|
13
|
+
import type { ExperimentSwitchOverrides } from './experiment-switches';
|
|
13
14
|
import type { PlayStaticPipeline } from '../plays/static-pipeline';
|
|
14
15
|
import type { PlayLogContext, PlayLogMetadata } from './log-context';
|
|
15
16
|
import type { ToolCallRetryFacts } from './tool-call-retry-facts';
|
|
@@ -937,6 +938,11 @@ export interface ContextOptions {
|
|
|
937
938
|
requestDurableInvocationFence?: boolean;
|
|
938
939
|
verifyDurableInvocationFence?: (signal?: AbortSignal) => Promise<boolean>;
|
|
939
940
|
runtimeTestFaultHeader?: string | null;
|
|
941
|
+
/**
|
|
942
|
+
* EXPERIMENT: the run's per-run switch overrides, for the switches the
|
|
943
|
+
* Context reads itself (SO1, PA1). Absent: every switch's static default.
|
|
944
|
+
*/
|
|
945
|
+
experimentSwitchOverrides?: ExperimentSwitchOverrides | null;
|
|
940
946
|
/** Runner-owned graceful deadline: stop new rows without aborting commits. */
|
|
941
947
|
rowAdmissionSignal?: AbortSignal;
|
|
942
948
|
/** Local runner cancellation; never serialized into a Play artifact. */
|
|
@@ -7,6 +7,18 @@
|
|
|
7
7
|
* invent an app, IP, queue, or controller relationship.
|
|
8
8
|
*/
|
|
9
9
|
export type RuntimeGatewayRole = 'receipt' | 'execution';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Early-sandbox hint relay target for the Production receipt gateway only:
|
|
13
|
+
* the Production worker app's private name and the hint path
|
|
14
|
+
* (`RUNTIME_WORKER_EARLY_SANDBOX_PATH`). A hint-only setting
|
|
15
|
+
* (`runtimeWorkerEarlySandboxTargetFromEnv`): terminal and generic worker wakes
|
|
16
|
+
* read `DEEPLINE_RUNTIME_WORKER_WAKE_URL`, which stays unset, so they are
|
|
17
|
+
* unchanged. Released Machines take their env from `gatewayMachineConfig`, not
|
|
18
|
+
* the app's toml `[env]`, so this is where the target must be declared.
|
|
19
|
+
*/
|
|
20
|
+
export const PRODUCTION_RUNTIME_WORKER_EARLY_SANDBOX_URL =
|
|
21
|
+
'http://deepline-absurd-worker-prod.internal:8787/internal/runtime-worker/early-sandbox';
|
|
10
22
|
export type RuntimeGatewayTopologyProfile = 'production' | 'preview';
|
|
11
23
|
/** Durable marker for capacity Machines owned by the execution relay scaler. */
|
|
12
24
|
export const RUNTIME_GATEWAY_AUTOSCALED_METADATA_KEY =
|
|
@@ -77,7 +89,15 @@ function gatewayMachine(
|
|
|
77
89
|
DEEPLINE_RUNTIME_GATEWAY_ROLE: role,
|
|
78
90
|
FLY_PROCESS_GROUP: 'app',
|
|
79
91
|
...(production
|
|
80
|
-
? {
|
|
92
|
+
? {
|
|
93
|
+
DEEPLINE_RUNTIME_JWKS_ORIGIN: 'https://code.deepline.com',
|
|
94
|
+
...(role === 'receipt'
|
|
95
|
+
? {
|
|
96
|
+
DEEPLINE_RUNTIME_WORKER_EARLY_SANDBOX_URL:
|
|
97
|
+
PRODUCTION_RUNTIME_WORKER_EARLY_SANDBOX_URL,
|
|
98
|
+
}
|
|
99
|
+
: {}),
|
|
100
|
+
}
|
|
81
101
|
: {
|
|
82
102
|
DEEPLINE_ENV: 'dev',
|
|
83
103
|
DEEPLINE_TEST_RUNTIME_SEAMS: '1',
|
|
@@ -6,6 +6,7 @@ export {
|
|
|
6
6
|
} from './durable-tool-identity';
|
|
7
7
|
import {
|
|
8
8
|
normalizeTableNamespace,
|
|
9
|
+
normalizeToolIdForIdentity,
|
|
9
10
|
sha256Hex,
|
|
10
11
|
stableStringify,
|
|
11
12
|
// The SDK pack adapter rewrites this workspace import to the preserved
|
|
@@ -133,7 +134,7 @@ function buildDurableToolCallCacheKeyWithPresentation(input: {
|
|
|
133
134
|
orgId,
|
|
134
135
|
playLocalScope,
|
|
135
136
|
toolId,
|
|
136
|
-
normalizedToolId:
|
|
137
|
+
normalizedToolId: normalizeToolIdForIdentity(toolId),
|
|
137
138
|
requestInput: input.requestInput,
|
|
138
139
|
authScopeDigest: input.authScopeDigest ?? null,
|
|
139
140
|
providerActionVersion,
|
|
@@ -152,7 +153,7 @@ function buildDurableToolCallCacheKeyWithPresentation(input: {
|
|
|
152
153
|
}),
|
|
153
154
|
}),
|
|
154
155
|
);
|
|
155
|
-
return `ctx:${orgId}:call:tool:${
|
|
156
|
+
return `ctx:${orgId}:call:tool:${normalizeToolIdForIdentity(toolId)}:${digest}`;
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
export function buildDurableCtxCallCacheKey(input: {
|
|
@@ -50,6 +50,7 @@ export type PlayCallFactsSource = (typeof PLAY_CALL_FACTS_SOURCES)[number];
|
|
|
50
50
|
|
|
51
51
|
/** The kind of error a call hit, for the dashboards' provider · error series. */
|
|
52
52
|
export const PLAY_CALL_ERROR_KINDS = [
|
|
53
|
+
'integration_refresh_refused',
|
|
53
54
|
'rate_limit_provider',
|
|
54
55
|
'rate_limit_deepline',
|
|
55
56
|
'provider_5xx',
|
|
@@ -66,12 +67,29 @@ export const PLAY_CALL_ERROR_KINDS = [
|
|
|
66
67
|
] as const;
|
|
67
68
|
export type PlayCallErrorKind = (typeof PLAY_CALL_ERROR_KINDS)[number];
|
|
68
69
|
|
|
70
|
+
/**
|
|
71
|
+
* Whose deadline or abort ended a ctx.fetch: the caller's
|
|
72
|
+
* `AbortSignal.timeout`, the caller's explicit abort, or the platform's own
|
|
73
|
+
* fetch deadline. Null for every other call.
|
|
74
|
+
*/
|
|
75
|
+
export const PLAY_FETCH_ABORT_KINDS = [
|
|
76
|
+
'caller_timeout',
|
|
77
|
+
'caller_abort',
|
|
78
|
+
'platform_timeout',
|
|
79
|
+
] as const;
|
|
80
|
+
export type PlayFetchAbortKind = (typeof PLAY_FETCH_ABORT_KINDS)[number];
|
|
81
|
+
|
|
82
|
+
/** Where an aborted ctx.fetch was: waiting inside Deepline, or sent. */
|
|
83
|
+
export const PLAY_FETCH_ENDED_PHASES = ['queued', 'in_flight'] as const;
|
|
84
|
+
export type PlayFetchEndedPhase = (typeof PLAY_FETCH_ENDED_PHASES)[number];
|
|
85
|
+
|
|
69
86
|
export const PLAY_RUN_OUTCOMES = ['completed', 'failed'] as const;
|
|
70
87
|
export type PlayRunOutcome = (typeof PLAY_RUN_OUTCOMES)[number];
|
|
71
88
|
|
|
72
89
|
/** Why a run failed. A completed run's cause is `none`. */
|
|
73
90
|
export const PLAY_RUN_CAUSES = [
|
|
74
91
|
'none',
|
|
92
|
+
'integration_refresh_refused',
|
|
75
93
|
'customer_code',
|
|
76
94
|
'billing_credit',
|
|
77
95
|
'provider_4xx',
|
|
@@ -144,6 +162,7 @@ function status(value: unknown): number | null {
|
|
|
144
162
|
* failure's structured fields. Absent fields are null.
|
|
145
163
|
*/
|
|
146
164
|
export function playCallErrorKind(input: {
|
|
165
|
+
code?: string | null;
|
|
147
166
|
reason: ToolCallRetryReason | null;
|
|
148
167
|
status: number | null;
|
|
149
168
|
origin: ToolCallErrorOrigin | null;
|
|
@@ -153,6 +172,11 @@ export function playCallErrorKind(input: {
|
|
|
153
172
|
runtimeError: boolean;
|
|
154
173
|
}): PlayCallErrorKind {
|
|
155
174
|
const { reason, status: httpStatus, origin, category } = input;
|
|
175
|
+
// A refresh may have consumed its token. The outcome is uncertain, neither a
|
|
176
|
+
// proven database outage nor a proven rejected authorization.
|
|
177
|
+
if (input.code === 'INTEGRATION_OAUTH_REFRESH_FAILED_CLOSED') {
|
|
178
|
+
return 'integration_refresh_refused';
|
|
179
|
+
}
|
|
156
180
|
if (reason === 'hard_billing_error' || category === 'billing') {
|
|
157
181
|
return 'billing';
|
|
158
182
|
}
|
|
@@ -168,6 +192,10 @@ export function playCallErrorKind(input: {
|
|
|
168
192
|
case 'customer_db_storage_unavailable':
|
|
169
193
|
// Deepline's billing store was unavailable; nothing was sent.
|
|
170
194
|
case 'billing_unavailable_before_dispatch':
|
|
195
|
+
// The runtime gateway could not fetch its signing keys; nothing was sent.
|
|
196
|
+
case 'runtime_jwks_unavailable':
|
|
197
|
+
// The app's account-access cutoff could not verify the caller; nothing ran.
|
|
198
|
+
case 'account_access_unavailable':
|
|
171
199
|
case 'idempotency_in_progress':
|
|
172
200
|
case 'gateway_invocation_in_progress':
|
|
173
201
|
return 'platform';
|
|
@@ -250,6 +278,14 @@ export type DurableCallSummary = {
|
|
|
250
278
|
errorCategory: ToolCategory | null;
|
|
251
279
|
errorOrigin: ToolCallErrorOrigin | null;
|
|
252
280
|
errorStatus: number | null;
|
|
281
|
+
/** ctx.fetch only: whose timeout or abort ended it. */
|
|
282
|
+
fetchAbortKind: PlayFetchAbortKind | null;
|
|
283
|
+
/** ctx.fetch only: where it was when it ended. */
|
|
284
|
+
fetchEndedPhase: PlayFetchEndedPhase | null;
|
|
285
|
+
/** ctx.fetch only: time waiting inside Deepline (slots, pacing permits). */
|
|
286
|
+
queuedMs: number | null;
|
|
287
|
+
/** ctx.fetch only: time since its first physical send, less later waits. */
|
|
288
|
+
inFlightMs: number | null;
|
|
253
289
|
/** The record's own text, for an exact dedupe key (`eventId`). */
|
|
254
290
|
recordText: string;
|
|
255
291
|
};
|
|
@@ -353,8 +389,25 @@ export function durableCallSummaryFromRunLogLine(
|
|
|
353
389
|
? token(record.error_network_kind, CLASS_NAME)
|
|
354
390
|
: null;
|
|
355
391
|
|
|
392
|
+
const fetchAbortKind = failed
|
|
393
|
+
? oneOf(record.abort_kind, PLAY_FETCH_ABORT_KINDS)
|
|
394
|
+
: null;
|
|
395
|
+
const fetchEndedPhase =
|
|
396
|
+
fetchAbortKind === null
|
|
397
|
+
? null
|
|
398
|
+
: oneOf(record.ended_phase, PLAY_FETCH_ENDED_PHASES);
|
|
399
|
+
|
|
356
400
|
let errorKind: PlayCallErrorKind;
|
|
357
|
-
if (
|
|
401
|
+
if (fetchAbortKind !== null) {
|
|
402
|
+
// A timeout that ended a request still queued inside Deepline is
|
|
403
|
+
// Deepline's pacing; one that ended it in flight is the network's.
|
|
404
|
+
errorKind =
|
|
405
|
+
fetchAbortKind === 'caller_abort'
|
|
406
|
+
? 'other'
|
|
407
|
+
: fetchEndedPhase === 'queued'
|
|
408
|
+
? 'rate_limit_deepline'
|
|
409
|
+
: 'timeout_network';
|
|
410
|
+
} else if (outcome === 'recovered') {
|
|
358
411
|
// What the call recovered from: the failure that caused its first retry.
|
|
359
412
|
errorKind = playCallErrorKind({
|
|
360
413
|
reason: firstRetryReason,
|
|
@@ -375,6 +428,7 @@ export function durableCallSummaryFromRunLogLine(
|
|
|
375
428
|
// classification when the final error came from an HTTP response.
|
|
376
429
|
errorKind = playCallErrorKind({
|
|
377
430
|
reason: lastErrorReason,
|
|
431
|
+
code: errorCode,
|
|
378
432
|
status: errorStatus ?? lastErrorStatus,
|
|
379
433
|
origin: errorOrigin ?? lastErrorOrigin,
|
|
380
434
|
category: errorCategory,
|
|
@@ -417,6 +471,10 @@ export function durableCallSummaryFromRunLogLine(
|
|
|
417
471
|
errorCategory,
|
|
418
472
|
errorOrigin,
|
|
419
473
|
errorStatus,
|
|
474
|
+
fetchAbortKind,
|
|
475
|
+
fetchEndedPhase,
|
|
476
|
+
queuedMs: fetchAbortKind === null ? null : count(record.queued_ms),
|
|
477
|
+
inFlightMs: fetchAbortKind === null ? null : count(record.in_flight_ms),
|
|
420
478
|
recordText: tagged.line,
|
|
421
479
|
};
|
|
422
480
|
}
|
|
@@ -468,6 +526,10 @@ export function emitPlayCallFinished(input: {
|
|
|
468
526
|
errorCategory: call.errorCategory,
|
|
469
527
|
errorOrigin: call.errorOrigin,
|
|
470
528
|
errorStatus: call.errorStatus,
|
|
529
|
+
fetchAbortKind: call.fetchAbortKind,
|
|
530
|
+
fetchEndedPhase: call.fetchEndedPhase,
|
|
531
|
+
queuedMs: call.queuedMs,
|
|
532
|
+
inFlightMs: call.inFlightMs,
|
|
471
533
|
},
|
|
472
534
|
});
|
|
473
535
|
}
|
|
@@ -506,12 +568,18 @@ const CUSTOMER_CODE_CODES: ReadonlySet<string> = new Set([
|
|
|
506
568
|
export function playRunFailureCause(
|
|
507
569
|
details: Pick<
|
|
508
570
|
PlayRunFailureDetails,
|
|
509
|
-
'code' | 'phase' | 'origin' | 'category' | 'name'
|
|
571
|
+
'code' | 'phase' | 'origin' | 'category' | 'name' | 'toolCode'
|
|
510
572
|
> | null,
|
|
511
573
|
): PlayRunCause {
|
|
512
574
|
if (!details) return 'unknown';
|
|
513
575
|
const code = typeof details.code === 'string' ? details.code : '';
|
|
514
576
|
const name = typeof details.name === 'string' ? details.name : '';
|
|
577
|
+
if (
|
|
578
|
+
code === 'INTEGRATION_OAUTH_REFRESH_FAILED_CLOSED' ||
|
|
579
|
+
details.toolCode === 'INTEGRATION_OAUTH_REFRESH_FAILED_CLOSED'
|
|
580
|
+
) {
|
|
581
|
+
return 'integration_refresh_refused';
|
|
582
|
+
}
|
|
515
583
|
if (code.startsWith('DURABLE_REPLAY_') || name.startsWith('DurableReplay')) {
|
|
516
584
|
return 'durability_refusal';
|
|
517
585
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
normalizeToolIdForIdentity,
|
|
3
3
|
sha256Hex,
|
|
4
4
|
stableStringify,
|
|
5
5
|
} from '../plays/row-identity';
|
|
@@ -27,7 +27,7 @@ export function buildDurableToolReceiptPrefix(input: {
|
|
|
27
27
|
if (!toolId) {
|
|
28
28
|
throw new Error('Durable tool receipt prefix requires a non-empty toolId.');
|
|
29
29
|
}
|
|
30
|
-
return `ctx:${orgId}:call:tool:${
|
|
30
|
+
return `ctx:${orgId}:call:tool:${normalizeToolIdForIdentity(toolId)}:`;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -56,7 +56,7 @@ export function buildDurableToolPayloadProviderIdempotencyKey(input: {
|
|
|
56
56
|
?.map((identity) => identity.trim())
|
|
57
57
|
.filter(Boolean);
|
|
58
58
|
const orgId = input.orgId?.trim() || 'org';
|
|
59
|
-
return `ctx:${orgId}:operation:tool:${
|
|
59
|
+
return `ctx:${orgId}:operation:tool:${normalizeToolIdForIdentity(toolId)}:payload-v1:${sha256Hex(
|
|
60
60
|
stableStringify({
|
|
61
61
|
executionAuthScopeDigest: input.executionAuthScopeDigest?.trim() || null,
|
|
62
62
|
providerActionVersion: input.providerActionVersion?.trim() || null,
|
|
@@ -75,6 +75,11 @@ export type RuntimeAuthorityDescriptor = {
|
|
|
75
75
|
/** Exact workspace Calendar connection authorized at root run admission. */
|
|
76
76
|
calendarBookingBinding?: CalendarBookingBinding;
|
|
77
77
|
orgId: string;
|
|
78
|
+
/**
|
|
79
|
+
* The run's team inside the org (org-teams-scim design, Phase 4a). Absent
|
|
80
|
+
* or null is the org's default team, as on every launch before teams.
|
|
81
|
+
*/
|
|
82
|
+
teamId?: string | null;
|
|
78
83
|
workflowId: string;
|
|
79
84
|
runId: string;
|
|
80
85
|
billingRunId?: string | null;
|
|
@@ -179,6 +184,13 @@ export function hasRuntimeExecutionCapability(
|
|
|
179
184
|
return Array.isArray(values) && values.includes(capability);
|
|
180
185
|
}
|
|
181
186
|
|
|
187
|
+
/** A named team id, or undefined for the org's default team. */
|
|
188
|
+
export function normalizeRuntimeTeamId(value: unknown): string | undefined {
|
|
189
|
+
return typeof value === 'string' && value.trim() !== ''
|
|
190
|
+
? value.trim()
|
|
191
|
+
: undefined;
|
|
192
|
+
}
|
|
193
|
+
|
|
182
194
|
export function requireRuntimeAuthorityDescriptor(
|
|
183
195
|
value: unknown,
|
|
184
196
|
): RuntimeAuthorityDescriptor {
|
|
@@ -203,6 +215,9 @@ export function requireRuntimeAuthorityDescriptor(
|
|
|
203
215
|
(entry) => typeof entry !== 'string' || entry.trim().length === 0,
|
|
204
216
|
) ||
|
|
205
217
|
capabilities.length === 0 ||
|
|
218
|
+
(descriptor.teamId !== undefined &&
|
|
219
|
+
descriptor.teamId !== null &&
|
|
220
|
+
typeof descriptor.teamId !== 'string') ||
|
|
206
221
|
(descriptor.operationPolicy !== undefined &&
|
|
207
222
|
!isExecutionOperationPolicy(descriptor.operationPolicy)) ||
|
|
208
223
|
(descriptor.calendarBookingBinding !== undefined &&
|
|
@@ -221,6 +236,7 @@ export function requireRuntimeAuthorityDescriptor(
|
|
|
221
236
|
? { operationPolicy: descriptor.operationPolicy }
|
|
222
237
|
: {}),
|
|
223
238
|
orgId: descriptor.orgId!,
|
|
239
|
+
teamId: normalizeRuntimeTeamId(descriptor.teamId),
|
|
224
240
|
workflowId: descriptor.workflowId!,
|
|
225
241
|
runId: descriptor.runId!,
|
|
226
242
|
billingRunId: descriptor.billingRunId ?? null,
|
|
@@ -192,6 +192,23 @@ export const EXPERIMENT_SWITCHES = {
|
|
|
192
192
|
},
|
|
193
193
|
],
|
|
194
194
|
},
|
|
195
|
+
LH: {
|
|
196
|
+
perRun: true,
|
|
197
|
+
summary:
|
|
198
|
+
"With E2, the gateway sends the run's early-sandbox hint only to the worker currently listening for the run's release queue, bound to its leadership generation and one free slot; no claim gate (gateway and worker).",
|
|
199
|
+
constants: [
|
|
200
|
+
{
|
|
201
|
+
file: 'packages/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts',
|
|
202
|
+
name: 'EARLY_SANDBOX_LISTENER_HINT',
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
},
|
|
206
|
+
EN: {
|
|
207
|
+
perRun: true,
|
|
208
|
+
summary:
|
|
209
|
+
"With E2 and no sidecar, the early sandbox carries a narrowed allowlist (each gateway IPv4 as /32, contained in the deployment's and stable 30 min); only a launch whose own fresh derivation gives the same list adopts it, and every fallback create keeps the deployment's allowlist (worker).",
|
|
210
|
+
constants: [{ file: MODAL, name: 'NARROW_EARLY_SANDBOX_EGRESS' }],
|
|
211
|
+
},
|
|
195
212
|
V3: {
|
|
196
213
|
perRun: true,
|
|
197
214
|
summary:
|
|
@@ -203,6 +220,17 @@ export const EXPERIMENT_SWITCHES = {
|
|
|
203
220
|
},
|
|
204
221
|
],
|
|
205
222
|
},
|
|
223
|
+
PG: {
|
|
224
|
+
perRun: true,
|
|
225
|
+
summary:
|
|
226
|
+
'Start every run before its run.created projection; run-scoped app reads authorize from the signed token and the Postgres admission (admission launch plan).',
|
|
227
|
+
constants: [
|
|
228
|
+
{
|
|
229
|
+
file: 'apps/deepline-api/src/lib/plays/launch/plan.ts',
|
|
230
|
+
name: 'START_RUNS_BEFORE_RUN_PROJECTION',
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
},
|
|
206
234
|
F3: {
|
|
207
235
|
perRun: true,
|
|
208
236
|
summary:
|
|
@@ -214,6 +242,39 @@ export const EXPERIMENT_SWITCHES = {
|
|
|
214
242
|
},
|
|
215
243
|
],
|
|
216
244
|
},
|
|
245
|
+
N1: {
|
|
246
|
+
perRun: true,
|
|
247
|
+
summary:
|
|
248
|
+
'Inline baked launch: one Node process verifies the baked runner (verdict on the exec stdout, exit 98 on any non-ok verdict), materializes the payload and becomes the watchdog, instead of three Node starts in series (worker launch).',
|
|
249
|
+
constants: [
|
|
250
|
+
{
|
|
251
|
+
file: 'packages/play-runtime/runner-backends/backends/daytona-payload-transport.ts',
|
|
252
|
+
name: 'ONE_NODE_GUARDED_INLINE_LAUNCH',
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
},
|
|
256
|
+
SO1: {
|
|
257
|
+
perRun: true,
|
|
258
|
+
summary:
|
|
259
|
+
"Serialize each dataset row once on the runner: cell-meta bytes are charged per changed cell, a terminal row's size is measured once for every tracker, and a map-row write body is built from the rows' prepared JSON (runner).",
|
|
260
|
+
constants: [
|
|
261
|
+
{
|
|
262
|
+
file: 'packages/play-runtime/context.ts',
|
|
263
|
+
name: 'SERIALIZE_DATASET_ROWS_ONCE',
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
},
|
|
267
|
+
PA1: {
|
|
268
|
+
perRun: true,
|
|
269
|
+
summary:
|
|
270
|
+
'Admit an in-memory dataset one execution page at a time on the streaming path, so the rows of the first page run while later pages are admitted (runner).',
|
|
271
|
+
constants: [
|
|
272
|
+
{
|
|
273
|
+
file: 'packages/play-runtime/context.ts',
|
|
274
|
+
name: 'PIPELINE_ARRAY_DATASET_ADMISSION',
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
},
|
|
217
278
|
RH: {
|
|
218
279
|
perRun: false,
|
|
219
280
|
summary:
|
|
@@ -332,6 +393,17 @@ export const EXPERIMENT_SWITCHES = {
|
|
|
332
393
|
],
|
|
333
394
|
reason: 'billing: E4/F1 are uncertified, never per-run.',
|
|
334
395
|
},
|
|
396
|
+
SR: {
|
|
397
|
+
perRun: true,
|
|
398
|
+
summary:
|
|
399
|
+
"The runner's park-fence startup reads (every declared tool's metadata and auth-scope) go out as one GET instead of two per tool.",
|
|
400
|
+
constants: [
|
|
401
|
+
{
|
|
402
|
+
file: 'packages/play-runtime/scheduler-backends/absurd-runtime-worker.ts',
|
|
403
|
+
name: 'STARTUP_READS_IN_ONE_REQUEST',
|
|
404
|
+
},
|
|
405
|
+
],
|
|
406
|
+
},
|
|
335
407
|
} as const satisfies Record<string, ExperimentSwitchDefinition>;
|
|
336
408
|
|
|
337
409
|
/**
|
|
@@ -720,6 +720,7 @@ export function isReplaySafeFixtureToolId(toolId: string): boolean {
|
|
|
720
720
|
shouldRouteFixtureToolId(normalized) &&
|
|
721
721
|
normalized !== 'ai_inference' &&
|
|
722
722
|
normalized !== 'ai_evaluate' &&
|
|
723
|
+
normalized !== 'ai_decision' &&
|
|
723
724
|
normalized !== 'deeplineagent' &&
|
|
724
725
|
!normalized.startsWith('deeplineagent_')
|
|
725
726
|
);
|
|
@@ -79,7 +79,13 @@ export interface ResolvedExecutionPolicy {
|
|
|
79
79
|
readonly pacing: ExecutionPacingPolicy;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
// A run that asks for no cap keeps at most this many provider calls in flight.
|
|
83
|
+
// At 64 a 100-row waterfall could not run all its rows at once: per-run arms
|
|
84
|
+
// on the load lane (round 44681005917, cap 64 against 100 run by run on one
|
|
85
|
+
// deployment) measured waterfall-100 -3.5 s (29.6 s from 33.1 s) and a
|
|
86
|
+
// 300-row billed batch -5.7 s at 100. Provider pacing and per-provider
|
|
87
|
+
// concurrency still bound each provider below this.
|
|
88
|
+
export const DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS = 100;
|
|
83
89
|
// A 1,000-row Play may legitimately need 1,000 resident provider calls to
|
|
84
90
|
// sustain a declared start rate while responses are slow. This is a validated
|
|
85
91
|
// opt-in ceiling, not the default transport load: short runtime-to-app fetches
|