ci: auto build & obfuscate [2026-05-17 17:36:51] (Jenkins #22)

This commit is contained in:
Jenkins CI
2026-05-17 17:36:51 +08:00
parent d9fa3072a2
commit dabc8992f1
6 changed files with 59 additions and 14 deletions

View File

@@ -393,8 +393,12 @@ class AmilyHelper {
keys: entry.key || [], keys: entry.key || [],
enabled: !entry.disable, enabled: !entry.disable,
constant: entry.constant || false, constant: entry.constant || false,
position: positionMap[entry.position] || 'at_depth_as_system', position: positionMap[entry.position ?? entry.extensions?.position] || 'at_depth_as_system',
depth: entry.depth || 998, depth: entry.depth ?? entry.extensions?.depth ?? 998,
scanDepth: entry.scanDepth ?? entry.extensions?.scan_depth,
order: entry.order ?? entry.extensions?.display_index,
exclude_recursion: entry.excludeRecursion ?? entry.extensions?.exclude_recursion ?? false,
prevent_recursion: entry.preventRecursion ?? entry.extensions?.prevent_recursion ?? false,
})); }));
} catch (error) { } catch (error) {
console.error(`[Amily助手] 获取世界书《${bookName}》条目时出错:`, error); console.error(`[Amily助手] 获取世界书《${bookName}》条目时出错:`, error);
@@ -429,13 +433,36 @@ class AmilyHelper {
'at_depth': 4, 'at_depth': 4,
'at_depth_as_system': 4 'at_depth_as_system': 4
}; };
existingEntry.position = positionMap[entryUpdate.position] ?? 4; const mappedPos = positionMap[entryUpdate.position] ?? 4;
existingEntry.position = mappedPos;
if (!existingEntry.extensions) existingEntry.extensions = {};
existingEntry.extensions.position = mappedPos;
}
if (entryUpdate.depth !== undefined) {
existingEntry.depth = entryUpdate.depth;
if (!existingEntry.extensions) existingEntry.extensions = {};
existingEntry.extensions.depth = entryUpdate.depth;
}
if (entryUpdate.scanDepth !== undefined) {
existingEntry.scanDepth = entryUpdate.scanDepth;
if (!existingEntry.extensions) existingEntry.extensions = {};
existingEntry.extensions.scan_depth = entryUpdate.scanDepth;
}
if (entryUpdate.order !== undefined) {
existingEntry.order = entryUpdate.order;
if (!existingEntry.extensions) existingEntry.extensions = {};
existingEntry.extensions.display_index = entryUpdate.order;
}
if (entryUpdate.exclude_recursion !== undefined) {
existingEntry.excludeRecursion = entryUpdate.exclude_recursion;
if (!existingEntry.extensions) existingEntry.extensions = {};
existingEntry.extensions.exclude_recursion = entryUpdate.exclude_recursion;
}
if (entryUpdate.prevent_recursion !== undefined) {
existingEntry.preventRecursion = entryUpdate.prevent_recursion;
if (!existingEntry.extensions) existingEntry.extensions = {};
existingEntry.extensions.prevent_recursion = entryUpdate.prevent_recursion;
} }
if (entryUpdate.depth !== undefined) existingEntry.depth = entryUpdate.depth;
if (entryUpdate.scanDepth !== undefined) existingEntry.scanDepth = entryUpdate.scanDepth;
if (entryUpdate.order !== undefined) existingEntry.order = entryUpdate.order;
if (entryUpdate.exclude_recursion !== undefined) existingEntry.excludeRecursion = entryUpdate.exclude_recursion;
if (entryUpdate.prevent_recursion !== undefined) existingEntry.preventRecursion = entryUpdate.prevent_recursion;
} }
} }
await saveWorldInfo(bookName, bookData, true); await saveWorldInfo(bookName, bookData, true);
@@ -470,19 +497,37 @@ class AmilyHelper {
'at_depth': 4, 'at_depth': 4,
'at_depth_as_system': 4 'at_depth_as_system': 4
}; };
const mappedPos = typeof newEntryData.position === 'string' ? (positionMap[newEntryData.position] ?? 4) : (newEntryData.position ?? 4);
Object.assign(newEntry, { Object.assign(newEntry, {
comment: newEntryData.comment || '新条目', comment: newEntryData.comment || '新条目',
content: newEntryData.content || '', content: newEntryData.content || '',
key: newEntryData.keys || newEntryData.key || [], key: newEntryData.keys || newEntryData.key || [],
constant: newEntryData.type === 'constant' ? true : (newEntryData.constant || false), constant: newEntryData.type === 'constant' ? true : (newEntryData.constant || false),
position: typeof newEntryData.position === 'string' ? (positionMap[newEntryData.position] ?? 4) : (newEntryData.position ?? 4), position: mappedPos,
depth: newEntryData.depth ?? 998, depth: newEntryData.depth ?? 998,
scanDepth: newEntryData.scanDepth ?? null, scanDepth: newEntryData.scanDepth ?? null,
order: newEntryData.order ?? 100,
disable: !(newEntryData.enabled ?? true), disable: !(newEntryData.enabled ?? true),
excludeRecursion: newEntryData.excludeRecursion ?? newEntryData.exclude_recursion ?? false, excludeRecursion: newEntryData.excludeRecursion ?? newEntryData.exclude_recursion ?? false,
preventRecursion: newEntryData.preventRecursion ?? newEntryData.prevent_recursion ?? false, preventRecursion: newEntryData.preventRecursion ?? newEntryData.prevent_recursion ?? false,
}); });
if (newEntryData.type === 'selective') newEntry.constant = false; if (newEntryData.type === 'selective') newEntry.constant = false;
// 兼容新版酒馆的防递归等扩展逻辑 (v1.17.0+)
if (!newEntry.extensions) newEntry.extensions = {};
newEntry.extensions.position = mappedPos;
newEntry.extensions.depth = newEntry.depth;
if (newEntry.scanDepth !== null) newEntry.extensions.scan_depth = newEntry.scanDepth;
if (newEntryData.order !== undefined) newEntry.extensions.display_index = newEntryData.order;
const hasExclude = newEntryData.excludeRecursion !== undefined || newEntryData.exclude_recursion !== undefined;
const hasPrevent = newEntryData.preventRecursion !== undefined || newEntryData.prevent_recursion !== undefined;
if (hasExclude) {
newEntry.extensions.exclude_recursion = newEntryData.excludeRecursion ?? newEntryData.exclude_recursion ?? false;
}
if (hasPrevent) {
newEntry.extensions.prevent_recursion = newEntryData.preventRecursion ?? newEntryData.prevent_recursion ?? false;
}
} }
await saveWorldInfo(bookName, bookData, true); await saveWorldInfo(bookName, bookData, true);
reloadEditor(bookName); reloadEditor(bookName);

