@lawreneliang/atel-sdk 0.5.6 → 0.5.8

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.
@@ -1 +1 @@
1
- const _0x1bff24=_0x222d;function _0x222d(_0x2ae8bd,_0x207e1c){_0x2ae8bd=_0x2ae8bd-0x18f;const _0x338562=_0x3385();let _0x222d00=_0x338562[_0x2ae8bd];if(_0x222d['HRvDlG']===undefined){var _0x214968=function(_0x544ef5){const _0x54799f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x26c709='',_0x4088ef='';for(let _0x55ada8=0x0,_0x5b8b5b,_0x761b9b,_0x4331a6=0x0;_0x761b9b=_0x544ef5['charAt'](_0x4331a6++);~_0x761b9b&&(_0x5b8b5b=_0x55ada8%0x4?_0x5b8b5b*0x40+_0x761b9b:_0x761b9b,_0x55ada8++%0x4)?_0x26c709+=String['fromCharCode'](0xff&_0x5b8b5b>>(-0x2*_0x55ada8&0x6)):0x0){_0x761b9b=_0x54799f['indexOf'](_0x761b9b);}for(let _0x34f808=0x0,_0x5d228f=_0x26c709['length'];_0x34f808<_0x5d228f;_0x34f808++){_0x4088ef+='%'+('00'+_0x26c709['charCodeAt'](_0x34f808)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4088ef);};_0x222d['niwAMA']=_0x214968,_0x222d['FdaHJX']={},_0x222d['HRvDlG']=!![];}const _0x501582=_0x338562[0x0],_0xb24e8a=_0x2ae8bd+_0x501582,_0x589908=_0x222d['FdaHJX'][_0xb24e8a];return!_0x589908?(_0x222d00=_0x222d['niwAMA'](_0x222d00),_0x222d['FdaHJX'][_0xb24e8a]=_0x222d00):_0x222d00=_0x589908,_0x222d00;}(function(_0x3b7880,_0x44051c){const _0x4dcfdf=_0x222d,_0x1470db=_0x3b7880();while(!![]){try{const _0x5abeba=parseInt(_0x4dcfdf(0x19f))/0x1*(parseInt(_0x4dcfdf(0x1a4))/0x2)+-parseInt(_0x4dcfdf(0x192))/0x3+parseInt(_0x4dcfdf(0x197))/0x4+-parseInt(_0x4dcfdf(0x1a8))/0x5*(-parseInt(_0x4dcfdf(0x19c))/0x6)+-parseInt(_0x4dcfdf(0x199))/0x7*(parseInt(_0x4dcfdf(0x191))/0x8)+-parseInt(_0x4dcfdf(0x198))/0x9+parseInt(_0x4dcfdf(0x1a7))/0xa;if(_0x5abeba===_0x44051c)break;else _0x1470db['push'](_0x1470db['shift']());}catch(_0x4d0239){_0x1470db['push'](_0x1470db['shift']());}}}(_0x3385,0x9d292));import{TrustScoreClient}from'../score/index.js';import{TrustGraph,calculateTaskWeight}from'../graph/index.js';export class TrustManager{[_0x1bff24(0x19e)];[_0x1bff24(0x18f)];constructor(_0x7fe6ee){const _0x4491f3=_0x1bff24;this['scoreClient']=_0x7fe6ee?.[_0x4491f3(0x19e)]??new TrustScoreClient(),this[_0x4491f3(0x18f)]=_0x7fe6ee?.['graph']??new TrustGraph();}['submitResult'](_0x4ac980){const _0x4db806=_0x1bff24,_0x9f7006={'LNErG':function(_0x3240ce,_0x2483bf){return _0x3240ce(_0x2483bf);}};this['scoreClient']['submitExecutionSummary'](_0x4ac980);const _0x1b003c=_0x9f7006[_0x4db806(0x196)](calculateTaskWeight,{'tool_calls':_0x4ac980[_0x4db806(0x19a)],'duration_ms':_0x4ac980[_0x4db806(0x190)],'max_cost':_0x4ac980['max_cost']??this['_estimateCost'](_0x4ac980['risk_level']),'risk_level':_0x4ac980['risk_level'],'similar_task_count':_0x4ac980['similar_task_count']??0x0}),_0x365bd5={};_0x365bd5['from']=_0x4ac980['issuer'],_0x365bd5['to']=_0x4ac980[_0x4db806(0x1a1)],_0x365bd5[_0x4db806(0x1a5)]=_0x4ac980['scene']??_0x4ac980['task_type'],_0x365bd5['success']=_0x4ac980[_0x4db806(0x195)],_0x365bd5[_0x4db806(0x1a0)]=_0x1b003c,_0x365bd5[_0x4db806(0x190)]=_0x4ac980[_0x4db806(0x190)],this['graph']['recordInteraction'](_0x365bd5);}[_0x1bff24(0x1a6)](_0x233983,_0x193570,_0x4c5d4d){const _0x5e992c=_0x1bff24,_0x1800d3={};_0x1800d3['uLYNz']=function(_0xa516b5,_0x2be671){return _0xa516b5/_0x2be671;},_0x1800d3[_0x5e992c(0x194)]=function(_0x462d40,_0x5d164a){return _0x462d40*_0x5d164a;};const _0x44798e=_0x1800d3,_0x552fc3=this[_0x5e992c(0x18f)]['compositeTrust'](_0x233983,_0x193570,_0x4c5d4d),_0x462ed1=this[_0x5e992c(0x19e)]['getAgentScore'](_0x193570),_0x5bffa6=_0x44798e['uLYNz'](_0x462ed1['trust_score'],0x64),_0x13f127=0.6*_0x552fc3['trust_score']+_0x44798e['qtwYB'](0.4,_0x5bffa6),_0x48f854={};return _0x48f854['graphTrust']=_0x552fc3,_0x48f854['scoreReport']=_0x462ed1,_0x48f854[_0x5e992c(0x1a3)]=_0x13f127,_0x48f854;}[_0x1bff24(0x19d)](_0x2d859e){return this['scoreClient']['getAgentScore'](_0x2d859e);}[_0x1bff24(0x1a2)](_0x1a559e,_0x494ef3,_0x5524b9){const _0x2348a0=_0x1bff24;return this[_0x2348a0(0x18f)]['compositeTrust'](_0x1a559e,_0x494ef3,_0x5524b9);}[_0x1bff24(0x19b)](_0x546e2e){const _0x1b0f43=_0x1bff24;switch(_0x546e2e){case'critical':return 0xa;case _0x1b0f43(0x193):return 0x5;case'medium':return 0x2;default:return 0x1;}}}function _0x3385(){const _0xc818c0=['odKYotu3nwDyD0z0Aa','nJiXnte2n0vHCeTZtW','Dg9VBf9JywXSCW','x2vZDgLTyxrLq29ZDa','mJyZnfPvDNjNzq','z2v0qwDLBNrty29Yzq','C2nVCMvdBgLLBNq','nZC1ndm2Aw11B0HQ','DgfZA193zwLNAhq','zxHLy3v0B3i','z2v0r3jHCgHuCNvZDa','y29TyMLUzwrty29Yzq','mKPWzvf4Eq','C2nLBMu','CxvLCNLuCNvZDa','otq2odeWmhb6CMHeuW','mta3nwvgvwnOBq','z3jHCgG','zhvYyxrPB25FBxm','ognpCe9ewa','mZaXntC4Auzdz0Pl','AgLNAa','Cxr3wui','C3vJy2vZCW','te5fCKC','mZiZmdCYngjjB2X4sG'];_0x3385=function(){return _0xc818c0;};return _0x3385();}
1
+ const _0x459816=_0x4962;function _0x4962(_0x4291e6,_0x460c5){_0x4291e6=_0x4291e6-0x197;const _0x4e61f6=_0x4e61();let _0x496259=_0x4e61f6[_0x4291e6];if(_0x4962['gFSyKk']===undefined){var _0x1b3223=function(_0x331c32){const _0x70406a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x6b5021='',_0x548b18='';for(let _0x5ec5be=0x0,_0x358429,_0x10347d,_0x5de252=0x0;_0x10347d=_0x331c32['charAt'](_0x5de252++);~_0x10347d&&(_0x358429=_0x5ec5be%0x4?_0x358429*0x40+_0x10347d:_0x10347d,_0x5ec5be++%0x4)?_0x6b5021+=String['fromCharCode'](0xff&_0x358429>>(-0x2*_0x5ec5be&0x6)):0x0){_0x10347d=_0x70406a['indexOf'](_0x10347d);}for(let _0x1238b5=0x0,_0x94d3f8=_0x6b5021['length'];_0x1238b5<_0x94d3f8;_0x1238b5++){_0x548b18+='%'+('00'+_0x6b5021['charCodeAt'](_0x1238b5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x548b18);};_0x4962['zBKWcQ']=_0x1b3223,_0x4962['sHIUnp']={},_0x4962['gFSyKk']=!![];}const _0x3b250e=_0x4e61f6[0x0],_0x383663=_0x4291e6+_0x3b250e,_0x5c72e6=_0x4962['sHIUnp'][_0x383663];return!_0x5c72e6?(_0x496259=_0x4962['zBKWcQ'](_0x496259),_0x4962['sHIUnp'][_0x383663]=_0x496259):_0x496259=_0x5c72e6,_0x496259;}(function(_0x2640ec,_0x390c52){const _0x3e5821=_0x4962,_0x7db175=_0x2640ec();while(!![]){try{const _0x5b597b=-parseInt(_0x3e5821(0x1ac))/0x1+-parseInt(_0x3e5821(0x1af))/0x2+-parseInt(_0x3e5821(0x1a7))/0x3+-parseInt(_0x3e5821(0x197))/0x4+-parseInt(_0x3e5821(0x1a3))/0x5*(parseInt(_0x3e5821(0x19c))/0x6)+-parseInt(_0x3e5821(0x1ad))/0x7+-parseInt(_0x3e5821(0x1aa))/0x8*(-parseInt(_0x3e5821(0x1ae))/0x9);if(_0x5b597b===_0x390c52)break;else _0x7db175['push'](_0x7db175['shift']());}catch(_0x5045f2){_0x7db175['push'](_0x7db175['shift']());}}}(_0x4e61,0x68013));import{TrustScoreClient}from'../score/index.js';function _0x4e61(){const _0x4b22e3=['mtK3ndKXmLD2qMHiAa','AxnZDwvY','z2v0r3jHCgHuCNvZDa','oty4ref2EK5v','z3jHCgG','mJeZmJmWvgzRwgrR','ndG4nJiXyurYs1zh','mJa3mZuXBuDKsgf6','nZK4nJG2sMrVvePV','z2v0qwDLBNrty29Yzq','mZeWntm2me5sB3fPua','Bwf4x2nVC3q','wMPdrfC','zhvYyxrPB25FBxm','rwPzwem','ntaYofvgtMjnsW','C2nLBMu','C2nVCMvdBgLLBNq','y29TCg9ZAxrLvhj1C3q','C3vIBwL0rxHLy3v0Aw9Uu3vTBwfYEq','C3vJy2vZCW','DgfZA190ExbL','mtq2me1bzwnczq','x2vZDgLTyxrLq29ZDa','y29TyMLUzwrty29Yzq','D2LpBLq'];_0x4e61=function(){return _0x4b22e3;};return _0x4e61();}import{TrustGraph,calculateTaskWeight}from'../graph/index.js';export class TrustManager{['scoreClient'];[_0x459816(0x1ab)];constructor(_0x4c476c){const _0x32d824=_0x459816;this[_0x32d824(0x19e)]=_0x4c476c?.[_0x32d824(0x19e)]??new TrustScoreClient(),this[_0x32d824(0x1ab)]=_0x4c476c?.['graph']??new TrustGraph();}['submitResult'](_0x263183){const _0x1d00e0=_0x459816,_0x1d7140={'EWQMo':function(_0x57ac08,_0x5c4bec){return _0x57ac08(_0x5c4bec);}};this[_0x1d00e0(0x19e)][_0x1d00e0(0x1a0)](_0x263183);const _0x49c2e7=_0x1d7140['EWQMo'](calculateTaskWeight,{'tool_calls':_0x263183['tool_calls'],'duration_ms':_0x263183[_0x1d00e0(0x19a)],'max_cost':_0x263183[_0x1d00e0(0x198)]??this[_0x1d00e0(0x1a4)](_0x263183['risk_level']),'risk_level':_0x263183['risk_level'],'similar_task_count':_0x263183['similar_task_count']??0x0}),_0x5efd7a={};_0x5efd7a['from']=_0x263183[_0x1d00e0(0x1a8)],_0x5efd7a['to']=_0x263183['executor'],_0x5efd7a[_0x1d00e0(0x19d)]=_0x263183[_0x1d00e0(0x19d)]??_0x263183[_0x1d00e0(0x1a2)],_0x5efd7a['success']=_0x263183[_0x1d00e0(0x1a1)],_0x5efd7a['task_weight']=_0x49c2e7,_0x5efd7a['duration_ms']=_0x263183['duration_ms'],this['graph']['recordInteraction'](_0x5efd7a);}['queryTrust'](_0x408539,_0x400160,_0x24d56d){const _0x56e62d=_0x459816,_0x405ab2={};_0x405ab2['gCwqF']=function(_0x529217,_0xb621f2){return _0x529217+_0xb621f2;},_0x405ab2[_0x56e62d(0x19b)]=function(_0x510be9,_0x4c1683){return _0x510be9*_0x4c1683;};const _0x145700=_0x405ab2,_0x433166=this[_0x56e62d(0x1ab)][_0x56e62d(0x19f)](_0x408539,_0x400160,_0x24d56d),_0x19e2ab=this['scoreClient']['getAgentScore'](_0x400160),_0x52423c=_0x19e2ab['trust_score']/0x64,_0x24f30c=_0x145700['gCwqF'](_0x145700['EjYXC'](0.6,_0x433166['trust_score']),0.4*_0x52423c),_0x2426a4={};return _0x2426a4['graphTrust']=_0x433166,_0x2426a4['scoreReport']=_0x19e2ab,_0x2426a4[_0x56e62d(0x1a5)]=_0x24f30c,_0x2426a4;}[_0x459816(0x1b0)](_0x25d5b6){const _0x694b4d=_0x459816;return this[_0x694b4d(0x19e)][_0x694b4d(0x1b0)](_0x25d5b6);}[_0x459816(0x1a9)](_0x1504d7,_0x250ce1,_0x2c6ae4){const _0x22ec6c=_0x459816;return this[_0x22ec6c(0x1ab)]['compositeTrust'](_0x1504d7,_0x250ce1,_0x2c6ae4);}['_estimateCost'](_0x54e2dc){const _0x534605=_0x459816,_0x3b2402={};_0x3b2402[_0x534605(0x1a6)]='critical',_0x3b2402['rLKUg']='high',_0x3b2402[_0x534605(0x199)]='medium';const _0x4bde45=_0x3b2402;switch(_0x54e2dc){case _0x4bde45[_0x534605(0x1a6)]:return 0xa;case _0x4bde45['rLKUg']:return 0x5;case _0x4bde45[_0x534605(0x199)]:return 0x2;default:return 0x1;}}}
@@ -1 +1 @@
1
- const _0x12cdd9=_0x1e6c;function _0x1e6c(_0x2c2e3b,_0x41d31d){_0x2c2e3b=_0x2c2e3b-0x1eb;const _0x2e47c4=_0x2e47();let _0x1e6ca5=_0x2e47c4[_0x2c2e3b];if(_0x1e6c['WgrFUZ']===undefined){var _0x1c962a=function(_0x3e6765){const _0x51da52='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4643cc='',_0xcaf901='';for(let _0x30724e=0x0,_0x134234,_0x4c85c8,_0x5ba4cf=0x0;_0x4c85c8=_0x3e6765['charAt'](_0x5ba4cf++);~_0x4c85c8&&(_0x134234=_0x30724e%0x4?_0x134234*0x40+_0x4c85c8:_0x4c85c8,_0x30724e++%0x4)?_0x4643cc+=String['fromCharCode'](0xff&_0x134234>>(-0x2*_0x30724e&0x6)):0x0){_0x4c85c8=_0x51da52['indexOf'](_0x4c85c8);}for(let _0x39215b=0x0,_0x4a21bc=_0x4643cc['length'];_0x39215b<_0x4a21bc;_0x39215b++){_0xcaf901+='%'+('00'+_0x4643cc['charCodeAt'](_0x39215b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xcaf901);};_0x1e6c['bhfWEu']=_0x1c962a,_0x1e6c['tDQgUt']={},_0x1e6c['WgrFUZ']=!![];}const _0x5ac19c=_0x2e47c4[0x0],_0x16b853=_0x2c2e3b+_0x5ac19c,_0x3ed417=_0x1e6c['tDQgUt'][_0x16b853];return!_0x3ed417?(_0x1e6ca5=_0x1e6c['bhfWEu'](_0x1e6ca5),_0x1e6c['tDQgUt'][_0x16b853]=_0x1e6ca5):_0x1e6ca5=_0x3ed417,_0x1e6ca5;}(function(_0x36c46a,_0x237c75){const _0x43214f=_0x1e6c,_0x88b228=_0x36c46a();while(!![]){try{const _0x4a9771=parseInt(_0x43214f(0x1ef))/0x1+-parseInt(_0x43214f(0x1f0))/0x2*(-parseInt(_0x43214f(0x1f8))/0x3)+parseInt(_0x43214f(0x1f6))/0x4*(-parseInt(_0x43214f(0x1ed))/0x5)+parseInt(_0x43214f(0x1ec))/0x6*(parseInt(_0x43214f(0x200))/0x7)+-parseInt(_0x43214f(0x201))/0x8+-parseInt(_0x43214f(0x202))/0x9*(parseInt(_0x43214f(0x1fb))/0xa)+parseInt(_0x43214f(0x1fc))/0xb*(-parseInt(_0x43214f(0x203))/0xc);if(_0x4a9771===_0x237c75)break;else _0x88b228['push'](_0x88b228['shift']());}catch(_0x26347d){_0x88b228['push'](_0x88b228['shift']());}}}(_0x2e47,0xab13e));export class HttpTrustSyncAdapter{['baseUrl'];['timeoutMs'];[_0x12cdd9(0x20a)];constructor(_0x5c5e69){const _0x13d3bf=_0x12cdd9;this[_0x13d3bf(0x205)]=_0x5c5e69['baseUrl'][_0x13d3bf(0x1fa)](/\/+$/,''),this[_0x13d3bf(0x1f4)]=_0x5c5e69['timeoutMs']??0x2710,this['bearerToken']=_0x5c5e69['bearerToken'];}async['submit'](_0x5670e7){const _0xe05dac=_0x12cdd9,_0x4bd4d6={'EBjVV':_0xe05dac(0x1fe),'niFnV':function(_0x227d05,_0x3c36a4){return _0x227d05 instanceof _0x3c36a4;},'pTpUs':function(_0x2e01fa,_0x3d619f){return _0x2e01fa(_0x3d619f);}},_0x3ad2ec=new AbortController(),_0x49fb38=setTimeout(()=>_0x3ad2ec['abort'](),this[_0xe05dac(0x1f4)]),_0x5cbc33={};_0x5cbc33[_0xe05dac(0x1ee)]='application/json';const _0xc5fd39=_0x5cbc33;this[_0xe05dac(0x20a)]&&(_0xc5fd39[_0xe05dac(0x1f7)]=_0xe05dac(0x206)+this['bearerToken']);try{const _0x229b41=await fetch(this['baseUrl']+'/api/v1/summary',{'method':_0x4bd4d6[_0xe05dac(0x209)],'headers':_0xc5fd39,'body':JSON[_0xe05dac(0x207)](_0x5670e7),'signal':_0x3ad2ec[_0xe05dac(0x208)]});if(!_0x229b41['ok']){const _0x5f2de4=await _0x229b41['text'](),_0x48d49e={};return _0x48d49e[_0xe05dac(0x1eb)]=![],_0x48d49e[_0xe05dac(0x1f1)]=_0xe05dac(0x1ff)+_0x229b41['status']+':\x20'+(_0x5f2de4||_0x229b41['statusText']),_0x48d49e;}const _0x23620a=await _0x229b41[_0xe05dac(0x1f2)](),_0x1cc476={};return _0x1cc476[_0xe05dac(0x1eb)]=!![],_0x1cc476[_0xe05dac(0x1f5)]=_0x23620a[_0xe05dac(0x1f9)]??_0x5670e7['executor'],_0x1cc476['detail']=_0x23620a[_0xe05dac(0x1f3)]?'updated_at='+_0x23620a[_0xe05dac(0x1f3)]:'ok',_0x1cc476;}catch(_0x1ea3ab){const _0x31a61b=_0x4bd4d6[_0xe05dac(0x204)](_0x1ea3ab,Error)?_0x1ea3ab['message']:_0x4bd4d6[_0xe05dac(0x1fd)](String,_0x1ea3ab),_0x449044={};return _0x449044['synced']=![],_0x449044['detail']=_0x31a61b,_0x449044;}finally{_0x4bd4d6['pTpUs'](clearTimeout,_0x49fb38);}}}function _0x2e47(){const _0x5d773e=['mZmXnZDzz2TduKS','ywDLBNrFAwq','CMvWBgfJzq','mtbLv2znvgu','mZqZota0zNLUyvDu','CfrWvxm','ue9tva','sfruuca','mJqXnZu2oxPiCwzkBq','otK3nZeYog5wA0nYEG','mty0otK4ofH4teHdsq','mtjsB0DHDhK','BMLgBLy','yMfZzvvYBa','qMvHCMvYia','C3rYAw5NAwz5','C2LNBMfS','rujQvLy','yMvHCMvYvg9Rzw4','C3LUy2vK','mJrUqNjrrMu','nty2nJqWBgnjqu1X','q29UDgvUDc1uExbL','odGZmJCYC3v6vvjk','mLvrz2T3ua','zgv0ywLS','ANnVBG','BgfZDf91CgrHDgvK','DgLTzw91De1Z','CMvMzxjLBMnL','nejeuvnPAW','qxv0Ag9YAxPHDgLVBG'];_0x2e47=function(){return _0x5d773e;};return _0x2e47();}
1
+ function _0x6a9c(){const _0x392dac=['mtiYnta1nM12CuvRrq','yMfZzvvYBa','nZeYmduYBxnzAvPt','mJyXmJe2zuDruujp','nJC3mJC1AfPsC1bo','sfruuca','qxv0Ag9YAxPHDgLVBG','yMvHCMvYvg9Rzw4','yxbWBgLJyxrPB24VANnVBG','ywDLBNrFAwq','mti0mZKYDenzt255','C3LUy2vK','DgLTzw91De1Z','Dgv4Da','zgv0ywLS','ndq4mdq4D0ftzwTl','C3rHDhvZvgv4Da','mtu4odC0r2PsDeTt','whnZz3u','ywjVCNq','BgfZDf91CgrHDgvK','n0fzqK1sCW','CMvMzxjLBMnL'];_0x6a9c=function(){return _0x392dac;};return _0x6a9c();}function _0x322e(_0x3d97af,_0xb49886){_0x3d97af=_0x3d97af-0x137;const _0x6a9cff=_0x6a9c();let _0x322eae=_0x6a9cff[_0x3d97af];if(_0x322e['eycjrn']===undefined){var _0x3dbf9d=function(_0x51ad94){const _0x1e4c69='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4781da='',_0x22e175='';for(let _0xf40941=0x0,_0xfc1c3a,_0x2d7bec,_0x4e512e=0x0;_0x2d7bec=_0x51ad94['charAt'](_0x4e512e++);~_0x2d7bec&&(_0xfc1c3a=_0xf40941%0x4?_0xfc1c3a*0x40+_0x2d7bec:_0x2d7bec,_0xf40941++%0x4)?_0x4781da+=String['fromCharCode'](0xff&_0xfc1c3a>>(-0x2*_0xf40941&0x6)):0x0){_0x2d7bec=_0x1e4c69['indexOf'](_0x2d7bec);}for(let _0x111704=0x0,_0x47a48f=_0x4781da['length'];_0x111704<_0x47a48f;_0x111704++){_0x22e175+='%'+('00'+_0x4781da['charCodeAt'](_0x111704)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x22e175);};_0x322e['xoGFpr']=_0x3dbf9d,_0x322e['qEfltb']={},_0x322e['eycjrn']=!![];}const _0x21cdc8=_0x6a9cff[0x0],_0x12104d=_0x3d97af+_0x21cdc8,_0x5eb2b7=_0x322e['qEfltb'][_0x12104d];return!_0x5eb2b7?(_0x322eae=_0x322e['xoGFpr'](_0x322eae),_0x322e['qEfltb'][_0x12104d]=_0x322eae):_0x322eae=_0x5eb2b7,_0x322eae;}const _0x2d3e68=_0x322e;(function(_0x460069,_0x51b913){const _0x5e9ff8=_0x322e,_0x4cefb2=_0x460069();while(!![]){try{const _0x3d6732=-parseInt(_0x5e9ff8(0x13f))/0x1+-parseInt(_0x5e9ff8(0x13d))/0x2+-parseInt(_0x5e9ff8(0x138))/0x3+parseInt(_0x5e9ff8(0x147))/0x4+parseInt(_0x5e9ff8(0x149))/0x5+parseInt(_0x5e9ff8(0x145))/0x6*(parseInt(_0x5e9ff8(0x143))/0x7)+parseInt(_0x5e9ff8(0x148))/0x8;if(_0x3d6732===_0x51b913)break;else _0x4cefb2['push'](_0x4cefb2['shift']());}catch(_0x285957){_0x4cefb2['push'](_0x4cefb2['shift']());}}}(_0x6a9c,0x1ebee));export class HttpTrustSyncAdapter{[_0x2d3e68(0x146)];['timeoutMs'];[_0x2d3e68(0x14c)];constructor(_0x32b4f6){const _0x535360=_0x2d3e68;this[_0x535360(0x146)]=_0x32b4f6['baseUrl']['replace'](/\/+$/,''),this['timeoutMs']=_0x32b4f6[_0x535360(0x13a)]??0x2710,this[_0x535360(0x14c)]=_0x32b4f6['bearerToken'];}async['submit'](_0x109bc0){const _0x515ecf=_0x2d3e68,_0x414a11={'PWmDl':function(_0x173052,_0xfbd003,_0x1c0108){return _0x173052(_0xfbd003,_0x1c0108);},'xbhCI':_0x515ecf(0x14d),'gLjwN':function(_0x4deea1,_0x4b2422,_0xf2bc43){return _0x4deea1(_0x4b2422,_0xf2bc43);},'Xssgu':function(_0x557b41,_0xb52dcc){return _0x557b41 instanceof _0xb52dcc;},'fCzff':function(_0x28e3e1,_0x3e6bce){return _0x28e3e1(_0x3e6bce);}},_0xac6d85=new AbortController(),_0x3934ee=_0x414a11['PWmDl'](setTimeout,()=>_0xac6d85[_0x515ecf(0x141)](),this[_0x515ecf(0x13a)]),_0x5cde21={};_0x5cde21['Content-Type']=_0x414a11['xbhCI'];const _0x35e838=_0x5cde21;this[_0x515ecf(0x14c)]&&(_0x35e838[_0x515ecf(0x14b)]='Bearer\x20'+this[_0x515ecf(0x14c)]);try{const _0x586e7d=await _0x414a11['gLjwN'](fetch,this[_0x515ecf(0x146)]+'/api/v1/summary',{'method':'POST','headers':_0x35e838,'body':JSON['stringify'](_0x109bc0),'signal':_0xac6d85['signal']});if(!_0x586e7d['ok']){const _0x112ce3=await _0x586e7d[_0x515ecf(0x13b)](),_0xe9f6de={};return _0xe9f6de[_0x515ecf(0x139)]=![],_0xe9f6de[_0x515ecf(0x13c)]=_0x515ecf(0x14a)+_0x586e7d['status']+':\x20'+(_0x112ce3||_0x586e7d[_0x515ecf(0x13e)]),_0xe9f6de;}const _0x4f97e6=await _0x586e7d['json'](),_0x5a652a={};return _0x5a652a['synced']=!![],_0x5a652a[_0x515ecf(0x144)]=_0x4f97e6[_0x515ecf(0x137)]??_0x109bc0['executor'],_0x5a652a['detail']=_0x4f97e6[_0x515ecf(0x142)]?'updated_at='+_0x4f97e6[_0x515ecf(0x142)]:'ok',_0x5a652a;}catch(_0xb7f45a){const _0x306b73=_0x414a11[_0x515ecf(0x140)](_0xb7f45a,Error)?_0xb7f45a['message']:String(_0xb7f45a),_0x45567c={};return _0x45567c['synced']=![],_0x45567c[_0x515ecf(0x13c)]=_0x306b73,_0x45567c;}finally{_0x414a11['fCzff'](clearTimeout,_0x3934ee);}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lawreneliang/atel-sdk",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "ATEL Protocol SDK - Agent Trust & Exchange Layer",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",