deepline 0.3.552 → 0.3.554
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +107 -12
- package/dist/bundling-sources/sdk/src/compat.ts +239 -87
- package/dist/bundling-sources/sdk/src/config.ts +113 -2
- package/dist/bundling-sources/sdk/src/errors.ts +2 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +118 -8
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
- package/dist/bundling-sources/sdk/src/play.ts +3 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +8 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
- package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
- package/dist/bundling-sources/sdk/src/types.ts +9 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
- package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
- package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
- package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +9 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +168 -41
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
- package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
- package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +444 -39
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
- package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +254 -44
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +259 -52
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
- package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
- package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
- package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
- package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
- package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
- package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
- package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
- package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
- package/dist/cli/{auth-KVSBJZOX.mjs → auth-HJUNW7T2.mjs} +8 -7
- package/dist/cli/auth-SP6SKZJZ.js +44 -0
- package/dist/cli/{billing-FQREA7UA.js → billing-4TSA5HEC.js} +297 -161
- package/dist/cli/{billing-54RHFEBI.mjs → billing-SJYRJAQ2.mjs} +197 -61
- package/dist/cli/{chunk-4MK42735.js → chunk-2HMN5H54.js} +215 -130
- package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
- package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-2ORPFQUA.mjs} +18 -18
- package/dist/cli/{chunk-RQZQVFCJ.js → chunk-2OVHNHCF.js} +2 -2
- package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-33WRQSQ2.mjs} +1874 -91
- package/dist/cli/{chunk-UPMRIVZB.js → chunk-3IKGZ4CG.js} +74 -13
- package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-3Z4VFCXO.mjs} +8 -8
- package/dist/cli/{chunk-GKYAYLRI.js → chunk-4DOFGIEJ.js} +27 -31
- package/dist/cli/{chunk-4TALT2M3.mjs → chunk-52Q5KETX.mjs} +69 -3
- package/dist/cli/{chunk-RBEUVDZF.js → chunk-5CYZHOKI.js} +249 -107
- package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
- package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-62AUAWQV.mjs} +4 -4
- package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-62HWJXST.mjs} +17 -21
- package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-6EXOAT6T.mjs} +2 -2
- package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
- package/dist/cli/{chunk-ADRC5I3R.js → chunk-7OWI736E.js} +30 -30
- package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
- package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-B6HO2XWH.mjs} +13 -13
- package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-BOZAP2EM.mjs} +141 -56
- package/dist/cli/chunk-BVXIGOBZ.js +32 -0
- package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
- package/dist/cli/{chunk-WE5HES3H.mjs → chunk-D6Z6POKE.mjs} +151 -43
- package/dist/cli/{chunk-AZQ264ID.mjs → chunk-DSKSFFK2.mjs} +1 -1
- package/dist/cli/{chunk-SHLFOPD6.js → chunk-DUBXUAAO.js} +5 -5
- package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
- package/dist/cli/{chunk-HO3XK3R7.js → chunk-E74KGKFZ.js} +8 -8
- package/dist/cli/{chunk-77AAAGVB.js → chunk-ECHKAC7M.js} +2 -2
- package/dist/cli/{chunk-KWSH5T7K.js → chunk-EN5NHCCQ.js} +21 -21
- package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-F7CMRKSK.mjs} +1 -1
- package/dist/cli/{chunk-JWUAX6OP.js → chunk-FBAFX43W.js} +11 -11
- package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-FXQ3JKE3.mjs} +1 -1
- package/dist/cli/{chunk-QPKH23EC.mjs → chunk-GA2M3G3Y.mjs} +5 -5
- package/dist/cli/{chunk-G4O75EXF.js → chunk-GHT2NDL7.js} +18 -18
- package/dist/cli/{chunk-MF2GHZDO.js → chunk-GRZENGNE.js} +2 -2
- package/dist/cli/{chunk-4UUR4TCH.js → chunk-IVZKMJUK.js} +1875 -92
- package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-KVBQY4ST.mjs} +3 -3
- package/dist/cli/{chunk-S5S355UY.mjs → chunk-KZHBDMGF.mjs} +12 -12
- package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
- package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
- package/dist/cli/{chunk-2WFPHBR4.js → chunk-LY5MMXFF.js} +47 -29
- package/dist/cli/{chunk-BAIST2BR.js → chunk-M7STM3MZ.js} +36 -36
- package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
- package/dist/cli/{chunk-45PVGZST.js → chunk-OPTV7D2V.js} +508 -361
- package/dist/cli/{chunk-PFO3ISXA.js → chunk-OVEYWO4H.js} +174 -129
- package/dist/cli/{chunk-BGBJV26E.mjs → chunk-PC2FTUCP.mjs} +4 -4
- package/dist/cli/{chunk-WLN3SUIA.js → chunk-PQQMPUCZ.js} +3 -3
- package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-Q7ACILL2.mjs} +5 -5
- package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
- package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RBBTCYQB.mjs} +3 -3
- package/dist/cli/{chunk-F2LH7TGF.js → chunk-RTHMGSZX.js} +21 -21
- package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-S6W6SJ6E.mjs} +158 -16
- package/dist/cli/chunk-STXDSVQZ.mjs +32 -0
- package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-TGUQET3O.mjs} +67 -6
- package/dist/cli/{chunk-IHRKLXZN.js → chunk-TJ6HLN56.js} +5 -5
- package/dist/cli/{chunk-3FD5EQ62.js → chunk-TOO3YM5N.js} +6 -7
- package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UBBYHB2B.mjs} +2 -2
- package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-UC4BDZKI.mjs} +299 -69
- package/dist/cli/{chunk-634ZDA3F.js → chunk-UNNOZKRT.js} +1 -1
- package/dist/cli/{chunk-IDVVIXPJ.js → chunk-UOT7HPBH.js} +41 -41
- package/dist/cli/{chunk-6YCA5NKJ.js → chunk-UYCZFQYQ.js} +12 -12
- package/dist/cli/{chunk-7IKQKKNX.js → chunk-VIUUTEHY.js} +90 -24
- package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-VLO5NFH2.mjs} +63 -18
- package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-VQ75KX7G.mjs} +5 -5
- package/dist/cli/{chunk-4NQF6KJ3.js → chunk-VV4XGZ24.js} +13 -13
- package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
- package/dist/cli/{chunk-S46HWQKO.js → chunk-W6CZDTIR.js} +69 -69
- package/dist/cli/{chunk-XVB7V4N7.js → chunk-WL7P32PI.js} +161 -53
- package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-XD3MFTHA.mjs} +1 -1
- package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-XFZX6FNM.mjs} +40 -22
- package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-XU6QNM4D.mjs} +1 -1
- package/dist/cli/{chunk-QAORXEY3.mjs → chunk-YCOGPOUX.mjs} +6 -7
- package/dist/cli/{chunk-VQALXEXO.js → chunk-YQKCH4R7.js} +348 -118
- package/dist/cli/{chunk-6O5HOODW.mjs → chunk-YY55NYAH.mjs} +207 -60
- package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
- package/dist/cli/command-docs.js +3 -3
- package/dist/cli/command-docs.mjs +2 -2
- package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-O3Q5IPLF.mjs} +9 -8
- package/dist/cli/concurrent-runs-help-ZFRZWX5V.js +22 -0
- package/dist/cli/{csv-F5VAGX4K.js → csv-4ZQ2RATI.js} +16 -15
- package/dist/cli/{csv-2PTVDNO6.mjs → csv-Y3BFPEM6.mjs} +7 -6
- package/dist/cli/{db-IEDXAUF7.mjs → db-3JYY4JNN.mjs} +17 -17
- package/dist/cli/{db-Z3OIUFMM.js → db-VEIFS4M7.js} +45 -45
- package/dist/cli/describe-EVJ4MFVU.mjs +50 -0
- package/dist/cli/describe-FG625QPF.js +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +7 -7
- package/dist/cli/describe-core.mjs +6 -6
- package/dist/cli/{executions-H6H5655J.js → executions-HPZXOOVX.js} +12 -12
- package/dist/cli/{executions-R3LP74QN.mjs → executions-PCXZKEHM.mjs} +10 -10
- package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-Y6VKZNY6.mjs} +9 -8
- package/dist/cli/{feedback-VFOUR66B.js → feedback-ZKFHFVL6.js} +17 -16
- package/dist/cli/git-RUBMALLH.js +26 -0
- package/dist/cli/{git-YX2J4GCI.mjs → git-UMPR2QYC.mjs} +8 -7
- package/dist/cli/index.js +170 -158
- package/dist/cli/index.mjs +60 -48
- package/dist/cli/{integrations-E2JZYKHS.js → integrations-3GQCTRTF.js} +23 -27
- package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-V3TM6XAB.mjs} +15 -19
- package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-JZBUD7ZE.mjs} +9 -8
- package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-VYCO7NGW.js} +12 -11
- package/dist/cli/{mcp-UQV2K4EW.js → mcp-4OIWTCE6.js} +121 -48
- package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-PH4KZ76P.mjs} +100 -27
- package/dist/cli/{monitors-R3BBDCRC.js → monitors-E2A6VPBY.js} +221 -186
- package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-SSMGIDGX.mjs} +58 -23
- package/dist/cli/org-SFDKSK5D.mjs +2289 -0
- package/dist/cli/org-WUDZGWBT.js +2289 -0
- package/dist/cli/outcomes-QT7LQBPK.mjs +2865 -0
- package/dist/cli/outcomes-Y7SZTLSL.js +2865 -0
- package/dist/cli/{play-MDWPR4XG.mjs → play-EK7KSFPL.mjs} +376 -106
- package/dist/cli/{play-2MVO27VO.js → play-GDNHCRRR.js} +1150 -880
- package/dist/cli/{providers-AKDYFZJZ.mjs → providers-FVZLRXAU.mjs} +10 -10
- package/dist/cli/{providers-2AACRUZH.js → providers-ZKOSECLV.js} +13 -13
- package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-KSDKIXYD.js} +9 -8
- package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-UJZ6PIQV.mjs} +7 -6
- package/dist/cli/{run-RTSQNGRD.mjs → run-E7MZ7P35.mjs} +35 -33
- package/dist/cli/{run-2634REDK.js → run-PD2BBG6S.js} +55 -53
- package/dist/cli/run-identity-LMLFMACS.js +31 -0
- package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
- package/dist/cli/search-TKSPTPHA.js +32 -0
- package/dist/cli/{search-6AOJ4XPP.mjs → search-VTFUFTOY.mjs} +11 -11
- package/dist/cli/{search-output-S5ODBL5E.js → search-output-G2AGDCOY.js} +13 -12
- package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PFVXQCWA.mjs} +10 -9
- package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-7CIMEMX7.mjs} +11 -11
- package/dist/cli/{secrets-LHCIIHMT.js → secrets-BCOQ4U7U.js} +20 -20
- package/dist/cli/sessions-4CO556VD.js +23 -0
- package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-IUCQZEF7.mjs} +9 -8
- package/dist/cli/{settings-EBONWL5C.mjs → settings-KZN62UQK.mjs} +16 -16
- package/dist/cli/{settings-CP4FVK2W.js → settings-REL4736M.js} +89 -89
- package/dist/cli/{setup-I5AZE3IU.mjs → setup-2P7OG3OU.mjs} +22 -24
- package/dist/cli/{setup-LFGHTNLQ.js → setup-2XIVBBCS.js} +62 -64
- package/dist/cli/skills-JYT5DEY6.js +37 -0
- package/dist/cli/{skills-W76AO5XE.mjs → skills-VIGNDJKI.mjs} +10 -9
- package/dist/cli/tools-NTVUQ2TG.js +57 -0
- package/dist/cli/{tools-7IJHGF6W.mjs → tools-W3QT5EJY.mjs} +24 -24
- package/dist/cli/{update-GFOPZTHY.mjs → update-GZVBVMY3.mjs} +14 -11
- package/dist/cli/update-TWJZPUZM.js +37 -0
- package/dist/cli/{views-D4NX4SBG.mjs → views-BOGEH424.mjs} +47 -49
- package/dist/cli/{views-BPL2TQJ4.js → views-TOLJNLSV.js} +62 -64
- package/dist/cli/{workflow-ZYNAUCKC.js → workflow-ENWFRK5M.js} +23 -23
- package/dist/cli/{workflow-YXP42FUI.mjs → workflow-VDG2FDQV.mjs} +13 -13
- package/dist/{client-CyXGrO4D.d.mts → client-B8f7RNF8.d.mts} +1 -1
- package/dist/{client-Bf3IpUKN.d.ts → client-C5TgXmJQ.d.ts} +1 -1
- package/dist/{client-core-BxsLnXlm.d.mts → client-core-SLLGBTht.d.mts} +268 -23
- package/dist/{client-core-BWd0lX0Z.d.ts → client-core-p0sOxnkl.d.ts} +268 -23
- package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
- package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
- package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
- package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
- package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
- package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +66 -55
- package/dist/index.mjs +25 -14
- package/dist/install-integrity.json +163 -144
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +23 -4
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +4 -4
- package/dist/plays/run-request.mjs +3 -3
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +15 -13
- package/dist/server.mjs +9 -7
- package/package.json +1 -1
- package/dist/cli/auth-MMNVWATX.js +0 -43
- package/dist/cli/chunk-AID3OYVJ.js +0 -8
- package/dist/cli/chunk-OVDNJAJN.mjs +0 -8
- package/dist/cli/concurrent-runs-help-FQAIHKKC.js +0 -21
- package/dist/cli/describe-QDANCTS3.mjs +0 -50
- package/dist/cli/describe-VUTT5ZKU.js +0 -50
- package/dist/cli/git-ETB3GH3K.js +0 -25
- package/dist/cli/org-GRYVMNSW.js +0 -1282
- package/dist/cli/org-Z37NGJV4.mjs +0 -1282
- package/dist/cli/run-identity-G257GQED.js +0 -25
- package/dist/cli/search-VTW2YNBS.js +0 -32
- package/dist/cli/sessions-CJ4FJ2WB.js +0 -22
- package/dist/cli/skills-R7EBXREW.js +0 -36
- package/dist/cli/tools-V7U2BDXM.js +0 -57
- package/dist/cli/update-4COPZETK.js +0 -34
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RUN_LEDGER_TERMINAL_BACKLOG_PREFIX_MAX_FACTS } from './/run-ledger-projection-contract';
|
|
1
2
|
import { WORKFLOW_EXECUTOR_TOKEN_TTL_SECONDS } from './/runtime-constants';
|
|
2
3
|
import {
|
|
3
4
|
isExecutionOperationPolicy,
|
|
@@ -334,6 +335,11 @@ export type WorkflowRunExecutionTokenClaims =
|
|
|
334
335
|
// launches have no human actor, and older tokens predate the claims.
|
|
335
336
|
actor_user_id?: string;
|
|
336
337
|
actor_email?: string;
|
|
338
|
+
/**
|
|
339
|
+
* The run's team inside the org. Absent is the org's default team, as on
|
|
340
|
+
* every token minted before teams; older verifiers ignore it.
|
|
341
|
+
*/
|
|
342
|
+
team_id?: string;
|
|
337
343
|
/** Durable scheduler topology attested by the launch-time app. */
|
|
338
344
|
scheduler_schema?: string;
|
|
339
345
|
/** Scheduler generation that owns durable writes for this execution leg. */
|
|
@@ -359,6 +365,13 @@ export type WorkflowRunExecutionTokenClaims =
|
|
|
359
365
|
runtime_origin?: string;
|
|
360
366
|
/** Immutable receiver advertising leased Run Ledger ingress-prefix support. */
|
|
361
367
|
run_ledger_ingress_prefix_origin?: string;
|
|
368
|
+
/**
|
|
369
|
+
* Facts that receiver proves in one terminal backlog receipt. Minted only
|
|
370
|
+
* beside `run_ledger_ingress_prefix_origin`, which only the receiving app
|
|
371
|
+
* supplies for itself, so it states that same build's verifier. Typed as a
|
|
372
|
+
* number: a projector uses it only within its own bound.
|
|
373
|
+
*/
|
|
374
|
+
run_ledger_terminal_backlog_prefix_facts?: number;
|
|
362
375
|
};
|
|
363
376
|
|
|
364
377
|
export type RuntimeRateScopeTokenClaims = {
|
|
@@ -662,6 +675,8 @@ function isValidWorkflowClaimsShape(
|
|
|
662
675
|
typeof claims.actor_user_id === 'string') &&
|
|
663
676
|
(claims.actor_email === undefined ||
|
|
664
677
|
typeof claims.actor_email === 'string') &&
|
|
678
|
+
(claims.team_id === undefined ||
|
|
679
|
+
(typeof claims.team_id === 'string' && claims.team_id.trim() !== '')) &&
|
|
665
680
|
(claims.scheduler_schema === undefined ||
|
|
666
681
|
normalizeRuntimeSchedulerSchema(claims.scheduler_schema) !== null) &&
|
|
667
682
|
(claims.run_attempt === undefined ||
|
|
@@ -681,6 +696,8 @@ function isValidWorkflowClaimsShape(
|
|
|
681
696
|
isValidRuntimeOrigin(claims.runtime_origin)) &&
|
|
682
697
|
(claims.run_ledger_ingress_prefix_origin === undefined ||
|
|
683
698
|
isValidRuntimeOrigin(claims.run_ledger_ingress_prefix_origin)) &&
|
|
699
|
+
(claims.run_ledger_terminal_backlog_prefix_facts === undefined ||
|
|
700
|
+
typeof claims.run_ledger_terminal_backlog_prefix_facts === 'number') &&
|
|
684
701
|
Array.isArray(claims.capabilities) &&
|
|
685
702
|
claims.capabilities.length > 0 &&
|
|
686
703
|
claims.capabilities.every(isRuntimeExecutionCapability) &&
|
|
@@ -755,6 +772,43 @@ export async function mintIngestionSubscriptionExecutionToken(input: {
|
|
|
755
772
|
return `${signingInput}.${signature}`;
|
|
756
773
|
}
|
|
757
774
|
|
|
775
|
+
/** Retained identity grammar for server-owned Monitor work outside a Play Run. */
|
|
776
|
+
export function providerMonitorExecutorIdentity(monitorKey: string) {
|
|
777
|
+
if (!monitorKey) throw new Error('Monitor service identity requires a key.');
|
|
778
|
+
const workflowId = `provider-monitor:${monitorKey}`;
|
|
779
|
+
const runId = `deploy:${monitorKey}`;
|
|
780
|
+
return { workflowId, runId, billingRunId: runId, playName: workflowId };
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/** Classify only after signature/issuer/audience/expiry verification. Scope remains handler-owned. */
|
|
784
|
+
export function isProviderMonitorServiceExecution(
|
|
785
|
+
claims: WorkflowRunExecutionTokenClaims,
|
|
786
|
+
): boolean {
|
|
787
|
+
const prefix = 'provider-monitor:';
|
|
788
|
+
if (!claims.workflow_id.startsWith(prefix)) return false;
|
|
789
|
+
const key = claims.workflow_id.slice(prefix.length);
|
|
790
|
+
if (!key) return false;
|
|
791
|
+
const identity = providerMonitorExecutorIdentity(key);
|
|
792
|
+
// Public v2 Play identities have workflow_id === run_id; legacy Plays use
|
|
793
|
+
// document IDs. Only the Monitor producer signs this complete distinct pair.
|
|
794
|
+
return (
|
|
795
|
+
claims.sub === 'workflow_executor' &&
|
|
796
|
+
claims.workflow_id === identity.workflowId &&
|
|
797
|
+
claims.run_id === identity.runId &&
|
|
798
|
+
claims.billing_run_id === identity.billingRunId &&
|
|
799
|
+
claims.play_name === identity.playName &&
|
|
800
|
+
claims.actor_user_id === undefined &&
|
|
801
|
+
claims.scheduler_schema === undefined &&
|
|
802
|
+
claims.run_attempt === undefined &&
|
|
803
|
+
claims.resume_epoch === undefined &&
|
|
804
|
+
claims.run_lease_token === undefined &&
|
|
805
|
+
claims.synthetic === undefined &&
|
|
806
|
+
claims.fixture_behavior === undefined &&
|
|
807
|
+
(claims.integration_mode === undefined ||
|
|
808
|
+
claims.integration_mode === 'live')
|
|
809
|
+
);
|
|
810
|
+
}
|
|
811
|
+
|
|
758
812
|
export async function mintWorkflowRunExecutionToken(input: {
|
|
759
813
|
operationPolicy?: ExecutionOperationPolicy;
|
|
760
814
|
calendarBookingBinding?: CalendarBookingBinding;
|
|
@@ -770,6 +824,8 @@ export async function mintWorkflowRunExecutionToken(input: {
|
|
|
770
824
|
synthetic?: boolean | null;
|
|
771
825
|
actorUserId?: string | null;
|
|
772
826
|
actorEmail?: string | null;
|
|
827
|
+
/** The run's team; absent or null is the org's default team. */
|
|
828
|
+
teamId?: string | null;
|
|
773
829
|
schedulerSchema?: string | null;
|
|
774
830
|
runAttempt?: number | null;
|
|
775
831
|
resumeEpoch?: number | null;
|
|
@@ -790,6 +846,7 @@ export async function mintWorkflowRunExecutionToken(input: {
|
|
|
790
846
|
}
|
|
791
847
|
const actorUserId = input.actorUserId?.trim() || null;
|
|
792
848
|
const actorEmail = input.actorEmail?.trim() || null;
|
|
849
|
+
const teamId = input.teamId?.trim() || null;
|
|
793
850
|
const schedulerSchema = normalizeRuntimeSchedulerSchema(
|
|
794
851
|
input.schedulerSchema,
|
|
795
852
|
);
|
|
@@ -842,6 +899,7 @@ export async function mintWorkflowRunExecutionToken(input: {
|
|
|
842
899
|
...(input.synthetic ? { synthetic: true as const } : {}),
|
|
843
900
|
...(actorUserId ? { actor_user_id: actorUserId } : {}),
|
|
844
901
|
...(actorEmail ? { actor_email: actorEmail } : {}),
|
|
902
|
+
...(teamId ? { team_id: teamId } : {}),
|
|
845
903
|
...(schedulerSchema ? { scheduler_schema: schedulerSchema } : {}),
|
|
846
904
|
...(typeof input.runAttempt === 'number' &&
|
|
847
905
|
Number.isSafeInteger(input.runAttempt) &&
|
|
@@ -870,6 +928,10 @@ export async function mintWorkflowRunExecutionToken(input: {
|
|
|
870
928
|
run_ledger_ingress_prefix_origin: new URL(
|
|
871
929
|
input.runLedgerIngressPrefixOrigin,
|
|
872
930
|
).origin,
|
|
931
|
+
// The receiving app supplies its own origin above, so this states
|
|
932
|
+
// the facts its verifier proves (run-ledger-projection-contract).
|
|
933
|
+
run_ledger_terminal_backlog_prefix_facts:
|
|
934
|
+
RUN_LEDGER_TERMINAL_BACKLOG_PREFIX_MAX_FACTS,
|
|
873
935
|
}
|
|
874
936
|
: {}),
|
|
875
937
|
sub: input.subject ?? 'workflow_executor',
|
|
@@ -2125,6 +2125,72 @@ export class RuntimeMapMemoryLimitError extends Error {
|
|
|
2125
2125
|
*/
|
|
2126
2126
|
export const runtimeMapJsonByteLength = runtimeJsonByteLength;
|
|
2127
2127
|
|
|
2128
|
+
/** Each record's serialized key and per-property shares, by record key. */
|
|
2129
|
+
export type RuntimeMapRecordEntryBytesCache = Map<
|
|
2130
|
+
string,
|
|
2131
|
+
{
|
|
2132
|
+
keyBytes: number;
|
|
2133
|
+
properties: Map<string, { value: unknown; bytes: number }>;
|
|
2134
|
+
}
|
|
2135
|
+
>;
|
|
2136
|
+
|
|
2137
|
+
const recordEntryTextEncoder =
|
|
2138
|
+
typeof TextEncoder === 'undefined' ? null : new TextEncoder();
|
|
2139
|
+
|
|
2140
|
+
/** UTF-8 bytes of a string, counted as `runtimeJsonByteLength` counts them. */
|
|
2141
|
+
function utf8Bytes(value: string): number {
|
|
2142
|
+
if (typeof Buffer !== 'undefined') return Buffer.byteLength(value, 'utf8');
|
|
2143
|
+
return recordEntryTextEncoder?.encode(value).byteLength ?? value.length;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
/**
|
|
2147
|
+
* `runtimeMapJsonByteLength({ [key]: value })` for a plain record `value`,
|
|
2148
|
+
* reusing each property's serialized share while its value is the same object
|
|
2149
|
+
* (or primitive) as the last time this key was measured. Only properties whose
|
|
2150
|
+
* value changed are serialized, so a record merged one property at a time
|
|
2151
|
+
* (`{ ...previous, ...patch }`) costs its patch, not the whole record.
|
|
2152
|
+
*
|
|
2153
|
+
* `{"key":{p1,p2,...}}` is its framing, the key, the shares and the commas
|
|
2154
|
+
* between them; a property JSON cannot represent is dropped, as
|
|
2155
|
+
* `JSON.stringify` drops it.
|
|
2156
|
+
*/
|
|
2157
|
+
export function runtimeMapJsonByteLengthOfRecordEntry(
|
|
2158
|
+
key: string,
|
|
2159
|
+
value: Record<string, unknown>,
|
|
2160
|
+
cache: RuntimeMapRecordEntryBytesCache,
|
|
2161
|
+
): number {
|
|
2162
|
+
let entry = cache.get(key);
|
|
2163
|
+
if (!entry) {
|
|
2164
|
+
entry = { keyBytes: utf8Bytes(JSON.stringify(key)), properties: new Map() };
|
|
2165
|
+
cache.set(key, entry);
|
|
2166
|
+
}
|
|
2167
|
+
const properties = new Map<string, { value: unknown; bytes: number }>();
|
|
2168
|
+
let count = 0;
|
|
2169
|
+
let shares = 0;
|
|
2170
|
+
for (const name of Object.keys(value)) {
|
|
2171
|
+
const propertyValue = value[name];
|
|
2172
|
+
let share = entry.properties.get(name);
|
|
2173
|
+
if (!share || !Object.is(share.value, propertyValue)) {
|
|
2174
|
+
const valueJson = JSON.stringify(propertyValue);
|
|
2175
|
+
share = {
|
|
2176
|
+
value: propertyValue,
|
|
2177
|
+
bytes:
|
|
2178
|
+
valueJson === undefined
|
|
2179
|
+
? -1
|
|
2180
|
+
: utf8Bytes(JSON.stringify(name)) + 1 + utf8Bytes(valueJson),
|
|
2181
|
+
};
|
|
2182
|
+
}
|
|
2183
|
+
properties.set(name, share);
|
|
2184
|
+
if (share.bytes >= 0) {
|
|
2185
|
+
count += 1;
|
|
2186
|
+
shares += share.bytes;
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
entry.properties = properties;
|
|
2190
|
+
// `{` key `:` `{` shares joined by `,` `}` `}`
|
|
2191
|
+
return 2 + entry.keyBytes + 1 + 2 + shares + Math.max(0, count - 1);
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2128
2194
|
export function defaultRuntimeMapMemoryLimits(): RuntimeMapMemoryLimits {
|
|
2129
2195
|
return {
|
|
2130
2196
|
materializedBudgetBytes: NODE_RUNTIME_MAP_MEMORY_BUDGET_BYTES,
|
|
@@ -2192,7 +2258,12 @@ export type RuntimeMapTrackedRow = {
|
|
|
2192
2258
|
};
|
|
2193
2259
|
|
|
2194
2260
|
type RuntimeMapRowsTracker = {
|
|
2195
|
-
|
|
2261
|
+
/**
|
|
2262
|
+
* Charge one row. `serializedBytes`, when given, must be the row's
|
|
2263
|
+
* `runtimeMapJsonByteLength`, measured once by a caller that sizes the
|
|
2264
|
+
* same row for other trackers too.
|
|
2265
|
+
*/
|
|
2266
|
+
track(row: unknown, serializedBytes?: number): RuntimeMapTrackedRow;
|
|
2196
2267
|
/**
|
|
2197
2268
|
* Stop charging a row `track` returned, once nothing retains it. The
|
|
2198
2269
|
* largest row seen stays: it describes what was tracked, not what is held.
|
|
@@ -2305,8 +2376,8 @@ function createRuntimeMapRowsTracker(
|
|
|
2305
2376
|
estimatedResidentBytes,
|
|
2306
2377
|
});
|
|
2307
2378
|
return {
|
|
2308
|
-
track(row) {
|
|
2309
|
-
const rowBytes = runtimeMapJsonByteLength(row);
|
|
2379
|
+
track(row, measuredBytes) {
|
|
2380
|
+
const rowBytes = measuredBytes ?? runtimeMapJsonByteLength(row);
|
|
2310
2381
|
const residentBytes = residentBytesOf(row, rowBytes);
|
|
2311
2382
|
rowCount += 1;
|
|
2312
2383
|
serializedBytes += rowBytes;
|
|
@@ -60,12 +60,40 @@ export const RUNTIME_RECEIPT_CONTROL_BUFFER_MAX_ITEMS = 2_000;
|
|
|
60
60
|
export const RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES = 16 * 1024 * 1024;
|
|
61
61
|
/**
|
|
62
62
|
* Stable-intent sheet admission responses include row details, so input bytes
|
|
63
|
-
* alone do not bound response size.
|
|
64
|
-
*
|
|
65
|
-
*
|
|
63
|
+
* alone do not bound response size. The first page of a paged admission holds
|
|
64
|
+
* this many rows, and so does every page once rows are seen to come back
|
|
65
|
+
* heavy (a rerun returning stored cells); a response that is still too large
|
|
66
|
+
* splits further. This is transport paging, not a customer input or output
|
|
67
|
+
* limit.
|
|
66
68
|
*/
|
|
67
69
|
export const RUNTIME_SHEET_START_MAX_RESPONSE_ROWS = 64;
|
|
68
70
|
export const RUNTIME_SHEET_START_TARGET_BODY_BYTES = 12 * 1024 * 1024;
|
|
71
|
+
/**
|
|
72
|
+
* After the first page, a paged admission sizes each page from the heaviest
|
|
73
|
+
* per-row response bytes its earlier pages returned: as many rows as fit this
|
|
74
|
+
* response target, between RUNTIME_SHEET_START_MAX_RESPONSE_ROWS and
|
|
75
|
+
* RUNTIME_SHEET_START_SIZED_PAGE_MAX_ROWS. A fresh row comes back as the row
|
|
76
|
+
* it was sent, so fresh datasets reach the maximum and a heavy rerun keeps the
|
|
77
|
+
* first page's size.
|
|
78
|
+
*
|
|
79
|
+
* Each page is one serial gateway round trip, and the dataset's rows wait for
|
|
80
|
+
* all of them before any row executes. At 64 rows a page, a 10,000-row
|
|
81
|
+
* dataset of three plain JavaScript columns spent 157 round trips and 9.9 s of
|
|
82
|
+
* its 32 s run on admission (load round 44228744140, stream js-10k), about
|
|
83
|
+
* 55 ms of gateway time each.
|
|
84
|
+
*
|
|
85
|
+
* The maximum bounds the one page that can find heavy rows after light ones
|
|
86
|
+
* (new rows ahead of rows a previous run filled): the shared gateway builds
|
|
87
|
+
* that whole response in memory before the runner refuses and splits it, so
|
|
88
|
+
* it costs up to this many stored rows, four times a first page. Production
|
|
89
|
+
* holds rows that heavy: 81 stable-intent admissions of 64 rows came back
|
|
90
|
+
* over the 16 MiB response budget from 6 to 9 November 2026, so at least
|
|
91
|
+
* 256 KiB a row. 256 rows of those is at least 64 MiB built on a 4 GB
|
|
92
|
+
* gateway; 1,024 would be at least 256 MiB. At 256 a page, the 10,000-row
|
|
93
|
+
* dataset above takes about 40 round trips instead of 157.
|
|
94
|
+
*/
|
|
95
|
+
export const RUNTIME_SHEET_START_TARGET_RESPONSE_BYTES = 1024 * 1024;
|
|
96
|
+
export const RUNTIME_SHEET_START_SIZED_PAGE_MAX_ROWS = 256;
|
|
69
97
|
/**
|
|
70
98
|
* Receipt commands are measured before the runtime client adds its request
|
|
71
99
|
* envelope. Keep a full 4 MiB below the gateway body ceiling so one legal
|
|
@@ -222,6 +222,8 @@ export async function sendPlayHttpRequest(input: {
|
|
|
222
222
|
fetchImpl?: SafeFetchImplementation;
|
|
223
223
|
log: (message: string) => void;
|
|
224
224
|
reportAmbiguousWrite?: boolean;
|
|
225
|
+
/** Told when the request waits for a pacing permit and when it is sent. */
|
|
226
|
+
queueClock?: { enterQueue(): void; dispatched(): void; retried(): void };
|
|
225
227
|
}): Promise<{ response: Response; bodyText: string }> {
|
|
226
228
|
const { url, init } = input;
|
|
227
229
|
const method = String(init.method ?? 'GET').toUpperCase();
|
|
@@ -285,6 +287,7 @@ export async function sendPlayHttpRequest(input: {
|
|
|
285
287
|
fetchImpl: async (physicalUrl, physicalInit) => {
|
|
286
288
|
await releasePhysicalPermit();
|
|
287
289
|
const signal = attemptInit.signal;
|
|
290
|
+
input.queueClock?.enterQueue();
|
|
288
291
|
permit = await runCtxFetchPhase({
|
|
289
292
|
callerSignal: init.signal,
|
|
290
293
|
controller: attemptController,
|
|
@@ -316,6 +319,7 @@ export async function sendPlayHttpRequest(input: {
|
|
|
316
319
|
phase: 'headers',
|
|
317
320
|
run: () => {
|
|
318
321
|
dispatched = true;
|
|
322
|
+
input.queueClock?.dispatched();
|
|
319
323
|
if (!['GET', 'HEAD', 'OPTIONS'].includes(method))
|
|
320
324
|
writeDispatched = true;
|
|
321
325
|
return (input.fetchImpl ?? globalThis.fetch)(
|
|
@@ -372,6 +376,7 @@ export async function sendPlayHttpRequest(input: {
|
|
|
372
376
|
await releasePhysicalPermit();
|
|
373
377
|
}
|
|
374
378
|
if (transportRetry) {
|
|
379
|
+
input.queueClock?.retried();
|
|
375
380
|
await sleepWithinCtxFetchDeadline({
|
|
376
381
|
callerSignal: init.signal,
|
|
377
382
|
deadline: fetchDeadline,
|
|
@@ -393,6 +398,7 @@ export async function sendPlayHttpRequest(input: {
|
|
|
393
398
|
? TOOL_EXECUTE_RATE_LIMIT_MAX_ATTEMPTS
|
|
394
399
|
: TOOL_EXECUTE_BARE_RATE_LIMIT_MAX_ATTEMPTS;
|
|
395
400
|
if (rateLimitAttempt >= attemptCap) break;
|
|
401
|
+
input.queueClock?.retried();
|
|
396
402
|
const delayMs = Math.max(
|
|
397
403
|
parseToolExecuteRetryAfterMs(retryAfter),
|
|
398
404
|
Math.min(
|
|
@@ -339,6 +339,14 @@ export interface PlayRunnerContextConfig extends RetainedPipelineCarrier {
|
|
|
339
339
|
* runner derives them from `staticPipeline` as before (skipped when absent).
|
|
340
340
|
*/
|
|
341
341
|
startupReadToolIds?: string[] | null;
|
|
342
|
+
/**
|
|
343
|
+
* Switch SR: set by the worker when the run's park-fence startup
|
|
344
|
+
* prefetch should fetch every named tool's metadata and auth-scope in one GET
|
|
345
|
+
* (`PLAY_RUNTIME_TOOL_STARTUP_READS_PATH`). Absent: one GET per lookup, as
|
|
346
|
+
* before. Each lookup still reuses its own answer once, and falls back to
|
|
347
|
+
* its own GET.
|
|
348
|
+
*/
|
|
349
|
+
startupReadBatch?: boolean;
|
|
342
350
|
force?: boolean | null;
|
|
343
351
|
forceToolRefresh?: boolean | null;
|
|
344
352
|
/**
|
|
@@ -5,6 +5,25 @@ export type QueryResultDatasetRequest = {
|
|
|
5
5
|
totalRows?: number;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* The stored-result handle a dataset descriptor reports, or null. Only a
|
|
10
|
+
* non-empty string of bounded length is passed on to later pages; its content
|
|
11
|
+
* belongs to the tool.
|
|
12
|
+
*/
|
|
13
|
+
export function readQueryResultDatasetResultRef(
|
|
14
|
+
dataset: Record<string, unknown> | null | undefined,
|
|
15
|
+
): string | null {
|
|
16
|
+
const raw = dataset?.result_ref;
|
|
17
|
+
if (typeof raw !== 'string') return null;
|
|
18
|
+
const resultRef = raw.trim();
|
|
19
|
+
return resultRef &&
|
|
20
|
+
resultRef.length <= QUERY_RESULT_DATASET_RESULT_REF_MAX_LENGTH
|
|
21
|
+
? resultRef
|
|
22
|
+
: null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const QUERY_RESULT_DATASET_RESULT_REF_MAX_LENGTH = 256;
|
|
26
|
+
|
|
8
27
|
export const QUERY_RESULT_DATASET_PAGE_SIZE = 1_000;
|
|
9
28
|
|
|
10
29
|
function maskSqlForDatasetClassifier(sql: string): string {
|
|
@@ -988,6 +988,15 @@ export interface RuntimeResourceGovernor {
|
|
|
988
988
|
stopSampling(): void;
|
|
989
989
|
/** Smoothed event-loop lag from the sampler, or null before its first tick. */
|
|
990
990
|
eventLoopLagEwmaMs(): number | null;
|
|
991
|
+
/**
|
|
992
|
+
* A reader of smoothed event-loop lag over only the samples taken after this
|
|
993
|
+
* call, starting from a quiet loop, or null until the sampler next ticks. A
|
|
994
|
+
* map judges its own load by it, so lag from work that ran before the map
|
|
995
|
+
* opened (runner boot, row preparation, admission pages) cannot narrow the
|
|
996
|
+
* map's rows. One late tick, such as the map's own launch wave, moves it a
|
|
997
|
+
* fifth of the way; lag that persists still reaches the map's hold.
|
|
998
|
+
*/
|
|
999
|
+
eventLoopLagSinceNow(): () => number | null;
|
|
991
1000
|
/** Retain a closed map's admission snapshot for the terminal summary. */
|
|
992
1001
|
recordMapAdmission(
|
|
993
1002
|
mapName: string,
|
|
@@ -1002,7 +1011,10 @@ type Ewma = {
|
|
|
1002
1011
|
observe(value: number | null | undefined): void;
|
|
1003
1012
|
};
|
|
1004
1013
|
|
|
1005
|
-
|
|
1014
|
+
/** The weight each new sample takes in a runtime EWMA. */
|
|
1015
|
+
const RUNTIME_EWMA_ALPHA = 0.2;
|
|
1016
|
+
|
|
1017
|
+
function createEwma(alpha = RUNTIME_EWMA_ALPHA): Ewma {
|
|
1006
1018
|
let value: number | null = null;
|
|
1007
1019
|
return {
|
|
1008
1020
|
get value() {
|
|
@@ -1584,6 +1596,10 @@ export function createRuntimeResourceGovernor(input: {
|
|
|
1584
1596
|
|
|
1585
1597
|
let eventLoopLagTimer: ReturnType<typeof setInterval> | null = null;
|
|
1586
1598
|
let eventLoopLagTickedAt: number | null = null;
|
|
1599
|
+
// The lag EWMA started from zero instead of from its first sample, so the
|
|
1600
|
+
// samples after any point can be read apart from everything before it.
|
|
1601
|
+
let eventLoopLagFromZero = 0;
|
|
1602
|
+
let eventLoopLagSamples = 0;
|
|
1587
1603
|
const startEventLoopLagSampler = (): void => {
|
|
1588
1604
|
if (eventLoopLagTimer !== null) return;
|
|
1589
1605
|
eventLoopLagTickedAt = Date.now();
|
|
@@ -1592,7 +1608,12 @@ export function createRuntimeResourceGovernor(input: {
|
|
|
1592
1608
|
const dueAt =
|
|
1593
1609
|
(eventLoopLagTickedAt ?? now) + EVENT_LOOP_LAG_SAMPLE_INTERVAL_MS;
|
|
1594
1610
|
eventLoopLagTickedAt = now;
|
|
1595
|
-
|
|
1611
|
+
const lagMs = Math.max(0, now - dueAt);
|
|
1612
|
+
phases.eventLoopLag.observe(lagMs);
|
|
1613
|
+
eventLoopLagFromZero =
|
|
1614
|
+
eventLoopLagFromZero * (1 - RUNTIME_EWMA_ALPHA) +
|
|
1615
|
+
lagMs * RUNTIME_EWMA_ALPHA;
|
|
1616
|
+
eventLoopLagSamples += 1;
|
|
1596
1617
|
}, EVENT_LOOP_LAG_SAMPLE_INTERVAL_MS);
|
|
1597
1618
|
// Measurement must never hold a runner open past its work.
|
|
1598
1619
|
const handle = eventLoopLagTimer as { unref?: () => void };
|
|
@@ -2091,6 +2112,22 @@ export function createRuntimeResourceGovernor(input: {
|
|
|
2091
2112
|
|
|
2092
2113
|
stopSampling: stopEventLoopLagSampler,
|
|
2093
2114
|
eventLoopLagEwmaMs: () => phases.eventLoopLag.snapshot().ewmaMs,
|
|
2115
|
+
eventLoopLagSinceNow: () => {
|
|
2116
|
+
const openedSamples = eventLoopLagSamples;
|
|
2117
|
+
const openedFromZero = eventLoopLagFromZero;
|
|
2118
|
+
return () => {
|
|
2119
|
+
const samples = eventLoopLagSamples - openedSamples;
|
|
2120
|
+
if (samples === 0) return null;
|
|
2121
|
+
// Every sample keeps (1 - alpha) of the value before it, so of the
|
|
2122
|
+
// value at opening (1 - alpha)^samples remains. Taking that out
|
|
2123
|
+
// leaves the EWMA of the newer samples alone, started from zero.
|
|
2124
|
+
return Math.max(
|
|
2125
|
+
0,
|
|
2126
|
+
eventLoopLagFromZero -
|
|
2127
|
+
(1 - RUNTIME_EWMA_ALPHA) ** samples * openedFromZero,
|
|
2128
|
+
);
|
|
2129
|
+
};
|
|
2130
|
+
},
|
|
2094
2131
|
|
|
2095
2132
|
recordMapAdmission(mapName, snapshot) {
|
|
2096
2133
|
// The ledger is per-process, not per-map: the runner publishes it once
|
|
@@ -389,6 +389,8 @@ export type PlayRunFailureDetails = {
|
|
|
389
389
|
origin?: ToolExecutionErrorOrigin;
|
|
390
390
|
/** Original reason family when the failure came from a typed tool call. */
|
|
391
391
|
category?: ToolExecutionErrorCategory;
|
|
392
|
+
/** Recognized diagnostic tool code; absent on historical generic failures. */
|
|
393
|
+
toolCode?: string;
|
|
392
394
|
cause?: string;
|
|
393
395
|
name?: string;
|
|
394
396
|
stack?: string;
|
|
@@ -781,7 +783,13 @@ export function normalizePlayRunFailure(error: unknown): PlayRunFailureDetails {
|
|
|
781
783
|
message: cause,
|
|
782
784
|
retryable: error instanceof ToolExecutionError ? error.retryable : null,
|
|
783
785
|
...(error instanceof ToolExecutionError
|
|
784
|
-
? {
|
|
786
|
+
? {
|
|
787
|
+
origin: error.origin,
|
|
788
|
+
category: error.category,
|
|
789
|
+
...(error.code === 'INTEGRATION_OAUTH_REFRESH_FAILED_CLOSED'
|
|
790
|
+
? { toolCode: error.code }
|
|
791
|
+
: {}),
|
|
792
|
+
}
|
|
785
793
|
: {}),
|
|
786
794
|
...(diagnostics
|
|
787
795
|
? {
|
|
@@ -116,6 +116,39 @@ export function callerPlayWorkflowIdMatchesRequest(
|
|
|
116
116
|
);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* The part of a caller-owned run id that names the run: family, timestamp and
|
|
121
|
+
* entropy. The `-caller-<sha256>` tail only binds the id to its request, so a
|
|
122
|
+
* reader that finds the run by this prefix needs nothing else.
|
|
123
|
+
*/
|
|
124
|
+
const SHORT_PLAY_RUN_ID_RE =
|
|
125
|
+
/^play\/[a-z0-9/-]+\/run\/\d{8}t\d{6}-\d{3}-[a-z0-9]{8}$/;
|
|
126
|
+
|
|
127
|
+
/** Shape of a short run id, as `shortPlayRunId` prints it. */
|
|
128
|
+
export function isShortPlayRunId(value: string): boolean {
|
|
129
|
+
return SHORT_PLAY_RUN_ID_RE.test(value);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** A run id as people read and type it: caller-owned ids lose their hash tail. */
|
|
133
|
+
export function shortPlayRunId(runId: string): string {
|
|
134
|
+
const short = runId.replace(/-caller-[a-f0-9]{64}$/, '');
|
|
135
|
+
return isShortPlayRunId(short) ? short : runId;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The short id to look a run up by, when `value` cannot be read as written:
|
|
140
|
+
* a short id itself, or a caller-owned id whose hash tail is not the 64 hex
|
|
141
|
+
* characters every caller id carries (agents copying a long id drop or skip
|
|
142
|
+
* characters of the hash). A well-formed full id, or anything that is not a
|
|
143
|
+
* Play run id, returns null and is read exactly as given.
|
|
144
|
+
*/
|
|
145
|
+
export function playRunIdLookupPrefix(value: string): string | null {
|
|
146
|
+
if (isShortPlayRunId(value)) return value;
|
|
147
|
+
const match = /^(.*)-caller-([a-f0-9]*)$/i.exec(value);
|
|
148
|
+
if (!match || /^[a-f0-9]{64}$/.test(match[2]!)) return null;
|
|
149
|
+
return isShortPlayRunId(match[1]!) ? match[1]! : null;
|
|
150
|
+
}
|
|
151
|
+
|
|
119
152
|
export type PlayRunIdentity = {
|
|
120
153
|
workflowId: string;
|
|
121
154
|
runId: string;
|
|
@@ -33,6 +33,30 @@ export function isRunLedgerProjectionChunk(
|
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/** Ordered outbox facts every Run Ledger receiver proves in one receipt. */
|
|
37
|
+
export const RUN_LEDGER_PROJECTION_PREFIX_DEFAULT_FACTS = 8;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A run whose terminal is pending delivers its outbox backlog in receipts of
|
|
41
|
+
* up to this many facts, so the terminal waits one Convex commit per 32 facts
|
|
42
|
+
* rather than per 8. A receipt names its fact count (`deliveryPrefixFacts`)
|
|
43
|
+
* only above the default, and a projector sends one only to a receiver whose
|
|
44
|
+
* app build advertised it.
|
|
45
|
+
*/
|
|
46
|
+
export const RUN_LEDGER_TERMINAL_BACKLOG_PREFIX_MAX_FACTS = 32;
|
|
47
|
+
|
|
48
|
+
/** Shared wire validation for a receipt's named fact count. */
|
|
49
|
+
export function isRunLedgerDeliveryPrefixFacts(
|
|
50
|
+
value: unknown,
|
|
51
|
+
): value is number {
|
|
52
|
+
return (
|
|
53
|
+
typeof value === 'number' &&
|
|
54
|
+
Number.isSafeInteger(value) &&
|
|
55
|
+
value > RUN_LEDGER_PROJECTION_PREFIX_DEFAULT_FACTS &&
|
|
56
|
+
value <= RUN_LEDGER_TERMINAL_BACKLOG_PREFIX_MAX_FACTS
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
36
60
|
export const RUN_LEDGER_PROJECTION_LEASE_LOST_REASONS = [
|
|
37
61
|
'delivery_lease_not_current',
|
|
38
62
|
'head_lease_missing',
|