@picoflow/core 1.0.19 → 1.0.20
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.
- package/clients/http-client.js +1 -1
- package/clients/self-client.js +1 -1
- package/configs/core-config.js +1 -1
- package/decorators/stop-tool.js +1 -1
- package/flow/content-type.js +1 -1
- package/flow/end-step.js +1 -1
- package/flow/flow-creator.js +1 -1
- package/flow/flow-types.js +1 -1
- package/flow/flow.js +1 -1
- package/flow/llm-runner.js +1 -1
- package/flow/logic-runner.js +1 -1
- package/flow/logic-step.js +1 -1
- package/flow/memory.js +1 -1
- package/flow/step.d.ts +2 -2
- package/flow/step.js +1 -1
- package/index.js +33 -32
- package/models/default-models.js +1 -1
- package/models/model-registry.js +1 -1
- package/package.json +1 -1
- package/prompt/flow-prompt.js +1 -1
- package/prompt/prompt-util.js +1 -1
- package/services/flow-engine.js +1 -1
- package/session/cosmo-session.js +1 -1
- package/session/file-session.js +1 -1
- package/session/flow-session.js +1 -1
- package/session/mongo-session.js +1 -1
- package/session/session-adaptor.js +1 -1
- package/session/session-logger.js +1 -1
- package/session/sqlite-session.js +1 -1
- package/utils/constants.js +1 -1
- package/utils/environ.js +1 -1
- package/utils/errors.js +1 -1
- package/utils/license-util.js +1 -1
- package/utils/llm-file.js +1 -1
- package/utils/logic.js +1 -1
- package/utils/message-util.js +1 -1
- package/utils/retry.js +1 -1
- package/utils/string-util.js +1 -1
- package/utils/tool-util.js +1 -1
- package/utils/verify-license.js +1 -1
package/flow/llm-runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a9_0x1cdb4c=a9_0x352c;(function(_0x4d1ef1,_0x4384bc){const _0x3dcbde=a9_0x352c,_0x38ce73=_0x4d1ef1();while(!![]){try{const _0x4d81fd=-parseInt(_0x3dcbde(0x218))/0x1+-parseInt(_0x3dcbde(0x243))/0x2+parseInt(_0x3dcbde(0x286))/0x3*(-parseInt(_0x3dcbde(0x223))/0x4)+parseInt(_0x3dcbde(0x23f))/0x5+-parseInt(_0x3dcbde(0x1f7))/0x6+parseInt(_0x3dcbde(0x260))/0x7*(parseInt(_0x3dcbde(0x219))/0x8)+parseInt(_0x3dcbde(0x246))/0x9;if(_0x4d81fd===_0x4384bc)break;else _0x38ce73['push'](_0x38ce73['shift']());}catch(_0x4f65e9){_0x38ce73['push'](_0x38ce73['shift']());}}}(a9_0x2971,0xf2d41));const a9_0x1d13f0=(function(){let _0x4a4a64=!![];return function(_0x28fa17,_0x516cae){const _0x1f968c=_0x4a4a64?function(){const _0x31c6a7=a9_0x352c;if(_0x516cae){const _0x15fb76=_0x516cae[_0x31c6a7(0x278)](_0x28fa17,arguments);return _0x516cae=null,_0x15fb76;}}:function(){};return _0x4a4a64=![],_0x1f968c;};}()),a9_0x330507=a9_0x1d13f0(this,function(){const _0x6be996=a9_0x352c,_0x4637b7={'NtZWT':_0x6be996(0x293)};return a9_0x330507[_0x6be996(0x22c)]()['search'](_0x6be996(0x293))[_0x6be996(0x22c)]()[_0x6be996(0x225)](a9_0x330507)['search'](_0x4637b7[_0x6be996(0x23c)]);});a9_0x330507();'use strict';Object[a9_0x1cdb4c(0x27d)](exports,a9_0x1cdb4c(0x205),{'value':!![]}),exports['LlmRunner']=void 0x0;const messages_1=require(a9_0x1cdb4c(0x272)),message_util_1=require(a9_0x1cdb4c(0x229)),tool_util_1=require(a9_0x1cdb4c(0x239)),session_logger_1=require('../session/session-logger'),core_config_1=require(a9_0x1cdb4c(0x241)),message_util_2=require(a9_0x1cdb4c(0x229)),logic_runner_1=require(a9_0x1cdb4c(0x258)),retry_1=require(a9_0x1cdb4c(0x27e)),verify_license_1=require(a9_0x1cdb4c(0x295)),lodash_1=require(a9_0x1cdb4c(0x22f));class LlmRunner{static async[a9_0x1cdb4c(0x279)](_0x2e97e1,_0x57b7d2,_0x285405){const _0x457e1d=a9_0x1cdb4c,_0x18415e={'wYByH':_0x457e1d(0x22d),'hkere':function(_0x5b34fa,_0x141b4c){return _0x5b34fa>=_0x141b4c;},'WqCtS':'Follow\x20system\x20prompt\x20and\x20respond\x20properly.','IjfBX':_0x457e1d(0x234),'NwHGa':function(_0x2def8d,_0x2c29fa){return _0x2def8d===_0x2c29fa;},'EdApH':_0x457e1d(0x28a),'tFIjX':_0x457e1d(0x23e),'rgOtu':function(_0x47f1fb,_0x265776){return _0x47f1fb===_0x265776;},'RkdFV':function(_0x4eadf5,_0x2648e9){return _0x4eadf5!==_0x2648e9;},'cRrwq':'GXFYi','PRoQB':function(_0xcfc7c8,_0x2546a5){return _0xcfc7c8===_0x2546a5;},'CUPlw':_0x457e1d(0x297),'jGgwl':_0x457e1d(0x22e)};(0x0,verify_license_1[_0x457e1d(0x25a)])(core_config_1['CoreConfig'][_0x457e1d(0x292)]);let _0x3b2db6;const _0x466541=_0x2e97e1['getActiveStep'](),_0xfc8f41=_0x466541[_0x457e1d(0x27a)](),_0xc652c2=_0x2e97e1['getFlowEngine']()['getModel'](_0xfc8f41),_0x4597c4=_0x2e97e1['getModelParamsModelName']();if(_0x18415e[_0x457e1d(0x28c)](_0xfc8f41,_0x2e97e1[_0x457e1d(0x27a)]())&&_0x4597c4&&_0x18415e[_0x457e1d(0x262)](_0x4597c4,_0xfc8f41))throw new Error(_0x457e1d(0x299)+_0x2e97e1['constructor'][_0x457e1d(0x203)]+_0x457e1d(0x268)+_0x4597c4+_0x457e1d(0x26f)+_0xfc8f41+'\x27.');const _0x158d21=_0x466541['getModelParamsModelName']();if(_0x158d21&&_0x158d21!==_0xfc8f41)throw new Error('Step\x20\x27'+_0x466541['getName']()+_0x457e1d(0x268)+_0x158d21+_0x457e1d(0x26f)+_0xfc8f41+'\x27.');const _0x50b112=_0x18415e[_0x457e1d(0x211)](_0x466541[_0x457e1d(0x27a)](),_0x2e97e1[_0x457e1d(0x27a)]())?(0x0,lodash_1[_0x457e1d(0x287)])({},_0x2e97e1[_0x457e1d(0x209)](),_0x466541['getModelParams']()):(0x0,lodash_1['merge'])({},_0x466541[_0x457e1d(0x209)]()),_0x26a938=(0x0,lodash_1[_0x457e1d(0x287)])({},_0x50b112);_0x18415e[_0x457e1d(0x28c)](typeof _0x26a938[_0x457e1d(0x28d)],_0x457e1d(0x227))&&!_0xc652c2[_0x457e1d(0x24a)]()&&(new session_logger_1[(_0x457e1d(0x212))](_0x2e97e1[_0x457e1d(0x242)]())[_0x457e1d(0x24d)](_0x457e1d(0x20a)+_0xc652c2[_0x457e1d(0x203)]+'\x27.'),delete _0x26a938['temperature']);const _0x11930b=_0x466541[_0x457e1d(0x296)]();_0x18415e['RkdFV'](_0x57b7d2[_0x457e1d(0x20d)](),_0x466541[_0x457e1d(0x20d)]())&&(await _0x2e97e1['saveSession'](),_0x285405=_0x466541[_0x457e1d(0x221)](_0x285405,_0x57b7d2[_0x457e1d(0x20d)]()));if(_0x466541[_0x457e1d(0x1f8)]())return logic_runner_1[_0x457e1d(0x261)]['send'](_0x2e97e1,_0x57b7d2);let _0xbe6bc4=_0xc652c2[_0x457e1d(0x1fe)](_0x26a938),_0x1ce4ac=_0x466541['obtainTools']()??[];const _0xb8369e=await _0x466541['getPrompt']();_0x11930b[0x0]=new messages_1[(_0x457e1d(0x21c))]({'content':_0xb8369e,'id':_0x466541[_0x457e1d(0x237)]()});if(_0x285405){if(_0x18415e[_0x457e1d(0x211)]('GXFYi',_0x18415e['cRrwq'])){const _0x11be29=_0x11930b[_0x11930b['length']-0x1];!message_util_1[_0x457e1d(0x213)][_0x457e1d(0x24e)](_0x11be29,_0x285405)&&_0x11930b[_0x457e1d(0x208)](_0x285405);}else return _0x18415e[_0x457e1d(0x206)];}const _0x3b8be6=_0x285405?.['additional_kwargs'][_0x457e1d(0x21b)];_0x3b8be6&&(_0x1ce4ac=[]);_0xbe6bc4=_0xc652c2[_0x457e1d(0x21e)](_0xbe6bc4,_0x1ce4ac);const _0x2f3fc2=_0x466541[_0x457e1d(0x259)]();return _0x2f3fc2&&(_0x18415e['PRoQB'](_0x18415e[_0x457e1d(0x25f)],_0x18415e[_0x457e1d(0x1fc)])?_0x2a5f8a=new _0x344875[(_0x457e1d(0x20c))](_0x23bfa7,_0x189161,_0x1937e3['tool']):_0xbe6bc4=_0xbe6bc4[_0x457e1d(0x1ff)](_0x2f3fc2)),LlmRunner[_0x457e1d(0x250)](_0xc652c2[_0x457e1d(0x251)],_0x466541,_0x11930b),_0x3b2db6=await retry_1[_0x457e1d(0x228)][_0x457e1d(0x257)]({'maxRetries':core_config_1[_0x457e1d(0x269)]['llmRetry'],'delayMs':0x1f4,'onMain':async()=>{const _0x419a6b=_0x457e1d;_0x3b2db6=await _0xbe6bc4[_0x419a6b(0x27c)](_0x11930b);const _0x2b0baf=_0x3b2db6[_0x419a6b(0x23d)];return _0x2e97e1[_0x419a6b(0x201)](_0x2b0baf),_0x3b2db6;},'onWarn':(_0xe42331,_0x3a5dbf,_0x12045c)=>{const _0x558b4e=_0x457e1d;if(_0x558b4e(0x1f5)!==_0x18415e[_0x558b4e(0x282)])new session_logger_1[(_0x558b4e(0x212))](_0x2e97e1[_0x558b4e(0x242)]())[_0x558b4e(0x24d)](_0x558b4e(0x230)+_0xe42331+_0x558b4e(0x24f)+_0x3a5dbf+'.\x20Error:'+(_0x12045c?_0x12045c['message']:_0x558b4e(0x22d)));else return _0x1241a6[_0x558b4e(0x235)](_0x418ce2)?(_0x4bda22[_0x558b4e(0x20f)](),_0x18415e[_0x558b4e(0x284)](_0x4d3475,0x2)&&_0x3969c3[_0x558b4e(0x20f)](),_0x2999ad[_0x558b4e(0x208)](new _0x107750['HumanMessage']({'content':_0x18415e[_0x558b4e(0x20e)],'id':_0x13c7c6[_0x558b4e(0x237)]()})),!![]):_0x50a58c[_0x558b4e(0x1fb)](_0x538562);},'shouldRetry':(_0x43e52b,_0x390ca3)=>{const _0x5e3680=_0x457e1d;return LlmRunner['isBotMessageEmpty'](_0x43e52b)?_0x18415e[_0x5e3680(0x211)](_0x5e3680(0x29c),_0x18415e[_0x5e3680(0x267)])?_0x16ecad['LogicRunner'][_0x5e3680(0x279)](_0x513ac1,_0x325b0b):(_0x11930b[_0x5e3680(0x20f)](),_0x18415e[_0x5e3680(0x284)](_0x390ca3,0x2)&&_0x11930b[_0x5e3680(0x20f)](),_0x11930b[_0x5e3680(0x208)](new messages_1[(_0x5e3680(0x210))]({'content':_0x18415e[_0x5e3680(0x20e)],'id':_0x466541[_0x5e3680(0x237)]()})),!![]):_0x466541[_0x5e3680(0x1fb)](_0x43e52b);},'onFinalError':_0x4f59bc=>{const _0x58d084=_0x457e1d;if(_0x18415e[_0x58d084(0x29b)]===_0x18415e[_0x58d084(0x29b)])throw new Error(_0x58d084(0x25b)+LlmRunner['getReason'](_0x3b2db6)+'.\x20Error:'+(_0x4f59bc?_0x4f59bc[_0x58d084(0x27f)]:_0x18415e[_0x58d084(0x206)]));else _0x2cbdf3=_0x34737e[_0x58d084(0x26a)][_0x58d084(0x273)];}}),await LlmRunner[_0x457e1d(0x200)](_0x2e97e1,_0x3b2db6,_0x57b7d2);}static async[a9_0x1cdb4c(0x200)](_0x21f0c4,_0x336bdc,_0x23e13d){const _0x4af152=a9_0x1cdb4c,_0x1aeae2={'QOlRX':_0x4af152(0x1f9),'MkXiA':function(_0x23dcaa,_0x47c469){return _0x23dcaa in _0x47c469;},'uvKOZ':_0x4af152(0x240),'MfzOA':function(_0x45f884,_0x4a6bbf){return _0x45f884===_0x4a6bbf;}};(0x0,verify_license_1[_0x4af152(0x25a)])(core_config_1[_0x4af152(0x269)][_0x4af152(0x292)]);const _0x4bf24b=_0x21f0c4[_0x4af152(0x236)]();if(_0x4bf24b[_0x4af152(0x1f8)]())return logic_runner_1[_0x4af152(0x261)][_0x4af152(0x279)](_0x21f0c4,_0x23e13d);const _0x18533e=_0x4bf24b[_0x4af152(0x296)]();if(tool_util_1['ToolUtil'][_0x4af152(0x281)](_0x336bdc)){const _0x1bb865=await LlmRunner[_0x4af152(0x264)](_0x4bf24b,_0x21f0c4,_0x336bdc?.[_0x4af152(0x274)]),_0x13d157=new message_util_2[(_0x4af152(0x23b))](_0x4bf24b,_0x336bdc[_0x4af152(0x274)]);return _0x18533e[_0x4af152(0x208)](_0x13d157),LlmRunner[_0x4af152(0x29e)](_0x21f0c4,_0x4bf24b,_0x336bdc[_0x4af152(0x274)],_0x1bb865,_0x23e13d);}else{if(_0x1aeae2['QOlRX']===_0x1aeae2['QOlRX']){const _0x51801a=_0x336bdc&&_0x1aeae2[_0x4af152(0x266)](_0x1aeae2['uvKOZ'],_0x336bdc)?message_util_1['MessageUtil'][_0x4af152(0x26d)](_0x336bdc[_0x4af152(0x240)]):_0x336bdc,_0x14db4e=await _0x4bf24b['onResponse'](_0x51801a);if(_0x1aeae2[_0x4af152(0x29a)](typeof _0x14db4e,_0x4af152(0x265))){const _0x3b2200=_0x14db4e;return await _0x21f0c4[_0x4af152(0x290)](_0x3b2200),await LlmRunner[_0x4af152(0x279)](_0x21f0c4,_0x23e13d);}else{const _0x37f590=message_util_1['MessageUtil'][_0x4af152(0x26d)](_0x14db4e);return _0x18533e['push'](new messages_1[(_0x4af152(0x207))]({'content':_0x37f590,'id':_0x4bf24b[_0x4af152(0x237)]()})),_0x37f590;}}else new _0xe38505[(_0x4af152(0x212))](_0x54269e[_0x4af152(0x242)]())[_0x4af152(0x24d)]('hallucinated\x20tool:\x20'+_0xdf15c9['name']),_0x5123b9=new _0x12e3d8['ToolMessageInfo'](_0x6705bf,_0x250abf,_0x4af152(0x27b)+_0x427033[_0x4af152(0x203)]);}}static async[a9_0x1cdb4c(0x29e)](_0x319c53,_0x3e2c2d,_0x25c85e,_0x3aca96,_0x51c0a3){const _0x22c1fb=a9_0x1cdb4c,_0xa19096={'kXrgB':'(((.+)+)+)+$','kpyqk':function(_0x2425c8){return _0x2425c8();},'hejbk':function(_0x169c9d,_0x222e70){return _0x169c9d===_0x222e70;},'bDnGK':_0x22c1fb(0x28f),'pPhWz':function(_0xaaad50,_0x51567d){return _0xaaad50===_0x51567d;},'LRJSP':_0x22c1fb(0x254),'wOBKO':function(_0x1fb72f,_0xd8749d){return _0x1fb72f===_0xd8749d;},'ffHAP':'ExedH','YptJR':_0x22c1fb(0x271)},_0x19cc54=_0xa19096[_0x22c1fb(0x289)](Array);for(const _0x511e10 of _0x25c85e){let _0x392a29=![];for(const _0x26b732 of _0x3aca96){_0xa19096[_0x22c1fb(0x215)](_0x26b732[_0x22c1fb(0x28e)],_0xa19096[_0x22c1fb(0x232)])&&_0xa19096['pPhWz'](_0x511e10['id'],_0x26b732['tool_call_id'])&&(_0x392a29=!![],_0x19cc54['push'](_0x26b732));}if(!_0x392a29){const _0x123a37=new message_util_2[(_0x22c1fb(0x244))](_0x3e2c2d,_0x511e10);_0x19cc54[_0x22c1fb(0x208)](_0x123a37);}}const _0xa29d3c=_0x3e2c2d[_0x22c1fb(0x296)]();_0xa29d3c[_0x22c1fb(0x208)](..._0x19cc54);for(const _0x121c0d of _0x3aca96){if(_0x121c0d[_0x22c1fb(0x28e)]==='ai'){if(_0xa19096[_0x22c1fb(0x215)](_0x22c1fb(0x29d),_0x22c1fb(0x224)))return _0x3a0cc4[_0x22c1fb(0x261)][_0x22c1fb(0x279)](_0x2004d0,_0x146271);else{const _0x2fece3=_0x121c0d[_0x22c1fb(0x233)][_0x22c1fb(0x26c)];if(_0x2fece3){if('QyxLZ'!==_0xa19096['LRJSP'])return _0xa29d3c[_0x22c1fb(0x208)](_0x121c0d),message_util_1[_0x22c1fb(0x213)][_0x22c1fb(0x26d)](_0x121c0d['content']);else{const _0x3064ee=_0xe063f0['MessageUtil'][_0x22c1fb(0x26d)](_0x5179a8?.[_0x22c1fb(0x240)]);if(!_0x3064ee[_0x22c1fb(0x25d)]())return!![];}}}}}for(const _0x1bbeca of _0x3aca96){if(_0xa19096[_0x22c1fb(0x222)](_0x1bbeca['type'],_0x22c1fb(0x20b)))return _0xa19096[_0x22c1fb(0x215)](_0xa19096[_0x22c1fb(0x283)],_0xa19096[_0x22c1fb(0x1f6)])?_0x325874[_0x22c1fb(0x22c)]()[_0x22c1fb(0x21f)](_0x22c1fb(0x293))[_0x22c1fb(0x22c)]()[_0x22c1fb(0x225)](_0x458c1d)[_0x22c1fb(0x21f)](uZkMiq[_0x22c1fb(0x248)]):await LlmRunner[_0x22c1fb(0x279)](_0x319c53,_0x51c0a3,_0x1bbeca);}return await LlmRunner[_0x22c1fb(0x279)](_0x319c53,_0x51c0a3);}static async[a9_0x1cdb4c(0x264)](_0x5d31ac,_0x566bbe,_0x59c99e){const _0x1aa012=a9_0x1cdb4c,_0x488bde={'GgQHp':function(_0x2bd5d5,_0x45367c){return _0x2bd5d5===_0x45367c;},'uTPLl':_0x1aa012(0x265),'qsdWE':function(_0x41b46b,_0x3a6dd){return _0x41b46b===_0x3a6dd;},'iljzq':function(_0xa43a00,_0x5d6068){return _0xa43a00 in _0x5d6068;},'IRzqs':_0x1aa012(0x263),'RoHat':'string','HxFrl':function(_0x410cc3,_0x2cb594){return _0x410cc3!==_0x2cb594;},'uOLwF':_0x1aa012(0x249),'MuBdF':_0x1aa012(0x1f2),'ddDCL':function(_0x480e8b,_0x3d5009){return _0x480e8b===_0x3d5009;},'XXThW':'MELKl','XyOTR':_0x1aa012(0x23a),'iFAIH':_0x1aa012(0x28f),'aKESa':_0x1aa012(0x27f),'MDJjD':function(_0x500cdd,_0x53fd1e){return _0x500cdd!==_0x53fd1e;},'xlUrH':_0x1aa012(0x21a)},_0x36ef04=new Array();for(const _0x4ddf05 of _0x59c99e){if(_0x1aa012(0x1fd)==='KmcDv'){let _0x44bd87;if(_0x488bde[_0x1aa012(0x256)](typeof _0x5d31ac[_0x4ddf05[_0x1aa012(0x203)]],_0x488bde[_0x1aa012(0x217)])){const _0x57c6e6=await _0x5d31ac[_0x4ddf05['name']](_0x4ddf05);if(_0x488bde[_0x1aa012(0x256)](typeof _0x57c6e6,_0x1aa012(0x294)))await _0x566bbe[_0x1aa012(0x280)](_0x57c6e6),_0x36ef04['push'](new message_util_2[(_0x1aa012(0x244))](_0x5d31ac,_0x4ddf05));else{if(_0x488bde[_0x1aa012(0x214)](typeof _0x57c6e6,_0x488bde[_0x1aa012(0x217)]))await _0x566bbe[_0x1aa012(0x290)](_0x57c6e6),_0x36ef04[_0x1aa012(0x208)](new message_util_2[(_0x1aa012(0x244))](_0x5d31ac,_0x4ddf05));else{if(_0x57c6e6&&_0x488bde[_0x1aa012(0x26e)](_0x488bde[_0x1aa012(0x253)],_0x57c6e6)){let _0x5d0853;if(typeof _0x57c6e6[_0x1aa012(0x263)]===_0x488bde[_0x1aa012(0x247)])_0x488bde[_0x1aa012(0x277)](_0x488bde['uOLwF'],_0x1aa012(0x249))?_0x4c0ed0=_0x2f230d[_0x1aa012(0x1ff)](_0x4837d7):_0x5d0853=await _0x566bbe[_0x1aa012(0x280)](_0x57c6e6[_0x1aa012(0x263)]);else{if(_0x488bde[_0x1aa012(0x277)](_0x488bde[_0x1aa012(0x220)],_0x488bde['MuBdF'])){const _0x4de706=new _0x11ef13[(_0x1aa012(0x244))](_0x29bcda,_0x58f280);_0x54692f[_0x1aa012(0x208)](_0x4de706);}else _0x5d0853=await _0x566bbe['activate'](_0x57c6e6['step']);}if(_0x57c6e6[_0x1aa012(0x291)]){if(_0x488bde[_0x1aa012(0x22b)](_0x488bde[_0x1aa012(0x24c)],_0x488bde['XXThW']))_0x5d0853[_0x1aa012(0x1fa)]({'_prompt':_0x57c6e6[_0x1aa012(0x291)]});else return!![];}if(_0x57c6e6[_0x1aa012(0x202)]){if(_0x488bde[_0x1aa012(0x22a)]!==_0x488bde[_0x1aa012(0x22a)])throw new _0x20277d(_0x1aa012(0x299)+_0x57d2b4['constructor'][_0x1aa012(0x203)]+'\x27\x20model\x20params\x20target\x20\x27'+_0xe5a1b2+'\x27\x20does\x20not\x20match\x20resolved\x20model\x20\x27'+_0x40d489+'\x27.');else _0x5d0853['saveState'](_0x57c6e6['state']);}_0x57c6e6[_0x1aa012(0x1f1)]&&(_0x5d0853[_0x1aa012(0x1f1)]=_0x57c6e6[_0x1aa012(0x1f1)]),_0x57c6e6[_0x1aa012(0x28f)]?_0x44bd87=new message_util_1[(_0x1aa012(0x20c))](_0x5d0853,_0x4ddf05,_0x57c6e6[_0x488bde['iFAIH']]):_0x44bd87=new message_util_2[(_0x1aa012(0x244))](_0x5d31ac,_0x4ddf05),_0x36ef04[_0x1aa012(0x208)](_0x44bd87),_0x57c6e6[_0x488bde['aKESa']]&&_0x36ef04[_0x1aa012(0x208)](_0x57c6e6[_0x488bde[_0x1aa012(0x25e)]]);}}}}else{if(_0x5d31ac[_0x1aa012(0x252)](_0x4ddf05[_0x1aa012(0x203)]))new session_logger_1[(_0x1aa012(0x212))](_0x566bbe[_0x1aa012(0x242)]())[_0x1aa012(0x24d)](_0x1aa012(0x276)+_0x4ddf05['name']),_0x44bd87=new message_util_2[(_0x1aa012(0x244))](_0x5d31ac,_0x4ddf05);else{if(_0x488bde[_0x1aa012(0x238)](_0x488bde[_0x1aa012(0x288)],_0x488bde[_0x1aa012(0x288)])){const _0x2b0d44=_0x58dc47?function(){const _0x263778=_0x1aa012;if(_0x51b143){const _0x14876e=_0x59d386[_0x263778(0x278)](_0x32a1fd,arguments);return _0x4f8c64=null,_0x14876e;}}:function(){};return _0x9695cd=![],_0x2b0d44;}else new session_logger_1[(_0x1aa012(0x212))](_0x566bbe[_0x1aa012(0x242)]())[_0x1aa012(0x24d)]('hallucinated\x20tool:\x20'+_0x4ddf05['name']),_0x44bd87=new message_util_1[(_0x1aa012(0x20c))](_0x5d31ac,_0x4ddf05,'LLM\x20hallucinates\x20a\x20non-existing\x20tool:\x20'+_0x4ddf05[_0x1aa012(0x203)]);}_0x36ef04[_0x1aa012(0x208)](_0x44bd87);}}else{if(_0x2aa9ac){const _0x86e68f=_0x425c53[_0x1aa012(0x278)](_0x186ce5,arguments);return _0x585676=null,_0x86e68f;}}}return _0x36ef04;}static[a9_0x1cdb4c(0x235)](_0x349928){const _0x433a5f=a9_0x1cdb4c;if(tool_util_1[_0x433a5f(0x28b)]['hasNoTool'](_0x349928)){const _0x181816=message_util_1['MessageUtil'][_0x433a5f(0x26d)](_0x349928?.['content']);if(!_0x181816['trim']())return!![];}return![];}static['prepareHistoryForProvider'](_0x3b082a,_0x3fafcb,_0x3434d6){const _0x416653=a9_0x1cdb4c,_0x221474={'bHMKM':_0x416653(0x25c),'EpGCG':function(_0x249963,_0x46b2c1){return _0x249963!==_0x46b2c1;},'LtUsI':_0x416653(0x245)};if(_0x3b082a!==_0x221474[_0x416653(0x270)])return;const _0x520109=message_util_1['MessageUtil'][_0x416653(0x255)](_0x3434d6);if(_0x221474[_0x416653(0x298)](_0x520109?.[_0x416653(0x28e)],'ai'))return;_0x3434d6[_0x416653(0x208)](new messages_1[(_0x416653(0x210))]({'content':_0x221474[_0x416653(0x231)],'id':_0x3fafcb[_0x416653(0x237)]()}));}static[a9_0x1cdb4c(0x216)](_0x4e7f6c){const _0x20adbd=a9_0x1cdb4c,_0x718e56={'ilvFK':_0x20adbd(0x24b),'fkCrt':_0x20adbd(0x26b),'EpRLk':_0x20adbd(0x21d),'uDQIy':_0x20adbd(0x273),'Cdcif':function(_0x20ac44,_0x3fffd4){return _0x20ac44!==_0x3fffd4;},'GgRwJ':'HoOpK','Vctyx':'xTOir','PqZOH':_0x20adbd(0x22d)};if(_0x4e7f6c?.[_0x20adbd(0x26a)]){let _0x1e8ce7=_0x4e7f6c['response_metadata'][_0x718e56['ilvFK']];return!_0x1e8ce7&&(_0x1e8ce7=_0x4e7f6c[_0x20adbd(0x26a)][_0x718e56[_0x20adbd(0x285)]]),!_0x1e8ce7&&(_0x20adbd(0x204)===_0x718e56['EpRLk']?_0x139536[_0x20adbd(0x1f1)]=_0x5c881f[_0x20adbd(0x1f1)]:_0x1e8ce7=_0x4e7f6c[_0x20adbd(0x26a)][_0x718e56['uDQIy']]),_0x1e8ce7;}else return _0x718e56[_0x20adbd(0x226)](_0x718e56[_0x20adbd(0x1f4)],_0x718e56[_0x20adbd(0x275)])?_0x718e56['PqZOH']:_0x37d823[_0x20adbd(0x1fb)](_0x1d53ca);}}function a9_0x352c(_0x523bb0,_0x42ba2e){const _0x56485b=a9_0x2971();return a9_0x352c=function(_0x330507,_0x1d13f0){_0x330507=_0x330507-0x1f1;let _0x297179=_0x56485b[_0x330507];return _0x297179;},a9_0x352c(_0x523bb0,_0x42ba2e);}function a9_0x2971(){const _0x3b5fd9=['SystemMessage','msKZm','useTools','search','MuBdF','onCrossing','wOBKO','4502308TCeTzM','FddES','constructor','Cdcif','number','Retry','../utils/message-util','XyOTR','ddDCL','toString','unknown','vGsme','lodash','Attempt\x20','LtUsI','bDnGK','additional_kwargs','qYjXE','isBotMessageEmpty','getActiveStep','genMessageId','MDJjD','../utils/tool-util','QGfvR','ToolCallMessage','NtZWT','usage_metadata','NPaVH','1024310hBjGQY','content','../configs/core-config','getSessionDoc','2854362HSvUNZ','ToolMessageOK','Continue.','32080419sUtAFw','RoHat','kXrgB','sLwgJ','supportsTemperatureOverride','finishReason','XXThW','warn','isSame','\x20of\x20','prepareHistoryForProvider','provider','isToolAvailable','IRzqs','VGrEv','peek','GgQHp','goTry','./logic-runner','structOutputSchema','verifyLicense','LLM\x20call\x20failed.\x20Reason:','anthropic','trim','aKESa','CUPlw','749mBoxrS','LogicRunner','RkdFV','step','callTool','function','MkXiA','EdApH','\x27\x20model\x20params\x20target\x20\x27','CoreConfig','response_metadata','stop_reason','direct','contentToText','iljzq','\x27\x20does\x20not\x20match\x20resolved\x20model\x20\x27','bHMKM','HnJKF','@langchain/core/messages','finish_reason','tool_calls','Vctyx','missing\x20tool\x20handler:\x20','HxFrl','apply','send','getModel','LLM\x20hallucinates\x20a\x20non-existing\x20tool:\x20','invoke','defineProperty','../utils/retry','message','activateByName','hasTool','IjfBX','ffHAP','hkere','fkCrt','3hApgPX','merge','xlUrH','kpyqk','hHKcA','ToolUtil','rgOtu','temperature','type','tool','activate','prompt','picoKey','(((.+)+)+)+$','string','../utils/verify-license','getMemory','ZMUTN','EpGCG','Flow\x20\x27','MfzOA','tFIjX','LQHUE','keArL','onToolResponseMessages','contentType','wQTeH','LlmRunner','GgRwJ','sAivF','YptJR','5040744MaoKzT','isLogic','LEUFr','saveState','checkResponse','jGgwl','KmcDv','createInstance','withStructuredOutput','onResponse','tallyToken','state','name','akSmi','__esModule','wYByH','AIMessage','push','getModelParams','Ignoring\x20temperature\x20override\x20for\x20model\x20\x27','human','ToolMessageInfo','getName','WqCtS','pop','HumanMessage','NwHGa','SessionLogger','MessageUtil','qsdWE','hejbk','getReason','uTPLl','943404vfkhnv','116752NyJhZY','HbhTp','stopTool'];a9_0x2971=function(){return _0x3b5fd9;};return a9_0x2971();}exports[a9_0x1cdb4c(0x1f3)]=LlmRunner;
|
|
1
|
+
const a9_0x436cdc=a9_0x139b;(function(_0x2ee5ec,_0x392032){const _0x3b4dc5=a9_0x139b,_0x5dc664=_0x2ee5ec();while(!![]){try{const _0x4924c3=parseInt(_0x3b4dc5(0x1a5))/0x1*(parseInt(_0x3b4dc5(0x103))/0x2)+parseInt(_0x3b4dc5(0x186))/0x3*(parseInt(_0x3b4dc5(0x17f))/0x4)+parseInt(_0x3b4dc5(0x156))/0x5+-parseInt(_0x3b4dc5(0x1ca))/0x6*(-parseInt(_0x3b4dc5(0x111))/0x7)+-parseInt(_0x3b4dc5(0x11c))/0x8+-parseInt(_0x3b4dc5(0x102))/0x9+parseInt(_0x3b4dc5(0x114))/0xa*(-parseInt(_0x3b4dc5(0x11e))/0xb);if(_0x4924c3===_0x392032)break;else _0x5dc664['push'](_0x5dc664['shift']());}catch(_0x55273b){_0x5dc664['push'](_0x5dc664['shift']());}}}(a9_0x5119,0x37cb8));function a9_0x139b(_0x17c1ef,_0x388776){const _0x16f8f6=a9_0x5119();return a9_0x139b=function(_0x56dd81,_0x42b985){_0x56dd81=_0x56dd81-0xfa;let _0x5119d1=_0x16f8f6[_0x56dd81];return _0x5119d1;},a9_0x139b(_0x17c1ef,_0x388776);}const a9_0x42b985=(function(){const _0x4d61c5=a9_0x139b,_0x2c5a68={'strWf':_0x4d61c5(0x101),'uDmiV':_0x4d61c5(0x106),'FvJiX':function(_0x342f3e,_0x16156e){return _0x342f3e===_0x16156e;},'gpKSa':_0x4d61c5(0x1b0)};let _0xa44c47=!![];return function(_0x5b6d38,_0x14ede9){const _0x59f709=_0x4d61c5,_0x54df16={'VdRpM':_0x2c5a68['uDmiV']};if(_0x2c5a68[_0x59f709(0x12b)](_0x2c5a68[_0x59f709(0x14b)],_0x2c5a68['gpKSa'])){const _0x2e53cb=_0xa44c47?function(){const _0x1c688d=_0x59f709;if(_0x14ede9){if(_0x2c5a68['strWf']!==_0x2c5a68[_0x1c688d(0x100)])_0x400e0a[_0x1c688d(0x1cc)]=_0x956d0[_0x1c688d(0x1cc)];else{const _0x2363b3=_0x14ede9[_0x1c688d(0x193)](_0x5b6d38,arguments);return _0x14ede9=null,_0x2363b3;}}}:function(){};return _0xa44c47=![],_0x2e53cb;}else _0x1489eb=_0x4a572f['response_metadata'][_0x54df16[_0x59f709(0x191)]];};}()),a9_0x56dd81=a9_0x42b985(this,function(){const _0x2260a7=a9_0x139b,_0x234ee1={'egVvr':'(((.+)+)+)+$'};return a9_0x56dd81[_0x2260a7(0x19f)]()[_0x2260a7(0x10e)](_0x234ee1[_0x2260a7(0x12f)])[_0x2260a7(0x19f)]()[_0x2260a7(0x16f)](a9_0x56dd81)[_0x2260a7(0x10e)](_0x234ee1['egVvr']);});a9_0x56dd81();function a9_0x5119(){const _0x415517=['tSDqa','LlKYA','pCIIO','send','rgTtA','Follow\x20system\x20prompt\x20and\x20respond\x20properly.','YBpOY','OEJDJ','HeqrQ','iPtEw','../utils/tool-util','direct','HumanMessage','DTzLi','prompt','gpKSa','LLM\x20hallucinates\x20a\x20non-existing\x20tool:\x20','cAVgR','WrgpX','llmRetry','isBotMessageEmpty','awHYc','useTools','withStructuredOutput','getModelParamsModelName','../utils/message-util','1839675vewktW','BhJpS','AIMessage','nNFtk','LUpbS','SystemMessage','iEMHX','Ignoring\x20temperature\x20override\x20for\x20model\x20\x27','kCADD','iqIWS','getActiveStep','HMRIB','wuYXk','\x27\x20does\x20not\x20match\x20resolved\x20model\x20\x27','NJWES','getReason','mrtbg','content','ZCdaT','warn','Flow\x20\x27','gWtIm','RoiGt','activateByName','hallucinated\x20tool:\x20','constructor','getPrompt','getMemory','LMLSF','../utils/retry','TclmU','JbxuP','saveState','LzxYu','pop','OYScm','ToolUtil','message','LFUBj','CoreConfig','OHyDN','516476mFsbRg','provider','bhYhF','DXCou','RMprV','MYCcT','sxwLi','6cIeRcW','obtainTools','hasNoTool','RBGDb','mRAfK','isToolAvailable','luHbp','YpHEg','getModelParams','activate','checkResponse','VdRpM','tool_calls','apply','onResponse','DHrvs','xXDIq','getModel','Afpgz','rEnTQ','KfyQJ','sLXZf','isLogic','function','AbDDJ','toString','jorBX','ToolMessageOK','./logic-runner','human','vbWlx','1lcOXrh','OqdTf','temperature','../session/session-logger','SessionLogger','unknown','type','wGZSv','pCcXv','XQLWu','ftPcO','HHJhs','VGZVw','usage_metadata','TXqDM','finishReason','ZkBgT','DZZrs','hasTool','NqwJm','response_metadata','atXRi','(((.+)+)+)+$','tallyToken','aULYX','Step\x20\x27','nvRps','goTry','tool_call_id','qeFmh','WHlnM','FTdyw','\x20of\x20','missing\x20tool\x20handler:\x20','Hqtld','additional_kwargs','gYomJ','215724MhifED','igbwc','contentType','gnETZ','\x27\x20model\x20params\x20target\x20\x27','esUiC','string','getFlowEngine','merge','finish_reason','supportsTemperatureOverride','VmaET','isSame','strWf','OIRFQ','3526668UEtBUa','437508JkXIir','POzus','onToolResponseMessages','stop_reason','.\x20Error:','DUtmx','state','yDcou','gqtuo','tool','GZfvk','search','invoke','rNiqh','70kbNMmC','genMessageId','LLM\x20call\x20failed.\x20Reason:','637660mNDfSt','stopTool','Continue.','callTool','picoKey','HUPQg','../utils/verify-license','sQVLu','81480JgDzOh','@langchain/core/messages','99FuwuIk','AgbGz','LPOfd','bfvrH','onCrossing','MessageUtil','getSessionDoc','ToolCallMessage','LlmRunner','Attempt\x20','step','BTHSD','ToolMessageInfo','FvJiX','tHnFj','Jutmj','getName','egVvr','prepareHistoryForProvider','push','tVgoA','contentToText','__esModule','lodash','cgxid','createInstance','Retry','QLuVK','UcAIs','name'];a9_0x5119=function(){return _0x415517;};return a9_0x5119();}'use strict';Object['defineProperty'](exports,a9_0x436cdc(0x134),{'value':!![]}),exports[a9_0x436cdc(0x126)]=void 0x0;const messages_1=require(a9_0x436cdc(0x11d)),message_util_1=require(a9_0x436cdc(0x155)),tool_util_1=require(a9_0x436cdc(0x146)),session_logger_1=require(a9_0x436cdc(0x1a8)),core_config_1=require('../configs/core-config'),message_util_2=require(a9_0x436cdc(0x155)),logic_runner_1=require(a9_0x436cdc(0x1a2)),retry_1=require(a9_0x436cdc(0x173)),verify_license_1=require(a9_0x436cdc(0x11a)),lodash_1=require(a9_0x436cdc(0x135));class LlmRunner{static async[a9_0x436cdc(0x13f)](_0x21704,_0x1c70ee,_0x5bd2ab){const _0x43a970=a9_0x436cdc,_0x574abf={'KfyQJ':_0x43a970(0x1bb),'sLXZf':function(_0x5a7504,_0x29d24f){return _0x5a7504===_0x29d24f;},'BhJpS':_0x43a970(0x10c),'WHlnM':function(_0x138baa,_0x1cdfb6){return _0x138baa>=_0x1cdfb6;},'OqdTf':_0x43a970(0x141),'rEnTQ':_0x43a970(0x1c7),'wGZSv':function(_0x53732d,_0x20c39e){return _0x53732d!==_0x20c39e;},'luHbp':_0x43a970(0x181),'tSDqa':'unknown','VmaET':_0x43a970(0x164),'XVIsK':_0x43a970(0x1b3),'OYScm':'number','cgxid':function(_0x3148d9,_0x308704){return _0x3148d9!==_0x308704;},'aULYX':_0x43a970(0x1af),'RMprV':function(_0x43adf6,_0x5a15d7){return _0x43adf6===_0x5a15d7;},'cAVgR':_0x43a970(0x15a),'zvlPB':function(_0x383655,_0x446943){return _0x383655-_0x446943;},'JZflE':function(_0x1c993c,_0x403596){return _0x1c993c!==_0x403596;},'vxTBe':_0x43a970(0x115),'mRAfK':_0x43a970(0x121),'HMRIB':_0x43a970(0x182)};(0x0,verify_license_1['verifyLicense'])(core_config_1[_0x43a970(0x17d)]['picoKey']);let _0x40034c;const _0x34391a=_0x21704[_0x43a970(0x160)](),_0x34614f=_0x34391a['getModel'](),_0x4b2c1d=_0x21704[_0x43a970(0xfa)]()[_0x43a970(0x197)](_0x34614f),_0x1103ab=_0x21704[_0x43a970(0x154)]();if(_0x34614f===_0x21704[_0x43a970(0x197)]()&&_0x1103ab&&_0x574abf[_0x43a970(0x1ac)](_0x1103ab,_0x34614f))throw new Error(_0x43a970(0x16a)+_0x21704[_0x43a970(0x16f)]['name']+'\x27\x20model\x20params\x20target\x20\x27'+_0x1103ab+_0x43a970(0x163)+_0x34614f+'\x27.');const _0x46d516=_0x34391a['getModelParamsModelName']();if(_0x46d516&&_0x46d516!==_0x34614f){if(_0x574abf[_0x43a970(0x1ac)](_0x574abf[_0x43a970(0xfe)],_0x574abf['XVIsK']))throw new Error(_0x43a970(0x1be)+_0x34391a[_0x43a970(0x12e)]()+_0x43a970(0x1ce)+_0x46d516+'\x27\x20does\x20not\x20match\x20resolved\x20model\x20\x27'+_0x34614f+'\x27.');else return _0x546db5[_0x43a970(0x19f)]()[_0x43a970(0x10e)](bLXVbz[_0x43a970(0x19a)])[_0x43a970(0x19f)]()[_0x43a970(0x16f)](_0x2dfd2c)[_0x43a970(0x10e)](bLXVbz['KfyQJ']);}const _0x272aee=_0x574abf[_0x43a970(0x19b)](_0x34391a[_0x43a970(0x197)](),_0x21704['getModel']())?(0x0,lodash_1[_0x43a970(0xfb)])({},_0x21704[_0x43a970(0x18e)](),_0x34391a[_0x43a970(0x18e)]()):(0x0,lodash_1[_0x43a970(0xfb)])({},_0x34391a[_0x43a970(0x18e)]()),_0x2ded72=(0x0,lodash_1['merge'])({},_0x272aee);_0x574abf[_0x43a970(0x19b)](typeof _0x2ded72[_0x43a970(0x1a7)],_0x574abf[_0x43a970(0x179)])&&!_0x4b2c1d[_0x43a970(0xfd)]()&&(new session_logger_1['SessionLogger'](_0x21704[_0x43a970(0x124)]())['warn'](_0x43a970(0x15d)+_0x4b2c1d[_0x43a970(0x13b)]+'\x27.'),delete _0x2ded72[_0x43a970(0x1a7)]);const _0x1d0bd3=_0x34391a[_0x43a970(0x171)]();_0x574abf['wGZSv'](_0x1c70ee[_0x43a970(0x12e)](),_0x34391a['getName']())&&(_0x574abf[_0x43a970(0x136)](_0x574abf[_0x43a970(0x1bd)],_0x574abf[_0x43a970(0x1bd)])?(new _0x479dd1['SessionLogger'](_0x191c3e[_0x43a970(0x124)]())['warn']('Ignoring\x20temperature\x20override\x20for\x20model\x20\x27'+_0x24a445[_0x43a970(0x13b)]+'\x27.'),delete _0x1ef03b[_0x43a970(0x1a7)]):(await _0x21704['saveSession'](),_0x5bd2ab=_0x34391a[_0x43a970(0x122)](_0x5bd2ab,_0x1c70ee['getName']())));if(_0x34391a[_0x43a970(0x19c)]())return logic_runner_1['LogicRunner'][_0x43a970(0x13f)](_0x21704,_0x1c70ee);let _0x3a49b3=_0x4b2c1d[_0x43a970(0x137)](_0x2ded72),_0x3974b9=_0x34391a[_0x43a970(0x187)]()??[];const _0x3ada7f=await _0x34391a[_0x43a970(0x170)]();_0x1d0bd3[0x0]=new messages_1[(_0x43a970(0x15b))]({'content':_0x3ada7f,'id':_0x34391a['genMessageId']()});if(_0x5bd2ab){if(_0x574abf[_0x43a970(0x183)](_0x574abf['cAVgR'],_0x574abf[_0x43a970(0x14d)])){const _0x5137a5=_0x1d0bd3[_0x574abf['zvlPB'](_0x1d0bd3['length'],0x1)];!message_util_1['MessageUtil'][_0x43a970(0xff)](_0x5137a5,_0x5bd2ab)&&(_0x574abf['JZflE'](_0x43a970(0x185),_0x43a970(0x185))?(_0x4bf5bd[_0x43a970(0x18b)](_0x1a19a0['name'])?(new _0x24d359['SessionLogger'](_0x1d692a['getSessionDoc']())[_0x43a970(0x169)](_0x43a970(0x1c6)+_0x2032b7['name']),_0x17f7ed=new _0x5484d3['ToolMessageOK'](_0x5c7f64,_0x1d0a16)):(new _0x375319['SessionLogger'](_0x2f5665[_0x43a970(0x124)]())['warn'](_0x43a970(0x16e)+_0x77991d['name']),_0x1e32c3=new _0x69a00c[(_0x43a970(0x12a))](_0x18d434,_0x304021,'LLM\x20hallucinates\x20a\x20non-existing\x20tool:\x20'+_0xd5a4ea[_0x43a970(0x13b)])),_0x3cd8c0['push'](_0x438a3c)):_0x1d0bd3[_0x43a970(0x131)](_0x5bd2ab));}else _0x574abf[_0x43a970(0x19b)](_0x191499['type'],_0x574abf[_0x43a970(0x157)])&&_0x574abf[_0x43a970(0x19b)](_0x433596['id'],_0x1e80e9[_0x43a970(0x1c1)])&&(_0x3fd4ef=!![],_0xcc4424[_0x43a970(0x131)](_0x5eeb16));}const _0x7eeb24=_0x5bd2ab?.['additional_kwargs'][_0x574abf['vxTBe']];if(_0x7eeb24){if(_0x574abf['sLXZf'](_0x574abf[_0x43a970(0x18a)],_0x574abf[_0x43a970(0x161)])){let _0x14bd9c=![];for(const _0x51f752 of _0x506dfa){_0x574abf[_0x43a970(0x19b)](_0x51f752['type'],_0x574abf[_0x43a970(0x157)])&&_0x574abf[_0x43a970(0x19b)](_0xd94796['id'],_0x51f752[_0x43a970(0x1c1)])&&(_0x14bd9c=!![],_0x55662b[_0x43a970(0x131)](_0x51f752));}if(!_0x14bd9c){const _0x42d7b4=new _0x252f4e[(_0x43a970(0x1a1))](_0x4b2437,_0x4aa605);_0x50721d['push'](_0x42d7b4);}}else _0x3974b9=[];}_0x3a49b3=_0x4b2c1d[_0x43a970(0x152)](_0x3a49b3,_0x3974b9);const _0x3bc1e1=_0x34391a['structOutputSchema']();return _0x3bc1e1&&(_0x3a49b3=_0x3a49b3[_0x43a970(0x153)](_0x3bc1e1)),LlmRunner[_0x43a970(0x130)](_0x4b2c1d[_0x43a970(0x180)],_0x34391a,_0x1d0bd3),_0x40034c=await retry_1[_0x43a970(0x138)][_0x43a970(0x1c0)]({'maxRetries':core_config_1[_0x43a970(0x17d)][_0x43a970(0x14f)],'delayMs':0x1f4,'onMain':async()=>{const _0xc37da9=_0x43a970,_0x4f6e03={'OEJDJ':function(_0x6944c6,_0xeb57dc){const _0x5a3479=a9_0x139b;return _0x574abf[_0x5a3479(0x1c3)](_0x6944c6,_0xeb57dc);},'FwAVT':_0x574abf[_0xc37da9(0x1a6)]};if(_0x574abf[_0xc37da9(0x19b)](_0x574abf[_0xc37da9(0x199)],_0x574abf[_0xc37da9(0x199)])){_0x40034c=await _0x3a49b3[_0xc37da9(0x10f)](_0x1d0bd3);const _0x4214d7=_0x40034c[_0xc37da9(0x1b2)];return _0x21704[_0xc37da9(0x1bc)](_0x4214d7),_0x40034c;}else return _0x1990b6[_0xc37da9(0x150)](_0x3cf891)?(_0x2677ca[_0xc37da9(0x178)](),_0x4f6e03[_0xc37da9(0x143)](_0x5a3bee,0x2)&&_0x5cfb56[_0xc37da9(0x178)](),_0x4f34cb[_0xc37da9(0x131)](new _0x2ed618[(_0xc37da9(0x148))]({'content':_0x4f6e03['FwAVT'],'id':_0x35e4ec[_0xc37da9(0x112)]()})),!![]):_0xd882d2[_0xc37da9(0x190)](_0x3f333c);},'onWarn':(_0x1074c2,_0x2d1a69,_0x3d74ab)=>{const _0x2d22b0=_0x43a970;if(_0x574abf[_0x2d22b0(0x1ac)](_0x574abf[_0x2d22b0(0x18c)],_0x574abf[_0x2d22b0(0x18c)]))return;else new session_logger_1['SessionLogger'](_0x21704[_0x2d22b0(0x124)]())[_0x2d22b0(0x169)](_0x2d22b0(0x127)+_0x1074c2+'\x20of\x20'+_0x2d1a69+_0x2d22b0(0x107)+(_0x3d74ab?_0x3d74ab[_0x2d22b0(0x17b)]:_0x2d22b0(0x1aa)));},'shouldRetry':(_0x30ff7e,_0x49d12c)=>{const _0x349d3d=_0x43a970;return LlmRunner[_0x349d3d(0x150)](_0x30ff7e)?(_0x1d0bd3['pop'](),_0x49d12c>=0x2&&_0x1d0bd3[_0x349d3d(0x178)](),_0x1d0bd3['push'](new messages_1[(_0x349d3d(0x148))]({'content':_0x574abf[_0x349d3d(0x1a6)],'id':_0x34391a['genMessageId']()})),!![]):_0x34391a[_0x349d3d(0x190)](_0x30ff7e);},'onFinalError':_0x36df8b=>{const _0x2904df=_0x43a970;throw new Error(_0x2904df(0x113)+LlmRunner[_0x2904df(0x165)](_0x40034c)+_0x2904df(0x107)+(_0x36df8b?_0x36df8b[_0x2904df(0x17b)]:_0x574abf[_0x2904df(0x13c)]));}}),await LlmRunner[_0x43a970(0x194)](_0x21704,_0x40034c,_0x1c70ee);}static async[a9_0x436cdc(0x194)](_0xcc28d0,_0x2df597,_0x54ba7b){const _0x7ae16c=a9_0x436cdc,_0x5bd213={'QLuVK':function(_0x230960,_0x67d01a){return _0x230960 in _0x67d01a;},'xsuMx':function(_0x42ea11,_0x829ead){return _0x42ea11===_0x829ead;},'pCIIO':'function'};(0x0,verify_license_1['verifyLicense'])(core_config_1[_0x7ae16c(0x17d)][_0x7ae16c(0x118)]);const _0x56cab1=_0xcc28d0['getActiveStep']();if(_0x56cab1[_0x7ae16c(0x19c)]())return logic_runner_1['LogicRunner'][_0x7ae16c(0x13f)](_0xcc28d0,_0x54ba7b);const _0x270e52=_0x56cab1[_0x7ae16c(0x171)]();if(tool_util_1[_0x7ae16c(0x17a)][_0x7ae16c(0x1b7)](_0x2df597)){const _0x45cc8a=await LlmRunner['callTool'](_0x56cab1,_0xcc28d0,_0x2df597?.[_0x7ae16c(0x192)]),_0x392965=new message_util_2[(_0x7ae16c(0x125))](_0x56cab1,_0x2df597[_0x7ae16c(0x192)]);return _0x270e52[_0x7ae16c(0x131)](_0x392965),LlmRunner[_0x7ae16c(0x105)](_0xcc28d0,_0x56cab1,_0x2df597[_0x7ae16c(0x192)],_0x45cc8a,_0x54ba7b);}else{const _0x4c2dcc=_0x2df597&&_0x5bd213[_0x7ae16c(0x139)](_0x7ae16c(0x167),_0x2df597)?message_util_1[_0x7ae16c(0x123)][_0x7ae16c(0x133)](_0x2df597[_0x7ae16c(0x167)]):_0x2df597,_0x1b15a6=await _0x56cab1['onResponse'](_0x4c2dcc);if(_0x5bd213['xsuMx'](typeof _0x1b15a6,_0x5bd213[_0x7ae16c(0x13e)])){const _0x19aa9d=_0x1b15a6;return await _0xcc28d0[_0x7ae16c(0x18f)](_0x19aa9d),await LlmRunner['send'](_0xcc28d0,_0x54ba7b);}else{const _0x4e07fc=message_util_1[_0x7ae16c(0x123)][_0x7ae16c(0x133)](_0x1b15a6);return _0x270e52[_0x7ae16c(0x131)](new messages_1[(_0x7ae16c(0x158))]({'content':_0x4e07fc,'id':_0x56cab1[_0x7ae16c(0x112)]()})),_0x4e07fc;}}}static async['onToolResponseMessages'](_0x30b594,_0x33669e,_0x2939f4,_0x23c628,_0x23dfb7){const _0x3342eb=a9_0x436cdc,_0x307104={'XQLWu':_0x3342eb(0x1aa),'rNiqh':_0x3342eb(0x10c),'gYomJ':function(_0x1be903){return _0x1be903();},'gnETZ':function(_0x5c7dc7,_0xfae10e){return _0x5c7dc7===_0xfae10e;},'gjFJp':'LLHbR','TclmU':function(_0x37b3a7,_0x179467){return _0x37b3a7!==_0x179467;},'roAPd':_0x3342eb(0x172),'nNFtk':_0x3342eb(0x162),'uoOUO':function(_0xb3f0f3,_0x7782f2){return _0xb3f0f3===_0x7782f2;},'DUtmx':function(_0x3e2057,_0x68b7e1){return _0x3e2057!==_0x68b7e1;},'WrgpX':_0x3342eb(0x196),'YpHEg':'UcAIs','gWtIm':_0x3342eb(0x10b),'LPOfd':_0x3342eb(0x177),'VGZVw':_0x3342eb(0x1a3),'HUPQg':_0x3342eb(0x15e),'nvRps':'Nwqfi'},_0x260aef=_0x307104[_0x3342eb(0x1c9)](Array);for(const _0x439a2b of _0x2939f4){if(_0x307104[_0x3342eb(0x1cd)](_0x307104['gjFJp'],_0x307104['gjFJp'])){let _0x44578d=![];for(const _0x3d011e of _0x23c628){if(_0x307104[_0x3342eb(0x174)](_0x307104['roAPd'],_0x307104[_0x3342eb(0x159)]))_0x307104[_0x3342eb(0x1cd)](_0x3d011e[_0x3342eb(0x1ab)],_0x307104[_0x3342eb(0x110)])&&_0x307104['uoOUO'](_0x439a2b['id'],_0x3d011e[_0x3342eb(0x1c1)])&&(_0x307104[_0x3342eb(0x108)](_0x3342eb(0x1cb),_0x307104[_0x3342eb(0x14e)])?(_0x44578d=!![],_0x260aef[_0x3342eb(0x131)](_0x3d011e)):_0x48d800['saveState']({'_prompt':_0x4abef5['prompt']}));else return!![];}if(!_0x44578d){const _0x2526f8=new message_util_2[(_0x3342eb(0x1a1))](_0x33669e,_0x439a2b);_0x260aef[_0x3342eb(0x131)](_0x2526f8);}}else _0x2cc24c=_0x3012d0[_0x3342eb(0x1b9)][_0x3342eb(0xfc)];}const _0x413ff7=_0x33669e['getMemory']();_0x413ff7['push'](..._0x260aef);for(const _0x572482 of _0x23c628){if(_0x307104[_0x3342eb(0x1cd)]('nIeAH',_0x3342eb(0x145)))throw new _0x4e7b39('LLM\x20call\x20failed.\x20Reason:'+_0x156508['getReason'](_0x492575)+_0x3342eb(0x107)+(_0x55f1e4?_0x2b4625[_0x3342eb(0x17b)]:_0x307104[_0x3342eb(0x1ae)]));else{if(_0x307104['uoOUO'](_0x572482[_0x3342eb(0x1ab)],'ai')){if(_0x307104['gnETZ'](_0x3342eb(0x13a),_0x307104[_0x3342eb(0x18d)])){const _0x2e00ba=_0x572482[_0x3342eb(0x1c8)][_0x3342eb(0x147)];if(_0x2e00ba){if(_0x307104['gnETZ'](_0x307104[_0x3342eb(0x16b)],_0x307104[_0x3342eb(0x120)]))_0x36065e=new _0x4e116e[(_0x3342eb(0x12a))](_0x27a196,_0x16a3c6,_0x41402e[_0x307104[_0x3342eb(0x110)]]);else return _0x413ff7[_0x3342eb(0x131)](_0x572482),message_util_1[_0x3342eb(0x123)][_0x3342eb(0x133)](_0x572482[_0x3342eb(0x167)]);}}else throw new _0x264e05('Step\x20\x27'+_0x33147b[_0x3342eb(0x12e)]()+'\x27\x20model\x20params\x20target\x20\x27'+_0x577733+'\x27\x20does\x20not\x20match\x20resolved\x20model\x20\x27'+_0x5d3f6c+'\x27.');}}}for(const _0x5097df of _0x23c628){if(_0x307104[_0x3342eb(0x1cd)](_0x5097df[_0x3342eb(0x1ab)],_0x307104[_0x3342eb(0x1b1)])){if(_0x307104['TclmU'](_0x307104[_0x3342eb(0x119)],_0x307104[_0x3342eb(0x1bf)]))return await LlmRunner['send'](_0x30b594,_0x23dfb7,_0x5097df);else{if(_0x10791e[_0x3342eb(0x17a)]['hasNoTool'](_0xe1ce66)){const _0x817c1e=_0x2ec0ec['MessageUtil'][_0x3342eb(0x133)](_0x1127ac?.[_0x3342eb(0x167)]);if(!_0x817c1e['trim']())return!![];}return![];}}}return await LlmRunner[_0x3342eb(0x13f)](_0x30b594,_0x23dfb7);}static async[a9_0x436cdc(0x117)](_0x981496,_0x41a161,_0x3d32ea){const _0x2b1e75=a9_0x436cdc,_0x1a81b2={'tHnFj':'unknown','DTzLi':function(_0x2f5295,_0x50cb93){return _0x2f5295===_0x50cb93;},'WiWhn':function(_0x3c4f8c,_0x5eda1c){return _0x3c4f8c===_0x5eda1c;},'ZCdaT':_0x2b1e75(0x1a0),'pCcXv':function(_0x58c835,_0x5722dc){return _0x58c835===_0x5722dc;},'AbDDJ':_0x2b1e75(0x1d0),'Jutmj':function(_0x2e86bd,_0x5be36e){return _0x2e86bd===_0x5be36e;},'atXRi':_0x2b1e75(0x19d),'UoMEp':function(_0x52a341,_0x43e19f){return _0x52a341 in _0x43e19f;},'BTHSD':_0x2b1e75(0x128),'eWsVi':'vPxaf','LFUBj':_0x2b1e75(0x142),'NqwJm':function(_0x3c1302,_0x52131d){return _0x3c1302===_0x52131d;},'iqIWS':_0x2b1e75(0x184),'qeFmh':_0x2b1e75(0x10c),'DHrvs':function(_0x288379,_0x4402fa){return _0x288379===_0x4402fa;},'DZZrs':_0x2b1e75(0x11f),'GZfvk':function(_0x320aa7,_0x4dabf4){return _0x320aa7===_0x4dabf4;},'rgTtA':_0x2b1e75(0x198),'sQVLu':_0x2b1e75(0x1b5),'iEMHX':_0x2b1e75(0x17b),'grEcy':function(_0x6039f2,_0x356cd4){return _0x6039f2!==_0x356cd4;},'OHyDN':function(_0x2f6033,_0x501e23){return _0x2f6033!==_0x501e23;},'FTdyw':_0x2b1e75(0x10a)},_0x2e5dfc=new Array();for(const _0xe52411 of _0x3d32ea){let _0x217746;if(_0x1a81b2['DTzLi'](typeof _0x981496[_0xe52411[_0x2b1e75(0x13b)]],_0x2b1e75(0x19d))){if(_0x1a81b2['WiWhn']('kXMli',_0x1a81b2[_0x2b1e75(0x168)]))new _0x1b3d69[(_0x2b1e75(0x1a9))](_0xcab7a3['getSessionDoc']())[_0x2b1e75(0x169)](_0x2b1e75(0x1c6)+_0x241a4d['name']),_0x1da941=new _0x36589e[(_0x2b1e75(0x1a1))](_0x25c022,_0x3fe344);else{const _0x65f16b=await _0x981496[_0xe52411[_0x2b1e75(0x13b)]](_0xe52411);if(_0x1a81b2[_0x2b1e75(0x1ad)](typeof _0x65f16b,_0x1a81b2[_0x2b1e75(0x19e)]))await _0x41a161[_0x2b1e75(0x16d)](_0x65f16b),_0x2e5dfc[_0x2b1e75(0x131)](new message_util_2['ToolMessageOK'](_0x981496,_0xe52411));else{if(_0x1a81b2[_0x2b1e75(0x12d)](typeof _0x65f16b,_0x1a81b2[_0x2b1e75(0x1ba)]))await _0x41a161['activate'](_0x65f16b),_0x2e5dfc[_0x2b1e75(0x131)](new message_util_2['ToolMessageOK'](_0x981496,_0xe52411));else{if(_0x65f16b&&_0x1a81b2['UoMEp'](_0x1a81b2[_0x2b1e75(0x129)],_0x65f16b)){if(_0x1a81b2['eWsVi']!==_0x1a81b2[_0x2b1e75(0x17c)]){let _0xcc3194;_0x1a81b2[_0x2b1e75(0x1b8)](typeof _0x65f16b['step'],_0x1a81b2[_0x2b1e75(0x19e)])?_0xcc3194=await _0x41a161[_0x2b1e75(0x16d)](_0x65f16b[_0x2b1e75(0x128)]):_0xcc3194=await _0x41a161[_0x2b1e75(0x18f)](_0x65f16b['step']);_0x65f16b['prompt']&&_0xcc3194[_0x2b1e75(0x176)]({'_prompt':_0x65f16b[_0x2b1e75(0x14a)]});_0x65f16b[_0x2b1e75(0x109)]&&(_0x1a81b2[_0x2b1e75(0x149)](_0x1a81b2[_0x2b1e75(0x15f)],_0x2b1e75(0x184))?_0xcc3194[_0x2b1e75(0x176)](_0x65f16b[_0x2b1e75(0x109)]):new _0x42bdd8[(_0x2b1e75(0x1a9))](_0x51a1b3[_0x2b1e75(0x124)]())[_0x2b1e75(0x169)]('Attempt\x20'+_0x4d23cf+_0x2b1e75(0x1c5)+_0x5984f7+_0x2b1e75(0x107)+(_0x213bdf?_0x3d4d5e[_0x2b1e75(0x17b)]:_0x1a81b2[_0x2b1e75(0x12c)])));_0x65f16b['contentType']&&(_0xcc3194[_0x2b1e75(0x1cc)]=_0x65f16b[_0x2b1e75(0x1cc)]);if(_0x65f16b[_0x1a81b2[_0x2b1e75(0x1c2)]]){if(_0x1a81b2[_0x2b1e75(0x195)](_0x1a81b2[_0x2b1e75(0x1b6)],_0x1a81b2[_0x2b1e75(0x1b6)]))_0x217746=new message_util_1[(_0x2b1e75(0x12a))](_0xcc3194,_0xe52411,_0x65f16b[_0x1a81b2['qeFmh']]);else{const _0x4102b0=_0x3c310b?function(){const _0x443f47=_0x2b1e75;if(_0x3f6293){const _0x49416f=_0x14c289[_0x443f47(0x193)](_0xe092bc,arguments);return _0x3899d8=null,_0x49416f;}}:function(){};return _0x58d361=![],_0x4102b0;}}else{if(_0x1a81b2[_0x2b1e75(0x10d)](_0x1a81b2[_0x2b1e75(0x140)],_0x1a81b2[_0x2b1e75(0x11b)])){const _0x300e87=_0x5bbbbc[_0x2b1e75(0x193)](_0xa3c377,arguments);return _0x3c48e6=null,_0x300e87;}else _0x217746=new message_util_2[(_0x2b1e75(0x1a1))](_0x981496,_0xe52411);}_0x2e5dfc[_0x2b1e75(0x131)](_0x217746);if(_0x65f16b[_0x1a81b2[_0x2b1e75(0x15c)]]){if('lzpyk'===_0x2b1e75(0x175))return;else _0x2e5dfc[_0x2b1e75(0x131)](_0x65f16b[_0x1a81b2[_0x2b1e75(0x15c)]]);}}else _0x392325=_0x3cc9eb[_0x2b1e75(0x153)](_0x334ef0);}}}}}else{if(_0x981496[_0x2b1e75(0x18b)](_0xe52411['name']))_0x1a81b2['grEcy']('mrtbg',_0x2b1e75(0x166))?_0xab6618=new _0x52ac36[(_0x2b1e75(0x1a1))](_0x4f951c,_0x520312):(new session_logger_1[(_0x2b1e75(0x1a9))](_0x41a161['getSessionDoc']())['warn'](_0x2b1e75(0x1c6)+_0xe52411[_0x2b1e75(0x13b)]),_0x217746=new message_util_2[(_0x2b1e75(0x1a1))](_0x981496,_0xe52411));else{if(_0x1a81b2[_0x2b1e75(0x17e)]('YPavl',_0x1a81b2[_0x2b1e75(0x1c4)]))new session_logger_1['SessionLogger'](_0x41a161[_0x2b1e75(0x124)]())[_0x2b1e75(0x169)](_0x2b1e75(0x16e)+_0xe52411['name']),_0x217746=new message_util_1[(_0x2b1e75(0x12a))](_0x981496,_0xe52411,_0x2b1e75(0x14c)+_0xe52411['name']);else return _0x398685[_0x2b1e75(0x131)](_0x124279),_0x3a8fd0['MessageUtil'][_0x2b1e75(0x133)](_0x6093d6[_0x2b1e75(0x167)]);}_0x2e5dfc['push'](_0x217746);}}return _0x2e5dfc;}static[a9_0x436cdc(0x150)](_0x59e9ce){const _0x3c4a4e=a9_0x436cdc;if(tool_util_1['ToolUtil'][_0x3c4a4e(0x188)](_0x59e9ce)){const _0x104581=message_util_1['MessageUtil'][_0x3c4a4e(0x133)](_0x59e9ce?.[_0x3c4a4e(0x167)]);if(!_0x104581['trim']())return!![];}return![];}static[a9_0x436cdc(0x130)](_0x55cb51,_0x2404c5,_0x48bab7){const _0x4ed0e0=a9_0x436cdc,_0x1ff41a={'LlKYA':function(_0x3b70d1,_0x35abfc){return _0x3b70d1!==_0x35abfc;},'esUiC':_0x4ed0e0(0x144),'awHYc':_0x4ed0e0(0x116)};if(_0x55cb51!=='anthropic'){if(_0x1ff41a['LlKYA'](_0x4ed0e0(0x144),_0x1ff41a[_0x4ed0e0(0x1cf)])){if(_0x5e7166){const _0x4d588f=_0x3ef5a3[_0x4ed0e0(0x193)](_0x840e87,arguments);return _0x3603f0=null,_0x4d588f;}}else return;}const _0x40c3d0=message_util_1['MessageUtil']['peek'](_0x48bab7);if(_0x1ff41a[_0x4ed0e0(0x13d)](_0x40c3d0?.[_0x4ed0e0(0x1ab)],'ai'))return;_0x48bab7[_0x4ed0e0(0x131)](new messages_1[(_0x4ed0e0(0x148))]({'content':_0x1ff41a[_0x4ed0e0(0x151)],'id':_0x2404c5[_0x4ed0e0(0x112)]()}));}static[a9_0x436cdc(0x165)](_0x14b9d1){const _0x520f8b=a9_0x436cdc,_0x2c7d66={'POzus':_0x520f8b(0x106),'tVgoA':_0x520f8b(0x189),'vbWlx':_0x520f8b(0xfc),'RoiGt':_0x520f8b(0x1aa)};if(_0x14b9d1?.[_0x520f8b(0x1b9)]){let _0x105ca5=_0x14b9d1[_0x520f8b(0x1b9)][_0x520f8b(0x1b4)];return!_0x105ca5&&(_0x105ca5=_0x14b9d1[_0x520f8b(0x1b9)][_0x2c7d66[_0x520f8b(0x104)]]),!_0x105ca5&&(_0x2c7d66[_0x520f8b(0x132)]!==_0x520f8b(0x189)?_0x4bab02[_0x520f8b(0x178)]():_0x105ca5=_0x14b9d1[_0x520f8b(0x1b9)][_0x2c7d66[_0x520f8b(0x1a4)]]),_0x105ca5;}else return _0x2c7d66[_0x520f8b(0x16c)];}}exports[a9_0x436cdc(0x126)]=LlmRunner;
|
package/flow/logic-runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x404d13=a10_0xa6a9;(function(_0x23796b,_0x4cf44d){const _0x566797=a10_0xa6a9,_0x25c353=_0x23796b();while(!![]){try{const _0x263939=parseInt(_0x566797(0x1f5))/0x1+parseInt(_0x566797(0x206))/0x2+-parseInt(_0x566797(0x21d))/0x3*(parseInt(_0x566797(0x209))/0x4)+parseInt(_0x566797(0x1ff))/0x5+-parseInt(_0x566797(0x1e2))/0x6+-parseInt(_0x566797(0x1ed))/0x7*(-parseInt(_0x566797(0x20b))/0x8)+-parseInt(_0x566797(0x1da))/0x9*(parseInt(_0x566797(0x217))/0xa);if(_0x263939===_0x4cf44d)break;else _0x25c353['push'](_0x25c353['shift']());}catch(_0x5540f7){_0x25c353['push'](_0x25c353['shift']());}}}(a10_0xcbfc,0x4cdca));const a10_0x18c30e=(function(){const _0x4a37c8=a10_0xa6a9,_0x359ce6={'CFmKj':function(_0x3ed984,_0x4446b3){return _0x3ed984===_0x4446b3;},'TeiuP':_0x4a37c8(0x1d4)};let _0x2331a1=!![];return function(_0x294934,_0x4e4b24){const _0xb58566={'fYlBm':function(_0x418102,_0x684ec0){const _0x187bc1=a10_0xa6a9;return _0x359ce6[_0x187bc1(0x21e)](_0x418102,_0x684ec0);},'AoouK':_0x359ce6['TeiuP']},_0x2ec114=_0x2331a1?function(){const _0x3ab89a=a10_0xa6a9;if(_0xb58566[_0x3ab89a(0x1e3)](_0xb58566['AoouK'],_0xb58566[_0x3ab89a(0x21a)])){if(_0x4e4b24){const _0x38b795=_0x4e4b24[_0x3ab89a(0x205)](_0x294934,arguments);return _0x4e4b24=null,_0x38b795;}}else{const _0x9ad116=_0x1e6018['apply'](_0x588860,arguments);return _0x2df9f0=null,_0x9ad116;}}:function(){};return _0x2331a1=![],_0x2ec114;};}()),a10_0x4d94e9=a10_0x18c30e(this,function(){const _0x231ba1=a10_0xa6a9,_0x4e9f2d={'rmKWn':'(((.+)+)+)+$'};return a10_0x4d94e9[_0x231ba1(0x20e)]()[_0x231ba1(0x1e9)](_0x231ba1(0x21c))[_0x231ba1(0x20e)]()[_0x231ba1(0x20d)](a10_0x4d94e9)[_0x231ba1(0x1e9)](_0x4e9f2d['rmKWn']);});a10_0x4d94e9();'use strict';function a10_0xcbfc(){const _0x4074ca=['gmAJX','EnNgC','2672560OFHKst','SoXyI','getMemory','message','push','IuVXm','apply','707042rUAUJI','onCrossing','MessageUtil','384GSatQI','tFPBh','15776cMjwUO','saveState','constructor','toString','hxxzJ','mTfpx','defineProperty','step','RBuYR','runLogic','LogicRunner','bHXAL','10FCMWCI','RpVjQ','isLogic','AoouK','gocfF','(((.+)+)+)+$','19308FNknKi','CFmKj','peek','activate','UAlxU','activateByName','./llm-runner','swJzy','aErQu','mMVlg','jNbqN','TOYRM','htJtR','string','RMnVp','6499557yuppcg','function','send','hTLLA','JslQY','pZnMu','saveSession','Ulmbf','1655550dTNlrj','fYlBm','FerVW','FclAT','NBJcd','fwfFH','SystemMessage','search','../utils/message-util','@langchain/core/messages','TbqKU','2114HCTEkj','length','GANRk','LNjwQ','bcKlg','contentType','Jtpcb','state','447203ytpGAy','getActiveStep','ipFAg','JxMzc','getName','fzGLv','prompt','HumanMessageEx'];a10_0xcbfc=function(){return _0x4074ca;};return a10_0xcbfc();}function a10_0xa6a9(_0x15ab14,_0x380980){const _0x2b8e08=a10_0xcbfc();return a10_0xa6a9=function(_0x4d94e9,_0x18c30e){_0x4d94e9=_0x4d94e9-0x1d2;let _0xcbfc5a=_0x2b8e08[_0x4d94e9];return _0xcbfc5a;},a10_0xa6a9(_0x15ab14,_0x380980);}Object[a10_0x404d13(0x211)](exports,'__esModule',{'value':!![]}),exports[a10_0x404d13(0x215)]=void 0x0;const messages_1=require(a10_0x404d13(0x1eb)),message_util_1=require(a10_0x404d13(0x1ea)),llm_runner_1=require(a10_0x404d13(0x223));class LogicRunner{static async[a10_0x404d13(0x1dc)](_0x1494db,_0x485f2d,_0x523c5f){const _0x433478=a10_0x404d13,_0x9682c8={'NIDlX':_0x433478(0x21c),'RBuYR':_0x433478(0x202),'aErQu':'NnJEM','IuVXm':function(_0x57b56c,_0x2fc089){return _0x57b56c!=_0x2fc089;},'tFPBh':function(_0x3eb4ef,_0x3c16f4){return _0x3eb4ef===_0x3c16f4;},'MMKhU':_0x433478(0x1dd),'pZnMu':function(_0x10c883,_0x135931){return _0x10c883!=_0x135931;},'NBJcd':function(_0x1131a2,_0x182204){return _0x1131a2===_0x182204;},'fwfFH':_0x433478(0x1f3),'htJtR':function(_0x57e030,_0x2845e1){return _0x57e030!==_0x2845e1;},'Ulmbf':_0x433478(0x1d9),'RpVjQ':function(_0x2b2f68,_0x2e7872){return _0x2b2f68===_0x2e7872;},'swJzy':_0x433478(0x1db),'mTfpx':function(_0x217119,_0x415a4a){return _0x217119!==_0x415a4a;},'gmAJX':_0x433478(0x21b),'UAlxU':function(_0x47bcba,_0x558578){return _0x47bcba in _0x558578;},'LNjwQ':_0x433478(0x212),'JxMzc':'gFuXL','hxxzJ':function(_0x7eea34,_0xcec6aa){return _0x7eea34===_0xcec6aa;},'fzGLv':_0x433478(0x1d8),'EnNgC':function(_0x3a02a4,_0x4b2efb){return _0x3a02a4!==_0x4b2efb;},'JslQY':_0x433478(0x1d5),'FclAT':_0x433478(0x1f1),'bHXAL':_0x433478(0x1d6),'SwGla':function(_0xd6f81c,_0x58ed38){return _0xd6f81c>_0x58ed38;},'ipFAg':_0x433478(0x1ec)},_0x33ba96=_0x1494db[_0x433478(0x1f6)]();let _0x372188=_0x33ba96['getMemory']();if(_0x523c5f){if(_0x9682c8[_0x433478(0x1d3)]!==_0x9682c8[_0x433478(0x1d3)])return _0x2ebc12['send'](_0x3f948d,_0x49b949);else{const _0x2ebb2f=message_util_1[_0x433478(0x208)]['messageStep'](_0x523c5f['id']);_0x9682c8[_0x433478(0x204)](_0x2ebb2f,_0x33ba96[_0x433478(0x1f9)]())&&(await _0x1494db['saveSession'](),_0x523c5f=_0x33ba96[_0x433478(0x207)](_0x523c5f,_0x2ebb2f));}}else{const _0x511c8e=message_util_1[_0x433478(0x208)][_0x433478(0x21f)](_0x372188);if(_0x511c8e){if(_0x9682c8[_0x433478(0x20a)](_0x9682c8['MMKhU'],_0x433478(0x1dd))){const _0x192b8b=message_util_1[_0x433478(0x208)]['messageStep'](_0x511c8e['id']);if(_0x9682c8[_0x433478(0x1df)](_0x192b8b,_0x33ba96[_0x433478(0x1f9)]())){if(_0x9682c8[_0x433478(0x1e6)](_0x9682c8[_0x433478(0x1e7)],_0x433478(0x1ef))){const _0x325a10=_0x5dea3f?function(){const _0x1c171b=_0x433478;if(_0x97d67e){const _0x4113cc=_0x1601bd[_0x1c171b(0x205)](_0x59ac22,arguments);return _0x414b56=null,_0x4113cc;}}:function(){};return _0x24b711=![],_0x325a10;}else await _0x1494db['saveSession'](),_0x523c5f=_0x33ba96['onCrossing'](_0x523c5f,_0x192b8b);}}else _0xc51d6b[_0x433478(0x20c)](_0x27bd27['state']);}else await _0x1494db[_0x433478(0x1e0)](),_0x523c5f=_0x33ba96[_0x433478(0x207)](_0x523c5f);}if(_0x9682c8['tFPBh'](_0x372188[_0x433478(0x1ee)],0x0)){if(_0x9682c8[_0x433478(0x1d7)](_0x9682c8[_0x433478(0x1e1)],_0x9682c8[_0x433478(0x1e1)]))return _0x13a9f5[_0x433478(0x20e)]()[_0x433478(0x1e9)](dWYrat['NIDlX'])['toString']()[_0x433478(0x20d)](_0x1757cb)[_0x433478(0x1e9)](_0x433478(0x21c));else _0x372188[_0x433478(0x203)](new messages_1['SystemMessage']({'content':''}));}const _0x5112ef=_0x523c5f??new message_util_1[(_0x433478(0x1fc))](_0x33ba96,'Continue\x20to\x20step:'+_0x33ba96[_0x433478(0x1f9)]());_0x372188[_0x433478(0x203)](_0x5112ef);const _0x46a505=await _0x33ba96[_0x433478(0x214)](),_0x360190=new Array();if(_0x9682c8[_0x433478(0x218)](typeof _0x46a505,_0x433478(0x1d8)))await _0x1494db[_0x433478(0x222)](_0x46a505);else{if(_0x9682c8[_0x433478(0x20a)](typeof _0x46a505,_0x9682c8[_0x433478(0x1d2)]))_0x9682c8[_0x433478(0x210)](_0x9682c8[_0x433478(0x1fd)],_0x9682c8[_0x433478(0x1fd)])?_0x4f9c94[_0x433478(0x203)](_0x131e61[_0x9682c8[_0x433478(0x213)]]):await _0x1494db[_0x433478(0x220)](_0x46a505);else{if(_0x9682c8[_0x433478(0x221)](_0x9682c8[_0x433478(0x1f0)],_0x46a505)){if(_0x9682c8[_0x433478(0x1d7)]('oVsnT',_0x9682c8[_0x433478(0x1f8)])){let _0x3b45a8;_0x9682c8[_0x433478(0x20f)](typeof _0x46a505[_0x433478(0x212)],_0x9682c8[_0x433478(0x1fa)])?_0x9682c8[_0x433478(0x1fe)](_0x9682c8['JslQY'],_0x9682c8[_0x433478(0x1de)])?_0x3ea838['push'](new _0x53dd37[(_0x433478(0x1e8))]({'content':''})):_0x3b45a8=await _0x1494db[_0x433478(0x222)](_0x46a505[_0x433478(0x212)]):_0x3b45a8=await _0x1494db[_0x433478(0x220)](_0x46a505[_0x433478(0x212)]),_0x46a505[_0x433478(0x1fb)]&&_0x3b45a8[_0x433478(0x20c)]({'_prompt':_0x46a505['prompt']}),_0x46a505[_0x433478(0x1f4)]&&(_0x9682c8[_0x433478(0x1e5)]!==_0x433478(0x200)?_0x3b45a8[_0x433478(0x20c)](_0x46a505[_0x433478(0x1f4)]):_0x49863c[_0x433478(0x203)](..._0x5018fb)),_0x46a505[_0x433478(0x1f2)]&&(_0x9682c8[_0x433478(0x1fe)](_0x9682c8['bHXAL'],_0x9682c8[_0x433478(0x216)])?_0x4bb66f[_0x433478(0x1f2)]=_0x2d2556[_0x433478(0x1f2)]:_0x3b45a8[_0x433478(0x1f2)]=_0x46a505[_0x433478(0x1f2)]),_0x46a505[_0x9682c8[_0x433478(0x213)]]&&_0x360190[_0x433478(0x203)](_0x46a505[_0x433478(0x202)]);}else{if(_0x217095){const _0x6cfd13=_0x3f1ae2[_0x433478(0x205)](_0x252696,arguments);return _0xd16ac1=null,_0x6cfd13;}}}}}const _0x299d60=_0x1494db['getActiveStep']();_0x372188=_0x299d60[_0x433478(0x201)]();_0x9682c8['SwGla'](_0x360190[_0x433478(0x1ee)],0x0)&&_0x372188[_0x433478(0x203)](..._0x360190);if(_0x299d60[_0x433478(0x219)]()){if(_0x9682c8[_0x433478(0x1d7)](_0x433478(0x1e4),_0x9682c8[_0x433478(0x1f7)]))return LogicRunner['send'](_0x1494db,_0x485f2d);else _0xf06dfb[_0x433478(0x20c)]({'_prompt':_0x5ebe17[_0x433478(0x1fb)]});}else return await llm_runner_1['LlmRunner'][_0x433478(0x1dc)](_0x1494db,_0x485f2d);}}exports[a10_0x404d13(0x215)]=LogicRunner;
|
package/flow/logic-step.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x2b6b24=a11_0x15aa;function a11_0x1fe8(){const _0x1116d3=['LogicStep','IGYwx','3377072uqkyLg','313620DTlRMh','mzIzI','762WpGAIy','1315440PFHXGJ','toString','3JkXUqc','__esModule','3636963ormhfO','apply','search','1142568GVIiJg','2488436EPFfnb','uEmvl','constructor','1630ZTmSPW','nhtrP','(((.+)+)+)+$','isLogic','Step'];a11_0x1fe8=function(){return _0x1116d3;};return a11_0x1fe8();}(function(_0x611473,_0x21ca15){const _0x503b78=a11_0x15aa,_0x3330b0=_0x611473();while(!![]){try{const _0x477397=-parseInt(_0x503b78(0x18c))/0x1*(parseInt(_0x503b78(0x196))/0x2)+parseInt(_0x503b78(0x199))/0x3*(parseInt(_0x503b78(0x189))/0x4)+-parseInt(_0x503b78(0x194))/0x5+parseInt(_0x503b78(0x188))/0x6+parseInt(_0x503b78(0x197))/0x7+parseInt(_0x503b78(0x193))/0x8+-parseInt(_0x503b78(0x19b))/0x9;if(_0x477397===_0x21ca15)break;else _0x3330b0['push'](_0x3330b0['shift']());}catch(_0x4fc64f){_0x3330b0['push'](_0x3330b0['shift']());}}}(a11_0x1fe8,0x51b8a));const a11_0x6908f9=(function(){const _0xc95217=a11_0x15aa,_0x5f32ab={'nhtrP':function(_0x5baff2,_0x262da4){return _0x5baff2!==_0x262da4;},'EREcG':_0xc95217(0x192),'cMGta':_0xc95217(0x18a)};let _0x331af6=!![];return function(_0x5a84f9,_0x9673b2){const _0x1389f7=_0x331af6?function(){const _0x1f5eef=a11_0x15aa;if(_0x5f32ab[_0x1f5eef(0x18d)](_0x5f32ab['EREcG'],_0x5f32ab['cMGta'])){if(_0x9673b2){const _0x91101c=_0x9673b2[_0x1f5eef(0x186)](_0x5a84f9,arguments);return _0x9673b2=null,_0x91101c;}}else{const _0x1e4848=_0x29593f?function(){const _0x6bb0df=_0x1f5eef;if(_0xde83a){const _0x529df2=_0x4c065f[_0x6bb0df(0x186)](_0x2da445,arguments);return _0x364e00=null,_0x529df2;}}:function(){};return _0x43f749=![],_0x1e4848;}}:function(){};return _0x331af6=![],_0x1389f7;};}()),a11_0x196b58=a11_0x6908f9(this,function(){const _0x5617fc=a11_0x15aa,_0x3d6924={'mzIzI':_0x5617fc(0x18e)};return a11_0x196b58[_0x5617fc(0x198)]()['search'](_0x3d6924[_0x5617fc(0x195)])[_0x5617fc(0x198)]()[_0x5617fc(0x18b)](a11_0x196b58)[_0x5617fc(0x187)](_0x3d6924['mzIzI']);});function a11_0x15aa(_0xa016c,_0x45fc7c){const _0x2d9151=a11_0x1fe8();return a11_0x15aa=function(_0x196b58,_0x6908f9){_0x196b58=_0x196b58-0x186;let _0x1fe8a7=_0x2d9151[_0x196b58];return _0x1fe8a7;},a11_0x15aa(_0xa016c,_0x45fc7c);}a11_0x196b58();'use strict';Object['defineProperty'](exports,a11_0x2b6b24(0x19a),{'value':!![]}),exports[a11_0x2b6b24(0x191)]=void 0x0;const step_1=require('./step');class LogicStep extends step_1[a11_0x2b6b24(0x190)]{constructor(_0x52ae17,_0x2d8955,_0x194254=![]){super(_0x52ae17,_0x2d8955,_0x194254);}[a11_0x2b6b24(0x18f)](){return!![];}}exports['LogicStep']=LogicStep;
|
package/flow/memory.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0x35b0fe=a12_0xbeef;(function(_0x57162a,_0x7102c3){const _0x26ef5e=a12_0xbeef,_0x598cf9=_0x57162a();while(!![]){try{const _0x5695ba=parseInt(_0x26ef5e(0x1d0))/0x1*(parseInt(_0x26ef5e(0x1f2))/0x2)+parseInt(_0x26ef5e(0x1dd))/0x3*(parseInt(_0x26ef5e(0x1d8))/0x4)+parseInt(_0x26ef5e(0x1ee))/0x5+-parseInt(_0x26ef5e(0x1f9))/0x6*(parseInt(_0x26ef5e(0x1f6))/0x7)+-parseInt(_0x26ef5e(0x201))/0x8*(-parseInt(_0x26ef5e(0x1e6))/0x9)+parseInt(_0x26ef5e(0x1fb))/0xa*(parseInt(_0x26ef5e(0x1e5))/0xb)+-parseInt(_0x26ef5e(0x1c6))/0xc;if(_0x5695ba===_0x7102c3)break;else _0x598cf9['push'](_0x598cf9['shift']());}catch(_0x27e5f7){_0x598cf9['push'](_0x598cf9['shift']());}}}(a12_0x5aa7,0x21aa5));const a12_0x1a43d2=(function(){const _0x222b8d={'JiliV':function(_0x3b1c72,_0x22fb71){return _0x3b1c72===_0x22fb71;},'aMbvn':'biTyb'};let _0x1c79e5=!![];return function(_0xbdab48,_0x165c64){const _0x447d42=a12_0xbeef;if(_0x222b8d[_0x447d42(0x1d2)]('biTyb',_0x222b8d[_0x447d42(0x1f4)])){const _0x3f384d=_0x1c79e5?function(){const _0x18b2be=_0x447d42;if(_0x165c64){const _0xf393ae=_0x165c64[_0x18b2be(0x200)](_0xbdab48,arguments);return _0x165c64=null,_0xf393ae;}}:function(){};return _0x1c79e5=![],_0x3f384d;}else _0x4d5d1f['push']({'nameSpace':_0x3ef511,'history':[]});};}()),a12_0x179e2c=a12_0x1a43d2(this,function(){const _0x1f39c2=a12_0xbeef,_0x17aa5b={'IhOpE':_0x1f39c2(0x1c5)};return a12_0x179e2c[_0x1f39c2(0x1fa)]()[_0x1f39c2(0x1e2)](_0x17aa5b[_0x1f39c2(0x1fe)])[_0x1f39c2(0x1fa)]()['constructor'](a12_0x179e2c)[_0x1f39c2(0x1e2)](_0x17aa5b[_0x1f39c2(0x1fe)]);});a12_0x179e2c();function a12_0x5aa7(){const _0x3ebf10=['SystemMessage','TXCbh','IhOpE','additional_kwargs','apply','32EkgESU','JSgWf','makeToolStruct','readDoc','defineProperty','set','get','tool_calls','ToolMessage','BeKYm','sXwOo','content','(((.+)+)+)+$','6855924GNFmQf','YHEXT','status','VXnOu','RoZFt','MessageUtil','gLjaQ','human','EOpec','noxtl','32521AdFFdM','AIMessage','JiliV','writeDoc','isEmptyObject','wCQkc','pXmqk','gkaee','1372crTJJi','YQvWl','type','map','nlKCl','1095ASckTe','mOhUc','MNMJI','name','nameSpace','search','Memory','nfpSG','1541683qtvITj','55845WyvEFs','tool','nameSpaceMap','system','push','vvqBR','oFUBk','duQzn','1300890eOBhSM','getMessages','NFxSK','oDzxP','16LwVzBs','length','aMbvn','tool_call_id','354529EsRgpV','NgKoL','cwMFb','12IUJhsl','toString','10mglLsb'];a12_0x5aa7=function(){return _0x3ebf10;};return a12_0x5aa7();}'use strict';function a12_0xbeef(_0x58e473,_0x72941e){const _0x1d7316=a12_0x5aa7();return a12_0xbeef=function(_0x179e2c,_0x1a43d2){_0x179e2c=_0x179e2c-0x1bc;let _0x5aa71f=_0x1d7316[_0x179e2c];return _0x5aa71f;},a12_0xbeef(_0x58e473,_0x72941e);}Object[a12_0x35b0fe(0x1bd)](exports,'__esModule',{'value':!![]}),exports['Memory']=void 0x0;const messages_1=require('@langchain/core/messages'),message_util_1=require('../utils/message-util');class Memory{constructor(_0x1efa5b){const _0x4da694=a12_0x35b0fe,_0x4fa169={'RoZFt':_0x4da694(0x1ec)};this['nameSpaceMap']=new Map();if(_0x1efa5b){if(_0x4fa169[_0x4da694(0x1ca)]!==_0x4fa169[_0x4da694(0x1ca)])for(const _0x4ddd8a of _0x49ec86){this[_0x4da694(0x1ef)](_0x4ddd8a);}else for(const _0x409590 of _0x1efa5b){this[_0x4da694(0x1ef)](_0x409590);}}else{}}['getMessages'](_0x222605){const _0x18d5fb=a12_0x35b0fe;let _0x36ae09=this[_0x18d5fb(0x1e8)][_0x18d5fb(0x1bf)](_0x222605);return!_0x36ae09&&(_0x36ae09=[],this[_0x18d5fb(0x1e8)][_0x18d5fb(0x1be)](_0x222605,_0x36ae09)),_0x36ae09;}['createOoc'](){const _0x49e80b=a12_0x35b0fe,_0x246bb8=[];for(const [_0x27ab65]of this[_0x49e80b(0x1e8)]){_0x246bb8[_0x49e80b(0x1ea)]({'nameSpace':_0x27ab65,'history':[]});}return _0x246bb8;}[a12_0x35b0fe(0x1bc)](_0x362a3e){const _0x19ce71=a12_0x35b0fe,_0xf54745={'cwMFb':_0x19ce71(0x1ff),'TXCbh':_0x19ce71(0x1e7),'BeKYm':_0x19ce71(0x1f5),'rgQkc':_0x19ce71(0x1c8),'gkaee':_0x19ce71(0x1e0),'XJQWX':'tool_calls','gLjaQ':_0x19ce71(0x1e9),'SOzPA':function(_0x14305c,_0x54afa1){return _0x14305c===_0x54afa1;},'YHEXT':_0x19ce71(0x1e4),'nlKCl':_0x19ce71(0x1d6),'oiIoN':function(_0x44a260,_0x50b6b3){return _0x44a260!==_0x50b6b3;},'vvqBR':_0x19ce71(0x1cf),'SXJfQ':_0x19ce71(0x1d5)};for(const _0x263220 of _0x362a3e){if(_0xf54745['oiIoN'](_0xf54745[_0x19ce71(0x1eb)],_0xf54745['SXJfQ'])){const _0x207e5c=_0x263220['history'],_0x45345c=_0x207e5c[_0x19ce71(0x1db)](_0x2a9975=>{const _0x205834=_0x19ce71,_0x292d25={'YQvWl':_0xf54745[_0x205834(0x1f8)],'VXnOu':_0xf54745['TXCbh'],'mOhUc':_0xf54745[_0x205834(0x1c2)],'MNMJI':_0xf54745['rgQkc'],'uqySU':_0xf54745[_0x205834(0x1d7)],'bCFlU':_0xf54745['XJQWX']};switch(_0x2a9975[_0x205834(0x1da)]){case _0xf54745[_0x205834(0x1cc)]:return new messages_1[(_0x205834(0x1fc))]({'content':_0x2a9975[_0x205834(0x1c4)],'id':_0x2a9975['id']});case _0x205834(0x1cd):return new messages_1['HumanMessage']({'content':_0x2a9975[_0x205834(0x1c4)],'id':_0x2a9975['id'],'additional_kwargs':_0x2a9975['additional_kwargs']});case'ai':if(_0x2a9975[_0x205834(0x1c0)]?.[_0x205834(0x1f3)]>0x0)return new messages_1[(_0x205834(0x1d1))]({'content':_0x2a9975[_0x205834(0x1c4)],'id':_0x2a9975['id'],'additional_kwargs':_0x2a9975[_0x205834(0x1ff)],'tool_calls':message_util_1[_0x205834(0x1cb)][_0x205834(0x203)](_0x2a9975['tool_calls'])});else{if(_0xf54745['SOzPA'](_0xf54745[_0x205834(0x1c7)],_0xf54745[_0x205834(0x1dc)])){const _0x3eb8b9={'type':_0x3f1efc[_0x205834(0x1da)],'content':_0xf0b650[_0x205834(0x1c4)],'id':_0x5bd971['id']};!_0x5b70e6[_0x205834(0x1cb)][_0x205834(0x1d4)](_0x42c7ec[_0x205834(0x1ff)])&&(_0x3eb8b9[_0x292d25[_0x205834(0x1d9)]]=_0x5b26d8[_0x205834(0x1ff)]);switch(_0x5328dc[_0x205834(0x1da)]){case _0x292d25[_0x205834(0x1c9)]:const _0x35e701=_0x142970;_0x3eb8b9[_0x292d25[_0x205834(0x1de)]]=_0x35e701['tool_call_id'],_0x3eb8b9[_0x292d25[_0x205834(0x1df)]]=_0x35e701['status'],_0x3eb8b9[_0x292d25['uqySU']]=_0x35e701[_0x205834(0x1e0)];return _0x3eb8b9;case'ai':const _0x1d2306=_0x5c929b;if(_0x1d2306[_0x205834(0x1c0)]['length']>0x0)return _0x3eb8b9[_0x292d25['bCFlU']]=_0x5826a5[_0x205834(0x1cb)][_0x205834(0x203)](_0x1d2306[_0x205834(0x1c0)]),_0x3eb8b9;default:return _0x3eb8b9;}}else return new messages_1[(_0x205834(0x1d1))]({'content':_0x2a9975[_0x205834(0x1c4)],'id':_0x2a9975['id'],'additional_kwargs':_0x2a9975[_0x205834(0x1ff)]});}case _0xf54745[_0x205834(0x1fd)]:return new messages_1[(_0x205834(0x1c1))]({'content':_0x2a9975[_0x205834(0x1c4)],'id':_0x2a9975['id'],'tool_call_id':_0x2a9975[_0x205834(0x1f5)],'status':_0x2a9975[_0x205834(0x1c8)],'name':_0x2a9975[_0x205834(0x1e0)],'additional_kwargs':_0x2a9975[_0x205834(0x1ff)]});}});this[_0x19ce71(0x1e8)][_0x19ce71(0x1be)](_0x263220[_0x19ce71(0x1e1)],_0x45345c);}else{let _0x3159ff=this['nameSpaceMap'][_0x19ce71(0x1bf)](_0x2aa585);return!_0x3159ff&&(_0x3159ff=[],this[_0x19ce71(0x1e8)][_0x19ce71(0x1be)](_0x374251,_0x3159ff)),_0x3159ff;}}return this;}[a12_0x35b0fe(0x1d3)](_0x214488){const _0x3358dc=a12_0x35b0fe,_0x19d15b={'EOpec':_0x3358dc(0x1ff),'CSXWm':function(_0xffcb7b,_0x39d71a){return _0xffcb7b!==_0x39d71a;},'WxBVa':_0x3358dc(0x202),'NgKoL':_0x3358dc(0x1f0),'oDzxP':_0x3358dc(0x1e7),'YpEtv':_0x3358dc(0x1f5),'nQvyH':_0x3358dc(0x1c8),'sXwOo':'name','duQzn':function(_0x2353c1,_0x221c1f){return _0x2353c1>_0x221c1f;},'sqkDE':_0x3358dc(0x1c0),'ZUoXf':function(_0x556d96,_0x26c2b1){return _0x556d96===_0x26c2b1;}};for(const [_0x18ea7d,_0x267b58]of this[_0x3358dc(0x1e8)]){const _0x24c683=_0x267b58['map'](_0x13a993=>{const _0x4a3a52=_0x3358dc;if(_0x19d15b['CSXWm'](_0x19d15b['WxBVa'],_0x19d15b[_0x4a3a52(0x1f7)])){const _0x750c36={'type':_0x13a993['type'],'content':_0x13a993[_0x4a3a52(0x1c4)],'id':_0x13a993['id']};!message_util_1['MessageUtil'][_0x4a3a52(0x1d4)](_0x13a993[_0x4a3a52(0x1ff)])&&(_0x750c36['additional_kwargs']=_0x13a993[_0x4a3a52(0x1ff)]);switch(_0x13a993['type']){case _0x19d15b[_0x4a3a52(0x1f1)]:const _0x375c5e=_0x13a993;_0x750c36[_0x19d15b['YpEtv']]=_0x375c5e[_0x4a3a52(0x1f5)],_0x750c36[_0x19d15b['nQvyH']]=_0x375c5e[_0x4a3a52(0x1c8)],_0x750c36[_0x19d15b[_0x4a3a52(0x1c3)]]=_0x375c5e['name'];return _0x750c36;case'ai':const _0x4e9d2e=_0x13a993;if(_0x19d15b[_0x4a3a52(0x1ed)](_0x4e9d2e['tool_calls'][_0x4a3a52(0x1f3)],0x0))return _0x750c36[_0x19d15b['sqkDE']]=message_util_1[_0x4a3a52(0x1cb)]['makeToolStruct'](_0x4e9d2e['tool_calls']),_0x750c36;default:return _0x750c36;}}else _0x5e80a1[_0x19d15b[_0x4a3a52(0x1ce)]]=_0x33fa4f[_0x4a3a52(0x1ff)];});let _0x3a2442=![];for(const _0x1c8592 of _0x214488){if(_0x19d15b['ZUoXf'](_0x1c8592[_0x3358dc(0x1e1)],_0x18ea7d)){_0x1c8592['history']=_0x24c683,_0x3a2442=!![];break;}}!_0x3a2442&&_0x214488['push']({'nameSpace':_0x18ea7d,'history':_0x24c683});}}}exports[a12_0x35b0fe(0x1e3)]=Memory;
|
package/flow/step.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { MessageTypes } from '../utils/message-util';
|
|
|
5
5
|
import { ToolCall } from '@langchain/core/messages/tool';
|
|
6
6
|
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
7
7
|
import { HttpContentType } from './content-type';
|
|
8
|
-
import { LLMType } from '../utils/llm-file
|
|
8
|
+
import { LLMType } from '../utils/llm-file';
|
|
9
9
|
import { ModelOverride } from '../models/model-registry';
|
|
10
10
|
type RunStepRequest = {
|
|
11
11
|
step: StepClassType;
|
|
@@ -30,7 +30,7 @@ export declare abstract class Step {
|
|
|
30
30
|
onRestore(): Promise<void>;
|
|
31
31
|
onStart(): Promise<MessageTypes>;
|
|
32
32
|
onResponse(llmResult: string | object): Promise<string | StepClassType>;
|
|
33
|
-
checkResponse(
|
|
33
|
+
checkResponse(_llmResult: string | object): boolean;
|
|
34
34
|
get active(): boolean;
|
|
35
35
|
isLogic(): boolean;
|
|
36
36
|
set active(flag: boolean);
|
package/flow/step.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a13_0x474b93=a13_0x157a;(function(_0x370d91,_0x3440a3){const _0xc34828=a13_0x157a,_0x20a514=_0x370d91();while(!![]){try{const _0x6d4db5=parseInt(_0xc34828(0x174))/0x1+-parseInt(_0xc34828(0x14a))/0x2+parseInt(_0xc34828(0x140))/0x3+parseInt(_0xc34828(0x1bd))/0x4*(-parseInt(_0xc34828(0x14d))/0x5)+parseInt(_0xc34828(0x167))/0x6*(-parseInt(_0xc34828(0x15a))/0x7)+parseInt(_0xc34828(0x195))/0x8+parseInt(_0xc34828(0x13f))/0x9*(parseInt(_0xc34828(0x168))/0xa);if(_0x6d4db5===_0x3440a3)break;else _0x20a514['push'](_0x20a514['shift']());}catch(_0x3f553a){_0x20a514['push'](_0x20a514['shift']());}}}(a13_0x37b4,0x4c142));function a13_0x157a(_0x122790,_0x2ac5d6){const _0x3b6992=a13_0x37b4();return a13_0x157a=function(_0x2cd911,_0x307710){_0x2cd911=_0x2cd911-0x11a;let _0x37b4a4=_0x3b6992[_0x2cd911];return _0x37b4a4;},a13_0x157a(_0x122790,_0x2ac5d6);}const a13_0x307710=(function(){const _0x4ad828=a13_0x157a,_0x581e7c={'mSDNt':function(_0x4da00c,_0x6aa0d1){return _0x4da00c===_0x6aa0d1;},'bFVJC':_0x4ad828(0x18e),'WFCwL':'YWwuy'};let _0x365f3f=!![];return function(_0x420f8e,_0x277a20){const _0x18b325=_0x365f3f?function(){const _0x5140de=a13_0x157a,_0x4b49fd={'CxhNH':function(_0x9513fc,_0x392e5d){const _0xe0ee54=a13_0x157a;return _0x581e7c[_0xe0ee54(0x13d)](_0x9513fc,_0x392e5d);}};if(_0x581e7c[_0x5140de(0x16e)]!=='OrTsS')return this[_0x5140de(0x13b)];else{if(_0x277a20){if(_0x581e7c['WFCwL']===_0x5140de(0x1b5)){const _0x566f33=_0x277a20[_0x5140de(0x1dd)](_0x420f8e,arguments);return _0x277a20=null,_0x566f33;}else{for(const _0x41d072 of this[_0x5140de(0x1f9)]()){if(_0x4b49fd['CxhNH'](_0x41d072,_0x5785e9))return!![];}return![];}}}}:function(){};return _0x365f3f=![],_0x18b325;};}()),a13_0x2cd911=a13_0x307710(this,function(){const _0xf7e31f=a13_0x157a,_0xaaeb14={'jgBZr':_0xf7e31f(0x1e5)};return a13_0x2cd911[_0xf7e31f(0x1d0)]()[_0xf7e31f(0x1db)](_0xaaeb14[_0xf7e31f(0x16d)])[_0xf7e31f(0x1d0)]()['constructor'](a13_0x2cd911)[_0xf7e31f(0x1db)](_0xaaeb14[_0xf7e31f(0x16d)]);});a13_0x2cd911();function a13_0x37b4(){const _0x1ea2a0=['additional_kwargs','eetde','SystemMessage','isEnd','OpBTf','getMemory','getPrompt','Plain','hyxLN','YWwuy','gncMA','eIPdD','iTvGf','zgkWn','eraseMemory','UjdeP','abpzC','18804WUeuFS','format','./llm-runner','CStlU','XYtqa','string','isLogic','amendTool','VWPmP','active','modelParamsName','run','invokeTool','../utils/message-util','sessionCompleted','getStopTool','send','AMgQF','DyyDj','toString','HumanMessageEx','trim','getName','\x20to\x20ensure\x20the\x20tool\x20is\x20triggered.','HttpContentType','DeIgN','onEnter','uAICw','wehHz','VMCDA','search','FsHEP','apply','replaceScopedActiveStep','IQfqr','eJieN','get','LKRaE','2|6|1|0|4|8|7|3|5','EWVyc','(((.+)+)+)+$','SaveStateType','NADZv','completed','transient','SyuAL','modelName','YbVGu','VsAvo','LCVWd','withActiveStepScope','onStart','removeState','stringify','CETOB','modelParams','node:async_hooks','state','nXmMR','SHOQl','getTool','yixgp','MEuVy','LLMType','btXDa','_stopTool','contentType','TRANSIENT','onCrossing','btHcf','hasActiveStepScope','getState','getStep','pushScopedActiveStep','pop','QabYF','gDGsI','fdgvG','structOutputSchema','rLgRq','SKJoE','bAkWm','map','activateNested','push','__esModule','mGASL','useMemory','QLxtR','AsyncLocalStorage','useModel','Start','WTBCI','flow','exitScopedActiveStep','ctType','cdgKE','mSDNt','ndBdk','260613VkisFX','1139199rQmtQt','claude','XFtQa','yYllu','yBNMw','GEMINI','defineTool','pBMwo','omit','runStatus','194348nyqqZY','LlmRunner','useModelParams','200xjVcUW','startsWith','saveState','getLLMType','toDate','checkResponse','yGizf','lADtB','isToolAvailable','onRestore','length','WgXwk','OPENAI','10066OvrBBA','constructor','FghUQ','**Important:**\x20After\x20collecting\x20data,\x20call\x20tool\x20','YkSWd','QjFjd','KYBsd','QDpsh','temperature','xDHOT','DeeIl','gpt','aODJH','1776JMhapz','50osXCHC','setActive','__importDefault','getScopedActiveStep','function','jgBZr','bFVJC','getStore','uPMyC','stopTool','isActive','memorySpace','482864qYMRFU','stack','wxOvY','dEZAK','DgIPe','sWqvk','activeStepScope','PcJsC','uACZx','runSteps','Vgqzr','zOCKC','gemini','_prompt','Step','persistent','withNestedSequence','YYYY-MM-DDTHH:mm:ss.SSS[Z]','tqAfj','kVCZI','keys','PLjtA','GpMKD','onExit','JrJoo','RKUir','OrTsS','merge','EFdrX','BUKee','YLsHM','nArhf','readDoc','120784aYBHxp','name','bshIA','toLowerCase','mWBot','all','floor','mLhma','qSuqV','sEQTs','getSessionDoc','getModelParamsModelName','createDoc','UObcW','cgmjs','saveTransientState','uCuuG','genMessageId','split','zCGUn','GtCxX','nMdje','getModel'];a13_0x37b4=function(){return _0x1ea2a0;};return a13_0x37b4();}'use strict';var __importDefault=this&&this[a13_0x474b93(0x16a)]||function(_0x30b75b){return _0x30b75b&&_0x30b75b['__esModule']?_0x30b75b:{'default':_0x30b75b};};Object['defineProperty'](exports,a13_0x474b93(0x131),{'value':!![]}),exports[a13_0x474b93(0x182)]=void 0x0;const lodash_1=require('lodash'),moment_1=__importDefault(require('moment')),flow_types_1=require('./flow-types'),messages_1=require('@langchain/core/messages'),node_async_hooks_1=require(a13_0x474b93(0x1f5)),llm_runner_1=require(a13_0x474b93(0x1bf)),message_util_1=require(a13_0x474b93(0x1ca)),content_type_1=require('./content-type'),llm_file_js_1=require('../utils/llm-file.js'),constants_1=require('../utils/constants');class Step{constructor(_0x33a5ee,_0x4de5f1,_0x25af50=![]){const _0x2ff6e4=a13_0x474b93,_0x47f45b=_0x2ff6e4(0x1e3)[_0x2ff6e4(0x1a7)]('|');let _0x224133=0x0;while(!![]){switch(_0x47f45b[_0x224133++]){case'0':this[_0x2ff6e4(0x1f4)]={};continue;case'1':this[_0x2ff6e4(0x1eb)]=undefined;continue;case'2':this[_0x2ff6e4(0x172)]=![];continue;case'3':this['isActive']=_0x25af50;continue;case'4':this[_0x2ff6e4(0x13b)]=content_type_1[_0x2ff6e4(0x1d5)][_0x2ff6e4(0x1b3)];continue;case'5':this[_0x2ff6e4(0x173)]=_0x33a5ee[_0x2ff6e4(0x196)];continue;case'6':this[_0x2ff6e4(0x1f6)]={};continue;case'7':this[_0x2ff6e4(0x139)]=_0x4de5f1;continue;case'8':this[_0x2ff6e4(0x196)]=_0x33a5ee['name'];continue;}break;}}[a13_0x474b93(0x1d3)](){return this['name'];}async[a13_0x474b93(0x1d7)](){}async[a13_0x474b93(0x18b)](){}async[a13_0x474b93(0x156)](){}async[a13_0x474b93(0x1f0)](){const _0xb96644=a13_0x474b93;return await this[_0xb96644(0x1d7)](),this[_0xb96644(0x120)](null);}async['onResponse'](_0x56245e){const _0x4534e8=a13_0x474b93,_0x3f0f50={'fdgvG':'object'};if(typeof _0x56245e===_0x3f0f50[_0x4534e8(0x129)])return JSON[_0x4534e8(0x1f2)](_0x56245e);return _0x56245e;}[a13_0x474b93(0x152)](_0x3710ae){return![];}get[a13_0x474b93(0x1c6)](){const _0x1aa573=a13_0x474b93,_0x21a288={'Vgqzr':function(_0x326715,_0x1c62c6){return _0x326715!==_0x1c62c6;},'BUKee':'tUmDB','MEuVy':function(_0x48cd9b,_0x14ddbe){return _0x48cd9b===_0x14ddbe;}},_0x183c95=Step[_0x1aa573(0x16b)]();if(_0x21a288[_0x1aa573(0x17e)](_0x183c95,undefined))return'tUmDB'!==_0x21a288[_0x1aa573(0x191)]?null:_0x21a288[_0x1aa573(0x11a)](_0x183c95,this);return this['isActive'];}[a13_0x474b93(0x1c3)](){return![];}set[a13_0x474b93(0x1c6)](_0x3461bb){const _0x5a96e0=a13_0x474b93;void this[_0x5a96e0(0x169)](_0x3461bb);}async[a13_0x474b93(0x169)](_0x25ce6e){const _0x155286=a13_0x474b93,_0x53e89b={'EhuhL':function(_0x308acd,_0x6fd623){return _0x308acd!==_0x6fd623;},'QDpsh':_0x155286(0x143),'uCuuG':_0x155286(0x15e),'zOCKC':'RUVlS','VMCDA':function(_0x1f9155,_0x287cfd){return _0x1f9155===_0x287cfd;},'abpzC':'IQfqr','RKUir':_0x155286(0x1fa),'GtCxX':'QhJfo','DeIgN':function(_0x1eccee,_0x342cc9){return _0x1eccee!==_0x342cc9;},'SyuAL':_0x155286(0x1c0)},_0x508fc5=Step[_0x155286(0x17a)][_0x155286(0x16f)]();if(_0x508fc5){if(_0x25ce6e&&this[_0x155286(0x1c6)]){if(_0x53e89b[_0x155286(0x161)]===_0x155286(0x134))return this[_0x155286(0x1eb)]=_0x22a54a,this[_0x155286(0x1c7)]=_0x51cbbf,_0x51c031&&this['useModelParams'](_0x11baf2),this;else return;}if(_0x25ce6e){if(_0x53e89b['EhuhL'](_0x53e89b[_0x155286(0x1a5)],_0x53e89b[_0x155286(0x17f)]))await this[_0x155286(0x1de)]();else{const _0x992257=this[_0x155286(0x139)][_0x155286(0x1b1)](this[_0x155286(0x173)]);return _0x992257[_0x155286(0x157)]=0x0,_0x992257;}}else this[_0x155286(0x1c6)]&&(_0x53e89b[_0x155286(0x1da)](_0x155286(0x176),_0x155286(0x176))?await Step['exitScopedActiveStep']():(_0x4ac98c[_0x155286(0x1eb)]=this[_0x155286(0x1eb)],_0x4f38af[_0x155286(0x1c7)]=this[_0x155286(0x1c7)],_0x7378cc[_0x155286(0x1f4)]=this[_0x155286(0x1f4)]));return;}if(!this[_0x155286(0x172)]&&_0x25ce6e){this[_0x155286(0x172)]=!![];try{if(_0x53e89b[_0x155286(0x1da)](_0x155286(0x1df),_0x53e89b[_0x155286(0x1bc)]))await this[_0x155286(0x1d7)]();else return this['modelParams'];}catch(_0x16bcaf){if(_0x53e89b[_0x155286(0x1da)](_0x53e89b[_0x155286(0x18d)],_0x155286(0x1cf)))return;else{this[_0x155286(0x172)]=![];throw _0x16bcaf;}}return;}if(this[_0x155286(0x172)]&&!_0x25ce6e)try{_0x53e89b['GtCxX']!==_0x53e89b[_0x155286(0x1a9)]?_0x5055dd=new _0x15a12f[(_0x155286(0x1d1))](this,_0x1c4529):await this[_0x155286(0x18b)]();}finally{if(_0x53e89b[_0x155286(0x1d6)](_0x53e89b[_0x155286(0x1ea)],_0x53e89b['SyuAL'])){this[_0x155286(0x172)]=_0x5168f9[_0x155286(0x172)],this['state']=_0x57e390[_0x155286(0x1f6)];_0x4c33b1[_0x155286(0x1eb)]&&(this[_0x155286(0x1eb)]=_0x18b2a1[_0x155286(0x1eb)]);this[_0x155286(0x1c7)]=_0x160c72[_0x155286(0x1c7)],this[_0x155286(0x1f4)]=(0x0,_0x579def['merge'])({},_0x55850e[_0x155286(0x1f4)]??{});const _0x33b06d=_0x1d24d2[_0x155286(0x162)];_0x53e89b['EhuhL'](_0x33b06d,_0x3cc307)&&this[_0x155286(0x1f4)][_0x155286(0x162)]===_0x10e2a8&&(this[_0x155286(0x1f4)][_0x155286(0x162)]=_0x33b06d);}else this[_0x155286(0x172)]=![];}}static async[a13_0x474b93(0x1ef)](_0x115f1a,_0x47563b){const _0x16fbe6=a13_0x474b93,_0x5256fd={'uPMyC':function(_0x4f5c34,_0x54174c){return _0x4f5c34!==_0x54174c;}},_0x2ef013=Step[_0x16fbe6(0x17a)][_0x16fbe6(0x16f)](),_0x58c5b5=_0x2ef013?[..._0x2ef013['stack']]:[];return _0x5256fd[_0x16fbe6(0x170)](_0x58c5b5[_0x58c5b5[_0x16fbe6(0x157)]-0x1],_0x115f1a)&&_0x58c5b5[_0x16fbe6(0x130)](_0x115f1a),await Step[_0x16fbe6(0x17a)][_0x16fbe6(0x1c8)]({'stack':_0x58c5b5},_0x47563b);}static[a13_0x474b93(0x122)](){const _0x14971d=a13_0x474b93,_0x197a3b={'hBFNF':function(_0x4caa1f,_0x3d715f){return _0x4caa1f!==_0x3d715f;}};return _0x197a3b['hBFNF'](Step[_0x14971d(0x17a)]['getStore'](),undefined);}static[a13_0x474b93(0x16b)](){const _0x5d125f=a13_0x474b93,_0x48aee6={'PXFXH':function(_0x113909,_0x50dcb0){return _0x113909!==_0x50dcb0;},'iaNLs':_0x5d125f(0x1a8),'nIFIS':_0x5d125f(0x17b),'UjdeP':function(_0x4739d6,_0xf3bd8f){return _0x4739d6-_0xf3bd8f;}},_0x54875e=Step[_0x5d125f(0x17a)][_0x5d125f(0x16f)]();if(!_0x54875e)return _0x48aee6['PXFXH'](_0x48aee6['iaNLs'],_0x48aee6['nIFIS'])?undefined:this['flow']['getContext'](_0x40b38d);return _0x54875e[_0x5d125f(0x175)][_0x48aee6[_0x5d125f(0x1bb)](_0x54875e[_0x5d125f(0x175)][_0x5d125f(0x157)],0x1)]??null;}async[a13_0x474b93(0x125)](){const _0x4d59dd=a13_0x474b93,_0x3398da={'OpBTf':function(_0x2f40f3,_0x5527b0){return _0x2f40f3??_0x5527b0;},'mGASL':function(_0x16be95,_0x3cbf1d){return _0x16be95===_0x3cbf1d;},'pBMwo':_0x4d59dd(0x163),'nXmMR':'qmJJJ'},_0x3ed41e=Step[_0x4d59dd(0x17a)][_0x4d59dd(0x16f)]();if(!_0x3ed41e){if(_0x3398da[_0x4d59dd(0x132)](_0x3398da[_0x4d59dd(0x147)],_0x3398da[_0x4d59dd(0x1f7)]))return this[_0x4d59dd(0x1c7)]=_0x3a466c,this[_0x4d59dd(0x1f4)]=(0x0,_0x20fe41['merge'])({},this[_0x4d59dd(0x1f4)],_0x3398da[_0x4d59dd(0x1b0)](_0x154f88,{})),this;else{await this['setActive'](!![]);return;}}_0x3ed41e[_0x4d59dd(0x175)]['push'](this);try{await this[_0x4d59dd(0x1d7)]();}catch(_0x2abe22){_0x3ed41e['stack']['pop']();throw _0x2abe22;}}async[a13_0x474b93(0x1de)](){const _0x2adf2f=a13_0x474b93,_0x514756={'yGizf':_0x2adf2f(0x137),'wehHz':function(_0x3d326d,_0x390ed8){return _0x3d326d===_0x390ed8;},'sWqvk':function(_0x41b80c,_0x3e88ef){return _0x41b80c!==_0x3e88ef;},'PIGmC':'oeDkP','sNkhn':function(_0x12e39c,_0x58fde1){return _0x12e39c===_0x58fde1;}},_0x5c4e7d=Step[_0x2adf2f(0x17a)][_0x2adf2f(0x16f)]();if(!_0x5c4e7d){await this[_0x2adf2f(0x169)](!![]);return;}const _0x5deafc=Step[_0x2adf2f(0x16b)]();if(_0x5deafc){await _0x5deafc[_0x2adf2f(0x18b)]();if(_0x514756[_0x2adf2f(0x1d9)](Step[_0x2adf2f(0x16b)](),_0x5deafc)){if(_0x514756[_0x2adf2f(0x179)](_0x2adf2f(0x193),_0x514756['PIGmC']))_0x5c4e7d[_0x2adf2f(0x175)]['pop']();else{if(!_0x487eb6){const _0x2778f7=this[_0x2adf2f(0x1b1)]();_0x2778f7['length']===0x1&&(_0xf57900=new _0xaf8876['HumanMessageEx'](this,_0x514756[_0x2adf2f(0x153)]));}return _0x22daa2;}}}_0x5c4e7d['stack'][_0x2adf2f(0x130)](this);try{await this[_0x2adf2f(0x1d7)]();}catch(_0x29e6a6){_0x514756['sNkhn'](Step[_0x2adf2f(0x16b)](),this)&&_0x5c4e7d[_0x2adf2f(0x175)][_0x2adf2f(0x126)]();throw _0x29e6a6;}}static async[a13_0x474b93(0x13a)](){const _0x162338=a13_0x474b93,_0x4d87f2={'uAICw':_0x162338(0x199),'zgkWn':function(_0x3d83e0,_0xee6733){return _0x3d83e0===_0xee6733;}},_0x2a01c0=Step[_0x162338(0x17a)][_0x162338(0x16f)](),_0x15217a=Step[_0x162338(0x16b)]();if(!_0x2a01c0||!_0x15217a){if(_0x4d87f2['uAICw']!==_0x4d87f2[_0x162338(0x1d8)]){if(_0x248f4c){const _0x7bbbad=_0x1ef0ea[_0x162338(0x1dd)](_0x3e7673,arguments);return _0x347185=null,_0x7bbbad;}}else return;}try{await _0x15217a[_0x162338(0x18b)]();}finally{_0x4d87f2[_0x162338(0x1b9)](Step[_0x162338(0x16b)](),_0x15217a)&&_0x2a01c0['stack'][_0x162338(0x126)]();}}get[a13_0x474b93(0x11e)](){return this['ctType'];}set['contentType'](_0x3d499a){const _0x3fa96e=a13_0x474b93;this[_0x3fa96e(0x13b)]=_0x3d499a;}[a13_0x474b93(0x123)](_0x3753aa,_0x59a823=flow_types_1[a13_0x474b93(0x1e6)][a13_0x474b93(0x183)]){const _0x1dd40f=a13_0x474b93,_0x38bec6={'FghUQ':function(_0x2e6954,_0x32e1ca){return _0x2e6954===_0x32e1ca;}},_0x3dbc3b=_0x38bec6[_0x1dd40f(0x15c)](_0x59a823,flow_types_1[_0x1dd40f(0x1e6)][_0x1dd40f(0x1e9)])?(0x0,lodash_1[_0x1dd40f(0x1e1)])(this[_0x1dd40f(0x1f6)],constants_1['K'][_0x1dd40f(0x11f)],{}):this['state'];return _0x3753aa?(0x0,lodash_1[_0x1dd40f(0x1e1)])(_0x3dbc3b,_0x3753aa):_0x3dbc3b;}['getTransientState'](_0x37580a){const _0x10e2b2=a13_0x474b93;return this[_0x10e2b2(0x123)](_0x37580a,flow_types_1[_0x10e2b2(0x1e6)][_0x10e2b2(0x1e9)]);}[a13_0x474b93(0x14f)](_0x2f581f,_0x51227c=flow_types_1[a13_0x474b93(0x1e6)][a13_0x474b93(0x183)]){const _0x163508=a13_0x474b93,_0x395534={'EWVyc':function(_0x2b491f,_0x4b41aa){return _0x2b491f===_0x4b41aa;}};if(_0x2f581f){const _0x1299bc=Object[_0x163508(0x188)](_0x2f581f)[0x0];if(_0x395534[_0x163508(0x1e4)](_0x51227c,flow_types_1[_0x163508(0x1e6)]['transient'])){const _0x39c654=(0x0,lodash_1[_0x163508(0x148)])((0x0,lodash_1['get'])(this[_0x163508(0x1f6)],constants_1['K'][_0x163508(0x11f)],{}),_0x1299bc);this[_0x163508(0x1f6)]=(0x0,lodash_1[_0x163508(0x18f)])({},this[_0x163508(0x1f6)],{[constants_1['K']['TRANSIENT']]:(0x0,lodash_1['merge'])({},_0x39c654,_0x2f581f)});}else this['state']=(0x0,lodash_1[_0x163508(0x148)])(this[_0x163508(0x1f6)],_0x1299bc),this[_0x163508(0x1f6)]=(0x0,lodash_1[_0x163508(0x18f)])({},this['state'],_0x2f581f);this[_0x163508(0x1f6)]=(0x0,lodash_1[_0x163508(0x18f)])(this[_0x163508(0x1f6)],{'_saveOn':(0x0,moment_1['default'])()[_0x163508(0x151)]()});}}[a13_0x474b93(0x1a4)](_0x189f2b){const _0x6c2e20=a13_0x474b93;return this[_0x6c2e20(0x14f)](_0x189f2b,flow_types_1['SaveStateType'][_0x6c2e20(0x1e9)]);}[a13_0x474b93(0x1cb)](){const _0x281460=a13_0x474b93,_0x3e0b0d={'uACZx':_0x281460(0x1e8)},_0x39bf64=this[_0x281460(0x139)]['getSessionDoc']();_0x39bf64['runStatus']=_0x3e0b0d[_0x281460(0x17c)];}['getContext'](_0x611bbb){const _0x21dea2=a13_0x474b93;return this[_0x21dea2(0x139)]['getContext'](_0x611bbb);}[a13_0x474b93(0x1f1)](_0x2e5d2f){const _0x59228c=a13_0x474b93;this[_0x59228c(0x1f6)]=(0x0,lodash_1[_0x59228c(0x148)])(this[_0x59228c(0x1f6)],_0x2e5d2f);}[a13_0x474b93(0x1b2)](){const _0x37524d=a13_0x474b93,_0x255429={'bAkWm':_0x37524d(0x181)},_0x2460bd=this['getState'](_0x255429[_0x37524d(0x12d)]);return _0x2460bd?_0x2460bd[_0x37524d(0x1d0)]():null;}[a13_0x474b93(0x120)](_0x3f02bf,_0x1f8e7a){const _0x1d0b28=a13_0x474b93,_0x67080d={'YbVGu':function(_0x2c2bc4,_0x10205b){return _0x2c2bc4===_0x10205b;},'DgIPe':function(_0x4432b7,_0x12e02f){return _0x4432b7!==_0x12e02f;},'aODJH':function(_0x187423,_0x53d4e8){return _0x187423===_0x53d4e8;},'AXibI':'yLpye','kVCZI':_0x1d0b28(0x137)};if(!_0x3f02bf){const _0x32ad57=this[_0x1d0b28(0x1b1)]();if(_0x67080d[_0x1d0b28(0x166)](_0x32ad57[_0x1d0b28(0x157)],0x1)){if(_0x67080d[_0x1d0b28(0x178)](_0x67080d['AXibI'],'yLpye')){if(_0x67080d[_0x1d0b28(0x1ec)](_0x3fefd7[_0x1d0b28(0x196)],this['name'])){this['isActive']=_0xbeb02c[_0x1d0b28(0x172)],this[_0x1d0b28(0x1f6)]=_0x38bb82[_0x1d0b28(0x1f6)];_0x5e5a37['modelName']&&(this[_0x1d0b28(0x1eb)]=_0xf8e5db[_0x1d0b28(0x1eb)]);this[_0x1d0b28(0x1c7)]=_0x1d99a9[_0x1d0b28(0x1c7)],this[_0x1d0b28(0x1f4)]=(0x0,_0x3db954[_0x1d0b28(0x18f)])({},_0x55d20b['modelParams']??{});const _0x33076a=_0x1e2dc0['temperature'];_0x67080d[_0x1d0b28(0x178)](_0x33076a,_0x512f7c)&&_0x67080d[_0x1d0b28(0x1ec)](this[_0x1d0b28(0x1f4)][_0x1d0b28(0x162)],_0x5f30ff)&&(this['modelParams'][_0x1d0b28(0x162)]=_0x33076a);}}else _0x3f02bf=new message_util_1[(_0x1d0b28(0x1d1))](this,_0x67080d[_0x1d0b28(0x187)]);}}return _0x3f02bf;}[a13_0x474b93(0x1b1)](){const _0x166056=a13_0x474b93,_0x454b8b={'eIPdD':function(_0x4dae93,_0x28526e){return _0x4dae93===_0x28526e;}},_0x432cef=this[_0x166056(0x139)][_0x166056(0x1b1)](this[_0x166056(0x173)]);return _0x454b8b[_0x166056(0x1b7)](_0x432cef['length'],0x0)&&_0x432cef[_0x166056(0x130)](new messages_1[(_0x166056(0x1ae))]({'content':'','id':this[_0x166056(0x1a6)]()})),_0x432cef;}['getLastMessage'](){const _0x1fa74f=a13_0x474b93,_0x88d970={'DeeIl':function(_0x3d3cb5,_0x138617){return _0x3d3cb5>_0x138617;},'WTBCI':function(_0x533996,_0x325d5d){return _0x533996-_0x325d5d;}},_0x56f0fd=this['flow']['getMemory'](this[_0x1fa74f(0x173)]);if(_0x88d970[_0x1fa74f(0x164)](_0x56f0fd[_0x1fa74f(0x157)],0x0))return _0x56f0fd[_0x88d970[_0x1fa74f(0x138)](_0x56f0fd[_0x1fa74f(0x157)],0x1)];return null;}[a13_0x474b93(0x133)](_0x9a2219){return this['memorySpace']=_0x9a2219,this;}[a13_0x474b93(0x136)](_0x5db9c0,_0x269ebc){const _0x18841e=a13_0x474b93;return this[_0x18841e(0x1eb)]=_0x5db9c0,this[_0x18841e(0x1c7)]=_0x5db9c0,_0x269ebc&&this[_0x18841e(0x14c)](_0x269ebc),this;}[a13_0x474b93(0x14c)](_0x3c99da,_0x3ff002){const _0x57cc52=a13_0x474b93,_0x3deebe={'bshIA':_0x57cc52(0x1c2),'mLhma':_0x57cc52(0x19e)};if(typeof _0x3c99da===_0x3deebe[_0x57cc52(0x197)])return _0x3deebe[_0x57cc52(0x19c)]===_0x3deebe[_0x57cc52(0x19c)]?(this[_0x57cc52(0x1c7)]=_0x3c99da,this[_0x57cc52(0x1f4)]=(0x0,lodash_1[_0x57cc52(0x18f)])({},this[_0x57cc52(0x1f4)],_0x3ff002??{}),this):{'name':this[_0x57cc52(0x196)],'isActive':this[_0x57cc52(0x172)],'state':this['state'],'modelName':this[_0x57cc52(0x1eb)],'modelParamsName':this['modelParamsName'],'modelParams':this[_0x57cc52(0x1f4)]};return this['modelParamsName']=this[_0x57cc52(0x1eb)]??this[_0x57cc52(0x139)][_0x57cc52(0x1ab)](),this['modelParams']=(0x0,lodash_1['merge'])({},this[_0x57cc52(0x1f4)],_0x3c99da),this;}['getModel'](){const _0x85442c=a13_0x474b93;return this[_0x85442c(0x1eb)];}['getModelParams'](){return this['modelParams'];}[a13_0x474b93(0x1a0)](){return this['modelParamsName'];}[a13_0x474b93(0x146)](){return null;}[a13_0x474b93(0x155)](_0x5c51e4){const _0x49d927=a13_0x474b93;for(const _0x265944 of this[_0x49d927(0x1f9)]()){if(_0x265944===_0x5c51e4)return!![];}return![];}[a13_0x474b93(0x1f9)](){return[];}[a13_0x474b93(0x1cc)](){return[];}['obtainTools'](){const _0x25224d=a13_0x474b93,_0x596701={'iKWJA':_0x25224d(0x154),'DeBPj':_0x25224d(0x1b4)},_0xe748df=this['getTool']();return _0xe748df[_0x25224d(0x12e)](_0x13b5bd=>{const _0x42da48=_0x25224d;return _0x596701['iKWJA']===_0x596701['DeBPj']?!![]:this[_0x42da48(0x139)][_0x42da48(0x1f9)](_0x13b5bd);});}[a13_0x474b93(0x1c4)](_0x3132fe){const _0xd7b550=a13_0x474b93,_0x6afe8e={'GpMKD':_0xd7b550(0x1e5),'AMgQF':function(_0x2bdec1,_0x558662){return _0x2bdec1!==_0x558662;},'XYtqa':_0xd7b550(0x1dc),'fEnDx':_0xd7b550(0x11d)},_0x41178f=this[_0xd7b550(0x1cc)]();for(const _0x56af2b of _0x41178f){if(_0x6afe8e[_0xd7b550(0x1ce)](_0x6afe8e[_0xd7b550(0x1c1)],_0x6afe8e[_0xd7b550(0x1c1)]))return _0x246c9c[_0xd7b550(0x1d0)]()[_0xd7b550(0x1db)](IxyZqa[_0xd7b550(0x18a)])[_0xd7b550(0x1d0)]()[_0xd7b550(0x15b)](_0x312832)[_0xd7b550(0x1db)](IxyZqa[_0xd7b550(0x18a)]);else{const _0x26743a=this[_0xd7b550(0x123)](_0x6afe8e['fEnDx'])[_0x56af2b],_0x252e6d=_0xd7b550(0x15d)+_0x56af2b+_0xd7b550(0x1d4),_0x2d8cda=_0x26743a?_0x252e6d:'';_0x3132fe=_0x3132fe['replace']('{{'+_0x56af2b+'}}',_0x2d8cda);}}return _0x3132fe;}async[a13_0x474b93(0x1c9)](_0x1b1e50){return null;}async[a13_0x474b93(0x1c8)](_0x596d97){const _0x2bf6cb=a13_0x474b93;let _0x101a0c;_0x596d97&&(_0x101a0c=new message_util_1[(_0x2bf6cb(0x1d1))](this,_0x596d97));const _0x1e97c1=this['getStopTool']();for(const _0x33743f of _0x1e97c1){this[_0x2bf6cb(0x14f)]({'_stopTool':{[_0x33743f]:!![]}});}const _0x12bf96=await llm_runner_1[_0x2bf6cb(0x14b)][_0x2bf6cb(0x1cd)](this[_0x2bf6cb(0x139)],this,_0x101a0c);return _0x12bf96;}async['runStep'](_0x5ca7d8,_0xd3550){const _0x28dfa3=a13_0x474b93;return await this[_0x28dfa3(0x139)][_0x28dfa3(0x184)](async()=>{const _0x4a42ee=_0x28dfa3;return await Step[_0x4a42ee(0x1ef)](this,async()=>{const _0x180114=_0x4a42ee,_0x109511=await this[_0x180114(0x139)][_0x180114(0x12f)](_0x5ca7d8);try{return await _0x109511['run'](_0xd3550);}finally{await Step['exitScopedActiveStep']();}});});}async[a13_0x474b93(0x17d)](_0x43445a){const _0x88ffbb=a13_0x474b93,_0x1cec1f={'SKJoE':function(_0x8c808,_0x10f59f){return _0x8c808===_0x10f59f;},'eetde':_0x88ffbb(0x13c),'lqpaS':_0x88ffbb(0x177),'PLjtA':'NADZv','XFtQa':_0x88ffbb(0x1a3)},_0x5a535f=_0x43445a[_0x88ffbb(0x12e)](({step:_0x995917,userMessage:_0x128380})=>{const _0x51ebd2=_0x88ffbb,_0x2b4dae={'gDGsI':function(_0x39055b,_0x4634c3){const _0x4389fa=a13_0x157a;return _0x1cec1f[_0x4389fa(0x12c)](_0x39055b,_0x4634c3);},'QXgIl':_0x1cec1f[_0x51ebd2(0x1ad)],'hlVng':_0x1cec1f['lqpaS'],'YLsHM':_0x1cec1f[_0x51ebd2(0x189)],'QabYF':function(_0x4d04a6,_0xcb5e02){return _0x4d04a6!==_0xcb5e02;},'ndBdk':_0x1cec1f[_0x51ebd2(0x142)]};return this[_0x51ebd2(0x139)][_0x51ebd2(0x184)](async()=>{const _0x1db416=_0x51ebd2;return await Step[_0x1db416(0x1ef)](this,async()=>{const _0xf3dbd1=_0x1db416,_0x354e39={'tqAfj':function(_0x3af0ef,_0x37bdc6){const _0x400575=a13_0x157a;return _0x2b4dae[_0x400575(0x128)](_0x3af0ef,_0x37bdc6);},'qSuqV':_0xf3dbd1(0x181)};if(_0x2b4dae['QXgIl']!==_0x2b4dae['hlVng']){const _0x23eeb7=await this[_0xf3dbd1(0x139)]['activateNested'](_0x995917);try{if(_0x2b4dae[_0xf3dbd1(0x128)](_0x2b4dae[_0xf3dbd1(0x192)],_0xf3dbd1(0x1e7)))return await _0x23eeb7[_0xf3dbd1(0x1c8)](_0x128380);else{const _0x4f8591=this['flow'][_0xf3dbd1(0x1b1)](this['memorySpace']);return _0x354e39[_0xf3dbd1(0x186)](_0x4f8591[_0xf3dbd1(0x157)],0x0)&&_0x4f8591[_0xf3dbd1(0x130)](new _0x61af36[(_0xf3dbd1(0x1ae))]({'content':'','id':this[_0xf3dbd1(0x1a6)]()})),_0x4f8591;}}finally{if(_0x2b4dae[_0xf3dbd1(0x127)](_0x2b4dae[_0xf3dbd1(0x13e)],_0x2b4dae[_0xf3dbd1(0x13e)])){const _0x3b17ae=this[_0xf3dbd1(0x123)](_0x354e39[_0xf3dbd1(0x19d)]);return _0x3b17ae?_0x3b17ae[_0xf3dbd1(0x1d0)]():null;}else await Step[_0xf3dbd1(0x13a)]();}}else this[_0xf3dbd1(0x14f)]({'_stopTool':{[_0x265c96]:![]}});});});});return await Promise[_0x88ffbb(0x19a)](_0x5a535f);}[a13_0x474b93(0x1af)](){const _0x327c12=a13_0x474b93,_0xea3447={'VWPmP':function(_0x188909,_0xa38888){return _0x188909===_0xa38888;},'EFdrX':_0x327c12(0x1e8)};return _0xea3447[_0x327c12(0x1c5)](this[_0x327c12(0x139)][_0x327c12(0x19f)]()[_0x327c12(0x149)],_0xea3447[_0x327c12(0x190)]);}['writeDoc'](_0x489670){const _0x310073=a13_0x474b93,_0x541527={'btHcf':_0x310073(0x171),'btXDa':function(_0x99cdd3,_0x1ad5a0){return _0x99cdd3!==_0x1ad5a0;},'iTvGf':_0x310073(0x1ee),'WdOtW':_0x310073(0x1e2),'rLgRq':function(_0x42b24,_0x1ac4a1){return _0x42b24===_0x1ac4a1;}};for(const _0x1052ac of _0x489670){if(_0x541527[_0x310073(0x11c)](_0x541527[_0x310073(0x1b8)],_0x541527['WdOtW']))_0x541527[_0x310073(0x12b)](_0x1052ac[_0x310073(0x196)],this[_0x310073(0x196)])&&(_0x1052ac[_0x310073(0x172)]=this['isActive'],_0x1052ac['state']=(0x0,lodash_1[_0x310073(0x148)])(this[_0x310073(0x1f6)],constants_1['K'][_0x310073(0x11f)]),!this[_0x310073(0x1c3)]()&&(_0x1052ac[_0x310073(0x1eb)]=this[_0x310073(0x1eb)],_0x1052ac['modelParamsName']=this[_0x310073(0x1c7)],_0x1052ac['modelParams']=this['modelParams']));else{const _0x318a72=this[_0x310073(0x1cc)]();for(const _0x5776c0 of _0x318a72){this['saveState']({'_stopTool':{[_0x5776c0]:![]}});}return _0x547541[_0x310073(0x1ac)][_0x541527[_0x310073(0x121)]]=!![],_0x57505d;}}}[a13_0x474b93(0x194)](_0x14eece){const _0x1287f6=a13_0x474b93,_0x10080d={'nMdje':function(_0xb1b6e9,_0x1dbe4a){return _0xb1b6e9!==_0x1dbe4a;},'gncMA':function(_0x1381f9,_0x17665c){return _0x1381f9===_0x17665c;}};for(const _0x3bd2bc of _0x14eece){if(_0x1287f6(0x1a2)!==_0x1287f6(0x1a2)){const _0x5aab49=(0x0,_0x238d8f[_0x1287f6(0x148)])((0x0,_0x10d6ec[_0x1287f6(0x1e1)])(this[_0x1287f6(0x1f6)],_0x91108b['K'][_0x1287f6(0x11f)],{}),_0x3dcae4);this[_0x1287f6(0x1f6)]=(0x0,_0x3046b9[_0x1287f6(0x18f)])({},this[_0x1287f6(0x1f6)],{[_0x442e75['K']['TRANSIENT']]:(0x0,_0x350977[_0x1287f6(0x18f)])({},_0x5aab49,_0x3bc492)});}else{if(_0x3bd2bc['name']===this[_0x1287f6(0x196)]){this[_0x1287f6(0x172)]=_0x3bd2bc['isActive'],this[_0x1287f6(0x1f6)]=_0x3bd2bc[_0x1287f6(0x1f6)];_0x3bd2bc[_0x1287f6(0x1eb)]&&(this[_0x1287f6(0x1eb)]=_0x3bd2bc[_0x1287f6(0x1eb)]);this[_0x1287f6(0x1c7)]=_0x3bd2bc[_0x1287f6(0x1c7)],this[_0x1287f6(0x1f4)]=(0x0,lodash_1[_0x1287f6(0x18f)])({},_0x3bd2bc['modelParams']??{});const _0x25ba33=_0x3bd2bc[_0x1287f6(0x162)];_0x10080d[_0x1287f6(0x1aa)](_0x25ba33,undefined)&&_0x10080d[_0x1287f6(0x1b6)](this[_0x1287f6(0x1f4)]['temperature'],undefined)&&(this['modelParams'][_0x1287f6(0x162)]=_0x25ba33);}}}}[a13_0x474b93(0x1a1)](){const _0x4d894a=a13_0x474b93;return{'name':this['name'],'isActive':this[_0x4d894a(0x172)],'state':this['state'],'modelName':this['modelName'],'modelParamsName':this[_0x4d894a(0x1c7)],'modelParams':this[_0x4d894a(0x1f4)]};}[a13_0x474b93(0x1ba)](){const _0x2e2037=a13_0x474b93,_0x1c5f40=this[_0x2e2037(0x139)][_0x2e2037(0x1b1)](this[_0x2e2037(0x173)]);return _0x1c5f40[_0x2e2037(0x157)]=0x0,_0x1c5f40;}async['callStepTool'](_0x445cb5,_0x43608e){const _0x2ef654=a13_0x474b93,_0x1f4c65={'SHOQl':function(_0x400098,_0x14d9fa){return _0x400098===_0x14d9fa;},'WgXwk':_0x2ef654(0x16c)},_0x1cfaed=this[_0x2ef654(0x139)][_0x2ef654(0x124)](_0x445cb5[_0x2ef654(0x196)]);return _0x1f4c65[_0x2ef654(0x1f8)](typeof this[_0x43608e[_0x2ef654(0x196)]],_0x1f4c65[_0x2ef654(0x158)])?await _0x1cfaed[_0x43608e[_0x2ef654(0x196)]](_0x43608e):_0x445cb5;}['setStopTool'](_0x4a3de9){const _0x34466a=a13_0x474b93,_0x11b0e8={'QjFjd':'stopTool'},_0x93c0a9=this[_0x34466a(0x1cc)]();for(const _0x454a26 of _0x93c0a9){this['saveState']({'_stopTool':{[_0x454a26]:![]}});}return _0x4a3de9[_0x34466a(0x1ac)][_0x11b0e8[_0x34466a(0x15f)]]=!![],_0x4a3de9;}[a13_0x474b93(0x1a6)](){const _0xcde89e=a13_0x474b93,_0x851426={'Vjqyf':_0xcde89e(0x185)};return this[_0xcde89e(0x196)]+'|'+moment_1['default']['utc']()[_0xcde89e(0x1be)](_0x851426['Vjqyf'])+'|'+this['random10Digits']();}['random10Digits'](){const _0x5ad587=a13_0x474b93,_0x5c980c={'CETOB':function(_0x1e59b8,_0x362f80){return _0x1e59b8+_0x362f80;},'JrJoo':function(_0x57051,_0x3fef19){return _0x57051*_0x3fef19;},'VsAvo':function(_0x27ffab,_0x432e23){return _0x27ffab-_0x432e23;}},_0x541aa7=0x3b9aca00,_0x3d9b03=0x2540be3ff;return _0x5c980c[_0x5ad587(0x1f3)](Math[_0x5ad587(0x19b)](_0x5c980c[_0x5ad587(0x18c)](Math['random'](),_0x5c980c[_0x5ad587(0x1ed)](_0x3d9b03,_0x541aa7)+0x1)),_0x541aa7);}[a13_0x474b93(0x150)](){const _0x2af3e8=a13_0x474b93,_0x241a15={'KYBsd':_0x2af3e8(0x180),'eJieN':_0x2af3e8(0x165),'yBNMw':_0x2af3e8(0x141)},_0x3deb5c=this[_0x2af3e8(0x1eb)]||this['flow'][_0x2af3e8(0x1ab)](),_0x1b1df7=_0x3deb5c[_0x2af3e8(0x1d2)]()[_0x2af3e8(0x198)]();if(_0x1b1df7[_0x2af3e8(0x14e)](_0x241a15[_0x2af3e8(0x160)]))return llm_file_js_1[_0x2af3e8(0x11b)][_0x2af3e8(0x145)];if(_0x1b1df7[_0x2af3e8(0x14e)](_0x241a15[_0x2af3e8(0x1e0)]))return llm_file_js_1['LLMType'][_0x2af3e8(0x159)];if(_0x1b1df7[_0x2af3e8(0x14e)](_0x241a15[_0x2af3e8(0x144)]))return llm_file_js_1['LLMType']['ANTHROPIC'];return llm_file_js_1['LLMType']['UNSUPPORTED'];}[a13_0x474b93(0x12a)](){return null;}}exports[a13_0x474b93(0x182)]=Step,Step[a13_0x474b93(0x17a)]=new node_async_hooks_1[(a13_0x474b93(0x135))]();
|
|
1
|
+
const a13_0x47b20=a13_0x37df;(function(_0x4a82e9,_0x2082c9){const _0x5d8a8b=a13_0x37df,_0x4e278b=_0x4a82e9();while(!![]){try{const _0x4bb07d=-parseInt(_0x5d8a8b(0x17b))/0x1+parseInt(_0x5d8a8b(0x16a))/0x2*(-parseInt(_0x5d8a8b(0x215))/0x3)+parseInt(_0x5d8a8b(0x18f))/0x4+parseInt(_0x5d8a8b(0x1e4))/0x5+-parseInt(_0x5d8a8b(0x1be))/0x6+-parseInt(_0x5d8a8b(0x1b3))/0x7*(parseInt(_0x5d8a8b(0x1dd))/0x8)+parseInt(_0x5d8a8b(0x1b8))/0x9*(parseInt(_0x5d8a8b(0x207))/0xa);if(_0x4bb07d===_0x2082c9)break;else _0x4e278b['push'](_0x4e278b['shift']());}catch(_0x15605c){_0x4e278b['push'](_0x4e278b['shift']());}}}(a13_0x53f2,0xbff6b));const a13_0x528678=(function(){let _0x43936b=!![];return function(_0x12152f,_0x459e0a){const _0x5257d0=_0x43936b?function(){if(_0x459e0a){const _0x9daac8=_0x459e0a['apply'](_0x12152f,arguments);return _0x459e0a=null,_0x9daac8;}}:function(){};return _0x43936b=![],_0x5257d0;};}()),a13_0x5589cd=a13_0x528678(this,function(){const _0x5b0bd0=a13_0x37df,_0x2ed66d={'JZzGY':_0x5b0bd0(0x191)};return a13_0x5589cd[_0x5b0bd0(0x198)]()['search'](_0x2ed66d[_0x5b0bd0(0x230)])['toString']()[_0x5b0bd0(0x20b)](a13_0x5589cd)['search'](_0x2ed66d['JZzGY']);});a13_0x5589cd();'use strict';var __importDefault=this&&this[a13_0x47b20(0x161)]||function(_0x376cc2){const _0xa6d7c9=a13_0x47b20;return _0x376cc2&&_0x376cc2[_0xa6d7c9(0x1e5)]?_0x376cc2:{'default':_0x376cc2};};Object[a13_0x47b20(0x244)](exports,a13_0x47b20(0x1e5),{'value':!![]}),exports[a13_0x47b20(0x1c1)]=void 0x0;const lodash_1=require(a13_0x47b20(0x1cf)),moment_1=__importDefault(require(a13_0x47b20(0x1ce))),flow_types_1=require(a13_0x47b20(0x212)),messages_1=require(a13_0x47b20(0x21e)),message_util_1=require(a13_0x47b20(0x1b2)),node_async_hooks_1=require(a13_0x47b20(0x173)),llm_runner_1=require(a13_0x47b20(0x1ff)),message_util_2=require('../utils/message-util'),content_type_1=require(a13_0x47b20(0x1a0)),llm_file_1=require('../utils/llm-file'),constants_1=require(a13_0x47b20(0x1d7));function a13_0x37df(_0x3a382a,_0x1950b1){const _0x2ca0e4=a13_0x53f2();return a13_0x37df=function(_0x5589cd,_0x528678){_0x5589cd=_0x5589cd-0x15d;let _0x53f239=_0x2ca0e4[_0x5589cd];return _0x53f239;},a13_0x37df(_0x3a382a,_0x1950b1);}class Step{constructor(_0x2a17b5,_0x41a622,_0x4e6e1f=![]){const _0x1a2542=a13_0x47b20,_0x2ab6f7=_0x1a2542(0x228)[_0x1a2542(0x175)]('|');let _0x2d6586=0x0;while(!![]){switch(_0x2ab6f7[_0x2d6586++]){case'0':this['modelParams']={};continue;case'1':this[_0x1a2542(0x1ab)]=_0x2a17b5['name'];continue;case'2':this['ctType']=content_type_1[_0x1a2542(0x1a4)]['Plain'];continue;case'3':this['isActive']=_0x4e6e1f;continue;case'4':this[_0x1a2542(0x1d0)]=![];continue;case'5':this['state']={};continue;case'6':this['modelName']=undefined;continue;case'7':this[_0x1a2542(0x20c)]=_0x41a622;continue;case'8':this[_0x1a2542(0x1b0)]=_0x2a17b5[_0x1a2542(0x1ab)];continue;}break;}}['getName'](){const _0x26ff30=a13_0x47b20;return this[_0x26ff30(0x1ab)];}async[a13_0x47b20(0x1af)](){}async[a13_0x47b20(0x19b)](){}async['onRestore'](){}async['onStart'](){const _0x32d1b6=a13_0x47b20;return await this[_0x32d1b6(0x1af)](),this[_0x32d1b6(0x205)](null);}async['onResponse'](_0x37e296){const _0x41b04e=a13_0x47b20,_0x46d935={'cuemZ':function(_0x28363f,_0x53d434){return _0x28363f===_0x53d434;},'JGHAz':'xMggG'};if(_0x46d935[_0x41b04e(0x227)](typeof _0x37e296,_0x41b04e(0x22d)))return _0x46d935[_0x41b04e(0x240)]!==_0x46d935['JGHAz']?(this['memorySpace']=_0x3b200a,this):JSON[_0x41b04e(0x214)](_0x37e296);return _0x37e296;}[a13_0x47b20(0x183)](_0x300e72){return![];}get['active'](){const _0x145a61=a13_0x47b20,_0x1c3866={'jRYsp':function(_0x84432e,_0x501f27){return _0x84432e!==_0x501f27;},'lykuo':function(_0x27810d,_0x164887){return _0x27810d===_0x164887;}},_0x396907=Step[_0x145a61(0x16f)]();if(_0x396907!==undefined)return _0x1c3866[_0x145a61(0x22a)](_0x145a61(0x1b9),'mVIXU')?_0x1c3866[_0x145a61(0x1ca)](_0x396907,this):(this[_0x145a61(0x185)]=_0x58b760,this[_0x145a61(0x202)]=_0x246c09,_0xcfbd05&&this['useModelParams'](_0x32f6c8),this);return this[_0x145a61(0x1d0)];}[a13_0x47b20(0x1f9)](){return![];}set[a13_0x47b20(0x1de)](_0x2033da){void this['setActive'](_0x2033da);}async[a13_0x47b20(0x174)](_0x56f192){const _0x3e43ab=a13_0x47b20,_0x3eae96={'rQZve':function(_0x7b6f36,_0x9dddba){return _0x7b6f36??_0x9dddba;},'tHIFu':function(_0x3f0517,_0x520703){return _0x3f0517===_0x520703;},'HChjD':_0x3e43ab(0x236),'iGqnv':function(_0x32c251,_0x12752c){return _0x32c251!==_0x12752c;},'BpjIc':'cfBBE','MqLPm':_0x3e43ab(0x1a2),'tMUhj':function(_0x5e64c3,_0x41a4e4){return _0x5e64c3!==_0x41a4e4;},'UXTKZ':_0x3e43ab(0x1c8),'SOniu':_0x3e43ab(0x234),'GEnDk':'uTKyr'},_0x454ed0=Step[_0x3e43ab(0x219)][_0x3e43ab(0x229)]();if(_0x454ed0){if(_0x56f192&&this['active'])return;if(_0x56f192)await this[_0x3e43ab(0x1a3)]();else this[_0x3e43ab(0x1de)]&&await Step[_0x3e43ab(0x1c6)]();return;}if(!this[_0x3e43ab(0x1d0)]&&_0x56f192){if(_0x3eae96[_0x3e43ab(0x1f2)](_0x3e43ab(0x236),_0x3eae96[_0x3e43ab(0x204)])){this[_0x3e43ab(0x1d0)]=!![];try{if(_0x3eae96[_0x3e43ab(0x1e8)](_0x3eae96[_0x3e43ab(0x213)],_0x3e43ab(0x233)))return null;else await this[_0x3e43ab(0x1af)]();}catch(_0x41c24a){if('UzMoJ'!==_0x3eae96[_0x3e43ab(0x23d)]){const _0x51dc85=(0x0,_0x370d56[_0x3e43ab(0x237)])((0x0,_0x235a02['get'])(this['state'],_0x376c35['K'][_0x3e43ab(0x206)],{}),_0x5fb388);this[_0x3e43ab(0x1bd)]=(0x0,_0x3bdc6d[_0x3e43ab(0x1ef)])({},this[_0x3e43ab(0x1bd)],{[_0x3a6240['K'][_0x3e43ab(0x206)]]:(0x0,_0xd3b650[_0x3e43ab(0x1ef)])({},_0x51dc85,_0x5e51d7)});}else{this[_0x3e43ab(0x1d0)]=![];throw _0x41c24a;}}return;}else return this[_0x3e43ab(0x16c)];}if(this[_0x3e43ab(0x1d0)]&&!_0x56f192){if(_0x3eae96['tMUhj'](_0x3eae96[_0x3e43ab(0x218)],_0x3eae96[_0x3e43ab(0x208)]))try{await this[_0x3e43ab(0x19b)]();}finally{if(_0x3eae96[_0x3e43ab(0x1f2)](_0x3eae96[_0x3e43ab(0x21c)],_0x3eae96[_0x3e43ab(0x21c)]))this['isActive']=![];else return![];}else return this[_0x3e43ab(0x202)]=_0x5cb991,this[_0x3e43ab(0x16c)]=(0x0,_0x305a48[_0x3e43ab(0x1ef)])({},this[_0x3e43ab(0x16c)],_0x3eae96['rQZve'](_0x17a3c2,{})),this;}}static async['withActiveStepScope'](_0x76160,_0x555156){const _0x580537=a13_0x47b20,_0x21501a={'fclhB':function(_0x4cc808,_0x159392){return _0x4cc808!==_0x159392;},'FxbwE':function(_0x8a0e50,_0x1c9777){return _0x8a0e50-_0x1c9777;},'tLEbZ':function(_0x31d12f,_0x2ff767){return _0x31d12f===_0x2ff767;},'xTNzB':_0x580537(0x1a8)},_0x1dffa9=Step['activeStepScope']['getStore'](),_0x328820=_0x1dffa9?[..._0x1dffa9[_0x580537(0x225)]]:[];if(_0x21501a[_0x580537(0x188)](_0x328820[_0x21501a[_0x580537(0x194)](_0x328820[_0x580537(0x23e)],0x1)],_0x76160)){if(_0x21501a[_0x580537(0x19e)](_0x21501a[_0x580537(0x243)],_0x21501a[_0x580537(0x243)]))_0x328820[_0x580537(0x1fb)](_0x76160);else return[];}return await Step[_0x580537(0x219)]['run']({'stack':_0x328820},_0x555156);}static['hasActiveStepScope'](){const _0x4ac5ea=a13_0x47b20,_0x5d5440={'VJgJx':function(_0x3171dd,_0x3e4af3){return _0x3171dd!==_0x3e4af3;}};return _0x5d5440[_0x4ac5ea(0x181)](Step[_0x4ac5ea(0x219)][_0x4ac5ea(0x229)](),undefined);}static[a13_0x47b20(0x16f)](){const _0x1d5064=a13_0x47b20,_0x4c0864={'Ktcnl':function(_0xe512c7,_0x3691f9){return _0xe512c7===_0x3691f9;},'koVTf':'coFEi','QxkmR':_0x1d5064(0x1a1),'MpCzY':function(_0x3b4f1d,_0x497f82){return _0x3b4f1d-_0x497f82;}},_0x31f1f7=Step[_0x1d5064(0x219)][_0x1d5064(0x229)]();if(!_0x31f1f7)return _0x4c0864[_0x1d5064(0x160)](_0x4c0864[_0x1d5064(0x19c)],_0x4c0864['QxkmR'])?_0x4c0864[_0x1d5064(0x160)](this[_0x1d5064(0x20c)][_0x1d5064(0x223)]()[_0x1d5064(0x210)],_0x1d5064(0x1f0)):undefined;return _0x31f1f7['stack'][_0x4c0864[_0x1d5064(0x1cc)](_0x31f1f7['stack'][_0x1d5064(0x23e)],0x1)]??null;}async[a13_0x47b20(0x1a6)](){const _0x3ea2e6=a13_0x47b20,_0x38be7d={'BtSFB':function(_0x916ddf,_0x189571){return _0x916ddf!==_0x189571;},'WXesH':_0x3ea2e6(0x220)},_0xcbc4b4=Step[_0x3ea2e6(0x219)][_0x3ea2e6(0x229)]();if(!_0xcbc4b4){if(_0x38be7d['BtSFB'](_0x38be7d[_0x3ea2e6(0x17e)],_0x38be7d[_0x3ea2e6(0x17e)])){const _0x28b88c=_0x3ea2e6(0x203)['split']('|');let _0x281815=0x0;while(!![]){switch(_0x28b88c[_0x281815++]){case'0':this[_0x3ea2e6(0x1b0)]=_0x17bf5d[_0x3ea2e6(0x1ab)];continue;case'1':this[_0x3ea2e6(0x16c)]={};continue;case'2':this[_0x3ea2e6(0x1bd)]={};continue;case'3':this['modelName']=_0x504f9d;continue;case'4':this[_0x3ea2e6(0x1d0)]=![];continue;case'5':this[_0x3ea2e6(0x20c)]=_0x2ab016;continue;case'6':this['name']=_0x3c3b12[_0x3ea2e6(0x1ab)];continue;case'7':this[_0x3ea2e6(0x1d0)]=_0x2fed19;continue;case'8':this[_0x3ea2e6(0x247)]=_0x299ef4['HttpContentType'][_0x3ea2e6(0x1c2)];continue;}break;}}else{await this[_0x3ea2e6(0x174)](!![]);return;}}_0xcbc4b4[_0x3ea2e6(0x225)][_0x3ea2e6(0x1fb)](this);try{await this[_0x3ea2e6(0x1af)]();}catch(_0x2e8b13){_0xcbc4b4[_0x3ea2e6(0x225)][_0x3ea2e6(0x178)]();throw _0x2e8b13;}}async[a13_0x47b20(0x1a3)](){const _0x41f295=a13_0x47b20,_0x1e4928={'FuHUd':function(_0x5e2d6c,_0x5da0bc){return _0x5e2d6c!==_0x5da0bc;},'gkEYO':'WJNjE','stUwi':_0x41f295(0x193),'HZeYx':function(_0x5d1953,_0x168d53){return _0x5d1953===_0x168d53;},'ZBlfM':'CDYvQ','rTbab':function(_0x473599,_0x148124){return _0x473599!==_0x148124;},'ckJWx':_0x41f295(0x20d)},_0x29e25b=Step[_0x41f295(0x219)][_0x41f295(0x229)]();if(!_0x29e25b){await this['setActive'](!![]);return;}const _0x4694f7=Step[_0x41f295(0x16f)]();if(_0x4694f7){if(_0x1e4928[_0x41f295(0x1b1)]===_0x1e4928[_0x41f295(0x1fd)]){const _0x4d0083=this[_0x41f295(0x18a)]();for(const _0x4db349 of _0x4d0083){this[_0x41f295(0x1f6)]({'_stopTool':{[_0x4db349]:![]}});}return _0x22fcb7[_0x41f295(0x1f5)][_0x41f295(0x23b)]=!![],_0x402833;}else await _0x4694f7[_0x41f295(0x19b)](),_0x1e4928[_0x41f295(0x1d8)](Step[_0x41f295(0x16f)](),_0x4694f7)&&_0x29e25b['stack'][_0x41f295(0x178)]();}_0x29e25b[_0x41f295(0x225)][_0x41f295(0x1fb)](this);try{if(_0x1e4928[_0x41f295(0x16b)]!==_0x41f295(0x1d5))await this[_0x41f295(0x1af)]();else return _0x1e4928[_0x41f295(0x17a)](_0x56f175[_0x41f295(0x219)][_0x41f295(0x229)](),_0x26d23d);}catch(_0x29e3c0){if(Step[_0x41f295(0x16f)]()===this){if(_0x1e4928[_0x41f295(0x176)](_0x1e4928[_0x41f295(0x1d6)],_0x1e4928[_0x41f295(0x1d6)])){if(_0x5caf27){const _0x19ef94=_0x18f877[_0x41f295(0x15f)](_0x5a53b,arguments);return _0x345514=null,_0x19ef94;}}else _0x29e25b[_0x41f295(0x225)][_0x41f295(0x178)]();}throw _0x29e3c0;}}static async[a13_0x47b20(0x1c6)](){const _0x2bcdf9=a13_0x47b20,_0x38964b={'aPXcq':function(_0x43325f,_0xfa64d3){return _0x43325f||_0xfa64d3;},'fERVO':function(_0x58a8d0,_0x388d7f){return _0x58a8d0===_0x388d7f;},'DWdDR':'vJSnL'},_0x106d33=Step[_0x2bcdf9(0x219)][_0x2bcdf9(0x229)](),_0x1e1a63=Step[_0x2bcdf9(0x16f)]();if(_0x38964b['aPXcq'](!_0x106d33,!_0x1e1a63))return;try{await _0x1e1a63[_0x2bcdf9(0x19b)]();}finally{if(_0x38964b[_0x2bcdf9(0x1bf)](Step[_0x2bcdf9(0x16f)](),_0x1e1a63)){if(_0x38964b[_0x2bcdf9(0x1bf)](_0x2bcdf9(0x168),_0x38964b[_0x2bcdf9(0x15d)]))return!![];else _0x106d33[_0x2bcdf9(0x225)][_0x2bcdf9(0x178)]();}}}get[a13_0x47b20(0x19d)](){const _0x3eb938=a13_0x47b20;return this[_0x3eb938(0x247)];}set[a13_0x47b20(0x19d)](_0xbb1632){const _0x29e500=a13_0x47b20;this[_0x29e500(0x247)]=_0xbb1632;}[a13_0x47b20(0x1f1)](_0x504c7a,_0x263d01=flow_types_1[a13_0x47b20(0x1e3)][a13_0x47b20(0x1b5)]){const _0x5455c4=a13_0x47b20,_0x312b02={'QuGFc':function(_0x3e4db7,_0x361dae){return _0x3e4db7===_0x361dae;}},_0x455a84=_0x312b02[_0x5455c4(0x1fc)](_0x263d01,flow_types_1[_0x5455c4(0x1e3)][_0x5455c4(0x1ba)])?(0x0,lodash_1['get'])(this[_0x5455c4(0x1bd)],constants_1['K'][_0x5455c4(0x206)],{}):this[_0x5455c4(0x1bd)];return _0x504c7a?(0x0,lodash_1[_0x5455c4(0x18b)])(_0x455a84,_0x504c7a):_0x455a84;}[a13_0x47b20(0x1fe)](_0x1d221c){const _0x1c833b=a13_0x47b20;return this[_0x1c833b(0x1f1)](_0x1d221c,flow_types_1[_0x1c833b(0x1e3)][_0x1c833b(0x1ba)]);}[a13_0x47b20(0x1f6)](_0x3a3307,_0x269304=flow_types_1[a13_0x47b20(0x1e3)][a13_0x47b20(0x1b5)]){const _0x1c034b=a13_0x47b20,_0x1bc3b8={'Efgdh':function(_0x2c8611,_0x438371){return _0x2c8611===_0x438371;},'mwHtc':_0x1c034b(0x20f),'JNSbC':_0x1c034b(0x1e6)};if(_0x3a3307){const _0x56ee06=Object[_0x1c034b(0x1ea)](_0x3a3307)[0x0];if(_0x1bc3b8[_0x1c034b(0x201)](_0x269304,flow_types_1[_0x1c034b(0x1e3)][_0x1c034b(0x1ba)])){if(_0x1bc3b8[_0x1c034b(0x171)]!=='PfDBP'){const _0x3fd3f9=this[_0x1c034b(0x20c)][_0x1c034b(0x1c9)](this['memorySpace']);return _0x1bc3b8[_0x1c034b(0x201)](_0x3fd3f9[_0x1c034b(0x23e)],0x0)&&_0x3fd3f9[_0x1c034b(0x1fb)](new _0x3383f4['SystemMessage']({'content':'','id':this[_0x1c034b(0x179)]()})),_0x3fd3f9;}else{const _0x2cca48=(0x0,lodash_1[_0x1c034b(0x237)])((0x0,lodash_1[_0x1c034b(0x18b)])(this[_0x1c034b(0x1bd)],constants_1['K'][_0x1c034b(0x206)],{}),_0x56ee06);this[_0x1c034b(0x1bd)]=(0x0,lodash_1['merge'])({},this['state'],{[constants_1['K'][_0x1c034b(0x206)]]:(0x0,lodash_1['merge'])({},_0x2cca48,_0x3a3307)});}}else{if(_0x1bc3b8[_0x1c034b(0x201)](_0x1bc3b8['JNSbC'],'hPcXK'))this['state']=(0x0,lodash_1[_0x1c034b(0x237)])(this[_0x1c034b(0x1bd)],_0x56ee06),this[_0x1c034b(0x1bd)]=(0x0,lodash_1[_0x1c034b(0x1ef)])({},this[_0x1c034b(0x1bd)],_0x3a3307);else{const _0x1c9f53=this['getState'](_0x1c034b(0x199))[_0x2c5d9f],_0x3ae140=_0x1c034b(0x1eb)+_0x58e2d7+_0x1c034b(0x196),_0x4f5ff5=_0x1c9f53?_0x3ae140:'';_0x3d5bbe=_0x299491[_0x1c034b(0x15e)]('{{'+_0x4f6d01+'}}',_0x4f5ff5);}}this['state']=(0x0,lodash_1[_0x1c034b(0x1ef)])(this[_0x1c034b(0x1bd)],{'_saveOn':(0x0,moment_1['default'])()[_0x1c034b(0x17c)]()});}}[a13_0x47b20(0x1c4)](_0x48d282){const _0x509d5c=a13_0x47b20;return this[_0x509d5c(0x1f6)](_0x48d282,flow_types_1['SaveStateType'][_0x509d5c(0x1ba)]);}[a13_0x47b20(0x1e0)](){const _0x1fe97f=a13_0x47b20,_0x5a89f4={'lIiat':'completed'},_0x5b47c4=this[_0x1fe97f(0x20c)][_0x1fe97f(0x223)]();_0x5b47c4[_0x1fe97f(0x210)]=_0x5a89f4[_0x1fe97f(0x22c)];}[a13_0x47b20(0x1d4)](_0x40ee1e){return this['flow']['getContext'](_0x40ee1e);}[a13_0x47b20(0x197)](_0x5721b8){const _0x164011=a13_0x47b20;this['state']=(0x0,lodash_1[_0x164011(0x237)])(this[_0x164011(0x1bd)],_0x5721b8);}['getPrompt'](){const _0x200b05=a13_0x47b20,_0x1355ae={'htJCX':'_prompt'},_0xb0b24a=this[_0x200b05(0x1f1)](_0x1355ae[_0x200b05(0x1b7)]);return _0xb0b24a?_0xb0b24a[_0x200b05(0x198)]():null;}['onCrossing'](_0x114a81,_0x3640cd){const _0xf2182f=a13_0x47b20,_0xd0aae={'nLBnL':function(_0x525979,_0x9048c1){return _0x525979-_0x9048c1;},'jzzMA':function(_0x4bb4af,_0x2c46a1){return _0x4bb4af!==_0x2c46a1;},'PCuvA':_0xf2182f(0x164)};if(!_0x114a81){const _0x149cb4=this[_0xf2182f(0x1c9)](),_0xb9f58=_0x149cb4[_0xd0aae[_0xf2182f(0x21d)](_0x149cb4[_0xf2182f(0x23e)],0x1)],_0x118c13=_0xb9f58?.['id']?message_util_1['MessageUtil'][_0xf2182f(0x19a)](_0xb9f58['id']):undefined;(_0x149cb4[_0xf2182f(0x23e)]===0x1||_0xd0aae[_0xf2182f(0x182)](_0x118c13,this[_0xf2182f(0x1ab)]))&&(_0x114a81=new message_util_2[(_0xf2182f(0x1ed))](this,_0xd0aae[_0xf2182f(0x1a7)]));}return _0x114a81;}[a13_0x47b20(0x1c9)](){const _0x5a1b42=a13_0x47b20,_0x301bb1=this[_0x5a1b42(0x20c)][_0x5a1b42(0x1c9)](this[_0x5a1b42(0x1b0)]);return _0x301bb1[_0x5a1b42(0x23e)]===0x0&&_0x301bb1['push'](new messages_1[(_0x5a1b42(0x170))]({'content':'','id':this[_0x5a1b42(0x179)]()})),_0x301bb1;}[a13_0x47b20(0x18c)](){const _0x1f5215=a13_0x47b20,_0xcda081={'ESKhq':function(_0x130b7e,_0x4b7901){return _0x130b7e>_0x4b7901;},'DhVTq':function(_0x1fcdf3,_0x34c46e){return _0x1fcdf3!==_0x34c46e;},'oAqbj':function(_0x133cab,_0x9b66ef){return _0x133cab-_0x9b66ef;}},_0x981191=this[_0x1f5215(0x20c)]['getMemory'](this[_0x1f5215(0x1b0)]);if(_0xcda081[_0x1f5215(0x162)](_0x981191['length'],0x0))return _0xcda081[_0x1f5215(0x23f)]('UjVpu',_0x1f5215(0x22e))?_0x981191[_0xcda081[_0x1f5215(0x1f7)](_0x981191[_0x1f5215(0x23e)],0x1)]:_0xb250ec;return null;}[a13_0x47b20(0x16e)](_0x5bb429){return this['memorySpace']=_0x5bb429,this;}[a13_0x47b20(0x1f3)](_0x171cf2,_0x38056b){const _0x1ea1d5=a13_0x47b20,_0x2b250f={'pLOXZ':'wXhUp'};this[_0x1ea1d5(0x185)]=_0x171cf2,this[_0x1ea1d5(0x202)]=_0x171cf2;if(_0x38056b){if(_0x2b250f[_0x1ea1d5(0x1bc)]!==_0x2b250f[_0x1ea1d5(0x1bc)])return _0x190177[_0x1ea1d5(0x214)](_0x12a009);else this[_0x1ea1d5(0x21b)](_0x38056b);}return this;}[a13_0x47b20(0x21b)](_0x44c2da,_0x1a96c2){const _0x39df10=a13_0x47b20,_0xca4d43={'WgNax':'string'};if(typeof _0x44c2da===_0xca4d43['WgNax'])return this[_0x39df10(0x202)]=_0x44c2da,this[_0x39df10(0x16c)]=(0x0,lodash_1[_0x39df10(0x1ef)])({},this[_0x39df10(0x16c)],_0x1a96c2??{}),this;return this[_0x39df10(0x202)]=this[_0x39df10(0x185)]??this[_0x39df10(0x20c)][_0x39df10(0x180)](),this[_0x39df10(0x16c)]=(0x0,lodash_1[_0x39df10(0x1ef)])({},this[_0x39df10(0x16c)],_0x44c2da),this;}[a13_0x47b20(0x180)](){return this['modelName'];}[a13_0x47b20(0x1e1)](){const _0x697f50=a13_0x47b20;return this[_0x697f50(0x16c)];}[a13_0x47b20(0x238)](){const _0x20642a=a13_0x47b20;return this[_0x20642a(0x202)];}[a13_0x47b20(0x187)](){return null;}[a13_0x47b20(0x195)](_0x1b70db){const _0x24a359=a13_0x47b20,_0x4c4a63={'eXrSn':function(_0x2d0f65,_0x44ef54){return _0x2d0f65===_0x44ef54;},'OdkdM':function(_0x150c83,_0x3331db){return _0x150c83!==_0x3331db;},'LQSpI':function(_0x265c3f,_0x1645ae){return _0x265c3f===_0x1645ae;},'cxEoN':function(_0x5dd72e,_0x307086){return _0x5dd72e!==_0x307086;},'sxUKe':'PrlBs'};for(const _0x2ef2e5 of this[_0x24a359(0x200)]()){if(_0x4c4a63[_0x24a359(0x1ae)](_0x2ef2e5,_0x1b70db)){if(_0x4c4a63['cxEoN'](_0x4c4a63[_0x24a359(0x222)],_0x24a359(0x1e7)))return!![];else{if(_0x4c4a63['eXrSn'](_0x2be9f6[_0x24a359(0x1ab)],this[_0x24a359(0x1ab)])){this[_0x24a359(0x1d0)]=_0x4f3ac1['isActive'],this['state']=_0x4081e9[_0x24a359(0x1bd)];_0x1cb2d0[_0x24a359(0x185)]&&(this[_0x24a359(0x185)]=_0x20e7d9[_0x24a359(0x185)]);this['modelParamsName']=_0xba7c37[_0x24a359(0x202)],this[_0x24a359(0x16c)]=(0x0,_0x483a41[_0x24a359(0x1ef)])({},_0x16ad99[_0x24a359(0x16c)]??{});const _0x34d938=_0x294a72[_0x24a359(0x216)];_0x4c4a63[_0x24a359(0x1d9)](_0x34d938,_0x1fc9fb)&&_0x4c4a63[_0x24a359(0x1ae)](this[_0x24a359(0x16c)][_0x24a359(0x216)],_0x266c8f)&&(this[_0x24a359(0x16c)][_0x24a359(0x216)]=_0x34d938);}}}}return![];}[a13_0x47b20(0x200)](){return[];}[a13_0x47b20(0x18a)](){return[];}[a13_0x47b20(0x1c7)](){const _0x33d668=a13_0x47b20,_0x4cf15d=this[_0x33d668(0x200)]();return _0x4cf15d[_0x33d668(0x221)](_0xb79412=>{const _0x12b801=_0x33d668;return this[_0x12b801(0x20c)][_0x12b801(0x200)](_0xb79412);});}['amendTool'](_0x4557d3){const _0x1c5cf7=a13_0x47b20,_0x21e0eb={'RJVHT':_0x1c5cf7(0x199)},_0x1a1f16=this[_0x1c5cf7(0x18a)]();for(const _0x541e90 of _0x1a1f16){const _0x14cd08=this[_0x1c5cf7(0x1f1)](_0x21e0eb['RJVHT'])[_0x541e90],_0x56d2e3='**Important:**\x20After\x20collecting\x20data,\x20call\x20tool\x20'+_0x541e90+_0x1c5cf7(0x196),_0x2b3605=_0x14cd08?_0x56d2e3:'';_0x4557d3=_0x4557d3[_0x1c5cf7(0x15e)]('{{'+_0x541e90+'}}',_0x2b3605);}return _0x4557d3;}async['invokeTool'](_0x3f0330){return null;}async[a13_0x47b20(0x163)](_0x56ef02){const _0x23ea82=a13_0x47b20,_0x245d41={'BMStR':function(_0x4d58ae,_0x5ebba4){return _0x4d58ae!==_0x5ebba4;},'EnvVk':function(_0xea05a9,_0x535631){return _0xea05a9===_0x535631;},'GfUsT':function(_0x5791e6,_0x1d425f){return _0x5791e6!==_0x1d425f;},'tWNWR':'ogCjT'};let _0x267700;if(_0x56ef02){if(_0x245d41[_0x23ea82(0x190)](_0x23ea82(0x1d2),_0x245d41[_0x23ea82(0x192)])){const _0x5d5fd7=_0x3e6df1[_0x23ea82(0x16f)]();if(_0x245d41[_0x23ea82(0x1e9)](_0x5d5fd7,_0x1d56dc))return _0x245d41[_0x23ea82(0x1cd)](_0x5d5fd7,this);return this[_0x23ea82(0x1d0)];}else _0x267700=new message_util_2[(_0x23ea82(0x1ed))](this,_0x56ef02);}const _0x4892b2=this[_0x23ea82(0x18a)]();for(const _0x4184c2 of _0x4892b2){this['saveState']({'_stopTool':{[_0x4184c2]:!![]}});}const _0xb16955=await llm_runner_1['LlmRunner'][_0x23ea82(0x1a9)](this['flow'],this,_0x267700);return _0xb16955;}async[a13_0x47b20(0x1c3)](_0x71c9ab,_0x4b7508){const _0x2f7922=a13_0x47b20,_0xd3aad3={'ZOVTg':function(_0x448bb2,_0x39e3b6){return _0x448bb2===_0x39e3b6;},'PdsGo':function(_0x63db1f,_0x414c00){return _0x63db1f!==_0x414c00;},'VoLvC':_0x2f7922(0x1ec),'IjYnz':function(_0x43153f,_0x4bfffc){return _0x43153f!==_0x4bfffc;},'Iczre':'OTQwq','OxTBN':_0x2f7922(0x17d)};return await this[_0x2f7922(0x20c)]['withNestedSequence'](async()=>{const _0x5966bd=_0x2f7922;return _0xd3aad3[_0x5966bd(0x16d)](_0xd3aad3[_0x5966bd(0x1b6)],_0xd3aad3[_0x5966bd(0x21a)])?await Step[_0x5966bd(0x241)](this,async()=>{const _0x35109c=_0x5966bd,_0x4e3ed4={'zVsCh':function(_0x575a49,_0x12065b){const _0x4fa6ac=a13_0x37df;return _0xd3aad3[_0x4fa6ac(0x1f4)](_0x575a49,_0x12065b);}};if(_0xd3aad3[_0x35109c(0x232)](_0x35109c(0x1ec),_0xd3aad3[_0x35109c(0x211)]))for(const _0x52cd6e of _0x296409){_0x4e3ed4['zVsCh'](_0x52cd6e['name'],this[_0x35109c(0x1ab)])&&(_0x52cd6e[_0x35109c(0x1d0)]=this['isActive'],_0x52cd6e['state']=(0x0,_0x5cd6b0['omit'])(this[_0x35109c(0x1bd)],_0x58eed9['K'][_0x35109c(0x206)]),!this['isLogic']()&&(_0x52cd6e[_0x35109c(0x185)]=this['modelName'],_0x52cd6e['modelParamsName']=this[_0x35109c(0x202)],_0x52cd6e[_0x35109c(0x16c)]=this['modelParams']));}else{const _0x24070c=await this[_0x35109c(0x20c)]['activateNested'](_0x71c9ab);try{return await _0x24070c[_0x35109c(0x163)](_0x4b7508);}finally{await Step['exitScopedActiveStep']();}}}):this[_0x5966bd(0x20c)][_0x5966bd(0x200)](_0x33d4b4);});}async[a13_0x47b20(0x248)](_0x5c7e1b){const _0x588402=a13_0x47b20,_0x18e8c5={'TGQmP':function(_0x4f7886,_0x370c72){return _0x4f7886===_0x370c72;},'zlNDg':_0x588402(0x1dc),'FsDOE':'HdWdM'},_0x56dcf6=_0x5c7e1b[_0x588402(0x221)](({step:_0x3d8573,userMessage:_0x16ca47})=>{const _0x5f068e=_0x588402,_0x48f444={'pNiJB':function(_0x185f02,_0x4dbea0){const _0x5a37c5=a13_0x37df;return _0x18e8c5[_0x5a37c5(0x1fa)](_0x185f02,_0x4dbea0);},'ajjIw':_0x18e8c5[_0x5f068e(0x184)],'wvUJf':_0x18e8c5[_0x5f068e(0x1c0)]};return this['flow']['withNestedSequence'](async()=>{const _0x3fba95=_0x5f068e,_0x138b11={'wRjuG':function(_0x3cdcfd,_0x20f4bd){return _0x3cdcfd===_0x20f4bd;}};if(_0x48f444[_0x3fba95(0x239)](_0x3fba95(0x177),_0x48f444[_0x3fba95(0x245)])){for(const _0x54cb3c of this[_0x3fba95(0x200)]()){if(_0x138b11['wRjuG'](_0x54cb3c,_0x3fdff3))return!![];}return![];}else return await Step[_0x3fba95(0x241)](this,async()=>{const _0x377305=_0x3fba95;if(_0x48f444[_0x377305(0x239)](_0x48f444[_0x377305(0x1da)],_0x377305(0x1aa)))return this[_0x377305(0x1ab)];else{const _0x2b48e3=await this[_0x377305(0x20c)][_0x377305(0x1ee)](_0x3d8573);try{return await _0x2b48e3[_0x377305(0x163)](_0x16ca47);}finally{await Step['exitScopedActiveStep']();}}});});});return await Promise[_0x588402(0x21f)](_0x56dcf6);}[a13_0x47b20(0x169)](){const _0x50cbf7=a13_0x47b20,_0x1c436e={'vYxpl':_0x50cbf7(0x1f0)};return this['flow'][_0x50cbf7(0x223)]()['runStatus']===_0x1c436e['vYxpl'];}[a13_0x47b20(0x1a5)](_0x4d7a4b){const _0xa4ef4a=a13_0x47b20,_0x40610e={'tlxTZ':function(_0x4a625a,_0x20dbec){return _0x4a625a-_0x20dbec;},'eEqQX':_0xa4ef4a(0x235),'jwSoK':_0xa4ef4a(0x23c),'zWfkQ':function(_0x304d31,_0x3a728e){return _0x304d31===_0x3a728e;}};for(const _0x1e7277 of _0x4d7a4b){if(_0x40610e[_0xa4ef4a(0x1f8)]!==_0x40610e[_0xa4ef4a(0x1e2)])_0x40610e['zWfkQ'](_0x1e7277[_0xa4ef4a(0x1ab)],this[_0xa4ef4a(0x1ab)])&&(_0x1e7277[_0xa4ef4a(0x1d0)]=this['isActive'],_0x1e7277[_0xa4ef4a(0x1bd)]=(0x0,lodash_1['omit'])(this[_0xa4ef4a(0x1bd)],constants_1['K'][_0xa4ef4a(0x206)]),!this[_0xa4ef4a(0x1f9)]()&&(_0x1e7277['modelName']=this[_0xa4ef4a(0x185)],_0x1e7277['modelParamsName']=this[_0xa4ef4a(0x202)],_0x1e7277[_0xa4ef4a(0x16c)]=this[_0xa4ef4a(0x16c)]));else return _0xd43681[_0x40610e[_0xa4ef4a(0x246)](_0x4a4800[_0xa4ef4a(0x23e)],0x1)];}}[a13_0x47b20(0x18d)](_0xf4c6f7){const _0x31e8f2=a13_0x47b20,_0x51c486={'HcOka':function(_0x372e14,_0x283d31){return _0x372e14===_0x283d31;},'xGfrL':function(_0x469cac,_0x36e3b6){return _0x469cac===_0x36e3b6;},'hQrmH':_0x31e8f2(0x19f),'VbgqB':function(_0xb00370,_0x4a9026){return _0xb00370!==_0x4a9026;}};for(const _0xeb8885 of _0xf4c6f7){if(_0x51c486['xGfrL'](_0x31e8f2(0x1d1),_0x51c486[_0x31e8f2(0x242)])){_0x51c486[_0x31e8f2(0x22b)](_0x78ab36['getScopedActiveStep'](),this)&&_0x89d209['stack'][_0x31e8f2(0x178)]();throw _0x1bb310;}else{if(_0x51c486['xGfrL'](_0xeb8885['name'],this[_0x31e8f2(0x1ab)])){this[_0x31e8f2(0x1d0)]=_0xeb8885[_0x31e8f2(0x1d0)],this[_0x31e8f2(0x1bd)]=_0xeb8885['state'];_0xeb8885[_0x31e8f2(0x185)]&&(this[_0x31e8f2(0x185)]=_0xeb8885[_0x31e8f2(0x185)]);this[_0x31e8f2(0x202)]=_0xeb8885['modelParamsName'],this[_0x31e8f2(0x16c)]=(0x0,lodash_1['merge'])({},_0xeb8885['modelParams']??{});const _0x1df2b9=_0xeb8885['temperature'];_0x51c486[_0x31e8f2(0x189)](_0x1df2b9,undefined)&&this[_0x31e8f2(0x16c)]['temperature']===undefined&&(this['modelParams'][_0x31e8f2(0x216)]=_0x1df2b9);}}}}[a13_0x47b20(0x1b4)](){const _0x2bac2b=a13_0x47b20;return{'name':this[_0x2bac2b(0x1ab)],'isActive':this[_0x2bac2b(0x1d0)],'state':this[_0x2bac2b(0x1bd)],'modelName':this[_0x2bac2b(0x185)],'modelParamsName':this['modelParamsName'],'modelParams':this['modelParams']};}['eraseMemory'](){const _0x458d8c=a13_0x47b20,_0x238e9d=this[_0x458d8c(0x20c)][_0x458d8c(0x1c9)](this[_0x458d8c(0x1b0)]);return _0x238e9d[_0x458d8c(0x23e)]=0x0,_0x238e9d;}async['callStepTool'](_0x3581fb,_0xe0d6b1){const _0x5ba304=a13_0x47b20,_0x21b557={'KKgcT':_0x5ba304(0x1d3)},_0x3dfce1=this[_0x5ba304(0x20c)][_0x5ba304(0x22f)](_0x3581fb[_0x5ba304(0x1ab)]);return typeof this[_0xe0d6b1[_0x5ba304(0x1ab)]]===_0x21b557[_0x5ba304(0x1ac)]?await _0x3dfce1[_0xe0d6b1[_0x5ba304(0x1ab)]](_0xe0d6b1):_0x3581fb;}['setStopTool'](_0x14e470){const _0x3a1018=a13_0x47b20,_0x2ec5c2={'tagUp':_0x3a1018(0x18e),'bjrdK':_0x3a1018(0x217),'QPfAR':_0x3a1018(0x23b)},_0x4b25f9=this[_0x3a1018(0x18a)]();for(const _0x334f47 of _0x4b25f9){_0x2ec5c2[_0x3a1018(0x1bb)]!==_0x2ec5c2['bjrdK']?this[_0x3a1018(0x1f6)]({'_stopTool':{[_0x334f47]:![]}}):_0x468c23['stack'][_0x3a1018(0x178)]();}return _0x14e470[_0x3a1018(0x1f5)][_0x2ec5c2[_0x3a1018(0x231)]]=!![],_0x14e470;}[a13_0x47b20(0x179)](){const _0x323ad1=a13_0x47b20,_0x58c9a2={'pkxph':'YYYY-MM-DDTHH:mm:ss.SSS[Z]'};return this[_0x323ad1(0x1ab)]+'|'+moment_1[_0x323ad1(0x224)]['utc']()['format'](_0x58c9a2['pkxph'])+'|'+this[_0x323ad1(0x186)]();}[a13_0x47b20(0x186)](){const _0x496005=a13_0x47b20,_0x5b44a9={'EsoYx':function(_0x152db0,_0x378c41){return _0x152db0+_0x378c41;},'MQlYr':function(_0x56b210,_0x3c4ef5){return _0x56b210*_0x3c4ef5;},'LsqjF':function(_0x595cac,_0x12dcaa){return _0x595cac-_0x12dcaa;}},_0x3eb514=0x3b9aca00,_0x2ae746=0x2540be3ff;return _0x5b44a9['EsoYx'](Math[_0x496005(0x226)](_0x5b44a9[_0x496005(0x1df)](Math[_0x496005(0x1ad)](),_0x5b44a9[_0x496005(0x1c5)](_0x5b44a9['LsqjF'](_0x2ae746,_0x3eb514),0x1))),_0x3eb514);}['getLLMType'](){const _0x526cd7=a13_0x47b20,_0x42bdc9={'WBUWU':function(_0x31f0fb,_0x37bdef){return _0x31f0fb!==_0x37bdef;},'moBWd':_0x526cd7(0x20a)},_0x50a755=this['modelName']||this[_0x526cd7(0x20c)][_0x526cd7(0x180)](),_0x4a8f21=_0x50a755['trim']()[_0x526cd7(0x167)]();if(_0x4a8f21[_0x526cd7(0x23a)]('gemini'))return llm_file_1[_0x526cd7(0x1cb)][_0x526cd7(0x166)];if(_0x4a8f21[_0x526cd7(0x23a)](_0x526cd7(0x209))){if(_0x42bdc9[_0x526cd7(0x20e)](_0x42bdc9['moBWd'],_0x42bdc9['moBWd']))void this['setActive'](_0x572906);else return llm_file_1[_0x526cd7(0x1cb)][_0x526cd7(0x17f)];}if(_0x4a8f21[_0x526cd7(0x23a)](_0x526cd7(0x172)))return llm_file_1[_0x526cd7(0x1cb)]['ANTHROPIC'];return llm_file_1[_0x526cd7(0x1cb)]['UNSUPPORTED'];}[a13_0x47b20(0x1db)](){return null;}}function a13_0x53f2(){const _0x5bfb70=['VbgqB','getStopTool','get','getLastMessage','readDoc','URrhZ','5220688Giizsb','GfUsT','(((.+)+)+)+$','tWNWR','PxAZx','FxbwE','isToolAvailable','\x20to\x20ensure\x20the\x20tool\x20is\x20triggered.','removeState','toString','_stopTool','messageStep','onExit','koVTf','contentType','tLEbZ','LbcvA','./content-type','GJpNR','UzMoJ','replaceScopedActiveStep','HttpContentType','writeDoc','pushScopedActiveStep','PCuvA','PDsMq','send','vzoOc','name','KKgcT','random','LQSpI','onEnter','memorySpace','gkEYO','../utils/message-util','21RsFosf','createDoc','persistent','Iczre','htJCX','12042PJthsi','KAVYj','transient','tagUp','pLOXZ','state','8077500lBHORO','fERVO','FsDOE','Step','Plain','runStep','saveTransientState','EsoYx','exitScopedActiveStep','obtainTools','TdtId','getMemory','lykuo','LLMType','MpCzY','EnvVk','moment','lodash','isActive','PyyLf','ogCjT','function','getContext','beHmM','ckJWx','../utils/constants','HZeYx','OdkdM','ajjIw','structOutputSchema','ezjBR','2633816YqGaTe','active','MQlYr','sessionCompleted','getModelParams','jwSoK','SaveStateType','1336080xjsUAl','__esModule','hPcXK','OuFym','iGqnv','BMStR','keys','**Important:**\x20After\x20collecting\x20data,\x20call\x20tool\x20','IlAbY','HumanMessageEx','activateNested','merge','completed','getState','tHIFu','useModel','ZOVTg','additional_kwargs','saveState','oAqbj','eEqQX','isLogic','TGQmP','push','QuGFc','stUwi','getTransientState','./llm-runner','getTool','Efgdh','modelParamsName','4|2|3|1|8|6|5|7|0','HChjD','onCrossing','TRANSIENT','26320raKDmi','SOniu','gpt','IgWfW','constructor','flow','xDfeU','WBUWU','PfDBP','runStatus','VoLvC','./flow-types','BpjIc','stringify','1891491lWbTdq','temperature','wRaIZ','UXTKZ','activeStepScope','OxTBN','useModelParams','GEnDk','nLBnL','@langchain/core/messages','all','cDNnY','map','sxUKe','getSessionDoc','default','stack','floor','cuemZ','4|5|6|0|2|1|7|3|8','getStore','jRYsp','HcOka','lIiat','object','Livyq','getStep','JZzGY','QPfAR','PdsGo','cfBBE','YFVeQ','kWzIt','YfVHC','omit','getModelParamsModelName','pNiJB','startsWith','stopTool','kCUXd','MqLPm','length','DhVTq','JGHAz','withActiveStepScope','hQrmH','xTNzB','defineProperty','wvUJf','tlxTZ','ctType','runSteps','DWdDR','replace','apply','Ktcnl','__importDefault','ESKhq','run','Start','AsyncLocalStorage','GEMINI','toLowerCase','wtbpf','isEnd','4ThMUoa','ZBlfM','modelParams','IjYnz','useMemory','getScopedActiveStep','SystemMessage','mwHtc','claude','node:async_hooks','setActive','split','rTbab','aInbm','pop','genMessageId','FuHUd','712796qgUyGb','toDate','DUiGm','WXesH','OPENAI','getModel','VJgJx','jzzMA','checkResponse','zlNDg','modelName','random10Digits','defineTool','fclhB'];a13_0x53f2=function(){return _0x5bfb70;};return a13_0x53f2();}exports[a13_0x47b20(0x1c1)]=Step,Step[a13_0x47b20(0x219)]=new node_async_hooks_1[(a13_0x47b20(0x165))]();
|
package/index.js
CHANGED
|
@@ -1,69 +1,70 @@
|
|
|
1
1
|
// PicoFlow - Main exports
|
|
2
|
-
|
|
3
|
-
const path = require(
|
|
2
|
+
'use strict';
|
|
3
|
+
const path = require('path');
|
|
4
4
|
|
|
5
5
|
const load = (relativePath) => {
|
|
6
6
|
const candidates = [
|
|
7
7
|
path.join(__dirname, relativePath),
|
|
8
|
-
path.join(__dirname,
|
|
8
|
+
path.join(__dirname, '../dist/picoflow', relativePath),
|
|
9
9
|
];
|
|
10
10
|
for (const candidate of candidates) {
|
|
11
11
|
let resolved;
|
|
12
12
|
try {
|
|
13
13
|
resolved = require.resolve(candidate);
|
|
14
14
|
} catch (err) {
|
|
15
|
-
if (err.code !==
|
|
15
|
+
if (err.code !== 'MODULE_NOT_FOUND') {
|
|
16
16
|
throw err;
|
|
17
17
|
}
|
|
18
18
|
continue;
|
|
19
19
|
}
|
|
20
|
-
// eslint-disable-next-line import/no-dynamic-require, global-require
|
|
21
20
|
return require(resolved);
|
|
22
21
|
}
|
|
23
|
-
const tried = candidates.join(
|
|
24
|
-
throw new Error(
|
|
22
|
+
const tried = candidates.join(', ');
|
|
23
|
+
throw new Error(
|
|
24
|
+
`picoflow.index could not load '${relativePath}'. Tried: ${tried}`,
|
|
25
|
+
);
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
// Flow
|
|
28
|
-
module.exports.Flow = load(
|
|
29
|
-
module.exports.Step = load(
|
|
30
|
-
module.exports.LogicStep = load(
|
|
31
|
-
module.exports.EndStep = load(
|
|
32
|
-
module.exports.Memory = load(
|
|
33
|
-
module.exports.FlowCreator = load(
|
|
34
|
-
module.exports.HttpContentType = load(
|
|
29
|
+
module.exports.Flow = load('flow/flow').Flow;
|
|
30
|
+
module.exports.Step = load('flow/step').Step;
|
|
31
|
+
module.exports.LogicStep = load('flow/logic-step').LogicStep;
|
|
32
|
+
module.exports.EndStep = load('flow/end-step').EndStep;
|
|
33
|
+
module.exports.Memory = load('flow/memory').Memory;
|
|
34
|
+
module.exports.FlowCreator = load('flow/flow-creator').FlowCreator;
|
|
35
|
+
module.exports.HttpContentType = load('flow/content-type').HttpContentType;
|
|
35
36
|
|
|
36
37
|
// Flow Types
|
|
37
|
-
const flowTypes = load(
|
|
38
|
+
const flowTypes = load('flow/flow-types');
|
|
38
39
|
module.exports.ToolResponseType = flowTypes.ToolResponseType;
|
|
39
40
|
|
|
40
41
|
// Services
|
|
41
|
-
module.exports.FlowEngine = load(
|
|
42
|
+
module.exports.FlowEngine = load('services/flow-engine').FlowEngine;
|
|
42
43
|
|
|
43
44
|
// Session
|
|
44
|
-
module.exports.FlowSession = load(
|
|
45
|
-
module.exports.SessionLogger = load(
|
|
46
|
-
module.exports.FileSession = load(
|
|
47
|
-
module.exports.MongoSession = load(
|
|
48
|
-
module.exports.CosmoSession = load(
|
|
45
|
+
module.exports.FlowSession = load('session/flow-session').FlowSession;
|
|
46
|
+
module.exports.SessionLogger = load('session/session-logger').SessionLogger;
|
|
47
|
+
module.exports.FileSession = load('session/file-session').FileSession;
|
|
48
|
+
module.exports.MongoSession = load('session/mongo-session').MongoSession;
|
|
49
|
+
module.exports.CosmoSession = load('session/cosmo-session').CosmoSession;
|
|
49
50
|
|
|
50
51
|
// Configs
|
|
51
|
-
module.exports.CoreConfig = load(
|
|
52
|
+
module.exports.CoreConfig = load('configs/core-config').CoreConfig;
|
|
52
53
|
|
|
53
54
|
// Utils
|
|
54
|
-
module.exports.MessageUtil = load(
|
|
55
|
-
module.exports.ToolUtil = load(
|
|
56
|
-
module.exports.StringUtil = load(
|
|
57
|
-
module.exports.Environ = load(
|
|
58
|
-
module.exports.LlmFile = load(
|
|
59
|
-
module.exports.K = load(
|
|
55
|
+
module.exports.MessageUtil = load('utils/message-util').MessageUtil;
|
|
56
|
+
module.exports.ToolUtil = load('utils/tool-util').ToolUtil;
|
|
57
|
+
module.exports.StringUtil = load('utils/string-util').StringUtil;
|
|
58
|
+
module.exports.Environ = load('utils/environ').Environ;
|
|
59
|
+
module.exports.LlmFile = load('utils/llm-file').LlmFile;
|
|
60
|
+
module.exports.K = load('utils/constants').K;
|
|
60
61
|
|
|
61
62
|
// Prompt
|
|
62
|
-
module.exports.Prompt = load(
|
|
63
|
-
module.exports.FlowPrompt = load(
|
|
63
|
+
module.exports.Prompt = load('prompt/prompt-util').Prompt;
|
|
64
|
+
module.exports.FlowPrompt = load('prompt/flow-prompt').FlowPrompt;
|
|
64
65
|
|
|
65
66
|
// Decorators
|
|
66
|
-
module.exports.StopTool = load(
|
|
67
|
+
module.exports.StopTool = load('decorators/stop-tool').StopTool;
|
|
67
68
|
|
|
68
69
|
// Clients
|
|
69
|
-
module.exports.HttpClient = load(
|
|
70
|
+
module.exports.HttpClient = load('clients/http-client').HttpClient;
|