deepline 0.3.461 → 0.3.463
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 +7593 -0
- package/dist/bundling-sources/sdk/src/client.ts +8 -7366
- package/dist/bundling-sources/sdk/src/http-core.ts +1239 -0
- package/dist/bundling-sources/sdk/src/http.ts +6 -1231
- package/dist/bundling-sources/sdk/src/index.ts +4 -1
- package/dist/bundling-sources/sdk/src/play.ts +5 -5
- package/dist/bundling-sources/sdk/src/plays/client-core.ts +437 -0
- package/dist/bundling-sources/sdk/src/plays/client.ts +4 -421
- package/dist/bundling-sources/sdk/src/plays/input-example.ts +3 -4
- package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -1
- 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/server.ts +43 -0
- package/dist/bundling-sources/sdk/src/types.ts +15 -5
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +15 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +17 -17
- package/dist/bundling-sources/shared_libs/monitors/callback-security.ts +0 -307
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +3 -0
- package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +3 -2
- package/dist/bundling-sources/shared_libs/monitors/package.json +2 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +34 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +61 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +122 -2
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +11 -1
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-failure-codes.ts +24 -0
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +32 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +57 -3
- package/dist/bundling-sources/shared_libs/observability/scheduled-work.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +66 -1
- package/dist/bundling-sources/shared_libs/play-data-plane/sheet-column-storage.ts +36 -7
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +250 -11
- package/dist/bundling-sources/shared_libs/play-runtime/array-input-store.ts +319 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +991 -359
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +110 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +155 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +110 -6
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +127 -13
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +14 -1
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +57 -1
- package/dist/bundling-sources/shared_libs/play-runtime/free-company-lookup-batching.ts +218 -0
- package/dist/bundling-sources/shared_libs/play-runtime/gateway-postgres-admission.ts +42 -5
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-budget-state-backend.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +92 -31
- package/dist/bundling-sources/shared_libs/play-runtime/governor/block-reserving-budget-state-backend.ts +69 -14
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +93 -23
- package/dist/bundling-sources/shared_libs/play-runtime/governor/in-memory-rate-state-backend.ts +15 -4
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +22 -18
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +190 -14
- package/dist/bundling-sources/shared_libs/play-runtime/memory-ledger.ts +131 -0
- package/dist/bundling-sources/shared_libs/play-runtime/modal-runtime-config.ts +77 -2
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +271 -2
- package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +51 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +27 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-text-for-log.ts +63 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-event-transport.ts +112 -16
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +104 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +265 -151
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-gateway-transport.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +35 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-sheet-persistence-retry.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-control-transport.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-labels.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +136 -70
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +237 -36
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +148 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +285 -32
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +251 -56
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +29 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/sandbox-create-outcome.ts +27 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +22 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +1397 -382
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-array-input-receipts.ts +920 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +16 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-environment.ts +38 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-flow.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +14 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-writer.ts +31 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +47 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +20 -7
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/index.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +1496 -320
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +31 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1389 -129
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +162 -23
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +499 -115
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +377 -9
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +117 -8
- package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +25 -0
- package/dist/bundling-sources/shared_libs/play-runtime/terminal-runtime-performance.ts +391 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +40 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/index.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/mapped-calls.ts +171 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/receipt-cohort.ts +16 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +38 -12
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +33 -9
- package/dist/bundling-sources/shared_libs/play-runtime/transport-error-diagnostics.ts +28 -0
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +55 -5
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +41 -1
- package/dist/bundling-sources/shared_libs/plays/contracts.ts +4 -0
- package/dist/bundling-sources/shared_libs/plays/dataset.ts +9 -3
- package/dist/bundling-sources/shared_libs/plays/deploy/manifest-contract.ts +2 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/manifest.ts +3 -2
- package/dist/bundling-sources/shared_libs/plays/deploy/project-serializer.ts +2 -2
- package/dist/bundling-sources/shared_libs/plays/run-output-summary.ts +66 -0
- package/dist/bundling-sources/shared_libs/plays/script-entry.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +43 -1
- package/dist/bundling-sources/shared_libs/product-notifications/content.ts +9 -0
- package/dist/bundling-sources/shared_libs/product-notifications/email.ts +91 -13
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +3 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +41 -24
- package/dist/bundling-sources/shared_libs/security/attested-client-ip.ts +91 -0
- package/dist/bundling-sources/shared_libs/security/internal-actor.ts +0 -11
- package/dist/cli/{auth-6HJXNWUG.mjs → auth-LZLBR4C3.mjs} +5 -4
- package/dist/cli/auth-XPGKBJKB.js +41 -0
- package/dist/cli/{billing-6P5HO6QG.js → billing-6TJPNJQD.js} +152 -78
- package/dist/cli/{billing-MJ42N7YF.mjs → billing-OTOP5RE4.mjs} +84 -10
- package/dist/cli/{chunk-FCAZQ7WV.js → chunk-2NISBXMN.js} +52 -50
- package/dist/cli/{chunk-PNATXKLP.js → chunk-2ZIRCBYG.js} +6 -6
- package/dist/cli/{chunk-5FDKJQZE.js → chunk-3BOIOCNX.js} +1 -1
- package/dist/cli/chunk-3BVLLJ3H.mjs +1038 -0
- package/dist/cli/{chunk-FJZILBL7.mjs → chunk-3U5EAP6E.mjs} +5 -5
- package/dist/cli/{describe-FRAVCY5F.mjs → chunk-4YZKBBLZ.mjs} +19 -36
- package/dist/cli/{chunk-QWRHGGUH.js → chunk-5DRNNC72.js} +20 -2
- package/dist/cli/{chunk-Z2GUFYT6.js → chunk-5LEAXRHV.js} +11 -11
- package/dist/cli/{chunk-5MDIZX7M.js → chunk-5LHXOIPT.js} +8 -6
- package/dist/cli/{chunk-NMJ4D2WO.js → chunk-6PMCRYDA.js} +216 -91
- package/dist/cli/{chunk-EBU7LQ64.js → chunk-6V7KVRR5.js} +3 -3
- package/dist/cli/{chunk-MGXEUZHL.mjs → chunk-7D6X7IXW.mjs} +7 -5
- package/dist/cli/{chunk-SAZFZQRI.js → chunk-7FCYPAPP.js} +2 -2
- package/dist/cli/{chunk-ACCR7POB.js → chunk-7XYDDCQ2.js} +27 -27
- package/dist/cli/{chunk-5IYOUBFZ.js → chunk-ALZBANZI.js} +28 -54
- package/dist/cli/{chunk-3DNKFH2G.mjs → chunk-BAPTQDLF.mjs} +19 -1
- package/dist/cli/chunk-BGNWI3KH.js +827 -0
- package/dist/cli/{chunk-V7REJRDZ.mjs → chunk-C25QE4CH.mjs} +1 -1
- package/dist/cli/{chunk-FGMX4HUZ.js → chunk-CBZP6J3V.js} +29 -27
- package/dist/cli/{chunk-QEYHTIV4.mjs → chunk-CTQ56DXP.mjs} +10 -1
- package/dist/cli/{chunk-IHHLTHE7.mjs → chunk-CVQ7N5CV.mjs} +267 -38
- package/dist/cli/{chunk-7DH2FD7Y.mjs → chunk-D464JW3N.mjs} +5 -85
- package/dist/cli/{chunk-MEAIOXJL.mjs → chunk-DHXCBITQ.mjs} +7 -5
- package/dist/cli/chunk-F2RHUPVH.mjs +827 -0
- package/dist/cli/chunk-F6QV42MC.mjs +91 -0
- package/dist/cli/{chunk-OZBWRICM.js → chunk-FK2HNDCN.js} +2 -2
- package/dist/cli/{chunk-BGY2PLP7.mjs → chunk-GUT7CLOL.mjs} +23 -49
- package/dist/cli/{chunk-RY4IVOU3.mjs → chunk-I624J4H5.mjs} +16 -806
- package/dist/cli/{chunk-Z2XUZC34.js → chunk-IAYSWZDJ.js} +188 -76
- package/dist/cli/{chunk-FGLKOWSC.mjs → chunk-IKWRUNAP.mjs} +1 -1
- package/dist/cli/{chunk-KCCOQ5G5.js → chunk-JVDKZJUH.js} +511 -282
- package/dist/cli/{chunk-HDFRJ4IT.mjs → chunk-JVHOS3K3.mjs} +177 -65
- package/dist/cli/chunk-LYFKBLJI.mjs +1039 -0
- package/dist/cli/{chunk-SLEUWLJE.mjs → chunk-MSY22NQW.mjs} +5 -5
- package/dist/cli/{chunk-5FY72YOV.js → chunk-NAPTMYTY.js} +8 -8
- package/dist/cli/{chunk-O6QOMHCH.js → chunk-NDHJR2WZ.js} +37 -35
- package/dist/cli/{chunk-KXMNM4AQ.js → chunk-NMU3VR5U.js} +4 -5
- package/dist/cli/chunk-NTLI6P6Y.mjs +19 -0
- package/dist/cli/{chunk-RFONC4WJ.mjs → chunk-O3BJYD6D.mjs} +3 -3
- package/dist/cli/{describe-2WQY7ZCY.js → chunk-PVY4DPPF.js} +27 -44
- package/dist/cli/{chunk-WIYWSYDS.mjs → chunk-Q2EIZKVX.mjs} +3 -3
- package/dist/cli/{chunk-VZBCEA5S.mjs → chunk-RD6IQ2JY.mjs} +223 -92
- package/dist/cli/chunk-RGOUCIIZ.js +1039 -0
- package/dist/cli/{chunk-EIMG75BT.mjs → chunk-S3A4IXBQ.mjs} +4 -5
- package/dist/cli/{chunk-QIW7TVV6.mjs → chunk-S4XQCFES.mjs} +14 -12
- package/dist/cli/chunk-SKU6ECIY.js +19 -0
- package/dist/cli/{chunk-CRYOUPEB.js → chunk-TIRBDQ3W.js} +16 -16
- package/dist/cli/{chunk-G7L27KZB.mjs → chunk-TKAQR3IB.mjs} +31 -21
- package/dist/cli/{chunk-MDJPEGVN.js → chunk-UC4SFYNU.js} +392 -261
- package/dist/cli/{chunk-3BMLICF7.mjs → chunk-UIURR26V.mjs} +13 -8
- package/dist/cli/{chunk-TNMBPMMC.js → chunk-UROQDCVW.js} +13 -4
- package/dist/cli/{chunk-R64BGGRQ.mjs → chunk-VDGTTH7K.mjs} +2 -2
- package/dist/cli/chunk-VLEVVDWG.js +91 -0
- package/dist/cli/{chunk-R2GLGLDR.mjs → chunk-VPHN2HAL.mjs} +216 -91
- package/dist/cli/chunk-VY2GBNTX.js +1038 -0
- package/dist/cli/{chunk-CFUTOWE4.js → chunk-WG3KGAII.js} +8 -88
- package/dist/cli/{chunk-QAJAJPKK.mjs → chunk-WUMIYOXQ.mjs} +4 -2
- package/dist/cli/{chunk-SCIR5JXW.js → chunk-WUZS2HK6.js} +56 -51
- package/dist/cli/{chunk-T3MVIPHG.mjs → chunk-XDWS2JJT.mjs} +1 -1
- package/dist/cli/{chunk-KGQNIA37.js → chunk-XQCTG5OO.js} +44 -34
- package/dist/cli/{chunk-KVJ5VHW5.mjs → chunk-XW2JIYG7.mjs} +2 -2
- package/dist/cli/chunk-YGGIZ3VT.js +920 -0
- package/dist/cli/command-docs.d.mts +5 -0
- package/dist/cli/command-docs.d.ts +5 -0
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-NX7NO3O6.js → csv-EH5QWR4O.js} +13 -12
- package/dist/cli/{csv-DQ6GW5B5.mjs → csv-OK45Z5XQ.mjs} +4 -3
- package/dist/cli/{db-R72DFMP6.js → db-3ESJKETS.js} +30 -27
- package/dist/cli/{db-2YP33M4K.mjs → db-6Z5E4HKN.mjs} +10 -7
- package/dist/cli/describe-PNDQB7YS.mjs +48 -0
- package/dist/cli/describe-QUF7VTTR.js +48 -0
- package/dist/cli/describe-core.d.mts +153 -5
- package/dist/cli/describe-core.d.ts +153 -5
- package/dist/cli/describe-core.js +9 -5
- package/dist/cli/describe-core.mjs +10 -6
- package/dist/cli/{executions-WFBU7L2Q.mjs → executions-2NTWQFEG.mjs} +7 -5
- package/dist/cli/{executions-ZLHD4QIT.js → executions-KUOBRX5V.js} +9 -7
- package/dist/cli/{feedback-CN3HJFVF.mjs → feedback-7RPRMSGY.mjs} +6 -5
- package/dist/cli/{feedback-NDV6TPHG.js → feedback-UPHAZJ4C.js} +10 -9
- package/dist/cli/getting-started.d.mts +6 -6
- package/dist/cli/getting-started.d.ts +6 -6
- package/dist/cli/getting-started.js +2 -2
- package/dist/cli/getting-started.mjs +1 -1
- package/dist/cli/{git-QAD6E3HW.mjs → git-SCYP6WSZ.mjs} +5 -4
- package/dist/cli/git-UH653WHV.js +25 -0
- package/dist/cli/index.js +152 -142
- package/dist/cli/index.mjs +56 -46
- package/dist/cli/{legacy-noops-KVC5QJ74.js → legacy-noops-7XMFCVRG.js} +8 -7
- package/dist/cli/{legacy-noops-TPTKNBI2.mjs → legacy-noops-A4KYAGI6.mjs} +5 -4
- package/dist/cli/{monitors-SV57JFLO.mjs → monitors-FLC5J7RI.mjs} +19 -6
- package/dist/cli/{monitors-KCROV6PJ.js → monitors-NZV6IX5H.js} +103 -90
- package/dist/cli/{org-NJYX5743.js → org-IZ7UP3XF.js} +70 -67
- package/dist/cli/{org-KX6QIR7A.mjs → org-LUETJ7Z5.mjs} +9 -6
- package/dist/cli/pages-22ML3O7O.js +252 -0
- package/dist/cli/pages-EUX5EAGF.mjs +252 -0
- package/dist/cli/{play-IQQ57L7Z.mjs → play-CDHPAKKM.mjs} +512 -1508
- package/dist/cli/{play-32L7EQN4.js → play-USJBQADG.js} +1090 -2086
- package/dist/cli/{providers-4WEC2EQN.mjs → providers-CCXZ3SQF.mjs} +7 -5
- package/dist/cli/{providers-ZQV6QLVQ.js → providers-WFEUNPGC.js} +10 -8
- package/dist/cli/{quickstart-HKUSFADF.js → quickstart-O4JSUORZ.js} +13 -12
- package/dist/cli/{quickstart-RQ76RIUE.mjs → quickstart-ZUULI635.mjs} +5 -4
- package/dist/cli/run-ISDJYJMU.js +443 -0
- package/dist/cli/run-QJ4NX5F5.mjs +443 -0
- package/dist/cli/{search-ZRAVFBZC.mjs → search-IX3XKZJ3.mjs} +8 -6
- package/dist/cli/search-TIFNLRPM.js +32 -0
- package/dist/cli/{secrets-CMJOVNVH.mjs → secrets-7VUDXTUZ.mjs} +7 -5
- package/dist/cli/{secrets-J3G5Y43U.js → secrets-ELQSNCTR.js} +16 -14
- package/dist/cli/{sessions-WY7VN4AE.js → sessions-A3FG3AZX.js} +6 -5
- package/dist/cli/{sessions-MDQYY5CB.mjs → sessions-VOIQ62GB.mjs} +5 -4
- package/dist/cli/{settings-4RWZPCT5.mjs → settings-S6N6EFBG.mjs} +14 -11
- package/dist/cli/{settings-HTNTFKCE.js → settings-ZTXQEMZI.js} +80 -77
- package/dist/cli/{setup-P3GYYZWG.mjs → setup-AYPIK4JE.mjs} +12 -10
- package/dist/cli/{setup-QGCAP62X.js → setup-Y3WOIFLS.js} +53 -51
- package/dist/cli/{skills-7NAE4ICL.mjs → skills-5SF5QWNI.mjs} +7 -6
- package/dist/cli/skills-MWFRMG3H.js +31 -0
- package/dist/cli/tools-3XNZ4J64.mjs +55 -0
- package/dist/cli/tools-XEC4OD3R.js +55 -0
- package/dist/cli/{update-GODLRKNB.mjs → update-3U4OVX5R.mjs} +9 -8
- package/dist/cli/update-DWYEYTZE.js +33 -0
- package/dist/cli/{workflow-4BXOUVEO.mjs → workflow-2M5JP7SA.mjs} +10 -8
- package/dist/cli/{workflow-AO3A6LXN.js → workflow-RM7H7555.js} +20 -18
- package/dist/client-DS2IWYZF.d.ts +10 -0
- package/dist/client-DTwnz_AW.d.mts +10 -0
- package/dist/{client-CYqG23K1.d.ts → client-core-B_6HAIBy.d.ts} +385 -12
- package/dist/{client-BbU5_j7n.d.mts → client-core-DzBSlY1U.d.mts} +385 -12
- package/dist/{compiler-manifest-CWz_sNOQ.d.ts → compiler-manifest-Dcyd3-Zd.d.mts} +43 -1
- package/dist/{compiler-manifest-CWz_sNOQ.d.mts → compiler-manifest-Dcyd3-Zd.d.ts} +43 -1
- package/dist/errors-d-sTrZhe.d.mts +142 -0
- package/dist/errors-yQwfgrcX.d.ts +142 -0
- package/dist/{index-BF2JB_Ug.d.mts → index-C6oXchjN.d.mts} +1 -1
- package/dist/{index-4NPXDzlD.d.ts → index-P56zy_z5.d.ts} +1 -1
- package/dist/index.d.mts +11 -147
- package/dist/index.d.ts +11 -147
- package/dist/index.js +16 -12
- package/dist/index.mjs +15 -11
- package/dist/install-integrity.json +141 -104
- 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 +2 -1
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/play-description.js +2 -2
- package/dist/plays/play-description.mjs +1 -1
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- 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 +17 -0
- package/dist/server.d.ts +17 -0
- package/dist/server.js +76 -0
- package/dist/server.mjs +76 -0
- package/package.json +6 -1
- package/dist/cli/auth-IACERYQH.js +0 -40
- package/dist/cli/chunk-PQUUWFXY.js +0 -95
- package/dist/cli/chunk-YBWAG72P.mjs +0 -95
- package/dist/cli/chunk-YQDUODZW.js +0 -1710
- package/dist/cli/git-JVI36ZFV.js +0 -24
- package/dist/cli/search-75X5LTDE.js +0 -30
- package/dist/cli/skills-BKJ53JOQ.js +0 -30
- package/dist/cli/tools-COWMIEJ6.mjs +0 -45
- package/dist/cli/tools-TASOCE7I.js +0 -45
- package/dist/cli/update-SJIKVME6.js +0 -32
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { capacityShedRetryAfterMs } from '../app-runtime-api';
|
|
1
2
|
import type {
|
|
2
3
|
PlayRunnerBudgetCharge,
|
|
3
4
|
PlayRunnerBudgetChargeResult,
|
|
@@ -11,12 +12,29 @@ const RESERVATION_BLOCKS: Record<string, number> = {
|
|
|
11
12
|
waterfallStep: 256,
|
|
12
13
|
};
|
|
13
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Longest one charge waits out load shedding, measured from when it was
|
|
17
|
+
* requested so that time queued behind an earlier shed charge counts. A shed
|
|
18
|
+
* rate-state acquire waits longer (`RATE_ACQUIRE_MAX_WAIT_MS`), and both add to
|
|
19
|
+
* one tool call's time outside its `timeoutMs`. Past this a shed is treated
|
|
20
|
+
* like any other failure and surfaces, because the run cannot prove it is
|
|
21
|
+
* inside its budget.
|
|
22
|
+
*/
|
|
23
|
+
export const BUDGET_CHARGE_SHED_WAIT_BUDGET_MS = 120_000;
|
|
24
|
+
|
|
14
25
|
export type BudgetStateChargePort = (input: {
|
|
15
26
|
rootRunId: string;
|
|
16
27
|
reservationId: string;
|
|
17
28
|
charges: readonly PlayRunnerBudgetCharge[];
|
|
18
29
|
}) => Promise<PlayRunnerBudgetChargeResult>;
|
|
19
30
|
|
|
31
|
+
export interface BlockReservingBudgetStateOptions {
|
|
32
|
+
now?: () => number;
|
|
33
|
+
sleep?: (ms: number) => Promise<void>;
|
|
34
|
+
/** Source in [0,1) for the shed wait's jitter. Tests pin it. */
|
|
35
|
+
jitter?: () => number;
|
|
36
|
+
}
|
|
37
|
+
|
|
20
38
|
/**
|
|
21
39
|
* Reserves durable budget in coarse blocks while charging each local operation
|
|
22
40
|
* exactly once. The durable port remains the authority across sandboxes and
|
|
@@ -25,14 +43,29 @@ export type BudgetStateChargePort = (input: {
|
|
|
25
43
|
export class BlockReservingBudgetStateBackend implements BudgetStateBackend {
|
|
26
44
|
private readonly remaining = new Map<string, number>();
|
|
27
45
|
private chargeTail: Promise<void> = Promise.resolve();
|
|
46
|
+
private readonly now: () => number;
|
|
47
|
+
private readonly sleep: (ms: number) => Promise<void>;
|
|
48
|
+
private readonly jitter: () => number;
|
|
28
49
|
|
|
29
|
-
constructor(
|
|
50
|
+
constructor(
|
|
51
|
+
private readonly chargePort: BudgetStateChargePort,
|
|
52
|
+
options: BlockReservingBudgetStateOptions = {},
|
|
53
|
+
) {
|
|
54
|
+
this.now = options.now ?? (() => Date.now());
|
|
55
|
+
this.sleep =
|
|
56
|
+
options.sleep ??
|
|
57
|
+
((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
58
|
+
this.jitter = options.jitter ?? Math.random;
|
|
59
|
+
}
|
|
30
60
|
|
|
31
61
|
charge(input: {
|
|
32
62
|
rootRunId: string;
|
|
33
63
|
charges: readonly PlayRunnerBudgetCharge[];
|
|
34
64
|
}): Promise<PlayRunnerBudgetChargeResult> {
|
|
35
|
-
const
|
|
65
|
+
const requestedAtMs = this.now();
|
|
66
|
+
const result = this.chargeTail.then(() =>
|
|
67
|
+
this.chargeSerial(input, requestedAtMs),
|
|
68
|
+
);
|
|
36
69
|
this.chargeTail = result.then(
|
|
37
70
|
() => undefined,
|
|
38
71
|
() => undefined,
|
|
@@ -40,10 +73,13 @@ export class BlockReservingBudgetStateBackend implements BudgetStateBackend {
|
|
|
40
73
|
return result;
|
|
41
74
|
}
|
|
42
75
|
|
|
43
|
-
private async chargeSerial(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
76
|
+
private async chargeSerial(
|
|
77
|
+
input: {
|
|
78
|
+
rootRunId: string;
|
|
79
|
+
charges: readonly PlayRunnerBudgetCharge[];
|
|
80
|
+
},
|
|
81
|
+
requestedAtMs: number,
|
|
82
|
+
): Promise<PlayRunnerBudgetChargeResult> {
|
|
47
83
|
const reservations: PlayRunnerBudgetCharge[] = [];
|
|
48
84
|
const exactReservations: PlayRunnerBudgetCharge[] = [];
|
|
49
85
|
const previousRemaining = new Map<string, number | undefined>();
|
|
@@ -84,14 +120,33 @@ export class BlockReservingBudgetStateBackend implements BudgetStateBackend {
|
|
|
84
120
|
charges: readonly PlayRunnerBudgetCharge[],
|
|
85
121
|
reservationId: string,
|
|
86
122
|
) => {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
123
|
+
let resent = false;
|
|
124
|
+
while (true) {
|
|
125
|
+
try {
|
|
126
|
+
return await request(charges, reservationId);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
const normalized = normalizeBudgetError(error);
|
|
129
|
+
if (normalized instanceof BudgetStateLimitError) throw normalized;
|
|
130
|
+
const shedRetryAfterMs = capacityShedRetryAfterMs(error);
|
|
131
|
+
if (shedRetryAfterMs !== null) {
|
|
132
|
+
// Back-pressure from a working store: wait as acquire does, then
|
|
133
|
+
// re-send. The reservation id is what makes this safe, not the
|
|
134
|
+
// shed. An earlier delivery of this request may have committed
|
|
135
|
+
// with its response lost, and the store replays that id instead
|
|
136
|
+
// of charging it again.
|
|
137
|
+
const waitMs =
|
|
138
|
+
shedRetryAfterMs + Math.round(this.jitter() * shedRetryAfterMs);
|
|
139
|
+
if (
|
|
140
|
+
this.now() - requestedAtMs + waitMs <
|
|
141
|
+
BUDGET_CHARGE_SHED_WAIT_BUDGET_MS
|
|
142
|
+
) {
|
|
143
|
+
await this.sleep(waitMs);
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if (resent) throw normalized;
|
|
148
|
+
resent = true;
|
|
149
|
+
}
|
|
95
150
|
}
|
|
96
151
|
};
|
|
97
152
|
try {
|
|
@@ -163,6 +163,12 @@ export interface PlayExecutionGovernor {
|
|
|
163
163
|
*/
|
|
164
164
|
tryAcquireToolExecutionSlot(): WorkLease | null;
|
|
165
165
|
|
|
166
|
+
/** Process-local live resource signal; never part of a stored launch. */
|
|
167
|
+
registerExternalExecutionPressure?(input: {
|
|
168
|
+
read(): boolean;
|
|
169
|
+
subscribe(changed: () => void): () => void;
|
|
170
|
+
}): () => void;
|
|
171
|
+
|
|
166
172
|
/**
|
|
167
173
|
* Admit one brief runtime-to-app HTTP fetch/body exchange. Long provider or
|
|
168
174
|
* fixture residence happens before this edge and must not occupy this slot.
|
|
@@ -279,7 +285,27 @@ interface GovernorInput {
|
|
|
279
285
|
class Semaphore {
|
|
280
286
|
private inFlight = 0;
|
|
281
287
|
private readonly waiters: Array<(reserved: boolean) => void> = [];
|
|
282
|
-
constructor(
|
|
288
|
+
constructor(
|
|
289
|
+
private readonly limit: number,
|
|
290
|
+
private readonly readLimit?: () => number,
|
|
291
|
+
) {}
|
|
292
|
+
|
|
293
|
+
private capacity(): number {
|
|
294
|
+
if (!this.readLimit) return this.limit;
|
|
295
|
+
const capacity = this.readLimit();
|
|
296
|
+
return Number.isSafeInteger(capacity) && capacity > 0
|
|
297
|
+
? Math.min(this.limit, capacity)
|
|
298
|
+
: this.limit;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/** Re-read policy before reserving each FIFO handoff. */
|
|
302
|
+
refresh(): void {
|
|
303
|
+
while (this.waiters.length > 0 && this.inFlight < this.capacity()) {
|
|
304
|
+
const next = this.waiters.shift()!;
|
|
305
|
+
this.inFlight += 1;
|
|
306
|
+
next(true);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
283
309
|
|
|
284
310
|
private lease(): WorkLease {
|
|
285
311
|
this.inFlight += 1;
|
|
@@ -294,19 +320,18 @@ class Semaphore {
|
|
|
294
320
|
if (released) return;
|
|
295
321
|
released = true;
|
|
296
322
|
this.inFlight = Math.max(0, this.inFlight - 1);
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
// release and the promise continuation must not overtake FIFO work.
|
|
301
|
-
this.inFlight += 1;
|
|
302
|
-
next(true);
|
|
303
|
-
}
|
|
323
|
+
// Reserve before waking, with the current pressure verdict. A decrease
|
|
324
|
+
// drains existing work instead of revoking its acquired identity.
|
|
325
|
+
this.refresh();
|
|
304
326
|
},
|
|
305
327
|
};
|
|
306
328
|
}
|
|
307
329
|
|
|
308
330
|
tryAcquire(): WorkLease | null {
|
|
309
|
-
|
|
331
|
+
this.refresh();
|
|
332
|
+
return this.waiters.length > 0 || this.inFlight >= this.capacity()
|
|
333
|
+
? null
|
|
334
|
+
: this.lease();
|
|
310
335
|
}
|
|
311
336
|
|
|
312
337
|
async acquire(signal?: AbortSignal): Promise<WorkLease> {
|
|
@@ -319,7 +344,8 @@ class Semaphore {
|
|
|
319
344
|
? signal.reason
|
|
320
345
|
: new Error('Slot acquire aborted.');
|
|
321
346
|
}
|
|
322
|
-
|
|
347
|
+
this.refresh();
|
|
348
|
+
while (this.waiters.length > 0 || this.inFlight >= this.capacity()) {
|
|
323
349
|
const reserved = await new Promise<boolean>((resolve, reject) => {
|
|
324
350
|
const onResolve = (wasReserved: boolean) => {
|
|
325
351
|
signal?.removeEventListener('abort', onAbort);
|
|
@@ -328,6 +354,7 @@ class Semaphore {
|
|
|
328
354
|
const onAbort = () => {
|
|
329
355
|
const idx = this.waiters.indexOf(onResolve);
|
|
330
356
|
if (idx >= 0) this.waiters.splice(idx, 1);
|
|
357
|
+
this.refresh();
|
|
331
358
|
reject(
|
|
332
359
|
signal?.reason instanceof Error
|
|
333
360
|
? signal.reason
|
|
@@ -336,6 +363,8 @@ class Semaphore {
|
|
|
336
363
|
};
|
|
337
364
|
this.waiters.push(onResolve);
|
|
338
365
|
signal?.addEventListener('abort', onAbort, { once: true });
|
|
366
|
+
if (signal?.aborted) onAbort();
|
|
367
|
+
else this.refresh();
|
|
339
368
|
});
|
|
340
369
|
if (signal?.aborted) {
|
|
341
370
|
// A release may have handed this waiter capacity immediately before
|
|
@@ -394,7 +423,17 @@ export function createPlayExecutionGovernor(
|
|
|
394
423
|
input.resume ?? createDefaultGovernanceSnapshot(input.scope);
|
|
395
424
|
|
|
396
425
|
const rowSlots = new Semaphore(policy.concurrency.rowMax);
|
|
397
|
-
const
|
|
426
|
+
const externalPressureReaders = new Set<() => boolean>();
|
|
427
|
+
const readExternalCapacity = (): number => {
|
|
428
|
+
for (const read of externalPressureReaders) {
|
|
429
|
+
if (read()) return 1;
|
|
430
|
+
}
|
|
431
|
+
return policy.concurrency.toolCalls;
|
|
432
|
+
};
|
|
433
|
+
const toolSlots = new Semaphore(
|
|
434
|
+
policy.concurrency.toolCalls,
|
|
435
|
+
readExternalCapacity,
|
|
436
|
+
);
|
|
398
437
|
const integrationRequestSlots = new Semaphore(
|
|
399
438
|
policy.concurrency.integrationRequests,
|
|
400
439
|
);
|
|
@@ -507,6 +546,7 @@ export function createPlayExecutionGovernor(
|
|
|
507
546
|
async function resolveAdaptivePacing(toolId: string): Promise<{
|
|
508
547
|
provider: string;
|
|
509
548
|
rules: PacingRule[];
|
|
549
|
+
refreshRules?: () => readonly PacingRule[];
|
|
510
550
|
}> {
|
|
511
551
|
const resolvedPacing = await input.resolvePacing(toolId);
|
|
512
552
|
const declaredPacing =
|
|
@@ -539,18 +579,30 @@ export function createPlayExecutionGovernor(
|
|
|
539
579
|
return pacing;
|
|
540
580
|
}
|
|
541
581
|
const fallback = defaultPacingForTool(toolId, policy);
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
582
|
+
const resolveCurrentPacing = () => {
|
|
583
|
+
const pacing = adaptiveAdmission.resolvePacing({
|
|
584
|
+
orgId: input.scope.orgId,
|
|
585
|
+
toolId,
|
|
586
|
+
declaredPacing,
|
|
587
|
+
fallbackPacing: {
|
|
588
|
+
...fallback,
|
|
589
|
+
provider: resolvedPacing?.provider ?? fallback.provider,
|
|
590
|
+
},
|
|
591
|
+
});
|
|
592
|
+
providerByTool.set(toolId, pacing.provider);
|
|
593
|
+
pacingRulesByTool.set(toolId, pacing.rules);
|
|
594
|
+
return pacing;
|
|
595
|
+
};
|
|
596
|
+
const pacing = resolveCurrentPacing();
|
|
597
|
+
return {
|
|
598
|
+
...pacing,
|
|
599
|
+
// An unhinted call can wait across several learned-rate changes. Keep
|
|
600
|
+
// the existing controller authoritative when that waiter is reconsidered,
|
|
601
|
+
// rather than pinning its initial cold-start guess for the whole wait.
|
|
602
|
+
...(!declaredPacing
|
|
603
|
+
? { refreshRules: () => resolveCurrentPacing().rules }
|
|
604
|
+
: {}),
|
|
605
|
+
};
|
|
554
606
|
}
|
|
555
607
|
|
|
556
608
|
const budgetLimit = (kind: BudgetKind): number => {
|
|
@@ -623,6 +675,21 @@ export function createPlayExecutionGovernor(
|
|
|
623
675
|
|
|
624
676
|
tryAcquireToolExecutionSlot: () => toolSlots.tryAcquire(),
|
|
625
677
|
|
|
678
|
+
registerExternalExecutionPressure(pressureInput) {
|
|
679
|
+
const read = () => pressureInput.read();
|
|
680
|
+
externalPressureReaders.add(read);
|
|
681
|
+
const unsubscribe = pressureInput.subscribe(() => toolSlots.refresh());
|
|
682
|
+
toolSlots.refresh();
|
|
683
|
+
let removed = false;
|
|
684
|
+
return () => {
|
|
685
|
+
if (removed) return;
|
|
686
|
+
removed = true;
|
|
687
|
+
unsubscribe();
|
|
688
|
+
externalPressureReaders.delete(read);
|
|
689
|
+
toolSlots.refresh();
|
|
690
|
+
};
|
|
691
|
+
},
|
|
692
|
+
|
|
626
693
|
tryAcquireIntegrationRequestSlot: () =>
|
|
627
694
|
integrationRequestSlots.tryAcquire(),
|
|
628
695
|
|
|
@@ -672,6 +739,7 @@ export function createPlayExecutionGovernor(
|
|
|
672
739
|
bucketId: rateScope[0],
|
|
673
740
|
rateScopeToken: rateScope[1],
|
|
674
741
|
rules: pacing.rules,
|
|
742
|
+
...(pacing.refreshRules ? { refreshRules: pacing.refreshRules } : {}),
|
|
675
743
|
signal: opts?.signal,
|
|
676
744
|
yieldProviderHolds: opts?.yieldProviderHolds,
|
|
677
745
|
...(opts?.retryPriority ? { retryPriority: true } : {}),
|
|
@@ -883,6 +951,8 @@ function createInlineChildGovernor(
|
|
|
883
951
|
acquireToolSlot: (toolId, opts) => root.acquireToolSlot(toolId, opts),
|
|
884
952
|
acquireToolExecutionSlot: (opts) => root.acquireToolExecutionSlot(opts),
|
|
885
953
|
tryAcquireToolExecutionSlot: () => root.tryAcquireToolExecutionSlot(),
|
|
954
|
+
registerExternalExecutionPressure: (input) =>
|
|
955
|
+
root.registerExternalExecutionPressure?.(input) ?? (() => {}),
|
|
886
956
|
tryAcquireIntegrationRequestSlot: () =>
|
|
887
957
|
root.tryAcquireIntegrationRequestSlot(),
|
|
888
958
|
acquireIntegrationRequestSlot: (opts) =>
|
package/dist/bundling-sources/shared_libs/play-runtime/governor/in-memory-rate-state-backend.ts
CHANGED
|
@@ -45,15 +45,16 @@ export class InMemoryRateStateBackend implements RateStateBackend {
|
|
|
45
45
|
async acquire(input: {
|
|
46
46
|
bucketId: string;
|
|
47
47
|
rules: readonly PacingRule[];
|
|
48
|
+
refreshRules?: () => readonly PacingRule[];
|
|
48
49
|
signal?: AbortSignal;
|
|
49
50
|
}): Promise<PacingPermit> {
|
|
50
51
|
const { bucketId, rules, signal } = input;
|
|
51
52
|
if (rules.length === 0) {
|
|
52
53
|
return noopPacingPermit();
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
const fixedOrdered = input.refreshRules
|
|
56
|
+
? null
|
|
57
|
+
: [...rules].sort((a, b) => a.ruleId.localeCompare(b.ruleId));
|
|
57
58
|
while (true) {
|
|
58
59
|
if (signal?.aborted) {
|
|
59
60
|
throw signal.reason instanceof Error
|
|
@@ -61,6 +62,13 @@ export class InMemoryRateStateBackend implements RateStateBackend {
|
|
|
61
62
|
: new Error('Rate-state acquire aborted.');
|
|
62
63
|
}
|
|
63
64
|
const decision = await this.withLock(() => {
|
|
65
|
+
// Re-read the existing adaptive policy after every wait, under the
|
|
66
|
+
// same admission lock as the debit. Declared rules have no refresher.
|
|
67
|
+
const ordered =
|
|
68
|
+
fixedOrdered ??
|
|
69
|
+
[...input.refreshRules!()].sort((a, b) =>
|
|
70
|
+
a.ruleId.localeCompare(b.ruleId),
|
|
71
|
+
);
|
|
64
72
|
const now = this.now();
|
|
65
73
|
let waitMs = 0;
|
|
66
74
|
|
|
@@ -92,10 +100,13 @@ export class InMemoryRateStateBackend implements RateStateBackend {
|
|
|
92
100
|
state.startedInWindow += 1;
|
|
93
101
|
if (rule.maxConcurrency != null) state.activeCount += 1;
|
|
94
102
|
}
|
|
95
|
-
return { acquired: true, waitMs: 0 } as const;
|
|
103
|
+
return { acquired: true, waitMs: 0, rules: ordered } as const;
|
|
96
104
|
});
|
|
97
105
|
|
|
98
106
|
if (decision.acquired) {
|
|
107
|
+
// Release/cancel must use the rules actually debited at this grant,
|
|
108
|
+
// even if the learned policy changes again while the call is resident.
|
|
109
|
+
const ordered = decision.rules;
|
|
99
110
|
let settled = false;
|
|
100
111
|
const releaseConcurrency = async (refundRateReservation: boolean) => {
|
|
101
112
|
await this.withLock(() => {
|
|
@@ -86,6 +86,8 @@ export const DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS = 64;
|
|
|
86
86
|
// remain guarded independently by `integrationRequests` below.
|
|
87
87
|
export const MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS = 1_000;
|
|
88
88
|
export const MAX_CONFIGURABLE_CONCURRENT_ROWS = 1_000;
|
|
89
|
+
/** Automatic rows keep a conservative window when the heap cannot be read. */
|
|
90
|
+
export const DEFAULT_AUTOMATIC_UNMEASURED_ROW_CONCURRENCY = 20;
|
|
89
91
|
// Dispatch groups are only a scheduler envelope. The external-call semaphore
|
|
90
92
|
// remains the resource bound, so do not impose a lower hidden ceiling here.
|
|
91
93
|
// This lets an explicit run-level call limit describe the actual concurrency
|
|
@@ -144,19 +146,16 @@ export function resolveMaxConcurrentRows(
|
|
|
144
146
|
*/
|
|
145
147
|
export const SHARED_EXECUTION_POLICY: ResolvedExecutionPolicy = {
|
|
146
148
|
concurrency: {
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
//
|
|
153
|
-
|
|
154
|
-
//
|
|
155
|
-
//
|
|
156
|
-
|
|
157
|
-
rowMax: 1_000,
|
|
158
|
-
// Global logical-call backstop. The default is intentionally close to the
|
|
159
|
-
// standard row cohort so slow small responses do not serialize most rows.
|
|
149
|
+
// The default is an adaptive ceiling, not an opening wave. The map's
|
|
150
|
+
// existing byte, heap, RSS and event-loop admission chooses the live width;
|
|
151
|
+
// an unmeasured automatic map uses the named conservative fallback above.
|
|
152
|
+
// Provider residence and provider pacing have their own unchanged limits.
|
|
153
|
+
rowDefault: MAX_CONFIGURABLE_CONCURRENT_ROWS,
|
|
154
|
+
// Explicit customer settings remain ceilings and are never widened.
|
|
155
|
+
rowMax: MAX_CONFIGURABLE_CONCURRENT_ROWS,
|
|
156
|
+
// Logical external-call backstop, independent of the adaptive row window.
|
|
157
|
+
// Rows waiting for this capacity still count toward memory admission.
|
|
158
|
+
|
|
160
159
|
// Runs may request a value through the validated 1..1000 launch contract;
|
|
161
160
|
// provider pacing and the runner-owned hard ceiling still apply.
|
|
162
161
|
toolCalls: DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS,
|
|
@@ -247,6 +246,15 @@ export function resolveExecutionPolicy(
|
|
|
247
246
|
};
|
|
248
247
|
}
|
|
249
248
|
|
|
249
|
+
/** The canonical authored-width test; other values use automatic admission. */
|
|
250
|
+
export function hasExplicitRowConcurrency(
|
|
251
|
+
requested: unknown,
|
|
252
|
+
): requested is number {
|
|
253
|
+
return (
|
|
254
|
+
typeof requested === 'number' && Number.isFinite(requested) && requested > 0
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
250
258
|
/**
|
|
251
259
|
* Effective row concurrency for a map: an explicit positive request clamped to
|
|
252
260
|
* `[1, rowMax]`, otherwise the default. Single helper, used by both substrates.
|
|
@@ -257,11 +265,7 @@ export function resolveRowConcurrency(
|
|
|
257
265
|
runMaximum?: number | null,
|
|
258
266
|
): number {
|
|
259
267
|
const normalizedRunMaximum = resolveMaxConcurrentRows(runMaximum);
|
|
260
|
-
if (
|
|
261
|
-
typeof requested === 'number' &&
|
|
262
|
-
Number.isFinite(requested) &&
|
|
263
|
-
requested > 0
|
|
264
|
-
) {
|
|
268
|
+
if (hasExplicitRowConcurrency(requested)) {
|
|
265
269
|
return Math.min(
|
|
266
270
|
Math.floor(requested),
|
|
267
271
|
normalizedRunMaximum ?? policy.concurrency.rowMax,
|
|
@@ -147,6 +147,11 @@ export interface RateStateBackend {
|
|
|
147
147
|
bucketId: string;
|
|
148
148
|
rateScopeToken?: string | null;
|
|
149
149
|
rules: readonly PacingRule[];
|
|
150
|
+
/**
|
|
151
|
+
* Local undeclared-provider policy, refreshed at the admission decision.
|
|
152
|
+
* Absent for declared quotas and DB-authoritative pacing. Never serialized.
|
|
153
|
+
*/
|
|
154
|
+
refreshRules?: () => readonly PacingRule[];
|
|
150
155
|
signal?: AbortSignal;
|
|
151
156
|
/** Managed Plays hand a shared provider hold to durable row suspension. */
|
|
152
157
|
yieldProviderHolds?: boolean;
|
|
@@ -73,6 +73,8 @@ export const PLAY_LAUNCH_ENVELOPE_FIELD_ROLES: {
|
|
|
73
73
|
runLedgerExecutorToken: 'detail',
|
|
74
74
|
runtimeAuthority: 'detail',
|
|
75
75
|
runtimeApiBaseUrl: 'detail',
|
|
76
|
+
arrayInputTerminalRetirementSupported: 'detail',
|
|
77
|
+
arrayInputTerminalProjectionOrigin: 'detail',
|
|
76
78
|
runtimeTokenOrigin: 'detail',
|
|
77
79
|
baseUrl: 'detail',
|
|
78
80
|
coordinatorUrl: 'detail',
|