deepline 0.3.520 → 0.3.522

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 (185) hide show
  1. package/dist/bundling-sources/sdk/src/plays/client-core.ts +16 -45
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +0 -18
  4. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +0 -155
  5. package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +8 -1
  6. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +24 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +1 -54
  8. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +2 -7
  9. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +0 -13
  10. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +0 -56
  11. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +10 -21
  12. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +1 -1
  13. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +2 -1
  14. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +1 -1
  15. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +2 -37
  16. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +3 -74
  17. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +2 -226
  18. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +3 -36
  19. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +0 -26
  20. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +1 -9
  21. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +0 -5
  22. package/dist/bundling-sources/shared_libs/play-runtime/runtime-environment.ts +9 -49
  23. package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-oidc.ts +11 -447
  24. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +5 -4
  25. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +12 -207
  26. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +3 -17
  27. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-progress-registry.ts +0 -9
  28. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +2 -18
  29. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +15 -175
  30. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +0 -4
  31. package/dist/cli/{artifacts-4DSPSIU5.js → artifacts-GIZZH5VA.js} +20 -20
  32. package/dist/cli/{artifacts-D6PU7SBC.mjs → artifacts-RY2MK74N.mjs} +8 -8
  33. package/dist/cli/auth-JSES2JOQ.js +43 -0
  34. package/dist/cli/{auth-MXKNPUXW.mjs → auth-YIBY5IKT.mjs} +5 -5
  35. package/dist/cli/{billing-SQ26NKGH.mjs → billing-G3IX3SNY.mjs} +8 -8
  36. package/dist/cli/{billing-WEYCNJIR.js → billing-UDKL53GI.js} +81 -81
  37. package/dist/cli/{chunk-6Y3DDRRN.js → chunk-2KHUFWTK.js} +3 -3
  38. package/dist/cli/{chunk-4VR5OTYP.js → chunk-37SXIFIU.js} +44 -44
  39. package/dist/cli/{chunk-QSWPDYOP.mjs → chunk-3KMGVOBM.mjs} +4 -4
  40. package/dist/cli/{chunk-7VJKHJY7.js → chunk-4DFWDA2Q.js} +14 -14
  41. package/dist/cli/{chunk-VSPNBBRT.js → chunk-4MF44THR.js} +66 -119
  42. package/dist/cli/{chunk-NLIO6QLP.mjs → chunk-4TUMKJZX.mjs} +2 -2
  43. package/dist/cli/{chunk-KKSMHTQO.mjs → chunk-52MHE7B4.mjs} +1 -1
  44. package/dist/cli/{chunk-AVW2LKRF.js → chunk-534YYHIF.js} +6 -6
  45. package/dist/cli/{chunk-QQGRQRCS.mjs → chunk-5477PEHL.mjs} +1 -1
  46. package/dist/cli/{chunk-YHHLLONU.js → chunk-5BQPEHEP.js} +14 -14
  47. package/dist/cli/{chunk-GVTHFDKN.js → chunk-5H22VJPE.js} +6 -6
  48. package/dist/cli/{chunk-LUIPBI6P.js → chunk-6SJPZV5E.js} +2 -2
  49. package/dist/cli/{chunk-NNUJQ5O2.mjs → chunk-7J5PLHII.mjs} +1 -1
  50. package/dist/cli/{chunk-I4GBCKBL.js → chunk-7JEN3FX4.js} +5 -5
  51. package/dist/cli/{chunk-VSLU4JZV.mjs → chunk-BONXEWYF.mjs} +3 -3
  52. package/dist/cli/{chunk-AM7HMWNA.js → chunk-BZY335JP.js} +5 -5
  53. package/dist/cli/{chunk-YP3G2CP6.mjs → chunk-C6WGMODR.mjs} +2 -2
  54. package/dist/cli/{chunk-V6BUWQBI.mjs → chunk-CFXERH7F.mjs} +1 -1
  55. package/dist/cli/{chunk-ORAWUIMN.js → chunk-DARD7TJ7.js} +53 -53
  56. package/dist/cli/{chunk-BHAP6FIZ.js → chunk-DLDWAPA5.js} +4 -4
  57. package/dist/cli/{chunk-FWGTBR3W.js → chunk-DNJJ3ULJ.js} +2 -2
  58. package/dist/cli/{chunk-Y5QYWFRI.js → chunk-DRDZBRXV.js} +7 -7
  59. package/dist/cli/{chunk-JO2MQ6XR.js → chunk-EJBW7Y6Z.js} +98 -98
  60. package/dist/cli/{chunk-2EDGA7OE.mjs → chunk-ENWJFUWK.mjs} +2 -2
  61. package/dist/cli/{chunk-6XJA23MZ.js → chunk-F5D623KO.js} +26 -26
  62. package/dist/cli/{chunk-HT675XNR.mjs → chunk-FKD3KL5Q.mjs} +1 -1
  63. package/dist/cli/{chunk-2BJILUE3.js → chunk-FNHUDCJE.js} +10 -10
  64. package/dist/cli/{chunk-XU57CH42.mjs → chunk-FQQAAR3Q.mjs} +1 -1
  65. package/dist/cli/{chunk-6T2LB43P.mjs → chunk-G65FJ5JX.mjs} +2 -2
  66. package/dist/cli/{chunk-UA4MXESL.js → chunk-GMYDVW7Z.js} +3 -3
  67. package/dist/cli/{chunk-74MOIEDC.js → chunk-GVKW3LCA.js} +11 -11
  68. package/dist/cli/{chunk-D5VTWJ7K.js → chunk-ISUUSSS4.js} +16 -16
  69. package/dist/cli/{chunk-KTAOVRXT.js → chunk-KMBF3N2Z.js} +16 -16
  70. package/dist/cli/{chunk-5TEXJM6F.mjs → chunk-LFSOBW7E.mjs} +11 -11
  71. package/dist/cli/{chunk-A5VR463F.mjs → chunk-MD524MRB.mjs} +1 -1
  72. package/dist/cli/{chunk-NPRSGUHB.mjs → chunk-NDNG3MAT.mjs} +5 -5
  73. package/dist/cli/{chunk-NWSKBWQM.mjs → chunk-OAQIVJFY.mjs} +2 -2
  74. package/dist/cli/{chunk-6VY2SJ6B.mjs → chunk-PDLRUZ42.mjs} +5 -5
  75. package/dist/cli/{chunk-M6YHS5V7.mjs → chunk-RDJTCW3I.mjs} +3 -3
  76. package/dist/cli/{chunk-3YHS4BLB.js → chunk-RI672VNY.js} +2 -2
  77. package/dist/cli/{chunk-TQTQ3YYA.mjs → chunk-RKE5YTHY.mjs} +5 -5
  78. package/dist/cli/{chunk-SHB2BNI6.mjs → chunk-SFMCKB57.mjs} +37 -90
  79. package/dist/cli/{chunk-BMCRTI6Z.mjs → chunk-UBKA33KY.mjs} +1 -22
  80. package/dist/cli/{chunk-6GI7BYSL.mjs → chunk-UV6XCHOZ.mjs} +1 -1
  81. package/dist/cli/{chunk-U5646OVV.mjs → chunk-VFCVH2LV.mjs} +5 -5
  82. package/dist/cli/{chunk-7QAX5VBT.js → chunk-VIM6I7RC.js} +41 -41
  83. package/dist/cli/{chunk-WSGXBROE.js → chunk-XDVT3GOM.js} +1 -22
  84. package/dist/cli/{chunk-KCISDDNK.mjs → chunk-XR6TN5DT.mjs} +6 -6
  85. package/dist/cli/{chunk-XXDY7K7F.js → chunk-XT25FX6T.js} +3 -3
  86. package/dist/cli/{chunk-ASGGZ6BI.mjs → chunk-XXY4E57R.mjs} +2 -2
  87. package/dist/cli/{chunk-YVQLXMJU.mjs → chunk-Y3LDRCMB.mjs} +3 -3
  88. package/dist/cli/{chunk-5ECMRQCL.js → chunk-ZUAKRBZB.js} +1 -1
  89. package/dist/cli/{chunk-DQQ6FDE6.mjs → chunk-ZZ7U4YJS.mjs} +1 -1
  90. package/dist/cli/{chunk-LYIJ3YUP.js → chunk-ZZLZCO6Y.js} +22 -22
  91. package/dist/cli/{csv-VJNR6FOZ.js → csv-3HIE4VCO.js} +13 -13
  92. package/dist/cli/{csv-T7HIELZ2.mjs → csv-PE35WGRO.mjs} +4 -4
  93. package/dist/cli/{db-OE2EXZXL.mjs → db-L7ZMMQKW.mjs} +8 -8
  94. package/dist/cli/{db-JF2I54V7.js → db-O2YRTTDO.js} +29 -29
  95. package/dist/cli/describe-EB336DAO.js +50 -0
  96. package/dist/cli/{describe-HXZZC3LC.mjs → describe-NI324Y2M.mjs} +20 -20
  97. package/dist/cli/describe-core.d.mts +2 -2
  98. package/dist/cli/describe-core.d.ts +2 -2
  99. package/dist/cli/{executions-4BXRIJFF.mjs → executions-T6KU2OKK.mjs} +8 -8
  100. package/dist/cli/{executions-UQ2H6MJZ.js → executions-VH4DKLFI.js} +10 -10
  101. package/dist/cli/{feedback-TXF5CQKA.mjs → feedback-SCSJC3FX.mjs} +5 -5
  102. package/dist/cli/{feedback-MKFN7DYY.js → feedback-ZLC6G5OK.js} +10 -10
  103. package/dist/cli/git-23T7TXAH.js +25 -0
  104. package/dist/cli/{git-MG3NAV65.mjs → git-I4LVQCID.mjs} +5 -5
  105. package/dist/cli/index.js +141 -141
  106. package/dist/cli/index.mjs +43 -43
  107. package/dist/cli/{legacy-noops-XSDY46XD.mjs → legacy-noops-44FQ2256.mjs} +6 -6
  108. package/dist/cli/{legacy-noops-R76I2OWW.js → legacy-noops-UPFWEHPG.js} +9 -9
  109. package/dist/cli/{monitors-FS3DIDM7.js → monitors-JN6IQGK6.js} +102 -102
  110. package/dist/cli/{monitors-NVT5YQKV.mjs → monitors-LMSASWXE.mjs} +9 -9
  111. package/dist/cli/{org-SBI6FC6D.js → org-F7O3ZU5O.js} +74 -74
  112. package/dist/cli/{org-XU7JONWS.mjs → org-QYLVEE7A.mjs} +8 -8
  113. package/dist/cli/{pages-AFB5DVBR.mjs → pages-5XE4LBZN.mjs} +8 -8
  114. package/dist/cli/{pages-2CZFJJV6.js → pages-KEL3Y4L4.js} +20 -20
  115. package/dist/cli/{play-EQEIT5S4.mjs → play-MWQG3G32.mjs} +21 -21
  116. package/dist/cli/{play-WZH72UGC.js → play-OURHH6KV.js} +338 -338
  117. package/dist/cli/{providers-3VXTATHF.mjs → providers-IQY7LUBB.mjs} +8 -8
  118. package/dist/cli/{providers-SHSVUQA3.js → providers-ZCBWPE3C.js} +11 -11
  119. package/dist/cli/{quickstart-45YS4SOD.mjs → quickstart-L45NGRMI.mjs} +4 -4
  120. package/dist/cli/{quickstart-KPVPK3VL.js → quickstart-O53OXTN6.js} +6 -6
  121. package/dist/cli/{run-XEHRZT57.mjs → run-VCSIWLEU.mjs} +25 -25
  122. package/dist/cli/{run-U5RWBX5J.js → run-W745Z3Z5.js} +43 -43
  123. package/dist/cli/run-identity-G257GQED.js +25 -0
  124. package/dist/cli/{run-identity-MNRZS2N3.mjs → run-identity-MRNCEGV2.mjs} +3 -9
  125. package/dist/cli/search-R6K7ZAMU.js +33 -0
  126. package/dist/cli/{search-V7XIWBQ2.mjs → search-THELKULN.mjs} +10 -10
  127. package/dist/cli/{search-output-3KAJUV2A.mjs → search-output-N7MJLYYD.mjs} +4 -4
  128. package/dist/cli/{search-output-ZNIICV5Z.js → search-output-SJW7LEOM.js} +6 -6
  129. package/dist/cli/{secrets-SCSG3QXJ.mjs → secrets-44ST3FJH.mjs} +8 -8
  130. package/dist/cli/{secrets-53TUV6JK.js → secrets-GDXPX3KB.js} +17 -17
  131. package/dist/cli/sessions-2V5ZFOWL.js +18 -0
  132. package/dist/cli/{sessions-MCTHLLK3.mjs → sessions-LYCBI77S.mjs} +6 -6
  133. package/dist/cli/{settings-ZNOXOIX2.js → settings-3WOFF642.js} +88 -88
  134. package/dist/cli/{settings-Q2HKACSE.mjs → settings-GXPDMJFG.mjs} +15 -15
  135. package/dist/cli/{setup-GO4EULLY.js → setup-YHLMBJP4.js} +50 -50
  136. package/dist/cli/{setup-WKM35SZJ.mjs → setup-YM6JEB64.mjs} +10 -10
  137. package/dist/cli/{skills-DZZLW6OV.mjs → skills-WX4XWEAT.mjs} +8 -8
  138. package/dist/cli/skills-XNGADDO6.js +37 -0
  139. package/dist/cli/{tools-EKVSK6X4.mjs → tools-K24VSQ7S.mjs} +19 -19
  140. package/dist/cli/tools-ROUMCB7B.js +57 -0
  141. package/dist/cli/{update-FPHYVHSC.mjs → update-PSSCF5AT.mjs} +10 -10
  142. package/dist/cli/update-RXURGIRW.js +35 -0
  143. package/dist/cli/{workflow-5YAZK5EI.mjs → workflow-DGOPYATO.mjs} +9 -9
  144. package/dist/cli/{workflow-27H3NCNY.js → workflow-FPVI3NIA.js} +19 -19
  145. package/dist/{client-DhEOE19l.d.ts → client-B-2Am2y6.d.ts} +1 -1
  146. package/dist/{client-lJmz2QwF.d.mts → client-DA71-2_u.d.mts} +1 -1
  147. package/dist/{client-core-BGiSMrBD.d.mts → client-core-BXbds1cb.d.mts} +0 -19
  148. package/dist/{client-core-DYCGaRBZ.d.ts → client-core-C0IzDKMJ.d.ts} +0 -19
  149. package/dist/index.d.mts +3 -3
  150. package/dist/index.d.ts +3 -3
  151. package/dist/index.js +19 -19
  152. package/dist/index.mjs +8 -8
  153. package/dist/install-integrity.json +114 -122
  154. package/dist/plays/play-description.d.mts +1 -1
  155. package/dist/plays/play-description.d.ts +1 -1
  156. package/dist/plays/run-request.d.mts +1 -1
  157. package/dist/plays/run-request.d.ts +1 -1
  158. package/dist/plays/run-request.js +3 -3
  159. package/dist/plays/run-request.mjs +2 -2
  160. package/dist/release.d.mts +1 -1
  161. package/dist/release.d.ts +1 -1
  162. package/dist/release.js +2 -2
  163. package/dist/release.mjs +1 -1
  164. package/dist/server.d.mts +2 -2
  165. package/dist/server.d.ts +2 -2
  166. package/dist/server.js +7 -7
  167. package/dist/server.mjs +5 -5
  168. package/package.json +1 -1
  169. package/dist/bundling-sources/shared_libs/play-runtime/runtime-app-transport.ts +0 -374
  170. package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-egress.ts +0 -55
  171. package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-profile.ts +0 -329
  172. package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-sandbox-credential.ts +0 -338
  173. package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-staging.ts +0 -417
  174. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-attempt.ts +0 -81
  175. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-staging-journal.ts +0 -708
  176. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-staging-teardown.ts +0 -160
  177. package/dist/cli/auth-TH4JV6BH.js +0 -43
  178. package/dist/cli/describe-4FLGKRCA.js +0 -50
  179. package/dist/cli/git-B2QO3SLK.js +0 -25
  180. package/dist/cli/run-identity-HFYABUJS.js +0 -31
  181. package/dist/cli/search-Z2V43OPM.js +0 -33
  182. package/dist/cli/sessions-BOJCVLR7.js +0 -18
  183. package/dist/cli/skills-B4BAH2B2.js +0 -37
  184. package/dist/cli/tools-Z5NCKIAB.js +0 -57
  185. package/dist/cli/update-XCL7F5T6.js +0 -35
