@picoflow/core 1.0.0
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/LICENSE +7 -0
- package/README.md +37 -0
- package/clients/http-client.d.ts +13 -0
- package/clients/http-client.js +1 -0
- package/clients/self-client.d.ts +4 -0
- package/clients/self-client.js +1 -0
- package/configs/core-config.d.ts +22 -0
- package/configs/core-config.js +1 -0
- package/decorators/stop-tool.d.ts +2 -0
- package/decorators/stop-tool.js +1 -0
- package/flow/content-type.d.ts +38 -0
- package/flow/content-type.js +1 -0
- package/flow/end-step.d.ts +14 -0
- package/flow/end-step.js +1 -0
- package/flow/flow-creator.d.ts +7 -0
- package/flow/flow-creator.js +1 -0
- package/flow/flow-types.d.ts +718 -0
- package/flow/flow-types.js +1 -0
- package/flow/flow.d.ts +55 -0
- package/flow/flow.js +1 -0
- package/flow/llm-runner.d.ts +11 -0
- package/flow/llm-runner.js +1 -0
- package/flow/logic-runner.d.ts +6 -0
- package/flow/logic-runner.js +1 -0
- package/flow/logic-step.d.ts +8 -0
- package/flow/logic-step.js +1 -0
- package/flow/memory.d.ts +10 -0
- package/flow/memory.js +1 -0
- package/flow/step.d.ts +63 -0
- package/flow/step.js +1 -0
- package/index.d.ts +34 -0
- package/index.js +47 -0
- package/package.json +34 -0
- package/prompt/endchat.md +6 -0
- package/prompt/flow-prompt.d.ts +3 -0
- package/prompt/flow-prompt.js +1 -0
- package/prompt/prompt-util.d.ts +7 -0
- package/prompt/prompt-util.js +1 -0
- package/services/flow-engine.d.ts +55 -0
- package/services/flow-engine.js +1 -0
- package/session/cosmo-session.d.ts +14 -0
- package/session/cosmo-session.js +1 -0
- package/session/file-session.d.ts +12 -0
- package/session/file-session.js +1 -0
- package/session/flow-session.d.ts +15 -0
- package/session/flow-session.js +1 -0
- package/session/mongo-session.d.ts +13 -0
- package/session/mongo-session.js +1 -0
- package/session/session-adaptor.d.ts +9 -0
- package/session/session-adaptor.js +1 -0
- package/session/session-logger.d.ts +12 -0
- package/session/session-logger.js +1 -0
- package/utils/constants.d.ts +7 -0
- package/utils/constants.js +1 -0
- package/utils/environ.d.ts +2 -0
- package/utils/environ.js +1 -0
- package/utils/errors.d.ts +28 -0
- package/utils/errors.js +1 -0
- package/utils/license-util.d.ts +17 -0
- package/utils/license-util.js +1 -0
- package/utils/llm-file.d.ts +22 -0
- package/utils/llm-file.js +1 -0
- package/utils/logic.d.ts +5 -0
- package/utils/logic.js +1 -0
- package/utils/message-util.d.ts +47 -0
- package/utils/message-util.js +1 -0
- package/utils/retry.d.ts +13 -0
- package/utils/retry.js +1 -0
- package/utils/string-util.d.ts +6 -0
- package/utils/string-util.js +1 -0
- package/utils/tool-util.d.ts +5 -0
- package/utils/tool-util.js +1 -0
- package/utils/verify-license.d.ts +1 -0
- package/utils/verify-license.js +1 -0
package/LICENSE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# PicoFlow Core (@picoflow/core)
|
|
2
|
+
|
|
3
|
+
PicoFlow - Probably the best Purposeful Conversational Agent Framework !
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @picoflow/core
|
|
9
|
+
# or
|
|
10
|
+
yarn add @picoflow/core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## License Key
|
|
14
|
+
Send a request to dev@picoflow.io to get a license key that you need to include in your .env file
|
|
15
|
+
We will be happy to provide a short term license key for evaluation purposes.
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
- **Agentic Flows**: Define complex conversational flows using flows/steps
|
|
19
|
+
- **LLM Integration**: Seamlessly works with OpenAI, Anthropic, Google GenAI, and Ollama.
|
|
20
|
+
- **LangChain Support**: Built on top of LangChain for robust LLM abstraction.
|
|
21
|
+
- **State Management**: Built-in session and memory management (CosmosDB, Mongo, File-based).
|
|
22
|
+
- **Turnkey NestJS Integration**: Deploy as endpoint out-of-the-box to any NodeJS environment.
|
|
23
|
+
|
|
24
|
+
## Documentation
|
|
25
|
+
|
|
26
|
+
- **Main Website**: [https://www.picoflow.io](https://www.picoflow.io)
|
|
27
|
+
- **Tutorial**: [https://tutorial1.picoflow.io](https://tutorial1.picoflow.io)
|
|
28
|
+
|
|
29
|
+
For more detailed documentation, please refer to the [doc](./doc) folder.
|
|
30
|
+
|
|
31
|
+
## Keywords
|
|
32
|
+
|
|
33
|
+
llm, langchain, flow, ai, chatbot , agent, purposeful, conversational
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
|
|
37
|
+
Proprietarily Licensed. Copyright (c) 2026 picoflow.io
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
+
export declare class HttpClient {
|
|
3
|
+
private client;
|
|
4
|
+
constructor(baseURL: any, defaultHeaders?: {}, timeout?: any);
|
|
5
|
+
get(url: any, params?: {}, config?: AxiosRequestConfig): Promise<AxiosResponse>;
|
|
6
|
+
post(url: any, data?: {}, config?: AxiosRequestConfig): Promise<AxiosResponse>;
|
|
7
|
+
put(url: any, data?: {}, config?: AxiosRequestConfig): Promise<AxiosResponse>;
|
|
8
|
+
delete(url: any, config?: AxiosRequestConfig): Promise<AxiosResponse>;
|
|
9
|
+
patch(url: any, data?: {}, config?: AxiosRequestConfig): Promise<AxiosResponse>;
|
|
10
|
+
setHeader(name: any, value: any): void;
|
|
11
|
+
removeHeader(name: any): void;
|
|
12
|
+
private setup;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a0_0x4584d7=a0_0x4ebb;(function(_0x5ec5df,_0x1f5423){const _0x582ef6=a0_0x4ebb,_0x32230e=_0x5ec5df();while(!![]){try{const _0x63a315=-parseInt(_0x582ef6(0x10a))/0x1*(parseInt(_0x582ef6(0xed))/0x2)+-parseInt(_0x582ef6(0xf4))/0x3+-parseInt(_0x582ef6(0xfb))/0x4*(-parseInt(_0x582ef6(0x113))/0x5)+-parseInt(_0x582ef6(0x100))/0x6+parseInt(_0x582ef6(0x105))/0x7+-parseInt(_0x582ef6(0xdd))/0x8+parseInt(_0x582ef6(0xfe))/0x9*(parseInt(_0x582ef6(0x10f))/0xa);if(_0x63a315===_0x1f5423)break;else _0x32230e['push'](_0x32230e['shift']());}catch(_0x141d9c){_0x32230e['push'](_0x32230e['shift']());}}}(a0_0x389e,0x42c7f));const a0_0x6c68d1=(function(){let _0xa3b6ae=!![];return function(_0x27b7a0,_0x294b84){const _0x4068f2=_0xa3b6ae?function(){if(_0x294b84){const _0x32dec5=_0x294b84['apply'](_0x27b7a0,arguments);return _0x294b84=null,_0x32dec5;}}:function(){};return _0xa3b6ae=![],_0x4068f2;};}()),a0_0x4b8a60=a0_0x6c68d1(this,function(){const _0x40c40b=a0_0x4ebb,_0x192baf={'bgouO':_0x40c40b(0xeb)};return a0_0x4b8a60[_0x40c40b(0xea)]()[_0x40c40b(0xf9)](_0x192baf[_0x40c40b(0xd9)])[_0x40c40b(0xea)]()[_0x40c40b(0xe0)](a0_0x4b8a60)[_0x40c40b(0xf9)](_0x40c40b(0xeb));});function a0_0x4ebb(_0x168852,_0x4e5530){const _0x1d1319=a0_0x389e();return a0_0x4ebb=function(_0x4b8a60,_0x6c68d1){_0x4b8a60=_0x4b8a60-0xd4;let _0x389e7a=_0x1d1319[_0x4b8a60];return _0x389e7a;},a0_0x4ebb(_0x168852,_0x4e5530);}a0_0x4b8a60();'use strict';var __importDefault=this&&this[a0_0x4584d7(0xe3)]||function(_0x128cf5){const _0x4a5a45=a0_0x4584d7;return _0x128cf5&&_0x128cf5[_0x4a5a45(0xd6)]?_0x128cf5:{'default':_0x128cf5};};function a0_0x389e(){const _0x3b394f=['use','ihKVw','@nestjs/common','qTxuI','SFdTg','toString','(((.+)+)+)+$','setup','298tJajka','patch','teOCE','HttpClient','defaults','uhHao','HttpStatus','1019610tcvleT','DhwOC','eFrhV','vircU','create','search','opZHo','12eJrXNr','huhRz','post','9972621mNVPMp','common','130524HNPYFo','headers','data','interceptors','saqVp','367423yQAHJT','validateStatus','message','default','delete','2207aJXYCr','blcij','response','put','jLJya','10EsrMrK','VFeIz','get','lOLKK','459995eOiIhA','ScxJU','axios','__esModule','removeHeader','request','bgouO','reject','SpFUi','client','3780424ziONiQ','statusCode','JEqcF','constructor','setHeader','qnwbQ','__importDefault','LHrEH'];a0_0x389e=function(){return _0x3b394f;};return a0_0x389e();}Object['defineProperty'](exports,a0_0x4584d7(0xd6),{'value':!![]}),exports[a0_0x4584d7(0xf0)]=void 0x0;const common_1=require(a0_0x4584d7(0xe7)),axios_1=__importDefault(require(a0_0x4584d7(0xd5)));class HttpClient{constructor(_0x3dbdfd,_0x139bf7={},_0x12d5da){const _0x5c888e=a0_0x4584d7,_0x346b6d={'uWldp':function(_0x124da5,_0x5b8e4e){return _0x124da5>=_0x5b8e4e;},'eFrhV':function(_0x425961,_0x13b423){return _0x425961<_0x13b423;},'jLJya':_0x5c888e(0xdf),'saqVp':'TdesV'};this[_0x5c888e(0xdc)]=axios_1['default'][_0x5c888e(0xf8)]({'baseURL':_0x3dbdfd,'timeout':_0x12d5da,'headers':_0x139bf7}),this['client'][_0x5c888e(0x103)][_0x5c888e(0xd8)]['use'](_0x238a97=>{return _0x238a97;},_0xffd452=>Promise[_0x5c888e(0xda)](_0xffd452)),this['client'][_0x5c888e(0x103)]['response'][_0x5c888e(0xe5)](_0x56efcd=>_0x56efcd['data'],_0x4cc071=>{const _0x2b4396=_0x5c888e;if(_0x346b6d[_0x2b4396(0x10e)]===_0x346b6d[_0x2b4396(0x104)])return _0x40650a=_0x426958,_0x346b6d['uWldp'](_0x391c5a,_0x4bd0df[_0x2b4396(0xf3)]['OK'])&&_0x346b6d[_0x2b4396(0xf6)](_0x204582,0x12c);else{const _0x1f1e66=_0x4cc071[_0x2b4396(0x10c)]?.['data']?.[_0x2b4396(0x107)]||_0x4cc071[_0x2b4396(0x107)];return Promise[_0x2b4396(0xda)](new Error(_0x1f1e66));}});}async[a0_0x4584d7(0x111)](_0xce62c1,_0x6c94bb={},_0x524421){const _0x5262b3=a0_0x4584d7,_0x3c8c63={'lOLKK':_0x5262b3(0xe4),'uhHao':function(_0x2c1e75,_0x51af8f){return _0x2c1e75<_0x51af8f;},'dswtx':function(_0x2213a8,_0x414467){return _0x2213a8??_0x414467;},'ScxJU':function(_0x2b2160,_0x16bfdf){return _0x2b2160===_0x16bfdf;},'ihKVw':_0x5262b3(0xef),'SpFUi':_0x5262b3(0x110)};let _0x559f43=common_1[_0x5262b3(0xf3)]['OK'];const _0x15ab41=_0x3c8c63['dswtx'](_0x524421,{});_0x15ab41['validateStatus']=_0x5d2273=>{const _0x1801c1=_0x5262b3;if(_0x3c8c63[_0x1801c1(0x112)]!==_0x3c8c63['lOLKK'])delete this[_0x1801c1(0xdc)][_0x1801c1(0xf1)][_0x1801c1(0x101)][_0x1801c1(0xff)][_0x4701d8];else return _0x559f43=_0x5d2273,_0x5d2273>=common_1[_0x1801c1(0xf3)]['OK']&&_0x3c8c63[_0x1801c1(0xf2)](_0x5d2273,0x12c);};try{const _0x1d4ccb=await this[_0x5262b3(0xdc)][_0x5262b3(0x111)](_0xce62c1,{'params':_0x6c94bb,..._0x15ab41});return _0x1d4ccb;}catch(_0x140fc1){if(_0x3c8c63[_0x5262b3(0xd4)](_0x3c8c63[_0x5262b3(0xe6)],_0x3c8c63[_0x5262b3(0xdb)]))return this[_0x5262b3(0xec)](this[_0x5262b3(0xdc)][_0x5262b3(0x10d)],_0x34295c,_0x1d855f,_0xc5597f);else{_0x140fc1[_0x5262b3(0xde)]=_0x559f43;throw _0x140fc1;}}}async[a0_0x4584d7(0xfd)](_0x48e063,_0x404738={},_0x25f11f){const _0x4eec7d=a0_0x4584d7;return this['setup'](this[_0x4eec7d(0xdc)][_0x4eec7d(0xfd)],_0x48e063,_0x404738,_0x25f11f);}async['put'](_0x59dbee,_0x200b15={},_0x1e6465){const _0x5ea964=a0_0x4584d7;return this[_0x5ea964(0xec)](this[_0x5ea964(0xdc)]['put'],_0x59dbee,_0x200b15,_0x1e6465);}async[a0_0x4584d7(0x109)](_0x4c9263,_0x1daa86){const _0x438f5d=a0_0x4584d7,_0x204aac={'opZHo':function(_0x2ca83b,_0x21c259){return _0x2ca83b>=_0x21c259;},'YDSxp':function(_0x166662,_0x58328d){return _0x166662??_0x58328d;}};let _0x52dc78=common_1[_0x438f5d(0xf3)]['OK'];const _0x127434=_0x204aac['YDSxp'](_0x1daa86,{});_0x127434[_0x438f5d(0x106)]=_0x473a1d=>{const _0x454c9f=_0x438f5d;return _0x52dc78=_0x473a1d,_0x204aac[_0x454c9f(0xfa)](_0x473a1d,common_1['HttpStatus']['OK'])&&_0x473a1d<0x12c;};try{const _0x2078b6=await this[_0x438f5d(0xdc)][_0x438f5d(0x109)](_0x4c9263,{..._0x1daa86});return _0x2078b6;}catch(_0x29d6b0){_0x29d6b0[_0x438f5d(0xde)]=_0x52dc78;throw _0x29d6b0;}}async['patch'](_0x2cc61c,_0x2fe72e={},_0x5aaa8d){const _0x32ea04=a0_0x4584d7;return this[_0x32ea04(0xec)](this['client'][_0x32ea04(0xee)],_0x2cc61c,_0x2fe72e,_0x5aaa8d);}[a0_0x4584d7(0xe1)](_0x25e991,_0x35582c){const _0x5b97ba=a0_0x4584d7;this[_0x5b97ba(0xdc)][_0x5b97ba(0xf1)][_0x5b97ba(0x101)][_0x5b97ba(0xff)][_0x25e991]=_0x35582c;}[a0_0x4584d7(0xd7)](_0x4988f1){const _0x1093a3=a0_0x4584d7;delete this[_0x1093a3(0xdc)][_0x1093a3(0xf1)][_0x1093a3(0x101)]['common'][_0x4988f1];}async[a0_0x4584d7(0xec)](_0x19a67b,_0x389ddd,_0x2ff99e={},_0x37278a){const _0xc2e359=a0_0x4584d7,_0x273c80={'DhwOC':function(_0x5ecee5,_0x364740){return _0x5ecee5>=_0x364740;},'qnwbQ':function(_0x487d62,_0x4f5f8a){return _0x487d62<_0x4f5f8a;},'SFdTg':function(_0x5dbf82,_0x558141){return _0x5dbf82??_0x558141;},'IxYSH':function(_0x33f628,_0x5afe16){return _0x33f628===_0x5afe16;},'blcij':_0xc2e359(0xfc),'qTxuI':_0xc2e359(0xf7)};let _0x8fa00c=common_1['HttpStatus']['OK'];const _0x4edbce=_0x273c80[_0xc2e359(0xe9)](_0x37278a,{});_0x4edbce[_0xc2e359(0x106)]=_0x5e077f=>{const _0x12d147=_0xc2e359;return _0x8fa00c=_0x5e077f,_0x273c80[_0x12d147(0xf5)](_0x5e077f,common_1['HttpStatus']['OK'])&&_0x273c80[_0x12d147(0xe2)](_0x5e077f,0x12c);};try{if(_0x273c80['IxYSH'](_0x273c80[_0xc2e359(0x10b)],_0x273c80[_0xc2e359(0x10b)])){const _0xc3c4bc=await _0x19a67b(_0x389ddd,_0x2ff99e,{..._0x4edbce});return _0xc3c4bc;}else{_0xa1d5f3[_0xc2e359(0xde)]=_0x169f31;throw _0x35a1e8;}}catch(_0x1a73a6){if(_0x273c80[_0xc2e359(0xe8)]!==_0xc2e359(0xf7))this[_0xc2e359(0xdc)]=_0x2e6936[_0xc2e359(0x108)][_0xc2e359(0xf8)]({'baseURL':_0x54f22b,'timeout':_0x36aebd,'headers':_0x1d9e1d}),this[_0xc2e359(0xdc)][_0xc2e359(0x103)][_0xc2e359(0xd8)]['use'](_0x26b6ef=>{return _0x26b6ef;},_0x1d9237=>_0xdd1d68['reject'](_0x1d9237)),this[_0xc2e359(0xdc)][_0xc2e359(0x103)]['response'][_0xc2e359(0xe5)](_0x45a217=>_0x45a217['data'],_0x585037=>{const _0x6b4893=_0xc2e359,_0x29a7e9=_0x585037['response']?.[_0x6b4893(0x102)]?.['message']||_0x585037[_0x6b4893(0x107)];return _0x19e06b[_0x6b4893(0xda)](new _0x2e091a(_0x29a7e9));});else{_0x1a73a6[_0xc2e359(0xde)]=_0x8fa00c;throw _0x1a73a6;}}}}exports['HttpClient']=HttpClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a1_0x5033(){const _0x324b0d=['1166776JDAqhk','3XBqKmF','toString','(((.+)+)+)+$','125092UFSnQx','./http-client','88662ekTEqn','1473020dmxnfL','96cPeEmD','CoreConfig','defineProperty','1081864wtymHi','716071nongnq','2205540GWoUWw','SelfClient','HttpClient','search','SFTSl','constructor'];a1_0x5033=function(){return _0x324b0d;};return a1_0x5033();}const a1_0x9e6635=a1_0x2905;(function(_0x6354d6,_0x200b01){const _0x3d9956=a1_0x2905,_0x221f1f=_0x6354d6();while(!![]){try{const _0x169f95=parseInt(_0x3d9956(0x181))/0x1+-parseInt(_0x3d9956(0x175))/0x2+parseInt(_0x3d9956(0x176))/0x3*(-parseInt(_0x3d9956(0x179))/0x4)+-parseInt(_0x3d9956(0x17c))/0x5+-parseInt(_0x3d9956(0x17d))/0x6*(-parseInt(_0x3d9956(0x17b))/0x7)+parseInt(_0x3d9956(0x180))/0x8+parseInt(_0x3d9956(0x182))/0x9;if(_0x169f95===_0x200b01)break;else _0x221f1f['push'](_0x221f1f['shift']());}catch(_0x1bcd90){_0x221f1f['push'](_0x221f1f['shift']());}}}(a1_0x5033,0x5f27b));function a1_0x2905(_0x50877a,_0x18d3ff){const _0x16c13b=a1_0x5033();return a1_0x2905=function(_0x2e9801,_0x2da19d){_0x2e9801=_0x2e9801-0x175;let _0x50330e=_0x16c13b[_0x2e9801];return _0x50330e;},a1_0x2905(_0x50877a,_0x18d3ff);}const a1_0x2da19d=(function(){let _0x52eeb5=!![];return function(_0x13cca4,_0x46dcdd){const _0x3f7432=_0x52eeb5?function(){if(_0x46dcdd){const _0x21fc05=_0x46dcdd['apply'](_0x13cca4,arguments);return _0x46dcdd=null,_0x21fc05;}}:function(){};return _0x52eeb5=![],_0x3f7432;};}()),a1_0x2e9801=a1_0x2da19d(this,function(){const _0x39161c=a1_0x2905,_0x117a80={'SFTSl':_0x39161c(0x178)};return a1_0x2e9801[_0x39161c(0x177)]()[_0x39161c(0x185)](_0x39161c(0x178))['toString']()[_0x39161c(0x187)](a1_0x2e9801)[_0x39161c(0x185)](_0x117a80[_0x39161c(0x186)]);});a1_0x2e9801();'use strict';Object[a1_0x9e6635(0x17f)](exports,'__esModule',{'value':!![]}),exports[a1_0x9e6635(0x183)]=void 0x0;const core_config_1=require('../configs/core-config'),http_client_1=require(a1_0x9e6635(0x17a));class SelfClient extends http_client_1[a1_0x9e6635(0x184)]{constructor(_0x3d5dbd={},_0x2284e5){const _0x1b8d71=a1_0x9e6635;super(core_config_1[_0x1b8d71(0x17e)]['selfURL'],_0x3d5dbd,_0x2284e5);}}exports[a1_0x9e6635(0x183)]=SelfClient;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
export declare class CoreConfig {
|
|
3
|
+
static llmRetry: number;
|
|
4
|
+
static llmTemperature: number;
|
|
5
|
+
static GeminiKey: string;
|
|
6
|
+
static OpenAIKey: string;
|
|
7
|
+
static AnthropicKey: string;
|
|
8
|
+
static cosmoDbKey: string;
|
|
9
|
+
static cosmoDbUrl: string;
|
|
10
|
+
static cosmoDbId: string;
|
|
11
|
+
static cosmoDbSessionId: string;
|
|
12
|
+
static mongoDB: string;
|
|
13
|
+
static mongoCollection: string;
|
|
14
|
+
static mongoURL: string;
|
|
15
|
+
static sessionExpiration: number;
|
|
16
|
+
static documentDB: string;
|
|
17
|
+
static selfURL: string;
|
|
18
|
+
static picoKey: string;
|
|
19
|
+
private static instance;
|
|
20
|
+
constructor(config: ConfigService);
|
|
21
|
+
static setup(config: ConfigService): CoreConfig;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a2_0x191a3b=a2_0x3a20;function a2_0x3a20(_0x44f4cb,_0x5d4998){const _0x451f2f=a2_0x5254();return a2_0x3a20=function(_0x1f395f,_0x21c013){_0x1f395f=_0x1f395f-0x9f;let _0x525417=_0x451f2f[_0x1f395f];return _0x525417;},a2_0x3a20(_0x44f4cb,_0x5d4998);}function a2_0x5254(){const _0x25f2db=['apply','SESSION_EXPIRATION','48oTHKAo','WNWFn','DOCUMENT_DB','NffYi','jTWQC','2EsinOt','cosmoDbUrl','setup','EHICP','(((.+)+)+)+$','YBJod','CoreConfig','5984930PbFOzS','OpenAIKey','GeminiKey','GetAs','toString','../utils/environ','MONGODB_URL','1275396dEMBdP','PmLOi','1863010OTqnjK','MONGO','instance','constructor','cYddR','COSMODB_URL','getOrThrow','OPENAI_KEY','__esModule','BSclv','selfURL','mongoDB','LLM_RETRY','COSMODB_KEY','109276kbTBIV','6ccLqYg','DuuHH','defineProperty','MONGODB_COLLECTION','cosmoDbSessionId','sessionExpiration','dHlwD','mongoCollection','4853340dkJEuM','376565CDlYHk','COSMODB_ID','86222PvfuYt','COSMODB_SESSION_ID','picoKey','get','search'];a2_0x5254=function(){return _0x25f2db;};return a2_0x5254();}(function(_0x63bd4e,_0x30e1c6){const _0x529640=a2_0x3a20,_0x5ad732=_0x63bd4e();while(!![]){try{const _0xb9be9f=-parseInt(_0x529640(0xc2))/0x1*(-parseInt(_0x529640(0xb6))/0x2)+-parseInt(_0x529640(0xd0))/0x3+-parseInt(_0x529640(0xaa))/0x4+parseInt(_0x529640(0xd2))/0x5*(parseInt(_0x529640(0xab))/0x6)+parseInt(_0x529640(0xb4))/0x7*(parseInt(_0x529640(0xbd))/0x8)+-parseInt(_0x529640(0xb3))/0x9+parseInt(_0x529640(0xc9))/0xa;if(_0xb9be9f===_0x30e1c6)break;else _0x5ad732['push'](_0x5ad732['shift']());}catch(_0xac8322){_0x5ad732['push'](_0x5ad732['shift']());}}}(a2_0x5254,0x5ed18));const a2_0x21c013=(function(){let _0xc1dc93=!![];return function(_0x5db4db,_0x15eb4d){const _0x12edf5=_0xc1dc93?function(){const _0x4566f5=a2_0x3a20;if(_0x15eb4d){const _0x58bf9c=_0x15eb4d[_0x4566f5(0xbb)](_0x5db4db,arguments);return _0x15eb4d=null,_0x58bf9c;}}:function(){};return _0xc1dc93=![],_0x12edf5;};}()),a2_0x1f395f=a2_0x21c013(this,function(){const _0x2989a9=a2_0x3a20,_0x2c3275={'BSclv':_0x2989a9(0xc6)};return a2_0x1f395f[_0x2989a9(0xcd)]()[_0x2989a9(0xba)](_0x2c3275[_0x2989a9(0xa5)])[_0x2989a9(0xcd)]()[_0x2989a9(0x9f)](a2_0x1f395f)[_0x2989a9(0xba)](_0x2c3275[_0x2989a9(0xa5)]);});a2_0x1f395f();'use strict';Object[a2_0x191a3b(0xad)](exports,a2_0x191a3b(0xa4),{'value':!![]}),exports[a2_0x191a3b(0xc8)]=void 0x0;const environ_1=require(a2_0x191a3b(0xce));class CoreConfig{constructor(_0x15ece1){const _0x49909=a2_0x191a3b,_0x510dc7={'jTWQC':_0x49909(0xa8),'WByrt':'LLM_TEMPERATURE','lirAR':'PICOFLOW_KEY','amhPc':'SELF_URL','DuuHH':'GEMINI_KEY','cYddR':_0x49909(0xa3),'ScXIs':_0x49909(0xbf),'YBJod':_0x49909(0xd3),'QauJS':_0x49909(0xa9),'dHlwD':_0x49909(0xb5),'RaoMq':_0x49909(0xb7),'EHICP':'MONGODB_NAME','WNWFn':_0x49909(0xae),'PmLOi':_0x49909(0xcf),'NffYi':_0x49909(0xbc)};CoreConfig['llmRetry']=(0x0,environ_1[_0x49909(0xcc)])(_0x15ece1['get'](_0x510dc7[_0x49909(0xc1)],0x3)),CoreConfig['llmTemperature']=(0x0,environ_1['GetAs'])(_0x15ece1['get'](_0x510dc7['WByrt'],0x0)),CoreConfig[_0x49909(0xb8)]=_0x15ece1['getOrThrow'](_0x510dc7['lirAR']),CoreConfig[_0x49909(0xa6)]=_0x15ece1[_0x49909(0xb9)](_0x510dc7['amhPc']),CoreConfig[_0x49909(0xcb)]=_0x15ece1[_0x49909(0xa2)](_0x510dc7[_0x49909(0xac)]),CoreConfig[_0x49909(0xca)]=_0x15ece1[_0x49909(0xa2)](_0x510dc7[_0x49909(0xa0)]),CoreConfig['AnthropicKey']=_0x15ece1[_0x49909(0xa2)]('ANTHROPIC_KEY'),CoreConfig['documentDB']=_0x15ece1[_0x49909(0xb9)](_0x510dc7['ScXIs'],_0x510dc7[_0x49909(0xc7)]),CoreConfig['cosmoDbKey']=_0x15ece1[_0x49909(0xb9)](_0x510dc7['QauJS']),CoreConfig[_0x49909(0xc3)]=_0x15ece1[_0x49909(0xb9)](_0x49909(0xa1)),CoreConfig['cosmoDbId']=_0x15ece1[_0x49909(0xb9)](_0x510dc7[_0x49909(0xb1)]),CoreConfig[_0x49909(0xaf)]=_0x15ece1[_0x49909(0xb9)](_0x510dc7['RaoMq']),CoreConfig[_0x49909(0xa7)]=_0x15ece1[_0x49909(0xa2)](_0x510dc7[_0x49909(0xc5)]),CoreConfig[_0x49909(0xb2)]=_0x15ece1[_0x49909(0xa2)](_0x510dc7[_0x49909(0xbe)]),CoreConfig['mongoURL']=_0x15ece1[_0x49909(0xa2)](_0x510dc7[_0x49909(0xd1)]),CoreConfig[_0x49909(0xb0)]=(0x0,environ_1[_0x49909(0xcc)])(_0x15ece1[_0x49909(0xb9)](_0x510dc7[_0x49909(0xc0)],0x258));}static[a2_0x191a3b(0xc4)](_0x1fbb93){const _0x452d6c=a2_0x191a3b;return!this[_0x452d6c(0xd4)]&&(this[_0x452d6c(0xd4)]=new CoreConfig(_0x1fbb93)),this['instance'];}}exports[a2_0x191a3b(0xc8)]=CoreConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a3_0x11cbc0=a3_0x2962;(function(_0x198224,_0x25eec6){const _0x1423fc=a3_0x2962,_0x4c9e0d=_0x198224();while(!![]){try{const _0x466a92=-parseInt(_0x1423fc(0x70))/0x1+-parseInt(_0x1423fc(0x7a))/0x2+parseInt(_0x1423fc(0x75))/0x3+parseInt(_0x1423fc(0x71))/0x4*(-parseInt(_0x1423fc(0x7b))/0x5)+parseInt(_0x1423fc(0x74))/0x6+-parseInt(_0x1423fc(0x77))/0x7*(-parseInt(_0x1423fc(0x6f))/0x8)+-parseInt(_0x1423fc(0x82))/0x9*(parseInt(_0x1423fc(0x7c))/0xa);if(_0x466a92===_0x25eec6)break;else _0x4c9e0d['push'](_0x4c9e0d['shift']());}catch(_0x3c22a2){_0x4c9e0d['push'](_0x4c9e0d['shift']());}}}(a3_0x51f7,0x1d139));const a3_0x108f74=(function(){let _0x59bd6f=!![];return function(_0x1fbeec,_0x4955dc){const _0x5447ce=_0x59bd6f?function(){const _0x486adf=a3_0x2962;if(_0x4955dc){const _0x162c2d=_0x4955dc[_0x486adf(0x78)](_0x1fbeec,arguments);return _0x4955dc=null,_0x162c2d;}}:function(){};return _0x59bd6f=![],_0x5447ce;};}()),a3_0x5ab0d9=a3_0x108f74(this,function(){const _0x2cdf63=a3_0x2962,_0x444394={'FRzpA':'(((.+)+)+)+$'};return a3_0x5ab0d9['toString']()[_0x2cdf63(0x72)](_0x2cdf63(0x7d))[_0x2cdf63(0x81)]()[_0x2cdf63(0x6e)](a3_0x5ab0d9)['search'](_0x444394[_0x2cdf63(0x73)]);});a3_0x5ab0d9();'use strict';function a3_0x2962(_0x26ece3,_0x52ed79){const _0x419032=a3_0x51f7();return a3_0x2962=function(_0x5ab0d9,_0x108f74){_0x5ab0d9=_0x5ab0d9-0x6e;let _0x51f789=_0x419032[_0x5ab0d9];return _0x51f789;},a3_0x2962(_0x26ece3,_0x52ed79);}Object[a3_0x11cbc0(0x7e)](exports,a3_0x11cbc0(0x80),{'value':!![]}),exports[a3_0x11cbc0(0x76)]=exports[a3_0x11cbc0(0x79)]=void 0x0;const StopToolPrompt=()=>{return(_0x6629e0,_0x11682a,_0x5d0fed)=>{const _0x525abe=a3_0x2962,_0x52d2c8=_0x5d0fed[_0x525abe(0x7f)];return _0x5d0fed[_0x525abe(0x7f)]=async function(..._0x306730){const _0x560aab=_0x525abe;let _0x3bbbc2=await _0x52d2c8[_0x560aab(0x78)](this);return _0x3bbbc2=await this['amendTool'](_0x3bbbc2),_0x3bbbc2;},_0x5d0fed;};};exports[a3_0x11cbc0(0x79)]=StopToolPrompt;function a3_0x51f7(){const _0x5cd2ce=['302504DRkQKj','89969oCfPPH','12nuXlsE','search','FRzpA','764310djDrKY','566907JLzTzn','StopToolMessage','7obZqzM','apply','StopToolPrompt','244824HuQgIP','30890VBpDhL','2770GeDWiZ','(((.+)+)+)+$','defineProperty','value','__esModule','toString','135IWtMUc','constructor'];a3_0x51f7=function(){return _0x5cd2ce;};return a3_0x51f7();}const StopToolMessage=()=>{return(_0x5d72f8,_0xba378d,_0xc6ae4f)=>{const _0x39c1de=a3_0x2962,_0x5e7f1b=_0xc6ae4f['value'];return _0xc6ae4f[_0x39c1de(0x7f)]=async function(..._0x1c46b5){const _0x1b8ef4=_0x39c1de,_0x29e768=_0x1c46b5[0x0],_0x336805=await _0x5e7f1b[_0x1b8ef4(0x78)](this,_0x1c46b5);return this['setStopTool'](_0x336805,_0x29e768['name']);},_0xc6ae4f;};};exports[a3_0x11cbc0(0x76)]=StopToolMessage;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare enum HttpContentType {
|
|
2
|
+
Json = "application/json",
|
|
3
|
+
Xml = "application/xml",
|
|
4
|
+
TextXml = "text/xml",
|
|
5
|
+
RssXml = "application/rss+xml",
|
|
6
|
+
AtomXml = "application/atom+xml",
|
|
7
|
+
Yaml = "application/x-yaml",
|
|
8
|
+
TextYaml = "text/yaml",
|
|
9
|
+
JsonLd = "application/ld+json",
|
|
10
|
+
FormUrlEncoded = "application/x-www-form-urlencoded",
|
|
11
|
+
MultipartFormData = "multipart/form-data",
|
|
12
|
+
JsonApi = "application/vnd.api+json",
|
|
13
|
+
Html = "text/html",
|
|
14
|
+
Plain = "text/plain",
|
|
15
|
+
Pdf = "application/pdf",
|
|
16
|
+
MsWord = "application/msword",
|
|
17
|
+
Docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
18
|
+
Odt = "application/vnd.oasis.opendocument.text",
|
|
19
|
+
Rtf = "text/rtf",
|
|
20
|
+
Markdown = "text/markdown",
|
|
21
|
+
Csv = "text/csv",
|
|
22
|
+
Xls = "application/vnd.ms-excel",
|
|
23
|
+
Xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
24
|
+
Ods = "application/vnd.oasis.opendocument.spreadsheet",
|
|
25
|
+
Png = "image/png",
|
|
26
|
+
Jpeg = "image/jpeg",
|
|
27
|
+
Gif = "image/gif",
|
|
28
|
+
Webp = "image/webp",
|
|
29
|
+
Svg = "image/svg+xml",
|
|
30
|
+
Mp3 = "audio/mpeg",
|
|
31
|
+
Ogg = "audio/ogg",
|
|
32
|
+
Mp4 = "video/mp4",
|
|
33
|
+
Webm = "video/webm",
|
|
34
|
+
OctetStream = "application/octet-stream",
|
|
35
|
+
Zip = "application/zip",
|
|
36
|
+
Gzip = "application/gzip",
|
|
37
|
+
Tar = "application/x-tar"
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var a4_0x32b8b8=a4_0x140f;function a4_0x2a61(){var _0x1a65df=['Zip','Plain','Mp4','Gif','MsWord','341983TXlUdA','ePtnu','XqEyD','application/json','image/gif','5964615ncYldk','PYASI','NZibg','kWEBA','PzqUV','search','197436IGgnEx','defineProperty','FormUrlEncoded','application/ld+json','apply','image/svg+xml','application/x-tar','AiPee','Uuteq','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/pdf','BbICa','31684896gRUvNL','rnGCV','MultipartFormData','hIasc','HttpContentType','image/png','JyYsC','Uuils','KOnzE','FSxGv','application/zip','audio/ogg','TextXml','71492SXvZNy','jNiTL','iKDas','Pdf','63lYTkHm','Ods','text/xml','application/x-yaml','Efsqw','Markdown','kpeKC','application/atom+xml','LbizC','Json','text/rtf','application/x-www-form-urlencoded','Html','UqZLK','cLBgp','Gzip','hwQQS','tkGLn','JCRQI','application/vnd.oasis.opendocument.spreadsheet','Png','text/plain','EWLvh','text/html','ysuAP','text/csv','video/mp4','BHJvB','PwlET','UZcAw','(((.+)+)+)+$','text/yaml','application/rss+xml','Xlsx','KXdUh','OctetStream','212654bsnDzh','Docx','dGsvD','Ogg','Xls','Csv','Xml','Yaml','dJTFY','RssXml','toString','ACZIW','NbRoJ','application/msword','constructor','Odt','rhGvr','wXCwc','9639588MfNTiM','zGHjK','application/vnd.ms-excel','JsonApi','vIudx','PFQFR','drPmy','DxXol','Rtf','Jpeg','Tar','audio/mpeg','image/webp'];a4_0x2a61=function(){return _0x1a65df;};return a4_0x2a61();}(function(_0x36f43d,_0x1f085d){var _0x2c3ed3=a4_0x140f,_0x143e58=_0x36f43d();while(!![]){try{var _0x419af1=-parseInt(_0x2c3ed3(0x126))/0x1+parseInt(_0x2c3ed3(0x102))/0x2+-parseInt(_0x2c3ed3(0xde))/0x3*(parseInt(_0x2c3ed3(0xda))/0x4)+-parseInt(_0x2c3ed3(0x12b))/0x5+-parseInt(_0x2c3ed3(0x131))/0x6+-parseInt(_0x2c3ed3(0x114))/0x7+parseInt(_0x2c3ed3(0x13d))/0x8;if(_0x419af1===_0x1f085d)break;else _0x143e58['push'](_0x143e58['shift']());}catch(_0x5065f2){_0x143e58['push'](_0x143e58['shift']());}}}(a4_0x2a61,0xb64d6));function a4_0x140f(_0x464ad9,_0x1977ae){var _0x4317f3=a4_0x2a61();return a4_0x140f=function(_0x13690a,_0x5c64ba){_0x13690a=_0x13690a-0xd5;var _0x2a619c=_0x4317f3[_0x13690a];return _0x2a619c;},a4_0x140f(_0x464ad9,_0x1977ae);}Object[a4_0x32b8b8(0x132)](exports,'__esModule',{'value':!![]}),exports[a4_0x32b8b8(0x141)]=void 0x0;var HttpContentType;(function(_0x437f00){var _0x3d53c6=a4_0x32b8b8,_0x38a397={'ACZIW':_0x3d53c6(0xfc),'JyYsC':function(_0x5617ce,_0x17bf75,_0x10a1fa){return _0x5617ce(_0x17bf75,_0x10a1fa);},'AiPee':function(_0xfb3195){return _0xfb3195();},'PYASI':_0x3d53c6(0xe7),'nrROx':_0x3d53c6(0x108),'twWwQ':_0x3d53c6(0xd9),'hwQQS':_0x3d53c6(0xe0),'dJTFY':_0x3d53c6(0x10b),'ePtnu':_0x3d53c6(0xfe),'KXdUh':_0x3d53c6(0xe5),'Efsqw':_0x3d53c6(0x109),'CLSRs':'TextYaml','EWLvh':'JsonLd','BbICa':_0x3d53c6(0x134),'zGHjK':_0x3d53c6(0x133),'dGsvD':_0x3d53c6(0xe9),'PFQFR':_0x3d53c6(0x13f),'UqZLK':'multipart/form-data','Uuteq':_0x3d53c6(0x117),'LbizC':'application/vnd.api+json','Hutkd':_0x3d53c6(0x122),'kWEBA':_0x3d53c6(0xf3),'UZcAw':_0x3d53c6(0xdd),'BHJvB':_0x3d53c6(0x103),'jNiTL':'application/vnd.openxmlformats-officedocument.wordprocessingml.document','Uuils':_0x3d53c6(0x111),'NbRoJ':'application/vnd.oasis.opendocument.text','tkGLn':_0x3d53c6(0x11c),'drPmy':_0x3d53c6(0xe8),'vIudx':'text/markdown','iKDas':_0x3d53c6(0x107),'SQXMP':_0x3d53c6(0xf7),'hIasc':_0x3d53c6(0xff),'LzdLU':_0x3d53c6(0x13a),'rnGCV':_0x3d53c6(0xf1),'QhZXh':_0x3d53c6(0xf2),'NZibg':_0x3d53c6(0x142),'yfQjb':'image/jpeg','cLBgp':_0x3d53c6(0x124),'uBuoZ':_0x3d53c6(0x12a),'FHEYG':'Webp','ysuAP':'Svg','IwONi':_0x3d53c6(0x136),'PwlET':'Mp3','PzqUV':_0x3d53c6(0x11f),'KOnzE':_0x3d53c6(0x105),'FSxGv':_0x3d53c6(0xd8),'wXCwc':_0x3d53c6(0x123),'rhGvr':_0x3d53c6(0xf8),'DxXol':'Webm','AWKSM':'application/octet-stream','XqEyD':_0x3d53c6(0x121),'kpeKC':_0x3d53c6(0xd7),'JCRQI':_0x3d53c6(0xed),'aGwvF':_0x3d53c6(0x11e)},_0x1159f5=(function(){var _0x5e7a32=!![];return function(_0x1919b5,_0x120f3b){var _0x1a4aa8=_0x5e7a32?function(){var _0x5258ee=a4_0x140f;if(_0x120f3b){var _0x3421c1=_0x120f3b[_0x5258ee(0x135)](_0x1919b5,arguments);return _0x120f3b=null,_0x3421c1;}}:function(){};return _0x5e7a32=![],_0x1a4aa8;};}()),_0x5a84ae=_0x38a397[_0x3d53c6(0x143)](_0x1159f5,this,function(){var _0x2a9040=_0x3d53c6;return _0x5a84ae['toString']()[_0x2a9040(0x130)](_0x38a397['ACZIW'])[_0x2a9040(0x10c)]()[_0x2a9040(0x110)](_0x5a84ae)['search'](_0x38a397[_0x2a9040(0x10d)]);});_0x38a397[_0x3d53c6(0x138)](_0x5a84ae),_0x437f00[_0x38a397[_0x3d53c6(0x12c)]]=_0x3d53c6(0x129),_0x437f00[_0x38a397['nrROx']]='application/xml',_0x437f00[_0x38a397['twWwQ']]=_0x38a397[_0x3d53c6(0xee)],_0x437f00[_0x38a397[_0x3d53c6(0x10a)]]=_0x38a397[_0x3d53c6(0x127)],_0x437f00['AtomXml']=_0x38a397[_0x3d53c6(0x100)],_0x437f00[_0x38a397[_0x3d53c6(0xe2)]]=_0x3d53c6(0xe1),_0x437f00[_0x38a397['CLSRs']]=_0x3d53c6(0xfd),_0x437f00[_0x38a397[_0x3d53c6(0xf4)]]=_0x38a397[_0x3d53c6(0x13c)],_0x437f00[_0x38a397[_0x3d53c6(0x115)]]=_0x38a397[_0x3d53c6(0x104)],_0x437f00[_0x38a397[_0x3d53c6(0x119)]]=_0x38a397[_0x3d53c6(0xeb)],_0x437f00[_0x38a397[_0x3d53c6(0x139)]]=_0x38a397[_0x3d53c6(0xe6)],_0x437f00[_0x3d53c6(0xea)]=_0x3d53c6(0xf5),_0x437f00[_0x38a397['Hutkd']]=_0x38a397[_0x3d53c6(0x12e)],_0x437f00[_0x38a397[_0x3d53c6(0xfb)]]=_0x3d53c6(0x13b),_0x437f00[_0x3d53c6(0x125)]=_0x3d53c6(0x10f),_0x437f00[_0x38a397[_0x3d53c6(0xf9)]]=_0x38a397[_0x3d53c6(0xdb)],_0x437f00[_0x38a397[_0x3d53c6(0x144)]]=_0x38a397[_0x3d53c6(0x10e)],_0x437f00[_0x38a397[_0x3d53c6(0xef)]]=_0x38a397[_0x3d53c6(0x11a)],_0x437f00[_0x3d53c6(0xe3)]=_0x38a397[_0x3d53c6(0x118)],_0x437f00[_0x38a397[_0x3d53c6(0xdc)]]=_0x38a397['SQXMP'],_0x437f00[_0x3d53c6(0x106)]=_0x3d53c6(0x116),_0x437f00[_0x38a397[_0x3d53c6(0x140)]]=_0x38a397['LzdLU'],_0x437f00[_0x3d53c6(0xdf)]=_0x38a397[_0x3d53c6(0x13e)],_0x437f00[_0x38a397['QhZXh']]=_0x38a397[_0x3d53c6(0x12d)],_0x437f00[_0x3d53c6(0x11d)]=_0x38a397['yfQjb'],_0x437f00[_0x38a397[_0x3d53c6(0xec)]]=_0x38a397['uBuoZ'],_0x437f00[_0x38a397['FHEYG']]=_0x3d53c6(0x120),_0x437f00[_0x38a397[_0x3d53c6(0xf6)]]=_0x38a397['IwONi'],_0x437f00[_0x38a397[_0x3d53c6(0xfa)]]=_0x38a397[_0x3d53c6(0x12f)],_0x437f00[_0x38a397[_0x3d53c6(0xd5)]]=_0x38a397[_0x3d53c6(0xd6)],_0x437f00[_0x38a397[_0x3d53c6(0x113)]]=_0x38a397[_0x3d53c6(0x112)],_0x437f00[_0x38a397[_0x3d53c6(0x11b)]]='video/webm',_0x437f00[_0x3d53c6(0x101)]=_0x38a397['AWKSM'],_0x437f00[_0x38a397[_0x3d53c6(0x128)]]=_0x38a397[_0x3d53c6(0xe4)],_0x437f00[_0x38a397[_0x3d53c6(0xf0)]]='application/gzip',_0x437f00[_0x38a397['aGwvF']]=_0x3d53c6(0x137);}(HttpContentType||(exports['HttpContentType']=HttpContentType={})));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Flow } from '../flow/flow';
|
|
2
|
+
import { ToolResponseType, ToolType } from '../flow/flow-types';
|
|
3
|
+
import { MessageTypes } from '../utils/message-util';
|
|
4
|
+
import { ToolCall } from '@langchain/core/messages/tool';
|
|
5
|
+
import { Step } from './step';
|
|
6
|
+
export declare class EndStep extends Step {
|
|
7
|
+
constructor(flow: Flow, isActive?: boolean);
|
|
8
|
+
onCrossing(_userMessage: MessageTypes, _priorStep?: string): MessageTypes;
|
|
9
|
+
isEnd(): boolean;
|
|
10
|
+
protected onEnter(): void;
|
|
11
|
+
getPrompt(): string;
|
|
12
|
+
defineTool(): ToolType[];
|
|
13
|
+
protected end_chat(_tool: ToolCall): Promise<ToolResponseType>;
|
|
14
|
+
}
|
package/flow/end-step.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a5_0x3b3c6b=a5_0x2b23;(function(_0x3db04f,_0x20ba87){const _0x1fb5f6=a5_0x2b23,_0x9fe20c=_0x3db04f();while(!![]){try{const _0x375c7c=parseInt(_0x1fb5f6(0x1ca))/0x1*(-parseInt(_0x1fb5f6(0x1ac))/0x2)+-parseInt(_0x1fb5f6(0x1a8))/0x3*(-parseInt(_0x1fb5f6(0x1d2))/0x4)+parseInt(_0x1fb5f6(0x1c4))/0x5+parseInt(_0x1fb5f6(0x1b4))/0x6+-parseInt(_0x1fb5f6(0x1ce))/0x7*(-parseInt(_0x1fb5f6(0x1bc))/0x8)+-parseInt(_0x1fb5f6(0x1a9))/0x9+-parseInt(_0x1fb5f6(0x1c1))/0xa*(parseInt(_0x1fb5f6(0x1c6))/0xb);if(_0x375c7c===_0x20ba87)break;else _0x9fe20c['push'](_0x9fe20c['shift']());}catch(_0x56e964){_0x9fe20c['push'](_0x9fe20c['shift']());}}}(a5_0x5db4,0x66be9));function a5_0x2b23(_0x162138,_0xf3253e){const _0xefa22d=a5_0x5db4();return a5_0x2b23=function(_0x380b5d,_0x371713){_0x380b5d=_0x380b5d-0x1a4;let _0x5db45f=_0xefa22d[_0x380b5d];return _0x5db45f;},a5_0x2b23(_0x162138,_0xf3253e);}function a5_0x5db4(){const _0x180237=['77RIuOIf','search','__esModule','defineTool','1NVHQMJ','the\x20prompt\x20to\x20be\x20displayed\x20later','uFRer','getPrompt','243467irFGvq','WgBUH','object','\x0aNicely\x20tell\x20the\x20user\x20this\x20is\x20the\x20end\x20of\x20conversation\x20as\x20they\x20requested,\x20you\x20MUST\x20NOT\x20talk\x20other\x20things!\x0a','4CPkcOr','string','I\x27m\x20done\x20with\x20chat','EndStep','apply','2022027QJtGZR','4990770mCeZRc','../utils/message-util','oluvz','835606cSCHQQ','./step','toString','default','TcBxx','(((.+)+)+)+$','VDIlr','kHIFU','3786648eqYfGD','end\x20the\x20chat\x20conversation','__importDefault','HumanMessageEx','defineProperty','end_chat','yzmyA','completed','88dFQNGw','constructor','describe','onCrossing','eKcDU','426990KxFBHV','onEnter','sInNz','21795iqKTmi','SMuRB'];a5_0x5db4=function(){return _0x180237;};return a5_0x5db4();}const a5_0x371713=(function(){const _0x4b3f75=a5_0x2b23,_0x27c339={'sInNz':'end_chat','xAccz':_0x4b3f75(0x1b5),'oluvz':function(_0x294b19,_0x20d661){return _0x294b19!==_0x20d661;},'kHIFU':_0x4b3f75(0x1ba)};let _0x13d283=!![];return function(_0x4bb5cb,_0x2599a0){const _0x3d537b=_0x4b3f75,_0x5a995f={'SMuRB':_0x27c339[_0x3d537b(0x1c3)],'TcBxx':_0x27c339['xAccz']};if(_0x27c339[_0x3d537b(0x1ab)](_0x3d537b(0x1ba),_0x27c339[_0x3d537b(0x1b3)]))return[{'name':_0x5a995f[_0x3d537b(0x1c5)],'description':_0x5a995f[_0x3d537b(0x1b0)],'schema':_0x45e832[_0x3d537b(0x1af)]['object']({'prompt':_0x28abb6[_0x3d537b(0x1af)][_0x3d537b(0x1a4)]()[_0x3d537b(0x1be)](_0x3d537b(0x1cb))})}];else{const _0x29b8d5=_0x13d283?function(){const _0x3be30a=_0x3d537b;if(_0x2599a0){const _0x1a88cb=_0x2599a0[_0x3be30a(0x1a7)](_0x4bb5cb,arguments);return _0x2599a0=null,_0x1a88cb;}}:function(){};return _0x13d283=![],_0x29b8d5;}};}()),a5_0x380b5d=a5_0x371713(this,function(){const _0x3bc275=a5_0x2b23,_0x438905={'WgBUH':_0x3bc275(0x1b1)};return a5_0x380b5d[_0x3bc275(0x1ae)]()['search'](_0x438905[_0x3bc275(0x1cf)])[_0x3bc275(0x1ae)]()[_0x3bc275(0x1bd)](a5_0x380b5d)[_0x3bc275(0x1c7)](_0x438905[_0x3bc275(0x1cf)]);});a5_0x380b5d();'use strict';var __importDefault=this&&this[a5_0x3b3c6b(0x1b6)]||function(_0x3a9ad4){const _0x3d62d6=a5_0x3b3c6b;return _0x3a9ad4&&_0x3a9ad4[_0x3d62d6(0x1c8)]?_0x3a9ad4:{'default':_0x3a9ad4};};Object[a5_0x3b3c6b(0x1b8)](exports,'__esModule',{'value':!![]}),exports[a5_0x3b3c6b(0x1a6)]=void 0x0;const zod_1=__importDefault(require('zod')),message_util_1=require(a5_0x3b3c6b(0x1aa)),step_1=require(a5_0x3b3c6b(0x1ad)),AbruptEndPrompt=a5_0x3b3c6b(0x1d1);class EndStep extends step_1['Step']{constructor(_0x2cf18d,_0x460f94){super(EndStep,_0x2cf18d,_0x460f94);}[a5_0x3b3c6b(0x1bf)](_0x431254,_0x3edae4){const _0x5f535c=a5_0x3b3c6b;return new message_util_1[(_0x5f535c(0x1b7))](this,_0x5f535c(0x1a5));}['isEnd'](){return!![];}[a5_0x3b3c6b(0x1c2)](){const _0x119316=a5_0x3b3c6b,_0x35826b={'FsPeW':_0x119316(0x1bb)},_0x1edac1=this['flow']['getSessionDoc']();_0x1edac1['runStatus']=_0x35826b['FsPeW'];}[a5_0x3b3c6b(0x1cd)](){const _0x3c0e4e=a5_0x3b3c6b,_0x4565de={'eKcDU':function(_0x5e59e7,_0x53b561){return _0x5e59e7===_0x53b561;}},_0x593d46=super[_0x3c0e4e(0x1cd)]();return _0x593d46?_0x593d46:_0x4565de[_0x3c0e4e(0x1c0)]('uFRer',_0x3c0e4e(0x1cc))?AbruptEndPrompt:!![];}[a5_0x3b3c6b(0x1c9)](){const _0x20dbd1=a5_0x3b3c6b,_0x4709e1={'VDIlr':_0x20dbd1(0x1b5)};return[{'name':_0x20dbd1(0x1b9),'description':_0x4709e1[_0x20dbd1(0x1b2)],'schema':zod_1[_0x20dbd1(0x1af)][_0x20dbd1(0x1d0)]({'prompt':zod_1[_0x20dbd1(0x1af)]['string']()[_0x20dbd1(0x1be)]('the\x20prompt\x20to\x20be\x20displayed\x20later')})}];}async[a5_0x3b3c6b(0x1b9)](_0x5dd8d5){return{'step':EndStep};}}exports[a5_0x3b3c6b(0x1a6)]=EndStep;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Flow } from './flow';
|
|
2
|
+
import { SessionType } from './flow-types';
|
|
3
|
+
import { FlowEngine } from '../services/flow-engine';
|
|
4
|
+
export declare class FlowCreator {
|
|
5
|
+
static create(flowName: string, sessionId: string, flowEngine: FlowEngine, context?: object): Promise<Flow>;
|
|
6
|
+
static createDoc(): Promise<SessionType>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a6_0x28350d=a6_0x53b1;(function(_0x3608cd,_0x4787c9){const _0x51033b=a6_0x53b1,_0x153627=_0x3608cd();while(!![]){try{const _0x3b08e4=parseInt(_0x51033b(0x9b))/0x1+-parseInt(_0x51033b(0xb4))/0x2+-parseInt(_0x51033b(0xb6))/0x3+parseInt(_0x51033b(0x9a))/0x4*(-parseInt(_0x51033b(0xa2))/0x5)+-parseInt(_0x51033b(0xb0))/0x6+-parseInt(_0x51033b(0xb1))/0x7*(parseInt(_0x51033b(0x91))/0x8)+-parseInt(_0x51033b(0x8e))/0x9*(-parseInt(_0x51033b(0x92))/0xa);if(_0x3b08e4===_0x4787c9)break;else _0x153627['push'](_0x153627['shift']());}catch(_0x1742f9){_0x153627['push'](_0x153627['shift']());}}}(a6_0x3fea,0x73757));const a6_0x82de3b=(function(){const _0xfed5a1=a6_0x53b1,_0xbee8={'BDIeH':function(_0x2def11,_0x521278){return _0x2def11===_0x521278;},'KJfFq':_0xfed5a1(0x8f),'YIfQy':_0xfed5a1(0x9c),'ovnmk':_0xfed5a1(0x97),'imKyR':_0xfed5a1(0xaf)};let _0x29172e=!![];return function(_0xa290de,_0x566708){const _0x4c4cce=_0xfed5a1,_0x5e8a46={'Xazwu':_0xbee8[_0x4c4cce(0xa5)]};if(_0xbee8['imKyR']===_0xbee8[_0x4c4cce(0x93)]){const _0x34989d=_0x29172e?function(){const _0x54b3a2=_0x4c4cce;if(_0xbee8[_0x54b3a2(0xb5)](_0xbee8['KJfFq'],_0xbee8[_0x54b3a2(0x99)]))return _0x55ff0c[_0x54b3a2(0x9e)]()[_0x54b3a2(0xa3)](_0x5e8a46[_0x54b3a2(0xad)])[_0x54b3a2(0x9e)]()[_0x54b3a2(0xa1)](_0x51347c)[_0x54b3a2(0xa3)](_0x5e8a46[_0x54b3a2(0xad)]);else{if(_0x566708){const _0x1c7204=_0x566708[_0x54b3a2(0xb8)](_0xa290de,arguments);return _0x566708=null,_0x1c7204;}}}:function(){};return _0x29172e=![],_0x34989d;}else{const _0xed1aef=(0x0,_0x75ce82['v4'])();return{'id':_0xed1aef,'version':0x1,'runStatus':'running','createdOn':(0x0,_0x5d196f[_0x4c4cce(0xa8)])()['toDate'](),'saveOn':(0x0,_0x5b3293['default'])()[_0x4c4cce(0x96)](),'expireAfter':_0x2c738c['CoreConfig'][_0x4c4cce(0x9f)],'tokens':{'inputTokens':0x0,'outputTokens':0x0,'totalTokens':0x0},'flows':[],'log':[],'error':[],'warn':[],'debug':[],'verbose':[]};}};}()),a6_0x1963b5=a6_0x82de3b(this,function(){const _0x5c86b3=a6_0x53b1,_0x188100={'zbXuz':_0x5c86b3(0x97)};return a6_0x1963b5[_0x5c86b3(0x9e)]()['search'](_0x188100[_0x5c86b3(0xa7)])[_0x5c86b3(0x9e)]()['constructor'](a6_0x1963b5)[_0x5c86b3(0xa3)](_0x188100[_0x5c86b3(0xa7)]);});a6_0x1963b5();'use strict';var __importDefault=this&&this['__importDefault']||function(_0x42c241){const _0x290bc7=a6_0x53b1;return _0x42c241&&_0x42c241[_0x290bc7(0xae)]?_0x42c241:{'default':_0x42c241};};Object[a6_0x28350d(0xa0)](exports,'__esModule',{'value':!![]}),exports[a6_0x28350d(0xb7)]=void 0x0;const moment_1=__importDefault(require(a6_0x28350d(0xaa))),uuid_1=require('uuid'),core_config_1=require(a6_0x28350d(0xb3)),memory_1=require(a6_0x28350d(0xab));class FlowCreator{static async[a6_0x28350d(0xa9)](_0x3f2bfe,_0x7eb005,_0x2d605b,_0x3f0c8a){const _0x2bd2f8=a6_0x28350d,_0x5aa56f=_0x2d605b['getFlow'](_0x3f2bfe);if(_0x5aa56f){const _0x2448e0=new _0x5aa56f();return _0x2448e0[_0x2bd2f8(0x9d)](_0x3f0c8a),_0x2448e0['setMemory'](new memory_1['Memory']()),await _0x2448e0[_0x2bd2f8(0x90)](),_0x2448e0[_0x2bd2f8(0x98)](),await _0x2448e0[_0x2bd2f8(0xac)](_0x7eb005,_0x2d605b),_0x2448e0;}else throw new Error(_0x2bd2f8(0xa4)+_0x3f2bfe+_0x2bd2f8(0xb2));}static async['createDoc'](){const _0x4e7ff3=a6_0x28350d,_0x5bc13e={'npnvq':_0x4e7ff3(0xa6)},_0x359011=(0x0,uuid_1['v4'])();return{'id':_0x359011,'version':0x1,'runStatus':_0x5bc13e[_0x4e7ff3(0x95)],'createdOn':(0x0,moment_1[_0x4e7ff3(0xa8)])()[_0x4e7ff3(0x96)](),'saveOn':(0x0,moment_1['default'])()[_0x4e7ff3(0x96)](),'expireAfter':core_config_1[_0x4e7ff3(0x94)][_0x4e7ff3(0x9f)],'tokens':{'inputTokens':0x0,'outputTokens':0x0,'totalTokens':0x0},'flows':[],'log':[],'error':[],'warn':[],'debug':[],'verbose':[]};}}function a6_0x53b1(_0x50989a,_0xe7881c){const _0x1f45d7=a6_0x3fea();return a6_0x53b1=function(_0x1963b5,_0x82de3b){_0x1963b5=_0x1963b5-0x8e;let _0x3fea68=_0x1f45d7[_0x1963b5];return _0x3fea68;},a6_0x53b1(_0x50989a,_0xe7881c);}exports[a6_0x28350d(0xb7)]=FlowCreator;function a6_0x3fea(){const _0x5b7d6b=['FlowClass\x20\x20\x27','ovnmk','running','zbXuz','default','create','moment','./memory','bootstrap','Xazwu','__esModule','TwbrW','2605554bCGDnd','4757207EbvyKf','\x27\x20not\x20registered.','../configs/core-config','471140bcAhWU','BDIeH','1140927pVtBBO','FlowCreator','apply','80631KnozFH','XNDVV','init','8mqjlzD','2300XGSmep','imKyR','CoreConfig','npnvq','toDate','(((.+)+)+)+$','collectSteps','YIfQy','8dOYvkO','281820yQeRLD','QbKIZ','addContext','toString','sessionExpiration','defineProperty','constructor','349330RtozuI','search'];a6_0x3fea=function(){return _0x5b7d6b;};return a6_0x3fea();}
|