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,12 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getActiveCliProgress
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DSKSFFK2.mjs";
|
|
4
4
|
import {
|
|
5
5
|
maybeReportAutomaticSkillsSyncFailure
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UC4BDZKI.mjs";
|
|
7
7
|
import {
|
|
8
|
+
DEFAULT_MAX_RETRIES,
|
|
8
9
|
DEFAULT_SKILL_AGENTS,
|
|
10
|
+
DEFAULT_TIMEOUT,
|
|
9
11
|
KNOWN_SKILL_AGENTS,
|
|
12
|
+
TRANSIENT_HTTP_STATUSES,
|
|
13
|
+
defaultRetryBackoffMs,
|
|
10
14
|
hasActivePluginSkills,
|
|
11
15
|
readSdkSkillsLocalVersion,
|
|
12
16
|
resolveApiKeyForBaseUrl,
|
|
@@ -14,17 +18,20 @@ import {
|
|
|
14
18
|
sdkCliStateDirPath,
|
|
15
19
|
skillsAgentPathSegment,
|
|
16
20
|
writeSdkSkillsLocalVersion
|
|
17
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-52Q5KETX.mjs";
|
|
18
22
|
import {
|
|
19
23
|
SDK_API_CONTRACT,
|
|
20
24
|
SDK_API_MAJOR,
|
|
21
25
|
SDK_VERSION,
|
|
22
26
|
deploymentProtectionHeaders,
|
|
23
27
|
detectAgentRuntime
|
|
24
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-S6W6SJ6E.mjs";
|
|
29
|
+
import {
|
|
30
|
+
DeeplineError
|
|
31
|
+
} from "./chunk-Z3A2S3QM.mjs";
|
|
25
32
|
import {
|
|
26
33
|
SDK_RELEASE
|
|
27
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-FXQ3JKE3.mjs";
|
|
28
35
|
|
|
29
36
|
// src/compat.ts
|
|
30
37
|
import { randomUUID } from "crypto";
|
|
@@ -176,18 +183,16 @@ function writeCachedCompatibility(baseUrl, command, skillsVersion, response) {
|
|
|
176
183
|
} catch {
|
|
177
184
|
}
|
|
178
185
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
186
|
+
function asError(error) {
|
|
187
|
+
return error instanceof Error ? error : new Error(String(error));
|
|
188
|
+
}
|
|
189
|
+
async function attemptSdkCompatibility(baseUrl, options, timeoutMs) {
|
|
183
190
|
const controller = new AbortController();
|
|
184
191
|
const abortFromCaller = () => controller.abort(options.signal?.reason);
|
|
185
192
|
if (options.signal?.aborted) abortFromCaller();
|
|
186
|
-
else
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
options.timeoutMs ?? CHECK_TIMEOUT_MS
|
|
190
|
-
);
|
|
193
|
+
else
|
|
194
|
+
options.signal?.addEventListener("abort", abortFromCaller, { once: true });
|
|
195
|
+
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
191
196
|
try {
|
|
192
197
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
193
198
|
url.searchParams.set("version", SDK_VERSION);
|
|
@@ -222,56 +227,132 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
222
227
|
},
|
|
223
228
|
signal: controller.signal
|
|
224
229
|
});
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
const { catalog_metadata: catalogMetadata, ...data } = raw;
|
|
233
|
-
if (options.persistCache !== false) {
|
|
234
|
-
writeCachedCompatibility(
|
|
235
|
-
baseUrl,
|
|
236
|
-
options.command,
|
|
237
|
-
options.skillsVersion,
|
|
238
|
-
data
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
if (data.ok && options.catalog && catalogMetadata && typeof catalogMetadata === "object" && "toolId" in catalogMetadata && catalogMetadata.toolId === options.catalog.toolId) {
|
|
242
|
-
options.catalog.acceptMetadata(catalogMetadata);
|
|
230
|
+
const text = await response.text();
|
|
231
|
+
controller.signal.throwIfAborted();
|
|
232
|
+
let raw;
|
|
233
|
+
try {
|
|
234
|
+
raw = JSON.parse(text);
|
|
235
|
+
} catch {
|
|
236
|
+
raw = null;
|
|
243
237
|
}
|
|
244
|
-
|
|
245
|
-
} catch (error) {
|
|
246
|
-
if (options.signal?.aborted) {
|
|
238
|
+
if (!raw || typeof raw.ok !== "boolean" || typeof raw.status !== "string") {
|
|
247
239
|
return {
|
|
248
|
-
|
|
249
|
-
|
|
240
|
+
ok: false,
|
|
241
|
+
transient: TRANSIENT_HTTP_STATUSES.has(response.status),
|
|
242
|
+
error: new Error(
|
|
243
|
+
`SDK compatibility endpoint returned a non-policy response (HTTP ${response.status}).`
|
|
244
|
+
)
|
|
250
245
|
};
|
|
251
246
|
}
|
|
252
|
-
const
|
|
247
|
+
const { catalog_metadata: catalogMetadata, ...data } = raw;
|
|
248
|
+
return { ok: true, response: data, catalogMetadata };
|
|
249
|
+
} catch (error) {
|
|
250
|
+
options.signal?.throwIfAborted();
|
|
251
|
+
return { ok: false, transient: true, error: asError(error) };
|
|
252
|
+
} finally {
|
|
253
|
+
clearTimeout(timeout);
|
|
254
|
+
options.signal?.removeEventListener("abort", abortFromCaller);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function acceptSdkCompatibility(baseUrl, options, attempt) {
|
|
258
|
+
const { response: data, catalogMetadata } = attempt;
|
|
259
|
+
if (options.persistCache !== false) {
|
|
260
|
+
writeCachedCompatibility(
|
|
253
261
|
baseUrl,
|
|
254
262
|
options.command,
|
|
255
|
-
options.skillsVersion
|
|
263
|
+
options.skillsVersion,
|
|
264
|
+
data
|
|
256
265
|
);
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
266
|
+
}
|
|
267
|
+
if (data.ok && options.catalog && catalogMetadata && typeof catalogMetadata === "object" && "toolId" in catalogMetadata && catalogMetadata.toolId === options.catalog.toolId) {
|
|
268
|
+
options.catalog.acceptMetadata(catalogMetadata);
|
|
269
|
+
}
|
|
270
|
+
return data;
|
|
271
|
+
}
|
|
272
|
+
async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
273
|
+
if (shouldSkipCompatibilityCheck()) {
|
|
274
|
+
return { response: null, error: null, live: false };
|
|
275
|
+
}
|
|
276
|
+
let attempt;
|
|
277
|
+
try {
|
|
278
|
+
attempt = await attemptSdkCompatibility(
|
|
279
|
+
baseUrl,
|
|
280
|
+
options,
|
|
281
|
+
options.timeoutMs ?? CHECK_TIMEOUT_MS
|
|
282
|
+
);
|
|
283
|
+
} catch (error) {
|
|
284
|
+
return { response: null, error: asError(error), live: false };
|
|
285
|
+
}
|
|
286
|
+
if (attempt.ok) {
|
|
267
287
|
return {
|
|
268
|
-
response:
|
|
269
|
-
error:
|
|
288
|
+
response: acceptSdkCompatibility(baseUrl, options, attempt),
|
|
289
|
+
error: null,
|
|
290
|
+
live: true
|
|
270
291
|
};
|
|
271
|
-
} finally {
|
|
272
|
-
clearTimeout(timeout);
|
|
273
|
-
options.signal?.removeEventListener("abort", abortFromCaller);
|
|
274
292
|
}
|
|
293
|
+
const cached = readCachedCompatibility(
|
|
294
|
+
baseUrl,
|
|
295
|
+
options.command,
|
|
296
|
+
options.skillsVersion
|
|
297
|
+
);
|
|
298
|
+
if (cached) {
|
|
299
|
+
if (options.persistCache !== false && options.timeoutMs !== void 0 && options.timeoutMs < CHECK_TIMEOUT_MS) {
|
|
300
|
+
invalidateCachedCompatibility(
|
|
301
|
+
baseUrl,
|
|
302
|
+
options.command,
|
|
303
|
+
options.skillsVersion
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
return { response: cached, error: null, live: false };
|
|
307
|
+
}
|
|
308
|
+
return { response: null, error: attempt.error, live: false };
|
|
309
|
+
}
|
|
310
|
+
async function requireSdkCompatibility(baseUrl, options = {}) {
|
|
311
|
+
if (shouldSkipCompatibilityCheck()) return null;
|
|
312
|
+
const maxRetries = options.maxRetries ?? DEFAULT_MAX_RETRIES;
|
|
313
|
+
const backoffMs = options.backoffMs ?? defaultRetryBackoffMs;
|
|
314
|
+
let attempt;
|
|
315
|
+
let attempts = 0;
|
|
316
|
+
for (; ; ) {
|
|
317
|
+
attempts += 1;
|
|
318
|
+
attempt = await attemptSdkCompatibility(
|
|
319
|
+
baseUrl,
|
|
320
|
+
options,
|
|
321
|
+
options.attemptTimeoutMs ?? DEFAULT_TIMEOUT
|
|
322
|
+
);
|
|
323
|
+
if (attempt.ok) return acceptSdkCompatibility(baseUrl, options, attempt);
|
|
324
|
+
if (!attempt.transient || attempts > maxRetries) break;
|
|
325
|
+
await sleepUnlessAborted(backoffMs(attempts), options.signal);
|
|
326
|
+
}
|
|
327
|
+
const cached = readCachedCompatibility(
|
|
328
|
+
baseUrl,
|
|
329
|
+
options.command,
|
|
330
|
+
options.skillsVersion
|
|
331
|
+
);
|
|
332
|
+
if (cached) return cached;
|
|
333
|
+
throw Object.assign(
|
|
334
|
+
new DeeplineError(
|
|
335
|
+
`Could not read the Deepline SDK compatibility policy from ${baseUrl} after ${attempts} attempt${attempts === 1 ? "" : "s"}: ${attempt.error.message}`,
|
|
336
|
+
void 0,
|
|
337
|
+
"SDK_COMPATIBILITY_UNAVAILABLE",
|
|
338
|
+
{ attempts, transient: attempt.transient }
|
|
339
|
+
),
|
|
340
|
+
{ cause: attempt.error }
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
function sleepUnlessAborted(ms, signal) {
|
|
344
|
+
signal?.throwIfAborted();
|
|
345
|
+
return new Promise((resolve, reject) => {
|
|
346
|
+
const onAbort = () => {
|
|
347
|
+
clearTimeout(timer);
|
|
348
|
+
reject(signal?.reason);
|
|
349
|
+
};
|
|
350
|
+
const timer = setTimeout(() => {
|
|
351
|
+
signal?.removeEventListener("abort", onAbort);
|
|
352
|
+
resolve();
|
|
353
|
+
}, ms);
|
|
354
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
355
|
+
});
|
|
275
356
|
}
|
|
276
357
|
function isCiEnvironment() {
|
|
277
358
|
return ["CI", "GITHUB_ACTIONS"].some((name) => {
|
|
@@ -443,8 +524,11 @@ function resolveShellSpawn(command, args, platform = process.platform, env = pro
|
|
|
443
524
|
return { command: executable, args: [...args], shell: false };
|
|
444
525
|
}
|
|
445
526
|
return {
|
|
446
|
-
command:
|
|
447
|
-
|
|
527
|
+
command: [
|
|
528
|
+
escapeCmdCommand(executable),
|
|
529
|
+
...args.map((arg) => escapeCmdArgument(arg))
|
|
530
|
+
].join(" "),
|
|
531
|
+
args: [],
|
|
448
532
|
shell: true
|
|
449
533
|
};
|
|
450
534
|
}
|
|
@@ -1610,6 +1694,7 @@ export {
|
|
|
1610
1694
|
readTrustedCleanCompatibility,
|
|
1611
1695
|
claimUpdateAdvisory,
|
|
1612
1696
|
checkSdkCompatibility,
|
|
1697
|
+
requireSdkCompatibility,
|
|
1613
1698
|
isCiEnvironment,
|
|
1614
1699
|
enforceSdkCompatibilityResponse,
|
|
1615
1700
|
SKILLS_NPX_PACKAGE,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/cli/shell-quote.ts
|
|
2
|
+
function shellQuote(value) {
|
|
3
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
4
|
+
}
|
|
5
|
+
function shellArgument(value, platform = process.platform) {
|
|
6
|
+
if (platform !== "win32") return shellQuote(value);
|
|
7
|
+
if (/^[A-Za-z0-9_+:./\\-][A-Za-z0-9_+=:./\\-]*$/.test(value)) return value;
|
|
8
|
+
if (!/["\u201C\u201D\u201E$`!%\\\r\n]/.test(value)) return `"${value}"`;
|
|
9
|
+
return `'${value.replace(/['\u2018\u2019\u201A\u201B]/g, (quote) => quote + quote)}'`;
|
|
10
|
+
}
|
|
11
|
+
var EXAMPLE_INPUT_FILE = "input.json";
|
|
12
|
+
function exampleJsonInput(json, platform = process.platform) {
|
|
13
|
+
if (platform !== "win32") return { argument: `--input ${shellQuote(json)}` };
|
|
14
|
+
return {
|
|
15
|
+
argument: `--input-file ${EXAMPLE_INPUT_FILE}`,
|
|
16
|
+
file: { path: EXAMPLE_INPUT_FILE, contents: json }
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function examplePlaceholderInput(platform = process.platform) {
|
|
20
|
+
return platform === "win32" ? `--input-file ${EXAMPLE_INPUT_FILE}` : `--input '{...}'`;
|
|
21
|
+
}
|
|
22
|
+
function exampleInputFileLine(file) {
|
|
23
|
+
return `Save this as ${file.path}: ${file.contents}`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
exports.shellQuote = shellQuote; exports.shellArgument = shellArgument; exports.exampleJsonInput = exampleJsonInput; exports.examplePlaceholderInput = examplePlaceholderInput; exports.exampleInputFileLine = exampleInputFileLine;
|
|
@@ -243,6 +243,20 @@ function callerPlayWorkflowIdMatchesRequest(workflowId, request) {
|
|
|
243
243
|
const { workflowId: _ignored, ...intent } = request;
|
|
244
244
|
return match[1] === sha256Hex(stableStringify(JSON.parse(JSON.stringify(intent))));
|
|
245
245
|
}
|
|
246
|
+
var SHORT_PLAY_RUN_ID_RE = /^play\/[a-z0-9/-]+\/run\/\d{8}t\d{6}-\d{3}-[a-z0-9]{8}$/;
|
|
247
|
+
function isShortPlayRunId(value) {
|
|
248
|
+
return SHORT_PLAY_RUN_ID_RE.test(value);
|
|
249
|
+
}
|
|
250
|
+
function shortPlayRunId(runId) {
|
|
251
|
+
const short = runId.replace(/-caller-[a-f0-9]{64}$/, "");
|
|
252
|
+
return isShortPlayRunId(short) ? short : runId;
|
|
253
|
+
}
|
|
254
|
+
function playRunIdLookupPrefix(value) {
|
|
255
|
+
if (isShortPlayRunId(value)) return value;
|
|
256
|
+
const match = /^(.*)-caller-([a-f0-9]*)$/i.exec(value);
|
|
257
|
+
if (!match || /^[a-f0-9]{64}$/.test(match[2])) return null;
|
|
258
|
+
return isShortPlayRunId(match[1]) ? match[1] : null;
|
|
259
|
+
}
|
|
246
260
|
function buildPlayRunIdentity(playName, now, options = {}) {
|
|
247
261
|
const workflowId = buildPlayWorkflowId(playName, now, {
|
|
248
262
|
unique: _nullishCoalesce(options.unique, () => ( now === void 0))
|
|
@@ -307,4 +321,7 @@ function buildAsyncPlayRequestFingerprint(input) {
|
|
|
307
321
|
|
|
308
322
|
|
|
309
323
|
|
|
310
|
-
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
exports.stableStringify = stableStringify; exports.sha256Hex = sha256Hex; exports.normalizeTableNamespace = normalizeTableNamespace; exports.buildPlayWorkflowFamilyKey = buildPlayWorkflowFamilyKey; exports.buildPlayWorkflowRunSuffix = buildPlayWorkflowRunSuffix; exports.canonicalPlayRunStartedAtMs = canonicalPlayRunStartedAtMs; exports.buildPlayWorkflowId = buildPlayWorkflowId; exports.buildCallerPlayWorkflowId = buildCallerPlayWorkflowId; exports.callerPlayWorkflowIdMatchesRequest = callerPlayWorkflowIdMatchesRequest; exports.isShortPlayRunId = isShortPlayRunId; exports.shortPlayRunId = shortPlayRunId; exports.playRunIdLookupPrefix = playRunIdLookupPrefix; exports.buildPlayRunIdentity = buildPlayRunIdentity; exports.buildAsyncPlayRunIdentity = buildAsyncPlayRunIdentity; exports.buildRerunPlayRunIdentity = buildRerunPlayRunIdentity; exports.buildAsyncPlayRequestFingerprint = buildAsyncPlayRequestFingerprint;
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XD3MFTHA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
runSkillsCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-62AUAWQV.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveShellSpawn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BOZAP2EM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
printCommandEnvelope
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-UC4BDZKI.mjs";
|
|
14
14
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
DEFAULT_MAX_RETRIES,
|
|
16
|
+
DEFAULT_TIMEOUT,
|
|
17
|
+
TRANSIENT_HTTP_STATUSES,
|
|
18
|
+
autoDetectBaseUrl,
|
|
19
|
+
defaultRetryBackoffMs
|
|
20
|
+
} from "./chunk-52Q5KETX.mjs";
|
|
17
21
|
|
|
18
22
|
// src/cli/commands/update.ts
|
|
19
23
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -1163,43 +1167,121 @@ function normalizePinnedVersion(value) {
|
|
|
1163
1167
|
const normalized = value?.trim().replace(/^v/, "") ?? "";
|
|
1164
1168
|
return /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(normalized) ? normalized : null;
|
|
1165
1169
|
}
|
|
1166
|
-
async function
|
|
1170
|
+
async function readPinMetadata(registryUrl, version) {
|
|
1171
|
+
const controller = new AbortController();
|
|
1172
|
+
const timeout = setTimeout(() => controller.abort(), DEFAULT_TIMEOUT);
|
|
1173
|
+
try {
|
|
1174
|
+
const response = await fetch(
|
|
1175
|
+
new URL(
|
|
1176
|
+
`deepline/${encodeURIComponent(version)}`,
|
|
1177
|
+
registryUrl.endsWith("/") ? registryUrl : `${registryUrl}/`
|
|
1178
|
+
),
|
|
1179
|
+
{
|
|
1180
|
+
headers: { accept: "application/json" },
|
|
1181
|
+
signal: controller.signal
|
|
1182
|
+
}
|
|
1183
|
+
);
|
|
1184
|
+
if (response.status === 404) return { kind: "answer", supportsPin: false };
|
|
1185
|
+
if (!response.ok) {
|
|
1186
|
+
return {
|
|
1187
|
+
kind: "miss",
|
|
1188
|
+
transient: TRANSIENT_HTTP_STATUSES.has(response.status),
|
|
1189
|
+
error: new Error(`${registryUrl} returned HTTP ${response.status}`)
|
|
1190
|
+
};
|
|
1191
|
+
}
|
|
1192
|
+
const text = await response.text();
|
|
1193
|
+
let metadata;
|
|
1194
|
+
try {
|
|
1195
|
+
metadata = JSON.parse(text);
|
|
1196
|
+
} catch {
|
|
1197
|
+
return {
|
|
1198
|
+
kind: "miss",
|
|
1199
|
+
transient: false,
|
|
1200
|
+
error: new Error(`${registryUrl} returned malformed package metadata`)
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
return {
|
|
1204
|
+
kind: "answer",
|
|
1205
|
+
supportsPin: metadata?.deepline?.updatePreferences === 1
|
|
1206
|
+
};
|
|
1207
|
+
} catch (error) {
|
|
1208
|
+
return {
|
|
1209
|
+
kind: "miss",
|
|
1210
|
+
transient: true,
|
|
1211
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
1212
|
+
};
|
|
1213
|
+
} finally {
|
|
1214
|
+
clearTimeout(timeout);
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
async function publishedVersionSupportsPin(version, fallbackRegistryUrl, retry = {}) {
|
|
1167
1218
|
const registryUrls = [
|
|
1168
1219
|
"https://registry.npmjs.org/",
|
|
1169
1220
|
...fallbackRegistryUrl ? [fallbackRegistryUrl] : []
|
|
1170
1221
|
];
|
|
1222
|
+
const maxRetries = retry.maxRetries ?? DEFAULT_MAX_RETRIES;
|
|
1223
|
+
const backoffMs = retry.backoffMs ?? defaultRetryBackoffMs;
|
|
1171
1224
|
let lastError = null;
|
|
1172
|
-
for (
|
|
1173
|
-
|
|
1174
|
-
const
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
registryUrl.endsWith("/") ? registryUrl : `${registryUrl}/`
|
|
1180
|
-
),
|
|
1181
|
-
{
|
|
1182
|
-
headers: { accept: "application/json" },
|
|
1183
|
-
signal: controller.signal
|
|
1184
|
-
}
|
|
1185
|
-
);
|
|
1186
|
-
if (response.status === 404) return false;
|
|
1187
|
-
if (!response.ok) {
|
|
1188
|
-
lastError = new Error(
|
|
1189
|
-
`${registryUrl} returned HTTP ${response.status}`
|
|
1190
|
-
);
|
|
1191
|
-
continue;
|
|
1192
|
-
}
|
|
1193
|
-
const metadata = await response.json();
|
|
1194
|
-
return metadata.deepline?.updatePreferences === 1;
|
|
1195
|
-
} catch (error) {
|
|
1196
|
-
lastError = error instanceof Error ? error : new Error(String(error));
|
|
1197
|
-
} finally {
|
|
1198
|
-
clearTimeout(timeout);
|
|
1225
|
+
for (let round = 1; ; round += 1) {
|
|
1226
|
+
let transientOnly = true;
|
|
1227
|
+
for (const registryUrl of registryUrls) {
|
|
1228
|
+
const read = await readPinMetadata(registryUrl, version);
|
|
1229
|
+
if (read.kind === "answer") return read.supportsPin;
|
|
1230
|
+
lastError = read.error;
|
|
1231
|
+
if (!read.transient) transientOnly = false;
|
|
1199
1232
|
}
|
|
1233
|
+
if (!transientOnly || round > maxRetries) break;
|
|
1234
|
+
await new Promise((resolve3) => setTimeout(resolve3, backoffMs(round)));
|
|
1200
1235
|
}
|
|
1201
1236
|
throw lastError ?? new Error("No npm registry was available");
|
|
1202
1237
|
}
|
|
1238
|
+
var PUBLISHED_LATEST_READ_TIMEOUT_MS = 5e3;
|
|
1239
|
+
async function readPublishedLatestVersion(registryUrl) {
|
|
1240
|
+
const controller = new AbortController();
|
|
1241
|
+
const timeout = setTimeout(
|
|
1242
|
+
() => controller.abort(),
|
|
1243
|
+
PUBLISHED_LATEST_READ_TIMEOUT_MS
|
|
1244
|
+
);
|
|
1245
|
+
try {
|
|
1246
|
+
const response = await fetch(
|
|
1247
|
+
new URL(
|
|
1248
|
+
"deepline/latest",
|
|
1249
|
+
registryUrl.endsWith("/") ? registryUrl : `${registryUrl}/`
|
|
1250
|
+
),
|
|
1251
|
+
{ headers: { accept: "application/json" }, signal: controller.signal }
|
|
1252
|
+
);
|
|
1253
|
+
if (!response.ok) return null;
|
|
1254
|
+
const metadata = await response.json();
|
|
1255
|
+
return typeof metadata?.version === "string" && parseSemver(metadata.version) ? metadata.version : null;
|
|
1256
|
+
} catch {
|
|
1257
|
+
return null;
|
|
1258
|
+
} finally {
|
|
1259
|
+
clearTimeout(timeout);
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
async function resolveInstalledVersionIfLatest(plan) {
|
|
1263
|
+
if (plan.kind !== "npm-global" && plan.kind !== "python-sidecar") {
|
|
1264
|
+
return null;
|
|
1265
|
+
}
|
|
1266
|
+
if (autoUpdatePackageSpec(plan) !== "deepline@latest") return null;
|
|
1267
|
+
let installedVersion = "";
|
|
1268
|
+
try {
|
|
1269
|
+
installedVersion = installedUpdateVersion(resolveUpdateInstallation(plan));
|
|
1270
|
+
} catch {
|
|
1271
|
+
return null;
|
|
1272
|
+
}
|
|
1273
|
+
if (!parseSemver(installedVersion)) return null;
|
|
1274
|
+
const registryUrls = plan.kind === "python-sidecar" ? [plan.registryUrl] : [
|
|
1275
|
+
plan.primaryRegistryUrl ?? "https://registry.npmjs.org/",
|
|
1276
|
+
...plan.fallbackRegistryUrl ? [plan.fallbackRegistryUrl] : []
|
|
1277
|
+
];
|
|
1278
|
+
for (const registryUrl of registryUrls) {
|
|
1279
|
+
const latestVersion = await readPublishedLatestVersion(registryUrl);
|
|
1280
|
+
if (!latestVersion) continue;
|
|
1281
|
+
return compareUpdateVersions(installedVersion, latestVersion) === 0 ? installedVersion : null;
|
|
1282
|
+
}
|
|
1283
|
+
return null;
|
|
1284
|
+
}
|
|
1203
1285
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1204
1286
|
const detectBaseUrl = dependencies.detectBaseUrl ?? autoDetectBaseUrl;
|
|
1205
1287
|
const resolvePlan = dependencies.resolvePlan ?? resolveUpdatePlan;
|
|
@@ -1222,6 +1304,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1222
1304
|
const setPinnedVersion = dependencies.setPinnedVersion ?? setCliPinnedVersion;
|
|
1223
1305
|
const clearPinnedVersion = dependencies.clearPinnedVersion ?? clearCliPinnedVersion;
|
|
1224
1306
|
const targetSupportsPin = dependencies.targetSupportsPin ?? publishedVersionSupportsPin;
|
|
1307
|
+
const resolveUpToDateVersion = dependencies.resolveUpToDateVersion ?? resolveInstalledVersionIfLatest;
|
|
1225
1308
|
const pinnedVersion = options.pin ? normalizePinnedVersion(options.pin) : null;
|
|
1226
1309
|
if (options.pin && !pinnedVersion) {
|
|
1227
1310
|
stderr.write(
|
|
@@ -1279,7 +1362,16 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1279
1362
|
]
|
|
1280
1363
|
};
|
|
1281
1364
|
if (options.json && !options.executeWithJson) {
|
|
1282
|
-
|
|
1365
|
+
const upToDateVersion2 = pinnedVersion || options.force ? null : await resolveUpToDateVersion(plan);
|
|
1366
|
+
printCommandEnvelope(
|
|
1367
|
+
{
|
|
1368
|
+
...plan,
|
|
1369
|
+
updated: false,
|
|
1370
|
+
...upToDateVersion2 ? { upToDate: true, version: upToDateVersion2 } : {},
|
|
1371
|
+
render
|
|
1372
|
+
},
|
|
1373
|
+
{ json: true }
|
|
1374
|
+
);
|
|
1283
1375
|
return 0;
|
|
1284
1376
|
}
|
|
1285
1377
|
if (options.printCommand) {
|
|
@@ -1299,11 +1391,19 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1299
1391
|
printCommandEnvelope({ ...plan, render }, { json: false });
|
|
1300
1392
|
return 0;
|
|
1301
1393
|
}
|
|
1302
|
-
|
|
1394
|
+
const upToDateVersion = pinnedVersion || options.force ? null : await resolveUpToDateVersion(plan);
|
|
1395
|
+
if (upToDateVersion) {
|
|
1396
|
+
stderr.write(
|
|
1397
|
+
`Deepline CLI is already up to date (${upToDateVersion}). Run deepline update --force to reinstall it.
|
|
1398
|
+
`
|
|
1399
|
+
);
|
|
1400
|
+
} else {
|
|
1401
|
+
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
1303
1402
|
`);
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1403
|
+
const updateExitCode = await runPlan(plan);
|
|
1404
|
+
if (updateExitCode !== 0) {
|
|
1405
|
+
return updateExitCode;
|
|
1406
|
+
}
|
|
1307
1407
|
}
|
|
1308
1408
|
if (pinnedVersion) {
|
|
1309
1409
|
setPinnedVersion(pinnedVersion);
|
|
@@ -1329,7 +1429,9 @@ To retry with full installer output, run: deepline skills install
|
|
|
1329
1429
|
printCommandEnvelope(
|
|
1330
1430
|
{
|
|
1331
1431
|
ok: true,
|
|
1332
|
-
pinnedVersion
|
|
1432
|
+
pinnedVersion,
|
|
1433
|
+
updated: !upToDateVersion,
|
|
1434
|
+
...upToDateVersion ? { version: upToDateVersion } : {}
|
|
1333
1435
|
},
|
|
1334
1436
|
{ json: true }
|
|
1335
1437
|
);
|
|
@@ -1341,7 +1443,9 @@ function registerUpdateCommand(program) {
|
|
|
1341
1443
|
"after",
|
|
1342
1444
|
`
|
|
1343
1445
|
Notes:
|
|
1344
|
-
For the published npm CLI, this runs npm install -g deepline@latest
|
|
1446
|
+
For the published npm CLI, this runs npm install -g deepline@latest, unless
|
|
1447
|
+
the installed version is already the latest published one. Use --force to
|
|
1448
|
+
reinstall anyway.
|
|
1345
1449
|
Automatic updates are enabled by default and run before normal commands.
|
|
1346
1450
|
Configure automatic updates with deepline settings autoupdate.
|
|
1347
1451
|
For a Homebrew installation, this prints brew upgrade deepline; Homebrew
|
|
@@ -1354,9 +1458,12 @@ Notes:
|
|
|
1354
1458
|
Examples:
|
|
1355
1459
|
deepline update
|
|
1356
1460
|
deepline update --print-command
|
|
1357
|
-
deepline update
|
|
1461
|
+
deepline update --force
|
|
1358
1462
|
`
|
|
1359
|
-
).option("--print-command", "Print the update command without running it").option("--json", "Emit the resolved update plan as JSON").
|
|
1463
|
+
).option("--print-command", "Print the update command without running it").option("--json", "Emit the resolved update plan as JSON").option(
|
|
1464
|
+
"--force",
|
|
1465
|
+
"Reinstall even when the installed CLI is already the latest version"
|
|
1466
|
+
).action(async (options) => {
|
|
1360
1467
|
process.exitCode = await runUpdateCommand(options);
|
|
1361
1468
|
});
|
|
1362
1469
|
}
|
|
@@ -1371,6 +1478,7 @@ export {
|
|
|
1371
1478
|
compareUpdateVersions,
|
|
1372
1479
|
runUpdatePlan,
|
|
1373
1480
|
publishedVersionSupportsPin,
|
|
1481
|
+
resolveInstalledVersionIfLatest,
|
|
1374
1482
|
runUpdateCommand,
|
|
1375
1483
|
registerUpdateCommand
|
|
1376
1484
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOVEYWO4Hjs = require('./chunk-OVEYWO4H.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkVIUUTEHYjs = require('./chunk-VIUUTEHY.js');
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
|
-
var DeeplineClient2 = class extends
|
|
10
|
+
var DeeplineClient2 = class extends _chunkOVEYWO4Hjs.DeeplineClient {
|
|
11
11
|
constructor(options) {
|
|
12
|
-
const config =
|
|
13
|
-
super(config, new (0,
|
|
12
|
+
const config = _chunkVIUUTEHYjs.resolveConfig.call(void 0, options);
|
|
13
|
+
super(config, new (0, _chunkVIUUTEHYjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -207,4 +207,6 @@ function formatNonStandardSandboxRuntimeWarning(limits) {
|
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
exports.DEFAULT_USD_PER_CUSTOMER_CREDIT = DEFAULT_USD_PER_CUSTOMER_CREDIT; exports.DEFAULT_PROVIDER_MARKUP_MULTIPLIER = DEFAULT_PROVIDER_MARKUP_MULTIPLIER; exports.PLAY_SANDBOX_COMPUTE_RATE_MULTIPLIERS = PLAY_SANDBOX_COMPUTE_RATE_MULTIPLIERS; exports.formatNonStandardSandboxRuntimeWarning = formatNonStandardSandboxRuntimeWarning;
|