@@ -35,7 +35,6 @@ import {
35
35
  normalizePlayRunRuntimeSelection,
36
36
  type PlayRunRuntimeSelection,
37
37
  } from '../../../shared_libs/play-runtime/runtime-environment.js';
38
- import { normalizeRuntimeGatewayProfileId } from '../../../shared_libs/play-runtime/runtime-gateway-profile.js';
39
38
  import { decodePlayRunPublicStatus } from '../../../shared_libs/play-runtime/run-lifecycle-policy.js';
40
39
 
41
40
  export function normalizePlayRunIntegrationMode(
@@ -83,14 +82,17 @@ function resolvePlayRunRuntimeSelection(
83
82
  const configuredToken = env.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN?.trim();
84
83
  const configuredPlacementPolicy =
85
84
  env.DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY?.trim();
86
- const configuredGatewayProfile = env.DEEPLINE_RUNTIME_GATEWAY_PROFILE?.trim();
85
+ if (env.DEEPLINE_RUNTIME_GATEWAY_PROFILE?.trim()) {
86
+ // The vercel_app@1 gateway profile was removed. Refuse rather than run on
87
+ // the default gateways while the caller believes a profile applies.
88
+ throw new DeeplineError(
89
+ 'DEEPLINE_RUNTIME_GATEWAY_PROFILE was removed: Runtime gateway profiles (vercel_app@1) are no longer available. Unset it to run on the default gateways.',
90
+ undefined,
91
+ 'RUNTIME_GATEWAY_PROFILE_REMOVED',
92
+ );
93
+ }
87
94
  if (!configured) {
88
- if (
89
- configuredNamespace ||
90
- configuredToken ||
91
- configuredPlacementPolicy ||
92
- configuredGatewayProfile
93
- ) {
95
+ if (configuredNamespace || configuredToken || configuredPlacementPolicy) {
94
96
  // Name the variables that are actually set. This branch is almost always
95
97
  // hit by a stale value auto-loaded from a .env/.env.local rather than by
96
98
  // a deliberate export, so the message has to say where to look and how
@@ -101,9 +103,6 @@ function resolvePlayRunRuntimeSelection(
101
103
  if (configuredPlacementPolicy) {
102
104
  present.push('DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY');
103
105
  }
104
- if (configuredGatewayProfile) {
105
- present.push('DEEPLINE_RUNTIME_GATEWAY_PROFILE');
106
- }
107
106
  const isPlural = present.length > 1;
108
107
  throw new DeeplineError(
109
108
  [
@@ -118,47 +117,20 @@ function resolvePlayRunRuntimeSelection(
118
117
  }
119
118
  return undefined;
120
119
  }
121
- // Validated only once a runtime environment is configured: a stale value
122
- // without one gets the "unset them" guidance above instead.
123
- const selectedGatewayProfile = configuredGatewayProfile
124
- ? normalizeRuntimeGatewayProfileId(configuredGatewayProfile)
125
- : undefined;
126
- if (configuredGatewayProfile && !selectedGatewayProfile) {
127
- throw new DeeplineError(
128
- `DEEPLINE_RUNTIME_GATEWAY_PROFILE must be a supported versioned gateway profile id such as vercel_app@1. Received "${configuredGatewayProfile}".`,
129
- undefined,
130
- 'INVALID_RUNTIME_GATEWAY_PROFILE',
131
- );
132
- }
133
- const gatewayProfile = selectedGatewayProfile
134
- ? { gatewayProfile: selectedGatewayProfile }
135
- : {};
136
120
  if (configured === 'native') {
137
121
  // The app's own runtime on a named placement policy. The server decides
138
122
  // from the API key's account whether this caller may ask for it.
139
- const sandboxPlacementPolicy = configuredPlacementPolicy
140
- ? normalizePlayRuntimeSandboxPlacementPolicy(configuredPlacementPolicy)
141
- : undefined;
142
- if (
143
- configuredNamespace ||
144
- (configuredPlacementPolicy && !sandboxPlacementPolicy) ||
145
- (!sandboxPlacementPolicy && !selectedGatewayProfile)
146
- ) {
123
+ const sandboxPlacementPolicy = normalizePlayRuntimeSandboxPlacementPolicy(
124
+ configuredPlacementPolicy,
125
+ );
126
+ if (configuredNamespace || !sandboxPlacementPolicy) {
147
127
  throw new DeeplineError(
148
- 'DEEPLINE_RUNTIME_ENVIRONMENT=native requires DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY (such as modal_only@1) and/or DEEPLINE_RUNTIME_GATEWAY_PROFILE (such as vercel_app@1), and no DEEPLINE_RUNTIME_NAMESPACE.',
128
+ 'DEEPLINE_RUNTIME_ENVIRONMENT=native requires DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY (such as modal_only@1) and no DEEPLINE_RUNTIME_NAMESPACE.',
149
129
  undefined,
150
130
  'INVALID_RUNTIME_ENVIRONMENT',
151
131
  );
152
132
  }
153
- // The guard above leaves at least one of the two selected.
154
- if (sandboxPlacementPolicy) {
155
- return {
156
- environment: 'native',
157
- sandboxPlacementPolicy,
158
- ...gatewayProfile,
159
- };
160
- }
161
- return { environment: 'native', gatewayProfile: selectedGatewayProfile! };
133
+ return { environment: 'native', sandboxPlacementPolicy };
162
134
  }
163
135
  const environment = normalizePlayRuntimeEnvironment(configured);
164
136
  if (!environment) {
@@ -205,7 +177,6 @@ function resolvePlayRunRuntimeSelection(
205
177
  ...(configuredPlacementPolicy
206
178
  ? { sandboxPlacementPolicy: configuredPlacementPolicy }
207
179
  : {}),
208
- ...gatewayProfile,
209
180
  };
210
181
  }
211
182
 
@@ -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.520',
208
+ version: '0.3.522',
209
209
  updateSummary: {
210
210
  introducedIn: '0.3.90',
211
211
  summary:
@@ -928,24 +928,6 @@
928
928
  "failureAlert": "vercel_route_wrapper",
929
929
  "domainReportRequired": true
930
930
  },
931
- {
932
- "id": "vercel.runtime-gateway-staging-retirement",
933
- "name": "Runtime gateway staged-body retirement",
934
- "scheduler": "vercel_cron",
935
- "cadence": "7,22,37,52 * * * *",
936
- "timezone": "UTC",
937
- "source": "apps/deepline-api/vercel.json",
938
- "locator": "/api/v2/cron/runtime-gateway-staging-retirement",
939
- "owner": "runtime",
940
- "criticality": "maintenance",
941
- "purpose": "Retire app-hosted Runtime gateway staged bodies past their retirement time: delete each exact object, confirm it absent, then mark its custody row deleted; prune long-deleted rows.",
942
- "successDefinition": "Every scheduler schema served by the deployment was probed; each due row was either confirmed absent and marked deleted or released for the next pass; an idle journal is a valid no-op.",
943
- "failureDefinition": "A schema's journal probe, claim or prune fails, or target discovery fails, leaving due staged bodies unretired.",
944
- "startGraceMs": 300000,
945
- "runTimeoutMs": 300000,
946
- "failureAlert": "vercel_route_wrapper",
947
- "domainReportRequired": true
948
- },
949
931
  {
950
932
  "id": "vercel.scheduled-work-health-snapshot",
951
933
  "name": "Scheduled-work health snapshot",
@@ -79,18 +79,6 @@ function resolveBucket(kind: R2BucketKind): string {
79
79
  return requireEnv('CLOUDFLARE_R2_BUCKET_NAME');
80
80
  }
81
81
 
82
- /**
83
- * Nonsecret identity of the bucket a configuration addresses: SHA-256 of the
84
- * bucket name and the endpoint host. Two processes address the same bucket
85
- * only when their fingerprints match. Resolves no credentials.
86
- */
87
- export function getR2BucketFingerprint(kind: R2BucketKind = 'default'): string {
88
- const host = new URL(requireEnv('CLOUDFLARE_R2_ENDPOINT')).host.toLowerCase();
89
- return createHash('sha256')
90
- .update(`${resolveBucket(kind)}\n${host}`)
91
- .digest('hex');
92
- }
93
-
94
82
  export function getR2Config(kind: R2BucketKind = 'default') {
95
83
  return {
96
84
  endpoint: requireEnv('CLOUDFLARE_R2_ENDPOINT'),
@@ -203,14 +191,12 @@ export async function r2ObjectExists(
203
191
  export async function confirmR2ObjectAbsent(
204
192
  key: string,
205
193
  kind: R2BucketKind = 'default',
206
- options?: { abortSignal?: AbortSignal },
207
194
  ): Promise<boolean> {
208
195
  const config = getR2Config(kind);
209
196
  const client = getR2Client(config);
210
197
  try {
211
198
  await client.send(
212
199
  new HeadObjectCommand({ Bucket: config.bucket, Key: key }),
213
- { abortSignal: options?.abortSignal },
214
200
  );
215
201
  return false;
216
202
  } catch (error) {
@@ -326,7 +312,6 @@ export async function listR2Keys(
326
312
  export async function deleteR2Object(
327
313
  key: string,
328
314
  kind: R2BucketKind = 'default',
329
- options?: { abortSignal?: AbortSignal },
330
315
  ): Promise<void> {
331
316
  const startedAt = Date.now();
332
317
  const config = getR2Config(kind);
@@ -336,7 +321,6 @@ export async function deleteR2Object(
336
321
  Bucket: config.bucket,
337
322
  Key: key,
338
323
  }),
339
- { abortSignal: options?.abortSignal },
340
324
  );
341
325
  logR2Perf('delete', key, startedAt, { kind });
342
326
  }
@@ -408,142 +392,3 @@ export async function createSignedR2WriteUrl(input: {
408
392
  expiresAt: new Date(Date.now() + expiresInSeconds * 1000).toISOString(),
409
393
  };
410
394
  }
411
-
412
- /** Ceiling for a create-once upload grant: 15 minutes. */
413
- export const R2_CREATE_ONCE_UPLOAD_MAX_EXPIRES_SECONDS = 15 * 60;
414
-
415
- /**
416
- * Sign an exact-size, create-once PUT (`If-None-Match: *`) valid for at most
417
- * 15 minutes. This bounds what the URL can write; it does not verify the
418
- * digest or retire the object. The caller persists custody before calling
419
- * this, verifies the stored bytes before use, and deletes the key only after
420
- * the URL has expired (until then the URL could recreate a deleted key).
421
- */
422
- export async function createSignedR2CreateOnceUrl(input: {
423
- key: string;
424
- kind?: R2BucketKind;
425
- contentType: string;
426
- byteLength: number;
427
- maxBytes: number;
428
- expiresInSeconds: number;
429
- }): Promise<{
430
- url: string;
431
- expiresAt: string;
432
- headers: {
433
- 'content-type': string;
434
- 'content-length': string;
435
- 'if-none-match': '*';
436
- };
437
- }> {
438
- if (!input.key || !input.contentType) {
439
- throw new Error('R2 create-once upload requires a key and content type.');
440
- }
441
- if (
442
- !Number.isSafeInteger(input.byteLength) ||
443
- !Number.isSafeInteger(input.maxBytes) ||
444
- input.byteLength < 0 ||
445
- input.maxBytes < 0 ||
446
- input.byteLength > input.maxBytes
447
- ) {
448
- throw new Error('R2 create-once upload size exceeds its allowed bound.');
449
- }
450
- if (
451
- !Number.isSafeInteger(input.expiresInSeconds) ||
452
- input.expiresInSeconds < 1 ||
453
- input.expiresInSeconds > R2_CREATE_ONCE_UPLOAD_MAX_EXPIRES_SECONDS
454
- ) {
455
- throw new Error(
456
- `R2 create-once upload expiry must be between 1 and ${R2_CREATE_ONCE_UPLOAD_MAX_EXPIRES_SECONDS} seconds.`,
457
- );
458
- }
459
- const kind = input.kind ?? 'default';
460
- const config = getR2Config(kind);
461
- const client = createR2Client(config);
462
- const command = new PutObjectCommand({
463
- Bucket: config.bucket,
464
- Key: input.key,
465
- ContentType: input.contentType,
466
- ContentLength: input.byteLength,
467
- IfNoneMatch: '*',
468
- });
469
- // SigV4 timestamps have whole-second precision. Report that exact deadline.
470
- const signingDate = new Date(Math.floor(Date.now() / 1000) * 1000);
471
- const url = await getSignedUrl(
472
- client as R2PresignerClient,
473
- command as R2PresignerCommand,
474
- {
475
- expiresIn: input.expiresInSeconds,
476
- signingDate,
477
- signableHeaders: new Set([
478
- 'content-length',
479
- 'content-type',
480
- 'if-none-match',
481
- ]),
482
- },
483
- );
484
- return {
485
- url,
486
- expiresAt: new Date(
487
- signingDate.getTime() + input.expiresInSeconds * 1000,
488
- ).toISOString(),
489
- headers: {
490
- 'content-type': input.contentType,
491
- 'content-length': String(input.byteLength),
492
- 'if-none-match': '*',
493
- },
494
- };
495
- }
496
-
497
- /** R2 answered that the key does not exist (as opposed to failing). */
498
- export function isR2NotFoundError(error: unknown): boolean {
499
- const details = error as {
500
- name?: string;
501
- Code?: string;
502
- $metadata?: { httpStatusCode?: number };
503
- } | null;
504
- return (
505
- !!details &&
506
- (details.$metadata?.httpStatusCode === 404 ||
507
- details.name === 'NotFound' ||
508
- details.name === 'NoSuchKey' ||
509
- details.Code === 'NotFound' ||
510
- details.Code === 'NoSuchKey')
511
- );
512
- }
513
-
514
- /**
515
- * Read one object, refusing before buffering when it is larger than
516
- * `maxBytes`. Returns null only when R2 says the key does not exist; every
517
- * other failure throws, so callers never mistake an outage for absence.
518
- */
519
- export async function getBoundedBufferFromR2(
520
- key: string,
521
- maxBytes: number,
522
- kind: R2BucketKind = 'default',
523
- ): Promise<Buffer | null> {
524
- const startedAt = Date.now();
525
- const config = getR2Config(kind);
526
- const client = getR2Client(config);
527
- let response;
528
- try {
529
- response = await client.send(
530
- new GetObjectCommand({ Bucket: config.bucket, Key: key }),
531
- );
532
- } catch (error) {
533
- if (isR2NotFoundError(error)) return null;
534
- throw error;
535
- }
536
- if (
537
- typeof response.ContentLength === 'number' &&
538
- response.ContentLength > maxBytes
539
- ) {
540
- (response.Body as { destroy?: () => void } | undefined)?.destroy?.();
541
- throw new Error(`R2 object ${key} exceeds ${maxBytes} bytes.`);
542
- }
543
- const bytes = await response.Body!.transformToByteArray();
544
- if (bytes.byteLength > maxBytes) {
545
- throw new Error(`R2 object ${key} exceeds ${maxBytes} bytes.`);
546
- }
547
- logR2Perf('get-bounded', key, startedAt, { kind, bytes: bytes.byteLength });
548
- return Buffer.from(bytes);
549
- }
@@ -57,6 +57,13 @@ export const DURABLE_RUNS_ROLLOUT = {
57
57
  /**
58
58
  * `runs resume` continues a stopped run. Off, the API refuses with
59
59
  * `resume_unavailable`; readers for resumed runs ship regardless.
60
+ *
61
+ * Turning it off again refuses new resumes and stops keeping staged input
62
+ * for runs that stop afterwards. Input already kept stays until the switch
63
+ * returns (the expiry sweep idles while off), and a resumed run keeps its
64
+ * epoch state. Stopped runs' answers are compacted again while it is off, so
65
+ * a resume after re-enabling may re-execute calls whose answers were
66
+ * compacted in between.
60
67
  */
61
- runsResume: false,
68
+ runsResume: true,
62
69
  } as const;
@@ -798,6 +798,30 @@ export type FixtureExecuteBoundaryCounts = {
798
798
  unprovenResponses: number;
799
799
  };
800
800
 
801
+ /** Test-only terminal HTTP evidence; identities are full scoped SHA-256 digests. */
802
+ export type FixtureBoundaryCompletion = {
803
+ kind: 'fixture_boundary_completion';
804
+ orgId: string;
805
+ runId: string;
806
+ logicalCallSha256: string | null;
807
+ outcome:
808
+ | 'success'
809
+ | 'other_success'
810
+ | 'released_refusal'
811
+ | 'failure'
812
+ | 'expected_failure'
813
+ | 'unproven';
814
+ };
815
+
816
+ /** Every finished counter ordinal has exactly one detail, written atomically. */
817
+ export function fixtureBoundaryCompletionPrefix(input: {
818
+ orgId: string;
819
+ runId: string;
820
+ shard: number;
821
+ }): string {
822
+ return `${fixtureRunCallCounterKey({ ...input, kind: 'boundary_finished' })}:completion:`;
823
+ }
824
+
801
825
  /** Fixture-only evidence; no provider payload, identity, or resource path. */
802
826
  export type FixtureReplaySelectionWitness = {
803
827
  kind: 'retained_response' | 'synthetic_fallback' | 'unproven';
@@ -302,14 +302,6 @@ type WorkflowInternalTokenBaseClaims = {
302
302
  v: typeof INTERNAL_BOOTSTRAP_TOKEN_VERSION;
303
303
  };
304
304
 
305
- /** Vercel deployment id shape carried by `runtime_gateway_deployment_id`. */
306
- const RUNTIME_GATEWAY_DEPLOYMENT_ID_CLAIM_PATTERN = /^dpl_[A-Za-z0-9]+$/;
307
- /**
308
- * Versioned profile id shape. Membership is checked by the gateway that serves
309
- * the profile, so a token naming a newer profile still verifies here.
310
- */
311
- const RUNTIME_GATEWAY_PROFILE_CLAIM_PATTERN = /^[a-z][a-z0-9_]*@[1-9][0-9]*$/;
312
-
313
305
  export type WorkflowRunExecutionTokenClaims =
314
306
  WorkflowInternalTokenBaseClaims & {
315
307
  purpose: typeof INTERNAL_WORKFLOW_EXECUTION_PURPOSE;
@@ -362,13 +354,6 @@ export type WorkflowRunExecutionTokenClaims =
362
354
  capabilities: RuntimeExecutionCapability[];
363
355
  /** Trusted deployment origin that issued this run token. */
364
356
  runtime_origin?: string;
365
- /**
366
- * Runtime gateway pin: the immutable app deployment (`dpl_...`) whose
367
- * in-process gateway alone may accept this token. Absent on unpinned runs.
368
- */
369
- runtime_gateway_deployment_id?: string;
370
- /** Runtime gateway profile id paired with `runtime_gateway_deployment_id`. */
371
- runtime_gateway_profile?: string;
372
357
  /** Immutable receiver advertising leased Run Ledger ingress-prefix support. */
373
358
  run_ledger_ingress_prefix_origin?: string;
374
359
  };
@@ -689,18 +674,6 @@ function isValidWorkflowClaimsShape(
689
674
  typeof claims.terminal_contract === 'string') &&
690
675
  (claims.runtime_origin === undefined ||
691
676
  isValidRuntimeOrigin(claims.runtime_origin)) &&
692
- (claims.runtime_gateway_deployment_id === undefined ||
693
- (typeof claims.runtime_gateway_deployment_id === 'string' &&
694
- RUNTIME_GATEWAY_DEPLOYMENT_ID_CLAIM_PATTERN.test(
695
- claims.runtime_gateway_deployment_id,
696
- ))) &&
697
- (claims.runtime_gateway_profile === undefined ||
698
- (typeof claims.runtime_gateway_profile === 'string' &&
699
- RUNTIME_GATEWAY_PROFILE_CLAIM_PATTERN.test(
700
- claims.runtime_gateway_profile,
701
- ))) &&
702
- (claims.runtime_gateway_deployment_id === undefined) ===
703
- (claims.runtime_gateway_profile === undefined) &&
704
677
  (claims.run_ledger_ingress_prefix_origin === undefined ||
705
678
  isValidRuntimeOrigin(claims.run_ledger_ingress_prefix_origin)) &&
706
679
  Array.isArray(claims.capabilities) &&
@@ -798,32 +771,12 @@ export async function mintWorkflowRunExecutionToken(input: {
798
771
  terminalContract?: DirectCompletedTerminalContract | null;
799
772
  capabilities?: readonly RuntimeExecutionCapability[];
800
773
  runtimeOrigin?: string | null;
801
- /** Both or neither: the pinned deployment and its gateway profile id. */
802
- runtimeGatewayDeploymentId?: string | null;
803
- runtimeGatewayProfileId?: string | null;
804
774
  runLedgerIngressPrefixOrigin?: string | null;
805
775
  subject?: string | null;
806
776
  nowMs?: number;
807
777
  }): Promise<string> {
808
778
  const fixtureBehavior = validateFixtureBehavior(input.fixtureBehavior);
809
- const runtimeGatewayDeploymentId =
810
- input.runtimeGatewayDeploymentId?.trim() || null;
811
- const runtimeGatewayProfileId = input.runtimeGatewayProfileId?.trim() || null;
812
- if (
813
- (runtimeGatewayDeploymentId === null) !==
814
- (runtimeGatewayProfileId === null) ||
815
- (runtimeGatewayDeploymentId !== null &&
816
- !RUNTIME_GATEWAY_DEPLOYMENT_ID_CLAIM_PATTERN.test(
817
- runtimeGatewayDeploymentId,
818
- )) ||
819
- (runtimeGatewayProfileId !== null &&
820
- !RUNTIME_GATEWAY_PROFILE_CLAIM_PATTERN.test(runtimeGatewayProfileId))
821
- ) {
822
- throw new Error(
823
- 'Runtime gateway token claims require a valid deployment id and profile id together.',
824
- );
825
- }
826
- if (fixtureBehavior.ok === false) throw new Error(fixtureBehavior.error);
779
+ if (!fixtureBehavior.ok) throw new Error(fixtureBehavior.error);
827
780
  if (fixtureBehavior.behavior && input.integrationMode !== 'fixture') {
828
781
  throw new Error(
829
782
  'fixtureBehavior requires workflow integration mode "fixture".',
@@ -903,12 +856,6 @@ export async function mintWorkflowRunExecutionToken(input: {
903
856
  ...(input.runtimeOrigin?.trim()
904
857
  ? { runtime_origin: new URL(input.runtimeOrigin).origin }
905
858
  : {}),
906
- ...(runtimeGatewayDeploymentId && runtimeGatewayProfileId
907
- ? {
908
- runtime_gateway_deployment_id: runtimeGatewayDeploymentId,
909
- runtime_gateway_profile: runtimeGatewayProfileId,
910
- }
911
- : {}),
912
859
  ...(input.runLedgerIngressPrefixOrigin?.trim()
913
860
  ? {
914
861
  run_ledger_ingress_prefix_origin: new URL(
@@ -73,13 +73,8 @@ export const PLAY_LAUNCH_ENVELOPE_FIELD_ROLES: {
73
73
  runLedgerExecutorToken: 'detail',
74
74
  runtimeAuthority: 'detail',
75
75
  runtimeApiBaseUrl: 'detail',
76
- // Runtime gateway pin: hosting/transport, not customer intent. The URLs,
77
- // deployment id and pin time name whichever deployment admitted the run, so
78
- // a retry of the same launch through another deployment must deduplicate to
79
- // the first admission (whose pin stands) rather than conflict. The profile
80
- // id follows them: a profile changes where gateways run, never what the run
81
- // computes, and keeping it out of the digest leaves every existing launch
82
- // digest byte-identical.
76
+ // Retired Runtime gateway pin fields (nothing writes them). A stored launch
77
+ // may still carry them, so they stay classified as detail, never identity.
83
78
  runtimeGatewayProfileId: 'detail',
84
79
  runtimeReceiptGatewayBaseUrl: 'detail',
85
80
  runtimeExecutionGatewayBaseUrl: 'detail',
@@ -247,19 +247,6 @@ export interface PlayRunnerContextConfig extends RetainedPipelineCarrier {
247
247
  */
248
248
  executionGatewayBaseUrl?: string | null;
249
249
  receiptGatewayBaseUrl?: string | null;
250
- /**
251
- * Runtime gateway profile pin (`runtime-gateway-profile.ts`). Absent on
252
- * unpinned runs. Set only by the worker from a validated launch pin; the
253
- * gateway URLs above then name the pinned deployment.
254
- */
255
- runtimeGatewayProfileId?: string | null;
256
- runtimeGatewayDeploymentId?: string | null;
257
- /** Exact origin and gateway path prefixes that may receive the OIDC token. */
258
- runtimeGatewayCredentialScope?:
259
- | import('./runtime-gateway-sandbox-credential').RuntimeGatewayCredentialScope
260
- | null;
261
- /** Short-lived edge credential for the pinned gateway; renewed by the watchdog. */
262
- runtimeGatewayOidcToken?: string | null;
263
250
  /**
264
251
  * Internal fixture-canary pin for a cordoned receipt-gateway candidate. This
265
252
  * is a signed launch fact, never a customer-authored or sandbox-supplied
@@ -229,59 +229,3 @@ export function buildAsyncPlayRequestFingerprint(input: {
229
229
  }),
230
230
  );
231
231
  }
232
-
233
- /**
234
- * Longest run id any runtime scope accepts. Play names are Postgres
235
- * identifiers (at most 63 characters), so every built id is far below it.
236
- */
237
- export const PLAY_RUN_ID_MAX_LENGTH = 256;
238
-
239
- const RUNTIME_SCOPE_RUN_ID_PATTERN = /^[A-Za-z0-9_.:@/-]+$/;
240
-
241
- /**
242
- * The one run-id check that may gate a request: a non-empty id of at most
243
- * `PLAY_RUN_ID_MAX_LENGTH` characters from the path-safe alphabet. Run ids are
244
- * path-shaped (`play/<family>/run/<suffix>`), so `/` is allowed. It is
245
- * deliberately permissive: it never parses the id, so a scheduler row with an
246
- * older or foreign id shape is still served.
247
- */
248
- export function isRuntimeScopeRunId(value: unknown): value is string {
249
- return (
250
- typeof value === 'string' &&
251
- value.length > 0 &&
252
- value.length <= PLAY_RUN_ID_MAX_LENGTH &&
253
- RUNTIME_SCOPE_RUN_ID_PATTERN.test(value)
254
- );
255
- }
256
-
257
- export type ParsedPlayRunId = Readonly<{
258
- familyKey: string;
259
- startedAtMs: number;
260
- kind: 'root' | 'caller' | 'async' | 'rerun';
261
- }>;
262
-
263
- const PLAY_RUN_ID_PATTERN =
264
- /^play\/([a-z0-9-]+(?:\/[a-z0-9-]+)*)\/run\/\d{8}t\d{6}-\d{3}(?:-[a-z0-9]{8}(-caller-[a-f0-9]{64})?|(-async-[a-f0-9]{20})|(-rerun-[a-f0-9]{20}))?$/;
265
-
266
- /**
267
- * Parse an id built by this module's builders. Diagnostic only: use
268
- * `isRuntimeScopeRunId` to admit or refuse a request.
269
- */
270
- export function parsePlayRunId(value: unknown): ParsedPlayRunId | null {
271
- if (!isRuntimeScopeRunId(value)) return null;
272
- const match = PLAY_RUN_ID_PATTERN.exec(value);
273
- if (!match) return null;
274
- const startedAtMs = canonicalPlayRunStartedAtMs(value);
275
- if (startedAtMs === null) return null;
276
- return Object.freeze({
277
- familyKey: match[1]!,
278
- startedAtMs,
279
- kind: match[2]
280
- ? 'caller'
281
- : match[3]
282
- ? 'async'
283
- : match[4]
284
- ? 'rerun'
285
- : 'root',
286
- });
287
- }
@@ -1,4 +1,3 @@
1
- import { runtimeToolPath } from '../runtime-api-paths';
2
1
  import {
3
2
  createPrebuiltBatchQualityCollector,
4
3
  measurePrebuiltResultQuality,
@@ -15,10 +14,6 @@ import { appendFileSync, createReadStream, writeFileSync } from 'node:fs';
15
14
  import { readFile } from 'node:fs/promises';
16
15
  import { dirname, isAbsolute, resolve } from 'node:path';
17
16
  import { createRequire } from 'node:module';
18
- import {
19
- installSandboxRuntimeAppTransport,
20
- sandboxRuntimeAppFetch,
21
- } from '../runtime-app-transport';
22
17
  import { createHash, randomUUID } from 'node:crypto';
23
18
  import { formatWithOptions } from 'node:util';
24
19
  import { compileFunction } from 'node:vm';
@@ -225,15 +220,13 @@ export function createReceiptGatewayResponseObserver(): {
225
220
  };
226
221
  }
227
222
 
228
- // `safeOutboundFetch` sends with node:http, not the global fetch, so the
229
- // pinned-run gateway credential is applied explicitly by the transport owner.
230
- const safeNodeOutboundFetch = sandboxRuntimeAppFetch((async (
223
+ async function safeNodeOutboundFetch(
231
224
  input: string | URL,
232
225
  init?: RequestInit,
233
- ): Promise<Response> => {
226
+ ): Promise<Response> {
234
227
  const { safeOutboundFetch } = await loadSafeOutboundFetch();
235
228
  return safeOutboundFetch(input, init);
236
- }) as typeof fetch);
229
+ }
237
230
 
238
231
  function fixtureCtxFetch(
239
232
  config: Pick<PlayRunnerExecutionConfig, 'context'>,
@@ -255,13 +248,13 @@ function fixtureCtxFetch(
255
248
  });
256
249
  }
257
250
 
258
- const safeNodeStreamingOutboundFetch = sandboxRuntimeAppFetch((async (
251
+ async function safeNodeStreamingOutboundFetch(
259
252
  input: string | URL,
260
253
  init?: RequestInit,
261
- ): Promise<Response> => {
254
+ ): Promise<Response> {
262
255
  const { safeOutboundFetch } = await loadSafeOutboundFetch();
263
256
  return safeOutboundFetch(input, init, { streamResponseBody: true });
264
- }) as typeof fetch);
257
+ }
265
258
 
266
259
  import {
267
260
  resolveSheetContractForTableNamespace,
@@ -741,7 +734,7 @@ function createRuntimeToolMetadataResolver(config: PlayRunnerExecutionConfig) {
741
734
  }
742
735
 
743
736
  const promise = (async () => {
744
- const url = `${config.context.baseUrl}${runtimeToolPath(normalizedToolId, 'metadata')}`;
737
+ const url = `${config.context.baseUrl}/api/v2/plays/runtime-tools/${encodeURIComponent(normalizedToolId)}`;
745
738
  const response = await fetchRunnerRuntimeControl({
746
739
  url,
747
740
  description: `Runtime metadata lookup for tool ${normalizedToolId}`,
@@ -790,7 +783,7 @@ export function createAppRuntimeToolAuthScopeDigestResolver(
790
783
  `Runtime auth scope lookup for tool ${normalizedToolId || '<empty>'} requires executorToken and baseUrl.`,
791
784
  );
792
785
  }
793
- const url = `${config.context.baseUrl}${runtimeToolPath(normalizedToolId, 'auth_scope')}`;
786
+ const url = `${config.context.baseUrl}/api/v2/plays/runtime-tools/${encodeURIComponent(normalizedToolId)}/auth-scope`;
794
787
  const response = await fetchRunnerRuntimeControl({
795
788
  url,
796
789
  description: `Runtime auth scope lookup for tool ${normalizedToolId}`,
@@ -889,7 +882,7 @@ export function createAppRuntimeToolAuthScopeDigestResolver(
889
882
  if (!proof) {
890
883
  proof = (async () => {
891
884
  const response = await fetchRunnerRuntimeControl({
892
- url: `${executionBase}${runtimeToolPath(normalized, 'auth_scope')}`,
885
+ url: `${executionBase}/api/v2/plays/runtime-tools/${encodeURIComponent(normalized)}/auth-scope`,
893
886
  description: `Runtime async recovery capability for tool ${normalized}`,
894
887
  retrySafe: true,
895
888
  init: {
@@ -995,7 +988,7 @@ export function createRuntimeEventWaitHandler(
995
988
  boundary: IntegrationEventWaitBoundary;
996
989
  },
997
990
  ): Promise<IntegrationEventWaitBoundary> {
998
- const url = `${config.context.baseUrl}${runtimeToolPath(normalizedToolId, 'event_wait')}`;
991
+ const url = `${config.context.baseUrl}/api/v2/plays/runtime-tools/${encodeURIComponent(normalizedToolId)}/event-wait`;
999
992
  const response = await fetchRunnerRuntimeControl({
1000
993
  url,
1001
994
  description: `Event wait runtime call for tool ${normalizedToolId}`,
@@ -4201,10 +4194,6 @@ async function main() {
4201
4194
  ? gunzipSync(configBuffer).toString('utf-8')
4202
4195
  : configBuffer.toString('utf-8');
4203
4196
  const parsedConfig = JSON.parse(configJson) as PlayRunnerExecutionConfig;
4204
- // Pinned runs only: code-owned requests to the pinned gateway origin and
4205
- // paths carry the watchdog-renewed OIDC credential. Other targets, signed
4206
- // object URLs included, are untouched. Unpinned configs install nothing.
4207
- installSandboxRuntimeAppTransport(parsedConfig.context);
4208
4197
  writeRunnerStartupDiagnostic(
4209
4198
  process.env.DEEPLINE_PLAY_RUNNER_STARTUP_DIAGNOSTIC_PATH,
4210
4199
  { phase: 'booted' },