@@ -263,6 +263,30 @@ export const LogLevel = Object.freeze({
263263 WARN : 3 , "3" : "WARN" ,
264264 ERROR : 4 , "4" : "ERROR" ,
265265} ) ;
266+ /**
267+ * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18}
268+ */
269+ export const WasmCommandType = Object . freeze ( {
270+ Input : 0 , "0" : "Input" ,
271+ Output : 1 , "1" : "Output" ,
272+ GetState : 2 , "2" : "GetState" ,
273+ GetStateKeys : 3 , "3" : "GetStateKeys" ,
274+ SetState : 4 , "4" : "SetState" ,
275+ ClearState : 5 , "5" : "ClearState" ,
276+ ClearAllState : 6 , "6" : "ClearAllState" ,
277+ GetPromise : 7 , "7" : "GetPromise" ,
278+ PeekPromise : 8 , "8" : "PeekPromise" ,
279+ CompletePromise : 9 , "9" : "CompletePromise" ,
280+ Sleep : 10 , "10" : "Sleep" ,
281+ Call : 11 , "11" : "Call" ,
282+ OneWayCall : 12 , "12" : "OneWayCall" ,
283+ SendSignal : 13 , "13" : "SendSignal" ,
284+ Run : 14 , "14" : "Run" ,
285+ AttachInvocation : 15 , "15" : "AttachInvocation" ,
286+ GetInvocationOutput : 16 , "16" : "GetInvocationOutput" ,
287+ CompleteAwakeable : 17 , "17" : "CompleteAwakeable" ,
288+ CancelInvocation : 18 , "18" : "CancelInvocation" ,
289+ } ) ;
266290
267291const WasmHeaderFinalization = ( typeof FinalizationRegistry === 'undefined' )
268292 ? { register : ( ) => { } , unregister : ( ) => { } }
@@ -567,6 +591,34 @@ export class WasmVM {
567591 var len1 = WASM_VECTOR_LEN ;
568592 wasm . wasmvm_notify_error ( this . __wbg_ptr , ptr0 , len0 , ptr1 , len1 ) ;
569593 }
594+ /**
595+ * @param {string } error_message
596+ * @param {string | null | undefined } stacktrace
597+ * @param {WasmCommandType } wasm_command_type
598+ */
599+ notify_error_for_next_command ( error_message , stacktrace , wasm_command_type ) {
600+ const ptr0 = passStringToWasm0 ( error_message , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
601+ const len0 = WASM_VECTOR_LEN ;
602+ var ptr1 = isLikeNone ( stacktrace ) ? 0 : passStringToWasm0 ( stacktrace , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
603+ var len1 = WASM_VECTOR_LEN ;
604+ wasm . wasmvm_notify_error_for_next_command ( this . __wbg_ptr , ptr0 , len0 , ptr1 , len1 , wasm_command_type ) ;
605+ }
606+ /**
607+ * @param {string } error_message
608+ * @param {string | null | undefined } stacktrace
609+ * @param {WasmCommandType } wasm_command_type
610+ * @param {number } command_index
611+ * @param {string | null } [command_name]
612+ */
613+ notify_error_for_specific_command ( error_message , stacktrace , wasm_command_type , command_index , command_name ) {
614+ const ptr0 = passStringToWasm0 ( error_message , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
615+ const len0 = WASM_VECTOR_LEN ;
616+ var ptr1 = isLikeNone ( stacktrace ) ? 0 : passStringToWasm0 ( stacktrace , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
617+ var len1 = WASM_VECTOR_LEN ;
618+ var ptr2 = isLikeNone ( command_name ) ? 0 : passStringToWasm0 ( command_name , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
619+ var len2 = WASM_VECTOR_LEN ;
620+ wasm . wasmvm_notify_error_for_specific_command ( this . __wbg_ptr , ptr0 , len0 , ptr1 , len1 , wasm_command_type , command_index , ptr2 , len2 ) ;
621+ }
570622 /**
571623 * @returns {any }
572624 */
@@ -906,14 +958,14 @@ export class WasmVM {
906958 * @param {string } error_message
907959 * @param {string | null | undefined } error_stacktrace
908960 * @param {bigint } attempt_duration
909- * @param {WasmExponentialRetryConfig } config
961+ * @param {WasmExponentialRetryConfig | null } [ config]
910962 */
911963 propose_run_completion_failure_transient ( handle , error_message , error_stacktrace , attempt_duration , config ) {
912964 const ptr0 = passStringToWasm0 ( error_message , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
913965 const len0 = WASM_VECTOR_LEN ;
914966 var ptr1 = isLikeNone ( error_stacktrace ) ? 0 : passStringToWasm0 ( error_stacktrace , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
915967 var len1 = WASM_VECTOR_LEN ;
916- const ret = wasm . wasmvm_propose_run_completion_failure_transient ( this . __wbg_ptr , handle , ptr0 , len0 , ptr1 , len1 , attempt_duration , config ) ;
968+ const ret = wasm . wasmvm_propose_run_completion_failure_transient ( this . __wbg_ptr , handle , ptr0 , len0 , ptr1 , len1 , attempt_duration , isLikeNone ( config ) ? 0 : addToExternrefTable0 ( config ) ) ;
917969 if ( ret [ 1 ] ) {
918970 throw takeFromExternrefTable0 ( ret [ 0 ] ) ;
919971 }
@@ -962,6 +1014,13 @@ export class WasmVM {
9621014 const ret = wasm . wasmvm_is_processing ( this . __wbg_ptr ) ;
9631015 return ret !== 0 ;
9641016 }
1017+ /**
1018+ * @returns {number }
1019+ */
1020+ last_command_index ( ) {
1021+ const ret = wasm . wasmvm_last_command_index ( this . __wbg_ptr ) ;
1022+ return ret ;
1023+ }
9651024}
9661025
9671026export function __wbg_String_eecc4a11987127d6 ( arg0 , arg1 ) {
0 commit comments