@quukk/opencode-clawmessenger 0.3.0 → 1.0.4
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 +71 -623
- package/bin/opencode-clawmessenger +2 -2
- package/bin/opencode-clawmessenger-setup +5 -5
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +1 -288
- package/dist/core/auto-register.d.ts +0 -1
- package/dist/core/auto-register.js +1 -174
- package/dist/core/auto-serve.d.ts +13 -0
- package/dist/core/auto-serve.js +1 -0
- package/dist/core/config.d.ts +2 -3
- package/dist/core/config.js +1 -80
- package/dist/core/daemon.d.ts +0 -1
- package/dist/core/daemon.js +1 -77
- package/dist/core/dedup.d.ts +0 -1
- package/dist/core/dedup.js +1 -25
- package/dist/core/hook-manager.d.ts +0 -1
- package/dist/core/hook-manager.js +1 -33
- package/dist/core/logger.d.ts +0 -1
- package/dist/core/logger.js +1 -49
- package/dist/core/mac-address.d.ts +0 -1
- package/dist/core/mac-address.js +1 -43
- package/dist/core/message-handler.d.ts +0 -1
- package/dist/core/message-handler.js +1 -988
- package/dist/core/ops-assistant.d.ts +0 -1
- package/dist/core/ops-assistant.js +1 -270
- package/dist/core/qr-crypto.d.ts +0 -1
- package/dist/core/qr-crypto.js +1 -66
- package/dist/core/session-manager.d.ts +0 -1
- package/dist/core/session-manager.js +1 -144
- package/dist/core/types.d.ts +1 -2
- package/dist/core/types.js +1 -26
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -16
- package/dist/openclaw/client.d.ts +0 -1
- package/dist/openclaw/client.js +1 -494
- package/dist/opencode/client.d.ts +0 -1
- package/dist/opencode/client.js +1 -279
- package/dist/opencode/event-handler.d.ts +0 -1
- package/dist/opencode/event-handler.js +1 -467
- package/dist/plugin.d.ts +0 -1
- package/dist/plugin.js +1 -148
- package/dist/rongcloud/client.d.ts +0 -1
- package/dist/rongcloud/client.js +1 -292
- package/dist/rongcloud/env-polyfill.d.ts +0 -1
- package/dist/rongcloud/env-polyfill.js +1 -107
- package/dist/rongcloud/server-api.d.ts +0 -1
- package/dist/rongcloud/server-api.js +1 -157
- package/dist/standalone.d.ts +0 -1
- package/dist/standalone.js +1 -229
- package/dist/types/plugin.d.ts +0 -1
- package/dist/types/plugin.js +1 -2
- package/dist/websocket/client.d.ts +0 -1
- package/dist/websocket/client.js +1 -88
- package/dist/websocket/server-client.d.ts +0 -1
- package/dist/websocket/server-client.js +1 -98
- package/package.json +83 -81
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/core/auto-register.d.ts.map +0 -1
- package/dist/core/auto-register.js.map +0 -1
- package/dist/core/config.d.ts.map +0 -1
- package/dist/core/config.js.map +0 -1
- package/dist/core/daemon.d.ts.map +0 -1
- package/dist/core/daemon.js.map +0 -1
- package/dist/core/dedup.d.ts.map +0 -1
- package/dist/core/dedup.js.map +0 -1
- package/dist/core/hook-manager.d.ts.map +0 -1
- package/dist/core/hook-manager.js.map +0 -1
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/logger.js.map +0 -1
- package/dist/core/mac-address.d.ts.map +0 -1
- package/dist/core/mac-address.js.map +0 -1
- package/dist/core/message-handler.d.ts.map +0 -1
- package/dist/core/message-handler.js.map +0 -1
- package/dist/core/ops-assistant.d.ts.map +0 -1
- package/dist/core/ops-assistant.js.map +0 -1
- package/dist/core/qr-crypto.d.ts.map +0 -1
- package/dist/core/qr-crypto.js.map +0 -1
- package/dist/core/session-manager.d.ts.map +0 -1
- package/dist/core/session-manager.js.map +0 -1
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/openclaw/client.d.ts.map +0 -1
- package/dist/openclaw/client.js.map +0 -1
- package/dist/opencode/client.d.ts.map +0 -1
- package/dist/opencode/client.js.map +0 -1
- package/dist/opencode/event-handler.d.ts.map +0 -1
- package/dist/opencode/event-handler.js.map +0 -1
- package/dist/plugin.d.ts.map +0 -1
- package/dist/plugin.js.map +0 -1
- package/dist/rongcloud/client.d.ts.map +0 -1
- package/dist/rongcloud/client.js.map +0 -1
- package/dist/rongcloud/env-polyfill.d.ts.map +0 -1
- package/dist/rongcloud/env-polyfill.js.map +0 -1
- package/dist/rongcloud/server-api.d.ts.map +0 -1
- package/dist/rongcloud/server-api.js.map +0 -1
- package/dist/standalone.d.ts.map +0 -1
- package/dist/standalone.js.map +0 -1
- package/dist/types/plugin.d.ts.map +0 -1
- package/dist/types/plugin.js.map +0 -1
- package/dist/websocket/client.d.ts.map +0 -1
- package/dist/websocket/client.js.map +0 -1
- package/dist/websocket/server-client.d.ts.map +0 -1
- package/dist/websocket/server-client.js.map +0 -1
package/dist/core/config.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare const ClawMessengerConfigSchema: z.ZodObject<{
|
|
|
7
7
|
accountId: z.ZodOptional<z.ZodString>;
|
|
8
8
|
nodeName: z.ZodOptional<z.ZodString>;
|
|
9
9
|
serverUrl: z.ZodDefault<z.ZodString>;
|
|
10
|
-
opencodeUrl: z.
|
|
10
|
+
opencodeUrl: z.ZodOptional<z.ZodString>;
|
|
11
11
|
opencodeDir: z.ZodOptional<z.ZodString>;
|
|
12
12
|
opencodePassword: z.ZodOptional<z.ZodString>;
|
|
13
13
|
apiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -24,13 +24,13 @@ declare const ClawMessengerConfigSchema: z.ZodObject<{
|
|
|
24
24
|
}>>;
|
|
25
25
|
}, "strip", z.ZodTypeAny, {
|
|
26
26
|
serverUrl: string;
|
|
27
|
-
opencodeUrl: string;
|
|
28
27
|
chatTimeout: number;
|
|
29
28
|
nodeName?: string | undefined;
|
|
30
29
|
token?: string | undefined;
|
|
31
30
|
appKey?: string | undefined;
|
|
32
31
|
appSecret?: string | undefined;
|
|
33
32
|
accountId?: string | undefined;
|
|
33
|
+
opencodeUrl?: string | undefined;
|
|
34
34
|
opencodeDir?: string | undefined;
|
|
35
35
|
opencodePassword?: string | undefined;
|
|
36
36
|
apiBaseUrl?: string | undefined;
|
|
@@ -65,4 +65,3 @@ export declare class ConfigManager {
|
|
|
65
65
|
exists(): boolean;
|
|
66
66
|
}
|
|
67
67
|
export { ClawMessengerConfigSchema };
|
|
68
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dist/core/config.js
CHANGED
|
@@ -1,80 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'fs';
|
|
3
|
-
import { join, dirname } from 'path';
|
|
4
|
-
import { homedir } from 'os';
|
|
5
|
-
import { getServerUrl } from './auto-register.js';
|
|
6
|
-
const ClawMessengerConfigSchema = z.object({
|
|
7
|
-
appKey: z.string().min(1).optional(),
|
|
8
|
-
appSecret: z.string().optional(),
|
|
9
|
-
token: z.string().optional(),
|
|
10
|
-
accountId: z.string().optional(),
|
|
11
|
-
nodeName: z.string().optional(),
|
|
12
|
-
serverUrl: z.string().default(getServerUrl()),
|
|
13
|
-
opencodeUrl: z.string().default('http://127.0.0.1:4096'),
|
|
14
|
-
opencodeDir: z.string().optional(),
|
|
15
|
-
opencodePassword: z.string().optional(),
|
|
16
|
-
apiBaseUrl: z.string().optional(),
|
|
17
|
-
chatTimeout: z.number().min(1).default(600),
|
|
18
|
-
hooks: z.object({
|
|
19
|
-
onSessionCreated: z.string().optional(),
|
|
20
|
-
onSessionIdle: z.string().optional(),
|
|
21
|
-
}).optional(),
|
|
22
|
-
});
|
|
23
|
-
export class ConfigManager {
|
|
24
|
-
constructor(configPath) {
|
|
25
|
-
this.configPath = configPath || join(homedir(), '.config', 'opencode', 'clawmessenger.json');
|
|
26
|
-
}
|
|
27
|
-
load() {
|
|
28
|
-
if (this.config)
|
|
29
|
-
return this.config;
|
|
30
|
-
let fileConfig = {};
|
|
31
|
-
if (existsSync(this.configPath)) {
|
|
32
|
-
try {
|
|
33
|
-
fileConfig = JSON.parse(readFileSync(this.configPath, 'utf-8'));
|
|
34
|
-
}
|
|
35
|
-
catch { }
|
|
36
|
-
}
|
|
37
|
-
const envConfig = {
|
|
38
|
-
appKey: process.env.CLAW_APP_KEY,
|
|
39
|
-
appSecret: process.env.CLAW_APP_SECRET,
|
|
40
|
-
token: process.env.CLAW_TOKEN,
|
|
41
|
-
accountId: process.env.CLAW_ACCOUNT_ID,
|
|
42
|
-
serverUrl: process.env.DM_SERVER_URL,
|
|
43
|
-
opencodeUrl: process.env.CLAW_OPENCODE_URL,
|
|
44
|
-
opencodeDir: process.env.CLAW_OPENCODE_DIR,
|
|
45
|
-
opencodePassword: process.env.OPENCODE_SERVER_PASSWORD,
|
|
46
|
-
apiBaseUrl: process.env.CLAW_API_BASE_URL,
|
|
47
|
-
chatTimeout: process.env.CLAW_CHAT_TIMEOUT ? parseInt(process.env.CLAW_CHAT_TIMEOUT, 10) : undefined,
|
|
48
|
-
};
|
|
49
|
-
for (const [k, v] of Object.entries(envConfig)) {
|
|
50
|
-
if (v !== undefined && v !== '') {
|
|
51
|
-
fileConfig[k] = v;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
this.config = ClawMessengerConfigSchema.parse(fileConfig);
|
|
55
|
-
return this.config;
|
|
56
|
-
}
|
|
57
|
-
save(config) {
|
|
58
|
-
const dir = dirname(this.configPath);
|
|
59
|
-
if (!existsSync(dir))
|
|
60
|
-
mkdirSync(dir, { recursive: true });
|
|
61
|
-
let existing = {};
|
|
62
|
-
if (existsSync(this.configPath)) {
|
|
63
|
-
try {
|
|
64
|
-
existing = JSON.parse(readFileSync(this.configPath, 'utf-8'));
|
|
65
|
-
}
|
|
66
|
-
catch { }
|
|
67
|
-
}
|
|
68
|
-
const merged = { ...existing, ...config };
|
|
69
|
-
writeFileSync(this.configPath, JSON.stringify(merged, null, 2));
|
|
70
|
-
this.config = undefined;
|
|
71
|
-
}
|
|
72
|
-
getConfigPath() {
|
|
73
|
-
return this.configPath;
|
|
74
|
-
}
|
|
75
|
-
exists() {
|
|
76
|
-
return existsSync(this.configPath);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
export { ClawMessengerConfigSchema };
|
|
80
|
-
//# sourceMappingURL=config.js.map
|
|
1
|
+
const a0_0x12339a=a0_0x1c86;function a0_0x1c86(_0x34f3d8,_0x43a0c8){_0x34f3d8=_0x34f3d8-0x1a5;const _0x7fd750=a0_0x7fd7();let _0x1c86fc=_0x7fd750[_0x34f3d8];if(a0_0x1c86['oquglZ']===undefined){var _0x33c7d4=function(_0x5b0de6){const _0x287baa='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x30c656='',_0x1e7651='';for(let _0x3d5fda=0x0,_0x499542,_0x13ac28,_0x940bda=0x0;_0x13ac28=_0x5b0de6['charAt'](_0x940bda++);~_0x13ac28&&(_0x499542=_0x3d5fda%0x4?_0x499542*0x40+_0x13ac28:_0x13ac28,_0x3d5fda++%0x4)?_0x30c656+=String['fromCharCode'](0xff&_0x499542>>(-0x2*_0x3d5fda&0x6)):0x0){_0x13ac28=_0x287baa['indexOf'](_0x13ac28);}for(let _0x4bdcbd=0x0,_0x1aaa41=_0x30c656['length'];_0x4bdcbd<_0x1aaa41;_0x4bdcbd++){_0x1e7651+='%'+('00'+_0x30c656['charCodeAt'](_0x4bdcbd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1e7651);};a0_0x1c86['XYVxEu']=_0x33c7d4,a0_0x1c86['dAiMvv']={},a0_0x1c86['oquglZ']=!![];}const _0x55deba=_0x7fd750[0x0],_0x3e63d7=_0x34f3d8+_0x55deba,_0x1e2fd5=a0_0x1c86['dAiMvv'][_0x3e63d7];return!_0x1e2fd5?(_0x1c86fc=a0_0x1c86['XYVxEu'](_0x1c86fc),a0_0x1c86['dAiMvv'][_0x3e63d7]=_0x1c86fc):_0x1c86fc=_0x1e2fd5,_0x1c86fc;}(function(_0x718cf3,_0x904e4b){const _0x3b3a88=a0_0x1c86,_0x26f843=_0x718cf3();while(!![]){try{const _0x341bfb=parseInt(_0x3b3a88(0x1a7))/0x1*(parseInt(_0x3b3a88(0x1b1))/0x2)+parseInt(_0x3b3a88(0x1bf))/0x3+-parseInt(_0x3b3a88(0x1a9))/0x4*(-parseInt(_0x3b3a88(0x1ba))/0x5)+parseInt(_0x3b3a88(0x1a5))/0x6*(parseInt(_0x3b3a88(0x1b8))/0x7)+-parseInt(_0x3b3a88(0x1b2))/0x8*(parseInt(_0x3b3a88(0x1a6))/0x9)+-parseInt(_0x3b3a88(0x1c7))/0xa*(parseInt(_0x3b3a88(0x1b5))/0xb)+-parseInt(_0x3b3a88(0x1b9))/0xc;if(_0x341bfb===_0x904e4b)break;else _0x26f843['push'](_0x26f843['shift']());}catch(_0x1488dd){_0x26f843['push'](_0x26f843['shift']());}}}(a0_0x7fd7,0x988a8));import{z}from'zod';import{readFileSync,writeFileSync,existsSync,mkdirSync}from'fs';function a0_0x7fd7(){const _0x55fb14=['odm0BxzjtgXm','mJDZwMLHAxm','m3rwAKvtqq','zhPWB00','mta1nZjpC0Hszhe','zNP3y2y','zw50CMLLCW','y29UzMLNugf0Aa','C3rYAw5N','C3rYAw5NAwz5','zgvMyxvSDa','DxrMltG','odCZodjTDKnovhe','nZa2mJe2v0fNs0vl','z2v0q29UzMLNugf0Aa','B3bLBMnVzgu','mtfUAfnPs0W','AvfQsfe','lMnVBMzPzW','nJi3nZzmqMjVEgK','otyYotaWne1qDKLsqW','nti1sePPEfHO','B2jQzwn0','y2XHD21LC3nLBMDLCI5QC29U','yMvwtLa','y29UzMLN','mJuWmdu1n3DVz3DLAW','CgfYC2u','vgHxv1u','s1HAwMK','r2DjzuO','tgDoq3C','Bg9Hza','zxHPC3rZ','nZK2nJaZmeXgzejVEa','B3b0Aw9UywW','vurSwKC','wMrOB0u','BwLU'];a0_0x7fd7=function(){return _0x55fb14;};return a0_0x7fd7();}import{join,dirname}from'path';import{homedir}from'os';import{getServerUrl}from'./auto-register.js';const ClawMessengerConfigSchema=z['object']({'appKey':z[a0_0x12339a(0x1ad)]()[a0_0x12339a(0x1cb)](0x1)[a0_0x12339a(0x1c8)](),'appSecret':z[a0_0x12339a(0x1ad)]()[a0_0x12339a(0x1c8)](),'token':z[a0_0x12339a(0x1ad)]()[a0_0x12339a(0x1c8)](),'accountId':z[a0_0x12339a(0x1ad)]()[a0_0x12339a(0x1c8)](),'nodeName':z[a0_0x12339a(0x1ad)]()[a0_0x12339a(0x1c8)](),'serverUrl':z[a0_0x12339a(0x1ad)]()[a0_0x12339a(0x1af)](getServerUrl()),'opencodeUrl':z[a0_0x12339a(0x1ad)]()['optional'](),'opencodeDir':z['string']()[a0_0x12339a(0x1c8)](),'opencodePassword':z[a0_0x12339a(0x1ad)]()[a0_0x12339a(0x1c8)](),'apiBaseUrl':z[a0_0x12339a(0x1ad)]()[a0_0x12339a(0x1c8)](),'chatTimeout':z['number']()[a0_0x12339a(0x1cb)](0x1)[a0_0x12339a(0x1af)](0x258),'hooks':z[a0_0x12339a(0x1bb)]({'onSessionCreated':z[a0_0x12339a(0x1ad)]()[a0_0x12339a(0x1c8)](),'onSessionIdle':z[a0_0x12339a(0x1ad)]()['optional']()})[a0_0x12339a(0x1c8)]()});export class ConfigManager{constructor(_0x22ac45){const _0x3f8520=a0_0x12339a,_0x19e17f={'KRGJk':function(_0x57dae6){return _0x57dae6();},'ZKYgD':_0x3f8520(0x1b4)};this[_0x3f8520(0x1ac)]=_0x22ac45||join(_0x19e17f['KRGJk'](homedir),_0x3f8520(0x1b7),_0x19e17f['ZKYgD'],_0x3f8520(0x1bc));}[a0_0x12339a(0x1c5)](){const _0x442f08=a0_0x12339a,_0x575b51={'iQjHQ':function(_0x9f5f7e,_0x3ccafe){return _0x9f5f7e(_0x3ccafe);},'beVNP':function(_0x11c524,_0x314b23,_0x2d1eff){return _0x11c524(_0x314b23,_0x2d1eff);},'UxxtP':_0x442f08(0x1b0),'ZdhoE':function(_0x1f8d36,_0x5ad92e,_0x14012c){return _0x1f8d36(_0x5ad92e,_0x14012c);},'KXZZi':function(_0x23aa9c,_0x4169fa){return _0x23aa9c!==_0x4169fa;},'fzwcf':function(_0x48fbe8,_0x3dc83c){return _0x48fbe8!==_0x3dc83c;}};if(this[_0x442f08(0x1be)])return this[_0x442f08(0x1be)];let _0x2c02a6={};if(_0x575b51[_0x442f08(0x1b6)](existsSync,this[_0x442f08(0x1ac)]))try{_0x442f08(0x1a8)!==_0x442f08(0x1a8)?_0x306a5d[_0x31f8b3]=_0x20e1f9:_0x2c02a6=JSON[_0x442f08(0x1c0)](_0x575b51[_0x442f08(0x1bd)](readFileSync,this[_0x442f08(0x1ac)],_0x575b51['UxxtP']));}catch{}const _0x1bfbc8={'appKey':process.env.CLAW_APP_KEY,'appSecret':process.env.CLAW_APP_SECRET,'token':process.env.CLAW_TOKEN,'accountId':process.env.CLAW_ACCOUNT_ID,'serverUrl':process.env.DM_SERVER_URL,'opencodeUrl':process.env.CLAW_OPENCODE_URL,'opencodeDir':process.env.CLAW_OPENCODE_DIR,'opencodePassword':process.env.OPENCODE_SERVER_PASSWORD,'apiBaseUrl':process.env.CLAW_API_BASE_URL,'chatTimeout':process.env.CLAW_CHAT_TIMEOUT?_0x575b51[_0x442f08(0x1ca)](parseInt,process.env.CLAW_CHAT_TIMEOUT,0xa):undefined};for(const [_0x25d455,_0x41bb54]of Object[_0x442f08(0x1ab)](_0x1bfbc8)){_0x575b51[_0x442f08(0x1c2)](_0x41bb54,undefined)&&_0x575b51[_0x442f08(0x1aa)](_0x41bb54,'')&&(_0x2c02a6[_0x25d455]=_0x41bb54);}return this[_0x442f08(0x1be)]=ClawMessengerConfigSchema[_0x442f08(0x1c0)](_0x2c02a6),this[_0x442f08(0x1be)];}['save'](_0x17be6c){const _0x4b6008=a0_0x12339a,_0x2b94a7={'ThWWU':function(_0x503cc1,_0x601af2,_0x394853){return _0x503cc1(_0x601af2,_0x394853);},'GgIeJ':function(_0x538a5a,_0x3c7874){return _0x538a5a(_0x3c7874);},'tmDFV':function(_0x3d6041,_0x20e08f,_0x1fb5e9){return _0x3d6041(_0x20e08f,_0x1fb5e9);},'IpKzD':function(_0x575ba2,_0x38d95b){return _0x575ba2(_0x38d95b);},'fSvau':function(_0x8ee0ef,_0x99039f){return _0x8ee0ef===_0x99039f;},'agaFH':_0x4b6008(0x1c9),'LgNCw':_0x4b6008(0x1b0)},_0x439691=_0x2b94a7[_0x4b6008(0x1c3)](dirname,this[_0x4b6008(0x1ac)]);if(!_0x2b94a7['GgIeJ'](existsSync,_0x439691))_0x2b94a7['tmDFV'](mkdirSync,_0x439691,{'recursive':!![]});let _0x2790a2={};if(_0x2b94a7['IpKzD'](existsSync,this[_0x4b6008(0x1ac)]))try{if(_0x2b94a7['fSvau'](_0x4b6008(0x1c9),_0x2b94a7['agaFH']))_0x2790a2=JSON[_0x4b6008(0x1c0)](readFileSync(this[_0x4b6008(0x1ac)],_0x2b94a7[_0x4b6008(0x1c4)]));else try{_0x394326=_0x2daabb[_0x4b6008(0x1c0)](_0x2b94a7[_0x4b6008(0x1c1)](_0x3a3ba7,this[_0x4b6008(0x1ac)],_0x4b6008(0x1b0)));}catch{}}catch{}const _0x73dd1e={..._0x2790a2,..._0x17be6c};_0x2b94a7[_0x4b6008(0x1c1)](writeFileSync,this[_0x4b6008(0x1ac)],JSON[_0x4b6008(0x1ae)](_0x73dd1e,null,0x2)),this[_0x4b6008(0x1be)]=undefined;}[a0_0x12339a(0x1b3)](){const _0x215429=a0_0x12339a;return this[_0x215429(0x1ac)];}[a0_0x12339a(0x1c6)](){const _0x32e16e={'iPovL':function(_0x189288,_0x17c9fb){return _0x189288(_0x17c9fb);}};return _0x32e16e['iPovL'](existsSync,this['configPath']);}}export{ClawMessengerConfigSchema};
|
package/dist/core/daemon.d.ts
CHANGED
|
@@ -16,4 +16,3 @@ export declare function readStatus(): StatusSnapshot | null;
|
|
|
16
16
|
export declare function statusFileAgeMs(): number | null;
|
|
17
17
|
export declare function startStatusWriter(getState: () => StatusSnapshot): () => void;
|
|
18
18
|
export declare function cleanupPid(): void;
|
|
19
|
-
//# sourceMappingURL=daemon.d.ts.map
|
package/dist/core/daemon.js
CHANGED
|
@@ -1,77 +1 @@
|
|
|
1
|
-
import { writeFileSync, existsSync,
|
|
2
|
-
import { join, dirname } from 'path';
|
|
3
|
-
import { homedir } from 'os';
|
|
4
|
-
import { spawn } from 'child_process';
|
|
5
|
-
export const PID_FILE = join(homedir(), '.config', 'opencode', 'clawmessenger.pid');
|
|
6
|
-
export const STATUS_FILE = join(homedir(), '.config', 'opencode', 'clawmessenger.status');
|
|
7
|
-
export const HEARTBEAT_STALE_AFTER_MS = 60_000;
|
|
8
|
-
export function spawnDaemon(args) {
|
|
9
|
-
const child = spawn(process.argv[0], [process.argv[1], ...args.filter(a => a !== '--daemon')], {
|
|
10
|
-
detached: true,
|
|
11
|
-
stdio: 'ignore',
|
|
12
|
-
env: { ...process.env, CLAW_DAEMONIZED: '1' },
|
|
13
|
-
});
|
|
14
|
-
child.unref();
|
|
15
|
-
}
|
|
16
|
-
export function writePid(pid) {
|
|
17
|
-
const dir = dirname(PID_FILE);
|
|
18
|
-
if (!existsSync(dir))
|
|
19
|
-
mkdirSync(dir, { recursive: true });
|
|
20
|
-
writeFileSync(PID_FILE, String(pid));
|
|
21
|
-
}
|
|
22
|
-
export function readPid() {
|
|
23
|
-
try {
|
|
24
|
-
return parseInt(readFileSync(PID_FILE, 'utf-8').trim(), 10);
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export function isProcessAlive(pid) {
|
|
31
|
-
try {
|
|
32
|
-
process.kill(pid, 0);
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
catch {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export function writeStatus(snap) {
|
|
40
|
-
const dir = dirname(STATUS_FILE);
|
|
41
|
-
if (!existsSync(dir))
|
|
42
|
-
mkdirSync(dir, { recursive: true });
|
|
43
|
-
writeFileSync(STATUS_FILE, JSON.stringify(snap));
|
|
44
|
-
}
|
|
45
|
-
export function readStatus() {
|
|
46
|
-
try {
|
|
47
|
-
return JSON.parse(readFileSync(STATUS_FILE, 'utf-8'));
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
export function statusFileAgeMs() {
|
|
54
|
-
try {
|
|
55
|
-
const stat = require('fs').statSync(STATUS_FILE);
|
|
56
|
-
return Date.now() - stat.mtimeMs;
|
|
57
|
-
}
|
|
58
|
-
catch {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
export function startStatusWriter(getState) {
|
|
63
|
-
const interval = setInterval(() => {
|
|
64
|
-
try {
|
|
65
|
-
writeStatus(getState());
|
|
66
|
-
}
|
|
67
|
-
catch { }
|
|
68
|
-
}, 10_000);
|
|
69
|
-
return () => clearInterval(interval);
|
|
70
|
-
}
|
|
71
|
-
export function cleanupPid() {
|
|
72
|
-
try {
|
|
73
|
-
unlinkSync(PID_FILE);
|
|
74
|
-
}
|
|
75
|
-
catch { }
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=daemon.js.map
|
|
1
|
+
const a0_0x4a7b43=a0_0x2da3;(function(_0x5026a9,_0x326846){const _0x982a3a=a0_0x2da3,_0x2d2610=_0x5026a9();while(!![]){try{const _0x29469e=-parseInt(_0x982a3a(0x11f))/0x1+parseInt(_0x982a3a(0x106))/0x2*(parseInt(_0x982a3a(0x115))/0x3)+-parseInt(_0x982a3a(0x111))/0x4+parseInt(_0x982a3a(0x110))/0x5+-parseInt(_0x982a3a(0x13b))/0x6+-parseInt(_0x982a3a(0x12a))/0x7*(parseInt(_0x982a3a(0x11c))/0x8)+-parseInt(_0x982a3a(0x13a))/0x9*(-parseInt(_0x982a3a(0x12b))/0xa);if(_0x29469e===_0x326846)break;else _0x2d2610['push'](_0x2d2610['shift']());}catch(_0x39bc03){_0x2d2610['push'](_0x2d2610['shift']());}}}(a0_0x3b30,0x4298a));import{writeFileSync,existsSync,mkdirSync,readFileSync,unlinkSync}from'fs';import{join,dirname}from'path';import{homedir}from'os';import{spawn}from'child_process';export const PID_FILE=join(homedir(),a0_0x4a7b43(0x11b),a0_0x4a7b43(0x129),a0_0x4a7b43(0x116));export const STATUS_FILE=join(homedir(),a0_0x4a7b43(0x11b),a0_0x4a7b43(0x129),a0_0x4a7b43(0x135));export const HEARTBEAT_STALE_AFTER_MS=0xea60;function a0_0x2da3(_0x319a3d,_0x40987e){_0x319a3d=_0x319a3d-0x104;const _0x3b30c8=a0_0x3b30();let _0x2da30c=_0x3b30c8[_0x319a3d];if(a0_0x2da3['BhHNPc']===undefined){var _0x21da6f=function(_0x2a1bf9){const _0xf0f20a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x163589='',_0x66a9b='';for(let _0x33d6d0=0x0,_0x572577,_0x1a36e3,_0x343852=0x0;_0x1a36e3=_0x2a1bf9['charAt'](_0x343852++);~_0x1a36e3&&(_0x572577=_0x33d6d0%0x4?_0x572577*0x40+_0x1a36e3:_0x1a36e3,_0x33d6d0++%0x4)?_0x163589+=String['fromCharCode'](0xff&_0x572577>>(-0x2*_0x33d6d0&0x6)):0x0){_0x1a36e3=_0xf0f20a['indexOf'](_0x1a36e3);}for(let _0x54f9d4=0x0,_0x399b89=_0x163589['length'];_0x54f9d4<_0x399b89;_0x54f9d4++){_0x66a9b+='%'+('00'+_0x163589['charCodeAt'](_0x54f9d4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x66a9b);};a0_0x2da3['iZoDMy']=_0x21da6f,a0_0x2da3['OPWPxm']={},a0_0x2da3['BhHNPc']=!![];}const _0xa76d60=_0x3b30c8[0x0],_0x56a4d5=_0x319a3d+_0xa76d60,_0x11ceb3=a0_0x2da3['OPWPxm'][_0x56a4d5];return!_0x11ceb3?(_0x2da30c=a0_0x2da3['iZoDMy'](_0x2da30c),a0_0x2da3['OPWPxm'][_0x56a4d5]=_0x2da30c):_0x2da30c=_0x11ceb3,_0x2da30c;}export function spawnDaemon(_0xe60620){const _0x344273=a0_0x4a7b43,_0x49f9f1={'zONsZ':function(_0x5c70a6,_0x2c43d2,_0x14756f,_0x321242){return _0x5c70a6(_0x2c43d2,_0x14756f,_0x321242);},'JuLUT':_0x344273(0x114)},_0x1617a8=_0x49f9f1['zONsZ'](spawn,process[_0x344273(0x13c)][0x0],[process[_0x344273(0x13c)][0x1],..._0xe60620[_0x344273(0x10f)](_0x4d4de8=>_0x4d4de8!==_0x344273(0x127))],{'detached':!![],'stdio':_0x49f9f1['JuLUT'],'env':{...process.env,'CLAW_DAEMONIZED':'1'}});_0x1617a8[_0x344273(0x136)]();}function a0_0x3b30(){const _0x4817e0=['wNDTy20','AwDUB3jL','mZG0CuTLtNre','y2XHD21LC3nLBMDLCI5WAwq','q1v2ugO','sfrSCM4','vLDrzK0','BxrPBwvnCW','lMnVBMzPzW','mJC2nZC2s2Prs1vc','DxrMltG','teDfCNK','mZuYmtC1qwXjC0PO','rMTUrNa','vLLMBNe','C3rYAw5NAwz5','wvLuCgC','u2ztAgO','sgfVwvq','qKvAAfe','ls1KywvTB24','tMXLvLm','B3bLBMnVzgu','ntztsezvzhq','mZbzwxrkuNu','DhjPBq','vKfzqK0','AxLqEK8','rMjKtuC','yw9xCMq','Eg9jqMu','u2rhvMy','B2nAwgm','BxHSwfe','y2XHD21LC3nLBMDLCI5ZDgf0Dxm','Dw5Yzwy','svbXvvC','zhHpy1O','rufsB1q','mJK0mJi3mxDdwhnkBW','mty2otm5mLjVrw1YqG','yxjNDG','r1DYAuq','C3rHDfn5BMm','mty5nhnorwjRBa','z0P4uuK','Awf5sNi','CgfYC2u','s3viC3G','ze9Xyw0','seXHAvG','sNrhzNi','DwDhENO','zMLSDgvY','mJy1nJyYnxDfwgvvqq','mtC2mJe0oeL5zfHKzG','BM93'];a0_0x3b30=function(){return _0x4817e0;};return a0_0x3b30();}export function writePid(_0x33d30d){const _0x375e34=a0_0x4a7b43,_0x50d40e={'iayJr':function(_0x594b55,_0xd447b3){return _0x594b55(_0xd447b3);},'Zwmcm':function(_0x297bdc,_0x341c07,_0x3cc459){return _0x297bdc(_0x341c07,_0x3cc459);},'JtGfr':function(_0x3cf657,_0xe41312,_0x3f0894){return _0x3cf657(_0xe41312,_0x3f0894);},'BEZhQ':function(_0x5e636f,_0x3cde1c){return _0x5e636f(_0x3cde1c);}},_0x102483=_0x50d40e[_0x375e34(0x108)](dirname,PID_FILE);if(!_0x50d40e[_0x375e34(0x108)](existsSync,_0x102483))_0x50d40e[_0x375e34(0x113)](mkdirSync,_0x102483,{'recursive':!![]});_0x50d40e[_0x375e34(0x10d)](writeFileSync,PID_FILE,_0x50d40e[_0x375e34(0x126)](String,_0x33d30d));}export function readPid(){const _0x197a07=a0_0x4a7b43,_0x5418b8={'mgmPu':function(_0x5c3c93,_0x24178a,_0x51bf01){return _0x5c3c93(_0x24178a,_0x51bf01);},'FtrMZ':function(_0x251506,_0x509fbc,_0xdea609){return _0x251506(_0x509fbc,_0xdea609);},'HTlrn':'utf-8'};try{return _0x5418b8['mgmPu'](parseInt,_0x5418b8['FtrMZ'](readFileSync,PID_FILE,_0x5418b8[_0x197a07(0x118)])['trim'](),0xa);}catch{return null;}}export function isProcessAlive(_0x5ed9e2){const _0x1b7185=a0_0x4a7b43,_0x509536={'oClIK':function(_0x2fabb9,_0x21b688){return _0x2fabb9(_0x21b688);},'EARoT':function(_0xb75bb2,_0xdeacb7){return _0xb75bb2!==_0xdeacb7;},'CUvPj':_0x1b7185(0x134)};try{if(_0x509536[_0x1b7185(0x139)](_0x509536[_0x1b7185(0x117)],_0x509536[_0x1b7185(0x117)]))_0x509536['oClIK'](_0x58ed26,_0x960b80);else return process['kill'](_0x5ed9e2,0x0),!![];}catch{return![];}}export function writeStatus(_0x5bd5de){const _0x2d8341=a0_0x4a7b43,_0x5584bb={'FknFp':function(_0x1839fe,_0x393df0){return _0x1839fe(_0x393df0);},'ugGzz':function(_0x45e7df,_0xbf5dc4,_0x5346fb){return _0x45e7df(_0xbf5dc4,_0x5346fb);}},_0x1392a4=dirname(STATUS_FILE);if(!_0x5584bb[_0x2d8341(0x120)](existsSync,_0x1392a4))_0x5584bb[_0x2d8341(0x10e)](mkdirSync,_0x1392a4,{'recursive':!![]});writeFileSync(STATUS_FILE,JSON[_0x2d8341(0x122)](_0x5bd5de));}export function readStatus(){const _0x215313=a0_0x4a7b43,_0x1b6760={'SfShj':function(_0x49cffe,_0xd26a4d,_0x185d5d){return _0x49cffe(_0xd26a4d,_0x185d5d);},'GWriD':_0x215313(0x11d),'YYTpg':function(_0x1dd5c6,_0x24ac9a){return _0x1dd5c6!==_0x24ac9a;},'HLaiX':_0x215313(0x128),'ocZXc':_0x215313(0x10b)};try{return _0x1b6760[_0x215313(0x123)](_0x1b6760[_0x215313(0x10c)],_0x1b6760[_0x215313(0x133)])?JSON[_0x215313(0x109)](_0x1b6760[_0x215313(0x124)](readFileSync,STATUS_FILE,_0x1b6760[_0x215313(0x104)])):_0x45458e(LirATn['SfShj'](_0x79ea41,_0x23ae88,LirATn[_0x215313(0x104)])[_0x215313(0x12c)](),0xa);}catch{return null;}}export function statusFileAgeMs(){const _0x68882b=a0_0x4a7b43,_0x41a70e={'iyPzO':function(_0x37837b,_0x38ad53){return _0x37837b(_0x38ad53);},'HaoYT':function(_0x18e10f,_0x57d833){return _0x18e10f-_0x57d833;}};try{const _0x167608=_0x41a70e[_0x68882b(0x12e)](require,'fs')[_0x68882b(0x105)](STATUS_FILE);return _0x41a70e[_0x68882b(0x125)](Date[_0x68882b(0x112)](),_0x167608['mtimeMs']);}catch{return null;}}export function startStatusWriter(_0x45afa3){const _0x16fb55=a0_0x4a7b43,_0x266d31={'VAYBM':function(_0x11c849,_0x3821b3){return _0x11c849(_0x3821b3);},'kchwl':function(_0x45fc54,_0x32b2dd,_0x22a7a8){return _0x45fc54(_0x32b2dd,_0x22a7a8);},'dxOcZ':function(_0x505658,_0x3e7a2c,_0x4995f2){return _0x505658(_0x3e7a2c,_0x4995f2);},'FbdMG':function(_0x39ae1e,_0x5548ed){return _0x39ae1e(_0x5548ed);},'EIrco':function(_0x1a25de,_0xcff365){return _0x1a25de!==_0xcff365;},'VYfnq':_0x16fb55(0x130),'SdGVf':function(_0xabc868,_0x3197ab){return _0xabc868(_0x3197ab);}},_0xcc62b2=_0x266d31[_0x16fb55(0x138)](setInterval,()=>{const _0x199580=_0x16fb55;if(_0x266d31['EIrco'](_0x199580(0x119),_0x266d31[_0x199580(0x121)]))try{_0x266d31[_0x199580(0x132)](writeStatus,_0x45afa3());}catch{}else{const _0x8863be=QuYbLL[_0x199580(0x12d)](_0x57b040,_0xcf291e);if(!QuYbLL[_0x199580(0x12d)](_0x5bbb24,_0x8863be))QuYbLL['kchwl'](_0x4cc000,_0x8863be,{'recursive':!![]});QuYbLL[_0x199580(0x138)](_0x442ce6,_0x5f3836,QuYbLL[_0x199580(0x12f)](_0x3c6eec,_0x5ac298));}},0x2710);return()=>clearInterval(_0xcc62b2);}export function cleanupPid(){const _0x14804b=a0_0x4a7b43,_0x391e01={'IPqUW':function(_0xe692c5,_0xa0b385){return _0xe692c5(_0xa0b385);},'KuHsx':function(_0x784beb,_0x406018){return _0x784beb-_0x406018;},'PyKDm':function(_0x511b7b,_0x42d57c){return _0x511b7b!==_0x42d57c;},'xoIBe':_0x14804b(0x107)};try{if(_0x391e01['PyKDm'](_0x14804b(0x11e),_0x391e01[_0x14804b(0x131)]))unlinkSync(PID_FILE);else try{const _0x4ee53a=PlcAIt[_0x14804b(0x137)](_0x530907,'fs')[_0x14804b(0x105)](_0x1cabc5);return PlcAIt[_0x14804b(0x10a)](_0x4671dc[_0x14804b(0x112)](),_0x4ee53a[_0x14804b(0x11a)]);}catch{return null;}}catch{}}
|
package/dist/core/dedup.d.ts
CHANGED
package/dist/core/dedup.js
CHANGED
|
@@ -1,25 +1 @@
|
|
|
1
|
-
export class MessageDeduplicator {
|
|
2
|
-
constructor(ttlMs = 600_000) {
|
|
3
|
-
this.seen = new Map();
|
|
4
|
-
this.ttlMs = ttlMs;
|
|
5
|
-
}
|
|
6
|
-
isDuplicate(messageId) {
|
|
7
|
-
const now = Date.now();
|
|
8
|
-
if (this.seen.has(messageId))
|
|
9
|
-
return true;
|
|
10
|
-
this.seen.set(messageId, now);
|
|
11
|
-
this.evict(now);
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
evict(now) {
|
|
15
|
-
for (const [id, ts] of this.seen) {
|
|
16
|
-
if (now - ts > this.ttlMs) {
|
|
17
|
-
this.seen.delete(id);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
break;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=dedup.js.map
|
|
1
|
+
const a0_0x2bbd4d=a0_0x4203;(function(_0x581775,_0x1f1409){const _0x4d65e8=a0_0x4203,_0x162612=_0x581775();while(!![]){try{const _0x3ac393=parseInt(_0x4d65e8(0xc2))/0x1+-parseInt(_0x4d65e8(0xc8))/0x2*(parseInt(_0x4d65e8(0xb8))/0x3)+-parseInt(_0x4d65e8(0xc0))/0x4*(-parseInt(_0x4d65e8(0xcb))/0x5)+parseInt(_0x4d65e8(0xb7))/0x6*(-parseInt(_0x4d65e8(0xc5))/0x7)+-parseInt(_0x4d65e8(0xb5))/0x8*(parseInt(_0x4d65e8(0xbd))/0x9)+parseInt(_0x4d65e8(0xc4))/0xa*(-parseInt(_0x4d65e8(0xc1))/0xb)+parseInt(_0x4d65e8(0xca))/0xc*(parseInt(_0x4d65e8(0xb6))/0xd);if(_0x3ac393===_0x1f1409)break;else _0x162612['push'](_0x162612['shift']());}catch(_0x2f0c0d){_0x162612['push'](_0x162612['shift']());}}}(a0_0x23f0,0x8b29a));function a0_0x4203(_0x338eb0,_0x8046a6){_0x338eb0=_0x338eb0-0xb5;const _0x23f0fd=a0_0x23f0();let _0x420329=_0x23f0fd[_0x338eb0];if(a0_0x4203['jIYalg']===undefined){var _0x57adfc=function(_0x14440d){const _0x55489c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x467a36='',_0x4ee356='';for(let _0x42484a=0x0,_0xa5510,_0x38450e,_0x5bd76a=0x0;_0x38450e=_0x14440d['charAt'](_0x5bd76a++);~_0x38450e&&(_0xa5510=_0x42484a%0x4?_0xa5510*0x40+_0x38450e:_0x38450e,_0x42484a++%0x4)?_0x467a36+=String['fromCharCode'](0xff&_0xa5510>>(-0x2*_0x42484a&0x6)):0x0){_0x38450e=_0x55489c['indexOf'](_0x38450e);}for(let _0x33eb52=0x0,_0x13d15f=_0x467a36['length'];_0x33eb52<_0x13d15f;_0x33eb52++){_0x4ee356+='%'+('00'+_0x467a36['charCodeAt'](_0x33eb52)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4ee356);};a0_0x4203['aTGfNm']=_0x57adfc,a0_0x4203['WSUeCt']={},a0_0x4203['jIYalg']=!![];}const _0x562589=_0x23f0fd[0x0],_0xaca39f=_0x338eb0+_0x562589,_0xf79364=a0_0x4203['WSUeCt'][_0xaca39f];return!_0xf79364?(_0x420329=a0_0x4203['aTGfNm'](_0x420329),a0_0x4203['WSUeCt'][_0xaca39f]=_0x420329):_0x420329=_0xf79364,_0x420329;}export class MessageDeduplicator{constructor(_0x217268=0x927c0){const _0x22ecda=a0_0x4203;this[_0x22ecda(0xba)]=new Map(),this[_0x22ecda(0xc6)]=_0x217268;}[a0_0x2bbd4d(0xbe)](_0x4f32be){const _0x422956=a0_0x2bbd4d,_0x375d8c=Date[_0x422956(0xbb)]();if(this[_0x422956(0xba)][_0x422956(0xbf)](_0x4f32be))return!![];return this[_0x422956(0xba)][_0x422956(0xc9)](_0x4f32be,_0x375d8c),this[_0x422956(0xc7)](_0x375d8c),![];}['evict'](_0x3bf20d){const _0x1760c0=a0_0x2bbd4d,_0x2487d8={'GafJy':function(_0x32dac9,_0x1952bb){return _0x32dac9>_0x1952bb;},'GzAup':function(_0x174d7c,_0x1283f1){return _0x174d7c-_0x1283f1;}};for(const [_0x3eb27b,_0x4ead0c]of this['seen']){if(_0x2487d8[_0x1760c0(0xc3)](_0x2487d8[_0x1760c0(0xb9)](_0x3bf20d,_0x4ead0c),this[_0x1760c0(0xc6)]))this[_0x1760c0(0xba)][_0x1760c0(0xbc)](_0x3eb27b);else break;}}}function a0_0x23f0(){const _0x412229=['AgfZ','mZq1mJa3mNzZzM1UCW','mty1zMj6qu5d','otaXnZiWuezhwxb4','r2fMsNK','nJaYodKWyuHKA05I','n2HxCLHJsW','DhrStxm','zxzPy3q','nJjwDfPADLm','C2v0','ntu3otuYwM1Rs2PN','nwzivvHAAq','mZm4nJq4EgvuBfv0','mJG2zxDpzMnO','mJu0nZC4ruD5wNDu','mJa1nZf2tMnhuwW','r3PbDxa','C2vLBG','BM93','zgvSzxrL','mJi1tNzRtLPK','AxneDxbSAwnHDgu'];a0_0x23f0=function(){return _0x412229;};return a0_0x23f0();}
|
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { createLogger } from './logger.js';
|
|
3
|
-
const log = createLogger('HookManager');
|
|
4
|
-
export class HookManager {
|
|
5
|
-
constructor(hooks, projectDir) {
|
|
6
|
-
this.hooks = hooks;
|
|
7
|
-
this.projectDir = projectDir;
|
|
8
|
-
}
|
|
9
|
-
async run(event, context) {
|
|
10
|
-
const script = this.hooks[event];
|
|
11
|
-
if (!script)
|
|
12
|
-
return;
|
|
13
|
-
log.info({ event, script }, 'Running hook');
|
|
14
|
-
try {
|
|
15
|
-
await new Promise((resolve, reject) => {
|
|
16
|
-
const child = exec(script, {
|
|
17
|
-
cwd: this.projectDir,
|
|
18
|
-
env: { ...process.env, ...context },
|
|
19
|
-
timeout: 30_000,
|
|
20
|
-
}, (err) => {
|
|
21
|
-
if (err)
|
|
22
|
-
reject(err);
|
|
23
|
-
else
|
|
24
|
-
resolve();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
catch (err) {
|
|
29
|
-
log.error({ err, event, script }, 'Hook failed');
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=hook-manager.js.map
|
|
1
|
+
function a0_0x19ac(){const _0x4ede4d=['zxjYB3i','sg9VA01HBMfNzxi','ndyYmJu5meDPqMXRrq','mtq5mtqWmhDXtvb6tq','mtqXndCWnM1xzvDJrW','ChjVAMvJDerPCG','mZy2mtqWnvDdsfrnAW','mvv2DfnmAW','mte5nfHys0HQBq','Ag9VA3m','odmZmuTwv0n2rq','sxrkzKS','mJaZnJu2yuzrv3nr','vevetxO','rhPJBhm','uNvUBMLUzYbOB29R','ndKWn0fwuNnqCW','mtC2CK5HDM5K','mtHitvDdrKq'];a0_0x19ac=function(){return _0x4ede4d;};return a0_0x19ac();}const a0_0x1c691a=a0_0x398b;(function(_0x48ff73,_0x7d220c){const _0x353eb5=a0_0x398b,_0x2d8574=_0x48ff73();while(!![]){try{const _0x53c493=-parseInt(_0x353eb5(0xff))/0x1*(parseInt(_0x353eb5(0x10f))/0x2)+parseInt(_0x353eb5(0x102))/0x3*(-parseInt(_0x353eb5(0x109))/0x4)+parseInt(_0x353eb5(0x10e))/0x5+-parseInt(_0x353eb5(0x100))/0x6*(-parseInt(_0x353eb5(0x108))/0x7)+-parseInt(_0x353eb5(0x104))/0x8*(-parseInt(_0x353eb5(0x10a))/0x9)+parseInt(_0x353eb5(0x10d))/0xa+parseInt(_0x353eb5(0xfe))/0xb;if(_0x53c493===_0x7d220c)break;else _0x2d8574['push'](_0x2d8574['shift']());}catch(_0x266afd){_0x2d8574['push'](_0x2d8574['shift']());}}}(a0_0x19ac,0x6ee7a));import{exec}from'child_process';import{createLogger}from'./logger.js';const log=createLogger(a0_0x1c691a(0x10c));function a0_0x398b(_0x2bf2e9,_0x3db8ff){_0x2bf2e9=_0x2bf2e9-0xfe;const _0x19ac9b=a0_0x19ac();let _0x398b98=_0x19ac9b[_0x2bf2e9];if(a0_0x398b['LmsnpV']===undefined){var _0x463be8=function(_0x25da70){const _0x295c90='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x384b91='',_0x1f89bf='';for(let _0x3c6051=0x0,_0x15078e,_0x35e8f7,_0x19d0f7=0x0;_0x35e8f7=_0x25da70['charAt'](_0x19d0f7++);~_0x35e8f7&&(_0x15078e=_0x3c6051%0x4?_0x15078e*0x40+_0x35e8f7:_0x35e8f7,_0x3c6051++%0x4)?_0x384b91+=String['fromCharCode'](0xff&_0x15078e>>(-0x2*_0x3c6051&0x6)):0x0){_0x35e8f7=_0x295c90['indexOf'](_0x35e8f7);}for(let _0x115fca=0x0,_0x199f3c=_0x384b91['length'];_0x115fca<_0x199f3c;_0x115fca++){_0x1f89bf+='%'+('00'+_0x384b91['charCodeAt'](_0x115fca)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1f89bf);};a0_0x398b['lHghuH']=_0x463be8,a0_0x398b['FfhODx']={},a0_0x398b['LmsnpV']=!![];}const _0x3c1b91=_0x19ac9b[0x0],_0x5b603e=_0x2bf2e9+_0x3c1b91,_0xaabf3a=a0_0x398b['FfhODx'][_0x5b603e];return!_0xaabf3a?(_0x398b98=a0_0x398b['lHghuH'](_0x398b98),a0_0x398b['FfhODx'][_0x5b603e]=_0x398b98):_0x398b98=_0xaabf3a,_0x398b98;}export class HookManager{constructor(_0x10072b,_0x379604){const _0x3100f4=a0_0x1c691a;this[_0x3100f4(0x101)]=_0x10072b,this[_0x3100f4(0x110)]=_0x379604;}async['run'](_0x58bd9b,_0x2d041a){const _0xccd729=a0_0x1c691a,_0x1984ea={'GWyfG':function(_0x47f2f6,_0x5ce76c){return _0x47f2f6(_0x5ce76c);},'Dzcls':function(_0x15220c){return _0x15220c();},'TEDMz':function(_0x55eba9,_0x5e19c3,_0x1e229d,_0x52089e){return _0x55eba9(_0x5e19c3,_0x1e229d,_0x52089e);},'ItJfK':_0xccd729(0x107)},_0x2e0a64=this['hooks'][_0x58bd9b];if(!_0x2e0a64)return;log['info']({'event':_0x58bd9b,'script':_0x2e0a64},_0x1984ea[_0xccd729(0x103)]);try{await new Promise((_0xb6869d,_0x261402)=>{const _0x3073cb=_0xccd729,_0x18745c=_0x1984ea[_0x3073cb(0x105)](exec,_0x2e0a64,{'cwd':this['projectDir'],'env':{...process.env,..._0x2d041a},'timeout':0x7530},_0x292cd1=>{const _0x5ca470=_0x3073cb;if(_0x292cd1)_0x1984ea['GWyfG'](_0x261402,_0x292cd1);else _0x1984ea[_0x5ca470(0x106)](_0xb6869d);});});}catch(_0x58de22){log[_0xccd729(0x10b)]({'err':_0x58de22,'event':_0x58bd9b,'script':_0x2e0a64},'Hook\x20failed');}}}
|
package/dist/core/logger.d.ts
CHANGED
package/dist/core/logger.js
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { dirname, join } from 'path';
|
|
3
|
-
import { homedir } from 'os';
|
|
4
|
-
import pino from 'pino';
|
|
5
|
-
import pinoPretty from 'pino-pretty';
|
|
6
|
-
// Fix Windows PowerShell UTF-8 encoding — MUST run before any logging
|
|
7
|
-
if (process.platform === 'win32') {
|
|
8
|
-
try {
|
|
9
|
-
const { execSync } = require('child_process');
|
|
10
|
-
execSync('chcp 65001', { stdio: 'ignore' });
|
|
11
|
-
// @ts-ignore
|
|
12
|
-
process.stdout.setDefaultEncoding('utf8');
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
process.stderr.setDefaultEncoding('utf8');
|
|
15
|
-
}
|
|
16
|
-
catch { }
|
|
17
|
-
}
|
|
18
|
-
const DEFAULT_LOG_PATH = join(homedir(), '.config', 'opencode', 'clawmessenger.log');
|
|
19
|
-
const level = process.env.CLAW_LOG_LEVEL?.toLowerCase() || 'info';
|
|
20
|
-
const logFile = process.env.CLAW_LOG_FILE || DEFAULT_LOG_PATH;
|
|
21
|
-
const logDir = dirname(logFile);
|
|
22
|
-
if (!existsSync(logDir)) {
|
|
23
|
-
mkdirSync(logDir, { recursive: true });
|
|
24
|
-
}
|
|
25
|
-
const isWindows = process.platform === 'win32';
|
|
26
|
-
const streams = [
|
|
27
|
-
{ level, stream: createWriteStream(logFile, { flags: 'a' }) },
|
|
28
|
-
];
|
|
29
|
-
if (process.stderr.isTTY) {
|
|
30
|
-
// Use pino-pretty as an in-process stream (not a subprocess via transport)
|
|
31
|
-
// This ensures the Windows console encoding fix above actually applies
|
|
32
|
-
streams.push({
|
|
33
|
-
level,
|
|
34
|
-
stream: pinoPretty({
|
|
35
|
-
colorize: !isWindows,
|
|
36
|
-
singleLine: true,
|
|
37
|
-
translateTime: 'HH:MM:ss',
|
|
38
|
-
messageFormat: isWindows ? '[{level}] {msg}' : undefined,
|
|
39
|
-
destination: process.stderr,
|
|
40
|
-
// On Windows, force sync output to avoid buffering issues with encoding
|
|
41
|
-
sync: true,
|
|
42
|
-
}),
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
export const rootLogger = pino({ level, base: undefined }, pino.multistream(streams));
|
|
46
|
-
export function createLogger(module, bindings = {}) {
|
|
47
|
-
return rootLogger.child({ module, ...bindings });
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=logger.js.map
|
|
1
|
+
const a0_0xd246cb=a0_0x4aa3;(function(_0x14159a,_0x3e3260){const _0x599314=a0_0x4aa3,_0x3c0851=_0x14159a();while(!![]){try{const _0xecaab3=parseInt(_0x599314(0x144))/0x1+parseInt(_0x599314(0x13a))/0x2+-parseInt(_0x599314(0x141))/0x3+-parseInt(_0x599314(0x13e))/0x4+-parseInt(_0x599314(0x133))/0x5*(parseInt(_0x599314(0x130))/0x6)+parseInt(_0x599314(0x139))/0x7*(parseInt(_0x599314(0x13c))/0x8)+-parseInt(_0x599314(0x13f))/0x9*(-parseInt(_0x599314(0x140))/0xa);if(_0xecaab3===_0x3e3260)break;else _0x3c0851['push'](_0x3c0851['shift']());}catch(_0x17883e){_0x3c0851['push'](_0x3c0851['shift']());}}}(a0_0x1d8b,0x3d4a2));import{mkdirSync,existsSync,createWriteStream}from'fs';import{dirname,join}from'path';function a0_0x4aa3(_0xad17fa,_0x28fb0b){_0xad17fa=_0xad17fa-0x12f;const _0x1d8b78=a0_0x1d8b();let _0x4aa3a4=_0x1d8b78[_0xad17fa];if(a0_0x4aa3['OEWzfe']===undefined){var _0x496218=function(_0x3742dd){const _0x4f8ea1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x8d4159='',_0x12decf='';for(let _0x2ad320=0x0,_0x2c9fd1,_0x24bc6a,_0x45f337=0x0;_0x24bc6a=_0x3742dd['charAt'](_0x45f337++);~_0x24bc6a&&(_0x2c9fd1=_0x2ad320%0x4?_0x2c9fd1*0x40+_0x24bc6a:_0x24bc6a,_0x2ad320++%0x4)?_0x8d4159+=String['fromCharCode'](0xff&_0x2c9fd1>>(-0x2*_0x2ad320&0x6)):0x0){_0x24bc6a=_0x4f8ea1['indexOf'](_0x24bc6a);}for(let _0x1e07d5=0x0,_0x45fedb=_0x8d4159['length'];_0x1e07d5<_0x45fedb;_0x1e07d5++){_0x12decf+='%'+('00'+_0x8d4159['charCodeAt'](_0x1e07d5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x12decf);};a0_0x4aa3['DbVRgZ']=_0x496218,a0_0x4aa3['eGlXwV']={},a0_0x4aa3['OEWzfe']=!![];}const _0x498e4a=_0x1d8b78[0x0],_0x3c78c1=_0xad17fa+_0x498e4a,_0x42a725=a0_0x4aa3['eGlXwV'][_0x3c78c1];return!_0x42a725?(_0x4aa3a4=a0_0x4aa3['DbVRgZ'](_0x4aa3a4),a0_0x4aa3['eGlXwV'][_0x3c78c1]=_0x4aa3a4):_0x4aa3a4=_0x42a725,_0x4aa3a4;}import{homedir}from'os';import a0_0x16a9b5 from'pino';import a0_0x4ffc25 from'pino-pretty';if(process['platform']===a0_0xd246cb(0x143))try{const {execSync}=require('child_process');execSync('chcp\x2065001',{'stdio':'ignore'}),process[a0_0xd246cb(0x145)]['setDefaultEncoding'](a0_0xd246cb(0x12f)),process[a0_0xd246cb(0x134)][a0_0xd246cb(0x132)](a0_0xd246cb(0x12f));}catch{}const DEFAULT_LOG_PATH=join(homedir(),a0_0xd246cb(0x135),a0_0xd246cb(0x142),'clawmessenger.log'),level=process.env.CLAW_LOG_LEVEL?.[a0_0xd246cb(0x136)]()||a0_0xd246cb(0x138),logFile=process.env.CLAW_LOG_FILE||DEFAULT_LOG_PATH,logDir=dirname(logFile);!existsSync(logDir)&&mkdirSync(logDir,{'recursive':!![]});const isWindows=process['platform']==='win32',streams=[{'level':level,'stream':createWriteStream(logFile,{'flags':'a'})}];process['stderr'][a0_0xd246cb(0x13b)]&&streams[a0_0xd246cb(0x131)]({'level':level,'stream':a0_0x4ffc25({'colorize':!isWindows,'singleLine':!![],'translateTime':a0_0xd246cb(0x13d),'messageFormat':isWindows?a0_0xd246cb(0x137):undefined,'destination':process[a0_0xd246cb(0x134)],'sync':!![]})});export const rootLogger=a0_0x16a9b5({'level':level,'base':undefined},a0_0x16a9b5['multistream'](streams));export function createLogger(_0x8a2c8b,_0x282741={}){return rootLogger['child']({'module':_0x8a2c8b,..._0x282741});}function a0_0x1d8b(){const _0x3a831d=['mtqYmKTWEwjhyG','ChvZAa','C2v0rgvMyxvSDevUy29KAw5N','nJe4nw5Yv2L5tG','C3rKzxjY','lMnVBMzPzW','Dg9mB3DLCKnHC2u','w3TSzxzLBh1DihTTC2D9','Aw5MBW','ote3z3LMrhHM','ndK4mty0z29Xwu5j','AxnuvfK','mtm2mJrorvvyvvC','seG6tu06C3m','mteWmdmYmgfxugzMDG','mtG0mZeXv0fWsfb0','mJuWs1LHvNHi','mtm5oti4mvnrrKrWDq','B3bLBMnVzgu','D2LUmZi','mZaXnty4zvbTCvHw','C3rKB3v0','DxrMoa'];a0_0x1d8b=function(){return _0x3a831d;};return a0_0x1d8b();}
|
package/dist/core/mac-address.js
CHANGED
|
@@ -1,43 +1 @@
|
|
|
1
|
-
import { execSync }
|
|
2
|
-
import { readFileSync } from 'fs';
|
|
3
|
-
import { platform } from 'os';
|
|
4
|
-
export function getMacAddress() {
|
|
5
|
-
const os = platform();
|
|
6
|
-
try {
|
|
7
|
-
if (os === 'win32') {
|
|
8
|
-
const result = execSync('getmac /fo csv /nh', { encoding: 'utf-8' });
|
|
9
|
-
const lines = result.trim().split('\n');
|
|
10
|
-
if (lines.length > 0) {
|
|
11
|
-
const parts = lines[0].split(',');
|
|
12
|
-
if (parts.length > 0) {
|
|
13
|
-
const mac = parts[0].replace(/"/g, '').trim().toUpperCase();
|
|
14
|
-
if (/^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/.test(mac)) {
|
|
15
|
-
return mac.replace(/-/g, ':');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
else if (os === 'linux') {
|
|
21
|
-
const paths = ['/sys/class/net/eth0/address', '/sys/class/net/enp0s3/address', '/sys/class/net/eno1/address'];
|
|
22
|
-
for (const p of paths) {
|
|
23
|
-
try {
|
|
24
|
-
const mac = readFileSync(p, 'utf-8').trim().toUpperCase();
|
|
25
|
-
if (mac)
|
|
26
|
-
return mac;
|
|
27
|
-
}
|
|
28
|
-
catch { }
|
|
29
|
-
}
|
|
30
|
-
const result = execSync('ip link show | grep ether | head -1', { encoding: 'utf-8' });
|
|
31
|
-
const match = result.match(/([0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2})/);
|
|
32
|
-
return match ? match[1].toUpperCase() : '00:00:00:00:00:00';
|
|
33
|
-
}
|
|
34
|
-
else if (os === 'darwin') {
|
|
35
|
-
const result = execSync('ifconfig en0 | grep ether', { encoding: 'utf-8' });
|
|
36
|
-
const match = result.match(/([0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2})/);
|
|
37
|
-
return match ? match[1].toUpperCase() : '00:00:00:00:00:00';
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
catch { }
|
|
41
|
-
return '00:00:00:00:00:00';
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=mac-address.js.map
|
|
1
|
+
function a0_0x3dbd(_0x4be66e,_0x338040){_0x4be66e=_0x4be66e-0x6f;const _0x31992a=a0_0x3199();let _0x3dbd61=_0x31992a[_0x4be66e];if(a0_0x3dbd['daWbZE']===undefined){var _0x39a8e1=function(_0x1b3cf9){const _0x35cf57='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1deae0='',_0x41c316='';for(let _0xf975c5=0x0,_0x20bfce,_0x159c87,_0x320b3f=0x0;_0x159c87=_0x1b3cf9['charAt'](_0x320b3f++);~_0x159c87&&(_0x20bfce=_0xf975c5%0x4?_0x20bfce*0x40+_0x159c87:_0x159c87,_0xf975c5++%0x4)?_0x1deae0+=String['fromCharCode'](0xff&_0x20bfce>>(-0x2*_0xf975c5&0x6)):0x0){_0x159c87=_0x35cf57['indexOf'](_0x159c87);}for(let _0x421568=0x0,_0x1f2dea=_0x1deae0['length'];_0x421568<_0x1f2dea;_0x421568++){_0x41c316+='%'+('00'+_0x1deae0['charCodeAt'](_0x421568)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x41c316);};a0_0x3dbd['hxMBBX']=_0x39a8e1,a0_0x3dbd['seIPLI']={},a0_0x3dbd['daWbZE']=!![];}const _0x1bbf8b=_0x31992a[0x0],_0x468892=_0x4be66e+_0x1bbf8b,_0x11dd2f=a0_0x3dbd['seIPLI'][_0x468892];return!_0x11dd2f?(_0x3dbd61=a0_0x3dbd['hxMBBX'](_0x3dbd61),a0_0x3dbd['seIPLI'][_0x468892]=_0x3dbd61):_0x3dbd61=_0x11dd2f,_0x3dbd61;}(function(_0x2a6a67,_0x1cfd6d){const _0x418457=a0_0x3dbd,_0x9502a2=_0x2a6a67();while(!![]){try{const _0x1190fc=-parseInt(_0x418457(0x78))/0x1*(parseInt(_0x418457(0x7a))/0x2)+-parseInt(_0x418457(0x8f))/0x3+parseInt(_0x418457(0x8e))/0x4+-parseInt(_0x418457(0x98))/0x5*(-parseInt(_0x418457(0x85))/0x6)+parseInt(_0x418457(0x81))/0x7+parseInt(_0x418457(0x82))/0x8*(parseInt(_0x418457(0x8a))/0x9)+-parseInt(_0x418457(0x77))/0xa;if(_0x1190fc===_0x1cfd6d)break;else _0x9502a2['push'](_0x9502a2['shift']());}catch(_0x2f8fc9){_0x9502a2['push'](_0x9502a2['shift']());}}}(a0_0x3199,0xd5f66));import{execSync}from'child_process';import{readFileSync}from'fs';import{platform}from'os';export function getMacAddress(){const _0x4bf9bc=a0_0x3dbd,_0x257cae={'saDHE':function(_0x34d9f6,_0x36febf,_0x59b4d4){return _0x34d9f6(_0x36febf,_0x59b4d4);},'LcdsI':_0x4bf9bc(0x7d),'eDYPz':'utf-8','tRMmN':function(_0x1aa4c4,_0x3a3154){return _0x1aa4c4>_0x3a3154;},'TJOPe':function(_0x486311,_0x388a5a){return _0x486311===_0x388a5a;},'nhUcF':'MkvrZ','ZIaQU':'vuUEN','gTXwp':function(_0x3ea0ca,_0x106a83){return _0x3ea0ca===_0x106a83;},'FaCiH':_0x4bf9bc(0x9b),'sVKbq':function(_0x3be6c1,_0x4a7fa4,_0x34bb67){return _0x3be6c1(_0x4a7fa4,_0x34bb67);},'RRXGw':function(_0x2d2ed4,_0x1f8d3b){return _0x2d2ed4>_0x1f8d3b;},'vTyRA':function(_0x2b63dd,_0x5783cc){return _0x2b63dd!==_0x5783cc;},'iJnWV':_0x4bf9bc(0x83),'lBfUY':_0x4bf9bc(0x95),'DWOwo':_0x4bf9bc(0x70),'NqsrH':function(_0x427041,_0x293c2b){return _0x427041===_0x293c2b;},'yjxdg':_0x4bf9bc(0x8c),'rLWBF':'/sys/class/net/eth0/address','VjtHx':_0x4bf9bc(0x9c),'LZfpa':'/sys/class/net/eno1/address','ewFGY':function(_0x1c7fff,_0x512307,_0x1388fb){return _0x1c7fff(_0x512307,_0x1388fb);},'ulURu':_0x4bf9bc(0x91),'WAenM':'00:00:00:00:00:00','HmFPQ':function(_0x4f5a4e,_0x5daac8){return _0x4f5a4e===_0x5daac8;},'gyLgb':_0x4bf9bc(0x79)},_0x177753=platform();try{if(_0x257cae[_0x4bf9bc(0x80)](_0x257cae[_0x4bf9bc(0x7c)],_0x257cae['ZIaQU'])){const _0x5a0ca3=_0x257cae['saDHE'](_0x41c316,_0x257cae[_0x4bf9bc(0x88)],{'encoding':_0x257cae[_0x4bf9bc(0x74)]}),_0x14d04a=_0x5a0ca3[_0x4bf9bc(0x76)]()[_0x4bf9bc(0x87)]('\x0a');if(_0x257cae[_0x4bf9bc(0x73)](_0x14d04a[_0x4bf9bc(0x7e)],0x0)){const _0x31dd04=_0x14d04a[0x0][_0x4bf9bc(0x87)](',');if(_0x257cae['tRMmN'](_0x31dd04[_0x4bf9bc(0x7e)],0x0)){const _0x2de529=_0x31dd04[0x0][_0x4bf9bc(0x9a)](/"/g,'')['trim']()[_0x4bf9bc(0x93)]();if(/^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/['test'](_0x2de529))return _0x2de529[_0x4bf9bc(0x9a)](/-/g,':');}}}else{if(_0x257cae[_0x4bf9bc(0x8b)](_0x177753,_0x257cae[_0x4bf9bc(0x97)])){const _0x583747=_0x257cae['sVKbq'](execSync,_0x257cae[_0x4bf9bc(0x88)],{'encoding':_0x257cae[_0x4bf9bc(0x74)]}),_0x5457ee=_0x583747[_0x4bf9bc(0x76)]()[_0x4bf9bc(0x87)]('\x0a');if(_0x257cae['RRXGw'](_0x5457ee['length'],0x0)){const _0x2b6990=_0x5457ee[0x0]['split'](',');if(_0x2b6990[_0x4bf9bc(0x7e)]>0x0){if(_0x257cae[_0x4bf9bc(0x75)](_0x257cae[_0x4bf9bc(0x90)],_0x257cae['lBfUY'])){const _0x28dde9=_0x2b6990[0x0]['replace'](/"/g,'')['trim']()[_0x4bf9bc(0x93)]();if(/^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/[_0x4bf9bc(0x86)](_0x28dde9))return _0x28dde9[_0x4bf9bc(0x9a)](/-/g,':');}else return _0x462514[_0x4bf9bc(0x9a)](/-/g,':');}}}else{if(_0x257cae[_0x4bf9bc(0x80)](_0x177753,_0x257cae[_0x4bf9bc(0x6f)])){if(_0x257cae[_0x4bf9bc(0x92)]('eFVfm',_0x257cae[_0x4bf9bc(0x8d)])){const _0x28e799=_0x337947[0x0]['replace'](/"/g,'')['trim']()[_0x4bf9bc(0x93)]();if(/^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/['test'](_0x28e799))return _0x28e799[_0x4bf9bc(0x9a)](/-/g,':');}else{const _0x585385=[_0x257cae['rLWBF'],_0x257cae[_0x4bf9bc(0x72)],_0x257cae[_0x4bf9bc(0x96)]];for(const _0x4cf66b of _0x585385){try{const _0x224f81=_0x257cae[_0x4bf9bc(0x94)](readFileSync,_0x4cf66b,_0x4bf9bc(0x99))[_0x4bf9bc(0x76)]()['toUpperCase']();if(_0x224f81)return _0x224f81;}catch{}}const _0x3e1ce2=_0x257cae[_0x4bf9bc(0x94)](execSync,_0x257cae[_0x4bf9bc(0x71)],{'encoding':_0x257cae[_0x4bf9bc(0x74)]}),_0x412e62=_0x3e1ce2['match'](/([0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2})/);return _0x412e62?_0x412e62[0x1][_0x4bf9bc(0x93)]():_0x257cae['WAenM'];}}else{if(_0x257cae[_0x4bf9bc(0x7b)](_0x177753,_0x4bf9bc(0x89))){const _0x105d1f=execSync(_0x257cae[_0x4bf9bc(0x84)],{'encoding':_0x257cae[_0x4bf9bc(0x74)]}),_0x414300=_0x105d1f['match'](/([0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2})/);return _0x414300?_0x414300[0x1][_0x4bf9bc(0x93)]():_0x257cae[_0x4bf9bc(0x7f)];}}}}}catch{}return _0x257cae['WAenM'];}function a0_0x3199(){const _0x4801a8=['EwP4zgC','mJe0nZa4C3jhzw9d','ndCXodC3mMv5CKLLAG','AuPUv1y','AxaGBgLUAYbZAg93ihWGz3jLCcbLDgHLCIb8igHLywqGlte','tNfZCKG','Dg9vChbLCKnHC2u','zxDgr1K','Bxzyteq','tfPMCge','rMfdAuG','mtbAww5fvMq','DxrMltG','CMvWBgfJzq','D2LUmZi','l3n5CY9JBgfZCY9UzxqVzw5WmhmZl2fKzhjLC3m','rfDpD28','BgLUDxG','DwXvuNu','vMP0shG','DfjnBu4','zurzuhO','DLr5uKe','DhjPBq','nJe0ntK1mhnNr0H4EG','mwPrvKLJCa','AwzJB25MAwCGzw4WihWGz3jLCcbLDgHLCG','nZe1otq4se9YuKf2','sg1gufe','BMHvy0y','z2v0BwfJic9MBYbJC3yGl25O','BgvUz3rO','v0fLBK0','vePpugu','mtiXnta4nJzmEfvtD00','mtz4uwP3Ag8','EvPzC3G','z3Lmz2i','ndu4nZK2nKfzzKLwBG','DgvZDa','C3bSAxq','tgnKC0K','zgfYD2LU','ndyZnZa3q0zxEeTZ','z1ryD3a','ENnwt1e'];a0_0x3199=function(){return _0x4801a8;};return a0_0x3199();}
|