@@ -1540,7 +1540,7 @@ async function handleVerb(verb, req, res) {
15401540 } ;
15411541
15421542 try {
1543- const execution = normalizeExecutionEnvelope ( req . body ?. execution , verb ) ;
1543+ const execution = normalizeExecutionEnvelope ( req . body ?. execution ?? req . body , verb ) ;
15441544 warmValidatorForVerb ( execution . verb ) ;
15451545
15461546 const callerTimeout = Number ( req . body ?. limits ?. timeout_ms || req . body ?. limits ?. max_latency_ms || 0 ) ;
@@ -1566,7 +1566,7 @@ async function handleVerb(verb, req, res) {
15661566 }
15671567
15681568 } catch ( e ) {
1569- const execution = normalizeExecutionEnvelope ( req . body ?. execution , verb ) ;
1569+ const execution = normalizeExecutionEnvelope ( req . body ?. execution ?? req . body , verb ) ;
15701570 warmValidatorForVerb ( execution . verb ) ;
15711571
15721572 const actor = req . body ?. actor
@@ -2025,10 +2025,20 @@ app.post("/verify", async (req, res) => {
20252025// verb routes
20262026// -----------------------
20272027app . post ( "/execute" , ( req , res ) => {
2028- const resolvedVerb = String ( req . body ?. execution ?. verb || req . body ?. verb || "" ) . trim ( ) ;
2028+ const body = req . body && typeof req . body === "object" ? req . body : { } ;
2029+ const execution = body . execution && typeof body . execution === "object" ? body . execution : body ;
2030+ const resolvedVerb = String ( execution . verb || body . verb || "" ) . trim ( ) ;
2031+
20292032 if ( ! resolvedVerb ) {
20302033 return res . status ( 400 ) . json ( { ok : false , error : "missing_verb" , message : "execution.verb or verb is required" , ...instancePayload ( ) } ) ;
20312034 }
2035+
2036+ req . body = {
2037+ ...body ,
2038+ ...execution ,
2039+ verb : resolvedVerb ,
2040+ } ;
2041+
20322042 return handleVerb ( resolvedVerb , req , res ) ;
20332043} ) ;
20342044
0 commit comments