deepline 0.3.552 → 0.3.554
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +107 -12
- package/dist/bundling-sources/sdk/src/compat.ts +239 -87
- package/dist/bundling-sources/sdk/src/config.ts +113 -2
- package/dist/bundling-sources/sdk/src/errors.ts +2 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +118 -8
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
- package/dist/bundling-sources/sdk/src/play.ts +3 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +8 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
- package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
- package/dist/bundling-sources/sdk/src/types.ts +9 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
- package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
- package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
- package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +9 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +168 -41
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
- package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
- package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +444 -39
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
- package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +254 -44
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +259 -52
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
- package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
- package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
- package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
- package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
- package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
- package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
- package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
- package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
- package/dist/cli/{auth-KVSBJZOX.mjs → auth-HJUNW7T2.mjs} +8 -7
- package/dist/cli/auth-SP6SKZJZ.js +44 -0
- package/dist/cli/{billing-FQREA7UA.js → billing-4TSA5HEC.js} +297 -161
- package/dist/cli/{billing-54RHFEBI.mjs → billing-SJYRJAQ2.mjs} +197 -61
- package/dist/cli/{chunk-4MK42735.js → chunk-2HMN5H54.js} +215 -130
- package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
- package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-2ORPFQUA.mjs} +18 -18
- package/dist/cli/{chunk-RQZQVFCJ.js → chunk-2OVHNHCF.js} +2 -2
- package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-33WRQSQ2.mjs} +1874 -91
- package/dist/cli/{chunk-UPMRIVZB.js → chunk-3IKGZ4CG.js} +74 -13
- package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-3Z4VFCXO.mjs} +8 -8
- package/dist/cli/{chunk-GKYAYLRI.js → chunk-4DOFGIEJ.js} +27 -31
- package/dist/cli/{chunk-4TALT2M3.mjs → chunk-52Q5KETX.mjs} +69 -3
- package/dist/cli/{chunk-RBEUVDZF.js → chunk-5CYZHOKI.js} +249 -107
- package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
- package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-62AUAWQV.mjs} +4 -4
- package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-62HWJXST.mjs} +17 -21
- package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-6EXOAT6T.mjs} +2 -2
- package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
- package/dist/cli/{chunk-ADRC5I3R.js → chunk-7OWI736E.js} +30 -30
- package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
- package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-B6HO2XWH.mjs} +13 -13
- package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-BOZAP2EM.mjs} +141 -56
- package/dist/cli/chunk-BVXIGOBZ.js +32 -0
- package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
- package/dist/cli/{chunk-WE5HES3H.mjs → chunk-D6Z6POKE.mjs} +151 -43
- package/dist/cli/{chunk-AZQ264ID.mjs → chunk-DSKSFFK2.mjs} +1 -1
- package/dist/cli/{chunk-SHLFOPD6.js → chunk-DUBXUAAO.js} +5 -5
- package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
- package/dist/cli/{chunk-HO3XK3R7.js → chunk-E74KGKFZ.js} +8 -8
- package/dist/cli/{chunk-77AAAGVB.js → chunk-ECHKAC7M.js} +2 -2
- package/dist/cli/{chunk-KWSH5T7K.js → chunk-EN5NHCCQ.js} +21 -21
- package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-F7CMRKSK.mjs} +1 -1
- package/dist/cli/{chunk-JWUAX6OP.js → chunk-FBAFX43W.js} +11 -11
- package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-FXQ3JKE3.mjs} +1 -1
- package/dist/cli/{chunk-QPKH23EC.mjs → chunk-GA2M3G3Y.mjs} +5 -5
- package/dist/cli/{chunk-G4O75EXF.js → chunk-GHT2NDL7.js} +18 -18
- package/dist/cli/{chunk-MF2GHZDO.js → chunk-GRZENGNE.js} +2 -2
- package/dist/cli/{chunk-4UUR4TCH.js → chunk-IVZKMJUK.js} +1875 -92
- package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-KVBQY4ST.mjs} +3 -3
- package/dist/cli/{chunk-S5S355UY.mjs → chunk-KZHBDMGF.mjs} +12 -12
- package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
- package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
- package/dist/cli/{chunk-2WFPHBR4.js → chunk-LY5MMXFF.js} +47 -29
- package/dist/cli/{chunk-BAIST2BR.js → chunk-M7STM3MZ.js} +36 -36
- package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
- package/dist/cli/{chunk-45PVGZST.js → chunk-OPTV7D2V.js} +508 -361
- package/dist/cli/{chunk-PFO3ISXA.js → chunk-OVEYWO4H.js} +174 -129
- package/dist/cli/{chunk-BGBJV26E.mjs → chunk-PC2FTUCP.mjs} +4 -4
- package/dist/cli/{chunk-WLN3SUIA.js → chunk-PQQMPUCZ.js} +3 -3
- package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-Q7ACILL2.mjs} +5 -5
- package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
- package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RBBTCYQB.mjs} +3 -3
- package/dist/cli/{chunk-F2LH7TGF.js → chunk-RTHMGSZX.js} +21 -21
- package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-S6W6SJ6E.mjs} +158 -16
- package/dist/cli/chunk-STXDSVQZ.mjs +32 -0
- package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-TGUQET3O.mjs} +67 -6
- package/dist/cli/{chunk-IHRKLXZN.js → chunk-TJ6HLN56.js} +5 -5
- package/dist/cli/{chunk-3FD5EQ62.js → chunk-TOO3YM5N.js} +6 -7
- package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UBBYHB2B.mjs} +2 -2
- package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-UC4BDZKI.mjs} +299 -69
- package/dist/cli/{chunk-634ZDA3F.js → chunk-UNNOZKRT.js} +1 -1
- package/dist/cli/{chunk-IDVVIXPJ.js → chunk-UOT7HPBH.js} +41 -41
- package/dist/cli/{chunk-6YCA5NKJ.js → chunk-UYCZFQYQ.js} +12 -12
- package/dist/cli/{chunk-7IKQKKNX.js → chunk-VIUUTEHY.js} +90 -24
- package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-VLO5NFH2.mjs} +63 -18
- package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-VQ75KX7G.mjs} +5 -5
- package/dist/cli/{chunk-4NQF6KJ3.js → chunk-VV4XGZ24.js} +13 -13
- package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
- package/dist/cli/{chunk-S46HWQKO.js → chunk-W6CZDTIR.js} +69 -69
- package/dist/cli/{chunk-XVB7V4N7.js → chunk-WL7P32PI.js} +161 -53
- package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-XD3MFTHA.mjs} +1 -1
- package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-XFZX6FNM.mjs} +40 -22
- package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-XU6QNM4D.mjs} +1 -1
- package/dist/cli/{chunk-QAORXEY3.mjs → chunk-YCOGPOUX.mjs} +6 -7
- package/dist/cli/{chunk-VQALXEXO.js → chunk-YQKCH4R7.js} +348 -118
- package/dist/cli/{chunk-6O5HOODW.mjs → chunk-YY55NYAH.mjs} +207 -60
- package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
- package/dist/cli/command-docs.js +3 -3
- package/dist/cli/command-docs.mjs +2 -2
- package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-O3Q5IPLF.mjs} +9 -8
- package/dist/cli/concurrent-runs-help-ZFRZWX5V.js +22 -0
- package/dist/cli/{csv-F5VAGX4K.js → csv-4ZQ2RATI.js} +16 -15
- package/dist/cli/{csv-2PTVDNO6.mjs → csv-Y3BFPEM6.mjs} +7 -6
- package/dist/cli/{db-IEDXAUF7.mjs → db-3JYY4JNN.mjs} +17 -17
- package/dist/cli/{db-Z3OIUFMM.js → db-VEIFS4M7.js} +45 -45
- package/dist/cli/describe-EVJ4MFVU.mjs +50 -0
- package/dist/cli/describe-FG625QPF.js +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +7 -7
- package/dist/cli/describe-core.mjs +6 -6
- package/dist/cli/{executions-H6H5655J.js → executions-HPZXOOVX.js} +12 -12
- package/dist/cli/{executions-R3LP74QN.mjs → executions-PCXZKEHM.mjs} +10 -10
- package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-Y6VKZNY6.mjs} +9 -8
- package/dist/cli/{feedback-VFOUR66B.js → feedback-ZKFHFVL6.js} +17 -16
- package/dist/cli/git-RUBMALLH.js +26 -0
- package/dist/cli/{git-YX2J4GCI.mjs → git-UMPR2QYC.mjs} +8 -7
- package/dist/cli/index.js +170 -158
- package/dist/cli/index.mjs +60 -48
- package/dist/cli/{integrations-E2JZYKHS.js → integrations-3GQCTRTF.js} +23 -27
- package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-V3TM6XAB.mjs} +15 -19
- package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-JZBUD7ZE.mjs} +9 -8
- package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-VYCO7NGW.js} +12 -11
- package/dist/cli/{mcp-UQV2K4EW.js → mcp-4OIWTCE6.js} +121 -48
- package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-PH4KZ76P.mjs} +100 -27
- package/dist/cli/{monitors-R3BBDCRC.js → monitors-E2A6VPBY.js} +221 -186
- package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-SSMGIDGX.mjs} +58 -23
- package/dist/cli/org-SFDKSK5D.mjs +2289 -0
- package/dist/cli/org-WUDZGWBT.js +2289 -0
- package/dist/cli/outcomes-QT7LQBPK.mjs +2865 -0
- package/dist/cli/outcomes-Y7SZTLSL.js +2865 -0
- package/dist/cli/{play-MDWPR4XG.mjs → play-EK7KSFPL.mjs} +376 -106
- package/dist/cli/{play-2MVO27VO.js → play-GDNHCRRR.js} +1150 -880
- package/dist/cli/{providers-AKDYFZJZ.mjs → providers-FVZLRXAU.mjs} +10 -10
- package/dist/cli/{providers-2AACRUZH.js → providers-ZKOSECLV.js} +13 -13
- package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-KSDKIXYD.js} +9 -8
- package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-UJZ6PIQV.mjs} +7 -6
- package/dist/cli/{run-RTSQNGRD.mjs → run-E7MZ7P35.mjs} +35 -33
- package/dist/cli/{run-2634REDK.js → run-PD2BBG6S.js} +55 -53
- package/dist/cli/run-identity-LMLFMACS.js +31 -0
- package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
- package/dist/cli/search-TKSPTPHA.js +32 -0
- package/dist/cli/{search-6AOJ4XPP.mjs → search-VTFUFTOY.mjs} +11 -11
- package/dist/cli/{search-output-S5ODBL5E.js → search-output-G2AGDCOY.js} +13 -12
- package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PFVXQCWA.mjs} +10 -9
- package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-7CIMEMX7.mjs} +11 -11
- package/dist/cli/{secrets-LHCIIHMT.js → secrets-BCOQ4U7U.js} +20 -20
- package/dist/cli/sessions-4CO556VD.js +23 -0
- package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-IUCQZEF7.mjs} +9 -8
- package/dist/cli/{settings-EBONWL5C.mjs → settings-KZN62UQK.mjs} +16 -16
- package/dist/cli/{settings-CP4FVK2W.js → settings-REL4736M.js} +89 -89
- package/dist/cli/{setup-I5AZE3IU.mjs → setup-2P7OG3OU.mjs} +22 -24
- package/dist/cli/{setup-LFGHTNLQ.js → setup-2XIVBBCS.js} +62 -64
- package/dist/cli/skills-JYT5DEY6.js +37 -0
- package/dist/cli/{skills-W76AO5XE.mjs → skills-VIGNDJKI.mjs} +10 -9
- package/dist/cli/tools-NTVUQ2TG.js +57 -0
- package/dist/cli/{tools-7IJHGF6W.mjs → tools-W3QT5EJY.mjs} +24 -24
- package/dist/cli/{update-GFOPZTHY.mjs → update-GZVBVMY3.mjs} +14 -11
- package/dist/cli/update-TWJZPUZM.js +37 -0
- package/dist/cli/{views-D4NX4SBG.mjs → views-BOGEH424.mjs} +47 -49
- package/dist/cli/{views-BPL2TQJ4.js → views-TOLJNLSV.js} +62 -64
- package/dist/cli/{workflow-ZYNAUCKC.js → workflow-ENWFRK5M.js} +23 -23
- package/dist/cli/{workflow-YXP42FUI.mjs → workflow-VDG2FDQV.mjs} +13 -13
- package/dist/{client-CyXGrO4D.d.mts → client-B8f7RNF8.d.mts} +1 -1
- package/dist/{client-Bf3IpUKN.d.ts → client-C5TgXmJQ.d.ts} +1 -1
- package/dist/{client-core-BxsLnXlm.d.mts → client-core-SLLGBTht.d.mts} +268 -23
- package/dist/{client-core-BWd0lX0Z.d.ts → client-core-p0sOxnkl.d.ts} +268 -23
- package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
- package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
- package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
- package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
- package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
- package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +66 -55
- package/dist/index.mjs +25 -14
- package/dist/install-integrity.json +163 -144
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +23 -4
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +4 -4
- package/dist/plays/run-request.mjs +3 -3
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +15 -13
- package/dist/server.mjs +9 -7
- package/package.json +1 -1
- package/dist/cli/auth-MMNVWATX.js +0 -43
- package/dist/cli/chunk-AID3OYVJ.js +0 -8
- package/dist/cli/chunk-OVDNJAJN.mjs +0 -8
- package/dist/cli/concurrent-runs-help-FQAIHKKC.js +0 -21
- package/dist/cli/describe-QDANCTS3.mjs +0 -50
- package/dist/cli/describe-VUTT5ZKU.js +0 -50
- package/dist/cli/git-ETB3GH3K.js +0 -25
- package/dist/cli/org-GRYVMNSW.js +0 -1282
- package/dist/cli/org-Z37NGJV4.mjs +0 -1282
- package/dist/cli/run-identity-G257GQED.js +0 -25
- package/dist/cli/search-VTW2YNBS.js +0 -32
- package/dist/cli/sessions-CJ4FJ2WB.js +0 -22
- package/dist/cli/skills-R7EBXREW.js +0 -36
- package/dist/cli/tools-V7U2BDXM.js +0 -57
- package/dist/cli/update-4COPZETK.js +0 -34
|
@@ -45,3 +45,63 @@ export function readStartupReadToolIds(value: unknown): string[] | null {
|
|
|
45
45
|
.slice(0, STARTUP_READ_TOOL_IDS_MAX);
|
|
46
46
|
return ids.length > 0 ? ids : null;
|
|
47
47
|
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The per-tool routes' own answer, carried verbatim: the HTTP status and the
|
|
51
|
+
* exact body text the route returned.
|
|
52
|
+
*/
|
|
53
|
+
export type RuntimeToolStartupReadAnswer = { status: number; body: string };
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Body of `PLAY_RUNTIME_TOOL_STARTUP_READS_PATH`: for each requested tool id,
|
|
57
|
+
* what `GET runtime-tools/<id>` and `GET runtime-tools/<id>/auth-scope` would
|
|
58
|
+
* have returned to the same executor token.
|
|
59
|
+
*/
|
|
60
|
+
export type RuntimeToolStartupReadsResponse = {
|
|
61
|
+
tools: Record<
|
|
62
|
+
string,
|
|
63
|
+
{
|
|
64
|
+
metadata: RuntimeToolStartupReadAnswer;
|
|
65
|
+
authScope: RuntimeToolStartupReadAnswer;
|
|
66
|
+
}
|
|
67
|
+
>;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/** Query parameter naming one tool; repeated once per tool. */
|
|
71
|
+
export const RUNTIME_TOOL_STARTUP_READS_TOOL_PARAM = 'toolId';
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The route's reader for its `toolId` parameters: 1 to 16 distinct, trimmed,
|
|
75
|
+
* non-empty ids in request order, or null for anything else (the route then
|
|
76
|
+
* answers 400 and the runner falls back to the per-tool reads).
|
|
77
|
+
*/
|
|
78
|
+
export function readRuntimeToolStartupReadsToolIds(
|
|
79
|
+
values: readonly string[],
|
|
80
|
+
): string[] | null {
|
|
81
|
+
const ids = values.map((id) => id.trim());
|
|
82
|
+
if (ids.length === 0 || ids.length > STARTUP_READ_TOOL_IDS_MAX) return null;
|
|
83
|
+
if (ids.some((id) => !id)) return null;
|
|
84
|
+
if (new Set(ids).size !== ids.length) return null;
|
|
85
|
+
return ids;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** One answer from a startup-reads body, or null when the body does not carry it. */
|
|
89
|
+
export function readRuntimeToolStartupReadAnswer(
|
|
90
|
+
body: unknown,
|
|
91
|
+
toolId: string,
|
|
92
|
+
kind: 'metadata' | 'authScope',
|
|
93
|
+
): RuntimeToolStartupReadAnswer | null {
|
|
94
|
+
if (!body || typeof body !== 'object') return null;
|
|
95
|
+
const tools = (body as { tools?: unknown }).tools;
|
|
96
|
+
if (!tools || typeof tools !== 'object') return null;
|
|
97
|
+
if (!Object.hasOwn(tools, toolId)) return null;
|
|
98
|
+
const entry = (tools as Record<string, unknown>)[toolId];
|
|
99
|
+
if (!entry || typeof entry !== 'object' || !Object.hasOwn(entry, kind))
|
|
100
|
+
return null;
|
|
101
|
+
const answer = (entry as Record<string, unknown>)[kind];
|
|
102
|
+
if (!answer || typeof answer !== 'object') return null;
|
|
103
|
+
const { status, body: text } = answer as { status?: unknown; body?: unknown };
|
|
104
|
+
return typeof status === 'number' && typeof text === 'string'
|
|
105
|
+
? { status, body: text }
|
|
106
|
+
: null;
|
|
107
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { getRuntimeEnv } from './runtime-env';
|
|
3
3
|
import type { PlayRunnerEvent } from './protocol';
|
|
4
|
+
import { isIsolatedRuntimeSchedulerSchema } from './runtime-scheduler-topology';
|
|
4
5
|
import {
|
|
5
6
|
runtimeTestFaultDrills,
|
|
6
7
|
type RuntimeTestFaultName,
|
|
@@ -557,3 +558,53 @@ export function parseRuntimeTestFaultCounts(input: {
|
|
|
557
558
|
headerValue,
|
|
558
559
|
};
|
|
559
560
|
}
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Preview fixture: a worker Machine whose LH listener status read answers 503,
|
|
564
|
+
* through the same path as a worker with no listener status. It gives a lane a
|
|
565
|
+
* mixed outcome set ({other_queue, http_503}) whose completion order varies,
|
|
566
|
+
* which the path warmer's change detector must treat as one outcome (#11436).
|
|
567
|
+
*
|
|
568
|
+
* Set per Machine by the lane operator (`flyctl machine update -e`), never by
|
|
569
|
+
* the release gate, so it reaches exactly one worker and is cleared the same
|
|
570
|
+
* way. Valid only on an isolated Preview scheduler schema with the Preview
|
|
571
|
+
* runtime marker; anywhere else, or with any other value, the worker refuses
|
|
572
|
+
* to boot rather than ignore it. Unset everywhere else: unchanged.
|
|
573
|
+
*/
|
|
574
|
+
export const PREVIEW_WORKER_LISTENER_STATUS_FAULT_ENV =
|
|
575
|
+
'DEEPLINE_PREVIEW_WORKER_LISTENER_STATUS_FAULT';
|
|
576
|
+
|
|
577
|
+
export type PreviewWorkerListenerStatusFault = 'http_503';
|
|
578
|
+
|
|
579
|
+
export function resolvePreviewWorkerListenerStatusFault(
|
|
580
|
+
env: Readonly<Record<string, string | undefined>>,
|
|
581
|
+
schedulerSchema: string | null | undefined,
|
|
582
|
+
): PreviewWorkerListenerStatusFault | null {
|
|
583
|
+
const raw = env[PREVIEW_WORKER_LISTENER_STATUS_FAULT_ENV]?.trim();
|
|
584
|
+
if (!raw) return null;
|
|
585
|
+
if (raw !== 'http_503') {
|
|
586
|
+
throw new Error(
|
|
587
|
+
`${PREVIEW_WORKER_LISTENER_STATUS_FAULT_ENV} must be http_503 or unset; got "${raw}".`,
|
|
588
|
+
);
|
|
589
|
+
}
|
|
590
|
+
if (
|
|
591
|
+
env.DEEPLINE_RUNTIME_ENVIRONMENT !== 'preview' ||
|
|
592
|
+
!isIsolatedRuntimeSchedulerSchema(schedulerSchema)
|
|
593
|
+
) {
|
|
594
|
+
throw new Error(
|
|
595
|
+
`${PREVIEW_WORKER_LISTENER_STATUS_FAULT_ENV} is valid only on an isolated Preview scheduler schema with DEEPLINE_RUNTIME_ENVIRONMENT=preview.`,
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
return 'http_503';
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* The line a faulted worker appends to its `/healthz` body, for an operator's
|
|
603
|
+
* manual readback of the fixture; empty (body unchanged) when absent. Fly
|
|
604
|
+
* checks read only the status code, which the fixture never changes.
|
|
605
|
+
*/
|
|
606
|
+
export function previewWorkerListenerStatusFaultHealthLine(
|
|
607
|
+
fault: PreviewWorkerListenerStatusFault | null,
|
|
608
|
+
): string {
|
|
609
|
+
return fault ? `preview-listener-status-fault=${fault}\n` : '';
|
|
610
|
+
}
|
|
@@ -28,6 +28,8 @@ export const TOOL_CALL_RETRY_REASONS = [
|
|
|
28
28
|
'gateway_invocation_in_progress',
|
|
29
29
|
'customer_db_storage_unavailable',
|
|
30
30
|
'billing_unavailable_before_dispatch',
|
|
31
|
+
'runtime_jwks_unavailable',
|
|
32
|
+
'account_access_unavailable',
|
|
31
33
|
'retry_safe_transient_5xx',
|
|
32
34
|
'edge_gateway_transient',
|
|
33
35
|
'unsafe_transient_5xx',
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { DURABLE_RUNS_ROLLOUT } from './durable-runs-rollout';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ACCOUNT_ACCESS_UNAVAILABLE_CODE,
|
|
4
|
+
RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS,
|
|
5
|
+
} from './runtime-constants';
|
|
3
6
|
import {
|
|
4
7
|
isHardBillingToolHttpError,
|
|
5
8
|
isHtmlErrorBody,
|
|
@@ -102,6 +105,21 @@ export const TOOL_EXECUTE_FENCED_PRE_DISPATCH_RATE_REFUSAL_MAX_ATTEMPTS =
|
|
|
102
105
|
// 2026-11-14, every one sent once and failed), so a short bounded wait
|
|
103
106
|
// recovers them: 1 s, 2 s, 4 s, 5 s between five sends.
|
|
104
107
|
export const TOOL_EXECUTE_BILLING_UNAVAILABLE_MAX_ATTEMPTS = 5;
|
|
108
|
+
// The runtime gateway could not fetch the key set that verifies executor or
|
|
109
|
+
// rate-scope tokens, so it refused the request before any provider request: at
|
|
110
|
+
// authentication, or at a dispatch-permit re-check that releases the claimed
|
|
111
|
+
// invocation as not dispatched first. A ~7-second key-set blip
|
|
112
|
+
// on 2026-11-20 failed six runs that each sent the call once; five sends with
|
|
113
|
+
// the same 1 s, 2 s, 4 s, 5 s waits cover it.
|
|
114
|
+
export const TOOL_EXECUTE_RUNTIME_JWKS_UNAVAILABLE_MAX_ATTEMPTS = 5;
|
|
115
|
+
export const TOOL_EXECUTE_RUNTIME_JWKS_UNAVAILABLE_CODE =
|
|
116
|
+
'RUNTIME_JWKS_UNAVAILABLE';
|
|
117
|
+
// The app's pre-route account-access cutoff could not verify the executor (a
|
|
118
|
+
// dependency failed) and answered 503 with `x-deepline-error-code:
|
|
119
|
+
// ACCOUNT_ACCESS_UNAVAILABLE` before any route handler ran. A ~9-second blip on
|
|
120
|
+
// 2026-11-24 failed 13 runs whose calls were refused this way. Six sends with
|
|
121
|
+
// 1 s, 2 s, 4 s, 5 s, 5 s waits (about 17 s) cover it.
|
|
122
|
+
export const TOOL_EXECUTE_ACCOUNT_ACCESS_UNAVAILABLE_MAX_ATTEMPTS = 6;
|
|
105
123
|
export const TOOL_EXECUTE_TRANSPORT_MAX_ATTEMPTS = 3;
|
|
106
124
|
export const TOOL_EXECUTE_TRANSPORT_RETRY_DELAY_MS = 1_000;
|
|
107
125
|
// A sandbox lost new connections for about 97 seconds on 2026-10-30, and each
|
|
@@ -297,6 +315,8 @@ export type ToolExecuteHttpRetryDecision = {
|
|
|
297
315
|
| 'gateway_invocation_in_progress'
|
|
298
316
|
| 'customer_db_storage_unavailable'
|
|
299
317
|
| 'billing_unavailable_before_dispatch'
|
|
318
|
+
| 'runtime_jwks_unavailable'
|
|
319
|
+
| 'account_access_unavailable'
|
|
300
320
|
| 'retry_safe_transient_5xx'
|
|
301
321
|
| 'edge_gateway_transient'
|
|
302
322
|
| 'unsafe_transient_5xx'
|
|
@@ -406,6 +426,8 @@ export type ToolExecuteHttpFailureAttemptTracker = {
|
|
|
406
426
|
transientHttpRetrySafe?: boolean;
|
|
407
427
|
executionFenced?: boolean;
|
|
408
428
|
providerServerErrorReplay?: ProviderServerErrorReplay;
|
|
429
|
+
/** The response's `x-deepline-error-code`. */
|
|
430
|
+
errorCodeHeader?: string | null;
|
|
409
431
|
}): number;
|
|
410
432
|
};
|
|
411
433
|
|
|
@@ -485,6 +507,40 @@ function isCustomerDbStorageUnavailableResponse(input: {
|
|
|
485
507
|
);
|
|
486
508
|
}
|
|
487
509
|
|
|
510
|
+
/**
|
|
511
|
+
* The runtime gateway's own refusal when it could not fetch the signing key set
|
|
512
|
+
* (`runtimeJwksUnavailableResponse`). Every gateway path that answers this code
|
|
513
|
+
* does so before any provider request: at executor-token authentication, before
|
|
514
|
+
* any invocation state, or at a dispatch-permit re-check inside a claimed
|
|
515
|
+
* invocation, which it first releases as not dispatched. So no provider request
|
|
516
|
+
* exists for this delivery. The app never emits the code.
|
|
517
|
+
*/
|
|
518
|
+
function isRuntimeJwksUnavailableResponse(input: {
|
|
519
|
+
status: number;
|
|
520
|
+
bodyText: string;
|
|
521
|
+
}): boolean {
|
|
522
|
+
if (input.status !== 503) return false;
|
|
523
|
+
return (
|
|
524
|
+
parseJsonObject(input.bodyText)?.code ===
|
|
525
|
+
TOOL_EXECUTE_RUNTIME_JWKS_UNAVAILABLE_CODE
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* The app's account-access cutoff refused before any route handler ran. Only
|
|
531
|
+
* the cutoff's header qualifies: an execute handler can return the same body
|
|
532
|
+
* code after its own work, so the body proves nothing.
|
|
533
|
+
*/
|
|
534
|
+
function isAccountAccessUnavailableExecuteResponse(input: {
|
|
535
|
+
status: number;
|
|
536
|
+
errorCodeHeader?: string | null;
|
|
537
|
+
}): boolean {
|
|
538
|
+
return (
|
|
539
|
+
input.status === 503 &&
|
|
540
|
+
input.errorCodeHeader === ACCOUNT_ACCESS_UNAVAILABLE_CODE
|
|
541
|
+
);
|
|
542
|
+
}
|
|
543
|
+
|
|
488
544
|
/**
|
|
489
545
|
* The app could not open this call's charge because the billing plane was
|
|
490
546
|
* unavailable, and says so before any provider dispatch. Only the explicit
|
|
@@ -635,7 +691,8 @@ export function providerServerErrorRetryDelayMs(input: {
|
|
|
635
691
|
* Backoff after the billing plane could not open a charge: 1 s, 2 s, 4 s, then
|
|
636
692
|
* 5 s, each with ±20% jitter so rows refused together during a billing outage
|
|
637
693
|
* do not resend together, or the app's Retry-After when it is longer, never
|
|
638
|
-
* above 5 s.
|
|
694
|
+
* above 5 s. A gateway signing-key outage and an app account-access outage
|
|
695
|
+
* use the same waits.
|
|
639
696
|
*/
|
|
640
697
|
export function billingUnavailableRetryDelayMs(input: {
|
|
641
698
|
attempt: number;
|
|
@@ -755,6 +812,10 @@ function decideToolExecuteHttpRetry(input: {
|
|
|
755
812
|
customerDbStorageUnavailable?: boolean;
|
|
756
813
|
/** `isBillingUnavailableBeforeDispatchResponse`. */
|
|
757
814
|
billingUnavailableBeforeDispatch?: boolean;
|
|
815
|
+
/** `isRuntimeJwksUnavailableResponse`. */
|
|
816
|
+
runtimeJwksUnavailable?: boolean;
|
|
817
|
+
/** `isAccountAccessUnavailableExecuteResponse`. */
|
|
818
|
+
accountAccessUnavailable?: boolean;
|
|
758
819
|
concurrencyBackpressure?: boolean;
|
|
759
820
|
runtimeSchedulerCapacity?: boolean;
|
|
760
821
|
providerPacingWait?: boolean;
|
|
@@ -862,6 +923,28 @@ function decideToolExecuteHttpRetry(input: {
|
|
|
862
923
|
reason: 'billing_unavailable_before_dispatch',
|
|
863
924
|
};
|
|
864
925
|
}
|
|
926
|
+
// The gateway refused before any provider request and holds no invocation
|
|
927
|
+
// for it (none opened, or released as not dispatched), so a resend of the
|
|
928
|
+
// same logical attempt, fenced or not, reaches the gateway as if for the
|
|
929
|
+
// first time.
|
|
930
|
+
if (input.runtimeJwksUnavailable) {
|
|
931
|
+
return {
|
|
932
|
+
retryable: true,
|
|
933
|
+
attemptCap: TOOL_EXECUTE_RUNTIME_JWKS_UNAVAILABLE_MAX_ATTEMPTS,
|
|
934
|
+
reason: 'runtime_jwks_unavailable',
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
// The app's cutoff refused before any route handler, so nothing reached a
|
|
938
|
+
// provider or the billing plane. Fenced or not: a fenced gateway releases
|
|
939
|
+
// its claim as not dispatched on this declared 503, so a resend of the same
|
|
940
|
+
// logical attempt reaches the gateway as if for the first time.
|
|
941
|
+
if (input.accountAccessUnavailable) {
|
|
942
|
+
return {
|
|
943
|
+
retryable: true,
|
|
944
|
+
attemptCap: TOOL_EXECUTE_ACCOUNT_ACCESS_UNAVAILABLE_MAX_ATTEMPTS,
|
|
945
|
+
reason: 'account_access_unavailable',
|
|
946
|
+
};
|
|
947
|
+
}
|
|
865
948
|
if (input.status >= 500 && input.status < 600) {
|
|
866
949
|
// A provider 5xx retries even when the response says it is not
|
|
867
950
|
// retryable: an API built before the owner's retry-all-5xx rule refused
|
|
@@ -951,6 +1034,8 @@ export function createToolExecuteHttpFailureAttemptTracker(): ToolExecuteHttpFai
|
|
|
951
1034
|
gateway_invocation_in_progress: 0,
|
|
952
1035
|
customer_db_storage_unavailable: 0,
|
|
953
1036
|
billing_unavailable_before_dispatch: 0,
|
|
1037
|
+
runtime_jwks_unavailable: 0,
|
|
1038
|
+
account_access_unavailable: 0,
|
|
954
1039
|
retry_safe_transient_5xx: 0,
|
|
955
1040
|
edge_gateway_transient: 0,
|
|
956
1041
|
unsafe_transient_5xx: 0,
|
|
@@ -988,6 +1073,14 @@ export function createToolExecuteHttpFailureAttemptTracker(): ToolExecuteHttpFai
|
|
|
988
1073
|
status: input.status,
|
|
989
1074
|
bodyText: input.bodyText ?? '',
|
|
990
1075
|
}),
|
|
1076
|
+
runtimeJwksUnavailable: isRuntimeJwksUnavailableResponse({
|
|
1077
|
+
status: input.status,
|
|
1078
|
+
bodyText: input.bodyText ?? '',
|
|
1079
|
+
}),
|
|
1080
|
+
accountAccessUnavailable: isAccountAccessUnavailableExecuteResponse({
|
|
1081
|
+
status: input.status,
|
|
1082
|
+
errorCodeHeader: input.errorCodeHeader,
|
|
1083
|
+
}),
|
|
991
1084
|
concurrencyBackpressure: isConcurrencyBackpressureResponse({
|
|
992
1085
|
status: input.status,
|
|
993
1086
|
bodyText: input.bodyText ?? '',
|
|
@@ -1051,6 +1144,8 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1051
1144
|
bodyText: string;
|
|
1052
1145
|
schemaVersion?: ToolExecutionErrorSchemaVersion;
|
|
1053
1146
|
retryAfterHeader?: string | null;
|
|
1147
|
+
/** The response's `x-deepline-error-code`; absent classifies from the body alone. */
|
|
1148
|
+
errorCodeHeader?: string | null;
|
|
1054
1149
|
/** Captured at response-header arrival; absent keeps the legacy header path. */
|
|
1055
1150
|
retryAtMs?: number;
|
|
1056
1151
|
transientHttpRetrySafe?: boolean;
|
|
@@ -1080,6 +1175,9 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1080
1175
|
isCustomerDbStorageUnavailableResponse(input);
|
|
1081
1176
|
const billingUnavailableBeforeDispatch =
|
|
1082
1177
|
isBillingUnavailableBeforeDispatchResponse(input);
|
|
1178
|
+
const runtimeJwksUnavailable = isRuntimeJwksUnavailableResponse(input);
|
|
1179
|
+
const accountAccessUnavailable =
|
|
1180
|
+
isAccountAccessUnavailableExecuteResponse(input);
|
|
1083
1181
|
const concurrencyBackpressure = isConcurrencyBackpressureResponse(input);
|
|
1084
1182
|
const runtimeSchedulerCapacity = isRuntimeSchedulerCapacityResponse(input);
|
|
1085
1183
|
const providerPacingWait = isProviderPacingWaitResponse(input);
|
|
@@ -1100,6 +1198,8 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1100
1198
|
gatewayInvocationInProgress,
|
|
1101
1199
|
customerDbStorageUnavailable,
|
|
1102
1200
|
billingUnavailableBeforeDispatch,
|
|
1201
|
+
runtimeJwksUnavailable,
|
|
1202
|
+
accountAccessUnavailable,
|
|
1103
1203
|
concurrencyBackpressure,
|
|
1104
1204
|
runtimeSchedulerCapacity,
|
|
1105
1205
|
providerPacingWait,
|
|
@@ -1175,6 +1275,8 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1175
1275
|
gatewayInvocationInProgress,
|
|
1176
1276
|
customerDbStorageUnavailable,
|
|
1177
1277
|
billingUnavailableBeforeDispatch,
|
|
1278
|
+
runtimeJwksUnavailable,
|
|
1279
|
+
accountAccessUnavailable,
|
|
1178
1280
|
concurrencyBackpressure,
|
|
1179
1281
|
runtimeSchedulerCapacity,
|
|
1180
1282
|
providerPacingWait,
|
|
@@ -1244,7 +1346,9 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1244
1346
|
TOOL_EXECUTE_RETRY_DELAY_FALLBACK_MS * input.attempt,
|
|
1245
1347
|
),
|
|
1246
1348
|
)
|
|
1247
|
-
: retryDecision.reason === 'billing_unavailable_before_dispatch'
|
|
1349
|
+
: retryDecision.reason === 'billing_unavailable_before_dispatch' ||
|
|
1350
|
+
retryDecision.reason === 'runtime_jwks_unavailable' ||
|
|
1351
|
+
retryDecision.reason === 'account_access_unavailable'
|
|
1248
1352
|
? billingUnavailableRetryDelayMs({
|
|
1249
1353
|
attempt: input.attempt,
|
|
1250
1354
|
retryAfterMs,
|
|
@@ -1330,6 +1434,10 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1330
1434
|
retryDecision.reason !== 'provider_pacing_wait' &&
|
|
1331
1435
|
// Billing refused before dispatch: a wait, not a failed provider call.
|
|
1332
1436
|
retryDecision.reason !== 'billing_unavailable_before_dispatch' &&
|
|
1437
|
+
// The gateway refused at authentication: a wait, not a failed call.
|
|
1438
|
+
retryDecision.reason !== 'runtime_jwks_unavailable' &&
|
|
1439
|
+
// The app refused at its account-access cutoff: a wait, not a failed call.
|
|
1440
|
+
retryDecision.reason !== 'account_access_unavailable' &&
|
|
1333
1441
|
// Bounded per call by its attempt cap, and each call already charges
|
|
1334
1442
|
// the tool-call budget. The run-wide retry budget is a runaway guard
|
|
1335
1443
|
// whose breach is run-fatal; a provider outage across a large map must
|
|
@@ -1355,6 +1463,8 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1355
1463
|
// operation that does not declare ordinary transient retry safety.
|
|
1356
1464
|
knownNotDispatched:
|
|
1357
1465
|
retryDecision.reason === 'billing_unavailable_before_dispatch' ||
|
|
1466
|
+
retryDecision.reason === 'runtime_jwks_unavailable' ||
|
|
1467
|
+
retryDecision.reason === 'account_access_unavailable' ||
|
|
1358
1468
|
runtimeSchedulerCapacity ||
|
|
1359
1469
|
concurrencyBackpressure ||
|
|
1360
1470
|
providerPacingWait ||
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
|
|
6
6
|
ToolExecutionError,
|
|
7
7
|
deserializeToolExecutionFailure,
|
|
8
|
-
|
|
8
|
+
structuredToolErrorName,
|
|
9
9
|
normalizeToolExecutionCategory,
|
|
10
10
|
normalizeToolExecutionOrigin,
|
|
11
11
|
type ToolExecutionErrorSchemaVersion,
|
|
@@ -146,9 +146,7 @@ class StructuredToolHttpError extends ToolExecutionError {
|
|
|
146
146
|
this.status = input.status;
|
|
147
147
|
this.receiptFailureKind = input.receiptFailureKind;
|
|
148
148
|
applyToolHttpErrorFields(this, input);
|
|
149
|
-
this.name =
|
|
150
|
-
? 'ProviderTransientError'
|
|
151
|
-
: 'ToolExecutionError';
|
|
149
|
+
this.name = structuredToolErrorName(this);
|
|
152
150
|
}
|
|
153
151
|
}
|
|
154
152
|
|
|
@@ -369,7 +367,7 @@ function formatInsufficientCreditsMessage(input: {
|
|
|
369
367
|
typeof minimum === 'number' &&
|
|
370
368
|
input.billing.required_credits === minimum
|
|
371
369
|
) {
|
|
372
|
-
return `Spendable workspace balance ${balance} credits is below the ${formatCreditAmount(minimum)}-credit workspace minimum for starting a billable call (${operation}); this is a workspace-wide minimum, separate from the tool's own price.${estimatedPrice} Spendable credits exclude pending
|
|
370
|
+
return `Spendable workspace balance ${balance} credits is below the ${formatCreditAmount(minimum)}-credit workspace minimum for starting a billable call (${operation}); this is a workspace-wide minimum, separate from the tool's own price.${estimatedPrice} Spendable credits exclude finalizing usage (usage incurred, final price pending) and can be lower than the posted balance shown by billing balance.${addSuffix}`;
|
|
373
371
|
}
|
|
374
372
|
// A required balance above the call's estimate is headroom, not a price.
|
|
375
373
|
if (
|
|
@@ -377,9 +375,9 @@ function formatInsufficientCreditsMessage(input: {
|
|
|
377
375
|
typeof input.billing.required_credits === 'number' &&
|
|
378
376
|
input.billing.required_credits > estimate
|
|
379
377
|
) {
|
|
380
|
-
return `Spendable workspace balance ${balance} credits is below the ${required}-credit balance required to start ${operation}; this is a required balance, not the price.${estimatedPrice} Spendable credits exclude pending
|
|
378
|
+
return `Spendable workspace balance ${balance} credits is below the ${required}-credit balance required to start ${operation}; this is a required balance, not the price.${estimatedPrice} Spendable credits exclude finalizing usage (usage incurred, final price pending) and can be lower than the posted balance shown by billing balance.${addSuffix}`;
|
|
381
379
|
}
|
|
382
|
-
return `Spendable workspace balance ${balance} credits < required ${required} for ${operation}. Spendable credits exclude pending
|
|
380
|
+
return `Spendable workspace balance ${balance} credits < required ${required} for ${operation}. Spendable credits exclude finalizing usage (usage incurred, final price pending) and can be lower than the posted balance shown by billing balance.${addSuffix}`;
|
|
383
381
|
}
|
|
384
382
|
|
|
385
383
|
/** An HTML document, as an edge proxy (Cloudflare, Vercel) serves for a 5xx. */
|
|
@@ -113,6 +113,8 @@ export const WORK_RECEIPT_TABLE_COLUMNS = [
|
|
|
113
113
|
['updated_at', 'timestamptz NOT NULL DEFAULT now()'],
|
|
114
114
|
] as const;
|
|
115
115
|
|
|
116
|
+
export const WORK_RECEIPT_KEY_INDEX = 'idx_deepline_step_receipts_k_unique';
|
|
117
|
+
|
|
116
118
|
/** The non-idempotent-work lock shares the receipt deployment boundary. */
|
|
117
119
|
export const WORK_RECEIPT_EXECUTION_LOCK_TABLE =
|
|
118
120
|
'_deepline_receipt_execution_locks';
|
|
@@ -114,6 +114,8 @@ export async function mintWorkflowExecutorToken(input: {
|
|
|
114
114
|
synthetic?: boolean | null;
|
|
115
115
|
actorUserId?: string | null;
|
|
116
116
|
actorEmail?: string | null;
|
|
117
|
+
/** The run's team; absent or null is the org's default team. */
|
|
118
|
+
teamId?: string | null;
|
|
117
119
|
schedulerSchema?: string | null;
|
|
118
120
|
runAttempt?: number | null;
|
|
119
121
|
resumeEpoch?: number | null;
|
|
@@ -139,6 +141,7 @@ export async function mintWorkflowExecutorToken(input: {
|
|
|
139
141
|
synthetic: input.synthetic,
|
|
140
142
|
actorUserId: input.actorUserId,
|
|
141
143
|
actorEmail: input.actorEmail,
|
|
144
|
+
teamId: input.teamId,
|
|
142
145
|
schedulerSchema: input.schedulerSchema,
|
|
143
146
|
runAttempt: input.runAttempt,
|
|
144
147
|
resumeEpoch: input.resumeEpoch,
|
|
@@ -725,6 +725,8 @@ export type PlayTriggersSummary = {
|
|
|
725
725
|
schedule: string;
|
|
726
726
|
timezone?: string;
|
|
727
727
|
input?: Record<string, unknown>;
|
|
728
|
+
/** Present only for the opt-in policy; absent means overlapping runs are allowed. */
|
|
729
|
+
overlap?: 'skip';
|
|
728
730
|
};
|
|
729
731
|
webhook?: true;
|
|
730
732
|
};
|
|
@@ -763,6 +765,7 @@ export function derivePlayTriggersSummary(
|
|
|
763
765
|
schedule: bindings.cron.schedule,
|
|
764
766
|
...(bindings.cron.timezone ? { timezone: bindings.cron.timezone } : {}),
|
|
765
767
|
...(bindings.cron.input ? { input: bindings.cron.input } : {}),
|
|
768
|
+
...(bindings.cron.overlap === 'skip' ? { overlap: 'skip' as const } : {}),
|
|
766
769
|
};
|
|
767
770
|
}
|
|
768
771
|
if (bindings.webhook) summary.webhook = true;
|
|
@@ -801,6 +804,8 @@ export type PlayAuthoringAstBindings = {
|
|
|
801
804
|
timezone?: string;
|
|
802
805
|
/** Static JSON object supplied to every run started by this cron binding. */
|
|
803
806
|
input?: Record<string, unknown>;
|
|
807
|
+
/** Omitted means `allow`. */
|
|
808
|
+
overlap?: PlayCronOverlapPolicy;
|
|
804
809
|
};
|
|
805
810
|
sqlListeners?: PlayAuthoringAstSqlListenerDeclaration[];
|
|
806
811
|
invalidSqlListenerSingular?: boolean;
|
|
@@ -826,7 +831,7 @@ export const PLAY_AUTHORING_BINDING_FIELDS = {
|
|
|
826
831
|
'sqlListeners',
|
|
827
832
|
'webhook',
|
|
828
833
|
],
|
|
829
|
-
cron: ['schedule', 'timezone', 'input'],
|
|
834
|
+
cron: ['schedule', 'timezone', 'input', 'overlap'],
|
|
830
835
|
webhook: ['auth', 'hmac'],
|
|
831
836
|
sqlListener: [
|
|
832
837
|
'id',
|
|
@@ -851,6 +856,10 @@ export const PLAY_AUTHORING_DEFINE_PLAY_OPTION_FIELDS = [
|
|
|
851
856
|
...PLAY_AUTHORING_BINDING_FIELDS.root,
|
|
852
857
|
] as const;
|
|
853
858
|
|
|
859
|
+
/** Cron overlap policies. Omitted means `allow`, the historical behavior. */
|
|
860
|
+
export const PLAY_CRON_OVERLAP_POLICIES = ['allow', 'skip'] as const;
|
|
861
|
+
export type PlayCronOverlapPolicy = (typeof PLAY_CRON_OVERLAP_POLICIES)[number];
|
|
862
|
+
|
|
854
863
|
/**
|
|
855
864
|
* Static cron input must be an object because the scheduler accepts a JSON
|
|
856
865
|
* object. It is tied to the Play handler input so TypeScript rejects missing
|
|
@@ -912,6 +921,12 @@ export type PlayAuthoringBindings<TInput = Record<string, unknown>> = {
|
|
|
912
921
|
timezone?: string;
|
|
913
922
|
/** Static JSON object supplied to every run started by this cron binding. */
|
|
914
923
|
input?: PlayAuthoringCronInput<TInput>;
|
|
924
|
+
/**
|
|
925
|
+
* What a cron occurrence does while an earlier cron run of this Play is
|
|
926
|
+
* still queued or running. `allow` (the default) starts another run;
|
|
927
|
+
* `skip` records the occurrence as skipped and starts nothing.
|
|
928
|
+
*/
|
|
929
|
+
overlap?: PlayCronOverlapPolicy;
|
|
915
930
|
};
|
|
916
931
|
sqlListeners?: PlaySqlListenerDeclaration[];
|
|
917
932
|
secrets?: readonly string[];
|
|
@@ -1597,8 +1612,8 @@ export type PlayAuthoringViewLink = {
|
|
|
1597
1612
|
url: string;
|
|
1598
1613
|
/** Opens the view at this run, for a link sent from the run itself. */
|
|
1599
1614
|
runUrl: string;
|
|
1600
|
-
/** Who can open the links:
|
|
1601
|
-
access: 'workspace' | 'public';
|
|
1615
|
+
/** Who can open the links: the view's team, every org member, or anyone. */
|
|
1616
|
+
access: 'workspace' | 'org' | 'public';
|
|
1602
1617
|
};
|
|
1603
1618
|
|
|
1604
1619
|
export interface PlayAuthoringRuntimeContext<
|
|
@@ -2145,6 +2160,26 @@ export const PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
|
2145
2160
|
errorMessage:
|
|
2146
2161
|
'bindings.cron.input must be a static JSON object (no variables, spreads, or functions).',
|
|
2147
2162
|
},
|
|
2163
|
+
'bindings.cron.overlap': {
|
|
2164
|
+
schema: Type.Union(
|
|
2165
|
+
PLAY_CRON_OVERLAP_POLICIES.map((policy) => Type.Literal(policy)),
|
|
2166
|
+
),
|
|
2167
|
+
fixtures: {
|
|
2168
|
+
valid: 'skip',
|
|
2169
|
+
invalid: 'queue',
|
|
2170
|
+
absent: undefined,
|
|
2171
|
+
unresolved: { expression: 'overlap' },
|
|
2172
|
+
edition1: undefined,
|
|
2173
|
+
},
|
|
2174
|
+
referenceType: "'allow' | 'skip'",
|
|
2175
|
+
required: false,
|
|
2176
|
+
resolution: 'static-required',
|
|
2177
|
+
issueCode: 'play_authoring_binding_invalid',
|
|
2178
|
+
description:
|
|
2179
|
+
'What a cron occurrence does while an earlier cron run of this Play is still queued or running: "allow" (default) starts another run, "skip" records the occurrence as skipped.',
|
|
2180
|
+
errorMessage:
|
|
2181
|
+
'bindings.cron.overlap must be the static string "allow" or "skip".',
|
|
2182
|
+
},
|
|
2148
2183
|
'bindings.sqlListeners': {
|
|
2149
2184
|
schema: Type.Array(Type.Object({}, { additionalProperties: true })),
|
|
2150
2185
|
fixtures: {
|
|
@@ -3627,7 +3662,7 @@ export const PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
3627
3662
|
` runtime?: { timeout?: ${cloudReferenceType('runtime.timeout')}; size?: ${cloudReferenceType('runtime.size')} };`,
|
|
3628
3663
|
` rateLimit?: { every: ${cloudReferenceType('rateLimit.every')} };`,
|
|
3629
3664
|
` webhook?: { hmac?: { algorithm?: ${cloudReferenceType('bindings.webhook.hmac.algorithm')}; header?: ${cloudReferenceType('bindings.webhook.hmac.header')}; signaturePrefix?: ${cloudReferenceType('bindings.webhook.hmac.signaturePrefix')}; secretEnv: ${cloudReferenceType('bindings.webhook.hmac.secretEnv')} }; auth?: { type: ${cloudReferenceType('bindings.webhook.auth.type')}; headerFamily: ${cloudReferenceType('bindings.webhook.auth.headerFamily')}; signingSecrets: readonly ${cloudReferenceType('bindings.webhook.auth.signingSecrets[]')}[]; toleranceSeconds?: ${cloudReferenceType('bindings.webhook.auth.toleranceSeconds')} } };`,
|
|
3630
|
-
` cron?: { schedule: ${cloudReferenceType('bindings.cron.schedule')}; timezone?: ${cloudReferenceType('bindings.cron.timezone')}; input?: PlayCronInput<TInput
|
|
3665
|
+
` cron?: { schedule: ${cloudReferenceType('bindings.cron.schedule')}; timezone?: ${cloudReferenceType('bindings.cron.timezone')}; input?: PlayCronInput<TInput>; overlap?: ${cloudReferenceType('bindings.cron.overlap')} };`,
|
|
3631
3666
|
' sqlListeners?: readonly SqlListenerDeclaration[];',
|
|
3632
3667
|
` secrets?: readonly ${cloudReferenceType('bindings.secrets[]')}[];`,
|
|
3633
3668
|
'};',
|
|
@@ -3688,7 +3723,7 @@ export const PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
3688
3723
|
"export type BillingEntitlements = { org_id: string; as_of: number; plan: { sku: string; name: string; catalog_revision: string | null; included_credits: number; interval: 'month' | 'year' | null } | null; benefits: { quickenrichUnlimited?: { status: 'active' | 'past_due'; value: BillingBenefitValues['quickenrichUnlimited']; expiresAt?: number }; peopleSearch?: { status: 'active'; value: BillingBenefitValues['peopleSearch']; expiresAt?: number; usage: { month: string; periodStartsAt?: number; resetsAt?: number; resetsOn?: 'calendar_month' | 'billing_cycle'; limit: number; consumed: number; remaining: number } }; includedStorage?: { status: 'active'; usage: { limit: number; consumed: number; remaining: number; measuredDay: string; overageCharged: boolean } } }; concurrent_runs?: { limit: number; source: 'override' | 'plan' | 'default'; plans: Array<{ sku: string; name: string; limit: number }> }; effective_limits: { quickenrichUnlimited?: { baseline: number; effective: number; source: 'plan' | 'override'; override_expires_at?: number } } };",
|
|
3689
3724
|
'export interface DeeplinePlayRuntimeContext {',
|
|
3690
3725
|
' billing: { entitlements(): Promise<BillingEntitlements> };',
|
|
3691
|
-
" views: { list(): Promise<Array<{ id: string; name: string; url: string; runUrl: string; access: 'workspace' | 'public' }>> };",
|
|
3726
|
+
" views: { list(): Promise<Array<{ id: string; name: string; url: string; runUrl: string; access: 'workspace' | 'org' | 'public' }>> };",
|
|
3692
3727
|
' csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;',
|
|
3693
3728
|
' dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;',
|
|
3694
3729
|
' map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: DatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;',
|
|
@@ -290,6 +290,9 @@ export class DeployApiClient {
|
|
|
290
290
|
path: '/api/v2/plays/artifacts',
|
|
291
291
|
body: {
|
|
292
292
|
artifacts: batch.map((entry) => ({ ...entry, publish: false })),
|
|
293
|
+
// Every revision a deployment registers is its own; the server
|
|
294
|
+
// never hands it another writer's revision or rewrites it in place.
|
|
295
|
+
deploymentId: this.config.deploymentId,
|
|
293
296
|
},
|
|
294
297
|
});
|
|
295
298
|
results.push(...payload.artifacts);
|
|
@@ -31,10 +31,24 @@ export type GithubInstallationDoc = {
|
|
|
31
31
|
updatedAt: number;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Whether a project or deployment row is in the request's team
|
|
36
|
+
* (AuthContext.teamId). The default team is an absent `teamId` on the row and
|
|
37
|
+
* null (or absent) on the request; another team's row reads as not found.
|
|
38
|
+
*/
|
|
39
|
+
export function isInRequestTeam(
|
|
40
|
+
row: { teamId?: string | null },
|
|
41
|
+
requestTeamId: string | null | undefined,
|
|
42
|
+
): boolean {
|
|
43
|
+
return (row.teamId ?? null) === (requestTeamId ?? null);
|
|
44
|
+
}
|
|
45
|
+
|
|
34
46
|
export type PlayProjectDoc = {
|
|
35
47
|
_id: GenericId<'playProjects'>;
|
|
36
48
|
_creationTime: number;
|
|
37
49
|
orgId: string;
|
|
50
|
+
/** The team that connected the repository; absent is the default team. */
|
|
51
|
+
teamId?: string | null;
|
|
38
52
|
gitHost: string;
|
|
39
53
|
installationId: string;
|
|
40
54
|
repoId: number;
|
|
@@ -54,6 +68,8 @@ export type PlayDeploymentDoc = {
|
|
|
54
68
|
_id: GenericId<'playDeployments'>;
|
|
55
69
|
_creationTime: number;
|
|
56
70
|
orgId: string;
|
|
71
|
+
/** The project's team, or the starting request's for a directory deploy. */
|
|
72
|
+
teamId?: string | null;
|
|
57
73
|
/** Absent for a deployment the workspace ran itself, with no linked repo. */
|
|
58
74
|
playProjectId?: GenericId<'playProjects'>;
|
|
59
75
|
commitSha?: string;
|
|
@@ -1110,30 +1110,19 @@ export async function runDeployment(
|
|
|
1110
1110
|
(play.result.importedPlayDependencies ?? []).length > 0;
|
|
1111
1111
|
const matches = (revision: DeploymentPlayState['liveRevision']) =>
|
|
1112
1112
|
!importsOtherPlays && carriesArtifact(revision, artifact);
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
// falsely marked drifted forever.
|
|
1122
|
-
//
|
|
1123
|
-
// A directory deploy binds nothing and never clears drift, so an
|
|
1124
|
-
// identical bundle is simply unchanged: re-promoting it would churn
|
|
1125
|
-
// revision history for no change in what is live.
|
|
1126
|
-
if (
|
|
1113
|
+
// A play identical to what is live is unchanged, unless a production
|
|
1114
|
+
// deploy must bind it to this project or clear its drift flag (only a
|
|
1115
|
+
// git-synced flip clears it). A directory deploy binds nothing and never
|
|
1116
|
+
// clears drift. Anything this deployment promotes, it registers itself:
|
|
1117
|
+
// it never promotes a revision another writer registered.
|
|
1118
|
+
if (
|
|
1119
|
+
matches(playState?.liveRevision ?? null) &&
|
|
1120
|
+
!(
|
|
1127
1121
|
deployment.isProduction &&
|
|
1128
1122
|
project &&
|
|
1129
1123
|
(playState?.playProjectId !== project.id || playState?.driftFromGit)
|
|
1130
|
-
)
|
|
1131
|
-
|
|
1132
|
-
name: play.name,
|
|
1133
|
-
revisionId: playState!.liveRevision!.revisionId,
|
|
1134
|
-
});
|
|
1135
|
-
continue;
|
|
1136
|
-
}
|
|
1124
|
+
)
|
|
1125
|
+
) {
|
|
1137
1126
|
outcomes.push({
|
|
1138
1127
|
name: play.name,
|
|
1139
1128
|
file: play.file,
|
|
@@ -1143,26 +1132,6 @@ export async function runDeployment(
|
|
|
1143
1132
|
});
|
|
1144
1133
|
continue;
|
|
1145
1134
|
}
|
|
1146
|
-
if (matches(playState?.workingRevision ?? null)) {
|
|
1147
|
-
// Registered before (an earlier attempt, another push of this PR, or
|
|
1148
|
-
// a sibling PR); reuse the revision instead of writing a duplicate.
|
|
1149
|
-
if (deployment.isProduction) {
|
|
1150
|
-
toPromote.push({
|
|
1151
|
-
name: play.name,
|
|
1152
|
-
revisionId: playState!.workingRevision!.revisionId,
|
|
1153
|
-
});
|
|
1154
|
-
} else {
|
|
1155
|
-
outcomes.push({
|
|
1156
|
-
name: play.name,
|
|
1157
|
-
file: play.file,
|
|
1158
|
-
status: 'registered',
|
|
1159
|
-
version: playState?.workingRevision?.version ?? undefined,
|
|
1160
|
-
...sdkUpdated(play.name),
|
|
1161
|
-
...(warning ? { warning } : {}),
|
|
1162
|
-
});
|
|
1163
|
-
}
|
|
1164
|
-
continue;
|
|
1165
|
-
}
|
|
1166
1135
|
toRegister.push({
|
|
1167
1136
|
play,
|
|
1168
1137
|
entry: {
|