@@ -1409,7 +1409,7 @@ describe('ZeebeVariableResolver', function() {
14091409 ] ,
14101410 scope : 'ai-agent-chat-with-tools'
14111411 } ,
1412- { name : 'toolCallResults' , origin : [ 'AI_Agent' ] , scope : 'AI_Agent ' } ,
1412+ { name : 'toolCallResults' , origin : [ 'AI_Agent' ] , scope : 'ai-agent-chat-with-tools ' } ,
14131413 {
14141414 name : 'data' ,
14151415 scope : 'AI_Agent' ,
@@ -1520,6 +1520,7 @@ describe('ZeebeVariableResolver', function() {
15201520
15211521 // then
15221522 expect ( variables ) . to . variableEqual ( [
1523+ { name : 'toolCallResults' , scope : 'ai-agent-chat-with-tools' } ,
15231524 { name : 'toolCallResult' , scope : 'ai-agent-chat-with-tools' } ,
15241525 { name : 'agent' , origin : [ 'AI_Agent' ] , scope : 'ai-agent-chat-with-tools' }
15251526 ] ) ;
@@ -1581,7 +1582,7 @@ describe('ZeebeVariableResolver', function() {
15811582 ) ;
15821583
15831584
1584- it ( 'should expose only <agent> to process' , inject ( async function ( variableResolver , elementRegistry ) {
1585+ it ( 'should expose <agent> and <toolCallResults > to process' , inject ( async function ( variableResolver , elementRegistry ) {
15851586
15861587 // given
15871588 const root = elementRegistry . get ( 'ai-agent-chat-with-tools' ) ;
@@ -1591,7 +1592,10 @@ describe('ZeebeVariableResolver', function() {
15911592
15921593 // then
15931594 expect ( variables ) . to . variableEqual ( [
1594- { name : 'agent' , origin : [ 'AI_Agent' ] , scope : 'ai-agent-chat-with-tools' }
1595+ { name : 'agent' , origin : [ 'AI_Agent' ] , scope : 'ai-agent-chat-with-tools' } ,
1596+
1597+ // leaks to parent, no way to prevent that
1598+ { name : 'toolCallResults' , origin : [ 'AI_Agent' ] , scope : 'ai-agent-chat-with-tools' }
15951599 ] ) ;
15961600 } ) ) ;
15971601
0 commit comments