deepline 0.3.535 → 0.3.536

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 (229) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +232 -147
  2. package/dist/bundling-sources/sdk/src/index.ts +4 -0
  3. package/dist/bundling-sources/sdk/src/plays/local-file-discovery.ts +27 -1
  4. package/dist/bundling-sources/sdk/src/plays/run-request.ts +16 -5
  5. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/types.ts +2 -23
  7. package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +26 -14
  8. package/dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts +33 -8
  9. package/dist/bundling-sources/shared_libs/monitors/fleets/count-drift-alert.ts +121 -0
  10. package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +8 -0
  11. package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +14 -82
  12. package/dist/bundling-sources/shared_libs/monitors/package.json +1 -0
  13. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +4 -4
  14. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +0 -26
  15. package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +36 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +21 -31
  17. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +88 -96
  18. package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +12 -10
  19. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +3 -1
  20. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +71 -2
  21. package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +9 -0
  22. package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +2 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +1 -0
  24. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +127 -9
  25. package/dist/bundling-sources/shared_libs/play-runtime/memory-ledger.ts +15 -2
  26. package/dist/bundling-sources/shared_libs/play-runtime/prebuilt-result-quality.ts +1 -1
  27. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -0
  28. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/fixture-capacity-simulator.ts +1 -0
  29. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/gradient2-concurrency-controller.ts +41 -0
  30. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-capacity-policy.ts +6 -0
  31. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-concurrency-policy.ts +9 -0
  32. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +7 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +2 -2
  34. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +5 -2
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +8 -3
  36. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +7 -0
  37. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +31 -0
  38. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +6 -0
  39. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +26 -1
  40. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +11 -4
  41. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +73 -18
  42. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +169 -2
  43. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +26 -4
  44. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +84 -49
  45. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -32
  46. package/dist/bundling-sources/shared_libs/plays/launch/input-contract.ts +13 -1
  47. package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +68 -1
  48. package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +57 -1
  49. package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +22 -9
  50. package/dist/cli/auth-6XQKFOLG.js +43 -0
  51. package/dist/cli/{auth-ZCTMB5RA.mjs → auth-KCTCUO7P.mjs} +7 -7
  52. package/dist/cli/{billing-GVFKZQH3.js → billing-4VBGZ3CT.js} +273 -112
  53. package/dist/cli/{billing-OU2ZHL72.mjs → billing-OOJHKLNS.mjs} +185 -24
  54. package/dist/cli/{chunk-FGN75ZN6.js → chunk-2B4IOGFD.js} +390 -382
  55. package/dist/cli/{chunk-KOZBZPRM.js → chunk-2FCSUOYN.js} +55 -55
  56. package/dist/cli/{chunk-T2N3B7IQ.js → chunk-2GJZLIKW.js} +8 -8
  57. package/dist/cli/{chunk-AUEUAPVS.mjs → chunk-2YWJS76L.mjs} +1 -1
  58. package/dist/cli/{chunk-W5YJYU4G.mjs → chunk-3PCYV6ZJ.mjs} +2 -2
  59. package/dist/cli/{chunk-UUQ2OXMH.js → chunk-4E5JXZ3W.js} +18 -20
  60. package/dist/cli/{chunk-R4RG4FV5.mjs → chunk-4KWD3MX2.mjs} +13 -10
  61. package/dist/cli/{chunk-XSOTEVOB.js → chunk-6BBGUQJJ.js} +50 -141
  62. package/dist/cli/{chunk-PHLNYBAA.js → chunk-6VUGBQZQ.js} +5 -5
  63. package/dist/cli/{chunk-G2DLG32W.mjs → chunk-AB2GBOD4.mjs} +40 -27
  64. package/dist/cli/{chunk-JWWYLGUT.mjs → chunk-ANUKBZ6W.mjs} +475 -11
  65. package/dist/cli/{chunk-FZKPPB5P.mjs → chunk-BASLYGXK.mjs} +85 -77
  66. package/dist/cli/{chunk-SQWET4SL.js → chunk-BBTKAASQ.js} +2 -1
  67. package/dist/cli/{chunk-NRO3NTVO.js → chunk-CBV7AKWM.js} +5 -5
  68. package/dist/cli/{chunk-PI5R65OQ.js → chunk-CIDN5K23.js} +1 -1
  69. package/dist/cli/{chunk-QNHHZ63P.mjs → chunk-CQBIO6HW.mjs} +1 -1
  70. package/dist/cli/{chunk-2KHUFWTK.js → chunk-CQDQNZGH.js} +42 -37
  71. package/dist/cli/{chunk-D4MHCCIR.js → chunk-CWSLUNA6.js} +33 -33
  72. package/dist/cli/{chunk-E3CLOVG5.mjs → chunk-CXTW7SRW.mjs} +50 -141
  73. package/dist/cli/{chunk-H6SWS5CG.mjs → chunk-DA2I2M7D.mjs} +2 -2
  74. package/dist/cli/{chunk-WAIBM6KX.mjs → chunk-DQHUJMCL.mjs} +5 -5
  75. package/dist/cli/{chunk-DWPY6ZID.mjs → chunk-DUYAMLOC.mjs} +1 -1
  76. package/dist/cli/{chunk-K53NKWZO.mjs → chunk-E24UGPGG.mjs} +13 -15
  77. package/dist/cli/{chunk-STR5LXK4.mjs → chunk-FSIVF2SI.mjs} +1 -1
  78. package/dist/cli/{chunk-7R5DAANG.mjs → chunk-GF32SBST.mjs} +1 -1
  79. package/dist/cli/{chunk-7CWSAEYS.mjs → chunk-GHLDCLSC.mjs} +1 -1
  80. package/dist/cli/{chunk-ZUVE63Y7.js → chunk-GTVZKY3F.js} +2 -2
  81. package/dist/cli/{chunk-J75DANZY.mjs → chunk-HAJQGP5V.mjs} +2 -2
  82. package/dist/cli/{chunk-RFQWSH6I.js → chunk-HWDKRN7L.js} +3 -3
  83. package/dist/cli/{chunk-5YAJGRWB.js → chunk-IPVRMYWT.js} +7 -7
  84. package/dist/cli/{chunk-ZPGGW27Q.mjs → chunk-JL2OTMSG.mjs} +1 -0
  85. package/dist/cli/{chunk-K76AEBFY.mjs → chunk-JUHDJNSI.mjs} +4 -4
  86. package/dist/cli/{chunk-R2KKEHJN.mjs → chunk-KPQHUVYW.mjs} +5 -5
  87. package/dist/cli/{chunk-6LHX33VN.js → chunk-KWYGWO4Y.js} +9 -6
  88. package/dist/cli/{chunk-7PXP2FQK.js → chunk-LDGZFDUB.js} +2 -2
  89. package/dist/cli/{chunk-KWGXHPHL.js → chunk-LN6RXDTB.js} +523 -59
  90. package/dist/cli/{chunk-TCVCFZP6.mjs → chunk-LZXZQPA2.mjs} +4 -1
  91. package/dist/cli/{chunk-2D6SWQTK.js → chunk-MSP4DTSD.js} +13 -13
  92. package/dist/cli/{chunk-BNH4Y35W.mjs → chunk-OLH2PHMC.mjs} +2 -2
  93. package/dist/cli/{chunk-QYBAHYP4.mjs → chunk-OUDTOMZC.mjs} +7 -9
  94. package/dist/cli/{chunk-GESIFFQX.mjs → chunk-OVX3Q5Q3.mjs} +1 -1
  95. package/dist/cli/{chunk-6TYRRNXY.mjs → chunk-PNY3BWHP.mjs} +2 -2
  96. package/dist/cli/{chunk-DYIWDUY4.js → chunk-Q4MNUOS4.js} +316 -303
  97. package/dist/cli/{chunk-5EKNDNFQ.js → chunk-Q5CXV3E3.js} +2 -2
  98. package/dist/cli/{chunk-W6T23EUC.mjs → chunk-RVSSQPQO.mjs} +1 -1
  99. package/dist/cli/{chunk-WNNA4L6Z.js → chunk-SLPJ3LXI.js} +22 -22
  100. package/dist/cli/{chunk-K3IPGMGP.js → chunk-TX5TUHJN.js} +17 -19
  101. package/dist/cli/{chunk-IF75RD6U.js → chunk-U2LVWCTD.js} +18 -6
  102. package/dist/cli/{chunk-ZS2WHWWL.js → chunk-UNDLNT3V.js} +1 -1
  103. package/dist/cli/{chunk-4NLRWKZB.js → chunk-VBDZIMWD.js} +26 -26
  104. package/dist/cli/{chunk-DAPKLYST.js → chunk-W7AEIGZR.js} +41 -41
  105. package/dist/cli/{chunk-LVISZFYO.mjs → chunk-WC5M3JXE.mjs} +2 -2
  106. package/dist/cli/{chunk-C374C22Y.js → chunk-WOQO3GV4.js} +14 -11
  107. package/dist/cli/{chunk-243O3FH5.js → chunk-XBAH3TKU.js} +5 -5
  108. package/dist/cli/{chunk-DFJODFMC.mjs → chunk-XJD2GYUP.mjs} +5 -5
  109. package/dist/cli/{chunk-BF65LB7X.mjs → chunk-XVZRJJDS.mjs} +4 -4
  110. package/dist/cli/{chunk-OM732MGV.js → chunk-Y2NTPYGS.js} +17 -17
  111. package/dist/cli/{chunk-YFZLZNTH.mjs → chunk-YBMHOH6H.mjs} +4 -4
  112. package/dist/cli/{chunk-RKY4LBX3.mjs → chunk-YRLAUGQY.mjs} +3 -3
  113. package/dist/cli/{chunk-FKD3KL5Q.mjs → chunk-Z2XA6YU4.mjs} +10 -5
  114. package/dist/cli/{chunk-JQQG4QL4.mjs → chunk-Z7UIOGW4.mjs} +3 -3
  115. package/dist/cli/{chunk-HYBZWSSH.js → chunk-ZEV2Y56V.js} +44 -44
  116. package/dist/cli/{chunk-MI6ZP7XI.mjs → chunk-ZG7BOECV.mjs} +18 -6
  117. package/dist/cli/{chunk-HWPOXCCK.js → chunk-ZILSRDIN.js} +8 -8
  118. package/dist/cli/{chunk-CIDATNTY.js → chunk-ZISEH7OL.js} +16 -16
  119. package/dist/cli/{chunk-KA6ZERJL.js → chunk-ZZ4MF2GI.js} +6 -6
  120. package/dist/cli/command-docs.js +2 -2
  121. package/dist/cli/command-docs.mjs +1 -1
  122. package/dist/cli/{csv-CD55KEIO.js → csv-2V2DIFNG.js} +15 -15
  123. package/dist/cli/{csv-CLPVMIRF.mjs → csv-P3HLK4GO.mjs} +6 -6
  124. package/dist/cli/{db-MQKLDAEO.js → db-MREAQVW6.js} +36 -36
  125. package/dist/cli/{db-AU4SMWUN.mjs → db-ZYOY3QRQ.mjs} +9 -9
  126. package/dist/cli/describe-IKZFOADR.mjs +49 -0
  127. package/dist/cli/describe-WW3OQRLP.js +49 -0
  128. package/dist/cli/describe-core.d.mts +3 -3
  129. package/dist/cli/describe-core.d.ts +3 -3
  130. package/dist/cli/describe-core.js +5 -5
  131. package/dist/cli/describe-core.mjs +4 -4
  132. package/dist/cli/{executions-77GOLWRM.js → executions-H5IJ7QSQ.js} +11 -11
  133. package/dist/cli/{executions-TFIJPUX7.mjs → executions-KTSY5M34.mjs} +9 -9
  134. package/dist/cli/{feedback-OV5YAL3A.js → feedback-724QK3Z5.js} +16 -16
  135. package/dist/cli/{feedback-2WRSZ5WL.mjs → feedback-WWJRIXEU.mjs} +8 -8
  136. package/dist/cli/git-PHYRD56H.js +25 -0
  137. package/dist/cli/{git-VNS4ATLZ.mjs → git-R5VRG7X6.mjs} +7 -7
  138. package/dist/cli/index.js +151 -157
  139. package/dist/cli/index.mjs +51 -57
  140. package/dist/cli/{legacy-noops-HDOB5C6F.js → legacy-noops-C6GDEGPU.js} +11 -11
  141. package/dist/cli/{legacy-noops-C732QDCY.mjs → legacy-noops-PWZ5XLAO.mjs} +8 -8
  142. package/dist/cli/{monitors-5IUMHH3E.js → monitors-VAVQ4WCE.js} +125 -122
  143. package/dist/cli/{monitors-2LYEFXOU.mjs → monitors-WQSKMHAP.mjs} +19 -16
  144. package/dist/cli/{org-ADW2EVAC.js → org-CWWRWXZQ.js} +89 -89
  145. package/dist/cli/{org-G4YGZPHS.mjs → org-MAL4QPVF.mjs} +9 -9
  146. package/dist/cli/{play-7GQ56C2D.mjs → play-ILW6MSNG.mjs} +123 -76
  147. package/dist/cli/{play-EHSOSSHT.js → play-WJOWK5PQ.js} +641 -594
  148. package/dist/cli/{providers-WL3YTCSV.mjs → providers-4V2NMLZZ.mjs} +9 -9
  149. package/dist/cli/{providers-PWCF6OOO.js → providers-W662ANCH.js} +12 -12
  150. package/dist/cli/{quickstart-ZKI5MURA.js → quickstart-BW6EBUYX.js} +8 -8
  151. package/dist/cli/{quickstart-323XOPGI.mjs → quickstart-C22BR743.mjs} +6 -6
  152. package/dist/cli/{run-XZPWA6JS.js → run-KW7KW4FX.js} +50 -53
  153. package/dist/cli/{run-ZCNZU3K2.mjs → run-SPAU5IMW.mjs} +31 -34
  154. package/dist/cli/search-HLE54W5G.js +32 -0
  155. package/dist/cli/{search-CVLVSFMJ.mjs → search-XPC75HLM.mjs} +10 -11
  156. package/dist/cli/{search-output-6PY6RN2R.mjs → search-output-JKYJSEPM.mjs} +6 -6
  157. package/dist/cli/{search-output-7HRSSRBS.js → search-output-VJYE7USJ.js} +8 -8
  158. package/dist/cli/{secrets-6S2ZWDIM.mjs → secrets-OJG73GXQ.mjs} +9 -9
  159. package/dist/cli/{secrets-IYD5VKY4.js → secrets-YB57KGSB.js} +18 -18
  160. package/dist/cli/{sessions-GVEX5TUJ.mjs → sessions-7ZL37BW4.mjs} +8 -8
  161. package/dist/cli/sessions-VEBYZIEU.js +22 -0
  162. package/dist/cli/{settings-CANK4HJQ.js → settings-A7DD2ZYE.js} +88 -89
  163. package/dist/cli/{settings-BN5MJZ3C.mjs → settings-RKSQB7FA.mjs} +15 -16
  164. package/dist/cli/{setup-JNMSCCU4.mjs → setup-NXDUTITY.mjs} +11 -12
  165. package/dist/cli/{setup-YSGKGLSJ.js → setup-S3K5YU62.js} +51 -52
  166. package/dist/cli/skills-NVQ744CN.js +36 -0
  167. package/dist/cli/{skills-QCQN2UM2.mjs → skills-VMFAIDO6.mjs} +9 -10
  168. package/dist/cli/{tools-CDPOID7V.mjs → tools-52NTHBSJ.mjs} +20 -21
  169. package/dist/cli/tools-SBDUL3WB.js +56 -0
  170. package/dist/cli/update-HHVFZPCV.js +34 -0
  171. package/dist/cli/{update-D3ZERUQ3.mjs → update-SAKBEKMV.mjs} +11 -12
  172. package/dist/cli/{views-RDZRWQBQ.mjs → views-ACRV7MD6.mjs} +54 -10
  173. package/dist/cli/{views-4NV2KQKA.js → views-C3GJOBDG.js} +66 -22
  174. package/dist/cli/{workflow-2CG3TVCG.mjs → workflow-CS22E7TC.mjs} +10 -10
  175. package/dist/cli/{workflow-RABJCAZC.js → workflow-ZNWCZEGN.js} +20 -20
  176. package/dist/{client-DhSvMO3A.d.mts → client-BlLYQDNo.d.mts} +1 -1
  177. package/dist/{client-oGNJMQFd.d.ts → client-DSQlkIDO.d.ts} +1 -1
  178. package/dist/{client-core-CdWH6Sii.d.ts → client-core-CDwapXy5.d.ts} +159 -108
  179. package/dist/{client-core-CVG1Et-4.d.mts → client-core-rX7n2H8U.d.mts} +159 -108
  180. package/dist/{compiler-manifest-D2ZlBGxj.d.ts → compiler-manifest-BHNC4RL-.d.mts} +15 -22
  181. package/dist/{compiler-manifest-D2ZlBGxj.d.mts → compiler-manifest-BHNC4RL-.d.ts} +15 -22
  182. package/dist/{errors-B-gOQdj-.d.mts → errors-D7sPXrvB.d.mts} +1 -1
  183. package/dist/{errors-CB0KAmmV.d.ts → errors-lhtIWG5Z.d.ts} +1 -1
  184. package/dist/{index-c3nvUGCS.d.ts → index-CQTBHXHr.d.ts} +1 -1
  185. package/dist/{index-BbJADro4.d.mts → index-NaDZq2xf.d.mts} +1 -1
  186. package/dist/index.d.mts +7 -7
  187. package/dist/index.d.ts +7 -7
  188. package/dist/index.js +15 -15
  189. package/dist/index.mjs +11 -11
  190. package/dist/install-integrity.json +129 -132
  191. package/dist/monitor-fleet-contract.d.mts +17 -11
  192. package/dist/monitor-fleet-contract.d.ts +17 -11
  193. package/dist/monitor-fleet-contract.js +3 -3
  194. package/dist/monitor-fleet-contract.mjs +2 -2
  195. package/dist/monitor-input-contract.js +2 -2
  196. package/dist/monitor-input-contract.mjs +1 -1
  197. package/dist/plays/bundle-play-file.d.mts +3 -3
  198. package/dist/plays/bundle-play-file.d.ts +3 -3
  199. package/dist/plays/bundle-play-file.mjs +17 -5
  200. package/dist/plays/csv-data-input.js +3 -3
  201. package/dist/plays/csv-data-input.mjs +2 -2
  202. package/dist/plays/play-description.d.mts +2 -2
  203. package/dist/plays/play-description.d.ts +2 -2
  204. package/dist/plays/run-request.d.mts +2 -2
  205. package/dist/plays/run-request.d.ts +2 -2
  206. package/dist/plays/run-request.js +3 -3
  207. package/dist/plays/run-request.mjs +2 -2
  208. package/dist/release.d.mts +1 -1
  209. package/dist/release.d.ts +1 -1
  210. package/dist/release.js +2 -2
  211. package/dist/release.mjs +1 -1
  212. package/dist/server.d.mts +4 -4
  213. package/dist/server.d.ts +4 -4
  214. package/dist/server.js +12 -12
  215. package/dist/server.mjs +6 -6
  216. package/package.json +1 -1
  217. package/dist/cli/auth-VDCU3T6A.js +0 -43
  218. package/dist/cli/chunk-4QELPWUW.mjs +0 -405
  219. package/dist/cli/chunk-T7RBM2WX.js +0 -405
  220. package/dist/cli/describe-5BFNHT5V.js +0 -50
  221. package/dist/cli/describe-AWJUXE2U.mjs +0 -50
  222. package/dist/cli/git-HGMX52XU.js +0 -25
  223. package/dist/cli/pages-KXKWSCEV.mjs +0 -266
  224. package/dist/cli/pages-VTJGAI2D.js +0 -266
  225. package/dist/cli/search-J6EY7DQN.js +0 -33
  226. package/dist/cli/sessions-7HPIVSQ4.js +0 -22
  227. package/dist/cli/skills-WDGSSKJZ.js +0 -37
  228. package/dist/cli/tools-URNVXSTZ.js +0 -57
  229. package/dist/cli/update-Q6JW32IA.js +0 -35
