@@ -724,6 +724,13 @@ export class Activator implements ActivationHandler {
724724 throw new TypeError ( `Cannot use update name: '${ name } ', with reserved prefix: '${ TEMPORAL_RESERVED_PREFIX } '` ) ;
725725 }
726726
727+ // Skip interceptors if it's an internal update.
728+ const isInternalUpdate =
729+ name . startsWith ( TEMPORAL_RESERVED_PREFIX ) ||
730+ name === STACK_TRACE_RESERVED_NAME ||
731+ name === ENHANCED_STACK_TRACE_RESERVED_NAME ;
732+ const interceptors = isInternalUpdate ? [ ] : this . interceptors . inbound ;
733+
727734 const entry =
728735 this . updateHandlers . get ( name ) ??
729736 ( this . defaultUpdateHandler
@@ -780,7 +787,7 @@ export class Activator implements ActivationHandler {
780787 try {
781788 if ( runValidator && entry . validator ) {
782789 const validate = composeInterceptors (
783- this . interceptors . inbound ,
790+ interceptors ,
784791 'validateUpdate' ,
785792 this . validateUpdateNextHandler . bind ( this , entry . validator )
786793 ) ;
@@ -793,7 +800,7 @@ export class Activator implements ActivationHandler {
793800 }
794801 this . acceptUpdate ( protocolInstanceId ) ;
795802 const execute = composeInterceptors (
796- this . interceptors . inbound ,
803+ interceptors ,
797804 'handleUpdate' ,
798805 this . updateNextHandler . bind ( this , entry . handler )
799806 ) ;
@@ -883,6 +890,13 @@ export class Activator implements ActivationHandler {
883890 ) ;
884891 }
885892
893+ // Skip interceptors if it's an internal signal.
894+ const isInternalSignal =
895+ signalName . startsWith ( TEMPORAL_RESERVED_PREFIX ) ||
896+ signalName === STACK_TRACE_RESERVED_NAME ||
897+ signalName === ENHANCED_STACK_TRACE_RESERVED_NAME ;
898+ const interceptors = isInternalSignal ? [ ] : this . interceptors . inbound ;
899+
886900 if ( ! this . signalHandlers . has ( signalName ) && ! this . defaultSignalHandler ) {
887901 this . bufferedSignals . push ( activation ) ;
888902 return ;
@@ -896,11 +910,7 @@ export class Activator implements ActivationHandler {
896910
897911 const signalExecutionNum = this . signalHandlerExecutionSeq ++ ;
898912 this . inProgressSignals . set ( signalExecutionNum , { name : signalName , unfinishedPolicy } ) ;
899- const execute = composeInterceptors (
900- this . interceptors . inbound ,
901- 'handleSignal' ,
902- this . signalWorkflowNextHandler . bind ( this )
903- ) ;
913+ const execute = composeInterceptors ( interceptors , 'handleSignal' , this . signalWorkflowNextHandler . bind ( this ) ) ;
904914 execute ( {
905915 args : arrayFromPayloads ( this . payloadConverter , activation . input ) ,
906916 signalName,
0 commit comments