deepline 0.3.551 → 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.
Files changed (324) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +130 -12
  2. package/dist/bundling-sources/sdk/src/compat.ts +239 -87
  3. package/dist/bundling-sources/sdk/src/config.ts +113 -2
  4. package/dist/bundling-sources/sdk/src/errors.ts +2 -0
  5. package/dist/bundling-sources/sdk/src/http-core.ts +124 -10
  6. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  7. package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
  8. package/dist/bundling-sources/sdk/src/play.ts +3 -0
  9. package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
  10. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  11. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +66 -30
  12. package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
  13. package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
  14. package/dist/bundling-sources/sdk/src/types.ts +9 -1
  15. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
  16. package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
  17. package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
  18. package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
  19. package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
  20. package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
  21. package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
  22. package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
  23. package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
  24. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
  25. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
  26. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
  27. package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
  28. package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
  29. package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
  30. package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
  31. package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
  32. package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
  33. package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
  34. package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
  35. package/dist/bundling-sources/shared_libs/monitors/package.json +11 -0
  36. package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
  37. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
  38. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
  39. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
  40. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
  41. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
  42. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +80 -13
  43. package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
  44. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
  45. package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
  46. package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
  47. package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
  48. package/dist/bundling-sources/shared_libs/monitors/tamradar-countries.ts +285 -0
  49. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
  50. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
  51. package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
  52. package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
  53. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
  54. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  55. package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
  56. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +312 -41
  57. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
  58. package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
  59. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
  60. package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
  61. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
  62. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +568 -26
  63. package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
  64. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  65. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
  66. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
  67. package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +14 -2
  68. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
  69. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
  70. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
  71. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +92 -16
  72. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
  73. package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
  74. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
  75. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
  76. package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
  77. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
  78. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
  79. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
  80. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
  81. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
  82. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
  83. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
  84. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +300 -57
  85. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
  86. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
  87. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
  88. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
  89. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
  90. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
  91. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +298 -46
  92. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
  93. package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +39 -0
  94. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
  95. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
  96. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
  97. package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
  98. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
  99. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
  100. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
  101. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
  102. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
  103. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
  104. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
  105. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +32 -10
  106. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
  107. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
  108. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
  109. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
  110. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
  111. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
  112. package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
  113. package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
  114. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
  115. package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
  116. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
  117. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
  118. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +37 -7
  119. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
  120. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
  121. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
  122. package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
  123. package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
  124. package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
  125. package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
  126. package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
  127. package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
  128. package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
  129. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
  130. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
  131. package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
  132. package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
  133. package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
  134. package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
  135. package/dist/cli/{auth-E7BH4GMJ.mjs → auth-I3QAU4RV.mjs} +8 -7
  136. package/dist/cli/auth-MQCN7WGZ.js +44 -0
  137. package/dist/cli/{billing-OXKU462W.mjs → billing-3IC54OQQ.mjs} +202 -59
  138. package/dist/cli/{billing-DNQAZGX7.js → billing-YGFFVAIC.js} +302 -159
  139. package/dist/cli/{chunk-COGREZAO.js → chunk-2B5B5KAW.js} +210 -128
  140. package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
  141. package/dist/cli/{chunk-T2B5BVZE.js → chunk-3NTP2OSG.js} +13 -13
  142. package/dist/cli/{chunk-FOTGUFVK.mjs → chunk-45OAVGU6.mjs} +5 -5
  143. package/dist/cli/{chunk-54EEYLTF.js → chunk-4747TPLV.js} +3 -3
  144. package/dist/cli/{chunk-CLRAANWH.mjs → chunk-4BFTDNHU.mjs} +1 -1
  145. package/dist/cli/{chunk-BGBJV26E.mjs → chunk-4HYNMXXF.mjs} +4 -4
  146. package/dist/cli/{chunk-5S6PHKRV.mjs → chunk-4SMCFQ23.mjs} +1 -1
  147. package/dist/cli/{chunk-VWLHRZFG.mjs → chunk-55F6HNOY.mjs} +5 -5
  148. package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
  149. package/dist/cli/{chunk-VTGG2RT3.js → chunk-6NE3RRRY.js} +1 -1
  150. package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
  151. package/dist/cli/{chunk-MNSTCJMX.mjs → chunk-72V4PDH5.mjs} +18 -18
  152. package/dist/cli/{chunk-ZCDKE4UH.js → chunk-74RES4DS.js} +5 -5
  153. package/dist/cli/{chunk-WKBHUB6R.js → chunk-7GEMELKI.js} +366 -320
  154. package/dist/cli/{chunk-C4CUZH57.js → chunk-7O6J6A7P.js} +1871 -92
  155. package/dist/cli/{chunk-7RSIFA72.js → chunk-7SERLBNR.js} +161 -53
  156. package/dist/cli/{chunk-3G6QZACZ.js → chunk-7YRJ5UC4.js} +21 -21
  157. package/dist/cli/{chunk-I4VKGNAQ.mjs → chunk-A7DLBE5K.mjs} +136 -54
  158. package/dist/cli/{chunk-GGB3JYCW.mjs → chunk-AGICYWGN.mjs} +299 -69
  159. package/dist/cli/{chunk-44KSACJW.mjs → chunk-AGIQDA2T.mjs} +12 -12
  160. package/dist/cli/{chunk-PACD5DGC.js → chunk-AGLR6QVN.js} +255 -109
  161. package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
  162. package/dist/cli/{chunk-4OMAGJ6U.js → chunk-BVDKFS2T.js} +2 -2
  163. package/dist/cli/{chunk-LPJPCGT3.js → chunk-CACFJODG.js} +190 -134
  164. package/dist/cli/{chunk-GVYLCCKN.mjs → chunk-CAEBJOYU.mjs} +1 -1
  165. package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
  166. package/dist/cli/{chunk-POLUE7D5.js → chunk-DP2VH7CO.js} +12 -12
  167. package/dist/cli/{chunk-D6M5HFBB.mjs → chunk-DP64MD6U.mjs} +1 -1
  168. package/dist/cli/{chunk-W425ERWN.mjs → chunk-DZA7RFGL.mjs} +5 -5
  169. package/dist/cli/{chunk-R7J7CJPZ.js → chunk-E2G2DNAB.js} +4 -1
  170. package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-E7WZOX2A.mjs} +22 -18
  171. package/dist/cli/{chunk-44I675YK.js → chunk-FM7LPUPA.js} +41 -41
  172. package/dist/cli/{chunk-2UXDHFSF.mjs → chunk-GAVZ4EOD.mjs} +1 -1
  173. package/dist/cli/{chunk-Z2FIOG3V.js → chunk-HEBO3XNZ.js} +27 -31
  174. package/dist/cli/{chunk-6PWJKMFQ.mjs → chunk-HSJ6X2AQ.mjs} +4 -4
  175. package/dist/cli/{chunk-UPMRIVZB.js → chunk-HVI55MTK.js} +61 -10
  176. package/dist/cli/{chunk-KWSH5T7K.js → chunk-IH6GDNKW.js} +21 -21
  177. package/dist/cli/{chunk-3KYBDAR3.js → chunk-IMX7J4DU.js} +8 -8
  178. package/dist/cli/{chunk-HEHVGEZV.mjs → chunk-INEMTYMT.mjs} +8 -8
  179. package/dist/cli/{chunk-5VVSEU67.js → chunk-IUOGII7D.js} +6 -7
  180. package/dist/cli/{chunk-MXGA6JFI.mjs → chunk-JJGWHITQ.mjs} +5 -5
  181. package/dist/cli/{chunk-QM6Y6S4E.js → chunk-JLGP5XAJ.js} +5 -5
  182. package/dist/cli/{chunk-V6SCP4B7.mjs → chunk-LFOERUQY.mjs} +69 -3
  183. package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
  184. package/dist/cli/{chunk-ZMNGZ6XS.mjs → chunk-LH5PZKER.mjs} +80 -24
  185. package/dist/cli/{chunk-MR5LTVHD.js → chunk-LRDHPOZW.js} +69 -69
  186. package/dist/cli/{chunk-5LUF4LAR.mjs → chunk-LRZGS6RZ.mjs} +3 -0
  187. package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
  188. package/dist/cli/{chunk-UDXULACQ.js → chunk-MLABYI4M.js} +90 -24
  189. package/dist/cli/{chunk-S7IZWGUA.mjs → chunk-NDNHYONK.mjs} +17 -21
  190. package/dist/cli/{chunk-4D3WIZST.mjs → chunk-OTV2UUKW.mjs} +164 -18
  191. package/dist/cli/{chunk-XYE5XPGF.js → chunk-Q6Z6N3A7.js} +18 -18
  192. package/dist/cli/{chunk-7WQNWJQW.mjs → chunk-QG6JIWUL.mjs} +151 -43
  193. package/dist/cli/{chunk-3T65J5RG.mjs → chunk-QI5S5HWB.mjs} +2 -2
  194. package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
  195. package/dist/cli/{chunk-PM7MO62Y.mjs → chunk-RMNOZKRI.mjs} +3 -3
  196. package/dist/cli/{chunk-NMWGZD6Y.js → chunk-RTV4RF7N.js} +36 -36
  197. package/dist/cli/{chunk-CQ6JYQSW.js → chunk-SBH4CKPN.js} +11 -11
  198. package/dist/cli/{chunk-BIIJATTX.mjs → chunk-SG3LUONJ.mjs} +3 -3
  199. package/dist/cli/{chunk-2WFPHBR4.js → chunk-TFEXSHPM.js} +22 -18
  200. package/dist/cli/{chunk-5IL7SC45.mjs → chunk-TN4TY6TT.mjs} +6 -7
  201. package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-UEVKMZLR.mjs} +54 -3
  202. package/dist/cli/{chunk-RE5MJBEV.mjs → chunk-UVQJYV76.mjs} +2 -2
  203. package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
  204. package/dist/cli/{chunk-W2ZWQUHT.js → chunk-WOCHZCUJ.js} +2 -2
  205. package/dist/cli/{chunk-ZDQFBJPO.js → chunk-XLIHTJVM.js} +348 -118
  206. package/dist/cli/{chunk-2ZYRBMQM.js → chunk-Y6SP3JMI.js} +22 -22
  207. package/dist/cli/{chunk-PPSDCN6C.js → chunk-YUA6HA6D.js} +2 -2
  208. package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
  209. package/dist/cli/{chunk-E64HFB4L.mjs → chunk-Z6XPSHKM.mjs} +87 -41
  210. package/dist/cli/{chunk-7DOQ3OEX.mjs → chunk-Z7AOIHFE.mjs} +1870 -91
  211. package/dist/cli/command-docs.js +3 -3
  212. package/dist/cli/command-docs.mjs +2 -2
  213. package/dist/cli/concurrent-runs-help-CFJH4KXV.js +22 -0
  214. package/dist/cli/{concurrent-runs-help-C6L6I5OR.mjs → concurrent-runs-help-DNV2X5AZ.mjs} +9 -8
  215. package/dist/cli/{csv-QMF4FWE7.js → csv-SA6ELJY6.js} +16 -15
  216. package/dist/cli/{csv-SYSDXFEM.mjs → csv-ZXZGHWOM.mjs} +7 -6
  217. package/dist/cli/{db-Q7HURWRZ.mjs → db-A54SP6AD.mjs} +16 -16
  218. package/dist/cli/{db-YSHPPA4H.js → db-JHFEIQBU.js} +43 -43
  219. package/dist/cli/describe-PHQ33AGS.mjs +50 -0
  220. package/dist/cli/describe-RHJ4XRFI.js +50 -0
  221. package/dist/cli/describe-core.d.mts +3 -3
  222. package/dist/cli/describe-core.d.ts +3 -3
  223. package/dist/cli/describe-core.js +6 -6
  224. package/dist/cli/describe-core.mjs +5 -5
  225. package/dist/cli/{executions-G7U3VUXN.mjs → executions-HL2M2DFU.mjs} +10 -10
  226. package/dist/cli/{executions-MWBC5TAW.js → executions-TLFZRHBJ.js} +12 -12
  227. package/dist/cli/{feedback-SD55OY6H.js → feedback-5UEX5UZK.js} +17 -16
  228. package/dist/cli/{feedback-GMHIFLBJ.mjs → feedback-QMBTNXVG.mjs} +9 -8
  229. package/dist/cli/git-4JWOOHBG.js +26 -0
  230. package/dist/cli/{git-HPE45OPD.mjs → git-LKGXVIVC.mjs} +8 -7
  231. package/dist/cli/index.js +170 -158
  232. package/dist/cli/index.mjs +60 -48
  233. package/dist/cli/{integrations-HFKVBY6G.js → integrations-6RUTLMN7.js} +23 -27
  234. package/dist/cli/{integrations-2W4MGIQR.mjs → integrations-FGGRVUJ7.mjs} +15 -19
  235. package/dist/cli/{legacy-noops-SXVNDEXN.js → legacy-noops-J3Z7QRWZ.js} +12 -11
  236. package/dist/cli/{legacy-noops-GZYKNU2Z.mjs → legacy-noops-YIPRMVXZ.mjs} +9 -8
  237. package/dist/cli/{mcp-PJRHQHHU.js → mcp-6LWFP7RW.js} +121 -48
  238. package/dist/cli/{mcp-BWA6KULG.mjs → mcp-CHDYFO7F.mjs} +100 -27
  239. package/dist/cli/{monitors-K2WSI6CR.js → monitors-STM6A7OU.js} +221 -186
  240. package/dist/cli/{monitors-SYQKCATO.mjs → monitors-UGRY2BXI.mjs} +58 -23
  241. package/dist/cli/org-3SYOUQCX.mjs +2289 -0
  242. package/dist/cli/org-ZOBSNSIB.js +2289 -0
  243. package/dist/cli/outcomes-H4YYAT5X.js +2865 -0
  244. package/dist/cli/outcomes-Z3P2JE67.mjs +2865 -0
  245. package/dist/cli/{play-SZXY2F2S.js → play-SM4CW2GS.js} +1116 -846
  246. package/dist/cli/{play-TTMABJEI.mjs → play-SN5YWLS7.mjs} +375 -105
  247. package/dist/cli/{providers-GQIOMRQO.mjs → providers-WZ4YBR5Y.mjs} +10 -10
  248. package/dist/cli/{providers-YDHCTZAF.js → providers-WZARYMCF.js} +13 -13
  249. package/dist/cli/{quickstart-PHSSMKCA.mjs → quickstart-2575BNKA.mjs} +7 -6
  250. package/dist/cli/{quickstart-BNYOXQXG.js → quickstart-PS4YHQJ6.js} +9 -8
  251. package/dist/cli/{run-GFIAZXVL.js → run-FLZ6OTM7.js} +51 -51
  252. package/dist/cli/{run-74C3C75C.mjs → run-ZUHCZOJS.mjs} +31 -31
  253. package/dist/cli/run-identity-LMLFMACS.js +31 -0
  254. package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
  255. package/dist/cli/{search-3SWUB7KX.mjs → search-HLPPKQEO.mjs} +11 -11
  256. package/dist/cli/search-JJWVHR3N.js +32 -0
  257. package/dist/cli/{search-output-K2SWHVHQ.mjs → search-output-PDAXNOGP.mjs} +9 -8
  258. package/dist/cli/{search-output-6JF3S4TP.js → search-output-RXJLU36B.js} +12 -11
  259. package/dist/cli/{secrets-2M4XWEKE.mjs → secrets-CGELYQ3H.mjs} +11 -11
  260. package/dist/cli/{secrets-2SAKLH2H.js → secrets-QJNG7G2Y.js} +20 -20
  261. package/dist/cli/sessions-DHTBT2GN.js +23 -0
  262. package/dist/cli/{sessions-A64BCXTO.mjs → sessions-ELMWVR4M.mjs} +9 -8
  263. package/dist/cli/{settings-HV64WIJF.js → settings-44I44P5F.js} +89 -89
  264. package/dist/cli/{settings-SVGEC3FI.mjs → settings-RR3LZXL7.mjs} +16 -16
  265. package/dist/cli/{setup-EDC3NEJ3.mjs → setup-KGWRWH4B.mjs} +20 -19
  266. package/dist/cli/{setup-FHXOLQGQ.js → setup-KTEYOCJO.js} +60 -59
  267. package/dist/cli/skills-EPZPEXI2.js +37 -0
  268. package/dist/cli/{skills-3HGHZMXB.mjs → skills-FPRID2I5.mjs} +10 -9
  269. package/dist/cli/tools-IGQQ5TML.js +57 -0
  270. package/dist/cli/{tools-P2QS6A6Q.mjs → tools-PI4WMDLY.mjs} +23 -23
  271. package/dist/cli/update-4RNCVYGE.js +37 -0
  272. package/dist/cli/{update-552BYQM4.mjs → update-VJOJAZ7B.mjs} +14 -11
  273. package/dist/cli/{views-PA25NAE3.js → views-NTUOLNQU.js} +62 -64
  274. package/dist/cli/{views-LD5HXJYY.mjs → views-OVPSINZO.mjs} +47 -49
  275. package/dist/cli/{workflow-FIDBUQV6.js → workflow-2UDYDM6F.js} +23 -23
  276. package/dist/cli/{workflow-LDYFGBYP.mjs → workflow-7OEFNXZC.mjs} +13 -13
  277. package/dist/{client-DuDFiJDU.d.mts → client-B8f7RNF8.d.mts} +1 -1
  278. package/dist/{client-t9HZAkFD.d.ts → client-C5TgXmJQ.d.ts} +1 -1
  279. package/dist/{client-core-DydMQOft.d.mts → client-core-SLLGBTht.d.mts} +285 -23
  280. package/dist/{client-core-CJRzLanv.d.ts → client-core-p0sOxnkl.d.ts} +285 -23
  281. package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
  282. package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
  283. package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
  284. package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
  285. package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
  286. package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
  287. package/dist/index.d.mts +7 -7
  288. package/dist/index.d.ts +7 -7
  289. package/dist/index.js +66 -55
  290. package/dist/index.mjs +25 -14
  291. package/dist/install-integrity.json +162 -142
  292. package/dist/plays/bundle-play-file.d.mts +3 -3
  293. package/dist/plays/bundle-play-file.d.ts +3 -3
  294. package/dist/plays/bundle-play-file.mjs +23 -4
  295. package/dist/plays/csv-data-input.js +3 -3
  296. package/dist/plays/csv-data-input.mjs +2 -2
  297. package/dist/plays/play-description.d.mts +2 -2
  298. package/dist/plays/play-description.d.ts +2 -2
  299. package/dist/plays/run-request.d.mts +2 -2
  300. package/dist/plays/run-request.d.ts +2 -2
  301. package/dist/plays/run-request.js +4 -4
  302. package/dist/plays/run-request.mjs +3 -3
  303. package/dist/release.d.mts +1 -1
  304. package/dist/release.d.ts +1 -1
  305. package/dist/release.js +2 -2
  306. package/dist/release.mjs +1 -1
  307. package/dist/server.d.mts +4 -4
  308. package/dist/server.d.ts +4 -4
  309. package/dist/server.js +15 -13
  310. package/dist/server.mjs +9 -7
  311. package/package.json +1 -1
  312. package/dist/cli/auth-B4PI7GVY.js +0 -43
  313. package/dist/cli/concurrent-runs-help-JEFQZTJI.js +0 -21
  314. package/dist/cli/describe-PXTSBJTL.js +0 -50
  315. package/dist/cli/describe-YGMQBV44.mjs +0 -50
  316. package/dist/cli/git-I3JV7IGH.js +0 -25
  317. package/dist/cli/org-5KD7X7IA.mjs +0 -1282
  318. package/dist/cli/org-YQ2CR32B.js +0 -1282
  319. package/dist/cli/run-identity-G257GQED.js +0 -25
  320. package/dist/cli/search-2RRRF4LW.js +0 -32
  321. package/dist/cli/sessions-SBH27JNW.js +0 -22
  322. package/dist/cli/skills-Y3SRLOYD.js +0 -36
  323. package/dist/cli/tools-OFYPUPUV.js +0 -57
  324. package/dist/cli/update-SOUSCLB7.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
