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
|
@@ -4,8 +4,16 @@ type SecretRedactionOptions = {
|
|
|
4
4
|
redactHighEntropy?: boolean;
|
|
5
5
|
/** Preserve pagination cursors and signed transfer URLs in authenticated results. */
|
|
6
6
|
keyPolicy?: 'strict' | 'public-result';
|
|
7
|
+
/** Server-owned non-secret Boolean leaves; [] is an explicit array step. Callers already prove publication authority. */
|
|
8
|
+
booleanDataPaths?: readonly (readonly string[])[];
|
|
9
|
+
/** Exact response field path declared by the authenticated provider boundary. */
|
|
10
|
+
publicResultCursorPath?: readonly string[];
|
|
7
11
|
/** Replace sample cursor values with a non-capability-bearing placeholder. */
|
|
8
12
|
placeholderContinuationValues?: boolean;
|
|
13
|
+
/** Trusted successful authenticated publication only; never enable for errors/logs. */
|
|
14
|
+
preserveODataContinuationUrl?: (path: readonly string[]) => boolean;
|
|
15
|
+
/** Actual server-applied secret registry; required for scoped OData publication. */
|
|
16
|
+
redactODataKnownSecrets?: (value: string) => string;
|
|
9
17
|
};
|
|
10
18
|
|
|
11
19
|
const SENSITIVE_KEY_PATTERNS = [
|
|
@@ -335,6 +343,101 @@ function inspectStandalonePublicHttpUrl(
|
|
|
335
343
|
return 'safe';
|
|
336
344
|
}
|
|
337
345
|
|
|
346
|
+
/** Check every encoding layer against the applied credential registry. */
|
|
347
|
+
function isKnownSecretFreeODataComponent(
|
|
348
|
+
component: string,
|
|
349
|
+
redactKnownSecrets: (value: string) => string,
|
|
350
|
+
): boolean {
|
|
351
|
+
let candidate = component;
|
|
352
|
+
while (true) {
|
|
353
|
+
if (redactKnownSecrets(candidate) !== candidate) return false;
|
|
354
|
+
if (!candidate.includes('%')) return true;
|
|
355
|
+
let decoded: string;
|
|
356
|
+
try {
|
|
357
|
+
decoded = decodeURIComponent(candidate);
|
|
358
|
+
} catch {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
if (decoded === candidate) return true;
|
|
362
|
+
// A changed percent decode shortens the string. This proves termination
|
|
363
|
+
// for nested encodings without imposing an arbitrary decoding depth.
|
|
364
|
+
if (decoded.length >= candidate.length) return false;
|
|
365
|
+
candidate = decoded;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// OData next-page URLs contain business cursors, not OAuth credentials. Keep
|
|
370
|
+
// this separate from ordinary public-result redaction, which also handles errors.
|
|
371
|
+
function redactODataContinuationUrl(
|
|
372
|
+
value: string,
|
|
373
|
+
key: string | undefined,
|
|
374
|
+
path: readonly string[],
|
|
375
|
+
options: SecretRedactionOptions,
|
|
376
|
+
): string | undefined {
|
|
377
|
+
if (
|
|
378
|
+
options.keyPolicy !== 'public-result' ||
|
|
379
|
+
!key ||
|
|
380
|
+
options.preserveODataContinuationUrl?.([...path, key]) !== true
|
|
381
|
+
)
|
|
382
|
+
return undefined;
|
|
383
|
+
const redactKnownSecrets = options.redactODataKnownSecrets;
|
|
384
|
+
if (!redactKnownSecrets) return REDACTED_VALUE;
|
|
385
|
+
if (/\s/.test(value)) return REDACTED_VALUE;
|
|
386
|
+
let url: URL;
|
|
387
|
+
try {
|
|
388
|
+
url = new URL(value);
|
|
389
|
+
} catch {
|
|
390
|
+
return REDACTED_VALUE;
|
|
391
|
+
}
|
|
392
|
+
if (
|
|
393
|
+
url.origin !== 'https://graph.microsoft.com' ||
|
|
394
|
+
!url.pathname.startsWith('/v1.0/') ||
|
|
395
|
+
url.username ||
|
|
396
|
+
url.password ||
|
|
397
|
+
url.hash
|
|
398
|
+
)
|
|
399
|
+
return REDACTED_VALUE;
|
|
400
|
+
// Check raw components before URLSearchParams can replace malformed escapes,
|
|
401
|
+
// as well as its decoded names/values, including '+' decoding.
|
|
402
|
+
const components = [value, url.pathname];
|
|
403
|
+
for (const entry of url.search.slice(1).split('&')) {
|
|
404
|
+
const separator = entry.indexOf('=');
|
|
405
|
+
components.push(
|
|
406
|
+
separator < 0 ? entry : entry.slice(0, separator),
|
|
407
|
+
separator < 0 ? '' : entry.slice(separator + 1),
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
for (const [name, paramValue] of url.searchParams)
|
|
411
|
+
components.push(name, paramValue);
|
|
412
|
+
if (
|
|
413
|
+
components.some(
|
|
414
|
+
(component) =>
|
|
415
|
+
!isKnownSecretFreeODataComponent(component, redactKnownSecrets),
|
|
416
|
+
)
|
|
417
|
+
)
|
|
418
|
+
return REDACTED_VALUE;
|
|
419
|
+
for (const [name, paramValue] of url.searchParams) {
|
|
420
|
+
if (
|
|
421
|
+
name !== '$skiptoken' &&
|
|
422
|
+
(SENSITIVE_URL_PARAM_KEY_PATTERN.test(name) ||
|
|
423
|
+
SENSITIVE_KEY_PATTERNS.some((pattern) => pattern.test(name)) ||
|
|
424
|
+
/auth|session|^api$|^key$/i.test(name))
|
|
425
|
+
)
|
|
426
|
+
return REDACTED_VALUE;
|
|
427
|
+
// URLSearchParams decodes names and values. Encoded credentials must not
|
|
428
|
+
// evade the same explicit-secret and assignment checks as ordinary strings.
|
|
429
|
+
const strictValueOptions = { ...options, redactHighEntropy: false };
|
|
430
|
+
if (
|
|
431
|
+
hasExplicitSecretValue(paramValue, { redactHighEntropy: true }) ||
|
|
432
|
+
maybeRedactString(paramValue, strictValueOptions) !== paramValue
|
|
433
|
+
)
|
|
434
|
+
return REDACTED_VALUE;
|
|
435
|
+
}
|
|
436
|
+
if (hasExplicitSecretValue(value, { redactHighEntropy: true }))
|
|
437
|
+
return REDACTED_VALUE;
|
|
438
|
+
return options.placeholderContinuationValues ? '[PAGINATION_CURSOR]' : value;
|
|
439
|
+
}
|
|
440
|
+
|
|
338
441
|
function shouldRedactKey(key: string) {
|
|
339
442
|
if (SAFE_IDENTIFIER_KEYS.has(key)) {
|
|
340
443
|
return false;
|
|
@@ -345,9 +448,13 @@ function shouldRedactKey(key: string) {
|
|
|
345
448
|
function isPublicResultCursorKey(
|
|
346
449
|
key: string,
|
|
347
450
|
path: readonly string[],
|
|
451
|
+
cursorPath?: readonly string[],
|
|
348
452
|
): boolean {
|
|
349
453
|
return (
|
|
350
454
|
PUBLIC_RESULT_CURSOR_KEYS.has(key) ||
|
|
455
|
+
(cursorPath?.length === path.length + 1 &&
|
|
456
|
+
cursorPath.at(-1) === key &&
|
|
457
|
+
path.every((part, index) => part === cursorPath[index])) ||
|
|
351
458
|
(key === 'token' && PAGINATION_CONTAINER_KEYS.has(path.at(-1) ?? ''))
|
|
352
459
|
);
|
|
353
460
|
}
|
|
@@ -356,8 +463,9 @@ function isPublicResultSafeTokenKey(
|
|
|
356
463
|
key: string,
|
|
357
464
|
path: readonly string[],
|
|
358
465
|
value: unknown,
|
|
466
|
+
cursorPath?: readonly string[],
|
|
359
467
|
): boolean {
|
|
360
|
-
if (isPublicResultCursorKey(key, path)) return true;
|
|
468
|
+
if (isPublicResultCursorKey(key, path, cursorPath)) return true;
|
|
361
469
|
if (value === null) {
|
|
362
470
|
return (
|
|
363
471
|
PUBLIC_RESULT_TOKEN_EXPIRY_KEYS.has(key) ||
|
|
@@ -414,6 +522,13 @@ export function redactSecretsInValue<T>(
|
|
|
414
522
|
if (hasExplicitSecretValue(value, options)) {
|
|
415
523
|
return REDACTED_VALUE as T;
|
|
416
524
|
}
|
|
525
|
+
const continuation = redactODataContinuationUrl(
|
|
526
|
+
value,
|
|
527
|
+
parentKey,
|
|
528
|
+
[],
|
|
529
|
+
options,
|
|
530
|
+
);
|
|
531
|
+
if (continuation !== undefined) return continuation as T;
|
|
417
532
|
if (isPublicResultTransferUrl(value, parentKey, options)) return value as T;
|
|
418
533
|
if (parentKey && SAFE_IDENTIFIER_KEYS.has(parentKey)) {
|
|
419
534
|
return value as T;
|
|
@@ -448,16 +563,34 @@ export function redactSecretsInValue<T>(
|
|
|
448
563
|
target: Container;
|
|
449
564
|
parentKey?: string;
|
|
450
565
|
path: string[];
|
|
451
|
-
|
|
566
|
+
/** Structural path for Boolean capabilities; ordinary/OData/cursor paths remain array-transparent. */
|
|
567
|
+
booleanPath?: string[];
|
|
568
|
+
}> = [
|
|
569
|
+
{
|
|
570
|
+
source: value as Container,
|
|
571
|
+
target: root,
|
|
572
|
+
parentKey,
|
|
573
|
+
path: [],
|
|
574
|
+
booleanPath: options.booleanDataPaths?.length ? [] : undefined,
|
|
575
|
+
},
|
|
576
|
+
];
|
|
452
577
|
|
|
453
578
|
const redactNestedValue = (
|
|
454
579
|
item: unknown,
|
|
455
580
|
itemParentKey: string | undefined,
|
|
581
|
+
itemPath: readonly string[],
|
|
456
582
|
): unknown => {
|
|
457
583
|
if (typeof item !== 'string') return item;
|
|
458
584
|
if (hasExplicitSecretValue(item, options)) {
|
|
459
585
|
return REDACTED_VALUE;
|
|
460
586
|
}
|
|
587
|
+
const continuation = redactODataContinuationUrl(
|
|
588
|
+
item,
|
|
589
|
+
itemParentKey,
|
|
590
|
+
itemPath,
|
|
591
|
+
options,
|
|
592
|
+
);
|
|
593
|
+
if (continuation !== undefined) return continuation;
|
|
461
594
|
if (isPublicResultTransferUrl(item, itemParentKey, options)) return item;
|
|
462
595
|
if (itemParentKey && SAFE_IDENTIFIER_KEYS.has(itemParentKey)) return item;
|
|
463
596
|
if (itemParentKey && shouldRedactKey(itemParentKey)) {
|
|
@@ -472,17 +605,32 @@ export function redactSecretsInValue<T>(
|
|
|
472
605
|
const sourceIsArray = Array.isArray(current.source);
|
|
473
606
|
for (const [key, item] of Object.entries(current.source)) {
|
|
474
607
|
const itemParentKey = sourceIsArray ? current.parentKey : key;
|
|
608
|
+
// A literal object key must never impersonate the structural array step.
|
|
609
|
+
// Unconfigured callers do not allocate or track a Boolean path.
|
|
610
|
+
const booleanPath =
|
|
611
|
+
current.booleanPath && (sourceIsArray || key !== '[]')
|
|
612
|
+
? [...current.booleanPath, sourceIsArray ? '[]' : key]
|
|
613
|
+
: undefined;
|
|
475
614
|
if (
|
|
476
615
|
!sourceIsArray &&
|
|
477
616
|
options.keyPolicy === 'public-result' &&
|
|
478
|
-
isPublicResultSafeTokenKey(
|
|
617
|
+
isPublicResultSafeTokenKey(
|
|
618
|
+
key,
|
|
619
|
+
current.path,
|
|
620
|
+
item,
|
|
621
|
+
options.publicResultCursorPath,
|
|
622
|
+
) &&
|
|
479
623
|
(!item || typeof item !== 'object')
|
|
480
624
|
) {
|
|
481
625
|
const redacted =
|
|
482
626
|
typeof item === 'string' ? maybeRedactString(item, options) : item;
|
|
483
627
|
(current.target as Record<string, unknown>)[key] =
|
|
484
628
|
options.placeholderContinuationValues &&
|
|
485
|
-
isPublicResultCursorKey(
|
|
629
|
+
isPublicResultCursorKey(
|
|
630
|
+
key,
|
|
631
|
+
current.path,
|
|
632
|
+
options.publicResultCursorPath,
|
|
633
|
+
) &&
|
|
486
634
|
typeof redacted === 'string' &&
|
|
487
635
|
redacted !== REDACTED_VALUE &&
|
|
488
636
|
redacted.length > 0
|
|
@@ -490,6 +638,25 @@ export function redactSecretsInValue<T>(
|
|
|
490
638
|
: redacted;
|
|
491
639
|
continue;
|
|
492
640
|
}
|
|
641
|
+
if (
|
|
642
|
+
!sourceIsArray &&
|
|
643
|
+
typeof item === 'boolean' &&
|
|
644
|
+
booleanPath &&
|
|
645
|
+
options.keyPolicy === 'public-result' &&
|
|
646
|
+
!booleanPath.some((segment) =>
|
|
647
|
+
/^(?:_?meta(?:data)?|response_?meta|errors?|logs?|samples?|diagnostics?|requests?)$/i.test(
|
|
648
|
+
segment,
|
|
649
|
+
),
|
|
650
|
+
) &&
|
|
651
|
+
options.booleanDataPaths?.some(
|
|
652
|
+
(path) =>
|
|
653
|
+
path.length === booleanPath.length &&
|
|
654
|
+
path.every((segment, index) => segment === booleanPath[index]),
|
|
655
|
+
)
|
|
656
|
+
) {
|
|
657
|
+
(current.target as Record<string, unknown>)[key] = item;
|
|
658
|
+
continue;
|
|
659
|
+
}
|
|
493
660
|
if (!sourceIsArray && shouldRedactKey(key)) {
|
|
494
661
|
(current.target as Record<string, unknown>)[key] = REDACTED_VALUE;
|
|
495
662
|
continue;
|
|
@@ -502,12 +669,14 @@ export function redactSecretsInValue<T>(
|
|
|
502
669
|
target: nestedTarget,
|
|
503
670
|
parentKey: itemParentKey,
|
|
504
671
|
path: sourceIsArray ? current.path : [...current.path, key],
|
|
672
|
+
booleanPath,
|
|
505
673
|
});
|
|
506
674
|
continue;
|
|
507
675
|
}
|
|
508
676
|
(current.target as Record<string, unknown>)[key] = redactNestedValue(
|
|
509
677
|
item,
|
|
510
678
|
itemParentKey,
|
|
679
|
+
current.path,
|
|
511
680
|
);
|
|
512
681
|
}
|
|
513
682
|
}
|
|
@@ -530,12 +699,16 @@ export function redactSecretsInCustomerValue<T>(
|
|
|
530
699
|
/** Redaction for authenticated successful provider or Play result data. */
|
|
531
700
|
export function redactSecretsInPublicResultValue<T>(
|
|
532
701
|
value: T,
|
|
533
|
-
options: {
|
|
702
|
+
options: {
|
|
703
|
+
placeholderContinuationValues?: boolean;
|
|
704
|
+
booleanDataPaths?: readonly (readonly string[])[];
|
|
705
|
+
} = {},
|
|
534
706
|
): T {
|
|
535
707
|
return redactSecretsInValue(value, undefined, {
|
|
536
708
|
redactHighEntropy: false,
|
|
537
709
|
keyPolicy: 'public-result',
|
|
538
710
|
placeholderContinuationValues: options.placeholderContinuationValues,
|
|
711
|
+
booleanDataPaths: options.booleanDataPaths,
|
|
539
712
|
});
|
|
540
713
|
}
|
|
541
714
|
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signup screening from an email domain's DNS: whether any address sits
|
|
3
|
+
* behind the domain, and where its mail goes. The 2026-11 signup backtest
|
|
4
|
+
* found spam domains that host nothing and accept no mail, or whose mail
|
|
5
|
+
* server belongs to a disposable or operator-blocked domain. Any domain
|
|
6
|
+
* with an IP or a mail server of its own choosing passes, including
|
|
7
|
+
* self-hosted mail and forwarders.
|
|
8
|
+
*
|
|
9
|
+
* A failed lookup is never a verdict: the caller allows the signup and logs.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export type SignupDnsRecordType = 'A' | 'AAAA' | 'MX';
|
|
13
|
+
|
|
14
|
+
/** Answers for one name: `null` when the lookup itself failed. */
|
|
15
|
+
export type SignupDnsResolver = (
|
|
16
|
+
name: string,
|
|
17
|
+
type: SignupDnsRecordType,
|
|
18
|
+
) => Promise<string[] | null>;
|
|
19
|
+
|
|
20
|
+
/** Whether policy blocks a mail server's domain (disposable or operator block). */
|
|
21
|
+
export type BlockedMailDomainCheck = (domain: string) => Promise<boolean>;
|
|
22
|
+
|
|
23
|
+
export type SignupDnsScreenResult =
|
|
24
|
+
| { outcome: 'allow'; hasIp: boolean; hasMail: boolean }
|
|
25
|
+
| { outcome: 'block'; reason: 'no_ip_no_mail' }
|
|
26
|
+
| {
|
|
27
|
+
outcome: 'block';
|
|
28
|
+
reason: 'blocked_mail_server';
|
|
29
|
+
mailServerDomain: string;
|
|
30
|
+
}
|
|
31
|
+
| { outcome: 'unknown'; failedLookup: string };
|
|
32
|
+
|
|
33
|
+
function normalizeHost(value: string): string {
|
|
34
|
+
return value.trim().toLowerCase().replace(/\.$/, '');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Exchange host from an MX answer: `10 mail.example.com.` or the bare host. */
|
|
38
|
+
function mxHost(answer: string): string {
|
|
39
|
+
const parts = answer.trim().split(/\s+/);
|
|
40
|
+
return normalizeHost(parts[parts.length - 1] ?? '');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export async function screenSignupEmailDomain(
|
|
44
|
+
domain: string,
|
|
45
|
+
deps: {
|
|
46
|
+
resolve: SignupDnsResolver;
|
|
47
|
+
isBlockedMailDomain: BlockedMailDomainCheck;
|
|
48
|
+
},
|
|
49
|
+
): Promise<SignupDnsScreenResult> {
|
|
50
|
+
// tldts loads a public-suffix trie; keep it out of module load, which every
|
|
51
|
+
// Convex function that imports auth pays for (#11090).
|
|
52
|
+
const { getDomain } = await import('tldts');
|
|
53
|
+
const emailDomain = normalizeHost(domain);
|
|
54
|
+
const registrable = getDomain(emailDomain) ?? emailDomain;
|
|
55
|
+
const ipNames = [
|
|
56
|
+
...new Set([
|
|
57
|
+
emailDomain,
|
|
58
|
+
`www.${emailDomain}`,
|
|
59
|
+
registrable,
|
|
60
|
+
`www.${registrable}`,
|
|
61
|
+
]),
|
|
62
|
+
];
|
|
63
|
+
const lookups = [
|
|
64
|
+
...ipNames.flatMap((name) =>
|
|
65
|
+
(['A', 'AAAA'] as const).map((type) => ({ name, type })),
|
|
66
|
+
),
|
|
67
|
+
{ name: emailDomain, type: 'MX' as const },
|
|
68
|
+
];
|
|
69
|
+
const answers = await Promise.all(
|
|
70
|
+
lookups.map((lookup) => deps.resolve(lookup.name, lookup.type)),
|
|
71
|
+
);
|
|
72
|
+
const failed = lookups.findIndex((_, index) => answers[index] === null);
|
|
73
|
+
if (failed >= 0) {
|
|
74
|
+
return {
|
|
75
|
+
outcome: 'unknown',
|
|
76
|
+
failedLookup: `${lookups[failed]!.type} ${lookups[failed]!.name}`,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const hasIp = answers
|
|
80
|
+
.slice(0, -1)
|
|
81
|
+
.some((answer) => (answer?.length ?? 0) > 0);
|
|
82
|
+
// A null MX (`0 .`, RFC 7505) declares the domain accepts no mail.
|
|
83
|
+
const mailHosts = (answers[answers.length - 1] ?? [])
|
|
84
|
+
.map(mxHost)
|
|
85
|
+
.filter((host) => host.length > 0);
|
|
86
|
+
|
|
87
|
+
const mailServerDomains = new Set(
|
|
88
|
+
mailHosts.map((host) => getDomain(host) ?? host),
|
|
89
|
+
);
|
|
90
|
+
for (const mailServerDomain of mailServerDomains) {
|
|
91
|
+
if (mailServerDomain === registrable) continue;
|
|
92
|
+
if (await deps.isBlockedMailDomain(mailServerDomain)) {
|
|
93
|
+
return {
|
|
94
|
+
outcome: 'block',
|
|
95
|
+
reason: 'blocked_mail_server',
|
|
96
|
+
mailServerDomain,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const hasMail = mailHosts.length > 0;
|
|
102
|
+
if (hasIp || hasMail) return { outcome: 'allow', hasIp, hasMail };
|
|
103
|
+
return { outcome: 'block', reason: 'no_ip_no_mail' };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const DOH_ENDPOINT = 'https://cloudflare-dns.com/dns-query';
|
|
107
|
+
const DOH_RECORD_TYPE_CODES: Record<SignupDnsRecordType, number> = {
|
|
108
|
+
A: 1,
|
|
109
|
+
AAAA: 28,
|
|
110
|
+
MX: 15,
|
|
111
|
+
};
|
|
112
|
+
const DOH_TIMEOUT_MS = 3_000;
|
|
113
|
+
// RFC 8484 JSON status codes: 0 NOERROR, 3 NXDOMAIN. Anything else is a failure.
|
|
114
|
+
const DOH_NOERROR = 0;
|
|
115
|
+
const DOH_NXDOMAIN = 3;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* DNS over HTTPS through `fetch`, which every Convex runtime has (Node's
|
|
119
|
+
* `dns` module is not available to the Better Auth handler).
|
|
120
|
+
*/
|
|
121
|
+
export function dohSignupDnsResolver(
|
|
122
|
+
fetchImpl: typeof fetch = fetch,
|
|
123
|
+
): SignupDnsResolver {
|
|
124
|
+
return async (name, type) => {
|
|
125
|
+
const url = `${DOH_ENDPOINT}?name=${encodeURIComponent(name)}&type=${type}`;
|
|
126
|
+
try {
|
|
127
|
+
const response = await fetchImpl(url, {
|
|
128
|
+
headers: { accept: 'application/dns-json' },
|
|
129
|
+
signal: AbortSignal.timeout(DOH_TIMEOUT_MS),
|
|
130
|
+
});
|
|
131
|
+
if (!response.ok) return null;
|
|
132
|
+
const body = (await response.json()) as {
|
|
133
|
+
Status?: number;
|
|
134
|
+
Answer?: Array<{ type?: number; data?: string }>;
|
|
135
|
+
};
|
|
136
|
+
if (body.Status === DOH_NXDOMAIN) return [];
|
|
137
|
+
if (body.Status !== DOH_NOERROR) return null;
|
|
138
|
+
const code = DOH_RECORD_TYPE_CODES[type];
|
|
139
|
+
return (body.Answer ?? [])
|
|
140
|
+
.filter(
|
|
141
|
+
(answer) => answer.type === code && typeof answer.data === 'string',
|
|
142
|
+
)
|
|
143
|
+
.map((answer) => answer.data as string);
|
|
144
|
+
} catch {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
@@ -5,6 +5,9 @@ export const TOOL_EXECUTION_ERROR_BRAND = Symbol.for(
|
|
|
5
5
|
const PROVIDER_TRANSIENT_ERROR_BRAND = Symbol.for(
|
|
6
6
|
'deepline.provider-transient-error.v1',
|
|
7
7
|
);
|
|
8
|
+
const PROVIDER_REJECTED_ERROR_BRAND = Symbol.for(
|
|
9
|
+
'deepline.provider-rejected-error.v1',
|
|
10
|
+
);
|
|
8
11
|
|
|
9
12
|
export const LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION = 0 as const;
|
|
10
13
|
export const TOOL_EXECUTION_ERROR_SCHEMA_VERSION = 1 as const;
|
|
@@ -355,6 +358,9 @@ export class ToolExecutionError extends DeeplineError {
|
|
|
355
358
|
if (isProviderTransientFailure(options)) {
|
|
356
359
|
applyBrand(this, PROVIDER_TRANSIENT_ERROR_BRAND);
|
|
357
360
|
}
|
|
361
|
+
if (isProviderRejectionFailure(options)) {
|
|
362
|
+
applyBrand(this, PROVIDER_REJECTED_ERROR_BRAND);
|
|
363
|
+
}
|
|
358
364
|
}
|
|
359
365
|
|
|
360
366
|
static [Symbol.hasInstance](value: unknown): boolean {
|
|
@@ -388,6 +394,51 @@ export function isProviderTransientFailure(input: {
|
|
|
388
394
|
);
|
|
389
395
|
}
|
|
390
396
|
|
|
397
|
+
/**
|
|
398
|
+
* Why a provider rejected the exact request: `UPSTREAM_BAD_INPUT` for its
|
|
399
|
+
* input (upstream 400/422), `UPSTREAM_NOT_FOUND` for the record it names
|
|
400
|
+
* (upstream 404/410).
|
|
401
|
+
*
|
|
402
|
+
* @sdkReference errors 081
|
|
403
|
+
*/
|
|
404
|
+
export type ProviderRejectionCode = 'UPSTREAM_BAD_INPUT' | 'UPSTREAM_NOT_FOUND';
|
|
405
|
+
|
|
406
|
+
const PROVIDER_REJECTION_CODES: readonly string[] = [
|
|
407
|
+
'UPSTREAM_BAD_INPUT',
|
|
408
|
+
'UPSTREAM_NOT_FOUND',
|
|
409
|
+
] satisfies readonly ProviderRejectionCode[];
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Whether a provider-owned failure is the provider rejecting this request,
|
|
413
|
+
* from structured fields only. Every rejection is also a provider transient
|
|
414
|
+
* failure, so a read waterfall still falls through it.
|
|
415
|
+
*/
|
|
416
|
+
export function isProviderRejectionFailure(input: {
|
|
417
|
+
origin: ToolExecutionErrorOrigin;
|
|
418
|
+
category: ToolExecutionErrorCategory;
|
|
419
|
+
retryable: boolean;
|
|
420
|
+
code?: string | null;
|
|
421
|
+
}): boolean {
|
|
422
|
+
const code = input.code ?? '';
|
|
423
|
+
return (
|
|
424
|
+
isProviderTransientFailure(input) &&
|
|
425
|
+
input.category === 'upstream' &&
|
|
426
|
+
PROVIDER_REJECTION_CODES.includes(code)
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/** The class name a structured tool failure carries. */
|
|
431
|
+
export function structuredToolErrorName(input: {
|
|
432
|
+
origin: ToolExecutionErrorOrigin;
|
|
433
|
+
category: ToolExecutionErrorCategory;
|
|
434
|
+
retryable: boolean;
|
|
435
|
+
code?: string | null;
|
|
436
|
+
}): 'ProviderRejectedError' | 'ProviderTransientError' | 'ToolExecutionError' {
|
|
437
|
+
if (isProviderRejectionFailure(input)) return 'ProviderRejectedError';
|
|
438
|
+
if (isProviderTransientFailure(input)) return 'ProviderTransientError';
|
|
439
|
+
return 'ToolExecutionError';
|
|
440
|
+
}
|
|
441
|
+
|
|
391
442
|
/**
|
|
392
443
|
* A provider-owned transient failure that is safe to handle as an empty
|
|
393
444
|
* waterfall leg. Validation, auth, billing, Deepline, and unknown failures
|
|
@@ -428,6 +479,57 @@ export class ProviderTransientError extends ToolExecutionError {
|
|
|
428
479
|
}
|
|
429
480
|
}
|
|
430
481
|
|
|
482
|
+
/**
|
|
483
|
+
* The provider rejected this exact request: its input (upstream 400/422,
|
|
484
|
+
* code `UPSTREAM_BAD_INPUT`) or the record it names (upstream 404/410, code
|
|
485
|
+
* `UPSTREAM_NOT_FOUND`). Repeating the unchanged call fails again.
|
|
486
|
+
*
|
|
487
|
+
* It extends `ProviderTransientError`, so a read waterfall that catches
|
|
488
|
+
* `ProviderTransientError` still moves to its next provider: another provider
|
|
489
|
+
* may accept the same input or find the record. Catch this class first when a
|
|
490
|
+
* rejection needs different handling from an outage.
|
|
491
|
+
*
|
|
492
|
+
* @sdkReference errors 082
|
|
493
|
+
*/
|
|
494
|
+
export class ProviderRejectedError extends ProviderTransientError {
|
|
495
|
+
/** Rejections are always a provider's `upstream` answer. */
|
|
496
|
+
declare readonly category: 'upstream';
|
|
497
|
+
/** Which kind of rejection the provider returned. */
|
|
498
|
+
declare readonly code: ProviderRejectionCode;
|
|
499
|
+
|
|
500
|
+
/** Constructed by Deepline when a provider rejects the request. */
|
|
501
|
+
constructor(
|
|
502
|
+
message: string,
|
|
503
|
+
options: Omit<ToolExecutionErrorOptions, 'origin' | 'category' | 'code'> & {
|
|
504
|
+
code: ProviderRejectionCode;
|
|
505
|
+
},
|
|
506
|
+
) {
|
|
507
|
+
super(message, { ...options, category: 'upstream' });
|
|
508
|
+
this.name = 'ProviderRejectedError';
|
|
509
|
+
applyBrand(this, PROVIDER_REJECTED_ERROR_BRAND);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
static [Symbol.hasInstance](value: unknown): boolean {
|
|
513
|
+
if (this !== ProviderRejectedError) return nativeInstanceOf(this, value);
|
|
514
|
+
if (hasBrand(value, PROVIDER_REJECTED_ERROR_BRAND)) return true;
|
|
515
|
+
// A runner or SDK from before this class existed brands a rejection only
|
|
516
|
+
// as a tool error. Its structured fields still say what it is.
|
|
517
|
+
if (!hasBrand(value, TOOL_EXECUTION_ERROR_BRAND)) return false;
|
|
518
|
+
const fields = value as {
|
|
519
|
+
origin?: unknown;
|
|
520
|
+
category?: unknown;
|
|
521
|
+
retryable?: unknown;
|
|
522
|
+
code?: unknown;
|
|
523
|
+
};
|
|
524
|
+
return isProviderRejectionFailure({
|
|
525
|
+
origin: fields.origin as ToolExecutionErrorOrigin,
|
|
526
|
+
category: fields.category as ToolExecutionErrorCategory,
|
|
527
|
+
retryable: fields.retryable === true,
|
|
528
|
+
code: typeof fields.code === 'string' ? fields.code : null,
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
431
533
|
/** Why a provider cannot serve the current read request. */
|
|
432
534
|
export type ProviderUnavailableReason =
|
|
433
535
|
| ProviderTransientErrorCategory
|
|
@@ -758,6 +860,12 @@ export function deserializeToolExecutionFailure(
|
|
|
758
860
|
}
|
|
759
861
|
const failure = normalizeToolExecutionFailure(value);
|
|
760
862
|
if (!failure) return null;
|
|
863
|
+
if (isProviderRejectionFailure(failure)) {
|
|
864
|
+
return new ProviderRejectedError(message, {
|
|
865
|
+
...failure,
|
|
866
|
+
code: failure.code as ProviderRejectionCode,
|
|
867
|
+
});
|
|
868
|
+
}
|
|
761
869
|
if (isProviderTransientFailure(failure)) {
|
|
762
870
|
return new ProviderTransientError(message, failure);
|
|
763
871
|
}
|
|
@@ -14,14 +14,15 @@ import {
|
|
|
14
14
|
reportSetupCompleted,
|
|
15
15
|
resolvePendingAuthClaimForResume,
|
|
16
16
|
statusBannerLine
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-2ORPFQUA.mjs";
|
|
18
|
+
import "./chunk-UC4BDZKI.mjs";
|
|
19
|
+
import "./chunk-52Q5KETX.mjs";
|
|
20
|
+
import "./chunk-S6W6SJ6E.mjs";
|
|
21
|
+
import "./chunk-ASB47RXJ.mjs";
|
|
22
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-Z3A2S3QM.mjs";
|
|
24
|
+
import "./chunk-2MGZAI54.mjs";
|
|
25
|
+
import "./chunk-FXQ3JKE3.mjs";
|
|
25
26
|
import "./chunk-WZYKRD7T.mjs";
|
|
26
27
|
import "./chunk-KRD6H754.mjs";
|
|
27
28
|
export {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunkW6CZDTIRjs = require('./chunk-W6CZDTIR.js');
|
|
18
|
+
require('./chunk-YQKCH4R7.js');
|
|
19
|
+
require('./chunk-VIUUTEHY.js');
|
|
20
|
+
require('./chunk-5CYZHOKI.js');
|
|
21
|
+
require('./chunk-6VLFQZK6.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-LFQJW4S2.js');
|
|
24
|
+
require('./chunk-CFJFUVX2.js');
|
|
25
|
+
require('./chunk-UNNOZKRT.js');
|
|
26
|
+
require('./chunk-OG64RBAC.js');
|
|
27
|
+
require('./chunk-COGTRVWW.js');
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkW6CZDTIRjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkW6CZDTIRjs.authStatusLine; exports.clearPendingClaim = _chunkW6CZDTIRjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkW6CZDTIRjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkW6CZDTIRjs.handleRegister; exports.handleStatus = _chunkW6CZDTIRjs.handleStatus; exports.handleWait = _chunkW6CZDTIRjs.handleWait; exports.httpJson = _chunkW6CZDTIRjs.httpJson; exports.readPendingAuthClaim = _chunkW6CZDTIRjs.readPendingAuthClaim; exports.readStatusBanner = _chunkW6CZDTIRjs.readStatusBanner; exports.registerAuthCommands = _chunkW6CZDTIRjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkW6CZDTIRjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkW6CZDTIRjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkW6CZDTIRjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkW6CZDTIRjs.statusBannerLine;
|