@picoflow/core 1.0.11 → 1.0.13
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/README.md +4 -3
- 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.d.ts +33 -26
- package/flow/flow-types.js +1 -1
- package/flow/flow.d.ts +10 -3
- 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 +9 -5
- package/flow/step.js +1 -1
- package/index.js +45 -26
- package/models/default-models.d.ts +2 -0
- package/models/default-models.js +1 -0
- package/models/model-registry.d.ts +66 -0
- package/models/model-registry.js +1 -0
- package/package.json +1 -1
- package/prompt/flow-prompt.js +1 -1
- package/prompt/prompt-util.js +1 -1
- package/services/flow-engine.d.ts +6 -23
- 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/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.d.ts +4 -0
- 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/index.js
CHANGED
|
@@ -1,47 +1,66 @@
|
|
|
1
1
|
// PicoFlow - Main exports
|
|
2
2
|
"use strict";
|
|
3
|
+
const path = require("path");
|
|
4
|
+
|
|
5
|
+
const load = (relativePath) => {
|
|
6
|
+
const candidates = [
|
|
7
|
+
path.join(__dirname, relativePath),
|
|
8
|
+
path.join(__dirname, "../dist/picoflow", relativePath),
|
|
9
|
+
];
|
|
10
|
+
for (const candidate of candidates) {
|
|
11
|
+
try {
|
|
12
|
+
// eslint-disable-next-line import/no-dynamic-require, global-require
|
|
13
|
+
return require(candidate);
|
|
14
|
+
} catch (err) {
|
|
15
|
+
if (err.code !== "MODULE_NOT_FOUND") {
|
|
16
|
+
throw err;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const tried = candidates.join(", ");
|
|
21
|
+
throw new Error(`picoflow.index could not load '${relativePath}'. Tried: ${tried}`);
|
|
22
|
+
};
|
|
3
23
|
|
|
4
24
|
// Flow
|
|
5
|
-
module.exports.Flow =
|
|
6
|
-
module.exports.Step =
|
|
7
|
-
module.exports.LogicStep =
|
|
8
|
-
module.exports.EndStep =
|
|
9
|
-
module.exports.Memory =
|
|
10
|
-
module.exports.FlowCreator =
|
|
11
|
-
module.exports.HttpContentType =
|
|
25
|
+
module.exports.Flow = load("flow/flow").Flow;
|
|
26
|
+
module.exports.Step = load("flow/step").Step;
|
|
27
|
+
module.exports.LogicStep = load("flow/logic-step").LogicStep;
|
|
28
|
+
module.exports.EndStep = load("flow/end-step").EndStep;
|
|
29
|
+
module.exports.Memory = load("flow/memory").Memory;
|
|
30
|
+
module.exports.FlowCreator = load("flow/flow-creator").FlowCreator;
|
|
31
|
+
module.exports.HttpContentType = load("flow/content-type").HttpContentType;
|
|
12
32
|
|
|
13
33
|
// Flow Types
|
|
14
|
-
const flowTypes =
|
|
34
|
+
const flowTypes = load("flow/flow-types");
|
|
15
35
|
module.exports.ToolResponseType = flowTypes.ToolResponseType;
|
|
16
36
|
|
|
17
37
|
// Services
|
|
18
|
-
module.exports.FlowEngine =
|
|
38
|
+
module.exports.FlowEngine = load("services/flow-engine").FlowEngine;
|
|
19
39
|
|
|
20
40
|
// Session
|
|
21
|
-
module.exports.FlowSession =
|
|
22
|
-
module.exports.SessionLogger =
|
|
23
|
-
module.exports.FileSession =
|
|
24
|
-
module.exports.MongoSession =
|
|
25
|
-
module.exports.CosmoSession =
|
|
41
|
+
module.exports.FlowSession = load("session/flow-session").FlowSession;
|
|
42
|
+
module.exports.SessionLogger = load("session/session-logger").SessionLogger;
|
|
43
|
+
module.exports.FileSession = load("session/file-session").FileSession;
|
|
44
|
+
module.exports.MongoSession = load("session/mongo-session").MongoSession;
|
|
45
|
+
module.exports.CosmoSession = load("session/cosmo-session").CosmoSession;
|
|
26
46
|
|
|
27
47
|
// Configs
|
|
28
|
-
module.exports.CoreConfig =
|
|
48
|
+
module.exports.CoreConfig = load("configs/core-config").CoreConfig;
|
|
29
49
|
|
|
30
50
|
// Utils
|
|
31
|
-
module.exports.MessageUtil =
|
|
32
|
-
module.exports.ToolUtil =
|
|
33
|
-
module.exports.StringUtil =
|
|
34
|
-
module.exports.Environ =
|
|
35
|
-
module.exports.LlmFile =
|
|
36
|
-
module.exports.K =
|
|
51
|
+
module.exports.MessageUtil = load("utils/message-util").MessageUtil;
|
|
52
|
+
module.exports.ToolUtil = load("utils/tool-util").ToolUtil;
|
|
53
|
+
module.exports.StringUtil = load("utils/string-util").StringUtil;
|
|
54
|
+
module.exports.Environ = load("utils/environ").Environ;
|
|
55
|
+
module.exports.LlmFile = load("utils/llm-file").LlmFile;
|
|
56
|
+
module.exports.K = load("utils/constants").K;
|
|
37
57
|
|
|
38
58
|
// Prompt
|
|
39
|
-
module.exports.Prompt =
|
|
40
|
-
module.exports.FlowPrompt =
|
|
59
|
+
module.exports.Prompt = load("prompt/prompt-util").Prompt;
|
|
60
|
+
module.exports.FlowPrompt = load("prompt/flow-prompt").FlowPrompt;
|
|
41
61
|
|
|
42
62
|
// Decorators
|
|
43
|
-
module.exports.StopTool =
|
|
63
|
+
module.exports.StopTool = load("decorators/stop-tool").StopTool;
|
|
44
64
|
|
|
45
65
|
// Clients
|
|
46
|
-
module.exports.HttpClient =
|
|
47
|
-
|
|
66
|
+
module.exports.HttpClient = load("clients/http-client").HttpClient;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Model } from './model-registry';
|
|
2
|
+
export declare function createPopularModels(): (Model<"gpt-5.4"> | Model<"gpt-5"> | Model<"gpt-5-mini"> | Model<"gpt-5-nano"> | Model<"gpt-4.1"> | Model<"gpt-4.1-mini"> | Model<"gpt-4o"> | Model<"gpt-4o-mini"> | Model<"claude-opus-4-6"> | Model<"claude-opus-4-6-thinking"> | Model<"claude-sonnet-4-6"> | Model<"claude-sonnet-4-6-thinking"> | Model<"claude-haiku-4-5-20251001"> | Model<"claude-opus-4-1-20250805"> | Model<"claude-opus-4-1-20250805-thinking"> | Model<"claude-3-7-sonnet-latest"> | Model<"claude-3-7-sonnet-thinking"> | Model<"claude-3-5-haiku-latest"> | Model<"gemini-3.1-pro-preview"> | Model<"gemini-3-flash-preview"> | Model<"gemini-3.1-flash-lite-preview"> | Model<"gemini-2.5-pro"> | Model<"gemini-2.5-flash"> | Model<"gemini-2.5-flash-lite"> | Model<"qwen2.5:1.5b">)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a14_0x35f110=a14_0x1001;(function(_0x117d5e,_0x5740bd){const _0x44db07=a14_0x1001,_0x395f97=_0x117d5e();while(!![]){try{const _0x47944d=parseInt(_0x44db07(0x14c))/0x1*(parseInt(_0x44db07(0x13d))/0x2)+parseInt(_0x44db07(0x101))/0x3+-parseInt(_0x44db07(0x118))/0x4*(-parseInt(_0x44db07(0xf6))/0x5)+-parseInt(_0x44db07(0x134))/0x6+parseInt(_0x44db07(0x14a))/0x7*(-parseInt(_0x44db07(0x11c))/0x8)+parseInt(_0x44db07(0x129))/0x9*(-parseInt(_0x44db07(0x10c))/0xa)+parseInt(_0x44db07(0x138))/0xb;if(_0x47944d===_0x5740bd)break;else _0x395f97['push'](_0x395f97['shift']());}catch(_0x580ce3){_0x395f97['push'](_0x395f97['shift']());}}}(a14_0x41ea,0x26623));const a14_0x12683d=(function(){const _0x595c95=a14_0x1001,_0x59a5c8={'sgick':_0x595c95(0x116),'IBvDi':_0x595c95(0x159),'pSZqQ':_0x595c95(0x153),'ldxcC':_0x595c95(0x155),'SLlWk':_0x595c95(0x105),'hjrED':_0x595c95(0x151),'TIbnn':'enabled','nUspZ':_0x595c95(0x11e),'dpaXF':_0x595c95(0x131),'wgKxl':_0x595c95(0x139),'fQVJU':'claude-opus-4-1-20250805-thinking','svwmI':'claude-3-7-sonnet-thinking','NrCGK':_0x595c95(0x106),'wBFXx':'claude-3-5-haiku-latest','PxFhT':_0x595c95(0xf9),'qwdLf':'gemini-3.1-flash-lite-preview','QPNPX':'gemini-2.5-pro','WQobQ':_0x595c95(0x156),'LnGhW':_0x595c95(0x11b),'avxjh':_0x595c95(0xfb),'UwCLu':function(_0x268f00,_0x14df35){return _0x268f00===_0x14df35;},'wewPH':_0x595c95(0x146),'WNEqX':'UXMZv'};let _0x5aa15d=!![];return function(_0x4c8f16,_0x474d86){const _0x36e574=_0x595c95,_0x25b005={'pvLru':_0x59a5c8[_0x36e574(0x122)],'DFfcz':_0x59a5c8[_0x36e574(0x10a)],'AIADa':_0x59a5c8[_0x36e574(0x152)],'sQFEz':'gpt-5-mini','rKjvf':_0x59a5c8[_0x36e574(0xff)],'eayfl':_0x59a5c8['SLlWk'],'GujgS':_0x59a5c8['hjrED'],'asJsp':_0x59a5c8[_0x36e574(0x110)],'losGE':_0x59a5c8[_0x36e574(0xf1)],'JtLqi':_0x59a5c8[_0x36e574(0x127)],'JkpmV':_0x59a5c8[_0x36e574(0x145)],'mVyll':_0x59a5c8[_0x36e574(0x111)],'CYNeq':_0x59a5c8[_0x36e574(0x125)],'Wucal':_0x59a5c8[_0x36e574(0x120)],'YZgrn':_0x59a5c8['wBFXx'],'xFlRe':_0x59a5c8[_0x36e574(0x12b)],'pxiOZ':_0x59a5c8['qwdLf'],'HsgaV':_0x59a5c8[_0x36e574(0xf7)],'XvYLm':_0x59a5c8[_0x36e574(0xfd)],'LqgPV':_0x59a5c8['LnGhW'],'baqrN':_0x59a5c8[_0x36e574(0xf5)]};if(_0x59a5c8[_0x36e574(0x141)](_0x59a5c8[_0x36e574(0x100)],_0x59a5c8['WNEqX'])){if(_0x3be26b){const _0x170e7b=_0x6dab00[_0x36e574(0x140)](_0xf16af3,arguments);return _0x11f6d3=null,_0x170e7b;}}else{const _0x41a03f=_0x5aa15d?function(){const _0x390ea9=_0x36e574;if(_0x474d86){if(_0x25b005[_0x390ea9(0x119)]!==_0x25b005['baqrN'])return[new _0x2b182f['Model'](_0x25b005['pvLru'],{'apiKey':_0x2d2e42[_0x390ea9(0x11d)][_0x390ea9(0x15a)],'maxRetries':_0x224ec7[_0x390ea9(0x11d)][_0x390ea9(0x10d)],'reasoning':{'effort':_0x390ea9(0x153)}}),new _0xbd57aa[(_0x390ea9(0xf0))](_0x25b005[_0x390ea9(0x135)],{'apiKey':_0x5b4ee3[_0x390ea9(0x11d)][_0x390ea9(0x15a)],'maxRetries':_0x3c3303['CoreConfig'][_0x390ea9(0x10d)],'reasoning':{'effort':_0x25b005[_0x390ea9(0x143)]}}),new _0x41b938[(_0x390ea9(0xf0))](_0x25b005[_0x390ea9(0x148)],{'apiKey':_0x523f9['CoreConfig'][_0x390ea9(0x15a)],'maxRetries':_0x9213cf[_0x390ea9(0x11d)][_0x390ea9(0x10d)],'reasoning':{'effort':_0x25b005[_0x390ea9(0x143)]}}),new _0x146531[(_0x390ea9(0xf0))](_0x390ea9(0x142),{'apiKey':_0x1fa1a5[_0x390ea9(0x11d)]['OpenAIKey'],'maxRetries':_0x22d442[_0x390ea9(0x11d)][_0x390ea9(0x10d)],'reasoning':{'effort':_0x390ea9(0x153)}}),new _0x4fe5a0[(_0x390ea9(0xf0))](_0x390ea9(0x114),{'temperature':_0x451781['CoreConfig'][_0x390ea9(0xf3)],'apiKey':_0x359f56['CoreConfig'][_0x390ea9(0x15a)],'maxRetries':_0x2f57fb['CoreConfig'][_0x390ea9(0x10d)]}),new _0x5b95eb[(_0x390ea9(0xf0))](_0x390ea9(0x13f),{'temperature':_0x5ddfd7['CoreConfig'][_0x390ea9(0xf3)],'apiKey':_0x54fdf2[_0x390ea9(0x11d)]['OpenAIKey'],'maxRetries':_0xb5ae16['CoreConfig']['llmRetry']}),new _0x48f2c1['Model'](_0x390ea9(0x10f),{'temperature':_0x4bde8b[_0x390ea9(0x11d)][_0x390ea9(0xf3)],'apiKey':_0x2f8c5c[_0x390ea9(0x11d)][_0x390ea9(0x15a)],'maxRetries':_0x3eb578[_0x390ea9(0x11d)]['llmRetry']}),new _0x334004['Model'](_0x25b005[_0x390ea9(0x130)],{'temperature':_0x4ea0c6[_0x390ea9(0x11d)]['llmTemperature'],'apiKey':_0x269b78[_0x390ea9(0x11d)][_0x390ea9(0x15a)],'maxRetries':_0x28dfbf[_0x390ea9(0x11d)]['llmRetry']}),new _0x25e630[(_0x390ea9(0xf0))](_0x25b005['eayfl'],{'temperature':0x0,'apiKey':_0x16af1c[_0x390ea9(0x11d)][_0x390ea9(0x123)],'maxRetries':_0x4f224d['CoreConfig']['llmRetry']}),new _0x3af108[(_0x390ea9(0xf0))](_0x25b005[_0x390ea9(0x10e)],{'apiKey':_0x1511d5[_0x390ea9(0x11d)][_0x390ea9(0x123)],'maxRetries':_0x1e0193[_0x390ea9(0x11d)]['llmRetry'],'thinking':{'type':_0x25b005[_0x390ea9(0x12e)],'budget_tokens':0x800}},_0x25b005[_0x390ea9(0x12a)]),new _0x3aa622[(_0x390ea9(0xf0))](_0x25b005[_0x390ea9(0x124)],{'temperature':0x0,'apiKey':_0x5f5da5[_0x390ea9(0x11d)]['AnthropicKey'],'maxRetries':_0x38801b['CoreConfig'][_0x390ea9(0x10d)]}),new _0x490728['Model']('claude-sonnet-4-6-thinking',{'apiKey':_0x51334b[_0x390ea9(0x11d)][_0x390ea9(0x123)],'maxRetries':_0x17995d['CoreConfig'][_0x390ea9(0x10d)],'thinking':{'type':_0x25b005[_0x390ea9(0x12e)],'budget_tokens':0x800}},_0x390ea9(0x11e)),new _0xac487d[(_0x390ea9(0xf0))](_0x25b005[_0x390ea9(0x14f)],{'temperature':_0xdb1ee8['CoreConfig'][_0x390ea9(0xf3)],'apiKey':_0x4b4bb6[_0x390ea9(0x11d)][_0x390ea9(0x123)],'maxRetries':_0x237b6d[_0x390ea9(0x11d)][_0x390ea9(0x10d)]}),new _0x29e556[(_0x390ea9(0xf0))](_0x25b005['JkpmV'],{'temperature':0x0,'apiKey':_0x53596d[_0x390ea9(0x11d)][_0x390ea9(0x123)],'maxRetries':_0x3da8ae[_0x390ea9(0x11d)]['llmRetry']}),new _0x85c0f7[(_0x390ea9(0xf0))](_0x25b005['mVyll'],{'apiKey':_0x2e9ad4['CoreConfig'][_0x390ea9(0x123)],'maxRetries':_0x48f83b[_0x390ea9(0x11d)]['llmRetry'],'thinking':{'type':_0x25b005[_0x390ea9(0x12e)],'budget_tokens':0x800}},_0x25b005[_0x390ea9(0x102)]),new _0x563030[(_0x390ea9(0xf0))](_0x390ea9(0x106),{'temperature':0x0,'apiKey':_0xd7ffbc[_0x390ea9(0x11d)]['AnthropicKey'],'maxRetries':_0x39a483['CoreConfig'][_0x390ea9(0x10d)]}),new _0xc0b9e8[(_0x390ea9(0xf0))](_0x25b005['CYNeq'],{'apiKey':_0xbd802f[_0x390ea9(0x11d)]['AnthropicKey'],'maxRetries':_0x8e9265[_0x390ea9(0x11d)][_0x390ea9(0x10d)],'thinking':{'type':_0x25b005[_0x390ea9(0x12e)],'budget_tokens':0x800}},_0x25b005[_0x390ea9(0x132)]),new _0x35dcbb[(_0x390ea9(0xf0))](_0x25b005[_0x390ea9(0xf2)],{'temperature':_0xd58f4f[_0x390ea9(0x11d)][_0x390ea9(0xf3)],'apiKey':_0x541790[_0x390ea9(0x11d)][_0x390ea9(0x123)],'maxRetries':_0x5e420f['CoreConfig'][_0x390ea9(0x10d)]}),new _0xbce3f1['Model'](_0x25b005['xFlRe'],{'temperature':_0x11eef6[_0x390ea9(0x11d)][_0x390ea9(0xf3)],'apiKey':_0x1c6e15[_0x390ea9(0x11d)][_0x390ea9(0x144)],'maxRetries':_0x45cf54[_0x390ea9(0x11d)][_0x390ea9(0x10d)]}),new _0x22e6af[(_0x390ea9(0xf0))](_0x390ea9(0x136),{'temperature':_0x20f3f0[_0x390ea9(0x11d)]['llmTemperature'],'apiKey':_0x2999c2[_0x390ea9(0x11d)][_0x390ea9(0x144)],'maxRetries':_0x336b3f[_0x390ea9(0x11d)][_0x390ea9(0x10d)]}),new _0x242ded[(_0x390ea9(0xf0))](_0x25b005[_0x390ea9(0xfe)],{'temperature':_0x40d691[_0x390ea9(0x11d)][_0x390ea9(0xf3)],'apiKey':_0x27b2b0['CoreConfig'][_0x390ea9(0x144)],'maxRetries':_0x24f515[_0x390ea9(0x11d)][_0x390ea9(0x10d)]}),new _0x5e4e71[(_0x390ea9(0xf0))](_0x25b005['HsgaV'],{'temperature':_0x41ecc4[_0x390ea9(0x11d)]['llmTemperature'],'apiKey':_0x139709[_0x390ea9(0x11d)][_0x390ea9(0x144)],'maxRetries':_0x15e94a[_0x390ea9(0x11d)]['llmRetry']}),new _0xd2e58d[(_0x390ea9(0xf0))](_0x390ea9(0x117),{'temperature':_0xef7f5f[_0x390ea9(0x11d)][_0x390ea9(0xf3)],'apiKey':_0x335f72[_0x390ea9(0x11d)][_0x390ea9(0x144)],'maxRetries':_0x35f84d[_0x390ea9(0x11d)][_0x390ea9(0x10d)]}),new _0x483f61['Model'](_0x25b005['XvYLm'],{'temperature':_0x4a26c0[_0x390ea9(0x11d)][_0x390ea9(0xf3)],'apiKey':_0x16c15a['CoreConfig'][_0x390ea9(0x144)],'maxRetries':_0xe6d82b[_0x390ea9(0x11d)][_0x390ea9(0x10d)]}),new _0xa402c[(_0x390ea9(0xf0))]('qwen2.5:1.5b',{'provider':_0x25b005['LqgPV'],'think':![],'maxRetries':_0x3abffc[_0x390ea9(0x11d)][_0x390ea9(0x10d)],'options':{'temperature':_0x39ac9e[_0x390ea9(0x11d)][_0x390ea9(0xf3)]}})];else{const _0x36fe6b=_0x474d86[_0x390ea9(0x140)](_0x4c8f16,arguments);return _0x474d86=null,_0x36fe6b;}}}:function(){};return _0x5aa15d=![],_0x41a03f;}};}()),a14_0x418966=a14_0x12683d(this,function(){const _0x181db8=a14_0x1001,_0x57970d={'yUsFM':_0x181db8(0x14b)};return a14_0x418966[_0x181db8(0x121)]()[_0x181db8(0x14d)](_0x57970d[_0x181db8(0xf8)])[_0x181db8(0x121)]()[_0x181db8(0xef)](a14_0x418966)[_0x181db8(0x14d)](_0x57970d['yUsFM']);});a14_0x418966();'use strict';Object[a14_0x35f110(0x12c)](exports,a14_0x35f110(0x13c),{'value':!![]}),exports[a14_0x35f110(0x113)]=createPopularModels;function a14_0x1001(_0x1f4279,_0x3589b4){const _0x28002e=a14_0x41ea();return a14_0x1001=function(_0x418966,_0x12683d){_0x418966=_0x418966-0xef;let _0x41ea88=_0x28002e[_0x418966];return _0x41ea88;},a14_0x1001(_0x1f4279,_0x3589b4);}const core_config_1=require(a14_0x35f110(0x14e)),model_registry_1=require(a14_0x35f110(0x126));function createPopularModels(){const _0x441a07=a14_0x35f110,_0x5b4335={'dIket':'gpt-5.4','HIevw':_0x441a07(0x153),'wpaEx':_0x441a07(0x159),'zFmvz':_0x441a07(0xf4),'uTzSM':_0x441a07(0x142),'PpeNP':_0x441a07(0x114),'QUCYU':_0x441a07(0x13f),'ZlugO':_0x441a07(0x10f),'powsx':_0x441a07(0x155),'MMbcT':_0x441a07(0x105),'VbmrU':'claude-opus-4-6-thinking','aKKpj':_0x441a07(0x112),'BaDEG':_0x441a07(0x11e),'DVxrA':_0x441a07(0x13e),'dVrbV':'claude-haiku-4-5-20251001','dCMNX':_0x441a07(0x139),'dZxMh':_0x441a07(0x157),'bEFTY':_0x441a07(0x106),'fpurj':_0x441a07(0x115),'BKHbA':'claude-3-5-haiku-latest','oSlhe':_0x441a07(0x136),'zZgfg':'gemini-3.1-flash-lite-preview','dswUo':_0x441a07(0x108),'SEfLD':'gemini-2.5-flash','dedwf':_0x441a07(0x156),'PnmVZ':_0x441a07(0x12f),'JGxGQ':_0x441a07(0x11b)};return[new model_registry_1[(_0x441a07(0xf0))](_0x5b4335['dIket'],{'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x15a)],'maxRetries':core_config_1['CoreConfig']['llmRetry'],'reasoning':{'effort':_0x5b4335[_0x441a07(0x104)]}}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x147)],{'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x15a)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)],'reasoning':{'effort':_0x5b4335['HIevw']}}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x109)],{'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x15a)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)],'reasoning':{'effort':_0x441a07(0x153)}}),new model_registry_1['Model'](_0x5b4335[_0x441a07(0xfc)],{'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x15a)],'maxRetries':core_config_1[_0x441a07(0x11d)]['llmRetry'],'reasoning':{'effort':_0x5b4335[_0x441a07(0x104)]}}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x10b)],{'temperature':core_config_1[_0x441a07(0x11d)][_0x441a07(0xf3)],'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x15a)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1['Model'](_0x5b4335[_0x441a07(0x15c)],{'temperature':core_config_1[_0x441a07(0x11d)]['llmTemperature'],'apiKey':core_config_1[_0x441a07(0x11d)]['OpenAIKey'],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x13b)],{'temperature':core_config_1[_0x441a07(0x11d)][_0x441a07(0xf3)],'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x15a)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x13a)],{'temperature':core_config_1['CoreConfig'][_0x441a07(0xf3)],'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x15a)],'maxRetries':core_config_1['CoreConfig']['llmRetry']}),new model_registry_1['Model'](_0x5b4335[_0x441a07(0x149)],{'temperature':0x0,'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x123)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1['Model'](_0x5b4335['VbmrU'],{'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x123)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)],'thinking':{'type':_0x5b4335[_0x441a07(0x11f)],'budget_tokens':0x800}},_0x5b4335[_0x441a07(0x149)]),new model_registry_1['Model'](_0x5b4335[_0x441a07(0x107)],{'temperature':0x0,'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x123)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x12d)],{'apiKey':core_config_1[_0x441a07(0x11d)]['AnthropicKey'],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)],'thinking':{'type':_0x5b4335['aKKpj'],'budget_tokens':0x800}},_0x441a07(0x11e)),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x158)],{'temperature':core_config_1['CoreConfig'][_0x441a07(0xf3)],'apiKey':core_config_1['CoreConfig'][_0x441a07(0x123)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x150)],{'temperature':0x0,'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x123)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x11a)],{'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x123)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)],'thinking':{'type':_0x5b4335[_0x441a07(0x11f)],'budget_tokens':0x800}},_0x5b4335[_0x441a07(0x150)]),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x15b)],{'temperature':0x0,'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x123)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x103)],{'apiKey':core_config_1['CoreConfig']['AnthropicKey'],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)],'thinking':{'type':_0x5b4335[_0x441a07(0x11f)],'budget_tokens':0x800}},_0x441a07(0x106)),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x137)],{'temperature':core_config_1[_0x441a07(0x11d)][_0x441a07(0xf3)],'apiKey':core_config_1[_0x441a07(0x11d)]['AnthropicKey'],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1['Model'](_0x441a07(0xf9),{'temperature':core_config_1['CoreConfig'][_0x441a07(0xf3)],'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x144)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x128)],{'temperature':core_config_1[_0x441a07(0x11d)][_0x441a07(0xf3)],'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x144)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0xfa)],{'temperature':core_config_1[_0x441a07(0x11d)][_0x441a07(0xf3)],'apiKey':core_config_1['CoreConfig'][_0x441a07(0x144)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335[_0x441a07(0x133)],{'temperature':core_config_1['CoreConfig'][_0x441a07(0xf3)],'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x144)],'maxRetries':core_config_1[_0x441a07(0x11d)]['llmRetry']}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335['SEfLD'],{'temperature':core_config_1['CoreConfig']['llmTemperature'],'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x144)],'maxRetries':core_config_1[_0x441a07(0x11d)][_0x441a07(0x10d)]}),new model_registry_1[(_0x441a07(0xf0))](_0x5b4335['dedwf'],{'temperature':core_config_1[_0x441a07(0x11d)][_0x441a07(0xf3)],'apiKey':core_config_1[_0x441a07(0x11d)][_0x441a07(0x144)],'maxRetries':core_config_1['CoreConfig'][_0x441a07(0x10d)]}),new model_registry_1['Model'](_0x5b4335['PnmVZ'],{'provider':_0x5b4335[_0x441a07(0x154)],'think':![],'maxRetries':core_config_1[_0x441a07(0x11d)]['llmRetry'],'options':{'temperature':core_config_1[_0x441a07(0x11d)]['llmTemperature']}})];}function a14_0x41ea(){const _0x33e98c=['llmRetry','GujgS','gpt-4o','TIbnn','fQVJU','enabled','createPopularModels','gpt-4.1','claude-3-7-sonnet-thinking','gpt-5.4','gemini-2.5-flash','40hglvVG','baqrN','dZxMh','ollama','1936048txiWHt','CoreConfig','claude-sonnet-4-6','aKKpj','NrCGK','toString','sgick','AnthropicKey','losGE','svwmI','./model-registry','dpaXF','oSlhe','11556TgIPAK','eayfl','PxFhT','defineProperty','DVxrA','asJsp','qwen2.5:1.5b','rKjvf','claude-haiku-4-5-20251001','Wucal','dswUo','1148316VqsCXa','DFfcz','gemini-3-flash-preview','BKHbA','4163280fAUVwQ','claude-opus-4-1-20250805','powsx','ZlugO','__esModule','22BgcWvk','claude-sonnet-4-6-thinking','gpt-4.1-mini','apply','UwCLu','gpt-5-nano','AIADa','GeminiKey','wgKxl','pNvQb','wpaEx','sQFEz','MMbcT','7ruijcP','(((.+)+)+)+$','10454gMabLZ','search','../configs/core-config','JtLqi','dCMNX','claude-opus-4-6-thinking','pSZqQ','medium','JGxGQ','gpt-4o-mini','gemini-2.5-flash-lite','claude-opus-4-1-20250805-thinking','dVrbV','gpt-5','OpenAIKey','bEFTY','QUCYU','constructor','Model','nUspZ','YZgrn','llmTemperature','gpt-5-mini','avxjh','10895zCNRPZ','QPNPX','yUsFM','gemini-3.1-pro-preview','zZgfg','tlgPF','uTzSM','WQobQ','pxiOZ','ldxcC','wewPH','476421TmHTkH','JkpmV','fpurj','HIevw','claude-opus-4-6','claude-3-7-sonnet-latest','BaDEG','gemini-2.5-pro','zFmvz','IBvDi','PpeNP','650rritSs'];a14_0x41ea=function(){return _0x33e98c;};return a14_0x41ea();}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { BaseChatModelParams } from '@langchain/core/language_models/chat_models';
|
|
2
|
+
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
3
|
+
import { ChatAnthropic, type AnthropicInput } from '@langchain/anthropic';
|
|
4
|
+
import { ChatGoogleGenerativeAI, type GoogleGenerativeAIChatInput } from '@langchain/google-genai';
|
|
5
|
+
import { ChatOllama, type ChatOllamaInput } from '@langchain/ollama';
|
|
6
|
+
import { AzureChatOpenAI, ChatOpenAI, type AzureChatOpenAIFields, type ChatOpenAIFields } from '@langchain/openai';
|
|
7
|
+
type OpenAIModelName = `gpt-${string}` | `o${number}${string}`;
|
|
8
|
+
type OpenAIReasoningModelName = `gpt-5${string}` | `o${number}${string}`;
|
|
9
|
+
type GeminiModelName = `gemini-${string}`;
|
|
10
|
+
type ClaudeModelName = `claude-${string}`;
|
|
11
|
+
type OpenAIModelConfig<Name extends OpenAIModelName> = Name extends OpenAIReasoningModelName ? Omit<ChatOpenAIFields, 'model' | 'temperature'> & {
|
|
12
|
+
provider?: 'openai';
|
|
13
|
+
temperature?: never;
|
|
14
|
+
} : Omit<ChatOpenAIFields, 'model'> & {
|
|
15
|
+
provider?: 'openai';
|
|
16
|
+
};
|
|
17
|
+
type AzureOpenAIModelConfig = Omit<AzureChatOpenAIFields, 'model'> & {
|
|
18
|
+
provider: 'azure-openai';
|
|
19
|
+
};
|
|
20
|
+
type GeminiModelConfig = Omit<GoogleGenerativeAIChatInput, 'model'> & {
|
|
21
|
+
provider?: 'google';
|
|
22
|
+
};
|
|
23
|
+
type AnthropicModelConfig = Omit<AnthropicInput & BaseChatModelParams, 'model' | 'modelName'> & {
|
|
24
|
+
provider?: 'anthropic';
|
|
25
|
+
};
|
|
26
|
+
type OllamaTopLevelConfig = Pick<ChatOllamaInput, 'baseUrl' | 'headers' | 'checkOrPullModel' | 'streaming' | 'format' | 'fetch' | 'think' | 'keepAlive' | 'maxRetries'>;
|
|
27
|
+
type OllamaOptionConfig = Pick<ChatOllamaInput, 'numa' | 'numCtx' | 'numBatch' | 'numGpu' | 'mainGpu' | 'lowVram' | 'f16Kv' | 'logitsAll' | 'vocabOnly' | 'useMmap' | 'useMlock' | 'embeddingOnly' | 'numThread' | 'numKeep' | 'seed' | 'numPredict' | 'topK' | 'topP' | 'tfsZ' | 'typicalP' | 'repeatLastN' | 'temperature' | 'repeatPenalty' | 'presencePenalty' | 'frequencyPenalty' | 'mirostat' | 'mirostatTau' | 'mirostatEta' | 'penalizeNewline' | 'stop'> & {
|
|
28
|
+
minP?: never;
|
|
29
|
+
};
|
|
30
|
+
type OllamaModelConfig = OllamaTopLevelConfig & {
|
|
31
|
+
provider: 'ollama';
|
|
32
|
+
options?: OllamaOptionConfig;
|
|
33
|
+
};
|
|
34
|
+
export type ModelConfig<Name extends string> = Name extends OpenAIModelName ? OpenAIModelConfig<Name> : Name extends GeminiModelName ? GeminiModelConfig : Name extends ClaudeModelName ? AnthropicModelConfig : AzureOpenAIModelConfig | OllamaModelConfig;
|
|
35
|
+
export type ModelProvider = 'openai' | 'azure-openai' | 'google' | 'anthropic' | 'ollama';
|
|
36
|
+
export type SupportedChatModel = ChatGoogleGenerativeAI | ChatOpenAI | AzureChatOpenAI | ChatAnthropic | ChatOllama;
|
|
37
|
+
type Primitive = string | number | boolean | null | undefined;
|
|
38
|
+
export type DeepPartial<T> = T extends Primitive ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : {
|
|
39
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
40
|
+
};
|
|
41
|
+
export type ModelOverride<Name extends string> = DeepPartial<Omit<ModelConfig<Name>, 'provider'>>;
|
|
42
|
+
export declare class Model<Name extends string = string> {
|
|
43
|
+
readonly name: Name;
|
|
44
|
+
readonly provider: ModelProvider;
|
|
45
|
+
readonly targetName: string;
|
|
46
|
+
private readonly config;
|
|
47
|
+
constructor(name: Name, config: ModelConfig<Name>, targetName?: string);
|
|
48
|
+
supportsTemperatureOverride(): boolean;
|
|
49
|
+
createInstance(overrides?: ModelOverride<Name> | Record<string, any>): SupportedChatModel;
|
|
50
|
+
temperatureOverride(temp: number): Record<string, any>;
|
|
51
|
+
useTools(llm: SupportedChatModel, tools?: DynamicStructuredTool[]): SupportedChatModel;
|
|
52
|
+
private buildParams;
|
|
53
|
+
private buildOllamaParams;
|
|
54
|
+
private getModelClass;
|
|
55
|
+
private static detectProvider;
|
|
56
|
+
private static isOpenAIModel;
|
|
57
|
+
private static isOpenAIReasoningModel;
|
|
58
|
+
}
|
|
59
|
+
export declare class ModelRegistry {
|
|
60
|
+
private readonly models;
|
|
61
|
+
register<Name extends string>(model: Model<Name>, replace?: boolean): Model<Name>;
|
|
62
|
+
registerMany(models: Model[], replace?: boolean): void;
|
|
63
|
+
get(modelName?: string): Model;
|
|
64
|
+
getName(modelName?: string): string;
|
|
65
|
+
}
|
|
66
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a15_0x27ef50=a15_0x41f2;(function(_0x2e7cc2,_0x279cd4){const _0x1ddc38=a15_0x41f2,_0x3ab5ce=_0x2e7cc2();while(!![]){try{const _0x2e29d5=-parseInt(_0x1ddc38(0x131))/0x1*(-parseInt(_0x1ddc38(0x120))/0x2)+-parseInt(_0x1ddc38(0x116))/0x3+-parseInt(_0x1ddc38(0x12a))/0x4*(parseInt(_0x1ddc38(0xf3))/0x5)+-parseInt(_0x1ddc38(0xf1))/0x6+parseInt(_0x1ddc38(0xfa))/0x7+-parseInt(_0x1ddc38(0x115))/0x8+parseInt(_0x1ddc38(0x11b))/0x9;if(_0x2e29d5===_0x279cd4)break;else _0x3ab5ce['push'](_0x3ab5ce['shift']());}catch(_0x5f1b63){_0x3ab5ce['push'](_0x3ab5ce['shift']());}}}(a15_0x3437,0x67383));const a15_0x31dc81=(function(){const _0x1982a0=a15_0x41f2,_0x597dd4={'ZNHbL':function(_0x45ca9f,_0x54ebcf){return _0x45ca9f!==_0x54ebcf;},'NWLID':_0x1982a0(0xf0),'TuHYe':'vWlPC','GZmFo':_0x1982a0(0x107)};let _0x1750d5=!![];return function(_0x531653,_0xcdf7d){const _0x5f4e3c={'bFZTw':_0x597dd4['GZmFo']},_0x1c4896=_0x1750d5?function(){const _0x42f21f=a15_0x41f2;if(_0x597dd4['ZNHbL'](_0x597dd4[_0x42f21f(0x128)],_0x597dd4[_0x42f21f(0x141)])){if(_0xcdf7d){const _0x16f6bd=_0xcdf7d[_0x42f21f(0x126)](_0x531653,arguments);return _0xcdf7d=null,_0x16f6bd;}}else return _0x5dea6b[_0x42f21f(0x104)]()[_0x42f21f(0x12f)](_0x5f4e3c[_0x42f21f(0xff)])[_0x42f21f(0x104)]()[_0x42f21f(0x12d)](_0x503095)['search'](_0x42f21f(0x107));}:function(){};return _0x1750d5=![],_0x1c4896;};}()),a15_0x524636=a15_0x31dc81(this,function(){const _0x146875=a15_0x41f2,_0x1557d2={'YjIHj':_0x146875(0x107)};return a15_0x524636[_0x146875(0x104)]()[_0x146875(0x12f)](_0x1557d2[_0x146875(0x10e)])[_0x146875(0x104)]()[_0x146875(0x12d)](a15_0x524636)['search'](_0x146875(0x107));});a15_0x524636();'use strict';function a15_0x41f2(_0x195f16,_0x56f326){const _0x3b0161=a15_0x3437();return a15_0x41f2=function(_0x524636,_0x31dc81){_0x524636=_0x524636-0xe7;let _0x3437e0=_0x3b0161[_0x524636];return _0x3437e0;},a15_0x41f2(_0x195f16,_0x56f326);}function a15_0x3437(){const _0x2b85b5=['defineProperty','getModelClass','KrLOA','gmWLQ','azure-openai','697130cFSEFA','TWqnt','length','zOKqw','get','bFZTw','oGxzS','name','fbPNb','claude-','toString','\x27.\x20Set\x20config.provider\x20explicitly.','\x27\x20not\x20registered.','(((.+)+)+)+$','qLUGL','Model\x20\x27','wJanN','rrsJc','GPiPP','anthropic','YjIHj','isOpenAIModel','provider','ollama','KMPaj','registerMany','JHfPd','426832IGMeKZ','2160477tRKhIq','buildOllamaParams','register','bindTools','FymaE','11408040nyPQRK','@langchain/openai','supportsTemperatureOverride','detectProvider','aQwrz','1174942lLJJWY','tVlsn','test','qRkBb','buildParams','JHkUc','apply','AluiT','NWLID','startsWith','32212qyDmXm','useTools','google','constructor','ChatOpenAI','search','ebMdD','1JuGkQW','ChatGoogleGenerativeAI','pkIkG','config','temperatureOverride','set','Ftfsl','rgSkd','tYJos','lodash','vLAwR','values','targetName','models','aUlAX','esexP','TuHYe','gemini-','Kmeaz','ollbN','isOpenAIReasoningModel','getName','fkBgh','@langchain/anthropic','has','openai','Model','ModelRegistry','lBzSA','1119348cEaYjB','temperature','355iiiMCu','bind'];a15_0x3437=function(){return _0x2b85b5;};return a15_0x3437();}Object[a15_0x27ef50(0xf5)](exports,'__esModule',{'value':!![]}),exports['ModelRegistry']=exports[a15_0x27ef50(0xee)]=void 0x0;const lodash_1=require(a15_0x27ef50(0x13a)),anthropic_1=require(a15_0x27ef50(0xeb)),google_genai_1=require('@langchain/google-genai'),ollama_1=require('@langchain/ollama'),openai_1=require(a15_0x27ef50(0x11c));class Model{constructor(_0x262eea,_0xf3b363,_0x37dcb6){const _0x1df202=a15_0x27ef50,_0x22c08b={'GPiPP':function(_0x8ff213,_0x1edc3e){return _0x8ff213??_0x1edc3e;}};this[_0x1df202(0x101)]=_0x262eea,this[_0x1df202(0x134)]=_0xf3b363,this['targetName']=_0x22c08b[_0x1df202(0x10c)](_0x37dcb6,_0x262eea),this[_0x1df202(0x110)]=Model[_0x1df202(0x11e)](_0x262eea,_0xf3b363);}[a15_0x27ef50(0x11d)](){const _0x3f3c1a=a15_0x27ef50;return!Model['isOpenAIReasoningModel'](this[_0x3f3c1a(0x101)]);}['createInstance'](_0x256e48){const _0xf4e6bb=a15_0x27ef50,_0x29774f=this[_0xf4e6bb(0x124)](_0x256e48),_0x526a35=this[_0xf4e6bb(0xf6)]();return new _0x526a35(_0x29774f);}[a15_0x27ef50(0x135)](_0x2f61de){const _0x2b33e6=a15_0x27ef50,_0x47c099={'Kmeaz':function(_0x2b5f82,_0x1cd9d6){return _0x2b5f82===_0x1cd9d6;},'rrsJc':'ollama'};if(_0x47c099[_0x2b33e6(0x143)](this[_0x2b33e6(0x110)],_0x47c099[_0x2b33e6(0x10b)]))return{'options':{'temperature':_0x2f61de}};return{'temperature':_0x2f61de};}[a15_0x27ef50(0x12b)](_0xb5b74a,_0x45c551){const _0x34e39a=a15_0x27ef50,_0x21e3af={'KMPaj':function(_0x3265a0,_0x43ccb3){return _0x3265a0===_0x43ccb3;}};if(!_0x45c551||_0x21e3af[_0x34e39a(0x112)](_0x45c551[_0x34e39a(0xfc)],0x0))return _0xb5b74a;if(this['provider']===_0x34e39a(0x111))return _0xb5b74a[_0x34e39a(0xf4)]({'tools':_0x45c551});return _0xb5b74a[_0x34e39a(0x119)](_0x45c551);}[a15_0x27ef50(0x124)](_0x308a5d){const _0x2e448e=a15_0x27ef50,_0x18d987={'fbPNb':function(_0x10bd82,_0x9f2cba){return _0x10bd82===_0x9f2cba;},'ollbN':_0x2e448e(0x111),'rgSkd':function(_0x309de7,_0x3a7265){return _0x309de7??_0x3a7265;}},_0x2c13f4=_0x18d987[_0x2e448e(0x102)](this[_0x2e448e(0x110)],_0x18d987[_0x2e448e(0xe7)])?this['buildOllamaParams']():{...this[_0x2e448e(0x134)],'model':this['targetName']},_0x44eb55=(0x0,lodash_1['merge'])({},_0x2c13f4,_0x18d987[_0x2e448e(0x138)](_0x308a5d,{}));return delete _0x44eb55[_0x2e448e(0x110)],!this[_0x2e448e(0x11d)]()&&delete _0x44eb55[_0x2e448e(0xf2)],_0x44eb55;}[a15_0x27ef50(0x117)](){const _0x36f56b=a15_0x27ef50,_0x2f63b1=this[_0x36f56b(0x134)],{options:_0x36cc4b,..._0xeaa8e8}=_0x2f63b1;return{..._0xeaa8e8,..._0x36cc4b,'model':this[_0x36f56b(0x13d)]};}[a15_0x27ef50(0xf6)](){const _0x1f950d=a15_0x27ef50,_0x40ae32={'qLUGL':_0x1f950d(0xf9),'JHkUc':'google','IqJFw':'anthropic','rKHrE':_0x1f950d(0x111)};switch(this['provider']){case _0x1f950d(0xed):return openai_1[_0x1f950d(0x12e)];case _0x40ae32[_0x1f950d(0x108)]:return openai_1['AzureChatOpenAI'];case _0x40ae32[_0x1f950d(0x125)]:return google_genai_1[_0x1f950d(0x132)];case _0x40ae32['IqJFw']:return anthropic_1['ChatAnthropic'];case _0x40ae32['rKHrE']:return ollama_1['ChatOllama'];}}static[a15_0x27ef50(0x11e)](_0x3a8061,_0x5b01a6){const _0x35c3cc=a15_0x27ef50,_0x390c07={'FymaE':_0x35c3cc(0x10d),'gmWLQ':function(_0xb7c7a3,_0x386bf8){return _0xb7c7a3===_0x386bf8;},'pTZxV':function(_0x4e7f4b,_0x1942b9){return _0x4e7f4b===_0x1942b9;},'vLAwR':'ollama','DReup':function(_0x40efc1,_0x587508){return _0x40efc1 in _0x587508;},'fkBgh':function(_0x3cb714,_0x4fa60a){return _0x3cb714===_0x4fa60a;},'KrLOA':_0x35c3cc(0x13f),'xJuXB':function(_0x1d79fe,_0x4a7993){return _0x1d79fe===_0x4a7993;},'oGxzS':_0x35c3cc(0xfd),'wJanN':_0x35c3cc(0xed),'JHfPd':_0x35c3cc(0x133),'tVlsn':_0x35c3cc(0x12c),'qRkBb':_0x35c3cc(0x103),'aQwrz':'aDCTv','esexP':'XSPAv'};if(_0x390c07['DReup'](_0x35c3cc(0x110),_0x5b01a6)&&_0x5b01a6['provider']){if(_0x390c07[_0x35c3cc(0xea)](_0x35c3cc(0x13f),_0x390c07[_0x35c3cc(0xf7)]))return _0x5b01a6['provider'];else this[_0x35c3cc(0x13e)]=new _0x5a6060();}if(Model['isOpenAIModel'](_0x3a8061))return _0x390c07['xJuXB']('zOKqw',_0x390c07[_0x35c3cc(0x100)])?_0x390c07[_0x35c3cc(0x10a)]:_0x390c07[_0x35c3cc(0x11a)];if(_0x3a8061['startsWith'](_0x35c3cc(0x142))){if(_0x390c07[_0x35c3cc(0xea)](_0x390c07[_0x35c3cc(0x114)],_0x35c3cc(0x133)))return _0x390c07[_0x35c3cc(0x121)];else{if(!_0x24d3b6||_0x390c07['gmWLQ'](_0x371ba6[_0x35c3cc(0xfc)],0x0))return _0x3d3f67;if(_0x390c07['pTZxV'](this['provider'],_0x390c07[_0x35c3cc(0x13b)]))return _0x5dcfbd[_0x35c3cc(0xf4)]({'tools':_0xdc265b});return _0x1e76bc[_0x35c3cc(0x119)](_0x56272b);}}if(_0x3a8061[_0x35c3cc(0x129)](_0x390c07[_0x35c3cc(0x123)]))return _0x390c07[_0x35c3cc(0xf8)](_0x390c07[_0x35c3cc(0x11f)],_0x390c07[_0x35c3cc(0x140)])?{'options':{'temperature':_0x35ac1f}}:_0x390c07[_0x35c3cc(0x11a)];throw new Error('Cannot\x20infer\x20provider\x20for\x20model\x20\x27'+_0x3a8061+_0x35c3cc(0x105));}static[a15_0x27ef50(0x10f)](_0x443a70){const _0x5ba5fc=a15_0x27ef50;return/^gpt-|^o\d/[_0x5ba5fc(0x122)](_0x443a70);}static[a15_0x27ef50(0xe8)](_0x285f30){const _0x2499c8=a15_0x27ef50;return/^gpt-5(?:$|[-:])|^o\d/[_0x2499c8(0x122)](_0x285f30);}}exports[a15_0x27ef50(0xee)]=Model;class ModelRegistry{constructor(){const _0x1d0452=a15_0x27ef50;this[_0x1d0452(0x13e)]=new Map();}[a15_0x27ef50(0x118)](_0x12a498,_0x38c949=![]){const _0x413bb6=a15_0x27ef50;if(this['models'][_0x413bb6(0xec)](_0x12a498['name'])&&!_0x38c949)return this[_0x413bb6(0x13e)][_0x413bb6(0xfe)](_0x12a498[_0x413bb6(0x101)]);return this[_0x413bb6(0x13e)][_0x413bb6(0x136)](_0x12a498[_0x413bb6(0x101)],_0x12a498),_0x12a498;}[a15_0x27ef50(0x113)](_0x499e67,_0x319546=![]){const _0xe10ea0=a15_0x27ef50;for(const _0x22373b of _0x499e67){this[_0xe10ea0(0x118)](_0x22373b,_0x319546);}}['get'](_0x1549e5){const _0x4b3e16=a15_0x27ef50,_0x47a508={'TWqnt':'No\x20model\x20registered','ipAyw':function(_0x4ab95,_0x508f7a){return _0x4ab95!==_0x508f7a;},'Ftfsl':_0x4b3e16(0x130),'tYJos':_0x4b3e16(0x127)};if(!_0x1549e5){const _0x470752=this[_0x4b3e16(0x13e)][_0x4b3e16(0x13c)]()['next']()['value'];if(!_0x470752)throw new Error(_0x47a508[_0x4b3e16(0xfb)]);return _0x470752;}const _0x47c9c6=this[_0x4b3e16(0x13e)][_0x4b3e16(0xfe)](_0x1549e5);if(!_0x47c9c6){if(_0x47a508['ipAyw'](_0x47a508[_0x4b3e16(0x137)],_0x47a508[_0x4b3e16(0x139)]))throw new Error(_0x4b3e16(0x109)+_0x1549e5+_0x4b3e16(0x106));else{const _0x119064=_0x5d76be?function(){const _0x12ed37=_0x4b3e16;if(_0xe5aa8a){const _0x31b9eb=_0x306353[_0x12ed37(0x126)](_0x5dd329,arguments);return _0x405d81=null,_0x31b9eb;}}:function(){};return _0x25daf3=![],_0x119064;}}return _0x47c9c6;}[a15_0x27ef50(0xe9)](_0x4e8a3d){const _0x584f92=a15_0x27ef50;return this[_0x584f92(0xfe)](_0x4e8a3d)[_0x584f92(0x101)];}}exports[a15_0x27ef50(0xef)]=ModelRegistry;
|
package/package.json
CHANGED
package/prompt/flow-prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a16_0x19bfe6=a16_0x59a4;function a16_0x2d0a(){const _0x3e101f=['toString','6831498RRknSC','1xwhMQh','cYpuv','5vsoUmc','51462290QXIuWr','(((.+)+)+)+$','2347707zidFVT','2251882OLznSH','387HpAENE','file','2941272gyePIm','Prompt','constructor','193560UuNzDI','EndChat','search','6324934WMFUiv','defineProperty','FlowPrompt','./prompt-util'];a16_0x2d0a=function(){return _0x3e101f;};return a16_0x2d0a();}(function(_0x4a3974,_0x4710a5){const _0x10818f=a16_0x59a4,_0x52c271=_0x4a3974();while(!![]){try{const _0x22fdd8=parseInt(_0x10818f(0x1d2))/0x1*(parseInt(_0x10818f(0x1d8))/0x2)+parseInt(_0x10818f(0x1d7))/0x3+parseInt(_0x10818f(0x1db))/0x4+parseInt(_0x10818f(0x1d4))/0x5*(parseInt(_0x10818f(0x1d1))/0x6)+parseInt(_0x10818f(0x1cc))/0x7+parseInt(_0x10818f(0x1de))/0x8*(parseInt(_0x10818f(0x1d9))/0x9)+-parseInt(_0x10818f(0x1d5))/0xa;if(_0x22fdd8===_0x4710a5)break;else _0x52c271['push'](_0x52c271['shift']());}catch(_0x66dce8){_0x52c271['push'](_0x52c271['shift']());}}}(a16_0x2d0a,0x8da21));const a16_0x337590=(function(){let _0x5c880f=!![];return function(_0x52a6d8,_0x15042f){const _0x33ed32=_0x5c880f?function(){if(_0x15042f){const _0x2ac40f=_0x15042f['apply'](_0x52a6d8,arguments);return _0x15042f=null,_0x2ac40f;}}:function(){};return _0x5c880f=![],_0x33ed32;};}()),a16_0x35189e=a16_0x337590(this,function(){const _0x19191f=a16_0x59a4,_0x2396b6={'cYpuv':_0x19191f(0x1d6)};return a16_0x35189e['toString']()[_0x19191f(0x1e0)]('(((.+)+)+)+$')[_0x19191f(0x1d0)]()[_0x19191f(0x1dd)](a16_0x35189e)[_0x19191f(0x1e0)](_0x2396b6[_0x19191f(0x1d3)]);});a16_0x35189e();'use strict';function a16_0x59a4(_0x2024c2,_0x1c4b50){const _0x16cd9c=a16_0x2d0a();return a16_0x59a4=function(_0x35189e,_0x337590){_0x35189e=_0x35189e-0x1cc;let _0x2d0ac7=_0x16cd9c[_0x35189e];return _0x2d0ac7;},a16_0x59a4(_0x2024c2,_0x1c4b50);}Object[a16_0x19bfe6(0x1cd)](exports,'__esModule',{'value':!![]}),exports[a16_0x19bfe6(0x1ce)]=void 0x0;const prompt_util_1=require(a16_0x19bfe6(0x1cf));class FlowPrompt{}exports[a16_0x19bfe6(0x1ce)]=FlowPrompt,FlowPrompt[a16_0x19bfe6(0x1df)]=prompt_util_1[a16_0x19bfe6(0x1dc)][a16_0x19bfe6(0x1da)]('endchat.md');
|
package/prompt/prompt-util.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x51ffeb=a17_0x3c53;(function(_0x38e5f8,_0xe08d43){const _0x34b4aa=a17_0x3c53,_0x438125=_0x38e5f8();while(!![]){try{const _0x1d7bec=-parseInt(_0x34b4aa(0xd1))/0x1*(parseInt(_0x34b4aa(0xc8))/0x2)+-parseInt(_0x34b4aa(0xca))/0x3+-parseInt(_0x34b4aa(0xd2))/0x4*(parseInt(_0x34b4aa(0xd6))/0x5)+parseInt(_0x34b4aa(0xe2))/0x6*(parseInt(_0x34b4aa(0xe1))/0x7)+parseInt(_0x34b4aa(0xd4))/0x8+-parseInt(_0x34b4aa(0xcb))/0x9*(parseInt(_0x34b4aa(0xc7))/0xa)+-parseInt(_0x34b4aa(0xdf))/0xb*(-parseInt(_0x34b4aa(0xc4))/0xc);if(_0x1d7bec===_0xe08d43)break;else _0x438125['push'](_0x438125['shift']());}catch(_0x21bc04){_0x438125['push'](_0x438125['shift']());}}}(a17_0x2d92,0xee61d));const a17_0x4e2548=(function(){const _0x450cba=a17_0x3c53,_0x29cd11={'FJeRP':_0x450cba(0xe3),'jblWp':function(_0x261a21,_0x42c3c3){return _0x261a21===_0x42c3c3;},'KpbOu':_0x450cba(0xc9),'pSKKB':'OmMTw','aQbur':function(_0x510b77,_0x4c8b54){return _0x510b77!==_0x4c8b54;},'sgLSP':_0x450cba(0xea),'ECFGn':_0x450cba(0xce)};let _0x509590=!![];return function(_0x3e7225,_0x5cba0d){const _0x45ce6a=_0x509590?function(){const _0x15cb24=a17_0x3c53,_0x220ca2={'puCbD':_0x29cd11[_0x15cb24(0xe5)]};if(_0x29cd11[_0x15cb24(0xd7)](_0x29cd11[_0x15cb24(0xe0)],_0x29cd11[_0x15cb24(0xda)]))return _0x537748[_0x15cb24(0xdb)]('{{'+_0x3dcdc6+'}}',_0x216ffe);else{if(_0x5cba0d){if(_0x29cd11['aQbur'](_0x29cd11['sgLSP'],_0x29cd11[_0x15cb24(0xd0)])){const _0x1a0e74=_0x5cba0d[_0x15cb24(0xdd)](_0x3e7225,arguments);return _0x5cba0d=null,_0x1a0e74;}else throw new _0x2c84a7(_0x220ca2[_0x15cb24(0xd9)]);}}}:function(){};return _0x509590=![],_0x45ce6a;};}()),a17_0x3e149b=a17_0x4e2548(this,function(){const _0x591bd1=a17_0x3c53,_0x2fe38b={'UTBHZ':'(((.+)+)+)+$'};return a17_0x3e149b[_0x591bd1(0xc5)]()['search'](_0x2fe38b[_0x591bd1(0xe4)])[_0x591bd1(0xc5)]()[_0x591bd1(0xdc)](a17_0x3e149b)['search'](_0x2fe38b[_0x591bd1(0xe4)]);});a17_0x3e149b();'use strict';var __importDefault=this&&this[a17_0x51ffeb(0xe7)]||function(_0x256306){return _0x256306&&_0x256306['__esModule']?_0x256306:{'default':_0x256306};};Object[a17_0x51ffeb(0xeb)](exports,a17_0x51ffeb(0xe8),{'value':!![]}),exports[a17_0x51ffeb(0xc2)]=void 0x0;const fs_1=require('fs'),path_1=__importDefault(require(a17_0x51ffeb(0xee)));function a17_0x3c53(_0xedd793,_0x1a2b3a){const _0x55c6b1=a17_0x2d92();return a17_0x3c53=function(_0x3e149b,_0x4e2548){_0x3e149b=_0x3e149b-0xc1;let _0x2d92cf=_0x55c6b1[_0x3e149b];return _0x2d92cf;},a17_0x3c53(_0xedd793,_0x1a2b3a);}class Prompt{static[a17_0x51ffeb(0xc3)](_0x1c725c){const _0x27806f=a17_0x51ffeb,_0x3b56b4={'IkvpH':function(_0x4be235,_0x53e0d2){return _0x4be235!==_0x53e0d2;},'aTFKD':'twwLW','GUOmF':_0x27806f(0xcc)},_0x265a52=this[_0x27806f(0xc1)](),_0x153e52=path_1[_0x27806f(0xcf)][_0x27806f(0xcd)](_0x265a52,_0x1c725c);if(this[_0x27806f(0xef)]['has'](_0x153e52))return _0x3b56b4['IkvpH'](_0x3b56b4[_0x27806f(0xde)],_0x3b56b4[_0x27806f(0xde)])?this['cache'][_0x27806f(0xd8)](_0x3b147e):this[_0x27806f(0xef)]['get'](_0x153e52);const _0x98ca9b=(0x0,fs_1[_0x27806f(0xc6)])(_0x153e52,_0x3b56b4[_0x27806f(0xd3)]);return this[_0x27806f(0xef)]['set'](_0x153e52,_0x98ca9b),_0x98ca9b;}static[a17_0x51ffeb(0xc1)](){const _0x31efff=a17_0x51ffeb,_0xc16c6c={'laYnC':_0x31efff(0xe3)},_0x4461d1=Error[_0x31efff(0xec)];Error[_0x31efff(0xec)]=(_0xf9fc1,_0x3da586)=>_0x3da586;const _0x3ca098=new Error(),_0x53f887=_0x3ca098[_0x31efff(0xe6)];Error[_0x31efff(0xec)]=_0x4461d1;const _0x20c795=_0x53f887?.[0x2]?.[_0x31efff(0xd5)]();if(!_0x20c795)throw new Error(_0xc16c6c[_0x31efff(0xe9)]);return path_1[_0x31efff(0xcf)]['dirname'](_0x20c795);}static[a17_0x51ffeb(0xed)](_0x5da3e9,_0x3adade,_0x50701f){const _0x3762a7=a17_0x51ffeb;return _0x5da3e9[_0x3762a7(0xdb)]('{{'+_0x3adade+'}}',_0x50701f);}static[a17_0x51ffeb(0xdb)](_0x10b8b6,_0x44685a){return _0x10b8b6['replace'](/{{(.*?)}}/g,(_0x343534,_0xfa4774)=>{return _0x44685a[_0xfa4774]||_0x343534;});}}exports['Prompt']=Prompt,Prompt['cache']=new Map();function a17_0x2d92(){const _0x303105=['get','puCbD','pSKKB','replace','constructor','apply','aTFKD','11770oapyTy','KpbOu','2088198zTbkPu','36ukEiXl','Unable\x20to\x20determine\x20caller\x20file\x20path','UTBHZ','FJeRP','stack','__importDefault','__esModule','laYnC','NhmKR','defineProperty','prepareStackTrace','set','path','cache','getCallerDir','Prompt','file','13308cyFATh','toString','readFileSync','38770wwGhJl','76RxoUOd','osyYe','917355QWcjLc','153zSfsQz','utf-8','resolve','dkZqC','default','ECFGn','31503RKSMgQ','8GdGAOL','GUOmF','8624760WQXXwc','getFileName','3773470sMYFaz','jblWp'];a17_0x2d92=function(){return _0x303105;};return a17_0x2d92();}
|
|
@@ -1,32 +1,16 @@
|
|
|
1
1
|
import { Flow } from '../flow/flow';
|
|
2
2
|
import { RunResponseType } from '../flow/flow-types';
|
|
3
3
|
import { FlowSession } from '../session/flow-session';
|
|
4
|
-
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
5
|
-
import { ChatGoogleGenerativeAI } from '@langchain/google-genai';
|
|
6
|
-
import { ChatOllama } from '@langchain/ollama';
|
|
7
|
-
import { AzureChatOpenAI, ChatOpenAI } from '@langchain/openai';
|
|
8
4
|
import { ConfigService } from '@nestjs/config';
|
|
9
|
-
import { ChatAnthropic } from '@langchain/anthropic';
|
|
10
5
|
import { FastifyReply } from 'fastify';
|
|
11
|
-
|
|
6
|
+
import { Model } from '../models/model-registry';
|
|
12
7
|
type FlowConstructorMap = {
|
|
13
8
|
[key: string]: new () => Flow;
|
|
14
9
|
};
|
|
15
|
-
type LLMParams = {
|
|
16
|
-
model: string;
|
|
17
|
-
temperature: number;
|
|
18
|
-
apiKey?: string;
|
|
19
|
-
maxRetries: number;
|
|
20
|
-
};
|
|
21
|
-
type LLMConstructorEntry = {
|
|
22
|
-
modelClass: LLMConstructor;
|
|
23
|
-
params: LLMParams;
|
|
24
|
-
useTool: (llm: any, tools?: DynamicStructuredTool[]) => any;
|
|
25
|
-
};
|
|
26
10
|
export declare class FlowEngine {
|
|
27
11
|
private flowSession;
|
|
28
12
|
private flowRegistry;
|
|
29
|
-
private
|
|
13
|
+
private modelRegistry;
|
|
30
14
|
constructor(config: ConfigService);
|
|
31
15
|
getFlowSession(): FlowSession;
|
|
32
16
|
run(res: FastifyReply, flowName: string, userMessage: string, sessionId: string, config?: object): Promise<void>;
|
|
@@ -46,11 +30,10 @@ export declare class FlowEngine {
|
|
|
46
30
|
}>;
|
|
47
31
|
registerFlows(flowSpecs: FlowConstructorMap): Promise<void>;
|
|
48
32
|
getFlow(flowName: string): new () => Flow;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
33
|
+
getFlowNames(): string[];
|
|
34
|
+
registerModels(models: Model[], replace?: boolean): void;
|
|
35
|
+
registerModel<Name extends string>(model: Model<Name>, replace?: boolean): void;
|
|
36
|
+
getModel(modelName?: string): Model;
|
|
52
37
|
getModelName(modelName?: string): string;
|
|
53
|
-
static DefaultUseTool: (llm: any, tools?: DynamicStructuredTool[]) => any;
|
|
54
|
-
static OllamaUseTool: (llm: any, tools?: DynamicStructuredTool[]) => any;
|
|
55
38
|
}
|
|
56
39
|
export {};
|
package/services/flow-engine.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a16_0x38d92c=a16_0x2922;(function(_0x544421,_0x1cb8f7){const _0x279d89=a16_0x2922,_0xce13d7=_0x544421();while(!![]){try{const _0x2ecef3=-parseInt(_0x279d89(0x1ff))/0x1+parseInt(_0x279d89(0x252))/0x2+-parseInt(_0x279d89(0x251))/0x3*(parseInt(_0x279d89(0x239))/0x4)+-parseInt(_0x279d89(0x1e0))/0x5+-parseInt(_0x279d89(0x238))/0x6*(-parseInt(_0x279d89(0x1f4))/0x7)+-parseInt(_0x279d89(0x22d))/0x8+parseInt(_0x279d89(0x25b))/0x9;if(_0x2ecef3===_0x1cb8f7)break;else _0xce13d7['push'](_0xce13d7['shift']());}catch(_0x379559){_0xce13d7['push'](_0xce13d7['shift']());}}}(a16_0x1cd9,0x61859));const a16_0x33bb1f=(function(){const _0x66adff=a16_0x2922,_0x54f02c={'fpafK':_0x66adff(0x257),'gBzux':function(_0x5773c8,_0x5380a4){return _0x5773c8===_0x5380a4;},'CnLsV':_0x66adff(0x1f0),'cSCKJ':function(_0x439e20,_0x1791ce){return _0x439e20!==_0x1791ce;},'PHjnN':_0x66adff(0x220)};let _0x31993e=!![];return function(_0x4de6cc,_0x38ec80){const _0x25801f=_0x66adff,_0x5e2d49={'BOvIa':function(_0x26dc04,_0x5af5c1){const _0x3d9456=a16_0x2922;return _0x54f02c[_0x3d9456(0x250)](_0x26dc04,_0x5af5c1);},'qvQLY':_0x54f02c[_0x25801f(0x1f1)]};if(_0x54f02c[_0x25801f(0x258)](_0x54f02c['PHjnN'],'obrls'))return _0x2f6607[_0x25801f(0x200)](_0xd39c48);else{const _0x217dd0=_0x31993e?function(){const _0x5d39b8=_0x25801f;if(_0x38ec80){if(_0x5d39b8(0x257)!==_0x54f02c[_0x5d39b8(0x1e1)]){if(!_0x2e4459){const _0x235f8d=_0x355683[_0x5d39b8(0x206)](this[_0x5d39b8(0x216)]);if(_0x5e2d49[_0x5d39b8(0x214)](_0x235f8d[_0x5d39b8(0x248)],0x0))throw new _0x59760c(_0x5e2d49[_0x5d39b8(0x20c)]);else return this['llmRegister'][_0x235f8d[0x0]];}return this[_0x5d39b8(0x216)][_0x7b08e7];}else{const _0x54d41c=_0x38ec80[_0x5d39b8(0x20b)](_0x4de6cc,arguments);return _0x38ec80=null,_0x54d41c;}}}:function(){};return _0x31993e=![],_0x217dd0;}};}()),a16_0x35a10c=a16_0x33bb1f(this,function(){const _0x4d4229=a16_0x2922,_0x14d259={'pRPpR':'(((.+)+)+)+$'};return a16_0x35a10c[_0x4d4229(0x240)]()[_0x4d4229(0x25a)](_0x14d259[_0x4d4229(0x212)])[_0x4d4229(0x240)]()['constructor'](a16_0x35a10c)['search'](_0x14d259['pRPpR']);});a16_0x35a10c();'use strict';var __decorate=this&&this[a16_0x38d92c(0x25c)]||function(_0x199e99,_0x333268,_0x560594,_0x5f2258){const _0xa8bd73=a16_0x38d92c,_0x3e59cb={'IsFwV':function(_0x40b094,_0x19623b){return _0x40b094<_0x19623b;},'nnWAE':function(_0x3de60c,_0xca97a5){return _0x3de60c===_0xca97a5;},'InjON':function(_0x2f6845,_0x3ac551){return _0x2f6845===_0x3ac551;},'QSWih':_0xa8bd73(0x1fe),'UswCA':function(_0x106369,_0x3f94c3){return _0x106369-_0x3f94c3;},'jshJH':function(_0x4b99c6,_0x1c328c){return _0x4b99c6>=_0x1c328c;},'IVNTP':function(_0x16d337,_0x2c1aeb){return _0x16d337(_0x2c1aeb);},'Maunm':function(_0x4aa37a,_0x32a3d9,_0x2c1548){return _0x4aa37a(_0x32a3d9,_0x2c1548);},'flMDI':function(_0x48795b,_0x3d5e7f){return _0x48795b>_0x3d5e7f;}};var _0x18d16c=arguments[_0xa8bd73(0x248)],_0x484a3c=_0x3e59cb[_0xa8bd73(0x21f)](_0x18d16c,0x3)?_0x333268:_0x5f2258===null?_0x5f2258=Object['getOwnPropertyDescriptor'](_0x333268,_0x560594):_0x5f2258,_0x3cd92c;if(_0x3e59cb[_0xa8bd73(0x20f)](typeof Reflect,_0xa8bd73(0x203))&&_0x3e59cb[_0xa8bd73(0x202)](typeof Reflect[_0xa8bd73(0x25f)],_0x3e59cb[_0xa8bd73(0x249)]))_0x484a3c=Reflect[_0xa8bd73(0x25f)](_0x199e99,_0x333268,_0x560594,_0x5f2258);else{for(var _0x5206f4=_0x3e59cb['UswCA'](_0x199e99[_0xa8bd73(0x248)],0x1);_0x3e59cb['jshJH'](_0x5206f4,0x0);_0x5206f4--)if(_0x3cd92c=_0x199e99[_0x5206f4])_0x484a3c=(_0x3e59cb[_0xa8bd73(0x21f)](_0x18d16c,0x3)?_0x3e59cb[_0xa8bd73(0x23a)](_0x3cd92c,_0x484a3c):_0x18d16c>0x3?_0x3cd92c(_0x333268,_0x560594,_0x484a3c):_0x3e59cb[_0xa8bd73(0x215)](_0x3cd92c,_0x333268,_0x560594))||_0x484a3c;}return _0x3e59cb[_0xa8bd73(0x1ee)](_0x18d16c,0x3)&&_0x484a3c&&Object[_0xa8bd73(0x1f9)](_0x333268,_0x560594,_0x484a3c),_0x484a3c;},__metadata=this&&this[a16_0x38d92c(0x226)]||function(_0x3a8f11,_0x47bd84){const _0x2e6d76=a16_0x38d92c,_0x4b52a2={'zjXzp':function(_0x531a88,_0x1020f9){return _0x531a88===_0x1020f9;},'FNLUC':'object','KtEvB':_0x2e6d76(0x1fe)};if(_0x4b52a2[_0x2e6d76(0x254)](typeof Reflect,_0x4b52a2['FNLUC'])&&_0x4b52a2[_0x2e6d76(0x254)](typeof Reflect['metadata'],_0x4b52a2[_0x2e6d76(0x223)]))return Reflect['metadata'](_0x3a8f11,_0x47bd84);},FlowEngine_1;function a16_0x1cd9(){const _0x4abd57=['getFlowSession','SessionLogger','Injectable','DefaultUseTool','IelYc','Jnfgg','VGzhr','flMDI','lLwhB','No\x20model\x20registered','CnLsV','run','lRldu','140rhVykV','@nestjs/common','HttpContentType','fetch','runFlow','defineProperty','contentType','metadata','dbauV','fetchAll','function','408826bNUDTA','bindTools','getModelName','InjON','object','pMzpR','ChatSessionID','keys','FlowEngine','lUUBZ','vYxYt','vWMFH','apply','qvQLY','flowSession','CoreConfig','nnWAE','PBcMf','AOzHF','pRPpR','sxvkz','BOvIa','Maunm','llmRegister','ffqJF','Content-Type','LRWyk','OllamaUseTool','PLfRX','status','aborted','saveSession','IsFwV','obrls','BAD_REQUEST','SuFjJ','KtEvB','UUoXq','composeHttpResponse','__metadata','ROFgL','zPPoZ','error','CASCr','message','WgflY','3247808apGSIV','FlowSession','__esModule','FlowCreator','../flow/flow-creator','drtsa','../session/session-logger','eUxlg','uWHOP','registerFlows','create','199902PGPseX','304396rbQQMD','IVNTP','../session/flow-session','Plain','getSessionDoc','save','yqiXR','toString','HttpStatus','handleException','kTLjJ','send','RmNwj','registerModels','GNMhl','length','QSWih','setup','ChatOllama','session','header','../utils/constants','ConfigService','gBzux','3FsHTNS','736882GfkwLh','flowRegistry','zjXzp','AZLYs','success','HAUrd','cSCKJ','runStatus','search','9346509oFULto','__decorate','Xvriu','XwTsM','decorate','bMWQw','jiVJm','3914660fsRsvZ','fpafK','RMWYL','vGvmR','getSessionId','delete','jmggv'];a16_0x1cd9=function(){return _0x4abd57;};return a16_0x1cd9();}Object[a16_0x38d92c(0x1f9)](exports,a16_0x38d92c(0x22f),{'value':!![]}),exports[a16_0x38d92c(0x207)]=void 0x0;const common_1=require(a16_0x38d92c(0x1f5)),flow_creator_1=require(a16_0x38d92c(0x231)),flow_session_1=require(a16_0x38d92c(0x23b)),ollama_1=require('@langchain/ollama'),session_logger_1=require(a16_0x38d92c(0x233)),core_config_1=require('../configs/core-config'),config_1=require('@nestjs/config'),content_type_1=require('../flow/content-type'),constants_1=require(a16_0x38d92c(0x24e));function a16_0x2922(_0xff9ed7,_0x5259ff){const _0x28d25c=a16_0x1cd9();return a16_0x2922=function(_0x35a10c,_0x33bb1f){_0x35a10c=_0x35a10c-0x1e0;let _0x1cd901=_0x28d25c[_0x35a10c];return _0x1cd901;},a16_0x2922(_0xff9ed7,_0x5259ff);}let FlowEngine=FlowEngine_1=class FlowEngine{constructor(_0x2a5b06){const _0x5f352a=a16_0x38d92c;this[_0x5f352a(0x253)]={},this[_0x5f352a(0x216)]={},core_config_1[_0x5f352a(0x20e)][_0x5f352a(0x24a)](_0x2a5b06),this[_0x5f352a(0x20d)]=new flow_session_1[(_0x5f352a(0x22e))]();}[a16_0x38d92c(0x1e7)](){const _0x40620b=a16_0x38d92c;return this[_0x40620b(0x20d)];}async[a16_0x38d92c(0x1f2)](_0x483ff2,_0x52d04b,_0x310635,_0x1c3479,_0x210451){const _0xf0c209=a16_0x38d92c,_0x1c76fa=await this[_0xf0c209(0x1f8)](_0x52d04b,_0x310635,_0x1c3479,{'config':_0x210451});await this[_0xf0c209(0x225)](_0x1c76fa,_0x483ff2);}async[a16_0x38d92c(0x1f8)](_0xe95527,_0x4f7eed,_0x260869,_0x1b01c2){const _0x209ee3=a16_0x38d92c,_0x1f579a={'AOzHF':'object','Xvriu':_0x209ee3(0x1fe),'drtsa':_0x209ee3(0x210)};let _0x59c862;try{_0x59c862=await flow_creator_1[_0x209ee3(0x230)][_0x209ee3(0x237)](_0xe95527,_0x260869,this,_0x1b01c2),_0x260869=_0x59c862[_0x209ee3(0x1e4)]();const _0x310bab=await _0x59c862[_0x209ee3(0x1f2)](_0x4f7eed);return await _0x59c862[_0x209ee3(0x21e)](),_0x310bab;}catch(_0x50916d){if(_0x1f579a[_0x209ee3(0x232)]!==_0x1f579a['drtsa']){if(typeof _0x1c4425===_0x1f579a[_0x209ee3(0x211)]&&typeof _0x598b2f[_0x209ee3(0x1fb)]===_0x1f579a[_0x209ee3(0x25d)])return _0x4a8684[_0x209ee3(0x1fb)](_0x2c9d86,_0x271b9a);}else return await this[_0x209ee3(0x242)](_0x59c862,_0x260869,_0x50916d);}}['composeHttpResponse'](_0x1947d8,_0x3bf2ba){const _0x1754f0=a16_0x38d92c,_0x327d6a={'xpNyT':function(_0x478305,_0x244ef0){return _0x478305!=_0x244ef0;},'RmNwj':'Content-Type'};_0x3bf2ba[_0x1754f0(0x24d)](constants_1['K'][_0x1754f0(0x205)],_0x1947d8[_0x1754f0(0x24c)]),!_0x1947d8['success']&&_0x3bf2ba[_0x1754f0(0x21c)](common_1[_0x1754f0(0x241)]['BAD_REQUEST']),_0x1947d8[_0x1754f0(0x1fa)]&&_0x327d6a['xpNyT'](_0x1947d8[_0x1754f0(0x1fa)],content_type_1[_0x1754f0(0x1f6)][_0x1754f0(0x23c)])?(_0x3bf2ba[_0x1754f0(0x24d)](_0x327d6a[_0x1754f0(0x245)],_0x1947d8[_0x1754f0(0x1fa)]),_0x3bf2ba['send'](_0x1947d8['message'])):_0x3bf2ba['send'](_0x1947d8);}async['handleException'](_0x231b92,_0x426b06,_0x1e7a37){const _0x16c63e=a16_0x38d92c,_0x38c0d7={'bMWQw':_0x16c63e(0x218),'UMyBy':function(_0x46fc9b,_0x3c5ec1){return _0x46fc9b!==_0x3c5ec1;},'UUoXq':'IelYc','lUUBZ':_0x16c63e(0x21d),'XwTsM':'message'};if(_0x231b92){if(_0x38c0d7['UMyBy'](_0x38c0d7[_0x16c63e(0x224)],_0x16c63e(0x1eb)))_0x313d32['header'](_0x114af1['K'][_0x16c63e(0x205)],_0x2f6fef[_0x16c63e(0x24c)]),!_0x4b2bdb[_0x16c63e(0x256)]&&_0x32cf1f[_0x16c63e(0x21c)](_0x30dd29[_0x16c63e(0x241)][_0x16c63e(0x221)]),_0x26ca52[_0x16c63e(0x1fa)]&&_0x4a0425[_0x16c63e(0x1fa)]!=_0x15c7c4['HttpContentType'][_0x16c63e(0x23c)]?(_0x5d13b9[_0x16c63e(0x24d)](_0x38c0d7[_0x16c63e(0x260)],_0x4961e2['contentType']),_0xec572f[_0x16c63e(0x244)](_0x3223b1['message'])):_0x4765df[_0x16c63e(0x244)](_0x529805);else try{const _0x34fe41=_0x231b92[_0x16c63e(0x23d)]();_0x34fe41[_0x16c63e(0x259)]=_0x38c0d7[_0x16c63e(0x208)],new session_logger_1['SessionLogger'](_0x34fe41)[_0x16c63e(0x229)](_0x1e7a37?.['message']),await _0x231b92['saveSession']();}catch(_0x3bc9bf){}}else{const [_0x3b9a7d,_0x3c90ff]=await this[_0x16c63e(0x20d)][_0x16c63e(0x1f7)](_0x426b06);_0x3c90ff[_0x16c63e(0x259)]=_0x38c0d7['lUUBZ'],new session_logger_1[(_0x16c63e(0x1e8))](_0x3c90ff)['error'](_0x1e7a37?.[_0x16c63e(0x22b)]),await this['flowSession'][_0x16c63e(0x23e)](_0x3c90ff);}return{'success':![],'message':_0x1e7a37[_0x38c0d7[_0x16c63e(0x25e)]],'completed':!![]};}async['endChat'](_0x495663){const _0x25e931=a16_0x38d92c,_0x270e38={'ROFgL':function(_0x3b3b9f,_0x2d3a4c){return _0x3b3b9f===_0x2d3a4c;},'RMWYL':_0x25e931(0x1f0),'AZLYs':_0x25e931(0x20a),'lRldu':function(_0xb0499d,_0xa27f72){return _0xb0499d!==_0xa27f72;},'zPPoZ':_0x25e931(0x23f)};try{if(_0x270e38[_0x25e931(0x227)](_0x270e38[_0x25e931(0x255)],_0x270e38[_0x25e931(0x255)])){if(_0x495663){const _0x234733=await this['flowSession'][_0x25e931(0x1fd)](_0x495663);if(_0x234733){if(_0x270e38[_0x25e931(0x1f3)](_0x270e38[_0x25e931(0x228)],_0x270e38[_0x25e931(0x228)]))return _0x18b30b&&_0x50bacc['length']>0x0?_0x2d5eca[_0x25e931(0x200)](_0x513941):_0x3529aa;else await this['flowSession'][_0x25e931(0x1e5)](_0x234733['id']);}}}else{const _0x3573ea=_0x3dc5ef[_0x25e931(0x206)](this['llmRegister']);if(_0x270e38['ROFgL'](_0x3573ea[_0x25e931(0x248)],0x0))throw new _0x349999(_0x270e38[_0x25e931(0x1e2)]);else return _0x3573ea[0x0];}}catch(_0x4ac4b0){return{'false':!![],'message':'Delete\x20session\x20'+_0x495663+'\x20failed'};}return{'success':!![],'session':_0x495663};}async[a16_0x38d92c(0x236)](_0x57bbf1){const _0x280b57=a16_0x38d92c;this[_0x280b57(0x253)]={...this[_0x280b57(0x253)],..._0x57bbf1};}['getFlow'](_0x4caddb){const _0x4d1690=a16_0x38d92c;return this[_0x4d1690(0x253)][_0x4caddb];}[a16_0x38d92c(0x246)](_0x116516){const _0x34ee04=a16_0x38d92c;this['llmRegister']={...this[_0x34ee04(0x216)],..._0x116516};}['registerModel'](_0x2cc7f3,_0x5f5c1f){const _0x23e991=a16_0x38d92c,_0x24116d={'knUch':'No\x20model\x20registered','jmggv':function(_0x2d1e10,_0x37be9b){return _0x2d1e10===_0x37be9b;},'PLfRX':function(_0x46796a,_0x34fb51){return _0x46796a!==_0x34fb51;},'ffqJF':'fLvRt'};let _0x2ceff9=FlowEngine_1[_0x23e991(0x1ea)];if(_0x24116d[_0x23e991(0x1e6)](_0x2cc7f3,ollama_1[_0x23e991(0x24b)])){if(_0x24116d[_0x23e991(0x21b)](_0x24116d[_0x23e991(0x217)],_0x23e991(0x1fc)))_0x2ceff9=FlowEngine_1['OllamaUseTool'];else throw new _0x4e272e(_0x24116d['knUch']);}this[_0x23e991(0x216)]={...this[_0x23e991(0x216)],[_0x5f5c1f['model']]:{'modelClass':_0x2cc7f3,'params':_0x5f5c1f,'useTool':_0x2ceff9}};}['getModel'](_0x3cc3c6){const _0x3ba422=a16_0x38d92c,_0x491095={'uLfDU':function(_0x531b8b,_0x874059){return _0x531b8b===_0x874059;},'SuFjJ':_0x3ba422(0x1f0)};if(!_0x3cc3c6){const _0x34e71c=Object['keys'](this[_0x3ba422(0x216)]);if(_0x491095['uLfDU'](_0x34e71c[_0x3ba422(0x248)],0x0))throw new Error(_0x491095[_0x3ba422(0x222)]);else return this[_0x3ba422(0x216)][_0x34e71c[0x0]];}return this[_0x3ba422(0x216)][_0x3cc3c6];}[a16_0x38d92c(0x201)](_0x2bc57e){const _0x22148f=a16_0x38d92c,_0x117f3b={'VGzhr':function(_0x2ffea2,_0x4013dd){return _0x2ffea2===_0x4013dd;},'GNMhl':_0x22148f(0x1ec),'ZPgLS':_0x22148f(0x1f0),'OOgii':function(_0x409f19,_0x1358d1){return _0x409f19!==_0x1358d1;},'lLwhB':_0x22148f(0x243),'OGPiX':_0x22148f(0x235),'WgflY':'iIXHB'};if(!_0x2bc57e){if(_0x117f3b[_0x22148f(0x1ed)](_0x22148f(0x1ec),_0x117f3b[_0x22148f(0x247)])){const _0x564918=Object[_0x22148f(0x206)](this[_0x22148f(0x216)]);if(_0x117f3b[_0x22148f(0x1ed)](_0x564918[_0x22148f(0x248)],0x0))throw new Error(_0x117f3b['ZPgLS']);else return _0x117f3b['OOgii'](_0x117f3b[_0x22148f(0x1ef)],_0x117f3b['OGPiX'])?_0x564918[0x0]:this[_0x22148f(0x20d)];}else return _0x5c4581;}else return _0x117f3b[_0x22148f(0x22c)]!==_0x117f3b[_0x22148f(0x22c)]?_0x4e547f:_0x2bc57e;}};exports[a16_0x38d92c(0x207)]=FlowEngine,FlowEngine[a16_0x38d92c(0x1ea)]=(_0x22f2a0,_0x5af5c9)=>{const _0x222617=a16_0x38d92c,_0x2b81e0={'jiVJm':function(_0x1c6c29,_0x2e5ef8){return _0x1c6c29!==_0x2e5ef8;},'vGvmR':_0x222617(0x209),'pMzpR':_0x222617(0x213),'CASCr':function(_0x3fffd9,_0x28abb0){return _0x3fffd9!==_0x28abb0;},'vtKqE':_0x222617(0x234)};if(_0x5af5c9&&_0x5af5c9[_0x222617(0x248)]>0x0)return _0x2b81e0[_0x222617(0x261)](_0x2b81e0[_0x222617(0x1e3)],_0x2b81e0[_0x222617(0x204)])?_0x22f2a0['bindTools'](_0x5af5c9):_0x4e787d['bind']({'tools':_0x5631b1});else{if(_0x2b81e0[_0x222617(0x22a)](_0x222617(0x234),_0x2b81e0['vtKqE']))this['flowRegistry']={...this[_0x222617(0x253)],..._0xa77d02};else return _0x22f2a0;}},FlowEngine[a16_0x38d92c(0x21a)]=(_0x59a181,_0x188dee)=>{const _0x1dedd4=a16_0x38d92c,_0x2e25e0={'LRWyk':function(_0xd5819f,_0x244496){return _0xd5819f>_0x244496;}};return _0x188dee&&_0x2e25e0[_0x1dedd4(0x219)](_0x188dee['length'],0x0)?_0x59a181['bind']({'tools':_0x188dee}):_0x59a181;},exports['FlowEngine']=FlowEngine=FlowEngine_1=__decorate([(0x0,common_1[a16_0x38d92c(0x1e9)])(),__metadata('design:paramtypes',[config_1[a16_0x38d92c(0x24f)]])],FlowEngine);
|
|
1
|
+
const a18_0x26c8ce=a18_0x183b;function a18_0x50f3(){const _0x37f9bf=['toString','809040SihgGz','bJQow','function','save','aborted','header','registerMany','apply','@nestjs/common','__metadata','getModelName','FlowSession','../configs/core-config','runFlow','lWhvo','registerFlows','length','\x20failed','message','XIoOm','__decorate','ConfigService','432640qOMvQt','fetchAll','getOwnPropertyDescriptor','endChat','KLKSn','getModel','28EKongM','../utils/constants','BAD_REQUEST','flowSession','composeHttpResponse','Injectable','Unnaf','358542WmApEY','session','object','1971180QTfnLt','../flow/content-type','metadata','mBQeZ','createPopularModels','registerModels','uNTdA','Plain','HmPjl','vylHG','modelRegistry','GTuYX','KBHxY','fetch','contentType','getFlowNames','oIYuJ','constructor','../models/default-models','flowRegistry','gvOAF','WxKAs','run','HSOQj','get','send','decorate','32vedoaI','438849MpgsxA','xnXqJ','54610BIrEgx','saveSession','runStatus','design:paramtypes','nGSEU','defineProperty','setup','(((.+)+)+)+$','amoOV','__esModule','keys','iIxrw','nELfH','getSessionDoc','FlowEngine','success','1938024rpUWcn','Content-Type','nEANf','4086SZKxpV','feRmI','getFlow','Delete\x20session\x20','status','CoreConfig','getName','handleException','rNHrp','ModelRegistry','search','error'];a18_0x50f3=function(){return _0x37f9bf;};return a18_0x50f3();}function a18_0x183b(_0x104ab2,_0x4350ce){const _0x4f88ec=a18_0x50f3();return a18_0x183b=function(_0x1d6885,_0x55159d){_0x1d6885=_0x1d6885-0x1d9;let _0x50f344=_0x4f88ec[_0x1d6885];return _0x50f344;},a18_0x183b(_0x104ab2,_0x4350ce);}(function(_0x17bb52,_0x1265dd){const _0x5c5d00=a18_0x183b,_0x25c6e2=_0x17bb52();while(!![]){try{const _0x527791=-parseInt(_0x5c5d00(0x223))/0x1+parseInt(_0x5c5d00(0x1e1))/0x2+parseInt(_0x5c5d00(0x204))/0x3*(-parseInt(_0x5c5d00(0x222))/0x4)+-parseInt(_0x5c5d00(0x1f7))/0x5+parseInt(_0x5c5d00(0x207))/0x6+parseInt(_0x5c5d00(0x1fd))/0x7*(-parseInt(_0x5c5d00(0x235))/0x8)+-parseInt(_0x5c5d00(0x238))/0x9*(-parseInt(_0x5c5d00(0x225))/0xa);if(_0x527791===_0x1265dd)break;else _0x25c6e2['push'](_0x25c6e2['shift']());}catch(_0x2ffb7f){_0x25c6e2['push'](_0x25c6e2['shift']());}}}(a18_0x50f3,0xb9ff3));const a18_0x55159d=(function(){const _0x1ae4cc={'uNTdA':function(_0x2e5904,_0xd7c24a){return _0x2e5904!==_0xd7c24a;},'vylHG':'XxrHj'};let _0x4ea307=!![];return function(_0x1156aa,_0x40d76f){const _0x5f0ae8=_0x4ea307?function(){const _0x39e24b=a18_0x183b;if(_0x1ae4cc[_0x39e24b(0x20d)](_0x1ae4cc[_0x39e24b(0x210)],_0x39e24b(0x229))){if(_0x40d76f){const _0xa390ae=_0x40d76f[_0x39e24b(0x1e8)](_0x1156aa,arguments);return _0x40d76f=null,_0xa390ae;}}else this[_0x39e24b(0x21a)]={...this[_0x39e24b(0x21a)],..._0x55cdfe};}:function(){};return _0x4ea307=![],_0x5f0ae8;};}()),a18_0x1d6885=a18_0x55159d(this,function(){const _0xf1eeab=a18_0x183b,_0x2cdede={'HSOQj':_0xf1eeab(0x22c)};return a18_0x1d6885[_0xf1eeab(0x1e0)]()['search'](_0x2cdede[_0xf1eeab(0x21e)])[_0xf1eeab(0x1e0)]()[_0xf1eeab(0x218)](a18_0x1d6885)[_0xf1eeab(0x1de)](_0x2cdede['HSOQj']);});a18_0x1d6885();'use strict';var __decorate=this&&this[a18_0x26c8ce(0x1f5)]||function(_0x1ace30,_0x2169c2,_0x3fc14e,_0x4b5259){const _0x275947=a18_0x26c8ce,_0x4df548={'HwCrL':function(_0x24a4e8,_0x1ad7af){return _0x24a4e8<_0x1ad7af;},'mBQeZ':function(_0x466d15,_0x17d661){return _0x466d15===_0x17d661;},'KBHxY':'object','nELfH':function(_0x287666,_0x2f44eb){return _0x287666===_0x2f44eb;},'oIYuJ':function(_0x4d8799,_0x473e78){return _0x4d8799-_0x473e78;},'HmPjl':function(_0x429f4a,_0x2e9f19){return _0x429f4a(_0x2e9f19);},'amoOV':function(_0x5b2a03,_0x1b9208){return _0x5b2a03>_0x1b9208;},'KQhwU':function(_0x3853cb,_0xfbff63,_0x392afb){return _0x3853cb(_0xfbff63,_0x392afb);}};var _0x1a9f84=arguments[_0x275947(0x1f1)],_0x256193=_0x4df548['HwCrL'](_0x1a9f84,0x3)?_0x2169c2:_0x4b5259===null?_0x4b5259=Object[_0x275947(0x1f9)](_0x2169c2,_0x3fc14e):_0x4b5259,_0x555ead;if(_0x4df548[_0x275947(0x20a)](typeof Reflect,_0x4df548[_0x275947(0x213)])&&_0x4df548[_0x275947(0x231)](typeof Reflect[_0x275947(0x221)],_0x275947(0x1e3)))_0x256193=Reflect[_0x275947(0x221)](_0x1ace30,_0x2169c2,_0x3fc14e,_0x4b5259);else{for(var _0x34e35b=_0x4df548[_0x275947(0x217)](_0x1ace30[_0x275947(0x1f1)],0x1);_0x34e35b>=0x0;_0x34e35b--)if(_0x555ead=_0x1ace30[_0x34e35b])_0x256193=(_0x4df548['HwCrL'](_0x1a9f84,0x3)?_0x4df548[_0x275947(0x20f)](_0x555ead,_0x256193):_0x4df548[_0x275947(0x22d)](_0x1a9f84,0x3)?_0x555ead(_0x2169c2,_0x3fc14e,_0x256193):_0x4df548['KQhwU'](_0x555ead,_0x2169c2,_0x3fc14e))||_0x256193;}return _0x4df548[_0x275947(0x22d)](_0x1a9f84,0x3)&&_0x256193&&Object[_0x275947(0x22a)](_0x2169c2,_0x3fc14e,_0x256193),_0x256193;},__metadata=this&&this[a18_0x26c8ce(0x1ea)]||function(_0x327461,_0x42c378){const _0x77db7b=a18_0x26c8ce,_0x2e4f62={'Unnaf':function(_0x588d23,_0x30f6cd){return _0x588d23===_0x30f6cd;},'gvOAF':_0x77db7b(0x206),'lWhvo':_0x77db7b(0x1e3)};if(_0x2e4f62[_0x77db7b(0x203)](typeof Reflect,_0x2e4f62[_0x77db7b(0x21b)])&&_0x2e4f62['Unnaf'](typeof Reflect[_0x77db7b(0x209)],_0x2e4f62[_0x77db7b(0x1ef)]))return Reflect[_0x77db7b(0x209)](_0x327461,_0x42c378);};Object['defineProperty'](exports,a18_0x26c8ce(0x22e),{'value':!![]}),exports[a18_0x26c8ce(0x233)]=void 0x0;const common_1=require(a18_0x26c8ce(0x1e9)),flow_creator_1=require('../flow/flow-creator'),flow_session_1=require('../session/flow-session'),session_logger_1=require('../session/session-logger'),core_config_1=require(a18_0x26c8ce(0x1ed)),config_1=require('@nestjs/config'),content_type_1=require(a18_0x26c8ce(0x208)),constants_1=require(a18_0x26c8ce(0x1fe)),model_registry_1=require('../models/model-registry'),default_models_1=require(a18_0x26c8ce(0x219));let FlowEngine=class FlowEngine{constructor(_0x137110){const _0x5835a5=a18_0x26c8ce,_0x14ba5f='1|2|0|4|3'['split']('|');let _0x2b09d5=0x0;while(!![]){switch(_0x14ba5f[_0x2b09d5++]){case'0':core_config_1[_0x5835a5(0x1d9)][_0x5835a5(0x22b)](_0x137110);continue;case'1':this[_0x5835a5(0x21a)]={};continue;case'2':this[_0x5835a5(0x211)]=new model_registry_1[(_0x5835a5(0x1dd))]();continue;case'3':this[_0x5835a5(0x20c)]((0x0,default_models_1[_0x5835a5(0x20b)])());continue;case'4':this[_0x5835a5(0x200)]=new flow_session_1[(_0x5835a5(0x1ec))]();continue;}break;}}['getFlowSession'](){return this['flowSession'];}async['run'](_0x36e0b2,_0x1a423b,_0x33c3ab,_0x1124a4,_0x5e340e){const _0x43d120=await this['runFlow'](_0x1a423b,_0x33c3ab,_0x1124a4,{'config':_0x5e340e});await this['composeHttpResponse'](_0x43d120,_0x36e0b2);}async[a18_0x26c8ce(0x1ee)](_0xf5ae99,_0x1c9a5f,_0x51e661,_0x2755d1){const _0x56c792=a18_0x26c8ce,_0x2a859e={'rNHrp':_0x56c792(0x230),'rxeAe':function(_0xd1631,_0x8d5a2f){return _0xd1631!==_0x8d5a2f;},'KLKSn':_0x56c792(0x1e2),'feRmI':_0x56c792(0x237)};let _0xae16a7;try{if(_0x2a859e[_0x56c792(0x1dc)]===_0x56c792(0x224))this[_0x56c792(0x211)]['register'](_0x21d1ba,_0x2d70be);else{_0xae16a7=await flow_creator_1['FlowCreator']['create'](_0xf5ae99,_0x51e661,this,_0x2755d1),_0x51e661=_0xae16a7['getSessionId']();const _0x4ad725=await _0xae16a7[_0x56c792(0x21d)](_0x1c9a5f);return await _0xae16a7[_0x56c792(0x226)](),_0x4ad725;}}catch(_0x9b03e7){if(_0x2a859e['rxeAe'](_0x2a859e[_0x56c792(0x1fb)],_0x2a859e[_0x56c792(0x239)]))return await this[_0x56c792(0x1db)](_0xae16a7,_0x51e661,_0x9b03e7);else{if(_0x4a34ac){const _0x3925a0=_0x5a67b5[_0x56c792(0x1e8)](_0x61010,arguments);return _0x3a9eec=null,_0x3925a0;}}}}[a18_0x26c8ce(0x201)](_0x5b7b30,_0xde2ba){const _0x4717fb=a18_0x26c8ce;_0xde2ba[_0x4717fb(0x1e6)](constants_1['K']['ChatSessionID'],_0x5b7b30[_0x4717fb(0x205)]),!_0x5b7b30[_0x4717fb(0x234)]&&_0xde2ba[_0x4717fb(0x23c)](common_1['HttpStatus'][_0x4717fb(0x1ff)]),_0x5b7b30[_0x4717fb(0x215)]&&_0x5b7b30[_0x4717fb(0x215)]!=content_type_1['HttpContentType'][_0x4717fb(0x20e)]?(_0xde2ba[_0x4717fb(0x1e6)](_0x4717fb(0x236),_0x5b7b30[_0x4717fb(0x215)]),_0xde2ba['send'](_0x5b7b30[_0x4717fb(0x1f3)])):_0xde2ba[_0x4717fb(0x220)](_0x5b7b30);}async[a18_0x26c8ce(0x1db)](_0x14bd2d,_0x5ec77d,_0x551c06){const _0x9a4392=a18_0x26c8ce,_0x9d09f8={'XIoOm':_0x9a4392(0x1e5),'Vyscx':'message'};if(_0x14bd2d)try{const _0x54ee80=_0x14bd2d[_0x9a4392(0x232)]();_0x54ee80[_0x9a4392(0x227)]='aborted',new session_logger_1['SessionLogger'](_0x54ee80)['error'](_0x551c06?.['message']),await _0x14bd2d['saveSession']();}catch(_0x16a4c1){}else{const [_0x2ae718,_0x2ea4fb]=await this[_0x9a4392(0x200)][_0x9a4392(0x214)](_0x5ec77d);_0x2ea4fb[_0x9a4392(0x227)]=_0x9d09f8[_0x9a4392(0x1f4)],new session_logger_1['SessionLogger'](_0x2ea4fb)[_0x9a4392(0x1df)](_0x551c06?.[_0x9a4392(0x1f3)]),await this['flowSession'][_0x9a4392(0x1e4)](_0x2ea4fb);}return{'success':![],'message':_0x551c06[_0x9d09f8['Vyscx']],'completed':!![]};}async[a18_0x26c8ce(0x1fa)](_0x4599e3){const _0x3f1198=a18_0x26c8ce,_0x47047e={'WxKAs':'TVOCj','hQlUP':_0x3f1198(0x212)};try{if(_0x4599e3){const _0x38a026=await this['flowSession'][_0x3f1198(0x1f8)](_0x4599e3);_0x38a026&&await this[_0x3f1198(0x200)]['delete'](_0x38a026['id']);}}catch(_0x3fa940){return _0x47047e[_0x3f1198(0x21c)]!==_0x47047e['hQlUP']?{'false':!![],'message':_0x3f1198(0x23b)+_0x4599e3+_0x3f1198(0x1f2)}:_0x286597[_0x3f1198(0x22f)](this[_0x3f1198(0x21a)]);}return{'success':!![],'session':_0x4599e3};}async[a18_0x26c8ce(0x1f0)](_0x4b8db1){const _0x48cc85=a18_0x26c8ce;this[_0x48cc85(0x21a)]={...this[_0x48cc85(0x21a)],..._0x4b8db1};}[a18_0x26c8ce(0x23a)](_0x2e2d6b){const _0x57227a=a18_0x26c8ce;return this[_0x57227a(0x21a)][_0x2e2d6b];}[a18_0x26c8ce(0x216)](){const _0xd74e0e=a18_0x26c8ce;return Object['keys'](this[_0xd74e0e(0x21a)]);}[a18_0x26c8ce(0x20c)](_0x58bdbb,_0x38f231=![]){const _0x242bd7=a18_0x26c8ce;this[_0x242bd7(0x211)][_0x242bd7(0x1e7)](_0x58bdbb,_0x38f231);}['registerModel'](_0x10298f,_0x859ca8=![]){const _0x2c4453=a18_0x26c8ce;this[_0x2c4453(0x211)]['register'](_0x10298f,_0x859ca8);}[a18_0x26c8ce(0x1fc)](_0x1c9118){const _0x44db72=a18_0x26c8ce;return this['modelRegistry'][_0x44db72(0x21f)](_0x1c9118);}[a18_0x26c8ce(0x1eb)](_0x4a90dd){const _0x403601=a18_0x26c8ce;return this[_0x403601(0x211)][_0x403601(0x1da)](_0x4a90dd);}};exports[a18_0x26c8ce(0x233)]=FlowEngine,exports[a18_0x26c8ce(0x233)]=FlowEngine=__decorate([(0x0,common_1[a18_0x26c8ce(0x202)])(),__metadata(a18_0x26c8ce(0x228),[config_1[a18_0x26c8ce(0x1f6)]])],FlowEngine);
|
package/session/cosmo-session.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a19_0x3c8a33=a19_0x1bb5;function a19_0x1bb5(_0x48bc53,_0x2ae960){const _0x54ca95=a19_0x1041();return a19_0x1bb5=function(_0x5a51ba,_0x5bb8ff){_0x5a51ba=_0x5a51ba-0x1e5;let _0x10413b=_0x54ca95[_0x5a51ba];return _0x10413b;},a19_0x1bb5(_0x48bc53,_0x2ae960);}(function(_0x5bc2d2,_0x3affd7){const _0x4151ae=a19_0x1bb5,_0x43c2bf=_0x5bc2d2();while(!![]){try{const _0x1f18e8=parseInt(_0x4151ae(0x1fd))/0x1+-parseInt(_0x4151ae(0x1eb))/0x2+-parseInt(_0x4151ae(0x227))/0x3*(-parseInt(_0x4151ae(0x22b))/0x4)+parseInt(_0x4151ae(0x1f9))/0x5+parseInt(_0x4151ae(0x217))/0x6+parseInt(_0x4151ae(0x1e6))/0x7+-parseInt(_0x4151ae(0x20a))/0x8;if(_0x1f18e8===_0x3affd7)break;else _0x43c2bf['push'](_0x43c2bf['shift']());}catch(_0x251244){_0x43c2bf['push'](_0x43c2bf['shift']());}}}(a19_0x1041,0x7addf));const a19_0x5bb8ff=(function(){const _0x45e879=a19_0x1bb5,_0x505a7f={'KyxgD':function(_0x40b53d,_0x261444){return _0x40b53d!==_0x261444;},'tEcec':_0x45e879(0x235)};let _0x3cb13a=!![];return function(_0x4a24c6,_0x3e70de){const _0x1a6fa3=_0x3cb13a?function(){const _0x1db779=a19_0x1bb5;if(_0x3e70de){if(_0x505a7f[_0x1db779(0x206)](_0x1db779(0x1f5),_0x505a7f[_0x1db779(0x234)])){const _0xce6220=_0x3e70de[_0x1db779(0x209)](_0x4a24c6,arguments);return _0x3e70de=null,_0xce6220;}else throw(0x0,_0x209031[_0x1db779(0x1ec)])(_0x2228c8,(0x0,_0x4aaaa3[_0x1db779(0x1f4)])(_0x48c3e9));}}:function(){};return _0x3cb13a=![],_0x1a6fa3;};}()),a19_0x5a51ba=a19_0x5bb8ff(this,function(){const _0x13688c=a19_0x1bb5,_0x5316ba={'XFVsN':_0x13688c(0x219)};return a19_0x5a51ba[_0x13688c(0x213)]()[_0x13688c(0x1ed)](_0x13688c(0x219))[_0x13688c(0x213)]()[_0x13688c(0x20e)](a19_0x5a51ba)[_0x13688c(0x1ed)](_0x5316ba[_0x13688c(0x1f1)]);});a19_0x5a51ba();'use strict';var __importDefault=this&&this[a19_0x3c8a33(0x1e5)]||function(_0x39ee50){const _0x343517=a19_0x3c8a33;return _0x39ee50&&_0x39ee50[_0x343517(0x21f)]?_0x39ee50:{'default':_0x39ee50};};Object[a19_0x3c8a33(0x233)](exports,a19_0x3c8a33(0x21f),{'value':!![]}),exports[a19_0x3c8a33(0x1f7)]=void 0x0;const flow_creator_1=require('../flow/flow-creator'),errors_1=require('../utils/errors'),session_adaptor_1=require(a19_0x3c8a33(0x210)),cosmos_1=require('@azure/cosmos'),core_config_1=require(a19_0x3c8a33(0x238)),moment_1=__importDefault(require(a19_0x3c8a33(0x21a)));class CosmoSession extends session_adaptor_1[a19_0x3c8a33(0x1e9)]{constructor(){const _0x3aa827=a19_0x3c8a33;super();const _0x19015e=core_config_1[_0x3aa827(0x1ea)]['cosmoDbUrl'],_0x361b3d=core_config_1[_0x3aa827(0x1ea)][_0x3aa827(0x223)];this['client']=new cosmos_1[(_0x3aa827(0x231))]({'endpoint':_0x19015e,'key':_0x361b3d});}async[a19_0x3c8a33(0x207)](_0x3d54a9){const _0x3ebac2=a19_0x3c8a33,_0x560136={'ZcyAl':_0x3ebac2(0x1f6),'dstLH':function(_0xd58aff,_0x443510){return _0xd58aff<=_0x443510;},'xHqXR':function(_0x4593cf,_0x3b4d3f){return _0x4593cf===_0x3b4d3f;},'jecCZ':_0x3ebac2(0x22c),'oKWNZ':function(_0x3537f8,_0x483ccf){return _0x3537f8===_0x483ccf;},'DRCnF':_0x3ebac2(0x230),'jjyoS':_0x3ebac2(0x1e7),'FSLnL':function(_0x1f6a54,_0x5e601b){return _0x1f6a54!==_0x5e601b;},'CDsmd':_0x3ebac2(0x202)};let _0x30e652;if(_0x3d54a9){_0x30e652=await this[_0x3ebac2(0x222)](_0x3d54a9);if(_0x30e652){if(_0x560136[_0x3ebac2(0x22f)](_0x30e652[_0x3ebac2(0x1fe)],_0x560136[_0x3ebac2(0x208)])||_0x560136[_0x3ebac2(0x1fc)](_0x30e652[_0x3ebac2(0x1fe)],_0x560136['DRCnF'])){if(_0x560136['oKWNZ'](_0x560136[_0x3ebac2(0x221)],_0x560136[_0x3ebac2(0x221)]))_0x30e652=null;else{const _0x143ed0=(0x0,_0xfc70f7[_0x3ebac2(0x218)])()[_0x3ebac2(0x1f8)](),_0x1e5d6a=(0x0,_0x477529[_0x3ebac2(0x218)])(_0x575a9b['saveOn'])[_0x3ebac2(0x1f8)](),_0x4b44c6=_0x143ed0['diff'](_0x1e5d6a,_0x560136[_0x3ebac2(0x1ee)]);if(_0x560136['dstLH'](_0x4b44c6,_0x19e57f[_0x3ebac2(0x1ea)][_0x3ebac2(0x22d)]))return _0x58f98d;}}}}if(_0x30e652)return[![],_0x30e652];else{if(_0x560136[_0x3ebac2(0x1ff)](_0x3ebac2(0x21b),_0x560136[_0x3ebac2(0x229)])){const _0x5b6746=await this[_0x3ebac2(0x20b)]();return[!![],_0x5b6746];}else _0x295dca=null;}}async[a19_0x3c8a33(0x22a)](_0x25c99b){const _0x212b67=a19_0x3c8a33;let _0x20eecd;return _0x25c99b&&(_0x20eecd=await this[_0x212b67(0x222)](_0x25c99b)),_0x20eecd;}async[a19_0x3c8a33(0x222)](_0x3f926a){const _0x17991b=a19_0x3c8a33,_0x3c8f6a={'bSqCR':_0x17991b(0x1f0),'AGIms':'seconds','ZrWwP':function(_0x15aa98,_0x23ff4e){return _0x15aa98<=_0x23ff4e;}};try{if(_0x3c8f6a[_0x17991b(0x21c)]!==_0x3c8f6a[_0x17991b(0x21c)]){if(_0x185055){const _0x3b8592=_0x46be53[_0x17991b(0x209)](_0x10e99c,arguments);return _0x1ef816=null,_0x3b8592;}}else{const _0xf0bd80=_0x17991b(0x224)+_0x3f926a+'\x27',_0x14b2c1=await this['getContainer'](),{resources:_0x3e2bdf}=await _0x14b2c1[_0x17991b(0x1ef)][_0x17991b(0x216)](_0xf0bd80)[_0x17991b(0x22a)](),_0x3859e3=_0x3e2bdf,_0xf6122e=_0x3859e3[_0x17991b(0x21e)]===0x0?undefined:_0x3859e3[0x0];if(_0xf6122e&&_0xf6122e[_0x17991b(0x1f3)]){const _0x415550=(0x0,moment_1[_0x17991b(0x218)])()[_0x17991b(0x1f8)](),_0x3c61b5=(0x0,moment_1['default'])(_0xf6122e['saveOn'])['utc'](),_0x79aae2=_0x415550[_0x17991b(0x212)](_0x3c61b5,_0x3c8f6a[_0x17991b(0x215)]);if(_0x3c8f6a['ZrWwP'](_0x79aae2,core_config_1[_0x17991b(0x1ea)][_0x17991b(0x22d)]))return _0xf6122e;}return null;}}catch(_0x4c62cf){throw(0x0,errors_1[_0x17991b(0x1ec)])(_0x4c62cf,(0x0,errors_1['GET_SESSION_ERROR'])(_0x3f926a));}}async[a19_0x3c8a33(0x20b)](){const _0x5c49df=a19_0x3c8a33,_0x1a8518={'AEnNf':_0x5c49df(0x22c),'WqtIc':_0x5c49df(0x230),'vOlVG':function(_0x172102,_0x15e2aa){return _0x172102===_0x15e2aa;},'mbDXm':'aajLq'};try{if(_0x1a8518['vOlVG'](_0x1a8518[_0x5c49df(0x211)],'aajLq')){const _0x302773=await flow_creator_1['FlowCreator']['createDoc'](),_0x30fc4b=await this[_0x5c49df(0x232)]();return await _0x30fc4b['items'][_0x5c49df(0x20b)](_0x302773),_0x302773;}else(_0x5e2e15['runStatus']===_0x1a8518[_0x5c49df(0x22e)]||_0x22e276[_0x5c49df(0x1fe)]===_0x1a8518[_0x5c49df(0x237)])&&(_0x818502=null);}catch(_0x1806cd){throw(0x0,errors_1[_0x5c49df(0x1ec)])(_0x1806cd,(0x0,errors_1[_0x5c49df(0x204)])());}}async[a19_0x3c8a33(0x228)](_0x40e36c){const _0x138c5e=a19_0x3c8a33;try{const _0x40e2b2=await this[_0x138c5e(0x232)]();await _0x40e2b2['items'][_0x138c5e(0x225)](_0x40e36c);}catch(_0x301974){throw(0x0,errors_1['WrapError'])(_0x301974,(0x0,errors_1[_0x138c5e(0x201)])(_0x40e36c['id']));}}async['delete'](_0x16ed41){const _0x5cd049=a19_0x3c8a33,_0x2f1424={'neDkx':function(_0xac4631,_0x643d90){return _0xac4631!==_0x643d90;},'fnYiY':_0x5cd049(0x1e8),'nOeKv':_0x5cd049(0x1fa)};try{if(_0x2f1424[_0x5cd049(0x226)](_0x2f1424[_0x5cd049(0x200)],_0x2f1424[_0x5cd049(0x200)]))throw(0x0,_0x5d1e1b[_0x5cd049(0x1ec)])(_0x3686c9,(0x0,_0x19fb13['CREATE_SESSION_ERROR'])());else{const _0x32185b=await this['getContainer']();await _0x32185b[_0x5cd049(0x1fb)](_0x16ed41,_0x16ed41)[_0x5cd049(0x21d)]();}}catch(_0x4a8c56){_0x2f1424['nOeKv']!==_0x2f1424[_0x5cd049(0x220)]?_0x19cac2[_0x5cd049(0x1f2)]((0x0,_0x2ee61c[_0x5cd049(0x1ec)])(_0x276eb3,(0x0,_0x26b278[_0x5cd049(0x205)])(_0xeb6e6b))):console[_0x5cd049(0x1f2)]((0x0,errors_1[_0x5cd049(0x1ec)])(_0x4a8c56,(0x0,errors_1[_0x5cd049(0x205)])(_0x16ed41)));}}async[a19_0x3c8a33(0x232)](){const _0x44a073=a19_0x3c8a33,{database:_0x1c1b36}=await this[_0x44a073(0x20f)][_0x44a073(0x203)]['createIfNotExists']({'id':core_config_1[_0x44a073(0x1ea)][_0x44a073(0x20d)]}),{container:_0x31b98b}=await _0x1c1b36[_0x44a073(0x20c)][_0x44a073(0x214)]({'id':core_config_1[_0x44a073(0x1ea)][_0x44a073(0x236)]});return _0x31b98b;}}function a19_0x1041(){const _0x217eb9=['constructor','client','./session-adaptor','mbDXm','diff','toString','createIfNotExists','AGIms','query','3301710rIfhit','default','(((.+)+)+)+$','moment','vtDEk','bSqCR','delete','length','__esModule','nOeKv','jjyoS','restore','cosmoDbKey','SELECT\x20*\x20FROM\x20c\x20WHERE\x20c.id=\x27','upsert','neDkx','3DRMGeL','save','CDsmd','fetchAll','293612qUadXe','completed','sessionExpiration','AEnNf','xHqXR','aborted','CosmosClient','getContainer','defineProperty','tEcec','Cmifh','cosmoDbSessionId','WqtIc','../configs/core-config','__importDefault','5031460PYsWJF','cCWKa','uTjmC','SessionAdaptor','CoreConfig','1308510aMoPRG','WrapError','search','ZcyAl','items','jjUKT','XFVsN','error','saveOn','GET_SESSION_ERROR','hJDoq','seconds','CosmoSession','utc','4007025SaGDlr','NPkpL','item','oKWNZ','753980sgJuWb','runStatus','FSLnL','fnYiY','UPDATE_SESSION_ERROR','kIwwt','databases','CREATE_SESSION_ERROR','DELETE_SESSION_ERROR','KyxgD','fetch','jecCZ','apply','13922680LSZedY','create','containers','cosmoDbId'];a19_0x1041=function(){return _0x217eb9;};return a19_0x1041();}exports[a19_0x3c8a33(0x1f7)]=CosmoSession;
|
package/session/file-session.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a18_0x211115=a18_0x280d;(function(_0x5969da,_0x366896){const _0x2e37c0=a18_0x280d,_0x5f1947=_0x5969da();while(!![]){try{const _0x32ca09=parseInt(_0x2e37c0(0x198))/0x1+parseInt(_0x2e37c0(0x18c))/0x2*(-parseInt(_0x2e37c0(0x177))/0x3)+-parseInt(_0x2e37c0(0x18b))/0x4+-parseInt(_0x2e37c0(0x195))/0x5+-parseInt(_0x2e37c0(0x161))/0x6+parseInt(_0x2e37c0(0x149))/0x7+-parseInt(_0x2e37c0(0x174))/0x8*(-parseInt(_0x2e37c0(0x191))/0x9);if(_0x32ca09===_0x366896)break;else _0x5f1947['push'](_0x5f1947['shift']());}catch(_0x420f9a){_0x5f1947['push'](_0x5f1947['shift']());}}}(a18_0x1045,0x1afb3));const a18_0x3916c6=(function(){const _0x51fe70=a18_0x280d,_0x4b296={'AjDMn':_0x51fe70(0x179)};let _0x508cf4=!![];return function(_0x14a5d8,_0x523b65){const _0x4df0da={'jIYmZ':_0x4b296['AjDMn'],'sNJEq':'RGjUT'},_0x330723=_0x508cf4?function(){const _0x621f31=a18_0x280d;if(_0x523b65){if(_0x4df0da[_0x621f31(0x190)]===_0x4df0da[_0x621f31(0x175)])_0x2d1085=null;else{const _0x3dbfed=_0x523b65[_0x621f31(0x167)](_0x14a5d8,arguments);return _0x523b65=null,_0x3dbfed;}}}:function(){};return _0x508cf4=![],_0x330723;};}()),a18_0x556d3c=a18_0x3916c6(this,function(){const _0x436426=a18_0x280d,_0x3d20f5={'DMbDI':_0x436426(0x152)};return a18_0x556d3c[_0x436426(0x183)]()['search'](_0x3d20f5[_0x436426(0x187)])[_0x436426(0x183)]()[_0x436426(0x189)](a18_0x556d3c)[_0x436426(0x16c)](_0x3d20f5[_0x436426(0x187)]);});a18_0x556d3c();'use strict';var __createBinding=this&&this[a18_0x211115(0x144)]||(Object[a18_0x211115(0x170)]?function(_0x1476fb,_0x3e2c8a,_0x2bba4a,_0x2fabdd){const _0x295a19=a18_0x211115,_0x5a6d83={'VIMWV':function(_0x1af4f1,_0x2e40e7){return _0x1af4f1 in _0x2e40e7;},'vPuzr':_0x295a19(0x181),'MoRdA':_0x295a19(0x165),'TSvMn':_0x295a19(0x13c),'wUENx':function(_0x5e2ed2,_0x30180c){return _0x5e2ed2===_0x30180c;},'BcTxJ':function(_0x35db2b,_0x587806){return _0x35db2b!==_0x587806;},'gcMqZ':'DcyUP'};if(_0x5a6d83[_0x295a19(0x15c)](_0x2fabdd,undefined))_0x2fabdd=_0x2bba4a;var _0x2b0323=Object[_0x295a19(0x162)](_0x3e2c8a,_0x2bba4a);(!_0x2b0323||(_0x5a6d83[_0x295a19(0x159)](_0x5a6d83[_0x295a19(0x155)],_0x2b0323)?!_0x3e2c8a['__esModule']:_0x2b0323['writable']||_0x2b0323['configurable']))&&(_0x5a6d83[_0x295a19(0x17f)](_0x5a6d83[_0x295a19(0x194)],_0x5a6d83[_0x295a19(0x194)])?_0x12501['id']=_0x457376:_0x2b0323={'enumerable':!![],'get':function(){const _0x3a82e0=_0x295a19,_0x50d665={'dfZqh':function(_0xfa9095,_0xbf0ed4){return _0x5a6d83['VIMWV'](_0xfa9095,_0xbf0ed4);},'BBvHt':_0x5a6d83[_0x3a82e0(0x155)]};if(_0x5a6d83[_0x3a82e0(0x14d)]===_0x5a6d83[_0x3a82e0(0x18a)]){if(_0x373c6b===_0x4f823a)_0xe2f0ce=_0x802c64;var _0x24a2cb=_0x18fa3e[_0x3a82e0(0x162)](_0x3a7200,_0x37381f);(!_0x24a2cb||(_0x50d665[_0x3a82e0(0x156)](_0x50d665['BBvHt'],_0x24a2cb)?!_0x390177[_0x3a82e0(0x164)]:_0x24a2cb[_0x3a82e0(0x16f)]||_0x24a2cb[_0x3a82e0(0x18f)]))&&(_0x24a2cb={'enumerable':!![],'get':function(){return _0x3ddb68[_0x304517];}}),_0x411332[_0x3a82e0(0x199)](_0x4f02f7,_0xe4b10d,_0x24a2cb);}else return _0x3e2c8a[_0x2bba4a];}}),Object[_0x295a19(0x199)](_0x1476fb,_0x2fabdd,_0x2b0323);}:function(_0x4bc160,_0x5a98c2,_0x9f8435,_0x15ea4e){if(_0x15ea4e===undefined)_0x15ea4e=_0x9f8435;_0x4bc160[_0x15ea4e]=_0x5a98c2[_0x9f8435];}),__setModuleDefault=this&&this[a18_0x211115(0x142)]||(Object[a18_0x211115(0x170)]?function(_0x258337,_0x2adbbe){const _0x308487=a18_0x211115,_0x2cd0bc={'ULxml':_0x308487(0x153)};Object['defineProperty'](_0x258337,_0x2cd0bc[_0x308487(0x166)],{'enumerable':!![],'value':_0x2adbbe});}:function(_0x5f02c3,_0x121dd7){const _0x2342ae=a18_0x211115;_0x5f02c3[_0x2342ae(0x153)]=_0x121dd7;}),__importStar=this&&this[a18_0x211115(0x16a)]||function(_0x3ec71a){const _0x37274d=a18_0x211115,_0x38e109={'CmmJz':'4|1|0|3|2','KnsUW':function(_0x281abf,_0xb07043){return _0x281abf!==_0xb07043;},'PdlwB':function(_0x20de07,_0x52cd1f,_0x36fc9a,_0x467bc8){return _0x20de07(_0x52cd1f,_0x36fc9a,_0x467bc8);},'KxAJr':function(_0x122bf7,_0x3be2f6,_0x5f0a8b){return _0x122bf7(_0x3be2f6,_0x5f0a8b);}},_0x553879=_0x38e109[_0x37274d(0x140)]['split']('|');let _0x2dae8c=0x0;while(!![]){switch(_0x553879[_0x2dae8c++]){case'0':if(_0x3ec71a!=null){for(var _0x5920de in _0x3ec71a)if(_0x38e109[_0x37274d(0x182)](_0x5920de,'default')&&Object[_0x37274d(0x171)][_0x37274d(0x15e)][_0x37274d(0x150)](_0x3ec71a,_0x5920de))_0x38e109[_0x37274d(0x13f)](__createBinding,_0x2a7321,_0x3ec71a,_0x5920de);}continue;case'1':var _0x2a7321={};continue;case'2':return _0x2a7321;case'3':_0x38e109[_0x37274d(0x14c)](__setModuleDefault,_0x2a7321,_0x3ec71a);continue;case'4':if(_0x3ec71a&&_0x3ec71a['__esModule'])return _0x3ec71a;continue;}break;}};function a18_0x280d(_0xd36815,_0x1546aa){const _0x4a2930=a18_0x1045();return a18_0x280d=function(_0x556d3c,_0x3916c6){_0x556d3c=_0x556d3c-0x13c;let _0x10459d=_0x4a2930[_0x556d3c];return _0x10459d;},a18_0x280d(_0xd36815,_0x1546aa);}Object[a18_0x211115(0x199)](exports,'__esModule',{'value':!![]}),exports[a18_0x211115(0x17b)]=void 0x0;const fs=__importStar(require('fs')),path=__importStar(require(a18_0x211115(0x173))),errors_1=require('../utils/errors'),flow_creator_1=require(a18_0x211115(0x196)),session_adaptor_1=require('./session-adaptor');class FileSession extends session_adaptor_1[a18_0x211115(0x158)]{constructor(){const _0x19ea3c=a18_0x211115;super(),this[_0x19ea3c(0x141)]=path[_0x19ea3c(0x151)](__dirname,_0x19ea3c(0x17e));}async['fetch'](_0x20078c){const _0x5d04f2=a18_0x211115,_0x3eb5a0={'kJETR':'ClYGK','mxSTZ':_0x5d04f2(0x169),'CXxys':function(_0x5a6684,_0x585eca){return _0x5a6684===_0x585eca;},'Uqdlj':_0x5d04f2(0x157)};let _0x9932f1;if(_0x20078c){if(_0x3eb5a0[_0x5d04f2(0x168)]!==_0x3eb5a0[_0x5d04f2(0x16d)])_0x9932f1=await this[_0x5d04f2(0x197)](_0x20078c),_0x9932f1&&((_0x3eb5a0[_0x5d04f2(0x146)](_0x9932f1[_0x5d04f2(0x192)],_0x3eb5a0[_0x5d04f2(0x15b)])||_0x3eb5a0[_0x5d04f2(0x146)](_0x9932f1[_0x5d04f2(0x192)],_0x5d04f2(0x185)))&&(_0x9932f1=null));else return null;}if(_0x9932f1)return _0x9932f1['id']=_0x20078c,[![],_0x9932f1];else{const _0x580725=await this[_0x5d04f2(0x170)]();return this[_0x5d04f2(0x141)]=path[_0x5d04f2(0x151)](__dirname,_0x5d04f2(0x13e)+_0x580725['id']+_0x5d04f2(0x184)),[!![],_0x580725];}}async['fetchAll'](_0x2df7eb){const _0x589290=a18_0x211115,_0x3dc000={'fRpCN':_0x589290(0x17d),'kgfru':function(_0xadd505,_0x544a2c){return _0xadd505!==_0x544a2c;},'ExRjG':'mYwuX','ciIQD':_0x589290(0x16b)};let _0x48294a;_0x2df7eb&&(_0x3dc000[_0x589290(0x16e)](_0x3dc000[_0x589290(0x18e)],_0x3dc000['ExRjG'])?_0x3a5b0a[_0x589290(0x18d)](_0x3dc000['fRpCN'],_0x399c31):_0x48294a=await this[_0x589290(0x197)](_0x2df7eb));if(_0x48294a){if(_0x3dc000[_0x589290(0x147)]!==_0x3dc000[_0x589290(0x147)]){this[_0x589290(0x141)]=_0x15a237['join'](_0x4d4349,_0x589290(0x13e)+_0x441bdd+_0x589290(0x184));const _0x2a101a=_0xf078e3[_0x589290(0x15f)](this[_0x589290(0x141)],_0x589290(0x143)),_0x26524f=_0x2eff24['parse'](_0x2a101a);return _0x26524f;}else _0x48294a['id']=_0x2df7eb;}return _0x48294a;}async[a18_0x211115(0x170)](){const _0xb3be1c=await flow_creator_1['FlowCreator']['createDoc']();return _0xb3be1c;}async[a18_0x211115(0x197)](_0x33c551){const _0x28e789=a18_0x211115,_0x1d245d={'Yjtrf':'ugFhk','YSAfp':'utf-8'};try{if(_0x1d245d[_0x28e789(0x172)]!==_0x1d245d[_0x28e789(0x172)]){if(_0x326d82){const _0x1cecd8=_0x369892[_0x28e789(0x167)](_0x672d21,arguments);return _0x4e9e1f=null,_0x1cecd8;}}else{this[_0x28e789(0x141)]=path['join'](__dirname,_0x28e789(0x13e)+_0x33c551+_0x28e789(0x184));const _0x4794f7=fs[_0x28e789(0x15f)](this[_0x28e789(0x141)],_0x1d245d[_0x28e789(0x145)]),_0x4179ae=JSON[_0x28e789(0x148)](_0x4794f7);return _0x4179ae;}}catch(_0x388f75){return null;}}async[a18_0x211115(0x14f)](_0x2a50e9){const _0x3ce78c=a18_0x211115,_0x5d1a3c={'Nhocq':'2|0|3|1|4','onGQy':function(_0x54f2ee,_0x2fd3a5,_0x404570){return _0x54f2ee(_0x2fd3a5,_0x404570);},'qCYie':function(_0x4932e2,_0x522b76){return _0x4932e2!=_0x522b76;},'WVumt':function(_0x36fe1d,_0x346ae9){return _0x36fe1d!==_0x346ae9;},'JwdnY':_0x3ce78c(0x153),'OctMh':_0x3ce78c(0x13d)};try{if(_0x3ce78c(0x13d)===_0x5d1a3c['OctMh']){const _0x1bf4a9=path[_0x3ce78c(0x154)](this[_0x3ce78c(0x141)]);!fs[_0x3ce78c(0x180)](_0x1bf4a9)&&fs['mkdirSync'](_0x1bf4a9,{'recursive':!![]}),fs[_0x3ce78c(0x15a)](this[_0x3ce78c(0x141)],JSON[_0x3ce78c(0x14a)](_0x2a50e9),_0x3ce78c(0x143));}else{const _0xcad6b0=_0x5d1a3c[_0x3ce78c(0x160)][_0x3ce78c(0x14b)]('|');let _0x8a5a2a=0x0;while(!![]){switch(_0xcad6b0[_0x8a5a2a++]){case'0':var _0x123a12={};continue;case'1':_0x5d1a3c[_0x3ce78c(0x176)](_0xd05ca9,_0x123a12,_0x3ada36);continue;case'2':if(_0x1340a8&&_0x46f6cc[_0x3ce78c(0x164)])return _0x320fc2;continue;case'3':if(_0x5d1a3c[_0x3ce78c(0x15d)](_0x2e4965,null)){for(var _0x5748c5 in _0x4e08e0)if(_0x5d1a3c[_0x3ce78c(0x193)](_0x5748c5,_0x5d1a3c[_0x3ce78c(0x163)])&&_0x316624[_0x3ce78c(0x171)][_0x3ce78c(0x15e)]['call'](_0x2f8ea2,_0x5748c5))_0x4f5201(_0x123a12,_0x4824af,_0x5748c5);}continue;case'4':return _0x123a12;}break;}}}catch(_0x587a10){console[_0x3ce78c(0x18d)](_0x3ce78c(0x17d),_0x587a10);}}async['delete'](_0x5e73cf){const _0x46c9fe=a18_0x211115,_0x320b78={'uapnm':function(_0x17dffb,_0x8f4a7b){return _0x17dffb===_0x8f4a7b;},'JtlWL':_0x46c9fe(0x17c),'loMQv':_0x46c9fe(0x188)};try{if(_0x320b78[_0x46c9fe(0x17a)](_0x320b78[_0x46c9fe(0x178)],_0x320b78[_0x46c9fe(0x186)]))return _0x46f21f['id']=_0x1be25b,[![],_0x3906b4];else await fs['unlink'](this[_0x46c9fe(0x141)],_0x41115e=>{});}catch(_0x55fc5c){console[_0x46c9fe(0x18d)]((0x0,errors_1['WrapError'])(_0x55fc5c,(0x0,errors_1[_0x46c9fe(0x14e)])(_0x5e73cf)));}}}exports[a18_0x211115(0x17b)]=FileSession;function a18_0x1045(){const _0x821ed=['default','dirname','vPuzr','dfZqh','completed','SessionAdaptor','VIMWV','writeFileSync','Uqdlj','wUENx','qCYie','hasOwnProperty','readFileSync','Nhocq','365316plCCpJ','getOwnPropertyDescriptor','JwdnY','__esModule','vNwRl','ULxml','apply','kJETR','lksEY','__importStar','hLDco','search','mxSTZ','kgfru','writable','create','prototype','Yjtrf','path','5296JXXPKh','sNJEq','onGQy','168pZgWpw','JtlWL','CmDpu','uapnm','FileSession','BoLkV','Error\x20saving\x20messages:','session.json','BcTxJ','existsSync','get','KnsUW','toString','/session.json','aborted','loMQv','DMbDI','oelUh','constructor','TSvMn','348168uuRToH','62eZLEdN','error','ExRjG','configurable','jIYmZ','252WkyodZ','runStatus','WVumt','gcMqZ','244830hWDmyn','../flow/flow-creator','restore','215618gFlnpT','defineProperty','DCZNq','HUBlz','../../ignore/','PdlwB','CmmJz','filePath','__setModuleDefault','utf-8','__createBinding','YSAfp','CXxys','ciIQD','parse','524937LCXitA','stringify','split','KxAJr','MoRdA','DELETE_SESSION_ERROR','save','call','join','(((.+)+)+)+$'];a18_0x1045=function(){return _0x821ed;};return a18_0x1045();}
|
|
1
|
+
const a20_0x2ecefc=a20_0x3e19;function a20_0x3e19(_0x3597ce,_0x2ebf74){const _0x5c59dd=a20_0x15d8();return a20_0x3e19=function(_0x59ca3c,_0x3e06ae){_0x59ca3c=_0x59ca3c-0x1be;let _0x15d860=_0x5c59dd[_0x59ca3c];return _0x15d860;},a20_0x3e19(_0x3597ce,_0x2ebf74);}(function(_0x335061,_0x1c5acb){const _0x548f3d=a20_0x3e19,_0xad292a=_0x335061();while(!![]){try{const _0x364e1a=parseInt(_0x548f3d(0x1c1))/0x1*(-parseInt(_0x548f3d(0x219))/0x2)+-parseInt(_0x548f3d(0x1dd))/0x3+-parseInt(_0x548f3d(0x1c6))/0x4*(parseInt(_0x548f3d(0x200))/0x5)+-parseInt(_0x548f3d(0x1f2))/0x6*(-parseInt(_0x548f3d(0x205))/0x7)+parseInt(_0x548f3d(0x1ed))/0x8+-parseInt(_0x548f3d(0x1d5))/0x9+parseInt(_0x548f3d(0x20e))/0xa*(parseInt(_0x548f3d(0x20b))/0xb);if(_0x364e1a===_0x1c5acb)break;else _0xad292a['push'](_0xad292a['shift']());}catch(_0x5f53c7){_0xad292a['push'](_0xad292a['shift']());}}}(a20_0x15d8,0x97499));const a20_0x3e06ae=(function(){const _0x1390df=a20_0x3e19,_0x2ee349={'yQmJZ':_0x1390df(0x215)};let _0x5c8551=!![];return function(_0x469d6f,_0x298519){const _0x35f106=_0x1390df;if(_0x2ee349[_0x35f106(0x1dc)]===_0x2ee349[_0x35f106(0x1dc)]){const _0x25daeb=_0x5c8551?function(){if(_0x298519){const _0x2f97be=_0x298519['apply'](_0x469d6f,arguments);return _0x298519=null,_0x2f97be;}}:function(){};return _0x5c8551=![],_0x25daeb;}else return _0x36a44e['id']=_0x33105c,[![],_0x420c2];};}()),a20_0x59ca3c=a20_0x3e06ae(this,function(){const _0x47877a=a20_0x3e19,_0x4c17c1={'TdlWh':'(((.+)+)+)+$'};return a20_0x59ca3c[_0x47877a(0x1e7)]()['search'](_0x4c17c1[_0x47877a(0x201)])['toString']()[_0x47877a(0x1da)](a20_0x59ca3c)['search'](_0x4c17c1[_0x47877a(0x201)]);});a20_0x59ca3c();'use strict';var __createBinding=this&&this[a20_0x2ecefc(0x1ec)]||(Object[a20_0x2ecefc(0x1d4)]?function(_0x2baa7d,_0x3b12f7,_0x34eeb0,_0xf5eedc){const _0x5c3545=a20_0x2ecefc,_0x345fd9={'IZONf':function(_0x210fbf,_0xe59365){return _0x210fbf!==_0xe59365;},'kAcDr':_0x5c3545(0x1fd),'ACwaa':_0x5c3545(0x212),'pOqxk':function(_0x2468ec,_0x166d29){return _0x2468ec in _0x166d29;},'hSIUv':_0x5c3545(0x1ef)};if(_0xf5eedc===undefined)_0xf5eedc=_0x34eeb0;var _0x115325=Object[_0x5c3545(0x1e4)](_0x3b12f7,_0x34eeb0);(!_0x115325||(_0x345fd9[_0x5c3545(0x1d8)](_0x345fd9[_0x5c3545(0x1e3)],_0x115325)?!_0x3b12f7[_0x5c3545(0x1d9)]:_0x115325['writable']||_0x115325[_0x5c3545(0x1cd)]))&&(_0x115325={'enumerable':!![],'get':function(){const _0x1a3899=_0x5c3545;if(_0x345fd9['IZONf'](_0x345fd9[_0x1a3899(0x207)],_0x345fd9[_0x1a3899(0x1c9)]))return _0x3b12f7[_0x34eeb0];else{const _0x266839=_0x474210?function(){if(_0x37760b){const _0x214f21=_0x44080e['apply'](_0x80c4d5,arguments);return _0x1247e3=null,_0x214f21;}}:function(){};return _0x480ae3=![],_0x266839;}}}),Object[_0x5c3545(0x1fe)](_0x2baa7d,_0xf5eedc,_0x115325);}:function(_0x193973,_0x137a3b,_0x4f86cb,_0x1b5197){if(_0x1b5197===undefined)_0x1b5197=_0x4f86cb;_0x193973[_0x1b5197]=_0x137a3b[_0x4f86cb];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a20_0x2ecefc(0x1d4)]?function(_0x212264,_0x5c819c){const _0x25e46a=a20_0x2ecefc;Object[_0x25e46a(0x1fe)](_0x212264,_0x25e46a(0x206),{'enumerable':!![],'value':_0x5c819c});}:function(_0x3aab55,_0x3e6c27){const _0x13309b=a20_0x2ecefc;_0x3aab55[_0x13309b(0x206)]=_0x3e6c27;}),__importStar=this&&this[a20_0x2ecefc(0x1c3)]||function(_0x2ecf93){const _0x17640c=a20_0x2ecefc,_0x150f3c={'AqOjq':function(_0x6b180,_0x3abc8b){return _0x6b180!=_0x3abc8b;},'hWeUq':function(_0x46a9b2,_0x96f3c0){return _0x46a9b2!==_0x96f3c0;},'aWtJb':_0x17640c(0x206),'Swlmi':function(_0x41d2ad,_0x3f09d7,_0x25c377,_0xe573aa){return _0x41d2ad(_0x3f09d7,_0x25c377,_0xe573aa);},'TxVgs':function(_0x4234df,_0x38e2ce,_0x48241a){return _0x4234df(_0x38e2ce,_0x48241a);}},_0x35317d='2|1|0|3|4'[_0x17640c(0x1be)]('|');let _0x424a5e=0x0;while(!![]){switch(_0x35317d[_0x424a5e++]){case'0':if(_0x150f3c[_0x17640c(0x217)](_0x2ecf93,null)){for(var _0x216e40 in _0x2ecf93)if(_0x150f3c['hWeUq'](_0x216e40,_0x150f3c[_0x17640c(0x218)])&&Object[_0x17640c(0x1c5)][_0x17640c(0x21a)][_0x17640c(0x1ea)](_0x2ecf93,_0x216e40))_0x150f3c[_0x17640c(0x210)](__createBinding,_0xddfb52,_0x2ecf93,_0x216e40);}continue;case'1':var _0xddfb52={};continue;case'2':if(_0x2ecf93&&_0x2ecf93[_0x17640c(0x1d9)])return _0x2ecf93;continue;case'3':_0x150f3c[_0x17640c(0x20c)](__setModuleDefault,_0xddfb52,_0x2ecf93);continue;case'4':return _0xddfb52;}break;}};Object['defineProperty'](exports,a20_0x2ecefc(0x1d9),{'value':!![]}),exports['FileSession']=void 0x0;const fs=__importStar(require('fs')),path=__importStar(require(a20_0x2ecefc(0x1cc))),errors_1=require(a20_0x2ecefc(0x1f4)),flow_creator_1=require(a20_0x2ecefc(0x1de)),session_adaptor_1=require('./session-adaptor');class FileSession extends session_adaptor_1[a20_0x2ecefc(0x1e1)]{constructor(){const _0x5c735f=a20_0x2ecefc;super(),this[_0x5c735f(0x20a)]=path[_0x5c735f(0x1f0)](__dirname,'session.json');}async['fetch'](_0x20fc55){const _0x1b6034=a20_0x2ecefc,_0x2c72bb={'qcCQn':function(_0x31b8d2,_0x550799){return _0x31b8d2!==_0x550799;},'VrhlG':function(_0x426b73,_0x3e7ebf,_0x119284,_0x34080d){return _0x426b73(_0x3e7ebf,_0x119284,_0x34080d);},'xiUhF':function(_0x57bf7b,_0x34fe47,_0x2b59a1){return _0x57bf7b(_0x34fe47,_0x2b59a1);},'Ubbqk':_0x1b6034(0x206),'ApmNP':_0x1b6034(0x1bf),'vnpES':function(_0x28b498,_0x2c5999){return _0x28b498===_0x2c5999;},'iQmLM':_0x1b6034(0x1f1),'tpuKa':_0x1b6034(0x1ff),'mEESi':function(_0x3dbbb1,_0x4f548c){return _0x3dbbb1!==_0x4f548c;},'NrFnp':_0x1b6034(0x1ca)};let _0x4692f7;if(_0x20fc55){_0x4692f7=await this[_0x1b6034(0x1c0)](_0x20fc55);if(_0x4692f7){if(_0x2c72bb[_0x1b6034(0x1c8)](_0x2c72bb[_0x1b6034(0x1ee)],_0x2c72bb[_0x1b6034(0x1ee)])){if(_0x3ca7ff&&_0x22f32f[_0x1b6034(0x1d9)])return _0x58a16e;var _0x30a544={};if(_0x4fa17e!=null){for(var _0x5a71af in _0x1b0b5b)if(_0x2c72bb[_0x1b6034(0x1c8)](_0x5a71af,_0x1b6034(0x206))&&_0x52e350[_0x1b6034(0x1c5)][_0x1b6034(0x21a)]['call'](_0x98ca01,_0x5a71af))_0x2c72bb[_0x1b6034(0x1f6)](_0xbfe91,_0x30a544,_0x46af48,_0x5a71af);}return _0x2c72bb[_0x1b6034(0x1f7)](_0x50163e,_0x30a544,_0x365e84),_0x30a544;}else(_0x2c72bb[_0x1b6034(0x211)](_0x4692f7[_0x1b6034(0x20f)],_0x2c72bb[_0x1b6034(0x1ce)])||_0x2c72bb['vnpES'](_0x4692f7[_0x1b6034(0x20f)],_0x2c72bb[_0x1b6034(0x202)]))&&(_0x4692f7=null);}}if(_0x4692f7)return _0x4692f7['id']=_0x20fc55,[![],_0x4692f7];else{if(_0x2c72bb[_0x1b6034(0x1d6)](_0x2c72bb[_0x1b6034(0x214)],_0x2c72bb['NrFnp']))_0x119cc9['defineProperty'](_0x11e038,_0x2c72bb[_0x1b6034(0x1f9)],{'enumerable':!![],'value':_0x258653});else{const _0x130a39=await this[_0x1b6034(0x1d4)]();return this[_0x1b6034(0x20a)]=path['join'](__dirname,_0x1b6034(0x1d1)+_0x130a39['id']+'/session.json'),[!![],_0x130a39];}}}async[a20_0x2ecefc(0x1e0)](_0x6659c2){const _0x548c28=a20_0x2ecefc;let _0x4bf107;return _0x6659c2&&(_0x4bf107=await this[_0x548c28(0x1c0)](_0x6659c2)),_0x4bf107&&(_0x4bf107['id']=_0x6659c2),_0x4bf107;}async[a20_0x2ecefc(0x1d4)](){const _0x4f9874=a20_0x2ecefc,_0x50e004=await flow_creator_1[_0x4f9874(0x20d)][_0x4f9874(0x1fc)]();return _0x50e004;}async[a20_0x2ecefc(0x1c0)](_0x49b6ec){const _0x4fe898=a20_0x2ecefc,_0x1b1314={'ENVcC':_0x4fe898(0x1d3),'YVLxZ':_0x4fe898(0x1c7),'CnqLz':function(_0x36eed2,_0x12ec49){return _0x36eed2!==_0x12ec49;},'QACkK':_0x4fe898(0x1fb)};try{if(_0x4fe898(0x1e2)===_0x1b1314[_0x4fe898(0x203)])_0x420f90[_0x4fe898(0x1f8)](_0xa7f056,{'recursive':!![]});else{this[_0x4fe898(0x20a)]=path[_0x4fe898(0x1f0)](__dirname,_0x4fe898(0x1d1)+_0x49b6ec+_0x4fe898(0x213));const _0x183a53=fs[_0x4fe898(0x1d7)](this[_0x4fe898(0x20a)],_0x1b1314[_0x4fe898(0x1c2)]),_0x1874ba=JSON[_0x4fe898(0x1fa)](_0x183a53);return _0x1874ba;}}catch(_0x2ae80e){if(_0x1b1314['CnqLz'](_0x1b1314['QACkK'],_0x1b1314[_0x4fe898(0x1c4)])){if(_0x1e4a97){const _0xd625a2=_0x36a0dd[_0x4fe898(0x208)](_0x5522f7,arguments);return _0x277c71=null,_0xd625a2;}}else return null;}}async[a20_0x2ecefc(0x216)](_0x2faa68){const _0x3d82d9=a20_0x2ecefc,_0x2b115e={'BcomR':function(_0x1a2773,_0x5f389b){return _0x1a2773===_0x5f389b;},'ENMxx':_0x3d82d9(0x1ff),'JlJXh':_0x3d82d9(0x1c7),'UEXaV':function(_0x33f20e,_0x48813c){return _0x33f20e!==_0x48813c;},'wJcuh':_0x3d82d9(0x1d2),'yzLMu':_0x3d82d9(0x1db)};try{const _0x25b3ca=path[_0x3d82d9(0x1f3)](this['filePath']);!fs[_0x3d82d9(0x1e9)](_0x25b3ca)&&fs[_0x3d82d9(0x1f8)](_0x25b3ca,{'recursive':!![]}),fs['writeFileSync'](this['filePath'],JSON[_0x3d82d9(0x1e8)](_0x2faa68),_0x2b115e[_0x3d82d9(0x1e5)]);}catch(_0xc920cb){_0x2b115e[_0x3d82d9(0x1df)](_0x3d82d9(0x1d2),_0x2b115e[_0x3d82d9(0x1e6)])?(_0x2b115e[_0x3d82d9(0x209)](_0x1a1b11[_0x3d82d9(0x20f)],_0x3d82d9(0x1f1))||_0x506814[_0x3d82d9(0x20f)]===_0x2b115e[_0x3d82d9(0x1f5)])&&(_0x1b7b62=null):console[_0x3d82d9(0x1d0)](_0x2b115e[_0x3d82d9(0x204)],_0xc920cb);}}async[a20_0x2ecefc(0x1eb)](_0xdf5fb7){const _0x5531dd=a20_0x2ecefc;try{await fs[_0x5531dd(0x1cf)](this[_0x5531dd(0x20a)],_0x465578=>{});}catch(_0x40f0b6){console[_0x5531dd(0x1d0)]((0x0,errors_1['WrapError'])(_0x40f0b6,(0x0,errors_1[_0x5531dd(0x1cb)])(_0xdf5fb7)));}}}function a20_0x15d8(){const _0x10ff78=['puurW','create','8518104qNxqke','mEESi','readFileSync','pOqxk','__esModule','constructor','Error\x20saving\x20messages:','yQmJZ','1562799vPzDnM','../flow/flow-creator','UEXaV','fetchAll','SessionAdaptor','OPKiP','hSIUv','getOwnPropertyDescriptor','JlJXh','wJcuh','toString','stringify','existsSync','call','delete','__createBinding','9842880EWmvLg','ApmNP','get','join','completed','811914qxYLeG','dirname','../utils/errors','ENMxx','VrhlG','xiUhF','mkdirSync','Ubbqk','parse','VCdwQ','createDoc','IjHPr','defineProperty','aborted','4655765MspKLu','TdlWh','tpuKa','ENVcC','yzLMu','49hPQeev','default','kAcDr','apply','BcomR','filePath','3817GhwgpL','TxVgs','FlowCreator','57450xcERVb','runStatus','Swlmi','vnpES','exxaW','/session.json','NrFnp','CRmJi','save','AqOjq','aWtJb','2pnMMIg','hasOwnProperty','split','JuVvq','restore','1152893CrAsOR','YVLxZ','__importStar','QACkK','prototype','4NGAMEn','utf-8','qcCQn','ACwaa','rTvdz','DELETE_SESSION_ERROR','path','configurable','iQmLM','unlink','error','../../ignore/','QGTHf'];a20_0x15d8=function(){return _0x10ff78;};return a20_0x15d8();}exports['FileSession']=FileSession;
|