- }> = [{ source: value as Container, target: root, parentKey, path: [] }];
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(key, current.path, item) &&
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(key, current.path) &&
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: { placeholderContinuationValues?: boolean } = {},
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-MNSTCJMX.mjs";
18
- import "./chunk-GGB3JYCW.mjs";
19
- import "./chunk-V6SCP4B7.mjs";
20
- import "./chunk-4D3WIZST.mjs";
21
- import "./chunk-NURW5XH4.mjs";
17
+ } from "./chunk-72V4PDH5.mjs";
18
+ import "./chunk-AGICYWGN.mjs";
19
+ import "./chunk-LFOERUQY.mjs";
20
+ import "./chunk-OTV2UUKW.mjs";
21
+ import "./chunk-ASB47RXJ.mjs";
22
22
  import "./chunk-DLIRSHV6.mjs";
23
- import "./chunk-JL2OTMSG.mjs";
24
- import "./chunk-2UXDHFSF.mjs";
23
+ import "./chunk-Z3A2S3QM.mjs";
24
+ import "./chunk-2MGZAI54.mjs";
25
+ import "./chunk-GAVZ4EOD.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 _chunkLRDHPOZWjs = require('./chunk-LRDHPOZW.js');
18
+ require('./chunk-XLIHTJVM.js');
19
+ require('./chunk-MLABYI4M.js');
20
+ require('./chunk-AGLR6QVN.js');
21
+ require('./chunk-6VLFQZK6.js');
22
+ require('./chunk-XNYIZMNQ.js');
23
+ require('./chunk-LFQJW4S2.js');
24
+ require('./chunk-CFJFUVX2.js');
25
+ require('./chunk-6NE3RRRY.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 = _chunkLRDHPOZWjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkLRDHPOZWjs.authStatusLine; exports.clearPendingClaim = _chunkLRDHPOZWjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkLRDHPOZWjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkLRDHPOZWjs.handleRegister; exports.handleStatus = _chunkLRDHPOZWjs.handleStatus; exports.handleWait = _chunkLRDHPOZWjs.handleWait; exports.httpJson = _chunkLRDHPOZWjs.httpJson; exports.readPendingAuthClaim = _chunkLRDHPOZWjs.readPendingAuthClaim; exports.readStatusBanner = _chunkLRDHPOZWjs.readStatusBanner; exports.registerAuthCommands = _chunkLRDHPOZWjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkLRDHPOZWjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkLRDHPOZWjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkLRDHPOZWjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkLRDHPOZWjs.statusBannerLine;