deepline 0.3.552 → 0.3.553
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +107 -12
- package/dist/bundling-sources/sdk/src/compat.ts +239 -87
- package/dist/bundling-sources/sdk/src/config.ts +113 -2
- package/dist/bundling-sources/sdk/src/errors.ts +2 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +118 -8
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
- package/dist/bundling-sources/sdk/src/play.ts +3 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +8 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
- package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
- package/dist/bundling-sources/sdk/src/types.ts +9 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
- package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
- package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
- package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +9 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +168 -41
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
- package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
- package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +444 -39
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
- package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +254 -44
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +259 -52
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
- package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
- package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
- package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
- package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
- package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
- package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
- package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
- package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
- package/dist/cli/{auth-KVSBJZOX.mjs → auth-I3QAU4RV.mjs} +8 -7
- package/dist/cli/auth-MQCN7WGZ.js +44 -0
- package/dist/cli/{billing-54RHFEBI.mjs → billing-3IC54OQQ.mjs} +197 -61
- package/dist/cli/{billing-FQREA7UA.js → billing-YGFFVAIC.js} +297 -161
- package/dist/cli/{chunk-4MK42735.js → chunk-2B5B5KAW.js} +210 -128
- package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
- package/dist/cli/{chunk-4NQF6KJ3.js → chunk-3NTP2OSG.js} +13 -13
- package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-45OAVGU6.mjs} +5 -5
- package/dist/cli/{chunk-WLN3SUIA.js → chunk-4747TPLV.js} +3 -3
- package/dist/cli/{chunk-AZQ264ID.mjs → chunk-4BFTDNHU.mjs} +1 -1
- package/dist/cli/{chunk-BGBJV26E.mjs → chunk-4HYNMXXF.mjs} +4 -4
- package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-4SMCFQ23.mjs} +1 -1
- package/dist/cli/{chunk-QPKH23EC.mjs → chunk-55F6HNOY.mjs} +5 -5
- package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
- package/dist/cli/{chunk-634ZDA3F.js → chunk-6NE3RRRY.js} +1 -1
- package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
- package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-72V4PDH5.mjs} +18 -18
- package/dist/cli/{chunk-IHRKLXZN.js → chunk-74RES4DS.js} +5 -5
- package/dist/cli/{chunk-45PVGZST.js → chunk-7GEMELKI.js} +366 -320
- package/dist/cli/{chunk-4UUR4TCH.js → chunk-7O6J6A7P.js} +1871 -92
- package/dist/cli/{chunk-XVB7V4N7.js → chunk-7SERLBNR.js} +161 -53
- package/dist/cli/{chunk-F2LH7TGF.js → chunk-7YRJ5UC4.js} +21 -21
- package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-A7DLBE5K.mjs} +136 -54
- package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-AGICYWGN.mjs} +299 -69
- package/dist/cli/{chunk-S5S355UY.mjs → chunk-AGIQDA2T.mjs} +12 -12
- package/dist/cli/{chunk-RBEUVDZF.js → chunk-AGLR6QVN.js} +249 -107
- package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
- package/dist/cli/{chunk-RQZQVFCJ.js → chunk-BVDKFS2T.js} +2 -2
- package/dist/cli/{chunk-PFO3ISXA.js → chunk-CACFJODG.js} +174 -129
- package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-CAEBJOYU.mjs} +1 -1
- package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
- package/dist/cli/{chunk-6YCA5NKJ.js → chunk-DP2VH7CO.js} +12 -12
- package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-DP64MD6U.mjs} +1 -1
- package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-DZA7RFGL.mjs} +5 -5
- package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
- package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-E7WZOX2A.mjs} +22 -18
- package/dist/cli/{chunk-IDVVIXPJ.js → chunk-FM7LPUPA.js} +41 -41
- package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-GAVZ4EOD.mjs} +1 -1
- package/dist/cli/{chunk-GKYAYLRI.js → chunk-HEBO3XNZ.js} +27 -31
- package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-HSJ6X2AQ.mjs} +4 -4
- package/dist/cli/{chunk-UPMRIVZB.js → chunk-HVI55MTK.js} +61 -10
- package/dist/cli/{chunk-KWSH5T7K.js → chunk-IH6GDNKW.js} +21 -21
- package/dist/cli/{chunk-HO3XK3R7.js → chunk-IMX7J4DU.js} +8 -8
- package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-INEMTYMT.mjs} +8 -8
- package/dist/cli/{chunk-3FD5EQ62.js → chunk-IUOGII7D.js} +6 -7
- package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-JJGWHITQ.mjs} +5 -5
- package/dist/cli/{chunk-SHLFOPD6.js → chunk-JLGP5XAJ.js} +5 -5
- package/dist/cli/{chunk-4TALT2M3.mjs → chunk-LFOERUQY.mjs} +69 -3
- package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
- package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-LH5PZKER.mjs} +63 -18
- package/dist/cli/{chunk-S46HWQKO.js → chunk-LRDHPOZW.js} +69 -69
- package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
- package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
- package/dist/cli/{chunk-7IKQKKNX.js → chunk-MLABYI4M.js} +90 -24
- package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-NDNHYONK.mjs} +17 -21
- package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-OTV2UUKW.mjs} +158 -16
- package/dist/cli/{chunk-G4O75EXF.js → chunk-Q6Z6N3A7.js} +18 -18
- package/dist/cli/{chunk-WE5HES3H.mjs → chunk-QG6JIWUL.mjs} +151 -43
- package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-QI5S5HWB.mjs} +2 -2
- package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
- package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RMNOZKRI.mjs} +3 -3
- package/dist/cli/{chunk-BAIST2BR.js → chunk-RTV4RF7N.js} +36 -36
- package/dist/cli/{chunk-JWUAX6OP.js → chunk-SBH4CKPN.js} +11 -11
- package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-SG3LUONJ.mjs} +3 -3
- package/dist/cli/{chunk-2WFPHBR4.js → chunk-TFEXSHPM.js} +22 -18
- package/dist/cli/{chunk-QAORXEY3.mjs → chunk-TN4TY6TT.mjs} +6 -7
- package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-UEVKMZLR.mjs} +54 -3
- package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UVQJYV76.mjs} +2 -2
- package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
- package/dist/cli/{chunk-MF2GHZDO.js → chunk-WOCHZCUJ.js} +2 -2
- package/dist/cli/{chunk-VQALXEXO.js → chunk-XLIHTJVM.js} +348 -118
- package/dist/cli/{chunk-ADRC5I3R.js → chunk-Y6SP3JMI.js} +22 -22
- package/dist/cli/{chunk-77AAAGVB.js → chunk-YUA6HA6D.js} +2 -2
- package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
- package/dist/cli/{chunk-6O5HOODW.mjs → chunk-Z6XPSHKM.mjs} +87 -41
- package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-Z7AOIHFE.mjs} +1870 -91
- package/dist/cli/command-docs.js +3 -3
- package/dist/cli/command-docs.mjs +2 -2
- package/dist/cli/concurrent-runs-help-CFJH4KXV.js +22 -0
- package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-DNV2X5AZ.mjs} +9 -8
- package/dist/cli/{csv-F5VAGX4K.js → csv-SA6ELJY6.js} +16 -15
- package/dist/cli/{csv-2PTVDNO6.mjs → csv-ZXZGHWOM.mjs} +7 -6
- package/dist/cli/{db-IEDXAUF7.mjs → db-A54SP6AD.mjs} +16 -16
- package/dist/cli/{db-Z3OIUFMM.js → db-JHFEIQBU.js} +43 -43
- package/dist/cli/describe-PHQ33AGS.mjs +50 -0
- package/dist/cli/describe-RHJ4XRFI.js +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +6 -6
- package/dist/cli/describe-core.mjs +5 -5
- package/dist/cli/{executions-R3LP74QN.mjs → executions-HL2M2DFU.mjs} +10 -10
- package/dist/cli/{executions-H6H5655J.js → executions-TLFZRHBJ.js} +12 -12
- package/dist/cli/{feedback-VFOUR66B.js → feedback-5UEX5UZK.js} +17 -16
- package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-QMBTNXVG.mjs} +9 -8
- package/dist/cli/git-4JWOOHBG.js +26 -0
- package/dist/cli/{git-YX2J4GCI.mjs → git-LKGXVIVC.mjs} +8 -7
- package/dist/cli/index.js +170 -158
- package/dist/cli/index.mjs +60 -48
- package/dist/cli/{integrations-E2JZYKHS.js → integrations-6RUTLMN7.js} +23 -27
- package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-FGGRVUJ7.mjs} +15 -19
- package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-J3Z7QRWZ.js} +12 -11
- package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-YIPRMVXZ.mjs} +9 -8
- package/dist/cli/{mcp-UQV2K4EW.js → mcp-6LWFP7RW.js} +121 -48
- package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-CHDYFO7F.mjs} +100 -27
- package/dist/cli/{monitors-R3BBDCRC.js → monitors-STM6A7OU.js} +221 -186
- package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-UGRY2BXI.mjs} +58 -23
- package/dist/cli/org-3SYOUQCX.mjs +2289 -0
- package/dist/cli/org-ZOBSNSIB.js +2289 -0
- package/dist/cli/outcomes-H4YYAT5X.js +2865 -0
- package/dist/cli/outcomes-Z3P2JE67.mjs +2865 -0
- package/dist/cli/{play-2MVO27VO.js → play-SM4CW2GS.js} +1116 -846
- package/dist/cli/{play-MDWPR4XG.mjs → play-SN5YWLS7.mjs} +375 -105
- package/dist/cli/{providers-AKDYFZJZ.mjs → providers-WZ4YBR5Y.mjs} +10 -10
- package/dist/cli/{providers-2AACRUZH.js → providers-WZARYMCF.js} +13 -13
- package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-2575BNKA.mjs} +7 -6
- package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-PS4YHQJ6.js} +9 -8
- package/dist/cli/{run-2634REDK.js → run-FLZ6OTM7.js} +51 -51
- package/dist/cli/{run-RTSQNGRD.mjs → run-ZUHCZOJS.mjs} +31 -31
- package/dist/cli/run-identity-LMLFMACS.js +31 -0
- package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
- package/dist/cli/{search-6AOJ4XPP.mjs → search-HLPPKQEO.mjs} +11 -11
- package/dist/cli/search-JJWVHR3N.js +32 -0
- package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PDAXNOGP.mjs} +9 -8
- package/dist/cli/{search-output-S5ODBL5E.js → search-output-RXJLU36B.js} +12 -11
- package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-CGELYQ3H.mjs} +11 -11
- package/dist/cli/{secrets-LHCIIHMT.js → secrets-QJNG7G2Y.js} +20 -20
- package/dist/cli/sessions-DHTBT2GN.js +23 -0
- package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-ELMWVR4M.mjs} +9 -8
- package/dist/cli/{settings-CP4FVK2W.js → settings-44I44P5F.js} +89 -89
- package/dist/cli/{settings-EBONWL5C.mjs → settings-RR3LZXL7.mjs} +16 -16
- package/dist/cli/{setup-I5AZE3IU.mjs → setup-KGWRWH4B.mjs} +20 -19
- package/dist/cli/{setup-LFGHTNLQ.js → setup-KTEYOCJO.js} +60 -59
- package/dist/cli/skills-EPZPEXI2.js +37 -0
- package/dist/cli/{skills-W76AO5XE.mjs → skills-FPRID2I5.mjs} +10 -9
- package/dist/cli/tools-IGQQ5TML.js +57 -0
- package/dist/cli/{tools-7IJHGF6W.mjs → tools-PI4WMDLY.mjs} +23 -23
- package/dist/cli/update-4RNCVYGE.js +37 -0
- package/dist/cli/{update-GFOPZTHY.mjs → update-VJOJAZ7B.mjs} +14 -11
- package/dist/cli/{views-BPL2TQJ4.js → views-NTUOLNQU.js} +62 -64
- package/dist/cli/{views-D4NX4SBG.mjs → views-OVPSINZO.mjs} +47 -49
- package/dist/cli/{workflow-ZYNAUCKC.js → workflow-2UDYDM6F.js} +23 -23
- package/dist/cli/{workflow-YXP42FUI.mjs → workflow-7OEFNXZC.mjs} +13 -13
- package/dist/{client-CyXGrO4D.d.mts → client-B8f7RNF8.d.mts} +1 -1
- package/dist/{client-Bf3IpUKN.d.ts → client-C5TgXmJQ.d.ts} +1 -1
- package/dist/{client-core-BxsLnXlm.d.mts → client-core-SLLGBTht.d.mts} +268 -23
- package/dist/{client-core-BWd0lX0Z.d.ts → client-core-p0sOxnkl.d.ts} +268 -23
- package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
- package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
- package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
- package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
- package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
- package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +66 -55
- package/dist/index.mjs +25 -14
- package/dist/install-integrity.json +161 -142
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +23 -4
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +4 -4
- package/dist/plays/run-request.mjs +3 -3
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +15 -13
- package/dist/server.mjs +9 -7
- package/package.json +1 -1
- package/dist/cli/auth-MMNVWATX.js +0 -43
- package/dist/cli/concurrent-runs-help-FQAIHKKC.js +0 -21
- package/dist/cli/describe-QDANCTS3.mjs +0 -50
- package/dist/cli/describe-VUTT5ZKU.js +0 -50
- package/dist/cli/git-ETB3GH3K.js +0 -25
- package/dist/cli/org-GRYVMNSW.js +0 -1282
- package/dist/cli/org-Z37NGJV4.mjs +0 -1282
- package/dist/cli/run-identity-G257GQED.js +0 -25
- package/dist/cli/search-VTW2YNBS.js +0 -32
- package/dist/cli/sessions-CJ4FJ2WB.js +0 -22
- package/dist/cli/skills-R7EBXREW.js +0 -36
- package/dist/cli/tools-V7U2BDXM.js +0 -57
- package/dist/cli/update-4COPZETK.js +0 -34
|
@@ -4,19 +4,20 @@ import {
|
|
|
4
4
|
resolveApiKeyForBaseUrl,
|
|
5
5
|
resolveCliCommandContext,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LFOERUQY.mjs";
|
|
8
8
|
import {
|
|
9
9
|
SDK_VERSION,
|
|
10
10
|
agentSessionIdFromEnvironment,
|
|
11
11
|
deploymentProtectionHeaders,
|
|
12
|
-
detectAgentRuntime
|
|
13
|
-
|
|
12
|
+
detectAgentRuntime,
|
|
13
|
+
readToolFailureHint
|
|
14
|
+
} from "./chunk-OTV2UUKW.mjs";
|
|
14
15
|
import {
|
|
15
16
|
DeeplineError,
|
|
16
17
|
normalizeToolExecutionFailure,
|
|
17
18
|
readToolUpstreamResponse,
|
|
18
19
|
serializeToolExecutionFailure
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-Z3A2S3QM.mjs";
|
|
20
21
|
|
|
21
22
|
// src/cli/json-fields.ts
|
|
22
23
|
var RUN_FIELDS = new Set(
|
|
@@ -146,8 +147,8 @@ function installJsonStderrGuard() {
|
|
|
146
147
|
return stdoutWrite(...args);
|
|
147
148
|
});
|
|
148
149
|
const capture = (chunk) => {
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
150
|
+
const text2 = (typeof chunk === "string" ? chunk : chunk instanceof Uint8Array ? Buffer.from(chunk).toString("utf8") : String(chunk)).replace(ANSI_PATTERN, "").trim();
|
|
151
|
+
if (text2) pending.push(text2);
|
|
151
152
|
};
|
|
152
153
|
process.stderr.write = ((chunk, ...rest) => {
|
|
153
154
|
capture(chunk);
|
|
@@ -166,8 +167,8 @@ function installJsonStderrGuard() {
|
|
|
166
167
|
function addJsonNotice(notice) {
|
|
167
168
|
if (installed) pending.push(notice);
|
|
168
169
|
}
|
|
169
|
-
function writeRawStderr(
|
|
170
|
-
(rawStderrWrite ?? process.stderr.write.bind(process.stderr))(
|
|
170
|
+
function writeRawStderr(text2) {
|
|
171
|
+
(rawStderrWrite ?? process.stderr.write.bind(process.stderr))(text2);
|
|
171
172
|
}
|
|
172
173
|
function markJsonOutputHandled() {
|
|
173
174
|
jsonOutputHandled = true;
|
|
@@ -185,11 +186,11 @@ function withJsonNotices(value) {
|
|
|
185
186
|
if (pending.length === 0 || value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
186
187
|
return value;
|
|
187
188
|
}
|
|
188
|
-
const
|
|
189
|
-
const existing = Array.isArray(
|
|
189
|
+
const record2 = value;
|
|
190
|
+
const existing = Array.isArray(record2.notices) ? record2.notices : [];
|
|
190
191
|
const notices = [...existing, ...pending];
|
|
191
192
|
pending = [];
|
|
192
|
-
return { ...
|
|
193
|
+
return { ...record2, notices };
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
// src/cli/failure-reporting.ts
|
|
@@ -217,12 +218,12 @@ function isFailureReportingDisabled() {
|
|
|
217
218
|
}
|
|
218
219
|
function redactFailureText(value, maxChars = MAX_FAILURE_TEXT_CHARS) {
|
|
219
220
|
const home = process.env.HOME?.trim();
|
|
220
|
-
let
|
|
221
|
-
if (!
|
|
221
|
+
let text2 = String(value ?? "");
|
|
222
|
+
if (!text2) return "";
|
|
222
223
|
if (home && home !== "/") {
|
|
223
|
-
|
|
224
|
+
text2 = text2.split(home).join("~");
|
|
224
225
|
}
|
|
225
|
-
return
|
|
226
|
+
return text2.replace(EMAIL_RE, "[redacted-email]").replace(UNIX_PATH_RE, "[redacted-path]").replace(WINDOWS_PATH_RE, "[redacted-path]").replace(BEARER_SECRET_RE, "$1 [redacted-secret]").replace(ASSIGNMENT_SECRET_RE, "$1$2[redacted-secret]").replace(GENERIC_TOKEN_RE, "[redacted-secret]").slice(0, maxChars);
|
|
226
227
|
}
|
|
227
228
|
function sanitizeCommand(argv, prefix = "deepline") {
|
|
228
229
|
const tokens = [];
|
|
@@ -256,13 +257,13 @@ function classifyNetworkFailure(error) {
|
|
|
256
257
|
let current = error;
|
|
257
258
|
while (current && !seen.has(current)) {
|
|
258
259
|
seen.add(current);
|
|
259
|
-
const
|
|
260
|
-
const code = String(
|
|
260
|
+
const record2 = typeof current === "object" && current !== null ? current : {};
|
|
261
|
+
const code = String(record2.code ?? "").toLowerCase();
|
|
261
262
|
const name = current instanceof Error ? current.name.toLowerCase() : "";
|
|
262
|
-
const
|
|
263
|
+
const text2 = String(
|
|
263
264
|
current instanceof Error ? current.message : current
|
|
264
265
|
).toLowerCase();
|
|
265
|
-
const combined = `${code} ${name} ${
|
|
266
|
+
const combined = `${code} ${name} ${text2}`;
|
|
266
267
|
if (combined.includes("aborterror") || combined.includes("timeout") || combined.includes("timed out") || combined.includes("etimedout")) {
|
|
267
268
|
return "network_timeout";
|
|
268
269
|
}
|
|
@@ -285,12 +286,12 @@ function classifyNetworkFailure(error) {
|
|
|
285
286
|
// Local filenames and retry commands may contain "ssl" or "tls".
|
|
286
287
|
// Require a transport identifier or protocol failure text instead.
|
|
287
288
|
code.includes("ssl") || code.includes("tls") || name.includes("ssl") || name.includes("tls") || /(?:^|[\s[(:])(?:ssl|tls)[\s:_-]+(?:error|handshake|certificate|routines|connection|failed|failure)(?:$|[\s:_-])/.test(
|
|
288
|
-
|
|
289
|
+
text2
|
|
289
290
|
) || combined.includes("unexpected_eof_while_reading")
|
|
290
291
|
) {
|
|
291
292
|
return "network_ssl_error";
|
|
292
293
|
}
|
|
293
|
-
current =
|
|
294
|
+
current = record2.cause ?? record2.context;
|
|
294
295
|
}
|
|
295
296
|
return "network_error";
|
|
296
297
|
}
|
|
@@ -299,9 +300,9 @@ function classifyNetworkCauseCategory(error) {
|
|
|
299
300
|
let cause = error;
|
|
300
301
|
while (cause && typeof cause === "object" && !seen.has(cause)) {
|
|
301
302
|
seen.add(cause);
|
|
302
|
-
const
|
|
303
|
-
if (
|
|
304
|
-
cause =
|
|
303
|
+
const record2 = cause;
|
|
304
|
+
if (record2.code === "UND_ERR_CONNECT_TIMEOUT") return "connect_timeout";
|
|
305
|
+
cause = record2.cause;
|
|
305
306
|
}
|
|
306
307
|
switch (classifyNetworkFailure(error)) {
|
|
307
308
|
case "network_dns_resolution_failed":
|
|
@@ -659,14 +660,14 @@ function repairMisdecodedText(value) {
|
|
|
659
660
|
});
|
|
660
661
|
return changed ? repaired : value;
|
|
661
662
|
}
|
|
662
|
-
function repairRecordText(
|
|
663
|
-
for (const key of Object.keys(
|
|
664
|
-
const value =
|
|
663
|
+
function repairRecordText(record2) {
|
|
664
|
+
for (const key of Object.keys(record2)) {
|
|
665
|
+
const value = record2[key];
|
|
665
666
|
if (typeof value === "string") {
|
|
666
|
-
|
|
667
|
+
record2[key] = repairMisdecodedText(value);
|
|
667
668
|
}
|
|
668
669
|
}
|
|
669
|
-
return
|
|
670
|
+
return record2;
|
|
670
671
|
}
|
|
671
672
|
function csvInputTextOptions() {
|
|
672
673
|
return {
|
|
@@ -678,6 +679,237 @@ function csvInputTextOptions() {
|
|
|
678
679
|
|
|
679
680
|
// src/cli/utils.ts
|
|
680
681
|
import { stringify } from "csv-stringify/sync";
|
|
682
|
+
|
|
683
|
+
// src/cli/retry-guidance.ts
|
|
684
|
+
var OUT_OF_CREDITS_CODES = /* @__PURE__ */ new Set([
|
|
685
|
+
"INSUFFICIENT_CREDITS",
|
|
686
|
+
"INSUFFICIENT_FUNDS",
|
|
687
|
+
"FREE_ALLOWANCE_EXHAUSTED"
|
|
688
|
+
]);
|
|
689
|
+
var SPENDING_CAP_CODES = /* @__PURE__ */ new Set([
|
|
690
|
+
"MONTHLY_BILLING_LIMIT_EXCEEDED",
|
|
691
|
+
"MONTHLY_CREDIT_CAP_EXCEEDED",
|
|
692
|
+
"RUN_BILLING_CAP_EXCEEDED",
|
|
693
|
+
"RUN_CREDIT_CAP_EXCEEDED",
|
|
694
|
+
"WORKFLOW_COST_CAP_EXCEEDED"
|
|
695
|
+
]);
|
|
696
|
+
var RATE_LIMIT_CODES = /* @__PURE__ */ new Set(["RATE_LIMIT", "UPSTREAM_RATE_LIMIT"]);
|
|
697
|
+
var BAD_INPUT_CODES = /* @__PURE__ */ new Set([
|
|
698
|
+
"UPSTREAM_BAD_INPUT",
|
|
699
|
+
"UPSTREAM_VALIDATION_ERROR",
|
|
700
|
+
"VALIDATION_ERROR"
|
|
701
|
+
]);
|
|
702
|
+
var CREDENTIAL_CODES = /* @__PURE__ */ new Set([
|
|
703
|
+
"PROVIDER_AUTHENTICATION_FAILED",
|
|
704
|
+
"PROVIDER_AUTHORIZATION_FAILED",
|
|
705
|
+
"INTEGRATION_CREDENTIALS_MISSING"
|
|
706
|
+
]);
|
|
707
|
+
var TRANSIENT_CLIENT_ERROR_STATUSES = /* @__PURE__ */ new Set([408, 425, 429]);
|
|
708
|
+
var MAX_FIELDS = 8;
|
|
709
|
+
var MAX_HINT_CHARS = 400;
|
|
710
|
+
function record(value) {
|
|
711
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
712
|
+
}
|
|
713
|
+
function text(value) {
|
|
714
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
715
|
+
}
|
|
716
|
+
function formatRetryWait(ms) {
|
|
717
|
+
if (ms < 1e4) {
|
|
718
|
+
const tenths = Math.max(1, Math.ceil(ms / 100));
|
|
719
|
+
return `${tenths % 10 === 0 ? tenths / 10 : (tenths / 10).toFixed(1)}s`;
|
|
720
|
+
}
|
|
721
|
+
const seconds = Math.ceil(ms / 1e3);
|
|
722
|
+
if (seconds < 60) return `${seconds}s`;
|
|
723
|
+
const minutes = Math.floor(seconds / 60);
|
|
724
|
+
if (minutes < 60) {
|
|
725
|
+
const rest2 = seconds % 60;
|
|
726
|
+
return rest2 ? `${minutes}m ${rest2}s` : `${minutes}m`;
|
|
727
|
+
}
|
|
728
|
+
const hours = Math.floor(minutes / 60);
|
|
729
|
+
const rest = minutes % 60;
|
|
730
|
+
return rest ? `${hours}h ${rest}m` : `${hours}h`;
|
|
731
|
+
}
|
|
732
|
+
function envelopes(error, failureHint) {
|
|
733
|
+
const details = record(error.details);
|
|
734
|
+
const response = record(record(details?.details)?.response) ?? record(details?.response);
|
|
735
|
+
const sources = [
|
|
736
|
+
failureHint,
|
|
737
|
+
response,
|
|
738
|
+
record(response?.error),
|
|
739
|
+
record(details?.publicDetails),
|
|
740
|
+
error
|
|
741
|
+
];
|
|
742
|
+
return [...sources, ...sources.map((source) => record(source?.billing))].filter(
|
|
743
|
+
(value) => value !== null
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
function firstText(sources, ...keys) {
|
|
747
|
+
for (const source of sources) {
|
|
748
|
+
for (const key of keys) {
|
|
749
|
+
const value = text(source[key]);
|
|
750
|
+
if (value) return value;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
return null;
|
|
754
|
+
}
|
|
755
|
+
function namedFields(sources) {
|
|
756
|
+
const fields = [];
|
|
757
|
+
const add = (value) => {
|
|
758
|
+
const name = text(value);
|
|
759
|
+
if (name && !fields.includes(name) && fields.length < MAX_FIELDS) {
|
|
760
|
+
fields.push(name);
|
|
761
|
+
}
|
|
762
|
+
};
|
|
763
|
+
for (const source of sources) {
|
|
764
|
+
for (const field of Array.isArray(source.fields) ? source.fields : []) {
|
|
765
|
+
add(field);
|
|
766
|
+
}
|
|
767
|
+
const issues = Array.isArray(source.validation_issues) ? source.validation_issues : Array.isArray(source.issues) ? source.issues : [];
|
|
768
|
+
for (const issue of issues) {
|
|
769
|
+
const path = record(issue)?.path;
|
|
770
|
+
const name = Array.isArray(path) ? path.map(String).join(".") : path;
|
|
771
|
+
if (name !== "(root)") add(name);
|
|
772
|
+
}
|
|
773
|
+
const mappings = Array.isArray(source.adapter_field_mappings) ? source.adapter_field_mappings : [];
|
|
774
|
+
for (const mapping of mappings) add(record(mapping)?.deepline_field);
|
|
775
|
+
add(source.field);
|
|
776
|
+
}
|
|
777
|
+
return fields;
|
|
778
|
+
}
|
|
779
|
+
function clipHint(hint) {
|
|
780
|
+
if (!hint) return void 0;
|
|
781
|
+
const oneLine = hint.replace(/\s+/g, " ").trim();
|
|
782
|
+
return oneLine.length > MAX_HINT_CHARS ? `${oneLine.slice(0, MAX_HINT_CHARS - 1)}\u2026` : oneLine;
|
|
783
|
+
}
|
|
784
|
+
function cliRetryGuidance(error, failureHint = null) {
|
|
785
|
+
const value = record(error);
|
|
786
|
+
if (!value) return null;
|
|
787
|
+
const existing = record(value.retry);
|
|
788
|
+
if (existing && typeof existing.reason === "string") {
|
|
789
|
+
return existing;
|
|
790
|
+
}
|
|
791
|
+
const failure = normalizeToolExecutionFailure(value.tool_error);
|
|
792
|
+
const code = (text(value.code) ?? failure?.code ?? "").toUpperCase();
|
|
793
|
+
const toolCode = (failure?.code ?? "").toUpperCase();
|
|
794
|
+
const codes = new Set([code, toolCode].filter(Boolean));
|
|
795
|
+
const has = (set) => [...codes].some((entry) => set.has(entry));
|
|
796
|
+
const details = record(value.details);
|
|
797
|
+
const upstream = record(value.upstreamResponse);
|
|
798
|
+
const deeplineStatus = failure?.statusCode ?? (typeof details?.statusCode === "number" ? details.statusCode : null);
|
|
799
|
+
const status = (typeof upstream?.status === "number" ? upstream.status : null) ?? deeplineStatus;
|
|
800
|
+
const sources = envelopes(value, record(failureHint));
|
|
801
|
+
const hint = clipHint(firstText(sources, "operatorHint", "operator_hint"));
|
|
802
|
+
const fields = namedFields(sources);
|
|
803
|
+
const extras = hint ? { hint } : {};
|
|
804
|
+
const afterMs = failure?.retryAfterMs ?? (typeof details?.retryAfterMs === "number" ? details.retryAfterMs : null);
|
|
805
|
+
if (has(OUT_OF_CREDITS_CODES)) {
|
|
806
|
+
const billingUrl = firstText(sources, "billing_url", "billingUrl");
|
|
807
|
+
return {
|
|
808
|
+
canSucceed: false,
|
|
809
|
+
afterMs: null,
|
|
810
|
+
reason: "out_of_credits",
|
|
811
|
+
next: `The workspace is out of Deepline credits, so every paid call fails until credits are added. Stop and tell the user; they can add credits ${billingUrl ? `at ${billingUrl}` : "in the Billing page"} or with \`deepline billing top-up <credits>\`.`,
|
|
812
|
+
...extras
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
if (has(SPENDING_CAP_CODES)) {
|
|
816
|
+
return {
|
|
817
|
+
canSucceed: false,
|
|
818
|
+
afterMs: null,
|
|
819
|
+
reason: "spending_cap",
|
|
820
|
+
next: "A Deepline spending cap blocks this call, so it fails until the cap is raised. Stop and tell the user; the error names the cap and the command that changes it.",
|
|
821
|
+
...extras
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
if (codes.has("PROVIDER_ACCOUNT_CAPACITY")) {
|
|
825
|
+
return {
|
|
826
|
+
canSucceed: false,
|
|
827
|
+
afterMs: null,
|
|
828
|
+
reason: "provider_capacity",
|
|
829
|
+
next: "The provider account behind this tool is out of capacity, so the same call fails until it is restored. Use another provider's tool for this step.",
|
|
830
|
+
...extras
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
const rateLimited = {
|
|
834
|
+
canSucceed: true,
|
|
835
|
+
afterMs,
|
|
836
|
+
reason: "rate_limited",
|
|
837
|
+
next: `Rate limited: wait${afterMs === null ? " a few seconds" : ""} before sending this call again, and run fewer calls at once. Sending it sooner fails the same way.`,
|
|
838
|
+
...extras
|
|
839
|
+
};
|
|
840
|
+
if (has(RATE_LIMIT_CODES) || failure?.category === "rate_limit") {
|
|
841
|
+
return rateLimited;
|
|
842
|
+
}
|
|
843
|
+
if (has(CREDENTIAL_CODES) || failure?.category === "authentication" || failure?.category === "authorization") {
|
|
844
|
+
return {
|
|
845
|
+
canSucceed: false,
|
|
846
|
+
afterMs: null,
|
|
847
|
+
reason: "credentials",
|
|
848
|
+
next: codes.has("INTEGRATION_CREDENTIALS_MISSING") ? "This tool needs a provider connection that is not set up, so the same call fails until it is connected." : upstream ? "The provider refused the connected credential or its permissions. Check the connected key and its plan; the same call fails until that changes." : (
|
|
849
|
+
// Only a customer's connected key carries `upstreamResponse`; a
|
|
850
|
+
// refusal of Deepline's managed key is not the customer's to fix.
|
|
851
|
+
"The provider refused Deepline's credential for this tool, so the same call fails until Deepline restores it. Use another provider's tool for this step, or report the request id."
|
|
852
|
+
),
|
|
853
|
+
...extras
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
if (has(BAD_INPUT_CODES) || failure?.category === "validation") {
|
|
857
|
+
return {
|
|
858
|
+
canSucceed: false,
|
|
859
|
+
afterMs: null,
|
|
860
|
+
reason: "bad_input",
|
|
861
|
+
next: `The input was rejected, so the same call fails again. Fix ${fields.length ? fields.join(", ") : "the input"} first.`,
|
|
862
|
+
...fields.length ? { fields } : {},
|
|
863
|
+
...extras
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
if (codes.has("UPSTREAM_NOT_FOUND")) {
|
|
867
|
+
return {
|
|
868
|
+
canSucceed: false,
|
|
869
|
+
afterMs: null,
|
|
870
|
+
reason: "no_match",
|
|
871
|
+
next: "The provider has no record for this input. Treat it as no match (found: false), not a failure to retry; the same call returns the same answer.",
|
|
872
|
+
...extras
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
if (deeplineStatus === 429) return rateLimited;
|
|
876
|
+
if (failure?.retryable) {
|
|
877
|
+
return {
|
|
878
|
+
canSucceed: true,
|
|
879
|
+
afterMs,
|
|
880
|
+
reason: "temporary",
|
|
881
|
+
next: "Temporary failure: send the same call again. If it fails the same way twice, stop and report the request id.",
|
|
882
|
+
...extras
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
if ((failure?.origin === "provider" || upstream) && typeof status === "number" && status >= 400 && status < 500 && !TRANSIENT_CLIENT_ERROR_STATUSES.has(status)) {
|
|
886
|
+
return {
|
|
887
|
+
canSucceed: false,
|
|
888
|
+
afterMs: null,
|
|
889
|
+
reason: "provider_rejected",
|
|
890
|
+
next: "The provider rejected this request, so the same call fails again. Change the input or use another provider.",
|
|
891
|
+
...extras
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
if (!failure) return null;
|
|
895
|
+
return {
|
|
896
|
+
canSucceed: null,
|
|
897
|
+
afterMs: null,
|
|
898
|
+
reason: "not_retry_safe",
|
|
899
|
+
next: "Not marked safe to repeat, and it may not help. Send it again at most once; if it fails the same way, stop and report the request id.",
|
|
900
|
+
...extras
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
function formatCliRetryGuidance(guidance, message) {
|
|
904
|
+
const verdict = guidance.canSucceed === true ? guidance.afterMs === null ? "yes" : `yes, after ${formatRetryWait(guidance.afterMs)}` : guidance.canSucceed === false ? "no" : "unknown";
|
|
905
|
+
const lines = [`Retry: ${verdict}. ${guidance.next}`];
|
|
906
|
+
if (guidance.hint && !(message ?? "").includes(guidance.hint)) {
|
|
907
|
+
lines.push(`Hint: ${guidance.hint}`);
|
|
908
|
+
}
|
|
909
|
+
return lines;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
// src/cli/utils.ts
|
|
681
913
|
var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
682
914
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
683
915
|
var defaultBrowserCommandRunner = childProcess;
|
|
@@ -1170,30 +1402,30 @@ function flattenObjectColumns(row, options = {}) {
|
|
|
1170
1402
|
continue;
|
|
1171
1403
|
}
|
|
1172
1404
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
1173
|
-
const
|
|
1405
|
+
const record2 = value;
|
|
1174
1406
|
if (options.objectColumns === "json") {
|
|
1175
|
-
flattened[key] = csvSafeJsonString(
|
|
1407
|
+
flattened[key] = csvSafeJsonString(record2);
|
|
1176
1408
|
continue;
|
|
1177
1409
|
}
|
|
1178
|
-
const hasMatchedEnvelope = Object.prototype.hasOwnProperty.call(
|
|
1410
|
+
const hasMatchedEnvelope = Object.prototype.hasOwnProperty.call(record2, "matched_result") || Object.prototype.hasOwnProperty.call(record2, "matchedResult");
|
|
1179
1411
|
if (hasMatchedEnvelope) {
|
|
1180
|
-
flattened[key] = csvSafeJsonString(
|
|
1412
|
+
flattened[key] = csvSafeJsonString(record2);
|
|
1181
1413
|
continue;
|
|
1182
1414
|
}
|
|
1183
1415
|
if (parsedFromString && shouldPreserveJsonStringColumn(options.preserveJsonStringColumns, key)) {
|
|
1184
1416
|
flattened[key] = rawValue;
|
|
1185
1417
|
continue;
|
|
1186
1418
|
} else {
|
|
1187
|
-
const failureMessage = failureMessageFromRecord(
|
|
1419
|
+
const failureMessage = failureMessageFromRecord(record2);
|
|
1188
1420
|
if (failureMessage) {
|
|
1189
1421
|
flattened[key] = failureMessage;
|
|
1190
1422
|
continue;
|
|
1191
|
-
} else if (Object.prototype.hasOwnProperty.call(
|
|
1192
|
-
flattened[key] = csvSafeJsonString(
|
|
1423
|
+
} else if (Object.prototype.hasOwnProperty.call(record2, "result")) {
|
|
1424
|
+
flattened[key] = csvSafeJsonString(record2);
|
|
1193
1425
|
continue;
|
|
1194
1426
|
}
|
|
1195
1427
|
}
|
|
1196
|
-
for (const [nestedKey, nestedValue] of Object.entries(
|
|
1428
|
+
for (const [nestedKey, nestedValue] of Object.entries(record2)) {
|
|
1197
1429
|
flattened[`${key}.${nestedKey}`] = nestedValue && typeof nestedValue === "object" ? csvSafeJsonString(nestedValue) : nestedValue;
|
|
1198
1430
|
}
|
|
1199
1431
|
continue;
|
|
@@ -1255,8 +1487,8 @@ function markdownCell(value) {
|
|
|
1255
1487
|
if (value === null || value === void 0) {
|
|
1256
1488
|
return "";
|
|
1257
1489
|
}
|
|
1258
|
-
const
|
|
1259
|
-
return
|
|
1490
|
+
const text2 = typeof value === "object" ? JSON.stringify(value) : String(value);
|
|
1491
|
+
return text2.replace(/\|/g, "\\|").replace(/\r?\n/g, "<br>");
|
|
1260
1492
|
}
|
|
1261
1493
|
function markdownTableFromRows(rows, preferredColumns = []) {
|
|
1262
1494
|
const flattenedRows = dataExportRows(rows);
|
|
@@ -1325,7 +1557,6 @@ function cliToolExecutionFailure(error) {
|
|
|
1325
1557
|
var UPSTREAM_BODY_EXCERPT_CHARS = 300;
|
|
1326
1558
|
var UPSTREAM_BODY_MAX_DEPTH = 6;
|
|
1327
1559
|
var CREDENTIAL_FIELD_RE = /(?:^|[-_])(?:auth|key|sig(?:nature)?|session)$|api[-_]?key|apikey|access[-_]?key|private|token|secret|passw(?:or)?d|authorization|cookie|credential|bearer/i;
|
|
1328
|
-
var TRANSIENT_CLIENT_ERROR_STATUSES = /* @__PURE__ */ new Set([408, 425, 429]);
|
|
1329
1560
|
function maskCredentialFields(value, depth = 0) {
|
|
1330
1561
|
if (value === null || typeof value !== "object") return value;
|
|
1331
1562
|
if (depth >= UPSTREAM_BODY_MAX_DEPTH) return "[nested]";
|
|
@@ -1351,38 +1582,31 @@ function formatUpstreamBodyExcerpt(body) {
|
|
|
1351
1582
|
}
|
|
1352
1583
|
}
|
|
1353
1584
|
if (value === null || value === void 0) return "(empty body)";
|
|
1354
|
-
let
|
|
1585
|
+
let text2;
|
|
1355
1586
|
try {
|
|
1356
|
-
|
|
1587
|
+
text2 = typeof value === "string" ? value : JSON.stringify(maskCredentialFields(value)) ?? String(value);
|
|
1357
1588
|
} catch {
|
|
1358
|
-
|
|
1589
|
+
text2 = String(value);
|
|
1359
1590
|
}
|
|
1360
|
-
const redacted = redactFailureText(
|
|
1591
|
+
const redacted = redactFailureText(text2, Number.MAX_SAFE_INTEGER).replace(/\s+/g, " ").trim();
|
|
1361
1592
|
if (!redacted) return "(empty body)";
|
|
1362
1593
|
return redacted.length > UPSTREAM_BODY_EXCERPT_CHARS ? `${redacted.slice(0, UPSTREAM_BODY_EXCERPT_CHARS)}\u2026 (full body: rerun with --json)` : redacted;
|
|
1363
1594
|
}
|
|
1364
|
-
function permanentProviderFailureLine(status, connectedCredential) {
|
|
1365
|
-
if (typeof status !== "number" || status < 400 || status >= 500) return null;
|
|
1366
|
-
if (TRANSIENT_CLIENT_ERROR_STATUSES.has(status)) return null;
|
|
1367
|
-
if (connectedCredential && (status === 401 || status === 403)) {
|
|
1368
|
-
return "Permanent: the provider refused this credential or its permissions. Check the connected key and its plan before retrying.";
|
|
1369
|
-
}
|
|
1370
|
-
return "Permanent: the provider rejected this request. Retrying it unchanged will fail again.";
|
|
1371
|
-
}
|
|
1372
1595
|
function formatToolExecutionErrorDiagnostic(error) {
|
|
1373
1596
|
return formatCliFailureDiagnostic(errorToJsonPayload(error).error);
|
|
1374
1597
|
}
|
|
1375
1598
|
function formatCliFailureDiagnostic(error) {
|
|
1376
1599
|
if (error === null || typeof error !== "object") return null;
|
|
1377
|
-
const
|
|
1378
|
-
const failure = normalizeToolExecutionFailure(
|
|
1379
|
-
const upstreamResponse = readToolUpstreamResponse(
|
|
1380
|
-
|
|
1600
|
+
const record2 = error;
|
|
1601
|
+
const failure = normalizeToolExecutionFailure(record2.tool_error);
|
|
1602
|
+
const upstreamResponse = readToolUpstreamResponse(record2);
|
|
1603
|
+
const retry = cliRetryGuidance(record2);
|
|
1604
|
+
if (!failure && !upstreamResponse && !retry) return null;
|
|
1381
1605
|
const lines = [];
|
|
1382
1606
|
if (failure) {
|
|
1383
1607
|
lines.push(
|
|
1384
1608
|
`Tool: ${failure.toolId}${failure.provider ? `; provider: ${failure.provider}` : ""}${failure.operation ? `; operation: ${failure.operation}` : ""}.`,
|
|
1385
|
-
`Failure: ${failure.origin} / ${failure.category}
|
|
1609
|
+
`Failure: ${failure.origin} / ${failure.category}${failure.code ? ` (${failure.code})` : ""}.`
|
|
1386
1610
|
);
|
|
1387
1611
|
}
|
|
1388
1612
|
if (upstreamResponse) {
|
|
@@ -1390,12 +1614,13 @@ function formatCliFailureDiagnostic(error) {
|
|
|
1390
1614
|
`Provider response: HTTP ${upstreamResponse.status}: ${formatUpstreamBodyExcerpt(upstreamResponse.body)}`
|
|
1391
1615
|
);
|
|
1392
1616
|
}
|
|
1393
|
-
if (
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1617
|
+
if (retry) {
|
|
1618
|
+
lines.push(
|
|
1619
|
+
...formatCliRetryGuidance(
|
|
1620
|
+
retry,
|
|
1621
|
+
typeof record2.message === "string" ? record2.message : null
|
|
1622
|
+
)
|
|
1397
1623
|
);
|
|
1398
|
-
if (permanent) lines.push(permanent);
|
|
1399
1624
|
}
|
|
1400
1625
|
if (failure?.networkKind || failure?.networkScope) {
|
|
1401
1626
|
lines.push(
|
|
@@ -1425,6 +1650,9 @@ function errorToJsonPayload(error) {
|
|
|
1425
1650
|
if (typeof maybeRecord?.retryable === "boolean") {
|
|
1426
1651
|
details.retryable = maybeRecord.retryable;
|
|
1427
1652
|
}
|
|
1653
|
+
if (typeof maybeRecord?.retryAfterMs === "number" && Number.isFinite(maybeRecord.retryAfterMs)) {
|
|
1654
|
+
details.retryAfterMs = maybeRecord.retryAfterMs;
|
|
1655
|
+
}
|
|
1428
1656
|
if (maybeRecord?.publicDetails && typeof maybeRecord.publicDetails === "object" && !Array.isArray(maybeRecord.publicDetails)) {
|
|
1429
1657
|
details.publicDetails = maybeRecord.publicDetails;
|
|
1430
1658
|
}
|
|
@@ -1442,18 +1670,20 @@ function errorToJsonPayload(error) {
|
|
|
1442
1670
|
details.cause = maybeRecord.cause;
|
|
1443
1671
|
}
|
|
1444
1672
|
const statusCode = typeof maybeRecord?.statusCode === "number" ? maybeRecord.statusCode : typeof maybeRecord?.status === "number" ? maybeRecord.status : toolFailure?.statusCode ?? void 0;
|
|
1673
|
+
const payloadError = {
|
|
1674
|
+
message,
|
|
1675
|
+
code,
|
|
1676
|
+
...toolFailure ? { tool_error: toolFailure } : {},
|
|
1677
|
+
...upstreamResponse ? { upstreamResponse } : {},
|
|
1678
|
+
...Object.keys(details).length > 0 ? { details } : {}
|
|
1679
|
+
};
|
|
1680
|
+
const retry = cliRetryGuidance(payloadError, readToolFailureHint(error));
|
|
1445
1681
|
return {
|
|
1446
1682
|
ok: false,
|
|
1447
1683
|
status: "failed",
|
|
1448
1684
|
...typeof statusCode === "number" ? { statusCode } : {},
|
|
1449
1685
|
...exitCode !== void 0 ? { exitCode } : {},
|
|
1450
|
-
error: {
|
|
1451
|
-
message,
|
|
1452
|
-
code,
|
|
1453
|
-
...toolFailure ? { tool_error: toolFailure } : {},
|
|
1454
|
-
...upstreamResponse ? { upstreamResponse } : {},
|
|
1455
|
-
...Object.keys(details).length > 0 ? { details } : {}
|
|
1456
|
-
}
|
|
1686
|
+
error: { ...payloadError, ...retry ? { retry } : {} }
|
|
1457
1687
|
};
|
|
1458
1688
|
}
|
|
1459
1689
|
function formatProviderConcurrencyDiagnostic(error) {
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AGICYWGN.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveBaseUrlOnly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LFOERUQY.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -80,7 +80,7 @@ async function handleStatus(options) {
|
|
|
80
80
|
(row) => row.installationId !== installation?.installationId
|
|
81
81
|
);
|
|
82
82
|
const lines = installation ? describeInstallationStatus(installation) : [
|
|
83
|
-
"No GitHub installation is connected to this
|
|
83
|
+
"No GitHub installation is connected to this org. Run `deepline git connect`."
|
|
84
84
|
];
|
|
85
85
|
for (const other of others) {
|
|
86
86
|
lines.push(
|
|
@@ -181,7 +181,7 @@ async function resolveRepoId(repo, installation) {
|
|
|
181
181
|
);
|
|
182
182
|
if (!match) {
|
|
183
183
|
throw new Error(
|
|
184
|
-
`Repo "${repo}" is not accessible to the
|
|
184
|
+
`Repo "${repo}" is not accessible to the org's GitHub installation. Run \`deepline git repos\` to list what is.`
|
|
185
185
|
);
|
|
186
186
|
}
|
|
187
187
|
return match.repoId;
|
|
@@ -210,7 +210,7 @@ async function handleLink(repo, options) {
|
|
|
210
210
|
(warning) => `WARNING: ${warning}`
|
|
211
211
|
),
|
|
212
212
|
"Pushes to the production branch now register and promote changed plays.",
|
|
213
|
-
"Anyone who can push to this repo can change what runs in this
|
|
213
|
+
"Anyone who can push to this repo can change what runs in this org."
|
|
214
214
|
]
|
|
215
215
|
}
|
|
216
216
|
]
|
|
@@ -298,9 +298,9 @@ async function handleConnect(options) {
|
|
|
298
298
|
{
|
|
299
299
|
title: "connect GitHub",
|
|
300
300
|
lines: [
|
|
301
|
-
"Git deploys is in beta and requires
|
|
301
|
+
"Git deploys is in beta and requires org enablement. Contact the Deepline team to request enablement if interested.",
|
|
302
302
|
opened === "opened" ? `Opened ${connectUrl} in your browser.` : `Open ${connectUrl} in your browser.`,
|
|
303
|
-
"Sign in as
|
|
303
|
+
"Sign in as an org admin if prompted, approve the GitHub",
|
|
304
304
|
"installation, then return here and run `deepline git repos`."
|
|
305
305
|
]
|
|
306
306
|
}
|
|
@@ -414,8 +414,8 @@ function registerGitCommands(program) {
|
|
|
414
414
|
).addHelpText(
|
|
415
415
|
"after",
|
|
416
416
|
`
|
|
417
|
-
Git deploys is in beta and requires
|
|
418
|
-
If it is not enabled for your
|
|
417
|
+
Git deploys is in beta and requires org enablement.
|
|
418
|
+
If it is not enabled for your org, contact the Deepline team to request
|
|
419
419
|
enablement.
|
|
420
420
|
|
|
421
421
|
Examples:
|
|
@@ -437,9 +437,9 @@ Guide: https://deepline.com/docs/sdk-v2/git-deploys
|
|
|
437
437
|
);
|
|
438
438
|
git.command("connect").description("Connect a GitHub installation (browser step).").option("--json", "Emit JSON output").action(async (options) => handleConnect(options));
|
|
439
439
|
git.command("status").description(
|
|
440
|
-
"Show the
|
|
440
|
+
"Show the org's GitHub installation and whether it is still usable."
|
|
441
441
|
).option("--json", "Emit JSON output").action(async (options) => handleStatus(options));
|
|
442
|
-
git.command("repos").description("List repos the
|
|
442
|
+
git.command("repos").description("List repos the org's GitHub installation can reach.").option(
|
|
443
443
|
"--installation <id>",
|
|
444
444
|
"GitHub installation id (required when several are connected)"
|
|
445
445
|
).option("--json", "Emit JSON output").action(
|
|
@@ -448,7 +448,7 @@ Guide: https://deepline.com/docs/sdk-v2/git-deploys
|
|
|
448
448
|
git.command("list").description("List linked repositories.").option("--all", "Include unlinked repositories").option("--json", "Emit JSON output").action(
|
|
449
449
|
async (options) => handleList(options)
|
|
450
450
|
);
|
|
451
|
-
git.command("link").description("Link a repository to this
|
|
451
|
+
git.command("link").description("Link a repository to this org for deploy-on-push.").argument("<repo>", "Repo full name (owner/name) or numeric repo id").option("--root-dir <path>", "Base path inside the repo for this link").option("--branch <name>", "Production branch (default: repo default)").option(
|
|
452
452
|
"--manifest <file>",
|
|
453
453
|
"Manifest file name under the base path (default: deepline.json)"
|
|
454
454
|
).option(
|