@@ -2123,6 +2123,8 @@ export type BillingSubscriptionStatus = {
2123
2123
  org_id: string;
2124
2124
  plan_version_id: string;
2125
2125
  plan_name: string;
2126
+ /** Customer-facing catalog name. Older API deployments may omit it. */
2127
+ plan_display_name?: string;
2126
2128
  plan_family_id: string;
2127
2129
  /** Whether a Stripe subscription backs the active plan. */
2128
2130
  subscribed: boolean;
@@ -2199,12 +2201,18 @@ export type TargetBillingPlan = {
2199
2201
  | 'team-v2'
2200
2202
  | 'legacy-growth-v1';
2201
2203
  name: string;
2204
+ display_name?: string;
2202
2205
  recurring_price_usd: number;
2203
2206
  /**
2204
2207
  * The first month's fee for switching to this plan when a first-month
2205
2208
  * discount is offered; null or absent means the list price.
2206
2209
  */
2207
2210
  first_month_price_usd?: number | null;
2211
+ /**
2212
+ * One-time credits granted when a new transition to this plan is paid;
2213
+ * null or absent when none are offered.
2214
+ */
2215
+ bonus_credits?: number | null;
2208
2216
  interval: 'month' | 'year';
2209
2217
  included_credits: number;
2210
2218
  /** Offered benefit terms; omitted by older API deployments. */
@@ -2218,8 +2226,21 @@ export type TargetBillingPlansResult = {
2218
2226
  plans: TargetBillingPlan[];
2219
2227
  current_plan_sku: string;
2220
2228
  pending_plan_sku: string | null;
2229
+ pending_plan_display_name?: string | null;
2221
2230
  acquisition_enabled: boolean;
2222
2231
  enabled_offer_keys: TargetBillingPlan['sku'][];
2232
+ /** The requested promo code's outcome; null or absent when none was sent. */
2233
+ promo_code?: {
2234
+ code: string;
2235
+ status:
2236
+ | 'applied'
2237
+ | 'unknown'
2238
+ | 'expired'
2239
+ | 'already_redeemed'
2240
+ | 'unavailable';
2241
+ plan_skus: string[];
2242
+ expires_at: string | null;
2243
+ } | null;
2223
2244
  };
2224
2245
 
2225
2246
  export type TargetBillingStatusResult = {
@@ -2227,6 +2248,7 @@ export type TargetBillingStatusResult = {
2227
2248
  plan: {
2228
2249
  sku: string;
2229
2250
  name: string;
2251
+ display_name?: string;
2230
2252
  recurring_price_usd: number | null;
2231
2253
  interval: string | null;
2232
2254
  included_credits: number | null;
@@ -2261,6 +2283,7 @@ export type TargetBillingStatusResult = {
2261
2283
  } | null;
2262
2284
  next_action: string | null;
2263
2285
  pending_plan_sku: string | null;
2286
+ pending_plan_display_name?: string | null;
2264
2287
  /** Saved transition boundary; optional for older servers. */
2265
2288
  pending_plan_starts_at?: string | null;
2266
2289
  /** Next cycle boundary from the current Contract’s retained cadence. */
@@ -2268,6 +2291,49 @@ export type TargetBillingStatusResult = {
2268
2291
  as_of: string | null;
2269
2292
  };
2270
2293
 
2294
+ /** One saved card of the workspace. `id` is opaque; no provider id is exposed. */
2295
+ export type BillingSavedCard = {
2296
+ id: string;
2297
+ /** `legacy_source` cards stay usable but cannot be chosen or removed. */
2298
+ kind: 'card' | 'link' | 'legacy_source';
2299
+ brand: string | null;
2300
+ last4: string | null;
2301
+ exp_month: number | null;
2302
+ exp_year: number | null;
2303
+ label: string;
2304
+ /** The card charged for top-ups, auto top-up and invoices. */
2305
+ is_default: boolean;
2306
+ expired: boolean;
2307
+ can_be_default: boolean;
2308
+ removable: boolean;
2309
+ /** A subscription that can still charge is bound to this card. */
2310
+ in_use_by_subscription?: boolean;
2311
+ /** Set on the default only; a top-up confirmation is bound to it. */
2312
+ confirmation_fingerprint: string | null;
2313
+ };
2314
+
2315
+ export type BillingSavedCardsResult = {
2316
+ org_id: string;
2317
+ cards: BillingSavedCard[];
2318
+ has_more: boolean;
2319
+ /** Pass as `cursor` for the next page. */
2320
+ next_cursor: string | null;
2321
+ };
2322
+
2323
+ /** A change that took effect, with the cards as they now stand. */
2324
+ export type BillingSavedCardChangeResult = BillingSavedCardsResult & {
2325
+ ok: true;
2326
+ outcome: 'applied';
2327
+ /** Send again to retry this same request. */
2328
+ change_id: string;
2329
+ };
2330
+
2331
+ export type BillingSavedCardChangeOptions = {
2332
+ cardId: string;
2333
+ /** A UUID. Reusing it retries the same request instead of making a new one. */
2334
+ changeId?: string;
2335
+ };
2336
+
2271
2337
  export type TargetAutoRechargeResult = {
2272
2338
  org_id: string;
2273
2339
  enabled: boolean;
@@ -2312,8 +2378,11 @@ export type TargetBillingPlanTransitionOptions =
2312
2378
  | 'builder-v1'
2313
2379
  | 'growth-v1'
2314
2380
  | 'growth-canary-v1'
2315
- | 'team-v1';
2381
+ | 'team-v1'
2382
+ | 'team-v2';
2316
2383
  billingEmail?: string;
2384
+ /** A plan promo code; an unknown, expired, or used code refuses the change. */
2385
+ promoCode?: string;
2317
2386
  idempotencyKey: string;
2318
2387
  }
2319
2388
  | {
@@ -2372,6 +2441,7 @@ export type BillingPlanEntry = {
2372
2441
  plan_family_id: string;
2373
2442
  plan_version_id: string;
2374
2443
  public_name: string;
2444
+ display_name?: string;
2375
2445
  price_usd: number | null;
2376
2446
  price_interval: string | null;
2377
2447
  monthly_grant_credits: number;
@@ -2394,6 +2464,7 @@ export type BillingActivePlan = {
2394
2464
  plan_family_id: string;
2395
2465
  plan_version_id: string;
2396
2466
  public_name: string;
2467
+ display_name?: string;
2397
2468
  rate_card_id: string;
2398
2469
  assigned_by: string;
2399
2470
  assigned_at: string | null;
@@ -2713,7 +2784,9 @@ export type BillingNamespace = {
2713
2784
  /** Read current billing usage, or look up one exact execution charge by request ID. */
2714
2785
  usage: (options?: BillingUsageOptions) => Promise<BillingUsageResult>;
2715
2786
  /** Metronome-authored target catalog and current Contract projection. */
2716
- targetPlans: () => Promise<TargetBillingPlansResult>;
2787
+ targetPlans: (options?: {
2788
+ promoCode?: string;
2789
+ }) => Promise<TargetBillingPlansResult>;
2717
2790
  /** Normalized target billing state. */
2718
2791
  targetStatus: () => Promise<TargetBillingStatusResult>;
2719
2792
  /** Read and manage the Metronome-backed automatic recharge configuration. */
@@ -2726,6 +2799,29 @@ export type BillingNamespace = {
2726
2799
  options: TargetAutoRechargeUpdateOptions,
2727
2800
  ) => Promise<TargetAutoRechargeResult>;
2728
2801
  };
2802
+ /** List and manage the workspace's saved cards. */
2803
+ cards: {
2804
+ list: (options?: {
2805
+ limit?: number;
2806
+ cursor?: string;
2807
+ }) => Promise<BillingSavedCardsResult>;
2808
+ /**
2809
+ * Start adding a card on Stripe's hosted page. The current default is
2810
+ * kept unless `makeDefault` is true; with no saved card yet, the new card
2811
+ * becomes the default either way.
2812
+ */
2813
+ add: (options?: {
2814
+ makeDefault?: boolean;
2815
+ }) => Promise<{ checkout_url: string }>;
2816
+ /** Use this card for every later top-up, auto top-up and invoice. */
2817
+ setDefault: (
2818
+ options: BillingSavedCardChangeOptions,
2819
+ ) => Promise<BillingSavedCardChangeResult>;
2820
+ /** Remove a card that is not the default. */
2821
+ remove: (
2822
+ options: BillingSavedCardChangeOptions,
2823
+ ) => Promise<BillingSavedCardChangeResult>;
2824
+ };
2729
2825
  /** Buy Deepline credits through a payment-gated Metronome commit. */
2730
2826
  purchaseCredits: (options: {
2731
2827
  credits: number;
@@ -2983,47 +3079,6 @@ function playRunResultFromStatus(
2983
3079
  };
2984
3080
  }
2985
3081
 
2986
- export type HostedPage = {
2987
- id: string;
2988
- name: string;
2989
- url: string;
2990
- description: string | null;
2991
- allowed_origins?: string[];
2992
- public: boolean;
2993
- state: 'active' | 'deleting';
2994
- has_document: boolean;
2995
- content_type: string | null;
2996
- size_bytes: number | null;
2997
- revision: number;
2998
- created_at: number;
2999
- updated_at: number;
3000
- last_written_by_run_id: string | null;
3001
- };
3002
-
3003
- export type HostedPageList = {
3004
- pages: HostedPage[];
3005
- next_cursor: string | null;
3006
- page_limit: number;
3007
- /** Whether this workspace may publish pages anyone can open. */
3008
- public_allowed: boolean;
3009
- };
3010
-
3011
- export type HostedPageWriteResult = {
3012
- name: string;
3013
- url: string;
3014
- public: boolean;
3015
- revision: number;
3016
- created: boolean;
3017
- warnings: string[];
3018
- };
3019
-
3020
- export type HostedPageLink = {
3021
- id: string;
3022
- label: string | null;
3023
- expires_at: number | null;
3024
- created_at: number;
3025
- };
3026
-
3027
3082
  export type ViewAccess = 'workspace' | 'public';
3028
3083
 
3029
3084
  export type View = {
@@ -3058,6 +3113,21 @@ export type ViewRunSummary = {
3058
3113
  finished_at: number | null;
3059
3114
  };
3060
3115
 
3116
+ /** A link that opens one view for whoever holds it, until it expires or is revoked. */
3117
+ export type ViewShareLink = {
3118
+ id: string;
3119
+ label: string | null;
3120
+ created_by_user_id: string;
3121
+ created_at: number;
3122
+ expires_at: number | null;
3123
+ revoked_at: number | null;
3124
+ /** Addresses Deepline emailed the link to when it was created. */
3125
+ sent_to: string[];
3126
+ status: 'active' | 'expired' | 'revoked';
3127
+ };
3128
+
3129
+ export type ViewShareLinkExpiry = '1d' | '7d' | '30d' | 'never';
3130
+
3061
3131
  export type ViewPermissionLevel = 'members' | 'admins';
3062
3132
  export type ViewPermissionRules = {
3063
3133
  create: ViewPermissionLevel;
@@ -3202,7 +3272,7 @@ export class DeeplineClient {
3202
3272
  usageEvent: (requestId) => this.getBillingUsageEvent(requestId),
3203
3273
  usageEvents: (options) => this.getBillingUsageEvents(options),
3204
3274
  usage: (options) => this.getBillingUsage(options),
3205
- targetPlans: () => this.getTargetBillingPlans(),
3275
+ targetPlans: (options) => this.getTargetBillingPlans(options),
3206
3276
  targetStatus: () => this.getTargetBillingStatus(),
3207
3277
  autoRecharge: {
3208
3278
  get: () => this.getTargetAutoRecharge(),
@@ -3218,6 +3288,40 @@ export class DeeplineClient {
3218
3288
  ),
3219
3289
  update: (options) => this.updateTargetAutoRecharge(options),
3220
3290
  },
3291
+ cards: {
3292
+ list: (options) => {
3293
+ const query = new URLSearchParams();
3294
+ if (options?.limit !== undefined) {
3295
+ query.set('limit', String(options.limit));
3296
+ }
3297
+ if (options?.cursor) query.set('cursor', options.cursor);
3298
+ const suffix = query.size > 0 ? `?${query.toString()}` : '';
3299
+ return this.http.get<BillingSavedCardsResult>(
3300
+ `/api/v2/billing/payment-methods${suffix}`,
3301
+ );
3302
+ },
3303
+ add: (options) =>
3304
+ this.http.post<{ checkout_url: string }>(
3305
+ '/api/v2/billing/payment-method/setup',
3306
+ { make_default: options?.makeDefault === true },
3307
+ ),
3308
+ setDefault: (options) =>
3309
+ this.http.post<BillingSavedCardChangeResult>(
3310
+ '/api/v2/billing/payment-methods/default',
3311
+ {
3312
+ card_id: options.cardId,
3313
+ change_id: options.changeId ?? globalThis.crypto.randomUUID(),
3314
+ },
3315
+ ),
3316
+ remove: (options) =>
3317
+ this.http.post<BillingSavedCardChangeResult>(
3318
+ '/api/v2/billing/payment-methods/remove',
3319
+ {
3320
+ card_id: options.cardId,
3321
+ change_id: options.changeId ?? globalThis.crypto.randomUUID(),
3322
+ },
3323
+ ),
3324
+ },
3221
3325
  purchaseCredits: (options) => this.purchaseTargetBillingCredits(options),
3222
3326
  recoverCreditPurchase: (options) =>
3223
3327
  this.recoverTargetBillingCreditPurchase(options),
@@ -3393,107 +3497,6 @@ export class DeeplineClient {
3393
3497
  // Secrets
3394
3498
  // ——————————————————————————————————————————————————————————
3395
3499
 
3396
- /** List this workspace's hosted pages, newest update first. */
3397
- async listPages(input?: {
3398
- cursor?: string;
3399
- limit?: number;
3400
- }): Promise<HostedPageList> {
3401
- const params = new URLSearchParams();
3402
- if (input?.cursor) params.set('cursor', input.cursor);
3403
- if (input?.limit) params.set('limit', String(input.limit));
3404
- const query = params.size > 0 ? `?${params}` : '';
3405
- return await this.http.get<HostedPageList>(`/api/v2/pages${query}`);
3406
- }
3407
-
3408
- /** Read one hosted page's metadata. */
3409
- async getPage(name: string): Promise<HostedPage> {
3410
- return await this.http.get<HostedPage>(
3411
- `/api/v2/pages/${encodeURIComponent(name)}`,
3412
- );
3413
- }
3414
-
3415
- /** Replace a page's whole content. `public` says who the write is for. */
3416
- async writePage(
3417
- name: string,
3418
- input: {
3419
- public: boolean;
3420
- contentBase64: string;
3421
- contentType: string;
3422
- description?: string;
3423
- },
3424
- ): Promise<HostedPageWriteResult> {
3425
- return await this.http.put<HostedPageWriteResult>(
3426
- `/api/v2/pages/${encodeURIComponent(name)}`,
3427
- {
3428
- public: input.public,
3429
- content_base64: input.contentBase64,
3430
- content_type: input.contentType,
3431
- description: input.description,
3432
- },
3433
- );
3434
- }
3435
-
3436
- /** Delete a page, its content, and its links. Safe to repeat. */
3437
- async deletePage(name: string): Promise<{ name: string; deleted: boolean }> {
3438
- return await this.http.delete<{ name: string; deleted: boolean }>(
3439
- `/api/v2/pages/${encodeURIComponent(name)}`,
3440
- );
3441
- }
3442
-
3443
- /** Replace the origins allowed to read this page in a browser when public. */
3444
- async setPageAllowedOrigins(
3445
- name: string,
3446
- origins: string[],
3447
- ): Promise<{ allowed_origins: string[] }> {
3448
- return await this.http.put<{ allowed_origins: string[] }>(
3449
- `/api/v2/pages/${encodeURIComponent(name)}/origins`,
3450
- { allowed_origins: origins },
3451
- );
3452
- }
3453
-
3454
- /** The explicit way to change who can see an existing page. */
3455
- async setPageVisibility(
3456
- name: string,
3457
- isPublic: boolean,
3458
- ): Promise<HostedPage> {
3459
- return await this.http.post<HostedPage>(
3460
- `/api/v2/pages/${encodeURIComponent(name)}/visibility`,
3461
- { public: isPublic },
3462
- );
3463
- }
3464
-
3465
- /** List a page's links. Their URLs cannot be shown again. */
3466
- async listPageLinks(name: string): Promise<{ links: HostedPageLink[] }> {
3467
- return await this.http.get<{ links: HostedPageLink[] }>(
3468
- `/api/v2/pages/${encodeURIComponent(name)}/links`,
3469
- );
3470
- }
3471
-
3472
- /** The returned URL is shown once. Either expiry or `permanent` is required. */
3473
- async createPageLink(
3474
- name: string,
3475
- input: { expiresInSeconds?: number; permanent?: boolean; label?: string },
3476
- ): Promise<HostedPageLink & { url: string }> {
3477
- return await this.http.post<HostedPageLink & { url: string }>(
3478
- `/api/v2/pages/${encodeURIComponent(name)}/links`,
3479
- {
3480
- expires_in_seconds: input.expiresInSeconds,
3481
- permanent: input.permanent,
3482
- label: input.label,
3483
- },
3484
- );
3485
- }
3486
-
3487
- /** Stop a link working. Safe to repeat. */
3488
- async revokePageLink(
3489
- name: string,
3490
- linkId: string,
3491
- ): Promise<{ id: string; revoked: boolean }> {
3492
- return await this.http.delete<{ id: string; revoked: boolean }>(
3493
- `/api/v2/pages/${encodeURIComponent(name)}/links/${encodeURIComponent(linkId)}`,
3494
- );
3495
- }
3496
-
3497
3500
  // ——————————————————————————————————————————————————————————
3498
3501
  // Views
3499
3502
  // ——————————————————————————————————————————————————————————
@@ -3551,6 +3554,45 @@ export class DeeplineClient {
3551
3554
  );
3552
3555
  }
3553
3556
 
3557
+ /** The view's share links, newest first. Their tokens are never returned. */
3558
+ async listViewShareLinks(id: string): Promise<{ links: ViewShareLink[] }> {
3559
+ return await this.http.get(
3560
+ `/api/v2/views/${encodeURIComponent(id)}/links`,
3561
+ );
3562
+ }
3563
+
3564
+ /**
3565
+ * Create a share link. `url` in the result is the only copy of the link;
3566
+ * keep it. With `emails`, Deepline also emails it to those people, except
3567
+ * `not_emailed` addresses that bounced or complained before. One
3568
+ * Idempotency-Key per call, so a retried request returns the same link
3569
+ * (with `url: null`) instead of making and emailing a second one.
3570
+ */
3571
+ async createViewShareLink(
3572
+ id: string,
3573
+ input: { expires: ViewShareLinkExpiry; label?: string; emails?: string[] },
3574
+ ): Promise<
3575
+ ViewShareLink & {
3576
+ url: string | null;
3577
+ not_emailed: string[];
3578
+ repeated?: boolean;
3579
+ message?: string;
3580
+ }
3581
+ > {
3582
+ return await this.http.post(
3583
+ `/api/v2/views/${encodeURIComponent(id)}/links`,
3584
+ input,
3585
+ { 'Idempotency-Key': `view-link-${globalThis.crypto.randomUUID()}` },
3586
+ );
3587
+ }
3588
+
3589
+ /** Revoke a share link. It stops opening the view at once. */
3590
+ async revokeViewShareLink(id: string, linkId: string): Promise<ViewShareLink> {
3591
+ return await this.http.delete(
3592
+ `/api/v2/views/${encodeURIComponent(id)}/links/${encodeURIComponent(linkId)}`,
3593
+ );
3594
+ }
3595
+
3554
3596
  /** Every run of the view's Play, newest first. */
3555
3597
  async listViewRuns(
3556
3598
  id: string,
@@ -6033,6 +6075,29 @@ export class DeeplineClient {
6033
6075
  return this.http.get('/api/v2/integrations/connections');
6034
6076
  }
6035
6077
 
6078
+ /** List workspace members' personal HubSpot connection status as an admin. */
6079
+ async listPersonalHubSpotMembers(cursor?: string): Promise<{
6080
+ members: Array<{
6081
+ memberId: string;
6082
+ name: string;
6083
+ email: string;
6084
+ status:
6085
+ | 'connected'
6086
+ | 'needs_reauth'
6087
+ | 'disconnected'
6088
+ | 'not_connected'
6089
+ | 'connecting'
6090
+ | 'needs_attention';
6091
+ account: { portalId: string; userId: string } | null;
6092
+ }>;
6093
+ nextCursor: string | null;
6094
+ }> {
6095
+ const path = '/api/v2/integrations/connections/hubspot-members';
6096
+ return this.http.get(
6097
+ cursor ? `${path}?${new URLSearchParams({ cursor })}` : path,
6098
+ );
6099
+ }
6100
+
6036
6101
  /** Manage a workspace-owned OAuth connection. Consent completes in the browser. */
6037
6102
  async manageWorkspaceIntegrationConnection(input: {
6038
6103
  action: 'connect' | 'reconnect' | 'replace' | 'disconnect';
@@ -7218,8 +7283,14 @@ export class DeeplineClient {
7218
7283
  }
7219
7284
 
7220
7285
  /** List the reviewed target plans and whether new acquisition is enabled. */
7221
- async getTargetBillingPlans(): Promise<TargetBillingPlansResult> {
7222
- return this.http.get<TargetBillingPlansResult>('/api/v2/billing/plans');
7286
+ async getTargetBillingPlans(options?: {
7287
+ promoCode?: string;
7288
+ }): Promise<TargetBillingPlansResult> {
7289
+ return this.http.get<TargetBillingPlansResult>(
7290
+ options?.promoCode
7291
+ ? `/api/v2/billing/plans?promo_code=${encodeURIComponent(options.promoCode)}`
7292
+ : '/api/v2/billing/plans',
7293
+ );
7223
7294
  }
7224
7295
 
7225
7296
  /** Read the workspace's normalized target plan, payment, and balance state. */
@@ -7345,6 +7416,9 @@ export class DeeplineClient {
7345
7416
  ...(options.targetPlanSku
7346
7417
  ? { target_plan_sku: options.targetPlanSku }
7347
7418
  : {}),
7419
+ ...(options.action === 'start_or_change' && options.promoCode
7420
+ ? { promo_code: options.promoCode }
7421
+ : {}),
7348
7422
  },
7349
7423
  { 'Idempotency-Key': idempotencyKey },
7350
7424
  { maxRetries: 0, exactUrlOnly: true },
@@ -8132,6 +8206,14 @@ export class DeeplineClient {
8132
8206
  };
8133
8207
  }
8134
8208
 
8209
+ /**
8210
+ * Fleet writes plan against the whole fleet inside one request, so they
8211
+ * wait as long as the server lets those routes run (300 s) plus transit,
8212
+ * not the client's default. A ten-thousand-member deploy took 62 s; giving
8213
+ * up at 60 s reported a timeout for a plan the server then committed.
8214
+ */
8215
+ private static readonly MONITOR_FLEET_WRITE_TIMEOUT_MS = 310_000;
8216
+
8135
8217
  private monitorFleetPath(fleetId: string): string {
8136
8218
  return `/api/v2/monitors/fleets/${encodeURIComponent(fleetId)}`;
8137
8219
  }
@@ -8166,6 +8248,7 @@ export class DeeplineClient {
8166
8248
  {
8167
8249
  method: 'PUT',
8168
8250
  body,
8251
+ timeout: DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
8169
8252
  headers: this.monitorFleetHeaders('sync', options?.idempotencyKey),
8170
8253
  maxRetries: 0,
8171
8254
  exactUrlOnly: true,
@@ -8249,6 +8332,7 @@ export class DeeplineClient {
8249
8332
  {
8250
8333
  method: 'DELETE',
8251
8334
  body: options?.dryRun ? { dry_run: true } : {},
8335
+ timeout: DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
8252
8336
  headers: this.monitorFleetHeaders(
8253
8337
  'deactivate',
8254
8338
  options?.idempotencyKey,
@@ -8268,6 +8352,7 @@ export class DeeplineClient {
8268
8352
  {
8269
8353
  method: 'POST',
8270
8354
  body: {},
8355
+ timeout: DeeplineClient.MONITOR_FLEET_WRITE_TIMEOUT_MS,
8271
8356
  headers: this.monitorFleetHeaders(
8272
8357
  'reactivate',
8273
8358
  options?.idempotencyKey,
@@ -113,6 +113,10 @@ export type {
113
113
  BillingCreditPool,
114
114
  BillingInvoiceEntry,
115
115
  BillingInvoicesResult,
116
+ BillingSavedCard,
117
+ BillingSavedCardChangeOptions,
118
+ BillingSavedCardChangeResult,
119
+ BillingSavedCardsResult,
116
120
  BillingNamespace,
117
121
  BillingQuoteRequest,
118
122
  BillingQuoteResult,
@@ -156,6 +156,29 @@ function isRuntimeInputExpression(expression: string): boolean {
156
156
  return /(^|[^\w$])input([^\w$]|$)/.test(expression);
157
157
  }
158
158
 
159
+ /**
160
+ * A plain variable (`csv`, `csv!`, `path as CsvInput<Row>`) holds a runtime
161
+ * value, such as a destructured `CsvInput` field or a helper's parameter,
162
+ * unless the file initializes that name from an expression holding a string
163
+ * literal (`'a.csv'`, `('a.csv')`, `'a.csv' as const`, `DIR + '/a.csv'`), read
164
+ * across line breaks up to its `;`. Then it is a local path the scanner cannot
165
+ * follow, and stays an error.
166
+ */
167
+ function isRuntimeVariableExpression(
168
+ expression: string,
169
+ constants: ConstMap,
170
+ scanSource: string,
171
+ ): boolean {
172
+ const name = /^([A-Za-z_$][\w$]*)\s*(?:!|\s(?:as|satisfies)\s[\s\S]+)?$/.exec(
173
+ stripOuterParens(expression),
174
+ )?.[1];
175
+ if (!name || constants.has(name)) return false;
176
+ const literalBinding = new RegExp(
177
+ `\\b(?:const|let|var)\\s+${name.replace(/\$/g, '\\$')}\\s*(?::[^=]+)?=[^;]*['"\`]`,
178
+ );
179
+ return !literalBinding.test(scanSource);
180
+ }
181
+
159
182
  function resolveStringExpression(
160
183
  expression: string,
161
184
  constants: ConstMap,
@@ -398,7 +421,10 @@ export async function discoverPackagedLocalFiles(
398
421
  sourceFragment: 'ctx.csv()',
399
422
  message: 'ctx.csv() requires a file path string or input reference.',
400
423
  });
401
- } else if (!isRuntimeInputExpression(argument.text)) {
424
+ } else if (
425
+ !isRuntimeInputExpression(argument.text) &&
426
+ !isRuntimeVariableExpression(argument.text, constants, scanSource)
427
+ ) {
402
428
  const resolvedPath = resolveStringExpression(argument.text, constants);
403
429
  if (resolvedPath == null) {
404
430
  unresolved.push({
@@ -684,17 +684,28 @@ function stringMetadata(
684
684
  return typeof value === 'string' && value.trim() ? value.trim() : null;
685
685
  }
686
686
 
687
- /** The `csvInput` binding a `CsvInput<Row>` field compiles to. */
687
+ /**
688
+ * The bindings `CsvInput<Row>` fields compile to: `csvInput` names the first,
689
+ * and `csvInputFields` (present when a Play declares more than one) lists all.
690
+ */
688
691
  export function fileInputBindingsFromPlaySchema(
689
692
  inputSchema: Record<string, unknown> | null | undefined,
690
693
  ): FileInputBinding[] {
691
694
  const csvInput = schemaMetadata(inputSchema, 'csvInput');
692
695
  if (!csvInput) return [];
693
- return [
694
- {
695
- inputPath: stringMetadata(csvInput, 'inputField') ?? CSV_DATA_INPUT_KEY,
696
- },
696
+ const listed = inputSchema?.csvInputFields;
697
+ const fields = [
698
+ stringMetadata(csvInput, 'inputField') ?? CSV_DATA_INPUT_KEY,
699
+ ...(Array.isArray(listed)
700
+ ? listed.filter(
701
+ (field): field is string =>
702
+ typeof field === 'string' && field.trim().length > 0,
703
+ )
704
+ : []),
697
705
  ];
706
+ return [...new Set(fields.map((field) => field.trim()))].map((inputPath) => ({
707
+ inputPath,
708
+ }));
698
709
  }
699
710
 
700
711
  /** Every input field read by an authored `ctx.csv(input.x)` call. */
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
205
205
  // getters keep their established compatibility behavior.
206
206
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
207
207
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
208
- version: '0.3.535',
208
+ version: '0.3.536',
209
209
  updateSummary: {
210
210
  introducedIn: '0.3.90',
211
211
  summary:
@@ -1512,7 +1512,8 @@ export interface PlayRuntimeLimit {
1512
1512
  export type PrebuiltPlayObservedCost =
1513
1513
  | {
1514
1514
  status: 'available';
1515
- unit: 'row' | 'run';
1515
+ /** `result`: per row of the dataset the Play returns. */
1516
+ unit: 'result' | 'row' | 'run';
1516
1517
  avgCredits: number;
1517
1518
  maxCredits: number;
1518
1519
  /** Null until enough runs exist for a median to mean something. */
@@ -1685,17 +1686,6 @@ export type PlayCostEstimate =
1685
1686
  sampleRunCount: number;
1686
1687
  basedOnRunId: string | null;
1687
1688
  modelVersion: string;
1688
- compute?: {
1689
- scope: 'sandbox_session';
1690
- maximumCredits: number;
1691
- maximumBillingSeconds: number;
1692
- maximumBackend: 'daytona' | 'modal';
1693
- pricedBackends: Array<'daytona' | 'modal'>;
1694
- totalPlayCredits: null;
1695
- totalPlayCreditsSupported: false;
1696
- actualUsageBased: true;
1697
- totalSandboxSessions: 'unbounded';
1698
- };
1699
1689
  }
1700
1690
  | {
1701
1691
  status: 'unavailable';
@@ -1707,17 +1697,6 @@ export type PlayCostEstimate =
1707
1697
  | 'mixed_run_and_row_costs';
1708
1698
  message: string;
1709
1699
  modelVersion: string;
1710
- compute?: {
1711
- scope: 'sandbox_session';
1712
- maximumCredits: number;
1713
- maximumBillingSeconds: number;
1714
- maximumBackend: 'daytona' | 'modal';
1715
- pricedBackends: Array<'daytona' | 'modal'>;
1716
- totalPlayCredits: null;
1717
- totalPlayCreditsSupported: false;
1718
- actualUsageBased: true;
1719
- totalSandboxSessions: 'unbounded';
1720
- };
1721
1700
  };
1722
1701
 
1723
1702
  export interface PlayListItem {