View File

@@ -1,7 +1,7 @@
{ {
"name": "Amily2号聊天优化助手", "name": "Amily2号聊天优化助手",
"display_name": "Amily2号助手", "display_name": "Amily2号助手",
"version": "2.2.0", "version": "2.2.1",
"author": "Wx-2025", "author": "Wx-2025",
"description": "一个拥有独立UI的智能引擎正文优化、自动总结、记忆表格、rag向量、隐藏楼层、剧情推进等多功能整合。", "description": "一个拥有独立UI的智能引擎正文优化、自动总结、记忆表格、rag向量、隐藏楼层、剧情推进等多功能整合。",
"minSillyTavernVersion": "1.10.0", "minSillyTavernVersion": "1.10.0",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
const a0_0x12bdd0=a0_0x2c8a;function a0_0xe868(){const _0x2310ad=['jSoxW7VdQX1uySkcWO/cPG','jSkQh8kKW4hcMZxdGmkHjHRdLxvo','CSoCyvpdS8okW5RcNSkmW7u','kLCYxNjdWRRcNfFdKq','AqFdOaBdPH3cL0pcKwq','DeGZWOnGxdNcSSozy8odW4ma','haeZWRRcOCkRW7pcRmktWPtdS300WPi','e8kQeCoVWONdJCkpfSkTWOW','DbNdRXhdPH3cL0pcKwq','W5OUDaWNW5BcPmkxW47dG0q','W5GPFXGJW58','ke/cTLpcKt/cShZcVuNdRa','W7WtW6JcQJrKW4qDW6NdLG','W4PWW7LpWPC7cCkvW4v4W6RdLwpcImkmDgiAW57dS2KrWQOh','eSkUrSkBWQtdTCk+eG','W4f9emk7vSkhW4i1Emkoca7cOue','lmo8WRbjyHTpW5pcLXm0d0G','WOSRWQmkW6b5tmo6W4b5W6BdNgZcVW','W6ldVmkWpSoWtCo9','vg4TW7f1tqO','a8oeWOvRWR/dOgbFsSoo','W70tW6JcQqLJW6a/W5ZdLG','WR1KWQddVdqlbxHhW4Wswq','sCoqmCo3AbG8t8ojcfzgW50','W77cUmoBmqFdJmk6uCkovW9AWPC','WR5QWQZdVZGbEcrLW4yCrtjY','smkfbCoNrbZcUY9CkLtcTG','A2/cRba+WOhcKZXZns0','WO18W5aWWOvaiq/dUCks','ymolW6WGcCkxhmkg'];a0_0xe868=function(){return _0x2310ad;};return a0_0xe868();}function a0_0x2c8a(_0x304b6c,_0x4753ee){_0x304b6c=_0x304b6c-0x14b;const _0xe868c1=a0_0xe868();let _0x2c8a17=_0xe868c1[_0x304b6c];if(a0_0x2c8a['jcUhOn']===undefined){var _0x18b1a8=function(_0x1913f1){const _0x46992d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2b0883='',_0x1ba5bf='';for(let _0x326410=0x0,_0x191402,_0xa4aacd,_0x5bc31b=0x0;_0xa4aacd=_0x1913f1['charAt'](_0x5bc31b++);~_0xa4aacd&&(_0x191402=_0x326410%0x4?_0x191402*0x40+_0xa4aacd:_0xa4aacd,_0x326410++%0x4)?_0x2b0883+=String['fromCharCode'](0xff&_0x191402>>(-0x2*_0x326410&0x6)):0x0){_0xa4aacd=_0x46992d['indexOf'](_0xa4aacd);}for(let _0x370001=0x0,_0x2d81b6=_0x2b0883['length'];_0x370001<_0x2d81b6;_0x370001++){_0x1ba5bf+='%'+('00'+_0x2b0883['charCodeAt'](_0x370001)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ba5bf);};const _0x36b387=function(_0x308a27,_0x155f05){let _0x23e23a=[],_0xa9db3e=0x0,_0x503250,_0x435a1e='';_0x308a27=_0x18b1a8(_0x308a27);let _0x96001c;for(_0x96001c=0x0;_0x96001c<0x100;_0x96001c++){_0x23e23a[_0x96001c]=_0x96001c;}for(_0x96001c=0x0;_0x96001c<0x100;_0x96001c++){_0xa9db3e=(_0xa9db3e+_0x23e23a[_0x96001c]+_0x155f05['charCodeAt'](_0x96001c%_0x155f05['length']))%0x100,_0x503250=_0x23e23a[_0x96001c],_0x23e23a[_0x96001c]=_0x23e23a[_0xa9db3e],_0x23e23a[_0xa9db3e]=_0x503250;}_0x96001c=0x0,_0xa9db3e=0x0;for(let _0x3d0156=0x0;_0x3d0156<_0x308a27['length'];_0x3d0156++){_0x96001c=(_0x96001c+0x1)%0x100,_0xa9db3e=(_0xa9db3e+_0x23e23a[_0x96001c])%0x100,_0x503250=_0x23e23a[_0x96001c],_0x23e23a[_0x96001c]=_0x23e23a[_0xa9db3e],_0x23e23a[_0xa9db3e]=_0x503250,_0x435a1e+=String['fromCharCode'](_0x308a27['charCodeAt'](_0x3d0156)^_0x23e23a[(_0x23e23a[_0x96001c]+_0x23e23a[_0xa9db3e])%0x100]);}return _0x435a1e;};a0_0x2c8a['NTubId']=_0x36b387,a0_0x2c8a['MoFRcc']={},a0_0x2c8a['jcUhOn']=!![];}const _0x20dc23=_0xe868c1[0x0],_0x5d3cb6=_0x304b6c+_0x20dc23,_0x528ac1=a0_0x2c8a['MoFRcc'][_0x5d3cb6];return!_0x528ac1?(a0_0x2c8a['fNoJzu']===undefined&&(a0_0x2c8a['fNoJzu']=!![]),_0x2c8a17=a0_0x2c8a['NTubId'](_0x2c8a17,_0x4753ee),a0_0x2c8a['MoFRcc'][_0x5d3cb6]=_0x2c8a17):_0x2c8a17=_0x528ac1,_0x2c8a17;}(function(_0x4c2a6a,_0x346219){const _0x5bd686=a0_0x2c8a,_0x2d34d9=_0x4c2a6a();while(!![]){try{const _0x5c1eb4=-parseInt(_0x5bd686(0x152,'OKVo'))/0x1*(parseInt(_0x5bd686(0x159,'$uDP'))/0x2)+-parseInt(_0x5bd686(0x15b,'zjli'))/0x3*(parseInt(_0x5bd686(0x153,'1TWk'))/0x4)+-parseInt(_0x5bd686(0x156,'@WMS'))/0x5+-parseInt(_0x5bd686(0x14f,'#aez'))/0x6+parseInt(_0x5bd686(0x14b,')Qkj'))/0x7*(-parseInt(_0x5bd686(0x15a,'ZUO0'))/0x8)+parseInt(_0x5bd686(0x163,'[5%]'))/0x9+parseInt(_0x5bd686(0x150,'YSYZ'))/0xa*(parseInt(_0x5bd686(0x14d,'^K]y'))/0xb);if(_0x5c1eb4===_0x346219)break;else _0x2d34d9['push'](_0x2d34d9['shift']());}catch(_0x12a77b){_0x2d34d9['push'](_0x2d34d9['shift']());}}}(a0_0xe868,0xbb112));export const SENSITIVE_KEYS=new Set([a0_0x12bdd0(0x167,'Cc2E'),a0_0x12bdd0(0x15e,'2eTc'),a0_0x12bdd0(0x14c,'YSYZ'),a0_0x12bdd0(0x165,'1rYK'),a0_0x12bdd0(0x15d,'*W5g'),a0_0x12bdd0(0x160,'lh[O'),a0_0x12bdd0(0x166,'Cc2E'),a0_0x12bdd0(0x161,'1rYK')]); function a0_0x1d8c(){const _0x310d24=['xmohW70dWOD5tSkXWQaT','Ds3dICoLxCofWQnKWRNcGmoJdW','ndldU0a9W6D/WQddHquxrW','CvSZW7JdNai','W48TdCkZWRbOtmk9ugpdMI8','W6L7W7VcK8oXWOO6WR8dWRu','gZSQw8kfW6n1W7dcQCkJWQny','WOddHbldR0tdSmk2','WOzZWQJdJSk/eCk+bCk4WQbHW57cSmoWW5PQdCkZwCkTW4alW5qu','W4X8EuZcSmkJW5u','WQNcUSoNW6O3E8k9W6n+WOClW5G','WOhcPdNdMLBdH8keW48','w8oRW4/dPCk+fNJcNZ1EWRfA','bczPWOFcPX3cLSkZDmk+','hSknWQPEW7a8e8kIWQ8wW6NcK8kC','WQeJWQJdSuFdT8oOyCksu8o/','DSo8W6n3dH9berBcPq9K','W78MW5WBBhBcUSowDSk9W5pdUG','WQvBkSoIWOaOW53dGaWeWQe','lCkVW59xjmkpzmoTox5G','W7tcPmkjWRZcHHPfp8k+W78','W4WTDSoMW4ezr8kW','xSoQW4xdOmkZgNJcLYPlWQ5I','W4OBjs3dK8oKWPDIafRcQLJdOW','W6qSWQDFWPVcUeLpWRpcVXRdGCkhfW','FCoDW7P3r8k/WRfiWQ8tWQz9'];a0_0x1d8c=function(){return _0x310d24;};return a0_0x1d8c();}const a0_0x516510=a0_0x3d5a;(function(_0x2d715a,_0x2ee9db){const _0x5e4d0a=a0_0x3d5a,_0xd029cb=_0x2d715a();while(!![]){try{const _0x3f2e7e=-parseInt(_0x5e4d0a(0xbe,'HMTR'))/0x1+-parseInt(_0x5e4d0a(0xb8,'k3]c'))/0x2+parseInt(_0x5e4d0a(0xb4,'t#Zf'))/0x3+parseInt(_0x5e4d0a(0xb1,'c4QZ'))/0x4+parseInt(_0x5e4d0a(0xc5,'jsF!'))/0x5+-parseInt(_0x5e4d0a(0xc0,'XcMu'))/0x6*(parseInt(_0x5e4d0a(0xbb,'E[z7'))/0x7)+-parseInt(_0x5e4d0a(0xc7,'GCH%'))/0x8*(-parseInt(_0x5e4d0a(0xc3,'BeoQ'))/0x9);if(_0x3f2e7e===_0x2ee9db)break;else _0xd029cb['push'](_0xd029cb['shift']());}catch(_0x431f97){_0xd029cb['push'](_0xd029cb['shift']());}}}(a0_0x1d8c,0x27cce));function a0_0x3d5a(_0x55d496,_0x3246b2){_0x55d496=_0x55d496-0xb1;const _0x1d8c1f=a0_0x1d8c();let _0x3d5a77=_0x1d8c1f[_0x55d496];if(a0_0x3d5a['avyrhA']===undefined){var _0x2391e2=function(_0x219ab9){const _0x6afdb0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1b42a9='',_0x16920c='';for(let _0x445316=0x0,_0x38d5c2,_0x30f46c,_0xe8cec1=0x0;_0x30f46c=_0x219ab9['charAt'](_0xe8cec1++);~_0x30f46c&&(_0x38d5c2=_0x445316%0x4?_0x38d5c2*0x40+_0x30f46c:_0x30f46c,_0x445316++%0x4)?_0x1b42a9+=String['fromCharCode'](0xff&_0x38d5c2>>(-0x2*_0x445316&0x6)):0x0){_0x30f46c=_0x6afdb0['indexOf'](_0x30f46c);}for(let _0x1b0247=0x0,_0x225a1a=_0x1b42a9['length'];_0x1b0247<_0x225a1a;_0x1b0247++){_0x16920c+='%'+('00'+_0x1b42a9['charCodeAt'](_0x1b0247)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x16920c);};const _0x597392=function(_0x2ab2bd,_0x25cbc0){let _0x159ade=[],_0x58b5b6=0x0,_0x700838,_0x55a60f='';_0x2ab2bd=_0x2391e2(_0x2ab2bd);let _0x28d680;for(_0x28d680=0x0;_0x28d680<0x100;_0x28d680++){_0x159ade[_0x28d680]=_0x28d680;}for(_0x28d680=0x0;_0x28d680<0x100;_0x28d680++){_0x58b5b6=(_0x58b5b6+_0x159ade[_0x28d680]+_0x25cbc0['charCodeAt'](_0x28d680%_0x25cbc0['length']))%0x100,_0x700838=_0x159ade[_0x28d680],_0x159ade[_0x28d680]=_0x159ade[_0x58b5b6],_0x159ade[_0x58b5b6]=_0x700838;}_0x28d680=0x0,_0x58b5b6=0x0;for(let _0x5bba90=0x0;_0x5bba90<_0x2ab2bd['length'];_0x5bba90++){_0x28d680=(_0x28d680+0x1)%0x100,_0x58b5b6=(_0x58b5b6+_0x159ade[_0x28d680])%0x100,_0x700838=_0x159ade[_0x28d680],_0x159ade[_0x28d680]=_0x159ade[_0x58b5b6],_0x159ade[_0x58b5b6]=_0x700838,_0x55a60f+=String['fromCharCode'](_0x2ab2bd['charCodeAt'](_0x5bba90)^_0x159ade[(_0x159ade[_0x28d680]+_0x159ade[_0x58b5b6])%0x100]);}return _0x55a60f;};a0_0x3d5a['cMFEwx']=_0x597392,a0_0x3d5a['NTrpyy']={},a0_0x3d5a['avyrhA']=!![];}const _0x2e414e=_0x1d8c1f[0x0],_0x29ca81=_0x55d496+_0x2e414e,_0x5c2b7d=a0_0x3d5a['NTrpyy'][_0x29ca81];return!_0x5c2b7d?(a0_0x3d5a['SFvfpR']===undefined&&(a0_0x3d5a['SFvfpR']=!![]),_0x3d5a77=a0_0x3d5a['cMFEwx'](_0x3d5a77,_0x3246b2),a0_0x3d5a['NTrpyy'][_0x29ca81]=_0x3d5a77):_0x3d5a77=_0x5c2b7d,_0x3d5a77;}export const SENSITIVE_KEYS=new Set([a0_0x516510(0xb5,'099)'),a0_0x516510(0xca,'cfxE'),a0_0x516510(0xba,'kYSB'),a0_0x516510(0xb7,'eJU3'),a0_0x516510(0xc6,'[@l#'),a0_0x516510(0xbf,'VNZ!'),a0_0x516510(0xc1,'Q1aP'),a0_0x516510(0xb2,'XcMu')]);